From ace4fe566fc3af4876c7458f983feeb5eae3df26 Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Thu, 26 Oct 2017 22:35:25 -0400 Subject: deps: update npm to 5.5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: https://github.com/nodejs/node/pull/16280 PR-URL: https://github.com/nodejs/node/pull/16509 Fixes: https://github.com/nodejs/node/issues/14161 Reviewed-By: Daijiro Wachi Reviewed-By: Anna Henningsen Reviewed-By: Michaël Zasso --- deps/npm/.mailmap | 1 + deps/npm/.travis.yml | 3 - deps/npm/AUTHORS | 25 +- deps/npm/CHANGELOG.md | 399 + deps/npm/Makefile | 24 +- deps/npm/README.md | 4 +- deps/npm/bin/read-package-json.js | 24 - deps/npm/doc/cli/npm-access.md | 3 + deps/npm/doc/cli/npm-config.md | 5 +- deps/npm/doc/cli/npm-dist-tag.md | 4 +- deps/npm/doc/cli/npm-owner.md | 4 + deps/npm/doc/cli/npm-ping.md | 8 + deps/npm/doc/cli/npm-profile.md | 74 + deps/npm/doc/cli/npm-publish.md | 8 +- deps/npm/doc/cli/npm-run-script.md | 14 +- deps/npm/doc/cli/npm-token.md | 59 + deps/npm/doc/cli/npm-version.md | 7 + deps/npm/doc/files/npm-package-locks.md | 2 +- deps/npm/doc/files/package.json.md | 25 +- deps/npm/doc/misc/npm-config.md | 56 +- deps/npm/doc/misc/npm-developers.md | 13 + deps/npm/doc/misc/npm-index.md | 8 + deps/npm/doc/misc/npm-scripts.md | 2 +- deps/npm/doc/misc/semver.md | 90 +- deps/npm/html/doc/README.html | 6 +- deps/npm/html/doc/cli/npm-access.html | 4 +- deps/npm/html/doc/cli/npm-adduser.html | 2 +- deps/npm/html/doc/cli/npm-bin.html | 2 +- deps/npm/html/doc/cli/npm-bugs.html | 2 +- deps/npm/html/doc/cli/npm-build.html | 2 +- deps/npm/html/doc/cli/npm-bundle.html | 2 +- deps/npm/html/doc/cli/npm-cache.html | 2 +- deps/npm/html/doc/cli/npm-completion.html | 2 +- deps/npm/html/doc/cli/npm-config.html | 7 +- deps/npm/html/doc/cli/npm-dedupe.html | 2 +- deps/npm/html/doc/cli/npm-deprecate.html | 2 +- deps/npm/html/doc/cli/npm-dist-tag.html | 6 +- deps/npm/html/doc/cli/npm-docs.html | 2 +- deps/npm/html/doc/cli/npm-doctor.html | 2 +- deps/npm/html/doc/cli/npm-edit.html | 2 +- deps/npm/html/doc/cli/npm-explore.html | 2 +- deps/npm/html/doc/cli/npm-help-search.html | 2 +- deps/npm/html/doc/cli/npm-help.html | 2 +- deps/npm/html/doc/cli/npm-init.html | 2 +- deps/npm/html/doc/cli/npm-install-test.html | 2 +- deps/npm/html/doc/cli/npm-install.html | 2 +- deps/npm/html/doc/cli/npm-link.html | 2 +- deps/npm/html/doc/cli/npm-logout.html | 2 +- deps/npm/html/doc/cli/npm-ls.html | 4 +- deps/npm/html/doc/cli/npm-outdated.html | 2 +- deps/npm/html/doc/cli/npm-owner.html | 5 +- deps/npm/html/doc/cli/npm-pack.html | 2 +- deps/npm/html/doc/cli/npm-ping.html | 10 +- deps/npm/html/doc/cli/npm-prefix.html | 2 +- deps/npm/html/doc/cli/npm-profile.html | 93 + deps/npm/html/doc/cli/npm-prune.html | 2 +- deps/npm/html/doc/cli/npm-publish.html | 10 +- deps/npm/html/doc/cli/npm-rebuild.html | 2 +- deps/npm/html/doc/cli/npm-repo.html | 2 +- deps/npm/html/doc/cli/npm-restart.html | 2 +- deps/npm/html/doc/cli/npm-root.html | 2 +- deps/npm/html/doc/cli/npm-run-script.html | 13 +- deps/npm/html/doc/cli/npm-search.html | 2 +- deps/npm/html/doc/cli/npm-shrinkwrap.html | 2 +- deps/npm/html/doc/cli/npm-star.html | 2 +- deps/npm/html/doc/cli/npm-stars.html | 2 +- deps/npm/html/doc/cli/npm-start.html | 2 +- deps/npm/html/doc/cli/npm-stop.html | 2 +- deps/npm/html/doc/cli/npm-team.html | 2 +- deps/npm/html/doc/cli/npm-test.html | 2 +- deps/npm/html/doc/cli/npm-token.html | 76 + deps/npm/html/doc/cli/npm-uninstall.html | 2 +- deps/npm/html/doc/cli/npm-unpublish.html | 2 +- deps/npm/html/doc/cli/npm-update.html | 2 +- deps/npm/html/doc/cli/npm-version.html | 8 +- deps/npm/html/doc/cli/npm-view.html | 2 +- deps/npm/html/doc/cli/npm-whoami.html | 2 +- deps/npm/html/doc/cli/npm.html | 6 +- deps/npm/html/doc/files/npm-folders.html | 2 +- deps/npm/html/doc/files/npm-global.html | 2 +- deps/npm/html/doc/files/npm-json.html | 24 +- deps/npm/html/doc/files/npm-package-locks.html | 4 +- deps/npm/html/doc/files/npm-shrinkwrap.json.html | 2 +- deps/npm/html/doc/files/npmrc.html | 2 +- deps/npm/html/doc/files/package-lock.json.html | 2 +- deps/npm/html/doc/files/package.json.html | 24 +- deps/npm/html/doc/index.html | 6 +- deps/npm/html/doc/misc/npm-coding-style.html | 2 +- deps/npm/html/doc/misc/npm-config.html | 51 +- deps/npm/html/doc/misc/npm-developers.html | 12 +- deps/npm/html/doc/misc/npm-disputes.html | 12 +- deps/npm/html/doc/misc/npm-index.html | 6 +- deps/npm/html/doc/misc/npm-orgs.html | 2 +- deps/npm/html/doc/misc/npm-registry.html | 2 +- deps/npm/html/doc/misc/npm-scope.html | 2 +- deps/npm/html/doc/misc/npm-scripts.html | 4 +- deps/npm/html/doc/misc/removing-npm.html | 2 +- deps/npm/html/doc/misc/semver.html | 31 +- deps/npm/lib/auth/legacy.js | 186 +- deps/npm/lib/build.js | 21 +- deps/npm/lib/config.js | 149 +- deps/npm/lib/config/cmd-list.js | 2 + deps/npm/lib/config/defaults.js | 12 +- deps/npm/lib/config/lifecycle.js | 30 + deps/npm/lib/help.js | 6 + deps/npm/lib/install/action/extract.js | 32 +- deps/npm/lib/install/action/install.js | 2 +- deps/npm/lib/install/action/move.js | 12 +- deps/npm/lib/install/action/postinstall.js | 2 +- deps/npm/lib/install/action/preinstall.js | 2 +- deps/npm/lib/install/action/prepare.js | 4 +- deps/npm/lib/install/action/unbuild.js | 6 +- deps/npm/lib/install/actions.js | 1 + deps/npm/lib/install/deps.js | 22 +- deps/npm/lib/install/update-package-json.js | 7 +- deps/npm/lib/install/validate-tree.js | 2 +- deps/npm/lib/ls.js | 2 +- deps/npm/lib/npm.js | 15 +- deps/npm/lib/outdated.js | 10 +- deps/npm/lib/pack.js | 22 +- deps/npm/lib/ping.js | 8 +- deps/npm/lib/profile.js | 296 + deps/npm/lib/publish.js | 9 + deps/npm/lib/restart.js | 2 +- deps/npm/lib/run-script.js | 2 +- deps/npm/lib/shrinkwrap.js | 12 +- deps/npm/lib/start.js | 2 +- deps/npm/lib/stop.js | 2 +- deps/npm/lib/test.js | 8 +- deps/npm/lib/token.js | 211 + deps/npm/lib/unbuild.js | 10 +- deps/npm/lib/utils/convert-line-endings.js | 49 + deps/npm/lib/utils/did-you-mean.js | 20 + deps/npm/lib/utils/error-handler.js | 8 - deps/npm/lib/utils/error-message.js | 48 +- deps/npm/lib/utils/is-hashbang-file.js | 19 + deps/npm/lib/utils/lifecycle-cmd.js | 18 + deps/npm/lib/utils/lifecycle.js | 462 +- deps/npm/lib/utils/map-to-registry.js | 3 + deps/npm/lib/utils/module-name.js | 4 +- deps/npm/lib/utils/pulse-till-done.js | 40 +- deps/npm/lib/utils/read-user-info.js | 65 + deps/npm/lib/utils/tar.js | 454 - deps/npm/lib/utils/unsupported.js | 26 +- deps/npm/lib/version.js | 10 +- deps/npm/man/man1/npm-README.1 | 6 +- deps/npm/man/man1/npm-access.1 | 5 +- deps/npm/man/man1/npm-adduser.1 | 2 +- deps/npm/man/man1/npm-bin.1 | 2 +- deps/npm/man/man1/npm-bugs.1 | 2 +- deps/npm/man/man1/npm-build.1 | 2 +- deps/npm/man/man1/npm-bundle.1 | 2 +- deps/npm/man/man1/npm-cache.1 | 2 +- deps/npm/man/man1/npm-completion.1 | 2 +- deps/npm/man/man1/npm-config.1 | 7 +- deps/npm/man/man1/npm-dedupe.1 | 2 +- deps/npm/man/man1/npm-deprecate.1 | 2 +- deps/npm/man/man1/npm-dist-tag.1 | 6 +- deps/npm/man/man1/npm-docs.1 | 2 +- deps/npm/man/man1/npm-doctor.1 | 2 +- deps/npm/man/man1/npm-edit.1 | 2 +- deps/npm/man/man1/npm-explore.1 | 2 +- deps/npm/man/man1/npm-help-search.1 | 2 +- deps/npm/man/man1/npm-help.1 | 2 +- deps/npm/man/man1/npm-init.1 | 2 +- deps/npm/man/man1/npm-install-test.1 | 2 +- deps/npm/man/man1/npm-install.1 | 2 +- deps/npm/man/man1/npm-link.1 | 2 +- deps/npm/man/man1/npm-logout.1 | 2 +- deps/npm/man/man1/npm-ls.1 | 4 +- deps/npm/man/man1/npm-outdated.1 | 2 +- deps/npm/man/man1/npm-owner.1 | 6 +- deps/npm/man/man1/npm-pack.1 | 2 +- deps/npm/man/man1/npm-ping.1 | 17 +- deps/npm/man/man1/npm-prefix.1 | 2 +- deps/npm/man/man1/npm-profile.1 | 91 + deps/npm/man/man1/npm-prune.1 | 2 +- deps/npm/man/man1/npm-publish.1 | 11 +- deps/npm/man/man1/npm-rebuild.1 | 2 +- deps/npm/man/man1/npm-repo.1 | 2 +- deps/npm/man/man1/npm-restart.1 | 2 +- deps/npm/man/man1/npm-root.1 | 2 +- deps/npm/man/man1/npm-run-script.1 | 20 +- deps/npm/man/man1/npm-search.1 | 2 +- deps/npm/man/man1/npm-shrinkwrap.1 | 2 +- deps/npm/man/man1/npm-star.1 | 2 +- deps/npm/man/man1/npm-stars.1 | 2 +- deps/npm/man/man1/npm-start.1 | 2 +- deps/npm/man/man1/npm-stop.1 | 2 +- deps/npm/man/man1/npm-team.1 | 2 +- deps/npm/man/man1/npm-test.1 | 2 +- deps/npm/man/man1/npm-token.1 | 73 + deps/npm/man/man1/npm-uninstall.1 | 2 +- deps/npm/man/man1/npm-unpublish.1 | 2 +- deps/npm/man/man1/npm-update.1 | 2 +- deps/npm/man/man1/npm-version.1 | 12 +- deps/npm/man/man1/npm-view.1 | 2 +- deps/npm/man/man1/npm-whoami.1 | 2 +- deps/npm/man/man1/npm.1 | 4 +- deps/npm/man/man1/npx.1 | 2 +- deps/npm/man/man5/npm-folders.5 | 2 +- deps/npm/man/man5/npm-global.5 | 2 +- deps/npm/man/man5/npm-json.5 | 27 +- deps/npm/man/man5/npm-package-locks.5 | 4 +- deps/npm/man/man5/npm-shrinkwrap.json.5 | 2 +- deps/npm/man/man5/npmrc.5 | 2 +- deps/npm/man/man5/package-lock.json.5 | 2 +- deps/npm/man/man5/package.json.5 | 27 +- deps/npm/man/man7/npm-coding-style.7 | 2 +- deps/npm/man/man7/npm-config.7 | 73 +- deps/npm/man/man7/npm-developers.7 | 14 +- deps/npm/man/man7/npm-disputes.7 | 2 +- deps/npm/man/man7/npm-index.7 | 8 +- deps/npm/man/man7/npm-orgs.7 | 2 +- deps/npm/man/man7/npm-registry.7 | 2 +- deps/npm/man/man7/npm-scope.7 | 2 +- deps/npm/man/man7/npm-scripts.7 | 4 +- deps/npm/man/man7/removing-npm.7 | 2 +- deps/npm/man/man7/semver.7 | 33 +- deps/npm/node_modules/abbrev/LICENSE | 31 + deps/npm/node_modules/abbrev/package.json | 31 +- deps/npm/node_modules/aproba/README.md | 5 + deps/npm/node_modules/aproba/index.js | 2 +- deps/npm/node_modules/aproba/package.json | 25 +- deps/npm/node_modules/cli-table2/.npmignore | 5 + deps/npm/node_modules/cli-table2/.travis.yml | 6 + deps/npm/node_modules/cli-table2/README.md | 215 + deps/npm/node_modules/cli-table2/advanced-usage.md | 246 + deps/npm/node_modules/cli-table2/basic-usage.md | 145 + .../cli-table2/examples/basic-usage-examples.js | 222 + .../examples/col-and-row-span-examples.js | 358 + .../screenshots/basic-usage-with-colors.png | Bin 0 -> 6265 bytes .../examples/screenshots/multi-line-colors.png | Bin 0 -> 13063 bytes .../screenshots/truncation-with-colors.png | Bin 0 -> 5018 bytes deps/npm/node_modules/cli-table2/gulpfile.js | 73 + deps/npm/node_modules/cli-table2/index.js | 1 + .../node_modules/cli-table2/lib/print-example.js | 123 + .../cli-table2/node_modules/colors/LICENSE | 23 + .../cli-table2/node_modules/colors/ReadMe.md | 178 + .../node_modules/colors/examples/normal-usage.js | 74 + .../node_modules/colors/examples/safe-string.js | 73 + .../cli-table2/node_modules/colors/lib/colors.js | 187 + .../node_modules/colors/lib/custom/trap.js | 45 + .../node_modules/colors/lib/custom/zalgo.js | 104 + .../colors/lib/extendStringPrototype.js | 113 + .../cli-table2/node_modules/colors/lib/index.js | 12 + .../node_modules/colors/lib/maps/america.js | 12 + .../node_modules/colors/lib/maps/rainbow.js | 12 + .../node_modules/colors/lib/maps/random.js | 8 + .../node_modules/colors/lib/maps/zebra.js | 5 + .../cli-table2/node_modules/colors/lib/styles.js | 77 + .../colors/lib/system/supports-colors.js | 61 + .../cli-table2/node_modules/colors/package.json | 61 + .../cli-table2/node_modules/colors/safe.js | 9 + .../node_modules/colors/themes/generic-logging.js | 12 + .../cli-table2/node_modules/lodash/LICENSE | 22 + .../cli-table2/node_modules/lodash/README.md | 121 + .../cli-table2/node_modules/lodash/array.js | 44 + .../cli-table2/node_modules/lodash/array/chunk.js | 46 + .../node_modules/lodash/array/compact.js | 30 + .../node_modules/lodash/array/difference.js | 29 + .../cli-table2/node_modules/lodash/array/drop.js | 39 + .../node_modules/lodash/array/dropRight.js | 40 + .../node_modules/lodash/array/dropRightWhile.js | 59 + .../node_modules/lodash/array/dropWhile.js | 59 + .../cli-table2/node_modules/lodash/array/fill.js | 44 + .../node_modules/lodash/array/findIndex.js | 53 + .../node_modules/lodash/array/findLastIndex.js | 53 + .../cli-table2/node_modules/lodash/array/first.js | 22 + .../node_modules/lodash/array/flatten.js | 32 + .../node_modules/lodash/array/flattenDeep.js | 21 + .../cli-table2/node_modules/lodash/array/head.js | 1 + .../node_modules/lodash/array/indexOf.js | 53 + .../node_modules/lodash/array/initial.js | 20 + .../node_modules/lodash/array/intersection.js | 58 + .../cli-table2/node_modules/lodash/array/last.js | 19 + .../node_modules/lodash/array/lastIndexOf.js | 60 + .../cli-table2/node_modules/lodash/array/object.js | 1 + .../cli-table2/node_modules/lodash/array/pull.js | 52 + .../cli-table2/node_modules/lodash/array/pullAt.js | 40 + .../cli-table2/node_modules/lodash/array/remove.js | 64 + .../cli-table2/node_modules/lodash/array/rest.js | 21 + .../cli-table2/node_modules/lodash/array/slice.js | 30 + .../node_modules/lodash/array/sortedIndex.js | 53 + .../node_modules/lodash/array/sortedLastIndex.js | 25 + .../cli-table2/node_modules/lodash/array/tail.js | 1 + .../cli-table2/node_modules/lodash/array/take.js | 39 + .../node_modules/lodash/array/takeRight.js | 40 + .../node_modules/lodash/array/takeRightWhile.js | 59 + .../node_modules/lodash/array/takeWhile.js | 59 + .../cli-table2/node_modules/lodash/array/union.js | 24 + .../cli-table2/node_modules/lodash/array/uniq.js | 71 + .../cli-table2/node_modules/lodash/array/unique.js | 1 + .../cli-table2/node_modules/lodash/array/unzip.js | 47 + .../node_modules/lodash/array/unzipWith.js | 41 + .../node_modules/lodash/array/without.js | 27 + .../cli-table2/node_modules/lodash/array/xor.js | 35 + .../cli-table2/node_modules/lodash/array/zip.js | 21 + .../node_modules/lodash/array/zipObject.js | 43 + .../node_modules/lodash/array/zipWith.js | 36 + .../cli-table2/node_modules/lodash/chain.js | 16 + .../cli-table2/node_modules/lodash/chain/chain.js | 35 + .../cli-table2/node_modules/lodash/chain/commit.js | 1 + .../cli-table2/node_modules/lodash/chain/concat.js | 1 + .../cli-table2/node_modules/lodash/chain/lodash.js | 125 + .../cli-table2/node_modules/lodash/chain/plant.js | 1 + .../node_modules/lodash/chain/reverse.js | 1 + .../cli-table2/node_modules/lodash/chain/run.js | 1 + .../cli-table2/node_modules/lodash/chain/tap.js | 29 + .../cli-table2/node_modules/lodash/chain/thru.js | 26 + .../cli-table2/node_modules/lodash/chain/toJSON.js | 1 + .../node_modules/lodash/chain/toString.js | 1 + .../cli-table2/node_modules/lodash/chain/value.js | 1 + .../node_modules/lodash/chain/valueOf.js | 1 + .../node_modules/lodash/chain/wrapperChain.js | 32 + .../node_modules/lodash/chain/wrapperCommit.js | 32 + .../node_modules/lodash/chain/wrapperConcat.js | 34 + .../node_modules/lodash/chain/wrapperPlant.js | 45 + .../node_modules/lodash/chain/wrapperReverse.js | 43 + .../node_modules/lodash/chain/wrapperToString.js | 17 + .../node_modules/lodash/chain/wrapperValue.js | 20 + .../cli-table2/node_modules/lodash/collection.js | 44 + .../node_modules/lodash/collection/all.js | 1 + .../node_modules/lodash/collection/any.js | 1 + .../node_modules/lodash/collection/at.js | 29 + .../node_modules/lodash/collection/collect.js | 1 + .../node_modules/lodash/collection/contains.js | 1 + .../node_modules/lodash/collection/countBy.js | 54 + .../node_modules/lodash/collection/detect.js | 1 + .../node_modules/lodash/collection/each.js | 1 + .../node_modules/lodash/collection/eachRight.js | 1 + .../node_modules/lodash/collection/every.js | 66 + .../node_modules/lodash/collection/filter.js | 61 + .../node_modules/lodash/collection/find.js | 56 + .../node_modules/lodash/collection/findLast.js | 25 + .../node_modules/lodash/collection/findWhere.js | 37 + .../node_modules/lodash/collection/foldl.js | 1 + .../node_modules/lodash/collection/foldr.js | 1 + .../node_modules/lodash/collection/forEach.js | 37 + .../node_modules/lodash/collection/forEachRight.js | 26 + .../node_modules/lodash/collection/groupBy.js | 59 + .../node_modules/lodash/collection/include.js | 1 + .../node_modules/lodash/collection/includes.js | 57 + .../node_modules/lodash/collection/indexBy.js | 53 + .../node_modules/lodash/collection/inject.js | 1 + .../node_modules/lodash/collection/invoke.js | 42 + .../node_modules/lodash/collection/map.js | 68 + .../node_modules/lodash/collection/max.js | 1 + .../node_modules/lodash/collection/min.js | 1 + .../node_modules/lodash/collection/partition.js | 66 + .../node_modules/lodash/collection/pluck.js | 31 + .../node_modules/lodash/collection/reduce.js | 44 + .../node_modules/lodash/collection/reduceRight.js | 29 + .../node_modules/lodash/collection/reject.js | 50 + .../node_modules/lodash/collection/sample.js | 50 + .../node_modules/lodash/collection/select.js | 1 + .../node_modules/lodash/collection/shuffle.js | 24 + .../node_modules/lodash/collection/size.js | 30 + .../node_modules/lodash/collection/some.js | 67 + .../node_modules/lodash/collection/sortBy.js | 71 + .../node_modules/lodash/collection/sortByAll.js | 52 + .../node_modules/lodash/collection/sortByOrder.js | 55 + .../node_modules/lodash/collection/sum.js | 1 + .../node_modules/lodash/collection/where.js | 37 + .../cli-table2/node_modules/lodash/date.js | 3 + .../cli-table2/node_modules/lodash/date/now.js | 24 + .../cli-table2/node_modules/lodash/function.js | 28 + .../node_modules/lodash/function/after.js | 48 + .../cli-table2/node_modules/lodash/function/ary.js | 34 + .../node_modules/lodash/function/backflow.js | 1 + .../node_modules/lodash/function/before.js | 42 + .../node_modules/lodash/function/bind.js | 56 + .../node_modules/lodash/function/bindAll.js | 50 + .../node_modules/lodash/function/bindKey.js | 66 + .../node_modules/lodash/function/compose.js | 1 + .../node_modules/lodash/function/curry.js | 51 + .../node_modules/lodash/function/curryRight.js | 48 + .../node_modules/lodash/function/debounce.js | 181 + .../node_modules/lodash/function/defer.js | 25 + .../node_modules/lodash/function/delay.js | 26 + .../node_modules/lodash/function/flow.js | 25 + .../node_modules/lodash/function/flowRight.js | 25 + .../node_modules/lodash/function/memoize.js | 80 + .../node_modules/lodash/function/modArgs.js | 58 + .../node_modules/lodash/function/negate.js | 32 + .../node_modules/lodash/function/once.js | 24 + .../node_modules/lodash/function/partial.js | 43 + .../node_modules/lodash/function/partialRight.js | 42 + .../node_modules/lodash/function/rearg.js | 40 + .../node_modules/lodash/function/restParam.js | 58 + .../node_modules/lodash/function/spread.js | 44 + .../node_modules/lodash/function/throttle.js | 62 + .../node_modules/lodash/function/wrap.js | 33 + .../cli-table2/node_modules/lodash/index.js | 12351 +++++++++++++++++++ .../node_modules/lodash/internal/LazyWrapper.js | 26 + .../node_modules/lodash/internal/LodashWrapper.js | 21 + .../node_modules/lodash/internal/MapCache.js | 24 + .../node_modules/lodash/internal/SetCache.js | 29 + .../node_modules/lodash/internal/arrayConcat.js | 25 + .../node_modules/lodash/internal/arrayCopy.js | 20 + .../node_modules/lodash/internal/arrayEach.js | 22 + .../node_modules/lodash/internal/arrayEachRight.js | 21 + .../node_modules/lodash/internal/arrayEvery.js | 23 + .../node_modules/lodash/internal/arrayExtremum.js | 30 + .../node_modules/lodash/internal/arrayFilter.js | 25 + .../node_modules/lodash/internal/arrayMap.js | 21 + .../node_modules/lodash/internal/arrayPush.js | 20 + .../node_modules/lodash/internal/arrayReduce.js | 26 + .../lodash/internal/arrayReduceRight.js | 24 + .../node_modules/lodash/internal/arraySome.js | 23 + .../node_modules/lodash/internal/arraySum.js | 20 + .../node_modules/lodash/internal/assignDefaults.js | 13 + .../lodash/internal/assignOwnDefaults.js | 26 + .../node_modules/lodash/internal/assignWith.js | 32 + .../node_modules/lodash/internal/baseAssign.js | 19 + .../node_modules/lodash/internal/baseAt.js | 32 + .../node_modules/lodash/internal/baseCallback.js | 35 + .../node_modules/lodash/internal/baseClone.js | 128 + .../lodash/internal/baseCompareAscending.js | 34 + .../node_modules/lodash/internal/baseCopy.js | 23 + .../node_modules/lodash/internal/baseCreate.js | 23 + .../node_modules/lodash/internal/baseDelay.js | 21 + .../node_modules/lodash/internal/baseDifference.js | 55 + .../node_modules/lodash/internal/baseEach.js | 15 + .../node_modules/lodash/internal/baseEachRight.js | 15 + .../node_modules/lodash/internal/baseEvery.js | 22 + .../node_modules/lodash/internal/baseExtremum.js | 29 + .../node_modules/lodash/internal/baseFill.js | 31 + .../node_modules/lodash/internal/baseFilter.js | 22 + .../node_modules/lodash/internal/baseFind.js | 25 + .../node_modules/lodash/internal/baseFindIndex.js | 23 + .../node_modules/lodash/internal/baseFlatten.js | 41 + .../node_modules/lodash/internal/baseFor.js | 17 + .../node_modules/lodash/internal/baseForIn.js | 17 + .../node_modules/lodash/internal/baseForOwn.js | 17 + .../lodash/internal/baseForOwnRight.js | 17 + .../node_modules/lodash/internal/baseForRight.js | 15 + .../node_modules/lodash/internal/baseFunctions.js | 27 + .../node_modules/lodash/internal/baseGet.js | 29 + .../node_modules/lodash/internal/baseIndexOf.js | 27 + .../node_modules/lodash/internal/baseIsEqual.js | 28 + .../lodash/internal/baseIsEqualDeep.js | 102 + .../node_modules/lodash/internal/baseIsFunction.js | 15 + .../node_modules/lodash/internal/baseIsMatch.js | 52 + .../node_modules/lodash/internal/baseLodash.js | 10 + .../node_modules/lodash/internal/baseMap.js | 23 + .../node_modules/lodash/internal/baseMatches.js | 30 + .../lodash/internal/baseMatchesProperty.js | 45 + .../node_modules/lodash/internal/baseMerge.js | 56 + .../node_modules/lodash/internal/baseMergeDeep.js | 67 + .../node_modules/lodash/internal/baseProperty.js | 14 + .../lodash/internal/basePropertyDeep.js | 19 + .../node_modules/lodash/internal/basePullAt.js | 30 + .../node_modules/lodash/internal/baseRandom.js | 18 + .../node_modules/lodash/internal/baseReduce.js | 24 + .../node_modules/lodash/internal/baseSetData.js | 17 + .../node_modules/lodash/internal/baseSlice.js | 32 + .../node_modules/lodash/internal/baseSome.js | 23 + .../node_modules/lodash/internal/baseSortBy.js | 21 + .../lodash/internal/baseSortByOrder.js | 31 + .../node_modules/lodash/internal/baseSum.js | 20 + .../node_modules/lodash/internal/baseToString.js | 13 + .../node_modules/lodash/internal/baseUniq.js | 60 + .../node_modules/lodash/internal/baseValues.js | 22 + .../node_modules/lodash/internal/baseWhile.js | 24 + .../lodash/internal/baseWrapperValue.js | 29 + .../node_modules/lodash/internal/binaryIndex.js | 39 + .../node_modules/lodash/internal/binaryIndexBy.js | 57 + .../node_modules/lodash/internal/bindCallback.js | 39 + .../node_modules/lodash/internal/bufferClone.js | 20 + .../node_modules/lodash/internal/cacheIndexOf.js | 19 + .../node_modules/lodash/internal/cachePush.js | 20 + .../node_modules/lodash/internal/charsLeftIndex.js | 18 + .../lodash/internal/charsRightIndex.js | 17 + .../lodash/internal/compareAscending.js | 16 + .../lodash/internal/compareMultiple.js | 44 + .../node_modules/lodash/internal/composeArgs.js | 34 + .../lodash/internal/composeArgsRight.js | 36 + .../lodash/internal/createAggregator.js | 35 + .../node_modules/lodash/internal/createAssigner.js | 41 + .../node_modules/lodash/internal/createBaseEach.js | 31 + .../node_modules/lodash/internal/createBaseFor.js | 27 + .../lodash/internal/createBindWrapper.js | 22 + .../node_modules/lodash/internal/createCache.js | 21 + .../lodash/internal/createCompounder.js | 26 + .../lodash/internal/createCtorWrapper.js | 37 + .../node_modules/lodash/internal/createCurry.js | 23 + .../node_modules/lodash/internal/createDefaults.js | 22 + .../node_modules/lodash/internal/createExtremum.js | 33 + .../node_modules/lodash/internal/createFind.js | 25 + .../lodash/internal/createFindIndex.js | 21 + .../node_modules/lodash/internal/createFindKey.js | 18 + .../node_modules/lodash/internal/createFlow.js | 74 + .../node_modules/lodash/internal/createForEach.js | 20 + .../node_modules/lodash/internal/createForIn.js | 20 + .../node_modules/lodash/internal/createForOwn.js | 19 + .../lodash/internal/createHybridWrapper.js | 111 + .../lodash/internal/createObjectMapper.js | 26 + .../node_modules/lodash/internal/createPadDir.js | 18 + .../node_modules/lodash/internal/createPadding.js | 29 + .../node_modules/lodash/internal/createPartial.js | 20 + .../lodash/internal/createPartialWrapper.js | 43 + .../node_modules/lodash/internal/createReduce.js | 22 + .../node_modules/lodash/internal/createRound.js | 23 + .../lodash/internal/createSortedIndex.js | 20 + .../node_modules/lodash/internal/createWrapper.js | 86 + .../node_modules/lodash/internal/deburrLetter.js | 33 + .../node_modules/lodash/internal/equalArrays.js | 51 + .../node_modules/lodash/internal/equalByTag.js | 48 + .../node_modules/lodash/internal/equalObjects.js | 67 + .../node_modules/lodash/internal/escapeHtmlChar.js | 22 + .../lodash/internal/escapeRegExpChar.js | 38 + .../lodash/internal/escapeStringChar.js | 22 + .../node_modules/lodash/internal/getData.js | 15 + .../node_modules/lodash/internal/getFuncName.js | 25 + .../node_modules/lodash/internal/getLength.js | 15 + .../node_modules/lodash/internal/getMatchData.js | 21 + .../node_modules/lodash/internal/getNative.js | 16 + .../node_modules/lodash/internal/getView.js | 33 + .../node_modules/lodash/internal/indexOfNaN.js | 23 + .../node_modules/lodash/internal/initCloneArray.js | 26 + .../node_modules/lodash/internal/initCloneByTag.js | 63 + .../lodash/internal/initCloneObject.js | 16 + .../node_modules/lodash/internal/invokePath.js | 26 + .../node_modules/lodash/internal/isArrayLike.js | 15 + .../node_modules/lodash/internal/isIndex.js | 24 + .../node_modules/lodash/internal/isIterateeCall.js | 28 + .../node_modules/lodash/internal/isKey.js | 28 + .../node_modules/lodash/internal/isLaziable.js | 27 + .../node_modules/lodash/internal/isLength.js | 20 + .../node_modules/lodash/internal/isObjectLike.js | 12 + .../node_modules/lodash/internal/isSpace.js | 14 + .../lodash/internal/isStrictComparable.js | 15 + .../node_modules/lodash/internal/lazyClone.js | 23 + .../node_modules/lodash/internal/lazyReverse.js | 23 + .../node_modules/lodash/internal/lazyValue.js | 72 + .../node_modules/lodash/internal/mapDelete.js | 14 + .../node_modules/lodash/internal/mapGet.js | 14 + .../node_modules/lodash/internal/mapHas.js | 20 + .../node_modules/lodash/internal/mapSet.js | 18 + .../node_modules/lodash/internal/mergeData.js | 89 + .../node_modules/lodash/internal/mergeDefaults.js | 15 + .../node_modules/lodash/internal/metaMap.js | 9 + .../node_modules/lodash/internal/pickByArray.js | 28 + .../node_modules/lodash/internal/pickByCallback.js | 22 + .../node_modules/lodash/internal/reEscape.js | 4 + .../node_modules/lodash/internal/reEvaluate.js | 4 + .../node_modules/lodash/internal/reInterpolate.js | 4 + .../node_modules/lodash/internal/realNames.js | 4 + .../node_modules/lodash/internal/reorder.js | 29 + .../node_modules/lodash/internal/replaceHolders.js | 28 + .../node_modules/lodash/internal/setData.js | 41 + .../node_modules/lodash/internal/shimKeys.js | 41 + .../node_modules/lodash/internal/sortedUniq.js | 29 + .../node_modules/lodash/internal/toIterable.js | 22 + .../node_modules/lodash/internal/toObject.js | 14 + .../node_modules/lodash/internal/toPath.js | 28 + .../lodash/internal/trimmedLeftIndex.js | 19 + .../lodash/internal/trimmedRightIndex.js | 18 + .../lodash/internal/unescapeHtmlChar.js | 22 + .../node_modules/lodash/internal/wrapperClone.js | 18 + .../cli-table2/node_modules/lodash/lang.js | 32 + .../cli-table2/node_modules/lodash/lang/clone.js | 70 + .../node_modules/lodash/lang/cloneDeep.js | 55 + .../cli-table2/node_modules/lodash/lang/eq.js | 1 + .../cli-table2/node_modules/lodash/lang/gt.js | 25 + .../cli-table2/node_modules/lodash/lang/gte.js | 25 + .../node_modules/lodash/lang/isArguments.js | 34 + .../cli-table2/node_modules/lodash/lang/isArray.js | 40 + .../node_modules/lodash/lang/isBoolean.js | 35 + .../cli-table2/node_modules/lodash/lang/isDate.js | 35 + .../node_modules/lodash/lang/isElement.js | 24 + .../cli-table2/node_modules/lodash/lang/isEmpty.js | 47 + .../cli-table2/node_modules/lodash/lang/isEqual.js | 54 + .../cli-table2/node_modules/lodash/lang/isError.js | 36 + .../node_modules/lodash/lang/isFinite.js | 35 + .../node_modules/lodash/lang/isFunction.js | 38 + .../cli-table2/node_modules/lodash/lang/isMatch.js | 49 + .../cli-table2/node_modules/lodash/lang/isNaN.js | 34 + .../node_modules/lodash/lang/isNative.js | 48 + .../cli-table2/node_modules/lodash/lang/isNull.js | 21 + .../node_modules/lodash/lang/isNumber.js | 41 + .../node_modules/lodash/lang/isObject.js | 28 + .../node_modules/lodash/lang/isPlainObject.js | 71 + .../node_modules/lodash/lang/isRegExp.js | 35 + .../node_modules/lodash/lang/isString.js | 35 + .../node_modules/lodash/lang/isTypedArray.js | 74 + .../node_modules/lodash/lang/isUndefined.js | 21 + .../cli-table2/node_modules/lodash/lang/lt.js | 25 + .../cli-table2/node_modules/lodash/lang/lte.js | 25 + .../cli-table2/node_modules/lodash/lang/toArray.js | 32 + .../node_modules/lodash/lang/toPlainObject.js | 31 + .../cli-table2/node_modules/lodash/math.js | 9 + .../cli-table2/node_modules/lodash/math/add.js | 19 + .../cli-table2/node_modules/lodash/math/ceil.js | 25 + .../cli-table2/node_modules/lodash/math/floor.js | 25 + .../cli-table2/node_modules/lodash/math/max.js | 56 + .../cli-table2/node_modules/lodash/math/min.js | 56 + .../cli-table2/node_modules/lodash/math/round.js | 25 + .../cli-table2/node_modules/lodash/math/sum.js | 50 + .../cli-table2/node_modules/lodash/number.js | 4 + .../node_modules/lodash/number/inRange.js | 47 + .../node_modules/lodash/number/random.js | 70 + .../cli-table2/node_modules/lodash/object.js | 31 + .../node_modules/lodash/object/assign.js | 43 + .../node_modules/lodash/object/create.js | 47 + .../node_modules/lodash/object/defaults.js | 25 + .../node_modules/lodash/object/defaultsDeep.js | 25 + .../node_modules/lodash/object/extend.js | 1 + .../node_modules/lodash/object/findKey.js | 54 + .../node_modules/lodash/object/findLastKey.js | 54 + .../cli-table2/node_modules/lodash/object/forIn.js | 33 + .../node_modules/lodash/object/forInRight.js | 31 + .../node_modules/lodash/object/forOwn.js | 33 + .../node_modules/lodash/object/forOwnRight.js | 31 + .../node_modules/lodash/object/functions.js | 23 + .../cli-table2/node_modules/lodash/object/get.js | 33 + .../cli-table2/node_modules/lodash/object/has.js | 57 + .../node_modules/lodash/object/invert.js | 60 + .../cli-table2/node_modules/lodash/object/keys.js | 45 + .../node_modules/lodash/object/keysIn.js | 64 + .../node_modules/lodash/object/mapKeys.js | 25 + .../node_modules/lodash/object/mapValues.js | 46 + .../cli-table2/node_modules/lodash/object/merge.js | 54 + .../node_modules/lodash/object/methods.js | 1 + .../cli-table2/node_modules/lodash/object/omit.js | 47 + .../cli-table2/node_modules/lodash/object/pairs.js | 33 + .../cli-table2/node_modules/lodash/object/pick.js | 42 + .../node_modules/lodash/object/result.js | 49 + .../cli-table2/node_modules/lodash/object/set.js | 55 + .../node_modules/lodash/object/transform.js | 61 + .../node_modules/lodash/object/values.js | 33 + .../node_modules/lodash/object/valuesIn.js | 31 + .../cli-table2/node_modules/lodash/package.json | 81 + .../cli-table2/node_modules/lodash/string.js | 25 + .../node_modules/lodash/string/camelCase.js | 27 + .../node_modules/lodash/string/capitalize.js | 21 + .../node_modules/lodash/string/deburr.js | 29 + .../node_modules/lodash/string/endsWith.js | 40 + .../node_modules/lodash/string/escape.js | 48 + .../node_modules/lodash/string/escapeRegExp.js | 32 + .../node_modules/lodash/string/kebabCase.js | 26 + .../cli-table2/node_modules/lodash/string/pad.js | 47 + .../node_modules/lodash/string/padLeft.js | 27 + .../node_modules/lodash/string/padRight.js | 27 + .../node_modules/lodash/string/parseInt.js | 46 + .../node_modules/lodash/string/repeat.js | 47 + .../node_modules/lodash/string/snakeCase.js | 26 + .../node_modules/lodash/string/startCase.js | 26 + .../node_modules/lodash/string/startsWith.js | 36 + .../node_modules/lodash/string/template.js | 226 + .../node_modules/lodash/string/templateSettings.js | 67 + .../cli-table2/node_modules/lodash/string/trim.js | 42 + .../node_modules/lodash/string/trimLeft.js | 36 + .../node_modules/lodash/string/trimRight.js | 36 + .../cli-table2/node_modules/lodash/string/trunc.js | 105 + .../node_modules/lodash/string/unescape.js | 33 + .../cli-table2/node_modules/lodash/string/words.js | 38 + .../cli-table2/node_modules/lodash/support.js | 10 + .../cli-table2/node_modules/lodash/utility.js | 18 + .../node_modules/lodash/utility/attempt.js | 32 + .../node_modules/lodash/utility/callback.js | 53 + .../node_modules/lodash/utility/constant.js | 23 + .../node_modules/lodash/utility/identity.js | 20 + .../node_modules/lodash/utility/iteratee.js | 1 + .../node_modules/lodash/utility/matches.js | 33 + .../node_modules/lodash/utility/matchesProperty.js | 32 + .../node_modules/lodash/utility/method.js | 33 + .../node_modules/lodash/utility/methodOf.js | 32 + .../node_modules/lodash/utility/mixin.js | 82 + .../cli-table2/node_modules/lodash/utility/noop.js | 19 + .../node_modules/lodash/utility/property.js | 31 + .../node_modules/lodash/utility/propertyOf.js | 30 + .../node_modules/lodash/utility/range.js | 66 + .../node_modules/lodash/utility/times.js | 60 + .../node_modules/lodash/utility/uniqueId.js | 27 + .../cli-table2/node_modules/string-width/index.js | 37 + .../cli-table2/node_modules/string-width/license | 21 + .../node_modules/code-point-at/index.js | 32 + .../node_modules/code-point-at/license | 21 + .../node_modules/code-point-at/package.json | 70 + .../node_modules/code-point-at/readme.md | 32 + .../node_modules/is-fullwidth-code-point/index.js | 46 + .../node_modules/is-fullwidth-code-point/license | 21 + .../node_modules/number-is-nan/index.js | 4 + .../node_modules/number-is-nan/license | 21 + .../node_modules/number-is-nan/package.json | 67 + .../node_modules/number-is-nan/readme.md | 28 + .../is-fullwidth-code-point/package.json | 77 + .../node_modules/is-fullwidth-code-point/readme.md | 39 + .../string-width/node_modules/strip-ansi/index.js | 6 + .../string-width/node_modules/strip-ansi/license | 21 + .../strip-ansi/node_modules/ansi-regex/index.js | 4 + .../strip-ansi/node_modules/ansi-regex/license | 21 + .../node_modules/ansi-regex/package.json | 108 + .../strip-ansi/node_modules/ansi-regex/readme.md | 39 + .../node_modules/strip-ansi/package.json | 101 + .../string-width/node_modules/strip-ansi/readme.md | 33 + .../node_modules/string-width/package.json | 88 + .../cli-table2/node_modules/string-width/readme.md | 42 + deps/npm/node_modules/cli-table2/package.json | 84 + deps/npm/node_modules/cli-table2/src/cell.js | 364 + .../node_modules/cli-table2/src/layout-manager.js | 235 + deps/npm/node_modules/cli-table2/src/table.js | 78 + deps/npm/node_modules/cli-table2/src/utils.js | 304 + deps/npm/node_modules/cli-table2/test/cell-test.js | 935 ++ .../node_modules/cli-table2/test/example-tests.js | 6 + .../cli-table2/test/layout-manager-test.js | 163 + .../test/original-cli-table-index-tests.js | 294 + .../test/original-cli-table-newlines-test.js | 85 + .../cli-table2/test/table-layout-test.js | 466 + .../npm/node_modules/cli-table2/test/table-test.js | 87 + .../npm/node_modules/cli-table2/test/utils-test.js | 414 + .../test/verify-legacy-compatibility-test.js | 158 + deps/npm/node_modules/fstream-npm/.npmignore | 3 - deps/npm/node_modules/fstream-npm/.travis.yml | 12 - deps/npm/node_modules/fstream-npm/LICENSE | 15 - deps/npm/node_modules/fstream-npm/README.md | 18 - .../npm/node_modules/fstream-npm/example/bundle.js | 13 - .../node_modules/fstream-npm/example/dir-tar.js | 19 - deps/npm/node_modules/fstream-npm/example/dir.js | 25 - .../node_modules/fstream-npm/example/example.js | 12 - .../npm/node_modules/fstream-npm/example/ig-tar.js | 19 - deps/npm/node_modules/fstream-npm/example/tar.js | 25 - deps/npm/node_modules/fstream-npm/fstream-npm.js | 380 - .../node_modules/fstream-ignore/LICENSE | 15 - .../node_modules/fstream-ignore/README.md | 22 - .../node_modules/fstream-ignore/ignore.js | 275 - .../fstream-ignore/node_modules/minimatch/LICENSE | 15 - .../node_modules/minimatch/README.md | 209 - .../node_modules/minimatch/minimatch.js | 923 -- .../node_modules/brace-expansion/README.md | 123 - .../node_modules/brace-expansion/index.js | 201 - .../node_modules/balanced-match/.npmignore | 5 - .../node_modules/balanced-match/LICENSE.md | 21 - .../node_modules/balanced-match/README.md | 91 - .../node_modules/balanced-match/index.js | 59 - .../node_modules/balanced-match/package.json | 77 - .../node_modules/concat-map/.travis.yml | 4 - .../node_modules/concat-map/LICENSE | 18 - .../node_modules/concat-map/README.markdown | 62 - .../node_modules/concat-map/example/map.js | 6 - .../node_modules/concat-map/index.js | 13 - .../node_modules/concat-map/package.json | 92 - .../node_modules/concat-map/test/map.js | 39 - .../node_modules/brace-expansion/package.json | 75 - .../node_modules/minimatch/package.json | 63 - .../node_modules/fstream-ignore/package.json | 64 - deps/npm/node_modules/fstream-npm/package.json | 63 - deps/npm/node_modules/fstream-npm/test/ignores.js | 132 - deps/npm/node_modules/fstream-npm/test/scoped.js | 99 - deps/npm/node_modules/fstream/.npmignore | 5 - deps/npm/node_modules/fstream/.travis.yml | 9 - deps/npm/node_modules/fstream/LICENSE | 15 - deps/npm/node_modules/fstream/README.md | 76 - .../node_modules/fstream/examples/filter-pipe.js | 134 - deps/npm/node_modules/fstream/examples/pipe.js | 118 - deps/npm/node_modules/fstream/examples/reader.js | 68 - .../node_modules/fstream/examples/symlink-write.js | 27 - deps/npm/node_modules/fstream/fstream.js | 35 - deps/npm/node_modules/fstream/lib/abstract.js | 85 - deps/npm/node_modules/fstream/lib/collect.js | 70 - deps/npm/node_modules/fstream/lib/dir-reader.js | 252 - deps/npm/node_modules/fstream/lib/dir-writer.js | 174 - deps/npm/node_modules/fstream/lib/file-reader.js | 150 - deps/npm/node_modules/fstream/lib/file-writer.js | 107 - deps/npm/node_modules/fstream/lib/get-type.js | 33 - deps/npm/node_modules/fstream/lib/link-reader.js | 53 - deps/npm/node_modules/fstream/lib/link-writer.js | 95 - deps/npm/node_modules/fstream/lib/proxy-reader.js | 95 - deps/npm/node_modules/fstream/lib/proxy-writer.js | 111 - deps/npm/node_modules/fstream/lib/reader.js | 255 - deps/npm/node_modules/fstream/lib/socket-reader.js | 36 - deps/npm/node_modules/fstream/lib/writer.js | 390 - deps/npm/node_modules/fstream/package.json | 67 - deps/npm/node_modules/is-cidr/.npmignore | 1 + deps/npm/node_modules/is-cidr/.travis.yml | 21 + deps/npm/node_modules/is-cidr/README.md | 57 + deps/npm/node_modules/is-cidr/example/example.js | 13 + deps/npm/node_modules/is-cidr/lib/index.js | 18 + .../is-cidr/node_modules/cidr-regex/.npmignore | 1 + .../is-cidr/node_modules/cidr-regex/README.md | 48 + .../is-cidr/node_modules/cidr-regex/lib/index.js | 10 + .../is-cidr/node_modules/cidr-regex/package.json | 68 + .../is-cidr/node_modules/cidr-regex/test.js | 199 + deps/npm/node_modules/is-cidr/package.json | 94 + deps/npm/node_modules/is-cidr/test/index.test.js | 199 + deps/npm/node_modules/libnpx/CHANGELOG.md | 102 + deps/npm/node_modules/libnpx/index.js | 43 +- deps/npm/node_modules/libnpx/libnpx.1 | 2 +- deps/npm/node_modules/libnpx/locales/ar.json | 29 + deps/npm/node_modules/libnpx/locales/id.json | 29 + deps/npm/node_modules/libnpx/locales/ko.json | 29 + deps/npm/node_modules/libnpx/locales/nb.json | 29 + deps/npm/node_modules/libnpx/locales/nl.json | 29 + deps/npm/node_modules/libnpx/locales/nn.json | 29 + deps/npm/node_modules/libnpx/locales/no.json | 29 + deps/npm/node_modules/libnpx/locales/pl.json | 29 + deps/npm/node_modules/libnpx/locales/ru.json | 7 +- deps/npm/node_modules/libnpx/locales/sr.json | 29 + deps/npm/node_modules/libnpx/locales/uk.json | 29 + .../os-locale/node_modules/execa/index.js | 44 +- .../os-locale/node_modules/execa/lib/errname.js | 4 +- .../os-locale/node_modules/execa/lib/stdio.js | 41 + .../os-locale/node_modules/execa/license | 20 +- .../execa/node_modules/cross-spawn/CHANGELOG.md | 6 + .../execa/node_modules/cross-spawn/README.md | 28 +- .../execa/node_modules/cross-spawn/lib/enoent.js | 2 +- .../node_modules/cross-spawn/lib/hasBrokenSpawn.js | 11 - .../execa/node_modules/cross-spawn/lib/parse.js | 169 +- .../node_modules/cross-spawn/lib/resolveCommand.js | 31 - .../cross-spawn/lib/util/escapeArgument.js | 30 + .../cross-spawn/lib/util/escapeCommand.js | 12 + .../cross-spawn/lib/util/hasEmptyArgumentBug.js | 18 + .../cross-spawn/lib/util/readShebang.js | 37 + .../cross-spawn/lib/util/resolveCommand.js | 31 + .../node_modules/shebang-command/index.js | 19 + .../node_modules/shebang-command/license | 21 + .../node_modules/shebang-regex/index.js | 2 + .../node_modules/shebang-regex/license | 21 + .../node_modules/shebang-regex/package.json | 64 + .../node_modules/shebang-regex/readme.md | 29 + .../node_modules/shebang-command/package.json | 71 + .../node_modules/shebang-command/readme.md | 39 + .../execa/node_modules/cross-spawn/package.json | 67 +- .../execa/node_modules/get-stream/buffer-stream.js | 33 +- .../execa/node_modules/get-stream/index.js | 50 +- .../get-stream/node_modules/object-assign/index.js | 90 - .../get-stream/node_modules/object-assign/license | 21 - .../node_modules/object-assign/package.json | 45 - .../node_modules/object-assign/readme.md | 61 - .../node_modules/pinkie-promise/index.js | 3 - .../get-stream/node_modules/pinkie-promise/license | 21 - .../pinkie-promise/node_modules/pinkie/index.js | 292 - .../pinkie-promise/node_modules/pinkie/license | 21 - .../node_modules/pinkie/package.json | 47 - .../pinkie-promise/node_modules/pinkie/readme.md | 83 - .../node_modules/pinkie-promise/package.json | 44 - .../node_modules/pinkie-promise/readme.md | 28 - .../execa/node_modules/get-stream/package.json | 78 +- .../execa/node_modules/get-stream/readme.md | 8 +- .../os-locale/node_modules/execa/package.json | 92 +- .../os-locale/node_modules/execa/readme.md | 149 +- .../yargs/node_modules/os-locale/package.json | 55 +- .../yargs/node_modules/os-locale/readme.md | 2 +- .../yargs/node_modules/string-width/index.js | 17 +- .../yargs/node_modules/string-width/package.json | 63 +- deps/npm/node_modules/libnpx/package.json | 26 +- deps/npm/node_modules/meant/.npmignore | 37 + deps/npm/node_modules/meant/.travis.yml | 16 + deps/npm/node_modules/meant/CHANGELOG.md | 29 + deps/npm/node_modules/meant/LICENSE | 21 + deps/npm/node_modules/meant/README.md | 67 + deps/npm/node_modules/meant/index.js | 49 + deps/npm/node_modules/meant/package.json | 56 + deps/npm/node_modules/meant/test.js | 11 + .../node-gyp/node_modules/fstream/.npmignore | 5 + .../node-gyp/node_modules/fstream/.travis.yml | 9 + .../node-gyp/node_modules/fstream/LICENSE | 15 + .../node-gyp/node_modules/fstream/README.md | 76 + .../node_modules/fstream/examples/filter-pipe.js | 134 + .../node-gyp/node_modules/fstream/examples/pipe.js | 118 + .../node_modules/fstream/examples/reader.js | 68 + .../node_modules/fstream/examples/symlink-write.js | 27 + .../node-gyp/node_modules/fstream/fstream.js | 35 + .../node-gyp/node_modules/fstream/lib/abstract.js | 85 + .../node-gyp/node_modules/fstream/lib/collect.js | 70 + .../node_modules/fstream/lib/dir-reader.js | 252 + .../node_modules/fstream/lib/dir-writer.js | 174 + .../node_modules/fstream/lib/file-reader.js | 150 + .../node_modules/fstream/lib/file-writer.js | 107 + .../node-gyp/node_modules/fstream/lib/get-type.js | 33 + .../node_modules/fstream/lib/link-reader.js | 53 + .../node_modules/fstream/lib/link-writer.js | 95 + .../node_modules/fstream/lib/proxy-reader.js | 95 + .../node_modules/fstream/lib/proxy-writer.js | 111 + .../node-gyp/node_modules/fstream/lib/reader.js | 255 + .../node_modules/fstream/lib/socket-reader.js | 36 + .../node-gyp/node_modules/fstream/lib/writer.js | 390 + .../node-gyp/node_modules/fstream/package.json | 62 + .../node-gyp/node_modules/semver/LICENSE | 15 + .../node-gyp/node_modules/semver/README.md | 350 + .../node-gyp/node_modules/semver/bin/semver | 133 + .../node-gyp/node_modules/semver/package.json | 54 + .../node-gyp/node_modules/semver/range.bnf | 16 + .../node-gyp/node_modules/semver/semver.js | 1203 ++ .../node-gyp/node_modules/tar/.npmignore | 5 + .../node-gyp/node_modules/tar/.travis.yml | 4 + .../node_modules/node-gyp/node_modules/tar/LICENSE | 12 + .../node-gyp/node_modules/tar/README.md | 50 + .../node_modules/tar/examples/extracter.js | 19 + .../node-gyp/node_modules/tar/examples/packer.js | 24 + .../node-gyp/node_modules/tar/examples/reader.js | 35 + .../node-gyp/node_modules/tar/lib/buffer-entry.js | 30 + .../node-gyp/node_modules/tar/lib/entry-writer.js | 169 + .../node-gyp/node_modules/tar/lib/entry.js | 220 + .../node_modules/tar/lib/extended-header-writer.js | 191 + .../node_modules/tar/lib/extended-header.js | 140 + .../node-gyp/node_modules/tar/lib/extract.js | 94 + .../node_modules/tar/lib/global-header-writer.js | 14 + .../node-gyp/node_modules/tar/lib/header.js | 384 + .../node-gyp/node_modules/tar/lib/pack.js | 236 + .../node-gyp/node_modules/tar/lib/parse.js | 275 + .../tar/node_modules/block-stream/LICENCE | 25 + .../tar/node_modules/block-stream/LICENSE | 15 + .../tar/node_modules/block-stream/README.md | 14 + .../tar/node_modules/block-stream/block-stream.js | 209 + .../tar/node_modules/block-stream/package.json | 63 + .../node-gyp/node_modules/tar/package.json | 64 + .../node_modules/node-gyp/node_modules/tar/tar.js | 173 + .../node_modules/tar/test/00-setup-fixtures.js | 53 + .../tar/test/cb-never-called-1.0.1.tgz | Bin 0 -> 4096 bytes .../node_modules/tar/test/dir-normalization.js | 177 + .../node_modules/tar/test/dir-normalization.tar | Bin 0 -> 4608 bytes .../node_modules/tar/test/error-on-broken.js | 33 + .../node-gyp/node_modules/tar/test/extract-move.js | 132 + .../node-gyp/node_modules/tar/test/extract.js | 367 + .../node-gyp/node_modules/tar/test/fixtures.tgz | Bin 0 -> 19352 bytes .../node-gyp/node_modules/tar/test/header.js | 183 + .../node_modules/tar/test/pack-no-proprietary.js | 886 ++ .../node-gyp/node_modules/tar/test/pack.js | 952 ++ .../node_modules/tar/test/parse-discard.js | 29 + .../node-gyp/node_modules/tar/test/parse.js | 359 + .../node-gyp/node_modules/tar/test/zz-cleanup.js | 20 + deps/npm/node_modules/npm-lifecycle/CHANGELOG.md | 46 + deps/npm/node_modules/npm-lifecycle/LICENSE | 235 + deps/npm/node_modules/npm-lifecycle/README.md | 45 + deps/npm/node_modules/npm-lifecycle/index.js | 435 + deps/npm/node_modules/npm-lifecycle/lib/spawn.js | 65 + deps/npm/node_modules/npm-lifecycle/package.json | 78 + deps/npm/node_modules/npm-packlist/LICENSE | 15 + deps/npm/node_modules/npm-packlist/README.md | 68 + deps/npm/node_modules/npm-packlist/index.js | 213 + .../npm-packlist/node_modules/ignore-walk/LICENSE | 15 + .../node_modules/ignore-walk/README.md | 60 + .../npm-packlist/node_modules/ignore-walk/index.js | 266 + .../ignore-walk/node_modules/minimatch/LICENSE | 15 + .../ignore-walk/node_modules/minimatch/README.md | 209 + .../node_modules/minimatch/minimatch.js | 923 ++ .../node_modules/brace-expansion/README.md | 123 + .../node_modules/brace-expansion/index.js | 200 + .../node_modules/balanced-match/.npmignore | 5 + .../node_modules/balanced-match/LICENSE.md | 21 + .../node_modules/balanced-match/README.md | 91 + .../node_modules/balanced-match/index.js | 59 + .../node_modules/balanced-match/package.json | 77 + .../node_modules/concat-map/.travis.yml | 4 + .../node_modules/concat-map/LICENSE | 18 + .../node_modules/concat-map/README.markdown | 62 + .../node_modules/concat-map/example/map.js | 6 + .../node_modules/concat-map/index.js | 13 + .../node_modules/concat-map/package.json | 88 + .../node_modules/concat-map/test/map.js | 39 + .../node_modules/brace-expansion/package.json | 75 + .../node_modules/minimatch/package.json | 63 + .../node_modules/ignore-walk/package.json | 71 + .../node_modules/npm-bundled/README.md | 46 + .../npm-packlist/node_modules/npm-bundled/index.js | 227 + .../node_modules/npm-bundled/package.json | 60 + deps/npm/node_modules/npm-packlist/package.json | 68 + deps/npm/node_modules/npm-profile/LICENSE | 15 + deps/npm/node_modules/npm-profile/README.md | 397 + deps/npm/node_modules/npm-profile/index.js | 210 + .../node_modules/make-fetch-happen/CHANGELOG.md | 494 + .../node_modules/make-fetch-happen/LICENSE | 3 + .../node_modules/make-fetch-happen/README.md | 388 + .../node_modules/make-fetch-happen/agent.js | 171 + .../node_modules/make-fetch-happen/cache.js | 257 + .../node_modules/make-fetch-happen/index.js | 468 + .../node_modules/agentkeepalive/History.md | 130 + .../node_modules/agentkeepalive/README.md | 248 + .../node_modules/agentkeepalive/browser.js | 5 + .../node_modules/agentkeepalive/index.js | 4 + .../node_modules/agentkeepalive/lib/_http_agent.js | 399 + .../node_modules/agentkeepalive/lib/agent.js | 133 + .../node_modules/agentkeepalive/lib/https_agent.js | 42 + .../node_modules/humanize-ms/History.md | 25 + .../node_modules/humanize-ms/LICENSE | 17 + .../node_modules/humanize-ms/README.md | 40 + .../node_modules/humanize-ms/index.js | 24 + .../humanize-ms/node_modules/ms/index.js | 152 + .../humanize-ms/node_modules/ms/license.md | 21 + .../humanize-ms/node_modules/ms/package.json | 69 + .../humanize-ms/node_modules/ms/readme.md | 51 + .../node_modules/humanize-ms/package.json | 66 + .../node_modules/agentkeepalive/package.json | 82 + .../node_modules/http-cache-semantics/README.md | 173 + .../node_modules/http-cache-semantics/index.js | 483 + .../http-cache-semantics/node4/index.js | 543 + .../node_modules/http-cache-semantics/package.json | 60 + .../http-cache-semantics/test/misctest.js | 33 + .../http-cache-semantics/test/okhttptest.js | 301 + .../http-cache-semantics/test/requesttest.js | 61 + .../http-cache-semantics/test/responsetest.js | 379 + .../http-cache-semantics/test/revalidatetest.js | 166 + .../http-cache-semantics/test/satisfytest.js | 64 + .../http-cache-semantics/test/updatetest.js | 98 + .../http-cache-semantics/test/varytest.js | 75 + .../node_modules/http-proxy-agent/.npmignore | 1 + .../node_modules/http-proxy-agent/.travis.yml | 22 + .../node_modules/http-proxy-agent/History.md | 94 + .../node_modules/http-proxy-agent/README.md | 74 + .../node_modules/http-proxy-agent/index.js | 109 + .../node_modules/agent-base/.npmignore | 2 + .../node_modules/agent-base/.travis.yml | 22 + .../node_modules/agent-base/History.md | 99 + .../node_modules/agent-base/README.md | 136 + .../node_modules/agent-base/index.js | 158 + .../node_modules/es6-promisify/README.md | 89 + .../node_modules/es6-promisify/dist/promise.js | 73 + .../node_modules/es6-promisify/dist/promisify.js | 85 + .../node_modules/es6-promise/CHANGELOG.md | 122 + .../es6-promisify/node_modules/es6-promise/LICENSE | 19 + .../node_modules/es6-promise/README.md | 82 + .../es6-promisify/node_modules/es6-promise/auto.js | 4 + .../es6-promise/dist/es6-promise.auto.js | 1159 ++ .../es6-promise/dist/es6-promise.auto.map | 1 + .../es6-promise/dist/es6-promise.auto.min.js | 1 + .../es6-promise/dist/es6-promise.auto.min.map | 1 + .../node_modules/es6-promise/dist/es6-promise.js | 1157 ++ .../node_modules/es6-promise/dist/es6-promise.map | 1 + .../es6-promise/dist/es6-promise.min.js | 1 + .../es6-promise/dist/es6-promise.min.map | 1 + .../node_modules/es6-promise/es6-promise.d.ts | 74 + .../es6-promise/lib/es6-promise.auto.js | 3 + .../node_modules/es6-promise/lib/es6-promise.js | 7 + .../es6-promise/lib/es6-promise/-internal.js | 271 + .../es6-promise/lib/es6-promise/asap.js | 120 + .../es6-promise/lib/es6-promise/enumerator.js | 111 + .../es6-promise/lib/es6-promise/polyfill.js | 35 + .../es6-promise/lib/es6-promise/promise.js | 383 + .../es6-promise/lib/es6-promise/promise/all.js | 52 + .../es6-promise/lib/es6-promise/promise/race.js | 84 + .../es6-promise/lib/es6-promise/promise/reject.js | 46 + .../es6-promise/lib/es6-promise/promise/resolve.js | 48 + .../es6-promise/lib/es6-promise/then.js | 32 + .../es6-promise/lib/es6-promise/utils.js | 21 + .../node_modules/es6-promise/package.json | 96 + .../node_modules/es6-promisify/package.json | 72 + .../node_modules/agent-base/package.json | 65 + .../node_modules/agent-base/patch-core.js | 26 + .../agent-base/test/ssl-cert-snakeoil.key | 15 + .../agent-base/test/ssl-cert-snakeoil.pem | 12 + .../node_modules/agent-base/test/test.js | 631 + .../node_modules/debug/.coveralls.yml | 1 + .../http-proxy-agent/node_modules/debug/.npmignore | 9 + .../node_modules/debug/.travis.yml | 14 + .../node_modules/debug/CHANGELOG.md | 362 + .../http-proxy-agent/node_modules/debug/LICENSE | 18 + .../http-proxy-agent/node_modules/debug/Makefile | 50 + .../http-proxy-agent/node_modules/debug/README.md | 312 + .../node_modules/debug/component.json | 19 + .../node_modules/debug/karma.conf.js | 70 + .../http-proxy-agent/node_modules/debug/node.js | 1 + .../node_modules/debug/node_modules/ms/index.js | 152 + .../node_modules/debug/node_modules/ms/license.md | 21 + .../debug/node_modules/ms/package.json | 69 + .../node_modules/debug/node_modules/ms/readme.md | 51 + .../node_modules/debug/package.json | 88 + .../node_modules/debug/src/browser.js | 185 + .../node_modules/debug/src/debug.js | 202 + .../node_modules/debug/src/index.js | 10 + .../node_modules/debug/src/inspector-log.js | 15 + .../node_modules/debug/src/node.js | 248 + .../node_modules/http-proxy-agent/package.json | 62 + .../http-proxy-agent/test/ssl-cert-snakeoil.key | 15 + .../http-proxy-agent/test/ssl-cert-snakeoil.pem | 12 + .../node_modules/http-proxy-agent/test/test.js | 303 + .../node_modules/https-proxy-agent/.npmignore | 2 + .../node_modules/https-proxy-agent/.travis.yml | 22 + .../node_modules/https-proxy-agent/History.md | 113 + .../node_modules/https-proxy-agent/README.md | 137 + .../node_modules/https-proxy-agent/index.js | 228 + .../node_modules/agent-base/.npmignore | 2 + .../node_modules/agent-base/.travis.yml | 22 + .../node_modules/agent-base/History.md | 99 + .../node_modules/agent-base/README.md | 136 + .../node_modules/agent-base/index.js | 158 + .../node_modules/es6-promisify/README.md | 89 + .../node_modules/es6-promisify/dist/promise.js | 73 + .../node_modules/es6-promisify/dist/promisify.js | 85 + .../node_modules/es6-promise/CHANGELOG.md | 122 + .../es6-promisify/node_modules/es6-promise/LICENSE | 19 + .../node_modules/es6-promise/README.md | 82 + .../es6-promisify/node_modules/es6-promise/auto.js | 4 + .../es6-promise/dist/es6-promise.auto.js | 1159 ++ .../es6-promise/dist/es6-promise.auto.map | 1 + .../es6-promise/dist/es6-promise.auto.min.js | 1 + .../es6-promise/dist/es6-promise.auto.min.map | 1 + .../node_modules/es6-promise/dist/es6-promise.js | 1157 ++ .../node_modules/es6-promise/dist/es6-promise.map | 1 + .../es6-promise/dist/es6-promise.min.js | 1 + .../es6-promise/dist/es6-promise.min.map | 1 + .../node_modules/es6-promise/es6-promise.d.ts | 74 + .../es6-promise/lib/es6-promise.auto.js | 3 + .../node_modules/es6-promise/lib/es6-promise.js | 7 + .../es6-promise/lib/es6-promise/-internal.js | 271 + .../es6-promise/lib/es6-promise/asap.js | 120 + .../es6-promise/lib/es6-promise/enumerator.js | 111 + .../es6-promise/lib/es6-promise/polyfill.js | 35 + .../es6-promise/lib/es6-promise/promise.js | 383 + .../es6-promise/lib/es6-promise/promise/all.js | 52 + .../es6-promise/lib/es6-promise/promise/race.js | 84 + .../es6-promise/lib/es6-promise/promise/reject.js | 46 + .../es6-promise/lib/es6-promise/promise/resolve.js | 48 + .../es6-promise/lib/es6-promise/then.js | 32 + .../es6-promise/lib/es6-promise/utils.js | 21 + .../node_modules/es6-promise/package.json | 96 + .../node_modules/es6-promisify/package.json | 72 + .../node_modules/agent-base/package.json | 65 + .../node_modules/agent-base/patch-core.js | 26 + .../agent-base/test/ssl-cert-snakeoil.key | 15 + .../agent-base/test/ssl-cert-snakeoil.pem | 12 + .../node_modules/agent-base/test/test.js | 631 + .../node_modules/debug/.coveralls.yml | 1 + .../node_modules/debug/.npmignore | 9 + .../node_modules/debug/.travis.yml | 14 + .../node_modules/debug/CHANGELOG.md | 362 + .../https-proxy-agent/node_modules/debug/LICENSE | 18 + .../https-proxy-agent/node_modules/debug/Makefile | 50 + .../https-proxy-agent/node_modules/debug/README.md | 312 + .../node_modules/debug/component.json | 19 + .../node_modules/debug/karma.conf.js | 70 + .../https-proxy-agent/node_modules/debug/node.js | 1 + .../node_modules/debug/node_modules/ms/index.js | 152 + .../node_modules/debug/node_modules/ms/license.md | 21 + .../debug/node_modules/ms/package.json | 69 + .../node_modules/debug/node_modules/ms/readme.md | 51 + .../node_modules/debug/package.json | 88 + .../node_modules/debug/src/browser.js | 185 + .../node_modules/debug/src/debug.js | 202 + .../node_modules/debug/src/index.js | 10 + .../node_modules/debug/src/inspector-log.js | 15 + .../node_modules/debug/src/node.js | 248 + .../node_modules/https-proxy-agent/package.json | 62 + .../https-proxy-agent/test/ssl-cert-snakeoil.key | 15 + .../https-proxy-agent/test/ssl-cert-snakeoil.pem | 12 + .../node_modules/https-proxy-agent/test/test.js | 308 + .../node_modules/node-fetch-npm/CHANGELOG.md | 252 + .../node_modules/node-fetch-npm/LICENSE.md | 21 + .../node_modules/node-fetch-npm/README.md | 398 + .../node_modules/encoding/.npmignore | 1 + .../node_modules/encoding/.travis.yml | 25 + .../node-fetch-npm/node_modules/encoding/LICENSE | 16 + .../node-fetch-npm/node_modules/encoding/README.md | 52 + .../node_modules/encoding/lib/encoding.js | 113 + .../node_modules/encoding/lib/iconv-loader.js | 14 + .../encoding/node_modules/iconv-lite/.npmignore | 6 + .../encoding/node_modules/iconv-lite/.travis.yml | 22 + .../encoding/node_modules/iconv-lite/Changelog.md | 132 + .../encoding/node_modules/iconv-lite/LICENSE | 20 + .../encoding/node_modules/iconv-lite/README.md | 160 + .../iconv-lite/encodings/dbcs-codec.js | 554 + .../node_modules/iconv-lite/encodings/dbcs-data.js | 176 + .../node_modules/iconv-lite/encodings/index.js | 22 + .../node_modules/iconv-lite/encodings/internal.js | 188 + .../iconv-lite/encodings/sbcs-codec.js | 73 + .../iconv-lite/encodings/sbcs-data-generated.js | 451 + .../node_modules/iconv-lite/encodings/sbcs-data.js | 168 + .../iconv-lite/encodings/tables/big5-added.json | 122 + .../iconv-lite/encodings/tables/cp936.json | 264 + .../iconv-lite/encodings/tables/cp949.json | 273 + .../iconv-lite/encodings/tables/cp950.json | 177 + .../iconv-lite/encodings/tables/eucjp.json | 182 + .../encodings/tables/gb18030-ranges.json | 1 + .../iconv-lite/encodings/tables/gbk-added.json | 55 + .../iconv-lite/encodings/tables/shiftjis.json | 125 + .../node_modules/iconv-lite/encodings/utf16.js | 175 + .../node_modules/iconv-lite/encodings/utf7.js | 288 + .../node_modules/iconv-lite/lib/bom-handling.js | 51 + .../node_modules/iconv-lite/lib/extend-node.js | 215 + .../node_modules/iconv-lite/lib/index.d.ts | 24 + .../encoding/node_modules/iconv-lite/lib/index.js | 148 + .../node_modules/iconv-lite/lib/streams.js | 120 + .../encoding/node_modules/iconv-lite/package.json | 123 + .../node_modules/encoding/package.json | 53 + .../node_modules/encoding/test/test.js | 75 + .../json-parse-better-errors/CHANGELOG.md | 36 + .../json-parse-better-errors/LICENSE.md | 7 + .../json-parse-better-errors/README.md | 53 + .../node_modules/json-parse-better-errors/index.js | 32 + .../json-parse-better-errors/package.json | 76 + .../node_modules/node-fetch-npm/package.json | 100 + .../node_modules/node-fetch-npm/src/blob.js | 109 + .../node_modules/node-fetch-npm/src/body.js | 411 + .../node_modules/node-fetch-npm/src/common.js | 92 + .../node_modules/node-fetch-npm/src/fetch-error.js | 35 + .../node_modules/node-fetch-npm/src/headers.js | 296 + .../node_modules/node-fetch-npm/src/index.js | 214 + .../node_modules/node-fetch-npm/src/request.js | 174 + .../node_modules/node-fetch-npm/src/response.js | 71 + .../node_modules/promise-retry/.editorconfig | 15 + .../node_modules/promise-retry/.npmignore | 2 + .../node_modules/promise-retry/.travis.yml | 5 + .../node_modules/promise-retry/LICENSE | 19 + .../node_modules/promise-retry/README.md | 92 + .../node_modules/promise-retry/index.js | 52 + .../node_modules/err-code/.editorconfig | 12 + .../node_modules/err-code/.eslintrc.json | 7 + .../promise-retry/node_modules/err-code/.npmignore | 2 + .../node_modules/err-code/.travis.yml | 5 + .../promise-retry/node_modules/err-code/README.md | 72 + .../promise-retry/node_modules/err-code/bower.json | 30 + .../promise-retry/node_modules/err-code/index.js | 22 + .../node_modules/err-code/index.umd.js | 26 + .../node_modules/err-code/package.json | 64 + .../node_modules/err-code/test/.eslintrc.json | 5 + .../node_modules/err-code/test/test.js | 92 + .../node_modules/promise-retry/package.json | 67 + .../node_modules/promise-retry/test/test.js | 263 + .../node_modules/socks-proxy-agent/.npmignore | 1 + .../node_modules/socks-proxy-agent/.travis.yml | 22 + .../node_modules/socks-proxy-agent/History.md | 96 + .../node_modules/socks-proxy-agent/README.md | 134 + .../node_modules/socks-proxy-agent/index.js | 141 + .../node_modules/agent-base/.npmignore | 2 + .../node_modules/agent-base/.travis.yml | 22 + .../node_modules/agent-base/History.md | 99 + .../node_modules/agent-base/README.md | 136 + .../node_modules/agent-base/index.js | 158 + .../node_modules/es6-promisify/README.md | 89 + .../node_modules/es6-promisify/dist/promise.js | 73 + .../node_modules/es6-promisify/dist/promisify.js | 85 + .../node_modules/es6-promise/CHANGELOG.md | 122 + .../es6-promisify/node_modules/es6-promise/LICENSE | 19 + .../node_modules/es6-promise/README.md | 82 + .../es6-promisify/node_modules/es6-promise/auto.js | 4 + .../es6-promise/dist/es6-promise.auto.js | 1159 ++ .../es6-promise/dist/es6-promise.auto.map | 1 + .../es6-promise/dist/es6-promise.auto.min.js | 1 + .../es6-promise/dist/es6-promise.auto.min.map | 1 + .../node_modules/es6-promise/dist/es6-promise.js | 1157 ++ .../node_modules/es6-promise/dist/es6-promise.map | 1 + .../es6-promise/dist/es6-promise.min.js | 1 + .../es6-promise/dist/es6-promise.min.map | 1 + .../node_modules/es6-promise/es6-promise.d.ts | 74 + .../es6-promise/lib/es6-promise.auto.js | 3 + .../node_modules/es6-promise/lib/es6-promise.js | 7 + .../es6-promise/lib/es6-promise/-internal.js | 271 + .../es6-promise/lib/es6-promise/asap.js | 120 + .../es6-promise/lib/es6-promise/enumerator.js | 111 + .../es6-promise/lib/es6-promise/polyfill.js | 35 + .../es6-promise/lib/es6-promise/promise.js | 383 + .../es6-promise/lib/es6-promise/promise/all.js | 52 + .../es6-promise/lib/es6-promise/promise/race.js | 84 + .../es6-promise/lib/es6-promise/promise/reject.js | 46 + .../es6-promise/lib/es6-promise/promise/resolve.js | 48 + .../es6-promise/lib/es6-promise/then.js | 32 + .../es6-promise/lib/es6-promise/utils.js | 21 + .../node_modules/es6-promise/package.json | 96 + .../node_modules/es6-promisify/package.json | 72 + .../node_modules/agent-base/package.json | 65 + .../node_modules/agent-base/patch-core.js | 26 + .../agent-base/test/ssl-cert-snakeoil.key | 15 + .../agent-base/test/ssl-cert-snakeoil.pem | 12 + .../node_modules/agent-base/test/test.js | 631 + .../node_modules/socks/.npmignore | 4 + .../socks-proxy-agent/node_modules/socks/LICENSE | 20 + .../socks-proxy-agent/node_modules/socks/README.md | 339 + .../node_modules/socks/examples/associate.js | 33 + .../node_modules/socks/examples/bind.js | 30 + .../node_modules/socks/examples/connect.js | 31 + .../socks-proxy-agent/node_modules/socks/index.js | 6 + .../node_modules/socks/lib/socks-agent.js | 108 + .../node_modules/socks/lib/socks-client.js | 306 + .../node_modules/socks/node_modules/ip/.jscsrc | 46 + .../node_modules/socks/node_modules/ip/.npmignore | 2 + .../node_modules/socks/node_modules/ip/.travis.yml | 15 + .../node_modules/socks/node_modules/ip/README.md | 90 + .../node_modules/socks/node_modules/ip/lib/ip.js | 416 + .../socks/node_modules/ip/package.json | 53 + .../socks/node_modules/ip/test/api-test.js | 407 + .../socks/node_modules/smart-buffer/.npmignore | 5 + .../socks/node_modules/smart-buffer/.travis.yml | 11 + .../socks/node_modules/smart-buffer/LICENSE | 20 + .../socks/node_modules/smart-buffer/README.md | 307 + .../node_modules/smart-buffer/build/smartbuffer.js | 726 ++ .../smart-buffer/build/smartbuffer.js.map | 1 + .../node_modules/smart-buffer/lib/smart-buffer.js | 371 + .../socks/node_modules/smart-buffer/package.json | 70 + .../smart-buffer/test/smart-buffer.test.js | 410 + .../node_modules/smart-buffer/typings/index.d.ts | 383 + .../node_modules/socks/package.json | 68 + .../node_modules/socks-proxy-agent/package.json | 66 + .../socks-proxy-agent/test/ssl-cert-snakeoil.key | 15 + .../socks-proxy-agent/test/ssl-cert-snakeoil.pem | 12 + .../node_modules/socks-proxy-agent/test/test.js | 144 + .../node_modules/make-fetch-happen/package.json | 98 + .../node_modules/make-fetch-happen/warning.js | 24 + deps/npm/node_modules/npm-profile/package.json | 61 + .../npm-registry-client/lib/authify.js | 4 + .../node_modules/npm-registry-client/lib/fetch.js | 13 - .../npm-registry-client/lib/initialize.js | 3 +- .../node_modules/npm-registry-client/package.json | 24 +- deps/npm/node_modules/pacote/CHANGELOG.md | 107 + deps/npm/node_modules/pacote/README.md | 3 +- deps/npm/node_modules/pacote/extract.js | 27 +- deps/npm/node_modules/pacote/lib/extract-stream.js | 71 +- .../pacote/lib/fetchers/registry/fetch.js | 1 + .../node_modules/pacote/lib/finalize-manifest.js | 49 +- deps/npm/node_modules/pacote/lib/util/git.js | 15 +- deps/npm/node_modules/pacote/lib/util/pack-dir.js | 35 +- .../node_modules/make-fetch-happen/CHANGELOG.md | 15 + .../pacote/node_modules/make-fetch-happen/agent.js | 15 +- .../pacote/node_modules/make-fetch-happen/index.js | 13 + .../node_modules/humanize-ms/package.json | 10 +- .../node_modules/agentkeepalive/package.json | 12 +- .../node_modules/http-cache-semantics/package.json | 6 +- .../node_modules/agent-base/History.md | 5 + .../node_modules/agent-base/package.json | 10 +- .../node_modules/agent-base/patch-core.js | 4 +- .../node_modules/agent-base/test/test.js | 11 + .../node_modules/https-proxy-agent/History.md | 8 + .../node_modules/https-proxy-agent/index.js | 56 +- .../node_modules/agent-base/History.md | 5 + .../node_modules/agent-base/package.json | 10 +- .../node_modules/agent-base/patch-core.js | 4 +- .../node_modules/agent-base/test/test.js | 11 + .../node_modules/debug/package.json | 10 +- .../node_modules/https-proxy-agent/package.json | 10 +- .../node_modules/node-fetch-npm/CHANGELOG.md | 10 + .../encoding/node_modules/iconv-lite/package.json | 2 +- .../node_modules/encoding/package.json | 5 +- .../json-parse-better-errors/CHANGELOG.md | 36 + .../json-parse-better-errors/LICENSE.md | 7 + .../json-parse-better-errors/README.md | 53 + .../node_modules/json-parse-better-errors/index.js | 32 + .../json-parse-better-errors/package.json | 76 + .../json-parse-helpfulerror/.editorconfig | 14 - .../json-parse-helpfulerror/.npmignore | 28 - .../node_modules/json-parse-helpfulerror/LICENSE | 21 - .../node_modules/json-parse-helpfulerror/README.md | 29 - .../node_modules/json-parse-helpfulerror/index.js | 21 - .../node_modules/jju/.npmignore | 9 - .../node_modules/jju/LICENSE | 13 - .../node_modules/jju/README.md | 242 - .../node_modules/jju/index.js | 32 - .../node_modules/jju/lib/analyze.js | 91 - .../node_modules/jju/lib/document.js | 484 - .../node_modules/jju/lib/parse.js | 764 -- .../node_modules/jju/lib/stringify.js | 382 - .../node_modules/jju/lib/unicode.js | 71 - .../node_modules/jju/lib/utils.js | 45 - .../node_modules/jju/package.json | 65 - .../node_modules/jju/package.yaml | 45 - .../json-parse-helpfulerror/package.json | 63 - .../json-parse-helpfulerror/test/test.js | 32 - .../node_modules/node-fetch-npm/package.json | 40 +- .../node_modules/node-fetch-npm/src/body.js | 2 +- .../node_modules/agent-base/History.md | 5 + .../node_modules/agent-base/package.json | 10 +- .../node_modules/agent-base/patch-core.js | 4 +- .../node_modules/agent-base/test/test.js | 11 + .../socks/node_modules/ip/package.json | 6 +- .../socks/node_modules/smart-buffer/package.json | 5 +- .../node_modules/socks/package.json | 16 +- .../node_modules/make-fetch-happen/package.json | 17 +- .../node_modules/balanced-match/package.json | 2 +- .../node_modules/concat-map/package.json | 6 +- .../node_modules/brace-expansion/package.json | 2 +- .../pacote/node_modules/minimatch/package.json | 15 +- .../node_modules/err-code/package.json | 6 +- .../pacote/node_modules/promise-retry/package.json | 5 +- .../protoduck/node_modules/genfun/package.json | 5 +- .../pacote/node_modules/protoduck/package.json | 5 +- .../pacote/node_modules/tar-fs/.npmignore | 2 - .../pacote/node_modules/tar-fs/.travis.yml | 3 - .../pacote/node_modules/tar-fs/LICENSE | 21 - .../pacote/node_modules/tar-fs/README.md | 143 - .../pacote/node_modules/tar-fs/index.js | 323 - .../tar-fs/node_modules/pump/.npmignore | 1 - .../tar-fs/node_modules/pump/.travis.yml | 5 - .../node_modules/tar-fs/node_modules/pump/LICENSE | 21 - .../tar-fs/node_modules/pump/README.md | 56 - .../node_modules/tar-fs/node_modules/pump/index.js | 80 - .../pump/node_modules/end-of-stream/LICENSE | 21 - .../pump/node_modules/end-of-stream/README.md | 52 - .../pump/node_modules/end-of-stream/index.js | 83 - .../pump/node_modules/end-of-stream/package.json | 66 - .../tar-fs/node_modules/pump/package.json | 65 - .../tar-fs/node_modules/pump/test-browser.js | 58 - .../node_modules/tar-fs/node_modules/pump/test.js | 46 - .../pacote/node_modules/tar-fs/package.json | 70 - .../node_modules/tar-fs/test/fixtures/a/hello.txt | 1 - .../node_modules/tar-fs/test/fixtures/b/a/test.txt | 1 - .../node_modules/tar-fs/test/fixtures/c/.npmignore | 1 - .../node_modules/tar-fs/test/fixtures/d/file1 | 0 .../node_modules/tar-fs/test/fixtures/d/file2 | 0 .../tar-fs/test/fixtures/d/sub-dir/file5 | 0 .../tar-fs/test/fixtures/d/sub-files/file3 | 0 .../tar-fs/test/fixtures/d/sub-files/file4 | 0 .../tar-fs/test/fixtures/e/directory/.ignore | 0 .../node_modules/tar-fs/test/fixtures/e/file | 0 .../pacote/node_modules/tar-fs/test/index.js | 227 - .../pacote/node_modules/tar-stream/LICENSE | 21 - .../pacote/node_modules/tar-stream/README.md | 168 - .../pacote/node_modules/tar-stream/extract.js | 246 - .../pacote/node_modules/tar-stream/headers.js | 286 - .../pacote/node_modules/tar-stream/index.js | 2 - .../tar-stream/node_modules/bl/.npmignore | 1 - .../tar-stream/node_modules/bl/.travis.yml | 15 - .../tar-stream/node_modules/bl/LICENSE.md | 13 - .../tar-stream/node_modules/bl/README.md | 208 - .../node_modules/tar-stream/node_modules/bl/bl.js | 280 - .../tar-stream/node_modules/bl/package.json | 65 - .../tar-stream/node_modules/bl/test/test.js | 701 -- .../tar-stream/node_modules/end-of-stream/LICENSE | 21 - .../node_modules/end-of-stream/README.md | 52 - .../tar-stream/node_modules/end-of-stream/index.js | 83 - .../node_modules/end-of-stream/package.json | 66 - .../tar-stream/node_modules/xtend/.npmignore | 1 - .../tar-stream/node_modules/xtend/LICENCE | 19 - .../tar-stream/node_modules/xtend/Makefile | 4 - .../tar-stream/node_modules/xtend/README.md | 32 - .../tar-stream/node_modules/xtend/immutable.js | 19 - .../tar-stream/node_modules/xtend/mutable.js | 17 - .../tar-stream/node_modules/xtend/package.json | 89 - .../tar-stream/node_modules/xtend/test.js | 83 - .../pacote/node_modules/tar-stream/pack.js | 254 - .../pacote/node_modules/tar-stream/package.json | 88 - deps/npm/node_modules/pacote/package.json | 47 +- deps/npm/node_modules/qrcode-terminal/.npmignore | 2 + deps/npm/node_modules/qrcode-terminal/.travis.yml | 3 + deps/npm/node_modules/qrcode-terminal/LICENSE | 222 + deps/npm/node_modules/qrcode-terminal/README.md | 80 + .../qrcode-terminal/bin/qrcode-terminal.js | 68 + .../node_modules/qrcode-terminal/example/basic.js | 2 + .../node_modules/qrcode-terminal/example/basic.png | Bin 0 -> 46426 bytes .../qrcode-terminal/example/callback.js | 4 + .../qrcode-terminal/example/small-qrcode.js | 6 + deps/npm/node_modules/qrcode-terminal/lib/main.js | 100 + deps/npm/node_modules/qrcode-terminal/package.json | 76 + deps/npm/node_modules/qrcode-terminal/test/main.js | 63 + .../qrcode-terminal/vendor/QRCode/QR8bitByte.js | 22 + .../qrcode-terminal/vendor/QRCode/QRBitBuffer.js | 38 + .../vendor/QRCode/QRErrorCorrectLevel.js | 6 + .../qrcode-terminal/vendor/QRCode/QRMaskPattern.js | 10 + .../qrcode-terminal/vendor/QRCode/QRMath.js | 44 + .../qrcode-terminal/vendor/QRCode/QRMode.js | 6 + .../qrcode-terminal/vendor/QRCode/QRPolynomial.js | 66 + .../qrcode-terminal/vendor/QRCode/QRRSBlock.js | 298 + .../qrcode-terminal/vendor/QRCode/QRUtil.js | 272 + .../qrcode-terminal/vendor/QRCode/index.js | 462 + deps/npm/node_modules/query-string/index.js | 206 + deps/npm/node_modules/query-string/license | 9 + .../node_modules/decode-uri-component/index.js | 94 + .../node_modules/decode-uri-component/license | 21 + .../node_modules/decode-uri-component/package.json | 69 + .../node_modules/decode-uri-component/readme.md | 70 + .../node_modules/object-assign/index.js | 90 + .../node_modules/object-assign/license | 21 + .../node_modules/object-assign/package.json | 74 + .../node_modules/object-assign/readme.md | 61 + .../node_modules/strict-uri-encode/index.js | 6 + .../node_modules/strict-uri-encode/license | 21 + .../node_modules/strict-uri-encode/package.json | 62 + .../node_modules/strict-uri-encode/readme.md | 40 + deps/npm/node_modules/query-string/package.json | 78 + deps/npm/node_modules/query-string/readme.md | 186 + deps/npm/node_modules/qw/LICENSE | 13 + deps/npm/node_modules/qw/README.md | 34 + deps/npm/node_modules/qw/package.json | 60 + deps/npm/node_modules/qw/qw.js | 43 + .../json-parse-better-errors/CHANGELOG.md | 36 + .../json-parse-better-errors/LICENSE.md | 7 + .../json-parse-better-errors/README.md | 53 + .../node_modules/json-parse-better-errors/index.js | 32 + .../json-parse-better-errors/package.json | 76 + .../json-parse-helpfulerror/.editorconfig | 14 - .../json-parse-helpfulerror/.npmignore | 28 - .../node_modules/json-parse-helpfulerror/LICENSE | 22 - .../node_modules/json-parse-helpfulerror/README.md | 29 - .../node_modules/json-parse-helpfulerror/index.js | 21 - .../node_modules/jju/.npmignore | 9 - .../node_modules/jju/LICENSE | 13 - .../node_modules/jju/README.md | 243 - .../node_modules/jju/index.js | 32 - .../node_modules/jju/lib/analyze.js | 92 - .../node_modules/jju/lib/document.js | 485 - .../node_modules/jju/lib/parse.js | 765 -- .../node_modules/jju/lib/stringify.js | 383 - .../node_modules/jju/lib/unicode.js | 71 - .../node_modules/jju/lib/utils.js | 46 - .../node_modules/jju/package.json | 69 - .../node_modules/jju/package.yaml | 46 - .../json-parse-helpfulerror/package.json | 66 - .../json-parse-helpfulerror/test/test.js | 32 - .../read-package-json/node_modules/slash/index.js | 11 + .../node_modules/slash/package.json | 65 + .../read-package-json/node_modules/slash/readme.md | 44 + .../node_modules/read-package-json/package.json | 25 +- .../node_modules/read-package-json/read-json.js | 9 +- deps/npm/node_modules/request/README.md | 116 +- deps/npm/node_modules/request/index.js | 27 +- deps/npm/node_modules/request/lib/auth.js | 11 +- deps/npm/node_modules/request/lib/cookies.js | 15 +- .../node_modules/request/lib/getProxyFromURI.js | 36 +- deps/npm/node_modules/request/lib/har.js | 20 +- deps/npm/node_modules/request/lib/helpers.js | 20 +- deps/npm/node_modules/request/lib/multipart.js | 13 +- deps/npm/node_modules/request/lib/oauth.js | 42 +- deps/npm/node_modules/request/lib/querystring.js | 5 +- deps/npm/node_modules/request/lib/redirect.js | 17 +- deps/npm/node_modules/request/lib/tunnel.js | 51 +- .../request/node_modules/aws-sign2/index.js | 2 +- .../request/node_modules/aws-sign2/package.json | 26 +- .../request/node_modules/form-data/README.md.bak | 234 + .../request/node_modules/form-data/Readme.md | 29 +- .../node_modules/form-data/lib/form_data.js | 43 +- .../request/node_modules/form-data/package.json | 27 +- .../request/node_modules/har-validator/README.md | 27 +- .../node_modules/har-validator/lib/async.js | 98 + .../har-validator/lib/browser/async.js | 96 - .../har-validator/lib/browser/error.js | 15 - .../har-validator/lib/browser/promise.js | 93 - .../node_modules/har-validator/lib/error.js | 17 + .../node_modules/har-validator/lib/node4/async.js | 136 - .../node_modules/har-validator/lib/node4/error.js | 22 - .../har-validator/lib/node4/promise.js | 132 - .../node_modules/har-validator/lib/node6/async.js | 133 - .../node_modules/har-validator/lib/node6/error.js | 22 - .../har-validator/lib/node6/promise.js | 130 - .../node_modules/har-validator/lib/node7/async.js | 133 - .../node_modules/har-validator/lib/node7/error.js | 22 - .../har-validator/lib/node7/promise.js | 130 - .../node_modules/har-validator/lib/promise.js | 95 + .../node_modules/ajv/.tonic_example.js | 2 +- .../har-validator/node_modules/ajv/README.md | 330 +- .../node_modules/ajv/dist/ajv.bundle.js | 3671 +++--- .../har-validator/node_modules/ajv/dist/ajv.min.js | 7 +- .../node_modules/ajv/dist/ajv.min.js.map | 2 +- .../node_modules/ajv/dist/nodent.min.js | 8 +- .../node_modules/ajv/dist/regenerator.min.js | 32 +- .../har-validator/node_modules/ajv/lib/$data.js | 49 + .../har-validator/node_modules/ajv/lib/ajv.d.ts | 84 +- .../har-validator/node_modules/ajv/lib/ajv.js | 677 +- .../har-validator/node_modules/ajv/lib/async.js | 218 - .../node_modules/ajv/lib/compile/_rules.js | 3 + .../node_modules/ajv/lib/compile/async.js | 90 + .../node_modules/ajv/lib/compile/equal.js | 44 +- .../node_modules/ajv/lib/compile/error_classes.js | 34 + .../node_modules/ajv/lib/compile/formats.js | 79 +- .../node_modules/ajv/lib/compile/index.js | 65 +- .../node_modules/ajv/lib/compile/resolve.js | 104 +- .../node_modules/ajv/lib/compile/rules.js | 34 +- .../node_modules/ajv/lib/compile/util.js | 28 +- .../ajv/lib/compile/validation_error.js | 14 - .../node_modules/ajv/lib/dot/_limit.jst | 79 +- .../node_modules/ajv/lib/dot/anyOf.jst | 2 +- .../node_modules/ajv/lib/dot/const.jst | 11 + .../node_modules/ajv/lib/dot/contains.jst | 57 + .../node_modules/ajv/lib/dot/custom.jst | 23 +- .../node_modules/ajv/lib/dot/definitions.def | 25 +- .../node_modules/ajv/lib/dot/dependencies.jst | 37 +- .../node_modules/ajv/lib/dot/errors.def | 23 +- .../node_modules/ajv/lib/dot/format.jst | 40 +- .../node_modules/ajv/lib/dot/items.jst | 1 - .../node_modules/ajv/lib/dot/missing.def | 19 +- .../node_modules/ajv/lib/dot/oneOf.jst | 2 +- .../node_modules/ajv/lib/dot/properties.jst | 80 +- .../node_modules/ajv/lib/dot/propertyNames.jst | 54 + .../har-validator/node_modules/ajv/lib/dot/ref.jst | 21 +- .../node_modules/ajv/lib/dot/required.jst | 20 +- .../node_modules/ajv/lib/dot/v5/_formatLimit.jst | 116 - .../node_modules/ajv/lib/dot/v5/constant.jst | 10 - .../ajv/lib/dot/v5/patternRequired.jst | 28 - .../node_modules/ajv/lib/dot/v5/switch.jst | 73 - .../node_modules/ajv/lib/dot/validate.jst | 184 +- .../node_modules/ajv/lib/dotjs/_formatLimit.js | 176 - .../node_modules/ajv/lib/dotjs/_limit.js | 65 +- .../node_modules/ajv/lib/dotjs/_limitItems.js | 4 +- .../node_modules/ajv/lib/dotjs/_limitLength.js | 4 +- .../node_modules/ajv/lib/dotjs/_limitProperties.js | 4 +- .../node_modules/ajv/lib/dotjs/allOf.js | 2 +- .../node_modules/ajv/lib/dotjs/anyOf.js | 14 +- .../node_modules/ajv/lib/dotjs/const.js | 55 + .../node_modules/ajv/lib/dotjs/constant.js | 52 - .../node_modules/ajv/lib/dotjs/contains.js | 81 + .../node_modules/ajv/lib/dotjs/custom.js | 24 +- .../node_modules/ajv/lib/dotjs/dependencies.js | 190 +- .../node_modules/ajv/lib/dotjs/enum.js | 4 +- .../node_modules/ajv/lib/dotjs/format.js | 35 +- .../node_modules/ajv/lib/dotjs/items.js | 8 +- .../node_modules/ajv/lib/dotjs/multipleOf.js | 6 +- .../node_modules/ajv/lib/dotjs/not.js | 2 +- .../node_modules/ajv/lib/dotjs/oneOf.js | 16 +- .../node_modules/ajv/lib/dotjs/pattern.js | 4 +- .../node_modules/ajv/lib/dotjs/patternRequired.js | 51 - .../node_modules/ajv/lib/dotjs/properties.js | 121 +- .../node_modules/ajv/lib/dotjs/propertyNames.js | 81 + .../node_modules/ajv/lib/dotjs/ref.js | 26 +- .../node_modules/ajv/lib/dotjs/required.js | 49 +- .../node_modules/ajv/lib/dotjs/switch.js | 128 - .../node_modules/ajv/lib/dotjs/uniqueItems.js | 4 +- .../node_modules/ajv/lib/dotjs/validate.js | 391 +- .../har-validator/node_modules/ajv/lib/keyword.js | 9 +- .../node_modules/ajv/lib/patternGroups.js | 36 + .../node_modules/ajv/lib/refs/$data.json | 17 + .../ajv/lib/refs/json-schema-draft-06.json | 150 + .../node_modules/ajv/lib/refs/json-schema-v5.json | 84 +- .../har-validator/node_modules/ajv/lib/v5.js | 52 - .../ajv/node_modules/fast-deep-equal/.eslintrc.yml | 25 + .../ajv/node_modules/fast-deep-equal/.npmignore | 60 + .../ajv/node_modules/fast-deep-equal/.travis.yml | 8 + .../ajv/node_modules/fast-deep-equal/LICENSE | 21 + .../ajv/node_modules/fast-deep-equal/README.md | 55 + .../fast-deep-equal/benchmark/.eslintrc.yml | 5 + .../fast-deep-equal/benchmark/index.js | 56 + .../ajv/node_modules/fast-deep-equal/index.js | 43 + .../ajv/node_modules/fast-deep-equal/package.json | 78 + .../fast-deep-equal/spec/.eslintrc.yml | 5 + .../fast-deep-equal/spec/index.spec.js | 18 + .../ajv/node_modules/fast-deep-equal/spec/tests.js | 320 + .../json-schema-traverse/.eslintrc.yml | 27 + .../node_modules/json-schema-traverse/.npmignore | 60 + .../node_modules/json-schema-traverse/.travis.yml | 8 + .../ajv/node_modules/json-schema-traverse/LICENSE | 21 + .../node_modules/json-schema-traverse/README.md | 69 + .../ajv/node_modules/json-schema-traverse/index.js | 81 + .../node_modules/json-schema-traverse/package.json | 70 + .../json-schema-traverse/spec/.eslintrc.yml | 6 + .../json-schema-traverse/spec/fixtures/schema.js | 125 + .../json-schema-traverse/spec/index.spec.js | 102 + .../har-validator/node_modules/ajv/package.json | 52 +- .../node_modules/ajv/scripts/bundle.js | 19 +- .../node_modules/ajv/scripts/compile-dots.js | 4 +- .../node_modules/har-schema/lib/afterRequest.json | 3 +- .../node_modules/har-schema/lib/beforeRequest.json | 3 +- .../node_modules/har-schema/lib/browser.json | 3 +- .../node_modules/har-schema/lib/cache.json | 3 +- .../node_modules/har-schema/lib/content.json | 3 +- .../node_modules/har-schema/lib/cookie.json | 3 +- .../node_modules/har-schema/lib/creator.json | 3 +- .../node_modules/har-schema/lib/entry.json | 3 +- .../node_modules/har-schema/lib/har.json | 3 +- .../node_modules/har-schema/lib/header.json | 3 +- .../node_modules/har-schema/lib/log.json | 3 +- .../node_modules/har-schema/lib/page.json | 3 +- .../node_modules/har-schema/lib/pageTimings.json | 3 +- .../node_modules/har-schema/lib/postData.json | 3 +- .../node_modules/har-schema/lib/query.json | 3 +- .../node_modules/har-schema/lib/request.json | 3 +- .../node_modules/har-schema/lib/response.json | 3 +- .../node_modules/har-schema/lib/timings.json | 3 +- .../node_modules/har-schema/package.json | 30 +- .../node_modules/har-validator/package.json | 73 +- .../node_modules/har-validator/src/async.js | 96 - .../node_modules/har-validator/src/error.js | 15 - .../node_modules/har-validator/src/promise.js | 93 - .../request/node_modules/hawk/.npmignore | 24 +- .../request/node_modules/hawk/.travis.yml | 4 - .../node_modules/request/node_modules/hawk/LICENSE | 2 +- .../request/node_modules/hawk/README.md | 99 +- .../request/node_modules/hawk/bower.json | 24 - .../request/node_modules/hawk/client.js | 3 + .../request/node_modules/hawk/component.json | 19 - .../request/node_modules/hawk/dist/browser.js | 793 ++ .../request/node_modules/hawk/dist/client.js | 343 - .../request/node_modules/hawk/example/usage.js | 77 - .../request/node_modules/hawk/images/hawk.png | Bin 6945 -> 0 bytes .../request/node_modules/hawk/images/logo.png | Bin 71732 -> 0 bytes .../request/node_modules/hawk/lib/browser.js | 150 +- .../request/node_modules/hawk/lib/client.js | 119 +- .../request/node_modules/hawk/lib/crypto.js | 42 +- .../request/node_modules/hawk/lib/index.js | 2 + .../request/node_modules/hawk/lib/server.js | 116 +- .../request/node_modules/hawk/lib/utils.js | 30 +- .../node_modules/hawk/node_modules/boom/.npmignore | 18 - .../hawk/node_modules/boom/.travis.yml | 8 - .../hawk/node_modules/boom/CONTRIBUTING.md | 1 - .../node_modules/hawk/node_modules/boom/LICENSE | 5 +- .../node_modules/hawk/node_modules/boom/README.md | 196 +- .../hawk/node_modules/boom/images/boom.png | Bin 29479 -> 0 bytes .../hawk/node_modules/boom/lib/index.js | 189 +- .../hawk/node_modules/boom/package.json | 45 +- .../hawk/node_modules/boom/test/index.js | 654 - .../hawk/node_modules/cryptiles/.npmignore | 20 +- .../hawk/node_modules/cryptiles/.travis.yml | 7 - .../hawk/node_modules/cryptiles/LICENSE | 2 +- .../hawk/node_modules/cryptiles/README.md | 3 + .../hawk/node_modules/cryptiles/lib/index.js | 44 +- .../cryptiles/node_modules/boom/LICENSE | 29 + .../cryptiles/node_modules/boom/README.md | 784 ++ .../cryptiles/node_modules/boom/lib/index.js | 457 + .../cryptiles/node_modules/boom/package.json | 61 + .../hawk/node_modules/cryptiles/package.json | 39 +- .../hawk/node_modules/cryptiles/test/index.js | 102 - .../node_modules/hawk/node_modules/hoek/.npmignore | 21 +- .../hawk/node_modules/hoek/.travis.yml | 7 - .../hawk/node_modules/hoek/CONTRIBUTING.md | 1 - .../node_modules/hawk/node_modules/hoek/LICENSE | 3 +- .../node_modules/hawk/node_modules/hoek/README.md | 572 +- .../hawk/node_modules/hoek/images/hoek.png | Bin 37939 -> 0 bytes .../hawk/node_modules/hoek/lib/escape.js | 60 +- .../hawk/node_modules/hoek/lib/index.js | 351 +- .../hawk/node_modules/hoek/package.json | 34 +- .../hawk/node_modules/hoek/test/escaper.js | 88 - .../hawk/node_modules/hoek/test/index.js | 2513 ---- .../hawk/node_modules/hoek/test/modules/ignore.txt | 0 .../hawk/node_modules/hoek/test/modules/test1.js | 1 - .../hawk/node_modules/hoek/test/modules/test2.js | 1 - .../hawk/node_modules/hoek/test/modules/test3.js | 1 - .../node_modules/hawk/node_modules/sntp/.npmignore | 21 +- .../hawk/node_modules/sntp/.travis.yml | 5 - .../node_modules/hawk/node_modules/sntp/LICENSE | 2 +- .../node_modules/hawk/node_modules/sntp/Makefile | 9 - .../node_modules/hawk/node_modules/sntp/README.md | 0 .../hawk/node_modules/sntp/examples/offset.js | 16 - .../hawk/node_modules/sntp/examples/time.js | 25 - .../node_modules/hawk/node_modules/sntp/index.js | 1 - .../hawk/node_modules/sntp/lib/index.js | 112 +- .../hawk/node_modules/sntp/package.json | 47 +- .../hawk/node_modules/sntp/test/index.js | 435 - .../request/node_modules/hawk/package.json | 53 +- .../request/node_modules/hawk/test/browser.js | 1492 --- .../request/node_modules/hawk/test/client.js | 440 - .../request/node_modules/hawk/test/crypto.js | 70 - .../request/node_modules/hawk/test/index.js | 378 - .../request/node_modules/hawk/test/readme.js | 94 - .../request/node_modules/hawk/test/server.js | 1328 -- .../request/node_modules/hawk/test/uri.js | 837 -- .../request/node_modules/hawk/test/utils.js | 149 - .../node_modules/http-signature/lib/parser.js | 27 +- .../node_modules/http-signature/lib/signer.js | 4 +- .../node_modules/assert-plus/CHANGES.md | 6 + .../node_modules/assert-plus/README.md | 9 +- .../node_modules/assert-plus/assert.js | 5 + .../node_modules/assert-plus/package.json | 33 +- .../http-signature/node_modules/jsprim/CHANGES.md | 6 + .../node_modules/jsprim/CONTRIBUTING.md | 19 + .../http-signature/node_modules/jsprim/README.md | 7 +- .../jsprim/node_modules/assert-plus/AUTHORS | 6 - .../jsprim/node_modules/assert-plus/CHANGES.md | 14 - .../jsprim/node_modules/assert-plus/README.md | 162 - .../jsprim/node_modules/assert-plus/assert.js | 211 - .../jsprim/node_modules/assert-plus/package.json | 84 - .../jsprim/node_modules/extsprintf/.gitmodules | 6 - .../jsprim/node_modules/extsprintf/.npmignore | 2 + .../jsprim/node_modules/extsprintf/Makefile | 5 +- .../jsprim/node_modules/extsprintf/Makefile.deps | 39 - .../jsprim/node_modules/extsprintf/README.md | 7 + .../node_modules/extsprintf/examples/simple.js | 2 - .../node_modules/extsprintf/lib/extsprintf.js | 17 + .../jsprim/node_modules/extsprintf/package.json | 30 +- .../jsprim/node_modules/verror/.gitmodules | 0 .../jsprim/node_modules/verror/.npmignore | 10 +- .../jsprim/node_modules/verror/CHANGES.md | 28 + .../jsprim/node_modules/verror/CONTRIBUTING.md | 19 + .../jsprim/node_modules/verror/LICENSE | 2 +- .../jsprim/node_modules/verror/Makefile | 35 - .../jsprim/node_modules/verror/Makefile.targ | 285 - .../jsprim/node_modules/verror/README.md | 580 +- .../node_modules/verror/examples/levels-verror.js | 36 - .../node_modules/verror/examples/levels-werror.js | 34 - .../jsprim/node_modules/verror/examples/varargs.js | 6 - .../jsprim/node_modules/verror/examples/verror.js | 13 - .../jsprim/node_modules/verror/examples/werror.js | 14 - .../jsprim/node_modules/verror/jsl.node.conf | 139 - .../jsprim/node_modules/verror/lib/verror.js | 426 +- .../verror/node_modules/core-util-is/LICENSE | 19 + .../verror/node_modules/core-util-is/README.md | 3 + .../verror/node_modules/core-util-is/float.patch | 604 + .../verror/node_modules/core-util-is/lib/util.js | 107 + .../verror/node_modules/core-util-is/package.json | 62 + .../verror/node_modules/core-util-is/test.js | 68 + .../jsprim/node_modules/verror/package.json | 33 +- .../node_modules/verror/tests/tst.inherit.js | 100 - .../jsprim/node_modules/verror/tests/tst.verror.js | 156 - .../jsprim/node_modules/verror/tests/tst.werror.js | 179 - .../node_modules/jsprim/package.json | 26 +- .../sshpk/node_modules/assert-plus/AUTHORS | 6 - .../sshpk/node_modules/assert-plus/CHANGES.md | 14 - .../sshpk/node_modules/assert-plus/README.md | 162 - .../sshpk/node_modules/assert-plus/assert.js | 211 - .../sshpk/node_modules/assert-plus/package.json | 86 - .../node_modules/http-signature/package.json | 33 +- .../request/node_modules/mime-types/HISTORY.md | 24 + .../request/node_modules/mime-types/README.md | 4 +- .../request/node_modules/mime-types/index.js | 10 +- .../mime-types/node_modules/mime-db/HISTORY.md | 147 +- .../mime-types/node_modules/mime-db/README.md | 12 + .../mime-types/node_modules/mime-db/db.json | 329 +- .../mime-types/node_modules/mime-db/package.json | 46 +- .../request/node_modules/mime-types/package.json | 37 +- .../node_modules/performance-now/.travis.yml | 6 +- .../request/node_modules/performance-now/Makefile | 25 - .../request/node_modules/performance-now/README.md | 20 +- .../performance-now/lib/performance-now.js | 12 +- .../performance-now/lib/performance-now.js.map | 10 + .../node_modules/performance-now/license.txt | 2 +- .../node_modules/performance-now/package.json | 52 +- .../node_modules/performance-now/src/index.d.ts | 8 + .../performance-now/src/performance-now.coffee | 6 +- .../performance-now/test/performance-now.coffee | 69 +- .../performance-now/test/scripts.coffee | 27 + .../test/scripts/delayed-call.coffee | 11 + .../test/scripts/delayed-require.coffee | 12 + .../performance-now/test/scripts/difference.coffee | 6 + .../test/scripts/initial-value.coffee | 10 + .../request/node_modules/qs/.editorconfig | 30 + .../request/node_modules/qs/.jscs.json | 175 - .../request/node_modules/qs/CHANGELOG.md | 46 + .../node_modules/request/node_modules/qs/README.md | 117 +- .../request/node_modules/qs/dist/qs.js | 182 +- .../request/node_modules/qs/lib/parse.js | 67 +- .../request/node_modules/qs/lib/stringify.js | 15 +- .../request/node_modules/qs/lib/utils.js | 106 +- .../request/node_modules/qs/package.json | 40 +- .../request/node_modules/qs/test/parse.js | 56 +- .../request/node_modules/qs/test/stringify.js | 35 +- .../request/node_modules/qs/test/utils.js | 12 + .../request/node_modules/tough-cookie/README.md | 3 + .../node_modules/tough-cookie/lib/cookie.js | 9 +- .../node_modules/tough-cookie/lib/pubsuffix.js | 2 +- .../request/node_modules/tough-cookie/package.json | 27 +- deps/npm/node_modules/request/package.json | 59 +- deps/npm/node_modules/request/request.js | 215 +- deps/npm/node_modules/rimraf/package.json | 32 +- deps/npm/node_modules/rimraf/rimraf.js | 5 +- deps/npm/node_modules/semver/README.md | 90 +- deps/npm/node_modules/semver/package.json | 33 +- deps/npm/node_modules/semver/semver.js | 119 +- deps/npm/node_modules/tar/.npmignore | 5 - deps/npm/node_modules/tar/.travis.yml | 4 - deps/npm/node_modules/tar/LICENSE | 3 + deps/npm/node_modules/tar/README.md | 893 +- deps/npm/node_modules/tar/examples/extracter.js | 19 - deps/npm/node_modules/tar/examples/packer.js | 24 - deps/npm/node_modules/tar/examples/reader.js | 36 - deps/npm/node_modules/tar/index.js | 18 + deps/npm/node_modules/tar/lib/buffer-entry.js | 30 - deps/npm/node_modules/tar/lib/create.js | 110 + deps/npm/node_modules/tar/lib/entry-writer.js | 169 - deps/npm/node_modules/tar/lib/entry.js | 220 - .../node_modules/tar/lib/extended-header-writer.js | 191 - deps/npm/node_modules/tar/lib/extended-header.js | 140 - deps/npm/node_modules/tar/lib/extract.js | 189 +- .../node_modules/tar/lib/global-header-writer.js | 14 - deps/npm/node_modules/tar/lib/header.js | 583 +- deps/npm/node_modules/tar/lib/high-level-opt.js | 29 + deps/npm/node_modules/tar/lib/large-numbers.js | 92 + deps/npm/node_modules/tar/lib/list.js | 132 + deps/npm/node_modules/tar/lib/mkdir.js | 207 + deps/npm/node_modules/tar/lib/pack.js | 537 +- deps/npm/node_modules/tar/lib/parse.js | 632 +- deps/npm/node_modules/tar/lib/pax.js | 145 + deps/npm/node_modules/tar/lib/read-entry.js | 94 + deps/npm/node_modules/tar/lib/replace.js | 211 + deps/npm/node_modules/tar/lib/types.js | 44 + deps/npm/node_modules/tar/lib/unpack.js | 481 + deps/npm/node_modules/tar/lib/update.js | 36 + deps/npm/node_modules/tar/lib/warn-mixin.js | 14 + deps/npm/node_modules/tar/lib/winchars.js | 23 + deps/npm/node_modules/tar/lib/write-entry.js | 395 + .../tar/node_modules/block-stream/LICENCE | 25 - .../tar/node_modules/block-stream/LICENSE | 15 - .../tar/node_modules/block-stream/README.md | 14 - .../tar/node_modules/block-stream/block-stream.js | 209 - .../tar/node_modules/block-stream/package.json | 63 - .../tar/node_modules/minipass/.npmignore | 4 + .../tar/node_modules/minipass/.travis.yml | 7 + .../tar/node_modules/minipass/README.md | 46 + .../node_modules/tar/node_modules/minipass/b.js | 12 + .../minipass/bench/lib/extend-minipass.js | 11 + .../minipass/bench/lib/extend-through2.js | 12 + .../minipass/bench/lib/extend-transform.js | 11 + .../node_modules/minipass/bench/lib/nullsink.js | 12 + .../tar/node_modules/minipass/bench/lib/numbers.js | 41 + .../tar/node_modules/minipass/bench/lib/timer.js | 15 + .../tar/node_modules/minipass/bench/test.js | 160 + .../node_modules/tar/node_modules/minipass/d.js | 7 + .../node_modules/tar/node_modules/minipass/e.js | 17 + .../node_modules/tar/node_modules/minipass/eos.js | 12 + .../npm/node_modules/tar/node_modules/minipass/foo | 0 .../tar/node_modules/minipass/index.js | 295 + .../node_modules/minipass/minipass-benchmarks.xlsx | Bin 0 -> 54935 bytes .../tar/node_modules/minipass/package.json | 64 + .../tar/node_modules/minipass/test/basic.js | 438 + .../tar/node_modules/minipass/test/empty-end.js | 38 + .../node_modules/tar/node_modules/minizlib/LICENSE | 26 + .../tar/node_modules/minizlib/README.md | 44 + .../tar/node_modules/minizlib/constants.js | 46 + .../tar/node_modules/minizlib/index.js | 333 + .../tar/node_modules/minizlib/package.json | 71 + .../node_modules/tar/node_modules/yallist/LICENSE | 15 + .../tar/node_modules/yallist/README.md | 204 + .../tar/node_modules/yallist/iterator.js | 8 + .../tar/node_modules/yallist/package.json | 63 + .../tar/node_modules/yallist/yallist.js | 376 + deps/npm/node_modules/tar/package.json | 75 +- deps/npm/node_modules/tar/tar.js | 173 - .../npm/node_modules/tar/test/00-setup-fixtures.js | 53 - .../tar/test/cb-never-called-1.0.1.tgz | Bin 4096 -> 0 bytes .../npm/node_modules/tar/test/dir-normalization.js | 177 - .../node_modules/tar/test/dir-normalization.tar | Bin 4608 -> 0 bytes deps/npm/node_modules/tar/test/error-on-broken.js | 33 - deps/npm/node_modules/tar/test/extract-move.js | 132 - deps/npm/node_modules/tar/test/extract.js | 367 - deps/npm/node_modules/tar/test/fixtures.tgz | Bin 19352 -> 0 bytes deps/npm/node_modules/tar/test/header.js | 183 - .../node_modules/tar/test/pack-no-proprietary.js | 886 -- deps/npm/node_modules/tar/test/pack.js | 952 -- deps/npm/node_modules/tar/test/parse-discard.js | 29 - deps/npm/node_modules/tar/test/parse.js | 359 - deps/npm/node_modules/tar/test/zz-cleanup.js | 20 - deps/npm/node_modules/which/CHANGELOG.md | 5 + deps/npm/node_modules/which/README.md | 3 + deps/npm/node_modules/which/package.json | 33 +- deps/npm/node_modules/which/which.js | 3 + deps/npm/node_modules/worker-farm/index.d.ts | 44 + deps/npm/node_modules/worker-farm/lib/fork.js | 5 +- deps/npm/node_modules/worker-farm/package.json | 21 +- .../node_modules/write-file-atomic/package.json | 17 +- deps/npm/package.json | 56 +- deps/npm/scripts/doc-build.sh | 52 - deps/npm/scripts/install.sh | 41 +- deps/npm/test/fixtures/config/userconfig | 1 - deps/npm/test/need-npm5-update/lifecycle-signal.js | 37 +- deps/npm/test/tap/00-config-setup.js | 2 - deps/npm/test/tap/add-remote-git-submodule.js | 5 + deps/npm/test/tap/adduser-legacy-auth.js | 10 +- deps/npm/test/tap/bundled-dependencies-nonarray.js | 6 +- deps/npm/test/tap/bundled-dependencies.js | 11 +- deps/npm/test/tap/bundled-transitive-deps.js | 15 +- deps/npm/test/tap/config-basic.js | 1 - deps/npm/test/tap/config-builtin.js | 1 - deps/npm/test/tap/config-list.js | 34 +- deps/npm/test/tap/config-save.js | 2 - deps/npm/test/tap/files-and-ignores.js | 103 +- deps/npm/test/tap/git-npmignore.js | 3 +- deps/npm/test/tap/help.js | 26 + .../tap/install-scoped-with-peer-dependency.js | 2 +- deps/npm/test/tap/install-windows-newlines.js | 90 + deps/npm/test/tap/lifecycle-INIT_CWD.js | 58 + deps/npm/test/tap/lifecycle.js | 44 - deps/npm/test/tap/no-global-warns.js | 14 +- .../tap/optional-metadep-rollback-collision.js | 85 +- deps/npm/test/tap/ping.js | 2 +- deps/npm/test/tap/prune-dev-dep-with-bins.js | 104 + deps/npm/test/tap/unit-deps-replaceModule.js | 8 +- deps/npm/test/tap/unsupported.js | 26 +- deps/npm/test/tap/verify-no-lifecycle-on-repo.js | 6 +- deps/npm/test/tap/version-commit-hooks-default.js | 13 + deps/npm/test/tap/version-commit-hooks.js | 64 + 1944 files changed, 117687 insertions(+), 43405 deletions(-) delete mode 100755 deps/npm/bin/read-package-json.js create mode 100644 deps/npm/doc/cli/npm-profile.md create mode 100644 deps/npm/doc/cli/npm-token.md create mode 100644 deps/npm/html/doc/cli/npm-profile.html create mode 100644 deps/npm/html/doc/cli/npm-token.html create mode 100644 deps/npm/lib/config/lifecycle.js create mode 100644 deps/npm/lib/profile.js create mode 100644 deps/npm/lib/token.js create mode 100644 deps/npm/lib/utils/convert-line-endings.js create mode 100644 deps/npm/lib/utils/did-you-mean.js create mode 100644 deps/npm/lib/utils/is-hashbang-file.js create mode 100644 deps/npm/lib/utils/lifecycle-cmd.js create mode 100644 deps/npm/lib/utils/read-user-info.js delete mode 100644 deps/npm/lib/utils/tar.js create mode 100644 deps/npm/man/man1/npm-profile.1 create mode 100644 deps/npm/man/man1/npm-token.1 create mode 100644 deps/npm/node_modules/cli-table2/.npmignore create mode 100644 deps/npm/node_modules/cli-table2/.travis.yml create mode 100644 deps/npm/node_modules/cli-table2/README.md create mode 100644 deps/npm/node_modules/cli-table2/advanced-usage.md create mode 100644 deps/npm/node_modules/cli-table2/basic-usage.md create mode 100644 deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js create mode 100644 deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js create mode 100644 deps/npm/node_modules/cli-table2/examples/screenshots/basic-usage-with-colors.png create mode 100644 deps/npm/node_modules/cli-table2/examples/screenshots/multi-line-colors.png create mode 100644 deps/npm/node_modules/cli-table2/examples/screenshots/truncation-with-colors.png create mode 100644 deps/npm/node_modules/cli-table2/gulpfile.js create mode 100644 deps/npm/node_modules/cli-table2/index.js create mode 100644 deps/npm/node_modules/cli-table2/lib/print-example.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/LICENSE create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/ReadMe.md create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/examples/normal-usage.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/examples/safe-string.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/colors.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/trap.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/zalgo.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/extendStringPrototype.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/index.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/america.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/rainbow.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/random.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/zebra.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/styles.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/lib/system/supports-colors.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/package.json create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/safe.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/colors/themes/generic-logging.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/LICENSE create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/README.md create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/chunk.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/compact.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/difference.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/drop.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRightWhile.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropWhile.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/fill.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/findIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/findLastIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/first.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/flatten.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/flattenDeep.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/head.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/indexOf.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/intersection.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/last.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/lastIndexOf.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/object.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/pull.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/pullAt.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/remove.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/rest.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/slice.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedLastIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/tail.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/take.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRightWhile.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeWhile.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/union.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/uniq.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/unique.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzip.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzipWith.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/without.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/xor.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/zip.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipObject.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipWith.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/chain.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/commit.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/concat.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/lodash.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/plant.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/reverse.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/run.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/tap.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/thru.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toJSON.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toString.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/value.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/valueOf.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperChain.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperConcat.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperPlant.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperReverse.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperToString.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperValue.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/all.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/any.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/at.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/collect.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/contains.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/countBy.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/detect.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/each.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/eachRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/every.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/filter.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/find.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findLast.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findWhere.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldl.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldr.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEach.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEachRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/groupBy.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/include.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/includes.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/indexBy.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/inject.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/invoke.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/map.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/max.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/min.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/partition.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/pluck.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduce.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduceRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reject.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sample.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/select.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/shuffle.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/size.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/some.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortBy.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByAll.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByOrder.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sum.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/collection/where.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/date.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/date/now.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/after.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/ary.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/backflow.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/before.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/bind.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindAll.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindKey.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/compose.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/curry.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/curryRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/debounce.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/defer.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/delay.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/flow.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/flowRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/memoize.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/modArgs.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/negate.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/once.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/partial.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/partialRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/rearg.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/restParam.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/spread.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/throttle.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/function/wrap.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/index.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/LazyWrapper.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/LodashWrapper.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/MapCache.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/SetCache.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayConcat.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayCopy.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayEach.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayEachRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayEvery.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayExtremum.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayFilter.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayMap.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayPush.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayReduce.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arrayReduceRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arraySome.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/arraySum.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/assignDefaults.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/assignOwnDefaults.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/assignWith.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseAssign.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseAt.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseCallback.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseClone.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseCompareAscending.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseCopy.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseCreate.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseDelay.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseDifference.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseEach.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseEachRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseEvery.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseExtremum.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseFill.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseFilter.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseFind.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseFindIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseFlatten.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseFor.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseForIn.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseForOwn.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseForOwnRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseForRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseFunctions.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseGet.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseIndexOf.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseIsEqual.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseIsEqualDeep.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseIsFunction.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseIsMatch.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseLodash.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseMap.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseMatches.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseMatchesProperty.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseMerge.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseMergeDeep.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseProperty.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/basePropertyDeep.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/basePullAt.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseRandom.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseReduce.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseSetData.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseSlice.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseSome.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseSortBy.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseSortByOrder.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseSum.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseToString.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseUniq.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseValues.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseWhile.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/baseWrapperValue.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/binaryIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/binaryIndexBy.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/bindCallback.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/bufferClone.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/cacheIndexOf.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/cachePush.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/charsLeftIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/charsRightIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/compareAscending.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/compareMultiple.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/composeArgs.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/composeArgsRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createAggregator.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createAssigner.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createBaseEach.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createBaseFor.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createBindWrapper.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createCache.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createCompounder.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createCtorWrapper.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createCurry.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createDefaults.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createExtremum.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createFind.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createFindIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createFindKey.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createFlow.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createForEach.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createForIn.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createForOwn.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createHybridWrapper.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createObjectMapper.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createPadDir.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createPadding.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createPartial.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createPartialWrapper.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createReduce.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createRound.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createSortedIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/createWrapper.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/deburrLetter.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/equalArrays.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/equalByTag.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/equalObjects.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/escapeHtmlChar.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/escapeRegExpChar.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/escapeStringChar.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/getData.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/getFuncName.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/getLength.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/getMatchData.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/getNative.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/getView.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/indexOfNaN.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/initCloneArray.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/initCloneByTag.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/initCloneObject.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/invokePath.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/isArrayLike.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/isIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/isIterateeCall.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/isKey.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/isLaziable.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/isLength.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/isObjectLike.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/isSpace.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/isStrictComparable.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/lazyClone.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/lazyReverse.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/lazyValue.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/mapDelete.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/mapGet.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/mapHas.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/mapSet.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/mergeData.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/mergeDefaults.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/metaMap.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/pickByArray.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/pickByCallback.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/reEscape.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/reEvaluate.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/reInterpolate.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/realNames.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/reorder.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/replaceHolders.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/setData.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/shimKeys.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/sortedUniq.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/toIterable.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/toObject.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/toPath.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/trimmedLeftIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/trimmedRightIndex.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/unescapeHtmlChar.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/internal/wrapperClone.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/clone.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/cloneDeep.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/eq.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/gt.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/gte.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isArguments.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isArray.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isBoolean.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isDate.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isElement.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isEmpty.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isEqual.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isError.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isFinite.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isFunction.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isMatch.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isNaN.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isNative.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isNull.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isNumber.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isObject.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isPlainObject.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isRegExp.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isString.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isTypedArray.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/isUndefined.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/lt.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/lte.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/toArray.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/lang/toPlainObject.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/math.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/math/add.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/math/ceil.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/math/floor.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/math/max.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/math/min.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/math/round.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/math/sum.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/number.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/number/inRange.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/number/random.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/assign.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/create.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/defaults.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/defaultsDeep.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/extend.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/findKey.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/findLastKey.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/forIn.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/forInRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/forOwn.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/forOwnRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/functions.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/get.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/has.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/invert.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/keys.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/keysIn.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/mapKeys.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/mapValues.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/merge.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/methods.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/omit.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/pairs.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/pick.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/result.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/set.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/transform.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/values.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/object/valuesIn.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/package.json create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/camelCase.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/capitalize.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/deburr.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/endsWith.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/escape.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/escapeRegExp.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/kebabCase.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/pad.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/padLeft.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/padRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/parseInt.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/repeat.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/snakeCase.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/startCase.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/startsWith.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/template.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/templateSettings.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/trim.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/trimLeft.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/trimRight.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/trunc.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/unescape.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/string/words.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/support.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/attempt.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/callback.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/constant.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/identity.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/iteratee.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/matches.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/matchesProperty.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/method.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/methodOf.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/mixin.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/noop.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/property.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/propertyOf.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/range.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/times.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/lodash/utility/uniqueId.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/index.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/license create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/code-point-at/index.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/code-point-at/license create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/code-point-at/package.json create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/code-point-at/readme.md create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/is-fullwidth-code-point/index.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/is-fullwidth-code-point/license create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/readme.md create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/is-fullwidth-code-point/package.json create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/is-fullwidth-code-point/readme.md create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/strip-ansi/index.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/strip-ansi/license create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/index.js create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/license create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/package.json create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/strip-ansi/node_modules/ansi-regex/readme.md create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/strip-ansi/package.json create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/node_modules/strip-ansi/readme.md create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/package.json create mode 100644 deps/npm/node_modules/cli-table2/node_modules/string-width/readme.md create mode 100644 deps/npm/node_modules/cli-table2/package.json create mode 100644 deps/npm/node_modules/cli-table2/src/cell.js create mode 100644 deps/npm/node_modules/cli-table2/src/layout-manager.js create mode 100644 deps/npm/node_modules/cli-table2/src/table.js create mode 100644 deps/npm/node_modules/cli-table2/src/utils.js create mode 100644 deps/npm/node_modules/cli-table2/test/cell-test.js create mode 100644 deps/npm/node_modules/cli-table2/test/example-tests.js create mode 100644 deps/npm/node_modules/cli-table2/test/layout-manager-test.js create mode 100644 deps/npm/node_modules/cli-table2/test/original-cli-table-index-tests.js create mode 100644 deps/npm/node_modules/cli-table2/test/original-cli-table-newlines-test.js create mode 100644 deps/npm/node_modules/cli-table2/test/table-layout-test.js create mode 100644 deps/npm/node_modules/cli-table2/test/table-test.js create mode 100644 deps/npm/node_modules/cli-table2/test/utils-test.js create mode 100644 deps/npm/node_modules/cli-table2/test/verify-legacy-compatibility-test.js delete mode 100644 deps/npm/node_modules/fstream-npm/.npmignore delete mode 100644 deps/npm/node_modules/fstream-npm/.travis.yml delete mode 100644 deps/npm/node_modules/fstream-npm/LICENSE delete mode 100644 deps/npm/node_modules/fstream-npm/README.md delete mode 100644 deps/npm/node_modules/fstream-npm/example/bundle.js delete mode 100644 deps/npm/node_modules/fstream-npm/example/dir-tar.js delete mode 100644 deps/npm/node_modules/fstream-npm/example/dir.js delete mode 100644 deps/npm/node_modules/fstream-npm/example/example.js delete mode 100644 deps/npm/node_modules/fstream-npm/example/ig-tar.js delete mode 100644 deps/npm/node_modules/fstream-npm/example/tar.js delete mode 100644 deps/npm/node_modules/fstream-npm/fstream-npm.js delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/LICENSE delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/LICENSE delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/README.md delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/minimatch.js delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/README.md delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/package.json delete mode 100644 deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json delete mode 100644 deps/npm/node_modules/fstream-npm/package.json delete mode 100644 deps/npm/node_modules/fstream-npm/test/ignores.js delete mode 100644 deps/npm/node_modules/fstream-npm/test/scoped.js delete mode 100644 deps/npm/node_modules/fstream/.npmignore delete mode 100644 deps/npm/node_modules/fstream/.travis.yml delete mode 100644 deps/npm/node_modules/fstream/LICENSE delete mode 100644 deps/npm/node_modules/fstream/README.md delete mode 100644 deps/npm/node_modules/fstream/examples/filter-pipe.js delete mode 100644 deps/npm/node_modules/fstream/examples/pipe.js delete mode 100644 deps/npm/node_modules/fstream/examples/reader.js delete mode 100644 deps/npm/node_modules/fstream/examples/symlink-write.js delete mode 100644 deps/npm/node_modules/fstream/fstream.js delete mode 100644 deps/npm/node_modules/fstream/lib/abstract.js delete mode 100644 deps/npm/node_modules/fstream/lib/collect.js delete mode 100644 deps/npm/node_modules/fstream/lib/dir-reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/dir-writer.js delete mode 100644 deps/npm/node_modules/fstream/lib/file-reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/file-writer.js delete mode 100644 deps/npm/node_modules/fstream/lib/get-type.js delete mode 100644 deps/npm/node_modules/fstream/lib/link-reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/link-writer.js delete mode 100644 deps/npm/node_modules/fstream/lib/proxy-reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/proxy-writer.js delete mode 100644 deps/npm/node_modules/fstream/lib/reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/socket-reader.js delete mode 100644 deps/npm/node_modules/fstream/lib/writer.js delete mode 100644 deps/npm/node_modules/fstream/package.json create mode 100644 deps/npm/node_modules/is-cidr/.npmignore create mode 100644 deps/npm/node_modules/is-cidr/.travis.yml create mode 100644 deps/npm/node_modules/is-cidr/README.md create mode 100644 deps/npm/node_modules/is-cidr/example/example.js create mode 100644 deps/npm/node_modules/is-cidr/lib/index.js create mode 100644 deps/npm/node_modules/is-cidr/node_modules/cidr-regex/.npmignore create mode 100644 deps/npm/node_modules/is-cidr/node_modules/cidr-regex/README.md create mode 100644 deps/npm/node_modules/is-cidr/node_modules/cidr-regex/lib/index.js create mode 100644 deps/npm/node_modules/is-cidr/node_modules/cidr-regex/package.json create mode 100644 deps/npm/node_modules/is-cidr/node_modules/cidr-regex/test.js create mode 100644 deps/npm/node_modules/is-cidr/package.json create mode 100644 deps/npm/node_modules/is-cidr/test/index.test.js create mode 100644 deps/npm/node_modules/libnpx/locales/ar.json create mode 100644 deps/npm/node_modules/libnpx/locales/id.json create mode 100644 deps/npm/node_modules/libnpx/locales/ko.json create mode 100644 deps/npm/node_modules/libnpx/locales/nb.json create mode 100644 deps/npm/node_modules/libnpx/locales/nl.json create mode 100644 deps/npm/node_modules/libnpx/locales/nn.json create mode 100644 deps/npm/node_modules/libnpx/locales/no.json create mode 100644 deps/npm/node_modules/libnpx/locales/pl.json create mode 100644 deps/npm/node_modules/libnpx/locales/sr.json create mode 100644 deps/npm/node_modules/libnpx/locales/uk.json create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/lib/stdio.js create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/CHANGELOG.md delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/hasBrokenSpawn.js delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/resolveCommand.js create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/escapeArgument.js create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/escapeCommand.js create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/readShebang.js create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/lib/util/resolveCommand.js create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/index.js create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/license create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/index.js create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/license create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/package.json create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/node_modules/shebang-regex/readme.md create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/package.json create mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/cross-spawn/node_modules/shebang-command/readme.md delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/index.js delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/license delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/package.json delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/object-assign/readme.md delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/index.js delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/license delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/index.js delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/license delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/package.json delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/node_modules/pinkie/readme.md delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/package.json delete mode 100644 deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/os-locale/node_modules/execa/node_modules/get-stream/node_modules/pinkie-promise/readme.md create mode 100644 deps/npm/node_modules/meant/.npmignore create mode 100644 deps/npm/node_modules/meant/.travis.yml create mode 100644 deps/npm/node_modules/meant/CHANGELOG.md create mode 100644 deps/npm/node_modules/meant/LICENSE create mode 100644 deps/npm/node_modules/meant/README.md create mode 100644 deps/npm/node_modules/meant/index.js create mode 100644 deps/npm/node_modules/meant/package.json create mode 100644 deps/npm/node_modules/meant/test.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/.npmignore create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/.travis.yml create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/LICENSE create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/README.md create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/examples/filter-pipe.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/examples/pipe.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/examples/reader.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/examples/symlink-write.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/fstream.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/abstract.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/collect.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-reader.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/dir-writer.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-reader.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/file-writer.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/get-type.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-reader.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/link-writer.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-reader.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/proxy-writer.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/reader.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/socket-reader.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/lib/writer.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/fstream/package.json create mode 100644 deps/npm/node_modules/node-gyp/node_modules/semver/LICENSE create mode 100644 deps/npm/node_modules/node-gyp/node_modules/semver/README.md create mode 100755 deps/npm/node_modules/node-gyp/node_modules/semver/bin/semver create mode 100644 deps/npm/node_modules/node-gyp/node_modules/semver/package.json create mode 100644 deps/npm/node_modules/node-gyp/node_modules/semver/range.bnf create mode 100644 deps/npm/node_modules/node-gyp/node_modules/semver/semver.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/.npmignore create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/.travis.yml create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/LICENSE create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/README.md create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/examples/extracter.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/examples/packer.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/examples/reader.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/buffer-entry.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry-writer.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/entry.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header-writer.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/extended-header.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/extract.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/global-header-writer.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/header.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/pack.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/lib/parse.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENCE create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/LICENSE create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/README.md create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/block-stream.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/node_modules/block-stream/package.json create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/package.json create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/tar.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/00-setup-fixtures.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/cb-never-called-1.0.1.tgz create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/dir-normalization.tar create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/error-on-broken.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/extract-move.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/extract.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/fixtures.tgz create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/header.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/pack-no-proprietary.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/pack.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/parse-discard.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/parse.js create mode 100644 deps/npm/node_modules/node-gyp/node_modules/tar/test/zz-cleanup.js create mode 100644 deps/npm/node_modules/npm-lifecycle/CHANGELOG.md create mode 100644 deps/npm/node_modules/npm-lifecycle/LICENSE create mode 100644 deps/npm/node_modules/npm-lifecycle/README.md create mode 100644 deps/npm/node_modules/npm-lifecycle/index.js create mode 100644 deps/npm/node_modules/npm-lifecycle/lib/spawn.js create mode 100644 deps/npm/node_modules/npm-lifecycle/package.json create mode 100644 deps/npm/node_modules/npm-packlist/LICENSE create mode 100644 deps/npm/node_modules/npm-packlist/README.md create mode 100644 deps/npm/node_modules/npm-packlist/index.js create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/LICENSE create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/README.md create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/index.js create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/LICENSE create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/README.md create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/minimatch.js create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/README.md create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/index.js create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/node_modules/brace-expansion/package.json create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/node_modules/minimatch/package.json create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/ignore-walk/package.json create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/npm-bundled/README.md create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/npm-bundled/index.js create mode 100644 deps/npm/node_modules/npm-packlist/node_modules/npm-bundled/package.json create mode 100644 deps/npm/node_modules/npm-packlist/package.json create mode 100644 deps/npm/node_modules/npm-profile/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/README.md create mode 100644 deps/npm/node_modules/npm-profile/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/CHANGELOG.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/agent.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/cache.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/browser.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/agent.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/https_agent.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/History.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/license.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/node4/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/misctest.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/okhttptest.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/requesttest.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/responsetest.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/revalidatetest.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/satisfytest.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/updatetest.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-cache-semantics/test/varytest.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/History.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/History.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promisify.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/auto.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise.auto.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/all.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/race.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/reject.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/resolve.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/then.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/utils.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/patch-core.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/agent-base/test/test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/.coveralls.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/CHANGELOG.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/Makefile create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/component.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/karma.conf.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/node.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/node_modules/ms/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/node_modules/ms/license.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/node_modules/ms/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/node_modules/ms/readme.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/browser.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/debug.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/inspector-log.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/node_modules/debug/src/node.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.key create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/test/ssl-cert-snakeoil.pem create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/http-proxy-agent/test/test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/History.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/History.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promisify.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/auto.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise.auto.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/all.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/race.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/reject.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/resolve.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/then.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/utils.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/patch-core.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/agent-base/test/test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.coveralls.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/CHANGELOG.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/Makefile create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/component.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/karma.conf.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/node.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/node_modules/ms/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/node_modules/ms/license.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/node_modules/ms/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/node_modules/ms/readme.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/browser.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/debug.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/inspector-log.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/node_modules/debug/src/node.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.key create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/test/ssl-cert-snakeoil.pem create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/https-proxy-agent/test/test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/CHANGELOG.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/LICENSE.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/lib/encoding.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/lib/iconv-loader.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/Changelog.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-codec.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/dbcs-data.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/internal.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-codec.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/sbcs-data.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/big5-added.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp936.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp949.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/cp950.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/eucjp.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/utf16.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/encodings/utf7.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/lib/extend-node.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/lib/index.d.ts create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/lib/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/lib/streams.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/node_modules/iconv-lite/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/encoding/test/test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/CHANGELOG.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/LICENSE.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/blob.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/common.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/fetch-error.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/headers.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/request.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/response.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/.editorconfig create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/.editorconfig create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/.eslintrc.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/bower.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/index.umd.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/test/.eslintrc.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/node_modules/err-code/test/test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/promise-retry/test/test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/History.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/dist/promisify.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/CHANGELOG.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/auto.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.auto.min.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/dist/es6-promise.min.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/es6-promise.d.ts create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise.auto.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/-internal.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/asap.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/enumerator.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/polyfill.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/all.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/race.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/reject.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/promise/resolve.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/then.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/lib/es6-promise/utils.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/node_modules/es6-promise/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/node_modules/es6-promisify/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.key create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/ssl-cert-snakeoil.pem create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/examples/associate.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/examples/bind.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/examples/connect.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/index.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/lib/socks-agent.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/lib/socks-client.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/.jscsrc create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/lib/ip.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/test/api-test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/.npmignore create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/.travis.yml create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/LICENSE create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/README.md create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/build/smartbuffer.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/build/smartbuffer.js.map create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/lib/smart-buffer.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/test/smart-buffer.test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/typings/index.d.ts create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.key create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/ssl-cert-snakeoil.pem create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/test/test.js create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/package.json create mode 100644 deps/npm/node_modules/npm-profile/node_modules/make-fetch-happen/warning.js create mode 100644 deps/npm/node_modules/npm-profile/package.json create mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/CHANGELOG.md create mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/LICENSE.md create mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/README.md create mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/index.js create mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-better-errors/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/.editorconfig delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/.npmignore delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/LICENSE delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/index.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/.npmignore delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/LICENSE delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/index.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/test/test.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/.npmignore delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/.travis.yml delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/LICENSE delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/index.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.npmignore delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.travis.yml delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/LICENSE delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/index.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/LICENSE delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/index.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test-browser.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/a/hello.txt delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/b/a/test.txt delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/c/.npmignore delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/file1 delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/file2 delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-files/file3 delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-files/file4 delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/e/directory/.ignore delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/e/file delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-fs/test/index.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/LICENSE delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/extract.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/headers.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/index.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.npmignore delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.travis.yml delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/LICENSE.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/bl.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/test/test.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/LICENSE delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/index.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/.npmignore delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/LICENCE delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/Makefile delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/README.md delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/immutable.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/mutable.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/package.json delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/test.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/pack.js delete mode 100644 deps/npm/node_modules/pacote/node_modules/tar-stream/package.json create mode 100644 deps/npm/node_modules/qrcode-terminal/.npmignore create mode 100644 deps/npm/node_modules/qrcode-terminal/.travis.yml create mode 100644 deps/npm/node_modules/qrcode-terminal/LICENSE create mode 100644 deps/npm/node_modules/qrcode-terminal/README.md create mode 100755 deps/npm/node_modules/qrcode-terminal/bin/qrcode-terminal.js create mode 100644 deps/npm/node_modules/qrcode-terminal/example/basic.js create mode 100644 deps/npm/node_modules/qrcode-terminal/example/basic.png create mode 100644 deps/npm/node_modules/qrcode-terminal/example/callback.js create mode 100644 deps/npm/node_modules/qrcode-terminal/example/small-qrcode.js create mode 100644 deps/npm/node_modules/qrcode-terminal/lib/main.js create mode 100644 deps/npm/node_modules/qrcode-terminal/package.json create mode 100644 deps/npm/node_modules/qrcode-terminal/test/main.js create mode 100644 deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js create mode 100644 deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js create mode 100644 deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js create mode 100644 deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js create mode 100644 deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js create mode 100644 deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js create mode 100644 deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js create mode 100644 deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js create mode 100644 deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js create mode 100644 deps/npm/node_modules/qrcode-terminal/vendor/QRCode/index.js create mode 100644 deps/npm/node_modules/query-string/index.js create mode 100644 deps/npm/node_modules/query-string/license create mode 100644 deps/npm/node_modules/query-string/node_modules/decode-uri-component/index.js create mode 100644 deps/npm/node_modules/query-string/node_modules/decode-uri-component/license create mode 100644 deps/npm/node_modules/query-string/node_modules/decode-uri-component/package.json create mode 100644 deps/npm/node_modules/query-string/node_modules/decode-uri-component/readme.md create mode 100644 deps/npm/node_modules/query-string/node_modules/object-assign/index.js create mode 100644 deps/npm/node_modules/query-string/node_modules/object-assign/license create mode 100644 deps/npm/node_modules/query-string/node_modules/object-assign/package.json create mode 100644 deps/npm/node_modules/query-string/node_modules/object-assign/readme.md create mode 100644 deps/npm/node_modules/query-string/node_modules/strict-uri-encode/index.js create mode 100644 deps/npm/node_modules/query-string/node_modules/strict-uri-encode/license create mode 100644 deps/npm/node_modules/query-string/node_modules/strict-uri-encode/package.json create mode 100644 deps/npm/node_modules/query-string/node_modules/strict-uri-encode/readme.md create mode 100644 deps/npm/node_modules/query-string/package.json create mode 100644 deps/npm/node_modules/query-string/readme.md create mode 100644 deps/npm/node_modules/qw/LICENSE create mode 100644 deps/npm/node_modules/qw/README.md create mode 100644 deps/npm/node_modules/qw/package.json create mode 100644 deps/npm/node_modules/qw/qw.js create mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/CHANGELOG.md create mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/LICENSE.md create mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/README.md create mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/index.js create mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/package.json delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/.editorconfig delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/.npmignore delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/LICENSE delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/README.md delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/index.js delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/.npmignore delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/LICENSE delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/README.md delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/index.js delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.json delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/package.json delete mode 100644 deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/test/test.js create mode 100644 deps/npm/node_modules/read-package-json/node_modules/slash/index.js create mode 100644 deps/npm/node_modules/read-package-json/node_modules/slash/package.json create mode 100644 deps/npm/node_modules/read-package-json/node_modules/slash/readme.md create mode 100644 deps/npm/node_modules/request/node_modules/form-data/README.md.bak create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/async.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/browser/async.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/browser/error.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/browser/promise.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/error.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/node4/async.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/node4/error.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/node4/promise.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/node6/async.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/node6/error.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/node6/promise.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/node7/async.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/node7/error.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/node7/promise.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/lib/promise.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/$data.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/async.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/compile/async.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/compile/error_classes.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/compile/validation_error.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dot/const.jst create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dot/contains.jst create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dot/propertyNames.jst delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dot/v5/_formatLimit.jst delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dot/v5/constant.jst delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dot/v5/patternRequired.jst delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dot/v5/switch.jst delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dotjs/_formatLimit.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dotjs/const.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dotjs/constant.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dotjs/contains.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dotjs/patternRequired.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dotjs/propertyNames.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/dotjs/switch.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/patternGroups.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/refs/$data.json create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/refs/json-schema-draft-06.json delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/lib/v5.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.eslintrc.yml create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.npmignore create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/.travis.yml create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/README.md create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/benchmark/.eslintrc.yml create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/benchmark/index.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/index.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/package.json create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/.eslintrc.yml create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/index.spec.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/fast-deep-equal/spec/tests.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.eslintrc.yml create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.npmignore create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/.travis.yml create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/README.md create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/index.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/package.json create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/.eslintrc.yml create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/fixtures/schema.js create mode 100644 deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/node_modules/json-schema-traverse/spec/index.spec.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/src/async.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/src/error.js delete mode 100644 deps/npm/node_modules/request/node_modules/har-validator/src/promise.js mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/hawk/.npmignore delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/.travis.yml mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/hawk/README.md delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/bower.json create mode 100755 deps/npm/node_modules/request/node_modules/hawk/client.js delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/component.json create mode 100644 deps/npm/node_modules/request/node_modules/hawk/dist/browser.js delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/dist/client.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/example/usage.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/images/hawk.png delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/images/logo.png delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/.npmignore delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/CONTRIBUTING.md mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/README.md delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/images/boom.png delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md create mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/node_modules/boom/LICENSE create mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/node_modules/boom/README.md create mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/node_modules/boom/lib/index.js create mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/node_modules/boom/package.json delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/CONTRIBUTING.md delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/ignore.txt delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js delete mode 100644 deps/npm/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/.npmignore delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/.travis.yml delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/Makefile mode change 100644 => 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/README.md delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/offset.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/examples/time.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/index.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/node_modules/sntp/test/index.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/test/browser.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/test/client.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/test/crypto.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/test/index.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/test/readme.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/test/server.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/test/uri.js delete mode 100755 deps/npm/node_modules/request/node_modules/hawk/test/utils.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/CONTRIBUTING.md delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/assert-plus/AUTHORS delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/assert-plus/CHANGES.md delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/assert-plus/README.md delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/assert-plus/assert.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/assert-plus/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/.npmignore delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/Makefile.deps delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/extsprintf/examples/simple.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/.gitmodules create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/CHANGES.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/CONTRIBUTING.md delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/Makefile delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/Makefile.targ delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/examples/levels-verror.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/examples/levels-werror.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/examples/varargs.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/examples/verror.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/examples/werror.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/jsl.node.conf create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/node_modules/core-util-is/LICENSE create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/node_modules/core-util-is/README.md create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/node_modules/core-util-is/float.patch create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/node_modules/core-util-is/lib/util.js create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/node_modules/core-util-is/package.json create mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/node_modules/core-util-is/test.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/tests/tst.inherit.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/tests/tst.verror.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/jsprim/node_modules/verror/tests/tst.werror.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/AUTHORS delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/CHANGES.md delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/README.md delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/assert.js delete mode 100644 deps/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/node_modules/assert-plus/package.json delete mode 100644 deps/npm/node_modules/request/node_modules/performance-now/Makefile create mode 100644 deps/npm/node_modules/request/node_modules/performance-now/lib/performance-now.js.map create mode 100644 deps/npm/node_modules/request/node_modules/performance-now/src/index.d.ts create mode 100644 deps/npm/node_modules/request/node_modules/performance-now/test/scripts.coffee create mode 100755 deps/npm/node_modules/request/node_modules/performance-now/test/scripts/delayed-call.coffee create mode 100755 deps/npm/node_modules/request/node_modules/performance-now/test/scripts/delayed-require.coffee create mode 100755 deps/npm/node_modules/request/node_modules/performance-now/test/scripts/difference.coffee create mode 100755 deps/npm/node_modules/request/node_modules/performance-now/test/scripts/initial-value.coffee create mode 100644 deps/npm/node_modules/request/node_modules/qs/.editorconfig delete mode 100644 deps/npm/node_modules/request/node_modules/qs/.jscs.json delete mode 100644 deps/npm/node_modules/tar/.npmignore delete mode 100644 deps/npm/node_modules/tar/.travis.yml delete mode 100644 deps/npm/node_modules/tar/examples/extracter.js delete mode 100644 deps/npm/node_modules/tar/examples/packer.js delete mode 100644 deps/npm/node_modules/tar/examples/reader.js create mode 100644 deps/npm/node_modules/tar/index.js delete mode 100644 deps/npm/node_modules/tar/lib/buffer-entry.js create mode 100644 deps/npm/node_modules/tar/lib/create.js delete mode 100644 deps/npm/node_modules/tar/lib/entry-writer.js delete mode 100644 deps/npm/node_modules/tar/lib/entry.js delete mode 100644 deps/npm/node_modules/tar/lib/extended-header-writer.js delete mode 100644 deps/npm/node_modules/tar/lib/extended-header.js delete mode 100644 deps/npm/node_modules/tar/lib/global-header-writer.js create mode 100644 deps/npm/node_modules/tar/lib/high-level-opt.js create mode 100644 deps/npm/node_modules/tar/lib/large-numbers.js create mode 100644 deps/npm/node_modules/tar/lib/list.js create mode 100644 deps/npm/node_modules/tar/lib/mkdir.js create mode 100644 deps/npm/node_modules/tar/lib/pax.js create mode 100644 deps/npm/node_modules/tar/lib/read-entry.js create mode 100644 deps/npm/node_modules/tar/lib/replace.js create mode 100644 deps/npm/node_modules/tar/lib/types.js create mode 100644 deps/npm/node_modules/tar/lib/unpack.js create mode 100644 deps/npm/node_modules/tar/lib/update.js create mode 100644 deps/npm/node_modules/tar/lib/warn-mixin.js create mode 100644 deps/npm/node_modules/tar/lib/winchars.js create mode 100644 deps/npm/node_modules/tar/lib/write-entry.js delete mode 100644 deps/npm/node_modules/tar/node_modules/block-stream/LICENCE delete mode 100644 deps/npm/node_modules/tar/node_modules/block-stream/LICENSE delete mode 100644 deps/npm/node_modules/tar/node_modules/block-stream/README.md delete mode 100644 deps/npm/node_modules/tar/node_modules/block-stream/block-stream.js delete mode 100644 deps/npm/node_modules/tar/node_modules/block-stream/package.json create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/.npmignore create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/.travis.yml create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/README.md create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/b.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/bench/lib/extend-minipass.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/bench/lib/extend-through2.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/bench/lib/extend-transform.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/bench/lib/nullsink.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/bench/lib/numbers.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/bench/lib/timer.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/bench/test.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/d.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/e.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/eos.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/foo create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/index.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/minipass-benchmarks.xlsx create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/package.json create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/test/basic.js create mode 100644 deps/npm/node_modules/tar/node_modules/minipass/test/empty-end.js create mode 100644 deps/npm/node_modules/tar/node_modules/minizlib/LICENSE create mode 100644 deps/npm/node_modules/tar/node_modules/minizlib/README.md create mode 100644 deps/npm/node_modules/tar/node_modules/minizlib/constants.js create mode 100644 deps/npm/node_modules/tar/node_modules/minizlib/index.js create mode 100644 deps/npm/node_modules/tar/node_modules/minizlib/package.json create mode 100644 deps/npm/node_modules/tar/node_modules/yallist/LICENSE create mode 100644 deps/npm/node_modules/tar/node_modules/yallist/README.md create mode 100644 deps/npm/node_modules/tar/node_modules/yallist/iterator.js create mode 100644 deps/npm/node_modules/tar/node_modules/yallist/package.json create mode 100644 deps/npm/node_modules/tar/node_modules/yallist/yallist.js delete mode 100644 deps/npm/node_modules/tar/tar.js delete mode 100644 deps/npm/node_modules/tar/test/00-setup-fixtures.js delete mode 100644 deps/npm/node_modules/tar/test/cb-never-called-1.0.1.tgz delete mode 100644 deps/npm/node_modules/tar/test/dir-normalization.js delete mode 100644 deps/npm/node_modules/tar/test/dir-normalization.tar delete mode 100644 deps/npm/node_modules/tar/test/error-on-broken.js delete mode 100644 deps/npm/node_modules/tar/test/extract-move.js delete mode 100644 deps/npm/node_modules/tar/test/extract.js delete mode 100644 deps/npm/node_modules/tar/test/fixtures.tgz delete mode 100644 deps/npm/node_modules/tar/test/header.js delete mode 100644 deps/npm/node_modules/tar/test/pack-no-proprietary.js delete mode 100644 deps/npm/node_modules/tar/test/pack.js delete mode 100644 deps/npm/node_modules/tar/test/parse-discard.js delete mode 100644 deps/npm/node_modules/tar/test/parse.js delete mode 100644 deps/npm/node_modules/tar/test/zz-cleanup.js create mode 100644 deps/npm/node_modules/worker-farm/index.d.ts create mode 100644 deps/npm/test/tap/help.js create mode 100644 deps/npm/test/tap/install-windows-newlines.js create mode 100644 deps/npm/test/tap/lifecycle-INIT_CWD.js delete mode 100644 deps/npm/test/tap/lifecycle.js create mode 100644 deps/npm/test/tap/prune-dev-dep-with-bins.js create mode 100644 deps/npm/test/tap/version-commit-hooks-default.js create mode 100644 deps/npm/test/tap/version-commit-hooks.js (limited to 'deps/npm') diff --git a/deps/npm/.mailmap b/deps/npm/.mailmap index 7c092c41ca..86d870d26b 100644 --- a/deps/npm/.mailmap +++ b/deps/npm/.mailmap @@ -32,6 +32,7 @@ Jake Verbaten James Sanders James Treworgy Jason Smith +Joshua Bennett Jonas Weber Julien Meddah Kevin Lorenz diff --git a/deps/npm/.travis.yml b/deps/npm/.travis.yml index e63df7e47b..8d24a458c1 100644 --- a/deps/npm/.travis.yml +++ b/deps/npm/.travis.yml @@ -25,9 +25,6 @@ matrix: script: - "standard" - "node . run tap -- \"test/tap/*.js\" \"test/broken-under-nyc/*.js\"" -before_install: - # required by test/tap/registry.js - - "mkdir -p /var/run/couchdb" notifications: slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8 cache: diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS index 07f44ab1c1..9f3aadba0e 100644 --- a/deps/npm/AUTHORS +++ b/deps/npm/AUTHORS @@ -424,7 +424,7 @@ Daniel Paz-Soldan Sakthipriyan Vairamani Zach Renner Christopher Hiller -legodude17 +Joshua Bennett Andrew Meyer Michael Jasper Max @@ -503,3 +503,26 @@ Sanketh Katta Tim Needham leonardo rojas Mark Peter Fejes +Ryan Florence +MichaelQQ +Anders D. Johnson +Benjamin Fernandes +Simon Kurtz +David Goss +Luis Gustavo Pereira +Amos Wenger +Samuel Marks +Victor Travieso +legodude17 +Joshua Chaitin-Pollak +Brendan Warkentin +Scott Santucci +Xavier Cambar +Vikram +Igor Nadj +Tong Li +tripu +Carsten Brandt +Marcin Szczepanski +Josh Clow +Jakub Holy diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md index 0571c17272..1c650d724b 100644 --- a/deps/npm/CHANGELOG.md +++ b/deps/npm/CHANGELOG.md @@ -1,3 +1,402 @@ +## v5.5.1 (2017-10-04): + +A very quick, record time, patch release, of a bug fix to a (sigh) last minute bug fix. + +* [`e628e058b`](https://github.com/npm/npm/commit/e628e058b) + Fix login to properly recognize OTP request and store bearer tokens. + ([@Rebecca Turner](https://github.com/Rebecca Turner)) + +## v5.5.0 (2017-10-04): + +Hey y'all, this is a big new feature release! We've got some security +related goodies plus a some quality-of-life improvements for anyone who uses +the public registry (so, virtually everyone). + +The changes largely came together in one piece, so I'm just gonna leave the commit line here: + +* [`f6ebf5e8b`](https://github.com/npm/npm/commit/f6ebf5e8bd6a212c7661e248c62c423f2b54d978) + [`f97ad6a38`](https://github.com/npm/npm/commit/f97ad6a38412581d059108ea29be470acb4fa510) + [`f644018e6`](https://github.com/npm/npm/commit/f644018e6ef1ff7523c6ec60ae55a24e87a9d9ae) + [`8af91528c`](https://github.com/npm/npm/commit/8af91528ce6277cd3a8c7ca8c8102671baf10d2f) + [`346a34260`](https://github.com/npm/npm/commit/346a34260b5fba7de62717135f3e083cc4820853) + Two factor authentication, profile editing and token management. + ([@iarna](https://github.com/iarna)) + +### TWO FACTOR AUTHENTICATION + +You can now enable two-factor authentication for your npm account. You can +even do it from the CLI. In fact, you have to, for the time being: + +``` +npm profile enable-tfa +``` + +With the default two-factor authentication mode you'll be prompted to enter +a one-time password when logging in, when publishing and when modifying access rights to +your modules. + +### TOKEN MANAGEMENT + +You can now create, list and delete authentication tokens from the comfort +of the command line. Authentication tokens created this way can have NEW +restrictions placed on them. For instance, you can create a `read-only` +token to give to your CI. It will be able to download your private modules +but it won't be able to publish or modify modules. You can also create +tokens that can only be used from certain network addresses. This way you +can lock down access to your corporate VPN or other trusted machines. + +Deleting tokens isn't new, you could [do it via the +website](https://www.npmjs.com/settings/tokens) but now you can do it via +the CLI as well. + +### CHANGE YOUR PASSWORD, SET YOUR EMAIL + +You can finally change your password from the CLI with `npm profile set +password`! You can also update your email address with `npm profile set +email
`. If you change your email address we'll send you a new +verification email so you verify that its yours. + +### AND EVERYTHING ELSE ON YOUR PROFILE + +You can also update all of the other attributes of your profile that +previously you could only update via the website: `fullname`, `homepage`, +`freenode`, `twitter` and `github`. + +### AVAILABLE STAND ALONE + +All of these features were implemented in a stand alone library, so if you +have use for them in your own project you can find them in +[npm-profile](https://www.npmjs.com/package/npm-profile) on the registry. +There's also a little mini-cli written just for it at +[npm-profile-cli](https://www.npmjs.com/package/npm-profile-cli). You might +also be interested in the [API +documentation](https://github.com/npm/registry/tree/master/docs) for these +new features: [user profile editing](https://github.com/npm/registry/blob/master/docs/user/profile.md) and +[authentication](https://github.com/npm/registry/blob/master/docs/user/authentication.md). + +### BUG FIXES + +* [`5ee55dc71`](https://github.com/npm/npm/commit/5ee55dc71b8b74b8418c3d5ec17483a07b3b6777) + install.sh: Drop support for upgrading from npm@1 as npm@5 can't run on + any Node.js version that ships npm@1. This fixes an issue some folks were seeing when trying + to upgrade using `curl | http://npmjs.com/install.sh`. + ([@iarna](https://github.com/iarna)) +* [`5cad1699a`](https://github.com/npm/npm/commit/5cad1699a7a0fc85ac7f77a95087a9647f75e344) + `npm-lifecycle@1.0.3` Fix a bug where when more than one lifecycle script + got queued to run, npm would crash. + ([@zkat](https://github.com/zkat)) +* [`cd256cbb2`](https://github.com/npm/npm/commit/cd256cbb2f97fcbcb82237e94b66eac80e493626) + `npm-packlist@1.1.9` Fix a bug where test directories would always be + excluded from published modules. + ([@isaacs](https://github.com/isaacs)) +* [`2a11f0215`](https://github.com/npm/npm/commit/2a11f021561acb1eb1ad4ad45ad955793b1eb4af) + Fix formatting of unsupported version warning + ([@iarna](https://github.com/iarna)) + +### DEPENDENCY UPDATES + +* [`6d2a285a5`](https://github.com/npm/npm/commit/6d2a285a58655f10834f64d38449eb1f3c8b6c47) + `npm-registry-client@8.5.0` +* [`69e64e27b`](https://github.com/npm/npm/commit/69e64e27bf58efd0b76b3cf6e8182c77f8cc452f) + `request@2.83.0` +* [`34e0f4209`](https://github.com/npm/npm/commit/34e0f42090f6153eb5462f742e402813e4da56c8) + `abbrev@1.1.1` +* [`10d31739d`](https://github.com/npm/npm/commit/10d31739d39765f1f0249f688bd934ffad92f872) + `aproba@1.2.0` +* [`2b02e86c0`](https://github.com/npm/npm/commit/2b02e86c06cf2a5fe7146404f5bfd27f190ee4f4) + `meant@1.0.1` +* [`b81fff808`](https://github.com/npm/npm/commit/b81fff808ee269361d3dcf38c1b6019f1708ae02) + `rimraf@2.6.2`: + Fixes a long standing bug in rimraf's attempts to work around Windows limitations + where it owns a file and can change its perms but can't remove it without + first changing its perms. This _may_ be an improvement for Windows users of npm under + some circumstances. + ([@isaacs](https://github.com/isaacs)) + +## v5.4.2 (2017-09-14): + +This is a small bug fix release wrapping up most of the issues introduced with 5.4.0. + +### Bugs + +* [`0b28ac72d`](https://github.com/npm/npm/commit/0b28ac72d29132e9b761717aba20506854465865) + [#18458](https://github.com/npm/npm/pull/18458) + Fix a bug on Windows where rolling back of failed optional dependencies would fail. + ([@marcins](https://github.com/marcins)) +* [`3a1b29991`](https://github.com/npm/npm/commit/3a1b299913ce94fdf25ed3ae5c88fe6699b04e24) + `write-file-atomic@2.1.0` Revert update of `write-file-atomic`. There were changes made to it + that were resulting in EACCES errors for many users. + ([@iarna](https://github.com/iarna)) +* [`cd8687e12`](https://github.com/npm/npm/commit/cd8687e1257f59a253436d69e8d79a29c85d00c8) + Fix a bug where if npm decided it needed to move a module during an upgrade it would strip + out much of the `package.json`. This would result in broken trees after package updates. +* [`5bd0244ee`](https://github.com/npm/npm/commit/5bd0244eec347ce435e88ff12148c35da7c69efe) + [#18385](https://github.com/npm/npm/pull/18385) + Fix `npm outdated` when run on non-registry dependencies. + ([@joshclow](https://github.com/joshclow)) + ([@iarna](https://github.com/iarna)) + +### Ux + +* [`339f17b1e`](https://github.com/npm/npm/commit/339f17b1e6816eccff7df97875db33917eccdd13) + Report unsupported node versions with greater granularity. + ([@iarna](https://github.com/iarna)) + +### Docs + +* [`b2ab6f43b`](https://github.com/npm/npm/commit/b2ab6f43b8ae645134238acd8dd3083e5ba8846e) + [#18397](https://github.com/npm/npm/pull/18397) + Document that the default loglevel with `npm@5` is `notice`. + ([@KenanY](https://github.com/KenanY)) +* [`e5aedcd82`](https://github.com/npm/npm/commit/e5aedcd82af81fa9e222f9210f6f890c72a18dd3) + [#18372](https://github.com/npm/npm/pull/18372) + In npm-config documentation, note that env vars use \_ in place of -. + ([@jakubholynet](https://github.com/jakubholynet)) + +## v5.4.1 (2017-09-06): + +This is a very small bug fix release to fix a problem where permissions on +installed binaries were being set incorrectly. + +* [`767ff6eee`](https://github.com/npm/npm/commit/767ff6eee7fa3a0f42ad677dedc0ec1f0dc15e7c) + [zkat/pacote#117](https://github.com/zkat/pacote/pull/117) + [#18324](https://github.com/npm/npm/issues/18324) + `pacote@6.0.2` + ([@zkat](https://github.com/zkat)) + +## v5.4.0 (2017-08-22): + +Here's another ~~small~~ big release, with a ~~handful~~ bunch of fixes and +a couple of ~~small~~ new features! This release has been incubating rather +longer than usual and it's grown quite a bit in that time. I'm also excited +to say that it has contributions from **27** different folks, which is a new +record for us. Our previous record was 5.1.0 at 21. Before that the record +had been held by 1.3.16 since _December of 2013_. + +![chart of contributor counts by version, showing an increasing rate over time and spikes mid in the 1.x series and later at 5.x](https://pbs.twimg.com/media/DH38rbZUwAAf9hS.jpg) + +If you can't get enough of the bleeding edge, I encourage you to check out +our canary release of npm. Get it with `npm install -g npmc`. It's going to +be seeing some exciting stuff in the next couple of weeks, starting with a +rewriten `npm dedupe`, but moving on to… well, you'll just have to wait and +find out. + +### PERFORMANCE + +* [`d080379f6`](https://github.com/npm/npm/commit/d080379f620c716afa2c1d2e2ffc0a1ac3459194) + `pacote@6.0.1` Updates extract to use tar@4, which is much faster than the + older tar@2. It reduces install times by as much as 10%. + ([@zkat](https://github.com/zkat)) +* [`4cd6a1774`](https://github.com/npm/npm/commit/4cd6a1774f774506323cae5685c9ca9a10deab63) + [`0195c0a8c`](https://github.com/npm/npm/commit/0195c0a8cdf816834c2f737372194ddc576c451d) + [#16804](https://github.com/npm/npm/pull/16804) + `tar@4.0.1` Update publish to use tar@4. tar@4 brings many advantages + over tar@2: It's faster, better tested and easier to work with. It also + produces exactly the same byte-for-byte output when producing tarballs + from the same set of files. This will have some nice carry on effects for + things like caching builds from git. And finally, last but certainly not + least, upgrading to it also let's us finally eliminate `fstream`—if + you know what that is you'll know why we're so relieved. + ([@isaacs](https://github.com/isaacs)) + +### FEATURES + +* [`1ac470dd2`](https://github.com/npm/npm/commit/1ac470dd283cc7758dc37721dd6331d5b316dc99) + [#10382](https://github.com/npm/npm/pull/10382) + If you make a typo when writing a command now, npm will print a brief "did you + mean..." message with some possible alternatives to what you meant. + ([@watilde](https://github.com/watilde)) +* [`20c46228d`](https://github.com/npm/npm/commit/20c46228d8f9243910f8c343f4830d52455d754e) + [#12356](https://github.com/npm/npm/pull/12356) + When running lifecycle scripts, `INIT_CWD` will now contain the original + working directory that npm was executed from. Remember that you can use `npm + run-script` even if you're not inside your package root directory! + ([@MichaelQQ](https://github.com/MichaelQQ)) +* [`be91e1726`](https://github.com/npm/npm/commit/be91e1726e9c21c4532723e4f413b73a93dd53d1) + [`4e7c41f4a`](https://github.com/npm/npm/commit/4e7c41f4a29744a9976cc22c77eee9d44172f21e) + `libnpx@9.6.0`: Fixes a number of issues on Windows and adds support for + several more languages: Korean, Norwegian (bokmål and nynorsk), Ukrainian, + Serbian, Bahasa Indonesia, Polish, Dutch and Arabic. + ([@zkat](https://github.com/zkat)) +* [`2dec601c6`](https://github.com/npm/npm/commit/2dec601c6d5a576751d50efbcf76eaef4deff31e) + [#17142](https://github.com/npm/npm/pull/17142) + Add the new `commit-hooks` option to `npm version` so that you can disable commit + hooks when committing the version bump. + ([@faazshift](https://github.com/faazshift)) +* [`bde151902`](https://github.com/npm/npm/commit/bde15190230b5c62dbd98095311eab71f6b52321) + [#14461](https://github.com/npm/npm/pull/14461) + Make output from `npm ping` clear as to its success or failure. + ([@legodude17](https://github.com/legodude17)) + +### BUGFIXES + +* [`b6d5549d2`](https://github.com/npm/npm/commit/b6d5549d2c2d38dd0e4319c56b69ad137f0d50cd) + [#17844](https://github.com/npm/npm/pull/17844) + Make package-lock.json sorting locale-agnostic. Previously, sorting would vary + by locale, due to using `localeCompare` for key sorting. This'll give you + a little package-lock.json churn as it reshuffles things, sorry! + ([@LotharSee](https://github.com/LotharSee)) +* [`44b98b9dd`](https://github.com/npm/npm/commit/44b98b9ddcfcccf68967fdf106fca52bf0c3da4b) + [#17919](https://github.com/npm/npm/pull/17919) + Fix a crash where `npm prune --production` would fail while removing `.bin`. + ([@fasterthanlime](https://github.com/fasterthanlime)) +* [`c3d1d3ba8`](https://github.com/npm/npm/commit/c3d1d3ba82aa41dfb2bd135e6cdc59f8d33cd9fb) + [#17816](https://github.com/npm/npm/pull/17816) + Fail more smoothly when attempting to install an invalid package name. + ([@SamuelMarks](https://github.com/SamuelMarks)) +* [`55ac2fca8`](https://github.com/npm/npm/commit/55ac2fca81bf08338302dc7dc2070494e71add5c) + [#12784](https://github.com/npm/npm/pull/12784) + Guard against stack overflows when marking packages as failed. + ([@vtravieso](https://github.com/vtravieso)) +* [`597cc0e4b`](https://github.com/npm/npm/commit/597cc0e4b5e6ee719014e3171d4e966df42a275c) + [#15087](https://github.com/npm/npm/pull/15087) + Stop outputting progressbars or using color on dumb terminals. + ([@iarna](https://github.com/iarna)) +* [`7a7710ba7`](https://github.com/npm/npm/commit/7a7710ba72e6f82414653c2e7e91fea9a1aba7e2) + [#15088](https://github.com/npm/npm/pull/15088) + Don't exclude modules that are both dev & prod when using `npm ls --production`. + ([@iarna](https://github.com/iarna)) +* [`867df2b02`](https://github.com/npm/npm/commit/867df2b0214689822b87b51578e347f353be97e8) + [#18164](https://github.com/npm/npm/pull/18164) + Only do multiple procs on OSX for now. We've seen a handful of issues + relating to this in Docker and in on Windows with antivirus. + ([@zkat](https://github.com/zkat)) +* [`23540af7b`](https://github.com/npm/npm/commit/23540af7b0ec5f12bbdc1558745c8c4f0861042b) + [#18117](https://github.com/npm/npm/pull/18117) + Some package managers would write spaces to the \_from field in package.json's in the + form of `name @spec`. This was causing npm to fail to interpret them. We now handle that + correctly and doubly make sure we don't do that ourselves. + ([@IgorNadj](https://github.com/IgorNadj)) +* [`0ef320cb4`](https://github.com/npm/npm/commit/0ef320cb40222693b7367b97c60ddffabc2d58c5) + [#16634](https://github.com/npm/npm/pull/16634) + Convert any bin script with a shbang a the start to Unix line-endings. (These sorts of scripts + are not compatible with Windows line-endings even on Windows.) + ([@ScottFreeCode](https://github.com/ScottFreeCode)) +* [`71191ca22`](https://github.com/npm/npm/commit/71191ca2227694355c49dfb187104f68df5126bd) + [#16476](https://github.com/npm/npm/pull/16476) + `npm-lifecycle@1.0.2` Running an install with `--ignore-scripts` was resulting in the + the package object being mutated to have the lifecycle scripts removed from it and that + in turn was being written out to disk, causing further problems. This fixes that: + No more mutation, no more unexpected changes. + ([@addaleax](https://github.com/addaleax)) +* [`459fa9d51`](https://github.com/npm/npm/commit/459fa9d51600904ee75ed6267b159367a1209793) + [npm/read-package-json#74](https://github.com/npm/read-package-json/pull/74) + [#17802](https://github.com/npm/npm/pull/17802) + `read-package-json@2.0.1` Use unix-style slashes for generated bin + entries, which lets them be cross platform even when produced on Windows. + ([@iarna](https://github.com/iarna)) +* [`5ec72ab5b`](https://github.com/npm/npm/commit/5ec72ab5b27c5c83cee9ff568cf75a9479d4b83a) + [#18229](https://github.com/npm/npm/pull/18229) + Make install.sh find nodejs on debian. + ([@cebe](https://github.com/cebe)) + +### DOCUMENTATION + +* [`b019680db`](https://github.com/npm/npm/commit/b019680db78ae0a6dff2289dbfe9f61fccbbe824) + [#10846](https://github.com/npm/npm/pull/10846) + Remind users that they have to install missing `peerDependencies` manually. + ([@ryanflorence](https://github.com/ryanflorence)) +* [`3aee5986a`](https://github.com/npm/npm/commit/3aee5986a65add2f815b24541b9f4b69d7fb445f) + [#17898](https://github.com/npm/npm/pull/17898) + Minor punctuation fixes to the README. + ([@AndersDJohnson](https://github.com/AndersDJohnson)) +* [`e0d0a7e1d`](https://github.com/npm/npm/commit/e0d0a7e1dda2c43822b17eb71f4d51900575cc61) + [#17832](https://github.com/npm/npm/pull/17832) + Fix grammar, format, and spelling in documentation for `run-script`. + ([@simonua](https://github.com/simonua)) +* [`3fd6a5f2f`](https://github.com/npm/npm/commit/3fd6a5f2f8802a9768dba2ec32c593b5db5a878d) + [#17897](https://github.com/npm/npm/pull/17897) + Add more info about using `files` with `npm pack`/`npm publish`. + ([@davidjgoss](https://github.com/davidjgoss)) +* [`f00cdc6eb`](https://github.com/npm/npm/commit/f00cdc6eb90a0735bc3c516720de0b1428c79c31) + [#17785](https://github.com/npm/npm/pull/17785) + Add a note about filenames for certificates on Windows, which use a different + extension and file type. + ([@lgp1985](https://github.com/lgp1985)) +* [`0cea6f974`](https://github.com/npm/npm/commit/0cea6f9741243b1937abfa300c2a111d9ed79143) + [#18022](https://github.com/npm/npm/pull/18022) + Clarify usage for the `files` field in `package.json`. + ([@xcambar](https://github.com/xcambar)) +* [`a0fdd1571`](https://github.com/npm/npm/commit/a0fdd15710971234cbc57086cd1a4dc037a39471) + [#15234](https://github.com/npm/npm/pull/15234) + Clarify the behavior of the `files` array in the package-json docs. + ([@jbcpollak](https://github.com/jbcpollak)) +* [`cecd6aa5d`](https://github.com/npm/npm/commit/cecd6aa5d4dd04af765b26b749c1cd032f7eb913) + [#18137](https://github.com/npm/npm/pull/18137) + Clarify interaction between npmignore and files in package.json. + ([@supertong](https://github.com/supertong)) +* [`6b8972039`](https://github.com/npm/npm/commit/6b89720396767961001e727fc985671ce88b901b) + [#18044](https://github.com/npm/npm/pull/18044) + Corrected the typo in package-locks docs. + ([@vikramnr](https://github.com/vikramnr)) +* [`6e012924f`](https://github.com/npm/npm/commit/6e012924f99c475bc3637c86ab6a113875405fc7) + [#17667](https://github.com/npm/npm/pull/17667) + Fix description of package.json in npm-scripts docs. + ([@tripu](https://github.com/tripu)) + +### POSSIBLY INTERESTING DEPENDENCY UPDATES + +* [`48d84171a`](https://github.com/npm/npm/commit/48d84171a302fde2510b3f31e4a004c5a4d39c73) + [`f60b05d63`](https://github.com/npm/npm/commit/f60b05d6307a7c46160ce98d6f3ccba89411c4ba) + `semver@5.4.1` Perf improvements. + ([@zkat](https://github.com/zkat)) +* [`f4650b5d4`](https://github.com/npm/npm/commit/f4650b5d4b2be2c04c229cc53aa930e260af9b4e) + `write-file-atomic@2.3.0`: + Serialize writes to the same file so that results are deterministic. + Cleanup tempfiles when process is interrupted or killed. + ([@ferm10n](https://github.com/ferm10n)) + ([@iarna](https://github.com/iarna)) + +### CHORES + +* [`96d78df98`](https://github.com/npm/npm/commit/96d78df9843187bc53be2c93913e8567003ccb73) + [`80e2f4960`](https://github.com/npm/npm/commit/80e2f4960691bc5dbd8320002e4d9143784b9ce9) + [`4f49f687b`](https://github.com/npm/npm/commit/4f49f687bbd54b6a0e406936ae35593d8e971e1e) + [`07d2296b1`](https://github.com/npm/npm/commit/07d2296b10e3d8d6f079eba3a61f0258501d7161) + [`a267ab430`](https://github.com/npm/npm/commit/a267ab4309883012a9d55934533c5915e9842277) + [#18176](https://github.com/npm/npm/pull/18176) + [#18025](https://github.com/npm/npm/pull/18025) + Move the lifecycle code out of npm into a separate library, + [`npm-lifecycle`](https://github.com/npm/lifecycle). Shh, I didn't tell you this, but this + portends to some pretty cool stuff to come very soon now. + ([@mikesherov](https://github.com/mikesherov)) +* [`0933c7eaf`](https://github.com/npm/npm/commit/0933c7eaf9cfcdf56471fe4e71c403e2016973da) + [#18025](https://github.com/npm/npm/pull/18025) + Force Travis to use Precise instead of Trusty. We have issues with our + couchdb setup and Trusty. =/ + ([@mikesherov](https://github.com/mikesherov)) +* [`afb086230`](https://github.com/npm/npm/commit/afb086230223f3c4fcddee4e958d18fce5db0ff9) + [#18138](https://github.com/npm/npm/pull/18138) + Fix typos in files-and-ignores test. + ([@supertong](https://github.com/supertong)) +* [`3e6d11cde`](https://github.com/npm/npm/commit/3e6d11cde096b4ee7b07e7569b37186aa2115b1a) + [#18175](https://github.com/npm/npm/pull/18175) + Update dependencies to eliminate transitive dependencies with the WTFPL license, which + some more serious corporate lawyery types aren't super comfortable with. + ([@zkat](https://github.com/zkat)) +* [`ee4c9bd8a`](https://github.com/npm/npm/commit/ee4c9bd8ae574a0d6b24725ba6c7b718d8aaad8d) + [#16474](https://github.com/npm/npm/pull/16474) + The tests in `test/tap/lifecycle-signal.js`, as well as the features + they are testing, are partially broken. This moves them from + being skipped in CI to being disabled only for certain platforms. + In particular, because `npm` spawns its lifecycle scripts in a + shell, signals are not necessarily forwarded by the shell and + won’t cause scripts to exit; also, shells may report the signal + they receive using their exit status, rather than terminating + themselves with a signal. + ([@addaleax](https://github.com/addaleax)) +* [`9462e5d9c`](https://github.com/npm/npm/commit/9462e5d9cfbaa50218de6d0a630d6552e72ad0a8) + [#16547](https://github.com/npm/npm/pull/16547) + Remove unused file: bin/read-package-json.js + ([@metux](https://github.com/metux)) +* [`0756d687d`](https://github.com/npm/npm/commit/0756d687d4ccfcd4a7fd83db0065eceb9261befb) + [#16550](https://github.com/npm/npm/pull/16550) + The build tools for the documentation need to be built/installed + before the documents, even with parallel builds. + Make has a simple mechanism which was made exactly for that: + target dependencies. + ([@metux](https://github.com/metux)) + ## v5.3.0 (2017-07-12): As mentioned before, we're continuing to do relatively rapid, smaller releases diff --git a/deps/npm/Makefile b/deps/npm/Makefile index 53ab16a290..42b7beda93 100644 --- a/deps/npm/Makefile +++ b/deps/npm/Makefile @@ -88,12 +88,16 @@ doc-clean: html/doc \ man +## build-time tools for the documentation +build-doc-tools := node_modules/.bin/marked \ + node_modules/.bin/marked-man + # use `npm install marked-man` for this to work. -man/man1/npm-README.1: README.md scripts/doc-build.sh package.json +man/man1/npm-README.1: README.md scripts/doc-build.sh package.json $(build-doc-tools) @[ -d man/man1 ] || mkdir -p man/man1 scripts/doc-build.sh $< $@ -man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json +man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json $(build-doc-tools) @[ -d man/man1 ] || mkdir -p man/man1 scripts/doc-build.sh $< $@ @@ -106,26 +110,26 @@ man/man5/npm-json.5: man/man5/package.json.5 man/man5/npm-global.5: man/man5/npm-folders.5 cp $< $@ -man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json +man/man5/%.5: doc/files/%.md scripts/doc-build.sh package.json $(build-doc-tools) @[ -d man/man5 ] || mkdir -p man/man5 scripts/doc-build.sh $< $@ -doc/misc/npm-index.md: scripts/index-build.js package.json +doc/misc/npm-index.md: scripts/index-build.js package.json $(build-doc-tools) node scripts/index-build.js > $@ -html/doc/index.html: doc/misc/npm-index.md $(html_docdeps) +html/doc/index.html: doc/misc/npm-index.md $(html_docdeps) $(build-doc-tools) @[ -d html/doc ] || mkdir -p html/doc scripts/doc-build.sh $< $@ -man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json +man/man7/%.7: doc/misc/%.md scripts/doc-build.sh package.json $(build-doc-tools) @[ -d man/man7 ] || mkdir -p man/man7 scripts/doc-build.sh $< $@ -html/doc/README.html: README.md $(html_docdeps) +html/doc/README.html: README.md $(html_docdeps) $(build-doc-tools) @[ -d html/doc ] || mkdir -p html/doc scripts/doc-build.sh $< $@ -html/doc/cli/%.html: doc/cli/%.md $(html_docdeps) +html/doc/cli/%.html: doc/cli/%.md $(html_docdeps) $(build-doc-tools) @[ -d html/doc/cli ] || mkdir -p html/doc/cli scripts/doc-build.sh $< $@ @@ -135,11 +139,11 @@ html/doc/files/npm-json.html: html/doc/files/package.json.html html/doc/files/npm-global.html: html/doc/files/npm-folders.html cp $< $@ -html/doc/files/%.html: doc/files/%.md $(html_docdeps) +html/doc/files/%.html: doc/files/%.md $(html_docdeps) $(build-doc-tools) @[ -d html/doc/files ] || mkdir -p html/doc/files scripts/doc-build.sh $< $@ -html/doc/misc/%.html: doc/misc/%.md $(html_docdeps) +html/doc/misc/%.html: doc/misc/%.md $(html_docdeps) $(build-doc-tools) @[ -d html/doc/misc ] || mkdir -p html/doc/misc scripts/doc-build.sh $< $@ diff --git a/deps/npm/README.md b/deps/npm/README.md index ce79f41ec2..d394af73dd 100644 --- a/deps/npm/README.md +++ b/deps/npm/README.md @@ -141,12 +141,12 @@ you have chosen. ## More Docs -Check out the [docs](https://docs.npmjs.com/), +Check out the [docs](https://docs.npmjs.com/). You can use the `npm help` command to read any of them. If you're a developer, and you want to use npm to publish your program, -you should [read this](https://docs.npmjs.com/misc/developers) +you should [read this](https://docs.npmjs.com/misc/developers). ## BUGS diff --git a/deps/npm/bin/read-package-json.js b/deps/npm/bin/read-package-json.js deleted file mode 100755 index 7e62a0bd7d..0000000000 --- a/deps/npm/bin/read-package-json.js +++ /dev/null @@ -1,24 +0,0 @@ -var argv = process.argv -if (argv.length < 3) { - console.error('Usage: read-package.json [ ...]') - process.exit(1) -} - -var file = argv[2] -var readJson = require('read-package-json') - -readJson(file, function (er, data) { - if (er) throw er - if (argv.length === 3) { - console.log(data) - } else { - argv.slice(3).forEach(function (field) { - field = field.split('.') - var val = data - field.forEach(function (f) { - val = val[f] - }) - console.log(val) - }) - } -}) diff --git a/deps/npm/doc/cli/npm-access.md b/deps/npm/doc/cli/npm-access.md index aabdbe03ca..a338673c8d 100644 --- a/deps/npm/doc/cli/npm-access.md +++ b/deps/npm/doc/cli/npm-access.md @@ -60,6 +60,9 @@ You must have privileges to set the access of a package: * You have been given read-write privileges for a package, either as a member of a team or directly as an owner. +If you have two-factor authentication enabled then you'll have to pass in an +otp with `--otp` when making access changes. + If your account is not paid, then attempts to publish scoped packages will fail with an HTTP 402 status code (logically enough), unless you use `--access=public`. diff --git a/deps/npm/doc/cli/npm-config.md b/deps/npm/doc/cli/npm-config.md index aad9e0dffe..c60afc167c 100644 --- a/deps/npm/doc/cli/npm-config.md +++ b/deps/npm/doc/cli/npm-config.md @@ -6,7 +6,7 @@ npm-config(1) -- Manage the npm configuration files npm config set [-g|--global] npm config get npm config delete - npm config list [-l] + npm config list [-l] [--json] npm config edit npm get npm set [-g|--global] @@ -48,7 +48,8 @@ Echo the config value to stdout. npm config list -Show all the config settings. Use `-l` to also show defaults. +Show all the config settings. Use `-l` to also show defaults. Use `--json` +to show the settings in json format. ### delete diff --git a/deps/npm/doc/cli/npm-dist-tag.md b/deps/npm/doc/cli/npm-dist-tag.md index 8b4c170dde..14ce2d3f52 100644 --- a/deps/npm/doc/cli/npm-dist-tag.md +++ b/deps/npm/doc/cli/npm-dist-tag.md @@ -15,7 +15,9 @@ Add, remove, and enumerate distribution tags on a package: * add: Tags the specified version of the package with the specified tag, or the - `--tag` config if not specified. + `--tag` config if not specified. The tag you're adding is `latest` and you + have two-factor authentication on auth-and-writes then you'll need to include + an otp on the command line with `--otp`. * rm: Clear a tag that is no longer in use from the package. diff --git a/deps/npm/doc/cli/npm-owner.md b/deps/npm/doc/cli/npm-owner.md index 43929cb332..94010298c1 100644 --- a/deps/npm/doc/cli/npm-owner.md +++ b/deps/npm/doc/cli/npm-owner.md @@ -27,6 +27,10 @@ Note that there is only one level of access. Either you can modify a package, or you can't. Future versions may contain more fine-grained access levels, but that is not implemented at this time. +If you have two-factor authentication enabled with `auth-and-writes` then +you'll need to include an otp on the command line when changing ownership +with `--otp`. + ## SEE ALSO * npm-publish(1) diff --git a/deps/npm/doc/cli/npm-ping.md b/deps/npm/doc/cli/npm-ping.md index f0e628915e..3b2da9944b 100644 --- a/deps/npm/doc/cli/npm-ping.md +++ b/deps/npm/doc/cli/npm-ping.md @@ -8,6 +8,14 @@ npm-ping(1) -- Ping npm registry ## DESCRIPTION Ping the configured or given npm registry and verify authentication. +If it works it will output something like: +``` +Ping success: {*Details about registry*} +``` +otherwise you will get: +``` +Ping error: {*Detail about error} +``` ## SEE ALSO diff --git a/deps/npm/doc/cli/npm-profile.md b/deps/npm/doc/cli/npm-profile.md new file mode 100644 index 0000000000..31e8b7e8ef --- /dev/null +++ b/deps/npm/doc/cli/npm-profile.md @@ -0,0 +1,74 @@ +npm-profile(1) -- Change settings on your registry profile +========================================================== + +## SYNOPSIS + + npm profile get [--json|--parseable] [] + npm profile set [--json|--parseable] + npm profile set password + npm profile enable-2fa [auth-and-writes|auth-only] + npm profile disable-2fa + +## DESCRIPTION + +Change your profile information on the registry. This not be available if +you're using a non-npmjs registry. + +* `npm profile get []`: + Display all of the properties of your profile, or one or more specific + properties. It looks like: + +``` ++-----------------+---------------------------+ +| name | example | ++-----------------+---------------------------+ +| email | me@example.com (verified) | ++-----------------+---------------------------+ +| two factor auth | auth-and-writes | ++-----------------+---------------------------+ +| fullname | Example User | ++-----------------+---------------------------+ +| homepage | | ++-----------------+---------------------------+ +| freenode | | ++-----------------+---------------------------+ +| twitter | | ++-----------------+---------------------------+ +| github | | ++-----------------+---------------------------+ +| created | 2015-02-26T01:38:35.892Z | ++-----------------+---------------------------+ +| updated | 2017-10-02T21:29:45.922Z | ++-----------------+---------------------------+ +``` + +* `npm profile set `: + Set the value of a profile property. You can set the following properties this way: + email, fullname, homepage, freenode, twitter, github + +* `npm profile set password`: + Change your password. This is interactive, you'll be prompted for your + current password and a new password. You'll also be prompted for an OTP + if you have two-factor authentication enabled. + +* `npm profile enable-2fa [auth-and-writes|auth-only]`: + Enables two-factor authentication. Defaults to `auth-and-writes` mode. Modes are: + * `auth-only`: Require an OTP when logging in or making changes to your + account's authentication. The OTP will be required on both the website + and the command line. + * `auth-and-writes`: Requires an OTP at all the times `auth-only` does, and also requires one when + publishing a module, setting the `latest` dist-tag, or changing access + via `npm access` and `npm owner`. + +* `npm profile disable-2fa`: + Disables two-factor authentication. + +## DETAILS + +All of the `npm profile` subcommands accept `--json` and `--parseable` and +will tailor their output based on those. Some of these commands may not be +available on non npmjs.com registries. + +## SEE ALSO + +* npm-config(7) diff --git a/deps/npm/doc/cli/npm-publish.md b/deps/npm/doc/cli/npm-publish.md index 892786b61d..7e173ec00a 100644 --- a/deps/npm/doc/cli/npm-publish.md +++ b/deps/npm/doc/cli/npm-publish.md @@ -4,7 +4,7 @@ npm-publish(1) -- Publish a package ## SYNOPSIS - npm publish [|] [--tag ] [--access ] + npm publish [|] [--tag ] [--access ] [--otp otpcode] Publishes '.' if no argument supplied Sets tag 'latest' if no --tag specified @@ -41,6 +41,11 @@ specifying a different default registry or using a `npm-scope(7)` in the name If you don't have a paid account, you must publish with `--access public` to publish scoped packages. +* `[--otp ]` + If you have two-factor authentication enabled in `auth-and-writes` mode + then you can provide a code from your authenticator with this. If you + don't include this and you're running from a TTY then you'll be prompted. + Fails if the package name and version combination already exists in the specified registry. @@ -65,3 +70,4 @@ packs them into a tarball to be uploaded to the registry. * npm-deprecate(1) * npm-dist-tag(1) * npm-pack(1) +* npm-profile(1) diff --git a/deps/npm/doc/cli/npm-run-script.md b/deps/npm/doc/cli/npm-run-script.md index b79d58fb01..c1ce342953 100644 --- a/deps/npm/doc/cli/npm-run-script.md +++ b/deps/npm/doc/cli/npm-run-script.md @@ -27,7 +27,7 @@ and not to any pre or post script. The `env` script is a special built-in command that can be used to list environment variables that will be available to the script at runtime. If an -"env" command is defined in your package it will take precedence over the +"env" command is defined in your package, it will take precedence over the built-in. In addition to the shell's pre-existing `PATH`, `npm run` adds @@ -38,7 +38,17 @@ you should write: "scripts": {"test": "tap test/\*.js"} -instead of `"scripts": {"test": "node_modules/.bin/tap test/\*.js"}` to run your tests. +instead of + + "scripts": {"test": "node_modules/.bin/tap test/\*.js"} + +to run your tests. + +Scripts are run from the root of the module, regardless of what your current +working directory is when you call `npm run`. If you want your script to +use different behavior based on what subdirectory you're in, you can use the +`INIT_CWD` environment variable, which holds the full path you were in when +you ran `npm run`. `npm run` sets the `NODE` environment variable to the `node` executable with which `npm` is executed. Also, if the `--scripts-prepend-node-path` is passed, diff --git a/deps/npm/doc/cli/npm-token.md b/deps/npm/doc/cli/npm-token.md new file mode 100644 index 0000000000..bc0d7596fe --- /dev/null +++ b/deps/npm/doc/cli/npm-token.md @@ -0,0 +1,59 @@ +npm-token(1) -- Manage your authentication tokens +================================================= + +## SYNOPSIS + + npm token list [--json|--parseable] + npm token create [--read-only] [--cidr=1.1.1.1/24,2.2.2.2/16] + npm token delete + +## DESCRIPTION + +This list you list, create and delete authentication tokens. + +* `npm token list`: + Shows a table of all active authentication tokens. You can request this as + JSON with `--json` or tab-separated values with `--parseable`. +``` ++--------+---------+------------+----------+----------------+ +| id | token | created | read-only | CIDR whitelist | ++--------+---------+------------+----------+----------------+ +| 7f3134 | 1fa9ba… | 2017-10-02 | yes | | ++--------+---------+------------+----------+----------------+ +| c03241 | af7aef… | 2017-10-02 | no | 192.168.0.1/24 | ++--------+---------+------------+----------+----------------+ +| e0cf92 | 3a436a… | 2017-10-02 | no | | ++--------+---------+------------+----------+----------------+ +| 63eb9d | 74ef35… | 2017-09-28 | no | | ++--------+---------+------------+----------+----------------+ +| 2daaa8 | cbad5f… | 2017-09-26 | no | | ++--------+---------+------------+----------+----------------+ +| 68c2fe | 127e51… | 2017-09-23 | no | | ++--------+---------+------------+----------+----------------+ +| 6334e1 | 1dadd1… | 2017-09-23 | no | | ++--------+---------+------------+----------+----------------+ +``` + +* `npm token create [--read-only] [--cidr=]`: + Create a new authentication token. It can be `--read-only` or accept a list of + [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) ranges to + limit use of this token to. This will prompt you for your password, and, if you have + two-factor authentication enabled, an otp. + +``` ++----------------+--------------------------------------+ +| token | a73c9572-f1b9-8983-983d-ba3ac3cc913d | ++----------------+--------------------------------------+ +| cidr_whitelist | | ++----------------+--------------------------------------+ +| readonly | false | ++----------------+--------------------------------------+ +| created | 2017-10-02T07:52:24.838Z | ++----------------+--------------------------------------+ +``` + +* `npm token delete `: + This removes an authentication token, making it immediately unusable. This can accept + both complete tokens (as you get back from `npm token create` and will + find in your `.npmrc`) and ids as seen in the `npm token list` output. + This will NOT accept the truncated token found in `npm token list` output. diff --git a/deps/npm/doc/cli/npm-version.md b/deps/npm/doc/cli/npm-version.md index e8602f453a..1381b8be4b 100644 --- a/deps/npm/doc/cli/npm-version.md +++ b/deps/npm/doc/cli/npm-version.md @@ -93,6 +93,13 @@ to the same value as the current version. Commit and tag the version change. +### commit-hooks + +* Default: true +* Type: Boolean + +Run git commit hooks when committing the version change. + ### sign-git-tag * Default: false diff --git a/deps/npm/doc/files/npm-package-locks.md b/deps/npm/doc/files/npm-package-locks.md index 73786dc91a..c57fc85658 100644 --- a/deps/npm/doc/files/npm-package-locks.md +++ b/deps/npm/doc/files/npm-package-locks.md @@ -92,7 +92,7 @@ which will look something like this: } This file describes an *exact*, and more importantly *reproducible* -`node_modules` tree. Once it's present, and future installation will base its +`node_modules` tree. Once it's present, any future installation will base its work off this file, instead of recalculating dependency versions off package.json(5). diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md index 1b2b04fe2f..071d23a415 100644 --- a/deps/npm/doc/files/package.json.md +++ b/deps/npm/doc/files/package.json.md @@ -168,14 +168,23 @@ npm also sets a top-level "maintainers" field with your npm user info. ## files -The "files" field is an array of files to include in your project. If -you name a folder in the array, then it will also include the files -inside that folder. (Unless they would be ignored by another rule.) - -You can also provide a ".npmignore" file in the root of your package or -in subdirectories, which will keep files from being included, even -if they would be picked up by the files array. The `.npmignore` file -works just like a `.gitignore`. +The optional "files" field is an array of file patterns that describes +the entries to be included when your package is installed as a +dependency. If the files array is omitted, everything except +automatically-excluded files will be included in your publish. If you +name a folder in the array, then it will also include the files inside +that folder (unless they would be ignored by another rule in this +section.). + +You can also provide a `.npmignore` file in the root of your package or +in subdirectories, which will keep files from being included. At the +root of your package it will not override the "files" field, but in +subdirectories it will. The `.npmignore` file works just like a +`.gitignore`. If there is a `.gitignore` file, and `.npmignore` is +missing, `.gitignore`'s contents will be used instead. + +Files included with the "package.json#files" field _cannot_ be excluded +through `.npmignore` or `.gitignore`. Certain files are always included, regardless of settings: diff --git a/deps/npm/doc/misc/npm-config.md b/deps/npm/doc/misc/npm-config.md index dd0993d6bb..3c9ec38817 100644 --- a/deps/npm/doc/misc/npm-config.md +++ b/deps/npm/doc/misc/npm-config.md @@ -31,6 +31,9 @@ npm will set its own environment variables and Node will prefer those lowercase versions over any uppercase ones that you might set. For details see [this issue](https://github.com/npm/npm/issues/14528). +Notice that you need to use underscores instead of dashes, so `--allow-same-version` +would become `npm_config_allow_same_version=true`. + ### npmrc Files The four relevant files are: @@ -184,7 +187,7 @@ The browser that is called by the `npm docs` command to open websites. * Type: String, Array or null The Certificate Authority signing certificate that is trusted for SSL -connections to the registry. Values should be in PEM format with newlines +connections to the registry. Values should be in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\n". For example: ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----" @@ -260,12 +263,19 @@ Number of ms to wait for cache lock files to expire. * Type: String A client certificate to pass when accessing the registry. Values should be in -PEM format with newlines replaced by the string "\n". For example: +PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\n". For example: cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----" It is _not_ the path to a certificate file (and there is no "certfile" option). +### cidr + +* Default: `null` +* Type: String, Array, null + +This is a list of CIDR address to be used when configuring limited access tokens with the `npm token create` command. + ### color * Default: true @@ -389,6 +399,13 @@ the git binary. Tag the commit when using the `npm version` command. +### commit-hooks + +* Default: `true` +* Type: Boolean + +Run git commit hooks when using the `npm version` command. + ### global * Default: false @@ -576,15 +593,15 @@ to the npm registry. Must be IPv4 in versions of Node prior to 0.12. ### loglevel -* Default: "warn" +* Default: "notice" * Type: String -* Values: "silent", "error", "warn", "http", "info", "verbose", "silly" +* Values: "silent", "error", "warn", "notice", "http", "timing", "info", + "verbose", "silly" What level of logs to report. On failure, *all* logs are written to `npm-debug.log` in the current working directory. -Any logs of a higher level than the setting are shown. -The default is "warn", which shows warn and error output. +Any logs of a higher level than the setting are shown. The default is "notice". ### logstream @@ -689,6 +706,14 @@ Attempt to install packages in the `optionalDependencies` object. Note that if these packages fail to install, the overall installation process is not aborted. +### otp + +* Default: null +* Type: Number + +This is a one-time password from a two-factor authenticator. It's needed +when publishing or changing package permissions with `npm access`. + ### package-lock * Default: true @@ -754,18 +779,6 @@ operations, if `process.stderr` is a TTY. Set to `false` to suppress the progress bar. -### proprietary-attribs - -* Default: true -* Type: Boolean - -Whether or not to include proprietary extended attributes in the -tarballs created by npm. - -Unless you are expecting to unpack package tarballs with something other -than npm -- particularly a very outdated tar implementation -- leave -this as true. - ### proxy * Default: null @@ -775,6 +788,13 @@ A proxy to use for outgoing http requests. If the `HTTP_PROXY` or `http_proxy` environment variables are set, proxy settings will be honored by the underlying `request` library. +### read-only + +* Default: false +* Type: Boolean + +This is used to mark a token as unable to publish when configuring limited access tokens with the `npm token create` command. + ### rebuild-bundle * Default: true diff --git a/deps/npm/doc/misc/npm-developers.md b/deps/npm/doc/misc/npm-developers.md index e8df1ed7b9..2f54b98fb9 100644 --- a/deps/npm/doc/misc/npm-developers.md +++ b/deps/npm/doc/misc/npm-developers.md @@ -140,6 +140,19 @@ The following paths and files are never ignored, so adding them to * `CHANGELOG` (and its variants) * `LICENSE` / `LICENCE` +If, given the structure of your project, you find `.npmignore` to be a +maintenance headache, you might instead try populating the `files` +property of `package.json`, which is an array of file or directory names +that should be included in your package. Sometimes a whitelist is easier +to manage than a blacklist. + +### Testing whether your `.npmignore` or `files` config works + +If you want to double check that your package will include only the files +you intend it to when published, you can run the `npm pack` command locally +which will generate a tarball in the working directory, the same way it +does for publishing. + ## Link Packages `npm link` is designed to install a development package and see the diff --git a/deps/npm/doc/misc/npm-index.md b/deps/npm/doc/misc/npm-index.md index ed478d84ad..64fb25de2e 100644 --- a/deps/npm/doc/misc/npm-index.md +++ b/deps/npm/doc/misc/npm-index.md @@ -129,6 +129,10 @@ Ping npm registry Display prefix +### npm-profile(1) + +Change settings on your registry profile + ### npm-prune(1) Remove extraneous packages @@ -189,6 +193,10 @@ Manage organization teams and team memberships Test a package +### npm-token(1) + +Manage your authentication tokens + ### npm-uninstall(1) Remove a package diff --git a/deps/npm/doc/misc/npm-scripts.md b/deps/npm/doc/misc/npm-scripts.md index 9cdf588397..259bf28a6b 100644 --- a/deps/npm/doc/misc/npm-scripts.md +++ b/deps/npm/doc/misc/npm-scripts.md @@ -3,7 +3,7 @@ npm-scripts(7) -- How npm handles the "scripts" field ## DESCRIPTION -npm supports the "scripts" property of the package.json script, for the +npm supports the "scripts" property of the package.json file, for the following scripts: * prepublish: diff --git a/deps/npm/doc/misc/semver.md b/deps/npm/doc/misc/semver.md index 508d54403d..993621a6fd 100644 --- a/deps/npm/doc/misc/semver.md +++ b/deps/npm/doc/misc/semver.md @@ -1,55 +1,65 @@ semver(7) -- The semantic versioner for npm =========================================== +## Install + +```bash +npm install --save semver +```` + ## Usage - $ npm install semver - $ node - var semver = require('semver') +As a node module: - semver.valid('1.2.3') // '1.2.3' - semver.valid('a.b.c') // null - semver.clean(' =v1.2.3 ') // '1.2.3' - semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true - semver.gt('1.2.3', '9.8.7') // false - semver.lt('1.2.3', '9.8.7') // true +```js +const semver = require('semver') + +semver.valid('1.2.3') // '1.2.3' +semver.valid('a.b.c') // null +semver.clean(' =v1.2.3 ') // '1.2.3' +semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true +semver.gt('1.2.3', '9.8.7') // false +semver.lt('1.2.3', '9.8.7') // true +``` As a command-line utility: - $ semver -h +``` +$ semver -h - SemVer 5.1.0 +SemVer 5.3.0 - A JavaScript implementation of the http://semver.org/ specification - Copyright Isaac Z. Schlueter +A JavaScript implementation of the http://semver.org/ specification +Copyright Isaac Z. Schlueter - Usage: semver [options] [ [...]] - Prints valid versions sorted by SemVer precedence +Usage: semver [options] [ [...]] +Prints valid versions sorted by SemVer precedence - Options: - -r --range - Print versions that match the specified range. +Options: +-r --range + Print versions that match the specified range. - -i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. +-i --increment [] + Increment a version by the specified level. Level can + be one of: major, minor, patch, premajor, preminor, + prepatch, or prerelease. Default level is 'patch'. + Only one version may be specified. - --preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. +--preid + Identifier to be used to prefix premajor, preminor, + prepatch or prerelease version increments. - -l --loose - Interpret versions and ranges loosely +-l --loose + Interpret versions and ranges loosely - Program exits successfully if any valid version satisfies - all supplied ranges, and prints all satisfying versions. +Program exits successfully if any valid version satisfies +all supplied ranges, and prints all satisfying versions. - If no satisfying versions are found, then exits failure. +If no satisfying versions are found, then exits failure. - Versions are printed in ascending order, so supplying - multiple versions to the utility will just sort them. +Versions are printed in ascending order, so supplying +multiple versions to the utility will just sort them. +``` ## Versions @@ -126,20 +136,20 @@ The method `.inc` takes an additional `identifier` string argument that will append the value of the string as a prerelease identifier: ```javascript -> semver.inc('1.2.3', 'prerelease', 'beta') -'1.2.4-beta.0' +semver.inc('1.2.3', 'prerelease', 'beta') +// '1.2.4-beta.0' ``` command-line example: -```shell +```bash $ semver 1.2.3 -i prerelease --preid beta 1.2.4-beta.0 ``` Which then can be used to increment further: -```shell +```bash $ semver 1.2.4-beta.0 -i prerelease 1.2.4-beta.1 ``` @@ -296,6 +306,8 @@ strings that they parse. * `major(v)`: Return the major version number. * `minor(v)`: Return the minor version number. * `patch(v)`: Return the patch version number. +* `intersects(r1, r2, loose)`: Return true if the two supplied ranges + or comparators intersect. ### Comparison @@ -319,6 +331,9 @@ strings that they parse. (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), or null if the versions are the same. +### Comparators + +* `intersects(comparator)`: Return true if the comparators intersect ### Ranges @@ -337,6 +352,7 @@ strings that they parse. the bounds of the range in either the high or low direction. The `hilo` argument must be either the string `'>'` or `'<'`. (This is the function called by `gtr` and `ltr`.) +* `intersects(range)`: Return true if any of the ranges comparators intersect Note that, since ranges may be non-contiguous, a version might not be greater than a range, less than a range, *or* satisfy a range! For diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html index 437c78dc8e..296bbb0697 100644 --- a/deps/npm/html/doc/README.html +++ b/deps/npm/html/doc/README.html @@ -94,10 +94,10 @@ must remove them yourself manually if you want them gone. Note that this means that future npm installs will not remember the settings that you have chosen.

More Docs

-

Check out the docs,

+

Check out the docs.

You can use the npm help command to read any of them.

If you're a developer, and you want to use npm to publish your program, -you should read this

+you should read this.

BUGS

When you find issues, please report them:

    @@ -127,5 +127,5 @@ doubt tell you to put the output in a gist or email.

           - + diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html index 4824196bf5..ab140aade0 100644 --- a/deps/npm/html/doc/cli/npm-access.html +++ b/deps/npm/html/doc/cli/npm-access.html @@ -61,6 +61,8 @@ public using npm publish --access=public, or set their access as pu
  • You have been given read-write privileges for a package, either as a member of a team or directly as an owner.
+

If you have two-factor authentication enabled then you'll have to pass in an +otp with --otp when making access changes.

If your account is not paid, then attempts to publish scoped packages will fail with an HTTP 402 status code (logically enough), unless you use --access=public.

@@ -84,5 +86,5 @@ with an HTTP 402 status code (logically enough), unless you use        - + diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html index 8297188343..282d6268b7 100644 --- a/deps/npm/html/doc/cli/npm-adduser.html +++ b/deps/npm/html/doc/cli/npm-adduser.html @@ -81,5 +81,5 @@ username/password entry in legacy npm.

       - + diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html index 5baf48529c..9af0c17e26 100644 --- a/deps/npm/html/doc/cli/npm-bin.html +++ b/deps/npm/html/doc/cli/npm-bin.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html index 65001a407e..069bcf2938 100644 --- a/deps/npm/html/doc/cli/npm-bugs.html +++ b/deps/npm/html/doc/cli/npm-bugs.html @@ -55,5 +55,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html index 33d0c896c2..091b28bb17 100644 --- a/deps/npm/html/doc/cli/npm-build.html +++ b/deps/npm/html/doc/cli/npm-build.html @@ -40,5 +40,5 @@ directly, run:

       - + diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html index 1860157fb8..7b4e0c7193 100644 --- a/deps/npm/html/doc/cli/npm-bundle.html +++ b/deps/npm/html/doc/cli/npm-bundle.html @@ -31,5 +31,5 @@ install packages into the local space.

       - + diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html index de1e4ce51c..d2394086d4 100644 --- a/deps/npm/html/doc/cli/npm-cache.html +++ b/deps/npm/html/doc/cli/npm-cache.html @@ -89,5 +89,5 @@ verify.

       - + diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html index da720731c4..d947854923 100644 --- a/deps/npm/html/doc/cli/npm-completion.html +++ b/deps/npm/html/doc/cli/npm-completion.html @@ -43,5 +43,5 @@ completions based on the arguments.

       - + diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html index 5eb01b9e7c..9dfa27aa54 100644 --- a/deps/npm/html/doc/cli/npm-config.html +++ b/deps/npm/html/doc/cli/npm-config.html @@ -14,7 +14,7 @@
npm config set <key> <value> [-g|--global]
 npm config get <key>
 npm config delete <key>
-npm config list [-l]
+npm config list [-l] [--json]
 npm config edit
 npm get <key>
 npm set <key> <value> [-g|--global]
@@ -39,7 +39,8 @@ of the user and global npmrc files.

Echo the config value to stdout.

list

npm config list
-

Show all the config settings. Use -l to also show defaults.

+

Show all the config settings. Use -l to also show defaults. Use --json +to show the settings in json format.

delete

npm config delete key
 

Deletes the key from all configuration files.

@@ -67,5 +68,5 @@ global config.

       - + diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html index 169c47cb43..1349617d0d 100644 --- a/deps/npm/html/doc/cli/npm-dedupe.html +++ b/deps/npm/html/doc/cli/npm-dedupe.html @@ -61,5 +61,5 @@ result in new modules being installed.

       - + diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html index c8c0e45064..32433db75a 100644 --- a/deps/npm/html/doc/cli/npm-deprecate.html +++ b/deps/npm/html/doc/cli/npm-deprecate.html @@ -38,5 +38,5 @@ something like this:

       - + diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html index ec1697d29b..230013c3e2 100644 --- a/deps/npm/html/doc/cli/npm-dist-tag.html +++ b/deps/npm/html/doc/cli/npm-dist-tag.html @@ -21,7 +21,9 @@ aliases: dist-tags
  • add: Tags the specified version of the package with the specified tag, or the ---tag config if not specified.

    +--tag config if not specified. The tag you're adding is latest and you +have two-factor authentication on auth-and-writes then you'll need to include +an otp on the command line with --otp.

  • rm: Clear a tag that is no longer in use from the package.

    @@ -86,5 +88,5 @@ begin with a number or the letter v.

           - + diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html index 1aaae98cef..e3cd2accf3 100644 --- a/deps/npm/html/doc/cli/npm-docs.html +++ b/deps/npm/html/doc/cli/npm-docs.html @@ -56,5 +56,5 @@ the current folder and use the name property.

           - + diff --git a/deps/npm/html/doc/cli/npm-doctor.html b/deps/npm/html/doc/cli/npm-doctor.html index 28408c8eaa..4afb484fc3 100644 --- a/deps/npm/html/doc/cli/npm-doctor.html +++ b/deps/npm/html/doc/cli/npm-doctor.html @@ -103,4 +103,4 @@ cache, you should probably run npm cache clean and reset the cache.        - + diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html index 8de2342143..5a1f979d7a 100644 --- a/deps/npm/html/doc/cli/npm-edit.html +++ b/deps/npm/html/doc/cli/npm-edit.html @@ -49,5 +49,5 @@ or "notepad" on Windows.
  •        - + diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html index 83586c58eb..97f2346320 100644 --- a/deps/npm/html/doc/cli/npm-explore.html +++ b/deps/npm/html/doc/cli/npm-explore.html @@ -49,5 +49,5 @@ Windows        - + diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html index aa5c99f21a..9e69e5612a 100644 --- a/deps/npm/html/doc/cli/npm-help-search.html +++ b/deps/npm/html/doc/cli/npm-help-search.html @@ -45,5 +45,5 @@ where the terms were found in the documentation.

           - + diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html index bf82b1b6b0..3fca1c02dd 100644 --- a/deps/npm/html/doc/cli/npm-help.html +++ b/deps/npm/html/doc/cli/npm-help.html @@ -50,5 +50,5 @@ matches are equivalent to specifying a topic name.

           - + diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html index 9a1853ad64..53f555d879 100644 --- a/deps/npm/html/doc/cli/npm-init.html +++ b/deps/npm/html/doc/cli/npm-init.html @@ -48,5 +48,5 @@ defaults and not prompt you for any options.

           - + diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html index 210c21b60f..595cdd0229 100644 --- a/deps/npm/html/doc/cli/npm-install-test.html +++ b/deps/npm/html/doc/cli/npm-install-test.html @@ -42,5 +42,5 @@ takes exactly the same arguments as npm install.

           - + diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html index 227ad01d2f..2aa508a3fa 100644 --- a/deps/npm/html/doc/cli/npm-install.html +++ b/deps/npm/html/doc/cli/npm-install.html @@ -367,5 +367,5 @@ affects a real use-case, it will be investigated.

           - + diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html index ed797754f1..b93b23929f 100644 --- a/deps/npm/html/doc/cli/npm-link.html +++ b/deps/npm/html/doc/cli/npm-link.html @@ -74,5 +74,5 @@ include that scope, e.g.

           - + diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html index 123cf6e6ae..0d76cf93b3 100644 --- a/deps/npm/html/doc/cli/npm-logout.html +++ b/deps/npm/html/doc/cli/npm-logout.html @@ -51,5 +51,5 @@ it takes precedence.

           - + diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html index 7f58b006ef..06c207de00 100644 --- a/deps/npm/html/doc/cli/npm-ls.html +++ b/deps/npm/html/doc/cli/npm-ls.html @@ -21,7 +21,7 @@ installed, as well as their dependencies, in a tree-structure.

    limit the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

    -
    npm@5.3.0 /path/to/npm
    +
    npm@5.5.1 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5
     

    It will print out extraneous, missing, and invalid packages.

    @@ -110,5 +110,5 @@ project.

           - + diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html index b25aaec3d3..fb3e111220 100644 --- a/deps/npm/html/doc/cli/npm-outdated.html +++ b/deps/npm/html/doc/cli/npm-outdated.html @@ -116,5 +116,5 @@ project.

           - + diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html index 7b9980c67c..707ea4bf9d 100644 --- a/deps/npm/html/doc/cli/npm-owner.html +++ b/deps/npm/html/doc/cli/npm-owner.html @@ -32,6 +32,9 @@ privileges.

    Note that there is only one level of access. Either you can modify a package, or you can't. Future versions may contain more fine-grained access levels, but that is not implemented at this time.

    +

    If you have two-factor authentication enabled with auth-and-writes then +you'll need to include an otp on the command line when changing ownership +with --otp.

    SEE ALSO

    • npm-publish(1)
    • @@ -51,5 +54,5 @@ that is not implemented at this time.

             - + diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html index 2d66916d8b..73319eb3bf 100644 --- a/deps/npm/html/doc/cli/npm-pack.html +++ b/deps/npm/html/doc/cli/npm-pack.html @@ -41,5 +41,5 @@ overwritten the second time.

             - + diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html index 68a5e85749..9eb3be589d 100644 --- a/deps/npm/html/doc/cli/npm-ping.html +++ b/deps/npm/html/doc/cli/npm-ping.html @@ -13,8 +13,12 @@

      SYNOPSIS

      npm ping [--registry <registry>]
       

      DESCRIPTION

      -

      Ping the configured or given npm registry and verify authentication.

      -

      SEE ALSO

      +

      Ping the configured or given npm registry and verify authentication. +If it works it will output something like:

      +
      Ping success: {*Details about registry*}
      +

      otherwise you will get:

      +
      Ping error: {*Detail about error}
      +

      SEE ALSO

      • npm-config(1)
      • npm-config(7)
      • @@ -32,5 +36,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html index 2560340d5e..09bd66affe 100644 --- a/deps/npm/html/doc/cli/npm-prefix.html +++ b/deps/npm/html/doc/cli/npm-prefix.html @@ -38,5 +38,5 @@ to contain a package.json file unless -g is also specified.

               - + diff --git a/deps/npm/html/doc/cli/npm-profile.html b/deps/npm/html/doc/cli/npm-profile.html new file mode 100644 index 0000000000..106695ee84 --- /dev/null +++ b/deps/npm/html/doc/cli/npm-profile.html @@ -0,0 +1,93 @@ + + + npm-profile + + + + + + +
        + +

        npm-profile

        Change settings on your registry profile

        +

        SYNOPSIS

        +
        npm profile get [--json|--parseable] [<property>]
        +npm profile set [--json|--parseable] <property> <value>
        +npm profile set password
        +npm profile enable-2fa [auth-and-writes|auth-only]
        +npm profile disable-2fa
        +

        DESCRIPTION

        +

        Change your profile information on the registry. This not be available if +you're using a non-npmjs registry.

        +
          +
        • npm profile get [<property>]: +Display all of the properties of your profile, or one or more specific +properties. It looks like:
        • +
        +
        +-----------------+---------------------------+
        +| name            | example                   |
        ++-----------------+---------------------------+
        +| email           | me@example.com (verified) |
        ++-----------------+---------------------------+
        +| two factor auth | auth-and-writes           |
        ++-----------------+---------------------------+
        +| fullname        | Example User              |
        ++-----------------+---------------------------+
        +| homepage        |                           |
        ++-----------------+---------------------------+
        +| freenode        |                           |
        ++-----------------+---------------------------+
        +| twitter         |                           |
        ++-----------------+---------------------------+
        +| github          |                           |
        ++-----------------+---------------------------+
        +| created         | 2015-02-26T01:38:35.892Z  |
        ++-----------------+---------------------------+
        +| updated         | 2017-10-02T21:29:45.922Z  |
        ++-----------------+---------------------------+
        +
          +
        • npm profile set <property> <value>: +Set the value of a profile property. You can set the following properties this way: + email, fullname, homepage, freenode, twitter, github

          +
        • +
        • npm profile set password: +Change your password. This is interactive, you'll be prompted for your +current password and a new password. You'll also be prompted for an OTP +if you have two-factor authentication enabled.

          +
        • +
        • npm profile enable-2fa [auth-and-writes|auth-only]: +Enables two-factor authentication. Defaults to auth-and-writes mode. Modes are:

          +
            +
          • auth-only: Require an OTP when logging in or making changes to your +account's authentication. The OTP will be required on both the website +and the command line.
          • +
          • auth-and-writes: Requires an OTP at all the times auth-only does, and also requires one when +publishing a module, setting the latest dist-tag, or changing access +via npm access and npm owner.
          • +
          +
        • +
        • npm profile disable-2fa: +Disables two-factor authentication.

          +
        • +
        +

        DETAILS

        +

        All of the npm profile subcommands accept --json and --parseable and +will tailor their output based on those. Some of these commands may not be +available on non npmjs.com registries.

        +

        SEE ALSO

        + + +
        + + + + + + + + + + + diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html index a7073a9e02..0e03cd52e3 100644 --- a/deps/npm/html/doc/cli/npm-prune.html +++ b/deps/npm/html/doc/cli/npm-prune.html @@ -40,5 +40,5 @@ negate NODE_ENV being set to production.

               - + diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html index 2d3b1d1db8..14bac448e3 100644 --- a/deps/npm/html/doc/cli/npm-publish.html +++ b/deps/npm/html/doc/cli/npm-publish.html @@ -11,7 +11,7 @@

        npm-publish

        Publish a package

        SYNOPSIS

        -
        npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>]
        +
        npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>] [--otp otpcode]
         
         Publishes '.' if no argument supplied
         Sets tag 'latest' if no --tag specified
        @@ -45,6 +45,11 @@ restricted. Only applies to scoped packages, which default to restricted--access public
         to publish scoped packages.

        +
      • [--otp <otpcode>] +If you have two-factor authentication enabled in auth-and-writes mode +then you can provide a code from your authenticator with this. If you +don't include this and you're running from a TTY then you'll be prompted.

        +

      Fails if the package name and version combination already exists in the specified registry.

      @@ -66,6 +71,7 @@ packs them into a tarball to be uploaded to the registry.

    • npm-deprecate(1)
    • npm-dist-tag(1)
    • npm-pack(1)
    • +
    • npm-profile(1)
    @@ -79,5 +85,5 @@ packs them into a tarball to be uploaded to the registry.

           - + diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html index bc8ee78771..021ecf7f55 100644 --- a/deps/npm/html/doc/cli/npm-rebuild.html +++ b/deps/npm/html/doc/cli/npm-rebuild.html @@ -35,5 +35,5 @@ the new binary.

           - + diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html index e2ef9ee958..fdf446784b 100644 --- a/deps/npm/html/doc/cli/npm-repo.html +++ b/deps/npm/html/doc/cli/npm-repo.html @@ -41,5 +41,5 @@ a package.json in the current folder and use the name        - + diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html index a6648c5716..01f57667e4 100644 --- a/deps/npm/html/doc/cli/npm-restart.html +++ b/deps/npm/html/doc/cli/npm-restart.html @@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number

           - + diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html index 94b59687ab..a513f8c7a4 100644 --- a/deps/npm/html/doc/cli/npm-root.html +++ b/deps/npm/html/doc/cli/npm-root.html @@ -35,5 +35,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html index 037ad1a64c..72b946b21e 100644 --- a/deps/npm/html/doc/cli/npm-run-script.html +++ b/deps/npm/html/doc/cli/npm-run-script.html @@ -29,7 +29,7 @@ all the arguments after the -- directly to your script:

    and not to any pre or post script.

    The env script is a special built-in command that can be used to list environment variables that will be available to the script at runtime. If an -"env" command is defined in your package it will take precedence over the +"env" command is defined in your package, it will take precedence over the built-in.

    In addition to the shell's pre-existing PATH, npm run adds node_modules/.bin to the PATH provided to scripts. Any binaries provided by @@ -37,7 +37,14 @@ locally-installed dependencies can be used without the node_modules/.bindevDependency on tap in your package, you should write:

    "scripts": {"test": "tap test/\*.js"}
    -

    instead of "scripts": {"test": "node_modules/.bin/tap test/\*.js"} to run your tests.

    +

    instead of

    +
    "scripts": {"test": "node_modules/.bin/tap test/\*.js"}
    +

    to run your tests.

    +

    Scripts are run from the root of the module, regardless of what your current +working directory is when you call npm run. If you want your script to +use different behavior based on what subdirectory you're in, you can use the +INIT_CWD environment variable, which holds the full path you were in when +you ran npm run.

    npm run sets the NODE environment variable to the node executable with which npm is executed. Also, if the --scripts-prepend-node-path is passed, the directory within which node resides is added to the @@ -67,5 +74,5 @@ you will be given a warning to run npm install, just in case you        -

    + diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html index e136612e96..413da85416 100644 --- a/deps/npm/html/doc/cli/npm-search.html +++ b/deps/npm/html/doc/cli/npm-search.html @@ -109,5 +109,5 @@ setting.

           - + diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html index c68795a33f..a8d3d7e5e9 100644 --- a/deps/npm/html/doc/cli/npm-shrinkwrap.html +++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html @@ -41,5 +41,5 @@ of package locks in npm, see npm-packa        - + diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html index 7f16258c09..dd57a76118 100644 --- a/deps/npm/html/doc/cli/npm-star.html +++ b/deps/npm/html/doc/cli/npm-star.html @@ -36,5 +36,5 @@ a vaguely positive way to show that you care.

           - + diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html index cac0603d22..060faeed4b 100644 --- a/deps/npm/html/doc/cli/npm-stars.html +++ b/deps/npm/html/doc/cli/npm-stars.html @@ -36,5 +36,5 @@ you will most certainly enjoy this command.

           - + diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html index 0322627378..6cd9df603b 100644 --- a/deps/npm/html/doc/cli/npm-start.html +++ b/deps/npm/html/doc/cli/npm-start.html @@ -39,5 +39,5 @@ more details.

           - + diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html index ac2e46f74a..7e795163b8 100644 --- a/deps/npm/html/doc/cli/npm-stop.html +++ b/deps/npm/html/doc/cli/npm-stop.html @@ -34,5 +34,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html index a80d86c3ad..a24bc6558a 100644 --- a/deps/npm/html/doc/cli/npm-team.html +++ b/deps/npm/html/doc/cli/npm-team.html @@ -67,5 +67,5 @@ use the npm access command to grant or revoke the appropriate permi        - + diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html index ecbbc74b9a..1aaa8687c1 100644 --- a/deps/npm/html/doc/cli/npm-test.html +++ b/deps/npm/html/doc/cli/npm-test.html @@ -36,5 +36,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm-token.html b/deps/npm/html/doc/cli/npm-token.html new file mode 100644 index 0000000000..a2e4ce1814 --- /dev/null +++ b/deps/npm/html/doc/cli/npm-token.html @@ -0,0 +1,76 @@ + + + npm-token + + + + + + +
    + +

    npm-token

    Manage your authentication tokens

    +

    SYNOPSIS

    +
    npm token list [--json|--parseable]
    +npm token create [--read-only] [--cidr=1.1.1.1/24,2.2.2.2/16]
    +npm token delete <id|token>
    +

    DESCRIPTION

    +

    This list you list, create and delete authentication tokens.

    +
      +
    • npm token list: +Shows a table of all active authentication tokens. You can request this as +JSON with --json or tab-separated values with --parseable.

      +
      +--------+---------+------------+----------+----------------+
      +| id     | token   | created    | read-only | CIDR whitelist |
      ++--------+---------+------------+----------+----------------+
      +| 7f3134 | 1fa9ba… | 2017-10-02 | yes      |                |
      ++--------+---------+------------+----------+----------------+
      +| c03241 | af7aef… | 2017-10-02 | no       | 192.168.0.1/24 |
      ++--------+---------+------------+----------+----------------+
      +| e0cf92 | 3a436a… | 2017-10-02 | no       |                |
      ++--------+---------+------------+----------+----------------+
      +| 63eb9d | 74ef35… | 2017-09-28 | no       |                |
      ++--------+---------+------------+----------+----------------+
      +| 2daaa8 | cbad5f… | 2017-09-26 | no       |                |
      ++--------+---------+------------+----------+----------------+
      +| 68c2fe | 127e51… | 2017-09-23 | no       |                |
      ++--------+---------+------------+----------+----------------+
      +| 6334e1 | 1dadd1… | 2017-09-23 | no       |                |
      ++--------+---------+------------+----------+----------------+
      +
    • +
    • npm token create [--read-only] [--cidr=<cidr-ranges>]: +Create a new authentication token. It can be --read-only or accept a list of +CIDR ranges to +limit use of this token to. This will prompt you for your password, and, if you have +two-factor authentication enabled, an otp.

      +
    • +
    +
    +----------------+--------------------------------------+
    +| token          | a73c9572-f1b9-8983-983d-ba3ac3cc913d |
    ++----------------+--------------------------------------+
    +| cidr_whitelist |                                      |
    ++----------------+--------------------------------------+
    +| readonly       | false                                |
    ++----------------+--------------------------------------+
    +| created        | 2017-10-02T07:52:24.838Z             |
    ++----------------+--------------------------------------+
    +
      +
    • npm token delete <token|id>: +This removes an authentication token, making it immediately unusable. This can accept +both complete tokens (as you get back from npm token create and will +find in your .npmrc) and ids as seen in the npm token list output. +This will NOT accept the truncated token found in npm token list output.
    • +
    + +
    + + + + + + + + + + + diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html index 5e60ae3038..454f575ce3 100644 --- a/deps/npm/html/doc/cli/npm-uninstall.html +++ b/deps/npm/html/doc/cli/npm-uninstall.html @@ -63,5 +63,5 @@ npm uninstall lodash --no-save        - + diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html index 220efe599a..e278eb29ef 100644 --- a/deps/npm/html/doc/cli/npm-unpublish.html +++ b/deps/npm/html/doc/cli/npm-unpublish.html @@ -51,5 +51,5 @@ contact support@npmjs.com.

           - + diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html index 471db2baba..c2ee6bfe10 100644 --- a/deps/npm/html/doc/cli/npm-update.html +++ b/deps/npm/html/doc/cli/npm-update.html @@ -118,5 +118,5 @@ be downgraded.

           - + diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html index e821d71fc6..5e1d389d77 100644 --- a/deps/npm/html/doc/cli/npm-version.html +++ b/deps/npm/html/doc/cli/npm-version.html @@ -86,6 +86,12 @@ to the same value as the current version.

  • Type: Boolean

Commit and tag the version change.

+

commit-hooks

+
    +
  • Default: true
  • +
  • Type: Boolean
  • +
+

Run git commit hooks when committing the version change.

sign-git-tag

  • Default: false
  • @@ -114,5 +120,5 @@ to the same value as the current version.

           - + diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html index 9d30ff9031..691ea8ee43 100644 --- a/deps/npm/html/doc/cli/npm-view.html +++ b/deps/npm/html/doc/cli/npm-view.html @@ -86,5 +86,5 @@ the field name.

           - + diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html index 9c8b91e4d5..f4190a3682 100644 --- a/deps/npm/html/doc/cli/npm-whoami.html +++ b/deps/npm/html/doc/cli/npm-whoami.html @@ -33,5 +33,5 @@        - + diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html index 06414eebab..c6a68d7652 100644 --- a/deps/npm/html/doc/cli/npm.html +++ b/deps/npm/html/doc/cli/npm.html @@ -13,7 +13,7 @@

    SYNOPSIS

    npm <command> [args]
     

    VERSION

    -

    5.3.0

    +

    5.5.1

    DESCRIPTION

    npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency @@ -126,7 +126,7 @@ will no doubt tell you to put the output in a gist or email.

    Isaac Z. Schlueter :: isaacs :: @izs :: -i@izs.me

    +i@izs.me

    SEE ALSO

    • npm-help(1)
    • @@ -150,5 +150,5 @@ will no doubt tell you to put the output in a gist or email.

             - + diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html index 915750606c..295df46b52 100644 --- a/deps/npm/html/doc/files/npm-folders.html +++ b/deps/npm/html/doc/files/npm-folders.html @@ -181,5 +181,5 @@ cannot be found elsewhere. See packa        - + diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html index 915750606c..295df46b52 100644 --- a/deps/npm/html/doc/files/npm-global.html +++ b/deps/npm/html/doc/files/npm-global.html @@ -181,5 +181,5 @@ cannot be found elsewhere. See packa        - + diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html index 6374cc5a7d..6bf69dca1d 100644 --- a/deps/npm/html/doc/files/npm-json.html +++ b/deps/npm/html/doc/files/npm-json.html @@ -129,13 +129,21 @@ is an object with a "name" field and optionally "url" and &q

      Both email and url are optional either way.

      npm also sets a top-level "maintainers" field with your npm user info.

      files

      -

      The "files" field is an array of files to include in your project. If -you name a folder in the array, then it will also include the files -inside that folder. (Unless they would be ignored by another rule.)

      -

      You can also provide a ".npmignore" file in the root of your package or -in subdirectories, which will keep files from being included, even -if they would be picked up by the files array. The .npmignore file -works just like a .gitignore.

      +

      The optional "files" field is an array of file patterns that describes +the entries to be included when your package is installed as a +dependency. If the files array is omitted, everything except +automatically-excluded files will be included in your publish. If you +name a folder in the array, then it will also include the files inside +that folder (unless they would be ignored by another rule in this +section.).

      +

      You can also provide a .npmignore file in the root of your package or +in subdirectories, which will keep files from being included. At the +root of your package it will not override the "files" field, but in +subdirectories it will. The .npmignore file works just like a +.gitignore. If there is a .gitignore file, and .npmignore is +missing, .gitignore's contents will be used instead.

      +

      Files included with the "package.json#files" field cannot be excluded +through .npmignore or .gitignore.

      Certain files are always included, regardless of settings:

      • package.json
      • @@ -593,5 +601,5 @@ ignored.

               - + diff --git a/deps/npm/html/doc/files/npm-package-locks.html b/deps/npm/html/doc/files/npm-package-locks.html index 21029d3a9d..91b18778b9 100644 --- a/deps/npm/html/doc/files/npm-package-locks.html +++ b/deps/npm/html/doc/files/npm-package-locks.html @@ -87,7 +87,7 @@ which will look something like this:

        } }

        This file describes an exact, and more importantly reproducible -node_modules tree. Once it's present, and future installation will base its +node_modules tree. Once it's present, any future installation will base its work off this file, instead of recalculating dependency versions off package.json(5).

        The presence of a package lock changes the installation behavior such that:

        @@ -145,4 +145,4 @@ if any transitive dependencies were updated, hoisted, etc.

               - + diff --git a/deps/npm/html/doc/files/npm-shrinkwrap.json.html b/deps/npm/html/doc/files/npm-shrinkwrap.json.html index 9fdb543984..76a15983c3 100644 --- a/deps/npm/html/doc/files/npm-shrinkwrap.json.html +++ b/deps/npm/html/doc/files/npm-shrinkwrap.json.html @@ -42,4 +42,4 @@ to the manual page for package-lock.js        - + diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html index 8fe8746efb..1fbd619fb6 100644 --- a/deps/npm/html/doc/files/npmrc.html +++ b/deps/npm/html/doc/files/npmrc.html @@ -85,5 +85,5 @@ manner.

               - + diff --git a/deps/npm/html/doc/files/package-lock.json.html b/deps/npm/html/doc/files/package-lock.json.html index 3290c365da..fe2f07f427 100644 --- a/deps/npm/html/doc/files/package-lock.json.html +++ b/deps/npm/html/doc/files/package-lock.json.html @@ -124,4 +124,4 @@ on the current platform.

               - + diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html index 6374cc5a7d..6bf69dca1d 100644 --- a/deps/npm/html/doc/files/package.json.html +++ b/deps/npm/html/doc/files/package.json.html @@ -129,13 +129,21 @@ is an object with a "name" field and optionally "url" and &q

        Both email and url are optional either way.

        npm also sets a top-level "maintainers" field with your npm user info.

        files

        -

        The "files" field is an array of files to include in your project. If -you name a folder in the array, then it will also include the files -inside that folder. (Unless they would be ignored by another rule.)

        -

        You can also provide a ".npmignore" file in the root of your package or -in subdirectories, which will keep files from being included, even -if they would be picked up by the files array. The .npmignore file -works just like a .gitignore.

        +

        The optional "files" field is an array of file patterns that describes +the entries to be included when your package is installed as a +dependency. If the files array is omitted, everything except +automatically-excluded files will be included in your publish. If you +name a folder in the array, then it will also include the files inside +that folder (unless they would be ignored by another rule in this +section.).

        +

        You can also provide a .npmignore file in the root of your package or +in subdirectories, which will keep files from being included. At the +root of your package it will not override the "files" field, but in +subdirectories it will. The .npmignore file works just like a +.gitignore. If there is a .gitignore file, and .npmignore is +missing, .gitignore's contents will be used instead.

        +

        Files included with the "package.json#files" field cannot be excluded +through .npmignore or .gitignore.

        Certain files are always included, regardless of settings:

        • package.json
        • @@ -593,5 +601,5 @@ ignored.

                 - + diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html index 5976e6cf5a..998683bafd 100644 --- a/deps/npm/html/doc/index.html +++ b/deps/npm/html/doc/index.html @@ -74,6 +74,8 @@

          Ping npm registry

          npm-prefix(1)

          Display prefix

          +

          npm-profile(1)

          +

          Change settings on your registry profile

          npm-prune(1)

          Remove extraneous packages

          npm-publish(1)

          @@ -104,6 +106,8 @@

          Manage organization teams and team memberships

          npm-test(1)

          Test a package

          +

          npm-token(1)

          +

          Manage your authentication tokens

          npm-uninstall(1)

          Remove a package

          npm-unpublish(1)

          @@ -168,5 +172,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html index 4c038f9d1c..62569622aa 100644 --- a/deps/npm/html/doc/misc/npm-coding-style.html +++ b/deps/npm/html/doc/misc/npm-coding-style.html @@ -153,5 +153,5 @@ set to anything."

                 - + diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html index 68548cb08e..cd989b0832 100644 --- a/deps/npm/html/doc/misc/npm-config.html +++ b/deps/npm/html/doc/misc/npm-config.html @@ -33,6 +33,8 @@ same. However, please note that inside npm-scripts npm will set its own environment variables and Node will prefer those lowercase versions over any uppercase ones that you might set. For details see this issue.

          +

          Notice that you need to use underscores instead of dashes, so --allow-same-version +would become npm_config_allow_same_version=true.

          npmrc Files

          The four relevant files are:

            @@ -160,7 +162,7 @@ ostensibly Unix systems.

          • Type: String, Array or null

          The Certificate Authority signing certificate that is trusted for SSL -connections to the registry. Values should be in PEM format with newlines +connections to the registry. Values should be in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\n". For example:

          ca="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
           

          Set to null to only allow "known" registrars, or to a specific CA cert @@ -221,9 +223,15 @@ well as for the CA information to be stored in a file on disk.

        • Type: String

        A client certificate to pass when accessing the registry. Values should be in -PEM format with newlines replaced by the string "\n". For example:

        +PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with newlines replaced by the string "\n". For example:

        cert="-----BEGIN CERTIFICATE-----\nXXXX\nXXXX\n-----END CERTIFICATE-----"
         

        It is not the path to a certificate file (and there is no "certfile" option).

        +

        cidr

        +
          +
        • Default: null
        • +
        • Type: String, Array, null
        • +
        +

        This is a list of CIDR address to be used when configuring limited access tokens with the npm token create command.

        color

        • Default: true
        • @@ -333,6 +341,12 @@ the git binary.

        • Type: Boolean

        Tag the commit when using the npm version command.

        +

        commit-hooks

        +
          +
        • Default: true
        • +
        • Type: Boolean
        • +
        +

        Run git commit hooks when using the npm version command.

        global

        • Default: false
        • @@ -498,14 +512,14 @@ being installed locally. to the npm registry. Must be IPv4 in versions of Node prior to 0.12.

          loglevel

            -
          • Default: "warn"
          • +
          • Default: "notice"
          • Type: String
          • -
          • Values: "silent", "error", "warn", "http", "info", "verbose", "silly"
          • +
          • Values: "silent", "error", "warn", "notice", "http", "timing", "info", +"verbose", "silly"

          What level of logs to report. On failure, all logs are written to npm-debug.log in the current working directory.

          -

          Any logs of a higher level than the setting are shown. -The default is "warn", which shows warn and error output.

          +

          Any logs of a higher level than the setting are shown. The default is "notice".

          logstream

          • Default: process.stderr
          • @@ -592,6 +606,13 @@ installed.

            Attempt to install packages in the optionalDependencies object. Note that if these packages fail to install, the overall installation process is not aborted.

            +

            otp

            +
              +
            • Default: null
            • +
            • Type: Number
            • +
            +

            This is a one-time password from a two-factor authenticator. It's needed +when publishing or changing package permissions with npm access.

            package-lock

            • Default: true
            • @@ -648,16 +669,6 @@ local npm install without any arguments.

              When set to true, npm will display a progress bar during time intensive operations, if process.stderr is a TTY.

              Set to false to suppress the progress bar.

              -

              proprietary-attribs

              -
                -
              • Default: true
              • -
              • Type: Boolean
              • -
              -

              Whether or not to include proprietary extended attributes in the -tarballs created by npm.

              -

              Unless you are expecting to unpack package tarballs with something other -than npm -- particularly a very outdated tar implementation -- leave -this as true.

              proxy

              • Default: null
              • @@ -666,6 +677,12 @@ this as true.

                A proxy to use for outgoing http requests. If the HTTP_PROXY or http_proxy environment variables are set, proxy settings will be honored by the underlying request library.

                +

                read-only

                +
                  +
                • Default: false
                • +
                • Type: Boolean
                • +
                +

                This is used to mark a token as unable to publish when configuring limited access tokens with the npm token create command.

                rebuild-bundle

                • Default: true
                • @@ -992,5 +1009,5 @@ exit successfully.

                         - + diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html index 39cc446723..b6a570f33a 100644 --- a/deps/npm/html/doc/misc/npm-developers.html +++ b/deps/npm/html/doc/misc/npm-developers.html @@ -131,6 +131,16 @@ bother adding node_modules to .npmignore.

                • CHANGELOG (and its variants)
                • LICENSE / LICENCE
                +

                If, given the structure of your project, you find .npmignore to be a +maintenance headache, you might instead try populating the files +property of package.json, which is an array of file or directory names +that should be included in your package. Sometimes a whitelist is easier +to manage than a blacklist.

                +

                Testing whether your .npmignore or files config works

                +

                If you want to double check that your package will include only the files +you intend it to when published, you can run the npm pack command locally +which will generate a tarball in the working directory, the same way it +does for publishing.

                npm link is designed to install a development package and see the changes in real time without having to keep re-installing it. (You do @@ -194,5 +204,5 @@ from a fresh checkout.

                       - + diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html index c586bb9253..265d7587d5 100644 --- a/deps/npm/html/doc/misc/npm-disputes.html +++ b/deps/npm/html/doc/misc/npm-disputes.html @@ -20,7 +20,7 @@ Conduct.

                TL;DR

                1. Get the author email with npm owner ls <pkgname>
                2. -
                3. Email the author, CC support@npmjs.com
                4. +
                5. Email the author, CC support@npmjs.com
                6. After a few weeks, if there's no resolution, we'll sort it out.

                Don't squat on package names. Publish code or move out of the way.

                @@ -55,12 +55,12 @@ because Yusuf's foo is in the way.

              • Alice emails Yusuf, explaining the situation as respectfully as possible, and what she would like to do with the module name. She adds the npm support -staff support@npmjs.com to the CC list of the email. Mention in the email +staff support@npmjs.com to the CC list of the email. Mention in the email that Yusuf can run npm owner add alice foo to add Alice as an owner of the foo package.
              • After a reasonable amount of time, if Yusuf has not responded, or if Yusuf and Alice can't come to any sort of resolution, email support -support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least +support@npmjs.com and we'll sort it out. ("Reasonable" is usually at least 4 weeks.)
              • REASONING

                @@ -96,12 +96,12 @@ application database or otherwise putting non-packagey things into it. Code of Conduct such as hateful language, pornographic content, or harassment. -

                If you see bad behavior like this, please report it to abuse@npmjs.com right +

                If you see bad behavior like this, please report it to abuse@npmjs.com right away. You are never expected to resolve abusive behavior on your own. We are here to help.

                TRADEMARKS

                If you think another npm publisher is infringing your trademark, such as by -using a confusingly similar package name, email abuse@npmjs.com with a link to +using a confusingly similar package name, email abuse@npmjs.com with a link to the package or user account on https://npmjs.com. Attach a copy of your trademark registration certificate.

                If we see that the package's publisher is intentionally misleading others by @@ -134,5 +134,5 @@ License.

                       - + diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html index 96d9dbfc4d..2dd7891209 100644 --- a/deps/npm/html/doc/misc/npm-index.html +++ b/deps/npm/html/doc/misc/npm-index.html @@ -74,6 +74,8 @@

                Ping npm registry

                npm-prefix(1)

                Display prefix

                +

                npm-profile(1)

                +

                Change settings on your registry profile

                npm-prune(1)

                Remove extraneous packages

                npm-publish(1)

                @@ -104,6 +106,8 @@

                Manage organization teams and team memberships

                npm-test(1)

                Test a package

                +

                npm-token(1)

                +

                Manage your authentication tokens

                npm-uninstall(1)

                Remove a package

                npm-unpublish(1)

                @@ -168,5 +172,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html index cdd7d2c354..07ab32833d 100644 --- a/deps/npm/html/doc/misc/npm-orgs.html +++ b/deps/npm/html/doc/misc/npm-orgs.html @@ -86,5 +86,5 @@        - + diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html index 6fd2e728ac..23d6de02a4 100644 --- a/deps/npm/html/doc/misc/npm-registry.html +++ b/deps/npm/html/doc/misc/npm-registry.html @@ -90,5 +90,5 @@ effectively implement the entire CouchDB API anyway.

                       - + diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html index 484e6c1c33..f6e107ed04 100644 --- a/deps/npm/html/doc/misc/npm-scope.html +++ b/deps/npm/html/doc/misc/npm-scope.html @@ -99,5 +99,5 @@ that registry instead.

                       - + diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html index 46a126d8f6..b24fb3d747 100644 --- a/deps/npm/html/doc/misc/npm-scripts.html +++ b/deps/npm/html/doc/misc/npm-scripts.html @@ -11,7 +11,7 @@

                npm-scripts

                How npm handles the "scripts" field

                DESCRIPTION

                -

                npm supports the "scripts" property of the package.json script, for the +

                npm supports the "scripts" property of the package.json file, for the following scripts:

                • prepublish: @@ -239,5 +239,5 @@ scripts is for compilation which must be done on the target architecture.
                •        - + diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html index 2bfd2a513c..5e50674c54 100644 --- a/deps/npm/html/doc/misc/removing-npm.html +++ b/deps/npm/html/doc/misc/removing-npm.html @@ -57,5 +57,5 @@ modules. To track those down, you can do the following:

                         - + diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html index e97c70afcb..ccbedc47b7 100644 --- a/deps/npm/html/doc/misc/semver.html +++ b/deps/npm/html/doc/misc/semver.html @@ -10,10 +10,13 @@

                  semver

                  The semantic versioner for npm

                  +

                  Install

                  +
                  npm install --save semver
                  +`
                  +

                  Usage

                  -
                  $ npm install semver
                  -$ node
                  -var semver = require('semver')
                  +

                  As a node module:

                  +
                  const semver = require('semver')
                   
                   semver.valid('1.2.3') // '1.2.3'
                   semver.valid('a.b.c') // null
                  @@ -21,10 +24,11 @@ semver.clean('  =v1.2.3   ') // '1.2.3'
                   semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
                   semver.gt('1.2.3', '9.8.7') // false
                   semver.lt('1.2.3', '9.8.7') // true
                  -

                  As a command-line utility:

                  +
                  +

                  As a command-line utility:

                  $ semver -h
                   
                  -SemVer 5.1.0
                  +SemVer 5.3.0
                   
                   A JavaScript implementation of the http://semver.org/ specification
                   Copyright Isaac Z. Schlueter
                  @@ -113,15 +117,15 @@ similar risk on the next set of prerelease versions.

                  Prerelease Identifiers

                  The method .inc takes an additional identifier string argument that will append the value of the string as a prerelease identifier:

                  -
                  > semver.inc('1.2.3', 'prerelease', 'beta')
                  -'1.2.4-beta.0'
                  +
                  semver.inc('1.2.3', 'prerelease', 'beta')
                  +// '1.2.4-beta.0'
                   

                  command-line example:

                  -
                  $ semver 1.2.3 -i prerelease --preid beta
                  +
                  $ semver 1.2.3 -i prerelease --preid beta
                   1.2.4-beta.0
                   

                  Which then can be used to increment further:

                  -
                  $ semver 1.2.4-beta.0 -i prerelease
                  +
                  $ semver 1.2.4-beta.0 -i prerelease
                   1.2.4-beta.1
                   

                  Advanced Range Syntax

                  @@ -263,6 +267,8 @@ if none exist. Example: prerelease('1.2.3-alpha.1') -> ['al
                • major(v): Return the major version number.
                • minor(v): Return the minor version number.
                • patch(v): Return the patch version number.
                • +
                • intersects(r1, r2, loose): Return true if the two supplied ranges +or comparators intersect.

                Comparison

                  @@ -286,6 +292,10 @@ in descending order when passed to Array.sort(). (major, premajor, minor, preminor, patch, prepatch, or prerelease), or null if the versions are the same.
                +

                Comparators

                +
                  +
                • intersects(comparator): Return true if the comparators intersect
                • +

                Ranges

                • validRange(range): Return the valid range or null if it's not valid
                • @@ -303,6 +313,7 @@ versions possible in the range. the bounds of the range in either the high or low direction. The hilo argument must be either the string '>' or '<'. (This is the function called by gtr and ltr.) +
                • intersects(range): Return true if any of the ranges comparators intersect

                Note that, since ranges may be non-contiguous, a version might not be greater than a range, less than a range, or satisfy a range! For @@ -325,5 +336,5 @@ range, use the satisfies(version, range) function.

                       - + diff --git a/deps/npm/lib/auth/legacy.js b/deps/npm/lib/auth/legacy.js index 2fa4a26e35..4c75ca6731 100644 --- a/deps/npm/lib/auth/legacy.js +++ b/deps/npm/lib/auth/legacy.js @@ -1,142 +1,52 @@ -var log = require('npmlog') -var npm = require('../npm.js') -var read = require('read') -var userValidate = require('npm-user-validate') -var output = require('../utils/output') -var chain = require('slide').chain +'use strict' +const read = require('../utils/read-user-info.js') +const profile = require('npm-profile') +const log = require('npmlog') +const npm = require('../npm.js') +const output = require('../utils/output.js') module.exports.login = function login (creds, registry, scope, cb) { - var c = { - u: creds.username || '', - p: creds.password || '', - e: creds.email || '' - } - var u = {} - - chain([ - [readUsername, c, u], - [readPassword, c, u], - [readEmail, c, u], - [save, c, u, registry, scope] - ], function (err, res) { - cb(err, res && res[res.length - 1]) - }) -} - -function readUsername (c, u, cb) { - var v = userValidate.username - read({prompt: 'Username: ', default: c.u || ''}, function (er, un) { - if (er) { - return cb(er.message === 'cancelled' ? er.message : er) - } - - // make sure it's valid. we have to do this here, because - // couchdb will only ever say "bad password" with a 401 when - // you try to PUT a _users record that the validate_doc_update - // rejects for *any* reason. - - if (!un) { - return readUsername(c, u, cb) - } - - var error = v(un) - if (error) { - log.warn(error.message) - return readUsername(c, u, cb) - } - - c.changed = c.u !== un - u.u = un - cb(er) - }) -} - -function readPassword (c, u, cb) { - var v = userValidate.pw - - var prompt - if (c.p && !c.changed) { - prompt = 'Password: (or leave unchanged) ' - } else { - prompt = 'Password: ' - } - - read({prompt: prompt, silent: true}, function (er, pw) { - if (er) { - return cb(er.message === 'cancelled' ? er.message : er) - } - - if (!c.changed && pw === '') { - // when the username was not changed, - // empty response means "use the old value" - pw = c.p - } - - if (!pw) { - return readPassword(c, u, cb) - } - - var error = v(pw) - if (error) { - log.warn(error.message) - return readPassword(c, u, cb) - } - - c.changed = c.changed || c.p !== pw - u.p = pw - cb(er) - }) -} - -function readEmail (c, u, cb) { - var v = userValidate.email - var r = { prompt: 'Email: (this IS public) ', default: c.e || '' } - read(r, function (er, em) { - if (er) { - return cb(er.message === 'cancelled' ? er.message : er) - } - - if (!em) { - return readEmail(c, u, cb) - } - - var error = v(em) - if (error) { - log.warn(error.message) - return readEmail(c, u, cb) - } - - u.e = em - cb(er) - }) -} - -function save (c, u, registry, scope, cb) { - var params = { - auth: { - username: u.u, - password: u.p, - email: u.e - } - } - npm.registry.adduser(registry, params, function (er, doc) { - if (er) return cb(er) - - var newCreds = (doc && doc.token) - ? { - token: doc.token - } - : { - username: u.u, - password: u.p, - email: u.e, - alwaysAuth: npm.config.get('always-auth') - } - - log.info('adduser', 'Authorized user %s', u.u) - var scopeMessage = scope ? ' to scope ' + scope : '' - output('Logged in as %s%s on %s.', u.u, scopeMessage, registry) - + let username = creds.username || '' + let password = creds.password || '' + let email = creds.email || '' + const auth = {} + if (npm.config.get('otp')) auth.otp = npm.config.get('otp') + + return read.username('Username:', username, {log: log}).then((u) => { + username = u + return read.password('Password: ', password) + }).then((p) => { + password = p + return read.email('Email: (this IS public) ', email, {log: log}) + }).then((e) => { + email = e + return profile.login(username, password, {registry: registry, auth: auth}).catch((err) => { + if (err.code === 'EOTP') throw err + return profile.adduser(username, email, password, {registry: registry}) + }).catch((err) => { + if (err.code === 'EOTP' && !auth.otp) { + return read.otp('Authenicator provided OTP:').then((otp) => { + auth.otp = otp + return profile.login(username, password, {registry: registry, auth: auth}) + }) + } else { + throw err + } + }) + }).then((result) => { + const newCreds = {} + if (result && result.token) { + newCreds.token = result.token + } else { + newCreds.username = username + newCreds.password = password + newCreds.email = email + newCreds.alwaysAuth = npm.config.get('always-auth') + } + + log.info('adduser', 'Authorized user %s', username) + const scopeMessage = scope ? ' to scope ' + scope : '' + output('Logged in as %s%s on %s.', username, scopeMessage, registry) cb(null, newCreds) - }) + }).catch(cb) } diff --git a/deps/npm/lib/build.js b/deps/npm/lib/build.js index 44ac40a007..6a788bc857 100644 --- a/deps/npm/lib/build.js +++ b/deps/npm/lib/build.js @@ -18,6 +18,8 @@ var link = require('./utils/link.js') var linkIfExists = link.ifExists var cmdShim = require('cmd-shim') var cmdShimIfExists = cmdShim.ifExists +var isHashbangFile = require('./utils/is-hashbang-file.js') +var dos2Unix = require('./utils/convert-line-endings.js').dos2Unix var asyncMap = require('slide').asyncMap var ini = require('ini') var writeFile = require('write-file-atomic') @@ -187,13 +189,18 @@ function linkBins (pkg, folder, parent, gtop, cb) { if (er && er.code === 'ENOENT' && npm.config.get('ignore-scripts')) { return cb() } - if (er || !gtop) return cb(er) - var dest = path.resolve(binRoot, b) - var out = npm.config.get('parseable') - ? dest + '::' + src + ':BINFILE' - : dest + ' -> ' + src - if (!npm.config.get('json') && !npm.config.get('parseable')) output(out) - cb() + if (er) return cb(er) + isHashbangFile(src).then((isHashbang) => { + if (isHashbang) return dos2Unix(src) + }).then(() => { + if (!gtop) return cb() + var dest = path.resolve(binRoot, b) + var out = npm.config.get('parseable') + ? dest + '::' + src + ':BINFILE' + : dest + ' -> ' + src + if (!npm.config.get('json') && !npm.config.get('parseable')) output(out) + cb() + }).catch(cb) }) } ) diff --git a/deps/npm/lib/config.js b/deps/npm/lib/config.js index 0426546274..d260c04a54 100644 --- a/deps/npm/lib/config.js +++ b/deps/npm/lib/config.js @@ -19,7 +19,7 @@ config.usage = usage( 'npm config set ' + '\nnpm config get []' + '\nnpm config delete ' + - '\nnpm config list' + + '\nnpm config list [--json]' + '\nnpm config edit' + '\nnpm set ' + '\nnpm get []' @@ -45,9 +45,11 @@ config.completion = function (opts, cb) { case 'rm': return cb(null, Object.keys(types)) case 'edit': - case 'list': case 'ls': + case 'list': + case 'ls': + return cb(null, []) + default: return cb(null, []) - default: return cb(null, []) } } @@ -57,12 +59,21 @@ config.completion = function (opts, cb) { function config (args, cb) { var action = args.shift() switch (action) { - case 'set': return set(args[0], args[1], cb) - case 'get': return get(args[0], cb) - case 'delete': case 'rm': case 'del': return del(args[0], cb) - case 'list': case 'ls': return list(cb) - case 'edit': return edit(cb) - default: return unknown(action, cb) + case 'set': + return set(args[0], args[1], cb) + case 'get': + return get(args[0], cb) + case 'delete': + case 'rm': + case 'del': + return del(args[0], cb) + case 'list': + case 'ls': + return npm.config.get('json') ? listJson(cb) : list(cb) + case 'edit': + return edit(cb) + default: + return unknown(action, cb) } } @@ -159,15 +170,49 @@ function sort (a, b) { } function publicVar (k) { - return !(k.charAt(0) === '_' || - k.indexOf(':_') !== -1 || - types[k] !== types[k]) + return !(k.charAt(0) === '_' || k.indexOf(':_') !== -1) } function getKeys (data) { return Object.keys(data).filter(publicVar).sort(sort) } +function listJson (cb) { + const publicConf = npm.config.keys.reduce((publicConf, k) => { + var value = npm.config.get(k) + + if (publicVar(k) && + // argv is not really config, it's command config + k !== 'argv' && + // logstream is a Stream, and would otherwise produce circular refs + k !== 'logstream') publicConf[k] = value + + return publicConf + }, {}) + + output(JSON.stringify(publicConf, null, 2)) + return cb() +} + +function listFromSource (title, conf, long) { + var confKeys = getKeys(conf) + var msg = '' + + if (confKeys.length) { + msg += '; ' + title + '\n' + confKeys.forEach(function (k) { + var val = JSON.stringify(conf[k]) + if (conf[k] !== npm.config.get(k)) { + if (!long) return + msg += '; ' + k + ' = ' + val + ' (overridden)\n' + } else msg += k + ' = ' + val + '\n' + }) + msg += '\n' + } + + return msg +} + function list (cb) { var msg = '' var long = npm.config.get('long') @@ -185,92 +230,22 @@ function list (cb) { } // env configs - var env = npm.config.sources.env.data - var envKeys = getKeys(env) - if (envKeys.length) { - msg += '; environment configs\n' - envKeys.forEach(function (k) { - if (env[k] !== npm.config.get(k)) { - if (!long) return - msg += '; ' + k + ' = ' + - JSON.stringify(env[k]) + ' (overridden)\n' - } else msg += k + ' = ' + JSON.stringify(env[k]) + '\n' - }) - msg += '\n' - } + msg += listFromSource('environment configs', npm.config.sources.env.data, long) // project config file var project = npm.config.sources.project - var pconf = project.data - var ppath = project.path - var pconfKeys = getKeys(pconf) - if (pconfKeys.length) { - msg += '; project config ' + ppath + '\n' - pconfKeys.forEach(function (k) { - var val = (k.charAt(0) === '_') - ? '---sekretz---' - : JSON.stringify(pconf[k]) - if (pconf[k] !== npm.config.get(k)) { - if (!long) return - msg += '; ' + k + ' = ' + val + ' (overridden)\n' - } else msg += k + ' = ' + val + '\n' - }) - msg += '\n' - } + msg += listFromSource('project config ' + project.path, project.data, long) // user config file - var uconf = npm.config.sources.user.data - var uconfKeys = getKeys(uconf) - if (uconfKeys.length) { - msg += '; userconfig ' + npm.config.get('userconfig') + '\n' - uconfKeys.forEach(function (k) { - var val = (k.charAt(0) === '_') - ? '---sekretz---' - : JSON.stringify(uconf[k]) - if (uconf[k] !== npm.config.get(k)) { - if (!long) return - msg += '; ' + k + ' = ' + val + ' (overridden)\n' - } else msg += k + ' = ' + val + '\n' - }) - msg += '\n' - } + msg += listFromSource('userconfig ' + npm.config.get('userconfig'), npm.config.sources.user.data, long) // global config file - var gconf = npm.config.sources.global.data - var gconfKeys = getKeys(gconf) - if (gconfKeys.length) { - msg += '; globalconfig ' + npm.config.get('globalconfig') + '\n' - gconfKeys.forEach(function (k) { - var val = (k.charAt(0) === '_') - ? '---sekretz---' - : JSON.stringify(gconf[k]) - if (gconf[k] !== npm.config.get(k)) { - if (!long) return - msg += '; ' + k + ' = ' + val + ' (overridden)\n' - } else msg += k + ' = ' + val + '\n' - }) - msg += '\n' - } + msg += listFromSource('globalconfig ' + npm.config.get('globalconfig'), npm.config.sources.global.data, long) // builtin config file var builtin = npm.config.sources.builtin || {} if (builtin && builtin.data) { - var bconf = builtin.data - var bpath = builtin.path - var bconfKeys = getKeys(bconf) - if (bconfKeys.length) { - msg += '; builtin config ' + bpath + '\n' - bconfKeys.forEach(function (k) { - var val = (k.charAt(0) === '_') - ? '---sekretz---' - : JSON.stringify(bconf[k]) - if (bconf[k] !== npm.config.get(k)) { - if (!long) return - msg += '; ' + k + ' = ' + val + ' (overridden)\n' - } else msg += k + ' = ' + val + '\n' - }) - msg += '\n' - } + msg += listFromSource('builtin config ' + builtin.path, builtin.data, long) } // only show defaults if --long diff --git a/deps/npm/lib/config/cmd-list.js b/deps/npm/lib/config/cmd-list.js index f2d5fab17d..49c445a4f0 100644 --- a/deps/npm/lib/config/cmd-list.js +++ b/deps/npm/lib/config/cmd-list.js @@ -74,6 +74,8 @@ var cmdList = [ 'team', 'deprecate', 'shrinkwrap', + 'token', + 'profile', 'help', 'help-search', diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js index 93bac84a61..35617fd638 100644 --- a/deps/npm/lib/config/defaults.js +++ b/deps/npm/lib/config/defaults.js @@ -128,6 +128,8 @@ Object.defineProperty(exports, 'defaults', {get: function () { cert: null, + cidr: null, + color: true, depth: Infinity, description: true, @@ -144,6 +146,7 @@ Object.defineProperty(exports, 'defaults', {get: function () { git: 'git', 'git-tag-version': true, + 'commit-hooks': true, global: false, globalconfig: path.resolve(globalPrefix, 'etc', 'npmrc'), @@ -178,6 +181,7 @@ Object.defineProperty(exports, 'defaults', {get: function () { 'onload-script': false, only: null, optional: true, + otp: null, 'package-lock': true, parseable: false, 'prefer-offline': false, @@ -185,13 +189,13 @@ Object.defineProperty(exports, 'defaults', {get: function () { prefix: globalPrefix, production: process.env.NODE_ENV === 'production', 'progress': !process.env.TRAVIS && !process.env.CI, - 'proprietary-attribs': true, proxy: null, 'https-proxy': null, 'user-agent': 'npm/{npm-version} ' + 'node/{node-version} ' + '{platform} ' + '{arch}', + 'read-only': false, 'rebuild-bundle': true, registry: 'https://registry.npmjs.org/', rollback: true, @@ -257,6 +261,7 @@ exports.types = { 'cache-max': Number, 'cache-min': Number, cert: [null, String], + cidr: [null, String, Array], color: ['always', Boolean], depth: Number, description: Boolean, @@ -271,6 +276,7 @@ exports.types = { 'fetch-retry-maxtimeout': Number, git: String, 'git-tag-version': Boolean, + 'commit-hooks': Boolean, global: Boolean, globalconfig: path, 'global-style': Boolean, @@ -308,14 +314,15 @@ exports.types = { only: [null, 'dev', 'development', 'prod', 'production'], optional: Boolean, 'package-lock': Boolean, + otp: Number, parseable: Boolean, 'prefer-offline': Boolean, 'prefer-online': Boolean, prefix: path, production: Boolean, progress: Boolean, - 'proprietary-attribs': Boolean, proxy: [null, false, url], // allow proxy to be disabled explicitly + 'read-only': Boolean, 'rebuild-bundle': Boolean, registry: [null, url], rollback: Boolean, @@ -405,6 +412,7 @@ exports.shorthands = { m: ['--message'], p: ['--parseable'], porcelain: ['--parseable'], + readonly: ['--read-only'], g: ['--global'], S: ['--save'], D: ['--save-dev'], diff --git a/deps/npm/lib/config/lifecycle.js b/deps/npm/lib/config/lifecycle.js new file mode 100644 index 0000000000..5fca93939d --- /dev/null +++ b/deps/npm/lib/config/lifecycle.js @@ -0,0 +1,30 @@ +'use strict' + +const npm = require('../npm.js') +const log = require('npmlog') + +module.exports = lifecycleOpts + +let opts + +function lifecycleOpts (moreOpts) { + if (!opts) { + opts = { + config: npm.config.snapshot, + dir: npm.dir, + failOk: false, + force: npm.config.get('force'), + group: npm.config.get('group'), + ignorePrepublish: npm.config.get('ignore-prepublish'), + ignoreScripts: npm.config.get('ignore-scripts'), + log: log, + production: npm.config.get('production'), + scriptShell: npm.config.get('script-shell'), + scriptsPrependNodePath: npm.config.get('scripts-prepend-node-path'), + unsafePerm: npm.config.get('unsafe-perm'), + user: npm.config.get('user') + } + } + + return moreOpts ? Object.assign({}, opts, moreOpts) : opts +} diff --git a/deps/npm/lib/help.js b/deps/npm/lib/help.js index 9763d5fccd..64c80f7874 100644 --- a/deps/npm/lib/help.js +++ b/deps/npm/lib/help.js @@ -12,6 +12,7 @@ var npm = require('./npm.js') var log = require('npmlog') var opener = require('opener') var glob = require('glob') +var didYouMean = require('./utils/did-you-mean') var cmdList = require('./config/cmd-list').cmdList var shorthands = require('./config/cmd-list').shorthands var commands = cmdList.concat(Object.keys(shorthands)) @@ -181,6 +182,11 @@ function npmUsage (valid, cb) { '', 'npm@' + npm.version + ' ' + path.dirname(__dirname) ].join('\n')) + + if (npm.argv.length > 1) { + didYouMean(npm.argv[1], commands) + } + cb(valid) } diff --git a/deps/npm/lib/install/action/extract.js b/deps/npm/lib/install/action/extract.js index 5534e8b28a..8e80d4adda 100644 --- a/deps/npm/lib/install/action/extract.js +++ b/deps/npm/lib/install/action/extract.js @@ -20,16 +20,34 @@ const workerFarm = require('worker-farm') const WORKER_PATH = require.resolve('./extract-worker.js') let workers +// NOTE: temporarily disabled on non-OSX due to ongoing issues: +// +// * Seems to make Windows antivirus issues much more common +// * Messes with Docker (I think) +// +// There are other issues that should be fixed that affect OSX too: +// +// * Logging is messed up right now because pacote does its own thing +// * Global deduplication in pacote breaks due to multiple procs +// +// As these get fixed, we can start experimenting with re-enabling it +// at least on some platforms. +const ENABLE_WORKERS = process.platform === 'darwin' + extract.init = () => { - workers = workerFarm({ - maxConcurrentCallsPerWorker: npm.limit.fetch, - maxRetries: 1 - }, WORKER_PATH) + if (ENABLE_WORKERS) { + workers = workerFarm({ + maxConcurrentCallsPerWorker: npm.limit.fetch, + maxRetries: 1 + }, WORKER_PATH) + } return BB.resolve() } extract.teardown = () => { - workerFarm.end(workers) - workers = null + if (ENABLE_WORKERS) { + workerFarm.end(workers) + workers = null + } return BB.resolve() } module.exports = extract @@ -54,7 +72,7 @@ function extract (staging, pkg, log) { let msg = args const spec = typeof args[0] === 'string' ? npa(args[0]) : args[0] args[0] = spec.raw - if (spec.registry || spec.type === 'remote') { + if (ENABLE_WORKERS && (spec.registry || spec.type === 'remote')) { // We can't serialize these options opts.loglevel = opts.log.level opts.log = null diff --git a/deps/npm/lib/install/action/install.js b/deps/npm/lib/install/action/install.js index 754bff43ff..a5cf63b739 100644 --- a/deps/npm/lib/install/action/install.js +++ b/deps/npm/lib/install/action/install.js @@ -4,5 +4,5 @@ var packageId = require('../../utils/package-id.js') module.exports = function (staging, pkg, log, next) { log.silly('install', packageId(pkg)) - lifecycle(pkg.package, 'install', pkg.path, false, false, next) + lifecycle(pkg.package, 'install', pkg.path, next) } diff --git a/deps/npm/lib/install/action/move.js b/deps/npm/lib/install/action/move.js index bc9bf6a883..00d58a1592 100644 --- a/deps/npm/lib/install/action/move.js +++ b/deps/npm/lib/install/action/move.js @@ -7,7 +7,6 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var rmStuff = require('../../unbuild.js').rmStuff var lifecycle = require('../../utils/lifecycle.js') -var updatePackageJson = require('../update-package-json.js') var move = require('../../utils/move.js') /* @@ -19,14 +18,13 @@ var move = require('../../utils/move.js') module.exports = function (staging, pkg, log, next) { log.silly('move', pkg.fromPath, pkg.path) chain([ - [lifecycle, pkg.package, 'preuninstall', pkg.fromPath, false, true], - [lifecycle, pkg.package, 'uninstall', pkg.fromPath, false, true], + [lifecycle, pkg.package, 'preuninstall', pkg.fromPath, { failOk: true }], + [lifecycle, pkg.package, 'uninstall', pkg.fromPath, { failOk: true }], [rmStuff, pkg.package, pkg.fromPath], - [lifecycle, pkg.package, 'postuninstall', pkg.fromPath, false, true], + [lifecycle, pkg.package, 'postuninstall', pkg.fromPath, { failOk: true }], [moveModuleOnly, pkg.fromPath, pkg.path, log], - [lifecycle, pkg.package, 'preinstall', pkg.path, false, true], - [removeEmptyParents, path.resolve(pkg.fromPath, '..')], - [updatePackageJson, pkg, pkg.path] + [lifecycle, pkg.package, 'preinstall', pkg.path, { failOk: true }], + [removeEmptyParents, path.resolve(pkg.fromPath, '..')] ], next) } diff --git a/deps/npm/lib/install/action/postinstall.js b/deps/npm/lib/install/action/postinstall.js index 197dc1e6f9..01accb2a47 100644 --- a/deps/npm/lib/install/action/postinstall.js +++ b/deps/npm/lib/install/action/postinstall.js @@ -4,5 +4,5 @@ var packageId = require('../../utils/package-id.js') module.exports = function (staging, pkg, log, next) { log.silly('postinstall', packageId(pkg)) - lifecycle(pkg.package, 'postinstall', pkg.path, false, false, next) + lifecycle(pkg.package, 'postinstall', pkg.path, next) } diff --git a/deps/npm/lib/install/action/preinstall.js b/deps/npm/lib/install/action/preinstall.js index a16082ef73..374ff56332 100644 --- a/deps/npm/lib/install/action/preinstall.js +++ b/deps/npm/lib/install/action/preinstall.js @@ -4,5 +4,5 @@ var packageId = require('../../utils/package-id.js') module.exports = function (staging, pkg, log, next) { log.silly('preinstall', packageId(pkg)) - lifecycle(pkg.package, 'preinstall', pkg.path, false, false, next) + lifecycle(pkg.package, 'preinstall', pkg.path, next) } diff --git a/deps/npm/lib/install/action/prepare.js b/deps/npm/lib/install/action/prepare.js index 5e4333a5b5..d48c8e7e86 100644 --- a/deps/npm/lib/install/action/prepare.js +++ b/deps/npm/lib/install/action/prepare.js @@ -19,8 +19,8 @@ module.exports = function (staging, pkg, log, next) { var buildpath = moduleStagingPath(staging, pkg) chain( [ - [lifecycle, pkg.package, 'prepublish', buildpath, false, false], - [lifecycle, pkg.package, 'prepare', buildpath, false, false] + [lifecycle, pkg.package, 'prepublish', buildpath], + [lifecycle, pkg.package, 'prepare', buildpath] ], next ) diff --git a/deps/npm/lib/install/action/unbuild.js b/deps/npm/lib/install/action/unbuild.js index ce20df75d3..dbfbd9c4b1 100644 --- a/deps/npm/lib/install/action/unbuild.js +++ b/deps/npm/lib/install/action/unbuild.js @@ -6,11 +6,11 @@ var rmStuff = Bluebird.promisify(require('../../unbuild.js').rmStuff) module.exports = function (staging, pkg, log) { log.silly('unbuild', packageId(pkg)) - return lifecycle(pkg.package, 'preuninstall', pkg.path, false, true).then(() => { - return lifecycle(pkg.package, 'uninstall', pkg.path, false, true) + return lifecycle(pkg.package, 'preuninstall', pkg.path, { failOk: true }).then(() => { + return lifecycle(pkg.package, 'uninstall', pkg.path, { failOk: true }) }).then(() => { return rmStuff(pkg.package, pkg.path) }).then(() => { - return lifecycle(pkg.package, 'postuninstall', pkg.path, false, true) + return lifecycle(pkg.package, 'postuninstall', pkg.path, { failOk: true }) }) } diff --git a/deps/npm/lib/install/actions.js b/deps/npm/lib/install/actions.js index 028d932373..9f0dcfa5dc 100644 --- a/deps/npm/lib/install/actions.js +++ b/deps/npm/lib/install/actions.js @@ -80,6 +80,7 @@ function runAction (action, staging, pkg, log) { } function markAsFailed (pkg) { + if (pkg.failed) return pkg.failed = true pkg.requires.forEach((req) => { req.requiredBy = req.requiredBy.filter((reqReqBy) => { diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js index d7a2c27c1c..c93907a416 100644 --- a/deps/npm/lib/install/deps.js +++ b/deps/npm/lib/install/deps.js @@ -62,8 +62,9 @@ function doesChildVersionMatch (child, requested, requestor) { // In those cases _from, will be preserved and we can compare that to ensure that they // really came from the same sources. // You'll see this scenario happen with at least tags and git dependencies. + // Some buggy clients will write spaces into the module name part of a _from. if (child.package._from) { - var fromReq = npa.resolve(moduleName(child), child.package._from.replace(new RegExp('^' + moduleName(child) + '@'), '')) + var fromReq = npa.resolve(moduleName(child), child.package._from.replace(new RegExp('^\s*' + moduleName(child) + '\s*@'), '')) if (fromReq.rawSpec === requested.rawSpec) return true if (fromReq.type === requested.type && fromReq.saveSpec && fromReq.saveSpec === requested.saveSpec) return true } @@ -197,18 +198,31 @@ function matchingDep (tree, name) { exports.getAllMetadata = function (args, tree, where, next) { asyncMap(args, function (arg, done) { - var spec = npa(arg) + let spec + try { + spec = npa(arg) + } catch (e) { + return done(e) + } if (spec.type !== 'file' && spec.type !== 'directory' && (spec.name == null || spec.rawSpec === '')) { return fs.stat(path.join(arg, 'package.json'), (err) => { if (err) { var version = matchingDep(tree, spec.name) if (version) { - return fetchPackageMetadata(npa.resolve(spec.name, version), where, done) + try { + return fetchPackageMetadata(npa.resolve(spec.name, version), where, done) + } catch (e) { + return done(e) + } } else { return fetchPackageMetadata(spec, where, done) } } else { - return fetchPackageMetadata(npa('file:' + arg), where, done) + try { + return fetchPackageMetadata(npa('file:' + arg), where, done) + } catch (e) { + return done(e) + } } }) } else { diff --git a/deps/npm/lib/install/update-package-json.js b/deps/npm/lib/install/update-package-json.js index 14339d0012..afffaf7800 100644 --- a/deps/npm/lib/install/update-package-json.js +++ b/deps/npm/lib/install/update-package-json.js @@ -4,6 +4,7 @@ var writeFileAtomic = require('write-file-atomic') var moduleName = require('../utils/module-name.js') var deepSortObject = require('../utils/deep-sort-object.js') var sortedObject = require('sorted-object') +var isWindows = require('../utils/is-windows.js') var sortKeys = [ 'dependencies', 'devDependencies', 'bundleDependencies', @@ -47,7 +48,9 @@ module.exports = function (mod, buildpath, next) { var data = JSON.stringify(sortedObject(pkg), null, 2) + '\n' writeFileAtomic(path.resolve(buildpath, 'package.json'), data, { - // We really don't need this guarantee, and fsyncing here is super slow. - fsync: false + // We really don't need this guarantee, and fsyncing here is super slow. Except on + // Windows where there isn't a big performance difference and it prevents errors when + // rolling back optional packages (#17671) + fsync: isWindows }, next) } diff --git a/deps/npm/lib/install/validate-tree.js b/deps/npm/lib/install/validate-tree.js index ccd4e2e310..24a140171d 100644 --- a/deps/npm/lib/install/validate-tree.js +++ b/deps/npm/lib/install/validate-tree.js @@ -40,7 +40,7 @@ function thenValidateAllPeerDeps (idealTree, next) { validate('OF', arguments) validateAllPeerDeps(idealTree, function (tree, pkgname, version) { var warn = new Error(packageId(tree) + ' requires a peer of ' + pkgname + '@' + - version + ' but none was installed.') + version + ' but none is installed. You must install peer dependencies yourself.') warn.code = 'EPEERINVALID' idealTree.warnings.push(warn) }) diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js index 2e3db79c3b..7c0ea71e77 100644 --- a/deps/npm/lib/ls.js +++ b/deps/npm/lib/ls.js @@ -135,7 +135,7 @@ function filterByEnv (data) { var devKeys = Object.keys(data.devDependencies || []) var prodKeys = Object.keys(data._dependencies || []) Object.keys(data.dependencies).forEach(function (name) { - if (!dev && inList(devKeys, name) && data.dependencies[name].missing) { + if (!dev && inList(devKeys, name) && !inList(prodKeys, name) && data.dependencies[name].missing) { return } diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js index 990d8c5109..3a84947f79 100644 --- a/deps/npm/lib/npm.js +++ b/deps/npm/lib/npm.js @@ -25,7 +25,6 @@ var npmconf = require('./config/core.js') var log = require('npmlog') - var tty = require('tty') var path = require('path') var abbrev = require('abbrev') var which = require('which') @@ -285,20 +284,20 @@ switch (color) { case 'always': - log.enableColor() npm.color = true break case false: - log.disableColor() npm.color = false break default: - if (process.stdout.isTTY) npm.color = true - else if (!tty.isatty) npm.color = true - else if (tty.isatty(1)) npm.color = true - else npm.color = false + npm.color = process.stdout.isTTY && process.env['TERM'] !== 'dumb' break } + if (npm.color) { + log.enableColor() + } else { + log.disableColor() + } if (config.get('unicode')) { log.enableUnicode() @@ -306,7 +305,7 @@ log.disableUnicode() } - if (config.get('progress') && (process.stderr.isTTY || (tty.isatty && tty.isatty(2)))) { + if (config.get('progress') && process.stderr.isTTY && process.env['TERM'] !== 'dumb') { log.enableProgress() } else { log.disableProgress() diff --git a/deps/npm/lib/outdated.js b/deps/npm/lib/outdated.js index f2fb2df79a..a38137b66c 100644 --- a/deps/npm/lib/outdated.js +++ b/deps/npm/lib/outdated.js @@ -32,7 +32,6 @@ var table = require('text-table') var semver = require('semver') var npa = require('npm-package-arg') var mutateIntoLogicalTree = require('./install/mutate-into-logical-tree.js') -var cache = require('./cache.js') var npm = require('./npm.js') var long = npm.config.get('long') var mapToRegistry = require('./utils/map-to-registry.js') @@ -42,6 +41,7 @@ var computeVersionSpec = require('./install/deps.js').computeVersionSpec var moduleName = require('./utils/module-name.js') var output = require('./utils/output.js') var ansiTrim = require('./utils/ansi-trim') +var fetchPackageMetadata = require('./fetch-package-metadata.js') function uniq (list) { // we maintain the array because we need an array, not iterator, return @@ -387,8 +387,12 @@ function shouldUpdate (args, tree, dep, has, req, depth, pkgpath, cb, type) { } } - // We didn't find the version in the doc. See if cache can find it. - cache.add(dep, req, null, false, onCacheAdd) + // We didn't find the version in the doc. See if we can find it in metadata. + var spec = dep + if (req) { + spec = dep + '@' + req + } + fetchPackageMetadata(spec, '', onCacheAdd) function onCacheAdd (er, d) { // if this fails, then it means we can't update this thing. diff --git a/deps/npm/lib/pack.js b/deps/npm/lib/pack.js index ae3bb260ba..c428482035 100644 --- a/deps/npm/lib/pack.js +++ b/deps/npm/lib/pack.js @@ -26,8 +26,9 @@ const pipe = BB.promisify(require('mississippi').pipe) const prepublishWarning = require('./utils/warn-deprecated')('prepublish-on-install') const pinflight = require('promise-inflight') const readJson = BB.promisify(require('read-package-json')) -const tarPack = BB.promisify(require('./utils/tar').pack) const writeStreamAtomic = require('fs-write-stream-atomic') +const tar = require('tar') +const packlist = require('npm-packlist') pack.usage = 'npm pack [[<@scope>/]...]' @@ -118,11 +119,20 @@ function packDirectory (mani, dir, target) { }).then((pkg) => { return cacache.tmp.withTmp(npm.tmp, {tmpPrefix: 'packing'}, (tmp) => { const tmpTarget = path.join(tmp, path.basename(target)) - return tarPack(tmpTarget, dir, pkg).then(() => { - return move(tmpTarget, target, {Promise: BB, fs}) - }).then(() => { - return lifecycle(pkg, 'postpack', dir) - }).then(() => target) + + const tarOpt = { + file: tmpTarget, + cwd: dir, + prefix: 'package/', + portable: true, + gzip: true + } + + return packlist({ path: dir }) + .then((files) => tar.create(tarOpt, files)) + .then(() => move(tmpTarget, target, {Promise: BB, fs})) + .then(() => lifecycle(pkg, 'postpack', dir)) + .then(() => target) }) }) } diff --git a/deps/npm/lib/ping.js b/deps/npm/lib/ping.js index e06be9a471..13f390397c 100644 --- a/deps/npm/lib/ping.js +++ b/deps/npm/lib/ping.js @@ -15,7 +15,13 @@ function ping (args, silent, cb) { var auth = npm.config.getCredentialsByURI(registry) npm.registry.ping(registry, {auth: auth}, function (er, pong, data, res) { - if (!silent) output(JSON.stringify(pong)) + if (!silent) { + if (er) { + output('Ping error: ' + er) + } else { + output('Ping success: ' + JSON.stringify(pong)) + } + } cb(er, er ? null : pong, data, res) }) } diff --git a/deps/npm/lib/profile.js b/deps/npm/lib/profile.js new file mode 100644 index 0000000000..4238e14276 --- /dev/null +++ b/deps/npm/lib/profile.js @@ -0,0 +1,296 @@ +'use strict' +const profile = require('npm-profile') +const npm = require('./npm.js') +const log = require('npmlog') +const output = require('./utils/output.js') +const qw = require('qw') +const Table = require('cli-table2') +const ansistyles = require('ansistyles') +const Bluebird = require('bluebird') +const readUserInfo = require('./utils/read-user-info.js') +const qrcodeTerminal = require('qrcode-terminal') +const url = require('url') +const queryString = require('query-string') +const pulseTillDone = require('./utils/pulse-till-done.js') + +module.exports = profileCmd + +profileCmd.usage = + 'npm profile enable-2fa [auth-only|auth-and-writes]\n' + + 'npm profile disable-2fa\n' + + 'npm profile get []\n' + + 'npm profile set ' + +profileCmd.subcommands = qw`enable-2fa disable-2fa get set` + +profileCmd.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + switch (argv[2]) { + case 'enable-2fa': + case 'enable-tfa': + if (argv.length === 3) { + return cb(null, qw`auth-and-writes auth-only`) + } else { + return cb(null, []) + } + case 'disable-2fa': + case 'disable-tfa': + case 'get': + case 'set': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function withCb (prom, cb) { + prom.then((value) => cb(null, value), cb) +} + +function profileCmd (args, cb) { + if (args.length === 0) return cb(new Error(profileCmd.usage)) + log.gauge.show('profile') + switch (args[0]) { + case 'enable-2fa': + case 'enable-tfa': + case 'enable2fa': + case 'enabletfa': + withCb(enable2fa(args.slice(1)), cb) + break + case 'disable-2fa': + case 'disable-tfa': + case 'disable2fa': + case 'disabletfa': + withCb(disable2fa(), cb) + break + case 'get': + withCb(get(args.slice(1)), cb) + break + case 'set': + withCb(set(args.slice(1)), cb) + break + default: + cb(new Error('Unknown profile command: ' + args[0])) + } +} + +function config () { + const conf = { + json: npm.config.get('json'), + parseable: npm.config.get('parseable'), + registry: npm.config.get('registry'), + otp: npm.config.get('otp') + } + conf.auth = npm.config.getCredentialsByURI(conf.registry) + if (conf.otp) conf.auth.otp = conf.otp + return conf +} + +const knownProfileKeys = qw` + name email ${'two factor auth'} fullname homepage + freenode twitter github created updated` + +function get (args) { + const tfa = 'two factor auth' + const conf = config() + return pulseTillDone.withPromise(profile.get(conf)).then((info) => { + if (!info.cidr_whitelist) delete info.cidr_whitelist + if (conf.json) { + output(JSON.stringify(info, null, 2)) + return + } + const cleaned = {} + knownProfileKeys.forEach((k) => { cleaned[k] = info[k] || '' }) + Object.keys(info).filter((k) => !(k in cleaned)).forEach((k) => { cleaned[k] = info[k] || '' }) + delete cleaned.tfa + delete cleaned.email_verified + cleaned['email'] += info.email_verified ? ' (verified)' : '(unverified)' + if (info.tfa && !info.tfa.pending) { + cleaned[tfa] = info.tfa.mode + } else { + cleaned[tfa] = 'disabled' + } + if (args.length) { + const values = args // comma or space separated ↓ + .join(',').split(/,/).map((arg) => arg.trim()).filter((arg) => arg !== '') + .map((arg) => cleaned[arg]) + .join('\t') + output(values) + } else { + if (conf.parseable) { + Object.keys(info).forEach((key) => { + if (key === 'tfa') { + output(`${key}\t${cleaned[tfa]}`) + } else { + output(`${key}\t${info[key]}`) + } + }) + return + } else { + const table = new Table() + Object.keys(cleaned).forEach((k) => table.push({[ansistyles.bright(k)]: cleaned[k]})) + output(table.toString()) + } + } + }) +} + +const writableProfileKeys = qw` + email password fullname homepage freenode twitter github` + +function set (args) { + const conf = config() + const prop = (args[0] || '').toLowerCase().trim() + let value = args.length > 1 ? args.slice(1).join(' ') : null + if (prop !== 'password' && value === null) { + return Promise.reject(Error('npm profile set ')) + } + if (prop === 'password' && value !== null) { + return Promise.reject(Error( + 'npm profile set password\n' + + 'Do not include your current or new passwords on the command line.')) + } + if (writableProfileKeys.indexOf(prop) === -1) { + return Promise.reject(Error(`"${prop}" is not a property we can set. Valid properties are: ` + writableProfileKeys.join(', '))) + } + return Bluebird.try(() => { + if (prop !== 'password') return + return readUserInfo.password('Current password: ').then((current) => { + return readPasswords().then((newpassword) => { + value = {old: current, new: newpassword} + }) + }) + function readPasswords () { + return readUserInfo.password('New password: ').then((password1) => { + return readUserInfo.password(' Again: ').then((password2) => { + if (password1 !== password2) { + log.warn('profile', 'Passwords do not match, please try again.') + return readPasswords() + } + return password1 + }) + }) + } + }).then(() => { + // FIXME: Work around to not clear everything other than what we're setting + return pulseTillDone.withPromise(profile.get(conf).then((user) => { + const newUser = {} + writableProfileKeys.forEach((k) => { newUser[k] = user[k] }) + newUser[prop] = value + return profile.set(newUser, conf).catch((err) => { + if (err.code !== 'EOTP') throw err + return readUserInfo.otp('Enter OTP: ').then((otp) => { + conf.auth.otp = otp + return profile.set(newUser, conf) + }) + }).then((result) => { + if (conf.json) { + output(JSON.stringify({[prop]: result[prop]}, null, 2)) + } else if (conf.parseable) { + output(prop + '\t' + result[prop]) + } else { + output('Set', prop, 'to', result[prop]) + } + }) + })) + }) +} + +function enable2fa (args) { + if (args.length > 1) { + return Promise.reject(new Error('npm profile enable-2fa [auth-and-writes|auth-only]')) + } + const mode = args[0] || 'auth-and-writes' + if (mode !== 'auth-only' && mode !== 'auth-and-writes') { + return Promise.reject(new Error(`Invalid two factor authentication mode "${mode}".\n` + + 'Valid modes are:\n' + + ' auth-only - Require two-factor authentication only when logging in\n' + + ' auth-and-writes - Require two-factor authentication when logging in AND when publishing')) + } + const conf = config() + if (conf.json || conf.parseable) { + return Promise.reject(new Error( + 'Enabling two-factor authentication is an interactive opperation and ' + + (conf.json ? 'JSON' : 'parseable') + 'output mode is not available')) + } + log.notice('profile', 'Enabling two factor authentication for ' + mode) + const info = { + tfa: { + mode: mode + } + } + return readUserInfo.password().then((password) => { + info.tfa.password = password + log.info('profile', 'Determine if tfa is pending') + return pulseTillDone.withPromise(profile.get(conf)).then((info) => { + if (!info.tfa) return + if (info.tfa.pending) { + log.info('profile', 'Resetting two-factor authentication') + return pulseTillDone.withPromise(profile.set({tfa: {password, mode: 'disable'}}, conf)) + } else { + if (conf.auth.otp) return + return readUserInfo.otp('Enter OTP: ').then((otp) => { + conf.auth.otp = otp + }) + } + }) + }).then(() => { + log.info('profile', 'Setting two factor authentication to ' + mode) + return pulseTillDone.withPromise(profile.set(info, conf)) + }).then((challenge) => { + if (challenge.tfa === null) { + output('Two factor authentication mode changed to: ' + mode) + return + } + if (typeof challenge.tfa !== 'string' || !/^otpauth:[/][/]/.test(challenge.tfa)) { + throw new Error('Unknown error enabling two-factor authentication. Expected otpauth URL, got: ' + challenge.tfa) + } + const otpauth = url.parse(challenge.tfa) + const opts = queryString.parse(otpauth.query) + return qrcode(challenge.tfa).then((code) => { + output('Scan into your authenticator app:\n' + code + '\n Or enter code:', opts.secret) + }).then((code) => { + return readUserInfo.otp('And an OTP code from your authenticator: ') + }).then((otp1) => { + log.info('profile', 'Finalizing two factor authentication') + return profile.set({tfa: [otp1]}, conf) + }).then((result) => { + output('TFA successfully enabled. Below are your recovery codes, please print these out.') + output('You will need these to recover access to your account if you lose your authentication device.') + result.tfa.forEach((c) => output('\t' + c)) + }) + }) +} + +function disable2fa (args) { + const conf = config() + return pulseTillDone.withPromise(profile.get(conf)).then((info) => { + if (!info.tfa || info.tfa.pending) { + output('Two factor authentication not enabled.') + return + } + return readUserInfo.password().then((password) => { + return Bluebird.try(() => { + if (conf.auth.otp) return + return readUserInfo.otp('Enter one-time password from your authenticator: ').then((otp) => { + conf.auth.otp = otp + }) + }).then(() => { + log.info('profile', 'disabling tfa') + return pulseTillDone.withPromise(profile.set({tfa: {password: password, mode: 'disable'}}, conf)).then(() => { + if (conf.json) { + output(JSON.stringify({tfa: false}, null, 2)) + } else if (conf.parseable) { + output('tfa\tfalse') + } else { + output('Two factor authentication disabled.') + } + }) + }) + }) + }) +} + +function qrcode (url) { + return new Promise((resolve) => qrcodeTerminal.generate(url, resolve)) +} diff --git a/deps/npm/lib/publish.js b/deps/npm/lib/publish.js index 5d99bfd089..bf60e1d5a6 100644 --- a/deps/npm/lib/publish.js +++ b/deps/npm/lib/publish.js @@ -21,6 +21,7 @@ const readJson = BB.promisify(require('read-package-json')) const semver = require('semver') const statAsync = BB.promisify(require('graceful-fs').stat) const writeStreamAtomic = require('fs-write-stream-atomic') +const readUserInfo = require('./utils/read-user-info.js') publish.usage = 'npm publish [|] [--tag ] [--access ]' + "\n\nPublishes '.' if no argument supplied" + @@ -199,5 +200,13 @@ function upload (arg, pkg, isRetry, cached) { throw err } }) + }).catch((err) => { + if (err.code !== 'EOTP' && !(err.code === 'E401' && /one-time pass/.test(err.message))) throw err + // we prompt on stdout and read answers from stdin, so they need to be ttys. + if (!process.stdin.isTTY || !process.stdout.isTTY) throw err + return readUserInfo.otp('Enter OTP: ').then((otp) => { + npm.config.set('otp', otp) + return upload(arg, pkg, isRetry, cached) + }) }) } diff --git a/deps/npm/lib/restart.js b/deps/npm/lib/restart.js index 601249fd6b..41f9c3a756 100644 --- a/deps/npm/lib/restart.js +++ b/deps/npm/lib/restart.js @@ -1 +1 @@ -module.exports = require('./utils/lifecycle.js').cmd('restart') +module.exports = require('./utils/lifecycle-cmd.js')('restart') diff --git a/deps/npm/lib/run-script.js b/deps/npm/lib/run-script.js index 05bc1fe98b..fb7781f551 100644 --- a/deps/npm/lib/run-script.js +++ b/deps/npm/lib/run-script.js @@ -166,7 +166,7 @@ function run (pkg, wd, cmd, args, cb) { } // when running scripts explicitly, assume that they're trusted. - return [lifecycle, pkg, c, wd, true] + return [lifecycle, pkg, c, wd, { unsafePerm: true }] }), cb) } diff --git a/deps/npm/lib/shrinkwrap.js b/deps/npm/lib/shrinkwrap.js index a541d868fc..956a693646 100644 --- a/deps/npm/lib/shrinkwrap.js +++ b/deps/npm/lib/shrinkwrap.js @@ -101,7 +101,7 @@ function shrinkwrapDeps (deps, top, tree, seen) { if (!seen) seen = new Set() if (seen.has(tree)) return seen.add(tree) - tree.children.sort(function (aa, bb) { return moduleName(aa).localeCompare(moduleName(bb)) }).forEach(function (child) { + sortModules(tree.children).forEach(function (child) { if (child.fakeChild) { deps[moduleName(child)] = child.fakeChild return @@ -130,7 +130,7 @@ function shrinkwrapDeps (deps, top, tree, seen) { if (isOnlyOptional(child)) pkginfo.optional = true if (child.requires.length) { pkginfo.requires = {} - child.requires.sort((a, b) => moduleName(a).localeCompare(moduleName(b))).forEach((required) => { + sortModules(child.requires).forEach((required) => { var requested = required.package._requested || getRequested(required) || {} pkginfo.requires[moduleName(required)] = childVersion(top, required, requested) }) @@ -142,6 +142,14 @@ function shrinkwrapDeps (deps, top, tree, seen) { }) } +function sortModules (modules) { + // sort modules with the locale-agnostic Unicode sort + var sortedModuleNames = modules.map(moduleName).sort() + return modules.sort((a, b) => ( + sortedModuleNames.indexOf(moduleName(a)) - sortedModuleNames.indexOf(moduleName(b)) + )) +} + function childVersion (top, child, req) { if (req.type === 'directory' || req.type === 'file') { return 'file:' + unixFormatPath(path.relative(top.path, child.package._resolved || req.fetchSpec)) diff --git a/deps/npm/lib/start.js b/deps/npm/lib/start.js index 85d61e78d0..e978536500 100644 --- a/deps/npm/lib/start.js +++ b/deps/npm/lib/start.js @@ -1 +1 @@ -module.exports = require('./utils/lifecycle.js').cmd('start') +module.exports = require('./utils/lifecycle-cmd.js')('start') diff --git a/deps/npm/lib/stop.js b/deps/npm/lib/stop.js index e4d02ff281..fd43d08fc1 100644 --- a/deps/npm/lib/stop.js +++ b/deps/npm/lib/stop.js @@ -1 +1 @@ -module.exports = require('./utils/lifecycle.js').cmd('stop') +module.exports = require('./utils/lifecycle-cmd.js')('stop') diff --git a/deps/npm/lib/test.js b/deps/npm/lib/test.js index 4ef025c4ba..06138ac00a 100644 --- a/deps/npm/lib/test.js +++ b/deps/npm/lib/test.js @@ -1,12 +1,8 @@ module.exports = test -const testCmd = require('./utils/lifecycle.js').cmd('test') -const usage = require('./utils/usage') +const testCmd = require('./utils/lifecycle-cmd.js')('test') -test.usage = usage( - 'test', - 'npm test [-- ]' -) +test.usage = testCmd.usage function test (args, cb) { testCmd(args, function (er) { diff --git a/deps/npm/lib/token.js b/deps/npm/lib/token.js new file mode 100644 index 0000000000..a182b633d2 --- /dev/null +++ b/deps/npm/lib/token.js @@ -0,0 +1,211 @@ +'use strict' +const profile = require('npm-profile') +const npm = require('./npm.js') +const output = require('./utils/output.js') +const Table = require('cli-table2') +const Bluebird = require('bluebird') +const isCidrV4 = require('is-cidr').isCidrV4 +const isCidrV6 = require('is-cidr').isCidrV6 +const readUserInfo = require('./utils/read-user-info.js') +const ansistyles = require('ansistyles') +const log = require('npmlog') +const pulseTillDone = require('./utils/pulse-till-done.js') + +module.exports = token + +token.usage = + 'npm token list\n' + + 'npm token delete \n' + + 'npm token create [--read-only] [--cidr=list]\n' + +token.subcommands = ['list', 'delete', 'create'] + +token.completion = function (opts, cb) { + var argv = opts.conf.argv.remain + + switch (argv[2]) { + case 'list': + case 'delete': + case 'create': + return cb(null, []) + default: + return cb(new Error(argv[2] + ' not recognized')) + } +} + +function withCb (prom, cb) { + prom.then((value) => cb(null, value), cb) +} + +function token (args, cb) { + log.gauge.show('token') + if (args.length === 0) return withCb(list([]), cb) + switch (args[0]) { + case 'list': + case 'ls': + withCb(list(), cb) + break + case 'delete': + case 'rel': + case 'remove': + case 'rm': + withCb(rm(args.slice(1)), cb) + break + case 'create': + withCb(create(args.slice(1)), cb) + break + default: + cb(new Error('Unknown profile command: ' + args[0])) + } +} + +function generateTokenIds (tokens, minLength) { + const byId = {} + tokens.forEach((token) => { + token.id = token.key + for (let ii = minLength; ii < token.key.length; ++ii) { + if (!tokens.some((ot) => ot !== token && ot.key.slice(0, ii) === token.key.slice(0, ii))) { + token.id = token.key.slice(0, ii) + break + } + } + byId[token.id] = token + }) + return byId +} + +function config () { + const conf = { + json: npm.config.get('json'), + parseable: npm.config.get('parseable'), + registry: npm.config.get('registry'), + otp: npm.config.get('otp') + } + conf.auth = npm.config.getCredentialsByURI(conf.registry) + if (conf.otp) conf.auth.otp = conf.otp + return conf +} + +function list (args) { + const conf = config() + log.info('token', 'getting list') + return pulseTillDone.withPromise(profile.listTokens(conf)).then((tokens) => { + if (conf.json) { + output(JSON.stringify(tokens, null, 2)) + return + } else if (conf.parseable) { + output(['key', 'token', 'created', 'readonly', 'CIDR whitelist'].join('\t')) + tokens.forEach((token) => { + output([ + token.key, + token.token, + token.created, + token.readonly ? 'true' : 'false', + token.cidr_whitelist ? token.cidr_whitelist.join(',') : '' + ].join('\t')) + }) + return + } + generateTokenIds(tokens, 6) + const idWidth = tokens.reduce((acc, token) => Math.max(acc, token.id.length), 0) + const table = new Table({ + head: ['id', 'token', 'created', 'readonly', 'CIDR whitelist'], + colWidths: [Math.max(idWidth, 2) + 2, 9, 12, 10] + }) + tokens.forEach((token) => { + table.push([ + token.id, + token.token + '…', + String(token.created).slice(0, 10), + token.readonly ? 'yes' : 'no', + token.cidr_whitelist ? token.cidr_whitelist.join(', ') : '' + ]) + }) + output(table.toString()) + }) +} + +function rm (args) { + if (args.length === 0) { + throw new Error('npm token delete ') + } + const conf = config() + const toRemove = [] + const progress = log.newItem('removing tokens', toRemove.length) + progress.info('token', 'getting existing list') + return pulseTillDone.withPromise(profile.listTokens(conf).then((tokens) => { + args.forEach((id) => { + const matches = tokens.filter((token) => token.key.indexOf(id) === 0) + if (matches.length === 1) { + toRemove.push(matches[0].key) + } else if (matches.length > 1) { + throw new Error(`Token ID "${id}" was ambiguous, a new token may have been created since you last ran \`npm-profile token list\`.`) + } else { + const tokenMatches = tokens.filter((token) => id.indexOf(token.token) === 0) + if (tokenMatches === 0) { + throw new Error(`Unknown token id or value "${id}".`) + } + toRemove.push(id) + } + }) + return Bluebird.map(toRemove, (key) => { + progress.info('token', 'removing', key) + profile.removeToken(key, conf).then(() => profile.completeWork(1)) + }) + })).then(() => { + if (conf.json) { + output(JSON.stringify(toRemove)) + } else if (conf.parseable) { + output(toRemove.join('\t')) + } else { + output('Removed ' + toRemove.length + ' token' + (toRemove.length !== 1 ? 's' : '')) + } + }) +} + +function create (args) { + const conf = config() + const cidr = npm.config.get('cidr') + const readonly = npm.config.get('read-only') + + const validCIDR = validateCIDRList(cidr) + return readUserInfo.password().then((password) => { + log.info('token', 'creating') + return profile.createToken(password, readonly, validCIDR, conf).catch((ex) => { + if (ex.code !== 'EOTP') throw ex + log.info('token', 'failed because it requires OTP') + return readUserInfo.otp('Authenticator provided OTP:').then((otp) => { + conf.auth.otp = otp + log.info('token', 'creating with OTP') + return pulseTillDone.withPromise(profile.createToken(password, readonly, validCIDR, conf)) + }) + }) + }).then((result) => { + delete result.key + delete result.updated + if (conf.json) { + output(JSON.stringify(result)) + } else if (conf.parseable) { + Object.keys(result).forEach((k) => output(k + '\t' + result[k])) + } else { + const table = new Table() + Object.keys(result).forEach((k) => table.push({[ansistyles.bright(k)]: String(result[k])})) + output(table.toString()) + } + }) +} + +function validateCIDR (cidr) { + if (isCidrV6(cidr)) { + throw new Error('CIDR whitelist can only contain IPv4 addresses, ' + cidr + ' is IPv6') + } + if (!isCidrV4(cidr)) { + throw new Error('CIDR whitelist contains invalid CIDR entry: ' + cidr) + } +} + +function validateCIDRList (cidrs) { + const list = Array.isArray(cidrs) ? cidrs : cidrs ? cidrs.split(/,\s*/) : [] + list.forEach(validateCIDR) + return list +} diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js index 9ba5972d8a..78293c9ca2 100644 --- a/deps/npm/lib/unbuild.js +++ b/deps/npm/lib/unbuild.js @@ -38,14 +38,14 @@ function unbuild_ (silent) { if (er) return gentlyRm(folder, false, base, cb) chain( [ - [lifecycle, pkg, 'preuninstall', folder, false, true], - [lifecycle, pkg, 'uninstall', folder, false, true], + [lifecycle, pkg, 'preuninstall', folder, { failOk: true }], + [lifecycle, pkg, 'uninstall', folder, { failOk: true }], !silent && function (cb) { output('unbuild ' + pkg._id) cb() }, [rmStuff, pkg, folder], - [lifecycle, pkg, 'postuninstall', folder, false, true], + [lifecycle, pkg, 'postuninstall', folder, { failOk: true }], [gentlyRm, folder, false, base] ], cb @@ -60,7 +60,9 @@ function rmStuff (pkg, folder, cb) { // otherwise, then bins are in folder/../.bin var parent = pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder) var gnm = npm.dir - var top = gnm === parent + // gnm might be an absolute path, parent might be relative + // this checks they're the same directory regardless + var top = path.relative(gnm, parent) === '' log.verbose('unbuild rmStuff', pkg._id, 'from', gnm) if (!top) log.verbose('unbuild rmStuff', 'in', parent) diff --git a/deps/npm/lib/utils/convert-line-endings.js b/deps/npm/lib/utils/convert-line-endings.js new file mode 100644 index 0000000000..b05d328aac --- /dev/null +++ b/deps/npm/lib/utils/convert-line-endings.js @@ -0,0 +1,49 @@ +'use strict' + +const Transform = require('stream').Transform +const Bluebird = require('bluebird') +const fs = require('graceful-fs') +const stat = Bluebird.promisify(fs.stat) +const chmod = Bluebird.promisify(fs.chmod) +const fsWriteStreamAtomic = require('fs-write-stream-atomic') + +module.exports.dos2Unix = dos2Unix + +function dos2Unix (file) { + return stat(file).then((stats) => { + let previousChunkEndedInCR = false + return new Bluebird((resolve, reject) => { + fs.createReadStream(file) + .on('error', reject) + .pipe(new Transform({ + transform: function (chunk, encoding, done) { + let data = chunk.toString() + if (previousChunkEndedInCR) { + data = '\r' + data + } + if (data[data.length - 1] === '\r') { + data = data.slice(0, -1) + previousChunkEndedInCR = true + } else { + previousChunkEndedInCR = false + } + done(null, data.replace(/\r\n/g, '\n')) + }, + flush: function (done) { + if (previousChunkEndedInCR) { + this.push('\r') + } + done() + } + })) + .on('error', reject) + .pipe(fsWriteStreamAtomic(file)) + .on('error', reject) + .on('finish', function () { + resolve(chmod(file, stats.mode)) + }) + }) + }) +} + +// could add unix2Dos and legacy Mac functions if need be diff --git a/deps/npm/lib/utils/did-you-mean.js b/deps/npm/lib/utils/did-you-mean.js new file mode 100644 index 0000000000..8e72dde5fa --- /dev/null +++ b/deps/npm/lib/utils/did-you-mean.js @@ -0,0 +1,20 @@ +var meant = require('meant') +var output = require('./output.js') + +function didYouMean (scmd, commands) { + var bestSimilarity = meant(scmd, commands).map(function (str) { + return ' ' + str + }) + + if (bestSimilarity.length === 0) return + if (bestSimilarity.length === 1) { + output('\nDid you mean this?\n' + bestSimilarity[0]) + } else { + output( + ['\nDid you mean one of these?'] + .concat(bestSimilarity.slice(0, 3)).join('\n') + ) + } +} + +module.exports = didYouMean diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js index 52a675bea6..b2fd45a5f3 100644 --- a/deps/npm/lib/utils/error-handler.js +++ b/deps/npm/lib/utils/error-handler.js @@ -170,20 +170,12 @@ function errorHandler (er) { ;[ 'type', - 'fstream_path', - 'fstream_unc_path', - 'fstream_type', - 'fstream_class', - 'fstream_finish_call', - 'fstream_linkpath', 'stack', - 'fstream_stack', 'statusCode', 'pkgid' ].forEach(function (k) { var v = er[k] if (!v) return - if (k === 'fstream_stack') v = v.join('\n') log.verbose(k, v) }) diff --git a/deps/npm/lib/utils/error-message.js b/deps/npm/lib/utils/error-message.js index 49aa9124ec..028a18bbb6 100644 --- a/deps/npm/lib/utils/error-message.js +++ b/deps/npm/lib/utils/error-message.js @@ -66,8 +66,52 @@ function errorMessage (er) { ]) break - // TODO(isaacs) - // Add a special case here for E401 and E403 explaining auth issues? + case 'EOTP': + short.push(['', 'This operation requires a one-time password from your authenticator.']) + detail.push([ + '', + [ + 'You can provide a one-time password by passing --otp= to the command you ran.', + 'If you already provided a one-time password then it is likely that you either typoed', + 'it, or it timed out. Please try again.' + ].join('\n') + ]) + break + + case 'E401': + // npm ERR! code E401 + // npm ERR! Unable to authenticate, need: Basic + if (er.headers && er.headers['www-authenticate']) { + const auth = er.headers['www-authenticate'] + if (auth.indexOf('Bearer') !== -1) { + short.push(['', 'Unable to authenticate, your authentication token seems to be invalid.']) + detail.push([ + '', + [ + 'To correct this please trying logging in again with:', + ' npm login' + ].join('\n') + ]) + break + } else if (auth.indexOf('Basic') !== -1) { + short.push(['', 'Incorrect or missing password.']) + detail.push([ + '', + [ + 'If you were trying to login, change your password, create an', + 'authentication token or enable two-factor authentication then', + 'that means you likely typed your password in incorectly.', + 'Please try again, or recover your password at:', + ' https://www.npmjs.com/forgot', + '', + 'If you were doing some other operation then your saved credentials are', + 'probably out of date. To correct this please try logging in again with:', + ' npm login' + ].join('\n') + ]) + break + } + } case 'E404': // There's no need to have 404 in the message as well. diff --git a/deps/npm/lib/utils/is-hashbang-file.js b/deps/npm/lib/utils/is-hashbang-file.js new file mode 100644 index 0000000000..f1677381fa --- /dev/null +++ b/deps/npm/lib/utils/is-hashbang-file.js @@ -0,0 +1,19 @@ +'use strict' +const Bluebird = require('bluebird') +const fs = require('graceful-fs') +const open = Bluebird.promisify(fs.open) +const close = Bluebird.promisify(fs.close) + +module.exports = isHashbangFile + +function isHashbangFile (file) { + return open(file, 'r').then((fileHandle) => { + return new Bluebird((resolve, reject) => { + fs.read(fileHandle, new Buffer(new Array(2)), 0, 2, 0, function (err, bytesRead, buffer) { + close(fileHandle).then(() => { + resolve(!err && buffer.toString() === '#!') + }).catch(reject) + }) + }) + }) +} diff --git a/deps/npm/lib/utils/lifecycle-cmd.js b/deps/npm/lib/utils/lifecycle-cmd.js new file mode 100644 index 0000000000..bb802f45ee --- /dev/null +++ b/deps/npm/lib/utils/lifecycle-cmd.js @@ -0,0 +1,18 @@ +exports = module.exports = cmd + +var npm = require('../npm.js') +var usage = require('./usage.js') + +function cmd (stage) { + function CMD (args, cb) { + npm.commands['run-script']([stage].concat(args), cb) + } + CMD.usage = usage(stage, 'npm ' + stage + ' [-- ]') + var installedShallow = require('./completion/installed-shallow.js') + CMD.completion = function (opts, cb) { + installedShallow(opts, function (d) { + return d.scripts && d.scripts[stage] + }, cb) + } + return CMD +} diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js index 412c1c6944..2d3265e0eb 100644 --- a/deps/npm/lib/utils/lifecycle.js +++ b/deps/npm/lib/utils/lifecycle.js @@ -1,458 +1,14 @@ -exports = module.exports = lifecycle -exports.cmd = cmd -exports.makeEnv = makeEnv -exports._incorrectWorkingDirectory = _incorrectWorkingDirectory +exports = module.exports = runLifecycle -var log = require('npmlog') -var spawn = require('./spawn') -var npm = require('../npm.js') -var path = require('path') -var fs = require('graceful-fs') -var chain = require('slide').chain -var Stream = require('stream').Stream -var PATH = 'PATH' -var uidNumber = require('uid-number') -var umask = require('./umask') -var usage = require('./usage') -var output = require('./output.js') -var which = require('which') +const lifecycleOpts = require('../config/lifecycle') +const lifecycle = require('npm-lifecycle') -// windows calls it's path 'Path' usually, but this is not guaranteed. -if (process.platform === 'win32') { - PATH = 'Path' - Object.keys(process.env).forEach(function (e) { - if (e.match(/^PATH$/i)) { - PATH = e - } - }) -} - -function logid (pkg, stage) { - return pkg._id + '~' + stage + ':' -} - -function lifecycle (pkg, stage, wd, unsafe, failOk, cb) { - if (typeof cb !== 'function') { - cb = failOk - failOk = false - } - if (typeof cb !== 'function') { - cb = unsafe - unsafe = false - } - if (typeof cb !== 'function') { - cb = wd - wd = null - } - - while (pkg && pkg._data) pkg = pkg._data - if (!pkg) return cb(new Error('Invalid package data')) - - log.info('lifecycle', logid(pkg, stage), pkg._id) - if (!pkg.scripts) pkg.scripts = {} - - if (npm.config.get('ignore-scripts')) { - log.info('lifecycle', logid(pkg, stage), 'ignored because ignore-scripts is set to true', pkg._id) - pkg.scripts = {} - } - if (stage === 'prepublish' && npm.config.get('ignore-prepublish')) { - log.info('lifecycle', logid(pkg, stage), 'ignored because ignore-prepublish is set to true', pkg._id) - delete pkg.scripts.prepublish - } - - if (!pkg.scripts[stage]) return cb() - - validWd(wd || path.resolve(npm.dir, pkg.name), function (er, wd) { - if (er) return cb(er) - - unsafe = unsafe || npm.config.get('unsafe-perm') - - if ((wd.indexOf(npm.dir) !== 0 || _incorrectWorkingDirectory(wd, pkg)) && - !unsafe && pkg.scripts[stage]) { - log.warn('lifecycle', logid(pkg, stage), 'cannot run in wd', - '%s %s (wd=%s)', pkg._id, pkg.scripts[stage], wd - ) - return cb() - } - - // set the env variables, then run scripts as a child process. - var env = makeEnv(pkg) - env.npm_lifecycle_event = stage - env.npm_node_execpath = env.NODE = env.NODE || process.execPath - env.npm_execpath = require.main.filename - - // 'nobody' typically doesn't have permission to write to /tmp - // even if it's never used, sh freaks out. - if (!npm.config.get('unsafe-perm')) env.TMPDIR = wd - - lifecycle_(pkg, stage, wd, env, unsafe, failOk, cb) - }) -} - -function _incorrectWorkingDirectory (wd, pkg) { - return wd.lastIndexOf(pkg.name) !== wd.length - pkg.name.length -} - -function lifecycle_ (pkg, stage, wd, env, unsafe, failOk, cb) { - var pathArr = [] - var p = wd.split(/[\\\/]node_modules[\\\/]/) - var acc = path.resolve(p.shift()) - - p.forEach(function (pp) { - pathArr.unshift(path.join(acc, 'node_modules', '.bin')) - acc = path.join(acc, 'node_modules', pp) - }) - pathArr.unshift(path.join(acc, 'node_modules', '.bin')) - - // we also unshift the bundled node-gyp-bin folder so that - // the bundled one will be used for installing things. - pathArr.unshift(path.join(__dirname, '..', '..', 'bin', 'node-gyp-bin')) - - if (shouldPrependCurrentNodeDirToPATH()) { - // prefer current node interpreter in child scripts - pathArr.push(path.dirname(process.execPath)) - } - - if (env[PATH]) pathArr.push(env[PATH]) - env[PATH] = pathArr.join(process.platform === 'win32' ? ';' : ':') - - var packageLifecycle = pkg.scripts && pkg.scripts.hasOwnProperty(stage) - - if (packageLifecycle) { - // define this here so it's available to all scripts. - env.npm_lifecycle_script = pkg.scripts[stage] - } else { - log.silly('lifecycle', logid(pkg, stage), 'no script for ' + stage + ', continuing') - } - - function done (er) { - if (er) { - if (npm.config.get('force')) { - log.info('lifecycle', logid(pkg, stage), 'forced, continuing', er) - er = null - } else if (failOk) { - log.warn('lifecycle', logid(pkg, stage), 'continuing anyway', er.message) - er = null - } - } - cb(er) - } - - chain( - [ - packageLifecycle && [runPackageLifecycle, pkg, env, wd, unsafe], - [runHookLifecycle, pkg, env, wd, unsafe] - ], - done - ) -} - -function shouldPrependCurrentNodeDirToPATH () { - var cfgsetting = npm.config.get('scripts-prepend-node-path') - if (cfgsetting === false) return false - if (cfgsetting === true) return true - - var isDifferentNodeInPath - - var isWindows = process.platform === 'win32' - var foundExecPath - try { - foundExecPath = which.sync(path.basename(process.execPath), {pathExt: isWindows ? ';' : ':'}) - // Apply `fs.realpath()` here to avoid false positives when `node` is a symlinked executable. - isDifferentNodeInPath = fs.realpathSync(process.execPath).toUpperCase() !== - fs.realpathSync(foundExecPath).toUpperCase() - } catch (e) { - isDifferentNodeInPath = true - } - - if (cfgsetting === 'warn-only') { - if (isDifferentNodeInPath && !shouldPrependCurrentNodeDirToPATH.hasWarned) { - if (foundExecPath) { - log.warn('lifecycle', 'The node binary used for scripts is', foundExecPath, 'but npm is using', process.execPath, 'itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.') - } else { - log.warn('lifecycle', 'npm is using', process.execPath, 'but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.') - } - shouldPrependCurrentNodeDirToPATH.hasWarned = true - } - - return false - } - - return isDifferentNodeInPath -} - -function validWd (d, cb) { - fs.stat(d, function (er, st) { - if (er || !st.isDirectory()) { - var p = path.dirname(d) - if (p === d) { - return cb(new Error('Could not find suitable wd')) - } - return validWd(p, cb) - } - return cb(null, d) - }) -} - -function runPackageLifecycle (pkg, env, wd, unsafe, cb) { - // run package lifecycle scripts in the package root, or the nearest parent. - var stage = env.npm_lifecycle_event - var cmd = env.npm_lifecycle_script - - var note = '\n> ' + pkg._id + ' ' + stage + ' ' + wd + - '\n> ' + cmd + '\n' - runCmd(note, cmd, pkg, env, stage, wd, unsafe, cb) -} - -var running = false -var queue = [] -function dequeue () { - running = false - if (queue.length) { - var r = queue.shift() - runCmd.apply(null, r) - } -} - -function runCmd (note, cmd, pkg, env, stage, wd, unsafe, cb) { - if (running) { - queue.push([note, cmd, pkg, env, stage, wd, unsafe, cb]) - return - } - - running = true - log.pause() - var user = unsafe ? null : npm.config.get('user') - var group = unsafe ? null : npm.config.get('group') - - if (log.level !== 'silent') { - output(note) - } - log.verbose('lifecycle', logid(pkg, stage), 'unsafe-perm in lifecycle', unsafe) - - if (process.platform === 'win32') { - unsafe = true - } - - if (unsafe) { - runCmd_(cmd, pkg, env, wd, stage, unsafe, 0, 0, cb) - } else { - uidNumber(user, group, function (er, uid, gid) { - runCmd_(cmd, pkg, env, wd, stage, unsafe, uid, gid, cb) - }) - } -} - -function runCmd_ (cmd, pkg, env, wd, stage, unsafe, uid, gid, cb_) { - function cb (er) { - cb_.apply(null, arguments) - log.resume() - process.nextTick(dequeue) - } - - var conf = { - cwd: wd, - env: env, - stdio: [ 0, 1, 2 ] - } - - if (!unsafe) { - conf.uid = uid ^ 0 - conf.gid = gid ^ 0 - } - - var sh = 'sh' - var shFlag = '-c' - - var customShell = npm.config.get('script-shell') - - if (customShell) { - sh = customShell - } else if (process.platform === 'win32') { - sh = process.env.comspec || 'cmd' - shFlag = '/d /s /c' - conf.windowsVerbatimArguments = true - } - - log.verbose('lifecycle', logid(pkg, stage), 'PATH:', env[PATH]) - log.verbose('lifecycle', logid(pkg, stage), 'CWD:', wd) - log.silly('lifecycle', logid(pkg, stage), 'Args:', [shFlag, cmd]) - - var proc = spawn(sh, [shFlag, cmd], conf) - - proc.on('error', procError) - proc.on('close', function (code, signal) { - log.silly('lifecycle', logid(pkg, stage), 'Returned: code:', code, ' signal:', signal) - if (signal) { - process.kill(process.pid, signal) - } else if (code) { - var er = new Error('Exit status ' + code) - er.errno = code - } - procError(er) - }) - process.once('SIGTERM', procKill) - process.once('SIGINT', procInterupt) - - function procError (er) { - if (er) { - log.info('lifecycle', logid(pkg, stage), 'Failed to exec ' + stage + ' script') - er.message = pkg._id + ' ' + stage + ': `' + cmd + '`\n' + - er.message - if (er.code !== 'EPERM') { - er.code = 'ELIFECYCLE' - } - fs.stat(npm.dir, function (statError, d) { - if (statError && statError.code === 'ENOENT' && npm.dir.split(path.sep).slice(-1)[0] === 'node_modules') { - log.warn('', 'Local package.json exists, but node_modules missing, did you mean to install?') - } - }) - er.pkgid = pkg._id - er.stage = stage - er.script = cmd - er.pkgname = pkg.name - } - process.removeListener('SIGTERM', procKill) - process.removeListener('SIGTERM', procInterupt) - process.removeListener('SIGINT', procKill) - return cb(er) - } - function procKill () { - proc.kill() - } - function procInterupt () { - proc.kill('SIGINT') - proc.on('exit', function () { - process.exit() - }) - process.once('SIGINT', procKill) - } -} - -function runHookLifecycle (pkg, env, wd, unsafe, cb) { - // check for a hook script, run if present. - var stage = env.npm_lifecycle_event - var hook = path.join(npm.dir, '.hooks', stage) - var cmd = hook - - fs.stat(hook, function (er) { - if (er) return cb() - var note = '\n> ' + pkg._id + ' ' + stage + ' ' + wd + - '\n> ' + cmd - runCmd(note, hook, pkg, env, stage, wd, unsafe, cb) - }) -} - -function makeEnv (data, prefix, env) { - prefix = prefix || 'npm_package_' - if (!env) { - env = {} - for (var i in process.env) { - if (!i.match(/^npm_/)) { - env[i] = process.env[i] - } - } - - // express and others respect the NODE_ENV value. - if (npm.config.get('production')) env.NODE_ENV = 'production' - } else if (!data.hasOwnProperty('_lifecycleEnv')) { - Object.defineProperty(data, '_lifecycleEnv', - { - value: env, - enumerable: false - } - ) - } - - for (i in data) { - if (i.charAt(0) !== '_') { - var envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, '_') - if (i === 'readme') { - continue - } - if (data[i] && typeof data[i] === 'object') { - try { - // quick and dirty detection for cyclical structures - JSON.stringify(data[i]) - makeEnv(data[i], envKey + '_', env) - } catch (ex) { - // usually these are package objects. - // just get the path and basic details. - var d = data[i] - makeEnv( - { name: d.name, version: d.version, path: d.path }, - envKey + '_', - env - ) - } - } else { - env[envKey] = String(data[i]) - env[envKey] = env[envKey].indexOf('\n') !== -1 - ? JSON.stringify(env[envKey]) - : env[envKey] - } - } +function runLifecycle (pkg, stage, wd, moreOpts, cb) { + if (typeof moreOpts === 'function') { + cb = moreOpts + moreOpts = null } - if (prefix !== 'npm_package_') return env - - prefix = 'npm_config_' - var pkgConfig = {} - var keys = npm.config.keys - var pkgVerConfig = {} - var namePref = data.name + ':' - var verPref = data.name + '@' + data.version + ':' - - keys.forEach(function (i) { - // in some rare cases (e.g. working with nerf darts), there are segmented - // "private" (underscore-prefixed) config names -- don't export - if (i.charAt(0) === '_' && i.indexOf('_' + namePref) !== 0 || i.match(/:_/)) { - return - } - var value = npm.config.get(i) - if (value instanceof Stream || Array.isArray(value)) return - if (i.match(/umask/)) value = umask.toString(value) - if (!value) value = '' - else if (typeof value === 'number') value = '' + value - else if (typeof value !== 'string') value = JSON.stringify(value) - - value = value.indexOf('\n') !== -1 - ? JSON.stringify(value) - : value - i = i.replace(/^_+/, '') - var k - if (i.indexOf(namePref) === 0) { - k = i.substr(namePref.length).replace(/[^a-zA-Z0-9_]/g, '_') - pkgConfig[k] = value - } else if (i.indexOf(verPref) === 0) { - k = i.substr(verPref.length).replace(/[^a-zA-Z0-9_]/g, '_') - pkgVerConfig[k] = value - } - var envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, '_') - env[envKey] = value - }) - - prefix = 'npm_package_config_' - ;[pkgConfig, pkgVerConfig].forEach(function (conf) { - for (var i in conf) { - var envKey = (prefix + i) - env[envKey] = conf[i] - } - }) - - return env -} - -function cmd (stage) { - function CMD (args, cb) { - npm.commands['run-script']([stage].concat(args), cb) - } - CMD.usage = usage(stage, 'npm ' + stage + ' [-- ]') - var installedShallow = require('./completion/installed-shallow.js') - CMD.completion = function (opts, cb) { - installedShallow(opts, function (d) { - return d.scripts && d.scripts[stage] - }, cb) - } - return CMD + const opts = lifecycleOpts(moreOpts) + lifecycle(pkg, stage, wd, opts).then(cb, cb) } diff --git a/deps/npm/lib/utils/map-to-registry.js b/deps/npm/lib/utils/map-to-registry.js index 1f9798c09f..d6e0a5b01f 100644 --- a/deps/npm/lib/utils/map-to-registry.js +++ b/deps/npm/lib/utils/map-to-registry.js @@ -2,6 +2,7 @@ var url = require('url') var log = require('npmlog') var npa = require('npm-package-arg') +var config module.exports = mapToRegistry @@ -94,6 +95,8 @@ function scopeAuth (uri, registry, auth) { } else { log.silly('scopeAuth', uri, "doesn't share host with registry", registry) } + if (!config) config = require('../npm').config + if (config.get('otp')) cleaned.otp = config.get('otp') } return cleaned diff --git a/deps/npm/lib/utils/module-name.js b/deps/npm/lib/utils/module-name.js index 43e0f5fb12..89957b181f 100644 --- a/deps/npm/lib/utils/module-name.js +++ b/deps/npm/lib/utils/module-name.js @@ -11,7 +11,7 @@ function pathToPackageName (dir) { var name = path.relative(path.resolve(dir, '..'), dir) var scoped = path.relative(path.resolve(dir, '../..'), dir) if (scoped[0] === '@') return scoped.replace(/\\/g, '/') - return name + return name.trim() } module.exports.test.isNotEmpty = isNotEmpty @@ -22,7 +22,7 @@ function isNotEmpty (str) { var unknown = 0 function moduleName (tree) { var pkg = tree.package || tree - if (isNotEmpty(pkg.name)) return pkg.name + if (isNotEmpty(pkg.name) && typeof pkg.name === 'string') return pkg.name.trim() var pkgName = pathToPackageName(tree.path) if (pkgName !== '') return pkgName if (tree._invalidName != null) return tree._invalidName diff --git a/deps/npm/lib/utils/pulse-till-done.js b/deps/npm/lib/utils/pulse-till-done.js index 2669241306..b292c2fa56 100644 --- a/deps/npm/lib/utils/pulse-till-done.js +++ b/deps/npm/lib/utils/pulse-till-done.js @@ -1,22 +1,38 @@ 'use strict' -var validate = require('aproba') -var log = require('npmlog') +const validate = require('aproba') +const log = require('npmlog') +const Bluebird = require('bluebird') -var pulsers = 0 -var pulse +let pulsers = 0 +let pulse + +function pulseStart (prefix) { + if (++pulsers > 1) return + pulse = setInterval(function () { + log.gauge.pulse(prefix) + }, 150) +} +function pulseStop () { + if (--pulsers > 0) return + clearInterval(pulse) +} module.exports = function (prefix, cb) { validate('SF', [prefix, cb]) if (!prefix) prefix = 'network' - if (!pulsers++) { - pulse = setInterval(function () { - log.gauge.pulse(prefix) - }, 250) - } + pulseStart(prefix) return function () { - if (!--pulsers) { - clearInterval(pulse) - } + pulseStop() cb.apply(null, arguments) } } +module.exports.withPromise = pulseWhile + +function pulseWhile (prefix, promise) { + if (!promise) { + promise = prefix + prefix = '' + } + pulseStart(prefix) + return Bluebird.resolve(promise).finally(() => pulseStop()) +} diff --git a/deps/npm/lib/utils/read-user-info.js b/deps/npm/lib/utils/read-user-info.js new file mode 100644 index 0000000000..81bb44c98f --- /dev/null +++ b/deps/npm/lib/utils/read-user-info.js @@ -0,0 +1,65 @@ +'use strict' +const Bluebird = require('bluebird') +const readAsync = Bluebird.promisify(require('read')) +const userValidate = require('npm-user-validate') +const log = require('npmlog') + +exports.otp = readOTP +exports.password = readPassword +exports.username = readUsername +exports.email = readEmail + +function read (opts) { + return Bluebird.try(() => { + log.clearProgress() + return readAsync(opts) + }).finally(() => { + log.showProgress() + }) +} + +function readOTP (msg, otp, isRetry) { + if (!msg) msg = 'Enter OTP: ' + if (isRetry && otp && /^[\d ]+$|^[A-Fa-f0-9]{64,64}$/.test(otp)) return otp.replace(/\s+/g, '') + + return read({prompt: msg, default: otp || ''}) + .then((otp) => readOTP(msg, otp, true)) +} + +function readPassword (msg, password, isRetry) { + if (!msg) msg = 'npm password: ' + if (isRetry && password) return password + + return read({prompt: msg, silent: true, default: password || ''}) + .then((password) => readPassword(msg, password, true)) +} + +function readUsername (msg, username, opts, isRetry) { + if (!msg) msg = 'npm username: ' + if (isRetry && username) { + const error = userValidate.username(username) + if (error) { + opts.log && opts.log.warn(error.message) + } else { + return Promise.resolve(username.trim()) + } + } + + return read({prompt: msg, default: username || ''}) + .then((username) => readUsername(msg, username, opts, true)) +} + +function readEmail (msg, email, opts, isRetry) { + if (!msg) msg = 'email (this IS public): ' + if (isRetry && email) { + const error = userValidate.email(email) + if (error) { + opts.log && opts.log.warn(error.message) + } else { + return email.trim() + } + } + + return read({prompt: msg, default: email || ''}) + .then((username) => readEmail(msg, username, opts, true)) +} diff --git a/deps/npm/lib/utils/tar.js b/deps/npm/lib/utils/tar.js deleted file mode 100644 index 12719e37e2..0000000000 --- a/deps/npm/lib/utils/tar.js +++ /dev/null @@ -1,454 +0,0 @@ -'use strict' - -// commands for packing and unpacking tarballs -// this file is used by lib/cache.js - -var fs = require('graceful-fs') -var path = require('path') -var writeFileAtomic = require('write-file-atomic') -var writeStreamAtomic = require('fs-write-stream-atomic') -var log = require('npmlog') -var uidNumber = require('uid-number') -var readJson = require('read-package-json') -var tar = require('tar') -var zlib = require('zlib') -var fstream = require('fstream') -var Packer = require('fstream-npm') -var iferr = require('iferr') -var inherits = require('inherits') -var npm = require('../npm.js') -var rm = require('./gently-rm.js') -var myUid = process.getuid && process.getuid() -var myGid = process.getgid && process.getgid() -var readPackageTree = require('read-package-tree') -var union = require('lodash.union') -var moduleName = require('./module-name.js') -var packageId = require('./package-id.js') -var pulseTillDone = require('../utils/pulse-till-done.js') - -if (process.env.SUDO_UID && myUid === 0) { - if (!isNaN(process.env.SUDO_UID)) myUid = +process.env.SUDO_UID - if (!isNaN(process.env.SUDO_GID)) myGid = +process.env.SUDO_GID -} - -exports.pack = pack -exports.unpack = unpack - -function pack (tarball, folder, pkg, cb) { - log.verbose('tar pack', [tarball, folder]) - - log.verbose('tarball', tarball) - log.verbose('folder', folder) - - readJson(path.join(folder, 'package.json'), function (er, pkg) { - if (er || !pkg.bundleDependencies) { - pack_(tarball, folder, null, pkg, cb) - } else { - // we require this at runtime due to load-order issues, because recursive - // requires fail if you replace the exports object, and we do, not in deps, but - // in a dep of it. - var computeMetadata = require('../install/deps.js').computeMetadata - - readPackageTree(folder, pulseTillDone('pack:readTree:' + packageId(pkg), iferr(cb, function (tree) { - computeMetadata(tree) - pack_(tarball, folder, tree, pkg, pulseTillDone('pack:' + packageId(pkg), cb)) - }))) - } - }) -} - -function BundledPacker (props) { - Packer.call(this, props) -} -inherits(BundledPacker, Packer) - -BundledPacker.prototype.applyIgnores = function (entry, partial, entryObj) { - if (!entryObj || entryObj.type !== 'Directory') { - // package.json files can never be ignored. - if (entry === 'package.json') return true - - // readme files should never be ignored. - if (entry.match(/^readme(\.[^\.]*)$/i)) return true - - // license files should never be ignored. - if (entry.match(/^(license|licence)(\.[^\.]*)?$/i)) return true - - // copyright notice files should never be ignored. - if (entry.match(/^(notice)(\.[^\.]*)?$/i)) return true - - // changelogs should never be ignored. - if (entry.match(/^(changes|changelog|history)(\.[^\.]*)?$/i)) return true - } - - // special rules. see below. - if (entry === 'node_modules' && this.packageRoot) return true - - // package.json main file should never be ignored. - var mainFile = this.package && this.package.main - if (mainFile && path.resolve(this.path, entry) === path.resolve(this.path, mainFile)) return true - - // some files are *never* allowed under any circumstances - // (VCS folders, native build cruft, npm cruft, regular cruft) - if (entry === '.git' || - entry === 'CVS' || - entry === '.svn' || - entry === '.hg' || - entry === '.lock-wscript' || - entry.match(/^\.wafpickle-[0-9]+$/) || - (this.parent && this.parent.packageRoot && this.basename === 'build' && - entry === 'config.gypi') || - entry === 'npm-debug.log' || - entry === '.npmrc' || - entry.match(/^\..*\.swp$/) || - entry === '.DS_Store' || - entry.match(/^\._/) || - entry.match(/^.*\.orig$/) || - // Package locks are never allowed in tarballs -- use shrinkwrap instead - entry === 'package-lock.json' - ) { - return false - } - - // in a node_modules folder, we only include bundled dependencies - // also, prevent packages in node_modules from being affected - // by rules set in the containing package, so that - // bundles don't get busted. - // Also, once in a bundle, everything is installed as-is - // To prevent infinite cycles in the case of cyclic deps that are - // linked with npm link, even in a bundle, deps are only bundled - // if they're not already present at a higher level. - if (this.bundleMagic) { - // bubbling up. stop here and allow anything the bundled pkg allows - if (entry.charAt(0) === '@') { - var firstSlash = entry.indexOf('/') - // continue to list the packages in this scope - if (firstSlash === -1) return true - - // bubbling up. stop here and allow anything the bundled pkg allows - if (entry.indexOf('/', firstSlash + 1) !== -1) return true - // bubbling up. stop here and allow anything the bundled pkg allows - } else if (entry.indexOf('/') !== -1) { - return true - } - - // never include the .bin. It's typically full of platform-specific - // stuff like symlinks and .cmd files anyway. - if (entry === '.bin') return false - - // the package root. - var p = this.parent - // the directory before this one. - var pp = p && p.parent - // the directory before that (if this is scoped) - if (pp && pp.basename[0] === '@') pp = pp && pp.parent - - // if this entry has already been bundled, and is a symlink, - // and it is the *same* symlink as this one, then exclude it. - if (pp && pp.bundleLinks && this.bundleLinks && - pp.bundleLinks[entry] && - pp.bundleLinks[entry] === this.bundleLinks[entry]) { - return false - } - - // since it's *not* a symbolic link, if we're *already* in a bundle, - // then we should include everything. - if (pp && pp.package && pp.basename === 'node_modules') { - return true - } - - // only include it at this point if it's a bundleDependency - return this.isBundled(entry) - } - // if (this.bundled) return true - - return Packer.prototype.applyIgnores.call(this, entry, partial, entryObj) -} - -function nameMatch (name) { return function (other) { return name === moduleName(other) } } - -function pack_ (tarball, folder, tree, pkg, cb) { - function InstancePacker (props) { - BundledPacker.call(this, props) - } - inherits(InstancePacker, BundledPacker) - InstancePacker.prototype.isBundled = function (name) { - var bd = this.package && this.package.bundleDependencies - if (!bd) return false - - if (!Array.isArray(bd)) { - throw new Error(packageId(this) + '\'s `bundledDependencies` should ' + - 'be an array') - } - if (!tree) return false - - if (bd.indexOf(name) !== -1) return true - var pkg = tree.children.filter(nameMatch(name))[0] - if (!pkg) return false - var requiredBy = [].concat(pkg.requiredBy) - var seen = new Set() - while (requiredBy.length) { - var reqPkg = requiredBy.shift() - if (seen.has(reqPkg)) continue - seen.add(reqPkg) - if (!reqPkg) continue - if (reqPkg.parent === tree && bd.indexOf(moduleName(reqPkg)) !== -1) { - return true - } - requiredBy = union(requiredBy, reqPkg.requiredBy) - } - return false - } - - new InstancePacker({ path: folder, type: 'Directory', isDirectory: true }) - .on('error', function (er) { - if (er) log.error('tar pack', 'Error reading ' + folder) - return cb(er) - }) - - // By default, npm includes some proprietary attributes in the - // package tarball. This is sane, and allowed by the spec. - // However, npm *itself* excludes these from its own package, - // so that it can be more easily bootstrapped using old and - // non-compliant tar implementations. - .pipe(tar.Pack({ noProprietary: !npm.config.get('proprietary-attribs') })) - .on('error', function (er) { - if (er) log.error('tar.pack', 'tar creation error', tarball) - cb(er) - }) - .pipe(zlib.Gzip()) - .on('error', function (er) { - if (er) log.error('tar.pack', 'gzip error ' + tarball) - cb(er) - }) - .pipe(writeStreamAtomic(tarball)) - .on('error', function (er) { - if (er) log.error('tar.pack', 'Could not write ' + tarball) - cb(er) - }) - .on('close', cb) -} - -function unpack (tarball, unpackTarget, dMode, fMode, uid, gid, cb) { - log.verbose('tar', 'unpack', tarball) - log.verbose('tar', 'unpacking to', unpackTarget) - if (typeof cb !== 'function') { - cb = gid - gid = null - } - if (typeof cb !== 'function') { - cb = uid - uid = null - } - if (typeof cb !== 'function') { - cb = fMode - fMode = npm.modes.file - } - if (typeof cb !== 'function') { - cb = dMode - dMode = npm.modes.exec - } - - uidNumber(uid, gid, function (er, uid, gid) { - if (er) return cb(er) - unpack_(tarball, unpackTarget, dMode, fMode, uid, gid, cb) - }) -} - -function unpack_ (tarball, unpackTarget, dMode, fMode, uid, gid, cb) { - rm(unpackTarget, function (er) { - if (er) return cb(er) - // gzip {tarball} --decompress --stdout \ - // | tar -mvxpf - --strip-components=1 -C {unpackTarget} - gunzTarPerm(tarball, unpackTarget, - dMode, fMode, - uid, gid, - function (er, folder) { - if (er) return cb(er) - readJson(path.resolve(folder, 'package.json'), cb) - }) - }) -} - -function gunzTarPerm (tarball, target, dMode, fMode, uid, gid, cb_) { - if (!dMode) dMode = npm.modes.exec - if (!fMode) fMode = npm.modes.file - log.silly('gunzTarPerm', 'modes', [dMode.toString(8), fMode.toString(8)]) - - var cbCalled = false - function cb (er) { - if (cbCalled) return - cbCalled = true - cb_(er, target) - } - - var fst = fs.createReadStream(tarball) - - fst.on('open', function (fd) { - fs.fstat(fd, function (er, st) { - if (er) return fst.emit('error', er) - if (st.size === 0) { - er = new Error('0-byte tarball\n' + - 'Please run `npm cache clean`') - fst.emit('error', er) - } - }) - }) - - // figure out who we're supposed to be, if we're not pretending - // to be a specific user. - if (npm.config.get('unsafe-perm') && process.platform !== 'win32') { - uid = myUid - gid = myGid - } - - function extractEntry (entry) { - log.silly('gunzTarPerm', 'extractEntry', entry.path) - // never create things that are user-unreadable, - // or dirs that are user-un-listable. Only leads to headaches. - var originalMode = entry.mode = entry.mode || entry.props.mode - entry.mode = entry.mode | (entry.type === 'Directory' ? dMode : fMode) - entry.mode = entry.mode & (~npm.modes.umask) - entry.props.mode = entry.mode - if (originalMode !== entry.mode) { - log.silly('gunzTarPerm', 'modified mode', - [entry.path, originalMode, entry.mode]) - } - - // if there's a specific owner uid/gid that we want, then set that - if (process.platform !== 'win32' && - typeof uid === 'number' && - typeof gid === 'number') { - entry.props.uid = entry.uid = uid - entry.props.gid = entry.gid = gid - } - } - - var extractOpts = { type: 'Directory', path: target, strip: 1 } - - if (process.platform !== 'win32' && - typeof uid === 'number' && - typeof gid === 'number') { - extractOpts.uid = uid - extractOpts.gid = gid - } - - var sawIgnores = {} - extractOpts.filter = function () { - // symbolic links are not allowed in packages. - if (this.type.match(/^.*Link$/)) { - log.warn('excluding symbolic link', - this.path.substr(target.length + 1) + - ' -> ' + this.linkpath) - return false - } - - // Note: This mirrors logic in the fs read operations that are - // employed during tarball creation, in the fstream-npm module. - // It is duplicated here to handle tarballs that are created - // using other means, such as system tar or git archive. - if (this.type === 'File') { - var base = path.basename(this.path) - if (base === '.npmignore') { - sawIgnores[ this.path ] = true - } else if (base === '.gitignore') { - var npmignore = this.path.replace(/\.gitignore$/, '.npmignore') - if (sawIgnores[npmignore]) { - // Skip this one, already seen. - return false - } else { - // Rename, may be clobbered later. - this.path = npmignore - this._path = npmignore - } - } - } - - return true - } - - fst - .on('error', function (er) { - if (er) log.error('tar.unpack', 'error reading ' + tarball) - cb(er) - }) - .on('data', function OD (c) { - // detect what it is. - // Then, depending on that, we'll figure out whether it's - // a single-file module, gzipped tarball, or naked tarball. - // gzipped files all start with 1f8b08 - if (c[0] === 0x1F && - c[1] === 0x8B && - c[2] === 0x08) { - fst - .pipe(zlib.Unzip()) - .on('error', function (er) { - if (er) log.error('tar.unpack', 'unzip error ' + tarball) - cb(er) - }) - .pipe(tar.Extract(extractOpts)) - .on('entry', extractEntry) - .on('error', function (er) { - if (er) log.error('tar.unpack', 'untar error ' + tarball) - cb(er) - }) - .on('close', cb) - } else if (hasTarHeader(c)) { - // naked tar - fst - .pipe(tar.Extract(extractOpts)) - .on('entry', extractEntry) - .on('error', function (er) { - if (er) log.error('tar.unpack', 'untar error ' + tarball) - cb(er) - }) - .on('close', cb) - } else { - // naked js file - var jsOpts = { path: path.resolve(target, 'index.js') } - - if (process.platform !== 'win32' && - typeof uid === 'number' && - typeof gid === 'number') { - jsOpts.uid = uid - jsOpts.gid = gid - } - - fst - .pipe(fstream.Writer(jsOpts)) - .on('error', function (er) { - if (er) log.error('tar.unpack', 'copy error ' + tarball) - cb(er) - }) - .on('close', function () { - var j = path.resolve(target, 'package.json') - readJson(j, function (er, d) { - if (er) { - log.error('not a package', tarball) - return cb(er) - } - writeFileAtomic(j, JSON.stringify(d) + '\n', cb) - }) - }) - } - - // now un-hook, and re-emit the chunk - fst.removeListener('data', OD) - fst.emit('data', c) - }) -} - -function hasTarHeader (c) { - return c[257] === 0x75 && // tar archives have 7573746172 at position - c[258] === 0x73 && // 257 and 003030 or 202000 at position 262 - c[259] === 0x74 && - c[260] === 0x61 && - c[261] === 0x72 && - - ((c[262] === 0x00 && - c[263] === 0x30 && - c[264] === 0x30) || - - (c[262] === 0x20 && - c[263] === 0x20 && - c[264] === 0x00)) -} diff --git a/deps/npm/lib/utils/unsupported.js b/deps/npm/lib/utils/unsupported.js index 91f494f4be..13535515e4 100644 --- a/deps/npm/lib/utils/unsupported.js +++ b/deps/npm/lib/utils/unsupported.js @@ -1,13 +1,19 @@ 'use strict' var semver = require('semver') -var supportedNode = '>= 4' -var knownBroken = '>=0.1 <=0.7' +var supportedNode = [ + {ver: '4', min: '4.7.0'}, + {ver: '6', min: '6.0.0'}, + {ver: '7', min: '7.0.0'}, + {ver: '8', min: '8.0.0'} +] +var knownBroken = '<4.7.0' var checkVersion = exports.checkVersion = function (version) { var versionNoPrerelease = version.replace(/-.*$/, '') return { + version: versionNoPrerelease, broken: semver.satisfies(versionNoPrerelease, knownBroken), - unsupported: !semver.satisfies(versionNoPrerelease, supportedNode) + unsupported: !semver.satisfies(versionNoPrerelease, supportedNode.map(function (n) { return '^' + n.min }).join('||')) } } @@ -15,8 +21,18 @@ exports.checkForBrokenNode = function () { var nodejs = checkVersion(process.version) if (nodejs.broken) { console.error('ERROR: npm is known not to run on Node.js ' + process.version) + supportedNode.forEach(function (rel) { + if (semver.satisfies(nodejs.version, rel.ver)) { + console.error('Node.js ' + rel.ver + " is supported but the specific version you're running has") + console.error(`a bug known to break npm. Please update to at least ${rel.min} to use this`) + console.error('version of npm. You can find the latest release of Node.js at https://nodejs.org/') + process.exit(1) + } + }) + var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ') console.error("You'll need to upgrade to a newer version in order to use this") - console.error('version of npm. You can find the latest version at https://nodejs.org/') + console.error('version of npm. Supported versions are ' + supportedMajors + '. You can find the') + console.error('latest version at https://nodejs.org/') process.exit(1) } } @@ -25,9 +41,11 @@ exports.checkForUnsupportedNode = function () { var nodejs = checkVersion(process.version) if (nodejs.unsupported) { var log = require('npmlog') + var supportedMajors = supportedNode.map(function (n) { return n.ver }).join(', ') log.warn('npm', 'npm does not support Node.js ' + process.version) log.warn('npm', 'You should probably upgrade to a newer version of node as we') log.warn('npm', "can't make any promises that npm will work with this version.") + log.warn('npm', 'Supported releases of Node.js are the latest release of ' + supportedMajors + '.') log.warn('npm', 'You can find the latest version at https://nodejs.org/') } } diff --git a/deps/npm/lib/version.js b/deps/npm/lib/version.js index c52b5158a0..edcd664f2a 100644 --- a/deps/npm/lib/version.js +++ b/deps/npm/lib/version.js @@ -278,14 +278,22 @@ function checkGit (localData, cb) { }) } +module.exports.buildCommitArgs = buildCommitArgs +function buildCommitArgs (args) { + args = args || [ 'commit' ] + if (!npm.config.get('commit-hooks')) args.push('-n') + return args +} + function _commit (version, localData, cb) { const options = { env: process.env } const message = npm.config.get('message').replace(/%s/g, version) const sign = npm.config.get('sign-git-tag') + const commitArgs = buildCommitArgs([ 'commit', '-m', message ]) const flagForTag = sign ? '-sm' : '-am' stagePackageFiles(localData, options).then(() => { - return git.exec([ 'commit', '-m', message ], options) + return git.exec(commitArgs, options) }).then(() => { if (!localData.existingTag) { return git.exec([ diff --git a/deps/npm/man/man1/npm-README.1 b/deps/npm/man/man1/npm-README.1 index 7d44d1c151..b3822ede6c 100644 --- a/deps/npm/man/man1/npm-README.1 +++ b/deps/npm/man/man1/npm-README.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "July 2017" "" "" +.TH "NPM" "1" "October 2017" "" "" .SH "NAME" \fBnpm\fR \- a JavaScript package manager .P @@ -143,12 +143,12 @@ this means that future npm installs will not remember the settings that you have chosen\. .SH More Docs .P -Check out the docs \fIhttps://docs\.npmjs\.com/\fR, +Check out the docs \fIhttps://docs\.npmjs\.com/\fR\|\. .P You can use the \fBnpm help\fP command to read any of them\. .P If you're a developer, and you want to use npm to publish your program, -you should read this \fIhttps://docs\.npmjs\.com/misc/developers\fR +you should read this \fIhttps://docs\.npmjs\.com/misc/developers\fR\|\. .SH BUGS .P When you find issues, please report them: diff --git a/deps/npm/man/man1/npm-access.1 b/deps/npm/man/man1/npm-access.1 index 2f86c38544..0501df5268 100644 --- a/deps/npm/man/man1/npm-access.1 +++ b/deps/npm/man/man1/npm-access.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ACCESS" "1" "July 2017" "" "" +.TH "NPM\-ACCESS" "1" "October 2017" "" "" .SH "NAME" \fBnpm-access\fR \- Set access level on published packages .SH SYNOPSIS @@ -69,6 +69,9 @@ of a team or directly as an owner\. .RE .P +If you have two\-factor authentication enabled then you'll have to pass in an +otp with \fB\-\-otp\fP when making access changes\. +.P If your account is not paid, then attempts to publish scoped packages will fail with an HTTP 402 status code (logically enough), unless you use \fB\-\-access=public\fP\|\. diff --git a/deps/npm/man/man1/npm-adduser.1 b/deps/npm/man/man1/npm-adduser.1 index b90fd9ebd5..b49cd00813 100644 --- a/deps/npm/man/man1/npm-adduser.1 +++ b/deps/npm/man/man1/npm-adduser.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ADDUSER" "1" "July 2017" "" "" +.TH "NPM\-ADDUSER" "1" "October 2017" "" "" .SH "NAME" \fBnpm-adduser\fR \- Add a registry user account .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bin.1 b/deps/npm/man/man1/npm-bin.1 index 9571db127a..7f6a47eb60 100644 --- a/deps/npm/man/man1/npm-bin.1 +++ b/deps/npm/man/man1/npm-bin.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BIN" "1" "July 2017" "" "" +.TH "NPM\-BIN" "1" "October 2017" "" "" .SH "NAME" \fBnpm-bin\fR \- Display npm bin folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bugs.1 b/deps/npm/man/man1/npm-bugs.1 index 7126fda85f..ab89fd618b 100644 --- a/deps/npm/man/man1/npm-bugs.1 +++ b/deps/npm/man/man1/npm-bugs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUGS" "1" "July 2017" "" "" +.TH "NPM\-BUGS" "1" "October 2017" "" "" .SH "NAME" \fBnpm-bugs\fR \- Bugs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-build.1 b/deps/npm/man/man1/npm-build.1 index 909ea65105..fa27f24e90 100644 --- a/deps/npm/man/man1/npm-build.1 +++ b/deps/npm/man/man1/npm-build.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUILD" "1" "July 2017" "" "" +.TH "NPM\-BUILD" "1" "October 2017" "" "" .SH "NAME" \fBnpm-build\fR \- Build a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-bundle.1 b/deps/npm/man/man1/npm-bundle.1 index 522dcc1a36..982a48844d 100644 --- a/deps/npm/man/man1/npm-bundle.1 +++ b/deps/npm/man/man1/npm-bundle.1 @@ -1,4 +1,4 @@ -.TH "NPM\-BUNDLE" "1" "July 2017" "" "" +.TH "NPM\-BUNDLE" "1" "October 2017" "" "" .SH "NAME" \fBnpm-bundle\fR \- REMOVED .SH DESCRIPTION diff --git a/deps/npm/man/man1/npm-cache.1 b/deps/npm/man/man1/npm-cache.1 index 9309a00a61..47c7b779ca 100644 --- a/deps/npm/man/man1/npm-cache.1 +++ b/deps/npm/man/man1/npm-cache.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CACHE" "1" "July 2017" "" "" +.TH "NPM\-CACHE" "1" "October 2017" "" "" .SH "NAME" \fBnpm-cache\fR \- Manipulates packages cache .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-completion.1 b/deps/npm/man/man1/npm-completion.1 index cd3343d7f6..809c97d663 100644 --- a/deps/npm/man/man1/npm-completion.1 +++ b/deps/npm/man/man1/npm-completion.1 @@ -1,4 +1,4 @@ -.TH "NPM\-COMPLETION" "1" "July 2017" "" "" +.TH "NPM\-COMPLETION" "1" "October 2017" "" "" .SH "NAME" \fBnpm-completion\fR \- Tab Completion for npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-config.1 b/deps/npm/man/man1/npm-config.1 index e98d3b52be..22bd768f94 100644 --- a/deps/npm/man/man1/npm-config.1 +++ b/deps/npm/man/man1/npm-config.1 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "1" "July 2017" "" "" +.TH "NPM\-CONFIG" "1" "October 2017" "" "" .SH "NAME" \fBnpm-config\fR \- Manage the npm configuration files .SH SYNOPSIS @@ -8,7 +8,7 @@ npm config set [\-g|\-\-global] npm config get npm config delete -npm config list [\-l] +npm config list [\-l] [\-\-json] npm config edit npm get npm set [\-g|\-\-global] @@ -59,7 +59,8 @@ npm config list .fi .RE .P -Show all the config settings\. Use \fB\-l\fP to also show defaults\. +Show all the config settings\. Use \fB\-l\fP to also show defaults\. Use \fB\-\-json\fP +to show the settings in json format\. .SS delete .P .RS 2 diff --git a/deps/npm/man/man1/npm-dedupe.1 b/deps/npm/man/man1/npm-dedupe.1 index ffce7a4328..6f6365224b 100644 --- a/deps/npm/man/man1/npm-dedupe.1 +++ b/deps/npm/man/man1/npm-dedupe.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEDUPE" "1" "July 2017" "" "" +.TH "NPM\-DEDUPE" "1" "October 2017" "" "" .SH "NAME" \fBnpm-dedupe\fR \- Reduce duplication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-deprecate.1 b/deps/npm/man/man1/npm-deprecate.1 index f3f103bdf1..32df69bf30 100644 --- a/deps/npm/man/man1/npm-deprecate.1 +++ b/deps/npm/man/man1/npm-deprecate.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DEPRECATE" "1" "July 2017" "" "" +.TH "NPM\-DEPRECATE" "1" "October 2017" "" "" .SH "NAME" \fBnpm-deprecate\fR \- Deprecate a version of a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-dist-tag.1 b/deps/npm/man/man1/npm-dist-tag.1 index 3167e8e6cd..3e77ec58ed 100644 --- a/deps/npm/man/man1/npm-dist-tag.1 +++ b/deps/npm/man/man1/npm-dist-tag.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DIST\-TAG" "1" "July 2017" "" "" +.TH "NPM\-DIST\-TAG" "1" "October 2017" "" "" .SH "NAME" \fBnpm-dist-tag\fR \- Modify package distribution tags .SH SYNOPSIS @@ -19,7 +19,9 @@ Add, remove, and enumerate distribution tags on a package: .IP \(bu 2 add: Tags the specified version of the package with the specified tag, or the -\fB\-\-tag\fP config if not specified\. +\fB\-\-tag\fP config if not specified\. The tag you're adding is \fBlatest\fP and you +have two\-factor authentication on auth\-and\-writes then you'll need to include +an otp on the command line with \fB\-\-otp\fP\|\. .IP \(bu 2 rm: Clear a tag that is no longer in use from the package\. diff --git a/deps/npm/man/man1/npm-docs.1 b/deps/npm/man/man1/npm-docs.1 index 84881635a0..a2cec0fe66 100644 --- a/deps/npm/man/man1/npm-docs.1 +++ b/deps/npm/man/man1/npm-docs.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCS" "1" "July 2017" "" "" +.TH "NPM\-DOCS" "1" "October 2017" "" "" .SH "NAME" \fBnpm-docs\fR \- Docs for a package in a web browser maybe .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-doctor.1 b/deps/npm/man/man1/npm-doctor.1 index 7a0b057b75..58bc8239bf 100644 --- a/deps/npm/man/man1/npm-doctor.1 +++ b/deps/npm/man/man1/npm-doctor.1 @@ -1,4 +1,4 @@ -.TH "NPM\-DOCTOR" "1" "July 2017" "" "" +.TH "NPM\-DOCTOR" "1" "October 2017" "" "" .SH "NAME" \fBnpm-doctor\fR \- Check your environments .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-edit.1 b/deps/npm/man/man1/npm-edit.1 index 63cdeb77ca..51e952d387 100644 --- a/deps/npm/man/man1/npm-edit.1 +++ b/deps/npm/man/man1/npm-edit.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EDIT" "1" "July 2017" "" "" +.TH "NPM\-EDIT" "1" "October 2017" "" "" .SH "NAME" \fBnpm-edit\fR \- Edit an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-explore.1 b/deps/npm/man/man1/npm-explore.1 index ac993ff4dd..5788365fc5 100644 --- a/deps/npm/man/man1/npm-explore.1 +++ b/deps/npm/man/man1/npm-explore.1 @@ -1,4 +1,4 @@ -.TH "NPM\-EXPLORE" "1" "July 2017" "" "" +.TH "NPM\-EXPLORE" "1" "October 2017" "" "" .SH "NAME" \fBnpm-explore\fR \- Browse an installed package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help-search.1 b/deps/npm/man/man1/npm-help-search.1 index 0d7971406a..dec9f7811f 100644 --- a/deps/npm/man/man1/npm-help-search.1 +++ b/deps/npm/man/man1/npm-help-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP\-SEARCH" "1" "July 2017" "" "" +.TH "NPM\-HELP\-SEARCH" "1" "October 2017" "" "" .SH "NAME" \fBnpm-help-search\fR \- Search npm help documentation .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-help.1 b/deps/npm/man/man1/npm-help.1 index 224d45a35d..1f1efc0241 100644 --- a/deps/npm/man/man1/npm-help.1 +++ b/deps/npm/man/man1/npm-help.1 @@ -1,4 +1,4 @@ -.TH "NPM\-HELP" "1" "July 2017" "" "" +.TH "NPM\-HELP" "1" "October 2017" "" "" .SH "NAME" \fBnpm-help\fR \- Get help on npm .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-init.1 b/deps/npm/man/man1/npm-init.1 index 38bf391be8..88942c3473 100644 --- a/deps/npm/man/man1/npm-init.1 +++ b/deps/npm/man/man1/npm-init.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INIT" "1" "July 2017" "" "" +.TH "NPM\-INIT" "1" "October 2017" "" "" .SH "NAME" \fBnpm-init\fR \- Interactively create a package\.json file .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install-test.1 b/deps/npm/man/man1/npm-install-test.1 index af1356d609..d89fc1fbb9 100644 --- a/deps/npm/man/man1/npm-install-test.1 +++ b/deps/npm/man/man1/npm-install-test.1 @@ -1,4 +1,4 @@ -.TH "NPM" "" "July 2017" "" "" +.TH "NPM" "" "October 2017" "" "" .SH "NAME" \fBnpm\fR .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-install.1 b/deps/npm/man/man1/npm-install.1 index b33c7e8f8e..5327cdd911 100644 --- a/deps/npm/man/man1/npm-install.1 +++ b/deps/npm/man/man1/npm-install.1 @@ -1,4 +1,4 @@ -.TH "NPM\-INSTALL" "1" "July 2017" "" "" +.TH "NPM\-INSTALL" "1" "October 2017" "" "" .SH "NAME" \fBnpm-install\fR \- Install a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-link.1 b/deps/npm/man/man1/npm-link.1 index a1fa966c0f..5776f241ba 100644 --- a/deps/npm/man/man1/npm-link.1 +++ b/deps/npm/man/man1/npm-link.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LINK" "1" "July 2017" "" "" +.TH "NPM\-LINK" "1" "October 2017" "" "" .SH "NAME" \fBnpm-link\fR \- Symlink a package folder .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-logout.1 b/deps/npm/man/man1/npm-logout.1 index 74c2214464..d596d4e55e 100644 --- a/deps/npm/man/man1/npm-logout.1 +++ b/deps/npm/man/man1/npm-logout.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LOGOUT" "1" "July 2017" "" "" +.TH "NPM\-LOGOUT" "1" "October 2017" "" "" .SH "NAME" \fBnpm-logout\fR \- Log out of the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 5c6744e450..1d0ffbd059 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -1,4 +1,4 @@ -.TH "NPM\-LS" "1" "July 2017" "" "" +.TH "NPM\-LS" "1" "October 2017" "" "" .SH "NAME" \fBnpm-ls\fR \- List installed packages .SH SYNOPSIS @@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show: .P .RS 2 .nf -npm@5.3.0 /path/to/npm +npm@5.5.1 /path/to/npm └─┬ init\-package\-json@0\.0\.4 └── promzard@0\.1\.5 .fi diff --git a/deps/npm/man/man1/npm-outdated.1 b/deps/npm/man/man1/npm-outdated.1 index ccd38acb17..9650351655 100644 --- a/deps/npm/man/man1/npm-outdated.1 +++ b/deps/npm/man/man1/npm-outdated.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OUTDATED" "1" "July 2017" "" "" +.TH "NPM\-OUTDATED" "1" "October 2017" "" "" .SH "NAME" \fBnpm-outdated\fR \- Check for outdated packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-owner.1 b/deps/npm/man/man1/npm-owner.1 index 62be1bdcd0..bc0b952ad2 100644 --- a/deps/npm/man/man1/npm-owner.1 +++ b/deps/npm/man/man1/npm-owner.1 @@ -1,4 +1,4 @@ -.TH "NPM\-OWNER" "1" "July 2017" "" "" +.TH "NPM\-OWNER" "1" "October 2017" "" "" .SH "NAME" \fBnpm-owner\fR \- Manage package owners .SH SYNOPSIS @@ -34,6 +34,10 @@ privileges\. Note that there is only one level of access\. Either you can modify a package, or you can't\. Future versions may contain more fine\-grained access levels, but that is not implemented at this time\. +.P +If you have two\-factor authentication enabled with \fBauth\-and\-writes\fP then +you'll need to include an otp on the command line when changing ownership +with \fB\-\-otp\fP\|\. .SH SEE ALSO .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-pack.1 b/deps/npm/man/man1/npm-pack.1 index 2e70602351..0dc0fe8d6b 100644 --- a/deps/npm/man/man1/npm-pack.1 +++ b/deps/npm/man/man1/npm-pack.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PACK" "1" "July 2017" "" "" +.TH "NPM\-PACK" "1" "October 2017" "" "" .SH "NAME" \fBnpm-pack\fR \- Create a tarball from a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-ping.1 b/deps/npm/man/man1/npm-ping.1 index 33693a1a5c..f541b907e2 100644 --- a/deps/npm/man/man1/npm-ping.1 +++ b/deps/npm/man/man1/npm-ping.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PING" "1" "July 2017" "" "" +.TH "NPM\-PING" "1" "October 2017" "" "" .SH "NAME" \fBnpm-ping\fR \- Ping npm registry .SH SYNOPSIS @@ -11,6 +11,21 @@ npm ping [\-\-registry ] .SH DESCRIPTION .P Ping the configured or given npm registry and verify authentication\. +If it works it will output something like: +.P +.RS 2 +.nf +Ping success: {*Details about registry*} +.fi +.RE +.P +otherwise you will get: +.P +.RS 2 +.nf +Ping error: {*Detail about error} +.fi +.RE .SH SEE ALSO .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-prefix.1 b/deps/npm/man/man1/npm-prefix.1 index 27fb7e9ef4..78df65f419 100644 --- a/deps/npm/man/man1/npm-prefix.1 +++ b/deps/npm/man/man1/npm-prefix.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PREFIX" "1" "July 2017" "" "" +.TH "NPM\-PREFIX" "1" "October 2017" "" "" .SH "NAME" \fBnpm-prefix\fR \- Display prefix .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-profile.1 b/deps/npm/man/man1/npm-profile.1 new file mode 100644 index 0000000000..1df97a4af6 --- /dev/null +++ b/deps/npm/man/man1/npm-profile.1 @@ -0,0 +1,91 @@ +.TH "NPM\-PROFILE" "1" "October 2017" "" "" +.SH "NAME" +\fBnpm-profile\fR \- Change settings on your registry profile +.SH SYNOPSIS +.P +.RS 2 +.nf +npm profile get [\-\-json|\-\-parseable] [] +npm profile set [\-\-json|\-\-parseable] +npm profile set password +npm profile enable\-2fa [auth\-and\-writes|auth\-only] +npm profile disable\-2fa +.fi +.RE +.SH DESCRIPTION +.P +Change your profile information on the registry\. This not be available if +you're using a non\-npmjs registry\. +.RS 0 +.IP \(bu 2 +\fBnpm profile get []\fP: +Display all of the properties of your profile, or one or more specific +properties\. It looks like: + +.RE +.P +.RS 2 +.nf ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| name | example | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| email | me@example\.com (verified) | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| two factor auth | auth\-and\-writes | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| fullname | Example User | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| homepage | | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| freenode | | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| twitter | | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| github | | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| created | 2015\-02\-26T01:38:35\.892Z | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| updated | 2017\-10\-02T21:29:45\.922Z | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +.fi +.RE +.RS 0 +.IP \(bu 2 +\fBnpm profile set \fP: +Set the value of a profile property\. You can set the following properties this way: + email, fullname, homepage, freenode, twitter, github +.IP \(bu 2 +\fBnpm profile set password\fP: +Change your password\. This is interactive, you'll be prompted for your +current password and a new password\. You'll also be prompted for an OTP +if you have two\-factor authentication enabled\. +.IP \(bu 2 +\fBnpm profile enable\-2fa [auth\-and\-writes|auth\-only]\fP: +Enables two\-factor authentication\. Defaults to \fBauth\-and\-writes\fP mode\. Modes are: +.RS 0 +.IP \(bu 2 +\fBauth\-only\fP: Require an OTP when logging in or making changes to your +account's authentication\. The OTP will be required on both the website +and the command line\. +.IP \(bu 2 +\fBauth\-and\-writes\fP: Requires an OTP at all the times \fBauth\-only\fP does, and also requires one when +publishing a module, setting the \fBlatest\fP dist\-tag, or changing access +via \fBnpm access\fP and \fBnpm owner\fP\|\. + +.RE +.IP \(bu 2 +\fBnpm profile disable\-2fa\fP: +Disables two\-factor authentication\. + +.RE +.SH DETAILS +.P +All of the \fBnpm profile\fP subcommands accept \fB\-\-json\fP and \fB\-\-parseable\fP and +will tailor their output based on those\. Some of these commands may not be +available on non npmjs\.com registries\. +.SH SEE ALSO +.RS 0 +.IP \(bu 2 +npm help 7 config + +.RE diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 3317b213c2..c4e531d38d 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -1,4 +1,4 @@ -.TH "NPM\-PRUNE" "1" "July 2017" "" "" +.TH "NPM\-PRUNE" "1" "October 2017" "" "" .SH "NAME" \fBnpm-prune\fR \- Remove extraneous packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-publish.1 b/deps/npm/man/man1/npm-publish.1 index 1529f1b2f3..e4a91f68c5 100644 --- a/deps/npm/man/man1/npm-publish.1 +++ b/deps/npm/man/man1/npm-publish.1 @@ -1,11 +1,11 @@ -.TH "NPM\-PUBLISH" "1" "July 2017" "" "" +.TH "NPM\-PUBLISH" "1" "October 2017" "" "" .SH "NAME" \fBnpm-publish\fR \- Publish a package .SH SYNOPSIS .P .RS 2 .nf -npm publish [|] [\-\-tag ] [\-\-access ] +npm publish [|] [\-\-tag ] [\-\-access ] [\-\-otp otpcode] Publishes '\.' if no argument supplied Sets tag 'latest' if no \-\-tag specified @@ -43,6 +43,11 @@ Tells the registry whether this package should be published as public or restricted\. Only applies to scoped packages, which default to \fBrestricted\fP\|\. If you don't have a paid account, you must publish with \fB\-\-access public\fP to publish scoped packages\. +.IP \(bu 2 +\fB[\-\-otp ]\fP +If you have two\-factor authentication enabled in \fBauth\-and\-writes\fP mode +then you can provide a code from your authenticator with this\. If you +don't include this and you're running from a TTY then you'll be prompted\. .RE .P @@ -76,6 +81,8 @@ npm help deprecate npm help dist\-tag .IP \(bu 2 npm help pack +.IP \(bu 2 +npm help profile .RE diff --git a/deps/npm/man/man1/npm-rebuild.1 b/deps/npm/man/man1/npm-rebuild.1 index 15bcaf92d3..f16b853325 100644 --- a/deps/npm/man/man1/npm-rebuild.1 +++ b/deps/npm/man/man1/npm-rebuild.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REBUILD" "1" "July 2017" "" "" +.TH "NPM\-REBUILD" "1" "October 2017" "" "" .SH "NAME" \fBnpm-rebuild\fR \- Rebuild a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-repo.1 b/deps/npm/man/man1/npm-repo.1 index a1732297ce..37e33975a2 100644 --- a/deps/npm/man/man1/npm-repo.1 +++ b/deps/npm/man/man1/npm-repo.1 @@ -1,4 +1,4 @@ -.TH "NPM\-REPO" "1" "July 2017" "" "" +.TH "NPM\-REPO" "1" "October 2017" "" "" .SH "NAME" \fBnpm-repo\fR \- Open package repository page in the browser .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-restart.1 b/deps/npm/man/man1/npm-restart.1 index bb78c02482..0c5ffab3ed 100644 --- a/deps/npm/man/man1/npm-restart.1 +++ b/deps/npm/man/man1/npm-restart.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RESTART" "1" "July 2017" "" "" +.TH "NPM\-RESTART" "1" "October 2017" "" "" .SH "NAME" \fBnpm-restart\fR \- Restart a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-root.1 b/deps/npm/man/man1/npm-root.1 index bc704262e4..90a8d751c7 100644 --- a/deps/npm/man/man1/npm-root.1 +++ b/deps/npm/man/man1/npm-root.1 @@ -1,4 +1,4 @@ -.TH "NPM\-ROOT" "1" "July 2017" "" "" +.TH "NPM\-ROOT" "1" "October 2017" "" "" .SH "NAME" \fBnpm-root\fR \- Display npm root .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-run-script.1 b/deps/npm/man/man1/npm-run-script.1 index 6219b27a3c..08c746453c 100644 --- a/deps/npm/man/man1/npm-run-script.1 +++ b/deps/npm/man/man1/npm-run-script.1 @@ -1,4 +1,4 @@ -.TH "NPM\-RUN\-SCRIPT" "1" "July 2017" "" "" +.TH "NPM\-RUN\-SCRIPT" "1" "October 2017" "" "" .SH "NAME" \fBnpm-run-script\fR \- Run arbitrary package scripts .SH SYNOPSIS @@ -34,7 +34,7 @@ and not to any pre or post script\. .P The \fBenv\fP script is a special built\-in command that can be used to list environment variables that will be available to the script at runtime\. If an -"env" command is defined in your package it will take precedence over the +"env" command is defined in your package, it will take precedence over the built\-in\. .P In addition to the shell's pre\-existing \fBPATH\fP, \fBnpm run\fP adds @@ -49,7 +49,21 @@ you should write: .fi .RE .P -instead of \fB"scripts": {"test": "node_modules/\.bin/tap test/\\*\.js"}\fP to run your tests\. +instead of +.P +.RS 2 +.nf +"scripts": {"test": "node_modules/\.bin/tap test/\\*\.js"} +.fi +.RE +.P +to run your tests\. +.P +Scripts are run from the root of the module, regardless of what your current +working directory is when you call \fBnpm run\fP\|\. If you want your script to +use different behavior based on what subdirectory you're in, you can use the +\fBINIT_CWD\fP environment variable, which holds the full path you were in when +you ran \fBnpm run\fP\|\. .P \fBnpm run\fP sets the \fBNODE\fP environment variable to the \fBnode\fP executable with which \fBnpm\fP is executed\. Also, if the \fB\-\-scripts\-prepend\-node\-path\fP is passed, diff --git a/deps/npm/man/man1/npm-search.1 b/deps/npm/man/man1/npm-search.1 index 190b75a34e..482faf5a55 100644 --- a/deps/npm/man/man1/npm-search.1 +++ b/deps/npm/man/man1/npm-search.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SEARCH" "1" "July 2017" "" "" +.TH "NPM\-SEARCH" "1" "October 2017" "" "" .SH "NAME" \fBnpm-search\fR \- Search for packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-shrinkwrap.1 b/deps/npm/man/man1/npm-shrinkwrap.1 index ad4a78d3e7..656592987e 100644 --- a/deps/npm/man/man1/npm-shrinkwrap.1 +++ b/deps/npm/man/man1/npm-shrinkwrap.1 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP" "1" "July 2017" "" "" +.TH "NPM\-SHRINKWRAP" "1" "October 2017" "" "" .SH "NAME" \fBnpm-shrinkwrap\fR \- Lock down dependency versions for publication .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-star.1 b/deps/npm/man/man1/npm-star.1 index b325ff0ea1..0eef646519 100644 --- a/deps/npm/man/man1/npm-star.1 +++ b/deps/npm/man/man1/npm-star.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STAR" "1" "July 2017" "" "" +.TH "NPM\-STAR" "1" "October 2017" "" "" .SH "NAME" \fBnpm-star\fR \- Mark your favorite packages .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stars.1 b/deps/npm/man/man1/npm-stars.1 index 92e5bf7a4e..af8cad012d 100644 --- a/deps/npm/man/man1/npm-stars.1 +++ b/deps/npm/man/man1/npm-stars.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STARS" "1" "July 2017" "" "" +.TH "NPM\-STARS" "1" "October 2017" "" "" .SH "NAME" \fBnpm-stars\fR \- View packages marked as favorites .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-start.1 b/deps/npm/man/man1/npm-start.1 index df0e1cd65b..decb160d3a 100644 --- a/deps/npm/man/man1/npm-start.1 +++ b/deps/npm/man/man1/npm-start.1 @@ -1,4 +1,4 @@ -.TH "NPM\-START" "1" "July 2017" "" "" +.TH "NPM\-START" "1" "October 2017" "" "" .SH "NAME" \fBnpm-start\fR \- Start a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-stop.1 b/deps/npm/man/man1/npm-stop.1 index 30f2b67fc1..c95dcffeb5 100644 --- a/deps/npm/man/man1/npm-stop.1 +++ b/deps/npm/man/man1/npm-stop.1 @@ -1,4 +1,4 @@ -.TH "NPM\-STOP" "1" "July 2017" "" "" +.TH "NPM\-STOP" "1" "October 2017" "" "" .SH "NAME" \fBnpm-stop\fR \- Stop a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-team.1 b/deps/npm/man/man1/npm-team.1 index 1d398c9fdc..2779ef4072 100644 --- a/deps/npm/man/man1/npm-team.1 +++ b/deps/npm/man/man1/npm-team.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEAM" "1" "July 2017" "" "" +.TH "NPM\-TEAM" "1" "October 2017" "" "" .SH "NAME" \fBnpm-team\fR \- Manage organization teams and team memberships .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-test.1 b/deps/npm/man/man1/npm-test.1 index a17682b38e..3efbe88127 100644 --- a/deps/npm/man/man1/npm-test.1 +++ b/deps/npm/man/man1/npm-test.1 @@ -1,4 +1,4 @@ -.TH "NPM\-TEST" "1" "July 2017" "" "" +.TH "NPM\-TEST" "1" "October 2017" "" "" .SH "NAME" \fBnpm-test\fR \- Test a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-token.1 b/deps/npm/man/man1/npm-token.1 new file mode 100644 index 0000000000..4a587202c9 --- /dev/null +++ b/deps/npm/man/man1/npm-token.1 @@ -0,0 +1,73 @@ +.TH "NPM\-TOKEN" "1" "October 2017" "" "" +.SH "NAME" +\fBnpm-token\fR \- Manage your authentication tokens +.SH SYNOPSIS +.P +.RS 2 +.nf +npm token list [\-\-json|\-\-parseable] +npm token create [\-\-read\-only] [\-\-cidr=1\.1\.1\.1/24,2\.2\.2\.2/16] +npm token delete +.fi +.RE +.SH DESCRIPTION +.P +This list you list, create and delete authentication tokens\. +.RS 0 +.IP \(bu 2 +\fBnpm token list\fP: +Shows a table of all active authentication tokens\. You can request this as +JSON with \fB\-\-json\fP or tab\-separated values with \fB\-\-parseable\fP\|\. +.P +.RS 2 +.nf ++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| id | token | created | read\-only | CIDR whitelist | ++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| 7f3134 | 1fa9ba… | 2017\-10\-02 | yes | | ++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| c03241 | af7aef… | 2017\-10\-02 | no | 192\.168\.0\.1/24 | ++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| e0cf92 | 3a436a… | 2017\-10\-02 | no | | ++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| 63eb9d | 74ef35… | 2017\-09\-28 | no | | ++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| 2daaa8 | cbad5f… | 2017\-09\-26 | no | | ++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| 68c2fe | 127e51… | 2017\-09\-23 | no | | ++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| 6334e1 | 1dadd1… | 2017\-09\-23 | no | | ++\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +.fi +.RE +.IP \(bu 2 +\fBnpm token create [\-\-read\-only] [\-\-cidr=]\fP: +Create a new authentication token\. It can be \fB\-\-read\-only\fP or accept a list of +CIDR \fIhttps://en\.wikipedia\.org/wiki/Classless_Inter\-Domain_Routing\fR ranges to +limit use of this token to\. This will prompt you for your password, and, if you have +two\-factor authentication enabled, an otp\. + +.RE +.P +.RS 2 +.nf ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| token | a73c9572\-f1b9\-8983\-983d\-ba3ac3cc913d | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| cidr_whitelist | | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| readonly | false | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +| created | 2017\-10\-02T07:52:24\.838Z | ++\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ +.fi +.RE +.RS 0 +.IP \(bu 2 +\fBnpm token delete \fP: +This removes an authentication token, making it immediately unusable\. This can accept +both complete tokens (as you get back from \fBnpm token create\fP and will +find in your \fB\|\.npmrc\fP) and ids as seen in the \fBnpm token list\fP output\. +This will NOT accept the truncated token found in \fBnpm token list\fP output\. + +.RE diff --git a/deps/npm/man/man1/npm-uninstall.1 b/deps/npm/man/man1/npm-uninstall.1 index 0863df058d..8cd5f3bdda 100644 --- a/deps/npm/man/man1/npm-uninstall.1 +++ b/deps/npm/man/man1/npm-uninstall.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNINSTALL" "1" "July 2017" "" "" +.TH "NPM\-UNINSTALL" "1" "October 2017" "" "" .SH "NAME" \fBnpm-uninstall\fR \- Remove a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-unpublish.1 b/deps/npm/man/man1/npm-unpublish.1 index ce7f214767..41326205ec 100644 --- a/deps/npm/man/man1/npm-unpublish.1 +++ b/deps/npm/man/man1/npm-unpublish.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UNPUBLISH" "1" "July 2017" "" "" +.TH "NPM\-UNPUBLISH" "1" "October 2017" "" "" .SH "NAME" \fBnpm-unpublish\fR \- Remove a package from the registry .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-update.1 b/deps/npm/man/man1/npm-update.1 index 24b07a1fd0..125fe133a5 100644 --- a/deps/npm/man/man1/npm-update.1 +++ b/deps/npm/man/man1/npm-update.1 @@ -1,4 +1,4 @@ -.TH "NPM\-UPDATE" "1" "July 2017" "" "" +.TH "NPM\-UPDATE" "1" "October 2017" "" "" .SH "NAME" \fBnpm-update\fR \- Update a package .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-version.1 b/deps/npm/man/man1/npm-version.1 index de93869d33..9454f269e1 100644 --- a/deps/npm/man/man1/npm-version.1 +++ b/deps/npm/man/man1/npm-version.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VERSION" "1" "July 2017" "" "" +.TH "NPM\-VERSION" "1" "October 2017" "" "" .SH "NAME" \fBnpm-version\fR \- Bump a package version .SH SYNOPSIS @@ -121,6 +121,16 @@ Type: Boolean .RE .P Commit and tag the version change\. +.SS commit\-hooks +.RS 0 +.IP \(bu 2 +Default: true +.IP \(bu 2 +Type: Boolean + +.RE +.P +Run git commit hooks when committing the version change\. .SS sign\-git\-tag .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index 503f71a9ec..6b76a4afd2 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -1,4 +1,4 @@ -.TH "NPM\-VIEW" "1" "July 2017" "" "" +.TH "NPM\-VIEW" "1" "October 2017" "" "" .SH "NAME" \fBnpm-view\fR \- View registry info .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm-whoami.1 b/deps/npm/man/man1/npm-whoami.1 index 180b949747..6f7646bd84 100644 --- a/deps/npm/man/man1/npm-whoami.1 +++ b/deps/npm/man/man1/npm-whoami.1 @@ -1,4 +1,4 @@ -.TH "NPM\-WHOAMI" "1" "July 2017" "" "" +.TH "NPM\-WHOAMI" "1" "October 2017" "" "" .SH "NAME" \fBnpm-whoami\fR \- Display npm username .SH SYNOPSIS diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index a626190edd..39de90d4c2 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -1,4 +1,4 @@ -.TH "NPM" "1" "July 2017" "" "" +.TH "NPM" "1" "October 2017" "" "" .SH "NAME" \fBnpm\fR \- javascript package manager .SH SYNOPSIS @@ -10,7 +10,7 @@ npm [args] .RE .SH VERSION .P -5.3.0 +5.5.1 .SH DESCRIPTION .P npm is the package manager for the Node JavaScript platform\. It puts diff --git a/deps/npm/man/man1/npx.1 b/deps/npm/man/man1/npx.1 index f64614d36e..aeb74cf012 100644 --- a/deps/npm/man/man1/npx.1 +++ b/deps/npm/man/man1/npx.1 @@ -1,4 +1,4 @@ -.TH "NPX" "1" "July 2017" "npx@9.1.0" "User Commands" +.TH "NPX" "1" "August 2017" "npx@9.5.0" "User Commands" .SH "NAME" \fBnpx\fR \- execute npm package binaries .SH SYNOPSIS diff --git a/deps/npm/man/man5/npm-folders.5 b/deps/npm/man/man5/npm-folders.5 index 2442ef3056..909cdac38b 100644 --- a/deps/npm/man/man5/npm-folders.5 +++ b/deps/npm/man/man5/npm-folders.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "July 2017" "" "" +.TH "NPM\-FOLDERS" "5" "October 2017" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-global.5 b/deps/npm/man/man5/npm-global.5 index 2442ef3056..909cdac38b 100644 --- a/deps/npm/man/man5/npm-global.5 +++ b/deps/npm/man/man5/npm-global.5 @@ -1,4 +1,4 @@ -.TH "NPM\-FOLDERS" "5" "July 2017" "" "" +.TH "NPM\-FOLDERS" "5" "October 2017" "" "" .SH "NAME" \fBnpm-folders\fR \- Folder Structures Used by npm .SH DESCRIPTION diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5 index df570a7e1b..625f7987fe 100644 --- a/deps/npm/man/man5/npm-json.5 +++ b/deps/npm/man/man5/npm-json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "July 2017" "" "" +.TH "PACKAGE\.JSON" "5" "October 2017" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -207,14 +207,23 @@ Both email and url are optional either way\. npm also sets a top\-level "maintainers" field with your npm user info\. .SH files .P -The "files" field is an array of files to include in your project\. If -you name a folder in the array, then it will also include the files -inside that folder\. (Unless they would be ignored by another rule\.) -.P -You can also provide a "\.npmignore" file in the root of your package or -in subdirectories, which will keep files from being included, even -if they would be picked up by the files array\. The \fB\|\.npmignore\fP file -works just like a \fB\|\.gitignore\fP\|\. +The optional "files" field is an array of file patterns that describes +the entries to be included when your package is installed as a +dependency\. If the files array is omitted, everything except +automatically\-excluded files will be included in your publish\. If you +name a folder in the array, then it will also include the files inside +that folder (unless they would be ignored by another rule in this +section\.)\. +.P +You can also provide a \fB\|\.npmignore\fP file in the root of your package or +in subdirectories, which will keep files from being included\. At the +root of your package it will not override the "files" field, but in +subdirectories it will\. The \fB\|\.npmignore\fP file works just like a +\fB\|\.gitignore\fP\|\. If there is a \fB\|\.gitignore\fP file, and \fB\|\.npmignore\fP is +missing, \fB\|\.gitignore\fP\|'s contents will be used instead\. +.P +Files included with the "package\.json#files" field \fIcannot\fR be excluded +through \fB\|\.npmignore\fP or \fB\|\.gitignore\fP\|\. .P Certain files are always included, regardless of settings: .RS 0 diff --git a/deps/npm/man/man5/npm-package-locks.5 b/deps/npm/man/man5/npm-package-locks.5 index df808f2e98..9795226f7a 100644 --- a/deps/npm/man/man5/npm-package-locks.5 +++ b/deps/npm/man/man5/npm-package-locks.5 @@ -1,4 +1,4 @@ -.TH "NPM\-PACKAGE\-LOCKS" "5" "July 2017" "" "" +.TH "NPM\-PACKAGE\-LOCKS" "5" "October 2017" "" "" .SH "NAME" \fBnpm-package-locks\fR \- An explanation of npm lockfiles .SH DESCRIPTION @@ -119,7 +119,7 @@ which will look something like this: .RE .P This file describes an \fIexact\fR, and more importantly \fIreproducible\fR -\fBnode_modules\fP tree\. Once it's present, and future installation will base its +\fBnode_modules\fP tree\. Once it's present, any future installation will base its work off this file, instead of recalculating dependency versions off npm help 5 package\.json\. .P diff --git a/deps/npm/man/man5/npm-shrinkwrap.json.5 b/deps/npm/man/man5/npm-shrinkwrap.json.5 index 9188009c10..9ef40bfd9a 100644 --- a/deps/npm/man/man5/npm-shrinkwrap.json.5 +++ b/deps/npm/man/man5/npm-shrinkwrap.json.5 @@ -1,4 +1,4 @@ -.TH "NPM\-SHRINKWRAP\.JSON" "5" "July 2017" "" "" +.TH "NPM\-SHRINKWRAP\.JSON" "5" "October 2017" "" "" .SH "NAME" \fBnpm-shrinkwrap.json\fR \- A publishable lockfile .SH DESCRIPTION diff --git a/deps/npm/man/man5/npmrc.5 b/deps/npm/man/man5/npmrc.5 index 4a35447e23..ef6ad56f1a 100644 --- a/deps/npm/man/man5/npmrc.5 +++ b/deps/npm/man/man5/npmrc.5 @@ -1,4 +1,4 @@ -.TH "NPMRC" "5" "July 2017" "" "" +.TH "NPMRC" "5" "October 2017" "" "" .SH "NAME" \fBnpmrc\fR \- The npm config files .SH DESCRIPTION diff --git a/deps/npm/man/man5/package-lock.json.5 b/deps/npm/man/man5/package-lock.json.5 index 4e1f7b880a..6e161e69d4 100644 --- a/deps/npm/man/man5/package-lock.json.5 +++ b/deps/npm/man/man5/package-lock.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\-LOCK\.JSON" "5" "July 2017" "" "" +.TH "PACKAGE\-LOCK\.JSON" "5" "October 2017" "" "" .SH "NAME" \fBpackage-lock.json\fR \- A manifestation of the manifest .SH DESCRIPTION diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5 index df570a7e1b..625f7987fe 100644 --- a/deps/npm/man/man5/package.json.5 +++ b/deps/npm/man/man5/package.json.5 @@ -1,4 +1,4 @@ -.TH "PACKAGE\.JSON" "5" "July 2017" "" "" +.TH "PACKAGE\.JSON" "5" "October 2017" "" "" .SH "NAME" \fBpackage.json\fR \- Specifics of npm's package\.json handling .SH DESCRIPTION @@ -207,14 +207,23 @@ Both email and url are optional either way\. npm also sets a top\-level "maintainers" field with your npm user info\. .SH files .P -The "files" field is an array of files to include in your project\. If -you name a folder in the array, then it will also include the files -inside that folder\. (Unless they would be ignored by another rule\.) -.P -You can also provide a "\.npmignore" file in the root of your package or -in subdirectories, which will keep files from being included, even -if they would be picked up by the files array\. The \fB\|\.npmignore\fP file -works just like a \fB\|\.gitignore\fP\|\. +The optional "files" field is an array of file patterns that describes +the entries to be included when your package is installed as a +dependency\. If the files array is omitted, everything except +automatically\-excluded files will be included in your publish\. If you +name a folder in the array, then it will also include the files inside +that folder (unless they would be ignored by another rule in this +section\.)\. +.P +You can also provide a \fB\|\.npmignore\fP file in the root of your package or +in subdirectories, which will keep files from being included\. At the +root of your package it will not override the "files" field, but in +subdirectories it will\. The \fB\|\.npmignore\fP file works just like a +\fB\|\.gitignore\fP\|\. If there is a \fB\|\.gitignore\fP file, and \fB\|\.npmignore\fP is +missing, \fB\|\.gitignore\fP\|'s contents will be used instead\. +.P +Files included with the "package\.json#files" field \fIcannot\fR be excluded +through \fB\|\.npmignore\fP or \fB\|\.gitignore\fP\|\. .P Certain files are always included, regardless of settings: .RS 0 diff --git a/deps/npm/man/man7/npm-coding-style.7 b/deps/npm/man/man7/npm-coding-style.7 index bedeace4f3..8a2a6bbdd3 100644 --- a/deps/npm/man/man7/npm-coding-style.7 +++ b/deps/npm/man/man7/npm-coding-style.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CODING\-STYLE" "7" "July 2017" "" "" +.TH "NPM\-CODING\-STYLE" "7" "October 2017" "" "" .SH "NAME" \fBnpm-coding-style\fR \- npm's "funny" coding style .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-config.7 b/deps/npm/man/man7/npm-config.7 index 07ab671f40..7fc80370ca 100644 --- a/deps/npm/man/man7/npm-config.7 +++ b/deps/npm/man/man7/npm-config.7 @@ -1,4 +1,4 @@ -.TH "NPM\-CONFIG" "7" "July 2017" "" "" +.TH "NPM\-CONFIG" "7" "October 2017" "" "" .SH "NAME" \fBnpm-config\fR \- More than you probably want to know about npm configuration .SH DESCRIPTION @@ -28,6 +28,9 @@ same\. However, please note that inside npm\-scripts \fI/misc/scripts\fR npm will set its own environment variables and Node will prefer those lowercase versions over any uppercase ones that you might set\. For details see this issue \fIhttps://github\.com/npm/npm/issues/14528\fR\|\. +.P +Notice that you need to use underscores instead of dashes, so \fB\-\-allow\-same\-version\fP +would become \fBnpm_config_allow_same_version=true\fP\|\. .SS npmrc Files .P The four relevant files are: @@ -253,7 +256,7 @@ Type: String, Array or null .RE .P The Certificate Authority signing certificate that is trusted for SSL -connections to the registry\. Values should be in PEM format with newlines +connections to the registry\. Values should be in PEM format (Windows calls it "Base\-64 encoded X\.509 (\.CER)") with newlines replaced by the string "\\n"\. For example: .P .RS 2 @@ -361,7 +364,7 @@ Type: String .RE .P A client certificate to pass when accessing the registry\. Values should be in -PEM format with newlines replaced by the string "\\n"\. For example: +PEM format (Windows calls it "Base\-64 encoded X\.509 (\.CER)") with newlines replaced by the string "\\n"\. For example: .P .RS 2 .nf @@ -370,6 +373,16 @@ cert="\-\-\-\-\-BEGIN CERTIFICATE\-\-\-\-\-\\nXXXX\\nXXXX\\n\-\-\-\-\-END CERTIF .RE .P It is \fInot\fR the path to a certificate file (and there is no "certfile" option)\. +.SS cidr +.RS 0 +.IP \(bu 2 +Default: \fBnull\fP +.IP \(bu 2 +Type: String, Array, null + +.RE +.P +This is a list of CIDR address to be used when configuring limited access tokens with the \fBnpm token create\fP command\. .SS color .RS 0 .IP \(bu 2 @@ -541,6 +554,16 @@ Type: Boolean .RE .P Tag the commit when using the \fBnpm version\fP command\. +.SS commit\-hooks +.RS 0 +.IP \(bu 2 +Default: \fBtrue\fP +.IP \(bu 2 +Type: Boolean + +.RE +.P +Run git commit hooks when using the \fBnpm version\fP command\. .SS global .RS 0 .IP \(bu 2 @@ -802,19 +825,19 @@ to the npm registry\. Must be IPv4 in versions of Node prior to 0\.12\. .SS loglevel .RS 0 .IP \(bu 2 -Default: "warn" +Default: "notice" .IP \(bu 2 Type: String .IP \(bu 2 -Values: "silent", "error", "warn", "http", "info", "verbose", "silly" +Values: "silent", "error", "warn", "notice", "http", "timing", "info", +"verbose", "silly" .RE .P What level of logs to report\. On failure, \fIall\fR logs are written to \fBnpm\-debug\.log\fP in the current working directory\. .P -Any logs of a higher level than the setting are shown\. -The default is "warn", which shows warn and error output\. +Any logs of a higher level than the setting are shown\. The default is "notice"\. .SS logstream .RS 0 .IP \(bu 2 @@ -951,6 +974,17 @@ Type: Boolean Attempt to install packages in the \fBoptionalDependencies\fP object\. Note that if these packages fail to install, the overall installation process is not aborted\. +.SS otp +.RS 0 +.IP \(bu 2 +Default: null +.IP \(bu 2 +Type: Number + +.RE +.P +This is a one\-time password from a two\-factor authenticator\. It's needed +when publishing or changing package permissions with \fBnpm access\fP\|\. .SS package\-lock .RS 0 .IP \(bu 2 @@ -1041,21 +1075,6 @@ When set to \fBtrue\fP, npm will display a progress bar during time intensive operations, if \fBprocess\.stderr\fP is a TTY\. .P Set to \fBfalse\fP to suppress the progress bar\. -.SS proprietary\-attribs -.RS 0 -.IP \(bu 2 -Default: true -.IP \(bu 2 -Type: Boolean - -.RE -.P -Whether or not to include proprietary extended attributes in the -tarballs created by npm\. -.P -Unless you are expecting to unpack package tarballs with something other -than npm \-\- particularly a very outdated tar implementation \-\- leave -this as true\. .SS proxy .RS 0 .IP \(bu 2 @@ -1068,6 +1087,16 @@ Type: url A proxy to use for outgoing http requests\. If the \fBHTTP_PROXY\fP or \fBhttp_proxy\fP environment variables are set, proxy settings will be honored by the underlying \fBrequest\fP library\. +.SS read\-only +.RS 0 +.IP \(bu 2 +Default: false +.IP \(bu 2 +Type: Boolean + +.RE +.P +This is used to mark a token as unable to publish when configuring limited access tokens with the \fBnpm token create\fP command\. .SS rebuild\-bundle .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man7/npm-developers.7 b/deps/npm/man/man7/npm-developers.7 index ba6a0811c9..08712ef9a9 100644 --- a/deps/npm/man/man7/npm-developers.7 +++ b/deps/npm/man/man7/npm-developers.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DEVELOPERS" "7" "July 2017" "" "" +.TH "NPM\-DEVELOPERS" "7" "October 2017" "" "" .SH "NAME" \fBnpm-developers\fR \- Developer Guide .SH DESCRIPTION @@ -175,6 +175,18 @@ The following paths and files are never ignored, so adding them to \fBLICENSE\fP / \fBLICENCE\fP .RE +.P +If, given the structure of your project, you find \fB\|\.npmignore\fP to be a +maintenance headache, you might instead try populating the \fBfiles\fP +property of \fBpackage\.json\fP, which is an array of file or directory names +that should be included in your package\. Sometimes a whitelist is easier +to manage than a blacklist\. +.SS Testing whether your \fB\|\.npmignore\fP or \fBfiles\fP config works +.P +If you want to double check that your package will include only the files +you intend it to when published, you can run the \fBnpm pack\fP command locally +which will generate a tarball in the working directory, the same way it +does for publishing\. .SH Link Packages .P \fBnpm link\fP is designed to install a development package and see the diff --git a/deps/npm/man/man7/npm-disputes.7 b/deps/npm/man/man7/npm-disputes.7 index b7767f3a4a..36dfcf57a4 100644 --- a/deps/npm/man/man7/npm-disputes.7 +++ b/deps/npm/man/man7/npm-disputes.7 @@ -1,4 +1,4 @@ -.TH "NPM\-DISPUTES" "7" "July 2017" "" "" +.TH "NPM\-DISPUTES" "7" "October 2017" "" "" .SH "NAME" \fBnpm-disputes\fR \- Handling Module Name Disputes .P diff --git a/deps/npm/man/man7/npm-index.7 b/deps/npm/man/man7/npm-index.7 index 7568e29882..eaa989cba4 100644 --- a/deps/npm/man/man7/npm-index.7 +++ b/deps/npm/man/man7/npm-index.7 @@ -1,4 +1,4 @@ -.TH "NPM\-INDEX" "7" "July 2017" "" "" +.TH "NPM\-INDEX" "7" "October 2017" "" "" .SH "NAME" \fBnpm-index\fR \- Index of all npm documentation .SS npm help README @@ -97,6 +97,9 @@ Ping npm registry .SS npm help prefix .P Display prefix +.SS npm help profile +.P +Change settings on your registry profile .SS npm help prune .P Remove extraneous packages @@ -142,6 +145,9 @@ Manage organization teams and team memberships .SS npm help test .P Test a package +.SS npm help token +.P +Manage your authentication tokens .SS npm help uninstall .P Remove a package diff --git a/deps/npm/man/man7/npm-orgs.7 b/deps/npm/man/man7/npm-orgs.7 index 8a25d47a33..4c0d0420b0 100644 --- a/deps/npm/man/man7/npm-orgs.7 +++ b/deps/npm/man/man7/npm-orgs.7 @@ -1,4 +1,4 @@ -.TH "NPM\-ORGS" "7" "July 2017" "" "" +.TH "NPM\-ORGS" "7" "October 2017" "" "" .SH "NAME" \fBnpm-orgs\fR \- Working with Teams & Orgs .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-registry.7 b/deps/npm/man/man7/npm-registry.7 index abd1406097..4831cdb480 100644 --- a/deps/npm/man/man7/npm-registry.7 +++ b/deps/npm/man/man7/npm-registry.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REGISTRY" "7" "July 2017" "" "" +.TH "NPM\-REGISTRY" "7" "October 2017" "" "" .SH "NAME" \fBnpm-registry\fR \- The JavaScript Package Registry .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scope.7 b/deps/npm/man/man7/npm-scope.7 index fbb685c460..0f396cf687 100644 --- a/deps/npm/man/man7/npm-scope.7 +++ b/deps/npm/man/man7/npm-scope.7 @@ -1,4 +1,4 @@ -.TH "NPM\-SCOPE" "7" "July 2017" "" "" +.TH "NPM\-SCOPE" "7" "October 2017" "" "" .SH "NAME" \fBnpm-scope\fR \- Scoped packages .SH DESCRIPTION diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7 index e93ad1e650..84181d682d 100644 --- a/deps/npm/man/man7/npm-scripts.7 +++ b/deps/npm/man/man7/npm-scripts.7 @@ -1,9 +1,9 @@ -.TH "NPM\-SCRIPTS" "7" "July 2017" "" "" +.TH "NPM\-SCRIPTS" "7" "October 2017" "" "" .SH "NAME" \fBnpm-scripts\fR \- How npm handles the "scripts" field .SH DESCRIPTION .P -npm supports the "scripts" property of the package\.json script, for the +npm supports the "scripts" property of the package\.json file, for the following scripts: .RS 0 .IP \(bu 2 diff --git a/deps/npm/man/man7/removing-npm.7 b/deps/npm/man/man7/removing-npm.7 index 1ee678b59e..e639fd9677 100644 --- a/deps/npm/man/man7/removing-npm.7 +++ b/deps/npm/man/man7/removing-npm.7 @@ -1,4 +1,4 @@ -.TH "NPM\-REMOVAL" "1" "July 2017" "" "" +.TH "NPM\-REMOVAL" "1" "October 2017" "" "" .SH "NAME" \fBnpm-removal\fR \- Cleaning the Slate .SH SYNOPSIS diff --git a/deps/npm/man/man7/semver.7 b/deps/npm/man/man7/semver.7 index f0b22279d0..58d3b8fc16 100644 --- a/deps/npm/man/man7/semver.7 +++ b/deps/npm/man/man7/semver.7 @@ -1,13 +1,21 @@ -.TH "SEMVER" "7" "July 2017" "" "" +.TH "SEMVER" "7" "October 2017" "" "" .SH "NAME" \fBsemver\fR \- The semantic versioner for npm +.SH Install +.P +.RS 2 +.nf +npm install \-\-save semver +` +.fi +.RE .SH Usage .P +As a node module: +.P .RS 2 .nf -$ npm install semver -$ node -var semver = require('semver') +const semver = require('semver') semver\.valid('1\.2\.3') // '1\.2\.3' semver\.valid('a\.b\.c') // null @@ -24,7 +32,7 @@ As a command\-line utility: .nf $ semver \-h -SemVer 5\.1\.0 +SemVer 5\.3\.0 A JavaScript implementation of the http://semver\.org/ specification Copyright Isaac Z\. Schlueter @@ -138,8 +146,8 @@ will append the value of the string as a prerelease identifier: .P .RS 2 .nf -> semver\.inc('1\.2\.3', 'prerelease', 'beta') -\|'1\.2\.4\-beta\.0' +semver\.inc('1\.2\.3', 'prerelease', 'beta') +// '1\.2\.4\-beta\.0' .fi .RE .P @@ -364,6 +372,9 @@ if none exist\. Example: \fBprerelease('1\.2\.3\-alpha\.1') \-> ['alpha', 1]\fP \fBminor(v)\fP: Return the minor version number\. .IP \(bu 2 \fBpatch(v)\fP: Return the patch version number\. +.IP \(bu 2 +\fBintersects(r1, r2, loose)\fP: Return true if the two supplied ranges +or comparators intersect\. .RE .SS Comparison @@ -398,6 +409,12 @@ in descending order when passed to \fBArray\.sort()\fP\|\. (\fBmajor\fP, \fBpremajor\fP, \fBminor\fP, \fBpreminor\fP, \fBpatch\fP, \fBprepatch\fP, or \fBprerelease\fP), or null if the versions are the same\. +.RE +.SS Comparators +.RS 0 +.IP \(bu 2 +\fBintersects(comparator)\fP: Return true if the comparators intersect + .RE .SS Ranges .RS 0 @@ -423,6 +440,8 @@ versions possible in the range\. the bounds of the range in either the high or low direction\. The \fBhilo\fP argument must be either the string \fB\|'>'\fP or \fB\|'<'\fP\|\. (This is the function called by \fBgtr\fP and \fBltr\fP\|\.) +.IP \(bu 2 +\fBintersects(range)\fP: Return true if any of the ranges comparators intersect .RE .P diff --git a/deps/npm/node_modules/abbrev/LICENSE b/deps/npm/node_modules/abbrev/LICENSE index 19129e315f..9bcfa9d7d8 100644 --- a/deps/npm/node_modules/abbrev/LICENSE +++ b/deps/npm/node_modules/abbrev/LICENSE @@ -1,3 +1,8 @@ +This software is dual-licensed under the ISC and MIT licenses. +You may use this software under EITHER of the following licenses. + +---------- + The ISC License Copyright (c) Isaac Z. Schlueter and Contributors @@ -13,3 +18,29 @@ 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. + +---------- + +Copyright Isaac Z. Schlueter and 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/deps/npm/node_modules/abbrev/package.json b/deps/npm/node_modules/abbrev/package.json index 077e4c1375..0c44f79d60 100644 --- a/deps/npm/node_modules/abbrev/package.json +++ b/deps/npm/node_modules/abbrev/package.json @@ -1,39 +1,38 @@ { - "_from": "abbrev@~1.1.0", - "_id": "abbrev@1.1.0", - "_integrity": "sha1-0FVMIlZjbi9W58LlrRg/hZQo2B8=", + "_from": "abbrev@1.1.1", + "_id": "abbrev@1.1.1", + "_inBundle": false, + "_integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "_location": "/abbrev", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "abbrev@~1.1.0", + "raw": "abbrev@1.1.1", "name": "abbrev", "escapedName": "abbrev", - "rawSpec": "~1.1.0", + "rawSpec": "1.1.1", "saveSpec": null, - "fetchSpec": "~1.1.0" + "fetchSpec": "1.1.1" }, "_requiredBy": [ + "#USER", "/", "/node-gyp/nopt", "/nopt" ], - "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", - "_shasum": "d0554c2256636e2f56e7c2e5ad183f859428d81f", - "_shrinkwrap": null, - "_spec": "abbrev@~1.1.0", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8", + "_spec": "abbrev@1.1.1", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me" }, - "bin": null, "bugs": { "url": "https://github.com/isaacs/abbrev-js/issues" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "Like ruby's abbrev module, but in js", "devDependencies": { @@ -46,8 +45,6 @@ "license": "ISC", "main": "abbrev.js", "name": "abbrev", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" @@ -58,5 +55,5 @@ "preversion": "npm test", "test": "tap test.js --100" }, - "version": "1.1.0" + "version": "1.1.1" } diff --git a/deps/npm/node_modules/aproba/README.md b/deps/npm/node_modules/aproba/README.md index 79e865924d..0bfc594c56 100644 --- a/deps/npm/node_modules/aproba/README.md +++ b/deps/npm/node_modules/aproba/README.md @@ -70,6 +70,11 @@ awkwardness is a feature: It reminds you of the complexity you're adding to your API when you do this sort of thing. +### Browser support + +This has no dependencies and should work in browsers, though you'll have +noisier stack traces. + ### Why this exists I wanted a very simple argument validator. It needed to do two things: diff --git a/deps/npm/node_modules/aproba/index.js b/deps/npm/node_modules/aproba/index.js index 4f8c1fc7d8..6f3f797c09 100644 --- a/deps/npm/node_modules/aproba/index.js +++ b/deps/npm/node_modules/aproba/index.js @@ -100,6 +100,6 @@ function moreThanOneError (schema) { function newException (code, msg) { var e = new Error(msg) e.code = code - Error.captureStackTrace(e, validate) + if (Error.captureStackTrace) Error.captureStackTrace(e, validate) return e } diff --git a/deps/npm/node_modules/aproba/package.json b/deps/npm/node_modules/aproba/package.json index e3a85f4066..f3720a897a 100644 --- a/deps/npm/node_modules/aproba/package.json +++ b/deps/npm/node_modules/aproba/package.json @@ -1,19 +1,19 @@ { - "_from": "aproba@1.1.2", - "_id": "aproba@1.1.2", + "_from": "aproba@1.2.0", + "_id": "aproba@1.2.0", "_inBundle": false, - "_integrity": "sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw==", + "_integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "_location": "/aproba", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "aproba@1.1.2", + "raw": "aproba@1.2.0", "name": "aproba", "escapedName": "aproba", - "rawSpec": "1.1.2", + "rawSpec": "1.2.0", "saveSpec": null, - "fetchSpec": "1.1.2" + "fetchSpec": "1.2.0" }, "_requiredBy": [ "#USER", @@ -21,11 +21,12 @@ "/move-concurrently", "/move-concurrently/copy-concurrently", "/move-concurrently/run-queue", + "/npm-profile", "/npmlog/gauge" ], - "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz", - "_shasum": "45c6629094de4e96f693ef7eab74ae079c240fc1", - "_spec": "aproba@1.1.2", + "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a", + "_spec": "aproba@1.2.0", "_where": "/Users/rebecca/code/npm", "author": { "name": "Rebecca Turner", @@ -37,9 +38,9 @@ "bundleDependencies": false, "dependencies": {}, "deprecated": false, - "description": "A rediculously light-weight argument validator", + "description": "A ridiculously light-weight argument validator (now browser friendly)", "devDependencies": { - "standard": "^8.6.0", + "standard": "^10.0.3", "tap": "^10.0.2" }, "directories": { @@ -63,5 +64,5 @@ "scripts": { "test": "standard && tap -j3 test/*.js" }, - "version": "1.1.2" + "version": "1.2.0" } diff --git a/deps/npm/node_modules/cli-table2/.npmignore b/deps/npm/node_modules/cli-table2/.npmignore new file mode 100644 index 0000000000..3a3558960b --- /dev/null +++ b/deps/npm/node_modules/cli-table2/.npmignore @@ -0,0 +1,5 @@ +node_modules/ +.idea/ +coverage/ +JasmineAdapter-1.1.2.js +jasmine-1.1.0.js \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/.travis.yml b/deps/npm/node_modules/cli-table2/.travis.yml new file mode 100644 index 0000000000..9466d5e0b8 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "0.10" + - "0.11" +after_script: + - cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/README.md b/deps/npm/node_modules/cli-table2/README.md new file mode 100644 index 0000000000..f0352a194d --- /dev/null +++ b/deps/npm/node_modules/cli-table2/README.md @@ -0,0 +1,215 @@ +CLI Table 2 [![npm version](https://badge.fury.io/js/cli-table2.svg)](http://badge.fury.io/js/cli-table2) [![Build Status](https://travis-ci.org/jamestalmage/cli-table2.svg?branch=master)](https://travis-ci.org/jamestalmage/cli-table2) [![Coverage Status](https://coveralls.io/repos/jamestalmage/cli-table2/badge.png?branch=master)](https://coveralls.io/r/jamestalmage/cli-table2?branch=master) +=========== + +This utility allows you to render unicode-aided tables on the command line from +your node.js scripts. Based on (and api compatible with) the original [cli-table](https://github.com/Automattic/cli-table), +`cli-table2` is nearly a complete rewrite to accommodate column and row spanning. +It passes the entire original cli-table test suite, and should be a drop in +replacement for nearly all users. + +![Screenshot](http://i.imgur.com/sYq4T.png) + +## Features not in the original cli-table + +- Ability to make cells span columns and/or rows. +- Ability to set custom styles per cell (border characters/colors, padding, etc). +- Vertical alignment (top, bottom, center). +- Automatic word wrapping. +- More robust truncation of cell text that contains ansi color characters. +- Better handling of text color that spans multiple lines. +- API compatible with the original cli-table. +- Exhaustive test suite including the entire original cli-table test suite. +- Lots of examples auto-generated from the tests ([basic](https://github.com/jamestalmage/cli-table2/blob/master/basic-usage.md), [advanced](https://github.com/jamestalmage/cli-table2/blob/master/advanced-usage.md)). + +## Features + +- Customizable characters that constitute the table. +- Color/background styling in the header through + [colors.js](http://github.com/marak/colors.js) +- Column width customization +- Text truncation based on predefined widths +- Text alignment (left, right, center) +- Padding (left, right) +- Easy-to-use API + +## Installation + +```bash +npm install cli-table2 +``` + +## How to use + +A portion of the unit test suite is used to generate examples: +- [basic-usage](https://github.com/jamestalmage/cli-table2/blob/master/basic-usage.md) - covers basic uses. +- [advanced](https://github.com/jamestalmage/cli-table2/blob/master/advanced-usage.md) - covers using the new column and row span features. + +This package is api compatible with the original [cli-table](https://github.com/Automattic/cli-table). +So all the original documentation still applies (copied below). + +### Horizontal Tables +```javascript +var Table = require('cli-table2'); + +// instantiate +var table = new Table({ + head: ['TH 1 label', 'TH 2 label'] + , colWidths: [100, 200] +}); + +// table is an Array, so you can `push`, `unshift`, `splice` and friends +table.push( + ['First value', 'Second value'] + , ['First value', 'Second value'] +); + +console.log(table.toString()); +``` + +### Vertical Tables +```javascript +var Table = require('cli-table2'); +var table = new Table(); + +table.push( + { 'Some key': 'Some value' } + , { 'Another key': 'Another value' } +); + +console.log(table.toString()); +``` +### Cross Tables +Cross tables are very similar to vertical tables, with two key differences: + +1. They require a `head` setting when instantiated that has an empty string as the first header +2. The individual rows take the general form of { "Header": ["Row", "Values"] } + +```javascript +var Table = require('cli-table2'); +var table = new Table({ head: ["", "Top Header 1", "Top Header 2"] }); + +table.push( + { 'Left Header 1': ['Value Row 1 Col 1', 'Value Row 1 Col 2'] } + , { 'Left Header 2': ['Value Row 2 Col 1', 'Value Row 2 Col 2'] } +); + +console.log(table.toString()); +``` + +### Custom styles +The ```chars``` property controls how the table is drawn: +```javascript +var table = new Table({ + chars: { 'top': '═' , 'top-mid': '╤' , 'top-left': '╔' , 'top-right': '╗' + , 'bottom': '═' , 'bottom-mid': '╧' , 'bottom-left': '╚' , 'bottom-right': '╝' + , 'left': '║' , 'left-mid': '╟' , 'mid': '─' , 'mid-mid': '┼' + , 'right': '║' , 'right-mid': '╢' , 'middle': '│' } +}); + +table.push( + ['foo', 'bar', 'baz'] + , ['frob', 'bar', 'quuz'] +); + +console.log(table.toString()); +// Outputs: +// +//╔══════╤═════╤══════╗ +//║ foo │ bar │ baz ║ +//╟──────┼─────┼──────╢ +//║ frob │ bar │ quuz ║ +//╚══════╧═════╧══════╝ +``` + +Empty decoration lines will be skipped, to avoid vertical separator rows just +set the 'mid', 'left-mid', 'mid-mid', 'right-mid' to the empty string: +```javascript +var table = new Table({ chars: {'mid': '', 'left-mid': '', 'mid-mid': '', 'right-mid': ''} }); +table.push( + ['foo', 'bar', 'baz'] + , ['frobnicate', 'bar', 'quuz'] +); + +console.log(table.toString()); +// Outputs: (note the lack of the horizontal line between rows) +//┌────────────┬─────┬──────┐ +//│ foo │ bar │ baz │ +//│ frobnicate │ bar │ quuz │ +//└────────────┴─────┴──────┘ +``` + +By setting all chars to empty with the exception of 'middle' being set to a +single space and by setting padding to zero, it's possible to get the most +compact layout with no decorations: +```javascript +var table = new Table({ + chars: { 'top': '' , 'top-mid': '' , 'top-left': '' , 'top-right': '' + , 'bottom': '' , 'bottom-mid': '' , 'bottom-left': '' , 'bottom-right': '' + , 'left': '' , 'left-mid': '' , 'mid': '' , 'mid-mid': '' + , 'right': '' , 'right-mid': '' , 'middle': ' ' }, + style: { 'padding-left': 0, 'padding-right': 0 } +}); + +table.push( + ['foo', 'bar', 'baz'] + , ['frobnicate', 'bar', 'quuz'] +); + +console.log(table.toString()); +// Outputs: +//foo bar baz +//frobnicate bar quuz +``` + +## Build Targets + +Clone the repository and run `npm install` to install all its submodules, then run one of the following commands: + +###### Run the tests with coverage reports. +```bash +$ gulp coverage +``` + +###### Run the tests every time a file changes. +```bash +$ gulp watch-test +``` + +###### Run the examples and print the output to the command line. +```bash +$ gulp example +``` + +Other build targets are available, check `gulpfile.js` for a comprehensive list. + +## Credits + +- James Talmage - author <james.talmage@jrtechnical.com> ([jamestalmage](http://github.com/jamestalmage)) +- Guillermo Rauch - author of the original cli-table <guillermo@learnboost.com> ([Guille](http://github.com/guille)) + +## License + +(The MIT License) + +Copyright (c) 2014 James Talmage <james.talmage@jrtechnical.com> + +Original cli-table code/documentation: Copyright (c) 2010 LearnBoost <dev@learnboost.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/deps/npm/node_modules/cli-table2/advanced-usage.md b/deps/npm/node_modules/cli-table2/advanced-usage.md new file mode 100644 index 0000000000..69bbe7ce2e --- /dev/null +++ b/deps/npm/node_modules/cli-table2/advanced-usage.md @@ -0,0 +1,246 @@ +##### use colSpan to span columns - (colSpan above normal cell) + ┌───────────────┐ + │ greetings │ + ├───────────────┤ + │ greetings │ + ├───────┬───────┤ + │ hello │ howdy │ + └───────┴───────┘ +```javascript + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{colSpan:2,content:'greetings'}], + [{colSpan:2,content:'greetings'}], + ['hello','howdy'] + ); + +``` + + +##### use colSpan to span columns - (colSpan below normal cell) + ┌───────┬───────┐ + │ hello │ howdy │ + ├───────┴───────┤ + │ greetings │ + ├───────────────┤ + │ greetings │ + └───────────────┘ +```javascript + var table = new Table({style:{head:[],border:[]}}); + + table.push( + ['hello','howdy'], + [{colSpan:2,content:'greetings'}], + [{colSpan:2,content:'greetings'}] + ); + +``` + + +##### use rowSpan to span rows - (rowSpan on the left side) + ┌───────────┬───────────┬───────┐ + │ greetings │ │ hello │ + │ │ greetings ├───────┤ + │ │ │ howdy │ + └───────────┴───────────┴───────┘ +```javascript + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'center'},'hello'], + ['howdy'] + ); + +``` + + +##### use rowSpan to span rows - (rowSpan on the right side) + ┌───────┬───────────┬───────────┐ + │ hello │ greetings │ │ + ├───────┤ │ │ + │ howdy │ │ greetings │ + └───────┴───────────┴───────────┘ +```javascript + var table = new Table({style:{head:[],border:[]}}); + + table.push( + ['hello',{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'bottom'}], + ['howdy'] + ); + +``` + + +##### mix rowSpan and colSpan together for complex table layouts + ┌───────┬─────┬────┐ + │ hello │ sup │ hi │ + ├───────┤ │ │ + │ howdy │ │ │ + ├───┬───┼──┬──┤ │ + │ o │ k │ │ │ │ + └───┴───┴──┴──┴────┘ +```javascript + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup'},{rowSpan:3,content:'hi'}], + [{content:'howdy',colSpan:2}], + ['o','k','',''] + ); + +``` + + +##### multi-line content will flow across rows in rowSpan cells + ┌───────┬───────────┬───────────┐ + │ hello │ greetings │ greetings │ + ├───────┤ friends │ friends │ + │ howdy │ │ │ + └───────┴───────────┴───────────┘ +```javascript + var table = new Table({style:{head:[],border:[]}}); + + table.push( + ['hello',{rowSpan:2,content:'greetings\nfriends'},{rowSpan:2,content:'greetings\nfriends'}], + ['howdy'] + ); + +``` + + +##### multi-line content will flow across rows in rowSpan cells - (complex layout) + ┌───────┬─────┬────┐ + │ hello │ sup │ hi │ + ├───────┤ man │ yo │ + │ howdy │ hey │ │ + ├───┬───┼──┬──┤ │ + │ o │ k │ │ │ │ + └───┴───┴──┴──┴────┘ +```javascript + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup\nman\nhey'},{rowSpan:3,content:'hi\nyo'}], + [{content:'howdy',colSpan:2}], + ['o','k','',''] + ); + +``` + + +##### rowSpan cells can have a staggered layout + ┌───┬───┐ + │ a │ b │ + │ ├───┤ + │ │ c │ + ├───┤ │ + │ d │ │ + └───┴───┘ +```javascript + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{content:'a',rowSpan:2},'b'], + [{content:'c',rowSpan:2}], + ['d'] + ); + +``` + + +##### the layout manager automatically create empty cells to fill in the table + ┌───┬───┬──┐ + │ a │ b │ │ + │ ├───┤ │ + │ │ │ │ + │ ├───┴──┤ + │ │ c │ + ├───┤ │ + │ │ │ + └───┴──────┘ +```javascript + var table = new Table({style:{head:[],border:[]}}); + + //notice we only create 3 cells here, but the table ends up having 6. + table.push( + [{content:'a',rowSpan:3,colSpan:2},'b'], + [], + [{content:'c',rowSpan:2,colSpan:2}], + [] + ); +``` + + +##### use table `rowHeights` option to fix row height. The truncation symbol will be shown on the last line. + ┌───────┐ + │ hello │ + │ hi… │ + └───────┘ +```javascript + var table = new Table({rowHeights:[2],style:{head:[],border:[]}}); + + table.push(['hello\nhi\nsup']); + +``` + + +##### if `colWidths` is not specified, the layout manager will automatically widen rows to fit the content + ┌─────────────┐ + │ hello there │ + ├──────┬──────┤ + │ hi │ hi │ + └──────┴──────┘ +```javascript + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{colSpan:2,content:'hello there'}], + ['hi', 'hi'] + ); + +``` + + +##### you can specify a column width for only the first row, other rows will be automatically widened to fit content + ┌─────────────┐ + │ hello there │ + ├────┬────────┤ + │ hi │ hi │ + └────┴────────┘ +```javascript + var table = new Table({colWidths:[4],style:{head:[],border:[]}}); + + table.push( + [{colSpan:2,content:'hello there'}], + ['hi',{hAlign:'center',content:'hi'}] + ); + +``` + + +##### a column with a null column width will be automatically widened to fit content + ┌─────────────┐ + │ hello there │ + ├────────┬────┤ + │ hi │ hi │ + └────────┴────┘ +```javascript + var table = new Table({colWidths:[null, 4],style:{head:[],border:[]}}); + + table.push( + [{colSpan:2,content:'hello there'}], + [{hAlign:'right',content:'hi'}, 'hi'] + ); + +``` + + +##### feel free to use colors in your content strings, column widths will be calculated correctly +![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/c806c2636df97f73c732b41aa913cf78d4ac0d39/examples/screenshots/truncation-with-colors.png) +```javascript + var table = new Table({colWidths:[5],style:{head:[],border:[]}}); + + table.push([colors.red('hello')]); + +``` diff --git a/deps/npm/node_modules/cli-table2/basic-usage.md b/deps/npm/node_modules/cli-table2/basic-usage.md new file mode 100644 index 0000000000..7fa93e5e8a --- /dev/null +++ b/deps/npm/node_modules/cli-table2/basic-usage.md @@ -0,0 +1,145 @@ +##### Basic Usage +![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/c806c2636df97f73c732b41aa913cf78d4ac0d39/examples/screenshots/basic-usage-with-colors.png) +```javascript + // By default, headers will be red, and borders will be grey + var table = new Table({head:['a','b']}); + + table.push(['c','d']); + +``` + + +##### Basic Usage - disable colors - (used often in the examples and tests) + ┌──────┬─────────────────────┬─────────────────────────┬─────────────────┐ + │ Rel │ Change │ By │ When │ + ├──────┼─────────────────────┼─────────────────────────┼─────────────────┤ + │ v0.1 │ Testing something … │ rauchg@gmail.com │ 7 minutes ago │ + ├──────┼─────────────────────┼─────────────────────────┼─────────────────┤ + │ v0.1 │ Testing something … │ rauchg@gmail.com │ 8 minutes ago │ + └──────┴─────────────────────┴─────────────────────────┴─────────────────┘ +```javascript + // For most of these examples, and most of the unit tests we disable colors. + // It makes unit tests easier to write/understand, and allows these pages to + // display the examples as text instead of screen shots. + var table = new Table({ + head: ['Rel', 'Change', 'By', 'When'] + , style: { + head: [] //disable colors in header cells + , border: [] //disable colors for the border + } + , colWidths: [6, 21, 25, 17] //set the widths of each column (optional) + }); + + table.push( + ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago'] + , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago'] + ); + +``` + + +##### Create vertical tables by adding objects a that specify key-value pairs + ┌────┬──────────────────────┐ + │v0.1│Testing something cool│ + ├────┼──────────────────────┤ + │v0.1│Testing something cool│ + └────┴──────────────────────┘ +```javascript + var table = new Table({ style: {'padding-left':0, 'padding-right':0, head:[], border:[]} }); + + table.push( + {'v0.1': 'Testing something cool'} + , {'v0.1': 'Testing something cool'} + ); + +``` + + +##### Cross tables are similar to vertical tables, but include an empty string for the first header + ┌────────┬────────┬──────────────────────┐ + │ │Header 1│Header 2 │ + ├────────┼────────┼──────────────────────┤ + │Header 3│v0.1 │Testing something cool│ + ├────────┼────────┼──────────────────────┤ + │Header 4│v0.1 │Testing something cool│ + └────────┴────────┴──────────────────────┘ +```javascript + var table = new Table({ head: ["", "Header 1", "Header 2"], style: {'padding-left':0, 'padding-right':0, head:[], border:[]} }); // clear styles to prevent color output + + table.push( + {"Header 3": ['v0.1', 'Testing something cool'] } + , {"Header 4": ['v0.1', 'Testing something cool'] } + ); + +``` + + +##### Stylize the table with custom border characters + ╔══════╤═════╤══════╗ + ║ foo │ bar │ baz ║ + ╟──────┼─────┼──────╢ + ║ frob │ bar │ quuz ║ + ╚══════╧═════╧══════╝ +```javascript + var table = new Table({ + chars: { + 'top': '═' + , 'top-mid': '╤' + , 'top-left': '╔' + , 'top-right': '╗' + , 'bottom': '═' + , 'bottom-mid': '╧' + , 'bottom-left': '╚' + , 'bottom-right': '╝' + , 'left': '║' + , 'left-mid': '╟' + , 'right': '║' + , 'right-mid': '╢' + }, + style: { + head: [] + , border: [] + } + }); + + table.push( + ['foo', 'bar', 'baz'] + , ['frob', 'bar', 'quuz'] + ); + +``` + + +##### Use ansi colors (i.e. colors.js) to style text within the cells at will, even across multiple lines +![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/c806c2636df97f73c732b41aa913cf78d4ac0d39/examples/screenshots/multi-line-colors.png) +```javascript + var table = new Table({style:{border:[],header:[]}}); + + table.push([ + colors.red('Hello\nhow\nare\nyou?'), + colors.blue('I\nam\nfine\nthanks!') + ]); + +``` + + +##### Set `wordWrap` to true to make lines of text wrap instead of being truncated + ┌───────┬─────────┐ + │ Hello │ I am │ + │ how │ fine │ + │ are │ thanks! │ + │ you? │ │ + └───────┴─────────┘ +```javascript + var table = new Table({ + style:{border:[],header:[]}, + colWidths:[7,9], + wordWrap:true + }); + + table.push([ + 'Hello how are you?', + 'I am fine thanks!' + ]); + +``` diff --git a/deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js b/deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js new file mode 100644 index 0000000000..0542b17d36 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/examples/basic-usage-examples.js @@ -0,0 +1,222 @@ +var Table = require('../src/table'); +var colors = require('colors/safe'); + +module.exports = function(runTest) { + + function it(name, fn) { + var result = fn(); + runTest(name, result[0], result[1], result[2]); + } + + it('Basic Usage',function(){ + function makeTable(){ + // By default, headers will be red, and borders will be grey + var table = new Table({head:['a','b']}); + + table.push(['c','d']); + + return table; + } + + var expected = [ + colors.gray('┌───') + colors.gray('┬───┐') + , colors.gray('│') + colors.red(' a ') + colors.gray('│') + colors.red(' b ') + colors.gray('│') + , colors.gray('├───') + colors.gray('┼───┤') + , colors.gray('│') + (' c ') + colors.gray('│') + (' d ') + colors.gray('│') + , colors.gray('└───') + colors.gray('┴───┘') + ]; + + return [makeTable,expected,'basic-usage-with-colors']; + }); + + it('Basic Usage - disable colors - (used often in the examples and tests)', function (){ + function makeTable(){ + // For most of these examples, and most of the unit tests we disable colors. + // It makes unit tests easier to write/understand, and allows these pages to + // display the examples as text instead of screen shots. + var table = new Table({ + head: ['Rel', 'Change', 'By', 'When'] + , style: { + head: [] //disable colors in header cells + , border: [] //disable colors for the border + } + , colWidths: [6, 21, 25, 17] //set the widths of each column (optional) + }); + + table.push( + ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '7 minutes ago'] + , ['v0.1', 'Testing something cool', 'rauchg@gmail.com', '8 minutes ago'] + ); + + return table; + } + + var expected = [ + '┌──────┬─────────────────────┬─────────────────────────┬─────────────────┐' + , '│ Rel │ Change │ By │ When │' + , '├──────┼─────────────────────┼─────────────────────────┼─────────────────┤' + , '│ v0.1 │ Testing something … │ rauchg@gmail.com │ 7 minutes ago │' + , '├──────┼─────────────────────┼─────────────────────────┼─────────────────┤' + , '│ v0.1 │ Testing something … │ rauchg@gmail.com │ 8 minutes ago │' + , '└──────┴─────────────────────┴─────────────────────────┴─────────────────┘' + ]; + + return [makeTable,expected]; + }); + + it('Create vertical tables by adding objects a that specify key-value pairs', function() { + function makeTable(){ + var table = new Table({ style: {'padding-left':0, 'padding-right':0, head:[], border:[]} }); + + table.push( + {'v0.1': 'Testing something cool'} + , {'v0.1': 'Testing something cool'} + ); + + return table; + } + + var expected = [ + '┌────┬──────────────────────┐' + , '│v0.1│Testing something cool│' + , '├────┼──────────────────────┤' + , '│v0.1│Testing something cool│' + , '└────┴──────────────────────┘' + ]; + + return [makeTable,expected]; + }); + + it('Cross tables are similar to vertical tables, but include an empty string for the first header', function() { + function makeTable(){ + var table = new Table({ head: ["", "Header 1", "Header 2"], style: {'padding-left':0, 'padding-right':0, head:[], border:[]} }); // clear styles to prevent color output + + table.push( + {"Header 3": ['v0.1', 'Testing something cool'] } + , {"Header 4": ['v0.1', 'Testing something cool'] } + ); + + return table; + } + + var expected = [ + '┌────────┬────────┬──────────────────────┐' + , '│ │Header 1│Header 2 │' + , '├────────┼────────┼──────────────────────┤' + , '│Header 3│v0.1 │Testing something cool│' + , '├────────┼────────┼──────────────────────┤' + , '│Header 4│v0.1 │Testing something cool│' + , '└────────┴────────┴──────────────────────┘' + ]; + + return [makeTable,expected]; + }); + + it('Stylize the table with custom border characters', function (){ + function makeTable(){ + var table = new Table({ + chars: { + 'top': '═' + , 'top-mid': '╤' + , 'top-left': '╔' + , 'top-right': '╗' + , 'bottom': '═' + , 'bottom-mid': '╧' + , 'bottom-left': '╚' + , 'bottom-right': '╝' + , 'left': '║' + , 'left-mid': '╟' + , 'right': '║' + , 'right-mid': '╢' + }, + style: { + head: [] + , border: [] + } + }); + + table.push( + ['foo', 'bar', 'baz'] + , ['frob', 'bar', 'quuz'] + ); + + return table; + } + + var expected = [ + '╔══════╤═════╤══════╗' + , '║ foo │ bar │ baz ║' + , '╟──────┼─────┼──────╢' + , '║ frob │ bar │ quuz ║' + , '╚══════╧═════╧══════╝' + ]; + + return [makeTable,expected]; + }); + + it('Use ansi colors (i.e. colors.js) to style text within the cells at will, even across multiple lines',function(){ + function makeTable(){ + var table = new Table({style:{border:[],header:[]}}); + + table.push([ + colors.red('Hello\nhow\nare\nyou?'), + colors.blue('I\nam\nfine\nthanks!') + ]); + + return table; + } + + var expected = [ + '┌───────┬─────────┐' + , '│ ' + colors.red('Hello') + ' │ ' + colors.blue('I') + ' │' + , '│ ' + colors.red('how') + ' │ ' + colors.blue('am') + ' │' + , '│ ' + colors.red('are') + ' │ ' + colors.blue('fine') + ' │' + , '│ ' + colors.red('you?') + ' │ ' + colors.blue('thanks!') + ' │' + , '└───────┴─────────┘' + ]; + + return [makeTable,expected,'multi-line-colors']; + }); + + it('Set `wordWrap` to true to make lines of text wrap instead of being truncated',function(){ + function makeTable(){ + var table = new Table({ + style:{border:[],header:[]}, + colWidths:[7,9], + wordWrap:true + }); + + table.push([ + 'Hello how are you?', + 'I am fine thanks!' + ]); + + return table; + } + + var expected = [ + '┌───────┬─────────┐' + , '│ Hello │ I am │' + , '│ how │ fine │' + , '│ are │ thanks! │' + , '│ you? │ │' + , '└───────┴─────────┘' + ]; + + return [makeTable,expected]; + }); +}; + +/* Expectation - ready to be copy/pasted and filled in. DO NOT DELETE THIS + + + var expected = [ + '┌──┬───┬──┬──┐' + , '│ │ │ │ │' + , '├──┼───┼──┼──┤' + , '│ │ … │ │ │' + , '├──┼───┼──┼──┤' + , '│ │ … │ │ │' + , '└──┴───┴──┴──┘' + ]; + */ \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js b/deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js new file mode 100644 index 0000000000..9cd6c1ad08 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/examples/col-and-row-span-examples.js @@ -0,0 +1,358 @@ +var Table = require('../src/table'); +var colors = require('colors/safe'); + +module.exports = function(runTest) { + + function it(name,fn) { + var result = fn(); + runTest(name,result[0],result[1],result[2]); + } + + it('use colSpan to span columns - (colSpan above normal cell)',function(){ + function makeTable(){ + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{colSpan:2,content:'greetings'}], + [{colSpan:2,content:'greetings'}], + ['hello','howdy'] + ); + + return table; + } + + var expected = [ + '┌───────────────┐' + , '│ greetings │' + , '├───────────────┤' + , '│ greetings │' + , '├───────┬───────┤' + , '│ hello │ howdy │' + , '└───────┴───────┘' + ]; + + return [makeTable,expected]; + }); + + it('use colSpan to span columns - (colSpan below normal cell)',function(){ + function makeTable(){ + var table = new Table({style:{head:[],border:[]}}); + + table.push( + ['hello','howdy'], + [{colSpan:2,content:'greetings'}], + [{colSpan:2,content:'greetings'}] + ); + + return table; + } + + var expected = [ + '┌───────┬───────┐' + , '│ hello │ howdy │' + , '├───────┴───────┤' + , '│ greetings │' + , '├───────────────┤' + , '│ greetings │' + , '└───────────────┘' + ]; + + return [makeTable,expected]; + }); + + it('use rowSpan to span rows - (rowSpan on the left side)',function(){ + function makeTable(){ + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'center'},'hello'], + ['howdy'] + ); + + return table; + } + + var expected = [ + '┌───────────┬───────────┬───────┐' + , '│ greetings │ │ hello │' + , '│ │ greetings ├───────┤' + , '│ │ │ howdy │' + , '└───────────┴───────────┴───────┘' + ]; + + return [makeTable,expected]; + }); + + + it('use rowSpan to span rows - (rowSpan on the right side)',function(){ + function makeTable(){ + var table = new Table({style:{head:[],border:[]}}); + + table.push( + ['hello',{rowSpan:2,content:'greetings'},{rowSpan:2,content:'greetings',vAlign:'bottom'}], + ['howdy'] + ); + + return table; + } + + var expected = [ + '┌───────┬───────────┬───────────┐' + , '│ hello │ greetings │ │' + , '├───────┤ │ │' + , '│ howdy │ │ greetings │' + , '└───────┴───────────┴───────────┘' + ]; + + return[makeTable,expected]; + }); + + it('mix rowSpan and colSpan together for complex table layouts',function(){ + function makeTable(){ + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup'},{rowSpan:3,content:'hi'}], + [{content:'howdy',colSpan:2}], + ['o','k','',''] + ); + + return table; + } + + var expected = [ + '┌───────┬─────┬────┐' + , '│ hello │ sup │ hi │' + , '├───────┤ │ │' + , '│ howdy │ │ │' + , '├───┬───┼──┬──┤ │' + , '│ o │ k │ │ │ │' + , '└───┴───┴──┴──┴────┘' + ]; + + return [makeTable,expected]; + }); + + it('multi-line content will flow across rows in rowSpan cells',function(){ + function makeTable(){ + var table = new Table({style:{head:[],border:[]}}); + + table.push( + ['hello',{rowSpan:2,content:'greetings\nfriends'},{rowSpan:2,content:'greetings\nfriends'}], + ['howdy'] + ); + + return table; + } + + var expected = [ + '┌───────┬───────────┬───────────┐' + , '│ hello │ greetings │ greetings │' + , '├───────┤ friends │ friends │' + , '│ howdy │ │ │' + , '└───────┴───────────┴───────────┘' + ]; + + return [makeTable, expected]; + }); + + it('multi-line content will flow across rows in rowSpan cells - (complex layout)',function(){ + function makeTable(){ + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{content:'hello',colSpan:2},{rowSpan:2, colSpan:2,content:'sup\nman\nhey'},{rowSpan:3,content:'hi\nyo'}], + [{content:'howdy',colSpan:2}], + ['o','k','',''] + ); + + return table; + } + + var expected = [ + '┌───────┬─────┬────┐' + , '│ hello │ sup │ hi │' + , '├───────┤ man │ yo │' + , '│ howdy │ hey │ │' + , '├───┬───┼──┬──┤ │' + , '│ o │ k │ │ │ │' + , '└───┴───┴──┴──┴────┘' + ]; + + return [makeTable,expected]; + }); + + it('rowSpan cells can have a staggered layout',function(){ + function makeTable(){ + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{content:'a',rowSpan:2},'b'], + [{content:'c',rowSpan:2}], + ['d'] + ); + + return table; + } + + var expected = [ + '┌───┬───┐' + , '│ a │ b │' + , '│ ├───┤' + , '│ │ c │' + , '├───┤ │' + , '│ d │ │' + , '└───┴───┘' + ]; + + return [makeTable,expected]; + }); + + it('the layout manager automatically create empty cells to fill in the table',function(){ + function makeTable(){ + var table = new Table({style:{head:[],border:[]}}); + + //notice we only create 3 cells here, but the table ends up having 6. + table.push( + [{content:'a',rowSpan:3,colSpan:2},'b'], + [], + [{content:'c',rowSpan:2,colSpan:2}], + [] + ); + return table; + } + + var expected = [ + '┌───┬───┬──┐' + , '│ a │ b │ │' // top-right and bottom-left cells are automatically created to fill the empty space + , '│ ├───┤ │' + , '│ │ │ │' + , '│ ├───┴──┤' + , '│ │ c │' + , '├───┤ │' + , '│ │ │' + , '└───┴──────┘' + ]; + + return [makeTable,expected]; + }); + + it('use table `rowHeights` option to fix row height. The truncation symbol will be shown on the last line.',function(){ + function makeTable(){ + var table = new Table({rowHeights:[2],style:{head:[],border:[]}}); + + table.push(['hello\nhi\nsup']); + + return table; + } + + var expected = [ + '┌───────┐' + , '│ hello │' + , '│ hi… │' + , '└───────┘' + ]; + + return [makeTable,expected]; + }); + + it('if `colWidths` is not specified, the layout manager will automatically widen rows to fit the content',function(){ + function makeTable(){ + var table = new Table({style:{head:[],border:[]}}); + + table.push( + [{colSpan:2,content:'hello there'}], + ['hi', 'hi'] + ); + + return table; + } + + var expected = [ + '┌─────────────┐' + , '│ hello there │' + , '├──────┬──────┤' + , '│ hi │ hi │' + , '└──────┴──────┘' + ]; + + return [makeTable,expected]; + }); + + it('you can specify a column width for only the first row, other rows will be automatically widened to fit content',function(){ + function makeTable(){ + var table = new Table({colWidths:[4],style:{head:[],border:[]}}); + + table.push( + [{colSpan:2,content:'hello there'}], + ['hi',{hAlign:'center',content:'hi'}] + ); + + return table; + } + + var expected = [ + '┌─────────────┐' + , '│ hello there │' + , '├────┬────────┤' + , '│ hi │ hi │' + , '└────┴────────┘' + ]; + + return [makeTable, expected]; + }); + + it('a column with a null column width will be automatically widened to fit content',function(){ + function makeTable(){ + var table = new Table({colWidths:[null, 4],style:{head:[],border:[]}}); + + table.push( + [{colSpan:2,content:'hello there'}], + [{hAlign:'right',content:'hi'}, 'hi'] + ); + + return table; + } + + var expected = [ + '┌─────────────┐' + , '│ hello there │' + , '├────────┬────┤' + , '│ hi │ hi │' + , '└────────┴────┘' + ]; + + return [makeTable,expected]; + }); + + it('feel free to use colors in your content strings, column widths will be calculated correctly',function(){ + function makeTable(){ + var table = new Table({colWidths:[5],style:{head:[],border:[]}}); + + table.push([colors.red('hello')]); + + return table; + } + + var expected = [ + '┌─────┐' + , '│ ' + colors.red('he') + '… │' + , '└─────┘' + ]; + + return [makeTable,expected,'truncation-with-colors']; + }); +}; + +/* + + var expected = [ + '┌──┬───┬──┬──┐' + , '│ │ │ │ │' + , '├──┼───┼──┼──┤' + , '│ │ … │ │ │' + , '├──┼───┼──┼──┤' + , '│ │ … │ │ │' + , '└──┴───┴──┴──┘' + ]; + */ \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/examples/screenshots/basic-usage-with-colors.png b/deps/npm/node_modules/cli-table2/examples/screenshots/basic-usage-with-colors.png new file mode 100644 index 0000000000..88399fca00 Binary files /dev/null and b/deps/npm/node_modules/cli-table2/examples/screenshots/basic-usage-with-colors.png differ diff --git a/deps/npm/node_modules/cli-table2/examples/screenshots/multi-line-colors.png b/deps/npm/node_modules/cli-table2/examples/screenshots/multi-line-colors.png new file mode 100644 index 0000000000..36f6f34f8d Binary files /dev/null and b/deps/npm/node_modules/cli-table2/examples/screenshots/multi-line-colors.png differ diff --git a/deps/npm/node_modules/cli-table2/examples/screenshots/truncation-with-colors.png b/deps/npm/node_modules/cli-table2/examples/screenshots/truncation-with-colors.png new file mode 100644 index 0000000000..d14b9d2fe1 Binary files /dev/null and b/deps/npm/node_modules/cli-table2/examples/screenshots/truncation-with-colors.png differ diff --git a/deps/npm/node_modules/cli-table2/gulpfile.js b/deps/npm/node_modules/cli-table2/gulpfile.js new file mode 100644 index 0000000000..5349626068 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/gulpfile.js @@ -0,0 +1,73 @@ +var gulp = require('gulp'); +var gutil = require('gulp-util'); +var mocha = require('gulp-mocha'); +var istanbul = require('gulp-istanbul'); +var printExample = require('./lib/print-example'); +var _ = require('lodash'); + +gulp.task('test',mochaTask); +gulp.task('coverage',coverage()); +gulp.task('coverage-api',coverage({grep:'@api'})); + +gulp.task('watch-test',function(){ + gulp.watch(['test/**','src/**','examples/**'],['test']); + mochaTask(); +}); + +gulp.task('example',function(){ + printExample.logExample(require('./examples/basic-usage-examples')); + printExample.logExample(require('./examples/col-and-row-span-examples')); +}); + +/** + * Do NOT run this in the same commit when you are adding images. + * Commit the images, then run this. + */ +gulp.task('example-md',['example-md-basic','example-md-advanced']); +gulp.task('example-md-basic',function(cb){ + printExample.mdExample(require('./examples/basic-usage-examples'),'basic-usage.md',cb); +}); +gulp.task('example-md-advanced',function(cb){ + printExample.mdExample(require('./examples/col-and-row-span-examples'),'advanced-usage.md',cb); +}); + +function coverage(opts){ + opts = opts || {}; + + function coverageTask(cb){ + gulp.src(['src/*.js']) + .pipe(istanbul()) // Covering files + .pipe(istanbul.hookRequire()) // Force `require` to return covered files + .on('error', logMochaError) + .on('finish', function () { + gulp.src(['test/*.js']) + .pipe(mocha(opts)) + .on('error',function(err){ + logMochaError(err); + if(cb) cb(err); + }) + .pipe(istanbul.writeReports()) // Creating the reports after tests run + .on('end', function(){ + if(cb) cb(); + }); + }); + } + + return coverageTask; +} + +function mochaTask(){ + return gulp.src(['test/*.js'],{read:false}) + .pipe(mocha({ + growl:true + })) + .on('error',logMochaError); +} + +function logMochaError(err){ + if(err && err.message){ + gutil.log(err.message); + } else { + gutil.log.apply(gutil,arguments); + } +} \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/index.js b/deps/npm/node_modules/cli-table2/index.js new file mode 100644 index 0000000000..b49d920dd3 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/index.js @@ -0,0 +1 @@ +module.exports = require('./src/table'); \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/lib/print-example.js b/deps/npm/node_modules/cli-table2/lib/print-example.js new file mode 100644 index 0000000000..ae23609cb2 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/lib/print-example.js @@ -0,0 +1,123 @@ +var chai = require('chai'); +var expect = chai.expect; +var colors = require('colors/safe'); +var _ = require('lodash'); +var fs = require('fs'); +var git = require('git-rev'); + +function logExample(fn){ + runPrintingExample(fn, + function logName(name){ + console.log(colors.gray('========= ') + name + colors.gray(' ================')); + }, + console.log, //logTable + console.log, //logCode + console.log, //logSeparator + identity //screenShot + ) +} + +function mdExample(fn,file,cb){ + git.long(function(commitHash){ + var buffer = []; + + runPrintingExample(fn, + function logName(name){ + buffer.push('##### ' + name); + }, + function logTable(table){ + //md files won't render color strings properly. + table = stripColors(table); + + // indent table so is displayed preformatted text + table = ' ' + (table.split('\n').join('\n ')); + + buffer.push(table); + }, + function logCode(code){ + buffer.push('```javascript'); + buffer.push(stripColors(code)); + buffer.push('```'); + }, + function logSeparator(sep){ + buffer.push(stripColors(sep)); + }, + function logScreenShot(image){ + buffer.push('![table image](https://cdn.rawgit.com/jamestalmage/cli-table2/' + + commitHash + '/examples/screenshots/' + image + '.png)'); + } + ); + + fs.writeFileSync(file,buffer.join('\n')); + + if(cb){cb();} + }); +} + +/** + * Actually runs the tests and verifies the functions create the expected output. + * @param name of the test suite, used in the mocha.describe call. + * @param fn a function which creates the test suite. + */ +function runTest(name,fn){ + function testExample(name,fn,expected){ + it(name,function(){ + expect(fn().toString()).to.equal(expected.join('\n')); + }); + } + + describe(name,function () { + fn(testExample,identity); + }); +} + +/** + * Common execution for runs that print output (either to console or to a Markdown file); + * @param fn - a function containing the tests/demos. + * @param logName - callback to print the name of this test to the console or file. + * @param logTable - callback to print the output of the table to the console or file. + * @param logCode - callback to print the output of the table to the console or file. + * @param logSeparator - callback to print extra whitespace between demos. + * @param logScreenShot - write out a link to the screenShot image. + */ +function runPrintingExample(fn,logName,logTable,logCode,logSeparator,logScreenShot){ + + /** + * Called by every test/demo + * @param name - the name of this test. + * @param makeTable - a function which builds the table under test. Also, The contents of this function will be printed. + * @param expected - The expected result. + * @param screenshot - If present, there is an image containing a screenshot of the output + */ + function printExample(name,makeTable,expected,screenshot){ + var code = makeTable.toString().split('\n').slice(1,-2).join('\n'); + + logName(name); + if(screenshot && logScreenShot){ + logScreenShot(screenshot); + } + else { + logTable(makeTable().toString()); + } + logCode(code); + logSeparator('\n'); + } + + fn(printExample); +} + +// removes all the color characters from a string +function stripColors(str){ + return str.split( /\u001b\[(?:\d*;){0,5}\d*m/g).join(''); +} + +// returns the first arg - used as snapshot function +function identity(str){ + return str; +} + +module.exports = { + mdExample:mdExample, + logExample:logExample, + runTest:runTest +}; \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/LICENSE b/deps/npm/node_modules/cli-table2/node_modules/colors/LICENSE new file mode 100644 index 0000000000..3de4e33b48 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/LICENSE @@ -0,0 +1,23 @@ +Original Library + - Copyright (c) Marak Squires + +Additional Functionality + - 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. \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/ReadMe.md b/deps/npm/node_modules/cli-table2/node_modules/colors/ReadMe.md new file mode 100644 index 0000000000..7f12859636 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/ReadMe.md @@ -0,0 +1,178 @@ +# colors.js [![Build Status](https://travis-ci.org/Marak/colors.js.svg?branch=master)](https://travis-ci.org/Marak/colors.js) + +## get color and style in your node.js console + +![Demo](https://raw.githubusercontent.com/Marak/colors.js/master/screenshots/colors.png) + +## Installation + + npm install colors + +## colors and styles! + +### text colors + + - black + - red + - green + - yellow + - blue + - magenta + - cyan + - white + - gray + - grey + +### background colors + + - bgBlack + - bgRed + - bgGreen + - bgYellow + - bgBlue + - bgMagenta + - bgCyan + - bgWhite + +### styles + + - reset + - bold + - dim + - italic + - underline + - inverse + - hidden + - strikethrough + +### extras + + - rainbow + - zebra + - america + - trap + - random + + +## Usage + +By popular demand, `colors` now ships with two types of usages! + +The super nifty way + +```js +var colors = require('colors'); + +console.log('hello'.green); // outputs green text +console.log('i like cake and pies'.underline.red) // outputs red underlined text +console.log('inverse the color'.inverse); // inverses the color +console.log('OMG Rainbows!'.rainbow); // rainbow +console.log('Run the trap'.trap); // Drops the bass + +``` + +or a slightly less nifty way which doesn't extend `String.prototype` + +```js +var colors = require('colors/safe'); + +console.log(colors.green('hello')); // outputs green text +console.log(colors.red.underline('i like cake and pies')) // outputs red underlined text +console.log(colors.inverse('inverse the color')); // inverses the color +console.log(colors.rainbow('OMG Rainbows!')); // rainbow +console.log(colors.trap('Run the trap')); // Drops the bass + +``` + +I prefer the first way. Some people seem to be afraid of extending `String.prototype` and prefer the second way. + +If you are writing good code you will never have an issue with the first approach. If you really don't want to touch `String.prototype`, the second usage will not touch `String` native object. + +## Disabling Colors + +To disable colors you can pass the following arguments in the command line to your application: + +```bash +node myapp.js --no-color +``` + +## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data) + +```js +var name = 'Marak'; +console.log(colors.green('Hello %s'), name); +// outputs -> 'Hello Marak' +``` + +## Custom themes + +### Using standard API + +```js + +var colors = require('colors'); + +colors.setTheme({ + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}); + +// outputs red text +console.log("this is an error".error); + +// outputs yellow text +console.log("this is a warning".warn); +``` + +### Using string safe API + +```js +var colors = require('colors/safe'); + +// set single property +var error = colors.red; +error('this is red'); + +// set theme +colors.setTheme({ + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}); + +// outputs red text +console.log(colors.error("this is an error")); + +// outputs yellow text +console.log(colors.warn("this is a warning")); + +``` + +You can also combine them: + +```javascript +var colors = require('colors'); + +colors.setTheme({ + custom: ['red', 'underline'] +}); + +console.log('test'.custom); +``` + +*Protip: There is a secret undocumented style in `colors`. If you find the style you can summon him.* diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/examples/normal-usage.js b/deps/npm/node_modules/cli-table2/node_modules/colors/examples/normal-usage.js new file mode 100644 index 0000000000..2818741e1f --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/examples/normal-usage.js @@ -0,0 +1,74 @@ +var colors = require('../lib/index'); + +console.log("First some yellow text".yellow); + +console.log("Underline that text".yellow.underline); + +console.log("Make it bold and red".red.bold); + +console.log(("Double Raindows All Day Long").rainbow) + +console.log("Drop the bass".trap) + +console.log("DROP THE RAINBOW BASS".trap.rainbow) + + +console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported + +console.log('So '.green + 'are'.underline + ' ' + 'inverse'.inverse + ' styles! '.yellow.bold); // styles not widely supported +console.log("Zebras are so fun!".zebra); + +// +// Remark: .strikethrough may not work with Mac OS Terminal App +// +console.log("This is " + "not".strikethrough + " fun."); + +console.log('Background color attack!'.black.bgWhite) +console.log('Use random styles on everything!'.random) +console.log('America, Heck Yeah!'.america) + + +console.log('Setting themes is useful') + +// +// Custom themes +// +console.log('Generic logging theme as JSON'.green.bold.underline); +// Load theme with JSON literal +colors.setTheme({ + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}); + +// outputs red text +console.log("this is an error".error); + +// outputs yellow text +console.log("this is a warning".warn); + +// outputs grey text +console.log("this is an input".input); + +console.log('Generic logging theme as file'.green.bold.underline); + +// Load a theme from file +colors.setTheme(__dirname + '/../themes/generic-logging.js'); + +// outputs red text +console.log("this is an error".error); + +// outputs yellow text +console.log("this is a warning".warn); + +// outputs grey text +console.log("this is an input".input); + +//console.log("Don't summon".zalgo) \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/examples/safe-string.js b/deps/npm/node_modules/cli-table2/node_modules/colors/examples/safe-string.js new file mode 100644 index 0000000000..47e5633afe --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/examples/safe-string.js @@ -0,0 +1,73 @@ +var colors = require('../safe'); + +console.log(colors.yellow("First some yellow text")); + +console.log(colors.yellow.underline("Underline that text")); + +console.log(colors.red.bold("Make it bold and red")); + +console.log(colors.rainbow("Double Raindows All Day Long")) + +console.log(colors.trap("Drop the bass")) + +console.log(colors.rainbow(colors.trap("DROP THE RAINBOW BASS"))); + +console.log(colors.bold.italic.underline.red('Chains are also cool.')); // styles not widely supported + + +console.log(colors.green('So ') + colors.underline('are') + ' ' + colors.inverse('inverse') + colors.yellow.bold(' styles! ')); // styles not widely supported + +console.log(colors.zebra("Zebras are so fun!")); + +console.log("This is " + colors.strikethrough("not") + " fun."); + + +console.log(colors.black.bgWhite('Background color attack!')); +console.log(colors.random('Use random styles on everything!')) +console.log(colors.america('America, Heck Yeah!')); + +console.log('Setting themes is useful') + +// +// Custom themes +// +//console.log('Generic logging theme as JSON'.green.bold.underline); +// Load theme with JSON literal +colors.setTheme({ + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}); + +// outputs red text +console.log(colors.error("this is an error")); + +// outputs yellow text +console.log(colors.warn("this is a warning")); + +// outputs grey text +console.log(colors.input("this is an input")); + + +// console.log('Generic logging theme as file'.green.bold.underline); + +// Load a theme from file +colors.setTheme(__dirname + '/../themes/generic-logging.js'); + +// outputs red text +console.log(colors.error("this is an error")); + +// outputs yellow text +console.log(colors.warn("this is a warning")); + +// outputs grey text +console.log(colors.input("this is an input")); + +// console.log(colors.zalgo("Don't summon him")) diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/colors.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/colors.js new file mode 100644 index 0000000000..823e3ddd0d --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/colors.js @@ -0,0 +1,187 @@ +/* + +The MIT License (MIT) + +Original Library + - Copyright (c) Marak Squires + +Additional functionality + - 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. + +*/ + +var colors = {}; +module['exports'] = colors; + +colors.themes = {}; + +var ansiStyles = colors.styles = require('./styles'); +var defineProps = Object.defineProperties; + +colors.supportsColor = require('./system/supports-colors'); + +if (typeof colors.enabled === "undefined") { + colors.enabled = colors.supportsColor; +} + +colors.stripColors = colors.strip = function(str){ + return ("" + str).replace(/\x1B\[\d+m/g, ''); +}; + + +var stylize = colors.stylize = function stylize (str, style) { + if (!colors.enabled) { + return str+''; + } + + return ansiStyles[style].open + str + ansiStyles[style].close; +} + +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; +var escapeStringRegexp = function (str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + return str.replace(matchOperatorsRe, '\\$&'); +} + +function build(_styles) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + builder._styles = _styles; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + builder.__proto__ = proto; + return builder; +} + +var styles = (function () { + var ret = {}; + ansiStyles.grey = ansiStyles.gray; + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + ret[key] = { + get: function () { + return build(this._styles.concat(key)); + } + }; + }); + return ret; +})(); + +var proto = defineProps(function colors() {}, styles); + +function applyStyle() { + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + if (argsLen > 1) { + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!colors.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + + var i = nestedStyles.length; + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + return str; +} + +function applyTheme (theme) { + for (var style in theme) { + (function(style){ + colors[style] = function(str){ + if (typeof theme[style] === 'object'){ + var out = str; + for (var i in theme[style]){ + out = colors[theme[style][i]](out); + } + return out; + } + return colors[theme[style]](str); + }; + })(style) + } +} + +colors.setTheme = function (theme) { + if (typeof theme === 'string') { + try { + colors.themes[theme] = require(theme); + applyTheme(colors.themes[theme]); + return colors.themes[theme]; + } catch (err) { + console.log(err); + return err; + } + } else { + applyTheme(theme); + } +}; + +function init() { + var ret = {}; + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function () { + return build([name]); + } + }; + }); + return ret; +} + +var sequencer = function sequencer (map, str) { + var exploded = str.split(""), i = 0; + exploded = exploded.map(map); + return exploded.join(""); +}; + +// custom formatter methods +colors.trap = require('./custom/trap'); +colors.zalgo = require('./custom/zalgo'); + +// maps +colors.maps = {}; +colors.maps.america = require('./maps/america'); +colors.maps.zebra = require('./maps/zebra'); +colors.maps.rainbow = require('./maps/rainbow'); +colors.maps.random = require('./maps/random') + +for (var map in colors.maps) { + (function(map){ + colors[map] = function (str) { + return sequencer(colors.maps[map], str); + } + })(map) +} + +defineProps(colors, init()); \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/trap.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/trap.js new file mode 100644 index 0000000000..3f09143738 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/trap.js @@ -0,0 +1,45 @@ +module['exports'] = function runTheTrap (text, options) { + var result = ""; + text = text || "Run the trap, drop the bass"; + text = text.split(''); + var trap = { + a: ["\u0040", "\u0104", "\u023a", "\u0245", "\u0394", "\u039b", "\u0414"], + b: ["\u00df", "\u0181", "\u0243", "\u026e", "\u03b2", "\u0e3f"], + c: ["\u00a9", "\u023b", "\u03fe"], + d: ["\u00d0", "\u018a", "\u0500" , "\u0501" ,"\u0502", "\u0503"], + e: ["\u00cb", "\u0115", "\u018e", "\u0258", "\u03a3", "\u03be", "\u04bc", "\u0a6c"], + f: ["\u04fa"], + g: ["\u0262"], + h: ["\u0126", "\u0195", "\u04a2", "\u04ba", "\u04c7", "\u050a"], + i: ["\u0f0f"], + j: ["\u0134"], + k: ["\u0138", "\u04a0", "\u04c3", "\u051e"], + l: ["\u0139"], + m: ["\u028d", "\u04cd", "\u04ce", "\u0520", "\u0521", "\u0d69"], + n: ["\u00d1", "\u014b", "\u019d", "\u0376", "\u03a0", "\u048a"], + o: ["\u00d8", "\u00f5", "\u00f8", "\u01fe", "\u0298", "\u047a", "\u05dd", "\u06dd", "\u0e4f"], + p: ["\u01f7", "\u048e"], + q: ["\u09cd"], + r: ["\u00ae", "\u01a6", "\u0210", "\u024c", "\u0280", "\u042f"], + s: ["\u00a7", "\u03de", "\u03df", "\u03e8"], + t: ["\u0141", "\u0166", "\u0373"], + u: ["\u01b1", "\u054d"], + v: ["\u05d8"], + w: ["\u0428", "\u0460", "\u047c", "\u0d70"], + x: ["\u04b2", "\u04fe", "\u04fc", "\u04fd"], + y: ["\u00a5", "\u04b0", "\u04cb"], + z: ["\u01b5", "\u0240"] + } + text.forEach(function(c){ + c = c.toLowerCase(); + var chars = trap[c] || [" "]; + var rand = Math.floor(Math.random() * chars.length); + if (typeof trap[c] !== "undefined") { + result += trap[c][rand]; + } else { + result += c; + } + }); + return result; + +} diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/zalgo.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/zalgo.js new file mode 100644 index 0000000000..45c89a8d30 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/custom/zalgo.js @@ -0,0 +1,104 @@ +// please no +module['exports'] = function zalgo(text, options) { + text = text || " he is here "; + var soul = { + "up" : [ + '̍', '̎', '̄', '̅', + '̿', '̑', '̆', '̐', + '͒', '͗', '͑', '̇', + '̈', '̊', '͂', '̓', + '̈', '͊', '͋', '͌', + '̃', '̂', '̌', '͐', + '̀', '́', '̋', '̏', + '̒', '̓', '̔', '̽', + '̉', 'ͣ', 'ͤ', 'ͥ', + 'ͦ', 'ͧ', 'ͨ', 'ͩ', + 'ͪ', 'ͫ', 'ͬ', 'ͭ', + 'ͮ', 'ͯ', '̾', '͛', + '͆', '̚' + ], + "down" : [ + '̖', '̗', '̘', '̙', + '̜', '̝', '̞', '̟', + '̠', '̤', '̥', '̦', + '̩', '̪', '̫', '̬', + '̭', '̮', '̯', '̰', + '̱', '̲', '̳', '̹', + '̺', '̻', '̼', 'ͅ', + '͇', '͈', '͉', '͍', + '͎', '͓', '͔', '͕', + '͖', '͙', '͚', '̣' + ], + "mid" : [ + '̕', '̛', '̀', '́', + '͘', '̡', '̢', '̧', + '̨', '̴', '̵', '̶', + '͜', '͝', '͞', + '͟', '͠', '͢', '̸', + '̷', '͡', ' ҉' + ] + }, + all = [].concat(soul.up, soul.down, soul.mid), + zalgo = {}; + + function randomNumber(range) { + var r = Math.floor(Math.random() * range); + return r; + } + + function is_char(character) { + var bool = false; + all.filter(function (i) { + bool = (i === character); + }); + return bool; + } + + + function heComes(text, options) { + var result = '', counts, l; + options = options || {}; + options["up"] = typeof options["up"] !== 'undefined' ? options["up"] : true; + options["mid"] = typeof options["mid"] !== 'undefined' ? options["mid"] : true; + options["down"] = typeof options["down"] !== 'undefined' ? options["down"] : true; + options["size"] = typeof options["size"] !== 'undefined' ? options["size"] : "maxi"; + text = text.split(''); + for (l in text) { + if (is_char(l)) { + continue; + } + result = result + text[l]; + counts = {"up" : 0, "down" : 0, "mid" : 0}; + switch (options.size) { + case 'mini': + counts.up = randomNumber(8); + counts.mid = randomNumber(2); + counts.down = randomNumber(8); + break; + case 'maxi': + counts.up = randomNumber(16) + 3; + counts.mid = randomNumber(4) + 1; + counts.down = randomNumber(64) + 3; + break; + default: + counts.up = randomNumber(8) + 1; + counts.mid = randomNumber(6) / 2; + counts.down = randomNumber(8) + 1; + break; + } + + var arr = ["up", "mid", "down"]; + for (var d in arr) { + var index = arr[d]; + for (var i = 0 ; i <= counts[index]; i++) { + if (options[index]) { + result = result + soul[index][randomNumber(soul[index].length)]; + } + } + } + } + return result; + } + // don't summon him + return heComes(text, options); +} diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/extendStringPrototype.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/extendStringPrototype.js new file mode 100644 index 0000000000..67374a1c22 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/extendStringPrototype.js @@ -0,0 +1,113 @@ +var colors = require('./colors'); + +module['exports'] = function () { + + // + // Extends prototype of native string object to allow for "foo".red syntax + // + var addProperty = function (color, func) { + String.prototype.__defineGetter__(color, func); + }; + + var sequencer = function sequencer (map, str) { + return function () { + var exploded = this.split(""), i = 0; + exploded = exploded.map(map); + return exploded.join(""); + } + }; + + addProperty('strip', function () { + return colors.strip(this); + }); + + addProperty('stripColors', function () { + return colors.strip(this); + }); + + addProperty("trap", function(){ + return colors.trap(this); + }); + + addProperty("zalgo", function(){ + return colors.zalgo(this); + }); + + addProperty("zebra", function(){ + return colors.zebra(this); + }); + + addProperty("rainbow", function(){ + return colors.rainbow(this); + }); + + addProperty("random", function(){ + return colors.random(this); + }); + + addProperty("america", function(){ + return colors.america(this); + }); + + // + // Iterate through all default styles and colors + // + var x = Object.keys(colors.styles); + x.forEach(function (style) { + addProperty(style, function () { + return colors.stylize(this, style); + }); + }); + + function applyTheme(theme) { + // + // Remark: This is a list of methods that exist + // on String that you should not overwrite. + // + var stringPrototypeBlacklist = [ + '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', + 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', + 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring', + 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight' + ]; + + Object.keys(theme).forEach(function (prop) { + if (stringPrototypeBlacklist.indexOf(prop) !== -1) { + console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name'); + } + else { + if (typeof(theme[prop]) === 'string') { + colors[prop] = colors[theme[prop]]; + addProperty(prop, function () { + return colors[theme[prop]](this); + }); + } + else { + addProperty(prop, function () { + var ret = this; + for (var t = 0; t < theme[prop].length; t++) { + ret = colors[theme[prop][t]](ret); + } + return ret; + }); + } + } + }); + } + + colors.setTheme = function (theme) { + if (typeof theme === 'string') { + try { + colors.themes[theme] = require(theme); + applyTheme(colors.themes[theme]); + return colors.themes[theme]; + } catch (err) { + console.log(err); + return err; + } + } else { + applyTheme(theme); + } + }; + +}; \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/index.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/index.js new file mode 100644 index 0000000000..fd0956d03a --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/index.js @@ -0,0 +1,12 @@ +var colors = require('./colors'); +module['exports'] = colors; + +// Remark: By default, colors will add style properties to String.prototype +// +// If you don't wish to extend String.prototype you can do this instead and native String will not be touched +// +// var colors = require('colors/safe); +// colors.red("foo") +// +// +require('./extendStringPrototype')(); \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/america.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/america.js new file mode 100644 index 0000000000..a07d8327ff --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/america.js @@ -0,0 +1,12 @@ +var colors = require('../colors'); + +module['exports'] = (function() { + return function (letter, i, exploded) { + if(letter === " ") return letter; + switch(i%3) { + case 0: return colors.red(letter); + case 1: return colors.white(letter) + case 2: return colors.blue(letter) + } + } +})(); \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/rainbow.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/rainbow.js new file mode 100644 index 0000000000..5442744369 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/rainbow.js @@ -0,0 +1,12 @@ +var colors = require('../colors'); + +module['exports'] = (function () { + var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV + return function (letter, i, exploded) { + if (letter === " ") { + return letter; + } else { + return colors[rainbowColors[i++ % rainbowColors.length]](letter); + } + }; +})(); diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/random.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/random.js new file mode 100644 index 0000000000..5cd101fae2 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/random.js @@ -0,0 +1,8 @@ +var colors = require('../colors'); + +module['exports'] = (function () { + var available = ['underline', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; + return function(letter, i, exploded) { + return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 1))]](letter); + }; +})(); \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/zebra.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/zebra.js new file mode 100644 index 0000000000..bf7dcdead0 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/maps/zebra.js @@ -0,0 +1,5 @@ +var colors = require('../colors'); + +module['exports'] = function (letter, i, exploded) { + return i % 2 === 0 ? letter : colors.inverse(letter); +}; \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/styles.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/styles.js new file mode 100644 index 0000000000..067d59070c --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/styles.js @@ -0,0 +1,77 @@ +/* +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. + +*/ + +var styles = {}; +module['exports'] = styles; + +var codes = { + reset: [0, 0], + + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29], + + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39], + grey: [90, 39], + + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // legacy styles for colors pre v1.0.0 + blackBG: [40, 49], + redBG: [41, 49], + greenBG: [42, 49], + yellowBG: [43, 49], + blueBG: [44, 49], + magentaBG: [45, 49], + cyanBG: [46, 49], + whiteBG: [47, 49] + +}; + +Object.keys(codes).forEach(function (key) { + var val = codes[key]; + var style = styles[key] = []; + style.open = '\u001b[' + val[0] + 'm'; + style.close = '\u001b[' + val[1] + 'm'; +}); \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/lib/system/supports-colors.js b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/system/supports-colors.js new file mode 100644 index 0000000000..3e008aa93a --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/lib/system/supports-colors.js @@ -0,0 +1,61 @@ +/* +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. + +*/ + +var argv = process.argv; + +module.exports = (function () { + if (argv.indexOf('--no-color') !== -1 || + argv.indexOf('--color=false') !== -1) { + return false; + } + + if (argv.indexOf('--color') !== -1 || + argv.indexOf('--color=true') !== -1 || + argv.indexOf('--color=always') !== -1) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +})(); \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/package.json b/deps/npm/node_modules/cli-table2/node_modules/colors/package.json new file mode 100644 index 0000000000..71f264dbdb --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/package.json @@ -0,0 +1,61 @@ +{ + "_from": "colors@^1.1.2", + "_id": "colors@1.1.2", + "_inBundle": false, + "_integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "_location": "/cli-table2/colors", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "colors@^1.1.2", + "name": "colors", + "escapedName": "colors", + "rawSpec": "^1.1.2", + "saveSpec": null, + "fetchSpec": "^1.1.2" + }, + "_requiredBy": [ + "/cli-table2" + ], + "_resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "_shasum": "168a4701756b6a7f51a12ce0c97bfa28c084ed63", + "_spec": "colors@^1.1.2", + "_where": "/Users/rebecca/code/npm/node_modules/cli-table2", + "author": { + "name": "Marak Squires" + }, + "bugs": { + "url": "https://github.com/Marak/colors.js/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "get colors in your node.js console", + "engines": { + "node": ">=0.1.90" + }, + "files": [ + "examples", + "lib", + "LICENSE", + "safe.js", + "themes" + ], + "homepage": "https://github.com/Marak/colors.js", + "keywords": [ + "ansi", + "terminal", + "colors" + ], + "license": "MIT", + "main": "lib", + "name": "colors", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/Marak/colors.js.git" + }, + "scripts": { + "test": "node tests/basic-test.js && node tests/safe-test.js" + }, + "version": "1.1.2" +} diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/safe.js b/deps/npm/node_modules/cli-table2/node_modules/colors/safe.js new file mode 100644 index 0000000000..a6a1f3ab47 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/safe.js @@ -0,0 +1,9 @@ +// +// Remark: Requiring this file will use the "safe" colors API which will not touch String.prototype +// +// var colors = require('colors/safe); +// colors.red("foo") +// +// +var colors = require('./lib/colors'); +module['exports'] = colors; \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/colors/themes/generic-logging.js b/deps/npm/node_modules/cli-table2/node_modules/colors/themes/generic-logging.js new file mode 100644 index 0000000000..571972c1ba --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/colors/themes/generic-logging.js @@ -0,0 +1,12 @@ +module['exports'] = { + silly: 'rainbow', + input: 'grey', + verbose: 'cyan', + prompt: 'grey', + info: 'green', + data: 'grey', + help: 'cyan', + warn: 'yellow', + debug: 'blue', + error: 'red' +}; \ No newline at end of file diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/LICENSE b/deps/npm/node_modules/cli-table2/node_modules/lodash/LICENSE new file mode 100644 index 0000000000..9cd87e5dce --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/LICENSE @@ -0,0 +1,22 @@ +Copyright 2012-2015 The Dojo Foundation +Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +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/deps/npm/node_modules/cli-table2/node_modules/lodash/README.md b/deps/npm/node_modules/cli-table2/node_modules/lodash/README.md new file mode 100644 index 0000000000..fd98e5c989 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/README.md @@ -0,0 +1,121 @@ +# lodash v3.10.1 + +The [modern build](https://github.com/lodash/lodash/wiki/Build-Differences) of [lodash](https://lodash.com/) exported as [Node.js](http://nodejs.org/)/[io.js](https://iojs.org/) modules. + +Generated using [lodash-cli](https://www.npmjs.com/package/lodash-cli): +```bash +$ lodash modularize modern exports=node -o ./ +$ lodash modern -d -o ./index.js +``` + +## Installation + +Using npm: + +```bash +$ {sudo -H} npm i -g npm +$ npm i --save lodash +``` + +In Node.js/io.js: + +```js +// load the modern build +var _ = require('lodash'); +// or a method category +var array = require('lodash/array'); +// or a method (great for smaller builds with browserify/webpack) +var chunk = require('lodash/array/chunk'); +``` + +See the [package source](https://github.com/lodash/lodash/tree/3.10.1-npm) for more details. + +**Note:**
                +Don’t assign values to the [special variable](http://nodejs.org/api/repl.html#repl_repl_features) `_` when in the REPL.
                +Install [n_](https://www.npmjs.com/package/n_) for a REPL that includes lodash by default. + +## Module formats + +lodash is also available in a variety of other builds & module formats. + + * npm packages for [modern](https://www.npmjs.com/package/lodash), [compatibility](https://www.npmjs.com/package/lodash-compat), & [per method](https://www.npmjs.com/browse/keyword/lodash-modularized) builds + * AMD modules for [modern](https://github.com/lodash/lodash/tree/3.10.1-amd) & [compatibility](https://github.com/lodash/lodash-compat/tree/3.10.1-amd) builds + * ES modules for the [modern](https://github.com/lodash/lodash/tree/3.10.1-es) build + +## Further Reading + + * [API Documentation](https://lodash.com/docs) + * [Build Differences](https://github.com/lodash/lodash/wiki/Build-Differences) + * [Changelog](https://github.com/lodash/lodash/wiki/Changelog) + * [Roadmap](https://github.com/lodash/lodash/wiki/Roadmap) + * [More Resources](https://github.com/lodash/lodash/wiki/Resources) + +## Features + + * ~100% [code coverage](https://coveralls.io/r/lodash) + * Follows [semantic versioning](http://semver.org/) for releases + * [Lazily evaluated](http://filimanjaro.com/blog/2014/introducing-lazy-evaluation/) chaining + * [_(…)](https://lodash.com/docs#_) supports implicit chaining + * [_.ary](https://lodash.com/docs#ary) & [_.rearg](https://lodash.com/docs#rearg) to change function argument limits & order + * [_.at](https://lodash.com/docs#at) for cherry-picking collection values + * [_.attempt](https://lodash.com/docs#attempt) to execute functions which may error without a try-catch + * [_.before](https://lodash.com/docs#before) to complement [_.after](https://lodash.com/docs#after) + * [_.bindKey](https://lodash.com/docs#bindKey) for binding [*“lazy”*](http://michaux.ca/articles/lazy-function-definition-pattern) defined methods + * [_.chunk](https://lodash.com/docs#chunk) for splitting an array into chunks of a given size + * [_.clone](https://lodash.com/docs#clone) supports shallow cloning of `Date` & `RegExp` objects + * [_.cloneDeep](https://lodash.com/docs#cloneDeep) for deep cloning arrays & objects + * [_.curry](https://lodash.com/docs#curry) & [_.curryRight](https://lodash.com/docs#curryRight) for creating [curried](http://hughfdjackson.com/javascript/why-curry-helps/) functions + * [_.debounce](https://lodash.com/docs#debounce) & [_.throttle](https://lodash.com/docs#throttle) are cancelable & accept options for more control + * [_.defaultsDeep](https://lodash.com/docs#defaultsDeep) for recursively assigning default properties + * [_.fill](https://lodash.com/docs#fill) to fill arrays with values + * [_.findKey](https://lodash.com/docs#findKey) for finding keys + * [_.flow](https://lodash.com/docs#flow) to complement [_.flowRight](https://lodash.com/docs#flowRight) (a.k.a `_.compose`) + * [_.forEach](https://lodash.com/docs#forEach) supports exiting early + * [_.forIn](https://lodash.com/docs#forIn) for iterating all enumerable properties + * [_.forOwn](https://lodash.com/docs#forOwn) for iterating own properties + * [_.get](https://lodash.com/docs#get) & [_.set](https://lodash.com/docs#set) for deep property getting & setting + * [_.gt](https://lodash.com/docs#gt), [_.gte](https://lodash.com/docs#gte), [_.lt](https://lodash.com/docs#lt), & [_.lte](https://lodash.com/docs#lte) relational methods + * [_.inRange](https://lodash.com/docs#inRange) for checking whether a number is within a given range + * [_.isNative](https://lodash.com/docs#isNative) to check for native functions + * [_.isPlainObject](https://lodash.com/docs#isPlainObject) & [_.toPlainObject](https://lodash.com/docs#toPlainObject) to check for & convert to `Object` objects + * [_.isTypedArray](https://lodash.com/docs#isTypedArray) to check for typed arrays + * [_.mapKeys](https://lodash.com/docs#mapKeys) for mapping keys to an object + * [_.matches](https://lodash.com/docs#matches) supports deep object comparisons + * [_.matchesProperty](https://lodash.com/docs#matchesProperty) to complement [_.matches](https://lodash.com/docs#matches) & [_.property](https://lodash.com/docs#property) + * [_.merge](https://lodash.com/docs#merge) for a deep [_.extend](https://lodash.com/docs#extend) + * [_.method](https://lodash.com/docs#method) & [_.methodOf](https://lodash.com/docs#methodOf) to create functions that invoke methods + * [_.modArgs](https://lodash.com/docs#modArgs) for more advanced functional composition + * [_.parseInt](https://lodash.com/docs#parseInt) for consistent cross-environment behavior + * [_.pull](https://lodash.com/docs#pull), [_.pullAt](https://lodash.com/docs#pullAt), & [_.remove](https://lodash.com/docs#remove) for mutating arrays + * [_.random](https://lodash.com/docs#random) supports returning floating-point numbers + * [_.restParam](https://lodash.com/docs#restParam) & [_.spread](https://lodash.com/docs#spread) for applying rest parameters & spreading arguments to functions + * [_.runInContext](https://lodash.com/docs#runInContext) for collisionless mixins & easier mocking + * [_.slice](https://lodash.com/docs#slice) for creating subsets of array-like values + * [_.sortByAll](https://lodash.com/docs#sortByAll) & [_.sortByOrder](https://lodash.com/docs#sortByOrder) for sorting by multiple properties & orders + * [_.support](https://lodash.com/docs#support) for flagging environment features + * [_.template](https://lodash.com/docs#template) supports [*“imports”*](https://lodash.com/docs#templateSettings-imports) options & [ES template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-template-literal-lexical-components) + * [_.transform](https://lodash.com/docs#transform) as a powerful alternative to [_.reduce](https://lodash.com/docs#reduce) for transforming objects + * [_.unzipWith](https://lodash.com/docs#unzipWith) & [_.zipWith](https://lodash.com/docs#zipWith) to specify how grouped values should be combined + * [_.valuesIn](https://lodash.com/docs#valuesIn) for getting values of all enumerable properties + * [_.xor](https://lodash.com/docs#xor) to complement [_.difference](https://lodash.com/docs#difference), [_.intersection](https://lodash.com/docs#intersection), & [_.union](https://lodash.com/docs#union) + * [_.add](https://lodash.com/docs#add), [_.round](https://lodash.com/docs#round), [_.sum](https://lodash.com/docs#sum), & + [more](https://lodash.com/docs "_.ceil & _.floor") math methods + * [_.bind](https://lodash.com/docs#bind), [_.curry](https://lodash.com/docs#curry), [_.partial](https://lodash.com/docs#partial), & + [more](https://lodash.com/docs "_.bindKey, _.curryRight, _.partialRight") support customizable argument placeholders + * [_.capitalize](https://lodash.com/docs#capitalize), [_.trim](https://lodash.com/docs#trim), & + [more](https://lodash.com/docs "_.camelCase, _.deburr, _.endsWith, _.escapeRegExp, _.kebabCase, _.pad, _.padLeft, _.padRight, _.repeat, _.snakeCase, _.startCase, _.startsWith, _.trimLeft, _.trimRight, _.trunc, _.words") string methods + * [_.clone](https://lodash.com/docs#clone), [_.isEqual](https://lodash.com/docs#isEqual), & + [more](https://lodash.com/docs "_.assign, _.cloneDeep, _.merge") accept customizer callbacks + * [_.dropWhile](https://lodash.com/docs#dropWhile), [_.takeWhile](https://lodash.com/docs#takeWhile), & + [more](https://lodash.com/docs "_.drop, _.dropRight, _.dropRightWhile, _.take, _.takeRight, _.takeRightWhile") to complement [_.first](https://lodash.com/docs#first), [_.initial](https://lodash.com/docs#initial), [_.last](https://lodash.com/docs#last), & [_.rest](https://lodash.com/docs#rest) + * [_.findLast](https://lodash.com/docs#findLast), [_.findLastKey](https://lodash.com/docs#findLastKey), & + [more](https://lodash.com/docs "_.curryRight, _.dropRight, _.dropRightWhile, _.flowRight, _.forEachRight, _.forInRight, _.forOwnRight, _.padRight, partialRight, _.takeRight, _.trimRight, _.takeRightWhile") right-associative methods + * [_.includes](https://lodash.com/docs#includes), [_.toArray](https://lodash.com/docs#toArray), & + [more](https://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.findLast, _.findWhere, _.forEach, _.forEachRight, _.groupBy, _.indexBy, _.invoke, _.map, _.max, _.min, _.partition, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.size, _.some, _.sortBy, _.sortByAll, _.sortByOrder, _.sum, _.where") accept strings + * [_#commit](https://lodash.com/docs#prototype-commit) & [_#plant](https://lodash.com/docs#prototype-plant) for working with chain sequences + * [_#thru](https://lodash.com/docs#thru) to pass values thru a chain sequence + +## Support + +Tested in Chrome 43-44, Firefox 38-39, IE 6-11, MS Edge, Safari 5-8, ChakraNode 0.12.2, io.js 2.5.0, Node.js 0.8.28, 0.10.40, & 0.12.7, PhantomJS 1.9.8, RingoJS 0.11, & Rhino 1.7.6. +Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available. Special thanks to [Sauce Labs](https://saucelabs.com/) for providing automated browser testing. diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array.js new file mode 100644 index 0000000000..e5121fa52e --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array.js @@ -0,0 +1,44 @@ +module.exports = { + 'chunk': require('./array/chunk'), + 'compact': require('./array/compact'), + 'difference': require('./array/difference'), + 'drop': require('./array/drop'), + 'dropRight': require('./array/dropRight'), + 'dropRightWhile': require('./array/dropRightWhile'), + 'dropWhile': require('./array/dropWhile'), + 'fill': require('./array/fill'), + 'findIndex': require('./array/findIndex'), + 'findLastIndex': require('./array/findLastIndex'), + 'first': require('./array/first'), + 'flatten': require('./array/flatten'), + 'flattenDeep': require('./array/flattenDeep'), + 'head': require('./array/head'), + 'indexOf': require('./array/indexOf'), + 'initial': require('./array/initial'), + 'intersection': require('./array/intersection'), + 'last': require('./array/last'), + 'lastIndexOf': require('./array/lastIndexOf'), + 'object': require('./array/object'), + 'pull': require('./array/pull'), + 'pullAt': require('./array/pullAt'), + 'remove': require('./array/remove'), + 'rest': require('./array/rest'), + 'slice': require('./array/slice'), + 'sortedIndex': require('./array/sortedIndex'), + 'sortedLastIndex': require('./array/sortedLastIndex'), + 'tail': require('./array/tail'), + 'take': require('./array/take'), + 'takeRight': require('./array/takeRight'), + 'takeRightWhile': require('./array/takeRightWhile'), + 'takeWhile': require('./array/takeWhile'), + 'union': require('./array/union'), + 'uniq': require('./array/uniq'), + 'unique': require('./array/unique'), + 'unzip': require('./array/unzip'), + 'unzipWith': require('./array/unzipWith'), + 'without': require('./array/without'), + 'xor': require('./array/xor'), + 'zip': require('./array/zip'), + 'zipObject': require('./array/zipObject'), + 'zipWith': require('./array/zipWith') +}; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/chunk.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/chunk.js new file mode 100644 index 0000000000..c8be1fb02d --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/chunk.js @@ -0,0 +1,46 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeMax = Math.max; + +/** + * Creates an array of elements split into groups the length of `size`. + * If `collection` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new array containing chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ +function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size == null) { + size = 1; + } else { + size = nativeMax(nativeFloor(size) || 1, 1); + } + var index = 0, + length = array ? array.length : 0, + resIndex = -1, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[++resIndex] = baseSlice(array, index, (index += size)); + } + return result; +} + +module.exports = chunk; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/compact.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/compact.js new file mode 100644 index 0000000000..1dc1c55e8f --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/compact.js @@ -0,0 +1,30 @@ +/** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ +function compact(array) { + var index = -1, + length = array ? array.length : 0, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[++resIndex] = value; + } + } + return result; +} + +module.exports = compact; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/difference.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/difference.js new file mode 100644 index 0000000000..128932a146 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/difference.js @@ -0,0 +1,29 @@ +var baseDifference = require('../internal/baseDifference'), + baseFlatten = require('../internal/baseFlatten'), + isArrayLike = require('../internal/isArrayLike'), + isObjectLike = require('../internal/isObjectLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([1, 2, 3], [4, 2]); + * // => [1, 3] + */ +var difference = restParam(function(array, values) { + return (isObjectLike(array) && isArrayLike(array)) + ? baseDifference(array, baseFlatten(values, false, true)) + : []; +}); + +module.exports = difference; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/drop.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/drop.js new file mode 100644 index 0000000000..039a0b5fdc --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/drop.js @@ -0,0 +1,39 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function drop(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, n < 0 ? 0 : n); +} + +module.exports = drop; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRight.js new file mode 100644 index 0000000000..14b5eb6f0a --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRight.js @@ -0,0 +1,40 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ +function dropRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = dropRight; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRightWhile.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRightWhile.js new file mode 100644 index 0000000000..be158bd5fa --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropRightWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that match the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [1] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active', false), 'user'); + * // => ['barney'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ +function dropRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3), true, true) + : []; +} + +module.exports = dropRightWhile; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropWhile.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropWhile.js new file mode 100644 index 0000000000..d9eabae9fa --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/dropWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [3] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropWhile(users, 'active', false), 'user'); + * // => ['pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ +function dropWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3), true) + : []; +} + +module.exports = dropWhile; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/fill.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/fill.js new file mode 100644 index 0000000000..2c8f6da71d --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/fill.js @@ -0,0 +1,44 @@ +var baseFill = require('../internal/baseFill'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8], '*', 1, 2); + * // => [4, '*', 8] + */ +function fill(array, value, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); +} + +module.exports = fill; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findIndex.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findIndex.js new file mode 100644 index 0000000000..2a6b8e14ba --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findIndex.js @@ -0,0 +1,53 @@ +var createFindIndex = require('../internal/createFindIndex'); + +/** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(chr) { + * return chr.user == 'barney'; + * }); + * // => 0 + * + * // using the `_.matches` callback shorthand + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // using the `_.matchesProperty` callback shorthand + * _.findIndex(users, 'active', false); + * // => 0 + * + * // using the `_.property` callback shorthand + * _.findIndex(users, 'active'); + * // => 2 + */ +var findIndex = createFindIndex(); + +module.exports = findIndex; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findLastIndex.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findLastIndex.js new file mode 100644 index 0000000000..d6d8eca6df --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/findLastIndex.js @@ -0,0 +1,53 @@ +var createFindIndex = require('../internal/createFindIndex'); + +/** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(chr) { + * return chr.user == 'pebbles'; + * }); + * // => 2 + * + * // using the `_.matches` callback shorthand + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastIndex(users, 'active', false); + * // => 2 + * + * // using the `_.property` callback shorthand + * _.findLastIndex(users, 'active'); + * // => 0 + */ +var findLastIndex = createFindIndex(true); + +module.exports = findLastIndex; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/first.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/first.js new file mode 100644 index 0000000000..b3b9c79c7b --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/first.js @@ -0,0 +1,22 @@ +/** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @alias head + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([]); + * // => undefined + */ +function first(array) { + return array ? array[0] : undefined; +} + +module.exports = first; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flatten.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flatten.js new file mode 100644 index 0000000000..dc2eff8686 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flatten.js @@ -0,0 +1,32 @@ +var baseFlatten = require('../internal/baseFlatten'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Flattens a nested array. If `isDeep` is `true` the array is recursively + * flattened, otherwise it's only flattened a single level. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, 3, [4]]]); + * // => [1, 2, 3, [4]] + * + * // using `isDeep` + * _.flatten([1, [2, 3, [4]]], true); + * // => [1, 2, 3, 4] + */ +function flatten(array, isDeep, guard) { + var length = array ? array.length : 0; + if (guard && isIterateeCall(array, isDeep, guard)) { + isDeep = false; + } + return length ? baseFlatten(array, isDeep) : []; +} + +module.exports = flatten; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flattenDeep.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flattenDeep.js new file mode 100644 index 0000000000..9f775febe2 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/flattenDeep.js @@ -0,0 +1,21 @@ +var baseFlatten = require('../internal/baseFlatten'); + +/** + * Recursively flattens a nested array. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to recursively flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, 3, [4]]]); + * // => [1, 2, 3, 4] + */ +function flattenDeep(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array, true) : []; +} + +module.exports = flattenDeep; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/head.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/head.js new file mode 100644 index 0000000000..1961b08c7e --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/head.js @@ -0,0 +1 @@ +module.exports = require('./first'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/indexOf.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/indexOf.js new file mode 100644 index 0000000000..4cfc682319 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/indexOf.js @@ -0,0 +1,53 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + binaryIndex = require('../internal/binaryIndex'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + * + * // performing a binary search + * _.indexOf([1, 1, 2, 2], 2, true); + * // => 2 + */ +function indexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else if (fromIndex) { + var index = binaryIndex(array, value); + if (index < length && + (value === value ? (value === array[index]) : (array[index] !== array[index]))) { + return index; + } + return -1; + } + return baseIndexOf(array, value, fromIndex || 0); +} + +module.exports = indexOf; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js new file mode 100644 index 0000000000..59b7a7d96d --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/initial.js @@ -0,0 +1,20 @@ +var dropRight = require('./dropRight'); + +/** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ +function initial(array) { + return dropRight(array, 1); +} + +module.exports = initial; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/intersection.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/intersection.js new file mode 100644 index 0000000000..f218432cfb --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/intersection.js @@ -0,0 +1,58 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + cacheIndexOf = require('../internal/cacheIndexOf'), + createCache = require('../internal/createCache'), + isArrayLike = require('../internal/isArrayLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique values that are included in all of the provided + * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of shared values. + * @example + * _.intersection([1, 2], [4, 2], [2, 1]); + * // => [2] + */ +var intersection = restParam(function(arrays) { + var othLength = arrays.length, + othIndex = othLength, + caches = Array(length), + indexOf = baseIndexOf, + isCommon = true, + result = []; + + while (othIndex--) { + var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; + caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; + } + var array = arrays[0], + index = -1, + length = array ? array.length : 0, + seen = caches[0]; + + outer: + while (++index < length) { + value = array[index]; + if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { + var othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { + continue outer; + } + } + if (seen) { + seen.push(value); + } + result.push(value); + } + } + return result; +}); + +module.exports = intersection; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/last.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/last.js new file mode 100644 index 0000000000..299af3146c --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/last.js @@ -0,0 +1,19 @@ +/** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ +function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; +} + +module.exports = last; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/lastIndexOf.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/lastIndexOf.js new file mode 100644 index 0000000000..02b806269b --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/lastIndexOf.js @@ -0,0 +1,60 @@ +var binaryIndex = require('../internal/binaryIndex'), + indexOfNaN = require('../internal/indexOfNaN'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max, + nativeMin = Math.min; + +/** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=array.length-1] The index to search from + * or `true` to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // using `fromIndex` + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + * + * // performing a binary search + * _.lastIndexOf([1, 1, 2, 2], 2, true); + * // => 3 + */ +function lastIndexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = length; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1; + } else if (fromIndex) { + index = binaryIndex(array, value, true) - 1; + var other = array[index]; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; + } + if (value !== value) { + return indexOfNaN(array, index, true); + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; +} + +module.exports = lastIndexOf; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/object.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/object.js new file mode 100644 index 0000000000..f4a34531b1 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/object.js @@ -0,0 +1 @@ +module.exports = require('./zipObject'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pull.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pull.js new file mode 100644 index 0000000000..7bcbb4a63c --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pull.js @@ -0,0 +1,52 @@ +var baseIndexOf = require('../internal/baseIndexOf'); + +/** Used for native method references. */ +var arrayProto = Array.prototype; + +/** Native method references. */ +var splice = arrayProto.splice; + +/** + * Removes all provided values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ +function pull() { + var args = arguments, + array = args[0]; + + if (!(array && array.length)) { + return array; + } + var index = 0, + indexOf = baseIndexOf, + length = args.length; + + while (++index < length) { + var fromIndex = 0, + value = args[index]; + + while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { + splice.call(array, fromIndex, 1); + } + } + return array; +} + +module.exports = pull; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pullAt.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pullAt.js new file mode 100644 index 0000000000..4ca2476f0e --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/pullAt.js @@ -0,0 +1,40 @@ +var baseAt = require('../internal/baseAt'), + baseCompareAscending = require('../internal/baseCompareAscending'), + baseFlatten = require('../internal/baseFlatten'), + basePullAt = require('../internal/basePullAt'), + restParam = require('../function/restParam'); + +/** + * Removes elements from `array` corresponding to the given indexes and returns + * an array of the removed elements. Indexes may be specified as an array of + * indexes or as individual arguments. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove, + * specified as individual indexes or arrays of indexes. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [5, 10, 15, 20]; + * var evens = _.pullAt(array, 1, 3); + * + * console.log(array); + * // => [5, 15] + * + * console.log(evens); + * // => [10, 20] + */ +var pullAt = restParam(function(array, indexes) { + indexes = baseFlatten(indexes); + + var result = baseAt(array, indexes); + basePullAt(array, indexes.sort(baseCompareAscending)); + return result; +}); + +module.exports = pullAt; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/remove.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/remove.js new file mode 100644 index 0000000000..0cf979bda0 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/remove.js @@ -0,0 +1,64 @@ +var baseCallback = require('../internal/baseCallback'), + basePullAt = require('../internal/basePullAt'); + +/** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * **Note:** Unlike `_.filter`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ +function remove(array, predicate, thisArg) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = baseCallback(predicate, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; +} + +module.exports = remove; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/rest.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/rest.js new file mode 100644 index 0000000000..9bfb734f1f --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/rest.js @@ -0,0 +1,21 @@ +var drop = require('./drop'); + +/** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @alias tail + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + */ +function rest(array) { + return drop(array, 1); +} + +module.exports = rest; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/slice.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/slice.js new file mode 100644 index 0000000000..48ef1a1a28 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/slice.js @@ -0,0 +1,30 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of `Array#slice` to support node + * lists in IE < 9 and to ensure dense arrays are returned. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ +function slice(array, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + return baseSlice(array, start, end); +} + +module.exports = slice; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedIndex.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedIndex.js new file mode 100644 index 0000000000..6903bca437 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedIndex.js @@ -0,0 +1,53 @@ +var createSortedIndex = require('../internal/createSortedIndex'); + +/** + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. If an iteratee + * function is provided it's invoked for `value` and each element of `array` + * to compute their sort ranking. The iteratee is bound to `thisArg` and + * invoked with one argument; (value). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 4, 5, 5], 5); + * // => 2 + * + * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; + * + * // using an iteratee function + * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { + * return this.data[word]; + * }, dict); + * // => 1 + * + * // using the `_.property` callback shorthand + * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 1 + */ +var sortedIndex = createSortedIndex(); + +module.exports = sortedIndex; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedLastIndex.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedLastIndex.js new file mode 100644 index 0000000000..81a4a8689e --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/sortedLastIndex.js @@ -0,0 +1,25 @@ +var createSortedIndex = require('../internal/createSortedIndex'); + +/** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 4, 5, 5], 5); + * // => 4 + */ +var sortedLastIndex = createSortedIndex(true); + +module.exports = sortedLastIndex; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/tail.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/tail.js new file mode 100644 index 0000000000..c5dfe779d6 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/tail.js @@ -0,0 +1 @@ +module.exports = require('./rest'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/take.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/take.js new file mode 100644 index 0000000000..875917a746 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/take.js @@ -0,0 +1,39 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ +function take(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, 0, n < 0 ? 0 : n); +} + +module.exports = take; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRight.js new file mode 100644 index 0000000000..6e89c87480 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRight.js @@ -0,0 +1,40 @@ +var baseSlice = require('../internal/baseSlice'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ +function takeRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, n < 0 ? 0 : n); +} + +module.exports = takeRight; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRightWhile.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRightWhile.js new file mode 100644 index 0000000000..5464d13b7f --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeRightWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is bound to `thisArg` + * and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [2, 3] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active', false), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active'), 'user'); + * // => [] + */ +function takeRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3), false, true) + : []; +} + +module.exports = takeRightWhile; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeWhile.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeWhile.js new file mode 100644 index 0000000000..f7e28a1d42 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/takeWhile.js @@ -0,0 +1,59 @@ +var baseCallback = require('../internal/baseCallback'), + baseWhile = require('../internal/baseWhile'); + +/** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [1, 2] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false}, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeWhile(users, 'active', false), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeWhile(users, 'active'), 'user'); + * // => [] + */ +function takeWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, baseCallback(predicate, thisArg, 3)) + : []; +} + +module.exports = takeWhile; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/union.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/union.js new file mode 100644 index 0000000000..53cefe432d --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/union.js @@ -0,0 +1,24 @@ +var baseFlatten = require('../internal/baseFlatten'), + baseUniq = require('../internal/baseUniq'), + restParam = require('../function/restParam'); + +/** + * Creates an array of unique values, in order, from all of the provided arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([1, 2], [4, 2], [2, 1]); + * // => [1, 2, 4] + */ +var union = restParam(function(arrays) { + return baseUniq(baseFlatten(arrays, false, true)); +}); + +module.exports = union; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/uniq.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/uniq.js new file mode 100644 index 0000000000..ae937efdf5 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/uniq.js @@ -0,0 +1,71 @@ +var baseCallback = require('../internal/baseCallback'), + baseUniq = require('../internal/baseUniq'), + isIterateeCall = require('../internal/isIterateeCall'), + sortedUniq = require('../internal/sortedUniq'); + +/** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurence of each element + * is kept. Providing `true` for `isSorted` performs a faster search algorithm + * for sorted arrays. If an iteratee function is provided it's invoked for + * each element in the array to generate the criterion by which uniqueness + * is computed. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index, array). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Array + * @param {Array} array The array to inspect. + * @param {boolean} [isSorted] Specify the array is sorted. + * @param {Function|Object|string} [iteratee] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new duplicate-value-free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + * + * // using `isSorted` + * _.uniq([1, 1, 2], true); + * // => [1, 2] + * + * // using an iteratee function + * _.uniq([1, 2.5, 1.5, 2], function(n) { + * return this.floor(n); + * }, Math); + * // => [1, 2.5] + * + * // using the `_.property` callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ +function uniq(array, isSorted, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (isSorted != null && typeof isSorted != 'boolean') { + thisArg = iteratee; + iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted; + isSorted = false; + } + iteratee = iteratee == null ? iteratee : baseCallback(iteratee, thisArg, 3); + return (isSorted) + ? sortedUniq(array, iteratee) + : baseUniq(array, iteratee); +} + +module.exports = uniq; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unique.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unique.js new file mode 100644 index 0000000000..396de1b804 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unique.js @@ -0,0 +1 @@ +module.exports = require('./uniq'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzip.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzip.js new file mode 100644 index 0000000000..0a539fa631 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzip.js @@ -0,0 +1,47 @@ +var arrayFilter = require('../internal/arrayFilter'), + arrayMap = require('../internal/arrayMap'), + baseProperty = require('../internal/baseProperty'), + isArrayLike = require('../internal/isArrayLike'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + * + * _.unzip(zipped); + * // => [['fred', 'barney'], [30, 40], [true, false]] + */ +function unzip(array) { + if (!(array && array.length)) { + return []; + } + var index = -1, + length = 0; + + array = arrayFilter(array, function(group) { + if (isArrayLike(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + var result = Array(length); + while (++index < length) { + result[index] = arrayMap(array, baseProperty(index)); + } + return result; +} + +module.exports = unzip; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzipWith.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzipWith.js new file mode 100644 index 0000000000..324a2b1db2 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/unzipWith.js @@ -0,0 +1,41 @@ +var arrayMap = require('../internal/arrayMap'), + arrayReduce = require('../internal/arrayReduce'), + bindCallback = require('../internal/bindCallback'), + unzip = require('./unzip'); + +/** + * This method is like `_.unzip` except that it accepts an iteratee to specify + * how regrouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee] The function to combine regrouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ +function unzipWith(array, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + iteratee = bindCallback(iteratee, thisArg, 4); + return arrayMap(result, function(group) { + return arrayReduce(group, iteratee, undefined, true); + }); +} + +module.exports = unzipWith; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/without.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/without.js new file mode 100644 index 0000000000..2ac3d1176e --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/without.js @@ -0,0 +1,27 @@ +var baseDifference = require('../internal/baseDifference'), + isArrayLike = require('../internal/isArrayLike'), + restParam = require('../function/restParam'); + +/** + * Creates an array excluding all provided values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to filter. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.without([1, 2, 1, 3], 1, 2); + * // => [3] + */ +var without = restParam(function(array, values) { + return isArrayLike(array) + ? baseDifference(array, values) + : []; +}); + +module.exports = without; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/xor.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/xor.js new file mode 100644 index 0000000000..04ef32aefd --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/xor.js @@ -0,0 +1,35 @@ +var arrayPush = require('../internal/arrayPush'), + baseDifference = require('../internal/baseDifference'), + baseUniq = require('../internal/baseUniq'), + isArrayLike = require('../internal/isArrayLike'); + +/** + * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the provided arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xor([1, 2], [4, 2]); + * // => [1, 4] + */ +function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArrayLike(array)) { + var result = result + ? arrayPush(baseDifference(result, array), baseDifference(array, result)) + : array; + } + } + return result ? baseUniq(result) : []; +} + +module.exports = xor; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zip.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zip.js new file mode 100644 index 0000000000..53a6f69912 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zip.js @@ -0,0 +1,21 @@ +var restParam = require('../function/restParam'), + unzip = require('./unzip'); + +/** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second elements + * of the given arrays, and so on. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ +var zip = restParam(unzip); + +module.exports = zip; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipObject.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipObject.js new file mode 100644 index 0000000000..dec7a211b7 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipObject.js @@ -0,0 +1,43 @@ +var isArray = require('../lang/isArray'); + +/** + * The inverse of `_.pairs`; this method returns an object composed from arrays + * of property names and values. Provide either a single two dimensional array, + * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names + * and one of corresponding values. + * + * @static + * @memberOf _ + * @alias object + * @category Array + * @param {Array} props The property names. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ +function zipObject(props, values) { + var index = -1, + length = props ? props.length : 0, + result = {}; + + if (length && !values && !isArray(props[0])) { + values = []; + } + while (++index < length) { + var key = props[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; +} + +module.exports = zipObject; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipWith.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipWith.js new file mode 100644 index 0000000000..ad103742cd --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/array/zipWith.js @@ -0,0 +1,36 @@ +var restParam = require('../function/restParam'), + unzipWith = require('./unzipWith'); + +/** + * This method is like `_.zip` except that it accepts an iteratee to specify + * how grouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee] The function to combine grouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], _.add); + * // => [111, 222] + */ +var zipWith = restParam(function(arrays) { + var length = arrays.length, + iteratee = length > 2 ? arrays[length - 2] : undefined, + thisArg = length > 1 ? arrays[length - 1] : undefined; + + if (length > 2 && typeof iteratee == 'function') { + length -= 2; + } else { + iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined; + thisArg = undefined; + } + arrays.length = length; + return unzipWith(arrays, iteratee, thisArg); +}); + +module.exports = zipWith; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain.js new file mode 100644 index 0000000000..6439627f3d --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain.js @@ -0,0 +1,16 @@ +module.exports = { + 'chain': require('./chain/chain'), + 'commit': require('./chain/commit'), + 'concat': require('./chain/concat'), + 'lodash': require('./chain/lodash'), + 'plant': require('./chain/plant'), + 'reverse': require('./chain/reverse'), + 'run': require('./chain/run'), + 'tap': require('./chain/tap'), + 'thru': require('./chain/thru'), + 'toJSON': require('./chain/toJSON'), + 'toString': require('./chain/toString'), + 'value': require('./chain/value'), + 'valueOf': require('./chain/valueOf'), + 'wrapperChain': require('./chain/wrapperChain') +}; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/chain.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/chain.js new file mode 100644 index 0000000000..453ba1eb5e --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/chain.js @@ -0,0 +1,35 @@ +var lodash = require('./lodash'); + +/** + * Creates a `lodash` object that wraps `value` with explicit method + * chaining enabled. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _.chain(users) + * .sortBy('age') + * .map(function(chr) { + * return chr.user + ' is ' + chr.age; + * }) + * .first() + * .value(); + * // => 'pebbles is 1' + */ +function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; +} + +module.exports = chain; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/commit.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/commit.js new file mode 100644 index 0000000000..c732d1bf91 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/commit.js @@ -0,0 +1 @@ +module.exports = require('./wrapperCommit'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/concat.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/concat.js new file mode 100644 index 0000000000..90607d1ee1 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/concat.js @@ -0,0 +1 @@ +module.exports = require('./wrapperConcat'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/lodash.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/lodash.js new file mode 100644 index 0000000000..1c3467efee --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/lodash.js @@ -0,0 +1,125 @@ +var LazyWrapper = require('../internal/LazyWrapper'), + LodashWrapper = require('../internal/LodashWrapper'), + baseLodash = require('../internal/baseLodash'), + isArray = require('../lang/isArray'), + isObjectLike = require('../internal/isObjectLike'), + wrapperClone = require('../internal/wrapperClone'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates a `lodash` object which wraps `value` to enable implicit chaining. + * Methods that operate on and return arrays, collections, and functions can + * be chained together. Methods that retrieve a single value or may return a + * primitive value will automatically end the chain returning the unwrapped + * value. Explicit chaining may be enabled using `_.chain`. The execution of + * chained methods is lazy, that is, execution is deferred until `_#value` + * is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. Shortcut + * fusion is an optimization strategy which merge iteratee calls; this can help + * to avoid the creation of intermediate data structures and greatly reduce the + * number of iteratee executions. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, + * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, + * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, + * and `where` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, + * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, + * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`, + * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`, + * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, + * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`, + * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`, + * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`, + * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`, + * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, + * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`, + * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, + * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`, + * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`, + * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, + * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, + * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`, + * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, + * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`, + * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, + * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, + * `unescape`, `uniqueId`, `value`, and `words` + * + * The wrapper method `sample` will return a wrapped value when `n` is provided, + * otherwise an unwrapped value is returned. + * + * @name _ + * @constructor + * @category Chain + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(total, n) { + * return total + n; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(n) { + * return n * n; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ +function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); +} + +// Ensure wrappers are instances of `baseLodash`. +lodash.prototype = baseLodash.prototype; + +module.exports = lodash; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/plant.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/plant.js new file mode 100644 index 0000000000..04099f2386 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/plant.js @@ -0,0 +1 @@ +module.exports = require('./wrapperPlant'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/reverse.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/reverse.js new file mode 100644 index 0000000000..f72a64a19b --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/reverse.js @@ -0,0 +1 @@ +module.exports = require('./wrapperReverse'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/run.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/run.js new file mode 100644 index 0000000000..5e751a2c32 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/run.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/tap.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/tap.js new file mode 100644 index 0000000000..3d0257ecfd --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/tap.js @@ -0,0 +1,29 @@ +/** + * This method invokes `interceptor` and returns `value`. The interceptor is + * bound to `thisArg` and invoked with one argument; (value). The purpose of + * this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ +function tap(value, interceptor, thisArg) { + interceptor.call(thisArg, value); + return value; +} + +module.exports = tap; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/thru.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/thru.js new file mode 100644 index 0000000000..a715780376 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/thru.js @@ -0,0 +1,26 @@ +/** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ +function thru(value, interceptor, thisArg) { + return interceptor.call(thisArg, value); +} + +module.exports = thru; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toJSON.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toJSON.js new file mode 100644 index 0000000000..5e751a2c32 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toJSON.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toString.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toString.js new file mode 100644 index 0000000000..c7bcbf9a54 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/toString.js @@ -0,0 +1 @@ +module.exports = require('./wrapperToString'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/value.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/value.js new file mode 100644 index 0000000000..5e751a2c32 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/value.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/valueOf.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/valueOf.js new file mode 100644 index 0000000000..5e751a2c32 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/valueOf.js @@ -0,0 +1 @@ +module.exports = require('./wrapperValue'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperChain.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperChain.js new file mode 100644 index 0000000000..38234819ba --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperChain.js @@ -0,0 +1,32 @@ +var chain = require('./chain'); + +/** + * Enables explicit method chaining on the wrapper object. + * + * @name chain + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // without explicit chaining + * _(users).first(); + * // => { 'user': 'barney', 'age': 36 } + * + * // with explicit chaining + * _(users).chain() + * .first() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ +function wrapperChain() { + return chain(this); +} + +module.exports = wrapperChain; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js new file mode 100644 index 0000000000..c3d289804b --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperCommit.js @@ -0,0 +1,32 @@ +var LodashWrapper = require('../internal/LodashWrapper'); + +/** + * Executes the chained sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ +function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); +} + +module.exports = wrapperCommit; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperConcat.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperConcat.js new file mode 100644 index 0000000000..799156cd83 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperConcat.js @@ -0,0 +1,34 @@ +var arrayConcat = require('../internal/arrayConcat'), + baseFlatten = require('../internal/baseFlatten'), + isArray = require('../lang/isArray'), + restParam = require('../function/restParam'), + toObject = require('../internal/toObject'); + +/** + * Creates a new array joining a wrapped array with any additional arrays + * and/or values. + * + * @name concat + * @memberOf _ + * @category Chain + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var wrapped = _(array).concat(2, [3], [[4]]); + * + * console.log(wrapped.value()); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ +var wrapperConcat = restParam(function(values) { + values = baseFlatten(values); + return this.thru(function(array) { + return arrayConcat(isArray(array) ? array : [toObject(array)], values); + }); +}); + +module.exports = wrapperConcat; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperPlant.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperPlant.js new file mode 100644 index 0000000000..234fe41fec --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperPlant.js @@ -0,0 +1,45 @@ +var baseLodash = require('../internal/baseLodash'), + wrapperClone = require('../internal/wrapperClone'); + +/** + * Creates a clone of the chained sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).map(function(value) { + * return Math.pow(value, 2); + * }); + * + * var other = [3, 4]; + * var otherWrapped = wrapped.plant(other); + * + * otherWrapped.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ +function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; +} + +module.exports = wrapperPlant; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperReverse.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperReverse.js new file mode 100644 index 0000000000..6ba546de4e --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperReverse.js @@ -0,0 +1,43 @@ +var LazyWrapper = require('../internal/LazyWrapper'), + LodashWrapper = require('../internal/LodashWrapper'), + thru = require('./thru'); + +/** + * Reverses the wrapped array so the first element becomes the last, the + * second element becomes the second to last, and so on. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new reversed `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ +function wrapperReverse() { + var value = this.__wrapped__; + + var interceptor = function(value) { + return value.reverse(); + }; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(interceptor); +} + +module.exports = wrapperReverse; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperToString.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperToString.js new file mode 100644 index 0000000000..db975a5a35 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperToString.js @@ -0,0 +1,17 @@ +/** + * Produces the result of coercing the unwrapped value to a string. + * + * @name toString + * @memberOf _ + * @category Chain + * @returns {string} Returns the coerced string value. + * @example + * + * _([1, 2, 3]).toString(); + * // => '1,2,3' + */ +function wrapperToString() { + return (this.value() + ''); +} + +module.exports = wrapperToString; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperValue.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperValue.js new file mode 100644 index 0000000000..2734e41c4a --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/chain/wrapperValue.js @@ -0,0 +1,20 @@ +var baseWrapperValue = require('../internal/baseWrapperValue'); + +/** + * Executes the chained sequence to extract the unwrapped value. + * + * @name value + * @memberOf _ + * @alias run, toJSON, valueOf + * @category Chain + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ +function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); +} + +module.exports = wrapperValue; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection.js new file mode 100644 index 0000000000..03388571c3 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection.js @@ -0,0 +1,44 @@ +module.exports = { + 'all': require('./collection/all'), + 'any': require('./collection/any'), + 'at': require('./collection/at'), + 'collect': require('./collection/collect'), + 'contains': require('./collection/contains'), + 'countBy': require('./collection/countBy'), + 'detect': require('./collection/detect'), + 'each': require('./collection/each'), + 'eachRight': require('./collection/eachRight'), + 'every': require('./collection/every'), + 'filter': require('./collection/filter'), + 'find': require('./collection/find'), + 'findLast': require('./collection/findLast'), + 'findWhere': require('./collection/findWhere'), + 'foldl': require('./collection/foldl'), + 'foldr': require('./collection/foldr'), + 'forEach': require('./collection/forEach'), + 'forEachRight': require('./collection/forEachRight'), + 'groupBy': require('./collection/groupBy'), + 'include': require('./collection/include'), + 'includes': require('./collection/includes'), + 'indexBy': require('./collection/indexBy'), + 'inject': require('./collection/inject'), + 'invoke': require('./collection/invoke'), + 'map': require('./collection/map'), + 'max': require('./math/max'), + 'min': require('./math/min'), + 'partition': require('./collection/partition'), + 'pluck': require('./collection/pluck'), + 'reduce': require('./collection/reduce'), + 'reduceRight': require('./collection/reduceRight'), + 'reject': require('./collection/reject'), + 'sample': require('./collection/sample'), + 'select': require('./collection/select'), + 'shuffle': require('./collection/shuffle'), + 'size': require('./collection/size'), + 'some': require('./collection/some'), + 'sortBy': require('./collection/sortBy'), + 'sortByAll': require('./collection/sortByAll'), + 'sortByOrder': require('./collection/sortByOrder'), + 'sum': require('./math/sum'), + 'where': require('./collection/where') +}; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/all.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/all.js new file mode 100644 index 0000000000..d0839f77ed --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/all.js @@ -0,0 +1 @@ +module.exports = require('./every'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/any.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/any.js new file mode 100644 index 0000000000..900ac25e83 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/any.js @@ -0,0 +1 @@ +module.exports = require('./some'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/at.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/at.js new file mode 100644 index 0000000000..29236e577d --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/at.js @@ -0,0 +1,29 @@ +var baseAt = require('../internal/baseAt'), + baseFlatten = require('../internal/baseFlatten'), + restParam = require('../function/restParam'); + +/** + * Creates an array of elements corresponding to the given keys, or indexes, + * of `collection`. Keys may be specified as individual arguments or as arrays + * of keys. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [props] The property names + * or indexes of elements to pick, specified individually or in arrays. + * @returns {Array} Returns the new array of picked elements. + * @example + * + * _.at(['a', 'b', 'c'], [0, 2]); + * // => ['a', 'c'] + * + * _.at(['barney', 'fred', 'pebbles'], 0, 2); + * // => ['barney', 'pebbles'] + */ +var at = restParam(function(collection, props) { + return baseAt(collection, baseFlatten(props)); +}); + +module.exports = at; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/collect.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/collect.js new file mode 100644 index 0000000000..0d1e1abfaf --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/collect.js @@ -0,0 +1 @@ +module.exports = require('./map'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/contains.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/contains.js new file mode 100644 index 0000000000..594722af59 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/contains.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/countBy.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/countBy.js new file mode 100644 index 0000000000..e97dbb749d --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/countBy.js @@ -0,0 +1,54 @@ +var createAggregator = require('../internal/createAggregator'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the number of times the key was returned by `iteratee`. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ +var countBy = createAggregator(function(result, value, key) { + hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); +}); + +module.exports = countBy; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/detect.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/detect.js new file mode 100644 index 0000000000..2fb6303efb --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/detect.js @@ -0,0 +1 @@ +module.exports = require('./find'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/each.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/each.js new file mode 100644 index 0000000000..8800f42046 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/each.js @@ -0,0 +1 @@ +module.exports = require('./forEach'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/eachRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/eachRight.js new file mode 100644 index 0000000000..3252b2aba3 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/eachRight.js @@ -0,0 +1 @@ +module.exports = require('./forEachRight'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/every.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/every.js new file mode 100644 index 0000000000..5a2d0f5dd4 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/every.js @@ -0,0 +1,66 @@ +var arrayEvery = require('../internal/arrayEvery'), + baseCallback = require('../internal/baseCallback'), + baseEvery = require('../internal/baseEvery'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ +function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = every; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/filter.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/filter.js new file mode 100644 index 0000000000..7620aa7619 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/filter.js @@ -0,0 +1,61 @@ +var arrayFilter = require('../internal/arrayFilter'), + baseCallback = require('../internal/baseCallback'), + baseFilter = require('../internal/baseFilter'), + isArray = require('../lang/isArray'); + +/** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.filter([4, 5, 6], function(n) { + * return n % 2 == 0; + * }); + * // => [4, 6] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.filter(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.filter(users, 'active'), 'user'); + * // => ['barney'] + */ +function filter(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = baseCallback(predicate, thisArg, 3); + return func(collection, predicate); +} + +module.exports = filter; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/find.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/find.js new file mode 100644 index 0000000000..7358cfe86c --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/find.js @@ -0,0 +1,56 @@ +var baseEach = require('../internal/baseEach'), + createFind = require('../internal/createFind'); + +/** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias detect + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.result(_.find(users, function(chr) { + * return chr.age < 40; + * }), 'user'); + * // => 'barney' + * + * // using the `_.matches` callback shorthand + * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.result(_.find(users, 'active', false), 'user'); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.result(_.find(users, 'active'), 'user'); + * // => 'barney' + */ +var find = createFind(baseEach); + +module.exports = find; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findLast.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findLast.js new file mode 100644 index 0000000000..75dbadca24 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findLast.js @@ -0,0 +1,25 @@ +var baseEachRight = require('../internal/baseEachRight'), + createFind = require('../internal/createFind'); + +/** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ +var findLast = createFind(baseEachRight, true); + +module.exports = findLast; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findWhere.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findWhere.js new file mode 100644 index 0000000000..2d620655ed --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/findWhere.js @@ -0,0 +1,37 @@ +var baseMatches = require('../internal/baseMatches'), + find = require('./find'); + +/** + * Performs a deep comparison between each element in `collection` and the + * source object, returning the first element that has equivalent property + * values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user'); + * // => 'barney' + * + * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); + * // => 'fred' + */ +function findWhere(collection, source) { + return find(collection, baseMatches(source)); +} + +module.exports = findWhere; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldl.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldl.js new file mode 100644 index 0000000000..26f53cf7b2 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldl.js @@ -0,0 +1 @@ +module.exports = require('./reduce'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldr.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldr.js new file mode 100644 index 0000000000..8fb199eda6 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/foldr.js @@ -0,0 +1 @@ +module.exports = require('./reduceRight'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEach.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEach.js new file mode 100644 index 0000000000..05a8e2140e --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEach.js @@ -0,0 +1,37 @@ +var arrayEach = require('../internal/arrayEach'), + baseEach = require('../internal/baseEach'), + createForEach = require('../internal/createForEach'); + +/** + * Iterates over elements of `collection` invoking `iteratee` for each element. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early + * by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEach(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from left to right and returns the array + * + * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { + * console.log(n, key); + * }); + * // => logs each value-key pair and returns the object (iteration order is not guaranteed) + */ +var forEach = createForEach(arrayEach, baseEach); + +module.exports = forEach; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEachRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEachRight.js new file mode 100644 index 0000000000..3499711002 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/forEachRight.js @@ -0,0 +1,26 @@ +var arrayEachRight = require('../internal/arrayEachRight'), + baseEachRight = require('../internal/baseEachRight'), + createForEach = require('../internal/createForEach'); + +/** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEachRight(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from right to left and returns the array + */ +var forEachRight = createForEach(arrayEachRight, baseEachRight); + +module.exports = forEachRight; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/groupBy.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/groupBy.js new file mode 100644 index 0000000000..a925c894a0 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/groupBy.js @@ -0,0 +1,59 @@ +var createAggregator = require('../internal/createAggregator'); + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using the `_.property` callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ +var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + result[key] = [value]; + } +}); + +module.exports = groupBy; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/include.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/include.js new file mode 100644 index 0000000000..594722af59 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/include.js @@ -0,0 +1 @@ +module.exports = require('./includes'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/includes.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/includes.js new file mode 100644 index 0000000000..329486a530 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/includes.js @@ -0,0 +1,57 @@ +var baseIndexOf = require('../internal/baseIndexOf'), + getLength = require('../internal/getLength'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'), + isLength = require('../internal/isLength'), + isString = require('../lang/isString'), + values = require('../object/values'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Checks if `target` is in `collection` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the offset + * from the end of `collection`. + * + * @static + * @memberOf _ + * @alias contains, include + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {*} target The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {boolean} Returns `true` if a matching element is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.includes('pebbles', 'eb'); + * // => true + */ +function includes(collection, target, fromIndex, guard) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + collection = values(collection); + length = collection.length; + } + if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { + fromIndex = 0; + } else { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); + } + return (typeof collection == 'string' || !isArray(collection) && isString(collection)) + ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) + : (!!length && baseIndexOf(collection, target, fromIndex) > -1); +} + +module.exports = includes; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/indexBy.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/indexBy.js new file mode 100644 index 0000000000..34a941e729 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/indexBy.js @@ -0,0 +1,53 @@ +var createAggregator = require('../internal/createAggregator'); + +/** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the last element responsible for generating the key. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keyData = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keyData, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return String.fromCharCode(object.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return this.fromCharCode(object.code); + * }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ +var indexBy = createAggregator(function(result, value, key) { + result[key] = value; +}); + +module.exports = indexBy; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/inject.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/inject.js new file mode 100644 index 0000000000..26f53cf7b2 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/inject.js @@ -0,0 +1 @@ +module.exports = require('./reduce'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/invoke.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/invoke.js new file mode 100644 index 0000000000..6e71721957 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/invoke.js @@ -0,0 +1,42 @@ +var baseEach = require('../internal/baseEach'), + invokePath = require('../internal/invokePath'), + isArrayLike = require('../internal/isArrayLike'), + isKey = require('../internal/isKey'), + restParam = require('../function/restParam'); + +/** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `methodName` is a function it's + * invoked for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ +var invoke = restParam(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + isProp = isKey(path), + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); + result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); + }); + return result; +}); + +module.exports = invoke; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/map.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/map.js new file mode 100644 index 0000000000..5381110df1 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/map.js @@ -0,0 +1,68 @@ +var arrayMap = require('../internal/arrayMap'), + baseCallback = require('../internal/baseCallback'), + baseMap = require('../internal/baseMap'), + isArray = require('../lang/isArray'); + +/** + * Creates an array of values by running each element in `collection` through + * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, + * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, + * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, + * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, + * `sum`, `uniq`, and `words` + * + * @static + * @memberOf _ + * @alias collect + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new mapped array. + * @example + * + * function timesThree(n) { + * return n * 3; + * } + * + * _.map([1, 2], timesThree); + * // => [3, 6] + * + * _.map({ 'a': 1, 'b': 2 }, timesThree); + * // => [3, 6] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // using the `_.property` callback shorthand + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee, thisArg) { + var func = isArray(collection) ? arrayMap : baseMap; + iteratee = baseCallback(iteratee, thisArg, 3); + return func(collection, iteratee); +} + +module.exports = map; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/max.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/max.js new file mode 100644 index 0000000000..bb1d213c33 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/max.js @@ -0,0 +1 @@ +module.exports = require('../math/max'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/min.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/min.js new file mode 100644 index 0000000000..eef13d02b8 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/min.js @@ -0,0 +1 @@ +module.exports = require('../math/min'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/partition.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/partition.js new file mode 100644 index 0000000000..ee35f27d93 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/partition.js @@ -0,0 +1,66 @@ +var createAggregator = require('../internal/createAggregator'); + +/** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, while the second of which + * contains elements `predicate` returns falsey for. The predicate is bound + * to `thisArg` and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * _.partition([1, 2, 3], function(n) { + * return n % 2; + * }); + * // => [[1, 3], [2]] + * + * _.partition([1.2, 2.3, 3.4], function(n) { + * return this.floor(n) % 2; + * }, Math); + * // => [[1.2, 3.4], [2.3]] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * var mapper = function(array) { + * return _.pluck(array, 'user'); + * }; + * + * // using the `_.matches` callback shorthand + * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper); + * // => [['pebbles'], ['barney', 'fred']] + * + * // using the `_.matchesProperty` callback shorthand + * _.map(_.partition(users, 'active', false), mapper); + * // => [['barney', 'pebbles'], ['fred']] + * + * // using the `_.property` callback shorthand + * _.map(_.partition(users, 'active'), mapper); + * // => [['fred'], ['barney', 'pebbles']] + */ +var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); +}, function() { return [[], []]; }); + +module.exports = partition; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/pluck.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/pluck.js new file mode 100644 index 0000000000..5ee1ec84ee --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/pluck.js @@ -0,0 +1,31 @@ +var map = require('./map'), + property = require('../utility/property'); + +/** + * Gets the property value of `path` from all elements in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|string} path The path of the property to pluck. + * @returns {Array} Returns the property values. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * _.pluck(users, 'user'); + * // => ['barney', 'fred'] + * + * var userIndex = _.indexBy(users, 'user'); + * _.pluck(userIndex, 'age'); + * // => [36, 40] (iteration order is not guaranteed) + */ +function pluck(collection, path) { + return map(collection, property(path)); +} + +module.exports = pluck; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduce.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduce.js new file mode 100644 index 0000000000..5d5e8c9169 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduce.js @@ -0,0 +1,44 @@ +var arrayReduce = require('../internal/arrayReduce'), + baseEach = require('../internal/baseEach'), + createReduce = require('../internal/createReduce'); + +/** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` through `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not provided the first element of `collection` is used as the initial + * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`, + * and `sortByOrder` + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.reduce([1, 2], function(total, n) { + * return total + n; + * }); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) + */ +var reduce = createReduce(arrayReduce, baseEach); + +module.exports = reduce; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduceRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduceRight.js new file mode 100644 index 0000000000..5a5753b9c2 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reduceRight.js @@ -0,0 +1,29 @@ +var arrayReduceRight = require('../internal/arrayReduceRight'), + baseEachRight = require('../internal/baseEachRight'), + createReduce = require('../internal/createReduce'); + +/** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ +var reduceRight = createReduce(arrayReduceRight, baseEachRight); + +module.exports = reduceRight; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reject.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reject.js new file mode 100644 index 0000000000..55924539b5 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/reject.js @@ -0,0 +1,50 @@ +var arrayFilter = require('../internal/arrayFilter'), + baseCallback = require('../internal/baseCallback'), + baseFilter = require('../internal/baseFilter'), + isArray = require('../lang/isArray'); + +/** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.reject([1, 2, 3, 4], function(n) { + * return n % 2 == 0; + * }); + * // => [1, 3] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.reject(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.reject(users, 'active'), 'user'); + * // => ['barney'] + */ +function reject(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = baseCallback(predicate, thisArg, 3); + return func(collection, function(value, index, collection) { + return !predicate(value, index, collection); + }); +} + +module.exports = reject; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sample.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sample.js new file mode 100644 index 0000000000..8e01533016 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sample.js @@ -0,0 +1,50 @@ +var baseRandom = require('../internal/baseRandom'), + isIterateeCall = require('../internal/isIterateeCall'), + toArray = require('../lang/toArray'), + toIterable = require('../internal/toIterable'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Gets a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {*} Returns the random sample(s). + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ +function sample(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n == null) { + collection = toIterable(collection); + var length = collection.length; + return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; + } + var index = -1, + result = toArray(collection), + length = result.length, + lastIndex = length - 1; + + n = nativeMin(n < 0 ? 0 : (+n || 0), length); + while (++index < n) { + var rand = baseRandom(index, lastIndex), + value = result[rand]; + + result[rand] = result[index]; + result[index] = value; + } + result.length = n; + return result; +} + +module.exports = sample; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/select.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/select.js new file mode 100644 index 0000000000..ade80f6fba --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/select.js @@ -0,0 +1 @@ +module.exports = require('./filter'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/shuffle.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/shuffle.js new file mode 100644 index 0000000000..949689c5fc --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/shuffle.js @@ -0,0 +1,24 @@ +var sample = require('./sample'); + +/** Used as references for `-Infinity` and `Infinity`. */ +var POSITIVE_INFINITY = Number.POSITIVE_INFINITY; + +/** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ +function shuffle(collection) { + return sample(collection, POSITIVE_INFINITY); +} + +module.exports = shuffle; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/size.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/size.js new file mode 100644 index 0000000000..78dcf4ce9b --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/size.js @@ -0,0 +1,30 @@ +var getLength = require('../internal/getLength'), + isLength = require('../internal/isLength'), + keys = require('../object/keys'); + +/** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the size of `collection`. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ +function size(collection) { + var length = collection ? getLength(collection) : 0; + return isLength(length) ? length : keys(collection).length; +} + +module.exports = size; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/some.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/some.js new file mode 100644 index 0000000000..d0b09a4746 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/some.js @@ -0,0 +1,67 @@ +var arraySome = require('../internal/arraySome'), + baseCallback = require('../internal/baseCallback'), + baseSome = require('../internal/baseSome'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * The function returns as soon as it finds a passing value and does not iterate + * over the entire collection. The predicate is bound to `thisArg` and invoked + * with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.some(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.some(users, 'active'); + * // => true + */ +function some(collection, predicate, thisArg) { + var func = isArray(collection) ? arraySome : baseSome; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = baseCallback(predicate, thisArg, 3); + } + return func(collection, predicate); +} + +module.exports = some; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortBy.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortBy.js new file mode 100644 index 0000000000..4401c777f4 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortBy.js @@ -0,0 +1,71 @@ +var baseCallback = require('../internal/baseCallback'), + baseMap = require('../internal/baseMap'), + baseSortBy = require('../internal/baseSortBy'), + compareAscending = require('../internal/compareAscending'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through `iteratee`. This method performs + * a stable sort, that is, it preserves the original sort order of equal elements. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new sorted array. + * @example + * + * _.sortBy([1, 2, 3], function(n) { + * return Math.sin(n); + * }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(n) { + * return this.sin(n); + * }, Math); + * // => [3, 1, 2] + * + * var users = [ + * { 'user': 'fred' }, + * { 'user': 'pebbles' }, + * { 'user': 'barney' } + * ]; + * + * // using the `_.property` callback shorthand + * _.pluck(_.sortBy(users, 'user'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ +function sortBy(collection, iteratee, thisArg) { + if (collection == null) { + return []; + } + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + var index = -1; + iteratee = baseCallback(iteratee, thisArg, 3); + + var result = baseMap(collection, function(value, key, collection) { + return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; + }); + return baseSortBy(result, compareAscending); +} + +module.exports = sortBy; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByAll.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByAll.js new file mode 100644 index 0000000000..4766c20985 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByAll.js @@ -0,0 +1,52 @@ +var baseFlatten = require('../internal/baseFlatten'), + baseSortByOrder = require('../internal/baseSortByOrder'), + isIterateeCall = require('../internal/isIterateeCall'), + restParam = require('../function/restParam'); + +/** + * This method is like `_.sortBy` except that it can sort by multiple iteratees + * or property names. + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees + * The iteratees to sort by, specified as individual values or arrays of values. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.map(_.sortByAll(users, ['user', 'age']), _.values); + * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.map(_.sortByAll(users, 'user', function(chr) { + * return Math.floor(chr.age / 10); + * }), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ +var sortByAll = restParam(function(collection, iteratees) { + if (collection == null) { + return []; + } + var guard = iteratees[2]; + if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) { + iteratees.length = 1; + } + return baseSortByOrder(collection, baseFlatten(iteratees), []); +}); + +module.exports = sortByAll; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByOrder.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByOrder.js new file mode 100644 index 0000000000..8b4fc19687 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sortByOrder.js @@ -0,0 +1,55 @@ +var baseSortByOrder = require('../internal/baseSortByOrder'), + isArray = require('../lang/isArray'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** + * This method is like `_.sortByAll` except that it allows specifying the + * sort orders of the iteratees to sort by. If `orders` is unspecified, all + * values are sorted in ascending order. Otherwise, a value is sorted in + * ascending order if its corresponding order is "asc", and descending if "desc". + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ +function sortByOrder(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (guard && isIterateeCall(iteratees, orders, guard)) { + orders = undefined; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseSortByOrder(collection, iteratees, orders); +} + +module.exports = sortByOrder; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sum.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sum.js new file mode 100644 index 0000000000..a2e93808ae --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/sum.js @@ -0,0 +1 @@ +module.exports = require('../math/sum'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/where.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/where.js new file mode 100644 index 0000000000..f603bf8ce4 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/collection/where.js @@ -0,0 +1,37 @@ +var baseMatches = require('../internal/baseMatches'), + filter = require('./filter'); + +/** + * Performs a deep comparison between each element in `collection` and the + * source object, returning an array of all elements that have equivalent + * property values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {Array} Returns the new filtered array. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] }, + * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user'); + * // => ['barney'] + * + * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); + * // => ['fred'] + */ +function where(collection, source) { + return filter(collection, baseMatches(source)); +} + +module.exports = where; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/date.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/date.js new file mode 100644 index 0000000000..195366e777 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/date.js @@ -0,0 +1,3 @@ +module.exports = { + 'now': require('./date/now') +}; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/date/now.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/date/now.js new file mode 100644 index 0000000000..ffe3060e5b --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/date/now.js @@ -0,0 +1,24 @@ +var getNative = require('../internal/getNative'); + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeNow = getNative(Date, 'now'); + +/** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Date + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => logs the number of milliseconds it took for the deferred function to be invoked + */ +var now = nativeNow || function() { + return new Date().getTime(); +}; + +module.exports = now; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function.js new file mode 100644 index 0000000000..71f8ebeb27 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function.js @@ -0,0 +1,28 @@ +module.exports = { + 'after': require('./function/after'), + 'ary': require('./function/ary'), + 'backflow': require('./function/backflow'), + 'before': require('./function/before'), + 'bind': require('./function/bind'), + 'bindAll': require('./function/bindAll'), + 'bindKey': require('./function/bindKey'), + 'compose': require('./function/compose'), + 'curry': require('./function/curry'), + 'curryRight': require('./function/curryRight'), + 'debounce': require('./function/debounce'), + 'defer': require('./function/defer'), + 'delay': require('./function/delay'), + 'flow': require('./function/flow'), + 'flowRight': require('./function/flowRight'), + 'memoize': require('./function/memoize'), + 'modArgs': require('./function/modArgs'), + 'negate': require('./function/negate'), + 'once': require('./function/once'), + 'partial': require('./function/partial'), + 'partialRight': require('./function/partialRight'), + 'rearg': require('./function/rearg'), + 'restParam': require('./function/restParam'), + 'spread': require('./function/spread'), + 'throttle': require('./function/throttle'), + 'wrap': require('./function/wrap') +}; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/after.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/after.js new file mode 100644 index 0000000000..96a51fdbcf --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/after.js @@ -0,0 +1,48 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeIsFinite = global.isFinite; + +/** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'done saving!' after the two async saves have completed + */ +function after(n, func) { + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + n = nativeIsFinite(n = +n) ? n : 0; + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; +} + +module.exports = after; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/ary.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/ary.js new file mode 100644 index 0000000000..53a6913e3f --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/ary.js @@ -0,0 +1,34 @@ +var createWrapper = require('../internal/createWrapper'), + isIterateeCall = require('../internal/isIterateeCall'); + +/** Used to compose bitmasks for wrapper metadata. */ +var ARY_FLAG = 128; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that accepts up to `n` arguments ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ +function ary(func, n, guard) { + if (guard && isIterateeCall(func, n, guard)) { + n = undefined; + } + n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); + return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); +} + +module.exports = ary; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/backflow.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/backflow.js new file mode 100644 index 0000000000..1954e94239 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/backflow.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/before.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/before.js new file mode 100644 index 0000000000..3d94216825 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/before.js @@ -0,0 +1,42 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery('#add').on('click', _.before(5, addContactToList)); + * // => allows adding up to 4 contacts to the list + */ +function before(n, func) { + var result; + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} + +module.exports = before; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bind.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bind.js new file mode 100644 index 0000000000..0de126ae35 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bind.js @@ -0,0 +1,56 @@ +var createWrapper = require('../internal/createWrapper'), + replaceHolders = require('../internal/replaceHolders'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and prepends any additional `_.bind` arguments to those provided to the + * bound function. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind` this method does not set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var greet = function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * }; + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // using placeholders + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ +var bind = restParam(function(func, thisArg, partials) { + var bitmask = BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bind.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(func, bitmask, thisArg, partials, holders); +}); + +// Assign default placeholders. +bind.placeholder = {}; + +module.exports = bind; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindAll.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindAll.js new file mode 100644 index 0000000000..a09e948524 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindAll.js @@ -0,0 +1,50 @@ +var baseFlatten = require('../internal/baseFlatten'), + createWrapper = require('../internal/createWrapper'), + functions = require('../object/functions'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1; + +/** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all enumerable function + * properties, own and inherited, of `object` are bound. + * + * **Note:** This method does not set the "length" property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} [methodNames] The object method names to bind, + * specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs' when the element is clicked + */ +var bindAll = restParam(function(object, methodNames) { + methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object); + + var index = -1, + length = methodNames.length; + + while (++index < length) { + var key = methodNames[index]; + object[key] = createWrapper(object[key], BIND_FLAG, object); + } + return object; +}); + +module.exports = bindAll; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindKey.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindKey.js new file mode 100644 index 0000000000..b787fe7022 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/bindKey.js @@ -0,0 +1,66 @@ +var createWrapper = require('../internal/createWrapper'), + replaceHolders = require('../internal/replaceHolders'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes the method at `object[key]` and prepends + * any additional `_.bindKey` arguments to those provided to the bound function. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. + * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // using placeholders + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ +var bindKey = restParam(function(object, key, partials) { + var bitmask = BIND_FLAG | BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bindKey.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(key, bitmask, object, partials, holders); +}); + +// Assign default placeholders. +bindKey.placeholder = {}; + +module.exports = bindKey; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/compose.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/compose.js new file mode 100644 index 0000000000..1954e94239 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/compose.js @@ -0,0 +1 @@ +module.exports = require('./flowRight'); diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curry.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curry.js new file mode 100644 index 0000000000..b7db3fdad8 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curry.js @@ -0,0 +1,51 @@ +var createCurry = require('../internal/createCurry'); + +/** Used to compose bitmasks for wrapper metadata. */ +var CURRY_FLAG = 8; + +/** + * Creates a function that accepts one or more arguments of `func` that when + * called either invokes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` may be specified + * if `func.length` is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ +var curry = createCurry(CURRY_FLAG); + +// Assign default placeholders. +curry.placeholder = {}; + +module.exports = curry; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curryRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curryRight.js new file mode 100644 index 0000000000..11c540393b --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/curryRight.js @@ -0,0 +1,48 @@ +var createCurry = require('../internal/createCurry'); + +/** Used to compose bitmasks for wrapper metadata. */ +var CURRY_RIGHT_FLAG = 16; + +/** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ +var curryRight = createCurry(CURRY_RIGHT_FLAG); + +// Assign default placeholders. +curryRight.placeholder = {}; + +module.exports = curryRight; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/debounce.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/debounce.js new file mode 100644 index 0000000000..163af90f38 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/debounce.js @@ -0,0 +1,181 @@ +var isObject = require('../lang/isObject'), + now = require('../date/now'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed invocations. Provide an options object to indicate that `func` + * should be invoked on the leading and/or trailing edge of the `wait` timeout. + * Subsequent calls to the debounced function return the result of the last + * `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify invoking on the leading + * edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be + * delayed before it's invoked. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // invoke `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // ensure `batchLog` is invoked once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * jQuery(source).on('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * })); + * + * // cancel a debounced call + * var todoChanges = _.debounce(batchLog, 1000); + * Object.observe(models.todo, todoChanges); + * + * Object.observe(models, function(changes) { + * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { + * todoChanges.cancel(); + * } + * }, ['delete']); + * + * // ...at some point `models.todo` is changed + * models.todo.completed = true; + * + * // ...before 1 second has passed `models.todo` is deleted + * // which cancels the debounced `todoChanges` call + * delete models.todo; + */ +function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = wait < 0 ? 0 : (+wait || 0); + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = !!options.leading; + maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function cancel() { + if (timeoutId) { + clearTimeout(timeoutId); + } + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + lastCalled = 0; + maxTimeoutId = timeoutId = trailingCall = undefined; + } + + function complete(isCalled, id) { + if (id) { + clearTimeout(id); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + } + } + + function delayed() { + var remaining = wait - (now() - stamp); + if (remaining <= 0 || remaining > wait) { + complete(trailingCall, maxTimeoutId); + } else { + timeoutId = setTimeout(delayed, remaining); + } + } + + function maxDelayed() { + complete(trailing, timeoutId); + } + + function debounced() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0 || remaining > maxWait; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + return result; + } + debounced.cancel = cancel; + return debounced; +} + +module.exports = debounce; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/defer.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/defer.js new file mode 100644 index 0000000000..3accbf9b10 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/defer.js @@ -0,0 +1,25 @@ +var baseDelay = require('../internal/baseDelay'), + restParam = require('./restParam'); + +/** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ +var defer = restParam(function(func, args) { + return baseDelay(func, 1, args); +}); + +module.exports = defer; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/delay.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/delay.js new file mode 100644 index 0000000000..d5eef27a9f --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/delay.js @@ -0,0 +1,26 @@ +var baseDelay = require('../internal/baseDelay'), + restParam = require('./restParam'); + +/** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => logs 'later' after one second + */ +var delay = restParam(function(func, wait, args) { + return baseDelay(func, wait, args); +}); + +module.exports = delay; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flow.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flow.js new file mode 100644 index 0000000000..a435a3d878 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flow.js @@ -0,0 +1,25 @@ +var createFlow = require('../internal/createFlow'); + +/** + * Creates a function that returns the result of invoking the provided + * functions with the `this` binding of the created function, where each + * successive invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow(_.add, square); + * addSquare(1, 2); + * // => 9 + */ +var flow = createFlow(); + +module.exports = flow; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flowRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flowRight.js new file mode 100644 index 0000000000..23b9d76b58 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/flowRight.js @@ -0,0 +1,25 @@ +var createFlow = require('../internal/createFlow'); + +/** + * This method is like `_.flow` except that it creates a function that + * invokes the provided functions from right to left. + * + * @static + * @memberOf _ + * @alias backflow, compose + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight(square, _.add); + * addSquare(1, 2); + * // => 9 + */ +var flowRight = createFlow(true); + +module.exports = flowRight; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/memoize.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/memoize.js new file mode 100644 index 0000000000..f3b8d69920 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/memoize.js @@ -0,0 +1,80 @@ +var MapCache = require('../internal/MapCache'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the + * cache key. The `func` is invoked with the `this` binding of the memoized + * function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * method interface of `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var upperCase = _.memoize(function(string) { + * return string.toUpperCase(); + * }); + * + * upperCase('fred'); + * // => 'FRED' + * + * // modifying the result cache + * upperCase.cache.set('fred', 'BARNEY'); + * upperCase('fred'); + * // => 'BARNEY' + * + * // replacing `_.memoize.Cache` + * var object = { 'user': 'fred' }; + * var other = { 'user': 'barney' }; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'fred' } + * + * _.memoize.Cache = WeakMap; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'barney' } + */ +function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new memoize.Cache; + return memoized; +} + +// Assign cache to `_.memoize`. +memoize.Cache = MapCache; + +module.exports = memoize; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/modArgs.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/modArgs.js new file mode 100644 index 0000000000..49b9b5e682 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/modArgs.js @@ -0,0 +1,58 @@ +var arrayEvery = require('../internal/arrayEvery'), + baseFlatten = require('../internal/baseFlatten'), + baseIsFunction = require('../internal/baseIsFunction'), + restParam = require('./restParam'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMin = Math.min; + +/** + * Creates a function that runs each argument through a corresponding + * transform function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms] The functions to transform + * arguments, specified as individual functions or arrays of functions. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var modded = _.modArgs(function(x, y) { + * return [x, y]; + * }, square, doubled); + * + * modded(1, 2); + * // => [1, 4] + * + * modded(5, 10); + * // => [25, 20] + */ +var modArgs = restParam(function(func, transforms) { + transforms = baseFlatten(transforms); + if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = transforms.length; + return restParam(function(args) { + var index = nativeMin(args.length, length); + while (index--) { + args[index] = transforms[index](args[index]); + } + return func.apply(this, args); + }); +}); + +module.exports = modArgs; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/negate.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/negate.js new file mode 100644 index 0000000000..82479390ad --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/negate.js @@ -0,0 +1,32 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ +function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + return !predicate.apply(this, arguments); + }; +} + +module.exports = negate; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/once.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/once.js new file mode 100644 index 0000000000..0b5bd853cb --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/once.js @@ -0,0 +1,24 @@ +var before = require('./before'); + +/** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first call. The `func` is invoked + * with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` invokes `createApplication` once + */ +function once(func) { + return before(2, func); +} + +module.exports = once; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partial.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partial.js new file mode 100644 index 0000000000..fb1d04fb6c --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partial.js @@ -0,0 +1,43 @@ +var createPartial = require('../internal/createPartial'); + +/** Used to compose bitmasks for wrapper metadata. */ +var PARTIAL_FLAG = 32; + +/** + * Creates a function that invokes `func` with `partial` arguments prepended + * to those provided to the new function. This method is like `_.bind` except + * it does **not** alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // using placeholders + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ +var partial = createPartial(PARTIAL_FLAG); + +// Assign default placeholders. +partial.placeholder = {}; + +module.exports = partial; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partialRight.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partialRight.js new file mode 100644 index 0000000000..634e6a4c40 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/partialRight.js @@ -0,0 +1,42 @@ +var createPartial = require('../internal/createPartial'); + +/** Used to compose bitmasks for wrapper metadata. */ +var PARTIAL_RIGHT_FLAG = 64; + +/** + * This method is like `_.partial` except that partially applied arguments + * are appended to those provided to the new function. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // using placeholders + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ +var partialRight = createPartial(PARTIAL_RIGHT_FLAG); + +// Assign default placeholders. +partialRight.placeholder = {}; + +module.exports = partialRight; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/rearg.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/rearg.js new file mode 100644 index 0000000000..f2bd9c41ec --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/rearg.js @@ -0,0 +1,40 @@ +var baseFlatten = require('../internal/baseFlatten'), + createWrapper = require('../internal/createWrapper'), + restParam = require('./restParam'); + +/** Used to compose bitmasks for wrapper metadata. */ +var REARG_FLAG = 256; + +/** + * Creates a function that invokes `func` with arguments arranged according + * to the specified indexes where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes, + * specified as individual indexes or arrays of indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, 2, 0, 1); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + * + * var map = _.rearg(_.map, [1, 0]); + * map(function(n) { + * return n * 3; + * }, [1, 2, 3]); + * // => [3, 6, 9] + */ +var rearg = restParam(function(func, indexes) { + return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes)); +}); + +module.exports = rearg; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/restParam.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/restParam.js new file mode 100644 index 0000000000..8852286dd5 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/restParam.js @@ -0,0 +1,58 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/* Native method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; + +/** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ +function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; +} + +module.exports = restParam; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/spread.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/spread.js new file mode 100644 index 0000000000..780f5042ad --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/spread.js @@ -0,0 +1,44 @@ +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that invokes `func` with the `this` binding of the created + * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). + * + * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/Web/JavaScript/Reference/Operators/Spread_operator). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to spread arguments over. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * // with a Promise + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ +function spread(func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function(array) { + return func.apply(this, array); + }; +} + +module.exports = spread; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/throttle.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/throttle.js new file mode 100644 index 0000000000..1dd00eab75 --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/throttle.js @@ -0,0 +1,62 @@ +var debounce = require('./debounce'), + isObject = require('../lang/isObject'); + +/** Used as the `TypeError` message for "Functions" methods. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed invocations. Provide an options object to indicate + * that `func` should be invoked on the leading and/or trailing edge of the + * `wait` timeout. Subsequent calls to the throttled function return the + * result of the last `func` call. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify invoking on the leading + * edge of the timeout. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + * + * // cancel a trailing throttled call + * jQuery(window).on('popstate', throttled.cancel); + */ +function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); +} + +module.exports = throttle; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/function/wrap.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/wrap.js new file mode 100644 index 0000000000..6a33c5ec6f --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/function/wrap.js @@ -0,0 +1,33 @@ +var createWrapper = require('../internal/createWrapper'), + identity = require('../utility/identity'); + +/** Used to compose bitmasks for wrapper metadata. */ +var PARTIAL_FLAG = 32; + +/** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Any additional arguments provided to the function are + * appended to those provided to the wrapper function. The wrapper is invoked + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

                ' + func(text) + '

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

                fred, barney, & pebbles

                ' + */ +function wrap(value, wrapper) { + wrapper = wrapper == null ? identity : wrapper; + return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []); +} + +module.exports = wrap; diff --git a/deps/npm/node_modules/cli-table2/node_modules/lodash/index.js b/deps/npm/node_modules/cli-table2/node_modules/lodash/index.js new file mode 100644 index 0000000000..5f17319b9b --- /dev/null +++ b/deps/npm/node_modules/cli-table2/node_modules/lodash/index.js @@ -0,0 +1,12351 @@ +/** + * @license + * lodash 3.10.1 (Custom Build) + * Build: `lodash modern -d -o ./index.js` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.3 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ +;(function() { + + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; + + /** Used as the semantic version number. */ + var VERSION = '3.10.1'; + + /** Used to compose bitmasks for wrapper metadata. */ + var BIND_FLAG = 1, + BIND_KEY_FLAG = 2, + CURRY_BOUND_FLAG = 4, + CURRY_FLAG = 8, + CURRY_RIGHT_FLAG = 16, + PARTIAL_FLAG = 32, + PARTIAL_RIGHT_FLAG = 64, + ARY_FLAG = 128, + REARG_FLAG = 256; + + /** Used as default options for `_.trunc`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; + + /** Used to detect when a function becomes hot. */ + var HOT_COUNT = 150, + HOT_SPAN = 16; + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; + + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2; + + /** Used as the `TypeError` message for "Functions" methods. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; + + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + funcTag = '[object Function]', + mapTag = '[object Map]', + numberTag = '[object Number]', + objectTag = '[object Object]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + weakMapTag = '[object WeakMap]'; + + var arrayBufferTag = '[object ArrayBuffer]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; + + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g, + reUnescapedHtml = /[&<>"'`]/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; + + /** + * Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns) + * and those outlined by [`EscapeRegExpPattern`](http://ecma-international.org/ecma-262/6.0/#sec-escaperegexppattern). + */ + var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g, + reHasRegExpChars = RegExp(reRegExpChars.source); + + /** Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). */ + var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; + + /** Used to detect hexadecimal string values. */ + var reHasHexPrefix = /^0[xX]/; + + /** Used to detect host constructors (Safari > 5). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^\d+$/; + + /** Used to match latin-1 supplementary letters (excluding mathematical operators). */ + var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g; + + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; + + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + + /** Used to match words to create compound words. */ + var reWords = (function() { + var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]', + lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+'; + + return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g'); + }()); + + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number', + 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'isFinite', + 'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap' + ]; + + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; + + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dateTag] = typedArrayTags[errorTag] = + typedArrayTags[funcTag] = typedArrayTags[mapTag] = + typedArrayTags[numberTag] = typedArrayTags[objectTag] = + typedArrayTags[regexpTag] = typedArrayTags[setTag] = + typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = + cloneableTags[dateTag] = cloneableTags[float32Tag] = + cloneableTags[float64Tag] = cloneableTags[int8Tag] = + cloneableTags[int16Tag] = cloneableTags[int32Tag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[stringTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[mapTag] = cloneableTags[setTag] = + cloneableTags[weakMapTag] = false; + + /** Used to map latin-1 supplementary letters to basic latin letters. */ + var deburredLetters = { + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss' + }; + + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + '`': '`' + }; + + /** Used to determine if values are of the language type `Object`. */ + var objectTypes = { + 'function': true, + 'object': true + }; + + /** Used to escape characters for inclusion in compiled regexes. */ + var regexpEscapes = { + '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34', + '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39', + 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46', + 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66', + 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78' + }; + + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; + + /** Detect free variable `exports`. */ + var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; + + /** Detect free variable `module`. */ + var freeModule = objectTypes[typeof module] && module && !module.nodeType && module; + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global; + + /** Detect free variable `self`. */ + var freeSelf = objectTypes[typeof self] && self && self.Object && self; + + /** Detect free variable `window`. */ + var freeWindow = objectTypes[typeof window] && window && window.Object && window; + + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports && freeExports; + + /** + * Used as a reference to the global object. + * + * The `this` value is used if it's the global object to avoid Greasemonkey's + * restricted `window` object, otherwise the `window` object is used. + */ + var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this; + + /*--------------------------------------------------------------------------*/ + + /** + * The base implementation of `compareAscending` which compares values and + * sorts them in ascending order without guaranteeing a stable sort. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. + */ + function baseCompareAscending(value, other) { + if (value !== other) { + var valIsNull = value === null, + valIsUndef = value === undefined, + valIsReflexive = value === value; + + var othIsNull = other === null, + othIsUndef = other === undefined, + othIsReflexive = other === other; + + if ((value > other && !othIsNull) || !valIsReflexive || + (valIsNull && !othIsUndef && othIsReflexive) || + (valIsUndef && othIsReflexive)) { + return 1; + } + if ((value < other && !valIsNull) || !othIsReflexive || + (othIsNull && !valIsUndef && valIsReflexive) || + (othIsUndef && valIsReflexive)) { + return -1; + } + } + return 0; + } + + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to search. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.indexOf` without support for binary searches. + * + * @private + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return indexOfNaN(array, fromIndex); + } + var index = fromIndex - 1, + length = array.length; + + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * The base implementation of `_.isFunction` without support for environments + * with incorrect `typeof` results. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + */ + function baseIsFunction(value) { + // Avoid a Chakra JIT bug in compatibility modes of IE 11. + // See https://github.com/jashkenas/underscore/issues/1621 for more details. + return typeof value == 'function' || false; + } + + /** + * Converts `value` to a string if it's not one. An empty string is returned + * for `null` or `undefined` values. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + return value == null ? '' : (value + ''); + } + + /** + * Used by `_.trim` and `_.trimLeft` to get the index of the first character + * of `string` that is not found in `chars`. + * + * @private + * @param {string} string The string to inspect. + * @param {string} chars The characters to find. + * @returns {number} Returns the index of the first character not found in `chars`. + */ + function charsLeftIndex(string, chars) { + var index = -1, + length = string.length; + + while (++index < length && chars.indexOf(string.charAt(index)) > -1) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimRight` to get the index of the last character + * of `string` that is not found in `chars`. + * + * @private + * @param {string} string The string to inspect. + * @param {string} chars The characters to find. + * @returns {number} Returns the index of the last character not found in `chars`. + */ + function charsRightIndex(string, chars) { + var index = string.length; + + while (index-- && chars.indexOf(string.charAt(index)) > -1) {} + return index; + } + + /** + * Used by `_.sortBy` to compare transformed elements of a collection and stable + * sort them in ascending order. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareAscending(object, other) { + return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index); + } + + /** + * Used by `_.sortByOrder` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all valuess are sorted in ascending order. Otherwise, + * a value is sorted in ascending order if its corresponding order is "asc", and + * descending if "desc". + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. + */ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; + + while (++index < length) { + var result = baseCompareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * ((order === 'asc' || order === true) ? 1 : -1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://code.google.com/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; + } + + /** + * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + function deburrLetter(letter) { + return deburredLetters[letter]; + } + + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeHtmlChar(chr) { + return htmlEscapes[chr]; + } + + /** + * Used by `_.escapeRegExp` to escape characters for inclusion in compiled regexes. + * + * @private + * @param {string} chr The matched character to escape. + * @param {string} leadingChar The capture group for a leading character. + * @param {string} whitespaceChar The capture group for a whitespace character. + * @returns {string} Returns the escaped character. + */ + function escapeRegExpChar(chr, leadingChar, whitespaceChar) { + if (leadingChar) { + chr = regexpEscapes[chr]; + } else if (whitespaceChar) { + chr = stringEscapes[chr]; + } + return '\\' + chr; + } + + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + + /** + * Gets the index at which the first occurrence of `NaN` is found in `array`. + * + * @private + * @param {Array} array The array to search. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched `NaN`, else `-1`. + */ + function indexOfNaN(array, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 0 : -1); + + while ((fromRight ? index-- : ++index < length)) { + var other = array[index]; + if (other !== other) { + return index; + } + } + return -1; + } + + /** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ + function isObjectLike(value) { + return !!value && typeof value == 'object'; + } + + /** + * Used by `trimmedLeftIndex` and `trimmedRightIndex` to determine if a + * character code is whitespace. + * + * @private + * @param {number} charCode The character code to inspect. + * @returns {boolean} Returns `true` if `charCode` is whitespace, else `false`. + */ + function isSpace(charCode) { + return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 || + (charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279))); + } + + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + if (array[index] === placeholder) { + array[index] = PLACEHOLDER; + result[++resIndex] = index; + } + } + return result; + } + + /** + * An implementation of `_.uniq` optimized for sorted arrays without support + * for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The function invoked per iteration. + * @returns {Array} Returns the new duplicate-value-free array. + */ + function sortedUniq(array, iteratee) { + var seen, + index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value, index, array) : value; + + if (!index || seen !== computed) { + seen = computed; + result[++resIndex] = value; + } + } + return result; + } + + /** + * Used by `_.trim` and `_.trimLeft` to get the index of the first non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the first non-whitespace character. + */ + function trimmedLeftIndex(string) { + var index = -1, + length = string.length; + + while (++index < length && isSpace(string.charCodeAt(index))) {} + return index; + } + + /** + * Used by `_.trim` and `_.trimRight` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedRightIndex(string) { + var index = string.length; + + while (index-- && isSpace(string.charCodeAt(index))) {} + return index; + } + + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + function unescapeHtmlChar(chr) { + return htmlUnescapes[chr]; + } + + /*--------------------------------------------------------------------------*/ + + /** + * Create a new pristine `lodash` function using the given `context` object. + * + * @static + * @memberOf _ + * @category Utility + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // using `context` to mock `Date#getTime` use in `_.now` + * var mock = _.runInContext({ + * 'Date': function() { + * return { 'getTime': getTimeMock }; + * } + * }); + * + * // or creating a suped-up `defer` in Node.js + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + function runInContext(context) { + // Avoid issues with some ES3 environments that attempt to use values, named + // after built-in constructors like `Object`, for the creation of literals. + // ES5 clears this up by stating that literals must use built-in constructors. + // See https://es5.github.io/#x11.1.5 for more details. + context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root; + + /** Native constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Number = context.Number, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; + + /** Used for native method references. */ + var arrayProto = Array.prototype, + objectProto = Object.prototype, + stringProto = String.prototype; + + /** Used to resolve the decompiled source of functions. */ + var fnToString = Function.prototype.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** Used to generate unique IDs. */ + var idCounter = 0; + + /** + * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) + * of values. + */ + var objToString = objectProto.toString; + + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** Native method references. */ + var ArrayBuffer = context.ArrayBuffer, + clearTimeout = context.clearTimeout, + parseFloat = context.parseFloat, + pow = Math.pow, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + Set = getNative(context, 'Set'), + setTimeout = context.setTimeout, + splice = arrayProto.splice, + Uint8Array = context.Uint8Array, + WeakMap = getNative(context, 'WeakMap'); + + /* Native method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeCreate = getNative(Object, 'create'), + nativeFloor = Math.floor, + nativeIsArray = getNative(Array, 'isArray'), + nativeIsFinite = context.isFinite, + nativeKeys = getNative(Object, 'keys'), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = getNative(Date, 'now'), + nativeParseInt = context.parseInt, + nativeRandom = Math.random; + + /** Used as references for `-Infinity` and `Infinity`. */ + var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY, + POSITIVE_INFINITY = Number.POSITIVE_INFINITY; + + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + + /** + * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) + * of an array-like value. + */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + + /** Used to lookup unminified function names. */ + var realNames = {}; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object which wraps `value` to enable implicit chaining. + * Methods that operate on and return arrays, collections, and functions can + * be chained together. Methods that retrieve a single value or may return a + * primitive value will automatically end the chain returning the unwrapped + * value. Explicit chaining may be enabled using `_.chain`. The execution of + * chained methods is lazy, that is, execution is deferred until `_#value` + * is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. Shortcut + * fusion is an optimization strategy which merge iteratee calls; this can help + * to avoid the creation of intermediate data structures and greatly reduce the + * number of iteratee executions. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, + * `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`, + * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`, + * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`, + * and `where` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`, + * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`, + * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`, + * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`, + * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`, + * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`, + * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`, + * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, + * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`, + * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`, + * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`, + * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`, + * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`, + * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`, + * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`, + * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`, + * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`, + * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, + * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`, + * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`, + * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`, + * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`, + * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`, + * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`, + * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`, + * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`, + * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`, + * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`, + * `unescape`, `uniqueId`, `value`, and `words` + * + * The wrapper method `sample` will return a wrapped value when `n` is provided, + * otherwise an unwrapped value is returned. + * + * @name _ + * @constructor + * @category Chain + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var wrapped = _([1, 2, 3]); + * + * // returns an unwrapped value + * wrapped.reduce(function(total, n) { + * return total + n; + * }); + * // => 6 + * + * // returns a wrapped value + * var squares = wrapped.map(function(n) { + * return n * n; + * }); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; + } + if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); + } + } + return new LodashWrapper(value); + } + + /** + * The function whose prototype all chaining wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } + + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable chaining for all wrapper methods. + * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value. + */ + function LodashWrapper(value, chainAll, actions) { + this.__wrapped__ = value; + this.__actions__ = actions || []; + this.__chain__ = !!chainAll; + } + + /** + * An object environment feature flags. + * + * @static + * @memberOf _ + * @type Object + */ + var support = lodash.support = {}; + + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB). Change the following template settings to use + * alternative delimiters. + * + * @static + * @memberOf _ + * @type Object + */ + lodash.templateSettings = { + + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'escape': reEscape, + + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'evaluate': reEvaluate, + + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type RegExp + */ + 'interpolate': reInterpolate, + + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type string + */ + 'variable': '', + + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type Object + */ + 'imports': { + + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type Function + */ + '_': lodash + } + }; + + /*------------------------------------------------------------------------*/ + + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = POSITIVE_INFINITY; + this.__views__ = []; + } + + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = arrayCopy(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = arrayCopy(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = arrayCopy(this.__views__); + return result; + } + + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } + + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); + + if (!isArr || arrLength < LARGE_ARRAY_SIZE || (arrLength == length && takeCount == length)) { + return baseWrapperValue((isRight && isArr) ? array.reverse() : array, this.__actions__); + } + var result = []; + + outer: + while (length-- && resIndex < takeCount) { + index += dir; + + var iterIndex = -1, + value = array[index]; + + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); + + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } + } + } + result[resIndex++] = value; + } + return result; + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a cache object to store key/value pairs. + * + * @private + * @static + * @name Cache + * @memberOf _.memoize + */ + function MapCache() { + this.__data__ = {}; + } + + /** + * Removes `key` and its value from the cache. + * + * @private + * @name delete + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed successfully, else `false`. + */ + function mapDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + + /** + * Gets the cached value for `key`. + * + * @private + * @name get + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to get. + * @returns {*} Returns the cached value. + */ + function mapGet(key) { + return key == '__proto__' ? undefined : this.__data__[key]; + } + + /** + * Checks if a cached value for `key` exists. + * + * @private + * @name has + * @memberOf _.memoize.Cache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapHas(key) { + return key != '__proto__' && hasOwnProperty.call(this.__data__, key); + } + + /** + * Sets `value` to `key` of the cache. + * + * @private + * @name set + * @memberOf _.memoize.Cache + * @param {string} key The key of the value to cache. + * @param {*} value The value to cache. + * @returns {Object} Returns the cache object. + */ + function mapSet(key, value) { + if (key != '__proto__') { + this.__data__[key] = value; + } + return this; + } + + /*------------------------------------------------------------------------*/ + + /** + * + * Creates a cache object to store unique values. + * + * @private + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var length = values ? values.length : 0; + + this.data = { 'hash': nativeCreate(null), 'set': new Set }; + while (length--) { + this.push(values[length]); + } + } + + /** + * Checks if `value` is in `cache` mimicking the return signature of + * `_.indexOf` by returning `0` if the value is found, else `-1`. + * + * @private + * @param {Object} cache The cache to search. + * @param {*} value The value to search for. + * @returns {number} Returns `0` if `value` is found, else `-1`. + */ + function cacheIndexOf(cache, value) { + var data = cache.data, + result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; + + return result ? 0 : -1; + } + + /** + * Adds `value` to the cache. + * + * @private + * @name push + * @memberOf SetCache + * @param {*} value The value to cache. + */ + function cachePush(value) { + var data = this.data; + if (typeof value == 'string' || isObject(value)) { + data.set.add(value); + } else { + data.hash[value] = true; + } + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a new array joining `array` with `other`. + * + * @private + * @param {Array} array The array to join. + * @param {Array} other The other array to join. + * @returns {Array} Returns the new concatenated array. + */ + function arrayConcat(array, other) { + var index = -1, + length = array.length, + othIndex = -1, + othLength = other.length, + result = Array(length + othLength); + + while (++index < length) { + result[index] = array[index]; + } + while (++othIndex < othLength) { + result[index++] = other[othIndex]; + } + return result; + } + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function arrayCopy(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + /** + * A specialized version of `_.forEach` for arrays without support for callback + * shorthands and `this` binding. + * + * @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.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.forEachRight` for arrays without support for + * callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array.length; + + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } + + /** + * A specialized version of `_.every` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; + } + + /** + * A specialized version of `baseExtremum` for arrays which invokes `iteratee` + * with one argument: (value). + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {*} Returns the extremum value. + */ + function arrayExtremum(array, iteratee, comparator, exValue) { + var index = -1, + length = array.length, + computed = exValue, + result = computed; + + while (++index < length) { + var value = array[index], + current = +iteratee(value); + + if (comparator(current, computed)) { + computed = current; + result = value; + } + } + return result; + } + + /** + * A specialized version of `_.filter` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array.length, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[++resIndex] = value; + } + } + return result; + } + + /** + * A specialized version of `_.map` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; + + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + + /** + * A specialized version of `_.reduce` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initFromArray] Specify using the first element of `array` + * as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initFromArray) { + var index = -1, + length = array.length; + + if (initFromArray && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; + } + + /** + * A specialized version of `_.reduceRight` for arrays without support for + * callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initFromArray] Specify using the last element of `array` + * as the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initFromArray) { + var length = array.length; + if (initFromArray && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } + + /** + * A specialized version of `_.some` for arrays without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array.length; + + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + + /** + * A specialized version of `_.sum` for arrays without support for callback + * shorthands and `this` binding.. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function arraySum(array, iteratee) { + var length = array.length, + result = 0; + + while (length--) { + result += +iteratee(array[length]) || 0; + } + return result; + } + + /** + * Used by `_.defaults` to customize its `_.assign` use. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @returns {*} Returns the value to assign to the destination object. + */ + function assignDefaults(objectValue, sourceValue) { + return objectValue === undefined ? sourceValue : objectValue; + } + + /** + * Used by `_.template` to customize its `_.assign` use. + * + * **Note:** This function is like `assignDefaults` except that it ignores + * inherited property values when checking if a property is `undefined`. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @param {string} key The key associated with the object and source values. + * @param {Object} object The destination object. + * @returns {*} Returns the value to assign to the destination object. + */ + function assignOwnDefaults(objectValue, sourceValue, key, object) { + return (objectValue === undefined || !hasOwnProperty.call(object, key)) + ? sourceValue + : objectValue; + } + + /** + * A specialized version of `_.assign` for customizing assigned values without + * support for argument juggling, multiple sources, and `this` binding `customizer` + * functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. + */ + function assignWith(object, source, customizer) { + var index = -1, + props = keys(source), + length = props.length; + + while (++index < length) { + var key = props[index], + value = object[key], + result = customizer(value, source[key], key, object, source); + + if ((result === result ? (result !== value) : (value === value)) || + (value === undefined && !(key in object))) { + object[key] = result; + } + } + return object; + } + + /** + * The base implementation of `_.assign` without support for argument juggling, + * multiple sources, and `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return source == null + ? object + : baseCopy(source, keys(source), object); + } + + /** + * The base implementation of `_.at` without support for string collections + * and individual key arguments. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {number[]|string[]} props The property names or indexes of elements to pick. + * @returns {Array} Returns the new array of picked elements. + */ + function baseAt(collection, props) { + var index = -1, + isNil = collection == null, + isArr = !isNil && isArrayLike(collection), + length = isArr ? collection.length : 0, + propsLength = props.length, + result = Array(propsLength); + + while(++index < propsLength) { + var key = props[index]; + if (isArr) { + result[index] = isIndex(key, length) ? collection[key] : undefined; + } else { + result[index] = isNil ? undefined : collection[key]; + } + } + return result; + } + + /** + * Copies properties of `source` to `object`. + * + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property names to copy. + * @param {Object} [object={}] The object to copy properties to. + * @returns {Object} Returns `object`. + */ + function baseCopy(source, props, object) { + object || (object = {}); + + var index = -1, + length = props.length; + + while (++index < length) { + var key = props[index]; + object[key] = source[key]; + } + return object; + } + + /** + * The base implementation of `_.callback` which supports specifying the + * number of arguments to provide to `func`. + * + * @private + * @param {*} [func=_.identity] The value to convert to a callback. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function baseCallback(func, thisArg, argCount) { + var type = typeof func; + if (type == 'function') { + return thisArg === undefined + ? func + : bindCallback(func, thisArg, argCount); + } + if (func == null) { + return identity; + } + if (type == 'object') { + return baseMatches(func); + } + return thisArg === undefined + ? property(func) + : baseMatchesProperty(func, thisArg); + } + + /** + * The base implementation of `_.clone` without support for argument juggling + * and `this` binding `customizer` functions. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The object `value` belongs to. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates clones with source counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { + var result; + if (customizer) { + result = object ? customizer(value, key, object) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return arrayCopy(value, result); + } + } else { + var tag = objToString.call(value), + isFunc = tag == funcTag; + + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = initCloneObject(isFunc ? {} : value); + if (!isDeep) { + return baseAssign(result, value); + } + } else { + return cloneableTags[tag] + ? initCloneByTag(value, tag, isDeep) + : (object ? value : {}); + } + } + // Check for circular references and return its corresponding clone. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == value) { + return stackB[length]; + } + } + // Add the source value to the stack of traversed objects and associate it with its clone. + stackA.push(value); + stackB.push(result); + + // Recursively populate clone (susceptible to call stack limits). + (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { + result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); + }); + 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. + */ + var baseCreate = (function() { + function object() {} + return function(prototype) { + if (isObject(prototype)) { + object.prototype = prototype; + var result = new object; + object.prototype = undefined; + } + return result || {}; + }; + }()); + + /** + * The base implementation of `_.delay` and `_.defer` which accepts an index + * of where to slice the arguments to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Object} args The arguments provide to `func`. + * @returns {number} Returns the timer id. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } + + /** + * The base implementation of `_.difference` which accepts a single array + * of values to exclude. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values) { + var length = array ? array.length : 0, + result = []; + + if (!length) { + return result; + } + var index = -1, + indexOf = getIndexOf(), + isCommon = indexOf == baseIndexOf, + cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null, + valuesLength = values.length; + + if (cache) { + indexOf = cacheIndexOf; + isCommon = false; + values = cache; + } + outer: + while (++index < length) { + var value = array[index]; + + if (isCommon && value === value) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === value) { + continue outer; + } + } + result.push(value); + } + else if (indexOf(values, value, 0) < 0) { + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.forEach` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); + + /** + * The base implementation of `_.forEachRight` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object|string} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); + + /** + * The base implementation of `_.every` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } + + /** + * Gets the extremum value of `collection` invoking `iteratee` for each value + * in `collection` to generate the criterion by which the value is ranked. + * The `iteratee` is invoked with three arguments: (value, index|key, collection). + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(collection, iteratee, comparator, exValue) { + var computed = exValue, + result = computed; + + baseEach(collection, function(value, index, collection) { + var current = +iteratee(value, index, collection); + if (comparator(current, computed) || (current === exValue && current === result)) { + computed = current; + result = value; + } + }); + return result; + } + + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : (end >>> 0); + start >>>= 0; + + while (start < length) { + array[start++] = value; + } + return array; + } + + /** + * The base implementation of `_.filter` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } + + /** + * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, + * without support for callback shorthands and `this` binding, which iterates + * over `collection` using the provided `eachFunc`. + * + * @private + * @param {Array|Object|string} collection The collection to search. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @param {boolean} [retKey] Specify returning the key of the found element + * instead of the element itself. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFind(collection, predicate, eachFunc, retKey) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = retKey ? key : value; + return false; + } + }); + return result; + } + + /** + * The base implementation of `_.flatten` with added support for restricting + * flattening and specifying the start index. + * + * @private + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, isDeep, isStrict, result) { + result || (result = []); + + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index]; + if (isObjectLike(value) && isArrayLike(value) && + (isStrict || isArray(value) || isArguments(value))) { + if (isDeep) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, isDeep, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + + /** + * The base implementation of `baseForIn` and `baseForOwn` which iterates + * over `object` properties returned by `keysFunc` invoking `iteratee` for + * each property. Iteratee functions may exit iteration early by explicitly + * returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); + + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); + + /** + * The base implementation of `_.forIn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForIn(object, iteratee) { + return baseFor(object, iteratee, keysIn); + } + + /** + * The base implementation of `_.forOwn` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return baseFor(object, iteratee, keys); + } + + /** + * The base implementation of `_.forOwnRight` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return baseForRight(object, iteratee, keys); + } + + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from those provided. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the new array of filtered property names. + */ + function baseFunctions(object, props) { + var index = -1, + length = props.length, + resIndex = -1, + result = []; + + while (++index < length) { + var key = props[index]; + if (isFunction(object[key])) { + result[++resIndex] = key; + } + } + return result; + } + + /** + * The base implementation of `get` without support for string paths + * and default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array} path The path of the property to get. + * @param {string} [pathKey] The key representation of path. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path, pathKey) { + if (object == null) { + return; + } + if (pathKey !== undefined && pathKey in toObject(object)) { + path = [pathKey]; + } + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[path[index++]]; + } + return (index && index == length) ? object : undefined; + } + + /** + * The base implementation of `_.isEqual` without support for `this` binding + * `customizer` functions. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { + if (value === other) { + return true; + } + if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); + } + + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing objects. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA=[]] Tracks traversed `value` objects. + * @param {Array} [stackB=[]] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = arrayTag, + othTag = arrayTag; + + if (!objIsArr) { + objTag = objToString.call(object); + if (objTag == argsTag) { + objTag = objectTag; + } else if (objTag != objectTag) { + objIsArr = isTypedArray(object); + } + } + if (!othIsArr) { + othTag = objToString.call(other); + if (othTag == argsTag) { + othTag = objectTag; + } else if (othTag != objectTag) { + othIsArr = isTypedArray(other); + } + } + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; + + if (isSameTag && !(objIsArr || objIsObj)) { + return equalByTag(object, other, objTag); + } + if (!isLoose) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + + if (objIsWrapped || othIsWrapped) { + return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); + } + } + if (!isSameTag) { + return false; + } + // Assume cyclic values are equal. + // For more information on detecting circular references see https://es5.github.io/#JO. + stackA || (stackA = []); + stackB || (stackB = []); + + var length = stackA.length; + while (length--) { + if (stackA[length] == object) { + return stackB[length] == other; + } + } + // Add `object` and `other` to the stack of traversed objects. + stackA.push(object); + stackB.push(other); + + var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); + + stackA.pop(); + stackB.pop(); + + return result; + } + + /** + * The base implementation of `_.isMatch` without support for callback + * shorthands and `this` binding. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} matchData The propery names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparing objects. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; + + if (object == null) { + return !length; + } + object = toObject(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; + + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var result = customizer ? customizer(objValue, srcValue, key) : undefined; + if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { + return false; + } + } + } + return true; + } + + /** + * The base implementation of `_.map` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } + + /** + * The base implementation of `_.matches` which does not clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + var key = matchData[0][0], + value = matchData[0][1]; + + return function(object) { + if (object == null) { + return false; + } + return object[key] === value && (value !== undefined || (key in toObject(object))); + }; + } + return function(object) { + return baseIsMatch(object, matchData); + }; + } + + /** + * The base implementation of `_.matchesProperty` which does not clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to compare. + * @returns {Function} Returns the new function. + */ + function baseMatchesProperty(path, srcValue) { + var isArr = isArray(path), + isCommon = isKey(path) && isStrictComparable(srcValue), + pathKey = (path + ''); + + path = toPath(path); + return function(object) { + if (object == null) { + return false; + } + var key = pathKey; + object = toObject(object); + if ((isArr || !isCommon) && !(key in object)) { + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + key = last(path); + object = toObject(object); + } + return object[key] === srcValue + ? (srcValue !== undefined || (key in object)) + : baseIsEqual(srcValue, object[key], undefined, true); + }; + } + + /** + * The base implementation of `_.merge` without support for argument juggling, + * multiple sources, and `this` binding `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {Object} Returns `object`. + */ + function baseMerge(object, source, customizer, stackA, stackB) { + if (!isObject(object)) { + return object; + } + var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)), + props = isSrcArr ? undefined : keys(source); + + arrayEach(props || source, function(srcValue, key) { + if (props) { + key = srcValue; + srcValue = source[key]; + } + if (isObjectLike(srcValue)) { + stackA || (stackA = []); + stackB || (stackB = []); + baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB); + } + else { + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + } + if ((result !== undefined || (isSrcArr && !(key in object))) && + (isCommon || (result === result ? (result !== value) : (value === value)))) { + object[key] = result; + } + } + }); + return object; + } + + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize merged values. + * @param {Array} [stackA=[]] Tracks traversed source objects. + * @param {Array} [stackB=[]] Associates values with source counterparts. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) { + var length = stackA.length, + srcValue = source[key]; + + while (length--) { + if (stackA[length] == srcValue) { + object[key] = stackB[length]; + return; + } + } + var value = object[key], + result = customizer ? customizer(value, srcValue, key, object, source) : undefined, + isCommon = result === undefined; + + if (isCommon) { + result = srcValue; + if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) { + result = isArray(value) + ? value + : (isArrayLike(value) ? arrayCopy(value) : []); + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + result = isArguments(value) + ? toPlainObject(value) + : (isPlainObject(value) ? value : {}); + } + else { + isCommon = false; + } + } + // Add the source value to the stack of traversed objects and associate + // it with its merged value. + stackA.push(srcValue); + stackB.push(result); + + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB); + } else if (result === result ? (result !== value) : (value === value)) { + object[key] = result; + } + } + + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } + + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new function. + */ + function basePropertyDeep(path) { + var pathKey = (path + ''); + path = toPath(path); + return function(object) { + return baseGet(object, path, pathKey); + }; + } + + /** + * The base implementation of `_.pullAt` without support for individual + * index arguments and capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0; + while (length--) { + var index = indexes[length]; + if (index != previous && isIndex(index)) { + var previous = index; + splice.call(array, index, 1); + } + } + return array; + } + + /** + * The base implementation of `_.random` without support for argument juggling + * and returning floating-point numbers. + * + * @private + * @param {number} min The minimum possible value. + * @param {number} max The maximum possible value. + * @returns {number} Returns the random number. + */ + function baseRandom(min, max) { + return min + nativeFloor(nativeRandom() * (max - min + 1)); + } + + /** + * The base implementation of `_.reduce` and `_.reduceRight` without support + * for callback shorthands and `this` binding, which iterates over `collection` + * using the provided `eachFunc`. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initFromCollection Specify using the first or last element + * of `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initFromCollection + ? (initFromCollection = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } + + /** + * The base implementation of `setData` without support for hot loop detection. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; + + /** + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function baseSlice(array, start, end) { + var index = -1, + length = array.length; + + start = start == null ? 0 : (+start || 0); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : (+end || 0); + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; + + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; + } + return result; + } + + /** + * The base implementation of `_.some` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function baseSome(collection, predicate) { + var result; + + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; + } + + /** + * The base implementation of `_.sortBy` which uses `comparer` to define + * the sort order of `array` and replaces criteria objects with their + * corresponding values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; + + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } + + /** + * The base implementation of `_.sortByOrder` without param guards. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseSortByOrder(collection, iteratees, orders) { + var callback = getCallback(), + index = -1; + + iteratees = arrayMap(iteratees, function(iteratee) { return callback(iteratee); }); + + var result = baseMap(collection, function(value) { + var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); + + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); + } + + /** + * The base implementation of `_.sum` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(collection, iteratee) { + var result = 0; + baseEach(collection, function(value, index, collection) { + result += +iteratee(value, index, collection) || 0; + }); + return result; + } + + /** + * The base implementation of `_.uniq` without support for callback shorthands + * and `this` binding. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The function invoked per iteration. + * @returns {Array} Returns the new duplicate-value-free array. + */ + function baseUniq(array, iteratee) { + var index = -1, + indexOf = getIndexOf(), + length = array.length, + isCommon = indexOf == baseIndexOf, + isLarge = isCommon && length >= LARGE_ARRAY_SIZE, + seen = isLarge ? createCache() : null, + result = []; + + if (seen) { + indexOf = cacheIndexOf; + isCommon = false; + } else { + isLarge = false; + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value, index, array) : value; + + if (isCommon && value === value) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (indexOf(seen, computed, 0) < 0) { + if (iteratee || isLarge) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + var index = -1, + length = props.length, + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + return result; + } + + /** + * The base implementation of `_.dropRightWhile`, `_.dropWhile`, `_.takeRightWhile`, + * and `_.takeWhile` without support for callback shorthands and `this` binding. + * + * @private + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. + */ + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {} + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); + } + + /** + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. + * + * @private + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to peform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. + */ + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + var index = -1, + length = actions.length; + + while (++index < length) { + var action = actions[index]; + result = action.func.apply(action.thisArg, arrayPush([result], action.args)); + } + return result; + } + + /** + * Performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function binaryIndex(array, value, retHighest) { + var low = 0, + high = array ? array.length : low; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return binaryIndexBy(array, value, identity, retHighest); + } + + /** + * This function is like `binaryIndex` except that it invokes `iteratee` for + * `value` and each element of `array` to compute their sort ranking. The + * iteratee is invoked with one argument; (value). + * + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The function invoked per iteration. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + */ + function binaryIndexBy(array, value, iteratee, retHighest) { + value = iteratee(value); + + var low = 0, + high = array ? array.length : 0, + valIsNaN = value !== value, + valIsNull = value === null, + valIsUndef = value === undefined; + + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + isDef = computed !== undefined, + isReflexive = computed === computed; + + if (valIsNaN) { + var setLow = isReflexive || retHighest; + } else if (valIsNull) { + setLow = isReflexive && isDef && (retHighest || computed != null); + } else if (valIsUndef) { + setLow = isReflexive && (retHighest || isDef); + } else if (computed == null) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } + + /** + * A specialized version of `baseCallback` which only supports `this` binding + * and specifying the number of arguments to provide to `func`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {number} [argCount] The number of arguments to provide to `func`. + * @returns {Function} Returns the callback. + */ + function bindCallback(func, thisArg, argCount) { + if (typeof func != 'function') { + return identity; + } + if (thisArg === undefined) { + return func; + } + switch (argCount) { + case 1: return function(value) { + return func.call(thisArg, value); + }; + case 3: return function(value, index, collection) { + return func.call(thisArg, value, index, collection); + }; + case 4: return function(accumulator, value, index, collection) { + return func.call(thisArg, accumulator, value, index, collection); + }; + case 5: return function(value, other, key, object, source) { + return func.call(thisArg, value, other, key, object, source); + }; + } + return function() { + return func.apply(thisArg, arguments); + }; + } + + /** + * Creates a clone of the given array buffer. + * + * @private + * @param {ArrayBuffer} buffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. + */ + function bufferClone(buffer) { + var result = new ArrayBuffer(buffer.byteLength), + view = new Uint8Array(result); + + view.set(new Uint8Array(buffer)); + return result; + } + + /** + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgs(args, partials, holders) { + var holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + leftIndex = -1, + leftLength = partials.length, + result = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + while (argsLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; + } + + /** + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. + * + * @private + * @param {Array|Object} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @returns {Array} Returns the new array of composed arguments. + */ + function composeArgsRight(args, partials, holders) { + var holdersIndex = -1, + holdersLength = holders.length, + argsIndex = -1, + argsLength = nativeMax(args.length - holdersLength, 0), + rightIndex = -1, + rightLength = partials.length, + result = Array(argsLength + rightLength); + + while (++argsIndex < argsLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + return result; + } + + /** + * Creates a `_.countBy`, `_.groupBy`, `_.indexBy`, or `_.partition` function. + * + * @private + * @param {Function} setter The function to set keys and values of the accumulator object. + * @param {Function} [initializer] The function to initialize the accumulator object. + * @returns {Function} Returns the new aggregator function. + */ + function createAggregator(setter, initializer) { + return function(collection, iteratee, thisArg) { + var result = initializer ? initializer() : {}; + iteratee = getCallback(iteratee, thisArg, 3); + + if (isArray(collection)) { + var index = -1, + length = collection.length; + + while (++index < length) { + var value = collection[index]; + setter(result, value, iteratee(value, index, collection), collection); + } + } else { + baseEach(collection, function(value, key, collection) { + setter(result, value, iteratee(value, key, collection), collection); + }); + } + return result; + }; + } + + /** + * Creates a `_.assign`, `_.defaults`, or `_.merge` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. + */ + function createAssigner(assigner) { + return restParam(function(object, sources) { + var index = -1, + length = object == null ? 0 : sources.length, + customizer = length > 2 ? sources[length - 2] : undefined, + guard = length > 2 ? sources[2] : undefined, + thisArg = length > 1 ? sources[length - 1] : undefined; + + if (typeof customizer == 'function') { + customizer = bindCallback(customizer, thisArg, 5); + length -= 2; + } else { + customizer = typeof thisArg == 'function' ? thisArg : undefined; + length -= (customizer ? 1 : 0); + } + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, customizer); + } + } + return object; + }); + } + + /** + * Creates a `baseEach` or `baseEachRight` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + return eachFunc(collection, iteratee); + } + var index = fromRight ? length : -1, + iterable = toObject(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + + /** + * Creates a base function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. + */ + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var iterable = toObject(object), + props = keysFunc(object), + length = props.length, + index = fromRight ? length : -1; + + while ((fromRight ? index-- : ++index < length)) { + var key = props[index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + + /** + * Creates a function that wraps `func` and invokes it with the `this` + * binding of `thisArg`. + * + * @private + * @param {Function} func The function to bind. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new bound function. + */ + function createBindWrapper(func, thisArg) { + var Ctor = createCtorWrapper(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(thisArg, arguments); + } + return wrapper; + } + + /** + * Creates a `Set` cache object to optimize linear searches of large arrays. + * + * @private + * @param {Array} [values] The values to cache. + * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. + */ + function createCache(values) { + return (nativeCreate && Set) ? new SetCache(values) : null; + } + + /** + * Creates a function that produces compound words out of the words in a + * given string. + * + * @private + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. + */ + function createCompounder(callback) { + return function(string) { + var index = -1, + array = words(deburr(string)), + length = array.length, + result = ''; + + while (++index < length) { + result = callback(result, array[index], index); + } + return result; + }; + } + + /** + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * + * @private + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. + */ + function createCtorWrapper(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. + // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; + } + + /** + * Creates a `_.curry` or `_.curryRight` function. + * + * @private + * @param {boolean} flag The curry bit flag. + * @returns {Function} Returns the new curry function. + */ + function createCurry(flag) { + function curryFunc(func, arity, guard) { + if (guard && isIterateeCall(func, arity, guard)) { + arity = undefined; + } + var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryFunc.placeholder; + return result; + } + return curryFunc; + } + + /** + * Creates a `_.defaults` or `_.defaultsDeep` function. + * + * @private + * @param {Function} assigner The function to assign values. + * @param {Function} customizer The function to customize assigned values. + * @returns {Function} Returns the new defaults function. + */ + function createDefaults(assigner, customizer) { + return restParam(function(args) { + var object = args[0]; + if (object == null) { + return object; + } + args.push(customizer); + return assigner.apply(undefined, args); + }); + } + + /** + * Creates a `_.max` or `_.min` function. + * + * @private + * @param {Function} comparator The function used to compare values. + * @param {*} exValue The initial extremum value. + * @returns {Function} Returns the new extremum function. + */ + function createExtremum(comparator, exValue) { + return function(collection, iteratee, thisArg) { + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + iteratee = getCallback(iteratee, thisArg, 3); + if (iteratee.length == 1) { + collection = isArray(collection) ? collection : toIterable(collection); + var result = arrayExtremum(collection, iteratee, comparator, exValue); + if (!(collection.length && result === exValue)) { + return result; + } + } + return baseExtremum(collection, iteratee, comparator, exValue); + }; + } + + /** + * Creates a `_.find` or `_.findLast` function. + * + * @private + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ + function createFind(eachFunc, fromRight) { + return function(collection, predicate, thisArg) { + predicate = getCallback(predicate, thisArg, 3); + if (isArray(collection)) { + var index = baseFindIndex(collection, predicate, fromRight); + return index > -1 ? collection[index] : undefined; + } + return baseFind(collection, predicate, eachFunc); + }; + } + + /** + * Creates a `_.findIndex` or `_.findLastIndex` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new find function. + */ + function createFindIndex(fromRight) { + return function(array, predicate, thisArg) { + if (!(array && array.length)) { + return -1; + } + predicate = getCallback(predicate, thisArg, 3); + return baseFindIndex(array, predicate, fromRight); + }; + } + + /** + * Creates a `_.findKey` or `_.findLastKey` function. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new find function. + */ + function createFindKey(objectFunc) { + return function(object, predicate, thisArg) { + predicate = getCallback(predicate, thisArg, 3); + return baseFind(object, predicate, objectFunc, true); + }; + } + + /** + * Creates a `_.flow` or `_.flowRight` function. + * + * @private + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. + */ + function createFlow(fromRight) { + return function() { + var wrapper, + length = arguments.length, + index = fromRight ? length : -1, + leftIndex = 0, + funcs = Array(length); + + while ((fromRight ? index-- : ++index < length)) { + var func = funcs[leftIndex++] = arguments[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') { + wrapper = new LodashWrapper([], true); + } + } + index = wrapper ? -1 : length; + while (++index < length) { + func = funcs[index]; + + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; + + if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func); + } + } + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; + }; + } + + /** + * Creates a function for `_.forEach` or `_.forEachRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ + function createForEach(arrayFunc, eachFunc) { + return function(collection, iteratee, thisArg) { + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee) + : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); + }; + } + + /** + * Creates a function for `_.forIn` or `_.forInRight`. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new each function. + */ + function createForIn(objectFunc) { + return function(object, iteratee, thisArg) { + if (typeof iteratee != 'function' || thisArg !== undefined) { + iteratee = bindCallback(iteratee, thisArg, 3); + } + return objectFunc(object, iteratee, keysIn); + }; + } + + /** + * Creates a function for `_.forOwn` or `_.forOwnRight`. + * + * @private + * @param {Function} objectFunc The function to iterate over an object. + * @returns {Function} Returns the new each function. + */ + function createForOwn(objectFunc) { + return function(object, iteratee, thisArg) { + if (typeof iteratee != 'function' || thisArg !== undefined) { + iteratee = bindCallback(iteratee, thisArg, 3); + } + return objectFunc(object, iteratee); + }; + } + + /** + * Creates a function for `_.mapKeys` or `_.mapValues`. + * + * @private + * @param {boolean} [isMapKeys] Specify mapping keys instead of values. + * @returns {Function} Returns the new map function. + */ + function createObjectMapper(isMapKeys) { + return function(object, iteratee, thisArg) { + var result = {}; + iteratee = getCallback(iteratee, thisArg, 3); + + baseForOwn(object, function(value, key, object) { + var mapped = iteratee(value, key, object); + key = isMapKeys ? mapped : key; + value = isMapKeys ? value : mapped; + result[key] = value; + }); + return result; + }; + } + + /** + * Creates a function for `_.padLeft` or `_.padRight`. + * + * @private + * @param {boolean} [fromRight] Specify padding from the right. + * @returns {Function} Returns the new pad function. + */ + function createPadDir(fromRight) { + return function(string, length, chars) { + string = baseToString(string); + return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string); + }; + } + + /** + * Creates a `_.partial` or `_.partialRight` function. + * + * @private + * @param {boolean} flag The partial bit flag. + * @returns {Function} Returns the new partial function. + */ + function createPartial(flag) { + var partialFunc = restParam(function(func, partials) { + var holders = replaceHolders(partials, partialFunc.placeholder); + return createWrapper(func, flag, undefined, partials, holders); + }); + return partialFunc; + } + + /** + * Creates a function for `_.reduce` or `_.reduceRight`. + * + * @private + * @param {Function} arrayFunc The function to iterate over an array. + * @param {Function} eachFunc The function to iterate over a collection. + * @returns {Function} Returns the new each function. + */ + function createReduce(arrayFunc, eachFunc) { + return function(collection, iteratee, accumulator, thisArg) { + var initFromArray = arguments.length < 3; + return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) + ? arrayFunc(collection, iteratee, accumulator, initFromArray) + : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc); + }; + } + + /** + * Creates a function that wraps `func` and invokes it with optional `this` + * binding of, partial application, and currying. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & ARY_FLAG, + isBind = bitmask & BIND_FLAG, + isBindKey = bitmask & BIND_KEY_FLAG, + isCurry = bitmask & CURRY_FLAG, + isCurryBound = bitmask & CURRY_BOUND_FLAG, + isCurryRight = bitmask & CURRY_RIGHT_FLAG, + Ctor = isBindKey ? undefined : createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it to other functions. + var length = arguments.length, + index = length, + args = Array(length); + + while (index--) { + args[index] = arguments[index]; + } + if (partials) { + args = composeArgs(args, partials, holders); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight); + } + if (isCurry || isCurryRight) { + var placeholder = wrapper.placeholder, + argsHolders = replaceHolders(args, placeholder); + + length -= argsHolders.length; + if (length < arity) { + var newArgPos = argPos ? arrayCopy(argPos) : undefined, + newArity = nativeMax(arity - length, 0), + newsHolders = isCurry ? argsHolders : undefined, + newHoldersRight = isCurry ? undefined : argsHolders, + newPartials = isCurry ? args : undefined, + newPartialsRight = isCurry ? undefined : args; + + bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); + + if (!isCurryBound) { + bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); + } + var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity], + result = createHybridWrapper.apply(undefined, newData); + + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return result; + } + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + if (argPos) { + args = reorder(args, argPos); + } + if (isAry && ary < args.length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtorWrapper(func); + } + return fn.apply(thisBinding, args); + } + return wrapper; + } + + /** + * Creates the padding required for `string` based on the given `length`. + * The `chars` string is truncated if the number of characters exceeds `length`. + * + * @private + * @param {string} string The string to create padding for. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the pad for `string`. + */ + function createPadding(string, length, chars) { + var strLength = string.length; + length = +length; + + if (strLength >= length || !nativeIsFinite(length)) { + return ''; + } + var padLength = length - strLength; + chars = chars == null ? ' ' : (chars + ''); + return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength); + } + + /** + * Creates a function that wraps `func` and invokes it with the optional `this` + * binding of `thisArg` and the `partials` prepended to those provided to + * the wrapper. + * + * @private + * @param {Function} func The function to partially apply arguments to. + * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to the new function. + * @returns {Function} Returns the new bound function. + */ + function createPartialWrapper(func, bitmask, thisArg, partials) { + var isBind = bitmask & BIND_FLAG, + Ctor = createCtorWrapper(func); + + function wrapper() { + // Avoid `arguments` object use disqualifying optimizations by + // converting it to an array before providing it `func`. + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength); + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, args); + } + return wrapper; + } + + /** + * Creates a `_.ceil`, `_.floor`, or `_.round` function. + * + * @private + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. + */ + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + precision = precision === undefined ? 0 : (+precision || 0); + if (precision) { + precision = pow(10, precision); + return func(number * precision) / precision; + } + return func(number); + }; + } + + /** + * Creates a `_.sortedIndex` or `_.sortedLastIndex` function. + * + * @private + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {Function} Returns the new index function. + */ + function createSortedIndex(retHighest) { + return function(array, value, iteratee, thisArg) { + var callback = getCallback(iteratee); + return (iteratee == null && callback === baseCallback) + ? binaryIndex(array, value, retHighest) + : binaryIndexBy(array, value, callback(iteratee, thisArg, 1), retHighest); + }; + } + + /** + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. + * + * @private + * @param {Function|string} func The function or method name to reference. + * @param {number} bitmask The bitmask of flags. + * The bitmask may be composed of the following flags: + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. + */ + function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + length -= (holders ? holders.length : 0); + if (bitmask & PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; + + partials = holders = undefined; + } + var data = isBindKey ? undefined : getData(func), + newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; + + if (data) { + mergeData(newData, data); + bitmask = newData[1]; + arity = newData[9]; + } + newData[9] = arity == null + ? (isBindKey ? 0 : func.length) + : (nativeMax(arity - length, 0) || 0); + + if (bitmask == BIND_FLAG) { + var result = createBindWrapper(newData[0], newData[2]); + } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) { + result = createPartialWrapper.apply(undefined, newData); + } else { + result = createHybridWrapper.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setter(result, newData); + } + + /** + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. + * + * @private + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing arrays. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + */ + function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { + var index = -1, + arrLength = array.length, + othLength = other.length; + + if (arrLength != othLength && !(isLoose && othLength > arrLength)) { + return false; + } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index], + result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; + + if (result !== undefined) { + if (result) { + continue; + } + return false; + } + // Recursively compare arrays (susceptible to call stack limits). + if (isLoose) { + if (!arraySome(other, function(othValue) { + return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); + })) { + return false; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { + return false; + } + } + return true; + } + + /** + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. + * + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalByTag(object, other, tag) { + switch (tag) { + case boolTag: + case dateTag: + // Coerce dates and booleans to numbers, dates to milliseconds and booleans + // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. + return +object == +other; + + case errorTag: + return object.name == other.name && object.message == other.message; + + case numberTag: + // Treat `NaN` vs. `NaN` as equal. + return (object != +object) + ? other != +other + : object == +other; + + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings primitives and string + // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. + return object == (other + ''); + } + return false; + } + + /** + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Function} [customizer] The function to customize comparing values. + * @param {boolean} [isLoose] Specify performing partial comparisons. + * @param {Array} [stackA] Tracks traversed `value` objects. + * @param {Array} [stackB] Tracks traversed `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { + var objProps = keys(object), + objLength = objProps.length, + othProps = keys(other), + othLength = othProps.length; + + if (objLength != othLength && !isLoose) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var skipCtor = isLoose; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key], + result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; + + // Recursively compare objects (susceptible to call stack limits). + if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { + return false; + } + skipCtor || (skipCtor = key == 'constructor'); + } + if (!skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + return false; + } + } + return true; + } + + /** + * Gets the appropriate "callback" function. If the `_.callback` method is + * customized this function returns the custom method, otherwise it returns + * the `baseCallback` function. If arguments are provided the chosen function + * is invoked with them and its result is returned. + * + * @private + * @returns {Function} Returns the chosen function or its result. + */ + function getCallback(func, thisArg, argCount) { + var result = lodash.callback || callback; + result = result === callback ? baseCallback : result; + return argCount ? result(func, thisArg, argCount) : result; + } + + /** + * Gets metadata for `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. + */ + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; + + /** + * Gets the name of `func`. + * + * @private + * @param {Function} func The function to query. + * @returns {string} Returns the function name. + */ + function getFuncName(func) { + var result = func.name, + array = realNames[result], + length = array ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; + } + + /** + * Gets the appropriate "indexOf" function. If the `_.indexOf` method is + * customized this function returns the custom method, otherwise it returns + * the `baseIndexOf` function. If arguments are provided the chosen function + * is invoked with them and its result is returned. + * + * @private + * @returns {Function|number} Returns the chosen function or its result. + */ + function getIndexOf(collection, target, fromIndex) { + var result = lodash.indexOf || indexOf; + result = result === indexOf ? baseIndexOf : result; + return collection ? result(collection, target, fromIndex) : result; + } + + /** + * Gets the "length" property value of `object`. + * + * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) + * that affects Safari on at least iOS 8.1-8.3 ARM64. + * + * @private + * @param {Object} object The object to query. + * @returns {*} Returns the "length" value. + */ + var getLength = baseProperty('length'); + + /** + * Gets the propery names, values, and compare flags of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the match data of `object`. + */ + function getMatchData(object) { + var result = pairs(object), + length = result.length; + + while (length--) { + result[length][2] = isStrictComparable(result[length][1]); + } + return result; + } + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = object == null ? undefined : object[key]; + return isNative(value) ? value : undefined; + } + + /** + * Gets the view, applying any `transforms` to the `start` and `end` positions. + * + * @private + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; + + while (++index < length) { + var data = transforms[index], + size = data.size; + + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; + } + } + return { 'start': start, 'end': end }; + } + + /** + * Initializes an array clone. + * + * @private + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. + */ + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); + + // Add array 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) { + var Ctor = object.constructor; + if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { + Ctor = Object; + } + return new Ctor; + } + + /** + * 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 {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. + */ + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return bufferClone(object); + + case boolTag: + case dateTag: + return new Ctor(+object); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + var buffer = object.buffer; + return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + var result = new Ctor(object.source, reFlags.exec(object)); + result.lastIndex = object.lastIndex; + } + return result; + } + + /** + * Invokes the method at `path` on `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function invokePath(object, path, args) { + if (object != null && !isKey(path, object)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + path = last(path); + } + var func = object == null ? object : object[path]; + return func == null ? undefined : func.apply(object, args); + } + + /** + * Checks if `value` is array-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + */ + function isArrayLike(value) { + return value != null && isLength(getLength(value)); + } + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; + length = length == null ? MAX_SAFE_INTEGER : length; + return value > -1 && value % 1 == 0 && value < length; + } + + /** + * Checks if the provided arguments are from an iteratee call. + * + * @private + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. + */ + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; + } + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object)) { + var other = object[index]; + return value === value ? (value === other) : (other !== other); + } + return false; + } + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + var type = typeof value; + if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { + return true; + } + if (isArray(value)) { + return false; + } + var result = !reIsDeepProp.test(value); + return result || (object != null && value in toObject(object)); + } + + /** + * Checks if `func` has a lazy counterpart. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`. + */ + function isLaziable(func) { + var funcName = getFuncName(func); + if (!(funcName in LazyWrapper.prototype)) { + return false; + } + var other = lodash[funcName]; + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; + } + + /** + * Checks if `value` is a valid array-like length. + * + * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + */ + function isLength(value) { + return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + + /** + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. + */ + function isStrictComparable(value) { + return value === value && !isObject(value); + } + + /** + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers required to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg` + * augment function arguments, making the order in which they are executed important, + * preventing the merging of metadata. However, we make an exception for a safe + * common case where curried functions have `_.ary` and or `_.rearg` applied. + * + * @private + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. + */ + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < ARY_FLAG; + + var isCombo = + (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) || + (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) || + (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG); + + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; + } + // Use source `thisArg` if available. + if (srcBitmask & BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value); + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]); + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value); + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]); + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = arrayCopy(value); + } + // Use source `ary` if it's smaller. + if (srcBitmask & ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; + } + + /** + * Used by `_.defaultsDeep` to customize its `_.merge` use. + * + * @private + * @param {*} objectValue The destination object property value. + * @param {*} sourceValue The source object property value. + * @returns {*} Returns the value to assign to the destination object. + */ + function mergeDefaults(objectValue, sourceValue) { + return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults); + } + + /** + * A specialized version of `_.pick` which picks `object` properties specified + * by `props`. + * + * @private + * @param {Object} object The source object. + * @param {string[]} props The property names to pick. + * @returns {Object} Returns the new object. + */ + function pickByArray(object, props) { + object = toObject(object); + + var index = -1, + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index]; + if (key in object) { + result[key] = object[key]; + } + } + return result; + } + + /** + * A specialized version of `_.pick` which picks `object` properties `predicate` + * returns truthy for. + * + * @private + * @param {Object} object The source object. + * @param {Function} predicate The function invoked per iteration. + * @returns {Object} Returns the new object. + */ + function pickByCallback(object, predicate) { + var result = {}; + baseForIn(object, function(value, key, object) { + if (predicate(value, key, object)) { + result[key] = value; + } + }); + return result; + } + + /** + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. + * + * @private + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. + */ + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = arrayCopy(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; + } + return array; + } + + /** + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity function + * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070) + * for more details. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var setData = (function() { + var count = 0, + lastCalled = 0; + + return function(key, value) { + var stamp = now(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return key; + } + } else { + count = 0; + } + return baseSetData(key, value); + }; + }()); + + /** + * A fallback implementation of `Object.keys` which creates an array of the + * own enumerable property names of `object`. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function shimKeys(object) { + var props = keysIn(object), + propsLength = props.length, + length = propsLength && object.length; + + var allowIndexes = !!length && isLength(length) && + (isArray(object) || isArguments(object)); + + var index = -1, + result = []; + + while (++index < propsLength) { + var key = props[index]; + if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { + result.push(key); + } + } + return result; + } + + /** + * Converts `value` to an array-like object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array|Object} Returns the array-like object. + */ + function toIterable(value) { + if (value == null) { + return []; + } + if (!isArrayLike(value)) { + return values(value); + } + return isObject(value) ? value : Object(value); + } + + /** + * Converts `value` to an object if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Object} Returns the object. + */ + function toObject(value) { + return isObject(value) ? value : Object(value); + } + + /** + * Converts `value` to property path array if it's not one. + * + * @private + * @param {*} value The value to process. + * @returns {Array} Returns the property path array. + */ + function toPath(value) { + if (isArray(value)) { + return value; + } + var result = []; + baseToString(value).replace(rePropName, function(match, number, quote, string) { + result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + } + + /** + * Creates a clone of `wrapper`. + * + * @private + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. + */ + function wrapperClone(wrapper) { + return wrapper instanceof LazyWrapper + ? wrapper.clone() + : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements split into groups the length of `size`. + * If `collection` can't be split evenly, the final chunk will be the remaining + * elements. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new array containing chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] + */ + function chunk(array, size, guard) { + if (guard ? isIterateeCall(array, size, guard) : size == null) { + size = 1; + } else { + size = nativeMax(nativeFloor(size) || 1, 1); + } + var index = 0, + length = array ? array.length : 0, + resIndex = -1, + result = Array(nativeCeil(length / size)); + + while (index < length) { + result[++resIndex] = baseSlice(array, index, (index += size)); + } + return result; + } + + /** + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] + */ + function compact(array) { + var index = -1, + length = array ? array.length : 0, + resIndex = -1, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[++resIndex] = value; + } + } + return result; + } + + /** + * Creates an array of unique `array` values not included in the other + * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The arrays of values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.difference([1, 2, 3], [4, 2]); + * // => [1, 3] + */ + var difference = restParam(function(array, values) { + return (isObjectLike(array) && isArrayLike(array)) + ? baseDifference(array, baseFlatten(values, false, true)) + : []; + }); + + /** + * Creates a slice of `array` with `n` elements dropped from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function drop(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements dropped from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] + */ + function dropRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that match the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [1] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active', false), 'user'); + * // => ['barney'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropRightWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function dropRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), true, true) + : []; + } + + /** + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.dropWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [3] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.dropWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.dropWhile(users, 'active', false), 'user'); + * // => ['pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.dropWhile(users, 'active'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function dropWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), true) + : []; + } + + /** + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. + * + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8], '*', 1, 2); + * // => [4, '*', 8] + */ + function fill(array, value, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); + } + + /** + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(chr) { + * return chr.user == 'barney'; + * }); + * // => 0 + * + * // using the `_.matches` callback shorthand + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // using the `_.matchesProperty` callback shorthand + * _.findIndex(users, 'active', false); + * // => 0 + * + * // using the `_.property` callback shorthand + * _.findIndex(users, 'active'); + * // => 2 + */ + var findIndex = createFindIndex(); + + /** + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(chr) { + * return chr.user == 'pebbles'; + * }); + * // => 2 + * + * // using the `_.matches` callback shorthand + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastIndex(users, 'active', false); + * // => 2 + * + * // using the `_.property` callback shorthand + * _.findLastIndex(users, 'active'); + * // => 0 + */ + var findLastIndex = createFindIndex(true); + + /** + * Gets the first element of `array`. + * + * @static + * @memberOf _ + * @alias head + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.first([1, 2, 3]); + * // => 1 + * + * _.first([]); + * // => undefined + */ + function first(array) { + return array ? array[0] : undefined; + } + + /** + * Flattens a nested array. If `isDeep` is `true` the array is recursively + * flattened, otherwise it is only flattened a single level. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to flatten. + * @param {boolean} [isDeep] Specify a deep flatten. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, 3, [4]]]); + * // => [1, 2, 3, [4]] + * + * // using `isDeep` + * _.flatten([1, [2, 3, [4]]], true); + * // => [1, 2, 3, 4] + */ + function flatten(array, isDeep, guard) { + var length = array ? array.length : 0; + if (guard && isIterateeCall(array, isDeep, guard)) { + isDeep = false; + } + return length ? baseFlatten(array, isDeep) : []; + } + + /** + * Recursively flattens a nested array. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to recursively flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, 3, [4]]]); + * // => [1, 2, 3, 4] + */ + function flattenDeep(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array, true) : []; + } + + /** + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it is used as the offset + * from the end of `array`. If `array` is sorted providing `true` for `fromIndex` + * performs a faster binary search. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=0] The index to search from or `true` + * to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // using `fromIndex` + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 + * + * // performing a binary search + * _.indexOf([1, 1, 2, 2], 2, true); + * // => 2 + */ + function indexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + if (typeof fromIndex == 'number') { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex; + } else if (fromIndex) { + var index = binaryIndex(array, value); + if (index < length && + (value === value ? (value === array[index]) : (array[index] !== array[index]))) { + return index; + } + return -1; + } + return baseIndexOf(array, value, fromIndex || 0); + } + + /** + * Gets all but the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] + */ + function initial(array) { + return dropRight(array, 1); + } + + /** + * Creates an array of unique values that are included in all of the provided + * arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of shared values. + * @example + * _.intersection([1, 2], [4, 2], [2, 1]); + * // => [2] + */ + var intersection = restParam(function(arrays) { + var othLength = arrays.length, + othIndex = othLength, + caches = Array(length), + indexOf = getIndexOf(), + isCommon = indexOf == baseIndexOf, + result = []; + + while (othIndex--) { + var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : []; + caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null; + } + var array = arrays[0], + index = -1, + length = array ? array.length : 0, + seen = caches[0]; + + outer: + while (++index < length) { + value = array[index]; + if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) { + var othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) { + continue outer; + } + } + if (seen) { + seen.push(value); + } + result.push(value); + } + } + return result; + }); + + /** + * Gets the last element of `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 + */ + function last(array) { + var length = array ? array.length : 0; + return length ? array[length - 1] : undefined; + } + + /** + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to search. + * @param {*} value The value to search for. + * @param {boolean|number} [fromIndex=array.length-1] The index to search from + * or `true` to perform a binary search on a sorted array. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // using `fromIndex` + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 + * + * // performing a binary search + * _.lastIndexOf([1, 1, 2, 2], 2, true); + * // => 3 + */ + function lastIndexOf(array, value, fromIndex) { + var length = array ? array.length : 0; + if (!length) { + return -1; + } + var index = length; + if (typeof fromIndex == 'number') { + index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1; + } else if (fromIndex) { + index = binaryIndex(array, value, true) - 1; + var other = array[index]; + if (value === value ? (value === other) : (other !== other)) { + return index; + } + return -1; + } + if (value !== value) { + return indexOfNaN(array, index, true); + } + while (index--) { + if (array[index] === value) { + return index; + } + } + return -1; + } + + /** + * Removes all provided values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * **Note:** Unlike `_.without`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3, 1, 2, 3]; + * + * _.pull(array, 2, 3); + * console.log(array); + * // => [1, 1] + */ + function pull() { + var args = arguments, + array = args[0]; + + if (!(array && array.length)) { + return array; + } + var index = 0, + indexOf = getIndexOf(), + length = args.length; + + while (++index < length) { + var fromIndex = 0, + value = args[index]; + + while ((fromIndex = indexOf(array, value, fromIndex)) > -1) { + splice.call(array, fromIndex, 1); + } + } + return array; + } + + /** + * Removes elements from `array` corresponding to the given indexes and returns + * an array of the removed elements. Indexes may be specified as an array of + * indexes or as individual arguments. + * + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove, + * specified as individual indexes or arrays of indexes. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [5, 10, 15, 20]; + * var evens = _.pullAt(array, 1, 3); + * + * console.log(array); + * // => [5, 15] + * + * console.log(evens); + * // => [10, 20] + */ + var pullAt = restParam(function(array, indexes) { + indexes = baseFlatten(indexes); + + var result = baseAt(array, indexes); + basePullAt(array, indexes.sort(baseCompareAscending)); + return result; + }); + + /** + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * **Note:** Unlike `_.filter`, this method mutates `array`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to modify. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] + */ + function remove(array, predicate, thisArg) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getCallback(predicate, thisArg, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); + } + } + basePullAt(array, indexes); + return result; + } + + /** + * Gets all but the first element of `array`. + * + * @static + * @memberOf _ + * @alias tail + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.rest([1, 2, 3]); + * // => [2, 3] + */ + function rest(array) { + return drop(array, 1); + } + + /** + * Creates a slice of `array` from `start` up to, but not including, `end`. + * + * **Note:** This method is used instead of `Array#slice` to support node + * lists in IE < 9 and to ensure dense arrays are returned. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. + */ + function slice(array, start, end) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; + } + return baseSlice(array, start, end); + } + + /** + * Uses a binary search to determine the lowest index at which `value` should + * be inserted into `array` in order to maintain its sort order. If an iteratee + * function is provided it is invoked for `value` and each element of `array` + * to compute their sort ranking. The iteratee is bound to `thisArg` and + * invoked with one argument; (value). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 + * + * _.sortedIndex([4, 4, 5, 5], 5); + * // => 2 + * + * var dict = { 'data': { 'thirty': 30, 'forty': 40, 'fifty': 50 } }; + * + * // using an iteratee function + * _.sortedIndex(['thirty', 'fifty'], 'forty', function(word) { + * return this.data[word]; + * }, dict); + * // => 1 + * + * // using the `_.property` callback shorthand + * _.sortedIndex([{ 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); + * // => 1 + */ + var sortedIndex = createSortedIndex(); + + /** + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 4, 5, 5], 5); + * // => 4 + */ + var sortedLastIndex = createSortedIndex(true); + + /** + * Creates a slice of `array` with `n` elements taken from the beginning. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] + */ + function take(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + return baseSlice(array, 0, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with `n` elements taken from the end. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] + */ + function takeRight(array, n, guard) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (guard ? isIterateeCall(array, n, guard) : n == null) { + n = 1; + } + n = length - (+n || 0); + return baseSlice(array, n < 0 ? 0 : n); + } + + /** + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is bound to `thisArg` + * and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRightWhile([1, 2, 3], function(n) { + * return n > 1; + * }); + * // => [2, 3] + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeRightWhile(users, { 'user': 'pebbles', 'active': false }), 'user'); + * // => ['pebbles'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active', false), 'user'); + * // => ['fred', 'pebbles'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeRightWhile(users, 'active'), 'user'); + * // => [] + */ + function takeRightWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3), false, true) + : []; + } + + /** + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is bound to + * `thisArg` and invoked with three arguments: (value, index, array). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to query. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeWhile([1, 2, 3], function(n) { + * return n < 3; + * }); + * // => [1, 2] + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false}, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.takeWhile(users, { 'user': 'barney', 'active': false }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.takeWhile(users, 'active', false), 'user'); + * // => ['barney', 'fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.takeWhile(users, 'active'), 'user'); + * // => [] + */ + function takeWhile(array, predicate, thisArg) { + return (array && array.length) + ? baseWhile(array, getCallback(predicate, thisArg, 3)) + : []; + } + + /** + * Creates an array of unique values, in order, from all of the provided arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([1, 2], [4, 2], [2, 1]); + * // => [1, 2, 4] + */ + var union = restParam(function(arrays) { + return baseUniq(baseFlatten(arrays, false, true)); + }); + + /** + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurence of each element + * is kept. Providing `true` for `isSorted` performs a faster search algorithm + * for sorted arrays. If an iteratee function is provided it is invoked for + * each element in the array to generate the criterion by which uniqueness + * is computed. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index, array). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias unique + * @category Array + * @param {Array} array The array to inspect. + * @param {boolean} [isSorted] Specify the array is sorted. + * @param {Function|Object|string} [iteratee] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new duplicate-value-free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] + * + * // using `isSorted` + * _.uniq([1, 1, 2], true); + * // => [1, 2] + * + * // using an iteratee function + * _.uniq([1, 2.5, 1.5, 2], function(n) { + * return this.floor(n); + * }, Math); + * // => [1, 2.5] + * + * // using the `_.property` callback shorthand + * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] + */ + function uniq(array, isSorted, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + if (isSorted != null && typeof isSorted != 'boolean') { + thisArg = iteratee; + iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted; + isSorted = false; + } + var callback = getCallback(); + if (!(iteratee == null && callback === baseCallback)) { + iteratee = callback(iteratee, thisArg, 3); + } + return (isSorted && getIndexOf() == baseIndexOf) + ? sortedUniq(array, iteratee) + : baseUniq(array, iteratee); + } + + /** + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + * + * _.unzip(zipped); + * // => [['fred', 'barney'], [30, 40], [true, false]] + */ + function unzip(array) { + if (!(array && array.length)) { + return []; + } + var index = -1, + length = 0; + + array = arrayFilter(array, function(group) { + if (isArrayLike(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + var result = Array(length); + while (++index < length) { + result[index] = arrayMap(array, baseProperty(index)); + } + return result; + } + + /** + * This method is like `_.unzip` except that it accepts an iteratee to specify + * how regrouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee] The function to combine regrouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] + */ + function unzipWith(array, iteratee, thisArg) { + var length = array ? array.length : 0; + if (!length) { + return []; + } + var result = unzip(array); + if (iteratee == null) { + return result; + } + iteratee = bindCallback(iteratee, thisArg, 4); + return arrayMap(result, function(group) { + return arrayReduce(group, iteratee, undefined, true); + }); + } + + /** + * Creates an array excluding all provided values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to filter. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.without([1, 2, 1, 3], 1, 2); + * // => [3] + */ + var without = restParam(function(array, values) { + return isArrayLike(array) + ? baseDifference(array, values) + : []; + }); + + /** + * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the provided arrays. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of values. + * @example + * + * _.xor([1, 2], [4, 2]); + * // => [1, 4] + */ + function xor() { + var index = -1, + length = arguments.length; + + while (++index < length) { + var array = arguments[index]; + if (isArrayLike(array)) { + var result = result + ? arrayPush(baseDifference(result, array), baseDifference(array, result)) + : array; + } + } + return result ? baseUniq(result) : []; + } + + /** + * Creates an array of grouped elements, the first of which contains the first + * elements of the given arrays, the second of which contains the second elements + * of the given arrays, and so on. + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['fred', 'barney'], [30, 40], [true, false]); + * // => [['fred', 30, true], ['barney', 40, false]] + */ + var zip = restParam(unzip); + + /** + * The inverse of `_.pairs`; this method returns an object composed from arrays + * of property names and values. Provide either a single two dimensional array, + * e.g. `[[key1, value1], [key2, value2]]` or two arrays, one of property names + * and one of corresponding values. + * + * @static + * @memberOf _ + * @alias object + * @category Array + * @param {Array} props The property names. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject([['fred', 30], ['barney', 40]]); + * // => { 'fred': 30, 'barney': 40 } + * + * _.zipObject(['fred', 'barney'], [30, 40]); + * // => { 'fred': 30, 'barney': 40 } + */ + function zipObject(props, values) { + var index = -1, + length = props ? props.length : 0, + result = {}; + + if (length && !values && !isArray(props[0])) { + values = []; + } + while (++index < length) { + var key = props[index]; + if (values) { + result[key] = values[index]; + } else if (key) { + result[key[0]] = key[1]; + } + } + return result; + } + + /** + * This method is like `_.zip` except that it accepts an iteratee to specify + * how grouped values should be combined. The `iteratee` is bound to `thisArg` + * and invoked with four arguments: (accumulator, value, index, group). + * + * @static + * @memberOf _ + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee] The function to combine grouped values. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zipWith([1, 2], [10, 20], [100, 200], _.add); + * // => [111, 222] + */ + var zipWith = restParam(function(arrays) { + var length = arrays.length, + iteratee = length > 2 ? arrays[length - 2] : undefined, + thisArg = length > 1 ? arrays[length - 1] : undefined; + + if (length > 2 && typeof iteratee == 'function') { + length -= 2; + } else { + iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined; + thisArg = undefined; + } + arrays.length = length; + return unzipWith(arrays, iteratee, thisArg); + }); + + /*------------------------------------------------------------------------*/ + + /** + * Creates a `lodash` object that wraps `value` with explicit method + * chaining enabled. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; + * + * var youngest = _.chain(users) + * .sortBy('age') + * .map(function(chr) { + * return chr.user + ' is ' + chr.age; + * }) + * .first() + * .value(); + * // => 'pebbles is 1' + */ + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; + } + + /** + * This method invokes `interceptor` and returns `value`. The interceptor is + * bound to `thisArg` and invoked with one argument; (value). The purpose of + * this method is to "tap into" a method chain in order to perform operations + * on intermediate results within the chain. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns `value`. + * @example + * + * _([1, 2, 3]) + * .tap(function(array) { + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] + */ + function tap(value, interceptor, thisArg) { + interceptor.call(thisArg, value); + return value; + } + + /** + * This method is like `_.tap` except that it returns the result of `interceptor`. + * + * @static + * @memberOf _ + * @category Chain + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @param {*} [thisArg] The `this` binding of `interceptor`. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] + */ + function thru(value, interceptor, thisArg) { + return interceptor.call(thisArg, value); + } + + /** + * Enables explicit method chaining on the wrapper object. + * + * @name chain + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * // without explicit chaining + * _(users).first(); + * // => { 'user': 'barney', 'age': 36 } + * + * // with explicit chaining + * _(users).chain() + * .first() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } + */ + function wrapperChain() { + return chain(this); + } + + /** + * Executes the chained sequence and returns the wrapped result. + * + * @name commit + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).push(3); + * + * console.log(array); + * // => [1, 2] + * + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] + * + * wrapped.last(); + * // => 3 + * + * console.log(array); + * // => [1, 2, 3] + */ + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); + } + + /** + * Creates a new array joining a wrapped array with any additional arrays + * and/or values. + * + * @name concat + * @memberOf _ + * @category Chain + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var wrapped = _(array).concat(2, [3], [[4]]); + * + * console.log(wrapped.value()); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] + */ + var wrapperConcat = restParam(function(values) { + values = baseFlatten(values); + return this.thru(function(array) { + return arrayConcat(isArray(array) ? array : [toObject(array)], values); + }); + }); + + /** + * Creates a clone of the chained sequence planting `value` as the wrapped value. + * + * @name plant + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var array = [1, 2]; + * var wrapped = _(array).map(function(value) { + * return Math.pow(value, 2); + * }); + * + * var other = [3, 4]; + * var otherWrapped = wrapped.plant(other); + * + * otherWrapped.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] + */ + function wrapperPlant(value) { + var result, + parent = this; + + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + if (result) { + previous.__wrapped__ = clone; + } else { + result = clone; + } + var previous = clone; + parent = parent.__wrapped__; + } + previous.__wrapped__ = value; + return result; + } + + /** + * Reverses the wrapped array so the first element becomes the last, the + * second element becomes the second to last, and so on. + * + * **Note:** This method mutates the wrapped array. + * + * @name reverse + * @memberOf _ + * @category Chain + * @returns {Object} Returns the new reversed `lodash` wrapper instance. + * @example + * + * var array = [1, 2, 3]; + * + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] + */ + function wrapperReverse() { + var value = this.__wrapped__; + + var interceptor = function(value) { + return (wrapped && wrapped.__dir__ < 0) ? value : value.reverse(); + }; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); + } + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(interceptor); + } + + /** + * Produces the result of coercing the unwrapped value to a string. + * + * @name toString + * @memberOf _ + * @category Chain + * @returns {string} Returns the coerced string value. + * @example + * + * _([1, 2, 3]).toString(); + * // => '1,2,3' + */ + function wrapperToString() { + return (this.value() + ''); + } + + /** + * Executes the chained sequence to extract the unwrapped value. + * + * @name value + * @memberOf _ + * @alias run, toJSON, valueOf + * @category Chain + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] + */ + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates an array of elements corresponding to the given keys, or indexes, + * of `collection`. Keys may be specified as individual arguments or as arrays + * of keys. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(number|number[]|string|string[])} [props] The property names + * or indexes of elements to pick, specified individually or in arrays. + * @returns {Array} Returns the new array of picked elements. + * @example + * + * _.at(['a', 'b', 'c'], [0, 2]); + * // => ['a', 'c'] + * + * _.at(['barney', 'fred', 'pebbles'], 0, 2); + * // => ['barney', 'pebbles'] + */ + var at = restParam(function(collection, props) { + return baseAt(collection, baseFlatten(props)); + }); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the number of times the key was returned by `iteratee`. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': 1, '6': 2 } + * + * _.countBy([4.3, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': 1, '6': 2 } + * + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } + */ + var countBy = createAggregator(function(result, value, key) { + hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1); + }); + + /** + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * The predicate is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias all + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + * @example + * + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.every(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.every(users, 'active'); + * // => false + */ + function every(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = getCallback(predicate, thisArg, 3); + } + return func(collection, predicate); + } + + /** + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias select + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.filter([4, 5, 6], function(n) { + * return n % 2 == 0; + * }); + * // => [4, 6] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.filter(users, { 'age': 36, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.filter(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.filter(users, 'active'), 'user'); + * // => ['barney'] + */ + function filter(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = getCallback(predicate, thisArg, 3); + return func(collection, predicate); + } + + /** + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is bound to `thisArg` and + * invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias detect + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; + * + * _.result(_.find(users, function(chr) { + * return chr.age < 40; + * }), 'user'); + * // => 'barney' + * + * // using the `_.matches` callback shorthand + * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.result(_.find(users, 'active', false), 'user'); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.result(_.find(users, 'active'), 'user'); + * // => 'barney' + */ + var find = createFind(baseEach); + + /** + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 + */ + var findLast = createFind(baseEachRight, true); + + /** + * Performs a deep comparison between each element in `collection` and the + * source object, returning the first element that has equivalent property + * values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {*} Returns the matched element, else `undefined`. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * _.result(_.findWhere(users, { 'age': 36, 'active': true }), 'user'); + * // => 'barney' + * + * _.result(_.findWhere(users, { 'age': 40, 'active': false }), 'user'); + * // => 'fred' + */ + function findWhere(collection, source) { + return find(collection, baseMatches(source)); + } + + /** + * Iterates over elements of `collection` invoking `iteratee` for each element. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). Iteratee functions may exit iteration early + * by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" property + * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` + * may be used for object iteration. + * + * @static + * @memberOf _ + * @alias each + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEach(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from left to right and returns the array + * + * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { + * console.log(n, key); + * }); + * // => logs each value-key pair and returns the object (iteration order is not guaranteed) + */ + var forEach = createForEach(arrayEach, baseEach); + + /** + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias eachRight + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array|Object|string} Returns `collection`. + * @example + * + * _([1, 2]).forEachRight(function(n) { + * console.log(n); + * }).value(); + * // => logs each value from right to left and returns the array + */ + var forEachRight = createForEach(arrayEachRight, baseEachRight); + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is an array of the elements responsible for generating the key. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return Math.floor(n); + * }); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * _.groupBy([4.2, 6.1, 6.4], function(n) { + * return this.floor(n); + * }, Math); + * // => { '4': [4.2], '6': [6.1, 6.4] } + * + * // using the `_.property` callback shorthand + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } + */ + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + result[key] = [value]; + } + }); + + /** + * Checks if `value` is in `collection` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it is used as the offset + * from the end of `collection`. + * + * @static + * @memberOf _ + * @alias contains, include + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {*} target The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {boolean} Returns `true` if a matching element is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); + * // => true + * + * _.includes('pebbles', 'eb'); + * // => true + */ + function includes(collection, target, fromIndex, guard) { + var length = collection ? getLength(collection) : 0; + if (!isLength(length)) { + collection = values(collection); + length = collection.length; + } + if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { + fromIndex = 0; + } else { + fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); + } + return (typeof collection == 'string' || !isArray(collection) && isString(collection)) + ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) + : (!!length && getIndexOf(collection, target, fromIndex) > -1); + } + + /** + * Creates an object composed of keys generated from the results of running + * each element of `collection` through `iteratee`. The corresponding value + * of each key is the last element responsible for generating the key. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the composed aggregate object. + * @example + * + * var keyData = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.indexBy(keyData, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return String.fromCharCode(object.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.indexBy(keyData, function(object) { + * return this.fromCharCode(object.code); + * }, String); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + */ + var indexBy = createAggregator(function(result, value, key) { + result[key] = value; + }); + + /** + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `methodName` is a function it is + * invoked for, and `this` bound to, each element in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Array} Returns the array of results. + * @example + * + * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invoke([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] + */ + var invoke = restParam(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + isProp = isKey(path), + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); + result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); + }); + return result; + }); + + /** + * Creates an array of values by running each element in `collection` through + * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three + * arguments: (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, + * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`, + * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`, + * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`, + * `sum`, `uniq`, and `words` + * + * @static + * @memberOf _ + * @alias collect + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new mapped array. + * @example + * + * function timesThree(n) { + * return n * 3; + * } + * + * _.map([1, 2], timesThree); + * // => [3, 6] + * + * _.map({ 'a': 1, 'b': 2 }, timesThree); + * // => [3, 6] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // using the `_.property` callback shorthand + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ + function map(collection, iteratee, thisArg) { + var func = isArray(collection) ? arrayMap : baseMap; + iteratee = getCallback(iteratee, thisArg, 3); + return func(collection, iteratee); + } + + /** + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, while the second of which + * contains elements `predicate` returns falsey for. The predicate is bound + * to `thisArg` and invoked with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the array of grouped elements. + * @example + * + * _.partition([1, 2, 3], function(n) { + * return n % 2; + * }); + * // => [[1, 3], [2]] + * + * _.partition([1.2, 2.3, 3.4], function(n) { + * return this.floor(n) % 2; + * }, Math); + * // => [[1.2, 3.4], [2.3]] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; + * + * var mapper = function(array) { + * return _.pluck(array, 'user'); + * }; + * + * // using the `_.matches` callback shorthand + * _.map(_.partition(users, { 'age': 1, 'active': false }), mapper); + * // => [['pebbles'], ['barney', 'fred']] + * + * // using the `_.matchesProperty` callback shorthand + * _.map(_.partition(users, 'active', false), mapper); + * // => [['barney', 'pebbles'], ['fred']] + * + * // using the `_.property` callback shorthand + * _.map(_.partition(users, 'active'), mapper); + * // => [['fred'], ['barney', 'pebbles']] + */ + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); + + /** + * Gets the property value of `path` from all elements in `collection`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Array|string} path The path of the property to pluck. + * @returns {Array} Returns the property values. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; + * + * _.pluck(users, 'user'); + * // => ['barney', 'fred'] + * + * var userIndex = _.indexBy(users, 'user'); + * _.pluck(userIndex, 'age'); + * // => [36, 40] (iteration order is not guaranteed) + */ + function pluck(collection, path) { + return map(collection, property(path)); + } + + /** + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` through `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not provided the first element of `collection` is used as the initial + * value. The `iteratee` is bound to `thisArg` and invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `sortByAll`, + * and `sortByOrder` + * + * @static + * @memberOf _ + * @alias foldl, inject + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.reduce([1, 2], function(total, n) { + * return total + n; + * }); + * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * return result; + * }, {}); + * // => { 'a': 3, 'b': 6 } (iteration order is not guaranteed) + */ + var reduce = createReduce(arrayReduce, baseEach); + + /** + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. + * + * @static + * @memberOf _ + * @alias foldr + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] + */ + var reduceRight = createReduce(arrayReduceRight, baseEachRight); + + /** + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Array} Returns the new filtered array. + * @example + * + * _.reject([1, 2, 3, 4], function(n) { + * return n % 2 == 0; + * }); + * // => [1, 3] + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; + * + * // using the `_.matches` callback shorthand + * _.pluck(_.reject(users, { 'age': 40, 'active': true }), 'user'); + * // => ['barney'] + * + * // using the `_.matchesProperty` callback shorthand + * _.pluck(_.reject(users, 'active', false), 'user'); + * // => ['fred'] + * + * // using the `_.property` callback shorthand + * _.pluck(_.reject(users, 'active'), 'user'); + * // => ['barney'] + */ + function reject(collection, predicate, thisArg) { + var func = isArray(collection) ? arrayFilter : baseFilter; + predicate = getCallback(predicate, thisArg, 3); + return func(collection, function(value, index, collection) { + return !predicate(value, index, collection); + }); + } + + /** + * Gets a random element or `n` random elements from a collection. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to sample. + * @param {number} [n] The number of elements to sample. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {*} Returns the random sample(s). + * @example + * + * _.sample([1, 2, 3, 4]); + * // => 2 + * + * _.sample([1, 2, 3, 4], 2); + * // => [3, 1] + */ + function sample(collection, n, guard) { + if (guard ? isIterateeCall(collection, n, guard) : n == null) { + collection = toIterable(collection); + var length = collection.length; + return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; + } + var index = -1, + result = toArray(collection), + length = result.length, + lastIndex = length - 1; + + n = nativeMin(n < 0 ? 0 : (+n || 0), length); + while (++index < n) { + var rand = baseRandom(index, lastIndex), + value = result[rand]; + + result[rand] = result[index]; + result[index] = value; + } + result.length = n; + return result; + } + + /** + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + * @example + * + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] + */ + function shuffle(collection) { + return sample(collection, POSITIVE_INFINITY); + } + + /** + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable properties for objects. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the size of `collection`. + * @example + * + * _.size([1, 2, 3]); + * // => 3 + * + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 + */ + function size(collection) { + var length = collection ? getLength(collection) : 0; + return isLength(length) ? length : keys(collection).length; + } + + /** + * Checks if `predicate` returns truthy for **any** element of `collection`. + * The function returns as soon as it finds a passing value and does not iterate + * over the entire collection. The predicate is bound to `thisArg` and invoked + * with three arguments: (value, index|key, collection). + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @alias any + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example + * + * _.some([null, 0, 'yes', false], Boolean); + * // => true + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; + * + * // using the `_.matches` callback shorthand + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // using the `_.matchesProperty` callback shorthand + * _.some(users, 'active', false); + * // => true + * + * // using the `_.property` callback shorthand + * _.some(users, 'active'); + * // => true + */ + function some(collection, predicate, thisArg) { + var func = isArray(collection) ? arraySome : baseSome; + if (thisArg && isIterateeCall(collection, predicate, thisArg)) { + predicate = undefined; + } + if (typeof predicate != 'function' || thisArg !== undefined) { + predicate = getCallback(predicate, thisArg, 3); + } + return func(collection, predicate); + } + + /** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection through `iteratee`. This method performs + * a stable sort, that is, it preserves the original sort order of equal elements. + * The `iteratee` is bound to `thisArg` and invoked with three arguments: + * (value, index|key, collection). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Array} Returns the new sorted array. + * @example + * + * _.sortBy([1, 2, 3], function(n) { + * return Math.sin(n); + * }); + * // => [3, 1, 2] + * + * _.sortBy([1, 2, 3], function(n) { + * return this.sin(n); + * }, Math); + * // => [3, 1, 2] + * + * var users = [ + * { 'user': 'fred' }, + * { 'user': 'pebbles' }, + * { 'user': 'barney' } + * ]; + * + * // using the `_.property` callback shorthand + * _.pluck(_.sortBy(users, 'user'), 'user'); + * // => ['barney', 'fred', 'pebbles'] + */ + function sortBy(collection, iteratee, thisArg) { + if (collection == null) { + return []; + } + if (thisArg && isIterateeCall(collection, iteratee, thisArg)) { + iteratee = undefined; + } + var index = -1; + iteratee = getCallback(iteratee, thisArg, 3); + + var result = baseMap(collection, function(value, key, collection) { + return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value }; + }); + return baseSortBy(result, compareAscending); + } + + /** + * This method is like `_.sortBy` except that it can sort by multiple iteratees + * or property names. + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {...(Function|Function[]|Object|Object[]|string|string[])} iteratees + * The iteratees to sort by, specified as individual values or arrays of values. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.map(_.sortByAll(users, ['user', 'age']), _.values); + * // => [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]] + * + * _.map(_.sortByAll(users, 'user', function(chr) { + * return Math.floor(chr.age / 10); + * }), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + var sortByAll = restParam(function(collection, iteratees) { + if (collection == null) { + return []; + } + var guard = iteratees[2]; + if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) { + iteratees.length = 1; + } + return baseSortByOrder(collection, baseFlatten(iteratees), []); + }); + + /** + * This method is like `_.sortByAll` except that it allows specifying the + * sort orders of the iteratees to sort by. If `orders` is unspecified, all + * values are sorted in ascending order. Otherwise, a value is sorted in + * ascending order if its corresponding order is "asc", and descending if "desc". + * + * If a property name is provided for an iteratee the created `_.property` + * style callback returns the property value of the given element. + * + * If an object is provided for an iteratee the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {boolean[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 42 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // sort by `user` in ascending order and by `age` in descending order + * _.map(_.sortByOrder(users, ['user', 'age'], ['asc', 'desc']), _.values); + * // => [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]] + */ + function sortByOrder(collection, iteratees, orders, guard) { + if (collection == null) { + return []; + } + if (guard && isIterateeCall(iteratees, orders, guard)) { + orders = undefined; + } + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseSortByOrder(collection, iteratees, orders); + } + + /** + * Performs a deep comparison between each element in `collection` and the + * source object, returning an array of all elements that have equivalent + * property values. + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. For comparing a single + * own or inherited property value see `_.matchesProperty`. + * + * @static + * @memberOf _ + * @category Collection + * @param {Array|Object|string} collection The collection to search. + * @param {Object} source The object of property values to match. + * @returns {Array} Returns the new filtered array. + * @example + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false, 'pets': ['hoppy'] }, + * { 'user': 'fred', 'age': 40, 'active': true, 'pets': ['baby puss', 'dino'] } + * ]; + * + * _.pluck(_.where(users, { 'age': 36, 'active': false }), 'user'); + * // => ['barney'] + * + * _.pluck(_.where(users, { 'pets': ['dino'] }), 'user'); + * // => ['fred'] + */ + function where(collection, source) { + return filter(collection, baseMatches(source)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Gets the number of milliseconds that have elapsed since the Unix epoch + * (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @category Date + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => logs the number of milliseconds it took for the deferred function to be invoked + */ + var now = nativeNow || function() { + return new Date().getTime(); + }; + + /*------------------------------------------------------------------------*/ + + /** + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it is called `n` or more times. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var saves = ['profile', 'settings']; + * + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => logs 'done saving!' after the two async saves have completed + */ + function after(n, func) { + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + n = nativeIsFinite(n = +n) ? n : 0; + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; + } + + /** + * Creates a function that accepts up to `n` arguments ignoring any + * additional arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new function. + * @example + * + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] + */ + function ary(func, n, guard) { + if (guard && isIterateeCall(func, n, guard)) { + n = undefined; + } + n = (func && n == null) ? func.length : nativeMax(+n || 0, 0); + return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n); + } + + /** + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it is called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. + * + * @static + * @memberOf _ + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * jQuery('#add').on('click', _.before(5, addContactToList)); + * // => allows adding up to 4 contacts to the list + */ + function before(n, func) { + var result; + if (typeof func != 'function') { + if (typeof n == 'function') { + var temp = n; + n = func; + func = temp; + } else { + throw new TypeError(FUNC_ERROR_TEXT); + } + } + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and prepends any additional `_.bind` arguments to those provided to the + * bound function. + * + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind` this method does not set the "length" + * property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var greet = function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * }; + * + * var object = { 'user': 'fred' }; + * + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // using placeholders + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' + */ + var bind = restParam(function(func, thisArg, partials) { + var bitmask = BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bind.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(func, bitmask, thisArg, partials, holders); + }); + + /** + * Binds methods of an object to the object itself, overwriting the existing + * method. Method names may be specified as individual arguments or as arrays + * of method names. If no method names are provided all enumerable function + * properties, own and inherited, of `object` are bound. + * + * **Note:** This method does not set the "length" property of bound functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} [methodNames] The object method names to bind, + * specified as individual method names or arrays of method names. + * @returns {Object} Returns `object`. + * @example + * + * var view = { + * 'label': 'docs', + * 'onClick': function() { + * console.log('clicked ' + this.label); + * } + * }; + * + * _.bindAll(view); + * jQuery('#docs').on('click', view.onClick); + * // => logs 'clicked docs' when the element is clicked + */ + var bindAll = restParam(function(object, methodNames) { + methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object); + + var index = -1, + length = methodNames.length; + + while (++index < length) { + var key = methodNames[index]; + object[key] = createWrapper(object[key], BIND_FLAG, object); + } + return object; + }); + + /** + * Creates a function that invokes the method at `object[key]` and prepends + * any additional `_.bindKey` arguments to those provided to the bound function. + * + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. + * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * @static + * @memberOf _ + * @category Function + * @param {Object} object The object the method belongs to. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. + * @example + * + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; + * + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; + * + * bound('!'); + * // => 'hiya fred!' + * + * // using placeholders + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' + */ + var bindKey = restParam(function(object, key, partials) { + var bitmask = BIND_FLAG | BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, bindKey.placeholder); + bitmask |= PARTIAL_FLAG; + } + return createWrapper(key, bitmask, object, partials, holders); + }); + + /** + * Creates a function that accepts one or more arguments of `func` that when + * called either invokes `func` returning its result, if all `func` arguments + * have been provided, or returns a function that accepts one or more of the + * remaining `func` arguments, and so on. The arity of `func` may be specified + * if `func.length` is not sufficient. + * + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curry(abc); + * + * curried(1)(2)(3); + * // => [1, 2, 3] + * + * curried(1, 2)(3); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(1)(_, 3)(2); + * // => [1, 2, 3] + */ + var curry = createCurry(CURRY_FLAG); + + /** + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method does not set the "length" property of curried functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Function} Returns the new curried function. + * @example + * + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; + * + * var curried = _.curryRight(abc); + * + * curried(3)(2)(1); + * // => [1, 2, 3] + * + * curried(2, 3)(1); + * // => [1, 2, 3] + * + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // using placeholders + * curried(3)(1, _)(2); + * // => [1, 2, 3] + */ + var curryRight = createCurry(CURRY_RIGHT_FLAG); + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed invocations. Provide an options object to indicate that `func` + * should be invoked on the leading and/or trailing edge of the `wait` timeout. + * Subsequent calls to the debounced function return the result of the last + * `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the debounced function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=false] Specify invoking on the leading + * edge of the timeout. + * @param {number} [options.maxWait] The maximum time `func` is allowed to be + * delayed before it is invoked. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // avoid costly calculations while the window size is in flux + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // invoke `sendMail` when the click event is fired, debouncing subsequent calls + * jQuery('#postbox').on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // ensure `batchLog` is invoked once after 1 second of debounced calls + * var source = new EventSource('/stream'); + * jQuery(source).on('message', _.debounce(batchLog, 250, { + * 'maxWait': 1000 + * })); + * + * // cancel a debounced call + * var todoChanges = _.debounce(batchLog, 1000); + * Object.observe(models.todo, todoChanges); + * + * Object.observe(models, function(changes) { + * if (_.find(changes, { 'user': 'todo', 'type': 'delete'})) { + * todoChanges.cancel(); + * } + * }, ['delete']); + * + * // ...at some point `models.todo` is changed + * models.todo.completed = true; + * + * // ...before 1 second has passed `models.todo` is deleted + * // which cancels the debounced `todoChanges` call + * delete models.todo; + */ + function debounce(func, wait, options) { + var args, + maxTimeoutId, + result, + stamp, + thisArg, + timeoutId, + trailingCall, + lastCalled = 0, + maxWait = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = wait < 0 ? 0 : (+wait || 0); + if (options === true) { + var leading = true; + trailing = false; + } else if (isObject(options)) { + leading = !!options.leading; + maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait); + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function cancel() { + if (timeoutId) { + clearTimeout(timeoutId); + } + if (maxTimeoutId) { + clearTimeout(maxTimeoutId); + } + lastCalled = 0; + maxTimeoutId = timeoutId = trailingCall = undefined; + } + + function complete(isCalled, id) { + if (id) { + clearTimeout(id); + } + maxTimeoutId = timeoutId = trailingCall = undefined; + if (isCalled) { + lastCalled = now(); + result = func.apply(thisArg, args); + if (!timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + } + } + + function delayed() { + var remaining = wait - (now() - stamp); + if (remaining <= 0 || remaining > wait) { + complete(trailingCall, maxTimeoutId); + } else { + timeoutId = setTimeout(delayed, remaining); + } + } + + function maxDelayed() { + complete(trailing, timeoutId); + } + + function debounced() { + args = arguments; + stamp = now(); + thisArg = this; + trailingCall = trailing && (timeoutId || !leading); + + if (maxWait === false) { + var leadingCall = leading && !timeoutId; + } else { + if (!maxTimeoutId && !leading) { + lastCalled = stamp; + } + var remaining = maxWait - (stamp - lastCalled), + isCalled = remaining <= 0 || remaining > maxWait; + + if (isCalled) { + if (maxTimeoutId) { + maxTimeoutId = clearTimeout(maxTimeoutId); + } + lastCalled = stamp; + result = func.apply(thisArg, args); + } + else if (!maxTimeoutId) { + maxTimeoutId = setTimeout(maxDelayed, remaining); + } + } + if (isCalled && timeoutId) { + timeoutId = clearTimeout(timeoutId); + } + else if (!timeoutId && wait !== maxWait) { + timeoutId = setTimeout(delayed, wait); + } + if (leadingCall) { + isCalled = true; + result = func.apply(thisArg, args); + } + if (isCalled && !timeoutId && !maxTimeoutId) { + args = thisArg = undefined; + } + return result; + } + debounced.cancel = cancel; + return debounced; + } + + /** + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // logs 'deferred' after one or more milliseconds + */ + var defer = restParam(function(func, args) { + return baseDelay(func, 1, args); + }); + + /** + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it is invoked. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke the function with. + * @returns {number} Returns the timer id. + * @example + * + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => logs 'later' after one second + */ + var delay = restParam(function(func, wait, args) { + return baseDelay(func, wait, args); + }); + + /** + * Creates a function that returns the result of invoking the provided + * functions with the `this` binding of the created function, where each + * successive invocation is supplied the return value of the previous. + * + * @static + * @memberOf _ + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow(_.add, square); + * addSquare(1, 2); + * // => 9 + */ + var flow = createFlow(); + + /** + * This method is like `_.flow` except that it creates a function that + * invokes the provided functions from right to left. + * + * @static + * @memberOf _ + * @alias backflow, compose + * @category Function + * @param {...Function} [funcs] Functions to invoke. + * @returns {Function} Returns the new function. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flowRight(square, _.add); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is coerced to a string and used as the + * cache key. The `func` is invoked with the `this` binding of the memoized + * function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object) + * method interface of `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoizing function. + * @example + * + * var upperCase = _.memoize(function(string) { + * return string.toUpperCase(); + * }); + * + * upperCase('fred'); + * // => 'FRED' + * + * // modifying the result cache + * upperCase.cache.set('fred', 'BARNEY'); + * upperCase('fred'); + * // => 'BARNEY' + * + * // replacing `_.memoize.Cache` + * var object = { 'user': 'fred' }; + * var other = { 'user': 'barney' }; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'fred' } + * + * _.memoize.Cache = WeakMap; + * var identity = _.memoize(_.identity); + * + * identity(object); + * // => { 'user': 'fred' } + * identity(other); + * // => { 'user': 'barney' } + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new memoize.Cache; + return memoized; + } + + /** + * Creates a function that runs each argument through a corresponding + * transform function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms] The functions to transform + * arguments, specified as individual functions or arrays of functions. + * @returns {Function} Returns the new function. + * @example + * + * function doubled(n) { + * return n * 2; + * } + * + * function square(n) { + * return n * n; + * } + * + * var modded = _.modArgs(function(x, y) { + * return [x, y]; + * }, square, doubled); + * + * modded(1, 2); + * // => [1, 4] + * + * modded(5, 10); + * // => [25, 20] + */ + var modArgs = restParam(function(func, transforms) { + transforms = baseFlatten(transforms); + if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = transforms.length; + return restParam(function(args) { + var index = nativeMin(args.length, length); + while (index--) { + args[index] = transforms[index](args[index]); + } + return func.apply(this, args); + }); + }); + + /** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + return !predicate.apply(this, arguments); + }; + } + + /** + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first call. The `func` is invoked + * with the `this` binding and arguments of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // `initialize` invokes `createApplication` once + */ + function once(func) { + return before(2, func); + } + + /** + * Creates a function that invokes `func` with `partial` arguments prepended + * to those provided to the new function. This method is like `_.bind` except + * it does **not** alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // using placeholders + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + */ + var partial = createPartial(PARTIAL_FLAG); + + /** + * This method is like `_.partial` except that partially applied arguments + * are appended to those provided to the new function. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method does not set the "length" property of partially + * applied functions. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. + * @example + * + * var greet = function(greeting, name) { + * return greeting + ' ' + name; + * }; + * + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // using placeholders + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' + */ + var partialRight = createPartial(PARTIAL_RIGHT_FLAG); + + /** + * Creates a function that invokes `func` with arguments arranged according + * to the specified indexes where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes, + * specified as individual indexes or arrays of indexes. + * @returns {Function} Returns the new function. + * @example + * + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, 2, 0, 1); + * + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] + * + * var map = _.rearg(_.map, [1, 0]); + * map(function(n) { + * return n * 3; + * }, [1, 2, 3]); + * // => [3, 6, 9] + */ + var rearg = restParam(function(func, indexes) { + return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes)); + }); + + /** + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as an array. + * + * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.restParam(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); + * + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' + */ + function restParam(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + rest = Array(length); + + while (++index < length) { + rest[index] = args[start + index]; + } + switch (start) { + case 0: return func.call(this, rest); + case 1: return func.call(this, args[0], rest); + case 2: return func.call(this, args[0], args[1], rest); + } + var otherArgs = Array(start + 1); + index = -1; + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = rest; + return func.apply(this, otherArgs); + }; + } + + /** + * Creates a function that invokes `func` with the `this` binding of the created + * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3). + * + * **Note:** This method is based on the [spread operator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator). + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to spread arguments over. + * @returns {Function} Returns the new function. + * @example + * + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); + * + * say(['fred', 'hello']); + * // => 'fred says hello' + * + * // with a Promise + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); + * + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 + */ + function spread(func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function(array) { + return func.apply(this, array); + }; + } + + /** + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed invocations. Provide an options object to indicate + * that `func` should be invoked on the leading and/or trailing edge of the + * `wait` timeout. Subsequent calls to the throttled function return the + * result of the last `func` call. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked + * on the trailing edge of the timeout only if the the throttled function is + * invoked more than once during the `wait` timeout. + * + * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation) + * for details over the differences between `_.throttle` and `_.debounce`. + * + * @static + * @memberOf _ + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options] The options object. + * @param {boolean} [options.leading=true] Specify invoking on the leading + * edge of the timeout. + * @param {boolean} [options.trailing=true] Specify invoking on the trailing + * edge of the timeout. + * @returns {Function} Returns the new throttled function. + * @example + * + * // avoid excessively updating the position while scrolling + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); + * + * // invoke `renewToken` when the click event is fired, but not more than once every 5 minutes + * jQuery('.interactive').on('click', _.throttle(renewToken, 300000, { + * 'trailing': false + * })); + * + * // cancel a trailing throttled call + * jQuery(window).on('popstate', throttled.cancel); + */ + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + if (options === false) { + leading = false; + } else if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing }); + } + + /** + * Creates a function that provides `value` to the wrapper function as its + * first argument. Any additional arguments provided to the function are + * appended to those provided to the wrapper function. The wrapper is invoked + * with the `this` binding of the created function. + * + * @static + * @memberOf _ + * @category Function + * @param {*} value The value to wrap. + * @param {Function} wrapper The wrapper function. + * @returns {Function} Returns the new function. + * @example + * + * var p = _.wrap(_.escape, function(func, text) { + * return '

                ' + func(text) + '

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

                fred, barney, & pebbles

                ' + */ + function wrap(value, wrapper) { + wrapper = wrapper == null ? identity : wrapper; + return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []); + } + + /*------------------------------------------------------------------------*/ + + /** + * Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, + * otherwise they are assigned by reference. If `customizer` is provided it is + * invoked to produce the cloned values. If `customizer` returns `undefined` + * cloning is handled by the method instead. The `customizer` is bound to + * `thisArg` and invoked with two argument; (value [, index|key, object]). + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). + * The enumerable properties of `arguments` objects and objects created by + * constructors other than `Object` are cloned to plain `Object` objects. An + * empty object is returned for uncloneable values such as functions, DOM nodes, + * Maps, Sets, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {*} Returns the cloned value. + * @example + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * var shallow = _.clone(users); + * shallow[0] === users[0]; + * // => true + * + * var deep = _.clone(users, true); + * deep[0] === users[0]; + * // => false + * + * // using a customizer callback + * var el = _.clone(document.body, function(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * }); + * + * el === document.body + * // => false + * el.nodeName + * // => BODY + * el.childNodes.length; + * // => 0 + */ + function clone(value, isDeep, customizer, thisArg) { + if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) { + isDeep = false; + } + else if (typeof isDeep == 'function') { + thisArg = customizer; + customizer = isDeep; + isDeep = false; + } + return typeof customizer == 'function' + ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1)) + : baseClone(value, isDeep); + } + + /** + * Creates a deep clone of `value`. If `customizer` is provided it is invoked + * to produce the cloned values. If `customizer` returns `undefined` cloning + * is handled by the method instead. The `customizer` is bound to `thisArg` + * and invoked with two argument; (value [, index|key, object]). + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm). + * The enumerable properties of `arguments` objects and objects created by + * constructors other than `Object` are cloned to plain `Object` objects. An + * empty object is returned for uncloneable values such as functions, DOM nodes, + * Maps, Sets, and WeakMaps. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to deep clone. + * @param {Function} [customizer] The function to customize cloning values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {*} Returns the deep cloned value. + * @example + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * var deep = _.cloneDeep(users); + * deep[0] === users[0]; + * // => false + * + * // using a customizer callback + * var el = _.cloneDeep(document.body, function(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * }); + * + * el === document.body + * // => false + * el.nodeName + * // => BODY + * el.childNodes.length; + * // => 20 + */ + function cloneDeep(value, customizer, thisArg) { + return typeof customizer == 'function' + ? baseClone(value, true, bindCallback(customizer, thisArg, 1)) + : baseClone(value, true); + } + + /** + * Checks if `value` is greater than `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`. + * @example + * + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false + */ + function gt(value, other) { + return value > other; + } + + /** + * Checks if `value` is greater than or equal to `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`. + * @example + * + * _.gte(3, 1); + * // => true + * + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false + */ + function gte(value, other) { + return value >= other; + } + + /** + * Checks if `value` is classified as an `arguments` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArguments(function() { return arguments; }()); + * // => true + * + * _.isArguments([1, 2, 3]); + * // => false + */ + function isArguments(value) { + return isObjectLike(value) && isArrayLike(value) && + hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); + } + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(function() { return arguments; }()); + * // => false + */ + var isArray = nativeIsArray || function(value) { + return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; + }; + + /** + * Checks if `value` is classified as a boolean primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isBoolean(false); + * // => true + * + * _.isBoolean(null); + * // => false + */ + function isBoolean(value) { + return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag); + } + + /** + * Checks if `value` is classified as a `Date` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isDate(new Date); + * // => true + * + * _.isDate('Mon April 23 2012'); + * // => false + */ + function isDate(value) { + return isObjectLike(value) && objToString.call(value) == dateTag; + } + + /** + * Checks if `value` is a DOM element. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @example + * + * _.isElement(document.body); + * // => true + * + * _.isElement(''); + * // => false + */ + function isElement(value) { + return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value); + } + + /** + * Checks if `value` is empty. A value is considered empty unless it is an + * `arguments` object, array, string, or jQuery-like collection with a length + * greater than `0` or an object with own enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {Array|Object|string} value The value to inspect. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @example + * + * _.isEmpty(null); + * // => true + * + * _.isEmpty(true); + * // => true + * + * _.isEmpty(1); + * // => true + * + * _.isEmpty([1, 2, 3]); + * // => false + * + * _.isEmpty({ 'a': 1 }); + * // => false + */ + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || + (isObjectLike(value) && isFunction(value.splice)))) { + return !value.length; + } + return !keys(value).length; + } + + /** + * Performs a deep comparison between two values to determine if they are + * equivalent. If `customizer` is provided it is invoked to compare values. + * If `customizer` returns `undefined` comparisons are handled by the method + * instead. The `customizer` is bound to `thisArg` and invoked with three + * arguments: (value, other [, index|key]). + * + * **Note:** This method supports comparing arrays, booleans, `Date` objects, + * numbers, `Object` objects, regexes, and strings. Objects are compared by + * their own, not inherited, enumerable properties. Functions and DOM nodes + * are **not** supported. Provide a customizer function to extend support + * for comparing other values. + * + * @static + * @memberOf _ + * @alias eq + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize value comparisons. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'user': 'fred' }; + * var other = { 'user': 'fred' }; + * + * object == other; + * // => false + * + * _.isEqual(object, other); + * // => true + * + * // using a customizer callback + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqual(array, other, function(value, other) { + * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) { + * return true; + * } + * }); + * // => true + */ + function isEqual(value, other, customizer, thisArg) { + customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, customizer) : !!result; + } + + /** + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @example + * + * _.isError(new Error); + * // => true + * + * _.isError(Error); + * // => false + */ + function isError(value) { + return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag; + } + + /** + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on [`Number.isFinite`](http://ecma-international.org/ecma-262/6.0/#sec-number.isfinite). + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @example + * + * _.isFinite(10); + * // => true + * + * _.isFinite('10'); + * // => false + * + * _.isFinite(true); + * // => false + * + * _.isFinite(Object(10)); + * // => false + * + * _.isFinite(Infinity); + * // => false + */ + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); + } + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + // The use of `Object#toString` avoids issues with the `typeof` operator + // in older versions of Chrome and Safari which return 'function' for regexes + // and Safari 8 equivalents which return 'object' for typed array constructors. + return isObject(value) && objToString.call(value) == funcTag; + } + + /** + * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. + * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @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(1); + * // => false + */ + function isObject(value) { + // Avoid a V8 JIT bug in Chrome 19-20. + // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. + var type = typeof value; + return !!value && (type == 'object' || type == 'function'); + } + + /** + * Performs a deep comparison between `object` and `source` to determine if + * `object` contains equivalent property values. If `customizer` is provided + * it is invoked to compare values. If `customizer` returns `undefined` + * comparisons are handled by the method instead. The `customizer` is bound + * to `thisArg` and invoked with three arguments: (value, other, index|key). + * + * **Note:** This method supports comparing properties of arrays, booleans, + * `Date` objects, numbers, `Object` objects, regexes, and strings. Functions + * and DOM nodes are **not** supported. Provide a customizer function to extend + * support for comparing other values. + * + * @static + * @memberOf _ + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize value comparisons. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.isMatch(object, { 'age': 40 }); + * // => true + * + * _.isMatch(object, { 'age': 36 }); + * // => false + * + * // using a customizer callback + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatch(object, source, function(value, other) { + * return _.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/) || undefined; + * }); + * // => true + */ + function isMatch(object, source, customizer, thisArg) { + customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; + return baseIsMatch(object, getMatchData(source), customizer); + } + + /** + * Checks if `value` is `NaN`. + * + * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4) + * which returns `true` for `undefined` and other non-numeric values. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @example + * + * _.isNaN(NaN); + * // => true + * + * _.isNaN(new Number(NaN)); + * // => true + * + * isNaN(undefined); + * // => true + * + * _.isNaN(undefined); + * // => false + */ + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some host objects in IE. + return isNumber(value) && value != +value; + } + + /** + * Checks if `value` is a native function. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, else `false`. + * @example + * + * _.isNative(Array.prototype.push); + * // => true + * + * _.isNative(_); + * // => false + */ + function isNative(value) { + if (value == null) { + return false; + } + if (isFunction(value)) { + return reIsNative.test(fnToString.call(value)); + } + return isObjectLike(value) && reIsHostCtor.test(value); + } + + /** + * Checks if `value` is `null`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @example + * + * _.isNull(null); + * // => true + * + * _.isNull(void 0); + * // => false + */ + function isNull(value) { + return value === null; + } + + /** + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified + * as numbers, use the `_.isFinite` method. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isNumber(8.4); + * // => true + * + * _.isNumber(NaN); + * // => true + * + * _.isNumber('8.4'); + * // => false + */ + function isNumber(value) { + return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag); + } + + /** + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. + * + * **Note:** This method assumes objects created by the `Object` constructor + * have no inherited enumerable properties. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @example + * + * function Foo() { + * this.a = 1; + * } + * + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true + */ + function isPlainObject(value) { + var Ctor; + + // Exit early for non `Object` objects. + if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) || + (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) { + return false; + } + // IE < 9 iterates inherited properties before own properties. If the first + // iterated property is an object's own property then there are no inherited + // enumerable properties. + var result; + // In most environments an object's own properties are iterated before + // its inherited properties. If the last iterated property is an object's + // own property then there are no inherited enumerable properties. + baseForIn(value, function(subValue, key) { + result = key; + }); + return result === undefined || hasOwnProperty.call(value, result); + } + + /** + * Checks if `value` is classified as a `RegExp` object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false + */ + function isRegExp(value) { + return isObject(value) && objToString.call(value) == regexpTag; + } + + /** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ + function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); + } + + /** + * Checks if `value` is classified as a typed array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false + */ + function isTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)]; + } + + /** + * Checks if `value` is `undefined`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @example + * + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false + */ + function isUndefined(value) { + return value === undefined; + } + + /** + * Checks if `value` is less than `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`. + * @example + * + * _.lt(1, 3); + * // => true + * + * _.lt(3, 3); + * // => false + * + * _.lt(3, 1); + * // => false + */ + function lt(value, other) { + return value < other; + } + + /** + * Checks if `value` is less than or equal to `other`. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`. + * @example + * + * _.lte(1, 3); + * // => true + * + * _.lte(3, 3); + * // => true + * + * _.lte(3, 1); + * // => false + */ + function lte(value, other) { + return value <= other; + } + + /** + * Converts `value` to an array. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. + * @example + * + * (function() { + * return _.toArray(arguments).slice(1); + * }(1, 2, 3)); + * // => [2, 3] + */ + function toArray(value) { + var length = value ? getLength(value) : 0; + if (!isLength(length)) { + return values(value); + } + if (!length) { + return []; + } + return arrayCopy(value); + } + + /** + * Converts `value` to a plain object flattening inherited enumerable + * properties of `value` to own properties of the plain object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. + * @example + * + * function Foo() { + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } + * + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } + */ + function toPlainObject(value) { + return baseCopy(value, keysIn(value)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Recursively merges own enumerable properties of the source object(s), that + * don't resolve to `undefined` into the destination object. Subsequent sources + * overwrite property assignments of previous sources. If `customizer` is + * provided it is invoked to produce the merged values of the destination and + * source properties. If `customizer` returns `undefined` merging is handled + * by the method instead. The `customizer` is bound to `thisArg` and invoked + * with five arguments: (objectValue, sourceValue, key, object, source). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * var users = { + * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }] + * }; + * + * var ages = { + * 'data': [{ 'age': 36 }, { 'age': 40 }] + * }; + * + * _.merge(users, ages); + * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] } + * + * // using a customizer callback + * var object = { + * 'fruits': ['apple'], + * 'vegetables': ['beet'] + * }; + * + * var other = { + * 'fruits': ['banana'], + * 'vegetables': ['carrot'] + * }; + * + * _.merge(object, other, function(a, b) { + * if (_.isArray(a)) { + * return a.concat(b); + * } + * }); + * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] } + */ + var merge = createAssigner(baseMerge); + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object. Subsequent sources overwrite property assignments of previous sources. + * If `customizer` is provided it is invoked to produce the assigned values. + * The `customizer` is bound to `thisArg` and invoked with five arguments: + * (objectValue, sourceValue, key, object, source). + * + * **Note:** This method mutates `object` and is based on + * [`Object.assign`](http://ecma-international.org/ecma-262/6.0/#sec-object.assign). + * + * @static + * @memberOf _ + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @param {*} [thisArg] The `this` binding of `customizer`. + * @returns {Object} Returns `object`. + * @example + * + * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); + * // => { 'user': 'fred', 'age': 40 } + * + * // using a customizer callback + * var defaults = _.partialRight(_.assign, function(value, other) { + * return _.isUndefined(value) ? other : value; + * }); + * + * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var assign = createAssigner(function(object, source, customizer) { + return customizer + ? assignWith(object, source, customizer) + : baseAssign(object, source); + }); + + /** + * Creates an object that inherits from the given `prototype` object. If a + * `properties` object is provided its own enumerable properties are assigned + * to the created object. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new object. + * @example + * + * function Shape() { + * this.x = 0; + * this.y = 0; + * } + * + * function Circle() { + * Shape.call(this); + * } + * + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); + * + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true + */ + function create(prototype, properties, guard) { + var result = baseCreate(prototype); + if (guard && isIterateeCall(prototype, properties, guard)) { + properties = undefined; + } + return properties ? baseAssign(result, properties) : result; + } + + /** + * Assigns own enumerable properties of source object(s) to the destination + * object for all destination properties that resolve to `undefined`. Once a + * property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); + * // => { 'user': 'barney', 'age': 36 } + */ + var defaults = createDefaults(assign, assignDefaults); + + /** + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @example + * + * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } }); + * // => { 'user': { 'name': 'barney', 'age': 36 } } + * + */ + var defaultsDeep = createDefaults(merge, mergeDefaults); + + /** + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findKey(users, function(chr) { + * return chr.age < 40; + * }); + * // => 'barney' (iteration order is not guaranteed) + * + * // using the `_.matches` callback shorthand + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // using the `_.matchesProperty` callback shorthand + * _.findKey(users, 'active', false); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.findKey(users, 'active'); + * // => 'barney' + */ + var findKey = createFindKey(baseForOwn); + + /** + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. + * + * If a property name is provided for `predicate` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `predicate` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to search. + * @param {Function|Object|string} [predicate=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {string|undefined} Returns the key of the matched element, else `undefined`. + * @example + * + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; + * + * _.findLastKey(users, function(chr) { + * return chr.age < 40; + * }); + * // => returns `pebbles` assuming `_.findKey` returns `barney` + * + * // using the `_.matches` callback shorthand + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' + * + * // using the `_.matchesProperty` callback shorthand + * _.findLastKey(users, 'active', false); + * // => 'fred' + * + * // using the `_.property` callback shorthand + * _.findLastKey(users, 'active'); + * // => 'pebbles' + */ + var findLastKey = createFindKey(baseForOwnRight); + + /** + * Iterates over own and inherited enumerable properties of an object invoking + * `iteratee` for each property. The `iteratee` is bound to `thisArg` and invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'a', 'b', and 'c' (iteration order is not guaranteed) + */ + var forIn = createForIn(baseFor); + + /** + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'c', 'b', and 'a' assuming `_.forIn ` logs 'a', 'b', and 'c' + */ + var forInRight = createForIn(baseForRight); + + /** + * Iterates over own enumerable properties of an object invoking `iteratee` + * for each property. The `iteratee` is bound to `thisArg` and invoked with + * three arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'a' and 'b' (iteration order is not guaranteed) + */ + var forOwn = createForOwn(baseForOwn); + + /** + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns `object`. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => logs 'b' and 'a' assuming `_.forOwn` logs 'a' and 'b' + */ + var forOwnRight = createForOwn(baseForOwnRight); + + /** + * Creates an array of function property names from all enumerable properties, + * own and inherited, of `object`. + * + * @static + * @memberOf _ + * @alias methods + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the new array of property names. + * @example + * + * _.functions(_); + * // => ['after', 'ary', 'assign', ...] + */ + function functions(object) { + return baseFunctions(object, keysIn(object)); + } + + /** + * Gets the property value at `path` of `object`. If the resolved value is + * `undefined` the `defaultValue` is used in its place. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, toPath(path), path + ''); + return result === undefined ? defaultValue : result; + } + + /** + * Checks if `path` is a direct property. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` is a direct property, else `false`. + * @example + * + * var object = { 'a': { 'b': { 'c': 3 } } }; + * + * _.has(object, 'a'); + * // => true + * + * _.has(object, 'a.b.c'); + * // => true + * + * _.has(object, ['a', 'b', 'c']); + * // => true + */ + function has(object, path) { + if (object == null) { + return false; + } + var result = hasOwnProperty.call(object, path); + if (!result && !isKey(path)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + if (object == null) { + return false; + } + path = last(path); + result = hasOwnProperty.call(object, path); + } + return result || (isLength(object.length) && isIndex(path, object.length) && + (isArray(object) || isArguments(object))); + } + + /** + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite property + * assignments of previous values unless `multiValue` is `true`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to invert. + * @param {boolean} [multiValue] Allow multiple values per key. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {Object} Returns the new inverted object. + * @example + * + * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * + * _.invert(object); + * // => { '1': 'c', '2': 'b' } + * + * // with `multiValue` + * _.invert(object, true); + * // => { '1': ['a', 'c'], '2': ['b'] } + */ + function invert(object, multiValue, guard) { + if (guard && isIterateeCall(object, multiValue, guard)) { + multiValue = undefined; + } + var index = -1, + props = keys(object), + length = props.length, + result = {}; + + while (++index < length) { + var key = props[index], + value = object[key]; + + if (multiValue) { + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + } + else { + result[value] = key; + } + } + return result; + } + + /** + * 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/6.0/#sec-object.keys) + * for more details. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) + * + * _.keys('hi'); + * // => ['0', '1'] + */ + var keys = !nativeKeys ? shimKeys : function(object) { + var Ctor = object == null ? undefined : object.constructor; + if ((typeof Ctor == 'function' && Ctor.prototype === object) || + (typeof object != 'function' && isArrayLike(object))) { + return shimKeys(object); + } + return isObject(object) ? nativeKeys(object) : []; + }; + + /** + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @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; + * + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + */ + function keysIn(object) { + if (object == null) { + return []; + } + if (!isObject(object)) { + object = Object(object); + } + var length = object.length; + length = (length && isLength(length) && + (isArray(object) || isArguments(object)) && length) || 0; + + var Ctor = object.constructor, + index = -1, + isProto = typeof Ctor == 'function' && Ctor.prototype === object, + result = Array(length), + skipIndexes = length > 0; + + while (++index < length) { + result[index] = (index + ''); + } + for (var key in object) { + if (!(skipIndexes && isIndex(key, length)) && + !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + + /** + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * property of `object` through `iteratee`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the new mapped object. + * @example + * + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } + */ + var mapKeys = createObjectMapper(true); + + /** + * Creates an object with the same keys as `object` and values generated by + * running each own enumerable property of `object` through `iteratee`. The + * iteratee function is bound to `thisArg` and invoked with three arguments: + * (value, key, object). + * + * If a property name is provided for `iteratee` the created `_.property` + * style callback returns the property value of the given element. + * + * If a value is also provided for `thisArg` the created `_.matchesProperty` + * style callback returns `true` for elements that have a matching property + * value, else `false`. + * + * If an object is provided for `iteratee` the created `_.matches` style + * callback returns `true` for elements that have the properties of the given + * object, else `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function|Object|string} [iteratee=_.identity] The function invoked + * per iteration. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {Object} Returns the new mapped object. + * @example + * + * _.mapValues({ 'a': 1, 'b': 2 }, function(n) { + * return n * 3; + * }); + * // => { 'a': 3, 'b': 6 } + * + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; + * + * // using the `_.property` callback shorthand + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + */ + var mapValues = createObjectMapper(); + + /** + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable properties of `object` that are not omitted. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to omit, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.omit(object, 'age'); + * // => { 'user': 'fred' } + * + * _.omit(object, _.isNumber); + * // => { 'user': 'fred' } + */ + var omit = restParam(function(object, props) { + if (object == null) { + return {}; + } + if (typeof props[0] != 'function') { + var props = arrayMap(baseFlatten(props), String); + return pickByArray(object, baseDifference(keysIn(object), props)); + } + var predicate = bindCallback(props[0], props[1], 3); + return pickByCallback(object, function(value, key, object) { + return !predicate(value, key, object); + }); + }); + + /** + * Creates a two dimensional array of the key-value pairs for `object`, + * e.g. `[[key1, value1], [key2, value2]]`. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the new array of key-value pairs. + * @example + * + * _.pairs({ 'barney': 36, 'fred': 40 }); + * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) + */ + function pairs(object) { + object = toObject(object); + + var index = -1, + props = keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + var key = props[index]; + result[index] = [key, object[key]]; + } + return result; + } + + /** + * Creates an object composed of the picked `object` properties. Property + * names may be specified as individual arguments or as arrays of property + * names. If `predicate` is provided it is invoked for each property of `object` + * picking the properties `predicate` returns truthy for. The predicate is + * bound to `thisArg` and invoked with three arguments: (value, key, object). + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {Function|...(string|string[])} [predicate] The function invoked per + * iteration or property names to pick, specified as individual property + * names or arrays of property names. + * @param {*} [thisArg] The `this` binding of `predicate`. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'user': 'fred', 'age': 40 }; + * + * _.pick(object, 'user'); + * // => { 'user': 'fred' } + * + * _.pick(object, _.isString); + * // => { 'user': 'fred' } + */ + var pick = restParam(function(object, props) { + if (object == null) { + return {}; + } + return typeof props[0] == 'function' + ? pickByCallback(object, bindCallback(props[0], props[1], 3)) + : pickByArray(object, baseFlatten(props)); + }); + + /** + * This method is like `_.get` except that if the resolved value is a function + * it is invoked with the `this` binding of its parent object and its result + * is returned. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; + * + * _.result(object, 'a[0].b.c1'); + * // => 3 + * + * _.result(object, 'a[0].b.c2'); + * // => 4 + * + * _.result(object, 'a.b.c', 'default'); + * // => 'default' + * + * _.result(object, 'a.b.c', _.constant('default')); + * // => 'default' + */ + function result(object, path, defaultValue) { + var result = object == null ? undefined : object[path]; + if (result === undefined) { + if (object != null && !isKey(path, object)) { + path = toPath(path); + object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); + result = object == null ? undefined : object[last(path)]; + } + result = result === undefined ? defaultValue : result; + } + return isFunction(result) ? result.call(object) : result; + } + + /** + * Sets the property value of `path` on `object`. If a portion of `path` + * does not exist it is created. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to augment. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, 'x[0].y.z', 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + if (object == null) { + return object; + } + var pathKey = (path + ''); + path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = path[index]; + if (isObject(nested)) { + if (index == lastIndex) { + nested[key] = value; + } else if (nested[key] == null) { + nested[key] = isIndex(path[index + 1]) ? [] : {}; + } + } + nested = nested[key]; + } + return object; + } + + /** + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own enumerable + * properties through `iteratee`, with each invocation potentially mutating + * the `accumulator` object. The `iteratee` is bound to `thisArg` and invoked + * with four arguments: (accumulator, value, key, object). Iteratee functions + * may exit iteration early by explicitly returning `false`. + * + * @static + * @memberOf _ + * @category Object + * @param {Array|Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @param {*} [thisArg] The `this` binding of `iteratee`. + * @returns {*} Returns the accumulated value. + * @example + * + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }); + * // => [4, 9] + * + * _.transform({ 'a': 1, 'b': 2 }, function(result, n, key) { + * result[key] = n * 3; + * }); + * // => { 'a': 3, 'b': 6 } + */ + function transform(object, iteratee, accumulator, thisArg) { + var isArr = isArray(object) || isTypedArray(object); + iteratee = getCallback(iteratee, thisArg, 4); + + if (accumulator == null) { + if (isArr || isObject(object)) { + var Ctor = object.constructor; + if (isArr) { + accumulator = isArray(object) ? new Ctor : []; + } else { + accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined); + } + } else { + accumulator = {}; + } + } + (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; + } + + /** + * Creates an array of the own enumerable property values of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) + * + * _.values('hi'); + * // => ['h', 'i'] + */ + function values(object) { + return baseValues(object, keys(object)); + } + + /** + * Creates an array of the own and inherited enumerable property values + * of `object`. + * + * **Note:** Non-object values are coerced to objects. + * + * @static + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example + * + * function Foo() { + * this.a = 1; + * this.b = 2; + * } + * + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) + */ + function valuesIn(object) { + return baseValues(object, keysIn(object)); + } + + /*------------------------------------------------------------------------*/ + + /** + * Checks if `n` is between `start` and up to but not including, `end`. If + * `end` is not specified it is set to `start` with `start` then set to `0`. + * + * @static + * @memberOf _ + * @category Number + * @param {number} n The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `n` is in the range, else `false`. + * @example + * + * _.inRange(3, 2, 4); + * // => true + * + * _.inRange(4, 8); + * // => true + * + * _.inRange(4, 2); + * // => false + * + * _.inRange(2, 2); + * // => false + * + * _.inRange(1.2, 2); + * // => true + * + * _.inRange(5.2, 4); + * // => false + */ + function inRange(value, start, end) { + start = +start || 0; + if (end === undefined) { + end = start; + start = 0; + } else { + end = +end || 0; + } + return value >= nativeMin(start, end) && value < nativeMax(start, end); + } + + /** + * Produces a random number between `min` and `max` (inclusive). If only one + * argument is provided a number between `0` and the given number is returned. + * If `floating` is `true`, or either `min` or `max` are floats, a floating-point + * number is returned instead of an integer. + * + * @static + * @memberOf _ + * @category Number + * @param {number} [min=0] The minimum possible value. + * @param {number} [max=1] The maximum possible value. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. + * @example + * + * _.random(0, 5); + * // => an integer between 0 and 5 + * + * _.random(5); + * // => also an integer between 0 and 5 + * + * _.random(5, true); + * // => a floating-point number between 0 and 5 + * + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 + */ + function random(min, max, floating) { + if (floating && isIterateeCall(min, max, floating)) { + max = floating = undefined; + } + var noMin = min == null, + noMax = max == null; + + if (floating == null) { + if (noMax && typeof min == 'boolean') { + floating = min; + min = 1; + } + else if (typeof max == 'boolean') { + floating = max; + noMax = true; + } + } + if (noMin && noMax) { + max = 1; + noMax = false; + } + min = +min || 0; + if (noMax) { + max = min; + min = 0; + } else { + max = +max || 0; + } + if (floating || min % 1 || max % 1) { + var rand = nativeRandom(); + return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max); + } + return baseRandom(min, max); + } + + /*------------------------------------------------------------------------*/ + + /** + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. + * @example + * + * _.camelCase('Foo Bar'); + * // => 'fooBar' + * + * _.camelCase('--foo-bar'); + * // => 'fooBar' + * + * _.camelCase('__foo_bar__'); + * // => 'fooBar' + */ + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word); + }); + + /** + * Capitalizes the first character of `string`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. + * @example + * + * _.capitalize('fred'); + * // => 'Fred' + */ + function capitalize(string) { + string = baseToString(string); + return string && (string.charAt(0).toUpperCase() + string.slice(1)); + } + + /** + * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. + * @example + * + * _.deburr('déjà vu'); + * // => 'deja vu' + */ + function deburr(string) { + string = baseToString(string); + return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, ''); + } + + /** + * Checks if `string` ends with the given target string. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to search. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search from. + * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`. + * @example + * + * _.endsWith('abc', 'c'); + * // => true + * + * _.endsWith('abc', 'b'); + * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true + */ + function endsWith(string, target, position) { + string = baseToString(string); + target = (target + ''); + + var length = string.length; + position = position === undefined + ? length + : nativeMin(position < 0 ? 0 : (+position || 0), length); + + position -= target.length; + return position >= 0 && string.indexOf(target, position) == position; + } + + /** + * Converts the characters "&", "<", ">", '"', "'", and "\`", in `string` to + * their corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional characters + * use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. + * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * Backticks are escaped because in Internet Explorer < 9, they can break out + * of attribute values or HTML comments. See [#59](https://html5sec.org/#59), + * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and + * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) + * for more details. + * + * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) + * to reduce XSS vectors. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' + */ + function escape(string) { + // Reset `lastIndex` because in IE < 9 `String#replace` does not. + string = baseToString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; + } + + /** + * Escapes the `RegExp` special characters "\", "/", "^", "$", ".", "|", "?", + * "*", "+", "(", ")", "[", "]", "{" and "}" in `string`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. + * @example + * + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https:\/\/lodash\.com\/\)' + */ + function escapeRegExp(string) { + string = baseToString(string); + return (string && reHasRegExpChars.test(string)) + ? string.replace(reRegExpChars, escapeRegExpChar) + : (string || '(?:)'); + } + + /** + * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. + * @example + * + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' + * + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__foo_bar__'); + * // => 'foo-bar' + */ + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); + + /** + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.pad('abc', 8); + * // => ' abc ' + * + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' + * + * _.pad('abc', 3); + * // => 'abc' + */ + function pad(string, length, chars) { + string = baseToString(string); + length = +length; + + var strLength = string.length; + if (strLength >= length || !nativeIsFinite(length)) { + return string; + } + var mid = (length - strLength) / 2, + leftLength = nativeFloor(mid), + rightLength = nativeCeil(mid); + + chars = createPadding('', rightLength, chars); + return chars.slice(0, leftLength) + string + chars; + } + + /** + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padLeft('abc', 6); + * // => ' abc' + * + * _.padLeft('abc', 6, '_-'); + * // => '_-_abc' + * + * _.padLeft('abc', 3); + * // => 'abc' + */ + var padLeft = createPadDir(); + + /** + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. + * @example + * + * _.padRight('abc', 6); + * // => 'abc ' + * + * _.padRight('abc', 6, '_-'); + * // => 'abc_-_' + * + * _.padRight('abc', 3); + * // => 'abc' + */ + var padRight = createPadDir(true); + + /** + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal, + * in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#E) + * of `parseInt`. + * + * @static + * @memberOf _ + * @category String + * @param {string} string The string to convert. + * @param {number} [radix] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. + * @returns {number} Returns the converted integer. + * @example + * + * _.parseInt('08'); + * // => 8 + * + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] + */ + function parseInt(string, radix, guard) { + // Firefox < 21 and Opera < 15 follow ES3 for `parseInt`. + // Chrome fails to trim leading whitespace characters. + // See https://code.google.com/p/v8/issues/detail?id=3109 for more details. + if (guard ? isIterateeCall(string, radix, guard) : radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; + } + string = trim(string); + return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10)); + } + + /** + * Repeats the given string `n` times. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=0] The number of times to repeat the string. + * @returns {string} Returns the repeated string. + * @example + * + * _.repeat('*', 3); + * // => '***' + * + * _.repeat('abc', 2); + * // => 'abcabc' + * + * _.repeat('abc', 0); + * // => '' + */ + function repeat(string, n) { + var result = ''; + string = baseToString(string); + n = +n; + if (n < 1 || !string || !nativeIsFinite(n)) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + string += string; + } while (n); + + return result; + } + + /** + * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. + * @example + * + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' + * + * _.snakeCase('fooBar'); + * // => 'foo_bar' + * + * _.snakeCase('--foo-bar'); + * // => 'foo_bar' + */ + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); + + /** + * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. + * @example + * + * _.startCase('--foo-bar'); + * // => 'Foo Bar' + * + * _.startCase('fooBar'); + * // => 'Foo Bar' + * + * _.startCase('__foo_bar__'); + * // => 'Foo Bar' + */ + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1)); + }); + + /** + * Checks if `string` starts with the given target string. + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The string to search. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`. + * @example + * + * _.startsWith('abc', 'a'); + * // => true + * + * _.startsWith('abc', 'b'); + * // => false + * + * _.startsWith('abc', 'b', 1); + * // => true + */ + function startsWith(string, target, position) { + string = baseToString(string); + position = position == null + ? 0 + : nativeMin(position < 0 ? 0 : (+position || 0), string.length); + + return string.lastIndexOf(target, position) == position; + } + + /** + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is provided it takes precedence over `_.templateSettings` values. + * + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * + * @static + * @memberOf _ + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options] The options object. + * @param {RegExp} [options.escape] The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate] The "evaluate" delimiter. + * @param {Object} [options.imports] An object to import into the template as free variables. + * @param {RegExp} [options.interpolate] The "interpolate" delimiter. + * @param {string} [options.sourceURL] The sourceURL of the template's compiled source. + * @param {string} [options.variable] The data object variable name. + * @param- {Object} [otherOptions] Enables the legacy `options` param signature. + * @returns {Function} Returns the compiled template function. + * @example + * + * // using the "interpolate" delimiter to create a compiled template + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' + * + * // using the HTML "escape" delimiter to escape data property values + * var compiled = _.template('<%- value %>'); + * compiled({ 'value': ' - result += '\\' + key[i] - - } else if (chr === 92) { - result += '\\\\' - - } else if (chr === quoteChr) { - result += '\\' + quote - - } else { - result += key[i] - } - - } else if (options.ascii || Uni.isLineTerminator(key[i]) || escapable.exec(key[i])) { - if (chr < 0x100) { - if (json5) { - result += '\\x' + chr.toString(16) - } else { - result += '\\u00' + chr.toString(16) - } - - } else if (chr < 0x1000) { - result += '\\u0' + chr.toString(16) - - } else if (chr < 0x10000) { - result += '\\u' + chr.toString(16) - - } else { - throw Error('weird codepoint') - } - } else { - result += key[i] - } - } - return quote + result + quote - } - - function _stringify_object() { - if (object === null) return 'null' - var result = [] - , len = 0 - , braces - - if (Array.isArray(object)) { - braces = '[]' - for (var i=0; i options._splitMax - recursiveLvl * options.indent.length || len > options._splitMin) ) { - // remove trailing comma in multiline if asked to - if (options.no_trailing_comma && result.length) { - result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1) - } - - var innerStuff = result.map(function(x) {return indent(x, 1)}).join('') - return braces[0] - + (options.indent ? '\n' : '') - + innerStuff - + indent(braces[1]) - } else { - // always remove trailing comma in one-lined arrays - if (result.length) { - result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1) - } - - var innerStuff = result.join(options.indent ? ' ' : '') - return braces[0] - + innerStuff - + braces[1] - } - } - - function _stringify_nonobject(object) { - if (typeof(options.replacer) === 'function') { - object = options.replacer.call(null, currentKey, object) - } - - switch(typeof(object)) { - case 'string': - return _stringify_str(object) - - case 'number': - if (object === 0 && 1/object < 0) { - // Opinionated decision warning: - // - // I want cross-platform negative zero in all js engines - // I know they're equal, but why lose that tiny bit of - // information needlessly? - return '-0' - } - if (!json5 && !Number.isFinite(object)) { - // json don't support infinity (= sucks) - return 'null' - } - return object.toString() - - case 'boolean': - return object.toString() - - case 'undefined': - return undefined - - case 'function': -// return custom_type() - - default: - // fallback for something weird - return JSON.stringify(object) - } - } - - if (options._stringify_key) { - return _stringify_key(object) - } - - if (typeof(object) === 'object') { - if (object === null) return 'null' - - var str - if (typeof(str = object.toJSON5) === 'function' && options.mode !== 'json') { - object = str.call(object, currentKey) - - } else if (typeof(str = object.toJSON) === 'function') { - object = str.call(object, currentKey) - } - - if (object === null) return 'null' - if (typeof(object) !== 'object') return _stringify_nonobject(object) - - if (object.constructor === Number || object.constructor === Boolean || object.constructor === String) { - object = object.valueOf() - return _stringify_nonobject(object) - - } else if (object.constructor === Date) { - // only until we can't do better - return _stringify_nonobject(object.toISOString()) - - } else { - if (typeof(options.replacer) === 'function') { - object = options.replacer.call(null, currentKey, object) - if (typeof(object) !== 'object') return _stringify_nonobject(object) - } - - return _stringify_object(object) - } - } else { - return _stringify_nonobject(object) - } -} - -/* - * stringify(value, options) - * or - * stringify(value, replacer, space) - * - * where: - * value - anything - * options - object - * replacer - function or array - * space - boolean or number or string - */ -module.exports.stringify = function stringifyJSON(object, options, _space) { - // support legacy syntax - if (typeof(options) === 'function' || Array.isArray(options)) { - options = { - replacer: options - } - } else if (typeof(options) === 'object' && options !== null) { - // nothing to do - } else { - options = {} - } - if (_space != null) options.indent = _space - - if (options.indent == null) options.indent = '\t' - if (options.quote == null) options.quote = "'" - if (options.ascii == null) options.ascii = false - if (options.mode == null) options.mode = 'json5' - - if (options.mode === 'json' || options.mode === 'cjson') { - // json only supports double quotes (= sucks) - options.quote = '"' - - // json don't support trailing commas (= sucks) - options.no_trailing_comma = true - - // json don't support unquoted property names (= sucks) - options.quote_keys = true - } - - // why would anyone use such objects? - if (typeof(options.indent) === 'object') { - if (options.indent.constructor === Number - || options.indent.constructor === Boolean - || options.indent.constructor === String) - options.indent = options.indent.valueOf() - } - - // gap is capped at 10 characters - if (typeof(options.indent) === 'number') { - if (options.indent >= 0) { - options.indent = Array(Math.min(~~options.indent, 10) + 1).join(' ') - } else { - options.indent = false - } - } else if (typeof(options.indent) === 'string') { - options.indent = options.indent.substr(0, 10) - } - - if (options._splitMin == null) options._splitMin = 50 - if (options._splitMax == null) options._splitMax = 70 - - return _stringify(object, options, 0, '') -} diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js deleted file mode 100644 index 1a29143c2d..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js +++ /dev/null @@ -1,71 +0,0 @@ - -// 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/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js deleted file mode 100644 index dd4752c73a..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js +++ /dev/null @@ -1,45 +0,0 @@ -var FS = require('fs') -var jju = require('../') - -// this function registers json5 extension, so you -// can do `require("./config.json5")` kind of thing -module.exports.register = function() { - var r = require, e = 'extensions' - r[e]['.json5'] = function(m, f) { - /*eslint no-sync:0*/ - m.exports = jju.parse(FS.readFileSync(f, 'utf8')) - } -} - -// this function monkey-patches JSON.parse, so it -// will return an exact position of error in case -// of parse failure -module.exports.patch_JSON_parse = function() { - var _parse = JSON.parse - JSON.parse = function(text, rev) { - try { - return _parse(text, rev) - } catch(err) { - // this call should always throw - require('jju').parse(text, { - mode: 'json', - legacy: true, - reviver: rev, - reserved_keys: 'replace', - null_prototype: false, - }) - - // if it didn't throw, but original parser did, - // this is an error in this library and should be reported - throw err - } - } -} - -// this function is an express/connect middleware -// that accepts uploads in application/json5 format -module.exports.middleware = function() { - return function(req, res, next) { - throw Error('this function is removed, use express-json5 instead') - } -} diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.json deleted file mode 100644 index 8b01adc877..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "jju@^1.1.0", - "_id": "jju@1.3.0", - "_inBundle": false, - "_integrity": "sha1-2t2e8BkkvHKLA/L3l5vb1i96Kqo=", - "_location": "/pacote/make-fetch-happen/node-fetch-npm/json-parse-helpfulerror/jju", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "jju@^1.1.0", - "name": "jju", - "escapedName": "jju", - "rawSpec": "^1.1.0", - "saveSpec": null, - "fetchSpec": "^1.1.0" - }, - "_requiredBy": [ - "/pacote/make-fetch-happen/node-fetch-npm/json-parse-helpfulerror" - ], - "_resolved": "https://registry.npmjs.org/jju/-/jju-1.3.0.tgz", - "_shasum": "dadd9ef01924bc728b03f2f7979bdbd62f7a2aaa", - "_spec": "jju@^1.1.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror", - "author": { - "name": "Alex Kocharin", - "email": "alex@kocharin.ru" - }, - "bugs": { - "url": "https://github.com/rlidwka/jju/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "a set of utilities to work with JSON / JSON5 documents", - "devDependencies": { - "eslint": "~0.4.2", - "js-yaml": ">=3.1.0", - "mocha": ">=1.21.0" - }, - "homepage": "http://rlidwka.github.io/jju/", - "keywords": [ - "json", - "json5", - "parser", - "serializer", - "data" - ], - "license": { - "type": "WTFPL", - "url": "http://www.wtfpl.net/txt/copying/" - }, - "name": "jju", - "publishConfig": { - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git://github.com/rlidwka/jju.git" - }, - "scripts": { - "lint": "eslint -c ./.eslint.yaml ./lib", - "test": "mocha test/*.js" - }, - "version": "1.3.0" -} diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml deleted file mode 100644 index 828163ddc4..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# use "yapm install ." if you're installing this from git repository - -# "jju" stands for "json/json5 utils" -name: jju - -version: 1.3.0 -description: a set of utilities to work with JSON / JSON5 documents - -author: - name: Alex Kocharin - email: alex@kocharin.ru - -repository: - type: git - url: git://github.com/rlidwka/jju - -bugs: - url: https://github.com/rlidwka/jju/issues - -homepage: http://rlidwka.github.io/jju/ - -devDependencies: - mocha: '>=1.21.0' - js-yaml: '>=3.1.0' - - # linting tools - eslint: '~0.4.2' - -scripts: - test: 'mocha test/*.js' - lint: 'eslint -c ./.eslint.yaml ./lib' - -keywords: - - json - - json5 - - parser - - serializer - - data - -publishConfig: - registry: https://registry.npmjs.org/ - -license: - type: WTFPL - url: http://www.wtfpl.net/txt/copying/ diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/package.json deleted file mode 100644 index 6c723ae8ef..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "json-parse-helpfulerror@^1.0.3", - "_id": "json-parse-helpfulerror@1.0.3", - "_inBundle": false, - "_integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", - "_location": "/pacote/make-fetch-happen/node-fetch-npm/json-parse-helpfulerror", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "json-parse-helpfulerror@^1.0.3", - "name": "json-parse-helpfulerror", - "escapedName": "json-parse-helpfulerror", - "rawSpec": "^1.0.3", - "saveSpec": null, - "fetchSpec": "^1.0.3" - }, - "_requiredBy": [ - "/pacote/make-fetch-happen/node-fetch-npm" - ], - "_resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", - "_shasum": "13f14ce02eed4e981297b64eb9e3b932e2dd13dc", - "_spec": "json-parse-helpfulerror@^1.0.3", - "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm", - "author": { - "name": "Sam Mikes", - "email": "smikes@cubane.com" - }, - "bugs": { - "url": "https://github.com/smikes/json-parse-helpfulerror/issues" - }, - "bundleDependencies": false, - "dependencies": { - "jju": "^1.1.0" - }, - "deprecated": false, - "description": "A drop-in replacement for JSON.parse that uses `jju` to give helpful errors", - "devDependencies": { - "code": "^1.2.1", - "jslint": "^0.7.1", - "lab": "^5.1.1" - }, - "homepage": "https://github.com/smikes/json-parse-helpfulerror", - "keywords": [ - "json", - "parse", - "line", - "doublequote", - "error" - ], - "license": "MIT", - "main": "index.js", - "name": "json-parse-helpfulerror", - "repository": { - "type": "git", - "url": "git+https://github.com/smikes/json-parse-helpfulerror.git" - }, - "scripts": { - "lint": "jslint --edition=latest --terse *.js", - "test": "lab -c" - }, - "version": "1.0.3" -} diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/test/test.js deleted file mode 100644 index fca458ac08..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/node_modules/json-parse-helpfulerror/test/test.js +++ /dev/null @@ -1,32 +0,0 @@ -var Code = require('code'), - Lab = require('lab'), - lab = Lab.script(), - jph = require('..'); // 'json-parse-helpfulerror' - -exports.lab = lab; - -lab.test('can parse', function (done) { - var o = jph.parse('{"foo": "bar"}'); - - Code.expect(o.foo).to.equal('bar'); - done(); -}); - -lab.test('helpful error for bad JSON', function (done) { - - var bad = "{'foo': 'bar'}"; - - Code.expect(function () { JSON.parse(bad) }).to.throw(); - - Code.expect(function () { jph.parse(bad) }).to.throw(SyntaxError, "Unexpected token '\\'' at 1:2\n" + bad + '\n ^'); - - done(); -}); - -lab.test('fails if reviver throws', function (done) { - function badReviver() { throw new ReferenceError('silly'); } - - Code.expect(function () { jph.parse('3', badReviver) }).to.throw(ReferenceError, 'silly'); - - done(); -}); \ No newline at end of file diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/package.json index b98cbe1997..fb0b79a0d4 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/package.json +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/package.json @@ -1,26 +1,26 @@ { - "_from": "node-fetch-npm@^2.0.0", - "_id": "node-fetch-npm@2.0.1", + "_from": "node-fetch-npm@^2.0.1", + "_id": "node-fetch-npm@2.0.2", "_inBundle": false, - "_integrity": "sha512-W3onhopST5tqpX0/MGSL47pDQLLKobNR83AvkiOWQKaw54h+uYUfzeLAxCiyhWlUOiuI+GIb4O9ojLaAFlhCCA==", + "_integrity": "sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw==", "_location": "/pacote/make-fetch-happen/node-fetch-npm", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "node-fetch-npm@^2.0.0", + "raw": "node-fetch-npm@^2.0.1", "name": "node-fetch-npm", "escapedName": "node-fetch-npm", - "rawSpec": "^2.0.0", + "rawSpec": "^2.0.1", "saveSpec": null, - "fetchSpec": "^2.0.0" + "fetchSpec": "^2.0.1" }, "_requiredBy": [ "/pacote/make-fetch-happen" ], - "_resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.1.tgz", - "_shasum": "4dd3355ce526c01bc5ab29ccdf48352dc8a79465", - "_spec": "node-fetch-npm@^2.0.0", + "_resolved": "https://registry.npmjs.org/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz", + "_shasum": "7258c9046182dca345b4208eda918daf33697ff7", + "_spec": "node-fetch-npm@^2.0.1", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen", "author": { "name": "David Frank" @@ -41,8 +41,8 @@ ], "dependencies": { "encoding": "^0.1.11", - "json-parse-helpfulerror": "^1.0.3", - "safe-buffer": "^5.0.1" + "json-parse-better-errors": "^1.0.0", + "safe-buffer": "^5.1.1" }, "deprecated": false, "description": "An npm cli-oriented fork of the excellent node-fetch", @@ -50,21 +50,21 @@ "chai": "^3.5.0", "chai-as-promised": "^6.0.0", "chai-iterator": "^1.1.1", - "chai-string": "^1.3.0", + "chai-string": "^1.4.0", "codecov": "^1.0.1", "cross-env": "^3.1.4", - "form-data": ">=1.0.0", + "form-data": "^2.2.0", "is-builtin-module": "^1.0.0", - "mocha": "^3.1.2", + "mocha": "^3.5.0", "nyc": "^10.3.2", "parted": "^0.1.1", - "promise": "^7.1.1", + "promise": "^7.3.1", "resumer": "0.0.0", - "standard": "^10.0.2", - "standard-version": "^4.0.0", - "weallbehave": "^1.0.3", + "standard": "^10.0.3", + "standard-version": "^4.2.0", + "weallbehave": "^1.2.0", "weallcontribute": "^1.0.8", - "whatwg-url": "^4.0.0" + "whatwg-url": "^4.8.0" }, "engines": { "node": ">=4" @@ -96,5 +96,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "2.0.1" + "version": "2.0.2" } diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js index 2b009b7cfc..9e7481857a 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/node-fetch-npm/src/body.js @@ -11,7 +11,7 @@ const Buffer = require('safe-buffer').Buffer const Blob = require('./blob.js') const BUFFER = Blob.BUFFER const convert = require('encoding').convert -const parseJson = require('json-parse-helpfulerror').parse +const parseJson = require('json-parse-better-errors') const FetchError = require('./fetch-error.js') const Stream = require('stream') diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md index b79a539629..a81fb17a97 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/History.md @@ -1,4 +1,9 @@ +4.1.1 / 2017-07-20 +================== + + * Correct `https.request()` with a String (#9) + 4.1.0 / 2017-06-26 ================== diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json index c0b4c066a2..561a1a84e0 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/package.json @@ -1,8 +1,8 @@ { "_from": "agent-base@^4.0.1", - "_id": "agent-base@4.1.0", + "_id": "agent-base@4.1.1", "_inBundle": false, - "_integrity": "sha1-IOF0Ac1Js8B2v1akvGxbQ2/6jVU=", + "_integrity": "sha512-yWGUUmCZD/33IRjG2It94PzixT8lX+47Uq8fjmd0cgQWITCMrJuXFaVIMnGDmDnZGGKAGdwTx8UGeU8lMR2urA==", "_location": "/pacote/make-fetch-happen/socks-proxy-agent/agent-base", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/pacote/make-fetch-happen/socks-proxy-agent" ], - "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.0.tgz", - "_shasum": "20e17401cd49b3c076bf56a4bc6c5b436ffa8d55", + "_resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.1.tgz", + "_shasum": "92d8a4fc2524a3b09b3666a33b6c97960f23d6a4", "_spec": "agent-base@^4.0.1", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent", "author": { @@ -61,5 +61,5 @@ "scripts": { "test": "mocha --reporter spec" }, - "version": "4.1.0" + "version": "4.1.1" } diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js index 05cbaa1e70..a3f7bc6160 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/patch-core.js @@ -11,8 +11,8 @@ const https = require('https'); */ https.request = (function(request) { return function(_options, cb) { - let options - if (typeof options === 'string') { + let options; + if (typeof _options === 'string') { options = url.parse(_options); } else { options = Object.assign({}, _options); diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js index 43217d4273..23814e2c32 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/agent-base/test/test.js @@ -443,6 +443,17 @@ describe('"https" module', function() { done(); }); + it('should work with a String URL', function(done) { + var endpoint = 'https://127.0.0.1:' + port; + var req = https.get(endpoint); + + // it's gonna error out since `rejectUnauthorized` is not being passed in + req.on('error', function(err) { + assert.equal(err.code, 'DEPTH_ZERO_SELF_SIGNED_CERT'); + done(); + }); + }); + it('should work for basic HTTPS requests', function(done) { var called = false; var agent = new Agent(function(req, opts, fn) { diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/package.json index 851da5fadc..4ea7f79628 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/package.json +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/ip/package.json @@ -1,6 +1,7 @@ { "_from": "ip@^1.1.4", "_id": "ip@1.1.5", + "_inBundle": false, "_integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", "_location": "/pacote/make-fetch-happen/socks-proxy-agent/socks/ip", "_phantomChildren": {}, @@ -19,19 +20,16 @@ ], "_resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", "_shasum": "bdded70114290828c0a039e72ef25f5aaec4354a", - "_shrinkwrap": null, "_spec": "ip@^1.1.4", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks", "author": { "name": "Fedor Indutny", "email": "fedor@indutny.com" }, - "bin": null, "bugs": { "url": "https://github.com/indutny/node-ip/issues" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "[![](https://badge.fury.io/js/ip.svg)](https://www.npmjs.com/package/ip)", "devDependencies": { @@ -43,8 +41,6 @@ "license": "MIT", "main": "lib/ip", "name": "ip", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+ssh://git@github.com/indutny/node-ip.git" diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/package.json index dd6cec4698..82fc8ae532 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/package.json +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/node_modules/smart-buffer/package.json @@ -1,6 +1,7 @@ { "_from": "smart-buffer@^1.0.13", "_id": "smart-buffer@1.1.15", + "_inBundle": false, "_integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=", "_location": "/pacote/make-fetch-happen/socks-proxy-agent/socks/smart-buffer", "_phantomChildren": {}, @@ -19,13 +20,11 @@ ], "_resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", "_shasum": "7f114b5b65fab3e2a35aa775bb12f0d1c649bf16", - "_shrinkwrap": null, "_spec": "smart-buffer@^1.0.13", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks", "author": { "name": "Josh Glazebrook" }, - "bin": null, "bugs": { "url": "https://github.com/JoshGlazebrook/smart-buffer/issues" }, @@ -57,8 +56,6 @@ "license": "MIT", "main": "lib/smart-buffer.js", "name": "smart-buffer", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/JoshGlazebrook/smart-buffer.git" diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/package.json index a4ccc56333..8d639ef6b4 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/package.json +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent/node_modules/socks/package.json @@ -1,31 +1,30 @@ { - "_from": "socks@~1.1.5", + "_from": "socks@^1.1.10", "_id": "socks@1.1.10", + "_inBundle": false, "_integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", "_location": "/pacote/make-fetch-happen/socks-proxy-agent/socks", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "socks@~1.1.5", + "raw": "socks@^1.1.10", "name": "socks", "escapedName": "socks", - "rawSpec": "~1.1.5", + "rawSpec": "^1.1.10", "saveSpec": null, - "fetchSpec": "~1.1.5" + "fetchSpec": "^1.1.10" }, "_requiredBy": [ "/pacote/make-fetch-happen/socks-proxy-agent" ], "_resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", "_shasum": "5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a", - "_shrinkwrap": null, - "_spec": "socks@~1.1.5", + "_spec": "socks@^1.1.10", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/socks-proxy-agent", "author": { "name": "Josh Glazebrook" }, - "bin": null, "bugs": { "url": "https://github.com/JoshGlazebrook/socks/issues" }, @@ -41,7 +40,6 @@ }, "deprecated": false, "description": "A SOCKS proxy client supporting SOCKS 4, 4a, and 5. (also supports BIND/Associate)", - "devDependencies": {}, "engines": { "node": ">= 0.10.0", "npm": ">= 1.3.5" @@ -62,8 +60,6 @@ "license": "MIT", "main": "index.js", "name": "socks", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/JoshGlazebrook/socks.git" diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json index fe7a3f3743..f900c0d521 100644 --- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json +++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/package.json @@ -1,8 +1,8 @@ { "_from": "make-fetch-happen@^2.4.13", - "_id": "make-fetch-happen@2.4.13", + "_id": "make-fetch-happen@2.5.0", "_inBundle": false, - "_integrity": "sha512-73CsTlMRSLdGr7VvOE8iYl/ejOSIxyfRYg7jZhepGGEqIlgdq6FLe2DEAI5bo813Jdg5fS/Ku62SRQ/UpT6NJA==", + "_integrity": "sha512-JPD5R43T02wIkcxjcmZuR7D06nB20fMR8aC9VEyYsSBXvJa5hOR/QhCxKY+5SXhy3uU5OUY/r+A6r+fJ2mFndA==", "_location": "/pacote/make-fetch-happen", "_phantomChildren": { "safe-buffer": "5.1.1" @@ -20,10 +20,10 @@ "_requiredBy": [ "/pacote" ], - "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.4.13.tgz", - "_shasum": "3139ba2f4230a8384e7ba394534816c872ecbf4b", + "_resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-2.5.0.tgz", + "_shasum": "08c22d499f4f30111addba79fe87c98cf01b6bc8", "_spec": "make-fetch-happen@^2.4.13", - "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote", + "_where": "/Users/rebecca/code/npm/node_modules/pacote", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -50,9 +50,10 @@ "devDependencies": { "bluebird": "^3.5.0", "mkdirp": "^0.5.1", - "nock": "^9.0.6", + "nock": "^9.0.14", "npmlog": "^4.1.2", "nyc": "^11.0.3", + "require-inject": "^1.4.2", "rimraf": "^2.5.4", "safe-buffer": "^5.1.1", "standard": "^10.0.1", @@ -88,9 +89,9 @@ "prerelease": "npm t", "pretest": "standard lib test *.js", "release": "standard-version -s", - "test": "nyc --all -- tap -J test/*.js", + "test": "nyc --all -- tap --timeout=35 -J test/*.js", "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "2.4.13" + "version": "2.5.0" } diff --git a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json index afa90581db..b350ab14e8 100644 --- a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +++ b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json @@ -21,7 +21,7 @@ "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767", "_spec": "balanced-match@^1.0.0", - "_where": "/Users/rebecca/code/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion", + "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", diff --git a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json index cea52d0f6b..8730fadd83 100644 --- a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +++ b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json @@ -1,6 +1,7 @@ { "_from": "concat-map@0.0.1", "_id": "concat-map@0.0.1", + "_inBundle": false, "_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "_location": "/pacote/minimatch/brace-expansion/concat-map", "_phantomChildren": {}, @@ -19,7 +20,6 @@ ], "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "_shrinkwrap": null, "_spec": "concat-map@0.0.1", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion", "author": { @@ -27,12 +27,10 @@ "email": "mail@substack.net", "url": "http://substack.net" }, - "bin": null, "bugs": { "url": "https://github.com/substack/node-concat-map/issues" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "concatenative mapdashery", "devDependencies": { @@ -53,8 +51,6 @@ "license": "MIT", "main": "index.js", "name": "concat-map", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/substack/node-concat-map.git" diff --git a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json index c245d54c93..0ba0e63cb8 100644 --- a/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json +++ b/deps/npm/node_modules/pacote/node_modules/minimatch/node_modules/brace-expansion/package.json @@ -21,7 +21,7 @@ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", "_shasum": "c07b211c7c952ec1f8efd51a77ef0d1d3990a292", "_spec": "brace-expansion@^1.1.7", - "_where": "/Users/rebecca/code/npm/node_modules/pacote/node_modules/minimatch", + "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/minimatch", "author": { "name": "Julian Gruber", "email": "mail@juliangruber.com", diff --git a/deps/npm/node_modules/pacote/node_modules/minimatch/package.json b/deps/npm/node_modules/pacote/node_modules/minimatch/package.json index aec0ec6236..b369453195 100644 --- a/deps/npm/node_modules/pacote/node_modules/minimatch/package.json +++ b/deps/npm/node_modules/pacote/node_modules/minimatch/package.json @@ -1,33 +1,32 @@ { - "_from": "minimatch@^3.0.3", + "_from": "minimatch@^3.0.4", "_id": "minimatch@3.0.4", + "_inBundle": false, "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "_location": "/pacote/minimatch", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "minimatch@^3.0.3", + "raw": "minimatch@^3.0.4", "name": "minimatch", "escapedName": "minimatch", - "rawSpec": "^3.0.3", + "rawSpec": "^3.0.4", "saveSpec": null, - "fetchSpec": "^3.0.3" + "fetchSpec": "^3.0.4" }, "_requiredBy": [ "/pacote" ], "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "_shasum": "5166e286457f03306064be5497e8dbb0c3d32083", - "_shrinkwrap": null, - "_spec": "minimatch@^3.0.3", + "_spec": "minimatch@^3.0.4", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me" }, - "bin": null, "bugs": { "url": "https://github.com/isaacs/minimatch/issues" }, @@ -50,8 +49,6 @@ "license": "ISC", "main": "minimatch.js", "name": "minimatch", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/isaacs/minimatch.git" diff --git a/deps/npm/node_modules/pacote/node_modules/promise-retry/node_modules/err-code/package.json b/deps/npm/node_modules/pacote/node_modules/promise-retry/node_modules/err-code/package.json index 8d2cd5b86e..559e5bfb66 100644 --- a/deps/npm/node_modules/pacote/node_modules/promise-retry/node_modules/err-code/package.json +++ b/deps/npm/node_modules/pacote/node_modules/promise-retry/node_modules/err-code/package.json @@ -1,6 +1,7 @@ { "_from": "err-code@^1.0.0", "_id": "err-code@1.1.2", + "_inBundle": false, "_integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", "_location": "/pacote/promise-retry/err-code", "_phantomChildren": {}, @@ -19,7 +20,6 @@ ], "_resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", "_shasum": "06e0116d3028f6aef4806849eb0ea6a748ae6960", - "_shrinkwrap": null, "_spec": "err-code@^1.0.0", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/promise-retry", "author": { @@ -27,12 +27,10 @@ "email": "hello@indigounited.com", "url": "http://indigounited.com" }, - "bin": null, "bugs": { "url": "https://github.com/IndigoUnited/js-err-code/issues/" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "Create an error with a code", "devDependencies": { @@ -53,8 +51,6 @@ "license": "MIT", "main": "index.js", "name": "err-code", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/IndigoUnited/js-err-code.git" diff --git a/deps/npm/node_modules/pacote/node_modules/promise-retry/package.json b/deps/npm/node_modules/pacote/node_modules/promise-retry/package.json index 6e32d3a89b..a7efb9ffb7 100644 --- a/deps/npm/node_modules/pacote/node_modules/promise-retry/package.json +++ b/deps/npm/node_modules/pacote/node_modules/promise-retry/package.json @@ -1,6 +1,7 @@ { "_from": "promise-retry@^1.1.1", "_id": "promise-retry@1.1.1", + "_inBundle": false, "_integrity": "sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0=", "_location": "/pacote/promise-retry", "_phantomChildren": {}, @@ -20,7 +21,6 @@ ], "_resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz", "_shasum": "6739e968e3051da20ce6497fb2b50f6911df3d6d", - "_shrinkwrap": null, "_spec": "promise-retry@^1.1.1", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote", "author": { @@ -28,7 +28,6 @@ "email": "hello@indigounited.com", "url": "http://indigounited.com" }, - "bin": null, "bugs": { "url": "https://github.com/IndigoUnited/node-promise-retry/issues/" }, @@ -58,8 +57,6 @@ "license": "MIT", "main": "index.js", "name": "promise-retry", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/IndigoUnited/node-promise-retry.git" diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/package.json b/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/package.json index 78327af43a..b1b7bc8f69 100644 --- a/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/package.json +++ b/deps/npm/node_modules/pacote/node_modules/protoduck/node_modules/genfun/package.json @@ -1,6 +1,7 @@ { "_from": "genfun@^4.0.1", "_id": "genfun@4.0.1", + "_inBundle": false, "_integrity": "sha1-7RAEHy5KfxsKOEZtF6XD4n3x38E=", "_location": "/pacote/protoduck/genfun", "_phantomChildren": {}, @@ -19,14 +20,12 @@ ], "_resolved": "https://registry.npmjs.org/genfun/-/genfun-4.0.1.tgz", "_shasum": "ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1", - "_shrinkwrap": null, "_spec": "genfun@^4.0.1", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/protoduck", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" }, - "bin": null, "bugs": { "url": "https://github.com/zkat/genfun/issues" }, @@ -63,8 +62,6 @@ "license": "CC0-1.0", "main": "lib/genfun.js", "name": "genfun", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/zkat/genfun.git" diff --git a/deps/npm/node_modules/pacote/node_modules/protoduck/package.json b/deps/npm/node_modules/pacote/node_modules/protoduck/package.json index 9b6a04a699..b436c22e87 100644 --- a/deps/npm/node_modules/pacote/node_modules/protoduck/package.json +++ b/deps/npm/node_modules/pacote/node_modules/protoduck/package.json @@ -1,6 +1,7 @@ { "_from": "protoduck@^4.0.0", "_id": "protoduck@4.0.0", + "_inBundle": false, "_integrity": "sha1-/kh02MeRM2bP2erRJFOiLNNlf44=", "_location": "/pacote/protoduck", "_phantomChildren": {}, @@ -19,14 +20,12 @@ ], "_resolved": "https://registry.npmjs.org/protoduck/-/protoduck-4.0.0.tgz", "_shasum": "fe4874d8c7913366cfd9ead12453a22cd3657f8e", - "_shrinkwrap": null, "_spec": "protoduck@^4.0.0", "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" }, - "bin": null, "bugs": { "url": "https://github.com/zkat/protoduck/issues" }, @@ -72,8 +71,6 @@ "license": "CC0-1.0", "main": "index.js", "name": "protoduck", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/zkat/protoduck.git" diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/.npmignore b/deps/npm/node_modules/pacote/node_modules/tar-fs/.npmignore deleted file mode 100644 index 118a1375d0..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -test/fixtures/copy diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/.travis.yml b/deps/npm/node_modules/pacote/node_modules/tar-fs/.travis.yml deleted file mode 100644 index 6e5919de39..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "0.10" diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/LICENSE b/deps/npm/node_modules/pacote/node_modules/tar-fs/LICENSE deleted file mode 100644 index 757562ec59..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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/deps/npm/node_modules/pacote/node_modules/tar-fs/README.md b/deps/npm/node_modules/pacote/node_modules/tar-fs/README.md deleted file mode 100644 index 6cc3b077a5..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# tar-fs - -filesystem bindings for [tar-stream](https://github.com/mafintosh/tar-stream). - -``` -npm install tar-fs -``` - -[![build status](https://secure.travis-ci.org/mafintosh/tar-fs.png)](http://travis-ci.org/mafintosh/tar-fs) - -## Usage - -tar-fs allows you to pack directories into tarballs and extract tarballs into directories. - -It doesn't gunzip for you, so if you want to extract a `.tar.gz` with this you'll need to use something like [gunzip-maybe](https://github.com/mafintosh/gunzip-maybe) in addition to this. - -``` js -var tar = require('tar-fs') -var fs = require('fs') - -// packing a directory -tar.pack('./my-directory').pipe(fs.createWriteStream('my-tarball.tar')) - -// extracting a directory -fs.createReadStream('my-other-tarball.tar').pipe(tar.extract('./my-other-directory')) -``` - -To ignore various files when packing or extracting add a ignore function to the options. `ignore` -is also an alias for `filter`. Additionally you get `header` if you use ignore while extracting. -That way you could also filter by metadata. - -``` js -var pack = tar.pack('./my-directory', { - ignore: function(name) { - return path.extname(name) === '.bin' // ignore .bin files when packing - } -}) - -var extract = tar.extract('./my-other-directory', { - ignore: function(name) { - return path.extname(name) === '.bin' // ignore .bin files inside the tarball when extracing - } -}) - -var extractFilesDirs = tar.extract('./my-other-other-directory', { - ignore: function(_, header) { - // pass files & directories, ignore e.g. symlinks - return header.type !== 'file' && header.type !== 'directory' - } -}) -``` - -You can also specify which entries to pack using the `entries` option - -```js -var pack = tar.pack('./my-directory', { - entries: ['file1', 'subdir/file2'] // only the specific entries will be packed -}) -``` - -If you want to modify the headers when packing/extracting add a map function to the options - -``` js -var pack = tar.pack('./my-directory', { - map: function(header) { - header.name = 'prefixed/'+header.name - return header - } -}) - -var extract = tar.extract('./my-directory', { - map: function(header) { - header.name = 'another-prefix/'+header.name - return header - } -}) -``` - -Similarly you can use `mapStream` incase you wanna modify the input/output file streams - -``` js -var pack = tar.pack('./my-directory', { - mapStream: function(fileStream, header) { - if (path.extname(header.name) === '.js') { - return fileStream.pipe(someTransform) - } - return fileStream; - } -}) - -var extract = tar.extract('./my-directory', { - mapStream: function(fileStream, header) { - if (path.extname(header.name) === '.js') { - return fileStream.pipe(someTransform) - } - return fileStream; - } -}) -``` - -Set `options.fmode` and `options.dmode` to ensure that files/directories extracted have the corresponding modes - -``` js -var extract = tar.extract('./my-directory', { - dmode: parseInt(555, 8), // all dirs should be readable - fmode: parseInt(444, 8) // all files should be readable -}) -``` - -It can be useful to use `dmode` and `fmode` if you are packing/unpacking tarballs between *nix/windows to ensure that all files/directories unpacked are readable. - -Alternatively you can set `options.readable` and/or `options.writable` to set the dmode and fmode to readable/writable. - -``` js -var extract = tar.extract('./my-directory', { - readable: true, // all dirs and files should be readable - writable: true, // all dirs and files should be writable -}) -``` - -Set `options.strict` to `false` if you want to ignore errors due to unsupported entry types (like device files) - -To dereference symlinks (pack the contents of the symlink instead of the link itself) set `options.dereference` to `true`. - -## Copy a directory - -Copying a directory with permissions and mtime intact is as simple as - -``` js -tar.pack('source-directory').pipe(tar.extract('dest-directory')) -``` - -## Performance - -Packing and extracting a 6.1 GB with 2496 directories and 2398 files yields the following results on my Macbook Air. -[See the benchmark here](https://gist.github.com/mafintosh/8102201) - -* tar-fs: 34.261 ms -* [node-tar](https://github.com/isaacs/node-tar): 366.123 ms (or 10x slower) - -## License - -MIT diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/index.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/index.js deleted file mode 100644 index 4b345b7d02..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/index.js +++ /dev/null @@ -1,323 +0,0 @@ -var chownr = require('chownr') -var tar = require('tar-stream') -var pump = require('pump') -var mkdirp = require('mkdirp') -var fs = require('fs') -var path = require('path') -var os = require('os') - -var win32 = os.platform() === 'win32' - -var noop = function () {} - -var echo = function (name) { - return name -} - -var normalize = !win32 ? echo : function (name) { - return name.replace(/\\/g, '/').replace(/[:?<>|]/g, '_') -} - -var statAll = function (fs, stat, cwd, ignore, entries, sort) { - var queue = entries || ['.'] - - return function loop (callback) { - if (!queue.length) return callback() - var next = queue.shift() - var nextAbs = path.join(cwd, next) - - stat(nextAbs, function (err, stat) { - if (err) return callback(err) - - if (!stat.isDirectory()) return callback(null, next, stat) - - fs.readdir(nextAbs, function (err, files) { - if (err) return callback(err) - - if (sort) files.sort() - for (var i = 0; i < files.length; i++) { - if (!ignore(path.join(cwd, next, files[i]))) queue.push(path.join(next, files[i])) - } - - callback(null, next, stat) - }) - }) - } -} - -var strip = function (map, level) { - return function (header) { - header.name = header.name.split('/').slice(level).join('/') - - var linkname = header.linkname - if (linkname && (header.type === 'link' || path.isAbsolute(linkname))) { - header.linkname = linkname.split('/').slice(level).join('/') - } - - return map(header) - } -} - -exports.pack = function (cwd, opts) { - if (!cwd) cwd = '.' - if (!opts) opts = {} - - var xfs = opts.fs || fs - var ignore = opts.ignore || opts.filter || noop - var map = opts.map || noop - var mapStream = opts.mapStream || echo - var statNext = statAll(xfs, opts.dereference ? xfs.stat : xfs.lstat, cwd, ignore, opts.entries, opts.sort) - var strict = opts.strict !== false - var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask() - var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0 - var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0 - var pack = opts.pack || tar.pack() - - if (opts.strip) map = strip(map, opts.strip) - - if (opts.readable) { - dmode |= parseInt(555, 8) - fmode |= parseInt(444, 8) - } - if (opts.writable) { - dmode |= parseInt(333, 8) - fmode |= parseInt(222, 8) - } - - var onsymlink = function (filename, header) { - xfs.readlink(path.join(cwd, filename), function (err, linkname) { - if (err) return pack.destroy(err) - header.linkname = normalize(linkname) - pack.entry(header, onnextentry) - }) - } - - var onstat = function (err, filename, stat) { - if (err) return pack.destroy(err) - if (!filename) return pack.finalize() - - if (stat.isSocket()) return onnextentry() // tar does not support sockets... - - var header = { - name: normalize(filename), - mode: (stat.mode | (stat.isDirectory() ? dmode : fmode)) & umask, - mtime: stat.mtime, - size: stat.size, - type: 'file', - uid: stat.uid, - gid: stat.gid - } - - if (stat.isDirectory()) { - header.size = 0 - header.type = 'directory' - header = map(header) || header - return pack.entry(header, onnextentry) - } - - if (stat.isSymbolicLink()) { - header.size = 0 - header.type = 'symlink' - header = map(header) || header - return onsymlink(filename, header) - } - - // TODO: add fifo etc... - - header = map(header) || header - - if (!stat.isFile()) { - if (strict) return pack.destroy(new Error('unsupported type for ' + filename)) - return onnextentry() - } - - var entry = pack.entry(header, onnextentry) - if (!entry) return - - var rs = mapStream(xfs.createReadStream(path.join(cwd, filename)), header) - - rs.on('error', function (err) { // always forward errors on destroy - entry.destroy(err) - }) - - pump(rs, entry) - } - - var onnextentry = function (err) { - if (err) return pack.destroy(err) - statNext(onstat) - } - - onnextentry() - - return pack -} - -var head = function (list) { - return list.length ? list[list.length - 1] : null -} - -var processGetuid = function () { - return process.getuid ? process.getuid() : -1 -} - -var processUmask = function () { - return process.umask ? process.umask() : 0 -} - -exports.extract = function (cwd, opts) { - if (!cwd) cwd = '.' - if (!opts) opts = {} - - var xfs = opts.fs || fs - var ignore = opts.ignore || opts.filter || noop - var map = opts.map || noop - var mapStream = opts.mapStream || echo - var own = opts.chown !== false && !win32 && processGetuid() === 0 - var extract = opts.extract || tar.extract() - var stack = [] - var now = new Date() - var umask = typeof opts.umask === 'number' ? ~opts.umask : ~processUmask() - var dmode = typeof opts.dmode === 'number' ? opts.dmode : 0 - var fmode = typeof opts.fmode === 'number' ? opts.fmode : 0 - var strict = opts.strict !== false - - if (opts.strip) map = strip(map, opts.strip) - - if (opts.readable) { - dmode |= parseInt(555, 8) - fmode |= parseInt(444, 8) - } - if (opts.writable) { - dmode |= parseInt(333, 8) - fmode |= parseInt(222, 8) - } - - var utimesParent = function (name, cb) { // we just set the mtime on the parent dir again everytime we write an entry - var top - while ((top = head(stack)) && name.slice(0, top[0].length) !== top[0]) stack.pop() - if (!top) return cb() - xfs.utimes(top[0], now, top[1], cb) - } - - var utimes = function (name, header, cb) { - if (opts.utimes === false) return cb() - - if (header.type === 'directory') return xfs.utimes(name, now, header.mtime, cb) - if (header.type === 'symlink') return utimesParent(name, cb) // TODO: how to set mtime on link? - - xfs.utimes(name, now, header.mtime, function (err) { - if (err) return cb(err) - utimesParent(name, cb) - }) - } - - var chperm = function (name, header, cb) { - var link = header.type === 'symlink' - var chmod = link ? xfs.lchmod : xfs.chmod - var chown = link ? xfs.lchown : xfs.chown - - if (!chmod) return cb() - - var mode = (header.mode | (header.type === 'directory' ? dmode : fmode)) & umask - chmod(name, mode, function (err) { - if (err) return cb(err) - if (!own) return cb() - if (!chown) return cb() - chown(name, header.uid, header.gid, cb) - }) - } - - extract.on('entry', function (header, stream, next) { - header = map(header) || header - header.name = normalize(header.name) - var name = path.join(cwd, path.join('/', header.name)) - - if (ignore(name, header)) { - stream.resume() - return next() - } - - var stat = function (err) { - if (err) return next(err) - utimes(name, header, function (err) { - if (err) return next(err) - if (win32) return next() - chperm(name, header, next) - }) - } - - var onsymlink = function () { - if (win32) return next() // skip symlinks on win for now before it can be tested - xfs.unlink(name, function () { - xfs.symlink(header.linkname, name, stat) - }) - } - - var onlink = function () { - if (win32) return next() // skip links on win for now before it can be tested - xfs.unlink(name, function () { - var srcpath = path.resolve(cwd, header.linkname) - - xfs.link(srcpath, name, function (err) { - if (err && err.code === 'EPERM' && opts.hardlinkAsFilesFallback) { - stream = xfs.createReadStream(srcpath) - return onfile() - } - - stat(err) - }) - }) - } - - var onfile = function () { - var ws = xfs.createWriteStream(name) - var rs = mapStream(stream, header) - - ws.on('error', function (err) { // always forward errors on destroy - rs.destroy(err) - }) - - pump(rs, ws, function (err) { - if (err) return next(err) - ws.on('close', stat) - }) - } - - if (header.type === 'directory') { - stack.push([name, header.mtime]) - return mkdirfix(name, { - fs: xfs, own: own, uid: header.uid, gid: header.gid - }, stat) - } - - mkdirfix(path.dirname(name), { - fs: xfs, own: own, uid: header.uid, gid: header.gid - }, function (err) { - if (err) return next(err) - - switch (header.type) { - case 'file': return onfile() - case 'link': return onlink() - case 'symlink': return onsymlink() - } - - if (strict) return next(new Error('unsupported type for ' + name + ' (' + header.type + ')')) - - stream.resume() - next() - }) - }) - - return extract -} - -function mkdirfix (name, opts, cb) { - mkdirp(name, {fs: opts.xfs}, function (err, made) { - if (!err && made && opts.own) { - chownr(made, opts.uid, opts.gid, cb) - } else { - cb(err) - } - }) -} diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.npmignore b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.npmignore deleted file mode 100644 index 3c3629e647..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.travis.yml b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.travis.yml deleted file mode 100644 index 17f94330e7..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - -script: "npm test" diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/LICENSE b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/LICENSE deleted file mode 100644 index 757562ec59..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/README.md b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/README.md deleted file mode 100644 index 5029b27d68..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# 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/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/index.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/index.js deleted file mode 100644 index 060ce5f4fd..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/index.js +++ /dev/null @@ -1,80 +0,0 @@ -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 isFn = function (fn) { - return typeof fn === 'function' -} - -var isFS = function (stream) { - 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() // 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) - }) - }) - - return streams.reduce(pipe) -} - -module.exports = pump diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/LICENSE b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/LICENSE deleted file mode 100644 index 757562ec59..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/README.md b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/README.md deleted file mode 100644 index f2560c939d..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# 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 - -## 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/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/index.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/index.js deleted file mode 100644 index b3a9068634..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/index.js +++ /dev/null @@ -1,83 +0,0 @@ -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 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 onclose = function() { - if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && ws.ended)) 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', callback); - stream.on('close', onclose); - - return function() { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', callback); - stream.removeListener('close', onclose); - }; -}; - -module.exports = eos; diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/package.json b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/package.json deleted file mode 100644 index 28eeea06e2..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/node_modules/end-of-stream/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "end-of-stream@^1.1.0", - "_id": "end-of-stream@1.4.0", - "_integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", - "_location": "/pacote/tar-fs/pump/end-of-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "end-of-stream@^1.1.0", - "name": "end-of-stream", - "escapedName": "end-of-stream", - "rawSpec": "^1.1.0", - "saveSpec": null, - "fetchSpec": "^1.1.0" - }, - "_requiredBy": [ - "/pacote/tar-fs/pump" - ], - "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", - "_shasum": "7a90d833efda6cfa6eac0f4949dbb0fad3a63206", - "_shrinkwrap": null, - "_spec": "end-of-stream@^1.1.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump", - "author": { - "name": "Mathias Buus", - "email": "mathiasbuus@gmail.com" - }, - "bin": null, - "bugs": { - "url": "https://github.com/mafintosh/end-of-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "once": "^1.4.0" - }, - "deprecated": false, - "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", - "devDependencies": {}, - "files": [ - "index.js" - ], - "homepage": "https://github.com/mafintosh/end-of-stream", - "keywords": [ - "stream", - "streams", - "callback", - "finish", - "close", - "end", - "wait" - ], - "license": "MIT", - "main": "index.js", - "name": "end-of-stream", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/end-of-stream.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.4.0" -} diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/package.json b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/package.json deleted file mode 100644 index 2af973326b..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "pump@^1.0.0", - "_id": "pump@1.0.2", - "_integrity": "sha1-Oz7mUS+U8OV1U4wXmV+fFpkKXVE=", - "_location": "/pacote/tar-fs/pump", - "_phantomChildren": { - "once": "1.4.0" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "pump@^1.0.0", - "name": "pump", - "escapedName": "pump", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/pacote/tar-fs" - ], - "_resolved": "https://registry.npmjs.org/pump/-/pump-1.0.2.tgz", - "_shasum": "3b3ee6512f94f0e575538c17995f9f16990a5d51", - "_shrinkwrap": null, - "_spec": "pump@^1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/tar-fs", - "author": { - "name": "Mathias Buus Madsen", - "email": "mathiasbuus@gmail.com" - }, - "bin": null, - "browser": { - "fs": false - }, - "bugs": { - "url": "https://github.com/mafintosh/pump/issues" - }, - "bundleDependencies": false, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - }, - "deprecated": false, - "description": "pipe streams together and close all of them if one of them closes", - "devDependencies": {}, - "homepage": "https://github.com/mafintosh/pump#readme", - "keywords": [ - "streams", - "pipe", - "destroy", - "callback" - ], - "license": "MIT", - "name": "pump", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/pump.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.0.2" -} diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test-browser.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test-browser.js deleted file mode 100644 index 80e852c7dc..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test-browser.js +++ /dev/null @@ -1,58 +0,0 @@ -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('done') -} - -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) - -setTimeout(function () { - if (!check()) throw new Error('timeout') -}, 5000) diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test.js deleted file mode 100644 index 64e772ca5b..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/node_modules/pump/test.js +++ /dev/null @@ -1,46 +0,0 @@ -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) process.exit(0) -} - -ws.on('close', function () { - wsClosed = true - check() -}) - -rs.on('close', function () { - rsClosed = true - check() -}) - -pump(rs, toHex(), toHex(), toHex(), ws, function () { - callbackCalled = true - check() -}) - -setTimeout(function () { - rs.destroy() -}, 1000) - -setTimeout(function () { - throw new Error('timeout') -}, 5000) diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/package.json b/deps/npm/node_modules/pacote/node_modules/tar-fs/package.json deleted file mode 100644 index 2832072b54..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "tar-fs@^1.15.1", - "_id": "tar-fs@1.15.3", - "_inBundle": false, - "_integrity": "sha1-7M+TXpQUk9gVECjmNuUc5MPKfyA=", - "_location": "/pacote/tar-fs", - "_phantomChildren": { - "once": "1.4.0" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "tar-fs@^1.15.1", - "name": "tar-fs", - "escapedName": "tar-fs", - "rawSpec": "^1.15.1", - "saveSpec": null, - "fetchSpec": "^1.15.1" - }, - "_requiredBy": [ - "/pacote" - ], - "_resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.15.3.tgz", - "_shasum": "eccf935e941493d8151028e636e51ce4c3ca7f20", - "_spec": "tar-fs@^1.15.1", - "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote", - "author": { - "name": "Mathias Buus" - }, - "bugs": { - "url": "https://github.com/mafintosh/tar-fs/issues" - }, - "bundleDependencies": false, - "dependencies": { - "chownr": "^1.0.1", - "mkdirp": "^0.5.1", - "pump": "^1.0.0", - "tar-stream": "^1.1.2" - }, - "deprecated": false, - "description": "filesystem bindings for tar-stream", - "devDependencies": { - "rimraf": "^2.2.8", - "standard": "^4.5.4", - "tape": "^3.0.0" - }, - "directories": { - "test": "test" - }, - "homepage": "https://github.com/mafintosh/tar-fs", - "keywords": [ - "tar", - "fs", - "file", - "tarball", - "directory", - "stream" - ], - "license": "MIT", - "main": "index.js", - "name": "tar-fs", - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/tar-fs.git" - }, - "scripts": { - "test": "standard && tape test/index.js" - }, - "version": "1.15.3" -} diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/a/hello.txt b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/a/hello.txt deleted file mode 100644 index 3b18e512db..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/a/hello.txt +++ /dev/null @@ -1 +0,0 @@ -hello world diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/b/a/test.txt b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/b/a/test.txt deleted file mode 100644 index 9daeafb986..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/b/a/test.txt +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/c/.npmignore b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/c/.npmignore deleted file mode 100644 index 2b2328d77c..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/c/.npmignore +++ /dev/null @@ -1 +0,0 @@ -link diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/file1 b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/file1 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/file2 b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/file2 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-files/file3 b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-files/file3 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-files/file4 b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/d/sub-files/file4 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/e/directory/.ignore b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/e/directory/.ignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/e/file b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/fixtures/e/file deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/index.js b/deps/npm/node_modules/pacote/node_modules/tar-fs/test/index.js deleted file mode 100644 index 01ca87f2a8..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-fs/test/index.js +++ /dev/null @@ -1,227 +0,0 @@ -var test = require('tape') -var rimraf = require('rimraf') -var tar = require('../index') -var path = require('path') -var fs = require('fs') -var os = require('os') - -var win32 = os.platform() === 'win32' - -var mtime = function (st) { - return Math.floor(st.mtime.getTime() / 1000) -} - -test('copy a -> copy/a', function (t) { - t.plan(5) - - var a = path.join(__dirname, 'fixtures', 'a') - var b = path.join(__dirname, 'fixtures', 'copy', 'a') - - rimraf.sync(b) - tar.pack(a) - .pipe(tar.extract(b)) - .on('finish', function () { - var files = fs.readdirSync(b) - t.same(files.length, 1) - t.same(files[0], 'hello.txt') - var fileB = path.join(b, files[0]) - var fileA = path.join(a, files[0]) - t.same(fs.readFileSync(fileB, 'utf-8'), fs.readFileSync(fileA, 'utf-8')) - t.same(fs.statSync(fileB).mode, fs.statSync(fileA).mode) - t.same(mtime(fs.statSync(fileB)), mtime(fs.statSync(fileA))) - }) -}) - -test('copy b -> copy/b', function (t) { - t.plan(8) - - var a = path.join(__dirname, 'fixtures', 'b') - var b = path.join(__dirname, 'fixtures', 'copy', 'b') - - rimraf.sync(b) - tar.pack(a) - .pipe(tar.extract(b)) - .on('finish', function () { - var files = fs.readdirSync(b) - t.same(files.length, 1) - t.same(files[0], 'a') - var dirB = path.join(b, files[0]) - var dirA = path.join(a, files[0]) - t.same(fs.statSync(dirB).mode, fs.statSync(dirA).mode) - t.same(mtime(fs.statSync(dirB)), mtime(fs.statSync(dirA))) - t.ok(fs.statSync(dirB).isDirectory()) - var fileB = path.join(dirB, 'test.txt') - var fileA = path.join(dirA, 'test.txt') - t.same(fs.readFileSync(fileB, 'utf-8'), fs.readFileSync(fileA, 'utf-8')) - t.same(fs.statSync(fileB).mode, fs.statSync(fileA).mode) - t.same(mtime(fs.statSync(fileB)), mtime(fs.statSync(fileA))) - }) -}) - -test('symlink', function (t) { - if (win32) { // no symlink support on win32 currently. TODO: test if this can be enabled somehow - t.plan(1) - t.ok(true) - return - } - - t.plan(5) - - var a = path.join(__dirname, 'fixtures', 'c') - - rimraf.sync(path.join(a, 'link')) - fs.symlinkSync('.gitignore', path.join(a, 'link')) - - var b = path.join(__dirname, 'fixtures', 'copy', 'c') - - rimraf.sync(b) - tar.pack(a) - .pipe(tar.extract(b)) - .on('finish', function () { - var files = fs.readdirSync(b).sort() - t.same(files.length, 2) - t.same(files[0], '.gitignore') - t.same(files[1], 'link') - - var linkA = path.join(a, 'link') - var linkB = path.join(b, 'link') - - t.same(mtime(fs.lstatSync(linkB)), mtime(fs.lstatSync(linkA))) - t.same(fs.readlinkSync(linkB), fs.readlinkSync(linkA)) - }) -}) - -test('follow symlinks', function (t) { - if (win32) { // no symlink support on win32 currently. TODO: test if this can be enabled somehow - t.plan(1) - t.ok(true) - return - } - - t.plan(5) - - var a = path.join(__dirname, 'fixtures', 'c') - - rimraf.sync(path.join(a, 'link')) - fs.symlinkSync('.gitignore', path.join(a, 'link')) - - var b = path.join(__dirname, 'fixtures', 'copy', 'c-dereference') - - rimraf.sync(b) - tar.pack(a, {dereference: true}) - .pipe(tar.extract(b)) - .on('finish', function () { - var files = fs.readdirSync(b).sort() - t.same(files.length, 2) - t.same(files[0], '.gitignore') - t.same(files[1], 'link') - - var file1 = path.join(b, '.gitignore') - var file2 = path.join(b, 'link') - - t.same(mtime(fs.lstatSync(file1)), mtime(fs.lstatSync(file2))) - t.same(fs.readFileSync(file1), fs.readFileSync(file2)) - }) -}) - -test('strip', function (t) { - t.plan(2) - - var a = path.join(__dirname, 'fixtures', 'b') - var b = path.join(__dirname, 'fixtures', 'copy', 'b-strip') - - rimraf.sync(b) - - tar.pack(a) - .pipe(tar.extract(b, {strip: 1})) - .on('finish', function () { - var files = fs.readdirSync(b).sort() - t.same(files.length, 1) - t.same(files[0], 'test.txt') - }) -}) - -test('strip + map', function (t) { - t.plan(2) - - var a = path.join(__dirname, 'fixtures', 'b') - var b = path.join(__dirname, 'fixtures', 'copy', 'b-strip') - - rimraf.sync(b) - - var uppercase = function (header) { - header.name = header.name.toUpperCase() - return header - } - - tar.pack(a) - .pipe(tar.extract(b, {strip: 1, map: uppercase})) - .on('finish', function () { - var files = fs.readdirSync(b).sort() - t.same(files.length, 1) - t.same(files[0], 'TEST.TXT') - }) -}) - -test('map + dir + permissions', function (t) { - t.plan(win32 ? 1 : 2) // skip chmod test, it's not working like unix - - var a = path.join(__dirname, 'fixtures', 'b') - var b = path.join(__dirname, 'fixtures', 'copy', 'a-perms') - - rimraf.sync(b) - - var aWithMode = function (header) { - if (header.name === 'a') { - header.mode = parseInt(700, 8) - } - return header - } - - tar.pack(a) - .pipe(tar.extract(b, {map: aWithMode})) - .on('finish', function () { - var files = fs.readdirSync(b).sort() - var stat = fs.statSync(path.join(b, 'a')) - t.same(files.length, 1) - if (!win32) { - t.same(stat.mode & parseInt(777, 8), parseInt(700, 8)) - } - }) -}) - -test('specific entries', function (t) { - t.plan(6) - - var a = path.join(__dirname, 'fixtures', 'd') - var b = path.join(__dirname, 'fixtures', 'copy', 'd-entries') - - var entries = [ 'file1', 'sub-files/file3', 'sub-dir' ] - - rimraf.sync(b) - tar.pack(a, {entries: entries}) - .pipe(tar.extract(b)) - .on('finish', function () { - var files = fs.readdirSync(b) - t.same(files.length, 3) - t.notSame(files.indexOf('file1'), -1) - t.notSame(files.indexOf('sub-files'), -1) - t.notSame(files.indexOf('sub-dir'), -1) - var subFiles = fs.readdirSync(path.join(b, 'sub-files')) - t.same(subFiles, ['file3']) - var subDir = fs.readdirSync(path.join(b, 'sub-dir')) - t.same(subDir, ['file5']) - }) -}) - -test('check type while mapping header on packing', function (t) { - t.plan(3) - - var e = path.join(__dirname, 'fixtures', 'e') - - var checkHeaderType = function (header) { - if (header.name.indexOf('.') === -1) t.same(header.type, header.name) - } - - tar.pack(e, { map: checkHeaderType }) -}) diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/LICENSE b/deps/npm/node_modules/pacote/node_modules/tar-stream/LICENSE deleted file mode 100644 index 757562ec59..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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/deps/npm/node_modules/pacote/node_modules/tar-stream/README.md b/deps/npm/node_modules/pacote/node_modules/tar-stream/README.md deleted file mode 100644 index 96abbca1b8..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/README.md +++ /dev/null @@ -1,168 +0,0 @@ -# tar-stream - -tar-stream is a streaming tar parser and generator and nothing else. It is streams2 and operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system. - -Note that you still need to gunzip your data if you have a `.tar.gz`. We recommend using [gunzip-maybe](https://github.com/mafintosh/gunzip-maybe) in conjunction with this. - -``` -npm install tar-stream -``` - -[![build status](https://secure.travis-ci.org/mafintosh/tar-stream.png)](http://travis-ci.org/mafintosh/tar-stream) -[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT) - -## Usage - -tar-stream exposes two streams, [pack](https://github.com/mafintosh/tar-stream#packing) which creates tarballs and [extract](https://github.com/mafintosh/tar-stream#extracting) which extracts tarballs. To [modify an existing tarball](https://github.com/mafintosh/tar-stream#modifying-existing-tarballs) use both. - - -It implementes USTAR with additional support for pax extended headers. It should be compatible with all popular tar distributions out there (gnutar, bsdtar etc) - -## Related - -If you want to pack/unpack directories on the file system check out [tar-fs](https://github.com/mafintosh/tar-fs) which provides file system bindings to this module. - -## Packing - -To create a pack stream use `tar.pack()` and call `pack.entry(header, [callback])` to add tar entries. - -``` js -var tar = require('tar-stream') -var pack = tar.pack() // pack is a streams2 stream - -// add a file called my-test.txt with the content "Hello World!" -pack.entry({ name: 'my-test.txt' }, 'Hello World!') - -// add a file called my-stream-test.txt from a stream -var entry = pack.entry({ name: 'my-stream-test.txt', size: 11 }, function(err) { - // the stream was added - // no more entries - pack.finalize() -}) - -entry.write('hello') -entry.write(' ') -entry.write('world') -entry.end() - -// pipe the pack stream somewhere -pack.pipe(process.stdout) -``` - -## Extracting - -To extract a stream use `tar.extract()` and listen for `extract.on('entry', (header, stream, next) )` - -``` js -var extract = tar.extract() - -extract.on('entry', function(header, stream, next) { - // header is the tar header - // stream is the content body (might be an empty stream) - // call next when you are done with this entry - - stream.on('end', function() { - next() // ready for next entry - }) - - stream.resume() // just auto drain the stream -}) - -extract.on('finish', function() { - // all entries read -}) - -pack.pipe(extract) -``` - -The tar archive is streamed sequentially, meaning you **must** drain each entry's stream as you get them or else the main extract stream will receive backpressure and stop reading. - -## Headers - -The header object using in `entry` should contain the following properties. -Most of these values can be found by stat'ing a file. - -``` js -{ - name: 'path/to/this/entry.txt', - size: 1314, // entry size. defaults to 0 - mode: 0644, // entry mode. defaults to to 0755 for dirs and 0644 otherwise - mtime: new Date(), // last modified date for entry. defaults to now. - type: 'file', // type of entry. defaults to file. can be: - // file | link | symlink | directory | block-device - // character-device | fifo | contiguous-file - linkname: 'path', // linked file name - uid: 0, // uid of entry owner. defaults to 0 - gid: 0, // gid of entry owner. defaults to 0 - uname: 'maf', // uname of entry owner. defaults to null - gname: 'staff', // gname of entry owner. defaults to null - devmajor: 0, // device major version. defaults to 0 - devminor: 0 // device minor version. defaults to 0 -} -``` - -## Modifying existing tarballs - -Using tar-stream it is easy to rewrite paths / change modes etc in an existing tarball. - -``` js -var extract = tar.extract() -var pack = tar.pack() -var path = require('path') - -extract.on('entry', function(header, stream, callback) { - // let's prefix all names with 'tmp' - header.name = path.join('tmp', header.name) - // write the new entry to the pack stream - stream.pipe(pack.entry(header, callback)) -}) - -extract.on('finish', function() { - // all entries done - lets finalize it - pack.finalize() -}) - -// pipe the old tarball to the extractor -oldTarballStream.pipe(extract) - -// pipe the new tarball the another stream -pack.pipe(newTarballStream) -``` - -## Saving tarball to fs - - -``` js -var fs = require('fs') -var tar = require('tar-stream') - -var pack = tar.pack() // pack is a streams2 stream -var path = 'YourTarBall.tar' -var yourTarball = fs.createWriteStream(path) - -// add a file called YourFile.txt with the content "Hello World!" -pack.entry({name: 'YourFile.txt'}, 'Hello World!', function (err) { - if (err) throw err - pack.finalize() -}) - -// pipe the pack stream to your file -pack.pipe(yourTarball) - -yourTarball.on('close', function () { - console.log(path + ' has been written') - fs.stat(path, function(err, stats) { - if (err) throw err - console.log(stats) - console.log('Got file info successfully!') - }) -}) -``` - -## Performance - -[See tar-fs for a performance comparison with node-tar](https://github.com/mafintosh/tar-fs/blob/master/README.md#performance) - -# License - -MIT diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/extract.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/extract.js deleted file mode 100644 index 8be2a472c6..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/extract.js +++ /dev/null @@ -1,246 +0,0 @@ -var util = require('util') -var bl = require('bl') -var xtend = require('xtend') -var headers = require('./headers') - -var Writable = require('readable-stream').Writable -var PassThrough = require('readable-stream').PassThrough - -var noop = function () {} - -var overflow = function (size) { - size &= 511 - return size && 512 - size -} - -var emptyStream = function (self, offset) { - var s = new Source(self, offset) - s.end() - return s -} - -var mixinPax = function (header, pax) { - if (pax.path) header.name = pax.path - if (pax.linkpath) header.linkname = pax.linkpath - header.pax = pax - return header -} - -var Source = function (self, offset) { - this._parent = self - this.offset = offset - PassThrough.call(this) -} - -util.inherits(Source, PassThrough) - -Source.prototype.destroy = function (err) { - this._parent.destroy(err) -} - -var Extract = function (opts) { - if (!(this instanceof Extract)) return new Extract(opts) - Writable.call(this, opts) - - this._offset = 0 - this._buffer = bl() - this._missing = 0 - this._onparse = noop - this._header = null - this._stream = null - this._overflow = null - this._cb = null - this._locked = false - this._destroyed = false - this._pax = null - this._paxGlobal = null - this._gnuLongPath = null - this._gnuLongLinkPath = null - - var self = this - var b = self._buffer - - var oncontinue = function () { - self._continue() - } - - var onunlock = function (err) { - self._locked = false - if (err) return self.destroy(err) - if (!self._stream) oncontinue() - } - - var onstreamend = function () { - self._stream = null - var drain = overflow(self._header.size) - if (drain) self._parse(drain, ondrain) - else self._parse(512, onheader) - if (!self._locked) oncontinue() - } - - var ondrain = function () { - self._buffer.consume(overflow(self._header.size)) - self._parse(512, onheader) - oncontinue() - } - - var onpaxglobalheader = function () { - var size = self._header.size - self._paxGlobal = headers.decodePax(b.slice(0, size)) - b.consume(size) - onstreamend() - } - - var onpaxheader = function () { - var size = self._header.size - self._pax = headers.decodePax(b.slice(0, size)) - if (self._paxGlobal) self._pax = xtend(self._paxGlobal, self._pax) - b.consume(size) - onstreamend() - } - - var ongnulongpath = function () { - var size = self._header.size - this._gnuLongPath = headers.decodeLongPath(b.slice(0, size)) - b.consume(size) - onstreamend() - } - - var ongnulonglinkpath = function () { - var size = self._header.size - this._gnuLongLinkPath = headers.decodeLongPath(b.slice(0, size)) - b.consume(size) - onstreamend() - } - - var onheader = function () { - var offset = self._offset - var header - try { - header = self._header = headers.decode(b.slice(0, 512)) - } catch (err) { - self.emit('error', err) - } - b.consume(512) - - if (!header) { - self._parse(512, onheader) - oncontinue() - return - } - if (header.type === 'gnu-long-path') { - self._parse(header.size, ongnulongpath) - oncontinue() - return - } - if (header.type === 'gnu-long-link-path') { - self._parse(header.size, ongnulonglinkpath) - oncontinue() - return - } - if (header.type === 'pax-global-header') { - self._parse(header.size, onpaxglobalheader) - oncontinue() - return - } - if (header.type === 'pax-header') { - self._parse(header.size, onpaxheader) - oncontinue() - return - } - - if (self._gnuLongPath) { - header.name = self._gnuLongPath - self._gnuLongPath = null - } - - if (self._gnuLongLinkPath) { - header.linkname = self._gnuLongLinkPath - self._gnuLongLinkPath = null - } - - if (self._pax) { - self._header = header = mixinPax(header, self._pax) - self._pax = null - } - - self._locked = true - - if (!header.size || header.type === 'directory') { - self._parse(512, onheader) - self.emit('entry', header, emptyStream(self, offset), onunlock) - return - } - - self._stream = new Source(self, offset) - - self.emit('entry', header, self._stream, onunlock) - self._parse(header.size, onstreamend) - oncontinue() - } - - this._parse(512, onheader) -} - -util.inherits(Extract, Writable) - -Extract.prototype.destroy = function (err) { - if (this._destroyed) return - this._destroyed = true - - if (err) this.emit('error', err) - this.emit('close') - if (this._stream) this._stream.emit('close') -} - -Extract.prototype._parse = function (size, onparse) { - if (this._destroyed) return - this._offset += size - this._missing = size - this._onparse = onparse -} - -Extract.prototype._continue = function () { - if (this._destroyed) return - var cb = this._cb - this._cb = noop - if (this._overflow) this._write(this._overflow, undefined, cb) - else cb() -} - -Extract.prototype._write = function (data, enc, cb) { - if (this._destroyed) return - - var s = this._stream - var b = this._buffer - var missing = this._missing - - // we do not reach end-of-chunk now. just forward it - - if (data.length < missing) { - this._missing -= data.length - this._overflow = null - if (s) return s.write(data, cb) - b.append(data) - return cb() - } - - // end-of-chunk. the parser should call cb. - - this._cb = cb - this._missing = 0 - - var overflow = null - if (data.length > missing) { - overflow = data.slice(missing) - data = data.slice(0, missing) - } - - if (s) s.end(data) - else b.append(data) - - this._overflow = overflow - this._onparse() -} - -module.exports = Extract diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/headers.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/headers.js deleted file mode 100644 index 8aab8b5618..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/headers.js +++ /dev/null @@ -1,286 +0,0 @@ -var ZEROS = '0000000000000000000' -var SEVENS = '7777777777777777777' -var ZERO_OFFSET = '0'.charCodeAt(0) -var USTAR = 'ustar\x0000' -var MASK = parseInt('7777', 8) - -var clamp = function (index, len, defaultValue) { - if (typeof index !== 'number') return defaultValue - index = ~~index // Coerce to integer. - if (index >= len) return len - if (index >= 0) return index - index += len - if (index >= 0) return index - return 0 -} - -var toType = function (flag) { - switch (flag) { - case 0: - return 'file' - case 1: - return 'link' - case 2: - return 'symlink' - case 3: - return 'character-device' - case 4: - return 'block-device' - case 5: - return 'directory' - case 6: - return 'fifo' - case 7: - return 'contiguous-file' - case 72: - return 'pax-header' - case 55: - return 'pax-global-header' - case 27: - return 'gnu-long-link-path' - case 28: - case 30: - return 'gnu-long-path' - } - - return null -} - -var toTypeflag = function (flag) { - switch (flag) { - case 'file': - return 0 - case 'link': - return 1 - case 'symlink': - return 2 - case 'character-device': - return 3 - case 'block-device': - return 4 - case 'directory': - return 5 - case 'fifo': - return 6 - case 'contiguous-file': - return 7 - case 'pax-header': - return 72 - } - - return 0 -} - -var alloc = function (size) { - var buf = new Buffer(size) - buf.fill(0) - return buf -} - -var indexOf = function (block, num, offset, end) { - for (; offset < end; offset++) { - if (block[offset] === num) return offset - } - return end -} - -var cksum = function (block) { - var sum = 8 * 32 - for (var i = 0; i < 148; i++) sum += block[i] - for (var j = 156; j < 512; j++) sum += block[j] - return sum -} - -var encodeOct = function (val, n) { - val = val.toString(8) - if (val.length > n) return SEVENS.slice(0, n) + ' ' - else return ZEROS.slice(0, n - val.length) + val + ' ' -} - -/* Copied from the node-tar repo and modified to meet - * tar-stream coding standard. - * - * Source: https://github.com/npm/node-tar/blob/51b6627a1f357d2eb433e7378e5f05e83b7aa6cd/lib/header.js#L349 - */ -function parse256 (buf) { - // first byte MUST be either 80 or FF - // 80 for positive, FF for 2's comp - var positive - if (buf[0] === 0x80) positive = true - else if (buf[0] === 0xFF) positive = false - else return null - - // build up a base-256 tuple from the least sig to the highest - var zero = false - var tuple = [] - for (var i = buf.length - 1; i > 0; i--) { - var byte = buf[i] - if (positive) tuple.push(byte) - else if (zero && byte === 0) tuple.push(0) - else if (zero) { - zero = false - tuple.push(0x100 - byte) - } else tuple.push(0xFF - byte) - } - - var sum = 0 - var l = tuple.length - for (i = 0; i < l; i++) { - sum += tuple[i] * Math.pow(256, i) - } - - return positive ? sum : -1 * sum -} - -var decodeOct = function (val, offset, length) { - val = val.slice(offset, offset + length) - offset = 0 - - // If prefixed with 0x80 then parse as a base-256 integer - if (val[offset] & 0x80) { - return parse256(val) - } else { - // Older versions of tar can prefix with spaces - while (offset < val.length && val[offset] === 32) offset++ - var end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length) - while (offset < end && val[offset] === 0) offset++ - if (end === offset) return 0 - return parseInt(val.slice(offset, end).toString(), 8) - } -} - -var decodeStr = function (val, offset, length) { - return val.slice(offset, indexOf(val, 0, offset, offset + length)).toString() -} - -var addLength = function (str) { - var len = Buffer.byteLength(str) - var digits = Math.floor(Math.log(len) / Math.log(10)) + 1 - if (len + digits > Math.pow(10, digits)) digits++ - - return (len + digits) + str -} - -exports.decodeLongPath = function (buf) { - return decodeStr(buf, 0, buf.length) -} - -exports.encodePax = function (opts) { // TODO: encode more stuff in pax - var result = '' - if (opts.name) result += addLength(' path=' + opts.name + '\n') - if (opts.linkname) result += addLength(' linkpath=' + opts.linkname + '\n') - var pax = opts.pax - if (pax) { - for (var key in pax) { - result += addLength(' ' + key + '=' + pax[key] + '\n') - } - } - return new Buffer(result) -} - -exports.decodePax = function (buf) { - var result = {} - - while (buf.length) { - var i = 0 - while (i < buf.length && buf[i] !== 32) i++ - var len = parseInt(buf.slice(0, i).toString(), 10) - if (!len) return result - - var b = buf.slice(i + 1, len - 1).toString() - var keyIndex = b.indexOf('=') - if (keyIndex === -1) return result - result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1) - - buf = buf.slice(len) - } - - return result -} - -exports.encode = function (opts) { - var buf = alloc(512) - var name = opts.name - var prefix = '' - - if (opts.typeflag === 5 && name[name.length - 1] !== '/') name += '/' - if (Buffer.byteLength(name) !== name.length) return null // utf-8 - - while (Buffer.byteLength(name) > 100) { - var i = name.indexOf('/') - if (i === -1) return null - prefix += prefix ? '/' + name.slice(0, i) : name.slice(0, i) - name = name.slice(i + 1) - } - - if (Buffer.byteLength(name) > 100 || Buffer.byteLength(prefix) > 155) return null - if (opts.linkname && Buffer.byteLength(opts.linkname) > 100) return null - - buf.write(name) - buf.write(encodeOct(opts.mode & MASK, 6), 100) - buf.write(encodeOct(opts.uid, 6), 108) - buf.write(encodeOct(opts.gid, 6), 116) - buf.write(encodeOct(opts.size, 11), 124) - buf.write(encodeOct((opts.mtime.getTime() / 1000) | 0, 11), 136) - - buf[156] = ZERO_OFFSET + toTypeflag(opts.type) - - if (opts.linkname) buf.write(opts.linkname, 157) - - buf.write(USTAR, 257) - if (opts.uname) buf.write(opts.uname, 265) - if (opts.gname) buf.write(opts.gname, 297) - buf.write(encodeOct(opts.devmajor || 0, 6), 329) - buf.write(encodeOct(opts.devminor || 0, 6), 337) - - if (prefix) buf.write(prefix, 345) - - buf.write(encodeOct(cksum(buf), 6), 148) - - return buf -} - -exports.decode = function (buf) { - var typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET - - var name = decodeStr(buf, 0, 100) - var mode = decodeOct(buf, 100, 8) - var uid = decodeOct(buf, 108, 8) - var gid = decodeOct(buf, 116, 8) - var size = decodeOct(buf, 124, 12) - var mtime = decodeOct(buf, 136, 12) - var type = toType(typeflag) - var linkname = buf[157] === 0 ? null : decodeStr(buf, 157, 100) - var uname = decodeStr(buf, 265, 32) - var gname = decodeStr(buf, 297, 32) - var devmajor = decodeOct(buf, 329, 8) - var devminor = decodeOct(buf, 337, 8) - - if (buf[345]) name = decodeStr(buf, 345, 155) + '/' + name - - // to support old tar versions that use trailing / to indicate dirs - if (typeflag === 0 && name && name[name.length - 1] === '/') typeflag = 5 - - var c = cksum(buf) - - // checksum is still initial value if header was null. - if (c === 8 * 32) return null - - // valid checksum - if (c !== decodeOct(buf, 148, 8)) throw new Error('Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?') - - return { - name: name, - mode: mode, - uid: uid, - gid: gid, - size: size, - mtime: new Date(1000 * mtime), - type: type, - linkname: linkname, - uname: uname, - gname: gname, - devmajor: devmajor, - devminor: devminor - } -} diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/index.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/index.js deleted file mode 100644 index 6481704827..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.extract = require('./extract') -exports.pack = require('./pack') diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.npmignore b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.npmignore deleted file mode 100644 index 40b878db5b..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ \ No newline at end of file diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.travis.yml b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.travis.yml deleted file mode 100644 index 8c6fc48103..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -sudo: false -language: node_js -node_js: - - '0.10' - - '0.12' - - '4' - - '6' - - '7' -branches: - only: - - master -notifications: - email: - - rod@vagg.org - - matteo.collina@gmail.com diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/LICENSE.md b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/LICENSE.md deleted file mode 100644 index ff35a34728..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/LICENSE.md +++ /dev/null @@ -1,13 +0,0 @@ -The MIT License (MIT) -===================== - -Copyright (c) 2013-2016 bl contributors ----------------------------------- - -*bl contributors listed at * - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 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/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/README.md b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/README.md deleted file mode 100644 index da0c18338e..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/README.md +++ /dev/null @@ -1,208 +0,0 @@ -# bl *(BufferList)* - -[![Build Status](https://travis-ci.org/rvagg/bl.svg?branch=master)](https://travis-ci.org/rvagg/bl) - -**A Node.js Buffer list collector, reader and streamer thingy.** - -[![NPM](https://nodei.co/npm/bl.png?downloads=true&downloadRank=true)](https://nodei.co/npm/bl/) -[![NPM](https://nodei.co/npm-dl/bl.png?months=6&height=3)](https://nodei.co/npm/bl/) - -**bl** is a storage object for collections of Node Buffers, exposing them with the main Buffer readable API. Also works as a duplex stream so you can collect buffers from a stream that emits them and emit buffers to a stream that consumes them! - -The original buffers are kept intact and copies are only done as necessary. Any reads that require the use of a single original buffer will return a slice of that buffer only (which references the same memory as the original buffer). Reads that span buffers perform concatenation as required and return the results transparently. - -```js -const BufferList = require('bl') - -var bl = new BufferList() -bl.append(new Buffer('abcd')) -bl.append(new Buffer('efg')) -bl.append('hi') // bl will also accept & convert Strings -bl.append(new Buffer('j')) -bl.append(new Buffer([ 0x3, 0x4 ])) - -console.log(bl.length) // 12 - -console.log(bl.slice(0, 10).toString('ascii')) // 'abcdefghij' -console.log(bl.slice(3, 10).toString('ascii')) // 'defghij' -console.log(bl.slice(3, 6).toString('ascii')) // 'def' -console.log(bl.slice(3, 8).toString('ascii')) // 'defgh' -console.log(bl.slice(5, 10).toString('ascii')) // 'fghij' - -// or just use toString! -console.log(bl.toString()) // 'abcdefghij\u0003\u0004' -console.log(bl.toString('ascii', 3, 8)) // 'defgh' -console.log(bl.toString('ascii', 5, 10)) // 'fghij' - -// other standard Buffer readables -console.log(bl.readUInt16BE(10)) // 0x0304 -console.log(bl.readUInt16LE(10)) // 0x0403 -``` - -Give it a callback in the constructor and use it just like **[concat-stream](https://github.com/maxogden/node-concat-stream)**: - -```js -const bl = require('bl') - , fs = require('fs') - -fs.createReadStream('README.md') - .pipe(bl(function (err, data) { // note 'new' isn't strictly required - // `data` is a complete Buffer object containing the full data - console.log(data.toString()) - })) -``` - -Note that when you use the *callback* method like this, the resulting `data` parameter is a concatenation of all `Buffer` objects in the list. If you want to avoid the overhead of this concatenation (in cases of extreme performance consciousness), then avoid the *callback* method and just listen to `'end'` instead, like a standard Stream. - -Or to fetch a URL using [hyperquest](https://github.com/substack/hyperquest) (should work with [request](http://github.com/mikeal/request) and even plain Node http too!): -```js -const hyperquest = require('hyperquest') - , bl = require('bl') - , url = 'https://raw.github.com/rvagg/bl/master/README.md' - -hyperquest(url).pipe(bl(function (err, data) { - console.log(data.toString()) -})) -``` - -Or, use it as a readable stream to recompose a list of Buffers to an output source: - -```js -const BufferList = require('bl') - , fs = require('fs') - -var bl = new BufferList() -bl.append(new Buffer('abcd')) -bl.append(new Buffer('efg')) -bl.append(new Buffer('hi')) -bl.append(new Buffer('j')) - -bl.pipe(fs.createWriteStream('gibberish.txt')) -``` - -## API - - * new BufferList([ callback ]) - * bl.length - * bl.append(buffer) - * bl.get(index) - * bl.slice([ start[, end ] ]) - * bl.shallowSlice([ start[, end ] ]) - * bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) - * bl.duplicate() - * bl.consume(bytes) - * bl.toString([encoding, [ start, [ end ]]]) - * bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() - * Streams - --------------------------------------------------------- - -### new BufferList([ callback | Buffer | Buffer array | BufferList | BufferList array | String ]) -The constructor takes an optional callback, if supplied, the callback will be called with an error argument followed by a reference to the **bl** instance, when `bl.end()` is called (i.e. from a piped stream). This is a convenient method of collecting the entire contents of a stream, particularly when the stream is *chunky*, such as a network stream. - -Normally, no arguments are required for the constructor, but you can initialise the list by passing in a single `Buffer` object or an array of `Buffer` object. - -`new` is not strictly required, if you don't instantiate a new object, it will be done automatically for you so you can create a new instance simply with: - -```js -var bl = require('bl') -var myinstance = bl() - -// equivilant to: - -var BufferList = require('bl') -var myinstance = new BufferList() -``` - --------------------------------------------------------- - -### bl.length -Get the length of the list in bytes. This is the sum of the lengths of all of the buffers contained in the list, minus any initial offset for a semi-consumed buffer at the beginning. Should accurately represent the total number of bytes that can be read from the list. - --------------------------------------------------------- - -### bl.append(Buffer | Buffer array | BufferList | BufferList array | String) -`append(buffer)` adds an additional buffer or BufferList to the internal list. `this` is returned so it can be chained. - --------------------------------------------------------- - -### bl.get(index) -`get()` will return the byte at the specified index. - --------------------------------------------------------- - -### bl.slice([ start, [ end ] ]) -`slice()` returns a new `Buffer` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively. - -If the requested range spans a single internal buffer then a slice of that buffer will be returned which shares the original memory range of that Buffer. If the range spans multiple buffers then copy operations will likely occur to give you a uniform Buffer. - --------------------------------------------------------- - -### bl.shallowSlice([ start, [ end ] ]) -`shallowSlice()` returns a new `BufferList` object containing the bytes within the range specified. Both `start` and `end` are optional and will default to the beginning and end of the list respectively. - -No copies will be performed. All buffers in the result share memory with the original list. - --------------------------------------------------------- - -### bl.copy(dest, [ destStart, [ srcStart [, srcEnd ] ] ]) -`copy()` copies the content of the list in the `dest` buffer, starting from `destStart` and containing the bytes within the range specified with `srcStart` to `srcEnd`. `destStart`, `start` and `end` are optional and will default to the beginning of the `dest` buffer, and the beginning and end of the list respectively. - --------------------------------------------------------- - -### bl.duplicate() -`duplicate()` performs a **shallow-copy** of the list. The internal Buffers remains the same, so if you change the underlying Buffers, the change will be reflected in both the original and the duplicate. This method is needed if you want to call `consume()` or `pipe()` and still keep the original list.Example: - -```js -var bl = new BufferList() - -bl.append('hello') -bl.append(' world') -bl.append('\n') - -bl.duplicate().pipe(process.stdout, { end: false }) - -console.log(bl.toString()) -``` - --------------------------------------------------------- - -### bl.consume(bytes) -`consume()` will shift bytes *off the start of the list*. The number of bytes consumed don't need to line up with the sizes of the internal Buffers—initial offsets will be calculated accordingly in order to give you a consistent view of the data. - --------------------------------------------------------- - -### bl.toString([encoding, [ start, [ end ]]]) -`toString()` will return a string representation of the buffer. The optional `start` and `end` arguments are passed on to `slice()`, while the `encoding` is passed on to `toString()` of the resulting Buffer. See the [Buffer#toString()](http://nodejs.org/docs/latest/api/buffer.html#buffer_buf_tostring_encoding_start_end) documentation for more information. - --------------------------------------------------------- - -### bl.readDoubleBE(), bl.readDoubleLE(), bl.readFloatBE(), bl.readFloatLE(), bl.readInt32BE(), bl.readInt32LE(), bl.readUInt32BE(), bl.readUInt32LE(), bl.readInt16BE(), bl.readInt16LE(), bl.readUInt16BE(), bl.readUInt16LE(), bl.readInt8(), bl.readUInt8() - -All of the standard byte-reading methods of the `Buffer` interface are implemented and will operate across internal Buffer boundaries transparently. - -See the [Buffer](http://nodejs.org/docs/latest/api/buffer.html) documentation for how these work. - --------------------------------------------------------- - -### Streams -**bl** is a Node **[Duplex Stream](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_duplex)**, so it can be read from and written to like a standard Node stream. You can also `pipe()` to and from a **bl** instance. - --------------------------------------------------------- - -## Contributors - -**bl** is brought to you by the following hackers: - - * [Rod Vagg](https://github.com/rvagg) - * [Matteo Collina](https://github.com/mcollina) - * [Jarett Cruger](https://github.com/jcrugzz) - -======= - - -## License & copyright - -Copyright (c) 2013-2016 bl contributors (listed above). - -bl is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details. diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/bl.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/bl.js deleted file mode 100644 index 98983316c4..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/bl.js +++ /dev/null @@ -1,280 +0,0 @@ -var DuplexStream = require('readable-stream/duplex') - , util = require('util') - - -function BufferList (callback) { - if (!(this instanceof BufferList)) - return new BufferList(callback) - - this._bufs = [] - this.length = 0 - - if (typeof callback == 'function') { - this._callback = callback - - var piper = function piper (err) { - if (this._callback) { - this._callback(err) - this._callback = null - } - }.bind(this) - - this.on('pipe', function onPipe (src) { - src.on('error', piper) - }) - this.on('unpipe', function onUnpipe (src) { - src.removeListener('error', piper) - }) - } else { - this.append(callback) - } - - DuplexStream.call(this) -} - - -util.inherits(BufferList, DuplexStream) - - -BufferList.prototype._offset = function _offset (offset) { - var tot = 0, i = 0, _t - if (offset === 0) return [ 0, 0 ] - for (; i < this._bufs.length; i++) { - _t = tot + this._bufs[i].length - if (offset < _t || i == this._bufs.length - 1) - return [ i, offset - tot ] - tot = _t - } -} - - -BufferList.prototype.append = function append (buf) { - var i = 0 - - if (Buffer.isBuffer(buf)) { - this._appendBuffer(buf); - } else if (Array.isArray(buf)) { - for (; i < buf.length; i++) - this.append(buf[i]) - } else if (buf instanceof BufferList) { - // unwrap argument into individual BufferLists - for (; i < buf._bufs.length; i++) - this.append(buf._bufs[i]) - } else if (buf != null) { - // coerce number arguments to strings, since Buffer(number) does - // uninitialized memory allocation - if (typeof buf == 'number') - buf = buf.toString() - - this._appendBuffer(new Buffer(buf)); - } - - return this -} - - -BufferList.prototype._appendBuffer = function appendBuffer (buf) { - this._bufs.push(buf) - this.length += buf.length -} - - -BufferList.prototype._write = function _write (buf, encoding, callback) { - this._appendBuffer(buf) - - if (typeof callback == 'function') - callback() -} - - -BufferList.prototype._read = function _read (size) { - if (!this.length) - return this.push(null) - - size = Math.min(size, this.length) - this.push(this.slice(0, size)) - this.consume(size) -} - - -BufferList.prototype.end = function end (chunk) { - DuplexStream.prototype.end.call(this, chunk) - - if (this._callback) { - this._callback(null, this.slice()) - this._callback = null - } -} - - -BufferList.prototype.get = function get (index) { - return this.slice(index, index + 1)[0] -} - - -BufferList.prototype.slice = function slice (start, end) { - if (typeof start == 'number' && start < 0) - start += this.length - if (typeof end == 'number' && end < 0) - end += this.length - return this.copy(null, 0, start, end) -} - - -BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) { - if (typeof srcStart != 'number' || srcStart < 0) - srcStart = 0 - if (typeof srcEnd != 'number' || srcEnd > this.length) - srcEnd = this.length - if (srcStart >= this.length) - return dst || new Buffer(0) - if (srcEnd <= 0) - return dst || new Buffer(0) - - var copy = !!dst - , off = this._offset(srcStart) - , len = srcEnd - srcStart - , bytes = len - , bufoff = (copy && dstStart) || 0 - , start = off[1] - , l - , i - - // copy/slice everything - if (srcStart === 0 && srcEnd == this.length) { - if (!copy) { // slice, but full concat if multiple buffers - return this._bufs.length === 1 - ? this._bufs[0] - : Buffer.concat(this._bufs, this.length) - } - - // copy, need to copy individual buffers - for (i = 0; i < this._bufs.length; i++) { - this._bufs[i].copy(dst, bufoff) - bufoff += this._bufs[i].length - } - - return dst - } - - // easy, cheap case where it's a subset of one of the buffers - if (bytes <= this._bufs[off[0]].length - start) { - return copy - ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) - : this._bufs[off[0]].slice(start, start + bytes) - } - - if (!copy) // a slice, we need something to copy in to - dst = new Buffer(len) - - for (i = off[0]; i < this._bufs.length; i++) { - l = this._bufs[i].length - start - - if (bytes > l) { - this._bufs[i].copy(dst, bufoff, start) - } else { - this._bufs[i].copy(dst, bufoff, start, start + bytes) - break - } - - bufoff += l - bytes -= l - - if (start) - start = 0 - } - - return dst -} - -BufferList.prototype.shallowSlice = function shallowSlice (start, end) { - start = start || 0 - end = end || this.length - - if (start < 0) - start += this.length - if (end < 0) - end += this.length - - var startOffset = this._offset(start) - , endOffset = this._offset(end) - , buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1) - - if (endOffset[1] == 0) - buffers.pop() - else - buffers[buffers.length-1] = buffers[buffers.length-1].slice(0, endOffset[1]) - - if (startOffset[1] != 0) - buffers[0] = buffers[0].slice(startOffset[1]) - - return new BufferList(buffers) -} - -BufferList.prototype.toString = function toString (encoding, start, end) { - return this.slice(start, end).toString(encoding) -} - -BufferList.prototype.consume = function consume (bytes) { - while (this._bufs.length) { - if (bytes >= this._bufs[0].length) { - bytes -= this._bufs[0].length - this.length -= this._bufs[0].length - this._bufs.shift() - } else { - this._bufs[0] = this._bufs[0].slice(bytes) - this.length -= bytes - break - } - } - return this -} - - -BufferList.prototype.duplicate = function duplicate () { - var i = 0 - , copy = new BufferList() - - for (; i < this._bufs.length; i++) - copy.append(this._bufs[i]) - - return copy -} - - -BufferList.prototype.destroy = function destroy () { - this._bufs.length = 0 - this.length = 0 - this.push(null) -} - - -;(function () { - var methods = { - 'readDoubleBE' : 8 - , 'readDoubleLE' : 8 - , 'readFloatBE' : 4 - , 'readFloatLE' : 4 - , 'readInt32BE' : 4 - , 'readInt32LE' : 4 - , 'readUInt32BE' : 4 - , 'readUInt32LE' : 4 - , 'readInt16BE' : 2 - , 'readInt16LE' : 2 - , 'readUInt16BE' : 2 - , 'readUInt16LE' : 2 - , 'readInt8' : 1 - , 'readUInt8' : 1 - } - - for (var m in methods) { - (function (m) { - BufferList.prototype[m] = function (offset) { - return this.slice(offset, offset + methods[m])[m](0) - } - }(m)) - } -}()) - - -module.exports = BufferList diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/package.json b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/package.json deleted file mode 100644 index 89a0dbcd04..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "bl@^1.0.0", - "_id": "bl@1.2.1", - "_integrity": "sha1-ysMo977kVzDUBLaSID/LWQ4XLV4=", - "_location": "/pacote/tar-stream/bl", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "bl@^1.0.0", - "name": "bl", - "escapedName": "bl", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/pacote/tar-stream" - ], - "_resolved": "https://registry.npmjs.org/bl/-/bl-1.2.1.tgz", - "_shasum": "cac328f7bee45730d404b692203fcb590e172d5e", - "_shrinkwrap": null, - "_spec": "bl@^1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/tar-stream", - "authors": [ - "Rod Vagg (https://github.com/rvagg)", - "Matteo Collina (https://github.com/mcollina)", - "Jarett Cruger (https://github.com/jcrugzz)" - ], - "bin": null, - "bugs": { - "url": "https://github.com/rvagg/bl/issues" - }, - "bundleDependencies": false, - "dependencies": { - "readable-stream": "^2.0.5" - }, - "deprecated": false, - "description": "Buffer List: collect buffers and access with a standard readable Buffer interface, streamable too!", - "devDependencies": { - "faucet": "0.0.1", - "hash_file": "~0.1.1", - "tape": "~4.6.0" - }, - "homepage": "https://github.com/rvagg/bl", - "keywords": [ - "buffer", - "buffers", - "stream", - "awesomesauce" - ], - "license": "MIT", - "main": "bl.js", - "name": "bl", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/rvagg/bl.git" - }, - "scripts": { - "test": "node test/test.js | faucet" - }, - "version": "1.2.1" -} diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/test/test.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/test/test.js deleted file mode 100644 index 396974ec16..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/bl/test/test.js +++ /dev/null @@ -1,701 +0,0 @@ -var tape = require('tape') - , crypto = require('crypto') - , fs = require('fs') - , hash = require('hash_file') - , BufferList = require('../') - - , encodings = - ('hex utf8 utf-8 ascii binary base64' - + (process.browser ? '' : ' ucs2 ucs-2 utf16le utf-16le')).split(' ') - -tape('single bytes from single buffer', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abcd')) - - t.equal(bl.length, 4) - - t.equal(bl.get(0), 97) - t.equal(bl.get(1), 98) - t.equal(bl.get(2), 99) - t.equal(bl.get(3), 100) - - t.end() -}) - -tape('single bytes from multiple buffers', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.length, 10) - - t.equal(bl.get(0), 97) - t.equal(bl.get(1), 98) - t.equal(bl.get(2), 99) - t.equal(bl.get(3), 100) - t.equal(bl.get(4), 101) - t.equal(bl.get(5), 102) - t.equal(bl.get(6), 103) - t.equal(bl.get(7), 104) - t.equal(bl.get(8), 105) - t.equal(bl.get(9), 106) - t.end() -}) - -tape('multi bytes from single buffer', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abcd')) - - t.equal(bl.length, 4) - - t.equal(bl.slice(0, 4).toString('ascii'), 'abcd') - t.equal(bl.slice(0, 3).toString('ascii'), 'abc') - t.equal(bl.slice(1, 4).toString('ascii'), 'bcd') - t.equal(bl.slice(-4, -1).toString('ascii'), 'abc') - - t.end() -}) - -tape('multi bytes from single buffer (negative indexes)', function (t) { - var bl = new BufferList() - bl.append(new Buffer('buffer')) - - t.equal(bl.length, 6) - - t.equal(bl.slice(-6, -1).toString('ascii'), 'buffe') - t.equal(bl.slice(-6, -2).toString('ascii'), 'buff') - t.equal(bl.slice(-5, -2).toString('ascii'), 'uff') - - t.end() -}) - -tape('multiple bytes from multiple buffers', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') - t.equal(bl.slice(3, 6).toString('ascii'), 'def') - t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') - t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') - t.equal(bl.slice(-7, -4).toString('ascii'), 'def') - - t.end() -}) - -tape('multiple bytes from multiple buffer lists', function (t) { - var bl = new BufferList() - - bl.append(new BufferList([ new Buffer('abcd'), new Buffer('efg') ])) - bl.append(new BufferList([ new Buffer('hi'), new Buffer('j') ])) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - - t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') - t.equal(bl.slice(3, 6).toString('ascii'), 'def') - t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') - t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') - - t.end() -}) - -// same data as previous test, just using nested constructors -tape('multiple bytes from crazy nested buffer lists', function (t) { - var bl = new BufferList() - - bl.append(new BufferList([ - new BufferList([ - new BufferList(new Buffer('abc')) - , new Buffer('d') - , new BufferList(new Buffer('efg')) - ]) - , new BufferList([ new Buffer('hi') ]) - , new BufferList(new Buffer('j')) - ])) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - - t.equal(bl.slice(3, 10).toString('ascii'), 'defghij') - t.equal(bl.slice(3, 6).toString('ascii'), 'def') - t.equal(bl.slice(3, 8).toString('ascii'), 'defgh') - t.equal(bl.slice(5, 10).toString('ascii'), 'fghij') - - t.end() -}) - -tape('append accepts arrays of Buffers', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abc')) - bl.append([ new Buffer('def') ]) - bl.append([ new Buffer('ghi'), new Buffer('jkl') ]) - bl.append([ new Buffer('mnop'), new Buffer('qrstu'), new Buffer('vwxyz') ]) - t.equal(bl.length, 26) - t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') - t.end() -}) - -tape('append accepts arrays of BufferLists', function (t) { - var bl = new BufferList() - bl.append(new Buffer('abc')) - bl.append([ new BufferList('def') ]) - bl.append(new BufferList([ new Buffer('ghi'), new BufferList('jkl') ])) - bl.append([ new Buffer('mnop'), new BufferList([ new Buffer('qrstu'), new Buffer('vwxyz') ]) ]) - t.equal(bl.length, 26) - t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') - t.end() -}) - -tape('append chainable', function (t) { - var bl = new BufferList() - t.ok(bl.append(new Buffer('abcd')) === bl) - t.ok(bl.append([ new Buffer('abcd') ]) === bl) - t.ok(bl.append(new BufferList(new Buffer('abcd'))) === bl) - t.ok(bl.append([ new BufferList(new Buffer('abcd')) ]) === bl) - t.end() -}) - -tape('append chainable (test results)', function (t) { - var bl = new BufferList('abc') - .append([ new BufferList('def') ]) - .append(new BufferList([ new Buffer('ghi'), new BufferList('jkl') ])) - .append([ new Buffer('mnop'), new BufferList([ new Buffer('qrstu'), new Buffer('vwxyz') ]) ]) - - t.equal(bl.length, 26) - t.equal(bl.slice().toString('ascii'), 'abcdefghijklmnopqrstuvwxyz') - t.end() -}) - -tape('consuming from multiple buffers', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.length, 10) - - t.equal(bl.slice(0, 10).toString('ascii'), 'abcdefghij') - - bl.consume(3) - t.equal(bl.length, 7) - t.equal(bl.slice(0, 7).toString('ascii'), 'defghij') - - bl.consume(2) - t.equal(bl.length, 5) - t.equal(bl.slice(0, 5).toString('ascii'), 'fghij') - - bl.consume(1) - t.equal(bl.length, 4) - t.equal(bl.slice(0, 4).toString('ascii'), 'ghij') - - bl.consume(1) - t.equal(bl.length, 3) - t.equal(bl.slice(0, 3).toString('ascii'), 'hij') - - bl.consume(2) - t.equal(bl.length, 1) - t.equal(bl.slice(0, 1).toString('ascii'), 'j') - - t.end() -}) - -tape('complete consumption', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('a')) - bl.append(new Buffer('b')) - - bl.consume(2) - - t.equal(bl.length, 0) - t.equal(bl._bufs.length, 0) - - t.end() -}) - -tape('test readUInt8 / readInt8', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt8(2), 0x3) - t.equal(bl.readInt8(2), 0x3) - t.equal(bl.readUInt8(3), 0x4) - t.equal(bl.readInt8(3), 0x4) - t.equal(bl.readUInt8(4), 0x23) - t.equal(bl.readInt8(4), 0x23) - t.equal(bl.readUInt8(5), 0x42) - t.equal(bl.readInt8(5), 0x42) - t.end() -}) - -tape('test readUInt16LE / readUInt16BE / readInt16LE / readInt16BE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt16BE(2), 0x0304) - t.equal(bl.readUInt16LE(2), 0x0403) - t.equal(bl.readInt16BE(2), 0x0304) - t.equal(bl.readInt16LE(2), 0x0403) - t.equal(bl.readUInt16BE(3), 0x0423) - t.equal(bl.readUInt16LE(3), 0x2304) - t.equal(bl.readInt16BE(3), 0x0423) - t.equal(bl.readInt16LE(3), 0x2304) - t.equal(bl.readUInt16BE(4), 0x2342) - t.equal(bl.readUInt16LE(4), 0x4223) - t.equal(bl.readInt16BE(4), 0x2342) - t.equal(bl.readInt16LE(4), 0x4223) - t.end() -}) - -tape('test readUInt32LE / readUInt32BE / readInt32LE / readInt32BE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x3 - buf2[2] = 0x4 - buf3[0] = 0x23 - buf3[1] = 0x42 - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readUInt32BE(2), 0x03042342) - t.equal(bl.readUInt32LE(2), 0x42230403) - t.equal(bl.readInt32BE(2), 0x03042342) - t.equal(bl.readInt32LE(2), 0x42230403) - t.end() -}) - -tape('test readFloatLE / readFloatBE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(3) - , bl = new BufferList() - - buf2[1] = 0x00 - buf2[2] = 0x00 - buf3[0] = 0x80 - buf3[1] = 0x3f - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readFloatLE(2), 0x01) - t.end() -}) - -tape('test readDoubleLE / readDoubleBE', function (t) { - var buf1 = new Buffer(1) - , buf2 = new Buffer(3) - , buf3 = new Buffer(10) - , bl = new BufferList() - - buf2[1] = 0x55 - buf2[2] = 0x55 - buf3[0] = 0x55 - buf3[1] = 0x55 - buf3[2] = 0x55 - buf3[3] = 0x55 - buf3[4] = 0xd5 - buf3[5] = 0x3f - - bl.append(buf1) - bl.append(buf2) - bl.append(buf3) - - t.equal(bl.readDoubleLE(2), 0.3333333333333333) - t.end() -}) - -tape('test toString', function (t) { - var bl = new BufferList() - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - - t.equal(bl.toString('ascii', 0, 10), 'abcdefghij') - t.equal(bl.toString('ascii', 3, 10), 'defghij') - t.equal(bl.toString('ascii', 3, 6), 'def') - t.equal(bl.toString('ascii', 3, 8), 'defgh') - t.equal(bl.toString('ascii', 5, 10), 'fghij') - - t.end() -}) - -tape('test toString encoding', function (t) { - var bl = new BufferList() - , b = new Buffer('abcdefghij\xff\x00') - - bl.append(new Buffer('abcd')) - bl.append(new Buffer('efg')) - bl.append(new Buffer('hi')) - bl.append(new Buffer('j')) - bl.append(new Buffer('\xff\x00')) - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc), enc) - }) - - t.end() -}) - -!process.browser && tape('test stream', function (t) { - var random = crypto.randomBytes(65534) - , rndhash = hash(random, 'md5') - , md5sum = crypto.createHash('md5') - , bl = new BufferList(function (err, buf) { - t.ok(Buffer.isBuffer(buf)) - t.ok(err === null) - t.equal(rndhash, hash(bl.slice(), 'md5')) - t.equal(rndhash, hash(buf, 'md5')) - - bl.pipe(fs.createWriteStream('/tmp/bl_test_rnd_out.dat')) - .on('close', function () { - var s = fs.createReadStream('/tmp/bl_test_rnd_out.dat') - s.on('data', md5sum.update.bind(md5sum)) - s.on('end', function() { - t.equal(rndhash, md5sum.digest('hex'), 'woohoo! correct hash!') - t.end() - }) - }) - - }) - - fs.writeFileSync('/tmp/bl_test_rnd.dat', random) - fs.createReadStream('/tmp/bl_test_rnd.dat').pipe(bl) -}) - -tape('instantiation with Buffer', function (t) { - var buf = crypto.randomBytes(1024) - , buf2 = crypto.randomBytes(1024) - , b = BufferList(buf) - - t.equal(buf.toString('hex'), b.slice().toString('hex'), 'same buffer') - b = BufferList([ buf, buf2 ]) - t.equal(b.slice().toString('hex'), Buffer.concat([ buf, buf2 ]).toString('hex'), 'same buffer') - t.end() -}) - -tape('test String appendage', function (t) { - var bl = new BufferList() - , b = new Buffer('abcdefghij\xff\x00') - - bl.append('abcd') - bl.append('efg') - bl.append('hi') - bl.append('j') - bl.append('\xff\x00') - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc)) - }) - - t.end() -}) - -tape('test Number appendage', function (t) { - var bl = new BufferList() - , b = new Buffer('1234567890') - - bl.append(1234) - bl.append(567) - bl.append(89) - bl.append(0) - - encodings.forEach(function (enc) { - t.equal(bl.toString(enc), b.toString(enc)) - }) - - t.end() -}) - -tape('write nothing, should get empty buffer', function (t) { - t.plan(3) - BufferList(function (err, data) { - t.notOk(err, 'no error') - t.ok(Buffer.isBuffer(data), 'got a buffer') - t.equal(0, data.length, 'got a zero-length buffer') - t.end() - }).end() -}) - -tape('unicode string', function (t) { - t.plan(2) - var inp1 = '\u2600' - , inp2 = '\u2603' - , exp = inp1 + ' and ' + inp2 - , bl = BufferList() - bl.write(inp1) - bl.write(' and ') - bl.write(inp2) - t.equal(exp, bl.toString()) - t.equal(new Buffer(exp).toString('hex'), bl.toString('hex')) -}) - -tape('should emit finish', function (t) { - var source = BufferList() - , dest = BufferList() - - source.write('hello') - source.pipe(dest) - - dest.on('finish', function () { - t.equal(dest.toString('utf8'), 'hello') - t.end() - }) -}) - -tape('basic copy', function (t) { - var buf = crypto.randomBytes(1024) - , buf2 = new Buffer(1024) - , b = BufferList(buf) - - b.copy(buf2) - t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy after many appends', function (t) { - var buf = crypto.randomBytes(512) - , buf2 = new Buffer(1024) - , b = BufferList(buf) - - b.append(buf) - b.copy(buf2) - t.equal(b.slice().toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy at a precise position', function (t) { - var buf = crypto.randomBytes(1004) - , buf2 = new Buffer(1024) - , b = BufferList(buf) - - b.copy(buf2, 20) - t.equal(b.slice().toString('hex'), buf2.slice(20).toString('hex'), 'same buffer') - t.end() -}) - -tape('copy starting from a precise location', function (t) { - var buf = crypto.randomBytes(10) - , buf2 = new Buffer(5) - , b = BufferList(buf) - - b.copy(buf2, 0, 5) - t.equal(b.slice(5).toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy in an interval', function (t) { - var rnd = crypto.randomBytes(10) - , b = BufferList(rnd) // put the random bytes there - , actual = new Buffer(3) - , expected = new Buffer(3) - - rnd.copy(expected, 0, 5, 8) - b.copy(actual, 0, 5, 8) - - t.equal(actual.toString('hex'), expected.toString('hex'), 'same buffer') - t.end() -}) - -tape('copy an interval between two buffers', function (t) { - var buf = crypto.randomBytes(10) - , buf2 = new Buffer(10) - , b = BufferList(buf) - - b.append(buf) - b.copy(buf2, 0, 5, 15) - - t.equal(b.slice(5, 15).toString('hex'), buf2.toString('hex'), 'same buffer') - t.end() -}) - -tape('shallow slice across buffer boundaries', function (t) { - var bl = new BufferList(['First', 'Second', 'Third']) - - t.equal(bl.shallowSlice(3, 13).toString(), 'stSecondTh') - t.end() -}) - -tape('shallow slice within single buffer', function (t) { - t.plan(2) - var bl = new BufferList(['First', 'Second', 'Third']) - - t.equal(bl.shallowSlice(5, 10).toString(), 'Secon') - t.equal(bl.shallowSlice(7, 10).toString(), 'con') - t.end() -}) - -tape('shallow slice single buffer', function (t) { - t.plan(3) - var bl = new BufferList(['First', 'Second', 'Third']) - - t.equal(bl.shallowSlice(0, 5).toString(), 'First') - t.equal(bl.shallowSlice(5, 11).toString(), 'Second') - t.equal(bl.shallowSlice(11, 16).toString(), 'Third') -}) - -tape('shallow slice with negative or omitted indices', function (t) { - t.plan(4) - var bl = new BufferList(['First', 'Second', 'Third']) - - t.equal(bl.shallowSlice().toString(), 'FirstSecondThird') - t.equal(bl.shallowSlice(5).toString(), 'SecondThird') - t.equal(bl.shallowSlice(5, -3).toString(), 'SecondTh') - t.equal(bl.shallowSlice(-8).toString(), 'ondThird') -}) - -tape('shallow slice does not make a copy', function (t) { - t.plan(1) - var buffers = [new Buffer('First'), new Buffer('Second'), new Buffer('Third')] - var bl = (new BufferList(buffers)).shallowSlice(5, -3) - - buffers[1].fill('h') - buffers[2].fill('h') - - t.equal(bl.toString(), 'hhhhhhhh') -}) - -tape('duplicate', function (t) { - t.plan(2) - - var bl = new BufferList('abcdefghij\xff\x00') - , dup = bl.duplicate() - - t.equal(bl.prototype, dup.prototype) - t.equal(bl.toString('hex'), dup.toString('hex')) -}) - -tape('destroy no pipe', function (t) { - t.plan(2) - - var bl = new BufferList('alsdkfja;lsdkfja;lsdk') - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) -}) - -!process.browser && tape('destroy with pipe before read end', function (t) { - t.plan(2) - - var bl = new BufferList() - fs.createReadStream(__dirname + '/test.js') - .pipe(bl) - - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - -}) - -!process.browser && tape('destroy with pipe before read end with race', function (t) { - t.plan(2) - - var bl = new BufferList() - fs.createReadStream(__dirname + '/test.js') - .pipe(bl) - - setTimeout(function () { - bl.destroy() - setTimeout(function () { - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - }, 500) - }, 500) -}) - -!process.browser && tape('destroy with pipe after read end', function (t) { - t.plan(2) - - var bl = new BufferList() - fs.createReadStream(__dirname + '/test.js') - .on('end', onEnd) - .pipe(bl) - - function onEnd () { - bl.destroy() - - t.equal(bl._bufs.length, 0) - t.equal(bl.length, 0) - } -}) - -!process.browser && tape('destroy with pipe while writing to a destination', function (t) { - t.plan(4) - - var bl = new BufferList() - , ds = new BufferList() - - fs.createReadStream(__dirname + '/test.js') - .on('end', onEnd) - .pipe(bl) - - function onEnd () { - bl.pipe(ds) - - setTimeout(function () { - bl.destroy() - - t.equals(bl._bufs.length, 0) - t.equals(bl.length, 0) - - ds.destroy() - - t.equals(bl._bufs.length, 0) - t.equals(bl.length, 0) - - }, 100) - } -}) - -!process.browser && tape('handle error', function (t) { - t.plan(2) - fs.createReadStream('/does/not/exist').pipe(BufferList(function (err, data) { - t.ok(err instanceof Error, 'has error') - t.notOk(data, 'no data') - })) -}) diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/LICENSE b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/LICENSE deleted file mode 100644 index 757562ec59..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -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/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/README.md b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/README.md deleted file mode 100644 index f2560c939d..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# 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 - -## 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/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/index.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/index.js deleted file mode 100644 index b3a9068634..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/index.js +++ /dev/null @@ -1,83 +0,0 @@ -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 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 onclose = function() { - if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); - if (writable && !(ws && ws.ended)) 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', callback); - stream.on('close', onclose); - - return function() { - stream.removeListener('complete', onfinish); - stream.removeListener('abort', onclose); - stream.removeListener('request', onrequest); - if (stream.req) stream.req.removeListener('finish', onfinish); - stream.removeListener('end', onlegacyfinish); - stream.removeListener('close', onlegacyfinish); - stream.removeListener('finish', onfinish); - stream.removeListener('exit', onexit); - stream.removeListener('end', onend); - stream.removeListener('error', callback); - stream.removeListener('close', onclose); - }; -}; - -module.exports = eos; diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/package.json b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/package.json deleted file mode 100644 index 66ece80623..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/end-of-stream/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "end-of-stream@^1.0.0", - "_id": "end-of-stream@1.4.0", - "_integrity": "sha1-epDYM+/abPpurA9JSduw+tOmMgY=", - "_location": "/pacote/tar-stream/end-of-stream", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "end-of-stream@^1.0.0", - "name": "end-of-stream", - "escapedName": "end-of-stream", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/pacote/tar-stream" - ], - "_resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.0.tgz", - "_shasum": "7a90d833efda6cfa6eac0f4949dbb0fad3a63206", - "_shrinkwrap": null, - "_spec": "end-of-stream@^1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/tar-stream", - "author": { - "name": "Mathias Buus", - "email": "mathiasbuus@gmail.com" - }, - "bin": null, - "bugs": { - "url": "https://github.com/mafintosh/end-of-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "once": "^1.4.0" - }, - "deprecated": false, - "description": "Call a callback when a readable/writable/duplex stream has completed or failed.", - "devDependencies": {}, - "files": [ - "index.js" - ], - "homepage": "https://github.com/mafintosh/end-of-stream", - "keywords": [ - "stream", - "streams", - "callback", - "finish", - "close", - "end", - "wait" - ], - "license": "MIT", - "main": "index.js", - "name": "end-of-stream", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/mafintosh/end-of-stream.git" - }, - "scripts": { - "test": "node test.js" - }, - "version": "1.4.0" -} diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/.npmignore b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/.npmignore deleted file mode 100644 index 3c3629e647..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/LICENCE b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/LICENCE deleted file mode 100644 index 1a14b437e8..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/LICENCE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2012-2014 Raynos. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION 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/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/Makefile b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/Makefile deleted file mode 100644 index d583fcf49d..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -browser: - node ./support/compile - -.PHONY: browser \ No newline at end of file diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/README.md b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/README.md deleted file mode 100644 index 093cb2978e..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# xtend - -[![browser support][3]][4] - -[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) - -Extend like a boss - -xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. - -## Examples - -```js -var extend = require("xtend") - -// extend returns a new object. Does not mutate arguments -var combination = extend({ - a: "a", - b: 'c' -}, { - b: "b" -}) -// { a: "a", b: "b" } -``` - -## Stability status: Locked - -## MIT Licenced - - - [3]: http://ci.testling.com/Raynos/xtend.png - [4]: http://ci.testling.com/Raynos/xtend diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/immutable.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/immutable.js deleted file mode 100644 index 94889c9de1..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/immutable.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend() { - var target = {} - - for (var i = 0; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/mutable.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/mutable.js deleted file mode 100644 index 72debede6c..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/mutable.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = extend - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -function extend(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] - - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - target[key] = source[key] - } - } - } - - return target -} diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/package.json b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/package.json deleted file mode 100644 index 10dca33b50..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_from": "xtend@^4.0.0", - "_id": "xtend@4.0.1", - "_integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "_location": "/pacote/tar-stream/xtend", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "xtend@^4.0.0", - "name": "xtend", - "escapedName": "xtend", - "rawSpec": "^4.0.0", - "saveSpec": null, - "fetchSpec": "^4.0.0" - }, - "_requiredBy": [ - "/pacote/tar-stream" - ], - "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", - "_shrinkwrap": null, - "_spec": "xtend@^4.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/tar-stream", - "author": { - "name": "Raynos", - "email": "raynos2@gmail.com" - }, - "bin": null, - "bugs": { - "url": "https://github.com/Raynos/xtend/issues", - "email": "raynos2@gmail.com" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jake Verbaten" - }, - { - "name": "Matt Esch" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "extend like a boss", - "devDependencies": { - "tape": "~1.1.0" - }, - "engines": { - "node": ">=0.4" - }, - "homepage": "https://github.com/Raynos/xtend", - "keywords": [ - "extend", - "merge", - "options", - "opts", - "object", - "array" - ], - "license": "MIT", - "main": "immutable", - "name": "xtend", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/Raynos/xtend.git" - }, - "scripts": { - "test": "node test" - }, - "testling": { - "files": "test.js", - "browsers": [ - "ie/7..latest", - "firefox/16..latest", - "firefox/nightly", - "chrome/22..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest" - ] - }, - "version": "4.0.1" -} diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/test.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/test.js deleted file mode 100644 index 093a2b061e..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/node_modules/xtend/test.js +++ /dev/null @@ -1,83 +0,0 @@ -var test = require("tape") -var extend = require("./") -var mutableExtend = require("./mutable") - -test("merge", function(assert) { - var a = { a: "foo" } - var b = { b: "bar" } - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("replace", function(assert) { - var a = { a: "foo" } - var b = { a: "bar" } - - assert.deepEqual(extend(a, b), { a: "bar" }) - assert.end() -}) - -test("undefined", function(assert) { - var a = { a: undefined } - var b = { b: "foo" } - - assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) - assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) - assert.end() -}) - -test("handle 0", function(assert) { - var a = { a: "default" } - var b = { a: 0 } - - assert.deepEqual(extend(a, b), { a: 0 }) - assert.deepEqual(extend(b, a), { a: "default" }) - assert.end() -}) - -test("is immutable", function (assert) { - var record = {} - - extend(record, { foo: "bar" }) - assert.equal(record.foo, undefined) - assert.end() -}) - -test("null as argument", function (assert) { - var a = { foo: "bar" } - var b = null - var c = void 0 - - assert.deepEqual(extend(b, a, c), { foo: "bar" }) - assert.end() -}) - -test("mutable", function (assert) { - var a = { foo: "bar" } - - mutableExtend(a, { bar: "baz" }) - - assert.equal(a.bar, "baz") - assert.end() -}) - -test("null prototype", function(assert) { - var a = { a: "foo" } - var b = Object.create(null) - b.b = "bar"; - - assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) - assert.end() -}) - -test("null prototype mutable", function (assert) { - var a = { foo: "bar" } - var b = Object.create(null) - b.bar = "baz"; - - mutableExtend(a, b) - - assert.equal(a.bar, "baz") - assert.end() -}) diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/pack.js b/deps/npm/node_modules/pacote/node_modules/tar-stream/pack.js deleted file mode 100644 index 025f007132..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/pack.js +++ /dev/null @@ -1,254 +0,0 @@ -var constants = require('constants') -var eos = require('end-of-stream') -var util = require('util') - -var Readable = require('readable-stream').Readable -var Writable = require('readable-stream').Writable -var StringDecoder = require('string_decoder').StringDecoder - -var headers = require('./headers') - -var DMODE = parseInt('755', 8) -var FMODE = parseInt('644', 8) - -var END_OF_TAR = new Buffer(1024) -END_OF_TAR.fill(0) - -var noop = function () {} - -var overflow = function (self, size) { - size &= 511 - if (size) self.push(END_OF_TAR.slice(0, 512 - size)) -} - -function modeToType (mode) { - switch (mode & constants.S_IFMT) { - case constants.S_IFBLK: return 'block-device' - case constants.S_IFCHR: return 'character-device' - case constants.S_IFDIR: return 'directory' - case constants.S_IFIFO: return 'fifo' - case constants.S_IFLNK: return 'symlink' - } - - return 'file' -} - -var Sink = function (to) { - Writable.call(this) - this.written = 0 - this._to = to - this._destroyed = false -} - -util.inherits(Sink, Writable) - -Sink.prototype._write = function (data, enc, cb) { - this.written += data.length - if (this._to.push(data)) return cb() - this._to._drain = cb -} - -Sink.prototype.destroy = function () { - if (this._destroyed) return - this._destroyed = true - this.emit('close') -} - -var LinkSink = function () { - Writable.call(this) - this.linkname = '' - this._decoder = new StringDecoder('utf-8') - this._destroyed = false -} - -util.inherits(LinkSink, Writable) - -LinkSink.prototype._write = function (data, enc, cb) { - this.linkname += this._decoder.write(data) - cb() -} - -LinkSink.prototype.destroy = function () { - if (this._destroyed) return - this._destroyed = true - this.emit('close') -} - -var Void = function () { - Writable.call(this) - this._destroyed = false -} - -util.inherits(Void, Writable) - -Void.prototype._write = function (data, enc, cb) { - cb(new Error('No body allowed for this entry')) -} - -Void.prototype.destroy = function () { - if (this._destroyed) return - this._destroyed = true - this.emit('close') -} - -var Pack = function (opts) { - if (!(this instanceof Pack)) return new Pack(opts) - Readable.call(this, opts) - - this._drain = noop - this._finalized = false - this._finalizing = false - this._destroyed = false - this._stream = null -} - -util.inherits(Pack, Readable) - -Pack.prototype.entry = function (header, buffer, callback) { - if (this._stream) throw new Error('already piping an entry') - if (this._finalized || this._destroyed) return - - if (typeof buffer === 'function') { - callback = buffer - buffer = null - } - - if (!callback) callback = noop - - var self = this - - if (!header.size || header.type === 'symlink') header.size = 0 - if (!header.type) header.type = modeToType(header.mode) - if (!header.mode) header.mode = header.type === 'directory' ? DMODE : FMODE - if (!header.uid) header.uid = 0 - if (!header.gid) header.gid = 0 - if (!header.mtime) header.mtime = new Date() - - if (typeof buffer === 'string') buffer = new Buffer(buffer) - if (Buffer.isBuffer(buffer)) { - header.size = buffer.length - this._encode(header) - this.push(buffer) - overflow(self, header.size) - process.nextTick(callback) - return new Void() - } - - if (header.type === 'symlink' && !header.linkname) { - var linkSink = new LinkSink() - eos(linkSink, function (err) { - if (err) { // stream was closed - self.destroy() - return callback(err) - } - - header.linkname = linkSink.linkname - self._encode(header) - callback() - }) - - return linkSink - } - - this._encode(header) - - if (header.type !== 'file' && header.type !== 'contiguous-file') { - process.nextTick(callback) - return new Void() - } - - var sink = new Sink(this) - - this._stream = sink - - eos(sink, function (err) { - self._stream = null - - if (err) { // stream was closed - self.destroy() - return callback(err) - } - - if (sink.written !== header.size) { // corrupting tar - self.destroy() - return callback(new Error('size mismatch')) - } - - overflow(self, header.size) - if (self._finalizing) self.finalize() - callback() - }) - - return sink -} - -Pack.prototype.finalize = function () { - if (this._stream) { - this._finalizing = true - return - } - - if (this._finalized) return - this._finalized = true - this.push(END_OF_TAR) - this.push(null) -} - -Pack.prototype.destroy = function (err) { - if (this._destroyed) return - this._destroyed = true - - if (err) this.emit('error', err) - this.emit('close') - if (this._stream && this._stream.destroy) this._stream.destroy() -} - -Pack.prototype._encode = function (header) { - if (!header.pax) { - var buf = headers.encode(header) - if (buf) { - this.push(buf) - return - } - } - this._encodePax(header) -} - -Pack.prototype._encodePax = function (header) { - var paxHeader = headers.encodePax({ - name: header.name, - linkname: header.linkname, - pax: header.pax - }) - - var newHeader = { - name: 'PaxHeader', - mode: header.mode, - uid: header.uid, - gid: header.gid, - size: paxHeader.length, - mtime: header.mtime, - type: 'pax-header', - linkname: header.linkname && 'PaxHeader', - uname: header.uname, - gname: header.gname, - devmajor: header.devmajor, - devminor: header.devminor - } - - this.push(headers.encode(newHeader)) - this.push(paxHeader) - overflow(this, paxHeader.length) - - newHeader.size = header.size - newHeader.type = header.type - this.push(headers.encode(newHeader)) -} - -Pack.prototype._read = function (n) { - var drain = this._drain - this._drain = noop - drain() -} - -module.exports = Pack diff --git a/deps/npm/node_modules/pacote/node_modules/tar-stream/package.json b/deps/npm/node_modules/pacote/node_modules/tar-stream/package.json deleted file mode 100644 index fca15656fd..0000000000 --- a/deps/npm/node_modules/pacote/node_modules/tar-stream/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "_from": "tar-stream@^1.5.2", - "_id": "tar-stream@1.5.4", - "_inBundle": false, - "_integrity": "sha1-NlSc8E7RrumyowwBQyUiONr5QBY=", - "_location": "/pacote/tar-stream", - "_phantomChildren": { - "once": "1.4.0", - "readable-stream": "2.2.9" - }, - "_requested": { - "type": "range", - "registry": true, - "raw": "tar-stream@^1.5.2", - "name": "tar-stream", - "escapedName": "tar-stream", - "rawSpec": "^1.5.2", - "saveSpec": null, - "fetchSpec": "^1.5.2" - }, - "_requiredBy": [ - "/pacote", - "/pacote/tar-fs" - ], - "_resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.5.4.tgz", - "_shasum": "36549cf04ed1aee9b2a30c0143252238daf94016", - "_spec": "tar-stream@^1.5.2", - "_where": "/Users/zkat/Documents/code/npm/node_modules/pacote", - "author": { - "name": "Mathias Buus", - "email": "mathiasbuus@gmail.com" - }, - "bugs": { - "url": "https://github.com/mafintosh/tar-stream/issues" - }, - "bundleDependencies": false, - "dependencies": { - "bl": "^1.0.0", - "end-of-stream": "^1.0.0", - "readable-stream": "^2.0.0", - "xtend": "^4.0.0" - }, - "deprecated": false, - "description": "tar-stream is a streaming tar parser and generator and nothing else. It is streams2 and operates purely using streams which means you can easily extract/parse tarballs without ever hitting the file system.", - "devDependencies": { - "concat-stream": "^1.4.6", - "standard": "^5.3.1", - "tape": "^3.0.3" - }, - "directories": { - "test": "test" - }, - "engines": { - "node": ">= 0.8.0" - }, - "files": [ - "*.js", - "LICENSE" - ], - "homepage": "https://github.com/mafintosh/tar-stream", - "keywords": [ - "tar", - "tarball", - "parse", - "parser", - "generate", - "generator", - "stream", - "stream2", - "streams", - "streams2", - "streaming", - "pack", - "extract", - "modify" - ], - "license": "MIT", - "main": "index.js", - "name": "tar-stream", - "repository": { - "type": "git", - "url": "git+https://github.com/mafintosh/tar-stream.git" - }, - "scripts": { - "test": "standard && tape test/*.js" - }, - "version": "1.5.4" -} diff --git a/deps/npm/node_modules/pacote/package.json b/deps/npm/node_modules/pacote/package.json index ebdc1f412a..6050cc6241 100644 --- a/deps/npm/node_modules/pacote/package.json +++ b/deps/npm/node_modules/pacote/package.json @@ -1,41 +1,37 @@ { - "_from": "pacote@2.7.38", - "_id": "pacote@2.7.38", + "_from": "pacote@latest", + "_id": "pacote@6.0.2", "_inBundle": false, - "_integrity": "sha512-XxHUyHQB7QCVBxoXeVu0yKxT+2PvJucsc0+1E+6f95lMUxEAYERgSAc71ckYXrYr35Ew3xFU/LrhdIK21GQFFA==", + "_integrity": "sha512-PsnzsjS/rNjY0fojY8QNy6Zq1XvTA3X0vhtfNtExAf1h/746f4MaSatHEU6jiAb9yqvzdThnFGAy+t5VtKwgjg==", "_location": "/pacote", "_phantomChildren": { "cacache": "9.2.9", - "chownr": "1.0.1", "lru-cache": "4.1.1", "mississippi": "1.3.0", - "mkdirp": "0.5.1", "npm-package-arg": "5.1.2", - "once": "1.4.0", - "readable-stream": "2.3.2", "retry": "0.10.1", "safe-buffer": "5.1.1", - "semver": "5.3.0", + "semver": "5.4.1", "ssri": "4.1.6" }, "_requested": { - "type": "version", + "type": "tag", "registry": true, - "raw": "pacote@2.7.38", + "raw": "pacote@latest", "name": "pacote", "escapedName": "pacote", - "rawSpec": "2.7.38", + "rawSpec": "latest", "saveSpec": null, - "fetchSpec": "2.7.38" + "fetchSpec": "latest" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/pacote/-/pacote-2.7.38.tgz", - "_shasum": "5091f8774298c26c3eca24606037f1bb73db74c1", - "_spec": "pacote@2.7.38", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/pacote/-/pacote-6.0.2.tgz", + "_shasum": "c618a3c08493aeb390e79aa73f95af331ffc6171", + "_spec": "pacote@latest", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Kat Marchán", "email": "kzm@sykosomatic.org" @@ -64,32 +60,33 @@ "mississippi": "^1.2.0", "normalize-package-data": "^2.4.0", "npm-package-arg": "^5.1.2", + "npm-packlist": "^1.1.6", "npm-pick-manifest": "^1.0.4", "osenv": "^0.1.4", "promise-inflight": "^1.0.1", "promise-retry": "^1.1.1", "protoduck": "^4.0.0", "safe-buffer": "^5.1.1", - "semver": "^5.3.0", + "semver": "^5.4.1", "ssri": "^4.1.6", - "tar-fs": "^1.15.3", - "tar-stream": "^1.5.4", + "tar": "^4.0.0", "unique-filename": "^1.1.0", - "which": "^1.2.12" + "which": "^1.3.0" }, "deprecated": false, "description": "JavaScript package downloader", "devDependencies": { "mkdirp": "^0.5.1", - "nock": "^9.0.13", + "nock": "^9.0.14", "npmlog": "^4.1.2", - "nyc": "^11.0.3", + "nyc": "^11.1.0", "require-inject": "^1.4.2", "rimraf": "^2.5.4", - "standard": "^10.0.1", + "standard": "^10.0.3", "standard-version": "^4.2.0", "tacks": "^1.2.6", - "tap": "^10.7.0", + "tap": "^10.7.2", + "tar-stream": "^1.5.4", "weallbehave": "^1.2.0", "weallcontribute": "^1.0.7" }, @@ -120,5 +117,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "2.7.38" + "version": "6.0.2" } diff --git a/deps/npm/node_modules/qrcode-terminal/.npmignore b/deps/npm/node_modules/qrcode-terminal/.npmignore new file mode 100644 index 0000000000..1ca957177f --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/.npmignore @@ -0,0 +1,2 @@ +node_modules/ +npm-debug.log diff --git a/deps/npm/node_modules/qrcode-terminal/.travis.yml b/deps/npm/node_modules/qrcode-terminal/.travis.yml new file mode 100644 index 0000000000..6e5919de39 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/deps/npm/node_modules/qrcode-terminal/LICENSE b/deps/npm/node_modules/qrcode-terminal/LICENSE new file mode 100644 index 0000000000..54831bb9e2 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/LICENSE @@ -0,0 +1,222 @@ + + 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. + +============================================================== +This product also include the following software: +============================================================== + + QRCode for JavaScript + + Copyright (c) 2009 Kazuhiko Arase + + URL: http://www.d-project.com/ + + Licensed under the MIT license: + http://www.opensource.org/licenses/mit-license.php + + The word "QR Code" is registered trademark of + DENSO WAVE INCORPORATED + http://www.denso-wave.com/qrcode/faqpatent-e.html + +Located in ./vendor/QRCode +- project has been modified to work in Node and some refactoring was done for code cleanup diff --git a/deps/npm/node_modules/qrcode-terminal/README.md b/deps/npm/node_modules/qrcode-terminal/README.md new file mode 100644 index 0000000000..41d4f19688 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/README.md @@ -0,0 +1,80 @@ +# QRCode Terminal Edition [![Build Status][travis-ci-img]][travis-ci-url] + +> Going where no QRCode has gone before. + +![Basic Example][basic-example-img] + +# Node Library + +## Install + +Can be installed with: + + $ npm install qrcode-terminal + +and used: + + var qrcode = require('qrcode-terminal'); + +## Usage + +To display some data to the terminal just call: + + qrcode.generate('This will be a QRCode, eh!'); + +You can even specify the error level (default is 'L'): + + qrcode.setErrorLevel('Q'); + qrcode.generate('This will be a QRCode with error level Q!'); + +If you don't want to display to the terminal but just want to string you can provide a callback: + + qrcode.generate('http://github.com', function (qrcode) { + console.log(qrcode); + }); + +If you want to display small output, provide `opts` with `small`: + + qrcode.generate('This will be a small QRCode, eh!', {small: true}); + + qrcode.generate('This will be a small QRCode, eh!', {small: true}, function (qrcode) { + console.log(qrcode) + }); + +# Command-Line + +## Install + + $ npm install -g qrcode-terminal + +## Usage + + $ qrcode-terminal --help + $ qrcode-terminal 'http://github.com' + +# Support + +- OS X +- Linux +- Windows + +# Server-side + +[node-qrcode][node-qrcode-url] is a popular server-side QRCode generator that +renders to a `canvas` object. + +# Developing + +To setup the development envrionment run `npm install` + +To run tests run `npm test` + +# Contributers + + Gord Tanner + Micheal Brooks + +[travis-ci-img]: https://travis-ci.org/gtanner/qrcode-terminal.png +[travis-ci-url]: https://travis-ci.org/gtanner/qrcode-terminal +[basic-example-img]: https://raw.github.com/gtanner/qrcode-terminal/master/example/basic.png +[node-qrcode-url]: https://github.com/soldair/node-qrcode diff --git a/deps/npm/node_modules/qrcode-terminal/bin/qrcode-terminal.js b/deps/npm/node_modules/qrcode-terminal/bin/qrcode-terminal.js new file mode 100755 index 0000000000..fcc7ee9d9a --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/bin/qrcode-terminal.js @@ -0,0 +1,68 @@ +#!/usr/bin/env node + +/*! + * Module dependencies. + */ + +var qrcode = require('../lib/main'), + path = require('path'), + fs = require('fs'); + +/*! + * Parse the process name and input + */ + +var name = process.argv[1].replace(/^.*[\\\/]/, '').replace('.js', ''), + input = process.argv[2]; + +/*! + * Display help + */ + +if (!input || input === '-h' || input === '--help') { + help(); + process.exit(); +} + +/*! + * Display version + */ + +if (input === '-v' || input === '--version') { + version(); + process.exit(); +} + +/*! + * Render the QR Code + */ + +qrcode.generate(input); + +/*! + * Helper functions + */ + +function help() { + console.log([ + '', + 'Usage: ' + name + ' ', + '', + 'Options:', + ' -h, --help output usage information', + ' -v, --version output version number', + '', + 'Examples:', + '', + ' $ ' + name + ' hello', + ' $ ' + name + ' "hello world"', + '' + ].join('\n')); +} + +function version() { + var packagePath = path.join(__dirname, '..', 'package.json'), + packageJSON = JSON.parse(fs.readFileSync(packagePath), 'utf8'); + + console.log(packageJSON.version); +} diff --git a/deps/npm/node_modules/qrcode-terminal/example/basic.js b/deps/npm/node_modules/qrcode-terminal/example/basic.js new file mode 100644 index 0000000000..e1e306d552 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/example/basic.js @@ -0,0 +1,2 @@ +var qrcode = require('../lib/main'); +qrcode.generate('this is the bomb'); diff --git a/deps/npm/node_modules/qrcode-terminal/example/basic.png b/deps/npm/node_modules/qrcode-terminal/example/basic.png new file mode 100644 index 0000000000..2ab5c226f4 Binary files /dev/null and b/deps/npm/node_modules/qrcode-terminal/example/basic.png differ diff --git a/deps/npm/node_modules/qrcode-terminal/example/callback.js b/deps/npm/node_modules/qrcode-terminal/example/callback.js new file mode 100644 index 0000000000..fe4a2a6c58 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/example/callback.js @@ -0,0 +1,4 @@ +var qrcode = require('../lib/main'); +qrcode.generate('someone sets it up', function (str) { + console.log(str); +}); diff --git a/deps/npm/node_modules/qrcode-terminal/example/small-qrcode.js b/deps/npm/node_modules/qrcode-terminal/example/small-qrcode.js new file mode 100644 index 0000000000..f7d145d4ac --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/example/small-qrcode.js @@ -0,0 +1,6 @@ +var qrcode = require('../lib/main'), + url = 'https://google.com/'; + +qrcode.generate(url, { small: true }, function (qr) { + console.log(qr); +}); diff --git a/deps/npm/node_modules/qrcode-terminal/lib/main.js b/deps/npm/node_modules/qrcode-terminal/lib/main.js new file mode 100644 index 0000000000..37c63b1c57 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/lib/main.js @@ -0,0 +1,100 @@ +var QRCode = require('./../vendor/QRCode'), + QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'), + black = "\033[40m \033[0m", + white = "\033[47m \033[0m", + toCell = function (isBlack) { + return isBlack ? black : white; + }, + repeat = function (color) { + return { + times: function (count) { + return new Array(count).join(color); + } + }; + }, + fill = function(length, value) { + var arr = new Array(length); + for (var i = 0; i < length; i++) { + arr[i] = value; + } + return arr; + }; + +module.exports = { + + error: QRErrorCorrectLevel.L, + + generate: function (input, opts, cb) { + if (typeof opts === 'function') { + cb = opts; + opts = {}; + } + + var qrcode = new QRCode(-1, this.error); + qrcode.addData(input); + qrcode.make(); + + var output = ''; + if (opts && opts.small) { + var BLACK = true, WHITE = false; + var moduleCount = qrcode.getModuleCount(); + var moduleData = qrcode.modules.slice(); + + var oddRow = moduleCount % 2 === 1; + if (oddRow) { + moduleData.push(fill(moduleCount, WHITE)); + } + + var platte= { + WHITE_ALL: '\u2588', + WHITE_BLACK: '\u2580', + BLACK_WHITE: '\u2584', + BLACK_ALL: ' ', + }; + + var borderTop = repeat(platte.BLACK_WHITE).times(moduleCount + 3); + var borderBottom = repeat(platte.WHITE_BLACK).times(moduleCount + 3); + output += borderTop + '\n'; + + for (var row = 0; row < moduleCount; row += 2) { + output += platte.WHITE_ALL; + + for (var col = 0; col < moduleCount; col++) { + if (moduleData[row][col] === WHITE && moduleData[row + 1][col] === WHITE) { + output += platte.WHITE_ALL; + } else if (moduleData[row][col] === WHITE && moduleData[row + 1][col] === BLACK) { + output += platte.WHITE_BLACK; + } else if (moduleData[row][col] === BLACK && moduleData[row + 1][col] === WHITE) { + output += platte.BLACK_WHITE; + } else { + output += platte.BLACK_ALL; + } + } + + output += platte.WHITE_ALL + '\n'; + } + + if (!oddRow) { + output += borderBottom; + } + } else { + var border = repeat(white).times(qrcode.getModuleCount() + 3); + + output += border + '\n'; + qrcode.modules.forEach(function (row) { + output += white; + output += row.map(toCell).join(''); + output += white + '\n'; + }); + output += border; + } + + if (cb) cb(output); + else console.log(output); + }, + + setErrorLevel: function (error) { + this.error = QRErrorCorrectLevel[error] || this.error; + } + +}; diff --git a/deps/npm/node_modules/qrcode-terminal/package.json b/deps/npm/node_modules/qrcode-terminal/package.json new file mode 100644 index 0000000000..fd1e2f2b74 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/package.json @@ -0,0 +1,76 @@ +{ + "_from": "qrcode-terminal", + "_id": "qrcode-terminal@0.11.0", + "_inBundle": false, + "_integrity": "sha1-/8bCii/Av7RwUrR+I/T0RqX7254=", + "_location": "/qrcode-terminal", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "qrcode-terminal", + "name": "qrcode-terminal", + "escapedName": "qrcode-terminal", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.11.0.tgz", + "_shasum": "ffc6c28a2fc0bfb47052b47e23f4f446a5fbdb9e", + "_spec": "qrcode-terminal", + "_where": "/Users/rebecca/code/npm", + "bin": { + "qrcode-terminal": "./bin/qrcode-terminal.js" + }, + "bugs": { + "url": "https://github.com/gtanner/qrcode-terminal/issues" + }, + "bundleDependencies": false, + "contributors": [ + { + "name": "Gord Tanner", + "email": "gtanner@gmail.com", + "url": "http://github.com/gtanner" + }, + { + "name": "Michael Brooks", + "email": "mikeywbrooks@gmail.com", + "url": "http://github.com/mwbrooks" + } + ], + "deprecated": false, + "description": "QRCodes, in the terminal", + "devDependencies": { + "expect.js": "*", + "jshint": "*", + "mocha": "*", + "sinon": "*" + }, + "homepage": "https://github.com/gtanner/qrcode-terminal", + "keywords": [ + "ansi", + "ascii", + "qrcode", + "console" + ], + "licenses": [ + { + "type": "Apache 2.0" + } + ], + "main": "./lib/main", + "name": "qrcode-terminal", + "preferGlobal": false, + "repository": { + "type": "git", + "url": "git+https://github.com/gtanner/qrcode-terminal.git" + }, + "scripts": { + "test": "./node_modules/jshint/bin/jshint lib vendor && node example/basic.js && ./node_modules/mocha/bin/mocha -R nyan" + }, + "version": "0.11.0" +} diff --git a/deps/npm/node_modules/qrcode-terminal/test/main.js b/deps/npm/node_modules/qrcode-terminal/test/main.js new file mode 100644 index 0000000000..d6d6c45623 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/test/main.js @@ -0,0 +1,63 @@ +var expect = require('expect.js'), + qrcode = require('./../lib/main'), + sinon = require('sinon'); + +describe('in the main module', function() { + describe('the generate method', function () { + describe('when not providing a callback', function () { + beforeEach(function () { + sinon.stub(console, 'log'); + }); + + afterEach(function () { + sinon.sandbox.restore(); + console.log.reset(); + }); + + it('logs to the console', function () { + qrcode.generate('test'); + expect(console.log.called).to.be(true); + }); + }); + + describe('when providing a callback', function () { + it('will call the callback', function () { + var cb = sinon.spy(); + qrcode.generate('test', cb); + expect(cb.called).to.be(true); + }); + + it('will not call the console.log method', function () { + qrcode.generate('test', sinon.spy()); + expect(console.log.called).to.be(false); + }); + }); + + describe('the QR Code', function () { + it('should be a string', function (done) { + qrcode.generate('test', function(result) { + expect(result).to.be.a('string'); + done(); + }); + }); + + it('should not end with a newline', function (done) { + qrcode.generate('test', function(result) { + expect(result).not.to.match(/\n$/); + done(); + }); + }); + }); + + describe('the error level', function () { + it('should default to 1', function() { + expect(qrcode.error).to.be(1); + }); + + it('should not allow other levels', function() { + qrcode.setErrorLevel = 'something'; + expect(qrcode.error).to.be(1); + }); + }); + }); +}); diff --git a/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js new file mode 100644 index 0000000000..8460b910b7 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js @@ -0,0 +1,22 @@ +var QRMode = require('./QRMode'); + +function QR8bitByte(data) { + this.mode = QRMode.MODE_8BIT_BYTE; + this.data = data; +} + +QR8bitByte.prototype = { + + getLength : function() { + return this.data.length; + }, + + write : function(buffer) { + for (var i = 0; i < this.data.length; i++) { + // not JIS ... + buffer.put(this.data.charCodeAt(i), 8); + } + } +}; + +module.exports = QR8bitByte; diff --git a/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js new file mode 100644 index 0000000000..3e857b5345 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js @@ -0,0 +1,38 @@ +function QRBitBuffer() { + this.buffer = []; + this.length = 0; +} + +QRBitBuffer.prototype = { + + get : function(index) { + var bufIndex = Math.floor(index / 8); + return ( (this.buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1; + }, + + put : function(num, length) { + for (var i = 0; i < length; i++) { + this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1); + } + }, + + getLengthInBits : function() { + return this.length; + }, + + putBit : function(bit) { + + var bufIndex = Math.floor(this.length / 8); + if (this.buffer.length <= bufIndex) { + this.buffer.push(0); + } + + if (bit) { + this.buffer[bufIndex] |= (0x80 >>> (this.length % 8) ); + } + + this.length++; + } +}; + +module.exports = QRBitBuffer; diff --git a/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js new file mode 100644 index 0000000000..14e08fbaa3 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js @@ -0,0 +1,6 @@ +module.exports = { + L : 1, + M : 0, + Q : 3, + H : 2 +}; diff --git a/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js new file mode 100644 index 0000000000..f6fdeb5373 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js @@ -0,0 +1,10 @@ +module.exports = { + PATTERN000 : 0, + PATTERN001 : 1, + PATTERN010 : 2, + PATTERN011 : 3, + PATTERN100 : 4, + PATTERN101 : 5, + PATTERN110 : 6, + PATTERN111 : 7 +}; diff --git a/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js new file mode 100644 index 0000000000..11e324c981 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMath.js @@ -0,0 +1,44 @@ +var QRMath = { + + glog : function(n) { + + if (n < 1) { + throw new Error("glog(" + n + ")"); + } + + return QRMath.LOG_TABLE[n]; + }, + + gexp : function(n) { + + while (n < 0) { + n += 255; + } + + while (n >= 256) { + n -= 255; + } + + return QRMath.EXP_TABLE[n]; + }, + + EXP_TABLE : new Array(256), + + LOG_TABLE : new Array(256) + +}; + +for (var i = 0; i < 8; i++) { + QRMath.EXP_TABLE[i] = 1 << i; +} +for (var i = 8; i < 256; i++) { + QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] + ^ QRMath.EXP_TABLE[i - 5] + ^ QRMath.EXP_TABLE[i - 6] + ^ QRMath.EXP_TABLE[i - 8]; +} +for (var i = 0; i < 255; i++) { + QRMath.LOG_TABLE[QRMath.EXP_TABLE[i] ] = i; +} + +module.exports = QRMath; diff --git a/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js new file mode 100644 index 0000000000..050c8a3037 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRMode.js @@ -0,0 +1,6 @@ +module.exports = { + MODE_NUMBER : 1 << 0, + MODE_ALPHA_NUM : 1 << 1, + MODE_8BIT_BYTE : 1 << 2, + MODE_KANJI : 1 << 3 +}; diff --git a/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js new file mode 100644 index 0000000000..f8754cbcb4 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js @@ -0,0 +1,66 @@ +var QRMath = require('./QRMath'); + +function QRPolynomial(num, shift) { + if (num.length === undefined) { + throw new Error(num.length + "/" + shift); + } + + var offset = 0; + + while (offset < num.length && num[offset] === 0) { + offset++; + } + + this.num = new Array(num.length - offset + shift); + for (var i = 0; i < num.length - offset; i++) { + this.num[i] = num[i + offset]; + } +} + +QRPolynomial.prototype = { + + get : function(index) { + return this.num[index]; + }, + + getLength : function() { + return this.num.length; + }, + + multiply : function(e) { + + var num = new Array(this.getLength() + e.getLength() - 1); + + for (var i = 0; i < this.getLength(); i++) { + for (var j = 0; j < e.getLength(); j++) { + num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i) ) + QRMath.glog(e.get(j) ) ); + } + } + + return new QRPolynomial(num, 0); + }, + + mod : function(e) { + + if (this.getLength() - e.getLength() < 0) { + return this; + } + + var ratio = QRMath.glog(this.get(0) ) - QRMath.glog(e.get(0) ); + + var num = new Array(this.getLength() ); + + for (var i = 0; i < this.getLength(); i++) { + num[i] = this.get(i); + } + + for (var x = 0; x < e.getLength(); x++) { + num[x] ^= QRMath.gexp(QRMath.glog(e.get(x) ) + ratio); + } + + // recursive call + return new QRPolynomial(num, 0).mod(e); + } +}; + +module.exports = QRPolynomial; diff --git a/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js new file mode 100644 index 0000000000..becd24d4dd --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js @@ -0,0 +1,298 @@ +var QRErrorCorrectLevel = require('./QRErrorCorrectLevel'); + +function QRRSBlock(totalCount, dataCount) { + this.totalCount = totalCount; + this.dataCount = dataCount; +} + +QRRSBlock.RS_BLOCK_TABLE = [ + + // L + // M + // Q + // H + + // 1 + [1, 26, 19], + [1, 26, 16], + [1, 26, 13], + [1, 26, 9], + + // 2 + [1, 44, 34], + [1, 44, 28], + [1, 44, 22], + [1, 44, 16], + + // 3 + [1, 70, 55], + [1, 70, 44], + [2, 35, 17], + [2, 35, 13], + + // 4 + [1, 100, 80], + [2, 50, 32], + [2, 50, 24], + [4, 25, 9], + + // 5 + [1, 134, 108], + [2, 67, 43], + [2, 33, 15, 2, 34, 16], + [2, 33, 11, 2, 34, 12], + + // 6 + [2, 86, 68], + [4, 43, 27], + [4, 43, 19], + [4, 43, 15], + + // 7 + [2, 98, 78], + [4, 49, 31], + [2, 32, 14, 4, 33, 15], + [4, 39, 13, 1, 40, 14], + + // 8 + [2, 121, 97], + [2, 60, 38, 2, 61, 39], + [4, 40, 18, 2, 41, 19], + [4, 40, 14, 2, 41, 15], + + // 9 + [2, 146, 116], + [3, 58, 36, 2, 59, 37], + [4, 36, 16, 4, 37, 17], + [4, 36, 12, 4, 37, 13], + + // 10 + [2, 86, 68, 2, 87, 69], + [4, 69, 43, 1, 70, 44], + [6, 43, 19, 2, 44, 20], + [6, 43, 15, 2, 44, 16], + + // 11 + [4, 101, 81], + [1, 80, 50, 4, 81, 51], + [4, 50, 22, 4, 51, 23], + [3, 36, 12, 8, 37, 13], + + // 12 + [2, 116, 92, 2, 117, 93], + [6, 58, 36, 2, 59, 37], + [4, 46, 20, 6, 47, 21], + [7, 42, 14, 4, 43, 15], + + // 13 + [4, 133, 107], + [8, 59, 37, 1, 60, 38], + [8, 44, 20, 4, 45, 21], + [12, 33, 11, 4, 34, 12], + + // 14 + [3, 145, 115, 1, 146, 116], + [4, 64, 40, 5, 65, 41], + [11, 36, 16, 5, 37, 17], + [11, 36, 12, 5, 37, 13], + + // 15 + [5, 109, 87, 1, 110, 88], + [5, 65, 41, 5, 66, 42], + [5, 54, 24, 7, 55, 25], + [11, 36, 12], + + // 16 + [5, 122, 98, 1, 123, 99], + [7, 73, 45, 3, 74, 46], + [15, 43, 19, 2, 44, 20], + [3, 45, 15, 13, 46, 16], + + // 17 + [1, 135, 107, 5, 136, 108], + [10, 74, 46, 1, 75, 47], + [1, 50, 22, 15, 51, 23], + [2, 42, 14, 17, 43, 15], + + // 18 + [5, 150, 120, 1, 151, 121], + [9, 69, 43, 4, 70, 44], + [17, 50, 22, 1, 51, 23], + [2, 42, 14, 19, 43, 15], + + // 19 + [3, 141, 113, 4, 142, 114], + [3, 70, 44, 11, 71, 45], + [17, 47, 21, 4, 48, 22], + [9, 39, 13, 16, 40, 14], + + // 20 + [3, 135, 107, 5, 136, 108], + [3, 67, 41, 13, 68, 42], + [15, 54, 24, 5, 55, 25], + [15, 43, 15, 10, 44, 16], + + // 21 + [4, 144, 116, 4, 145, 117], + [17, 68, 42], + [17, 50, 22, 6, 51, 23], + [19, 46, 16, 6, 47, 17], + + // 22 + [2, 139, 111, 7, 140, 112], + [17, 74, 46], + [7, 54, 24, 16, 55, 25], + [34, 37, 13], + + // 23 + [4, 151, 121, 5, 152, 122], + [4, 75, 47, 14, 76, 48], + [11, 54, 24, 14, 55, 25], + [16, 45, 15, 14, 46, 16], + + // 24 + [6, 147, 117, 4, 148, 118], + [6, 73, 45, 14, 74, 46], + [11, 54, 24, 16, 55, 25], + [30, 46, 16, 2, 47, 17], + + // 25 + [8, 132, 106, 4, 133, 107], + [8, 75, 47, 13, 76, 48], + [7, 54, 24, 22, 55, 25], + [22, 45, 15, 13, 46, 16], + + // 26 + [10, 142, 114, 2, 143, 115], + [19, 74, 46, 4, 75, 47], + [28, 50, 22, 6, 51, 23], + [33, 46, 16, 4, 47, 17], + + // 27 + [8, 152, 122, 4, 153, 123], + [22, 73, 45, 3, 74, 46], + [8, 53, 23, 26, 54, 24], + [12, 45, 15, 28, 46, 16], + + // 28 + [3, 147, 117, 10, 148, 118], + [3, 73, 45, 23, 74, 46], + [4, 54, 24, 31, 55, 25], + [11, 45, 15, 31, 46, 16], + + // 29 + [7, 146, 116, 7, 147, 117], + [21, 73, 45, 7, 74, 46], + [1, 53, 23, 37, 54, 24], + [19, 45, 15, 26, 46, 16], + + // 30 + [5, 145, 115, 10, 146, 116], + [19, 75, 47, 10, 76, 48], + [15, 54, 24, 25, 55, 25], + [23, 45, 15, 25, 46, 16], + + // 31 + [13, 145, 115, 3, 146, 116], + [2, 74, 46, 29, 75, 47], + [42, 54, 24, 1, 55, 25], + [23, 45, 15, 28, 46, 16], + + // 32 + [17, 145, 115], + [10, 74, 46, 23, 75, 47], + [10, 54, 24, 35, 55, 25], + [19, 45, 15, 35, 46, 16], + + // 33 + [17, 145, 115, 1, 146, 116], + [14, 74, 46, 21, 75, 47], + [29, 54, 24, 19, 55, 25], + [11, 45, 15, 46, 46, 16], + + // 34 + [13, 145, 115, 6, 146, 116], + [14, 74, 46, 23, 75, 47], + [44, 54, 24, 7, 55, 25], + [59, 46, 16, 1, 47, 17], + + // 35 + [12, 151, 121, 7, 152, 122], + [12, 75, 47, 26, 76, 48], + [39, 54, 24, 14, 55, 25], + [22, 45, 15, 41, 46, 16], + + // 36 + [6, 151, 121, 14, 152, 122], + [6, 75, 47, 34, 76, 48], + [46, 54, 24, 10, 55, 25], + [2, 45, 15, 64, 46, 16], + + // 37 + [17, 152, 122, 4, 153, 123], + [29, 74, 46, 14, 75, 47], + [49, 54, 24, 10, 55, 25], + [24, 45, 15, 46, 46, 16], + + // 38 + [4, 152, 122, 18, 153, 123], + [13, 74, 46, 32, 75, 47], + [48, 54, 24, 14, 55, 25], + [42, 45, 15, 32, 46, 16], + + // 39 + [20, 147, 117, 4, 148, 118], + [40, 75, 47, 7, 76, 48], + [43, 54, 24, 22, 55, 25], + [10, 45, 15, 67, 46, 16], + + // 40 + [19, 148, 118, 6, 149, 119], + [18, 75, 47, 31, 76, 48], + [34, 54, 24, 34, 55, 25], + [20, 45, 15, 61, 46, 16] +]; + +QRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) { + + var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel); + + if (rsBlock === undefined) { + throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel); + } + + var length = rsBlock.length / 3; + + var list = []; + + for (var i = 0; i < length; i++) { + + var count = rsBlock[i * 3 + 0]; + var totalCount = rsBlock[i * 3 + 1]; + var dataCount = rsBlock[i * 3 + 2]; + + for (var j = 0; j < count; j++) { + list.push(new QRRSBlock(totalCount, dataCount) ); + } + } + + return list; +}; + +QRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) { + + switch(errorCorrectLevel) { + case QRErrorCorrectLevel.L : + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0]; + case QRErrorCorrectLevel.M : + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1]; + case QRErrorCorrectLevel.Q : + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2]; + case QRErrorCorrectLevel.H : + return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3]; + default : + return undefined; + } +}; + +module.exports = QRRSBlock; diff --git a/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js new file mode 100644 index 0000000000..31008cb466 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js @@ -0,0 +1,272 @@ +var QRMode = require('./QRMode'); +var QRPolynomial = require('./QRPolynomial'); +var QRMath = require('./QRMath'); +var QRMaskPattern = require('./QRMaskPattern'); + +var QRUtil = { + + PATTERN_POSITION_TABLE : [ + [], + [6, 18], + [6, 22], + [6, 26], + [6, 30], + [6, 34], + [6, 22, 38], + [6, 24, 42], + [6, 26, 46], + [6, 28, 50], + [6, 30, 54], + [6, 32, 58], + [6, 34, 62], + [6, 26, 46, 66], + [6, 26, 48, 70], + [6, 26, 50, 74], + [6, 30, 54, 78], + [6, 30, 56, 82], + [6, 30, 58, 86], + [6, 34, 62, 90], + [6, 28, 50, 72, 94], + [6, 26, 50, 74, 98], + [6, 30, 54, 78, 102], + [6, 28, 54, 80, 106], + [6, 32, 58, 84, 110], + [6, 30, 58, 86, 114], + [6, 34, 62, 90, 118], + [6, 26, 50, 74, 98, 122], + [6, 30, 54, 78, 102, 126], + [6, 26, 52, 78, 104, 130], + [6, 30, 56, 82, 108, 134], + [6, 34, 60, 86, 112, 138], + [6, 30, 58, 86, 114, 142], + [6, 34, 62, 90, 118, 146], + [6, 30, 54, 78, 102, 126, 150], + [6, 24, 50, 76, 102, 128, 154], + [6, 28, 54, 80, 106, 132, 158], + [6, 32, 58, 84, 110, 136, 162], + [6, 26, 54, 82, 110, 138, 166], + [6, 30, 58, 86, 114, 142, 170] + ], + + G15 : (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0), + G18 : (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0), + G15_MASK : (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1), + + getBCHTypeInfo : function(data) { + var d = data << 10; + while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) { + d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) ) ); + } + return ( (data << 10) | d) ^ QRUtil.G15_MASK; + }, + + getBCHTypeNumber : function(data) { + var d = data << 12; + while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) { + d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) ) ); + } + return (data << 12) | d; + }, + + getBCHDigit : function(data) { + + var digit = 0; + + while (data !== 0) { + digit++; + data >>>= 1; + } + + return digit; + }, + + getPatternPosition : function(typeNumber) { + return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1]; + }, + + getMask : function(maskPattern, i, j) { + + switch (maskPattern) { + + case QRMaskPattern.PATTERN000 : return (i + j) % 2 === 0; + case QRMaskPattern.PATTERN001 : return i % 2 === 0; + case QRMaskPattern.PATTERN010 : return j % 3 === 0; + case QRMaskPattern.PATTERN011 : return (i + j) % 3 === 0; + case QRMaskPattern.PATTERN100 : return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 === 0; + case QRMaskPattern.PATTERN101 : return (i * j) % 2 + (i * j) % 3 === 0; + case QRMaskPattern.PATTERN110 : return ( (i * j) % 2 + (i * j) % 3) % 2 === 0; + case QRMaskPattern.PATTERN111 : return ( (i * j) % 3 + (i + j) % 2) % 2 === 0; + + default : + throw new Error("bad maskPattern:" + maskPattern); + } + }, + + getErrorCorrectPolynomial : function(errorCorrectLength) { + + var a = new QRPolynomial([1], 0); + + for (var i = 0; i < errorCorrectLength; i++) { + a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0) ); + } + + return a; + }, + + getLengthInBits : function(mode, type) { + + if (1 <= type && type < 10) { + + // 1 - 9 + + switch(mode) { + case QRMode.MODE_NUMBER : return 10; + case QRMode.MODE_ALPHA_NUM : return 9; + case QRMode.MODE_8BIT_BYTE : return 8; + case QRMode.MODE_KANJI : return 8; + default : + throw new Error("mode:" + mode); + } + + } else if (type < 27) { + + // 10 - 26 + + switch(mode) { + case QRMode.MODE_NUMBER : return 12; + case QRMode.MODE_ALPHA_NUM : return 11; + case QRMode.MODE_8BIT_BYTE : return 16; + case QRMode.MODE_KANJI : return 10; + default : + throw new Error("mode:" + mode); + } + + } else if (type < 41) { + + // 27 - 40 + + switch(mode) { + case QRMode.MODE_NUMBER : return 14; + case QRMode.MODE_ALPHA_NUM : return 13; + case QRMode.MODE_8BIT_BYTE : return 16; + case QRMode.MODE_KANJI : return 12; + default : + throw new Error("mode:" + mode); + } + + } else { + throw new Error("type:" + type); + } + }, + + getLostPoint : function(qrCode) { + + var moduleCount = qrCode.getModuleCount(); + var lostPoint = 0; + var row = 0; + var col = 0; + + + // LEVEL1 + + for (row = 0; row < moduleCount; row++) { + + for (col = 0; col < moduleCount; col++) { + + var sameCount = 0; + var dark = qrCode.isDark(row, col); + + for (var r = -1; r <= 1; r++) { + + if (row + r < 0 || moduleCount <= row + r) { + continue; + } + + for (var c = -1; c <= 1; c++) { + + if (col + c < 0 || moduleCount <= col + c) { + continue; + } + + if (r === 0 && c === 0) { + continue; + } + + if (dark === qrCode.isDark(row + r, col + c) ) { + sameCount++; + } + } + } + + if (sameCount > 5) { + lostPoint += (3 + sameCount - 5); + } + } + } + + // LEVEL2 + + for (row = 0; row < moduleCount - 1; row++) { + for (col = 0; col < moduleCount - 1; col++) { + var count = 0; + if (qrCode.isDark(row, col ) ) count++; + if (qrCode.isDark(row + 1, col ) ) count++; + if (qrCode.isDark(row, col + 1) ) count++; + if (qrCode.isDark(row + 1, col + 1) ) count++; + if (count === 0 || count === 4) { + lostPoint += 3; + } + } + } + + // LEVEL3 + + for (row = 0; row < moduleCount; row++) { + for (col = 0; col < moduleCount - 6; col++) { + if (qrCode.isDark(row, col) && + !qrCode.isDark(row, col + 1) && + qrCode.isDark(row, col + 2) && + qrCode.isDark(row, col + 3) && + qrCode.isDark(row, col + 4) && + !qrCode.isDark(row, col + 5) && + qrCode.isDark(row, col + 6) ) { + lostPoint += 40; + } + } + } + + for (col = 0; col < moduleCount; col++) { + for (row = 0; row < moduleCount - 6; row++) { + if (qrCode.isDark(row, col) && + !qrCode.isDark(row + 1, col) && + qrCode.isDark(row + 2, col) && + qrCode.isDark(row + 3, col) && + qrCode.isDark(row + 4, col) && + !qrCode.isDark(row + 5, col) && + qrCode.isDark(row + 6, col) ) { + lostPoint += 40; + } + } + } + + // LEVEL4 + + var darkCount = 0; + + for (col = 0; col < moduleCount; col++) { + for (row = 0; row < moduleCount; row++) { + if (qrCode.isDark(row, col) ) { + darkCount++; + } + } + } + + var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5; + lostPoint += ratio * 10; + + return lostPoint; + } + +}; + +module.exports = QRUtil; diff --git a/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/index.js b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/index.js new file mode 100644 index 0000000000..0fb6c39362 --- /dev/null +++ b/deps/npm/node_modules/qrcode-terminal/vendor/QRCode/index.js @@ -0,0 +1,462 @@ +//--------------------------------------------------------------------- +// QRCode for JavaScript +// +// Copyright (c) 2009 Kazuhiko Arase +// +// URL: http://www.d-project.com/ +// +// Licensed under the MIT license: +// http://www.opensource.org/licenses/mit-license.php +// +// The word "QR Code" is registered trademark of +// DENSO WAVE INCORPORATED +// http://www.denso-wave.com/qrcode/faqpatent-e.html +// +//--------------------------------------------------------------------- +// Modified to work in node for this project (and some refactoring) +//--------------------------------------------------------------------- + +var QR8bitByte = require('./QR8bitByte'); +var QRUtil = require('./QRUtil'); +var QRPolynomial = require('./QRPolynomial'); +var QRRSBlock = require('./QRRSBlock'); +var QRBitBuffer = require('./QRBitBuffer'); + +function QRCode(typeNumber, errorCorrectLevel) { + this.typeNumber = typeNumber; + this.errorCorrectLevel = errorCorrectLevel; + this.modules = null; + this.moduleCount = 0; + this.dataCache = null; + this.dataList = []; +} + +QRCode.prototype = { + + addData : function(data) { + var newData = new QR8bitByte(data); + this.dataList.push(newData); + this.dataCache = null; + }, + + isDark : function(row, col) { + if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) { + throw new Error(row + "," + col); + } + return this.modules[row][col]; + }, + + getModuleCount : function() { + return this.moduleCount; + }, + + make : function() { + // Calculate automatically typeNumber if provided is < 1 + if (this.typeNumber < 1 ){ + var typeNumber = 1; + for (typeNumber = 1; typeNumber < 40; typeNumber++) { + var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel); + + var buffer = new QRBitBuffer(); + var totalDataCount = 0; + for (var i = 0; i < rsBlocks.length; i++) { + totalDataCount += rsBlocks[i].dataCount; + } + + for (var x = 0; x < this.dataList.length; x++) { + var data = this.dataList[x]; + buffer.put(data.mode, 4); + buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) ); + data.write(buffer); + } + if (buffer.getLengthInBits() <= totalDataCount * 8) + break; + } + this.typeNumber = typeNumber; + } + this.makeImpl(false, this.getBestMaskPattern() ); + }, + + makeImpl : function(test, maskPattern) { + + this.moduleCount = this.typeNumber * 4 + 17; + this.modules = new Array(this.moduleCount); + + for (var row = 0; row < this.moduleCount; row++) { + + this.modules[row] = new Array(this.moduleCount); + + for (var col = 0; col < this.moduleCount; col++) { + this.modules[row][col] = null;//(col + row) % 3; + } + } + + this.setupPositionProbePattern(0, 0); + this.setupPositionProbePattern(this.moduleCount - 7, 0); + this.setupPositionProbePattern(0, this.moduleCount - 7); + this.setupPositionAdjustPattern(); + this.setupTimingPattern(); + this.setupTypeInfo(test, maskPattern); + + if (this.typeNumber >= 7) { + this.setupTypeNumber(test); + } + + if (this.dataCache === null) { + this.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList); + } + + this.mapData(this.dataCache, maskPattern); + }, + + setupPositionProbePattern : function(row, col) { + + for (var r = -1; r <= 7; r++) { + + if (row + r <= -1 || this.moduleCount <= row + r) continue; + + for (var c = -1; c <= 7; c++) { + + if (col + c <= -1 || this.moduleCount <= col + c) continue; + + if ( (0 <= r && r <= 6 && (c === 0 || c === 6) ) || + (0 <= c && c <= 6 && (r === 0 || r === 6) ) || + (2 <= r && r <= 4 && 2 <= c && c <= 4) ) { + this.modules[row + r][col + c] = true; + } else { + this.modules[row + r][col + c] = false; + } + } + } + }, + + getBestMaskPattern : function() { + + var minLostPoint = 0; + var pattern = 0; + + for (var i = 0; i < 8; i++) { + + this.makeImpl(true, i); + + var lostPoint = QRUtil.getLostPoint(this); + + if (i === 0 || minLostPoint > lostPoint) { + minLostPoint = lostPoint; + pattern = i; + } + } + + return pattern; + }, + + createMovieClip : function(target_mc, instance_name, depth) { + + var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth); + var cs = 1; + + this.make(); + + for (var row = 0; row < this.modules.length; row++) { + + var y = row * cs; + + for (var col = 0; col < this.modules[row].length; col++) { + + var x = col * cs; + var dark = this.modules[row][col]; + + if (dark) { + qr_mc.beginFill(0, 100); + qr_mc.moveTo(x, y); + qr_mc.lineTo(x + cs, y); + qr_mc.lineTo(x + cs, y + cs); + qr_mc.lineTo(x, y + cs); + qr_mc.endFill(); + } + } + } + + return qr_mc; + }, + + setupTimingPattern : function() { + + for (var r = 8; r < this.moduleCount - 8; r++) { + if (this.modules[r][6] !== null) { + continue; + } + this.modules[r][6] = (r % 2 === 0); + } + + for (var c = 8; c < this.moduleCount - 8; c++) { + if (this.modules[6][c] !== null) { + continue; + } + this.modules[6][c] = (c % 2 === 0); + } + }, + + setupPositionAdjustPattern : function() { + + var pos = QRUtil.getPatternPosition(this.typeNumber); + + for (var i = 0; i < pos.length; i++) { + + for (var j = 0; j < pos.length; j++) { + + var row = pos[i]; + var col = pos[j]; + + if (this.modules[row][col] !== null) { + continue; + } + + for (var r = -2; r <= 2; r++) { + + for (var c = -2; c <= 2; c++) { + + if (Math.abs(r) === 2 || + Math.abs(c) === 2 || + (r === 0 && c === 0) ) { + this.modules[row + r][col + c] = true; + } else { + this.modules[row + r][col + c] = false; + } + } + } + } + } + }, + + setupTypeNumber : function(test) { + + var bits = QRUtil.getBCHTypeNumber(this.typeNumber); + var mod; + + for (var i = 0; i < 18; i++) { + mod = (!test && ( (bits >> i) & 1) === 1); + this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod; + } + + for (var x = 0; x < 18; x++) { + mod = (!test && ( (bits >> x) & 1) === 1); + this.modules[x % 3 + this.moduleCount - 8 - 3][Math.floor(x / 3)] = mod; + } + }, + + setupTypeInfo : function(test, maskPattern) { + + var data = (this.errorCorrectLevel << 3) | maskPattern; + var bits = QRUtil.getBCHTypeInfo(data); + var mod; + + // vertical + for (var v = 0; v < 15; v++) { + + mod = (!test && ( (bits >> v) & 1) === 1); + + if (v < 6) { + this.modules[v][8] = mod; + } else if (v < 8) { + this.modules[v + 1][8] = mod; + } else { + this.modules[this.moduleCount - 15 + v][8] = mod; + } + } + + // horizontal + for (var h = 0; h < 15; h++) { + + mod = (!test && ( (bits >> h) & 1) === 1); + + if (h < 8) { + this.modules[8][this.moduleCount - h - 1] = mod; + } else if (h < 9) { + this.modules[8][15 - h - 1 + 1] = mod; + } else { + this.modules[8][15 - h - 1] = mod; + } + } + + // fixed module + this.modules[this.moduleCount - 8][8] = (!test); + + }, + + mapData : function(data, maskPattern) { + + var inc = -1; + var row = this.moduleCount - 1; + var bitIndex = 7; + var byteIndex = 0; + + for (var col = this.moduleCount - 1; col > 0; col -= 2) { + + if (col === 6) col--; + + while (true) { + + for (var c = 0; c < 2; c++) { + + if (this.modules[row][col - c] === null) { + + var dark = false; + + if (byteIndex < data.length) { + dark = ( ( (data[byteIndex] >>> bitIndex) & 1) === 1); + } + + var mask = QRUtil.getMask(maskPattern, row, col - c); + + if (mask) { + dark = !dark; + } + + this.modules[row][col - c] = dark; + bitIndex--; + + if (bitIndex === -1) { + byteIndex++; + bitIndex = 7; + } + } + } + + row += inc; + + if (row < 0 || this.moduleCount <= row) { + row -= inc; + inc = -inc; + break; + } + } + } + + } + +}; + +QRCode.PAD0 = 0xEC; +QRCode.PAD1 = 0x11; + +QRCode.createData = function(typeNumber, errorCorrectLevel, dataList) { + + var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel); + + var buffer = new QRBitBuffer(); + + for (var i = 0; i < dataList.length; i++) { + var data = dataList[i]; + buffer.put(data.mode, 4); + buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) ); + data.write(buffer); + } + + // calc num max data. + var totalDataCount = 0; + for (var x = 0; x < rsBlocks.length; x++) { + totalDataCount += rsBlocks[x].dataCount; + } + + if (buffer.getLengthInBits() > totalDataCount * 8) { + throw new Error("code length overflow. (" + + buffer.getLengthInBits() + + ">" + + totalDataCount * 8 + + ")"); + } + + // end code + if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) { + buffer.put(0, 4); + } + + // padding + while (buffer.getLengthInBits() % 8 !== 0) { + buffer.putBit(false); + } + + // padding + while (true) { + + if (buffer.getLengthInBits() >= totalDataCount * 8) { + break; + } + buffer.put(QRCode.PAD0, 8); + + if (buffer.getLengthInBits() >= totalDataCount * 8) { + break; + } + buffer.put(QRCode.PAD1, 8); + } + + return QRCode.createBytes(buffer, rsBlocks); +}; + +QRCode.createBytes = function(buffer, rsBlocks) { + + var offset = 0; + + var maxDcCount = 0; + var maxEcCount = 0; + + var dcdata = new Array(rsBlocks.length); + var ecdata = new Array(rsBlocks.length); + + for (var r = 0; r < rsBlocks.length; r++) { + + var dcCount = rsBlocks[r].dataCount; + var ecCount = rsBlocks[r].totalCount - dcCount; + + maxDcCount = Math.max(maxDcCount, dcCount); + maxEcCount = Math.max(maxEcCount, ecCount); + + dcdata[r] = new Array(dcCount); + + for (var i = 0; i < dcdata[r].length; i++) { + dcdata[r][i] = 0xff & buffer.buffer[i + offset]; + } + offset += dcCount; + + var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount); + var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1); + + var modPoly = rawPoly.mod(rsPoly); + ecdata[r] = new Array(rsPoly.getLength() - 1); + for (var x = 0; x < ecdata[r].length; x++) { + var modIndex = x + modPoly.getLength() - ecdata[r].length; + ecdata[r][x] = (modIndex >= 0)? modPoly.get(modIndex) : 0; + } + + } + + var totalCodeCount = 0; + for (var y = 0; y < rsBlocks.length; y++) { + totalCodeCount += rsBlocks[y].totalCount; + } + + var data = new Array(totalCodeCount); + var index = 0; + + for (var z = 0; z < maxDcCount; z++) { + for (var s = 0; s < rsBlocks.length; s++) { + if (z < dcdata[s].length) { + data[index++] = dcdata[s][z]; + } + } + } + + for (var xx = 0; xx < maxEcCount; xx++) { + for (var t = 0; t < rsBlocks.length; t++) { + if (xx < ecdata[t].length) { + data[index++] = ecdata[t][xx]; + } + } + } + + return data; + +}; + +module.exports = QRCode; diff --git a/deps/npm/node_modules/query-string/index.js b/deps/npm/node_modules/query-string/index.js new file mode 100644 index 0000000000..37c485377c --- /dev/null +++ b/deps/npm/node_modules/query-string/index.js @@ -0,0 +1,206 @@ +'use strict'; +var strictUriEncode = require('strict-uri-encode'); +var objectAssign = require('object-assign'); +var decodeComponent = require('decode-uri-component'); + +function encoderForArrayFormat(opts) { + switch (opts.arrayFormat) { + case 'index': + return function (key, value, index) { + return value === null ? [ + encode(key, opts), + '[', + index, + ']' + ].join('') : [ + encode(key, opts), + '[', + encode(index, opts), + ']=', + encode(value, opts) + ].join(''); + }; + + case 'bracket': + return function (key, value) { + return value === null ? encode(key, opts) : [ + encode(key, opts), + '[]=', + encode(value, opts) + ].join(''); + }; + + default: + return function (key, value) { + return value === null ? encode(key, opts) : [ + encode(key, opts), + '=', + encode(value, opts) + ].join(''); + }; + } +} + +function parserForArrayFormat(opts) { + var result; + + switch (opts.arrayFormat) { + case 'index': + return function (key, value, accumulator) { + result = /\[(\d*)\]$/.exec(key); + + key = key.replace(/\[\d*\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } + + if (accumulator[key] === undefined) { + accumulator[key] = {}; + } + + accumulator[key][result[1]] = value; + }; + + case 'bracket': + return function (key, value, accumulator) { + result = /(\[\])$/.exec(key); + key = key.replace(/\[\]$/, ''); + + if (!result) { + accumulator[key] = value; + return; + } else if (accumulator[key] === undefined) { + accumulator[key] = [value]; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + + default: + return function (key, value, accumulator) { + if (accumulator[key] === undefined) { + accumulator[key] = value; + return; + } + + accumulator[key] = [].concat(accumulator[key], value); + }; + } +} + +function encode(value, opts) { + if (opts.encode) { + return opts.strict ? strictUriEncode(value) : encodeURIComponent(value); + } + + return value; +} + +function keysSorter(input) { + if (Array.isArray(input)) { + return input.sort(); + } else if (typeof input === 'object') { + return keysSorter(Object.keys(input)).sort(function (a, b) { + return Number(a) - Number(b); + }).map(function (key) { + return input[key]; + }); + } + + return input; +} + +exports.extract = function (str) { + return str.split('?')[1] || ''; +}; + +exports.parse = function (str, opts) { + opts = objectAssign({arrayFormat: 'none'}, opts); + + var formatter = parserForArrayFormat(opts); + + // Create an object with no prototype + // https://github.com/sindresorhus/query-string/issues/47 + var ret = Object.create(null); + + if (typeof str !== 'string') { + return ret; + } + + str = str.trim().replace(/^(\?|#|&)/, ''); + + if (!str) { + return ret; + } + + str.split('&').forEach(function (param) { + var parts = param.replace(/\+/g, ' ').split('='); + // Firefox (pre 40) decodes `%3D` to `=` + // https://github.com/sindresorhus/query-string/pull/37 + var key = parts.shift(); + var val = parts.length > 0 ? parts.join('=') : undefined; + + // missing `=` should be `null`: + // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters + val = val === undefined ? null : decodeComponent(val); + + formatter(decodeComponent(key), val, ret); + }); + + return Object.keys(ret).sort().reduce(function (result, key) { + var val = ret[key]; + if (Boolean(val) && typeof val === 'object' && !Array.isArray(val)) { + // Sort object keys, not values + result[key] = keysSorter(val); + } else { + result[key] = val; + } + + return result; + }, Object.create(null)); +}; + +exports.stringify = function (obj, opts) { + var defaults = { + encode: true, + strict: true, + arrayFormat: 'none' + }; + + opts = objectAssign(defaults, opts); + + var formatter = encoderForArrayFormat(opts); + + return obj ? Object.keys(obj).sort().map(function (key) { + var val = obj[key]; + + if (val === undefined) { + return ''; + } + + if (val === null) { + return encode(key, opts); + } + + if (Array.isArray(val)) { + var result = []; + + val.slice().forEach(function (val2) { + if (val2 === undefined) { + return; + } + + result.push(formatter(key, val2, result.length)); + }); + + return result.join('&'); + } + + return encode(key, opts) + '=' + encode(val, opts); + }).filter(function (x) { + return x.length > 0; + }).join('&') : ''; +}; diff --git a/deps/npm/node_modules/query-string/license b/deps/npm/node_modules/query-string/license new file mode 100644 index 0000000000..e7af2f7710 --- /dev/null +++ b/deps/npm/node_modules/query-string/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/deps/npm/node_modules/query-string/node_modules/decode-uri-component/index.js b/deps/npm/node_modules/query-string/node_modules/decode-uri-component/index.js new file mode 100644 index 0000000000..691499b0e8 --- /dev/null +++ b/deps/npm/node_modules/query-string/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/deps/npm/node_modules/query-string/node_modules/decode-uri-component/license b/deps/npm/node_modules/query-string/node_modules/decode-uri-component/license new file mode 100644 index 0000000000..78b08554a3 --- /dev/null +++ b/deps/npm/node_modules/query-string/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/deps/npm/node_modules/query-string/node_modules/decode-uri-component/package.json b/deps/npm/node_modules/query-string/node_modules/decode-uri-component/package.json new file mode 100644 index 0000000000..a5fe214ca1 --- /dev/null +++ b/deps/npm/node_modules/query-string/node_modules/decode-uri-component/package.json @@ -0,0 +1,69 @@ +{ + "_from": "decode-uri-component@^0.2.0", + "_id": "decode-uri-component@0.2.0", + "_inBundle": false, + "_integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "_location": "/query-string/decode-uri-component", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "decode-uri-component@^0.2.0", + "name": "decode-uri-component", + "escapedName": "decode-uri-component", + "rawSpec": "^0.2.0", + "saveSpec": null, + "fetchSpec": "^0.2.0" + }, + "_requiredBy": [ + "/query-string" + ], + "_resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "_shasum": "eb3913333458775cb84cd1a1fae062106bb87545", + "_spec": "decode-uri-component@^0.2.0", + "_where": "/Users/rebecca/code/npm/node_modules/query-string", + "author": { + "name": "Sam Verschueren", + "email": "sam.verschueren@gmail.com", + "url": "github.com/SamVerschueren" + }, + "bugs": { + "url": "https://github.com/SamVerschueren/decode-uri-component/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A better decodeURIComponent", + "devDependencies": { + "ava": "^0.17.0", + "coveralls": "^2.13.1", + "nyc": "^10.3.2", + "xo": "^0.16.0" + }, + "engines": { + "node": ">=0.10" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/SamVerschueren/decode-uri-component#readme", + "keywords": [ + "decode", + "uri", + "component", + "decodeuricomponent", + "components", + "decoder", + "url" + ], + "license": "MIT", + "name": "decode-uri-component", + "repository": { + "type": "git", + "url": "git+https://github.com/SamVerschueren/decode-uri-component.git" + }, + "scripts": { + "coveralls": "nyc report --reporter=text-lcov | coveralls", + "test": "xo && nyc ava" + }, + "version": "0.2.0" +} diff --git a/deps/npm/node_modules/query-string/node_modules/decode-uri-component/readme.md b/deps/npm/node_modules/query-string/node_modules/decode-uri-component/readme.md new file mode 100644 index 0000000000..795c87ff77 --- /dev/null +++ b/deps/npm/node_modules/query-string/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/deps/npm/node_modules/query-string/node_modules/object-assign/index.js b/deps/npm/node_modules/query-string/node_modules/object-assign/index.js new file mode 100644 index 0000000000..0930cf8890 --- /dev/null +++ b/deps/npm/node_modules/query-string/node_modules/object-assign/index.js @@ -0,0 +1,90 @@ +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + +'use strict'; +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; diff --git a/deps/npm/node_modules/query-string/node_modules/object-assign/license b/deps/npm/node_modules/query-string/node_modules/object-assign/license new file mode 100644 index 0000000000..654d0bfe94 --- /dev/null +++ b/deps/npm/node_modules/query-string/node_modules/object-assign/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/deps/npm/node_modules/query-string/node_modules/object-assign/package.json b/deps/npm/node_modules/query-string/node_modules/object-assign/package.json new file mode 100644 index 0000000000..80ff3c78c4 --- /dev/null +++ b/deps/npm/node_modules/query-string/node_modules/object-assign/package.json @@ -0,0 +1,74 @@ +{ + "_from": "object-assign@^4.1.0", + "_id": "object-assign@4.1.1", + "_inBundle": false, + "_integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "_location": "/query-string/object-assign", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "object-assign@^4.1.0", + "name": "object-assign", + "escapedName": "object-assign", + "rawSpec": "^4.1.0", + "saveSpec": null, + "fetchSpec": "^4.1.0" + }, + "_requiredBy": [ + "/query-string" + ], + "_resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "_shasum": "2109adc7965887cfc05cbbd442cac8bfbb360863", + "_spec": "object-assign@^4.1.0", + "_where": "/Users/rebecca/code/npm/node_modules/query-string", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/object-assign/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "ES2015 `Object.assign()` ponyfill", + "devDependencies": { + "ava": "^0.16.0", + "lodash": "^4.16.4", + "matcha": "^0.7.0", + "xo": "^0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/object-assign#readme", + "keywords": [ + "object", + "assign", + "extend", + "properties", + "es2015", + "ecmascript", + "harmony", + "ponyfill", + "prollyfill", + "polyfill", + "shim", + "browser" + ], + "license": "MIT", + "name": "object-assign", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/object-assign.git" + }, + "scripts": { + "bench": "matcha bench.js", + "test": "xo && ava" + }, + "version": "4.1.1" +} diff --git a/deps/npm/node_modules/query-string/node_modules/object-assign/readme.md b/deps/npm/node_modules/query-string/node_modules/object-assign/readme.md new file mode 100644 index 0000000000..1be09d35c7 --- /dev/null +++ b/deps/npm/node_modules/query-string/node_modules/object-assign/readme.md @@ -0,0 +1,61 @@ +# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign) + +> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com) + + +## Use the built-in + +Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari), +support `Object.assign()` :tada:. If you target only those environments, then by all +means, use `Object.assign()` instead of this package. + + +## Install + +``` +$ npm install --save object-assign +``` + + +## Usage + +```js +const objectAssign = require('object-assign'); + +objectAssign({foo: 0}, {bar: 1}); +//=> {foo: 0, bar: 1} + +// multiple sources +objectAssign({foo: 0}, {bar: 1}, {baz: 2}); +//=> {foo: 0, bar: 1, baz: 2} + +// overwrites equal keys +objectAssign({foo: 0}, {foo: 1}, {foo: 2}); +//=> {foo: 2} + +// ignores null and undefined sources +objectAssign({foo: 0}, null, {bar: 1}, undefined); +//=> {foo: 0, bar: 1} +``` + + +## API + +### objectAssign(target, [source, ...]) + +Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones. + + +## Resources + +- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign) + + +## Related + +- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/index.js b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/index.js new file mode 100644 index 0000000000..414de96c51 --- /dev/null +++ b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/index.js @@ -0,0 +1,6 @@ +'use strict'; +module.exports = function (str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase(); + }); +}; diff --git a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/license b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/license new file mode 100644 index 0000000000..e0e915823d --- /dev/null +++ b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Kevin Mårtensson (github.com/kevva) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/package.json b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/package.json new file mode 100644 index 0000000000..344b83ab40 --- /dev/null +++ b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/package.json @@ -0,0 +1,62 @@ +{ + "_from": "strict-uri-encode@^1.0.0", + "_id": "strict-uri-encode@1.1.0", + "_inBundle": false, + "_integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", + "_location": "/query-string/strict-uri-encode", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "strict-uri-encode@^1.0.0", + "name": "strict-uri-encode", + "escapedName": "strict-uri-encode", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/query-string" + ], + "_resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz", + "_shasum": "279b225df1d582b1f54e65addd4352e18faa0713", + "_spec": "strict-uri-encode@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/query-string", + "author": { + "name": "Kevin Mårtensson", + "email": "kevinmartensson@gmail.com", + "url": "github.com/kevva" + }, + "bugs": { + "url": "https://github.com/kevva/strict-uri-encode/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "A stricter URI encode adhering to RFC 3986", + "devDependencies": { + "ava": "^0.0.4" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/kevva/strict-uri-encode#readme", + "keywords": [ + "component", + "encode", + "RFC3986", + "uri" + ], + "license": "MIT", + "name": "strict-uri-encode", + "repository": { + "type": "git", + "url": "git+https://github.com/kevva/strict-uri-encode.git" + }, + "scripts": { + "test": "node test.js" + }, + "version": "1.1.0" +} diff --git a/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/readme.md b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/readme.md new file mode 100644 index 0000000000..b2407903a9 --- /dev/null +++ b/deps/npm/node_modules/query-string/node_modules/strict-uri-encode/readme.md @@ -0,0 +1,40 @@ +# strict-uri-encode [![Build Status](https://travis-ci.org/kevva/strict-uri-encode.svg?branch=master)](https://travis-ci.org/kevva/strict-uri-encode) + +> A stricter URI encode adhering to [RFC 3986](http://tools.ietf.org/html/rfc3986) + + +## Install + +``` +$ npm install --save strict-uri-encode +``` + + +## Usage + +```js +var strictUriEncode = require('strict-uri-encode'); + +strictUriEncode('unicorn!foobar') +//=> 'unicorn%21foobar' + +strictUriEncode('unicorn*foobar') +//=> 'unicorn%2Afoobar' +``` + + +## API + +### strictUriEncode(string) + +#### string + +*Required* +Type: `string`, `number` + +String to URI encode. + + +## License + +MIT © [Kevin Mårtensson](http://github.com/kevva) diff --git a/deps/npm/node_modules/query-string/package.json b/deps/npm/node_modules/query-string/package.json new file mode 100644 index 0000000000..861634e96c --- /dev/null +++ b/deps/npm/node_modules/query-string/package.json @@ -0,0 +1,78 @@ +{ + "_from": "query-string", + "_id": "query-string@5.0.0", + "_inBundle": false, + "_integrity": "sha1-+99wBLTSr/eS+YcZgbeieU9VWUc=", + "_location": "/query-string", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "query-string", + "name": "query-string", + "escapedName": "query-string", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/query-string/-/query-string-5.0.0.tgz", + "_shasum": "fbdf7004b4d2aff792f9871981b7a2794f555947", + "_spec": "query-string", + "_where": "/Users/rebecca/code/npm", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/query-string/issues" + }, + "bundleDependencies": false, + "dependencies": { + "decode-uri-component": "^0.2.0", + "object-assign": "^4.1.0", + "strict-uri-encode": "^1.0.0" + }, + "deprecated": false, + "description": "Parse and stringify URL query strings", + "devDependencies": { + "ava": "^0.17.0", + "xo": "^0.16.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/query-string#readme", + "keywords": [ + "browser", + "querystring", + "query", + "string", + "qs", + "param", + "parameter", + "url", + "uri", + "parse", + "stringify", + "encode", + "decode" + ], + "license": "MIT", + "name": "query-string", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/query-string.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "5.0.0" +} diff --git a/deps/npm/node_modules/query-string/readme.md b/deps/npm/node_modules/query-string/readme.md new file mode 100644 index 0000000000..8d2148c9d1 --- /dev/null +++ b/deps/npm/node_modules/query-string/readme.md @@ -0,0 +1,186 @@ +# query-string [![Build Status](https://travis-ci.org/sindresorhus/query-string.svg?branch=master)](https://travis-ci.org/sindresorhus/query-string) + +> Parse and stringify URL [query strings](http://en.wikipedia.org/wiki/Query_string) + +--- + +

                🔥 Want to strengthen your core JavaScript skills and master ES6?
                I would personally recommend this awesome ES6 course by Wes Bos. You might also like his React course.

                + +--- + + +## Install + +``` +$ npm install query-string +``` + + +## Usage + +```js +const queryString = require('query-string'); + +console.log(location.search); +//=> '?foo=bar' + +const parsed = queryString.parse(location.search); +console.log(parsed); +//=> {foo: 'bar'} + +console.log(location.hash); +//=> '#token=bada55cafe' + +const parsedHash = queryString.parse(location.hash); +console.log(parsedHash); +//=> {token: 'bada55cafe'} + +parsed.foo = 'unicorn'; +parsed.ilike = 'pizza'; + +const stringified = queryString.stringify(parsed); +//=> 'foo=unicorn&ilike=pizza' + +location.search = stringified; +// note that `location.search` automatically prepends a question mark +console.log(location.search); +//=> '?foo=unicorn&ilike=pizza' +``` + + +## API + +### .parse(*string*, *[options]*) + +Parse a query string into an object. Leading `?` or `#` are ignored, so you can pass `location.search` or `location.hash` directly. + +The returned object is created with [`Object.create(null)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create) and thus does not have a `prototype`. + +URI components are decoded with [`decode-uri-component`](https://github.com/SamVerschueren/decode-uri-component). + +#### arrayFormat + +Type: `string`
                +Default: `'none'` + +Supports both `index` for an indexed array representation or `bracket` for a *bracketed* array representation. + +- `bracket`: stands for parsing correctly arrays with bracket representation on the query string, such as: + +```js +queryString.parse('foo[]=1&foo[]=2&foo[]=3', {arrayFormat: 'bracket'}); +//=> foo: [1,2,3] +``` + +- `index`: stands for parsing taking the index into account, such as: + +```js +queryString.parse('foo[0]=1&foo[1]=2&foo[3]=3', {arrayFormat: 'index'}); +//=> foo: [1,2,3] +``` + +- `none`: is the **default** option and removes any bracket representation, such as: + +```js +queryString.parse('foo=1&foo=2&foo=3'); +//=> foo: [1,2,3] +``` + +### .stringify(*object*, *[options]*) + +Stringify an object into a query string, sorting the keys. + +#### strict + +Type: `boolean`
                +Default: `true` + +Strictly encode URI components with [strict-uri-encode](https://github.com/kevva/strict-uri-encode). It uses [encodeURIComponent](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) +if set to false. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option. + +#### encode + +Type: `boolean`
                +Default: `true` + +[URL encode](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) the keys and values. + +#### arrayFormat + +Type: `string`
                +Default: `'none'` + +Supports both `index` for an indexed array representation or `bracket` for a *bracketed* array representation. + +- `bracket`: stands for parsing correctly arrays with bracket representation on the query string, such as: + +```js +queryString.stringify({foo: [1,2,3]}, {arrayFormat: 'bracket'}); +// => foo[]=1&foo[]=2&foo[]=3 +``` + +- `index`: stands for parsing taking the index into account, such as: + +```js +queryString.stringify({foo: [1,2,3]}, {arrayFormat: 'index'}); +// => foo[0]=1&foo[1]=2&foo[3]=3 +``` + +- `none`: is the __default__ option and removes any bracket representation, such as: + +```js +queryString.stringify({foo: [1,2,3]}); +// => foo=1&foo=2&foo=3 +``` + +### .extract(*string*) + +Extract a query string from a URL that can be passed into `.parse()`. + + +## Nesting + +This module intentionally doesn't support nesting as it's not spec'd and varies between implementations, which causes a lot of [edge cases](https://github.com/visionmedia/node-querystring/issues). + +You're much better off just converting the object to a JSON string: + +```js +queryString.stringify({ + foo: 'bar', + nested: JSON.stringify({ + unicorn: 'cake' + }) +}); +//=> 'foo=bar&nested=%7B%22unicorn%22%3A%22cake%22%7D' +``` + +However, there is support for multiple instances of the same key: + +```js +queryString.parse('likes=cake&name=bob&likes=icecream'); +//=> {likes: ['cake', 'icecream'], name: 'bob'} + +queryString.stringify({color: ['taupe', 'chartreuse'], id: '515'}); +//=> 'color=chartreuse&color=taupe&id=515' +``` + + +## Falsy values + +Sometimes you want to unset a key, or maybe just make it present without assigning a value to it. Here is how falsy values are stringified: + +```js +queryString.stringify({foo: false}); +//=> 'foo=false' + +queryString.stringify({foo: null}); +//=> 'foo' + +queryString.stringify({foo: undefined}); +//=> '' +``` + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/deps/npm/node_modules/qw/LICENSE b/deps/npm/node_modules/qw/LICENSE new file mode 100644 index 0000000000..74bf5afb71 --- /dev/null +++ b/deps/npm/node_modules/qw/LICENSE @@ -0,0 +1,13 @@ +Copyright (c) 2016, 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/deps/npm/node_modules/qw/README.md b/deps/npm/node_modules/qw/README.md new file mode 100644 index 0000000000..55ba17a91f --- /dev/null +++ b/deps/npm/node_modules/qw/README.md @@ -0,0 +1,34 @@ +# qw + +Quoted word literals! + +```js +const qw = require('qw') + +const myword = qw` this is + a long list + of words` +// equiv of: +const myword = [ 'this', 'is', 'a', 'long', 'list', 'of', 'words' ] +``` + +You can embed vars in the usual way: + +```js +const mywords = qw`product ${23 * 5} also ${'escaping a string'}` +// equiv of: +const mywords = [ 'product', 23 * 5, 'also', 'escaping a string' ] +``` + +You can also embed vars inside strings: + +```js +const mywords = qw`product=${23 * 5} also "${'escaping a string'}"` +// equiv of: +const mywords = [ 'product=' + (23 * 5), 'also', '"escaping a string"' ] +``` + +## DESCRIPTION + +This uses template strings to bring over this little common convenience from +Perl-land. diff --git a/deps/npm/node_modules/qw/package.json b/deps/npm/node_modules/qw/package.json new file mode 100644 index 0000000000..fb4c272f35 --- /dev/null +++ b/deps/npm/node_modules/qw/package.json @@ -0,0 +1,60 @@ +{ + "_from": "qw", + "_id": "qw@1.0.1", + "_inBundle": false, + "_integrity": "sha1-77/cdA+a0FQwRCassYNBLMi5ltQ=", + "_location": "/qw", + "_phantomChildren": {}, + "_requested": { + "type": "tag", + "registry": true, + "raw": "qw", + "name": "qw", + "escapedName": "qw", + "rawSpec": "", + "saveSpec": null, + "fetchSpec": "latest" + }, + "_requiredBy": [ + "#USER", + "/" + ], + "_resolved": "https://registry.npmjs.org/qw/-/qw-1.0.1.tgz", + "_shasum": "efbfdc740f9ad054304426acb183412cc8b996d4", + "_spec": "qw", + "_where": "/Users/rebecca/code/npm", + "author": { + "name": "Rebecca Turner", + "email": "me@re-becca.org", + "url": "http://re-becca.org/" + }, + "bugs": { + "url": "https://github.com/iarna/node-qw/issues" + }, + "bundleDependencies": false, + "dependencies": {}, + "deprecated": false, + "description": "Quoted word literals!", + "devDependencies": { + "tap": "^8.0.0" + }, + "directories": { + "test": "test" + }, + "files": [ + "qw.js" + ], + "homepage": "https://github.com/iarna/node-qw#readme", + "keywords": [], + "license": "ISC", + "main": "qw.js", + "name": "qw", + "repository": { + "type": "git", + "url": "git+https://github.com/iarna/node-qw.git" + }, + "scripts": { + "test": "tap test" + }, + "version": "1.0.1" +} diff --git a/deps/npm/node_modules/qw/qw.js b/deps/npm/node_modules/qw/qw.js new file mode 100644 index 0000000000..239e5a565e --- /dev/null +++ b/deps/npm/node_modules/qw/qw.js @@ -0,0 +1,43 @@ +'use strict' +module.exports = qw + +function appendLast (arr, str) { + var last = arr.length - 1 + if (last < 0) { + arr.push(str) + } else { + var lastValue = String(arr[last]) + return arr[last] = lastValue + String(str) + } +} + +function qw () { + const args = Object.assign([], arguments[0]) + const values = [].slice.call(arguments, 1) + const words = [] + let lastWordWasValue = false + while (args.length) { + const arg = args.shift() + const concatValue = arg.length === 0 || arg.slice(-1) !== ' ' + if (arg.trim() !== '') { + const theseWords = arg.replace(/^\s+|\s+$/g, '').replace(/\s+/g, ' ').split(/ /) + if (lastWordWasValue && arg[0] !== ' ') { + appendLast(words, theseWords.shift()) + } + words.push.apply(words, theseWords) + } + + if (values.length) { + const val = values.shift() + if (concatValue) { + appendLast(words, val) + } else { + words.push(val) + } + lastWordWasValue = true + } else { + lastWordWasValue = false + } + } + return words +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/CHANGELOG.md b/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/CHANGELOG.md new file mode 100644 index 0000000000..843a0bcb94 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/CHANGELOG.md @@ -0,0 +1,36 @@ +# 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. + + +## [1.0.1](https://github.com/zkat/json-parse-better-errors/compare/v1.0.0...v1.0.1) (2017-08-16) + + +### Bug Fixes + +* **license:** oops. Forgot to update license.md ([efe2958](https://github.com/zkat/json-parse-better-errors/commit/efe2958)) + + + + +# 1.0.0 (2017-08-15) + + +### Features + +* **init:** Initial Commit ([562c977](https://github.com/zkat/json-parse-better-errors/commit/562c977)) + + +### BREAKING CHANGES + +* **init:** This is the first commit! + + + + +# 0.1.0 (2017-08-15) + + +### Features + +* **init:** Initial Commit ([9dd1a19](https://github.com/zkat/json-parse-better-errors/commit/9dd1a19)) diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/LICENSE.md b/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/LICENSE.md new file mode 100644 index 0000000000..c51842cc4a --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/LICENSE.md @@ -0,0 +1,7 @@ +Copyright 2017 Kat Marchán + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/README.md b/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/README.md new file mode 100644 index 0000000000..667323c775 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/README.md @@ -0,0 +1,53 @@ +# json-parse-better-errors [![npm version](https://img.shields.io/npm/v/json-parse-better-errors.svg)](https://npm.im/json-parse-better-errors) [![license](https://img.shields.io/npm/l/json-parse-better-errors.svg)](https://npm.im/json-parse-better-errors) [![Travis](https://img.shields.io/travis/zkat/json-parse-better-errors.svg)](https://travis-ci.org/zkat/json-parse-better-errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/json-parse-better-errors?svg=true)](https://ci.appveyor.com/project/zkat/json-parse-better-errors) [![Coverage Status](https://coveralls.io/repos/github/zkat/json-parse-better-errors/badge.svg?branch=latest)](https://coveralls.io/github/zkat/json-parse-better-errors?branch=latest) + +[`json-parse-better-errors`](https://github.com/zkat/json-parse-better-errors) is a Node.js library for managing +local key and content address caches. It's really fast, really good at +concurrency, and it will never give you corrupted data, even if cache files +get corrupted or manipulated. + +It was originally written to be used as [npm](https://npm.im)'s local cache, but +can just as easily be used on its own + +_Translations: [español](README.es.md)_ + +## Install + +`$ npm install --save json-parse-better-errors` + +## Table of Contents + +* [Example](#example) +* [Features](#features) +* [Contributing](#contributing) +* [API](#api) + * [`parse`](#parse) + +### Example + +```javascript +const parseJson = require('json-parse-better-errors') + +parseJson('"foo"') +parseJson('garbage') // more useful error message +``` + +### Features + +* Like JSON.parse, but the errors are better. + +### Contributing + +The json-parse-better-errors team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear. + +All participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other. + +Please refer to the [Changelog](CHANGELOG.md) for project history details, too. + +Happy hacking! + +### API + +#### `> parse(txt, ?reviver, ?context=20)` + +Works just like `JSON.parse`, but will include a bit more information when an +error happens. diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/index.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/index.js new file mode 100644 index 0000000000..32c3635866 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/index.js @@ -0,0 +1,32 @@ +'use strict' + +module.exports = parseJson +function parseJson (txt, reviver, context) { + context = context || 20 + try { + return JSON.parse(txt, reviver) + } catch (e) { + const syntaxErr = e.message.match(/^Unexpected token.*position\s+(\d+)/i) + const errIdx = syntaxErr + ? +syntaxErr[1] + : e.message.match(/^Unexpected end of JSON.*/i) + ? txt.length - 1 + : null + if (errIdx != null) { + const start = errIdx <= context + ? 0 + : errIdx - context + const end = errIdx + context >= txt.length + ? txt.length + : errIdx + context + e.message += ` while parsing near '${ + start === 0 ? '' : '...' + }${txt.slice(start, end)}${ + end === txt.length ? '' : '...' + }'` + } else { + e.message += ` while parsing '${txt.slice(0, context * 2)}'` + } + throw e + } +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/package.json b/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/package.json new file mode 100644 index 0000000000..f1dd5890c7 --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/json-parse-better-errors/package.json @@ -0,0 +1,76 @@ +{ + "_from": "json-parse-better-errors@^1.0.0", + "_id": "json-parse-better-errors@1.0.1", + "_inBundle": false, + "_integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", + "_location": "/read-package-json/json-parse-better-errors", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "json-parse-better-errors@^1.0.0", + "name": "json-parse-better-errors", + "escapedName": "json-parse-better-errors", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/read-package-json" + ], + "_resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", + "_shasum": "50183cd1b2d25275de069e9e71b467ac9eab973a", + "_spec": "json-parse-better-errors@^1.0.0", + "_where": "/Users/zkat/Documents/code/npm/node_modules/read-package-json", + "author": { + "name": "Kat Marchán", + "email": "kzm@sykosomatic.org" + }, + "bugs": { + "url": "https://github.com/zkat/json-parse-better-errors/issues" + }, + "bundleDependencies": false, + "config": { + "nyc": { + "exclude": [ + "node_modules/**", + "test/**" + ] + } + }, + "deprecated": false, + "description": "JSON.parse with context information on error", + "devDependencies": { + "nyc": "^10.3.2", + "standard": "^9.0.2", + "standard-version": "^4.1.0", + "tap": "^10.3.3", + "weallbehave": "^1.2.0", + "weallcontribute": "^1.0.8" + }, + "files": [ + "*.js" + ], + "homepage": "https://github.com/zkat/json-parse-better-errors#readme", + "keywords": [ + "JSON", + "parser" + ], + "license": "MIT", + "main": "index.js", + "name": "json-parse-better-errors", + "repository": { + "type": "git", + "url": "git+https://github.com/zkat/json-parse-better-errors.git" + }, + "scripts": { + "postrelease": "npm publish && git push --follow-tags", + "prerelease": "npm t", + "pretest": "standard", + "release": "standard-version -s", + "test": "tap -J --coverage test/*.js", + "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", + "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" + }, + "version": "1.0.1" +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/.editorconfig b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/.editorconfig deleted file mode 100644 index fb7f73a832..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -root = true - -[*] -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*.js, **/*.js] -indent_size = 4 -indent_style = space - -[{package.json,.travis.yml}] -indent_size = 2 -indent_style = space diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/.npmignore b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/.npmignore deleted file mode 100644 index 59d842baa8..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/.npmignore +++ /dev/null @@ -1,28 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules - -# Users Environment Variables -.lock-wscript diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/LICENSE b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/LICENSE deleted file mode 100644 index e637724b3b..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Sam Mikes - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION 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/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/README.md b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/README.md deleted file mode 100644 index ffad93584b..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# json-parse-helpfulerror - -A drop-in replacement for `JSON.parse` that uses - to provide more useful error messages in the -event of a parse error. - -# Example - -## Installation - -``` -npm i -S json-parse-helpfulerror -``` - -## Use - -```js -var jph = require('json-parse-helpfulerror'); - -var notJSON = "{'foo': 3}"; // keys must be double-quoted in JSON - -JSON.parse(notJSON); // throws unhelpful error - -jph.parse("{'foo': 3}") // throws more helpful error: "Unexpected token '\''..." -``` - -# License - -MIT \ No newline at end of file diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/index.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/index.js deleted file mode 100644 index 15648b017b..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/index.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -var jju = require('jju'); - -function parse(text, reviver) { - try { - return JSON.parse(text, reviver); - } catch (err) { - // we expect this to throw with a more informative message - jju.parse(text, { - mode: 'json', - reviver: reviver - }); - - // backup if jju is not as strict as JSON.parse; re-throw error - // data-dependent code path, I do not know how to cover it - throw err; - } -} - -exports.parse = parse; diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/.npmignore b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/.npmignore deleted file mode 100644 index 5ae40150ee..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/.npmignore +++ /dev/null @@ -1,9 +0,0 @@ -package.json -node_modules -test -benchmark -docs -examples -/.editorconfig -/.eslint* -/.travis.yml diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/LICENSE b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/LICENSE deleted file mode 100644 index 5c93f45654..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/README.md b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/README.md deleted file mode 100644 index 85d52a2dce..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/README.md +++ /dev/null @@ -1,243 +0,0 @@ -`jju` - a set of utilities to work with JSON / JSON5 documents - -[![npm version badge](https://img.shields.io/npm/v/jju.svg)](https://www.npmjs.org/package/jju) -[![travis badge](http://img.shields.io/travis/rlidwka/jju.svg)](https://travis-ci.org/rlidwka/jju) -[![downloads badge](http://img.shields.io/npm/dm/jju.svg)](https://www.npmjs.org/package/jju) - -## Installation - -``` -npm install jju -``` - -## Usage - -This module provides following functions: - -1. [jju.parse()](#jjuparse-function) parses json/json5 text and returns a javascript value it corresponds to -2. [jju.stringify()](#jjustringify-function) converts javascript value to an appropriate json/json5 text -3. [jju.tokenize()](#jjutokenize-function) parses json/json5 text and returns an array of tokens it consists of ([see demo](http://rlidwka.github.io/jju/tokenizer.html)) -4. [jju.analyze()](#jjuanalyze-function) parses json/json5 text and tries to guess indentation, quoting style, etc. -5. [jju.update()](#jjuupdate-function) changes json/json5 text, preserving original formatting as much as possible ([see demo](http://rlidwka.github.io/jju/editor.html)) - -All functions are able to work with a standard JSON documents. `jju.parse()` and `jju.stringify()` are better in some cases, but slower than native `JSON.parse()` and `JSON.stringify()` versions. Detailed description see below. - -### jju.parse() function - -```javascript -/* - * Main syntax: - * - * `text` - text to parse, type: String - * `options` - parser options, type: Object - */ -jju.parse(text[, options]) - -// compatibility syntax -jju.parse(text[, reviver]) -``` - -Options: - - - reserved\_keys - what to do with reserved keys (String, default="ignore") - - "ignore" - ignore reserved keys - - "throw" - throw SyntaxError in case of reserved keys - - "replace" - replace reserved keys, this is the default JSON.parse behaviour, unsafe - - Reserved keys are keys that exist in an empty object (`hasOwnProperty`, `__proto__`, etc.). - -```javascript -// 'ignore' will cause reserved keys to be ignored: -parse('{hasOwnProperty: 1}', {reserved_keys: 'ignore'}) == {} -parse('{hasOwnProperty: 1, x: 2}', {reserved_keys: 'ignore'}).hasOwnProperty('x') == true - -// 'throw' will cause SyntaxError in these cases: -parse('{hasOwnProperty: 1}', {reserved_keys: 'throw'}) == SyntaxError - -// 'replace' will replace reserved keys with new ones: -parse('{hasOwnProperty: 1}', {reserved_keys: 'throw'}) == {hasOwnProperty: 1} -parse('{hasOwnProperty: 1, x: 2}', {reserved_keys: 'ignore'}).hasOwnProperty('x') == TypeError -``` - - - - null\_prototype - create object as Object.create(null) instead of '{}' (Boolean) - - if `reserved_keys != 'replace'`, default is **false** - - if `reserved_keys == 'replace'`, default is **true** - - It is usually unsafe and not recommended to change this option to false in the last case. - - - reviver - reviver function - Function - - This function should follow JSON specification - - - mode - operation mode, set it to 'json' if you want to throw on non-strict json files (String) - -### jju.stringify() function - -```javascript -/* - * Main syntax: - * - * `value` - value to serialize, type: * - * `options` - serializer options, type: Object - */ -jju.stringify(value[, options]) - -// compatibility syntax -jju.stringify(value[, replacer [, indent]) -``` - -Options: - - - ascii - output ascii only (Boolean, default=false) - If this option is enabled, output will not have any characters except of 0x20-0x7f. - - - indent - indentation (String, Number or Boolean, default='\t') - This option follows JSON specification. - - - quote - enquoting char (String, "'" or '"', default="'") - - quote\_keys - whether keys quoting in objects is required or not (String, default=false) - If you want `{"q": 1}` instead of `{q: 1}`, set it to true. - - - sort\_keys - sort all keys while stringifying (Boolean or Function, default=false) - By default sort order will depend on implementation, with v8 it's insertion order. If set to `true`, all keys (but not arrays) will be sorted alphabetically. You can provide your own sorting function as well. - - - replacer - replacer function or array (Function or Array) - This option follows JSON specification. - - - no\_trailing\_comma = don't output trailing comma (Boolean, default=false) - If this option is set, arrays like this `[1,2,3,]` will never be generated. Otherwise they may be generated for pretty printing. - - - mode - operation mode, set it to 'json' if you want correct json in the output (String) - - Currently it's either 'json' or something else. If it is 'json', following options are implied: - - - options.quote = '"' - - options.no\_trailing\_comma = true - - options.quote\_keys = true - - '\x' literals are not used - -### jju.tokenize() function - -```javascript -/* - * Main syntax: - * - * `text` - text to tokenize, type: String - * `options` - parser options, type: Object - */ -jju.tokenize(text[, options]) -``` - -Options are the same as for the `jju.parse` function. - -Return value is an array of tokens, where each token is an object: - - - raw (String) - raw text of this token, if you join all raw's, you will get the original document - - type (String) - type of the token, can be `whitespace`, `comment`, `key`, `literal`, `separator` or `newline` - - stack (Array) - path to the current token in the syntax tree - - value - value of the token if token is a `key` or `literal` - -You can check tokenizer for yourself using [this demo](http://rlidwka.github.io/jju/tokenizer.html). - -### jju.analyze() function - -```javascript -/* - * Main syntax: - * - * `text` - text to analyze, type: String - * `options` - parser options, type: Object - */ -jju.analyze(text[, options]) -``` - -Options are the same as for the `jju.parse` function. - -Return value is an object defining a programming style in which the document was written. - - - indent (String) - preferred indentation - - newline (String) - preferred newline - - quote (String) - `"` or `'` depending on which quote is preferred - - quote\_keys (Boolean) - `true` if unquoted keys were used at least once - - has\_whitespace (Boolean) - `true` if input has a whitespace token - - has\_comments (Boolean) - `true` if input has a comment token - - has\_newlines (Boolean) - `true` if input has a newline token - - has\_trailing\_comma (Boolean) - `true` if input has at least one trailing comma - -### jju.update() function - -```javascript -/* - * Main syntax: - * - * `text` - original text, type: String - * `new_value` - new value you want to set - * `options` - parser or stringifier options, type: Object - */ -jju.update(text, new_value[, options]) -``` - -If you want to update a JSON document, here is the general approach: - -```javascript -// here is your original JSON document: -var input = '{"foo": "bar", "baz": 123}' - -// you need to parse it first: -var json = jju.parse(input, {mode: 'json'}) -// json is { foo: 'bar', baz: 123 } - -// then you can change it as you like: -json.foo = 'quux' -json.hello = 'world' - -// then you run an update function to change the original json: -var output = jju.update(input, json, {mode: 'json'}) -// output is '{"foo": "quux", "baz": 123, "hello": "world"}' -``` - -Look at [this demo](http://rlidwka.github.io/jju/editor.html) to test various types of json. - -## Advantages over existing JSON libraries - -In a few cases it makes sense to use this module instead of built-in JSON methods. - -Parser: - - better error reporting with source code and line numbers - -In case of syntax error, JSON.parse does not return any good information to the user. This module does: - -``` -$ node -e 'require("jju").parse("[1,1,1,1,invalid]")' - -SyntaxError: Unexpected token 'i' at 0:9 -[1,1,1,1,invalid] - ^ -``` - -This module is about 5 times slower, so if user experience matters to you more than performance, use this module. If you're working with a lot of machine-generated data, use JSON.parse instead. - -Stringifier: - - util.inspect-like pretty printing - -This module behaves more smart when dealing with object and arrays, and does not always print newlines in them: - -``` -$ node -e 'console.log(require("./").stringify([[,,,],,,[,,,,]], {mode:"json"}))' -[ - [null, null, null], - null, - null, - [null, null, null, null] -] -``` - -JSON.stringify will split this into 15 lines, and it's hard to read. - -Yet again, this feature comes with a performance hit, so if user experience matters to you more than performance, use this module. If your JSON will be consumed by machines, use JSON.stringify instead. - -As a rule of thumb, if you use "space" argument to indent your JSON, you'd better use this module instead. - diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/index.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/index.js deleted file mode 100644 index 50f1624963..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/index.js +++ /dev/null @@ -1,32 +0,0 @@ - -module.exports.__defineGetter__('parse', function() { - return require('./lib/parse').parse -}) - -module.exports.__defineGetter__('stringify', function() { - return require('./lib/stringify').stringify -}) - -module.exports.__defineGetter__('tokenize', function() { - return require('./lib/parse').tokenize -}) - -module.exports.__defineGetter__('update', function() { - return require('./lib/document').update -}) - -module.exports.__defineGetter__('analyze', function() { - return require('./lib/analyze').analyze -}) - -module.exports.__defineGetter__('utils', function() { - return require('./lib/utils') -}) - -/**package -{ "name": "jju", - "version": "0.0.0", - "dependencies": {"js-yaml": "*"}, - "scripts": {"postinstall": "js-yaml package.yaml > package.json ; npm install"} -} -**/ diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js deleted file mode 100644 index 9b0f9af01c..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/analyze.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Author: Alex Kocharin - * GIT: https://github.com/rlidwka/jju - * License: WTFPL, grab your copy here: http://www.wtfpl.net/txt/copying/ - */ - -var tokenize = require('./parse').tokenize - -module.exports.analyze = function analyzeJSON(input, options) { - if (options == null) options = {} - - if (!Array.isArray(input)) { - input = tokenize(input, options) - } - - var result = { - has_whitespace: false, - has_comments: false, - has_newlines: false, - has_trailing_comma: false, - indent: '', - newline: '\n', - quote: '"', - quote_keys: true, - } - - var stats = { - indent: {}, - newline: {}, - quote: {}, - } - - for (var i=0; i stats[k][b] ? a : b - }) - } - } - - return result -} - diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js deleted file mode 100644 index cfab8691fc..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/document.js +++ /dev/null @@ -1,485 +0,0 @@ -/* - * Author: Alex Kocharin - * GIT: https://github.com/rlidwka/jju - * License: WTFPL, grab your copy here: http://www.wtfpl.net/txt/copying/ - */ - -var assert = require('assert') -var tokenize = require('./parse').tokenize -var stringify = require('./stringify').stringify -var analyze = require('./analyze').analyze - -function isObject(x) { - return typeof(x) === 'object' && x !== null -} - -function value_to_tokenlist(value, stack, options, is_key, indent) { - options = Object.create(options) - options._stringify_key = !!is_key - - if (indent) { - options._prefix = indent.prefix.map(function(x) { - return x.raw - }).join('') - } - - if (options._splitMin == null) options._splitMin = 0 - if (options._splitMax == null) options._splitMax = 0 - - var stringified = stringify(value, options) - - if (is_key) { - return [ { raw: stringified, type: 'key', stack: stack, value: value } ] - } - - options._addstack = stack - var result = tokenize(stringified, { - _addstack: stack, - }) - result.data = null - return result -} - -// '1.2.3' -> ['1','2','3'] -function arg_to_path(path) { - // array indexes - if (typeof(path) === 'number') path = String(path) - - if (path === '') path = [] - if (typeof(path) === 'string') path = path.split('.') - - if (!Array.isArray(path)) throw Error('Invalid path type, string or array expected') - return path -} - -// returns new [begin, end] or false if not found -// -// {x:3, xxx: 111, y: [111, {q: 1, e: 2} ,333] } -// f('y',0) returns this B^^^^^^^^^^^^^^^^^^^^^^^^E -// then f('1',1) would reduce it to B^^^^^^^^^^E -function find_element_in_tokenlist(element, lvl, tokens, begin, end) { - while(tokens[begin].stack[lvl] != element) { - if (begin++ >= end) return false - } - while(tokens[end].stack[lvl] != element) { - if (end-- < begin) return false - } - return [begin, end] -} - -function is_whitespace(token_type) { - return token_type === 'whitespace' - || token_type === 'newline' - || token_type === 'comment' -} - -function find_first_non_ws_token(tokens, begin, end) { - while(is_whitespace(tokens[begin].type)) { - if (begin++ >= end) return false - } - return begin -} - -function find_last_non_ws_token(tokens, begin, end) { - while(is_whitespace(tokens[end].type)) { - if (end-- < begin) return false - } - return end -} - -/* - * when appending a new element of an object/array, we are trying to - * figure out the style used on the previous element - * - * return {prefix, sep1, sep2, suffix} - * - * ' "key" : "element" \r\n' - * prefix^^^^ sep1^ ^^sep2 ^^^^^^^^suffix - * - * begin - the beginning of the object/array - * end - last token of the last element (value or comma usually) - */ -function detect_indent_style(tokens, is_array, begin, end, level) { - var result = { - sep1: [], - sep2: [], - suffix: [], - prefix: [], - newline: [], - } - - if (tokens[end].type === 'separator' && tokens[end].stack.length !== level+1 && tokens[end].raw !== ',') { - // either a beginning of the array (no last element) or other weird situation - // - // just return defaults - return result - } - - // ' "key" : "value" ,' - // skipping last separator, we're now here ^^ - if (tokens[end].type === 'separator') - end = find_last_non_ws_token(tokens, begin, end - 1) - if (end === false) return result - - // ' "key" : "value" ,' - // skipping value ^^^^^^^ - while(tokens[end].stack.length > level) end-- - - if (!is_array) { - while(is_whitespace(tokens[end].type)) { - if (end < begin) return result - if (tokens[end].type === 'whitespace') { - result.sep2.unshift(tokens[end]) - } else { - // newline, comment or other unrecognized codestyle - return result - } - end-- - } - - // ' "key" : "value" ,' - // skipping separator ^ - assert.equal(tokens[end].type, 'separator') - assert.equal(tokens[end].raw, ':') - while(is_whitespace(tokens[--end].type)) { - if (end < begin) return result - if (tokens[end].type === 'whitespace') { - result.sep1.unshift(tokens[end]) - } else { - // newline, comment or other unrecognized codestyle - return result - } - } - - assert.equal(tokens[end].type, 'key') - end-- - } - - // ' "key" : "value" ,' - // skipping key ^^^^^ - while(is_whitespace(tokens[end].type)) { - if (end < begin) return result - if (tokens[end].type === 'whitespace') { - result.prefix.unshift(tokens[end]) - } else if (tokens[end].type === 'newline') { - result.newline.unshift(tokens[end]) - return result - } else { - // comment or other unrecognized codestyle - return result - } - end-- - } - - return result -} - -function Document(text, options) { - var self = Object.create(Document.prototype) - - if (options == null) options = {} - //options._structure = true - var tokens = self._tokens = tokenize(text, options) - self._data = tokens.data - tokens.data = null - self._options = options - - var stats = analyze(text, options) - if (options.indent == null) { - options.indent = stats.indent - } - if (options.quote == null) { - options.quote = stats.quote - } - if (options.quote_keys == null) { - options.quote_keys = stats.quote_keys - } - if (options.no_trailing_comma == null) { - options.no_trailing_comma = !stats.has_trailing_comma - } - return self -} - -// return true if it's a proper object -// throw otherwise -function check_if_can_be_placed(key, object, is_unset) { - //if (object == null) return false - function error(add) { - return Error("You can't " + (is_unset ? 'unset' : 'set') + " key '" + key + "'" + add) - } - - if (!isObject(object)) { - throw error(' of an non-object') - } - if (Array.isArray(object)) { - // array, check boundary - if (String(key).match(/^\d+$/)) { - key = Number(String(key)) - if (object.length < key || (is_unset && object.length === key)) { - throw error(', out of bounds') - } else if (is_unset && object.length !== key+1) { - throw error(' in the middle of an array') - } else { - return true - } - } else { - throw error(' of an array') - } - } else { - // object - return true - } -} - -// usage: document.set('path.to.something', 'value') -// or: document.set(['path','to','something'], 'value') -Document.prototype.set = function(path, value) { - path = arg_to_path(path) - - // updating this._data and check for errors - if (path.length === 0) { - if (value === undefined) throw Error("can't remove root document") - this._data = value - var new_key = false - - } else { - var data = this._data - - for (var i=0; i {x:1}` - // removing sep, literal and optional sep - // ':' - var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1) - assert.equal(this._tokens[pos2].type, 'separator') - assert.equal(this._tokens[pos2].raw, ':') - position[0] = pos2 - - // key - var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1) - assert.equal(this._tokens[pos2].type, 'key') - assert.equal(this._tokens[pos2].value, path[path.length-1]) - position[0] = pos2 - } - - // removing comma in arrays and objects - var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1) - assert.equal(this._tokens[pos2].type, 'separator') - if (this._tokens[pos2].raw === ',') { - position[0] = pos2 - } else { - // beginning of the array/object, so we should remove trailing comma instead - pos2 = find_first_non_ws_token(this._tokens, position[1] + 1, pos_old[1]) - assert.equal(this._tokens[pos2].type, 'separator') - if (this._tokens[pos2].raw === ',') { - position[1] = pos2 - } - } - - } else { - var indent = pos2 !== false - ? detect_indent_style(this._tokens, Array.isArray(data), pos_old[0], position[1] - 1, i) - : {} - var newtokens = value_to_tokenlist(value, path, this._options, false, indent) - } - - } else { - // insert new key, that's tricky - var path_1 = path.slice(0, i) - - // find a last separator after which we're inserting it - var pos2 = find_last_non_ws_token(this._tokens, position[0] + 1, position[1] - 1) - assert(pos2 !== false) - - var indent = pos2 !== false - ? detect_indent_style(this._tokens, Array.isArray(data), position[0] + 1, pos2, i) - : {} - - var newtokens = value_to_tokenlist(value, path, this._options, false, indent) - - // adding leading whitespaces according to detected codestyle - var prefix = [] - if (indent.newline && indent.newline.length) - prefix = prefix.concat(indent.newline) - if (indent.prefix && indent.prefix.length) - prefix = prefix.concat(indent.prefix) - - // adding '"key":' (as in "key":"value") to object values - if (!Array.isArray(data)) { - prefix = prefix.concat(value_to_tokenlist(path[path.length-1], path_1, this._options, true)) - if (indent.sep1 && indent.sep1.length) - prefix = prefix.concat(indent.sep1) - prefix.push({raw: ':', type: 'separator', stack: path_1}) - if (indent.sep2 && indent.sep2.length) - prefix = prefix.concat(indent.sep2) - } - - newtokens.unshift.apply(newtokens, prefix) - - // check if prev token is a separator AND they're at the same level - if (this._tokens[pos2].type === 'separator' && this._tokens[pos2].stack.length === path.length-1) { - // previous token is either , or [ or { - if (this._tokens[pos2].raw === ',') { - // restore ending comma - newtokens.push({raw: ',', type: 'separator', stack: path_1}) - } - } else { - // previous token isn't a separator, so need to insert one - newtokens.unshift({raw: ',', type: 'separator', stack: path_1}) - } - - if (indent.suffix && indent.suffix.length) - newtokens.push.apply(newtokens, indent.suffix) - - assert.equal(this._tokens[position[1]].type, 'separator') - position[0] = pos2+1 - position[1] = pos2 - } - - newtokens.unshift(position[1] - position[0] + 1) - newtokens.unshift(position[0]) - this._tokens.splice.apply(this._tokens, newtokens) - - return this -} - -// convenience method -Document.prototype.unset = function(path) { - return this.set(path, undefined) -} - -Document.prototype.get = function(path) { - path = arg_to_path(path) - - var data = this._data - for (var i=0; i old_data.length) { - // adding new elements, so going forward - for (var i=0; i=0; i--) { - path.push(String(i)) - change(path, old_data[i], new_data[i]) - path.pop() - } - } - - } else { - // both values are objects here - for (var i in new_data) { - path.push(String(i)) - change(path, old_data[i], new_data[i]) - path.pop() - } - - for (var i in old_data) { - if (i in new_data) continue - path.push(String(i)) - change(path, old_data[i], new_data[i]) - path.pop() - } - } - } -} - -Document.prototype.toString = function() { - return this._tokens.map(function(x) { - return x.raw - }).join('') -} - -module.exports.Document = Document - -module.exports.update = function updateJSON(source, new_value, options) { - return Document(source, options).update(new_value).toString() -} - diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js deleted file mode 100644 index 0c9fbe6880..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/parse.js +++ /dev/null @@ -1,765 +0,0 @@ -/* - * 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 = false; - var cjson = false; - - if (options.legacy || options.mode === 'json') { - // use json - } else if (options.mode === 'cjson') { - cjson = true; - } else if (options.mode === 'json5') { - json5 = true; - } else { - // use it by default - json5 = true; - } - - 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 || cjson) - && (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/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js deleted file mode 100644 index 232229ecc8..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js +++ /dev/null @@ -1,383 +0,0 @@ -/* - * Author: Alex Kocharin - * GIT: https://github.com/rlidwka/jju - * License: WTFPL, grab your copy here: http://www.wtfpl.net/txt/copying/ - */ - -var Uni = require('./unicode') - -// Fix Function#name on browsers that do not support it (IE) -// http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie -if (!(function f(){}).name) { - Object.defineProperty((function(){}).constructor.prototype, 'name', { - get: function() { - var name = this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1] - // For better performance only parse once, and then cache the - // result through a new accessor for repeated access. - Object.defineProperty(this, 'name', { value: name }) - return name - } - }) -} - -var special_chars = { - 0: '\\0', // this is not an octal literal - 8: '\\b', - 9: '\\t', - 10: '\\n', - 11: '\\v', - 12: '\\f', - 13: '\\r', - 92: '\\\\', -} - -// for oddballs -var hasOwnProperty = Object.prototype.hasOwnProperty - -// some people escape those, so I'd copy this to be safe -var escapable = /[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/ - -function _stringify(object, options, recursiveLvl, currentKey) { - var json5 = (options.mode === 'json5' || !options.mode) - /* - * Opinionated decision warning: - * - * Objects are serialized in the following form: - * { type: 'Class', data: DATA } - * - * Class is supposed to be a function, and new Class(DATA) is - * supposed to be equivalent to the original value - */ - /*function custom_type() { - return stringify({ - type: object.constructor.name, - data: object.toString() - }) - }*/ - - // if add, it's an internal indentation, so we add 1 level and a eol - // if !add, it's an ending indentation, so we just indent - function indent(str, add) { - var prefix = options._prefix ? options._prefix : '' - if (!options.indent) return prefix + str - var result = '' - var count = recursiveLvl + (add || 0) - for (var i=0; i 0) { - if (!Uni.isIdentifierPart(key[i])) - return _stringify_str(key) - - } else { - if (!Uni.isIdentifierStart(key[i])) - return _stringify_str(key) - } - - var chr = key.charCodeAt(i) - - if (options.ascii) { - if (chr < 0x80) { - result += key[i] - - } else { - result += '\\u' + ('0000' + chr.toString(16)).slice(-4) - } - - } else { - if (escapable.exec(key[i])) { - result += '\\u' + ('0000' + chr.toString(16)).slice(-4) - - } else { - result += key[i] - } - } - } - - return result - } - - function _stringify_str(key) { - var quote = options.quote - var quoteChr = quote.charCodeAt(0) - - var result = '' - for (var i=0; i= 8 && chr <= 13 && (json5 || chr !== 11)) { - result += special_chars[chr] - } else if (json5) { - result += '\\x0' + chr.toString(16) - } else { - result += '\\u000' + chr.toString(16) - } - - } else if (chr < 0x20) { - if (json5) { - result += '\\x' + chr.toString(16) - } else { - result += '\\u00' + chr.toString(16) - } - - } else if (chr >= 0x20 && chr < 0x80) { - // ascii range - if (chr === 47 && i && key[i-1] === '<') { - // escaping slashes in - result += '\\' + key[i] - - } else if (chr === 92) { - result += '\\\\' - - } else if (chr === quoteChr) { - result += '\\' + quote - - } else { - result += key[i] - } - - } else if (options.ascii || Uni.isLineTerminator(key[i]) || escapable.exec(key[i])) { - if (chr < 0x100) { - if (json5) { - result += '\\x' + chr.toString(16) - } else { - result += '\\u00' + chr.toString(16) - } - - } else if (chr < 0x1000) { - result += '\\u0' + chr.toString(16) - - } else if (chr < 0x10000) { - result += '\\u' + chr.toString(16) - - } else { - throw Error('weird codepoint') - } - } else { - result += key[i] - } - } - return quote + result + quote - } - - function _stringify_object() { - if (object === null) return 'null' - var result = [] - , len = 0 - , braces - - if (Array.isArray(object)) { - braces = '[]' - for (var i=0; i options._splitMax - recursiveLvl * options.indent.length || len > options._splitMin) ) { - // remove trailing comma in multiline if asked to - if (options.no_trailing_comma && result.length) { - result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1) - } - - var innerStuff = result.map(function(x) {return indent(x, 1)}).join('') - return braces[0] - + (options.indent ? '\n' : '') - + innerStuff - + indent(braces[1]) - } else { - // always remove trailing comma in one-lined arrays - if (result.length) { - result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1) - } - - var innerStuff = result.join(options.indent ? ' ' : '') - return braces[0] - + innerStuff - + braces[1] - } - } - - function _stringify_nonobject(object) { - if (typeof(options.replacer) === 'function') { - object = options.replacer.call(null, currentKey, object) - } - - switch(typeof(object)) { - case 'string': - return _stringify_str(object) - - case 'number': - if (object === 0 && 1/object < 0) { - // Opinionated decision warning: - // - // I want cross-platform negative zero in all js engines - // I know they're equal, but why lose that tiny bit of - // information needlessly? - return '-0' - } - if (!json5 && !Number.isFinite(object)) { - // json don't support infinity (= sucks) - return 'null' - } - return object.toString() - - case 'boolean': - return object.toString() - - case 'undefined': - return undefined - - case 'function': -// return custom_type() - - default: - // fallback for something weird - return JSON.stringify(object) - } - } - - if (options._stringify_key) { - return _stringify_key(object) - } - - if (typeof(object) === 'object') { - if (object === null) return 'null' - - var str - if (typeof(str = object.toJSON5) === 'function' && options.mode !== 'json') { - object = str.call(object, currentKey) - - } else if (typeof(str = object.toJSON) === 'function') { - object = str.call(object, currentKey) - } - - if (object === null) return 'null' - if (typeof(object) !== 'object') return _stringify_nonobject(object) - - if (object.constructor === Number || object.constructor === Boolean || object.constructor === String) { - object = object.valueOf() - return _stringify_nonobject(object) - - } else if (object.constructor === Date) { - // only until we can't do better - return _stringify_nonobject(object.toISOString()) - - } else { - if (typeof(options.replacer) === 'function') { - object = options.replacer.call(null, currentKey, object) - if (typeof(object) !== 'object') return _stringify_nonobject(object) - } - - return _stringify_object(object) - } - } else { - return _stringify_nonobject(object) - } -} - -/* - * stringify(value, options) - * or - * stringify(value, replacer, space) - * - * where: - * value - anything - * options - object - * replacer - function or array - * space - boolean or number or string - */ -module.exports.stringify = function stringifyJSON(object, options, _space) { - // support legacy syntax - if (typeof(options) === 'function' || Array.isArray(options)) { - options = { - replacer: options - } - } else if (typeof(options) === 'object' && options !== null) { - // nothing to do - } else { - options = {} - } - if (_space != null) options.indent = _space - - if (options.indent == null) options.indent = '\t' - if (options.quote == null) options.quote = "'" - if (options.ascii == null) options.ascii = false - if (options.mode == null) options.mode = 'json5' - - if (options.mode === 'json' || options.mode === 'cjson') { - // json only supports double quotes (= sucks) - options.quote = '"' - - // json don't support trailing commas (= sucks) - options.no_trailing_comma = true - - // json don't support unquoted property names (= sucks) - options.quote_keys = true - } - - // why would anyone use such objects? - if (typeof(options.indent) === 'object') { - if (options.indent.constructor === Number - || options.indent.constructor === Boolean - || options.indent.constructor === String) - options.indent = options.indent.valueOf() - } - - // gap is capped at 10 characters - if (typeof(options.indent) === 'number') { - if (options.indent >= 0) { - options.indent = Array(Math.min(~~options.indent, 10) + 1).join(' ') - } else { - options.indent = false - } - } else if (typeof(options.indent) === 'string') { - options.indent = options.indent.substr(0, 10) - } - - if (options._splitMin == null) options._splitMin = 50 - if (options._splitMax == null) options._splitMax = 70 - - return _stringify(object, options, 0, '') -} - diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js deleted file mode 100644 index 1a29143c2d..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/unicode.js +++ /dev/null @@ -1,71 +0,0 @@ - -// 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/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js deleted file mode 100644 index a8476b6c46..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js +++ /dev/null @@ -1,46 +0,0 @@ -var FS = require('fs') -var jju = require('../') - -// this function registers json5 extension, so you -// can do `require("./config.json5")` kind of thing -module.exports.register = function() { - var r = require, e = 'extensions' - r[e]['.json5'] = function(m, f) { - /*eslint no-sync:0*/ - m.exports = jju.parse(FS.readFileSync(f, 'utf8')) - } -} - -// this function monkey-patches JSON.parse, so it -// will return an exact position of error in case -// of parse failure -module.exports.patch_JSON_parse = function() { - var _parse = JSON.parse - JSON.parse = function(text, rev) { - try { - return _parse(text, rev) - } catch(err) { - // this call should always throw - require('jju').parse(text, { - mode: 'json', - legacy: true, - reviver: rev, - reserved_keys: 'replace', - null_prototype: false, - }) - - // if it didn't throw, but original parser did, - // this is an error in this library and should be reported - throw err - } - } -} - -// this function is an express/connect middleware -// that accepts uploads in application/json5 format -module.exports.middleware = function() { - return function(req, res, next) { - throw Error('this function is removed, use express-json5 instead') - } -} - diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.json b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.json deleted file mode 100644 index 8eb5b70e76..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "jju@^1.1.0", - "_id": "jju@1.3.0", - "_integrity": "sha1-2t2e8BkkvHKLA/L3l5vb1i96Kqo=", - "_location": "/read-package-json/json-parse-helpfulerror/jju", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "jju@^1.1.0", - "name": "jju", - "escapedName": "jju", - "rawSpec": "^1.1.0", - "saveSpec": null, - "fetchSpec": "^1.1.0" - }, - "_requiredBy": [ - "/read-package-json/json-parse-helpfulerror" - ], - "_resolved": "https://registry.npmjs.org/jju/-/jju-1.3.0.tgz", - "_shasum": "dadd9ef01924bc728b03f2f7979bdbd62f7a2aaa", - "_shrinkwrap": null, - "_spec": "jju@^1.1.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror", - "author": { - "name": "Alex Kocharin", - "email": "alex@kocharin.ru" - }, - "bin": null, - "bugs": { - "url": "https://github.com/rlidwka/jju/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "a set of utilities to work with JSON / JSON5 documents", - "devDependencies": { - "eslint": "~0.4.2", - "js-yaml": ">=3.1.0", - "mocha": ">=1.21.0" - }, - "homepage": "http://rlidwka.github.io/jju/", - "keywords": [ - "json", - "json5", - "parser", - "serializer", - "data" - ], - "license": { - "type": "WTFPL", - "url": "http://www.wtfpl.net/txt/copying/" - }, - "name": "jju", - "optionalDependencies": {}, - "peerDependencies": {}, - "publishConfig": { - "registry": "https://registry.npmjs.org/" - }, - "repository": { - "type": "git", - "url": "git://github.com/rlidwka/jju.git" - }, - "scripts": { - "lint": "eslint -c ./.eslint.yaml ./lib", - "test": "mocha test/*.js" - }, - "version": "1.3.0" -} diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml deleted file mode 100644 index fdbb5372d4..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/package.yaml +++ /dev/null @@ -1,46 +0,0 @@ -# use "yapm install ." if you're installing this from git repository - -# "jju" stands for "json/json5 utils" -name: jju - -version: 1.3.0 -description: a set of utilities to work with JSON / JSON5 documents - -author: - name: Alex Kocharin - email: alex@kocharin.ru - -repository: - type: git - url: git://github.com/rlidwka/jju - -bugs: - url: https://github.com/rlidwka/jju/issues - -homepage: http://rlidwka.github.io/jju/ - -devDependencies: - mocha: '>=1.21.0' - js-yaml: '>=3.1.0' - - # linting tools - eslint: '~0.4.2' - -scripts: - test: 'mocha test/*.js' - lint: 'eslint -c ./.eslint.yaml ./lib' - -keywords: - - json - - json5 - - parser - - serializer - - data - -publishConfig: - registry: https://registry.npmjs.org/ - -license: - type: WTFPL - url: http://www.wtfpl.net/txt/copying/ - diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/package.json b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/package.json deleted file mode 100644 index 85d9f7e127..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "json-parse-helpfulerror@^1.0.2", - "_id": "json-parse-helpfulerror@1.0.3", - "_integrity": "sha1-E/FM4C7tTpgSl7ZOueO5MuLdE9w=", - "_location": "/read-package-json/json-parse-helpfulerror", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "json-parse-helpfulerror@^1.0.2", - "name": "json-parse-helpfulerror", - "escapedName": "json-parse-helpfulerror", - "rawSpec": "^1.0.2", - "saveSpec": null, - "fetchSpec": "^1.0.2" - }, - "_requiredBy": [ - "/read-package-json" - ], - "_resolved": "https://registry.npmjs.org/json-parse-helpfulerror/-/json-parse-helpfulerror-1.0.3.tgz", - "_shasum": "13f14ce02eed4e981297b64eb9e3b932e2dd13dc", - "_shrinkwrap": null, - "_spec": "json-parse-helpfulerror@^1.0.2", - "_where": "/Users/zkat/Documents/code/npm/node_modules/read-package-json", - "author": { - "name": "Sam Mikes", - "email": "smikes@cubane.com" - }, - "bin": null, - "bugs": { - "url": "https://github.com/smikes/json-parse-helpfulerror/issues" - }, - "bundleDependencies": false, - "dependencies": { - "jju": "^1.1.0" - }, - "deprecated": false, - "description": "A drop-in replacement for JSON.parse that uses `jju` to give helpful errors", - "devDependencies": { - "code": "^1.2.1", - "jslint": "^0.7.1", - "lab": "^5.1.1" - }, - "homepage": "https://github.com/smikes/json-parse-helpfulerror", - "keywords": [ - "json", - "parse", - "line", - "doublequote", - "error" - ], - "license": "MIT", - "main": "index.js", - "name": "json-parse-helpfulerror", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git+https://github.com/smikes/json-parse-helpfulerror.git" - }, - "scripts": { - "lint": "jslint --edition=latest --terse *.js", - "test": "lab -c" - }, - "version": "1.0.3" -} diff --git a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/test/test.js b/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/test/test.js deleted file mode 100644 index fca458ac08..0000000000 --- a/deps/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/test/test.js +++ /dev/null @@ -1,32 +0,0 @@ -var Code = require('code'), - Lab = require('lab'), - lab = Lab.script(), - jph = require('..'); // 'json-parse-helpfulerror' - -exports.lab = lab; - -lab.test('can parse', function (done) { - var o = jph.parse('{"foo": "bar"}'); - - Code.expect(o.foo).to.equal('bar'); - done(); -}); - -lab.test('helpful error for bad JSON', function (done) { - - var bad = "{'foo': 'bar'}"; - - Code.expect(function () { JSON.parse(bad) }).to.throw(); - - Code.expect(function () { jph.parse(bad) }).to.throw(SyntaxError, "Unexpected token '\\'' at 1:2\n" + bad + '\n ^'); - - done(); -}); - -lab.test('fails if reviver throws', function (done) { - function badReviver() { throw new ReferenceError('silly'); } - - Code.expect(function () { jph.parse('3', badReviver) }).to.throw(ReferenceError, 'silly'); - - done(); -}); \ No newline at end of file diff --git a/deps/npm/node_modules/read-package-json/node_modules/slash/index.js b/deps/npm/node_modules/read-package-json/node_modules/slash/index.js new file mode 100644 index 0000000000..b946a0841a --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/slash/index.js @@ -0,0 +1,11 @@ +'use strict'; +module.exports = function (str) { + var isExtendedLengthPath = /^\\\\\?\\/.test(str); + var hasNonAscii = /[^\x00-\x80]+/.test(str); + + if (isExtendedLengthPath || hasNonAscii) { + return str; + } + + return str.replace(/\\/g, '/'); +}; diff --git a/deps/npm/node_modules/read-package-json/node_modules/slash/package.json b/deps/npm/node_modules/read-package-json/node_modules/slash/package.json new file mode 100644 index 0000000000..847f1844de --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/slash/package.json @@ -0,0 +1,65 @@ +{ + "_from": "slash@^1.0.0", + "_id": "slash@1.0.0", + "_inBundle": false, + "_integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "_location": "/read-package-json/slash", + "_phantomChildren": {}, + "_requested": { + "type": "range", + "registry": true, + "raw": "slash@^1.0.0", + "name": "slash", + "escapedName": "slash", + "rawSpec": "^1.0.0", + "saveSpec": null, + "fetchSpec": "^1.0.0" + }, + "_requiredBy": [ + "/read-package-json" + ], + "_resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "_shasum": "c41f2f6c39fc16d1cd17ad4b5d896114ae470d55", + "_spec": "slash@^1.0.0", + "_where": "/Users/rebecca/code/npm/node_modules/read-package-json", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "http://sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/slash/issues" + }, + "bundleDependencies": false, + "deprecated": false, + "description": "Convert Windows backslash paths to slash paths", + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/sindresorhus/slash#readme", + "keywords": [ + "path", + "seperator", + "sep", + "slash", + "backslash", + "windows", + "win" + ], + "license": "MIT", + "name": "slash", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/slash.git" + }, + "scripts": { + "test": "mocha" + }, + "version": "1.0.0" +} diff --git a/deps/npm/node_modules/read-package-json/node_modules/slash/readme.md b/deps/npm/node_modules/read-package-json/node_modules/slash/readme.md new file mode 100644 index 0000000000..15672f010e --- /dev/null +++ b/deps/npm/node_modules/read-package-json/node_modules/slash/readme.md @@ -0,0 +1,44 @@ +# slash [![Build Status](https://travis-ci.org/sindresorhus/slash.svg?branch=master)](https://travis-ci.org/sindresorhus/slash) + +> Convert Windows backslash paths to slash paths: `foo\\bar` ➔ `foo/bar` + +[Forward-slash paths can be used in Windows](http://superuser.com/a/176395/6877) as long as they're not extended-length paths and don't contain any non-ascii characters. + +This was created since the `path` methods in Node outputs `\\` paths on Windows. + + +## Install + +```sh +$ npm install --save slash +``` + + +## Usage + +```js +var path = require('path'); +var slash = require('slash'); + +var str = path.join('foo', 'bar'); +// Unix => foo/bar +// Windows => foo\\bar + +slash(str); +// Unix => foo/bar +// Windows => foo/bar +``` + + +## API + +### slash(path) + +Type: `string` + +Accepts a Windows backslash path and returns a slash path. + + +## License + +MIT © [Sindre Sorhus](http://sindresorhus.com) diff --git a/deps/npm/node_modules/read-package-json/package.json b/deps/npm/node_modules/read-package-json/package.json index dc9f06e324..0df406db67 100644 --- a/deps/npm/node_modules/read-package-json/package.json +++ b/deps/npm/node_modules/read-package-json/package.json @@ -1,19 +1,19 @@ { - "_from": "read-package-json@2.0.10", - "_id": "read-package-json@2.0.10", + "_from": "read-package-json@2.0.12", + "_id": "read-package-json@2.0.12", "_inBundle": false, - "_integrity": "sha512-iNWaEs9hW9nviu5rHADmkm/Ob5dvah5zajtTS1XbyERSzkWgSwWZ6Z12bION7bEAzVc2YRFWnAz8k/tAr+5/eg==", + "_integrity": "sha512-m7/I0+tP6D34EVvSlzCtuVA4D/dHL6OpLcn2e4XVP5X57pCKGUy1JjRSBVKHWpB+vUU91sL85h84qX0MdXzBSw==", "_location": "/read-package-json", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "read-package-json@2.0.10", + "raw": "read-package-json@2.0.12", "name": "read-package-json", "escapedName": "read-package-json", - "rawSpec": "2.0.10", + "rawSpec": "2.0.12", "saveSpec": null, - "fetchSpec": "2.0.10" + "fetchSpec": "2.0.12" }, "_requiredBy": [ "#USER", @@ -22,9 +22,9 @@ "/read-installed", "/read-package-tree" ], - "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.10.tgz", - "_shasum": "dc0229f6dde6b4b705b39e25b2d970ebe95685ae", - "_spec": "read-package-json@2.0.10", + "_resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.0.12.tgz", + "_shasum": "68ea45f98b3741cb6e10ae3bbd42a605026a6951", + "_spec": "read-package-json@2.0.12", "_where": "/Users/rebecca/code/npm", "author": { "name": "Isaac Z. Schlueter", @@ -38,8 +38,9 @@ "dependencies": { "glob": "^7.1.1", "graceful-fs": "^4.1.2", - "json-parse-helpfulerror": "^1.0.2", - "normalize-package-data": "^2.0.0" + "json-parse-better-errors": "^1.0.0", + "normalize-package-data": "^2.0.0", + "slash": "^1.0.0" }, "deprecated": false, "description": "The thing npm uses to read package.json files with semantics and defaults and validation", @@ -64,5 +65,5 @@ "scripts": { "test": "standard && tap -J test/*.js" }, - "version": "2.0.10" + "version": "2.0.12" } diff --git a/deps/npm/node_modules/read-package-json/read-json.js b/deps/npm/node_modules/read-package-json/read-json.js index 7114df481b..969bcc030b 100644 --- a/deps/npm/node_modules/read-package-json/read-json.js +++ b/deps/npm/node_modules/read-package-json/read-json.js @@ -9,8 +9,9 @@ var path = require('path') var glob = require('glob') var normalizeData = require('normalize-package-data') -var safeJSON = require('json-parse-helpfulerror') +var safeJSON = require('json-parse-better-errors') var util = require('util') +var slash = require('slash') module.exports = readJson @@ -97,7 +98,7 @@ function parseJson (file, er, d, log, strict, cb) { var data try { - data = safeJSON.parse(stripBOM(d)) + data = safeJSON(stripBOM(d)) } catch (er) { data = parseIndex(d) if (!data) return cb(parseError(er, file)) @@ -316,7 +317,7 @@ function bins_ (file, data, bins, cb) { data.bin = bins.reduce(function (acc, mf) { if (mf && mf.charAt(0) !== '.') { var f = path.basename(mf) - acc[f] = path.join(m, mf) + acc[f] = slash(path.join(m, mf)) } return acc }, {}) @@ -425,7 +426,7 @@ function parseIndex (data) { data = data.replace(/^\s*\*/mg, '') try { - return safeJSON.parse(data) + return safeJSON(data) } catch (er) { return null } diff --git a/deps/npm/node_modules/request/README.md b/deps/npm/node_modules/request/README.md index 2317391149..cedc19d51d 100644 --- a/deps/npm/node_modules/request/README.md +++ b/deps/npm/node_modules/request/README.md @@ -28,6 +28,7 @@ request('http://www.google.com', function (error, response, body) { ## Table of contents - [Streaming](#streaming) +- [Promises & Async/Await](#promises--asyncawait) - [Forms](#forms) - [HTTP Authentication](#http-authentication) - [Custom HTTP Headers](#custom-http-headers) @@ -142,6 +143,22 @@ You can still use intermediate proxies, the requests will still follow HTTP forw --- +## Promises & Async/Await + +`request` supports both streaming and callback interfaces natively. If you'd like `request` to return a Promise instead, you can use an alternative interface wrapper for `request`. These wrappers can be useful if you prefer to work with Promises, or if you'd like to use `async`/`await` in ES2017. + +Several alternative interfaces are provided by the request team, including: +- [`request-promise`](https://github.com/request/request-promise) (uses [Bluebird](https://github.com/petkaantonov/bluebird) Promises) +- [`request-promise-native`](https://github.com/request/request-promise-native) (uses native Promises) +- [`request-promise-any`](https://github.com/request/request-promise-any) (uses [any-promise](https://www.npmjs.com/package/any-promise) Promises) + + +[back to top](#table-of-contents) + + +--- + + ## Forms `request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API. @@ -608,7 +625,7 @@ request.get(options); ### Using `options.agentOptions` -In the example below, we call an API requires client side SSL certificate +In the example below, we call an API that requires client side SSL certificate (in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol: ```js @@ -667,7 +684,7 @@ request.get({ The `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`. -a validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching. +A validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching. ```js var request = require('request') @@ -726,7 +743,7 @@ The first argument can be either a `url` or an `options` object. The only requir - `qs` - object containing querystring values to be appended to the `uri` - `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method. Alternatively pass options to the [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}` - `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method. Alternatively pass options to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`. For example, to change the way arrays are converted to query strings using the `qs` module pass the `arrayFormat` option with one of `indices|brackets|repeat` -- `useQuerystring` - If true, use `querystring` to stringify and parse +- `useQuerystring` - if true, use `querystring` to stringify and parse querystrings, otherwise use `qs` (default: `false`). Set this option to `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the default `foo[0]=bar&foo[1]=baz`. @@ -735,7 +752,7 @@ The first argument can be either a `url` or an `options` object. The only requir - `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer`, `String` or `ReadStream`. If `json` is `true`, then `body` must be a JSON-serializable object. - `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See "Forms" section above. -- `formData` - Data to pass for a `multipart/form-data` request. See +- `formData` - data to pass for a `multipart/form-data` request. See [Forms](#forms) section above. - `multipart` - array of objects which contain their own headers and `body` attributes. Sends a `multipart/related` request. See [Forms](#forms) section @@ -752,11 +769,11 @@ The first argument can be either a `url` or an `options` object. The only requir --- -- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above. -- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above. -- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). +- `auth` - a hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above. +- `oauth` - options for OAuth HMAC-SHA1 signing. See documentation above. +- `hawk` - options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example). - `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`, and optionally `session` (note that this only works for services that require session as part of the canonical string). Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first. -- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. +- `httpSignature` - options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options. --- @@ -768,9 +785,9 @@ The first argument can be either a `url` or an `options` object. The only requir --- -- `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.) -- `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below. -- `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section) +- `encoding` - encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.) +- `gzip` - if `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below. +- `jar` - if `true`, remember cookies for future use (or define your custom cookie jar; see examples section) --- @@ -778,14 +795,14 @@ The first argument can be either a `url` or an `options` object. The only requir - `agentClass` - alternatively specify your agent's class name - `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions). - `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+ -- `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified. +- `pool` - an object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified. - A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`). - Note that if you are sending multiple requests in a loop and creating multiple new `pool` objects, `maxSockets` will not work as intended. To work around this, either use [`request.defaults`](#requestdefaultsoptions) with your pool options or create the pool object with the `maxSockets` property outside of the loop. -- `timeout` - Integer containing the number of milliseconds to wait for a +- `timeout` - integer containing the number of milliseconds to wait for a server to send response headers (and start the response body) before aborting the request. Note that if the underlying TCP connection cannot be established, the OS-wide TCP connection timeout will overrule the `timeout` option ([the @@ -795,9 +812,9 @@ default in Linux can be anywhere from 20-120 seconds][linux-timeout]). --- -- `localAddress` - Local interface to bind for network connections. -- `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`) -- `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option. +- `localAddress` - local interface to bind for network connections. +- `proxy` - an HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`) +- `strictSSL` - if `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option. - `tunnel` - controls the behavior of [HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling) as follows: @@ -805,14 +822,14 @@ default in Linux can be anywhere from 20-120 seconds][linux-timeout]). - `true` - always tunnel to the destination by making a `CONNECT` request to the proxy - `false` - request the destination as a `GET` request. -- `proxyHeaderWhiteList` - A whitelist of headers to send to a +- `proxyHeaderWhiteList` - a whitelist of headers to send to a tunneling proxy. -- `proxyHeaderExclusiveList` - A whitelist of headers to send +- `proxyHeaderExclusiveList` - a whitelist of headers to send exclusively to a tunneling proxy and not to destination. --- -- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution. When set, the following properties are added to the response object: +- `time` - if `true`, the request-response cycle (including all redirects) is timed at millisecond resolution. When set, the following properties are added to the response object: - `elapsedTime` Duration of the entire request/response in milliseconds (*deprecated*). - `responseStartTime` Timestamp when the response began (in Unix Epoch milliseconds) (*deprecated*). - `timingStart` Timestamp of the start of the request (in Unix Epoch milliseconds). @@ -830,7 +847,7 @@ default in Linux can be anywhere from 20-120 seconds][linux-timeout]). - `download`: Duration of HTTP download (`timings.end` - `timings.response`) - `total`: Duration entire HTTP round-trip (`timings.end`) -- `har` - A [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)* +- `har` - a [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)* - `callback` - alternatively pass the request's callback in the options object The callback argument gets 3 arguments: @@ -874,55 +891,19 @@ var specialRequest = baseRequest.defaults({ }) ``` -### request.put +### request.METHOD() -Same as `request()`, but defaults to `method: "PUT"`. +These HTTP method convenience functions act just like `request()` but with a default method already set for you: -```js -request.put(url) -``` - -### request.patch +- *request.get()*: Defaults to `method: "GET"`. +- *request.post()*: Defaults to `method: "POST"`. +- *request.put()*: Defaults to `method: "PUT"`. +- *request.patch()*: Defaults to `method: "PATCH"`. +- *request.del() / request.delete()*: Defaults to `method: "DELETE"`. +- *request.head()*: Defaults to `method: "HEAD"`. +- *request.options()*: Defaults to `method: "OPTIONS"`. -Same as `request()`, but defaults to `method: "PATCH"`. - -```js -request.patch(url) -``` - -### request.post - -Same as `request()`, but defaults to `method: "POST"`. - -```js -request.post(url) -``` - -### request.head - -Same as `request()`, but defaults to `method: "HEAD"`. - -```js -request.head(url) -``` - -### request.del / request.delete - -Same as `request()`, but defaults to `method: "DELETE"`. - -```js -request.del(url) -request.delete(url) -``` - -### request.get - -Same as `request()` (for uniformity). - -```js -request.get(url) -``` -### request.cookie +### request.cookie() Function that creates a new cookie. @@ -1036,7 +1017,8 @@ the server sent a compressed response. console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity')) console.log('the decoded data is: ' + body) } - ).on('data', function(data) { + ) + .on('data', function(data) { // decompressed data as it is received console.log('decoded chunk: ' + data) }) diff --git a/deps/npm/node_modules/request/index.js b/deps/npm/node_modules/request/index.js index 9ec65ea268..f9b480a1d0 100755 --- a/deps/npm/node_modules/request/index.js +++ b/deps/npm/node_modules/request/index.js @@ -14,15 +14,14 @@ 'use strict' -var extend = require('extend') - , cookies = require('./lib/cookies') - , helpers = require('./lib/helpers') +var extend = require('extend') +var cookies = require('./lib/cookies') +var helpers = require('./lib/helpers') var paramsHaveRequestBody = helpers.paramsHaveRequestBody - // organize params for patch, post, put, head, del -function initParams(uri, options, callback) { +function initParams (uri, options, callback) { if (typeof options === 'function') { callback = options } @@ -66,6 +65,7 @@ function verbFunc (verb) { // define like this to please codeintel/intellisense IDEs request.get = verbFunc('get') request.head = verbFunc('head') +request.options = verbFunc('options') request.post = verbFunc('post') request.put = verbFunc('put') request.patch = verbFunc('patch') @@ -81,7 +81,6 @@ request.cookie = function (str) { } function wrapRequestMethod (method, options, requester, verb) { - return function (uri, opts, callback) { var params = initParams(uri, opts, callback) @@ -112,15 +111,15 @@ request.defaults = function (options, requester) { options = {} } - var defaults = wrapRequestMethod(self, options, requester) + var defaults = wrapRequestMethod(self, options, requester) var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete'] - verbs.forEach(function(verb) { - defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb) + verbs.forEach(function (verb) { + defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb) }) - defaults.cookie = wrapRequestMethod(self.cookie, options, requester) - defaults.jar = self.jar + defaults.cookie = wrapRequestMethod(self.cookie, options, requester) + defaults.jar = self.jar defaults.defaults = self.defaults return defaults } @@ -146,11 +145,11 @@ request.initParams = initParams // Backwards compatibility for request.debug Object.defineProperty(request, 'debug', { - enumerable : true, - get : function() { + enumerable: true, + get: function () { return request.Request.debug }, - set : function(debug) { + set: function (debug) { request.Request.debug = debug } }) diff --git a/deps/npm/node_modules/request/lib/auth.js b/deps/npm/node_modules/request/lib/auth.js index 559ca57be9..42f9adaec7 100644 --- a/deps/npm/node_modules/request/lib/auth.js +++ b/deps/npm/node_modules/request/lib/auth.js @@ -1,12 +1,11 @@ 'use strict' var caseless = require('caseless') - , uuid = require('uuid') - , helpers = require('./helpers') +var uuid = require('uuid') +var helpers = require('./helpers') var md5 = helpers.md5 - , toBase64 = helpers.toBase64 - +var toBase64 = helpers.toBase64 function Auth (request) { // define all public properties here @@ -126,7 +125,7 @@ Auth.prototype.digest = function (method, path, authHeader) { Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) { var self = this - , request = self.request + var request = self.request var authHeader if (bearer === undefined && user === undefined) { @@ -143,7 +142,7 @@ Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) { Auth.prototype.onResponse = function (response) { var self = this - , request = self.request + var request = self.request if (!self.hasAuth || self.sentAuth) { return null } diff --git a/deps/npm/node_modules/request/lib/cookies.js b/deps/npm/node_modules/request/lib/cookies.js index 412c07d63b..bd5d46bead 100644 --- a/deps/npm/node_modules/request/lib/cookies.js +++ b/deps/npm/node_modules/request/lib/cookies.js @@ -3,10 +3,9 @@ var tough = require('tough-cookie') var Cookie = tough.Cookie - , CookieJar = tough.CookieJar +var CookieJar = tough.CookieJar - -exports.parse = function(str) { +exports.parse = function (str) { if (str && str.uri) { str = str.uri } @@ -17,23 +16,23 @@ exports.parse = function(str) { } // Adapt the sometimes-Async api of tough.CookieJar to our requirements -function RequestJar(store) { +function RequestJar (store) { var self = this self._jar = new CookieJar(store, {looseMode: true}) } -RequestJar.prototype.setCookie = function(cookieOrStr, uri, options) { +RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) { var self = this return self._jar.setCookieSync(cookieOrStr, uri, options || {}) } -RequestJar.prototype.getCookieString = function(uri) { +RequestJar.prototype.getCookieString = function (uri) { var self = this return self._jar.getCookieStringSync(uri) } -RequestJar.prototype.getCookies = function(uri) { +RequestJar.prototype.getCookies = function (uri) { var self = this return self._jar.getCookiesSync(uri) } -exports.jar = function(store) { +exports.jar = function (store) { return new RequestJar(store) } diff --git a/deps/npm/node_modules/request/lib/getProxyFromURI.js b/deps/npm/node_modules/request/lib/getProxyFromURI.js index c2013a6e12..4633ba5f63 100644 --- a/deps/npm/node_modules/request/lib/getProxyFromURI.js +++ b/deps/npm/node_modules/request/lib/getProxyFromURI.js @@ -1,33 +1,33 @@ 'use strict' -function formatHostname(hostname) { +function formatHostname (hostname) { // canonicalize the hostname, so that 'oogle.com' won't match 'google.com' return hostname.replace(/^\.*/, '.').toLowerCase() } -function parseNoProxyZone(zone) { +function parseNoProxyZone (zone) { zone = zone.trim().toLowerCase() var zoneParts = zone.split(':', 2) - , zoneHost = formatHostname(zoneParts[0]) - , zonePort = zoneParts[1] - , hasPort = zone.indexOf(':') > -1 + var zoneHost = formatHostname(zoneParts[0]) + var zonePort = zoneParts[1] + var hasPort = zone.indexOf(':') > -1 return {hostname: zoneHost, port: zonePort, hasPort: hasPort} } -function uriInNoProxy(uri, noProxy) { +function uriInNoProxy (uri, noProxy) { var port = uri.port || (uri.protocol === 'https:' ? '443' : '80') - , hostname = formatHostname(uri.hostname) - , noProxyList = noProxy.split(',') + var hostname = formatHostname(uri.hostname) + var noProxyList = noProxy.split(',') // iterate through the noProxyList until it finds a match. - return noProxyList.map(parseNoProxyZone).some(function(noProxyZone) { + return noProxyList.map(parseNoProxyZone).some(function (noProxyZone) { var isMatchedAt = hostname.indexOf(noProxyZone.hostname) - , hostnameMatched = ( - isMatchedAt > -1 && - (isMatchedAt === hostname.length - noProxyZone.hostname.length) - ) + var hostnameMatched = ( + isMatchedAt > -1 && + (isMatchedAt === hostname.length - noProxyZone.hostname.length) + ) if (noProxyZone.hasPort) { return (port === noProxyZone.port) && hostnameMatched @@ -37,7 +37,7 @@ function uriInNoProxy(uri, noProxy) { }) } -function getProxyFromURI(uri) { +function getProxyFromURI (uri) { // Decide the proper request proxy to use based on the request URI object and the // environmental variables (NO_PROXY, HTTP_PROXY, etc.) // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html) @@ -60,14 +60,14 @@ function getProxyFromURI(uri) { if (uri.protocol === 'http:') { return process.env.HTTP_PROXY || - process.env.http_proxy || null + process.env.http_proxy || null } if (uri.protocol === 'https:') { return process.env.HTTPS_PROXY || - process.env.https_proxy || - process.env.HTTP_PROXY || - process.env.http_proxy || null + process.env.https_proxy || + process.env.HTTP_PROXY || + process.env.http_proxy || null } // if none of that works, return null diff --git a/deps/npm/node_modules/request/lib/har.js b/deps/npm/node_modules/request/lib/har.js index 3059574878..2f660309d8 100644 --- a/deps/npm/node_modules/request/lib/har.js +++ b/deps/npm/node_modules/request/lib/har.js @@ -71,14 +71,10 @@ Har.prototype.prep = function (data) { 'multipart/related', 'multipart/form-data', 'multipart/alternative'])) { - // reset values data.postData.mimeType = 'multipart/form-data' - } - - else if (some([ + } else if (some([ 'application/x-www-form-urlencoded'])) { - if (!data.postData.params) { data.postData.text = '' } else { @@ -87,14 +83,11 @@ Har.prototype.prep = function (data) { // always overwrite data.postData.text = qs.stringify(data.postData.paramsObj) } - } - - else if (some([ + } else if (some([ 'text/json', 'text/x-json', 'application/json', 'application/x-json'])) { - data.postData.mimeType = 'application/json' if (data.postData.text) { @@ -168,14 +161,12 @@ Har.prototype.options = function (options) { } if (test('application/x-www-form-urlencoded')) { options.form = req.postData.paramsObj - } - else if (test('application/json')) { + } else if (test('application/json')) { if (req.postData.jsonObj) { options.body = req.postData.jsonObj options.json = true } - } - else if (test('multipart/form-data')) { + } else if (test('multipart/form-data')) { options.formData = {} req.postData.params.forEach(function (param) { @@ -202,8 +193,7 @@ Har.prototype.options = function (options) { options.formData[param.name] = attachment }) - } - else { + } else { if (req.postData.text) { options.body = req.postData.text } diff --git a/deps/npm/node_modules/request/lib/helpers.js b/deps/npm/node_modules/request/lib/helpers.js index 05c77a0bdd..8b2a7e6ebf 100644 --- a/deps/npm/node_modules/request/lib/helpers.js +++ b/deps/npm/node_modules/request/lib/helpers.js @@ -1,14 +1,14 @@ 'use strict' var jsonSafeStringify = require('json-stringify-safe') - , crypto = require('crypto') - , Buffer = require('safe-buffer').Buffer +var crypto = require('crypto') +var Buffer = require('safe-buffer').Buffer var defer = typeof setImmediate === 'undefined' ? process.nextTick : setImmediate -function paramsHaveRequestBody(params) { +function paramsHaveRequestBody (params) { return ( params.body || params.requestBodyStream || @@ -57,10 +57,10 @@ function version () { } exports.paramsHaveRequestBody = paramsHaveRequestBody -exports.safeStringify = safeStringify -exports.md5 = md5 -exports.isReadStream = isReadStream -exports.toBase64 = toBase64 -exports.copy = copy -exports.version = version -exports.defer = defer +exports.safeStringify = safeStringify +exports.md5 = md5 +exports.isReadStream = isReadStream +exports.toBase64 = toBase64 +exports.copy = copy +exports.version = version +exports.defer = defer diff --git a/deps/npm/node_modules/request/lib/multipart.js b/deps/npm/node_modules/request/lib/multipart.js index fc7b50276e..d6b9812777 100644 --- a/deps/npm/node_modules/request/lib/multipart.js +++ b/deps/npm/node_modules/request/lib/multipart.js @@ -1,10 +1,9 @@ 'use strict' var uuid = require('uuid') - , CombinedStream = require('combined-stream') - , isstream = require('isstream') - , Buffer = require('safe-buffer').Buffer - +var CombinedStream = require('combined-stream') +var isstream = require('isstream') +var Buffer = require('safe-buffer').Buffer function Multipart (request) { this.request = request @@ -15,8 +14,8 @@ function Multipart (request) { Multipart.prototype.isChunked = function (options) { var self = this - , chunked = false - , parts = options.data || options + var chunked = false + var parts = options.data || options if (!parts.forEach) { self.request.emit('error', new Error('Argument error, options.multipart.')) @@ -103,7 +102,7 @@ Multipart.prototype.onRequest = function (options) { var self = this var chunked = self.isChunked(options) - , parts = options.data || options + var parts = options.data || options self.setHeaders(chunked) self.chunked = chunked diff --git a/deps/npm/node_modules/request/lib/oauth.js b/deps/npm/node_modules/request/lib/oauth.js index 13b693773e..0c9c57cfee 100644 --- a/deps/npm/node_modules/request/lib/oauth.js +++ b/deps/npm/node_modules/request/lib/oauth.js @@ -1,13 +1,12 @@ 'use strict' var url = require('url') - , qs = require('qs') - , caseless = require('caseless') - , uuid = require('uuid') - , oauth = require('oauth-sign') - , crypto = require('crypto') - , Buffer = require('safe-buffer').Buffer - +var qs = require('qs') +var caseless = require('caseless') +var uuid = require('uuid') +var oauth = require('oauth-sign') +var crypto = require('crypto') +var Buffer = require('safe-buffer').Buffer function OAuth (request) { this.request = request @@ -23,7 +22,7 @@ OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) oa.oauth_version = '1.0' } if (!oa.oauth_timestamp) { - oa.oauth_timestamp = Math.floor( Date.now() / 1000 ).toString() + oa.oauth_timestamp = Math.floor(Date.now() / 1000).toString() } if (!oa.oauth_nonce) { oa.oauth_nonce = uuid().replace(/-/g, '') @@ -32,11 +31,11 @@ OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) oa.oauth_signature_method = 'HMAC-SHA1' } - var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key + var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key // eslint-disable-line camelcase delete oa.oauth_consumer_secret delete oa.oauth_private_key - var token_secret = oa.oauth_token_secret + var token_secret = oa.oauth_token_secret // eslint-disable-line camelcase delete oa.oauth_token_secret var realm = oa.oauth_realm @@ -51,8 +50,9 @@ OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) method, baseurl, params, - consumer_secret_or_private_key, - token_secret) + consumer_secret_or_private_key, // eslint-disable-line camelcase + token_secret // eslint-disable-line camelcase + ) if (realm) { oa.realm = realm @@ -61,7 +61,7 @@ OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) return oa } -OAuth.prototype.buildBodyHash = function(_oauth, body) { +OAuth.prototype.buildBodyHash = function (_oauth, body) { if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) { this.request.emit('error', new Error('oauth: ' + _oauth.signature_method + ' signature_method not supported with body_hash signing.')) @@ -96,16 +96,16 @@ OAuth.prototype.onRequest = function (_oauth) { self.params = _oauth var uri = self.request.uri || {} - , method = self.request.method || '' - , headers = caseless(self.request.headers) - , body = self.request.body || '' - , qsLib = self.request.qsLib || qs + var method = self.request.method || '' + var headers = caseless(self.request.headers) + var body = self.request.body || '' + var qsLib = self.request.qsLib || qs var form - , query - , contentType = headers.get('content-type') || '' - , formContentType = 'application/x-www-form-urlencoded' - , transport = _oauth.transport_method || 'header' + var query + var contentType = headers.get('content-type') || '' + var formContentType = 'application/x-www-form-urlencoded' + var transport = _oauth.transport_method || 'header' if (contentType.slice(0, formContentType.length) === formContentType) { contentType = formContentType diff --git a/deps/npm/node_modules/request/lib/querystring.js b/deps/npm/node_modules/request/lib/querystring.js index baf5e8021f..4a32cd1491 100644 --- a/deps/npm/node_modules/request/lib/querystring.js +++ b/deps/npm/node_modules/request/lib/querystring.js @@ -1,8 +1,7 @@ 'use strict' var qs = require('qs') - , querystring = require('querystring') - +var querystring = require('querystring') function Querystring (request) { this.request = request @@ -13,7 +12,7 @@ function Querystring (request) { } Querystring.prototype.init = function (options) { - if (this.lib) {return} + if (this.lib) { return } this.useQuerystring = options.useQuerystring this.lib = (this.useQuerystring ? querystring : qs) diff --git a/deps/npm/node_modules/request/lib/redirect.js b/deps/npm/node_modules/request/lib/redirect.js index f8604491f3..b9150e77c7 100644 --- a/deps/npm/node_modules/request/lib/redirect.js +++ b/deps/npm/node_modules/request/lib/redirect.js @@ -9,7 +9,7 @@ function Redirect (request) { this.followRedirects = true this.followAllRedirects = false this.followOriginalHttpMethod = false - this.allowRedirect = function () {return true} + this.allowRedirect = function () { return true } this.maxRedirects = 10 this.redirects = [] this.redirectsFollowed = 0 @@ -44,7 +44,7 @@ Redirect.prototype.onRequest = function (options) { Redirect.prototype.redirectTo = function (response) { var self = this - , request = self.request + var request = self.request var redirectTo = null if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) { @@ -78,7 +78,7 @@ Redirect.prototype.redirectTo = function (response) { Redirect.prototype.onResponse = function (response) { var self = this - , request = self.request + var request = self.request var redirectTo = self.redirectTo(response) if (!redirectTo || !self.allowRedirect.call(request, response)) { @@ -112,13 +112,10 @@ Redirect.prototype.onResponse = function (response) { delete request.agent } - self.redirects.push( - { statusCode : response.statusCode - , redirectUri: redirectTo - } - ) - if (self.followAllRedirects && request.method !== 'HEAD' - && response.statusCode !== 401 && response.statusCode !== 307) { + self.redirects.push({ statusCode: response.statusCode, redirectUri: redirectTo }) + + if (self.followAllRedirects && request.method !== 'HEAD' && + response.statusCode !== 401 && response.statusCode !== 307) { request.method = self.followOriginalHttpMethod ? request.method : 'GET' } // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215 diff --git a/deps/npm/node_modules/request/lib/tunnel.js b/deps/npm/node_modules/request/lib/tunnel.js index bf96a8fec5..4479003f69 100644 --- a/deps/npm/node_modules/request/lib/tunnel.js +++ b/deps/npm/node_modules/request/lib/tunnel.js @@ -1,7 +1,7 @@ 'use strict' var url = require('url') - , tunnel = require('tunnel-agent') +var tunnel = require('tunnel-agent') var defaultProxyHeaderWhiteList = [ 'accept', @@ -31,10 +31,10 @@ var defaultProxyHeaderExclusiveList = [ 'proxy-authorization' ] -function constructProxyHost(uriObject) { +function constructProxyHost (uriObject) { var port = uriObject.port - , protocol = uriObject.protocol - , proxyHost = uriObject.hostname + ':' + var protocol = uriObject.protocol + var proxyHost = uriObject.hostname + ':' if (port) { proxyHost += port @@ -47,7 +47,7 @@ function constructProxyHost(uriObject) { return proxyHost } -function constructProxyHeaderWhiteList(headers, proxyHeaderWhiteList) { +function constructProxyHeaderWhiteList (headers, proxyHeaderWhiteList) { var whiteList = proxyHeaderWhiteList .reduce(function (set, header) { set[header.toLowerCase()] = true @@ -68,41 +68,40 @@ function constructTunnelOptions (request, proxyHeaders) { var proxy = request.proxy var tunnelOptions = { - proxy : { - host : proxy.hostname, - port : +proxy.port, - proxyAuth : proxy.auth, - headers : proxyHeaders + proxy: { + host: proxy.hostname, + port: +proxy.port, + proxyAuth: proxy.auth, + headers: proxyHeaders }, - headers : request.headers, - ca : request.ca, - cert : request.cert, - key : request.key, - passphrase : request.passphrase, - pfx : request.pfx, - ciphers : request.ciphers, - rejectUnauthorized : request.rejectUnauthorized, - secureOptions : request.secureOptions, - secureProtocol : request.secureProtocol + headers: request.headers, + ca: request.ca, + cert: request.cert, + key: request.key, + passphrase: request.passphrase, + pfx: request.pfx, + ciphers: request.ciphers, + rejectUnauthorized: request.rejectUnauthorized, + secureOptions: request.secureOptions, + secureProtocol: request.secureProtocol } return tunnelOptions } -function constructTunnelFnName(uri, proxy) { +function constructTunnelFnName (uri, proxy) { var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http') var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http') return [uriProtocol, proxyProtocol].join('Over') } -function getTunnelFn(request) { +function getTunnelFn (request) { var uri = request.uri var proxy = request.proxy var tunnelFnName = constructTunnelFnName(uri, proxy) return tunnel[tunnelFnName] } - function Tunnel (request) { this.request = request this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList @@ -114,8 +113,8 @@ function Tunnel (request) { Tunnel.prototype.isEnabled = function () { var self = this - , request = self.request - // Tunnel HTTPS by default. Allow the user to override this setting. + var request = self.request + // Tunnel HTTPS by default. Allow the user to override this setting. // If self.tunnelOverride is set (the user specified a value), use it. if (typeof self.tunnelOverride !== 'undefined') { @@ -133,7 +132,7 @@ Tunnel.prototype.isEnabled = function () { Tunnel.prototype.setup = function (options) { var self = this - , request = self.request + var request = self.request options = options || {} diff --git a/deps/npm/node_modules/request/node_modules/aws-sign2/index.js b/deps/npm/node_modules/request/node_modules/aws-sign2/index.js index ac72093083..fb35f6db01 100644 --- a/deps/npm/node_modules/request/node_modules/aws-sign2/index.js +++ b/deps/npm/node_modules/request/node_modules/aws-sign2/index.js @@ -133,7 +133,7 @@ function stringToSign (options) { ] return r.join('\n') } -module.exports.queryStringToSign = stringToSign +module.exports.stringToSign = stringToSign /** * Return a string for sign() with the given `options`, but is meant exclusively diff --git a/deps/npm/node_modules/request/node_modules/aws-sign2/package.json b/deps/npm/node_modules/request/node_modules/aws-sign2/package.json index 56e89641a2..b3a175b2af 100644 --- a/deps/npm/node_modules/request/node_modules/aws-sign2/package.json +++ b/deps/npm/node_modules/request/node_modules/aws-sign2/package.json @@ -1,33 +1,32 @@ { - "_from": "aws-sign2@~0.6.0", - "_id": "aws-sign2@0.6.0", - "_integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=", + "_from": "aws-sign2@~0.7.0", + "_id": "aws-sign2@0.7.0", + "_inBundle": false, + "_integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", "_location": "/request/aws-sign2", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "aws-sign2@~0.6.0", + "raw": "aws-sign2@~0.7.0", "name": "aws-sign2", "escapedName": "aws-sign2", - "rawSpec": "~0.6.0", + "rawSpec": "~0.7.0", "saveSpec": null, - "fetchSpec": "~0.6.0" + "fetchSpec": "~0.7.0" }, "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz", - "_shasum": "14342dd38dbcc94d0e5b87d763cd63612c0e794f", - "_shrinkwrap": null, - "_spec": "aws-sign2@~0.6.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/request", + "_resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "_shasum": "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8", + "_spec": "aws-sign2@~0.7.0", + "_where": "/Users/rebecca/code/npm/node_modules/request", "author": { "name": "Mikeal Rogers", "email": "mikeal.rogers@gmail.com", "url": "http://www.futurealoof.com" }, - "bin": null, "bugs": { "url": "https://github.com/mikeal/aws-sign/issues" }, @@ -44,9 +43,8 @@ "main": "index.js", "name": "aws-sign2", "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "url": "git+https://github.com/mikeal/aws-sign.git" }, - "version": "0.6.0" + "version": "0.7.0" } diff --git a/deps/npm/node_modules/request/node_modules/form-data/README.md.bak b/deps/npm/node_modules/request/node_modules/form-data/README.md.bak new file mode 100644 index 0000000000..927d08289d --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/form-data/README.md.bak @@ -0,0 +1,234 @@ +# Form-Data [![NPM Module](https://img.shields.io/npm/v/form-data.svg)](https://www.npmjs.com/package/form-data) [![Join the chat at https://gitter.im/form-data/form-data](http://form-data.github.io/images/gitterbadge.svg)](https://gitter.im/form-data/form-data) + +A library to create readable ```"multipart/form-data"``` streams. Can be used to submit forms and file uploads to other web applications. + +The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface][xhr2-fd]. + +[xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface + +[![Linux Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=linux:0.12-8.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/master.svg?label=macos:0.12-8.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/master.svg?label=windows:0.12-8.x)](https://ci.appveyor.com/project/alexindigo/form-data) + +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/master.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) +[![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data) + +## Install + +``` +npm install --save form-data +``` + +## Usage + +In this example we are constructing a form with 3 fields that contain a string, +a buffer and a file stream. + +``` javascript +var FormData = require('form-data'); +var fs = require('fs'); + +var form = new FormData(); +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_file', fs.createReadStream('/foo/bar.jpg')); +``` + +Also you can use http-response stream: + +``` javascript +var FormData = require('form-data'); +var http = require('http'); + +var form = new FormData(); + +http.request('http://nodejs.org/images/logo.png', function(response) { + form.append('my_field', 'my value'); + form.append('my_buffer', new Buffer(10)); + form.append('my_logo', response); +}); +``` + +Or @mikeal's [request](https://github.com/request/request) stream: + +``` javascript +var FormData = require('form-data'); +var request = require('request'); + +var form = new FormData(); + +form.append('my_field', 'my value'); +form.append('my_buffer', new Buffer(10)); +form.append('my_logo', request('http://nodejs.org/images/logo.png')); +``` + +In order to submit this form to a web application, call ```submit(url, [callback])``` method: + +``` javascript +form.submit('http://example.org/', function(err, res) { + // res – response object (http.IncomingMessage) // + res.resume(); +}); + +``` + +For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. + +### Custom options + +You can provide custom options, such as `maxDataSize`: + +``` javascript +var FormData = require('form-data'); + +var form = new FormData({ maxDataSize: 20971520 }); +form.append('my_field', 'my value'); +form.append('my_buffer', /* something big */); +``` + +List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) + +### Alternative submission methods + +You can use node's http client interface: + +``` javascript +var http = require('http'); + +var request = http.request({ + method: 'post', + host: 'example.org', + path: '/upload', + headers: form.getHeaders() +}); + +form.pipe(request); + +request.on('response', function(res) { + console.log(res.statusCode); +}); +``` + +Or if you would prefer the `'Content-Length'` header to be set for you: + +``` javascript +form.submit('example.org/upload', function(err, res) { + console.log(res.statusCode); +}); +``` + +To use custom headers and pre-known length in parts: + +``` javascript +var CRLF = '\r\n'; +var form = new FormData(); + +var options = { + header: CRLF + '--' + form.getBoundary() + CRLF + 'X-Custom-Header: 123' + CRLF + CRLF, + knownLength: 1 +}; + +form.append('my_buffer', buffer, options); + +form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); +}); +``` + +Form-Data can recognize and fetch all the required information from common types of streams (```fs.readStream```, ```http.response``` and ```mikeal's request```), for some other types of streams you'd need to provide "file"-related information manually: + +``` javascript +someModule.stream(function(err, stdout, stderr) { + if (err) throw err; + + var form = new FormData(); + + form.append('file', stdout, { + filename: 'unicycle.jpg', // ... or: + filepath: 'photos/toys/unicycle.jpg', + contentType: 'image/jpeg', + knownLength: 19806 + }); + + form.submit('http://example.com/', function(err, res) { + if (err) throw err; + console.log('Done'); + }); +}); +``` + +The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). + +For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: + +``` javascript +form.submit({ + host: 'example.com', + path: '/probably.php?extra=params', + auth: 'username:password' +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +In case you need to also send custom HTTP headers with the POST request, you can use the `headers` key in first parameter of `form.submit()`: + +``` javascript +form.submit({ + host: 'example.com', + path: '/surelynot.php', + headers: {'x-test-header': 'test-header-value'} +}, function(err, res) { + console.log(res.statusCode); +}); +``` + +### Integration with other libraries + +#### Request + +Form submission using [request](https://github.com/request/request): + +```javascript +var formData = { + my_field: 'my_value', + my_file: fs.createReadStream(__dirname + '/unicycle.jpg'), +}; + +request.post({url:'http://service.com/upload', formData: formData}, function(err, httpResponse, body) { + if (err) { + return console.error('upload failed:', err); + } + console.log('Upload successful! Server responded with:', body); +}); +``` + +For more details see [request readme](https://github.com/request/request#multipartform-data-multipart-form-uploads). + +#### node-fetch + +You can also submit a form using [node-fetch](https://github.com/bitinn/node-fetch): + +```javascript +var form = new FormData(); + +form.append('a', 1); + +fetch('http://example.com', { method: 'POST', body: form }) + .then(function(res) { + return res.json(); + }).then(function(json) { + console.log(json); + }); +``` + +## Notes + +- ```getLengthSync()``` method DOESN'T calculate length for streams, use ```knownLength``` options as workaround. +- Starting version `2.x` FormData has dropped support for `node@0.10.x`. + +## License + +Form-Data is released under the [MIT](License) license. diff --git a/deps/npm/node_modules/request/node_modules/form-data/Readme.md b/deps/npm/node_modules/request/node_modules/form-data/Readme.md index 78ef315ff0..518ee84ddf 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/Readme.md +++ b/deps/npm/node_modules/request/node_modules/form-data/Readme.md @@ -6,11 +6,11 @@ The API of this library is inspired by the [XMLHttpRequest-2 FormData Interface] [xhr2-fd]: http://dev.w3.org/2006/webapi/XMLHttpRequest-2/Overview.html#the-formdata-interface -[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.1.4.svg?label=linux:0.12-6.x)](https://travis-ci.org/form-data/form-data) -[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.1.4.svg?label=macos:0.12-6.x)](https://travis-ci.org/form-data/form-data) -[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.1.4.svg?label=windows:0.12-6.x)](https://ci.appveyor.com/project/alexindigo/form-data) +[![Linux Build](https://img.shields.io/travis/form-data/form-data/v2.3.1.svg?label=linux:0.12-8.x)](https://travis-ci.org/form-data/form-data) +[![MacOS Build](https://img.shields.io/travis/form-data/form-data/v2.3.1.svg?label=macos:0.12-8.x)](https://travis-ci.org/form-data/form-data) +[![Windows Build](https://img.shields.io/appveyor/ci/alexindigo/form-data/v2.3.1.svg?label=windows:0.12-8.x)](https://ci.appveyor.com/project/alexindigo/form-data) -[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.1.4.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) +[![Coverage Status](https://img.shields.io/coveralls/form-data/form-data/v2.3.1.svg?label=code+coverage)](https://coveralls.io/github/form-data/form-data?branch=master) [![Dependency Status](https://img.shields.io/david/form-data/form-data.svg)](https://david-dm.org/form-data/form-data) [![bitHound Overall Score](https://www.bithound.io/github/form-data/form-data/badges/score.svg)](https://www.bithound.io/github/form-data/form-data) @@ -75,6 +75,20 @@ form.submit('http://example.org/', function(err, res) { For more advanced request manipulations ```submit()``` method returns ```http.ClientRequest``` object, or you can choose from one of the alternative submission methods. +### Custom options + +You can provide custom options, such as `maxDataSize`: + +``` javascript +var FormData = require('form-data'); + +var form = new FormData({ maxDataSize: 20971520 }); +form.append('my_field', 'my value'); +form.append('my_buffer', /* something big */); +``` + +List of available options could be found in [combined-stream](https://github.com/felixge/node-combined-stream/blob/master/lib/combined_stream.js#L7-L15) + ### Alternative submission methods You can use node's http client interface: @@ -132,8 +146,9 @@ someModule.stream(function(err, stdout, stderr) { var form = new FormData(); form.append('file', stdout, { - filename: 'unicycle.jpg', - contentType: 'image/jpg', + filename: 'unicycle.jpg', // ... or: + filepath: 'photos/toys/unicycle.jpg', + contentType: 'image/jpeg', knownLength: 19806 }); @@ -144,6 +159,8 @@ someModule.stream(function(err, stdout, stderr) { }); ``` +The `filepath` property overrides `filename` and may contain a relative path. This is typically used when uploading [multiple files from a directory](https://wicg.github.io/entries-api/#dom-htmlinputelement-webkitdirectory). + For edge cases, like POST request to URL with query string or to pass HTTP auth credentials, object can be passed to `form.submit()` as first parameter: ``` javascript diff --git a/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js b/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js index 79aa0f9f51..3a1bb82b11 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js +++ b/deps/npm/node_modules/request/node_modules/form-data/lib/form_data.js @@ -21,8 +21,9 @@ util.inherits(FormData, CombinedStream); * and file uploads to other web applications. * * @constructor + * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream */ -function FormData() { +function FormData(options) { if (!(this instanceof FormData)) { return new FormData(); } @@ -32,6 +33,11 @@ function FormData() { this._valuesToMeasure = []; CombinedStream.call(this); + + options = options || {}; + for (var option in options) { + this[option] = options[option]; + } } FormData.LINE_BREAK = '\r\n'; @@ -186,6 +192,7 @@ FormData.prototype._multiPartHeader = function(field, value, options) { var header; for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; header = headers[prop]; // skip nullish headers. @@ -209,20 +216,25 @@ FormData.prototype._multiPartHeader = function(field, value, options) { FormData.prototype._getContentDisposition = function(value, options) { - var contentDisposition; - - // custom filename takes precedence - // fs- and request- streams have path property - // formidable and the browser add a name property. - var filename = options.filename || value.name || value.path; + var filename + , contentDisposition + ; - // or try http response - if (!filename && value.readable && value.hasOwnProperty('httpVersion')) { - filename = value.client._httpMessage.path; + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || value.name || value.path) { + // custom filename take precedence + // formidable and the browser add a name property + // fs- and request- streams have path property + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty('httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path); } if (filename) { - contentDisposition = 'filename="' + path.basename(filename) + '"'; + contentDisposition = 'filename="' + filename + '"'; } return contentDisposition; @@ -248,9 +260,9 @@ FormData.prototype._getContentType = function(value, options) { contentType = value.headers['content-type']; } - // or guess it from the filename - if (!contentType && options.filename) { - contentType = mime.lookup(options.filename); + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); } // fallback to the default content type if `value` is not simple value @@ -388,7 +400,8 @@ FormData.prototype.submit = function(params, cb) { options = populate({ port: params.port, path: params.pathname, - host: params.hostname + host: params.hostname, + protocol: params.protocol }, defaults); // use custom params diff --git a/deps/npm/node_modules/request/node_modules/form-data/package.json b/deps/npm/node_modules/request/node_modules/form-data/package.json index 7b5d0d190d..8df3274a71 100644 --- a/deps/npm/node_modules/request/node_modules/form-data/package.json +++ b/deps/npm/node_modules/request/node_modules/form-data/package.json @@ -1,33 +1,32 @@ { - "_from": "form-data@~2.1.1", - "_id": "form-data@2.1.4", - "_integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=", + "_from": "form-data@~2.3.1", + "_id": "form-data@2.3.1", + "_inBundle": false, + "_integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", "_location": "/request/form-data", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, - "raw": "form-data@~2.1.1", + "raw": "form-data@~2.3.1", "name": "form-data", "escapedName": "form-data", - "rawSpec": "~2.1.1", + "rawSpec": "~2.3.1", "saveSpec": null, - "fetchSpec": "~2.1.1" + "fetchSpec": "~2.3.1" }, "_requiredBy": [ "/request" ], - "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz", - "_shasum": "33c183acf193276ecaa98143a69e94bfee1750d1", - "_shrinkwrap": null, - "_spec": "form-data@~2.1.1", - "_where": "/Users/zkat/Documents/code/npm/node_modules/request", + "_resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "_shasum": "6fb94fbd71885306d73d15cc497fe4cc4ecd44bf", + "_spec": "form-data@~2.3.1", + "_where": "/Users/rebecca/code/npm/node_modules/request", "author": { "name": "Felix Geisendörfer", "email": "felix@debuggable.com", "url": "http://debuggable.com/" }, - "bin": null, "browser": "./lib/browser", "bugs": { "url": "https://github.com/form-data/form-data/issues" @@ -67,8 +66,6 @@ "license": "MIT", "main": "./lib/form_data", "name": "form-data", - "optionalDependencies": {}, - "peerDependencies": {}, "pre-commit": [ "lint", "ci-test", @@ -97,5 +94,5 @@ "test": "istanbul cover test/run.js", "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md" }, - "version": "2.1.4" + "version": "2.3.1" } diff --git a/deps/npm/node_modules/request/node_modules/har-validator/README.md b/deps/npm/node_modules/request/node_modules/har-validator/README.md index 77ff935018..fc696349e4 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/README.md +++ b/deps/npm/node_modules/request/node_modules/har-validator/README.md @@ -1,4 +1,4 @@ -# HAR Validator [![version][npm-version]][npm-url] [![License][npm-license]][license-url] +# HAR Validator [![version][npm-version]][npm-url] [![License][license-image]][license-url] > Extremely fast HTTP Archive ([HAR](https://github.com/ahmadnassri/har-spec/blob/master/versions/1.2.md)) validator using JSON Schema. @@ -15,34 +15,13 @@ npm install --only=production --save har-validator ``` -## Usage - -I recommend using an optimized build matching your Node.js environment version, otherwise, the standard `require` would work just fine with any version of Node `>= v4.0` . - -```js -/* - * Node 7 - */ -const validate = require('har-validator/lib/node7') - -/* - * Node 6 - */ -const validate = require('har-validator/lib/node6') - -/* - * Node 4 (Default) - */ -var validate = require('har-validator') -``` - ## CLI Usage Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more info. ## API -**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. *For backward comptability with `v1.x` an [async/callback API](docs/async.md) is also provided* +**Note**: as of [`v2.0.0`](https://github.com/ahmadnassri/har-validator/releases/tag/v2.0.0) this module defaults to Promise based API. *For backward compatibility with `v1.x` an [async/callback API](docs/async.md) is also provided* - [async API](docs/async.md) - [callback API](docs/async.md) @@ -55,12 +34,12 @@ Please refer to [`har-cli`](https://github.com/ahmadnassri/har-cli) for more inf > Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri) [license-url]: http://choosealicense.com/licenses/isc/ +[license-image]: https://img.shields.io/github/license/ahmadnassri/har-validator.svg?style=flat-square [travis-url]: https://travis-ci.org/ahmadnassri/har-validator [travis-image]: https://img.shields.io/travis/ahmadnassri/har-validator.svg?style=flat-square [npm-url]: https://www.npmjs.com/package/har-validator -[npm-license]: https://img.shields.io/npm/l/har-validator.svg?style=flat-square [npm-version]: https://img.shields.io/npm/v/har-validator.svg?style=flat-square [npm-downloads]: https://img.shields.io/npm/dm/har-validator.svg?style=flat-square diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/async.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/async.js new file mode 100644 index 0000000000..fc41667e81 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/har-validator/lib/async.js @@ -0,0 +1,98 @@ +var Ajv = require('ajv') +var HARError = require('./error') +var schemas = require('har-schema') + +var ajv + +function validate (name, data, next) { + data = data || {} + + // validator config + ajv = ajv || new Ajv({ + allErrors: true, + schemas: schemas + }) + + var validate = ajv.getSchema(name + '.json') + + var valid = validate(data) + + // callback? + if (typeof next === 'function') { + return next(!valid ? new HARError(validate.errors) : null, valid) + } + + return valid +} + +exports.afterRequest = function (data, next) { + return validate('afterRequest', data, next) +} + +exports.beforeRequest = function (data, next) { + return validate('beforeRequest', data, next) +} + +exports.browser = function (data, next) { + return validate('browser', data, next) +} + +exports.cache = function (data, next) { + return validate('cache', data, next) +} + +exports.content = function (data, next) { + return validate('content', data, next) +} + +exports.cookie = function (data, next) { + return validate('cookie', data, next) +} + +exports.creator = function (data, next) { + return validate('creator', data, next) +} + +exports.entry = function (data, next) { + return validate('entry', data, next) +} + +exports.har = function (data, next) { + return validate('har', data, next) +} + +exports.header = function (data, next) { + return validate('header', data, next) +} + +exports.log = function (data, next) { + return validate('log', data, next) +} + +exports.page = function (data, next) { + return validate('page', data, next) +} + +exports.pageTimings = function (data, next) { + return validate('pageTimings', data, next) +} + +exports.postData = function (data, next) { + return validate('postData', data, next) +} + +exports.query = function (data, next) { + return validate('query', data, next) +} + +exports.request = function (data, next) { + return validate('request', data, next) +} + +exports.response = function (data, next) { + return validate('response', data, next) +} + +exports.timings = function (data, next) { + return validate('timings', data, next) +} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/browser/async.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/browser/async.js deleted file mode 100644 index 676356aafd..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/browser/async.js +++ /dev/null @@ -1,96 +0,0 @@ -import * as schemas from 'har-schema'; -import Ajv from 'ajv'; -import HARError from './error'; - -let ajv; - -export function validate(name, data = {}, next) { - // validator config - ajv = ajv || new Ajv({ - allErrors: true, - schemas: schemas - }); - - let validate = ajv.getSchema(name + '.json'); - - let valid = validate(data); - - // callback? - if (typeof next === 'function') { - return next(!valid ? new HARError(validate.errors) : null, valid); - } - - return valid; -} - -export function afterRequest(data, next) { - return validate('afterRequest', data, next); -} - -export function beforeRequest(data, next) { - return validate('beforeRequest', data, next); -} - -export function browser(data, next) { - return validate('browser', data, next); -} - -export function cache(data, next) { - return validate('cache', data, next); -} - -export function content(data, next) { - return validate('content', data, next); -} - -export function cookie(data, next) { - return validate('cookie', data, next); -} - -export function creator(data, next) { - return validate('creator', data, next); -} - -export function entry(data, next) { - return validate('entry', data, next); -} - -export function har(data, next) { - return validate('har', data, next); -} - -export function header(data, next) { - return validate('header', data, next); -} - -export function log(data, next) { - return validate('log', data, next); -} - -export function page(data, next) { - return validate('page', data, next); -} - -export function pageTimings(data, next) { - return validate('pageTimings', data, next); -} - -export function postData(data, next) { - return validate('postData', data, next); -} - -export function query(data, next) { - return validate('query', data, next); -} - -export function request(data, next) { - return validate('request', data, next); -} - -export function response(data, next) { - return validate('response', data, next); -} - -export function timings(data, next) { - return validate('timings', data, next); -} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/browser/error.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/browser/error.js deleted file mode 100644 index f49fcf231a..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/browser/error.js +++ /dev/null @@ -1,15 +0,0 @@ -export default function HARError(errors) { - let message = 'validation failed'; - - this.name = 'HARError'; - this.message = message; - this.errors = errors; - - if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = new Error(message).stack; - } -} - -HARError.prototype = Error.prototype; \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/browser/promise.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/browser/promise.js deleted file mode 100644 index bc1b18c3f7..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/browser/promise.js +++ /dev/null @@ -1,93 +0,0 @@ -import * as schemas from 'har-schema'; -import Ajv from 'ajv'; -import HARError from './error'; - -let ajv; - -export function validate(name, data = {}) { - // validator config - ajv = ajv || new Ajv({ - allErrors: true, - schemas: schemas - }); - - let validate = ajv.getSchema(name + '.json'); - - return new Promise((resolve, reject) => { - let valid = validate(data); - - !valid ? reject(new HARError(validate.errors)) : resolve(data); - }); -} - -export function afterRequest(data) { - return validate('afterRequest', data); -} - -export function beforeRequest(data) { - return validate('beforeRequest', data); -} - -export function browser(data) { - return validate('browser', data); -} - -export function cache(data) { - return validate('cache', data); -} - -export function content(data) { - return validate('content', data); -} - -export function cookie(data) { - return validate('cookie', data); -} - -export function creator(data) { - return validate('creator', data); -} - -export function entry(data) { - return validate('entry', data); -} - -export function har(data) { - return validate('har', data); -} - -export function header(data) { - return validate('header', data); -} - -export function log(data) { - return validate('log', data); -} - -export function page(data) { - return validate('page', data); -} - -export function pageTimings(data) { - return validate('pageTimings', data); -} - -export function postData(data) { - return validate('postData', data); -} - -export function query(data) { - return validate('query', data); -} - -export function request(data) { - return validate('request', data); -} - -export function response(data) { - return validate('response', data); -} - -export function timings(data) { - return validate('timings', data); -} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/error.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/error.js new file mode 100644 index 0000000000..f2618dc4f3 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/har-validator/lib/error.js @@ -0,0 +1,17 @@ +function HARError (errors) { + var message = 'validation failed' + + this.name = 'HARError' + this.message = message + this.errors = errors + + if (typeof Error.captureStackTrace === 'function') { + Error.captureStackTrace(this, this.constructor) + } else { + this.stack = (new Error(message)).stack + } +} + +HARError.prototype = Error.prototype + +module.exports = HARError diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/node4/async.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/node4/async.js deleted file mode 100644 index e9c4854307..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/node4/async.js +++ /dev/null @@ -1,136 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; -exports.afterRequest = afterRequest; -exports.beforeRequest = beforeRequest; -exports.browser = browser; -exports.cache = cache; -exports.content = content; -exports.cookie = cookie; -exports.creator = creator; -exports.entry = entry; -exports.har = har; -exports.header = header; -exports.log = log; -exports.page = page; -exports.pageTimings = pageTimings; -exports.postData = postData; -exports.query = query; -exports.request = request; -exports.response = response; -exports.timings = timings; - -var _harSchema = require('har-schema'); - -var schemas = _interopRequireWildcard(_harSchema); - -var _ajv = require('ajv'); - -var _ajv2 = _interopRequireDefault(_ajv); - -var _error = require('./error'); - -var _error2 = _interopRequireDefault(_error); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -var ajv = void 0; - -function validate(name) { - var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var next = arguments[2]; - - // validator config - ajv = ajv || new _ajv2.default({ - allErrors: true, - schemas: schemas - }); - - var validate = ajv.getSchema(name + '.json'); - - var valid = validate(data); - - // callback? - if (typeof next === 'function') { - return next(!valid ? new _error2.default(validate.errors) : null, valid); - } - - return valid; -} - -function afterRequest(data, next) { - return validate('afterRequest', data, next); -} - -function beforeRequest(data, next) { - return validate('beforeRequest', data, next); -} - -function browser(data, next) { - return validate('browser', data, next); -} - -function cache(data, next) { - return validate('cache', data, next); -} - -function content(data, next) { - return validate('content', data, next); -} - -function cookie(data, next) { - return validate('cookie', data, next); -} - -function creator(data, next) { - return validate('creator', data, next); -} - -function entry(data, next) { - return validate('entry', data, next); -} - -function har(data, next) { - return validate('har', data, next); -} - -function header(data, next) { - return validate('header', data, next); -} - -function log(data, next) { - return validate('log', data, next); -} - -function page(data, next) { - return validate('page', data, next); -} - -function pageTimings(data, next) { - return validate('pageTimings', data, next); -} - -function postData(data, next) { - return validate('postData', data, next); -} - -function query(data, next) { - return validate('query', data, next); -} - -function request(data, next) { - return validate('request', data, next); -} - -function response(data, next) { - return validate('response', data, next); -} - -function timings(data, next) { - return validate('timings', data, next); -} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/node4/error.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/node4/error.js deleted file mode 100644 index 0ae01bd18c..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/node4/error.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = HARError; -function HARError(errors) { - var message = 'validation failed'; - - this.name = 'HARError'; - this.message = message; - this.errors = errors; - - if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = new Error(message).stack; - } -} - -HARError.prototype = Error.prototype; -module.exports = exports['default']; \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/node4/promise.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/node4/promise.js deleted file mode 100644 index d37ca52ad7..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/node4/promise.js +++ /dev/null @@ -1,132 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; -exports.afterRequest = afterRequest; -exports.beforeRequest = beforeRequest; -exports.browser = browser; -exports.cache = cache; -exports.content = content; -exports.cookie = cookie; -exports.creator = creator; -exports.entry = entry; -exports.har = har; -exports.header = header; -exports.log = log; -exports.page = page; -exports.pageTimings = pageTimings; -exports.postData = postData; -exports.query = query; -exports.request = request; -exports.response = response; -exports.timings = timings; - -var _harSchema = require('har-schema'); - -var schemas = _interopRequireWildcard(_harSchema); - -var _ajv = require('ajv'); - -var _ajv2 = _interopRequireDefault(_ajv); - -var _error = require('./error'); - -var _error2 = _interopRequireDefault(_error); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -var ajv = void 0; - -function validate(name) { - var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - // validator config - ajv = ajv || new _ajv2.default({ - allErrors: true, - schemas: schemas - }); - - var validate = ajv.getSchema(name + '.json'); - - return new Promise(function (resolve, reject) { - var valid = validate(data); - - !valid ? reject(new _error2.default(validate.errors)) : resolve(data); - }); -} - -function afterRequest(data) { - return validate('afterRequest', data); -} - -function beforeRequest(data) { - return validate('beforeRequest', data); -} - -function browser(data) { - return validate('browser', data); -} - -function cache(data) { - return validate('cache', data); -} - -function content(data) { - return validate('content', data); -} - -function cookie(data) { - return validate('cookie', data); -} - -function creator(data) { - return validate('creator', data); -} - -function entry(data) { - return validate('entry', data); -} - -function har(data) { - return validate('har', data); -} - -function header(data) { - return validate('header', data); -} - -function log(data) { - return validate('log', data); -} - -function page(data) { - return validate('page', data); -} - -function pageTimings(data) { - return validate('pageTimings', data); -} - -function postData(data) { - return validate('postData', data); -} - -function query(data) { - return validate('query', data); -} - -function request(data) { - return validate('request', data); -} - -function response(data) { - return validate('response', data); -} - -function timings(data) { - return validate('timings', data); -} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/node6/async.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/node6/async.js deleted file mode 100644 index e707043adf..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/node6/async.js +++ /dev/null @@ -1,133 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; -exports.afterRequest = afterRequest; -exports.beforeRequest = beforeRequest; -exports.browser = browser; -exports.cache = cache; -exports.content = content; -exports.cookie = cookie; -exports.creator = creator; -exports.entry = entry; -exports.har = har; -exports.header = header; -exports.log = log; -exports.page = page; -exports.pageTimings = pageTimings; -exports.postData = postData; -exports.query = query; -exports.request = request; -exports.response = response; -exports.timings = timings; - -var _harSchema = require('har-schema'); - -var schemas = _interopRequireWildcard(_harSchema); - -var _ajv = require('ajv'); - -var _ajv2 = _interopRequireDefault(_ajv); - -var _error = require('./error'); - -var _error2 = _interopRequireDefault(_error); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -let ajv; - -function validate(name, data = {}, next) { - // validator config - ajv = ajv || new _ajv2.default({ - allErrors: true, - schemas: schemas - }); - - let validate = ajv.getSchema(name + '.json'); - - let valid = validate(data); - - // callback? - if (typeof next === 'function') { - return next(!valid ? new _error2.default(validate.errors) : null, valid); - } - - return valid; -} - -function afterRequest(data, next) { - return validate('afterRequest', data, next); -} - -function beforeRequest(data, next) { - return validate('beforeRequest', data, next); -} - -function browser(data, next) { - return validate('browser', data, next); -} - -function cache(data, next) { - return validate('cache', data, next); -} - -function content(data, next) { - return validate('content', data, next); -} - -function cookie(data, next) { - return validate('cookie', data, next); -} - -function creator(data, next) { - return validate('creator', data, next); -} - -function entry(data, next) { - return validate('entry', data, next); -} - -function har(data, next) { - return validate('har', data, next); -} - -function header(data, next) { - return validate('header', data, next); -} - -function log(data, next) { - return validate('log', data, next); -} - -function page(data, next) { - return validate('page', data, next); -} - -function pageTimings(data, next) { - return validate('pageTimings', data, next); -} - -function postData(data, next) { - return validate('postData', data, next); -} - -function query(data, next) { - return validate('query', data, next); -} - -function request(data, next) { - return validate('request', data, next); -} - -function response(data, next) { - return validate('response', data, next); -} - -function timings(data, next) { - return validate('timings', data, next); -} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/node6/error.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/node6/error.js deleted file mode 100644 index 4149ed7371..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/node6/error.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = HARError; -function HARError(errors) { - let message = 'validation failed'; - - this.name = 'HARError'; - this.message = message; - this.errors = errors; - - if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = new Error(message).stack; - } -} - -HARError.prototype = Error.prototype; -module.exports = exports['default']; \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/node6/promise.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/node6/promise.js deleted file mode 100644 index be7017ae05..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/node6/promise.js +++ /dev/null @@ -1,130 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; -exports.afterRequest = afterRequest; -exports.beforeRequest = beforeRequest; -exports.browser = browser; -exports.cache = cache; -exports.content = content; -exports.cookie = cookie; -exports.creator = creator; -exports.entry = entry; -exports.har = har; -exports.header = header; -exports.log = log; -exports.page = page; -exports.pageTimings = pageTimings; -exports.postData = postData; -exports.query = query; -exports.request = request; -exports.response = response; -exports.timings = timings; - -var _harSchema = require('har-schema'); - -var schemas = _interopRequireWildcard(_harSchema); - -var _ajv = require('ajv'); - -var _ajv2 = _interopRequireDefault(_ajv); - -var _error = require('./error'); - -var _error2 = _interopRequireDefault(_error); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -let ajv; - -function validate(name, data = {}) { - // validator config - ajv = ajv || new _ajv2.default({ - allErrors: true, - schemas: schemas - }); - - let validate = ajv.getSchema(name + '.json'); - - return new Promise((resolve, reject) => { - let valid = validate(data); - - !valid ? reject(new _error2.default(validate.errors)) : resolve(data); - }); -} - -function afterRequest(data) { - return validate('afterRequest', data); -} - -function beforeRequest(data) { - return validate('beforeRequest', data); -} - -function browser(data) { - return validate('browser', data); -} - -function cache(data) { - return validate('cache', data); -} - -function content(data) { - return validate('content', data); -} - -function cookie(data) { - return validate('cookie', data); -} - -function creator(data) { - return validate('creator', data); -} - -function entry(data) { - return validate('entry', data); -} - -function har(data) { - return validate('har', data); -} - -function header(data) { - return validate('header', data); -} - -function log(data) { - return validate('log', data); -} - -function page(data) { - return validate('page', data); -} - -function pageTimings(data) { - return validate('pageTimings', data); -} - -function postData(data) { - return validate('postData', data); -} - -function query(data) { - return validate('query', data); -} - -function request(data) { - return validate('request', data); -} - -function response(data) { - return validate('response', data); -} - -function timings(data) { - return validate('timings', data); -} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/node7/async.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/node7/async.js deleted file mode 100644 index e707043adf..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/node7/async.js +++ /dev/null @@ -1,133 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; -exports.afterRequest = afterRequest; -exports.beforeRequest = beforeRequest; -exports.browser = browser; -exports.cache = cache; -exports.content = content; -exports.cookie = cookie; -exports.creator = creator; -exports.entry = entry; -exports.har = har; -exports.header = header; -exports.log = log; -exports.page = page; -exports.pageTimings = pageTimings; -exports.postData = postData; -exports.query = query; -exports.request = request; -exports.response = response; -exports.timings = timings; - -var _harSchema = require('har-schema'); - -var schemas = _interopRequireWildcard(_harSchema); - -var _ajv = require('ajv'); - -var _ajv2 = _interopRequireDefault(_ajv); - -var _error = require('./error'); - -var _error2 = _interopRequireDefault(_error); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -let ajv; - -function validate(name, data = {}, next) { - // validator config - ajv = ajv || new _ajv2.default({ - allErrors: true, - schemas: schemas - }); - - let validate = ajv.getSchema(name + '.json'); - - let valid = validate(data); - - // callback? - if (typeof next === 'function') { - return next(!valid ? new _error2.default(validate.errors) : null, valid); - } - - return valid; -} - -function afterRequest(data, next) { - return validate('afterRequest', data, next); -} - -function beforeRequest(data, next) { - return validate('beforeRequest', data, next); -} - -function browser(data, next) { - return validate('browser', data, next); -} - -function cache(data, next) { - return validate('cache', data, next); -} - -function content(data, next) { - return validate('content', data, next); -} - -function cookie(data, next) { - return validate('cookie', data, next); -} - -function creator(data, next) { - return validate('creator', data, next); -} - -function entry(data, next) { - return validate('entry', data, next); -} - -function har(data, next) { - return validate('har', data, next); -} - -function header(data, next) { - return validate('header', data, next); -} - -function log(data, next) { - return validate('log', data, next); -} - -function page(data, next) { - return validate('page', data, next); -} - -function pageTimings(data, next) { - return validate('pageTimings', data, next); -} - -function postData(data, next) { - return validate('postData', data, next); -} - -function query(data, next) { - return validate('query', data, next); -} - -function request(data, next) { - return validate('request', data, next); -} - -function response(data, next) { - return validate('response', data, next); -} - -function timings(data, next) { - return validate('timings', data, next); -} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/node7/error.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/node7/error.js deleted file mode 100644 index 4149ed7371..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/node7/error.js +++ /dev/null @@ -1,22 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = HARError; -function HARError(errors) { - let message = 'validation failed'; - - this.name = 'HARError'; - this.message = message; - this.errors = errors; - - if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, this.constructor); - } else { - this.stack = new Error(message).stack; - } -} - -HARError.prototype = Error.prototype; -module.exports = exports['default']; \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/node7/promise.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/node7/promise.js deleted file mode 100644 index be7017ae05..0000000000 --- a/deps/npm/node_modules/request/node_modules/har-validator/lib/node7/promise.js +++ /dev/null @@ -1,130 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.validate = validate; -exports.afterRequest = afterRequest; -exports.beforeRequest = beforeRequest; -exports.browser = browser; -exports.cache = cache; -exports.content = content; -exports.cookie = cookie; -exports.creator = creator; -exports.entry = entry; -exports.har = har; -exports.header = header; -exports.log = log; -exports.page = page; -exports.pageTimings = pageTimings; -exports.postData = postData; -exports.query = query; -exports.request = request; -exports.response = response; -exports.timings = timings; - -var _harSchema = require('har-schema'); - -var schemas = _interopRequireWildcard(_harSchema); - -var _ajv = require('ajv'); - -var _ajv2 = _interopRequireDefault(_ajv); - -var _error = require('./error'); - -var _error2 = _interopRequireDefault(_error); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } - -let ajv; - -function validate(name, data = {}) { - // validator config - ajv = ajv || new _ajv2.default({ - allErrors: true, - schemas: schemas - }); - - let validate = ajv.getSchema(name + '.json'); - - return new Promise((resolve, reject) => { - let valid = validate(data); - - !valid ? reject(new _error2.default(validate.errors)) : resolve(data); - }); -} - -function afterRequest(data) { - return validate('afterRequest', data); -} - -function beforeRequest(data) { - return validate('beforeRequest', data); -} - -function browser(data) { - return validate('browser', data); -} - -function cache(data) { - return validate('cache', data); -} - -function content(data) { - return validate('content', data); -} - -function cookie(data) { - return validate('cookie', data); -} - -function creator(data) { - return validate('creator', data); -} - -function entry(data) { - return validate('entry', data); -} - -function har(data) { - return validate('har', data); -} - -function header(data) { - return validate('header', data); -} - -function log(data) { - return validate('log', data); -} - -function page(data) { - return validate('page', data); -} - -function pageTimings(data) { - return validate('pageTimings', data); -} - -function postData(data) { - return validate('postData', data); -} - -function query(data) { - return validate('query', data); -} - -function request(data) { - return validate('request', data); -} - -function response(data) { - return validate('response', data); -} - -function timings(data) { - return validate('timings', data); -} \ No newline at end of file diff --git a/deps/npm/node_modules/request/node_modules/har-validator/lib/promise.js b/deps/npm/node_modules/request/node_modules/har-validator/lib/promise.js new file mode 100644 index 0000000000..1ab308cf71 --- /dev/null +++ b/deps/npm/node_modules/request/node_modules/har-validator/lib/promise.js @@ -0,0 +1,95 @@ +var Ajv = require('ajv') +var HARError = require('./error') +var schemas = require('har-schema') + +var ajv + +function validate (name, data) { + data = data || {} + + // validator config + ajv = ajv || new Ajv({ + allErrors: true, + schemas: schemas + }) + + var validate = ajv.getSchema(name + '.json') + + return new Promise(function (resolve, reject) { + var valid = validate(data) + + !valid ? reject(new HARError(validate.errors)) : resolve(data) + }) +} + +exports.afterRequest = function (data) { + return validate('afterRequest', data) +} + +exports.beforeRequest = function (data) { + return validate('beforeRequest', data) +} + +exports.browser = function (data) { + return validate('browser', data) +} + +exports.cache = function (data) { + return validate('cache', data) +} + +exports.content = function (data) { + return validate('content', data) +} + +exports.cookie = function (data) { + return validate('cookie', data) +} + +exports.creator = function (data) { + return validate('creator', data) +} + +exports.entry = function (data) { + return validate('entry', data) +} + +exports.har = function (data) { + return validate('har', data) +} + +exports.header = function (data) { + return validate('header', data) +} + +exports.log = function (data) { + return validate('log', data) +} + +exports.page = function (data) { + return validate('page', data) +} + +exports.pageTimings = function (data) { + return validate('pageTimings', data) +} + +exports.postData = function (data) { + return validate('postData', data) +} + +exports.query = function (data) { + return validate('query', data) +} + +exports.request = function (data) { + return validate('request', data) +} + +exports.response = function (data) { + return validate('response', data) +} + +exports.timings = function (data) { + return validate('timings', data) +} diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/.tonic_example.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/.tonic_example.js index 0c3cc86ce3..aa11812d87 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/.tonic_example.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/.tonic_example.js @@ -1,5 +1,5 @@ var Ajv = require('ajv'); -var ajv = Ajv({allErrors: true}); +var ajv = new Ajv({allErrors: true}); var schema = { "properties": { diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/README.md b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/README.md index a0a1ca2374..e011fda8ef 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/README.md +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/README.md @@ -2,7 +2,7 @@ # Ajv: Another JSON Schema Validator -The fastest JSON Schema validator for node.js and browser. Supports [v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals). +The fastest JSON Schema validator for node.js and browser with draft 6 support. [![Build Status](https://travis-ci.org/epoberezkin/ajv.svg?branch=master)](https://travis-ci.org/epoberezkin/ajv) @@ -10,12 +10,21 @@ The fastest JSON Schema validator for node.js and browser. Supports [v5 proposal [![npm downloads](https://img.shields.io/npm/dm/ajv.svg)](https://www.npmjs.com/package/ajv) [![Code Climate](https://codeclimate.com/github/epoberezkin/ajv/badges/gpa.svg)](https://codeclimate.com/github/epoberezkin/ajv) [![Coverage Status](https://coveralls.io/repos/epoberezkin/ajv/badge.svg?branch=master&service=github)](https://coveralls.io/github/epoberezkin/ajv?branch=master) +[![Greenkeeper badge](https://badges.greenkeeper.io/epoberezkin/ajv.svg)](https://greenkeeper.io/) [![Gitter](https://img.shields.io/gitter/room/ajv-validator/ajv.svg)](https://gitter.im/ajv-validator/ajv) -__Please note__: You can start using NEW beta version [5.0.4](https://github.com/epoberezkin/ajv/releases/tag/5.0.4-beta.3) (see [migration guide from 4.x.x](https://github.com/epoberezkin/ajv/releases/tag/5.0.1-beta.0)) with the support of JSON-Schema draft-06 (not officially published yet): `npm install ajv@^5.0.4-beta`. +## Using version 5 -Also see [docs](https://github.com/epoberezkin/ajv/tree/5.0.4-beta.3) for 5.0.4. +[JSON Schema draft-06](https://trac.tools.ietf.org/html/draft-wright-json-schema-validation-01) is published. + +[Ajv version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0) that supports draft-06 is released. It may require either migrating your schemas or updating your code (to continue using draft-04 and v5 schemas). + +__Please note__: To use Ajv with draft-04 schemas you need to explicitly add meta-schema to the validator instance: + +```javascript +ajv.addMetaSchema(require('ajv/lib/refs/json-schema-draft-04.json')); +``` ## Contents @@ -29,10 +38,11 @@ Also see [docs](https://github.com/epoberezkin/ajv/tree/5.0.4-beta.3) for 5.0.4. - Validation - [Keywords](#validation-keywords) - [Formats](#formats) + - [Combining schemas with $ref](#ref) - [$data reference](#data-reference) - NEW: [$merge and $patch keywords](#merge-and-patch-keywords) - [Defining custom keywords](#defining-custom-keywords) - - [Asynchronous schema compilation](#asynchronous-compilation) + - [Asynchronous schema compilation](#asynchronous-schema-compilation) - [Asynchronous validation](#asynchronous-validation) - Modifying data during validation - [Filtering data](#filtering-data) @@ -66,15 +76,15 @@ Performace of different validators by [json-schema-benchmark](https://github.com ## Features -- Ajv implements full [JSON Schema draft 4](http://json-schema.org/) standard: - - all validation keywords (see [JSON-Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md)) +- Ajv implements full JSON Schema [draft 6](http://json-schema.org/) and draft 4 standards: + - all validation keywords (see [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md)) - full support of remote refs (remote schemas have to be added with `addSchema` or compiled to be available) - support of circular references between schemas - correct string lengths for strings with unicode pairs (can be turned off) - [formats](#formats) defined by JSON Schema draft 4 standard and custom formats (can be turned off) - [validates schemas against meta-schema](#api-validateschema) -- supports [browsers](#using-in-browser) and nodejs 0.10-6.x -- [asynchronous loading](#asynchronous-compilation) of referenced schemas during compilation +- supports [browsers](#using-in-browser) and nodejs 0.10-7.x +- [asynchronous loading](#asynchronous-schema-compilation) of referenced schemas during compilation - "All errors" validation mode with [option allErrors](#options) - [error messages with parameters](#validation-errors) describing error reasons to allow creating custom error messages - i18n error messages support with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) package @@ -82,9 +92,10 @@ Performace of different validators by [json-schema-benchmark](https://github.com - [assigning defaults](#assigning-defaults) to missing properties and items - [coercing data](#coercing-data-types) to the types specified in `type` keywords - [custom keywords](#defining-custom-keywords) -- keywords `switch`, `constant`, `contains`, `patternGroups`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [option v5](#options) -- [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#) for schemas using v5 keywords -- [v5 $data reference](#data-reference) to use values from the validated data as values for the schema keywords +- draft-6 keywords `const`, `contains` and `propertyNames` +- draft-6 boolean schemas (`true`/`false` as a schema to always pass/fail). +- keywords `switch`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) with [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package +- [$data reference](#data-reference) to use values from the validated data as values for the schema keywords - [asynchronous validation](#asynchronous-validation) of custom formats and keywords Currently Ajv is the only validator that passes all the tests from [JSON Schema Test Suite](https://github.com/json-schema/JSON-Schema-Test-Suite) (according to [json-schema-benchmark](https://github.com/ebdrup/json-schema-benchmark), apart from the test that requires that `1.0` is not an integer that is impossible to satisfy in JavaScript). @@ -96,12 +107,6 @@ Currently Ajv is the only validator that passes all the tests from [JSON Schema npm install ajv ``` -To install a stable beta version [5.0.4](https://github.com/epoberezkin/ajv/releases/tag/5.0.4-beta.3) (see [migration guide from 4.x.x](https://github.com/epoberezkin/ajv/releases/tag/5.0.1-beta.0)): - -``` -npm install ajv@^5.0.4-beta -``` - ## Getting started @@ -139,7 +144,7 @@ if (!valid) console.log(ajv.errorsText()); See [API](#api) and [Options](#options) for more details. -Ajv compiles schemas to functions and caches them in all cases (using schema stringified with [json-stable-stringify](https://github.com/substack/json-stable-stringify) as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again. +Ajv compiles schemas to functions and caches them in all cases (using schema serialized with [json-stable-stringify](https://github.com/substack/json-stable-stringify) or a custom function as a key), so that the next time the same schema is used (not necessarily the same object instance) it won't be compiled again. The best performance is achieved when using compiled functions returned by `compile` or `getSchema` methods (there is no additional function call). @@ -174,6 +179,7 @@ CLI is available as a separate npm package [ajv-cli](https://github.com/jessedc/ - compiling JSON-schemas to test their validity - BETA: generating standalone module exporting a validation function to be used without Ajv (using [ajv-pack](https://github.com/epoberezkin/ajv-pack)) +- migrate schemas to draft-06 (using [json-schema-migrate](https://github.com/epoberezkin/json-schema-migrate)) - validating data file(s) against JSON-schema - testing expected validity of data against JSON-schema - referenced schemas @@ -190,20 +196,18 @@ Ajv supports all validation keywords from draft 4 of JSON-schema standard: - [type](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#type) - [for numbers](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-numbers) - maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf - [for strings](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-strings) - maxLength, minLength, pattern, format -- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems -- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minproperties, required, properties, patternProperties, additionalProperties, dependencies -- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, not, oneOf, anyOf, allOf +- [for arrays](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-arrays) - maxItems, minItems, uniqueItems, items, additionalItems, [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains) +- [for objects](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-objects) - maxProperties, minproperties, required, properties, patternProperties, additionalProperties, dependencies, [propertyNames](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#propertynames) +- [for all types](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#keywords-for-all-types) - enum, [const](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#const) +- [compound keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#compound-keywords) - not, oneOf, anyOf, allOf -With option `v5: true` Ajv also supports all validation keywords and [$data reference](#data-reference) from [v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON-schema standard: +With [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package Ajv also supports validation keywords from [JSON Schema extension proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) for JSON-schema standard: -- [switch](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#switch-v5-proposal) - conditional validation with a sequence of if/then clauses -- [contains](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#contains-v5-proposal) - check that array contains a valid item -- [constant](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#constant-v5-proposal) - check that data is equal to some value -- [patternGroups](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patterngroups-v5-proposal) - a more powerful alternative to patternProperties -- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-v5-proposal) - like `required` but with patterns that some property should match. -- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-v5-proposal) - setting limits for date, time, etc. +- [switch](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#switch-proposed) - conditional validation with a sequence of if/then clauses +- [patternRequired](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#patternrequired-proposed) - like `required` but with patterns that some property should match. +- [formatMaximum, formatMinimum, formatExclusiveMaximum, formatExclusiveMinimum](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md#formatmaximum--formatminimum-and-exclusiveformatmaximum--exclusiveformatminimum-proposed) - setting limits for date, time, etc. -See [JSON-Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details. +See [JSON Schema validation keywords](https://github.com/epoberezkin/ajv/blob/master/KEYWORDS.md) for more details. ## Formats @@ -214,8 +218,10 @@ The following formats are supported for string validation with "format" keyword: - _time_: time with optional time-zone. - _date-time_: date-time from the same source (time-zone is mandatory). `date`, `time` and `date-time` validate ranges in `full` mode and only regexp in `fast` mode (see [options](#options)). - _uri_: full uri with optional protocol. +- _url_: [URL record](https://url.spec.whatwg.org/#concept-url). +- _uri-template_: URI template according to [RFC6570](https://tools.ietf.org/html/rfc6570) - _email_: email address. -- _hostname_: host name acording to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). +- _hostname_: host name according to [RFC1034](http://tools.ietf.org/html/rfc1034#section-3.5). - _ipv4_: IP address v4. - _ipv6_: IP address v6. - _regex_: tests whether a string is a valid regular expression by passing it to RegExp constructor. @@ -227,16 +233,68 @@ There are two modes of format validation: `fast` and `full`. This mode affects f You can add additional formats and replace any of the formats above using [addFormat](#api-addformat) method. -The option `unknownFormats` allows to change the behaviour in case an unknown format is encountered - Ajv can either ignore them (default now) or fail schema compilation (will be the default in 5.0.0). +The option `unknownFormats` allows to change the behaviour in case an unknown format is encountered - Ajv can either fail schema compilation (default) or ignore it (default in versions before 5.0.0). You also can whitelist specific format(s) to be ignored. See [Options](#options) for details. You can find patterns used for format validation and the sources that were used in [formats.js](https://github.com/epoberezkin/ajv/blob/master/lib/compile/formats.js). +## Combining schemas with $ref + +You can structure your validation logic across multiple schema files and have schemas reference each other using `$ref` keyword. + +Example: + +```javascript +var schema = { + "$id": "http://example.com/schemas/schema.json", + "type": "object", + "properties": { + "foo": { "$ref": "defs.json#/definitions/int" }, + "bar": { "$ref": "defs.json#/definitions/str" } + } +}; + +var defsSchema = { + "$id": "http://example.com/schemas/defs.json", + "definitions": { + "int": { "type": "integer" }, + "str": { "type": "string" } + } +}; +``` + +Now to compile your schema you can either pass all schemas to Ajv instance: + +``` +var ajv = new Ajv({schemas: [schema, defsSchema]}); +var validate = ajv.getSchema('http://example.com/schemas/schema.json'); +``` + +or use `addSchema` method: + +``` +var ajv = new Ajv; +ajv.addSchema(defsSchema); +var validate = ajv.compile(schema); +``` + +See [Options](#options) and [addSchema](#api) method. + +__Please note__: +- `$ref` is resolved as the uri-reference using schema $id as the base URI (see the example). +- References can be recursive (and mutually recursive) to implement the schemas for different data structures (such as linked lists, trees, graphs, etc.). +- You don't have to host your schema files at the URIs that you use as schema $id. These URIs are only used to identify the schemas, and according to JSON Schema specification validators should not expect to be able to download the schemas from these URIs. +- The actual location of the schema file in the file system is not used. +- You can pass the identifier of the schema as the second parameter of `addSchema` method or as a property name in `schemas` option. This identifier can be used instead of (or in addition to) schema $id. +- You cannot have the same $id (or the schema identifier) used for more than one schema - the exception will be thrown. +- You can implement dynamic resolution of the referenced schemas using `compileAsync` method. In this way you can store schemas in any system (files, web, database, etc.) and reference them without explicitely adding to Ajv instance. See [Asynchronous schema compilation](#asynchronous-schema-compilation). + + ## $data reference -With `v5` option you can use values from the validated data as the values for the schema keywords. See [v5 proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works. +With `$data` option you can use values from the validated data as the values for the schema keywords. See [proposal](https://github.com/json-schema/json-schema/wiki/$data-(v5-proposal)) for more information about how it works. -`$data` reference is supported in the keywords: constant, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. +`$data` reference is supported in the keywords: const, enum, format, maximum/minimum, exclusiveMaximum / exclusiveMinimum, maxLength / minLength, maxItems / minItems, maxProperties / minProperties, formatMaximum / formatMinimum, formatExclusiveMaximum / formatExclusiveMinimum, multipleOf, pattern, required, uniqueItems. The value of "$data" should be a [JSON-pointer](https://tools.ietf.org/html/rfc6901) to the data (the root is always the top level data object, even if the $data reference is inside a referenced subschema) or a [relative JSON-pointer](http://tools.ietf.org/html/draft-luff-relative-json-pointer-00) (it is relative to the current point in data; if the $data reference is inside a referenced subschema it cannot point to the data outside of the root level for this subschema). @@ -245,6 +303,8 @@ Examples. This schema requires that the value in property `smaller` is less or equal than the value in the property larger: ```javascript +var ajv = new Ajv({$data: true}); + var schema = { "properties": { "smaller": { @@ -259,6 +319,8 @@ var validData = { smaller: 5, larger: 7 }; + +ajv.validate(schema, validData); // true ``` This schema requires that the properties have the same format as their field names: @@ -277,12 +339,12 @@ var validData = { } ``` -`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `constant` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails. +`$data` reference is resolved safely - it won't throw even if some property is undefined. If `$data` resolves to `undefined` the validation succeeds (with the exclusion of `const` keyword). If `$data` resolves to incorrect type (e.g. not "number" for maximum keyword) the validation fails. ## $merge and $patch keywords -With v5 option and the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON-schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). +With the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) you can use the keywords `$merge` and `$patch` that allow extending JSON-schemas with patches using formats [JSON Merge Patch (RFC 7396)](https://tools.ietf.org/html/rfc7396) and [JSON Patch (RFC 6902)](https://tools.ietf.org/html/rfc6902). To add keywords `$merge` and `$patch` to Ajv instance use this code: @@ -348,7 +410,7 @@ See the package [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch The advantages of using custom keywords are: -- allow creating validation scenarios that cannot be expressed using JSON-Schema +- allow creating validation scenarios that cannot be expressed using JSON Schema - simplify your schemas - help bringing a bigger part of the validation logic to your schemas - make your schemas more expressive, less verbose and closer to your application domain @@ -391,27 +453,26 @@ Several custom keywords (typeof, instanceof, range and propertyNames) are define See [Defining custom keywords](https://github.com/epoberezkin/ajv/blob/master/CUSTOM.md) for more details. -## Asynchronous compilation +## Asynchronous schema compilation -During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` method and `loadSchema` [option](#options). +During asynchronous compilation remote references are loaded using supplied function. See `compileAsync` [method](#api-compileAsync) and `loadSchema` [option](#options). Example: ```javascript var ajv = new Ajv({ loadSchema: loadSchema }); -ajv.compileAsync(schema, function (err, validate) { - if (err) return; - var valid = validate(data); +ajv.compileAsync(schema).then(function (validate) { + var valid = validate(data); + // ... }); -function loadSchema(uri, callback) { - request.json(uri, function(err, res, body) { - if (err || res.statusCode >= 400) - callback(err || new Error('Loading error: ' + res.statusCode)); - else - callback(null, body); - }); +function loadSchema(uri) { + return request.json(uri).then(function (res) { + if (res.statusCode >= 400) + throw new Error('Loading error: ' + res.statusCode); + return res.body; + }); } ``` @@ -428,29 +489,39 @@ If your schema uses asynchronous formats/keywords or refers to some schema that __Please note__: all asynchronous subschemas that are referenced from the current or other schemas should have `"$async": true` keyword as well, otherwise the schema compilation will fail. -Validation function for an asynchronous custom format/keyword should return a promise that resolves to `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). Ajv compiles asynchronous schemas to either [generator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) (default) that can be optionally transpiled with [regenerator](https://github.com/facebook/regenerator) or to [es7 async function](http://tc39.github.io/ecmascript-asyncawait/) that can be transpiled with [nodent](https://github.com/MatAtBread/nodent) or with regenerator as well. You can also supply any other transpiler as a function. See [Options](#options). +Validation function for an asynchronous custom format/keyword should return a promise that resolves with `true` or `false` (or rejects with `new Ajv.ValidationError(errors)` if you want to return custom errors from the keyword function). Ajv compiles asynchronous schemas to either [es7 async functions](http://tc39.github.io/ecmascript-asyncawait/) that can optionally be transpiled with [nodent](https://github.com/MatAtBread/nodent) or with [regenerator](https://github.com/facebook/regenerator) or to [generator functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*) that can be optionally transpiled with regenerator as well. You can also supply any other transpiler as a function. See [Options](#options). The compiled validation function has `$async: true` property (if the schema is asynchronous), so you can differentiate these functions if you are using both syncronous and asynchronous schemas. If you are using generators, the compiled validation function can be either wrapped with [co](https://github.com/tj/co) (default) or returned as generator function, that can be used directly, e.g. in [koa](http://koajs.com/) 1.0. `co` is a small library, it is included in Ajv (both as npm dependency and in the browser bundle). -Generator functions are currently supported in Chrome, Firefox and node.js (0.11+); if you are using Ajv in other browsers or in older versions of node.js you should use one of available transpiling options. All provided async modes use global Promise class. If your platform does not have Promise you should use a polyfill that defines it. +Async functions are currently supported in Chrome 55, Firefox 52, Node 7 (with --harmony-async-await) and MS Edge 13 (with flag). + +Generator functions are currently supported in Chrome, Firefox and node.js. -Validation result will be a promise that resolves to `true` or rejects with an exception `Ajv.ValidationError` that has the array of validation errors in `errors` property. +If you are using Ajv in other browsers or in older versions of node.js you should use one of available transpiling options. All provided async modes use global Promise class. If your platform does not have Promise you should use a polyfill that defines it. + +Validation result will be a promise that resolves with validated data or rejects with an exception `Ajv.ValidationError` that has the array of validation errors in `errors` property. Example: ```javascript /** - * without "async" and "transpile" options (or with option {async: true}) + * Default mode is non-transpiled generator function wrapped with `co`. + * Using package ajv-async (https://github.com/epoberezkin/ajv-async) + * you can auto-detect the best async mode. + * In this case, without "async" and "transpile" options + * (or with option {async: true}) * Ajv will choose the first supported/installed option in this order: - * 1. native generator function wrapped with co - * 2. es7 async functions transpiled with nodent - * 3. es7 async functions transpiled with regenerator + * 1. native async function + * 2. native generator function wrapped with co + * 3. es7 async functions transpiled with nodent + * 4. es7 async functions transpiled with regenerator */ -var ajv = new Ajv; +var setupAsync = require('ajv-async'); +var ajv = setupAsync(new Ajv); ajv.addKeyword('idExists', { async: true, @@ -484,10 +555,9 @@ var schema = { var validate = ajv.compile(schema); -validate({ userId: 1, postId: 19 })) -.then(function (valid) { - // "valid" is always true here - console.log('Data is valid'); +validate({ userId: 1, postId: 19 }) +.then(function (data) { + console.log('Data is valid', data); // { userId: 1, postId: 19 } }) .catch(function (err) { if (!(err instanceof Ajv.ValidationError)) throw err; @@ -507,7 +577,9 @@ Ajv npm package includes minified browser bundles of regenerator and nodent in d #### Using nodent ```javascript +var setupAsync = require('ajv-async'); var ajv = new Ajv({ /* async: 'es7', */ transpile: 'nodent' }); +setupAsync(ajv); var validate = ajv.compile(schema); // transpiled es7 async function validate(data).then(successFunc).catch(errorFunc); ``` @@ -518,7 +590,9 @@ validate(data).then(successFunc).catch(errorFunc); #### Using regenerator ```javascript +var setupAsync = require('ajv-async'); var ajv = new Ajv({ /* async: 'es7', */ transpile: 'regenerator' }); +setupAsync(ajv); var validate = ajv.compile(schema); // transpiled es7 async function validate(data).then(successFunc).catch(errorFunc); ``` @@ -529,7 +603,7 @@ validate(data).then(successFunc).catch(errorFunc); #### Using other transpilers ```javascript -var ajv = new Ajv({ async: 'es7', transpile: transpileFunc }); +var ajv = new Ajv({ async: 'es7', processCode: transpileFunc }); var validate = ajv.compile(schema); // transpiled es7 async function validate(data).then(successFunc).catch(errorFunc); ``` @@ -541,12 +615,13 @@ See [Options](#options). |mode|transpile
                speed*|run-time
                speed*|bundle
                size| |---|:-:|:-:|:-:| +|es7 async
                (native)|-|0.75|-| |generators
                (native)|-|1.0|-| -|es7.nodent|1.35|1.1|183Kb| -|es7.regenerator|1.0|2.7|322Kb| -|regenerator|1.0|3.2|322Kb| +|es7.nodent|1.35|1.1|215Kb| +|es7.regenerator|1.0|2.7|1109Kb| +|regenerator|1.0|3.2|1109Kb| -\* Relative performance in node v.4, smaller is better. +\* Relative performance in node v.7, smaller is better. [nodent](https://github.com/MatAtBread/nodent) has several advantages: @@ -555,8 +630,6 @@ See [Options](#options). - much better performace than native generators in other browsers - works in IE 9 (regenerator does not) -[regenerator](https://github.com/facebook/regenerator) is a more widely adopted alternative. - ## Filtering data @@ -731,7 +804,7 @@ console.log(data2); // { foo: { bar: 2 } } - not in `properties` or `items` subschemas - in schemas inside `anyOf`, `oneOf` and `not` (see [#42](https://github.com/epoberezkin/ajv/issues/42)) -- in `if` subschema of v5 `switch` keyword +- in `if` subschema of `switch` keyword - in schemas generated by custom macro keywords @@ -795,8 +868,6 @@ See [Coercion rules](https://github.com/epoberezkin/ajv/blob/master/COERCION.md) Create Ajv instance. -All the instance methods below are bound to the instance, so they can be used without the instance. - ##### .compile(Object schema) -> Function<Object data> @@ -807,17 +878,19 @@ Validating function returns boolean and has properties `errors` with the errors Unless the option `validateSchema` is false, the schema will be validated against meta-schema and if schema is invalid the error will be thrown. See [options](#options). -##### .compileAsync(Object schema, Function callback) +##### .compileAsync(Object schema [, Boolean meta] [, Function callback]) -> Promise -Asyncronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. Callback will always be called with 2 parameters: error (or null) and validating function. Error will be not null in the following cases: +Asyncronous version of `compile` method that loads missing remote schemas using asynchronous function in `options.loadSchema`. This function returns a Promise that resolves to a validation function. An optional callback passed to `compileAsync` will be called with 2 parameters: error (or null) and validating function. The returned promise will reject (and callback if passed will be called with an error) when: -- missing schema can't be loaded (`loadSchema` calls callback with error). +- missing schema can't be loaded (`loadSchema` returns the Promise that rejects). - the schema containing missing reference is loaded, but the reference cannot be resolved. - schema (or some referenced schema) is invalid. -The function compiles schema and loads the first missing schema multiple times, until all missing schemas are loaded. +The function compiles schema and loads the first missing schema (or meta-schema), until all missing schemas are loaded. + +You can asynchronously compile meta-schema by passing `true` as the second parameter. -See example in [Asynchronous compilation](#asynchronous-compilation). +See example in [Asynchronous compilation](#asynchronous-schema-compilation). ##### .validate(Object schema|String key|String ref, data) -> Boolean @@ -853,18 +926,16 @@ By default the schema is validated against meta-schema before it is added, and i Adds meta schema(s) that can be used to validate other schemas. That function should be used instead of `addSchema` because there may be instance options that would compile a meta schema incorrectly (at the moment it is `removeAdditional` option). -There is no need to explicitly add draft 4 meta schema (http://json-schema.org/draft-04/schema and http://json-schema.org/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`. - -With option `v5: true` [meta-schema that includes v5 keywords](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json) also added. +There is no need to explicitly add draft 6 meta schema (http://json-schema.org/draft-06/schema and http://json-schema.org/schema) - it is added by default, unless option `meta` is set to `false`. You only need to use it if you have a changed meta-schema that you want to use to validate your schemas. See `validateSchema`. ##### .validateSchema(Object schema) -> Boolean -Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON-Schema standard. +Validates schema. This method should be used to validate schemas rather than `validate` due to the inconsistency of `uri` format in JSON Schema standard. By default this method is called automatically when the schema is added, so you rarely need to use it directly. -If schema doesn't have `$schema` property it is validated against draft 4 meta-schema (option `meta` should not be false) or against [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#) if option `v5` is true. +If schema doesn't have `$schema` property it is validated against draft 6 meta-schema (option `meta` should not be false). If schema has `$schema` property then the schema with this id (that should be previously added) is used to validate passed schema. @@ -891,7 +962,7 @@ If no parameter is passed all schemas but meta-schemas will be removed and the c ##### .addFormat(String name, String|RegExp|Function|Object format) -Add custom format to validate strings. It can also be used to replace pre-defined formats for Ajv instance. +Add custom format to validate strings or numbers. It can also be used to replace pre-defined formats for Ajv instance. Strings are converted to RegExp. @@ -900,8 +971,9 @@ Function should return validation result as `true` or `false`. If object is passed it should have properties `validate`, `compare` and `async`: - _validate_: a string, RegExp or a function as described above. -- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (from [v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals) - `v5` option should be used). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. +- _compare_: an optional comparison function that accepts two strings and compares them according to the format meaning. This function is used with keywords `formatMaximum`/`formatMinimum` (defined in [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) package). It should return `1` if the first value is bigger than the second value, `-1` if it is smaller and `0` if it is equal. - _async_: an optional `true` value if `validate` is an asynchronous function; in this case it should return a promise that resolves with a value `true` or `false`. +- _type_: an optional type of data that the format applies to. It can be `"string"` (default) or `"number"` (see https://github.com/epoberezkin/ajv/issues/291#issuecomment-259923858). If the type of data is different, the validation will pass. Custom formats can be also added via `formats` option. @@ -970,7 +1042,7 @@ Defaults: ```javascript { // validation and reporting options: - v5: false, + $data: false, allErrors: false, verbose: false, jsonPointers: false, @@ -978,19 +1050,20 @@ Defaults: unicode: true, format: 'fast', formats: {}, - unknownFormats: 'ignore', + unknownFormats: true, schemas: {}, // referenced schema options: + schemaId: undefined // recommended '$id' missingRefs: true, - extendRefs: true, - loadSchema: undefined, // function(uri, cb) { /* ... */ cb(err, schema); }, + extendRefs: 'ignore', // recommended 'fail' + loadSchema: undefined, // function(uri: string): Promise {} // options to modify validated data: removeAdditional: false, useDefaults: false, coerceTypes: false, // asynchronous validation options: - async: undefined, - transpile: undefined, + async: 'co*', + transpile: undefined, // requires ajv-async package // advanced options: meta: true, validateSchema: true, @@ -1001,16 +1074,17 @@ Defaults: ownProperties: false, multipleOfPrecision: false, errorDataPath: 'object', - sourceCode: true, messages: true, - beautify: false, - cache: new Cache + sourceCode: false, + processCode: undefined, // function (str: string): string {} + cache: new Cache, + serialize: undefined } ``` ##### Validation and reporting options -- _v5_: add keywords `switch`, `constant`, `contains`, `patternGroups`, `patternRequired`, `formatMaximum` / `formatMinimum` and `formatExclusiveMaximum` / `formatExclusiveMinimum` from [JSON-schema v5 proposals](https://github.com/json-schema/json-schema/wiki/v5-Proposals). With this option added schemas without `$schema` property are validated against [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#). `false` by default. +- _$data_: support [$data references](#data-reference). Draft 6 meta-schema that is added by default will be extended to allow them. If you want to use another meta-schema you need to use $dataMetaSchema method to add support for $data reference. See [API](#api). - _allErrors_: check all rules collecting all errors. Default is to return after the first error. - _verbose_: include the reference to the part of the schema (`schema` and `parentSchema`) and validated data in errors (false by default). - _jsonPointers_: set `dataPath` propery of errors using [JSON Pointers](https://tools.ietf.org/html/rfc6901) instead of JavaScript property access notation. @@ -1019,23 +1093,27 @@ Defaults: - _format_: formats validation mode ('fast' by default). Pass 'full' for more correct and slow validation or `false` not to validate formats at all. E.g., 25:00:00 and 2015/14/33 will be invalid time and date in 'full' mode but it will be valid in 'fast' mode. - _formats_: an object with custom formats. Keys and values will be passed to `addFormat` method. - _unknownFormats_: handling of unknown formats. Option values: - - `true` (will be default in 5.0.0) - if the unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [v5 $data reference](#data-reference) and it is unknown the validation will fail. - - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if some other unknown format is used. If `format` keyword value is [v5 $data reference](#data-reference) and it is not in this array the validation will fail. - - `"ignore"` (default now) - to log warning during schema compilation and always pass validation. This option is not recommended, as it allows to mistype format name. This behaviour is required by JSON-schema specification. -- _schemas_: an array or object of schemas that will be added to the instance. If the order is important, pass array. In this case schemas must have IDs in them. Otherwise the object can be passed - `addSchema(value, key)` will be called for each schema in this object. + - `true` (default) - if an unknown format is encountered the exception is thrown during schema compilation. If `format` keyword value is [$data reference](#data-reference) and it is unknown the validation will fail. + - `[String]` - an array of unknown format names that will be ignored. This option can be used to allow usage of third party schemas with format(s) for which you don't have definitions, but still fail if another unknown format is used. If `format` keyword value is [$data reference](#data-reference) and it is not in this array the validation will fail. + - `"ignore"` - to log warning during schema compilation and always pass validation (the default behaviour in versions before 5.0.0). This option is not recommended, as it allows to mistype format name and it won't be validated without any error message. This behaviour is required by JSON-schema specification. +- _schemas_: an array or object of schemas that will be added to the instance. In case you pass the array the schemas must have IDs in them. When the object is passed the method `addSchema(value, key)` will be called for each schema in this object. ##### Referenced schema options +- _schemaId_: this option defines which keywords are used as schema URI. Option value: + - `"$id"` (recommended) - only use `$id` keyword as schema URI (as specified in JSON Schema draft-06), ignore `id` keyword (if it is present a warning will be logged). + - `"id"` - only use `id` keyword as schema URI (as specified in JSON Schema draft-04), ignore `$id` keyword (if it is present a warning will be logged). + - `undefined` (default) - use both `$id` and `id` keywords as schema URI. If both are present (in the same schema object) and different the exception will be thrown during schema compilation. - _missingRefs_: handling of missing referenced schemas. Option values: - `true` (default) - if the reference cannot be resolved during compilation the exception is thrown. The thrown error has properties `missingRef` (with hash fragment) and `missingSchema` (without it). Both properties are resolved relative to the current base id (usually schema id, unless it was substituted). - `"ignore"` - to log error during compilation and always pass validation. - `"fail"` - to log error and successfully compile schema but fail validation if this rule is checked. - _extendRefs_: validation of other keywords when `$ref` is present in the schema. Option values: - - `true` (default) - validate all keywords in the schemas with `$ref`. - - `"ignore"` - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation. - - `"fail"` - if other validation keywords are used together with `$ref` the exception will be throw when the schema is compiled. -- _loadSchema_: asynchronous function that will be used to load remote schemas when the method `compileAsync` is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept 2 parameters: remote schema uri and node-style callback. See example in [Asynchronous compilation](#asynchronous-compilation). + - `"ignore"` (default) - when `$ref` is used other keywords are ignored (as per [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03#section-3) standard). A warning will be logged during the schema compilation. + - `"fail"` (recommended) - if other validation keywords are used together with `$ref` the exception will be thrown when the schema is compiled. This option is recomended to make sure schema has no keywords that are ignored, which can be confusing. + - `true` - validate all keywords in the schemas with `$ref` (the default behaviour in versions before 5.0.0). +- _loadSchema_: asynchronous function that will be used to load remote schemas when `compileAsync` [method](#api-compileAsync) is used and some reference is missing (option `missingRefs` should NOT be 'fail' or 'ignore'). This function should accept remote schema uri as a parameter and return a Promise that resolves to a schema. See example in [Asynchronous compilation](#asynchronous-schema-compilation). ##### Options to modify validated data @@ -1058,42 +1136,54 @@ Defaults: ##### Asynchronous validation options - _async_: determines how Ajv compiles asynchronous schemas (see [Asynchronous validation](#asynchronous-validation)) to functions. Option values: - - `"*"` / `"co*"` - compile to generator function ("co*" - wrapped with `co.wrap`). If generators are not supported and you don't provide `transpile` option, the exception will be thrown when Ajv instance is created. - - `"es7"` - compile to es7 async function. Unless your platform supports them you need to provide `transpile` option. Currently only MS Edge 13 with flag supports es7 async functions according to [compatibility table](http://kangax.github.io/compat-table/es7/)). - - `true` - if transpile option is not passed Ajv will choose the first supported/installed async/transpile modes in this order: "co*" (native generator with co.wrap), "es7"/"nodent", "co*"/"regenerator" during the creation of the Ajv instance. If none of the options is available the exception will be thrown. - - `undefined`- Ajv will choose the first available async mode in the same way as with `true` option but when the first asynchronous schema is compiled. -- _transpile_: determines whether Ajv transpiles compiled asynchronous validation function. Option values: + - `"*"` / `"co*"` (default) - compile to generator function ("co*" - wrapped with `co.wrap`). If generators are not supported and you don't provide `processCode` option (or `transpile` option if you use [ajv-async](https://github.com/epoberezkin/ajv-async) package), the exception will be thrown when async schema is compiled. + - `"es7"` - compile to es7 async function. Unless your platform supports them you need to provide `processCode`/`transpile` option. According to [compatibility table](http://kangax.github.io/compat-table/es7/)) async functions are supported by: + - Firefox 52, + - Chrome 55, + - Node.js 7 (with `--harmony-async-await`), + - MS Edge 13 (with flag). + - `undefined`/`true` - auto-detect async mode. It requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. If transpile option is not passed ajv-async will choose the first of supported/installed async/transpile modes in this order: + - "es7" (native async functions), + - "co*" (native generators with co.wrap), + - "es7"/"nodent", + - "co*"/"regenerator" during the creation of the Ajv instance. + + If none of the options is available the exception will be thrown. +- _transpile_: Requires [ajv-async](https://github.com/epoberezkin/ajv-async) package. It determines whether Ajv transpiles compiled asynchronous validation function. Option values: - `"nodent"` - transpile with [nodent](https://github.com/MatAtBread/nodent). If nodent is not installed, the exception will be thrown. nodent can only transpile es7 async functions; it will enforce this mode. - `"regenerator"` - transpile with [regenerator](https://github.com/facebook/regenerator). If regenerator is not installed, the exception will be thrown. - - a function - this function should accept the code of validation function as a string and return transpiled code. This option allows you to use any other transpiler you prefer. + - a function - this function should accept the code of validation function as a string and return transpiled code. This option allows you to use any other transpiler you prefer. If you are passing a function, you can simply pass it to `processCode` option without using ajv-async. ##### Advanced options -- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). With option `v5: true` [v5 meta-schema](https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#) will be added as well. If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword. +- _meta_: add [meta-schema](http://json-schema.org/documentation.html) so it can be used by other schemas (true by default). If an object is passed, it will be used as the default meta-schema for schemas that have no `$schema` keyword. This default meta-schema MUST have `$schema` keyword. - _validateSchema_: validate added/compiled schemas against meta-schema (true by default). `$schema` property in the schema can either be http://json-schema.org/schema or http://json-schema.org/draft-04/schema or absent (draft-4 meta-schema will be used) or can be a reference to the schema previously added with `addMetaSchema` method. Option values: - `true` (default) - if the validation fails, throw the exception. - `"log"` - if the validation fails, log error. - `false` - skip schema validation. -- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `id` property that doesn't start with "#". If `id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `id` uniqueness check when these methods are used. This option does not affect `addSchema` method. +- _addUsedSchema_: by default methods `compile` and `validate` add schemas to the instance if they have `$id` (or `id`) property that doesn't start with "#". If `$id` is present and it is not unique the exception will be thrown. Set this option to `false` to skip adding schemas to the instance and the `$id` uniqueness check when these methods are used. This option does not affect `addSchema` method. - _inlineRefs_: Affects compilation of referenced schemas. Option values: - `true` (default) - the referenced schemas that don't have refs in them are inlined, regardless of their size - that substantially improves performance at the cost of the bigger size of compiled schema functions. - `false` - to not inline referenced schemas (they will be compiled as separate functions). - integer number - to limit the maximum number of keywords of the schema that will be inlined. - _passContext_: pass validation context to custom keyword functions. If this option is `true` and you pass some context to the compiled validation function with `validate.call(context, data)`, the `context` will be available as `this` in your custom keywords. By default `this` is Ajv instance. - _loopRequired_: by default `required` keyword is compiled into a single expression (or a sequence of statements in `allErrors` mode). In case of a very large number of properties in this keyword it may result in a very big validation function. Pass integer to set the number of properties above which `required` keyword will be validated in a loop - smaller validation function size but also worse performance. -- _ownProperties_: by default ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. +- _ownProperties_: by default Ajv iterates over all enumerable object properties; when this option is `true` only own enumerable object properties (i.e. found directly on the object rather than on its prototype) are iterated. Contributed by @mbroadst. - _multipleOfPrecision_: by default `multipleOf` keyword is validated by comparing the result of division with parseInt() of that result. It works for dividers that are bigger than 1. For small dividers such as 0.01 the result of the division is usually not integer (even when it should be integer, see issue [#84](https://github.com/epoberezkin/ajv/issues/84)). If you need to use fractional dividers set this option to some positive integer N to have `multipleOf` validated using this formula: `Math.abs(Math.round(division) - division) < 1e-N` (it is slower but allows for float arithmetics deviations). - _errorDataPath_: set `dataPath` to point to 'object' (default) or to 'property' when validating keywords `required`, `additionalProperties` and `dependencies`. -- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). - _messages_: Include human-readable messages in errors. `true` by default. `false` can be passed when custom messages are used (e.g. with [ajv-i18n](https://github.com/epoberezkin/ajv-i18n)). -- _beautify_: format the generated function with [js-beautify](https://github.com/beautify-web/js-beautify) (the validating function is generated without line-breaks). `npm install js-beautify` to use this option. `true` or js-beautify options can be passed. +- _sourceCode_: add `sourceCode` property to validating function (for debugging; this code can be different from the result of toString call). +- _processCode_: an optional function to process generated code before it is passed to Function constructor. It can be used to either beautify (the validating function is generated without line-breaks) or to transpile code. Starting from version 5.0.0 this option replaced options: + - `beautify` that formatted the generated function using [js-beautify](https://github.com/beautify-web/js-beautify). If you want to beautify the generated code pass `require('js-beautify').js_beautify`. + - `transpile` that transpiled asynchronous validation function. You can still use `transpile` option with [ajv-async](https://github.com/epoberezkin/ajv-async) package. See [Asynchronous validation](#asynchronous-validation) for more information. - _cache_: an optional instance of cache to store compiled schemas using stable-stringified schema as a key. For example, set-associative cache [sacjs](https://github.com/epoberezkin/sacjs) can be used. If not passed then a simple hash is used which is good enough for the common use case (a limited number of statically defined schemas). Cache should have methods `put(key, value)`, `get(key)`, `del(key)` and `clear()`. +- _serialize_: an optional function to serialize schema to cache key. Pass `false` to use schema itself as a key (e.g., if WeakMap used as a cache). By default [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used. ## Validation errors -In case of validation failure Ajv assigns the array of errors to `.errors` property of validation function (or to `.errors` property of Ajv instance in case `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation) the returned promise is rejected with the exception of the class `Ajv.ValidationError` that has `.errors` poperty. +In case of validation failure Ajv assigns the array of errors to `.errors` property of validation function (or to `.errors` property of Ajv instance in case `validate` or `validateSchema` methods were called). In case of [asynchronous validation](#asynchronous-validation) the returned promise is rejected with the exception of the class `Ajv.ValidationError` that has `.errors` property. ### Error objects @@ -1109,6 +1199,8 @@ Each error is an object with the following properties: - _parentSchema_: the schema containing the keyword (added with `verbose` option) - _data_: the data validated by the keyword (added with `verbose` option). +__Please note__: `propertyNames` keyword schema validation errors have an additional property `propertyName`, `dataPath` points to the object. After schema validation for each property name, if it is invalid an additional error is added with the property `keyword` equal to `"propertyNames"`. + ### Error parameters @@ -1117,10 +1209,6 @@ Properties of `params` object in errors depend on the keyword that failed valida - `maxItems`, `minItems`, `maxLength`, `minLength`, `maxProperties`, `minProperties` - property `limit` (number, the schema of the keyword). - `additionalItems` - property `limit` (the maximum number of allowed items in case when `items` keyword is an array of schemas and `additionalItems` is false). - `additionalProperties` - property `additionalProperty` (the property not used in `properties` and `patternProperties` keywords). -- `patternGroups` (with v5 option) - properties: - - `pattern` - - `reason` ("minimum"/"maximum"), - - `limit` (max/min allowed number of properties matching number) - `dependencies` - properties: - `property` (dependent property), - `missingProperty` (required missing dependency - only the first one is reported currently) @@ -1134,7 +1222,8 @@ Properties of `params` object in errors depend on the keyword that failed valida - `multipleOf` - property `multipleOf` (the schema of the keyword) - `pattern` - property `pattern` (the schema of the keyword) - `required` - property `missingProperty` (required property that is missing). -- `patternRequired` (with v5 option) - property `missingPattern` (required pattern that did not match any property). +- `propertyNames` - property `propertyName` (an invalid property name). +- `patternRequired` (in ajv-keywords) - property `missingPattern` (required pattern that did not match any property). - `type` - property `type` (required type(s), a string, can be a comma-separated list) - `uniqueItems` - properties `i` and `j` (indices of duplicate items). - `enum` - property `allowedValues` pointing to the array of values (the schema of the keyword). @@ -1146,8 +1235,9 @@ Properties of `params` object in errors depend on the keyword that failed valida - [ajv-cli](https://github.com/epoberezkin/ajv-cli) - command line interface for Ajv - [ajv-i18n](https://github.com/epoberezkin/ajv-i18n) - internationalised error messages -- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch from v5 proposals. +- [ajv-merge-patch](https://github.com/epoberezkin/ajv-merge-patch) - keywords $merge and $patch. - [ajv-keywords](https://github.com/epoberezkin/ajv-keywords) - several custom keywords that can be used with Ajv (typeof, instanceof, range, propertyNames) +- [ajv-errors](https://github.com/epoberezkin/ajv-errors) - custom error messages for Ajv ## Some packages using Ajv @@ -1167,7 +1257,7 @@ Properties of `params` object in errors depend on the keyword that failed valida - [rabbitmq-schema](https://github.com/tjmehta/rabbitmq-schema) - a schema definition module for RabbitMQ graphs and messages - [@query/schema](https://www.npmjs.com/package/@query/schema) - stream filtering with a URI-safe query syntax parsing to JSON Schema - [chai-ajv-json-schema](https://github.com/peon374/chai-ajv-json-schema) - chai plugin to us JSON-schema with expect in mocha tests -- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON-Schema +- [grunt-jsonschema-ajv](https://github.com/SignpostMarv/grunt-jsonschema-ajv) - Grunt plugin for validating files against JSON Schema - [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) - extract text from bundle into a file - [electron-builder](https://github.com/electron-userland/electron-builder) - a solution to package and build a ready for distribution Electron app - [addons-linter](https://github.com/mozilla/addons-linter) - Mozilla Add-ons Linter @@ -1197,7 +1287,7 @@ Please see [Contributing guidelines](https://github.com/epoberezkin/ajv/blob/mas See https://github.com/epoberezkin/ajv/releases -__Please note__: [Changes in version 5.0.1-beta](https://github.com/epoberezkin/ajv/releases/tag/5.0.1-beta.0). +__Please note__: [Changes in version 5.0.0](https://github.com/epoberezkin/ajv/releases/tag/5.0.0). [Changes in version 4.6.0](https://github.com/epoberezkin/ajv/releases/tag/4.6.0). diff --git a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js index 387d272a42..2329e81c39 100644 --- a/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js +++ b/deps/npm/node_modules/request/node_modules/har-validator/node_modules/ajv/dist/ajv.bundle.js @@ -1,224 +1,55 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Ajv = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i; +// For the source: https://gist.github.com/dperini/729294 +// For test cases: https://mathiasbynens.be/demo/url-regex +// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983. +// var URL = /^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)(?:\.(?:[a-z\u{00a1}-\u{ffff}0-9]+-?)*[a-z\u{00a1}-\u{ffff}0-9]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu; +var URL = /^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i; +var UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +var JSON_POINTER = /^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i; +var RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/; module.exports = formats; function formats(mode) { mode = mode == 'full' ? 'full' : 'fast'; - var formatDefs = util.copy(formats[mode]); - for (var fName in formats.compare) { - formatDefs[fName] = { - validate: formatDefs[fName], - compare: formats.compare[fName] - }; - } - return formatDefs; + return util.copy(formats[mode]); } @@ -360,11 +276,14 @@ formats.fast = { time: /^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i, 'date-time': /^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i, // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js - uri: /^(?:[a-z][a-z0-9+-.]*)?(?:\:|\/)\/?[^\s]*$/i, + uri: /^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i, + 'uri-reference': /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i, + 'uri-template': URITEMPLATE, + url: URL, // email (sources from jsen validator): // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363 // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation') - email: /^[a-z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, + email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i, hostname: HOSTNAME, // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, @@ -386,7 +305,10 @@ formats.full = { time: time, 'date-time': date_time, uri: uri, - email: /^[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, + 'uri-reference': URIREF, + 'uri-template': URITEMPLATE, + url: URL, + email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i, hostname: hostname, ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/, ipv6: /^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i, @@ -397,13 +319,6 @@ formats.full = { }; -formats.compare = { - date: compareDate, - time: compareTime, - 'date-time': compareDateTime -}; - - function date(str) { // full-date from http://tools.ietf.org/html/rfc3339#section-5.6 var matches = str.match(DATE); @@ -442,14 +357,16 @@ function hostname(str) { } -var NOT_URI_FRAGMENT = /\/|\:/; +var NOT_URI_FRAGMENT = /\/|:/; function uri(str) { // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required "." return NOT_URI_FRAGMENT.test(str) && URI.test(str); } +var Z_ANCHOR = /[^\\]\\Z/; function regex(str) { + if (Z_ANCHOR.test(str)) return false; try { new RegExp(str); return true; @@ -458,54 +375,13 @@ function regex(str) { } } - -function compareDate(d1, d2) { - if (!(d1 && d2)) return; - if (d1 > d2) return 1; - if (d1 < d2) return -1; - if (d1 === d2) return 0; -} - - -function compareTime(t1, t2) { - if (!(t1 && t2)) return; - t1 = t1.match(TIME); - t2 = t2.match(TIME); - if (!(t1 && t2)) return; - t1 = t1[1] + t1[2] + t1[3] + (t1[4]||''); - t2 = t2[1] + t2[2] + t2[3] + (t2[4]||''); - if (t1 > t2) return 1; - if (t1 < t2) return -1; - if (t1 === t2) return 0; -} - - -function compareDateTime(dt1, dt2) { - if (!(dt1 && dt2)) return; - dt1 = dt1.split(DATE_TIME_SEPARATOR); - dt2 = dt2.split(DATE_TIME_SEPARATOR); - var res = compareDate(dt1[0], dt2[0]); - if (res === undefined) return; - return res || compareTime(dt1[1], dt2[1]); -} - -},{"./util":11}],6:[function(require,module,exports){ +},{"./util":12}],7:[function(require,module,exports){ 'use strict'; var resolve = require('./resolve') , util = require('./util') - , stableStringify = require('json-stable-stringify') - , async = require('../async'); - -var beautify; - -function loadBeautify(){ - if (beautify === undefined) { - var name = 'js-beautify'; - try { beautify = require(name).js_beautify; } - catch(e) { beautify = false; } - } -} + , errorClasses = require('./error_classes') + , stableStringify = require('json-stable-stringify'); var validateGenerator = require('../dotjs/validate'); @@ -515,10 +391,10 @@ var validateGenerator = require('../dotjs/validate'); var co = require('co'); var ucs2length = util.ucs2length; -var equal = require('./equal'); +var equal = require('fast-deep-equal'); // this error is thrown by async schemas to return validation errors via exception -var ValidationError = require('./validation_error'); +var ValidationError = errorClasses.Validation; module.exports = compile; @@ -543,8 +419,7 @@ function compile(schema, root, localRefs, baseId) { , patternsHash = {} , defaults = [] , defaultsHash = {} - , customRules = [] - , keepSourceCode = opts.sourceCode !== false; + , customRules = []; root = root || { schema: schema, refVal: refVal, refs: refs }; @@ -566,7 +441,7 @@ function compile(schema, root, localRefs, baseId) { cv.refVal = v.refVal; cv.root = v.root; cv.$async = v.$async; - if (keepSourceCode) cv.sourceCode = v.sourceCode; + if (opts.sourceCode) cv.source = v.source; } return v; } finally { @@ -586,7 +461,6 @@ function compile(schema, root, localRefs, baseId) { return compile.call(self, _schema, _root, localRefs, baseId); var $async = _schema.$async === true; - if ($async && !opts.transpile) async.setup(opts); var sourceCode = validateGenerator({ isTop: true, @@ -597,6 +471,7 @@ function compile(schema, root, localRefs, baseId) { schemaPath: '', errSchemaPath: '#', errorPath: '""', + MissingRefError: errorClasses.MissingRef, RULES: RULES, validate: validateGenerator, util: util, @@ -614,20 +489,10 @@ function compile(schema, root, localRefs, baseId) { + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + sourceCode; - if (opts.beautify) { - loadBeautify(); - /* istanbul ignore else */ - if (beautify) sourceCode = beautify(sourceCode, opts.beautify); - else console.error('"npm install js-beautify" to use beautify option'); - } - // console.log('\n\n\n *** \n', sourceCode); - var validate, validateCode - , transpile = opts._transpileFunc; + if (opts.processCode) sourceCode = opts.processCode(sourceCode); + // console.log('\n\n\n *** \n', JSON.stringify(sourceCode)); + var validate; try { - validateCode = $async && transpile - ? transpile(sourceCode) - : sourceCode; - var makeValidate = new Function( 'self', 'RULES', @@ -640,7 +505,7 @@ function compile(schema, root, localRefs, baseId) { 'equal', 'ucs2length', 'ValidationError', - validateCode + sourceCode ); validate = makeValidate( @@ -659,7 +524,7 @@ function compile(schema, root, localRefs, baseId) { refVal[0] = validate; } catch(e) { - console.error('Error compiling schema, function code:', validateCode); + console.error('Error compiling schema, function code:', sourceCode); throw e; } @@ -669,9 +534,9 @@ function compile(schema, root, localRefs, baseId) { validate.refVal = refVal; validate.root = isRoot ? validate : _root; if ($async) validate.$async = true; - if (keepSourceCode) validate.sourceCode = sourceCode; if (opts.sourceCode === true) { validate.source = { + code: sourceCode, patterns: patterns, defaults: defaults }; @@ -700,7 +565,7 @@ function compile(schema, root, localRefs, baseId) { refCode = addLocalRef(ref); var v = resolve.call(self, localCompile, root, ref); - if (!v) { + if (v === undefined) { var localSchema = localRefs && localRefs[ref]; if (localSchema) { v = resolve.inlineRef(localSchema, opts.inlineRefs) @@ -709,7 +574,9 @@ function compile(schema, root, localRefs, baseId) { } } - if (v) { + if (v === undefined) { + removeLocalRef(ref); + } else { replaceLocalRef(ref, v); return resolvedRef(v, refCode); } @@ -722,13 +589,17 @@ function compile(schema, root, localRefs, baseId) { return 'refVal' + refId; } + function removeLocalRef(ref) { + delete refs[ref]; + } + function replaceLocalRef(ref, v) { var refId = refs[ref]; refVal[refId] = v; } function resolvedRef(refVal, code) { - return typeof refVal == 'object' + return typeof refVal == 'object' || typeof refVal == 'boolean' ? { code: code, schema: refVal, inline: true } : { code: code, $async: refVal && refVal.$async }; } @@ -786,8 +657,12 @@ function compile(schema, root, localRefs, baseId) { validate = inline.call(self, it, rule.keyword, schema, parentSchema); } else { validate = rule.definition.validate; + if (!validate) return; } + if (validate === undefined) + throw new Error('custom keyword "' + rule.keyword + '"failed to compile'); + var index = customRules.length; customRules[index] = validate; @@ -864,7 +739,7 @@ function defaultCode(i) { function refValCode(i, refVal) { - return refVal[i] ? 'var refVal' + i + ' = refVal[' + i + '];' : ''; + return refVal[i] === undefined ? '' : 'var refVal' + i + ' = refVal[' + i + '];'; } @@ -881,13 +756,14 @@ function vars(arr, statement) { return code; } -},{"../async":1,"../dotjs/validate":36,"./equal":4,"./resolve":7,"./util":11,"./validation_error":12,"co":41,"json-stable-stringify":42}],7:[function(require,module,exports){ +},{"../dotjs/validate":35,"./error_classes":5,"./resolve":8,"./util":12,"co":40,"fast-deep-equal":41,"json-stable-stringify":43}],8:[function(require,module,exports){ 'use strict'; var url = require('url') - , equal = require('./equal') + , equal = require('fast-deep-equal') , util = require('./util') - , SchemaObject = require('./schema_obj'); + , SchemaObject = require('./schema_obj') + , traverse = require('json-schema-traverse'); module.exports = resolve; @@ -931,7 +807,7 @@ function resolve(compile, root, ref) { if (schema instanceof SchemaObject) { v = schema.validate || compile.call(this, schema.schema, root, undefined, baseId); - } else if (schema) { + } else if (schema !== undefined) { v = inlineRef(schema, this._opts.inlineRefs) ? schema : compile.call(this, schema, root, undefined, baseId); @@ -952,7 +828,7 @@ function resolveSchema(root, ref) { /* jshint validthis: true */ var p = url.parse(ref, false, true) , refPath = _getFullPath(p) - , baseId = getFullPath(root.schema.id); + , baseId = getFullPath(this._getId(root.schema)); if (refPath !== baseId) { var id = normalizeId(refPath); var refVal = this._refs[id]; @@ -973,7 +849,7 @@ function resolveSchema(root, ref) { } } if (!root.schema) return; - baseId = getFullPath(root.schema.id); + baseId = getFullPath(this._getId(root.schema)); } return getJsonPointer.call(this, p, baseId, root.schema, root); } @@ -987,7 +863,8 @@ function resolveRecursive(root, ref, parsedRef) { var schema = res.schema; var baseId = res.baseId; root = res.root; - if (schema.id) baseId = resolveUrl(baseId, schema.id); + var id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); return getJsonPointer.call(this, parsedRef, baseId, schema, root); } } @@ -1006,20 +883,24 @@ function getJsonPointer(parsedRef, baseId, schema, root) { if (part) { part = util.unescapeFragment(part); schema = schema[part]; - if (!schema) break; - if (schema.id && !PREVENT_SCOPE_CHANGE[part]) baseId = resolveUrl(baseId, schema.id); - if (schema.$ref) { - var $ref = resolveUrl(baseId, schema.$ref); - var res = resolveSchema.call(this, root, $ref); - if (res) { - schema = res.schema; - root = res.root; - baseId = res.baseId; + if (schema === undefined) break; + var id; + if (!PREVENT_SCOPE_CHANGE[part]) { + id = this._getId(schema); + if (id) baseId = resolveUrl(baseId, id); + if (schema.$ref) { + var $ref = resolveUrl(baseId, schema.$ref); + var res = resolveSchema.call(this, root, $ref); + if (res) { + schema = res.schema; + root = res.root; + baseId = res.baseId; + } } } } } - if (schema && schema != root.schema) + if (schema !== undefined && schema !== root.schema) return { schema: schema, root: root, baseId: baseId }; } @@ -1109,48 +990,46 @@ function resolveUrl(baseId, id) { /* @this Ajv */ function resolveIds(schema) { - /* eslint no-shadow: 0 */ - /* jshint validthis: true */ - var id = normalizeId(schema.id); + var schemaId = normalizeId(this._getId(schema)); + var baseIds = {'': schemaId}; + var fullPaths = {'': getFullPath(schemaId, false)}; var localRefs = {}; - _resolveIds.call(this, schema, getFullPath(id, false), id); - return localRefs; + var self = this; - /* @this Ajv */ - function _resolveIds(schema, fullPath, baseId) { - /* jshint validthis: true */ - if (Array.isArray(schema)) { - for (var i=0; i', - $result = 'result' + $lvl; - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -1548,20 +1411,29 @@ module.exports = function generate__formatLimit(it, $keyword) { } else { $schemaValue = $schema; } + var $isMax = $keyword == 'maximum', + $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', + $schemaExcl = it.schema[$exclusiveKeyword], + $isDataExcl = it.opts.$data && $schemaExcl && $schemaExcl.$data, + $op = $isMax ? '<' : '>', + $notOp = $isMax ? '>' : '<', + $errorKeyword = undefined; if ($isDataExcl) { var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), $exclusive = 'exclusive' + $lvl, + $exclType = 'exclType' + $lvl, + $exclIsNumber = 'exclIsNumber' + $lvl, $opExpr = 'op' + $lvl, $opStr = '\' + ' + $opExpr + ' + \''; out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && ' + ($schemaValueExcl) + ' !== undefined) { ' + ($valid) + ' = false; '; + out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \'boolean\' && ' + ($exclType) + ' != \'undefined\' && ' + ($exclType) + ' != \'number\') { '; var $errorKeyword = $exclusiveKeyword; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_formatExclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; } @@ -1583,183 +1455,49 @@ module.exports = function generate__formatLimit(it, $keyword) { } else { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } - out += ' } '; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } + out += ' } else if ( '; if ($isData) { - out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { '; - $closingBraces += '}'; + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; } - if ($isDataFormat) { - out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { '; - $closingBraces += '}'; - } - out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; var ' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true; if (' + ($valid) + ' === undefined) { ' + ($valid) + ' = ' + ($exclusive) + ' ? ' + ($result) + ' ' + ($op) + ' 0 : ' + ($result) + ' ' + ($op) + '= 0; } if (!' + ($valid) + ') var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; + out += ' ' + ($exclType) + ' == \'number\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; } else { - var $exclusive = $schemaExcl === true, + var $exclIsNumber = typeof $schemaExcl == 'number', $opStr = $op; - if (!$exclusive) $opStr += '='; - var $opExpr = '\'' + $opStr + '\''; - if ($isData) { - out += ' if (' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'string\') ' + ($valid) + ' = false; else { '; - $closingBraces += '}'; - } - if ($isDataFormat) { - out += ' if (!' + ($compare) + ') ' + ($valid) + ' = true; else { '; - $closingBraces += '}'; - } - out += ' var ' + ($result) + ' = ' + ($compare) + '(' + ($data) + ', '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' ); if (' + ($result) + ' === undefined) ' + ($valid) + ' = false; if (' + ($valid) + ' === undefined) ' + ($valid) + ' = ' + ($result) + ' ' + ($op); - if (!$exclusive) { - out += '='; - } - out += ' 0;'; - } - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { '; - var $errorKeyword = $keyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_formatLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: '; - if ($isData) { - out += '' + ($schemaValue); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , exclusive: ' + ($exclusive) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be ' + ($opStr) + ' "'; - if ($isData) { - out += '\' + ' + ($schemaValue) + ' + \''; - } else { - out += '' + (it.util.escapeQuotes($schema)); - } - out += '"\' '; - } - if (it.opts.verbose) { - out += ' , schema: '; + if ($exclIsNumber && $isData) { + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; if ($isData) { - out += 'validate.schema' + ($schemaPath); - } else { - out += '' + (it.util.toQuotedString($schema)); - } - out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += '}'; - return out; -} - -},{}],14:[function(require,module,exports){ -'use strict'; -module.exports = function generate__limit(it, $keyword) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $errorKeyword; - var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, - $schemaValue; - if ($isData) { - out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; - $schemaValue = 'schema' + $lvl; - } else { - $schemaValue = $schema; - } - var $isMax = $keyword == 'maximum', - $exclusiveKeyword = $isMax ? 'exclusiveMaximum' : 'exclusiveMinimum', - $schemaExcl = it.schema[$exclusiveKeyword], - $isDataExcl = it.opts.v5 && $schemaExcl && $schemaExcl.$data, - $op = $isMax ? '<' : '>', - $notOp = $isMax ? '>' : '<'; - if ($isDataExcl) { - var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr), - $exclusive = 'exclusive' + $lvl, - $opExpr = 'op' + $lvl, - $opStr = '\' + ' + $opExpr + ' + \''; - out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; '; - $schemaValueExcl = 'schemaExcl' + $lvl; - out += ' var exclusive' + ($lvl) + '; if (typeof ' + ($schemaValueExcl) + ' != \'boolean\' && typeof ' + ($schemaValueExcl) + ' != \'undefined\') { '; - var $errorKeyword = $exclusiveKeyword; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ($errorKeyword || '_exclusiveLimit') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; - if (it.opts.messages !== false) { - out += ' , message: \'' + ($exclusiveKeyword) + ' should be boolean\' '; + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; + out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { '; } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; + if ($exclIsNumber && $schema === undefined) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $schemaValue = $schemaExcl; + $notOp += '='; } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; + if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema); + if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) { + $exclusive = true; + $errorKeyword = $exclusiveKeyword; + $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword; + $notOp += '='; + } else { + $exclusive = false; + $opStr += '='; + } } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' } else if( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ((exclusive' + ($lvl) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ') || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = exclusive' + ($lvl) + ' ? \'' + ($op) + '\' : \'' + ($op) + '=\';'; - } else { - var $exclusive = $schemaExcl === true, - $opStr = $op; - if (!$exclusive) $opStr += '='; - var $opExpr = '\'' + $opStr + '\''; - out += ' if ( '; - if ($isData) { - out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; - } - out += ' ' + ($data) + ' ' + ($notOp); - if ($exclusive) { - out += '='; + var $opExpr = '\'' + $opStr + '\''; + out += ' if ( '; + if ($isData) { + out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'number\') || '; + } + out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { '; } - out += ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') {'; } - var $errorKeyword = $keyword; + $errorKeyword = $errorKeyword || $keyword; var $$outStack = $$outStack || []; $$outStack.push(out); out = ''; /* istanbul ignore else */ @@ -1770,7 +1508,7 @@ module.exports = function generate__limit(it, $keyword) { if ($isData) { out += '\' + ' + ($schemaValue); } else { - out += '' + ($schema) + '\''; + out += '' + ($schemaValue) + '\''; } } if (it.opts.verbose) { @@ -1804,9 +1542,9 @@ module.exports = function generate__limit(it, $keyword) { return out; } -},{}],15:[function(require,module,exports){ +},{}],14:[function(require,module,exports){ 'use strict'; -module.exports = function generate__limitItems(it, $keyword) { +module.exports = function generate__limitItems(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -1816,7 +1554,7 @@ module.exports = function generate__limitItems(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $errorKeyword; var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -1882,9 +1620,9 @@ module.exports = function generate__limitItems(it, $keyword) { return out; } -},{}],16:[function(require,module,exports){ +},{}],15:[function(require,module,exports){ 'use strict'; -module.exports = function generate__limitLength(it, $keyword) { +module.exports = function generate__limitLength(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -1894,7 +1632,7 @@ module.exports = function generate__limitLength(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $errorKeyword; var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -1965,9 +1703,9 @@ module.exports = function generate__limitLength(it, $keyword) { return out; } -},{}],17:[function(require,module,exports){ +},{}],16:[function(require,module,exports){ 'use strict'; -module.exports = function generate__limitProperties(it, $keyword) { +module.exports = function generate__limitProperties(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -1977,7 +1715,7 @@ module.exports = function generate__limitProperties(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $errorKeyword; var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -2043,9 +1781,9 @@ module.exports = function generate__limitProperties(it, $keyword) { return out; } -},{}],18:[function(require,module,exports){ +},{}],17:[function(require,module,exports){ 'use strict'; -module.exports = function generate_allOf(it, $keyword) { +module.exports = function generate_allOf(it, $keyword, $ruleType) { var out = ' '; var $schema = it.schema[$keyword]; var $schemaPath = it.schemaPath + it.util.getProperty($keyword); @@ -2088,9 +1826,9 @@ module.exports = function generate_allOf(it, $keyword) { return out; } -},{}],19:[function(require,module,exports){ +},{}],18:[function(require,module,exports){ 'use strict'; -module.exports = function generate_anyOf(it, $keyword) { +module.exports = function generate_anyOf(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -2129,7 +1867,7 @@ module.exports = function generate_anyOf(it, $keyword) { } } it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ + out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('anyOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { @@ -2142,7 +1880,15 @@ module.exports = function generate_anyOf(it, $keyword) { } else { out += ' {} '; } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError(vErrors); '; + } else { + out += ' validate.errors = vErrors; return false; '; + } + } + out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; if (it.opts.allErrors) { out += ' } '; } @@ -2155,9 +1901,9 @@ module.exports = function generate_anyOf(it, $keyword) { return out; } -},{}],20:[function(require,module,exports){ +},{}],19:[function(require,module,exports){ 'use strict'; -module.exports = function generate_constant(it, $keyword) { +module.exports = function generate_const(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -2167,7 +1913,7 @@ module.exports = function generate_constant(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -2183,7 +1929,7 @@ module.exports = function generate_constant(it, $keyword) { $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { - out += ' { keyword: \'' + ('constant') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + out += ' { keyword: \'' + ('const') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { out += ' , message: \'should be equal to constant\' '; } @@ -2206,12 +1952,98 @@ module.exports = function generate_constant(it, $keyword) { out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += ' }'; + if ($breakOnError) { + out += ' else { '; + } + return out; +} + +},{}],20:[function(require,module,exports){ +'use strict'; +module.exports = function generate_contains(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + var $idx = 'i' + $lvl, + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $currentBaseId = it.baseId, + $nonEmptySchema = it.util.schemaHasRules($schema, it.RULES.all); + out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; + if ($nonEmptySchema) { + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true); + var $passData = $data + '[' + $idx + ']'; + $it.dataPathArr[$dataNxt] = $idx; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + out += ' if (' + ($nextValid) + ') break; } '; + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {'; + } else { + out += ' if (' + ($data) + '.length == 0) {'; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('contains') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'should contain a valid item\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + out += ' } else { '; + if ($nonEmptySchema) { + out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } '; + } + if (it.opts.allErrors) { + out += ' } '; + } + out = it.util.cleanUpCode(out); return out; } },{}],21:[function(require,module,exports){ 'use strict'; -module.exports = function generate_custom(it, $keyword) { +module.exports = function generate_custom(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -2223,7 +2055,7 @@ module.exports = function generate_custom(it, $keyword) { var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; var $errs = 'errs__' + $lvl; - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -2233,7 +2065,8 @@ module.exports = function generate_custom(it, $keyword) { } var $rule = this, $definition = 'definition' + $lvl, - $rDef = $rule.definition; + $rDef = $rule.definition, + $closingBraces = ''; var $compile, $inline, $macro, $ruleValidate, $validateCode; if ($isData && $rDef.$data) { $validateCode = 'keywordValidate' + $lvl; @@ -2241,6 +2074,7 @@ module.exports = function generate_custom(it, $keyword) { out += ' var ' + ($definition) + ' = RULES.custom[\'' + ($keyword) + '\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;'; } else { $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it); + if (!$ruleValidate) return; $schemaValue = 'validate.schema' + $schemaPath; $validateCode = $ruleValidate.code; $compile = $rDef.compile; @@ -2256,8 +2090,13 @@ module.exports = function generate_custom(it, $keyword) { out += '' + ($ruleErrs) + ' = null;'; } out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';'; - if ($validateSchema) { - out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') {'; + if ($isData && $rDef.$data) { + $closingBraces += '}'; + out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { '; + if ($validateSchema) { + $closingBraces += '}'; + out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { '; + } } if ($inline) { if ($rDef.statements) { @@ -2267,6 +2106,7 @@ module.exports = function generate_custom(it, $keyword) { } } else if ($macro) { var $it = it.util.copy(it); + var $closingBraces = ''; $it.level++; var $nextValid = 'valid' + $it.level; $it.schema = $ruleValidate.validate; @@ -2316,11 +2156,9 @@ module.exports = function generate_custom(it, $keyword) { } } if ($rDef.modifying) { - out += ' ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; - } - if ($validateSchema) { - out += ' }'; + out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];'; } + out += '' + ($closingBraces); if ($rDef.valid) { if ($breakOnError) { out += ' if (true) { '; @@ -2433,7 +2271,7 @@ module.exports = function generate_custom(it, $keyword) { },{}],22:[function(require,module,exports){ 'use strict'; -module.exports = function generate_dependencies(it, $keyword) { +module.exports = function generate_dependencies(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -2448,7 +2286,8 @@ module.exports = function generate_dependencies(it, $keyword) { $it.level++; var $nextValid = 'valid' + $it.level; var $schemaDeps = {}, - $propertyDeps = {}; + $propertyDeps = {}, + $ownProperties = it.opts.ownProperties; for ($property in $schema) { var $sch = $schema[$property]; var $deps = Array.isArray($sch) ? $propertyDeps : $schemaDeps; @@ -2459,100 +2298,115 @@ module.exports = function generate_dependencies(it, $keyword) { out += 'var missing' + ($lvl) + ';'; for (var $property in $propertyDeps) { $deps = $propertyDeps[$property]; - out += ' if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; - if ($breakOnError) { - out += ' && ( '; - var arr1 = $deps; - if (arr1) { - var _$property, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - _$property = arr1[$i += 1]; - if ($i) { - out += ' || '; - } - var $prop = it.util.getProperty(_$property); - out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) '; - } - } - out += ')) { '; - var $propertyPath = 'missing' + $lvl, - $missingProperty = '\' + ' + $propertyPath + ' + \''; - if (it.opts._errorDataPathProperty) { - it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; + if ($deps.length) { + out += ' if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; } - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have '; - if ($deps.length == 1) { - out += 'property ' + (it.util.escapeQuotes($deps[0])); - } else { - out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + if ($breakOnError) { + out += ' && ( '; + var arr1 = $deps; + if (arr1) { + var $propertyKey, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $propertyKey = arr1[$i += 1]; + if ($i) { + out += ' || '; + } + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; } - out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + out += ')) { '; + var $propertyPath = 'missing' + $lvl, + $missingProperty = '\' + ' + $propertyPath + ' + \''; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath; } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; + out += ' {} '; } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } else { - out += ' ) { '; - var arr2 = $deps; - if (arr2) { - var $reqProperty, i2 = -1, - l2 = arr2.length - 1; - while (i2 < l2) { - $reqProperty = arr2[i2 += 1]; - var $prop = it.util.getProperty($reqProperty), - $missingProperty = it.util.escapeQuotes($reqProperty); - if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers); + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; } - out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have '; - if ($deps.length == 1) { - out += 'property ' + (it.util.escapeQuotes($deps[0])); - } else { - out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); - } - out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + out += ' ) { '; + var arr2 = $deps; + if (arr2) { + var $propertyKey, i2 = -1, + l2 = arr2.length - 1; + while (i2 < l2) { + $propertyKey = arr2[i2 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; + if (it.opts._errorDataPathProperty) { + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; } - out += ' } '; - } else { - out += ' {} '; + out += ') { var err = '; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ('dependencies') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { property: \'' + (it.util.escapeQuotes($property)) + '\', missingProperty: \'' + ($missingProperty) + '\', depsCount: ' + ($deps.length) + ', deps: \'' + (it.util.escapeQuotes($deps.length == 1 ? $deps[0] : $deps.join(", "))) + '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should have '; + if ($deps.length == 1) { + out += 'property ' + (it.util.escapeQuotes($deps[0])); + } else { + out += 'properties ' + (it.util.escapeQuotes($deps.join(", "))); + } + out += ' when property ' + (it.util.escapeQuotes($property)) + ' is present\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; } } - } - out += ' } '; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; + out += ' } '; + if ($breakOnError) { + $closingBraces += '}'; + out += ' else { '; + } } } it.errorPath = $currentErrorPath; @@ -2560,7 +2414,11 @@ module.exports = function generate_dependencies(it, $keyword) { for (var $property in $schemaDeps) { var $sch = $schemaDeps[$property]; if (it.util.schemaHasRules($sch, it.RULES.all)) { - out += ' ' + ($nextValid) + ' = true; if (' + ($data) + (it.util.getProperty($property)) + ' !== undefined) { '; + out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($property)) + '\') '; + } + out += ') { '; $it.schema = $sch; $it.schemaPath = $schemaPath + it.util.getProperty($property); $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property); @@ -2582,7 +2440,7 @@ module.exports = function generate_dependencies(it, $keyword) { },{}],23:[function(require,module,exports){ 'use strict'; -module.exports = function generate_enum(it, $keyword) { +module.exports = function generate_enum(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -2592,7 +2450,7 @@ module.exports = function generate_enum(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -2649,7 +2507,7 @@ module.exports = function generate_enum(it, $keyword) { },{}],24:[function(require,module,exports){ 'use strict'; -module.exports = function generate_format(it, $keyword) { +module.exports = function generate_format(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -2664,7 +2522,7 @@ module.exports = function generate_format(it, $keyword) { } return out; } - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -2675,8 +2533,10 @@ module.exports = function generate_format(it, $keyword) { var $unknownFormats = it.opts.unknownFormats, $allowUnknown = Array.isArray($unknownFormats); if ($isData) { - var $format = 'format' + $lvl; - out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var isObject' + ($lvl) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; if (isObject' + ($lvl) + ') { '; + var $format = 'format' + $lvl, + $isObject = 'isObject' + $lvl, + $formatType = 'formatType' + $lvl; + out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \'object\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \'string\'; if (' + ($isObject) + ') { '; if (it.async) { out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; '; } @@ -2685,14 +2545,14 @@ module.exports = function generate_format(it, $keyword) { out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \'string\') || '; } out += ' ('; - if ($unknownFormats === true || $allowUnknown) { + if ($unknownFormats != 'ignore') { out += ' (' + ($schemaValue) + ' && !' + ($format) + ' '; if ($allowUnknown) { out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 '; } out += ') || '; } - out += ' (' + ($format) + ' && !(typeof ' + ($format) + ' == \'function\' ? '; + out += ' (' + ($format) + ' && ' + ($formatType) + ' == \'' + ($ruleType) + '\' && !(typeof ' + ($format) + ' == \'function\' ? '; if (it.async) { out += ' (async' + ($lvl) + ' ? ' + (it.yieldAwait) + ' ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) '; } else { @@ -2702,24 +2562,33 @@ module.exports = function generate_format(it, $keyword) { } else { var $format = it.formats[$schema]; if (!$format) { - if ($unknownFormats === true || ($allowUnknown && $unknownFormats.indexOf($schema) == -1)) { - throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); - } else { - if (!$allowUnknown) { - console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); - if ($unknownFormats !== 'ignore') console.warn('In the next major version it will throw exception. See option unknownFormats for more information'); + if ($unknownFormats == 'ignore') { + console.warn('unknown format "' + $schema + '" ignored in schema at path "' + it.errSchemaPath + '"'); + if ($breakOnError) { + out += ' if (true) { '; } + return out; + } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) { if ($breakOnError) { out += ' if (true) { '; } return out; + } else { + throw new Error('unknown format "' + $schema + '" is used in schema at path "' + it.errSchemaPath + '"'); } } var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate; + var $formatType = $isObject && $format.type || 'string'; if ($isObject) { var $async = $format.async === true; $format = $format.validate; } + if ($formatType != $ruleType) { + if ($breakOnError) { + out += ' if (true) { '; + } + return out; + } if ($async) { if (!it.async) throw new Error('async format in sync schema'); var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate'; @@ -2789,7 +2658,7 @@ module.exports = function generate_format(it, $keyword) { },{}],25:[function(require,module,exports){ 'use strict'; -module.exports = function generate_items(it, $keyword) { +module.exports = function generate_items(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -2920,11 +2789,7 @@ module.exports = function generate_items(it, $keyword) { if ($breakOnError) { out += ' if (!' + ($nextValid) + ') break; '; } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; - } + out += ' }'; } if ($breakOnError) { out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {'; @@ -2935,7 +2800,7 @@ module.exports = function generate_items(it, $keyword) { },{}],26:[function(require,module,exports){ 'use strict'; -module.exports = function generate_multipleOf(it, $keyword) { +module.exports = function generate_multipleOf(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -2944,7 +2809,7 @@ module.exports = function generate_multipleOf(it, $keyword) { var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -2977,7 +2842,7 @@ module.exports = function generate_multipleOf(it, $keyword) { if ($isData) { out += '\' + ' + ($schemaValue); } else { - out += '' + ($schema) + '\''; + out += '' + ($schemaValue) + '\''; } } if (it.opts.verbose) { @@ -3013,7 +2878,7 @@ module.exports = function generate_multipleOf(it, $keyword) { },{}],27:[function(require,module,exports){ 'use strict'; -module.exports = function generate_not(it, $keyword) { +module.exports = function generate_not(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -3098,7 +2963,7 @@ module.exports = function generate_not(it, $keyword) { },{}],28:[function(require,module,exports){ 'use strict'; -module.exports = function generate_oneOf(it, $keyword) { +module.exports = function generate_oneOf(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -3140,10 +3005,7 @@ module.exports = function generate_oneOf(it, $keyword) { } } it.compositeRule = $it.compositeRule = $wasComposite; - out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ + out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('oneOf') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; if (it.opts.messages !== false) { @@ -3156,16 +3018,13 @@ module.exports = function generate_oneOf(it, $keyword) { } else { out += ' {} '; } - var __err = out; - out = $$outStack.pop(); + out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; + out += ' throw new ValidationError(vErrors); '; } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; + out += ' validate.errors = vErrors; return false; '; } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }'; if (it.opts.allErrors) { @@ -3176,7 +3035,7 @@ module.exports = function generate_oneOf(it, $keyword) { },{}],29:[function(require,module,exports){ 'use strict'; -module.exports = function generate_pattern(it, $keyword) { +module.exports = function generate_pattern(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -3185,7 +3044,7 @@ module.exports = function generate_pattern(it, $keyword) { var $errSchemaPath = it.errSchemaPath + '/' + $keyword; var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -3252,60 +3111,7 @@ module.exports = function generate_pattern(it, $keyword) { },{}],30:[function(require,module,exports){ 'use strict'; -module.exports = function generate_patternRequired(it, $keyword) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $key = 'key' + $lvl, - $matched = 'patternMatched' + $lvl, - $closingBraces = '', - $ownProperties = it.opts.ownProperties; - out += 'var ' + ($valid) + ' = true;'; - var arr1 = $schema; - if (arr1) { - var $pProperty, i1 = -1, - l1 = arr1.length - 1; - while (i1 < l1) { - $pProperty = arr1[i1 += 1]; - out += ' var ' + ($matched) + ' = false; for (var ' + ($key) + ' in ' + ($data) + ') { '; - if ($ownProperties) { - out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; '; - } - out += ' ' + ($matched) + ' = ' + (it.usePattern($pProperty)) + '.test(' + ($key) + '); if (' + ($matched) + ') break; } '; - var $missingPattern = it.util.escapeQuotes($pProperty); - out += ' if (!' + ($matched) + ') { ' + ($valid) + ' = false; var err = '; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('patternRequired') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingPattern: \'' + ($missingPattern) + '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should have property matching pattern \\\'' + ($missingPattern) + '\\\'\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } '; - if ($breakOnError) { - $closingBraces += '}'; - out += ' else { '; - } - } - } - out += '' + ($closingBraces); - return out; -} - -},{}],31:[function(require,module,exports){ -'use strict'; -module.exports = function generate_properties(it, $keyword) { +module.exports = function generate_properties(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -3321,8 +3127,10 @@ module.exports = function generate_properties(it, $keyword) { $it.level++; var $nextValid = 'valid' + $it.level; var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, $dataNxt = $it.dataLevel = it.dataLevel + 1, - $nextData = 'data' + $dataNxt; + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl; var $schemaKeys = Object.keys($schema || {}), $pProperties = it.schema.patternProperties || {}, $pPropertyKeys = Object.keys($pProperties), @@ -3336,15 +3144,19 @@ module.exports = function generate_properties(it, $keyword) { $currentBaseId = it.baseId; var $required = it.schema.required; if ($required && !(it.opts.v5 && $required.$data) && $required.length < it.opts.loopRequired) var $requiredHash = it.util.toHash($required); - if (it.opts.v5) { + if (it.opts.patternGroups) { var $pgProperties = it.schema.patternGroups || {}, $pgPropertyKeys = Object.keys($pgProperties); } out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;'; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined;'; + } if ($checkAdditional) { - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; if ($ownProperties) { - out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; '; + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; } if ($someProperties) { out += ' var isAdditional' + ($lvl) + ' = !(false '; @@ -3374,7 +3186,7 @@ module.exports = function generate_properties(it, $keyword) { } } } - if (it.opts.v5 && $pgPropertyKeys && $pgPropertyKeys.length) { + if (it.opts.patternGroups && $pgPropertyKeys.length) { var arr3 = $pgPropertyKeys; if (arr3) { var $pgProperty, $i = -1, @@ -3514,7 +3326,11 @@ module.exports = function generate_properties(it, $keyword) { out += ' ' + ($code) + ' '; } else { if ($requiredHash && $requiredHash[$propertyKey]) { - out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = false; '; + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = false; '; var $currentErrorPath = it.errorPath, $currErrSchemaPath = $errSchemaPath, $missingProperty = it.util.escapeQuotes($propertyKey); @@ -3559,9 +3375,17 @@ module.exports = function generate_properties(it, $keyword) { out += ' } else { '; } else { if ($breakOnError) { - out += ' if (' + ($useData) + ' === undefined) { ' + ($nextValid) + ' = true; } else { '; + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') { ' + ($nextValid) + ' = true; } else { '; } else { - out += ' if (' + ($useData) + ' !== undefined) { '; + out += ' if (' + ($useData) + ' !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ' ) { '; } } out += ' ' + ($code) + ' } '; @@ -3574,48 +3398,51 @@ module.exports = function generate_properties(it, $keyword) { } } } - var arr5 = $pPropertyKeys; - if (arr5) { - var $pProperty, i5 = -1, - l5 = arr5.length - 1; - while (i5 < l5) { - $pProperty = arr5[i5 += 1]; - var $sch = $pProperties[$pProperty]; - if (it.util.schemaHasRules($sch, it.RULES.all)) { - $it.schema = $sch; - $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); - $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); - out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; - if ($ownProperties) { - out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; '; - } - out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; - $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); - var $passData = $data + '[' + $key + ']'; - $it.dataPathArr[$dataNxt] = $key; - var $code = it.validate($it); - $it.baseId = $currentBaseId; - if (it.util.varOccurences($code, $nextData) < 2) { - out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; - } else { - out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; - } - if ($breakOnError) { - out += ' if (!' + ($nextValid) + ') break; '; - } - out += ' } '; - if ($breakOnError) { - out += ' else ' + ($nextValid) + ' = true; '; - } - out += ' } '; - if ($breakOnError) { - out += ' if (' + ($nextValid) + ') { '; - $closingBraces += '}'; + if ($pPropertyKeys.length) { + var arr5 = $pPropertyKeys; + if (arr5) { + var $pProperty, i5 = -1, + l5 = arr5.length - 1; + while (i5 < l5) { + $pProperty = arr5[i5 += 1]; + var $sch = $pProperties[$pProperty]; + if (it.util.schemaHasRules($sch, it.RULES.all)) { + $it.schema = $sch; + $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty); + $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty); + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { '; + $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); + var $passData = $data + '[' + $key + ']'; + $it.dataPathArr[$dataNxt] = $key; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + if ($breakOnError) { + out += ' if (!' + ($nextValid) + ') break; '; + } + out += ' } '; + if ($breakOnError) { + out += ' else ' + ($nextValid) + ' = true; '; + } + out += ' } '; + if ($breakOnError) { + out += ' if (' + ($nextValid) + ') { '; + $closingBraces += '}'; + } } } } } - if (it.opts.v5) { + if (it.opts.patternGroups && $pgPropertyKeys.length) { var arr6 = $pgPropertyKeys; if (arr6) { var $pgProperty, i6 = -1, @@ -3628,9 +3455,11 @@ module.exports = function generate_properties(it, $keyword) { $it.schema = $sch; $it.schemaPath = it.schemaPath + '.patternGroups' + it.util.getProperty($pgProperty) + '.schema'; $it.errSchemaPath = it.errSchemaPath + '/patternGroups/' + it.util.escapeFragment($pgProperty) + '/schema'; - out += ' var pgPropCount' + ($lvl) + ' = 0; for (var ' + ($key) + ' in ' + ($data) + ') { '; + out += ' var pgPropCount' + ($lvl) + ' = 0; '; if ($ownProperties) { - out += ' if (!Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($key) + ')) continue; '; + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; } out += ' if (' + (it.usePattern($pgProperty)) + '.test(' + ($key) + ')) { pgPropCount' + ($lvl) + '++; '; $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers); @@ -3750,9 +3579,92 @@ module.exports = function generate_properties(it, $keyword) { return out; } +},{}],31:[function(require,module,exports){ +'use strict'; +module.exports = function generate_propertyNames(it, $keyword, $ruleType) { + var out = ' '; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $data = 'data' + ($dataLvl || ''); + var $errs = 'errs__' + $lvl; + var $it = it.util.copy(it); + var $closingBraces = ''; + $it.level++; + var $nextValid = 'valid' + $it.level; + if (it.util.schemaHasRules($schema, it.RULES.all)) { + $it.schema = $schema; + $it.schemaPath = $schemaPath; + $it.errSchemaPath = $errSchemaPath; + var $key = 'key' + $lvl, + $idx = 'idx' + $lvl, + $i = 'i' + $lvl, + $invalidName = '\' + ' + $key + ' + \'', + $dataNxt = $it.dataLevel = it.dataLevel + 1, + $nextData = 'data' + $dataNxt, + $dataProperties = 'dataProperties' + $lvl, + $ownProperties = it.opts.ownProperties, + $currentBaseId = it.baseId; + out += ' var ' + ($errs) + ' = errors; '; + if ($ownProperties) { + out += ' var ' + ($dataProperties) + ' = undefined; '; + } + if ($ownProperties) { + out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; '; + } else { + out += ' for (var ' + ($key) + ' in ' + ($data) + ') { '; + } + out += ' var startErrs' + ($lvl) + ' = errors; '; + var $passData = $key; + var $wasComposite = it.compositeRule; + it.compositeRule = $it.compositeRule = true; + var $code = it.validate($it); + $it.baseId = $currentBaseId; + if (it.util.varOccurences($code, $nextData) < 2) { + out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' '; + } else { + out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' '; + } + it.compositeRule = $it.compositeRule = $wasComposite; + out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + '= it.opts.loopRequired; + $loopRequired = $isData || $required.length >= it.opts.loopRequired, + $ownProperties = it.opts.ownProperties; if ($breakOnError) { out += ' var missing' + ($lvl) + '; '; if ($loopRequired) { @@ -3930,7 +3847,11 @@ module.exports = function generate_required(it, $keyword) { if ($isData) { out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {'; } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined; if (!' + ($valid) + ') break; } '; + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined '; + if ($ownProperties) { + out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += '; if (!' + ($valid) + ') break; } '; if ($isData) { out += ' } '; } @@ -3972,15 +3893,20 @@ module.exports = function generate_required(it, $keyword) { out += ' if ( '; var arr2 = $required; if (arr2) { - var _$property, $i = -1, + var $propertyKey, $i = -1, l2 = arr2.length - 1; while ($i < l2) { - _$property = arr2[$i += 1]; + $propertyKey = arr2[$i += 1]; if ($i) { out += ' || '; } - var $prop = it.util.getProperty(_$property); - out += ' ( ' + ($data) + ($prop) + ' === undefined && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? _$property : $prop)) + ') ) '; + var $prop = it.util.getProperty($propertyKey), + $useData = $data + $prop; + out += ' ( ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; + } + out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) '; } } out += ') { '; @@ -4056,7 +3982,11 @@ module.exports = function generate_required(it, $keyword) { } out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { '; } - out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined) { var err = '; /* istanbul ignore else */ + out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) '; + } + out += ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; if (it.opts.messages !== false) { @@ -4082,16 +4012,21 @@ module.exports = function generate_required(it, $keyword) { } else { var arr3 = $required; if (arr3) { - var $reqProperty, i3 = -1, + var $propertyKey, i3 = -1, l3 = arr3.length - 1; while (i3 < l3) { - $reqProperty = arr3[i3 += 1]; - var $prop = it.util.getProperty($reqProperty), - $missingProperty = it.util.escapeQuotes($reqProperty); + $propertyKey = arr3[i3 += 1]; + var $prop = it.util.getProperty($propertyKey), + $missingProperty = it.util.escapeQuotes($propertyKey), + $useData = $data + $prop; if (it.opts._errorDataPathProperty) { - it.errorPath = it.util.getPath($currentErrorPath, $reqProperty, it.opts.jsonPointers); + it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers); + } + out += ' if ( ' + ($useData) + ' === undefined '; + if ($ownProperties) { + out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \'' + (it.util.escapeQuotes($propertyKey)) + '\') '; } - out += ' if (' + ($data) + ($prop) + ' === undefined) { var err = '; /* istanbul ignore else */ + out += ') { var err = '; /* istanbul ignore else */ if (it.createErrors !== false) { out += ' { keyword: \'' + ('required') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \'' + ($missingProperty) + '\' } '; if (it.opts.messages !== false) { @@ -4124,7 +4059,7 @@ module.exports = function generate_required(it, $keyword) { },{}],34:[function(require,module,exports){ 'use strict'; -module.exports = function generate_switch(it, $keyword) { +module.exports = function generate_uniqueItems(it, $keyword, $ruleType) { var out = ' '; var $lvl = it.level; var $dataLvl = it.dataLevel; @@ -4134,137 +4069,7 @@ module.exports = function generate_switch(it, $keyword) { var $breakOnError = !it.opts.allErrors; var $data = 'data' + ($dataLvl || ''); var $valid = 'valid' + $lvl; - var $errs = 'errs__' + $lvl; - var $it = it.util.copy(it); - var $closingBraces = ''; - $it.level++; - var $nextValid = 'valid' + $it.level; - var $ifPassed = 'ifPassed' + it.level, - $currentBaseId = $it.baseId, - $shouldContinue; - out += 'var ' + ($ifPassed) + ';'; - var arr1 = $schema; - if (arr1) { - var $sch, $caseIndex = -1, - l1 = arr1.length - 1; - while ($caseIndex < l1) { - $sch = arr1[$caseIndex += 1]; - if ($caseIndex && !$shouldContinue) { - out += ' if (!' + ($ifPassed) + ') { '; - $closingBraces += '}'; - } - if ($sch.if && it.util.schemaHasRules($sch.if, it.RULES.all)) { - out += ' var ' + ($errs) + ' = errors; '; - var $wasComposite = it.compositeRule; - it.compositeRule = $it.compositeRule = true; - $it.createErrors = false; - $it.schema = $sch.if; - $it.schemaPath = $schemaPath + '[' + $caseIndex + '].if'; - $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/if'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - $it.createErrors = true; - it.compositeRule = $it.compositeRule = $wasComposite; - out += ' ' + ($ifPassed) + ' = ' + ($nextValid) + '; if (' + ($ifPassed) + ') { '; - if (typeof $sch.then == 'boolean') { - if ($sch.then === false) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "switch" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; '; - } else { - $it.schema = $sch.then; - $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then'; - $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } - out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } } '; - } else { - out += ' ' + ($ifPassed) + ' = true; '; - if (typeof $sch.then == 'boolean') { - if ($sch.then === false) { - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('switch') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { caseIndex: ' + ($caseIndex) + ' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should pass "switch" keyword validation\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - } - out += ' var ' + ($nextValid) + ' = ' + ($sch.then) + '; '; - } else { - $it.schema = $sch.then; - $it.schemaPath = $schemaPath + '[' + $caseIndex + '].then'; - $it.errSchemaPath = $errSchemaPath + '/' + $caseIndex + '/then'; - out += ' ' + (it.validate($it)) + ' '; - $it.baseId = $currentBaseId; - } - } - $shouldContinue = $sch.continue - } - } - out += '' + ($closingBraces) + 'var ' + ($valid) + ' = ' + ($nextValid) + '; '; - out = it.util.cleanUpCode(out); - return out; -} - -},{}],35:[function(require,module,exports){ -'use strict'; -module.exports = function generate_uniqueItems(it, $keyword) { - var out = ' '; - var $lvl = it.level; - var $dataLvl = it.dataLevel; - var $schema = it.schema[$keyword]; - var $schemaPath = it.schemaPath + it.util.getProperty($keyword); - var $errSchemaPath = it.errSchemaPath + '/' + $keyword; - var $breakOnError = !it.opts.allErrors; - var $data = 'data' + ($dataLvl || ''); - var $valid = 'valid' + $lvl; - var $isData = it.opts.v5 && $schema && $schema.$data, + var $isData = it.opts.$data && $schema && $schema.$data, $schemaValue; if ($isData) { out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; '; @@ -4325,31 +4130,25 @@ module.exports = function generate_uniqueItems(it, $keyword) { return out; } -},{}],36:[function(require,module,exports){ +},{}],35:[function(require,module,exports){ 'use strict'; -module.exports = function generate_validate(it, $keyword) { +module.exports = function generate_validate(it, $keyword, $ruleType) { var out = ''; - var $async = it.schema.$async === true; + var $async = it.schema.$async === true, + $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'), + $id = it.self._getId(it.schema); if (it.isTop) { - var $top = it.isTop, - $lvl = it.level = 0, - $dataLvl = it.dataLevel = 0, - $data = 'data'; - it.rootId = it.resolve.fullPath(it.root.schema.id); - it.baseId = it.baseId || it.rootId; if ($async) { it.async = true; var $es7 = it.opts.async == 'es7'; it.yieldAwait = $es7 ? 'await' : 'yield'; } - delete it.isTop; - it.dataPathArr = [undefined]; out += ' var validate = '; if ($async) { if ($es7) { out += ' (async function '; } else { - if (it.opts.async == 'co*') { + if (it.opts.async != '*') { out += 'co.wrap'; } out += '(function* '; @@ -4357,14 +4156,87 @@ module.exports = function generate_validate(it, $keyword) { } else { out += ' (function '; } - out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; var vErrors = null; '; + out += ' (data, dataPath, parentData, parentDataProperty, rootData) { \'use strict\'; '; + if ($id && (it.opts.sourceCode || it.opts.processCode)) { + out += ' ' + ('/\*# sourceURL=' + $id + ' */') + ' '; + } + } + if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) { + var $keyword = 'false schema'; + var $lvl = it.level; + var $dataLvl = it.dataLevel; + var $schema = it.schema[$keyword]; + var $schemaPath = it.schemaPath + it.util.getProperty($keyword); + var $errSchemaPath = it.errSchemaPath + '/' + $keyword; + var $breakOnError = !it.opts.allErrors; + var $errorKeyword; + var $data = 'data' + ($dataLvl || ''); + var $valid = 'valid' + $lvl; + if (it.schema === false) { + if (it.isTop) { + $breakOnError = true; + } else { + out += ' var ' + ($valid) + ' = false; '; + } + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'false schema') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} '; + if (it.opts.messages !== false) { + out += ' , message: \'boolean schema is false\' '; + } + if (it.opts.verbose) { + out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; + } + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } + } else { + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; + } + } else { + if (it.isTop) { + if ($async) { + out += ' return data; '; + } else { + out += ' validate.errors = null; return true; '; + } + } else { + out += ' var ' + ($valid) + ' = true; '; + } + } + if (it.isTop) { + out += ' }); return validate; '; + } + return out; + } + if (it.isTop) { + var $top = it.isTop, + $lvl = it.level = 0, + $dataLvl = it.dataLevel = 0, + $data = 'data'; + it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema)); + it.baseId = it.baseId || it.rootId; + delete it.isTop; + it.dataPathArr = [undefined]; + out += ' var vErrors = null; '; out += ' var errors = 0; '; - out += ' if (rootData === undefined) rootData = data;'; + out += ' if (rootData === undefined) rootData = data; '; } else { var $lvl = it.level, $dataLvl = it.dataLevel, $data = 'data' + ($dataLvl || ''); - if (it.schema.id) it.baseId = it.resolve.url(it.baseId, it.schema.id); + if ($id) it.baseId = it.resolve.url(it.baseId, $id); if ($async && !it.async) throw new Error('async schema in sync schema'); out += ' var errs_' + ($lvl) + ' = errors;'; } @@ -4372,111 +4244,160 @@ module.exports = function generate_validate(it, $keyword) { $breakOnError = !it.opts.allErrors, $closingBraces1 = '', $closingBraces2 = ''; + var $errorKeyword; var $typeSchema = it.schema.type, $typeIsArray = Array.isArray($typeSchema); - if ($typeSchema && it.opts.coerceTypes) { - var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); - if ($coerceToTypes) { + if ($typeIsArray && $typeSchema.length == 1) { + $typeSchema = $typeSchema[0]; + $typeIsArray = false; + } + if (it.schema.$ref && $refKeywords) { + if (it.opts.extendRefs == 'fail') { + throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '" (see option extendRefs)'); + } else if (it.opts.extendRefs !== true) { + $refKeywords = false; + console.warn('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); + } + } + if ($typeSchema) { + if (it.opts.coerceTypes) { + var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema); + } + var $rulesGroup = it.RULES.types[$typeSchema]; + if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) { + var $schemaPath = it.schemaPath + '.type', + $errSchemaPath = it.errSchemaPath + '/type'; var $schemaPath = it.schemaPath + '.type', $errSchemaPath = it.errSchemaPath + '/type', $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; - var $dataType = 'dataType' + $lvl, - $coerced = 'coerced' + $lvl; - out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; - if (it.opts.coerceTypes == 'array') { - out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; - } - out += ' var ' + ($coerced) + ' = undefined; '; - var $bracesCoercion = ''; - var arr1 = $coerceToTypes; - if (arr1) { - var $type, $i = -1, - l1 = arr1.length - 1; - while ($i < l1) { - $type = arr1[$i += 1]; - if ($i) { - out += ' if (' + ($coerced) + ' === undefined) { '; - $bracesCoercion += '}'; + out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; + if ($coerceToTypes) { + var $dataType = 'dataType' + $lvl, + $coerced = 'coerced' + $lvl; + out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; '; + if (it.opts.coerceTypes == 'array') { + out += ' if (' + ($dataType) + ' == \'object\' && Array.isArray(' + ($data) + ')) ' + ($dataType) + ' = \'array\'; '; + } + out += ' var ' + ($coerced) + ' = undefined; '; + var $bracesCoercion = ''; + var arr1 = $coerceToTypes; + if (arr1) { + var $type, $i = -1, + l1 = arr1.length - 1; + while ($i < l1) { + $type = arr1[$i += 1]; + if ($i) { + out += ' if (' + ($coerced) + ' === undefined) { '; + $bracesCoercion += '}'; + } + if (it.opts.coerceTypes == 'array' && $type != 'array') { + out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + if ($type == 'string') { + out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; + } else if ($type == 'number' || $type == 'integer') { + out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; + if ($type == 'integer') { + out += ' && !(' + ($data) + ' % 1)'; + } + out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; + } else if ($type == 'boolean') { + out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; + } else if ($type == 'null') { + out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; + } else if (it.opts.coerceTypes == 'array' && $type == 'array') { + out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + } } - if (it.opts.coerceTypes == 'array' && $type != 'array') { - out += ' if (' + ($dataType) + ' == \'array\' && ' + ($data) + '.length == 1) { ' + ($coerced) + ' = ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; } '; + } + out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); } - if ($type == 'string') { - out += ' if (' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\') ' + ($coerced) + ' = \'\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \'\'; '; - } else if ($type == 'number' || $type == 'integer') { - out += ' if (' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \'string\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' '; - if ($type == 'integer') { - out += ' && !(' + ($data) + ' % 1)'; + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); } - out += ')) ' + ($coerced) + ' = +' + ($data) + '; '; - } else if ($type == 'boolean') { - out += ' if (' + ($data) + ' === \'false\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \'true\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; '; - } else if ($type == 'null') { - out += ' if (' + ($data) + ' === \'\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; '; - } else if (it.opts.coerceTypes == 'array' && $type == 'array') { - out += ' if (' + ($dataType) + ' == \'string\' || ' + ($dataType) + ' == \'number\' || ' + ($dataType) + ' == \'boolean\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; '; + out += '\' '; } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; } - } - out += ' ' + ($bracesCoercion) + ' if (' + ($coerced) + ' === undefined) { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } } else { - out += '' + ($typeSchema); + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; + out += ' } else { '; + var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', + $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; + out += ' ' + ($data) + ' = ' + ($coerced) + '; '; + if (!$dataLvl) { + out += 'if (' + ($parentData) + ' !== undefined)'; + } + out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } '; + } else { + var $$outStack = $$outStack || []; + $$outStack.push(out); + out = ''; /* istanbul ignore else */ + if (it.createErrors !== false) { + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; if ($typeIsArray) { out += '' + ($typeSchema.join(",")); } else { out += '' + ($typeSchema); } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + out += '\' } '; + if (it.opts.messages !== false) { + out += ' , message: \'should be '; + if ($typeIsArray) { + out += '' + ($typeSchema.join(",")); + } else { + out += '' + ($typeSchema); + } + out += '\' '; + } + if (it.opts.verbose) { + out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; + } + out += ' } '; + } else { + out += ' {} '; } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; + var __err = out; + out = $$outStack.pop(); + if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ + if (it.async) { + out += ' throw new ValidationError([' + (__err) + ']); '; + } else { + out += ' validate.errors = [' + (__err) + ']; return false; '; + } } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; + out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; } - out += ' } else { '; - var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData', - $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty'; - out += ' ' + ($data) + ' = ' + ($coerced) + '; '; - if (!$dataLvl) { - out += 'if (' + ($parentData) + ' !== undefined)'; - } - out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } } '; - } - } - var $refKeywords; - if (it.schema.$ref && ($refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'))) { - if (it.opts.extendRefs == 'fail') { - throw new Error('$ref: validation keywords used in schema at path "' + it.errSchemaPath + '"'); - } else if (it.opts.extendRefs == 'ignore') { - $refKeywords = false; - console.log('$ref: keywords ignored in schema at path "' + it.errSchemaPath + '"'); - } else if (it.opts.extendRefs !== true) { - console.log('$ref: all keywords used in schema at path "' + it.errSchemaPath + '". It will change in the next major version, see issue #260. Use option { extendRefs: true } to keep current behaviour'); + out += ' } '; } } if (it.schema.$ref && !$refKeywords) { @@ -4492,6 +4413,9 @@ module.exports = function generate_validate(it, $keyword) { $closingBraces2 += '}'; } } else { + if (it.opts.v5 && it.schema.patternGroups) { + console.warn('keyword "patternGroups" is deprecated and disabled. Use option patternGroups: true to enable.'); + } var arr2 = it.RULES; if (arr2) { var $rulesGroup, i2 = -1, @@ -4553,9 +4477,12 @@ module.exports = function generate_validate(it, $keyword) { while (i5 < l5) { $rule = arr5[i5 += 1]; if ($shouldUseRule($rule)) { - out += ' ' + ($rule.code(it, $rule.keyword)) + ' '; - if ($breakOnError) { - $closingBraces1 += '}'; + var $code = $rule.code(it, $rule.keyword, $rulesGroup.type); + if ($code) { + out += ' ' + ($code) + ' '; + if ($breakOnError) { + $closingBraces1 += '}'; + } } } } @@ -4567,7 +4494,6 @@ module.exports = function generate_validate(it, $keyword) { if ($rulesGroup.type) { out += ' } '; if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) { - var $typeChecked = true; out += ' else { '; var $schemaPath = it.schemaPath + '.type', $errSchemaPath = it.errSchemaPath + '/type'; @@ -4575,7 +4501,7 @@ module.exports = function generate_validate(it, $keyword) { $$outStack.push(out); out = ''; /* istanbul ignore else */ if (it.createErrors !== false) { - out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; + out += ' { keyword: \'' + ($errorKeyword || 'type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; if ($typeIsArray) { out += '' + ($typeSchema.join(",")); } else { @@ -4626,57 +4552,12 @@ module.exports = function generate_validate(it, $keyword) { } } } - if ($typeSchema && !$typeChecked && !$coerceToTypes) { - var $schemaPath = it.schemaPath + '.type', - $errSchemaPath = it.errSchemaPath + '/type', - $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType'; - out += ' if (' + (it.util[$method]($typeSchema, $data, true)) + ') { '; - var $$outStack = $$outStack || []; - $$outStack.push(out); - out = ''; /* istanbul ignore else */ - if (it.createErrors !== false) { - out += ' { keyword: \'' + ('type') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \''; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' } '; - if (it.opts.messages !== false) { - out += ' , message: \'should be '; - if ($typeIsArray) { - out += '' + ($typeSchema.join(",")); - } else { - out += '' + ($typeSchema); - } - out += '\' '; - } - if (it.opts.verbose) { - out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' '; - } - out += ' } '; - } else { - out += ' {} '; - } - var __err = out; - out = $$outStack.pop(); - if (!it.compositeRule && $breakOnError) { /* istanbul ignore if */ - if (it.async) { - out += ' throw new ValidationError([' + (__err) + ']); '; - } else { - out += ' validate.errors = [' + (__err) + ']; return false; '; - } - } else { - out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; '; - } - out += ' }'; - } if ($breakOnError) { out += ' ' + ($closingBraces2) + ' '; } if ($top) { if ($async) { - out += ' if (errors === 0) return true; '; + out += ' if (errors === 0) return data; '; out += ' else throw new ValidationError(vErrors); '; } else { out += ' validate.errors = vErrors; '; @@ -4687,25 +4568,32 @@ module.exports = function generate_validate(it, $keyword) { out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';'; } out = it.util.cleanUpCode(out); - if ($top && $breakOnError) { - out = it.util.cleanUpVarErrors(out, $async); + if ($top) { + out = it.util.finalCleanUpCode(out, $async); } function $shouldUseGroup($rulesGroup) { - for (var i = 0; i < $rulesGroup.rules.length; i++) - if ($shouldUseRule($rulesGroup.rules[i])) return true; + var rules = $rulesGroup.rules; + for (var i = 0; i < rules.length; i++) + if ($shouldUseRule(rules[i])) return true; } function $shouldUseRule($rule) { - return it.schema[$rule.keyword] !== undefined || ($rule.keyword == 'properties' && (it.schema.additionalProperties === false || typeof it.schema.additionalProperties == 'object' || (it.schema.patternProperties && Object.keys(it.schema.patternProperties).length) || (it.opts.v5 && it.schema.patternGroups && Object.keys(it.schema.patternGroups).length))); + return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImlementsSomeKeyword($rule)); + } + + function $ruleImlementsSomeKeyword($rule) { + var impl = $rule.implements; + for (var i = 0; i < impl.length; i++) + if (it.schema[impl[i]] !== undefined) return true; } return out; } -},{}],37:[function(require,module,exports){ +},{}],36:[function(require,module,exports){ 'use strict'; -var IDENTIFIER = /^[a-z_$][a-z0-9_$\-]*$/i; +var IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i; var customRuleCode = require('./dotjs/custom'); module.exports = { @@ -4745,7 +4633,7 @@ function addKeyword(keyword, definition) { _addRule(keyword, dataType, definition); } - var $data = definition.$data === true && this._opts.v5; + var $data = definition.$data === true && this._opts.$data; if ($data && !definition.validate) throw new Error('$data support: "validate" function is not defined'); @@ -4755,7 +4643,7 @@ function addKeyword(keyword, definition) { metaSchema = { anyOf: [ metaSchema, - { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#/definitions/$data' } + { '$ref': 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#' } ] }; } @@ -4785,7 +4673,8 @@ function addKeyword(keyword, definition) { keyword: keyword, definition: definition, custom: true, - code: customRuleCode + code: customRuleCode, + implements: definition.implements }; ruleGroup.rules.push(rule); RULES.custom[keyword] = rule; @@ -4833,44 +4722,116 @@ function removeKeyword(keyword) { } } -},{"./dotjs/custom":21}],38:[function(require,module,exports){ +},{"./dotjs/custom":21}],37:[function(require,module,exports){ +'use strict'; + +var META_SCHEMA_ID = 'http://json-schema.org/draft-06/schema'; + +module.exports = function (ajv) { + var defaultMeta = ajv._opts.defaultMeta; + var metaSchemaRef = typeof defaultMeta == 'string' + ? { $ref: defaultMeta } + : ajv.getSchema(META_SCHEMA_ID) + ? { $ref: META_SCHEMA_ID } + : {}; + + ajv.addKeyword('patternGroups', { + // implemented in properties.jst + metaSchema: { + type: 'object', + additionalProperties: { + type: 'object', + required: [ 'schema' ], + properties: { + maximum: { + type: 'integer', + minimum: 0 + }, + minimum: { + type: 'integer', + minimum: 0 + }, + schema: metaSchemaRef + }, + additionalProperties: false + } + } + }); + ajv.RULES.all.properties.implements.push('patternGroups'); +}; + +},{}],38:[function(require,module,exports){ module.exports={ - "id": "http://json-schema.org/draft-04/schema#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Core schema meta-schema", + "$schema": "http://json-schema.org/draft-06/schema#", + "$id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/$data.json#", + "description": "Meta-schema for $data reference (JSON-schema extension proposal)", + "type": "object", + "required": [ "$data" ], + "properties": { + "$data": { + "type": "string", + "anyOf": [ + { "format": "relative-json-pointer" }, + { "format": "json-pointer" } + ] + } + }, + "additionalProperties": false +} + +},{}],39:[function(require,module,exports){ +module.exports={ + "$schema": "http://json-schema.org/draft-06/schema#", + "$id": "http://json-schema.org/draft-06/schema#", + "title": "Core schema meta-schema", "definitions": { "schemaArray": { "type": "array", "minItems": 1, "items": { "$ref": "#" } }, - "positiveInteger": { + "nonNegativeInteger": { "type": "integer", "minimum": 0 }, - "positiveIntegerDefault0": { - "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ] + "nonNegativeIntegerDefault0": { + "allOf": [ + { "$ref": "#/definitions/nonNegativeInteger" }, + { "default": 0 } + ] }, "simpleTypes": { - "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] }, "stringArray": { "type": "array", "items": { "type": "string" }, - "minItems": 1, - "uniqueItems": true + "uniqueItems": true, + "default": [] } }, - "type": "object", + "type": ["object", "boolean"], "properties": { - "id": { + "$id": { "type": "string", - "format": "uri" + "format": "uri-reference" }, "$schema": { "type": "string", "format": "uri" }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, "title": { "type": "string" }, @@ -4880,36 +4841,27 @@ module.exports={ "default": {}, "multipleOf": { "type": "number", - "minimum": 0, - "exclusiveMinimum": true + "exclusiveMinimum": 0 }, "maximum": { "type": "number" }, "exclusiveMaximum": { - "type": "boolean", - "default": false + "type": "number" }, "minimum": { "type": "number" }, "exclusiveMinimum": { - "type": "boolean", - "default": false + "type": "number" }, - "maxLength": { "$ref": "#/definitions/positiveInteger" }, - "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, + "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "pattern": { "type": "string", "format": "regex" }, - "additionalItems": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ], - "default": {} - }, + "additionalItems": { "$ref": "#" }, "items": { "anyOf": [ { "$ref": "#" }, @@ -4917,22 +4869,17 @@ module.exports={ ], "default": {} }, - "maxItems": { "$ref": "#/definitions/positiveInteger" }, - "minItems": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, + "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "uniqueItems": { "type": "boolean", "default": false }, - "maxProperties": { "$ref": "#/definitions/positiveInteger" }, - "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" }, + "contains": { "$ref": "#" }, + "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, + "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, "required": { "$ref": "#/definitions/stringArray" }, - "additionalProperties": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ], - "default": {} - }, + "additionalProperties": { "$ref": "#" }, "definitions": { "type": "object", "additionalProperties": { "$ref": "#" }, @@ -4957,419 +4904,34 @@ module.exports={ ] } }, + "propertyNames": { "$ref": "#" }, + "const": {}, "enum": { "type": "array", "minItems": 1, "uniqueItems": true }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" } - }, - "dependencies": { - "exclusiveMaximum": [ "maximum" ], - "exclusiveMinimum": [ "minimum" ] - }, - "default": {} -} - -},{}],39:[function(require,module,exports){ -module.exports={ - "id": "https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json#", - "$schema": "http://json-schema.org/draft-04/schema#", - "description": "Core schema meta-schema (v5 proposals)", - "definitions": { - "schemaArray": { - "type": "array", - "minItems": 1, - "items": { "$ref": "#" } - }, - "positiveInteger": { - "type": "integer", - "minimum": 0 - }, - "positiveIntegerDefault0": { - "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ] - }, - "simpleTypes": { - "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ] - }, - "stringArray": { - "type": "array", - "items": { "type": "string" }, - "minItems": 1, - "uniqueItems": true - }, - "$data": { - "type": "object", - "required": [ "$data" ], - "properties": { - "$data": { - "type": "string", - "anyOf": [ - { "format": "relative-json-pointer" }, - { "format": "json-pointer" } - ] - } - }, - "additionalProperties": false - } - }, - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uri" - }, - "$schema": { - "type": "string", - "format": "uri" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "default": {}, - "multipleOf": { - "anyOf": [ - { - "type": "number", - "minimum": 0, - "exclusiveMinimum": true - }, - { "$ref": "#/definitions/$data" } - ] - }, - "maximum": { - "anyOf": [ - { "type": "number" }, - { "$ref": "#/definitions/$data" } - ] - }, - "exclusiveMaximum": { - "anyOf": [ - { - "type": "boolean", - "default": false - }, - { "$ref": "#/definitions/$data" } - ] - }, - "minimum": { - "anyOf": [ - { "type": "number" }, - { "$ref": "#/definitions/$data" } - ] - }, - "exclusiveMinimum": { - "anyOf": [ - { - "type": "boolean", - "default": false - }, - { "$ref": "#/definitions/$data" } - ] - }, - "maxLength": { - "anyOf": [ - { "$ref": "#/definitions/positiveInteger" }, - { "$ref": "#/definitions/$data" } - ] - }, - "minLength": { - "anyOf": [ - { "$ref": "#/definitions/positiveIntegerDefault0" }, - { "$ref": "#/definitions/$data" } - ] - }, - "pattern": { - "anyOf": [ - { - "type": "string", - "format": "regex" - }, - { "$ref": "#/definitions/$data" } - ] - }, - "additionalItems": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" }, - { "$ref": "#/definitions/$data" } - ], - "default": {} - }, - "items": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/schemaArray" } - ], - "default": {} - }, - "maxItems": { - "anyOf": [ - { "$ref": "#/definitions/positiveInteger" }, - { "$ref": "#/definitions/$data" } - ] - }, - "minItems": { - "anyOf": [ - { "$ref": "#/definitions/positiveIntegerDefault0" }, - { "$ref": "#/definitions/$data" } - ] - }, - "uniqueItems": { - "anyOf": [ - { - "type": "boolean", - "default": false - }, - { "$ref": "#/definitions/$data" } - ] - }, - "maxProperties": { - "anyOf": [ - { "$ref": "#/definitions/positiveInteger" }, - { "$ref": "#/definitions/$data" } - ] - }, - "minProperties": { - "anyOf": [ - { "$ref": "#/definitions/positiveIntegerDefault0" }, - { "$ref": "#/definitions/$data" } - ] - }, - "required": { - "anyOf": [ - { "$ref": "#/definitions/stringArray" }, - { "$ref": "#/definitions/$data" } - ] - }, - "additionalProperties": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" }, - { "$ref": "#/definitions/$data" } - ], - "default": {} - }, - "definitions": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "properties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "patternProperties": { - "type": "object", - "additionalProperties": { "$ref": "#" }, - "default": {} - }, - "dependencies": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { "$ref": "#" }, - { "$ref": "#/definitions/stringArray" } - ] - } - }, - "enum": { - "anyOf": [ - { - "type": "array", - "minItems": 1, - "uniqueItems": true - }, - { "$ref": "#/definitions/$data" } - ] - }, - "type": { - "anyOf": [ - { "$ref": "#/definitions/simpleTypes" }, - { - "type": "array", - "items": { "$ref": "#/definitions/simpleTypes" }, - "minItems": 1, - "uniqueItems": true - } - ] - }, - "allOf": { "$ref": "#/definitions/schemaArray" }, - "anyOf": { "$ref": "#/definitions/schemaArray" }, - "oneOf": { "$ref": "#/definitions/schemaArray" }, - "not": { "$ref": "#" }, - "format": { - "anyOf": [ - { "type": "string" }, - { "$ref": "#/definitions/$data" } - ] - }, - "formatMaximum": { - "anyOf": [ - { "type": "string" }, - { "$ref": "#/definitions/$data" } - ] - }, - "formatMinimum": { - "anyOf": [ - { "type": "string" }, - { "$ref": "#/definitions/$data" } - ] - }, - "formatExclusiveMaximum": { - "anyOf": [ - { - "type": "boolean", - "default": false - }, - { "$ref": "#/definitions/$data" } - ] - }, - "formatExclusiveMinimum": { - "anyOf": [ - { - "type": "boolean", - "default": false - }, - { "$ref": "#/definitions/$data" } - ] - }, - "constant": { + "type": { "anyOf": [ - {}, - { "$ref": "#/definitions/$data" } + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } ] }, - "contains": { "$ref": "#" }, - "patternGroups": { - "type": "object", - "additionalProperties": { - "type": "object", - "required": [ "schema" ], - "properties": { - "maximum": { - "anyOf": [ - { "$ref": "#/definitions/positiveInteger" }, - { "$ref": "#/definitions/$data" } - ] - }, - "minimum": { - "anyOf": [ - { "$ref": "#/definitions/positiveIntegerDefault0" }, - { "$ref": "#/definitions/$data" } - ] - }, - "schema": { "$ref": "#" } - }, - "additionalProperties": false - }, - "default": {} - }, - "switch": { - "type": "array", - "items": { - "required": [ "then" ], - "properties": { - "if": { "$ref": "#" }, - "then": { - "anyOf": [ - { "type": "boolean" }, - { "$ref": "#" } - ] - }, - "continue": { "type": "boolean" } - }, - "additionalProperties": false, - "dependencies": { - "continue": [ "if" ] - } - } - } - }, - "dependencies": { - "exclusiveMaximum": [ "maximum" ], - "exclusiveMinimum": [ "minimum" ], - "formatMaximum": [ "format" ], - "formatMinimum": [ "format" ], - "formatExclusiveMaximum": [ "formatMaximum" ], - "formatExclusiveMinimum": [ "formatMinimum" ] + "format": { "type": "string" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" } }, "default": {} } },{}],40:[function(require,module,exports){ -'use strict'; - -var META_SCHEMA_ID = 'https://raw.githubusercontent.com/epoberezkin/ajv/master/lib/refs/json-schema-v5.json'; - -module.exports = { - enable: enableV5, - META_SCHEMA_ID: META_SCHEMA_ID -}; - - -function enableV5(ajv) { - var inlineFunctions = { - 'switch': require('./dotjs/switch'), - 'constant': require('./dotjs/constant'), - '_formatLimit': require('./dotjs/_formatLimit'), - 'patternRequired': require('./dotjs/patternRequired') - }; - - if (ajv._opts.meta !== false) { - var metaSchema = require('./refs/json-schema-v5.json'); - ajv.addMetaSchema(metaSchema, META_SCHEMA_ID); - } - _addKeyword('constant'); - ajv.addKeyword('contains', { type: 'array', macro: containsMacro }); - - _addKeyword('formatMaximum', 'string', inlineFunctions._formatLimit); - _addKeyword('formatMinimum', 'string', inlineFunctions._formatLimit); - ajv.addKeyword('formatExclusiveMaximum'); - ajv.addKeyword('formatExclusiveMinimum'); - - ajv.addKeyword('patternGroups'); // implemented in properties.jst - _addKeyword('patternRequired', 'object'); - _addKeyword('switch'); - - - function _addKeyword(keyword, types, inlineFunc) { - var definition = { - inline: inlineFunc || inlineFunctions[keyword], - statements: true, - errors: 'full' - }; - if (types) definition.type = types; - ajv.addKeyword(keyword, definition); - } -} - - -function containsMacro(schema) { - return { - not: { items: { not: schema } } - }; -} - -},{"./dotjs/_formatLimit":13,"./dotjs/constant":20,"./dotjs/patternRequired":30,"./dotjs/switch":34,"./refs/json-schema-v5.json":39}],41:[function(require,module,exports){ /** * slice() reference. @@ -5608,7 +5170,135 @@ function isObject(val) { return Object == val.constructor; } +},{}],41:[function(require,module,exports){ +'use strict'; + +module.exports = function equal(a, b) { + if (a === b) return true; + + var arrA = Array.isArray(a) + , arrB = Array.isArray(b) + , i; + + if (arrA && arrB) { + if (a.length != b.length) return false; + for (i = 0; i < a.length; i++) + if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + if (a && b && typeof a === 'object' && typeof b === 'object') { + var keys = Object.keys(a); + if (keys.length !== Object.keys(b).length) return false; + + var dateA = a instanceof Date + , dateB = b instanceof Date; + if (dateA && dateB) return a.getTime() == b.getTime(); + if (dateA != dateB) return false; + + var regexpA = a instanceof RegExp + , regexpB = b instanceof RegExp; + if (regexpA && regexpB) return a.toString() == b.toString(); + if (regexpA != regexpB) return false; + + for (i = 0; i < keys.length; i++) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = 0; i < keys.length; i++) + if(!equal(a[keys[i]], b[keys[i]])) return false; + + return true; + } + + return false; +}; + },{}],42:[function(require,module,exports){ +'use strict'; + +var traverse = module.exports = function (schema, opts, cb) { + if (typeof opts == 'function') { + cb = opts; + opts = {}; + } + _traverse(opts, cb, schema, '', schema); +}; + + +traverse.keywords = { + additionalItems: true, + items: true, + contains: true, + additionalProperties: true, + propertyNames: true, + not: true +}; + +traverse.arrayKeywords = { + items: true, + allOf: true, + anyOf: true, + oneOf: true +}; + +traverse.propsKeywords = { + definitions: true, + properties: true, + patternProperties: true, + dependencies: true +}; + +traverse.skipKeywords = { + enum: true, + const: true, + required: true, + maximum: true, + minimum: true, + exclusiveMaximum: true, + exclusiveMinimum: true, + multipleOf: true, + maxLength: true, + minLength: true, + pattern: true, + format: true, + maxItems: true, + minItems: true, + uniqueItems: true, + maxProperties: true, + minProperties: true +}; + + +function _traverse(opts, cb, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) { + if (schema && typeof schema == 'object' && !Array.isArray(schema)) { + cb(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex); + for (var key in schema) { + var sch = schema[key]; + if (Array.isArray(sch)) { + if (key in traverse.arrayKeywords) { + for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. - * @param {Object} options optional options with properties `separator` and `dataVar`. - * @return {String} human readable string with all errors descriptions - */ - function errorsText(errors, options) { - errors = errors || self.errors; - if (!errors) return 'No errors'; - options = options || {}; - var separator = options.separator === undefined ? ', ' : options.separator; - var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + var schemaObj = new SchemaObject({ + id: id, + schema: schema, + localRefs: localRefs, + cacheKey: cacheKey, + meta: meta + }); - var text = ''; - for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used. + * @param {Object} options optional options with properties `separator` and `dataVar`. + * @return {String} human readable string with all errors descriptions + */ +function errorsText(errors, options) { + errors = errors || this.errors; + if (!errors) return 'No errors'; + options = options || {}; + var separator = options.separator === undefined ? ', ' : options.separator; + var dataVar = options.dataVar === undefined ? 'data' : options.dataVar; + + var text = ''; + for (var i=0; i=1&&t<=12&&a>=1&&a<=m[t]}function o(e,r){var t=e.match(v);if(!t)return!1;var a=t[1],s=t[2],o=t[3],i=t[5];return a<=23&&s<=59&&o<=59&&(!r||i)}function i(e){var r=e.split(b);return 2==r.length&&s(r[0])&&o(r[1],!0)}function n(e){return e.length<=255&&y.test(e)}function l(e){return w.test(e)&&g.test(e)}function c(e){try{return new RegExp(e),!0}catch(e){return!1}}function h(e,r){if(e&&r)return e>r?1:er?1:e=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function i(e,r,t){var a=n.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function n(e,r,t){for(var a=0;a=55296&&r<=56319&&s=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(o="data"+(r-a||""),!s)return o}for(var n=o,c=s.split("/"),h=0;h",S="result"+s,$=e.opts.v5&&i&&i.$data;if($?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",g="schema"+s):g=i,w){var x=e.util.getData(b.$data,o,e.dataPathArr),_="exclusive"+s,O="op"+s,R="' + "+O+" + '";a+=" var schemaExcl"+s+" = "+x+"; ",x="schemaExcl"+s,a+=" if (typeof "+x+" != 'boolean' && "+x+" !== undefined) { "+u+" = false; ";var t=E,I=I||[];I.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(t||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: '"+E+" should be boolean' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;a=I.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(p+="}",a+=" else { "),$&&(a+=" if ("+g+" === undefined) "+u+" = true; else if (typeof "+g+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+S+" = "+y+"("+h+", ",a+=$?""+g:""+e.util.toQuotedString(i),a+=" ); if ("+S+" === undefined) "+u+" = false; var "+_+" = "+x+" === true; if ("+u+" === undefined) { "+u+" = "+_+" ? "+S+" "+j+" 0 : "+S+" "+j+"= 0; } if (!"+u+") var op"+s+" = "+_+" ? '"+j+"' : '"+j+"=';"}else{var _=!0===b,R=j;_||(R+="=");var O="'"+R+"'";$&&(a+=" if ("+g+" === undefined) "+u+" = true; else if (typeof "+g+" != 'string') "+u+" = false; else { ",p+="}"),d&&(a+=" if (!"+y+") "+u+" = true; else { ",p+="}"),a+=" var "+S+" = "+y+"("+h+", ",a+=$?""+g:""+e.util.toQuotedString(i),a+=" ); if ("+S+" === undefined) "+u+" = false; if ("+u+" === undefined) "+u+" = "+S+" "+j,_||(a+="="),a+=" 0;"}a+=p+"if (!"+u+") { ";var t=r,I=I||[];I.push(a),a="",!1!==e.createErrors?(a+=" { keyword: '"+(t||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { comparison: "+O+", limit: ",a+=$?""+g:""+e.util.toQuotedString(i),a+=" , exclusive: "+_+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be "+R+' "',a+=$?"' + "+g+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=$?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var A=a;return a=I.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="}"}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maximum"==r,p=d?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[p],v=e.opts.v5&&m&&m.$data,y=d?"<":">",g=d?">":"<";if(v){var P=e.util.getData(m.$data,i,e.dataPathArr),E="exclusive"+o,b="op"+o,w="' + "+b+" + '";s+=" var schemaExcl"+o+" = "+P+"; ",P="schemaExcl"+o,s+=" var exclusive"+o+"; if (typeof "+P+" != 'boolean' && typeof "+P+" != 'undefined') { ";var t=p,j=j||[];j.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var S=s;s=j.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ((exclusive"+o+" = "+P+" === true) ? "+u+" "+g+"= "+a+" : "+u+" "+g+" "+a+") || "+u+" !== "+u+") { var op"+o+" = exclusive"+o+" ? '"+y+"' : '"+y+"=';"}else{var E=!0===m,w=y;E||(w+="=");var b="'"+w+"'";s+=" if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+u+" "+g,E&&(s+="="),s+=" "+a+" || "+u+" !== "+u+") {"}var t=r,j=j||[];j.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+b+", limit: "+a+", exclusive: "+E+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+w+" ",s+=f?"' + "+a:n+"'"),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var S=s;return s=j.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+S+"]); ":" validate.errors = ["+S+"]; return false; ":" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",h&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxItems"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+u+".length "+d+" "+a+") { ";var t=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"less",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",h&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxLength"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+u+".length ":" ucs2length("+u+") ",s+=" "+d+" "+a+") { ";var t=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n, -s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",h&&(s+=" else { "),s}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),c=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(i||""),f=e.opts.v5&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxProperties"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" Object.keys("+u+").length "+d+" "+a+") { ";var t=r,p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(t||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"less",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),s+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",h&&(s+=" else { "),s}},{}],18:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.schema[r],s=e.schemaPath+e.util.getProperty(r),o=e.errSchemaPath+"/"+r,i=!e.opts.allErrors,n=e.util.copy(e),l="";n.level++;var c="valid"+n.level,h=n.baseId,u=!0,f=a;if(f)for(var d,p=-1,m=f.length-1;p "+$+") { ";var _=c+"["+$+"]";f.schema=S,f.schemaPath=i+"["+$+"]",f.errSchemaPath=n+"/"+$,f.errorPath=e.util.getPathExpr(e.errorPath,$,e.opts.jsonPointers,!0),f.dataPathArr[v]=$;var O=e.validate(f);f.baseId=g,e.util.varOccurences(O,y)<2?t+=" "+e.util.varReplace(O,y,_)+" ":t+=" var "+y+" = "+_+"; "+O+" ",t+=" } ",l&&(t+=" if ("+p+") { ",d+="}")}if("object"==typeof P&&e.util.schemaHasRules(P,e.RULES.all)){f.schema=P,f.schemaPath=e.schemaPath+".additionalItems",f.errSchemaPath=e.errSchemaPath+"/additionalItems",t+=" "+p+" = true; if ("+c+".length > "+o.length+") { for (var "+m+" = "+o.length+"; "+m+" < "+c+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var _=c+"["+m+"]";f.dataPathArr[v]=m;var O=e.validate(f);f.baseId=g,e.util.varOccurences(O,y)<2?t+=" "+e.util.varReplace(O,y,_)+" ":t+=" var "+y+" = "+_+"; "+O+" ",l&&(t+=" if (!"+p+") break; "),t+=" } } ",l&&(t+=" if ("+p+") { ",d+="}")}}else if(e.util.schemaHasRules(o,e.RULES.all)){f.schema=o,f.schemaPath=i,f.errSchemaPath=n,t+=" for (var "+m+" = 0; "+m+" < "+c+".length; "+m+"++) { ",f.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var _=c+"["+m+"]";f.dataPathArr[v]=m;var O=e.validate(f);f.baseId=g,e.util.varOccurences(O,y)<2?t+=" "+e.util.varReplace(O,y,_)+" ":t+=" var "+y+" = "+_+"; "+O+" ",l&&(t+=" if (!"+p+") break; "),t+=" } ",l&&(t+=" if ("+p+") { ",d+="}")}return l&&(t+=" "+d+" if ("+u+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],26:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(o||""),u=e.opts.v5&&i&&i.$data;u?(a+=" var schema"+s+" = "+e.util.getData(i.$data,o,e.dataPathArr)+"; ",t="schema"+s):t=i,a+="var division"+s+";if (",u&&(a+=" "+t+" !== undefined && ( typeof "+t+" != 'number' || "),a+=" (division"+s+" = "+h+" / "+t+", ",a+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+s+") - division"+s+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+s+" !== parseInt(division"+s+") ",a+=" ) ",u&&(a+=" ) "),a+=" ) { ";var f=f||[];f.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { multipleOf: "+t+" } ",!1!==e.opts.messages&&(a+=" , message: 'should be multiple of ",a+=u?"' + "+t:i+"'"),e.opts.verbose&&(a+=" , schema: ",a+=u?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var d=a;return a=f.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+d+"]); ":" validate.errors = ["+d+"]; return false; ":" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+="} ",c&&(a+=" else { "),a}},{}],27:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="errs__"+a,u=e.util.copy(e);u.level++;var f="valid"+u.level;if(e.util.schemaHasRules(o,e.RULES.all)){u.schema=o,u.schemaPath=i,u.errSchemaPath=n,t+=" var "+h+" = errors; ";var d=e.compositeRule;e.compositeRule=u.compositeRule=!0,u.createErrors=!1;var p;u.opts.allErrors&&(p=u.opts.allErrors,u.opts.allErrors=!1),t+=" "+e.validate(u)+" ",u.createErrors=!0,p&&(u.opts.allErrors=p),e.compositeRule=u.compositeRule=d,t+=" if ("+f+") { ";var m=m||[];m.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be valid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var v=t;t=m.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(t+=" } ")}else t+=" var err = ",!1!==e.createErrors?(t+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: {} ",!1!==e.opts.messages&&(t+=" , message: 'should NOT be valid' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ",t+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(t+=" if (false) { ");return t}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u="errs__"+a,f=e.util.copy(e),d="";f.level++;var p="valid"+f.level;t+="var "+u+" = errors;var prevValid"+a+" = false;var "+h+" = false;";var m=f.baseId,v=e.compositeRule;e.compositeRule=f.compositeRule=!0;var y=o;if(y)for(var g,P=-1,E=y.length-1;P5)t+=" || validate.schema"+i+"["+m+"] ";else{var q=g;if(q)for(var D,L=-1,Q=q.length-1;L= "+pe+"; ",n=e.errSchemaPath+"/patternGroups/minimum",t+=" if (!"+h+") { ";var G=G||[];G.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { reason: '"+ye+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(M)+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have "+ge+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(M)+"\"' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var K=t;t=G.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } ",void 0!==me&&(t+=" else ")}if(void 0!==me){var ve=me,ye="maximum",ge="more";t+=" "+h+" = pgPropCount"+a+" <= "+me+"; ",n=e.errSchemaPath+"/patternGroups/maximum",t+=" if (!"+h+") { ";var G=G||[];G.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { reason: '"+ye+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(M)+"' } ",!1!==e.opts.messages&&(t+=" , message: 'should NOT have "+ge+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(M)+"\"' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var K=t;t=G.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+K+"]); ":" validate.errors = ["+K+"]; return false; ":" var err = "+K+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } "}n=J,l&&(t+=" if ("+h+") { ",d+="}")}}}}return l&&(t+=" "+d+" if ("+u+" == errors) {"),t=e.util.cleanUpCode(t)}},{}],32:[function(e,r,t){"use strict";r.exports=function(e,r){var t,a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.errSchemaPath+"/"+r,c=!e.opts.allErrors,h="data"+(i||""),u="valid"+o;if("#"==n||"#/"==n)e.isRoot?(t=e.async,a="validate"):(t=!0===e.root.schema.$async,a="root.refVal[0]");else{var f=e.resolveRef(e.baseId,n,e.isRoot);if(void 0===f){var d="can't resolve reference "+n+" from id "+e.baseId;if("fail"==e.opts.missingRefs){console.log(d);var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(n)+"' } ",!1!==e.opts.messages&&(s+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(n)+"' "),e.opts.verbose&&(s+=" , schema: "+e.util.toQuotedString(n)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),s+=" } "):s+=" {} ";var m=s;s=p.pop(),s+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(s+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs){var v=new Error(d);throw v.missingRef=e.resolve.url(e.baseId,n),v.missingSchema=e.resolve.normalizeId(e.resolve.fullPath(v.missingRef)),v}console.log(d),c&&(s+=" if (true) { ")}}else if(f.inline){var y=e.util.copy(e);y.level++;var g="valid"+y.level;y.schema=f.schema,y.schemaPath="",y.errSchemaPath=n;var P=e.validate(y).replace(/validate\.schema/g,f.code);s+=" "+P+" ",c&&(s+=" if ("+g+") { ")}else t=!0===f.$async,a=f.code}if(a){var p=p||[];p.push(s),s="",s+=e.opts.passContext?" "+a+".call(this, ":" "+a+"( ",s+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(s+=" + "+e.errorPath);s+=" , "+(i?"data"+(i-1||""):"parentData")+" , "+(i?e.dataPathArr[i]:"parentDataProperty")+", rootData) ";var E=s;if(s=p.pop(),t){if(!e.async)throw new Error("async schema referenced by sync schema");s+=" try { ",c&&(s+="var "+u+" ="),s+=" "+e.yieldAwait+" "+E+"; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ",c&&(s+=" if ("+u+") { ")}else s+=" if (!"+E+") { if (vErrors === null) vErrors = "+a+".errors; else vErrors = vErrors.concat("+a+".errors); errors = vErrors.length; } ",c&&(s+=" else { ")}return s}},{}],33:[function(e,r,t){"use strict";r.exports=function(e,r){var t=" ",a=e.level,s=e.dataLevel,o=e.schema[r],i=e.schemaPath+e.util.getProperty(r),n=e.errSchemaPath+"/"+r,l=!e.opts.allErrors,c="data"+(s||""),h="valid"+a,u=e.opts.v5&&o&&o.$data;u&&(t+=" var schema"+a+" = "+e.util.getData(o.$data,s,e.dataPathArr)+"; ");var f="schema"+a;if(!u)if(o.length=e.opts.loopRequired;if(l)if(t+=" var missing"+a+"; ",E){u||(t+=" var "+f+" = validate.schema"+i+"; ");var b="i"+a,w="schema"+a+"["+b+"]",j="' + "+w+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(P,w,e.opts.jsonPointers)),t+=" var "+h+" = true; ",u&&(t+=" if (schema"+a+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+a+")) "+h+" = false; else {"),t+=" for (var "+b+" = 0; "+b+" < "+f+".length; "+b+"++) { "+h+" = "+c+"["+f+"["+b+"]] !== undefined; if (!"+h+") break; } ",u&&(t+=" } "),t+=" if (!"+h+") { ";var S=S||[];S.push(t),t="",!1!==e.createErrors?(t+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(n)+" , params: { missingProperty: '"+j+"' } ",!1!==e.opts.messages&&(t+=" , message: '",t+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+j+"\\'",t+="' "),e.opts.verbose&&(t+=" , schema: validate.schema"+i+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),t+=" } "):t+=" {} ";var $=t;t=S.pop(),t+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+$+"]); ":" validate.errors = ["+$+"]; return false; ":" var err = "+$+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",t+=" } else { "}else{t+=" if ( ";var x=d;if(x)for(var _,b=-1,O=x.length-1;b 1) { var i = "+h+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+u+" = false; break outer; } } } } ",f&&(a+=" } "),a+=" if (!"+u+") { ";var d=d||[];d.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(a+=" , schema: ",a+=f?"validate.schema"+n:""+i,a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),a+=" } "):a+=" {} ";var p=a;a=d.pop(),a+=!e.compositeRule&&c?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",c&&(a+=" else { ")}else c&&(a+=" if (true) { ");return a}},{}],36:[function(e,r,t){"use strict";r.exports=function(e,r){function t(r){return void 0!==e.schema[r.keyword]||"properties"==r.keyword&&(!1===e.schema.additionalProperties||"object"==typeof e.schema.additionalProperties||e.schema.patternProperties&&Object.keys(e.schema.patternProperties).length||e.opts.v5&&e.schema.patternGroups&&Object.keys(e.schema.patternGroups).length)}var a="",s=!0===e.schema.$async;if(e.isTop){var o=e.isTop,i=e.level=0,n=e.dataLevel=0,l="data";if(e.rootId=e.resolve.fullPath(e.root.schema.id),e.baseId=e.baseId||e.rootId,s){e.async=!0;var c="es7"==e.opts.async;e.yieldAwait=c?"await":"yield"}delete e.isTop,e.dataPathArr=[void 0],a+=" var validate = ",s?c?a+=" (async function ":("co*"==e.opts.async&&(a+="co.wrap"),a+="(function* "):a+=" (function ",a+=" (data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; var vErrors = null; ",a+=" var errors = 0; ",a+=" if (rootData === undefined) rootData = data;"}else{var i=e.level,n=e.dataLevel,l="data"+(n||"");if(e.schema.id&&(e.baseId=e.resolve.url(e.baseId,e.schema.id)),s&&!e.async)throw new Error("async schema in sync schema");a+=" var errs_"+i+" = errors;"}var h="valid"+i,u=!e.opts.allErrors,f="",d="",p=e.schema.type,m=Array.isArray(p);if(p&&e.opts.coerceTypes){var v=e.util.coerceToTypes(e.opts.coerceTypes,p);if(v){var y=e.schemaPath+".type",g=e.errSchemaPath+"/type",P=m?"checkDataTypes":"checkDataType";a+=" if ("+e.util[P](p,l,!0)+") { ";var E="dataType"+i,b="coerced"+i;a+=" var "+E+" = typeof "+l+"; ","array"==e.opts.coerceTypes&&(a+=" if ("+E+" == 'object' && Array.isArray("+l+")) "+E+" = 'array'; "),a+=" var "+b+" = undefined; ";var w="",j=v;if(j)for(var S,$=-1,x=j.length-1;$2&&(r=f.call(arguments,1)),t(r)})})}function i(e){return Promise.all(e.map(s,this))}function n(e){for(var r=new e.constructor,t=Object.keys(e),a=[],o=0;o="0"&&s<="9";)r+=s,c();if("."===s)for(r+=".";c()&&s>="0"&&s<="9";)r+=s;if("e"===s||"E"===s)for(r+=s,c(),"-"!==s&&"+"!==s||(r+=s,c());s>="0"&&s<="9";)r+=s,c();if(e=+r,isFinite(e))return e;l("Bad number")},u=function(){var e,r,t,a="";if('"'===s)for(;c();){if('"'===s)return c(),a;if("\\"===s)if(c(),"u"===s){for(t=0,r=0;r<4&&(e=parseInt(c(),16),isFinite(e));r+=1)t=16*t+e;a+=String.fromCharCode(t)}else{if("string"!=typeof n[s])break;a+=n[s]}else a+=s}l("Bad string")},f=function(){for(;s&&s<=" ";)c()},d=function(){switch(s){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}l("Unexpected '"+s+"'")},p=function(){var e=[];if("["===s){if(c("["),f(),"]"===s)return c("]"),e;for(;s;){if(e.push(i()),f(),"]"===s)return c("]"),e;c(","),f()}}l("Bad array")},m=function(){var e,r={};if("{"===s){if(c("{"),f(),"}"===s)return c("}"),r;for(;s;){if(e=u(),f(),c(":"),Object.hasOwnProperty.call(r,e)&&l('Duplicate key "'+e+'"'),r[e]=i(),f(),"}"===s)return c("}"),r;c(","),f()}}l("Bad object")};i=function(){switch(f(),s){case"{":return m();case"[":return p();case'"':return u();case"-":return h();default:return s>="0"&&s<="9"?h():d()}},r.exports=function(e,r){var t;return o=e,a=0,s=" ",t=i(),f(),s&&l("Syntax error"),"function"==typeof r?function e(t,a){var s,o,i=t[a];if(i&&"object"==typeof i)for(s in i)Object.prototype.hasOwnProperty.call(i,s)&&(o=e(i,s),void 0!==o?i[s]=o:delete i[s]);return r.call(t,a,i)}({"":t},""):t}},{}],45:[function(e,r,t){function a(e){return l.lastIndex=0,l.test(e)?'"'+e.replace(l,function(e){var r=c[e];return"string"==typeof r?r:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function s(e,r){var t,l,c,h,u,f=o,d=r[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),"function"==typeof n&&(d=n.call(r,e,d)),typeof d){case"string":return a(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(o+=i,u=[],"[object Array]"===Object.prototype.toString.apply(d)){for(h=d.length,t=0;t1&&(a=t[0]+"@",e=t[1]),e=e.replace(q,"."),a+i(e.split("."),r).join(".")}function l(e){for(var r,t,a=[],s=0,o=e.length;s=55296&&r<=56319&&s65535&&(e-=65536,r+=C(e>>>10&1023|55296),e=56320|1023&e),r+=C(e)}).join("")}function h(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:j}function u(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function f(e,r,t){var a=0;for(e=t?Q(e/_):e>>1,e+=Q(e/r);e>L*$>>1;a+=j)e=Q(e/L);return Q(a+(L+1)*e/(e+x))}function d(e){var r,t,a,s,i,n,l,u,d,p,m=[],v=e.length,y=0,g=R,P=O;for(t=e.lastIndexOf(I),t<0&&(t=0),a=0;a=128&&o("not-basic"),m.push(e.charCodeAt(a));for(s=t>0?t+1:0;s=v&&o("invalid-input"),u=h(e.charCodeAt(s++)),(u>=j||u>Q((w-y)/n))&&o("overflow"),y+=u*n,d=l<=P?S:l>=P+$?$:l-P,!(uQ(w/p)&&o("overflow"),n*=p;r=m.length+1,P=f(y-i,r,0==i),Q(y/r)>w-g&&o("overflow"),g+=Q(y/r),y%=r,m.splice(y++,0,g)}return c(m)}function p(e){var r,t,a,s,i,n,c,h,d,p,m,v,y,g,P,E=[];for(e=l(e),v=e.length,r=R,t=0,i=O,n=0;n=r&&mQ((w-t)/y)&&o("overflow"),t+=(c-r)*y,r=c,n=0;nw&&o("overflow"),m==r){for(h=t,d=j;p=d<=i?S:d>=i+$?$:d-i,!(h= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=j-S,Q=Math.floor,C=String.fromCharCode;if(E={version:"1.4.1",ucs2:{decode:l,encode:c},decode:d,encode:p,toASCII:v,toUnicode:m},"function"==typeof e&&"object"==typeof e.amd&&e.amd)e("punycode",function(){return E});else if(y&&g)if(t.exports==y)g.exports=E;else for(b in E)E.hasOwnProperty(b)&&(y[b]=E[b]);else s.punycode=E}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(e,r,t){"use strict";function a(e,r){return Object.prototype.hasOwnProperty.call(e,r)}r.exports=function(e,r,t,o){r=r||"&",t=t||"=";var i={};if("string"!=typeof e||0===e.length)return i;e=e.split(r);var n=1e3;o&&"number"==typeof o.maxKeys&&(n=o.maxKeys);var l=e.length;n>0&&l>n&&(l=n);for(var c=0;c=0?(h=p.substr(0,m),u=p.substr(m+1)):(h=p,u=""),f=decodeURIComponent(h),d=decodeURIComponent(u),a(i,f)?s(i[f])?i[f].push(d):i[f]=[i[f],d]:i[f]=d}return i};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],48:[function(e,r,t){"use strict";function a(e,r){if(e.map)return e.map(r);for(var t=[],a=0;a",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),v=["%","/","?",";","#"].concat(m),y=["/","?","#"],g={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},b=e("querystring");a.prototype.parse=function(e,r,t){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a127?A+="x":A+=I[k];if(!A.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var D=O.slice(0,j),L=O.slice(j+1),Q=I.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);Q&&(D.push(Q[1]),L.unshift(Q[2])),L.length&&(i="/"+L.join(".")+i),this.hostname=D.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),_||(this.hostname=l.toASCII(this.hostname));var C=this.port?":"+this.port:"";this.host=(this.hostname||"")+C,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!g[d])for(var j=0,R=m.length;j0)&&t.host.split("@");j&&(t.auth=j.shift(),t.host=t.hostname=j.shift())}return t.search=e.search,t.query=e.query,c.isNull(t.pathname)&&c.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t}if(!b.length)return t.pathname=null,t.path=t.search?"/"+t.search:null,t.href=t.format(),t;for(var S=b.slice(-1)[0],$=(t.host||e.host||b.length>1)&&("."===S||".."===S)||""===S,x=0,_=b.length;_>=0;_--)S=b[_],"."===S?b.splice(_,1):".."===S?(b.splice(_,1),x++):x&&(b.splice(_,1),x--);if(!y&&!g)for(;x--;x)b.unshift("..");!y||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),$&&"/"!==b.join("/").substr(-1)&&b.push("");var O=""===b[0]||b[0]&&"/"===b[0].charAt(0);if(w){t.hostname=t.host=O?"":b.length?b.shift():"";var j=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@");j&&(t.auth=j.shift(),t.host=t.hostname=j.shift())}return y=y||t.host&&b.length,y&&!O&&b.unshift(""),b.length?t.pathname=b.join("/"):(t.pathname=null,t.path=null),c.isNull(t.pathname)&&c.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},a.prototype.parseHost=function(){var e=this.host,r=u.exec(e);r&&(r=r[0],":"!==r&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)}},{"./util":51,punycode:46,querystring:49}],51:[function(e,r,t){"use strict";r.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],ajv:[function(e,r,t){"use strict";function a(e){return g.test(e)}function s(r){function t(e,r){var t;if("string"==typeof e){if(!(t=S(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=R(e);t=a.validate||I(a)}var s=t(r);return!0===t.$async?"*"==D._opts.async?m(s):s:(D.errors=t.errors,s)}function v(e,r){var t=R(e,void 0,r);return t.validate||I(t)}function E(e,r,t,a){if(Array.isArray(e))for(var s=0;s=1&&t<=12&&a>=1&&a<=f[t]}function o(e,r){var t=e.match(d);if(!t)return!1;var a=t[1],s=t[2],o=t[3],i=t[5];return a<=23&&s<=59&&o<=59&&(!r||i)}function i(e){var r=e.split(w);return 2==r.length&&s(r[0])&&o(r[1],!0)}function n(e){return e.length<=255&&p.test(e)}function l(e){return j.test(e)&&m.test(e)}function h(e){if(S.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var u=e("./util"),c=/^\d\d\d\d-(\d\d)-(\d\d)$/,f=[0,31,29,31,30,31,30,31,31,30,31,30,31],d=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d:\d\d)?$/i,p=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*$/i,m=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,v=/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,y=/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,g=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,P=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,E=/^(?:\/(?:[^~/]|~0|~1)*)*$|^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,b=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;r.exports=a,a.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^[0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s][0-2]\d:[0-5]\d:[0-5]\d(?:\.\d+)?(?:z|[+-]\d\d:\d\d)$/i,uri:/^(?:[a-z][a-z0-9+-.]*)(?::|\/)\/?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i,"uri-template":y,url:g,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:p,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:h,uuid:P,"json-pointer":E,"relative-json-pointer":b},a.full={date:s,time:o,"date-time":i,uri:l,"uri-reference":v,"uri-template":y,url:g,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&''*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:n,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:h,uuid:P,"json-pointer":E,"relative-json-pointer":b};var w=/t|\s/i,j=/\/|:/,S=/[^\\]\\Z/},{"./util":12}],7:[function(e,r,t){"use strict";function a(e,r,t,i){function b(){var e=V.validate,r=e.apply(null,arguments);return b.errors=e.errors,r}function w(e,t,s,o){var i=!t||t&&t.schema==e;if(t.schema!=r.schema)return a.call(D,e,t,s,o);var m=!0===e.$async,b=v({isTop:!0,schema:e,isRoot:i,baseId:o,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:p.MissingRef,RULES:T,validate:v,util:d,resolve:f,resolveRef:j,usePattern:$,useDefault:R,useCustomRule:O,opts:I,formats:N,self:D});b=c(A,h)+c(q,n)+c(L,l)+c(Q,u)+b,I.processCode&&(b=I.processCode(b));var w;try{w=new Function("self","RULES","formats","root","refVal","defaults","customRules","co","equal","ucs2length","ValidationError",b)(D,T,N,r,A,L,Q,y,P,g,E),A[0]=w}catch(e){throw console.error("Error compiling schema, function code:",b),e}return w.schema=e,w.errors=null,w.refs=k,w.refVal=A,w.root=i?w:t,m&&(w.$async=!0),!0===I.sourceCode&&(w.source={code:b,patterns:q,defaults:L}),w}function j(e,s,o){s=f.url(e,s);var i,n,l=k[s];if(void 0!==l)return i=A[l],n="refVal["+l+"]",F(i,n);if(!o&&r.refs){var h=r.refs[s];if(void 0!==h)return i=r.refVal[h],n=S(s,i),F(i,n)}n=S(s);var u=f.call(D,w,r,s);if(void 0===u){var c=t&&t[s];c&&(u=f.inlineRef(c,I.inlineRefs)?c:a.call(D,c,r,t,e))}if(void 0!==u)return x(s,u),F(u,n);_(s)}function S(e,r){var t=A.length;return A[t]=r,k[e]=t,"refVal"+t}function _(e){delete k[e]}function x(e,r){A[k[e]]=r}function F(e,r){return"object"==typeof e||"boolean"==typeof e?{code:r,schema:e,inline:!0}:{code:r,$async:e&&e.$async}}function $(e){var r=C[e];return void 0===r&&(r=C[e]=q.length,q[r]=e),"pattern"+r}function R(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return d.toQuotedString(e);case"object":if(null===e)return"null";var r=m(e),t=z[r];return void 0===t&&(t=z[r]=L.length,L[t]=e),"default"+t}}function O(e,r,t,a){var s=e.definition.validateSchema;if(s&&!1!==D._opts.validateSchema&&!s(r)){var o="keyword schema is invalid: "+D.errorsText(s.errors);if("log"!=D._opts.validateSchema)throw new Error(o);console.error(o)}var i,n=e.definition.compile,l=e.definition.inline,h=e.definition.macro;if(n)i=n.call(D,r,t,a);else if(h)i=h.call(D,r,t,a),!1!==I.validateSchema&&D.validateSchema(i,!0);else if(l)i=l.call(D,a,e.keyword,r,t);else if(!(i=e.definition.validate))return;if(void 0===i)throw new Error('custom keyword "'+e.keyword+'"failed to compile');var u=Q.length;return Q[u]=i,{code:"customRule"+u,validate:i}}var D=this,I=this._opts,A=[void 0],k={},q=[],C={},L=[],z={},Q=[];r=r||{schema:e,refVal:A,refs:k};var U=s.call(this,e,r,i),V=this._compilations[U.index];if(U.compiling)return V.callValidate=b;var N=this._formats,T=this.RULES;try{var M=w(e,r,t,i);V.validate=M;var B=V.callValidate;return B&&(B.schema=M.schema,B.errors=null,B.refs=M.refs,B.refVal=M.refVal,B.root=M.root,B.$async=M.$async,I.sourceCode&&(B.source=M.source)),M}finally{o.call(this,e,r,i)}}function s(e,r,t){var a=i.call(this,e,r,t);return a>=0?{index:a,compiling:!0}:(a=this._compilations.length,this._compilations[a]={schema:e,root:r,baseId:t},{index:a,compiling:!1})}function o(e,r,t){var a=i.call(this,e,r,t);a>=0&&this._compilations.splice(a,1)}function i(e,r,t){for(var a=0;a=55296&&r<=56319&&s=r)throw new Error("Cannot access property/index "+a+" levels up, current level is "+r);return t[r-a]}if(a>r)throw new Error("Cannot access data "+a+" levels up, current level is "+r);if(o="data"+(r-a||""),!s)return o}for(var n=o,h=s.split("/"),u=0;u",g=d?">":"<",P=void 0;if(v){var E=e.util.getData(m.$data,i,e.dataPathArr),b="exclusive"+o,w="exclType"+o,j="exclIsNumber"+o,S="' + "+(_="op"+o)+" + '";s+=" var schemaExcl"+o+" = "+E+"; ",s+=" var "+b+"; var "+w+" = typeof "+(E="schemaExcl"+o)+"; if ("+w+" != 'boolean' && "+w+" != 'undefined' && "+w+" != 'number') { ";P=p;(x=x||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+p+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";F=s;s=x.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+F+"]); ":" validate.errors = ["+F+"]; return false; ":" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+w+" == 'number' ? ( ("+b+" = "+a+" === undefined || "+E+" "+y+"= "+a+") ? "+c+" "+g+"= "+E+" : "+c+" "+g+" "+a+" ) : ( ("+b+" = "+E+" === true) ? "+c+" "+g+"= "+a+" : "+c+" "+g+" "+a+" ) || "+c+" !== "+c+") { var op"+o+" = "+b+" ? '"+y+"' : '"+y+"=';"}else{S=y;if((j="number"==typeof m)&&f){_="'"+S+"'";s+=" if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" ( "+a+" === undefined || "+m+" "+y+"= "+a+" ? "+c+" "+g+"= "+m+" : "+c+" "+g+" "+a+" ) || "+c+" !== "+c+") { "}else{j&&void 0===n?(b=!0,P=p,h=e.errSchemaPath+"/"+p,a=m,g+="="):(j&&(a=Math[d?"min":"max"](m,n)),m===(!j||a)?(b=!0,P=p,h=e.errSchemaPath+"/"+p,g+="="):(b=!1,S+="="));var _="'"+S+"'";s+=" if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+c+" "+g+" "+a+" || "+c+" !== "+c+") { "}}P=P||r;var x=x||[];x.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(P||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { comparison: "+_+", limit: "+a+", exclusive: "+b+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+S+" ",s+=f?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var F=s;return s=x.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+F+"]); ":" validate.errors = ["+F+"]; return false; ":" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { "),s}},{}],14:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),f=e.opts.$data&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxItems"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" "+c+".length "+d+" "+a+") { ";var p=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==r?"more":"less",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],15:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),f=e.opts.$data&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxLength"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=!1===e.opts.unicode?" "+c+".length ":" ucs2length("+c+") ",s+=" "+d+" "+a+") { ";var p=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(p||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==r?"longer":"shorter",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],16:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),f=e.opts.$data&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n;var d="maxProperties"==r?">":"<";s+="if ( ",f&&(s+=" ("+a+" !== undefined && typeof "+a+" != 'number') || "),s+=" Object.keys("+c+").length "+d+" "+a+") { ";var p=r,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { limit: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==r?"more":"less",s+=" than ",s+=f?"' + "+a+" + '":""+n,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],17:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.schema[r],o=e.schemaPath+e.util.getProperty(r),i=e.errSchemaPath+"/"+r,n=!e.opts.allErrors,l=e.util.copy(e),h="",u="valid"+ ++l.level,c=l.baseId,f=!0,d=s;if(d)for(var p,m=-1,v=d.length-1;m=0)return h&&(a+=" if (true) { "),a;throw new Error('unknown format "'+i+'" is used in schema at path "'+e.errSchemaPath+'"')}var v="object"==typeof m&&!(m instanceof RegExp)&&m.validate,y=v&&m.type||"string";if(v){var g=!0===m.async;m=m.validate}if(y!=t)return h&&(a+=" if (true) { "),a;if(g){if(!e.async)throw new Error("async format in sync schema");P="formats"+e.util.getProperty(i)+".validate";a+=" if (!("+e.yieldAwait+" "+P+"("+u+"))) { "}else{a+=" if (! ";var P="formats"+e.util.getProperty(i);v&&(P+=".validate"),a+="function"==typeof m?" "+P+"("+u+") ":" "+P+".test("+u+") ",a+=") { "}}var E=E||[];E.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",a+=f?""+c:""+e.util.toQuotedString(i),a+=" } ",!1!==e.opts.messages&&(a+=" , message: 'should match format \"",a+=f?"' + "+c+" + '":""+e.util.escapeQuotes(i),a+="\"' "),e.opts.verbose&&(a+=" , schema: ",a+=f?"validate.schema"+n:""+e.util.toQuotedString(i),a+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var b=a;return a=E.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+b+"]); ":" validate.errors = ["+b+"]; return false; ":" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",h&&(a+=" else { "),a}},{}],25:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,f="errs__"+s,d=e.util.copy(e),p="",m="valid"+ ++d.level,v="i"+s,y=d.dataLevel=e.dataLevel+1,g="data"+y,P=e.baseId;if(a+="var "+f+" = errors;var "+c+";",Array.isArray(i)){var E=e.schema.additionalItems;if(!1===E){a+=" "+c+" = "+u+".length <= "+i.length+"; ";var b=l;l=e.errSchemaPath+"/additionalItems",a+=" if (!"+c+") { ";var w=w||[];w.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i.length+" } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have more than "+i.length+" items' "),e.opts.verbose&&(a+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var j=a;a=w.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",l=b,h&&(p+="}",a+=" else { ")}var S=i;if(S)for(var _,x=-1,F=S.length-1;x "+x+") { ";$=u+"["+x+"]";d.schema=_,d.schemaPath=n+"["+x+"]",d.errSchemaPath=l+"/"+x,d.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),d.dataPathArr[y]=x;R=e.validate(d);d.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",a+=" } ",h&&(a+=" if ("+m+") { ",p+="}")}if("object"==typeof E&&e.util.schemaHasRules(E,e.RULES.all)){d.schema=E,d.schemaPath=e.schemaPath+".additionalItems",d.errSchemaPath=e.errSchemaPath+"/additionalItems",a+=" "+m+" = true; if ("+u+".length > "+i.length+") { for (var "+v+" = "+i.length+"; "+v+" < "+u+".length; "+v+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);$=u+"["+v+"]";d.dataPathArr[y]=v;R=e.validate(d);d.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",h&&(a+=" if (!"+m+") break; "),a+=" } } ",h&&(a+=" if ("+m+") { ",p+="}")}}else if(e.util.schemaHasRules(i,e.RULES.all)){d.schema=i,d.schemaPath=n,d.errSchemaPath=l,a+=" for (var "+v+" = 0; "+v+" < "+u+".length; "+v+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);var $=u+"["+v+"]";d.dataPathArr[y]=v;var R=e.validate(d);d.baseId=P,e.util.varOccurences(R,g)<2?a+=" "+e.util.varReplace(R,g,$)+" ":a+=" var "+g+" = "+$+"; "+R+" ",h&&(a+=" if (!"+m+") break; "),a+=" }"}return h&&(a+=" "+p+" if ("+f+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],26:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a,s=" ",o=e.level,i=e.dataLevel,n=e.schema[r],l=e.schemaPath+e.util.getProperty(r),h=e.errSchemaPath+"/"+r,u=!e.opts.allErrors,c="data"+(i||""),f=e.opts.$data&&n&&n.$data;f?(s+=" var schema"+o+" = "+e.util.getData(n.$data,i,e.dataPathArr)+"; ",a="schema"+o):a=n,s+="var division"+o+";if (",f&&(s+=" "+a+" !== undefined && ( typeof "+a+" != 'number' || "),s+=" (division"+o+" = "+c+" / "+a+", ",s+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+o+" !== parseInt(division"+o+") ",s+=" ) ",f&&(s+=" ) "),s+=" ) { ";var d=d||[];d.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { multipleOf: "+a+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=f?"' + "+a:a+"'"),e.opts.verbose&&(s+=" , schema: ",s+=f?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var p=s;return s=d.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+p+"]); ":" validate.errors = ["+p+"]; return false; ":" var err = "+p+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",u&&(s+=" else { "),s}},{}],27:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,f=e.util.copy(e),d="valid"+ ++f.level;if(e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=n,f.errSchemaPath=l,a+=" var "+c+" = errors; ";var p=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.createErrors=!1;var m;f.opts.allErrors&&(m=f.opts.allErrors,f.opts.allErrors=!1),a+=" "+e.validate(f)+" ",f.createErrors=!0,m&&(f.opts.allErrors=m),e.compositeRule=f.compositeRule=p,a+=" if ("+d+") { ";var v=v||[];v.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var y=a;a=v.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+y+"]); ":" validate.errors = ["+y+"]; return false; ":" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { errors = "+c+"; if (vErrors !== null) { if ("+c+") vErrors.length = "+c+"; else vErrors = null; } ",e.opts.allErrors&&(a+=" } ")}else a+=" var err = ",!1!==e.createErrors?(a+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(a+=" , message: 'should NOT be valid' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",h&&(a+=" if (false) { ");return a}},{}],28:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="valid"+s,f="errs__"+s,d=e.util.copy(e),p="",m="valid"+ ++d.level;a+="var "+f+" = errors;var prevValid"+s+" = false;var "+c+" = false;";var v=d.baseId,y=e.compositeRule;e.compositeRule=d.compositeRule=!0;var g=i;if(g)for(var P,E=-1,b=g.length-1;E5)a+=" || validate.schema"+n+"["+v+"] ";else{var C=b;if(C)for(var L=-1,z=C.length-1;L= "+me+"; ",l=e.errSchemaPath+"/patternGroups/minimum",a+=" if (!"+c+") { ",(Ee=Ee||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+ge+"', limit: "+ye+", pattern: '"+e.util.escapeQuotes(he)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have "+Pe+" than "+ye+' properties matching pattern "'+e.util.escapeQuotes(he)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";be=a;a=Ee.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+be+"]); ":" validate.errors = ["+be+"]; return false; ":" var err = "+be+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } ",void 0!==ve&&(a+=" else ")}if(void 0!==ve){var ye=ve,ge="maximum",Pe="more";a+=" "+c+" = pgPropCount"+s+" <= "+ve+"; ",l=e.errSchemaPath+"/patternGroups/maximum",a+=" if (!"+c+") { ";var Ee=Ee||[];Ee.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'patternGroups' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { reason: '"+ge+"', limit: "+ye+", pattern: '"+e.util.escapeQuotes(he)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'should NOT have "+Pe+" than "+ye+' properties matching pattern "'+e.util.escapeQuotes(he)+"\"' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var be=a;a=Ee.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+be+"]); ":" validate.errors = ["+be+"]; return false; ":" var err = "+be+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } "}l=te,h&&(a+=" if ("+c+") { ",p+="}")}}}}return h&&(a+=" "+p+" if ("+f+" == errors) {"),a=e.util.cleanUpCode(a)}},{}],31:[function(e,r,t){"use strict";r.exports=function(e,r,t){var a=" ",s=e.level,o=e.dataLevel,i=e.schema[r],n=e.schemaPath+e.util.getProperty(r),l=e.errSchemaPath+"/"+r,h=!e.opts.allErrors,u="data"+(o||""),c="errs__"+s,f=e.util.copy(e),d="valid"+ ++f.level;if(e.util.schemaHasRules(i,e.RULES.all)){f.schema=i,f.schemaPath=n,f.errSchemaPath=l;var p="key"+s,m="idx"+s,v="i"+s,y="' + "+p+" + '",g="data"+(f.dataLevel=e.dataLevel+1),P="dataProperties"+s,E=e.opts.ownProperties,b=e.baseId;a+=" var "+c+" = errors; ",E&&(a+=" var "+P+" = undefined; "),a+=E?" "+P+" = "+P+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+P+".length; "+m+"++) { var "+p+" = "+P+"["+m+"]; ":" for (var "+p+" in "+u+") { ",a+=" var startErrs"+s+" = errors; ";var w=p,j=e.compositeRule;e.compositeRule=f.compositeRule=!0;var S=e.validate(f);f.baseId=b,e.util.varOccurences(S,g)<2?a+=" "+e.util.varReplace(S,g,w)+" ":a+=" var "+g+" = "+w+"; "+S+" ",e.compositeRule=f.compositeRule=j,a+=" if (!"+d+") { for (var "+v+"=startErrs"+s+"; "+v+"=e.opts.loopRequired,w=e.opts.ownProperties;if(h)if(a+=" var missing"+s+"; ",b){f||(a+=" var "+d+" = validate.schema"+n+"; ");R="' + "+($="schema"+s+"["+(S="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,$,e.opts.jsonPointers)),a+=" var "+c+" = true; ",f&&(a+=" if (schema"+s+" === undefined) "+c+" = true; else if (!Array.isArray(schema"+s+")) "+c+" = false; else {"),a+=" for (var "+S+" = 0; "+S+" < "+d+".length; "+S+"++) { "+c+" = "+u+"["+d+"["+S+"]] !== undefined ",w&&(a+=" && Object.prototype.hasOwnProperty.call("+u+", "+d+"["+S+"]) "),a+="; if (!"+c+") break; } ",f&&(a+=" } "),a+=" if (!"+c+") { ",(x=x||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+R+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+R+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";F=a;a=x.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+F+"]); ":" validate.errors = ["+F+"]; return false; ":" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else{a+=" if ( ";var j=p;if(j)for(var S=-1,_=j.length-1;S<_;)D=j[S+=1],S&&(a+=" || "),a+=" ( ( "+(q=u+(k=e.util.getProperty(D)))+" === undefined ",w&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(D)+"') "),a+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:k)+") ) ";a+=") { ";R="' + "+($="missing"+s)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(E,$,!0):E+" + "+$);var x=x||[];x.push(a),a="",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+R+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+R+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var F=a;a=x.pop(),a+=!e.compositeRule&&h?e.async?" throw new ValidationError(["+F+"]); ":" validate.errors = ["+F+"]; return false; ":" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",a+=" } else { "}else if(b){f||(a+=" var "+d+" = validate.schema"+n+"; ");var $="schema"+s+"["+(S="i"+s)+"]",R="' + "+$+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(E,$,e.opts.jsonPointers)),f&&(a+=" if ("+d+" && !Array.isArray("+d+")) { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+R+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+R+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+d+" !== undefined) { "),a+=" for (var "+S+" = 0; "+S+" < "+d+".length; "+S+"++) { if ("+u+"["+d+"["+S+"]] === undefined ",w&&(a+=" || ! Object.prototype.hasOwnProperty.call("+u+", "+d+"["+S+"]) "),a+=") { var err = ",!1!==e.createErrors?(a+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+R+"' } ",!1!==e.opts.messages&&(a+=" , message: '",a+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+R+"\\'",a+="' "),e.opts.verbose&&(a+=" , schema: validate.schema"+n+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ",a+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",f&&(a+=" } ")}else{var O=p;if(O)for(var D,I=-1,A=O.length-1;I 1) { var i = "+c+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+c+"[i], "+c+"[j])) { "+f+" = false; break outer; } } } } ",d&&(s+=" } "),s+=" if (!"+f+") { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(h)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=d?"validate.schema"+l:""+n,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),s+=" } "):s+=" {} ";var m=s;s=p.pop(),s+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",u&&(s+=" else { ")}else u&&(s+=" if (true) { ");return s}},{}],35:[function(e,r,t){"use strict";r.exports=function(e,r,t){function a(e){for(var r=e.rules,t=0;t2&&(r=f.call(arguments,1)),t(r)})})}function i(e){return Promise.all(e.map(s,this))}function n(e){for(var r=new e.constructor,t=Object.keys(e),a=[],o=0;o="0"&&s<="9";)r+=s,h();if("."===s)for(r+=".";h()&&s>="0"&&s<="9";)r+=s;if("e"===s||"E"===s)for(r+=s,h(),"-"!==s&&"+"!==s||(r+=s,h());s>="0"&&s<="9";)r+=s,h();if(e=+r,isFinite(e))return e;l("Bad number")},c=function(){var e,r,t,a="";if('"'===s)for(;h();){if('"'===s)return h(),a;if("\\"===s)if(h(),"u"===s){for(t=0,r=0;r<4&&(e=parseInt(h(),16),isFinite(e));r+=1)t=16*t+e;a+=String.fromCharCode(t)}else{if("string"!=typeof n[s])break;a+=n[s]}else a+=s}l("Bad string")},f=function(){for(;s&&s<=" ";)h()},d=function(){switch(s){case"t":return h("t"),h("r"),h("u"),h("e"),!0;case"f":return h("f"),h("a"),h("l"),h("s"),h("e"),!1;case"n":return h("n"),h("u"),h("l"),h("l"),null}l("Unexpected '"+s+"'")},p=function(){var e=[];if("["===s){if(h("["),f(),"]"===s)return h("]"),e;for(;s;){if(e.push(i()),f(),"]"===s)return h("]"),e;h(","),f()}}l("Bad array")},m=function(){var e,r={};if("{"===s){if(h("{"),f(),"}"===s)return h("}"),r;for(;s;){if(e=c(),f(),h(":"),Object.hasOwnProperty.call(r,e)&&l('Duplicate key "'+e+'"'),r[e]=i(),f(),"}"===s)return h("}"),r;h(","),f()}}l("Bad object")};i=function(){switch(f(),s){case"{":return m();case"[":return p();case'"':return c();case"-":return u();default:return s>="0"&&s<="9"?u():d()}},r.exports=function(e,r){var t;return o=e,a=0,s=" ",t=i(),f(),s&&l("Syntax error"),"function"==typeof r?function e(t,a){var s,o,i=t[a];if(i&&"object"==typeof i)for(s in i)Object.prototype.hasOwnProperty.call(i,s)&&(void 0!==(o=e(i,s))?i[s]=o:delete i[s]);return r.call(t,a,i)}({"":t},""):t}},{}],46:[function(e,r,t){function a(e){return l.lastIndex=0,l.test(e)?'"'+e.replace(l,function(e){var r=h[e];return"string"==typeof r?r:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function s(e,r){var t,l,h,u,c,f=o,d=r[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),"function"==typeof n&&(d=n.call(r,e,d)),typeof d){case"string":return a(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(o+=i,c=[],"[object Array]"===Object.prototype.toString.apply(d)){for(u=d.length,t=0;t1&&(a=t[0]+"@",e=t[1]),a+o((e=e.replace(I,".")).split("."),r).join(".")}function n(e){for(var r,t,a=[],s=0,o=e.length;s=55296&&r<=56319&&s65535&&(r+=C((e-=65536)>>>10&1023|55296),e=56320|1023&e),r+=C(e)}).join("")}function h(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:w}function u(e,r){return e+22+75*(e<26)-((0!=r)<<5)}function c(e,r,t){var a=0;for(e=t?q(e/x):e>>1,e+=q(e/r);e>k*S>>1;a+=w)e=q(e/k);return q(a+(k+1)*e/(e+_))}function f(e){var r,t,a,o,i,n,u,f,d,p,m=[],v=e.length,y=0,g=$,P=F;for((t=e.lastIndexOf(R))<0&&(t=0),a=0;a=128&&s("not-basic"),m.push(e.charCodeAt(a));for(o=t>0?t+1:0;o=v&&s("invalid-input"),((f=h(e.charCodeAt(o++)))>=w||f>q((b-y)/n))&&s("overflow"),y+=f*n,d=u<=P?j:u>=P+S?S:u-P,!(fq(b/(p=w-d))&&s("overflow"),n*=p;P=c(y-i,r=m.length+1,0==i),q(y/r)>b-g&&s("overflow"),g+=q(y/r),y%=r,m.splice(y++,0,g)}return l(m)}function d(e){var r,t,a,o,i,l,h,f,d,p,m,v,y,g,P,E=[];for(v=(e=n(e)).length,r=$,t=0,i=F,l=0;l=r&&mq((b-t)/(y=a+1))&&s("overflow"),t+=(h-r)*y,r=h,l=0;lb&&s("overflow"),m==r){for(f=t,d=w;p=d<=i?j:d>=i+S?S:d-i,!(f= 0x80 (not a basic code point)","invalid-input":"Invalid input"},k=w-j,q=Math.floor,C=String.fromCharCode;if(P={version:"1.4.1",ucs2:{decode:n,encode:l},decode:f,encode:d,toASCII:m,toUnicode:p},v&&y)if(r.exports==v)y.exports=P;else for(E in P)P.hasOwnProperty(E)&&(v[E]=P[E]);else a.punycode=P}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],48:[function(e,r,t){"use strict";function a(e,r){return Object.prototype.hasOwnProperty.call(e,r)}r.exports=function(e,r,t,o){r=r||"&",t=t||"=";var i={};if("string"!=typeof e||0===e.length)return i;var n=/\+/g;e=e.split(r);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var h=e.length;l>0&&h>l&&(h=l);for(var u=0;u=0?(c=m.substr(0,v),f=m.substr(v+1)):(c=m,f=""),d=decodeURIComponent(c),p=decodeURIComponent(f),a(i,d)?s(i[d])?i[d].push(p):i[d]=[i[d],p]:i[d]=p}return i};var s=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],49:[function(e,r,t){"use strict";function a(e,r){if(e.map)return e.map(r);for(var t=[],a=0;a",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),m=["'"].concat(p),v=["%","/","?",";","#"].concat(m),y=["/","?","#"],g=/^[+a-z0-9A-Z_-]{0,63}$/,P=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,E={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},w={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},j=e("querystring");a.prototype.parse=function(e,r,t){if(!h.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var a=e.indexOf("?"),s=-1!==a&&a127?k+="x":k+=A[q];if(!k.match(g)){var L=D.slice(0,x),z=D.slice(x+1),Q=A.match(P);Q&&(L.push(Q[1]),z.unshift(Q[2])),z.length&&(n="/"+z.join(".")+n),this.hostname=L.join(".");break}}}this.hostname=this.hostname.length>255?"":this.hostname.toLowerCase(),O||(this.hostname=l.toASCII(this.hostname));var U=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+U,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!E[p])for(var x=0,I=m.length;x0)&&t.host.split("@"))&&(t.auth=O.shift(),t.host=t.hostname=O.shift())),t.search=e.search,t.query=e.query,h.isNull(t.pathname)&&h.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.href=t.format(),t;if(!E.length)return t.pathname=null,t.path=t.search?"/"+t.search:null,t.href=t.format(),t;for(var _=E.slice(-1)[0],x=(t.host||e.host||E.length>1)&&("."===_||".."===_)||""===_,F=0,$=E.length;$>=0;$--)"."===(_=E[$])?E.splice($,1):".."===_?(E.splice($,1),F++):F&&(E.splice($,1),F--);if(!g&&!P)for(;F--;F)E.unshift("..");!g||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),x&&"/"!==E.join("/").substr(-1)&&E.push("");var R=""===E[0]||E[0]&&"/"===E[0].charAt(0);if(S){t.hostname=t.host=R?"":E.length?E.shift():"";var O=!!(t.host&&t.host.indexOf("@")>0)&&t.host.split("@");O&&(t.auth=O.shift(),t.host=t.hostname=O.shift())}return(g=g||t.host&&E.length)&&!R&&E.unshift(""),E.length?t.pathname=E.join("/"):(t.pathname=null,t.path=null),h.isNull(t.pathname)&&h.isNull(t.search)||(t.path=(t.pathname?t.pathname:"")+(t.search?t.search:"")),t.auth=e.auth||t.auth,t.slashes=t.slashes||e.slashes,t.href=t.format(),t},a.prototype.parseHost=function(){var e=this.host,r=c.exec(e);r&&(":"!==(r=r[0])&&(this.port=r.substr(1)),e=e.substr(0,e.length-r.length)),e&&(this.hostname=e)}},{"./util":52,punycode:47,querystring:50}],52:[function(e,r,t){"use strict";r.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],ajv:[function(e,r,t){"use strict";function a(e){if(!(this instanceof a))return new a(e);e=this._opts=L.copy(e)||{},this._schemas={},this._refs={},this._fragments={},this._formats=A(e.format);var r=this._schemaUriFormat=this._formats["uri-reference"];this._schemaUriFormatFunc=function(e){return r.test(e)},this._cache=e.cache||new O,this._loadingSchemas={},this._compilations=[],this.RULES=k(),this._getId=y(e),e.loopRequired=e.loopRequired||1/0,"property"==e.errorDataPath&&(e._errorDataPathProperty=!0),void 0===e.serialize&&(e.serialize=I),this._metaOpts=F(this),e.formats&&_(this),j(this),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S(this),e.patternGroups&&C(this)}function s(e,r){var t;if("string"==typeof e){if(!(t=this.getSchema(e)))throw new Error('no schema with key or ref "'+e+'"')}else{var a=this._addSchema(e);t=a.validate||this._compile(a)}var s=t(r);return!0===t.$async?"*"==this._opts.async?z(s):s:(this.errors=t.errors,s)}function o(e,r){var t=this._addSchema(e,void 0,r);return t.validate||this._compile(t)}function i(e,r,t,a){if(Array.isArray(e))for(var s=0;s=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(p,"$1 $3")),e.test(r)}function s(e,t,n,r){var i=new e.constructor(e.options,e.input,t);if(n)for(var s in n)i[s]=n[s];var o=e,a=i;return["inFunction","inAsyncFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in o&&(a[e]=o[e])}),r&&(i.options.preserveParens=!0),i.nextToken(),i}function o(e,t){var n=function(){};e.extend("initialContext",function(r){return function(){return this.options.ecmaVersion<7&&(n=function(t){e.raise(t.start,"async/await keywords only available when ecmaVersion>=7")}),this.reservedWords=new RegExp(this.reservedWords.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrict=new RegExp(this.reservedWordsStrict.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrictBind=new RegExp(this.reservedWordsStrictBind.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.inAsyncFunction=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),r.apply(this,arguments)}}),e.extend("shouldParseExportStatement",function(e){return function(){return!("name"!==this.type.label||"async"!==this.value||!i(c,this))||e.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label)if(i(c,this,!0)){var a=this.inAsyncFunction;try{this.inAsyncFunction=!0,this.next();var l=this.parseStatement(n,r);return l.async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}finally{this.inAsyncFunction=a}}else if("object"==typeof t&&t.asyncExits&&i(u,this)){this.next();var l=this.parseStatement(n,r);return l.async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(t){var n=e.apply(this,arguments);return this.inAsyncFunction&&"await"===n.name&&0===arguments.length&&this.raise(n.start,"'await' is reserved within async functions"),n}}),e.extend("parseExprAtom",function(e){return function(i){var o,u=this.start,c=this.startLoc,p=e.apply(this,arguments);if("Identifier"===p.type)if("async"!==p.name||r(this,p.end)){if("await"===p.name){var h=this.startNodeAt(p.start,p.loc&&p.loc.start);if(this.inAsyncFunction)return o=this.parseExprSubscripts(),h.operator="await",h.argument=o,h=this.finishNodeAt(h,"AwaitExpression",o.end,o.loc&&o.loc.end),n(h),h;if(this.input.slice(p.end).match(l))return t.awaitAnywhere||"module"!==this.options.sourceType?p:this.raise(p.start,"'await' is reserved within modules");if("object"==typeof t&&t.awaitAnywhere&&(u=this.start,o=s(this,u-4).parseExprSubscripts(),o.end<=u))return o=s(this,u).parseExprSubscripts(),h.operator="await",h.argument=o,h=this.finishNodeAt(h,"AwaitExpression",o.end,o.loc&&o.loc.end),this.pos=o.end,this.end=o.end,this.endLoc=o.endLoc,this.next(),n(h),h;if(!t.awaitAnywhere&&"module"===this.options.sourceType)return this.raise(p.start,"'await' is reserved within modules")}}else{var f=this.inAsyncFunction;try{this.inAsyncFunction=!0;var d=this,y=!1,m={parseFunctionBody:function(e,t){try{var n=y;return y=!0,d.parseFunctionBody.apply(this,arguments)}finally{y=n}},raise:function(){try{return d.raise.apply(this,arguments)}catch(e){throw y?e:a}}};if(o=s(this,this.start,m,!0).parseExpression(),"SequenceExpression"===o.type&&(o=o.expressions[0]),"CallExpression"===o.type&&(o=o.callee),"FunctionExpression"===o.type||"FunctionDeclaration"===o.type||"ArrowFunctionExpression"===o.type)return o=s(this,this.start,m).parseExpression(),"SequenceExpression"===o.type&&(o=o.expressions[0]),"CallExpression"===o.type&&(o=o.callee),o.async=!0,o.start=u,o.loc&&(o.loc.start=c),o.range&&(o.range[0]=u),this.pos=o.end,this.end=o.end,this.endLoc=o.endLoc,this.next(),n(o),o}catch(e){if(e!==a)throw e}finally{this.inAsyncFunction=f}}return p}}),e.extend("finishNodeAt",function(e){return function(t,n,r,i){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("finishNode",function(e){return function(t,n){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}});e.extend("parsePropertyName",function(e){return function(t){var i=(t.key&&t.key.name,e.apply(this,arguments));return"Identifier"!==i.type||"async"!==i.name||r(this,i.end)||this.input.slice(i.end).match(l)||(h.test(this.input.slice(i.end))?(i=e.apply(this,arguments),t.__asyncValue=!0):(n(t),"set"===t.kind&&this.raise(i.start,"'set (value)' cannot be be async"),i=e.apply(this,arguments),"Identifier"===i.type&&"set"===i.name&&this.raise(i.start,"'set (value)' cannot be be async"),t.__asyncValue=!0)),i}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i;n.__asyncValue&&("constructor"===n.kind&&this.raise(n.start,"class constructor() cannot be be async"),i=this.inAsyncFunction,this.inAsyncFunction=!0);var s=e.apply(this,arguments);return this.inAsyncFunction=i,s}}),e.extend("parseMethod",function(e){return function(t){var n;this.__currentProperty&&this.__currentProperty.__asyncValue&&(n=this.inAsyncFunction,this.inAsyncFunction=!0);var r=e.apply(this,arguments);return this.inAsyncFunction=n,r}}),e.extend("parsePropertyValue",function(e){return function(t,n,r,i,s,o){var a=this.__currentProperty;this.__currentProperty=t;var u;t.__asyncValue&&(u=this.inAsyncFunction,this.inAsyncFunction=!0);var c=e.apply(this,arguments);return this.inAsyncFunction=u,this.__currentProperty=a,c}})}var a={},u=/^async[\t ]+(return|throw)/,c=/^async[\t ]+function/,l=/^\s*[():;]/,p=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g,h=/\s*(get|set)\s*\(/;t.exports=o},{}],3:[function(e,t,n){function r(e,t){return e.lineStart>=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(c,"$1 $3")),e.test(r)}function s(e,t,n){var r=new e.constructor(e.options,e.input,t);if(n)for(var i in n)r[i]=n[i];var s=e,o=r;return["inFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in s&&(o[e]=s[e])}),r.nextToken(),r}function o(e,t){t&&"object"==typeof t||(t={}),e.extend("parse",function(n){return function(){return this.inAsync=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),n.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label&&t.asyncExits&&i(a,this)){this.next();var u=this.parseStatement(n,r);return u.async=!0,u.start=s,u.loc&&(u.loc.start=o),u.range&&(u.range[0]=s),u}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(n){return"module"===this.options.sourceType&&this.options.ecmaVersion>=8&&t.awaitAnywhere?e.call(this,!0):e.apply(this,arguments)}}),e.extend("parseExprAtom",function(e){var n={};return function(r){var i,o=this.start,a=(this.startLoc,e.apply(this,arguments));if("Identifier"===a.type&&"await"===a.name&&!this.inAsync&&t.awaitAnywhere){var u=this.startNodeAt(a.start,a.loc&&a.loc.start);o=this.start;var c={raise:function(){try{return pp.raise.apply(this,arguments)}catch(e){throw n}}};try{if(i=s(this,o-4,c).parseExprSubscripts(),i.end<=o)return i=s(this,o,c).parseExprSubscripts(),u.argument=i,u=this.finishNodeAt(u,"AwaitExpression",i.end,i.loc&&i.loc.end),this.pos=i.end,this.end=i.end,this.endLoc=i.endLoc,this.next(),u}catch(e){if(e===n)return a;throw e}}return a}});var n={undefined:!0,get:!0,set:!0,static:!0,async:!0,constructor:!0};e.extend("parsePropertyName",function(e){return function(t){var i=t.key&&t.key.name,s=e.apply(this,arguments);"get"===this.value&&(t.__maybeStaticAsyncGetter=!0);return n[this.value]?s:("Identifier"!==s.type||"async"!==s.name&&"async"!==i||r(this,s.end)||this.input.slice(s.end).match(u)?delete t.__maybeStaticAsyncGetter:"set"===t.kind||"set"===s.name?this.raise(s.start,"'set (value)' cannot be be async"):(this.__isAsyncProp=!0,s=e.apply(this,arguments),"Identifier"===s.type&&"set"===s.name&&this.raise(s.start,"'set (value)' cannot be be async")),s)}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i=e.apply(this,arguments);return n.__maybeStaticAsyncGetter&&(delete n.__maybeStaticAsyncGetter,"get"!==n.key.name&&(n.kind="get")),i}}),e.extend("parseFunctionBody",function(e){return function(t,n){var r=this.inAsync;this.__isAsyncProp&&(t.async=!0,this.inAsync=!0,delete this.__isAsyncProp);var i=e.apply(this,arguments);return this.inAsync=r,i}})}var a=/^async[\t ]+(return|throw)/,u=/^\s*[):;]/,c=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g;t.exports=o},{}],4:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function s(e){var t,n,i,s,o,a,u=e.length;o=r(e),a=new p(3*u/4-o),i=o>0?u-4:u;var c=0;for(t=0,n=0;t>16&255,a[c++]=s>>8&255,a[c++]=255&s;return 2===o?(s=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[c++]=255&s):1===o&&(s=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[c++]=s>>8&255,a[c++]=255&s),a}function o(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function a(e,t,n){for(var r,i=[],s=t;su?u:o+16383));return 1===r?(t=e[n-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="="),s.push(i),s.join("")}n.byteLength=i,n.toByteArray=s,n.fromByteArray=u;for(var c=[],l=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=h.length;fH)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(e)}return s(e,t,n)}function s(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?p(e,t,n):"string"==typeof e?c(e,t):h(e)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function a(e,t,n){return o(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}function u(e){return o(e),r(e<0?0:0|f(e))}function c(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(e,t),s=r(n),o=s.write(e,t);return o!==n&&(s=s.slice(0,o)),s}function l(e){for(var t=e.length<0?0:0|f(e.length),n=r(t),i=0;i=H)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+H.toString(16)+" bytes");return 0|e}function d(e){return+e!=e&&(e=0),i.alloc(+e)}function y(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return V(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,s){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var p=!0,h=0;hi&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o239?4:s>223?3:s>191?2:1;if(i+a<=n){var u,c,l,p;switch(a){case 1:s<128&&(o=s);break;case 2:u=e[i+1],128==(192&u)&&(p=(31&s)<<6|63&u)>127&&(o=p);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(p=(15&s)<<12|(63&u)<<6|63&c)>2047&&(p<55296||p>57343)&&(o=p);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(p=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&p<1114112&&(o=p)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return L(r)}function L(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",s=t;sn)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,n,r,s,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function B(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Y.write(e,t,n,r,23,4),n+4}function I(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Y.write(e,t,n,r,52,8),n+8}function j(e){if(e=M(e).replace(Q,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function M(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function D(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,r=e.length,i=null,s=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function q(e){for(var t=[],n=0;n>8,i=n%256,s.push(i),s.push(r);return s}function z(e){return J.toByteArray(j(e))}function W(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function G(e){return e!==e}var J=e("base64-js"),Y=e("ieee754");n.Buffer=i,n.SlowBuffer=d,n.INSPECT_MAX_BYTES=50;var H=2147483647;n.kMaxLength=H,i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,n){return s(e,t,n)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,n){return a(e,t,n)},i.allocUnsafe=function(e){return u(e)},i.allocUnsafeSlow=function(e){return u(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,s=0,o=Math.min(n,r);s0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,t,n,r,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var o=s-r,a=n-t,u=Math.min(o,a),c=this.slice(r,s),l=e.slice(t,n),p=0;p>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e],i=1,s=0;++s>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUInt8=function(e,t){return e>>>=0,t||$(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||$(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||$(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||$(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||$(e,t,this.length);for(var r=this[e],i=1,s=0;++s=i&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||$(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||$(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||$(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||$(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||$(e,4,this.length),Y.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||$(e,4,this.length),Y.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||$(e,8,this.length),Y.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||$(e,8,this.length),Y.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){O(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,s=0;for(this[t]=255&e;++s>>=0,n>>>=0,!r){O(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);O(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return I(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return I(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(s<1e3)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o>1,l=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=256*s+e[t+p],p+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+e[t+p],p+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=c}return(f?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,a,u,c=8*s-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+p>=1?h/u:h*Math.pow(2,1-p),t*u>=2&&(o++,u/=2),o+p>=l?(a=0,o=l):o+p>=1?(a=(t*u-1)*Math.pow(2,i),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=d,a/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=d,o/=256,c-=8);e[n+f-d]|=128*y}},{}],8:[function(e,t,n){"use strict";function r(e,t){if(Function.prototype.$asyncspawn||Object.defineProperty(Function.prototype,"$asyncspawn",{value:r,enumerable:!1,configurable:!0,writable:!0}),this instanceof Function){var n=this;return new e(function(e,r){function i(t,n){var o;try{if(o=t.call(s,n),o.done){if(o.value!==e){if(o.value&&o.value===o.value.then)return o.value(e,r);e&&e(o.value),e=null}return}o.value.then?o.value.then(function(e){i(s.next,e)},function(e){i(s.throw,e)}):i(s.next,o.value)}catch(e){return r&&r(e),void(r=null)}}var s=n.call(t,e,r);i(s.next)})}}var i=function(e,t){for(var n=t.toString(),r="return "+n,i=n.match(/.*\(([^)]*)\)/)[1],s=/['"]!!!([^'"]*)['"]/g,o=[];;){var a=s.exec(r);if(!a)break;o.push(a)}return o.reverse().forEach(function(t){r=r.slice(0,t.index)+e[t[1]]+r.substr(t.index+t[0].length)}),r=r.replace(/\/\*[^*]*\*\//g," ").replace(/\s+/g," "),new Function(i,r)()}({zousan:e("./zousan").toString(),thenable:e("./thenableFactory").toString()},function e(t,n){function r(){return i.apply(t,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:e,enumerable:!1,configurable:!0,writable:!0}),e.trampoline||(e.trampoline=function(e,t,n,r,i){return function s(o){for(;o;){if(o.then)return o=o.then(s,r),i?void 0:o;try{ -if(o.pop){if(o.length)return o.pop()?t.call(e):o;o=n}else o=o.call(e)}catch(e){return r(e)}}}}),e.LazyThenable||(e.LazyThenable="!!!thenable"(),e.EagerThenable=e.Thenable=(e.EagerThenableFactory="!!!zousan")());var i=this;switch(n){case!0:return new e.Thenable(r);case 0:return new e.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(t,arguments)}catch(e){return n(e)}}}});i(),r(),t.exports={$asyncbind:i,$asyncspawn:r}},{"./thenableFactory":9,"./zousan":10}],9:[function(e,t,n){t.exports=function(){function e(e){return e&&e instanceof Object&&"function"==typeof e.then}function t(n,r,i){try{var s=i?i(r):r;if(n===s)return n.reject(new TypeError("Promise resolution loop"));e(s)?s.then(function(e){t(n,e)},function(e){n.reject(e)}):n.resolve(s)}catch(e){n.reject(e)}}function n(){}function r(e){}function i(e,t){this.resolve=e,this.reject=t}function s(r,i){var s=new n;try{this._resolver(function(n){return e(n)?n.then(r,i):t(s,n,r)},function(e){t(s,e,i)})}catch(e){t(s,e,i)}return s}function o(e){this._resolver=e,this.then=s}return n.prototype={resolve:r,reject:r,then:i},o.resolve=function(e){return o.isThenable(e)?e:{then:function(t){return t(e)}}},o.isThenable=e,o}},{}],10:[function(e,t,n){(function(e){"use strict";t.exports=function(t){function n(e){if(e){var t=this;e(function(e){t.resolve(e)},function(e){t.reject(e)})}}function r(e,t){if("function"==typeof e.y)try{var n=e.y.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.resolve(t)}function i(e,t){if("function"==typeof e.n)try{var n=e.n.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.reject(t)}t=t||"object"==typeof e&&e.nextTick||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,0)};var s=function(){function e(){for(;n.length-r;){try{n[r]()}catch(e){}n[r++]=void 0,r===i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024;return function(i){n.push(i),n.length-r==1&&t(e)}}();return n.prototype={resolve:function(e){if(void 0===this.state){if(e===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var t=this;if(e&&("function"==typeof e||"object"==typeof e))try{var n=0,i=e.then;if("function"==typeof i)return void i.call(e,function(e){n++||t.resolve(e)},function(e){n++||t.reject(e)})}catch(e){return void(n||this.reject(e))}this.state=r,this.v=e,t.c&&s(function(){for(var n=0,i=t.c.length;n]*>)(.*)/i,/(.*)(<\/script>)(.*)/i],o=0,a=!0;t=t.split("\n");for(var u=0;u0){if(!a)return t(e);delete e.async}return void(!a&&i?t():(e.type="ReturnStatement",e.$mapped=!0,e.argument={type:"CallExpression",callee:A(s,[n]).$error,arguments:[e.argument]}))}return"TryStatement"===e.type?(i++,t(e),void i--):o(e).isFunction?(r++,t(e),void r--):void t(e)}if(r>0){if(!o(e).isAsync)return t(e);delete e.async}return e.$mapped=!0,void(o(e.argument).isUnaryExpression&&"void"===e.argument.operator?e.argument=e.argument.argument:e.argument={type:"CallExpression",callee:A(s,[n]).$return,arguments:e.argument?[e.argument]:[]})},t)}function $(e,t){return Array.isArray(e)?e.map(function(e){return $(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"ConditionalExpression"===e.type&&(u(e.alternate)||u(e.consequent))){h(E("condOp"));i(e,L(y.part("if ($0) return $1 ; return $2",[e.test,e.consequent,e.alternate]).body))}},t),e)}function O(e,t){return Array.isArray(e)?e.map(function(e){return O(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"LogicalExpression"===e.type&&u(e.right)){var r,s=h(E("logical"+("&&"===e.operator?"And":"Or")));if("||"===e.operator)r="var $0; if (!($0 = $1)) {$0 = $2} return $0";else{if("&&"!==e.operator)throw new Error(v(e)+"Illegal logical operator: "+e.operator);r="var $0; if ($0 = $1) {$0 = $2} return $0"}i(e,L(y.part(r,[s,e.left,e.right]).body))}},t),e)}function B(e,t,n){if("SwitchCase"!==e.type&&o(e).isBlockStatement)for(var r=0;r { $$setMapped: while (q) { if (q.then) "+(1===s?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }))($idIter)":"($idTrampoline = (function (q) { $$setMapped: while (q) { if (q.then) "+(1===s?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }).bind(this))($idIter)",{setMapped:function(e){return e.$mapped=!0,e},idTrampoline:E,exit:$,idIter:S,idContinuation:_,idStep:k}).expr:y.part("(Function.$0.trampoline(this,$1,$2,$3,$5)($4))",[me.asyncbind,_,k,$,S,b(1===s)]).expr,l.push({type:"ReturnStatement",argument:F}),l.push({$label:e.$label,type:"FunctionDeclaration",id:S,params:[],body:{type:"BlockStatement",body:m}}),d&&l.push({type:"FunctionDeclaration",id:k,params:[],body:{type:"BlockStatement",body:[d,P]}}),!p||"VariableDeclaration"!==p.type||"let"!==p.kind&&"const"!==p.kind?(l.push(x),t[0].replace(l.map(r))):("const"===p.kind&&(p.kind="let"),t[0].replace([{type:"BlockStatement",body:l.map(r)},r(x)]))}}function Y(e,t){return y.treeWalker(e,function(e,t,s){function a(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:P(e||S)}}}function c(e,t){if("BreakStatement"===e.type)i(e,r(A(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_exit")));else if("ContinueStatement"===e.type)i(e,r(a(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_next")));else if(o(e).isFunction)return!0;t()}"ForInStatement"===e.type&&u(e)?W(e,s):"ForOfStatement"===e.type&&u(e)&&G(e,s),t();var p;if(o(e).isLoop&&u(e)){var f=e.init,d=e.test||b(!0),g=e.update,v=e.body,x=l(v);f&&(o(f).isStatement||(f={type:"ExpressionStatement",expression:f})),g=g&&{type:"ExpressionStatement",expression:g},v=o(v).isBlockStatement?r(v).body:[r(v)];var w=e.$label&&e.$label.name;w="Loop_"+(w||ye++);var E=n.generatedSymbolPrefix+(w+"_exit"),S=n.generatedSymbolPrefix+(w+"_next"),k=h(n.generatedSymbolPrefix+w),A=function(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:{type:"CallExpression",callee:h(e||E),arguments:[]}}}},_=C(S,[{type:"ReturnStatement",argument:{type:"CallExpression",callee:x?m(k):k,arguments:[h(E),me.error]}}]);g&&_.body.body.unshift(g);for(var L=0;L0&&o(e).isAsync)return delete e.async,e.argument={type:"CallExpression",callee:"ThrowStatement"===e.type?me.error:me.return,arguments:e.argument?[e.argument]:[]},void(e.type="ReturnStatement");n(e)})}function K(e,t){if(n.noRuntime)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");return y.part("{ return (function*($return,$error){ $:body }).$asyncspawn(Promise,this) }",{return:me.return,error:me.error,asyncspawn:me.asyncspawn,body:X(e).concat(t?[{type:"ReturnStatement",argument:me.return}]:[])}).body[0]}function ee(e){e.$asyncgetwarninig||(e.$asyncgetwarninig=!0,d(v(e)+"'async get "+printNode(e)+"(){...}' is non-standard. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"))}function te(e,t){function s(e,t){y.treeWalker(e,function(n,r,i){n!==e&&o(n).isFunction||(o(n).isAwait?t?(n.$hidden=!0,r()):(delete n.operator,n.delegate=!1,n.type="YieldExpression",r()):r())})}function a(e){var t=n.promises;n.promises=!0,_(e,!0),n.promises=t}function u(e){return"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),e}function c(e,n){n.$asyncexitwarninig||(n.$asyncexitwarninig=!0,d(v(e)+"'async "+{ReturnStatement:"return",ThrowStatement:"throw"}[e.type]+"' not possible in "+(t?"engine":"generator")+" mode. Using Promises for function at "+v(n)))}y.treeWalker(e,function(e,n,r){n();var l,p,h;if(o(e).isAsync&&o(e).isFunction){var f;(f=x(r[0].parent))&&o(f).isAsync&&"get"===r[0].parent.kind&&ee(r[0].parent.key),(p=H(e))?(c(p,e.body),a(e)):t?"get"!==r[0].parent.kind&&s(e,!0):(l=e,delete l.async,h=w(l),s(l,!1),l=u(l),l.body=K(l.body.body,p),h&&D(l.body.body,[ge]),l.id&&"ExpressionStatement"===r[0].parent.type?(l.type="FunctionDeclaration",r[1].replace(l)):r[0].replace(l))}else(l=x(e))&&o(l).isAsync&&((p=H(l))?(c(p,l),a(e)):t&&"get"!==e.kind||(t?a(e):(e.async=!1,h=w(l),s(l,!1),i(l,u(l)),l.body=K(l.body.body,p)),h&&D(l.body.body,[ge])))});var l=r(n);return n.engine=!1,n.generators=!1,ce(e),oe(e),M(e,l.engine),O(e),$(e),U(e,[q,J,R,I,B]),z(e,"warn"),n.engine=l.engine,n.generators=l.generators,e}function ne(e,t,n){var r=[];return y.treeWalker(e,function(i,s,a){return i===e?s():t(i,a)?void r.push([].concat(a)):void(n||o(i).isScope||s())}),r}function re(e,t){var n=[],i={};if(e=e.filter(function(e){return"ExportNamedDeclaration"!==e[0].parent.type}),e.length){var s={};e.forEach(function(e){function t(e){e in s?i[e]=o.declarations[u]:s[e]=o.declarations[u]}for(var n=e[0],o=n.self,a=(o.kind,[]),u=0;u1?{type:"SequenceExpression",expressions:a}:a[0];"For"!==n.parent.type.slice(0,3)&&(p={type:"ExpressionStatement",expression:p}),n.replace(p)}});var o=Object.keys(s);o.length&&(o=o.map(function(e){return{type:"VariableDeclarator",id:h(e),loc:s[e].loc,start:s[e].start,end:s[e].end}}),n[0]&&"VariableDeclaration"===n[0].type?n[0].declarations=n[0].declarations.concat(o):n.unshift({type:"VariableDeclaration",kind:t,declarations:o}))}return{decls:n,duplicates:i}}function ie(e){if(!e)return[];if(Array.isArray(e))return e.reduce(function(e,t){return e.concat(ie(t.id))},[]);switch(e.type){case"Identifier":return[e.name];case"AssignmentPattern":return ie(e.left);case"ArrayPattern":return e.elements.reduce(function(e,t){return e.concat(ie(t))},[]);case"ObjectPattern":return e.properties.reduce(function(e,t){return e.concat(ie(t))},[]);case"ObjectProperty":case"Property":return ie(e.value);case"RestElement":case"RestProperty":return ie(e.argument)}}function se(e){function t(e){d(v(e)+"Possible assignment to 'const "+printNode(e)+"'")}function n(e){switch(e.type){case"Identifier":"const"===r[e.name]&&t(e);break;case"ArrayPattern":e.elements.forEach(function(e){"const"===r[e.name]&&t(e)});break;case"ObjectPattern":e.properties.forEach(function(e){"const"===r[e.key.name]&&t(e)})}}var r={};y.treeWalker(e,function(e,t,i){var s=o(e).isBlockStatement;if(s){r=Object.create(r);for(var a=0;a=0){var r=n[0];return("left"!=r.field||"ForInStatement"!==r.parent.type&&"ForOfStatement"!==r.parent.type)&&("init"!=r.field||"ForStatement"!==r.parent.type||"const"!==t.kind&&"let"!==t.kind)}}}function s(e,t){return!("FunctionDeclaration"!==e.type||!e.id)&&(o(e).isAsync||!e.$continuation)}var c={TemplateLiteral:function(e){return e.expressions},NewExpression:function(e){return e.arguments},CallExpression:function(e){return e.arguments},SequenceExpression:function(e){return e.expressions},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties.map(function(e){return e.value})}};y.treeWalker(e,function(e,n,s){var a;if(n(),e.type in c&&!e.$hoisted){var s,l=c[e.type](e),p=[];for(a=0;a0;a--)if(e.declarations[a]&&e.declarations[a].init&&u(e.declarations[a].init)){var h={type:"VariableDeclaration",kind:e.kind,declarations:e.declarations.splice(a)},f=s[0];if(!("index"in f))throw new Error("VariableDeclaration not in a block");f.parent[f.field].splice(f.index+1,0,h)}}),se(e);var l=!1;return y.treeWalker(e,function(e,t,r){var i=l;if(l=l||pe(e),o(e).isBlockStatement){if(u(e)){var a,c,p,f,y,m=!r[0].parent||o(r[0].parent).isScope;if(m){c=ne(e,n(["const"]),!1);var g={},b={};c.forEach(function(e){e[0].self.declarations.forEach(function(e){ie(e.id).forEach(function(t){g[t]||b[t]?(delete g[t],b[t]=e):g[t]=e})})}),c.forEach(function(e){for(var t=0;t=0&&"ReturnStatement"===i[1].self.type){var s=e.$thisCallName,a=r(de[s].def.body.body);de[s].$inlined=!0,o(i[1].self).isJump||a.push({type:"ReturnStatement"}),i[1].replace(a)}});var n=Object.keys(de).map(function(e){return de[e].$inlined&&de[e].def});y.treeWalker(e,function(e,t,r){t(),n.indexOf(e)>=0&&r[0].remove()})}if(!("Program"===e.type&&"module"===e.sourceType||a(e,function(e){return o(e).isES6},!0))){var i=pe(e);!function(e){y.treeWalker(e,function(e,t,n){if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type){var r=i;if(i=i||pe(e)){t();var s="Program"===e.type?e:e.body,o=ne(s,function(e,t){if("FunctionDeclaration"===e.type)return t[0].parent!==s});o=o.map(function(e){return e[0].remove()}),[].push.apply(s.body,o)}else t();i=r}else t()})}(e)}return y.treeWalker(e,function(e,t,n){t(),Object.keys(e).filter(function(e){return"$"===e[0]}).forEach(function(t){delete e[t]})}),e}var de={},ye=1,me={};Object.keys(n).filter(function(e){return"$"===e[0]}).forEach(function(e){me[e.slice(1)]=h(n[e])});var ge=y.part("var $0 = arguments",[me.arguments]).body[0];return n.engine?(e.ast=ue(e.ast,!0),e.ast=te(e.ast,n.engine),e.ast=le(e.ast),fe(e.ast)):n.generators?(e.ast=ue(e.ast),e.ast=te(e.ast),e.ast=le(e.ast),fe(e.ast)):(e.ast=ue(e.ast),_(e.ast)),n.babelTree&&y.treeWalker(e.ast,function(e,t,n){t(),"Literal"===e.type&&i(e,b(e.value))}),e}var y=e("./parser"),m=e("./output");n.printNode=function e(t){if(!t)return"";if(Array.isArray(t))return t.map(e).join("|\n");try{return m(t)}catch(e){return e.message+": "+(t&&t.type)}};var g={start:!0,end:!0,loc:!0,range:!0},v={getScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type?this.node.body.body:"Program"===this.node.type?this.node.body:null},isScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"Program"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type},isFunction:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type},isClass:function(){return"ClassDeclaration"===this.node.type||"ClassExpression"===this.node.type},isBlockStatement:function(){return"ClassBody"===this.node.type||"Program"===this.node.type||"BlockStatement"===this.node.type?this.node.body:"SwitchCase"===this.node.type&&this.node.consequent},isExpressionStatement:function(){return"ExpressionStatement"===this.node.type},isLiteral:function(){return"Literal"===this.node.type||"BooleanLiteral"===this.node.type||"RegExpLiteral"===this.node.type||"NumericLiteral"===this.node.type||"StringLiteral"===this.node.type||"NullLiteral"===this.node.type},isDirective:function(){return"ExpressionStatement"===this.node.type&&("StringLiteral"===this.node.expression.type||"Literal"===this.node.expression.type&&"string"==typeof this.node.expression.value)},isUnaryExpression:function(){return"UnaryExpression"===this.node.type},isAwait:function(){return"AwaitExpression"===this.node.type&&!this.node.$hidden},isAsync:function(){return this.node.async},isStatement:function(){return null!==this.node.type.match(/[a-zA-Z]+Declaration/)||null!==this.node.type.match(/[a-zA-Z]+Statement/)},isExpression:function(){return null!==this.node.type.match(/[a-zA-Z]+Expression/)},isLoop:function(){return"ForStatement"===this.node.type||"WhileStatement"===this.node.type||"DoWhileStatement"===this.node.type},isJump:function(){return"ReturnStatement"===this.node.type||"ThrowStatement"===this.node.type||"BreakStatement"===this.node.type||"ContinueStatement"===this.node.type},isES6:function(){switch(this.node.type){case"ExportNamedDeclaration":case"ExportSpecifier":case"ExportDefaultDeclaration":case"ExportAllDeclaration":case"ImportDeclaration":case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ArrowFunctionExpression":case"ForOfStatement":case"YieldExpression":case"Super":case"RestElement":case"RestProperty":case"SpreadElement":case"TemplateLiteral":case"ClassDeclaration":case"ClassExpression":return!0;case"VariableDeclaration":return this.node.kind&&"var"!==this.node.kind;case"FunctionDeclaration":case"FunctionExpression":return!!this.node.generator}}},b={};Object.keys(v).forEach(function(e){Object.defineProperty(b,e,{get:v[e]})}),t.exports={printNode:printNode,babelLiteralNode:p,asynchronize:function(e,t,n,r){try{return d(e,t,n,r)}catch(t){if(t instanceof SyntaxError){var i=e.origCode.substr(t.pos-t.loc.column);i=i.split("\n")[0],t.message+=" (nodent)\n"+i+"\n"+i.replace(/[\S ]/g,"-").substring(0,t.loc.column)+"^",t.stack=""}throw t}}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./output":13,"./parser":14}],13:[function(e,t,n){"use strict";function r(e){var t=y[e.type]||y[e.type+e.operator]||y[e.type+e.operator+(e.prefix?"prefix":"")];return void 0!==t?t:20}function i(e,t,n){var r=this[n||e.type];r?r.call(this,e,t):t.write(e,"/*"+e.type+"?*/ "+t.sourceAt(e.start,e.end))}function s(e,t,n,i){2===i||r(n)0){this.out(e[0],t,e[0].type);for(var r=1,i=e.length;r>":13,"BinaryExpression>>>":13,"BinaryExpression<":12,"BinaryExpression<=":12,"BinaryExpression>":12,"BinaryExpression>=":12,BinaryExpressionin:12,BinaryExpressioninstanceof:12,"BinaryExpression==":11,"BinaryExpression===":11,"BinaryExpression!=":11,"BinaryExpression!==":11,"BinaryExpression&":10,"BinaryExpression^":9,"BinaryExpression|":8,"LogicalExpression&&":7,"LogicalExpression||":6,ConditionalExpression:5,AssignmentPattern:4,AssignmentExpression:4,yield:3,YieldExpression:3,SpreadElement:2,"comma-separated-list":1.5,SequenceExpression:1},m={type:"comma-separated-list"},g={out:i,expr:s,formatParameters:o,Program:function(e,t){var n,r,i=h(t.indent,t.indentLevel),s=t.lineEnd;n=e.body;for(var o=0,a=n.length;o0){t.write(null,s);for(var a=0,u=n.length;a0){this.out(n[0],t,"VariableDeclarator");for(var i=1;i0){for(var n=0;n0)for(var r=0;r ")):(this.formatParameters(e.params,t),t.write(e,"=> ")),"ObjectExpression"===e.body.type||"SequenceExpression"===e.body.type?(t.write(null,"("),this.out(e.body,t,e.body.type),t.write(null,")")):this.out(e.body,t,e.body.type)},ThisExpression:function(e,t){t.write(e,"this")},Super:function(e,t){t.write(e,"super")},RestElement:u=function(e,t){t.write(e,"..."),this.out(e.argument,t,e.argument.type)},SpreadElement:u,YieldExpression:function(e,t){t.write(e,e.delegate?"yield*":"yield"),e.argument&&(t.write(null," "),this.expr(t,e,e.argument))},AwaitExpression:function(e,t){t.write(e,"await "),this.expr(t,e,e.argument)},TemplateLiteral:function(e,t){var n,r=e.quasis,i=e.expressions;t.write(e,"`");for(var s=0,o=i.length;s0)for(var n=e.elements,r=n.length,i=0;;){var s=n[i];if(s&&this.expr(t,m,s),i+=1,(i=r)break;t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1))}t.write(null,"]")},ArrayPattern:l,ObjectExpression:function(e,t){var n,r=h(t.indent,t.indentLevel++),i=t.lineEnd,s=r+t.indent;if(t.write(e,"{"),e.properties.length>0){t.write(null,i);for(var o=e.properties,a=o.length,u=0;n=o[u],t.write(null,s),this.out(n,t,"Property"),++ut.wrapColumn&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1));t.write(null,i,r,"}")}else t.write(null,"}");t.indentLevel--},Property:function(e,t){e.method||"get"===e.kind||"set"===e.kind?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),t.write(null,": ")),this.expr(t,m,e.value))},ObjectPattern:function(e,t){if(t.write(e,"{"),e.properties.length>0)for(var n=e.properties,r=n.length,i=0;this.out(n[i],t,"Property"),++i0)for(var i=r.length,s=0;s1&&t.write(e," "),this.expr(t,e,e.argument,!0)):(this.expr(t,e,e.argument),t.write(e,e.operator))},UpdateExpression:function(e,t){e.prefix?(t.write(e,e.operator),this.out(e.argument,t,e.argument.type)):(this.out(e.argument,t,e.argument.type),t.write(e,e.operator))},BinaryExpression:c=function(e,t){var n=e.operator;"in"===n&&t.inForInit&&t.write(null,"("),this.expr(t,e,e.left),t.write(e," ",n," "),this.expr(t,e,e.right,"ArrowFunctionExpression"===e.right.type?2:0),"in"===n&&t.inForInit&&t.write(null,")")},LogicalExpression:c,AssignmentExpression:function(e,t){"ObjectPattern"===e.left.type&&t.write(null,"("),this.BinaryExpression(e,t),"ObjectPattern"===e.left.type&&t.write(null,")")},AssignmentPattern:function(e,t){this.expr(t,e,e.left),t.write(e," = "),this.expr(t,e,e.right)},ConditionalExpression:function(e,t){this.expr(t,e,e.test,!0),t.write(e," ? "),this.expr(t,e,e.consequent),t.write(null," : "),this.expr(t,e,e.alternate)},NewExpression:function(e,t){t.write(e,"new "),this.out(e,t,"CallExpression")},CallExpression:function(e,t){this.expr(t,e,e.callee,"ObjectExpression"===e.callee.type?2:0),t.write(e,"(");var n=e.arguments;if(n.length>0)for(var r=n.length,i=0;i=0&&r({self:i,parent:e,field:a[u],index:!0}):c instanceof Object&&i===c&&r({self:i,parent:e,field:a[u]})}})}return n||(n=[{self:e}],n.replace=function(e,t){n[e].replace(t)}),t(e,s,n),e}function s(t,n){var r=[],s={ecmaVersion:8,allowHashBang:!0,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,locations:!0,onComment:r};if((!n||!n.noNodentExtensions||parseInt(a.version)<4)&&(h||(parseInt(a.version)<4&&console.warn("Nodent: Warning - noNodentExtensions option requires acorn >=v4.x. Extensions installed."),e("acorn-es7-plugin")(a),h=!0),s.plugins=s.plugins||{},s.plugins.asyncawait={asyncExits:!0,awaitAnywhere:!0}),n)for(var o in n)"noNodentExtensions"!==o&&(s[o]=n[o]);var u=a.parse(t,s);return i(u,function(e,t,n){for(t();r.length&&e.loc&&e.loc.start.line>=r[0].loc.start.line&&e.loc.end.line>=r[0].loc.end.line;)e.$comments=e.$comments||[],e.$comments.push(r.shift())}),u}function o(e,t){function n(e,r){if(Array.isArray(r)&&!Array.isArray(e))throw new Error("Can't substitute an array for a node");return r=r||{},Object.keys(e).forEach(function(i){function s(e){return"function"==typeof e&&(e=e()),r=r.concat(e)}function o(e){return"function"==typeof e&&(e=e()),r[i]=e,r}if(!(e[i]instanceof Object))return r[i]=e[i];if(Array.isArray(e[i]))return r[i]=n(e[i],[]);var a;if(a=Array.isArray(r)?s:o,"Identifier"===e[i].type&&"$"===e[i].name[0])return a(t[e[i].name.slice(1)]);if("LabeledStatement"===e[i].type&&"$"===e[i].label.name){var u=e[i].body.expression;return a(t[u.name||u.value])}return a("LabeledStatement"===e[i].type&&"$$"===e[i].label.name.slice(0,2)?t[e[i].label.name.slice(2)](n(e[i]).body):n(e[i]))}),r}f[e]||(f[e]=s(e,{noNodentExtensions:!0,locations:!1,ranges:!1,onComment:null}));var r=n(f[e]);return{body:r.body,expr:"ExpressionStatement"===r.body[0].type?r.body[0].expression:null}}var a=e("acorn"),u=e("acorn/dist/walk"),c={AwaitExpression:function(e,t,n){n(e.argument,t,"Expression")},SwitchStatement:function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0;re)return!1;if((n+=t[r+1])>=e)return!0}}function n(e,n){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&k.test(String.fromCharCode(e)):!1!==n&&t(e,_)))}function r(e,n){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&A.test(String.fromCharCode(e)):!1!==n&&(t(e,_)||t(e,C)))))}function i(e,t){ -return new L(e,{beforeExpr:!0,binop:t})}function s(e,t){return void 0===t&&(t={}),t.keyword=e,T[e]=new L(e,t)}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e,t){return j.call(e,t)}function u(e,t){for(var n=1,r=0;;){O.lastIndex=r;var i=O.exec(e);if(!(i&&i.index=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),D(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return D(t.onComment)&&(t.onComment=l(t,t.onComment)),t}function l(e,t){return function(n,r,i,s,o,a){var u={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(u.loc=new q(this,o,a)),e.ranges&&(u.range=[i,s]),t.push(u)}}function p(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}function h(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}function f(e,t,n,r){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&r.raise(n,"Error parsing regular expression: "+e.message),e}}function d(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function y(e,t){return new W(t,e).parse()}function m(e,t,n){var r=new W(n,e,t);return r.nextToken(),r.parseExpression()}function g(e,t){return new W(t,e)}function v(t,n,r){e.parse_dammit=t,e.LooseParser=n,e.pluginsLoose=r}var b={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},x="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",w={5:x,6:x+" const class extends export import super"},E="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",S="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",k=new RegExp("["+E+"]"),A=new RegExp("["+E+S+"]");E=S=null;var _=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],C=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],L=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null},P={beforeExpr:!0},N={startsExpr:!0},T={},F={num:new L("num",N),regexp:new L("regexp",N),string:new L("string",N),name:new L("name",N),eof:new L("eof"),bracketL:new L("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new L("]"),braceL:new L("{",{beforeExpr:!0,startsExpr:!0}),braceR:new L("}"),parenL:new L("(",{beforeExpr:!0,startsExpr:!0}),parenR:new L(")"),comma:new L(",",P),semi:new L(";",P),colon:new L(":",P),dot:new L("."),question:new L("?",P),arrow:new L("=>",P),template:new L("template"),ellipsis:new L("...",P),backQuote:new L("`",N),dollarBraceL:new L("${",{beforeExpr:!0,startsExpr:!0}),eq:new L("=",{beforeExpr:!0,isAssign:!0}),assign:new L("_=",{beforeExpr:!0,isAssign:!0}),incDec:new L("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new L("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:i("||",1),logicalAND:i("&&",2),bitwiseOR:i("|",3),bitwiseXOR:i("^",4),bitwiseAND:i("&",5),equality:i("==/!=",6),relational:i("",7),bitShift:i("<>",8),plusMin:new L("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:i("%",10),star:i("*",10),slash:i("/",10),starstar:new L("**",{beforeExpr:!0}),_break:s("break"),_case:s("case",P),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",P),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",P),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",N),_if:s("if"),_return:s("return",P),_switch:s("switch"),_throw:s("throw",P),_try:s("try"),_var:s("var"),_const:s("const"),_while:s("while",{isLoop:!0}),_with:s("with"),_new:s("new",{beforeExpr:!0,startsExpr:!0}),_this:s("this",N),_super:s("super",N),_class:s("class"),_extends:s("extends",P),_export:s("export"),_import:s("import"),_null:s("null",N),_true:s("true",N),_false:s("false",N),_in:s("in",{beforeExpr:!0,binop:7}),_instanceof:s("instanceof",{beforeExpr:!0,binop:7}),_typeof:s("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:s("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:s("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},$=/\r\n?|\n|\u2028|\u2029/,O=new RegExp($.source,"g"),B=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,I=Object.prototype,j=I.hasOwnProperty,M=I.toString,D=Array.isArray||function(e){return"[object Array]"===M.call(e)},V=function(e,t){this.line=e,this.column=t};V.prototype.offset=function(e){return new V(this.line,this.column+e)};var q=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},U={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}},z={},W=function(e,t,n){this.options=e=c(e),this.sourceFile=e.sourceFile,this.keywords=p(w[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=b[i]);i--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=p(r);var s=(r?r+" ":"")+b.strict;this.reservedWordsStrict=p(s),this.reservedWordsStrictBind=p(s+" "+b.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split($).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=F.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};W.prototype.isKeyword=function(e){return this.keywords.test(e)},W.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},W.prototype.extend=function(e,t){this[e]=t(this[e])},W.prototype.loadPlugins=function(e){var t=this;for(var n in e){var r=z[n];if(!r)throw new Error("Plugin '"+n+"' not found");r(t,e[n])}},W.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var G=W.prototype,J=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;G.strictDirective=function(e){for(var t=this;;){R.lastIndex=e,e+=R.exec(t.input)[0].length;var n=J.exec(t.input.slice(e));if(!n)return!1;if("use strict"==(n[1]||n[2]))return!0;e+=n[0].length}},G.eat=function(e){return this.type===e&&(this.next(),!0)},G.isContextual=function(e){return this.type===F.name&&this.value===e},G.eatContextual=function(e){return this.value===e&&this.eat(F.name)},G.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},G.canInsertSemicolon=function(){return this.type===F.eof||this.type===F.braceR||$.test(this.input.slice(this.lastTokEnd,this.start))},G.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},G.semicolon=function(){this.eat(F.semi)||this.insertSemicolon()||this.unexpected()},G.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},G.expect=function(e){this.eat(e)||this.unexpected()},G.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var Y=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};G.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},G.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},G.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var Z={kind:"loop"},Q={kind:"switch"};H.isLet=function(){if(this.type!==F.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;R.lastIndex=this.pos;var e=R.exec(this.input),t=this.pos+e[0].length,i=this.input.charCodeAt(t);if(91===i||123==i)return!0;if(n(i,!0)){for(var s=t+1;r(this.input.charCodeAt(s),!0);)++s;var o=this.input.slice(t,s);if(!this.isKeyword(o))return!0}return!1},H.isAsyncFunction=function(){if(this.type!==F.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;R.lastIndex=this.pos;var e=R.exec(this.input),t=this.pos+e[0].length;return!($.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&r(this.input.charAt(t+8)))},H.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet()&&(i=F._var,r="let"),i){case F._break:case F._continue:return this.parseBreakContinueStatement(s,i.keyword);case F._debugger:return this.parseDebuggerStatement(s);case F._do:return this.parseDoStatement(s);case F._for:return this.parseForStatement(s);case F._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1);case F._class:return e||this.unexpected(),this.parseClass(s,!0);case F._if:return this.parseIfStatement(s);case F._return:return this.parseReturnStatement(s);case F._switch:return this.parseSwitchStatement(s);case F._throw:return this.parseThrowStatement(s);case F._try:return this.parseTryStatement(s);case F._const:case F._var:return r=r||this.value,e||"var"==r||this.unexpected(),this.parseVarStatement(s,r);case F._while:return this.parseWhileStatement(s);case F._with:return this.parseWithStatement(s);case F.braceL:return this.parseBlock();case F.semi:return this.parseEmptyStatement(s);case F._export:case F._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===F._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(s,!0);var o=this.value,a=this.parseExpression();return i===F.name&&"Identifier"===a.type&&this.eat(F.colon)?this.parseLabeledStatement(s,o,a):this.parseExpressionStatement(s,a)}},H.parseBreakContinueStatement=function(e,t){var n=this,r="break"==t;this.next(),this.eat(F.semi)||this.insertSemicolon()?e.label=null:this.type!==F.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(F.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},H.parseForStatement=function(e){if(this.next(),this.labels.push(Z),this.enterLexicalScope(),this.expect(F.parenL),this.type===F.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===F._var||this.type===F._const||t){var n=this.startNode(),r=t?"let":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),!(this.type===F._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==r&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new Y,s=this.parseExpression(!0,i);return this.type===F._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.checkPatternErrors(i,!0),this.parseForIn(e,s)):(this.checkExpressionErrors(i,!0),this.parseFor(e,s))},H.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},H.isFunction=function(){return this.type===F._function||this.isAsyncFunction()},H.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(F._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},H.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(F.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},H.parseSwitchStatement=function(e){var t=this;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(F.braceL),this.labels.push(Q),this.enterLexicalScope();for(var n,r=!1;this.type!=F.braceR;)if(t.type===F._case||t.type===F._default){var i=t.type===F._case;n&&t.finishNode(n,"SwitchCase"),e.cases.push(n=t.startNode()),n.consequent=[],t.next(),i?n.test=t.parseExpression():(r&&t.raiseRecoverable(t.lastTokStart,"Multiple default clauses"),r=!0,n.test=null),t.expect(F.colon)}else n||t.unexpected(),n.consequent.push(t.parseStatement(!0));return this.exitLexicalScope(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},H.parseThrowStatement=function(e){return this.next(),$.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var X=[];H.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===F._catch){var t=this.startNode();this.next(),this.expect(F.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(F.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(F._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},H.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},H.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Z),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},H.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},H.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},H.parseLabeledStatement=function(e,t,n){for(var r=this,i=0;i=0;o--){var a=r.labels[o];if(a.statementStart!=e.start)break;a.statementStart=r.start,a.kind=s}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},H.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},H.parseBlock=function(e){var t=this;void 0===e&&(e=!0);var n=this.startNode();for(n.body=[],this.expect(F.braceL),e&&this.enterLexicalScope();!this.eat(F.braceR);){var r=t.parseStatement(!0);n.body.push(r)}return e&&this.exitLexicalScope(),this.finishNode(n,"BlockStatement")},H.parseFor=function(e,t){return e.init=t,this.expect(F.semi),e.test=this.type===F.semi?null:this.parseExpression(),this.expect(F.semi),e.update=this.type===F.parenR?null:this.parseExpression(),this.expect(F.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},H.parseForIn=function(e,t){var n=this.type===F._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(F.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},H.parseVar=function(e,t,n){var r=this;for(e.declarations=[],e.kind=n;;){var i=r.startNode();if(r.parseVarId(i,n),r.eat(F.eq)?i.init=r.parseMaybeAssign(t):"const"!==n||r.type===F._in||r.options.ecmaVersion>=6&&r.isContextual("of")?"Identifier"==i.id.type||t&&(r.type===F._in||r.isContextual("of"))?i.init=null:r.raise(r.lastTokEnd,"Complex binding patterns require an initialization value"):r.unexpected(),e.declarations.push(r.finishNode(i,"VariableDeclarator")),!r.eat(F.comma))break}return e},H.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},H.parseFunction=function(e,t,n,r){this.initFunction(e),this.options.ecmaVersion>=6&&!r&&(e.generator=this.eat(F.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&&(e.id="nullableID"===t&&this.type!=F.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,s=this.inAsync,o=this.yieldPos,a=this.awaitPos,u=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==F.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=s,this.yieldPos=o,this.awaitPos=a,this.inFunction=u,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},H.parseFunctionParams=function(e){this.expect(F.parenL),e.params=this.parseBindingList(F.parenR,!1,this.options.ecmaVersion>=8,!0),this.checkYieldAwaitInDefaultParams()},H.parseClass=function(e,t){var n=this;this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),i=!1;for(r.body=[],this.expect(F.braceL);!this.eat(F.braceR);)if(!n.eat(F.semi)){var s=n.startNode(),o=n.eat(F.star),a=!1,u=n.type===F.name&&"static"===n.value;n.parsePropertyName(s),s.static=u&&n.type!==F.parenL,s.static&&(o&&n.unexpected(),o=n.eat(F.star),n.parsePropertyName(s)),n.options.ecmaVersion>=8&&!o&&!s.computed&&"Identifier"===s.key.type&&"async"===s.key.name&&n.type!==F.parenL&&!n.canInsertSemicolon()&&(a=!0,n.parsePropertyName(s)),s.kind="method";var c=!1;if(!s.computed){var l=s.key;o||a||"Identifier"!==l.type||n.type===F.parenL||"get"!==l.name&&"set"!==l.name||(c=!0,s.kind=l.name,l=n.parsePropertyName(s)),!s.static&&("Identifier"===l.type&&"constructor"===l.name||"Literal"===l.type&&"constructor"===l.value)&&(i&&n.raise(l.start,"Duplicate constructor in the same class"),c&&n.raise(l.start,"Constructor can't have get/set modifier"),o&&n.raise(l.start,"Constructor can't be a generator"),a&&n.raise(l.start,"Constructor can't be an async method"),s.kind="constructor",i=!0)}if(n.parseClassMethod(r,s,o,a),c){var p="get"===s.kind?0:1;if(s.value.params.length!==p){var h=s.value.start;"get"===s.kind?n.raiseRecoverable(h,"getter should have no params"):n.raiseRecoverable(h,"setter should have exactly one param")}else"set"===s.kind&&"RestElement"===s.value.params[0].type&&n.raiseRecoverable(s.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(r,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},H.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,"MethodDefinition"))},H.parseClassId=function(e,t){e.id=this.type===F.name?this.parseIdent():!0===t?this.unexpected():null},H.parseClassSuper=function(e){e.superClass=this.eat(F._extends)?this.parseExprSubscripts():null},H.parseExport=function(e,t){var n=this;if(this.next(),this.eat(F.star))return this.expectContextual("from"),e.source=this.type===F.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(F._default)){this.checkExport(t,"default",this.lastTokStart);var r;if(this.type===F._function||(r=this.isAsyncFunction())){var i=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(i,"nullableID",!1,r)}else if(this.type===F._class){var s=this.startNode();e.declaration=this.parseClass(s,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===F.string?this.parseExprAtom():this.unexpected();else{for(var o=0;o=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var r=0;r=6&&(e.computed||e.method||e.shorthand))){var n,r=e.key;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)return void("__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(r.start,"Redefinition of __proto__ property"),t.proto=!0));n="$"+n;var s=t[n];if(s){var o;o="init"===i?this.strict&&s.init||s.get||s.set:s.init||s[i],o&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[n]={init:!1,get:!1,set:!1};s[i]=!0}},ee.parseExpression=function(e,t){var n=this,r=this.start,i=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===F.comma){var o=this.startNodeAt(r,i);for(o.expressions=[s];this.eat(F.comma);)o.expressions.push(n.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return s},ee.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var r=!1,i=-1,s=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new Y,r=!0);var o=this.start,a=this.startLoc;this.type!=F.parenL&&this.type!=F.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){this.checkPatternErrors(t,!0),r||Y.call(t);var c=this.startNodeAt(o,a);return c.operator=this.value,c.left=this.type===F.eq?this.toAssignable(u):u,t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),u},ee.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(F.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(F.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},ee.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},ee.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==F._in)&&s>r){var o=this.type===F.logicalOR||this.type===F.logicalAND,a=this.value;this.next();var u=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),u,c,s,i),p=this.buildBinary(t,n,e,l,a,o);return this.parseExprOp(p,t,n,r,i)}return e},ee.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},ee.parseMaybeUnary=function(e,t){var n,r=this,i=this.start,s=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(e),t=!0;else if(this.type.prefix){var o=this.startNode(),a=this.type===F.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),a?this.checkLVal(o.argument):this.strict&&"delete"===o.operator&&"Identifier"===o.argument.type?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(o,a?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=r.startNodeAt(i,s);u.operator=r.value,u.prefix=!1,u.argument=n,r.checkLVal(n),r.next(),n=r.finishNode(u,"UpdateExpression")}}return!t&&this.eat(F.starstar)?this.buildBinary(i,s,n,this.parseMaybeUnary(null,!1),"**",!1):n},ee.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},ee.parseSubscripts=function(e,t,n,r){for(var i,s=this,o=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon();;)if((i=s.eat(F.bracketL))||s.eat(F.dot)){var a=s.startNodeAt(t,n);a.object=e,a.property=i?s.parseExpression():s.parseIdent(!0),a.computed=!!i,i&&s.expect(F.bracketR),e=s.finishNode(a,"MemberExpression")}else if(!r&&s.eat(F.parenL)){var u=new Y,c=s.yieldPos,l=s.awaitPos;s.yieldPos=0,s.awaitPos=0;var p=s.parseExprList(F.parenR,s.options.ecmaVersion>=8,!1,u);if(o&&!s.canInsertSemicolon()&&s.eat(F.arrow))return s.checkPatternErrors(u,!1),s.checkYieldAwaitInDefaultParams(),s.yieldPos=c,s.awaitPos=l,s.parseArrowExpression(s.startNodeAt(t,n),p,!0);s.checkExpressionErrors(u,!0),s.yieldPos=c||s.yieldPos,s.awaitPos=l||s.awaitPos;var h=s.startNodeAt(t,n);h.callee=e,h.arguments=p,e=s.finishNode(h,"CallExpression")}else{if(s.type!==F.backQuote)return e;var f=s.startNodeAt(t,n);f.tag=e,f.quasi=s.parseTemplate(),e=s.finishNode(f,"TaggedTemplateExpression")}},ee.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case F._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case F._this:var r=this.type===F._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,r);case F.name:var i=this.start,s=this.startLoc,o=this.parseIdent(this.type!==F.name);if(this.options.ecmaVersion>=8&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(F._function))return this.parseFunction(this.startNodeAt(i,s),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(F.arrow))return this.parseArrowExpression(this.startNodeAt(i,s),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===F.name)return o=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(F.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,s),[o],!0)}return o;case F.regexp:var a=this.value;return t=this.parseLiteral(a.value),t.regex={pattern:a.pattern,flags:a.flags},t;case F.num:case F.string:return this.parseLiteral(this.value);case F._null:case F._true:case F._false:return t=this.startNode(),t.value=this.type===F._null?null:this.type===F._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case F.parenL:var u=this.start,c=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),c;case F.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(F.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case F.braceL:return this.parseObj(!1,e);case F._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case F._class:return this.parseClass(this.startNode(),!1);case F._new:return this.parseNew();case F.backQuote:return this.parseTemplate();default:this.unexpected()}},ee.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},ee.parseParenExpression=function(){this.expect(F.parenL);var e=this.parseExpression();return this.expect(F.parenR),e},ee.parseParenAndDistinguishExpression=function(e){var t,n=this,r=this.start,i=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a,u=this.start,c=this.startLoc,l=[],p=!0,h=!1,f=new Y,d=this.yieldPos,y=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==F.parenR;){if(p?p=!1:n.expect(F.comma),s&&n.afterTrailingComma(F.parenR,!0)){h=!0;break}if(n.type===F.ellipsis){o=n.start,l.push(n.parseParenItem(n.parseRest())),n.type===F.comma&&n.raise(n.start,"Comma is not permitted after the rest element");break}n.type!==F.parenL||a||(a=n.start),l.push(n.parseMaybeAssign(!1,f,n.parseParenItem))}var m=this.start,g=this.startLoc;if(this.expect(F.parenR),e&&!this.canInsertSemicolon()&&this.eat(F.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),a&&this.unexpected(a),this.yieldPos=d,this.awaitPos=y,this.parseParenArrowList(r,i,l);l.length&&!h||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=y||this.awaitPos,l.length>1?(t=this.startNodeAt(u,c),t.expressions=l,this.finishNodeAt(t,"SequenceExpression",m,g)):t=l[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(r,i);return v.expression=t,this.finishNode(v,"ParenthesizedExpression")}return t},ee.parseParenItem=function(e){return e},ee.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var te=[];ee.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(F.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,r,!0),this.eat(F.parenL)?e.arguments=this.parseExprList(F.parenR,this.options.ecmaVersion>=8,!1):e.arguments=te,this.finishNode(e,"NewExpression")},ee.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),e.tail=this.type===F.backQuote,this.finishNode(e,"TemplateElement")},ee.parseTemplate=function(){var e=this,t=this.startNode();this.next(),t.expressions=[];var n=this.parseTemplateElement();for(t.quasis=[n];!n.tail;)e.expect(F.dollarBraceL),t.expressions.push(e.parseExpression()),e.expect(F.braceR),t.quasis.push(n=e.parseTemplateElement());return this.next(),this.finishNode(t,"TemplateLiteral")},ee.parseObj=function(e,t){var n=this,r=this.startNode(),i=!0,s={};for(r.properties=[],this.next();!this.eat(F.braceR);){if(i)i=!1;else if(n.expect(F.comma),n.afterTrailingComma(F.braceR))break;var o,a,u,c,l=n.startNode();n.options.ecmaVersion>=6&&(l.method=!1,l.shorthand=!1,(e||t)&&(u=n.start,c=n.startLoc),e||(o=n.eat(F.star))),n.parsePropertyName(l),e||!(n.options.ecmaVersion>=8)||o||l.computed||"Identifier"!==l.key.type||"async"!==l.key.name||n.type===F.parenL||n.type===F.colon||n.canInsertSemicolon()?a=!1:(a=!0,n.parsePropertyName(l,t)),n.parsePropertyValue(l,e,o,a,u,c,t),n.checkPropClash(l,s),r.properties.push(n.finishNode(l,"Property"))}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},ee.parsePropertyValue=function(e,t,n,r,i,s,o){if((n||r)&&this.type===F.colon&&this.unexpected(),this.eat(F.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===F.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=F.comma&&this.type!=F.braceR){(n||r||t)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var a="get"===e.kind?0:1;if(e.value.params.length!==a){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((this.keywords.test(e.key.name)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(e.key.name)||this.inGenerator&&"yield"==e.key.name||this.inAsync&&"await"==e.key.name)&&this.raiseRecoverable(e.key.start,"'"+e.key.name+"' can not be used as shorthand property"),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===F.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},ee.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(F.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(F.bracketR),e.key;e.computed=!1}return e.key=this.type===F.num||this.type===F.string?this.parseExprAtom():this.parseIdent(!0)},ee.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},ee.parseMethod=function(e,t){var n=this.startNode(),r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(F.parenL),n.params=this.parseBindingList(F.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(n,"FunctionExpression")},ee.parseArrowExpression=function(e,t,n){var r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(e,"ArrowFunctionExpression")},ee.parseFunctionBody=function(e,t){var n=t&&this.type!==F.braceL,r=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!s||(i=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=r},ee.isSimpleParamList=function(e){for(var t=0;t=6||-1==this.input.slice(this.start,this.end).indexOf("\\"))&&this.raiseRecoverable(this.start,"The keyword '"+this.value+"' is reserved"),this.inGenerator&&"yield"===this.value&&this.raiseRecoverable(this.start,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===this.value&&this.raiseRecoverable(this.start,"Can not use 'await' as identifier inside an async function"),t.name=this.value):e&&this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},ee.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==F.semi||this.canInsertSemicolon()||this.type!=F.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(F.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},ee.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var ne=W.prototype;ne.raise=function(e,t){var n=u(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},ne.raiseRecoverable=ne.raise,ne.curPosition=function(){if(this.options.locations)return new V(this.curLine,this.pos-this.lineStart)};var re=W.prototype,ie=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0;r=0;t--)if(e.context[t].generator)return!0;return!1},ce.updateContext=function(e){var t,n=this.type;n.keyword&&e==F.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},F.parenR.updateContext=F.braceR.updateContext=function(){if(1==this.context.length)return void(this.exprAllowed=!0);var e,t=this.context.pop();t===ue.b_stat&&(e=this.curContext())&&"function"===e.token?(this.context.pop(),this.exprAllowed=!1):t===ue.b_tmpl?this.exprAllowed=!0:this.exprAllowed=!t.isExpr},F.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ue.b_stat:ue.b_expr),this.exprAllowed=!0},F.dollarBraceL.updateContext=function(){this.context.push(ue.b_tmpl),this.exprAllowed=!0},F.parenL.updateContext=function(e){var t=e===F._if||e===F._for||e===F._with||e===F._while;this.context.push(t?ue.p_stat:ue.p_expr),this.exprAllowed=!0},F.incDec.updateContext=function(){},F._function.updateContext=function(e){e.beforeExpr&&e!==F.semi&&e!==F._else&&(e!==F.colon&&e!==F.braceL||this.curContext()!==ue.b_stat)&&this.context.push(ue.f_expr),this.exprAllowed=!1},F.backQuote.updateContext=function(){this.curContext()===ue.q_tmpl?this.context.pop():this.context.push(ue.q_tmpl),this.exprAllowed=!1},F.star.updateContext=function(e){e==F._function&&(this.curContext()===ue.f_expr?this.context[this.context.length-1]=ue.f_expr_gen:this.context.push(ue.f_gen)),this.exprAllowed=!0},F.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var le=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new q(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},pe=W.prototype,he="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);pe.next=function(){this.options.onToken&&this.options.onToken(new le(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},pe.getToken=function(){return this.next(),new le(this)},"undefined"!=typeof Symbol&&(pe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===F.eof,value:t}}}}),pe.curContext=function(){return this.context[this.context.length-1]},pe.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(F.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},pe.readToken=function(e){return n(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},pe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},pe.skipBlockComment=function(){var e=this,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(-1===r&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations){O.lastIndex=n;for(var i;(i=O.exec(this.input))&&i.index8&&t<14||t>=5760&&B.test(String.fromCharCode(t))))break e;++e.pos}}},pe.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},pe.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(F.ellipsis)):(++this.pos,this.finishToken(F.dot))},pe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(F.assign,2):this.finishOp(F.slash,1)},pe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?F.star:F.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,r=F.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(F.assign,n+1):this.finishOp(r,n)},pe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?F.logicalOR:F.logicalAND,2):61===t?this.finishOp(F.assign,2):this.finishOp(124===e?F.bitwiseOR:F.bitwiseAND,1)},pe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(F.assign,2):this.finishOp(F.bitwiseXOR,1)},pe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45==t&&62==this.input.charCodeAt(this.pos+2)&&$.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(F.incDec,2):61===t?this.finishOp(F.assign,2):this.finishOp(F.plusMin,1)},pe.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(F.assign,n+1):this.finishOp(F.bitShift,n)):33==t&&60==e&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(n=2),this.finishOp(F.relational,n))},pe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(F.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(F.arrow)):this.finishOp(61===e?F.eq:F.prefix,1)},pe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(F.parenL);case 41:return++this.pos,this.finishToken(F.parenR);case 59:return++this.pos,this.finishToken(F.semi);case 44:return++this.pos,this.finishToken(F.comma);case 91:return++this.pos,this.finishToken(F.bracketL);case 93:return++this.pos,this.finishToken(F.bracketR);case 123:return++this.pos,this.finishToken(F.braceL);case 125:return++this.pos,this.finishToken(F.braceR);case 58:return++this.pos,this.finishToken(F.colon);case 63:return++this.pos,this.finishToken(F.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(F.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(F.prefix,1)}this.raise(this.pos,"Unexpected character '"+d(e)+"'")},pe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var fe=!!f("￿","u");pe.readRegexp=function(){for(var e,t,n=this,r=this.pos;;){n.pos>=n.input.length&&n.raise(r,"Unterminated regular expression");var i=n.input.charAt(n.pos);if($.test(i)&&n.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var s=this.input.slice(r,this.pos);++this.pos;var o=this.readWord1(),a=s,u="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(r,"Invalid regular expression flag"),o.indexOf("u")>=0&&(fe?u="u":(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return t=Number("0x"+t),t>1114111&&n.raise(r+i+3,"Code point out of bounds"),"x"}),a=a.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),u=u.replace("u","")))}var l=null;return he||(f(a,u,r,this),l=f(s,o)),this.finishToken(F.regexp,{pattern:s,flags:o,value:l})},pe.readInt=function(e,t){for(var n=this,r=this.pos,i=0,s=0,o=null==t?1/0:t;s=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;++n.pos,i=i*e+a}return this.pos===r||null!=t&&this.pos-r!==t?null:i},pe.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(F.num,t)},pe.readNumber=function(e){var t=this.pos,r=!1,i=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),i&&this.pos==t+1&&(i=!1);var s=this.input.charCodeAt(this.pos);46!==s||i||(++this.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(s=this.input.charCodeAt(++this.pos),43!==s&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o,a=this.input.slice(t,this.pos);return r?o=parseFloat(a):i&&1!==a.length?/[89]/.test(a)||this.strict?this.raise(t,"Invalid number"):o=parseInt(a,8):o=parseInt(a,10),this.finishToken(F.num,o)},pe.readCodePoint=function(){var e,t=this.input.charCodeAt(this.pos);if(123===t){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.raise(n,"Code point out of bounds")}else e=this.readHexChar(4);return e},pe.readString=function(e){for(var t=this,n="",r=++this.pos;;){t.pos>=t.input.length&&t.raise(t.start,"Unterminated string constant");var i=t.input.charCodeAt(t.pos);if(i===e)break;92===i?(n+=t.input.slice(r,t.pos),n+=t.readEscapedChar(!1),r=t.pos):(o(i)&&t.raise(t.start,"Unterminated string constant"),++t.pos)}return n+=this.input.slice(r,this.pos++),this.finishToken(F.string,n)},pe.readTmplToken=function(){for(var e=this,t="",n=this.pos;;){e.pos>=e.input.length&&e.raise(e.start,"Unterminated template");var r=e.input.charCodeAt(e.pos);if(96===r||36===r&&123===e.input.charCodeAt(e.pos+1))return e.pos===e.start&&e.type===F.template?36===r?(e.pos+=2,e.finishToken(F.dollarBraceL)):(++e.pos,e.finishToken(F.backQuote)):(t+=e.input.slice(n,e.pos),e.finishToken(F.template,t));if(92===r)t+=e.input.slice(n,e.pos),t+=e.readEscapedChar(!0),n=e.pos;else if(o(r)){switch(t+=e.input.slice(n,e.pos),++e.pos,r){case 13:10===e.input.charCodeAt(e.pos)&&++e.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(r)}e.options.locations&&(++e.curLine,e.lineStart=e.pos),n=e.pos}else++e.pos}},pe.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return d(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.raise(this.pos-2,"Octal literal in strict mode"), -this.pos+=n.length-1,String.fromCharCode(r)}return String.fromCharCode(t)}},pe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},pe.readWord1=function(){var e=this;this.containsEsc=!1;for(var t="",i=!0,s=this.pos,o=this.options.ecmaVersion>=6;this.pos=r)&&o[u](t,i,e),(null==n||t.start==n)&&(null==r||t.end==r)&&s(u,t))throw new h(t,i)}(t,a)}catch(e){if(e instanceof h)return e;throw e}}function o(t,n,r,s,o){r=i(r),s||(s=e.base);try{!function e(t,i,o){var a=o||t.type;if(!(t.start>n||t.end=n&&r(a,t))throw new h(t,i);s[a](t,i,e)}}(t,o)}catch(e){if(e instanceof h)return e;throw e}}function u(t,n,r,s,o){r=i(r),s||(s=e.base);var a;return function e(t,i,o){if(!(t.start>n)){var u=o||t.type;t.end<=n&&(!a||a.node.end=0&&e>1;return t?-n:n}var s=e("./base64");n.encode=function(e){var t,n="",i=r(e);do{t=31&i,i>>>=5,i>0&&(t|=32),n+=s.encode(t)}while(i>0);return n},n.decode=function(e,t,n){var r,o,a=e.length,u=0,c=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=s.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));r=!!(32&o),o&=31,u+=o<0?t-u>1?r(u,t,i,s,o,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,i,s,o,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,i,s){if(0===t.length)return-1;var o=r(-1,t.length,e,t,i,s||n.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(t[o],t[o-1],!0);)--o;return o}},{}],21:[function(e,t,n){function r(e,t){var n=e.generatedLine,r=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return r>n||r==n&&o>=i||s.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var s=e("./util");i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){r(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=i},{"./util":26}],22:[function(e,t,n){function r(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function i(e,t){return Math.round(e+Math.random()*(t-e))}function s(e,t,n,o){if(n=0){var s=this._originalMappings[i];if(void 0===e.column)for(var o=s.originalLine;s&&s.originalLine===o;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return r},n.SourceMapConsumer=r,i.prototype=Object.create(r.prototype),i.prototype.consumer=r,i.fromSourceMap=function(e){var t=Object.create(i.prototype),n=t._names=c.fromArray(e._names.toArray(),!0),r=t._sources=c.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),u=t.__generatedMappings=[],l=t.__originalMappings=[],h=0,f=o.length;h1&&(n.source=y+i[1],y+=i[1],n.originalLine=f+i[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=d+i[3],d=n.originalColumn,i.length>4&&(n.name=m+i[4],m+=i[4])),E.push(n),"number"==typeof n.originalLine&&w.push(n)}p(E,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,p(w,a.compareByOriginalPositions),this.__originalMappings=w},i.prototype._findMapping=function(e,t,n,r,i,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var s=a.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=a.join(this.sourceRoot,s)));var o=a.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:s,line:a.getArg(i,"originalLine",null),column:a.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=a.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=a.getArg(e,"source");if(null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var n={source:t,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=i,o.prototype=Object.create(r.prototype),o.prototype.constructor=r,o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){for(var e=[],t=0;t0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},r.prototype._serializeMappings=function(){for(var e,t,n,r,o=0,a=1,u=0,c=0,l=0,p=0,h="",f=this._mappings.toArray(),d=0,y=f.length;d0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=i.encode(r-p),p=r,e+=i.encode(t.originalLine-1-c),c=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=i.encode(n-l),l=n)),h+=e}return h},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var n=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=r},{"./array-set":17,"./base64-vlq":18,"./mapping-list":21,"./util":26}],25:[function(e,t,n){function r(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[o]=!0,null!=r&&this.add(r)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),o="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=n?s.join(n,e.source):e.source;o.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new r,a=e.split(/(\r?\n)/),u=function(){return a.shift()+(a.shift()||"")},c=1,l=0,p=null;return t.eachMapping(function(e){if(null!==p){if(!(c0&&(p&&i(p,u()),o.add(a.join(""))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=s.join(n,e)),o.setSourceContent(e,r))}),o},r.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},r.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},r.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n=0;l--)o=u[l],"."===o?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return t=u.join("/"),""===t&&(t=a?"/":"."),r?(r.path=t,s(r)):t}function a(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),r=i(e);if(r&&(e=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),s(n);if(n||t.match(v))return t;if(r&&!r.host&&!r.path)return r.host=t,s(r);var a="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return r?(r.path=a,s(r)):a}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if(e=e.slice(0,r),e.match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)}function c(e){return e}function l(e){return h(e)?"$"+e:e}function p(e){return h(e)?e.slice(1):e}function h(e){if(!e)return!1;var t=e.length;if(t<9)return!1 -;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function f(e,t,n){var r=e.source-t.source;return 0!==r?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)||n?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:(r=e.generatedLine-t.generatedLine,0!==r?r:e.name-t.name)}function d(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)||n?r:0!==(r=e.source-t.source)?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:e.name-t.name)}function y(e,t){return e===t?0:e>t?1:-1}function m(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=y(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:y(e.name,t.name))}n.getArg=r;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,v=/^data:.+\,.+$/;n.urlParse=i,n.urlGenerate=s,n.normalize=o,n.join=a,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(g)},n.relative=u;var b=function(){return!("__proto__"in Object.create(null))}();n.toSetString=b?c:l,n.fromSetString=b?c:p,n.compareByOriginalPositions=f,n.compareByGeneratedPositionsDeflated=d,n.compareByGeneratedPositionsInflated=m},{}],27:[function(e,t,n){n.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":23,"./lib/source-map-generator":24,"./lib/source-node":25}],28:[function(e,t,n){t.exports={_args:[[{raw:"nodent@^3.0.17",scope:null,escapedName:"nodent",name:"nodent",rawSpec:"^3.0.17",spec:">=3.0.17 <4.0.0",type:"range"},"/Users/evgenypoberezkin/JSON/ajv-v4"]],_from:"nodent@>=3.0.17 <4.0.0",_id:"nodent@3.0.17",_inCache:!0,_location:"/nodent",_nodeVersion:"6.9.1",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/nodent-3.0.17.tgz_1490780005669_0.5196401283610612"},_npmUser:{name:"matatbread",email:"npm@mailed.me.uk"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"nodent@^3.0.17",scope:null,escapedName:"nodent",name:"nodent",rawSpec:"^3.0.17",spec:">=3.0.17 <4.0.0",type:"range"},_requiredBy:["#DEV:/"],_resolved:"https://registry.npmjs.org/nodent/-/nodent-3.0.17.tgz",_shasum:"22df57d33c5346d6acc3722d9d69fa68bff518e4",_shrinkwrap:null,_spec:"nodent@^3.0.17",_where:"/Users/evgenypoberezkin/JSON/ajv-v4",author:{name:"Mat At Bread",email:"nodent@mailed.me.uk"},bin:{nodentjs:"./nodent.js"},bugs:{url:"https://github.com/MatAtBread/nodent/issues"},dependencies:{acorn:">=2.5.2","acorn-es7-plugin":">=1.1.6","nodent-runtime":">=3.0.4",resolve:"^1.2.0","source-map":"^0.5.6"},description:"NoDent - Asynchronous Javascript language extensions",devDependencies:{},directories:{},dist:{shasum:"22df57d33c5346d6acc3722d9d69fa68bff518e4",tarball:"https://registry.npmjs.org/nodent/-/nodent-3.0.17.tgz"},engines:"node >= 0.10.0",gitHead:"1a48bd0e8d0b4df69aa7b4b3cf8483c03c1cfbd5",homepage:"https://github.com/MatAtBread/nodent#readme",keywords:["Javascript","ES7","async","await","language","extensions","Node","callback","generator","Promise","asynchronous"],license:"BSD-2-Clause",main:"nodent.js",maintainers:[{name:"matatbread",email:"npm@mailed.me.uk"}],name:"nodent",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/MatAtBread/nodent.git"},scripts:{cover:"istanbul cover ./nodent.js tests -- --quick --syntax ; open ./coverage/lcov-report/index.html",start:"./nodent.js",test:"cd tests && npm i --prod && cd .. && node --expose-gc ./nodent.js tests --syntax --quick && node --expose-gc ./nodent.js tests --quick --notStrict","test-loader":"cd tests/loader/app && npm test && cd ../../.."},version:"3.0.17"}},{}],29:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;s--){var o=s>=0?arguments[s]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),s="/"===o(e,-1);return e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),s=r(t.split("/")),o=Math.min(i.length,s.length),a=o,u=0;u1)for(var n=1;n=(t[n]||0))return!0;return!1}(o))for(var a=0;a"))}return o.promises||o.es7||o.generators||o.engine?((o.promises||o.es7)&&o.generators&&(n("No valid 'use nodent' directive, assumed -es7 mode"),o=I.es7),(o.generators||o.engine)&&(o.promises=!0),o.promises&&(o.es7=!0),o):null}function y(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),"#!"===e.substring(0,2)&&(e="//"+e),e}function m(e){var t;return t=e instanceof i?e:new i(e.toString(),"binary"),t.toString("base64")}function g(e,t){return t=t||e.log,function(n,r,i){var s=y(N.readFileSync(r,"utf8")),o=e.parse(s,r,i);i=i||d(o.ast,t,r),e.asynchronize(o,void 0,i,t),e.prettyPrint(o,i),n._compile(o.code,o.filename)}}function v(e){return e=e||q,function(t,n,r){if(Array.isArray(n)){var i=n;n=function(e,t){return i.indexOf(e)>=0}}else n=n||function(e,t){return!(e.match(/Sync$/)&&e.replace(/Sync$/,"")in t)};r||(r="");var s=Object.create(t);for(var o in s)!function(){var i=o;try{"function"!=typeof t[i]||s[i+r]&&s[i+r].isAsync||!n(i,s)||(s[i+r]=function(){var n=Array.prototype.slice.call(arguments);return new e(function(e,r){var s=function(t,n){if(t)return r(t);switch(arguments.length){case 0:return e();case 2:return e(n);default:return e(Array.prototype.slice.call(arguments,1))}};n.length>t[i].length?n.push(s):n[t[i].length-1]=s;t[i].apply(t,n)})},s[i+r].isAsync=!0)}catch(e){}}();return s.super=t,s}}function b(t,n){var r=t.filename.split("/"),i=r.pop(),s=T(t.ast,n&&n.sourcemap?{map:{startLine:n.mapStartLine||0,file:i+"(original)",sourceMapRoot:r.join("/"),sourceContent:t.origCode}}:null,t.origCode);if(n&&n.sourcemap)try{var o="",a=s.map.toJSON();if(a){var u=e("source-map").SourceMapConsumer;t.sourcemap=a,P[t.filename]={map:a,smc:new u(a)},o="\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+m(JSON.stringify(a))+"\n"}t.code=s.code+o}catch(e){t.code=s}else t.code=s;return t}function x(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n);var i={origCode:e.toString(),filename:t};try{return i.ast=F.parse(i.origCode,r&&r.parser),r.babelTree&&F.treeWalker(i.ast,function(e,t,n){"Literal"===e.type?n[0].replace($.babelLiteralNode(e.value)):"Property"===e.type&&("ClassBody"===n[0].parent.type?e.type="ClassProperty":e.type="ObjectProperty"),t()}),i}catch(e){if(e instanceof SyntaxError){var s=i.origCode.substr(e.pos-e.loc.column);s=s.split("\n")[0],e.message+=" "+t+" (nodent)\n"+s+"\n"+s.replace(/[\S ]/g,"-").substring(0,e.loc.column)+"^",e.stack=""}throw e}}function w(t,n){n=n||{};var r=t+"|"+Object.keys(n).sort().reduce(function(e,t){return e+t+JSON.stringify(n[t])},"");return this.covers[r]||(t.indexOf("/")>=0?this.covers[r]=e(t):this.covers[r]=e(c+"/covers/"+t)),this.covers[r](this,n)}function E(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n),r=r||{};for(var i in R)i in r||(r[i]=R[i]);var s=this.parse(e,t,null,r);return this.asynchronize(s,null,r,this.log||h),this.prettyPrint(s,r),s}function S(t,n,r){var i={},s=this;n||(n=/\.njs$/),r?r.compiler||(r.compiler={}):r={compiler:{}};var o=l([B,r.compiler]);return function(a,u,c){function l(e){u.statusCode=500,u.write(e.toString()),u.end()}if(i[a.url])return u.setHeader("Content-Type",i[a.url].contentType),r.setHeaders&&r.setHeaders(u),u.write(i[a.url].output),void u.end();if(!(a.url.match(n)||r.htmlScriptRegex&&a.url.match(r.htmlScriptRegex)))return c&&c();var p=t+a.url;if(r.extensions&&!N.existsSync(p))for(var h=0;h …"+n.source+":"+n.line+":"+n.column+(e.getFunctionName()?")":"")}}return"\n at "+e}return e+t.map(n).join("")}function _(e){var t={};t[R.$asyncbind]={value:D,writable:!0,enumerable:!1,configurable:!0},t[R.$asyncspawn]={value:V,writable:!0,enumerable:!1,configurable:!0};try{Object.defineProperties(Function.prototype,t)}catch(t){e.log("Function prototypes already assigned: ",t.messsage)}R[R.$error]in r||(r[R[R.$error]]=p),e.augmentObject&&Object.defineProperties(Object.prototype,{asyncify:{value:function(e,t,n){return v(e)(this,t,n)},writable:!0,configurable:!0},isThenable:{value:function(){return q.isThenable(this)},writable:!0,configurable:!0}}),Object[R.$makeThenable]=q.resolve}function C(t){function n(e,t){e=e.split("."),t=t.split(".");for(var n=0;n<3;n++){if(e[n]t[n])return 1}return 0}function r(i,s){if(!s.match(/nodent\/nodent\.js$/)){if(s.match(/node_modules\/nodent\/.*\.js$/))return L(i,s);for(var u=0;u=3&&function(){function t(e,t){try{var n,s;if(o.fromast){if(e=JSON.parse(e),n={origCode:"",filename:i,ast:e},!(s=d(e,a.log))){var u=o.use?'"use nodent-'+o.use+'";':'"use nodent";';s=d(u,a.log),console.warn("/* "+i+": No 'use nodent*' directive, assumed "+u+" */")}}else s=d(o.use?'"use nodent-'+o.use+'";':e,a.log),s||(s=d('"use nodent";',a.log),o.dest||console.warn("/* "+i+": 'use nodent*' directive missing/ignored, assumed 'use nodent;' */")),n=a.parse(e,i,s);if(o.parseast||o.pretty||a.asynchronize(n,void 0,s,a.log),a.prettyPrint(n,s),o.out||o.pretty||o.dest){if(o.dest&&!t)throw new Error("Can't write unknown file to "+o.dest);var c="";o.runtime&&(c+="Function.prototype.$asyncbind = "+Function.prototype.$asyncbind.toString()+";\n",c+="global.$error = global.$error || "+r.$error.toString()+";\n"),c+=n.code,t&&o.dest?(N.writeFileSync(o.dest+t,c),console.log("Compiled",o.dest+t)):console.log(c)}(o.minast||o.parseast)&&console.log(JSON.stringify(n.ast,function(e,t){return"$"===e[0]||e.match(/^(start|end|loc)$/)?void 0:t},2,null)),o.ast&&console.log(JSON.stringify(n.ast,function(e,t){return"$"===e[0]?void 0:t},0)),o.exec&&new Function(n.code)()}catch(e){console.error(e)}}var i,s=e("path"),o=(n.env.NODENT_OPTS&&JSON.parse(n.env.NODENT_OPTS),function(e){for(var t=[],r=e||2;r=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(p,"$1 $3")),e.test(r)}function s(e,t,n,r){var i=new e.constructor(e.options,e.input,t);if(n)for(var s in n)i[s]=n[s];var o=e,a=i;return["inFunction","inAsyncFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in o&&(a[e]=o[e])}),r&&(i.options.preserveParens=!0),i.nextToken(),i}function o(e,t){var n=function(){};e.extend("initialContext",function(r){return function(){return this.options.ecmaVersion<7&&(n=function(t){e.raise(t.start,"async/await keywords only available when ecmaVersion>=7")}),this.reservedWords=new RegExp(this.reservedWords.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrict=new RegExp(this.reservedWordsStrict.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.reservedWordsStrictBind=new RegExp(this.reservedWordsStrictBind.toString().replace(/await|async/g,"").replace("|/","/").replace("/|","/").replace("||","|")),this.inAsyncFunction=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),r.apply(this,arguments)}}),e.extend("shouldParseExportStatement",function(e){return function(){return!("name"!==this.type.label||"async"!==this.value||!i(c,this))||e.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label)if(i(c,this,!0)){var a=this.inAsyncFunction;try{return this.inAsyncFunction=!0,this.next(),(l=this.parseStatement(n,r)).async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}finally{this.inAsyncFunction=a}}else if("object"==typeof t&&t.asyncExits&&i(u,this)){this.next();var l=this.parseStatement(n,r);return l.async=!0,l.start=s,l.loc&&(l.loc.start=o),l.range&&(l.range[0]=s),l}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(t){var n=e.apply(this,arguments);return this.inAsyncFunction&&"await"===n.name&&0===arguments.length&&this.raise(n.start,"'await' is reserved within async functions"),n}}),e.extend("parseExprAtom",function(e){return function(i){var o,u=this.start,c=this.startLoc,p=e.apply(this,arguments);if("Identifier"===p.type)if("async"!==p.name||r(this,p.end)){if("await"===p.name){var h=this.startNodeAt(p.start,p.loc&&p.loc.start);if(this.inAsyncFunction)return o=this.parseExprSubscripts(),h.operator="await",h.argument=o,h=this.finishNodeAt(h,"AwaitExpression",o.end,o.loc&&o.loc.end),n(h),h;if(this.input.slice(p.end).match(l))return t.awaitAnywhere||"module"!==this.options.sourceType?p:this.raise(p.start,"'await' is reserved within modules");if("object"==typeof t&&t.awaitAnywhere&&(u=this.start,(o=s(this,u-4).parseExprSubscripts()).end<=u))return o=s(this,u).parseExprSubscripts(),h.operator="await",h.argument=o,h=this.finishNodeAt(h,"AwaitExpression",o.end,o.loc&&o.loc.end),this.pos=o.end,this.end=o.end,this.endLoc=o.endLoc,this.next(),n(h),h;if(!t.awaitAnywhere&&"module"===this.options.sourceType)return this.raise(p.start,"'await' is reserved within modules")}}else{var f=this.inAsyncFunction;try{this.inAsyncFunction=!0;var d=this,y=!1,m={parseFunctionBody:function(e,t){try{var n=y;return y=!0,d.parseFunctionBody.apply(this,arguments)}finally{y=n}},raise:function(){try{return d.raise.apply(this,arguments)}catch(e){throw y?e:a}}};if("SequenceExpression"===(o=s(this,this.start,m,!0).parseExpression()).type&&(o=o.expressions[0]),"CallExpression"===o.type&&(o=o.callee),"FunctionExpression"===o.type||"FunctionDeclaration"===o.type||"ArrowFunctionExpression"===o.type)return"SequenceExpression"===(o=s(this,this.start,m).parseExpression()).type&&(o=o.expressions[0]),"CallExpression"===o.type&&(o=o.callee),o.async=!0,o.start=u,o.loc&&(o.loc.start=c),o.range&&(o.range[0]=u),this.pos=o.end,this.end=o.end,this.endLoc=o.endLoc,this.next(),n(o),o}catch(e){if(e!==a)throw e}finally{this.inAsyncFunction=f}}return p}}),e.extend("finishNodeAt",function(e){return function(t,n,r,i){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}}),e.extend("finishNode",function(e){return function(t,n){return t.__asyncValue&&(delete t.__asyncValue,t.value.async=!0),e.apply(this,arguments)}});e.extend("parsePropertyName",function(e){return function(t){t.key&&t.key.name;var i=e.apply(this,arguments);return"Identifier"!==i.type||"async"!==i.name||r(this,i.end)||this.input.slice(i.end).match(l)||(h.test(this.input.slice(i.end))?(i=e.apply(this,arguments),t.__asyncValue=!0):(n(t),"set"===t.kind&&this.raise(i.start,"'set (value)' cannot be be async"),"Identifier"===(i=e.apply(this,arguments)).type&&"set"===i.name&&this.raise(i.start,"'set (value)' cannot be be async"),t.__asyncValue=!0)),i}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i;n.__asyncValue&&("constructor"===n.kind&&this.raise(n.start,"class constructor() cannot be be async"),i=this.inAsyncFunction,this.inAsyncFunction=!0);var s=e.apply(this,arguments);return this.inAsyncFunction=i,s}}),e.extend("parseMethod",function(e){return function(t){var n;this.__currentProperty&&this.__currentProperty.__asyncValue&&(n=this.inAsyncFunction,this.inAsyncFunction=!0);var r=e.apply(this,arguments);return this.inAsyncFunction=n,r}}),e.extend("parsePropertyValue",function(e){return function(t,n,r,i,s,o){var a=this.__currentProperty;this.__currentProperty=t;var u;t.__asyncValue&&(u=this.inAsyncFunction,this.inAsyncFunction=!0);var c=e.apply(this,arguments);return this.inAsyncFunction=u,this.__currentProperty=a,c}})}var a={},u=/^async[\t ]+(return|throw)/,c=/^async[\t ]+function/,l=/^\s*[():;]/,p=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g,h=/\s*(get|set)\s*\(/;t.exports=o},{}],3:[function(e,t,n){function r(e,t){return e.lineStart>=t}function i(e,t,n){var r=t.input.slice(t.start);return n&&(r=r.replace(c,"$1 $3")),e.test(r)}function s(e,t,n){var r=new e.constructor(e.options,e.input,t);if(n)for(var i in n)r[i]=n[i];var s=e,o=r;return["inFunction","inAsync","inGenerator","inModule"].forEach(function(e){e in s&&(o[e]=s[e])}),r.nextToken(),r}function o(e,t){t&&"object"==typeof t||(t={}),e.extend("parse",function(n){return function(){return this.inAsync=t.inAsyncFunction,t.awaitAnywhere&&t.inAsyncFunction&&e.raise(node.start,"The options awaitAnywhere and inAsyncFunction are mutually exclusive"),n.apply(this,arguments)}}),e.extend("parseStatement",function(e){return function(n,r){var s=this.start,o=this.startLoc;if("name"===this.type.label&&t.asyncExits&&i(a,this)){this.next();var u=this.parseStatement(n,r);return u.async=!0,u.start=s,u.loc&&(u.loc.start=o),u.range&&(u.range[0]=s),u}return e.apply(this,arguments)}}),e.extend("parseIdent",function(e){return function(n){return"module"===this.options.sourceType&&this.options.ecmaVersion>=8&&t.awaitAnywhere?e.call(this,!0):e.apply(this,arguments)}}),e.extend("parseExprAtom",function(e){var n={};return function(r){var i,o=this.start,a=(this.startLoc,e.apply(this,arguments));if("Identifier"===a.type&&"await"===a.name&&!this.inAsync&&t.awaitAnywhere){var u=this.startNodeAt(a.start,a.loc&&a.loc.start);o=this.start;var c={raise:function(){try{return pp.raise.apply(this,arguments)}catch(e){throw n}}};try{if((i=s(this,o-4,c).parseExprSubscripts()).end<=o)return i=s(this,o,c).parseExprSubscripts(),u.argument=i,u=this.finishNodeAt(u,"AwaitExpression",i.end,i.loc&&i.loc.end),this.pos=i.end,this.end=i.end,this.endLoc=i.endLoc,this.next(),u}catch(e){if(e===n)return a;throw e}}return a}});var n={undefined:!0,get:!0,set:!0,static:!0,async:!0,constructor:!0};e.extend("parsePropertyName",function(e){return function(t){var i=t.key&&t.key.name,s=e.apply(this,arguments);"get"===this.value&&(t.__maybeStaticAsyncGetter=!0);return n[this.value]?s:("Identifier"!==s.type||"async"!==s.name&&"async"!==i||r(this,s.end)||this.input.slice(s.end).match(u)?delete t.__maybeStaticAsyncGetter:"set"===t.kind||"set"===s.name?this.raise(s.start,"'set (value)' cannot be be async"):(this.__isAsyncProp=!0,"Identifier"===(s=e.apply(this,arguments)).type&&"set"===s.name&&this.raise(s.start,"'set (value)' cannot be be async")),s)}}),e.extend("parseClassMethod",function(e){return function(t,n,r){var i=e.apply(this,arguments);return n.__maybeStaticAsyncGetter&&(delete n.__maybeStaticAsyncGetter,"get"!==n.key.name&&(n.kind="get")),i}}),e.extend("parseFunctionBody",function(e){return function(t,n){var r=this.inAsync;this.__isAsyncProp&&(t.async=!0,this.inAsync=!0,delete this.__isAsyncProp);var i=e.apply(this,arguments);return this.inAsync=r,i}})}var a=/^async[\t ]+(return|throw)/,u=/^\s*[):;]/,c=/([^\n])\/\*(\*(?!\/)|[^\n*])*\*\/([^\n])/g;t.exports=o},{}],4:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function s(e){var t,n,i,s,o,a,u=e.length;o=r(e),a=new p(3*u/4-o),i=o>0?u-4:u;var c=0;for(t=0,n=0;t>16&255,a[c++]=s>>8&255,a[c++]=255&s;return 2===o?(s=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[c++]=255&s):1===o&&(s=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[c++]=s>>8&255,a[c++]=255&s),a}function o(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function a(e,t,n){for(var r,i=[],s=t;su?u:o+16383));return 1===r?(t=e[n-1],i+=c[t>>2],i+=c[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+="="),s.push(i),s.join("")}n.byteLength=i,n.toByteArray=s,n.fromByteArray=u;for(var c=[],l=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=h.length;fH)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(e)}return s(e,t,n)}function s(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?p(e,t,n):"string"==typeof e?c(e,t):h(e)}function o(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function a(e,t,n){return o(e),e<=0?r(e):void 0!==t?"string"==typeof n?r(e).fill(t,n):r(e).fill(t):r(e)}function u(e){return o(e),r(e<0?0:0|f(e))}function c(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(e,t),s=r(n),o=s.write(e,t);return o!==n&&(s=s.slice(0,o)),s}function l(e){for(var t=e.length<0?0:0|f(e.length),n=r(t),i=0;i=H)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+H.toString(16)+" bytes");return 0|e}function d(e){return+e!=e&&(e=0),i.alloc(+e)}function y(e,t){if(i.isBuffer(e))return e.length;if(W(e)||e instanceof ArrayBuffer)return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return M(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,s){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,G(n)&&(n=s?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(s)return-1;n=e.length-1}else if(n<0){if(!s)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,s);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,i){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var p=!0,h=0;hi&&(r=i):r=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");r>s/2&&(r=s/2);for(var o=0;o239?4:s>223?3:s>191?2:1;if(i+a<=n){var u,c,l,p;switch(a){case 1:s<128&&(o=s);break;case 2:128==(192&(u=e[i+1]))&&(p=(31&s)<<6|63&u)>127&&(o=p);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(p=(15&s)<<12|(63&u)<<6|63&c)>2047&&(p<55296||p>57343)&&(o=p);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(p=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&p<1114112&&(o=p)}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return L(r)}function L(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",s=t;sn)throw new RangeError("Trying to access beyond buffer length")}function $(e,t,n,r,s,o){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function B(e,t,n,r,i,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Y.write(e,t,n,r,23,4),n+4}function I(e,t,n,r,i){return t=+t,n>>>=0,i||B(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Y.write(e,t,n,r,52,8),n+8}function j(e){if((e=e.trim().replace(Q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function D(e){return e<16?"0"+e.toString(16):e.toString(16)}function M(e,t){t=t||1/0;for(var n,r=e.length,i=null,s=[],o=0;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function V(e){for(var t=[],n=0;n>8,i=n%256,s.push(i),s.push(r);return s}function U(e){return J.toByteArray(j(e))}function z(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function W(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function G(e){return e!==e}var J=e("base64-js"),Y=e("ieee754");n.Buffer=i,n.SlowBuffer=d,n.INSPECT_MAX_BYTES=50;var H=2147483647;n.kMaxLength=H,i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,n){return s(e,t,n)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,n){return a(e,t,n)},i.allocUnsafe=function(e){return u(e)},i.allocUnsafeSlow=function(e){return u(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,s=0,o=Math.min(n,r);s0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,t,n,r,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===s&&(s=this.length),t<0||n>e.length||r<0||s>this.length)throw new RangeError("out of range index");if(r>=s&&t>=n)return 0;if(r>=s)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,s>>>=0,this===e)return 0;for(var o=s-r,a=n-t,u=Math.min(o,a),c=this.slice(r,s),l=e.slice(t,n),p=0;p>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s=!1;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return E(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e],i=1,s=0;++s>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},i.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e],i=1,s=0;++s=i&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=t,i=1,s=this[e+--r];r>0&&(i*=256);)s+=this[e+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),Y.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),Y.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),Y.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),Y.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||$(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,s=0;for(this[t]=255&e;++s>>=0,n>>>=0,r||$(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||$(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||$(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||$(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||$(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||$(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);$(this,e,t,n,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var i=Math.pow(2,8*n-1);$(this,e,t,n,i-1,-i)}var s=n-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||$(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||$(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||$(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||$(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||$(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return I(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return I(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(s<1e3)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o>1,l=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=256*s+e[t+p],p+=h,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=r;l>0;o=256*o+e[t+p],p+=h,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,r),s-=c}return(f?-1:1)*o*Math.pow(2,s-r)},n.write=function(e,t,n,r,i,s){var o,a,u,c=8*s-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:s-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+p>=1?h/u:h*Math.pow(2,1-p))*u>=2&&(o++,u/=2),o+p>=l?(a=0,o=l):o+p>=1?(a=(t*u-1)*Math.pow(2,i),o+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&a,f+=d,a/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=d,o/=256,c-=8);e[n+f-d]|=128*y}},{}],8:[function(e,t,n){"use strict";function r(e,t){if(Function.prototype.$asyncspawn||Object.defineProperty(Function.prototype,"$asyncspawn",{value:r,enumerable:!1,configurable:!0,writable:!0}),this instanceof Function){var n=this;return new e(function(e,r){function i(t,n){var o;try{if((o=t.call(s,n)).done){if(o.value!==e){if(o.value&&o.value===o.value.then)return o.value(e,r);e&&e(o.value),e=null}return}o.value.then?o.value.then(function(e){i(s.next,e)},function(e){i(s.throw,e)}):i(s.next,o.value)}catch(e){return r&&r(e),void(r=null)}}var s=n.call(t,e,r);i(s.next)})}}var i=function(e,t){for(var n=t.toString(),r="return "+n,i=n.match(/.*\(([^)]*)\)/)[1],s=/['"]!!!([^'"]*)['"]/g,o=[];;){var a=s.exec(r);if(!a)break;o.push(a)}return o.reverse().forEach(function(t){r=r.slice(0,t.index)+e[t[1]]+r.substr(t.index+t[0].length)}),r=r.replace(/\/\*[^*]*\*\//g," ").replace(/\s+/g," "),new Function(i,r)()}({zousan:e("./zousan").toString(),thenable:e("./thenableFactory").toString()},function e(t,n){function r(){return i.apply(t,arguments)}Function.prototype.$asyncbind||Object.defineProperty(Function.prototype,"$asyncbind",{value:e,enumerable:!1,configurable:!0,writable:!0}),e.trampoline||(e.trampoline=function(e,t,n,r,i){return function s(o){for(;o;){if(o.then)return o=o.then(s,r),i?void 0:o;try{if(o.pop){if(o.length)return o.pop()?t.call(e):o;o=n}else o=o.call(e)}catch(e){return r(e)}}}}),e.LazyThenable||(e.LazyThenable="!!!thenable"(),e.EagerThenable=e.Thenable=(e.EagerThenableFactory="!!!zousan")());var i=this;switch(n){case!0:return new e.Thenable(r);case 0:return new e.LazyThenable(r);case void 0:return r.then=r,r;default:return function(){try{return i.apply(t,arguments)}catch(e){return n(e)}}}});i(),r(),t.exports={$asyncbind:i,$asyncspawn:r}},{"./thenableFactory":9,"./zousan":10}],9:[function(e,t,n){t.exports=function(){function e(e){return e&&e instanceof Object&&"function"==typeof e.then}function t(n,r,i){try{var s=i?i(r):r;if(n===s)return n.reject(new TypeError("Promise resolution loop"));e(s)?s.then(function(e){t(n,e)},function(e){n.reject(e)}):n.resolve(s)}catch(e){n.reject(e)}}function n(){}function r(e){}function i(e,t){this.resolve=e,this.reject=t}function s(r,i){var s=new n;try{this._resolver(function(n){return e(n)?n.then(r,i):t(s,n,r)},function(e){t(s,e,i)})}catch(e){t(s,e,i)}return s}function o(e){this._resolver=e,this.then=s}return n.prototype={resolve:r,reject:r,then:i},o.resolve=function(e){return o.isThenable(e)?e:{then:function(t){return t(e)}}},o.isThenable=e,o}},{}],10:[function(e,t,n){(function(e){"use strict";t.exports=function(t){function n(e){if(e){var t=this;e(function(e){t.resolve(e)},function(e){t.reject(e)})}}function r(e,t){if("function"==typeof e.y)try{var n=e.y.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.resolve(t)}function i(e,t){if("function"==typeof e.n)try{var n=e.n.call(void 0,t);e.p.resolve(n)}catch(t){e.p.reject(t)}else e.p.reject(t)}t=t||"object"==typeof e&&e.nextTick||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,0)};var s=function(){function e(){for(;n.length-r;){try{n[r]()}catch(e){}n[r++]=void 0,r===i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024;return function(i){n.push(i),n.length-r==1&&t(e)}}();return n.prototype={resolve:function(e){if(void 0===this.state){if(e===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var t=this;if(e&&("function"==typeof e||"object"==typeof e))try{var n=0,i=e.then;if("function"==typeof i)return void i.call(e,function(e){n++||t.resolve(e)},function(e){n++||t.reject(e)})}catch(e){return void(n||this.reject(e))}this.state=r,this.v=e,t.c&&s(function(){for(var n=0,i=t.c.length;n]*>)(.*)/i,/(.*)(<\/script>)(.*)/i],o=0,a=!0;t=t.split("\n");for(var u=0;u0){if(!a)return t(e);delete e.async}return void(!a&&i?t():(e.type="ReturnStatement",e.$mapped=!0,e.argument={type:"CallExpression",callee:A(s,[n]).$error,arguments:[e.argument]}))}return"TryStatement"===e.type?(i++,t(e),void i--):o(e).isFunction?(r++,t(e),void r--):void t(e)}if(r>0){if(!o(e).isAsync)return t(e);delete e.async}return e.$mapped=!0,void(o(e.argument).isUnaryExpression&&"void"===e.argument.operator?e.argument=e.argument.argument:e.argument={type:"CallExpression",callee:A(s,[n]).$return,arguments:e.argument?[e.argument]:[]})},t)}function O(e,t){return Array.isArray(e)?e.map(function(e){return O(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"ConditionalExpression"===e.type&&(u(e.alternate)||u(e.consequent))){h(E("condOp"));i(e,L(y.part("if ($0) return $1 ; return $2",[e.test,e.consequent,e.alternate]).body))}},t),e)}function $(e,t){return Array.isArray(e)?e.map(function(e){return $(e,t)}):(y.treeWalker(e,function(e,t,n){if(t(),"LogicalExpression"===e.type&&u(e.right)){var r,s=h(E("logical"+("&&"===e.operator?"And":"Or")));if("||"===e.operator)r="var $0; if (!($0 = $1)) {$0 = $2} return $0";else{if("&&"!==e.operator)throw new Error(v(e)+"Illegal logical operator: "+e.operator);r="var $0; if ($0 = $1) {$0 = $2} return $0"}i(e,L(y.part(r,[s,e.left,e.right]).body))}},t),e)}function B(e,t,n){if("SwitchCase"!==e.type&&o(e).isBlockStatement)for(var r=0;r { $$setMapped: while (q) { if (q.then) "+(1===s?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }))($idIter)":"($idTrampoline = (function (q) { $$setMapped: while (q) { if (q.then) "+(1===s?" return void q.then($idTrampoline, $exit); ":" return q.then($idTrampoline, $exit); ")+" try { if (q.pop) if (q.length) return q.pop() ? $idContinuation.call(this) : q; else q = $idStep; else q = q.call(this) } catch (_exception) { return $exit(_exception); } } }).bind(this))($idIter)",{setMapped:function(e){return e.$mapped=!0,e},idTrampoline:E,exit:O,idIter:S,idContinuation:_,idStep:k}).expr:y.part("(Function.$0.trampoline(this,$1,$2,$3,$5)($4))",[me.asyncbind,_,k,O,S,b(1===s)]).expr,l.push({type:"ReturnStatement",argument:F}),l.push({$label:e.$label,type:"FunctionDeclaration",id:S,params:[],body:{type:"BlockStatement",body:m}}),d&&l.push({type:"FunctionDeclaration",id:k,params:[],body:{type:"BlockStatement",body:[d,P]}}),!p||"VariableDeclaration"!==p.type||"let"!==p.kind&&"const"!==p.kind?(l.push(x),t[0].replace(l.map(r))):("const"===p.kind&&(p.kind="let"),t[0].replace([{type:"BlockStatement",body:l.map(r)},r(x)]))}}function Y(e,t){return y.treeWalker(e,function(e,t,s){function a(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:P(e||S)}}}function c(e,t){if("BreakStatement"===e.type)i(e,r(A(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_exit")));else if("ContinueStatement"===e.type)i(e,r(a(e.label&&n.generatedSymbolPrefix+"Loop_"+e.label.name+"_next")));else if(o(e).isFunction)return!0;t()}"ForInStatement"===e.type&&u(e)?W(e,s):"ForOfStatement"===e.type&&u(e)&&G(e,s),t();var p;if(o(e).isLoop&&u(e)){var f=e.init,d=e.test||b(!0),g=e.update,v=e.body,x=l(v);f&&(o(f).isStatement||(f={type:"ExpressionStatement",expression:f})),g=g&&{type:"ExpressionStatement",expression:g},v=o(v).isBlockStatement?r(v).body:[r(v)];var w=e.$label&&e.$label.name;w="Loop_"+(w||ye++);var E=n.generatedSymbolPrefix+(w+"_exit"),S=n.generatedSymbolPrefix+(w+"_next"),k=h(n.generatedSymbolPrefix+w),A=function(e){return{type:"ReturnStatement",argument:{type:"UnaryExpression",operator:"void",prefix:!0,argument:{type:"CallExpression",callee:h(e||E),arguments:[]}}}},_=C(S,[{type:"ReturnStatement",argument:{type:"CallExpression",callee:x?m(k):k,arguments:[h(E),me.error]}}]);g&&_.body.body.unshift(g);for(var L=0;L0&&o(e).isAsync)return delete e.async,e.argument={type:"CallExpression",callee:"ThrowStatement"===e.type?me.error:me.return,arguments:e.argument?[e.argument]:[]},void(e.type="ReturnStatement");n(e)})}function K(e,t){if(n.noRuntime)throw new Error("Nodent: 'noRuntime' option only compatible with -promise and -engine modes");return y.part("{ return (function*($return,$error){ $:body }).$asyncspawn(Promise,this) }",{return:me.return,error:me.error,asyncspawn:me.asyncspawn,body:X(e).concat(t?[{type:"ReturnStatement",argument:me.return}]:[])}).body[0]}function ee(e){e.$asyncgetwarninig||(e.$asyncgetwarninig=!0,d(v(e)+"'async get "+printNode(e)+"(){...}' is non-standard. See https://github.com/MatAtBread/nodent#differences-from-the-es7-specification"))}function te(e,t){function s(e,t){y.treeWalker(e,function(n,r,i){n!==e&&o(n).isFunction||(o(n).isAwait?t?(n.$hidden=!0,r()):(delete n.operator,n.delegate=!1,n.type="YieldExpression",r()):r())})}function a(e){var t=n.promises;n.promises=!0,_(e,!0),n.promises=t}function u(e){return"BlockStatement"!==e.body.type&&(e.body={type:"BlockStatement",body:[{type:"ReturnStatement",argument:e.body}]}),e}function c(e,n){n.$asyncexitwarninig||(n.$asyncexitwarninig=!0,d(v(e)+"'async "+{ReturnStatement:"return",ThrowStatement:"throw"}[e.type]+"' not possible in "+(t?"engine":"generator")+" mode. Using Promises for function at "+v(n)))}y.treeWalker(e,function(e,n,r){n();var l,p,h;if(o(e).isAsync&&o(e).isFunction){var f;(f=x(r[0].parent))&&o(f).isAsync&&"get"===r[0].parent.kind&&ee(r[0].parent.key),(p=H(e))?(c(p,e.body),a(e)):t?"get"!==r[0].parent.kind&&s(e,!0):(delete(l=e).async,h=w(l),s(l,!1),(l=u(l)).body=K(l.body.body,p),h&&M(l.body.body,[ge]),l.id&&"ExpressionStatement"===r[0].parent.type?(l.type="FunctionDeclaration",r[1].replace(l)):r[0].replace(l))}else(l=x(e))&&o(l).isAsync&&((p=H(l))?(c(p,l),a(e)):t&&"get"!==e.kind||(t?a(e):(e.async=!1,h=w(l),s(l,!1),i(l,u(l)),l.body=K(l.body.body,p)),h&&M(l.body.body,[ge])))});var l=r(n);return n.engine=!1,n.generators=!1,ce(e),oe(e),D(e,l.engine),$(e),O(e),U(e,[q,J,R,I,B]),z(e,"warn"),n.engine=l.engine,n.generators=l.generators,e}function ne(e,t,n){var r=[];return y.treeWalker(e,function(i,s,a){if(i===e)return s();t(i,a)?r.push([].concat(a)):n||o(i).isScope||s()}),r}function re(e,t){var n=[],i={};if((e=e.filter(function(e){return"ExportNamedDeclaration"!==e[0].parent.type})).length){var s={};e.forEach(function(e){function t(e){e in s?i[e]=o.declarations[u]:s[e]=o.declarations[u]}for(var n=e[0],o=n.self,a=(o.kind,[]),u=0;u1?{type:"SequenceExpression",expressions:a}:a[0];"For"!==n.parent.type.slice(0,3)&&(p={type:"ExpressionStatement",expression:p}),n.replace(p)}});var o=Object.keys(s);o.length&&(o=o.map(function(e){return{type:"VariableDeclarator",id:h(e),loc:s[e].loc,start:s[e].start,end:s[e].end}}),n[0]&&"VariableDeclaration"===n[0].type?n[0].declarations=n[0].declarations.concat(o):n.unshift({type:"VariableDeclaration",kind:t,declarations:o}))}return{decls:n,duplicates:i}}function ie(e){if(!e)return[];if(Array.isArray(e))return e.reduce(function(e,t){return e.concat(ie(t.id))},[]);switch(e.type){case"Identifier":return[e.name];case"AssignmentPattern":return ie(e.left);case"ArrayPattern":return e.elements.reduce(function(e,t){return e.concat(ie(t))},[]);case"ObjectPattern":return e.properties.reduce(function(e,t){return e.concat(ie(t))},[]);case"ObjectProperty":case"Property":return ie(e.value);case"RestElement":case"RestProperty":return ie(e.argument)}}function se(e){function t(e){d(v(e)+"Possible assignment to 'const "+printNode(e)+"'")}function n(e){switch(e.type){case"Identifier":"const"===r[e.name]&&t(e);break;case"ArrayPattern":e.elements.forEach(function(e){"const"===r[e.name]&&t(e)});break;case"ObjectPattern":e.properties.forEach(function(e){"const"===r[e.key.name]&&t(e)})}}var r={};y.treeWalker(e,function(e,t,i){var s=o(e).isBlockStatement;if(s){r=Object.create(r);for(var a=0;a=0){var r=n[0];return("left"!=r.field||"ForInStatement"!==r.parent.type&&"ForOfStatement"!==r.parent.type)&&("init"!=r.field||"ForStatement"!==r.parent.type||"const"!==t.kind&&"let"!==t.kind)}}}function s(e,t){return!("FunctionDeclaration"!==e.type||!e.id)&&(o(e).isAsync||!e.$continuation)}var c={TemplateLiteral:function(e){return e.expressions},NewExpression:function(e){return e.arguments},CallExpression:function(e){return e.arguments},SequenceExpression:function(e){return e.expressions},ArrayExpression:function(e){return e.elements},ObjectExpression:function(e){return e.properties.map(function(e){return e.value})}};y.treeWalker(e,function(e,n,s){var a;if(n(),e.type in c&&!e.$hoisted){var s,l=c[e.type](e),p=[];for(a=0;a0;a--)if(e.declarations[a]&&e.declarations[a].init&&u(e.declarations[a].init)){var h={type:"VariableDeclaration",kind:e.kind,declarations:e.declarations.splice(a)},f=s[0];if(!("index"in f))throw new Error("VariableDeclaration not in a block");f.parent[f.field].splice(f.index+1,0,h)}}),se(e);var l=!1;return y.treeWalker(e,function(e,t,r){var i=l;if(l=l||pe(e),o(e).isBlockStatement){if(u(e)){var a,c,p,f,y;if(!r[0].parent||o(r[0].parent).isScope){var m={},g={};(c=ne(e,n(["const"]),!1)).forEach(function(e){e[0].self.declarations.forEach(function(e){ie(e.id).forEach(function(t){m[t]||g[t]?(delete m[t],g[t]=e):m[t]=e})})}),c.forEach(function(e){for(var t=0;t=0&&"ReturnStatement"===i[1].self.type){var s=e.$thisCallName,a=r(de[s].def.body.body);de[s].$inlined=!0,o(i[1].self).isJump||a.push({type:"ReturnStatement"}),i[1].replace(a)}});var n=Object.keys(de).map(function(e){return de[e].$inlined&&de[e].def});y.treeWalker(e,function(e,t,r){t(),n.indexOf(e)>=0&&r[0].remove()})}if(!("Program"===e.type&&"module"===e.sourceType||a(e,function(e){return o(e).isES6},!0))){var i=pe(e);!function(e){y.treeWalker(e,function(e,t,n){if("Program"===e.type||"FunctionDeclaration"===e.type||"FunctionExpression"===e.type){var r=i;if(i=i||pe(e)){t();var s="Program"===e.type?e:e.body,o=ne(s,function(e,t){if("FunctionDeclaration"===e.type)return t[0].parent!==s});o=o.map(function(e){return e[0].remove()}),[].push.apply(s.body,o)}else t();i=r}else t()})}(e)}return y.treeWalker(e,function(e,t,n){t(),Object.keys(e).filter(function(e){return"$"===e[0]}).forEach(function(t){delete e[t]})}),e}var de={},ye=1,me={};Object.keys(n).filter(function(e){return"$"===e[0]}).forEach(function(e){me[e.slice(1)]=h(n[e])});var ge=y.part("var $0 = arguments",[me.arguments]).body[0];return n.engine?(e.ast=ue(e.ast,!0),e.ast=te(e.ast,n.engine),e.ast=le(e.ast),fe(e.ast)):n.generators?(e.ast=ue(e.ast),e.ast=te(e.ast),e.ast=le(e.ast),fe(e.ast)):(e.ast=ue(e.ast),_(e.ast)),n.babelTree&&y.treeWalker(e.ast,function(e,t,n){t(),"Literal"===e.type&&i(e,b(e.value))}),e}var y=e("./parser"),m=e("./output");n.printNode=function e(t){if(!t)return"";if(Array.isArray(t))return t.map(e).join("|\n");try{return m(t)}catch(e){return e.message+": "+(t&&t.type)}};var g={start:!0,end:!0,loc:!0,range:!0},v={getScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type?this.node.body.body:"Program"===this.node.type?this.node.body:null},isScope:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"Program"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type&&"BlockStatement"===this.node.body.type},isFunction:function(){return"FunctionDeclaration"===this.node.type||"FunctionExpression"===this.node.type||"Function"===this.node.type||"ObjectMethod"===this.node.type||"ClassMethod"===this.node.type||"ArrowFunctionExpression"===this.node.type},isClass:function(){return"ClassDeclaration"===this.node.type||"ClassExpression"===this.node.type},isBlockStatement:function(){return"ClassBody"===this.node.type||"Program"===this.node.type||"BlockStatement"===this.node.type?this.node.body:"SwitchCase"===this.node.type&&this.node.consequent},isExpressionStatement:function(){return"ExpressionStatement"===this.node.type},isLiteral:function(){return"Literal"===this.node.type||"BooleanLiteral"===this.node.type||"RegExpLiteral"===this.node.type||"NumericLiteral"===this.node.type||"StringLiteral"===this.node.type||"NullLiteral"===this.node.type},isDirective:function(){return"ExpressionStatement"===this.node.type&&("StringLiteral"===this.node.expression.type||"Literal"===this.node.expression.type&&"string"==typeof this.node.expression.value)},isUnaryExpression:function(){return"UnaryExpression"===this.node.type},isAwait:function(){return"AwaitExpression"===this.node.type&&!this.node.$hidden},isAsync:function(){return this.node.async},isStatement:function(){return null!==this.node.type.match(/[a-zA-Z]+Declaration/)||null!==this.node.type.match(/[a-zA-Z]+Statement/)},isExpression:function(){return null!==this.node.type.match(/[a-zA-Z]+Expression/)},isLoop:function(){return"ForStatement"===this.node.type||"WhileStatement"===this.node.type||"DoWhileStatement"===this.node.type},isJump:function(){return"ReturnStatement"===this.node.type||"ThrowStatement"===this.node.type||"BreakStatement"===this.node.type||"ContinueStatement"===this.node.type},isES6:function(){switch(this.node.type){case"ExportNamedDeclaration":case"ExportSpecifier":case"ExportDefaultDeclaration":case"ExportAllDeclaration":case"ImportDeclaration":case"ImportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ArrowFunctionExpression":case"ForOfStatement":case"YieldExpression":case"Super":case"RestElement":case"RestProperty":case"SpreadElement":case"TemplateLiteral":case"ClassDeclaration":case"ClassExpression":return!0;case"VariableDeclaration":return this.node.kind&&"var"!==this.node.kind;case"FunctionDeclaration":case"FunctionExpression":return!!this.node.generator}}},b={};Object.keys(v).forEach(function(e){Object.defineProperty(b,e,{get:v[e]})}),t.exports={printNode:printNode,babelLiteralNode:p,asynchronize:function(e,t,n,r){try{return d(e,t,n,r)}catch(t){if(t instanceof SyntaxError){var i=e.origCode.substr(t.pos-t.loc.column);i=i.split("\n")[0],t.message+=" (nodent)\n"+i+"\n"+i.replace(/[\S ]/g,"-").substring(0,t.loc.column)+"^",t.stack=""}throw t}}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./output":13,"./parser":14}],13:[function(e,t,n){"use strict";function r(e){var t=y[e.type]||y[e.type+e.operator]||y[e.type+e.operator+(e.prefix?"prefix":"")];return void 0!==t?t:20}function i(e,t,n){var r=this[n||e.type];r?r.call(this,e,t):t.write(e,"/*"+e.type+"?*/ "+t.sourceAt(e.start,e.end))}function s(e,t,n,i){2===i||r(n)0){this.out(e[0],t,e[0].type);for(var r=1,i=e.length;r>":13,"BinaryExpression>>>":13,"BinaryExpression<":12,"BinaryExpression<=":12,"BinaryExpression>":12,"BinaryExpression>=":12,BinaryExpressionin:12,BinaryExpressioninstanceof:12,"BinaryExpression==":11,"BinaryExpression===":11,"BinaryExpression!=":11,"BinaryExpression!==":11,"BinaryExpression&":10,"BinaryExpression^":9,"BinaryExpression|":8,"LogicalExpression&&":7,"LogicalExpression||":6,ConditionalExpression:5,AssignmentPattern:4,AssignmentExpression:4,yield:3,YieldExpression:3,SpreadElement:2,"comma-separated-list":1.5,SequenceExpression:1},m={type:"comma-separated-list"},g={out:i,expr:s,formatParameters:o,Program:function(e,t){for(var n,r,i=h(t.indent,t.indentLevel),s=t.lineEnd,o=0,a=(n=e.body).length;o0){t.write(null,s);for(var a=0,u=n.length;a0){this.out(n[0],t,"VariableDeclarator");for(var i=1;i0){for(var s=0;s0)for(var r=0;r ")):(this.formatParameters(e.params,t),t.write(e,"=> ")),"ObjectExpression"===e.body.type||"SequenceExpression"===e.body.type?(t.write(null,"("),this.out(e.body,t,e.body.type),t.write(null,")")):this.out(e.body,t,e.body.type)},ThisExpression:function(e,t){t.write(e,"this")},Super:function(e,t){t.write(e,"super")},RestElement:u=function(e,t){t.write(e,"..."),this.out(e.argument,t,e.argument.type)},SpreadElement:u,YieldExpression:function(e,t){t.write(e,e.delegate?"yield*":"yield"),e.argument&&(t.write(null," "),this.expr(t,e,e.argument))},AwaitExpression:function(e,t){t.write(e,"await "),this.expr(t,e,e.argument)},TemplateLiteral:function(e,t){var n,r=e.quasis,i=e.expressions;t.write(e,"`");for(var s=0,o=i.length;s0)for(var n=e.elements,r=n.length,i=0;;){var s=n[i];if(s&&this.expr(t,m,s),((i+=1)=r)break;t.lineLength()>t.wrapColumn&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1))}t.write(null,"]")},ArrayPattern:l,ObjectExpression:function(e,t){var n,r=h(t.indent,t.indentLevel++),i=t.lineEnd,s=r+t.indent;if(t.write(e,"{"),e.properties.length>0){t.write(null,i);for(var o=e.properties,a=o.length,u=0;n=o[u],t.write(null,s),this.out(n,t,"Property"),++ut.wrapColumn&&t.write(null,t.lineEnd,h(t.indent,t.indentLevel+1));t.write(null,i,r,"}")}else t.write(null,"}");t.indentLevel--},Property:function(e,t){e.method||"get"===e.kind||"set"===e.kind?this.MethodDefinition(e,t):(e.shorthand||(e.computed?(t.write(null,"["),this.out(e.key,t,e.key.type),t.write(null,"]")):this.out(e.key,t,e.key.type),t.write(null,": ")),this.expr(t,m,e.value))},ObjectPattern:function(e,t){if(t.write(e,"{"),e.properties.length>0)for(var n=e.properties,r=n.length,i=0;this.out(n[i],t,"Property"),++i0)for(var i=r.length,s=0;s1&&t.write(e," "),this.expr(t,e,e.argument,!0)):(this.expr(t,e,e.argument),t.write(e,e.operator))},UpdateExpression:function(e,t){e.prefix?(t.write(e,e.operator),this.out(e.argument,t,e.argument.type)):(this.out(e.argument,t,e.argument.type),t.write(e,e.operator))},BinaryExpression:c=function(e,t){var n=e.operator;"in"===n&&t.inForInit&&t.write(null,"("),this.expr(t,e,e.left),t.write(e," ",n," "),this.expr(t,e,e.right,"ArrowFunctionExpression"===e.right.type?2:0),"in"===n&&t.inForInit&&t.write(null,")")},LogicalExpression:c,AssignmentExpression:function(e,t){"ObjectPattern"===e.left.type&&t.write(null,"("),this.BinaryExpression(e,t),"ObjectPattern"===e.left.type&&t.write(null,")")},AssignmentPattern:function(e,t){this.expr(t,e,e.left),t.write(e," = "),this.expr(t,e,e.right)},ConditionalExpression:function(e,t){this.expr(t,e,e.test,!0),t.write(e," ? "),this.expr(t,e,e.consequent),t.write(null," : "),this.expr(t,e,e.alternate)},NewExpression:function(e,t){t.write(e,"new "),this.out(e,t,"CallExpression")},CallExpression:function(e,t){this.expr(t,e,e.callee,"ObjectExpression"===e.callee.type?2:0),t.write(e,"(");var n=e.arguments;if(n.length>0)for(var r=n.length,i=0;i=0&&r({self:i,parent:e,field:a[u],index:!0}):l instanceof Object&&i===l&&r({self:i,parent:e,field:a[u]})}})}return n||((n=[{self:e}]).replace=function(e,t){n[e].replace(t)}),t(e,s,n),e}function s(t,n){var r=[],s={ecmaVersion:8,allowHashBang:!0,allowReturnOutsideFunction:!0,allowImportExportEverywhere:!0,locations:!0,onComment:r};if((!n||!n.noNodentExtensions||parseInt(a.version)<4)&&(p||(parseInt(a.version)<4&&console.warn("Nodent: Warning - noNodentExtensions option requires acorn >=v4.x. Extensions installed."),e("acorn-es7-plugin")(a),p=!0),s.plugins=s.plugins||{},s.plugins.asyncawait={asyncExits:!0,awaitAnywhere:!0}),n)for(var o in n)"noNodentExtensions"!==o&&(s[o]=n[o]);var u=a.parse(t,s);return i(u,function(e,t,n){for(t();r.length&&e.loc&&e.loc.start.line>=r[0].loc.start.line&&e.loc.end.line>=r[0].loc.end.line;)e.$comments=e.$comments||[],e.$comments.push(r.shift())}),u}function o(e,t){function n(e,r){if(Array.isArray(r)&&!Array.isArray(e))throw new Error("Can't substitute an array for a node");return r=r||{},Object.keys(e).forEach(function(i){function s(e){return"function"==typeof e&&(e=e()),r=r.concat(e)}function o(e){return"function"==typeof e&&(e=e()),r[i]=e,r}if(!(e[i]instanceof Object))return r[i]=e[i];if(Array.isArray(e[i]))return r[i]=n(e[i],[]);var a;if(a=Array.isArray(r)?s:o,"Identifier"===e[i].type&&"$"===e[i].name[0])return a(t[e[i].name.slice(1)]);if("LabeledStatement"===e[i].type&&"$"===e[i].label.name){var u=e[i].body.expression;return a(t[u.name||u.value])}return a("LabeledStatement"===e[i].type&&"$$"===e[i].label.name.slice(0,2)?t[e[i].label.name.slice(2)](n(e[i]).body):n(e[i]))}),r}h[e]||(h[e]=s(e,{noNodentExtensions:!0,locations:!1,ranges:!1,onComment:null}));var r=n(h[e]);return{body:r.body,expr:"ExpressionStatement"===r.body[0].type?r.body[0].expression:null}}var a=e("acorn"),u={AwaitExpression:function(e,t,n){n(e.argument,t,"Expression")},SwitchStatement:function(e,t,n){n(e.discriminant,t,"Expression");for(var r=0;re)return!1;if((n+=t[r+1])>=e)return!0}}function n(e,n){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&k.test(String.fromCharCode(e)):!1!==n&&t(e,_)))}function r(e,n){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&A.test(String.fromCharCode(e)):!1!==n&&(t(e,_)||t(e,C)))))}function i(e,t){return new L(e,{beforeExpr:!0,binop:t})}function s(e,t){return void 0===t&&(t={}),t.keyword=e,N[e]=new L(e,t)}function o(e){return 10===e||13===e||8232===e||8233===e}function a(e,t){return j.call(e,t)}function u(e,t){for(var n=1,r=0;;){$.lastIndex=r;var i=$.exec(e);if(!(i&&i.index=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),M(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}return M(t.onComment)&&(t.onComment=l(t,t.onComment)),t}function l(e,t){return function(n,r,i,s,o,a){var u={type:n?"Block":"Line",value:r,start:i,end:s};e.locations&&(u.loc=new q(this,o,a)),e.ranges&&(u.range=[i,s]),t.push(u)}}function p(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}function h(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}function f(e,t,n,r){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&r.raise(n,"Error parsing regular expression: "+e.message),e}}function d(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function y(e,t){return new W(t,e).parse()}function m(e,t,n){var r=new W(n,e,t);return r.nextToken(),r.parseExpression()}function g(e,t){return new W(t,e)}function v(t,n,r){e.parse_dammit=t,e.LooseParser=n,e.pluginsLoose=r}var b={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},x="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",w={5:x,6:x+" const class extends export import super"},E="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",S="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",k=new RegExp("["+E+"]"),A=new RegExp("["+E+S+"]");E=S=null;var _=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],C=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],L=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null},P={beforeExpr:!0},T={startsExpr:!0},N={},F={num:new L("num",T),regexp:new L("regexp",T),string:new L("string",T),name:new L("name",T),eof:new L("eof"),bracketL:new L("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new L("]"),braceL:new L("{",{beforeExpr:!0,startsExpr:!0}),braceR:new L("}"),parenL:new L("(",{beforeExpr:!0,startsExpr:!0}),parenR:new L(")"),comma:new L(",",P),semi:new L(";",P),colon:new L(":",P),dot:new L("."),question:new L("?",P),arrow:new L("=>",P),template:new L("template"),ellipsis:new L("...",P),backQuote:new L("`",T),dollarBraceL:new L("${",{beforeExpr:!0,startsExpr:!0}),eq:new L("=",{beforeExpr:!0,isAssign:!0}),assign:new L("_=",{beforeExpr:!0,isAssign:!0}),incDec:new L("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new L("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:i("||",1),logicalAND:i("&&",2),bitwiseOR:i("|",3),bitwiseXOR:i("^",4),bitwiseAND:i("&",5),equality:i("==/!=",6),relational:i("",7),bitShift:i("<>",8),plusMin:new L("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:i("%",10),star:i("*",10),slash:i("/",10),starstar:new L("**",{beforeExpr:!0}),_break:s("break"),_case:s("case",P),_catch:s("catch"),_continue:s("continue"),_debugger:s("debugger"),_default:s("default",P),_do:s("do",{isLoop:!0,beforeExpr:!0}),_else:s("else",P),_finally:s("finally"),_for:s("for",{isLoop:!0}),_function:s("function",T),_if:s("if"),_return:s("return",P),_switch:s("switch"),_throw:s("throw",P),_try:s("try"),_var:s("var"),_const:s("const"),_while:s("while",{isLoop:!0}),_with:s("with"),_new:s("new",{beforeExpr:!0,startsExpr:!0}),_this:s("this",T),_super:s("super",T),_class:s("class"),_extends:s("extends",P),_export:s("export"),_import:s("import"),_null:s("null",T),_true:s("true",T),_false:s("false",T),_in:s("in",{beforeExpr:!0,binop:7}),_instanceof:s("instanceof",{beforeExpr:!0,binop:7}),_typeof:s("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:s("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:s("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},O=/\r\n?|\n|\u2028|\u2029/,$=new RegExp(O.source,"g"),B=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,I=Object.prototype,j=I.hasOwnProperty,D=I.toString,M=Array.isArray||function(e){return"[object Array]"===D.call(e)},V=function(e,t){this.line=e,this.column=t};V.prototype.offset=function(e){return new V(this.line,this.column+e)};var q=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)},U={ecmaVersion:7,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowHashBang:!1,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1,plugins:{}},z={},W=function(e,t,n){this.options=e=c(e),this.sourceFile=e.sourceFile,this.keywords=p(w[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var i=e.ecmaVersion;!(r=b[i]);i--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=p(r);var s=(r?r+" ":"")+b.strict;this.reservedWordsStrict=p(s),this.reservedWordsStrictBind=p(s+" "+b.strictBind),this.input=String(t),this.containsEsc=!1,this.loadPlugins(e.plugins),n?(this.pos=n,this.lineStart=this.input.lastIndexOf("\n",n-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(O).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=F.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};W.prototype.isKeyword=function(e){return this.keywords.test(e)},W.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},W.prototype.extend=function(e,t){this[e]=t(this[e])},W.prototype.loadPlugins=function(e){var t=this;for(var n in e){var r=z[n];if(!r)throw new Error("Plugin '"+n+"' not found");r(t,e[n])}},W.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var G=W.prototype,J=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;G.strictDirective=function(e){for(var t=this;;){R.lastIndex=e,e+=R.exec(t.input)[0].length;var n=J.exec(t.input.slice(e));if(!n)return!1;if("use strict"==(n[1]||n[2]))return!0;e+=n[0].length}},G.eat=function(e){return this.type===e&&(this.next(),!0)},G.isContextual=function(e){return this.type===F.name&&this.value===e},G.eatContextual=function(e){return this.value===e&&this.eat(F.name)},G.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},G.canInsertSemicolon=function(){return this.type===F.eof||this.type===F.braceR||O.test(this.input.slice(this.lastTokEnd,this.start))},G.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},G.semicolon=function(){this.eat(F.semi)||this.insertSemicolon()||this.unexpected()},G.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},G.expect=function(e){this.eat(e)||this.unexpected()},G.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var Y=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};G.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},G.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},G.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var Z={kind:"loop"},Q={kind:"switch"};H.isLet=function(){if(this.type!==F.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;R.lastIndex=this.pos;var e=R.exec(this.input),t=this.pos+e[0].length,i=this.input.charCodeAt(t);if(91===i||123==i)return!0;if(n(i,!0)){for(var s=t+1;r(this.input.charCodeAt(s),!0);)++s;var o=this.input.slice(t,s);if(!this.isKeyword(o))return!0}return!1},H.isAsyncFunction=function(){if(this.type!==F.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;R.lastIndex=this.pos;var e=R.exec(this.input),t=this.pos+e[0].length;return!(O.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&r(this.input.charAt(t+8)))},H.parseStatement=function(e,t,n){var r,i=this.type,s=this.startNode();switch(this.isLet()&&(i=F._var,r="let"),i){case F._break:case F._continue:return this.parseBreakContinueStatement(s,i.keyword);case F._debugger:return this.parseDebuggerStatement(s);case F._do:return this.parseDoStatement(s);case F._for:return this.parseForStatement(s);case F._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1);case F._class:return e||this.unexpected(),this.parseClass(s,!0);case F._if:return this.parseIfStatement(s);case F._return:return this.parseReturnStatement(s);case F._switch:return this.parseSwitchStatement(s);case F._throw:return this.parseThrowStatement(s);case F._try:return this.parseTryStatement(s);case F._const:case F._var:return r=r||this.value,e||"var"==r||this.unexpected(),this.parseVarStatement(s,r);case F._while:return this.parseWhileStatement(s);case F._with:return this.parseWithStatement(s);case F.braceL:return this.parseBlock();case F.semi:return this.parseEmptyStatement(s);case F._export:case F._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),i===F._import?this.parseImport(s):this.parseExport(s,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(s,!0);var o=this.value,a=this.parseExpression();return i===F.name&&"Identifier"===a.type&&this.eat(F.colon)?this.parseLabeledStatement(s,o,a):this.parseExpressionStatement(s,a)}},H.parseBreakContinueStatement=function(e,t){var n=this,r="break"==t;this.next(),this.eat(F.semi)||this.insertSemicolon()?e.label=null:this.type!==F.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(F.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},H.parseForStatement=function(e){if(this.next(),this.labels.push(Z),this.enterLexicalScope(),this.expect(F.parenL),this.type===F.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===F._var||this.type===F._const||t){var n=this.startNode(),r=t?"let":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),!(this.type===F._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==r&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var i=new Y,s=this.parseExpression(!0,i);return this.type===F._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(s),this.checkLVal(s),this.checkPatternErrors(i,!0),this.parseForIn(e,s)):(this.checkExpressionErrors(i,!0),this.parseFor(e,s))},H.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},H.isFunction=function(){return this.type===F._function||this.isAsyncFunction()},H.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(F._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},H.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(F.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},H.parseSwitchStatement=function(e){var t=this;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(F.braceL),this.labels.push(Q),this.enterLexicalScope();for(var n,r=!1;this.type!=F.braceR;)if(t.type===F._case||t.type===F._default){var i=t.type===F._case;n&&t.finishNode(n,"SwitchCase"),e.cases.push(n=t.startNode()),n.consequent=[],t.next(),i?n.test=t.parseExpression():(r&&t.raiseRecoverable(t.lastTokStart,"Multiple default clauses"),r=!0,n.test=null),t.expect(F.colon)}else n||t.unexpected(),n.consequent.push(t.parseStatement(!0));return this.exitLexicalScope(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},H.parseThrowStatement=function(e){return this.next(),O.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var X=[];H.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===F._catch){var t=this.startNode();this.next(),this.expect(F.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(F.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(F._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},H.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},H.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Z),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},H.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},H.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},H.parseLabeledStatement=function(e,t,n){for(var r=this,i=0;i=0;o--){var a=r.labels[o];if(a.statementStart!=e.start)break;a.statementStart=r.start,a.kind=s}return this.labels.push({name:t,kind:s,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},H.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},H.parseBlock=function(e){var t=this;void 0===e&&(e=!0);var n=this.startNode();for(n.body=[],this.expect(F.braceL),e&&this.enterLexicalScope();!this.eat(F.braceR);){var r=t.parseStatement(!0);n.body.push(r)}return e&&this.exitLexicalScope(),this.finishNode(n,"BlockStatement")},H.parseFor=function(e,t){return e.init=t,this.expect(F.semi),e.test=this.type===F.semi?null:this.parseExpression(),this.expect(F.semi),e.update=this.type===F.parenR?null:this.parseExpression(),this.expect(F.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},H.parseForIn=function(e,t){var n=this.type===F._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(F.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},H.parseVar=function(e,t,n){var r=this;for(e.declarations=[],e.kind=n;;){var i=r.startNode();if(r.parseVarId(i,n),r.eat(F.eq)?i.init=r.parseMaybeAssign(t):"const"!==n||r.type===F._in||r.options.ecmaVersion>=6&&r.isContextual("of")?"Identifier"==i.id.type||t&&(r.type===F._in||r.isContextual("of"))?i.init=null:r.raise(r.lastTokEnd,"Complex binding patterns require an initialization value"):r.unexpected(),e.declarations.push(r.finishNode(i,"VariableDeclarator")),!r.eat(F.comma))break}return e},H.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},H.parseFunction=function(e,t,n,r){this.initFunction(e),this.options.ecmaVersion>=6&&!r&&(e.generator=this.eat(F.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&&(e.id="nullableID"===t&&this.type!=F.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var i=this.inGenerator,s=this.inAsync,o=this.yieldPos,a=this.awaitPos,u=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==F.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=i,this.inAsync=s,this.yieldPos=o,this.awaitPos=a,this.inFunction=u,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},H.parseFunctionParams=function(e){this.expect(F.parenL),e.params=this.parseBindingList(F.parenR,!1,this.options.ecmaVersion>=8,!0),this.checkYieldAwaitInDefaultParams()},H.parseClass=function(e,t){var n=this;this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var r=this.startNode(),i=!1;for(r.body=[],this.expect(F.braceL);!this.eat(F.braceR);)if(!n.eat(F.semi)){var s=n.startNode(),o=n.eat(F.star),a=!1,u=n.type===F.name&&"static"===n.value;n.parsePropertyName(s),s.static=u&&n.type!==F.parenL,s.static&&(o&&n.unexpected(),o=n.eat(F.star),n.parsePropertyName(s)),n.options.ecmaVersion>=8&&!o&&!s.computed&&"Identifier"===s.key.type&&"async"===s.key.name&&n.type!==F.parenL&&!n.canInsertSemicolon()&&(a=!0,n.parsePropertyName(s)),s.kind="method";var c=!1;if(!s.computed){var l=s.key;o||a||"Identifier"!==l.type||n.type===F.parenL||"get"!==l.name&&"set"!==l.name||(c=!0,s.kind=l.name,l=n.parsePropertyName(s)),!s.static&&("Identifier"===l.type&&"constructor"===l.name||"Literal"===l.type&&"constructor"===l.value)&&(i&&n.raise(l.start,"Duplicate constructor in the same class"),c&&n.raise(l.start,"Constructor can't have get/set modifier"),o&&n.raise(l.start,"Constructor can't be a generator"),a&&n.raise(l.start,"Constructor can't be an async method"),s.kind="constructor",i=!0)}if(n.parseClassMethod(r,s,o,a),c){var p="get"===s.kind?0:1;if(s.value.params.length!==p){var h=s.value.start;"get"===s.kind?n.raiseRecoverable(h,"getter should have no params"):n.raiseRecoverable(h,"setter should have exactly one param")}else"set"===s.kind&&"RestElement"===s.value.params[0].type&&n.raiseRecoverable(s.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(r,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},H.parseClassMethod=function(e,t,n,r){t.value=this.parseMethod(n,r),e.body.push(this.finishNode(t,"MethodDefinition"))},H.parseClassId=function(e,t){e.id=this.type===F.name?this.parseIdent():!0===t?this.unexpected():null},H.parseClassSuper=function(e){e.superClass=this.eat(F._extends)?this.parseExprSubscripts():null},H.parseExport=function(e,t){var n=this;if(this.next(),this.eat(F.star))return this.expectContextual("from"),e.source=this.type===F.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(F._default)){this.checkExport(t,"default",this.lastTokStart);var r;if(this.type===F._function||(r=this.isAsyncFunction())){var i=this.startNode();this.next(),r&&this.next(),e.declaration=this.parseFunction(i,"nullableID",!1,r)}else if(this.type===F._class){var s=this.startNode();e.declaration=this.parseClass(s,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===F.string?this.parseExprAtom():this.unexpected();else{for(var o=0;o=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var r=0;r=6&&(e.computed||e.method||e.shorthand))){var n,r=e.key;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===i&&(t.proto&&this.raiseRecoverable(r.start,"Redefinition of __proto__ property"),t.proto=!0);else{var s=t[n="$"+n];if(s){("init"===i?this.strict&&s.init||s.get||s.set:s.init||s[i])&&this.raiseRecoverable(r.start,"Redefinition of property")}else s=t[n]={init:!1,get:!1,set:!1};s[i]=!0}}},ee.parseExpression=function(e,t){var n=this,r=this.start,i=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===F.comma){var o=this.startNodeAt(r,i);for(o.expressions=[s];this.eat(F.comma);)o.expressions.push(n.parseMaybeAssign(e,t));return this.finishNode(o,"SequenceExpression")}return s},ee.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var r=!1,i=-1,s=-1;t?(i=t.parenthesizedAssign,s=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new Y,r=!0);var o=this.start,a=this.startLoc;this.type!=F.parenL&&this.type!=F.name||(this.potentialArrowAt=this.start);var u=this.parseMaybeConditional(e,t);if(n&&(u=n.call(this,u,o,a)),this.type.isAssign){this.checkPatternErrors(t,!0),r||Y.call(t);var c=this.startNodeAt(o,a);return c.operator=this.value,c.left=this.type===F.eq?this.toAssignable(u):u,t.shorthandAssign=-1,this.checkLVal(u),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),s>-1&&(t.trailingComma=s),u},ee.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(this.eat(F.question)){var s=this.startNodeAt(n,r);return s.test=i,s.consequent=this.parseMaybeAssign(),this.expect(F.colon),s.alternate=this.parseMaybeAssign(e),this.finishNode(s,"ConditionalExpression")}return i},ee.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?i:i.start==n&&"ArrowFunctionExpression"===i.type?i:this.parseExprOp(i,n,r,-1,e)},ee.parseExprOp=function(e,t,n,r,i){var s=this.type.binop;if(null!=s&&(!i||this.type!==F._in)&&s>r){var o=this.type===F.logicalOR||this.type===F.logicalAND,a=this.value;this.next();var u=this.start,c=this.startLoc,l=this.parseExprOp(this.parseMaybeUnary(null,!1),u,c,s,i),p=this.buildBinary(t,n,e,l,a,o);return this.parseExprOp(p,t,n,r,i)}return e},ee.buildBinary=function(e,t,n,r,i,s){var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,s?"LogicalExpression":"BinaryExpression")},ee.parseMaybeUnary=function(e,t){var n,r=this,i=this.start,s=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(e),t=!0;else if(this.type.prefix){var o=this.startNode(),a=this.type===F.incDec;o.operator=this.value,o.prefix=!0,this.next(),o.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),a?this.checkLVal(o.argument):this.strict&&"delete"===o.operator&&"Identifier"===o.argument.type?this.raiseRecoverable(o.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(o,a?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var u=r.startNodeAt(i,s);u.operator=r.value,u.prefix=!1,u.argument=n,r.checkLVal(n),r.next(),n=r.finishNode(u,"UpdateExpression")}}return!t&&this.eat(F.starstar)?this.buildBinary(i,s,n,this.parseMaybeUnary(null,!1),"**",!1):n},ee.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,r=this.parseExprAtom(e),i="ArrowFunctionExpression"===r.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||i)return r;var s=this.parseSubscripts(r,t,n);return e&&"MemberExpression"===s.type&&(e.parenthesizedAssign>=s.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=s.start&&(e.parenthesizedBind=-1)),s},ee.parseSubscripts=function(e,t,n,r){for(var i,s=this,o=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon();;)if((i=s.eat(F.bracketL))||s.eat(F.dot)){var a=s.startNodeAt(t,n);a.object=e,a.property=i?s.parseExpression():s.parseIdent(!0),a.computed=!!i,i&&s.expect(F.bracketR),e=s.finishNode(a,"MemberExpression")}else if(!r&&s.eat(F.parenL)){var u=new Y,c=s.yieldPos,l=s.awaitPos;s.yieldPos=0,s.awaitPos=0;var p=s.parseExprList(F.parenR,s.options.ecmaVersion>=8,!1,u);if(o&&!s.canInsertSemicolon()&&s.eat(F.arrow))return s.checkPatternErrors(u,!1),s.checkYieldAwaitInDefaultParams(),s.yieldPos=c,s.awaitPos=l,s.parseArrowExpression(s.startNodeAt(t,n),p,!0);s.checkExpressionErrors(u,!0),s.yieldPos=c||s.yieldPos,s.awaitPos=l||s.awaitPos;var h=s.startNodeAt(t,n);h.callee=e,h.arguments=p,e=s.finishNode(h,"CallExpression")}else{if(s.type!==F.backQuote)return e;var f=s.startNodeAt(t,n);f.tag=e,f.quasi=s.parseTemplate(),e=s.finishNode(f,"TaggedTemplateExpression")}},ee.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case F._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case F._this:var r=this.type===F._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,r);case F.name:var i=this.start,s=this.startLoc,o=this.parseIdent(this.type!==F.name);if(this.options.ecmaVersion>=8&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(F._function))return this.parseFunction(this.startNodeAt(i,s),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(F.arrow))return this.parseArrowExpression(this.startNodeAt(i,s),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===F.name)return o=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(F.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,s),[o],!0)}return o;case F.regexp:var a=this.value;return t=this.parseLiteral(a.value),t.regex={pattern:a.pattern,flags:a.flags},t;case F.num:case F.string:return this.parseLiteral(this.value);case F._null:case F._true:case F._false:return t=this.startNode(),t.value=this.type===F._null?null:this.type===F._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case F.parenL:var u=this.start,c=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),c;case F.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(F.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case F.braceL:return this.parseObj(!1,e);case F._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case F._class:return this.parseClass(this.startNode(),!1);case F._new:return this.parseNew();case F.backQuote:return this.parseTemplate();default:this.unexpected()}},ee.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},ee.parseParenExpression=function(){this.expect(F.parenL);var e=this.parseExpression();return this.expect(F.parenR),e},ee.parseParenAndDistinguishExpression=function(e){var t,n=this,r=this.start,i=this.startLoc,s=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o,a,u=this.start,c=this.startLoc,l=[],p=!0,h=!1,f=new Y,d=this.yieldPos,y=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==F.parenR;){if(p?p=!1:n.expect(F.comma),s&&n.afterTrailingComma(F.parenR,!0)){h=!0;break}if(n.type===F.ellipsis){o=n.start,l.push(n.parseParenItem(n.parseRest())),n.type===F.comma&&n.raise(n.start,"Comma is not permitted after the rest element");break}n.type!==F.parenL||a||(a=n.start),l.push(n.parseMaybeAssign(!1,f,n.parseParenItem))}var m=this.start,g=this.startLoc;if(this.expect(F.parenR),e&&!this.canInsertSemicolon()&&this.eat(F.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),a&&this.unexpected(a),this.yieldPos=d,this.awaitPos=y,this.parseParenArrowList(r,i,l);l.length&&!h||this.unexpected(this.lastTokStart),o&&this.unexpected(o),this.checkExpressionErrors(f,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=y||this.awaitPos,l.length>1?((t=this.startNodeAt(u,c)).expressions=l,this.finishNodeAt(t,"SequenceExpression",m,g)):t=l[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var v=this.startNodeAt(r,i);return v.expression=t,this.finishNode(v,"ParenthesizedExpression")}return t},ee.parseParenItem=function(e){return e},ee.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var te=[];ee.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(F.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,r=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,r,!0),this.eat(F.parenL)?e.arguments=this.parseExprList(F.parenR,this.options.ecmaVersion>=8,!1):e.arguments=te,this.finishNode(e,"NewExpression")},ee.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),e.tail=this.type===F.backQuote,this.finishNode(e,"TemplateElement")},ee.parseTemplate=function(){var e=this,t=this.startNode();this.next(),t.expressions=[];var n=this.parseTemplateElement();for(t.quasis=[n];!n.tail;)e.expect(F.dollarBraceL),t.expressions.push(e.parseExpression()),e.expect(F.braceR),t.quasis.push(n=e.parseTemplateElement());return this.next(),this.finishNode(t,"TemplateLiteral")},ee.parseObj=function(e,t){var n=this,r=this.startNode(),i=!0,s={};for(r.properties=[],this.next();!this.eat(F.braceR);){if(i)i=!1;else if(n.expect(F.comma),n.afterTrailingComma(F.braceR))break;var o,a,u,c,l=n.startNode();n.options.ecmaVersion>=6&&(l.method=!1,l.shorthand=!1,(e||t)&&(u=n.start,c=n.startLoc),e||(o=n.eat(F.star))),n.parsePropertyName(l),e||!(n.options.ecmaVersion>=8)||o||l.computed||"Identifier"!==l.key.type||"async"!==l.key.name||n.type===F.parenL||n.type===F.colon||n.canInsertSemicolon()?a=!1:(a=!0,n.parsePropertyName(l,t)),n.parsePropertyValue(l,e,o,a,u,c,t),n.checkPropClash(l,s),r.properties.push(n.finishNode(l,"Property"))}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},ee.parsePropertyValue=function(e,t,n,r,i,s,o){if((n||r)&&this.type===F.colon&&this.unexpected(),this.eat(F.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===F.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,r);else if(this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=F.comma&&this.type!=F.braceR){(n||r||t)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var a="get"===e.kind?0:1;if(e.value.params.length!==a){var u=e.value.start;"get"===e.kind?this.raiseRecoverable(u,"getter should have no params"):this.raiseRecoverable(u,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((this.keywords.test(e.key.name)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(e.key.name)||this.inGenerator&&"yield"==e.key.name||this.inAsync&&"await"==e.key.name)&&this.raiseRecoverable(e.key.start,"'"+e.key.name+"' can not be used as shorthand property"),e.kind="init",t?e.value=this.parseMaybeDefault(i,s,e.key):this.type===F.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,s,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},ee.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(F.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(F.bracketR),e.key;e.computed=!1}return e.key=this.type===F.num||this.type===F.string?this.parseExprAtom():this.parseIdent(!0)},ee.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},ee.parseMethod=function(e,t){var n=this.startNode(),r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(F.parenL),n.params=this.parseBindingList(F.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(n,"FunctionExpression")},ee.parseArrowExpression=function(e,t,n){var r=this.inGenerator,i=this.inAsync,s=this.yieldPos,o=this.awaitPos,a=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=r,this.inAsync=i,this.yieldPos=s,this.awaitPos=o,this.inFunction=a,this.finishNode(e,"ArrowFunctionExpression")},ee.parseFunctionBody=function(e,t){var n=t&&this.type!==F.braceL,r=this.strict,i=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);r&&!s||(i=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],i&&(this.strict=!0),this.checkParams(e,!r&&!i&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=r},ee.isSimpleParamList=function(e){for(var t=0;t=6||-1==this.input.slice(this.start,this.end).indexOf("\\"))&&this.raiseRecoverable(this.start,"The keyword '"+this.value+"' is reserved"),this.inGenerator&&"yield"===this.value&&this.raiseRecoverable(this.start,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===this.value&&this.raiseRecoverable(this.start,"Can not use 'await' as identifier inside an async function"),t.name=this.value):e&&this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},ee.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==F.semi||this.canInsertSemicolon()||this.type!=F.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(F.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},ee.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var ne=W.prototype;ne.raise=function(e,t){var n=u(this.input,e);t+=" ("+n.line+":"+n.column+")";var r=new SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},ne.raiseRecoverable=ne.raise,ne.curPosition=function(){if(this.options.locations)return new V(this.curLine,this.pos-this.lineStart)};var re=W.prototype,ie=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var r=0;r=0;t--)if(e.context[t].generator)return!0;return!1},ce.updateContext=function(e){var t,n=this.type;n.keyword&&e==F.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},F.parenR.updateContext=F.braceR.updateContext=function(){if(1!=this.context.length){var e,t=this.context.pop();t===ue.b_stat&&(e=this.curContext())&&"function"===e.token?(this.context.pop(),this.exprAllowed=!1):this.exprAllowed=t===ue.b_tmpl||!t.isExpr}else this.exprAllowed=!0},F.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ue.b_stat:ue.b_expr),this.exprAllowed=!0},F.dollarBraceL.updateContext=function(){this.context.push(ue.b_tmpl),this.exprAllowed=!0},F.parenL.updateContext=function(e){var t=e===F._if||e===F._for||e===F._with||e===F._while;this.context.push(t?ue.p_stat:ue.p_expr),this.exprAllowed=!0},F.incDec.updateContext=function(){},F._function.updateContext=function(e){e.beforeExpr&&e!==F.semi&&e!==F._else&&(e!==F.colon&&e!==F.braceL||this.curContext()!==ue.b_stat)&&this.context.push(ue.f_expr),this.exprAllowed=!1},F.backQuote.updateContext=function(){this.curContext()===ue.q_tmpl?this.context.pop():this.context.push(ue.q_tmpl),this.exprAllowed=!1},F.star.updateContext=function(e){e==F._function&&(this.curContext()===ue.f_expr?this.context[this.context.length-1]=ue.f_expr_gen:this.context.push(ue.f_gen)),this.exprAllowed=!0},F.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var le=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new q(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},pe=W.prototype,he="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);pe.next=function(){this.options.onToken&&this.options.onToken(new le(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},pe.getToken=function(){return this.next(),new le(this)},"undefined"!=typeof Symbol&&(pe[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===F.eof,value:t}}}}),pe.curContext=function(){return this.context[this.context.length-1]},pe.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(F.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},pe.readToken=function(e){return n(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},pe.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.pos+1)-56613888},pe.skipBlockComment=function(){var e=this,t=this.options.onComment&&this.curPosition(),n=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(-1===r&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations){$.lastIndex=n;for(var i;(i=$.exec(this.input))&&i.index8&&t<14||t>=5760&&B.test(String.fromCharCode(t))))break e;++e.pos}}},pe.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},pe.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(F.ellipsis)):(++this.pos,this.finishToken(F.dot))},pe.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(F.assign,2):this.finishOp(F.slash,1)},pe.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=42===e?F.star:F.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,r=F.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(F.assign,n+1):this.finishOp(r,n)},pe.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?F.logicalOR:F.logicalAND,2):61===t?this.finishOp(F.assign,2):this.finishOp(124===e?F.bitwiseOR:F.bitwiseAND,1)},pe.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(F.assign,2):this.finishOp(F.bitwiseXOR,1)},pe.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45==t&&62==this.input.charCodeAt(this.pos+2)&&O.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(F.incDec,2):61===t?this.finishOp(F.assign,2):this.finishOp(F.plusMin,1)},pe.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(F.assign,n+1):this.finishOp(F.bitShift,n)):33==t&&60==e&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(n=2),this.finishOp(F.relational,n))},pe.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(F.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(F.arrow)):this.finishOp(61===e?F.eq:F.prefix,1)},pe.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(F.parenL);case 41:return++this.pos,this.finishToken(F.parenR);case 59:return++this.pos,this.finishToken(F.semi);case 44:return++this.pos,this.finishToken(F.comma);case 91:return++this.pos,this.finishToken(F.bracketL);case 93:return++this.pos,this.finishToken(F.bracketR);case 123:return++this.pos,this.finishToken(F.braceL);case 125:return++this.pos,this.finishToken(F.braceR);case 58:return++this.pos,this.finishToken(F.colon);case 63:return++this.pos,this.finishToken(F.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(F.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(F.prefix,1)}this.raise(this.pos,"Unexpected character '"+d(e)+"'")},pe.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var fe=!!f("￿","u");pe.readRegexp=function(){for(var e,t,n=this,r=this.pos;;){n.pos>=n.input.length&&n.raise(r,"Unterminated regular expression");var i=n.input.charAt(n.pos);if(O.test(i)&&n.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===i)t=!0;else if("]"===i&&t)t=!1;else if("/"===i&&!t)break;e="\\"===i}++n.pos}var s=this.input.slice(r,this.pos);++this.pos;var o=this.readWord1(),a=s,u="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(r,"Invalid regular expression flag"),o.indexOf("u")>=0&&(fe?u="u":(a=(a=a.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,i){return(t=Number("0x"+t))>1114111&&n.raise(r+i+3,"Code point out of bounds"),"x"})).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),u=u.replace("u","")))}var l=null;return he||(f(a,u,r,this),l=f(s,o)),this.finishToken(F.regexp,{pattern:s,flags:o,value:l})},pe.readInt=function(e,t){for(var n=this,r=this.pos,i=0,s=0,o=null==t?1/0:t;s=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;++n.pos,i=i*e+a}return this.pos===r||null!=t&&this.pos-r!==t?null:i},pe.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(F.num,t)},pe.readNumber=function(e){var t=this.pos,r=!1,i=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),i&&this.pos==t+1&&(i=!1);var s=this.input.charCodeAt(this.pos);46!==s||i||(++this.pos,this.readInt(10),r=!0,s=this.input.charCodeAt(this.pos)),69!==s&&101!==s||i||(43!==(s=this.input.charCodeAt(++this.pos))&&45!==s||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),r=!0),n(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var o,a=this.input.slice(t,this.pos);return r?o=parseFloat(a):i&&1!==a.length?/[89]/.test(a)||this.strict?this.raise(t,"Invalid number"):o=parseInt(a,8):o=parseInt(a,10),this.finishToken(F.num,o)},pe.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.raise(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},pe.readString=function(e){for(var t=this,n="",r=++this.pos;;){t.pos>=t.input.length&&t.raise(t.start,"Unterminated string constant");var i=t.input.charCodeAt(t.pos);if(i===e)break;92===i?(n+=t.input.slice(r,t.pos),n+=t.readEscapedChar(!1),r=t.pos):(o(i)&&t.raise(t.start,"Unterminated string constant"),++t.pos)}return n+=this.input.slice(r,this.pos++),this.finishToken(F.string,n)},pe.readTmplToken=function(){for(var e=this,t="",n=this.pos;;){e.pos>=e.input.length&&e.raise(e.start,"Unterminated template");var r=e.input.charCodeAt(e.pos);if(96===r||36===r&&123===e.input.charCodeAt(e.pos+1))return e.pos===e.start&&e.type===F.template?36===r?(e.pos+=2,e.finishToken(F.dollarBraceL)):(++e.pos,e.finishToken(F.backQuote)):(t+=e.input.slice(n,e.pos),e.finishToken(F.template,t));if(92===r)t+=e.input.slice(n,e.pos),t+=e.readEscapedChar(!0),n=e.pos;else if(o(r)){switch(t+=e.input.slice(n,e.pos),++e.pos,r){case 13:10===e.input.charCodeAt(e.pos)&&++e.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(r)}e.options.locations&&(++e.curLine,e.lineStart=e.pos),n=e.pos}else++e.pos}},pe.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return d(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(n,8);return r>255&&(n=n.slice(0,-1),r=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.raise(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(r)}return String.fromCharCode(t)}},pe.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},pe.readWord1=function(){var e=this;this.containsEsc=!1;for(var t="",i=!0,s=this.pos,o=this.options.ecmaVersion>=6;this.pos=r)&&o[u](t,i,e),(null==n||t.start==n)&&(null==r||t.end==r)&&s(u,t))throw new h(t,i)}(t,a)}catch(e){if(e instanceof h)return e;throw e}}function o(t,n,r,s,o){r=i(r),s||(s=e.base);try{!function e(t,i,o){var a=o||t.type;if(!(t.start>n||t.end=n&&r(a,t))throw new h(t,i);s[a](t,i,e)}}(t,o)}catch(e){if(e instanceof h)return e;throw e}}function u(t,n,r,s,o){r=i(r),s||(s=e.base);var a;return function e(t,i,o){if(!(t.start>n)){var u=o||t.type;t.end<=n&&(!a||a.node.end=0&&e>1;return 1==(1&e)?-t:t}var s=e("./base64");n.encode=function(e){var t,n="",i=r(e);do{t=31&i,(i>>>=5)>0&&(t|=32),n+=s.encode(t)}while(i>0);return n},n.decode=function(e,t,n){var r,o,a=e.length,u=0,c=0;do{if(t>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=s.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));r=!!(32&o),u+=(o&=31)<0?t-u>1?r(u,t,i,s,o,a):a==n.LEAST_UPPER_BOUND?t1?r(e,u,i,s,o,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,i,s){if(0===t.length)return-1;var o=r(-1,t.length,e,t,i,s||n.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&0===i(t[o],t[o-1],!0);)--o;return o}},{}],21:[function(e,t,n){function r(e,t){var n=e.generatedLine,r=t.generatedLine,i=e.generatedColumn,o=t.generatedColumn;return r>n||r==n&&o>=i||s.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var s=e("./util");i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){r(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=i},{"./util":26}],22:[function(e,t,n){function r(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function i(e,t){return Math.round(e+Math.random()*(t-e))}function s(e,t,n,o){if(n=0){var s=this._originalMappings[i];if(void 0===e.column)for(var o=s.originalLine;s&&s.originalLine===o;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)r.push({line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return r},n.SourceMapConsumer=r,i.prototype=Object.create(r.prototype),i.prototype.consumer=r,i.fromSourceMap=function(e){var t=Object.create(i.prototype),n=t._names=c.fromArray(e._names.toArray(),!0),r=t._sources=c.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var o=e._mappings.toArray().slice(),u=t.__generatedMappings=[],l=t.__originalMappings=[],h=0,f=o.length;h1&&(n.source=y+i[1],y+=i[1],n.originalLine=f+i[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=d+i[3],d=n.originalColumn,i.length>4&&(n.name=m+i[4],m+=i[4])),E.push(n),"number"==typeof n.originalLine&&w.push(n)}p(E,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,p(w,a.compareByOriginalPositions),this.__originalMappings=w},i.prototype._findMapping=function(e,t,n,r,i,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[n];if(i.generatedLine===t.generatedLine){var s=a.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=a.join(this.sourceRoot,s)));var o=a.getArg(i,"name",null);return null!==o&&(o=this._names.at(o)),{source:s,line:a.getArg(i,"originalLine",null),column:a.getArg(i,"originalColumn",null),name:o}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=a.urlParse(this.sourceRoot))){var r=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(r))return this.sourcesContent[this._sources.indexOf(r)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=a.getArg(e,"source");if(null!=this.sourceRoot&&(t=a.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var n={source:t=this._sources.indexOf(t),originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},i=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",r.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===n.source)return{line:a.getArg(s,"generatedLine",null),column:a.getArg(s,"generatedColumn",null),lastColumn:a.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=i,o.prototype=Object.create(r.prototype),o.prototype.constructor=r,o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){for(var e=[],t=0;t0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},r.prototype._serializeMappings=function(){for(var e,t,n,r,o=0,a=1,u=0,c=0,l=0,p=0,h="",f=this._mappings.toArray(),d=0,y=f.length;d0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(r=this._sources.indexOf(t.source),e+=i.encode(r-p),p=r,e+=i.encode(t.originalLine-1-c),c=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=i.encode(n-l),l=n)),h+=e}return h},r.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var n=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},r.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},r.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=r},{"./array-set":17,"./base64-vlq":18,"./mapping-list":21,"./util":26}],25:[function(e,t,n){function r(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[a]=!0,null!=r&&this.add(r)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),o=/(\r?\n)/,a="$$$isSourceNode$$$";r.fromStringWithSourceMap=function(e,t,n){function i(e,t){if(null===e||void 0===e.source)a.add(t);else{var i=n?s.join(n,e.source):e.source;a.add(new r(e.originalLine,e.originalColumn,i,t,e.name))}}var a=new r,u=e.split(o),c=function(){return u.shift()+(u.shift()||"")},l=1,p=0,h=null;return t.eachMapping(function(e){if(null!==h){if(!(l0&&(h&&i(h,c()),a.add(u.join(""))),t.sources.forEach(function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=s.join(n,e)),a.setSourceContent(e,r))}),a},r.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},r.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},r.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n=0;l--)"."===(o=u[l])?u.splice(l,1):".."===o?c++:c>0&&(""===o?(u.splice(l+1,c),c=0):(u.splice(l,2),c--));return""===(t=u.join("/"))&&(t=a?"/":"."),r?(r.path=t,s(r)):t}function a(e,t){""===e&&(e="."),""===t&&(t=".");var n=i(t),r=i(e);if(r&&(e=r.path||"/"),n&&!n.scheme)return r&&(n.scheme=r.scheme),s(n);if(n||t.match(v))return t;if(r&&!r.host&&!r.path)return r.host=t,s(r);var a="/"===t.charAt(0)?t:o(e.replace(/\/+$/,"")+"/"+t);return r?(r.path=a,s(r)):a}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)}function c(e){return e}function l(e){return h(e)?"$"+e:e}function p(e){return h(e)?e.slice(1):e}function h(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function f(e,t,n){var r=e.source-t.source;return 0!==r?r:0!==(r=e.originalLine-t.originalLine)?r:0!==(r=e.originalColumn-t.originalColumn)||n?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:(r=e.generatedLine-t.generatedLine,0!==r?r:e.name-t.name)}function d(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)||n?r:0!==(r=e.source-t.source)?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:e.name-t.name)}function y(e,t){return e===t?0:e>t?1:-1}function m(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:0!==(n=y(e.source,t.source))?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:y(e.name,t.name))}n.getArg=r;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,v=/^data:.+\,.+$/;n.urlParse=i,n.urlGenerate=s,n.normalize=o,n.join=a,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(g)},n.relative=u;var b=function(){return!("__proto__"in Object.create(null))}();n.toSetString=b?c:l,n.fromSetString=b?c:p,n.compareByOriginalPositions=f,n.compareByGeneratedPositionsDeflated=d,n.compareByGeneratedPositionsInflated=m},{}],27:[function(e,t,n){n.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,n.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,n.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":23,"./lib/source-map-generator":24,"./lib/source-node":25}],28:[function(e,t,n){t.exports={_args:[[{raw:"nodent@^3.0.17",scope:null,escapedName:"nodent",name:"nodent",rawSpec:"^3.0.17",spec:">=3.0.17 <4.0.0",type:"range"},"/Users/evgenypoberezkin/JSON/ajv"]],_from:"nodent@>=3.0.17 <4.0.0",_id:"nodent@3.0.17",_inCache:!0,_location:"/nodent",_nodeVersion:"6.9.1",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/nodent-3.0.17.tgz_1490780005669_0.5196401283610612"},_npmUser:{name:"matatbread",email:"npm@mailed.me.uk"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{raw:"nodent@^3.0.17",scope:null,escapedName:"nodent",name:"nodent",rawSpec:"^3.0.17",spec:">=3.0.17 <4.0.0",type:"range"},_requiredBy:["#DEV:/"],_resolved:"https://registry.npmjs.org/nodent/-/nodent-3.0.17.tgz",_shasum:"22df57d33c5346d6acc3722d9d69fa68bff518e4",_shrinkwrap:null,_spec:"nodent@^3.0.17",_where:"/Users/evgenypoberezkin/JSON/ajv",author:{name:"Mat At Bread",email:"nodent@mailed.me.uk"},bin:{nodentjs:"./nodent.js"},bugs:{url:"https://github.com/MatAtBread/nodent/issues"},dependencies:{acorn:">=2.5.2","acorn-es7-plugin":">=1.1.6","nodent-runtime":">=3.0.4",resolve:"^1.2.0","source-map":"^0.5.6"},description:"NoDent - Asynchronous Javascript language extensions",devDependencies:{},directories:{},dist:{shasum:"22df57d33c5346d6acc3722d9d69fa68bff518e4",tarball:"https://registry.npmjs.org/nodent/-/nodent-3.0.17.tgz"},engines:"node >= 0.10.0",gitHead:"1a48bd0e8d0b4df69aa7b4b3cf8483c03c1cfbd5",homepage:"https://github.com/MatAtBread/nodent#readme",keywords:["Javascript","ES7","async","await","language","extensions","Node","callback","generator","Promise","asynchronous"],license:"BSD-2-Clause",main:"nodent.js",maintainers:[{name:"matatbread",email:"npm@mailed.me.uk"}],name:"nodent",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+https://github.com/MatAtBread/nodent.git"},scripts:{cover:"istanbul cover ./nodent.js tests -- --quick --syntax ; open ./coverage/lcov-report/index.html",start:"./nodent.js",test:"cd tests && npm i --prod && cd .. && node --expose-gc ./nodent.js tests --syntax --quick && node --expose-gc ./nodent.js tests --quick --notStrict","test-loader":"cd tests/loader/app && npm test && cd ../../.."},version:"3.0.17"}},{}],29:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;s--){var o=s>=0?arguments[s]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=t(r(n.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var i=n.isAbsolute(e),s="/"===o(e,-1);return(e=t(r(e.split("/"),function(e){return!!e}),!i).join("/"))||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),s=r(t.split("/")),o=Math.min(i.length,s.length),a=o,u=0;u1)for(var n=1;n=(t[n]||0))return!0;return!1}(o))for(var a=0;a"))}return o.promises||o.es7||o.generators||o.engine?((o.promises||o.es7)&&o.generators&&(n("No valid 'use nodent' directive, assumed -es7 mode"),o=I.es7),(o.generators||o.engine)&&(o.promises=!0),o.promises&&(o.es7=!0),o):null}function y(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),"#!"===e.substring(0,2)&&(e="//"+e),e}function m(e){return(e instanceof i?e:new i(e.toString(),"binary")).toString("base64")}function g(e,t){return t=t||e.log,function(n,r,i){var s=y(T.readFileSync(r,"utf8")),o=e.parse(s,r,i);i=i||d(o.ast,t,r),e.asynchronize(o,void 0,i,t),e.prettyPrint(o,i),n._compile(o.code,o.filename)}}function v(e){return e=e||q,function(t,n,r){if(Array.isArray(n)){var i=n;n=function(e,t){return i.indexOf(e)>=0}}else n=n||function(e,t){return!(e.match(/Sync$/)&&e.replace(/Sync$/,"")in t)};r||(r="");var s=Object.create(t);for(var o in s)!function(){var i=o;try{"function"!=typeof t[i]||s[i+r]&&s[i+r].isAsync||!n(i,s)||(s[i+r]=function(){var n=Array.prototype.slice.call(arguments);return new e(function(e,r){var s=function(t,n){if(t)return r(t);switch(arguments.length){case 0:return e();case 2:return e(n);default:return e(Array.prototype.slice.call(arguments,1))}};n.length>t[i].length?n.push(s):n[t[i].length-1]=s;t[i].apply(t,n)})},s[i+r].isAsync=!0)}catch(e){}}();return s.super=t,s}}function b(t,n){var r=t.filename.split("/"),i=r.pop(),s=N(t.ast,n&&n.sourcemap?{map:{startLine:n.mapStartLine||0,file:i+"(original)",sourceMapRoot:r.join("/"),sourceContent:t.origCode}}:null,t.origCode);if(n&&n.sourcemap)try{var o="",a=s.map.toJSON();if(a){var u=e("source-map").SourceMapConsumer;t.sourcemap=a,P[t.filename]={map:a,smc:new u(a)},o="\n\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,"+m(JSON.stringify(a))+"\n"}t.code=s.code+o}catch(e){t.code=s}else t.code=s;return t}function x(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n);var i={origCode:e.toString(),filename:t};try{return i.ast=F.parse(i.origCode,r&&r.parser),r.babelTree&&F.treeWalker(i.ast,function(e,t,n){"Literal"===e.type?n[0].replace(O.babelLiteralNode(e.value)):"Property"===e.type&&("ClassBody"===n[0].parent.type?e.type="ClassProperty":e.type="ObjectProperty"),t()}),i}catch(e){if(e instanceof SyntaxError){var s=i.origCode.substr(e.pos-e.loc.column);s=s.split("\n")[0],e.message+=" "+t+" (nodent)\n"+s+"\n"+s.replace(/[\S ]/g,"-").substring(0,e.loc.column)+"^",e.stack=""}throw e}}function w(t,n){n=n||{};var r=t+"|"+Object.keys(n).sort().reduce(function(e,t){return e+t+JSON.stringify(n[t])},"");return this.covers[r]||(t.indexOf("/")>=0?this.covers[r]=e(t):this.covers[r]=e(c+"/covers/"+t)),this.covers[r](this,n)}function E(e,t,n,r){"object"==typeof n&&void 0===r&&(r=n),r=r||{};for(var i in R)i in r||(r[i]=R[i]);var s=this.parse(e,t,null,r);return this.asynchronize(s,null,r,this.log||h),this.prettyPrint(s,r),s}function S(t,n,r){var i={},s=this;n||(n=/\.njs$/),r?r.compiler||(r.compiler={}):r={compiler:{}};var o=l([B,r.compiler]);return function(a,u,c){function l(e){u.statusCode=500,u.write(e.toString()),u.end()}if(i[a.url])return u.setHeader("Content-Type",i[a.url].contentType),r.setHeaders&&r.setHeaders(u),u.write(i[a.url].output),void u.end();if(!(a.url.match(n)||r.htmlScriptRegex&&a.url.match(r.htmlScriptRegex)))return c&&c();var p=t+a.url;if(r.extensions&&!T.existsSync(p))for(var h=0;h …"+n.source+":"+n.line+":"+n.column+(e.getFunctionName()?")":"")}}return"\n at "+e}return e+t.map(n).join("")}function _(e){var t={};t[R.$asyncbind]={value:M,writable:!0,enumerable:!1,configurable:!0},t[R.$asyncspawn]={value:V,writable:!0,enumerable:!1,configurable:!0};try{Object.defineProperties(Function.prototype,t)}catch(t){e.log("Function prototypes already assigned: ",t.messsage)}R[R.$error]in r||(r[R[R.$error]]=p),e.augmentObject&&Object.defineProperties(Object.prototype,{asyncify:{value:function(e,t,n){return v(e)(this,t,n)},writable:!0,configurable:!0},isThenable:{value:function(){return q.isThenable(this)},writable:!0,configurable:!0}}),Object[R.$makeThenable]=q.resolve}function C(t){function n(e,t){e=e.split("."),t=t.split(".");for(var n=0;n<3;n++){if(e[n]t[n])return 1}return 0}function r(i,s){if(!s.match(/nodent\/nodent\.js$/)){if(s.match(/node_modules\/nodent\/.*\.js$/))return L(i,s);for(var u=0;u=3&&function(){function t(e,t){try{var n,s;if(o.fromast){if(e=JSON.parse(e),n={origCode:"",filename:i,ast:e},!(s=d(e,a.log))){var u=o.use?'"use nodent-'+o.use+'";':'"use nodent";';s=d(u,a.log),console.warn("/* "+i+": No 'use nodent*' directive, assumed "+u+" */")}}else(s=d(o.use?'"use nodent-'+o.use+'";':e,a.log))||(s=d('"use nodent";',a.log),o.dest||console.warn("/* "+i+": 'use nodent*' directive missing/ignored, assumed 'use nodent;' */")),n=a.parse(e,i,s);if(o.parseast||o.pretty||a.asynchronize(n,void 0,s,a.log),a.prettyPrint(n,s),o.out||o.pretty||o.dest){if(o.dest&&!t)throw new Error("Can't write unknown file to "+o.dest);var c="";o.runtime&&(c+="Function.prototype.$asyncbind = "+Function.prototype.$asyncbind.toString()+";\n",c+="global.$error = global.$error || "+r.$error.toString()+";\n"),c+=n.code,t&&o.dest?(T.writeFileSync(o.dest+t,c),console.log("Compiled",o.dest+t)):console.log(c)}(o.minast||o.parseast)&&console.log(JSON.stringify(n.ast,function(e,t){return"$"===e[0]||e.match(/^(start|end|loc)$/)?void 0:t},2,null)),o.ast&&console.log(JSON.stringify(n.ast,function(e,t){return"$"===e[0]?void 0:t},0)),o.exec&&new Function(n.code)()}catch(e){console.error(e)}}var i,s=e("path"),o=(n.env.NODENT_OPTS&&JSON.parse(n.env.NODENT_OPTS),function(e){for(var t=[],r=e||2;r<]/g}},{}],2:[function(e,t,r){"use strict";function n(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}Object.defineProperty(t,"exports",{enumerable:!0,get:n})},{}],3:[function(e,t,r){(function(r){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!f(e[a],t[a],r,n))return!1;return!0}function y(e,t,r){f(e,t,!0)&&p(e,t,r,"notDeepStrictEqual",y)}function g(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function b(e){var t;try{e()}catch(e){t=e}return t}function v(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=b(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&p(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&x.isError(i),o=!e&&i&&!r;if((a&&s&&g(i,r)||o)&&p(i,r,"Got unwanted exception"+n),e&&i&&r&&!g(i,r)||!e&&i)throw i}var x=e("util/"),E=Object.prototype.hasOwnProperty,A=Array.prototype.slice,D=function(){return"foo"===function(){}.name}(),C=t.exports=h,S=/\s*function\s+([^\(\s]*)\s*/;C.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var t=e.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},x.inherits(C.AssertionError,Error),C.fail=p,C.ok=h,C.equal=function(e,t,r){e!=t&&p(e,t,r,"==",C.equal)},C.notEqual=function(e,t,r){e==t&&p(e,t,r,"!=",C.notEqual)},C.deepEqual=function(e,t,r){f(e,t,!1)||p(e,t,r,"deepEqual",C.deepEqual)},C.deepStrictEqual=function(e,t,r){f(e,t,!0)||p(e,t,r,"deepStrictEqual",C.deepStrictEqual)},C.notDeepEqual=function(e,t,r){f(e,t,!1)&&p(e,t,r,"notDeepEqual",C.notDeepEqual)},C.notDeepStrictEqual=y,C.strictEqual=function(e,t,r){e!==t&&p(e,t,r,"===",C.strictEqual)},C.notStrictEqual=function(e,t,r){e===t&&p(e,t,r,"!==",C.notStrictEqual)},C.throws=function(e,t,r){v(!0,e,t,r)},C.doesNotThrow=function(e,t,r){v(!1,e,t,r)},C.ifError=function(e){if(e)throw e};var _=Object.keys||function(e){var t=[];for(var r in e)E.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":601}],4:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Noop").bases("Node").build(),i("DoExpression").bases("Expression").build("body").field("body",[i("Statement")]),i("Super").bases("Expression").build(),i("BindExpression").bases("Expression").build("object","callee").field("object",s(i("Expression"),null)).field("callee",i("Expression")),i("Decorator").bases("Node").build("expression").field("expression",i("Expression")),i("Property").field("decorators",s([i("Decorator")],null),n.null),i("MethodDefinition").field("decorators",s([i("Decorator")],null),n.null),i("MetaProperty").bases("Expression").build("meta","property").field("meta",i("Identifier")).field("property",i("Identifier")),i("ParenthesizedExpression").bases("Expression").build("expression").field("expression",i("Expression")),i("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",i("Identifier")),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(i("Declaration"),i("Expression"))),i("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(i("Declaration"),null)).field("specifiers",[i("ExportSpecifier")],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",i("Identifier")),i("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",s(i("Identifier"),null)).field("source",i("Literal")),i("CommentBlock").bases("Comment").build("value","leading","trailing"),i("CommentLine").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],5:[function(e,t,r){t.exports=function(t){t.use(e("./babel")),t.use(e("./flow"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Directive").bases("Node").build("value").field("value",i("DirectiveLiteral")),i("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,n["use strict"]),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("Program").bases("Node").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("StringLiteral").bases("Literal").build("value").field("value",String),i("NumericLiteral").bases("Literal").build("value").field("value",Number),i("NullLiteral").bases("Literal").build(),i("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),i("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String);var a=s(i("Property"),i("ObjectMethod"),i("ObjectProperty"),i("SpreadProperty"));i("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),i("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",s("method","get","set")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null),i("ObjectProperty").bases("Node").build("key","value").field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("value",s(i("Expression"),i("Pattern"))).field("computed",Boolean,n.false);var o=s(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassMethod"));i("ClassBody").bases("Declaration").build("body").field("body",[o]),i("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("kind",s("get","set","method","constructor")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("static",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null);var u=s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"),i("ObjectProperty"),i("RestProperty"));i("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",s([i("Decorator")],null),n.null),i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression")),i("RestProperty").bases("Node").build("argument").field("argument",i("Expression")),i("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("Import").bases("Expression").build()}},{"../lib/shared":20,"../lib/types":21,"./babel":4,"./flow":11}],6:[function(e,t,r){t.exports=function(t){var r=t.use(e("../lib/types")),n=r.Type,i=n.def,s=n.or,a=t.use(e("../lib/shared")),o=a.defaults,u=a.geq;i("Printable").field("loc",s(i("SourceLocation"),null),o.null,!0),i("Node").bases("Printable").field("type",String).field("comments",s([i("Comment")],null),o.null,!0),i("SourceLocation").build("start","end","source").field("start",i("Position")).field("end",i("Position")).field("source",s(String,null),o.null),i("Position").build("line","column").field("line",u(1)).field("column",u(0)),i("File").bases("Node").build("program","name").field("program",i("Program")).field("name",s(String,null),o.null),i("Program").bases("Node").build("body").field("body",[i("Statement")]),i("Function").bases("Node").field("id",s(i("Identifier"),null),o.null).field("params",[i("Pattern")]).field("body",i("BlockStatement")),i("Statement").bases("Node"),i("EmptyStatement").bases("Statement").build(),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]),i("ExpressionStatement").bases("Statement").build("expression").field("expression",i("Expression")),i("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",i("Expression")).field("consequent",i("Statement")).field("alternate",s(i("Statement"),null),o.null),i("LabeledStatement").bases("Statement").build("label","body").field("label",i("Identifier")).field("body",i("Statement")),i("BreakStatement").bases("Statement").build("label").field("label",s(i("Identifier"),null),o.null),i("ContinueStatement").bases("Statement").build("label").field("label",s(i("Identifier"),null),o.null),i("WithStatement").bases("Statement").build("object","body").field("object",i("Expression")).field("body",i("Statement")),i("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",i("Expression")).field("cases",[i("SwitchCase")]).field("lexical",Boolean,o.false),i("ReturnStatement").bases("Statement").build("argument").field("argument",s(i("Expression"),null)),i("ThrowStatement").bases("Statement").build("argument").field("argument",i("Expression")),i("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",i("BlockStatement")).field("handler",s(i("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[i("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[i("CatchClause")],o.emptyArray).field("finalizer",s(i("BlockStatement"),null),o.null),i("CatchClause").bases("Node").build("param","guard","body").field("param",i("Pattern")).field("guard",s(i("Expression"),null),o.null).field("body",i("BlockStatement")),i("WhileStatement").bases("Statement").build("test","body").field("test",i("Expression")).field("body",i("Statement")),i("DoWhileStatement").bases("Statement").build("body","test").field("body",i("Statement")).field("test",i("Expression")),i("ForStatement").bases("Statement").build("init","test","update","body").field("init",s(i("VariableDeclaration"),i("Expression"),null)).field("test",s(i("Expression"),null)).field("update",s(i("Expression"),null)).field("body",i("Statement")),i("ForInStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("DebuggerStatement").bases("Statement").build(),i("Declaration").bases("Statement"),i("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",i("Identifier")),i("FunctionExpression").bases("Function","Expression").build("id","params","body"),i("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",s("var","let","const")).field("declarations",[i("VariableDeclarator")]),i("VariableDeclarator").bases("Node").build("id","init").field("id",i("Pattern")).field("init",s(i("Expression"),null)),i("Expression").bases("Node","Pattern"),i("ThisExpression").bases("Expression").build(),i("ArrayExpression").bases("Expression").build("elements").field("elements",[s(i("Expression"),null)]),i("ObjectExpression").bases("Expression").build("properties").field("properties",[i("Property")]),i("Property").bases("Node").build("kind","key","value").field("kind",s("init","get","set")).field("key",s(i("Literal"),i("Identifier"))).field("value",i("Expression")),i("SequenceExpression").bases("Expression").build("expressions").field("expressions",[i("Expression")]);var l=s("-","+","!","~","typeof","void","delete");i("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",l).field("argument",i("Expression")).field("prefix",Boolean,o.true);var c=s("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");i("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",c).field("left",i("Expression")).field("right",i("Expression"));var p=s("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");i("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",p).field("left",i("Pattern")).field("right",i("Expression"));var h=s("++","--");i("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",h).field("argument",i("Expression")).field("prefix",Boolean);var f=s("||","&&");i("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",f).field("left",i("Expression")).field("right",i("Expression")),i("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",i("Expression")).field("consequent",i("Expression")).field("alternate",i("Expression")),i("NewExpression").bases("Expression").build("callee","arguments").field("callee",i("Expression")).field("arguments",[i("Expression")]),i("CallExpression").bases("Expression").build("callee","arguments").field("callee",i("Expression")).field("arguments",[i("Expression")]),i("MemberExpression").bases("Expression").build("object","property","computed").field("object",i("Expression")).field("property",s(i("Identifier"),i("Expression"))).field("computed",Boolean,function(){var e=this.property.type;return"Literal"===e||"MemberExpression"===e||"BinaryExpression"===e}),i("Pattern").bases("Node"),i("SwitchCase").bases("Node").build("test","consequent").field("test",s(i("Expression"),null)).field("consequent",[i("Statement")]),i("Identifier").bases("Node","Expression","Pattern").build("name").field("name",String),i("Literal").bases("Node","Expression").build("value").field("value",s(String,Boolean,null,Number,RegExp)).field("regex",s({pattern:String,flags:String},null),function(){if(this.value instanceof RegExp){var e="";return this.value.ignoreCase&&(e+="i"),this.value.multiline&&(e+="m"),this.value.global&&(e+="g"),{pattern:this.value.source,flags:e}}return null}),i("Comment").bases("Printable").field("value",String).field("leading",Boolean,o.true).field("trailing",Boolean,o.false)}},{"../lib/shared":20,"../lib/types":21}],7:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or;n("XMLDefaultDeclaration").bases("Declaration").field("namespace",n("Expression")),n("XMLAnyName").bases("Expression"),n("XMLQualifiedIdentifier").bases("Expression").field("left",i(n("Identifier"),n("XMLAnyName"))).field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLAttributeSelector").bases("Expression").field("attribute",n("Expression")),n("XMLFilterExpression").bases("Expression").field("left",n("Expression")).field("right",n("Expression")),n("XMLElement").bases("XML","Expression").field("contents",[n("XML")]),n("XMLList").bases("XML","Expression").field("contents",[n("XML")]),n("XML").bases("Node"),n("XMLEscape").bases("XML").field("expression",n("Expression")),n("XMLText").bases("XML").field("text",String),n("XMLStartTag").bases("XML").field("contents",[n("XML")]),n("XMLEndTag").bases("XML").field("contents",[n("XML")]),n("XMLPointTag").bases("XML").field("contents",[n("XML")]),n("XMLName").bases("XML").field("contents",i(String,[n("XML")])),n("XMLAttribute").bases("XML").field("value",String),n("XMLCdata").bases("XML").field("contents",String),n("XMLComment").bases("XML").field("contents",String),n("XMLProcessingInstruction").bases("XML").field("target",String).field("contents",i(String,null))}},{"../lib/types":21,"./core":6}],8:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Function").field("generator",Boolean,s.false).field("expression",Boolean,s.false).field("defaults",[i(n("Expression"),null)],s.emptyArray).field("rest",i(n("Identifier"),null),s.null),n("RestElement").bases("Pattern").build("argument").field("argument",n("Pattern")),n("SpreadElementPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("FunctionDeclaration").build("id","params","body","generator","expression"),n("FunctionExpression").build("id","params","body","generator","expression"),n("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s.null).field("body",i(n("BlockStatement"),n("Expression"))).field("generator",!1,s.false),n("YieldExpression").bases("Expression").build("argument","delegate").field("argument",i(n("Expression"),null)).field("delegate",Boolean,s.false),n("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionBlock").bases("Node").build("left","right","each").field("left",n("Pattern")).field("right",n("Expression")).field("each",Boolean),n("Property").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("method",Boolean,s.false).field("shorthand",Boolean,s.false).field("computed",Boolean,s.false),n("PropertyPattern").bases("Pattern").build("key","pattern").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("pattern",n("Pattern")).field("computed",Boolean,s.false),n("ObjectPattern").bases("Pattern").build("properties").field("properties",[i(n("PropertyPattern"),n("Property"))]),n("ArrayPattern").bases("Pattern").build("elements").field("elements",[i(n("Pattern"),null)]),n("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",i("constructor","method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",n("Function")).field("computed",Boolean,s.false).field("static",Boolean,s.false),n("SpreadElement").bases("Node").build("argument").field("argument",n("Expression")),n("ArrayExpression").field("elements",[i(n("Expression"),n("SpreadElement"),n("RestElement"),null)]),n("NewExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("CallExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("AssignmentPattern").bases("Pattern").build("left","right").field("left",n("Pattern")).field("right",n("Expression"));var a=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"));n("ClassProperty").bases("Declaration").build("key").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("computed",Boolean,s.false),n("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",a),n("ClassBody").bases("Declaration").build("body").field("body",[a]),n("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",i(n("Identifier"),null)).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null),n("ClassExpression").bases("Expression").build("id","body","superClass").field("id",i(n("Identifier"),null),s.null).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null).field("implements",[n("ClassImplements")],s.emptyArray),n("ClassImplements").bases("Node").build("id").field("id",n("Identifier")).field("superClass",i(n("Expression"),null),s.null),n("Specifier").bases("Node"),n("ModuleSpecifier").bases("Specifier").field("local",i(n("Identifier"),null),s.null).field("id",i(n("Identifier"),null),s.null).field("name",i(n("Identifier"),null),s.null),n("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",n("Expression")).field("quasi",n("TemplateLiteral")),n("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[n("TemplateElement")]).field("expressions",[n("Expression")]),n("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)}},{"../lib/shared":20,"../lib/types":21,"./core":6}],9:[function(e,t,r){t.exports=function(t){t.use(e("./es6"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=(r.builtInTypes,t.use(e("../lib/shared")).defaults);n("Function").field("async",Boolean,s.false),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ObjectExpression").field("properties",[i(n("Property"),n("SpreadProperty"))]),n("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"))]),n("AwaitExpression").bases("Expression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,s.false)}},{"../lib/shared":20,"../lib/types":21,"./es6":8}],10:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("VariableDeclaration").field("declarations",[s(i("VariableDeclarator"),i("Identifier"))]),i("Property").field("value",s(i("Expression"),i("Pattern"))),i("ArrayPattern").field("elements",[s(i("Pattern"),i("SpreadElement"),null)]),i("ObjectPattern").field("properties",[s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"))]),i("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ExportBatchSpecifier").bases("Specifier").build(),i("ImportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id"),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id"),i("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(i("Declaration"),i("Expression"),null)).field("specifiers",[s(i("ExportSpecifier"),i("ExportBatchSpecifier"))],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[s(i("ImportSpecifier"),i("ImportNamespaceSpecifier"),i("ImportDefaultSpecifier"))],n.emptyArray).field("source",i("Literal")).field("importKind",s("value","type"),function(){return"value"}),i("Block").bases("Comment").build("value","leading","trailing"),i("Line").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],11:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Type").bases("Node"),n("AnyTypeAnnotation").bases("Type").build(),n("EmptyTypeAnnotation").bases("Type").build(),n("MixedTypeAnnotation").bases("Type").build(),n("VoidTypeAnnotation").bases("Type").build(),n("NumberTypeAnnotation").bases("Type").build(),n("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("NumericLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("StringTypeAnnotation").bases("Type").build(),n("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",String).field("raw",String),n("BooleanTypeAnnotation").bases("Type").build(),n("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Boolean).field("raw",String),n("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullLiteralTypeAnnotation").bases("Type").build(),n("NullTypeAnnotation").bases("Type").build(),n("ThisTypeAnnotation").bases("Type").build(),n("ExistsTypeAnnotation").bases("Type").build(),n("ExistentialTypeParam").bases("Type").build(),n("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[n("FunctionTypeParam")]).field("returnType",n("Type")).field("rest",i(n("FunctionTypeParam"),null)).field("typeParameters",i(n("TypeParameterDeclaration"),null)),n("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n("Identifier")).field("typeAnnotation",n("Type")).field("optional",Boolean),n("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",n("Type")),n("ObjectTypeAnnotation").bases("Type").build("properties","indexers","callProperties").field("properties",[n("ObjectTypeProperty")]).field("indexers",[n("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[n("ObjectTypeCallProperty")],s.emptyArray).field("exact",Boolean,s.false),n("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",i(n("Literal"),n("Identifier"))).field("value",n("Type")).field("optional",Boolean).field("variance",i("plus","minus",null),s.null),n("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",n("Identifier")).field("key",n("Type")).field("value",n("Type")).field("variance",i("plus","minus",null),s.null),n("ObjectTypeCallProperty").bases("Node").build("value").field("value",n("FunctionTypeAnnotation")).field("static",Boolean,s.false),n("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("id",n("Identifier")),n("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("MemberTypeAnnotation").bases("Type").build("object","property").field("object",n("Identifier")).field("property",i(n("MemberTypeAnnotation"),n("GenericTypeAnnotation"))),n("UnionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",n("Type")),n("Identifier").field("typeAnnotation",i(n("TypeAnnotation"),null),s.null),n("TypeParameterDeclaration").bases("Node").build("params").field("params",[n("TypeParameter")]),n("TypeParameterInstantiation").bases("Node").build("params").field("params",[n("Type")]),n("TypeParameter").bases("Type").build("name","variance","bound").field("name",String).field("variance",i("plus","minus",null),s.null).field("bound",i(n("TypeAnnotation"),null),s.null),n("Function").field("returnType",i(n("TypeAnnotation"),null),s.null).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null),n("ClassProperty").build("key","value","typeAnnotation","static").field("value",i(n("Expression"),null)).field("typeAnnotation",i(n("TypeAnnotation"),null)).field("static",Boolean,s.false).field("variance",i("plus","minus",null),s.null),n("ClassImplements").field("typeParameters",i(n("TypeParameterInstantiation"),null),s.null),n("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null).field("body",n("ObjectTypeAnnotation")).field("extends",[n("InterfaceExtends")]),n("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),n("InterfaceExtends").bases("Node").build("id").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null)).field("right",n("Type")),n("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"), -n("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TypeAnnotation")),n("TupleTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("DeclareVariable").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareFunction").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareClass").bases("InterfaceDeclaration").build("id"),n("DeclareModule").bases("Statement").build("id","body").field("id",i(n("Identifier"),n("Literal"))).field("body",n("BlockStatement")),n("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",n("Type")),n("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("DeclareVariable"),n("DeclareFunction"),n("DeclareClass"),n("Type"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],s.emptyArray).field("source",i(n("Literal"),null),s.null),n("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",i(n("Literal"),null),s.null)}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],12:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("JSXAttribute").bases("Node").build("name","value").field("name",i(n("JSXIdentifier"),n("JSXNamespacedName"))).field("value",i(n("Literal"),n("JSXExpressionContainer"),null),s.null),n("JSXIdentifier").bases("Identifier").build("name").field("name",String),n("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",n("JSXIdentifier")).field("name",n("JSXIdentifier")),n("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",i(n("JSXIdentifier"),n("JSXMemberExpression"))).field("property",n("JSXIdentifier")).field("computed",Boolean,s.false);var a=i(n("JSXIdentifier"),n("JSXNamespacedName"),n("JSXMemberExpression"));n("JSXSpreadAttribute").bases("Node").build("argument").field("argument",n("Expression"));var o=[i(n("JSXAttribute"),n("JSXSpreadAttribute"))];n("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n("Expression")),n("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",n("JSXOpeningElement")).field("closingElement",i(n("JSXClosingElement"),null),s.null).field("children",[i(n("JSXElement"),n("JSXExpressionContainer"),n("JSXText"),n("Literal"))],s.emptyArray).field("name",a,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),n("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",a).field("attributes",o,s.emptyArray).field("selfClosing",Boolean,s.false),n("JSXClosingElement").bases("Node").build("name").field("name",a),n("JSXText").bases("Literal").build("value").field("value",String),n("JSXEmptyExpression").bases("Expression").build()}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],13:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")),a=s.geq,o=s.defaults;n("Function").field("body",i(n("BlockStatement"),n("Expression"))),n("ForInStatement").build("left","right","body","each").field("each",Boolean,o.false),n("ForOfStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("LetStatement").bases("Statement").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Statement")),n("LetExpression").bases("Expression").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Expression")),n("GraphExpression").bases("Expression").build("index","expression").field("index",a(0)).field("expression",n("Literal")),n("GraphIndexExpression").bases("Expression").build("index").field("index",a(0))}},{"../lib/shared":20,"../lib/types":21,"./core":6}],14:[function(e,t,r){t.exports=function(t){function r(e){var t=n.indexOf(e);return-1===t&&(t=n.length,n.push(e),i[t]=e(s)),i[t]}var n=[],i=[],s={};s.use=r;var a=r(e("./lib/types"));t.forEach(r),a.finalize();var o={Type:a.Type,builtInTypes:a.builtInTypes,namedTypes:a.namedTypes,builders:a.builders,defineMethod:a.defineMethod,getFieldNames:a.getFieldNames,getFieldValue:a.getFieldValue,eachField:a.eachField,someField:a.someField,getSupertypeNames:a.getSupertypeNames,astNodesAreEquivalent:r(e("./lib/equiv")),finalize:a.finalize,Path:r(e("./lib/path")),NodePath:r(e("./lib/node-path")),PathVisitor:r(e("./lib/path-visitor")),use:r};return o.visit=o.PathVisitor.visit,o}},{"./lib/equiv":15,"./lib/node-path":16,"./lib/path":18,"./lib/path-visitor":17,"./lib/types":21}],15:[function(e,t,r){t.exports=function(t){function r(e,t,r){return c.check(r)?r.length=0:r=null,i(e,t,r)}function n(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function i(e,t,r){return e===t||(c.check(e)?s(e,t,r):p.check(e)?a(e,t,r):h.check(e)?h.check(t)&&+e==+t:f.check(e)?f.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t)}function s(e,t,r){c.assert(e);var n=e.length;if(!c.check(t)||t.length!==n)return r&&r.push("length"),!1;for(var s=0;so)return!0;if(t===o&&"right"===this.name){if(n.right!==r)throw new Error("Nodes must be equal");return!0}default:return!1}case"SequenceExpression":switch(n.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(n.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===n.type&&p.check(r.value)&&"object"===this.name&&n.object===r;case"AssignmentExpression":case"ConditionalExpression":switch(n.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&n.callee===r;case"ConditionalExpression":return"test"===this.name&&n.test===r;case"MemberExpression":return"object"===this.name&&n.object===r;default:return!1}default:if("NewExpression"===n.type&&"callee"===this.name&&n.callee===r)return i(r)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var y={};return[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){y[e]=t})}),m.canBeFirstInStatement=function(){var e=this.node;return!l.FunctionExpression.check(e)&&!l.ObjectExpression.check(e)},m.firstInStatement=function(){return s(this)},r}},{"./path":18,"./scope":19,"./types":21}],17:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(){if(!(this instanceof r))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=i(this),this._shouldVisitComments=n.call(this._methodNameTable,"Block")||n.call(this._methodNameTable,"Line"),this.Context=o(this),this._visiting=!1,this._changeReported=!1}function i(e){var t=Object.create(null);for(var r in e)/^visit[A-Z]/.test(r)&&(t[r.slice("visit".length)]=!0);for(var n=u.computeSupertypeLookupTable(t),i=Object.create(null),t=Object.keys(n),s=t.length,a=0;a=0&&(s[e.name=a]=e)}else i[e.name]=e.value,s[e.name]=e;if(i[e.name]!==e.value)throw new Error("");if(e.parentPath.get(e.name)!==e)throw new Error("");return e}var l=t.use(e("./types")),c=l.builtInTypes.array,p=l.builtInTypes.number,h=r.prototype;return h.getValueProperty=function(e){return this.value[e]},h.get=function(e){for(var t=this,r=arguments,n=r.length,s=0;s=e},a+" >= "+e)},r.defaults={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){}};var o=i.or(s.string,s.number,s.boolean,s.null,s.undefined);return r.isPrimitive=new i(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},o.toString()),r}},{"../lib/types":21}],21:[function(e,t,r){var n=Array.prototype,i=n.slice,s=(n.map,n.forEach,Object.prototype),a=s.toString,o=a.call(function(){}),u=a.call(""),l=s.hasOwnProperty;t.exports=function(){function e(t,r){var n=this;if(!(n instanceof e))throw new Error("Type constructor cannot be invoked without 'new'");if(a.call(t)!==o)throw new Error(t+" is not a function");var i=a.call(r);if(i!==o&&i!==u)throw new Error(r+" is neither a function nor a string");Object.defineProperties(n,{name:{value:r},check:{value:function(e,r){var i=t.call(n,e,r);return!i&&r&&a.call(r)===o&&r(n,e),i}}})}function t(e){return _.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":S.check(e)?"["+e.map(t).join(", ")+"]":JSON.stringify(e)}function r(t,r){var n=a.call(t),i=new e(function(e){return a.call(e)===n},r);return A[r]=i,t&&"function"==typeof t.constructor&&(x.push(t.constructor),E.push(i)),i}function n(t,r){if(t instanceof e)return t;if(t instanceof c)return t.type;if(S.check(t))return e.fromArray(t);if(_.check(t))return e.fromObject(t);if(C.check(t)){var n=x.indexOf(t);return n>=0?E[n]:new e(t,r)}return new e(function(e){return e===t},k.check(r)?function(){return t+""}:r)}function s(e,t,r,i){var a=this;if(!(a instanceof s))throw new Error("Field constructor cannot be invoked without 'new'");D.assert(e),t=n(t);var o={name:{value:e},type:{value:t},hidden:{value:!!i}};C.check(r)&&(o.defaultFn={value:r}),Object.defineProperties(a,o)}function c(t){var r=this;if(!(r instanceof c))throw new Error("Def constructor cannot be invoked without 'new'");Object.defineProperties(r,{typeName:{value:t},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new e(function(e,t){return r.check(e,t)},t)}})}function p(e){return e.replace(/^[A-Z]+/,function(e){var t=e.length;switch(t){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}})}function h(e){return e=p(e),e.replace(/(Expression)?$/,"Statement")}function f(e){var t=c.fromValue(e);if(t)return t.fieldNames.slice(0);if("type"in e)throw new Error("did not recognize object of type "+JSON.stringify(e.type));return Object.keys(e)}function d(e,t){var r=c.fromValue(e);if(r){var n=r.allFields[t];if(n)return n.getValue(e)}return e&&e[t]}function m(e){var t=h(e);if(!B[t]){var r=B[p(e)];r&&(B[t]=function(){return B.expressionStatement(r.apply(B,arguments))})}}function y(e,t){t.length=0,t.push(e);for(var r=Object.create(null),n=0;n=0&&m(e.typeName)}},b.finalize=function(){Object.keys(T).forEach(function(e){T[e].finalize()})},b}},{}],22:[function(e,t,r){t.exports=e("./fork")([e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/jsx"),e("./def/flow"),e("./def/esprima"),e("./def/babel"),e("./def/babel6")])},{"./def/babel":4,"./def/babel6":5,"./def/core":6,"./def/e4x":7,"./def/es6":8,"./def/es7":9,"./def/esprima":10,"./def/flow":11,"./def/jsx":12,"./def/mozilla":13,"./fork":14}],23:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}function s(e){var t=e.slice(-2),r=t[0],n=t[1],i=(0,o.matchToToken)(e);if("name"===i.type){if(c.default.keyword.isReservedWordES6(i.value))return"keyword";if(d.test(i.value)&&("<"===n[r-1]||"3&&void 0!==arguments[3]?arguments[3]:{};r=Math.max(r,0);var s=n.highlightCode&&h.default.supportsColor||n.forceColor,o=h.default;n.forceColor&&(o=new h.default.constructor({enabled:!0}));var u=function(e,t){return s?e(t):t},l=i(o);s&&(e=a(l,e));var c=n.linesAbove||2,p=n.linesBelow||3,d=e.split(f),m=Math.max(t-(c+1),0),y=Math.min(d.length,t+p);t||r||(m=0,y=d.length);var g=String(y).length,b=d.slice(m,y).map(function(e,n){var i=m+1+n,s=(" "+i).slice(-g),a=" "+s+" | ";if(i===t){var o="";if(r){var c=e.slice(0,r-1).replace(/[^\t]/g," ");o=["\n ",u(l.gutter,a.replace(/\d/g," ")),c,u(l.marker,"^")].join("")}return[u(l.marker,">"),u(l.gutter,a),e,o].join("")}return" "+u(l.gutter,a)+e}).join("\n");return s?o.reset(b):b};var o=e("js-tokens"),u=n(o),l=e("esutils"),c=n(l),p=e("chalk"),h=n(p),f=/\r\n|[\n\r\u2028\u2029]/,d=/^[a-z][\w-]*$/i,m=/^[()\[\]{}]$/;t.exports=r.default},{chalk:185,esutils:27,"js-tokens":311}],24:[function(e,t,r){!function(){"use strict";function e(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return n(e)||null!=e&&"FunctionDeclaration"===e.type}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1}t.exports={isExpression:e,isStatement:n,isIterationStatement:r,isSourceElement:i,isProblematicIfStatement:a,trailingStatement:s}}()},{}],25:[function(e,t,r){!function(){"use strict";function e(e){return 48<=e&&e<=57}function r(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function n(e){return e>=48&&e<=55}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&f.indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}function o(e){return e<128?d[e]:h.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?m[e]:h.NonAsciiIdentifierPart.test(a(e))}function l(e){return e<128?d[e]:p.NonAsciiIdentifierStart.test(a(e))}function c(e){return e<128?m[e]:p.NonAsciiIdentifierPart.test(a(e))}var p,h,f,d,m,y;for(h={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},p={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},f=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],d=new Array(128),y=0;y<128;++y)d[y]=y>=97&&y<=122||y>=65&&y<=90||36===y||95===y;for(m=new Array(128),y=0;y<128;++y)m[y]=y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||36===y||95===y;t.exports={isDecimalDigit:e,isHexDigit:r,isOctalDigit:n,isWhiteSpace:i,isLineTerminator:s,isIdentifierStartES5:o,isIdentifierPartES5:u,isIdentifierStartES6:l,isIdentifierPartES6:c}}()},{}],26:[function(e,t,r){!function(){"use strict";function r(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function n(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,t){if(t&&r(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function s(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function o(e){return"eval"===e||"arguments"===e}function u(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!f.isIdentifierStartES5(n))return!1 -;for(t=1,r=e.length;t=r)return!1;if(!(56320<=(i=e.charCodeAt(t))&&i<=57343))return!1;n=l(n,i)}if(!s(n))return!1;s=f.isIdentifierPartES6}return!0}function p(e,t){return u(e)&&!s(e,t)}function h(e,t){return c(e)&&!a(e,t)}var f=e("./code");t.exports={isKeywordES5:n,isKeywordES6:i,isReservedWordES5:s,isReservedWordES6:a,isRestrictedWord:o,isIdentifierNameES5:u,isIdentifierNameES6:c,isIdentifierES5:p,isIdentifierES6:h}}()},{"./code":25}],27:[function(e,t,r){!function(){"use strict";r.ast=e("./ast"),r.code=e("./code"),r.keyword=e("./keyword")}()},{"./ast":24,"./code":25,"./keyword":26}],28:[function(e,t,r){t.exports=e("./lib/api/node.js")},{"./lib/api/node.js":29}],29:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){throw new Error("The ("+e+") Babel 5 plugin is being run with Babel 6.")}function a(e,t,r){"function"==typeof t&&(r=t,t={}),t.filename=e,y.default.readFile(e,function(e,n){var i=void 0;if(!e)try{i=T(n,t)}catch(t){e=t}e?r(e):r(null,i)})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filename=e,T(y.default.readFileSync(e,"utf8"),t)}r.__esModule=!0,r.transformFromAst=r.transform=r.analyse=r.Pipeline=r.OptionManager=r.traverse=r.types=r.messages=r.util=r.version=r.resolvePreset=r.resolvePlugin=r.template=r.buildExternalHelpers=r.options=r.File=void 0;var u=e("../transformation/file");Object.defineProperty(r,"File",{enumerable:!0,get:function(){return i(u).default}});var l=e("../transformation/file/options/config");Object.defineProperty(r,"options",{enumerable:!0,get:function(){return i(l).default}});var c=e("../tools/build-external-helpers");Object.defineProperty(r,"buildExternalHelpers",{enumerable:!0,get:function(){return i(c).default}});var p=e("babel-template");Object.defineProperty(r,"template",{enumerable:!0,get:function(){return i(p).default}});var h=e("../helpers/resolve-plugin");Object.defineProperty(r,"resolvePlugin",{enumerable:!0,get:function(){return i(h).default}});var f=e("../helpers/resolve-preset");Object.defineProperty(r,"resolvePreset",{enumerable:!0,get:function(){return i(f).default}});var d=e("../../package");Object.defineProperty(r,"version",{enumerable:!0,get:function(){return d.version}}),r.Plugin=s,r.transformFile=a,r.transformFileSync=o;var m=e("fs"),y=i(m),g=e("../util"),b=n(g),v=e("babel-messages"),x=n(v),E=e("babel-types"),A=n(E),D=e("babel-traverse"),C=i(D),S=e("../transformation/file/options/option-manager"),_=i(S),w=e("../transformation/pipeline"),k=i(w);r.util=b,r.messages=x,r.types=A,r.traverse=C.default,r.OptionManager=_.default,r.Pipeline=k.default;var F=new k.default,T=(r.analyse=F.analyse.bind(F),r.transform=F.transform.bind(F));r.transformFromAst=F.transformFromAst.bind(F)},{"../../package":66,"../helpers/resolve-plugin":35,"../helpers/resolve-preset":36,"../tools/build-external-helpers":39,"../transformation/file":40,"../transformation/file/options/config":44,"../transformation/file/options/option-manager":46,"../transformation/pipeline":51,"../util":54,"babel-messages":103,"babel-template":132,"babel-traverse":136,"babel-types":169,fs:182}],30:[function(e,t,r){"use strict";function n(e){return["babel-plugin-"+e,e]}r.__esModule=!0,r.default=n,t.exports=r.default},{}],31:[function(e,t,r){"use strict";function n(e){var t=["babel-preset-"+e,e],r=e.match(/^(@[^\/]+)\/(.+)$/);if(r){var n=r[1],i=r[2];t.push(n+"/babel-preset-"+i)}return t}r.__esModule=!0,r.default=n,t.exports=r.default},{}],32:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/get-iterator"),s=n(i);r.default=function(e,t){if(e&&t)return(0,o.default)(e,t,function(e,t){if(t&&Array.isArray(e)){for(var r=t.slice(0),n=e,i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;r.indexOf(u)<0&&r.push(u)}return r}})};var a=e("lodash/mergeWith"),o=n(a);t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"lodash/mergeWith":516}],33:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){if(e){if("Program"===e.type)return i.file(e,t||[],r||[]);if("File"===e.type)return e}throw new Error("Not a valid ast?")};var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);t.exports=r.default},{"babel-types":169}],34:[function(e,t,r){"use strict";function n(e,t){return e.reduce(function(e,r){return e||(0,s.default)(r,t)},null)}r.__esModule=!0,r.default=n;var i=e("./resolve"),s=function(e){return e&&e.__esModule?e:{default:e}}(i);t.exports=r.default},{"./resolve":37}],35:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,o.default)((0,l.default)(e),t)}r.__esModule=!0,r.default=s;var a=e("./resolve-from-possible-names"),o=i(a),u=e("./get-possible-plugin-names"),l=i(u);t.exports=r.default}).call(this,e("_process"))},{"./get-possible-plugin-names":30,"./resolve-from-possible-names":34,_process:539}],36:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,o.default)((0,l.default)(e),t)}r.__esModule=!0,r.default=s;var a=e("./resolve-from-possible-names"),o=i(a),u=e("./get-possible-preset-names"),l=i(u);t.exports=r.default}).call(this,e("_process"))},{"./get-possible-preset-names":31,"./resolve-from-possible-names":34,_process:539}],37:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=e("babel-runtime/helpers/typeof"),a=i(s);r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();if("object"===(void 0===u.default?"undefined":(0,a.default)(u.default)))return null;var r=p[t];if(!r){r=new u.default;var i=c.default.join(t,".babelrc");r.id=i,r.filename=i,r.paths=u.default._nodeModulePaths(t),p[t]=r}try{return u.default._resolveFilename(e,r)}catch(e){return null}};var o=e("module"),u=i(o),l=e("path"),c=i(l),p={};t.exports=r.default}).call(this,e("_process"))},{_process:539,"babel-runtime/helpers/typeof":131,module:182,path:535}],38:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/map"),s=n(i),a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-runtime/helpers/possibleConstructorReturn"),l=n(u),c=e("babel-runtime/helpers/inherits"),p=n(c),h=function(e){function t(){(0,o.default)(this,t);var r=(0,l.default)(this,e.call(this));return r.dynamicData={},r}return(0,p.default)(t,e),t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(t){if(this.has(t))return e.prototype.get.call(this,t);if(Object.prototype.hasOwnProperty.call(this.dynamicData,t)){var r=this.dynamicData[t]();return this.set(t,r),r}},t}(s.default);r.default=h,t.exports=r.default},{"babel-runtime/core-js/map":115,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130}],39:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e,t){var r=[],n=b.functionExpression(null,[b.identifier("global")],b.blockStatement(r)),i=b.program([b.expressionStatement(b.callExpression(n,[c.get("selfGlobal")]))]);return r.push(b.variableDeclaration("var",[b.variableDeclarator(e,b.assignmentExpression("=",b.memberExpression(b.identifier("global"),e),b.objectExpression([])))])),t(r),i}function a(e,t){var r=[];return r.push(b.variableDeclaration("var",[b.variableDeclarator(e,b.identifier("global"))])),t(r),b.program([v({FACTORY_PARAMETERS:b.identifier("global"),BROWSER_ARGUMENTS:b.assignmentExpression("=",b.memberExpression(b.identifier("root"),e),b.objectExpression([])),COMMON_ARGUMENTS:b.identifier("exports"),AMD_ARGUMENTS:b.arrayExpression([b.stringLiteral("exports")]),FACTORY_BODY:r,UMD_ROOT:b.identifier("this")})])}function o(e,t){var r=[];return r.push(b.variableDeclaration("var",[b.variableDeclarator(e,b.objectExpression([]))])),t(r),r.push(b.expressionStatement(e)),b.program(r)}function u(e,t,r){c.list.forEach(function(n){if(!(r&&r.indexOf(n)<0)){var i=b.identifier(n);e.push(b.expressionStatement(b.assignmentExpression("=",b.memberExpression(t,i),c.get(n))))}})}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global",r=b.identifier("babelHelpers"),n=function(t){return u(t,r,e)},i=void 0,l={global:s,umd:a,var:o}[t];if(!l)throw new Error(d.get("unsupportedOutputType",t));return i=l(r,n),(0,h.default)(i).code};var l=e("babel-helpers"),c=i(l),p=e("babel-generator"),h=n(p),f=e("babel-messages"),d=i(f),m=e("babel-template"),y=n(m),g=e("babel-types"),b=i(g),v=(0,y.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');t.exports=r.default},{"babel-generator":78,"babel-helpers":102,"babel-messages":103,"babel-template":132,"babel-types":169}],40:[function(e,t,r){(function(t){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.File=void 0;var s=e("babel-runtime/core-js/get-iterator"),a=i(s),o=e("babel-runtime/core-js/object/create"),u=i(o),l=e("babel-runtime/core-js/object/assign"),c=i(l),p=e("babel-runtime/helpers/classCallCheck"),h=i(p),f=e("babel-runtime/helpers/possibleConstructorReturn"),d=i(f),m=e("babel-runtime/helpers/inherits"),y=i(m),g=e("babel-helpers"),b=i(g),v=e("./metadata"),x=n(v),E=e("convert-source-map"),A=i(E),D=e("./options/option-manager"),C=i(D),S=e("../plugin-pass"),_=i(S),w=e("babel-traverse"),k=i(w),F=e("source-map"),T=i(F),P=e("babel-generator"),B=i(P),O=e("babel-code-frame"),j=i(O),N=e("lodash/defaults"),I=i(N),L=e("./logger"),M=i(L),R=e("../../store"),U=i(R),V=e("babylon"),q=e("../../util"),G=n(q),X=e("path"),J=i(X),W=e("babel-types"),K=n(W),z=e("../../helpers/resolve"),Y=i(z),H=e("../internal-plugins/block-hoist"),$=i(H),Q=e("../internal-plugins/shadow-functions"),Z=i(Q),ee=/^#!.*/,te=[[$.default],[Z.default]],re={enter:function(e,t){var r=e.node.loc;r&&(t.loc=r,e.stop())}},ne=function(r){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];(0,h.default)(this,n);var i=(0,d.default)(this,r.call(this));return i.pipeline=t,i.log=new M.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,c.default)((0,u.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new w.Hub(i),i}return(0,y.default)(n,r),n.prototype.getMetadata=function(){for(var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(K.isModuleDeclaration(s)){e=!0;break}}e&&this.path.traverse(x,this)},n.prototype.initOptions=function(e){e=new C.default(this.log,this.pipeline).init(e),e.inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=J.default.basename(e.filename,J.default.extname(e.filename)),e.ignore=G.arrayify(e.ignore,G.regexify),e.only&&(e.only=G.arrayify(e.only,G.regexify)),(0,I.default)(e,{moduleRoot:e.sourceRoot}),(0,I.default)(e,{sourceRoot:e.moduleRoot}),(0,I.default)(e,{filenameRelative:e.filename});var t=J.default.basename(e.filenameRelative);return(0,I.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){for(var t=e.plugins.concat(te),r=[],n=[],i=t,s=Array.isArray(i),o=0,i=s?i:(0,a.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u,c=l[0],p=l[1];r.push(c.visitor),n.push(new _.default(this,c,p)),c.manipulateOptions&&c.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(r),this.pluginPasses.push(n)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(K.importNamespaceSpecifier(i)):"default"===t?s.push(K.importDefaultSpecifier(i)):s.push(K.importSpecifier(i,K.identifier(t)));var a=K.importDeclaration(s,K.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return K.memberExpression(n,K.identifier(e));var s=(0,b.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return K.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=K.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,k.default)(e,re,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(t){var r=new T.default.SourceMapConsumer(t),n=new T.default.SourceMapConsumer(e),i=new T.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,t}return e},n.prototype.parse=function(r){var n=V.parse,i=this.opts.parserOpts;if(i&&(i=(0,c.default)({},this.parserOpts,i),i.parser)){if("string"==typeof i.parser){var s=J.default.dirname(this.opts.filename)||t.cwd(),a=(0,Y.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=e(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,V.parse)(e,i)}}}this.log.debug("Parse start");var o=n(r,i||this.parserOpts);return this.log.debug("Parse stop"),o},n.prototype._addAst=function(e){this.path=w.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s,u=o.plugin,l=u[e];l&&l.call(o,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(!1!==t.inputSourceMap){var r=A.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=A.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=ee.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(ee,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var r=this.opts,n=this.ast,i={ast:n};if(!r.code)return this.makeResult(i);var s=B.default;if(r.generatorOpts.generator&&"string"==typeof(s=r.generatorOpts.generator)){var a=J.default.dirname(this.opts.filename)||t.cwd(),o=(0,Y.default)(s,a);if(!o)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=e(o).print}this.log.debug("Generation start");var u=s(n,r.generatorOpts?(0,c.default)(r,r.generatorOpts):r,this.code);return i.code=u.code,i.map=u.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==r.sourceMaps&&"both"!==r.sourceMaps||(i.code+="\n"+A.default.fromObject(i.map).toComment()),"inline"===r.sourceMaps&&(i.map=null),this.makeResult(i)},n}(U.default);r.default=ne,r.File=ne}).call(this,e("_process"))},{"../../helpers/resolve":37,"../../store":38,"../../util":54,"../internal-plugins/block-hoist":49,"../internal-plugins/shadow-functions":50,"../plugin-pass":52,"./logger":41,"./metadata":42,"./options/option-manager":46,_process:539,"babel-code-frame":23,"babel-generator":78,"babel-helpers":102,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/assign":117,"babel-runtime/core-js/object/create":118,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"babel-traverse":136,"babel-types":169,babylon:177,"convert-source-map":187,"lodash/defaults":484,path:535,"source-map":65}],41:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("debug/node"),o=n(a),u=(0,o.default)("babel:verbose"),l=(0,o.default)("babel"),c=[],p=function(){function e(t,r){(0,s.default)(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){throw new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error)(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),c.indexOf(e)>=0||(c.push(e),console.error(e)))},e.prototype.verbose=function(e){u.enabled&&u(this._buildMessage(e))},e.prototype.debug=function(e){l.enabled&&l(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();r.default=p,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127,"debug/node":295}],42:[function(e,t,r){"use strict";function n(e,t){var r=e.node,n=r.source?r.source.value:null,i=t.metadata.modules.exports,s=e.get("declaration");if(s.isStatement()){var o=s.getBindingIdentifiers();for(var l in o)i.exported.push(l),i.specifiers.push({kind:"local",local:l,exported:e.isExportDefaultDeclaration()?"default":l})}if(e.isExportNamedDeclaration()&&r.specifiers)for(var c=r.specifiers,p=Array.isArray(c),h=0,c=p?c:(0,a.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f,m=d.exported.name;i.exported.push(m),u.isExportDefaultSpecifier(d)&&i.specifiers.push({kind:"external",local:m,exported:m,source:n}),u.isExportNamespaceSpecifier(d)&&i.specifiers.push({kind:"external-namespace",exported:m,source:n});var y=d.local;y&&(n&&i.specifiers.push({kind:"external",local:y.name,exported:m,source:n}),n||i.specifiers.push({kind:"local",local:y.name,exported:m}))}e.isExportAllDeclaration()&&i.specifiers.push({kind:"external-all",source:n})}function i(e){e.skip()}r.__esModule=!0,r.ImportDeclaration=r.ModuleDeclaration=void 0;var s=e("babel-runtime/core-js/get-iterator"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);r.ExportDeclaration=n,r.Scope=i;var o=e("babel-types"),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o);r.ModuleDeclaration={enter:function(e,t){var r=e.node;r.source&&(r.source.value=t.resolveModuleSource(r.source.value))}},r.ImportDeclaration={exit:function(e,t){var r=e.node,n=[],i=[];t.metadata.modules.imports.push({source:r.source.value,imported:i,specifiers:n});for(var s=e.get("specifiers"),o=Array.isArray(s),u=0,s=o?s:(0,a.default)(s);;){var l;if(o){if(u>=s.length)break;l=s[u++]}else{if(u=s.next(),u.done)break;l=u.value}var c=l,p=c.node.local.name;if(c.isImportDefaultSpecifier()&&(i.push("default"),n.push({kind:"named",imported:"default",local:p})),c.isImportSpecifier()){var h=c.node.imported.name;i.push(h),n.push({kind:"named",imported:h,local:p})}c.isImportNamespaceSpecifier()&&(i.push("*"),n.push({kind:"namespace",local:p}))}}}},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],43:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=E[e];return null==t?E[e]=x.default.existsSync(e):t}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new D(t);return!1!==e.babelrc&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&b.default.dirname(r)}),n.configs}r.__esModule=!0;var o=e("babel-runtime/core-js/object/assign"),u=i(o),l=e("babel-runtime/helpers/classCallCheck"),c=i(l);r.default=a;var p=e("../../../helpers/resolve"),h=i(p),f=e("json5"),d=i(f),m=e("path-is-absolute"),y=i(m),g=e("path"),b=i(g),v=e("fs"),x=i(v),E={},A={},D=function(){function e(t){(0,c.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,y.default)(e)||(e=b.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=b.default.dirname(e));){if(!t){var i=b.default.join(e,".babelrc");s(i)&&(this.addConfig(i),t=!0);var a=b.default.join(e,"package.json");!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=b.default.join(e,".babelignore");s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=x.default.readFileSync(e,"utf8"),r=t.split("\n");r=r.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e}),r.length&&this.mergeConfig({options:{ignore:r},alias:e,dirname:b.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d.default;if(this.resolvedConfigs.indexOf(e)>=0)return!1;this.resolvedConfigs.push(e);var n=x.default.readFileSync(e,"utf8"),i=void 0;try{i=A[n]=A[n]||r.parse(n),t&&(i=i[t])}catch(t){throw t.message=e+": Error while parsing JSON - "+t.message,t}return this.mergeConfig({options:i,alias:e,dirname:b.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,u.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var a=(0,h.default)(t.extends,s);a?this.addConfig(a):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var o=void 0,l=n.env.BABEL_ENV||n.env.NODE_ENV||"development";t.env&&(o=t.env[l],delete t.env),this.mergeConfig({options:o,alias:r+".env."+l,dirname:s})},e}();t.exports=r.default}).call(this,e("_process"))},{"../../../helpers/resolve":37,_process:539,"babel-runtime/core-js/object/assign":117,"babel-runtime/helpers/classCallCheck":127,fs:182,json5:313,path:535,"path-is-absolute":536}],44:[function(e,t,r){"use strict";t.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc",default:"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,default:{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean",default:!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:!0},suppressDeprecationMessages:{type:"boolean",default:!1,hidden:!0},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,default:!0,type:"boolean"},metadata:{hidden:!0,default:!0,type:"boolean"},ast:{hidden:!0,default:!0,type:"boolean"},extends:{type:"string",hidden:!0},comments:{type:"boolean",default:!0,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:!0,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:!1,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:!0},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:!1,hidden:!0},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:!1},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:!1}}},{}],45:[function(e,t,r){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var n=o.default[t];if(n&&n.alias&&(n=o.default[n.alias]),n){var i=s[n.type];i&&(r=i(r)),e[t]=r}}}return e}r.__esModule=!0,r.config=void 0,r.normaliseOptions=n;var i=e("./parsers"),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(i),a=e("./config"),o=function(e){return e&&e.__esModule?e:{default:e}}(a);r.config=o.default},{"./config":44,"./parsers":47}],46:[function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var a=e("babel-runtime/helpers/objectWithoutProperties"),o=s(a),u=e("babel-runtime/core-js/json/stringify"),l=s(u),c=e("babel-runtime/core-js/object/assign"),p=s(c),h=e("babel-runtime/core-js/get-iterator"),f=s(h),d=e("babel-runtime/helpers/typeof"),m=s(d),y=e("babel-runtime/helpers/classCallCheck"),g=s(y),b=e("../../../api/node"),v=i(b),x=e("../../plugin"),E=s(x),A=e("babel-messages"),D=i(A),C=e("./index"),S=e("../../../helpers/resolve-plugin"),_=s(S),w=e("../../../helpers/resolve-preset"),k=s(w),F=e("lodash/cloneDeepWith"),T=s(F),P=e("lodash/clone"),B=s(P),O=e("../../../helpers/merge"),j=s(O),N=e("./config"),I=s(N),L=e("./removed"),M=s(L),R=e("./build-config-chain"),U=s(R),V=e("path"),q=s(V),G=function(){function t(e){(0,g.default)(this,t),this.resolvedConfigs=[],this.options=t.createBareOptions(),this.log=e}return t.memoisePluginContainer=function(e,r,n,i){for(var s=t.memoisedPlugins,a=Array.isArray(s),o=0,s=a?s:(0,f.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.container===e)return l.plugin}var c=void 0;if(c="function"==typeof e?e(v):e,"object"===(void 0===c?"undefined":(0,m.default)(c))){var p=new E.default(c,i);return t.memoisedPlugins.push({container:e,plugin:p}),p}throw new TypeError(D.get("pluginNotObject",r,n,void 0===c?"undefined":(0,m.default)(c))+r+n)},t.createBareOptions=function(){var e={};for(var t in I.default){ -var r=I.default[t];e[t]=(0,B.default)(r.default)}return e},t.normalisePlugin=function(e,r,n,i){if(!((e=e.__esModule?e.default:e)instanceof E.default)){if("function"!=typeof e&&"object"!==(void 0===e?"undefined":(0,m.default)(e)))throw new TypeError(D.get("pluginNotFunction",r,n,void 0===e?"undefined":(0,m.default)(e)));e=t.memoisePluginContainer(e,r,n,i)}return e.init(r,n),e},t.normalisePlugins=function(r,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:r+"$"+s;if("string"==typeof a){var l=(0,_.default)(a,n);if(!l)throw new ReferenceError(D.get("pluginUnknown",a,r,s,n));a=e(l)}return a=t.normalisePlugin(a,r,s,u),[a,o]})},t.prototype.mergeOptions=function(e){var r=this,i=e.options,s=e.extending,a=e.alias,o=e.loc,u=e.dirname;if(a=a||"foreign",i){("object"!==(void 0===i?"undefined":(0,m.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var l=(0,T.default)(i,function(e){if(e instanceof E.default)return e});u=u||n.cwd(),o=o||a;for(var c in l){if(!I.default[c]&&this.log)if(M.default[c])this.log.error("Using removed Babel 5 option: "+a+"."+c+" - "+M.default[c].message,ReferenceError);else{var h="Unknown option: "+a+"."+c+". Check out http://babeljs.io/docs/usage/options/ for more information about options.";this.log.error(h+"\n\nA common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.",ReferenceError)}}(0,C.normaliseOptions)(l),l.plugins&&(l.plugins=t.normalisePlugins(o,u,l.plugins)),l.presets&&(l.passPerPreset?l.presets=this.resolvePresets(l.presets,u,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:u})}):(this.mergePresets(l.presets,u),delete l.presets)),i===s?(0,p.default)(s,l):(0,j.default)(s||this.options,l)}},t.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:q.default.dirname(t||"")})})},t.prototype.resolvePresets=function(t,r,n){return t.map(function(t){var i=void 0;if(Array.isArray(t)){if(t.length>2)throw new Error("Unexpected extra options "+(0,l.default)(t.slice(2))+" passed to preset.");var s=t;t=s[0],i=s[1]}var a=void 0;try{if("string"==typeof t){if(!(a=(0,k.default)(t,r)))throw new Error("Couldn't find preset "+(0,l.default)(t)+" relative to directory "+(0,l.default)(r));t=e(a)}if("object"===(void 0===t?"undefined":(0,m.default)(t))&&t.__esModule)if(t.default)t=t.default;else{var u=t,c=(u.__esModule,(0,o.default)(u,["__esModule"]));t=c}if("object"===(void 0===t?"undefined":(0,m.default)(t))&&t.buildPreset&&(t=t.buildPreset),"function"!=typeof t&&void 0!==i)throw new Error("Options "+(0,l.default)(i)+" passed to "+(a||"a preset")+" which does not accept options.");if("function"==typeof t&&(t=t(v,i,{dirname:r})),"object"!==(void 0===t?"undefined":(0,m.default)(t)))throw new Error("Unsupported preset format: "+t+".");n&&n(t,a)}catch(e){throw a&&(e.message+=" (While processing preset: "+(0,l.default)(a)+")"),e}return t})},t.prototype.normaliseOptions=function(){var e=this.options;for(var t in I.default){var r=I.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},t.prototype.init=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,U.default)(e,this.log),r=Array.isArray(t),n=0,t=r?t:(0,f.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},t}();r.default=G,G.memoisedPlugins=[],t.exports=r.default}).call(this,e("_process"))},{"../../../api/node":29,"../../../helpers/merge":32,"../../../helpers/resolve-plugin":35,"../../../helpers/resolve-preset":36,"../../plugin":53,"./build-config-chain":43,"./config":44,"./index":45,"./removed":48,_process:539,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/object/assign":117,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/objectWithoutProperties":129,"babel-runtime/helpers/typeof":131,"lodash/clone":480,"lodash/cloneDeepWith":482,path:535}],47:[function(e,t,r){"use strict";function n(e){return!!e}function i(e){return l.booleanify(e)}function s(e){return l.list(e)}r.__esModule=!0,r.filename=void 0,r.boolean=n,r.booleanString=i,r.list=s;var a=e("slash"),o=function(e){return e&&e.__esModule?e:{default:e}}(a),u=e("../../../util"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);r.filename=o.default},{"../../../util":54,slash:589}],48:[function(e,t,r){"use strict";t.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},{}],49:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("../plugin"),s=n(i),a=e("lodash/sortBy"),o=n(a);r.default=new s.default({name:"internal.blockHoist",visitor:{Block:{exit:function(e){for(var t=e.node,r=!1,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return t.code=!1,t.mode="lint",this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new p.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new p.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.analyse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];return t.code=!1,r&&(t.plugins=t.plugins||[],t.plugins.push(new l.default({visitor:r}))),this.transform(e,t).metadata},e.prototype.transformFromAst=function(e,t,r){e=(0,o.default)(e);var n=new p.default(r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e}();r.default=h,t.exports=r.default},{"../helpers/normalize-ast":33,"./file":40,"./plugin":53,"babel-runtime/helpers/classCallCheck":127}],52:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("babel-runtime/helpers/possibleConstructorReturn"),o=n(a),u=e("babel-runtime/helpers/inherits"),l=n(u),c=e("../store"),p=n(c),h=e("./file"),f=(n(h),function(e){function t(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,s.default)(this,t);var a=(0,o.default)(this,e.call(this));return a.plugin=n,a.key=n.key,a.file=r,a.opts=i,a}return(0,l.default)(t,e),t.prototype.addHelper=function(){var e;return(e=this.file).addHelper.apply(e,arguments)},t.prototype.addImport=function(){var e;return(e=this.file).addImport.apply(e,arguments)},t.prototype.getModuleName=function(){var e;return(e=this.file).getModuleName.apply(e,arguments)},t.prototype.buildCodeFrameError=function(){var e;return(e=this.file).buildCodeFrameError.apply(e,arguments)},t}(p.default));r.default=f,t.exports=r.default},{"../store":38,"./file":40,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130}],53:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/get-iterator"),s=n(i),a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-runtime/helpers/possibleConstructorReturn"),l=n(u),c=e("babel-runtime/helpers/inherits"),p=n(c),h=e("./file/options/option-manager"),f=n(h),d=e("babel-messages"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d),y=e("../store"),g=n(y),b=e("babel-traverse"),v=n(b),x=e("lodash/assign"),E=n(x),A=e("lodash/clone"),D=n(A),C=["enter","exit"],S=function(e){function t(r,n){(0,o.default)(this,t);var i=(0,l.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,E.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,D.default)(i.take("visitor"))||{}),i}return(0,p.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),i=0;i=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(c){var p=c.apply(this,n);null!=p&&(e=p)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=f.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=v.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(m.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=C,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}if(e[i])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return v.default.explode(e),e},t}(g.default);r.default=S,t.exports=r.default},{"../store":38,"./file/options/option-manager":46,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"babel-traverse":136,"lodash/assign":477,"lodash/clone":480}],54:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=t||i.EXTENSIONS,n=S.default.extname(e);return(0,E.default)(r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(m.default).join("|"),"i")),"string"==typeof e){e=(0,w.default)(e),((0,g.default)(e,"./")||(0,g.default)(e,"*/"))&&(e=e.slice(2)),(0,g.default)(e,"**/")&&(e=e.slice(3));var t=v.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,D.default)(e))return e;throw new TypeError("illegal type for regexify")}function o(e,t){return e?"boolean"==typeof e?o([e],t):"string"==typeof e?o(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function u(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];if(e=e.replace(/\\/g,"/"),r){for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,h.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}if(c(a,e))return!1}return!0}if(t.length)for(var o=t,u=Array.isArray(o),l=0,o=u?o:(0,h.default)(o);;){var p;if(u){if(l>=o.length)break;p=o[l++]}else{if(l=o.next(),l.done)break;p=l.value}var f=p;if(c(f,e))return!0}return!1}function c(e,t){return"function"==typeof e?e(t):e.test(t)}r.__esModule=!0,r.inspect=r.inherits=void 0;var p=e("babel-runtime/core-js/get-iterator"),h=n(p),f=e("util");Object.defineProperty(r,"inherits",{enumerable:!0,get:function(){return f.inherits}}),Object.defineProperty(r,"inspect",{enumerable:!0,get:function(){return f.inspect}}),r.canCompile=i,r.list=s,r.regexify=a,r.arrayify=o,r.booleanify=u,r.shouldIgnore=l;var d=e("lodash/escapeRegExp"),m=n(d),y=e("lodash/startsWith"),g=n(y),b=e("minimatch"),v=n(b),x=e("lodash/includes"),E=n(x),A=e("lodash/isRegExp"),D=n(A),C=e("path"),S=n(C),_=e("slash"),w=n(_);i.EXTENSIONS=[".js",".jsx",".es6",".es"]},{"babel-runtime/core-js/get-iterator":113,"lodash/escapeRegExp":486,"lodash/includes":496,"lodash/isRegExp":508,"lodash/startsWith":521,minimatch:531,path:535,slash:589,util:601}],55:[function(e,t,r){function n(){this._array=[],this._set=Object.create(null)}var i=e("./util"),s=Object.prototype.hasOwnProperty;n.fromArray=function(e,t){for(var r=new n,i=0,s=e.length;i=0&&e>1;return t?-r:r}var s=e("./base64");r.encode=function(e){var t,r="",i=n(e);do{t=31&i,i>>>=5,i>0&&(t|=32),r+=s.encode(t)}while(i>0);return r},r.decode=function(e,t,r){var n,a,o=e.length,u=0,l=0;do{if(t>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=s.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&a),a&=31,u+=a<0?t-u>1?n(u,t,i,s,a,o):o==r.LEAST_UPPER_BOUND?t1?n(e,u,i,s,a,o):o==r.LEAST_UPPER_BOUND?u:e<0?-1:e}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(e,t,i,s){if(0===t.length)return-1;var a=n(-1,t.length,e,t,i,s||r.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(t[a],t[a-1],!0);)--a;return a}},{}],59:[function(e,t,r){function n(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=i||s.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var s=e("./util");i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=i},{"./util":64}],60:[function(e,t,r){function n(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t){return Math.round(e+Math.random()*(t-e))}function s(e,t,r,a){if(r=0){var s=this._originalMappings[i];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return n},r.SourceMapConsumer=n,i.prototype=Object.create(n.prototype),i.prototype.consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),n=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],c=t.__originalMappings=[],h=0,f=a.length;h1&&(r.source=m+i[1],m+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),"number"==typeof r.originalLine&&E.push(r)}p(A,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,p(E,o.compareByOriginalPositions),this.__originalMappings=E},i.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};t=this._sources.indexOf(t);var r={source:t,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=i,a.prototype=Object.create(n.prototype),a.prototype.constructor=n,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var e=[],t=0;t0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,o=1,u=0,l=0,c=0,p=0,h="",f=this._mappings.toArray(),d=0,m=f.length;d0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=i.encode(n-p),p=n,e+=i.encode(t.originalLine-1-l),l=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=i.encode(r-c),c=r)),h+=e}return h},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var r=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=n},{"./array-set":55,"./base64-vlq":56,"./mapping-list":59,"./util":64}],63:[function(e,t,r){function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[a]=!0,null!=n&&this.add(n)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),a="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)a.add(t);else{var i=r?s.join(r,e.source):e.source;a.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var a=new n,o=e.split(/(\r?\n)/),u=function(){return o.shift()+(o.shift()||"")},l=1,c=0,p=null;return t.eachMapping(function(e){if(null!==p){if(!(l0&&(p&&i(p,u()),a.add(o.join(""))),t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=s.join(r,e)),a.setSourceContent(e,n))}),a},n.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},n.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r=0;c--)a=u[c],"."===a?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return t=u.join("/"),""===t&&(t=o?"/":"."),n?(n.path=t,s(n)):t}function o(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),n=i(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),s(r);if(r||t.match(b))return t;if(n&&!n.host&&!n.path)return n.host=t,s(n);var o="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,s(n)):o}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if(e=e.slice(0,n),e.match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}function l(e){return e}function c(e){return h(e)?"$"+e:e}function p(e){return h(e)?e.slice(1):e}function h(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function f(e,t,r){var n=e.source-t.source;return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:(n=e.generatedLine-t.generatedLine,0!==n?n:e.name-t.name)}function d(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=e.source-t.source)?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:e.name-t.name)}function m(e,t){return e===t?0:e>t?1:-1}function y(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=m(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:m(e.name,t.name))}r.getArg=n;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,b=/^data:.+\,.+$/;r.urlParse=i,r.urlGenerate=s,r.normalize=a,r.join=o,r.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(g)},r.relative=u;var v=function(){return!("__proto__"in Object.create(null))}();r.toSetString=v?l:c,r.fromSetString=v?l:p,r.compareByOriginalPositions=f,r.compareByGeneratedPositionsDeflated=d,r.compareByGeneratedPositionsInflated=y},{}],65:[function(e,t,r){r.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":61,"./lib/source-map-generator":62,"./lib/source-node":63}],66:[function(e,t,r){t.exports={_args:[[{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},"/Users/evgenypoberezkin/JSON/ajv-v4/node_modules/regenerator"]],_from:"babel-core@>=6.18.2 <7.0.0",_id:"babel-core@6.24.0",_inCache:!0,_location:"/babel-core",_nodeVersion:"6.9.0",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/babel-core-6.24.0.tgz_1489371490272_0.8722315817140043"},_npmUser:{name:"hzoo",email:"hi@henryzoo.com"},_npmVersion:"3.10.10",_phantomChildren:{},_requested:{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},_requiredBy:["/babel-register","/regenerator"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.24.0.tgz",_shasum:"8f36a0a77f5c155aed6f920b844d23ba56742a02",_shrinkwrap:null,_spec:"babel-core@^6.18.2",_where:"/Users/evgenypoberezkin/JSON/ajv-v4/node_modules/regenerator",author:{name:"Sebastian McKenzie",email:"sebmck@gmail.com"},dependencies:{"babel-code-frame":"^6.22.0","babel-generator":"^6.24.0","babel-helpers":"^6.23.0","babel-messages":"^6.23.0","babel-register":"^6.24.0","babel-runtime":"^6.22.0","babel-template":"^6.23.0","babel-traverse":"^6.23.1","babel-types":"^6.23.0",babylon:"^6.11.0","convert-source-map":"^1.1.0",debug:"^2.1.1",json5:"^0.5.0",lodash:"^4.2.0",minimatch:"^3.0.2","path-is-absolute":"^1.0.0",private:"^0.1.6",slash:"^1.0.0","source-map":"^0.5.0"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.22.0","babel-helper-transform-fixture-test-runner":"^6.24.0","babel-polyfill":"^6.23.0"},directories:{},dist:{shasum:"8f36a0a77f5c155aed6f920b844d23ba56742a02",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.24.0.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],license:"MIT",maintainers:[{name:"amasad",email:"amjad.masad@gmail.com"},{name:"hzoo",email:"hi@henryzoo.com"},{name:"jmm",email:"npm-public@jessemccarthy.net"},{name:"loganfsmyth",email:"loganfsmyth@gmail.com"},{name:"sebmck",email:"sebmck@gmail.com"},{name:"thejameskyle",email:"me@thejameskyle.com"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.24.0"}},{}],67:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("trim-right"),o=n(a),u=/^[ \t]+$/,l=function(){function e(t){(0,s.default)(this,e),this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._map=t}return e.prototype.get=function(){this._flush();var e=this._map,t={code:(0,o.default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get:function(){return this.map=e.get()},set:function(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t},e.prototype.append=function(e){this._flush();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._append(e,r,n,s,i)},e.prototype.queue=function(e){if("\n"===e)for(;this._queue.length>0&&u.test(this._queue[0][0]);)this._queue.shift();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._queue.unshift([e,r,n,s,i])},e.prototype._flush=function(){for(var e=void 0;e=this._queue.pop();)this._append.apply(this,e)},e.prototype._append=function(e,t,r,n,i){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i),this._buf.push(e),this._last=e[e.length-1];for(var s=0;s0&&"\n"===this._queue[0][0]&&this._queue.shift()},e.prototype.removeLastSemicolon=function(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()},e.prototype.endsWith=function(e){if(1===e.length){var t=void 0;if(this._queue.length>0){var r=this._queue[0][0];t=r[r.length-1]}else t=this._last;return t===e}var n=this._last+this._queue.reduce(function(e,t){return t[0]+e},"");return e.length<=n.length&&n.slice(-e.length)===e},e.prototype.hasContent=function(){return this._queue.length>0||!!this._last},e.prototype.source=function(e,t){if(!e||t){var r=t?t[e]:null;this._sourcePosition.identifierName=t&&t.identifierName||null,this._sourcePosition.line=r?r.line:null,this._sourcePosition.column=r?r.column:null,this._sourcePosition.filename=t&&t.filename||null}},e.prototype.withSource=function(e,t,r){if(!this._map)return r();var n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,a=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=a},e.prototype.getCurrentColumn=function(){var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t},e.prototype.getCurrentLine=function(){for(var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=0,r=0;r")),this.space(),this.print(e.returnType,e)}function g(e){this.print(e.name,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.typeAnnotation,e)}function b(e){this.print(e.id,e),this.print(e.typeParameters,e)}function v(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e)),this.space(),this.print(e.body,e)}function x(e){"plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")}function E(e){this.word("interface"),this.space(),this._interfaceish(e)}function A(){this.space(),this.token("&"),this.space()}function D(e){this.printJoin(e.types,e,{separator:A})}function C(){this.word("mixed")}function S(){this.word("empty")}function _(e){this.token("?"),this.print(e.typeAnnotation,e)}function w(){this.word("number")}function k(){this.word("string")}function F(){this.word("this")}function T(e){this.token("["),this.printList(e.types,e),this.token("]")}function P(e){this.word("typeof"),this.space(),this.print(e.argument,e)}function B(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()}function O(e){this.token(":"),this.space(),e.optional&&this.token("?"),this.print(e.typeAnnotation,e)}function j(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))}function N(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")}function I(e){var t=this;e.exact?this.token("{|"):this.token("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),this.printJoin(r,e,{addNewlines:function(e){if(e&&!r[0])return 1},indent:!0,statement:!0,iterator:function(){1!==r.length&&(t.format.flowCommaSeparator?t.token(","):t.semicolon(),t.space())}}),this.space()),e.exact?this.token("|}"):this.token("}")}function L(e){e.static&&(this.word("static"),this.space()),this.print(e.value,e)}function M(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.token("["),this.print(e.id,e),this.token(":"),this.space(),this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)}function R(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.value,e)}function U(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)}function V(){this.space(),this.token("|"),this.space()}function q(e){this.printJoin(e.types,e,{separator:V})}function G(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")}function X(){this.word("void")}r.__esModule=!0,r.AnyTypeAnnotation=n,r.ArrayTypeAnnotation=i,r.BooleanTypeAnnotation=s,r.BooleanLiteralTypeAnnotation=a,r.NullLiteralTypeAnnotation=o,r.DeclareClass=u,r.DeclareFunction=l,r.DeclareInterface=c,r.DeclareModule=p,r.DeclareModuleExports=h,r.DeclareTypeAlias=f,r.DeclareVariable=d,r.ExistentialTypeParam=m,r.FunctionTypeAnnotation=y,r.FunctionTypeParam=g,r.InterfaceExtends=b,r._interfaceish=v,r._variance=x,r.InterfaceDeclaration=E,r.IntersectionTypeAnnotation=D,r.MixedTypeAnnotation=C,r.EmptyTypeAnnotation=S,r.NullableTypeAnnotation=_;var J=e("./types");Object.defineProperty(r,"NumericLiteralTypeAnnotation",{enumerable:!0,get:function(){return J.NumericLiteral}}),Object.defineProperty(r,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return J.StringLiteral}}),r.NumberTypeAnnotation=w,r.StringTypeAnnotation=k,r.ThisTypeAnnotation=F,r.TupleTypeAnnotation=T,r.TypeofTypeAnnotation=P,r.TypeAlias=B,r.TypeAnnotation=O,r.TypeParameter=j,r.TypeParameterInstantiation=N,r.ObjectTypeAnnotation=I,r.ObjectTypeCallProperty=L,r.ObjectTypeIndexer=M,r.ObjectTypeProperty=R,r.QualifiedTypeIdentifier=U,r.UnionTypeAnnotation=q,r.TypeCastExpression=G,r.VoidTypeAnnotation=X,r.ClassImplements=b,r.GenericTypeAnnotation=b,r.TypeParameterDeclaration=N},{"./types":77}],72:[function(e,t,r){"use strict";function n(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))}function i(e){this.word(e.name)}function s(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)}function a(e){this.print(e.object,e),this.token("."),this.print(e.property,e)}function o(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")}function u(e){this.token("{"),this.print(e.expression,e),this.token("}")}function l(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")}function c(e){this.token(e.value)}function p(e){var t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();for(var r=e.children,n=Array.isArray(r),i=0,r=n?r:(0,g.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;this.print(a,e)}this.dedent(),this.print(e.closingElement,e)}}function h(){this.space()}function f(e){this.token("<"),this.print(e.name,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:h})),e.selfClosing?(this.space(),this.token("/>")):this.token(">")}function d(e){this.token("")}function m(){}r.__esModule=!0;var y=e("babel-runtime/core-js/get-iterator"),g=function(e){return e&&e.__esModule?e:{default:e}}(y);r.JSXAttribute=n,r.JSXIdentifier=i,r.JSXNamespacedName=s,r.JSXMemberExpression=a,r.JSXSpreadAttribute=o,r.JSXExpressionContainer=u,r.JSXSpreadChild=l,r.JSXText=c,r.JSXElement=p,r.JSXOpeningElement=f,r.JSXClosingElement=d,r.JSXEmptyExpression=m},{"babel-runtime/core-js/get-iterator":113}],73:[function(e,t,r){"use strict";function n(e){var t=this;this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e,{iterator:function(e){e.optional&&t.token("?"),t.print(e.typeAnnotation,e)}}),this.token(")"),e.returnType&&this.print(e.returnType,e)}function i(e){var t=e.kind,r=e.key;"method"!==t&&"init"!==t||e.generator&&this.token("*"),"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async"),this.space()),e.computed?(this.token("["),this.print(r,e),this.token("]")):this.print(r,e),this._params(e),this.space(),this.print(e.body,e)}function s(e){e.async&&(this.word("async"),this.space()),this.word("function"),e.generator&&this.token("*"),e.id?(this.space(),this.print(e.id,e)):this.space(),this._params(e),this.space(),this.print(e.body,e)}function a(e){e.async&&(this.word("async"),this.space());var t=e.params[0];1===e.params.length&&l.isIdentifier(t)&&!o(e,t)?this.print(t,e):this._params(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)}function o(e,t){return e.typeParameters||e.returnType||t.typeAnnotation||t.optional||t.trailingComments}r.__esModule=!0,r.FunctionDeclaration=void 0,r._params=n,r._method=i,r.FunctionExpression=s,r.ArrowFunctionExpression=a;var u=e("babel-types"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);r.FunctionDeclaration=s},{"babel-types":169}],74:[function(e,t,r){"use strict";function n(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))}function i(e){this.print(e.local,e)}function s(e){this.print(e.exported,e)}function a(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))}function o(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)}function u(e){this.word("export"),this.space(),this.token("*"),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()}function l(){this.word("export"),this.space(),p.apply(this,arguments)}function c(){this.word("export"),this.space(),this.word("default"),this.space(),p.apply(this,arguments)}function p(e){if(e.declaration){var t=e.declaration;this.print(t,e),m.isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r=e.specifiers.slice(0),n=!1;;){var i=r[0];if(!m.isExportDefaultSpecifier(i)&&!m.isExportNamespaceSpecifier(i))break;n=!0,this.print(r.shift(),e),r.length&&(this.token(","),this.space())}(r.length||!r.length&&!n)&&(this.token("{"),r.length&&(this.space(),this.printList(r,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}function h(e){this.word("import"),this.space(),"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());var t=e.specifiers.slice(0);if(t&&t.length){for(;;){var r=t[0];if(!m.isImportDefaultSpecifier(r)&&!m.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()}function f(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)}r.__esModule=!0,r.ImportSpecifier=n,r.ImportDefaultSpecifier=i,r.ExportDefaultSpecifier=s,r.ExportSpecifier=a, -r.ExportNamespaceSpecifier=o,r.ExportAllDeclaration=u,r.ExportNamedDeclaration=l,r.ExportDefaultDeclaration=c,r.ImportDeclaration=h,r.ImportNamespaceSpecifier=f;var d=e("babel-types"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d)},{"babel-types":169}],75:[function(e,t,r){"use strict";function n(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)}function i(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();var t=e.alternate&&D.isIfStatement(s(e.consequent));t&&(this.token("{"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}")),e.alternate&&(this.endsWith("}")&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))}function s(e){return D.isStatement(e.body)?s(e.body):e}function a(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e)),this.token(";"),e.update&&(this.space(),this.print(e.update,e)),this.token(")"),this.printBlock(e)}function o(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)}function u(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";return function(r){this.word(e);var n=r[t];if(n){this.space();var i=this.startTerminatorless();this.print(n,r),this.endTerminatorless(i)}this.semicolon()}}function c(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)}function p(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))}function h(e){this.word("catch"),this.space(),this.token("("),this.print(e.param,e),this.token(")"),this.space(),this.print(e.body,e)}function f(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines:function(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token("}")}function d(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))}function m(){this.word("debugger"),this.semicolon()}function y(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<4;e++)this.space(!0)}function g(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<6;e++)this.space(!0)}function b(e,t){this.word(e.kind),this.space();var r=!1;if(!D.isFor(t))for(var n=e.declarations,i=Array.isArray(n),s=0,n=i?n:(0,E.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;o.init&&(r=!0)}var u=void 0;r&&(u="const"===e.kind?g:y),this.printList(e.declarations,e,{separator:u}),(!D.isFor(t)||t.left!==e&&t.init!==e)&&this.semicolon()}function v(e){this.print(e.id,e),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))}r.__esModule=!0,r.ThrowStatement=r.BreakStatement=r.ReturnStatement=r.ContinueStatement=r.ForAwaitStatement=r.ForOfStatement=r.ForInStatement=void 0;var x=e("babel-runtime/core-js/get-iterator"),E=function(e){return e&&e.__esModule?e:{default:e}}(x);r.WithStatement=n,r.IfStatement=i,r.ForStatement=a,r.WhileStatement=o,r.DoWhileStatement=u,r.LabeledStatement=c,r.TryStatement=p,r.CatchClause=h,r.SwitchStatement=f,r.SwitchCase=d,r.DebuggerStatement=m,r.VariableDeclaration=b,r.VariableDeclarator=v;var A=e("babel-types"),D=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(A),C=function(e){return function(t){this.word("for"),this.space(),"await"===e&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word("await"===e?"of":e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}};r.ForInStatement=C("in"),r.ForOfStatement=C("of"),r.ForAwaitStatement=C("await"),r.ContinueStatement=l("continue"),r.ReturnStatement=l("return","argument"),r.BreakStatement=l("break"),r.ThrowStatement=l("throw","argument")},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],76:[function(e,t,r){"use strict";function n(e){this.print(e.tag,e),this.print(e.quasi,e)}function i(e,t){var r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");this.token(i)}function s(e){for(var t=e.quasis,r=0;r0&&this.space(),this.print(i,e),n=0||e.indexOf("@preserve")>=0},"auto"===a.compact&&(a.compact=e.length>5e5,a.compact&&console.error("[BABEL] "+g.get("codeGeneratorDeopt",t.filename,"500KB"))),a.compact&&(a.indent.adjustMultilineComment=!1),a}function s(e,t){if(!e)return"double";for(var r={single:0,double:0},n=0,i=0;i=3)break}}return r.single>r.double?"single":"double"}r.__esModule=!0,r.CodeGenerator=void 0;var a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-runtime/helpers/possibleConstructorReturn"),l=n(u),c=e("babel-runtime/helpers/inherits"),p=n(c);r.default=function(e,t,r){return new x(e,t,r).generate()};var h=e("detect-indent"),f=n(h),d=e("./source-map"),m=n(d),y=e("babel-messages"),g=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(y),b=e("./printer"),v=n(b),x=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments[2];(0,o.default)(this,t);var a=r.tokens||[],u=i(s,n,a),c=n.sourceMaps?new m.default(n,s):null,p=(0,l.default)(this,e.call(this,u,c,a));return p.ast=r,p}return(0,p.default)(t,e),t.prototype.generate=function(){return e.prototype.generate.call(this,this.ast)},t}(v.default);r.CodeGenerator=function(){function e(t,r,n){(0,o.default)(this,e),this._generator=new x(t,r,n)}return e.prototype.generate=function(){return this._generator.generate()},e}()},{"./printer":82,"./source-map":83,"babel-messages":103,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"detect-indent":299}],79:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){function t(e,t){var n=r[e];r[e]=n?function(e,r,i){var s=n(e,r,i);return null==s?t(e,r,i):s}:t}for(var r={},n=(0,m.default)(e),i=Array.isArray(n),s=0,n=i?n:(0,f.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a,u=E.FLIPPED_ALIAS_KEYS[o];if(u)for(var l=u,c=Array.isArray(l),p=0,l=c?l:(0,f.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}var d=h;t(d,e[o])}else t(o,e[o])}return r}function a(e,t,r,n){var i=e[t.type];return i?i(t,r,n):null}function o(e){return!!E.isCallExpression(e)||!!E.isMemberExpression(e)&&(o(e.object)||!e.computed&&o(e.property))}function u(e,t,r){if(!e)return 0;E.isExpressionStatement(e)&&(e=e.expression);var n=a(D,e,t);if(!n){var i=a(C,e,t);if(i)for(var s=0;ss)return!0}return!1}function u(e,t){return"in"===e.operator&&(v.isVariableDeclarator(t)||v.isFor(t))}function l(e,t){return!(v.isForStatement(t)||v.isThrowStatement(t)||v.isReturnStatement(t)||v.isIfStatement(t)&&t.test===e||v.isWhileStatement(t)&&t.test===e||v.isForInStatement(t)&&t.right===e||v.isSwitchStatement(t)&&t.discriminant===e||v.isExpressionStatement(t)&&t.expression===e)}function c(e,t){return v.isBinary(t)||v.isUnaryLike(t)||v.isCallExpression(t)||v.isMemberExpression(t)||v.isNewExpression(t)||v.isConditionalExpression(t)&&e===t.test}function p(e,t,r){return g(r,{considerDefaultExports:!0})}function h(e,t){return v.isMemberExpression(t,{object:e})||v.isCallExpression(t,{callee:e})||v.isNewExpression(t,{callee:e})}function f(e,t,r){return g(r,{considerDefaultExports:!0})}function d(e,t){return!!(v.isExportDeclaration(t)||v.isBinaryExpression(t)||v.isLogicalExpression(t)||v.isUnaryExpression(t)||v.isTaggedTemplateExpression(t))||h(e,t)}function m(e,t){return!!(v.isUnaryLike(t)||v.isBinary(t)||v.isConditionalExpression(t,{test:e})||v.isAwaitExpression(t))||h(e,t)}function y(e){return!!v.isObjectPattern(e.left)||m.apply(void 0,arguments)}function g(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.considerArrow,n=void 0!==r&&r,i=t.considerDefaultExports,s=void 0!==i&&i,a=e.length-1,o=e[a];a--;for(var u=e[a];a>0;){if(v.isExpressionStatement(u,{expression:o})||v.isTaggedTemplateExpression(u)||s&&v.isExportDefaultDeclaration(u,{declaration:o})||n&&v.isArrowFunctionExpression(u,{body:o}))return!0;if(!(v.isCallExpression(u,{callee:o})||v.isSequenceExpression(u)&&u.expressions[0]===o||v.isMemberExpression(u,{object:o})||v.isConditional(u,{test:o})||v.isBinary(u,{left:o})||v.isAssignmentExpression(u,{left:o})))return!1;o=u,a--,u=e[a]}return!1}r.__esModule=!0,r.AwaitExpression=r.FunctionTypeAnnotation=void 0,r.NullableTypeAnnotation=n,r.UpdateExpression=i,r.ObjectExpression=s,r.DoExpression=a,r.Binary=o,r.BinaryExpression=u,r.SequenceExpression=l,r.YieldExpression=c,r.ClassExpression=p,r.UnaryLike=h,r.FunctionExpression=f,r.ArrowFunctionExpression=d,r.ConditionalExpression=m,r.AssignmentExpression=y;var b=e("babel-types"),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(b),x={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};r.FunctionTypeAnnotation=n,r.AwaitExpression=c},{"babel-types":169}],81:[function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l.isMemberExpression(e)?(n(e.object,t),e.computed&&n(e.property,t)):l.isBinary(e)||l.isAssignmentExpression(e)?(n(e.left,t),n(e.right,t)):l.isCallExpression(e)?(t.hasCall=!0,n(e.callee,t)):l.isFunction(e)?t.hasFunction=!0:l.isIdentifier(e)&&(t.hasHelper=t.hasHelper||i(e.callee)),t}function i(e){return l.isMemberExpression(e)?i(e.object)||i(e.property):l.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:l.isCallExpression(e)?i(e.callee):!(!l.isBinary(e)&&!l.isAssignmentExpression(e))&&(l.isIdentifier(e.left)&&i(e.left)||i(e.right))}function s(e){return l.isLiteral(e)||l.isObjectExpression(e)||l.isArrayExpression(e)||l.isIdentifier(e)||l.isMemberExpression(e)}var a=e("lodash/map"),o=function(e){return e&&e.__esModule?e:{default:e}}(a),u=e("babel-types"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u);r.nodes={AssignmentExpression:function(e){var t=n(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){if(l.isFunction(e.left)||l.isFunction(e.right))return{after:!0}},Literal:function(e){if("use strict"===e.value)return{after:!0}},CallExpression:function(e){if(l.isFunction(e.callee)||i(e))return{before:!0,after:!0}},VariableDeclaration:function(e){for(var t=0;t0?new F.default(n):null}return e.prototype.generate=function(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()},e.prototype.indent=function(){this.format.compact||this.format.concise||this._indent++},e.prototype.dedent=function(){this.format.compact||this.format.concise||this._indent--},e.prototype.semicolon=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._maybeAddAuxComment(),this._append(";",!e)},e.prototype.rightBrace=function(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")},e.prototype.space=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()},e.prototype.word=function(e){this._endsWithWord&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0},e.prototype.number=function(e){this.word(e),this._endsWithInteger=(0,E.default)(+e)&&!j.test(e)&&!B.test(e)&&!O.test(e)&&"."!==e[e.length-1]},e.prototype.token=function(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)},e.prototype.newline=function(e){if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(var t=0;t1&&void 0!==arguments[1]&&arguments[1];this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1},e.prototype._maybeIndent=function(e){this._indent&&this.endsWith("\n")&&"\n"!==e[0]&&this._buf.queue(this._getIndent())},e.prototype._maybeAddParen=function(e){var t=this._parenPushNewlineState;if(t){this._parenPushNewlineState=null;var r=void 0;for(r=0;r2&&void 0!==arguments[2]?arguments[2]:{};if(e&&e.length){r.indent&&this.indent();for(var n={addNewlines:r.addNewlines},i=0;i1&&void 0!==arguments[1])||arguments[1];e.innerComments&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())},e.prototype.printSequence=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.statement=!0,this.printJoin(e,t,r)},e.prototype.printList=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r.separator&&(r.separator=s),this.printJoin(e,t,r)},e.prototype._printNewline=function(e,t,r,n){var i=this;if(!this.format.retainLines&&!this.format.compact){if(this.format.concise)return void this.space();var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,g.default)(a,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,v.default)(u,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,n.addNewlines&&(s+=n.addNewlines(e,t)||0);var c=w.needsWhitespaceAfter;e&&(c=w.needsWhitespaceBefore),c(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var n=e.loc&&e.loc.start.column;if(n){var i=new RegExp("\\n\\s{1,"+n+"}","g");r=r.replace(i,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,D.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,l.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this._printComment(s)}},e}();r.default=N;for(var I=[e("./generators/template-literals"),e("./generators/expressions"),e("./generators/statements"),e("./generators/classes"),e("./generators/methods"),e("./generators/modules"),e("./generators/types"),e("./generators/flow"),e("./generators/base"),e("./generators/jsx")],L=0;L=0){for(;i&&e.start===n[i-1].start;)--i;t=n[i-1],r=n[i]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.end-e.end},0,n.length);if(i>=0){for(;i&&e.end===n[i-1].end;)--i;t=n[i],r=n[i+1],","===r.type.label&&(r=n[i+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,s=r;s=r)return-1;var n=t+r>>>1,i=e(this.tokens[n]);return i<0?this._findToken(e,n+1,r):i>0?this._findToken(e,t,n):0===i?n:-1},e}();r.default=s,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],85:[function(e,t,r){arguments[4][55][0].apply(r,arguments)},{"./util":94,dup:55}],86:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{"./base64":87,dup:56}],87:[function(e,t,r){arguments[4][57][0].apply(r,arguments)},{dup:57}],88:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{dup:58}],89:[function(e,t,r){arguments[4][59][0].apply(r,arguments)},{"./util":94,dup:59}],90:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60}],91:[function(e,t,r){arguments[4][61][0].apply(r,arguments)},{"./array-set":85,"./base64-vlq":86,"./binary-search":88,"./quick-sort":90,"./util":94,dup:61}],92:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./array-set":85,"./base64-vlq":86,"./mapping-list":89,"./util":94,dup:62}],93:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./source-map-generator":92,"./util":94,dup:63}],94:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],95:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{"./lib/source-map-consumer":91,"./lib/source-map-generator":92,"./lib/source-node":93,dup:65}],96:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return!g.isClassMethod(e)&&!g.isObjectMethod(e)||"get"!==e.kind&&"set"!==e.kind?"value":e.kind}function s(e,t,r,n,s){var a=g.toKeyAlias(t),o={};if((0,m.default)(e,a)&&(o=e[a]),e[a]=o,o._inherits=o._inherits||[],o._inherits.push(t),o._key=t.key,t.computed&&(o._computed=!0),t.decorators){var u=o.decorators=o.decorators||g.arrayExpression([]);u.elements=u.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(o.value||o.initializer)throw n.buildCodeFrameError(t,"Key conflict with sibling node");var l=void 0,c=void 0;(g.isObjectProperty(t)||g.isObjectMethod(t)||g.isClassMethod(t))&&(l=g.toComputedKey(t,t.key)), -g.isObjectProperty(t)||g.isClassProperty(t)?c=t.value:(g.isObjectMethod(t)||g.isClassMethod(t))&&(c=g.functionExpression(null,t.params,t.body,t.generator,t.async),c.returnType=t.returnType);var p=i(t);return r&&"value"===p||(r=p),s&&g.isStringLiteral(l)&&("value"===r||"initializer"===r)&&g.isFunctionExpression(c)&&(c=(0,f.default)({id:l,node:c,scope:s})),c&&(g.inheritsComments(c,t),o[r]=c),o}function a(e){for(var t in e)if(e[t]._computed)return!0;return!1}function o(e){for(var t=g.arrayExpression([]),r=0;r1&&void 0!==arguments[1]&&arguments[1];(0,l.default)(this,e),this.forceSuperMemoisation=t.forceSuperMemoisation,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=this.methodPath.scope,this.file=t.file,this.opts=t,this.bareSupers=[],this.returns=[],this.thises=[]}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r){return g.callExpression(this.file.addHelper("set"),[o(this.getObjectRef(),this.isStatic),r?e:g.stringLiteral(e.name),t,g.thisExpression()])},e.prototype.getSuperProperty=function(e,t){return g.callExpression(this.file.addHelper("get"),[o(this.getObjectRef(),this.isStatic),t?e:g.stringLiteral(e.name),g.thisExpression()])},e.prototype.replace=function(){this.methodPath.traverse(v,this)},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=this.superRef||g.identifier("Function");return t.property===e?void 0:g.isCallExpression(t,{callee:e})?void 0:g.isMemberExpression(t)&&!r.static?g.memberExpression(n,g.identifier("prototype")):n},e.prototype.looseHandle=function(e){var t=e.node;if(e.isSuper())return this.getLooseSuperProperty(t,e.parent);if(e.isCallExpression()){var r=t.callee;if(!g.isMemberExpression(r))return;if(!g.isSuper(r.object))return;return g.appendToMemberExpression(r,g.identifier("call")),t.arguments.unshift(g.thisExpression()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed):(e=e||t.scope.generateUidIdentifier("ref"),[g.variableDeclaration("var",[g.variableDeclarator(e,r.left)]),g.expressionStatement(g.assignmentExpression("=",r.left,g.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e){var t=void 0,r=void 0,n=void 0,i=e.parent,o=e.node;if(s(o,i))throw e.buildCodeFrameError(m.get("classesIllegalBareSuper"));if(g.isCallExpression(o)){var u=o.callee;if(g.isSuper(u))return;a(u)&&(t=u.property,r=u.computed,n=o.arguments)}else if(g.isMemberExpression(o)&&g.isSuper(o.object))t=o.property,r=o.computed;else{if(g.isUpdateExpression(o)&&a(o.argument)){var l=g.binaryExpression(o.operator[0],o.argument,g.numericLiteral(1));if(o.prefix)return this.specHandleAssignmentExpression(null,e,l);var c=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(c,e,l).concat(g.expressionStatement(c))}if(g.isAssignmentExpression(o)&&a(o.left))return this.specHandleAssignmentExpression(null,e,o)}if(t){var p=this.getSuperProperty(t,r);return n?this.optimiseCall(p,n):p}},e.prototype.optimiseCall=function(e,t){var r=g.thisExpression();return r[b]=!0,(0,f.default)(e,r,t)},e}();r.default=x,t.exports=r.default},{"babel-helper-optimise-call-expression":99,"babel-messages":103,"babel-runtime/core-js/symbol":122,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],101:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-template"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s={};r.default=s,s.typeof=(0,i.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n'),s.jsx=(0,i.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n'),s.asyncIterator=(0,i.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n'),s.asyncGenerator=(0,i.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n'),s.asyncGeneratorDelegate=(0,i.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n'),s.asyncToGenerator=(0,i.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n'),s.classCallCheck=(0,i.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n'),s.createClass=(0,i.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n'),s.defineEnumerableProperties=(0,i.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n'),s.defaults=(0,i.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"),s.defineProperty=(0,i.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"),s.extends=(0,i.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"),s.get=(0,i.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n'),s.inherits=(0,i.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n'),s.instanceof=(0,i.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n'),s.interopRequireDefault=(0,i.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"),s.interopRequireWildcard=(0,i.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"),s.newArrowCheck=(0,i.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n'),s.objectDestructuringEmpty=(0,i.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n'),s.objectWithoutProperties=(0,i.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"),s.possibleConstructorReturn=(0,i.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n'),s.selfGlobal=(0,i.default)('\n typeof global === "undefined" ? self : global\n'),s.set=(0,i.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n'),s.slicedToArray=(0,i.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n'),s.slicedToArrayLoose=(0,i.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n'),s.taggedTemplateLiteral=(0,i.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"),s.taggedTemplateLiteralLoose=(0,i.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"),s.temporalRef=(0,i.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n'),s.temporalUndefined=(0,i.default)("\n ({})\n"),s.toArray=(0,i.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"),s.toConsumableArray=(0,i.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"),t.exports=r.default},{"babel-template":132}],102:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=u.default[e];if(!t)throw new ReferenceError("Unknown helper "+e);return t().expression}r.__esModule=!0,r.list=void 0;var s=e("babel-runtime/core-js/object/keys"),a=n(s);r.get=i;var o=e("./helpers"),u=n(o);r.list=(0,a.default)(u.default).map(function(e){return e.replace(/^_/,"")}).filter(function(e){return"__esModule"!==e});r.default=i},{"./helpers":101,"babel-runtime/core-js/object/keys":120}],103:[function(e,t,r){"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!v.isFor(r))for(var s=0;s0&&e.traverse(k,t),e.skip()}},g.visitor]),k=y.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},g.visitor]),F={enter:function(e,t){var r=e.node;e.parent;if(e.isForStatement()){if(o(r.init)){var n=t.pushDeclar(r.init);1===n.length?r.init=n[0]:r.init=v.sequenceExpression(n)}}else if(e.isFor())o(r.left)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(o(r))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return v.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},T={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},P={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},B={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(B,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(B,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=u(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(v.isBreakStatement(r)&&v.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=v.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=v.objectExpression([v.objectProperty(v.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&(s=v.returnStatement(s),s[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(v.inherits(s,r)))}}},O=function(){function e(t,r,n,i,s){(0,d.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,h.default)(null),this.hasLetReferences=!1,this.letReferences=(0,h.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=v.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(v.isFunction(this.parent)||v.isProgram(this.block))return void this.updateScopeInfo();if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!v.isLabeledStatement(this.loopParent)?v.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){if(this.file.opts.throwIfClosureRequired)throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure (throwIfClosureRequired).");var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,E.default)(t),s=(0,E.default)(t),a=this.blockPath.isSwitchStatement(),o=v.functionExpression(null,i,v.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(v.variableDeclaration("var",[v.variableDeclarator(u,o)])));var l=v.callExpression(u,s),c=this.scope.generateUidIdentifier("ret");y.default.hasType(o.body,this.scope,"YieldExpression",v.FUNCTION_TYPES)&&(o.generator=!0,l=v.yieldExpression(l,!0)),y.default.hasType(o.body,this.scope,"AwaitExpression",v.FUNCTION_TYPES)&&(o.async=!0,l=v.awaitExpression(l)),this.buildClosure(c,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(v.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,P,t);for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:"value",n=arguments[3],i=void 0;e.static?(this.hasStaticDescriptors=!0,i=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,i=this.instanceMutatorMap);var s=m.push(i,e,r,this.file,n);return t&&(s.enumerable=v.booleanLiteral(!0)),s},e.prototype.constructorMeMaybe=function(){for(var e=!1,t=this.path.get("body.body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,a.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}if(e=s.equals("kind","constructor"))break}if(!e){var o=void 0,u=void 0;if(this.isDerived){var l=x().expression;o=l.params,u=l.body}else o=[],u=v.blockStatement([]);this.path.get("body").unshiftContainer("body",v.classMethod("constructor",v.identifier("constructor"),o,u))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.verifyConstructor(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),v.inherits(this.constructor,this.userConstructor),v.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){for(var e=this.path.get("body.body"),t=e,r=Array.isArray(t),n=0,t=r?t:(0,a.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,o=s.node;if(s.isClassProperty())throw s.buildCodeFrameError("Missing class properties transform.");if(o.decorators)throw s.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");if(v.isClassMethod(o)){var u="constructor"===o.kind;if(u&&(s.traverse(A,this),!this.hasBareSuper&&this.isDerived))throw s.buildCodeFrameError("missing super() call in constructor");var l=new p.default({forceSuperMemoisation:u,methodPath:s,methodNode:o,objectRef:this.classRef,superRef:this.superName,isStatic:o.static,isLoose:this.isLoose,scope:this.scope,file:this.file},!0);l.replace(),u?this.pushConstructor(l,o,s):this.pushMethod(o,s)}}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e=this.body,t=void 0,r=void 0;if(this.hasInstanceDescriptors&&(t=m.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(r=m.toClassObject(this.staticMutatorMap)),t||r){t&&(t=m.toComputedObjectFromClass(t)),r&&(r=m.toComputedObjectFromClass(r));var n=v.nullLiteral(),i=[this.classRef,n,n,n,n];t&&(i[1]=t),r&&(i[2]=r),this.instanceInitializersId&&(i[3]=this.instanceInitializersId,e.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(i[4]=this.staticInitializersId,e.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,a=0;a=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var p=c;this.wrapSuperCall(p,i,s,r),n&&p.find(function(e){return e===t||(e.isLoop()||e.isConditional()?(n=!1,!0):void 0)})}for(var h=this.superThises,f=Array.isArray(h),d=0,h=f?h:(0,a.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if(d=h.next(),d.done)break;m=d.value}m.replaceWith(s)}var y=function(t){return v.callExpression(e.file.addHelper("possibleConstructorReturn"),[s].concat(t||[]))},g=r.get("body");g.length&&!g.pop().isReturnStatement()&&r.pushContainer("body",v.returnStatement(n?s:y()));for(var b=this.superReturns,x=Array.isArray(b),E=0,b=x?b:(0,a.default)(b);;){var A;if(x){if(E>=b.length)break;A=b[E++]}else{if(E=b.next(),E.done)break;A=E.value}var C=A;if(C.node.argument){var S=C.scope.generateDeclaredUidIdentifier("ret");C.get("argument").replaceWithMultiple([v.assignmentExpression("=",S,C.node.argument),y(S)])}else C.get("argument").replaceWith(y())}}},e.prototype.pushMethod=function(e,t){var r=t?t.scope:this.scope;"method"===e.kind&&this._processMethod(e,r)||this.pushToMap(e,!1,null,r)},e.prototype._processMethod=function(){return!1},e.prototype.pushConstructor=function(e,t,r){this.bareSupers=e.bareSupers,this.superReturns=e.returns,r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor;this.userConstructorPath=r,this.userConstructor=t,this.hasConstructor=!0,v.inheritsComments(n,t),n._ignoreUserWhitespace=!0,n.params=t.params,v.inherits(n.body,t.body),n.body.directives=t.body.directives,this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(v.expressionStatement(v.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e}();r.default=C,t.exports=r.default},{"babel-helper-define-map":96,"babel-helper-optimise-call-expression":99,"babel-helper-replace-supers":100,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-template":132,"babel-traverse":136,"babel-types":169}],112:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),p=t.left;return a.isVariableDeclaration(p)?(p.declarations[0].init=c,l.body.body.unshift(p)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",p,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,l=void 0,c=void 0;if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))c=o;else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));c=n.generateUidIdentifier("ref"),l=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,c)])}var p=n.generateUidIdentifier("iterator"),h=n.generateUidIdentifier("isArray"),f=u({LOOP_OBJECT:p,IS_ARRAY:h,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:c});l||f.body.body.shift();var d=a.isLabeledStatement(s),m=void 0;return d&&(m=a.labeledStatement(s.label,f)),{replaceParent:d,declar:l,node:m||f,loop:f}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),p=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,p));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,p)])}var h=n.generateUidIdentifier("iterator"),f=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:h,STEP_KEY:c,OBJECT:r.right,BODY:null}),d=a.isLabeledStatement(s),m=f[3].block.body,y=m[0];return d&&(m[0]=a.labeledStatement(s.label,y)),{replaceParent:d,declar:u,loop:y,node:f}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,p=c.body;e.ensureBlock(),l&&p.body.push(l),p.body=p.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},t.exports=r.default},{}],113:[function(e,t,r){t.exports={default:e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":188}],114:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":189}],115:[function(e,t,r){t.exports={default:e("core-js/library/fn/map"),__esModule:!0}},{"core-js/library/fn/map":190}],116:[function(e,t,r){t.exports={default:e("core-js/library/fn/number/max-safe-integer"),__esModule:!0}},{"core-js/library/fn/number/max-safe-integer":191}],117:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":192}],118:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":193}],119:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/get-own-property-symbols"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-symbols":194}],120:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":195}],121:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":196}],122:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":198}],123:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/for"),__esModule:!0}},{"core-js/library/fn/symbol/for":197}],124:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":199}],125:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":200}],126:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-set"),__esModule:!0}},{"core-js/library/fn/weak-set":201}],127:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],128:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("../core-js/object/set-prototype-of"),s=n(i),a=e("../core-js/object/create"),o=n(a),u=e("../helpers/typeof"),l=n(u);r.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,l.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(s.default?(0,s.default)(e,t):e.__proto__=t)}},{"../core-js/object/create":118,"../core-js/object/set-prototype-of":121,"../helpers/typeof":131}],129:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},{}],130:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("../helpers/typeof"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);r.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":131}],131:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("../core-js/symbol/iterator"),s=n(i),a=e("../core-js/symbol"),o=n(a),u="function"==typeof o.default&&"symbol"==typeof s.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};r.default="function"==typeof o.default&&"symbol"===u(s.default)?function(e){return void 0===e?"undefined":u(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":u(e)}},{"../core-js/symbol":122,"../core-js/symbol/iterator":124}],132:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){e=(0,l.default)(e);var r=e,n=r.program;return t.length&&(0,m.default)(e,A,null,t),n.body.length>1?n.body:n.body[0]}r.__esModule=!0;var a=e("babel-runtime/core-js/symbol"),o=i(a);r.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,p.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=g.parse(e,t),i=m.default.removeProperties(i,{preserveComments:t.preserveComments}),m.default.cheap(i,function(e){e[x]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r=n.length)break;o=n[s++]}else{if(s=n.next(),s.done)break;o=s.value}if(e[o])return!0}return!1},e.prototype.create=function(e,t,r,n){return c.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})},e.prototype.maybeQueue=function(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=0;i=n.length)break;o=n[s++]}else{if(s=n.next(),s.done)break;o=s.value}var u=o;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(f&&e.length>=1e4&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var l=e,c=Array.isArray(l),p=0,l=c?l:(0,a.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}h.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();r.default=d,t.exports=r.default}).call(this,e("_process"))},{"./path":143,_process:539,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],135:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-runtime/helpers/classCallCheck"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function e(t,r){(0,i.default)(this,e),this.file=t,this.options=r};r.default=s,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],136:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(g.get("traverseNeedsParent",e.type));m.explode(t),s.node(e,t,r,n,i)}}function a(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}r.__esModule=!0,r.visitors=r.Hub=r.Scope=r.NodePath=void 0;var o=e("babel-runtime/core-js/get-iterator"),u=i(o),l=e("./path");Object.defineProperty(r,"NodePath",{enumerable:!0,get:function(){return i(l).default}});var c=e("./scope");Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return i(c).default}});var p=e("./hub");Object.defineProperty(r,"Hub",{enumerable:!0,get:function(){return i(p).default}}),r.default=s;var h=e("./context"),f=i(h),d=e("./visitors"),m=n(d),y=e("babel-messages"),g=n(y),b=e("lodash/includes"),v=i(b),x=e("babel-types"),E=n(x),A=e("./cache"),D=n(A);r.visitors=m,s.visitors=m,s.verify=m.verify,s.explode=m.explode,s.NodePath=e("./path"),s.Scope=e("./scope"),s.Hub=e("./hub"),s.cheap=function(e,t){return E.traverseFast(e,t)},s.node=function(e,t,r,n,i,s){var a=E.VISITOR_KEYS[e.type];if(a)for(var o=new f.default(r,t,n,i),l=a,c=Array.isArray(l),p=0,l=c?l:(0,u.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}var d=h;if((!s||!s[d])&&o.visit(e,d))return}},s.clearNode=function(e,t){E.removeProperties(e,t),D.path.delete(e)},s.removeProperties=function(e,t){return E.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,v.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},s.clearCache=function(){D.clear()},s.clearCache.clearPath=D.clearPath,s.clearCache.clearScope=D.clearScope,s.copyCache=function(e,t){D.path.has(e)&&D.path.set(t,D.path.get(e))}},{"./cache":133,"./context":134,"./hub":135,"./path":143,"./scope":155,"./visitors":157,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-types":169,"lodash/includes":496}],137:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function s(e){var t=this;do{if(e(t))return t}while(t=t.parentPath);return null}function a(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function o(){var e=this;do{if(Array.isArray(e.container))return e}while(e=e.parentPath)}function u(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var n=void 0,i=b.VISITOR_KEYS[e.type],s=r,a=Array.isArray(s),o=0,s=a?s:(0,y.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u,c=l[t+1];if(n)if(c.listKey&&n.listKey===c.listKey&&c.keyh&&(n=c)}else n=c}return n})}function l(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n=1/0,i=void 0,s=void 0,a=e.map(function(e){var t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==r);return t.length=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;if(d[u]!==l)break e}i=u,s=l}if(s)return t?t(s,i,a):s;throw new Error("Couldn't find intersection")}function c(){var e=this,t=[];do{t.push(e)}while(e=e.parentPath);return t}function p(e){return e.isDescendant(this)}function h(e){return!!this.findParent(function(t){return t===e})}function f(){for(var e=this;e;){for(var t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(e.node.type===s)return!0}e=e.parentPath}return!1}function d(e){var t=this.isFunction()?this:this.findParent(function(e){return e.isFunction()});if(t){if(t.isFunctionExpression()||t.isFunctionDeclaration()){var r=t.node.shadow;if(r&&(!e||!1!==r[e]))return t}else if(t.isArrowFunctionExpression())return t;return null}}r.__esModule=!0;var m=e("babel-runtime/core-js/get-iterator"),y=n(m);r.findParent=i,r.find=s,r.getFunctionParent=a,r.getStatementParent=o,r.getEarliestCommonAncestorFrom=u,r.getDeepestCommonAncestorFrom=l,r.getAncestry=c,r.isAncestor=p,r.isDescendant=h,r.inType=f,r.inShadow=d;var g=e("babel-types"),b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(g),v=e("./index");n(v)},{"./index":143,"babel-runtime/core-js/get-iterator":113,"babel-types":169}],138:[function(e,t,r){"use strict";function n(){if("string"!=typeof this.key){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}}function i(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])}function s(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}r.__esModule=!0,r.shareCommentsWithSiblings=n,r.addComment=i,r.addComments=s},{}],139:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this.opts;return this.debug(function(){return e}),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])}function s(e){if(!e)return!1;for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,S.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;if(s){var a=this.node;if(!a)return!0;if(s.call(this.state,this,this.state))throw new Error("Unexpected return value from visitor method "+s);if(this.node!==a)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1}function a(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1}function o(){return!!this.node&&(!this.isBlacklisted()&&((!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.call("enter")||this.shouldSkip?(this.debug(function(){return"Skip..."}),this.shouldStop):(this.debug(function(){return"Recursing into..."}),w.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop))))}function u(){this.shouldSkip=!0}function l(e){this.skipKeys[e]=!0}function c(){this.shouldStop=!0,this.shouldSkip=!0}function p(){if(!this.opts||!this.opts.noScope){var e=this.context&&this.context.scope;if(!e)for(var t=this.parentPath;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()}}function h(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this}function f(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())}function d(){this.parentPath&&(this.parent=this.parentPath.node)}function m(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:this;if(!e.removed)for(var t=this.contexts,r=t,n=Array.isArray(r),i=0,r=n?r:(0,S.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;a.maybeQueue(e)}}function D(){for(var e=this,t=this.contexts;!t.length;)e=e.parentPath,t=e.contexts;return t}r.__esModule=!0;var C=e("babel-runtime/core-js/get-iterator"),S=n(C);r.call=i,r._call=s,r.isBlacklisted=a,r.visit=o,r.skip=u,r.skipKey=l,r.stop=c,r.setScope=p,r.setContext=h,r.resync=f,r._resyncParent=d,r._resyncKey=m,r._resyncList=y,r._resyncRemoved=g,r.popContext=b,r.pushContext=v,r.setup=x,r.setKey=E,r.requeue=A,r._getQueueContexts=D;var _=e("../index"),w=n(_)},{"../index":136,"babel-runtime/core-js/get-iterator":113}],140:[function(e,t,r){"use strict";function n(){var e=this.node,t=void 0;if(this.isMemberExpression())t=e.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");t=e.key}return e.computed||o.isIdentifier(t)&&(t=o.stringLiteral(t.name)),t}function i(){return o.ensureBlock(this.node)}function s(){if(this.isArrowFunctionExpression()){this.ensureBlock();var e=this.node;e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}}r.__esModule=!0,r.toComputedKey=n,r.ensureBlock=i,r.arrowFunctionToShadowed=s;var a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a)},{"babel-types":169}],141:[function(e,t,r){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this.evaluate();if(e.confident)return!!e.value}function s(){function e(e){i&&(s=e,i=!1)}function r(t){var r=t.node;if(a.has(r)){var s=a.get(r);return s.resolved?s.value:void e(t)}var o={resolved:!1};a.set(r,o);var u=n(t);return i&&(o.resolved=!0,o.value=u),u}function n(n){if(i){var s=n.node;if(n.isSequenceExpression()){var a=n.get("expressions");return r(a[a.length-1])}if(n.isStringLiteral()||n.isNumericLiteral()||n.isBooleanLiteral())return s.value;if(n.isNullLiteral())return null;if(n.isTemplateLiteral()){for(var u="",c=0,p=n.get("expressions"),d=s.quasis,m=Array.isArray(d),y=0,d=m?d:(0,l.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if(y=d.next(),y.done)break;g=y.value}var b=g;if(!i)break;u+=b.value.cooked;var v=p[c++];v&&(u+=String(r(v)))}if(!i)return;return u}if(n.isConditionalExpression()){var x=r(n.get("test"));if(!i)return;return r(x?n.get("consequent"):n.get("alternate"))}if(n.isExpressionWrapper())return r(n.get("expression"));if(n.isMemberExpression()&&!n.parentPath.isCallExpression({callee:s})){var E=n.get("property"),A=n.get("object");if(A.isLiteral()&&E.isIdentifier()){var D=A.node.value,C=void 0===D?"undefined":(0,o.default)(D);if("number"===C||"string"===C)return D[E.node.name]}}if(n.isReferencedIdentifier()){var S=n.scope.getBinding(s.name);if(S&&S.constantViolations.length>0)return e(S.path);if(S&&n.node.start=P.length)break;j=P[O++]}else{if(O=P.next(),O.done)break;j=O.value}var N=j;if(N=N.evaluate(),!N.confident)return e(N);F.push(N.value)}return F}if(n.isObjectExpression()){for(var I={},L=n.get("properties"),M=L,R=Array.isArray(M),U=0,M=R?M:(0,l.default)(M);;){var V;if(R){if(U>=M.length)break;V=M[U++]}else{if(U=M.next(),U.done)break;V=U.value}var q=V;if(q.isObjectMethod()||q.isSpreadProperty())return e(q);var G=q.get("key"),X=G;if(q.node.computed){if(X=X.evaluate(),!X.confident)return e(G);X=X.value}else X=X.isIdentifier()?X.node.name:X.node.value;var J=q.get("value"),W=J.evaluate();if(!W.confident)return e(J);W=W.value,I[X]=W}return I}if(n.isLogicalExpression()){var K=i,z=r(n.get("left")),Y=i;i=K;var H=r(n.get("right")),$=i;switch(i=Y&&$,s.operator){case"||":if(z&&Y)return i=!0,z;if(!i)return;return z||H;case"&&":if((!z&&Y||!H&&$)&&(i=!0),!i)return;return z&&H}}if(n.isBinaryExpression()){var Q=r(n.get("left"));if(!i)return;var Z=r(n.get("right"));if(!i)return;switch(s.operator){case"-":return Q-Z;case"+":return Q+Z;case"/":return Q/Z;case"*":return Q*Z;case"%":return Q%Z;case"**":return Math.pow(Q,Z);case"<":return Q":return Q>Z;case"<=":return Q<=Z;case">=":return Q>=Z;case"==":return Q==Z;case"!=":return Q!=Z;case"===":return Q===Z;case"!==":return Q!==Z;case"|":return Q|Z;case"&":return Q&Z;case"^":return Q^Z;case"<<":return Q<>":return Q>>Z;case">>>":return Q>>>Z}}if(n.isCallExpression()){var ee=n.get("callee"),te=void 0,re=void 0;if(ee.isIdentifier()&&!n.scope.getBinding(ee.node.name,!0)&&h.indexOf(ee.node.name)>=0&&(re=t[s.callee.name]),ee.isMemberExpression()){var ne=ee.get("object"),ie=ee.get("property");if(ne.isIdentifier()&&ie.isIdentifier()&&h.indexOf(ne.node.name)>=0&&f.indexOf(ie.node.name)<0&&(te=t[ne.node.name],re=te[ie.node.name]),ne.isLiteral()&&ie.isIdentifier()){var se=(0,o.default)(ne.node.value);"string"!==se&&"number"!==se||(te=ne.node.value,re=te[ie.node.name])}}if(re){var ae=n.get("arguments").map(r);if(!i)return;return re.apply(te,ae)}}e(n)}}var i=!0,s=void 0,a=new p.default,u=r(this);return i||(u=void 0),{confident:i,deopt:s,value:u}}r.__esModule=!0;var a=e("babel-runtime/helpers/typeof"),o=n(a),u=e("babel-runtime/core-js/get-iterator"),l=n(u),c=e("babel-runtime/core-js/map"),p=n(c);r.evaluateTruthy=i,r.evaluate=s;var h=["String","Number","Math"],f=["random"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/map":115,"babel-runtime/helpers/typeof":131}],142:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e}function s(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function a(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function o(e){return C.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function u(){return this.getSibling(this.key-1)}function l(){return this.getSibling(this.key+1)}function c(){for(var e=this.key,t=this.getSibling(++e),r=[];t.node;)r.push(t),t=this.getSibling(++e);return r}function p(){for(var e=this.key,t=this.getSibling(--e),r=[];t.node;)r.push(t),t=this.getSibling(--e);return r}function h(e,t){!0===t&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function f(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(s,a){return C.default.get({listKey:e,parentPath:r,parent:n,container:i,key:a}).setContext(t)}):C.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)}function d(e,t){for(var r=this,n=e,i=Array.isArray(n),s=0,n=i?n:(0,A.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;r="."===o?r.parentPath:Array.isArray(r)?r[o]:r.get(o,t)}return r}function m(e){return _.getBindingIdentifiers(this.node,e)}function y(e){return _.getOuterBindingIdentifiers(this.node,e)}function g(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this,n=[].concat(r),i=(0,x.default)(null);n.length;){var s=n.shift();if(s&&s.node){var a=_.getBindingIdentifiers.keys[s.node.type];if(s.isIdentifier())if(e){var o=i[s.node.name]=i[s.node.name]||[];o.push(s)}else i[s.node.name]=s;else if(s.isExportDeclaration()){var u=s.get("declaration");u.isDeclaration()&&n.push(u)}else{if(t){if(s.isFunctionDeclaration()){n.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,y.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){A.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){C.enabled&&C(this.getPathLocation()+" "+this.type+": "+e())},e}();r.default=S,(0,b.default)(S.prototype,e("./ancestry")),(0,b.default)(S.prototype,e("./inference")),(0,b.default)(S.prototype,e("./replacement")),(0,b.default)(S.prototype,e("./evaluation")),(0,b.default)(S.prototype,e("./conversion")),(0,b.default)(S.prototype,e("./introspection")),(0,b.default)(S.prototype,e("./context")),(0,b.default)(S.prototype,e("./removal")),(0,b.default)(S.prototype,e("./modification")),(0,b.default)(S.prototype,e("./family")),(0,b.default)(S.prototype,e("./comments"));for(var _=A.TYPES,w=Array.isArray(_),k=0,_=w?_:(0,a.default)(_);;){var F;if("break"===function(){if(w){if(k>=_.length)return"break";F=_[k++]}else{if(k=_.next(),k.done)return"break";F=k.value}var e=F,t="is"+e;S.prototype[t]=function(e){return A[t](this.node,e)},S.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}}())break}for(var T in c){(function(e){if("_"===e[0])return"continue";A.TYPES.indexOf(e)<0&&A.TYPES.push(e);var t=c[e];S.prototype["is"+e]=function(e){return t.checkPath(this,e)}})(T)}t.exports=r.default},{"../cache":133,"../index":136,"../scope":155,"./ancestry":137,"./comments":138,"./context":139,"./conversion":140,"./evaluation":141,"./family":142,"./inference":144,"./introspection":147,"./lib/virtual-types":150,"./modification":151,"./removal":152,"./replacement":153,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169,debug:296,invariant:307,"lodash/assign":477}],144:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||y.anyTypeAnnotation();return y.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e}function s(){var e=this.node;{if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=d[e.type];return t?t.call(this,e):(t=d[this.parentPath.type],t&&t.validParent?this.parentPath.getTypeAnnotation():void 0)}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?y.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?y.anyTypeAnnotation():y.voidTypeAnnotation()}}}function a(e,t){return o(e,this.getTypeAnnotation(),t)}function o(e,t,r){if("string"===e)return y.isStringTypeAnnotation(t);if("number"===e)return y.isNumberTypeAnnotation(t);if("boolean"===e)return y.isBooleanTypeAnnotation(t);if("any"===e)return y.isAnyTypeAnnotation(t);if("mixed"===e)return y.isMixedTypeAnnotation(t);if("empty"===e)return y.isEmptyTypeAnnotation(t);if("void"===e)return y.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}function u(e){var t=this.getTypeAnnotation();if(y.isAnyTypeAnnotation(t))return!0;if(y.isUnionTypeAnnotation(t)){for(var r=t.types,n=Array.isArray(r),i=0,r=n?r:(0,h.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(y.isAnyTypeAnnotation(a)||o(e,a,!0))return!0}return!1}return o(e,t,!0)}function l(e){var t=this.getTypeAnnotation();if(e=e.getTypeAnnotation(),!y.isAnyTypeAnnotation(t)&&y.isFlowBaseAnnotation(t))return e.type===t.type}function c(e){var t=this.getTypeAnnotation();return y.isGenericTypeAnnotation(t)&&y.isIdentifier(t.id,{name:e})}r.__esModule=!0;var p=e("babel-runtime/core-js/get-iterator"),h=function(e){return e&&e.__esModule?e:{default:e}}(p);r.getTypeAnnotation=i,r._getTypeAnnotation=s,r.isBaseType=a,r.couldBeBaseType=u,r.baseTypeStrictlyMatches=l,r.isGenericType=c;var f=e("./inferers"),d=n(f),m=e("babel-types"),y=n(m)},{"./inferers":146,"babel-runtime/core-js/get-iterator":113,"babel-types":169}],145:[function(e,t,r){"use strict";function n(e,t){var r=e.scope.getBinding(t),n=[];e.typeAnnotation=p.unionTypeAnnotation(n);var s=[],a=i(r,e,s),u=o(e,t);if(u&&function(){var e=i(r,u.ifStatement);a=a.filter(function(t){return e.indexOf(t)<0}),n.push(u.typeAnnotation)}(),a.length){a=a.concat(s);for(var c=a,h=Array.isArray(c),f=0,c=h?c:(0,l.default)(c);;){var d;if(h){if(f>=c.length)break;d=c[f++]}else{if(f=c.next(),f.done)break;d=f.value}var m=d;n.push(m.getTypeAnnotation())}}if(n.length)return p.createUnionTypeAnnotation(n)}function i(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){e=e.resolve();var n=e._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function s(e,t){var r=t.node.operator,n=t.get("right").resolve(),i=t.get("left").resolve(),s=void 0;if(i.isIdentifier({name:e})?s=n:n.isIdentifier({name:e})&&(s=i),s)return"==="===r?s.getTypeAnnotation():p.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?p.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,o=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,o=n):n.isUnaryExpression({operator:"typeof"})&&(a=n,o=i),(o||a)&&(o=o.resolve(),o.isLiteral())){if("string"==typeof o.node.value&&a.get("argument").isIdentifier({name:e}))return p.createTypeAnnotationBasedOnTypeof(o.node.value)}}}function a(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function o(e,t){var r=a(e);if(r){var n=r.get("test"),i=[n],u=[];do{var l=i.shift().resolve();if(l.isLogicalExpression()&&(i.push(l.get("left")),i.push(l.get("right"))),l.isBinaryExpression()){var c=s(t,l);c&&u.push(c)}}while(i.length);return u.length?{typeAnnotation:p.createUnionTypeAnnotation(u),ifStatement:r}:o(r,t)}}r.__esModule=!0;var u=e("babel-runtime/core-js/get-iterator"),l=function(e){return e&&e.__esModule?e:{default:e}}(u);r.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:n(this,e.name):"undefined"===e.name?p.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?p.numberTypeAnnotation():void e.name}};var c=e("babel-types"),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(c);t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],146:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return this.get("id").isIdentifier()?this.get("init").getTypeAnnotation():void 0}function s(e){return e.typeAnnotation}function a(e){if(this.get("callee").isIdentifier())return F.genericTypeAnnotation(e.callee)}function o(){return F.stringTypeAnnotation()}function u(e){var t=e.operator;return"void"===t?F.voidTypeAnnotation():F.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?F.numberTypeAnnotation():F.STRING_UNARY_OPERATORS.indexOf(t)>=0?F.stringTypeAnnotation():F.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?F.booleanTypeAnnotation():void 0}function l(e){var t=e.operator;if(F.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return F.numberTypeAnnotation();if(F.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return F.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?F.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?F.stringTypeAnnotation():F.unionTypeAnnotation([F.stringTypeAnnotation(),F.numberTypeAnnotation()])}}function c(){return F.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function p(){return F.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function h(){return this.get("expressions").pop().getTypeAnnotation()}function f(){return this.get("right").getTypeAnnotation()}function d(e){var t=e.operator;if("++"===t||"--"===t)return F.numberTypeAnnotation()}function m(){return F.stringTypeAnnotation()}function y(){return F.numberTypeAnnotation()}function g(){return F.booleanTypeAnnotation()}function b(){return F.nullLiteralTypeAnnotation()}function v(){return F.genericTypeAnnotation(F.identifier("RegExp"))}function x(){return F.genericTypeAnnotation(F.identifier("Object"))}function E(){return F.genericTypeAnnotation(F.identifier("Array"))}function A(){return E()}function D(){return F.genericTypeAnnotation(F.identifier("Function"))}function C(){return _(this.get("callee"))}function S(){return _(this.get("tag"))}function _(e){if(e=e.resolve(),e.isFunction()){if(e.is("async"))return e.is("generator")?F.genericTypeAnnotation(F.identifier("AsyncIterator")):F.genericTypeAnnotation(F.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}r.__esModule=!0,r.ClassDeclaration=r.ClassExpression=r.FunctionDeclaration=r.ArrowFunctionExpression=r.FunctionExpression=r.Identifier=void 0;var w=e("./inferer-reference");Object.defineProperty(r,"Identifier",{enumerable:!0,get:function(){return n(w).default}}),r.VariableDeclarator=i, -r.TypeCastExpression=s,r.NewExpression=a,r.TemplateLiteral=o,r.UnaryExpression=u,r.BinaryExpression=l,r.LogicalExpression=c,r.ConditionalExpression=p,r.SequenceExpression=h,r.AssignmentExpression=f,r.UpdateExpression=d,r.StringLiteral=m,r.NumericLiteral=y,r.BooleanLiteral=g,r.NullLiteral=b,r.RegExpLiteral=v,r.ObjectExpression=x,r.ArrayExpression=E,r.RestElement=A,r.CallExpression=C,r.TaggedTemplateExpression=S;var k=e("babel-types"),F=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(k);s.validParent=!0,A.validParent=!0,r.FunctionExpression=D,r.ArrowFunctionExpression=D,r.FunctionDeclaration=D,r.ClassExpression=D,r.ClassDeclaration=D},{"./inferer-reference":145,"babel-types":169}],147:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){function r(e){var t=n[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(t&&s===n.length)return!0;if(k.isIdentifier(a)){if(!r(a.name))return!1}else if(k.isLiteral(a)){if(!r(a.value))return!1}else{if(k.isMemberExpression(a)){if(a.computed&&!k.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!k.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>n.length)return!1}return s===n.length}function s(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function a(){return this.scope.isStatic(this.node)}function o(e){return!this.has(e)}function u(e,t){return this.node[e]===t}function l(e){return k.isType(this.type,e)}function c(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function p(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?k.isBlockStatement(e):!!this.isBlockStatement()&&k.isExpression(e))}function h(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function f(){return!this.parentPath.isLabeledStatement()&&!k.isBlockStatement(this.container)&&(0,_.default)(k.STATEMENT_OR_BLOCK_KEYS,this.key)}function d(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return!!i.isImportDeclaration()&&(i.node.source.value===e&&(!t||(!(!n.isImportDefaultSpecifier()||"default"!==t)||(!(!n.isImportNamespaceSpecifier()||"*"!==t)||!(!n.isImportSpecifier()||n.node.imported.name!==t)))))}function m(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function y(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var n=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(n)return n;e=t.path}var i=e.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u=0){a=l;break}}if(!a)return"before";var c=i[o-1],p=s[u-1];return c&&p?c.listKey&&c.container===p.container?c.key>p.key?"before":"after":k.VISITOR_KEYS[c.type].indexOf(c.key)>k.VISITOR_KEYS[p.type].indexOf(p.key)?"before":"after":"before"}function b(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var n=r.referencePaths,i=n,s=Array.isArray(i),a=0,i=s?i:(0,C.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,c=n,p=Array.isArray(c),h=0,c=p?c:(0,C.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;if(!!!d.find(function(e){return e.node===t.node})){var m=this._guessExecutionStatusRelativeTo(d);if(l){if(l!==m)return}else l=m}}return l}}function v(e,t){return this._resolve(e,t)||this}function x(e,t){var r=this;if(!(t&&t.indexOf(this)>=0))if(t=t||[],t.push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var n=this.scope.getBinding(this.node.name);if(!n)return;if(!n.constant)return;if("module"===n.kind)return;if(n.path!==this){var i=function(){var i=n.path.resolve(e,t);return r.find(function(e){return e.node===i.node})?{v:void 0}:{v:i}}();if("object"===(void 0===i?"undefined":(0,A.default)(i)))return i.v}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var s=this.toComputedKey();if(!k.isLiteral(s))return;var a=s.value,o=this.get("object").resolve(e,t);if(o.isObjectExpression())for(var u=o.get("properties"),l=u,c=Array.isArray(l),p=0,l=c?l:(0,C.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if(p=l.next(),p.done)break;h=p.value}var f=h;if(f.isProperty()){var d=f.get("key"),m=f.isnt("computed")&&d.isIdentifier({name:a});if(m=m||d.isLiteral({value:a}))return f.get("value").resolve(e,t)}}else if(o.isArrayExpression()&&!isNaN(+a)){var y=o.get("elements"),g=y[a];if(g)return g.resolve(e,t)}}}}r.__esModule=!0,r.is=void 0;var E=e("babel-runtime/helpers/typeof"),A=n(E),D=e("babel-runtime/core-js/get-iterator"),C=n(D);r.matchesPattern=i,r.has=s,r.isStatic=a,r.isnt=o,r.equals=u,r.isNodeType=l,r.canHaveVariableDeclarationOrExpression=c,r.canSwapBetweenExpressionAndStatement=p,r.isCompletionRecord=h,r.isStatementOrBlock=f,r.referencesImport=d,r.getSource=m,r.willIMaybeExecuteBefore=y,r._guessExecutionStatusRelativeTo=g,r._guessExecutionStatusRelativeToDifferentFunctions=b,r.resolve=v,r._resolve=x;var S=e("lodash/includes"),_=n(S),w=e("babel-types"),k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(w);r.is=s},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/typeof":131,"babel-types":169,"lodash/includes":496}],148:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/core-js/get-iterator"),s=n(i),a=e("babel-runtime/helpers/classCallCheck"),o=n(a),u=e("babel-types"),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(u),c={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!u.react.isCompatTag(e.node.name)||e.parentPath.isJSXMemberExpression()){if("this"===e.node.name){var r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);r&&t.breakOnScopePaths.push(r.path)}var n=e.scope.getBinding(e.node.name);n&&n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}},p=function(){function e(t,r){(0,o.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this._getAttachmentPath();if(e){var t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(var r in this.bindings)if(t.hasOwnBinding(r)){var n=this.bindings[r];if("param"!==n.kind&&this.getAttachmentParentForPath(n.path).key>e.key){this.attachAfter=!0,e=n.path;for(var i=n.constantViolations,a=Array.isArray(i),o=0,i=a?i:(0,s.default)(i);;){var u;if(a){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;this.getAttachmentParentForPath(l).key>e.key&&(e=l)}}}return e}},e.prototype._getAttachmentPath=function(){var e=this.scopes,t=e.pop();if(t){if(t.path.isFunction()){if(this.hasOwnParamBindings(t)){if(this.scope===t)return;return t.path.get("body").get("body")[0]}return this.getNextScopeAttachmentParent()}return t.path.isProgram()?this.getNextScopeAttachmentParent():void 0}},e.prototype.getNextScopeAttachmentParent=function(){var e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)},e.prototype.getAttachmentParentForPath=function(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()||e.isVariableDeclarator()&&null!==e.parentPath.node&&e.parentPath.node.declarations.length>1)return e}while(e=e.parentPath)},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind&&r.constant)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(c,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref"),n=l.variableDeclarator(r,this.path.node);t[this.attachAfter?"insertAfter":"insertBefore"]([t.isVariableDeclarator()?n:l.variableDeclaration("var",[n])]);var i=this.path.parentPath;i.isJSXElement()&&this.path.container===i.node.children&&(r=l.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();r.default=p,t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],149:[function(e,t,r){"use strict";r.__esModule=!0;r.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},{}],150:[function(e,t,r){"use strict";r.__esModule=!0,r.Flow=r.Pure=r.Generated=r.User=r.Var=r.BlockScoped=r.Referenced=r.Scope=r.Expression=r.Statement=r.BindingIdentifier=r.ReferencedMemberExpression=r.ReferencedIdentifier=void 0;var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);r.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,s=e.parent;if(!i.isIdentifier(r,t)&&!i.isJSXMemberExpression(s,t)){if(!i.isJSXIdentifier(r,t))return!1;if(n.react.isCompatTag(r.name))return!1}return i.isReferenced(r,s)}},r.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function(e){var t=e.node,r=e.parent;return i.isMemberExpression(t)&&i.isReferenced(t,r)}},r.BindingIdentifier={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return i.isIdentifier(t)&&i.isBinding(t,r)}},r.Statement={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(i.isStatement(t)){if(i.isVariableDeclaration(t)){if(i.isForXStatement(r,{left:t}))return!1;if(i.isForStatement(r,{init:t}))return!1}return!0}return!1}},r.Expression={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():i.isExpression(e.node)}},r.Scope={types:["Scopable"],checkPath:function(e){return i.isScope(e.node,e.parent)}},r.Referenced={checkPath:function(e){return i.isReferenced(e.node,e.parent)}},r.BlockScoped={checkPath:function(e){return i.isBlockScoped(e.node)}},r.Var={types:["VariableDeclaration"],checkPath:function(e){return i.isVar(e.node)}},r.User={checkPath:function(e){return e.node&&!!e.node.loc}},r.Generated={checkPath:function(e){return!e.isUser()}},r.Pure={checkPath:function(e,t){return e.scope.isPure(e.node,t)}},r.Flow={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:function(e){var t=e.node;return!!i.isFlow(t)||(i.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:i.isExportDeclaration(t)?"type"===t.exportKind:!!i.isImportSpecifier(t)&&("type"===t.importKind||"typeof"===t.importKind))}}},{"babel-types":169}],151:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this._replaceWith(S.blockStatement(e))}return[this]}function s(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;h.setScope(),h.debug(function(){return"Inserted."});for(var f=o,d=Array.isArray(f),m=0,f=d?f:(0,b.default)(f);;){var y;if(d){if(m>=f.length)break;y=f[m++]}else{if(m=f.next(),m.done)break;y=m.value}y.maybeQueue(h,!0)}}return r}function a(e){return this._containerInsert(this.key,e)}function o(e){return this._containerInsert(this.key+1,e)}function u(e){var t=e[e.length-1];(S.isIdentifier(t)||S.isExpressionStatement(t)&&S.isIdentifier(t.expression))&&!this.isCompletionRecord()&&e.pop()}function l(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(S.expressionStatement(S.assignmentExpression("=",t,this.node))),e.push(S.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this._replaceWith(S.blockStatement(e))}return[this]}function c(e,t){if(this.parent)for(var r=v.path.get(this.parent),n=0;n=e&&(i.key+=t)}}function p(e){if(!e)return[];e.constructor!==Array&&(e=[e]);for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:this.scope;return new E.default(this,e).run()}r.__esModule=!0;var m=e("babel-runtime/helpers/typeof"),y=n(m),g=e("babel-runtime/core-js/get-iterator"),b=n(g);r.insertBefore=i,r._containerInsert=s,r._containerInsertBefore=a,r._containerInsertAfter=o,r._maybePopFromStatements=u,r.insertAfter=l,r.updateSiblingKeys=c,r._verifyNodeList=p,r.unshiftContainer=h,r.pushContainer=f,r.hoist=d;var v=e("../cache"),x=e("./lib/hoister"),E=n(x),A=e("./index"),D=n(A),C=e("babel-types"),S=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(C)},{"../cache":133,"./index":143,"./lib/hoister":148,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/typeof":131,"babel-types":169}],152:[function(e,t,r){"use strict";function n(){if(this._assertUnremoved(),this.resync(),this._callRemovalHooks())return void this._markRemoved();this.shareCommentsWithSiblings(),this._remove(),this._markRemoved()}function i(){for(var e=c.hooks,t=Array.isArray(e),r=0,e=t?e:(0,l.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if(r=e.next(),r.done)break;n=r.value}if(n(this,this.parentPath))return!0}}function s(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)}function a(){this.shouldSkip=!0,this.removed=!0,this.node=null}function o(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}r.__esModule=!0;var u=e("babel-runtime/core-js/get-iterator"),l=function(e){return e&&e.__esModule?e:{default:e}}(u);r.remove=n,r._callRemovalHooks=i,r._remove=s,r._markRemoved=a,r._assertUnremoved=o;var c=e("./lib/removal-hooks")},{"./lib/removal-hooks":149,"babel-runtime/core-js/get-iterator":113}],153:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){this.resync(),e=this._verifyNodeList(e),x.inheritLeadingComments(e[0],this.node),x.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node?this.requeue():this.remove()}function s(e){this.resync();try{e="("+e+")",e=(0,b.parse)(e)}catch(r){var t=r.loc;throw t&&(r.message+=" - make sure this is an expression.",r.message+="\n"+(0,f.default)(e,t.line,t.column+1)),r}return e=e.program.body[0].expression,m.default.removeProperties(e),this.replaceWith(e)}function a(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof g.default&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==e){if(this.isProgram()&&!x.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&x.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||(e=x.expressionStatement(e))),this.isNodeType("Expression")&&x.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var t=this.node;t&&(x.inheritsComments(e,t),x.removeComments(t)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue()}}function o(e){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?x.validate(this.parent,this.key,[e]):x.validate(this.parent,this.key,e),this.debug(function(){return"Replace with "+(e&&e.type)}),this.node=this.container[this.key]=e}function u(e){this.resync();var t=x.toSequenceExpression(e,this.scope);if(x.isSequenceExpression(t)){var r=t.expressions;r.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(r),1===r.length?this.replaceWith(r[0]):this.replaceWith(t)}else{if(!t){var n=x.functionExpression(null,[],x.blockStatement(e));n.shadow=!0,this.replaceWith(x.callExpression(n,[])),this.traverse(E);for(var i=this.get("callee").getCompletionRecords(),s=i,a=Array.isArray(s),o=0,s=a?s:(0,p.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(l.isExpressionStatement()){var c=l.findParent(function(e){return e.isLoop()});if(c){var h=c.getData("expressionReplacementReturnUid");if(h)h=x.identifier(h.name);else{var f=this.get("callee");h=f.scope.generateDeclaredUidIdentifier("ret"),f.get("body").pushContainer("body",x.returnStatement(h)),c.setData("expressionReplacementReturnUid",h)}l.get("expression").replaceWith(x.assignmentExpression("=",h,l.node.expression))}else l.replaceWith(x.returnStatement(l.node.expression))}}return this.node}this.replaceWith(t)}}function l(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)}r.__esModule=!0;var c=e("babel-runtime/core-js/get-iterator"),p=n(c);r.replaceWithMultiple=i,r.replaceWithSourceString=s,r.replaceWith=a,r._replaceWith=o,r.replaceExpressionWithStatements=u,r.replaceInline=l;var h=e("babel-code-frame"),f=n(h),d=e("../index"),m=n(d),y=e("./index"),g=n(y),b=e("babylon"),v=e("babel-types"),x=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(v),E={Function:function(e){e.skip()},VariableDeclaration:function(e){if("var"===e.node.kind){var t=e.getBindingIdentifiers();for(var r in t)e.scope.push({id:t[r]});for(var n=[],i=e.node.declarations,s=Array.isArray(i),a=0,i=s?i:(0,p.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;u.init&&n.push(x.expressionStatement(x.assignmentExpression("=",u.id,u.init)))}e.replaceWithMultiple(n)}}}},{"../index":136,"./index":143,"babel-code-frame":23,"babel-runtime/core-js/get-iterator":113,"babel-types":169,babylon:177}],154:[function(e,t,r){"use strict";r.__esModule=!0;var n=e("babel-runtime/helpers/classCallCheck"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=function(){function e(t){var r=t.existing,n=t.identifier,s=t.scope,a=t.path,o=t.kind;(0,i.default)(this,e),this.identifier=n,this.scope=s,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},e.prototype.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();r.default=s,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],155:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){for(var n=N.scope.get(e.node)||[],i=n,s=Array.isArray(i),a=0,i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}n.push(r),N.scope.has(e.node)||N.scope.set(e.node,n)}function a(e,t){if(j.isModuleDeclaration(e))if(e.source)a(e.source,t);else if(e.specifiers&&e.specifiers.length)for(var r=e.specifiers,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var o=s;a(o,t)}else e.declaration&&a(e.declaration,t);else if(j.isModuleSpecifier(e))a(e.local,t);else if(j.isMemberExpression(e))a(e.object,t),a(e.property,t);else if(j.isIdentifier(e))t.push(e.name);else if(j.isLiteral(e))t.push(e.value);else if(j.isCallExpression(e))a(e.callee,t);else if(j.isObjectExpression(e)||j.isObjectPattern(e))for(var u=e.properties,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;a(h.key||h.argument,t)}}r.__esModule=!0;var o=e("babel-runtime/core-js/object/keys"),u=i(o),l=e("babel-runtime/core-js/object/create"),c=i(l),p=e("babel-runtime/core-js/map"),h=i(p),f=e("babel-runtime/helpers/classCallCheck"),d=i(f),m=e("babel-runtime/core-js/get-iterator"),y=i(m),g=e("lodash/includes"),b=i(g),v=e("lodash/repeat"),x=i(v),E=e("./lib/renamer"),A=i(E),D=e("../index"),C=i(D),S=e("lodash/defaults"),_=i(S),w=e("babel-messages"),k=n(w),F=e("./binding"),T=i(F),P=e("globals"),B=i(P),O=e("babel-types"),j=n(O),N=e("../cache"),I=0,L={For:function(e){for(var t=j.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,n=t.declaration;if(j.isClassDeclaration(n)||j.isFunctionDeclaration(n)){var i=n.id;if(!i)return;var s=r.getBinding(i.name);s&&s.reference(e)}else if(j.isVariableDeclaration(n))for(var a=n.declarations,o=Array.isArray(a),u=0,a=o?a:(0,y.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l,p=j.getBindingIdentifiers(c);for(var h in p){var f=r.getBinding(h);f&&f.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;a.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(a)}}},M=0,R=function(){function e(t,r){if((0,d.default)(this,e),r&&r.block===t.node)return r;var n=s(t,r,this);if(n)return n;this.uid=M++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,this.path=t,this.labels=new h.default}return e.prototype.traverse=function(e,t,r){(0,C.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp",t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";return j.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";e=j.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;j.isAssignmentExpression(e)?r=e.left:j.isVariableDeclarator(e)?r=e.id:(j.isObjectProperty(r)||j.isObjectMethod(r))&&(r=r.key);var n=[];a(r,n);var i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(i.slice(0,20))},e.prototype.isStatic=function(e){if(j.isThisExpression(e)||j.isSuper(e))return!0;if(j.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&("hoisted"!==t||"let"!==e.kind)){if("let"===t||"let"===e.kind||"const"===e.kind||"module"===e.kind||"param"===e.kind&&("let"===t||"const"===t))throw this.hub.file.buildCodeFrameError(n,k.get("scopeDuplicateDeclaration",r),TypeError)}},e.prototype.rename=function(e,t,r){var n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new A.default(n,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=(0,x.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(j.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(j.isArrayExpression(e))return e;if(j.isIdentifier(e,{name:"arguments"}))return j.callExpression(j.memberExpression(j.memberExpression(j.memberExpression(j.identifier("Array"),j.identifier("prototype")),j.identifier("slice")),j.identifier("call")),[e]);var i="toArray",s=[e];return!0===t?i="toConsumableArray":t&&(s.push(j.numericLiteral(t)),i="slicedToArray"),j.callExpression(r.addHelper(i),s)},e.prototype.hasLabel=function(e){return!!this.getLabel(e)},e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.registerLabel=function(e){this.labels.set(e.node.label.name,e)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=t,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;this.registerBinding(e.node.kind,a)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var o=e.get("specifiers"),u=o,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;this.registerBinding("module",h)}else if(e.isExportDeclaration()){var f=e.get("declaration");(f.isClassDeclaration()||f.isFunctionDeclaration()||f.isVariableDeclaration())&&this.registerDeclaration(f)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?j.unaryExpression("void",j.numericLiteral(0),!0):j.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r) -;n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration())for(var n=t.get("declarations"),i=n,s=Array.isArray(i),a=0,i=s?i:(0,y.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o;this.registerBinding(e,u)}else{var l=this.getProgramParent(),c=t.getBindingIdentifiers(!0);for(var p in c)for(var h=c[p],f=Array.isArray(h),d=0,h=f?h:(0,y.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if(d=h.next(),d.done)break;m=d.value}var g=m,b=this.getOwnBinding(p);if(b){if(b.identifier===g)continue;this.checkBlockScopedCollisions(b,e,p,g)}b&&b.path.isFlow()&&(b=null),l.references[p]=!0,this.bindings[p]=new T.default({identifier:g,existing:b,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(j.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(j.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(j.isClassBody(e)){for(var n=e.body,i=Array.isArray(n),s=0,n=i?n:(0,y.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(j.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(j.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),c=0,u=l?u:(0,y.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;if(!this.isPure(h,t))return!1}return!0}if(j.isObjectExpression(e)){for(var f=e.properties,d=Array.isArray(f),m=0,f=d?f:(0,y.default)(f);;){var g;if(d){if(m>=f.length)break;g=f[m++]}else{if(m=f.next(),m.done)break;g=m.value}var b=g;if(!this.isPure(b,t))return!1}return!0}return j.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):j.isClassProperty(e)||j.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):j.isUnaryExpression(e)?this.isPure(e.argument,t):j.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){I++,this._crawl(),I--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,c.default)(null),this.bindings=(0,c.default)(null),this.globals=(0,c.default)(null),this.uids=(0,c.default)(null),this.data=(0,c.default)(null),e.isLoop())for(var t=j.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[j.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[j.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var o=e.get("params"),u=o,l=Array.isArray(u),p=0,u=l?u:(0,y.default)(u);;){var h;if(l){if(p>=u.length)break;h=u[p++]}else{if(p=u.next(),p.done)break;h=p.value}var f=h;this.registerBinding("param",f)}if(e.isCatchClause()&&this.registerBinding("let",e),!this.getProgramParent().crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(L,d),this.crawling=!1;for(var m=d.assignments,g=Array.isArray(m),b=0,m=g?m:(0,y.default)(m);;){var v;if(g){if(b>=m.length)break;v=m[b++]}else{if(b=m.next(),b.done)break;v=b.value}var x=v,E=x.getBindingIdentifiers(),A=void 0;for(var D in E)x.scope.getBinding(D)||(A=A||x.scope.getProgramParent(),A.addGlobal(E[D]));x.scope.registerConstantViolation(x)}for(var C=d.references,S=Array.isArray(C),_=0,C=S?C:(0,y.default)(C);;){var w;if(S){if(_>=C.length)break;w=C[_++]}else{if(_=C.next(),_.done)break;w=_.value}var k=w,F=k.scope.getBinding(k.node.name);F?F.reference(k):k.scope.getProgramParent().addGlobal(k.node)}for(var T=d.constantViolations,P=Array.isArray(T),B=0,T=P?T:(0,y.default)(T);;){var O;if(P){if(B>=T.length)break;O=T[B++]}else{if(B=T.next(),B.done)break;O=B.value}var N=O;N.scope.registerConstantViolation(N)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(j.ensureBlock(t.node),t=t.get("body"));var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s="declaration:"+n+":"+i,a=!r&&t.getData(s);if(!a){var o=j.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i;a=t.unshiftContainer("body",[o])[0],r||t.setData(s,a)}var u=j.variableDeclarator(e.id,e.init);a.node.declarations.push(u),this.registerBinding(n,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=(0,c.default)(null),t=this;do{(0,_.default)(e,t.bindings),t=t.parent}while(t);return e},e.prototype.getAllBindingsOfKind=function(){for(var e=(0,c.default)(null),t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,y.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i,a=this;do{for(var o in a.bindings){var u=a.bindings[o];u.kind===s&&(e[o]=u)}a=a.parent}while(a)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.warnOnFlowBinding=function(e){return 0===I&&e&&e.path.isFlow()&&console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 6.8. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "),e},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return this.warnOnFlowBinding(r)}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.warnOnFlowBinding(this.bindings[e])},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return!!t&&(!!this.hasOwnBinding(t)||(!!this.parentHasBinding(t,r)||(!!this.hasUid(t)||(!(r||!(0,b.default)(e.globals,t))||!(r||!(0,b.default)(e.contextVariables,t))))))},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)},e}();R.globals=(0,u.default)(B.default.builtin),R.contextVariables=["arguments","undefined","Infinity","NaN"],r.default=R,t.exports=r.default},{"../cache":133,"../index":136,"./binding":154,"./lib/renamer":156,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/map":115,"babel-runtime/core-js/object/create":118,"babel-runtime/core-js/object/keys":120,"babel-runtime/helpers/classCallCheck":127,"babel-types":169,globals:303,"lodash/defaults":484,"lodash/includes":496,"lodash/repeat":519}],156:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=e("babel-runtime/helpers/classCallCheck"),s=n(i),a=e("../binding"),o=(n(a),e("babel-types")),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(o),l={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration":function(e,t){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}},c=function(){function e(t,r,n){(0,s.default)(this,e),this.newName=n,this.oldName=r,this.binding=t}return e.prototype.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath.isExportDeclaration()&&e.parentPath;if(t){var r=t.isExportDefaultDeclaration();r&&(e.isFunctionDeclaration()||e.isClassDeclaration())&&!e.node.id&&(e.node.id=e.scope.generateUidIdentifier("default"));var n=e.getOuterBindingIdentifiers(),i=[];for(var s in n){var a=s===this.oldName?this.newName:s,o=r?"default":s;i.push(u.exportSpecifier(u.identifier(a),u.identifier(o)))}if(i.length){var l=u.exportNamedDeclaration(null,i);e.isFunctionDeclaration()&&(l._blockHoist=3),t.insertAfter(l),t.replaceWith(e.node)}}},e.prototype.maybeConvertFromClassFunctionDeclaration=function(e){},e.prototype.maybeConvertFromClassFunctionExpression=function(e){},e.prototype.rename=function(e){var t=this.binding,r=this.oldName,n=this.newName,i=t.scope,s=t.path,a=s.find(function(e){return e.isDeclaration()||e.isFunctionExpression()});a&&this.maybeConvertFromExportDeclaration(a),i.traverse(e||i.block,l,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),t.type,a&&(this.maybeConvertFromClassFunctionDeclaration(a),this.maybeConvertFromClassFunctionExpression(a))},e}();r.default=c,t.exports=r.default},{"../binding":154,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],157:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!f(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];for(var i=r,s=Array.isArray(i),o=0,i=s?i:(0,x.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if(o=i.next(),o.done)break;u=o.value}var l=u;e[l]=n}}}a(e),delete e.__esModule,c(e),p(e);for(var m=(0,b.default)(e),y=Array.isArray(m),g=0,m=y?m:(0,x.default)(m);;){var v;if(y){if(g>=m.length)break;v=m[g++]}else{if(g=m.next(),g.done)break;v=g.value}var E=v;if(!f(E)){var D=A[E];if(D){var C=e[E];for(var S in C)C[S]=h(D,C[S]);if(delete e[E],D.types)for(var w=D.types,F=Array.isArray(w),T=0,w=F?w:(0,x.default)(w);;){var P;if(F){if(T>=w.length)break;P=w[T++]}else{if(T=w.next(),T.done)break;P=T.value}var B=P;e[B]?d(e[B],C):e[B]=C}else d(e,C)}}}for(var O in e)if(!f(O)){var j=e[O],N=_.FLIPPED_ALIAS_KEYS[O],I=_.DEPRECATED_KEYS[O];if(I&&(console.trace("Visitor defined for "+O+" but it has been renamed to "+I),N=[I]),N){delete e[O];for(var L=N,M=Array.isArray(L),R=0,L=M?L:(0,x.default)(L);;){var U;if(M){if(R>=L.length)break;U=L[R++]}else{if(R=L.next(),R.done)break;U=R.value}var V=U,q=e[V];q?d(q,j):e[V]=(0,k.default)(j)}}}for(var G in e)f(G)||p(e[G]);return e}function a(e){if(!e._verified){if("function"==typeof e)throw new Error(C.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||o(t,e[t]),!f(t)){if(_.TYPES.indexOf(t)<0)throw new Error(C.get("traverseVerifyNodeType",t));var r=e[t];if("object"===(void 0===r?"undefined":(0,y.default)(r)))for(var n in r){if("enter"!==n&&"exit"!==n)throw new Error(C.get("traverseVerifyVisitorProperty",t,n));o(t+"."+n,r[n])}}e._verified=!0}}function o(e,t){for(var r=[].concat(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,x.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if("function"!=typeof o)throw new TypeError("Non-function found defined in "+e+" with type "+(void 0===o?"undefined":(0,y.default)(o)))}}function u(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n={},i=0;i","<",">=","<="]),a=r.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],o=r.COMPARISON_BINARY_OPERATORS=[].concat(a,["in","instanceof"]),u=r.BOOLEAN_BINARY_OPERATORS=[].concat(o,s),l=r.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],c=(r.BINARY_OPERATORS=["+"].concat(l,u),r.BOOLEAN_UNARY_OPERATORS=["delete","!"]),p=r.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"],h=r.STRING_UNARY_OPERATORS=["typeof"];r.UNARY_OPERATORS=["void"].concat(c,p,h),r.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},r.BLOCK_SCOPED_SYMBOL=(0,i.default)("var used to be block scoped"),r.NOT_LOCAL_BINDING=(0,i.default)("should not be considered a local binding")},{"babel-runtime/core-js/symbol/for":123}],159:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key||e.property;return e.computed||C.isIdentifier(t)&&(t=C.stringLiteral(t.name)),t}function s(e,t){function r(e){for(var s=!1,a=[],o=e,u=Array.isArray(o),l=0,o=u?o:(0,b.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if(l=o.next(),l.done)break;c=l.value}var p=c;if(C.isExpression(p))a.push(p);else if(C.isExpressionStatement(p))a.push(p.expression);else{if(C.isVariableDeclaration(p)){if("var"!==p.kind)return i=!0;for(var h=p.declarations,f=Array.isArray(h),d=0,h=f?h:(0,b.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if(d=h.next(),d.done)break;m=d.value}var y=m,g=C.getBindingIdentifiers(y);for(var v in g)n.push({kind:p.kind,id:g[v]});y.init&&a.push(C.assignmentExpression("=",y.id,y.init))}s=!0;continue}if(C.isIfStatement(p)){var x=p.consequent?r([p.consequent]):t.buildUndefinedNode(),E=p.alternate?r([p.alternate]):t.buildUndefinedNode();if(!x||!E)return i=!0;a.push(C.conditionalExpression(p.test,x,E))}else{if(!C.isBlockStatement(p)){if(C.isEmptyStatement(p)){s=!0;continue}return i=!0}a.push(r(p.body))}}s=!1}return(s||0===a.length)&&a.push(t.buildUndefinedNode()),1===a.length?a[0]:C.sequenceExpression(a)}if(e&&e.length){var n=[],i=!1,s=r(e);if(!i){for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:e.key,r=void 0;return"method"===e.kind?a.increment()+"":(r=C.isIdentifier(t)?t.name:C.isStringLiteral(t)?(0,y.default)(t.value):(0,y.default)(C.removePropertiesDeep(C.cloneDeep(t))),e.computed&&(r="["+r+"]"),e.static&&(r="static:"+r),r)}function o(e){return e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),C.isValidIdentifier(e)||(e="_"+e),e||"_"}function u(e){return e=o(e),"eval"!==e&&"arguments"!==e||(e="_"+e),e}function l(e,t){if(C.isStatement(e))return e;var r=!1,n=void 0;if(C.isClass(e))r=!0,n="ClassDeclaration";else if(C.isFunction(e))r=!0,n="FunctionDeclaration";else if(C.isAssignmentExpression(e))return C.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e}function c(e){if(C.isExpressionStatement(e)&&(e=e.expression),C.isExpression(e))return e;if(C.isClass(e)?e.type="ClassExpression":C.isFunction(e)&&(e.type="FunctionExpression"),!C.isExpression(e))throw new Error("cannot turn "+e.type+" to an expression");return e}function p(e,t){return C.isBlockStatement(e)?e:(C.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(C.isStatement(e)||(e=C.isFunction(t)?C.returnStatement(e):C.expressionStatement(e)),e=[e]),C.blockStatement(e))}function h(e){if(void 0===e)return C.identifier("undefined");if(!0===e||!1===e)return C.booleanLiteral(e);if(null===e)return C.nullLiteral();if("string"==typeof e)return C.stringLiteral(e);if("number"==typeof e)return C.numericLiteral(e);if((0,A.default)(e)){var t=e.source,r=e.toString().match(/\/([a-z]+|)$/)[1];return C.regExpLiteral(t,r)}if(Array.isArray(e))return C.arrayExpression(e.map(C.valueToNode));if((0,x.default)(e)){var n=[];for(var i in e){var s=void 0;s=C.isValidIdentifier(i)?C.identifier(i):C.stringLiteral(i),n.push(C.objectProperty(s,C.valueToNode(e[i])))}return C.objectExpression(n)}throw new Error("don't know how to turn this value into a node")}r.__esModule=!0;var f=e("babel-runtime/core-js/number/max-safe-integer"),d=n(f),m=e("babel-runtime/core-js/json/stringify"),y=n(m),g=e("babel-runtime/core-js/get-iterator"),b=n(g);r.toComputedKey=i,r.toSequenceExpression=s,r.toKeyAlias=a,r.toIdentifier=o,r.toBindingIdentifierName=u,r.toStatement=l,r.toExpression=c,r.toBlock=p,r.valueToNode=h;var v=e("lodash/isPlainObject"),x=n(v),E=e("lodash/isRegExp"),A=n(E),D=e("./index"),C=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(D);a.uid=0,a.increment=function(){return a.uid>=d.default?a.uid=0:a.uid++}},{"./index":169,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/number/max-safe-integer":116,"lodash/isPlainObject":507,"lodash/isRegExp":508}],160:[function(e,t,r){"use strict";var n=e("../index"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n),s=e("../constants"),a=e("./index"),o=function(e){return e&&e.__esModule?e:{default:e}}(a);(0,o.default)("ArrayExpression",{fields:{elements:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,o.default)("AssignmentExpression",{fields:{operator:{validate:(0,a.assertValueType)("string")},left:{validate:(0,a.assertNodeType)("LVal")},right:{validate:(0,a.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),(0,o.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:a.assertOneOf.apply(void 0,s.BINARY_OPERATORS)},left:{validate:(0,a.assertNodeType)("Expression")},right:{validate:(0,a.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),(0,o.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,a.assertNodeType)("DirectiveLiteral")}}}),(0,o.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}}}),(0,o.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Directive"))),default:[]},body:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),(0,o.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,o.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,a.assertNodeType)("Expression")},arguments:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]}),(0,o.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,a.assertNodeType)("Identifier")},body:{validate:(0,a.assertNodeType)("BlockStatement")}},aliases:["Scopable"]}),(0,o.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Expression")},alternate:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),(0,o.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,a.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,o.default)("DebuggerStatement",{aliases:["Statement"]}),(0,o.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),(0,o.default)("EmptyStatement",{aliases:["Statement"]}),(0,o.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,a.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),(0,o.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,a.assertNodeType)("Program")}}}),(0,o.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,a.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,a.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},update:{validate:(0,a.assertNodeType)("Expression"),optional:!0},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,a.assertNodeType)("Identifier")},params:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("LVal")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,o.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,a.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("LVal")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}}}),(0,o.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){i.isValidIdentifier(r)}},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))}}}),(0,o.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},consequent:{validate:(0,a.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,a.assertNodeType)("Identifier")},body:{validate:(0,a.assertNodeType)("Statement")}}}),(0,o.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,a.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,a.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,o.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,a.assertValueType)("string")},flags:{validate:(0,a.assertValueType)("string"),default:""}}}),(0,o.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:a.assertOneOf.apply(void 0,s.LOGICAL_OPERATORS)},left:{validate:(0,a.assertNodeType)("Expression")},right:{validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,a.assertNodeType)("Expression")},property:{validate:function(e,t,r){var n=e.computed?"Expression":"Identifier";(0,a.assertNodeType)(n)(e,t,r)}},computed:{default:!1}}}),(0,o.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,a.assertNodeType)("Expression")},arguments:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression","SpreadElement")))}}}),(0,o.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Directive"))),default:[]},body:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,o.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,o.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,a.chain)((0,a.assertValueType)("string"),(0,a.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,a.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];a.assertNodeType.apply(void 0,n)(e,t,r)}},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))},body:{validate:(0,a.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,a.assertValueType)("boolean")},async:{default:!1,validate:(0,a.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,o.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,a.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];a.assertNodeType.apply(void 0,n)(e,t,r)}},value:{validate:(0,a.assertNodeType)("Expression")},shorthand:{validate:(0,a.assertValueType)("boolean"),default:!1},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]}),(0,o.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,a.assertNodeType)("LVal")},decorators:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Decorator")))}}}),(0,o.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression"),optional:!0}}}),(0,o.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,o.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,a.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("Statement")))}}}),(0,o.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,a.assertNodeType)("Expression")},cases:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("SwitchCase")))}}}),(0,o.default)("ThisExpression",{aliases:["Expression"]}),(0,o.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,a.assertNodeType)("BlockStatement")},handler:{optional:!0, -handler:(0,a.assertNodeType)("BlockStatement")},finalizer:{optional:!0,validate:(0,a.assertNodeType)("BlockStatement")}}}),(0,o.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,a.assertNodeType)("Expression")},operator:{validate:a.assertOneOf.apply(void 0,s.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,o.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:(0,a.assertNodeType)("Expression")},operator:{validate:a.assertOneOf.apply(void 0,s.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),(0,o.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,a.chain)((0,a.assertValueType)("string"),(0,a.assertOneOf)("var","let","const"))},declarations:{validate:(0,a.chain)((0,a.assertValueType)("array"),(0,a.assertEach)((0,a.assertNodeType)("VariableDeclarator")))}}}),(0,o.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,a.assertNodeType)("LVal")},init:{optional:!0,validate:(0,a.assertNodeType)("Expression")}}}),(0,o.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("BlockStatement","Statement")}}}),(0,o.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,a.assertNodeType)("Expression")},body:{validate:(0,a.assertNodeType)("BlockStatement","Statement")}}})},{"../constants":158,"../index":169,"./index":164}],161:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,n.assertNodeType)("Identifier")},right:{validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ClassMethod","ClassProperty")))}}}),(0,i.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}}),(0,i.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("Declaration"),optional:!0},specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ExportSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral"),optional:!0}}}),(0,i.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},imported:{validate:(0,n.assertNodeType)("Identifier")},importKind:{validate:(0,n.assertOneOf)(null,"type","typeof")}}}),(0,i.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,n.assertValueType)("string")},property:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,n.chain)((0,n.assertValueType)("string"),(0,n.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:!1,validate:(0,n.assertValueType)("boolean")},static:{default:!1,validate:(0,n.assertValueType)("boolean")},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];n.assertNodeType.apply(void 0,i)(e,t,r)}},params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,n.assertValueType)("boolean")},async:{default:!1,validate:(0,n.assertValueType)("boolean")}}}),(0,i.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("Super",{aliases:["Expression"]}),(0,i.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,n.assertNodeType)("Expression")},quasi:{validate:(0,n.assertNodeType)("TemplateLiteral")}}}),(0,i.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TemplateElement")))},expressions:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))}}}),(0,i.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,n.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],162:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,i.default)("Import",{aliases:["Expression"]}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("LVal")}}}),(0,i.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],163:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,i.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,i.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,i.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,i.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),(0,i.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{"./index":164}],164:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":void 0===e?"undefined":(0,g.default)(e)}function s(e){function t(t,r,n){if(Array.isArray(n))for(var i=0;i=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u;if(v.is(l,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,m.default)(r)+" but instead got "+(0,m.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;if(i(n)===c||v.is(c,n)){s=!0;break}}if(!s)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,m.default)(r)+" but instead got "+(0,m.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n=e.length)break;i=e[n++]}else{if(n=e.next(),n.done)break;i=n.value}i.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&S[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(C[t.deprecatedAlias]=e);for(var n=t.visitor.concat(t.builder),s=Array.isArray(n),a=0,n=s?n:(0,f.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if(a=n.next(),a.done)break;o=a.value}var u=o;t.fields[u]=t.fields[u]||{}}for(var c in t.fields){var p=t.fields[c];-1===t.builder.indexOf(c)&&(p.optional=!0),void 0===p.default?p.default=null:p.validate||(p.validate=l(i(p.default)))}x[e]=t.visitor,D[e]=t.builder,A[e]=t.fields,E[e]=t.aliases,S[e]=t}r.__esModule=!0,r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=void 0;var h=e("babel-runtime/core-js/get-iterator"),f=n(h),d=e("babel-runtime/core-js/json/stringify"),m=n(d),y=e("babel-runtime/helpers/typeof"),g=n(y);r.assertEach=s,r.assertOneOf=a,r.assertNodeType=o,r.assertNodeOrValueType=u,r.assertValueType=l,r.chain=c,r.default=p;var b=e("../index"),v=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(b),x=r.VISITOR_KEYS={},E=r.ALIAS_KEYS={},A=r.NODE_FIELDS={},D=r.BUILDER_KEYS={},C=r.DEPRECATED_KEYS={},S={}},{"../index":169,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/helpers/typeof":131}],165:[function(e,t,r){"use strict";e("./index"),e("./core"),e("./es2015"),e("./flow"),e("./jsx"),e("./misc"),e("./experimental")},{"./core":160,"./es2015":161,"./experimental":162,"./flow":163,"./index":164,"./jsx":166,"./misc":167}],166:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}}),(0,i.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,i.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement")))}}}),(0,i.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]}),(0,i.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,n.assertValueType)("boolean")},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}}),(0,i.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}})},{"./index":164}],167:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("Noop",{visitor:[]}),(0,i.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],168:[function(e,t,r){"use strict";function n(e){var t=i(e);return 1===t.length?t[0]:o.unionTypeAnnotation(t)}function i(e){for(var t={},r={},n=[],s=[],a=0;a=0)){if(o.isAnyTypeAnnotation(u))return[u];if(o.isFlowBaseAnnotation(u))r[u.type]=u;else if(o.isUnionTypeAnnotation(u))n.indexOf(u.types)<0&&(e=e.concat(u.types),n.push(u.types));else if(o.isGenericTypeAnnotation(u)){var l=u.id.name;if(t[l]){var c=t[l];c.typeParameters?u.typeParameters&&(c.typeParameters.params=i(c.typeParameters.params.concat(u.typeParameters.params))):c=u.typeParameters}else t[l]=u}else s.push(u)}}for(var p in r)s.push(r[p]);for(var h in t)s.push(t[h]);return s}function s(e){if("string"===e)return o.stringTypeAnnotation();if("number"===e)return o.numberTypeAnnotation();if("undefined"===e)return o.voidTypeAnnotation();if("boolean"===e)return o.booleanTypeAnnotation();if("function"===e)return o.genericTypeAnnotation(o.identifier("Function"));if("object"===e)return o.genericTypeAnnotation(o.identifier("Object"));if("symbol"===e)return o.genericTypeAnnotation(o.identifier("Symbol"));throw new Error("Invalid typeof value")}r.__esModule=!0,r.createUnionTypeAnnotation=n,r.removeTypeDuplicates=i,r.createTypeAnnotationBasedOnTypeof=s;var a=e("./index"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a)},{"./index":169}],169:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=H["is"+e];t||(t=H["is"+e]=function(t,r){return H.is(e,t,r)}),H["assert"+e]=function(r,n){if(n=n||{},!t(r,n))throw new Error("Expected type "+(0,N.default)(e)+" with option "+(0,N.default)(n))}}function s(e,t,r){return!!t&&(!!a(t.type,e)&&(void 0===r||H.shallowEqual(t,r)))}function a(e,t){if(e===t)return!0;if(H.ALIAS_KEYS[t])return!1;var r=H.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,P.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}if(e===a)return!0}}return!1}function o(e,t,r){if(e){var n=H.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function u(e,t){for(var r=(0,O.default)(t),n=r,i=Array.isArray(n),s=0,n=i?n:(0,P.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if(e[o]!==t[o])return!1}return!0}function l(e,t,r){return e.object=H.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e}function c(e,t){return e.object=H.memberExpression(t,e.object),e}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=H.toBlock(e[t],e)}function h(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function f(e){var t=h(e);return delete t.loc,t}function d(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=H.cloneDeep(n):Array.isArray(n)&&(n=n.map(H.cloneDeep))),t[r]=n}return t}function m(e,t){var r=e.split(".");return function(e){if(!H.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(H.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!H.isStringLiteral(s)){if(H.isMemberExpression(s)){if(s.computed&&!H.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}}function y(e){for(var t=H.COMMENT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,P.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}delete e[i]}return e}function g(e,t){return b(e,t),v(e,t),x(e,t),e}function b(e,t){E("trailingComments",e,t)}function v(e,t){E("leadingComments",e,t)}function x(e,t){E("innerComments",e,t)}function E(e,t,r){t&&r&&(t[e]=(0,W.default)([].concat(t[e],r[e]).filter(Boolean)))}function A(e,t){if(!e||!t)return e;for(var r=H.INHERIT_KEYS.optional,n=Array.isArray(r),i=0,r=n?r:(0,P.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=H.INHERIT_KEYS.force,l=Array.isArray(u),c=0,u=l?u:(0,P.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;e[h]=t[h]}return H.inheritsComments(e,t),e}function D(e){if(!C(e))throw new TypeError("Not a valid node "+(e&&e.type))}function C(e){return!(!e||!K.VISITOR_KEYS[e.type])}function S(e,t,r){if(e){var n=H.VISITOR_KEYS[e.type];if(n){r=r||{},t(e,r);for(var i=n,s=Array.isArray(i),a=0,i=s?i:(0,P.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if(a=i.next(),a.done)break;o=a.value}var u=o,l=e[u];if(Array.isArray(l))for(var c=l,p=Array.isArray(c),h=0,c=p?c:(0,P.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;S(d,t,r)}else S(l,t,r)}}}}function _(e,t){t=t||{};for(var r=t.preserveComments?Z:ee,n=r,i=Array.isArray(n),s=0,n=i?n:(0,P.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;null!=e[o]&&(e[o]=void 0)}for(var u in e)"_"===u[0]&&null!=e[u]&&(e[u]=void 0);for(var l=(0,F.default)(e),c=l,p=Array.isArray(c),h=0,c=p?c:(0,P.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}e[f]=null}}function w(e,t){return S(e,_,t),e}r.__esModule=!0,r.createTypeAnnotationBasedOnTypeof=r.removeTypeDuplicates=r.createUnionTypeAnnotation=r.valueToNode=r.toBlock=r.toExpression=r.toStatement=r.toBindingIdentifierName=r.toIdentifier=r.toKeyAlias=r.toSequenceExpression=r.toComputedKey=r.isNodesEquivalent=r.isImmutable=r.isScope=r.isSpecifierDefault=r.isVar=r.isBlockScoped=r.isLet=r.isValidIdentifier=r.isReferenced=r.isBinding=r.getOuterBindingIdentifiers=r.getBindingIdentifiers=r.TYPES=r.react=r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var k=e("babel-runtime/core-js/object/get-own-property-symbols"),F=n(k),T=e("babel-runtime/core-js/get-iterator"),P=n(T),B=e("babel-runtime/core-js/object/keys"),O=n(B),j=e("babel-runtime/core-js/json/stringify"),N=n(j),I=e("./constants");Object.defineProperty(r,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return I.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(r,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return I.FLATTENABLE_KEYS}}),Object.defineProperty(r,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return I.FOR_INIT_KEYS}}),Object.defineProperty(r,"COMMENT_KEYS",{enumerable:!0,get:function(){return I.COMMENT_KEYS}}),Object.defineProperty(r,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return I.LOGICAL_OPERATORS}}),Object.defineProperty(r,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return I.UPDATE_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(r,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return I.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"BINARY_OPERATORS",{enumerable:!0,get:function(){return I.BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return I.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return I.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(r,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return I.STRING_UNARY_OPERATORS}}),Object.defineProperty(r,"UNARY_OPERATORS",{enumerable:!0,get:function(){return I.UNARY_OPERATORS}}),Object.defineProperty(r,"INHERIT_KEYS",{enumerable:!0,get:function(){return I.INHERIT_KEYS}}),Object.defineProperty(r,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return I.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(r,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return I.NOT_LOCAL_BINDING}}),r.is=s,r.isType=a,r.validate=o,r.shallowEqual=u,r.appendToMemberExpression=l,r.prependToMemberExpression=c,r.ensureBlock=p,r.clone=h,r.cloneWithoutLoc=f,r.cloneDeep=d,r.buildMatchMemberExpression=m,r.removeComments=y,r.inheritsComments=g,r.inheritTrailingComments=b,r.inheritLeadingComments=v,r.inheritInnerComments=x,r.inherits=A,r.assertNode=D,r.isNode=C,r.traverseFast=S,r.removeProperties=_,r.removePropertiesDeep=w;var L=e("./retrievers");Object.defineProperty(r,"getBindingIdentifiers",{enumerable:!0,get:function(){return L.getBindingIdentifiers}}),Object.defineProperty(r,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return L.getOuterBindingIdentifiers}});var M=e("./validators");Object.defineProperty(r,"isBinding",{enumerable:!0,get:function(){return M.isBinding}}),Object.defineProperty(r,"isReferenced",{enumerable:!0,get:function(){return M.isReferenced}}), -Object.defineProperty(r,"isValidIdentifier",{enumerable:!0,get:function(){return M.isValidIdentifier}}),Object.defineProperty(r,"isLet",{enumerable:!0,get:function(){return M.isLet}}),Object.defineProperty(r,"isBlockScoped",{enumerable:!0,get:function(){return M.isBlockScoped}}),Object.defineProperty(r,"isVar",{enumerable:!0,get:function(){return M.isVar}}),Object.defineProperty(r,"isSpecifierDefault",{enumerable:!0,get:function(){return M.isSpecifierDefault}}),Object.defineProperty(r,"isScope",{enumerable:!0,get:function(){return M.isScope}}),Object.defineProperty(r,"isImmutable",{enumerable:!0,get:function(){return M.isImmutable}}),Object.defineProperty(r,"isNodesEquivalent",{enumerable:!0,get:function(){return M.isNodesEquivalent}});var R=e("./converters");Object.defineProperty(r,"toComputedKey",{enumerable:!0,get:function(){return R.toComputedKey}}),Object.defineProperty(r,"toSequenceExpression",{enumerable:!0,get:function(){return R.toSequenceExpression}}),Object.defineProperty(r,"toKeyAlias",{enumerable:!0,get:function(){return R.toKeyAlias}}),Object.defineProperty(r,"toIdentifier",{enumerable:!0,get:function(){return R.toIdentifier}}),Object.defineProperty(r,"toBindingIdentifierName",{enumerable:!0,get:function(){return R.toBindingIdentifierName}}),Object.defineProperty(r,"toStatement",{enumerable:!0,get:function(){return R.toStatement}}),Object.defineProperty(r,"toExpression",{enumerable:!0,get:function(){return R.toExpression}}),Object.defineProperty(r,"toBlock",{enumerable:!0,get:function(){return R.toBlock}}),Object.defineProperty(r,"valueToNode",{enumerable:!0,get:function(){return R.valueToNode}});var U=e("./flow");Object.defineProperty(r,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return U.createUnionTypeAnnotation}}),Object.defineProperty(r,"removeTypeDuplicates",{enumerable:!0,get:function(){return U.removeTypeDuplicates}}),Object.defineProperty(r,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return U.createTypeAnnotationBasedOnTypeof}});var V=e("to-fast-properties"),q=n(V),G=e("lodash/clone"),X=n(G),J=e("lodash/uniq"),W=n(J);e("./definitions/init");var K=e("./definitions"),z=e("./react"),Y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(z),H=r;r.VISITOR_KEYS=K.VISITOR_KEYS,r.ALIAS_KEYS=K.ALIAS_KEYS,r.NODE_FIELDS=K.NODE_FIELDS,r.BUILDER_KEYS=K.BUILDER_KEYS,r.DEPRECATED_KEYS=K.DEPRECATED_KEYS,r.react=Y;for(var $ in H.VISITOR_KEYS)i($);H.FLIPPED_ALIAS_KEYS={},(0,O.default)(H.ALIAS_KEYS).forEach(function(e){H.ALIAS_KEYS[e].forEach(function(t){(H.FLIPPED_ALIAS_KEYS[t]=H.FLIPPED_ALIAS_KEYS[t]||[]).push(e)})}),(0,O.default)(H.FLIPPED_ALIAS_KEYS).forEach(function(e){H[e.toUpperCase()+"_TYPES"]=H.FLIPPED_ALIAS_KEYS[e],i(e)});r.TYPES=(0,O.default)(H.VISITOR_KEYS).concat((0,O.default)(H.FLIPPED_ALIAS_KEYS)).concat((0,O.default)(H.DEPRECATED_KEYS));(0,O.default)(H.BUILDER_KEYS).forEach(function(e){function t(){if(arguments.length>r.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+r.length);var t={};t.type=e;for(var n=0,i=r,s=Array.isArray(i),a=0,i=s?i:(0,P.default)(i);;){var u;if(s){if(a>=i.length)break;u=i[a++]}else{if(a=i.next(),a.done)break;u=a.value}var l=u,c=H.NODE_FIELDS[e][l],p=arguments[n++];void 0===p&&(p=(0,X.default)(c.default)),t[l]=p}for(var h in t)o(t,h,t[h]);return t}var r=H.BUILDER_KEYS[e];H[e]=t,H[e[0].toLowerCase()+e.slice(1)]=t});for(var Q in H.DEPRECATED_KEYS)!function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=H.DEPRECATED_KEYS[e];H[e]=H[e[0].toLowerCase()+e.slice(1)]=t(H[r]),H["is"+e]=t(H["is"+r]),H["assert"+e]=t(H["assert"+r])}(Q);(0,q.default)(H),(0,q.default)(H.VISITOR_KEYS);var Z=["tokens","start","end","loc","raw","rawValue"],ee=H.COMMENT_KEYS.concat(["comments"]).concat(Z)},{"./constants":158,"./converters":159,"./definitions":164,"./definitions/init":165,"./flow":168,"./react":170,"./retrievers":171,"./validators":172,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/object/get-own-property-symbols":119,"babel-runtime/core-js/object/keys":120,"lodash/clone":480,"lodash/uniq":529,"to-fast-properties":595}],170:[function(e,t,r){"use strict";function n(e){return!!e&&/^[a-z]|\-/.test(e)}function i(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,i=0;i=0)return!0}else if(s===e)return!0}return!1}function s(e,t){switch(t.type){case"BindExpression":return t.object===e||t.callee===e;case"MemberExpression":case"JSXMemberExpression":return!(t.property!==e||!t.computed)||t.object===e;case"MetaProperty":return!1;case"ObjectProperty":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var r=t.params,n=Array.isArray(r),i=0,r=n?r:(0,v.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}if(s===e)return!1}return t.id!==e;case"ExportSpecifier":return!t.source&&t.local===e;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.key===e?t.computed:t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"ClassMethod":case"ObjectMethod":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0}function a(e){return"string"==typeof e&&!A.default.keyword.isReservedWordES6(e,!0)&&A.default.keyword.isIdentifierNameES6(e)}function o(e){return C.isVariableDeclaration(e)&&("var"!==e.kind||e[S.BLOCK_SCOPED_SYMBOL])}function u(e){return C.isFunctionDeclaration(e)||C.isClassDeclaration(e)||C.isLet(e)}function l(e){return C.isVariableDeclaration(e,{kind:"var"})&&!e[S.BLOCK_SCOPED_SYMBOL]}function c(e){return C.isImportDefaultSpecifier(e)||C.isIdentifier(e.imported||e.exported,{name:"default"})}function p(e,t){return(!C.isBlockStatement(e)||!C.isFunction(t,{body:e}))&&C.isScopable(e)}function h(e){return!!C.isType(e.type,"Immutable")||!!C.isIdentifier(e)&&"undefined"===e.name}function f(e,t){if("object"!==(void 0===e?"undefined":(0,g.default)(e))||"object"!==(void 0===e?"undefined":(0,g.default)(e))||null==e||null==t)return e===t;if(e.type!==t.type)return!1;for(var r=(0,m.default)(C.NODE_FIELDS[e.type]||e.type),n=r,i=Array.isArray(n),s=0,n=i?n:(0,v.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;if((0,g.default)(e[o])!==(0,g.default)(t[o]))return!1;if(Array.isArray(e[o])){if(!Array.isArray(t[o]))return!1;if(e[o].length!==t[o].length)return!1;for(var u=0;u=0}}function i(e,t){for(var r=65536,n=0;ne)return!1;if((r+=t[n+1])>=e)return!0}}function s(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&E.test(String.fromCharCode(e)):i(e,D)))}function a(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&A.test(String.fromCharCode(e)):i(e,D)||i(e,C))))}function o(e){var t={};for(var r in S)t[r]=e&&r in e?e[r]:S[r];return t}function u(e){return 10===e||13===e||8232===e||8233===e}function l(e,t){for(var r=1,n=0;;){L.lastIndex=n;var i=L.exec(e);if(!(i&&i.index>10),56320+(e-65536&1023))}function p(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function h(e){return e[e.length-1]}function f(e){return e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}function d(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?d(e.object)+"."+d(e.property):void 0}function m(e,t){return new z(t,e).parse()}function y(e,t){var r=new z(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}Object.defineProperty(r,"__esModule",{value:!0});var g={6:n("enum await"),strict:n("implements interface let package private protected public static yield"),strictBind:n("eval arguments")},b=n("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),v="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",x="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",E=new RegExp("["+v+"]"),A=new RegExp("["+v+x+"]");v=x=null;var D=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],C=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],S={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},k=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},F=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},T=!0,P=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},B=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return w(this,t),n.keyword=r,F(this,e.call(this,r,n))}return k(t,e),t}(P),O=function(e){function t(r,n){return w(this,t),F(this,e.call(this,r,{beforeExpr:T,binop:n}))}return k(t,e),t}(P),j={num:new P("num",{startsExpr:!0}),regexp:new P("regexp",{startsExpr:!0}),string:new P("string",{startsExpr:!0}),name:new P("name",{startsExpr:!0}),eof:new P("eof"),bracketL:new P("[",{beforeExpr:T,startsExpr:!0}),bracketR:new P("]"),braceL:new P("{",{beforeExpr:T,startsExpr:!0}),braceBarL:new P("{|",{beforeExpr:T,startsExpr:!0}),braceR:new P("}"),braceBarR:new P("|}"),parenL:new P("(",{beforeExpr:T,startsExpr:!0}),parenR:new P(")"),comma:new P(",",{beforeExpr:T}),semi:new P(";",{beforeExpr:T}),colon:new P(":",{beforeExpr:T}),doubleColon:new P("::",{beforeExpr:T}),dot:new P("."),question:new P("?",{beforeExpr:T}),arrow:new P("=>",{beforeExpr:T}),template:new P("template"),ellipsis:new P("...",{beforeExpr:T}),backQuote:new P("`",{startsExpr:!0}),dollarBraceL:new P("${",{beforeExpr:T,startsExpr:!0}),at:new P("@"),eq:new P("=",{beforeExpr:T,isAssign:!0}),assign:new P("_=",{beforeExpr:T,isAssign:!0}),incDec:new P("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new P("prefix",{beforeExpr:T,prefix:!0,startsExpr:!0}),logicalOR:new O("||",1),logicalAND:new O("&&",2),bitwiseOR:new O("|",3),bitwiseXOR:new O("^",4),bitwiseAND:new O("&",5),equality:new O("==/!=",6),relational:new O("",7),bitShift:new O("<>",8),plusMin:new P("+/-",{beforeExpr:T,binop:9,prefix:!0,startsExpr:!0}),modulo:new O("%",10),star:new O("*",10),slash:new O("/",10),exponent:new P("**",{beforeExpr:T,binop:11,rightAssociative:!0})},N={break:new B("break"),case:new B("case",{beforeExpr:T}),catch:new B("catch"),continue:new B("continue"),debugger:new B("debugger"),default:new B("default",{beforeExpr:T}),do:new B("do",{isLoop:!0,beforeExpr:T}),else:new B("else",{beforeExpr:T}),finally:new B("finally"),for:new B("for",{isLoop:!0}),function:new B("function",{startsExpr:!0}),if:new B("if"),return:new B("return",{beforeExpr:T}),switch:new B("switch"),throw:new B("throw",{beforeExpr:T}),try:new B("try"),var:new B("var"),let:new B("let"),const:new B("const"),while:new B("while",{isLoop:!0}),with:new B("with"),new:new B("new",{beforeExpr:T,startsExpr:!0}),this:new B("this",{startsExpr:!0}),super:new B("super",{startsExpr:!0}),class:new B("class"),extends:new B("extends",{beforeExpr:T}),export:new B("export"),import:new B("import"),yield:new B("yield",{beforeExpr:T,startsExpr:!0}),null:new B("null",{startsExpr:!0}),true:new B("true",{startsExpr:!0}),false:new B("false",{startsExpr:!0}),in:new B("in",{beforeExpr:T,binop:7}),instanceof:new B("instanceof",{beforeExpr:T,binop:7}),typeof:new B("typeof",{beforeExpr:T,prefix:!0,startsExpr:!0}),void:new B("void",{beforeExpr:T,prefix:!0,startsExpr:!0}),delete:new B("delete",{beforeExpr:T,prefix:!0,startsExpr:!0})};Object.keys(N).forEach(function(e){j["_"+e]=N[e]});var I=/\r\n?|\n|\u2028|\u2029/,L=new RegExp(I.source,"g"),M=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=function e(t,r,n,i){w(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},U={braceStatement:new R("{",!1),braceExpression:new R("{",!0),templateQuasi:new R("${",!0),parenStatement:new R("(",!1),parenExpression:new R("(",!0),template:new R("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new R("function",!0)};j.parenR.updateContext=j.braceR.updateContext=function(){if(1===this.state.context.length)return void(this.state.exprAllowed=!0);var e=this.state.context.pop();e===U.braceStatement&&this.curContext()===U.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===U.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr},j.name.updateContext=function(e){this.state.exprAllowed=!1,e!==j._let&&e!==j._const&&e!==j._var||I.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},j.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?U.braceStatement:U.braceExpression),this.state.exprAllowed=!0},j.dollarBraceL.updateContext=function(){this.state.context.push(U.templateQuasi),this.state.exprAllowed=!0},j.parenL.updateContext=function(e){var t=e===j._if||e===j._for||e===j._with||e===j._while;this.state.context.push(t?U.parenStatement:U.parenExpression),this.state.exprAllowed=!0},j.incDec.updateContext=function(){},j._function.updateContext=function(){this.curContext()!==U.braceStatement&&this.state.context.push(U.functionExpression),this.state.exprAllowed=!1},j.backQuote.updateContext=function(){this.curContext()===U.template?this.state.context.pop():this.state.context.push(U.template),this.state.exprAllowed=!1};var V=function e(t,r){w(this,e),this.line=t,this.column=r},q=function e(t,r){w(this,e),this.start=t,this.end=r},G=function(){function e(){w(this,e)}return e.prototype.init=function(e,t){return this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=j.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[U.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new V(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),X=function e(t){w(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new q(t.startLoc,t.endLoc)},J=function(){function e(t,r){w(this,e),this.state=new G,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new X(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return b(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(j.num)||this.match(j.string)){for(this.state.pos=this.state.start;this.state.pos=this.input.length?this.finishToken(j.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return s(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new q(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,L.lastIndex=t;for(var n=void 0;(n=L.exec(this.input))&&n.index8&&e<14||e>=5760&&M.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(j.ellipsis)):(++this.state.pos,this.finishToken(j.dot))},e.prototype.readToken_slash=function(){return this.state.exprAllowed?(++this.state.pos,this.readRegexp()):61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.assign,2):this.finishOp(j.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?j.star:j.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=j.exponent),61===n&&(r++,t=j.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?j.logicalOR:j.logicalAND,2):61===t?this.finishOp(j.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(j.braceBarR,2):this.finishOp(124===e?j.bitwiseOR:j.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.assign,2):this.finishOp(j.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&I.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(j.incDec,2):61===t?this.finishOp(j.assign,2):this.finishOp(j.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(j.assign,r+1):this.finishOp(j.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(j.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(j.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(j.arrow)):this.finishOp(61===e?j.eq:j.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(j.parenL);case 41:return++this.state.pos,this.finishToken(j.parenR);case 59:return++this.state.pos,this.finishToken(j.semi);case 44:return++this.state.pos,this.finishToken(j.comma);case 91:return++this.state.pos,this.finishToken(j.bracketL);case 93:return++this.state.pos,this.finishToken(j.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.braceBarL,2):(++this.state.pos,this.finishToken(j.braceL));case 125:return++this.state.pos,this.finishToken(j.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.doubleColon,2):(++this.state.pos,this.finishToken(j.colon));case 63:return++this.state.pos,this.finishToken(j.question);case 64:return++this.state.pos,this.finishToken(j.at);case 96:return++this.state.pos,this.finishToken(j.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(j.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+c(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this.state.pos,t=void 0,r=void 0;;){this.state.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(I.test(n)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if("["===n)r=!0;else if("]"===n&&r)r=!1;else if("/"===n&&!r)break;t="\\"===n}++this.state.pos}var i=this.input.slice(e,this.state.pos);++this.state.pos;var s=this.readWord1();if(s){/^[gmsiyu]*$/.test(s)||this.raise(e,"Invalid regular expression flag")}return this.finishToken(j.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e) -;return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(j.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(this.state.pos),n=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number");var i=this.input.charCodeAt(this.state.pos);46===i&&(++this.state.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.state.pos)),69!==i&&101!==i||(i=this.input.charCodeAt(++this.state.pos),43!==i&&45!==i||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return n?o=parseFloat(a):r&&1!==a.length?/[89]/.test(a)||this.state.strict?this.raise(t,"Invalid number"):o=parseInt(a,8):o=parseInt(a,10),this.finishToken(j.num,o)},e.prototype.readCodePoint=function(){var e=this.input.charCodeAt(this.state.pos),t=void 0;if(123===e){var r=++this.state.pos;t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos),++this.state.pos,t>1114111&&this.raise(r,"Code point out of bounds")}else t=this.readHexChar(4);return t},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(u(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(j.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var r=this.input.charCodeAt(this.state.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(j.template)?36===r?(this.state.pos+=2,this.finishToken(j.dollarBraceL)):(++this.state.pos,this.finishToken(j.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(j.template,e));if(92===r)e+=this.input.slice(t,this.state.pos),e+=this.readEscapedChar(!0),t=this.state.pos;else if(u(r)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,r){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return c(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(t>=48&&t<=55){var r=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(r,8);return n>255&&(r=r.slice(0,-1),n=parseInt(r,8)),n>0&&(this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=this.state.pos-2),(this.state.strict||e)&&this.raise(this.state.pos-2,"Octal literal in strict mode")),this.state.pos+=r.length-1,String.fromCharCode(n)}return String.fromCharCode(t)}},e.prototype.readHexChar=function(e){var t=this.state.pos,r=this.readInt(16,e);return null===r&&this.raise(t,"Bad character escape sequence"),r},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos-1)||!!this.plugins[e]},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(W).filter(function(e){return"flow"!==e&&"estree"!==e});t.push("flow"),t.forEach(function(t){var r=W[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e}),e.push("flow")),e.indexOf("estree")>=0&&(e=e.filter(function(e){return"estree"!==e}),e.unshift("estree"));for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=W[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(J),Y=z.prototype;Y.addExtra=function(e,t,r){if(e){(e.extra=e.extra||{})[t]=r}},Y.isRelational=function(e){return this.match(j.relational)&&this.state.value===e},Y.expectRelational=function(e){this.isRelational(e)?this.next():this.unexpected(null,j.relational)},Y.isContextual=function(e){return this.match(j.name)&&this.state.value===e},Y.eatContextual=function(e){return this.state.value===e&&this.eat(j.name)},Y.expectContextual=function(e,t){this.eatContextual(e)||this.unexpected(null,t)},Y.canInsertSemicolon=function(){return this.match(j.eof)||this.match(j.braceR)||I.test(this.input.slice(this.state.lastTokEnd,this.state.start))},Y.isLineTerminator=function(){return this.eat(j.semi)||this.canInsertSemicolon()},Y.semicolon=function(){this.isLineTerminator()||this.unexpected(null,j.semi)},Y.expect=function(e,t){return this.eat(e)||this.unexpected(t,e)},Y.unexpected=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===(void 0===t?"undefined":_(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var H=z.prototype;H.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,j.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var $={kind:"loop"},Q={kind:"switch"};H.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},H.parseStatement=function(e,t){this.match(j.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case j._break:case j._continue:return this.parseBreakContinueStatement(n,r.keyword);case j._debugger:return this.parseDebuggerStatement(n);case j._do:return this.parseDoStatement(n);case j._for:return this.parseForStatement(n);case j._function:return e||this.unexpected(),this.parseFunctionStatement(n);case j._class:return e||this.unexpected(),this.parseClass(n,!0);case j._if:return this.parseIfStatement(n);case j._return:return this.parseReturnStatement(n);case j._switch:return this.parseSwitchStatement(n);case j._throw:return this.parseThrowStatement(n);case j._try:return this.parseTryStatement(n);case j._let:case j._const:e||this.unexpected();case j._var:return this.parseVarStatement(n,r);case j._while:return this.parseWhileStatement(n);case j._with:return this.parseWithStatement(n);case j.braceL:return this.parseBlock();case j.semi:return this.parseEmptyStatement(n);case j._export:case j._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===j.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===j._import?this.parseImport(n):this.parseExport(n);case j.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(j._function)&&!this.canInsertSemicolon())return this.expect(j._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===j.name&&"Identifier"===a.type&&this.eat(j.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},H.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},H.parseDecorators=function(e){for(;this.match(j.at);){var t=this.parseDecorator();this.state.decorators.push(t)}e&&this.match(j._export)||this.match(j._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},H.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},H.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(j.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(j._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var l=this.state.labels[u];if(l.statementStart!==e.start)break;l.statementStart=this.state.start,l.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},H.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},H.parseBlock=function(e){var t=this.startNode();return this.expect(j.braceL),this.parseBlockBody(t,e,!1,j.braceR),this.finishNode(t,"BlockStatement")},H.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},H.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(t&&!i&&this.isValidDirective(o)){var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else i=!0,e.body.push(o)}!1===s&&this.setStrict(!1)},H.parseFor=function(e,t){return e.init=t,this.expect(j.semi),e.test=this.match(j.semi)?null:this.parseExpression(),this.expect(j.semi),e.update=this.match(j.parenR)?null:this.parseExpression(),this.expect(j.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},H.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(j._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(j.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},H.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(j.eq)?n.init=this.parseMaybeAssign(t):r!==j._const||this.match(j._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(j._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(j.comma))break}return e},H.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},H.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(j.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(j.name)||this.match(j._yield)||this.unexpected(),(this.match(j.name)||this.match(j._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},H.parseFunctionParams=function(e){this.expect(j.parenL),e.params=this.parseBindingList(j.parenR)},H.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},H.isClassProperty=function(){return this.match(j.eq)||this.isLineTerminator()},H.isClassMutatorStarter=function(){return!1},H.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(j.braceL);!this.eat(j.braceR);)if(this.eat(j.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(j.at))i.push(this.parseDecorator());else{var a=this.startNode();i.length&&(a.decorators=i,i=[]);var o=!1,u=this.match(j.name)&&"static"===this.state.value,l=this.eat(j.star),c=!1,p=!1;if(this.parsePropertyName(a),a.static=u&&!this.match(j.parenL),a.static&&(l=this.eat(j.star),this.parsePropertyName(a)),!l){if(this.isClassProperty()){s.body.push(this.parseClassProperty(a));continue}"Identifier"===a.key.type&&!a.computed&&this.hasPlugin("classConstructorCall")&&"call"===a.key.name&&this.match(j.name)&&"constructor"===this.state.value&&(o=!0,this.parsePropertyName(a))}var h=!this.match(j.parenL)&&!a.computed&&"Identifier"===a.key.type&&"async"===a.key.name;if(h&&(this.hasPlugin("asyncGenerators")&&this.eat(j.star)&&(l=!0),p=!0,this.parsePropertyName(a)),a.kind="method",!a.computed){var f=a.key;p||l||this.isClassMutatorStarter()||"Identifier"!==f.type||this.match(j.parenL)||"get"!==f.name&&"set"!==f.name||(c=!0,a.kind=f.name,f=this.parsePropertyName(a));var d=!(o||a.static||"constructor"!==f.name&&"constructor"!==f.value);d&&(n&&this.raise(f.start,"Duplicate constructor in the same class"),c&&this.raise(f.start,"Constructor can't have get/set modifier"),l&&this.raise(f.start,"Constructor can't be a generator"),p&&this.raise(f.start,"Constructor can't be an async function"),a.kind="constructor",n=!0);var m=a.static&&("prototype"===f.name||"prototype"===f.value);m&&this.raise(f.start,"Classes may not have static property named prototype")}o&&(r&&this.raise(a.start,"Duplicate constructor call in the same class"),a.kind="constructorCall",r=!0),"constructor"!==a.kind&&"constructorCall"!==a.kind||!a.decorators||this.raise(a.start,"You can't attach decorators to a class constructor"),this.parseClassMethod(s,a,l,p),c&&this.checkGetterSetterParamCount(a)}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},H.parseClassProperty=function(e){return this.match(j.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.finishNode(e,"ClassProperty")},H.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},H.parseClassId=function(e,t,r){this.match(j.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},H.parseClassSuper=function(e){e.superClass=this.eat(j._extends)?this.parseExprSubscripts():null},H.parseExport=function(e){if(this.next(),this.match(j.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(j.comma)&&this.lookahead().type===j.star){this.expect(j.comma);var n=this.startNode();this.expect(j.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(j._default)){var i=this.startNode(),s=!1;return this.eat(j._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(j._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},H.parseExportDeclaration=function(){return this.parseStatement(!0)},H.isExportDefaultSpecifier=function(){if(this.match(j.name))return"type"!==this.state.value&&"async"!==this.state.value&&"interface"!==this.state.value;if(!this.match(j._default))return!1;var e=this.lookahead();return e.type===j.comma||e.type===j.name&&"from"===e.value},H.parseExportSpecifiersMaybe=function(e){this.eat(j.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},H.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(j.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},H.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},H.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(var n=e.specifiers,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type)for(var u=e.declaration.declarations,l=Array.isArray(u),c=0,u=l?u:u[Symbol.iterator]();;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if(c=u.next(),c.done)break;p=c.value}var h=p;this.checkDeclaration(h.id)}if(this.state.decorators.length){var f=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&f||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},H.checkDeclaration=function(e){if("ObjectPattern"===e.type)for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if(n=t.next(),n.done)break;i=n.value}var s=i;this.checkDeclaration(s)}else if("ArrayPattern"===e.type)for(var a=e.elements,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},H.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},H.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},H.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(j.braceL);!this.eat(j.braceR);){if(t)t=!1;else if(this.expect(j.comma),this.eat(j.braceR))break;var n=this.match(j._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},H.parseImport=function(e){return this.eat(j._import),this.match(j.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(j.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},H.parseImportSpecifiers=function(e){var t=!0;if(this.match(j.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(j.comma))return}if(this.match(j.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(j.braceL);!this.eat(j.braceR);){if(t)t=!1;else if(this.eat(j.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(j.comma),this.eat(j.braceR))break;this.parseImportSpecifier(e)}},H.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},H.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var ee=z.prototype;ee.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=e.properties,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if(s=n.next(),s.done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var u="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,u)}return e},ee.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a=s.length)break;u=s[o++]}else{if(o=s.next(),o.done)break;u=o.value}var l=u -;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":for(var c=e.elements,p=Array.isArray(c),h=0,c=p?c:c[Symbol.iterator]();;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if(h=c.next(),h.done)break;f=h.value}var d=f;d&&this.checkLVal(d,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var te=z.prototype;te.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},te.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(j.eof)||this.unexpected(),e},te.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(j.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(j.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},te.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(j._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(j.parenL)||this.match(j.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(j.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},te.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},te.parseConditional=function(e,t,r,n){if(this.eat(j.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(j.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},te.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},te.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(j._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===j.logicalOR||o===j.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},te.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(j.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==j.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a},te.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},te.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(j.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(j.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(j.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(j.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(j.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(j.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(j.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(),e=this.finishNode(l,"TaggedTemplateExpression")}}},te.parseCallExpressionArguments=function(e,t){for(var r=[],n=void 0,i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(j.comma),this.eat(e))break;this.match(j.parenL)&&!n&&(n=this.state.start),r.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),r},te.shouldParseAsyncArrow=function(){return this.match(j.arrow)},te.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(j.arrow),this.parseArrowExpression(e,t.arguments,!0)},te.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},te.parseExprAtom=function(e){var t=this.state.potentialArrowAt===this.state.start,r=void 0;switch(this.state.type){case j._super:return this.state.inMethod||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),r=this.startNode(),this.next(),this.match(j.parenL)||this.match(j.bracketL)||this.match(j.dot)||this.unexpected(),this.match(j.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(r.start,"super() outside of class constructor"),this.finishNode(r,"Super");case j._import:return this.hasPlugin("dynamicImport")||this.unexpected(),r=this.startNode(),this.next(),this.match(j.parenL)||this.unexpected(null,j.parenL),this.finishNode(r,"Import");case j._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case j._yield:this.state.inGenerator&&this.unexpected();case j.name:r=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(r)}else{if("async"===s.name&&this.match(j._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(r,!1,!1,!0);if(t&&"async"===s.name&&this.match(j.name)){var a=[this.parseIdentifier()];return this.expect(j.arrow),this.parseArrowExpression(r,a,!0)}}return t&&!this.canInsertSemicolon()&&this.eat(j.arrow)?this.parseArrowExpression(r,[s]):s;case j._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case j.regexp:var c=this.state.value;return r=this.parseLiteral(c.value,"RegExpLiteral"),r.pattern=c.pattern,r.flags=c.flags,r;case j.num:return this.parseLiteral(this.state.value,"NumericLiteral");case j.string:return this.parseLiteral(this.state.value,"StringLiteral");case j._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case j._true:case j._false:return r=this.startNode(),r.value=this.match(j._true),this.next(),this.finishNode(r,"BooleanLiteral");case j.parenL:return this.parseParenAndDistinguishExpression(null,null,t);case j.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(j.bracketR,!0,e),this.toReferencedList(r.elements),this.finishNode(r,"ArrayExpression");case j.braceL:return this.parseObj(!1,e);case j._function:return this.parseFunctionExpression();case j.at:this.parseDecorators();case j._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case j._new:return this.parseNew();case j.backQuote:return this.parseTemplate();case j.doubleColon:r=this.startNode(),this.next(),r.object=null;var p=r.callee=this.parseNoCallExpr();if("MemberExpression"===p.type)return this.finishNode(r,"BindExpression");this.raise(p.start,"Binding should be performed on object property.");default:this.unexpected()}},te.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(j.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},te.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},te.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},te.parseParenExpression=function(){this.expect(j.parenL);var e=this.parseExpression();return this.expect(j.parenR),e},te.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(j.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o={start:0},u={start:0},l=!0,c=void 0,p=void 0;!this.match(j.parenR);){if(l)l=!1;else if(this.expect(j.comma,u.start||null),this.match(j.parenR)){p=this.state.start;break}if(this.match(j.ellipsis)){var h=this.state.start,f=this.state.startLoc;c=this.state.start,a.push(this.parseParenItem(this.parseRest(),f,h));break}a.push(this.parseMaybeAssign(!1,o,this.parseParenItem,u))}var d=this.state.start,m=this.state.startLoc;this.expect(j.parenR);var y=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(y=this.parseArrow(y))){for(var g=a,b=Array.isArray(g),v=0,g=b?g:g[Symbol.iterator]();;){var x;if(b){if(v>=g.length)break;x=g[v++]}else{if(v=g.next(),v.done)break;x=v.value}var E=x;E.extra&&E.extra.parenthesized&&this.unexpected(E.extra.parenStart)}return this.parseArrowExpression(y,a)}return a.length||this.unexpected(this.state.lastTokStart),p&&this.unexpected(p),c&&this.unexpected(c),o.start&&this.unexpected(o.start),u.start&&this.unexpected(u.start),a.length>1?(n=this.startNodeAt(i,s),n.expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",d,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},te.shouldParseArrow=function(){return!this.canInsertSemicolon()},te.parseArrow=function(e){if(this.eat(j.arrow))return e},te.parseParenItem=function(e){return e},te.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.eat(j.dot)?this.parseMetaProperty(e,t,"target"):(e.callee=this.parseNoCallExpr(),this.eat(j.parenL)?(e.arguments=this.parseExprList(j.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression"))},te.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),e.tail=this.match(j.backQuote),this.finishNode(e,"TemplateElement")},te.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.expect(j.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(j.braceR),e.quasis.push(t=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},te.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(j.braceR);){if(i)i=!1;else if(this.expect(j.comma),this.eat(j.braceR))break;for(;this.match(j.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,p=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(j.ellipsis)){if(o=this.parseSpread(e?{start:0}:void 0),o.type=e?"RestProperty":"SpreadProperty",e&&this.toAssignable(o.argument,!0,"object pattern"),s.properties.push(o),!e)continue;var h=this.state.start;if(null===a){if(this.eat(j.braceR))break;if(this.match(j.comma)&&this.lookahead().type===j.braceR)continue;a=h;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,p=this.state.startLoc),e||(u=this.eat(j.star)),!e&&this.isContextual("async")){u&&this.unexpected();var f=this.parseIdentifier();this.match(j.colon)||this.match(j.parenL)||this.match(j.braceR)||this.match(j.eq)||this.match(j.comma)?(o.key=f,o.computed=!1):(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(j.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,p,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},te.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(j.string)||this.match(j.num)||this.match(j.bracketL)||this.match(j.name)||this.state.type.keyword)},te.checkGetterSetterParamCount=function(e){var t="get"===e.kind?0:1;if(e.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}},te.parseObjectMethod=function(e,t,r,n){return r||t||this.match(j.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r),this.finishNode(e,"ObjectMethod")):this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e),this.checkGetterSetterParamCount(e),this.finishNode(e,"ObjectMethod")):void 0},te.parseObjectProperty=function(e,t,r,n,i){return this.eat(j.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(n?(this.checkReservedWord(e.key.name,e.key.start,!0,!0),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):this.match(j.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},te.parseObjPropValue=function(e,t,r,n,i,s,a){var o=this.parseObjectMethod(e,n,i,s)||this.parseObjectProperty(e,t,r,s,a);return o||this.unexpected(),o},te.parsePropertyName=function(e){if(this.eat(j.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(j.bracketR);else{e.computed=!1;var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(j.num)||this.match(j.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=t}return e.key},te.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},te.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(j.parenL),e.params=this.parseBindingList(j.parenR),e.generator=!!t,this.parseFunctionBody(e),this.state.inMethod=n,e},te.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},te.isStrictBody=function(e,t){if(!t&&e.body.directives.length)for(var r=e.body.directives,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if("use strict"===a.value.value)return!0}return!1},te.parseFunctionBody=function(e,t){var r=t&&!this.match(j.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.isStrictBody(e,r),u=this.state.strict||t||o;if(o&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),u){var l=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");for(var p=e.params,h=Array.isArray(p),f=0,p=h?p:p[Symbol.iterator]();;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if(f=p.next(),f.done)break;d=f.value}var m=d;o&&"Identifier"!==m.type&&this.raise(m.start,"Non-simple parameter in strict mode"),this.checkLVal(m,!0,l,"function parameter list")}this.state.strict=c}},te.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(j.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},te.parseExprListItem=function(e,t,r){return e&&this.match(j.comma)?null:this.match(j.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem,r)},te.parseIdentifier=function(e){var t=this.startNode();return e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(j.name)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},te.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(g.strict(e)||n&&g.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},te.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(j.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},te.parseYield=function(){var e=this.startNode();return this.next(),this.match(j.semi)||this.canInsertSemicolon()||!this.match(j.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(j.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var re=z.prototype,ne=["leadingComments","trailingComments","innerComments"],ie=function(){function e(t,r,n){w(this,e),this.type="",this.start=t,this.end=0,this.loc=new q(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)ne.indexOf(r)<0&&(t[r]=this[r]);return t},e}();re.startNode=function(){return new ie(this.state.start,this.state.startLoc,this.filename)},re.startNodeAt=function(e,t){return new ie(e,t,this.filename)},re.finishNode=function(e,t){return p.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},re.finishNodeAt=function(e,t,r,n){return p.call(this,e,t,r,n)},z.prototype.raise=function(e,t){var r=l(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n};var se=z.prototype;se.addComment=function(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)},se.processComment=function(e){if(!("Program"===e.type&&e.body.length>0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(n=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var a=h(t);t.length>0&&a.trailingComments&&a.trailingComments[0].start>=e.end&&(n=a.trailingComments,a.trailingComments=null)}for(;t.length>0&&h(t).start>=e.start;)r=t.pop();if(r){if(r.leadingComments)if(r!==e&&h(r.leadingComments).end<=e.start)e.leadingComments=r.leadingComments,r.leadingComments=null;else for(i=r.leadingComments.length-2;i>=0;--i)if(r.leadingComments[i].end<=e.start){e.leadingComments=r.leadingComments.splice(0,i+1);break}}else if(this.state.leadingComments.length>0)if(h(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(s=0;s0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(i=0;ie.start);i++);e.leadingComments=this.state.leadingComments.slice(0,i),0===e.leadingComments.length&&(e.leadingComments=null),n=this.state.leadingComments.slice(i),0===n.length&&(n=null)}this.state.commentPreviousNode=e,n&&(n.length&&n[0].start>=e.start&&h(n).end<=e.end?e.innerComments=n:e.trailingComments=n),t.push(e)}};var ae=z.prototype;ae.estreeParseRegExpLiteral=function(e){var t=e.pattern,r=e.flags,n=null;try{n=new RegExp(t,r)}catch(e){}var i=this.estreeParseLiteral(n);return i.regex={pattern:t,flags:r},i},ae.estreeParseLiteral=function(e){return this.parseLiteral(e,"Literal")},ae.directiveToStmt=function(e){var t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.value,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,"Literal",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,"ExpressionStatement",e.end,e.loc.end)};var oe=function(e){e.extend("checkDeclaration",function(e){return function(t){f(t)?this.checkDeclaration(t.value):e.call(this,t)}}),e.extend("checkGetterSetterParamCount",function(){return function(e){var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}}}),e.extend("checkLVal",function(e){return function(t,r,n){var i=this;switch(t.type){case"ObjectPattern":t.properties.forEach(function(e){i.checkLVal("Property"===e.type?e.value:e,r,n,"object destructuring pattern")});break;default:for(var s=arguments.length,a=Array(s>3?s-3:0),o=3;o0)for(var r=e.body.body,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if(i=r.next(),i.done)break;s=i.value}var a=s;if("ExpressionStatement"!==a.type||"Literal"!==a.expression.type)break;if("use strict"===a.expression.value)return!0}return!1}}),e.extend("isValidDirective",function(){return function(e){return!("ExpressionStatement"!==e.type||"Literal"!==e.expression.type||"string"!=typeof e.expression.value||e.expression.extra&&e.expression.extra.parenthesized)}}),e.extend("parseBlockBody",function(e){return function(t){for(var r=this,n=arguments.length,i=Array(n>1?n-1:0),s=1;s1?r-1:0),i=1;i1?n-1:0),s=1;s2?n-2:0),s=2;s=a.length)break;l=a[u++]}else{if(u=a.next(),u.done)break;l=u.value}var c=l;"get"===c.kind||"set"===c.kind?this.raise(c.key.start,"Object pattern can't contain getter or setter"):c.method?this.raise(c.key.start,"Object pattern can't contain methods"):this.toAssignable(c,r,"object destructuring pattern")}return t}return e.call.apply(e,[this,t,r].concat(i))}})},ue=["any","mixed","empty","bool","boolean","number","string","void","null"],le=z.prototype;le.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||j.colon);var r=this.flowParseType();return this.state.inType=t,r},le.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(j.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(j.parenL)?(e.expression=this.parseExpression(),this.expect(j.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},le.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(j.colon);var t=null,r=null;return this.match(j.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(j.modulo)&&(r=this.flowParsePredicate())),[t,r]},le.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},le.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(j.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(j.parenR);var s=null,a=this.flowParseTypeAndPredicateInitialiser();return r.returnType=a[0],s=a[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),n.predicate=s,t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},le.flowParseDeclare=function(e){return this.match(j._class)?this.flowParseDeclareClass(e):this.match(j._function)?this.flowParseDeclareFunction(e):this.match(j._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===j.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):void this.unexpected()},le.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},le.flowParseDeclareModule=function(e){this.next(),this.match(j.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(j.braceL);!this.match(j.braceR);){var n=this.startNode();if(this.match(j._import)){var i=this.lookahead();"type"!==i.value&&"typeof"!==i.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(n)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),n=this.flowParseDeclare(n,!0);r.push(n)}return this.expect(j.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},le.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(j.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},le.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},le.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},le.flowParseInterfaceish=function(e,t){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(j._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(j.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(j.comma))}e.body=this.flowParseObjectType(t)},le.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},le.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},le.flowParseRestrictedIdentifier=function(e){ -return ue.indexOf(this.state.value)>-1&&this.raise(this.state.start,"Cannot overwrite primitive type "+this.state.value),this.parseIdentifier(e)},le.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(j.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},le.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(j.eq)&&(this.eat(j.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},le.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(j.jsxTagStart)?this.next():this.unexpected();do{t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(j.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},le.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(j.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},le.flowParseObjectPropertyKey=function(){return this.match(j.num)||this.match(j.string)?this.parseExprAtom():this.parseIdentifier(!0)},le.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(j.bracketL),this.lookahead().type===j.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(j.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},le.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(j.parenL);this.match(j.name);)e.params.push(this.flowParseFunctionTypeParam()),this.match(j.parenR)||this.expect(j.comma);return this.eat(j.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(j.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},le.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},le.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},le.flowParseObjectType=function(e,t){var r=this.state.inType;this.state.inType=!0;var n=this.startNode(),i=void 0,s=void 0,a=!1;n.callProperties=[],n.properties=[],n.indexers=[];var o=void 0,u=void 0;for(t&&this.match(j.braceBarL)?(this.expect(j.braceBarL),o=j.braceBarR,u=!0):(this.expect(j.braceL),o=j.braceR,u=!1),n.exact=u;!this.match(o);){var l=!1,c=this.state.start,p=this.state.startLoc;i=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==j.colon&&(this.next(),a=!0);var h=this.state.start,f=this.flowParseVariance();this.match(j.bracketL)?n.indexers.push(this.flowParseObjectTypeIndexer(i,a,f)):this.match(j.parenL)||this.isRelational("<")?(f&&this.unexpected(h),n.callProperties.push(this.flowParseObjectTypeCallProperty(i,a))):(s=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(j.parenL)?(f&&this.unexpected(h),n.properties.push(this.flowParseObjectTypeMethod(c,p,a,s))):(this.eat(j.question)&&(l=!0),i.key=s,i.value=this.flowParseTypeInitialiser(),i.optional=l,i.static=a,i.variance=f,this.flowObjectTypeSemicolon(),n.properties.push(this.finishNode(i,"ObjectTypeProperty")))),a=!1}this.expect(o);var d=this.finishNode(n,"ObjectTypeAnnotation");return this.state.inType=r,d},le.flowObjectTypeSemicolon=function(){this.eat(j.semi)||this.eat(j.comma)||this.match(j.braceR)||this.match(j.braceBarR)||this.unexpected()},le.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(j.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},le.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},le.flowParseTypeofType=function(){var e=this.startNode();return this.expect(j._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},le.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(j.bracketL);this.state.pos0&&void 0!==arguments[0]?arguments[0]:[],t={params:e,rest:null};!this.match(j.parenR)&&!this.match(j.ellipsis);)t.params.push(this.flowParseFunctionTypeParam()),this.match(j.parenR)||this.expect(j.comma);return this.eat(j.ellipsis)&&(t.rest=this.flowParseFunctionTypeParam()),t},le.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},le.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case j.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case j.braceL:return this.flowParseObjectType(!1,!1);case j.braceBarL:return this.flowParseObjectType(!1,!0);case j.bracketL:return this.flowParseTupleType();case j.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(j.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(j.parenR),this.expect(j.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case j.parenL:if(this.next(),!this.match(j.parenR)&&!this.match(j.ellipsis))if(this.match(j.name)){var o=this.lookahead().type;s=o!==j.question&&o!==j.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(j.comma)||this.match(j.parenR)&&this.lookahead().type===j.arrow))return this.expect(j.parenR),i;this.eat(j.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(j.parenR),this.expect(j.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case j.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case j._true:case j._false:return r.value=this.match(j._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case j.plusMin:if("-"===this.state.value)return this.next(),this.match(j.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumericLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case j.num:return this.parseLiteral(this.state.value,"NumericLiteralTypeAnnotation");case j._null:return r.value=this.match(j._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case j._this:return r.value=this.match(j._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case j.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},le.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(j.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(j.bracketL),this.expect(j.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},le.flowParsePrefixType=function(){var e=this.startNode();return this.eat(j.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},le.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(j.arrow)){var t=this.startNodeAt(e.start,e.loc);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},le.flowParseIntersectionType=function(){var e=this.startNode();this.eat(j.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(j.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},le.flowParseUnionType=function(){var e=this.startNode();this.eat(j.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(j.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},le.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},le.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},le.flowParseTypeAndPredicateAnnotation=function(){var e=this.startNode(),t=this.flowParseTypeAndPredicateInitialiser();return e.typeAnnotation=t[0],e.predicate=t[1],this.finishNode(e,"TypeAnnotation")},le.flowParseTypeAnnotatableIdentifier=function(){var e=this.flowParseRestrictedIdentifier();return this.match(j.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},le.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},le.flowParseVariance=function(){var e=null;return this.match(j.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var ce=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(j.colon)&&!r&&(t.returnType=this.flowParseTypeAndPredicateAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(j.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(j._class)||this.match(j.name)||this.match(j._function)||this.match(j._var))return this.flowParseDeclare(t)}else if(this.match(j.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(j.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(j.question)&&(t.optional=!0),this.match(j.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return t=e.call(this,t),"ExportNamedDeclaration"===t.type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(j.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("interface")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(j.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i2?n-2:0),s=2;s1114111||fe(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?e.push(a):(a-=65536,t=55296+(a>>10),r=a%1024+56320,e.push(t,r)),(n+1==i||e.length>16384)&&(s+=he.apply(null,e),e.length=0)}return s}}var de=pe,me={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},ye=/^[\da-fA-F]+$/,ge=/^\d+$/;U.j_oTag=new R("...
                ",!0,!0),j.jsxName=new P("jsxName"),j.jsxText=new P("jsxText",{beforeExpr:!0}),j.jsxTagStart=new P("jsxTagStart",{startsExpr:!0}),j.jsxTagEnd=new P("jsxTagEnd"),j.jsxTagStart.updateContext=function(){this.state.context.push(U.j_expr),this.state.context.push(U.j_oTag),this.state.exprAllowed=!1},j.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===U.j_oTag&&e===j.slash||t===U.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===U.j_expr):this.state.exprAllowed=!0};var be=z.prototype;be.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(j.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(j.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:u(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},be.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},be.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):u(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(j.string,t)},be.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(j.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},be.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};var ve=function(e){e.extend("parseExprAtom",function(e){return function(t){if(this.match(j.jsxText)){var r=this.parseLiteral(this.state.value,"JSXText");return r.extra=null,r}return this.match(j.jsxTagStart)?this.jsxParseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){if(this.state.inPropertyName)return e.call(this,t);var r=this.curContext();if(r===U.j_expr)return this.jsxReadToken();if(r===U.j_oTag||r===U.j_cTag){if(s(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(j.jsxTagEnd);if((34===t||39===t)&&r===U.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(j.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.match(j.braceL)){var r=this.curContext();r===U.j_oTag?this.state.context.push(U.braceExpression):r===U.j_expr?this.state.context.push(U.templateQuasi):e.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(j.slash)||t!==j.jsxTagStart)return e.call(this,t);this.state.context.length-=2,this.state.context.push(U.j_cTag),this.state.exprAllowed=!1}}})};W.estree=oe,W.flow=ce,W.jsx=ve,r.parse=m,r.parseExpression=y,r.tokTypes=j},{}],178:[function(e,t,r){function n(e,t,r){e instanceof RegExp&&(e=i(e,r)),t instanceof RegExp&&(t=i(t,r));var n=s(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function i(e,t){var r=t.match(e);return r?r[0]:null}function s(e,t,r){var n,i,s,a,o,u=r.indexOf(e),l=r.indexOf(t,u+1),c=u;if(u>=0&&l>0){for(n=[],s=r.length;c>=0&&!o;)c==u?(n.push(c), -u=r.indexOf(e,c+1)):1==n.length?o=[n.pop(),l]:(i=n.pop(),i=0?u:l;n.length&&(o=[s,a])}return o}t.exports=n,n.range=s},{}],179:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function s(e){var t,r,i,s,a,o,u=e.length;a=n(e),o=new p(3*u/4-a),i=a>0?u-4:u;var l=0;for(t=0,r=0;t>16&255,o[l++]=s>>8&255,o[l++]=255&s;return 2===a?(s=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,o[l++]=255&s):1===a&&(s=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,o[l++]=s>>8&255,o[l++]=255&s),o}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function o(e,t,r){for(var n,i=[],s=t;su?u:a+16383));return 1===n?(t=e[r-1],i+=l[t>>2],i+=l[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=l[t>>10],i+=l[t>>4&63],i+=l[t<<2&63],i+="="),s.push(i),s.join("")}r.byteLength=i,r.toByteArray=s,r.fromByteArray=u;for(var l=[],c=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=h.length;f=t}function h(e,t){var r=[],i=d("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),m=s||o,y=/^(.*,)+(.+)?$/.test(i.body);if(!m&&!y)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+g+i.post,h(e)):[e];var b;if(m)b=i.body.split(/\.\./);else if(b=a(i.body),1===b.length&&(b=h(b[0],!1).map(u),1===b.length)){var v=i.post.length?h(i.post,!1):[""];return v.map(function(e){return i.pre+b[0]+e})}var x,E=i.pre,v=i.post.length?h(i.post,!1):[""];if(m){var A=n(b[0]),D=n(b[1]),C=Math.max(b[0].length,b[1].length),S=3==b.length?Math.abs(n(b[2])):1,_=c;D0){var P=new Array(T+1).join("0");F=k<0?"-"+P+F.slice(1):P+F}}x.push(F)}}else x=f(b,function(e){return h(e,!1)});for(var B=0;Ba)throw new RangeError("size is too large");var n=r,s=t;void 0===s&&(n=void 0,s=0);var o=new i(e);if("string"==typeof s)for(var u=new i(s,n),l=u.length,c=-1;++ca)throw new RangeError("size is too large");return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var s=r;if(1===arguments.length)return new i(e);void 0===s&&(s=0);var a=n;if(void 0===a&&(a=e.byteLength-s),s>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(a>e.byteLength-s)throw new RangeError("'length' is out of bounds");return new i(e.slice(s,s+a))}if(i.isBuffer(e)){var o=new i(e.length);return e.copy(o,0,0,e.length),o}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=a)throw new RangeError("size is too large");return new s(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:184}],184:[function(e,t,r){"use strict";function n(e){if(e>Y)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(e)}return s(e,t,r)}function s(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?p(e,t,r):"string"==typeof e?l(e,t):h(e)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function o(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}function u(e){return a(e),n(e<0?0:0|f(e))}function l(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(e,t),s=n(r),a=s.write(e,t);return a!==r&&(s=s.slice(0,a)),s}function c(e){for(var t=e.length<0?0:0|f(e.length),r=n(t),i=0;i=Y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Y.toString(16)+" bytes");return 0|e}function d(e){return+e!=e&&(e=0),i.alloc(+e)}function m(e,t){if(i.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer)return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return F(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return _(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}var l;if(i){var c=-1;for(l=r;lo&&(r=o-u),l=r;l>=0;l--){for(var p=!0,h=0;hi&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a239?4:s>223?3:s>191?2:1;if(i+o<=r){var u,l,c,p;switch(o){case 1:s<128&&(a=s);break;case 2:u=e[i+1],128==(192&u)&&(p=(31&s)<<6|63&u)>127&&(a=p);break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(p=(15&s)<<12|(63&u)<<6|63&l)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(p=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return k(n)}function k(e){var t=e.length;if(t<=H)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,s,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),z.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),z.write(e,t,r,n,52,8),r+8}function M(e){if(e=R(e).replace($,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function R(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function q(e){for(var t=[],r=0;r>8,i=r%256,s.push(i),s.push(n);return s}function X(e){return K.toByteArray(M(e))}function J(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function W(e){return e!==e}var K=e("base64-js"),z=e("ieee754");r.Buffer=i,r.SlowBuffer=d,r.INSPECT_MAX_BYTES=50;var Y=2147483647;r.kMaxLength=Y,i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return o(e,t,r)},i.allocUnsafe=function(e){return u(e)},i.allocUnsafeSlow=function(e){return u(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,s=0,a=Math.min(r,n);s0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,t,r,n,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,s>>>=0,this===e)return 0;for(var a=s-n,o=r-t,u=Math.min(a,o),l=this.slice(n,s),c=e.slice(t,r),p=0;p>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return A(this,e,t,r);case"latin1":case"binary":return D(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var H=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},i.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s=i&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),z.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),z.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),z.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),z.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){j(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=1,s=0;for(this[t]=255&e;++s>>=0,r>>>=0,!n){j(this,e,t,r,Math.pow(2,8*r)-1,0)}var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(s<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a1)for(var n=1;n0;i--)if(t=n[i],~t.indexOf("sourceMappingURL=data:"))return r.fromComment(t)}var u=e("fs"),l=e("path"),c=/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/gm,p=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm;a.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},a.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},a.prototype.toComment=function(e){var t=this.toBase64(),r="sourceMappingURL=data:application/json;base64,"+t;return e&&e.multiline?"/*# "+r+" */":"//# "+r},a.prototype.toObject=function(){return JSON.parse(this.toJSON())},a.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t)},a.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},a.prototype.getProperty=function(e){return this.sourcemap[e]},r.fromObject=function(e){return new a(e)},r.fromJSON=function(e){return new a(e,{isJSON:!0})},r.fromBase64=function(e){return new a(e,{isEncoded:!0})},r.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new a(e,{isEncoded:!0,hasComment:!0})},r.fromMapFileComment=function(e,t){return new a(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},r.fromSource=function(e,t){if(t){var n=o(e);return n||null}var i=e.match(c);return c.lastIndex=0,i?r.fromComment(i.pop()):null},r.fromMapFileSource=function(e,t){var n=e.match(p);return p.lastIndex=0,n?r.fromMapFileComment(n.pop(),t):null},r.removeComments=function(e){return c.lastIndex=0,e.replace(c,"")},r.removeMapFileComments=function(e){return p.lastIndex=0,e.replace(p,"")},Object.defineProperty(r,"commentRegex",{get:function(){return c.lastIndex=0,c}}),Object.defineProperty(r,"mapFileCommentRegex",{get:function(){return p.lastIndex=0,p}})}).call(this,e("buffer").Buffer)},{buffer:184,fs:182,path:535}],188:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":277,"../modules/es6.string.iterator":286,"../modules/web.dom.iterable":293}],189:[function(e,t,r){var n=e("../../modules/_core"),i=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(e){return i.stringify.apply(i,arguments)}},{"../../modules/_core":217}],190:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.map"),e("../modules/es7.map.to-json"),t.exports=e("../modules/_core").Map},{"../modules/_core":217,"../modules/es6.map":279,"../modules/es6.object.to-string":285,"../modules/es6.string.iterator":286,"../modules/es7.map.to-json":290,"../modules/web.dom.iterable":293}],191:[function(e,t,r){e("../../modules/es6.number.max-safe-integer"),t.exports=9007199254740991},{"../../modules/es6.number.max-safe-integer":280}],192:[function(e,t,r){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":217,"../../modules/es6.object.assign":281}],193:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":217,"../../modules/es6.object.create":282}],194:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Object.getOwnPropertySymbols},{"../../modules/_core":217,"../../modules/es6.symbol":287}],195:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":217,"../../modules/es6.object.keys":283}],196:[function(e,t,r){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":217,"../../modules/es6.object.set-prototype-of":284}],197:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Symbol.for},{"../../modules/_core":217,"../../modules/es6.symbol":287}],198:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":217,"../../modules/es6.object.to-string":285,"../../modules/es6.symbol":287,"../../modules/es7.symbol.async-iterator":291,"../../modules/es7.symbol.observable":292}],199:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":274,"../../modules/es6.string.iterator":286,"../../modules/web.dom.iterable":293}],200:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-map"),t.exports=e("../modules/_core").WeakMap},{"../modules/_core":217,"../modules/es6.object.to-string":285,"../modules/es6.weak-map":288,"../modules/web.dom.iterable":293}],201:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-set"), -t.exports=e("../modules/_core").WeakSet},{"../modules/_core":217,"../modules/es6.object.to-string":285,"../modules/es6.weak-set":289,"../modules/web.dom.iterable":293}],202:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],203:[function(e,t,r){t.exports=function(){}},{}],204:[function(e,t,r){t.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},{}],205:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":235}],206:[function(e,t,r){var n=e("./_for-of");t.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},{"./_for-of":226}],207:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_to-length"),s=e("./_to-index");t.exports=function(e){return function(t,r,a){var o,u=n(t),l=i(u.length),c=s(a,l);if(e&&r!=r){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},{"./_to-index":266,"./_to-iobject":268,"./_to-length":269}],208:[function(e,t,r){var n=e("./_ctx"),i=e("./_iobject"),s=e("./_to-object"),a=e("./_to-length"),o=e("./_array-species-create");t.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,p=6==e,h=5==e||p,f=t||o;return function(t,o,d){for(var m,y,g=s(t),b=i(g),v=n(o,d,3),x=a(b.length),E=0,A=r?f(t,x):u?f(t,0):void 0;x>E;E++)if((h||E in b)&&(m=b[E],y=v(m,E,g),e))if(r)A[E]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:A.push(m)}else if(c)return!1;return p?-1:l||c?c:A}}},{"./_array-species-create":210,"./_ctx":218,"./_iobject":232,"./_to-length":269,"./_to-object":270}],209:[function(e,t,r){var n=e("./_is-object"),i=e("./_is-array"),s=e("./_wks")("species");t.exports=function(e){var t;return i(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[s])&&(t=void 0)),void 0===t?Array:t}},{"./_is-array":234,"./_is-object":235,"./_wks":275}],210:[function(e,t,r){var n=e("./_array-species-constructor");t.exports=function(e,t){return new(n(e))(t)}},{"./_array-species-constructor":209}],211:[function(e,t,r){var n=e("./_cof"),i=e("./_wks")("toStringTag"),s="Arguments"==n(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};t.exports=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=a(t=Object(e),i))?r:s?n(t):"Object"==(o=n(t))&&"function"==typeof t.callee?"Arguments":o}},{"./_cof":212,"./_wks":275}],212:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],213:[function(e,t,r){"use strict";var n=e("./_object-dp").f,i=e("./_object-create"),s=e("./_redefine-all"),a=e("./_ctx"),o=e("./_an-instance"),u=e("./_defined"),l=e("./_for-of"),c=e("./_iter-define"),p=e("./_iter-step"),h=e("./_set-species"),f=e("./_descriptors"),d=e("./_meta").fastKey,m=f?"_s":"size",y=function(e,t){var r,n=d(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,t,r,c){var p=e(function(e,n){o(e,p,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&l(n,r,e[c],e)});return s(p.prototype,{clear:function(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=this,r=y(t,e);if(r){var n=r.n,i=r.p;delete t._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),t._f==r&&(t._f=n),t._l==r&&(t._l=i),t[m]--}return!!r},forEach:function(e){o(this,p,"forEach");for(var t,r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!y(this,e)}}),f&&n(p.prototype,"size",{get:function(){return u(this[m])}}),p},def:function(e,t,r){var n,i,s=y(e,t);return s?s.v=r:(e._l=s={i:i=d(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=s),n&&(n.n=s),e[m]++,"F"!==i&&(e._i[i]=s)),e},getEntry:y,setStrong:function(e,t,r){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?p(0,r.k):"values"==t?p(0,r.v):p(0,[r.k,r.v]):(e._t=void 0,p(1))},r?"entries":"values",!r,!0),h(t)}}},{"./_an-instance":204,"./_ctx":218,"./_defined":219,"./_descriptors":220,"./_for-of":226,"./_iter-define":238,"./_iter-step":239,"./_meta":243,"./_object-create":245,"./_object-dp":246,"./_redefine-all":258,"./_set-species":261}],214:[function(e,t,r){var n=e("./_classof"),i=e("./_array-from-iterable");t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},{"./_array-from-iterable":206,"./_classof":211}],215:[function(e,t,r){"use strict";var n=e("./_redefine-all"),i=e("./_meta").getWeak,s=e("./_an-object"),a=e("./_is-object"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_array-methods"),c=e("./_has"),p=l(5),h=l(6),f=0,d=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},y=function(e,t){return p(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var r=y(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,r,s){var l=e(function(e,n){o(e,l,t,"_i"),e._i=f++,e._l=void 0,void 0!=n&&u(n,r,e[s],e)});return n(l.prototype,{delete:function(e){if(!a(e))return!1;var t=i(e);return!0===t?d(this).delete(e):t&&c(t,this._i)&&delete t[this._i]},has:function(e){if(!a(e))return!1;var t=i(e);return!0===t?d(this).has(e):t&&c(t,this._i)}}),l},def:function(e,t,r){var n=i(s(t),!0);return!0===n?d(e).set(t,r):n[e._i]=r,e},ufstore:d}},{"./_an-instance":204,"./_an-object":205,"./_array-methods":208,"./_for-of":226,"./_has":228,"./_is-object":235,"./_meta":243,"./_redefine-all":258}],216:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_export"),s=e("./_meta"),a=e("./_fails"),o=e("./_hide"),u=e("./_redefine-all"),l=e("./_for-of"),c=e("./_an-instance"),p=e("./_is-object"),h=e("./_set-to-string-tag"),f=e("./_object-dp").f,d=e("./_array-methods")(0),m=e("./_descriptors");t.exports=function(e,t,r,y,g,b){var v=n[e],x=v,E=g?"set":"add",A=x&&x.prototype,D={};return m&&"function"==typeof x&&(b||A.forEach&&!a(function(){(new x).entries().next()}))?(x=t(function(t,r){c(t,x,e,"_c"),t._c=new v,void 0!=r&&l(r,g,t[E],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!b||"clear"!=e)&&o(x.prototype,e,function(r,n){if(c(this,x,e),!t&&b&&!p(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),"size"in A&&f(x.prototype,"size",{get:function(){return this._c.size}})):(x=y.getConstructor(t,e,g,E),u(x.prototype,r),s.NEED=!0),h(x,e),D[e]=x,i(i.G+i.W+i.F,D),b||y.setStrong(x,e,g),x}},{"./_an-instance":204,"./_array-methods":208,"./_descriptors":220,"./_export":224,"./_fails":225,"./_for-of":226,"./_global":227,"./_hide":229,"./_is-object":235,"./_meta":243,"./_object-dp":246,"./_redefine-all":258,"./_set-to-string-tag":262}],217:[function(e,t,r){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],218:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":202}],219:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],220:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":225}],221:[function(e,t,r){var n=e("./_is-object"),i=e("./_global").document,s=n(i)&&n(i.createElement);t.exports=function(e){return s?i.createElement(e):{}}},{"./_global":227,"./_is-object":235}],222:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],223:[function(e,t,r){var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie");t.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,o=r(e),u=s.f,l=0;o.length>l;)u.call(e,a=o[l++])&&t.push(a);return t}},{"./_object-gops":251,"./_object-keys":254,"./_object-pie":255}],224:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_ctx"),a=e("./_hide"),o=function(e,t,r){var u,l,c,p=e&o.F,h=e&o.G,f=e&o.S,d=e&o.P,m=e&o.B,y=e&o.W,g=h?i:i[t]||(i[t]={}),b=g.prototype,v=h?n:f?n[t]:(n[t]||{}).prototype;h&&(r=t);for(u in r)(l=!p&&v&&void 0!==v[u])&&u in g||(c=l?v[u]:r[u],g[u]=h&&"function"!=typeof v[u]?r[u]:m&&l?s(c,n):y&&v[u]==c?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):d&&"function"==typeof c?s(Function.call,c):c,d&&((g.virtual||(g.virtual={}))[u]=c,e&o.R&&b&&!b[u]&&a(b,u,c)))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,t.exports=o},{"./_core":217,"./_ctx":218,"./_global":227,"./_hide":229}],225:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],226:[function(e,t,r){var n=e("./_ctx"),i=e("./_iter-call"),s=e("./_is-array-iter"),a=e("./_an-object"),o=e("./_to-length"),u=e("./core.get-iterator-method"),l={},c={},r=t.exports=function(e,t,r,p,h){var f,d,m,y,g=h?function(){return e}:u(e),b=n(r,p,t?2:1),v=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(s(g)){for(f=o(e.length);f>v;v++)if((y=t?b(a(d=e[v])[0],d[1]):b(e[v]))===l||y===c)return y}else for(m=g.call(e);!(d=m.next()).done;)if((y=i(m,b,d.value,t))===l||y===c)return y};r.BREAK=l,r.RETURN=c},{"./_an-object":205,"./_ctx":218,"./_is-array-iter":233,"./_iter-call":236,"./_to-length":269,"./core.get-iterator-method":276}],227:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],228:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],229:[function(e,t,r){var n=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":220,"./_object-dp":246,"./_property-desc":257}],230:[function(e,t,r){t.exports=e("./_global").document&&document.documentElement},{"./_global":227}],231:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":220,"./_dom-create":221,"./_fails":225}],232:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":212}],233:[function(e,t,r){var n=e("./_iterators"),i=e("./_wks")("iterator"),s=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||s[i]===e)}},{"./_iterators":240,"./_wks":275}],234:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":212}],235:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],236:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var s=e.return;throw void 0!==s&&n(s.call(e)),t}}},{"./_an-object":205}],237:[function(e,t,r){"use strict";var n=e("./_object-create"),i=e("./_property-desc"),s=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),s(e,t+" Iterator")}},{"./_hide":229,"./_object-create":245,"./_property-desc":257,"./_set-to-string-tag":262,"./_wks":275}],238:[function(e,t,r){"use strict";var n=e("./_library"),i=e("./_export"),s=e("./_redefine"),a=e("./_hide"),o=e("./_has"),u=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),p=e("./_object-gpo"),h=e("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(e,t,r,m,y,g,b){l(r,t,m);var v,x,E,A=function(e){if(!f&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},D=t+" Iterator",C="values"==y,S=!1,_=e.prototype,w=_[h]||_["@@iterator"]||y&&_[y],k=w||A(y),F=y?C?A("entries"):k:void 0,T="Array"==t?_.entries||w:w;if(T&&(E=p(T.call(new e)))!==Object.prototype&&(c(E,D,!0),n||o(E,h)||a(E,h,d)),C&&w&&"values"!==w.name&&(S=!0,k=function(){return w.call(this)}),n&&!b||!f&&!S&&_[h]||a(_,h,k),u[t]=k,u[D]=d,y)if(v={values:C?k:A("values"),keys:g?k:A("keys"),entries:F},b)for(x in v)x in _||s(_,x,v[x]);else i(i.P+i.F*(f||S),t,v);return v}},{"./_export":224,"./_has":228,"./_hide":229,"./_iter-create":237,"./_iterators":240,"./_library":242,"./_object-gpo":252,"./_redefine":259,"./_set-to-string-tag":262,"./_wks":275}],239:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],240:[function(e,t,r){t.exports={}},{}],241:[function(e,t,r){var n=e("./_object-keys"),i=e("./_to-iobject");t.exports=function(e,t){for(var r,s=i(e),a=n(s),o=a.length,u=0;o>u;)if(s[r=a[u++]]===t)return r}},{"./_object-keys":254,"./_to-iobject":268}],242:[function(e,t,r){t.exports=!0},{}],243:[function(e,t,r){var n=e("./_uid")("meta"),i=e("./_is-object"),s=e("./_has"),a=e("./_object-dp").f,o=0,u=Object.isExtensible||function(){return!0},l=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),c=function(e){a(e,n,{value:{i:"O"+ ++o,w:{}}})},p=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,n)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[n].i},h=function(e,t){if(!s(e,n)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[n].w},f=function(e){return l&&d.NEED&&u(e)&&!s(e,n)&&c(e),e},d=t.exports={KEY:n,NEED:!1,fastKey:p,getWeak:h,onFreeze:f}},{"./_fails":225,"./_has":228,"./_is-object":235,"./_object-dp":246,"./_uid":272}],244:[function(e,t,r){"use strict";var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie"),a=e("./_to-object"),o=e("./_iobject"),u=Object.assign;t.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,l=1,c=i.f,p=s.f;u>l;)for(var h,f=o(arguments[l++]),d=c?n(f).concat(c(f)):n(f),m=d.length,y=0;m>y;)p.call(f,h=d[y++])&&(r[h]=f[h]);return r}:u},{"./_fails":225,"./_iobject":232,"./_object-gops":251,"./_object-keys":254,"./_object-pie":255,"./_to-object":270}],245:[function(e,t,r){var n=e("./_an-object"),i=e("./_object-dps"),s=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),o=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=s.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",t=r.contentWindow.document,t.open(),t.write(""),t.close(),u=t.F;n--;)delete u.prototype[s[n]];return u()};t.exports=Object.create||function(e,t){var r;return null!==e?(o.prototype=n(e),r=new o,o.prototype=null,r[a]=e):r=u(),void 0===t?r:i(r,t)}},{"./_an-object":205,"./_dom-create":221,"./_enum-bug-keys":222,"./_html":230,"./_object-dps":247,"./_shared-key":263}],246:[function(e,t,r){var n=e("./_an-object"),i=e("./_ie8-dom-define"),s=e("./_to-primitive"),a=Object.defineProperty;r.f=e("./_descriptors")?Object.defineProperty:function(e,t,r){if(n(e),t=s(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},{"./_an-object":205,"./_descriptors":220,"./_ie8-dom-define":231,"./_to-primitive":271}],247:[function(e,t,r){var n=e("./_object-dp"),i=e("./_an-object"),s=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){i(e);for(var r,a=s(t),o=a.length,u=0;o>u;)n.f(e,r=a[u++],t[r]);return e}},{"./_an-object":205,"./_descriptors":220,"./_object-dp":246,"./_object-keys":254}],248:[function(e,t,r){var n=e("./_object-pie"),i=e("./_property-desc"),s=e("./_to-iobject"),a=e("./_to-primitive"),o=e("./_has"),u=e("./_ie8-dom-define"),l=Object.getOwnPropertyDescriptor;r.f=e("./_descriptors")?l:function(e,t){if(e=s(e),t=a(t,!0),u)try{return l(e,t)}catch(e){}if(o(e,t))return i(!n.f.call(e,t),e[t])}},{"./_descriptors":220,"./_has":228,"./_ie8-dom-define":231,"./_object-pie":255,"./_property-desc":257,"./_to-iobject":268,"./_to-primitive":271}],249:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_object-gopn").f,s={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return i(e)}catch(e){return a.slice()}};t.exports.f=function(e){return a&&"[object Window]"==s.call(e)?o(e):i(n(e))}},{"./_object-gopn":250,"./_to-iobject":268}],250:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys").concat("length","prototype");r.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},{"./_enum-bug-keys":222,"./_object-keys-internal":253}],251:[function(e,t,r){r.f=Object.getOwnPropertySymbols},{}],252:[function(e,t,r){var n=e("./_has"),i=e("./_to-object"),s=e("./_shared-key")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},{"./_has":228,"./_shared-key":263,"./_to-object":270}],253:[function(e,t,r){var n=e("./_has"),i=e("./_to-iobject"),s=e("./_array-includes")(!1),a=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var r,o=i(e),u=0,l=[];for(r in o)r!=a&&n(o,r)&&l.push(r);for(;t.length>u;)n(o,r=t[u++])&&(~s(l,r)||l.push(r));return l}},{"./_array-includes":207,"./_has":228,"./_shared-key":263,"./_to-iobject":268}],254:[function(e,t,r){var n=e("./_object-keys-internal"),i=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return n(e,i)}},{"./_enum-bug-keys":222,"./_object-keys-internal":253}],255:[function(e,t,r){r.f={}.propertyIsEnumerable},{}],256:[function(e,t,r){var n=e("./_export"),i=e("./_core"),s=e("./_fails");t.exports=function(e,t){var r=(i.Object||{})[e]||Object[e],a={};a[e]=t(r),n(n.S+n.F*s(function(){r(1)}),"Object",a)}},{"./_core":217,"./_export":224,"./_fails":225}],257:[function(e,t,r){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],258:[function(e,t,r){var n=e("./_hide");t.exports=function(e,t,r){for(var i in t)r&&e[i]?e[i]=t[i]:n(e,i,t[i]);return e}},{"./_hide":229}],259:[function(e,t,r){t.exports=e("./_hide")},{"./_hide":229}],260:[function(e,t,r){var n=e("./_is-object"),i=e("./_an-object"),s=function(e,t){if(i(e),!n(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,r,n){try{n=e("./_ctx")(Function.call,e("./_object-gopd").f(Object.prototype,"__proto__").set,2),n(t,[]),r=!(t instanceof Array)}catch(e){r=!0}return function(e,t){return s(e,t),r?e.__proto__=t:n(e,t),e}}({},!1):void 0),check:s}},{"./_an-object":205,"./_ctx":218,"./_is-object":235,"./_object-gopd":248}],261:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_core"),s=e("./_object-dp"),a=e("./_descriptors"),o=e("./_wks")("species");t.exports=function(e){var t="function"==typeof i[e]?i[e]:n[e];a&&t&&!t[o]&&s.f(t,o,{configurable:!0,get:function(){return this}})}},{"./_core":217,"./_descriptors":220,"./_global":227,"./_object-dp":246,"./_wks":275}],262:[function(e,t,r){var n=e("./_object-dp").f,i=e("./_has"),s=e("./_wks")("toStringTag");t.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,s)&&n(e,s,{configurable:!0,value:t})}},{"./_has":228,"./_object-dp":246,"./_wks":275}],263:[function(e,t,r){var n=e("./_shared")("keys"),i=e("./_uid");t.exports=function(e){return n[e]||(n[e]=i(e))}},{"./_shared":264,"./_uid":272}],264:[function(e,t,r){var n=e("./_global"),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});t.exports=function(e){return i[e]||(i[e]={})}},{"./_global":227}],265:[function(e,t,r){var n=e("./_to-integer"),i=e("./_defined");t.exports=function(e){return function(t,r){var s,a,o=String(i(t)),u=n(r),l=o.length;return u<0||u>=l?e?"":void 0:(s=o.charCodeAt(u),s<55296||s>56319||u+1===l||(a=o.charCodeAt(u+1))<56320||a>57343?e?o.charAt(u):s:e?o.slice(u,u+2):a-56320+(s-55296<<10)+65536)}}},{"./_defined":219,"./_to-integer":267}],266:[function(e,t,r){var n=e("./_to-integer"),i=Math.max,s=Math.min;t.exports=function(e,t){return e=n(e),e<0?i(e+t,0):s(e,t)}},{"./_to-integer":267}],267:[function(e,t,r){var n=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},{}],268:[function(e,t,r){var n=e("./_iobject"),i=e("./_defined");t.exports=function(e){return n(i(e))}},{"./_defined":219,"./_iobject":232}],269:[function(e,t,r){var n=e("./_to-integer"),i=Math.min;t.exports=function(e){return e>0?i(n(e),9007199254740991):0}},{"./_to-integer":267}],270:[function(e,t,r){var n=e("./_defined");t.exports=function(e){return Object(n(e))}},{"./_defined":219}],271:[function(e,t,r){var n=e("./_is-object");t.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":235}],272:[function(e,t,r){var n=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},{}],273:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_library"),a=e("./_wks-ext"),o=e("./_object-dp").f;t.exports=function(e){var t=i.Symbol||(i.Symbol=s?{}:n.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:a.f(e)})}},{"./_core":217,"./_global":227,"./_library":242,"./_object-dp":246,"./_wks-ext":274}],274:[function(e,t,r){r.f=e("./_wks")},{"./_wks":275}],275:[function(e,t,r){var n=e("./_shared")("wks"),i=e("./_uid"),s=e("./_global").Symbol,a="function"==typeof s;(t.exports=function(e){return n[e]||(n[e]=a&&s[e]||(a?s:i)("Symbol."+e))}).store=n},{"./_global":227,"./_shared":264,"./_uid":272}],276:[function(e,t,r){var n=e("./_classof"),i=e("./_wks")("iterator"),s=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||s[n(e)]}},{"./_classof":211,"./_core":217,"./_iterators":240,"./_wks":275}],277:[function(e,t,r){var n=e("./_an-object"),i=e("./core.get-iterator-method");t.exports=e("./_core").getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return n(t.call(e))}},{"./_an-object":205,"./_core":217,"./core.get-iterator-method":276}],278:[function(e,t,r){"use strict";var n=e("./_add-to-unscopables"),i=e("./_iter-step"),s=e("./_iterators"),a=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),s.Arguments=s.Array,n("keys"),n("values"),n("entries")},{"./_add-to-unscopables":203,"./_iter-define":238,"./_iter-step":239,"./_iterators":240,"./_to-iobject":268}],279:[function(e,t,r){"use strict";var n=e("./_collection-strong");t.exports=e("./_collection")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=n.getEntry(this,e);return t&&t.v},set:function(e,t){return n.def(this,0===e?0:e,t)}},n,!0)},{"./_collection":216,"./_collection-strong":213}],280:[function(e,t,r){var n=e("./_export");n(n.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},{"./_export":224}],281:[function(e,t,r){var n=e("./_export");n(n.S+n.F,"Object",{assign:e("./_object-assign")})},{"./_export":224,"./_object-assign":244}],282:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{create:e("./_object-create")})},{"./_export":224,"./_object-create":245}],283:[function(e,t,r){var n=e("./_to-object"),i=e("./_object-keys");e("./_object-sap")("keys",function(){return function(e){return i(n(e))}})},{"./_object-keys":254,"./_object-sap":256,"./_to-object":270}],284:[function(e,t,r){var n=e("./_export");n(n.S,"Object",{setPrototypeOf:e("./_set-proto").set})},{"./_export":224,"./_set-proto":260}],285:[function(e,t,r){arguments[4][181][0].apply(r,arguments)},{dup:181}],286:[function(e,t,r){"use strict";var n=e("./_string-at")(!0);e("./_iter-define")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=n(t,r),this._i+=e.length,{value:e,done:!1})})},{"./_iter-define":238,"./_string-at":265}],287:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_has"),s=e("./_descriptors"),a=e("./_export"),o=e("./_redefine"),u=e("./_meta").KEY,l=e("./_fails"),c=e("./_shared"),p=e("./_set-to-string-tag"),h=e("./_uid"),f=e("./_wks"),d=e("./_wks-ext"),m=e("./_wks-define"),y=e("./_keyof"),g=e("./_enum-keys"),b=e("./_is-array"),v=e("./_an-object"),x=e("./_to-iobject"),E=e("./_to-primitive"),A=e("./_property-desc"),D=e("./_object-create"),C=e("./_object-gopn-ext"),S=e("./_object-gopd"),_=e("./_object-dp"),w=e("./_object-keys"),k=S.f,F=_.f,T=C.f,P=n.Symbol,B=n.JSON,O=B&&B.stringify,j=f("_hidden"),N=f("toPrimitive"),I={}.propertyIsEnumerable,L=c("symbol-registry"),M=c("symbols"),R=c("op-symbols"),U=Object.prototype,V="function"==typeof P,q=n.QObject,G=!q||!q.prototype||!q.prototype.findChild,X=s&&l(function(){return 7!=D(F({},"a",{get:function(){return F(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=k(U,t);n&&delete U[t],F(e,t,r),n&&e!==U&&F(U,t,n)}:F,J=function(e){var t=M[e]=D(P.prototype);return t._k=e,t},W=V&&"symbol"==typeof P.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof P},K=function(e,t,r){return e===U&&K(R,t,r),v(e),t=E(t,!0),v(r),i(M,t)?(r.enumerable?(i(e,j)&&e[j][t]&&(e[j][t]=!1),r=D(r,{enumerable:A(0,!1)})):(i(e,j)||F(e,j,A(1,{})),e[j][t]=!0),X(e,t,r)):F(e,t,r)},z=function(e,t){v(e);for(var r,n=g(t=x(t)),i=0,s=n.length;s>i;)K(e,r=n[i++],t[r]);return e},Y=function(e,t){return void 0===t?D(e):z(D(e),t)},H=function(e){var t=I.call(this,e=E(e,!0));return!(this===U&&i(M,e)&&!i(R,e))&&(!(t||!i(this,e)||!i(M,e)||i(this,j)&&this[j][e])||t)},$=function(e,t){if(e=x(e),t=E(t,!0),e!==U||!i(M,t)||i(R,t)){var r=k(e,t);return!r||!i(M,t)||i(e,j)&&e[j][t]||(r.enumerable=!0),r}},Q=function(e){for(var t,r=T(x(e)),n=[],s=0;r.length>s;)i(M,t=r[s++])||t==j||t==u||n.push(t);return n},Z=function(e){for(var t,r=e===U,n=T(r?R:x(e)),s=[],a=0;n.length>a;)!i(M,t=n[a++])||r&&!i(U,t)||s.push(M[t]);return s};V||(P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(r){this===U&&t.call(R,r),i(this,j)&&i(this[j],e)&&(this[j][e]=!1),X(this,e,A(1,r))};return s&&G&&X(U,e,{configurable:!0,set:t}),J(e)},o(P.prototype,"toString",function(){return this._k}),S.f=$,_.f=K,e("./_object-gopn").f=C.f=Q,e("./_object-pie").f=H,e("./_object-gops").f=Z,s&&!e("./_library")&&o(U,"propertyIsEnumerable",H,!0),d.f=function(e){return J(f(e))}),a(a.G+a.W+a.F*!V,{Symbol:P});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)f(ee[te++]);for(var ee=w(f.store),te=0;ee.length>te;)m(ee[te++]);a(a.S+a.F*!V,"Symbol",{for:function(e){return i(L,e+="")?L[e]:L[e]=P(e)},keyFor:function(e){if(W(e))return y(L,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){G=!0},useSimple:function(){G=!1}}),a(a.S+a.F*!V,"Object",{create:Y,defineProperty:K,defineProperties:z,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),B&&a(a.S+a.F*(!V||l(function(){var e=P();return"[null]"!=O([e])||"{}"!=O({a:e})||"{}"!=O(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!W(e)){for(var t,r,n=[e],i=1;arguments.length>i;)n.push(arguments[i++]);return t=n[1],"function"==typeof t&&(r=t),!r&&b(t)||(t=function(e,t){if(r&&(t=r.call(this,e,t)),!W(t))return t}),n[1]=t,O.apply(B,n)}}}),P.prototype[N]||e("./_hide")(P.prototype,N,P.prototype.valueOf),p(P,"Symbol"),p(Math,"Math",!0),p(n.JSON,"JSON",!0)},{"./_an-object":205,"./_descriptors":220,"./_enum-keys":223,"./_export":224,"./_fails":225,"./_global":227,"./_has":228,"./_hide":229,"./_is-array":234,"./_keyof":241,"./_library":242,"./_meta":243,"./_object-create":245,"./_object-dp":246,"./_object-gopd":248,"./_object-gopn":250,"./_object-gopn-ext":249,"./_object-gops":251,"./_object-keys":254,"./_object-pie":255,"./_property-desc":257,"./_redefine":259,"./_set-to-string-tag":262,"./_shared":264,"./_to-iobject":268,"./_to-primitive":271,"./_uid":272,"./_wks":275,"./_wks-define":273,"./_wks-ext":274}],288:[function(e,t,r){"use strict";var n,i=e("./_array-methods")(0),s=e("./_redefine"),a=e("./_meta"),o=e("./_object-assign"),u=e("./_collection-weak"),l=e("./_is-object"),c=a.getWeak,p=Object.isExtensible,h=u.ufstore,f={},d=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(l(e)){var t=c(e);return!0===t?h(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(this,e,t)}},y=t.exports=e("./_collection")("WeakMap",d,m,u,!0,!0);7!=(new y).set((Object.freeze||Object)(f),7).get(f)&&(n=u.getConstructor(d),o(n.prototype,m),a.NEED=!0,i(["delete","has","get","set"],function(e){var t=y.prototype,r=t[e];s(t,e,function(t,i){if(l(t)&&!p(t)){this._f||(this._f=new n);var s=this._f[e](t,i);return"set"==e?this:s}return r.call(this,t,i)})}))},{"./_array-methods":208,"./_collection":216,"./_collection-weak":215,"./_is-object":235,"./_meta":243,"./_object-assign":244,"./_redefine":259}],289:[function(e,t,r){"use strict";var n=e("./_collection-weak");e("./_collection")("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return n.def(this,e,!0)}},n,!1,!0)},{"./_collection":216,"./_collection-weak":215}],290:[function(e,t,r){var n=e("./_export");n(n.P+n.R,"Map",{toJSON:e("./_collection-to-json")("Map")})},{"./_collection-to-json":214,"./_export":224}],291:[function(e,t,r){e("./_wks-define")("asyncIterator")},{"./_wks-define":273}],292:[function(e,t,r){e("./_wks-define")("observable")},{"./_wks-define":273}],293:[function(e,t,r){e("./es6.array.iterator");for(var n=e("./_global"),i=e("./_hide"),s=e("./_iterators"),a=e("./_wks")("toStringTag"),o=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var l=o[u],c=n[l],p=c&&c.prototype;p&&!p[a]&&i(p,a,l),s[l]=s.Array}},{"./_global":227,"./_hide":229,"./_iterators":240,"./_wks":275,"./es6.array.iterator":278}],294:[function(e,t,r){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===y(e)}function n(e){return"boolean"==typeof e}function i(e){return null===e}function s(e){return null==e}function a(e){return"number"==typeof e}function o(e){return"string"==typeof e}function u(e){return"symbol"==typeof e}function l(e){return void 0===e}function c(e){return"[object RegExp]"===y(e)}function p(e){return"object"==typeof e&&null!==e}function h(e){return"[object Date]"===y(e)}function f(e){return"[object Error]"===y(e)||e instanceof Error}function d(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function y(e){return Object.prototype.toString.call(e)}r.isArray=t,r.isBoolean=n,r.isNull=i,r.isNullOrUndefined=s,r.isNumber=a,r.isString=o,r.isSymbol=u,r.isUndefined=l,r.isRegExp=c,r.isObject=p,r.isDate=h,r.isError=f,r.isFunction=d,r.isPrimitive=m, -r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":308}],295:[function(e,t,r){t.exports=e("./src/node")},{"./src/node":298}],296:[function(e,t,r){(function(n){function i(){return!("undefined"==typeof window||!window||void 0===window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window&&window.console&&(console.firebug||console.exception&&console.table)||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function s(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,s=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(s=i))}),e.splice(s,0,n)}}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function o(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}}function u(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}r=t.exports=e("./debug"),r.log=a,r.formatArgs=s,r.save=o,r.load=u,r.useColors=i,r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(u())}).call(this,e("_process"))},{"./debug":297,_process:539}],297:[function(e,t,r){function n(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}function i(e){function t(){if(t.enabled){var e=t,n=+new Date,i=n-(l||n);e.diff=i,e.prev=l,e.curr=n,l=n;for(var s=new Array(arguments.length),a=0;ar||a===r&&o>n)&&(r=a,n=o,t=Number(i))}return t}var i=e("repeating");t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");var t,r,s=0,a=0,o=0,u={};e.split(/\n/g).forEach(function(e){if(e){var n,i=e.match(/^(?:( )+|\t+)/);i?(n=i[0].length,i[1]?a++:s++):n=0;var l=n-o;o=n,l?(r=l>0,t=u[r?l:-l],t?t[0]++:t=u[l]=[1,0]):t&&(t[1]+=Number(r))}});var l,c,p=n(u);return p?a>=s?(l="space",c=i(" ",p)):(l="tab",c=i("\t",p)):(l=null,c=""),{amount:p,type:l,indent:c}}},{repeating:588}],300:[function(e,t,r){"use strict";t.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}},{}],301:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function s(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function o(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!s(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}if(r=this._events[e],o(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(a(r))for(s=Array.prototype.slice.call(arguments,1),l=r.slice(),n=l.length,u=0;u0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,s,o;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],s=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(r)){for(o=s;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){n=o;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],302:[function(e,t,r){t.exports={builtin:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},es5:{Array:!1,Boolean:!1,constructor:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,propertyIsEnumerable:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,toLocaleString:!1,toString:!1,TypeError:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1},es6:{Array:!1,ArrayBuffer:!1,Boolean:!1,constructor:!1,DataView:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,escape:!1,eval:!1,EvalError:!1,Float32Array:!1,Float64Array:!1,Function:!1,hasOwnProperty:!1,Infinity:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,isFinite:!1,isNaN:!1,isPrototypeOf:!1,JSON:!1,Map:!1,Math:!1,NaN:!1,Number:!1,Object:!1,parseFloat:!1,parseInt:!1,Promise:!1,propertyIsEnumerable:!1,Proxy:!1,RangeError:!1,ReferenceError:!1,Reflect:!1,RegExp:!1,Set:!1,String:!1,Symbol:!1,SyntaxError:!1,System:!1,toLocaleString:!1,toString:!1,TypeError:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,Uint8ClampedArray:!1,undefined:!1,unescape:!1,URIError:!1,valueOf:!1,WeakMap:!1,WeakSet:!1},browser:{addEventListener:!1,alert:!1,AnalyserNode:!1,Animation:!1,AnimationEffectReadOnly:!1,AnimationEffectTiming:!1,AnimationEffectTimingReadOnly:!1,AnimationEvent:!1,AnimationPlaybackEvent:!1,AnimationTimeline:!1,applicationCache:!1,ApplicationCache:!1,ApplicationCacheErrorEvent:!1,atob:!1,Attr:!1,Audio:!1,AudioBuffer:!1,AudioBufferSourceNode:!1,AudioContext:!1,AudioDestinationNode:!1,AudioListener:!1,AudioNode:!1,AudioParam:!1,AudioProcessingEvent:!1,AutocompleteErrorEvent:!1,BarProp:!1,BatteryManager:!1,BeforeUnloadEvent:!1,BiquadFilterNode:!1,Blob:!1,blur:!1,btoa:!1,Cache:!1,caches:!1,CacheStorage:!1,cancelAnimationFrame:!1,CanvasGradient:!1,CanvasPattern:!1,CanvasRenderingContext2D:!1,CDATASection:!1,ChannelMergerNode:!1,ChannelSplitterNode:!1,CharacterData:!1,clearInterval:!1,clearTimeout:!1,clientInformation:!1,ClientRect:!1,ClientRectList:!1,ClipboardEvent:!1,close:!1,closed:!1,CloseEvent:!1,Comment:!1,CompositionEvent:!1,confirm:!1,console:!1,ConvolverNode:!1,Credential:!1,CredentialsContainer:!1,crypto:!1,Crypto:!1,CryptoKey:!1,CSS:!1,CSSAnimation:!1,CSSFontFaceRule:!1,CSSImportRule:!1,CSSKeyframeRule:!1,CSSKeyframesRule:!1,CSSMediaRule:!1,CSSPageRule:!1,CSSRule:!1,CSSRuleList:!1,CSSStyleDeclaration:!1,CSSStyleRule:!1,CSSStyleSheet:!1,CSSSupportsRule:!1,CSSTransition:!1,CSSUnknownRule:!1,CSSViewportRule:!1,customElements:!1,CustomEvent:!1,DataTransfer:!1,DataTransferItem:!1,DataTransferItemList:!1,Debug:!1,defaultStatus:!1,defaultstatus:!1,DelayNode:!1,DeviceMotionEvent:!1,DeviceOrientationEvent:!1,devicePixelRatio:!1,dispatchEvent:!1,document:!1,Document:!1,DocumentFragment:!1,DocumentTimeline:!1,DocumentType:!1,DOMError:!1,DOMException:!1,DOMImplementation:!1,DOMParser:!1,DOMSettableTokenList:!1,DOMStringList:!1,DOMStringMap:!1,DOMTokenList:!1,DragEvent:!1,DynamicsCompressorNode:!1,Element:!1,ElementTimeControl:!1,ErrorEvent:!1,event:!1,Event:!1,EventSource:!1,EventTarget:!1,external:!1,FederatedCredential:!1,fetch:!1,File:!1,FileError:!1,FileList:!1,FileReader:!1,find:!1,focus:!1,FocusEvent:!1,FontFace:!1,FormData:!1,frameElement:!1,frames:!1,GainNode:!1,Gamepad:!1,GamepadButton:!1,GamepadEvent:!1,getComputedStyle:!1,getSelection:!1,HashChangeEvent:!1,Headers:!1,history:!1,History:!1,HTMLAllCollection:!1,HTMLAnchorElement:!1,HTMLAppletElement:!1,HTMLAreaElement:!1,HTMLAudioElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLCollection:!1,HTMLContentElement:!1,HTMLDataListElement:!1,HTMLDetailsElement:!1,HTMLDialogElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLDocument:!1,HTMLElement:!1,HTMLEmbedElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormControlsCollection:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLKeygenElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMarqueeElement:!1,HTMLMediaElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLMeterElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLOptionsCollection:!1,HTMLOutputElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPictureElement:!1,HTMLPreElement:!1,HTMLProgressElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLShadowElement:!1,HTMLSourceElement:!1,HTMLSpanElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTemplateElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLTrackElement:!1,HTMLUListElement:!1,HTMLUnknownElement:!1,HTMLVideoElement:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBEnvironment:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,Image:!1,ImageBitmap:!1,ImageData:!1,indexedDB:!1,innerHeight:!1,innerWidth:!1,InputEvent:!1,InputMethodContext:!1,IntersectionObserver:!1,IntersectionObserverEntry:!1,Intl:!1,KeyboardEvent:!1,KeyframeEffect:!1,KeyframeEffectReadOnly:!1,length:!1,localStorage:!1,location:!1,Location:!1,locationbar:!1,matchMedia:!1,MediaElementAudioSourceNode:!1,MediaEncryptedEvent:!1,MediaError:!1,MediaKeyError:!1,MediaKeyEvent:!1,MediaKeyMessageEvent:!1,MediaKeys:!1,MediaKeySession:!1,MediaKeyStatusMap:!1,MediaKeySystemAccess:!1,MediaList:!1,MediaQueryList:!1,MediaQueryListEvent:!1,MediaSource:!1,MediaRecorder:!1,MediaStream:!1,MediaStreamAudioDestinationNode:!1,MediaStreamAudioSourceNode:!1,MediaStreamEvent:!1,MediaStreamTrack:!1,menubar:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,MIDIAccess:!1,MIDIConnectionEvent:!1,MIDIInput:!1,MIDIInputMap:!1,MIDIMessageEvent:!1,MIDIOutput:!1,MIDIOutputMap:!1,MIDIPort:!1,MimeType:!1,MimeTypeArray:!1,MouseEvent:!1,moveBy:!1,moveTo:!1,MutationEvent:!1,MutationObserver:!1,MutationRecord:!1,name:!1,NamedNodeMap:!1,navigator:!1,Navigator:!1,Node:!1,NodeFilter:!1,NodeIterator:!1,NodeList:!1,Notification:!1,OfflineAudioCompletionEvent:!1,OfflineAudioContext:!1,offscreenBuffering:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,opera:!1,Option:!1,OscillatorNode:!1,outerHeight:!1,outerWidth:!1,PageTransitionEvent:!1,pageXOffset:!1,pageYOffset:!1,parent:!1,PasswordCredential:!1,Path2D:!1,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,PeriodicWave:!1,Permissions:!1,PermissionStatus:!1,personalbar:!1,Plugin:!1,PluginArray:!1,PopStateEvent:!1,postMessage:!1,print:!1,ProcessingInstruction:!1,ProgressEvent:!1,PromiseRejectionEvent:!1,prompt:!1,PushManager:!1,PushSubscription:!1,RadioNodeList:!1,Range:!1,ReadableByteStream:!1,ReadableStream:!1,removeEventListener:!1,Request:!1,requestAnimationFrame:!1,requestIdleCallback:!1,resizeBy:!1,resizeTo:!1,Response:!1,RTCIceCandidate:!1,RTCSessionDescription:!1,RTCPeerConnection:!1,screen:!1,Screen:!1,screenLeft:!1,ScreenOrientation:!1,screenTop:!1,screenX:!1,screenY:!1,ScriptProcessorNode:!1,scroll:!1,scrollbars:!1,scrollBy:!1,scrollTo:!1,scrollX:!1,scrollY:!1,SecurityPolicyViolationEvent:!1,Selection:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerRegistration:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,ShadowRoot:!1,SharedKeyframeList:!1,SharedWorker:!1,showModalDialog:!1,SiteBoundCredential:!1,speechSynthesis:!1,SpeechSynthesisEvent:!1,SpeechSynthesisUtterance:!1,status:!1,statusbar:!1,stop:!1,Storage:!1,StorageEvent:!1,styleMedia:!1,StyleSheet:!1,StyleSheetList:!1,SubtleCrypto:!1,SVGAElement:!1,SVGAltGlyphDefElement:!1,SVGAltGlyphElement:!1,SVGAltGlyphItemElement:!1,SVGAngle:!1,SVGAnimateColorElement:!1,SVGAnimatedAngle:!1,SVGAnimatedBoolean:!1,SVGAnimatedEnumeration:!1,SVGAnimatedInteger:!1,SVGAnimatedLength:!1,SVGAnimatedLengthList:!1,SVGAnimatedNumber:!1,SVGAnimatedNumberList:!1,SVGAnimatedPathData:!1,SVGAnimatedPoints:!1,SVGAnimatedPreserveAspectRatio:!1,SVGAnimatedRect:!1,SVGAnimatedString:!1,SVGAnimatedTransformList:!1,SVGAnimateElement:!1,SVGAnimateMotionElement:!1,SVGAnimateTransformElement:!1,SVGAnimationElement:!1,SVGCircleElement:!1,SVGClipPathElement:!1,SVGColor:!1,SVGColorProfileElement:!1,SVGColorProfileRule:!1,SVGComponentTransferFunctionElement:!1,SVGCSSRule:!1,SVGCursorElement:!1,SVGDefsElement:!1,SVGDescElement:!1,SVGDiscardElement:!1,SVGDocument:!1,SVGElement:!1,SVGElementInstance:!1,SVGElementInstanceList:!1,SVGEllipseElement:!1,SVGEvent:!1,SVGExternalResourcesRequired:!1,SVGFEBlendElement:!1,SVGFEColorMatrixElement:!1,SVGFEComponentTransferElement:!1,SVGFECompositeElement:!1,SVGFEConvolveMatrixElement:!1,SVGFEDiffuseLightingElement:!1,SVGFEDisplacementMapElement:!1,SVGFEDistantLightElement:!1,SVGFEDropShadowElement:!1,SVGFEFloodElement:!1,SVGFEFuncAElement:!1,SVGFEFuncBElement:!1,SVGFEFuncGElement:!1,SVGFEFuncRElement:!1,SVGFEGaussianBlurElement:!1,SVGFEImageElement:!1,SVGFEMergeElement:!1,SVGFEMergeNodeElement:!1,SVGFEMorphologyElement:!1,SVGFEOffsetElement:!1,SVGFEPointLightElement:!1,SVGFESpecularLightingElement:!1,SVGFESpotLightElement:!1,SVGFETileElement:!1,SVGFETurbulenceElement:!1,SVGFilterElement:!1,SVGFilterPrimitiveStandardAttributes:!1,SVGFitToViewBox:!1,SVGFontElement:!1,SVGFontFaceElement:!1,SVGFontFaceFormatElement:!1,SVGFontFaceNameElement:!1,SVGFontFaceSrcElement:!1,SVGFontFaceUriElement:!1,SVGForeignObjectElement:!1,SVGGElement:!1,SVGGeometryElement:!1,SVGGlyphElement:!1,SVGGlyphRefElement:!1,SVGGradientElement:!1,SVGGraphicsElement:!1,SVGHKernElement:!1,SVGICCColor:!1,SVGImageElement:!1,SVGLangSpace:!1,SVGLength:!1,SVGLengthList:!1,SVGLinearGradientElement:!1,SVGLineElement:!1,SVGLocatable:!1,SVGMarkerElement:!1,SVGMaskElement:!1,SVGMatrix:!1,SVGMetadataElement:!1,SVGMissingGlyphElement:!1,SVGMPathElement:!1,SVGNumber:!1,SVGNumberList:!1,SVGPaint:!1,SVGPathElement:!1,SVGPathSeg:!1,SVGPathSegArcAbs:!1,SVGPathSegArcRel:!1,SVGPathSegClosePath:!1,SVGPathSegCurvetoCubicAbs:!1,SVGPathSegCurvetoCubicRel:!1,SVGPathSegCurvetoCubicSmoothAbs:!1,SVGPathSegCurvetoCubicSmoothRel:!1,SVGPathSegCurvetoQuadraticAbs:!1,SVGPathSegCurvetoQuadraticRel:!1,SVGPathSegCurvetoQuadraticSmoothAbs:!1,SVGPathSegCurvetoQuadraticSmoothRel:!1,SVGPathSegLinetoAbs:!1,SVGPathSegLinetoHorizontalAbs:!1,SVGPathSegLinetoHorizontalRel:!1,SVGPathSegLinetoRel:!1,SVGPathSegLinetoVerticalAbs:!1,SVGPathSegLinetoVerticalRel:!1,SVGPathSegList:!1,SVGPathSegMovetoAbs:!1,SVGPathSegMovetoRel:!1,SVGPatternElement:!1,SVGPoint:!1,SVGPointList:!1,SVGPolygonElement:!1,SVGPolylineElement:!1,SVGPreserveAspectRatio:!1,SVGRadialGradientElement:!1,SVGRect:!1,SVGRectElement:!1,SVGRenderingIntent:!1,SVGScriptElement:!1,SVGSetElement:!1,SVGStopElement:!1,SVGStringList:!1,SVGStylable:!1,SVGStyleElement:!1,SVGSVGElement:!1,SVGSwitchElement:!1,SVGSymbolElement:!1,SVGTests:!1,SVGTextContentElement:!1,SVGTextElement:!1,SVGTextPathElement:!1,SVGTextPositioningElement:!1,SVGTitleElement:!1,SVGTransform:!1,SVGTransformable:!1,SVGTransformList:!1,SVGTRefElement:!1,SVGTSpanElement:!1,SVGUnitTypes:!1,SVGURIReference:!1,SVGUseElement:!1,SVGViewElement:!1,SVGViewSpec:!1,SVGVKernElement:!1,SVGZoomAndPan:!1,SVGZoomEvent:!1,Text:!1,TextDecoder:!1,TextEncoder:!1,TextEvent:!1,TextMetrics:!1,TextTrack:!1,TextTrackCue:!1,TextTrackCueList:!1,TextTrackList:!1,TimeEvent:!1,TimeRanges:!1,toolbar:!1,top:!1,Touch:!1,TouchEvent:!1,TouchList:!1,TrackEvent:!1,TransitionEvent:!1,TreeWalker:!1,UIEvent:!1,URL:!1,URLSearchParams:!1,ValidityState:!1,VTTCue:!1,WaveShaperNode:!1,WebGLActiveInfo:!1,WebGLBuffer:!1,WebGLContextEvent:!1,WebGLFramebuffer:!1,WebGLProgram:!1,WebGLRenderbuffer:!1,WebGLRenderingContext:!1,WebGLShader:!1,WebGLShaderPrecisionFormat:!1,WebGLTexture:!1,WebGLUniformLocation:!1,WebSocket:!1,WheelEvent:!1,window:!1,Window:!1,Worker:!1,XDomainRequest:!1,XMLDocument:!1,XMLHttpRequest:!1,XMLHttpRequestEventTarget:!1,XMLHttpRequestProgressEvent:!1,XMLHttpRequestUpload:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1,XSLTProcessor:!1},worker:{applicationCache:!1,atob:!1,Blob:!1,BroadcastChannel:!1,btoa:!1,Cache:!1,caches:!1,clearInterval:!1,clearTimeout:!1,close:!0,console:!1,fetch:!1,FileReaderSync:!1,FormData:!1,Headers:!1,IDBCursor:!1,IDBCursorWithValue:!1,IDBDatabase:!1,IDBFactory:!1,IDBIndex:!1,IDBKeyRange:!1,IDBObjectStore:!1,IDBOpenDBRequest:!1,IDBRequest:!1,IDBTransaction:!1,IDBVersionChangeEvent:!1,ImageData:!1,importScripts:!0,indexedDB:!1,location:!1,MessageChannel:!1,MessagePort:!1,name:!1,navigator:!1,Notification:!1,onclose:!0,onconnect:!0,onerror:!0,onlanguagechange:!0,onmessage:!0,onoffline:!0,ononline:!0,onrejectionhandled:!0,onunhandledrejection:!0,performance:!1,Performance:!1,PerformanceEntry:!1,PerformanceMark:!1,PerformanceMeasure:!1,PerformanceNavigation:!1,PerformanceResourceTiming:!1,PerformanceTiming:!1,postMessage:!0,Promise:!1,Request:!1,Response:!1,self:!0,ServiceWorkerRegistration:!1,setInterval:!1,setTimeout:!1,TextDecoder:!1,TextEncoder:!1,URL:!1,URLSearchParams:!1,WebSocket:!1,Worker:!1,XMLHttpRequest:!1},node:{__dirname:!1,__filename:!1,arguments:!1,Buffer:!1,clearImmediate:!1,clearInterval:!1,clearTimeout:!1,console:!1,exports:!0,GLOBAL:!1,global:!1,Intl:!1,module:!1,process:!1,require:!1,root:!1,setImmediate:!1,setInterval:!1,setTimeout:!1},commonjs:{exports:!0,module:!1,require:!1,global:!1},amd:{define:!1,require:!1},mocha:{after:!1,afterEach:!1,before:!1,beforeEach:!1,context:!1,describe:!1,it:!1,mocha:!1,run:!1,setup:!1,specify:!1,suite:!1,suiteSetup:!1,suiteTeardown:!1,teardown:!1,test:!1,xcontext:!1,xdescribe:!1,xit:!1,xspecify:!1},jasmine:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,describe:!1,expect:!1,fail:!1,fdescribe:!1,fit:!1,it:!1,jasmine:!1,pending:!1,runs:!1,spyOn:!1,waits:!1,waitsFor:!1,xdescribe:!1,xit:!1},jest:{afterAll:!1,afterEach:!1,beforeAll:!1,beforeEach:!1,check:!1,describe:!1,expect:!1,gen:!1,it:!1,fdescribe:!1,fit:!1,jest:!1,pit:!1,require:!1,test:!1,xdescribe:!1,xit:!1,xtest:!1},qunit:{asyncTest:!1,deepEqual:!1,equal:!1,expect:!1,module:!1,notDeepEqual:!1,notEqual:!1,notOk:!1,notPropEqual:!1,notStrictEqual:!1,ok:!1,propEqual:!1,QUnit:!1,raises:!1,start:!1,stop:!1,strictEqual:!1,test:!1,throws:!1},phantomjs:{console:!0,exports:!0,phantom:!0,require:!0,WebPage:!0},couch:{emit:!1,exports:!1,getRow:!1,log:!1,module:!1,provides:!1,require:!1,respond:!1,send:!1,start:!1,sum:!1},rhino:{defineClass:!1,deserialize:!1,gc:!1,help:!1,importClass:!1,importPackage:!1,java:!1,load:!1,loadClass:!1,Packages:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},nashorn:{__DIR__:!1,__FILE__:!1,__LINE__:!1,com:!1,edu:!1,exit:!1,Java:!1,java:!1,javafx:!1,JavaImporter:!1,javax:!1,JSAdapter:!1,load:!1,loadWithNewGlobal:!1,org:!1,Packages:!1,print:!1,quit:!1},wsh:{ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WScript:!0,WSH:!0,XDomainRequest:!0},jquery:{$:!1,jQuery:!1},yui:{Y:!1,YUI:!1,YUI_config:!1},shelljs:{cat:!1,cd:!1,chmod:!1,config:!1,cp:!1,dirs:!1,echo:!1,env:!1,error:!1,exec:!1,exit:!1,find:!1,grep:!1,ls:!1,ln:!1,mkdir:!1,mv:!1,popd:!1,pushd:!1,pwd:!1,rm:!1,sed:!1,set:!1,target:!1,tempdir:!1,test:!1,touch:!1,which:!1},prototypejs:{$:!1,$$:!1,$A:!1,$break:!1,$continue:!1,$F:!1,$H:!1,$R:!1,$w:!1,Abstract:!1,Ajax:!1,Autocompleter:!1,Builder:!1,Class:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Element:!1,Enumerable:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Scriptaculous:!1,Selector:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Template:!1,Toggle:!1,Try:!1},meteor:{$:!1,_:!1,Accounts:!1,AccountsClient:!1,AccountsServer:!1,AccountsCommon:!1,App:!1,Assets:!1,Blaze:!1,check:!1,Cordova:!1,DDP:!1,DDPServer:!1,DDPRateLimiter:!1,Deps:!1,EJSON:!1,Email:!1,HTTP:!1,Log:!1,Match:!1,Meteor:!1,Mongo:!1,MongoInternals:!1,Npm:!1,Package:!1,Plugin:!1,process:!1,Random:!1,ReactiveDict:!1,ReactiveVar:!1,Router:!1,ServiceConfiguration:!1,Session:!1,share:!1,Spacebars:!1,Template:!1,Tinytest:!1,Tracker:!1,UI:!1,Utils:!1,WebApp:!1,WebAppInternals:!1},mongo:{_isWindows:!1,_rand:!1,BulkWriteResult:!1,cat:!1,cd:!1,connect:!1,db:!1,getHostName:!1,getMemInfo:!1,hostname:!1,ISODate:!1,listFiles:!1,load:!1,ls:!1,md5sumFile:!1,mkdir:!1,Mongo:!1,NumberInt:!1,NumberLong:!1,ObjectId:!1,PlanCache:!1,print:!1,printjson:!1,pwd:!1,quit:!1,removeFile:!1,rs:!1,sh:!1,UUID:!1,version:!1,WriteResult:!1},applescript:{$:!1,Application:!1,Automation:!1,console:!1,delay:!1,Library:!1,ObjC:!1,ObjectSpecifier:!1,Path:!1,Progress:!1,Ref:!1},serviceworker:{caches:!1,Cache:!1,CacheStorage:!1,Client:!1,clients:!1,Clients:!1,ExtendableEvent:!1,ExtendableMessageEvent:!1,FetchEvent:!1,importScripts:!1,registration:!1,self:!1,ServiceWorker:!1,ServiceWorkerContainer:!1,ServiceWorkerGlobalScope:!1,ServiceWorkerMessageEvent:!1,ServiceWorkerRegistration:!1,skipWaiting:!1,WindowClient:!1},atomtest:{advanceClock:!1,fakeClearInterval:!1,fakeClearTimeout:!1,fakeSetInterval:!1,fakeSetTimeout:!1,resetTimeouts:!1,waitsForPromise:!1},embertest:{andThen:!1,click:!1,currentPath:!1,currentRouteName:!1,currentURL:!1,fillIn:!1,find:!1,findWithAssert:!1,keyEvent:!1,pauseTest:!1,resumeTest:!1,triggerEvent:!1,visit:!1},protractor:{$:!1,$$:!1,browser:!1,By:!1,by:!1,DartObject:!1,element:!1,protractor:!1},"shared-node-browser":{clearInterval:!1,clearTimeout:!1,console:!1,setInterval:!1,setTimeout:!1},webextensions:{browser:!1,chrome:!1,opr:!1},greasemonkey:{GM_addStyle:!1,GM_deleteValue:!1,GM_getResourceText:!1,GM_getResourceURL:!1,GM_getValue:!1,GM_info:!1,GM_listValues:!1,GM_log:!1,GM_openInTab:!1,GM_registerMenuCommand:!1,GM_setClipboard:!1,GM_setValue:!1,GM_xmlhttpRequest:!1,unsafeWindow:!1}}},{}],303:[function(e,t,r){t.exports=e("./globals.json")},{"./globals.json":302}],304:[function(e,t,r){"use strict";var n=e("ansi-regex"),i=new RegExp(n().source);t.exports=i.test.bind(i)},{"ansi-regex":1}],305:[function(e,t,r){r.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<>1,c=-7,p=r?i-1:0,h=r?-1:1,f=e[t+p];for(p+=h,s=f&(1<<-c)-1,f>>=-c,c+=o;c>0;s=256*s+e[t+p],p+=h,c-=8);for(a=s&(1<<-c)-1,s>>=-c,c+=n;c>0;a=256*a+e[t+p],p+=h,c-=8);if(0===s)s=1-l;else{if(s===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,n),s-=l}return(f?-1:1)*a*Math.pow(2,s-n)},r.write=function(e,t,r,n,i,s){var a,o,u,l=8*s-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+p>=1?h/u:h*Math.pow(2,1-p),t*u>=2&&(a++,u/=2),a+p>=c?(o=0,a=c):a+p>=1?(o=(t*u-1)*Math.pow(2,i),a+=p):(o=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[r+f]=255&o,f+=d,o/=256,i-=8);for(a=a<0;e[r+f]=255&a,f+=d,a/=256,l-=8);e[r+f-d]|=128*m}},{}],306:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],307:[function(e,t,r){"use strict";var n=function(e,t,r,n,i,s,a,o){if(void 0===t)throw new Error("invariant requires an error message argument");if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[r,n,i,s,a,o],c=0;u=new Error(t.replace(/%s/g,function(){return l[c++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}};t.exports=n},{}],308:[function(e,t,r){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function i(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}t.exports=function(e){return null!=e&&(n(e)||i(e)||!!e._isBuffer)}},{}],309:[function(e,t,r){"use strict";var n=e("number-is-nan");t.exports=Number.isFinite||function(e){return!("number"!=typeof e||n(e)||e===1/0||e===-1/0)}},{"number-is-nan":533}],310:[function(e,t,r){var n={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},{}],311:[function(e,t,r){Object.defineProperty(r,"__esModule",{value:!0}), -r.default=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g,r.matchToToken=function(e){var t={type:"invalid",value:e[0]};return e[1]?(t.type="string",t.closed=!(!e[3]&&!e[4])):e[5]?t.type="comment":e[6]?(t.type="comment",t.closed=!!e[7]):e[8]?t.type="regex":e[9]?t.type="number":e[10]?t.type="name":e[11]?t.type="punctuator":e[12]&&(t.type="whitespace"),t}},{}],312:[function(e,t,r){(function(e){!function(n){var i="object"==typeof r&&r,s="object"==typeof t&&t&&t.exports==i&&t,a="object"==typeof e&&e;a.global!==a&&a.window!==a||(n=a);var o={},u=o.hasOwnProperty,l=function(e,t){var r;for(r in e)u.call(e,r)&&t(r,e[r])},c=function(e,t){return t?(l(t,function(t,r){e[t]=r}),e):e},p=function(e,t){for(var r=e.length,n=-1;++n=55296&&j<=56319&&R>M+1&&(N=L.charCodeAt(M+1))>=56320&&N<=57343){I=1024*(j-55296)+N-56320+65536;var V=I.toString(16);u||(V=V.toUpperCase()),i+="\\u{"+V+"}",M++}else{if(!t.escapeEverything){if(D.test(U)){i+=U;continue}if('"'==U){i+=s==U?'\\"':U;continue}if("'"==U){i+=s==U?"\\'":U;continue}}if("\0"!=U||n||A.test(L.charAt(M+1)))if(E.test(U))i+=x[U];else{var q=U.charCodeAt(0),V=q.toString(16);u||(V=V.toUpperCase());var G=V.length>2||n,X="\\"+(G?"u":"x")+("0000"+V).slice(G?-4:-2);i+=X}else i+="\\0"}}return t.wrap&&(i=s+i+s),t.escapeEtago?i.replace(/<\/(script|style)/gi,"<\\/$1"):i};C.version="1.3.0","function"==typeof define&&"object"==typeof define.amd&&define.amd?define(function(){return C}):i&&!i.nodeType?s?s.exports=C:i.jsesc=C:n.jsesc=C}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],313:[function(e,t,r){var n="object"==typeof r?r:{};n.parse=function(){"use strict";var e,t,r,n,i,s,a={"'":"'",'"':'"',"\\":"\\","/":"/","\n":"",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},o=[" ","\t","\r","\n","\v","\f"," ","\ufeff"],u=function(e){return""===e?"EOF":"'"+e+"'"},l=function(n){var s=new SyntaxError;throw s.message=n+" at line "+t+" column "+r+" of the JSON5 data. Still to read: "+JSON.stringify(i.substring(e-1,e+19)),s.at=e,s.lineNumber=t,s.columnNumber=r,s},c=function(s){return s&&s!==n&&l("Expected "+u(s)+" instead of "+u(n)),n=i.charAt(e),e++,r++,("\n"===n||"\r"===n&&"\n"!==p())&&(t++,r=0),n},p=function(){return i.charAt(e)},h=function(){var e=n;for("_"!==n&&"$"!==n&&(n<"a"||n>"z")&&(n<"A"||n>"Z")&&l("Bad identifier as unquoted key");c()&&("_"===n||"$"===n||n>="a"&&n<="z"||n>="A"&&n<="Z"||n>="0"&&n<="9");)e+=n;return e},f=function(){var e,t="",r="",i=10;if("-"!==n&&"+"!==n||(t=n,c(n)),"I"===n)return e=v(),("number"!=typeof e||isNaN(e))&&l("Unexpected word for number"),"-"===t?-e:e;if("N"===n)return e=v(),isNaN(e)||l("expected word to be NaN"),e;switch("0"===n&&(r+=n,c(),"x"===n||"X"===n?(r+=n,c(),i=16):n>="0"&&n<="9"&&l("Octal literal")),i){case 10:for(;n>="0"&&n<="9";)r+=n,c();if("."===n)for(r+=".";c()&&n>="0"&&n<="9";)r+=n;if("e"===n||"E"===n)for(r+=n,c(),"-"!==n&&"+"!==n||(r+=n,c());n>="0"&&n<="9";)r+=n,c();break;case 16:for(;n>="0"&&n<="9"||n>="A"&&n<="F"||n>="a"&&n<="f";)r+=n,c()}if(e="-"===t?-r:+r,isFinite(e))return e;l("Bad number")},d=function(){var e,t,r,i,s="";if('"'===n||"'"===n)for(r=n;c();){if(n===r)return c(),s;if("\\"===n)if(c(),"u"===n){for(i=0,t=0;t<4&&(e=parseInt(c(),16),isFinite(e));t+=1)i=16*i+e;s+=String.fromCharCode(i)}else if("\r"===n)"\n"===p()&&c();else{if("string"!=typeof a[n])break;s+=a[n]}else{if("\n"===n)break;s+=n}}l("Bad string")},m=function(){"/"!==n&&l("Not an inline comment");do{if(c(),"\n"===n||"\r"===n)return void c()}while(n)},y=function(){"*"!==n&&l("Not a block comment");do{for(c();"*"===n;)if(c("*"),"/"===n)return void c("/")}while(n);l("Unterminated block comment")},g=function(){"/"!==n&&l("Not a comment"),c("/"),"/"===n?m():"*"===n?y():l("Unrecognized comment")},b=function(){for(;n;)if("/"===n)g();else{if(!(o.indexOf(n)>=0))return;c()}},v=function(){switch(n){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null;case"I":return c("I"),c("n"),c("f"),c("i"),c("n"),c("i"),c("t"),c("y"),1/0;case"N":return c("N"),c("a"),c("N"),NaN}l("Unexpected "+u(n))},x=function(){var e=[];if("["===n)for(c("["),b();n;){if("]"===n)return c("]"),e;if(","===n?l("Missing array element"):e.push(s()),b(),","!==n)return c("]"),e;c(","),b()}l("Bad array")},E=function(){var e,t={};if("{"===n)for(c("{"),b();n;){if("}"===n)return c("}"),t;if(e='"'===n||"'"===n?d():h(),b(),c(":"),t[e]=s(),b(),","!==n)return c("}"),t;c(","),b()}l("Bad object")};return s=function(){switch(b(),n){case"{":return E();case"[":return x();case'"':case"'":return d();case"-":case"+":case".":return f();default:return n>="0"&&n<="9"?f():v()}},function(a,o){var u;return i=String(a),e=0,t=1,r=1,n=" ",u=s(),b(),n&&l("Syntax error"),"function"==typeof o?function e(t,r){var n,i,s=t[r];if(s&&"object"==typeof s)for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(i=e(s,n),void 0!==i?s[n]=i:delete s[n]);return o.call(t,r,s)}({"":u},""):u}}(),n.stringify=function(e,t,r){function i(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"_"===e||"$"===e}function s(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||"_"===e||"$"===e}function a(e){if("string"!=typeof e)return!1;if(!s(e[0]))return!1;for(var t=1,r=e.length;t10&&(e=e.substring(0,10));for(var n=r?"":"\n",i=0;i=0?i:void 0:i};n.isWord=a;var d,m=[];r&&("string"==typeof r?d=r:"number"==typeof r&&r>=0&&(d=c(" ",r,!0)));var y=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},b={"":e};return void 0===e?f(b,"",!0):h(b,"",!0)}},{}],314:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),s=n(i,"DataView");t.exports=s},{"./_getNative":418,"./_root":462}],315:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t-1}var i=e("./_baseIndexOf");t.exports=n},{"./_baseIndexOf":357}],332:[function(e,t,r){function n(e,t,r){for(var n=-1,i=null==e?0:e.length;++n=t?e:t)),e}t.exports=n},{}],345:[function(e,t,r){function n(e,t,r,P,B,O){var j,N=t&D,I=t&C,L=t&S;if(r&&(j=B?r(e,P,B,O):r(e)),void 0!==j)return j;if(!E(e))return e;var M=v(e);if(M){if(j=y(e),!N)return c(e,j)}else{var R=m(e),U=R==w||R==k;if(x(e))return l(e,N);if(R==F||R==_||U&&!B){if(j=I||U?{}:b(e),!N)return I?h(e,u(j,e)):p(e,o(j,e))}else{if(!T[R])return B?e:{};j=g(e,R,n,N)}}O||(O=new i);var V=O.get(e);if(V)return V;O.set(e,j);var q=L?I?d:f:I?keysIn:A,G=M?void 0:q(e);return s(G||e,function(i,s){G&&(s=i,i=e[s]),a(j,s,n(i,t,r,s,e,O))}),j}var i=e("./_Stack"),s=e("./_arrayEach"),a=e("./_assignValue"),o=e("./_baseAssign"),u=e("./_baseAssignIn"),l=e("./_cloneBuffer"),c=e("./_copyArray"),p=e("./_copySymbols"),h=e("./_copySymbolsIn"),f=e("./_getAllKeys"),d=e("./_getAllKeysIn"),m=e("./_getTag"),y=e("./_initCloneArray"),g=e("./_initCloneByTag"),b=e("./_initCloneObject"),v=e("./isArray"),x=e("./isBuffer"),E=e("./isObject"),A=e("./keys"),D=1,C=2,S=4,_="[object Arguments]",w="[object Function]",k="[object GeneratorFunction]",F="[object Object]",T={};T[_]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[F]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[w]=T["[object WeakMap]"]=!1,t.exports=n},{"./_Stack":322,"./_arrayEach":329,"./_assignValue":339,"./_baseAssign":341,"./_baseAssignIn":342,"./_cloneBuffer":389,"./_copyArray":398,"./_copySymbols":400,"./_copySymbolsIn":401,"./_getAllKeys":414,"./_getAllKeysIn":415,"./_getTag":423,"./_initCloneArray":431,"./_initCloneByTag":432,"./_initCloneObject":433,"./isArray":498,"./isBuffer":501,"./isObject":505,"./keys":512}],346:[function(e,t,r){var n=e("./isObject"),i=Object.create,s=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();t.exports=s},{"./isObject":505}],347:[function(e,t,r){var n=e("./_baseForOwn"),i=e("./_createBaseEach"),s=i(n);t.exports=s},{"./_baseForOwn":351,"./_createBaseEach":404}],348:[function(e,t,r){function n(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s0&&r(c)?t>1?n(c,t-1,r,a,o):i(o,c):a||(o[o.length]=c)}return o}var i=e("./_arrayPush"),s=e("./_isFlattenable");t.exports=n},{"./_arrayPush":335,"./_isFlattenable":434}],350:[function(e,t,r){var n=e("./_createBaseFor"),i=n();t.exports=i},{"./_createBaseFor":405}],351:[function(e,t,r){function n(e,t){return e&&i(e,t,s)}var i=e("./_baseFor"),s=e("./keys");t.exports=n},{"./_baseFor":350,"./keys":512}],352:[function(e,t,r){function n(e,t){t=i(t,e);for(var r=0,n=t.length;null!=e&&ri)return r;do{t%2&&(r+=e),(t=s(t/2))&&(e+=e)}while(t);return r}var i=9007199254740991,s=Math.floor;t.exports=n},{}],378:[function(e,t,r){function n(e,t){return a(s(e,t,i),e+"")}var i=e("./identity"),s=e("./_overRest"),a=e("./_setToString");t.exports=n},{"./_overRest":461,"./_setToString":466,"./identity":495}],379:[function(e,t,r){var n=e("./constant"),i=e("./_defineProperty"),s=e("./identity"),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:s;t.exports=a},{"./_defineProperty":409,"./constant":483,"./identity":495}],380:[function(e,t,r){function n(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}t.exports=n},{}],381:[function(e,t,r){function n(e,t){for(var r=-1,n=Array(e);++r=c){var y=t?null:u(e);if(y)return l(y);f=!1,p=o,m=new i}else m=t?[]:d;e:for(;++nt||a&&o&&l&&!u&&!c||n&&o&&l||!r&&l||!s)return 1;if(!n&&!a&&!c&&e=u)return l;return l*("desc"==r[n]?-1:1)}}return e.index-t.index}var i=e("./_compareAscending");t.exports=n},{"./_compareAscending":396}],398:[function(e,t,r){function n(e,t){var r=-1,n=e.length -;for(t||(t=Array(n));++r1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&s(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n-1?o[u?t[l]:l]:void 0}}var i=e("./_baseIteratee"),s=e("./isArrayLike"),a=e("./keys");t.exports=n},{"./_baseIteratee":366,"./isArrayLike":499,"./keys":512}],407:[function(e,t,r){var n=e("./_Set"),i=e("./noop"),s=e("./_setToArray"),a=n&&1/s(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i;t.exports=a},{"./_Set":320,"./_setToArray":465,"./noop":517}],408:[function(e,t,r){function n(e,t,r,n){return void 0===e||i(e,s[r])&&!a.call(n,r)?t:e}var i=e("./eq"),s=Object.prototype,a=s.hasOwnProperty;t.exports=n},{"./eq":485}],409:[function(e,t,r){var n=e("./_getNative"),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();t.exports=i},{"./_getNative":418}],410:[function(e,t,r){function n(e,t,r,n,l,c){var p=r&o,h=e.length,f=t.length;if(h!=f&&!(p&&f>h))return!1;var d=c.get(e);if(d&&c.get(t))return d==t;var m=-1,y=!0,g=r&u?new i:void 0;for(c.set(e,t),c.set(t,e);++m-1&&e%1==0&&e-1}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":340}],446:[function(e,t,r){function n(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":340}],447:[function(e,t,r){function n(){this.size=0,this.__data__={hash:new i,map:new(a||s),string:new i}}var i=e("./_Hash"),s=e("./_ListCache"),a=e("./_Map");t.exports=n},{"./_Hash":315,"./_ListCache":316,"./_Map":317}],448:[function(e,t,r){function n(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],449:[function(e,t,r){function n(e){return i(this,e).get(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],450:[function(e,t,r){function n(e){return i(this,e).has(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],451:[function(e,t,r){function n(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i=e("./_getMapData");t.exports=n},{"./_getMapData":416}],452:[function(e,t,r){function n(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}t.exports=n},{}],453:[function(e,t,r){function n(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}t.exports=n},{}],454:[function(e,t,r){function n(e){var t=i(e,function(e){return r.size===s&&r.clear(),e}),r=t.cache;return t}var i=e("./memoize"),s=500;t.exports=n},{"./memoize":515}],455:[function(e,t,r){var n=e("./_getNative"),i=n(Object,"create");t.exports=i},{"./_getNative":418}],456:[function(e,t,r){var n=e("./_overArg"),i=n(Object.keys,Object);t.exports=i},{"./_overArg":460}],457:[function(e,t,r){function n(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}t.exports=n},{}],458:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,s=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===i,o=a&&n.process,u=function(){try{return o&&o.binding&&o.binding("util")}catch(e){}}();t.exports=u},{"./_freeGlobal":413}],459:[function(e,t,r){function n(e){return s.call(e)}var i=Object.prototype,s=i.toString;t.exports=n},{}],460:[function(e,t,r){function n(e,t){return function(r){return e(t(r))}}t.exports=n},{}],461:[function(e,t,r){function n(e,t,r){return t=s(void 0===t?e.length-1:t,0),function(){for(var n=arguments,a=-1,o=s(n.length-t,0),u=Array(o);++a0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,s=16,a=Date.now;t.exports=n},{}],468:[function(e,t,r){function n(){this.__data__=new i,this.size=0}var i=e("./_ListCache");t.exports=n},{"./_ListCache":316}],469:[function(e,t,r){function n(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}t.exports=n},{}],470:[function(e,t,r){function n(e){return this.__data__.get(e)}t.exports=n},{}],471:[function(e,t,r){function n(e){return this.__data__.has(e)}t.exports=n},{}],472:[function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!s||n.length-1:!!c&&i(e,t,r)>-1}var i=e("./_baseIndexOf"),s=e("./isArrayLike"),a=e("./isString"),o=e("./toInteger"),u=e("./values"),l=Math.max;t.exports=n},{"./_baseIndexOf":357,"./isArrayLike":499,"./isString":509,"./toInteger":525,"./values":530}],497:[function(e,t,r){var n=e("./_baseIsArguments"),i=e("./isObjectLike"),s=Object.prototype,a=s.hasOwnProperty,o=s.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!o.call(e,"callee")};t.exports=u},{"./_baseIsArguments":358,"./isObjectLike":506}],498:[function(e,t,r){var n=Array.isArray;t.exports=n},{}],499:[function(e,t,r){function n(e){return null!=e&&s(e.length)&&!i(e)}var i=e("./isFunction"),s=e("./isLength");t.exports=n},{"./isFunction":502,"./isLength":504}],500:[function(e,t,r){function n(e){return s(e)&&i(e)}var i=e("./isArrayLike"),s=e("./isObjectLike");t.exports=n},{"./isArrayLike":499,"./isObjectLike":506}],501:[function(e,t,r){var n=e("./_root"),i=e("./stubFalse"),s="object"==typeof r&&r&&!r.nodeType&&r,a=s&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===s,u=o?n.Buffer:void 0,l=u?u.isBuffer:void 0,c=l||i;t.exports=c},{"./_root":462,"./stubFalse":523}],502:[function(e,t,r){function n(e){if(!s(e))return!1;var t=i(e);return t==o||t==u||t==a||t==l}var i=e("./_baseGetTag"),s=e("./isObject"),a="[object AsyncFunction]",o="[object Function]",u="[object GeneratorFunction]",l="[object Proxy]";t.exports=n},{"./_baseGetTag":354,"./isObject":505}],503:[function(e,t,r){function n(e){return"number"==typeof e&&e==i(e)}var i=e("./toInteger");t.exports=n},{"./toInteger":525}],504:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}var i=9007199254740991;t.exports=n},{}],505:[function(e,t,r){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=n},{}],506:[function(e,t,r){function n(e){return null!=e&&"object"==typeof e}t.exports=n},{}],507:[function(e,t,r){function n(e){if(!a(e)||i(e)!=o)return!1;var t=s(e);if(null===t)return!0;var r=p.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==h}var i=e("./_baseGetTag"),s=e("./_getPrototype"),a=e("./isObjectLike"),o="[object Object]",u=Function.prototype,l=Object.prototype,c=u.toString,p=l.hasOwnProperty,h=c.call(Object);t.exports=n},{"./_baseGetTag":354,"./_getPrototype":419,"./isObjectLike":506}],508:[function(e,t,r){var n=e("./_baseIsRegExp"),i=e("./_baseUnary"),s=e("./_nodeUtil"),a=s&&s.isRegExp,o=a?i(a):n;t.exports=o},{"./_baseIsRegExp":364,"./_baseUnary":383,"./_nodeUtil":458}],509:[function(e,t,r){function n(e){return"string"==typeof e||!s(e)&&a(e)&&i(e)==o}var i=e("./_baseGetTag"),s=e("./isArray"),a=e("./isObjectLike"),o="[object String]";t.exports=n},{"./_baseGetTag":354,"./isArray":498,"./isObjectLike":506}],510:[function(e,t,r){function n(e){return"symbol"==typeof e||s(e)&&i(e)==a}var i=e("./_baseGetTag"),s=e("./isObjectLike"),a="[object Symbol]";t.exports=n},{"./_baseGetTag":354,"./isObjectLike":506}],511:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),s=e("./_nodeUtil"),a=s&&s.isTypedArray,o=a?i(a):n;t.exports=o},{"./_baseIsTypedArray":365,"./_baseUnary":383,"./_nodeUtil":458}],512:[function(e,t,r){function n(e){return a(e)?i(e):s(e)}var i=e("./_arrayLikeKeys"),s=e("./_baseKeys"),a=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":333,"./_baseKeys":367,"./isArrayLike":499}],513:[function(e,t,r){function n(e){return a(e)?i(e,!0):s(e)}var i=e("./_arrayLikeKeys"),s=e("./_baseKeysIn"),a=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":333,"./_baseKeysIn":368,"./isArrayLike":499}],514:[function(e,t,r){function n(e,t){return(o(e)?i:a)(e,s(t,3))}var i=e("./_arrayMap"),s=e("./_baseIteratee"),a=e("./_baseMap"),o=e("./isArray");t.exports=n},{"./_arrayMap":334,"./_baseIteratee":366,"./_baseMap":369,"./isArray":498}],515:[function(e,t,r){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(s);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(n.Cache||i),r}var i=e("./_MapCache"),s="Expected a function";n.Cache=i,t.exports=n},{"./_MapCache":318}],516:[function(e,t,r){var n=e("./_baseMerge"),i=e("./_createAssigner"),s=i(function(e,t,r,i){n(e,t,r,i)});t.exports=s},{"./_baseMerge":372,"./_createAssigner":403}],517:[function(e,t,r){function n(){}t.exports=n},{}],518:[function(e,t,r){function n(e){return a(e)?i(o(e)):s(e)}var i=e("./_baseProperty"),s=e("./_basePropertyDeep"),a=e("./_isKey"),o=e("./_toKey");t.exports=n},{"./_baseProperty":375,"./_basePropertyDeep":376,"./_isKey":437,"./_toKey":475}],519:[function(e,t,r){function n(e,t,r){return t=(r?s(e,t,r):void 0===t)?1:a(t),i(o(e),t)}var i=e("./_baseRepeat"),s=e("./_isIterateeCall"),a=e("./toInteger"),o=e("./toString");t.exports=n},{"./_baseRepeat":377,"./_isIterateeCall":436,"./toInteger":525,"./toString":528}],520:[function(e,t,r){var n=e("./_baseFlatten"),i=e("./_baseOrderBy"),s=e("./_baseRest"),a=e("./_isIterateeCall"),o=s(function(e,t){if(null==e)return[];var r=t.length;return r>1&&a(e,t[0],t[1])?t=[]:r>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),i(e,n(t,1),[])});t.exports=o},{"./_baseFlatten":349,"./_baseOrderBy":374,"./_baseRest":378,"./_isIterateeCall":436}],521:[function(e,t,r){function n(e,t,r){return e=o(e),r=null==r?0:i(a(r),0,e.length),t=s(t),e.slice(r,r+t.length)==t}var i=e("./_baseClamp"),s=e("./_baseToString"),a=e("./toInteger"),o=e("./toString");t.exports=n},{"./_baseClamp":344,"./_baseToString":382,"./toInteger":525,"./toString":528}],522:[function(e,t,r){function n(){return[]}t.exports=n},{}],523:[function(e,t,r){function n(){return!1}t.exports=n},{}],524:[function(e,t,r){function n(e){if(!e)return 0===e?e:0;if((e=i(e))===s||e===-s){return(e<0?-1:1)*a}return e===e?e:0}var i=e("./toNumber"),s=1/0,a=1.7976931348623157e308;t.exports=n},{"./toNumber":526}],525:[function(e,t,r){function n(e){var t=i(e),r=t%1;return t===t?r?t-r:t:0}var i=e("./toFinite");t.exports=n},{"./toFinite":524}],526:[function(e,t,r){function n(e){if("number"==typeof e)return e;if(s(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var r=l.test(e);return r||c.test(e)?p(e.slice(2),r?2:8):u.test(e)?a:+e}var i=e("./isObject"),s=e("./isSymbol"),a=NaN,o=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,p=parseInt;t.exports=n},{"./isObject":505,"./isSymbol":510}],527:[function(e,t,r){function n(e){return i(e,s(e))}var i=e("./_copyObject"),s=e("./keysIn");t.exports=n},{"./_copyObject":399,"./keysIn":513}],528:[function(e,t,r){function n(e){return null==e?"":i(e)}var i=e("./_baseToString");t.exports=n},{"./_baseToString":382}],529:[function(e,t,r){function n(e){return e&&e.length?i(e):[]}var i=e("./_baseUniq");t.exports=n},{"./_baseUniq":384}],530:[function(e,t,r){function n(e){return null==e?[]:i(e,s(e))}var i=e("./_baseValues"),s=e("./keys");t.exports=n},{"./_baseValues":385,"./keys":512}],531:[function(e,t,r){function n(e,t){return t=t||{},function(r,n,i){return s(r,e,t)}}function i(e,t){e=e||{},t=t||{};var r={};return Object.keys(t).forEach(function(e){r[e]=t[e]}),Object.keys(e).forEach(function(t){r[t]=e[t]}),r}function s(e,t,r){if("string"!=typeof t)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===t.charAt(0))&&(""===t.trim()?""===e:new a(t,r).match(e))}function a(e,t){if(!(this instanceof a))return new a(e,t);if("string"!=typeof e)throw new TypeError("glob pattern string required");t||(t={}),e=e.trim(),"/"!==m.sep&&(e=e.split(m.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function o(){if(!this._made){var e=this.pattern,t=this.options;if(!t.nocomment&&"#"===e.charAt(0))return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();t.debug&&(this.debug=console.error),this.debug(this.pattern,r),r=this.globParts=r.map(function(e){return e.split(C)}),this.debug(this.pattern,r),r=r.map(function(e,t,r){return e.map(this.parse,this)},this),this.debug(this.pattern,r),r=r.filter(function(e){return-1===e.indexOf(!1)}),this.debug(this.pattern,r),this.set=r}}function u(){var e=this.pattern,t=!1,r=this.options,n=0;if(!r.nonegate){for(var i=0,s=e.length;i65536)throw new TypeError("pattern is too long");var n=this.options;if(!n.noglobstar&&"**"===e)return y;if(""===e)return"";for(var i,s,a="",o=!!n.nocase,u=!1,l=[],c=[],p=!1,h=-1,d=-1,m="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",g=this,E=0,A=e.length;E-1;P--){ -var B=c[P],O=a.slice(0,B.reStart),j=a.slice(B.reStart,B.reEnd-8),N=a.slice(B.reEnd-8,B.reEnd),I=a.slice(B.reEnd);N+=I;var L=O.split("(").length-1,M=I;for(E=0;E=0&&!(i=e[s]);s--);for(s=0;s>> no match, partial?",e,c,t,p),c!==a))}var f;if("string"==typeof u?(f=n.nocase?l.toLowerCase()===u.toLowerCase():l===u,this.debug("string match",u,l,f)):(f=l.match(u),this.debug("pattern match",u,l,f)),!f)return!1}if(i===a&&s===o)return!0;if(i===a)return r;if(s===o){return i===a-1&&""===e[i]}throw new Error("wtf?")}},{"brace-expansion":180,path:535}],532:[function(e,t,r){function n(e){if(e=String(e),!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*p;case"days":case"day":case"d":return r*c;case"hours":case"hour":case"hrs":case"hr":case"h":return r*l;case"minutes":case"minute":case"mins":case"min":case"m":return r*u;case"seconds":case"second":case"secs":case"sec":case"s":return r*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function i(e){return e>=c?Math.round(e/c)+"d":e>=l?Math.round(e/l)+"h":e>=u?Math.round(e/u)+"m":e>=o?Math.round(e/o)+"s":e+"ms"}function s(e){return a(e,c,"day")||a(e,l,"hour")||a(e,u,"minute")||a(e,o,"second")||e+" ms"}function a(e,t,r){if(!(e0)return n(e);if("number"===r&&!1===isNaN(e))return t.long?s(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],533:[function(e,t,r){"use strict";t.exports=Number.isNaN||function(e){return e!==e}},{}],534:[function(e,t,r){r.endianness=function(){return"LE"},r.hostname=function(){return"undefined"!=typeof location?location.hostname:""},r.loadavg=function(){return[]},r.uptime=function(){return 0},r.freemem=function(){return Number.MAX_VALUE},r.totalmem=function(){return Number.MAX_VALUE},r.cpus=function(){return[]},r.type=function(){return"Browser"},r.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},r.networkInterfaces=r.getNetworkInterfaces=function(){return{}},r.arch=function(){return"javascript"},r.platform=function(){return"browser"},r.tmpdir=r.tmpDir=function(){return"/tmp"},r.EOL="\n"},{}],535:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!i;s--){var a=s>=0?arguments[s]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(r=a+"/"+r,i="/"===a.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(e){var i=r.isAbsolute(e),s="/"===a(e,-1);return e=t(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&s&&(e+="/"),(i?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),s=n(t.split("/")),a=Math.min(i.length,s.length),o=a,u=0;un&&(t[n]=t[r]),++n);return t.length=n,t},r.makeAccessor=l},{}],538:[function(e,t,r){(function(e){"use strict";function r(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var s,a,o=arguments.length;switch(o){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(s=new Array(o-1),a=0;a1)for(var r=1;r0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var l;!t.decoder||i||n||(r=t.decoder.write(r),l=!t.objectMode&&0===r.length),i||(t.reading=!1),l||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&h(e))),d(e,t)}else i||(t.reading=!1);return o(t)}function o(e){return!e.ended&&(e.needReadable||e.length=V?e=V:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function l(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function c(e,t){var r=null;return j.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function p(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,h(e)}}function h(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(M("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?T(f,e):f(e))}function f(e){M("emit readable"),e.emit("readable"),x(e)}function d(e,t){t.readingMore||(t.readingMore=!0,T(m,e,t))}function m(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=A(e,t.buffer,t.decoder),r}function A(e,t,r){var n;return es.length?s.length:e;if(a===s.length?i+=s:i+=s.slice(0,e),0===(e-=a)){a===s.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=s.slice(a));break}++n}return t.length-=n,i}function C(e,t){var r=N.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var s=n.data,a=e>s.length?s.length:e;if(s.copy(r,r.length-e,0,a),0===(e-=a)){a===s.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=s.slice(a));break}++i}return t.length-=i,r}function S(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,T(_,t,e))}function _(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function w(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return M("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?S(this):h(this),null;if(0===(e=l(e,t))&&t.ended)return 0===t.length&&S(this),null;var n=t.needReadable;M("need readable",n),(0===t.length||t.length-e0?E(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&S(this)),null!==i&&this.emit("data",i),i},s.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},s.prototype.pipe=function(e,t){function i(e){M("onunpipe"),e===h&&a()}function s(){M("onend"),e.end()}function a(){M("cleanup"),e.removeListener("close",l),e.removeListener("finish",c),e.removeListener("drain",g),e.removeListener("error",u),e.removeListener("unpipe",i),h.removeListener("end",s),h.removeListener("end",a),h.removeListener("data",o),b=!0,!f.awaitDrain||e._writableState&&!e._writableState.needDrain||g()}function o(t){M("ondata"),v=!1,!1!==e.write(t)||v||((1===f.pipesCount&&f.pipes===e||f.pipesCount>1&&-1!==k(f.pipes,e))&&!b&&(M("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,v=!0),h.pause())}function u(t){M("onerror",t),p(),e.removeListener("error",u),0===O(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",c),p()}function c(){M("onfinish"),e.removeListener("close",l),p()}function p(){M("unpipe"),h.unpipe(e)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=e;break;case 1:f.pipes=[f.pipes,e];break;default:f.pipes.push(e)}f.pipesCount+=1,M("pipe count=%d opts=%j",f.pipesCount,t);var d=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr,m=d?s:a;f.endEmitted?T(m):h.once("end",m),e.on("unpipe",i);var g=y(h);e.on("drain",g);var b=!1,v=!1;return h.on("data",o),n(e,"error",u),e.once("close",l),e.once("finish",c),e.emit("pipe",h),f.flowing||(M("pipe resume"),h.resume()),e},s.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1?setImmediate:C;a.WritableState=s;var _=e("core-util-is");_.inherits=e("inherits");var w,k={deprecate:e("util-deprecate")};!function(){try{w=e("stream")}catch(e){}finally{w||(w=e("events").EventEmitter)}}();var F=e("buffer").Buffer,T=e("buffer-shims");_.inherits(a,w),s.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(s.prototype,"buffer",{get:k.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var P;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(a,Symbol.hasInstance,{value:function(e){return!!P.call(this,e)||e&&e._writableState instanceof s}})):P=function(e){return e instanceof this},a.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},a.prototype.write=function(e,t,r){var i=this._writableState,s=!1,a=F.isBuffer(e);return"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=n),i.ended?o(this,r):(a||u(this,i,e,r))&&(i.pendingcb++,s=c(this,i,a,e,t,r)),s},a.prototype.cork=function(){this._writableState.corked++},a.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||g(this,e))},a.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},a.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},a.prototype._writev=null,a.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||E(this,n,r)}}).call(this,e("_process"))},{"./_stream_duplex":541,_process:539,buffer:184,"buffer-shims":183,"core-util-is":294,events:301,inherits:306,"process-nextick-args":538,"util-deprecate":598}],546:[function(e,t,r){"use strict";function n(){this.head=null,this.tail=null,this.length=0}var i=(e("buffer").Buffer,e("buffer-shims"));t.exports=n,n.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},n.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},n.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},n.prototype.concat=function(e){if(0===this.length)return i.alloc(0) -;if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t}},{buffer:184,"buffer-shims":183}],547:[function(e,t,r){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":542}],548:[function(e,t,r){(function(n){var i=function(){try{return e("stream")}catch(e){}}();r=t.exports=e("./lib/_stream_readable.js"),r.Stream=i||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),!n.browser&&"disable"===n.env.READABLE_STREAM&&i&&(t.exports=i)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":541,"./lib/_stream_passthrough.js":542,"./lib/_stream_readable.js":543,"./lib/_stream_transform.js":544,"./lib/_stream_writable.js":545,_process:539}],549:[function(e,t,r){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":544}],550:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":545}],551:[function(e,t,r){function n(e,t,r){if(e){if(x.fixFaultyLocations(e,t),r){if(d.Node.check(e)&&d.SourceLocation.check(e.loc)){for(var i=r.length-1;i>=0&&!(E(r[i].loc.end,e.loc.start)<=0);--i);return void r.splice(i+1,0,e)}}else if(e[A])return e[A];var s;if(m.check(e))s=Object.keys(e);else{if(!y.check(e))return;s=f.getFieldNames(e)}r||Object.defineProperty(e,A,{value:r=[],enumerable:!1});for(var i=0,a=s.length;i>1,l=s[u];if(E(l.loc.start,t.loc.start)<=0&&E(t.loc.end,l.loc.end)<=0)return void i(t.enclosingNode=l,t,r);if(E(l.loc.end,t.loc.start)<=0){var c=l;a=u+1}else{if(!(E(t.loc.end,l.loc.start)<=0))throw new Error("Comment location overlaps with node location");var p=l;o=u}}c&&(t.precedingNode=c),p&&(t.followingNode=p)}function s(e,t){var r=e.length;if(0!==r){for(var n=e[0].precedingNode,i=e[0].followingNode,s=i.loc.start,a=r;a>0;--a){var u=e[a-1];h.strictEqual(u.precedingNode,n),h.strictEqual(u.followingNode,i);var c=t.sliceString(u.loc.end,s);if(/\S/.test(c))break;s=u.loc.start}for(;a<=r&&(u=e[a])&&("Line"===u.type||"CommentLine"===u.type)&&u.loc.start.column>i.loc.start.column;)++a;e.forEach(function(e,t){t0){var d=n[f-1];h.strictEqual(d.precedingNode===e.precedingNode,d.followingNode===e.followingNode),d.followingNode!==e.followingNode&&s(n,r)}n.push(e)}else if(a)s(n,r),l(a,e);else if(p)s(n,r),o(p,e);else{if(!c)throw new Error("AST contains no nodes at all?");s(n,r),u(c,e)}}),s(n,r),e.forEach(function(e){delete e.precedingNode,delete e.enclosingNode,delete e.followingNode})}},r.printComments=function(e,t){var r=e.getValue(),n=t(e),i=d.Node.check(r)&&f.getFieldValue(r,"comments");if(!i||0===i.length)return n;var s=[],a=[n];return e.each(function(e){var n=e.getValue(),i=f.getFieldValue(n,"leading"),o=f.getFieldValue(n,"trailing");i||o&&!d.Statement.check(r)&&"Block"!==n.type&&"CommentBlock"!==n.type?s.push(c(e,t)):o&&a.push(p(e,t))},"comments"),s.push.apply(s,a),v(s)}},{"./lines":553,"./types":559,"./util":560,assert:3,private:537}],552:[function(e,t,r){function n(e){o.ok(this instanceof n),this.stack=[e]}function i(e,t){for(var r=e.stack,n=r.length-1;n>=0;n-=2){var i=r[n];if(l.Node.check(i)&&--t<0)return i}return null}function s(e){return l.BinaryExpression.check(e)||l.LogicalExpression.check(e)}function a(e){return!!l.CallExpression.check(e)||(c.check(e)?e.some(a):!!l.Node.check(e)&&u.someField(e,function(e,t){return a(t)}))}var o=e("assert"),u=e("./types"),l=u.namedTypes,c=(l.Node,u.builtInTypes.array),p=u.builtInTypes.number,h=n.prototype;t.exports=n,n.from=function(e){if(e instanceof n)return e.copy();if(e instanceof u.NodePath){for(var t,r=Object.create(n.prototype),i=[e.value];t=e.parentPath;e=t)i.push(e.name,t.value);return r.stack=i.reverse(),r}return new n(e)},h.copy=function(){var e=Object.create(n.prototype);return e.stack=this.stack.slice(0),e},h.getName=function(){var e=this.stack,t=e.length;return t>1?e[t-2]:null},h.getValue=function(){var e=this.stack;return e[e.length-1]},h.getNode=function(e){return i(this,~~e)},h.getParentNode=function(e){return i(this,1+~~e)},h.getRootValue=function(){var e=this.stack;return e.length%2==0?e[1]:e[0]},h.call=function(e){for(var t=this.stack,r=t.length,n=t[r-1],i=arguments.length,s=1;sh)return!0;if(u===h&&"right"===r)return o.strictEqual(t.right,n),!0;default:return!1}case"SequenceExpression":switch(t.type){case"ReturnStatement":case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==r;default:return!0}case"YieldExpression":switch(t.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"NullableTypeAnnotation"===t.type;case"Literal":return"MemberExpression"===t.type&&p.check(n.value)&&"object"===r&&t.object===n;case"AssignmentExpression":case"ConditionalExpression":switch(t.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===r&&t.callee===n;case"ConditionalExpression":return"test"===r&&t.test===n;case"MemberExpression":return"object"===r&&t.object===n;default:return!1}case"ArrowFunctionExpression":return!(!l.CallExpression.check(t)||"callee"!==r)||(!(!l.MemberExpression.check(t)||"object"!==r)||s(t));case"ObjectExpression":if("ArrowFunctionExpression"===t.type&&"body"===r)return!0;default:if("NewExpression"===t.type&&"callee"===r&&t.callee===n)return a(n)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var f={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%","**"]].forEach(function(e,t){e.forEach(function(e){f[e]=t})}),h.canBeFirstInStatement=function(){var e=this.getNode();return!l.FunctionExpression.check(e)&&!l.ObjectExpression.check(e)},h.firstInStatement=function(){for(var e,t,r,n,i=this.stack,a=i.length-1;a>=0;a-=2)if(l.Node.check(i[a])&&(r=e,n=t,e=i[a-1],t=i[a]),t&&n){if(l.BlockStatement.check(t)&&"body"===e&&0===r)return o.strictEqual(t.body[0],n),!0;if(l.ExpressionStatement.check(t)&&"expression"===r)return o.strictEqual(t.expression,n),!0;if(l.SequenceExpression.check(t)&&"expressions"===e&&0===r)o.strictEqual(t.expressions[0],n);else if(l.CallExpression.check(t)&&"callee"===r)o.strictEqual(t.callee,n);else if(l.MemberExpression.check(t)&&"object"===r)o.strictEqual(t.object,n);else if(l.ConditionalExpression.check(t)&&"test"===r)o.strictEqual(t.test,n);else if(s(t)&&"left"===r)o.strictEqual(t.left,n);else{if(!l.UnaryExpression.check(t)||t.prefix||"argument"!==r)return!1;o.strictEqual(t.argument,n)}}return!0}},{"./types":559,assert:3}],553:[function(e,t,r){function n(e){return e[f]}function i(e,t){c.ok(this instanceof i),c.ok(e.length>0),t?m.assert(t):t=null,Object.defineProperty(this,f,{value:{infos:e,mappings:[],name:t,cachedSourceMap:null}}),t&&n(this).mappings.push(new g(this,{start:this.firstPos(),end:this.lastPos()}))}function s(e){return{line:e.line,indent:e.indent,locked:e.locked,sliceStart:e.sliceStart,sliceEnd:e.sliceEnd}}function a(e,t){for(var r=0,n=e.length,i=0;i0);var s=Math.ceil(r/t)*t;s===r?r+=t:r=s;break;case 11:case 12:case 13:case 65279:break;case 32:default:r+=1}return r}function o(e,t){if(e instanceof i)return e;e+="";var r=t&&t.tabWidth,n=e.indexOf("\t")<0,s=!(!t||!t.locked),o=!t&&n&&e.length<=E;if(c.ok(r||n,"No tab width specified but encountered tabs in string\n"+e),o&&x.call(v,e))return v[e];var u=new i(e.split(D).map(function(e){var t=A.exec(e)[0];return{line:e,indent:a(t,r),locked:s,sliceStart:t.length,sliceEnd:e.length}}),h(t).sourceFileName);return o&&(v[e]=u),u}function u(e){return!/\S/.test(e)}function l(e,t,r){var n=e.sliceStart,i=e.sliceEnd,s=Math.max(e.indent,0),a=s+i-n;return void 0===r&&(r=a),t=Math.max(t,0),r=Math.min(r,a),r=Math.max(r,t),r=0),c.ok(n<=i),c.strictEqual(a,s+i-n),e.indent===s&&e.sliceStart===n&&e.sliceEnd===i?e:{line:e.line,indent:s,locked:!1,sliceStart:n,sliceEnd:i}}var c=e("assert"),p=e("source-map"),h=e("./options").normalize,f=e("private").makeUniqueKey(),d=e("./types"),m=d.builtInTypes.string,y=e("./util").comparePos,g=e("./mapping");r.Lines=i;var b=i.prototype;Object.defineProperties(b,{length:{get:function(){return n(this).infos.length}},name:{get:function(){return n(this).name}}});var v={},x=v.hasOwnProperty,E=10;r.countSpaces=a;var A=/^\s*/,D=/\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;r.fromString=o,b.toString=function(e){return this.sliceString(this.firstPos(),this.lastPos(),e)},b.getSourceMap=function(e,t){function r(r){return r=r||{},m.assert(e),r.file=e,t&&(m.assert(t),r.sourceRoot=t),r}if(!e)return null;var i=this,s=n(i);if(s.cachedSourceMap)return r(s.cachedSourceMap.toJSON());var a=new p.SourceMapGenerator(r()),o={};return s.mappings.forEach(function(e){for(var t=e.sourceLines.skipSpaces(e.sourceLoc.start)||e.sourceLines.lastPos(),r=i.skipSpaces(e.targetLoc.start)||i.lastPos();y(t,e.sourceLoc.end)<0&&y(r,e.targetLoc.end)<0;){var n=e.sourceLines.charAt(t),s=i.charAt(r);c.strictEqual(n,s);var u=e.sourceLines.name;if(a.addMapping({source:u,original:{line:t.line,column:t.column},generated:{line:r.line,column:r.column}}),!x.call(o,u)){var l=e.sourceLines.toString();a.setSourceContent(u,l),o[u]=l}i.nextPos(r,!0),e.sourceLines.nextPos(t,!0)}}),s.cachedSourceMap=a,a.toJSON()},b.bootstrapCharAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,n=this.toString().split(D),i=n[t-1];return void 0===i?"":r===i.length&&t=i.length?"":i.charAt(r)},b.charAt=function(e){c.strictEqual(typeof e,"object"),c.strictEqual(typeof e.line,"number"),c.strictEqual(typeof e.column,"number");var t=e.line,r=e.column,i=n(this),s=i.infos,a=s[t-1],o=r;if(void 0===a||o<0)return"";var u=this.getIndentAt(t);return o=a.sliceEnd?"":a.line.charAt(o))},b.stripMargin=function(e,t){if(0===e)return this;if(c.ok(e>0,"negative margin: "+e),t&&1===this.length)return this;var r=n(this),a=new i(r.infos.map(function(r,n){return r.line&&(n>0||!t)&&(r=s(r),r.indent=Math.max(0,r.indent-e)),r}));if(r.mappings.length>0){var o=n(a).mappings;c.strictEqual(o.length,0),r.mappings.forEach(function(r){o.push(r.indent(e,t,!0))})}return a},b.indent=function(e){if(0===e)return this;var t=n(this),r=new i(t.infos.map(function(t){return t.line&&!t.locked&&(t=s(t),t.indent+=e),t}));if(t.mappings.length>0){var a=n(r).mappings;c.strictEqual(a.length,0),t.mappings.forEach(function(t){a.push(t.indent(e))})}return r},b.indentTail=function(e){if(0===e)return this;if(this.length<2)return this;var t=n(this),r=new i(t.infos.map(function(t,r){return r>0&&t.line&&!t.locked&&(t=s(t),t.indent+=e),t}));if(t.mappings.length>0){var a=n(r).mappings;c.strictEqual(a.length,0),t.mappings.forEach(function(t){a.push(t.indent(e,!0))})}return r},b.lockIndentTail=function(){return this.length<2?this:new i(n(this).infos.map(function(e,t){return e=s(e),e.locked=t>0,e}))},b.getIndentAt=function(e){c.ok(e>=1,"no line "+e+" (line numbers start from 1)");var t=n(this),r=t.infos[e-1];return Math.max(r.indent,0)},b.guessTabWidth=function(){var e=n(this);if(x.call(e,"cachedTabWidth"))return e.cachedTabWidth;for(var t=[],r=0,i=1,s=this.length;i<=s;++i){var a=e.infos[i-1];if(!u(a.line.slice(a.sliceStart,a.sliceEnd))){var o=Math.abs(a.indent-r);t[o]=1+~~t[o],r=a.indent}}for(var l=-1,c=2,p=1;pl&&(l=t[p],c=p);return e.cachedTabWidth=c},b.startsWithComment=function(){var e=n(this);if(0===e.infos.length)return!1;var t=e.infos[0],r=t.sliceStart,i=t.sliceEnd,s=t.line.slice(r,i).trim();return 0===s.length||"//"===s.slice(0,2)||"/*"===s.slice(0,2)},b.isOnlyWhitespace=function(){return u(this.toString())},b.isPrecededOnlyByWhitespace=function(e){var t=n(this),r=t.infos[e.line-1],i=Math.max(r.indent,0),s=e.column-i;if(s<=0)return!0;var a=r.sliceStart,o=Math.min(a+s,r.sliceEnd);return u(r.line.slice(a,o))},b.getLineLength=function(e){var t=n(this),r=t.infos[e-1];return this.getIndentAt(e)+r.sliceEnd-r.sliceStart},b.nextPos=function(e,t){var r=Math.max(e.line,0);return Math.max(e.column,0)0){var o=n(a).mappings;c.strictEqual(o.length,0),r.mappings.forEach(function(r){var n=r.slice(this,e,t);n&&o.push(n)},this)}return a},b.bootstrapSliceString=function(e,t,r){return this.slice(e,t).toString(r)},b.sliceString=function(e,t,r){if(!t){if(!e)return this;t=this.lastPos()}r=h(r);for(var i=n(this).infos,s=[],o=r.tabWidth,c=e.line;c<=t.line;++c){var p=i[c-1];c===e.line?p=c===t.line?l(p,e.column,t.column):l(p,e.column):c===t.line&&(p=l(p,0,t.column));var f=Math.max(p.indent,0),d=p.line.slice(0,p.sliceStart);if(r.reuseWhitespace&&u(d)&&a(d,r.tabWidth)===f)s.push(p.line.slice(0,p.sliceEnd));else{var m=0,y=f;r.useTabs&&(m=Math.floor(f/o),y-=m*o);var g="";m>0&&(g+=new Array(m+1).join("\t")),y>0&&(g+=new Array(y+1).join(" ")),g+=p.line.slice(p.sliceStart,p.sliceEnd),s.push(g)}}return s.join(r.lineTerminator)},b.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1},b.join=function(e){function t(e){if(null!==e){if(a){var t=e.infos[0],r=new Array(t.indent+1).join(" "),n=c.length,i=Math.max(a.indent,0)+a.sliceEnd-a.sliceStart;a.line=a.line.slice(0,a.sliceEnd)+r+t.line.slice(t.sliceStart,t.sliceEnd),a.locked=a.locked||t.locked,a.sliceEnd=a.line.length,e.mappings.length>0&&e.mappings.forEach(function(e){p.push(e.add(n,i))})}else e.mappings.length>0&&p.push.apply(p,e.mappings);e.infos.forEach(function(e,t){(!a||t>0)&&(a=s(e),c.push(a))})}}function r(e,r){r>0&&t(l),t(e)}var a,u=this,l=n(u),c=[],p=[];if(e.map(function(e){var t=o(e);return t.isEmpty()?null:n(t)}).forEach(u.isEmpty()?t:r),c.length<1)return C;var h=new i(c);return n(h).mappings=p,h},r.concat=function(e){return C.join(e)},b.concat=function(e){var t=arguments,r=[this];return r.push.apply(r,t),c.strictEqual(r.length,t.length+1),C.join(r)};var C=o("")},{"./mapping":554,"./options":555,"./types":559,"./util":560,assert:3,private:537,"source-map":573}],554:[function(e,t,r){function n(e,t,r){o.ok(this instanceof n),o.ok(e instanceof h.Lines),c.assert(t),r?o.ok(l.check(r.start.line)&&l.check(r.start.column)&&l.check(r.end.line)&&l.check(r.end.column)):r=t,Object.defineProperties(this,{sourceLines:{value:e},sourceLoc:{value:t},targetLoc:{value:r}})}function i(e,t,r){return{line:e.line+t-1,column:1===e.line?e.column+r:e.column}}function s(e,t,r){return{line:e.line-t+1,column:e.line===t?e.column-r:e.column}}function a(e,t,r,n,i){o.ok(e instanceof h.Lines),o.ok(r instanceof h.Lines),p.assert(t),p.assert(n),p.assert(i);var s=f(n,i);if(0===s)return t;if(s<0){var a=e.skipSpaces(t),u=r.skipSpaces(n),l=i.line-u.line;for(a.line+=l,u.line+=l,l>0?(a.column=0,u.column=0):o.strictEqual(l,0);f(u,i)<0&&r.nextPos(u,!0);)o.ok(e.nextPos(a,!0)),o.strictEqual(e.charAt(a),r.charAt(u))}else{var a=e.skipSpaces(t,!0),u=r.skipSpaces(n,!0),l=i.line-u.line;for(a.line+=l,u.line+=l,l<0?(a.column=e.getLineLength(a.line),u.column=r.getLineLength(u.line)):o.strictEqual(l,0);f(i,u)<0&&r.prevPos(u,!0);)o.ok(e.prevPos(a,!0)),o.strictEqual(e.charAt(a),r.charAt(u))}return a}var o=e("assert"),u=e("./types"),l=(u.builtInTypes.string,u.builtInTypes.number),c=u.namedTypes.SourceLocation,p=u.namedTypes.Position,h=e("./lines"),f=e("./util").comparePos,d=n.prototype;t.exports=n,d.slice=function(e,t,r){function i(n){var i=l[n],s=c[n],p=t;return"end"===n?p=r:o.strictEqual(n,"start"),a(u,i,e,s,p)}o.ok(e instanceof h.Lines),p.assert(t),r?p.assert(r):r=e.lastPos();var u=this.sourceLines,l=this.sourceLoc,c=this.targetLoc;if(f(t,c.start)<=0)if(f(c.end,r)<=0)c={start:s(c.start,t.line,t.column),end:s(c.end,t.line,t.column)};else{if(f(r,c.start)<=0)return null;l={start:l.start,end:i("end")},c={start:s(c.start,t.line,t.column),end:s(r,t.line,t.column)}}else{if(f(c.end,t)<=0)return null;f(c.end,r)<=0?(l={start:i("start"),end:l.end},c={start:{line:1,column:0},end:s(c.end,t.line,t.column)}):(l={start:i("start"),end:i("end")},c={start:{line:1,column:0},end:s(r,t.line,t.column)})}return new n(this.sourceLines,l,c)},d.add=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:i(this.targetLoc.start,e,t),end:i(this.targetLoc.end,e,t)})},d.subtract=function(e,t){return new n(this.sourceLines,this.sourceLoc,{start:s(this.targetLoc.start,e,t),end:s(this.targetLoc.end,e,t)})},d.indent=function(e,t,r){if(0===e)return this;var i=this.targetLoc,s=i.start.line,a=i.end.line;if(t&&1===s&&1===a)return this;if(i={start:i.start,end:i.end},!t||s>1){var o=i.start.column+e;i.start={line:s,column:r?Math.max(0,o):o}}if(!t||a>1){var u=i.end.column+e;i.end={line:a,column:r?Math.max(0,u):u}}return new n(this.sourceLines,this.sourceLoc,i)}},{"./lines":553,"./types":559,"./util":560,assert:3}],555:[function(e,t,r){var n={parser:e("esprima"),tabWidth:4,useTabs:!1,reuseWhitespace:!0,lineTerminator:e("os").EOL,wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:!1,tolerant:!0,quote:null,trailingComma:!1,arrayBracketSpacing:!1,objectCurlySpacing:!0,arrowParensAlways:!1,flowObjectCommas:!0},i=n.hasOwnProperty;r.normalize=function(e){function t(t){return i.call(e,t)?e[t]:n[t]}return e=e||n,{tabWidth:+t("tabWidth"),useTabs:!!t("useTabs"),reuseWhitespace:!!t("reuseWhitespace"),lineTerminator:t("lineTerminator"),wrapColumn:Math.max(t("wrapColumn"),0),sourceFileName:t("sourceFileName"),sourceMapName:t("sourceMapName"),sourceRoot:t("sourceRoot"),inputSourceMap:t("inputSourceMap"),parser:t("esprima")||t("parser"),range:t("range"),tolerant:t("tolerant"),quote:t("quote"),trailingComma:t("trailingComma"),arrayBracketSpacing:t("arrayBracketSpacing"),objectCurlySpacing:t("objectCurlySpacing"),arrowParensAlways:t("arrowParensAlways"),flowObjectCommas:t("flowObjectCommas")}}},{esprima:562,os:534}],556:[function(e,t,r){function n(e){i.ok(this instanceof n),this.lines=e,this.indent=0}var i=e("assert"),s=e("./types"),a=(s.namedTypes,s.builders),o=s.builtInTypes.object,u=s.builtInTypes.array,l=(s.builtInTypes.function,e("./patcher").Patcher,e("./options").normalize),c=e("./lines").fromString,p=e("./comments").attach,h=e("./util");r.parse=function(e,t){t=l(t);var r=c(e,t),i=r.toString({tabWidth:t.tabWidth,reuseWhitespace:!1,useTabs:!1}),s=[],o=t.parser.parse(i,{jsx:!0,loc:!0,locations:!0,range:t.range,comment:!0,onComment:s,tolerant:t.tolerant,ecmaVersion:6,sourceType:"module"});h.fixFaultyLocations(o,r),o.loc=o.loc||{start:r.firstPos(),end:r.lastPos()},o.loc.lines=r,o.loc.indent=0;var u=h.getTrueLoc(o,r);o.loc.start=u.start,o.loc.end=u.end,o.comments&&(s=o.comments,delete o.comments);var f=o;if("Program"===f.type){var f=a.file(o,t.sourceFileName||null);f.loc={lines:r,indent:0,start:r.firstPos(),end:r.lastPos()}}else"File"===f.type&&(o=f.program);return p(s,o.body.length?f.program:f,r),new n(r).copy(f)},n.prototype.copy=function(e){if(u.check(e))return e.map(this.copy,this);if(!o.check(e))return e;h.fixFaultyLocations(e,this.lines);var t=Object.create(Object.getPrototypeOf(e),{original:{value:e,configurable:!1,enumerable:!1,writable:!0}}),r=e.loc,n=this.indent,i=n;r&&(("Block"===e.type||"Line"===e.type||"CommentBlock"===e.type||"CommentLine"===e.type||this.lines.isPrecededOnlyByWhitespace(r.start))&&(i=this.indent=r.start.column),r.lines=this.lines,r.indent=i);for(var s=Object.keys(e),a=s.length,l=0;l0||(n(i,e.start),s.push(e.lines),i=e.end)}),n(i,t.end),y.concat(s)}}function i(e){var t=[];return e.comments&&e.comments.length>0&&e.comments.forEach(function(e){(e.leading||e.trailing)&&t.push(e)}),t}function s(e,t,r){var n=A.copyPos(t.start),i=e.prevPos(n)&&e.charAt(n),s=r.charAt(r.firstPos());return i&&k.test(i)&&s&&k.test(s)}function a(e,t,r){var n=e.charAt(t.end),i=r.lastPos(),s=r.prevPos(i)&&r.charAt(i);return s&&k.test(s)&&n&&k.test(n)}function o(e,t){var r=e.getValue();b.assert(r);var n=r.original;if(b.assert(n),m.deepEqual(t,[]),r.type!==n.type)return!1;var i=new C(n),s=d(e,i,t);return s||(t.length=0),s}function u(e,t,r){var n=e.getValue();return n===t.getValue()||(_.check(n)?l(e,t,r):!!S.check(n)&&c(e,t,r))}function l(e,t,r){var n=e.getValue(),i=t.getValue();_.assert(n);var s=n.length;if(!_.check(i)||i.length!==s)return!1;for(var a=0;aa)}var m=e("assert"),y=e("./lines"),g=e("./types"),b=(g.getFieldValue,g.namedTypes.Printable),v=g.namedTypes.Expression,x=g.namedTypes.ReturnStatement,E=g.namedTypes.SourceLocation,A=e("./util"),D=A.comparePos,C=e("./fast-path"),S=g.builtInTypes.object,_=g.builtInTypes.array,w=g.builtInTypes.string,k=/[0-9a-z_$]/i;r.Patcher=n;var F=n.prototype;F.tryToReprintComments=function(e,t,r){var n=this;if(!e.comments&&!t.comments)return!0;var s=C.from(e),a=C.from(t);s.stack.push("comments",i(e)),a.stack.push("comments",i(t));var o=[],u=l(s,a,o);return u&&o.length>0&&o.forEach(function(e){var t=e.oldPath.getValue();m.ok(t.leading||t.trailing),n.replace(t.loc,r(e.newPath).indentTail(t.loc.indent))}),u},F.deleteComments=function(e){if(e.comments){var t=this;e.comments.forEach(function(r){r.leading?t.replace({start:r.loc.start,end:e.loc.lines.skipSpaces(r.loc.end,!1,!1)},""):r.trailing&&t.replace({start:e.loc.lines.skipSpaces(r.loc.start,!0,!1),end:r.loc.end},"")})}},r.getReprinter=function(e){m.ok(e instanceof C);var t=e.getValue();if(b.check(t)){var r=t.original,i=r&&r.loc,u=i&&i.lines,l=[];if(u&&o(e,l))return function(e){var t=new n(u);return l.forEach(function(r){var n=r.newPath.getValue(),i=r.oldPath.getValue();E.assert(i.loc,!0);var o=!t.tryToReprintComments(n,i,e);o&&t.deleteComments(i);var l=e(r.newPath,o).indentTail(i.loc.indent),c=s(u,i.loc,l),p=a(u,i.loc,l);if(c||p){var h=[];c&&h.push(" "),h.push(l),p&&h.push(" "),l=y.concat(h)}t.replace(i.loc,l)}),t.get(i).indentTail(-r.loc.indent)}}};var T={line:1,column:0},P=/\S/},{"./fast-path":552,"./lines":553,"./types":559,"./util":560,assert:3}],558:[function(e,t,r){function n(e,t){D.ok(this instanceof n),B.assert(e),this.code=e,t&&(O.assert(t),this.map=t)}function i(e){function t(e){return D.ok(e instanceof j),C(e,r)}function r(e,r){if(r)return t(e);if(D.ok(e instanceof j),!c){var n=p.tabWidth,i=e.getNode().loc;if(i&&i.lines&&i.lines.guessTabWidth){p.tabWidth=i.lines.guessTabWidth();var s=o(e);return p.tabWidth=n,s}}return o(e)}function o(e){var t=F(e);return t?s(e,t(r)):u(e)}function u(e,r){return r?C(e,u):a(e,p,t)}function l(e){return a(e,p,l)}D.ok(this instanceof i);var c=e&&e.tabWidth,p=k(e);D.notStrictEqual(p,e),p.sourceFileName=null,this.print=function(e){if(!e)return M;var t=r(j.from(e),!0);return new n(t.toString(p),N.composeSourceMaps(p.inputSourceMap,t.getSourceMap(p.sourceMapName,p.sourceRoot)))},this.printGenerically=function(e){if(!e)return M;var t=j.from(e),r=p.reuseWhitespace;p.reuseWhitespace=!1;var i=new n(l(t).toString(p));return p.reuseWhitespace=r,i}}function s(e,t){return e.needsParens()?w(["(",t,")"]):t}function a(e,t,r){D.ok(e instanceof j);var n=e.getValue(),i=[],s=!1,a=o(e,t,r);return!n||a.isEmpty()?a:(n.decorators&&n.decorators.length>0&&!N.getParentExportDeclaration(e)?e.each(function(e){i.push(r(e),"\n")},"decorators"):N.isExportDeclaration(n)&&n.declaration&&n.declaration.decorators?e.each(function(e){i.push(r(e),"\n")},"declaration","decorators"):s=e.needsParens(),s&&i.unshift("("),i.push(a),s&&i.push(")"),w(i))}function o(e,t,r){var n=e.getValue();if(!n)return _("");if("string"==typeof n)return _(n,t);P.Printable.assert(n);var i=[];switch(n.type){case"File":return e.call(r,"program");case"Program":return n.directives&&e.each(function(e){i.push(r(e),";\n")},"directives"),i.push(e.call(function(e){return u(e,t,r)},"body")),w(i);case"Noop":case"EmptyStatement":return _("");case"ExpressionStatement":return w([e.call(r,"expression"),";"]);case"ParenthesizedExpression":return w(["(",e.call(r,"expression"),")"]);case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":return _(" ").join([e.call(r,"left"),n.operator,e.call(r,"right")]);case"AssignmentPattern":return w([e.call(r,"left")," = ",e.call(r,"right")]);case"MemberExpression":i.push(e.call(r,"object"));var s=e.call(r,"property");return n.computed?i.push("[",s,"]"):i.push(".",s),w(i);case"MetaProperty":return w([e.call(r,"meta"),".",e.call(r,"property")]);case"BindExpression":return n.object&&i.push(e.call(r,"object")),i.push("::",e.call(r,"callee")),w(i);case"Path":return _(".").join(n.body);case"Identifier":return w([_(n.name,t),e.call(r,"typeAnnotation")]);case"SpreadElement":case"SpreadElementPattern":case"RestProperty":case"SpreadProperty":case"SpreadPropertyPattern":case"RestElement":return w(["...",e.call(r,"argument")]);case"FunctionDeclaration":case"FunctionExpression":return n.async&&i.push("async "),i.push("function"),n.generator&&i.push("*"),n.id&&i.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),i.push("(",f(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),w(i);case"ArrowFunctionExpression":return n.async&&i.push("async "),n.typeParameters&&i.push(e.call(r,"typeParameters")),t.arrowParensAlways||1!==n.params.length||n.rest||"Identifier"!==n.params[0].type||n.params[0].typeAnnotation||n.returnType?i.push("(",f(e,t,r),")",e.call(r,"returnType")):i.push(e.call(r,"params",0)),i.push(" => ",e.call(r,"body")),w(i);case"MethodDefinition": -return n.static&&i.push("static "),i.push(c(e,t,r)),w(i);case"YieldExpression":return i.push("yield"),n.delegate&&i.push("*"),n.argument&&i.push(" ",e.call(r,"argument")),w(i);case"AwaitExpression":return i.push("await"),n.all&&i.push("*"),n.argument&&i.push(" ",e.call(r,"argument")),w(i);case"ModuleDeclaration":return i.push("module",e.call(r,"id")),n.source?(D.ok(!n.body),i.push("from",e.call(r,"source"))):i.push(e.call(r,"body")),_(" ").join(i);case"ImportSpecifier":return n.imported?(i.push(e.call(r,"imported")),n.local&&n.local.name!==n.imported.name&&i.push(" as ",e.call(r,"local"))):n.id&&(i.push(e.call(r,"id")),n.name&&i.push(" as ",e.call(r,"name"))),w(i);case"ExportSpecifier":return n.local?(i.push(e.call(r,"local")),n.exported&&n.exported.name!==n.local.name&&i.push(" as ",e.call(r,"exported"))):n.id&&(i.push(e.call(r,"id")),n.name&&i.push(" as ",e.call(r,"name"))),w(i);case"ExportBatchSpecifier":return _("*");case"ImportNamespaceSpecifier":return i.push("* as "),n.local?i.push(e.call(r,"local")):n.id&&i.push(e.call(r,"id")),w(i);case"ImportDefaultSpecifier":return n.local?e.call(r,"local"):e.call(r,"id");case"ExportDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":return m(e,t,r);case"ExportAllDeclaration":return i.push("export *"),n.exported&&i.push(" as ",e.call(r,"exported")),i.push(" from ",e.call(r,"source")),w(i);case"ExportNamespaceSpecifier":return w(["* as ",e.call(r,"exported")]);case"ExportDefaultSpecifier":return e.call(r,"exported");case"Import":return _("import",t);case"ImportDeclaration":if(i.push("import "),n.importKind&&"value"!==n.importKind&&i.push(n.importKind+" "),n.specifiers&&n.specifiers.length>0){var a=!1;e.each(function(e){e.getName()>0&&i.push(", ");var n=e.getValue();P.ImportDefaultSpecifier.check(n)||P.ImportNamespaceSpecifier.check(n)?D.strictEqual(a,!1):(P.ImportSpecifier.assert(n),a||(a=!0,i.push(t.objectCurlySpacing?"{ ":"{"))),i.push(r(e))},"specifiers"),a&&i.push(t.objectCurlySpacing?" }":"}"),i.push(" from ")}return i.push(e.call(r,"source"),";"),w(i);case"BlockStatement":var o=e.call(function(e){return u(e,t,r)},"body");return!o.isEmpty()||n.directives&&0!==n.directives.length?(i.push("{\n"),n.directives&&e.each(function(e){i.push(r(e).indent(t.tabWidth),";",n.directives.length>1||!o.isEmpty()?"\n":"")},"directives"),i.push(o.indent(t.tabWidth)),i.push("\n}"),w(i)):_("{}");case"ReturnStatement":if(i.push("return"),n.argument){var l=e.call(r,"argument");l.startsWithComment()||l.length>1&&P.JSXElement&&P.JSXElement.check(n.argument)?i.push(" (\n",l.indent(t.tabWidth),"\n)"):i.push(" ",l)}return i.push(";"),w(i);case"CallExpression":return w([e.call(r,"callee"),h(e,t,r)]);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var b=!1,x="ObjectTypeAnnotation"===n.type,A=t.flowObjectCommas?",":x?";":",",C=[];x&&C.push("indexers","callProperties"),C.push("properties");var S=0;C.forEach(function(e){S+=n[e].length});var k=x&&1===S||0===S,F=n.exact?"{|":"{",T=n.exact?"|}":"}";i.push(k?F:F+"\n");var B=i.length-1,O=0;return C.forEach(function(n){e.each(function(e){var n=r(e);k||(n=n.indent(t.tabWidth));var s=!x&&n.length>1;s&&b&&i.push("\n"),i.push(n),O0&&i.push(" "):n=n.indent(t.tabWidth),i.push(n),(r1?i.push(_(",\n").join(L).indentTail(n.kind.length+1)):i.push(L[0]);var U=e.getParentNode();return P.ForStatement.check(U)||P.ForInStatement.check(U)||P.ForOfStatement&&P.ForOfStatement.check(U)||P.ForAwaitStatement&&P.ForAwaitStatement.check(U)||i.push(";"),w(i);case"VariableDeclarator":return n.init?_(" = ").join([e.call(r,"id"),e.call(r,"init")]):e.call(r,"id");case"WithStatement":return w(["with (",e.call(r,"object"),") ",e.call(r,"body")]);case"IfStatement":var V=g(e.call(r,"consequent"),t),i=["if (",e.call(r,"test"),")",V];return n.alternate&&i.push(v(V)?" else":"\nelse",g(e.call(r,"alternate"),t)),w(i);case"ForStatement":var q=e.call(r,"init"),G=q.length>1?";\n":"; ",X=_(G).join([q,e.call(r,"test"),e.call(r,"update")]).indentTail("for (".length),J=w(["for (",X,")"]),W=g(e.call(r,"body"),t),i=[J];return J.length>1&&(i.push("\n"),W=W.trimLeft()),i.push(W),w(i);case"WhileStatement":return w(["while (",e.call(r,"test"),")",g(e.call(r,"body"),t)]);case"ForInStatement":return w([n.each?"for each (":"for (",e.call(r,"left")," in ",e.call(r,"right"),")",g(e.call(r,"body"),t)]);case"ForOfStatement":return w(["for (",e.call(r,"left")," of ",e.call(r,"right"),")",g(e.call(r,"body"),t)]);case"ForAwaitStatement":return w(["for await (",e.call(r,"left")," of ",e.call(r,"right"),")",g(e.call(r,"body"),t)]);case"DoWhileStatement":var K=w(["do",g(e.call(r,"body"),t)]),i=[K];return v(K)?i.push(" while"):i.push("\nwhile"),i.push(" (",e.call(r,"test"),");"),w(i);case"DoExpression":var z=e.call(function(e){return u(e,t,r)},"body");return w(["do {\n",z.indent(t.tabWidth),"\n}"]);case"BreakStatement":return i.push("break"),n.label&&i.push(" ",e.call(r,"label")),i.push(";"),w(i);case"ContinueStatement":return i.push("continue"),n.label&&i.push(" ",e.call(r,"label")),i.push(";"),w(i);case"LabeledStatement":return w([e.call(r,"label"),":\n",e.call(r,"body")]);case"TryStatement":return i.push("try ",e.call(r,"block")),n.handler?i.push(" ",e.call(r,"handler")):n.handlers&&e.each(function(e){i.push(" ",r(e))},"handlers"),n.finalizer&&i.push(" finally ",e.call(r,"finalizer")),w(i);case"CatchClause":return i.push("catch (",e.call(r,"param")),n.guard&&i.push(" if ",e.call(r,"guard")),i.push(") ",e.call(r,"body")),w(i);case"ThrowStatement":return w(["throw ",e.call(r,"argument"),";"]);case"SwitchStatement":return w(["switch (",e.call(r,"discriminant"),") {\n",_("\n").join(e.map(r,"cases")),"\n}"]);case"SwitchCase":return n.test?i.push("case ",e.call(r,"test"),":"):i.push("default:"),n.consequent.length>0&&i.push("\n",e.call(function(e){return u(e,t,r)},"consequent").indent(t.tabWidth)),w(i);case"DebuggerStatement":return _("debugger;");case"JSXAttribute":return i.push(e.call(r,"name")),n.value&&i.push("=",e.call(r,"value")),w(i);case"JSXIdentifier":return _(n.name,t);case"JSXNamespacedName":return _(":").join([e.call(r,"namespace"),e.call(r,"name")]);case"JSXMemberExpression":return _(".").join([e.call(r,"object"),e.call(r,"property")]);case"JSXSpreadAttribute":return w(["{...",e.call(r,"argument"),"}"]);case"JSXExpressionContainer":return w(["{",e.call(r,"expression"),"}"]);case"JSXElement":var Y=e.call(r,"openingElement");if(n.openingElement.selfClosing)return D.ok(!n.closingElement),Y;var H=w(e.map(function(e){var t=e.getValue();if(P.Literal.check(t)&&"string"==typeof t.value){if(/\S/.test(t.value))return t.value.replace(/^\s+|\s+$/g,"");if(/\n/.test(t.value))return"\n"}return r(e)},"children")).indentTail(t.tabWidth),$=e.call(r,"closingElement");return w([Y,H,$]);case"JSXOpeningElement":i.push("<",e.call(r,"name"));var Q=[];e.each(function(e){Q.push(" ",r(e))},"attributes");var Z=w(Q);return(Z.length>1||Z.getLineLength(1)>t.wrapColumn)&&(Q.forEach(function(e,t){" "===e&&(D.strictEqual(t%2,0),Q[t]="\n")}),Z=w(Q).indentTail(t.tabWidth)),i.push(Z,n.selfClosing?" />":">"),w(i);case"JSXClosingElement":return w([""]);case"JSXText":return _(n.value,t);case"JSXEmptyExpression":return _("");case"TypeAnnotatedIdentifier":return w([e.call(r,"annotation")," ",e.call(r,"identifier")]);case"ClassBody":return 0===n.body.length?_("{}"):w(["{\n",e.call(function(e){return u(e,t,r)},"body").indent(t.tabWidth),"\n}"]);case"ClassPropertyDefinition":return i.push("static ",e.call(r,"definition")),P.MethodDefinition.check(n.definition)||i.push(";"),w(i);case"ClassProperty":n.static&&i.push("static ");var j=e.call(r,"key");return n.computed?j=w(["[",j,"]"]):"plus"===n.variance?j=w(["+",j]):"minus"===n.variance&&(j=w(["-",j])),i.push(j),n.typeAnnotation&&i.push(e.call(r,"typeAnnotation")),n.value&&i.push(" = ",e.call(r,"value")),i.push(";"),w(i);case"ClassDeclaration":case"ClassExpression":return i.push("class"),n.id&&i.push(" ",e.call(r,"id"),e.call(r,"typeParameters")),n.superClass&&i.push(" extends ",e.call(r,"superClass"),e.call(r,"superTypeParameters")),n.implements&&n.implements.length>0&&i.push(" implements ",_(", ").join(e.map(r,"implements"))),i.push(" ",e.call(r,"body")),w(i);case"TemplateElement":return _(n.value.raw,t).lockIndentTail();case"TemplateLiteral":var ee=e.map(r,"expressions");return i.push("`"),e.each(function(e){var t=e.getName();i.push(r(e)),t ":": ",e.call(r,"returnType")),w(i);case"FunctionTypeParam":return w([e.call(r,"name"),n.optional?"?":"",": ",e.call(r,"typeAnnotation")]);case"GenericTypeAnnotation":return w([e.call(r,"id"),e.call(r,"typeParameters")]);case"DeclareInterface":i.push("declare ");case"InterfaceDeclaration":return i.push(_("interface ",t),e.call(r,"id"),e.call(r,"typeParameters")," "),n.extends&&i.push("extends ",_(", ").join(e.map(r,"extends"))),i.push(" ",e.call(r,"body")),w(i);case"ClassImplements":case"InterfaceExtends":return w([e.call(r,"id"),e.call(r,"typeParameters")]);case"IntersectionTypeAnnotation":return _(" & ").join(e.map(r,"types"));case"NullableTypeAnnotation":return w(["?",e.call(r,"typeAnnotation")]);case"NullLiteralTypeAnnotation":return _("null",t);case"ThisTypeAnnotation":return _("this",t);case"NumberTypeAnnotation":return _("number",t);case"ObjectTypeCallProperty":return e.call(r,"value");case"ObjectTypeIndexer":var ne="plus"===n.variance?"+":"minus"===n.variance?"-":"";return w([ne,"[",e.call(r,"id"),": ",e.call(r,"key"),"]: ",e.call(r,"value")]);case"ObjectTypeProperty":var ne="plus"===n.variance?"+":"minus"===n.variance?"-":"";return w([ne,e.call(r,"key"),n.optional?"?":"",": ",e.call(r,"value")]);case"QualifiedTypeIdentifier":return w([e.call(r,"qualification"),".",e.call(r,"id")]);case"StringLiteralTypeAnnotation":return _(E(n.value,t),t);case"NumberLiteralTypeAnnotation":case"NumericLiteralTypeAnnotation":return D.strictEqual(typeof n.value,"number"),_(JSON.stringify(n.value),t);case"StringTypeAnnotation":return _("string",t);case"DeclareTypeAlias":i.push("declare ");case"TypeAlias":return w(["type ",e.call(r,"id"),e.call(r,"typeParameters")," = ",e.call(r,"right"),";"]);case"TypeCastExpression":return w(["(",e.call(r,"expression"),e.call(r,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return w(["<",_(", ").join(e.map(r,"params")),">"]);case"TypeParameter":switch(n.variance){case"plus":i.push("+");break;case"minus":i.push("-")}return i.push(e.call(r,"name")),n.bound&&i.push(e.call(r,"bound")),n.default&&i.push("=",e.call(r,"default")),w(i);case"TypeofTypeAnnotation":return w([_("typeof ",t),e.call(r,"argument")]);case"UnionTypeAnnotation":return _(" | ").join(e.map(r,"types"));case"VoidTypeAnnotation":return _("void",t);case"NullTypeAnnotation":return _("null",t);case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:throw new Error("unknown type: "+JSON.stringify(n.type))}return p}function u(e,t,r){var n=(P.ClassBody&&P.ClassBody.check(e.getParentNode()),[]),i=!1,s=!1;e.each(function(e){var t=(e.getName(),e.getValue());t&&"EmptyStatement"!==t.type&&(P.Comment.check(t)?i=!0:P.Statement.check(t)?s=!0:B.assert(t),n.push({node:t,printed:r(e)}))}),i&&D.strictEqual(s,!1,"Comments may appear as statements in otherwise empty statement lists, but may not coexist with non-Comment nodes.");var a=null,o=n.length,u=[];return n.forEach(function(e,r){var n,i,s=e.printed,c=e.node,p=s.length>1,h=r>0,f=rr.length?n:r}function c(e,t,r){var n=e.getNode(),i=n.kind,s=[];"ObjectMethod"===n.type||"ClassMethod"===n.type?n.value=n:P.FunctionExpression.assert(n.value),n.value.async&&s.push("async "),i&&"init"!==i&&"method"!==i&&"constructor"!==i?(D.ok("get"===i||"set"===i),s.push(i," ")):n.value.generator&&s.push("*");var a=e.call(r,"key");return n.computed&&(a=w(["[",a,"]"])),s.push(a,e.call(r,"value","typeParameters"),"(",e.call(function(e){return f(e,t,r)},"value"),")",e.call(r,"value","returnType")," ",e.call(r,"value","body")),w(s)}function h(e,t,r){var n=e.map(r,"arguments"),i=N.isTrailingCommaEnabled(t,"parameters"),s=_(", ").join(n);return s.getLineLength(1)>t.wrapColumn?(s=_(",\n").join(n),w(["(\n",s.indent(t.tabWidth),i?",\n)":"\n)"])):w(["(",s,")"])}function f(e,t,r){var n=e.getValue();P.Function.assert(n);var i=e.map(r,"params");n.defaults&&e.each(function(e){var t=e.getName(),n=i[t];n&&e.getValue()&&(i[t]=w([n," = ",r(e)]))},"defaults"),n.rest&&i.push(w(["...",e.call(r,"rest")]));var s=_(", ").join(i);return s.length>1||s.getLineLength(1)>t.wrapColumn?(s=_(",\n").join(i),s=w(N.isTrailingCommaEnabled(t,"parameters")&&!n.rest&&"RestElement"!==n.params[n.params.length-1].type?[s,",\n"]:[s,"\n"]),w(["\n",s.indent(t.tabWidth)])):s}function d(e,t,r){var n=e.getValue(),i=[];if(n.async&&i.push("async "),n.generator&&i.push("*"),n.method||"get"===n.kind||"set"===n.kind)return c(e,t,r);var s=e.call(r,"key");return n.computed?i.push("[",s,"]"):i.push(s),i.push("(",f(e,t,r),")",e.call(r,"returnType")," ",e.call(r,"body")),w(i)}function m(e,t,r){var n=e.getValue(),i=["export "],s=t.objectCurlySpacing;P.Declaration.assert(n),(n.default||"ExportDefaultDeclaration"===n.type)&&i.push("default "),n.declaration?i.push(e.call(r,"declaration")):n.specifiers&&n.specifiers.length>0&&(1===n.specifiers.length&&"ExportBatchSpecifier"===n.specifiers[0].type?i.push("*"):i.push(s?"{ ":"{",_(", ").join(e.map(r,"specifiers")),s?" }":"}"),n.source&&i.push(" from ",e.call(r,"source")));var a=w(i);return";"===b(a)||n.declaration&&("FunctionDeclaration"===n.declaration.type||"ClassDeclaration"===n.declaration.type)||(a=w([a,";"])),a}function y(e,t){var r=N.getParentExportDeclaration(e);return r?D.strictEqual(r.type,"DeclareExportDeclaration"):t.unshift("declare "),w(t)}function g(e,t){return w(e.length>1?[" ",e]:["\n",A(e).indent(t.tabWidth)])}function b(e){var t=e.lastPos();do{var r=e.charAt(t);if(/\S/.test(r))return r}while(e.prevPos(t))}function v(e){return"}"===b(e)}function x(e){return e.replace(/['"]/g,function(e){return'"'===e?"'":'"'})}function E(e,t){switch(B.assert(e),t.quote){case"auto":var r=JSON.stringify(e),n=x(JSON.stringify(x(e)));return r.length>n.length?n:r;case"single":return x(JSON.stringify(x(e)));case"double":default:return JSON.stringify(e)}}function A(e){var t=b(e);return!t||"\n};".indexOf(t)<0?w([e,";"]):e}var D=e("assert"),C=(e("source-map"),e("./comments").printComments),S=e("./lines"),_=S.fromString,w=S.concat,k=e("./options").normalize,F=e("./patcher").getReprinter,T=e("./types"),P=T.namedTypes,B=T.builtInTypes.string,O=T.builtInTypes.object,j=e("./fast-path"),N=e("./util"),I=n.prototype,L=!1;I.toString=function(){return L||(console.warn("Deprecation warning: recast.print now returns an object with a .code property. You appear to be treating the object as a string, which might still work but is strongly discouraged."),L=!0),this.code};var M=new n("");r.Printer=i},{"./comments":551,"./fast-path":552,"./lines":553,"./options":555,"./patcher":557,"./types":559,"./util":560,assert:3,"source-map":573}],559:[function(e,t,r){t.exports=e("ast-types")},{"ast-types":22}],560:[function(e,t,r){function n(){for(var e={},t=arguments.length,r=0;r=0;--i){var s=this.leading[i];t.end.offset>=s.start&&(r.unshift(s.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}r.length&&(e.innerComments=r)}},e.prototype.findTrailingComments=function(e,t){var r=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=t.end.offset&&r.unshift(i.comment)}return this.trailing.length=0,r}var s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){var a=s.node.trailingComments[0];a&&a.range[0]>=t.end.offset&&(r=s.node.trailingComments,delete s.node.trailingComments)}return r},e.prototype.findLeadingComments=function(e,t){for(var r,n=[];this.stack.length>0;){var i=this.stack[this.stack.length-1];if(!(i&&i.start>=t.start.offset))break;r=this.stack.pop().node}if(r){for(var s=r.leadingComments?r.leadingComments.length:0,a=s-1;a>=0;--a){var o=r.leadingComments[a];o.range[1]<=t.start.offset&&(n.unshift(o),r.leadingComments.splice(a,1))}return r.leadingComments&&0===r.leadingComments.length&&delete r.leadingComments,n}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];i.start<=t.start.offset&&(n.unshift(i.comment),this.leading.splice(a,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===n.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var r=this.findTrailingComments(e,t),i=this.findLeadingComments(e,t);i.length>0&&(e.leadingComments=i),r.length>0&&(e.trailingComments=r),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var r="L"===e.type[0]?"Line":"Block",n={type:r,value:e.value};if(e.range&&(n.range=e.range),e.loc&&(n.loc=e.loc),this.comments.push(n),this.attach){var i={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=r,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var n=r(4),i=r(5),s=r(6),a=r(7),o=r(8),u=r(2),l=r(10),c=function(){function e(e,t,r){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=r,this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new o.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],r=1;r0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=r,this.context.firstCoverInitializedNameError=n,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,n=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r,this.context.firstCoverInitializedNameError=n||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===a.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,r,n=this.createNode();switch(this.lookahead.type){case a.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(n,new l.Identifier(this.nextToken().value));break;case a.Token.NumericLiteral:case a.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),t.value="true"===t.value,r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),t.value=null,r=this.getTokenRaw(t),e=this.finalize(n,new l.Literal(t.value,r));break;case a.Token.Template:e=this.parseTemplateLiteral();break;case a.Token.Punctuator:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),r=this.getTokenRaw(t),e=this.finalize(n,new l.RegexLiteral(t.value,r,t.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case a.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(n,new l.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(n,new l.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new l.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var r=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(r)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new l.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,r},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!1;var r=this.parseFormalParameters(),n=this.parsePropertyMethod(r);return this.context.allowYield=t,this.finalize(e,new l.FunctionExpression(null,r.params,n,!1))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),r=null;switch(t.type){case a.Token.StringLiteral:case a.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,i.Messages.StrictOctalLiteral);var n=this.getTokenRaw(t);r=this.finalize(e,new l.Literal(t.value,n));break;case a.Token.Identifier:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.Keyword:r=this.finalize(e,new l.Identifier(t.value));break;case a.Token.Punctuator:"["===t.value?(r=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return r},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,r,n,s=this.createNode(),o=this.lookahead,u=!1,c=!1,p=!1;o.type===a.Token.Identifier?(this.nextToken(),r=this.finalize(s,new l.Identifier(o.value))):this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var h=this.qualifiedPropertyName(this.lookahead);if(o.type===a.Token.Identifier&&"get"===o.value&&h)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,n=this.parseGetterMethod();else if(o.type===a.Token.Identifier&&"set"===o.value&&h)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseSetterMethod();else if(o.type===a.Token.Punctuator&&"*"===o.value&&h)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),n=this.parseGeneratorMethod(),c=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),n=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))n=this.parsePropertyMethodFunction(),c=!0;else if(o.type===a.Token.Identifier){var f=this.finalize(s,new l.Identifier(o.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),p=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);n=this.finalize(s,new l.AssignmentPattern(f,d))}else p=!0,n=f}else this.throwUnexpectedToken(this.nextToken());return this.finalize(s,new l.Property(t,r,u,n,c,p))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],r={value:!1};!this.match("}");)t.push(this.parseObjectProperty(r)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new l.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){n.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new l.TemplateElement(r,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==a.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new l.TemplateElement(r,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],r=[],n=this.parseTemplateHead();for(r.push(n);!n.tail;)t.push(this.parseExpression()),n=this.parseTemplateElement(),r.push(n);return this.finalize(e,new l.TemplateLiteral(r,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[]};else{var t=this.lookahead,r=[];if(this.match("..."))e=this.parseRestElement(r),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e]};else{var n=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);this.startMarker.index")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(n=!0,e={type:"ArrowParameterPlaceHolder",params:[e]}),!n)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var s=0;s0){this.nextToken(),r.prec=n,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],s=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),o=[s,r,a];;){if((n=this.binaryPrecedence(this.lookahead))<=0)break;for(;o.length>2&&n<=o[o.length-2].prec;){a=o.pop();var u=o.pop().value;s=o.pop(),i.pop();var c=this.startNode(i[i.length-1]);o.push(this.finalize(c,new l.BinaryExpression(u,s,a)))}r=this.nextToken(),r.prec=n,o.push(r),i.push(this.lookahead),o.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=o.length-1;for(t=o[p],i.pop();p>1;){var c=this.startNode(i.pop());t=this.finalize(c,new l.BinaryExpression(o[p-1].value,o[p-2],t)),p-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=!0;var n=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new l.ConditionalExpression(t,n,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var r=0;r")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var n=this.reinterpretAsCoverFormalsList(e);if(n){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,a=this.context.allowYield;this.context.allowYield=!0;var o=this.startNode(t);this.expect("=>");var c=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),p=c.type!==u.Syntax.BlockStatement;this.context.strict&&n.firstRestricted&&this.throwUnexpectedToken(n.firstRestricted,n.message),this.context.strict&&n.stricted&&this.tolerateUnexpectedToken(n.stricted,n.message),e=this.finalize(o,new l.ArrowFunctionExpression(n.params,c,p)),this.context.strict=s,this.context.allowYield=a}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var h=e;this.scanner.isRestrictedWord(h.name)&&this.tolerateUnexpectedToken(r,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(h.name)&&this.tolerateUnexpectedToken(r,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),r=this.nextToken();var f=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new l.AssignmentExpression(r.value,e,f)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];for(r.push(t);this.startMarker.index",t.TokenName[r.Identifier]="Identifier",t.TokenName[r.Keyword]="Keyword",t.TokenName[r.NullLiteral]="Null",t.TokenName[r.NumericLiteral]="Numeric",t.TokenName[r.Punctuator]="Punctuator",t.TokenName[r.StringLiteral]="String",t.TokenName[r.RegularExpression]="RegularExpression",t.TokenName[r.Template]="Template" -},function(e,t,r){"use strict";function n(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function i(e){return"01234567".indexOf(e)}var s=r(4),a=r(5),o=r(9),u=r(7),l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,a.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,r,n;for(this.trackComment&&(t=[],r=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,o.Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:!1,slice:[r+e,this.index-1],range:[r,this.index-1],loc:n};t.push(s)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!1,slice:[r+e,this.index],range:[r,this.index],loc:n};t.push(s)}return t},e.prototype.skipMultiLineComment=function(){var e,t,r;for(this.trackComment&&(e=[],t=this.index-2,r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(o.Character.isLineTerminator(n))13===n&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===n){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(i)}return e}++this.index}else++this.index}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(i)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var r=this.source.charCodeAt(this.index);if(o.Character.isWhiteSpace(r))++this.index;else if(o.Character.isLineTerminator(r))++this.index,13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===r)if(47===(r=this.source.charCodeAt(this.index+1))){this.index+=2;var n=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(n)),t=!0}else{if(42!==r)break;this.index+=2;var n=this.skipMultiLineComment();this.trackComment&&(e=e.concat(n))}else if(t&&45===r){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var n=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(n))}else{if(60!==r)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var n=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(n))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){t=1024*(t-55296)+r-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,r=0,i=0;i1114111||"}"!==e)&&this.throwUnexpectedToken(),o.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!o.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=o.Character.fromCodePoint(e);this.index+=t.length;var r;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(r=this.scanHexEscape("u"),e=r.charCodeAt(0),r&&"\\"!==r&&o.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=r);!this.eof()&&(e=this.codePointAt(this.index),o.Character.isIdentifierPart(e));)r=o.Character.fromCodePoint(e),t+=r,this.index+=r.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(r=this.scanHexEscape("u"),e=r.charCodeAt(0),r&&"\\"!==r&&o.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=r);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,r=i(e);return!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,r=8*r+i(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(r=8*r+i(this.source[this.index++]))),{code:r,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,r=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===r.length?u.Token.Identifier:this.isKeyword(r)?u.Token.Keyword:"null"===r?u.Token.NullLiteral:"true"===r||"false"===r?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&o.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),o.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,r="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)r+=this.source[this.index++];return 0===r.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(o.Character.isIdentifierStart(t)||o.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(r,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var r="",n=!1;for(o.Character.isOctalDigit(e.charCodeAt(0))?(n=!0,r="0"+this.source[this.index++]):++this.index;!this.eof()&&o.Character.isOctalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];return n||0!==r.length||this.throwUnexpectedToken(),(o.Character.isIdentifierStart(this.source.charCodeAt(this.index))||o.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(r,8),octal:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,r){var i=parseInt(t||r,16);return i>1114111&&n.throwUnexpectedToken(a.Messages.InvalidRegExp),i<=65535?String.fromCharCode(i):"￿"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"￿"));try{RegExp(r)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],r=!1,n=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],o.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(o.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){n=!0;break}"["===e&&(r=!0)}return n||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),{value:t.substr(1,t.length-2),literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var r=this.source[this.index];if(!o.Character.isIdentifierPart(r.charCodeAt(0)))break;if(++this.index,"\\"!==r||this.eof())t+=r,e+=r;else if("u"===(r=this.source[this.index])){++this.index;var n=this.index;if(r=this.scanHexEscape("u"))for(t+=r,e+="\\u";n=55296&&e<57343&&o.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){"use strict";var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){ -return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";var n=r(2),i=function(){function e(e){this.type=n.Syntax.ArrayExpression,this.elements=e}return e}();t.ArrayExpression=i;var s=function(){function e(e){this.type=n.Syntax.ArrayPattern,this.elements=e}return e}();t.ArrayPattern=s;var a=function(){function e(e,t,r){this.type=n.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=r}return e}();t.ArrowFunctionExpression=a;var o=function(){function e(e,t,r){this.type=n.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=r}return e}();t.AssignmentExpression=o;var u=function(){function e(e,t){this.type=n.Syntax.AssignmentPattern,this.left=e,this.right=t}return e}();t.AssignmentPattern=u;var l=function(){function e(e,t,r){var i="||"===e||"&&"===e;this.type=i?n.Syntax.LogicalExpression:n.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=r}return e}();t.BinaryExpression=l;var c=function(){function e(e){this.type=n.Syntax.BlockStatement,this.body=e}return e}();t.BlockStatement=c;var p=function(){function e(e){this.type=n.Syntax.BreakStatement,this.label=e}return e}();t.BreakStatement=p;var h=function(){function e(e,t){this.type=n.Syntax.CallExpression,this.callee=e,this.arguments=t}return e}();t.CallExpression=h;var f=function(){function e(e,t){this.type=n.Syntax.CatchClause,this.param=e,this.body=t}return e}();t.CatchClause=f;var d=function(){function e(e){this.type=n.Syntax.ClassBody,this.body=e}return e}();t.ClassBody=d;var m=function(){function e(e,t,r){this.type=n.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=r}return e}();t.ClassDeclaration=m;var y=function(){function e(e,t,r){this.type=n.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=r}return e}();t.ClassExpression=y;var g=function(){function e(e,t){this.type=n.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}return e}();t.ComputedMemberExpression=g;var b=function(){function e(e,t,r){this.type=n.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=r}return e}();t.ConditionalExpression=b;var v=function(){function e(e){this.type=n.Syntax.ContinueStatement,this.label=e}return e}();t.ContinueStatement=v;var x=function(){function e(){this.type=n.Syntax.DebuggerStatement}return e}();t.DebuggerStatement=x;var E=function(){function e(e,t){this.type=n.Syntax.ExpressionStatement,this.expression=e,this.directive=t}return e}();t.Directive=E;var A=function(){function e(e,t){this.type=n.Syntax.DoWhileStatement,this.body=e,this.test=t}return e}();t.DoWhileStatement=A;var D=function(){function e(){this.type=n.Syntax.EmptyStatement}return e}();t.EmptyStatement=D;var C=function(){function e(e){this.type=n.Syntax.ExportAllDeclaration,this.source=e}return e}();t.ExportAllDeclaration=C;var S=function(){function e(e){this.type=n.Syntax.ExportDefaultDeclaration,this.declaration=e}return e}();t.ExportDefaultDeclaration=S;var _=function(){function e(e,t,r){this.type=n.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=r}return e}();t.ExportNamedDeclaration=_;var w=function(){function e(e,t){this.type=n.Syntax.ExportSpecifier,this.exported=t,this.local=e}return e}();t.ExportSpecifier=w;var k=function(){function e(e){this.type=n.Syntax.ExpressionStatement,this.expression=e}return e}();t.ExpressionStatement=k;var F=function(){function e(e,t,r){this.type=n.Syntax.ForInStatement,this.left=e,this.right=t,this.body=r,this.each=!1}return e}();t.ForInStatement=F;var T=function(){function e(e,t,r){this.type=n.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=r}return e}();t.ForOfStatement=T;var P=function(){function e(e,t,r,i){this.type=n.Syntax.ForStatement,this.init=e,this.test=t,this.update=r,this.body=i}return e}();t.ForStatement=P;var B=function(){function e(e,t,r,i){this.type=n.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=r,this.generator=i,this.expression=!1}return e}();t.FunctionDeclaration=B;var O=function(){function e(e,t,r,i){this.type=n.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=r,this.generator=i,this.expression=!1}return e}();t.FunctionExpression=O;var j=function(){function e(e){this.type=n.Syntax.Identifier,this.name=e}return e}();t.Identifier=j;var N=function(){function e(e,t,r){this.type=n.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=r}return e}();t.IfStatement=N;var I=function(){function e(e,t){this.type=n.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}return e}();t.ImportDeclaration=I;var L=function(){function e(e){this.type=n.Syntax.ImportDefaultSpecifier,this.local=e}return e}();t.ImportDefaultSpecifier=L;var M=function(){function e(e){this.type=n.Syntax.ImportNamespaceSpecifier,this.local=e}return e}();t.ImportNamespaceSpecifier=M;var R=function(){function e(e,t){this.type=n.Syntax.ImportSpecifier,this.local=e,this.imported=t}return e}();t.ImportSpecifier=R;var U=function(){function e(e,t){this.type=n.Syntax.LabeledStatement,this.label=e,this.body=t}return e}();t.LabeledStatement=U;var V=function(){function e(e,t){this.type=n.Syntax.Literal,this.value=e,this.raw=t}return e}();t.Literal=V;var q=function(){function e(e,t){this.type=n.Syntax.MetaProperty,this.meta=e,this.property=t}return e}();t.MetaProperty=q;var G=function(){function e(e,t,r,i,s){this.type=n.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=r,this.kind=i,this.static=s}return e}();t.MethodDefinition=G;var X=function(){function e(e,t){this.type=n.Syntax.NewExpression,this.callee=e,this.arguments=t}return e}();t.NewExpression=X;var J=function(){function e(e){this.type=n.Syntax.ObjectExpression,this.properties=e}return e}();t.ObjectExpression=J;var W=function(){function e(e){this.type=n.Syntax.ObjectPattern,this.properties=e}return e}();t.ObjectPattern=W;var K=function(){function e(e,t){this.type=n.Syntax.Program,this.body=e,this.sourceType=t}return e}();t.Program=K;var z=function(){function e(e,t,r,i,s,a){this.type=n.Syntax.Property,this.key=t,this.computed=r,this.value=i,this.kind=e,this.method=s,this.shorthand=a}return e}();t.Property=z;var Y=function(){function e(e,t,r){this.type=n.Syntax.Literal,this.value=e,this.raw=t,this.regex=r}return e}();t.RegexLiteral=Y;var H=function(){function e(e){this.type=n.Syntax.RestElement,this.argument=e}return e}();t.RestElement=H;var $=function(){function e(e){this.type=n.Syntax.ReturnStatement,this.argument=e}return e}();t.ReturnStatement=$;var Q=function(){function e(e){this.type=n.Syntax.SequenceExpression,this.expressions=e}return e}();t.SequenceExpression=Q;var Z=function(){function e(e){this.type=n.Syntax.SpreadElement,this.argument=e}return e}();t.SpreadElement=Z;var ee=function(){function e(e,t){this.type=n.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}return e}();t.StaticMemberExpression=ee;var te=function(){function e(){this.type=n.Syntax.Super}return e}();t.Super=te;var re=function(){function e(e,t){this.type=n.Syntax.SwitchCase,this.test=e,this.consequent=t}return e}();t.SwitchCase=re;var ne=function(){function e(e,t){this.type=n.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}return e}();t.SwitchStatement=ne;var ie=function(){function e(e,t){this.type=n.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}return e}();t.TaggedTemplateExpression=ie;var se=function(){function e(e,t){this.type=n.Syntax.TemplateElement,this.value=e,this.tail=t}return e}();t.TemplateElement=se;var ae=function(){function e(e,t){this.type=n.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}return e}();t.TemplateLiteral=ae;var oe=function(){function e(){this.type=n.Syntax.ThisExpression}return e}();t.ThisExpression=oe;var ue=function(){function e(e){this.type=n.Syntax.ThrowStatement,this.argument=e}return e}();t.ThrowStatement=ue;var le=function(){function e(e,t,r){this.type=n.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=r}return e}();t.TryStatement=le;var ce=function(){function e(e,t){this.type=n.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}return e}();t.UnaryExpression=ce;var pe=function(){function e(e,t,r){this.type=n.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=r}return e}();t.UpdateExpression=pe;var he=function(){function e(e,t){this.type=n.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}return e}();t.VariableDeclaration=he;var fe=function(){function e(e,t){this.type=n.Syntax.VariableDeclarator,this.id=e,this.init=t}return e}();t.VariableDeclarator=fe;var de=function(){function e(e,t){this.type=n.Syntax.WhileStatement,this.test=e,this.body=t}return e}();t.WhileStatement=de;var me=function(){function e(e,t){this.type=n.Syntax.WithStatement,this.object=e,this.body=t}return e}();t.WithStatement=me;var ye=function(){function e(e,t){this.type=n.Syntax.YieldExpression,this.argument=e,this.delegate=t}return e}();t.YieldExpression=ye},function(e,t,r){"use strict";function n(e){var t;switch(e.type){case c.JSXSyntax.JSXIdentifier:t=e.name;break;case c.JSXSyntax.JSXNamespacedName:var r=e;t=n(r.namespace)+":"+n(r.name);break;case c.JSXSyntax.JSXMemberExpression:var i=e;t=n(i.object)+"."+n(i.property)}return t}var i,s=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},a=r(9),o=r(7),u=r(3),l=r(12),c=r(13),p=r(10),h=r(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(i||(i={})),o.TokenName[i.Identifier]="JSXIdentifier",o.TokenName[i.Text]="JSXText";var f=function(e){function t(t,r,n){e.call(this,t,r,n)}return s(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",r=!0,n=!1,i=!1,s=!1;!this.scanner.eof()&&r&&!n;){var o=this.scanner.source[this.scanner.index];if(o===e)break;if(n=";"===o,t+=o,++this.scanner.index,!n)switch(t.length){case 2:i="#"===o;break;case 3:i&&(s="x"===o,r=s||a.Character.isDecimalDigit(o.charCodeAt(0)),i=i&&!s);break;default:r=r&&!(i&&!a.Character.isDecimalDigit(o.charCodeAt(0))),r=r&&!(s&&!a.Character.isHexDigit(o.charCodeAt(0)))}}if(r&&n&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):s&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||s||!l.XHTMLEntities[u]||(t=l.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:o.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var r=this.scanner.index,n=this.scanner.source[this.scanner.index++],s="";!this.scanner.eof();){var u=this.scanner.source[this.scanner.index++];if(u===n)break;s+="&"===u?this.scanXHTMLEntity(n):u}return{type:o.Token.StringLiteral,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(46===e){var l=this.scanner.source.charCodeAt(this.scanner.index+1),c=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===l&&46===c?"...":".",r=this.scanner.index;return this.scanner.index+=t.length,{type:o.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(96===e)return{type:o.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){var r=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}var p=this.scanner.source.slice(r,this.scanner.index);return{type:i.Identifier,value:p,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var r=this.scanner.source[this.scanner.index];if("{"===r||"<"===r)break;++this.scanner.index,t+=r,a.Character.isLineTerminator(r.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===r&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var n={type:i.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(n)),n},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.scanner.scanComments();var n=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,n},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===o.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===o.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==i.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new h.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var n=this.parseJSXIdentifier();t=this.finalize(e,new h.JSXNamespacedName(r,n))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new h.JSXMemberExpression(i,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),r=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=r;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new h.JSXNamespacedName(n,i))}else e=r;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==o.Token.StringLiteral&&this.throwUnexpectedToken(t);var r=this.getTokenRaw(t);return this.finalize(e,new p.Literal(t.value,r))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new h.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),r=null;return this.matchJSX("=")&&(this.expectJSX("="),r=this.parseJSXAttributeValue()),this.finalize(e,new h.JSXAttribute(t,r))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new h.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),r=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new h.JSXOpeningElement(t,n,r))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new h.JSXClosingElement(t))}var r=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new h.JSXOpeningElement(r,i,n))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new h.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new h.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),r=this.nextJSXText();if(r.start0))break;var a=this.finalize(e.node,new h.JSXElement(e.opening,e.children,e.closing));e=t.pop(),e.children.push(a)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),r=[],n=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:n,children:r});r=i.children,n=i.closing}return this.finalize(e,new h.JSXElement(t,r,n))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";var n=r(13),i=function(){function e(e){this.type=n.JSXSyntax.JSXClosingElement,this.name=e}return e}();t.JSXClosingElement=i;var s=function(){function e(e,t,r){this.type=n.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=r}return e}();t.JSXElement=s;var a=function(){function e(){this.type=n.JSXSyntax.JSXEmptyExpression}return e}();t.JSXEmptyExpression=a;var o=function(){function e(e){this.type=n.JSXSyntax.JSXExpressionContainer,this.expression=e}return e}();t.JSXExpressionContainer=o;var u=function(){function e(e){this.type=n.JSXSyntax.JSXIdentifier,this.name=e}return e}();t.JSXIdentifier=u;var l=function(){function e(e,t){this.type=n.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}return e}();t.JSXMemberExpression=l;var c=function(){function e(e,t){this.type=n.JSXSyntax.JSXAttribute,this.name=e,this.value=t}return e}();t.JSXAttribute=c;var p=function(){function e(e,t){this.type=n.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}return e}();t.JSXNamespacedName=p;var h=function(){function e(e,t,r){this.type=n.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=r}return e}();t.JSXOpeningElement=h;var f=function(){function e(e){this.type=n.JSXSyntax.JSXSpreadAttribute,this.argument=e}return e}();t.JSXSpreadAttribute=f;var d=function(){function e(e,t){this.type=n.JSXSyntax.JSXText,this.value=e,this.raw=t}return e}();t.JSXText=d},function(e,t,r){"use strict";var n=r(8),i=r(6),s=r(7),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var r=this.values[this.paren-1];t="if"===r||"while"===r||"for"===r||"with"===r;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var n=this.values[this.curly-4];t=!!n&&!this.beforeFunctionExpression(n)}else if("function"===this.values[this.curly-4]){var i=this.values[this.curly-5];t=!i||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){e.type===s.Token.Punctuator||e.type===s.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),o=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new n.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;t=0,s=i&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)n.regeneratorRuntime=s;else try{delete n.regeneratorRuntime}catch(e){n.regeneratorRuntime=void 0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./runtime":577}],577:[function(e,t,r){(function(e,r){!function(r){"use strict";function n(e,t,r,n){var i=t&&t.prototype instanceof s?t:s,a=Object.create(i.prototype),o=new d(n||[]);return a._invoke=c(e,r,o),a}function i(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function s(){}function a(){}function o(){}function u(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function l(t){function r(e,n,s,a){var o=i(t[e],t,n);if("throw"!==o.type){var u=o.arg,l=u.value;return l&&"object"==typeof l&&v.call(l,"__await")?Promise.resolve(l.__await).then(function(e){r("next",e,s,a)},function(e){r("throw",e,s,a)}):Promise.resolve(l).then(function(e){u.value=e,s(u)},a)}a(o.arg)}function n(e,t){function n(){return new Promise(function(n,i){r(e,t,n,i)})}return s=s?s.then(n,n):n()}"object"==typeof e&&e.domain&&(r=e.domain.bind(r));var s;this._invoke=n}function c(e,t,r){var n=S;return function(s,a){if(n===w)throw new Error("Generator is already running");if(n===k){if("throw"===s)throw a;return y()}for(r.method=s,r.arg=a;;){var o=r.delegate;if(o){var u=p(o,r);if(u){if(u===F)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===S)throw n=k,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=w;var l=i(e,t,r);if("normal"===l.type){if(n=r.done?k:_,l.arg===F)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n=k,r.method="throw",r.arg=l.arg)}}}function p(e,t){var r=e.iterator[t.method];if(r===g){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=g,p(e,t),"throw"===t.method))return F;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return F}var n=i(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,F;var s=n.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=g),t.delegate=null,F):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,F)}function h(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(h,this),this.reset(!0)}function m(e){if(e){var t=e[E];if(t)return t.call(e);if("function"==typeof e.next)return e -;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r=0;--n){var i=this.tryEntries[n],s=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=v.call(i,"catchLoc"),o=v.call(i,"finallyLoc");if(a&&o){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&v.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),f(r),F}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;f(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:m(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=g),F}}}("object"==typeof r?r:"object"==typeof window?window:"object"==typeof self?self:this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:539}],578:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){h.default.ok(this instanceof s),d.assertIdentifier(e),this.nextTempId=0,this.contextId=e,this.listing=[],this.marked=[!0],this.finalLoc=a(),this.tryEntries=[],this.leapManager=new y.LeapManager(this)}function a(){return d.numericLiteral(-1)}function o(e){return new Error("all declarations should have been transformed into assignments before the Exploder began its work: "+(0,c.default)(e))}function u(e){var t=e.type;return"normal"===t?!E.call(e,"target"):"break"===t||"continue"===t?!E.call(e,"value")&&d.isLiteral(e.target):("return"===t||"throw"===t)&&(E.call(e,"value")&&!E.call(e,"target"))}var l=e("babel-runtime/core-js/json/stringify"),c=i(l),p=e("assert"),h=i(p),f=e("babel-types"),d=n(f),m=e("./leap"),y=n(m),g=e("./meta"),b=n(g),v=e("./util"),x=n(v),E=Object.prototype.hasOwnProperty,A=s.prototype;r.Emitter=s,A.mark=function(e){d.assertLiteral(e);var t=this.listing.length;return-1===e.value?e.value=t:h.default.strictEqual(e.value,t),this.marked[t]=!0,e},A.emit=function(e){d.isExpression(e)&&(e=d.expressionStatement(e)),d.assertStatement(e),this.listing.push(e)},A.emitAssign=function(e,t){return this.emit(this.assign(e,t)),e},A.assign=function(e,t){return d.expressionStatement(d.assignmentExpression("=",e,t))},A.contextProperty=function(e,t){return d.memberExpression(this.contextId,t?d.stringLiteral(e):d.identifier(e),!!t)},A.stop=function(e){e&&this.setReturnValue(e),this.jump(this.finalLoc)},A.setReturnValue=function(e){d.assertExpression(e.value),this.emitAssign(this.contextProperty("rval"),this.explodeExpression(e))},A.clearPendingException=function(e,t){d.assertLiteral(e);var r=d.callExpression(this.contextProperty("catch",!0),[e]);t?this.emitAssign(t,r):this.emit(r)},A.jump=function(e){this.emitAssign(this.contextProperty("next"),e),this.emit(d.breakStatement())},A.jumpIf=function(e,t){d.assertExpression(e),d.assertLiteral(t),this.emit(d.ifStatement(e,d.blockStatement([this.assign(this.contextProperty("next"),t),d.breakStatement()])))},A.jumpIfNot=function(e,t){d.assertExpression(e),d.assertLiteral(t);var r=void 0;r=d.isUnaryExpression(e)&&"!"===e.operator?e.argument:d.unaryExpression("!",e),this.emit(d.ifStatement(r,d.blockStatement([this.assign(this.contextProperty("next"),t),d.breakStatement()])))},A.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)},A.getContextFunction=function(e){return d.functionExpression(e||null,[this.contextId],d.blockStatement([this.getDispatchLoop()]),!1,!1)},A.getDispatchLoop=function(){var e=this,t=[],r=void 0,n=!1;return e.listing.forEach(function(i,s){e.marked.hasOwnProperty(s)&&(t.push(d.switchCase(d.numericLiteral(s),r=[])),n=!1),n||(r.push(i),d.isCompletionStatement(i)&&(n=!0))}),this.finalLoc.value=this.listing.length,t.push(d.switchCase(this.finalLoc,[]),d.switchCase(d.stringLiteral("end"),[d.returnStatement(d.callExpression(this.contextProperty("stop"),[]))])),d.whileStatement(d.numericLiteral(1),d.switchStatement(d.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),t))},A.getTryLocsList=function(){if(0===this.tryEntries.length)return null;var e=0;return d.arrayExpression(this.tryEntries.map(function(t){var r=t.firstLoc.value;h.default.ok(r>=e,"try entries out of order"),e=r;var n=t.catchEntry,i=t.finallyEntry,s=[t.firstLoc,n?n.firstLoc:null];return i&&(s[2]=i.firstLoc,s[3]=i.afterLoc),d.arrayExpression(s)}))},A.explode=function(e,t){var r=e.node,n=this;if(d.assertNode(r),d.isDeclaration(r))throw o(r);if(d.isStatement(r))return n.explodeStatement(e);if(d.isExpression(r))return n.explodeExpression(e,t);switch(r.type){case"Program":return e.get("body").map(n.explodeStatement,n);case"VariableDeclarator":throw o(r);case"Property":case"SwitchCase":case"CatchClause":throw new Error(r.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+(0,c.default)(r.type))}},A.explodeStatement=function(e,t){var r=e.node,n=this,i=void 0,s=void 0,o=void 0;if(d.assertStatement(r),t?d.assertIdentifier(t):t=null,d.isBlockStatement(r))return void e.get("body").forEach(function(e){n.explodeStatement(e)});if(!b.containsLeap(r))return void n.emit(r);switch(r.type){case"ExpressionStatement":n.explodeExpression(e.get("expression"),!0);break;case"LabeledStatement":s=a(),n.leapManager.withEntry(new y.LabeledEntry(s,r.label),function(){n.explodeStatement(e.get("body"),r.label)}),n.mark(s);break;case"WhileStatement":i=a(),s=a(),n.mark(i),n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new y.LoopEntry(s,i,t),function(){n.explodeStatement(e.get("body"))}),n.jump(i),n.mark(s);break;case"DoWhileStatement":var u=a(),l=a();s=a(),n.mark(u),n.leapManager.withEntry(new y.LoopEntry(s,l,t),function(){n.explode(e.get("body"))}),n.mark(l),n.jumpIf(n.explodeExpression(e.get("test")),u),n.mark(s);break;case"ForStatement":o=a();var p=a();s=a(),r.init&&n.explode(e.get("init"),!0),n.mark(o),r.test&&n.jumpIfNot(n.explodeExpression(e.get("test")),s),n.leapManager.withEntry(new y.LoopEntry(s,p,t),function(){n.explodeStatement(e.get("body"))}),n.mark(p),r.update&&n.explode(e.get("update"),!0),n.jump(o),n.mark(s);break;case"TypeCastExpression":return n.explodeExpression(e.get("expression"));case"ForInStatement":o=a(),s=a();var f=n.makeTempVar();n.emitAssign(f,d.callExpression(x.runtimeProperty("keys"),[n.explodeExpression(e.get("right"))])),n.mark(o);var m=n.makeTempVar();n.jumpIf(d.memberExpression(d.assignmentExpression("=",m,d.callExpression(f,[])),d.identifier("done"),!1),s),n.emitAssign(r.left,d.memberExpression(m,d.identifier("value"),!1)),n.leapManager.withEntry(new y.LoopEntry(s,o,t),function(){n.explodeStatement(e.get("body"))}),n.jump(o),n.mark(s);break;case"BreakStatement":n.emitAbruptCompletion({type:"break",target:n.leapManager.getBreakLoc(r.label)});break;case"ContinueStatement":n.emitAbruptCompletion({type:"continue",target:n.leapManager.getContinueLoc(r.label)});break;case"SwitchStatement":var g=n.emitAssign(n.makeTempVar(),n.explodeExpression(e.get("discriminant")));s=a();for(var v=a(),E=v,A=[],C=r.cases||[],S=C.length-1;S>=0;--S){var _=C[S];d.assertSwitchCase(_),_.test?E=d.conditionalExpression(d.binaryExpression("===",g,_.test),A[S]=a(),E):A[S]=v}var w=e.get("discriminant");w.replaceWith(E),n.jump(n.explodeExpression(w)),n.leapManager.withEntry(new y.SwitchEntry(s),function(){e.get("cases").forEach(function(e){var t=e.key;n.mark(A[t]),e.get("consequent").forEach(function(e){n.explodeStatement(e)})})}),n.mark(s),-1===v.value&&(n.mark(v),h.default.strictEqual(s.value,v.value));break;case"IfStatement":var k=r.alternate&&a();s=a(),n.jumpIfNot(n.explodeExpression(e.get("test")),k||s),n.explodeStatement(e.get("consequent")),k&&(n.jump(s),n.mark(k),n.explodeStatement(e.get("alternate"))),n.mark(s);break;case"ReturnStatement":n.emitAbruptCompletion({type:"return",value:n.explodeExpression(e.get("argument"))});break;case"WithStatement":throw new Error("WithStatement not supported in generator functions.");case"TryStatement":s=a();var F=r.handler,T=F&&a(),P=T&&new y.CatchEntry(T,F.param),B=r.finalizer&&a(),O=B&&new y.FinallyEntry(B,s),j=new y.TryEntry(n.getUnmarkedCurrentLoc(),P,O);n.tryEntries.push(j),n.updateContextPrevLoc(j.firstLoc),n.leapManager.withEntry(j,function(){if(n.explodeStatement(e.get("block")),T){B?n.jump(B):n.jump(s),n.updateContextPrevLoc(n.mark(T));var t=e.get("handler.body"),r=n.makeTempVar();n.clearPendingException(j.firstLoc,r),t.traverse(D,{safeParam:r,catchParamName:F.param.name}),n.leapManager.withEntry(P,function(){n.explodeStatement(t)})}B&&(n.updateContextPrevLoc(n.mark(B)),n.leapManager.withEntry(O,function(){n.explodeStatement(e.get("finalizer"))}),n.emit(d.returnStatement(d.callExpression(n.contextProperty("finish"),[O.firstLoc]))))}),n.mark(s);break;case"ThrowStatement":n.emit(d.throwStatement(n.explodeExpression(e.get("argument"))));break;default:throw new Error("unknown Statement of type "+(0,c.default)(r.type))}};var D={Identifier:function(e,t){e.node.name===t.catchParamName&&x.isReference(e)&&e.replaceWith(t.safeParam)},Scope:function(e,t){e.scope.hasOwnBinding(t.catchParamName)&&e.skip()}};A.emitAbruptCompletion=function(e){u(e)||h.default.ok(!1,"invalid completion record: "+(0,c.default)(e)),h.default.notStrictEqual(e.type,"normal","normal completions are not abrupt");var t=[d.stringLiteral(e.type)];"break"===e.type||"continue"===e.type?(d.assertLiteral(e.target),t[1]=e.target):"return"!==e.type&&"throw"!==e.type||e.value&&(d.assertExpression(e.value),t[1]=e.value),this.emit(d.returnStatement(d.callExpression(this.contextProperty("abrupt"),t)))},A.getUnmarkedCurrentLoc=function(){return d.numericLiteral(this.listing.length)},A.updateContextPrevLoc=function(e){e?(d.assertLiteral(e),-1===e.value?e.value=this.listing.length:h.default.strictEqual(e.value,this.listing.length)):e=this.getUnmarkedCurrentLoc(),this.emitAssign(this.contextProperty("prev"),e)},A.explodeExpression=function(e,t){function r(e){if(d.assertExpression(e),!t)return e;s.emit(e)}function n(e,t,r){h.default.ok(!r||!e,"Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?");var n=s.explodeExpression(t,r);return r||(e||l&&!d.isLiteral(n))&&(n=s.emitAssign(e||s.makeTempVar(),n)),n}var i=e.node;if(!i)return i;d.assertExpression(i);var s=this,o=void 0,u=void 0;if(!b.containsLeap(i))return r(i);var l=b.containsLeap.onlyChildren(i);switch(i.type){case"MemberExpression":return r(d.memberExpression(s.explodeExpression(e.get("object")),i.computed?n(null,e.get("property")):i.property,i.computed));case"CallExpression":var p=e.get("callee"),f=e.get("arguments"),m=void 0,y=[],g=!1;if(f.forEach(function(e){g=g||b.containsLeap(e.node)}),d.isMemberExpression(p.node))if(g){var v=n(s.makeTempVar(),p.get("object")),x=p.node.computed?n(null,p.get("property")):p.node.property;y.unshift(v),m=d.memberExpression(d.memberExpression(v,x,p.node.computed),d.identifier("call"),!1)}else m=s.explodeExpression(p);else m=n(null,p),d.isMemberExpression(m)&&(m=d.sequenceExpression([d.numericLiteral(0),m]));return f.forEach(function(e){y.push(n(null,e))}),r(d.callExpression(m,y));case"NewExpression":return r(d.newExpression(n(null,e.get("callee")),e.get("arguments").map(function(e){return n(null,e)})));case"ObjectExpression":return r(d.objectExpression(e.get("properties").map(function(e){return e.isObjectProperty()?d.objectProperty(e.node.key,n(null,e.get("value")),e.node.computed):e.node})));case"ArrayExpression":return r(d.arrayExpression(e.get("elements").map(function(e){return n(null,e)})));case"SequenceExpression":var E=i.expressions.length-1;return e.get("expressions").forEach(function(e){e.key===E?o=s.explodeExpression(e,t):s.explodeExpression(e,!0)}),o;case"LogicalExpression":u=a(),t||(o=s.makeTempVar());var A=n(o,e.get("left"));return"&&"===i.operator?s.jumpIfNot(A,u):(h.default.strictEqual(i.operator,"||"),s.jumpIf(A,u)),n(o,e.get("right"),t),s.mark(u),o;case"ConditionalExpression":var D=a();u=a();var C=s.explodeExpression(e.get("test"));return s.jumpIfNot(C,D),t||(o=s.makeTempVar()),n(o,e.get("consequent"),t),s.jump(u),s.mark(D),n(o,e.get("alternate"),t),s.mark(u),o;case"UnaryExpression":return r(d.unaryExpression(i.operator,s.explodeExpression(e.get("argument")),!!i.prefix));case"BinaryExpression":return r(d.binaryExpression(i.operator,n(null,e.get("left")),n(null,e.get("right"))));case"AssignmentExpression":return r(d.assignmentExpression(i.operator,s.explodeExpression(e.get("left")),s.explodeExpression(e.get("right"))));case"UpdateExpression":return r(d.updateExpression(i.operator,s.explodeExpression(e.get("argument")),i.prefix));case"YieldExpression":u=a();var S=i.argument&&s.explodeExpression(e.get("argument"));if(S&&i.delegate){var _=s.makeTempVar();return s.emit(d.returnStatement(d.callExpression(s.contextProperty("delegateYield"),[S,d.stringLiteral(_.property.name),u]))),s.mark(u),_}return s.emitAssign(s.contextProperty("next"),u),s.emit(d.returnStatement(S||null)),s.mark(u),s.contextProperty("sent");default:throw new Error("unknown Expression of type "+(0,c.default)(i.type))}}},{"./leap":581,"./meta":582,"./util":584,assert:3,"babel-runtime/core-js/json/stringify":114,"babel-types":169}],579:[function(e,t,r){"use strict";var n=e("babel-runtime/core-js/object/keys"),i=function(e){return e&&e.__esModule?e:{default:e}}(n),s=e("babel-types"),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(s),o=Object.prototype.hasOwnProperty;r.hoist=function(e){function t(e,t){a.assertVariableDeclaration(e);var n=[];return e.declarations.forEach(function(e){r[e.id.name]=a.identifier(e.id.name),e.init?n.push(a.assignmentExpression("=",e.id,e.init)):t&&n.push(e.id)}),0===n.length?null:1===n.length?n[0]:a.sequenceExpression(n)}a.assertFunction(e.node);var r={};e.get("body").traverse({VariableDeclaration:{exit:function(e){var r=t(e.node,!1);null===r?e.remove():e.replaceWith(a.expressionStatement(r)),e.skip()}},ForStatement:function(e){var r=e.node.init;a.isVariableDeclaration(r)&&e.get("init").replaceWith(t(r,!1))},ForXStatement:function(e){var r=e.get("left");r.isVariableDeclaration()&&r.replaceWith(t(r.node,!0))},FunctionDeclaration:function(e){var t=e.node;r[t.id.name]=t.id;var n=a.expressionStatement(a.assignmentExpression("=",t.id,a.functionExpression(t.id,t.params,t.body,t.generator,t.expression)));e.parentPath.isBlockStatement()?(e.parentPath.unshiftContainer("body",n),e.remove()):e.replaceWith(n),e.skip()},FunctionExpression:function(e){e.skip()}});var n={};e.get("params").forEach(function(e){var t=e.node;a.isIdentifier(t)&&(n[t.name]=t)});var s=[];return(0,i.default)(r).forEach(function(e){o.call(n,e)||s.push(a.variableDeclarator(r[e],null))}),0===s.length?null:a.variableDeclaration("var",s)}},{"babel-runtime/core-js/object/keys":120,"babel-types":169}],580:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(){return e("./visit")}},{"./visit":585}],581:[function(e,t,r){"use strict";function n(){f.default.ok(this instanceof n)}function i(e){n.call(this),m.assertLiteral(e),this.returnLoc=e}function s(e,t,r){n.call(this),m.assertLiteral(e),m.assertLiteral(t),r?m.assertIdentifier(r):r=null,this.breakLoc=e,this.continueLoc=t,this.label=r}function a(e){n.call(this),m.assertLiteral(e),this.breakLoc=e}function o(e,t,r){n.call(this),m.assertLiteral(e),t?f.default.ok(t instanceof u):t=null,r?f.default.ok(r instanceof l):r=null,f.default.ok(t||r),this.firstLoc=e,this.catchEntry=t,this.finallyEntry=r}function u(e,t){n.call(this),m.assertLiteral(e),m.assertIdentifier(t),this.firstLoc=e,this.paramId=t}function l(e,t){n.call(this),m.assertLiteral(e),m.assertLiteral(t),this.firstLoc=e,this.afterLoc=t}function c(e,t){n.call(this),m.assertLiteral(e),m.assertIdentifier(t),this.breakLoc=e,this.label=t}function p(t){f.default.ok(this instanceof p);var r=e("./emit").Emitter;f.default.ok(t instanceof r),this.emitter=t,this.entryStack=[new i(t.finalLoc)]}var h=e("assert"),f=function(e){return e&&e.__esModule?e:{default:e}}(h),d=e("babel-types"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(d),y=e("util");(0,y.inherits)(i,n),r.FunctionEntry=i,(0,y.inherits)(s,n),r.LoopEntry=s,(0,y.inherits)(a,n),r.SwitchEntry=a,(0,y.inherits)(o,n),r.TryEntry=o,(0,y.inherits)(u,n),r.CatchEntry=u,(0,y.inherits)(l,n),r.FinallyEntry=l,(0,y.inherits)(c,n),r.LabeledEntry=c;var g=p.prototype;r.LeapManager=p,g.withEntry=function(e,t){f.default.ok(e instanceof n),this.entryStack.push(e);try{t.call(this.emitter)}finally{var r=this.entryStack.pop();f.default.strictEqual(r,e)}},g._findLeapLocation=function(e,t){for(var r=this.entryStack.length-1;r>=0;--r){var n=this.entryStack[r],i=n[e];if(i)if(t){if(n.label&&n.label.name===t.name)return i}else if(!(n instanceof c))return i}return null},g.getBreakLoc=function(e){return this._findLeapLocation("breakLoc",e)},g.getContinueLoc=function(e){return this._findLeapLocation("continueLoc",e)}},{"./emit":578,assert:3,"babel-types":169,util:601}],582:[function(e,t,r){"use strict";function n(e,t){function r(e){function t(e){return r||(Array.isArray(e)?e.some(t):o.isNode(e)&&(s.default.strictEqual(r,!1),r=n(e))),r}o.assertNode(e);var r=!1,i=o.VISITOR_KEYS[e.type];if(i)for(var a=0;a0&&(a.node.body=l);var c=s(e);p.assertIdentifier(r.id);var d=p.identifier(r.id.name+"$"),y=(0,h.hoist)(e);if(o(e,i)){y=y||p.variableDeclaration("var",[]);var b=p.identifier("arguments");b._shadowedFunctionLiteral=e,y.declarations.push(p.variableDeclarator(i,b))}var v=new f.Emitter(n);v.explode(e.get("body")),y&&y.declarations.length>0&&u.push(y);var A=[v.getContextFunction(d),r.generator?c:p.nullLiteral(),p.thisExpression()],D=v.getTryLocsList();D&&A.push(D);var C=p.callExpression(g.runtimeProperty(r.async?"async":"wrap"),A);u.push(p.returnStatement(C)),r.body=p.blockStatement(u);var S=a.node.directives;S&&(r.body.directives=S);var _=r.generator;_&&(r.generator=!1),r.async&&(r.async=!1),_&&p.isExpression(r)&&e.replaceWith(p.callExpression(g.runtimeProperty("mark"),[r])),e.requeue()}}};var v={"FunctionExpression|FunctionDeclaration":function(e){e.skip()},Identifier:function(e,t){"arguments"===e.node.name&&g.isReference(e)&&(e.replaceWith(t.argsId),t.didRenameArguments=!0)}},x={MetaProperty:function(e){var t=e.node;"function"===t.meta.name&&"sent"===t.property.name&&e.replaceWith(p.memberExpression(this.context,p.identifier("_sent")))}},E={Function:function(e){e.skip()},AwaitExpression:function(e){var t=e.node.argument;e.replaceWith(p.yieldExpression(p.callExpression(g.runtimeProperty("awrap"),[t]),!1))}}},{"./emit":578,"./hoist":579,"./replaceShorthandObjectMethod":583,"./util":584,assert:3,"babel-types":169,private:537}],586:[function(e,t,r){var n=(e("assert"),e("recast").types),i=n.namedTypes,s=n.builders,a=Object.prototype.hasOwnProperty;r.defaults=function(e){for(var t,r=arguments.length,n=1;n>=1);return r}},{"is-finite":309}],589:[function(e,t,r){"use strict";t.exports=function(e){var t=/^\\\\\?\\/.test(e),r=/[^\x00-\x80]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}},{}],590:[function(e,t,r){function n(){i.call(this)}t.exports=n;var i=e("events").EventEmitter;e("inherits")(n,i),n.Readable=e("readable-stream/readable.js"),n.Writable=e("readable-stream/writable.js"),n.Duplex=e("readable-stream/duplex.js"),n.Transform=e("readable-stream/transform.js"),n.PassThrough=e("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(e,t){function r(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()}function n(){l.readable&&l.resume&&l.resume()}function s(){c||(c=!0,e.end())}function a(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function o(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){l.removeListener("data",r),e.removeListener("drain",n),l.removeListener("end",s),l.removeListener("close",a),l.removeListener("error",o),e.removeListener("error",o),l.removeListener("end",u),l.removeListener("close",u),e.removeListener("close",u)}var l=this;l.on("data",r),e.on("drain",n),e._isStdio||t&&!1===t.end||(l.on("end",s),l.on("close",a));var c=!1;return l.on("error",o),e.on("error",o),l.on("end",u),l.on("close",u),e.on("close",u),e.emit("pipe",l),e}},{events:301,inherits:306,"readable-stream/duplex.js":540,"readable-stream/passthrough.js":547,"readable-stream/readable.js":548,"readable-stream/transform.js":549,"readable-stream/writable.js":550}],591:[function(e,t,r){function n(e){if(e&&!u(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function s(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var o=e("buffer").Buffer,u=o.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},l=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new o(6),this.charReceived=0,this.charLength=0};l.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,n=t.charCodeAt(i);if(n>=55296&&n<=56319){var s=this.surrogateSize;return this.charLength+=s,this.charReceived+=s,this.charBuffer.copy(this.charBuffer,s,0,s),e.copy(this.charBuffer,0,0,s),t.substring(0,i)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:184}],592:[function(e,t,r){"use strict";var n=e("ansi-regex")();t.exports=function(e){return"string"==typeof e?e.replace(n,""):e}},{"ansi-regex":1}], -593:[function(e,t,r){(function(e){"use strict";var r=e.argv,n=r.indexOf("--"),i=function(e){e="--"+e;var t=r.indexOf(e);return-1!==t&&(-1===n||t=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),E(n.showHidden)&&(n.showHidden=!1),E(n.depth)&&(n.depth=2),E(n.colors)&&(n.colors=!1),E(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=s),u(n,e,n.depth)}function s(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function a(e,t){return e}function o(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function u(e,t,n){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return v(i)||(i=u(e,i,n)),i}var s=l(e,t);if(s)return s;var a=Object.keys(t),m=o(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(t)),S(t)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(t);if(0===a.length){if(_(t)){var y=t.name?": "+t.name:"";return e.stylize("[Function"+y+"]","special")}if(A(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(C(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return c(t)}var g="",b=!1,x=["{","}"];if(d(t)&&(b=!0,x=["[","]"]),_(t)){g=" [Function"+(t.name?": "+t.name:"")+"]"}if(A(t)&&(g=" "+RegExp.prototype.toString.call(t)),C(t)&&(g=" "+Date.prototype.toUTCString.call(t)),S(t)&&(g=" "+c(t)),0===a.length&&(!b||0==t.length))return x[0]+g+x[1];if(n<0)return A(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var E;return E=b?p(e,t,n,m,a):a.map(function(r){return h(e,t,n,m,r,b)}),e.seen.pop(),f(E,g,x)}function l(e,t){if(E(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i){for(var s=[],a=0,o=t.length;a-1&&(o=s?o.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+o.split("\n").map(function(e){return" "+e}).join("\n"))):o=e.stylize("[Circular]","special")),E(a)){if(s&&i.match(/^\d+$/))return o;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+o}function f(e,t,r){var n=0;return e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return null==e}function b(e){return"number"==typeof e}function v(e){return"string"==typeof e}function x(e){return"symbol"==typeof e}function E(e){return void 0===e}function A(e){return D(e)&&"[object RegExp]"===k(e)}function D(e){return"object"==typeof e&&null!==e}function C(e){return D(e)&&"[object Date]"===k(e)}function S(e){return D(e)&&("[object Error]"===k(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e}function k(e){return Object.prototype.toString.call(e)}function F(e){return e<10?"0"+e.toString(10):e.toString(10)}function T(){var e=new Date,t=[F(e.getHours()),F(e.getMinutes()),F(e.getSeconds())].join(":");return[e.getDate(),j[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.format=function(e){if(!v(e)){for(var t=[],r=0;r=s)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),o=n[r];r<]/g}},{}],2:[function(e,t,r){"use strict";function n(){var e={modifiers:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},colors:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39]},bgColors:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49]}};return e.colors.grey=e.colors.gray,Object.keys(e).forEach(function(t){var r=e[t];Object.keys(r).forEach(function(t){var n=r[t];e[t]=r[t]={open:"["+n[0]+"m",close:"["+n[1]+"m"}}),Object.defineProperty(e,t,{value:r,enumerable:!1})}),e}Object.defineProperty(t,"exports",{enumerable:!0,get:n})},{}],3:[function(e,t,r){(function(r){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i=0;o--)if(u[o]!==l[o])return!1;for(o=u.length-1;o>=0;o--)if(a=u[o],!f(e[a],t[a],r,n))return!1;return!0}function y(e,t,r){f(e,t,!0)&&p(e,t,r,"notDeepStrictEqual",y)}function g(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function b(e){var t;try{e()}catch(e){t=e}return t}function v(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=b(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&p(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!e&&x.isError(i),o=!e&&i&&!r;if((a&&s&&g(i,r)||o)&&p(i,r,"Got unwanted exception"+n),e&&i&&r&&!g(i,r)||!e&&i)throw i}var x=e("util/"),E=Object.prototype.hasOwnProperty,A=Array.prototype.slice,D=function(){return"foo"===function(){}.name}(),C=t.exports=h,S=/\s*function\s+([^\(\s]*)\s*/;C.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=c(this),this.generatedMessage=!0);var t=e.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=o(t),s=n.indexOf("\n"+i);if(s>=0){var a=n.indexOf("\n",s+1);n=n.substring(a+1)}this.stack=n}}},x.inherits(C.AssertionError,Error),C.fail=p,C.ok=h,C.equal=function(e,t,r){e!=t&&p(e,t,r,"==",C.equal)},C.notEqual=function(e,t,r){e==t&&p(e,t,r,"!=",C.notEqual)},C.deepEqual=function(e,t,r){f(e,t,!1)||p(e,t,r,"deepEqual",C.deepEqual)},C.deepStrictEqual=function(e,t,r){f(e,t,!0)||p(e,t,r,"deepStrictEqual",C.deepStrictEqual)},C.notDeepEqual=function(e,t,r){f(e,t,!1)&&p(e,t,r,"notDeepEqual",C.notDeepEqual)},C.notDeepStrictEqual=y,C.strictEqual=function(e,t,r){e!==t&&p(e,t,r,"===",C.strictEqual)},C.notStrictEqual=function(e,t,r){e===t&&p(e,t,r,"!==",C.notStrictEqual)},C.throws=function(e,t,r){v(!0,e,t,r)},C.doesNotThrow=function(e,t,r){v(!1,e,t,r)},C.ifError=function(e){if(e)throw e};var _=Object.keys||function(e){var t=[];for(var r in e)E.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":602}],4:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Noop").bases("Node").build(),i("DoExpression").bases("Expression").build("body").field("body",[i("Statement")]),i("Super").bases("Expression").build(),i("BindExpression").bases("Expression").build("object","callee").field("object",s(i("Expression"),null)).field("callee",i("Expression")),i("Decorator").bases("Node").build("expression").field("expression",i("Expression")),i("Property").field("decorators",s([i("Decorator")],null),n.null),i("MethodDefinition").field("decorators",s([i("Decorator")],null),n.null),i("MetaProperty").bases("Expression").build("meta","property").field("meta",i("Identifier")).field("property",i("Identifier")),i("ParenthesizedExpression").bases("Expression").build("expression").field("expression",i("Expression")),i("ImportSpecifier").bases("ModuleSpecifier").build("imported","local").field("imported",i("Identifier")),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("local"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("local"),i("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",s(i("Declaration"),i("Expression"))),i("ExportNamedDeclaration").bases("Declaration").build("declaration","specifiers","source").field("declaration",s(i("Declaration"),null)).field("specifiers",[i("ExportSpecifier")],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ExportSpecifier").bases("ModuleSpecifier").build("local","exported").field("exported",i("Identifier")),i("ExportNamespaceSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportDefaultSpecifier").bases("Specifier").build("exported").field("exported",i("Identifier")),i("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",s(i("Identifier"),null)).field("source",i("Literal")),i("CommentBlock").bases("Comment").build("value","leading","trailing"),i("CommentLine").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],5:[function(e,t,r){t.exports=function(t){t.use(e("./babel")),t.use(e("./flow"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("Directive").bases("Node").build("value").field("value",i("DirectiveLiteral")),i("DirectiveLiteral").bases("Node","Expression").build("value").field("value",String,n["use strict"]),i("BlockStatement").bases("Statement").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("Program").bases("Node").build("body").field("body",[i("Statement")]).field("directives",[i("Directive")],n.emptyArray),i("StringLiteral").bases("Literal").build("value").field("value",String),i("NumericLiteral").bases("Literal").build("value").field("value",Number),i("NullLiteral").bases("Literal").build(),i("BooleanLiteral").bases("Literal").build("value").field("value",Boolean),i("RegExpLiteral").bases("Literal").build("pattern","flags").field("pattern",String).field("flags",String);var a=s(i("Property"),i("ObjectMethod"),i("ObjectProperty"),i("SpreadProperty"));i("ObjectExpression").bases("Expression").build("properties").field("properties",[a]),i("ObjectMethod").bases("Node","Function").build("kind","key","params","body","computed").field("kind",s("method","get","set")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null),i("ObjectProperty").bases("Node").build("key","value").field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("value",s(i("Expression"),i("Pattern"))).field("computed",Boolean,n.false);var o=s(i("MethodDefinition"),i("VariableDeclarator"),i("ClassPropertyDefinition"),i("ClassProperty"),i("ClassMethod"));i("ClassBody").bases("Declaration").build("body").field("body",[o]),i("ClassMethod").bases("Declaration","Function").build("kind","key","params","body","computed","static").field("kind",s("get","set","method","constructor")).field("key",s(i("Literal"),i("Identifier"),i("Expression"))).field("params",[i("Pattern")]).field("body",i("BlockStatement")).field("computed",Boolean,n.false).field("static",Boolean,n.false).field("generator",Boolean,n.false).field("async",Boolean,n.false).field("decorators",s([i("Decorator")],null),n.null);var u=s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"),i("ObjectProperty"),i("RestProperty"));i("ObjectPattern").bases("Pattern").build("properties").field("properties",[u]).field("decorators",s([i("Decorator")],null),n.null),i("SpreadProperty").bases("Node").build("argument").field("argument",i("Expression")),i("RestProperty").bases("Node").build("argument").field("argument",i("Expression")),i("ForAwaitStatement").bases("Statement").build("left","right","body").field("left",s(i("VariableDeclaration"),i("Expression"))).field("right",i("Expression")).field("body",i("Statement")),i("Import").bases("Expression").build()}},{"../lib/shared":20,"../lib/types":21,"./babel":4,"./flow":11}],6:[function(e,t,r){t.exports=function(t){var r=t.use(e("../lib/types")).Type,n=r.def,i=r.or,s=t.use(e("../lib/shared")),a=s.defaults,o=s.geq;n("Printable").field("loc",i(n("SourceLocation"),null),a.null,!0),n("Node").bases("Printable").field("type",String).field("comments",i([n("Comment")],null),a.null,!0),n("SourceLocation").build("start","end","source").field("start",n("Position")).field("end",n("Position")).field("source",i(String,null),a.null),n("Position").build("line","column").field("line",o(1)).field("column",o(0)),n("File").bases("Node").build("program","name").field("program",n("Program")).field("name",i(String,null),a.null),n("Program").bases("Node").build("body").field("body",[n("Statement")]),n("Function").bases("Node").field("id",i(n("Identifier"),null),a.null).field("params",[n("Pattern")]).field("body",n("BlockStatement")),n("Statement").bases("Node"),n("EmptyStatement").bases("Statement").build(),n("BlockStatement").bases("Statement").build("body").field("body",[n("Statement")]),n("ExpressionStatement").bases("Statement").build("expression").field("expression",n("Expression")),n("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Statement")).field("alternate",i(n("Statement"),null),a.null),n("LabeledStatement").bases("Statement").build("label","body").field("label",n("Identifier")).field("body",n("Statement")),n("BreakStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),a.null),n("ContinueStatement").bases("Statement").build("label").field("label",i(n("Identifier"),null),a.null),n("WithStatement").bases("Statement").build("object","body").field("object",n("Expression")).field("body",n("Statement")),n("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",n("Expression")).field("cases",[n("SwitchCase")]).field("lexical",Boolean,a.false),n("ReturnStatement").bases("Statement").build("argument").field("argument",i(n("Expression"),null)),n("ThrowStatement").bases("Statement").build("argument").field("argument",n("Expression")),n("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",n("BlockStatement")).field("handler",i(n("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[n("CatchClause")],function(){return this.handler?[this.handler]:[]},!0).field("guardedHandlers",[n("CatchClause")],a.emptyArray).field("finalizer",i(n("BlockStatement"),null),a.null),n("CatchClause").bases("Node").build("param","guard","body").field("param",n("Pattern")).field("guard",i(n("Expression"),null),a.null).field("body",n("BlockStatement")),n("WhileStatement").bases("Statement").build("test","body").field("test",n("Expression")).field("body",n("Statement")),n("DoWhileStatement").bases("Statement").build("body","test").field("body",n("Statement")).field("test",n("Expression")),n("ForStatement").bases("Statement").build("init","test","update","body").field("init",i(n("VariableDeclaration"),n("Expression"),null)).field("test",i(n("Expression"),null)).field("update",i(n("Expression"),null)).field("body",n("Statement")),n("ForInStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("DebuggerStatement").bases("Statement").build(),n("Declaration").bases("Statement"),n("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",n("Identifier")),n("FunctionExpression").bases("Function","Expression").build("id","params","body"),n("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",i("var","let","const")).field("declarations",[n("VariableDeclarator")]),n("VariableDeclarator").bases("Node").build("id","init").field("id",n("Pattern")).field("init",i(n("Expression"),null)),n("Expression").bases("Node","Pattern"),n("ThisExpression").bases("Expression").build(),n("ArrayExpression").bases("Expression").build("elements").field("elements",[i(n("Expression"),null)]),n("ObjectExpression").bases("Expression").build("properties").field("properties",[n("Property")]),n("Property").bases("Node").build("kind","key","value").field("kind",i("init","get","set")).field("key",i(n("Literal"),n("Identifier"))).field("value",n("Expression")),n("SequenceExpression").bases("Expression").build("expressions").field("expressions",[n("Expression")]);var u=i("-","+","!","~","typeof","void","delete");n("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",u).field("argument",n("Expression")).field("prefix",Boolean,a.true);var l=i("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");n("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",l).field("left",n("Expression")).field("right",n("Expression"));var c=i("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");n("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",c).field("left",n("Pattern")).field("right",n("Expression"));var p=i("++","--");n("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",p).field("argument",n("Expression")).field("prefix",Boolean);var h=i("||","&&");n("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",h).field("left",n("Expression")).field("right",n("Expression")),n("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",n("Expression")).field("consequent",n("Expression")).field("alternate",n("Expression")),n("NewExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("CallExpression").bases("Expression").build("callee","arguments").field("callee",n("Expression")).field("arguments",[n("Expression")]),n("MemberExpression").bases("Expression").build("object","property","computed").field("object",n("Expression")).field("property",i(n("Identifier"),n("Expression"))).field("computed",Boolean,function(){var e=this.property.type;return"Literal"===e||"MemberExpression"===e||"BinaryExpression"===e}),n("Pattern").bases("Node"),n("SwitchCase").bases("Node").build("test","consequent").field("test",i(n("Expression"),null)).field("consequent",[n("Statement")]),n("Identifier").bases("Node","Expression","Pattern").build("name").field("name",String),n("Literal").bases("Node","Expression").build("value").field("value",i(String,Boolean,null,Number,RegExp)).field("regex",i({pattern:String,flags:String},null),function(){if(this.value instanceof RegExp){var e="";return this.value.ignoreCase&&(e+="i"),this.value.multiline&&(e+="m"),this.value.global&&(e+="g"),{pattern:this.value.source,flags:e}}return null}),n("Comment").bases("Printable").field("value",String).field("leading",Boolean,a.true).field("trailing",Boolean,a.false)}},{"../lib/shared":20,"../lib/types":21}],7:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or;n("XMLDefaultDeclaration").bases("Declaration").field("namespace",n("Expression")),n("XMLAnyName").bases("Expression"),n("XMLQualifiedIdentifier").bases("Expression").field("left",i(n("Identifier"),n("XMLAnyName"))).field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",i(n("Identifier"),n("Expression"))).field("computed",Boolean),n("XMLAttributeSelector").bases("Expression").field("attribute",n("Expression")),n("XMLFilterExpression").bases("Expression").field("left",n("Expression")).field("right",n("Expression")),n("XMLElement").bases("XML","Expression").field("contents",[n("XML")]),n("XMLList").bases("XML","Expression").field("contents",[n("XML")]),n("XML").bases("Node"),n("XMLEscape").bases("XML").field("expression",n("Expression")),n("XMLText").bases("XML").field("text",String),n("XMLStartTag").bases("XML").field("contents",[n("XML")]),n("XMLEndTag").bases("XML").field("contents",[n("XML")]),n("XMLPointTag").bases("XML").field("contents",[n("XML")]),n("XMLName").bases("XML").field("contents",i(String,[n("XML")])),n("XMLAttribute").bases("XML").field("value",String),n("XMLCdata").bases("XML").field("contents",String),n("XMLComment").bases("XML").field("contents",String),n("XMLProcessingInstruction").bases("XML").field("target",String).field("contents",i(String,null))}},{"../lib/types":21,"./core":6}],8:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Function").field("generator",Boolean,s.false).field("expression",Boolean,s.false).field("defaults",[i(n("Expression"),null)],s.emptyArray).field("rest",i(n("Identifier"),null),s.null),n("RestElement").bases("Pattern").build("argument").field("argument",n("Pattern")),n("SpreadElementPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("FunctionDeclaration").build("id","params","body","generator","expression"),n("FunctionExpression").build("id","params","body","generator","expression"),n("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,s.null).field("body",i(n("BlockStatement"),n("Expression"))).field("generator",!1,s.false),n("YieldExpression").bases("Expression").build("argument","delegate").field("argument",i(n("Expression"),null)).field("delegate",Boolean,s.false),n("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",n("Expression")).field("blocks",[n("ComprehensionBlock")]).field("filter",i(n("Expression"),null)),n("ComprehensionBlock").bases("Node").build("left","right","each").field("left",n("Pattern")).field("right",n("Expression")).field("each",Boolean),n("Property").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",i(n("Expression"),n("Pattern"))).field("method",Boolean,s.false).field("shorthand",Boolean,s.false).field("computed",Boolean,s.false),n("PropertyPattern").bases("Pattern").build("key","pattern").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("pattern",n("Pattern")).field("computed",Boolean,s.false),n("ObjectPattern").bases("Pattern").build("properties").field("properties",[i(n("PropertyPattern"),n("Property"))]),n("ArrayPattern").bases("Pattern").build("elements").field("elements",[i(n("Pattern"),null)]),n("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",i("constructor","method","get","set")).field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("value",n("Function")).field("computed",Boolean,s.false).field("static",Boolean,s.false),n("SpreadElement").bases("Node").build("argument").field("argument",n("Expression")),n("ArrayExpression").field("elements",[i(n("Expression"),n("SpreadElement"),n("RestElement"),null)]),n("NewExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("CallExpression").field("arguments",[i(n("Expression"),n("SpreadElement"))]),n("AssignmentPattern").bases("Pattern").build("left","right").field("left",n("Pattern")).field("right",n("Expression"));var a=i(n("MethodDefinition"),n("VariableDeclarator"),n("ClassPropertyDefinition"),n("ClassProperty"));n("ClassProperty").bases("Declaration").build("key").field("key",i(n("Literal"),n("Identifier"),n("Expression"))).field("computed",Boolean,s.false),n("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",a),n("ClassBody").bases("Declaration").build("body").field("body",[a]),n("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",i(n("Identifier"),null)).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null),n("ClassExpression").bases("Expression").build("id","body","superClass").field("id",i(n("Identifier"),null),s.null).field("body",n("ClassBody")).field("superClass",i(n("Expression"),null),s.null).field("implements",[n("ClassImplements")],s.emptyArray),n("ClassImplements").bases("Node").build("id").field("id",n("Identifier")).field("superClass",i(n("Expression"),null),s.null),n("Specifier").bases("Node"),n("ModuleSpecifier").bases("Specifier").field("local",i(n("Identifier"),null),s.null).field("id",i(n("Identifier"),null),s.null).field("name",i(n("Identifier"),null),s.null),n("TaggedTemplateExpression").bases("Expression").build("tag","quasi").field("tag",n("Expression")).field("quasi",n("TemplateLiteral")),n("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[n("TemplateElement")]).field("expressions",[n("Expression")]),n("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:String,raw:String}).field("tail",Boolean)}},{"../lib/shared":20,"../lib/types":21,"./core":6}],9:[function(e,t,r){t.exports=function(t){t.use(e("./es6"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=(r.builtInTypes,t.use(e("../lib/shared")).defaults);n("Function").field("async",Boolean,s.false),n("SpreadProperty").bases("Node").build("argument").field("argument",n("Expression")),n("ObjectExpression").field("properties",[i(n("Property"),n("SpreadProperty"))]),n("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",n("Pattern")),n("ObjectPattern").field("properties",[i(n("Property"),n("PropertyPattern"),n("SpreadPropertyPattern"))]),n("AwaitExpression").bases("Expression").build("argument","all").field("argument",i(n("Expression"),null)).field("all",Boolean,s.false)}},{"../lib/shared":20,"../lib/types":21,"./es6":8}],10:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=t.use(e("../lib/shared")).defaults,i=r.Type.def,s=r.Type.or;i("VariableDeclaration").field("declarations",[s(i("VariableDeclarator"),i("Identifier"))]),i("Property").field("value",s(i("Expression"),i("Pattern"))),i("ArrayPattern").field("elements",[s(i("Pattern"),i("SpreadElement"),null)]),i("ObjectPattern").field("properties",[s(i("Property"),i("PropertyPattern"),i("SpreadPropertyPattern"),i("SpreadProperty"))]),i("ExportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ExportBatchSpecifier").bases("Specifier").build(),i("ImportSpecifier").bases("ModuleSpecifier").build("id","name"),i("ImportNamespaceSpecifier").bases("ModuleSpecifier").build("id"),i("ImportDefaultSpecifier").bases("ModuleSpecifier").build("id"),i("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",s(i("Declaration"),i("Expression"),null)).field("specifiers",[s(i("ExportSpecifier"),i("ExportBatchSpecifier"))],n.emptyArray).field("source",s(i("Literal"),null),n.null),i("ImportDeclaration").bases("Declaration").build("specifiers","source","importKind").field("specifiers",[s(i("ImportSpecifier"),i("ImportNamespaceSpecifier"),i("ImportDefaultSpecifier"))],n.emptyArray).field("source",i("Literal")).field("importKind",s("value","type"),function(){return"value"}),i("Block").bases("Comment").build("value","leading","trailing"),i("Line").bases("Comment").build("value","leading","trailing")}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],11:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("Type").bases("Node"),n("AnyTypeAnnotation").bases("Type").build(),n("EmptyTypeAnnotation").bases("Type").build(),n("MixedTypeAnnotation").bases("Type").build(),n("VoidTypeAnnotation").bases("Type").build(),n("NumberTypeAnnotation").bases("Type").build(),n("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("NumericLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Number).field("raw",String),n("StringTypeAnnotation").bases("Type").build(),n("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",String).field("raw",String),n("BooleanTypeAnnotation").bases("Type").build(),n("BooleanLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",Boolean).field("raw",String),n("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",n("Type")),n("NullLiteralTypeAnnotation").bases("Type").build(),n("NullTypeAnnotation").bases("Type").build(),n("ThisTypeAnnotation").bases("Type").build(),n("ExistsTypeAnnotation").bases("Type").build(),n("ExistentialTypeParam").bases("Type").build(),n("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[n("FunctionTypeParam")]).field("returnType",n("Type")).field("rest",i(n("FunctionTypeParam"),null)).field("typeParameters",i(n("TypeParameterDeclaration"),null)),n("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",n("Identifier")).field("typeAnnotation",n("Type")).field("optional",Boolean),n("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",n("Type")),n("ObjectTypeAnnotation").bases("Type").build("properties","indexers","callProperties").field("properties",[n("ObjectTypeProperty")]).field("indexers",[n("ObjectTypeIndexer")],s.emptyArray).field("callProperties",[n("ObjectTypeCallProperty")],s.emptyArray).field("exact",Boolean,s.false),n("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",i(n("Literal"),n("Identifier"))).field("value",n("Type")).field("optional",Boolean).field("variance",i("plus","minus",null),s.null),n("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",n("Identifier")).field("key",n("Type")).field("value",n("Type")).field("variance",i("plus","minus",null),s.null),n("ObjectTypeCallProperty").bases("Node").build("value").field("value",n("FunctionTypeAnnotation")).field("static",Boolean,s.false),n("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("id",n("Identifier")),n("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",i(n("Identifier"),n("QualifiedTypeIdentifier"))).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("MemberTypeAnnotation").bases("Type").build("object","property").field("object",n("Identifier")).field("property",i(n("MemberTypeAnnotation"),n("GenericTypeAnnotation"))),n("UnionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",n("Type")),n("Identifier").field("typeAnnotation",i(n("TypeAnnotation"),null),s.null),n("TypeParameterDeclaration").bases("Node").build("params").field("params",[n("TypeParameter")]),n("TypeParameterInstantiation").bases("Node").build("params").field("params",[n("Type")]),n("TypeParameter").bases("Type").build("name","variance","bound").field("name",String).field("variance",i("plus","minus",null),s.null).field("bound",i(n("TypeAnnotation"),null),s.null),n("Function").field("returnType",i(n("TypeAnnotation"),null),s.null).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null),n("ClassProperty").build("key","value","typeAnnotation","static").field("value",i(n("Expression"),null)).field("typeAnnotation",i(n("TypeAnnotation"),null)).field("static",Boolean,s.false).field("variance",i("plus","minus",null),s.null),n("ClassImplements").field("typeParameters",i(n("TypeParameterInstantiation"),null),s.null),n("InterfaceDeclaration").bases("Declaration").build("id","body","extends").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null),s.null).field("body",n("ObjectTypeAnnotation")).field("extends",[n("InterfaceExtends")]),n("DeclareInterface").bases("InterfaceDeclaration").build("id","body","extends"),n("InterfaceExtends").bases("Node").build("id").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterInstantiation"),null)),n("TypeAlias").bases("Declaration").build("id","typeParameters","right").field("id",n("Identifier")).field("typeParameters",i(n("TypeParameterDeclaration"),null)).field("right",n("Type")),n("DeclareTypeAlias").bases("TypeAlias").build("id","typeParameters","right"),n("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",n("Expression")).field("typeAnnotation",n("TypeAnnotation")),n("TupleTypeAnnotation").bases("Type").build("types").field("types",[n("Type")]),n("DeclareVariable").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareFunction").bases("Statement").build("id").field("id",n("Identifier")),n("DeclareClass").bases("InterfaceDeclaration").build("id"),n("DeclareModule").bases("Statement").build("id","body").field("id",i(n("Identifier"),n("Literal"))).field("body",n("BlockStatement")),n("DeclareModuleExports").bases("Statement").build("typeAnnotation").field("typeAnnotation",n("Type")),n("DeclareExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",Boolean).field("declaration",i(n("DeclareVariable"),n("DeclareFunction"),n("DeclareClass"),n("Type"),null)).field("specifiers",[i(n("ExportSpecifier"),n("ExportBatchSpecifier"))],s.emptyArray).field("source",i(n("Literal"),null),s.null),n("DeclareExportAllDeclaration").bases("Declaration").build("source").field("source",i(n("Literal"),null),s.null)}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],12:[function(e,t,r){t.exports=function(t){t.use(e("./es7"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")).defaults;n("JSXAttribute").bases("Node").build("name","value").field("name",i(n("JSXIdentifier"),n("JSXNamespacedName"))).field("value",i(n("Literal"),n("JSXExpressionContainer"),null),s.null),n("JSXIdentifier").bases("Identifier").build("name").field("name",String),n("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",n("JSXIdentifier")).field("name",n("JSXIdentifier")),n("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",i(n("JSXIdentifier"),n("JSXMemberExpression"))).field("property",n("JSXIdentifier")).field("computed",Boolean,s.false);var a=i(n("JSXIdentifier"),n("JSXNamespacedName"),n("JSXMemberExpression"));n("JSXSpreadAttribute").bases("Node").build("argument").field("argument",n("Expression"));var o=[i(n("JSXAttribute"),n("JSXSpreadAttribute"))];n("JSXExpressionContainer").bases("Expression").build("expression").field("expression",n("Expression")),n("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",n("JSXOpeningElement")).field("closingElement",i(n("JSXClosingElement"),null),s.null).field("children",[i(n("JSXElement"),n("JSXExpressionContainer"),n("JSXText"),n("Literal"))],s.emptyArray).field("name",a,function(){return this.openingElement.name},!0).field("selfClosing",Boolean,function(){return this.openingElement.selfClosing},!0).field("attributes",o,function(){return this.openingElement.attributes},!0),n("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",a).field("attributes",o,s.emptyArray).field("selfClosing",Boolean,s.false),n("JSXClosingElement").bases("Node").build("name").field("name",a),n("JSXText").bases("Literal").build("value").field("value",String),n("JSXEmptyExpression").bases("Expression").build()}},{"../lib/shared":20,"../lib/types":21,"./es7":9}],13:[function(e,t,r){t.exports=function(t){t.use(e("./core"));var r=t.use(e("../lib/types")),n=r.Type.def,i=r.Type.or,s=t.use(e("../lib/shared")),a=s.geq,o=s.defaults;n("Function").field("body",i(n("BlockStatement"),n("Expression"))),n("ForInStatement").build("left","right","body","each").field("each",Boolean,o.false),n("ForOfStatement").bases("Statement").build("left","right","body").field("left",i(n("VariableDeclaration"),n("Expression"))).field("right",n("Expression")).field("body",n("Statement")),n("LetStatement").bases("Statement").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Statement")),n("LetExpression").bases("Expression").build("head","body").field("head",[n("VariableDeclarator")]).field("body",n("Expression")),n("GraphExpression").bases("Expression").build("index","expression").field("index",a(0)).field("expression",n("Literal")),n("GraphIndexExpression").bases("Expression").build("index").field("index",a(0))}},{"../lib/shared":20,"../lib/types":21,"./core":6}],14:[function(e,t,r){t.exports=function(t){function r(e){var t=n.indexOf(e);return-1===t&&(t=n.length,n.push(e),i[t]=e(s)),i[t]}var n=[],i=[],s={};s.use=r;var a=r(e("./lib/types"));t.forEach(r),a.finalize();var o={Type:a.Type,builtInTypes:a.builtInTypes,namedTypes:a.namedTypes,builders:a.builders,defineMethod:a.defineMethod,getFieldNames:a.getFieldNames,getFieldValue:a.getFieldValue,eachField:a.eachField,someField:a.someField,getSupertypeNames:a.getSupertypeNames,astNodesAreEquivalent:r(e("./lib/equiv")),finalize:a.finalize,Path:r(e("./lib/path")),NodePath:r(e("./lib/node-path")),PathVisitor:r(e("./lib/path-visitor")),use:r};return o.visit=o.PathVisitor.visit,o}},{"./lib/equiv":15,"./lib/node-path":16,"./lib/path":18,"./lib/path-visitor":17,"./lib/types":21}],15:[function(e,t,r){t.exports=function(t){function r(e,t,r){return c.check(r)?r.length=0:r=null,i(e,t,r)}function n(e){return/[_$a-z][_$a-z0-9]*/i.test(e)?"."+e:"["+JSON.stringify(e)+"]"}function i(e,t,r){return e===t||(c.check(e)?s(e,t,r):p.check(e)?a(e,t,r):h.check(e)?h.check(t)&&+e==+t:f.check(e)?f.check(t)&&e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.ignoreCase===t.ignoreCase:e==t)}function s(e,t,r){c.assert(e);var n=e.length;if(!c.check(t)||t.length!==n)return r&&r.push("length"),!1;for(var s=0;so)return!0;if(s===o&&"right"===this.name){if(r.right!==t)throw new Error("Nodes must be equal");return!0}default:return!1}case"SequenceExpression":switch(r.type){case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==this.name;default:return!0}case"YieldExpression":switch(r.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return!0;default:return!1}case"Literal":return"MemberExpression"===r.type&&p.check(t.value)&&"object"===this.name&&r.object===t;case"AssignmentExpression":case"ConditionalExpression":switch(r.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return!0;case"CallExpression":return"callee"===this.name&&r.callee===t;case"ConditionalExpression":return"test"===this.name&&r.test===t;case"MemberExpression":return"object"===this.name&&r.object===t;default:return!1}default:if("NewExpression"===r.type&&"callee"===this.name&&r.callee===t)return i(t)}return!(!0===e||this.canBeFirstInStatement()||!this.firstInStatement())};var y={};return[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(e,t){e.forEach(function(e){y[e]=t})}),m.canBeFirstInStatement=function(){var e=this.node;return!l.FunctionExpression.check(e)&&!l.ObjectExpression.check(e)},m.firstInStatement=function(){return s(this)},r}},{"./path":18,"./scope":19,"./types":21}],17:[function(e,t,r){var n=Object.prototype.hasOwnProperty;t.exports=function(t){function r(){if(!(this instanceof r))throw new Error("PathVisitor constructor cannot be invoked without 'new'");this._reusableContextStack=[],this._methodNameTable=i(this),this._shouldVisitComments=n.call(this._methodNameTable,"Block")||n.call(this._methodNameTable,"Line"),this.Context=o(this),this._visiting=!1,this._changeReported=!1}function i(e){var t=Object.create(null);for(var r in e)/^visit[A-Z]/.test(r)&&(t[r.slice("visit".length)]=!0);for(var n=u.computeSupertypeLookupTable(t),i=Object.create(null),s=(t=Object.keys(n)).length,a=0;a=0&&(s[e.name=a]=e)}else i[e.name]=e.value,s[e.name]=e;if(i[e.name]!==e.value)throw new Error("");if(e.parentPath.get(e.name)!==e)throw new Error("");return e}var l=t.use(e("./types")),c=l.builtInTypes.array,p=l.builtInTypes.number,h=r.prototype;return h.getValueProperty=function(e){return this.value[e]},h.get=function(e){for(var t=this,r=arguments,n=r.length,i=0;i=e},a+" >= "+e)},r.defaults={null:function(){return null},emptyArray:function(){return[]},false:function(){return!1},true:function(){return!0},undefined:function(){}};var o=i.or(s.string,s.number,s.boolean,s.null,s.undefined);return r.isPrimitive=new i(function(e){if(null===e)return!0;var t=typeof e;return!("object"===t||"function"===t)},o.toString()),r}},{"../lib/types":21}],21:[function(e,t,r){var n=Array.prototype,i=n.slice,s=(n.map,n.forEach,Object.prototype),a=s.toString,o=a.call(function(){}),u=a.call(""),l=s.hasOwnProperty;t.exports=function(){function e(t,r){var n=this;if(!(n instanceof e))throw new Error("Type constructor cannot be invoked without 'new'");if(a.call(t)!==o)throw new Error(t+" is not a function");var i=a.call(r);if(i!==o&&i!==u)throw new Error(r+" is neither a function nor a string");Object.defineProperties(n,{name:{value:r},check:{value:function(e,r){var i=t.call(n,e,r);return!i&&r&&a.call(r)===o&&r(n,e),i}}})}function t(e){return _.check(e)?"{"+Object.keys(e).map(function(t){return t+": "+e[t]}).join(", ")+"}":S.check(e)?"["+e.map(t).join(", ")+"]":JSON.stringify(e)}function r(t,r){var n=a.call(t),i=new e(function(e){return a.call(e)===n},r);return A[r]=i,t&&"function"==typeof t.constructor&&(x.push(t.constructor),E.push(i)),i}function n(t,r){if(t instanceof e)return t;if(t instanceof c)return t.type;if(S.check(t))return e.fromArray(t);if(_.check(t))return e.fromObject(t);if(C.check(t)){var n=x.indexOf(t);return n>=0?E[n]:new e(t,r)}return new e(function(e){return e===t},k.check(r)?function(){return t+""}:r)}function s(e,t,r,i){var a=this;if(!(a instanceof s))throw new Error("Field constructor cannot be invoked without 'new'");D.assert(e);var o={name:{value:e},type:{value:t=n(t)},hidden:{value:!!i}};C.check(r)&&(o.defaultFn={value:r}),Object.defineProperties(a,o)}function c(t){var r=this;if(!(r instanceof c))throw new Error("Def constructor cannot be invoked without 'new'");Object.defineProperties(r,{typeName:{value:t},baseNames:{value:[]},ownFields:{value:Object.create(null)},allSupertypes:{value:Object.create(null)},supertypeList:{value:[]},allFields:{value:Object.create(null)},fieldNames:{value:[]},type:{value:new e(function(e,t){return r.check(e,t)},t)}})}function p(e){return e.replace(/^[A-Z]+/,function(e){var t=e.length;switch(t){case 0:return"";case 1:return e.toLowerCase();default:return e.slice(0,t-1).toLowerCase()+e.charAt(t-1)}})}function h(e){return(e=p(e)).replace(/(Expression)?$/,"Statement")}function f(e){var t=c.fromValue(e);if(t)return t.fieldNames.slice(0);if("type"in e)throw new Error("did not recognize object of type "+JSON.stringify(e.type));return Object.keys(e)}function d(e,t){var r=c.fromValue(e);if(r){var n=r.allFields[t];if(n)return n.getValue(e)}return e&&e[t]}function m(e){var t=h(e);if(!B[t]){var r=B[p(e)];r&&(B[t]=function(){return B.expressionStatement(r.apply(B,arguments))})}}function y(e,t){t.length=0,t.push(e);for(var r=Object.create(null),n=0;n=0&&m(e.typeName)}},b.finalize=function(){Object.keys(T).forEach(function(e){T[e].finalize()})},b}},{}],22:[function(e,t,r){t.exports=e("./fork")([e("./def/core"),e("./def/es6"),e("./def/es7"),e("./def/mozilla"),e("./def/e4x"),e("./def/jsx"),e("./def/flow"),e("./def/esprima"),e("./def/babel"),e("./def/babel6")])},{"./def/babel":4,"./def/babel6":5,"./def/core":6,"./def/e4x":7,"./def/es6":8,"./def/es7":9,"./def/esprima":10,"./def/flow":11,"./def/jsx":12,"./def/mozilla":13,"./fork":14}],23:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return{keyword:e.cyan,capitalized:e.yellow,jsx_tag:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.grey,invalid:e.white.bgRed.bold,gutter:e.grey,marker:e.red.bold}}function s(e){var t=e.slice(-2),r=t[0],n=t[1],i=(0,o.matchToToken)(e);if("name"===i.type){if(l.default.keyword.isReservedWordES6(i.value))return"keyword";if(h.test(i.value)&&("<"===n[r-1]||"3&&void 0!==arguments[3]?arguments[3]:{};r=Math.max(r,0);var s=n.highlightCode&&c.default.supportsColor||n.forceColor,o=c.default;n.forceColor&&(o=new c.default.constructor({enabled:!0}));var u=function(e,t){return s?e(t):t},l=i(o);s&&(e=a(l,e));var h=n.linesAbove||2,f=n.linesBelow||3,d=e.split(p),m=Math.max(t-(h+1),0),y=Math.min(d.length,t+f);t||r||(m=0,y=d.length);var g=String(y).length,b=d.slice(m,y).map(function(e,n){var i=m+1+n,s=" "+(" "+i).slice(-g)+" | ";if(i===t){var a="";if(r){var o=e.slice(0,r-1).replace(/[^\t]/g," ");a=["\n ",u(l.gutter,s.replace(/\d/g," ")),o,u(l.marker,"^")].join("")}return[u(l.marker,">"),u(l.gutter,s),e,a].join("")}return" "+u(l.gutter,s)+e}).join("\n");return s?o.reset(b):b};var o=e("js-tokens"),u=n(o),l=n(e("esutils")),c=n(e("chalk")),p=/\r\n|[\n\r\u2028\u2029]/,h=/^[a-z][\w-]*$/i,f=/^[()\[\]{}]$/;t.exports=r.default},{chalk:184,esutils:27,"js-tokens":310}],24:[function(e,t,r){!function(){"use strict";function e(e){if(null==e)return!1;switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1}function r(e){if(null==e)return!1;switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1}function n(e){if(null==e)return!1;switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function i(e){return n(e)||null!=e&&"FunctionDeclaration"===e.type}function s(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}function a(e){var t;if("IfStatement"!==e.type)return!1;if(null==e.alternate)return!1;t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0;t=s(t)}while(t);return!1}t.exports={isExpression:e,isStatement:n,isIterationStatement:r,isSourceElement:i,isProblematicIfStatement:a,trailingStatement:s}}()},{}],25:[function(e,t,r){!function(){"use strict";function e(e){return 48<=e&&e<=57}function r(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70}function n(e){return e>=48&&e<=55}function i(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&f.indexOf(e)>=0}function s(e){return 10===e||13===e||8232===e||8233===e}function a(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}function o(e){return e<128?d[e]:h.NonAsciiIdentifierStart.test(a(e))}function u(e){return e<128?m[e]:h.NonAsciiIdentifierPart.test(a(e))}function l(e){return e<128?d[e]:p.NonAsciiIdentifierStart.test(a(e))}function c(e){return e<128?m[e]:p.NonAsciiIdentifierPart.test(a(e))}var p,h,f,d,m,y;for(h={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},p={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},f=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],d=new Array(128),y=0;y<128;++y)d[y]=y>=97&&y<=122||y>=65&&y<=90||36===y||95===y;for(m=new Array(128),y=0;y<128;++y)m[y]=y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||36===y||95===y;t.exports={isDecimalDigit:e,isHexDigit:r,isOctalDigit:n,isWhiteSpace:i,isLineTerminator:s,isIdentifierStartES5:o,isIdentifierPartES5:u,isIdentifierStartES6:l,isIdentifierPartES6:c}}()},{}],26:[function(e,t,r){!function(){"use strict";function r(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return!0;default:return!1}}function n(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,t){if(t&&r(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function s(e,t){return"null"===e||"true"===e||"false"===e||n(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function o(e){return"eval"===e||"arguments"===e}function u(e){var t,r,n;if(0===e.length)return!1;if(n=e.charCodeAt(0),!f.isIdentifierStartES5(n))return!1;for(t=1,r=e.length;t=r)return!1;if(!(56320<=(i=e.charCodeAt(t))&&i<=57343))return!1;n=l(n,i)}if(!s(n))return!1;s=f.isIdentifierPartES6}return!0}function p(e,t){return u(e)&&!s(e,t)}function h(e,t){return c(e)&&!a(e,t)}var f=e("./code");t.exports={isKeywordES5:n,isKeywordES6:i,isReservedWordES5:s,isReservedWordES6:a,isRestrictedWord:o,isIdentifierNameES5:u,isIdentifierNameES6:c,isIdentifierES5:p,isIdentifierES6:h}}()},{"./code":25}],27:[function(e,t,r){!function(){"use strict";r.ast=e("./ast"),r.code=e("./code"),r.keyword=e("./keyword")}()},{"./ast":24,"./code":25,"./keyword":26}],28:[function(e,t,r){t.exports=e("./lib/api/node.js")},{"./lib/api/node.js":29}],29:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){throw new Error("The ("+e+") Babel 5 plugin is being run with Babel 6.")}function a(e,t,r){"function"==typeof t&&(r=t,t={}),t.filename=e,m.default.readFile(e,function(e,n){var i=void 0;if(!e)try{i=D(n,t)}catch(t){e=t}e?r(e):r(null,i)})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.filename=e,D(m.default.readFileSync(e,"utf8"),t)}r.__esModule=!0,r.transformFromAst=r.transform=r.analyse=r.Pipeline=r.OptionManager=r.traverse=r.types=r.messages=r.util=r.version=r.resolvePreset=r.resolvePlugin=r.template=r.buildExternalHelpers=r.options=r.File=void 0;var u=e("../transformation/file");Object.defineProperty(r,"File",{enumerable:!0,get:function(){return i(u).default}});var l=e("../transformation/file/options/config");Object.defineProperty(r,"options",{enumerable:!0,get:function(){return i(l).default}});var c=e("../tools/build-external-helpers");Object.defineProperty(r,"buildExternalHelpers",{enumerable:!0,get:function(){return i(c).default}});var p=e("babel-template");Object.defineProperty(r,"template",{enumerable:!0,get:function(){return i(p).default}});var h=e("../helpers/resolve-plugin");Object.defineProperty(r,"resolvePlugin",{enumerable:!0,get:function(){return i(h).default}});var f=e("../helpers/resolve-preset");Object.defineProperty(r,"resolvePreset",{enumerable:!0,get:function(){return i(f).default}});var d=e("../../package");Object.defineProperty(r,"version",{enumerable:!0,get:function(){return d.version}}),r.Plugin=s,r.transformFile=a,r.transformFileSync=o;var m=i(e("fs")),y=n(e("../util")),g=n(e("babel-messages")),b=n(e("babel-types")),v=i(e("babel-traverse")),x=i(e("../transformation/file/options/option-manager")),E=i(e("../transformation/pipeline"));r.util=y,r.messages=g,r.types=b,r.traverse=v.default,r.OptionManager=x.default,r.Pipeline=E.default;var A=new E.default,D=(r.analyse=A.analyse.bind(A),r.transform=A.transform.bind(A));r.transformFromAst=A.transformFromAst.bind(A)},{"../../package":66,"../helpers/resolve-plugin":35,"../helpers/resolve-preset":36,"../tools/build-external-helpers":39,"../transformation/file":40,"../transformation/file/options/config":44,"../transformation/file/options/option-manager":46,"../transformation/pipeline":51,"../util":54,"babel-messages":103,"babel-template":132,"babel-traverse":136,"babel-types":169,fs:182}],30:[function(e,t,r){"use strict";function n(e){return["babel-plugin-"+e,e]}r.__esModule=!0,r.default=n,t.exports=r.default},{}],31:[function(e,t,r){"use strict";function n(e){var t=["babel-preset-"+e,e],r=e.match(/^(@[^/]+)\/(.+)$/);if(r){var n=r[1],i=r[2];t.push(n+"/babel-preset-"+i)}return t}r.__esModule=!0,r.default=n,t.exports=r.default},{}],32:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator"));r.default=function(e,t){if(e&&t)return(0,s.default)(e,t,function(e,t){if(t&&Array.isArray(e)){for(var r=t.slice(0),n=e,s=Array.isArray(n),a=0,n=s?n:(0,i.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;r.indexOf(u)<0&&r.push(u)}return r}})};var s=n(e("lodash/mergeWith"));t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"lodash/mergeWith":515}],33:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t,r){if(e){if("Program"===e.type)return n.file(e,t||[],r||[]);if("File"===e.type)return e}throw new Error("Not a valid ast?")};var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-types":169}],34:[function(e,t,r){"use strict";function n(e,t){return e.reduce(function(e,r){return e||(0,i.default)(r,t)},null)}r.__esModule=!0,r.default=n;var i=function(e){return e&&e.__esModule?e:{default:e}}(e("./resolve"));t.exports=r.default},{"./resolve":37}],35:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,a.default)((0,o.default)(e),t)}r.__esModule=!0,r.default=s;var a=i(e("./resolve-from-possible-names")),o=i(e("./get-possible-plugin-names"));t.exports=r.default}).call(this,e("_process"))},{"./get-possible-plugin-names":30,"./resolve-from-possible-names":34,_process:538}],36:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();return(0,a.default)((0,o.default)(e),t)}r.__esModule=!0,r.default=s;var a=i(e("./resolve-from-possible-names")),o=i(e("./get-possible-preset-names"));t.exports=r.default}).call(this,e("_process"))},{"./get-possible-preset-names":31,"./resolve-from-possible-names":34,_process:538}],37:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var s=i(e("babel-runtime/helpers/typeof"));r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.cwd();if("object"===(void 0===a.default?"undefined":(0,s.default)(a.default)))return null;var r=u[t];if(!r){r=new a.default;var i=o.default.join(t,".babelrc");r.id=i,r.filename=i,r.paths=a.default._nodeModulePaths(t),u[t]=r}try{return a.default._resolveFilename(e,r)}catch(e){return null}};var a=i(e("module")),o=i(e("path")),u={};t.exports=r.default}).call(this,e("_process"))},{_process:538,"babel-runtime/helpers/typeof":131,module:182,path:534}],38:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/map")),s=n(e("babel-runtime/helpers/classCallCheck")),a=n(e("babel-runtime/helpers/possibleConstructorReturn")),o=n(e("babel-runtime/helpers/inherits")),u=function(e){function t(){(0,s.default)(this,t);var r=(0,a.default)(this,e.call(this));return r.dynamicData={},r}return(0,o.default)(t,e),t.prototype.setDynamic=function(e,t){this.dynamicData[e]=t},t.prototype.get=function(t){if(this.has(t))return e.prototype.get.call(this,t);if(Object.prototype.hasOwnProperty.call(this.dynamicData,t)){var r=this.dynamicData[t]();return this.set(t,r),r}},t}(i.default);r.default=u,t.exports=r.default},{"babel-runtime/core-js/map":115,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130}],39:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e,t){var r=[],n=f.functionExpression(null,[f.identifier("global")],f.blockStatement(r)),i=f.program([f.expressionStatement(f.callExpression(n,[l.get("selfGlobal")]))]);return r.push(f.variableDeclaration("var",[f.variableDeclarator(e,f.assignmentExpression("=",f.memberExpression(f.identifier("global"),e),f.objectExpression([])))])),t(r),i}function a(e,t){var r=[];return r.push(f.variableDeclaration("var",[f.variableDeclarator(e,f.identifier("global"))])),t(r),f.program([d({FACTORY_PARAMETERS:f.identifier("global"),BROWSER_ARGUMENTS:f.assignmentExpression("=",f.memberExpression(f.identifier("root"),e),f.objectExpression([])),COMMON_ARGUMENTS:f.identifier("exports"),AMD_ARGUMENTS:f.arrayExpression([f.stringLiteral("exports")]),FACTORY_BODY:r,UMD_ROOT:f.identifier("this")})])}function o(e,t){var r=[];return r.push(f.variableDeclaration("var",[f.variableDeclarator(e,f.objectExpression([]))])),t(r),r.push(f.expressionStatement(e)),f.program(r)}function u(e,t,r){l.list.forEach(function(n){if(!(r&&r.indexOf(n)<0)){var i=f.identifier(n);e.push(f.expressionStatement(f.assignmentExpression("=",f.memberExpression(t,i),l.get(n))))}})}r.__esModule=!0,r.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"global",r=f.identifier("babelHelpers"),n=function(t){return u(t,r,e)},i=void 0,l={global:s,umd:a,var:o}[t];if(!l)throw new Error(p.get("unsupportedOutputType",t));return i=l(r,n),(0,c.default)(i).code};var l=i(e("babel-helpers")),c=n(e("babel-generator")),p=i(e("babel-messages")),h=n(e("babel-template")),f=i(e("babel-types")),d=(0,h.default)('\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n');t.exports=r.default},{"babel-generator":78,"babel-helpers":102,"babel-messages":103,"babel-template":132,"babel-types":169}],40:[function(e,t,r){(function(t){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0,r.File=void 0;var s=i(e("babel-runtime/core-js/get-iterator")),a=i(e("babel-runtime/core-js/object/create")),o=i(e("babel-runtime/core-js/object/assign")),u=i(e("babel-runtime/helpers/classCallCheck")),l=i(e("babel-runtime/helpers/possibleConstructorReturn")),c=i(e("babel-runtime/helpers/inherits")),p=i(e("babel-helpers")),h=n(e("./metadata")),f=i(e("convert-source-map")),d=i(e("./options/option-manager")),m=i(e("../plugin-pass")),y=e("babel-traverse"),g=i(y),b=i(e("source-map")),v=i(e("babel-generator")),x=i(e("babel-code-frame")),E=i(e("lodash/defaults")),A=i(e("./logger")),D=i(e("../../store")),C=e("babylon"),S=n(e("../../util")),_=i(e("path")),w=n(e("babel-types")),k=i(e("../../helpers/resolve")),F=i(e("../internal-plugins/block-hoist")),T=i(e("../internal-plugins/shadow-functions")),P=/^#!.*/,B=[[F.default],[T.default]],O={enter:function(e,t){var r=e.node.loc;r&&(t.loc=r,e.stop())}},j=function(r){function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];(0,u.default)(this,n);var i=(0,l.default)(this,r.call(this));return i.pipeline=t,i.log=new A.default(i,e.filename||"unknown"),i.opts=i.initOptions(e),i.parserOpts={sourceType:i.opts.sourceType,sourceFileName:i.opts.filename,plugins:[]},i.pluginVisitors=[],i.pluginPasses=[],i.buildPluginsForOptions(i.opts),i.opts.passPerPreset&&(i.perPresetOpts=[],i.opts.presets.forEach(function(e){var t=(0,o.default)((0,a.default)(i.opts),e);i.perPresetOpts.push(t),i.buildPluginsForOptions(t)})),i.metadata={usedHelpers:[],marked:[],modules:{imports:[],exports:{exported:[],specifiers:[]}}},i.dynamicImportTypes={},i.dynamicImportIds={},i.dynamicImports=[],i.declarations={},i.usedHelpers={},i.path=null,i.ast={},i.code="",i.shebang="",i.hub=new y.Hub(i),i}return(0,c.default)(n,r),n.prototype.getMetadata=function(){for(var e=!1,t=this.ast.program.body,r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var a=i;if(w.isModuleDeclaration(a)){e=!0;break}}e&&this.path.traverse(h,this)},n.prototype.initOptions=function(e){(e=new d.default(this.log,this.pipeline).init(e)).inputSourceMap&&(e.sourceMaps=!0),e.moduleId&&(e.moduleIds=!0),e.basename=_.default.basename(e.filename,_.default.extname(e.filename)),e.ignore=S.arrayify(e.ignore,S.regexify),e.only&&(e.only=S.arrayify(e.only,S.regexify)),(0,E.default)(e,{moduleRoot:e.sourceRoot}),(0,E.default)(e,{sourceRoot:e.moduleRoot}),(0,E.default)(e,{filenameRelative:e.filename});var t=_.default.basename(e.filenameRelative);return(0,E.default)(e,{sourceFileName:t,sourceMapTarget:t}),e},n.prototype.buildPluginsForOptions=function(e){if(Array.isArray(e.plugins)){for(var t=[],r=[],n=e.plugins.concat(B),i=Array.isArray(n),a=0,n=i?n:(0,s.default)(n);;){var o;if(i){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o,l=u[0],c=u[1];t.push(l.visitor),r.push(new m.default(this,l,c)),l.manipulateOptions&&l.manipulateOptions(e,this.parserOpts,this)}this.pluginVisitors.push(t),this.pluginPasses.push(r)}},n.prototype.getModuleName=function(){var e=this.opts;if(!e.moduleIds)return null;if(null!=e.moduleId&&!e.getModuleId)return e.moduleId;var t=e.filenameRelative,r="";if(null!=e.moduleRoot&&(r=e.moduleRoot+"/"),!e.filenameRelative)return r+e.filename.replace(/^\//,"");if(null!=e.sourceRoot){var n=new RegExp("^"+e.sourceRoot+"/?");t=t.replace(n,"")}return t=t.replace(/\.(\w*?)$/,""),r+=t,r=r.replace(/\\/g,"/"),e.getModuleId?e.getModuleId(r)||r:r},n.prototype.resolveModuleSource=function(e){var t=this.opts.resolveModuleSource;return t&&(e=t(e,this.opts.filename)),e},n.prototype.addImport=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=e+":"+t,i=this.dynamicImportIds[n];if(!i){e=this.resolveModuleSource(e),i=this.dynamicImportIds[n]=this.scope.generateUidIdentifier(r);var s=[];"*"===t?s.push(w.importNamespaceSpecifier(i)):"default"===t?s.push(w.importDefaultSpecifier(i)):s.push(w.importSpecifier(i,w.identifier(t)));var a=w.importDeclaration(s,w.stringLiteral(e));a._blockHoist=3,this.path.unshiftContainer("body",a)}return i},n.prototype.addHelper=function(e){var t=this.declarations[e];if(t)return t;this.usedHelpers[e]||(this.metadata.usedHelpers.push(e),this.usedHelpers[e]=!0);var r=this.get("helperGenerator"),n=this.get("helpersNamespace");if(r){var i=r(e);if(i)return i}else if(n)return w.memberExpression(n,w.identifier(e));var s=(0,p.default)(e),a=this.declarations[e]=this.scope.generateUidIdentifier(e);return w.isFunctionExpression(s)&&!s.id?(s.body._compact=!0,s._generated=!0,s.id=a,s.type="FunctionDeclaration",this.path.unshiftContainer("body",s)):(s._compact=!0,this.scope.push({id:a,init:s,unique:!0})),a},n.prototype.addTemplateObject=function(e,t,r){var n=r.elements.map(function(e){return e.value}),i=e+"_"+r.elements.length+"_"+n.join(","),s=this.declarations[i];if(s)return s;var a=this.declarations[i]=this.scope.generateUidIdentifier("templateObject"),o=this.addHelper(e),u=w.callExpression(o,[t,r]);return u._compact=!0,this.scope.push({id:a,init:u,_blockHoist:1.9}),a},n.prototype.buildCodeFrameError=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:SyntaxError,n=e&&(e.loc||e._loc),i=new r(t);return n?i.loc=n.start:((0,g.default)(e,O,this.scope,i),i.message+=" (This is an error on an internal node. Probably an internal error",i.loc&&(i.message+=". Location has been estimated."),i.message+=")"),i},n.prototype.mergeSourceMap=function(e){var t=this.opts.inputSourceMap;if(t){var r=new b.default.SourceMapConsumer(t),n=new b.default.SourceMapConsumer(e),i=new b.default.SourceMapGenerator({file:r.file,sourceRoot:r.sourceRoot}),s=n.sources[0];r.eachMapping(function(e){var t=n.generatedPositionFor({line:e.generatedLine,column:e.generatedColumn,source:s});null!=t.column&&i.addMapping({source:e.source,original:null==e.source?null:{line:e.originalLine,column:e.originalColumn},generated:t})});var a=i.toJSON();return t.mappings=a.mappings,t}return e},n.prototype.parse=function(r){var n=C.parse,i=this.opts.parserOpts;if(i&&(i=(0,o.default)({},this.parserOpts,i)).parser){if("string"==typeof i.parser){var s=_.default.dirname(this.opts.filename)||t.cwd(),a=(0,k.default)(i.parser,s);if(!a)throw new Error("Couldn't find parser "+i.parser+' with "parse" method relative to directory '+s);n=e(a).parse}else n=i.parser;i.parser={parse:function(e){return(0,C.parse)(e,i)}}}this.log.debug("Parse start");var u=n(r,i||this.parserOpts);return this.log.debug("Parse stop"),u},n.prototype._addAst=function(e){this.path=y.NodePath.get({hub:this.hub,parentPath:null,parent:e,container:e,key:"program"}).setContext(),this.scope=this.path.scope,this.ast=e,this.getMetadata()},n.prototype.addAst=function(e){this.log.debug("Start set AST"),this._addAst(e),this.log.debug("End set AST")},n.prototype.transform=function(){for(var e=0;e=r.length)break;a=r[i++]}else{if((i=r.next()).done)break;a=i.value}var o=a,u=o.plugin[e];u&&u.call(o,this)}},n.prototype.parseInputSourceMap=function(e){var t=this.opts;if(!1!==t.inputSourceMap){var r=f.default.fromSource(e);r&&(t.inputSourceMap=r.toObject(),e=f.default.removeComments(e))}return e},n.prototype.parseShebang=function(){var e=P.exec(this.code);e&&(this.shebang=e[0],this.code=this.code.replace(P,""))},n.prototype.makeResult=function(e){var t=e.code,r=e.map,n=e.ast,i=e.ignored,s={metadata:null,options:this.opts,ignored:!!i,code:null,ast:null,map:r||null};return this.opts.code&&(s.code=t),this.opts.ast&&(s.ast=n),this.opts.metadata&&(s.metadata=this.metadata),s},n.prototype.generate=function(){var r=this.opts,n=this.ast,i={ast:n};if(!r.code)return this.makeResult(i);var s=v.default;if(r.generatorOpts.generator&&"string"==typeof(s=r.generatorOpts.generator)){var a=_.default.dirname(this.opts.filename)||t.cwd(),u=(0,k.default)(s,a);if(!u)throw new Error("Couldn't find generator "+s+' with "print" method relative to directory '+a);s=e(u).print}this.log.debug("Generation start");var l=s(n,r.generatorOpts?(0,o.default)(r,r.generatorOpts):r,this.code);return i.code=l.code,i.map=l.map,this.log.debug("Generation end"),this.shebang&&(i.code=this.shebang+"\n"+i.code),i.map&&(i.map=this.mergeSourceMap(i.map)),"inline"!==r.sourceMaps&&"both"!==r.sourceMaps||(i.code+="\n"+f.default.fromObject(i.map).toComment()),"inline"===r.sourceMaps&&(i.map=null),this.makeResult(i)},n}(D.default);r.default=j,r.File=j}).call(this,e("_process"))},{"../../helpers/resolve":37,"../../store":38,"../../util":54,"../internal-plugins/block-hoist":49,"../internal-plugins/shadow-functions":50,"../plugin-pass":52,"./logger":41,"./metadata":42,"./options/option-manager":46,_process:538,"babel-code-frame":23,"babel-generator":78,"babel-helpers":102,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/object/assign":117,"babel-runtime/core-js/object/create":118,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"babel-traverse":136,"babel-types":169,babylon:177,"convert-source-map":186,"lodash/defaults":483,path:534,"source-map":65}],41:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("debug/node")),a=(0,s.default)("babel:verbose"),o=(0,s.default)("babel"),u=[],l=function(){function e(t,r){(0,i.default)(this,e),this.filename=r,this.file=t}return e.prototype._buildMessage=function(e){var t="[BABEL] "+this.filename;return e&&(t+=": "+e),t},e.prototype.warn=function(e){console.warn(this._buildMessage(e))},e.prototype.error=function(e){throw new(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Error)(this._buildMessage(e))},e.prototype.deprecate=function(e){this.file.opts&&this.file.opts.suppressDeprecationMessages||(e=this._buildMessage(e),u.indexOf(e)>=0||(u.push(e),console.error(e)))},e.prototype.verbose=function(e){a.enabled&&a(this._buildMessage(e))},e.prototype.debug=function(e){o.enabled&&o(this._buildMessage(e))},e.prototype.deopt=function(e,t){this.debug(t)},e}();r.default=l,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127,"debug/node":294}],42:[function(e,t,r){"use strict";function n(e,t){var r=e.node,n=r.source?r.source.value:null,i=t.metadata.modules.exports,o=e.get("declaration");if(o.isStatement()){var u=o.getBindingIdentifiers();for(var l in u)i.exported.push(l),i.specifiers.push({kind:"local",local:l,exported:e.isExportDefaultDeclaration()?"default":l})}if(e.isExportNamedDeclaration()&&r.specifiers)for(var c=r.specifiers,p=Array.isArray(c),h=0,c=p?c:(0,s.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f,m=d.exported.name;i.exported.push(m),a.isExportDefaultSpecifier(d)&&i.specifiers.push({kind:"external",local:m,exported:m,source:n}),a.isExportNamespaceSpecifier(d)&&i.specifiers.push({kind:"external-namespace",exported:m,source:n});var y=d.local;y&&(n&&i.specifiers.push({kind:"external",local:y.name,exported:m,source:n}),n||i.specifiers.push({kind:"local",local:y.name,exported:m}))}e.isExportAllDeclaration()&&i.specifiers.push({kind:"external-all",source:n})}function i(e){e.skip()}r.__esModule=!0,r.ImportDeclaration=r.ModuleDeclaration=void 0;var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.ExportDeclaration=n,r.Scope=i;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.ModuleDeclaration={enter:function(e,t){var r=e.node;r.source&&(r.source.value=t.resolveModuleSource(r.source.value))}},r.ImportDeclaration={exit:function(e,t){var r=e.node,n=[],i=[];t.metadata.modules.imports.push({source:r.source.value,imported:i,specifiers:n});for(var a=e.get("specifiers"),o=Array.isArray(a),u=0,a=o?a:(0,s.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l,p=c.node.local.name;if(c.isImportDefaultSpecifier()&&(i.push("default"),n.push({kind:"named",imported:"default",local:p})),c.isImportSpecifier()){var h=c.node.imported.name;i.push(h),n.push({kind:"named",imported:h,local:p})}c.isImportNamespaceSpecifier()&&(i.push("*"),n.push({kind:"namespace",local:p}))}}}},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],43:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function s(e){var t=d[e];return null==t?d[e]=f.default.existsSync(e):t}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],r=e.filename,n=new y(t);return!1!==e.babelrc&&n.findConfigs(r),n.mergeConfig({options:e,alias:"base",dirname:r&&h.default.dirname(r)}),n.configs}r.__esModule=!0;var o=i(e("babel-runtime/core-js/object/assign")),u=i(e("babel-runtime/helpers/classCallCheck"));r.default=a;var l=i(e("../../../helpers/resolve")),c=i(e("json5")),p=i(e("path-is-absolute")),h=i(e("path")),f=i(e("fs")),d={},m={},y=function(){function e(t){(0,u.default)(this,e),this.resolvedConfigs=[],this.configs=[],this.log=t}return e.prototype.findConfigs=function(e){if(e){(0,p.default)(e)||(e=h.default.join(n.cwd(),e));for(var t=!1,r=!1;e!==(e=h.default.dirname(e));){if(!t){var i=h.default.join(e,".babelrc");s(i)&&(this.addConfig(i),t=!0);var a=h.default.join(e,"package.json");!t&&s(a)&&(t=this.addConfig(a,"babel",JSON))}if(!r){var o=h.default.join(e,".babelignore");s(o)&&(this.addIgnoreConfig(o),r=!0)}if(r&&t)return}}},e.prototype.addIgnoreConfig=function(e){var t=f.default.readFileSync(e,"utf8").split("\n");(t=t.map(function(e){return e.replace(/#(.*?)$/,"").trim()}).filter(function(e){return!!e})).length&&this.mergeConfig({options:{ignore:t},alias:e,dirname:h.default.dirname(e)})},e.prototype.addConfig=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default;if(this.resolvedConfigs.indexOf(e)>=0)return!1;this.resolvedConfigs.push(e);var n=f.default.readFileSync(e,"utf8"),i=void 0;try{i=m[n]=m[n]||r.parse(n),t&&(i=i[t])}catch(t){throw t.message=e+": Error while parsing JSON - "+t.message,t}return this.mergeConfig({options:i,alias:e,dirname:h.default.dirname(e)}),!!i},e.prototype.mergeConfig=function(e){var t=e.options,r=e.alias,i=e.loc,s=e.dirname;if(!t)return!1;if(t=(0,o.default)({},t),s=s||n.cwd(),i=i||r,t.extends){var a=(0,l.default)(t.extends,s);a?this.addConfig(a):this.log&&this.log.error("Couldn't resolve extends clause of "+t.extends+" in "+r),delete t.extends}this.configs.push({options:t,alias:r,loc:i,dirname:s});var u=void 0,c=n.env.BABEL_ENV||n.env.NODE_ENV||"development";t.env&&(u=t.env[c],delete t.env),this.mergeConfig({options:u,alias:r+".env."+c,dirname:s})},e}();t.exports=r.default}).call(this,e("_process"))},{"../../../helpers/resolve":37,_process:538,"babel-runtime/core-js/object/assign":117,"babel-runtime/helpers/classCallCheck":127,fs:182,json5:312,path:534,"path-is-absolute":535}],44:[function(e,t,r){"use strict";t.exports={filename:{type:"filename",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc",default:"unknown",shorthand:"f"},filenameRelative:{hidden:!0,type:"string"},inputSourceMap:{hidden:!0},env:{hidden:!0,default:{}},mode:{description:"",hidden:!0},retainLines:{type:"boolean",default:!1,description:"retain line numbers - will result in really ugly code"},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean",default:!0},suppressDeprecationMessages:{type:"boolean",default:!1,hidden:!0},presets:{type:"list",description:"",default:[]},plugins:{type:"list",default:[],description:""},ignore:{type:"list",description:"list of glob paths to **not** compile",default:[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:!0,default:!0,type:"boolean"},metadata:{hidden:!0,default:!0,type:"boolean"},ast:{hidden:!0,default:!0,type:"boolean"},extends:{type:"string",hidden:!0},comments:{type:"boolean",default:!0,description:"write comments to generated output (true by default)"},shouldPrintComment:{hidden:!0,description:"optional callback to control whether a comment should be inserted, when this is used the comments option is ignored"},wrapPluginVisitorMethod:{hidden:!0,description:"optional callback to wrap all visitor methods"},compact:{type:"booleanString",default:"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},minified:{type:"boolean",default:!1,description:"save as much bytes when printing [true|false]"},sourceMap:{alias:"sourceMaps",hidden:!0},sourceMaps:{type:"booleanString",description:"[true|false|inline]",default:!1,shorthand:"s"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"filename",description:"the root from which all sources are relative"},babelrc:{description:"Whether or not to look up .babelrc and .babelignore files",type:"boolean",default:!0},sourceType:{description:"",default:"module"},auxiliaryCommentBefore:{type:"string",description:"print a comment before any injected non-user code"},auxiliaryCommentAfter:{type:"string",description:"print a comment after any injected non-user code"},resolveModuleSource:{hidden:!0},getModuleId:{hidden:!0},moduleRoot:{type:"filename",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},moduleIds:{type:"boolean",default:!1,shorthand:"M",description:"insert an explicit id for modules"},moduleId:{description:"specify a custom name for module ids",type:"string"},passPerPreset:{description:"Whether to spawn a traversal pass per a preset. By default all presets are merged.",type:"boolean",default:!1,hidden:!0},parserOpts:{description:"Options to pass into the parser, or to change parsers (parserOpts.parser)",default:!1},generatorOpts:{description:"Options to pass into the generator, or to change generators (generatorOpts.generator)",default:!1}}},{}],45:[function(e,t,r){"use strict";function n(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e){var r=e[t];if(null!=r){var n=s.default[t];if(n&&n.alias&&(n=s.default[n.alias]),n){var a=i[n.type];a&&(r=a(r)),e[t]=r}}}return e}r.__esModule=!0,r.config=void 0,r.normaliseOptions=n;var i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./parsers")),s=function(e){return e&&e.__esModule?e:{default:e}}(e("./config"));r.config=s.default},{"./config":44,"./parsers":47}],46:[function(e,t,r){(function(n){"use strict";function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function s(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var a=s(e("babel-runtime/helpers/objectWithoutProperties")),o=s(e("babel-runtime/core-js/json/stringify")),u=s(e("babel-runtime/core-js/object/assign")),l=s(e("babel-runtime/core-js/get-iterator")),c=s(e("babel-runtime/helpers/typeof")),p=s(e("babel-runtime/helpers/classCallCheck")),h=i(e("../../../api/node")),f=s(e("../../plugin")),d=i(e("babel-messages")),m=e("./index"),y=s(e("../../../helpers/resolve-plugin")),g=s(e("../../../helpers/resolve-preset")),b=s(e("lodash/cloneDeepWith")),v=s(e("lodash/clone")),x=s(e("../../../helpers/merge")),E=s(e("./config")),A=s(e("./removed")),D=s(e("./build-config-chain")),C=s(e("path")),S=function(){function t(e){(0,p.default)(this,t),this.resolvedConfigs=[],this.options=t.createBareOptions(),this.log=e}return t.memoisePluginContainer=function(e,r,n,i){for(var s=t.memoisedPlugins,a=Array.isArray(s),o=0,s=a?s:(0,l.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var p=u;if(p.container===e)return p.plugin}var m=void 0;if(m="function"==typeof e?e(h):e,"object"===(void 0===m?"undefined":(0,c.default)(m))){var y=new f.default(m,i);return t.memoisedPlugins.push({container:e,plugin:y}),y}throw new TypeError(d.get("pluginNotObject",r,n,void 0===m?"undefined":(0,c.default)(m))+r+n)},t.createBareOptions=function(){var e={};for(var t in E.default){var r=E.default[t];e[t]=(0,v.default)(r.default)}return e},t.normalisePlugin=function(e,r,n,i){if(!((e=e.__esModule?e.default:e)instanceof f.default)){if("function"!=typeof e&&"object"!==(void 0===e?"undefined":(0,c.default)(e)))throw new TypeError(d.get("pluginNotFunction",r,n,void 0===e?"undefined":(0,c.default)(e)));e=t.memoisePluginContainer(e,r,n,i)}return e.init(r,n),e},t.normalisePlugins=function(r,n,i){return i.map(function(i,s){var a=void 0,o=void 0;if(!i)throw new TypeError("Falsy value found in plugins");Array.isArray(i)?(a=i[0],o=i[1]):a=i;var u="string"==typeof a?a:r+"$"+s;if("string"==typeof a){var l=(0,y.default)(a,n);if(!l)throw new ReferenceError(d.get("pluginUnknown",a,r,s,n));a=e(l)}return a=t.normalisePlugin(a,r,s,u),[a,o]})},t.prototype.mergeOptions=function(e){var r=this,i=e.options,s=e.extending,a=e.alias,o=e.loc,l=e.dirname;if(a=a||"foreign",i){("object"!==(void 0===i?"undefined":(0,c.default)(i))||Array.isArray(i))&&this.log.error("Invalid options type for "+a,TypeError);var p=(0,b.default)(i,function(e){if(e instanceof f.default)return e});l=l||n.cwd(),o=o||a;for(var h in p)if(!E.default[h]&&this.log)if(A.default[h])this.log.error("Using removed Babel 5 option: "+a+"."+h+" - "+A.default[h].message,ReferenceError);else{var d="Unknown option: "+a+"."+h+". Check out http://babeljs.io/docs/usage/options/ for more information about options.";this.log.error(d+"\n\nA common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:\n\nInvalid:\n `{ presets: [{option: value}] }`\nValid:\n `{ presets: [['presetName', {option: value}]] }`\n\nFor more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.",ReferenceError)}(0,m.normaliseOptions)(p),p.plugins&&(p.plugins=t.normalisePlugins(o,l,p.plugins)),p.presets&&(p.passPerPreset?p.presets=this.resolvePresets(p.presets,l,function(e,t){r.mergeOptions({options:e,extending:e,alias:t,loc:t,dirname:l})}):(this.mergePresets(p.presets,l),delete p.presets)),i===s?(0,u.default)(s,p):(0,x.default)(s||this.options,p)}},t.prototype.mergePresets=function(e,t){var r=this;this.resolvePresets(e,t,function(e,t){r.mergeOptions({options:e,alias:t,loc:t,dirname:C.default.dirname(t||"")})})},t.prototype.resolvePresets=function(t,r,n){return t.map(function(t){var i=void 0;if(Array.isArray(t)){if(t.length>2)throw new Error("Unexpected extra options "+(0,o.default)(t.slice(2))+" passed to preset.");var s=t;t=s[0],i=s[1]}var u=void 0;try{if("string"==typeof t){if(!(u=(0,g.default)(t,r)))throw new Error("Couldn't find preset "+(0,o.default)(t)+" relative to directory "+(0,o.default)(r));t=e(u)}if("object"===(void 0===t?"undefined":(0,c.default)(t))&&t.__esModule)if(t.default)t=t.default;else{var l=t;l.__esModule;t=(0,a.default)(l,["__esModule"])}if("object"===(void 0===t?"undefined":(0,c.default)(t))&&t.buildPreset&&(t=t.buildPreset),"function"!=typeof t&&void 0!==i)throw new Error("Options "+(0,o.default)(i)+" passed to "+(u||"a preset")+" which does not accept options.");if("function"==typeof t&&(t=t(h,i,{dirname:r})),"object"!==(void 0===t?"undefined":(0,c.default)(t)))throw new Error("Unsupported preset format: "+t+".");n&&n(t,u)}catch(e){throw u&&(e.message+=" (While processing preset: "+(0,o.default)(u)+")"),e}return t})},t.prototype.normaliseOptions=function(){var e=this.options;for(var t in E.default){var r=E.default[t],n=e[t];!n&&r.optional||(r.alias?e[r.alias]=e[r.alias]||n:e[t]=n)}},t.prototype.init=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,D.default)(e,this.log),r=Array.isArray(t),n=0,t=r?t:(0,l.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.mergeOptions(s)}return this.normaliseOptions(e),this.options},t}();r.default=S,S.memoisedPlugins=[],t.exports=r.default}).call(this,e("_process"))},{"../../../api/node":29,"../../../helpers/merge":32,"../../../helpers/resolve-plugin":35,"../../../helpers/resolve-preset":36,"../../plugin":53,"./build-config-chain":43,"./config":44,"./index":45,"./removed":48,_process:538,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/object/assign":117,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/objectWithoutProperties":129,"babel-runtime/helpers/typeof":131,"lodash/clone":479,"lodash/cloneDeepWith":481,path:534}],47:[function(e,t,r){"use strict";function n(e){return!!e}function i(e){return o.booleanify(e)}function s(e){return o.list(e)}r.__esModule=!0,r.filename=void 0,r.boolean=n,r.booleanString=i,r.list=s;var a=function(e){return e&&e.__esModule?e:{default:e}}(e("slash")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../../../util"));r.filename=a.default},{"../../../util":54,slash:590}],48:[function(e,t,r){"use strict";t.exports={auxiliaryComment:{message:"Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`"},blacklist:{message:"Put the specific transforms you want in the `plugins` option"},breakConfig:{message:"This is not a necessary option in Babel 6"},experimental:{message:"Put the specific transforms you want in the `plugins` option"},externalHelpers:{message:"Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/"},extra:{message:""},jsxPragma:{message:"use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/"},loose:{message:"Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option."},metadataUsedHelpers:{message:"Not required anymore as this is enabled by default"},modules:{message:"Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules"},nonStandard:{message:"Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/"},optional:{message:"Put the specific transforms you want in the `plugins` option"},sourceMapName:{message:"Use the `sourceMapTarget` option"},stage:{message:"Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets"},whitelist:{message:"Put the specific transforms you want in the `plugins` option"}}},{}],49:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../plugin")),s=n(e("lodash/sortBy"));r.default=new i.default({name:"internal.blockHoist",visitor:{Block:{exit:function(e){for(var t=e.node,r=!1,n=0;n1&&void 0!==arguments[1]?arguments[1]:{};return t.code=!1,t.mode="lint",this.transform(e,t)},e.prototype.pretransform=function(e,t){var r=new o.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r})},e.prototype.transform=function(e,t){var r=new o.default(t,this);return r.wrap(e,function(){return r.addCode(e),r.parseCode(e),r.transform()})},e.prototype.analyse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];return t.code=!1,r&&(t.plugins=t.plugins||[],t.plugins.push(new a.default({visitor:r}))),this.transform(e,t).metadata},e.prototype.transformFromAst=function(e,t,r){e=(0,s.default)(e);var n=new o.default(r,this);return n.wrap(t,function(){return n.addCode(t),n.addAst(e),n.transform()})},e}();r.default=u,t.exports=r.default},{"../helpers/normalize-ast":33,"./file":40,"./plugin":53,"babel-runtime/helpers/classCallCheck":127}],52:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("babel-runtime/helpers/possibleConstructorReturn")),a=n(e("babel-runtime/helpers/inherits")),o=n(e("../store")),u=(n(e("./file")),function(e){function t(r,n){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,i.default)(this,t);var o=(0,s.default)(this,e.call(this));return o.plugin=n,o.key=n.key,o.file=r,o.opts=a,o}return(0,a.default)(t,e),t.prototype.addHelper=function(){var e;return(e=this.file).addHelper.apply(e,arguments)},t.prototype.addImport=function(){var e;return(e=this.file).addImport.apply(e,arguments)},t.prototype.getModuleName=function(){var e;return(e=this.file).getModuleName.apply(e,arguments)},t.prototype.buildCodeFrameError=function(){var e;return(e=this.file).buildCodeFrameError.apply(e,arguments)},t}(o.default));r.default=u,t.exports=r.default},{"../store":38,"./file":40,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130}],53:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator")),s=n(e("babel-runtime/helpers/classCallCheck")),a=n(e("babel-runtime/helpers/possibleConstructorReturn")),o=n(e("babel-runtime/helpers/inherits")),u=n(e("./file/options/option-manager")),l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-messages")),c=n(e("../store")),p=n(e("babel-traverse")),h=n(e("lodash/assign")),f=n(e("lodash/clone")),d=["enter","exit"],m=function(e){function t(r,n){(0,s.default)(this,t);var i=(0,a.default)(this,e.call(this));return i.initialized=!1,i.raw=(0,h.default)({},r),i.key=i.take("name")||n,i.manipulateOptions=i.take("manipulateOptions"),i.post=i.take("post"),i.pre=i.take("pre"),i.visitor=i.normaliseVisitor((0,f.default)(i.take("visitor"))||{}),i}return(0,o.default)(t,e),t.prototype.take=function(e){var t=this.raw[e];return delete this.raw[e],t},t.prototype.chain=function(e,t){if(!e[t])return this[t];if(!this[t])return e[t];var r=[e[t],this[t]];return function(){for(var e=void 0,t=arguments.length,n=Array(t),s=0;s=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;if(c){var p=c.apply(this,n);null!=p&&(e=p)}}return e}},t.prototype.maybeInherit=function(e){var t=this.take("inherits");t&&(t=u.default.normalisePlugin(t,e,"inherits"),this.manipulateOptions=this.chain(t,"manipulateOptions"),this.post=this.chain(t,"post"),this.pre=this.chain(t,"pre"),this.visitor=p.default.visitors.merge([t.visitor,this.visitor]))},t.prototype.init=function(e,t){if(!this.initialized){this.initialized=!0,this.maybeInherit(e);for(var r in this.raw)throw new Error(l.get("pluginInvalidProperty",e,t,r))}},t.prototype.normaliseVisitor=function(e){for(var t=d,r=Array.isArray(t),n=0,t=r?t:(0,i.default)(t);;){var s;if(r){if(n>=t.length)break;s=t[n++]}else{if((n=t.next()).done)break;s=n.value}if(e[s])throw new Error("Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes.")}return p.default.explode(e),e},t}(c.default);r.default=m,t.exports=r.default},{"../store":38,"./file/options/option-manager":46,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"babel-traverse":136,"lodash/assign":476,"lodash/clone":479}],54:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var r=t||i.EXTENSIONS,n=b.default.extname(e);return(0,y.default)(r,n)}function s(e){return e?Array.isArray(e)?e:"string"==typeof e?e.split(","):[e]:[]}function a(e){if(!e)return new RegExp(/.^/);if(Array.isArray(e)&&(e=new RegExp(e.map(f.default).join("|"),"i")),"string"==typeof e){e=(0,v.default)(e),((0,d.default)(e,"./")||(0,d.default)(e,"*/"))&&(e=e.slice(2)),(0,d.default)(e,"**/")&&(e=e.slice(3));var t=m.default.makeRe(e,{nocase:!0});return new RegExp(t.source.slice(1,-1),"i")}if((0,g.default)(e))return e;throw new TypeError("illegal type for regexify")}function o(e,t){return e?"boolean"==typeof e?o([e],t):"string"==typeof e?o(s(e),t):Array.isArray(e)?(t&&(e=e.map(t)),e):[e]:[]}function u(e){return"true"===e||1==e||!("false"===e||0==e||!e)&&e}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];if(e=e.replace(/\\/g,"/"),r){for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,p.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}if(c(a,e))return!1}return!0}if(t.length)for(var o=t,u=Array.isArray(o),l=0,o=u?o:(0,p.default)(o);;){var h;if(u){if(l>=o.length)break;h=o[l++]}else{if((l=o.next()).done)break;h=l.value}if(c(h,e))return!0}return!1}function c(e,t){return"function"==typeof e?e(t):e.test(t)}r.__esModule=!0,r.inspect=r.inherits=void 0;var p=n(e("babel-runtime/core-js/get-iterator")),h=e("util");Object.defineProperty(r,"inherits",{enumerable:!0,get:function(){return h.inherits}}),Object.defineProperty(r,"inspect",{enumerable:!0,get:function(){return h.inspect}}),r.canCompile=i,r.list=s,r.regexify=a,r.arrayify=o,r.booleanify=u,r.shouldIgnore=l;var f=n(e("lodash/escapeRegExp")),d=n(e("lodash/startsWith")),m=n(e("minimatch")),y=n(e("lodash/includes")),g=n(e("lodash/isRegExp")),b=n(e("path")),v=n(e("slash"));i.EXTENSIONS=[".js",".jsx",".es6",".es"]},{"babel-runtime/core-js/get-iterator":113,"lodash/escapeRegExp":485,"lodash/includes":495,"lodash/isRegExp":507,"lodash/startsWith":520,minimatch:530,path:534,slash:590,util:602}],55:[function(e,t,r){function n(){this._array=[],this._set=Object.create(null)}var i=e("./util"),s=Object.prototype.hasOwnProperty;n.fromArray=function(e,t){for(var r=new n,i=0,s=e.length;i=0&&e>1;return 1==(1&e)?-t:t}var s=e("./base64");r.encode=function(e){var t,r="",i=n(e);do{t=31&i,(i>>>=5)>0&&(t|=32),r+=s.encode(t)}while(i>0);return r},r.decode=function(e,t,r){var n,a,o=e.length,u=0,l=0;do{if(t>=o)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(a=s.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));n=!!(32&a),u+=(a&=31)<0?t-u>1?n(u,t,i,s,a,o):o==r.LEAST_UPPER_BOUND?t1?n(e,u,i,s,a,o):o==r.LEAST_UPPER_BOUND?u:e<0?-1:e}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(e,t,i,s){if(0===t.length)return-1;var a=n(-1,t.length,e,t,i,s||r.GREATEST_LOWER_BOUND);if(a<0)return-1;for(;a-1>=0&&0===i(t[a],t[a-1],!0);)--a;return a}},{}],59:[function(e,t,r){function n(e,t){var r=e.generatedLine,n=t.generatedLine,i=e.generatedColumn,a=t.generatedColumn;return n>r||n==r&&a>=i||s.compareByGeneratedPositionsInflated(e,t)<=0}function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var s=e("./util");i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){n(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(s.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=i},{"./util":64}],60:[function(e,t,r){function n(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function i(e,t){return Math.round(e+Math.random()*(t-e))}function s(e,t,r,a){if(r=0){var s=this._originalMappings[i];if(void 0===e.column)for(var a=s.originalLine;s&&s.originalLine===a;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i];else for(var l=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==l;)n.push({line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++i]}return n},r.SourceMapConsumer=n,i.prototype=Object.create(n.prototype),i.prototype.consumer=n,i.fromSourceMap=function(e){var t=Object.create(i.prototype),r=t._names=l.fromArray(e._names.toArray(),!0),n=t._sources=l.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var a=e._mappings.toArray().slice(),u=t.__generatedMappings=[],c=t.__originalMappings=[],h=0,f=a.length;h1&&(r.source=m+i[1],m+=i[1],r.originalLine=f+i[2],f=r.originalLine,r.originalLine+=1,r.originalColumn=d+i[3],d=r.originalColumn,i.length>4&&(r.name=y+i[4],y+=i[4])),A.push(r),"number"==typeof r.originalLine&&E.push(r)}p(A,o.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,p(E,o.compareByOriginalPositions),this.__originalMappings=E},i.prototype._findMapping=function(e,t,r,n,i,s){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[n]);return u.search(e,t,i,s)},i.prototype.computeColumnSpans=function(){for(var e=0;e=0){var i=this._generatedMappings[r];if(i.generatedLine===t.generatedLine){var s=o.getArg(i,"source",null);null!==s&&(s=this._sources.at(s),null!=this.sourceRoot&&(s=o.join(this.sourceRoot,s)));var a=o.getArg(i,"name",null);return null!==a&&(a=this._names.at(a)),{source:s,line:o.getArg(i,"originalLine",null),column:o.getArg(i,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}},i.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},i.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=o.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=o.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},i.prototype.generatedPositionFor=function(e){var t=o.getArg(e,"source");if(null!=this.sourceRoot&&(t=o.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var r={source:t=this._sources.indexOf(t),originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",n.GREATEST_LOWER_BOUND));if(i>=0){var s=this._originalMappings[i];if(s.source===r.source)return{line:o.getArg(s,"generatedLine",null),column:o.getArg(s,"generatedColumn",null),lastColumn:o.getArg(s,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=i,a.prototype=Object.create(n.prototype),a.prototype.constructor=n,a.prototype._version=3,Object.defineProperty(a.prototype,"sources",{get:function(){for(var e=[],t=0;t0&&e.column>=0)||t||r||n)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))},n.prototype._serializeMappings=function(){for(var e,t,r,n,a=0,o=1,u=0,l=0,c=0,p=0,h="",f=this._mappings.toArray(),d=0,m=f.length;d0){if(!s.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=i.encode(t.generatedColumn-a),a=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=i.encode(n-p),p=n,e+=i.encode(t.originalLine-1-l),l=t.originalLine-1,e+=i.encode(t.originalColumn-u),u=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=i.encode(r-c),c=r)),h+=e}return h},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;null!=t&&(e=s.relative(t,e));var r=s.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},n.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},n.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=n},{"./array-set":55,"./base64-vlq":56,"./mapping-list":59,"./util":64}],63:[function(e,t,r){function n(e,t,r,n,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==i?null:i,this[o]=!0,null!=n&&this.add(n)}var i=e("./source-map-generator").SourceMapGenerator,s=e("./util"),a=/(\r?\n)/,o="$$$isSourceNode$$$";n.fromStringWithSourceMap=function(e,t,r){function i(e,t){if(null===e||void 0===e.source)o.add(t);else{var i=r?s.join(r,e.source):e.source;o.add(new n(e.originalLine,e.originalColumn,i,t,e.name))}}var o=new n,u=e.split(a),l=function(){return u.shift()+(u.shift()||"")},c=1,p=0,h=null;return t.eachMapping(function(e){if(null!==h){if(!(c0&&(h&&i(h,l()),o.add(u.join(""))),t.sources.forEach(function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=s.join(r,e)),o.setSourceContent(e,n))}),o},n.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},n.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[o]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},n.prototype.walk=function(e){for(var t,r=0,n=this.children.length;r0){for(t=[],r=0;r=0;c--)"."===(a=u[c])?u.splice(c,1):".."===a?l++:l>0&&(""===a?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return""===(t=u.join("/"))&&(t=o?"/":"."),n?(n.path=t,s(n)):t}function o(e,t){""===e&&(e="."),""===t&&(t=".");var r=i(t),n=i(e);if(n&&(e=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),s(r);if(r||t.match(b))return t;if(n&&!n.host&&!n.path)return n.host=t,s(n);var o="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t);return n?(n.path=o,s(n)):o}function u(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==t.indexOf(e+"/");){var n=e.lastIndexOf("/");if(n<0)return t;if((e=e.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return t;++r}return Array(r+1).join("../")+t.substr(e.length+1)}function l(e){return e}function c(e){return h(e)?"$"+e:e}function p(e){return h(e)?e.slice(1):e}function h(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function f(e,t,r){var n=e.source-t.source;return 0!==n?n:0!==(n=e.originalLine-t.originalLine)?n:0!==(n=e.originalColumn-t.originalColumn)||r?n:0!==(n=e.generatedColumn-t.generatedColumn)?n:(n=e.generatedLine-t.generatedLine,0!==n?n:e.name-t.name)}function d(e,t,r){var n=e.generatedLine-t.generatedLine;return 0!==n?n:0!==(n=e.generatedColumn-t.generatedColumn)||r?n:0!==(n=e.source-t.source)?n:0!==(n=e.originalLine-t.originalLine)?n:(n=e.originalColumn-t.originalColumn,0!==n?n:e.name-t.name)}function m(e,t){return e===t?0:e>t?1:-1}function y(e,t){var r=e.generatedLine-t.generatedLine;return 0!==r?r:0!==(r=e.generatedColumn-t.generatedColumn)?r:0!==(r=m(e.source,t.source))?r:0!==(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,0!==r?r:m(e.name,t.name))}r.getArg=n;var g=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,b=/^data:.+\,.+$/;r.urlParse=i,r.urlGenerate=s,r.normalize=a,r.join=o,r.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(g)},r.relative=u;var v=function(){return!("__proto__"in Object.create(null))}();r.toSetString=v?l:c,r.fromSetString=v?l:p,r.compareByOriginalPositions=f,r.compareByGeneratedPositionsDeflated=d,r.compareByGeneratedPositionsInflated=y},{}],65:[function(e,t,r){r.SourceMapGenerator=e("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=e("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=e("./lib/source-node").SourceNode},{"./lib/source-map-consumer":61,"./lib/source-map-generator":62,"./lib/source-node":63}],66:[function(e,t,r){t.exports={_args:[[{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},"/Users/evgenypoberezkin/JSON/ajv/node_modules/regenerator"]],_from:"babel-core@>=6.18.2 <7.0.0",_id:"babel-core@6.24.1",_inCache:!0,_location:"/babel-core",_nodeVersion:"6.9.0",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/babel-core-6.24.1.tgz_1491578389054_0.9957534451968968"},_npmUser:{name:"hzoo",email:"hi@henryzoo.com"},_npmVersion:"3.10.10",_phantomChildren:{},_requested:{raw:"babel-core@^6.18.2",scope:null,escapedName:"babel-core",name:"babel-core",rawSpec:"^6.18.2",spec:">=6.18.2 <7.0.0",type:"range"},_requiredBy:["/babel-register","/regenerator"],_resolved:"https://registry.npmjs.org/babel-core/-/babel-core-6.24.1.tgz",_shasum:"8c428564dce1e1f41fb337ec34f4c3b022b5ad83",_shrinkwrap:null,_spec:"babel-core@^6.18.2",_where:"/Users/evgenypoberezkin/JSON/ajv/node_modules/regenerator",author:{name:"Sebastian McKenzie",email:"sebmck@gmail.com"},dependencies:{"babel-code-frame":"^6.22.0","babel-generator":"^6.24.1","babel-helpers":"^6.24.1","babel-messages":"^6.23.0","babel-register":"^6.24.1","babel-runtime":"^6.22.0","babel-template":"^6.24.1","babel-traverse":"^6.24.1","babel-types":"^6.24.1",babylon:"^6.11.0","convert-source-map":"^1.1.0",debug:"^2.1.1",json5:"^0.5.0",lodash:"^4.2.0",minimatch:"^3.0.2","path-is-absolute":"^1.0.0",private:"^0.1.6",slash:"^1.0.0","source-map":"^0.5.0"},description:"Babel compiler core.",devDependencies:{"babel-helper-fixtures":"^6.22.0","babel-helper-transform-fixture-test-runner":"^6.24.1","babel-polyfill":"^6.23.0"},directories:{},dist:{shasum:"8c428564dce1e1f41fb337ec34f4c3b022b5ad83",tarball:"https://registry.npmjs.org/babel-core/-/babel-core-6.24.1.tgz"},homepage:"https://babeljs.io/",keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],license:"MIT",maintainers:[{name:"amasad",email:"amjad.masad@gmail.com"},{name:"hzoo",email:"hi@henryzoo.com"},{name:"jmm",email:"npm-public@jessemccarthy.net"},{name:"loganfsmyth",email:"loganfsmyth@gmail.com"},{name:"sebmck",email:"sebmck@gmail.com"},{name:"thejameskyle",email:"me@thejameskyle.com"}],name:"babel-core",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"https://github.com/babel/babel/tree/master/packages/babel-core"},scripts:{bench:"make bench",test:"make test"},version:"6.24.1"}},{}],67:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=n(e("trim-right")),a=/^[ \t]+$/,o=function(){function e(t){(0,i.default)(this,e),this._map=null,this._buf=[],this._last="",this._queue=[],this._position={line:1,column:0},this._sourcePosition={identifierName:null,line:null,column:null,filename:null},this._map=t}return e.prototype.get=function(){this._flush();var e=this._map,t={code:(0,s.default)(this._buf.join("")),map:null,rawMappings:e&&e.getRawMappings()};return e&&Object.defineProperty(t,"map",{configurable:!0,enumerable:!0,get:function(){return this.map=e.get()},set:function(e){Object.defineProperty(this,"map",{value:e,writable:!0})}}),t},e.prototype.append=function(e){this._flush();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._append(e,r,n,s,i)},e.prototype.queue=function(e){if("\n"===e)for(;this._queue.length>0&&a.test(this._queue[0][0]);)this._queue.shift();var t=this._sourcePosition,r=t.line,n=t.column,i=t.filename,s=t.identifierName;this._queue.unshift([e,r,n,s,i])},e.prototype._flush=function(){for(var e=void 0;e=this._queue.pop();)this._append.apply(this,e)},e.prototype._append=function(e,t,r,n,i){this._map&&"\n"!==e[0]&&this._map.mark(this._position.line,this._position.column,t,r,n,i),this._buf.push(e),this._last=e[e.length-1];for(var s=0;s0&&"\n"===this._queue[0][0]&&this._queue.shift()},e.prototype.removeLastSemicolon=function(){this._queue.length>0&&";"===this._queue[0][0]&&this._queue.shift()},e.prototype.endsWith=function(e){if(1===e.length){var t=void 0;if(this._queue.length>0){var r=this._queue[0][0];t=r[r.length-1]}else t=this._last;return t===e}var n=this._last+this._queue.reduce(function(e,t){return t[0]+e},"");return e.length<=n.length&&n.slice(-e.length)===e},e.prototype.hasContent=function(){return this._queue.length>0||!!this._last},e.prototype.source=function(e,t){if(!e||t){var r=t?t[e]:null;this._sourcePosition.identifierName=t&&t.identifierName||null,this._sourcePosition.line=r?r.line:null,this._sourcePosition.column=r?r.column:null,this._sourcePosition.filename=t&&t.filename||null}},e.prototype.withSource=function(e,t,r){if(!this._map)return r();var n=this._sourcePosition.line,i=this._sourcePosition.column,s=this._sourcePosition.filename,a=this._sourcePosition.identifierName;this.source(e,t),r(),this._sourcePosition.line=n,this._sourcePosition.column=i,this._sourcePosition.filename=s,this._sourcePosition.identifierName=a},e.prototype.getCurrentColumn=function(){var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=e.lastIndexOf("\n");return-1===t?this._position.column+e.length:e.length-1-t},e.prototype.getCurrentLine=function(){for(var e=this._queue.reduce(function(e,t){return t[0]+e},""),t=0,r=0;r")),this.space(),this.print(e.returnType,e)}function g(e){this.print(e.name,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.typeAnnotation,e)}function b(e){this.print(e.id,e),this.print(e.typeParameters,e)}function v(e){this.print(e.id,e),this.print(e.typeParameters,e),e.extends.length&&(this.space(),this.word("extends"),this.space(),this.printList(e.extends,e)),e.mixins&&e.mixins.length&&(this.space(),this.word("mixins"),this.space(),this.printList(e.mixins,e)),this.space(),this.print(e.body,e)}function x(e){"plus"===e.variance?this.token("+"):"minus"===e.variance&&this.token("-")}function E(e){this.word("interface"),this.space(),this._interfaceish(e)}function A(){this.space(),this.token("&"),this.space()}function D(e){this.printJoin(e.types,e,{separator:A})}function C(){this.word("mixed")}function S(){this.word("empty")}function _(e){this.token("?"),this.print(e.typeAnnotation,e)}function w(){this.word("number")}function k(){this.word("string")}function F(){this.word("this")}function T(e){this.token("["),this.printList(e.types,e),this.token("]")}function P(e){this.word("typeof"),this.space(),this.print(e.argument,e)}function B(e){this.word("type"),this.space(),this.print(e.id,e),this.print(e.typeParameters,e),this.space(),this.token("="),this.space(),this.print(e.right,e),this.semicolon()}function O(e){this.token(":"),this.space(),e.optional&&this.token("?"),this.print(e.typeAnnotation,e)}function j(e){this._variance(e),this.word(e.name),e.bound&&this.print(e.bound,e),e.default&&(this.space(),this.token("="),this.space(),this.print(e.default,e))}function N(e){this.token("<"),this.printList(e.params,e,{}),this.token(">")}function I(e){var t=this;e.exact?this.token("{|"):this.token("{");var r=e.properties.concat(e.callProperties,e.indexers);r.length&&(this.space(),this.printJoin(r,e,{addNewlines:function(e){if(e&&!r[0])return 1},indent:!0,statement:!0,iterator:function(){1!==r.length&&(t.format.flowCommaSeparator?t.token(","):t.semicolon(),t.space())}}),this.space()),e.exact?this.token("|}"):this.token("}")}function L(e){e.static&&(this.word("static"),this.space()),this.print(e.value,e)}function M(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.token("["),this.print(e.id,e),this.token(":"),this.space(),this.print(e.key,e),this.token("]"),this.token(":"),this.space(),this.print(e.value,e)}function R(e){e.static&&(this.word("static"),this.space()),this._variance(e),this.print(e.key,e),e.optional&&this.token("?"),this.token(":"),this.space(),this.print(e.value,e)}function V(e){this.print(e.qualification,e),this.token("."),this.print(e.id,e)}function U(){this.space(),this.token("|"),this.space()}function q(e){this.printJoin(e.types,e,{separator:U})}function G(e){this.token("("),this.print(e.expression,e),this.print(e.typeAnnotation,e),this.token(")")}function X(){this.word("void")}r.__esModule=!0,r.AnyTypeAnnotation=n,r.ArrayTypeAnnotation=i,r.BooleanTypeAnnotation=s,r.BooleanLiteralTypeAnnotation=a,r.NullLiteralTypeAnnotation=o,r.DeclareClass=u,r.DeclareFunction=l,r.DeclareInterface=c,r.DeclareModule=p,r.DeclareModuleExports=h,r.DeclareTypeAlias=f,r.DeclareVariable=d,r.ExistentialTypeParam=m,r.FunctionTypeAnnotation=y,r.FunctionTypeParam=g,r.InterfaceExtends=b,r._interfaceish=v,r._variance=x,r.InterfaceDeclaration=E,r.IntersectionTypeAnnotation=D,r.MixedTypeAnnotation=C,r.EmptyTypeAnnotation=S,r.NullableTypeAnnotation=_;var J=e("./types");Object.defineProperty(r,"NumericLiteralTypeAnnotation",{enumerable:!0,get:function(){return J.NumericLiteral}}),Object.defineProperty(r,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return J.StringLiteral}}),r.NumberTypeAnnotation=w,r.StringTypeAnnotation=k,r.ThisTypeAnnotation=F,r.TupleTypeAnnotation=T,r.TypeofTypeAnnotation=P,r.TypeAlias=B,r.TypeAnnotation=O,r.TypeParameter=j,r.TypeParameterInstantiation=N,r.ObjectTypeAnnotation=I,r.ObjectTypeCallProperty=L,r.ObjectTypeIndexer=M,r.ObjectTypeProperty=R,r.QualifiedTypeIdentifier=V,r.UnionTypeAnnotation=q,r.TypeCastExpression=G,r.VoidTypeAnnotation=X,r.ClassImplements=b,r.GenericTypeAnnotation=b,r.TypeParameterDeclaration=N},{"./types":77}],72:[function(e,t,r){"use strict";function n(e){this.print(e.name,e),e.value&&(this.token("="),this.print(e.value,e))}function i(e){this.word(e.name)}function s(e){this.print(e.namespace,e),this.token(":"),this.print(e.name,e)}function a(e){this.print(e.object,e),this.token("."),this.print(e.property,e)}function o(e){this.token("{"),this.token("..."),this.print(e.argument,e),this.token("}")}function u(e){this.token("{"),this.print(e.expression,e),this.token("}")}function l(e){this.token("{"),this.token("..."),this.print(e.expression,e),this.token("}")}function c(e){this.token(e.value)}function p(e){var t=e.openingElement;if(this.print(t,e),!t.selfClosing){this.indent();for(var r=e.children,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;this.print(a,e)}this.dedent(),this.print(e.closingElement,e)}}function h(){this.space()}function f(e){this.token("<"),this.print(e.name,e),e.attributes.length>0&&(this.space(),this.printJoin(e.attributes,e,{separator:h})),e.selfClosing?(this.space(),this.token("/>")):this.token(">")}function d(e){this.token("")}function m(){}r.__esModule=!0;var y=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.JSXAttribute=n,r.JSXIdentifier=i,r.JSXNamespacedName=s,r.JSXMemberExpression=a,r.JSXSpreadAttribute=o,r.JSXExpressionContainer=u,r.JSXSpreadChild=l,r.JSXText=c,r.JSXElement=p,r.JSXOpeningElement=f,r.JSXClosingElement=d,r.JSXEmptyExpression=m},{"babel-runtime/core-js/get-iterator":113}],73:[function(e,t,r){"use strict";function n(e){var t=this;this.print(e.typeParameters,e),this.token("("),this.printList(e.params,e,{iterator:function(e){e.optional&&t.token("?"),t.print(e.typeAnnotation,e)}}),this.token(")"),e.returnType&&this.print(e.returnType,e)}function i(e){var t=e.kind,r=e.key;"method"!==t&&"init"!==t||e.generator&&this.token("*"),"get"!==t&&"set"!==t||(this.word(t),this.space()),e.async&&(this.word("async"),this.space()),e.computed?(this.token("["),this.print(r,e),this.token("]")):this.print(r,e),this._params(e),this.space(),this.print(e.body,e)}function s(e){e.async&&(this.word("async"),this.space()),this.word("function"),e.generator&&this.token("*"),e.id?(this.space(),this.print(e.id,e)):this.space(),this._params(e),this.space(),this.print(e.body,e)}function a(e){e.async&&(this.word("async"),this.space());var t=e.params[0];1===e.params.length&&u.isIdentifier(t)&&!o(e,t)?this.print(t,e):this._params(e),this.space(),this.token("=>"),this.space(),this.print(e.body,e)}function o(e,t){return e.typeParameters||e.returnType||t.typeAnnotation||t.optional||t.trailingComments}r.__esModule=!0,r.FunctionDeclaration=void 0,r._params=n,r._method=i,r.FunctionExpression=s,r.ArrowFunctionExpression=a;var u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.FunctionDeclaration=s},{"babel-types":169}],74:[function(e,t,r){"use strict";function n(e){"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space()),this.print(e.imported,e),e.local&&e.local.name!==e.imported.name&&(this.space(),this.word("as"),this.space(),this.print(e.local,e))}function i(e){this.print(e.local,e)}function s(e){this.print(e.exported,e)}function a(e){this.print(e.local,e),e.exported&&e.local.name!==e.exported.name&&(this.space(),this.word("as"),this.space(),this.print(e.exported,e))}function o(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.exported,e)}function u(e){this.word("export"),this.space(),this.token("*"),this.space(),this.word("from"),this.space(),this.print(e.source,e),this.semicolon()}function l(){this.word("export"),this.space(),p.apply(this,arguments)}function c(){this.word("export"),this.space(),this.word("default"),this.space(),p.apply(this,arguments)}function p(e){if(e.declaration){var t=e.declaration;this.print(t,e),d.isStatement(t)||this.semicolon()}else{"type"===e.exportKind&&(this.word("type"),this.space());for(var r=e.specifiers.slice(0),n=!1;;){var i=r[0];if(!d.isExportDefaultSpecifier(i)&&!d.isExportNamespaceSpecifier(i))break;n=!0,this.print(r.shift(),e),r.length&&(this.token(","),this.space())}(r.length||!r.length&&!n)&&(this.token("{"),r.length&&(this.space(),this.printList(r,e),this.space()),this.token("}")),e.source&&(this.space(),this.word("from"),this.space(),this.print(e.source,e)),this.semicolon()}}function h(e){this.word("import"),this.space(),"type"!==e.importKind&&"typeof"!==e.importKind||(this.word(e.importKind),this.space());var t=e.specifiers.slice(0);if(t&&t.length){for(;;){var r=t[0];if(!d.isImportDefaultSpecifier(r)&&!d.isImportNamespaceSpecifier(r))break;this.print(t.shift(),e),t.length&&(this.token(","),this.space())}t.length&&(this.token("{"),this.space(),this.printList(t,e),this.space(),this.token("}")),this.space(),this.word("from"),this.space()}this.print(e.source,e),this.semicolon()}function f(e){this.token("*"),this.space(),this.word("as"),this.space(),this.print(e.local,e)}r.__esModule=!0,r.ImportSpecifier=n,r.ImportDefaultSpecifier=i,r.ExportDefaultSpecifier=s,r.ExportSpecifier=a,r.ExportNamespaceSpecifier=o,r.ExportAllDeclaration=u,r.ExportNamedDeclaration=l,r.ExportDefaultDeclaration=c,r.ImportDeclaration=h,r.ImportNamespaceSpecifier=f;var d=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":169}],75:[function(e,t,r){"use strict";function n(e){this.word("with"),this.space(),this.token("("),this.print(e.object,e),this.token(")"),this.printBlock(e)}function i(e){this.word("if"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.space();var t=e.alternate&&E.isIfStatement(s(e.consequent));t&&(this.token("{"),this.newline(),this.indent()),this.printAndIndentOnComments(e.consequent,e),t&&(this.dedent(),this.newline(),this.token("}")),e.alternate&&(this.endsWith("}")&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(e.alternate,e))}function s(e){return E.isStatement(e.body)?s(e.body):e}function a(e){this.word("for"),this.space(),this.token("("),this.inForStatementInitCounter++,this.print(e.init,e),this.inForStatementInitCounter--,this.token(";"),e.test&&(this.space(),this.print(e.test,e)),this.token(";"),e.update&&(this.space(),this.print(e.update,e)),this.token(")"),this.printBlock(e)}function o(e){this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.printBlock(e)}function u(e){this.word("do"),this.space(),this.print(e.body,e),this.space(),this.word("while"),this.space(),this.token("("),this.print(e.test,e),this.token(")"),this.semicolon()}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"label";return function(r){this.word(e);var n=r[t];if(n){this.space();var i=this.startTerminatorless();this.print(n,r),this.endTerminatorless(i)}this.semicolon()}}function c(e){this.print(e.label,e),this.token(":"),this.space(),this.print(e.body,e)}function p(e){this.word("try"),this.space(),this.print(e.block,e),this.space(),e.handlers?this.print(e.handlers[0],e):this.print(e.handler,e),e.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(e.finalizer,e))}function h(e){this.word("catch"),this.space(),this.token("("),this.print(e.param,e),this.token(")"),this.space(),this.print(e.body,e)}function f(e){this.word("switch"),this.space(),this.token("("),this.print(e.discriminant,e),this.token(")"),this.space(),this.token("{"),this.printSequence(e.cases,e,{indent:!0,addNewlines:function(t,r){if(!t&&e.cases[e.cases.length-1]===r)return-1}}),this.token("}")}function d(e){e.test?(this.word("case"),this.space(),this.print(e.test,e),this.token(":")):(this.word("default"),this.token(":")),e.consequent.length&&(this.newline(),this.printSequence(e.consequent,e,{indent:!0}))}function m(){this.word("debugger"),this.semicolon()}function y(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<4;e++)this.space(!0)}function g(){if(this.token(","),this.newline(),this.endsWith("\n"))for(var e=0;e<6;e++)this.space(!0)}function b(e,t){this.word(e.kind),this.space();var r=!1;if(!E.isFor(t))for(var n=e.declarations,i=Array.isArray(n),s=0,n=i?n:(0,x.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}a.init&&(r=!0)}var o=void 0;r&&(o="const"===e.kind?g:y),this.printList(e.declarations,e,{separator:o}),(!E.isFor(t)||t.left!==e&&t.init!==e)&&this.semicolon()}function v(e){this.print(e.id,e),this.print(e.id.typeAnnotation,e),e.init&&(this.space(),this.token("="),this.space(),this.print(e.init,e))}r.__esModule=!0,r.ThrowStatement=r.BreakStatement=r.ReturnStatement=r.ContinueStatement=r.ForAwaitStatement=r.ForOfStatement=r.ForInStatement=void 0;var x=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.WithStatement=n,r.IfStatement=i,r.ForStatement=a,r.WhileStatement=o,r.DoWhileStatement=u,r.LabeledStatement=c,r.TryStatement=p,r.CatchClause=h,r.SwitchStatement=f,r.SwitchCase=d,r.DebuggerStatement=m,r.VariableDeclaration=b,r.VariableDeclarator=v;var E=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),A=function(e){return function(t){this.word("for"),this.space(),"await"===e&&(this.word("await"),this.space()),this.token("("),this.print(t.left,t),this.space(),this.word("await"===e?"of":e),this.space(),this.print(t.right,t),this.token(")"),this.printBlock(t)}};r.ForInStatement=A("in"),r.ForOfStatement=A("of"),r.ForAwaitStatement=A("await"),r.ContinueStatement=l("continue"),r.ReturnStatement=l("return","argument"),r.BreakStatement=l("break"),r.ThrowStatement=l("throw","argument")},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],76:[function(e,t,r){"use strict";function n(e){this.print(e.tag,e),this.print(e.quasi,e)}function i(e,t){var r=t.quasis[0]===e,n=t.quasis[t.quasis.length-1]===e,i=(r?"`":"}")+e.value.raw+(n?"`":"${");this.token(i)}function s(e){for(var t=e.quasis,r=0;r0&&this.space(),this.print(i,e),n=0||e.indexOf("@preserve")>=0},"auto"===a.compact&&(a.compact=e.length>5e5,a.compact&&console.error("[BABEL] "+p.get("codeGeneratorDeopt",t.filename,"500KB"))),a.compact&&(a.indent.adjustMultilineComment=!1),a}function s(e,t){if(!e)return"double";for(var r={single:0,double:0},n=0,i=0;i=3))break}return r.single>r.double?"single":"double"}r.__esModule=!0,r.CodeGenerator=void 0;var a=n(e("babel-runtime/helpers/classCallCheck")),o=n(e("babel-runtime/helpers/possibleConstructorReturn")),u=n(e("babel-runtime/helpers/inherits"));r.default=function(e,t,r){return new h(e,t,r).generate()};var l=n(e("detect-indent")),c=n(e("./source-map")),p=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-messages")),h=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments[2];(0,a.default)(this,t);var u=r.tokens||[],l=i(s,n,u),p=n.sourceMaps?new c.default(n,s):null,h=(0,o.default)(this,e.call(this,l,p,u));return h.ast=r,h}return(0,u.default)(t,e),t.prototype.generate=function(){return e.prototype.generate.call(this,this.ast)},t}(n(e("./printer")).default);r.CodeGenerator=function(){function e(t,r,n){(0,a.default)(this,e),this._generator=new h(t,r,n)}return e.prototype.generate=function(){return this._generator.generate()},e}()},{"./printer":82,"./source-map":83,"babel-messages":103,"babel-runtime/helpers/classCallCheck":127,"babel-runtime/helpers/inherits":128,"babel-runtime/helpers/possibleConstructorReturn":130,"detect-indent":298}],79:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){function t(e,t){var n=r[e];r[e]=n?function(e,r,i){var s=n(e,r,i);return null==s?t(e,r,i):s}:t}for(var r={},n=(0,f.default)(e),i=Array.isArray(n),s=0,n=i?n:(0,h.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a,u=y.FLIPPED_ALIAS_KEYS[o];if(u)for(var l=u,c=Array.isArray(l),p=0,l=c?l:(0,h.default)(l);;){var d;if(c){if(p>=l.length)break;d=l[p++]}else{if((p=l.next()).done)break;d=p.value}t(d,e[o])}else t(o,e[o])}return r}function a(e,t,r,n){var i=e[t.type];return i?i(t,r,n):null}function o(e){return!!y.isCallExpression(e)||!!y.isMemberExpression(e)&&(o(e.object)||!e.computed&&o(e.property))}function u(e,t,r){if(!e)return 0;y.isExpressionStatement(e)&&(e=e.expression);var n=a(b,e,t);if(!n){var i=a(v,e,t);if(i)for(var s=0;ss)return!0}return!1}function u(e,t){return"in"===e.operator&&(b.isVariableDeclarator(t)||b.isFor(t))}function l(e,t){return!(b.isForStatement(t)||b.isThrowStatement(t)||b.isReturnStatement(t)||b.isIfStatement(t)&&t.test===e||b.isWhileStatement(t)&&t.test===e||b.isForInStatement(t)&&t.right===e||b.isSwitchStatement(t)&&t.discriminant===e||b.isExpressionStatement(t)&&t.expression===e)}function c(e,t){return b.isBinary(t)||b.isUnaryLike(t)||b.isCallExpression(t)||b.isMemberExpression(t)||b.isNewExpression(t)||b.isConditionalExpression(t)&&e===t.test}function p(e,t,r){return g(r,{considerDefaultExports:!0})}function h(e,t){return b.isMemberExpression(t,{object:e})||b.isCallExpression(t,{callee:e})||b.isNewExpression(t,{callee:e})}function f(e,t,r){return g(r,{considerDefaultExports:!0})}function d(e,t){return!!(b.isExportDeclaration(t)||b.isBinaryExpression(t)||b.isLogicalExpression(t)||b.isUnaryExpression(t)||b.isTaggedTemplateExpression(t))||h(e,t)}function m(e,t){return!!(b.isUnaryLike(t)||b.isBinary(t)||b.isConditionalExpression(t,{test:e})||b.isAwaitExpression(t))||h(e,t)}function y(e){return!!b.isObjectPattern(e.left)||m.apply(void 0,arguments)}function g(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.considerArrow,n=void 0!==r&&r,i=t.considerDefaultExports,s=void 0!==i&&i,a=e.length-1,o=e[a],u=e[--a];a>0;){if(b.isExpressionStatement(u,{expression:o})||b.isTaggedTemplateExpression(u)||s&&b.isExportDefaultDeclaration(u,{declaration:o})||n&&b.isArrowFunctionExpression(u,{body:o}))return!0;if(!(b.isCallExpression(u,{callee:o})||b.isSequenceExpression(u)&&u.expressions[0]===o||b.isMemberExpression(u,{object:o})||b.isConditional(u,{test:o})||b.isBinary(u,{left:o})||b.isAssignmentExpression(u,{left:o})))return!1;o=u,u=e[--a]}return!1}r.__esModule=!0,r.AwaitExpression=r.FunctionTypeAnnotation=void 0,r.NullableTypeAnnotation=n,r.UpdateExpression=i,r.ObjectExpression=s,r.DoExpression=a,r.Binary=o,r.BinaryExpression=u,r.SequenceExpression=l,r.YieldExpression=c,r.ClassExpression=p,r.UnaryLike=h,r.FunctionExpression=f,r.ArrowFunctionExpression=d,r.ConditionalExpression=m,r.AssignmentExpression=y;var b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),v={"||":0,"&&":1,"|":2,"^":3,"&":4,"==":5,"===":5,"!=":5,"!==":5,"<":6,">":6,"<=":6,">=":6,in:6,instanceof:6,">>":7,"<<":7,">>>":7,"+":8,"-":8,"*":9,"/":9,"%":9,"**":10};r.FunctionTypeAnnotation=n,r.AwaitExpression=c},{"babel-types":169}],81:[function(e,t,r){"use strict";function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.isMemberExpression(e)?(n(e.object,t),e.computed&&n(e.property,t)):o.isBinary(e)||o.isAssignmentExpression(e)?(n(e.left,t),n(e.right,t)):o.isCallExpression(e)?(t.hasCall=!0,n(e.callee,t)):o.isFunction(e)?t.hasFunction=!0:o.isIdentifier(e)&&(t.hasHelper=t.hasHelper||i(e.callee)),t}function i(e){return o.isMemberExpression(e)?i(e.object)||i(e.property):o.isIdentifier(e)?"require"===e.name||"_"===e.name[0]:o.isCallExpression(e)?i(e.callee):!(!o.isBinary(e)&&!o.isAssignmentExpression(e))&&(o.isIdentifier(e.left)&&i(e.left)||i(e.right))}function s(e){return o.isLiteral(e)||o.isObjectExpression(e)||o.isArrayExpression(e)||o.isIdentifier(e)||o.isMemberExpression(e)}var a=function(e){return e&&e.__esModule?e:{default:e}}(e("lodash/map")),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.nodes={AssignmentExpression:function(e){var t=n(e.right);if(t.hasCall&&t.hasHelper||t.hasFunction)return{before:t.hasFunction,after:!0}},SwitchCase:function(e,t){return{before:e.consequent.length||t.cases[0]===e}},LogicalExpression:function(e){if(o.isFunction(e.left)||o.isFunction(e.right))return{after:!0}},Literal:function(e){if("use strict"===e.value)return{after:!0}},CallExpression:function(e){if(o.isFunction(e.callee)||i(e))return{before:!0,after:!0}},VariableDeclaration:function(e){for(var t=0;t0?new g.default(n):null}return e.prototype.generate=function(e){return this.print(e),this._maybeAddAuxComment(),this._buf.get()},e.prototype.indent=function(){this.format.compact||this.format.concise||this._indent++},e.prototype.dedent=function(){this.format.compact||this.format.concise||this._indent--},e.prototype.semicolon=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._maybeAddAuxComment(),this._append(";",!e)},e.prototype.rightBrace=function(){this.format.minified&&this._buf.removeLastSemicolon(),this.token("}")},e.prototype.space=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.format.compact||(this._buf.hasContent()&&!this.endsWith(" ")&&!this.endsWith("\n")||e)&&this._space()},e.prototype.word=function(e){this._endsWithWord&&this._space(),this._maybeAddAuxComment(),this._append(e),this._endsWithWord=!0},e.prototype.number=function(e){this.word(e),this._endsWithInteger=(0,f.default)(+e)&&!E.test(e)&&!v.test(e)&&!x.test(e)&&"."!==e[e.length-1]},e.prototype.token=function(e){("--"===e&&this.endsWith("!")||"+"===e[0]&&this.endsWith("+")||"-"===e[0]&&this.endsWith("-")||"."===e[0]&&this._endsWithInteger)&&this._space(),this._maybeAddAuxComment(),this._append(e)},e.prototype.newline=function(e){if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else if(!(this.endsWith("\n\n")||("number"!=typeof e&&(e=1),e=Math.min(2,e),(this.endsWith("{\n")||this.endsWith(":\n"))&&e--,e<=0)))for(var t=0;t1&&void 0!==arguments[1]&&arguments[1];this._maybeAddParen(e),this._maybeIndent(e),t?this._buf.queue(e):this._buf.append(e),this._endsWithWord=!1,this._endsWithInteger=!1},e.prototype._maybeIndent=function(e){this._indent&&this.endsWith("\n")&&"\n"!==e[0]&&this._buf.queue(this._getIndent())},e.prototype._maybeAddParen=function(e){var t=this._parenPushNewlineState;if(t){this._parenPushNewlineState=null;var r=void 0;for(r=0;r2&&void 0!==arguments[2]?arguments[2]:{};if(e&&e.length){r.indent&&this.indent();for(var n={addNewlines:r.addNewlines},i=0;i1&&void 0!==arguments[1])||arguments[1];e.innerComments&&(t&&this.indent(),this._printComments(e.innerComments),t&&this.dedent())},e.prototype.printSequence=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r.statement=!0,this.printJoin(e,t,r)},e.prototype.printList=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==r.separator&&(r.separator=s),this.printJoin(e,t,r)},e.prototype._printNewline=function(e,t,r,n){var i=this;if(!this.format.retainLines&&!this.format.compact)if(this.format.concise)this.space();else{var s=0;if(null!=t.start&&!t._ignoreUserWhitespace&&this._whitespace)if(e){var a=t.leadingComments,o=a&&(0,p.default)(a,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesBefore(o||t)}else{var u=t.trailingComments,l=u&&(0,h.default)(u,function(e){return!!e.loc&&i.format.shouldPrintComment(e.value)});s=this._whitespace.getNewlinesAfter(l||t)}else{e||s++,n.addNewlines&&(s+=n.addNewlines(e,t)||0);var c=y.needsWhitespaceAfter;e&&(c=y.needsWhitespaceBefore),c(t,r)&&s++,this._buf.hasContent()||(s=0)}this.newline(s)}},e.prototype._getComments=function(e,t){return t&&(e?t.leadingComments:t.trailingComments)||[]},e.prototype._printComment=function(e){var t=this;if(this.format.shouldPrintComment(e.value)&&!e.ignore&&!this._printedComments.has(e)){if(this._printedComments.add(e),null!=e.start){if(this._printedCommentStarts[e.start])return;this._printedCommentStarts[e.start]=!0}this.newline(this._whitespace?this._whitespace.getNewlinesBefore(e):0),this.endsWith("[")||this.endsWith("{")||this.space();var r="CommentLine"===e.type?"//"+e.value+"\n":"/*"+e.value+"*/";if("CommentBlock"===e.type&&this.format.indent.adjustMultilineComment){var n=e.loc&&e.loc.start.column;if(n){var i=new RegExp("\\n\\s{1,"+n+"}","g");r=r.replace(i,"\n")}var s=Math.max(this._getIndent().length,this._buf.getCurrentColumn());r=r.replace(/\n(?!$)/g,"\n"+(0,d.default)(" ",s))}this.withSource("start",e.loc,function(){t._append(r)}),this.newline((this._whitespace?this._whitespace.getNewlinesAfter(e):0)+("CommentLine"===e.type?-1:0))}},e.prototype._printComments=function(e){if(e&&e.length)for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,o.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this._printComment(s)}},e}();r.default=A;for(var D=[e("./generators/template-literals"),e("./generators/expressions"),e("./generators/statements"),e("./generators/classes"),e("./generators/methods"),e("./generators/modules"),e("./generators/types"),e("./generators/flow"),e("./generators/base"),e("./generators/jsx")],C=0;C=0){for(;i&&e.start===n[i-1].start;)--i;t=n[i-1],r=n[i]}return this._getNewlinesBetween(t,r)},e.prototype.getNewlinesAfter=function(e){var t=void 0,r=void 0,n=this.tokens,i=this._findToken(function(t){return t.end-e.end},0,n.length);if(i>=0){for(;i&&e.end===n[i-1].end;)--i;t=n[i],","===(r=n[i+1]).type.label&&(r=n[i+2])}return r&&"eof"===r.type.label?1:this._getNewlinesBetween(t,r)},e.prototype._getNewlinesBetween=function(e,t){if(!t||!t.loc)return 0;for(var r=e?e.loc.end.line:1,n=t.loc.start.line,i=0,s=r;s=r)return-1;var n=t+r>>>1,i=e(this.tokens[n]);return i<0?this._findToken(e,n+1,r):i>0?this._findToken(e,t,n):0===i?n:-1},e}();r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],85:[function(e,t,r){arguments[4][55][0].apply(r,arguments)},{"./util":94,dup:55}],86:[function(e,t,r){arguments[4][56][0].apply(r,arguments)},{"./base64":87,dup:56}],87:[function(e,t,r){arguments[4][57][0].apply(r,arguments)},{dup:57}],88:[function(e,t,r){arguments[4][58][0].apply(r,arguments)},{dup:58}],89:[function(e,t,r){arguments[4][59][0].apply(r,arguments)},{"./util":94,dup:59}],90:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60}],91:[function(e,t,r){arguments[4][61][0].apply(r,arguments)},{"./array-set":85,"./base64-vlq":86,"./binary-search":88,"./quick-sort":90,"./util":94,dup:61}],92:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{"./array-set":85,"./base64-vlq":86,"./mapping-list":89,"./util":94,dup:62}],93:[function(e,t,r){arguments[4][63][0].apply(r,arguments)},{"./source-map-generator":92,"./util":94,dup:63}],94:[function(e,t,r){arguments[4][64][0].apply(r,arguments)},{dup:64}],95:[function(e,t,r){arguments[4][65][0].apply(r,arguments)},{"./lib/source-map-consumer":91,"./lib/source-map-generator":92,"./lib/source-node":93,dup:65}],96:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return!f.isClassMethod(e)&&!f.isObjectMethod(e)||"get"!==e.kind&&"set"!==e.kind?"value":e.kind}function s(e,t,r,n,s){var a=f.toKeyAlias(t),o={};if((0,h.default)(e,a)&&(o=e[a]),e[a]=o,o._inherits=o._inherits||[],o._inherits.push(t),o._key=t.key,t.computed&&(o._computed=!0),t.decorators){var u=o.decorators=o.decorators||f.arrayExpression([]);u.elements=u.elements.concat(t.decorators.map(function(e){return e.expression}).reverse())}if(o.value||o.initializer)throw n.buildCodeFrameError(t,"Key conflict with sibling node");var l=void 0,c=void 0;(f.isObjectProperty(t)||f.isObjectMethod(t)||f.isClassMethod(t))&&(l=f.toComputedKey(t,t.key)),f.isObjectProperty(t)||f.isClassProperty(t)?c=t.value:(f.isObjectMethod(t)||f.isClassMethod(t))&&((c=f.functionExpression(null,t.params,t.body,t.generator,t.async)).returnType=t.returnType);var d=i(t);return r&&"value"===d||(r=d),s&&f.isStringLiteral(l)&&("value"===r||"initializer"===r)&&f.isFunctionExpression(c)&&(c=(0,p.default)({id:l,node:c,scope:s})),c&&(f.inheritsComments(c,t),o[r]=c),o}function a(e){for(var t in e)if(e[t]._computed)return!0;return!1}function o(e){for(var t=f.arrayExpression([]),r=0;r1&&void 0!==arguments[1]&&arguments[1];(0,u.default)(this,e),this.forceSuperMemoisation=t.forceSuperMemoisation,this.methodPath=t.methodPath,this.methodNode=t.methodNode,this.superRef=t.superRef,this.isStatic=t.isStatic,this.hasSuper=!1,this.inClass=r,this.isLoose=t.isLoose,this.scope=this.methodPath.scope,this.file=t.file,this.opts=t,this.bareSupers=[],this.returns=[],this.thises=[]}return e.prototype.getObjectRef=function(){return this.opts.objectRef||this.opts.getObjectRef()},e.prototype.setSuperProperty=function(e,t,r){return h.callExpression(this.file.addHelper("set"),[o(this.getObjectRef(),this.isStatic),r?e:h.stringLiteral(e.name),t,h.thisExpression()])},e.prototype.getSuperProperty=function(e,t){return h.callExpression(this.file.addHelper("get"),[o(this.getObjectRef(),this.isStatic),t?e:h.stringLiteral(e.name),h.thisExpression()])},e.prototype.replace=function(){this.methodPath.traverse(d,this)},e.prototype.getLooseSuperProperty=function(e,t){var r=this.methodNode,n=this.superRef||h.identifier("Function");return t.property===e?void 0:h.isCallExpression(t,{callee:e})?void 0:h.isMemberExpression(t)&&!r.static?h.memberExpression(n,h.identifier("prototype")):n},e.prototype.looseHandle=function(e){var t=e.node;if(e.isSuper())return this.getLooseSuperProperty(t,e.parent);if(e.isCallExpression()){var r=t.callee;if(!h.isMemberExpression(r))return;if(!h.isSuper(r.object))return;return h.appendToMemberExpression(r,h.identifier("call")),t.arguments.unshift(h.thisExpression()),!0}},e.prototype.specHandleAssignmentExpression=function(e,t,r){return"="===r.operator?this.setSuperProperty(r.left.property,r.right,r.left.computed):(e=e||t.scope.generateUidIdentifier("ref"),[h.variableDeclaration("var",[h.variableDeclarator(e,r.left)]),h.expressionStatement(h.assignmentExpression("=",r.left,h.binaryExpression(r.operator[0],e,r.right)))])},e.prototype.specHandle=function(e){var t=void 0,r=void 0,n=void 0,i=e.parent,o=e.node;if(s(o,i))throw e.buildCodeFrameError(p.get("classesIllegalBareSuper"));if(h.isCallExpression(o)){var u=o.callee;if(h.isSuper(u))return;a(u)&&(t=u.property,r=u.computed,n=o.arguments)}else if(h.isMemberExpression(o)&&h.isSuper(o.object))t=o.property,r=o.computed;else{if(h.isUpdateExpression(o)&&a(o.argument)){var l=h.binaryExpression(o.operator[0],o.argument,h.numericLiteral(1));if(o.prefix)return this.specHandleAssignmentExpression(null,e,l);var c=e.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(c,e,l).concat(h.expressionStatement(c))}if(h.isAssignmentExpression(o)&&a(o.left))return this.specHandleAssignmentExpression(null,e,o)}if(t){var f=this.getSuperProperty(t,r);return n?this.optimiseCall(f,n):f}},e.prototype.optimiseCall=function(e,t){var r=h.thisExpression();return r[f]=!0,(0,c.default)(e,r,t)},e}();r.default=m,t.exports=r.default},{"babel-helper-optimise-call-expression":99,"babel-messages":103,"babel-runtime/core-js/symbol":122,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],101:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-template")),i={};r.default=i,i.typeof=(0,n.default)('\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) {\n return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype\n ? "symbol"\n : typeof obj;\n };\n'),i.jsx=(0,n.default)('\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n'),i.asyncIterator=(0,n.default)('\n (function (iterable) {\n if (typeof Symbol === "function") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n throw new TypeError("Object is not async iterable");\n })\n'),i.asyncGenerator=(0,n.default)('\n (function () {\n function AwaitValue(value) {\n this.value = value;\n }\n\n function AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg)\n var value = result.value;\n if (value instanceof AwaitValue) {\n Promise.resolve(value.value).then(\n function (arg) { resume("next", arg); },\n function (arg) { resume("throw", arg); });\n } else {\n settle(result.done ? "return" : "normal", result.value);\n }\n } catch (err) {\n settle("throw", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case "return":\n front.resolve({ value: value, done: true });\n break;\n case "throw":\n front.reject(value);\n break;\n default:\n front.resolve({ value: value, done: false });\n break;\n }\n\n front = front.next;\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n // Hide "return" method if generator return is not supported\n if (typeof gen.return !== "function") {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === "function" && Symbol.asyncIterator) {\n AsyncGenerator.prototype[Symbol.asyncIterator] = function () { return this; };\n }\n\n AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };\n AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };\n AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };\n\n return {\n wrap: function (fn) {\n return function () {\n return new AsyncGenerator(fn.apply(this, arguments));\n };\n },\n await: function (value) {\n return new AwaitValue(value);\n }\n };\n\n })()\n'),i.asyncGeneratorDelegate=(0,n.default)('\n (function (inner, awaitWrap) {\n var iter = {}, waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) { resolve(inner[key](value)); });\n return { done: false, value: awaitWrap(value) };\n };\n\n if (typeof Symbol === "function" && Symbol.iterator) {\n iter[Symbol.iterator] = function () { return this; };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n return pump("next", value);\n };\n\n if (typeof inner.throw === "function") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n return pump("throw", value);\n };\n }\n\n if (typeof inner.return === "function") {\n iter.return = function (value) {\n return pump("return", value);\n };\n }\n\n return iter;\n })\n'),i.asyncToGenerator=(0,n.default)('\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n step("next", value);\n }, function (err) {\n step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n'),i.classCallCheck=(0,n.default)('\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n'),i.createClass=(0,n.default)('\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n'),i.defineEnumerableProperties=(0,n.default)('\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n'),i.defaults=(0,n.default)("\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n"),i.defineProperty=(0,n.default)("\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n"),i.extends=(0,n.default)("\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n"),i.get=(0,n.default)('\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n'),i.inherits=(0,n.default)('\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n'),i.instanceof=(0,n.default)('\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n'),i.interopRequireDefault=(0,n.default)("\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n"),i.interopRequireWildcard=(0,n.default)("\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n"),i.newArrowCheck=(0,n.default)('\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n'),i.objectDestructuringEmpty=(0,n.default)('\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n'),i.objectWithoutProperties=(0,n.default)("\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n"),i.possibleConstructorReturn=(0,n.default)('\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n'),i.selfGlobal=(0,n.default)('\n typeof global === "undefined" ? self : global\n'),i.set=(0,n.default)('\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n'),i.slicedToArray=(0,n.default)('\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n'),i.slicedToArrayLoose=(0,n.default)('\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n'),i.taggedTemplateLiteral=(0,n.default)("\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n"),i.taggedTemplateLiteralLoose=(0,n.default)("\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n"),i.temporalRef=(0,n.default)('\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n'),i.temporalUndefined=(0,n.default)("\n ({})\n"),i.toArray=(0,n.default)("\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n"),i.toConsumableArray=(0,n.default)("\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n"),t.exports=r.default},{"babel-template":132}],102:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=a.default[e];if(!t)throw new ReferenceError("Unknown helper "+e);return t().expression}r.__esModule=!0,r.list=void 0;var s=n(e("babel-runtime/core-js/object/keys"));r.get=i;var a=n(e("./helpers"));r.list=(0,s.default)(a.default).map(function(e){return e.replace(/^_/,"")}).filter(function(e){return"__esModule"!==e});r.default=i},{"./helpers":101,"babel-runtime/core-js/object/keys":120}],103:[function(e,t,r){"use strict";function n(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n4&&void 0!==arguments[4]&&arguments[4];if(t||(t=e.node),!d.isFor(r))for(var s=0;s0&&e.traverse(v,t),e.skip()}},f.visitor]),v=h.default.visitors.merge([{ReferencedIdentifier:function(e,t){var r=t.letReferences[e.node.name];if(r){var n=e.scope.getBindingIdentifier(e.node.name);n&&n!==r||(t.closurify=!0)}}},f.visitor]),x={enter:function(e,t){var r=e.node;e.parent;if(e.isForStatement()){if(o(r.init)){var n=t.pushDeclar(r.init);1===n.length?r.init=n[0]:r.init=d.sequenceExpression(n)}}else if(e.isFor())o(r.left)&&(t.pushDeclar(r.left),r.left=r.left.declarations[0].id);else if(o(r))e.replaceWithMultiple(t.pushDeclar(r).map(function(e){return d.expressionStatement(e)}));else if(e.isFunction())return e.skip()}},E={LabeledStatement:function(e,t){var r=e.node;t.innerLabels.push(r.label.name)}},A={enter:function(e,t){if(e.isAssignmentExpression()||e.isUpdateExpression()){var r=e.getBindingIdentifiers();for(var n in r)t.outsideReferences[n]===e.scope.getBindingIdentifier(n)&&(t.reassignments[n]=!0)}}},D={Loop:function(e,t){var r=t.ignoreLabeless;t.ignoreLabeless=!0,e.traverse(D,t),t.ignoreLabeless=r,e.skip()},Function:function(e){e.skip()},SwitchCase:function(e,t){var r=t.inSwitchCase;t.inSwitchCase=!0,e.traverse(D,t),t.inSwitchCase=r,e.skip()},"BreakStatement|ContinueStatement|ReturnStatement":function(e,t){var r=e.node,n=e.parent,i=e.scope;if(!r[this.LOOP_IGNORE]){var s=void 0,a=u(r);if(a){if(r.label){if(t.innerLabels.indexOf(r.label.name)>=0)return;a=a+"|"+r.label.name}else{if(t.ignoreLabeless)return;if(t.inSwitchCase)return;if(d.isBreakStatement(r)&&d.isSwitchCase(n))return}t.hasBreakContinue=!0,t.map[a]=r,s=d.stringLiteral(a)}e.isReturnStatement()&&(t.hasReturn=!0,s=d.objectExpression([d.objectProperty(d.identifier("v"),r.argument||i.buildUndefinedNode())])),s&&((s=d.returnStatement(s))[this.LOOP_IGNORE]=!0,e.skip(),e.replaceWith(d.inherits(s,r)))}}},C=function(){function e(t,r,n,i,s){(0,p.default)(this,e),this.parent=n,this.scope=i,this.file=s,this.blockPath=r,this.block=r.node,this.outsideLetReferences=(0,c.default)(null),this.hasLetReferences=!1,this.letReferences=(0,c.default)(null),this.body=[],t&&(this.loopParent=t.parent,this.loopLabel=d.isLabeledStatement(this.loopParent)&&this.loopParent.label,this.loopPath=t,this.loop=t.node)}return e.prototype.run=function(){var e=this.block;if(!e._letDone){e._letDone=!0;var t=this.getLetReferences();if(d.isFunction(this.parent)||d.isProgram(this.block))this.updateScopeInfo();else if(this.hasLetReferences)return t?this.wrapClosure():this.remap(),this.updateScopeInfo(t),this.loopLabel&&!d.isLabeledStatement(this.loopParent)?d.labeledStatement(this.loopLabel,this.loop):void 0}},e.prototype.updateScopeInfo=function(e){var t=this.scope,r=t.getFunctionParent(),n=this.letReferences;for(var i in n){var s=n[i],a=t.getBinding(s.name);a&&("let"!==a.kind&&"const"!==a.kind||(a.kind="var",e?t.removeBinding(s.name):t.moveBindingTo(s.name,r)))}},e.prototype.remap=function(){var e=this.letReferences,t=this.scope;for(var r in e){var n=e[r];(t.parentHasBinding(r)||t.hasGlobal(r))&&(t.hasOwnBinding(r)&&t.rename(n.name),this.blockPath.scope.hasOwnBinding(r)&&this.blockPath.scope.rename(n.name))}},e.prototype.wrapClosure=function(){if(this.file.opts.throwIfClosureRequired)throw this.blockPath.buildCodeFrameError("Compiling let/const in this block would add a closure (throwIfClosureRequired).");var e=this.block,t=this.outsideLetReferences;if(this.loop)for(var r in t){var n=t[r];(this.scope.hasGlobal(n.name)||this.scope.parentHasBinding(n.name))&&(delete t[n.name],delete this.letReferences[n.name],this.scope.rename(n.name),this.letReferences[n.name]=n,t[n.name]=n)}this.has=this.checkLoop(),this.hoistVarDeclarations();var i=(0,m.default)(t),s=(0,m.default)(t),a=this.blockPath.isSwitchStatement(),o=d.functionExpression(null,i,d.blockStatement(a?[e]:e.body));o.shadow=!0,this.addContinuations(o);var u=o;this.loop&&(u=this.scope.generateUidIdentifier("loop"),this.loopPath.insertBefore(d.variableDeclaration("var",[d.variableDeclarator(u,o)])));var l=d.callExpression(u,s),c=this.scope.generateUidIdentifier("ret");h.default.hasType(o.body,this.scope,"YieldExpression",d.FUNCTION_TYPES)&&(o.generator=!0,l=d.yieldExpression(l,!0)),h.default.hasType(o.body,this.scope,"AwaitExpression",d.FUNCTION_TYPES)&&(o.async=!0,l=d.awaitExpression(l)),this.buildClosure(c,l),a?this.blockPath.replaceWithMultiple(this.body):e.body=this.body},e.prototype.buildClosure=function(e,t){var r=this.has;r.hasReturn||r.hasBreakContinue?this.buildHas(e,t):this.body.push(d.expressionStatement(t))},e.prototype.addContinuations=function(e){var t={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(e,A,t);for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:"value",n=arguments[3],i=void 0;e.static?(this.hasStaticDescriptors=!0,i=this.staticMutatorMap):(this.hasInstanceDescriptors=!0,i=this.instanceMutatorMap);var s=c.push(i,e,r,this.file,n);return t&&(s.enumerable=h.booleanLiteral(!0)),s},e.prototype.constructorMeMaybe=function(){for(var e=!1,t=this.path.get("body.body"),r=Array.isArray(t),n=0,t=r?t:(0,s.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}if(e=i.equals("kind","constructor"))break}if(!e){var a=void 0,o=void 0;if(this.isDerived){var u=f().expression;a=u.params,o=u.body}else a=[],o=h.blockStatement([]);this.path.get("body").unshiftContainer("body",h.classMethod("constructor",h.identifier("constructor"),a,o))}},e.prototype.buildBody=function(){if(this.constructorMeMaybe(),this.pushBody(),this.verifyConstructor(),this.userConstructor){var e=this.constructorBody;e.body=e.body.concat(this.userConstructor.body.body),h.inherits(this.constructor,this.userConstructor),h.inherits(e,this.userConstructor.body)}this.pushDescriptors()},e.prototype.pushBody=function(){for(var e=this.path.get("body.body"),t=Array.isArray(e),r=0,e=t?e:(0,s.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}var i=n,a=i.node;if(i.isClassProperty())throw i.buildCodeFrameError("Missing class properties transform.");if(a.decorators)throw i.buildCodeFrameError("Method has decorators, put the decorator plugin before the classes one.");if(h.isClassMethod(a)){var o="constructor"===a.kind;if(o&&(i.traverse(m,this),!this.hasBareSuper&&this.isDerived))throw i.buildCodeFrameError("missing super() call in constructor");var l=new u.default({forceSuperMemoisation:o,methodPath:i,methodNode:a,objectRef:this.classRef,superRef:this.superName,isStatic:a.static,isLoose:this.isLoose,scope:this.scope,file:this.file},!0);l.replace(),o?this.pushConstructor(l,a,i):this.pushMethod(a,i)}}},e.prototype.clearDescriptors=function(){this.hasInstanceDescriptors=!1,this.hasStaticDescriptors=!1,this.instanceMutatorMap={},this.staticMutatorMap={}},e.prototype.pushDescriptors=function(){this.pushInherits();var e=this.body,t=void 0,r=void 0;if(this.hasInstanceDescriptors&&(t=c.toClassObject(this.instanceMutatorMap)),this.hasStaticDescriptors&&(r=c.toClassObject(this.staticMutatorMap)),t||r){t&&(t=c.toComputedObjectFromClass(t)),r&&(r=c.toComputedObjectFromClass(r));var n=h.nullLiteral(),i=[this.classRef,n,n,n,n];t&&(i[1]=t),r&&(i[2]=r),this.instanceInitializersId&&(i[3]=this.instanceInitializersId,e.unshift(this.buildObjectAssignment(this.instanceInitializersId))),this.staticInitializersId&&(i[4]=this.staticInitializersId,e.unshift(this.buildObjectAssignment(this.staticInitializersId)));for(var s=0,a=0;a=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c;this.wrapSuperCall(p,i,a,r),n&&p.find(function(e){return e===t||(e.isLoop()||e.isConditional()?(n=!1,!0):void 0)})}for(var f=this.superThises,d=Array.isArray(f),m=0,f=d?f:(0,s.default)(f);;){var g;if(d){if(m>=f.length)break;g=f[m++]}else{if((m=f.next()).done)break;g=m.value}g.replaceWith(a)}var b=function(t){return h.callExpression(e.file.addHelper("possibleConstructorReturn"),[a].concat(t||[]))},v=r.get("body");v.length&&!v.pop().isReturnStatement()&&r.pushContainer("body",h.returnStatement(n?a:b()));for(var x=this.superReturns,E=Array.isArray(x),A=0,x=E?x:(0,s.default)(x);;){var D;if(E){if(A>=x.length)break;D=x[A++]}else{if((A=x.next()).done)break;D=A.value}var C=D;if(C.node.argument){var S=C.scope.generateDeclaredUidIdentifier("ret");C.get("argument").replaceWithMultiple([h.assignmentExpression("=",S,C.node.argument),b(S)])}else C.get("argument").replaceWith(b())}}},e.prototype.pushMethod=function(e,t){var r=t?t.scope:this.scope;"method"===e.kind&&this._processMethod(e,r)||this.pushToMap(e,!1,null,r)},e.prototype._processMethod=function(){return!1},e.prototype.pushConstructor=function(e,t,r){this.bareSupers=e.bareSupers,this.superReturns=e.returns,r.scope.hasOwnBinding(this.classRef.name)&&r.scope.rename(this.classRef.name);var n=this.constructor;this.userConstructorPath=r,this.userConstructor=t,this.hasConstructor=!0,h.inheritsComments(n,t),n._ignoreUserWhitespace=!0,n.params=t.params,h.inherits(n.body,t.body),n.body.directives=t.body.directives,this._pushConstructor()},e.prototype._pushConstructor=function(){this.pushedConstructor||(this.pushedConstructor=!0,(this.hasInstanceDescriptors||this.hasStaticDescriptors)&&this.pushDescriptors(),this.body.push(this.constructor),this.pushInherits())},e.prototype.pushInherits=function(){this.isDerived&&!this.pushedInherits&&(this.pushedInherits=!0,this.body.unshift(h.expressionStatement(h.callExpression(this.file.addHelper("inherits"),[this.classRef,this.superName]))))},e}();r.default=g,t.exports=r.default},{"babel-helper-define-map":96,"babel-helper-optimise-call-expression":99,"babel-helper-replace-supers":100,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-template":132,"babel-traverse":136,"babel-types":169}],112:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e){function t(e){var t=e.node,r=e.scope,n=[],i=t.right;if(!a.isIdentifier(i)||!r.hasBinding(i.name)){var s=r.generateUidIdentifier("arr");n.push(a.variableDeclaration("var",[a.variableDeclarator(s,i)])),i=s}var u=r.generateUidIdentifier("i"),l=o({BODY:t.body,KEY:u,ARR:i});a.inherits(l,t),a.ensureBlock(l);var c=a.memberExpression(i,u,!0),p=t.left;return a.isVariableDeclaration(p)?(p.declarations[0].init=c,l.body.body.unshift(p)):l.body.body.unshift(a.expressionStatement(a.assignmentExpression("=",p,c))),e.parentPath.isLabeledStatement()&&(l=a.labeledStatement(e.parentPath.node.label,l)),n.push(l),n}function r(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,l=void 0,c=void 0;if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))c=o;else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));c=n.generateUidIdentifier("ref"),l=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,c)])}var p=n.generateUidIdentifier("iterator"),h=n.generateUidIdentifier("isArray"),f=u({LOOP_OBJECT:p,IS_ARRAY:h,OBJECT:r.right,INDEX:n.generateUidIdentifier("i"),ID:c});l||f.body.body.shift();var d=a.isLabeledStatement(s),m=void 0;return d&&(m=a.labeledStatement(s.label,f)),{replaceParent:d,declar:l,node:m||f,loop:f}}function n(e,t){var r=e.node,n=e.scope,s=e.parent,o=r.left,u=void 0,c=n.generateUidIdentifier("step"),p=a.memberExpression(c,a.identifier("value"));if(a.isIdentifier(o)||a.isPattern(o)||a.isMemberExpression(o))u=a.expressionStatement(a.assignmentExpression("=",o,p));else{if(!a.isVariableDeclaration(o))throw t.buildCodeFrameError(o,i.get("unknownForHead",o.type));u=a.variableDeclaration(o.kind,[a.variableDeclarator(o.declarations[0].id,p)])}var h=n.generateUidIdentifier("iterator"),f=l({ITERATOR_HAD_ERROR_KEY:n.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:n.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:n.generateUidIdentifier("iteratorError"),ITERATOR_KEY:h,STEP_KEY:c,OBJECT:r.right,BODY:null}),d=a.isLabeledStatement(s),m=f[3].block.body,y=m[0];return d&&(m[0]=a.labeledStatement(s.label,y)),{replaceParent:d,declar:u,loop:y,node:f}}var i=e.messages,s=e.template,a=e.types,o=s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "),u=s("\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n "),l=s("\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n ");return{visitor:{ForOfStatement:function(e,i){if(e.get("right").isArrayExpression())return e.parentPath.isLabeledStatement()?e.parentPath.replaceWithMultiple(t(e)):e.replaceWithMultiple(t(e));var s=n;i.opts.loose&&(s=r);var o=e.node,u=s(e,i),l=u.declar,c=u.loop,p=c.body;e.ensureBlock(),l&&p.body.push(l),p.body=p.body.concat(o.body.body),a.inherits(c,o),a.inherits(c.body,o.body),u.replaceParent?(e.parentPath.replaceWithMultiple(u.node),e.remove()):e.replaceWithMultiple(u.node)}}}},t.exports=r.default},{}],113:[function(e,t,r){t.exports={default:e("core-js/library/fn/get-iterator"),__esModule:!0}},{"core-js/library/fn/get-iterator":187}],114:[function(e,t,r){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":188}],115:[function(e,t,r){t.exports={default:e("core-js/library/fn/map"),__esModule:!0}},{"core-js/library/fn/map":189}],116:[function(e,t,r){t.exports={default:e("core-js/library/fn/number/max-safe-integer"),__esModule:!0}},{"core-js/library/fn/number/max-safe-integer":190}],117:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":191}],118:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":192}],119:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/get-own-property-symbols"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-symbols":193}],120:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":194}],121:[function(e,t,r){t.exports={default:e("core-js/library/fn/object/set-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/set-prototype-of":195}],122:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":197}],123:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/for"),__esModule:!0}},{"core-js/library/fn/symbol/for":196}],124:[function(e,t,r){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":198}],125:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-map"),__esModule:!0}},{"core-js/library/fn/weak-map":199}],126:[function(e,t,r){t.exports={default:e("core-js/library/fn/weak-set"),__esModule:!0}},{"core-js/library/fn/weak-set":200}],127:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],128:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../core-js/object/set-prototype-of")),s=n(e("../core-js/object/create")),a=n(e("../helpers/typeof"));r.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,a.default)(t)));e.prototype=(0,s.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(i.default?(0,i.default)(e,t):e.__proto__=t)}},{"../core-js/object/create":118,"../core-js/object/set-prototype-of":121,"../helpers/typeof":131}],129:[function(e,t,r){"use strict";r.__esModule=!0,r.default=function(e,t){var r={};for(var n in e)t.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}},{}],130:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("../helpers/typeof"));r.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,n.default)(t))&&"function"!=typeof t?e:t}},{"../helpers/typeof":131}],131:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("../core-js/symbol/iterator")),s=n(e("../core-js/symbol")),a="function"==typeof s.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":typeof e};r.default="function"==typeof s.default&&"symbol"===a(i.default)?function(e){return void 0===e?"undefined":a(e)}:function(e){return e&&"function"==typeof s.default&&e.constructor===s.default&&e!==s.default.prototype?"symbol":void 0===e?"undefined":a(e)}},{"../core-js/symbol":122,"../core-js/symbol/iterator":124}],132:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var r=(e=(0,o.default)(e)).program;return t.length&&(0,c.default)(e,m,null,t),r.body.length>1?r.body:r.body[0]}r.__esModule=!0;var a=i(e("babel-runtime/core-js/symbol"));r.default=function(e,t){var r=void 0;try{throw new Error}catch(e){e.stack&&(r=e.stack.split("\n").slice(1).join("\n"))}t=(0,u.default)({allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,preserveComments:!1},t);var n=function(){var i=void 0;try{i=p.parse(e,t),i=c.default.removeProperties(i,{preserveComments:t.preserveComments}),c.default.cheap(i,function(e){e[f]=!0})}catch(e){throw e.stack=e.stack+"from\n"+r,e}return n=function(){return i},i};return function(){for(var e=arguments.length,t=Array(e),r=0;r=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}if(e[o])return!0}return!1},e.prototype.create=function(e,t,r,n){return o.default.get({parentPath:this.parentPath,parent:e,container:t,key:r,listKey:n})},e.prototype.maybeQueue=function(e,t){if(this.trap)throw new Error("Infinite cycle detected");this.queue&&(t?this.queue.push(e):this.priorityQueue.push(e))},e.prototype.visitMultiple=function(e,t,r){if(0===e.length)return!1;for(var n=[],i=0;i=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;if(u.resync(),0!==u.contexts.length&&u.contexts[u.contexts.length-1]===this||u.pushContext(this),null!==u.key&&(l&&e.length>=1e4&&(this.trap=!0),!(t.indexOf(u.node)>=0))){if(t.push(u.node),u.visit()){r=!0;break}if(this.priorityQueue.length&&(r=this.visitQueue(this.priorityQueue),this.priorityQueue=[],this.queue=e,r))break}}for(var c=e,p=Array.isArray(c),h=0,c=p?c:(0,s.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}f.popContext()}return this.queue=null,r},e.prototype.visit=function(e,t){var r=e[t];return!!r&&(Array.isArray(r)?this.visitMultiple(r,e,t):this.visitSingle(e,t))},e}();r.default=c,t.exports=r.default}).call(this,e("_process"))},{"./path":143,_process:538,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],135:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck")),i=function e(t,r){(0,n.default)(this,e),this.file=t,this.options=r};r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],136:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r,n,i){if(e){if(t||(t={}),!t.noScope&&!r&&"Program"!==e.type&&"File"!==e.type)throw new Error(f.get("traverseNeedsParent",e.type));h.explode(t),s.node(e,t,r,n,i)}}function a(e,t){e.node.type===t.type&&(t.has=!0,e.stop())}r.__esModule=!0,r.visitors=r.Hub=r.Scope=r.NodePath=void 0;var o=i(e("babel-runtime/core-js/get-iterator")),u=e("./path");Object.defineProperty(r,"NodePath",{enumerable:!0,get:function(){return i(u).default}});var l=e("./scope");Object.defineProperty(r,"Scope",{enumerable:!0,get:function(){return i(l).default}});var c=e("./hub");Object.defineProperty(r,"Hub",{enumerable:!0,get:function(){return i(c).default}}),r.default=s;var p=i(e("./context")),h=n(e("./visitors")),f=n(e("babel-messages")),d=i(e("lodash/includes")),m=n(e("babel-types")),y=n(e("./cache"));r.visitors=h,s.visitors=h,s.verify=h.verify,s.explode=h.explode,s.NodePath=e("./path"),s.Scope=e("./scope"),s.Hub=e("./hub"),s.cheap=function(e,t){return m.traverseFast(e,t)},s.node=function(e,t,r,n,i,s){var a=m.VISITOR_KEYS[e.type];if(a)for(var u=new p.default(r,t,n,i),l=a,c=Array.isArray(l),h=0,l=c?l:(0,o.default)(l);;){var f;if(c){if(h>=l.length)break;f=l[h++]}else{if((h=l.next()).done)break;f=h.value}var d=f;if((!s||!s[d])&&u.visit(e,d))return}},s.clearNode=function(e,t){m.removeProperties(e,t),y.path.delete(e)},s.removeProperties=function(e,t){return m.traverseFast(e,s.clearNode,t),e},s.hasType=function(e,t,r,n){if((0,d.default)(n,e.type))return!1;if(e.type===r)return!0;var i={has:!1,type:r};return s(e,{blacklist:n,enter:a},t,i),i.has},s.clearCache=function(){y.clear()},s.clearCache.clearPath=y.clearPath,s.clearCache.clearScope=y.clearScope,s.copyCache=function(e,t){y.path.has(e)&&y.path.set(t,y.path.get(e))}},{"./cache":133,"./context":134,"./hub":135,"./path":143,"./scope":155,"./visitors":157,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-types":169,"lodash/includes":495}],137:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){for(var t=this;t=t.parentPath;)if(e(t))return t;return null}function s(e){var t=this;do{if(e(t))return t}while(t=t.parentPath);return null}function a(){return this.findParent(function(e){return e.isFunction()||e.isProgram()})}function o(){var e=this;do{if(Array.isArray(e.container))return e}while(e=e.parentPath)}function u(e){return this.getDeepestCommonAncestorFrom(e,function(e,t,r){for(var n=void 0,i=y.VISITOR_KEYS[e.type],s=r,a=Array.isArray(s),o=0,s=a?s:(0,m.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u[t+1];n?l.listKey&&n.listKey===l.listKey&&l.keyi.indexOf(l.parentKey)&&(n=l):n=l}return n})}function l(e,t){var r=this;if(!e.length)return this;if(1===e.length)return e[0];var n=1/0,i=void 0,s=void 0,a=e.map(function(e){var t=[];do{t.unshift(e)}while((e=e.parentPath)&&e!==r);return t.length=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}if(f[u]!==l)break e}i=u,s=l}if(s)return t?t(s,i,a):s;throw new Error("Couldn't find intersection")}function c(){var e=this,t=[];do{t.push(e)}while(e=e.parentPath);return t}function p(e){return e.isDescendant(this)}function h(e){return!!this.findParent(function(t){return t===e})}function f(){for(var e=this;e;){for(var t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,m.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;if(e.node.type===s)return!0}e=e.parentPath}return!1}function d(e){var t=this.isFunction()?this:this.findParent(function(e){return e.isFunction()});if(t){if(t.isFunctionExpression()||t.isFunctionDeclaration()){var r=t.node.shadow;if(r&&(!e||!1!==r[e]))return t}else if(t.isArrowFunctionExpression())return t;return null}}r.__esModule=!0;var m=n(e("babel-runtime/core-js/get-iterator"));r.findParent=i,r.find=s,r.getFunctionParent=a,r.getStatementParent=o,r.getEarliestCommonAncestorFrom=u,r.getDeepestCommonAncestorFrom=l,r.getAncestry=c,r.isAncestor=p,r.isDescendant=h,r.inType=f,r.inShadow=d;var y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));n(e("./index"))},{"./index":143,"babel-runtime/core-js/get-iterator":113,"babel-types":169}],138:[function(e,t,r){"use strict";function n(){if("string"!=typeof this.key){var e=this.node;if(e){var t=e.trailingComments,r=e.leadingComments;if(t||r){var n=this.getSibling(this.key-1),i=this.getSibling(this.key+1);n.node||(n=i),i.node||(i=n),n.addComments("trailing",r),i.addComments("leading",t)}}}}function i(e,t,r){this.addComments(e,[{type:r?"CommentLine":"CommentBlock",value:t}])}function s(e,t){if(t){var r=this.node;if(r){var n=e+"Comments";r[n]?r[n]=r[n].concat(t):r[n]=t}}}r.__esModule=!0,r.shareCommentsWithSiblings=n,r.addComment=i,r.addComments=s},{}],139:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=this.opts;return this.debug(function(){return e}),!(!this.node||!this._call(t[e]))||!!this.node&&this._call(t[this.node.type]&&t[this.node.type][e])}function s(e){if(!e)return!1;for(var t=e,r=Array.isArray(t),n=0,t=r?t:(0,C.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;if(s){var a=this.node;if(!a)return!0;if(s.call(this.state,this,this.state))throw new Error("Unexpected return value from visitor method "+s);if(this.node!==a)return!0;if(this.shouldStop||this.shouldSkip||this.removed)return!0}}return!1}function a(){var e=this.opts.blacklist;return e&&e.indexOf(this.node.type)>-1}function o(){return!!this.node&&(!this.isBlacklisted()&&((!this.opts.shouldSkip||!this.opts.shouldSkip(this))&&(this.call("enter")||this.shouldSkip?(this.debug(function(){return"Skip..."}),this.shouldStop):(this.debug(function(){return"Recursing into..."}),S.default.node(this.node,this.opts,this.scope,this.state,this,this.skipKeys),this.call("exit"),this.shouldStop))))}function u(){this.shouldSkip=!0}function l(e){this.skipKeys[e]=!0}function c(){this.shouldStop=!0,this.shouldSkip=!0}function p(){if(!this.opts||!this.opts.noScope){var e=this.context&&this.context.scope;if(!e)for(var t=this.parentPath;t&&!e;){if(t.opts&&t.opts.noScope)return;e=t.scope,t=t.parentPath}this.scope=this.getScope(e),this.scope&&this.scope.init()}}function h(e){return this.shouldSkip=!1,this.shouldStop=!1,this.removed=!1,this.skipKeys={},e&&(this.context=e,this.state=e.state,this.opts=e.opts),this.setScope(),this}function f(){this.removed||(this._resyncParent(),this._resyncList(),this._resyncKey())}function d(){this.parentPath&&(this.parent=this.parentPath.node)}function m(){if(this.container&&this.node!==this.container[this.key]){if(Array.isArray(this.container)){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:this;if(!e.removed)for(var t=this.contexts,r=Array.isArray(t),n=0,t=r?t:(0,C.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}i.maybeQueue(e)}}function D(){for(var e=this,t=this.contexts;!t.length;)t=(e=e.parentPath).contexts;return t}r.__esModule=!0;var C=n(e("babel-runtime/core-js/get-iterator"));r.call=i,r._call=s,r.isBlacklisted=a,r.visit=o,r.skip=u,r.skipKey=l,r.stop=c,r.setScope=p,r.setContext=h,r.resync=f,r._resyncParent=d,r._resyncKey=m,r._resyncList=y,r._resyncRemoved=g,r.popContext=b,r.pushContext=v,r.setup=x,r.setKey=E,r.requeue=A,r._getQueueContexts=D;var S=n(e("../index"))},{"../index":136,"babel-runtime/core-js/get-iterator":113}],140:[function(e,t,r){"use strict";function n(){var e=this.node,t=void 0;if(this.isMemberExpression())t=e.property;else{if(!this.isProperty()&&!this.isMethod())throw new ReferenceError("todo");t=e.key}return e.computed||a.isIdentifier(t)&&(t=a.stringLiteral(t.name)),t}function i(){return a.ensureBlock(this.node)}function s(){if(this.isArrowFunctionExpression()){this.ensureBlock();var e=this.node;e.expression=!1,e.type="FunctionExpression",e.shadow=e.shadow||!0}}r.__esModule=!0,r.toComputedKey=n,r.ensureBlock=i,r.arrowFunctionToShadowed=s;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"babel-types":169}],141:[function(e,t,r){(function(t){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this.evaluate();if(e.confident)return!!e.value}function s(){function e(e){i&&(s=e,i=!1)}function r(t){var r=t.node;if(p.has(r)){var s=p.get(r);return s.resolved?s.value:void e(t)}var a={resolved:!1};p.set(r,a);var o=n(t);return i&&(a.resolved=!0,a.value=o),o}function n(n){if(i){var s=n.node;if(n.isSequenceExpression()){var u=n.get("expressions");return r(u[u.length-1])}if(n.isStringLiteral()||n.isNumericLiteral()||n.isBooleanLiteral())return s.value;if(n.isNullLiteral())return null;if(n.isTemplateLiteral()){for(var p="",h=0,f=n.get("expressions"),d=s.quasis,m=Array.isArray(d),y=0,d=m?d:(0,o.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if((y=d.next()).done)break;g=y.value}var b=g;if(!i)break;p+=b.value.cooked;var v=f[h++];v&&(p+=String(r(v)))}if(!i)return;return p}if(n.isConditionalExpression()){var x=r(n.get("test"));if(!i)return;return r(x?n.get("consequent"):n.get("alternate"))}if(n.isExpressionWrapper())return r(n.get("expression"));if(n.isMemberExpression()&&!n.parentPath.isCallExpression({callee:s})){var E=n.get("property"),A=n.get("object");if(A.isLiteral()&&E.isIdentifier()){var D=A.node.value,C=void 0===D?"undefined":(0,a.default)(D);if("number"===C||"string"===C)return D[E.node.name]}}if(n.isReferencedIdentifier()){var S=n.scope.getBinding(s.name);if(S&&S.constantViolations.length>0)return e(S.path);if(S&&n.node.start=T.length)break;O=T[B++]}else{if((B=T.next()).done)break;O=B.value}var j=O;if(!(j=j.evaluate()).confident)return e(j);F.push(j.value)}return F}if(n.isObjectExpression()){for(var N={},I=n.get("properties"),L=Array.isArray(I),M=0,I=L?I:(0,o.default)(I);;){var R;if(L){if(M>=I.length)break;R=I[M++]}else{if((M=I.next()).done)break;R=M.value}var V=R;if(V.isObjectMethod()||V.isSpreadProperty())return e(V);var U=V.get("key"),q=U;if(V.node.computed){if(!(q=q.evaluate()).confident)return e(U);q=q.value}else q=q.isIdentifier()?q.node.name:q.node.value;var G=V.get("value"),X=G.evaluate();if(!X.confident)return e(G);X=X.value,N[q]=X}return N}if(n.isLogicalExpression()){var J=i,W=r(n.get("left")),K=i;i=J;var z=r(n.get("right")),Y=i;switch(i=K&&Y,s.operator){case"||":if(W&&K)return i=!0,W;if(!i)return;return W||z;case"&&":if((!W&&K||!z&&Y)&&(i=!0),!i)return;return W&&z}}if(n.isBinaryExpression()){var H=r(n.get("left"));if(!i)return;var $=r(n.get("right"));if(!i)return;switch(s.operator){case"-":return H-$;case"+":return H+$;case"/":return H/$;case"*":return H*$;case"%":return H%$;case"**":return Math.pow(H,$);case"<":return H<$;case">":return H>$;case"<=":return H<=$;case">=":return H>=$;case"==":return H==$;case"!=":return H!=$;case"===":return H===$;case"!==":return H!==$;case"|":return H|$;case"&":return H&$;case"^":return H^$;case"<<":return H<<$;case">>":return H>>$;case">>>":return H>>>$}}if(n.isCallExpression()){var Q=n.get("callee"),Z=void 0,ee=void 0;if(Q.isIdentifier()&&!n.scope.getBinding(Q.node.name,!0)&&l.indexOf(Q.node.name)>=0&&(ee=t[s.callee.name]),Q.isMemberExpression()){var te=Q.get("object"),re=Q.get("property");if(te.isIdentifier()&&re.isIdentifier()&&l.indexOf(te.node.name)>=0&&c.indexOf(re.node.name)<0&&(ee=(Z=t[te.node.name])[re.node.name]),te.isLiteral()&&re.isIdentifier()){var ne=(0,a.default)(te.node.value);"string"!==ne&&"number"!==ne||(ee=(Z=te.node.value)[re.node.name])}}if(ee){var ie=n.get("arguments").map(r);if(!i)return;return ee.apply(Z,ie)}}e(n)}}var i=!0,s=void 0,p=new u.default,h=r(this);return i||(h=void 0),{confident:i,deopt:s,value:h}}r.__esModule=!0;var a=n(e("babel-runtime/helpers/typeof")),o=n(e("babel-runtime/core-js/get-iterator")),u=n(e("babel-runtime/core-js/map"));r.evaluateTruthy=i,r.evaluate=s;var l=["String","Number","Math"],c=["random"]}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/map":115,"babel-runtime/helpers/typeof":131}],142:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){var e=this;do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement())break;e=e.parentPath}while(e);if(e&&(e.isProgram()||e.isFile()))throw new Error("File/Program node, we can't possibly find a statement parent to this");return e}function s(){return"left"===this.key?this.getSibling("right"):"right"===this.key?this.getSibling("left"):void 0}function a(){var e=[],t=function(t){t&&(e=e.concat(t.getCompletionRecords()))};if(this.isIfStatement())t(this.get("consequent")),t(this.get("alternate"));else if(this.isDoExpression()||this.isFor()||this.isWhile())t(this.get("body"));else if(this.isProgram()||this.isBlockStatement())t(this.get("body").pop());else{if(this.isFunction())return this.get("body").getCompletionRecords();this.isTryStatement()?(t(this.get("block")),t(this.get("handler")),t(this.get("finalizer"))):e.push(this)}return e}function o(e){return E.default.get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:e})}function u(){return this.getSibling(this.key-1)}function l(){return this.getSibling(this.key+1)}function c(){for(var e=this.key,t=this.getSibling(++e),r=[];t.node;)r.push(t),t=this.getSibling(++e);return r}function p(){for(var e=this.key,t=this.getSibling(--e),r=[];t.node;)r.push(t),t=this.getSibling(--e);return r}function h(e,t){!0===t&&(t=this.context);var r=e.split(".");return 1===r.length?this._getKey(e,t):this._getPattern(r,t)}function f(e,t){var r=this,n=this.node,i=n[e];return Array.isArray(i)?i.map(function(s,a){return E.default.get({listKey:e,parentPath:r,parent:n,container:i,key:a}).setContext(t)}):E.default.get({parentPath:this,parent:n,container:n,key:e}).setContext(t)}function d(e,t){for(var r=this,n=e,i=Array.isArray(n),s=0,n=i?n:(0,x.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;r="."===o?r.parentPath:Array.isArray(r)?r[o]:r.get(o,t)}return r}function m(e){return A.getBindingIdentifiers(this.node,e)}function y(e){return A.getOuterBindingIdentifiers(this.node,e)}function g(){for(var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this,n=[].concat(r),i=(0,v.default)(null);n.length;){var s=n.shift();if(s&&s.node){var a=A.getBindingIdentifiers.keys[s.node.type];if(s.isIdentifier())e?(i[s.node.name]=i[s.node.name]||[]).push(s):i[s.node.name]=s;else if(s.isExportDeclaration()){var o=s.get("declaration");o.isDeclaration()&&n.push(o)}else{if(t){if(s.isFunctionDeclaration()){n.push(s.get("id"));continue}if(s.isFunctionExpression())continue}if(a)for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:SyntaxError;return this.hub.file.buildCodeFrameError(this.node,e,t)},e.prototype.traverse=function(e,t){(0,c.default)(this.node,e,this.scope,t,this)},e.prototype.mark=function(e,t){this.hub.file.metadata.marked.push({type:e,message:t,loc:this.node.loc})},e.prototype.set=function(e,t){f.validate(this.node,e,t),this.node[e]=t},e.prototype.getPathLocation=function(){var e=[],t=this;do{var r=t.key;t.inList&&(r=t.listKey+"["+r+"]"),e.unshift(r)}while(t=t.parentPath);return e.join(".")},e.prototype.debug=function(e){m.enabled&&m(this.getPathLocation()+" "+this.type+": "+e())},e}();r.default=y,(0,p.default)(y.prototype,e("./ancestry")),(0,p.default)(y.prototype,e("./inference")),(0,p.default)(y.prototype,e("./replacement")),(0,p.default)(y.prototype,e("./evaluation")),(0,p.default)(y.prototype,e("./conversion")),(0,p.default)(y.prototype,e("./introspection")),(0,p.default)(y.prototype,e("./context")),(0,p.default)(y.prototype,e("./removal")),(0,p.default)(y.prototype,e("./modification")),(0,p.default)(y.prototype,e("./family")),(0,p.default)(y.prototype,e("./comments"));for(var g=f.TYPES,b=Array.isArray(g),v=0,g=b?g:(0,s.default)(g);;){var x;if("break"===function(){if(b){if(v>=g.length)return"break";x=g[v++]}else{if((v=g.next()).done)return"break";x=v.value}var e=x,t="is"+e;y.prototype[t]=function(e){return f[t](this.node,e)},y.prototype["assert"+e]=function(r){if(!this[t](r))throw new TypeError("Expected node path of type "+e)}}())break}for(var E in o){(function(e){if("_"===e[0])return"continue";f.TYPES.indexOf(e)<0&&f.TYPES.push(e);var t=o[e];y.prototype["is"+e]=function(e){return t.checkPath(this,e)}})(E)}t.exports=r.default},{"../cache":133,"../index":136,"../scope":155,"./ancestry":137,"./comments":138,"./context":139,"./conversion":140,"./evaluation":141,"./family":142,"./inference":144,"./introspection":147,"./lib/virtual-types":150,"./modification":151,"./removal":152,"./replacement":153,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169,debug:295,invariant:306,"lodash/assign":476}],144:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(){if(this.typeAnnotation)return this.typeAnnotation;var e=this._getTypeAnnotation()||f.anyTypeAnnotation();return f.isTypeAnnotation(e)&&(e=e.typeAnnotation),this.typeAnnotation=e}function s(){var e=this.node;{if(e){if(e.typeAnnotation)return e.typeAnnotation;var t=h[e.type];return t?t.call(this,e):(t=h[this.parentPath.type],t&&t.validParent?this.parentPath.getTypeAnnotation():void 0)}if("init"===this.key&&this.parentPath.isVariableDeclarator()){var r=this.parentPath.parentPath,n=r.parentPath;return"left"===r.key&&n.isForInStatement()?f.stringTypeAnnotation():"left"===r.key&&n.isForOfStatement()?f.anyTypeAnnotation():f.voidTypeAnnotation()}}}function a(e,t){return o(e,this.getTypeAnnotation(),t)}function o(e,t,r){if("string"===e)return f.isStringTypeAnnotation(t);if("number"===e)return f.isNumberTypeAnnotation(t);if("boolean"===e)return f.isBooleanTypeAnnotation(t);if("any"===e)return f.isAnyTypeAnnotation(t);if("mixed"===e)return f.isMixedTypeAnnotation(t);if("empty"===e)return f.isEmptyTypeAnnotation(t);if("void"===e)return f.isVoidTypeAnnotation(t);if(r)return!1;throw new Error("Unknown base type "+e)}function u(e){var t=this.getTypeAnnotation();if(f.isAnyTypeAnnotation(t))return!0;if(f.isUnionTypeAnnotation(t)){for(var r=t.types,n=Array.isArray(r),i=0,r=n?r:(0,p.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(f.isAnyTypeAnnotation(a)||o(e,a,!0))return!0}return!1}return o(e,t,!0)}function l(e){var t=this.getTypeAnnotation();if(e=e.getTypeAnnotation(),!f.isAnyTypeAnnotation(t)&&f.isFlowBaseAnnotation(t))return e.type===t.type}function c(e){var t=this.getTypeAnnotation();return f.isGenericTypeAnnotation(t)&&f.isIdentifier(t.id,{name:e})}r.__esModule=!0;var p=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.getTypeAnnotation=i,r._getTypeAnnotation=s,r.isBaseType=a,r.couldBeBaseType=u,r.baseTypeStrictlyMatches=l,r.isGenericType=c;var h=n(e("./inferers")),f=n(e("babel-types"))},{"./inferers":146,"babel-runtime/core-js/get-iterator":113,"babel-types":169}],145:[function(e,t,r){"use strict";function n(e,t){var r=e.scope.getBinding(t),n=[];e.typeAnnotation=l.unionTypeAnnotation(n);var s=[],a=i(r,e,s),c=o(e,t);if(c){var p=i(r,c.ifStatement);a=a.filter(function(e){return p.indexOf(e)<0}),n.push(c.typeAnnotation)}if(a.length)for(var h=a=a.concat(s),f=Array.isArray(h),d=0,h=f?h:(0,u.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if((d=h.next()).done)break;m=d.value}var y=m;n.push(y.getTypeAnnotation())}if(n.length)return l.createUnionTypeAnnotation(n)}function i(e,t,r){var n=e.constantViolations.slice();return n.unshift(e.path),n.filter(function(e){var n=(e=e.resolve())._guessExecutionStatusRelativeTo(t);return r&&"function"===n&&r.push(e),"before"===n})}function s(e,t){var r=t.node.operator,n=t.get("right").resolve(),i=t.get("left").resolve(),s=void 0;if(i.isIdentifier({name:e})?s=n:n.isIdentifier({name:e})&&(s=i),s)return"==="===r?s.getTypeAnnotation():l.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r)>=0?l.numberTypeAnnotation():void 0;if("==="===r){var a=void 0,o=void 0;if(i.isUnaryExpression({operator:"typeof"})?(a=i,o=n):n.isUnaryExpression({operator:"typeof"})&&(a=n,o=i),(o||a)&&(o=o.resolve()).isLiteral()&&"string"==typeof o.node.value&&a.get("argument").isIdentifier({name:e}))return l.createTypeAnnotationBasedOnTypeof(o.node.value)}}function a(e){for(var t=void 0;t=e.parentPath;){if(t.isIfStatement()||t.isConditionalExpression())return"test"===e.key?void 0:t;e=t}}function o(e,t){var r=a(e);if(r){var n=[r.get("test")],i=[];do{var u=n.shift().resolve();if(u.isLogicalExpression()&&(n.push(u.get("left")),n.push(u.get("right"))),u.isBinaryExpression()){var c=s(t,u);c&&i.push(c)}}while(n.length);return i.length?{typeAnnotation:l.createUnionTypeAnnotation(i),ifStatement:r}:o(r,t)}}r.__esModule=!0;var u=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.default=function(e){if(this.isReferenced()){var t=this.scope.getBinding(e.name);return t?t.identifier.typeAnnotation?t.identifier.typeAnnotation:n(this,e.name):"undefined"===e.name?l.voidTypeAnnotation():"NaN"===e.name||"Infinity"===e.name?l.numberTypeAnnotation():void e.name}};var l=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"babel-types":169}],146:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(){return this.get("id").isIdentifier()?this.get("init").getTypeAnnotation():void 0}function s(e){return e.typeAnnotation}function a(e){if(this.get("callee").isIdentifier())return k.genericTypeAnnotation(e.callee)}function o(){return k.stringTypeAnnotation()}function u(e){var t=e.operator;return"void"===t?k.voidTypeAnnotation():k.NUMBER_UNARY_OPERATORS.indexOf(t)>=0?k.numberTypeAnnotation():k.STRING_UNARY_OPERATORS.indexOf(t)>=0?k.stringTypeAnnotation():k.BOOLEAN_UNARY_OPERATORS.indexOf(t)>=0?k.booleanTypeAnnotation():void 0}function l(e){var t=e.operator;if(k.NUMBER_BINARY_OPERATORS.indexOf(t)>=0)return k.numberTypeAnnotation();if(k.BOOLEAN_BINARY_OPERATORS.indexOf(t)>=0)return k.booleanTypeAnnotation();if("+"===t){var r=this.get("right"),n=this.get("left");return n.isBaseType("number")&&r.isBaseType("number")?k.numberTypeAnnotation():n.isBaseType("string")||r.isBaseType("string")?k.stringTypeAnnotation():k.unionTypeAnnotation([k.stringTypeAnnotation(),k.numberTypeAnnotation()])}}function c(){return k.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function p(){return k.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function h(){return this.get("expressions").pop().getTypeAnnotation()}function f(){return this.get("right").getTypeAnnotation()}function d(e){var t=e.operator;if("++"===t||"--"===t)return k.numberTypeAnnotation()}function m(){return k.stringTypeAnnotation()}function y(){return k.numberTypeAnnotation()}function g(){return k.booleanTypeAnnotation()}function b(){return k.nullLiteralTypeAnnotation()}function v(){return k.genericTypeAnnotation(k.identifier("RegExp"))}function x(){return k.genericTypeAnnotation(k.identifier("Object"))}function E(){return k.genericTypeAnnotation(k.identifier("Array"))}function A(){return E()}function D(){return k.genericTypeAnnotation(k.identifier("Function"))}function C(){return _(this.get("callee"))}function S(){return _(this.get("tag"))}function _(e){if((e=e.resolve()).isFunction()){if(e.is("async"))return e.is("generator")?k.genericTypeAnnotation(k.identifier("AsyncIterator")):k.genericTypeAnnotation(k.identifier("Promise"));if(e.node.returnType)return e.node.returnType}}r.__esModule=!0,r.ClassDeclaration=r.ClassExpression=r.FunctionDeclaration=r.ArrowFunctionExpression=r.FunctionExpression=r.Identifier=void 0;var w=e("./inferer-reference");Object.defineProperty(r,"Identifier",{enumerable:!0,get:function(){return n(w).default}}),r.VariableDeclarator=i,r.TypeCastExpression=s,r.NewExpression=a,r.TemplateLiteral=o,r.UnaryExpression=u,r.BinaryExpression=l,r.LogicalExpression=c,r.ConditionalExpression=p,r.SequenceExpression=h,r.AssignmentExpression=f,r.UpdateExpression=d,r.StringLiteral=m,r.NumericLiteral=y,r.BooleanLiteral=g,r.NullLiteral=b,r.RegExpLiteral=v,r.ObjectExpression=x,r.ArrayExpression=E,r.RestElement=A,r.CallExpression=C,r.TaggedTemplateExpression=S;var k=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));s.validParent=!0,A.validParent=!0,r.FunctionExpression=D,r.ArrowFunctionExpression=D,r.FunctionDeclaration=D,r.ClassExpression=D,r.ClassDeclaration=D},{"./inferer-reference":145,"babel-types":169}],147:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e,t){function r(e){var t=n[s];return"*"===t||e===t}if(!this.isMemberExpression())return!1;for(var n=e.split("."),i=[this.node],s=0;i.length;){var a=i.shift();if(t&&s===n.length)return!0;if(D.isIdentifier(a)){if(!r(a.name))return!1}else if(D.isLiteral(a)){if(!r(a.value))return!1}else{if(D.isMemberExpression(a)){if(a.computed&&!D.isLiteral(a.property))return!1;i.unshift(a.property),i.unshift(a.object);continue}if(!D.isThisExpression(a))return!1;if(!r("this"))return!1}if(++s>n.length)return!1}return s===n.length}function s(e){var t=this.node&&this.node[e];return t&&Array.isArray(t)?!!t.length:!!t}function a(){return this.scope.isStatic(this.node)}function o(e){return!this.has(e)}function u(e,t){return this.node[e]===t}function l(e){return D.isType(this.type,e)}function c(){return("init"===this.key||"left"===this.key)&&this.parentPath.isFor()}function p(e){return!("body"!==this.key||!this.parentPath.isArrowFunctionExpression())&&(this.isExpression()?D.isBlockStatement(e):!!this.isBlockStatement()&&D.isExpression(e))}function h(e){var t=this,r=!0;do{var n=t.container;if(t.isFunction()&&!r)return!!e;if(r=!1,Array.isArray(n)&&t.key!==n.length-1)return!1}while((t=t.parentPath)&&!t.isProgram());return!0}function f(){return!this.parentPath.isLabeledStatement()&&!D.isBlockStatement(this.container)&&(0,A.default)(D.STATEMENT_OR_BLOCK_KEYS,this.key)}function d(e,t){if(!this.isReferencedIdentifier())return!1;var r=this.scope.getBinding(this.node.name);if(!r||"module"!==r.kind)return!1;var n=r.path,i=n.parentPath;return!!i.isImportDeclaration()&&(i.node.source.value===e&&(!t||(!(!n.isImportDefaultSpecifier()||"default"!==t)||(!(!n.isImportNamespaceSpecifier()||"*"!==t)||!(!n.isImportSpecifier()||n.node.imported.name!==t)))))}function m(){var e=this.node;return e.end?this.hub.file.code.slice(e.start,e.end):""}function y(e){return"after"!==this._guessExecutionStatusRelativeTo(e)}function g(e){var t=e.scope.getFunctionParent(),r=this.scope.getFunctionParent();if(t.node!==r.node){var n=this._guessExecutionStatusRelativeToDifferentFunctions(t);if(n)return n;e=t.path}var i=e.getAncestry();if(i.indexOf(this)>=0)return"after";var s=this.getAncestry(),a=void 0,o=void 0,u=void 0;for(u=0;u=0){a=l;break}}if(!a)return"before";var c=i[o-1],p=s[u-1];return c&&p?c.listKey&&c.container===p.container?c.key>p.key?"before":"after":D.VISITOR_KEYS[c.type].indexOf(c.key)>D.VISITOR_KEYS[p.type].indexOf(p.key)?"before":"after":"before"}function b(e){var t=e.path;if(t.isFunctionDeclaration()){var r=t.scope.getBinding(t.node.id.name);if(!r.references)return"before";for(var n=r.referencePaths,i=n,s=Array.isArray(i),a=0,i=s?i:(0,E.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=o;if("callee"!==u.key||!u.parentPath.isCallExpression())return}for(var l=void 0,c=n,p=Array.isArray(c),h=0,c=p?c:(0,E.default)(c);;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f;if(!!!d.find(function(e){return e.node===t.node})){var m=this._guessExecutionStatusRelativeTo(d);if(l){if(l!==m)return}else l=m}}return l}}function v(e,t){return this._resolve(e,t)||this}function x(e,t){if(!(t&&t.indexOf(this)>=0))if((t=t||[]).push(this),this.isVariableDeclarator()){if(this.get("id").isIdentifier())return this.get("init").resolve(e,t)}else if(this.isReferencedIdentifier()){var r=this.scope.getBinding(this.node.name);if(!r)return;if(!r.constant)return;if("module"===r.kind)return;if(r.path!==this){var n=r.path.resolve(e,t);if(this.find(function(e){return e.node===n.node}))return;return n}}else{if(this.isTypeCastExpression())return this.get("expression").resolve(e,t);if(e&&this.isMemberExpression()){var i=this.toComputedKey();if(!D.isLiteral(i))return;var s=i.value,a=this.get("object").resolve(e,t);if(a.isObjectExpression())for(var o=a.get("properties"),u=Array.isArray(o),l=0,o=u?o:(0,E.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c;if(p.isProperty()){var h=p.get("key"),f=p.isnt("computed")&&h.isIdentifier({name:s});if(f=f||h.isLiteral({value:s}))return p.get("value").resolve(e,t)}}else if(a.isArrayExpression()&&!isNaN(+s)){var d=a.get("elements")[s];if(d)return d.resolve(e,t)}}}}r.__esModule=!0,r.is=void 0;var E=n(e("babel-runtime/core-js/get-iterator"));r.matchesPattern=i,r.has=s,r.isStatic=a,r.isnt=o,r.equals=u,r.isNodeType=l,r.canHaveVariableDeclarationOrExpression=c,r.canSwapBetweenExpressionAndStatement=p,r.isCompletionRecord=h,r.isStatementOrBlock=f,r.referencesImport=d,r.getSource=m,r.willIMaybeExecuteBefore=y,r._guessExecutionStatusRelativeTo=g,r._guessExecutionStatusRelativeToDifferentFunctions=b,r.resolve=v,r._resolve=x;var A=n(e("lodash/includes")),D=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"));r.is=s},{"babel-runtime/core-js/get-iterator":113,"babel-types":169,"lodash/includes":495}],148:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/core-js/get-iterator")),s=n(e("babel-runtime/helpers/classCallCheck")),a=e("babel-types"),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(a),u={ReferencedIdentifier:function(e,t){if(!e.isJSXIdentifier()||!a.react.isCompatTag(e.node.name)||e.parentPath.isJSXMemberExpression()){if("this"===e.node.name){var r=e.scope;do{if(r.path.isFunction()&&!r.path.isArrowFunctionExpression())break}while(r=r.parent);r&&t.breakOnScopePaths.push(r.path)}var n=e.scope.getBinding(e.node.name);n&&n===t.scope.getBinding(e.node.name)&&(t.bindings[e.node.name]=n)}}},l=function(){function e(t,r){(0,s.default)(this,e),this.breakOnScopePaths=[],this.bindings={},this.scopes=[],this.scope=r,this.path=t,this.attachAfter=!1}return e.prototype.isCompatibleScope=function(e){for(var t in this.bindings){var r=this.bindings[t];if(!e.bindingIdentifierEquals(t,r.identifier))return!1}return!0},e.prototype.getCompatibleScopes=function(){var e=this.path.scope;do{if(!this.isCompatibleScope(e))break;if(this.scopes.push(e),this.breakOnScopePaths.indexOf(e.path)>=0)break}while(e=e.parent)},e.prototype.getAttachmentPath=function(){var e=this._getAttachmentPath();if(e){var t=e.scope;if(t.path===e&&(t=e.scope.parent),t.path.isProgram()||t.path.isFunction())for(var r in this.bindings)if(t.hasOwnBinding(r)){var n=this.bindings[r];if("param"!==n.kind&&this.getAttachmentParentForPath(n.path).key>e.key){this.attachAfter=!0,e=n.path;for(var s=n.constantViolations,a=Array.isArray(s),o=0,s=a?s:(0,i.default)(s);;){var u;if(a){if(o>=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;this.getAttachmentParentForPath(l).key>e.key&&(e=l)}}}return e}},e.prototype._getAttachmentPath=function(){var e=this.scopes.pop();if(e){if(e.path.isFunction()){if(this.hasOwnParamBindings(e)){if(this.scope===e)return;return e.path.get("body").get("body")[0]}return this.getNextScopeAttachmentParent()}return e.path.isProgram()?this.getNextScopeAttachmentParent():void 0}},e.prototype.getNextScopeAttachmentParent=function(){var e=this.scopes.pop();if(e)return this.getAttachmentParentForPath(e.path)},e.prototype.getAttachmentParentForPath=function(e){do{if(!e.parentPath||Array.isArray(e.container)&&e.isStatement()||e.isVariableDeclarator()&&null!==e.parentPath.node&&e.parentPath.node.declarations.length>1)return e}while(e=e.parentPath)},e.prototype.hasOwnParamBindings=function(e){for(var t in this.bindings)if(e.hasOwnBinding(t)){var r=this.bindings[t];if("param"===r.kind&&r.constant)return!0}return!1},e.prototype.run=function(){var e=this.path.node;if(!e._hoisted){e._hoisted=!0,this.path.traverse(u,this),this.getCompatibleScopes();var t=this.getAttachmentPath();if(t&&t.getFunctionParent()!==this.path.getFunctionParent()){var r=t.scope.generateUidIdentifier("ref"),n=o.variableDeclarator(r,this.path.node);t[this.attachAfter?"insertAfter":"insertBefore"]([t.isVariableDeclarator()?n:o.variableDeclaration("var",[n])]);var i=this.path.parentPath;i.isJSXElement()&&this.path.container===i.node.children&&(r=o.JSXExpressionContainer(r)),this.path.replaceWith(r)}}},e}();r.default=l,t.exports=r.default},{"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],149:[function(e,t,r){"use strict";r.__esModule=!0;r.hooks=[function(e,t){if("test"===e.key&&(t.isWhile()||t.isSwitchCase())||"declaration"===e.key&&t.isExportDeclaration()||"body"===e.key&&t.isLabeledStatement()||"declarations"===e.listKey&&t.isVariableDeclaration()&&1===t.node.declarations.length||"expression"===e.key&&t.isExpressionStatement())return t.remove(),!0},function(e,t){if(t.isSequenceExpression()&&1===t.node.expressions.length)return t.replaceWith(t.node.expressions[0]),!0},function(e,t){if(t.isBinary())return"left"===e.key?t.replaceWith(t.node.right):t.replaceWith(t.node.left),!0},function(e,t){if(t.isIfStatement()&&("consequent"===e.key||"alternate"===e.key)||"body"===e.key&&(t.isLoop()||t.isArrowFunctionExpression()))return e.replaceWith({type:"BlockStatement",body:[]}),!0}]},{}],150:[function(e,t,r){"use strict";r.__esModule=!0,r.Flow=r.Pure=r.Generated=r.User=r.Var=r.BlockScoped=r.Referenced=r.Scope=r.Expression=r.Statement=r.BindingIdentifier=r.ReferencedMemberExpression=r.ReferencedIdentifier=void 0;var n=e("babel-types"),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(n);r.ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function(e,t){var r=e.node,s=e.parent;if(!i.isIdentifier(r,t)&&!i.isJSXMemberExpression(s,t)){if(!i.isJSXIdentifier(r,t))return!1;if(n.react.isCompatTag(r.name))return!1}return i.isReferenced(r,s)}},r.ReferencedMemberExpression={types:["MemberExpression"],checkPath:function(e){var t=e.node,r=e.parent;return i.isMemberExpression(t)&&i.isReferenced(t,r)}},r.BindingIdentifier={types:["Identifier"],checkPath:function(e){var t=e.node,r=e.parent;return i.isIdentifier(t)&&i.isBinding(t,r)}},r.Statement={types:["Statement"],checkPath:function(e){var t=e.node,r=e.parent;if(i.isStatement(t)){if(i.isVariableDeclaration(t)){if(i.isForXStatement(r,{left:t}))return!1;if(i.isForStatement(r,{init:t}))return!1}return!0}return!1}},r.Expression={types:["Expression"],checkPath:function(e){return e.isIdentifier()?e.isReferencedIdentifier():i.isExpression(e.node)}},r.Scope={types:["Scopable"],checkPath:function(e){return i.isScope(e.node,e.parent)}},r.Referenced={checkPath:function(e){return i.isReferenced(e.node,e.parent)}},r.BlockScoped={checkPath:function(e){return i.isBlockScoped(e.node)}},r.Var={types:["VariableDeclaration"],checkPath:function(e){return i.isVar(e.node)}},r.User={checkPath:function(e){return e.node&&!!e.node.loc}},r.Generated={checkPath:function(e){return!e.isUser()}},r.Pure={checkPath:function(e,t){return e.scope.isPure(e.node,t)}},r.Flow={types:["Flow","ImportDeclaration","ExportDeclaration","ImportSpecifier"],checkPath:function(e){var t=e.node;return!!i.isFlow(t)||(i.isImportDeclaration(t)?"type"===t.importKind||"typeof"===t.importKind:i.isExportDeclaration(t)?"type"===t.exportKind:!!i.isImportSpecifier(t)&&("type"===t.importKind||"typeof"===t.importKind))}}},{"babel-types":169}],151:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertBefore(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key)this.node&&e.push(this.node),this.replaceExpressionWithStatements(e);else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertBefore(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.push(this.node),this._replaceWith(x.blockStatement(e))}return[this]}function s(e,t){this.updateSiblingKeys(e,t.length);for(var r=[],n=0;n=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;h.setScope(),h.debug(function(){return"Inserted."});for(var f=o,d=Array.isArray(f),m=0,f=d?f:(0,y.default)(f);;){var g;if(d){if(m>=f.length)break;g=f[m++]}else{if((m=f.next()).done)break;g=m.value}g.maybeQueue(h,!0)}}return r}function a(e){return this._containerInsert(this.key,e)}function o(e){return this._containerInsert(this.key+1,e)}function u(e){var t=e[e.length-1];(x.isIdentifier(t)||x.isExpressionStatement(t)&&x.isIdentifier(t.expression))&&!this.isCompletionRecord()&&e.pop()}function l(e){if(this._assertUnremoved(),e=this._verifyNodeList(e),this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement())return this.parentPath.insertAfter(e);if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&"init"===this.key){if(this.node){var t=this.scope.generateDeclaredUidIdentifier();e.unshift(x.expressionStatement(x.assignmentExpression("=",t,this.node))),e.push(x.expressionStatement(t))}this.replaceExpressionWithStatements(e)}else{if(this._maybePopFromStatements(e),Array.isArray(this.container))return this._containerInsertAfter(e);if(!this.isStatementOrBlock())throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?");this.node&&e.unshift(this.node),this._replaceWith(x.blockStatement(e))}return[this]}function c(e,t){if(this.parent)for(var r=g.path.get(this.parent),n=0;n=e&&(i.key+=t)}}function p(e){if(!e)return[];e.constructor!==Array&&(e=[e]);for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:this.scope;return new b.default(this,e).run()}r.__esModule=!0;var m=n(e("babel-runtime/helpers/typeof")),y=n(e("babel-runtime/core-js/get-iterator"));r.insertBefore=i,r._containerInsert=s,r._containerInsertBefore=a,r._containerInsertAfter=o,r._maybePopFromStatements=u,r.insertAfter=l,r.updateSiblingKeys=c,r._verifyNodeList=p,r.unshiftContainer=h,r.pushContainer=f,r.hoist=d;var g=e("../cache"),b=n(e("./lib/hoister")),v=n(e("./index")),x=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))},{"../cache":133,"./index":143,"./lib/hoister":148,"babel-runtime/core-js/get-iterator":113,"babel-runtime/helpers/typeof":131,"babel-types":169}],152:[function(e,t,r){"use strict";function n(){this._assertUnremoved(),this.resync(),this._callRemovalHooks()?this._markRemoved():(this.shareCommentsWithSiblings(),this._remove(),this._markRemoved())}function i(){for(var e=l.hooks,t=Array.isArray(e),r=0,e=t?e:(0,u.default)(e);;){var n;if(t){if(r>=e.length)break;n=e[r++]}else{if((r=e.next()).done)break;n=r.value}if(n(this,this.parentPath))return!0}}function s(){Array.isArray(this.container)?(this.container.splice(this.key,1),this.updateSiblingKeys(this.key,-1)):this._replaceWith(null)}function a(){this.shouldSkip=!0,this.removed=!0,this.node=null}function o(){if(this.removed)throw this.buildCodeFrameError("NodePath has been removed so is read-only.")}r.__esModule=!0;var u=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/get-iterator"));r.remove=n,r._callRemovalHooks=i,r._remove=s,r._markRemoved=a,r._assertUnremoved=o;var l=e("./lib/removal-hooks")},{"./lib/removal-hooks":149,"babel-runtime/core-js/get-iterator":113}],153:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){this.resync(),e=this._verifyNodeList(e),m.inheritLeadingComments(e[0],this.node),m.inheritTrailingComments(e[e.length-1],this.node),this.node=this.container[this.key]=null,this.insertAfter(e),this.node?this.requeue():this.remove()}function s(e){this.resync();try{e="("+e+")",e=(0,d.parse)(e)}catch(r){var t=r.loc;throw t&&(r.message+=" - make sure this is an expression.",r.message+="\n"+(0,p.default)(e,t.line,t.column+1)),r}return e=e.program.body[0].expression,h.default.removeProperties(e),this.replaceWith(e)}function a(e){if(this.resync(),this.removed)throw new Error("You can't replace this node, we've already removed it");if(e instanceof f.default&&(e=e.node),!e)throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");if(this.node!==e){if(this.isProgram()&&!m.isProgram(e))throw new Error("You can only replace a Program root node with another Program node");if(Array.isArray(e))throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");if("string"==typeof e)throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");if(this.isNodeType("Statement")&&m.isExpression(e)&&(this.canHaveVariableDeclarationOrExpression()||this.canSwapBetweenExpressionAndStatement(e)||(e=m.expressionStatement(e))),this.isNodeType("Expression")&&m.isStatement(e)&&!this.canHaveVariableDeclarationOrExpression()&&!this.canSwapBetweenExpressionAndStatement(e))return this.replaceExpressionWithStatements([e]);var t=this.node;t&&(m.inheritsComments(e,t),m.removeComments(t)),this._replaceWith(e),this.type=e.type,this.setScope(),this.requeue()}}function o(e){if(!this.container)throw new ReferenceError("Container is falsy");this.inList?m.validate(this.parent,this.key,[e]):m.validate(this.parent,this.key,e),this.debug(function(){return"Replace with "+(e&&e.type)}),this.node=this.container[this.key]=e}function u(e){this.resync();var t=m.toSequenceExpression(e,this.scope);if(m.isSequenceExpression(t)){var r=t.expressions;r.length>=2&&this.parentPath.isExpressionStatement()&&this._maybePopFromStatements(r),1===r.length?this.replaceWith(r[0]):this.replaceWith(t)}else{if(!t){var n=m.functionExpression(null,[],m.blockStatement(e));n.shadow=!0,this.replaceWith(m.callExpression(n,[])),this.traverse(y);for(var i=this.get("callee").getCompletionRecords(),s=Array.isArray(i),a=0,i=s?i:(0,c.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=o;if(u.isExpressionStatement()){var l=u.findParent(function(e){return e.isLoop()});if(l){var p=l.getData("expressionReplacementReturnUid");if(p)p=m.identifier(p.name);else{var h=this.get("callee");p=h.scope.generateDeclaredUidIdentifier("ret"),h.get("body").pushContainer("body",m.returnStatement(p)),l.setData("expressionReplacementReturnUid",p)}u.get("expression").replaceWith(m.assignmentExpression("=",p,u.node.expression))}else u.replaceWith(m.returnStatement(u.node.expression))}}return this.node}this.replaceWith(t)}}function l(e){return this.resync(),Array.isArray(e)?Array.isArray(this.container)?(e=this._verifyNodeList(e),this._containerInsertAfter(e),this.remove()):this.replaceWithMultiple(e):this.replaceWith(e)}r.__esModule=!0;var c=n(e("babel-runtime/core-js/get-iterator"));r.replaceWithMultiple=i,r.replaceWithSourceString=s,r.replaceWith=a,r._replaceWith=o,r.replaceExpressionWithStatements=u,r.replaceInline=l;var p=n(e("babel-code-frame")),h=n(e("../index")),f=n(e("./index")),d=e("babylon"),m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types")),y={Function:function(e){e.skip()},VariableDeclaration:function(e){if("var"===e.node.kind){var t=e.getBindingIdentifiers();for(var r in t)e.scope.push({id:t[r]});for(var n=[],i=e.node.declarations,s=Array.isArray(i),a=0,i=s?i:(0,c.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=o;u.init&&n.push(m.expressionStatement(m.assignmentExpression("=",u.id,u.init)))}e.replaceWithMultiple(n)}}}},{"../index":136,"./index":143,"babel-code-frame":23,"babel-runtime/core-js/get-iterator":113,"babel-types":169,babylon:177}],154:[function(e,t,r){"use strict";r.__esModule=!0;var n=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/classCallCheck")),i=function(){function e(t){var r=t.existing,i=t.identifier,s=t.scope,a=t.path,o=t.kind;(0,n.default)(this,e),this.identifier=i,this.scope=s,this.path=a,this.kind=o,this.constantViolations=[],this.constant=!0,this.referencePaths=[],this.referenced=!1,this.references=0,this.clearValue(),r&&(this.constantViolations=[].concat(r.path,r.constantViolations,this.constantViolations))}return e.prototype.deoptValue=function(){this.clearValue(),this.hasDeoptedValue=!0},e.prototype.setValue=function(e){this.hasDeoptedValue||(this.hasValue=!0,this.value=e)},e.prototype.clearValue=function(){this.hasDeoptedValue=!1,this.hasValue=!1,this.value=null},e.prototype.reassign=function(e){this.constant=!1,-1===this.constantViolations.indexOf(e)&&this.constantViolations.push(e)},e.prototype.reference=function(e){-1===this.referencePaths.indexOf(e)&&(this.referenced=!0,this.references++,this.referencePaths.push(e))},e.prototype.dereference=function(){this.references--,this.referenced=!!this.references},e}();r.default=i,t.exports=r.default},{"babel-runtime/helpers/classCallCheck":127}],155:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){for(var n=E.scope.get(e.node)||[],i=n,s=Array.isArray(i),a=0,i=s?i:(0,p.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=o;if(u.parent===t&&u.path===e)return u}n.push(r),E.scope.has(e.node)||E.scope.set(e.node,n)}function a(e,t){if(x.isModuleDeclaration(e))if(e.source)a(e.source,t);else if(e.specifiers&&e.specifiers.length)for(var r=e.specifiers,n=Array.isArray(r),i=0,r=n?r:(0,p.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}a(s,t)}else e.declaration&&a(e.declaration,t);else if(x.isModuleSpecifier(e))a(e.local,t);else if(x.isMemberExpression(e))a(e.object,t),a(e.property,t);else if(x.isIdentifier(e))t.push(e.name);else if(x.isLiteral(e))t.push(e.value);else if(x.isCallExpression(e))a(e.callee,t);else if(x.isObjectExpression(e)||x.isObjectPattern(e))for(var o=e.properties,u=Array.isArray(o),l=0,o=u?o:(0,p.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var h=c;a(h.key||h.argument,t)}}r.__esModule=!0;var o=i(e("babel-runtime/core-js/object/keys")),u=i(e("babel-runtime/core-js/object/create")),l=i(e("babel-runtime/core-js/map")),c=i(e("babel-runtime/helpers/classCallCheck")),p=i(e("babel-runtime/core-js/get-iterator")),h=i(e("lodash/includes")),f=i(e("lodash/repeat")),d=i(e("./lib/renamer")),m=i(e("../index")),y=i(e("lodash/defaults")),g=n(e("babel-messages")),b=i(e("./binding")),v=i(e("globals")),x=n(e("babel-types")),E=e("../cache"),A=0,D={For:function(e){for(var t=x.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,p.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=e.get(s);a.isVar()&&e.scope.getFunctionParent().registerBinding("var",a)}},Declaration:function(e){e.isBlockScoped()||e.isExportDeclaration()&&e.get("declaration").isDeclaration()||e.scope.getFunctionParent().registerDeclaration(e)},ReferencedIdentifier:function(e,t){t.references.push(e)},ForXStatement:function(e,t){var r=e.get("left");(r.isPattern()||r.isIdentifier())&&t.constantViolations.push(r)},ExportDeclaration:{exit:function(e){var t=e.node,r=e.scope,n=t.declaration;if(x.isClassDeclaration(n)||x.isFunctionDeclaration(n)){var i=n.id;if(!i)return;var s=r.getBinding(i.name);s&&s.reference(e)}else if(x.isVariableDeclaration(n))for(var a=n.declarations,o=Array.isArray(a),u=0,a=o?a:(0,p.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l,h=x.getBindingIdentifiers(c);for(var f in h){var d=r.getBinding(f);d&&d.reference(e)}}}},LabeledStatement:function(e){e.scope.getProgramParent().addGlobal(e.node),e.scope.getBlockParent().registerDeclaration(e)},AssignmentExpression:function(e,t){t.assignments.push(e)},UpdateExpression:function(e,t){t.constantViolations.push(e.get("argument"))},UnaryExpression:function(e,t){"delete"===e.node.operator&&t.constantViolations.push(e.get("argument"))},BlockScoped:function(e){var t=e.scope;t.path===e&&(t=t.parent),t.getBlockParent().registerDeclaration(e)},ClassDeclaration:function(e){var t=e.node.id;if(t){var r=t.name;e.scope.bindings[r]=e.scope.getBinding(r)}},Block:function(e){for(var t=e.get("body"),r=Array.isArray(t),n=0,t=r?t:(0,p.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;s.isFunctionDeclaration()&&e.scope.getBlockParent().registerDeclaration(s)}}},C=0,S=function(){function e(t,r){if((0,c.default)(this,e),r&&r.block===t.node)return r;var n=s(t,r,this);if(n)return n;this.uid=C++,this.parent=r,this.hub=t.hub,this.parentBlock=t.parent,this.block=t.node,this.path=t,this.labels=new l.default}return e.prototype.traverse=function(e,t,r){(0,m.default)(e,t,this,r,this.path)},e.prototype.generateDeclaredUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp",t=this.generateUidIdentifier(e);return this.push({id:t}),t},e.prototype.generateUidIdentifier=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";return x.identifier(this.generateUid(e))},e.prototype.generateUid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"temp";e=x.toIdentifier(e).replace(/^_+/,"").replace(/[0-9]+$/g,"");var t=void 0,r=0;do{t=this._generateUid(e,r),r++}while(this.hasLabel(t)||this.hasBinding(t)||this.hasGlobal(t)||this.hasReference(t));var n=this.getProgramParent();return n.references[t]=!0,n.uids[t]=!0,t},e.prototype._generateUid=function(e,t){var r=e;return t>1&&(r+=t),"_"+r},e.prototype.generateUidIdentifierBasedOnNode=function(e,t){var r=e;x.isAssignmentExpression(e)?r=e.left:x.isVariableDeclarator(e)?r=e.id:(x.isObjectProperty(r)||x.isObjectMethod(r))&&(r=r.key);var n=[];a(r,n);var i=n.join("$");return i=i.replace(/^_/,"")||t||"ref",this.generateUidIdentifier(i.slice(0,20))},e.prototype.isStatic=function(e){if(x.isThisExpression(e)||x.isSuper(e))return!0;if(x.isIdentifier(e)){var t=this.getBinding(e.name);return t?t.constant:this.hasBinding(e.name)}return!1},e.prototype.maybeGenerateMemoised=function(e,t){if(this.isStatic(e))return null;var r=this.generateUidIdentifierBasedOnNode(e);return t||this.push({id:r}),r},e.prototype.checkBlockScopedCollisions=function(e,t,r,n){if("param"!==t&&!("hoisted"===t&&"let"===e.kind||"let"!==t&&"let"!==e.kind&&"const"!==e.kind&&"module"!==e.kind&&("param"!==e.kind||"let"!==t&&"const"!==t)))throw this.hub.file.buildCodeFrameError(n,g.get("scopeDuplicateDeclaration",r),TypeError)},e.prototype.rename=function(e,t,r){var n=this.getBinding(e);if(n)return t=t||this.generateUidIdentifier(e).name,new d.default(n,e,t).rename(r)},e.prototype._renameFromMap=function(e,t,r,n){e[t]&&(e[r]=n,e[t]=null)},e.prototype.dump=function(){var e=(0,f.default)("-",60);console.log(e);var t=this;do{console.log("#",t.block.type);for(var r in t.bindings){var n=t.bindings[r];console.log(" -",r,{constant:n.constant,references:n.references,violations:n.constantViolations.length,kind:n.kind})}}while(t=t.parent);console.log(e)},e.prototype.toArray=function(e,t){var r=this.hub.file;if(x.isIdentifier(e)){var n=this.getBinding(e.name);if(n&&n.constant&&n.path.isGenericType("Array"))return e}if(x.isArrayExpression(e))return e;if(x.isIdentifier(e,{name:"arguments"}))return x.callExpression(x.memberExpression(x.memberExpression(x.memberExpression(x.identifier("Array"),x.identifier("prototype")),x.identifier("slice")),x.identifier("call")),[e]);var i="toArray",s=[e];return!0===t?i="toConsumableArray":t&&(s.push(x.numericLiteral(t)),i="slicedToArray"),x.callExpression(r.addHelper(i),s)},e.prototype.hasLabel=function(e){return!!this.getLabel(e)},e.prototype.getLabel=function(e){return this.labels.get(e)},e.prototype.registerLabel=function(e){this.labels.set(e.node.label.name,e)},e.prototype.registerDeclaration=function(e){if(e.isLabeledStatement())this.registerLabel(e);else if(e.isFunctionDeclaration())this.registerBinding("hoisted",e.get("id"),e);else if(e.isVariableDeclaration())for(var t=e.get("declarations"),r=Array.isArray(t),n=0,t=r?t:(0,p.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.registerBinding(e.node.kind,s)}else if(e.isClassDeclaration())this.registerBinding("let",e);else if(e.isImportDeclaration())for(var a=e.get("specifiers"),o=Array.isArray(a),u=0,a=o?a:(0,p.default)(a);;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;this.registerBinding("module",c)}else if(e.isExportDeclaration()){var h=e.get("declaration");(h.isClassDeclaration()||h.isFunctionDeclaration()||h.isVariableDeclaration())&&this.registerDeclaration(h)}else this.registerBinding("unknown",e)},e.prototype.buildUndefinedNode=function(){return this.hasBinding("undefined")?x.unaryExpression("void",x.numericLiteral(0),!0):x.identifier("undefined")},e.prototype.registerConstantViolation=function(e){var t=e.getBindingIdentifiers();for(var r in t){var n=this.getBinding(r);n&&n.reassign(e)}},e.prototype.registerBinding=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if(!e)throw new ReferenceError("no `kind`");if(t.isVariableDeclaration())for(var n=t.get("declarations"),i=Array.isArray(n),s=0,n=i?n:(0,p.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;this.registerBinding(e,o)}else{var u=this.getProgramParent(),l=t.getBindingIdentifiers(!0);for(var c in l)for(var h=l[c],f=Array.isArray(h),d=0,h=f?h:(0,p.default)(h);;){var m;if(f){if(d>=h.length)break;m=h[d++]}else{if((d=h.next()).done)break;m=d.value}var y=m,g=this.getOwnBinding(c);if(g){if(g.identifier===y)continue;this.checkBlockScopedCollisions(g,e,c,y)}g&&g.path.isFlow()&&(g=null),u.references[c]=!0,this.bindings[c]=new b.default({identifier:y,existing:g,scope:this,path:r,kind:e})}}},e.prototype.addGlobal=function(e){this.globals[e.name]=e},e.prototype.hasUid=function(e){var t=this;do{if(t.uids[e])return!0}while(t=t.parent);return!1},e.prototype.hasGlobal=function(e){var t=this;do{if(t.globals[e])return!0}while(t=t.parent);return!1},e.prototype.hasReference=function(e){var t=this;do{if(t.references[e])return!0}while(t=t.parent);return!1},e.prototype.isPure=function(e,t){if(x.isIdentifier(e)){var r=this.getBinding(e.name);return!!r&&(!t||r.constant)}if(x.isClass(e))return!(e.superClass&&!this.isPure(e.superClass,t))&&this.isPure(e.body,t);if(x.isClassBody(e)){for(var n=e.body,i=Array.isArray(n),s=0,n=i?n:(0,p.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;if(!this.isPure(o,t))return!1}return!0}if(x.isBinary(e))return this.isPure(e.left,t)&&this.isPure(e.right,t);if(x.isArrayExpression(e)){for(var u=e.elements,l=Array.isArray(u),c=0,u=l?u:(0,p.default)(u);;){var h;if(l){if(c>=u.length)break;h=u[c++]}else{if((c=u.next()).done)break;h=c.value}var f=h;if(!this.isPure(f,t))return!1}return!0}if(x.isObjectExpression(e)){for(var d=e.properties,m=Array.isArray(d),y=0,d=m?d:(0,p.default)(d);;){var g;if(m){if(y>=d.length)break;g=d[y++]}else{if((y=d.next()).done)break;g=y.value}var b=g;if(!this.isPure(b,t))return!1}return!0}return x.isClassMethod(e)?!(e.computed&&!this.isPure(e.key,t))&&("get"!==e.kind&&"set"!==e.kind):x.isClassProperty(e)||x.isObjectProperty(e)?!(e.computed&&!this.isPure(e.key,t))&&this.isPure(e.value,t):x.isUnaryExpression(e)?this.isPure(e.argument,t):x.isPureish(e)},e.prototype.setData=function(e,t){return this.data[e]=t},e.prototype.getData=function(e){var t=this;do{var r=t.data[e];if(null!=r)return r}while(t=t.parent)},e.prototype.removeData=function(e){var t=this;do{null!=t.data[e]&&(t.data[e]=null)}while(t=t.parent)},e.prototype.init=function(){this.references||this.crawl()},e.prototype.crawl=function(){A++,this._crawl(),A--},e.prototype._crawl=function(){var e=this.path;if(this.references=(0,u.default)(null),this.bindings=(0,u.default)(null),this.globals=(0,u.default)(null),this.uids=(0,u.default)(null),this.data=(0,u.default)(null),e.isLoop())for(var t=x.FOR_INIT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,p.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=e.get(s);a.isBlockScoped()&&this.registerBinding(a.node.kind,a)}if(e.isFunctionExpression()&&e.has("id")&&(e.get("id").node[x.NOT_LOCAL_BINDING]||this.registerBinding("local",e.get("id"),e)),e.isClassExpression()&&e.has("id")&&(e.get("id").node[x.NOT_LOCAL_BINDING]||this.registerBinding("local",e)),e.isFunction())for(var o=e.get("params"),l=Array.isArray(o),c=0,o=l?o:(0,p.default)(o);;){var h;if(l){if(c>=o.length)break;h=o[c++]}else{if((c=o.next()).done)break;h=c.value}var f=h;this.registerBinding("param",f)}if(e.isCatchClause()&&this.registerBinding("let",e),!this.getProgramParent().crawling){var d={references:[],constantViolations:[],assignments:[]};this.crawling=!0,e.traverse(D,d),this.crawling=!1;for(var m=d.assignments,y=Array.isArray(m),g=0,m=y?m:(0,p.default)(m);;){var b;if(y){if(g>=m.length)break;b=m[g++]}else{if((g=m.next()).done)break;b=g.value}var v=b,E=v.getBindingIdentifiers(),A=void 0;for(var C in E)v.scope.getBinding(C)||(A=A||v.scope.getProgramParent()).addGlobal(E[C]);v.scope.registerConstantViolation(v)}for(var S=d.references,_=Array.isArray(S),w=0,S=_?S:(0,p.default)(S);;){var k;if(_){if(w>=S.length)break;k=S[w++]}else{if((w=S.next()).done)break;k=w.value}var F=k,T=F.scope.getBinding(F.node.name);T?T.reference(F):F.scope.getProgramParent().addGlobal(F.node)}for(var P=d.constantViolations,B=Array.isArray(P),O=0,P=B?P:(0,p.default)(P);;){var j;if(B){if(O>=P.length)break;j=P[O++]}else{if((O=P.next()).done)break;j=O.value}var N=j;N.scope.registerConstantViolation(N)}}},e.prototype.push=function(e){var t=this.path;t.isBlockStatement()||t.isProgram()||(t=this.getBlockParent().path),t.isSwitchStatement()&&(t=this.getFunctionParent().path),(t.isLoop()||t.isCatchClause()||t.isFunction())&&(x.ensureBlock(t.node),t=t.get("body"));var r=e.unique,n=e.kind||"var",i=null==e._blockHoist?2:e._blockHoist,s="declaration:"+n+":"+i,a=!r&&t.getData(s);if(!a){var o=x.variableDeclaration(n,[]);o._generated=!0,o._blockHoist=i,a=t.unshiftContainer("body",[o])[0],r||t.setData(s,a)}var u=x.variableDeclarator(e.id,e.init);a.node.declarations.push(u),this.registerBinding(n,a.get("declarations").pop())},e.prototype.getProgramParent=function(){var e=this;do{if(e.path.isProgram())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getFunctionParent=function(){var e=this;do{if(e.path.isFunctionParent())return e}while(e=e.parent);throw new Error("We couldn't find a Function or Program...")},e.prototype.getBlockParent=function(){var e=this;do{if(e.path.isBlockParent())return e}while(e=e.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")},e.prototype.getAllBindings=function(){var e=(0,u.default)(null),t=this;do{(0,y.default)(e,t.bindings),t=t.parent}while(t);return e},e.prototype.getAllBindingsOfKind=function(){for(var e=(0,u.default)(null),t=arguments,r=Array.isArray(t),n=0,t=r?t:(0,p.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i,a=this;do{for(var o in a.bindings){var l=a.bindings[o];l.kind===s&&(e[o]=l)}a=a.parent}while(a)}return e},e.prototype.bindingIdentifierEquals=function(e,t){return this.getBindingIdentifier(e)===t},e.prototype.warnOnFlowBinding=function(e){return 0===A&&e&&e.path.isFlow()&&console.warn("\n You or one of the Babel plugins you are using are using Flow declarations as bindings.\n Support for this will be removed in version 6.8. To find out the caller, grep for this\n message and change it to a `console.trace()`.\n "),e},e.prototype.getBinding=function(e){var t=this;do{var r=t.getOwnBinding(e);if(r)return this.warnOnFlowBinding(r)}while(t=t.parent)},e.prototype.getOwnBinding=function(e){return this.warnOnFlowBinding(this.bindings[e])},e.prototype.getBindingIdentifier=function(e){var t=this.getBinding(e);return t&&t.identifier},e.prototype.getOwnBindingIdentifier=function(e){var t=this.bindings[e];return t&&t.identifier},e.prototype.hasOwnBinding=function(e){return!!this.getOwnBinding(e)},e.prototype.hasBinding=function(t,r){return!!t&&(!!this.hasOwnBinding(t)||(!!this.parentHasBinding(t,r)||(!!this.hasUid(t)||(!(r||!(0,h.default)(e.globals,t))||!(r||!(0,h.default)(e.contextVariables,t))))))},e.prototype.parentHasBinding=function(e,t){return this.parent&&this.parent.hasBinding(e,t)},e.prototype.moveBindingTo=function(e,t){var r=this.getBinding(e);r&&(r.scope.removeOwnBinding(e),r.scope=t,t.bindings[e]=r)},e.prototype.removeOwnBinding=function(e){delete this.bindings[e]},e.prototype.removeBinding=function(e){var t=this.getBinding(e);t&&t.scope.removeOwnBinding(e);var r=this;do{r.uids[e]&&(r.uids[e]=!1)}while(r=r.parent)},e}();S.globals=(0,o.default)(v.default.builtin),S.contextVariables=["arguments","undefined","Infinity","NaN"],r.default=S,t.exports=r.default},{"../cache":133,"../index":136,"./binding":154,"./lib/renamer":156,"babel-messages":103,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/map":115,"babel-runtime/core-js/object/create":118,"babel-runtime/core-js/object/keys":120,"babel-runtime/helpers/classCallCheck":127,"babel-types":169,globals:302,"lodash/defaults":483,"lodash/includes":495,"lodash/repeat":518}],156:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.__esModule=!0;var i=n(e("babel-runtime/helpers/classCallCheck")),s=(n(e("../binding")),function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("babel-types"))),a={ReferencedIdentifier:function(e,t){var r=e.node;r.name===t.oldName&&(r.name=t.newName)},Scope:function(e,t){e.scope.bindingIdentifierEquals(t.oldName,t.binding.identifier)||e.skip()},"AssignmentExpression|Declaration":function(e,t){var r=e.getOuterBindingIdentifiers();for(var n in r)n===t.oldName&&(r[n].name=t.newName)}},o=function(){function e(t,r,n){(0,i.default)(this,e),this.newName=n,this.oldName=r,this.binding=t}return e.prototype.maybeConvertFromExportDeclaration=function(e){var t=e.parentPath.isExportDeclaration()&&e.parentPath;if(t){var r=t.isExportDefaultDeclaration();r&&(e.isFunctionDeclaration()||e.isClassDeclaration())&&!e.node.id&&(e.node.id=e.scope.generateUidIdentifier("default"));var n=e.getOuterBindingIdentifiers(),i=[];for(var a in n){var o=a===this.oldName?this.newName:a,u=r?"default":a;i.push(s.exportSpecifier(s.identifier(o),s.identifier(u)))}if(i.length){var l=s.exportNamedDeclaration(null,i);e.isFunctionDeclaration()&&(l._blockHoist=3),t.insertAfter(l),t.replaceWith(e.node)}}},e.prototype.maybeConvertFromClassFunctionDeclaration=function(e){},e.prototype.maybeConvertFromClassFunctionExpression=function(e){},e.prototype.rename=function(e){var t=this.binding,r=this.oldName,n=this.newName,i=t.scope,s=t.path.find(function(e){return e.isDeclaration()||e.isFunctionExpression()});s&&this.maybeConvertFromExportDeclaration(s),i.traverse(e||i.block,a,this),e||(i.removeOwnBinding(r),i.bindings[n]=t,this.binding.identifier.name=n),t.type,s&&(this.maybeConvertFromClassFunctionDeclaration(s),this.maybeConvertFromClassFunctionExpression(s))},e}();r.default=o,t.exports=r.default},{"../binding":154,"babel-runtime/helpers/classCallCheck":127,"babel-types":169}],157:[function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}function s(e){if(e._exploded)return e;e._exploded=!0;for(var t in e)if(!f(t)){var r=t.split("|");if(1!==r.length){var n=e[t];delete e[t];for(var i=r,s=Array.isArray(i),o=0,i=s?i:(0,g.default)(i);;){var u;if(s){if(o>=i.length)break;u=i[o++]}else{if((o=i.next()).done)break;u=o.value}e[u]=n}}}a(e),delete e.__esModule,c(e),p(e);for(var l=(0,y.default)(e),m=Array.isArray(l),v=0,l=m?l:(0,g.default)(l);;){var A;if(m){if(v>=l.length)break;A=l[v++]}else{if((v=l.next()).done)break;A=v.value}var D=A;if(!f(D)){var C=b[D];if(C){var S=e[D];for(var _ in S)S[_]=h(C,S[_]);if(delete e[D],C.types)for(var w=C.types,k=Array.isArray(w),F=0,w=k?w:(0,g.default)(w);;){var T;if(k){if(F>=w.length)break;T=w[F++]}else{if((F=w.next()).done)break;T=F.value}var P=T;e[P]?d(e[P],S):e[P]=S}else d(e,S)}}}for(var B in e)if(!f(B)){var O=e[B],j=x.FLIPPED_ALIAS_KEYS[B],N=x.DEPRECATED_KEYS[B];if(N&&(console.trace("Visitor defined for "+B+" but it has been renamed to "+N),j=[N]),j){delete e[B];for(var I=j,L=Array.isArray(I),M=0,I=L?I:(0,g.default)(I);;){var R;if(L){if(M>=I.length)break;R=I[M++]}else{if((M=I.next()).done)break;R=M.value}var V=R,U=e[V];U?d(U,O):e[V]=(0,E.default)(O)}}}for(var q in e)f(q)||p(e[q]);return e}function a(e){if(!e._verified){if("function"==typeof e)throw new Error(v.get("traverseVerifyRootFunction"));for(var t in e)if("enter"!==t&&"exit"!==t||o(t,e[t]),!f(t)){if(x.TYPES.indexOf(t)<0)throw new Error(v.get("traverseVerifyNodeType",t));var r=e[t];if("object"===(void 0===r?"undefined":(0,m.default)(r)))for(var n in r){if("enter"!==n&&"exit"!==n)throw new Error(v.get("traverseVerifyVisitorProperty",t,n));o(t+"."+n,r[n])}}e._verified=!0}}function o(e,t){for(var r=[].concat(t),n=Array.isArray(r),i=0,r=n?r:(0,g.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if("function"!=typeof a)throw new TypeError("Non-function found defined in "+e+" with type "+(void 0===a?"undefined":(0,m.default)(a)))}}function u(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],n={},i=0;i","<",">=","<="]),s=r.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],a=r.COMPARISON_BINARY_OPERATORS=[].concat(s,["in","instanceof"]),o=r.BOOLEAN_BINARY_OPERATORS=[].concat(a,i),u=r.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],l=(r.BINARY_OPERATORS=["+"].concat(u,o),r.BOOLEAN_UNARY_OPERATORS=["delete","!"]),c=r.NUMBER_UNARY_OPERATORS=["+","-","++","--","~"],p=r.STRING_UNARY_OPERATORS=["typeof"];r.UNARY_OPERATORS=["void"].concat(l,c,p),r.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},r.BLOCK_SCOPED_SYMBOL=(0,n.default)("var used to be block scoped"),r.NOT_LOCAL_BINDING=(0,n.default)("should not be considered a local binding")},{"babel-runtime/core-js/symbol/for":123}],159:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.key||e.property;return e.computed||b.isIdentifier(t)&&(t=b.stringLiteral(t.name)),t}function s(e,t){function r(e){for(var s=!1,a=[],o=e,u=Array.isArray(o),l=0,o=u?o:(0,m.default)(o);;){var c;if(u){if(l>=o.length)break;c=o[l++]}else{if((l=o.next()).done)break;c=l.value}var p=c;if(b.isExpression(p))a.push(p);else if(b.isExpressionStatement(p))a.push(p.expression);else{if(b.isVariableDeclaration(p)){if("var"!==p.kind)return i=!0;for(var h=p.declarations,f=Array.isArray(h),d=0,h=f?h:(0,m.default)(h);;){var y;if(f){if(d>=h.length)break;y=h[d++]}else{if((d=h.next()).done)break;y=d.value}var g=y,v=b.getBindingIdentifiers(g);for(var x in v)n.push({kind:p.kind,id:v[x]});g.init&&a.push(b.assignmentExpression("=",g.id,g.init))}s=!0;continue}if(b.isIfStatement(p)){var E=p.consequent?r([p.consequent]):t.buildUndefinedNode(),A=p.alternate?r([p.alternate]):t.buildUndefinedNode();if(!E||!A)return i=!0;a.push(b.conditionalExpression(p.test,E,A))}else{if(!b.isBlockStatement(p)){if(b.isEmptyStatement(p)){s=!0;continue}return i=!0}a.push(r(p.body))}}s=!1}return(s||0===a.length)&&a.push(t.buildUndefinedNode()),1===a.length?a[0]:b.sequenceExpression(a)}if(e&&e.length){var n=[],i=!1,s=r(e);if(!i){for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:e.key,r=void 0;return"method"===e.kind?a.increment()+"":(r=b.isIdentifier(t)?t.name:b.isStringLiteral(t)?(0,d.default)(t.value):(0,d.default)(b.removePropertiesDeep(b.cloneDeep(t))),e.computed&&(r="["+r+"]"),e.static&&(r="static:"+r),r)}function o(e){return e+="",e=e.replace(/[^a-zA-Z0-9$_]/g,"-"),e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,function(e,t){return t?t.toUpperCase():""}),b.isValidIdentifier(e)||(e="_"+e),e||"_"}function u(e){return"eval"!==(e=o(e))&&"arguments"!==e||(e="_"+e),e}function l(e,t){if(b.isStatement(e))return e;var r=!1,n=void 0;if(b.isClass(e))r=!0,n="ClassDeclaration";else if(b.isFunction(e))r=!0,n="FunctionDeclaration";else if(b.isAssignmentExpression(e))return b.expressionStatement(e);if(r&&!e.id&&(n=!1),!n){if(t)return!1;throw new Error("cannot turn "+e.type+" to a statement")}return e.type=n,e}function c(e){if(b.isExpressionStatement(e)&&(e=e.expression),b.isExpression(e))return e;if(b.isClass(e)?e.type="ClassExpression":b.isFunction(e)&&(e.type="FunctionExpression"),!b.isExpression(e))throw new Error("cannot turn "+e.type+" to an expression");return e}function p(e,t){return b.isBlockStatement(e)?e:(b.isEmptyStatement(e)&&(e=[]),Array.isArray(e)||(b.isStatement(e)||(e=b.isFunction(t)?b.returnStatement(e):b.expressionStatement(e)),e=[e]),b.blockStatement(e))}function h(e){if(void 0===e)return b.identifier("undefined");if(!0===e||!1===e)return b.booleanLiteral(e);if(null===e)return b.nullLiteral();if("string"==typeof e)return b.stringLiteral(e);if("number"==typeof e)return b.numericLiteral(e);if((0,g.default)(e)){var t=e.source,r=e.toString().match(/\/([a-z]+|)$/)[1];return b.regExpLiteral(t,r)}if(Array.isArray(e))return b.arrayExpression(e.map(b.valueToNode));if((0,y.default)(e)){var n=[];for(var i in e){var s=void 0;s=b.isValidIdentifier(i)?b.identifier(i):b.stringLiteral(i),n.push(b.objectProperty(s,b.valueToNode(e[i])))}return b.objectExpression(n)}throw new Error("don't know how to turn this value into a node")}r.__esModule=!0;var f=n(e("babel-runtime/core-js/number/max-safe-integer")),d=n(e("babel-runtime/core-js/json/stringify")),m=n(e("babel-runtime/core-js/get-iterator"));r.toComputedKey=i,r.toSequenceExpression=s,r.toKeyAlias=a,r.toIdentifier=o,r.toBindingIdentifierName=u,r.toStatement=l,r.toExpression=c,r.toBlock=p,r.valueToNode=h;var y=n(e("lodash/isPlainObject")),g=n(e("lodash/isRegExp")),b=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"));a.uid=0,a.increment=function(){return a.uid>=f.default?a.uid=0:a.uid++}},{"./index":169,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/number/max-safe-integer":116,"lodash/isPlainObject":506,"lodash/isRegExp":507}],160:[function(e,t,r){"use strict";var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../index")),i=e("../constants"),s=e("./index"),a=function(e){return e&&e.__esModule?e:{default:e}}(s);(0,a.default)("ArrayExpression",{fields:{elements:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeOrValueType)("null","Expression","SpreadElement"))),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,a.default)("AssignmentExpression",{fields:{operator:{validate:(0,s.assertValueType)("string")},left:{validate:(0,s.assertNodeType)("LVal")},right:{validate:(0,s.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),(0,a.default)("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:s.assertOneOf.apply(void 0,i.BINARY_OPERATORS)},left:{validate:(0,s.assertNodeType)("Expression")},right:{validate:(0,s.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),(0,a.default)("Directive",{visitor:["value"],fields:{value:{validate:(0,s.assertNodeType)("DirectiveLiteral")}}}),(0,a.default)("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}}}),(0,a.default)("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Directive"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","Statement"]}),(0,a.default)("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,s.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,a.default)("CallExpression",{visitor:["callee","arguments"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")},arguments:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement")))}},aliases:["Expression"]}),(0,a.default)("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,s.assertNodeType)("Identifier")},body:{validate:(0,s.assertNodeType)("BlockStatement")}},aliases:["Scopable"]}),(0,a.default)("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},consequent:{validate:(0,s.assertNodeType)("Expression")},alternate:{validate:(0,s.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),(0,a.default)("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,s.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),(0,a.default)("DebuggerStatement",{aliases:["Statement"]}),(0,a.default)("DoWhileStatement",{visitor:["test","body"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),(0,a.default)("EmptyStatement",{aliases:["Statement"]}),(0,a.default)("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,s.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),(0,a.default)("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,s.assertNodeType)("Program")}}}),(0,a.default)("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,s.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,s.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,s.assertNodeType)("Expression"),optional:!0},update:{validate:(0,s.assertNodeType)("Expression"),optional:!0},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","params","body","returnType","typeParameters"],fields:{id:{validate:(0,s.assertNodeType)("Identifier")},params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("LVal")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}},aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"]}),(0,a.default)("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{id:{validate:(0,s.assertNodeType)("Identifier"),optional:!0},params:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("LVal")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}}}),(0,a.default)("Identifier",{builder:["name"],visitor:["typeAnnotation"],aliases:["Expression","LVal"],fields:{name:{validate:function(e,t,r){n.isValidIdentifier(r)}},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))}}}),(0,a.default)("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},consequent:{validate:(0,s.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,s.assertNodeType)("Identifier")},body:{validate:(0,s.assertNodeType)("Statement")}}}),(0,a.default)("StringLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,s.assertValueType)("number")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,s.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,a.default)("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Literal"],fields:{pattern:{validate:(0,s.assertValueType)("string")},flags:{validate:(0,s.assertValueType)("string"),default:""}}}),(0,a.default)("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:s.assertOneOf.apply(void 0,i.LOGICAL_OPERATORS)},left:{validate:(0,s.assertNodeType)("Expression")},right:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("MemberExpression",{builder:["object","property","computed"],visitor:["object","property"],aliases:["Expression","LVal"],fields:{object:{validate:(0,s.assertNodeType)("Expression")},property:{validate:function(e,t,r){var n=e.computed?"Expression":"Identifier";(0,s.assertNodeType)(n)(e,t,r)}},computed:{default:!1}}}),(0,a.default)("NewExpression",{visitor:["callee","arguments"],aliases:["Expression"],fields:{callee:{validate:(0,s.assertNodeType)("Expression")},arguments:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression","SpreadElement")))}}}),(0,a.default)("Program",{visitor:["directives","body"],builder:["body","directives"],fields:{directives:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Directive"))),default:[]},body:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}},aliases:["Scopable","BlockParent","Block","FunctionParent"]}),(0,a.default)("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("ObjectMethod","ObjectProperty","SpreadProperty")))}}}),(0,a.default)("ObjectMethod",{builder:["kind","key","params","body","computed"],fields:{kind:{validate:(0,s.chain)((0,s.assertValueType)("string"),(0,s.assertOneOf)("method","get","set")),default:"method"},computed:{validate:(0,s.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];s.assertNodeType.apply(void 0,n)(e,t,r)}},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))},body:{validate:(0,s.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,s.assertValueType)("boolean")},async:{default:!1,validate:(0,s.assertValueType)("boolean")}},visitor:["key","params","body","decorators","returnType","typeParameters"],aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]}),(0,a.default)("ObjectProperty",{builder:["key","value","computed","shorthand","decorators"],fields:{computed:{validate:(0,s.assertValueType)("boolean"),default:!1},key:{validate:function(e,t,r){var n=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];s.assertNodeType.apply(void 0,n)(e,t,r)}},value:{validate:(0,s.assertNodeType)("Expression")},shorthand:{validate:(0,s.assertValueType)("boolean"),default:!1},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator"))),optional:!0}},visitor:["key","value","decorators"],aliases:["UserWhitespacable","Property","ObjectMember"]}),(0,a.default)("RestElement",{visitor:["argument","typeAnnotation"],aliases:["LVal"],fields:{argument:{validate:(0,s.assertNodeType)("LVal")},decorators:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Decorator")))}}}),(0,a.default)("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,s.assertNodeType)("Expression"),optional:!0}}}),(0,a.default)("SequenceExpression",{visitor:["expressions"],fields:{expressions:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Expression")))}},aliases:["Expression"]}),(0,a.default)("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,s.assertNodeType)("Expression"),optional:!0},consequent:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("Statement")))}}}),(0,a.default)("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,s.assertNodeType)("Expression")},cases:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("SwitchCase")))}}}),(0,a.default)("ThisExpression",{aliases:["Expression"]}),(0,a.default)("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{body:{validate:(0,s.assertNodeType)("BlockStatement")},handler:{optional:!0,handler:(0,s.assertNodeType)("BlockStatement")},finalizer:{optional:!0,validate:(0,s.assertNodeType)("BlockStatement")}}}),(0,a.default)("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,s.assertNodeType)("Expression")},operator:{validate:s.assertOneOf.apply(void 0,i.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),(0,a.default)("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:(0,s.assertNodeType)("Expression")},operator:{validate:s.assertOneOf.apply(void 0,i.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),(0,a.default)("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{kind:{validate:(0,s.chain)((0,s.assertValueType)("string"),(0,s.assertOneOf)("var","let","const"))},declarations:{validate:(0,s.chain)((0,s.assertValueType)("array"),(0,s.assertEach)((0,s.assertNodeType)("VariableDeclarator")))}}}),(0,a.default)("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:(0,s.assertNodeType)("LVal")},init:{optional:!0,validate:(0,s.assertNodeType)("Expression")}}}),(0,a.default)("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("BlockStatement","Statement")}}}),(0,a.default)("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{object:(0,s.assertNodeType)("Expression")},body:{validate:(0,s.assertNodeType)("BlockStatement","Statement")}}})},{"../constants":158,"../index":169,"./index":164}],161:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AssignmentPattern",{visitor:["left","right"],aliases:["Pattern","LVal"],fields:{left:{validate:(0,n.assertNodeType)("Identifier")},right:{validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrayPattern",{visitor:["elements","typeAnnotation"],aliases:["Pattern","LVal"],fields:{elements:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["params","body","returnType","typeParameters"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:{params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement","Expression")},async:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ClassBody",{visitor:["body"],fields:{body:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ClassMethod","ClassProperty")))}}}),(0,i.default)("ClassDeclaration",{builder:["id","superClass","body","decorators"],visitor:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],aliases:["Scopable","Class","Statement","Declaration","Pureish"],fields:{id:{validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ClassExpression",{inherits:"ClassDeclaration",aliases:["Scopable","Class","Expression","Pureish"],fields:{id:{optional:!0,validate:(0,n.assertNodeType)("Identifier")},body:{validate:(0,n.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,n.assertNodeType)("Expression")},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("ExportAllDeclaration",{visitor:["source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("FunctionDeclaration","ClassDeclaration","Expression")}}}),(0,i.default)("ExportNamedDeclaration",{visitor:["declaration","specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],fields:{declaration:{validate:(0,n.assertNodeType)("Declaration"),optional:!0},specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ExportSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral"),optional:!0}}}),(0,i.default)("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ForOfStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("ImportDeclaration",{visitor:["specifiers","source"],aliases:["Statement","Declaration","ModuleDeclaration"],fields:{specifiers:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier")))},source:{validate:(0,n.assertNodeType)("StringLiteral")}}}),(0,i.default)("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ImportSpecifier",{visitor:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,n.assertNodeType)("Identifier")},imported:{validate:(0,n.assertNodeType)("Identifier")},importKind:{validate:(0,n.assertOneOf)(null,"type","typeof")}}}),(0,i.default)("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:(0,n.assertValueType)("string")},property:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("ClassMethod",{aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static"],visitor:["key","params","body","decorators","returnType","typeParameters"],fields:{kind:{validate:(0,n.chain)((0,n.assertValueType)("string"),(0,n.assertOneOf)("get","set","method","constructor")),default:"method"},computed:{default:!1,validate:(0,n.assertValueType)("boolean")},static:{default:!1,validate:(0,n.assertValueType)("boolean")},key:{validate:function(e,t,r){var i=e.computed?["Expression"]:["Identifier","StringLiteral","NumericLiteral"];n.assertNodeType.apply(void 0,i)(e,t,r)}},params:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("LVal")))},body:{validate:(0,n.assertNodeType)("BlockStatement")},generator:{default:!1,validate:(0,n.assertValueType)("boolean")},async:{default:!1,validate:(0,n.assertValueType)("boolean")}}}),(0,i.default)("ObjectPattern",{visitor:["properties","typeAnnotation"],aliases:["Pattern","LVal"],fields:{properties:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("RestProperty","Property")))},decorators:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Decorator")))}}}),(0,i.default)("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("Super",{aliases:["Expression"]}),(0,i.default)("TaggedTemplateExpression",{visitor:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,n.assertNodeType)("Expression")},quasi:{validate:(0,n.assertNodeType)("TemplateLiteral")}}}),(0,i.default)("TemplateElement",{builder:["value","tail"],fields:{value:{},tail:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("TemplateElement")))},expressions:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("Expression")))}}}),(0,i.default)("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:(0,n.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],162:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("ForAwaitStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:(0,n.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,n.assertNodeType)("Expression")},body:{validate:(0,n.assertNodeType)("Statement")}}}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:{}}),(0,i.default)("Import",{aliases:["Expression"]}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],aliases:["Expression"],fields:{body:{validate:(0,n.assertNodeType)("BlockStatement")}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,n.assertNodeType)("Identifier")}}}),(0,i.default)("RestProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("LVal")}}}),(0,i.default)("SpreadProperty",{visitor:["argument"],aliases:["UnaryLike"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],163:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("AnyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["Flow"],fields:{}}),(0,i.default)("BooleanTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("BooleanLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NullLiteralTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ClassImplements",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("ClassProperty",{visitor:["key","value","typeAnnotation","decorators"],builder:["key","value","typeAnnotation","decorators","computed"],aliases:["Property"],fields:{computed:{validate:(0,n.assertValueType)("boolean"),default:!1}}}),(0,i.default)("DeclareClass",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareFunction",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareInterface",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModule",{visitor:["id","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("DeclareVariable",{visitor:["id"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("ExistentialTypeParam",{aliases:["Flow"]}),(0,i.default)("FunctionTypeAnnotation",{visitor:["typeParameters","params","rest","returnType"],aliases:["Flow"],fields:{}}),(0,i.default)("FunctionTypeParam",{visitor:["name","typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceExtends",{visitor:["id","typeParameters"],aliases:["Flow"],fields:{}}),(0,i.default)("InterfaceDeclaration",{visitor:["id","typeParameters","extends","body"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("IntersectionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("MixedTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("EmptyTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"]}),(0,i.default)("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("NumericLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("NumberTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("StringLiteralTypeAnnotation",{aliases:["Flow"],fields:{}}),(0,i.default)("StringTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("ThisTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}}),(0,i.default)("TupleTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeofTypeAnnotation",{visitor:["argument"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["Flow","FlowDeclaration","Statement","Declaration"],fields:{}}),(0,i.default)("TypeAnnotation",{visitor:["typeAnnotation"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["Flow","ExpressionWrapper","Expression"],fields:{}}),(0,i.default)("TypeParameter",{visitor:["bound"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterDeclaration",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("TypeParameterInstantiation",{visitor:["params"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties"],aliases:["Flow"],fields:{}}),(0,i.default)("ObjectTypeCallProperty",{visitor:["value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeIndexer",{visitor:["id","key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("ObjectTypeProperty",{visitor:["key","value"],aliases:["Flow","UserWhitespacable"],fields:{}}),(0,i.default)("QualifiedTypeIdentifier",{visitor:["id","qualification"],aliases:["Flow"],fields:{}}),(0,i.default)("UnionTypeAnnotation",{visitor:["types"],aliases:["Flow"],fields:{}}),(0,i.default)("VoidTypeAnnotation",{aliases:["Flow","FlowBaseAnnotation"],fields:{}})},{"./index":164}],164:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){return Array.isArray(e)?"array":null===e?"null":void 0===e?"undefined":void 0===e?"undefined":(0,d.default)(e)}function s(e){function t(t,r,n){if(Array.isArray(n))for(var i=0;i=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;if(m.is(l,n)){i=!0;break}}if(!i)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,f.default)(r)+" but instead got "+(0,f.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;if(i(n)===c||m.is(c,n)){s=!0;break}}if(!s)throw new TypeError("Property "+t+" of "+e.type+" expected node to be of a type "+(0,f.default)(r)+" but instead got "+(0,f.default)(n&&n.type))}for(var t=arguments.length,r=Array(t),n=0;n=e.length)break;i=e[n++]}else{if((n=e.next()).done)break;i=n.value}i.apply(void 0,arguments)}}for(var t=arguments.length,r=Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=t.inherits&&E[t.inherits]||{};t.fields=t.fields||r.fields||{},t.visitor=t.visitor||r.visitor||[],t.aliases=t.aliases||r.aliases||[],t.builder=t.builder||r.builder||t.visitor||[],t.deprecatedAlias&&(x[t.deprecatedAlias]=e);for(var n=t.visitor.concat(t.builder),s=Array.isArray(n),a=0,n=s?n:(0,h.default)(n);;){var o;if(s){if(a>=n.length)break;o=n[a++]}else{if((a=n.next()).done)break;o=a.value}var u=o;t.fields[u]=t.fields[u]||{}}for(var c in t.fields){var p=t.fields[c];-1===t.builder.indexOf(c)&&(p.optional=!0),void 0===p.default?p.default=null:p.validate||(p.validate=l(i(p.default)))}y[e]=t.visitor,v[e]=t.builder,b[e]=t.fields,g[e]=t.aliases,E[e]=t}r.__esModule=!0,r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=void 0;var h=n(e("babel-runtime/core-js/get-iterator")),f=n(e("babel-runtime/core-js/json/stringify")),d=n(e("babel-runtime/helpers/typeof"));r.assertEach=s,r.assertOneOf=a,r.assertNodeType=o,r.assertNodeOrValueType=u,r.assertValueType=l,r.chain=c,r.default=p;var m=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("../index")),y=r.VISITOR_KEYS={},g=r.ALIAS_KEYS={},b=r.NODE_FIELDS={},v=r.BUILDER_KEYS={},x=r.DEPRECATED_KEYS={},E={}},{"../index":169,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/helpers/typeof":131}],165:[function(e,t,r){"use strict";e("./index"),e("./core"),e("./es2015"),e("./flow"),e("./jsx"),e("./misc"),e("./experimental")},{"./core":160,"./es2015":161,"./experimental":162,"./flow":163,"./index":164,"./jsx":166,"./misc":167}],166:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("JSXAttribute",{visitor:["name","value"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,n.assertNodeType)("JSXElement","StringLiteral","JSXExpressionContainer")}}}),(0,i.default)("JSXClosingElement",{visitor:["name"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")}}}),(0,i.default)("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["JSX","Immutable","Expression"],fields:{openingElement:{validate:(0,n.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,n.assertNodeType)("JSXClosingElement")},children:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement")))}}}),(0,i.default)("JSXEmptyExpression",{aliases:["JSX","Expression"]}),(0,i.default)("JSXExpressionContainer",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXSpreadChild",{visitor:["expression"],aliases:["JSX","Immutable"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXIdentifier",{builder:["name"],aliases:["JSX","Expression"],fields:{name:{validate:(0,n.assertValueType)("string")}}}),(0,i.default)("JSXMemberExpression",{visitor:["object","property"],aliases:["JSX","Expression"],fields:{object:{validate:(0,n.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXNamespacedName",{visitor:["namespace","name"],aliases:["JSX"],fields:{namespace:{validate:(0,n.assertNodeType)("JSXIdentifier")},name:{validate:(0,n.assertNodeType)("JSXIdentifier")}}}),(0,i.default)("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","attributes"],aliases:["JSX","Immutable"],fields:{name:{validate:(0,n.assertNodeType)("JSXIdentifier","JSXMemberExpression")},selfClosing:{default:!1,validate:(0,n.assertValueType)("boolean")},attributes:{validate:(0,n.chain)((0,n.assertValueType)("array"),(0,n.assertEach)((0,n.assertNodeType)("JSXAttribute","JSXSpreadAttribute")))}}}),(0,i.default)("JSXSpreadAttribute",{visitor:["argument"],aliases:["JSX"],fields:{argument:{validate:(0,n.assertNodeType)("Expression")}}}),(0,i.default)("JSXText",{aliases:["JSX","Immutable"],builder:["value"],fields:{value:{validate:(0,n.assertValueType)("string")}}})},{"./index":164}],167:[function(e,t,r){"use strict";var n=e("./index"),i=function(e){return e&&e.__esModule?e:{default:e}}(n);(0,i.default)("Noop",{visitor:[]}),(0,i.default)("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,n.assertNodeType)("Expression")}}})},{"./index":164}],168:[function(e,t,r){"use strict";function n(e){var t=i(e);return 1===t.length?t[0]:a.unionTypeAnnotation(t)}function i(e){for(var t={},r={},n=[],s=[],o=0;o=0)){if(a.isAnyTypeAnnotation(u))return[u];if(a.isFlowBaseAnnotation(u))r[u.type]=u;else if(a.isUnionTypeAnnotation(u))n.indexOf(u.types)<0&&(e=e.concat(u.types),n.push(u.types));else if(a.isGenericTypeAnnotation(u)){var l=u.id.name;if(t[l]){var c=t[l];c.typeParameters?u.typeParameters&&(c.typeParameters.params=i(c.typeParameters.params.concat(u.typeParameters.params))):c=u.typeParameters}else t[l]=u}else s.push(u)}}for(var p in r)s.push(r[p]);for(var h in t)s.push(t[h]);return s}function s(e){if("string"===e)return a.stringTypeAnnotation();if("number"===e)return a.numberTypeAnnotation();if("undefined"===e)return a.voidTypeAnnotation();if("boolean"===e)return a.booleanTypeAnnotation();if("function"===e)return a.genericTypeAnnotation(a.identifier("Function"));if("object"===e)return a.genericTypeAnnotation(a.identifier("Object"));if("symbol"===e)return a.genericTypeAnnotation(a.identifier("Symbol"));throw new Error("Invalid typeof value")}r.__esModule=!0,r.createUnionTypeAnnotation=n,r.removeTypeDuplicates=i,r.createTypeAnnotationBasedOnTypeof=s;var a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./index"))},{"./index":169}],169:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=q["is"+e];t||(t=q["is"+e]=function(t,r){return q.is(e,t,r)}),q["assert"+e]=function(r,n){if(n=n||{},!t(r,n))throw new Error("Expected type "+(0,P.default)(e)+" with option "+(0,P.default)(n))}}function s(e,t,r){return!!t&&(!!a(t.type,e)&&(void 0===r||q.shallowEqual(t,r)))}function a(e,t){if(e===t)return!0;if(q.ALIAS_KEYS[t])return!1;var r=q.FLIPPED_ALIAS_KEYS[t];if(r){if(r[0]===e)return!0;for(var n=r,i=Array.isArray(n),s=0,n=i?n:(0,F.default)(n);;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}if(e===a)return!0}}return!1}function o(e,t,r){if(e){var n=q.NODE_FIELDS[e.type];if(n){var i=n[t];i&&i.validate&&(i.optional&&null==r||i.validate(e,t,r))}}}function u(e,t){for(var r=(0,T.default)(t),n=Array.isArray(r),i=0,r=n?r:(0,F.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(e[a]!==t[a])return!1}return!0}function l(e,t,r){return e.object=q.memberExpression(e.object,e.property,e.computed),e.property=t,e.computed=!!r,e}function c(e,t){return e.object=q.memberExpression(t,e.object),e}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";return e[t]=q.toBlock(e[t],e)}function h(e){if(!e)return e;var t={};for(var r in e)"_"!==r[0]&&(t[r]=e[r]);return t}function f(e){var t=h(e);return delete t.loc,t}function d(e){if(!e)return e;var t={};for(var r in e)if("_"!==r[0]){var n=e[r];n&&(n.type?n=q.cloneDeep(n):Array.isArray(n)&&(n=n.map(q.cloneDeep))),t[r]=n}return t}function m(e,t){var r=e.split(".");return function(e){if(!q.isMemberExpression(e))return!1;for(var n=[e],i=0;n.length;){var s=n.shift();if(t&&i===r.length)return!0;if(q.isIdentifier(s)){if(r[i]!==s.name)return!1}else{if(!q.isStringLiteral(s)){if(q.isMemberExpression(s)){if(s.computed&&!q.isStringLiteral(s.property))return!1;n.push(s.object),n.push(s.property);continue}return!1}if(r[i]!==s.value)return!1}if(++i>r.length)return!1}return!0}}function y(e){for(var t=q.COMMENT_KEYS,r=Array.isArray(t),n=0,t=r?t:(0,F.default)(t);;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}delete e[i]}return e}function g(e,t){return b(e,t),v(e,t),x(e,t),e}function b(e,t){E("trailingComments",e,t)}function v(e,t){E("leadingComments",e,t)}function x(e,t){E("innerComments",e,t)}function E(e,t,r){t&&r&&(t[e]=(0,R.default)([].concat(t[e],r[e]).filter(Boolean)))}function A(e,t){if(!e||!t)return e;for(var r=q.INHERIT_KEYS.optional,n=Array.isArray(r),i=0,r=n?r:(0,F.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;null==e[a]&&(e[a]=t[a])}for(var o in t)"_"===o[0]&&(e[o]=t[o]);for(var u=q.INHERIT_KEYS.force,l=Array.isArray(u),c=0,u=l?u:(0,F.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;e[h]=t[h]}return q.inheritsComments(e,t),e}function D(e){if(!C(e))throw new TypeError("Not a valid node "+(e&&e.type))}function C(e){return!(!e||!V.VISITOR_KEYS[e.type])}function S(e,t,r){if(e){var n=q.VISITOR_KEYS[e.type];if(n){t(e,r=r||{});for(var i=n,s=Array.isArray(i),a=0,i=s?i:(0,F.default)(i);;){var o;if(s){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}var u=e[o];if(Array.isArray(u))for(var l=u,c=Array.isArray(l),p=0,l=c?l:(0,F.default)(l);;){var h;if(c){if(p>=l.length)break;h=l[p++]}else{if((p=l.next()).done)break;h=p.value}S(h,t,r)}else S(u,t,r)}}}}function _(e,t){for(var r=(t=t||{}).preserveComments?J:W,n=Array.isArray(r),i=0,r=n?r:(0,F.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;null!=e[a]&&(e[a]=void 0)}for(var o in e)"_"===o[0]&&null!=e[o]&&(e[o]=void 0);for(var u=(0,k.default)(e),l=Array.isArray(u),c=0,u=l?u:(0,F.default)(u);;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}e[p]=null}}function w(e,t){return S(e,_,t),e}r.__esModule=!0,r.createTypeAnnotationBasedOnTypeof=r.removeTypeDuplicates=r.createUnionTypeAnnotation=r.valueToNode=r.toBlock=r.toExpression=r.toStatement=r.toBindingIdentifierName=r.toIdentifier=r.toKeyAlias=r.toSequenceExpression=r.toComputedKey=r.isNodesEquivalent=r.isImmutable=r.isScope=r.isSpecifierDefault=r.isVar=r.isBlockScoped=r.isLet=r.isValidIdentifier=r.isReferenced=r.isBinding=r.getOuterBindingIdentifiers=r.getBindingIdentifiers=r.TYPES=r.react=r.DEPRECATED_KEYS=r.BUILDER_KEYS=r.NODE_FIELDS=r.ALIAS_KEYS=r.VISITOR_KEYS=r.NOT_LOCAL_BINDING=r.BLOCK_SCOPED_SYMBOL=r.INHERIT_KEYS=r.UNARY_OPERATORS=r.STRING_UNARY_OPERATORS=r.NUMBER_UNARY_OPERATORS=r.BOOLEAN_UNARY_OPERATORS=r.BINARY_OPERATORS=r.NUMBER_BINARY_OPERATORS=r.BOOLEAN_BINARY_OPERATORS=r.COMPARISON_BINARY_OPERATORS=r.EQUALITY_BINARY_OPERATORS=r.BOOLEAN_NUMBER_BINARY_OPERATORS=r.UPDATE_OPERATORS=r.LOGICAL_OPERATORS=r.COMMENT_KEYS=r.FOR_INIT_KEYS=r.FLATTENABLE_KEYS=r.STATEMENT_OR_BLOCK_KEYS=void 0;var k=n(e("babel-runtime/core-js/object/get-own-property-symbols")),F=n(e("babel-runtime/core-js/get-iterator")),T=n(e("babel-runtime/core-js/object/keys")),P=n(e("babel-runtime/core-js/json/stringify")),B=e("./constants");Object.defineProperty(r,"STATEMENT_OR_BLOCK_KEYS",{enumerable:!0,get:function(){return B.STATEMENT_OR_BLOCK_KEYS}}),Object.defineProperty(r,"FLATTENABLE_KEYS",{enumerable:!0,get:function(){return B.FLATTENABLE_KEYS}}),Object.defineProperty(r,"FOR_INIT_KEYS",{enumerable:!0,get:function(){return B.FOR_INIT_KEYS}}),Object.defineProperty(r,"COMMENT_KEYS",{enumerable:!0,get:function(){return B.COMMENT_KEYS}}),Object.defineProperty(r,"LOGICAL_OPERATORS",{enumerable:!0,get:function(){return B.LOGICAL_OPERATORS}}),Object.defineProperty(r,"UPDATE_OPERATORS",{enumerable:!0,get:function(){return B.UPDATE_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return B.BOOLEAN_NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"EQUALITY_BINARY_OPERATORS",{enumerable:!0,get:function(){return B.EQUALITY_BINARY_OPERATORS}}),Object.defineProperty(r,"COMPARISON_BINARY_OPERATORS",{enumerable:!0,get:function(){return B.COMPARISON_BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_BINARY_OPERATORS",{enumerable:!0,get:function(){return B.BOOLEAN_BINARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_BINARY_OPERATORS",{enumerable:!0,get:function(){return B.NUMBER_BINARY_OPERATORS}}),Object.defineProperty(r,"BINARY_OPERATORS",{enumerable:!0,get:function(){return B.BINARY_OPERATORS}}),Object.defineProperty(r,"BOOLEAN_UNARY_OPERATORS",{enumerable:!0,get:function(){return B.BOOLEAN_UNARY_OPERATORS}}),Object.defineProperty(r,"NUMBER_UNARY_OPERATORS",{enumerable:!0,get:function(){return B.NUMBER_UNARY_OPERATORS}}),Object.defineProperty(r,"STRING_UNARY_OPERATORS",{enumerable:!0,get:function(){return B.STRING_UNARY_OPERATORS}}),Object.defineProperty(r,"UNARY_OPERATORS",{enumerable:!0,get:function(){return B.UNARY_OPERATORS}}),Object.defineProperty(r,"INHERIT_KEYS",{enumerable:!0,get:function(){return B.INHERIT_KEYS}}),Object.defineProperty(r,"BLOCK_SCOPED_SYMBOL",{enumerable:!0,get:function(){return B.BLOCK_SCOPED_SYMBOL}}),Object.defineProperty(r,"NOT_LOCAL_BINDING",{enumerable:!0,get:function(){return B.NOT_LOCAL_BINDING}}),r.is=s,r.isType=a,r.validate=o,r.shallowEqual=u,r.appendToMemberExpression=l,r.prependToMemberExpression=c,r.ensureBlock=p,r.clone=h,r.cloneWithoutLoc=f,r.cloneDeep=d,r.buildMatchMemberExpression=m,r.removeComments=y,r.inheritsComments=g,r.inheritTrailingComments=b,r.inheritLeadingComments=v,r.inheritInnerComments=x,r.inherits=A,r.assertNode=D,r.isNode=C,r.traverseFast=S,r.removeProperties=_,r.removePropertiesDeep=w;var O=e("./retrievers");Object.defineProperty(r,"getBindingIdentifiers",{enumerable:!0,get:function(){return O.getBindingIdentifiers}}),Object.defineProperty(r,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return O.getOuterBindingIdentifiers}});var j=e("./validators");Object.defineProperty(r,"isBinding",{enumerable:!0,get:function(){return j.isBinding}}),Object.defineProperty(r,"isReferenced",{enumerable:!0,get:function(){return j.isReferenced}}),Object.defineProperty(r,"isValidIdentifier",{enumerable:!0,get:function(){return j.isValidIdentifier}}),Object.defineProperty(r,"isLet",{enumerable:!0,get:function(){return j.isLet}}),Object.defineProperty(r,"isBlockScoped",{enumerable:!0,get:function(){return j.isBlockScoped}}),Object.defineProperty(r,"isVar",{enumerable:!0,get:function(){return j.isVar}}),Object.defineProperty(r,"isSpecifierDefault",{enumerable:!0,get:function(){return j.isSpecifierDefault}}),Object.defineProperty(r,"isScope",{enumerable:!0,get:function(){return j.isScope}}),Object.defineProperty(r,"isImmutable",{enumerable:!0,get:function(){return j.isImmutable}}),Object.defineProperty(r,"isNodesEquivalent",{enumerable:!0,get:function(){return j.isNodesEquivalent}});var N=e("./converters");Object.defineProperty(r,"toComputedKey",{enumerable:!0,get:function(){return N.toComputedKey}}),Object.defineProperty(r,"toSequenceExpression",{enumerable:!0,get:function(){return N.toSequenceExpression}}),Object.defineProperty(r,"toKeyAlias",{enumerable:!0,get:function(){return N.toKeyAlias}}),Object.defineProperty(r,"toIdentifier",{enumerable:!0,get:function(){return N.toIdentifier}}),Object.defineProperty(r,"toBindingIdentifierName",{enumerable:!0,get:function(){return N.toBindingIdentifierName}}),Object.defineProperty(r,"toStatement",{enumerable:!0,get:function(){return N.toStatement}}),Object.defineProperty(r,"toExpression",{enumerable:!0,get:function(){return N.toExpression}}),Object.defineProperty(r,"toBlock",{enumerable:!0,get:function(){return N.toBlock}}),Object.defineProperty(r,"valueToNode",{enumerable:!0,get:function(){return N.valueToNode}});var I=e("./flow");Object.defineProperty(r,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return I.createUnionTypeAnnotation}}),Object.defineProperty(r,"removeTypeDuplicates",{enumerable:!0,get:function(){return I.removeTypeDuplicates}}),Object.defineProperty(r,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return I.createTypeAnnotationBasedOnTypeof}});var L=n(e("to-fast-properties")),M=n(e("lodash/clone")),R=n(e("lodash/uniq"));e("./definitions/init");var V=e("./definitions"),U=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(e("./react")),q=r;r.VISITOR_KEYS=V.VISITOR_KEYS,r.ALIAS_KEYS=V.ALIAS_KEYS,r.NODE_FIELDS=V.NODE_FIELDS,r.BUILDER_KEYS=V.BUILDER_KEYS,r.DEPRECATED_KEYS=V.DEPRECATED_KEYS,r.react=U;for(var G in q.VISITOR_KEYS)i(G);q.FLIPPED_ALIAS_KEYS={},(0,T.default)(q.ALIAS_KEYS).forEach(function(e){q.ALIAS_KEYS[e].forEach(function(t){(q.FLIPPED_ALIAS_KEYS[t]=q.FLIPPED_ALIAS_KEYS[t]||[]).push(e)})}),(0,T.default)(q.FLIPPED_ALIAS_KEYS).forEach(function(e){q[e.toUpperCase()+"_TYPES"]=q.FLIPPED_ALIAS_KEYS[e],i(e)});r.TYPES=(0,T.default)(q.VISITOR_KEYS).concat((0,T.default)(q.FLIPPED_ALIAS_KEYS)).concat((0,T.default)(q.DEPRECATED_KEYS));(0,T.default)(q.BUILDER_KEYS).forEach(function(e){function t(){if(arguments.length>r.length)throw new Error("t."+e+": Too many arguments passed. Received "+arguments.length+" but can receive no more than "+r.length);var t={};t.type=e;for(var n=0,i=r,s=Array.isArray(i),a=0,i=s?i:(0,F.default)(i);;){var u;if(s){if(a>=i.length)break;u=i[a++]}else{if((a=i.next()).done)break;u=a.value}var l=u,c=q.NODE_FIELDS[e][l],p=arguments[n++];void 0===p&&(p=(0,M.default)(c.default)),t[l]=p}for(var h in t)o(t,h,t[h]);return t}var r=q.BUILDER_KEYS[e];q[e]=t,q[e[0].toLowerCase()+e.slice(1)]=t});for(var X in q.DEPRECATED_KEYS)!function(e){function t(t){return function(){return console.trace("The node type "+e+" has been renamed to "+r),t.apply(this,arguments)}}var r=q.DEPRECATED_KEYS[e];q[e]=q[e[0].toLowerCase()+e.slice(1)]=t(q[r]),q["is"+e]=t(q["is"+r]),q["assert"+e]=t(q["assert"+r])}(X);(0,L.default)(q),(0,L.default)(q.VISITOR_KEYS);var J=["tokens","start","end","loc","raw","rawValue"],W=q.COMMENT_KEYS.concat(["comments"]).concat(J)},{"./constants":158,"./converters":159,"./definitions":164,"./definitions/init":165,"./flow":168,"./react":170,"./retrievers":171,"./validators":172,"babel-runtime/core-js/get-iterator":113,"babel-runtime/core-js/json/stringify":114,"babel-runtime/core-js/object/get-own-property-symbols":119,"babel-runtime/core-js/object/keys":120,"lodash/clone":479,"lodash/uniq":528,"to-fast-properties":596}],170:[function(e,t,r){"use strict";function n(e){return!!e&&/^[a-z]|\-/.test(e)}function i(e,t){for(var r=e.value.split(/\r\n|\n|\r/),n=0,i=0;i=0)return!0}else if(i===e)return!0}return!1}function s(e,t){switch(t.type){case"BindExpression":return t.object===e||t.callee===e;case"MemberExpression":case"JSXMemberExpression":return!(t.property!==e||!t.computed)||t.object===e;case"MetaProperty":return!1;case"ObjectProperty":if(t.key===e)return t.computed;case"VariableDeclarator":return t.id!==e;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":for(var r=t.params,n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}if(s===e)return!1}return t.id!==e;case"ExportSpecifier":return!t.source&&t.local===e;case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":return!1;case"JSXAttribute":return t.name!==e;case"ClassProperty":return t.key===e?t.computed:t.value===e;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return!1;case"ClassDeclaration":case"ClassExpression":return t.id!==e;case"ClassMethod":case"ObjectMethod":return t.key===e&&t.computed;case"LabeledStatement":return!1;case"CatchClause":return t.param!==e;case"RestElement":return!1;case"AssignmentExpression":case"AssignmentPattern":return t.right===e;case"ObjectPattern":case"ArrayPattern":return!1}return!0}function a(e){return"string"==typeof e&&!b.default.keyword.isReservedWordES6(e,!0)&&("await"!==e&&b.default.keyword.isIdentifierNameES6(e))}function o(e){return v.isVariableDeclaration(e)&&("var"!==e.kind||e[x.BLOCK_SCOPED_SYMBOL])}function u(e){return v.isFunctionDeclaration(e)||v.isClassDeclaration(e)||v.isLet(e)}function l(e){return v.isVariableDeclaration(e,{kind:"var"})&&!e[x.BLOCK_SCOPED_SYMBOL]}function c(e){return v.isImportDefaultSpecifier(e)||v.isIdentifier(e.imported||e.exported,{name:"default"})}function p(e,t){return(!v.isBlockStatement(e)||!v.isFunction(t,{body:e}))&&v.isScopable(e)}function h(e){return!!v.isType(e.type,"Immutable")||!!v.isIdentifier(e)&&"undefined"===e.name}function f(e,t){if("object"!==(void 0===e?"undefined":(0,m.default)(e))||"object"!==(void 0===e?"undefined":(0,m.default)(e))||null==e||null==t)return e===t;if(e.type!==t.type)return!1;for(var r=(0,d.default)(v.NODE_FIELDS[e.type]||e.type),n=Array.isArray(r),i=0,r=n?r:(0,y.default)(r);;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if((0,m.default)(e[a])!==(0,m.default)(t[a]))return!1;if(Array.isArray(e[a])){if(!Array.isArray(t[a]))return!1;if(e[a].length!==t[a].length)return!1;for(var o=0;o=0}}function i(e,t){for(var r=65536,n=0;ne)return!1;if((r+=t[n+1])>=e)return!0}}function s(e){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&E.test(String.fromCharCode(e)):i(e,D)))}function a(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&A.test(String.fromCharCode(e)):i(e,D)||i(e,C))))}function o(e){var t={};for(var r in S)t[r]=e&&r in e?e[r]:S[r];return t}function u(e){return 10===e||13===e||8232===e||8233===e}function l(e,t){for(var r=1,n=0;;){L.lastIndex=n;var i=L.exec(e);if(!(i&&i.index>10),56320+(e-65536&1023))}function p(e,t,r,n){return e.type=t,e.end=r,e.loc.end=n,this.processComment(e),e}function h(e){return e[e.length-1]}function f(e){return e&&"Property"===e.type&&"init"===e.kind&&!1===e.method}function d(e){return"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?d(e.object)+"."+d(e.property):void 0}function m(e,t){return new K(t,e).parse()}function y(e,t){var r=new K(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()}Object.defineProperty(r,"__esModule",{value:!0});var g={6:n("enum await"),strict:n("implements interface let package private protected public static yield"),strictBind:n("eval arguments")},b=n("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super"),v="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿕ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞮꞰ-ꞷꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",x="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣔ-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",E=new RegExp("["+v+"]"),A=new RegExp("["+v+x+"]");v=x=null;var D=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541],C=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239],S={sourceType:"script",sourceFilename:void 0,startLine:1,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,plugins:[],strictMode:null},_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},k=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},F=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},T=!0,P=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w(this,e),this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.rightAssociative=!!r.rightAssociative,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null},B=function(e){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return w(this,t),n.keyword=r,F(this,e.call(this,r,n))}return k(t,e),t}(P),O=function(e){function t(r,n){return w(this,t),F(this,e.call(this,r,{beforeExpr:T,binop:n}))}return k(t,e),t}(P),j={num:new P("num",{startsExpr:!0}),regexp:new P("regexp",{startsExpr:!0}),string:new P("string",{startsExpr:!0}),name:new P("name",{startsExpr:!0}),eof:new P("eof"),bracketL:new P("[",{beforeExpr:T,startsExpr:!0}),bracketR:new P("]"),braceL:new P("{",{beforeExpr:T,startsExpr:!0}),braceBarL:new P("{|",{beforeExpr:T,startsExpr:!0}),braceR:new P("}"),braceBarR:new P("|}"),parenL:new P("(",{beforeExpr:T,startsExpr:!0}),parenR:new P(")"),comma:new P(",",{beforeExpr:T}),semi:new P(";",{beforeExpr:T}),colon:new P(":",{beforeExpr:T}),doubleColon:new P("::",{beforeExpr:T}),dot:new P("."),question:new P("?",{beforeExpr:T}),arrow:new P("=>",{beforeExpr:T}),template:new P("template"),ellipsis:new P("...",{beforeExpr:T}),backQuote:new P("`",{startsExpr:!0}),dollarBraceL:new P("${",{beforeExpr:T,startsExpr:!0}),at:new P("@"),eq:new P("=",{beforeExpr:T,isAssign:!0}),assign:new P("_=",{beforeExpr:T,isAssign:!0}),incDec:new P("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new P("prefix",{beforeExpr:T,prefix:!0,startsExpr:!0}),logicalOR:new O("||",1),logicalAND:new O("&&",2),bitwiseOR:new O("|",3),bitwiseXOR:new O("^",4),bitwiseAND:new O("&",5),equality:new O("==/!=",6),relational:new O("",7),bitShift:new O("<>",8),plusMin:new P("+/-",{beforeExpr:T,binop:9,prefix:!0,startsExpr:!0}),modulo:new O("%",10),star:new O("*",10),slash:new O("/",10),exponent:new P("**",{beforeExpr:T,binop:11,rightAssociative:!0})},N={break:new B("break"),case:new B("case",{beforeExpr:T}),catch:new B("catch"),continue:new B("continue"),debugger:new B("debugger"),default:new B("default",{beforeExpr:T}),do:new B("do",{isLoop:!0,beforeExpr:T}),else:new B("else",{beforeExpr:T}),finally:new B("finally"),for:new B("for",{isLoop:!0}),function:new B("function",{startsExpr:!0}),if:new B("if"),return:new B("return",{beforeExpr:T}),switch:new B("switch"),throw:new B("throw",{beforeExpr:T}),try:new B("try"),var:new B("var"),let:new B("let"),const:new B("const"),while:new B("while",{isLoop:!0}),with:new B("with"),new:new B("new",{beforeExpr:T,startsExpr:!0}),this:new B("this",{startsExpr:!0}),super:new B("super",{startsExpr:!0}),class:new B("class"),extends:new B("extends",{beforeExpr:T}),export:new B("export"),import:new B("import",{startsExpr:!0}),yield:new B("yield",{beforeExpr:T,startsExpr:!0}),null:new B("null",{startsExpr:!0}),true:new B("true",{startsExpr:!0}),false:new B("false",{startsExpr:!0}),in:new B("in",{beforeExpr:T,binop:7}),instanceof:new B("instanceof",{beforeExpr:T,binop:7}),typeof:new B("typeof",{beforeExpr:T,prefix:!0,startsExpr:!0}),void:new B("void",{beforeExpr:T,prefix:!0,startsExpr:!0}),delete:new B("delete",{beforeExpr:T,prefix:!0,startsExpr:!0})};Object.keys(N).forEach(function(e){j["_"+e]=N[e]});var I=/\r\n?|\n|\u2028|\u2029/,L=new RegExp(I.source,"g"),M=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,R=function e(t,r,n,i){w(this,e),this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i},V={braceStatement:new R("{",!1),braceExpression:new R("{",!0),templateQuasi:new R("${",!0),parenStatement:new R("(",!1),parenExpression:new R("(",!0),template:new R("`",!0,!0,function(e){return e.readTmplToken()}),functionExpression:new R("function",!0)};j.parenR.updateContext=j.braceR.updateContext=function(){if(1!==this.state.context.length){var e=this.state.context.pop();e===V.braceStatement&&this.curContext()===V.functionExpression?(this.state.context.pop(),this.state.exprAllowed=!1):e===V.templateQuasi?this.state.exprAllowed=!0:this.state.exprAllowed=!e.isExpr}else this.state.exprAllowed=!0},j.name.updateContext=function(e){this.state.exprAllowed=!1,e!==j._let&&e!==j._const&&e!==j._var||I.test(this.input.slice(this.state.end))&&(this.state.exprAllowed=!0)},j.braceL.updateContext=function(e){this.state.context.push(this.braceIsBlock(e)?V.braceStatement:V.braceExpression),this.state.exprAllowed=!0},j.dollarBraceL.updateContext=function(){this.state.context.push(V.templateQuasi),this.state.exprAllowed=!0},j.parenL.updateContext=function(e){var t=e===j._if||e===j._for||e===j._with||e===j._while;this.state.context.push(t?V.parenStatement:V.parenExpression),this.state.exprAllowed=!0},j.incDec.updateContext=function(){},j._function.updateContext=function(){this.curContext()!==V.braceStatement&&this.state.context.push(V.functionExpression),this.state.exprAllowed=!1},j.backQuote.updateContext=function(){this.curContext()===V.template?this.state.context.pop():this.state.context.push(V.template),this.state.exprAllowed=!1};var U=function e(t,r){w(this,e),this.line=t,this.column=r},q=function e(t,r){w(this,e),this.start=t,this.end=r},G=function(){function e(){w(this,e)}return e.prototype.init=function(e,t){return this.strict=!1!==e.strictMode&&"module"===e.sourceType,this.input=t,this.potentialArrowAt=-1,this.inMethod=this.inFunction=this.inGenerator=this.inAsync=this.inPropertyName=this.inType=this.inClassProperty=this.noAnonFunctionType=!1,this.labels=[],this.decorators=[],this.tokens=[],this.comments=[],this.trailingComments=[],this.leadingComments=[],this.commentStack=[],this.pos=this.lineStart=0,this.curLine=e.startLine,this.type=j.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=[V.braceStatement],this.exprAllowed=!0,this.containsEsc=this.containsOctal=!1,this.octalPosition=null,this.invalidTemplateEscapePosition=null,this.exportedIdentifiers=[],this},e.prototype.curPosition=function(){return new U(this.curLine,this.pos-this.lineStart)},e.prototype.clone=function(t){var r=new e;for(var n in this){var i=this[n];t&&"context"!==n||!Array.isArray(i)||(i=i.slice()),r[n]=i}return r},e}(),X=function e(t){w(this,e),this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,this.loc=new q(t.startLoc,t.endLoc)},J={},W=["jsx","doExpressions","objectRestSpread","decorators","classProperties","exportExtensions","asyncGenerators","functionBind","functionSent","dynamicImport","flow"],K=function(e){function t(r,n){w(this,t),r=o(r);var i=F(this,e.call(this,r,n));return i.options=r,i.inModule="module"===i.options.sourceType,i.input=n,i.plugins=i.loadPlugins(i.options.plugins),i.filename=r.sourceFilename,0===i.state.pos&&"#"===i.input[0]&&"!"===i.input[1]&&i.skipLineComment(2),i}return k(t,e),t.prototype.isReservedWord=function(e){return"await"===e?this.inModule:g[6](e)},t.prototype.hasPlugin=function(e){return!!(this.plugins["*"]&&W.indexOf(e)>-1)||!!this.plugins[e]},t.prototype.extend=function(e,t){this[e]=t(this[e])},t.prototype.loadAllPlugins=function(){var e=this,t=Object.keys(J).filter(function(e){return"flow"!==e&&"estree"!==e});t.push("flow"),t.forEach(function(t){var r=J[t];r&&r(e)})},t.prototype.loadPlugins=function(e){if(e.indexOf("*")>=0)return this.loadAllPlugins(),{"*":!0};var t={};e.indexOf("flow")>=0&&(e=e.filter(function(e){return"flow"!==e})).push("flow"),e.indexOf("estree")>=0&&(e=e.filter(function(e){return"estree"!==e})).unshift("estree");for(var r=e,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if(!t[a]){t[a]=!0;var o=J[a];o&&o(this)}}return t},t.prototype.parse=function(){var e=this.startNode(),t=this.startNode();return this.nextToken(),this.parseTopLevel(e,t)},t}(function(){function e(t,r){w(this,e),this.state=new G,this.state.init(t,r)}return e.prototype.next=function(){this.isLookahead||this.state.tokens.push(new X(this.state)),this.state.lastTokEnd=this.state.end,this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()},e.prototype.eat=function(e){return!!this.match(e)&&(this.next(),!0)},e.prototype.match=function(e){return this.state.type===e},e.prototype.isKeyword=function(e){return b(e)},e.prototype.lookahead=function(){var e=this.state;this.state=e.clone(!0),this.isLookahead=!0,this.next(),this.isLookahead=!1;var t=this.state.clone(!0);return this.state=e,t},e.prototype.setStrict=function(e){if(this.state.strict=e,this.match(j.num)||this.match(j.string)){for(this.state.pos=this.state.start;this.state.pos=this.input.length?this.finishToken(j.eof):e.override?e.override(this):this.readToken(this.fullCharCodeAtPos())},e.prototype.readToken=function(e){return s(e)||92===e?this.readWord():this.getTokenFromCode(e)},e.prototype.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.state.pos);return e<=55295||e>=57344?e:(e<<10)+this.input.charCodeAt(this.state.pos+1)-56613888},e.prototype.pushComment=function(e,t,r,n,i,s){var a={type:e?"CommentBlock":"CommentLine",value:t,start:r,end:n,loc:new q(i,s)};this.isLookahead||(this.state.tokens.push(a),this.state.comments.push(a),this.addComment(a))},e.prototype.skipBlockComment=function(){var e=this.state.curPosition(),t=this.state.pos,r=this.input.indexOf("*/",this.state.pos+=2);-1===r&&this.raise(this.state.pos-2,"Unterminated comment"),this.state.pos=r+2,L.lastIndex=t;for(var n=void 0;(n=L.exec(this.input))&&n.index8&&e<14||e>=5760&&M.test(String.fromCharCode(e))))break e;++this.state.pos}}},e.prototype.finishToken=function(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();var r=this.state.type;this.state.type=e,this.state.value=t,this.updateContext(r)},e.prototype.readToken_dot=function(){var e=this.input.charCodeAt(this.state.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.state.pos+2);return 46===e&&46===t?(this.state.pos+=3,this.finishToken(j.ellipsis)):(++this.state.pos,this.finishToken(j.dot))},e.prototype.readToken_slash=function(){return this.state.exprAllowed?(++this.state.pos,this.readRegexp()):61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.assign,2):this.finishOp(j.slash,1)},e.prototype.readToken_mult_modulo=function(e){var t=42===e?j.star:j.modulo,r=1,n=this.input.charCodeAt(this.state.pos+1);return 42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=j.exponent),61===n&&(r++,t=j.assign),this.finishOp(t,r)},e.prototype.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?this.finishOp(124===e?j.logicalOR:j.logicalAND,2):61===t?this.finishOp(j.assign,2):124===e&&125===t&&this.hasPlugin("flow")?this.finishOp(j.braceBarR,2):this.finishOp(124===e?j.bitwiseOR:j.bitwiseAND,1)},e.prototype.readToken_caret=function(){return 61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.assign,2):this.finishOp(j.bitwiseXOR,1)},e.prototype.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.state.pos+1);return t===e?45===t&&62===this.input.charCodeAt(this.state.pos+2)&&I.test(this.input.slice(this.state.lastTokEnd,this.state.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(j.incDec,2):61===t?this.finishOp(j.assign,2):this.finishOp(j.plusMin,1)},e.prototype.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.state.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.state.pos+2)?3:2,61===this.input.charCodeAt(this.state.pos+r)?this.finishOp(j.assign,r+1):this.finishOp(j.bitShift,r)):33===t&&60===e&&45===this.input.charCodeAt(this.state.pos+2)&&45===this.input.charCodeAt(this.state.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(r=2),this.finishOp(j.relational,r))},e.prototype.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.state.pos+1);return 61===t?this.finishOp(j.equality,61===this.input.charCodeAt(this.state.pos+2)?3:2):61===e&&62===t?(this.state.pos+=2,this.finishToken(j.arrow)):this.finishOp(61===e?j.eq:j.prefix,1)},e.prototype.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.state.pos,this.finishToken(j.parenL);case 41:return++this.state.pos,this.finishToken(j.parenR);case 59:return++this.state.pos,this.finishToken(j.semi);case 44:return++this.state.pos,this.finishToken(j.comma);case 91:return++this.state.pos,this.finishToken(j.bracketL);case 93:return++this.state.pos,this.finishToken(j.bracketR);case 123:return this.hasPlugin("flow")&&124===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.braceBarL,2):(++this.state.pos,this.finishToken(j.braceL));case 125:return++this.state.pos,this.finishToken(j.braceR);case 58:return this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(j.doubleColon,2):(++this.state.pos,this.finishToken(j.colon));case 63:return++this.state.pos,this.finishToken(j.question);case 64:return++this.state.pos,this.finishToken(j.at);case 96:return++this.state.pos,this.finishToken(j.backQuote);case 48:var t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2);case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(j.prefix,1)}this.raise(this.state.pos,"Unexpected character '"+c(e)+"'")},e.prototype.finishOp=function(e,t){var r=this.input.slice(this.state.pos,this.state.pos+t);return this.state.pos+=t,this.finishToken(e,r)},e.prototype.readRegexp=function(){for(var e=this.state.pos,t=void 0,r=void 0;;){this.state.pos>=this.input.length&&this.raise(e,"Unterminated regular expression");var n=this.input.charAt(this.state.pos);if(I.test(n)&&this.raise(e,"Unterminated regular expression"),t)t=!1;else{if("["===n)r=!0;else if("]"===n&&r)r=!1;else if("/"===n&&!r)break;t="\\"===n}++this.state.pos}var i=this.input.slice(e,this.state.pos);++this.state.pos;var s=this.readWord1();return s&&(/^[gmsiyu]*$/.test(s)||this.raise(e,"Invalid regular expression flag")),this.finishToken(j.regexp,{pattern:i,flags:s})},e.prototype.readInt=function(e,t){for(var r=this.state.pos,n=0,i=0,s=null==t?1/0:t;i=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=e)break;++this.state.pos,n=n*e+o}return this.state.pos===r||null!=t&&this.state.pos-r!==t?null:n},e.prototype.readRadixNumber=function(e){this.state.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.state.start+2,"Expected number in radix "+e),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number"),this.finishToken(j.num,t)},e.prototype.readNumber=function(e){var t=this.state.pos,r=48===this.input.charCodeAt(t),n=!1;e||null!==this.readInt(10)||this.raise(t,"Invalid number"),r&&this.state.pos==t+1&&(r=!1);var i=this.input.charCodeAt(this.state.pos);46!==i||r||(++this.state.pos,this.readInt(10),n=!0,i=this.input.charCodeAt(this.state.pos)),69!==i&&101!==i||r||(43!==(i=this.input.charCodeAt(++this.state.pos))&&45!==i||++this.state.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),s(this.fullCharCodeAtPos())&&this.raise(this.state.pos,"Identifier directly after number");var a=this.input.slice(t,this.state.pos),o=void 0;return n?o=parseFloat(a):r&&1!==a.length?this.state.strict?this.raise(t,"Invalid number"):o=/[89]/.test(a)?parseInt(a,10):parseInt(a,8):o=parseInt(a,10),this.finishToken(j.num,o)},e.prototype.readCodePoint=function(e){var t=void 0;if(123===this.input.charCodeAt(this.state.pos)){var r=++this.state.pos;if(t=this.readHexChar(this.input.indexOf("}",this.state.pos)-this.state.pos,e),++this.state.pos,null===t)--this.state.invalidTemplateEscapePosition;else if(t>1114111){if(!e)return this.state.invalidTemplateEscapePosition=r-2,null;this.raise(r,"Code point out of bounds")}}else t=this.readHexChar(4,e);return t},e.prototype.readString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.state.pos),t+=this.readEscapedChar(!1),r=this.state.pos):(u(n)&&this.raise(this.state.start,"Unterminated string constant"),++this.state.pos)}return t+=this.input.slice(r,this.state.pos++),this.finishToken(j.string,t)},e.prototype.readTmplToken=function(){for(var e="",t=this.state.pos,r=!1;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated template");var n=this.input.charCodeAt(this.state.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.state.pos+1))return this.state.pos===this.state.start&&this.match(j.template)?36===n?(this.state.pos+=2,this.finishToken(j.dollarBraceL)):(++this.state.pos,this.finishToken(j.backQuote)):(e+=this.input.slice(t,this.state.pos),this.finishToken(j.template,r?null:e));if(92===n){e+=this.input.slice(t,this.state.pos);var i=this.readEscapedChar(!0);null===i?r=!0:e+=i,t=this.state.pos}else if(u(n)){switch(e+=this.input.slice(t,this.state.pos),++this.state.pos,n){case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}++this.state.curLine,this.state.lineStart=this.state.pos,t=this.state.pos}else++this.state.pos}},e.prototype.readEscapedChar=function(e){var t=!e,r=this.input.charCodeAt(++this.state.pos);switch(++this.state.pos,r){case 110:return"\n";case 114:return"\r";case 120:var n=this.readHexChar(2,t);return null===n?null:String.fromCharCode(n);case 117:var i=this.readCodePoint(t);return null===i?null:c(i);case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.state.pos)&&++this.state.pos;case 10:return this.state.lineStart=this.state.pos,++this.state.curLine,"";default:if(r>=48&&r<=55){var s=this.state.pos-1,a=this.input.substr(this.state.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(a,8);if(o>255&&(a=a.slice(0,-1),o=parseInt(a,8)),o>0){if(e)return this.state.invalidTemplateEscapePosition=s,null;this.state.strict?this.raise(s,"Octal literal in strict mode"):this.state.containsOctal||(this.state.containsOctal=!0,this.state.octalPosition=s)}return this.state.pos+=a.length-1,String.fromCharCode(o)}return String.fromCharCode(r)}},e.prototype.readHexChar=function(e,t){var r=this.state.pos,n=this.readInt(16,e);return null===n&&(t?this.raise(r,"Bad character escape sequence"):(this.state.pos=r-1,this.state.invalidTemplateEscapePosition=r-1)),n},e.prototype.readWord1=function(){this.state.containsEsc=!1;for(var e="",t=!0,r=this.state.pos;this.state.pos1&&void 0!==arguments[1]?arguments[1]:"Unexpected token";t&&"object"===(void 0===t?"undefined":_(t))&&t.label&&(t="Unexpected token, expected "+t.label),this.raise(null!=e?e:this.state.start,t)};var Y=K.prototype;Y.parseTopLevel=function(e,t){return t.sourceType=this.options.sourceType,this.parseBlockBody(t,!0,!0,j.eof),e.program=this.finishNode(t,"Program"),e.comments=this.state.comments,e.tokens=this.state.tokens,this.finishNode(e,"File")};var H={kind:"loop"},$={kind:"switch"};Y.stmtToDirective=function(e){var t=e.expression,r=this.startNodeAt(t.start,t.loc.start),n=this.startNodeAt(e.start,e.loc.start),i=this.input.slice(t.start,t.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),n.value=this.finishNodeAt(r,"DirectiveLiteral",t.end,t.loc.end),this.finishNodeAt(n,"Directive",e.end,e.loc.end)},Y.parseStatement=function(e,t){this.match(j.at)&&this.parseDecorators(!0);var r=this.state.type,n=this.startNode();switch(r){case j._break:case j._continue:return this.parseBreakContinueStatement(n,r.keyword);case j._debugger:return this.parseDebuggerStatement(n);case j._do:return this.parseDoStatement(n);case j._for:return this.parseForStatement(n);case j._function:return e||this.unexpected(),this.parseFunctionStatement(n);case j._class:return e||this.unexpected(),this.parseClass(n,!0);case j._if:return this.parseIfStatement(n);case j._return:return this.parseReturnStatement(n);case j._switch:return this.parseSwitchStatement(n);case j._throw:return this.parseThrowStatement(n);case j._try:return this.parseTryStatement(n);case j._let:case j._const:e||this.unexpected();case j._var:return this.parseVarStatement(n,r);case j._while:return this.parseWhileStatement(n);case j._with:return this.parseWithStatement(n);case j.braceL:return this.parseBlock();case j.semi:return this.parseEmptyStatement(n);case j._export:case j._import:if(this.hasPlugin("dynamicImport")&&this.lookahead().type===j.parenL)break;return this.options.allowImportExportEverywhere||(t||this.raise(this.state.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.state.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===j._import?this.parseImport(n):this.parseExport(n);case j.name:if("async"===this.state.value){var i=this.state.clone();if(this.next(),this.match(j._function)&&!this.canInsertSemicolon())return this.expect(j._function),this.parseFunction(n,!0,!1,!0);this.state=i}}var s=this.state.value,a=this.parseExpression();return r===j.name&&"Identifier"===a.type&&this.eat(j.colon)?this.parseLabeledStatement(n,s,a):this.parseExpressionStatement(n,a)},Y.takeDecorators=function(e){this.state.decorators.length&&(e.decorators=this.state.decorators,this.state.decorators=[])},Y.parseDecorators=function(e){for(;this.match(j.at);){var t=this.parseDecorator();this.state.decorators.push(t)}e&&this.match(j._export)||this.match(j._class)||this.raise(this.state.start,"Leading decorators must be attached to a class declaration")},Y.parseDecorator=function(){this.hasPlugin("decorators")||this.unexpected();var e=this.startNode();return this.next(),e.expression=this.parseMaybeAssign(),this.finishNode(e,"Decorator")},Y.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.isLineTerminator()?e.label=null:this.match(j.name)?(e.label=this.parseIdentifier(),this.semicolon()):this.unexpected();var n=void 0;for(n=0;n=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}a.name===t&&this.raise(r.start,"Label '"+t+"' is already declared")}for(var o=this.state.type.isLoop?"loop":this.match(j._switch)?"switch":null,u=this.state.labels.length-1;u>=0;u--){var l=this.state.labels[u];if(l.statementStart!==e.start)break;l.statementStart=this.state.start,l.kind=o}return this.state.labels.push({name:t,kind:o,statementStart:this.state.start}),e.body=this.parseStatement(!0),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},Y.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},Y.parseBlock=function(e){var t=this.startNode();return this.expect(j.braceL),this.parseBlockBody(t,e,!1,j.braceR),this.finishNode(t,"BlockStatement")},Y.isValidDirective=function(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized},Y.parseBlockBody=function(e,t,r,n){e.body=[],e.directives=[];for(var i=!1,s=void 0,a=void 0;!this.eat(n);){i||!this.state.containsOctal||a||(a=this.state.octalPosition);var o=this.parseStatement(!0,r);if(t&&!i&&this.isValidDirective(o)){var u=this.stmtToDirective(o);e.directives.push(u),void 0===s&&"use strict"===u.value.value&&(s=this.state.strict,this.setStrict(!0),a&&this.raise(a,"Octal literal in strict mode"))}else i=!0,e.body.push(o)}!1===s&&this.setStrict(!1)},Y.parseFor=function(e,t){return e.init=t,this.expect(j.semi),e.test=this.match(j.semi)?null:this.parseExpression(),this.expect(j.semi),e.update=this.match(j.parenR)?null:this.parseExpression(),this.expect(j.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,"ForStatement")},Y.parseForIn=function(e,t,r){var n=void 0;return r?(this.eatContextual("of"),n="ForAwaitStatement"):(n=this.match(j._in)?"ForInStatement":"ForOfStatement",this.next()),e.left=t,e.right=this.parseExpression(),this.expect(j.parenR),e.body=this.parseStatement(!1),this.state.labels.pop(),this.finishNode(e,n)},Y.parseVar=function(e,t,r){for(e.declarations=[],e.kind=r.keyword;;){var n=this.startNode();if(this.parseVarHead(n),this.eat(j.eq)?n.init=this.parseMaybeAssign(t):r!==j._const||this.match(j._in)||this.isContextual("of")?"Identifier"===n.id.type||t&&(this.match(j._in)||this.isContextual("of"))?n.init=null:this.raise(this.state.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(j.comma))break}return e},Y.parseVarHead=function(e){e.id=this.parseBindingAtom(),this.checkLVal(e.id,!0,void 0,"variable declaration")},Y.parseFunction=function(e,t,r,n,i){var s=this.state.inMethod;return this.state.inMethod=!1,this.initFunction(e,n),this.match(j.star)&&(e.async&&!this.hasPlugin("asyncGenerators")?this.unexpected():(e.generator=!0,this.next())),!t||i||this.match(j.name)||this.match(j._yield)||this.unexpected(),(this.match(j.name)||this.match(j._yield))&&(e.id=this.parseBindingIdentifier()),this.parseFunctionParams(e),this.parseFunctionBody(e,r),this.state.inMethod=s,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},Y.parseFunctionParams=function(e){this.expect(j.parenL),e.params=this.parseBindingList(j.parenR)},Y.parseClass=function(e,t,r){return this.next(),this.takeDecorators(e),this.parseClassId(e,t,r),this.parseClassSuper(e),this.parseClassBody(e),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},Y.isClassProperty=function(){return this.match(j.eq)||this.match(j.semi)||this.match(j.braceR)},Y.isClassMethod=function(){return this.match(j.parenL)},Y.isNonstaticConstructor=function(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)},Y.parseClassBody=function(e){var t=this.state.strict;this.state.strict=!0;var r=!1,n=!1,i=[],s=this.startNode();for(s.body=[],this.expect(j.braceL);!this.eat(j.braceR);)if(this.eat(j.semi))i.length>0&&this.raise(this.state.lastTokEnd,"Decorators must not be followed by a semicolon");else if(this.match(j.at))i.push(this.parseDecorator());else{var a=this.startNode();if(i.length&&(a.decorators=i,i=[]),a.static=!1,this.match(j.name)&&"static"===this.state.value){var o=this.parseIdentifier(!0);if(this.isClassMethod()){a.kind="method",a.computed=!1,a.key=o,this.parseClassMethod(s,a,!1,!1);continue}if(this.isClassProperty()){a.computed=!1,a.key=o,s.body.push(this.parseClassProperty(a));continue}a.static=!0}if(this.eat(j.star))a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be a generator"),a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.parseClassMethod(s,a,!0,!1);else{var u=this.match(j.name),l=this.parsePropertyName(a);if(a.computed||!a.static||"prototype"!==a.key.name&&"prototype"!==a.key.value||this.raise(a.key.start,"Classes may not have static property named prototype"),this.isClassMethod())this.isNonstaticConstructor(a)?(n?this.raise(l.start,"Duplicate constructor in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),n=!0,a.kind="constructor"):a.kind="method",this.parseClassMethod(s,a,!1,!1);else if(this.isClassProperty())this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a));else if(u&&"async"===l.name&&!this.isLineTerminator()){var c=this.hasPlugin("asyncGenerators")&&this.eat(j.star);a.kind="method",this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't be an async function"),this.parseClassMethod(s,a,c,!0)}else!u||"get"!==l.name&&"set"!==l.name||this.isLineTerminator()&&this.match(j.star)?this.hasPlugin("classConstructorCall")&&u&&"call"===l.name&&this.match(j.name)&&"constructor"===this.state.value?(r?this.raise(a.start,"Duplicate constructor call in the same class"):a.decorators&&this.raise(a.start,"You can't attach decorators to a class constructor"),r=!0,a.kind="constructorCall",this.parsePropertyName(a),this.parseClassMethod(s,a,!1,!1)):this.isLineTerminator()?(this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Classes may not have a non-static field named 'constructor'"),s.body.push(this.parseClassProperty(a))):this.unexpected():(a.kind=l.name,this.parsePropertyName(a),this.isNonstaticConstructor(a)&&this.raise(a.key.start,"Constructor can't have get/set modifier"),this.parseClassMethod(s,a,!1,!1),this.checkGetterSetterParamCount(a))}}i.length&&this.raise(this.state.start,"You have trailing decorators with no method"),e.body=this.finishNode(s,"ClassBody"),this.state.strict=t},Y.parseClassProperty=function(e){return this.state.inClassProperty=!0,this.match(j.eq)?(this.hasPlugin("classProperties")||this.unexpected(),this.next(),e.value=this.parseMaybeAssign()):e.value=null,this.semicolon(),this.state.inClassProperty=!1,this.finishNode(e,"ClassProperty")},Y.parseClassMethod=function(e,t,r,n){this.parseMethod(t,r,n),e.body.push(this.finishNode(t,"ClassMethod"))},Y.parseClassId=function(e,t,r){this.match(j.name)?e.id=this.parseIdentifier():r||!t?e.id=null:this.unexpected()},Y.parseClassSuper=function(e){e.superClass=this.eat(j._extends)?this.parseExprSubscripts():null},Y.parseExport=function(e){if(this.next(),this.match(j.star)){var t=this.startNode();if(this.next(),!this.hasPlugin("exportExtensions")||!this.eatContextual("as"))return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration");t.exported=this.parseIdentifier(),e.specifiers=[this.finishNode(t,"ExportNamespaceSpecifier")],this.parseExportSpecifiersMaybe(e),this.parseExportFrom(e,!0)}else if(this.hasPlugin("exportExtensions")&&this.isExportDefaultSpecifier()){var r=this.startNode();if(r.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],this.match(j.comma)&&this.lookahead().type===j.star){this.expect(j.comma);var n=this.startNode();this.expect(j.star),this.expectContextual("as"),n.exported=this.parseIdentifier(),e.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier"))}else this.parseExportSpecifiersMaybe(e);this.parseExportFrom(e,!0)}else{if(this.eat(j._default)){var i=this.startNode(),s=!1;return this.eat(j._function)?i=this.parseFunction(i,!0,!1,!1,!0):this.match(j._class)?i=this.parseClass(i,!0,!0):(s=!0,i=this.parseMaybeAssign()),e.declaration=i,s&&this.semicolon(),this.checkExport(e,!0,!0),this.finishNode(e,"ExportDefaultDeclaration")}this.shouldParseExportDeclaration()?(e.specifiers=[],e.source=null,e.declaration=this.parseExportDeclaration(e)):(e.declaration=null,e.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(e))}return this.checkExport(e,!0),this.finishNode(e,"ExportNamedDeclaration")},Y.parseExportDeclaration=function(){return this.parseStatement(!0)},Y.isExportDefaultSpecifier=function(){if(this.match(j.name))return"async"!==this.state.value;if(!this.match(j._default))return!1;var e=this.lookahead();return e.type===j.comma||e.type===j.name&&"from"===e.value},Y.parseExportSpecifiersMaybe=function(e){this.eat(j.comma)&&(e.specifiers=e.specifiers.concat(this.parseExportSpecifiers()))},Y.parseExportFrom=function(e,t){this.eatContextual("from")?(e.source=this.match(j.string)?this.parseExprAtom():this.unexpected(),this.checkExport(e)):t?this.unexpected():e.source=null,this.semicolon()},Y.shouldParseExportDeclaration=function(){return"var"===this.state.type.keyword||"const"===this.state.type.keyword||"let"===this.state.type.keyword||"function"===this.state.type.keyword||"class"===this.state.type.keyword||this.isContextual("async")},Y.checkExport=function(e,t,r){if(t)if(r)this.checkDuplicateExports(e,"default");else if(e.specifiers&&e.specifiers.length)for(var n=e.specifiers,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;this.checkDuplicateExports(o,o.exported.name)}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type)this.checkDuplicateExports(e,e.declaration.id.name);else if("VariableDeclaration"===e.declaration.type)for(var u=e.declaration.declarations,l=Array.isArray(u),c=0,u=l?u:u[Symbol.iterator]();;){var p;if(l){if(c>=u.length)break;p=u[c++]}else{if((c=u.next()).done)break;p=c.value}var h=p;this.checkDeclaration(h.id)}if(this.state.decorators.length){var f=e.declaration&&("ClassDeclaration"===e.declaration.type||"ClassExpression"===e.declaration.type);e.declaration&&f||this.raise(e.start,"You can only use decorators on an export when exporting a class"),this.takeDecorators(e.declaration)}},Y.checkDeclaration=function(e){if("ObjectPattern"===e.type)for(var t=e.properties,r=Array.isArray(t),n=0,t=r?t:t[Symbol.iterator]();;){var i;if(r){if(n>=t.length)break;i=t[n++]}else{if((n=t.next()).done)break;i=n.value}var s=i;this.checkDeclaration(s)}else if("ArrayPattern"===e.type)for(var a=e.elements,o=Array.isArray(a),u=0,a=o?a:a[Symbol.iterator]();;){var l;if(o){if(u>=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;c&&this.checkDeclaration(c)}else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type||"RestProperty"===e.type?this.checkDeclaration(e.argument):"Identifier"===e.type&&this.checkDuplicateExports(e,e.name)},Y.checkDuplicateExports=function(e,t){this.state.exportedIdentifiers.indexOf(t)>-1&&this.raiseDuplicateExportError(e,t),this.state.exportedIdentifiers.push(t)},Y.raiseDuplicateExportError=function(e,t){this.raise(e.start,"default"===t?"Only one default export allowed per module.":"`"+t+"` has already been exported. Exported identifiers must be unique.")},Y.parseExportSpecifiers=function(){var e=[],t=!0,r=void 0;for(this.expect(j.braceL);!this.eat(j.braceR);){if(t)t=!1;else if(this.expect(j.comma),this.eat(j.braceR))break;var n=this.match(j._default);n&&!r&&(r=!0);var i=this.startNode();i.local=this.parseIdentifier(n),i.exported=this.eatContextual("as")?this.parseIdentifier(!0):i.local.__clone(),e.push(this.finishNode(i,"ExportSpecifier"))}return r&&!this.isContextual("from")&&this.unexpected(),e},Y.parseImport=function(e){return this.eat(j._import),this.match(j.string)?(e.specifiers=[],e.source=this.parseExprAtom()):(e.specifiers=[],this.parseImportSpecifiers(e),this.expectContextual("from"),e.source=this.match(j.string)?this.parseExprAtom():this.unexpected()),this.semicolon(),this.finishNode(e,"ImportDeclaration")},Y.parseImportSpecifiers=function(e){var t=!0;if(this.match(j.name)){var r=this.state.start,n=this.state.startLoc;if(e.specifiers.push(this.parseImportSpecifierDefault(this.parseIdentifier(),r,n)),!this.eat(j.comma))return}if(this.match(j.star)){var i=this.startNode();return this.next(),this.expectContextual("as"),i.local=this.parseIdentifier(),this.checkLVal(i.local,!0,void 0,"import namespace specifier"),void e.specifiers.push(this.finishNode(i,"ImportNamespaceSpecifier"))}for(this.expect(j.braceL);!this.eat(j.braceR);){if(t)t=!1;else if(this.eat(j.colon)&&this.unexpected(null,"ES2015 named imports do not destructure. Use another statement for destructuring after the import."),this.expect(j.comma),this.eat(j.braceR))break;this.parseImportSpecifier(e)}},Y.parseImportSpecifier=function(e){var t=this.startNode();t.imported=this.parseIdentifier(!0),this.eatContextual("as")?t.local=this.parseIdentifier():(this.checkReservedWord(t.imported.name,t.start,!0,!0),t.local=t.imported.__clone()),this.checkLVal(t.local,!0,void 0,"import specifier"),e.specifiers.push(this.finishNode(t,"ImportSpecifier"))},Y.parseImportSpecifierDefault=function(e,t,r){var n=this.startNodeAt(t,r);return n.local=e,this.checkLVal(n.local,!0,void 0,"default import specifier"),this.finishNode(n,"ImportDefaultSpecifier")};var Z=K.prototype;Z.toAssignable=function(e,t,r){if(e)switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=e.properties,i=Array.isArray(n),s=0,n=i?n:n[Symbol.iterator]();;){var a;if(i){if(s>=n.length)break;a=n[s++]}else{if((s=n.next()).done)break;a=s.value}var o=a;"ObjectMethod"===o.type?"get"===o.kind||"set"===o.kind?this.raise(o.key.start,"Object pattern can't contain getter or setter"):this.raise(o.key.start,"Object pattern can't contain methods"):this.toAssignable(o,t,"object destructuring pattern")}break;case"ObjectProperty":this.toAssignable(e.value,t,r);break;case"SpreadProperty":e.type="RestProperty";var u=e.argument;this.toAssignable(u,t,r);break;case"ArrayExpression":e.type="ArrayPattern",this.toAssignableList(e.elements,t,r);break;case"AssignmentExpression":"="===e.operator?(e.type="AssignmentPattern",delete e.operator):this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");break;case"MemberExpression":if(!t)break;default:var l="Invalid left-hand side"+(r?" in "+r:"expression");this.raise(e.start,l)}return e},Z.toAssignableList=function(e,t,r){var n=e.length;if(n){var i=e[n-1];if(i&&"RestElement"===i.type)--n;else if(i&&"SpreadElement"===i.type){i.type="RestElement";var s=i.argument;this.toAssignable(s,t,r),"Identifier"!==s.type&&"MemberExpression"!==s.type&&"ArrayPattern"!==s.type&&this.unexpected(s.start),--n}}for(var a=0;a=s.length)break;u=s[o++]}else{if((o=s.next()).done)break;u=o.value}var l=u;"ObjectProperty"===l.type&&(l=l.value),this.checkLVal(l,t,r,"object destructuring pattern")}break;case"ArrayPattern":for(var c=e.elements,p=Array.isArray(c),h=0,c=p?c:c[Symbol.iterator]();;){var f;if(p){if(h>=c.length)break;f=c[h++]}else{if((h=c.next()).done)break;f=h.value}var d=f;d&&this.checkLVal(d,t,r,"array destructuring pattern")}break;case"AssignmentPattern":this.checkLVal(e.left,t,r,"assignment pattern");break;case"RestProperty":this.checkLVal(e.argument,t,r,"rest property");break;case"RestElement":this.checkLVal(e.argument,t,r,"rest element");break;default:var m=(t?"Binding invalid":"Invalid")+" left-hand side"+(n?" in "+n:"expression");this.raise(e.start,m)}};var ee=K.prototype;ee.checkPropClash=function(e,t){if(!e.computed&&!e.kind){var r=e.key;"__proto__"===("Identifier"===r.type?r.name:String(r.value))&&(t.proto&&this.raise(r.start,"Redefinition of __proto__ property"),t.proto=!0)}},ee.getExpression=function(){this.nextToken();var e=this.parseExpression();return this.match(j.eof)||this.unexpected(),e},ee.parseExpression=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeAssign(e,t);if(this.match(j.comma)){var s=this.startNodeAt(r,n);for(s.expressions=[i];this.eat(j.comma);)s.expressions.push(this.parseMaybeAssign(e,t));return this.toReferencedList(s.expressions),this.finishNode(s,"SequenceExpression")}return i},ee.parseMaybeAssign=function(e,t,r,n){var i=this.state.start,s=this.state.startLoc;if(this.match(j._yield)&&this.state.inGenerator){var a=this.parseYield();return r&&(a=r.call(this,a,i,s)),a}var o=void 0;t?o=!1:(t={start:0},o=!0),(this.match(j.parenL)||this.match(j.name))&&(this.state.potentialArrowAt=this.state.start);var u=this.parseMaybeConditional(e,t,n);if(r&&(u=r.call(this,u,i,s)),this.state.type.isAssign){var l=this.startNodeAt(i,s);if(l.operator=this.state.value,l.left=this.match(j.eq)?this.toAssignable(u,void 0,"assignment expression"):u,t.start=0,this.checkLVal(u,void 0,void 0,"assignment expression"),u.extra&&u.extra.parenthesized){var c=void 0;"ObjectPattern"===u.type?c="`({a}) = 0` use `({a} = 0)`":"ArrayPattern"===u.type&&(c="`([a]) = 0` use `([a] = 0)`"),c&&this.raise(u.start,"You're trying to assign to a parenthesized expression, eg. instead of "+c)}return this.next(),l.right=this.parseMaybeAssign(e),this.finishNode(l,"AssignmentExpression")}return o&&t.start&&this.unexpected(t.start),u},ee.parseMaybeConditional=function(e,t,r){var n=this.state.start,i=this.state.startLoc,s=this.parseExprOps(e,t);return t&&t.start?s:this.parseConditional(s,e,n,i,r)},ee.parseConditional=function(e,t,r,n){if(this.eat(j.question)){var i=this.startNodeAt(r,n);return i.test=e,i.consequent=this.parseMaybeAssign(),this.expect(j.colon),i.alternate=this.parseMaybeAssign(t),this.finishNode(i,"ConditionalExpression")}return e},ee.parseExprOps=function(e,t){var r=this.state.start,n=this.state.startLoc,i=this.parseMaybeUnary(t);return t&&t.start?i:this.parseExprOp(i,r,n,-1,e)},ee.parseExprOp=function(e,t,r,n,i){var s=this.state.type.binop;if(!(null==s||i&&this.match(j._in))&&s>n){var a=this.startNodeAt(t,r);a.left=e,a.operator=this.state.value,"**"!==a.operator||"UnaryExpression"!==e.type||!e.extra||e.extra.parenthesizedArgument||e.extra.parenthesized||this.raise(e.argument.start,"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.");var o=this.state.type;this.next();var u=this.state.start,l=this.state.startLoc;return a.right=this.parseExprOp(this.parseMaybeUnary(),u,l,o.rightAssociative?s-1:s,i),this.finishNode(a,o===j.logicalOR||o===j.logicalAND?"LogicalExpression":"BinaryExpression"),this.parseExprOp(a,t,r,n,i)}return e},ee.parseMaybeUnary=function(e){if(this.state.type.prefix){var t=this.startNode(),r=this.match(j.incDec);t.operator=this.state.value,t.prefix=!0,this.next();var n=this.state.type;return t.argument=this.parseMaybeUnary(),this.addExtra(t,"parenthesizedArgument",!(n!==j.parenL||t.argument.extra&&t.argument.extra.parenthesized)),e&&e.start&&this.unexpected(e.start),r?this.checkLVal(t.argument,void 0,void 0,"prefix operation"):this.state.strict&&"delete"===t.operator&&"Identifier"===t.argument.type&&this.raise(t.start,"Deleting local variable in strict mode"),this.finishNode(t,r?"UpdateExpression":"UnaryExpression")}var i=this.state.start,s=this.state.startLoc,a=this.parseExprSubscripts(e);if(e&&e.start)return a;for(;this.state.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(i,s);o.operator=this.state.value,o.prefix=!1,o.argument=a,this.checkLVal(a,void 0,void 0,"postfix operation"),this.next(),a=this.finishNode(o,"UpdateExpression")}return a},ee.parseExprSubscripts=function(e){var t=this.state.start,r=this.state.startLoc,n=this.state.potentialArrowAt,i=this.parseExprAtom(e);return"ArrowFunctionExpression"===i.type&&i.start===n?i:e&&e.start?i:this.parseSubscripts(i,t,r)},ee.parseSubscripts=function(e,t,r,n){for(;;){if(!n&&this.eat(j.doubleColon)){var i=this.startNodeAt(t,r);return i.object=e,i.callee=this.parseNoCallExpr(),this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r,n)}if(this.eat(j.dot)){var s=this.startNodeAt(t,r);s.object=e,s.property=this.parseIdentifier(!0),s.computed=!1,e=this.finishNode(s,"MemberExpression")}else if(this.eat(j.bracketL)){var a=this.startNodeAt(t,r);a.object=e,a.property=this.parseExpression(),a.computed=!0,this.expect(j.bracketR),e=this.finishNode(a,"MemberExpression")}else if(!n&&this.match(j.parenL)){var o=this.state.potentialArrowAt===e.start&&"Identifier"===e.type&&"async"===e.name&&!this.canInsertSemicolon();this.next();var u=this.startNodeAt(t,r);if(u.callee=e,u.arguments=this.parseCallExpressionArguments(j.parenR,o),"Import"===u.callee.type&&1!==u.arguments.length&&this.raise(u.start,"import() requires exactly one argument"),e=this.finishNode(u,"CallExpression"),o&&this.shouldParseAsyncArrow())return this.parseAsyncArrowFromCallExpression(this.startNodeAt(t,r),u);this.toReferencedList(u.arguments)}else{if(!this.match(j.backQuote))return e;var l=this.startNodeAt(t,r);l.tag=e,l.quasi=this.parseTemplate(!0),e=this.finishNode(l,"TaggedTemplateExpression")}}},ee.parseCallExpressionArguments=function(e,t){for(var r=[],n=void 0,i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(j.comma),this.eat(e))break;this.match(j.parenL)&&!n&&(n=this.state.start),r.push(this.parseExprListItem(!1,t?{start:0}:void 0,t?{start:0}:void 0))}return t&&n&&this.shouldParseAsyncArrow()&&this.unexpected(),r},ee.shouldParseAsyncArrow=function(){return this.match(j.arrow)},ee.parseAsyncArrowFromCallExpression=function(e,t){return this.expect(j.arrow),this.parseArrowExpression(e,t.arguments,!0)},ee.parseNoCallExpr=function(){var e=this.state.start,t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,t,!0)},ee.parseExprAtom=function(e){var t=this.state.potentialArrowAt===this.state.start,r=void 0;switch(this.state.type){case j._super:return this.state.inMethod||this.state.inClassProperty||this.options.allowSuperOutsideMethod||this.raise(this.state.start,"'super' outside of function or class"),r=this.startNode(),this.next(),this.match(j.parenL)||this.match(j.bracketL)||this.match(j.dot)||this.unexpected(),this.match(j.parenL)&&"constructor"!==this.state.inMethod&&!this.options.allowSuperOutsideMethod&&this.raise(r.start,"super() outside of class constructor"),this.finishNode(r,"Super");case j._import:return this.hasPlugin("dynamicImport")||this.unexpected(),r=this.startNode(),this.next(),this.match(j.parenL)||this.unexpected(null,j.parenL),this.finishNode(r,"Import");case j._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case j._yield:this.state.inGenerator&&this.unexpected();case j.name:r=this.startNode();var n="await"===this.state.value&&this.state.inAsync,i=this.shouldAllowYieldIdentifier(),s=this.parseIdentifier(n||i);if("await"===s.name){if(this.state.inAsync||this.inModule)return this.parseAwait(r)}else{if("async"===s.name&&this.match(j._function)&&!this.canInsertSemicolon())return this.next(),this.parseFunction(r,!1,!1,!0);if(t&&"async"===s.name&&this.match(j.name)){var a=[this.parseIdentifier()];return this.expect(j.arrow),this.parseArrowExpression(r,a,!0)}}return t&&!this.canInsertSemicolon()&&this.eat(j.arrow)?this.parseArrowExpression(r,[s]):s;case j._do:if(this.hasPlugin("doExpressions")){var o=this.startNode();this.next();var u=this.state.inFunction,l=this.state.labels;return this.state.labels=[],this.state.inFunction=!1,o.body=this.parseBlock(!1,!0),this.state.inFunction=u,this.state.labels=l,this.finishNode(o,"DoExpression")}case j.regexp:var c=this.state.value;return r=this.parseLiteral(c.value,"RegExpLiteral"),r.pattern=c.pattern,r.flags=c.flags,r;case j.num:return this.parseLiteral(this.state.value,"NumericLiteral");case j.string:return this.parseLiteral(this.state.value,"StringLiteral");case j._null:return r=this.startNode(),this.next(),this.finishNode(r,"NullLiteral");case j._true:case j._false:return r=this.startNode(),r.value=this.match(j._true),this.next(),this.finishNode(r,"BooleanLiteral");case j.parenL:return this.parseParenAndDistinguishExpression(null,null,t);case j.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(j.bracketR,!0,e),this.toReferencedList(r.elements),this.finishNode(r,"ArrayExpression");case j.braceL:return this.parseObj(!1,e);case j._function:return this.parseFunctionExpression();case j.at:this.parseDecorators();case j._class:return r=this.startNode(),this.takeDecorators(r),this.parseClass(r,!1);case j._new:return this.parseNew();case j.backQuote:return this.parseTemplate(!1);case j.doubleColon:r=this.startNode(),this.next(),r.object=null;var p=r.callee=this.parseNoCallExpr();if("MemberExpression"===p.type)return this.finishNode(r,"BindExpression");this.raise(p.start,"Binding should be performed on object property.");default:this.unexpected()}},ee.parseFunctionExpression=function(){var e=this.startNode(),t=this.parseIdentifier(!0);return this.state.inGenerator&&this.eat(j.dot)&&this.hasPlugin("functionSent")?this.parseMetaProperty(e,t,"sent"):this.parseFunction(e,!1)},ee.parseMetaProperty=function(e,t,r){return e.meta=t,e.property=this.parseIdentifier(!0),e.property.name!==r&&this.raise(e.property.start,"The only valid meta property for new is "+t.name+"."+r),this.finishNode(e,"MetaProperty")},ee.parseLiteral=function(e,t,r,n){r=r||this.state.start,n=n||this.state.startLoc;var i=this.startNodeAt(r,n);return this.addExtra(i,"rawValue",e),this.addExtra(i,"raw",this.input.slice(r,this.state.end)),i.value=e,this.next(),this.finishNode(i,t)},ee.parseParenExpression=function(){this.expect(j.parenL);var e=this.parseExpression();return this.expect(j.parenR),e},ee.parseParenAndDistinguishExpression=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;var n=void 0;this.expect(j.parenL);for(var i=this.state.start,s=this.state.startLoc,a=[],o={start:0},u={start:0},l=!0,c=void 0,p=void 0;!this.match(j.parenR);){if(l)l=!1;else if(this.expect(j.comma,u.start||null),this.match(j.parenR)){p=this.state.start;break}if(this.match(j.ellipsis)){var h=this.state.start,f=this.state.startLoc;c=this.state.start,a.push(this.parseParenItem(this.parseRest(),h,f));break}a.push(this.parseMaybeAssign(!1,o,this.parseParenItem,u))}var d=this.state.start,m=this.state.startLoc;this.expect(j.parenR);var y=this.startNodeAt(e,t);if(r&&this.shouldParseArrow()&&(y=this.parseArrow(y))){for(var g=a,b=Array.isArray(g),v=0,g=b?g:g[Symbol.iterator]();;){var x;if(b){if(v>=g.length)break;x=g[v++]}else{if((v=g.next()).done)break;x=v.value}var E=x;E.extra&&E.extra.parenthesized&&this.unexpected(E.extra.parenStart)}return this.parseArrowExpression(y,a)}return a.length||this.unexpected(this.state.lastTokStart),p&&this.unexpected(p),c&&this.unexpected(c),o.start&&this.unexpected(o.start),u.start&&this.unexpected(u.start),a.length>1?((n=this.startNodeAt(i,s)).expressions=a,this.toReferencedList(n.expressions),this.finishNodeAt(n,"SequenceExpression",d,m)):n=a[0],this.addExtra(n,"parenthesized",!0),this.addExtra(n,"parenStart",e),n},ee.shouldParseArrow=function(){return!this.canInsertSemicolon()},ee.parseArrow=function(e){if(this.eat(j.arrow))return e},ee.parseParenItem=function(e){return e},ee.parseNew=function(){var e=this.startNode(),t=this.parseIdentifier(!0);if(this.eat(j.dot)){var r=this.parseMetaProperty(e,t,"target");return this.state.inFunction||this.raise(r.property.start,"new.target can only be used in functions"),r}return e.callee=this.parseNoCallExpr(),this.eat(j.parenL)?(e.arguments=this.parseExprList(j.parenR),this.toReferencedList(e.arguments)):e.arguments=[],this.finishNode(e,"NewExpression")},ee.parseTemplateElement=function(e){var t=this.startNode();return null===this.state.value&&(e&&this.hasPlugin("templateInvalidEscapes")?this.state.invalidTemplateEscapePosition=null:this.raise(this.state.invalidTemplateEscapePosition,"Invalid escape sequence in template")),t.value={raw:this.input.slice(this.state.start,this.state.end).replace(/\r\n?/g,"\n"),cooked:this.state.value},this.next(),t.tail=this.match(j.backQuote),this.finishNode(t,"TemplateElement")},ee.parseTemplate=function(e){var t=this.startNode();this.next(),t.expressions=[];var r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)this.expect(j.dollarBraceL),t.expressions.push(this.parseExpression()),this.expect(j.braceR),t.quasis.push(r=this.parseTemplateElement(e));return this.next(),this.finishNode(t,"TemplateLiteral")},ee.parseObj=function(e,t){var r=[],n=Object.create(null),i=!0,s=this.startNode();s.properties=[],this.next();for(var a=null;!this.eat(j.braceR);){if(i)i=!1;else if(this.expect(j.comma),this.eat(j.braceR))break;for(;this.match(j.at);)r.push(this.parseDecorator());var o=this.startNode(),u=!1,l=!1,c=void 0,p=void 0;if(r.length&&(o.decorators=r,r=[]),this.hasPlugin("objectRestSpread")&&this.match(j.ellipsis)){if(o=this.parseSpread(e?{start:0}:void 0),o.type=e?"RestProperty":"SpreadProperty",e&&this.toAssignable(o.argument,!0,"object pattern"),s.properties.push(o),!e)continue;var h=this.state.start;if(null===a){if(this.eat(j.braceR))break;if(this.match(j.comma)&&this.lookahead().type===j.braceR)continue;a=h;continue}this.unexpected(a,"Cannot have multiple rest elements when destructuring")}if(o.method=!1,o.shorthand=!1,(e||t)&&(c=this.state.start,p=this.state.startLoc),e||(u=this.eat(j.star)),!e&&this.isContextual("async")){u&&this.unexpected();var f=this.parseIdentifier();this.match(j.colon)||this.match(j.parenL)||this.match(j.braceR)||this.match(j.eq)||this.match(j.comma)?(o.key=f,o.computed=!1):(l=!0,this.hasPlugin("asyncGenerators")&&(u=this.eat(j.star)),this.parsePropertyName(o))}else this.parsePropertyName(o);this.parseObjPropValue(o,c,p,u,l,e,t),this.checkPropClash(o,n),o.shorthand&&this.addExtra(o,"shorthand",!0),s.properties.push(o)}return null!==a&&this.unexpected(a,"The rest element has to be the last element when destructuring"),r.length&&this.raise(this.state.start,"You have trailing decorators with no property"),this.finishNode(s,e?"ObjectPattern":"ObjectExpression")},ee.isGetterOrSetterMethod=function(e,t){return!t&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&(this.match(j.string)||this.match(j.num)||this.match(j.bracketL)||this.match(j.name)||this.state.type.keyword)},ee.checkGetterSetterParamCount=function(e){var t="get"===e.kind?0:1;if(e.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}},ee.parseObjectMethod=function(e,t,r,n){return r||t||this.match(j.parenL)?(n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r),this.finishNode(e,"ObjectMethod")):this.isGetterOrSetterMethod(e,n)?((t||r)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),this.parseMethod(e),this.checkGetterSetterParamCount(e),this.finishNode(e,"ObjectMethod")):void 0},ee.parseObjectProperty=function(e,t,r,n,i){return this.eat(j.colon)?(e.value=n?this.parseMaybeDefault(this.state.start,this.state.startLoc):this.parseMaybeAssign(!1,i),this.finishNode(e,"ObjectProperty")):e.computed||"Identifier"!==e.key.type?void 0:(this.checkReservedWord(e.key.name,e.key.start,!0,!0),n?e.value=this.parseMaybeDefault(t,r,e.key.__clone()):this.match(j.eq)&&i?(i.start||(i.start=this.state.start),e.value=this.parseMaybeDefault(t,r,e.key.__clone())):e.value=e.key.__clone(),e.shorthand=!0,this.finishNode(e,"ObjectProperty"))},ee.parseObjPropValue=function(e,t,r,n,i,s,a){var o=this.parseObjectMethod(e,n,i,s)||this.parseObjectProperty(e,t,r,s,a);return o||this.unexpected(),o},ee.parsePropertyName=function(e){if(this.eat(j.bracketL))e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(j.bracketR);else{e.computed=!1;var t=this.state.inPropertyName;this.state.inPropertyName=!0,e.key=this.match(j.num)||this.match(j.string)?this.parseExprAtom():this.parseIdentifier(!0),this.state.inPropertyName=t}return e.key},ee.initFunction=function(e,t){e.id=null,e.generator=!1,e.expression=!1,e.async=!!t},ee.parseMethod=function(e,t,r){var n=this.state.inMethod;return this.state.inMethod=e.kind||!0,this.initFunction(e,r),this.expect(j.parenL),e.params=this.parseBindingList(j.parenR),e.generator=!!t,this.parseFunctionBody(e),this.state.inMethod=n,e},ee.parseArrowExpression=function(e,t,r){return this.initFunction(e,r),e.params=this.toAssignableList(t,!0,"arrow function parameters"),this.parseFunctionBody(e,!0),this.finishNode(e,"ArrowFunctionExpression")},ee.isStrictBody=function(e,t){if(!t&&e.body.directives.length)for(var r=e.body.directives,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}if("use strict"===s.value.value)return!0}return!1},ee.parseFunctionBody=function(e,t){var r=t&&!this.match(j.braceL),n=this.state.inAsync;if(this.state.inAsync=e.async,r)e.body=this.parseMaybeAssign(),e.expression=!0;else{var i=this.state.inFunction,s=this.state.inGenerator,a=this.state.labels;this.state.inFunction=!0,this.state.inGenerator=e.generator,this.state.labels=[],e.body=this.parseBlock(!0),e.expression=!1,this.state.inFunction=i,this.state.inGenerator=s,this.state.labels=a}this.state.inAsync=n;var o=this.isStrictBody(e,r),u=this.state.strict||t||o;if(o&&e.id&&"Identifier"===e.id.type&&"yield"===e.id.name&&this.raise(e.id.start,"Binding yield in strict mode"),u){var l=Object.create(null),c=this.state.strict;o&&(this.state.strict=!0),e.id&&this.checkLVal(e.id,!0,void 0,"function name");for(var p=e.params,h=Array.isArray(p),f=0,p=h?p:p[Symbol.iterator]();;){var d;if(h){if(f>=p.length)break;d=p[f++]}else{if((f=p.next()).done)break;d=f.value}var m=d;o&&"Identifier"!==m.type&&this.raise(m.start,"Non-simple parameter in strict mode"),this.checkLVal(m,!0,l,"function parameter list")}this.state.strict=c}},ee.parseExprList=function(e,t,r){for(var n=[],i=!0;!this.eat(e);){if(i)i=!1;else if(this.expect(j.comma),this.eat(e))break;n.push(this.parseExprListItem(t,r))}return n},ee.parseExprListItem=function(e,t,r){return e&&this.match(j.comma)?null:this.match(j.ellipsis)?this.parseSpread(t):this.parseMaybeAssign(!1,t,this.parseParenItem,r)},ee.parseIdentifier=function(e){var t=this.startNode();return e||this.checkReservedWord(this.state.value,this.state.start,!!this.state.type.keyword,!1),this.match(j.name)?t.name=this.state.value:this.state.type.keyword?t.name=this.state.type.keyword:this.unexpected(),!e&&"await"===t.name&&this.state.inAsync&&this.raise(t.start,"invalid use of await inside of an async function"),t.loc.identifierName=t.name,this.next(),this.finishNode(t,"Identifier")},ee.checkReservedWord=function(e,t,r,n){(this.isReservedWord(e)||r&&this.isKeyword(e))&&this.raise(t,e+" is a reserved word"),this.state.strict&&(g.strict(e)||n&&g.strictBind(e))&&this.raise(t,e+" is a reserved word in strict mode")},ee.parseAwait=function(e){return this.state.inAsync||this.unexpected(),this.match(j.star)&&this.raise(e.start,"await* has been removed from the async functions proposal. Use Promise.all() instead."),e.argument=this.parseMaybeUnary(),this.finishNode(e,"AwaitExpression")},ee.parseYield=function(){var e=this.startNode();return this.next(),this.match(j.semi)||this.canInsertSemicolon()||!this.match(j.star)&&!this.state.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(j.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")};var te=K.prototype,re=["leadingComments","trailingComments","innerComments"],ne=function(){function e(t,r,n){w(this,e),this.type="",this.start=t,this.end=0,this.loc=new q(r),n&&(this.loc.filename=n)}return e.prototype.__clone=function(){var t=new e;for(var r in this)re.indexOf(r)<0&&(t[r]=this[r]);return t},e}();te.startNode=function(){return new ne(this.state.start,this.state.startLoc,this.filename)},te.startNodeAt=function(e,t){return new ne(e,t,this.filename)},te.finishNode=function(e,t){return p.call(this,e,t,this.state.lastTokEnd,this.state.lastTokEndLoc)},te.finishNodeAt=function(e,t,r,n){return p.call(this,e,t,r,n)},K.prototype.raise=function(e,t){var r=l(this.input,e);t+=" ("+r.line+":"+r.column+")";var n=new SyntaxError(t);throw n.pos=e,n.loc=r,n};var ie=K.prototype;ie.addComment=function(e){this.filename&&(e.loc.filename=this.filename),this.state.trailingComments.push(e),this.state.leadingComments.push(e)},ie.processComment=function(e){if(!("Program"===e.type&&e.body.length>0)){var t=this.state.commentStack,r=void 0,n=void 0,i=void 0,s=void 0,a=void 0;if(this.state.trailingComments.length>0)this.state.trailingComments[0].start>=e.end?(i=this.state.trailingComments,this.state.trailingComments=[]):this.state.trailingComments.length=0;else{var o=h(t);t.length>0&&o.trailingComments&&o.trailingComments[0].start>=e.end&&(i=o.trailingComments,o.trailingComments=null)}for(t.length>0&&h(t).start>=e.start&&(r=t.pop());t.length>0&&h(t).start>=e.start;)n=t.pop();if(!n&&r&&(n=r),r&&("ObjectProperty"===r.type||"CallExpression"===e.type)&&this.state.leadingComments.length>0&&h(this.state.leadingComments).start>=e.start&&this.state.commentPreviousNode){for(a=0;a0&&(r.trailingComments=this.state.leadingComments,this.state.leadingComments=[])}if(n){if(n.leadingComments)if(n!==e&&h(n.leadingComments).end<=e.start)e.leadingComments=n.leadingComments,n.leadingComments=null;else for(s=n.leadingComments.length-2;s>=0;--s)if(n.leadingComments[s].end<=e.start){e.leadingComments=n.leadingComments.splice(0,s+1);break}}else if(this.state.leadingComments.length>0)if(h(this.state.leadingComments).end<=e.start){if(this.state.commentPreviousNode)for(a=0;a0&&(e.leadingComments=this.state.leadingComments,this.state.leadingComments=[])}else{for(s=0;se.start);s++);e.leadingComments=this.state.leadingComments.slice(0,s),0===e.leadingComments.length&&(e.leadingComments=null),0===(i=this.state.leadingComments.slice(s)).length&&(i=null)}this.state.commentPreviousNode=e,i&&(i.length&&i[0].start>=e.start&&h(i).end<=e.end?e.innerComments=i:e.trailingComments=i),t.push(e)}};var se=K.prototype;se.estreeParseRegExpLiteral=function(e){var t=e.pattern,r=e.flags,n=null;try{n=new RegExp(t,r)}catch(e){}var i=this.estreeParseLiteral(n);return i.regex={pattern:t,flags:r},i},se.estreeParseLiteral=function(e){return this.parseLiteral(e,"Literal")},se.directiveToStmt=function(e){var t=e.value,r=this.startNodeAt(e.start,e.loc.start),n=this.startNodeAt(t.start,t.loc.start);return n.value=t.value,n.raw=t.extra.raw,r.expression=this.finishNodeAt(n,"Literal",t.end,t.loc.end),r.directive=t.extra.raw.slice(1,-1),this.finishNodeAt(r,"ExpressionStatement",e.end,e.loc.end)};var ae=function(e){e.extend("checkDeclaration",function(e){return function(t){f(t)?this.checkDeclaration(t.value):e.call(this,t)}}),e.extend("checkGetterSetterParamCount",function(){return function(e){var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.start;"get"===e.kind?this.raise(r,"getter should have no params"):this.raise(r,"setter should have exactly one param")}}}),e.extend("checkLVal",function(e){return function(t,r,n){var i=this;switch(t.type){case"ObjectPattern":t.properties.forEach(function(e){i.checkLVal("Property"===e.type?e.value:e,r,n,"object destructuring pattern")});break;default:for(var s=arguments.length,a=Array(s>3?s-3:0),o=3;o0)for(var r=e.body.body,n=Array.isArray(r),i=0,r=n?r:r[Symbol.iterator]();;){var s;if(n){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}var a=s;if("ExpressionStatement"!==a.type||"Literal"!==a.expression.type)break;if("use strict"===a.expression.value)return!0}return!1}}),e.extend("isValidDirective",function(){return function(e){return!("ExpressionStatement"!==e.type||"Literal"!==e.expression.type||"string"!=typeof e.expression.value||e.expression.extra&&e.expression.extra.parenthesized)}}),e.extend("parseBlockBody",function(e){return function(t){for(var r=this,n=arguments.length,i=Array(n>1?n-1:0),s=1;s1?r-1:0),i=1;i1?n-1:0),s=1;s2?n-2:0),s=2;s=a.length)break;l=a[u++]}else{if((u=a.next()).done)break;l=u.value}var c=l;"get"===c.kind||"set"===c.kind?this.raise(c.key.start,"Object pattern can't contain getter or setter"):c.method?this.raise(c.key.start,"Object pattern can't contain methods"):this.toAssignable(c,r,"object destructuring pattern")}return t}return e.call.apply(e,[this,t,r].concat(i))}})},oe=["any","mixed","empty","bool","boolean","number","string","void","null"],ue=K.prototype;ue.flowParseTypeInitialiser=function(e){var t=this.state.inType;this.state.inType=!0,this.expect(e||j.colon);var r=this.flowParseType();return this.state.inType=t,r},ue.flowParsePredicate=function(){var e=this.startNode(),t=this.state.startLoc,r=this.state.start;this.expect(j.modulo);var n=this.state.startLoc;return this.expectContextual("checks"),t.line===n.line&&t.column===n.column-1||this.raise(r,"Spaces between ´%´ and ´checks´ are not allowed here."),this.eat(j.parenL)?(e.expression=this.parseExpression(),this.expect(j.parenR),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")},ue.flowParseTypeAndPredicateInitialiser=function(){var e=this.state.inType;this.state.inType=!0,this.expect(j.colon);var t=null,r=null;return this.match(j.modulo)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(j.modulo)&&(r=this.flowParsePredicate())),[t,r]},ue.flowParseDeclareClass=function(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")},ue.flowParseDeclareFunction=function(e){this.next();var t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.isRelational("<")?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(j.parenL);var i=this.flowParseFunctionTypeParams();r.params=i.params,r.rest=i.rest,this.expect(j.parenR);var s=null,a=this.flowParseTypeAndPredicateInitialiser();return r.returnType=a[0],s=a[1],n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),n.predicate=s,t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.finishNode(t,t.type),this.semicolon(),this.finishNode(e,"DeclareFunction")},ue.flowParseDeclare=function(e){return this.match(j._class)?this.flowParseDeclareClass(e):this.match(j._function)?this.flowParseDeclareFunction(e):this.match(j._var)?this.flowParseDeclareVariable(e):this.isContextual("module")?this.lookahead().type===j.dot?this.flowParseDeclareModuleExports(e):this.flowParseDeclareModule(e):this.isContextual("type")?this.flowParseDeclareTypeAlias(e):this.isContextual("interface")?this.flowParseDeclareInterface(e):void this.unexpected()},ue.flowParseDeclareVariable=function(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.semicolon(),this.finishNode(e,"DeclareVariable")},ue.flowParseDeclareModule=function(e){this.next(),this.match(j.string)?e.id=this.parseExprAtom():e.id=this.parseIdentifier();var t=e.body=this.startNode(),r=t.body=[];for(this.expect(j.braceL);!this.match(j.braceR);){var n=this.startNode();if(this.match(j._import)){var i=this.lookahead();"type"!==i.value&&"typeof"!==i.value&&this.unexpected(null,"Imports within a `declare module` body must always be `import type` or `import typeof`"),this.parseImport(n)}else this.expectContextual("declare","Only declares and type imports are allowed inside declare module"),n=this.flowParseDeclare(n,!0);r.push(n)}return this.expect(j.braceR),this.finishNode(t,"BlockStatement"),this.finishNode(e,"DeclareModule")},ue.flowParseDeclareModuleExports=function(e){return this.expectContextual("module"),this.expect(j.dot),this.expectContextual("exports"),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")},ue.flowParseDeclareTypeAlias=function(e){return this.next(),this.flowParseTypeAlias(e),this.finishNode(e,"DeclareTypeAlias")},ue.flowParseDeclareInterface=function(e){return this.next(),this.flowParseInterfaceish(e),this.finishNode(e,"DeclareInterface")},ue.flowParseInterfaceish=function(e){if(e.id=this.parseIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],e.mixins=[],this.eat(j._extends))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(j.comma));if(this.isContextual("mixins")){this.next();do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(j.comma))}e.body=this.flowParseObjectType(!0,!1,!1)},ue.flowParseInterfaceExtends=function(){var e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")},ue.flowParseInterface=function(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")},ue.flowParseRestrictedIdentifier=function(e){return oe.indexOf(this.state.value)>-1&&this.raise(this.state.start,"Cannot overwrite primitive type "+this.state.value),this.parseIdentifier(e)},ue.flowParseTypeAlias=function(e){return e.id=this.flowParseRestrictedIdentifier(),this.isRelational("<")?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(j.eq),this.semicolon(),this.finishNode(e,"TypeAlias")},ue.flowParseTypeParameter=function(){var e=this.startNode(),t=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return e.name=r.name,e.variance=t,e.bound=r.typeAnnotation,this.match(j.eq)&&(this.eat(j.eq),e.default=this.flowParseType()),this.finishNode(e,"TypeParameter")},ue.flowParseTypeParameterDeclaration=function(){var e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.isRelational("<")||this.match(j.jsxTagStart)?this.next():this.unexpected();do{t.params.push(this.flowParseTypeParameter()),this.isRelational(">")||this.expect(j.comma)}while(!this.isRelational(">"));return this.expectRelational(">"),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")},ue.flowParseTypeParameterInstantiation=function(){var e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expectRelational("<");!this.isRelational(">");)e.params.push(this.flowParseType()),this.isRelational(">")||this.expect(j.comma);return this.expectRelational(">"),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")},ue.flowParseObjectPropertyKey=function(){return this.match(j.num)||this.match(j.string)?this.parseExprAtom():this.parseIdentifier(!0)},ue.flowParseObjectTypeIndexer=function(e,t,r){return e.static=t,this.expect(j.bracketL),this.lookahead().type===j.colon?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(j.bracketR),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeIndexer")},ue.flowParseObjectTypeMethodish=function(e){for(e.params=[],e.rest=null,e.typeParameters=null,this.isRelational("<")&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(j.parenL);!this.match(j.parenR)&&!this.match(j.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(j.parenR)||this.expect(j.comma);return this.eat(j.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),this.expect(j.parenR),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")},ue.flowParseObjectTypeMethod=function(e,t,r,n){var i=this.startNodeAt(e,t);return i.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e,t)),i.static=r,i.key=n,i.optional=!1,this.flowObjectTypeSemicolon(),this.finishNode(i,"ObjectTypeProperty")},ue.flowParseObjectTypeCallProperty=function(e,t){var r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.flowObjectTypeSemicolon(),this.finishNode(e,"ObjectTypeCallProperty")},ue.flowParseObjectType=function(e,t,r){var n=this.state.inType;this.state.inType=!0;var i=this.startNode(),s=void 0,a=void 0,o=!1;i.callProperties=[],i.properties=[],i.indexers=[];var u=void 0,l=void 0;for(t&&this.match(j.braceBarL)?(this.expect(j.braceBarL),u=j.braceBarR,l=!0):(this.expect(j.braceL),u=j.braceR,l=!1),i.exact=l;!this.match(u);){var c=!1,p=this.state.start,h=this.state.startLoc;s=this.startNode(),e&&this.isContextual("static")&&this.lookahead().type!==j.colon&&(this.next(),o=!0);var f=this.state.start,d=this.flowParseVariance();this.match(j.bracketL)?i.indexers.push(this.flowParseObjectTypeIndexer(s,o,d)):this.match(j.parenL)||this.isRelational("<")?(d&&this.unexpected(f),i.callProperties.push(this.flowParseObjectTypeCallProperty(s,o))):this.match(j.ellipsis)?(r||this.unexpected(null,"Spread operator cannot appear in class or interface definitions"),d&&this.unexpected(d.start,"Spread properties cannot have variance"),this.expect(j.ellipsis),s.argument=this.flowParseType(),this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeSpreadProperty"))):(a=this.flowParseObjectPropertyKey(),this.isRelational("<")||this.match(j.parenL)?(d&&this.unexpected(d.start),i.properties.push(this.flowParseObjectTypeMethod(p,h,o,a))):(this.eat(j.question)&&(c=!0),s.key=a,s.value=this.flowParseTypeInitialiser(),s.optional=c,s.static=o,s.variance=d,this.flowObjectTypeSemicolon(),i.properties.push(this.finishNode(s,"ObjectTypeProperty")))),o=!1}this.expect(u);var m=this.finishNode(i,"ObjectTypeAnnotation");return this.state.inType=n,m},ue.flowObjectTypeSemicolon=function(){this.eat(j.semi)||this.eat(j.comma)||this.match(j.braceR)||this.match(j.braceBarR)||this.unexpected()},ue.flowParseQualifiedTypeIdentifier=function(e,t,r){e=e||this.state.start,t=t||this.state.startLoc;for(var n=r||this.parseIdentifier();this.eat(j.dot);){var i=this.startNodeAt(e,t);i.qualification=n,i.id=this.parseIdentifier(),n=this.finishNode(i,"QualifiedTypeIdentifier")}return n},ue.flowParseGenericType=function(e,t,r){var n=this.startNodeAt(e,t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(e,t,r),this.isRelational("<")&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")},ue.flowParseTypeofType=function(){var e=this.startNode();return this.expect(j._typeof),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")},ue.flowParseTupleType=function(){var e=this.startNode();for(e.types=[],this.expect(j.bracketL);this.state.pos0&&void 0!==arguments[0]?arguments[0]:[],rest:null};!this.match(j.parenR)&&!this.match(j.ellipsis);)e.params.push(this.flowParseFunctionTypeParam()),this.match(j.parenR)||this.expect(j.comma);return this.eat(j.ellipsis)&&(e.rest=this.flowParseFunctionTypeParam()),e},ue.flowIdentToTypeAnnotation=function(e,t,r,n){switch(n.name){case"any":return this.finishNode(r,"AnyTypeAnnotation");case"void":return this.finishNode(r,"VoidTypeAnnotation");case"bool":case"boolean":return this.finishNode(r,"BooleanTypeAnnotation");case"mixed":return this.finishNode(r,"MixedTypeAnnotation");case"empty":return this.finishNode(r,"EmptyTypeAnnotation");case"number":return this.finishNode(r,"NumberTypeAnnotation");case"string":return this.finishNode(r,"StringTypeAnnotation");default:return this.flowParseGenericType(e,t,n)}},ue.flowParsePrimaryType=function(){var e=this.state.start,t=this.state.startLoc,r=this.startNode(),n=void 0,i=void 0,s=!1,a=this.state.noAnonFunctionType;switch(this.state.type){case j.name:return this.flowIdentToTypeAnnotation(e,t,r,this.parseIdentifier());case j.braceL:return this.flowParseObjectType(!1,!1,!0);case j.braceBarL:return this.flowParseObjectType(!1,!0,!0);case j.bracketL:return this.flowParseTupleType();case j.relational:if("<"===this.state.value)return r.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(j.parenL),n=this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(j.parenR),this.expect(j.arrow),r.returnType=this.flowParseType(),this.finishNode(r,"FunctionTypeAnnotation");break;case j.parenL:if(this.next(),!this.match(j.parenR)&&!this.match(j.ellipsis))if(this.match(j.name)){var o=this.lookahead().type;s=o!==j.question&&o!==j.colon}else s=!0;if(s){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(j.comma)||this.match(j.parenR)&&this.lookahead().type===j.arrow))return this.expect(j.parenR),i;this.eat(j.comma)}return n=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),r.params=n.params,r.rest=n.rest,this.expect(j.parenR),this.expect(j.arrow),r.returnType=this.flowParseType(),r.typeParameters=null,this.finishNode(r,"FunctionTypeAnnotation");case j.string:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case j._true:case j._false:return r.value=this.match(j._true),this.next(),this.finishNode(r,"BooleanLiteralTypeAnnotation");case j.plusMin:if("-"===this.state.value)return this.next(),this.match(j.num)||this.unexpected(null,"Unexpected token, expected number"),this.parseLiteral(-this.state.value,"NumericLiteralTypeAnnotation",r.start,r.loc.start);this.unexpected();case j.num:return this.parseLiteral(this.state.value,"NumericLiteralTypeAnnotation");case j._null:return r.value=this.match(j._null),this.next(),this.finishNode(r,"NullLiteralTypeAnnotation");case j._this:return r.value=this.match(j._this),this.next(),this.finishNode(r,"ThisTypeAnnotation");case j.star:return this.next(),this.finishNode(r,"ExistentialTypeParam");default:if("typeof"===this.state.type.keyword)return this.flowParseTypeofType()}this.unexpected()},ue.flowParsePostfixType=function(){for(var e=this.state.start,t=this.state.startLoc,r=this.flowParsePrimaryType();!this.canInsertSemicolon()&&this.match(j.bracketL);){var n=this.startNodeAt(e,t);n.elementType=r,this.expect(j.bracketL),this.expect(j.bracketR),r=this.finishNode(n,"ArrayTypeAnnotation")}return r},ue.flowParsePrefixType=function(){var e=this.startNode();return this.eat(j.question)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()},ue.flowParseAnonFunctionWithoutParens=function(){var e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(j.arrow)){var t=this.startNodeAt(e.start,e.loc);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e},ue.flowParseIntersectionType=function(){var e=this.startNode();this.eat(j.bitwiseAND);var t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(j.bitwiseAND);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")},ue.flowParseUnionType=function(){var e=this.startNode();this.eat(j.bitwiseOR);var t=this.flowParseIntersectionType();for(e.types=[t];this.eat(j.bitwiseOR);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")},ue.flowParseType=function(){var e=this.state.inType;this.state.inType=!0;var t=this.flowParseUnionType();return this.state.inType=e,t},ue.flowParseTypeAnnotation=function(){var e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")},ue.flowParseTypeAndPredicateAnnotation=function(){var e=this.startNode(),t=this.flowParseTypeAndPredicateInitialiser();return e.typeAnnotation=t[0],e.predicate=t[1],this.finishNode(e,"TypeAnnotation")},ue.flowParseTypeAnnotatableIdentifier=function(){var e=this.flowParseRestrictedIdentifier();return this.match(j.colon)&&(e.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(e,e.type)),e},ue.typeCastToParameter=function(e){return e.expression.typeAnnotation=e.typeAnnotation,this.finishNodeAt(e.expression,e.expression.type,e.typeAnnotation.end,e.typeAnnotation.loc.end)},ue.flowParseVariance=function(){var e=null;return this.match(j.plusMin)&&("+"===this.state.value?e="plus":"-"===this.state.value&&(e="minus"),this.next()),e};var le=function(e){e.extend("parseFunctionBody",function(e){return function(t,r){return this.match(j.colon)&&!r&&(t.returnType=this.flowParseTypeAndPredicateAnnotation()),e.call(this,t,r)}}),e.extend("parseStatement",function(e){return function(t,r){if(this.state.strict&&this.match(j.name)&&"interface"===this.state.value){var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t,r)}}),e.extend("parseExpressionStatement",function(e){return function(t,r){if("Identifier"===r.type)if("declare"===r.name){if(this.match(j._class)||this.match(j.name)||this.match(j._function)||this.match(j._var))return this.flowParseDeclare(t)}else if(this.match(j.name)){if("interface"===r.name)return this.flowParseInterface(t);if("type"===r.name)return this.flowParseTypeAlias(t)}return e.call(this,t,r)}}),e.extend("shouldParseExportDeclaration",function(e){return function(){return this.isContextual("type")||this.isContextual("interface")||e.call(this)}}),e.extend("isExportDefaultSpecifier",function(e){return function(){return(!this.match(j.name)||"type"!==this.state.value&&"interface"!==this.state.value)&&e.call(this)}}),e.extend("parseConditional",function(e){return function(t,r,n,i,s){if(s&&this.match(j.question)){var a=this.state.clone();try{return e.call(this,t,r,n,i)}catch(e){if(e instanceof SyntaxError)return this.state=a,s.start=e.pos||this.state.start,t;throw e}}return e.call(this,t,r,n,i)}}),e.extend("parseParenItem",function(e){return function(t,r,n){if(t=e.call(this,t,r,n),this.eat(j.question)&&(t.optional=!0),this.match(j.colon)){var i=this.startNodeAt(r,n);return i.expression=t,i.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(i,"TypeCastExpression")}return t}}),e.extend("parseExport",function(e){return function(t){return"ExportNamedDeclaration"===(t=e.call(this,t)).type&&(t.exportKind=t.exportKind||"value"),t}}),e.extend("parseExportDeclaration",function(e){return function(t){if(this.isContextual("type")){t.exportKind="type";var r=this.startNode();return this.next(),this.match(j.braceL)?(t.specifiers=this.parseExportSpecifiers(),this.parseExportFrom(t),null):this.flowParseTypeAlias(r)}if(this.isContextual("interface")){t.exportKind="type";var n=this.startNode();return this.next(),this.flowParseInterface(n)}return e.call(this,t)}}),e.extend("parseClassId",function(e){return function(t){e.apply(this,arguments),this.isRelational("<")&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}}),e.extend("isKeyword",function(e){return function(t){return(!this.state.inType||"void"!==t)&&e.call(this,t)}}),e.extend("readToken",function(e){return function(t){return!this.state.inType||62!==t&&60!==t?e.call(this,t):this.finishOp(j.relational,1)}}),e.extend("jsx_readToken",function(e){return function(){if(!this.state.inType)return e.call(this)}}),e.extend("toAssignable",function(e){return function(t,r,n){return"TypeCastExpression"===t.type?e.call(this,this.typeCastToParameter(t),r,n):e.call(this,t,r,n)}}),e.extend("toAssignableList",function(e){return function(t,r,n){for(var i=0;i2?n-2:0),s=2;s1114111||he(a)!=a)throw RangeError("Invalid code point: "+a);a<=65535?e.push(a):(t=55296+((a-=65536)>>10),r=a%1024+56320,e.push(t,r)),(n+1==i||e.length>16384)&&(s+=pe.apply(null,e),e.length=0)}return s}}var fe=ce,de={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},me=/^[\da-fA-F]+$/,ye=/^\d+$/;V.j_oTag=new R("...
                ",!0,!0),j.jsxName=new P("jsxName"),j.jsxText=new P("jsxText",{beforeExpr:!0}),j.jsxTagStart=new P("jsxTagStart",{startsExpr:!0}),j.jsxTagEnd=new P("jsxTagEnd"),j.jsxTagStart.updateContext=function(){this.state.context.push(V.j_expr),this.state.context.push(V.j_oTag),this.state.exprAllowed=!1},j.jsxTagEnd.updateContext=function(e){var t=this.state.context.pop();t===V.j_oTag&&e===j.slash||t===V.j_cTag?(this.state.context.pop(),this.state.exprAllowed=this.curContext()===V.j_expr):this.state.exprAllowed=!0};var ge=K.prototype;ge.jsxReadToken=function(){for(var e="",t=this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated JSX contents");var r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?60===r&&this.state.exprAllowed?(++this.state.pos,this.finishToken(j.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.state.pos),this.finishToken(j.jsxText,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:u(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}},ge.jsxReadNewLine=function(e){var t=this.input.charCodeAt(this.state.pos),r=void 0;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,r=e?"\n":"\r\n"):r=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,r},ge.jsxReadString=function(e){for(var t="",r=++this.state.pos;;){this.state.pos>=this.input.length&&this.raise(this.state.start,"Unterminated string constant");var n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):u(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}return t+=this.input.slice(r,this.state.pos++),this.finishToken(j.string,t)},ge.jsxReadEntity=function(){for(var e="",t=0,r=void 0,n=this.input[this.state.pos],i=++this.state.pos;this.state.pos")}return r.openingElement=i,r.closingElement=s,r.children=n,this.match(j.relational)&&"<"===this.state.value&&this.raise(this.state.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSXElement")},ge.jsxParseElement=function(){var e=this.state.start,t=this.state.startLoc;return this.next(),this.jsxParseElementAt(e,t)};var be=function(e){e.extend("parseExprAtom",function(e){return function(t){if(this.match(j.jsxText)){var r=this.parseLiteral(this.state.value,"JSXText");return r.extra=null,r}return this.match(j.jsxTagStart)?this.jsxParseElement():e.call(this,t)}}),e.extend("readToken",function(e){return function(t){if(this.state.inPropertyName)return e.call(this,t);var r=this.curContext();if(r===V.j_expr)return this.jsxReadToken();if(r===V.j_oTag||r===V.j_cTag){if(s(t))return this.jsxReadWord();if(62===t)return++this.state.pos,this.finishToken(j.jsxTagEnd);if((34===t||39===t)&&r===V.j_oTag)return this.jsxReadString(t)}return 60===t&&this.state.exprAllowed?(++this.state.pos,this.finishToken(j.jsxTagStart)):e.call(this,t)}}),e.extend("updateContext",function(e){return function(t){if(this.match(j.braceL)){var r=this.curContext();r===V.j_oTag?this.state.context.push(V.braceExpression):r===V.j_expr?this.state.context.push(V.templateQuasi):e.call(this,t),this.state.exprAllowed=!0}else{if(!this.match(j.slash)||t!==j.jsxTagStart)return e.call(this,t);this.state.context.length-=2,this.state.context.push(V.j_cTag),this.state.exprAllowed=!1}}})};J.estree=ae,J.flow=le,J.jsx=be,r.parse=m,r.parseExpression=y,r.tokTypes=j},{}],178:[function(e,t,r){function n(e,t,r){e instanceof RegExp&&(e=i(e,r)),t instanceof RegExp&&(t=i(t,r));var n=s(e,t,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+e.length,n[1]),post:r.slice(n[1]+t.length)}}function i(e,t){var r=t.match(e);return r?r[0]:null}function s(e,t,r){var n,i,s,a,o,u=r.indexOf(e),l=r.indexOf(t,u+1),c=u;if(u>=0&&l>0){for(n=[],s=r.length;c>=0&&!o;)c==u?(n.push(c),u=r.indexOf(e,c+1)):1==n.length?o=[n.pop(),l]:((i=n.pop())=0?u:l;n.length&&(o=[s,a])}return o}t.exports=n,n.range=s},{}],179:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function s(e){var t,r,i,s,a,o,u=e.length;a=n(e),o=new p(3*u/4-a),i=a>0?u-4:u;var l=0;for(t=0,r=0;t>16&255,o[l++]=s>>8&255,o[l++]=255&s;return 2===a?(s=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,o[l++]=255&s):1===a&&(s=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,o[l++]=s>>8&255,o[l++]=255&s),o}function a(e){return l[e>>18&63]+l[e>>12&63]+l[e>>6&63]+l[63&e]}function o(e,t,r){for(var n,i=[],s=t;su?u:a+16383));return 1===n?(t=e[r-1],i+=l[t>>2],i+=l[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=l[t>>10],i+=l[t>>4&63],i+=l[t<<2&63],i+="="),s.push(i),s.join("")}r.byteLength=i,r.toByteArray=s,r.fromByteArray=u;for(var l=[],c=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,d=h.length;f=t}function h(e,t){var r=[],i=d("{","}",e);if(!i||/\$$/.test(i.pre))return[e];var s=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),o=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),m=s||o,y=i.body.indexOf(",")>=0;if(!m&&!y)return i.post.match(/,.*\}/)?(e=i.pre+"{"+i.body+g+i.post,h(e)):[e];var b;if(m)b=i.body.split(/\.\./);else if(1===(b=a(i.body)).length&&1===(b=h(b[0],!1).map(u)).length)return(E=i.post.length?h(i.post,!1):[""]).map(function(e){return i.pre+b[0]+e});var v,x=i.pre,E=i.post.length?h(i.post,!1):[""];if(m){var A=n(b[0]),D=n(b[1]),C=Math.max(b[0].length,b[1].length),S=3==b.length?Math.abs(n(b[2])):1,_=c;D0){var P=new Array(T+1).join("0");F=k<0?"-"+P+F.slice(1):P+F}}v.push(F)}}else v=f(b,function(e){return h(e,!1)});for(var B=0;BY)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=i.prototype,t}function i(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return u(e)}return s(e,t,r)}function s(e,t,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?p(e,t,r):"string"==typeof e?l(e,t):h(e)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function o(e,t,r){return a(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)}function u(e){return a(e),n(e<0?0:0|f(e))}function l(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!i.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var r=0|m(e,t),s=n(r),a=s.write(e,t);return a!==r&&(s=s.slice(0,a)),s}function c(e){for(var t=e.length<0?0:0|f(e.length),r=n(t),i=0;i=Y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Y.toString(16)+" bytes");return 0|e}function d(e){return+e!=e&&(e=0),i.alloc(+e)}function m(e,t){if(i.isBuffer(e))return e.length;if(J(e)||e instanceof ArrayBuffer)return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(n)return V(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return F(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return _(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function b(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,W(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=i.from(t,n)),i.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,s);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}var l;if(i){var c=-1;for(l=r;lo&&(r=o-u),l=r;l>=0;l--){for(var p=!0,h=0;hi&&(n=i):n=i;var s=t.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a239?4:s>223?3:s>191?2:1;if(i+o<=r){var u,l,c,p;switch(o){case 1:s<128&&(a=s);break;case 2:128==(192&(u=e[i+1]))&&(p=(31&s)<<6|63&u)>127&&(a=p);break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(p=(15&s)<<12|(63&u)<<6|63&l)>2047&&(p<55296||p>57343)&&(a=p);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(p=(15&s)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&p<1114112&&(a=p)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return k(n)}function k(e){var t=e.length;if(t<=H)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,s,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),z.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),z.write(e,t,r,n,52,8),r+8}function M(e){if((e=e.trim().replace($,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function R(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function U(e){for(var t=[],r=0;r>8,i=r%256,s.push(i),s.push(n);return s}function G(e){return K.toByteArray(M(e))}function X(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(e)}function W(e){return e!==e}var K=e("base64-js"),z=e("ieee754");r.Buffer=i,r.SlowBuffer=d,r.INSPECT_MAX_BYTES=50;var Y=2147483647;r.kMaxLength=Y,i.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),i.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(e,t,r){return s(e,t,r)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(e,t,r){return o(e,t,r)},i.allocUnsafe=function(e){return u(e)},i.allocUnsafeSlow=function(e){return u(e)},i.isBuffer=function(e){return null!=e&&!0===e._isBuffer},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,s=0,a=Math.min(r,n);s0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},i.prototype.compare=function(e,t,r,n,s){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,s>>>=0,this===e)return 0;for(var a=s-n,o=r-t,u=Math.min(a,o),l=this.slice(n,s),c=e.slice(t,r),p=0;p>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return A(this,e,t,r);case"latin1":case"binary":return D(this,e,t,r);case"base64":return C(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var H=4096;i.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},i.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=this[e],i=1,s=0;++s=i&&(n-=Math.pow(2,8*t)),n},i.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},i.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},i.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),z.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),z.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),z.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),z.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[t]=255&e;++s>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},i.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},i.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var s=0,a=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+r},i.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,e,t,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[t+s]=255&e;--s>=0&&(a*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/a>>0)-o&255;return t+r},i.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},i.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},i.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},i.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},i.prototype.writeFloatLE=function(e,t,r){return I(this,e,t,!0,r)},i.prototype.writeFloatBE=function(e,t,r){return I(this,e,t,!1,r)},i.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},i.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},i.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(s<1e3)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a1)for(var n=1;n0;i--)if(~(t=n[i]).indexOf("sourceMappingURL=data:"))return r.fromComment(t)}var u=e("fs"),l=e("path"),c=/^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/gm,p=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm;a.prototype.toJSON=function(e){return JSON.stringify(this.sourcemap,null,e)},a.prototype.toBase64=function(){var e=this.toJSON();return new t(e).toString("base64")},a.prototype.toComment=function(e){var t="sourceMappingURL=data:application/json;base64,"+this.toBase64();return e&&e.multiline?"/*# "+t+" */":"//# "+t},a.prototype.toObject=function(){return JSON.parse(this.toJSON())},a.prototype.addProperty=function(e,t){if(this.sourcemap.hasOwnProperty(e))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(e,t)},a.prototype.setProperty=function(e,t){return this.sourcemap[e]=t,this},a.prototype.getProperty=function(e){return this.sourcemap[e]},r.fromObject=function(e){return new a(e)},r.fromJSON=function(e){return new a(e,{isJSON:!0})},r.fromBase64=function(e){return new a(e,{isEncoded:!0})},r.fromComment=function(e){return e=e.replace(/^\/\*/g,"//").replace(/\*\/$/g,""),new a(e,{isEncoded:!0,hasComment:!0})},r.fromMapFileComment=function(e,t){return new a(e,{commentFileDir:t,isFileComment:!0,isJSON:!0})},r.fromSource=function(e,t){if(t){var n=o(e);return n||null}var i=e.match(c);return c.lastIndex=0,i?r.fromComment(i.pop()):null},r.fromMapFileSource=function(e,t){var n=e.match(p);return p.lastIndex=0,n?r.fromMapFileComment(n.pop(),t):null},r.removeComments=function(e){return c.lastIndex=0,e.replace(c,"")},r.removeMapFileComments=function(e){return p.lastIndex=0,e.replace(p,"")},Object.defineProperty(r,"commentRegex",{get:function(){return c.lastIndex=0,c}}),Object.defineProperty(r,"mapFileCommentRegex",{get:function(){return p.lastIndex=0,p}})}).call(this,e("buffer").Buffer)},{buffer:183,fs:182,path:534}],187:[function(e,t,r){e("../modules/web.dom.iterable"),e("../modules/es6.string.iterator"),t.exports=e("../modules/core.get-iterator")},{"../modules/core.get-iterator":276,"../modules/es6.string.iterator":285,"../modules/web.dom.iterable":292}],188:[function(e,t,r){var n=e("../../modules/_core"),i=n.JSON||(n.JSON={stringify:JSON.stringify});t.exports=function(e){return i.stringify.apply(i,arguments)}},{"../../modules/_core":216}],189:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.map"),e("../modules/es7.map.to-json"),t.exports=e("../modules/_core").Map},{"../modules/_core":216,"../modules/es6.map":278,"../modules/es6.object.to-string":284,"../modules/es6.string.iterator":285,"../modules/es7.map.to-json":289,"../modules/web.dom.iterable":292}],190:[function(e,t,r){e("../../modules/es6.number.max-safe-integer"),t.exports=9007199254740991},{"../../modules/es6.number.max-safe-integer":279}],191:[function(e,t,r){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":216,"../../modules/es6.object.assign":280}],192:[function(e,t,r){e("../../modules/es6.object.create");var n=e("../../modules/_core").Object;t.exports=function(e,t){return n.create(e,t)}},{"../../modules/_core":216,"../../modules/es6.object.create":281}],193:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Object.getOwnPropertySymbols},{"../../modules/_core":216,"../../modules/es6.symbol":286}],194:[function(e,t,r){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":216,"../../modules/es6.object.keys":282}],195:[function(e,t,r){e("../../modules/es6.object.set-prototype-of"),t.exports=e("../../modules/_core").Object.setPrototypeOf},{"../../modules/_core":216,"../../modules/es6.object.set-prototype-of":283}],196:[function(e,t,r){e("../../modules/es6.symbol"),t.exports=e("../../modules/_core").Symbol.for},{"../../modules/_core":216,"../../modules/es6.symbol":286}],197:[function(e,t,r){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../modules/_core").Symbol},{"../../modules/_core":216,"../../modules/es6.object.to-string":284,"../../modules/es6.symbol":286,"../../modules/es7.symbol.async-iterator":290,"../../modules/es7.symbol.observable":291}],198:[function(e,t,r){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":273,"../../modules/es6.string.iterator":285,"../../modules/web.dom.iterable":292}],199:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-map"),t.exports=e("../modules/_core").WeakMap},{"../modules/_core":216,"../modules/es6.object.to-string":284,"../modules/es6.weak-map":287,"../modules/web.dom.iterable":292}],200:[function(e,t,r){e("../modules/es6.object.to-string"),e("../modules/web.dom.iterable"),e("../modules/es6.weak-set"),t.exports=e("../modules/_core").WeakSet},{"../modules/_core":216,"../modules/es6.object.to-string":284,"../modules/es6.weak-set":288,"../modules/web.dom.iterable":292}],201:[function(e,t,r){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],202:[function(e,t,r){t.exports=function(){}},{}],203:[function(e,t,r){t.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},{}],204:[function(e,t,r){var n=e("./_is-object");t.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":234}],205:[function(e,t,r){var n=e("./_for-of");t.exports=function(e,t){var r=[];return n(e,!1,r.push,r,t),r}},{"./_for-of":225}],206:[function(e,t,r){var n=e("./_to-iobject"),i=e("./_to-length"),s=e("./_to-index");t.exports=function(e){return function(t,r,a){var o,u=n(t),l=i(u.length),c=s(a,l);if(e&&r!=r){for(;l>c;)if((o=u[c++])!=o)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===r)return e||c||0;return!e&&-1}}},{"./_to-index":265,"./_to-iobject":267,"./_to-length":268}],207:[function(e,t,r){var n=e("./_ctx"),i=e("./_iobject"),s=e("./_to-object"),a=e("./_to-length"),o=e("./_array-species-create");t.exports=function(e,t){var r=1==e,u=2==e,l=3==e,c=4==e,p=6==e,h=5==e||p,f=t||o;return function(t,o,d){for(var m,y,g=s(t),b=i(g),v=n(o,d,3),x=a(b.length),E=0,A=r?f(t,x):u?f(t,0):void 0;x>E;E++)if((h||E in b)&&(m=b[E],y=v(m,E,g),e))if(r)A[E]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return E;case 2:A.push(m)}else if(c)return!1;return p?-1:l||c?c:A}}},{"./_array-species-create":209,"./_ctx":217,"./_iobject":231,"./_to-length":268,"./_to-object":269}],208:[function(e,t,r){var n=e("./_is-object"),i=e("./_is-array"),s=e("./_wks")("species");t.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[s])&&(t=void 0)),void 0===t?Array:t}},{"./_is-array":233,"./_is-object":234,"./_wks":274}],209:[function(e,t,r){var n=e("./_array-species-constructor");t.exports=function(e,t){return new(n(e))(t)}},{"./_array-species-constructor":208}],210:[function(e,t,r){var n=e("./_cof"),i=e("./_wks")("toStringTag"),s="Arguments"==n(function(){return arguments}()),a=function(e,t){try{return e[t]}catch(e){}};t.exports=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=a(t=Object(e),i))?r:s?n(t):"Object"==(o=n(t))&&"function"==typeof t.callee?"Arguments":o}},{"./_cof":211,"./_wks":274}],211:[function(e,t,r){var n={}.toString;t.exports=function(e){return n.call(e).slice(8,-1)}},{}],212:[function(e,t,r){"use strict";var n=e("./_object-dp").f,i=e("./_object-create"),s=e("./_redefine-all"),a=e("./_ctx"),o=e("./_an-instance"),u=e("./_defined"),l=e("./_for-of"),c=e("./_iter-define"),p=e("./_iter-step"),h=e("./_set-species"),f=e("./_descriptors"),d=e("./_meta").fastKey,m=f?"_s":"size",y=function(e,t){var r,n=d(t);if("F"!==n)return e._i[n];for(r=e._f;r;r=r.n)if(r.k==t)return r};t.exports={getConstructor:function(e,t,r,c){var p=e(function(e,n){o(e,p,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=n&&l(n,r,e[c],e)});return s(p.prototype,{clear:function(){for(var e=this,t=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete t[r.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=this,r=y(t,e);if(r){var n=r.n,i=r.p;delete t._i[r.i],r.r=!0,i&&(i.n=n),n&&(n.p=i),t._f==r&&(t._f=n),t._l==r&&(t._l=i),t[m]--}return!!r},forEach:function(e){o(this,p,"forEach");for(var t,r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(r(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!y(this,e)}}),f&&n(p.prototype,"size",{get:function(){return u(this[m])}}),p},def:function(e,t,r){var n,i,s=y(e,t);return s?s.v=r:(e._l=s={i:i=d(t,!0),k:t,v:r,p:n=e._l,n:void 0,r:!1},e._f||(e._f=s),n&&(n.n=s),e[m]++,"F"!==i&&(e._i[i]=s)),e},getEntry:y,setStrong:function(e,t,r){c(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,r=e._l;r&&r.r;)r=r.p;return e._t&&(e._l=r=r?r.n:e._t._f)?"keys"==t?p(0,r.k):"values"==t?p(0,r.v):p(0,[r.k,r.v]):(e._t=void 0,p(1))},r?"entries":"values",!r,!0),h(t)}}},{"./_an-instance":203,"./_ctx":217,"./_defined":218,"./_descriptors":219,"./_for-of":225,"./_iter-define":237,"./_iter-step":238,"./_meta":242,"./_object-create":244,"./_object-dp":245,"./_redefine-all":257,"./_set-species":260}],213:[function(e,t,r){var n=e("./_classof"),i=e("./_array-from-iterable");t.exports=function(e){return function(){if(n(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},{"./_array-from-iterable":205,"./_classof":210}],214:[function(e,t,r){"use strict";var n=e("./_redefine-all"),i=e("./_meta").getWeak,s=e("./_an-object"),a=e("./_is-object"),o=e("./_an-instance"),u=e("./_for-of"),l=e("./_array-methods"),c=e("./_has"),p=l(5),h=l(6),f=0,d=function(e){return e._l||(e._l=new m)},m=function(){this.a=[]},y=function(e,t){return p(e.a,function(e){return e[0]===t})};m.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var r=y(this,e);r?r[1]=t:this.a.push([e,t])},delete:function(e){var t=h(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},t.exports={getConstructor:function(e,t,r,s){var l=e(function(e,n){o(e,l,t,"_i"),e._i=f++,e._l=void 0,void 0!=n&&u(n,r,e[s],e)});return n(l.prototype,{delete:function(e){if(!a(e))return!1;var t=i(e);return!0===t?d(this).delete(e):t&&c(t,this._i)&&delete t[this._i]},has:function(e){if(!a(e))return!1;var t=i(e);return!0===t?d(this).has(e):t&&c(t,this._i)}}),l},def:function(e,t,r){var n=i(s(t),!0);return!0===n?d(e).set(t,r):n[e._i]=r,e},ufstore:d}},{"./_an-instance":203,"./_an-object":204,"./_array-methods":207,"./_for-of":225,"./_has":227,"./_is-object":234,"./_meta":242,"./_redefine-all":257}],215:[function(e,t,r){"use strict";var n=e("./_global"),i=e("./_export"),s=e("./_meta"),a=e("./_fails"),o=e("./_hide"),u=e("./_redefine-all"),l=e("./_for-of"),c=e("./_an-instance"),p=e("./_is-object"),h=e("./_set-to-string-tag"),f=e("./_object-dp").f,d=e("./_array-methods")(0),m=e("./_descriptors");t.exports=function(e,t,r,y,g,b){var v=n[e],x=v,E=g?"set":"add",A=x&&x.prototype,D={};return m&&"function"==typeof x&&(b||A.forEach&&!a(function(){(new x).entries().next()}))?(x=t(function(t,r){c(t,x,e,"_c"),t._c=new v,void 0!=r&&l(r,g,t[E],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in A&&(!b||"clear"!=e)&&o(x.prototype,e,function(r,n){if(c(this,x,e),!t&&b&&!p(r))return"get"==e&&void 0;var i=this._c[e](0===r?0:r,n);return t?this:i})}),"size"in A&&f(x.prototype,"size",{get:function(){return this._c.size}})):(x=y.getConstructor(t,e,g,E),u(x.prototype,r),s.NEED=!0),h(x,e),D[e]=x,i(i.G+i.W+i.F,D),b||y.setStrong(x,e,g),x}},{"./_an-instance":203,"./_array-methods":207,"./_descriptors":219,"./_export":223,"./_fails":224,"./_for-of":225,"./_global":226,"./_hide":228,"./_is-object":234,"./_meta":242,"./_object-dp":245,"./_redefine-all":257,"./_set-to-string-tag":261}],216:[function(e,t,r){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},{}],217:[function(e,t,r){var n=e("./_a-function");t.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":201}],218:[function(e,t,r){t.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},{}],219:[function(e,t,r){t.exports=!e("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":224}],220:[function(e,t,r){var n=e("./_is-object"),i=e("./_global").document,s=n(i)&&n(i.createElement);t.exports=function(e){return s?i.createElement(e):{}}},{"./_global":226,"./_is-object":234}],221:[function(e,t,r){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],222:[function(e,t,r){var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie");t.exports=function(e){var t=n(e),r=i.f;if(r)for(var a,o=r(e),u=s.f,l=0;o.length>l;)u.call(e,a=o[l++])&&t.push(a);return t}},{"./_object-gops":250,"./_object-keys":253,"./_object-pie":254}],223:[function(e,t,r){var n=e("./_global"),i=e("./_core"),s=e("./_ctx"),a=e("./_hide"),o=function(e,t,r){var u,l,c,p=e&o.F,h=e&o.G,f=e&o.S,d=e&o.P,m=e&o.B,y=e&o.W,g=h?i:i[t]||(i[t]={}),b=g.prototype,v=h?n:f?n[t]:(n[t]||{}).prototype;h&&(r=t);for(u in r)(l=!p&&v&&void 0!==v[u])&&u in g||(c=l?v[u]:r[u],g[u]=h&&"function"!=typeof v[u]?r[u]:m&&l?s(c,n):y&&v[u]==c?function(e){var t=function(t,r,n){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,n)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(c):d&&"function"==typeof c?s(Function.call,c):c,d&&((g.virtual||(g.virtual={}))[u]=c,e&o.R&&b&&!b[u]&&a(b,u,c)))};o.F=1,o.G=2,o.S=4,o.P=8,o.B=16,o.W=32,o.U=64,o.R=128,t.exports=o},{"./_core":216,"./_ctx":217,"./_global":226,"./_hide":228}],224:[function(e,t,r){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],225:[function(e,t,r){var n=e("./_ctx"),i=e("./_iter-call"),s=e("./_is-array-iter"),a=e("./_an-object"),o=e("./_to-length"),u=e("./core.get-iterator-method"),l={},c={};(r=t.exports=function(e,t,r,p,h){var f,d,m,y,g=h?function(){return e}:u(e),b=n(r,p,t?2:1),v=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(s(g)){for(f=o(e.length);f>v;v++)if((y=t?b(a(d=e[v])[0],d[1]):b(e[v]))===l||y===c)return y}else for(m=g.call(e);!(d=m.next()).done;)if((y=i(m,b,d.value,t))===l||y===c)return y}).BREAK=l,r.RETURN=c},{"./_an-object":204,"./_ctx":217,"./_is-array-iter":232,"./_iter-call":235,"./_to-length":268,"./core.get-iterator-method":275}],226:[function(e,t,r){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},{}],227:[function(e,t,r){var n={}.hasOwnProperty;t.exports=function(e,t){return n.call(e,t)}},{}],228:[function(e,t,r){var n=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},{"./_descriptors":219,"./_object-dp":245,"./_property-desc":256}],229:[function(e,t,r){t.exports=e("./_global").document&&document.documentElement},{"./_global":226}],230:[function(e,t,r){t.exports=!e("./_descriptors")&&!e("./_fails")(function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":219,"./_dom-create":220,"./_fails":224}],231:[function(e,t,r){var n=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},{"./_cof":211}],232:[function(e,t,r){var n=e("./_iterators"),i=e("./_wks")("iterator"),s=Array.prototype;t.exports=function(e){return void 0!==e&&(n.Array===e||s[i]===e)}},{"./_iterators":239,"./_wks":274}],233:[function(e,t,r){var n=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==n(e)}},{"./_cof":211}],234:[function(e,t,r){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],235:[function(e,t,r){var n=e("./_an-object");t.exports=function(e,t,r,i){try{return i?t(n(r)[0],r[1]):t(r)}catch(t){var s=e.return;throw void 0!==s&&n(s.call(e)),t}}},{"./_an-object":204}],236:[function(e,t,r){"use strict";var n=e("./_object-create"),i=e("./_property-desc"),s=e("./_set-to-string-tag"),a={};e("./_hide")(a,e("./_wks")("iterator"),function(){return this}),t.exports=function(e,t,r){e.prototype=n(a,{next:i(1,r)}),s(e,t+" Iterator")}},{"./_hide":228,"./_object-create":244,"./_property-desc":256,"./_set-to-string-tag":261,"./_wks":274}],237:[function(e,t,r){"use strict";var n=e("./_library"),i=e("./_export"),s=e("./_redefine"),a=e("./_hide"),o=e("./_has"),u=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),p=e("./_object-gpo"),h=e("./_wks")("iterator"),f=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(e,t,r,m,y,g,b){l(r,t,m);var v,x,E,A=function(e){if(!f&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},D=t+" Iterator",C="values"==y,S=!1,_=e.prototype,w=_[h]||_["@@iterator"]||y&&_[y],k=w||A(y),F=y?C?A("entries"):k:void 0,T="Array"==t?_.entries||w:w;if(T&&(E=p(T.call(new e)))!==Object.prototype&&(c(E,D,!0),n||o(E,h)||a(E,h,d)),C&&w&&"values"!==w.name&&(S=!0,k=function(){return w.call(this)}),n&&!b||!f&&!S&&_[h]||a(_,h,k),u[t]=k,u[D]=d,y)if(v={values:C?k:A("values"),keys:g?k:A("keys"),entries:F},b)for(x in v)x in _||s(_,x,v[x]);else i(i.P+i.F*(f||S),t,v);return v}},{"./_export":223,"./_has":227,"./_hide":228,"./_iter-create":236,"./_iterators":239,"./_library":241,"./_object-gpo":251,"./_redefine":258,"./_set-to-string-tag":261,"./_wks":274}],238:[function(e,t,r){t.exports=function(e,t){return{value:t,done:!!e}}},{}],239:[function(e,t,r){t.exports={}},{}],240:[function(e,t,r){var n=e("./_object-keys"),i=e("./_to-iobject");t.exports=function(e,t){for(var r,s=i(e),a=n(s),o=a.length,u=0;o>u;)if(s[r=a[u++]]===t)return r}},{"./_object-keys":253,"./_to-iobject":267}],241:[function(e,t,r){t.exports=!0},{}],242:[function(e,t,r){var n=e("./_uid")("meta"),i=e("./_is-object"),s=e("./_has"),a=e("./_object-dp").f,o=0,u=Object.isExtensible||function(){return!0},l=!e("./_fails")(function(){return u(Object.preventExtensions({}))}),c=function(e){a(e,n,{value:{i:"O"+ ++o,w:{}}})},p=function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,n)){if(!u(e))return"F";if(!t)return"E";c(e)}return e[n].i},h=function(e,t){if(!s(e,n)){if(!u(e))return!0;if(!t)return!1;c(e)}return e[n].w},f=function(e){return l&&d.NEED&&u(e)&&!s(e,n)&&c(e),e},d=t.exports={KEY:n,NEED:!1,fastKey:p,getWeak:h,onFreeze:f}},{"./_fails":224,"./_has":227,"./_is-object":234,"./_object-dp":245,"./_uid":271}],243:[function(e,t,r){"use strict";var n=e("./_object-keys"),i=e("./_object-gops"),s=e("./_object-pie"),a=e("./_to-object"),o=e("./_iobject"),u=Object.assign;t.exports=!u||e("./_fails")(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=u({},e)[r]||Object.keys(u({},t)).join("")!=n})?function(e,t){for(var r=a(e),u=arguments.length,l=1,c=i.f,p=s.f;u>l;)for(var h,f=o(arguments[l++]),d=c?n(f).concat(c(f)):n(f),m=d.length,y=0;m>y;)p.call(f,h=d[y++])&&(r[h]=f[h]);return r}:u},{"./_fails":224,"./_iobject":231,"./_object-gops":250,"./_object-keys":253,"./_object-pie":254,"./_to-object":269}],244:[function(e,t,r){var n=e("./_an-object"),i=e("./_object-dps"),s=e("./_enum-bug-keys"),a=e("./_shared-key")("IE_PROTO"),o=function(){},u=function(){var t,r=e("./_dom-create")("iframe"),n=s.length;for(r.style.display="none",e("./_html").appendChild(r),r.src="javascript:",(t=r.contentWindow.document).open(),t.write("'); - expect(encoded).to.equal('\\x3cscript\\x3ealert\\x281\\x29\\x3c\\x2fscript\\x3e'); - done(); - }); - - it('encodes \' characters', function (done) { - - var encoded = Hoek.escapeJavaScript('something(\'param\')'); - expect(encoded).to.equal('something\\x28\\x27param\\x27\\x29'); - done(); - }); - - it('encodes large unicode characters with the correct padding', function (done) { - - var encoded = Hoek.escapeJavaScript(String.fromCharCode(500) + String.fromCharCode(1000)); - expect(encoded).to.equal('\\u0500\\u1000'); - done(); - }); - - it('doesn\'t throw an exception when passed null', function (done) { - - var encoded = Hoek.escapeJavaScript(null); - expect(encoded).to.equal(''); - done(); - }); -}); - -describe('escapeHtml()', function () { - - it('encodes / characters', function (done) { - - var encoded = Hoek.escapeHtml(''); - expect(encoded).to.equal('<script>alert(1)</script>'); - done(); - }); - - it('encodes < and > as named characters', function (done) { - - var encoded = Hoek.escapeHtml('