aboutsummaryrefslogtreecommitdiff
path: root/node_modules/@babel
diff options
context:
space:
mode:
authorJoel Kronqvist <joel.h.kronqvist@gmail.com>2022-03-05 19:02:27 +0200
committerJoel Kronqvist <joel.h.kronqvist@gmail.com>2022-03-05 19:02:27 +0200
commit5d309ff52cd399a6b71968a6b9a70c8ac0b98981 (patch)
tree360f7eb50f956e2367ef38fa1fc6ac7ac5258042 /node_modules/@babel
parentb500a50f1b97d93c98b36ed9a980f8188d648147 (diff)
downloadLYLLRuoka-5d309ff52cd399a6b71968a6b9a70c8ac0b98981.tar.gz
LYLLRuoka-5d309ff52cd399a6b71968a6b9a70c8ac0b98981.zip
Added node_modules for the updating to work properly.
Diffstat (limited to 'node_modules/@babel')
-rw-r--r--node_modules/@babel/code-frame/LICENSE22
-rw-r--r--node_modules/@babel/code-frame/README.md19
-rw-r--r--node_modules/@babel/code-frame/lib/index.js163
-rw-r--r--node_modules/@babel/code-frame/package.json29
-rw-r--r--node_modules/@babel/compat-data/LICENSE22
-rw-r--r--node_modules/@babel/compat-data/README.md19
-rw-r--r--node_modules/@babel/compat-data/corejs2-built-ins.js1
-rw-r--r--node_modules/@babel/compat-data/corejs3-shipped-proposals.js1
-rw-r--r--node_modules/@babel/compat-data/data/corejs2-built-ins.json1789
-rw-r--r--node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json5
-rw-r--r--node_modules/@babel/compat-data/data/native-modules.json18
-rw-r--r--node_modules/@babel/compat-data/data/overlapping-plugins.json22
-rw-r--r--node_modules/@babel/compat-data/data/plugin-bugfixes.json157
-rw-r--r--node_modules/@babel/compat-data/data/plugins.json477
-rw-r--r--node_modules/@babel/compat-data/native-modules.js1
-rw-r--r--node_modules/@babel/compat-data/overlapping-plugins.js1
-rw-r--r--node_modules/@babel/compat-data/package.json39
-rw-r--r--node_modules/@babel/compat-data/plugin-bugfixes.js1
-rw-r--r--node_modules/@babel/compat-data/plugins.js1
-rw-r--r--node_modules/@babel/core/LICENSE22
-rw-r--r--node_modules/@babel/core/README.md19
-rw-r--r--node_modules/@babel/core/lib/config/cache-contexts.js0
-rw-r--r--node_modules/@babel/core/lib/config/caching.js325
-rw-r--r--node_modules/@babel/core/lib/config/config-chain.js564
-rw-r--r--node_modules/@babel/core/lib/config/config-descriptors.js244
-rw-r--r--node_modules/@babel/core/lib/config/files/configuration.js358
-rw-r--r--node_modules/@babel/core/lib/config/files/import-meta-resolve.js41
-rw-r--r--node_modules/@babel/core/lib/config/files/import.js10
-rw-r--r--node_modules/@babel/core/lib/config/files/index-browser.js67
-rw-r--r--node_modules/@babel/core/lib/config/files/index.js86
-rw-r--r--node_modules/@babel/core/lib/config/files/module-types.js108
-rw-r--r--node_modules/@babel/core/lib/config/files/package.js76
-rw-r--r--node_modules/@babel/core/lib/config/files/plugins.js273
-rw-r--r--node_modules/@babel/core/lib/config/files/types.js0
-rw-r--r--node_modules/@babel/core/lib/config/files/utils.js44
-rw-r--r--node_modules/@babel/core/lib/config/full.js378
-rw-r--r--node_modules/@babel/core/lib/config/helpers/config-api.js108
-rw-r--r--node_modules/@babel/core/lib/config/helpers/deep-array.js24
-rw-r--r--node_modules/@babel/core/lib/config/helpers/environment.js10
-rw-r--r--node_modules/@babel/core/lib/config/index.js75
-rw-r--r--node_modules/@babel/core/lib/config/item.js76
-rw-r--r--node_modules/@babel/core/lib/config/partial.js197
-rw-r--r--node_modules/@babel/core/lib/config/pattern-to-regex.js44
-rw-r--r--node_modules/@babel/core/lib/config/plugin.js34
-rw-r--r--node_modules/@babel/core/lib/config/printer.js139
-rw-r--r--node_modules/@babel/core/lib/config/resolve-targets-browser.js42
-rw-r--r--node_modules/@babel/core/lib/config/resolve-targets.js68
-rw-r--r--node_modules/@babel/core/lib/config/util.js31
-rw-r--r--node_modules/@babel/core/lib/config/validation/option-assertions.js352
-rw-r--r--node_modules/@babel/core/lib/config/validation/options.js210
-rw-r--r--node_modules/@babel/core/lib/config/validation/plugins.js71
-rw-r--r--node_modules/@babel/core/lib/config/validation/removed.js66
-rw-r--r--node_modules/@babel/core/lib/gensync-utils/async.js94
-rw-r--r--node_modules/@babel/core/lib/gensync-utils/fs.js40
-rw-r--r--node_modules/@babel/core/lib/index.js266
-rw-r--r--node_modules/@babel/core/lib/parse.js48
-rw-r--r--node_modules/@babel/core/lib/parser/index.js95
-rw-r--r--node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js323
-rw-r--r--node_modules/@babel/core/lib/tools/build-external-helpers.js164
-rw-r--r--node_modules/@babel/core/lib/transform-ast.js46
-rw-r--r--node_modules/@babel/core/lib/transform-file-browser.js26
-rw-r--r--node_modules/@babel/core/lib/transform-file.js41
-rw-r--r--node_modules/@babel/core/lib/transform.js42
-rw-r--r--node_modules/@babel/core/lib/transformation/block-hoist-plugin.js94
-rw-r--r--node_modules/@babel/core/lib/transformation/file/file.js254
-rw-r--r--node_modules/@babel/core/lib/transformation/file/generate.js90
-rw-r--r--node_modules/@babel/core/lib/transformation/file/merge-map.js43
-rw-r--r--node_modules/@babel/core/lib/transformation/index.js127
-rw-r--r--node_modules/@babel/core/lib/transformation/normalize-file.js167
-rw-r--r--node_modules/@babel/core/lib/transformation/normalize-opts.js62
-rw-r--r--node_modules/@babel/core/lib/transformation/plugin-pass.js54
-rw-r--r--node_modules/@babel/core/lib/transformation/util/clone-deep-browser.js25
-rw-r--r--node_modules/@babel/core/lib/transformation/util/clone-deep.js26
-rw-r--r--node_modules/@babel/core/lib/vendor/import-meta-resolve.js3312
-rw-r--r--node_modules/@babel/core/package.json76
-rw-r--r--node_modules/@babel/core/src/config/files/index-browser.ts109
-rw-r--r--node_modules/@babel/core/src/config/files/index.ts30
-rw-r--r--node_modules/@babel/core/src/config/resolve-targets-browser.ts33
-rw-r--r--node_modules/@babel/core/src/config/resolve-targets.ts49
-rw-r--r--node_modules/@babel/core/src/transform-file-browser.ts27
-rw-r--r--node_modules/@babel/core/src/transform-file.ts40
-rw-r--r--node_modules/@babel/core/src/transformation/util/clone-deep-browser.ts19
-rw-r--r--node_modules/@babel/core/src/transformation/util/clone-deep.ts9
-rw-r--r--node_modules/@babel/generator/LICENSE22
-rw-r--r--node_modules/@babel/generator/README.md19
-rw-r--r--node_modules/@babel/generator/lib/buffer.js265
-rw-r--r--node_modules/@babel/generator/lib/generators/base.js96
-rw-r--r--node_modules/@babel/generator/lib/generators/classes.js213
-rw-r--r--node_modules/@babel/generator/lib/generators/expressions.js318
-rw-r--r--node_modules/@babel/generator/lib/generators/flow.js795
-rw-r--r--node_modules/@babel/generator/lib/generators/index.js148
-rw-r--r--node_modules/@babel/generator/lib/generators/jsx.js145
-rw-r--r--node_modules/@babel/generator/lib/generators/methods.js150
-rw-r--r--node_modules/@babel/generator/lib/generators/modules.js239
-rw-r--r--node_modules/@babel/generator/lib/generators/statements.js331
-rw-r--r--node_modules/@babel/generator/lib/generators/template-literals.js33
-rw-r--r--node_modules/@babel/generator/lib/generators/types.js276
-rw-r--r--node_modules/@babel/generator/lib/generators/typescript.js813
-rw-r--r--node_modules/@babel/generator/lib/index.js97
-rw-r--r--node_modules/@babel/generator/lib/node/index.js111
-rw-r--r--node_modules/@babel/generator/lib/node/parentheses.js342
-rw-r--r--node_modules/@babel/generator/lib/node/whitespace.js214
-rw-r--r--node_modules/@babel/generator/lib/printer.js540
-rw-r--r--node_modules/@babel/generator/lib/source-map.js78
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/CHANGELOG.md301
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/LICENSE28
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/README.md729
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js3091
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/dist/source-map.js3090
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js2
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js.map1
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/lib/array-set.js121
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js140
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/lib/base64.js67
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js111
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js79
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js114
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js1082
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js416
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/lib/source-node.js413
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/lib/util.js417
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/package.json72
-rw-r--r--node_modules/@babel/generator/node_modules/source-map/source-map.js8
-rw-r--r--node_modules/@babel/generator/package.json37
-rw-r--r--node_modules/@babel/helper-compilation-targets/LICENSE22
-rw-r--r--node_modules/@babel/helper-compilation-targets/README.md19
-rw-r--r--node_modules/@babel/helper-compilation-targets/lib/debug.js33
-rw-r--r--node_modules/@babel/helper-compilation-targets/lib/filter-items.js88
-rw-r--r--node_modules/@babel/helper-compilation-targets/lib/index.js255
-rw-r--r--node_modules/@babel/helper-compilation-targets/lib/options.js21
-rw-r--r--node_modules/@babel/helper-compilation-targets/lib/pretty.js47
-rw-r--r--node_modules/@babel/helper-compilation-targets/lib/targets.js27
-rw-r--r--node_modules/@babel/helper-compilation-targets/lib/types.js0
-rw-r--r--node_modules/@babel/helper-compilation-targets/lib/utils.js69
-rw-r--r--node_modules/@babel/helper-compilation-targets/package.json41
-rw-r--r--node_modules/@babel/helper-environment-visitor/LICENSE22
-rw-r--r--node_modules/@babel/helper-environment-visitor/README.md19
-rw-r--r--node_modules/@babel/helper-environment-visitor/lib/index.js38
-rw-r--r--node_modules/@babel/helper-environment-visitor/package.json30
-rw-r--r--node_modules/@babel/helper-function-name/LICENSE22
-rw-r--r--node_modules/@babel/helper-function-name/README.md19
-rw-r--r--node_modules/@babel/helper-function-name/lib/index.js192
-rw-r--r--node_modules/@babel/helper-function-name/package.json25
-rw-r--r--node_modules/@babel/helper-get-function-arity/LICENSE22
-rw-r--r--node_modules/@babel/helper-get-function-arity/README.md19
-rw-r--r--node_modules/@babel/helper-get-function-arity/lib/index.js27
-rw-r--r--node_modules/@babel/helper-get-function-arity/package.json23
-rw-r--r--node_modules/@babel/helper-hoist-variables/LICENSE22
-rw-r--r--node_modules/@babel/helper-hoist-variables/README.md19
-rw-r--r--node_modules/@babel/helper-hoist-variables/lib/index.js58
-rw-r--r--node_modules/@babel/helper-hoist-variables/package.json27
-rw-r--r--node_modules/@babel/helper-module-imports/LICENSE22
-rw-r--r--node_modules/@babel/helper-module-imports/README.md19
-rw-r--r--node_modules/@babel/helper-module-imports/lib/import-builder.js162
-rw-r--r--node_modules/@babel/helper-module-imports/lib/import-injector.js290
-rw-r--r--node_modules/@babel/helper-module-imports/lib/index.js41
-rw-r--r--node_modules/@babel/helper-module-imports/lib/is-module.js18
-rw-r--r--node_modules/@babel/helper-module-imports/package.json27
-rw-r--r--node_modules/@babel/helper-module-transforms/LICENSE22
-rw-r--r--node_modules/@babel/helper-module-transforms/README.md19
-rw-r--r--node_modules/@babel/helper-module-transforms/lib/get-module-name.js54
-rw-r--r--node_modules/@babel/helper-module-transforms/lib/index.js420
-rw-r--r--node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js398
-rw-r--r--node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js360
-rw-r--r--node_modules/@babel/helper-module-transforms/lib/rewrite-this.js30
-rw-r--r--node_modules/@babel/helper-module-transforms/package.json30
-rw-r--r--node_modules/@babel/helper-plugin-utils/LICENSE22
-rw-r--r--node_modules/@babel/helper-plugin-utils/README.md19
-rw-r--r--node_modules/@babel/helper-plugin-utils/lib/index.js90
-rw-r--r--node_modules/@babel/helper-plugin-utils/package.json20
-rw-r--r--node_modules/@babel/helper-simple-access/LICENSE22
-rw-r--r--node_modules/@babel/helper-simple-access/README.md19
-rw-r--r--node_modules/@babel/helper-simple-access/lib/index.js93
-rw-r--r--node_modules/@babel/helper-simple-access/package.json26
-rw-r--r--node_modules/@babel/helper-split-export-declaration/LICENSE22
-rw-r--r--node_modules/@babel/helper-split-export-declaration/README.md19
-rw-r--r--node_modules/@babel/helper-split-export-declaration/lib/index.js67
-rw-r--r--node_modules/@babel/helper-split-export-declaration/package.json23
-rw-r--r--node_modules/@babel/helper-validator-identifier/LICENSE22
-rw-r--r--node_modules/@babel/helper-validator-identifier/README.md19
-rw-r--r--node_modules/@babel/helper-validator-identifier/lib/identifier.js84
-rw-r--r--node_modules/@babel/helper-validator-identifier/lib/index.js57
-rw-r--r--node_modules/@babel/helper-validator-identifier/lib/keyword.js38
-rw-r--r--node_modules/@babel/helper-validator-identifier/package.json27
-rw-r--r--node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js75
-rw-r--r--node_modules/@babel/helper-validator-option/LICENSE22
-rw-r--r--node_modules/@babel/helper-validator-option/README.md19
-rw-r--r--node_modules/@babel/helper-validator-option/lib/find-suggestion.js45
-rw-r--r--node_modules/@babel/helper-validator-option/lib/index.js21
-rw-r--r--node_modules/@babel/helper-validator-option/lib/validator.js58
-rw-r--r--node_modules/@babel/helper-validator-option/package.json23
-rw-r--r--node_modules/@babel/helpers/LICENSE22
-rw-r--r--node_modules/@babel/helpers/README.md19
-rw-r--r--node_modules/@babel/helpers/lib/helpers-generated.js26
-rw-r--r--node_modules/@babel/helpers/lib/helpers.js1959
-rw-r--r--node_modules/@babel/helpers/lib/helpers/applyDecs.js483
-rw-r--r--node_modules/@babel/helpers/lib/helpers/asyncIterator.js81
-rw-r--r--node_modules/@babel/helpers/lib/helpers/jsx.js53
-rw-r--r--node_modules/@babel/helpers/lib/helpers/objectSpread2.js46
-rw-r--r--node_modules/@babel/helpers/lib/helpers/typeof.js22
-rw-r--r--node_modules/@babel/helpers/lib/helpers/wrapRegExp.js73
-rw-r--r--node_modules/@babel/helpers/lib/index.js300
-rw-r--r--node_modules/@babel/helpers/package.json29
-rw-r--r--node_modules/@babel/helpers/scripts/generate-helpers.js64
-rw-r--r--node_modules/@babel/helpers/scripts/package.json1
-rw-r--r--node_modules/@babel/highlight/LICENSE22
-rw-r--r--node_modules/@babel/highlight/README.md19
-rw-r--r--node_modules/@babel/highlight/lib/index.js116
-rw-r--r--node_modules/@babel/highlight/node_modules/ansi-styles/index.js165
-rw-r--r--node_modules/@babel/highlight/node_modules/ansi-styles/license9
-rw-r--r--node_modules/@babel/highlight/node_modules/ansi-styles/package.json56
-rw-r--r--node_modules/@babel/highlight/node_modules/ansi-styles/readme.md147
-rw-r--r--node_modules/@babel/highlight/node_modules/chalk/index.js228
-rw-r--r--node_modules/@babel/highlight/node_modules/chalk/index.js.flow93
-rw-r--r--node_modules/@babel/highlight/node_modules/chalk/license9
-rw-r--r--node_modules/@babel/highlight/node_modules/chalk/package.json71
-rw-r--r--node_modules/@babel/highlight/node_modules/chalk/readme.md314
-rw-r--r--node_modules/@babel/highlight/node_modules/chalk/templates.js128
-rw-r--r--node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts97
-rw-r--r--node_modules/@babel/highlight/node_modules/color-convert/CHANGELOG.md54
-rw-r--r--node_modules/@babel/highlight/node_modules/color-convert/LICENSE21
-rw-r--r--node_modules/@babel/highlight/node_modules/color-convert/README.md68
-rw-r--r--node_modules/@babel/highlight/node_modules/color-convert/conversions.js868
-rw-r--r--node_modules/@babel/highlight/node_modules/color-convert/index.js78
-rw-r--r--node_modules/@babel/highlight/node_modules/color-convert/package.json46
-rw-r--r--node_modules/@babel/highlight/node_modules/color-convert/route.js97
-rw-r--r--node_modules/@babel/highlight/node_modules/color-name/.eslintrc.json43
-rw-r--r--node_modules/@babel/highlight/node_modules/color-name/.npmignore107
-rw-r--r--node_modules/@babel/highlight/node_modules/color-name/LICENSE8
-rw-r--r--node_modules/@babel/highlight/node_modules/color-name/README.md11
-rw-r--r--node_modules/@babel/highlight/node_modules/color-name/index.js152
-rw-r--r--node_modules/@babel/highlight/node_modules/color-name/package.json25
-rw-r--r--node_modules/@babel/highlight/node_modules/color-name/test.js7
-rw-r--r--node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js11
-rw-r--r--node_modules/@babel/highlight/node_modules/escape-string-regexp/license21
-rw-r--r--node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json41
-rw-r--r--node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md27
-rw-r--r--node_modules/@babel/highlight/node_modules/has-flag/index.js8
-rw-r--r--node_modules/@babel/highlight/node_modules/has-flag/license9
-rw-r--r--node_modules/@babel/highlight/node_modules/has-flag/package.json44
-rw-r--r--node_modules/@babel/highlight/node_modules/has-flag/readme.md70
-rw-r--r--node_modules/@babel/highlight/node_modules/supports-color/browser.js5
-rw-r--r--node_modules/@babel/highlight/node_modules/supports-color/index.js131
-rw-r--r--node_modules/@babel/highlight/node_modules/supports-color/license9
-rw-r--r--node_modules/@babel/highlight/node_modules/supports-color/package.json53
-rw-r--r--node_modules/@babel/highlight/node_modules/supports-color/readme.md66
-rw-r--r--node_modules/@babel/highlight/package.json29
-rw-r--r--node_modules/@babel/parser/CHANGELOG.md1073
-rw-r--r--node_modules/@babel/parser/LICENSE19
-rw-r--r--node_modules/@babel/parser/README.md19
-rwxr-xr-xnode_modules/@babel/parser/bin/babel-parser.js15
-rw-r--r--node_modules/@babel/parser/lib/index.js16051
-rw-r--r--node_modules/@babel/parser/lib/index.js.map1
-rw-r--r--node_modules/@babel/parser/package.json42
-rw-r--r--node_modules/@babel/parser/typings/babel-parser.d.ts206
-rw-r--r--node_modules/@babel/plugin-syntax-async-generators/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-async-generators/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-async-generators/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-async-generators/package.json23
-rw-r--r--node_modules/@babel/plugin-syntax-bigint/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-bigint/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-bigint/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-bigint/package.json23
-rw-r--r--node_modules/@babel/plugin-syntax-class-properties/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-class-properties/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-class-properties/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-class-properties/package.json28
-rw-r--r--node_modules/@babel/plugin-syntax-import-meta/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-import-meta/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-import-meta/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-import-meta/package.json28
-rw-r--r--node_modules/@babel/plugin-syntax-json-strings/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-json-strings/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-json-strings/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-json-strings/package.json23
-rw-r--r--node_modules/@babel/plugin-syntax-logical-assignment-operators/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-logical-assignment-operators/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-logical-assignment-operators/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-logical-assignment-operators/package.json28
-rw-r--r--node_modules/@babel/plugin-syntax-nullish-coalescing-operator/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-nullish-coalescing-operator/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-nullish-coalescing-operator/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-nullish-coalescing-operator/package.json23
-rw-r--r--node_modules/@babel/plugin-syntax-numeric-separator/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-numeric-separator/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-numeric-separator/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-numeric-separator/package.json28
-rw-r--r--node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-object-rest-spread/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-object-rest-spread/package.json23
-rw-r--r--node_modules/@babel/plugin-syntax-optional-catch-binding/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-optional-catch-binding/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-optional-catch-binding/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-optional-catch-binding/package.json23
-rw-r--r--node_modules/@babel/plugin-syntax-optional-chaining/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-optional-chaining/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-optional-chaining/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-optional-chaining/package.json23
-rw-r--r--node_modules/@babel/plugin-syntax-top-level-await/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-top-level-await/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-top-level-await/lib/index.js22
-rw-r--r--node_modules/@babel/plugin-syntax-top-level-await/package.json32
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/LICENSE22
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/README.md19
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/lib/index.js54
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/package.json34
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/options.json3
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-assertion/input.ts1
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-assertion/options.json3
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter-unambiguous/input.ts2
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter-unambiguous/output.js3
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter/input.ts2
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter/options.json3
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/test/index.js3
-rw-r--r--node_modules/@babel/plugin-syntax-typescript/test/package.json1
-rw-r--r--node_modules/@babel/template/LICENSE22
-rw-r--r--node_modules/@babel/template/README.md19
-rw-r--r--node_modules/@babel/template/lib/builder.js81
-rw-r--r--node_modules/@babel/template/lib/formatters.js71
-rw-r--r--node_modules/@babel/template/lib/index.js32
-rw-r--r--node_modules/@babel/template/lib/literal.js80
-rw-r--r--node_modules/@babel/template/lib/options.js83
-rw-r--r--node_modules/@babel/template/lib/parse.js188
-rw-r--r--node_modules/@babel/template/lib/populate.js135
-rw-r--r--node_modules/@babel/template/lib/string.js22
-rw-r--r--node_modules/@babel/template/package.json26
-rw-r--r--node_modules/@babel/traverse/LICENSE22
-rw-r--r--node_modules/@babel/traverse/README.md19
-rw-r--r--node_modules/@babel/traverse/lib/cache.js26
-rw-r--r--node_modules/@babel/traverse/lib/context.js137
-rw-r--r--node_modules/@babel/traverse/lib/hub.js23
-rw-r--r--node_modules/@babel/traverse/lib/index.js111
-rw-r--r--node_modules/@babel/traverse/lib/path/ancestry.js180
-rw-r--r--node_modules/@babel/traverse/lib/path/comments.js42
-rw-r--r--node_modules/@babel/traverse/lib/path/context.js263
-rw-r--r--node_modules/@babel/traverse/lib/path/conversion.js531
-rw-r--r--node_modules/@babel/traverse/lib/path/evaluation.js401
-rw-r--r--node_modules/@babel/traverse/lib/path/family.js407
-rw-r--r--node_modules/@babel/traverse/lib/path/generated/asserts.js5
-rw-r--r--node_modules/@babel/traverse/lib/path/generated/validators.js5
-rw-r--r--node_modules/@babel/traverse/lib/path/generated/virtual-types.js3
-rw-r--r--node_modules/@babel/traverse/lib/path/index.js257
-rw-r--r--node_modules/@babel/traverse/lib/path/inference/index.js156
-rw-r--r--node_modules/@babel/traverse/lib/path/inference/inferer-reference.js206
-rw-r--r--node_modules/@babel/traverse/lib/path/inference/inferers.js261
-rw-r--r--node_modules/@babel/traverse/lib/path/introspection.js436
-rw-r--r--node_modules/@babel/traverse/lib/path/lib/hoister.js206
-rw-r--r--node_modules/@babel/traverse/lib/path/lib/removal-hooks.js38
-rw-r--r--node_modules/@babel/traverse/lib/path/lib/virtual-types.js230
-rw-r--r--node_modules/@babel/traverse/lib/path/modification.js269
-rw-r--r--node_modules/@babel/traverse/lib/path/removal.js73
-rw-r--r--node_modules/@babel/traverse/lib/path/replacement.js260
-rw-r--r--node_modules/@babel/traverse/lib/scope/binding.js75
-rw-r--r--node_modules/@babel/traverse/lib/scope/index.js1018
-rw-r--r--node_modules/@babel/traverse/lib/scope/lib/renamer.js146
-rw-r--r--node_modules/@babel/traverse/lib/traverse-node.js30
-rw-r--r--node_modules/@babel/traverse/lib/types.js5
-rw-r--r--node_modules/@babel/traverse/lib/visitors.js242
-rw-r--r--node_modules/@babel/traverse/package.json36
-rw-r--r--node_modules/@babel/traverse/scripts/generators/asserts.js25
-rw-r--r--node_modules/@babel/traverse/scripts/generators/validators.js42
-rw-r--r--node_modules/@babel/traverse/scripts/generators/virtual-types.js24
-rw-r--r--node_modules/@babel/traverse/scripts/package.json1
-rw-r--r--node_modules/@babel/types/LICENSE22
-rw-r--r--node_modules/@babel/types/README.md19
-rw-r--r--node_modules/@babel/types/lib/asserts/assertNode.js17
-rw-r--r--node_modules/@babel/types/lib/asserts/generated/index.js1517
-rw-r--r--node_modules/@babel/types/lib/ast-types/generated/index.js0
-rw-r--r--node_modules/@babel/types/lib/builders/builder.js43
-rw-r--r--node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js20
-rw-r--r--node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js41
-rw-r--r--node_modules/@babel/types/lib/builders/generated/index.js1266
-rw-r--r--node_modules/@babel/types/lib/builders/generated/uppercase.js1513
-rw-r--r--node_modules/@babel/types/lib/builders/react/buildChildren.js29
-rw-r--r--node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js21
-rw-r--r--node_modules/@babel/types/lib/clone/clone.js12
-rw-r--r--node_modules/@babel/types/lib/clone/cloneDeep.js12
-rw-r--r--node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js12
-rw-r--r--node_modules/@babel/types/lib/clone/cloneNode.js114
-rw-r--r--node_modules/@babel/types/lib/clone/cloneWithoutLoc.js12
-rw-r--r--node_modules/@babel/types/lib/comments/addComment.js15
-rw-r--r--node_modules/@babel/types/lib/comments/addComments.js23
-rw-r--r--node_modules/@babel/types/lib/comments/inheritInnerComments.js12
-rw-r--r--node_modules/@babel/types/lib/comments/inheritLeadingComments.js12
-rw-r--r--node_modules/@babel/types/lib/comments/inheritTrailingComments.js12
-rw-r--r--node_modules/@babel/types/lib/comments/inheritsComments.js19
-rw-r--r--node_modules/@babel/types/lib/comments/removeComments.js16
-rw-r--r--node_modules/@babel/types/lib/constants/generated/index.js107
-rw-r--r--node_modules/@babel/types/lib/constants/index.js49
-rw-r--r--node_modules/@babel/types/lib/converters/Scope.js0
-rw-r--r--node_modules/@babel/types/lib/converters/ensureBlock.js12
-rw-r--r--node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js75
-rw-r--r--node_modules/@babel/types/lib/converters/toBindingIdentifierName.js14
-rw-r--r--node_modules/@babel/types/lib/converters/toBlock.js34
-rw-r--r--node_modules/@babel/types/lib/converters/toComputedKey.js15
-rw-r--r--node_modules/@babel/types/lib/converters/toExpression.js33
-rw-r--r--node_modules/@babel/types/lib/converters/toIdentifier.js30
-rw-r--r--node_modules/@babel/types/lib/converters/toKeyAlias.js46
-rw-r--r--node_modules/@babel/types/lib/converters/toSequenceExpression.js21
-rw-r--r--node_modules/@babel/types/lib/converters/toStatement.js47
-rw-r--r--node_modules/@babel/types/lib/converters/valueToNode.js99
-rw-r--r--node_modules/@babel/types/lib/definitions/core.js1649
-rw-r--r--node_modules/@babel/types/lib/definitions/experimental.js133
-rw-r--r--node_modules/@babel/types/lib/definitions/flow.js474
-rw-r--r--node_modules/@babel/types/lib/definitions/index.js103
-rw-r--r--node_modules/@babel/types/lib/definitions/jsx.js156
-rw-r--r--node_modules/@babel/types/lib/definitions/misc.js32
-rw-r--r--node_modules/@babel/types/lib/definitions/placeholders.js33
-rw-r--r--node_modules/@babel/types/lib/definitions/typescript.js470
-rw-r--r--node_modules/@babel/types/lib/definitions/utils.js343
-rw-r--r--node_modules/@babel/types/lib/index-legacy.d.ts2717
-rw-r--r--node_modules/@babel/types/lib/index.d.ts2927
-rw-r--r--node_modules/@babel/types/lib/index.js647
-rw-r--r--node_modules/@babel/types/lib/index.js.flow2572
-rw-r--r--node_modules/@babel/types/lib/modifications/appendToMemberExpression.js15
-rw-r--r--node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js78
-rw-r--r--node_modules/@babel/types/lib/modifications/inherits.js31
-rw-r--r--node_modules/@babel/types/lib/modifications/prependToMemberExpression.js13
-rw-r--r--node_modules/@babel/types/lib/modifications/removeProperties.js30
-rw-r--r--node_modules/@babel/types/lib/modifications/removePropertiesDeep.js15
-rw-r--r--node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js54
-rw-r--r--node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js104
-rw-r--r--node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js15
-rw-r--r--node_modules/@babel/types/lib/traverse/traverse.js55
-rw-r--r--node_modules/@babel/types/lib/traverse/traverseFast.js28
-rw-r--r--node_modules/@babel/types/lib/utils/inherit.js12
-rw-r--r--node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js47
-rw-r--r--node_modules/@babel/types/lib/utils/shallowEqual.js18
-rw-r--r--node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js13
-rw-r--r--node_modules/@babel/types/lib/validators/generated/index.js4811
-rw-r--r--node_modules/@babel/types/lib/validators/is.js33
-rw-r--r--node_modules/@babel/types/lib/validators/isBinding.js31
-rw-r--r--node_modules/@babel/types/lib/validators/isBlockScoped.js14
-rw-r--r--node_modules/@babel/types/lib/validators/isImmutable.js24
-rw-r--r--node_modules/@babel/types/lib/validators/isLet.js14
-rw-r--r--node_modules/@babel/types/lib/validators/isNode.js12
-rw-r--r--node_modules/@babel/types/lib/validators/isNodesEquivalent.js67
-rw-r--r--node_modules/@babel/types/lib/validators/isPlaceholderType.js21
-rw-r--r--node_modules/@babel/types/lib/validators/isReferenced.js128
-rw-r--r--node_modules/@babel/types/lib/validators/isScope.js20
-rw-r--r--node_modules/@babel/types/lib/validators/isSpecifierDefault.js14
-rw-r--r--node_modules/@babel/types/lib/validators/isType.js24
-rw-r--r--node_modules/@babel/types/lib/validators/isValidES3Identifier.js14
-rw-r--r--node_modules/@babel/types/lib/validators/isValidIdentifier.js20
-rw-r--r--node_modules/@babel/types/lib/validators/isVar.js16
-rw-r--r--node_modules/@babel/types/lib/validators/matchesPattern.js42
-rw-r--r--node_modules/@babel/types/lib/validators/react/isCompatTag.js10
-rw-r--r--node_modules/@babel/types/lib/validators/react/isReactComponent.js12
-rw-r--r--node_modules/@babel/types/lib/validators/validate.js32
-rw-r--r--node_modules/@babel/types/package.json39
-rw-r--r--node_modules/@babel/types/scripts/generators/asserts.js50
-rw-r--r--node_modules/@babel/types/scripts/generators/ast-types.js144
-rw-r--r--node_modules/@babel/types/scripts/generators/builders.js163
-rw-r--r--node_modules/@babel/types/scripts/generators/constants.js15
-rw-r--r--node_modules/@babel/types/scripts/generators/docs.js282
-rw-r--r--node_modules/@babel/types/scripts/generators/flow.js260
-rw-r--r--node_modules/@babel/types/scripts/generators/typescript-legacy.js369
-rw-r--r--node_modules/@babel/types/scripts/generators/validators.js87
-rw-r--r--node_modules/@babel/types/scripts/package.json1
-rw-r--r--node_modules/@babel/types/scripts/utils/formatBuilderName.js8
-rw-r--r--node_modules/@babel/types/scripts/utils/lowerFirst.js3
-rw-r--r--node_modules/@babel/types/scripts/utils/stringifyValidator.js66
-rw-r--r--node_modules/@babel/types/scripts/utils/toFunctionName.js4
464 files changed, 89777 insertions, 0 deletions
diff --git a/node_modules/@babel/code-frame/LICENSE b/node_modules/@babel/code-frame/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/code-frame/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/code-frame/README.md b/node_modules/@babel/code-frame/README.md
new file mode 100644
index 0000000..08cacb0
--- /dev/null
+++ b/node_modules/@babel/code-frame/README.md
@@ -0,0 +1,19 @@
+# @babel/code-frame
+
+> Generate errors that contain a code frame that point to source locations.
+
+See our website [@babel/code-frame](https://babeljs.io/docs/en/babel-code-frame) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/code-frame
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/code-frame --dev
+```
diff --git a/node_modules/@babel/code-frame/lib/index.js b/node_modules/@babel/code-frame/lib/index.js
new file mode 100644
index 0000000..cba3f83
--- /dev/null
+++ b/node_modules/@babel/code-frame/lib/index.js
@@ -0,0 +1,163 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.codeFrameColumns = codeFrameColumns;
+exports.default = _default;
+
+var _highlight = require("@babel/highlight");
+
+let deprecationWarningShown = false;
+
+function getDefs(chalk) {
+ return {
+ gutter: chalk.grey,
+ marker: chalk.red.bold,
+ message: chalk.red.bold
+ };
+}
+
+const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+
+function getMarkerLines(loc, source, opts) {
+ const startLoc = Object.assign({
+ column: 0,
+ line: -1
+ }, loc.start);
+ const endLoc = Object.assign({}, startLoc, loc.end);
+ const {
+ linesAbove = 2,
+ linesBelow = 3
+ } = opts || {};
+ const startLine = startLoc.line;
+ const startColumn = startLoc.column;
+ const endLine = endLoc.line;
+ const endColumn = endLoc.column;
+ let start = Math.max(startLine - (linesAbove + 1), 0);
+ let end = Math.min(source.length, endLine + linesBelow);
+
+ if (startLine === -1) {
+ start = 0;
+ }
+
+ if (endLine === -1) {
+ end = source.length;
+ }
+
+ const lineDiff = endLine - startLine;
+ const markerLines = {};
+
+ if (lineDiff) {
+ for (let i = 0; i <= lineDiff; i++) {
+ const lineNumber = i + startLine;
+
+ if (!startColumn) {
+ markerLines[lineNumber] = true;
+ } else if (i === 0) {
+ const sourceLength = source[lineNumber - 1].length;
+ markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
+ } else if (i === lineDiff) {
+ markerLines[lineNumber] = [0, endColumn];
+ } else {
+ const sourceLength = source[lineNumber - i].length;
+ markerLines[lineNumber] = [0, sourceLength];
+ }
+ }
+ } else {
+ if (startColumn === endColumn) {
+ if (startColumn) {
+ markerLines[startLine] = [startColumn, 0];
+ } else {
+ markerLines[startLine] = true;
+ }
+ } else {
+ markerLines[startLine] = [startColumn, endColumn - startColumn];
+ }
+ }
+
+ return {
+ start,
+ end,
+ markerLines
+ };
+}
+
+function codeFrameColumns(rawLines, loc, opts = {}) {
+ const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
+ const chalk = (0, _highlight.getChalk)(opts);
+ const defs = getDefs(chalk);
+
+ const maybeHighlight = (chalkFn, string) => {
+ return highlighted ? chalkFn(string) : string;
+ };
+
+ const lines = rawLines.split(NEWLINE);
+ const {
+ start,
+ end,
+ markerLines
+ } = getMarkerLines(loc, lines, opts);
+ const hasColumns = loc.start && typeof loc.start.column === "number";
+ const numberMaxWidth = String(end).length;
+ const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;
+ let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
+ const number = start + 1 + index;
+ const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
+ const gutter = ` ${paddedNumber} |`;
+ const hasMarker = markerLines[number];
+ const lastMarkerLine = !markerLines[number + 1];
+
+ if (hasMarker) {
+ let markerLine = "";
+
+ if (Array.isArray(hasMarker)) {
+ const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
+ const numberOfMarkers = hasMarker[1] || 1;
+ markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), " ", markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join("");
+
+ if (lastMarkerLine && opts.message) {
+ markerLine += " " + maybeHighlight(defs.message, opts.message);
+ }
+ }
+
+ return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
+ } else {
+ return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : ""}`;
+ }
+ }).join("\n");
+
+ if (opts.message && !hasColumns) {
+ frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
+ }
+
+ if (highlighted) {
+ return chalk.reset(frame);
+ } else {
+ return frame;
+ }
+}
+
+function _default(rawLines, lineNumber, colNumber, opts = {}) {
+ if (!deprecationWarningShown) {
+ deprecationWarningShown = true;
+ const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
+
+ if (process.emitWarning) {
+ process.emitWarning(message, "DeprecationWarning");
+ } else {
+ const deprecationError = new Error(message);
+ deprecationError.name = "DeprecationWarning";
+ console.warn(new Error(message));
+ }
+ }
+
+ colNumber = Math.max(colNumber, 0);
+ const location = {
+ start: {
+ column: colNumber,
+ line: lineNumber
+ }
+ };
+ return codeFrameColumns(rawLines, location, opts);
+} \ No newline at end of file
diff --git a/node_modules/@babel/code-frame/package.json b/node_modules/@babel/code-frame/package.json
new file mode 100644
index 0000000..ee1b382
--- /dev/null
+++ b/node_modules/@babel/code-frame/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "@babel/code-frame",
+ "version": "7.16.7",
+ "description": "Generate errors that contain a code frame that point to source locations.",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-code-frame",
+ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-code-frame"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/highlight": "^7.16.7"
+ },
+ "devDependencies": {
+ "@types/chalk": "^2.0.0",
+ "chalk": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/compat-data/LICENSE b/node_modules/@babel/compat-data/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/compat-data/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/compat-data/README.md b/node_modules/@babel/compat-data/README.md
new file mode 100644
index 0000000..9f3abde
--- /dev/null
+++ b/node_modules/@babel/compat-data/README.md
@@ -0,0 +1,19 @@
+# @babel/compat-data
+
+>
+
+See our website [@babel/compat-data](https://babeljs.io/docs/en/babel-compat-data) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/compat-data
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/compat-data
+```
diff --git a/node_modules/@babel/compat-data/corejs2-built-ins.js b/node_modules/@babel/compat-data/corejs2-built-ins.js
new file mode 100644
index 0000000..68ce97f
--- /dev/null
+++ b/node_modules/@babel/compat-data/corejs2-built-ins.js
@@ -0,0 +1 @@
+module.exports = require("./data/corejs2-built-ins.json");
diff --git a/node_modules/@babel/compat-data/corejs3-shipped-proposals.js b/node_modules/@babel/compat-data/corejs3-shipped-proposals.js
new file mode 100644
index 0000000..6a85b4d
--- /dev/null
+++ b/node_modules/@babel/compat-data/corejs3-shipped-proposals.js
@@ -0,0 +1 @@
+module.exports = require("./data/corejs3-shipped-proposals.json");
diff --git a/node_modules/@babel/compat-data/data/corejs2-built-ins.json b/node_modules/@babel/compat-data/data/corejs2-built-ins.json
new file mode 100644
index 0000000..ab9d30b
--- /dev/null
+++ b/node_modules/@babel/compat-data/data/corejs2-built-ins.json
@@ -0,0 +1,1789 @@
+{
+ "es6.array.copy-within": {
+ "chrome": "45",
+ "opera": "32",
+ "edge": "12",
+ "firefox": "32",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "5",
+ "rhino": "1.7.13",
+ "electron": "0.31"
+ },
+ "es6.array.every": {
+ "chrome": "5",
+ "opera": "10.10",
+ "edge": "12",
+ "firefox": "2",
+ "safari": "3.1",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.array.fill": {
+ "chrome": "45",
+ "opera": "32",
+ "edge": "12",
+ "firefox": "31",
+ "safari": "7.1",
+ "node": "4",
+ "ios": "8",
+ "samsung": "5",
+ "rhino": "1.7.13",
+ "electron": "0.31"
+ },
+ "es6.array.filter": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.array.find": {
+ "chrome": "45",
+ "opera": "32",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "4",
+ "ios": "8",
+ "samsung": "5",
+ "rhino": "1.7.13",
+ "electron": "0.31"
+ },
+ "es6.array.find-index": {
+ "chrome": "45",
+ "opera": "32",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "4",
+ "ios": "8",
+ "samsung": "5",
+ "rhino": "1.7.13",
+ "electron": "0.31"
+ },
+ "es7.array.flat-map": {
+ "chrome": "69",
+ "opera": "56",
+ "edge": "79",
+ "firefox": "62",
+ "safari": "12",
+ "node": "11",
+ "ios": "12",
+ "samsung": "10",
+ "electron": "4.0"
+ },
+ "es6.array.for-each": {
+ "chrome": "5",
+ "opera": "10.10",
+ "edge": "12",
+ "firefox": "2",
+ "safari": "3.1",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.array.from": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "15",
+ "firefox": "36",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es7.array.includes": {
+ "chrome": "47",
+ "opera": "34",
+ "edge": "14",
+ "firefox": "43",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.36"
+ },
+ "es6.array.index-of": {
+ "chrome": "5",
+ "opera": "10.10",
+ "edge": "12",
+ "firefox": "2",
+ "safari": "3.1",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.array.is-array": {
+ "chrome": "5",
+ "opera": "10.50",
+ "edge": "12",
+ "firefox": "4",
+ "safari": "4",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.array.iterator": {
+ "chrome": "66",
+ "opera": "53",
+ "edge": "12",
+ "firefox": "60",
+ "safari": "9",
+ "node": "10",
+ "ios": "9",
+ "samsung": "9",
+ "rhino": "1.7.13",
+ "electron": "3.0"
+ },
+ "es6.array.last-index-of": {
+ "chrome": "5",
+ "opera": "10.10",
+ "edge": "12",
+ "firefox": "2",
+ "safari": "3.1",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.array.map": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.array.of": {
+ "chrome": "45",
+ "opera": "32",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "5",
+ "rhino": "1.7.13",
+ "electron": "0.31"
+ },
+ "es6.array.reduce": {
+ "chrome": "5",
+ "opera": "10.50",
+ "edge": "12",
+ "firefox": "3",
+ "safari": "4",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.array.reduce-right": {
+ "chrome": "5",
+ "opera": "10.50",
+ "edge": "12",
+ "firefox": "3",
+ "safari": "4",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.array.slice": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.array.some": {
+ "chrome": "5",
+ "opera": "10.10",
+ "edge": "12",
+ "firefox": "2",
+ "safari": "3.1",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.array.sort": {
+ "chrome": "63",
+ "opera": "50",
+ "edge": "12",
+ "firefox": "5",
+ "safari": "12",
+ "node": "10",
+ "ie": "9",
+ "ios": "12",
+ "samsung": "8",
+ "rhino": "1.7.13",
+ "electron": "3.0"
+ },
+ "es6.array.species": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.date.now": {
+ "chrome": "5",
+ "opera": "10.50",
+ "edge": "12",
+ "firefox": "2",
+ "safari": "4",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.date.to-iso-string": {
+ "chrome": "5",
+ "opera": "10.50",
+ "edge": "12",
+ "firefox": "3.5",
+ "safari": "4",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.date.to-json": {
+ "chrome": "5",
+ "opera": "12.10",
+ "edge": "12",
+ "firefox": "4",
+ "safari": "10",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "10",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.date.to-primitive": {
+ "chrome": "47",
+ "opera": "34",
+ "edge": "15",
+ "firefox": "44",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.36"
+ },
+ "es6.date.to-string": {
+ "chrome": "5",
+ "opera": "10.50",
+ "edge": "12",
+ "firefox": "2",
+ "safari": "3.1",
+ "node": "0.10",
+ "ie": "10",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.function.bind": {
+ "chrome": "7",
+ "opera": "12",
+ "edge": "12",
+ "firefox": "4",
+ "safari": "5.1",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.function.has-instance": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "15",
+ "firefox": "50",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.function.name": {
+ "chrome": "5",
+ "opera": "10.50",
+ "edge": "14",
+ "firefox": "2",
+ "safari": "4",
+ "node": "0.10",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.map": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "15",
+ "firefox": "53",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.math.acosh": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.asinh": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.atanh": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.cbrt": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.clz32": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "31",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.cosh": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.expm1": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.fround": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "26",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.hypot": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "27",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.imul": {
+ "chrome": "30",
+ "opera": "17",
+ "edge": "12",
+ "firefox": "23",
+ "safari": "7",
+ "node": "0.12",
+ "android": "4.4",
+ "ios": "7",
+ "samsung": "2",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.log1p": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.log10": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.log2": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.sign": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.sinh": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.tanh": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.math.trunc": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "7.1",
+ "node": "0.12",
+ "ios": "8",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.number.constructor": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "12",
+ "firefox": "36",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "rhino": "1.7.13",
+ "electron": "0.21"
+ },
+ "es6.number.epsilon": {
+ "chrome": "34",
+ "opera": "21",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "2",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.number.is-finite": {
+ "chrome": "19",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "16",
+ "safari": "9",
+ "node": "0.12",
+ "android": "4.1",
+ "ios": "9",
+ "samsung": "1.5",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.number.is-integer": {
+ "chrome": "34",
+ "opera": "21",
+ "edge": "12",
+ "firefox": "16",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "2",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.number.is-nan": {
+ "chrome": "19",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "15",
+ "safari": "9",
+ "node": "0.12",
+ "android": "4.1",
+ "ios": "9",
+ "samsung": "1.5",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.number.is-safe-integer": {
+ "chrome": "34",
+ "opera": "21",
+ "edge": "12",
+ "firefox": "32",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "2",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.number.max-safe-integer": {
+ "chrome": "34",
+ "opera": "21",
+ "edge": "12",
+ "firefox": "31",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "2",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.number.min-safe-integer": {
+ "chrome": "34",
+ "opera": "21",
+ "edge": "12",
+ "firefox": "31",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "2",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.number.parse-float": {
+ "chrome": "34",
+ "opera": "21",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "2",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.number.parse-int": {
+ "chrome": "34",
+ "opera": "21",
+ "edge": "12",
+ "firefox": "25",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "2",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.object.assign": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "13",
+ "firefox": "36",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.object.create": {
+ "chrome": "5",
+ "opera": "12",
+ "edge": "12",
+ "firefox": "4",
+ "safari": "4",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es7.object.define-getter": {
+ "chrome": "62",
+ "opera": "49",
+ "edge": "16",
+ "firefox": "48",
+ "safari": "9",
+ "node": "8.10",
+ "ios": "9",
+ "samsung": "8",
+ "electron": "3.0"
+ },
+ "es7.object.define-setter": {
+ "chrome": "62",
+ "opera": "49",
+ "edge": "16",
+ "firefox": "48",
+ "safari": "9",
+ "node": "8.10",
+ "ios": "9",
+ "samsung": "8",
+ "electron": "3.0"
+ },
+ "es6.object.define-property": {
+ "chrome": "5",
+ "opera": "12",
+ "edge": "12",
+ "firefox": "4",
+ "safari": "5.1",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.object.define-properties": {
+ "chrome": "5",
+ "opera": "12",
+ "edge": "12",
+ "firefox": "4",
+ "safari": "4",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es7.object.entries": {
+ "chrome": "54",
+ "opera": "41",
+ "edge": "14",
+ "firefox": "47",
+ "safari": "10.1",
+ "node": "7",
+ "ios": "10.3",
+ "samsung": "6",
+ "rhino": "1.7.14",
+ "electron": "1.4"
+ },
+ "es6.object.freeze": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "35",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "rhino": "1.7.13",
+ "electron": "0.30"
+ },
+ "es6.object.get-own-property-descriptor": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "35",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "rhino": "1.7.13",
+ "electron": "0.30"
+ },
+ "es7.object.get-own-property-descriptors": {
+ "chrome": "54",
+ "opera": "41",
+ "edge": "15",
+ "firefox": "50",
+ "safari": "10.1",
+ "node": "7",
+ "ios": "10.3",
+ "samsung": "6",
+ "electron": "1.4"
+ },
+ "es6.object.get-own-property-names": {
+ "chrome": "40",
+ "opera": "27",
+ "edge": "12",
+ "firefox": "33",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "rhino": "1.7.13",
+ "electron": "0.21"
+ },
+ "es6.object.get-prototype-of": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "35",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "rhino": "1.7.13",
+ "electron": "0.30"
+ },
+ "es7.object.lookup-getter": {
+ "chrome": "62",
+ "opera": "49",
+ "edge": "79",
+ "firefox": "36",
+ "safari": "9",
+ "node": "8.10",
+ "ios": "9",
+ "samsung": "8",
+ "electron": "3.0"
+ },
+ "es7.object.lookup-setter": {
+ "chrome": "62",
+ "opera": "49",
+ "edge": "79",
+ "firefox": "36",
+ "safari": "9",
+ "node": "8.10",
+ "ios": "9",
+ "samsung": "8",
+ "electron": "3.0"
+ },
+ "es6.object.prevent-extensions": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "35",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "rhino": "1.7.13",
+ "electron": "0.30"
+ },
+ "es6.object.to-string": {
+ "chrome": "57",
+ "opera": "44",
+ "edge": "15",
+ "firefox": "51",
+ "safari": "10",
+ "node": "8",
+ "ios": "10",
+ "samsung": "7",
+ "electron": "1.7"
+ },
+ "es6.object.is": {
+ "chrome": "19",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "22",
+ "safari": "9",
+ "node": "0.12",
+ "android": "4.1",
+ "ios": "9",
+ "samsung": "1.5",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.object.is-frozen": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "35",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "rhino": "1.7.13",
+ "electron": "0.30"
+ },
+ "es6.object.is-sealed": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "35",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "rhino": "1.7.13",
+ "electron": "0.30"
+ },
+ "es6.object.is-extensible": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "35",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "rhino": "1.7.13",
+ "electron": "0.30"
+ },
+ "es6.object.keys": {
+ "chrome": "40",
+ "opera": "27",
+ "edge": "12",
+ "firefox": "35",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "rhino": "1.7.13",
+ "electron": "0.21"
+ },
+ "es6.object.seal": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "35",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "rhino": "1.7.13",
+ "electron": "0.30"
+ },
+ "es6.object.set-prototype-of": {
+ "chrome": "34",
+ "opera": "21",
+ "edge": "12",
+ "firefox": "31",
+ "safari": "9",
+ "node": "0.12",
+ "ie": "11",
+ "ios": "9",
+ "samsung": "2",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es7.object.values": {
+ "chrome": "54",
+ "opera": "41",
+ "edge": "14",
+ "firefox": "47",
+ "safari": "10.1",
+ "node": "7",
+ "ios": "10.3",
+ "samsung": "6",
+ "rhino": "1.7.14",
+ "electron": "1.4"
+ },
+ "es6.promise": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "14",
+ "firefox": "45",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es7.promise.finally": {
+ "chrome": "63",
+ "opera": "50",
+ "edge": "18",
+ "firefox": "58",
+ "safari": "11.1",
+ "node": "10",
+ "ios": "11.3",
+ "samsung": "8",
+ "electron": "3.0"
+ },
+ "es6.reflect.apply": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.construct": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "13",
+ "firefox": "49",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.define-property": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "13",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.delete-property": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.get": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.get-own-property-descriptor": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.get-prototype-of": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.has": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.is-extensible": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.own-keys": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.prevent-extensions": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.set": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.reflect.set-prototype-of": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "42",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.regexp.constructor": {
+ "chrome": "50",
+ "opera": "37",
+ "edge": "79",
+ "firefox": "40",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.1"
+ },
+ "es6.regexp.flags": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "79",
+ "firefox": "37",
+ "safari": "9",
+ "node": "6",
+ "ios": "9",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "es6.regexp.match": {
+ "chrome": "50",
+ "opera": "37",
+ "edge": "79",
+ "firefox": "49",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "rhino": "1.7.13",
+ "electron": "1.1"
+ },
+ "es6.regexp.replace": {
+ "chrome": "50",
+ "opera": "37",
+ "edge": "79",
+ "firefox": "49",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.1"
+ },
+ "es6.regexp.split": {
+ "chrome": "50",
+ "opera": "37",
+ "edge": "79",
+ "firefox": "49",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.1"
+ },
+ "es6.regexp.search": {
+ "chrome": "50",
+ "opera": "37",
+ "edge": "79",
+ "firefox": "49",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "rhino": "1.7.13",
+ "electron": "1.1"
+ },
+ "es6.regexp.to-string": {
+ "chrome": "50",
+ "opera": "37",
+ "edge": "79",
+ "firefox": "39",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.1"
+ },
+ "es6.set": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "15",
+ "firefox": "53",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.symbol": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "79",
+ "firefox": "51",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es7.symbol.async-iterator": {
+ "chrome": "63",
+ "opera": "50",
+ "edge": "79",
+ "firefox": "57",
+ "safari": "12",
+ "node": "10",
+ "ios": "12",
+ "samsung": "8",
+ "electron": "3.0"
+ },
+ "es6.string.anchor": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.big": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.blink": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.bold": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.code-point-at": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "12",
+ "firefox": "29",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "rhino": "1.7.13",
+ "electron": "0.21"
+ },
+ "es6.string.ends-with": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "12",
+ "firefox": "29",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "rhino": "1.7.13",
+ "electron": "0.21"
+ },
+ "es6.string.fixed": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.fontcolor": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.fontsize": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.from-code-point": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "12",
+ "firefox": "29",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "rhino": "1.7.13",
+ "electron": "0.21"
+ },
+ "es6.string.includes": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "12",
+ "firefox": "40",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "rhino": "1.7.13",
+ "electron": "0.21"
+ },
+ "es6.string.italics": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.iterator": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "36",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.string.link": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es7.string.pad-start": {
+ "chrome": "57",
+ "opera": "44",
+ "edge": "15",
+ "firefox": "48",
+ "safari": "10",
+ "node": "8",
+ "ios": "10",
+ "samsung": "7",
+ "rhino": "1.7.13",
+ "electron": "1.7"
+ },
+ "es7.string.pad-end": {
+ "chrome": "57",
+ "opera": "44",
+ "edge": "15",
+ "firefox": "48",
+ "safari": "10",
+ "node": "8",
+ "ios": "10",
+ "samsung": "7",
+ "rhino": "1.7.13",
+ "electron": "1.7"
+ },
+ "es6.string.raw": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "12",
+ "firefox": "34",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "rhino": "1.7.14",
+ "electron": "0.21"
+ },
+ "es6.string.repeat": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "12",
+ "firefox": "24",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "rhino": "1.7.13",
+ "electron": "0.21"
+ },
+ "es6.string.small": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.starts-with": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "12",
+ "firefox": "29",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "rhino": "1.7.13",
+ "electron": "0.21"
+ },
+ "es6.string.strike": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.sub": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.sup": {
+ "chrome": "5",
+ "opera": "15",
+ "edge": "12",
+ "firefox": "17",
+ "safari": "6",
+ "node": "0.10",
+ "android": "4",
+ "ios": "7",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.14",
+ "electron": "0.20"
+ },
+ "es6.string.trim": {
+ "chrome": "5",
+ "opera": "10.50",
+ "edge": "12",
+ "firefox": "3.5",
+ "safari": "4",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es7.string.trim-left": {
+ "chrome": "66",
+ "opera": "53",
+ "edge": "79",
+ "firefox": "61",
+ "safari": "12",
+ "node": "10",
+ "ios": "12",
+ "samsung": "9",
+ "rhino": "1.7.13",
+ "electron": "3.0"
+ },
+ "es7.string.trim-right": {
+ "chrome": "66",
+ "opera": "53",
+ "edge": "79",
+ "firefox": "61",
+ "safari": "12",
+ "node": "10",
+ "ios": "12",
+ "samsung": "9",
+ "rhino": "1.7.13",
+ "electron": "3.0"
+ },
+ "es6.typed.array-buffer": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.typed.data-view": {
+ "chrome": "5",
+ "opera": "12",
+ "edge": "12",
+ "firefox": "15",
+ "safari": "5.1",
+ "node": "0.10",
+ "ie": "10",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "es6.typed.int8-array": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.typed.uint8-array": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.typed.uint8-clamped-array": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.typed.int16-array": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.typed.uint16-array": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.typed.int32-array": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.typed.uint32-array": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.typed.float32-array": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.typed.float64-array": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "13",
+ "firefox": "48",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.weak-map": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "15",
+ "firefox": "53",
+ "safari": "9",
+ "node": "6.5",
+ "ios": "9",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "es6.weak-set": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "15",
+ "firefox": "53",
+ "safari": "9",
+ "node": "6.5",
+ "ios": "9",
+ "samsung": "5",
+ "electron": "1.2"
+ }
+}
diff --git a/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json b/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json
new file mode 100644
index 0000000..7ce01ed
--- /dev/null
+++ b/node_modules/@babel/compat-data/data/corejs3-shipped-proposals.json
@@ -0,0 +1,5 @@
+[
+ "esnext.global-this",
+ "esnext.promise.all-settled",
+ "esnext.string.match-all"
+]
diff --git a/node_modules/@babel/compat-data/data/native-modules.json b/node_modules/@babel/compat-data/data/native-modules.json
new file mode 100644
index 0000000..bf63499
--- /dev/null
+++ b/node_modules/@babel/compat-data/data/native-modules.json
@@ -0,0 +1,18 @@
+{
+ "es6.module": {
+ "chrome": "61",
+ "and_chr": "61",
+ "edge": "16",
+ "firefox": "60",
+ "and_ff": "60",
+ "node": "13.2.0",
+ "opera": "48",
+ "op_mob": "48",
+ "safari": "10.1",
+ "ios": "10.3",
+ "samsung": "8.2",
+ "android": "61",
+ "electron": "2.0",
+ "ios_saf": "10.3"
+ }
+}
diff --git a/node_modules/@babel/compat-data/data/overlapping-plugins.json b/node_modules/@babel/compat-data/data/overlapping-plugins.json
new file mode 100644
index 0000000..6ad09e4
--- /dev/null
+++ b/node_modules/@babel/compat-data/data/overlapping-plugins.json
@@ -0,0 +1,22 @@
+{
+ "transform-async-to-generator": [
+ "bugfix/transform-async-arrows-in-class"
+ ],
+ "transform-parameters": [
+ "bugfix/transform-edge-default-parameters",
+ "bugfix/transform-safari-id-destructuring-collision-in-function-expression"
+ ],
+ "transform-function-name": [
+ "bugfix/transform-edge-function-name"
+ ],
+ "transform-block-scoping": [
+ "bugfix/transform-safari-block-shadowing",
+ "bugfix/transform-safari-for-shadowing"
+ ],
+ "transform-template-literals": [
+ "bugfix/transform-tagged-template-caching"
+ ],
+ "proposal-optional-chaining": [
+ "bugfix/transform-v8-spread-parameters-in-optional-chaining"
+ ]
+}
diff --git a/node_modules/@babel/compat-data/data/plugin-bugfixes.json b/node_modules/@babel/compat-data/data/plugin-bugfixes.json
new file mode 100644
index 0000000..7fb7f17
--- /dev/null
+++ b/node_modules/@babel/compat-data/data/plugin-bugfixes.json
@@ -0,0 +1,157 @@
+{
+ "transform-async-to-generator": {
+ "chrome": "55",
+ "opera": "42",
+ "edge": "15",
+ "firefox": "52",
+ "safari": "10.1",
+ "node": "7.6",
+ "ios": "10.3",
+ "samsung": "6",
+ "electron": "1.6"
+ },
+ "bugfix/transform-async-arrows-in-class": {
+ "chrome": "55",
+ "opera": "42",
+ "edge": "15",
+ "firefox": "52",
+ "safari": "11",
+ "node": "7.6",
+ "ios": "11",
+ "samsung": "6",
+ "electron": "1.6"
+ },
+ "transform-parameters": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "15",
+ "firefox": "53",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "bugfix/transform-edge-default-parameters": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "18",
+ "firefox": "52",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "transform-function-name": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "14",
+ "firefox": "53",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "bugfix/transform-edge-function-name": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "79",
+ "firefox": "53",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "transform-block-scoping": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "14",
+ "firefox": "51",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "bugfix/transform-safari-block-shadowing": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "44",
+ "safari": "11",
+ "node": "6",
+ "ie": "11",
+ "ios": "11",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "bugfix/transform-safari-for-shadowing": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "12",
+ "firefox": "4",
+ "safari": "11",
+ "node": "6",
+ "ie": "11",
+ "ios": "11",
+ "samsung": "5",
+ "rhino": "1.7.13",
+ "electron": "0.37"
+ },
+ "bugfix/transform-safari-id-destructuring-collision-in-function-expression": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "14",
+ "firefox": "2",
+ "node": "6",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "transform-template-literals": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "13",
+ "firefox": "34",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "electron": "0.21"
+ },
+ "bugfix/transform-tagged-template-caching": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "12",
+ "firefox": "34",
+ "safari": "13",
+ "node": "4",
+ "ios": "13",
+ "samsung": "3.4",
+ "rhino": "1.7.14",
+ "electron": "0.21"
+ },
+ "proposal-optional-chaining": {
+ "chrome": "80",
+ "opera": "67",
+ "edge": "80",
+ "firefox": "74",
+ "safari": "13.1",
+ "node": "14",
+ "ios": "13.4",
+ "samsung": "13",
+ "electron": "8.0"
+ },
+ "bugfix/transform-v8-spread-parameters-in-optional-chaining": {
+ "chrome": "91",
+ "opera": "77",
+ "edge": "91",
+ "firefox": "74",
+ "safari": "13.1",
+ "node": "16.9",
+ "ios": "13.4",
+ "electron": "13.0"
+ }
+}
diff --git a/node_modules/@babel/compat-data/data/plugins.json b/node_modules/@babel/compat-data/data/plugins.json
new file mode 100644
index 0000000..b64714c
--- /dev/null
+++ b/node_modules/@babel/compat-data/data/plugins.json
@@ -0,0 +1,477 @@
+{
+ "proposal-class-static-block": {
+ "chrome": "94",
+ "opera": "80",
+ "edge": "94",
+ "firefox": "93",
+ "node": "16.11"
+ },
+ "proposal-private-property-in-object": {
+ "chrome": "91",
+ "opera": "77",
+ "edge": "91",
+ "firefox": "90",
+ "safari": "15",
+ "node": "16.9",
+ "ios": "15",
+ "electron": "13.0"
+ },
+ "proposal-class-properties": {
+ "chrome": "74",
+ "opera": "62",
+ "edge": "79",
+ "firefox": "90",
+ "safari": "14.1",
+ "node": "12",
+ "ios": "15",
+ "samsung": "11",
+ "electron": "6.0"
+ },
+ "proposal-private-methods": {
+ "chrome": "84",
+ "opera": "70",
+ "edge": "84",
+ "firefox": "90",
+ "safari": "15",
+ "node": "14.6",
+ "ios": "15",
+ "samsung": "14",
+ "electron": "10.0"
+ },
+ "proposal-numeric-separator": {
+ "chrome": "75",
+ "opera": "62",
+ "edge": "79",
+ "firefox": "70",
+ "safari": "13",
+ "node": "12.5",
+ "ios": "13",
+ "samsung": "11",
+ "rhino": "1.7.14",
+ "electron": "6.0"
+ },
+ "proposal-logical-assignment-operators": {
+ "chrome": "85",
+ "opera": "71",
+ "edge": "85",
+ "firefox": "79",
+ "safari": "14",
+ "node": "15",
+ "ios": "14",
+ "samsung": "14",
+ "electron": "10.0"
+ },
+ "proposal-nullish-coalescing-operator": {
+ "chrome": "80",
+ "opera": "67",
+ "edge": "80",
+ "firefox": "72",
+ "safari": "13.1",
+ "node": "14",
+ "ios": "13.4",
+ "samsung": "13",
+ "electron": "8.0"
+ },
+ "proposal-optional-chaining": {
+ "chrome": "91",
+ "opera": "77",
+ "edge": "91",
+ "firefox": "74",
+ "safari": "13.1",
+ "node": "16.9",
+ "ios": "13.4",
+ "electron": "13.0"
+ },
+ "proposal-json-strings": {
+ "chrome": "66",
+ "opera": "53",
+ "edge": "79",
+ "firefox": "62",
+ "safari": "12",
+ "node": "10",
+ "ios": "12",
+ "samsung": "9",
+ "rhino": "1.7.14",
+ "electron": "3.0"
+ },
+ "proposal-optional-catch-binding": {
+ "chrome": "66",
+ "opera": "53",
+ "edge": "79",
+ "firefox": "58",
+ "safari": "11.1",
+ "node": "10",
+ "ios": "11.3",
+ "samsung": "9",
+ "electron": "3.0"
+ },
+ "transform-parameters": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "18",
+ "firefox": "53",
+ "node": "6",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "proposal-async-generator-functions": {
+ "chrome": "63",
+ "opera": "50",
+ "edge": "79",
+ "firefox": "57",
+ "safari": "12",
+ "node": "10",
+ "ios": "12",
+ "samsung": "8",
+ "electron": "3.0"
+ },
+ "proposal-object-rest-spread": {
+ "chrome": "60",
+ "opera": "47",
+ "edge": "79",
+ "firefox": "55",
+ "safari": "11.1",
+ "node": "8.3",
+ "ios": "11.3",
+ "samsung": "8",
+ "electron": "2.0"
+ },
+ "transform-dotall-regex": {
+ "chrome": "62",
+ "opera": "49",
+ "edge": "79",
+ "firefox": "78",
+ "safari": "11.1",
+ "node": "8.10",
+ "ios": "11.3",
+ "samsung": "8",
+ "electron": "3.0"
+ },
+ "proposal-unicode-property-regex": {
+ "chrome": "64",
+ "opera": "51",
+ "edge": "79",
+ "firefox": "78",
+ "safari": "11.1",
+ "node": "10",
+ "ios": "11.3",
+ "samsung": "9",
+ "electron": "3.0"
+ },
+ "transform-named-capturing-groups-regex": {
+ "chrome": "64",
+ "opera": "51",
+ "edge": "79",
+ "firefox": "78",
+ "safari": "11.1",
+ "node": "10",
+ "ios": "11.3",
+ "samsung": "9",
+ "electron": "3.0"
+ },
+ "transform-async-to-generator": {
+ "chrome": "55",
+ "opera": "42",
+ "edge": "15",
+ "firefox": "52",
+ "safari": "11",
+ "node": "7.6",
+ "ios": "11",
+ "samsung": "6",
+ "electron": "1.6"
+ },
+ "transform-exponentiation-operator": {
+ "chrome": "52",
+ "opera": "39",
+ "edge": "14",
+ "firefox": "52",
+ "safari": "10.1",
+ "node": "7",
+ "ios": "10.3",
+ "samsung": "6",
+ "rhino": "1.7.14",
+ "electron": "1.3"
+ },
+ "transform-template-literals": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "13",
+ "firefox": "34",
+ "safari": "13",
+ "node": "4",
+ "ios": "13",
+ "samsung": "3.4",
+ "electron": "0.21"
+ },
+ "transform-literals": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "53",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "electron": "0.30"
+ },
+ "transform-function-name": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "79",
+ "firefox": "53",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "transform-arrow-functions": {
+ "chrome": "47",
+ "opera": "34",
+ "edge": "13",
+ "firefox": "43",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "rhino": "1.7.13",
+ "electron": "0.36"
+ },
+ "transform-block-scoped-functions": {
+ "chrome": "41",
+ "opera": "28",
+ "edge": "12",
+ "firefox": "46",
+ "safari": "10",
+ "node": "4",
+ "ie": "11",
+ "ios": "10",
+ "samsung": "3.4",
+ "electron": "0.21"
+ },
+ "transform-classes": {
+ "chrome": "46",
+ "opera": "33",
+ "edge": "13",
+ "firefox": "45",
+ "safari": "10",
+ "node": "5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.36"
+ },
+ "transform-object-super": {
+ "chrome": "46",
+ "opera": "33",
+ "edge": "13",
+ "firefox": "45",
+ "safari": "10",
+ "node": "5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.36"
+ },
+ "transform-shorthand-properties": {
+ "chrome": "43",
+ "opera": "30",
+ "edge": "12",
+ "firefox": "33",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "rhino": "1.7.14",
+ "electron": "0.27"
+ },
+ "transform-duplicate-keys": {
+ "chrome": "42",
+ "opera": "29",
+ "edge": "12",
+ "firefox": "34",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "3.4",
+ "electron": "0.25"
+ },
+ "transform-computed-properties": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "34",
+ "safari": "7.1",
+ "node": "4",
+ "ios": "8",
+ "samsung": "4",
+ "electron": "0.30"
+ },
+ "transform-for-of": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "15",
+ "firefox": "53",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "transform-sticky-regex": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "13",
+ "firefox": "3",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "transform-unicode-escapes": {
+ "chrome": "44",
+ "opera": "31",
+ "edge": "12",
+ "firefox": "53",
+ "safari": "9",
+ "node": "4",
+ "ios": "9",
+ "samsung": "4",
+ "electron": "0.30"
+ },
+ "transform-unicode-regex": {
+ "chrome": "50",
+ "opera": "37",
+ "edge": "13",
+ "firefox": "46",
+ "safari": "12",
+ "node": "6",
+ "ios": "12",
+ "samsung": "5",
+ "electron": "1.1"
+ },
+ "transform-spread": {
+ "chrome": "46",
+ "opera": "33",
+ "edge": "13",
+ "firefox": "45",
+ "safari": "10",
+ "node": "5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.36"
+ },
+ "transform-destructuring": {
+ "chrome": "51",
+ "opera": "38",
+ "edge": "15",
+ "firefox": "53",
+ "safari": "10",
+ "node": "6.5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.2"
+ },
+ "transform-block-scoping": {
+ "chrome": "49",
+ "opera": "36",
+ "edge": "14",
+ "firefox": "51",
+ "safari": "11",
+ "node": "6",
+ "ios": "11",
+ "samsung": "5",
+ "electron": "0.37"
+ },
+ "transform-typeof-symbol": {
+ "chrome": "38",
+ "opera": "25",
+ "edge": "12",
+ "firefox": "36",
+ "safari": "9",
+ "node": "0.12",
+ "ios": "9",
+ "samsung": "3",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "transform-new-target": {
+ "chrome": "46",
+ "opera": "33",
+ "edge": "14",
+ "firefox": "41",
+ "safari": "10",
+ "node": "5",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "0.36"
+ },
+ "transform-regenerator": {
+ "chrome": "50",
+ "opera": "37",
+ "edge": "13",
+ "firefox": "53",
+ "safari": "10",
+ "node": "6",
+ "ios": "10",
+ "samsung": "5",
+ "electron": "1.1"
+ },
+ "transform-member-expression-literals": {
+ "chrome": "7",
+ "opera": "12",
+ "edge": "12",
+ "firefox": "2",
+ "safari": "5.1",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "transform-property-literals": {
+ "chrome": "7",
+ "opera": "12",
+ "edge": "12",
+ "firefox": "2",
+ "safari": "5.1",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "transform-reserved-words": {
+ "chrome": "13",
+ "opera": "10.50",
+ "edge": "12",
+ "firefox": "2",
+ "safari": "3.1",
+ "node": "0.10",
+ "ie": "9",
+ "android": "4.4",
+ "ios": "6",
+ "phantom": "2",
+ "samsung": "1",
+ "rhino": "1.7.13",
+ "electron": "0.20"
+ },
+ "proposal-export-namespace-from": {
+ "chrome": "72",
+ "and_chr": "72",
+ "edge": "79",
+ "firefox": "80",
+ "and_ff": "80",
+ "node": "13.2",
+ "opera": "60",
+ "op_mob": "51",
+ "samsung": "11.0",
+ "android": "72",
+ "electron": "5.0"
+ }
+}
diff --git a/node_modules/@babel/compat-data/native-modules.js b/node_modules/@babel/compat-data/native-modules.js
new file mode 100644
index 0000000..8e97da4
--- /dev/null
+++ b/node_modules/@babel/compat-data/native-modules.js
@@ -0,0 +1 @@
+module.exports = require("./data/native-modules.json");
diff --git a/node_modules/@babel/compat-data/overlapping-plugins.js b/node_modules/@babel/compat-data/overlapping-plugins.js
new file mode 100644
index 0000000..88242e4
--- /dev/null
+++ b/node_modules/@babel/compat-data/overlapping-plugins.js
@@ -0,0 +1 @@
+module.exports = require("./data/overlapping-plugins.json");
diff --git a/node_modules/@babel/compat-data/package.json b/node_modules/@babel/compat-data/package.json
new file mode 100644
index 0000000..a0af97a
--- /dev/null
+++ b/node_modules/@babel/compat-data/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "@babel/compat-data",
+ "version": "7.17.0",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "license": "MIT",
+ "description": "",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-compat-data"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "exports": {
+ "./plugins": "./plugins.js",
+ "./native-modules": "./native-modules.js",
+ "./corejs2-built-ins": "./corejs2-built-ins.js",
+ "./corejs3-shipped-proposals": "./corejs3-shipped-proposals.js",
+ "./overlapping-plugins": "./overlapping-plugins.js",
+ "./plugin-bugfixes": "./plugin-bugfixes.js"
+ },
+ "scripts": {
+ "build-data": "./scripts/download-compat-table.sh && node ./scripts/build-data.js && node ./scripts/build-modules-support.js && node ./scripts/build-bugfixes-targets.js"
+ },
+ "keywords": [
+ "babel",
+ "compat-table",
+ "compat-data"
+ ],
+ "devDependencies": {
+ "@mdn/browser-compat-data": "^4.0.10",
+ "core-js-compat": "^3.20.2",
+ "electron-to-chromium": "^1.3.893"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/compat-data/plugin-bugfixes.js b/node_modules/@babel/compat-data/plugin-bugfixes.js
new file mode 100644
index 0000000..f390181
--- /dev/null
+++ b/node_modules/@babel/compat-data/plugin-bugfixes.js
@@ -0,0 +1 @@
+module.exports = require("./data/plugin-bugfixes.json");
diff --git a/node_modules/@babel/compat-data/plugins.js b/node_modules/@babel/compat-data/plugins.js
new file mode 100644
index 0000000..42646ed
--- /dev/null
+++ b/node_modules/@babel/compat-data/plugins.js
@@ -0,0 +1 @@
+module.exports = require("./data/plugins.json");
diff --git a/node_modules/@babel/core/LICENSE b/node_modules/@babel/core/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/core/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/core/README.md b/node_modules/@babel/core/README.md
new file mode 100644
index 0000000..9b3a950
--- /dev/null
+++ b/node_modules/@babel/core/README.md
@@ -0,0 +1,19 @@
+# @babel/core
+
+> Babel compiler core.
+
+See our website [@babel/core](https://babeljs.io/docs/en/babel-core) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/core
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/core --dev
+```
diff --git a/node_modules/@babel/core/lib/config/cache-contexts.js b/node_modules/@babel/core/lib/config/cache-contexts.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/cache-contexts.js
diff --git a/node_modules/@babel/core/lib/config/caching.js b/node_modules/@babel/core/lib/config/caching.js
new file mode 100644
index 0000000..16c6e9e
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/caching.js
@@ -0,0 +1,325 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.assertSimpleType = assertSimpleType;
+exports.makeStrongCache = makeStrongCache;
+exports.makeStrongCacheSync = makeStrongCacheSync;
+exports.makeWeakCache = makeWeakCache;
+exports.makeWeakCacheSync = makeWeakCacheSync;
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _async = require("../gensync-utils/async");
+
+var _util = require("./util");
+
+const synchronize = gen => {
+ return _gensync()(gen).sync;
+};
+
+function* genTrue() {
+ return true;
+}
+
+function makeWeakCache(handler) {
+ return makeCachedFunction(WeakMap, handler);
+}
+
+function makeWeakCacheSync(handler) {
+ return synchronize(makeWeakCache(handler));
+}
+
+function makeStrongCache(handler) {
+ return makeCachedFunction(Map, handler);
+}
+
+function makeStrongCacheSync(handler) {
+ return synchronize(makeStrongCache(handler));
+}
+
+function makeCachedFunction(CallCache, handler) {
+ const callCacheSync = new CallCache();
+ const callCacheAsync = new CallCache();
+ const futureCache = new CallCache();
+ return function* cachedFunction(arg, data) {
+ const asyncContext = yield* (0, _async.isAsync)();
+ const callCache = asyncContext ? callCacheAsync : callCacheSync;
+ const cached = yield* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data);
+ if (cached.valid) return cached.value;
+ const cache = new CacheConfigurator(data);
+ const handlerResult = handler(arg, cache);
+ let finishLock;
+ let value;
+
+ if ((0, _util.isIterableIterator)(handlerResult)) {
+ const gen = handlerResult;
+ value = yield* (0, _async.onFirstPause)(gen, () => {
+ finishLock = setupAsyncLocks(cache, futureCache, arg);
+ });
+ } else {
+ value = handlerResult;
+ }
+
+ updateFunctionCache(callCache, cache, arg, value);
+
+ if (finishLock) {
+ futureCache.delete(arg);
+ finishLock.release(value);
+ }
+
+ return value;
+ };
+}
+
+function* getCachedValue(cache, arg, data) {
+ const cachedValue = cache.get(arg);
+
+ if (cachedValue) {
+ for (const {
+ value,
+ valid
+ } of cachedValue) {
+ if (yield* valid(data)) return {
+ valid: true,
+ value
+ };
+ }
+ }
+
+ return {
+ valid: false,
+ value: null
+ };
+}
+
+function* getCachedValueOrWait(asyncContext, callCache, futureCache, arg, data) {
+ const cached = yield* getCachedValue(callCache, arg, data);
+
+ if (cached.valid) {
+ return cached;
+ }
+
+ if (asyncContext) {
+ const cached = yield* getCachedValue(futureCache, arg, data);
+
+ if (cached.valid) {
+ const value = yield* (0, _async.waitFor)(cached.value.promise);
+ return {
+ valid: true,
+ value
+ };
+ }
+ }
+
+ return {
+ valid: false,
+ value: null
+ };
+}
+
+function setupAsyncLocks(config, futureCache, arg) {
+ const finishLock = new Lock();
+ updateFunctionCache(futureCache, config, arg, finishLock);
+ return finishLock;
+}
+
+function updateFunctionCache(cache, config, arg, value) {
+ if (!config.configured()) config.forever();
+ let cachedValue = cache.get(arg);
+ config.deactivate();
+
+ switch (config.mode()) {
+ case "forever":
+ cachedValue = [{
+ value,
+ valid: genTrue
+ }];
+ cache.set(arg, cachedValue);
+ break;
+
+ case "invalidate":
+ cachedValue = [{
+ value,
+ valid: config.validator()
+ }];
+ cache.set(arg, cachedValue);
+ break;
+
+ case "valid":
+ if (cachedValue) {
+ cachedValue.push({
+ value,
+ valid: config.validator()
+ });
+ } else {
+ cachedValue = [{
+ value,
+ valid: config.validator()
+ }];
+ cache.set(arg, cachedValue);
+ }
+
+ }
+}
+
+class CacheConfigurator {
+ constructor(data) {
+ this._active = true;
+ this._never = false;
+ this._forever = false;
+ this._invalidate = false;
+ this._configured = false;
+ this._pairs = [];
+ this._data = void 0;
+ this._data = data;
+ }
+
+ simple() {
+ return makeSimpleConfigurator(this);
+ }
+
+ mode() {
+ if (this._never) return "never";
+ if (this._forever) return "forever";
+ if (this._invalidate) return "invalidate";
+ return "valid";
+ }
+
+ forever() {
+ if (!this._active) {
+ throw new Error("Cannot change caching after evaluation has completed.");
+ }
+
+ if (this._never) {
+ throw new Error("Caching has already been configured with .never()");
+ }
+
+ this._forever = true;
+ this._configured = true;
+ }
+
+ never() {
+ if (!this._active) {
+ throw new Error("Cannot change caching after evaluation has completed.");
+ }
+
+ if (this._forever) {
+ throw new Error("Caching has already been configured with .forever()");
+ }
+
+ this._never = true;
+ this._configured = true;
+ }
+
+ using(handler) {
+ if (!this._active) {
+ throw new Error("Cannot change caching after evaluation has completed.");
+ }
+
+ if (this._never || this._forever) {
+ throw new Error("Caching has already been configured with .never or .forever()");
+ }
+
+ this._configured = true;
+ const key = handler(this._data);
+ const fn = (0, _async.maybeAsync)(handler, `You appear to be using an async cache handler, but Babel has been called synchronously`);
+
+ if ((0, _async.isThenable)(key)) {
+ return key.then(key => {
+ this._pairs.push([key, fn]);
+
+ return key;
+ });
+ }
+
+ this._pairs.push([key, fn]);
+
+ return key;
+ }
+
+ invalidate(handler) {
+ this._invalidate = true;
+ return this.using(handler);
+ }
+
+ validator() {
+ const pairs = this._pairs;
+ return function* (data) {
+ for (const [key, fn] of pairs) {
+ if (key !== (yield* fn(data))) return false;
+ }
+
+ return true;
+ };
+ }
+
+ deactivate() {
+ this._active = false;
+ }
+
+ configured() {
+ return this._configured;
+ }
+
+}
+
+function makeSimpleConfigurator(cache) {
+ function cacheFn(val) {
+ if (typeof val === "boolean") {
+ if (val) cache.forever();else cache.never();
+ return;
+ }
+
+ return cache.using(() => assertSimpleType(val()));
+ }
+
+ cacheFn.forever = () => cache.forever();
+
+ cacheFn.never = () => cache.never();
+
+ cacheFn.using = cb => cache.using(() => assertSimpleType(cb()));
+
+ cacheFn.invalidate = cb => cache.invalidate(() => assertSimpleType(cb()));
+
+ return cacheFn;
+}
+
+function assertSimpleType(value) {
+ if ((0, _async.isThenable)(value)) {
+ throw new Error(`You appear to be using an async cache handler, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously handle your caching logic.`);
+ }
+
+ if (value != null && typeof value !== "string" && typeof value !== "boolean" && typeof value !== "number") {
+ throw new Error("Cache keys must be either string, boolean, number, null, or undefined.");
+ }
+
+ return value;
+}
+
+class Lock {
+ constructor() {
+ this.released = false;
+ this.promise = void 0;
+ this._resolve = void 0;
+ this.promise = new Promise(resolve => {
+ this._resolve = resolve;
+ });
+ }
+
+ release(value) {
+ this.released = true;
+
+ this._resolve(value);
+ }
+
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/config-chain.js b/node_modules/@babel/core/lib/config/config-chain.js
new file mode 100644
index 0000000..aa5c5f2
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/config-chain.js
@@ -0,0 +1,564 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.buildPresetChain = buildPresetChain;
+exports.buildPresetChainWalker = void 0;
+exports.buildRootChain = buildRootChain;
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _debug() {
+ const data = require("debug");
+
+ _debug = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _options = require("./validation/options");
+
+var _patternToRegex = require("./pattern-to-regex");
+
+var _printer = require("./printer");
+
+var _files = require("./files");
+
+var _caching = require("./caching");
+
+var _configDescriptors = require("./config-descriptors");
+
+const debug = _debug()("babel:config:config-chain");
+
+function* buildPresetChain(arg, context) {
+ const chain = yield* buildPresetChainWalker(arg, context);
+ if (!chain) return null;
+ return {
+ plugins: dedupDescriptors(chain.plugins),
+ presets: dedupDescriptors(chain.presets),
+ options: chain.options.map(o => normalizeOptions(o)),
+ files: new Set()
+ };
+}
+
+const buildPresetChainWalker = makeChainWalker({
+ root: preset => loadPresetDescriptors(preset),
+ env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName),
+ overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index),
+ overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName),
+ createLogger: () => () => {}
+});
+exports.buildPresetChainWalker = buildPresetChainWalker;
+const loadPresetDescriptors = (0, _caching.makeWeakCacheSync)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors));
+const loadPresetEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName)));
+const loadPresetOverridesDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index)));
+const loadPresetOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => (0, _caching.makeStrongCacheSync)(envName => buildOverrideEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index, envName))));
+
+function* buildRootChain(opts, context) {
+ let configReport, babelRcReport;
+ const programmaticLogger = new _printer.ConfigPrinter();
+ const programmaticChain = yield* loadProgrammaticChain({
+ options: opts,
+ dirname: context.cwd
+ }, context, undefined, programmaticLogger);
+ if (!programmaticChain) return null;
+ const programmaticReport = yield* programmaticLogger.output();
+ let configFile;
+
+ if (typeof opts.configFile === "string") {
+ configFile = yield* (0, _files.loadConfig)(opts.configFile, context.cwd, context.envName, context.caller);
+ } else if (opts.configFile !== false) {
+ configFile = yield* (0, _files.findRootConfig)(context.root, context.envName, context.caller);
+ }
+
+ let {
+ babelrc,
+ babelrcRoots
+ } = opts;
+ let babelrcRootsDirectory = context.cwd;
+ const configFileChain = emptyChain();
+ const configFileLogger = new _printer.ConfigPrinter();
+
+ if (configFile) {
+ const validatedFile = validateConfigFile(configFile);
+ const result = yield* loadFileChain(validatedFile, context, undefined, configFileLogger);
+ if (!result) return null;
+ configReport = yield* configFileLogger.output();
+
+ if (babelrc === undefined) {
+ babelrc = validatedFile.options.babelrc;
+ }
+
+ if (babelrcRoots === undefined) {
+ babelrcRootsDirectory = validatedFile.dirname;
+ babelrcRoots = validatedFile.options.babelrcRoots;
+ }
+
+ mergeChain(configFileChain, result);
+ }
+
+ let ignoreFile, babelrcFile;
+ let isIgnored = false;
+ const fileChain = emptyChain();
+
+ if ((babelrc === true || babelrc === undefined) && typeof context.filename === "string") {
+ const pkgData = yield* (0, _files.findPackageData)(context.filename);
+
+ if (pkgData && babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory)) {
+ ({
+ ignore: ignoreFile,
+ config: babelrcFile
+ } = yield* (0, _files.findRelativeConfig)(pkgData, context.envName, context.caller));
+
+ if (ignoreFile) {
+ fileChain.files.add(ignoreFile.filepath);
+ }
+
+ if (ignoreFile && shouldIgnore(context, ignoreFile.ignore, null, ignoreFile.dirname)) {
+ isIgnored = true;
+ }
+
+ if (babelrcFile && !isIgnored) {
+ const validatedFile = validateBabelrcFile(babelrcFile);
+ const babelrcLogger = new _printer.ConfigPrinter();
+ const result = yield* loadFileChain(validatedFile, context, undefined, babelrcLogger);
+
+ if (!result) {
+ isIgnored = true;
+ } else {
+ babelRcReport = yield* babelrcLogger.output();
+ mergeChain(fileChain, result);
+ }
+ }
+
+ if (babelrcFile && isIgnored) {
+ fileChain.files.add(babelrcFile.filepath);
+ }
+ }
+ }
+
+ if (context.showConfig) {
+ console.log(`Babel configs on "${context.filename}" (ascending priority):\n` + [configReport, babelRcReport, programmaticReport].filter(x => !!x).join("\n\n") + "\n-----End Babel configs-----");
+ }
+
+ const chain = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain);
+ return {
+ plugins: isIgnored ? [] : dedupDescriptors(chain.plugins),
+ presets: isIgnored ? [] : dedupDescriptors(chain.presets),
+ options: isIgnored ? [] : chain.options.map(o => normalizeOptions(o)),
+ fileHandling: isIgnored ? "ignored" : "transpile",
+ ignore: ignoreFile || undefined,
+ babelrc: babelrcFile || undefined,
+ config: configFile || undefined,
+ files: chain.files
+ };
+}
+
+function babelrcLoadEnabled(context, pkgData, babelrcRoots, babelrcRootsDirectory) {
+ if (typeof babelrcRoots === "boolean") return babelrcRoots;
+ const absoluteRoot = context.root;
+
+ if (babelrcRoots === undefined) {
+ return pkgData.directories.indexOf(absoluteRoot) !== -1;
+ }
+
+ let babelrcPatterns = babelrcRoots;
+
+ if (!Array.isArray(babelrcPatterns)) {
+ babelrcPatterns = [babelrcPatterns];
+ }
+
+ babelrcPatterns = babelrcPatterns.map(pat => {
+ return typeof pat === "string" ? _path().resolve(babelrcRootsDirectory, pat) : pat;
+ });
+
+ if (babelrcPatterns.length === 1 && babelrcPatterns[0] === absoluteRoot) {
+ return pkgData.directories.indexOf(absoluteRoot) !== -1;
+ }
+
+ return babelrcPatterns.some(pat => {
+ if (typeof pat === "string") {
+ pat = (0, _patternToRegex.default)(pat, babelrcRootsDirectory);
+ }
+
+ return pkgData.directories.some(directory => {
+ return matchPattern(pat, babelrcRootsDirectory, directory, context);
+ });
+ });
+}
+
+const validateConfigFile = (0, _caching.makeWeakCacheSync)(file => ({
+ filepath: file.filepath,
+ dirname: file.dirname,
+ options: (0, _options.validate)("configfile", file.options)
+}));
+const validateBabelrcFile = (0, _caching.makeWeakCacheSync)(file => ({
+ filepath: file.filepath,
+ dirname: file.dirname,
+ options: (0, _options.validate)("babelrcfile", file.options)
+}));
+const validateExtendFile = (0, _caching.makeWeakCacheSync)(file => ({
+ filepath: file.filepath,
+ dirname: file.dirname,
+ options: (0, _options.validate)("extendsfile", file.options)
+}));
+const loadProgrammaticChain = makeChainWalker({
+ root: input => buildRootDescriptors(input, "base", _configDescriptors.createCachedDescriptors),
+ env: (input, envName) => buildEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, envName),
+ overrides: (input, index) => buildOverrideDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index),
+ overridesEnv: (input, index, envName) => buildOverrideEnvDescriptors(input, "base", _configDescriptors.createCachedDescriptors, index, envName),
+ createLogger: (input, context, baseLogger) => buildProgrammaticLogger(input, context, baseLogger)
+});
+const loadFileChainWalker = makeChainWalker({
+ root: file => loadFileDescriptors(file),
+ env: (file, envName) => loadFileEnvDescriptors(file)(envName),
+ overrides: (file, index) => loadFileOverridesDescriptors(file)(index),
+ overridesEnv: (file, index, envName) => loadFileOverridesEnvDescriptors(file)(index)(envName),
+ createLogger: (file, context, baseLogger) => buildFileLogger(file.filepath, context, baseLogger)
+});
+
+function* loadFileChain(input, context, files, baseLogger) {
+ const chain = yield* loadFileChainWalker(input, context, files, baseLogger);
+
+ if (chain) {
+ chain.files.add(input.filepath);
+ }
+
+ return chain;
+}
+
+const loadFileDescriptors = (0, _caching.makeWeakCacheSync)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors));
+const loadFileEnvDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, envName)));
+const loadFileOverridesDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index)));
+const loadFileOverridesEnvDescriptors = (0, _caching.makeWeakCacheSync)(file => (0, _caching.makeStrongCacheSync)(index => (0, _caching.makeStrongCacheSync)(envName => buildOverrideEnvDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors, index, envName))));
+
+function buildFileLogger(filepath, context, baseLogger) {
+ if (!baseLogger) {
+ return () => {};
+ }
+
+ return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Config, {
+ filepath
+ });
+}
+
+function buildRootDescriptors({
+ dirname,
+ options
+}, alias, descriptors) {
+ return descriptors(dirname, options, alias);
+}
+
+function buildProgrammaticLogger(_, context, baseLogger) {
+ var _context$caller;
+
+ if (!baseLogger) {
+ return () => {};
+ }
+
+ return baseLogger.configure(context.showConfig, _printer.ChainFormatter.Programmatic, {
+ callerName: (_context$caller = context.caller) == null ? void 0 : _context$caller.name
+ });
+}
+
+function buildEnvDescriptors({
+ dirname,
+ options
+}, alias, descriptors, envName) {
+ const opts = options.env && options.env[envName];
+ return opts ? descriptors(dirname, opts, `${alias}.env["${envName}"]`) : null;
+}
+
+function buildOverrideDescriptors({
+ dirname,
+ options
+}, alias, descriptors, index) {
+ const opts = options.overrides && options.overrides[index];
+ if (!opts) throw new Error("Assertion failure - missing override");
+ return descriptors(dirname, opts, `${alias}.overrides[${index}]`);
+}
+
+function buildOverrideEnvDescriptors({
+ dirname,
+ options
+}, alias, descriptors, index, envName) {
+ const override = options.overrides && options.overrides[index];
+ if (!override) throw new Error("Assertion failure - missing override");
+ const opts = override.env && override.env[envName];
+ return opts ? descriptors(dirname, opts, `${alias}.overrides[${index}].env["${envName}"]`) : null;
+}
+
+function makeChainWalker({
+ root,
+ env,
+ overrides,
+ overridesEnv,
+ createLogger
+}) {
+ return function* (input, context, files = new Set(), baseLogger) {
+ const {
+ dirname
+ } = input;
+ const flattenedConfigs = [];
+ const rootOpts = root(input);
+
+ if (configIsApplicable(rootOpts, dirname, context)) {
+ flattenedConfigs.push({
+ config: rootOpts,
+ envName: undefined,
+ index: undefined
+ });
+ const envOpts = env(input, context.envName);
+
+ if (envOpts && configIsApplicable(envOpts, dirname, context)) {
+ flattenedConfigs.push({
+ config: envOpts,
+ envName: context.envName,
+ index: undefined
+ });
+ }
+
+ (rootOpts.options.overrides || []).forEach((_, index) => {
+ const overrideOps = overrides(input, index);
+
+ if (configIsApplicable(overrideOps, dirname, context)) {
+ flattenedConfigs.push({
+ config: overrideOps,
+ index,
+ envName: undefined
+ });
+ const overrideEnvOpts = overridesEnv(input, index, context.envName);
+
+ if (overrideEnvOpts && configIsApplicable(overrideEnvOpts, dirname, context)) {
+ flattenedConfigs.push({
+ config: overrideEnvOpts,
+ index,
+ envName: context.envName
+ });
+ }
+ }
+ });
+ }
+
+ if (flattenedConfigs.some(({
+ config: {
+ options: {
+ ignore,
+ only
+ }
+ }
+ }) => shouldIgnore(context, ignore, only, dirname))) {
+ return null;
+ }
+
+ const chain = emptyChain();
+ const logger = createLogger(input, context, baseLogger);
+
+ for (const {
+ config,
+ index,
+ envName
+ } of flattenedConfigs) {
+ if (!(yield* mergeExtendsChain(chain, config.options, dirname, context, files, baseLogger))) {
+ return null;
+ }
+
+ logger(config, index, envName);
+ yield* mergeChainOpts(chain, config);
+ }
+
+ return chain;
+ };
+}
+
+function* mergeExtendsChain(chain, opts, dirname, context, files, baseLogger) {
+ if (opts.extends === undefined) return true;
+ const file = yield* (0, _files.loadConfig)(opts.extends, dirname, context.envName, context.caller);
+
+ if (files.has(file)) {
+ throw new Error(`Configuration cycle detected loading ${file.filepath}.\n` + `File already loaded following the config chain:\n` + Array.from(files, file => ` - ${file.filepath}`).join("\n"));
+ }
+
+ files.add(file);
+ const fileChain = yield* loadFileChain(validateExtendFile(file), context, files, baseLogger);
+ files.delete(file);
+ if (!fileChain) return false;
+ mergeChain(chain, fileChain);
+ return true;
+}
+
+function mergeChain(target, source) {
+ target.options.push(...source.options);
+ target.plugins.push(...source.plugins);
+ target.presets.push(...source.presets);
+
+ for (const file of source.files) {
+ target.files.add(file);
+ }
+
+ return target;
+}
+
+function* mergeChainOpts(target, {
+ options,
+ plugins,
+ presets
+}) {
+ target.options.push(options);
+ target.plugins.push(...(yield* plugins()));
+ target.presets.push(...(yield* presets()));
+ return target;
+}
+
+function emptyChain() {
+ return {
+ options: [],
+ presets: [],
+ plugins: [],
+ files: new Set()
+ };
+}
+
+function normalizeOptions(opts) {
+ const options = Object.assign({}, opts);
+ delete options.extends;
+ delete options.env;
+ delete options.overrides;
+ delete options.plugins;
+ delete options.presets;
+ delete options.passPerPreset;
+ delete options.ignore;
+ delete options.only;
+ delete options.test;
+ delete options.include;
+ delete options.exclude;
+
+ if (Object.prototype.hasOwnProperty.call(options, "sourceMap")) {
+ options.sourceMaps = options.sourceMap;
+ delete options.sourceMap;
+ }
+
+ return options;
+}
+
+function dedupDescriptors(items) {
+ const map = new Map();
+ const descriptors = [];
+
+ for (const item of items) {
+ if (typeof item.value === "function") {
+ const fnKey = item.value;
+ let nameMap = map.get(fnKey);
+
+ if (!nameMap) {
+ nameMap = new Map();
+ map.set(fnKey, nameMap);
+ }
+
+ let desc = nameMap.get(item.name);
+
+ if (!desc) {
+ desc = {
+ value: item
+ };
+ descriptors.push(desc);
+ if (!item.ownPass) nameMap.set(item.name, desc);
+ } else {
+ desc.value = item;
+ }
+ } else {
+ descriptors.push({
+ value: item
+ });
+ }
+ }
+
+ return descriptors.reduce((acc, desc) => {
+ acc.push(desc.value);
+ return acc;
+ }, []);
+}
+
+function configIsApplicable({
+ options
+}, dirname, context) {
+ return (options.test === undefined || configFieldIsApplicable(context, options.test, dirname)) && (options.include === undefined || configFieldIsApplicable(context, options.include, dirname)) && (options.exclude === undefined || !configFieldIsApplicable(context, options.exclude, dirname));
+}
+
+function configFieldIsApplicable(context, test, dirname) {
+ const patterns = Array.isArray(test) ? test : [test];
+ return matchesPatterns(context, patterns, dirname);
+}
+
+function ignoreListReplacer(_key, value) {
+ if (value instanceof RegExp) {
+ return String(value);
+ }
+
+ return value;
+}
+
+function shouldIgnore(context, ignore, only, dirname) {
+ if (ignore && matchesPatterns(context, ignore, dirname)) {
+ var _context$filename;
+
+ const message = `No config is applied to "${(_context$filename = context.filename) != null ? _context$filename : "(unknown)"}" because it matches one of \`ignore: ${JSON.stringify(ignore, ignoreListReplacer)}\` from "${dirname}"`;
+ debug(message);
+
+ if (context.showConfig) {
+ console.log(message);
+ }
+
+ return true;
+ }
+
+ if (only && !matchesPatterns(context, only, dirname)) {
+ var _context$filename2;
+
+ const message = `No config is applied to "${(_context$filename2 = context.filename) != null ? _context$filename2 : "(unknown)"}" because it fails to match one of \`only: ${JSON.stringify(only, ignoreListReplacer)}\` from "${dirname}"`;
+ debug(message);
+
+ if (context.showConfig) {
+ console.log(message);
+ }
+
+ return true;
+ }
+
+ return false;
+}
+
+function matchesPatterns(context, patterns, dirname) {
+ return patterns.some(pattern => matchPattern(pattern, dirname, context.filename, context));
+}
+
+function matchPattern(pattern, dirname, pathToTest, context) {
+ if (typeof pattern === "function") {
+ return !!pattern(pathToTest, {
+ dirname,
+ envName: context.envName,
+ caller: context.caller
+ });
+ }
+
+ if (typeof pathToTest !== "string") {
+ throw new Error(`Configuration contains string/RegExp pattern, but no filename was passed to Babel`);
+ }
+
+ if (typeof pattern === "string") {
+ pattern = (0, _patternToRegex.default)(pattern, dirname);
+ }
+
+ return pattern.test(pathToTest);
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/config-descriptors.js b/node_modules/@babel/core/lib/config/config-descriptors.js
new file mode 100644
index 0000000..2f0a7a5
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/config-descriptors.js
@@ -0,0 +1,244 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.createCachedDescriptors = createCachedDescriptors;
+exports.createDescriptor = createDescriptor;
+exports.createUncachedDescriptors = createUncachedDescriptors;
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _files = require("./files");
+
+var _item = require("./item");
+
+var _caching = require("./caching");
+
+var _resolveTargets = require("./resolve-targets");
+
+function isEqualDescriptor(a, b) {
+ return a.name === b.name && a.value === b.value && a.options === b.options && a.dirname === b.dirname && a.alias === b.alias && a.ownPass === b.ownPass && (a.file && a.file.request) === (b.file && b.file.request) && (a.file && a.file.resolved) === (b.file && b.file.resolved);
+}
+
+function* handlerOf(value) {
+ return value;
+}
+
+function optionsWithResolvedBrowserslistConfigFile(options, dirname) {
+ if (typeof options.browserslistConfigFile === "string") {
+ options.browserslistConfigFile = (0, _resolveTargets.resolveBrowserslistConfigFile)(options.browserslistConfigFile, dirname);
+ }
+
+ return options;
+}
+
+function createCachedDescriptors(dirname, options, alias) {
+ const {
+ plugins,
+ presets,
+ passPerPreset
+ } = options;
+ return {
+ options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
+ plugins: plugins ? () => createCachedPluginDescriptors(plugins, dirname)(alias) : () => handlerOf([]),
+ presets: presets ? () => createCachedPresetDescriptors(presets, dirname)(alias)(!!passPerPreset) : () => handlerOf([])
+ };
+}
+
+function createUncachedDescriptors(dirname, options, alias) {
+ let plugins;
+ let presets;
+ return {
+ options: optionsWithResolvedBrowserslistConfigFile(options, dirname),
+
+ *plugins() {
+ if (!plugins) {
+ plugins = yield* createPluginDescriptors(options.plugins || [], dirname, alias);
+ }
+
+ return plugins;
+ },
+
+ *presets() {
+ if (!presets) {
+ presets = yield* createPresetDescriptors(options.presets || [], dirname, alias, !!options.passPerPreset);
+ }
+
+ return presets;
+ }
+
+ };
+}
+
+const PRESET_DESCRIPTOR_CACHE = new WeakMap();
+const createCachedPresetDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => {
+ const dirname = cache.using(dir => dir);
+ return (0, _caching.makeStrongCacheSync)(alias => (0, _caching.makeStrongCache)(function* (passPerPreset) {
+ const descriptors = yield* createPresetDescriptors(items, dirname, alias, passPerPreset);
+ return descriptors.map(desc => loadCachedDescriptor(PRESET_DESCRIPTOR_CACHE, desc));
+ }));
+});
+const PLUGIN_DESCRIPTOR_CACHE = new WeakMap();
+const createCachedPluginDescriptors = (0, _caching.makeWeakCacheSync)((items, cache) => {
+ const dirname = cache.using(dir => dir);
+ return (0, _caching.makeStrongCache)(function* (alias) {
+ const descriptors = yield* createPluginDescriptors(items, dirname, alias);
+ return descriptors.map(desc => loadCachedDescriptor(PLUGIN_DESCRIPTOR_CACHE, desc));
+ });
+});
+const DEFAULT_OPTIONS = {};
+
+function loadCachedDescriptor(cache, desc) {
+ const {
+ value,
+ options = DEFAULT_OPTIONS
+ } = desc;
+ if (options === false) return desc;
+ let cacheByOptions = cache.get(value);
+
+ if (!cacheByOptions) {
+ cacheByOptions = new WeakMap();
+ cache.set(value, cacheByOptions);
+ }
+
+ let possibilities = cacheByOptions.get(options);
+
+ if (!possibilities) {
+ possibilities = [];
+ cacheByOptions.set(options, possibilities);
+ }
+
+ if (possibilities.indexOf(desc) === -1) {
+ const matches = possibilities.filter(possibility => isEqualDescriptor(possibility, desc));
+
+ if (matches.length > 0) {
+ return matches[0];
+ }
+
+ possibilities.push(desc);
+ }
+
+ return desc;
+}
+
+function* createPresetDescriptors(items, dirname, alias, passPerPreset) {
+ return yield* createDescriptors("preset", items, dirname, alias, passPerPreset);
+}
+
+function* createPluginDescriptors(items, dirname, alias) {
+ return yield* createDescriptors("plugin", items, dirname, alias);
+}
+
+function* createDescriptors(type, items, dirname, alias, ownPass) {
+ const descriptors = yield* _gensync().all(items.map((item, index) => createDescriptor(item, dirname, {
+ type,
+ alias: `${alias}$${index}`,
+ ownPass: !!ownPass
+ })));
+ assertNoDuplicates(descriptors);
+ return descriptors;
+}
+
+function* createDescriptor(pair, dirname, {
+ type,
+ alias,
+ ownPass
+}) {
+ const desc = (0, _item.getItemDescriptor)(pair);
+
+ if (desc) {
+ return desc;
+ }
+
+ let name;
+ let options;
+ let value = pair;
+
+ if (Array.isArray(value)) {
+ if (value.length === 3) {
+ [value, options, name] = value;
+ } else {
+ [value, options] = value;
+ }
+ }
+
+ let file = undefined;
+ let filepath = null;
+
+ if (typeof value === "string") {
+ if (typeof type !== "string") {
+ throw new Error("To resolve a string-based item, the type of item must be given");
+ }
+
+ const resolver = type === "plugin" ? _files.loadPlugin : _files.loadPreset;
+ const request = value;
+ ({
+ filepath,
+ value
+ } = yield* resolver(value, dirname));
+ file = {
+ request,
+ resolved: filepath
+ };
+ }
+
+ if (!value) {
+ throw new Error(`Unexpected falsy value: ${String(value)}`);
+ }
+
+ if (typeof value === "object" && value.__esModule) {
+ if (value.default) {
+ value = value.default;
+ } else {
+ throw new Error("Must export a default export when using ES6 modules.");
+ }
+ }
+
+ if (typeof value !== "object" && typeof value !== "function") {
+ throw new Error(`Unsupported format: ${typeof value}. Expected an object or a function.`);
+ }
+
+ if (filepath !== null && typeof value === "object" && value) {
+ throw new Error(`Plugin/Preset files are not allowed to export objects, only functions. In ${filepath}`);
+ }
+
+ return {
+ name,
+ alias: filepath || alias,
+ value,
+ options,
+ dirname,
+ ownPass,
+ file
+ };
+}
+
+function assertNoDuplicates(items) {
+ const map = new Map();
+
+ for (const item of items) {
+ if (typeof item.value !== "function") continue;
+ let nameMap = map.get(item.value);
+
+ if (!nameMap) {
+ nameMap = new Set();
+ map.set(item.value, nameMap);
+ }
+
+ if (nameMap.has(item.name)) {
+ const conflicts = items.filter(i => i.value === item.value);
+ throw new Error([`Duplicate plugin/preset detected.`, `If you'd like to use two separate instances of a plugin,`, `they need separate names, e.g.`, ``, ` plugins: [`, ` ['some-plugin', {}],`, ` ['some-plugin', {}, 'some unique name'],`, ` ]`, ``, `Duplicates detected are:`, `${JSON.stringify(conflicts, null, 2)}`].join("\n"));
+ }
+
+ nameMap.add(item.name);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/files/configuration.js b/node_modules/@babel/core/lib/config/files/configuration.js
new file mode 100644
index 0000000..f6cbf0c
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/files/configuration.js
@@ -0,0 +1,358 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ROOT_CONFIG_FILENAMES = void 0;
+exports.findConfigUpwards = findConfigUpwards;
+exports.findRelativeConfig = findRelativeConfig;
+exports.findRootConfig = findRootConfig;
+exports.loadConfig = loadConfig;
+exports.resolveShowConfigPath = resolveShowConfigPath;
+
+function _debug() {
+ const data = require("debug");
+
+ _debug = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _fs() {
+ const data = require("fs");
+
+ _fs = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _json() {
+ const data = require("json5");
+
+ _json = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _caching = require("../caching");
+
+var _configApi = require("../helpers/config-api");
+
+var _utils = require("./utils");
+
+var _moduleTypes = require("./module-types");
+
+var _patternToRegex = require("../pattern-to-regex");
+
+var fs = require("../../gensync-utils/fs");
+
+function _module() {
+ const data = require("module");
+
+ _module = function () {
+ return data;
+ };
+
+ return data;
+}
+
+const debug = _debug()("babel:config:loading:files:configuration");
+
+const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json"];
+exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES;
+const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json"];
+const BABELIGNORE_FILENAME = ".babelignore";
+
+function findConfigUpwards(rootDir) {
+ let dirname = rootDir;
+
+ for (;;) {
+ for (const filename of ROOT_CONFIG_FILENAMES) {
+ if (_fs().existsSync(_path().join(dirname, filename))) {
+ return dirname;
+ }
+ }
+
+ const nextDir = _path().dirname(dirname);
+
+ if (dirname === nextDir) break;
+ dirname = nextDir;
+ }
+
+ return null;
+}
+
+function* findRelativeConfig(packageData, envName, caller) {
+ let config = null;
+ let ignore = null;
+
+ const dirname = _path().dirname(packageData.filepath);
+
+ for (const loc of packageData.directories) {
+ if (!config) {
+ var _packageData$pkg;
+
+ config = yield* loadOneConfig(RELATIVE_CONFIG_FILENAMES, loc, envName, caller, ((_packageData$pkg = packageData.pkg) == null ? void 0 : _packageData$pkg.dirname) === loc ? packageToBabelConfig(packageData.pkg) : null);
+ }
+
+ if (!ignore) {
+ const ignoreLoc = _path().join(loc, BABELIGNORE_FILENAME);
+
+ ignore = yield* readIgnoreConfig(ignoreLoc);
+
+ if (ignore) {
+ debug("Found ignore %o from %o.", ignore.filepath, dirname);
+ }
+ }
+ }
+
+ return {
+ config,
+ ignore
+ };
+}
+
+function findRootConfig(dirname, envName, caller) {
+ return loadOneConfig(ROOT_CONFIG_FILENAMES, dirname, envName, caller);
+}
+
+function* loadOneConfig(names, dirname, envName, caller, previousConfig = null) {
+ const configs = yield* _gensync().all(names.map(filename => readConfig(_path().join(dirname, filename), envName, caller)));
+ const config = configs.reduce((previousConfig, config) => {
+ if (config && previousConfig) {
+ throw new Error(`Multiple configuration files found. Please remove one:\n` + ` - ${_path().basename(previousConfig.filepath)}\n` + ` - ${config.filepath}\n` + `from ${dirname}`);
+ }
+
+ return config || previousConfig;
+ }, previousConfig);
+
+ if (config) {
+ debug("Found configuration %o from %o.", config.filepath, dirname);
+ }
+
+ return config;
+}
+
+function* loadConfig(name, dirname, envName, caller) {
+ const filepath = (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, {
+ paths: [b]
+ }, M = require("module")) => {
+ let f = M._findPath(r, M._nodeModulePaths(b).concat(b));
+
+ if (f) return f;
+ f = new Error(`Cannot resolve module '${r}'`);
+ f.code = "MODULE_NOT_FOUND";
+ throw f;
+ })(name, {
+ paths: [dirname]
+ });
+ const conf = yield* readConfig(filepath, envName, caller);
+
+ if (!conf) {
+ throw new Error(`Config file ${filepath} contains no configuration data`);
+ }
+
+ debug("Loaded config %o from %o.", name, dirname);
+ return conf;
+}
+
+function readConfig(filepath, envName, caller) {
+ const ext = _path().extname(filepath);
+
+ return ext === ".js" || ext === ".cjs" || ext === ".mjs" ? readConfigJS(filepath, {
+ envName,
+ caller
+ }) : readConfigJSON5(filepath);
+}
+
+const LOADING_CONFIGS = new Set();
+const readConfigJS = (0, _caching.makeStrongCache)(function* readConfigJS(filepath, cache) {
+ if (!_fs().existsSync(filepath)) {
+ cache.never();
+ return null;
+ }
+
+ if (LOADING_CONFIGS.has(filepath)) {
+ cache.never();
+ debug("Auto-ignoring usage of config %o.", filepath);
+ return {
+ filepath,
+ dirname: _path().dirname(filepath),
+ options: {}
+ };
+ }
+
+ let options;
+
+ try {
+ LOADING_CONFIGS.add(filepath);
+ options = yield* (0, _moduleTypes.default)(filepath, "You appear to be using a native ECMAScript module configuration " + "file, which is only supported when running Babel asynchronously.");
+ } catch (err) {
+ err.message = `${filepath}: Error while loading config - ${err.message}`;
+ throw err;
+ } finally {
+ LOADING_CONFIGS.delete(filepath);
+ }
+
+ let assertCache = false;
+
+ if (typeof options === "function") {
+ yield* [];
+ options = options((0, _configApi.makeConfigAPI)(cache));
+ assertCache = true;
+ }
+
+ if (!options || typeof options !== "object" || Array.isArray(options)) {
+ throw new Error(`${filepath}: Configuration should be an exported JavaScript object.`);
+ }
+
+ if (typeof options.then === "function") {
+ throw new Error(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`);
+ }
+
+ if (assertCache && !cache.configured()) throwConfigError();
+ return {
+ filepath,
+ dirname: _path().dirname(filepath),
+ options
+ };
+});
+const packageToBabelConfig = (0, _caching.makeWeakCacheSync)(file => {
+ const babel = file.options["babel"];
+ if (typeof babel === "undefined") return null;
+
+ if (typeof babel !== "object" || Array.isArray(babel) || babel === null) {
+ throw new Error(`${file.filepath}: .babel property must be an object`);
+ }
+
+ return {
+ filepath: file.filepath,
+ dirname: file.dirname,
+ options: babel
+ };
+});
+const readConfigJSON5 = (0, _utils.makeStaticFileCache)((filepath, content) => {
+ let options;
+
+ try {
+ options = _json().parse(content);
+ } catch (err) {
+ err.message = `${filepath}: Error while parsing config - ${err.message}`;
+ throw err;
+ }
+
+ if (!options) throw new Error(`${filepath}: No config detected`);
+
+ if (typeof options !== "object") {
+ throw new Error(`${filepath}: Config returned typeof ${typeof options}`);
+ }
+
+ if (Array.isArray(options)) {
+ throw new Error(`${filepath}: Expected config object but found array`);
+ }
+
+ delete options["$schema"];
+ return {
+ filepath,
+ dirname: _path().dirname(filepath),
+ options
+ };
+});
+const readIgnoreConfig = (0, _utils.makeStaticFileCache)((filepath, content) => {
+ const ignoreDir = _path().dirname(filepath);
+
+ const ignorePatterns = content.split("\n").map(line => line.replace(/#(.*?)$/, "").trim()).filter(line => !!line);
+
+ for (const pattern of ignorePatterns) {
+ if (pattern[0] === "!") {
+ throw new Error(`Negation of file paths is not supported.`);
+ }
+ }
+
+ return {
+ filepath,
+ dirname: _path().dirname(filepath),
+ ignore: ignorePatterns.map(pattern => (0, _patternToRegex.default)(pattern, ignoreDir))
+ };
+});
+
+function* resolveShowConfigPath(dirname) {
+ const targetPath = process.env.BABEL_SHOW_CONFIG_FOR;
+
+ if (targetPath != null) {
+ const absolutePath = _path().resolve(dirname, targetPath);
+
+ const stats = yield* fs.stat(absolutePath);
+
+ if (!stats.isFile()) {
+ throw new Error(`${absolutePath}: BABEL_SHOW_CONFIG_FOR must refer to a regular file, directories are not supported.`);
+ }
+
+ return absolutePath;
+ }
+
+ return null;
+}
+
+function throwConfigError() {
+ throw new Error(`\
+Caching was left unconfigured. Babel's plugins, presets, and .babelrc.js files can be configured
+for various types of caching, using the first param of their handler functions:
+
+module.exports = function(api) {
+ // The API exposes the following:
+
+ // Cache the returned value forever and don't call this function again.
+ api.cache(true);
+
+ // Don't cache at all. Not recommended because it will be very slow.
+ api.cache(false);
+
+ // Cached based on the value of some function. If this function returns a value different from
+ // a previously-encountered value, the plugins will re-evaluate.
+ var env = api.cache(() => process.env.NODE_ENV);
+
+ // If testing for a specific env, we recommend specifics to avoid instantiating a plugin for
+ // any possible NODE_ENV value that might come up during plugin execution.
+ var isProd = api.cache(() => process.env.NODE_ENV === "production");
+
+ // .cache(fn) will perform a linear search though instances to find the matching plugin based
+ // based on previous instantiated plugins. If you want to recreate the plugin and discard the
+ // previous instance whenever something changes, you may use:
+ var isProd = api.cache.invalidate(() => process.env.NODE_ENV === "production");
+
+ // Note, we also expose the following more-verbose versions of the above examples:
+ api.cache.forever(); // api.cache(true)
+ api.cache.never(); // api.cache(false)
+ api.cache.using(fn); // api.cache(fn)
+
+ // Return the value that will be cached.
+ return { };
+};`);
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/files/import-meta-resolve.js b/node_modules/@babel/core/lib/config/files/import-meta-resolve.js
new file mode 100644
index 0000000..6e1c905
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/files/import-meta-resolve.js
@@ -0,0 +1,41 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = resolve;
+
+function _module() {
+ const data = require("module");
+
+ _module = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _importMetaResolve = require("../../vendor/import-meta-resolve");
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
+
+function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
+
+let import_;
+
+try {
+ import_ = require("./import").default;
+} catch (_unused) {}
+
+const importMetaResolveP = import_ && process.execArgv.includes("--experimental-import-meta-resolve") ? import_("data:text/javascript,export default import.meta.resolve").then(m => m.default || _importMetaResolve.resolve, () => _importMetaResolve.resolve) : Promise.resolve(_importMetaResolve.resolve);
+
+function resolve(_x, _x2) {
+ return _resolve.apply(this, arguments);
+}
+
+function _resolve() {
+ _resolve = _asyncToGenerator(function* (specifier, parent) {
+ return (yield importMetaResolveP)(specifier, parent);
+ });
+ return _resolve.apply(this, arguments);
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/files/import.js b/node_modules/@babel/core/lib/config/files/import.js
new file mode 100644
index 0000000..c0acc2b
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/files/import.js
@@ -0,0 +1,10 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = import_;
+
+function import_(filepath) {
+ return import(filepath);
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/files/index-browser.js b/node_modules/@babel/core/lib/config/files/index-browser.js
new file mode 100644
index 0000000..c73168b
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/files/index-browser.js
@@ -0,0 +1,67 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ROOT_CONFIG_FILENAMES = void 0;
+exports.findConfigUpwards = findConfigUpwards;
+exports.findPackageData = findPackageData;
+exports.findRelativeConfig = findRelativeConfig;
+exports.findRootConfig = findRootConfig;
+exports.loadConfig = loadConfig;
+exports.loadPlugin = loadPlugin;
+exports.loadPreset = loadPreset;
+exports.resolvePlugin = resolvePlugin;
+exports.resolvePreset = resolvePreset;
+exports.resolveShowConfigPath = resolveShowConfigPath;
+
+function findConfigUpwards(rootDir) {
+ return null;
+}
+
+function* findPackageData(filepath) {
+ return {
+ filepath,
+ directories: [],
+ pkg: null,
+ isPackage: false
+ };
+}
+
+function* findRelativeConfig(pkgData, envName, caller) {
+ return {
+ config: null,
+ ignore: null
+ };
+}
+
+function* findRootConfig(dirname, envName, caller) {
+ return null;
+}
+
+function* loadConfig(name, dirname, envName, caller) {
+ throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);
+}
+
+function* resolveShowConfigPath(dirname) {
+ return null;
+}
+
+const ROOT_CONFIG_FILENAMES = [];
+exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES;
+
+function resolvePlugin(name, dirname) {
+ return null;
+}
+
+function resolvePreset(name, dirname) {
+ return null;
+}
+
+function loadPlugin(name, dirname) {
+ throw new Error(`Cannot load plugin ${name} relative to ${dirname} in a browser`);
+}
+
+function loadPreset(name, dirname) {
+ throw new Error(`Cannot load preset ${name} relative to ${dirname} in a browser`);
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/files/index.js b/node_modules/@babel/core/lib/config/files/index.js
new file mode 100644
index 0000000..075410c
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/files/index.js
@@ -0,0 +1,86 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "ROOT_CONFIG_FILENAMES", {
+ enumerable: true,
+ get: function () {
+ return _configuration.ROOT_CONFIG_FILENAMES;
+ }
+});
+Object.defineProperty(exports, "findConfigUpwards", {
+ enumerable: true,
+ get: function () {
+ return _configuration.findConfigUpwards;
+ }
+});
+Object.defineProperty(exports, "findPackageData", {
+ enumerable: true,
+ get: function () {
+ return _package.findPackageData;
+ }
+});
+Object.defineProperty(exports, "findRelativeConfig", {
+ enumerable: true,
+ get: function () {
+ return _configuration.findRelativeConfig;
+ }
+});
+Object.defineProperty(exports, "findRootConfig", {
+ enumerable: true,
+ get: function () {
+ return _configuration.findRootConfig;
+ }
+});
+Object.defineProperty(exports, "loadConfig", {
+ enumerable: true,
+ get: function () {
+ return _configuration.loadConfig;
+ }
+});
+Object.defineProperty(exports, "loadPlugin", {
+ enumerable: true,
+ get: function () {
+ return plugins.loadPlugin;
+ }
+});
+Object.defineProperty(exports, "loadPreset", {
+ enumerable: true,
+ get: function () {
+ return plugins.loadPreset;
+ }
+});
+exports.resolvePreset = exports.resolvePlugin = void 0;
+Object.defineProperty(exports, "resolveShowConfigPath", {
+ enumerable: true,
+ get: function () {
+ return _configuration.resolveShowConfigPath;
+ }
+});
+
+var _package = require("./package");
+
+var _configuration = require("./configuration");
+
+var plugins = require("./plugins");
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+({});
+
+const resolvePlugin = _gensync()(plugins.resolvePlugin).sync;
+
+exports.resolvePlugin = resolvePlugin;
+
+const resolvePreset = _gensync()(plugins.resolvePreset).sync;
+
+exports.resolvePreset = resolvePreset; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/files/module-types.js b/node_modules/@babel/core/lib/config/files/module-types.js
new file mode 100644
index 0000000..35d8220
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/files/module-types.js
@@ -0,0 +1,108 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = loadCjsOrMjsDefault;
+exports.supportsESM = void 0;
+
+var _async = require("../../gensync-utils/async");
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _url() {
+ const data = require("url");
+
+ _url = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _module() {
+ const data = require("module");
+
+ _module = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
+
+function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
+
+let import_;
+
+try {
+ import_ = require("./import").default;
+} catch (_unused) {}
+
+const supportsESM = !!import_;
+exports.supportsESM = supportsESM;
+
+function* loadCjsOrMjsDefault(filepath, asyncError, fallbackToTranspiledModule = false) {
+ switch (guessJSModuleType(filepath)) {
+ case "cjs":
+ return loadCjsDefault(filepath, fallbackToTranspiledModule);
+
+ case "unknown":
+ try {
+ return loadCjsDefault(filepath, fallbackToTranspiledModule);
+ } catch (e) {
+ if (e.code !== "ERR_REQUIRE_ESM") throw e;
+ }
+
+ case "mjs":
+ if (yield* (0, _async.isAsync)()) {
+ return yield* (0, _async.waitFor)(loadMjsDefault(filepath));
+ }
+
+ throw new Error(asyncError);
+ }
+}
+
+function guessJSModuleType(filename) {
+ switch (_path().extname(filename)) {
+ case ".cjs":
+ return "cjs";
+
+ case ".mjs":
+ return "mjs";
+
+ default:
+ return "unknown";
+ }
+}
+
+function loadCjsDefault(filepath, fallbackToTranspiledModule) {
+ const module = require(filepath);
+
+ return module != null && module.__esModule ? module.default || (fallbackToTranspiledModule ? module : undefined) : module;
+}
+
+function loadMjsDefault(_x) {
+ return _loadMjsDefault.apply(this, arguments);
+}
+
+function _loadMjsDefault() {
+ _loadMjsDefault = _asyncToGenerator(function* (filepath) {
+ if (!import_) {
+ throw new Error("Internal error: Native ECMAScript modules aren't supported" + " by this platform.\n");
+ }
+
+ const module = yield import_((0, _url().pathToFileURL)(filepath));
+ return module.default;
+ });
+ return _loadMjsDefault.apply(this, arguments);
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/files/package.js b/node_modules/@babel/core/lib/config/files/package.js
new file mode 100644
index 0000000..0e08bfe
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/files/package.js
@@ -0,0 +1,76 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.findPackageData = findPackageData;
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _utils = require("./utils");
+
+const PACKAGE_FILENAME = "package.json";
+
+function* findPackageData(filepath) {
+ let pkg = null;
+ const directories = [];
+ let isPackage = true;
+
+ let dirname = _path().dirname(filepath);
+
+ while (!pkg && _path().basename(dirname) !== "node_modules") {
+ directories.push(dirname);
+ pkg = yield* readConfigPackage(_path().join(dirname, PACKAGE_FILENAME));
+
+ const nextLoc = _path().dirname(dirname);
+
+ if (dirname === nextLoc) {
+ isPackage = false;
+ break;
+ }
+
+ dirname = nextLoc;
+ }
+
+ return {
+ filepath,
+ directories,
+ pkg,
+ isPackage
+ };
+}
+
+const readConfigPackage = (0, _utils.makeStaticFileCache)((filepath, content) => {
+ let options;
+
+ try {
+ options = JSON.parse(content);
+ } catch (err) {
+ err.message = `${filepath}: Error while parsing JSON - ${err.message}`;
+ throw err;
+ }
+
+ if (!options) throw new Error(`${filepath}: No config detected`);
+
+ if (typeof options !== "object") {
+ throw new Error(`${filepath}: Config returned typeof ${typeof options}`);
+ }
+
+ if (Array.isArray(options)) {
+ throw new Error(`${filepath}: Expected config object but found array`);
+ }
+
+ return {
+ filepath,
+ dirname: _path().dirname(filepath),
+ options
+ };
+}); \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/files/plugins.js b/node_modules/@babel/core/lib/config/files/plugins.js
new file mode 100644
index 0000000..8af6e49
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/files/plugins.js
@@ -0,0 +1,273 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.loadPlugin = loadPlugin;
+exports.loadPreset = loadPreset;
+exports.resolvePlugin = resolvePlugin;
+exports.resolvePreset = resolvePreset;
+
+function _debug() {
+ const data = require("debug");
+
+ _debug = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _async = require("../../gensync-utils/async");
+
+var _moduleTypes = require("./module-types");
+
+function _url() {
+ const data = require("url");
+
+ _url = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _importMetaResolve = require("./import-meta-resolve");
+
+function _module() {
+ const data = require("module");
+
+ _module = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
+
+function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
+
+const debug = _debug()("babel:config:loading:files:plugins");
+
+const EXACT_RE = /^module:/;
+const BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/;
+const BABEL_PRESET_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-preset-)/;
+const BABEL_PLUGIN_ORG_RE = /^(@babel\/)(?!plugin-|[^/]+\/)/;
+const BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/;
+const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/;
+const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/;
+const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/;
+
+function* resolvePlugin(name, dirname) {
+ return yield* resolveStandardizedName("plugin", name, dirname);
+}
+
+function* resolvePreset(name, dirname) {
+ return yield* resolveStandardizedName("preset", name, dirname);
+}
+
+function* loadPlugin(name, dirname) {
+ const filepath = yield* resolvePlugin(name, dirname);
+ const value = yield* requireModule("plugin", filepath);
+ debug("Loaded plugin %o from %o.", name, dirname);
+ return {
+ filepath,
+ value
+ };
+}
+
+function* loadPreset(name, dirname) {
+ const filepath = yield* resolvePreset(name, dirname);
+ const value = yield* requireModule("preset", filepath);
+ debug("Loaded preset %o from %o.", name, dirname);
+ return {
+ filepath,
+ value
+ };
+}
+
+function standardizeName(type, name) {
+ if (_path().isAbsolute(name)) return name;
+ const isPreset = type === "preset";
+ return name.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`).replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`).replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`).replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`).replace(EXACT_RE, "");
+}
+
+function* resolveAlternativesHelper(type, name) {
+ const standardizedName = standardizeName(type, name);
+ const {
+ error,
+ value
+ } = yield standardizedName;
+ if (!error) return value;
+ if (error.code !== "MODULE_NOT_FOUND") throw error;
+
+ if (standardizedName !== name && !(yield name).error) {
+ error.message += `\n- If you want to resolve "${name}", use "module:${name}"`;
+ }
+
+ if (!(yield standardizeName(type, "@babel/" + name)).error) {
+ error.message += `\n- Did you mean "@babel/${name}"?`;
+ }
+
+ const oppositeType = type === "preset" ? "plugin" : "preset";
+
+ if (!(yield standardizeName(oppositeType, name)).error) {
+ error.message += `\n- Did you accidentally pass a ${oppositeType} as a ${type}?`;
+ }
+
+ throw error;
+}
+
+function tryRequireResolve(id, {
+ paths: [dirname]
+}) {
+ try {
+ return {
+ error: null,
+ value: (((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, {
+ paths: [b]
+ }, M = require("module")) => {
+ let f = M._findPath(r, M._nodeModulePaths(b).concat(b));
+
+ if (f) return f;
+ f = new Error(`Cannot resolve module '${r}'`);
+ f.code = "MODULE_NOT_FOUND";
+ throw f;
+ })(id, {
+ paths: [dirname]
+ })
+ };
+ } catch (error) {
+ return {
+ error,
+ value: null
+ };
+ }
+}
+
+function tryImportMetaResolve(_x, _x2) {
+ return _tryImportMetaResolve.apply(this, arguments);
+}
+
+function _tryImportMetaResolve() {
+ _tryImportMetaResolve = _asyncToGenerator(function* (id, options) {
+ try {
+ return {
+ error: null,
+ value: yield (0, _importMetaResolve.default)(id, options)
+ };
+ } catch (error) {
+ return {
+ error,
+ value: null
+ };
+ }
+ });
+ return _tryImportMetaResolve.apply(this, arguments);
+}
+
+function resolveStandardizedNameForRequrie(type, name, dirname) {
+ const it = resolveAlternativesHelper(type, name);
+ let res = it.next();
+
+ while (!res.done) {
+ res = it.next(tryRequireResolve(res.value, {
+ paths: [dirname]
+ }));
+ }
+
+ return res.value;
+}
+
+function resolveStandardizedNameForImport(_x3, _x4, _x5) {
+ return _resolveStandardizedNameForImport.apply(this, arguments);
+}
+
+function _resolveStandardizedNameForImport() {
+ _resolveStandardizedNameForImport = _asyncToGenerator(function* (type, name, dirname) {
+ const parentUrl = (0, _url().pathToFileURL)(_path().join(dirname, "./babel-virtual-resolve-base.js")).href;
+ const it = resolveAlternativesHelper(type, name);
+ let res = it.next();
+
+ while (!res.done) {
+ res = it.next(yield tryImportMetaResolve(res.value, parentUrl));
+ }
+
+ return (0, _url().fileURLToPath)(res.value);
+ });
+ return _resolveStandardizedNameForImport.apply(this, arguments);
+}
+
+const resolveStandardizedName = _gensync()({
+ sync(type, name, dirname = process.cwd()) {
+ return resolveStandardizedNameForRequrie(type, name, dirname);
+ },
+
+ async(type, name, dirname = process.cwd()) {
+ return _asyncToGenerator(function* () {
+ if (!_moduleTypes.supportsESM) {
+ return resolveStandardizedNameForRequrie(type, name, dirname);
+ }
+
+ try {
+ return yield resolveStandardizedNameForImport(type, name, dirname);
+ } catch (e) {
+ try {
+ return resolveStandardizedNameForRequrie(type, name, dirname);
+ } catch (e2) {
+ if (e.type === "MODULE_NOT_FOUND") throw e;
+ if (e2.type === "MODULE_NOT_FOUND") throw e2;
+ throw e;
+ }
+ }
+ })();
+ }
+
+});
+
+{
+ var LOADING_MODULES = new Set();
+}
+
+function* requireModule(type, name) {
+ {
+ if (!(yield* (0, _async.isAsync)()) && LOADING_MODULES.has(name)) {
+ throw new Error(`Reentrant ${type} detected trying to load "${name}". This module is not ignored ` + "and is trying to load itself while compiling itself, leading to a dependency cycle. " + 'We recommend adding it to your "ignore" list in your babelrc, or to a .babelignore.');
+ }
+ }
+
+ try {
+ {
+ LOADING_MODULES.add(name);
+ }
+ return yield* (0, _moduleTypes.default)(name, `You appear to be using a native ECMAScript module ${type}, ` + "which is only supported when running Babel asynchronously.", true);
+ } catch (err) {
+ err.message = `[BABEL]: ${err.message} (While processing: ${name})`;
+ throw err;
+ } finally {
+ {
+ LOADING_MODULES.delete(name);
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/files/types.js b/node_modules/@babel/core/lib/config/files/types.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/files/types.js
diff --git a/node_modules/@babel/core/lib/config/files/utils.js b/node_modules/@babel/core/lib/config/files/utils.js
new file mode 100644
index 0000000..6da68c0
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/files/utils.js
@@ -0,0 +1,44 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.makeStaticFileCache = makeStaticFileCache;
+
+var _caching = require("../caching");
+
+var fs = require("../../gensync-utils/fs");
+
+function _fs2() {
+ const data = require("fs");
+
+ _fs2 = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function makeStaticFileCache(fn) {
+ return (0, _caching.makeStrongCache)(function* (filepath, cache) {
+ const cached = cache.invalidate(() => fileMtime(filepath));
+
+ if (cached === null) {
+ return null;
+ }
+
+ return fn(filepath, yield* fs.readFile(filepath, "utf8"));
+ });
+}
+
+function fileMtime(filepath) {
+ if (!_fs2().existsSync(filepath)) return null;
+
+ try {
+ return +_fs2().statSync(filepath).mtime;
+ } catch (e) {
+ if (e.code !== "ENOENT" && e.code !== "ENOTDIR") throw e;
+ }
+
+ return null;
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/full.js b/node_modules/@babel/core/lib/config/full.js
new file mode 100644
index 0000000..e1df648
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/full.js
@@ -0,0 +1,378 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _async = require("../gensync-utils/async");
+
+var _util = require("./util");
+
+var context = require("../index");
+
+var _plugin = require("./plugin");
+
+var _item = require("./item");
+
+var _configChain = require("./config-chain");
+
+var _deepArray = require("./helpers/deep-array");
+
+function _traverse() {
+ const data = require("@babel/traverse");
+
+ _traverse = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _caching = require("./caching");
+
+var _options = require("./validation/options");
+
+var _plugins = require("./validation/plugins");
+
+var _configApi = require("./helpers/config-api");
+
+var _partial = require("./partial");
+
+var Context = require("./cache-contexts");
+
+var _default = _gensync()(function* loadFullConfig(inputOpts) {
+ var _opts$assumptions;
+
+ const result = yield* (0, _partial.default)(inputOpts);
+
+ if (!result) {
+ return null;
+ }
+
+ const {
+ options,
+ context,
+ fileHandling
+ } = result;
+
+ if (fileHandling === "ignored") {
+ return null;
+ }
+
+ const optionDefaults = {};
+ const {
+ plugins,
+ presets
+ } = options;
+
+ if (!plugins || !presets) {
+ throw new Error("Assertion failure - plugins and presets exist");
+ }
+
+ const presetContext = Object.assign({}, context, {
+ targets: options.targets
+ });
+
+ const toDescriptor = item => {
+ const desc = (0, _item.getItemDescriptor)(item);
+
+ if (!desc) {
+ throw new Error("Assertion failure - must be config item");
+ }
+
+ return desc;
+ };
+
+ const presetsDescriptors = presets.map(toDescriptor);
+ const initialPluginsDescriptors = plugins.map(toDescriptor);
+ const pluginDescriptorsByPass = [[]];
+ const passes = [];
+ const externalDependencies = [];
+ const ignored = yield* enhanceError(context, function* recursePresetDescriptors(rawPresets, pluginDescriptorsPass) {
+ const presets = [];
+
+ for (let i = 0; i < rawPresets.length; i++) {
+ const descriptor = rawPresets[i];
+
+ if (descriptor.options !== false) {
+ try {
+ var preset = yield* loadPresetDescriptor(descriptor, presetContext);
+ } catch (e) {
+ if (e.code === "BABEL_UNKNOWN_OPTION") {
+ (0, _options.checkNoUnwrappedItemOptionPairs)(rawPresets, i, "preset", e);
+ }
+
+ throw e;
+ }
+
+ externalDependencies.push(preset.externalDependencies);
+
+ if (descriptor.ownPass) {
+ presets.push({
+ preset: preset.chain,
+ pass: []
+ });
+ } else {
+ presets.unshift({
+ preset: preset.chain,
+ pass: pluginDescriptorsPass
+ });
+ }
+ }
+ }
+
+ if (presets.length > 0) {
+ pluginDescriptorsByPass.splice(1, 0, ...presets.map(o => o.pass).filter(p => p !== pluginDescriptorsPass));
+
+ for (const {
+ preset,
+ pass
+ } of presets) {
+ if (!preset) return true;
+ pass.push(...preset.plugins);
+ const ignored = yield* recursePresetDescriptors(preset.presets, pass);
+ if (ignored) return true;
+ preset.options.forEach(opts => {
+ (0, _util.mergeOptions)(optionDefaults, opts);
+ });
+ }
+ }
+ })(presetsDescriptors, pluginDescriptorsByPass[0]);
+ if (ignored) return null;
+ const opts = optionDefaults;
+ (0, _util.mergeOptions)(opts, options);
+ const pluginContext = Object.assign({}, presetContext, {
+ assumptions: (_opts$assumptions = opts.assumptions) != null ? _opts$assumptions : {}
+ });
+ yield* enhanceError(context, function* loadPluginDescriptors() {
+ pluginDescriptorsByPass[0].unshift(...initialPluginsDescriptors);
+
+ for (const descs of pluginDescriptorsByPass) {
+ const pass = [];
+ passes.push(pass);
+
+ for (let i = 0; i < descs.length; i++) {
+ const descriptor = descs[i];
+
+ if (descriptor.options !== false) {
+ try {
+ var plugin = yield* loadPluginDescriptor(descriptor, pluginContext);
+ } catch (e) {
+ if (e.code === "BABEL_UNKNOWN_PLUGIN_PROPERTY") {
+ (0, _options.checkNoUnwrappedItemOptionPairs)(descs, i, "plugin", e);
+ }
+
+ throw e;
+ }
+
+ pass.push(plugin);
+ externalDependencies.push(plugin.externalDependencies);
+ }
+ }
+ }
+ })();
+ opts.plugins = passes[0];
+ opts.presets = passes.slice(1).filter(plugins => plugins.length > 0).map(plugins => ({
+ plugins
+ }));
+ opts.passPerPreset = opts.presets.length > 0;
+ return {
+ options: opts,
+ passes: passes,
+ externalDependencies: (0, _deepArray.finalize)(externalDependencies)
+ };
+});
+
+exports.default = _default;
+
+function enhanceError(context, fn) {
+ return function* (arg1, arg2) {
+ try {
+ return yield* fn(arg1, arg2);
+ } catch (e) {
+ if (!/^\[BABEL\]/.test(e.message)) {
+ e.message = `[BABEL] ${context.filename || "unknown"}: ${e.message}`;
+ }
+
+ throw e;
+ }
+ };
+}
+
+const makeDescriptorLoader = apiFactory => (0, _caching.makeWeakCache)(function* ({
+ value,
+ options,
+ dirname,
+ alias
+}, cache) {
+ if (options === false) throw new Error("Assertion failure");
+ options = options || {};
+ const externalDependencies = [];
+ let item = value;
+
+ if (typeof value === "function") {
+ const factory = (0, _async.maybeAsync)(value, `You appear to be using an async plugin/preset, but Babel has been called synchronously`);
+ const api = Object.assign({}, context, apiFactory(cache, externalDependencies));
+
+ try {
+ item = yield* factory(api, options, dirname);
+ } catch (e) {
+ if (alias) {
+ e.message += ` (While processing: ${JSON.stringify(alias)})`;
+ }
+
+ throw e;
+ }
+ }
+
+ if (!item || typeof item !== "object") {
+ throw new Error("Plugin/Preset did not return an object.");
+ }
+
+ if ((0, _async.isThenable)(item)) {
+ yield* [];
+ throw new Error(`You appear to be using a promise as a plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version. ` + `As an alternative, you can prefix the promise with "await". ` + `(While processing: ${JSON.stringify(alias)})`);
+ }
+
+ if (externalDependencies.length > 0 && (!cache.configured() || cache.mode() === "forever")) {
+ let error = `A plugin/preset has external untracked dependencies ` + `(${externalDependencies[0]}), but the cache `;
+
+ if (!cache.configured()) {
+ error += `has not been configured to be invalidated when the external dependencies change. `;
+ } else {
+ error += ` has been configured to never be invalidated. `;
+ }
+
+ error += `Plugins/presets should configure their cache to be invalidated when the external ` + `dependencies change, for example using \`api.cache.invalidate(() => ` + `statSync(filepath).mtimeMs)\` or \`api.cache.never()\`\n` + `(While processing: ${JSON.stringify(alias)})`;
+ throw new Error(error);
+ }
+
+ return {
+ value: item,
+ options,
+ dirname,
+ alias,
+ externalDependencies: (0, _deepArray.finalize)(externalDependencies)
+ };
+});
+
+const pluginDescriptorLoader = makeDescriptorLoader(_configApi.makePluginAPI);
+const presetDescriptorLoader = makeDescriptorLoader(_configApi.makePresetAPI);
+
+function* loadPluginDescriptor(descriptor, context) {
+ if (descriptor.value instanceof _plugin.default) {
+ if (descriptor.options) {
+ throw new Error("Passed options to an existing Plugin instance will not work.");
+ }
+
+ return descriptor.value;
+ }
+
+ return yield* instantiatePlugin(yield* pluginDescriptorLoader(descriptor, context), context);
+}
+
+const instantiatePlugin = (0, _caching.makeWeakCache)(function* ({
+ value,
+ options,
+ dirname,
+ alias,
+ externalDependencies
+}, cache) {
+ const pluginObj = (0, _plugins.validatePluginObject)(value);
+ const plugin = Object.assign({}, pluginObj);
+
+ if (plugin.visitor) {
+ plugin.visitor = _traverse().default.explode(Object.assign({}, plugin.visitor));
+ }
+
+ if (plugin.inherits) {
+ const inheritsDescriptor = {
+ name: undefined,
+ alias: `${alias}$inherits`,
+ value: plugin.inherits,
+ options,
+ dirname
+ };
+ const inherits = yield* (0, _async.forwardAsync)(loadPluginDescriptor, run => {
+ return cache.invalidate(data => run(inheritsDescriptor, data));
+ });
+ plugin.pre = chain(inherits.pre, plugin.pre);
+ plugin.post = chain(inherits.post, plugin.post);
+ plugin.manipulateOptions = chain(inherits.manipulateOptions, plugin.manipulateOptions);
+ plugin.visitor = _traverse().default.visitors.merge([inherits.visitor || {}, plugin.visitor || {}]);
+
+ if (inherits.externalDependencies.length > 0) {
+ if (externalDependencies.length === 0) {
+ externalDependencies = inherits.externalDependencies;
+ } else {
+ externalDependencies = (0, _deepArray.finalize)([externalDependencies, inherits.externalDependencies]);
+ }
+ }
+ }
+
+ return new _plugin.default(plugin, options, alias, externalDependencies);
+});
+
+const validateIfOptionNeedsFilename = (options, descriptor) => {
+ if (options.test || options.include || options.exclude) {
+ const formattedPresetName = descriptor.name ? `"${descriptor.name}"` : "/* your preset */";
+ throw new Error([`Preset ${formattedPresetName} requires a filename to be set when babel is called directly,`, `\`\`\``, `babel.transform(code, { filename: 'file.ts', presets: [${formattedPresetName}] });`, `\`\`\``, `See https://babeljs.io/docs/en/options#filename for more information.`].join("\n"));
+ }
+};
+
+const validatePreset = (preset, context, descriptor) => {
+ if (!context.filename) {
+ const {
+ options
+ } = preset;
+ validateIfOptionNeedsFilename(options, descriptor);
+
+ if (options.overrides) {
+ options.overrides.forEach(overrideOptions => validateIfOptionNeedsFilename(overrideOptions, descriptor));
+ }
+ }
+};
+
+function* loadPresetDescriptor(descriptor, context) {
+ const preset = instantiatePreset(yield* presetDescriptorLoader(descriptor, context));
+ validatePreset(preset, context, descriptor);
+ return {
+ chain: yield* (0, _configChain.buildPresetChain)(preset, context),
+ externalDependencies: preset.externalDependencies
+ };
+}
+
+const instantiatePreset = (0, _caching.makeWeakCacheSync)(({
+ value,
+ dirname,
+ alias,
+ externalDependencies
+}) => {
+ return {
+ options: (0, _options.validate)("preset", value),
+ alias,
+ dirname,
+ externalDependencies
+ };
+});
+
+function chain(a, b) {
+ const fns = [a, b].filter(Boolean);
+ if (fns.length <= 1) return fns[0];
+ return function (...args) {
+ for (const fn of fns) {
+ fn.apply(this, args);
+ }
+ };
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/helpers/config-api.js b/node_modules/@babel/core/lib/config/helpers/config-api.js
new file mode 100644
index 0000000..f8dedbc
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/helpers/config-api.js
@@ -0,0 +1,108 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.makeConfigAPI = makeConfigAPI;
+exports.makePluginAPI = makePluginAPI;
+exports.makePresetAPI = makePresetAPI;
+
+function _semver() {
+ const data = require("semver");
+
+ _semver = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _ = require("../../");
+
+var _caching = require("../caching");
+
+var Context = require("../cache-contexts");
+
+function makeConfigAPI(cache) {
+ const env = value => cache.using(data => {
+ if (typeof value === "undefined") return data.envName;
+
+ if (typeof value === "function") {
+ return (0, _caching.assertSimpleType)(value(data.envName));
+ }
+
+ if (!Array.isArray(value)) value = [value];
+ return value.some(entry => {
+ if (typeof entry !== "string") {
+ throw new Error("Unexpected non-string value");
+ }
+
+ return entry === data.envName;
+ });
+ });
+
+ const caller = cb => cache.using(data => (0, _caching.assertSimpleType)(cb(data.caller)));
+
+ return {
+ version: _.version,
+ cache: cache.simple(),
+ env,
+ async: () => false,
+ caller,
+ assertVersion
+ };
+}
+
+function makePresetAPI(cache, externalDependencies) {
+ const targets = () => JSON.parse(cache.using(data => JSON.stringify(data.targets)));
+
+ const addExternalDependency = ref => {
+ externalDependencies.push(ref);
+ };
+
+ return Object.assign({}, makeConfigAPI(cache), {
+ targets,
+ addExternalDependency
+ });
+}
+
+function makePluginAPI(cache, externalDependencies) {
+ const assumption = name => cache.using(data => data.assumptions[name]);
+
+ return Object.assign({}, makePresetAPI(cache, externalDependencies), {
+ assumption
+ });
+}
+
+function assertVersion(range) {
+ if (typeof range === "number") {
+ if (!Number.isInteger(range)) {
+ throw new Error("Expected string or integer value.");
+ }
+
+ range = `^${range}.0.0-0`;
+ }
+
+ if (typeof range !== "string") {
+ throw new Error("Expected string or integer value.");
+ }
+
+ if (_semver().satisfies(_.version, range)) return;
+ const limit = Error.stackTraceLimit;
+
+ if (typeof limit === "number" && limit < 25) {
+ Error.stackTraceLimit = 25;
+ }
+
+ const err = new Error(`Requires Babel "${range}", but was loaded with "${_.version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`);
+
+ if (typeof limit === "number") {
+ Error.stackTraceLimit = limit;
+ }
+
+ throw Object.assign(err, {
+ code: "BABEL_VERSION_UNSUPPORTED",
+ version: _.version,
+ range
+ });
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/helpers/deep-array.js b/node_modules/@babel/core/lib/config/helpers/deep-array.js
new file mode 100644
index 0000000..9455e32
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/helpers/deep-array.js
@@ -0,0 +1,24 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.finalize = finalize;
+exports.flattenToSet = flattenToSet;
+
+function finalize(deepArr) {
+ return Object.freeze(deepArr);
+}
+
+function flattenToSet(arr) {
+ const result = new Set();
+ const stack = [arr];
+
+ while (stack.length > 0) {
+ for (const el of stack.pop()) {
+ if (Array.isArray(el)) stack.push(el);else result.add(el);
+ }
+ }
+
+ return result;
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/helpers/environment.js b/node_modules/@babel/core/lib/config/helpers/environment.js
new file mode 100644
index 0000000..e4bfdbc
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/helpers/environment.js
@@ -0,0 +1,10 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getEnv = getEnv;
+
+function getEnv(defaultValue = "development") {
+ return process.env.BABEL_ENV || process.env.NODE_ENV || defaultValue;
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/index.js b/node_modules/@babel/core/lib/config/index.js
new file mode 100644
index 0000000..696850d
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/index.js
@@ -0,0 +1,75 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.createConfigItem = createConfigItem;
+exports.createConfigItemSync = exports.createConfigItemAsync = void 0;
+Object.defineProperty(exports, "default", {
+ enumerable: true,
+ get: function () {
+ return _full.default;
+ }
+});
+exports.loadPartialConfigSync = exports.loadPartialConfigAsync = exports.loadPartialConfig = exports.loadOptionsSync = exports.loadOptionsAsync = exports.loadOptions = void 0;
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _full = require("./full");
+
+var _partial = require("./partial");
+
+var _item = require("./item");
+
+const loadOptionsRunner = _gensync()(function* (opts) {
+ var _config$options;
+
+ const config = yield* (0, _full.default)(opts);
+ return (_config$options = config == null ? void 0 : config.options) != null ? _config$options : null;
+});
+
+const createConfigItemRunner = _gensync()(_item.createConfigItem);
+
+const maybeErrback = runner => (opts, callback) => {
+ if (callback === undefined && typeof opts === "function") {
+ callback = opts;
+ opts = undefined;
+ }
+
+ return callback ? runner.errback(opts, callback) : runner.sync(opts);
+};
+
+const loadPartialConfig = maybeErrback(_partial.loadPartialConfig);
+exports.loadPartialConfig = loadPartialConfig;
+const loadPartialConfigSync = _partial.loadPartialConfig.sync;
+exports.loadPartialConfigSync = loadPartialConfigSync;
+const loadPartialConfigAsync = _partial.loadPartialConfig.async;
+exports.loadPartialConfigAsync = loadPartialConfigAsync;
+const loadOptions = maybeErrback(loadOptionsRunner);
+exports.loadOptions = loadOptions;
+const loadOptionsSync = loadOptionsRunner.sync;
+exports.loadOptionsSync = loadOptionsSync;
+const loadOptionsAsync = loadOptionsRunner.async;
+exports.loadOptionsAsync = loadOptionsAsync;
+const createConfigItemSync = createConfigItemRunner.sync;
+exports.createConfigItemSync = createConfigItemSync;
+const createConfigItemAsync = createConfigItemRunner.async;
+exports.createConfigItemAsync = createConfigItemAsync;
+
+function createConfigItem(target, options, callback) {
+ if (callback !== undefined) {
+ return createConfigItemRunner.errback(target, options, callback);
+ } else if (typeof options === "function") {
+ return createConfigItemRunner.errback(target, undefined, callback);
+ } else {
+ return createConfigItemRunner.sync(target, options);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/item.js b/node_modules/@babel/core/lib/config/item.js
new file mode 100644
index 0000000..2380354
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/item.js
@@ -0,0 +1,76 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.createConfigItem = createConfigItem;
+exports.createItemFromDescriptor = createItemFromDescriptor;
+exports.getItemDescriptor = getItemDescriptor;
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _configDescriptors = require("./config-descriptors");
+
+function createItemFromDescriptor(desc) {
+ return new ConfigItem(desc);
+}
+
+function* createConfigItem(value, {
+ dirname = ".",
+ type
+} = {}) {
+ const descriptor = yield* (0, _configDescriptors.createDescriptor)(value, _path().resolve(dirname), {
+ type,
+ alias: "programmatic item"
+ });
+ return createItemFromDescriptor(descriptor);
+}
+
+function getItemDescriptor(item) {
+ if (item != null && item[CONFIG_ITEM_BRAND]) {
+ return item._descriptor;
+ }
+
+ return undefined;
+}
+
+const CONFIG_ITEM_BRAND = Symbol.for("@babel/core@7 - ConfigItem");
+
+class ConfigItem {
+ constructor(descriptor) {
+ this._descriptor = void 0;
+ this[CONFIG_ITEM_BRAND] = true;
+ this.value = void 0;
+ this.options = void 0;
+ this.dirname = void 0;
+ this.name = void 0;
+ this.file = void 0;
+ this._descriptor = descriptor;
+ Object.defineProperty(this, "_descriptor", {
+ enumerable: false
+ });
+ Object.defineProperty(this, CONFIG_ITEM_BRAND, {
+ enumerable: false
+ });
+ this.value = this._descriptor.value;
+ this.options = this._descriptor.options;
+ this.dirname = this._descriptor.dirname;
+ this.name = this._descriptor.name;
+ this.file = this._descriptor.file ? {
+ request: this._descriptor.file.request,
+ resolved: this._descriptor.file.resolved
+ } : undefined;
+ Object.freeze(this);
+ }
+
+}
+
+Object.freeze(ConfigItem.prototype); \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/partial.js b/node_modules/@babel/core/lib/config/partial.js
new file mode 100644
index 0000000..e8c52e1
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/partial.js
@@ -0,0 +1,197 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = loadPrivatePartialConfig;
+exports.loadPartialConfig = void 0;
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _plugin = require("./plugin");
+
+var _util = require("./util");
+
+var _item = require("./item");
+
+var _configChain = require("./config-chain");
+
+var _environment = require("./helpers/environment");
+
+var _options = require("./validation/options");
+
+var _files = require("./files");
+
+var _resolveTargets = require("./resolve-targets");
+
+const _excluded = ["showIgnoredFiles"];
+
+function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
+
+function resolveRootMode(rootDir, rootMode) {
+ switch (rootMode) {
+ case "root":
+ return rootDir;
+
+ case "upward-optional":
+ {
+ const upwardRootDir = (0, _files.findConfigUpwards)(rootDir);
+ return upwardRootDir === null ? rootDir : upwardRootDir;
+ }
+
+ case "upward":
+ {
+ const upwardRootDir = (0, _files.findConfigUpwards)(rootDir);
+ if (upwardRootDir !== null) return upwardRootDir;
+ throw Object.assign(new Error(`Babel was run with rootMode:"upward" but a root could not ` + `be found when searching upward from "${rootDir}".\n` + `One of the following config files must be in the directory tree: ` + `"${_files.ROOT_CONFIG_FILENAMES.join(", ")}".`), {
+ code: "BABEL_ROOT_NOT_FOUND",
+ dirname: rootDir
+ });
+ }
+
+ default:
+ throw new Error(`Assertion failure - unknown rootMode value.`);
+ }
+}
+
+function* loadPrivatePartialConfig(inputOpts) {
+ if (inputOpts != null && (typeof inputOpts !== "object" || Array.isArray(inputOpts))) {
+ throw new Error("Babel options must be an object, null, or undefined");
+ }
+
+ const args = inputOpts ? (0, _options.validate)("arguments", inputOpts) : {};
+ const {
+ envName = (0, _environment.getEnv)(),
+ cwd = ".",
+ root: rootDir = ".",
+ rootMode = "root",
+ caller,
+ cloneInputAst = true
+ } = args;
+
+ const absoluteCwd = _path().resolve(cwd);
+
+ const absoluteRootDir = resolveRootMode(_path().resolve(absoluteCwd, rootDir), rootMode);
+ const filename = typeof args.filename === "string" ? _path().resolve(cwd, args.filename) : undefined;
+ const showConfigPath = yield* (0, _files.resolveShowConfigPath)(absoluteCwd);
+ const context = {
+ filename,
+ cwd: absoluteCwd,
+ root: absoluteRootDir,
+ envName,
+ caller,
+ showConfig: showConfigPath === filename
+ };
+ const configChain = yield* (0, _configChain.buildRootChain)(args, context);
+ if (!configChain) return null;
+ const merged = {
+ assumptions: {}
+ };
+ configChain.options.forEach(opts => {
+ (0, _util.mergeOptions)(merged, opts);
+ });
+ const options = Object.assign({}, merged, {
+ targets: (0, _resolveTargets.resolveTargets)(merged, absoluteRootDir),
+ cloneInputAst,
+ babelrc: false,
+ configFile: false,
+ browserslistConfigFile: false,
+ passPerPreset: false,
+ envName: context.envName,
+ cwd: context.cwd,
+ root: context.root,
+ rootMode: "root",
+ filename: typeof context.filename === "string" ? context.filename : undefined,
+ plugins: configChain.plugins.map(descriptor => (0, _item.createItemFromDescriptor)(descriptor)),
+ presets: configChain.presets.map(descriptor => (0, _item.createItemFromDescriptor)(descriptor))
+ });
+ return {
+ options,
+ context,
+ fileHandling: configChain.fileHandling,
+ ignore: configChain.ignore,
+ babelrc: configChain.babelrc,
+ config: configChain.config,
+ files: configChain.files
+ };
+}
+
+const loadPartialConfig = _gensync()(function* (opts) {
+ let showIgnoredFiles = false;
+
+ if (typeof opts === "object" && opts !== null && !Array.isArray(opts)) {
+ var _opts = opts;
+ ({
+ showIgnoredFiles
+ } = _opts);
+ opts = _objectWithoutPropertiesLoose(_opts, _excluded);
+ _opts;
+ }
+
+ const result = yield* loadPrivatePartialConfig(opts);
+ if (!result) return null;
+ const {
+ options,
+ babelrc,
+ ignore,
+ config,
+ fileHandling,
+ files
+ } = result;
+
+ if (fileHandling === "ignored" && !showIgnoredFiles) {
+ return null;
+ }
+
+ (options.plugins || []).forEach(item => {
+ if (item.value instanceof _plugin.default) {
+ throw new Error("Passing cached plugin instances is not supported in " + "babel.loadPartialConfig()");
+ }
+ });
+ return new PartialConfig(options, babelrc ? babelrc.filepath : undefined, ignore ? ignore.filepath : undefined, config ? config.filepath : undefined, fileHandling, files);
+});
+
+exports.loadPartialConfig = loadPartialConfig;
+
+class PartialConfig {
+ constructor(options, babelrc, ignore, config, fileHandling, files) {
+ this.options = void 0;
+ this.babelrc = void 0;
+ this.babelignore = void 0;
+ this.config = void 0;
+ this.fileHandling = void 0;
+ this.files = void 0;
+ this.options = options;
+ this.babelignore = ignore;
+ this.babelrc = babelrc;
+ this.config = config;
+ this.fileHandling = fileHandling;
+ this.files = files;
+ Object.freeze(this);
+ }
+
+ hasFilesystemConfig() {
+ return this.babelrc !== undefined || this.config !== undefined;
+ }
+
+}
+
+Object.freeze(PartialConfig.prototype); \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/pattern-to-regex.js b/node_modules/@babel/core/lib/config/pattern-to-regex.js
new file mode 100644
index 0000000..ec5db8f
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/pattern-to-regex.js
@@ -0,0 +1,44 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = pathToPattern;
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+const sep = `\\${_path().sep}`;
+const endSep = `(?:${sep}|$)`;
+const substitution = `[^${sep}]+`;
+const starPat = `(?:${substitution}${sep})`;
+const starPatLast = `(?:${substitution}${endSep})`;
+const starStarPat = `${starPat}*?`;
+const starStarPatLast = `${starPat}*?${starPatLast}?`;
+
+function escapeRegExp(string) {
+ return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&");
+}
+
+function pathToPattern(pattern, dirname) {
+ const parts = _path().resolve(dirname, pattern).split(_path().sep);
+
+ return new RegExp(["^", ...parts.map((part, i) => {
+ const last = i === parts.length - 1;
+ if (part === "**") return last ? starStarPatLast : starStarPat;
+ if (part === "*") return last ? starPatLast : starPat;
+
+ if (part.indexOf("*.") === 0) {
+ return substitution + escapeRegExp(part.slice(1)) + (last ? endSep : sep);
+ }
+
+ return escapeRegExp(part) + (last ? endSep : sep);
+ })].join(""));
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/plugin.js b/node_modules/@babel/core/lib/config/plugin.js
new file mode 100644
index 0000000..40e0540
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/plugin.js
@@ -0,0 +1,34 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _deepArray = require("./helpers/deep-array");
+
+class Plugin {
+ constructor(plugin, options, key, externalDependencies = (0, _deepArray.finalize)([])) {
+ this.key = void 0;
+ this.manipulateOptions = void 0;
+ this.post = void 0;
+ this.pre = void 0;
+ this.visitor = void 0;
+ this.parserOverride = void 0;
+ this.generatorOverride = void 0;
+ this.options = void 0;
+ this.externalDependencies = void 0;
+ this.key = plugin.name || key;
+ this.manipulateOptions = plugin.manipulateOptions;
+ this.post = plugin.post;
+ this.pre = plugin.pre;
+ this.visitor = plugin.visitor || {};
+ this.parserOverride = plugin.parserOverride;
+ this.generatorOverride = plugin.generatorOverride;
+ this.options = options;
+ this.externalDependencies = externalDependencies;
+ }
+
+}
+
+exports.default = Plugin; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/printer.js b/node_modules/@babel/core/lib/config/printer.js
new file mode 100644
index 0000000..229fd9a
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/printer.js
@@ -0,0 +1,139 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ConfigPrinter = exports.ChainFormatter = void 0;
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+const ChainFormatter = {
+ Programmatic: 0,
+ Config: 1
+};
+exports.ChainFormatter = ChainFormatter;
+const Formatter = {
+ title(type, callerName, filepath) {
+ let title = "";
+
+ if (type === ChainFormatter.Programmatic) {
+ title = "programmatic options";
+
+ if (callerName) {
+ title += " from " + callerName;
+ }
+ } else {
+ title = "config " + filepath;
+ }
+
+ return title;
+ },
+
+ loc(index, envName) {
+ let loc = "";
+
+ if (index != null) {
+ loc += `.overrides[${index}]`;
+ }
+
+ if (envName != null) {
+ loc += `.env["${envName}"]`;
+ }
+
+ return loc;
+ },
+
+ *optionsAndDescriptors(opt) {
+ const content = Object.assign({}, opt.options);
+ delete content.overrides;
+ delete content.env;
+ const pluginDescriptors = [...(yield* opt.plugins())];
+
+ if (pluginDescriptors.length) {
+ content.plugins = pluginDescriptors.map(d => descriptorToConfig(d));
+ }
+
+ const presetDescriptors = [...(yield* opt.presets())];
+
+ if (presetDescriptors.length) {
+ content.presets = [...presetDescriptors].map(d => descriptorToConfig(d));
+ }
+
+ return JSON.stringify(content, undefined, 2);
+ }
+
+};
+
+function descriptorToConfig(d) {
+ var _d$file;
+
+ let name = (_d$file = d.file) == null ? void 0 : _d$file.request;
+
+ if (name == null) {
+ if (typeof d.value === "object") {
+ name = d.value;
+ } else if (typeof d.value === "function") {
+ name = `[Function: ${d.value.toString().substr(0, 50)} ... ]`;
+ }
+ }
+
+ if (name == null) {
+ name = "[Unknown]";
+ }
+
+ if (d.options === undefined) {
+ return name;
+ } else if (d.name == null) {
+ return [name, d.options];
+ } else {
+ return [name, d.options, d.name];
+ }
+}
+
+class ConfigPrinter {
+ constructor() {
+ this._stack = [];
+ }
+
+ configure(enabled, type, {
+ callerName,
+ filepath
+ }) {
+ if (!enabled) return () => {};
+ return (content, index, envName) => {
+ this._stack.push({
+ type,
+ callerName,
+ filepath,
+ content,
+ index,
+ envName
+ });
+ };
+ }
+
+ static *format(config) {
+ let title = Formatter.title(config.type, config.callerName, config.filepath);
+ const loc = Formatter.loc(config.index, config.envName);
+ if (loc) title += ` ${loc}`;
+ const content = yield* Formatter.optionsAndDescriptors(config.content);
+ return `${title}\n${content}`;
+ }
+
+ *output() {
+ if (this._stack.length === 0) return "";
+ const configs = yield* _gensync().all(this._stack.map(s => ConfigPrinter.format(s)));
+ return configs.join("\n\n");
+ }
+
+}
+
+exports.ConfigPrinter = ConfigPrinter; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/resolve-targets-browser.js b/node_modules/@babel/core/lib/config/resolve-targets-browser.js
new file mode 100644
index 0000000..cc4e518
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/resolve-targets-browser.js
@@ -0,0 +1,42 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.resolveBrowserslistConfigFile = resolveBrowserslistConfigFile;
+exports.resolveTargets = resolveTargets;
+
+function _helperCompilationTargets() {
+ const data = require("@babel/helper-compilation-targets");
+
+ _helperCompilationTargets = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function resolveBrowserslistConfigFile(browserslistConfigFile, configFilePath) {
+ return undefined;
+}
+
+function resolveTargets(options, root) {
+ let targets = options.targets;
+
+ if (typeof targets === "string" || Array.isArray(targets)) {
+ targets = {
+ browsers: targets
+ };
+ }
+
+ if (targets && targets.esmodules) {
+ targets = Object.assign({}, targets, {
+ esmodules: "intersect"
+ });
+ }
+
+ return (0, _helperCompilationTargets().default)(targets, {
+ ignoreBrowserslistConfig: true,
+ browserslistEnv: options.browserslistEnv
+ });
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/resolve-targets.js b/node_modules/@babel/core/lib/config/resolve-targets.js
new file mode 100644
index 0000000..973e3d5
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/resolve-targets.js
@@ -0,0 +1,68 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.resolveBrowserslistConfigFile = resolveBrowserslistConfigFile;
+exports.resolveTargets = resolveTargets;
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _helperCompilationTargets() {
+ const data = require("@babel/helper-compilation-targets");
+
+ _helperCompilationTargets = function () {
+ return data;
+ };
+
+ return data;
+}
+
+({});
+
+function resolveBrowserslistConfigFile(browserslistConfigFile, configFileDir) {
+ return _path().resolve(configFileDir, browserslistConfigFile);
+}
+
+function resolveTargets(options, root) {
+ let targets = options.targets;
+
+ if (typeof targets === "string" || Array.isArray(targets)) {
+ targets = {
+ browsers: targets
+ };
+ }
+
+ if (targets && targets.esmodules) {
+ targets = Object.assign({}, targets, {
+ esmodules: "intersect"
+ });
+ }
+
+ const {
+ browserslistConfigFile
+ } = options;
+ let configFile;
+ let ignoreBrowserslistConfig = false;
+
+ if (typeof browserslistConfigFile === "string") {
+ configFile = browserslistConfigFile;
+ } else {
+ ignoreBrowserslistConfig = browserslistConfigFile === false;
+ }
+
+ return (0, _helperCompilationTargets().default)(targets, {
+ ignoreBrowserslistConfig,
+ configFile,
+ configPath: root,
+ browserslistEnv: options.browserslistEnv
+ });
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/util.js b/node_modules/@babel/core/lib/config/util.js
new file mode 100644
index 0000000..1fc2d3d
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/util.js
@@ -0,0 +1,31 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isIterableIterator = isIterableIterator;
+exports.mergeOptions = mergeOptions;
+
+function mergeOptions(target, source) {
+ for (const k of Object.keys(source)) {
+ if ((k === "parserOpts" || k === "generatorOpts" || k === "assumptions") && source[k]) {
+ const parserOpts = source[k];
+ const targetObj = target[k] || (target[k] = {});
+ mergeDefaultFields(targetObj, parserOpts);
+ } else {
+ const val = source[k];
+ if (val !== undefined) target[k] = val;
+ }
+ }
+}
+
+function mergeDefaultFields(target, source) {
+ for (const k of Object.keys(source)) {
+ const val = source[k];
+ if (val !== undefined) target[k] = val;
+ }
+}
+
+function isIterableIterator(value) {
+ return !!value && typeof value.next === "function" && typeof value[Symbol.iterator] === "function";
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/validation/option-assertions.js b/node_modules/@babel/core/lib/config/validation/option-assertions.js
new file mode 100644
index 0000000..9a0b4a4
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/validation/option-assertions.js
@@ -0,0 +1,352 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.access = access;
+exports.assertArray = assertArray;
+exports.assertAssumptions = assertAssumptions;
+exports.assertBabelrcSearch = assertBabelrcSearch;
+exports.assertBoolean = assertBoolean;
+exports.assertCallerMetadata = assertCallerMetadata;
+exports.assertCompact = assertCompact;
+exports.assertConfigApplicableTest = assertConfigApplicableTest;
+exports.assertConfigFileSearch = assertConfigFileSearch;
+exports.assertFunction = assertFunction;
+exports.assertIgnoreList = assertIgnoreList;
+exports.assertInputSourceMap = assertInputSourceMap;
+exports.assertObject = assertObject;
+exports.assertPluginList = assertPluginList;
+exports.assertRootMode = assertRootMode;
+exports.assertSourceMaps = assertSourceMaps;
+exports.assertSourceType = assertSourceType;
+exports.assertString = assertString;
+exports.assertTargets = assertTargets;
+exports.msg = msg;
+
+function _helperCompilationTargets() {
+ const data = require("@babel/helper-compilation-targets");
+
+ _helperCompilationTargets = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _options = require("./options");
+
+function msg(loc) {
+ switch (loc.type) {
+ case "root":
+ return ``;
+
+ case "env":
+ return `${msg(loc.parent)}.env["${loc.name}"]`;
+
+ case "overrides":
+ return `${msg(loc.parent)}.overrides[${loc.index}]`;
+
+ case "option":
+ return `${msg(loc.parent)}.${loc.name}`;
+
+ case "access":
+ return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;
+
+ default:
+ throw new Error(`Assertion failure: Unknown type ${loc.type}`);
+ }
+}
+
+function access(loc, name) {
+ return {
+ type: "access",
+ name,
+ parent: loc
+ };
+}
+
+function assertRootMode(loc, value) {
+ if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") {
+ throw new Error(`${msg(loc)} must be a "root", "upward", "upward-optional" or undefined`);
+ }
+
+ return value;
+}
+
+function assertSourceMaps(loc, value) {
+ if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") {
+ throw new Error(`${msg(loc)} must be a boolean, "inline", "both", or undefined`);
+ }
+
+ return value;
+}
+
+function assertCompact(loc, value) {
+ if (value !== undefined && typeof value !== "boolean" && value !== "auto") {
+ throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`);
+ }
+
+ return value;
+}
+
+function assertSourceType(loc, value) {
+ if (value !== undefined && value !== "module" && value !== "script" && value !== "unambiguous") {
+ throw new Error(`${msg(loc)} must be "module", "script", "unambiguous", or undefined`);
+ }
+
+ return value;
+}
+
+function assertCallerMetadata(loc, value) {
+ const obj = assertObject(loc, value);
+
+ if (obj) {
+ if (typeof obj.name !== "string") {
+ throw new Error(`${msg(loc)} set but does not contain "name" property string`);
+ }
+
+ for (const prop of Object.keys(obj)) {
+ const propLoc = access(loc, prop);
+ const value = obj[prop];
+
+ if (value != null && typeof value !== "boolean" && typeof value !== "string" && typeof value !== "number") {
+ throw new Error(`${msg(propLoc)} must be null, undefined, a boolean, a string, or a number.`);
+ }
+ }
+ }
+
+ return value;
+}
+
+function assertInputSourceMap(loc, value) {
+ if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) {
+ throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);
+ }
+
+ return value;
+}
+
+function assertString(loc, value) {
+ if (value !== undefined && typeof value !== "string") {
+ throw new Error(`${msg(loc)} must be a string, or undefined`);
+ }
+
+ return value;
+}
+
+function assertFunction(loc, value) {
+ if (value !== undefined && typeof value !== "function") {
+ throw new Error(`${msg(loc)} must be a function, or undefined`);
+ }
+
+ return value;
+}
+
+function assertBoolean(loc, value) {
+ if (value !== undefined && typeof value !== "boolean") {
+ throw new Error(`${msg(loc)} must be a boolean, or undefined`);
+ }
+
+ return value;
+}
+
+function assertObject(loc, value) {
+ if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) {
+ throw new Error(`${msg(loc)} must be an object, or undefined`);
+ }
+
+ return value;
+}
+
+function assertArray(loc, value) {
+ if (value != null && !Array.isArray(value)) {
+ throw new Error(`${msg(loc)} must be an array, or undefined`);
+ }
+
+ return value;
+}
+
+function assertIgnoreList(loc, value) {
+ const arr = assertArray(loc, value);
+
+ if (arr) {
+ arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item));
+ }
+
+ return arr;
+}
+
+function assertIgnoreItem(loc, value) {
+ if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) {
+ throw new Error(`${msg(loc)} must be an array of string/Function/RegExp values, or undefined`);
+ }
+
+ return value;
+}
+
+function assertConfigApplicableTest(loc, value) {
+ if (value === undefined) return value;
+
+ if (Array.isArray(value)) {
+ value.forEach((item, i) => {
+ if (!checkValidTest(item)) {
+ throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
+ }
+ });
+ } else if (!checkValidTest(value)) {
+ throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`);
+ }
+
+ return value;
+}
+
+function checkValidTest(value) {
+ return typeof value === "string" || typeof value === "function" || value instanceof RegExp;
+}
+
+function assertConfigFileSearch(loc, value) {
+ if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") {
+ throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, ` + `got ${JSON.stringify(value)}`);
+ }
+
+ return value;
+}
+
+function assertBabelrcSearch(loc, value) {
+ if (value === undefined || typeof value === "boolean") return value;
+
+ if (Array.isArray(value)) {
+ value.forEach((item, i) => {
+ if (!checkValidTest(item)) {
+ throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
+ }
+ });
+ } else if (!checkValidTest(value)) {
+ throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` + `or an array of those, got ${JSON.stringify(value)}`);
+ }
+
+ return value;
+}
+
+function assertPluginList(loc, value) {
+ const arr = assertArray(loc, value);
+
+ if (arr) {
+ arr.forEach((item, i) => assertPluginItem(access(loc, i), item));
+ }
+
+ return arr;
+}
+
+function assertPluginItem(loc, value) {
+ if (Array.isArray(value)) {
+ if (value.length === 0) {
+ throw new Error(`${msg(loc)} must include an object`);
+ }
+
+ if (value.length > 3) {
+ throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);
+ }
+
+ assertPluginTarget(access(loc, 0), value[0]);
+
+ if (value.length > 1) {
+ const opts = value[1];
+
+ if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) {
+ throw new Error(`${msg(access(loc, 1))} must be an object, false, or undefined`);
+ }
+ }
+
+ if (value.length === 3) {
+ const name = value[2];
+
+ if (name !== undefined && typeof name !== "string") {
+ throw new Error(`${msg(access(loc, 2))} must be a string, or undefined`);
+ }
+ }
+ } else {
+ assertPluginTarget(loc, value);
+ }
+
+ return value;
+}
+
+function assertPluginTarget(loc, value) {
+ if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") {
+ throw new Error(`${msg(loc)} must be a string, object, function`);
+ }
+
+ return value;
+}
+
+function assertTargets(loc, value) {
+ if ((0, _helperCompilationTargets().isBrowsersQueryValid)(value)) return value;
+
+ if (typeof value !== "object" || !value || Array.isArray(value)) {
+ throw new Error(`${msg(loc)} must be a string, an array of strings or an object`);
+ }
+
+ const browsersLoc = access(loc, "browsers");
+ const esmodulesLoc = access(loc, "esmodules");
+ assertBrowsersList(browsersLoc, value.browsers);
+ assertBoolean(esmodulesLoc, value.esmodules);
+
+ for (const key of Object.keys(value)) {
+ const val = value[key];
+ const subLoc = access(loc, key);
+ if (key === "esmodules") assertBoolean(subLoc, val);else if (key === "browsers") assertBrowsersList(subLoc, val);else if (!Object.hasOwnProperty.call(_helperCompilationTargets().TargetNames, key)) {
+ const validTargets = Object.keys(_helperCompilationTargets().TargetNames).join(", ");
+ throw new Error(`${msg(subLoc)} is not a valid target. Supported targets are ${validTargets}`);
+ } else assertBrowserVersion(subLoc, val);
+ }
+
+ return value;
+}
+
+function assertBrowsersList(loc, value) {
+ if (value !== undefined && !(0, _helperCompilationTargets().isBrowsersQueryValid)(value)) {
+ throw new Error(`${msg(loc)} must be undefined, a string or an array of strings`);
+ }
+}
+
+function assertBrowserVersion(loc, value) {
+ if (typeof value === "number" && Math.round(value) === value) return;
+ if (typeof value === "string") return;
+ throw new Error(`${msg(loc)} must be a string or an integer number`);
+}
+
+function assertAssumptions(loc, value) {
+ if (value === undefined) return;
+
+ if (typeof value !== "object" || value === null) {
+ throw new Error(`${msg(loc)} must be an object or undefined.`);
+ }
+
+ let root = loc;
+
+ do {
+ root = root.parent;
+ } while (root.type !== "root");
+
+ const inPreset = root.source === "preset";
+
+ for (const name of Object.keys(value)) {
+ const subLoc = access(loc, name);
+
+ if (!_options.assumptionsNames.has(name)) {
+ throw new Error(`${msg(subLoc)} is not a supported assumption.`);
+ }
+
+ if (typeof value[name] !== "boolean") {
+ throw new Error(`${msg(subLoc)} must be a boolean.`);
+ }
+
+ if (inPreset && value[name] === false) {
+ throw new Error(`${msg(subLoc)} cannot be set to 'false' inside presets.`);
+ }
+ }
+
+ return value;
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/validation/options.js b/node_modules/@babel/core/lib/config/validation/options.js
new file mode 100644
index 0000000..930278c
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/validation/options.js
@@ -0,0 +1,210 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.assumptionsNames = void 0;
+exports.checkNoUnwrappedItemOptionPairs = checkNoUnwrappedItemOptionPairs;
+exports.validate = validate;
+
+var _plugin = require("../plugin");
+
+var _removed = require("./removed");
+
+var _optionAssertions = require("./option-assertions");
+
+const ROOT_VALIDATORS = {
+ cwd: _optionAssertions.assertString,
+ root: _optionAssertions.assertString,
+ rootMode: _optionAssertions.assertRootMode,
+ configFile: _optionAssertions.assertConfigFileSearch,
+ caller: _optionAssertions.assertCallerMetadata,
+ filename: _optionAssertions.assertString,
+ filenameRelative: _optionAssertions.assertString,
+ code: _optionAssertions.assertBoolean,
+ ast: _optionAssertions.assertBoolean,
+ cloneInputAst: _optionAssertions.assertBoolean,
+ envName: _optionAssertions.assertString
+};
+const BABELRC_VALIDATORS = {
+ babelrc: _optionAssertions.assertBoolean,
+ babelrcRoots: _optionAssertions.assertBabelrcSearch
+};
+const NONPRESET_VALIDATORS = {
+ extends: _optionAssertions.assertString,
+ ignore: _optionAssertions.assertIgnoreList,
+ only: _optionAssertions.assertIgnoreList,
+ targets: _optionAssertions.assertTargets,
+ browserslistConfigFile: _optionAssertions.assertConfigFileSearch,
+ browserslistEnv: _optionAssertions.assertString
+};
+const COMMON_VALIDATORS = {
+ inputSourceMap: _optionAssertions.assertInputSourceMap,
+ presets: _optionAssertions.assertPluginList,
+ plugins: _optionAssertions.assertPluginList,
+ passPerPreset: _optionAssertions.assertBoolean,
+ assumptions: _optionAssertions.assertAssumptions,
+ env: assertEnvSet,
+ overrides: assertOverridesList,
+ test: _optionAssertions.assertConfigApplicableTest,
+ include: _optionAssertions.assertConfigApplicableTest,
+ exclude: _optionAssertions.assertConfigApplicableTest,
+ retainLines: _optionAssertions.assertBoolean,
+ comments: _optionAssertions.assertBoolean,
+ shouldPrintComment: _optionAssertions.assertFunction,
+ compact: _optionAssertions.assertCompact,
+ minified: _optionAssertions.assertBoolean,
+ auxiliaryCommentBefore: _optionAssertions.assertString,
+ auxiliaryCommentAfter: _optionAssertions.assertString,
+ sourceType: _optionAssertions.assertSourceType,
+ wrapPluginVisitorMethod: _optionAssertions.assertFunction,
+ highlightCode: _optionAssertions.assertBoolean,
+ sourceMaps: _optionAssertions.assertSourceMaps,
+ sourceMap: _optionAssertions.assertSourceMaps,
+ sourceFileName: _optionAssertions.assertString,
+ sourceRoot: _optionAssertions.assertString,
+ parserOpts: _optionAssertions.assertObject,
+ generatorOpts: _optionAssertions.assertObject
+};
+{
+ Object.assign(COMMON_VALIDATORS, {
+ getModuleId: _optionAssertions.assertFunction,
+ moduleRoot: _optionAssertions.assertString,
+ moduleIds: _optionAssertions.assertBoolean,
+ moduleId: _optionAssertions.assertString
+ });
+}
+const assumptionsNames = new Set(["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "objectRestNoSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"]);
+exports.assumptionsNames = assumptionsNames;
+
+function getSource(loc) {
+ return loc.type === "root" ? loc.source : getSource(loc.parent);
+}
+
+function validate(type, opts) {
+ return validateNested({
+ type: "root",
+ source: type
+ }, opts);
+}
+
+function validateNested(loc, opts) {
+ const type = getSource(loc);
+ assertNoDuplicateSourcemap(opts);
+ Object.keys(opts).forEach(key => {
+ const optLoc = {
+ type: "option",
+ name: key,
+ parent: loc
+ };
+
+ if (type === "preset" && NONPRESET_VALIDATORS[key]) {
+ throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in preset options`);
+ }
+
+ if (type !== "arguments" && ROOT_VALIDATORS[key]) {
+ throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options`);
+ }
+
+ if (type !== "arguments" && type !== "configfile" && BABELRC_VALIDATORS[key]) {
+ if (type === "babelrcfile" || type === "extendsfile") {
+ throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, ` + `or babel.config.js/config file options`);
+ }
+
+ throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options, or babel.config.js/config file options`);
+ }
+
+ const validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError;
+ validator(optLoc, opts[key]);
+ });
+ return opts;
+}
+
+function throwUnknownError(loc) {
+ const key = loc.name;
+
+ if (_removed.default[key]) {
+ const {
+ message,
+ version = 5
+ } = _removed.default[key];
+ throw new Error(`Using removed Babel ${version} option: ${(0, _optionAssertions.msg)(loc)} - ${message}`);
+ } else {
+ const unknownOptErr = new Error(`Unknown option: ${(0, _optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`);
+ unknownOptErr.code = "BABEL_UNKNOWN_OPTION";
+ throw unknownOptErr;
+ }
+}
+
+function has(obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key);
+}
+
+function assertNoDuplicateSourcemap(opts) {
+ if (has(opts, "sourceMap") && has(opts, "sourceMaps")) {
+ throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both");
+ }
+}
+
+function assertEnvSet(loc, value) {
+ if (loc.parent.type === "env") {
+ throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside of another .env block`);
+ }
+
+ const parent = loc.parent;
+ const obj = (0, _optionAssertions.assertObject)(loc, value);
+
+ if (obj) {
+ for (const envName of Object.keys(obj)) {
+ const env = (0, _optionAssertions.assertObject)((0, _optionAssertions.access)(loc, envName), obj[envName]);
+ if (!env) continue;
+ const envLoc = {
+ type: "env",
+ name: envName,
+ parent
+ };
+ validateNested(envLoc, env);
+ }
+ }
+
+ return obj;
+}
+
+function assertOverridesList(loc, value) {
+ if (loc.parent.type === "env") {
+ throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .env block`);
+ }
+
+ if (loc.parent.type === "overrides") {
+ throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .overrides block`);
+ }
+
+ const parent = loc.parent;
+ const arr = (0, _optionAssertions.assertArray)(loc, value);
+
+ if (arr) {
+ for (const [index, item] of arr.entries()) {
+ const objLoc = (0, _optionAssertions.access)(loc, index);
+ const env = (0, _optionAssertions.assertObject)(objLoc, item);
+ if (!env) throw new Error(`${(0, _optionAssertions.msg)(objLoc)} must be an object`);
+ const overridesLoc = {
+ type: "overrides",
+ index,
+ parent
+ };
+ validateNested(overridesLoc, env);
+ }
+ }
+
+ return arr;
+}
+
+function checkNoUnwrappedItemOptionPairs(items, index, type, e) {
+ if (index === 0) return;
+ const lastItem = items[index - 1];
+ const thisItem = items[index];
+
+ if (lastItem.file && lastItem.options === undefined && typeof thisItem.value === "object") {
+ e.message += `\n- Maybe you meant to use\n` + `"${type}s": [\n ["${lastItem.file.request}", ${JSON.stringify(thisItem.value, undefined, 2)}]\n]\n` + `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/validation/plugins.js b/node_modules/@babel/core/lib/config/validation/plugins.js
new file mode 100644
index 0000000..a70cc67
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/validation/plugins.js
@@ -0,0 +1,71 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.validatePluginObject = validatePluginObject;
+
+var _optionAssertions = require("./option-assertions");
+
+const VALIDATORS = {
+ name: _optionAssertions.assertString,
+ manipulateOptions: _optionAssertions.assertFunction,
+ pre: _optionAssertions.assertFunction,
+ post: _optionAssertions.assertFunction,
+ inherits: _optionAssertions.assertFunction,
+ visitor: assertVisitorMap,
+ parserOverride: _optionAssertions.assertFunction,
+ generatorOverride: _optionAssertions.assertFunction
+};
+
+function assertVisitorMap(loc, value) {
+ const obj = (0, _optionAssertions.assertObject)(loc, value);
+
+ if (obj) {
+ Object.keys(obj).forEach(prop => assertVisitorHandler(prop, obj[prop]));
+
+ if (obj.enter || obj.exit) {
+ throw new Error(`${(0, _optionAssertions.msg)(loc)} cannot contain catch-all "enter" or "exit" handlers. Please target individual nodes.`);
+ }
+ }
+
+ return obj;
+}
+
+function assertVisitorHandler(key, value) {
+ if (value && typeof value === "object") {
+ Object.keys(value).forEach(handler => {
+ if (handler !== "enter" && handler !== "exit") {
+ throw new Error(`.visitor["${key}"] may only have .enter and/or .exit handlers.`);
+ }
+ });
+ } else if (typeof value !== "function") {
+ throw new Error(`.visitor["${key}"] must be a function`);
+ }
+
+ return value;
+}
+
+function validatePluginObject(obj) {
+ const rootPath = {
+ type: "root",
+ source: "plugin"
+ };
+ Object.keys(obj).forEach(key => {
+ const validator = VALIDATORS[key];
+
+ if (validator) {
+ const optLoc = {
+ type: "option",
+ name: key,
+ parent: rootPath
+ };
+ validator(optLoc, obj[key]);
+ } else {
+ const invalidPluginPropertyError = new Error(`.${key} is not a valid Plugin property`);
+ invalidPluginPropertyError.code = "BABEL_UNKNOWN_PLUGIN_PROPERTY";
+ throw invalidPluginPropertyError;
+ }
+ });
+ return obj;
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/config/validation/removed.js b/node_modules/@babel/core/lib/config/validation/removed.js
new file mode 100644
index 0000000..f0fcd7d
--- /dev/null
+++ b/node_modules/@babel/core/lib/config/validation/removed.js
@@ -0,0 +1,66 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+var _default = {
+ 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: "The `sourceMapName` option has been removed because it makes more sense for the " + "tooling that calls Babel to assign `map.file` themselves."
+ },
+ 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"
+ },
+ resolveModuleSource: {
+ version: 6,
+ message: "Use `babel-plugin-module-resolver@3`'s 'resolvePath' options"
+ },
+ metadata: {
+ version: 6,
+ message: "Generated plugin metadata is always included in the output result"
+ },
+ sourceMapTarget: {
+ version: 6,
+ message: "The `sourceMapTarget` option has been removed because it makes more sense for the tooling " + "that calls Babel to assign `map.file` themselves."
+ }
+};
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/gensync-utils/async.js b/node_modules/@babel/core/lib/gensync-utils/async.js
new file mode 100644
index 0000000..7deb186
--- /dev/null
+++ b/node_modules/@babel/core/lib/gensync-utils/async.js
@@ -0,0 +1,94 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.forwardAsync = forwardAsync;
+exports.isAsync = void 0;
+exports.isThenable = isThenable;
+exports.maybeAsync = maybeAsync;
+exports.waitFor = exports.onFirstPause = void 0;
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+const id = x => x;
+
+const runGenerator = _gensync()(function* (item) {
+ return yield* item;
+});
+
+const isAsync = _gensync()({
+ sync: () => false,
+ errback: cb => cb(null, true)
+});
+
+exports.isAsync = isAsync;
+
+function maybeAsync(fn, message) {
+ return _gensync()({
+ sync(...args) {
+ const result = fn.apply(this, args);
+ if (isThenable(result)) throw new Error(message);
+ return result;
+ },
+
+ async(...args) {
+ return Promise.resolve(fn.apply(this, args));
+ }
+
+ });
+}
+
+const withKind = _gensync()({
+ sync: cb => cb("sync"),
+ async: cb => cb("async")
+});
+
+function forwardAsync(action, cb) {
+ const g = _gensync()(action);
+
+ return withKind(kind => {
+ const adapted = g[kind];
+ return cb(adapted);
+ });
+}
+
+const onFirstPause = _gensync()({
+ name: "onFirstPause",
+ arity: 2,
+ sync: function (item) {
+ return runGenerator.sync(item);
+ },
+ errback: function (item, firstPause, cb) {
+ let completed = false;
+ runGenerator.errback(item, (err, value) => {
+ completed = true;
+ cb(err, value);
+ });
+
+ if (!completed) {
+ firstPause();
+ }
+ }
+});
+
+exports.onFirstPause = onFirstPause;
+
+const waitFor = _gensync()({
+ sync: id,
+ async: id
+});
+
+exports.waitFor = waitFor;
+
+function isThenable(val) {
+ return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/gensync-utils/fs.js b/node_modules/@babel/core/lib/gensync-utils/fs.js
new file mode 100644
index 0000000..056ae34
--- /dev/null
+++ b/node_modules/@babel/core/lib/gensync-utils/fs.js
@@ -0,0 +1,40 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.stat = exports.readFile = void 0;
+
+function _fs() {
+ const data = require("fs");
+
+ _fs = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+const readFile = _gensync()({
+ sync: _fs().readFileSync,
+ errback: _fs().readFile
+});
+
+exports.readFile = readFile;
+
+const stat = _gensync()({
+ sync: _fs().statSync,
+ errback: _fs().stat
+});
+
+exports.stat = stat; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/index.js b/node_modules/@babel/core/lib/index.js
new file mode 100644
index 0000000..f25de73
--- /dev/null
+++ b/node_modules/@babel/core/lib/index.js
@@ -0,0 +1,266 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.DEFAULT_EXTENSIONS = void 0;
+Object.defineProperty(exports, "File", {
+ enumerable: true,
+ get: function () {
+ return _file.default;
+ }
+});
+exports.OptionManager = void 0;
+exports.Plugin = Plugin;
+Object.defineProperty(exports, "buildExternalHelpers", {
+ enumerable: true,
+ get: function () {
+ return _buildExternalHelpers.default;
+ }
+});
+Object.defineProperty(exports, "createConfigItem", {
+ enumerable: true,
+ get: function () {
+ return _config.createConfigItem;
+ }
+});
+Object.defineProperty(exports, "createConfigItemAsync", {
+ enumerable: true,
+ get: function () {
+ return _config.createConfigItemAsync;
+ }
+});
+Object.defineProperty(exports, "createConfigItemSync", {
+ enumerable: true,
+ get: function () {
+ return _config.createConfigItemSync;
+ }
+});
+Object.defineProperty(exports, "getEnv", {
+ enumerable: true,
+ get: function () {
+ return _environment.getEnv;
+ }
+});
+Object.defineProperty(exports, "loadOptions", {
+ enumerable: true,
+ get: function () {
+ return _config.loadOptions;
+ }
+});
+Object.defineProperty(exports, "loadOptionsAsync", {
+ enumerable: true,
+ get: function () {
+ return _config.loadOptionsAsync;
+ }
+});
+Object.defineProperty(exports, "loadOptionsSync", {
+ enumerable: true,
+ get: function () {
+ return _config.loadOptionsSync;
+ }
+});
+Object.defineProperty(exports, "loadPartialConfig", {
+ enumerable: true,
+ get: function () {
+ return _config.loadPartialConfig;
+ }
+});
+Object.defineProperty(exports, "loadPartialConfigAsync", {
+ enumerable: true,
+ get: function () {
+ return _config.loadPartialConfigAsync;
+ }
+});
+Object.defineProperty(exports, "loadPartialConfigSync", {
+ enumerable: true,
+ get: function () {
+ return _config.loadPartialConfigSync;
+ }
+});
+Object.defineProperty(exports, "parse", {
+ enumerable: true,
+ get: function () {
+ return _parse.parse;
+ }
+});
+Object.defineProperty(exports, "parseAsync", {
+ enumerable: true,
+ get: function () {
+ return _parse.parseAsync;
+ }
+});
+Object.defineProperty(exports, "parseSync", {
+ enumerable: true,
+ get: function () {
+ return _parse.parseSync;
+ }
+});
+Object.defineProperty(exports, "resolvePlugin", {
+ enumerable: true,
+ get: function () {
+ return _files.resolvePlugin;
+ }
+});
+Object.defineProperty(exports, "resolvePreset", {
+ enumerable: true,
+ get: function () {
+ return _files.resolvePreset;
+ }
+});
+Object.defineProperty(exports, "template", {
+ enumerable: true,
+ get: function () {
+ return _template().default;
+ }
+});
+Object.defineProperty(exports, "tokTypes", {
+ enumerable: true,
+ get: function () {
+ return _parser().tokTypes;
+ }
+});
+Object.defineProperty(exports, "transform", {
+ enumerable: true,
+ get: function () {
+ return _transform.transform;
+ }
+});
+Object.defineProperty(exports, "transformAsync", {
+ enumerable: true,
+ get: function () {
+ return _transform.transformAsync;
+ }
+});
+Object.defineProperty(exports, "transformFile", {
+ enumerable: true,
+ get: function () {
+ return _transformFile.transformFile;
+ }
+});
+Object.defineProperty(exports, "transformFileAsync", {
+ enumerable: true,
+ get: function () {
+ return _transformFile.transformFileAsync;
+ }
+});
+Object.defineProperty(exports, "transformFileSync", {
+ enumerable: true,
+ get: function () {
+ return _transformFile.transformFileSync;
+ }
+});
+Object.defineProperty(exports, "transformFromAst", {
+ enumerable: true,
+ get: function () {
+ return _transformAst.transformFromAst;
+ }
+});
+Object.defineProperty(exports, "transformFromAstAsync", {
+ enumerable: true,
+ get: function () {
+ return _transformAst.transformFromAstAsync;
+ }
+});
+Object.defineProperty(exports, "transformFromAstSync", {
+ enumerable: true,
+ get: function () {
+ return _transformAst.transformFromAstSync;
+ }
+});
+Object.defineProperty(exports, "transformSync", {
+ enumerable: true,
+ get: function () {
+ return _transform.transformSync;
+ }
+});
+Object.defineProperty(exports, "traverse", {
+ enumerable: true,
+ get: function () {
+ return _traverse().default;
+ }
+});
+exports.version = exports.types = void 0;
+
+var _file = require("./transformation/file/file");
+
+var _buildExternalHelpers = require("./tools/build-external-helpers");
+
+var _files = require("./config/files");
+
+var _environment = require("./config/helpers/environment");
+
+function _types() {
+ const data = require("@babel/types");
+
+ _types = function () {
+ return data;
+ };
+
+ return data;
+}
+
+Object.defineProperty(exports, "types", {
+ enumerable: true,
+ get: function () {
+ return _types();
+ }
+});
+
+function _parser() {
+ const data = require("@babel/parser");
+
+ _parser = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _traverse() {
+ const data = require("@babel/traverse");
+
+ _traverse = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _template() {
+ const data = require("@babel/template");
+
+ _template = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _config = require("./config");
+
+var _transform = require("./transform");
+
+var _transformFile = require("./transform-file");
+
+var _transformAst = require("./transform-ast");
+
+var _parse = require("./parse");
+
+const version = "7.17.5";
+exports.version = version;
+const DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]);
+exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS;
+
+class OptionManager {
+ init(opts) {
+ return (0, _config.loadOptions)(opts);
+ }
+
+}
+
+exports.OptionManager = OptionManager;
+
+function Plugin(alias) {
+ throw new Error(`The (${alias}) Babel 5 plugin is being run with an unsupported Babel version.`);
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/parse.js b/node_modules/@babel/core/lib/parse.js
new file mode 100644
index 0000000..783032a
--- /dev/null
+++ b/node_modules/@babel/core/lib/parse.js
@@ -0,0 +1,48 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.parseSync = exports.parseAsync = exports.parse = void 0;
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _config = require("./config");
+
+var _parser = require("./parser");
+
+var _normalizeOpts = require("./transformation/normalize-opts");
+
+const parseRunner = _gensync()(function* parse(code, opts) {
+ const config = yield* (0, _config.default)(opts);
+
+ if (config === null) {
+ return null;
+ }
+
+ return yield* (0, _parser.default)(config.passes, (0, _normalizeOpts.default)(config), code);
+});
+
+const parse = function parse(code, opts, callback) {
+ if (typeof opts === "function") {
+ callback = opts;
+ opts = undefined;
+ }
+
+ if (callback === undefined) return parseRunner.sync(code, opts);
+ parseRunner.errback(code, opts, callback);
+};
+
+exports.parse = parse;
+const parseSync = parseRunner.sync;
+exports.parseSync = parseSync;
+const parseAsync = parseRunner.async;
+exports.parseAsync = parseAsync; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/parser/index.js b/node_modules/@babel/core/lib/parser/index.js
new file mode 100644
index 0000000..254122a
--- /dev/null
+++ b/node_modules/@babel/core/lib/parser/index.js
@@ -0,0 +1,95 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = parser;
+
+function _parser() {
+ const data = require("@babel/parser");
+
+ _parser = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _codeFrame() {
+ const data = require("@babel/code-frame");
+
+ _codeFrame = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _missingPluginHelper = require("./util/missing-plugin-helper");
+
+function* parser(pluginPasses, {
+ parserOpts,
+ highlightCode = true,
+ filename = "unknown"
+}, code) {
+ try {
+ const results = [];
+
+ for (const plugins of pluginPasses) {
+ for (const plugin of plugins) {
+ const {
+ parserOverride
+ } = plugin;
+
+ if (parserOverride) {
+ const ast = parserOverride(code, parserOpts, _parser().parse);
+ if (ast !== undefined) results.push(ast);
+ }
+ }
+ }
+
+ if (results.length === 0) {
+ return (0, _parser().parse)(code, parserOpts);
+ } else if (results.length === 1) {
+ yield* [];
+
+ if (typeof results[0].then === "function") {
+ throw new Error(`You appear to be using an async parser plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
+ }
+
+ return results[0];
+ }
+
+ throw new Error("More than one plugin attempted to override parsing.");
+ } catch (err) {
+ if (err.code === "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED") {
+ err.message += "\nConsider renaming the file to '.mjs', or setting sourceType:module " + "or sourceType:unambiguous in your Babel config for this file.";
+ }
+
+ const {
+ loc,
+ missingPlugin
+ } = err;
+
+ if (loc) {
+ const codeFrame = (0, _codeFrame().codeFrameColumns)(code, {
+ start: {
+ line: loc.line,
+ column: loc.column + 1
+ }
+ }, {
+ highlightCode
+ });
+
+ if (missingPlugin) {
+ err.message = `${filename}: ` + (0, _missingPluginHelper.default)(missingPlugin[0], loc, codeFrame);
+ } else {
+ err.message = `${filename}: ${err.message}\n\n` + codeFrame;
+ }
+
+ err.code = "BABEL_PARSE_ERROR";
+ }
+
+ throw err;
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js
new file mode 100644
index 0000000..aa6ae3f
--- /dev/null
+++ b/node_modules/@babel/core/lib/parser/util/missing-plugin-helper.js
@@ -0,0 +1,323 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = generateMissingPluginMessage;
+const pluginNameMap = {
+ asyncDoExpressions: {
+ syntax: {
+ name: "@babel/plugin-syntax-async-do-expressions",
+ url: "https://git.io/JYer8"
+ }
+ },
+ classProperties: {
+ syntax: {
+ name: "@babel/plugin-syntax-class-properties",
+ url: "https://git.io/vb4yQ"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-class-properties",
+ url: "https://git.io/vb4SL"
+ }
+ },
+ classPrivateProperties: {
+ syntax: {
+ name: "@babel/plugin-syntax-class-properties",
+ url: "https://git.io/vb4yQ"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-class-properties",
+ url: "https://git.io/vb4SL"
+ }
+ },
+ classPrivateMethods: {
+ syntax: {
+ name: "@babel/plugin-syntax-class-properties",
+ url: "https://git.io/vb4yQ"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-private-methods",
+ url: "https://git.io/JvpRG"
+ }
+ },
+ classStaticBlock: {
+ syntax: {
+ name: "@babel/plugin-syntax-class-static-block",
+ url: "https://git.io/JTLB6"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-class-static-block",
+ url: "https://git.io/JTLBP"
+ }
+ },
+ decimal: {
+ syntax: {
+ name: "@babel/plugin-syntax-decimal",
+ url: "https://git.io/JfKOH"
+ }
+ },
+ decorators: {
+ syntax: {
+ name: "@babel/plugin-syntax-decorators",
+ url: "https://git.io/vb4y9"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-decorators",
+ url: "https://git.io/vb4ST"
+ }
+ },
+ doExpressions: {
+ syntax: {
+ name: "@babel/plugin-syntax-do-expressions",
+ url: "https://git.io/vb4yh"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-do-expressions",
+ url: "https://git.io/vb4S3"
+ }
+ },
+ dynamicImport: {
+ syntax: {
+ name: "@babel/plugin-syntax-dynamic-import",
+ url: "https://git.io/vb4Sv"
+ }
+ },
+ exportDefaultFrom: {
+ syntax: {
+ name: "@babel/plugin-syntax-export-default-from",
+ url: "https://git.io/vb4SO"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-export-default-from",
+ url: "https://git.io/vb4yH"
+ }
+ },
+ exportNamespaceFrom: {
+ syntax: {
+ name: "@babel/plugin-syntax-export-namespace-from",
+ url: "https://git.io/vb4Sf"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-export-namespace-from",
+ url: "https://git.io/vb4SG"
+ }
+ },
+ flow: {
+ syntax: {
+ name: "@babel/plugin-syntax-flow",
+ url: "https://git.io/vb4yb"
+ },
+ transform: {
+ name: "@babel/preset-flow",
+ url: "https://git.io/JfeDn"
+ }
+ },
+ functionBind: {
+ syntax: {
+ name: "@babel/plugin-syntax-function-bind",
+ url: "https://git.io/vb4y7"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-function-bind",
+ url: "https://git.io/vb4St"
+ }
+ },
+ functionSent: {
+ syntax: {
+ name: "@babel/plugin-syntax-function-sent",
+ url: "https://git.io/vb4yN"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-function-sent",
+ url: "https://git.io/vb4SZ"
+ }
+ },
+ importMeta: {
+ syntax: {
+ name: "@babel/plugin-syntax-import-meta",
+ url: "https://git.io/vbKK6"
+ }
+ },
+ jsx: {
+ syntax: {
+ name: "@babel/plugin-syntax-jsx",
+ url: "https://git.io/vb4yA"
+ },
+ transform: {
+ name: "@babel/preset-react",
+ url: "https://git.io/JfeDR"
+ }
+ },
+ importAssertions: {
+ syntax: {
+ name: "@babel/plugin-syntax-import-assertions",
+ url: "https://git.io/JUbkv"
+ }
+ },
+ moduleStringNames: {
+ syntax: {
+ name: "@babel/plugin-syntax-module-string-names",
+ url: "https://git.io/JTL8G"
+ }
+ },
+ numericSeparator: {
+ syntax: {
+ name: "@babel/plugin-syntax-numeric-separator",
+ url: "https://git.io/vb4Sq"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-numeric-separator",
+ url: "https://git.io/vb4yS"
+ }
+ },
+ optionalChaining: {
+ syntax: {
+ name: "@babel/plugin-syntax-optional-chaining",
+ url: "https://git.io/vb4Sc"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-optional-chaining",
+ url: "https://git.io/vb4Sk"
+ }
+ },
+ pipelineOperator: {
+ syntax: {
+ name: "@babel/plugin-syntax-pipeline-operator",
+ url: "https://git.io/vb4yj"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-pipeline-operator",
+ url: "https://git.io/vb4SU"
+ }
+ },
+ privateIn: {
+ syntax: {
+ name: "@babel/plugin-syntax-private-property-in-object",
+ url: "https://git.io/JfK3q"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-private-property-in-object",
+ url: "https://git.io/JfK3O"
+ }
+ },
+ recordAndTuple: {
+ syntax: {
+ name: "@babel/plugin-syntax-record-and-tuple",
+ url: "https://git.io/JvKp3"
+ }
+ },
+ regexpUnicodeSets: {
+ syntax: {
+ name: "@babel/plugin-syntax-unicode-sets-regex",
+ url: "https://git.io/J9GTd"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-unicode-sets-regex",
+ url: "https://git.io/J9GTQ"
+ }
+ },
+ throwExpressions: {
+ syntax: {
+ name: "@babel/plugin-syntax-throw-expressions",
+ url: "https://git.io/vb4SJ"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-throw-expressions",
+ url: "https://git.io/vb4yF"
+ }
+ },
+ typescript: {
+ syntax: {
+ name: "@babel/plugin-syntax-typescript",
+ url: "https://git.io/vb4SC"
+ },
+ transform: {
+ name: "@babel/preset-typescript",
+ url: "https://git.io/JfeDz"
+ }
+ },
+ asyncGenerators: {
+ syntax: {
+ name: "@babel/plugin-syntax-async-generators",
+ url: "https://git.io/vb4SY"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-async-generator-functions",
+ url: "https://git.io/vb4yp"
+ }
+ },
+ logicalAssignment: {
+ syntax: {
+ name: "@babel/plugin-syntax-logical-assignment-operators",
+ url: "https://git.io/vAlBp"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-logical-assignment-operators",
+ url: "https://git.io/vAlRe"
+ }
+ },
+ nullishCoalescingOperator: {
+ syntax: {
+ name: "@babel/plugin-syntax-nullish-coalescing-operator",
+ url: "https://git.io/vb4yx"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-nullish-coalescing-operator",
+ url: "https://git.io/vb4Se"
+ }
+ },
+ objectRestSpread: {
+ syntax: {
+ name: "@babel/plugin-syntax-object-rest-spread",
+ url: "https://git.io/vb4y5"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-object-rest-spread",
+ url: "https://git.io/vb4Ss"
+ }
+ },
+ optionalCatchBinding: {
+ syntax: {
+ name: "@babel/plugin-syntax-optional-catch-binding",
+ url: "https://git.io/vb4Sn"
+ },
+ transform: {
+ name: "@babel/plugin-proposal-optional-catch-binding",
+ url: "https://git.io/vb4SI"
+ }
+ }
+};
+pluginNameMap.privateIn.syntax = pluginNameMap.privateIn.transform;
+
+const getNameURLCombination = ({
+ name,
+ url
+}) => `${name} (${url})`;
+
+function generateMissingPluginMessage(missingPluginName, loc, codeFrame) {
+ let helpMessage = `Support for the experimental syntax '${missingPluginName}' isn't currently enabled ` + `(${loc.line}:${loc.column + 1}):\n\n` + codeFrame;
+ const pluginInfo = pluginNameMap[missingPluginName];
+
+ if (pluginInfo) {
+ const {
+ syntax: syntaxPlugin,
+ transform: transformPlugin
+ } = pluginInfo;
+
+ if (syntaxPlugin) {
+ const syntaxPluginInfo = getNameURLCombination(syntaxPlugin);
+
+ if (transformPlugin) {
+ const transformPluginInfo = getNameURLCombination(transformPlugin);
+ const sectionType = transformPlugin.name.startsWith("@babel/plugin") ? "plugins" : "presets";
+ helpMessage += `\n\nAdd ${transformPluginInfo} to the '${sectionType}' section of your Babel config to enable transformation.
+If you want to leave it as-is, add ${syntaxPluginInfo} to the 'plugins' section to enable parsing.`;
+ } else {
+ helpMessage += `\n\nAdd ${syntaxPluginInfo} to the 'plugins' section of your Babel config ` + `to enable parsing.`;
+ }
+ }
+ }
+
+ return helpMessage;
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/tools/build-external-helpers.js b/node_modules/@babel/core/lib/tools/build-external-helpers.js
new file mode 100644
index 0000000..94d85e7
--- /dev/null
+++ b/node_modules/@babel/core/lib/tools/build-external-helpers.js
@@ -0,0 +1,164 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+function helpers() {
+ const data = require("@babel/helpers");
+
+ helpers = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _generator() {
+ const data = require("@babel/generator");
+
+ _generator = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _template() {
+ const data = require("@babel/template");
+
+ _template = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _t() {
+ const data = require("@babel/types");
+
+ _t = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _file = require("../transformation/file/file");
+
+const {
+ arrayExpression,
+ assignmentExpression,
+ binaryExpression,
+ blockStatement,
+ callExpression,
+ cloneNode,
+ conditionalExpression,
+ exportNamedDeclaration,
+ exportSpecifier,
+ expressionStatement,
+ functionExpression,
+ identifier,
+ memberExpression,
+ objectExpression,
+ program,
+ stringLiteral,
+ unaryExpression,
+ variableDeclaration,
+ variableDeclarator
+} = _t();
+
+const buildUmdWrapper = replacements => _template().default.statement`
+ (function (root, factory) {
+ if (typeof define === "function" && define.amd) {
+ define(AMD_ARGUMENTS, factory);
+ } else if (typeof exports === "object") {
+ factory(COMMON_ARGUMENTS);
+ } else {
+ factory(BROWSER_ARGUMENTS);
+ }
+ })(UMD_ROOT, function (FACTORY_PARAMETERS) {
+ FACTORY_BODY
+ });
+ `(replacements);
+
+function buildGlobal(allowlist) {
+ const namespace = identifier("babelHelpers");
+ const body = [];
+ const container = functionExpression(null, [identifier("global")], blockStatement(body));
+ const tree = program([expressionStatement(callExpression(container, [conditionalExpression(binaryExpression("===", unaryExpression("typeof", identifier("global")), stringLiteral("undefined")), identifier("self"), identifier("global"))]))]);
+ body.push(variableDeclaration("var", [variableDeclarator(namespace, assignmentExpression("=", memberExpression(identifier("global"), namespace), objectExpression([])))]));
+ buildHelpers(body, namespace, allowlist);
+ return tree;
+}
+
+function buildModule(allowlist) {
+ const body = [];
+ const refs = buildHelpers(body, null, allowlist);
+ body.unshift(exportNamedDeclaration(null, Object.keys(refs).map(name => {
+ return exportSpecifier(cloneNode(refs[name]), identifier(name));
+ })));
+ return program(body, [], "module");
+}
+
+function buildUmd(allowlist) {
+ const namespace = identifier("babelHelpers");
+ const body = [];
+ body.push(variableDeclaration("var", [variableDeclarator(namespace, identifier("global"))]));
+ buildHelpers(body, namespace, allowlist);
+ return program([buildUmdWrapper({
+ FACTORY_PARAMETERS: identifier("global"),
+ BROWSER_ARGUMENTS: assignmentExpression("=", memberExpression(identifier("root"), namespace), objectExpression([])),
+ COMMON_ARGUMENTS: identifier("exports"),
+ AMD_ARGUMENTS: arrayExpression([stringLiteral("exports")]),
+ FACTORY_BODY: body,
+ UMD_ROOT: identifier("this")
+ })]);
+}
+
+function buildVar(allowlist) {
+ const namespace = identifier("babelHelpers");
+ const body = [];
+ body.push(variableDeclaration("var", [variableDeclarator(namespace, objectExpression([]))]));
+ const tree = program(body);
+ buildHelpers(body, namespace, allowlist);
+ body.push(expressionStatement(namespace));
+ return tree;
+}
+
+function buildHelpers(body, namespace, allowlist) {
+ const getHelperReference = name => {
+ return namespace ? memberExpression(namespace, identifier(name)) : identifier(`_${name}`);
+ };
+
+ const refs = {};
+ helpers().list.forEach(function (name) {
+ if (allowlist && allowlist.indexOf(name) < 0) return;
+ const ref = refs[name] = getHelperReference(name);
+ helpers().ensure(name, _file.default);
+ const {
+ nodes
+ } = helpers().get(name, getHelperReference, ref);
+ body.push(...nodes);
+ });
+ return refs;
+}
+
+function _default(allowlist, outputType = "global") {
+ let tree;
+ const build = {
+ global: buildGlobal,
+ module: buildModule,
+ umd: buildUmd,
+ var: buildVar
+ }[outputType];
+
+ if (build) {
+ tree = build(allowlist);
+ } else {
+ throw new Error(`Unsupported output type ${outputType}`);
+ }
+
+ return (0, _generator().default)(tree).code;
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transform-ast.js b/node_modules/@babel/core/lib/transform-ast.js
new file mode 100644
index 0000000..61fb222
--- /dev/null
+++ b/node_modules/@babel/core/lib/transform-ast.js
@@ -0,0 +1,46 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.transformFromAstSync = exports.transformFromAstAsync = exports.transformFromAst = void 0;
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _config = require("./config");
+
+var _transformation = require("./transformation");
+
+const transformFromAstRunner = _gensync()(function* (ast, code, opts) {
+ const config = yield* (0, _config.default)(opts);
+ if (config === null) return null;
+ if (!ast) throw new Error("No AST given");
+ return yield* (0, _transformation.run)(config, code, ast);
+});
+
+const transformFromAst = function transformFromAst(ast, code, opts, callback) {
+ if (typeof opts === "function") {
+ callback = opts;
+ opts = undefined;
+ }
+
+ if (callback === undefined) {
+ return transformFromAstRunner.sync(ast, code, opts);
+ }
+
+ transformFromAstRunner.errback(ast, code, opts, callback);
+};
+
+exports.transformFromAst = transformFromAst;
+const transformFromAstSync = transformFromAstRunner.sync;
+exports.transformFromAstSync = transformFromAstSync;
+const transformFromAstAsync = transformFromAstRunner.async;
+exports.transformFromAstAsync = transformFromAstAsync; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transform-file-browser.js b/node_modules/@babel/core/lib/transform-file-browser.js
new file mode 100644
index 0000000..3371a1e
--- /dev/null
+++ b/node_modules/@babel/core/lib/transform-file-browser.js
@@ -0,0 +1,26 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.transformFile = void 0;
+exports.transformFileAsync = transformFileAsync;
+exports.transformFileSync = transformFileSync;
+
+const transformFile = function transformFile(filename, opts, callback) {
+ if (typeof opts === "function") {
+ callback = opts;
+ }
+
+ callback(new Error("Transforming files is not supported in browsers"), null);
+};
+
+exports.transformFile = transformFile;
+
+function transformFileSync() {
+ throw new Error("Transforming files is not supported in browsers");
+}
+
+function transformFileAsync() {
+ return Promise.reject(new Error("Transforming files is not supported in browsers"));
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transform-file.js b/node_modules/@babel/core/lib/transform-file.js
new file mode 100644
index 0000000..18075ff
--- /dev/null
+++ b/node_modules/@babel/core/lib/transform-file.js
@@ -0,0 +1,41 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.transformFileSync = exports.transformFileAsync = exports.transformFile = void 0;
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _config = require("./config");
+
+var _transformation = require("./transformation");
+
+var fs = require("./gensync-utils/fs");
+
+({});
+
+const transformFileRunner = _gensync()(function* (filename, opts) {
+ const options = Object.assign({}, opts, {
+ filename
+ });
+ const config = yield* (0, _config.default)(options);
+ if (config === null) return null;
+ const code = yield* fs.readFile(filename, "utf8");
+ return yield* (0, _transformation.run)(config, code);
+});
+
+const transformFile = transformFileRunner.errback;
+exports.transformFile = transformFile;
+const transformFileSync = transformFileRunner.sync;
+exports.transformFileSync = transformFileSync;
+const transformFileAsync = transformFileRunner.async;
+exports.transformFileAsync = transformFileAsync; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transform.js b/node_modules/@babel/core/lib/transform.js
new file mode 100644
index 0000000..538c3ed
--- /dev/null
+++ b/node_modules/@babel/core/lib/transform.js
@@ -0,0 +1,42 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.transformSync = exports.transformAsync = exports.transform = void 0;
+
+function _gensync() {
+ const data = require("gensync");
+
+ _gensync = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _config = require("./config");
+
+var _transformation = require("./transformation");
+
+const transformRunner = _gensync()(function* transform(code, opts) {
+ const config = yield* (0, _config.default)(opts);
+ if (config === null) return null;
+ return yield* (0, _transformation.run)(config, code);
+});
+
+const transform = function transform(code, opts, callback) {
+ if (typeof opts === "function") {
+ callback = opts;
+ opts = undefined;
+ }
+
+ if (callback === undefined) return transformRunner.sync(code, opts);
+ transformRunner.errback(code, opts, callback);
+};
+
+exports.transform = transform;
+const transformSync = transformRunner.sync;
+exports.transformSync = transformSync;
+const transformAsync = transformRunner.async;
+exports.transformAsync = transformAsync; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js
new file mode 100644
index 0000000..a3b0b41
--- /dev/null
+++ b/node_modules/@babel/core/lib/transformation/block-hoist-plugin.js
@@ -0,0 +1,94 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = loadBlockHoistPlugin;
+
+function _traverse() {
+ const data = require("@babel/traverse");
+
+ _traverse = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _plugin = require("../config/plugin");
+
+let LOADED_PLUGIN;
+
+function loadBlockHoistPlugin() {
+ if (!LOADED_PLUGIN) {
+ LOADED_PLUGIN = new _plugin.default(Object.assign({}, blockHoistPlugin, {
+ visitor: _traverse().default.explode(blockHoistPlugin.visitor)
+ }), {});
+ }
+
+ return LOADED_PLUGIN;
+}
+
+function priority(bodyNode) {
+ const priority = bodyNode == null ? void 0 : bodyNode._blockHoist;
+ if (priority == null) return 1;
+ if (priority === true) return 2;
+ return priority;
+}
+
+function stableSort(body) {
+ const buckets = Object.create(null);
+
+ for (let i = 0; i < body.length; i++) {
+ const n = body[i];
+ const p = priority(n);
+ const bucket = buckets[p] || (buckets[p] = []);
+ bucket.push(n);
+ }
+
+ const keys = Object.keys(buckets).map(k => +k).sort((a, b) => b - a);
+ let index = 0;
+
+ for (const key of keys) {
+ const bucket = buckets[key];
+
+ for (const n of bucket) {
+ body[index++] = n;
+ }
+ }
+
+ return body;
+}
+
+const blockHoistPlugin = {
+ name: "internal.blockHoist",
+ visitor: {
+ Block: {
+ exit({
+ node
+ }) {
+ const {
+ body
+ } = node;
+ let max = Math.pow(2, 30) - 1;
+ let hasChange = false;
+
+ for (let i = 0; i < body.length; i++) {
+ const n = body[i];
+ const p = priority(n);
+
+ if (p > max) {
+ hasChange = true;
+ break;
+ }
+
+ max = p;
+ }
+
+ if (!hasChange) return;
+ node.body = stableSort(body.slice());
+ }
+
+ }
+ }
+}; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transformation/file/file.js b/node_modules/@babel/core/lib/transformation/file/file.js
new file mode 100644
index 0000000..3728ec5
--- /dev/null
+++ b/node_modules/@babel/core/lib/transformation/file/file.js
@@ -0,0 +1,254 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+function helpers() {
+ const data = require("@babel/helpers");
+
+ helpers = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _traverse() {
+ const data = require("@babel/traverse");
+
+ _traverse = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _codeFrame() {
+ const data = require("@babel/code-frame");
+
+ _codeFrame = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _t() {
+ const data = require("@babel/types");
+
+ _t = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _helperModuleTransforms() {
+ const data = require("@babel/helper-module-transforms");
+
+ _helperModuleTransforms = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _semver() {
+ const data = require("semver");
+
+ _semver = function () {
+ return data;
+ };
+
+ return data;
+}
+
+const {
+ cloneNode,
+ interpreterDirective
+} = _t();
+
+const errorVisitor = {
+ enter(path, state) {
+ const loc = path.node.loc;
+
+ if (loc) {
+ state.loc = loc;
+ path.stop();
+ }
+ }
+
+};
+
+class File {
+ constructor(options, {
+ code,
+ ast,
+ inputMap
+ }) {
+ this._map = new Map();
+ this.opts = void 0;
+ this.declarations = {};
+ this.path = null;
+ this.ast = {};
+ this.scope = void 0;
+ this.metadata = {};
+ this.code = "";
+ this.inputMap = null;
+ this.hub = {
+ file: this,
+ getCode: () => this.code,
+ getScope: () => this.scope,
+ addHelper: this.addHelper.bind(this),
+ buildError: this.buildCodeFrameError.bind(this)
+ };
+ this.opts = options;
+ this.code = code;
+ this.ast = ast;
+ this.inputMap = inputMap;
+ this.path = _traverse().NodePath.get({
+ hub: this.hub,
+ parentPath: null,
+ parent: this.ast,
+ container: this.ast,
+ key: "program"
+ }).setContext();
+ this.scope = this.path.scope;
+ }
+
+ get shebang() {
+ const {
+ interpreter
+ } = this.path.node;
+ return interpreter ? interpreter.value : "";
+ }
+
+ set shebang(value) {
+ if (value) {
+ this.path.get("interpreter").replaceWith(interpreterDirective(value));
+ } else {
+ this.path.get("interpreter").remove();
+ }
+ }
+
+ set(key, val) {
+ if (key === "helpersNamespace") {
+ throw new Error("Babel 7.0.0-beta.56 has dropped support for the 'helpersNamespace' utility." + "If you are using @babel/plugin-external-helpers you will need to use a newer " + "version than the one you currently have installed. " + "If you have your own implementation, you'll want to explore using 'helperGenerator' " + "alongside 'file.availableHelper()'.");
+ }
+
+ this._map.set(key, val);
+ }
+
+ get(key) {
+ return this._map.get(key);
+ }
+
+ has(key) {
+ return this._map.has(key);
+ }
+
+ getModuleName() {
+ return (0, _helperModuleTransforms().getModuleName)(this.opts, this.opts);
+ }
+
+ addImport() {
+ throw new Error("This API has been removed. If you're looking for this " + "functionality in Babel 7, you should import the " + "'@babel/helper-module-imports' module and use the functions exposed " + " from that module, such as 'addNamed' or 'addDefault'.");
+ }
+
+ availableHelper(name, versionRange) {
+ let minVersion;
+
+ try {
+ minVersion = helpers().minVersion(name);
+ } catch (err) {
+ if (err.code !== "BABEL_HELPER_UNKNOWN") throw err;
+ return false;
+ }
+
+ if (typeof versionRange !== "string") return true;
+ if (_semver().valid(versionRange)) versionRange = `^${versionRange}`;
+ return !_semver().intersects(`<${minVersion}`, versionRange) && !_semver().intersects(`>=8.0.0`, versionRange);
+ }
+
+ addHelper(name) {
+ const declar = this.declarations[name];
+ if (declar) return cloneNode(declar);
+ const generator = this.get("helperGenerator");
+
+ if (generator) {
+ const res = generator(name);
+ if (res) return res;
+ }
+
+ helpers().ensure(name, File);
+ const uid = this.declarations[name] = this.scope.generateUidIdentifier(name);
+ const dependencies = {};
+
+ for (const dep of helpers().getDependencies(name)) {
+ dependencies[dep] = this.addHelper(dep);
+ }
+
+ const {
+ nodes,
+ globals
+ } = helpers().get(name, dep => dependencies[dep], uid, Object.keys(this.scope.getAllBindings()));
+ globals.forEach(name => {
+ if (this.path.scope.hasBinding(name, true)) {
+ this.path.scope.rename(name);
+ }
+ });
+ nodes.forEach(node => {
+ node._compact = true;
+ });
+ this.path.unshiftContainer("body", nodes);
+ this.path.get("body").forEach(path => {
+ if (nodes.indexOf(path.node) === -1) return;
+ if (path.isVariableDeclaration()) this.scope.registerDeclaration(path);
+ });
+ return uid;
+ }
+
+ addTemplateObject() {
+ throw new Error("This function has been moved into the template literal transform itself.");
+ }
+
+ buildCodeFrameError(node, msg, _Error = SyntaxError) {
+ let loc = node && (node.loc || node._loc);
+
+ if (!loc && node) {
+ const state = {
+ loc: null
+ };
+ (0, _traverse().default)(node, errorVisitor, this.scope, state);
+ loc = state.loc;
+ let txt = "This is an error on an internal node. Probably an internal error.";
+ if (loc) txt += " Location has been estimated.";
+ msg += ` (${txt})`;
+ }
+
+ if (loc) {
+ const {
+ highlightCode = true
+ } = this.opts;
+ msg += "\n" + (0, _codeFrame().codeFrameColumns)(this.code, {
+ start: {
+ line: loc.start.line,
+ column: loc.start.column + 1
+ },
+ end: loc.end && loc.start.line === loc.end.line ? {
+ line: loc.end.line,
+ column: loc.end.column + 1
+ } : undefined
+ }, {
+ highlightCode
+ });
+ }
+
+ return new _Error(msg);
+ }
+
+}
+
+exports.default = File; \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transformation/file/generate.js b/node_modules/@babel/core/lib/transformation/file/generate.js
new file mode 100644
index 0000000..def05ca
--- /dev/null
+++ b/node_modules/@babel/core/lib/transformation/file/generate.js
@@ -0,0 +1,90 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = generateCode;
+
+function _convertSourceMap() {
+ const data = require("convert-source-map");
+
+ _convertSourceMap = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _generator() {
+ const data = require("@babel/generator");
+
+ _generator = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _mergeMap = require("./merge-map");
+
+function generateCode(pluginPasses, file) {
+ const {
+ opts,
+ ast,
+ code,
+ inputMap
+ } = file;
+ const {
+ generatorOpts
+ } = opts;
+ const results = [];
+
+ for (const plugins of pluginPasses) {
+ for (const plugin of plugins) {
+ const {
+ generatorOverride
+ } = plugin;
+
+ if (generatorOverride) {
+ const result = generatorOverride(ast, generatorOpts, code, _generator().default);
+ if (result !== undefined) results.push(result);
+ }
+ }
+ }
+
+ let result;
+
+ if (results.length === 0) {
+ result = (0, _generator().default)(ast, generatorOpts, code);
+ } else if (results.length === 1) {
+ result = results[0];
+
+ if (typeof result.then === "function") {
+ throw new Error(`You appear to be using an async codegen plugin, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, ` + `you may need to upgrade your @babel/core version.`);
+ }
+ } else {
+ throw new Error("More than one plugin attempted to override codegen.");
+ }
+
+ let {
+ code: outputCode,
+ map: outputMap
+ } = result;
+
+ if (outputMap && inputMap) {
+ outputMap = (0, _mergeMap.default)(inputMap.toObject(), outputMap, generatorOpts.sourceFileName);
+ }
+
+ if (opts.sourceMaps === "inline" || opts.sourceMaps === "both") {
+ outputCode += "\n" + _convertSourceMap().fromObject(outputMap).toComment();
+ }
+
+ if (opts.sourceMaps === "inline") {
+ outputMap = null;
+ }
+
+ return {
+ outputCode,
+ outputMap
+ };
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transformation/file/merge-map.js b/node_modules/@babel/core/lib/transformation/file/merge-map.js
new file mode 100644
index 0000000..af1da89
--- /dev/null
+++ b/node_modules/@babel/core/lib/transformation/file/merge-map.js
@@ -0,0 +1,43 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = mergeSourceMap;
+
+function _remapping() {
+ const data = require("@ampproject/remapping");
+
+ _remapping = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function mergeSourceMap(inputMap, map, sourceFileName) {
+ const source = sourceFileName.replace(/\\/g, "/");
+ let found = false;
+
+ const result = _remapping()(rootless(map), (s, ctx) => {
+ if (s === source && !found) {
+ found = true;
+ ctx.source = "";
+ return rootless(inputMap);
+ }
+
+ return null;
+ });
+
+ if (typeof inputMap.sourceRoot === "string") {
+ result.sourceRoot = inputMap.sourceRoot;
+ }
+
+ return Object.assign({}, result);
+}
+
+function rootless(map) {
+ return Object.assign({}, map, {
+ sourceRoot: null
+ });
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transformation/index.js b/node_modules/@babel/core/lib/transformation/index.js
new file mode 100644
index 0000000..1f8422e
--- /dev/null
+++ b/node_modules/@babel/core/lib/transformation/index.js
@@ -0,0 +1,127 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.run = run;
+
+function _traverse() {
+ const data = require("@babel/traverse");
+
+ _traverse = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _pluginPass = require("./plugin-pass");
+
+var _blockHoistPlugin = require("./block-hoist-plugin");
+
+var _normalizeOpts = require("./normalize-opts");
+
+var _normalizeFile = require("./normalize-file");
+
+var _generate = require("./file/generate");
+
+var _deepArray = require("../config/helpers/deep-array");
+
+function* run(config, code, ast) {
+ const file = yield* (0, _normalizeFile.default)(config.passes, (0, _normalizeOpts.default)(config), code, ast);
+ const opts = file.opts;
+
+ try {
+ yield* transformFile(file, config.passes);
+ } catch (e) {
+ var _opts$filename;
+
+ e.message = `${(_opts$filename = opts.filename) != null ? _opts$filename : "unknown"}: ${e.message}`;
+
+ if (!e.code) {
+ e.code = "BABEL_TRANSFORM_ERROR";
+ }
+
+ throw e;
+ }
+
+ let outputCode, outputMap;
+
+ try {
+ if (opts.code !== false) {
+ ({
+ outputCode,
+ outputMap
+ } = (0, _generate.default)(config.passes, file));
+ }
+ } catch (e) {
+ var _opts$filename2;
+
+ e.message = `${(_opts$filename2 = opts.filename) != null ? _opts$filename2 : "unknown"}: ${e.message}`;
+
+ if (!e.code) {
+ e.code = "BABEL_GENERATE_ERROR";
+ }
+
+ throw e;
+ }
+
+ return {
+ metadata: file.metadata,
+ options: opts,
+ ast: opts.ast === true ? file.ast : null,
+ code: outputCode === undefined ? null : outputCode,
+ map: outputMap === undefined ? null : outputMap,
+ sourceType: file.ast.program.sourceType,
+ externalDependencies: (0, _deepArray.flattenToSet)(config.externalDependencies)
+ };
+}
+
+function* transformFile(file, pluginPasses) {
+ for (const pluginPairs of pluginPasses) {
+ const passPairs = [];
+ const passes = [];
+ const visitors = [];
+
+ for (const plugin of pluginPairs.concat([(0, _blockHoistPlugin.default)()])) {
+ const pass = new _pluginPass.default(file, plugin.key, plugin.options);
+ passPairs.push([plugin, pass]);
+ passes.push(pass);
+ visitors.push(plugin.visitor);
+ }
+
+ for (const [plugin, pass] of passPairs) {
+ const fn = plugin.pre;
+
+ if (fn) {
+ const result = fn.call(pass, file);
+ yield* [];
+
+ if (isThenable(result)) {
+ throw new Error(`You appear to be using an plugin with an async .pre, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
+ }
+ }
+ }
+
+ const visitor = _traverse().default.visitors.merge(visitors, passes, file.opts.wrapPluginVisitorMethod);
+
+ (0, _traverse().default)(file.ast, visitor, file.scope);
+
+ for (const [plugin, pass] of passPairs) {
+ const fn = plugin.post;
+
+ if (fn) {
+ const result = fn.call(pass, file);
+ yield* [];
+
+ if (isThenable(result)) {
+ throw new Error(`You appear to be using an plugin with an async .post, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
+ }
+ }
+ }
+ }
+}
+
+function isThenable(val) {
+ return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transformation/normalize-file.js b/node_modules/@babel/core/lib/transformation/normalize-file.js
new file mode 100644
index 0000000..dc434ed
--- /dev/null
+++ b/node_modules/@babel/core/lib/transformation/normalize-file.js
@@ -0,0 +1,167 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = normalizeFile;
+
+function _fs() {
+ const data = require("fs");
+
+ _fs = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _debug() {
+ const data = require("debug");
+
+ _debug = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _t() {
+ const data = require("@babel/types");
+
+ _t = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _convertSourceMap() {
+ const data = require("convert-source-map");
+
+ _convertSourceMap = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _file = require("./file/file");
+
+var _parser = require("../parser");
+
+var _cloneDeep = require("./util/clone-deep");
+
+const {
+ file,
+ traverseFast
+} = _t();
+
+const debug = _debug()("babel:transform:file");
+
+const LARGE_INPUT_SOURCEMAP_THRESHOLD = 1000000;
+
+function* normalizeFile(pluginPasses, options, code, ast) {
+ code = `${code || ""}`;
+
+ if (ast) {
+ if (ast.type === "Program") {
+ ast = file(ast, [], []);
+ } else if (ast.type !== "File") {
+ throw new Error("AST root must be a Program or File node");
+ }
+
+ if (options.cloneInputAst) {
+ ast = (0, _cloneDeep.default)(ast);
+ }
+ } else {
+ ast = yield* (0, _parser.default)(pluginPasses, options, code);
+ }
+
+ let inputMap = null;
+
+ if (options.inputSourceMap !== false) {
+ if (typeof options.inputSourceMap === "object") {
+ inputMap = _convertSourceMap().fromObject(options.inputSourceMap);
+ }
+
+ if (!inputMap) {
+ const lastComment = extractComments(INLINE_SOURCEMAP_REGEX, ast);
+
+ if (lastComment) {
+ try {
+ inputMap = _convertSourceMap().fromComment(lastComment);
+ } catch (err) {
+ debug("discarding unknown inline input sourcemap", err);
+ }
+ }
+ }
+
+ if (!inputMap) {
+ const lastComment = extractComments(EXTERNAL_SOURCEMAP_REGEX, ast);
+
+ if (typeof options.filename === "string" && lastComment) {
+ try {
+ const match = EXTERNAL_SOURCEMAP_REGEX.exec(lastComment);
+
+ const inputMapContent = _fs().readFileSync(_path().resolve(_path().dirname(options.filename), match[1]));
+
+ if (inputMapContent.length > LARGE_INPUT_SOURCEMAP_THRESHOLD) {
+ debug("skip merging input map > 1 MB");
+ } else {
+ inputMap = _convertSourceMap().fromJSON(inputMapContent);
+ }
+ } catch (err) {
+ debug("discarding unknown file input sourcemap", err);
+ }
+ } else if (lastComment) {
+ debug("discarding un-loadable file input sourcemap");
+ }
+ }
+ }
+
+ return new _file.default(options, {
+ code,
+ ast,
+ inputMap
+ });
+}
+
+const INLINE_SOURCEMAP_REGEX = /^[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(?:.*)$/;
+const EXTERNAL_SOURCEMAP_REGEX = /^[@#][ \t]+sourceMappingURL=([^\s'"`]+)[ \t]*$/;
+
+function extractCommentsFromList(regex, comments, lastComment) {
+ if (comments) {
+ comments = comments.filter(({
+ value
+ }) => {
+ if (regex.test(value)) {
+ lastComment = value;
+ return false;
+ }
+
+ return true;
+ });
+ }
+
+ return [comments, lastComment];
+}
+
+function extractComments(regex, ast) {
+ let lastComment = null;
+ traverseFast(ast, node => {
+ [node.leadingComments, lastComment] = extractCommentsFromList(regex, node.leadingComments, lastComment);
+ [node.innerComments, lastComment] = extractCommentsFromList(regex, node.innerComments, lastComment);
+ [node.trailingComments, lastComment] = extractCommentsFromList(regex, node.trailingComments, lastComment);
+ });
+ return lastComment;
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transformation/normalize-opts.js b/node_modules/@babel/core/lib/transformation/normalize-opts.js
new file mode 100644
index 0000000..6e2cb00
--- /dev/null
+++ b/node_modules/@babel/core/lib/transformation/normalize-opts.js
@@ -0,0 +1,62 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = normalizeOptions;
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function normalizeOptions(config) {
+ const {
+ filename,
+ cwd,
+ filenameRelative = typeof filename === "string" ? _path().relative(cwd, filename) : "unknown",
+ sourceType = "module",
+ inputSourceMap,
+ sourceMaps = !!inputSourceMap,
+ sourceRoot = config.options.moduleRoot,
+ sourceFileName = _path().basename(filenameRelative),
+ comments = true,
+ compact = "auto"
+ } = config.options;
+ const opts = config.options;
+ const options = Object.assign({}, opts, {
+ parserOpts: Object.assign({
+ sourceType: _path().extname(filenameRelative) === ".mjs" ? "module" : sourceType,
+ sourceFileName: filename,
+ plugins: []
+ }, opts.parserOpts),
+ generatorOpts: Object.assign({
+ filename,
+ auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
+ auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
+ retainLines: opts.retainLines,
+ comments,
+ shouldPrintComment: opts.shouldPrintComment,
+ compact,
+ minified: opts.minified,
+ sourceMaps,
+ sourceRoot,
+ sourceFileName
+ }, opts.generatorOpts)
+ });
+
+ for (const plugins of config.passes) {
+ for (const plugin of plugins) {
+ if (plugin.manipulateOptions) {
+ plugin.manipulateOptions(options, options.parserOpts);
+ }
+ }
+ }
+
+ return options;
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transformation/plugin-pass.js b/node_modules/@babel/core/lib/transformation/plugin-pass.js
new file mode 100644
index 0000000..920558a
--- /dev/null
+++ b/node_modules/@babel/core/lib/transformation/plugin-pass.js
@@ -0,0 +1,54 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+class PluginPass {
+ constructor(file, key, options) {
+ this._map = new Map();
+ this.key = void 0;
+ this.file = void 0;
+ this.opts = void 0;
+ this.cwd = void 0;
+ this.filename = void 0;
+ this.key = key;
+ this.file = file;
+ this.opts = options || {};
+ this.cwd = file.opts.cwd;
+ this.filename = file.opts.filename;
+ }
+
+ set(key, val) {
+ this._map.set(key, val);
+ }
+
+ get(key) {
+ return this._map.get(key);
+ }
+
+ availableHelper(name, versionRange) {
+ return this.file.availableHelper(name, versionRange);
+ }
+
+ addHelper(name) {
+ return this.file.addHelper(name);
+ }
+
+ addImport() {
+ return this.file.addImport();
+ }
+
+ buildCodeFrameError(node, msg, _Error) {
+ return this.file.buildCodeFrameError(node, msg, _Error);
+ }
+
+}
+
+exports.default = PluginPass;
+{
+ PluginPass.prototype.getModuleName = function getModuleName() {
+ return this.file.getModuleName();
+ };
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transformation/util/clone-deep-browser.js b/node_modules/@babel/core/lib/transformation/util/clone-deep-browser.js
new file mode 100644
index 0000000..a42de82
--- /dev/null
+++ b/node_modules/@babel/core/lib/transformation/util/clone-deep-browser.js
@@ -0,0 +1,25 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+const serialized = "$$ babel internal serialized type" + Math.random();
+
+function serialize(key, value) {
+ if (typeof value !== "bigint") return value;
+ return {
+ [serialized]: "BigInt",
+ value: value.toString()
+ };
+}
+
+function revive(key, value) {
+ if (!value || typeof value !== "object") return value;
+ if (value[serialized] !== "BigInt") return value;
+ return BigInt(value.value);
+}
+
+function _default(value) {
+ return JSON.parse(JSON.stringify(value, serialize), revive);
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/transformation/util/clone-deep.js b/node_modules/@babel/core/lib/transformation/util/clone-deep.js
new file mode 100644
index 0000000..35fbd09
--- /dev/null
+++ b/node_modules/@babel/core/lib/transformation/util/clone-deep.js
@@ -0,0 +1,26 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+function _v() {
+ const data = require("v8");
+
+ _v = function () {
+ return data;
+ };
+
+ return data;
+}
+
+var _cloneDeepBrowser = require("./clone-deep-browser");
+
+function _default(value) {
+ if (_v().deserialize && _v().serialize) {
+ return _v().deserialize(_v().serialize(value));
+ }
+
+ return (0, _cloneDeepBrowser.default)(value);
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/lib/vendor/import-meta-resolve.js b/node_modules/@babel/core/lib/vendor/import-meta-resolve.js
new file mode 100644
index 0000000..ce8d403
--- /dev/null
+++ b/node_modules/@babel/core/lib/vendor/import-meta-resolve.js
@@ -0,0 +1,3312 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.moduleResolve = moduleResolve;
+exports.resolve = resolve;
+
+function _url() {
+ const data = require("url");
+
+ _url = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _fs() {
+ const data = _interopRequireWildcard(require("fs"), true);
+
+ _fs = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _path() {
+ const data = require("path");
+
+ _path = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _assert() {
+ const data = require("assert");
+
+ _assert = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _util() {
+ const data = require("util");
+
+ _util = function () {
+ return data;
+ };
+
+ return data;
+}
+
+function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
+
+function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
+
+function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
+
+function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
+
+function createCommonjsModule(fn) {
+ var module = {
+ exports: {}
+ };
+ return fn(module, module.exports), module.exports;
+}
+
+const SEMVER_SPEC_VERSION = '2.0.0';
+const MAX_LENGTH$2 = 256;
+const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;
+const MAX_SAFE_COMPONENT_LENGTH = 16;
+var constants = {
+ SEMVER_SPEC_VERSION,
+ MAX_LENGTH: MAX_LENGTH$2,
+ MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
+ MAX_SAFE_COMPONENT_LENGTH
+};
+const debug = typeof process === 'object' && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error('SEMVER', ...args) : () => {};
+var debug_1 = debug;
+var re_1 = createCommonjsModule(function (module, exports) {
+ const {
+ MAX_SAFE_COMPONENT_LENGTH
+ } = constants;
+ exports = module.exports = {};
+ const re = exports.re = [];
+ const src = exports.src = [];
+ const t = exports.t = {};
+ let R = 0;
+
+ const createToken = (name, value, isGlobal) => {
+ const index = R++;
+ debug_1(index, value);
+ t[name] = index;
+ src[index] = value;
+ re[index] = new RegExp(value, isGlobal ? 'g' : undefined);
+ };
+
+ createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*');
+ createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+');
+ createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*');
+ createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})\\.` + `(${src[t.NUMERICIDENTIFIER]})`);
+ createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` + `(${src[t.NUMERICIDENTIFIERLOOSE]})`);
+ createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
+ createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
+ createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
+ createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
+ createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+');
+ createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
+ createToken('FULLPLAIN', `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
+ createToken('FULL', `^${src[t.FULLPLAIN]}$`);
+ createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
+ createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`);
+ createToken('GTLT', '((?:<|>)?=?)');
+ createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
+ createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
+ createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:\\.(${src[t.XRANGEIDENTIFIER]})` + `(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?` + `)?)?`);
+ createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` + `(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?` + `)?)?`);
+ createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
+ createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
+ createToken('COERCE', `${'(^|[^\\d])' + '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` + `(?:$|[^\\d])`);
+ createToken('COERCERTL', src[t.COERCE], true);
+ createToken('LONETILDE', '(?:~>?)');
+ createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true);
+ exports.tildeTrimReplace = '$1~';
+ createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
+ createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
+ createToken('LONECARET', '(?:\\^)');
+ createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true);
+ exports.caretTrimReplace = '$1^';
+ createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
+ createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
+ createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
+ createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
+ createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
+ exports.comparatorTrimReplace = '$1$2$3';
+ createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAIN]})` + `\\s*$`);
+ createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` + `\\s+-\\s+` + `(${src[t.XRANGEPLAINLOOSE]})` + `\\s*$`);
+ createToken('STAR', '(<|>)?=?\\s*\\*');
+ createToken('GTE0', '^\\s*>=\\s*0\.0\.0\\s*$');
+ createToken('GTE0PRE', '^\\s*>=\\s*0\.0\.0-0\\s*$');
+});
+const opts = ['includePrerelease', 'loose', 'rtl'];
+
+const parseOptions = options => !options ? {} : typeof options !== 'object' ? {
+ loose: true
+} : opts.filter(k => options[k]).reduce((options, k) => {
+ options[k] = true;
+ return options;
+}, {});
+
+var parseOptions_1 = parseOptions;
+const numeric = /^[0-9]+$/;
+
+const compareIdentifiers$1 = (a, b) => {
+ const anum = numeric.test(a);
+ const bnum = numeric.test(b);
+
+ if (anum && bnum) {
+ a = +a;
+ b = +b;
+ }
+
+ return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1;
+};
+
+const rcompareIdentifiers = (a, b) => compareIdentifiers$1(b, a);
+
+var identifiers = {
+ compareIdentifiers: compareIdentifiers$1,
+ rcompareIdentifiers
+};
+const {
+ MAX_LENGTH: MAX_LENGTH$1,
+ MAX_SAFE_INTEGER
+} = constants;
+const {
+ re: re$4,
+ t: t$4
+} = re_1;
+const {
+ compareIdentifiers
+} = identifiers;
+
+class SemVer {
+ constructor(version, options) {
+ options = parseOptions_1(options);
+
+ if (version instanceof SemVer) {
+ if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) {
+ return version;
+ } else {
+ version = version.version;
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError(`Invalid Version: ${version}`);
+ }
+
+ if (version.length > MAX_LENGTH$1) {
+ throw new TypeError(`version is longer than ${MAX_LENGTH$1} characters`);
+ }
+
+ debug_1('SemVer', version, options);
+ this.options = options;
+ this.loose = !!options.loose;
+ this.includePrerelease = !!options.includePrerelease;
+ const m = version.trim().match(options.loose ? re$4[t$4.LOOSE] : re$4[t$4.FULL]);
+
+ if (!m) {
+ throw new TypeError(`Invalid Version: ${version}`);
+ }
+
+ this.raw = version;
+ this.major = +m[1];
+ this.minor = +m[2];
+ this.patch = +m[3];
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version');
+ }
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version');
+ }
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version');
+ }
+
+ if (!m[4]) {
+ this.prerelease = [];
+ } else {
+ this.prerelease = m[4].split('.').map(id => {
+ if (/^[0-9]+$/.test(id)) {
+ const num = +id;
+
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num;
+ }
+ }
+
+ return id;
+ });
+ }
+
+ this.build = m[5] ? m[5].split('.') : [];
+ this.format();
+ }
+
+ format() {
+ this.version = `${this.major}.${this.minor}.${this.patch}`;
+
+ if (this.prerelease.length) {
+ this.version += `-${this.prerelease.join('.')}`;
+ }
+
+ return this.version;
+ }
+
+ toString() {
+ return this.version;
+ }
+
+ compare(other) {
+ debug_1('SemVer.compare', this.version, this.options, other);
+
+ if (!(other instanceof SemVer)) {
+ if (typeof other === 'string' && other === this.version) {
+ return 0;
+ }
+
+ other = new SemVer(other, this.options);
+ }
+
+ if (other.version === this.version) {
+ return 0;
+ }
+
+ return this.compareMain(other) || this.comparePre(other);
+ }
+
+ compareMain(other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ }
+
+ return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
+ }
+
+ comparePre(other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ }
+
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1;
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1;
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0;
+ }
+
+ let i = 0;
+
+ do {
+ const a = this.prerelease[i];
+ const b = other.prerelease[i];
+ debug_1('prerelease compare', i, a, b);
+
+ if (a === undefined && b === undefined) {
+ return 0;
+ } else if (b === undefined) {
+ return 1;
+ } else if (a === undefined) {
+ return -1;
+ } else if (a === b) {
+ continue;
+ } else {
+ return compareIdentifiers(a, b);
+ }
+ } while (++i);
+ }
+
+ compareBuild(other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options);
+ }
+
+ let i = 0;
+
+ do {
+ const a = this.build[i];
+ const b = other.build[i];
+ debug_1('prerelease compare', i, a, b);
+
+ if (a === undefined && b === undefined) {
+ return 0;
+ } else if (b === undefined) {
+ return 1;
+ } else if (a === undefined) {
+ return -1;
+ } else if (a === b) {
+ continue;
+ } else {
+ return compareIdentifiers(a, b);
+ }
+ } while (++i);
+ }
+
+ inc(release, identifier) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor = 0;
+ this.major++;
+ this.inc('pre', identifier);
+ break;
+
+ case 'preminor':
+ this.prerelease.length = 0;
+ this.patch = 0;
+ this.minor++;
+ this.inc('pre', identifier);
+ break;
+
+ case 'prepatch':
+ this.prerelease.length = 0;
+ this.inc('patch', identifier);
+ this.inc('pre', identifier);
+ break;
+
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier);
+ }
+
+ this.inc('pre', identifier);
+ break;
+
+ case 'major':
+ if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
+ this.major++;
+ }
+
+ this.minor = 0;
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+
+ case 'minor':
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++;
+ }
+
+ this.patch = 0;
+ this.prerelease = [];
+ break;
+
+ case 'patch':
+ if (this.prerelease.length === 0) {
+ this.patch++;
+ }
+
+ this.prerelease = [];
+ break;
+
+ case 'pre':
+ if (this.prerelease.length === 0) {
+ this.prerelease = [0];
+ } else {
+ let i = this.prerelease.length;
+
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++;
+ i = -2;
+ }
+ }
+
+ if (i === -1) {
+ this.prerelease.push(0);
+ }
+ }
+
+ if (identifier) {
+ if (this.prerelease[0] === identifier) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = [identifier, 0];
+ }
+ } else {
+ this.prerelease = [identifier, 0];
+ }
+ }
+
+ break;
+
+ default:
+ throw new Error(`invalid increment argument: ${release}`);
+ }
+
+ this.format();
+ this.raw = this.version;
+ return this;
+ }
+
+}
+
+var semver$1 = SemVer;
+const {
+ MAX_LENGTH
+} = constants;
+const {
+ re: re$3,
+ t: t$3
+} = re_1;
+
+const parse = (version, options) => {
+ options = parseOptions_1(options);
+
+ if (version instanceof semver$1) {
+ return version;
+ }
+
+ if (typeof version !== 'string') {
+ return null;
+ }
+
+ if (version.length > MAX_LENGTH) {
+ return null;
+ }
+
+ const r = options.loose ? re$3[t$3.LOOSE] : re$3[t$3.FULL];
+
+ if (!r.test(version)) {
+ return null;
+ }
+
+ try {
+ return new semver$1(version, options);
+ } catch (er) {
+ return null;
+ }
+};
+
+var parse_1 = parse;
+
+const valid$1 = (version, options) => {
+ const v = parse_1(version, options);
+ return v ? v.version : null;
+};
+
+var valid_1 = valid$1;
+
+const clean = (version, options) => {
+ const s = parse_1(version.trim().replace(/^[=v]+/, ''), options);
+ return s ? s.version : null;
+};
+
+var clean_1 = clean;
+
+const inc = (version, release, options, identifier) => {
+ if (typeof options === 'string') {
+ identifier = options;
+ options = undefined;
+ }
+
+ try {
+ return new semver$1(version, options).inc(release, identifier).version;
+ } catch (er) {
+ return null;
+ }
+};
+
+var inc_1 = inc;
+
+const compare = (a, b, loose) => new semver$1(a, loose).compare(new semver$1(b, loose));
+
+var compare_1 = compare;
+
+const eq = (a, b, loose) => compare_1(a, b, loose) === 0;
+
+var eq_1 = eq;
+
+const diff = (version1, version2) => {
+ if (eq_1(version1, version2)) {
+ return null;
+ } else {
+ const v1 = parse_1(version1);
+ const v2 = parse_1(version2);
+ const hasPre = v1.prerelease.length || v2.prerelease.length;
+ const prefix = hasPre ? 'pre' : '';
+ const defaultResult = hasPre ? 'prerelease' : '';
+
+ for (const key in v1) {
+ if (key === 'major' || key === 'minor' || key === 'patch') {
+ if (v1[key] !== v2[key]) {
+ return prefix + key;
+ }
+ }
+ }
+
+ return defaultResult;
+ }
+};
+
+var diff_1 = diff;
+
+const major = (a, loose) => new semver$1(a, loose).major;
+
+var major_1 = major;
+
+const minor = (a, loose) => new semver$1(a, loose).minor;
+
+var minor_1 = minor;
+
+const patch = (a, loose) => new semver$1(a, loose).patch;
+
+var patch_1 = patch;
+
+const prerelease = (version, options) => {
+ const parsed = parse_1(version, options);
+ return parsed && parsed.prerelease.length ? parsed.prerelease : null;
+};
+
+var prerelease_1 = prerelease;
+
+const rcompare = (a, b, loose) => compare_1(b, a, loose);
+
+var rcompare_1 = rcompare;
+
+const compareLoose = (a, b) => compare_1(a, b, true);
+
+var compareLoose_1 = compareLoose;
+
+const compareBuild = (a, b, loose) => {
+ const versionA = new semver$1(a, loose);
+ const versionB = new semver$1(b, loose);
+ return versionA.compare(versionB) || versionA.compareBuild(versionB);
+};
+
+var compareBuild_1 = compareBuild;
+
+const sort = (list, loose) => list.sort((a, b) => compareBuild_1(a, b, loose));
+
+var sort_1 = sort;
+
+const rsort = (list, loose) => list.sort((a, b) => compareBuild_1(b, a, loose));
+
+var rsort_1 = rsort;
+
+const gt = (a, b, loose) => compare_1(a, b, loose) > 0;
+
+var gt_1 = gt;
+
+const lt = (a, b, loose) => compare_1(a, b, loose) < 0;
+
+var lt_1 = lt;
+
+const neq = (a, b, loose) => compare_1(a, b, loose) !== 0;
+
+var neq_1 = neq;
+
+const gte = (a, b, loose) => compare_1(a, b, loose) >= 0;
+
+var gte_1 = gte;
+
+const lte = (a, b, loose) => compare_1(a, b, loose) <= 0;
+
+var lte_1 = lte;
+
+const cmp = (a, op, b, loose) => {
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ return a === b;
+
+ case '!==':
+ if (typeof a === 'object') a = a.version;
+ if (typeof b === 'object') b = b.version;
+ return a !== b;
+
+ case '':
+ case '=':
+ case '==':
+ return eq_1(a, b, loose);
+
+ case '!=':
+ return neq_1(a, b, loose);
+
+ case '>':
+ return gt_1(a, b, loose);
+
+ case '>=':
+ return gte_1(a, b, loose);
+
+ case '<':
+ return lt_1(a, b, loose);
+
+ case '<=':
+ return lte_1(a, b, loose);
+
+ default:
+ throw new TypeError(`Invalid operator: ${op}`);
+ }
+};
+
+var cmp_1 = cmp;
+const {
+ re: re$2,
+ t: t$2
+} = re_1;
+
+const coerce = (version, options) => {
+ if (version instanceof semver$1) {
+ return version;
+ }
+
+ if (typeof version === 'number') {
+ version = String(version);
+ }
+
+ if (typeof version !== 'string') {
+ return null;
+ }
+
+ options = options || {};
+ let match = null;
+
+ if (!options.rtl) {
+ match = version.match(re$2[t$2.COERCE]);
+ } else {
+ let next;
+
+ while ((next = re$2[t$2.COERCERTL].exec(version)) && (!match || match.index + match[0].length !== version.length)) {
+ if (!match || next.index + next[0].length !== match.index + match[0].length) {
+ match = next;
+ }
+
+ re$2[t$2.COERCERTL].lastIndex = next.index + next[1].length + next[2].length;
+ }
+
+ re$2[t$2.COERCERTL].lastIndex = -1;
+ }
+
+ if (match === null) return null;
+ return parse_1(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options);
+};
+
+var coerce_1 = coerce;
+
+var iterator = function (Yallist) {
+ Yallist.prototype[Symbol.iterator] = function* () {
+ for (let walker = this.head; walker; walker = walker.next) {
+ yield walker.value;
+ }
+ };
+};
+
+var yallist = Yallist;
+Yallist.Node = Node;
+Yallist.create = Yallist;
+
+function Yallist(list) {
+ var self = this;
+
+ if (!(self instanceof Yallist)) {
+ self = new Yallist();
+ }
+
+ self.tail = null;
+ self.head = null;
+ self.length = 0;
+
+ if (list && typeof list.forEach === 'function') {
+ list.forEach(function (item) {
+ self.push(item);
+ });
+ } else if (arguments.length > 0) {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ self.push(arguments[i]);
+ }
+ }
+
+ return self;
+}
+
+Yallist.prototype.removeNode = function (node) {
+ if (node.list !== this) {
+ throw new Error('removing node which does not belong to this list');
+ }
+
+ var next = node.next;
+ var prev = node.prev;
+
+ if (next) {
+ next.prev = prev;
+ }
+
+ if (prev) {
+ prev.next = next;
+ }
+
+ if (node === this.head) {
+ this.head = next;
+ }
+
+ if (node === this.tail) {
+ this.tail = prev;
+ }
+
+ node.list.length--;
+ node.next = null;
+ node.prev = null;
+ node.list = null;
+ return next;
+};
+
+Yallist.prototype.unshiftNode = function (node) {
+ if (node === this.head) {
+ return;
+ }
+
+ if (node.list) {
+ node.list.removeNode(node);
+ }
+
+ var head = this.head;
+ node.list = this;
+ node.next = head;
+
+ if (head) {
+ head.prev = node;
+ }
+
+ this.head = node;
+
+ if (!this.tail) {
+ this.tail = node;
+ }
+
+ this.length++;
+};
+
+Yallist.prototype.pushNode = function (node) {
+ if (node === this.tail) {
+ return;
+ }
+
+ if (node.list) {
+ node.list.removeNode(node);
+ }
+
+ var tail = this.tail;
+ node.list = this;
+ node.prev = tail;
+
+ if (tail) {
+ tail.next = node;
+ }
+
+ this.tail = node;
+
+ if (!this.head) {
+ this.head = node;
+ }
+
+ this.length++;
+};
+
+Yallist.prototype.push = function () {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ push(this, arguments[i]);
+ }
+
+ return this.length;
+};
+
+Yallist.prototype.unshift = function () {
+ for (var i = 0, l = arguments.length; i < l; i++) {
+ unshift(this, arguments[i]);
+ }
+
+ return this.length;
+};
+
+Yallist.prototype.pop = function () {
+ if (!this.tail) {
+ return undefined;
+ }
+
+ var res = this.tail.value;
+ this.tail = this.tail.prev;
+
+ if (this.tail) {
+ this.tail.next = null;
+ } else {
+ this.head = null;
+ }
+
+ this.length--;
+ return res;
+};
+
+Yallist.prototype.shift = function () {
+ if (!this.head) {
+ return undefined;
+ }
+
+ var res = this.head.value;
+ this.head = this.head.next;
+
+ if (this.head) {
+ this.head.prev = null;
+ } else {
+ this.tail = null;
+ }
+
+ this.length--;
+ return res;
+};
+
+Yallist.prototype.forEach = function (fn, thisp) {
+ thisp = thisp || this;
+
+ for (var walker = this.head, i = 0; walker !== null; i++) {
+ fn.call(thisp, walker.value, i, this);
+ walker = walker.next;
+ }
+};
+
+Yallist.prototype.forEachReverse = function (fn, thisp) {
+ thisp = thisp || this;
+
+ for (var walker = this.tail, i = this.length - 1; walker !== null; i--) {
+ fn.call(thisp, walker.value, i, this);
+ walker = walker.prev;
+ }
+};
+
+Yallist.prototype.get = function (n) {
+ for (var i = 0, walker = this.head; walker !== null && i < n; i++) {
+ walker = walker.next;
+ }
+
+ if (i === n && walker !== null) {
+ return walker.value;
+ }
+};
+
+Yallist.prototype.getReverse = function (n) {
+ for (var i = 0, walker = this.tail; walker !== null && i < n; i++) {
+ walker = walker.prev;
+ }
+
+ if (i === n && walker !== null) {
+ return walker.value;
+ }
+};
+
+Yallist.prototype.map = function (fn, thisp) {
+ thisp = thisp || this;
+ var res = new Yallist();
+
+ for (var walker = this.head; walker !== null;) {
+ res.push(fn.call(thisp, walker.value, this));
+ walker = walker.next;
+ }
+
+ return res;
+};
+
+Yallist.prototype.mapReverse = function (fn, thisp) {
+ thisp = thisp || this;
+ var res = new Yallist();
+
+ for (var walker = this.tail; walker !== null;) {
+ res.push(fn.call(thisp, walker.value, this));
+ walker = walker.prev;
+ }
+
+ return res;
+};
+
+Yallist.prototype.reduce = function (fn, initial) {
+ var acc;
+ var walker = this.head;
+
+ if (arguments.length > 1) {
+ acc = initial;
+ } else if (this.head) {
+ walker = this.head.next;
+ acc = this.head.value;
+ } else {
+ throw new TypeError('Reduce of empty list with no initial value');
+ }
+
+ for (var i = 0; walker !== null; i++) {
+ acc = fn(acc, walker.value, i);
+ walker = walker.next;
+ }
+
+ return acc;
+};
+
+Yallist.prototype.reduceReverse = function (fn, initial) {
+ var acc;
+ var walker = this.tail;
+
+ if (arguments.length > 1) {
+ acc = initial;
+ } else if (this.tail) {
+ walker = this.tail.prev;
+ acc = this.tail.value;
+ } else {
+ throw new TypeError('Reduce of empty list with no initial value');
+ }
+
+ for (var i = this.length - 1; walker !== null; i--) {
+ acc = fn(acc, walker.value, i);
+ walker = walker.prev;
+ }
+
+ return acc;
+};
+
+Yallist.prototype.toArray = function () {
+ var arr = new Array(this.length);
+
+ for (var i = 0, walker = this.head; walker !== null; i++) {
+ arr[i] = walker.value;
+ walker = walker.next;
+ }
+
+ return arr;
+};
+
+Yallist.prototype.toArrayReverse = function () {
+ var arr = new Array(this.length);
+
+ for (var i = 0, walker = this.tail; walker !== null; i++) {
+ arr[i] = walker.value;
+ walker = walker.prev;
+ }
+
+ return arr;
+};
+
+Yallist.prototype.slice = function (from, to) {
+ to = to || this.length;
+
+ if (to < 0) {
+ to += this.length;
+ }
+
+ from = from || 0;
+
+ if (from < 0) {
+ from += this.length;
+ }
+
+ var ret = new Yallist();
+
+ if (to < from || to < 0) {
+ return ret;
+ }
+
+ if (from < 0) {
+ from = 0;
+ }
+
+ if (to > this.length) {
+ to = this.length;
+ }
+
+ for (var i = 0, walker = this.head; walker !== null && i < from; i++) {
+ walker = walker.next;
+ }
+
+ for (; walker !== null && i < to; i++, walker = walker.next) {
+ ret.push(walker.value);
+ }
+
+ return ret;
+};
+
+Yallist.prototype.sliceReverse = function (from, to) {
+ to = to || this.length;
+
+ if (to < 0) {
+ to += this.length;
+ }
+
+ from = from || 0;
+
+ if (from < 0) {
+ from += this.length;
+ }
+
+ var ret = new Yallist();
+
+ if (to < from || to < 0) {
+ return ret;
+ }
+
+ if (from < 0) {
+ from = 0;
+ }
+
+ if (to > this.length) {
+ to = this.length;
+ }
+
+ for (var i = this.length, walker = this.tail; walker !== null && i > to; i--) {
+ walker = walker.prev;
+ }
+
+ for (; walker !== null && i > from; i--, walker = walker.prev) {
+ ret.push(walker.value);
+ }
+
+ return ret;
+};
+
+Yallist.prototype.splice = function (start, deleteCount, ...nodes) {
+ if (start > this.length) {
+ start = this.length - 1;
+ }
+
+ if (start < 0) {
+ start = this.length + start;
+ }
+
+ for (var i = 0, walker = this.head; walker !== null && i < start; i++) {
+ walker = walker.next;
+ }
+
+ var ret = [];
+
+ for (var i = 0; walker && i < deleteCount; i++) {
+ ret.push(walker.value);
+ walker = this.removeNode(walker);
+ }
+
+ if (walker === null) {
+ walker = this.tail;
+ }
+
+ if (walker !== this.head && walker !== this.tail) {
+ walker = walker.prev;
+ }
+
+ for (var i = 0; i < nodes.length; i++) {
+ walker = insert(this, walker, nodes[i]);
+ }
+
+ return ret;
+};
+
+Yallist.prototype.reverse = function () {
+ var head = this.head;
+ var tail = this.tail;
+
+ for (var walker = head; walker !== null; walker = walker.prev) {
+ var p = walker.prev;
+ walker.prev = walker.next;
+ walker.next = p;
+ }
+
+ this.head = tail;
+ this.tail = head;
+ return this;
+};
+
+function insert(self, node, value) {
+ var inserted = node === self.head ? new Node(value, null, node, self) : new Node(value, node, node.next, self);
+
+ if (inserted.next === null) {
+ self.tail = inserted;
+ }
+
+ if (inserted.prev === null) {
+ self.head = inserted;
+ }
+
+ self.length++;
+ return inserted;
+}
+
+function push(self, item) {
+ self.tail = new Node(item, self.tail, null, self);
+
+ if (!self.head) {
+ self.head = self.tail;
+ }
+
+ self.length++;
+}
+
+function unshift(self, item) {
+ self.head = new Node(item, null, self.head, self);
+
+ if (!self.tail) {
+ self.tail = self.head;
+ }
+
+ self.length++;
+}
+
+function Node(value, prev, next, list) {
+ if (!(this instanceof Node)) {
+ return new Node(value, prev, next, list);
+ }
+
+ this.list = list;
+ this.value = value;
+
+ if (prev) {
+ prev.next = this;
+ this.prev = prev;
+ } else {
+ this.prev = null;
+ }
+
+ if (next) {
+ next.prev = this;
+ this.next = next;
+ } else {
+ this.next = null;
+ }
+}
+
+try {
+ iterator(Yallist);
+} catch (er) {}
+
+const MAX = Symbol('max');
+const LENGTH = Symbol('length');
+const LENGTH_CALCULATOR = Symbol('lengthCalculator');
+const ALLOW_STALE = Symbol('allowStale');
+const MAX_AGE = Symbol('maxAge');
+const DISPOSE = Symbol('dispose');
+const NO_DISPOSE_ON_SET = Symbol('noDisposeOnSet');
+const LRU_LIST = Symbol('lruList');
+const CACHE = Symbol('cache');
+const UPDATE_AGE_ON_GET = Symbol('updateAgeOnGet');
+
+const naiveLength = () => 1;
+
+class LRUCache {
+ constructor(options) {
+ if (typeof options === 'number') options = {
+ max: options
+ };
+ if (!options) options = {};
+ if (options.max && (typeof options.max !== 'number' || options.max < 0)) throw new TypeError('max must be a non-negative number');
+ this[MAX] = options.max || Infinity;
+ const lc = options.length || naiveLength;
+ this[LENGTH_CALCULATOR] = typeof lc !== 'function' ? naiveLength : lc;
+ this[ALLOW_STALE] = options.stale || false;
+ if (options.maxAge && typeof options.maxAge !== 'number') throw new TypeError('maxAge must be a number');
+ this[MAX_AGE] = options.maxAge || 0;
+ this[DISPOSE] = options.dispose;
+ this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false;
+ this[UPDATE_AGE_ON_GET] = options.updateAgeOnGet || false;
+ this.reset();
+ }
+
+ set max(mL) {
+ if (typeof mL !== 'number' || mL < 0) throw new TypeError('max must be a non-negative number');
+ this[MAX] = mL || Infinity;
+ trim(this);
+ }
+
+ get max() {
+ return this[MAX];
+ }
+
+ set allowStale(allowStale) {
+ this[ALLOW_STALE] = !!allowStale;
+ }
+
+ get allowStale() {
+ return this[ALLOW_STALE];
+ }
+
+ set maxAge(mA) {
+ if (typeof mA !== 'number') throw new TypeError('maxAge must be a non-negative number');
+ this[MAX_AGE] = mA;
+ trim(this);
+ }
+
+ get maxAge() {
+ return this[MAX_AGE];
+ }
+
+ set lengthCalculator(lC) {
+ if (typeof lC !== 'function') lC = naiveLength;
+
+ if (lC !== this[LENGTH_CALCULATOR]) {
+ this[LENGTH_CALCULATOR] = lC;
+ this[LENGTH] = 0;
+ this[LRU_LIST].forEach(hit => {
+ hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key);
+ this[LENGTH] += hit.length;
+ });
+ }
+
+ trim(this);
+ }
+
+ get lengthCalculator() {
+ return this[LENGTH_CALCULATOR];
+ }
+
+ get length() {
+ return this[LENGTH];
+ }
+
+ get itemCount() {
+ return this[LRU_LIST].length;
+ }
+
+ rforEach(fn, thisp) {
+ thisp = thisp || this;
+
+ for (let walker = this[LRU_LIST].tail; walker !== null;) {
+ const prev = walker.prev;
+ forEachStep(this, fn, walker, thisp);
+ walker = prev;
+ }
+ }
+
+ forEach(fn, thisp) {
+ thisp = thisp || this;
+
+ for (let walker = this[LRU_LIST].head; walker !== null;) {
+ const next = walker.next;
+ forEachStep(this, fn, walker, thisp);
+ walker = next;
+ }
+ }
+
+ keys() {
+ return this[LRU_LIST].toArray().map(k => k.key);
+ }
+
+ values() {
+ return this[LRU_LIST].toArray().map(k => k.value);
+ }
+
+ reset() {
+ if (this[DISPOSE] && this[LRU_LIST] && this[LRU_LIST].length) {
+ this[LRU_LIST].forEach(hit => this[DISPOSE](hit.key, hit.value));
+ }
+
+ this[CACHE] = new Map();
+ this[LRU_LIST] = new yallist();
+ this[LENGTH] = 0;
+ }
+
+ dump() {
+ return this[LRU_LIST].map(hit => isStale(this, hit) ? false : {
+ k: hit.key,
+ v: hit.value,
+ e: hit.now + (hit.maxAge || 0)
+ }).toArray().filter(h => h);
+ }
+
+ dumpLru() {
+ return this[LRU_LIST];
+ }
+
+ set(key, value, maxAge) {
+ maxAge = maxAge || this[MAX_AGE];
+ if (maxAge && typeof maxAge !== 'number') throw new TypeError('maxAge must be a number');
+ const now = maxAge ? Date.now() : 0;
+ const len = this[LENGTH_CALCULATOR](value, key);
+
+ if (this[CACHE].has(key)) {
+ if (len > this[MAX]) {
+ del(this, this[CACHE].get(key));
+ return false;
+ }
+
+ const node = this[CACHE].get(key);
+ const item = node.value;
+
+ if (this[DISPOSE]) {
+ if (!this[NO_DISPOSE_ON_SET]) this[DISPOSE](key, item.value);
+ }
+
+ item.now = now;
+ item.maxAge = maxAge;
+ item.value = value;
+ this[LENGTH] += len - item.length;
+ item.length = len;
+ this.get(key);
+ trim(this);
+ return true;
+ }
+
+ const hit = new Entry(key, value, len, now, maxAge);
+
+ if (hit.length > this[MAX]) {
+ if (this[DISPOSE]) this[DISPOSE](key, value);
+ return false;
+ }
+
+ this[LENGTH] += hit.length;
+ this[LRU_LIST].unshift(hit);
+ this[CACHE].set(key, this[LRU_LIST].head);
+ trim(this);
+ return true;
+ }
+
+ has(key) {
+ if (!this[CACHE].has(key)) return false;
+ const hit = this[CACHE].get(key).value;
+ return !isStale(this, hit);
+ }
+
+ get(key) {
+ return get(this, key, true);
+ }
+
+ peek(key) {
+ return get(this, key, false);
+ }
+
+ pop() {
+ const node = this[LRU_LIST].tail;
+ if (!node) return null;
+ del(this, node);
+ return node.value;
+ }
+
+ del(key) {
+ del(this, this[CACHE].get(key));
+ }
+
+ load(arr) {
+ this.reset();
+ const now = Date.now();
+
+ for (let l = arr.length - 1; l >= 0; l--) {
+ const hit = arr[l];
+ const expiresAt = hit.e || 0;
+ if (expiresAt === 0) this.set(hit.k, hit.v);else {
+ const maxAge = expiresAt - now;
+
+ if (maxAge > 0) {
+ this.set(hit.k, hit.v, maxAge);
+ }
+ }
+ }
+ }
+
+ prune() {
+ this[CACHE].forEach((value, key) => get(this, key, false));
+ }
+
+}
+
+const get = (self, key, doUse) => {
+ const node = self[CACHE].get(key);
+
+ if (node) {
+ const hit = node.value;
+
+ if (isStale(self, hit)) {
+ del(self, node);
+ if (!self[ALLOW_STALE]) return undefined;
+ } else {
+ if (doUse) {
+ if (self[UPDATE_AGE_ON_GET]) node.value.now = Date.now();
+ self[LRU_LIST].unshiftNode(node);
+ }
+ }
+
+ return hit.value;
+ }
+};
+
+const isStale = (self, hit) => {
+ if (!hit || !hit.maxAge && !self[MAX_AGE]) return false;
+ const diff = Date.now() - hit.now;
+ return hit.maxAge ? diff > hit.maxAge : self[MAX_AGE] && diff > self[MAX_AGE];
+};
+
+const trim = self => {
+ if (self[LENGTH] > self[MAX]) {
+ for (let walker = self[LRU_LIST].tail; self[LENGTH] > self[MAX] && walker !== null;) {
+ const prev = walker.prev;
+ del(self, walker);
+ walker = prev;
+ }
+ }
+};
+
+const del = (self, node) => {
+ if (node) {
+ const hit = node.value;
+ if (self[DISPOSE]) self[DISPOSE](hit.key, hit.value);
+ self[LENGTH] -= hit.length;
+ self[CACHE].delete(hit.key);
+ self[LRU_LIST].removeNode(node);
+ }
+};
+
+class Entry {
+ constructor(key, value, length, now, maxAge) {
+ this.key = key;
+ this.value = value;
+ this.length = length;
+ this.now = now;
+ this.maxAge = maxAge || 0;
+ }
+
+}
+
+const forEachStep = (self, fn, node, thisp) => {
+ let hit = node.value;
+
+ if (isStale(self, hit)) {
+ del(self, node);
+ if (!self[ALLOW_STALE]) hit = undefined;
+ }
+
+ if (hit) fn.call(thisp, hit.value, hit.key, self);
+};
+
+var lruCache = LRUCache;
+
+class Range {
+ constructor(range, options) {
+ options = parseOptions_1(options);
+
+ if (range instanceof Range) {
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) {
+ return range;
+ } else {
+ return new Range(range.raw, options);
+ }
+ }
+
+ if (range instanceof comparator) {
+ this.raw = range.value;
+ this.set = [[range]];
+ this.format();
+ return this;
+ }
+
+ this.options = options;
+ this.loose = !!options.loose;
+ this.includePrerelease = !!options.includePrerelease;
+ this.raw = range;
+ this.set = range.split(/\s*\|\|\s*/).map(range => this.parseRange(range.trim())).filter(c => c.length);
+
+ if (!this.set.length) {
+ throw new TypeError(`Invalid SemVer Range: ${range}`);
+ }
+
+ if (this.set.length > 1) {
+ const first = this.set[0];
+ this.set = this.set.filter(c => !isNullSet(c[0]));
+ if (this.set.length === 0) this.set = [first];else if (this.set.length > 1) {
+ for (const c of this.set) {
+ if (c.length === 1 && isAny(c[0])) {
+ this.set = [c];
+ break;
+ }
+ }
+ }
+ }
+
+ this.format();
+ }
+
+ format() {
+ this.range = this.set.map(comps => {
+ return comps.join(' ').trim();
+ }).join('||').trim();
+ return this.range;
+ }
+
+ toString() {
+ return this.range;
+ }
+
+ parseRange(range) {
+ range = range.trim();
+ const memoOpts = Object.keys(this.options).join(',');
+ const memoKey = `parseRange:${memoOpts}:${range}`;
+ const cached = cache.get(memoKey);
+ if (cached) return cached;
+ const loose = this.options.loose;
+ const hr = loose ? re$1[t$1.HYPHENRANGELOOSE] : re$1[t$1.HYPHENRANGE];
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
+ debug_1('hyphen replace', range);
+ range = range.replace(re$1[t$1.COMPARATORTRIM], comparatorTrimReplace);
+ debug_1('comparator trim', range, re$1[t$1.COMPARATORTRIM]);
+ range = range.replace(re$1[t$1.TILDETRIM], tildeTrimReplace);
+ range = range.replace(re$1[t$1.CARETTRIM], caretTrimReplace);
+ range = range.split(/\s+/).join(' ');
+ const compRe = loose ? re$1[t$1.COMPARATORLOOSE] : re$1[t$1.COMPARATOR];
+ const rangeList = range.split(' ').map(comp => parseComparator(comp, this.options)).join(' ').split(/\s+/).map(comp => replaceGTE0(comp, this.options)).filter(this.options.loose ? comp => !!comp.match(compRe) : () => true).map(comp => new comparator(comp, this.options));
+ rangeList.length;
+ const rangeMap = new Map();
+
+ for (const comp of rangeList) {
+ if (isNullSet(comp)) return [comp];
+ rangeMap.set(comp.value, comp);
+ }
+
+ if (rangeMap.size > 1 && rangeMap.has('')) rangeMap.delete('');
+ const result = [...rangeMap.values()];
+ cache.set(memoKey, result);
+ return result;
+ }
+
+ intersects(range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required');
+ }
+
+ return this.set.some(thisComparators => {
+ return isSatisfiable(thisComparators, options) && range.set.some(rangeComparators => {
+ return isSatisfiable(rangeComparators, options) && thisComparators.every(thisComparator => {
+ return rangeComparators.every(rangeComparator => {
+ return thisComparator.intersects(rangeComparator, options);
+ });
+ });
+ });
+ });
+ }
+
+ test(version) {
+ if (!version) {
+ return false;
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new semver$1(version, this.options);
+ } catch (er) {
+ return false;
+ }
+ }
+
+ for (let i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+}
+
+var range = Range;
+const cache = new lruCache({
+ max: 1000
+});
+const {
+ re: re$1,
+ t: t$1,
+ comparatorTrimReplace,
+ tildeTrimReplace,
+ caretTrimReplace
+} = re_1;
+
+const isNullSet = c => c.value === '<0.0.0-0';
+
+const isAny = c => c.value === '';
+
+const isSatisfiable = (comparators, options) => {
+ let result = true;
+ const remainingComparators = comparators.slice();
+ let testComparator = remainingComparators.pop();
+
+ while (result && remainingComparators.length) {
+ result = remainingComparators.every(otherComparator => {
+ return testComparator.intersects(otherComparator, options);
+ });
+ testComparator = remainingComparators.pop();
+ }
+
+ return result;
+};
+
+const parseComparator = (comp, options) => {
+ debug_1('comp', comp, options);
+ comp = replaceCarets(comp, options);
+ debug_1('caret', comp);
+ comp = replaceTildes(comp, options);
+ debug_1('tildes', comp);
+ comp = replaceXRanges(comp, options);
+ debug_1('xrange', comp);
+ comp = replaceStars(comp, options);
+ debug_1('stars', comp);
+ return comp;
+};
+
+const isX = id => !id || id.toLowerCase() === 'x' || id === '*';
+
+const replaceTildes = (comp, options) => comp.trim().split(/\s+/).map(comp => {
+ return replaceTilde(comp, options);
+}).join(' ');
+
+const replaceTilde = (comp, options) => {
+ const r = options.loose ? re$1[t$1.TILDELOOSE] : re$1[t$1.TILDE];
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug_1('tilde', comp, _, M, m, p, pr);
+ let ret;
+
+ if (isX(M)) {
+ ret = '';
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
+ } else if (isX(p)) {
+ ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
+ } else if (pr) {
+ debug_1('replaceTilde pr', pr);
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
+ } else {
+ ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
+ }
+
+ debug_1('tilde return', ret);
+ return ret;
+ });
+};
+
+const replaceCarets = (comp, options) => comp.trim().split(/\s+/).map(comp => {
+ return replaceCaret(comp, options);
+}).join(' ');
+
+const replaceCaret = (comp, options) => {
+ debug_1('caret', comp, options);
+ const r = options.loose ? re$1[t$1.CARETLOOSE] : re$1[t$1.CARET];
+ const z = options.includePrerelease ? '-0' : '';
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug_1('caret', comp, _, M, m, p, pr);
+ let ret;
+
+ if (isX(M)) {
+ ret = '';
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
+ } else {
+ ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
+ }
+ } else if (pr) {
+ debug_1('replaceCaret pr', pr);
+
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
+ }
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
+ }
+ } else {
+ debug_1('no pr');
+
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
+ } else {
+ ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
+ }
+ } else {
+ ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
+ }
+ }
+
+ debug_1('caret return', ret);
+ return ret;
+ });
+};
+
+const replaceXRanges = (comp, options) => {
+ debug_1('replaceXRanges', comp, options);
+ return comp.split(/\s+/).map(comp => {
+ return replaceXRange(comp, options);
+ }).join(' ');
+};
+
+const replaceXRange = (comp, options) => {
+ comp = comp.trim();
+ const r = options.loose ? re$1[t$1.XRANGELOOSE] : re$1[t$1.XRANGE];
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
+ debug_1('xRange', comp, ret, gtlt, M, m, p, pr);
+ const xM = isX(M);
+ const xm = xM || isX(m);
+ const xp = xm || isX(p);
+ const anyX = xp;
+
+ if (gtlt === '=' && anyX) {
+ gtlt = '';
+ }
+
+ pr = options.includePrerelease ? '-0' : '';
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ ret = '<0.0.0-0';
+ } else {
+ ret = '*';
+ }
+ } else if (gtlt && anyX) {
+ if (xm) {
+ m = 0;
+ }
+
+ p = 0;
+
+ if (gtlt === '>') {
+ gtlt = '>=';
+
+ if (xm) {
+ M = +M + 1;
+ m = 0;
+ p = 0;
+ } else {
+ m = +m + 1;
+ p = 0;
+ }
+ } else if (gtlt === '<=') {
+ gtlt = '<';
+
+ if (xm) {
+ M = +M + 1;
+ } else {
+ m = +m + 1;
+ }
+ }
+
+ if (gtlt === '<') pr = '-0';
+ ret = `${gtlt + M}.${m}.${p}${pr}`;
+ } else if (xm) {
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
+ } else if (xp) {
+ ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
+ }
+
+ debug_1('xRange return', ret);
+ return ret;
+ });
+};
+
+const replaceStars = (comp, options) => {
+ debug_1('replaceStars', comp, options);
+ return comp.trim().replace(re$1[t$1.STAR], '');
+};
+
+const replaceGTE0 = (comp, options) => {
+ debug_1('replaceGTE0', comp, options);
+ return comp.trim().replace(re$1[options.includePrerelease ? t$1.GTE0PRE : t$1.GTE0], '');
+};
+
+const hyphenReplace = incPr => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
+ if (isX(fM)) {
+ from = '';
+ } else if (isX(fm)) {
+ from = `>=${fM}.0.0${incPr ? '-0' : ''}`;
+ } else if (isX(fp)) {
+ from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`;
+ } else if (fpr) {
+ from = `>=${from}`;
+ } else {
+ from = `>=${from}${incPr ? '-0' : ''}`;
+ }
+
+ if (isX(tM)) {
+ to = '';
+ } else if (isX(tm)) {
+ to = `<${+tM + 1}.0.0-0`;
+ } else if (isX(tp)) {
+ to = `<${tM}.${+tm + 1}.0-0`;
+ } else if (tpr) {
+ to = `<=${tM}.${tm}.${tp}-${tpr}`;
+ } else if (incPr) {
+ to = `<${tM}.${tm}.${+tp + 1}-0`;
+ } else {
+ to = `<=${to}`;
+ }
+
+ return `${from} ${to}`.trim();
+};
+
+const testSet = (set, version, options) => {
+ for (let i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false;
+ }
+ }
+
+ if (version.prerelease.length && !options.includePrerelease) {
+ for (let i = 0; i < set.length; i++) {
+ debug_1(set[i].semver);
+
+ if (set[i].semver === comparator.ANY) {
+ continue;
+ }
+
+ if (set[i].semver.prerelease.length > 0) {
+ const allowed = set[i].semver;
+
+ if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ return true;
+};
+
+const ANY$2 = Symbol('SemVer ANY');
+
+class Comparator {
+ static get ANY() {
+ return ANY$2;
+ }
+
+ constructor(comp, options) {
+ options = parseOptions_1(options);
+
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp;
+ } else {
+ comp = comp.value;
+ }
+ }
+
+ debug_1('comparator', comp, options);
+ this.options = options;
+ this.loose = !!options.loose;
+ this.parse(comp);
+
+ if (this.semver === ANY$2) {
+ this.value = '';
+ } else {
+ this.value = this.operator + this.semver.version;
+ }
+
+ debug_1('comp', this);
+ }
+
+ parse(comp) {
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
+ const m = comp.match(r);
+
+ if (!m) {
+ throw new TypeError(`Invalid comparator: ${comp}`);
+ }
+
+ this.operator = m[1] !== undefined ? m[1] : '';
+
+ if (this.operator === '=') {
+ this.operator = '';
+ }
+
+ if (!m[2]) {
+ this.semver = ANY$2;
+ } else {
+ this.semver = new semver$1(m[2], this.options.loose);
+ }
+ }
+
+ toString() {
+ return this.value;
+ }
+
+ test(version) {
+ debug_1('Comparator.test', version, this.options.loose);
+
+ if (this.semver === ANY$2 || version === ANY$2) {
+ return true;
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new semver$1(version, this.options);
+ } catch (er) {
+ return false;
+ }
+ }
+
+ return cmp_1(version, this.operator, this.semver, this.options);
+ }
+
+ intersects(comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required');
+ }
+
+ if (!options || typeof options !== 'object') {
+ options = {
+ loose: !!options,
+ includePrerelease: false
+ };
+ }
+
+ if (this.operator === '') {
+ if (this.value === '') {
+ return true;
+ }
+
+ return new range(comp.value, options).test(this.value);
+ } else if (comp.operator === '') {
+ if (comp.value === '') {
+ return true;
+ }
+
+ return new range(this.value, options).test(comp.semver);
+ }
+
+ const sameDirectionIncreasing = (this.operator === '>=' || this.operator === '>') && (comp.operator === '>=' || comp.operator === '>');
+ const sameDirectionDecreasing = (this.operator === '<=' || this.operator === '<') && (comp.operator === '<=' || comp.operator === '<');
+ const sameSemVer = this.semver.version === comp.semver.version;
+ const differentDirectionsInclusive = (this.operator === '>=' || this.operator === '<=') && (comp.operator === '>=' || comp.operator === '<=');
+ const oppositeDirectionsLessThan = cmp_1(this.semver, '<', comp.semver, options) && (this.operator === '>=' || this.operator === '>') && (comp.operator === '<=' || comp.operator === '<');
+ const oppositeDirectionsGreaterThan = cmp_1(this.semver, '>', comp.semver, options) && (this.operator === '<=' || this.operator === '<') && (comp.operator === '>=' || comp.operator === '>');
+ return sameDirectionIncreasing || sameDirectionDecreasing || sameSemVer && differentDirectionsInclusive || oppositeDirectionsLessThan || oppositeDirectionsGreaterThan;
+ }
+
+}
+
+var comparator = Comparator;
+const {
+ re,
+ t
+} = re_1;
+
+const satisfies = (version, range$1, options) => {
+ try {
+ range$1 = new range(range$1, options);
+ } catch (er) {
+ return false;
+ }
+
+ return range$1.test(version);
+};
+
+var satisfies_1 = satisfies;
+
+const toComparators = (range$1, options) => new range(range$1, options).set.map(comp => comp.map(c => c.value).join(' ').trim().split(' '));
+
+var toComparators_1 = toComparators;
+
+const maxSatisfying = (versions, range$1, options) => {
+ let max = null;
+ let maxSV = null;
+ let rangeObj = null;
+
+ try {
+ rangeObj = new range(range$1, options);
+ } catch (er) {
+ return null;
+ }
+
+ versions.forEach(v => {
+ if (rangeObj.test(v)) {
+ if (!max || maxSV.compare(v) === -1) {
+ max = v;
+ maxSV = new semver$1(max, options);
+ }
+ }
+ });
+ return max;
+};
+
+var maxSatisfying_1 = maxSatisfying;
+
+const minSatisfying = (versions, range$1, options) => {
+ let min = null;
+ let minSV = null;
+ let rangeObj = null;
+
+ try {
+ rangeObj = new range(range$1, options);
+ } catch (er) {
+ return null;
+ }
+
+ versions.forEach(v => {
+ if (rangeObj.test(v)) {
+ if (!min || minSV.compare(v) === 1) {
+ min = v;
+ minSV = new semver$1(min, options);
+ }
+ }
+ });
+ return min;
+};
+
+var minSatisfying_1 = minSatisfying;
+
+const minVersion = (range$1, loose) => {
+ range$1 = new range(range$1, loose);
+ let minver = new semver$1('0.0.0');
+
+ if (range$1.test(minver)) {
+ return minver;
+ }
+
+ minver = new semver$1('0.0.0-0');
+
+ if (range$1.test(minver)) {
+ return minver;
+ }
+
+ minver = null;
+
+ for (let i = 0; i < range$1.set.length; ++i) {
+ const comparators = range$1.set[i];
+ let setMin = null;
+ comparators.forEach(comparator => {
+ const compver = new semver$1(comparator.semver.version);
+
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++;
+ } else {
+ compver.prerelease.push(0);
+ }
+
+ compver.raw = compver.format();
+
+ case '':
+ case '>=':
+ if (!setMin || gt_1(compver, setMin)) {
+ setMin = compver;
+ }
+
+ break;
+
+ case '<':
+ case '<=':
+ break;
+
+ default:
+ throw new Error(`Unexpected operation: ${comparator.operator}`);
+ }
+ });
+ if (setMin && (!minver || gt_1(minver, setMin))) minver = setMin;
+ }
+
+ if (minver && range$1.test(minver)) {
+ return minver;
+ }
+
+ return null;
+};
+
+var minVersion_1 = minVersion;
+
+const validRange = (range$1, options) => {
+ try {
+ return new range(range$1, options).range || '*';
+ } catch (er) {
+ return null;
+ }
+};
+
+var valid = validRange;
+const {
+ ANY: ANY$1
+} = comparator;
+
+const outside = (version, range$1, hilo, options) => {
+ version = new semver$1(version, options);
+ range$1 = new range(range$1, options);
+ let gtfn, ltefn, ltfn, comp, ecomp;
+
+ switch (hilo) {
+ case '>':
+ gtfn = gt_1;
+ ltefn = lte_1;
+ ltfn = lt_1;
+ comp = '>';
+ ecomp = '>=';
+ break;
+
+ case '<':
+ gtfn = lt_1;
+ ltefn = gte_1;
+ ltfn = gt_1;
+ comp = '<';
+ ecomp = '<=';
+ break;
+
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"');
+ }
+
+ if (satisfies_1(version, range$1, options)) {
+ return false;
+ }
+
+ for (let i = 0; i < range$1.set.length; ++i) {
+ const comparators = range$1.set[i];
+ let high = null;
+ let low = null;
+ comparators.forEach(comparator$1 => {
+ if (comparator$1.semver === ANY$1) {
+ comparator$1 = new comparator('>=0.0.0');
+ }
+
+ high = high || comparator$1;
+ low = low || comparator$1;
+
+ if (gtfn(comparator$1.semver, high.semver, options)) {
+ high = comparator$1;
+ } else if (ltfn(comparator$1.semver, low.semver, options)) {
+ low = comparator$1;
+ }
+ });
+
+ if (high.operator === comp || high.operator === ecomp) {
+ return false;
+ }
+
+ if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) {
+ return false;
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false;
+ }
+ }
+
+ return true;
+};
+
+var outside_1 = outside;
+
+const gtr = (version, range, options) => outside_1(version, range, '>', options);
+
+var gtr_1 = gtr;
+
+const ltr = (version, range, options) => outside_1(version, range, '<', options);
+
+var ltr_1 = ltr;
+
+const intersects = (r1, r2, options) => {
+ r1 = new range(r1, options);
+ r2 = new range(r2, options);
+ return r1.intersects(r2);
+};
+
+var intersects_1 = intersects;
+
+var simplify = (versions, range, options) => {
+ const set = [];
+ let min = null;
+ let prev = null;
+ const v = versions.sort((a, b) => compare_1(a, b, options));
+
+ for (const version of v) {
+ const included = satisfies_1(version, range, options);
+
+ if (included) {
+ prev = version;
+ if (!min) min = version;
+ } else {
+ if (prev) {
+ set.push([min, prev]);
+ }
+
+ prev = null;
+ min = null;
+ }
+ }
+
+ if (min) set.push([min, null]);
+ const ranges = [];
+
+ for (const [min, max] of set) {
+ if (min === max) ranges.push(min);else if (!max && min === v[0]) ranges.push('*');else if (!max) ranges.push(`>=${min}`);else if (min === v[0]) ranges.push(`<=${max}`);else ranges.push(`${min} - ${max}`);
+ }
+
+ const simplified = ranges.join(' || ');
+ const original = typeof range.raw === 'string' ? range.raw : String(range);
+ return simplified.length < original.length ? simplified : range;
+};
+
+const {
+ ANY
+} = comparator;
+
+const subset = (sub, dom, options = {}) => {
+ if (sub === dom) return true;
+ sub = new range(sub, options);
+ dom = new range(dom, options);
+ let sawNonNull = false;
+
+ OUTER: for (const simpleSub of sub.set) {
+ for (const simpleDom of dom.set) {
+ const isSub = simpleSubset(simpleSub, simpleDom, options);
+ sawNonNull = sawNonNull || isSub !== null;
+ if (isSub) continue OUTER;
+ }
+
+ if (sawNonNull) return false;
+ }
+
+ return true;
+};
+
+const simpleSubset = (sub, dom, options) => {
+ if (sub === dom) return true;
+
+ if (sub.length === 1 && sub[0].semver === ANY) {
+ if (dom.length === 1 && dom[0].semver === ANY) return true;else if (options.includePrerelease) sub = [new comparator('>=0.0.0-0')];else sub = [new comparator('>=0.0.0')];
+ }
+
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ if (options.includePrerelease) return true;else dom = [new comparator('>=0.0.0')];
+ }
+
+ const eqSet = new Set();
+ let gt, lt;
+
+ for (const c of sub) {
+ if (c.operator === '>' || c.operator === '>=') gt = higherGT(gt, c, options);else if (c.operator === '<' || c.operator === '<=') lt = lowerLT(lt, c, options);else eqSet.add(c.semver);
+ }
+
+ if (eqSet.size > 1) return null;
+ let gtltComp;
+
+ if (gt && lt) {
+ gtltComp = compare_1(gt.semver, lt.semver, options);
+ if (gtltComp > 0) return null;else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) return null;
+ }
+
+ for (const eq of eqSet) {
+ if (gt && !satisfies_1(eq, String(gt), options)) return null;
+ if (lt && !satisfies_1(eq, String(lt), options)) return null;
+
+ for (const c of dom) {
+ if (!satisfies_1(eq, String(c), options)) return false;
+ }
+
+ return true;
+ }
+
+ let higher, lower;
+ let hasDomLT, hasDomGT;
+ let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false;
+ let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false;
+
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
+ needDomLTPre = false;
+ }
+
+ for (const c of dom) {
+ hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>=';
+ hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<=';
+
+ if (gt) {
+ if (needDomGTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) {
+ needDomGTPre = false;
+ }
+ }
+
+ if (c.operator === '>' || c.operator === '>=') {
+ higher = higherGT(gt, c, options);
+ if (higher === c && higher !== gt) return false;
+ } else if (gt.operator === '>=' && !satisfies_1(gt.semver, String(c), options)) return false;
+ }
+
+ if (lt) {
+ if (needDomLTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) {
+ needDomLTPre = false;
+ }
+ }
+
+ if (c.operator === '<' || c.operator === '<=') {
+ lower = lowerLT(lt, c, options);
+ if (lower === c && lower !== lt) return false;
+ } else if (lt.operator === '<=' && !satisfies_1(lt.semver, String(c), options)) return false;
+ }
+
+ if (!c.operator && (lt || gt) && gtltComp !== 0) return false;
+ }
+
+ if (gt && hasDomLT && !lt && gtltComp !== 0) return false;
+ if (lt && hasDomGT && !gt && gtltComp !== 0) return false;
+ if (needDomGTPre || needDomLTPre) return false;
+ return true;
+};
+
+const higherGT = (a, b, options) => {
+ if (!a) return b;
+ const comp = compare_1(a.semver, b.semver, options);
+ return comp > 0 ? a : comp < 0 ? b : b.operator === '>' && a.operator === '>=' ? b : a;
+};
+
+const lowerLT = (a, b, options) => {
+ if (!a) return b;
+ const comp = compare_1(a.semver, b.semver, options);
+ return comp < 0 ? a : comp > 0 ? b : b.operator === '<' && a.operator === '<=' ? b : a;
+};
+
+var subset_1 = subset;
+var semver = {
+ re: re_1.re,
+ src: re_1.src,
+ tokens: re_1.t,
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
+ SemVer: semver$1,
+ compareIdentifiers: identifiers.compareIdentifiers,
+ rcompareIdentifiers: identifiers.rcompareIdentifiers,
+ parse: parse_1,
+ valid: valid_1,
+ clean: clean_1,
+ inc: inc_1,
+ diff: diff_1,
+ major: major_1,
+ minor: minor_1,
+ patch: patch_1,
+ prerelease: prerelease_1,
+ compare: compare_1,
+ rcompare: rcompare_1,
+ compareLoose: compareLoose_1,
+ compareBuild: compareBuild_1,
+ sort: sort_1,
+ rsort: rsort_1,
+ gt: gt_1,
+ lt: lt_1,
+ eq: eq_1,
+ neq: neq_1,
+ gte: gte_1,
+ lte: lte_1,
+ cmp: cmp_1,
+ coerce: coerce_1,
+ Comparator: comparator,
+ Range: range,
+ satisfies: satisfies_1,
+ toComparators: toComparators_1,
+ maxSatisfying: maxSatisfying_1,
+ minSatisfying: minSatisfying_1,
+ minVersion: minVersion_1,
+ validRange: valid,
+ outside: outside_1,
+ gtr: gtr_1,
+ ltr: ltr_1,
+ intersects: intersects_1,
+ simplifyRange: simplify,
+ subset: subset_1
+};
+
+var builtins = function ({
+ version = process.version,
+ experimental = false
+} = {}) {
+ var coreModules = ['assert', 'buffer', 'child_process', 'cluster', 'console', 'constants', 'crypto', 'dgram', 'dns', 'domain', 'events', 'fs', 'http', 'https', 'module', 'net', 'os', 'path', 'punycode', 'querystring', 'readline', 'repl', 'stream', 'string_decoder', 'sys', 'timers', 'tls', 'tty', 'url', 'util', 'vm', 'zlib'];
+ if (semver.lt(version, '6.0.0')) coreModules.push('freelist');
+ if (semver.gte(version, '1.0.0')) coreModules.push('v8');
+ if (semver.gte(version, '1.1.0')) coreModules.push('process');
+ if (semver.gte(version, '8.0.0')) coreModules.push('inspector');
+ if (semver.gte(version, '8.1.0')) coreModules.push('async_hooks');
+ if (semver.gte(version, '8.4.0')) coreModules.push('http2');
+ if (semver.gte(version, '8.5.0')) coreModules.push('perf_hooks');
+ if (semver.gte(version, '10.0.0')) coreModules.push('trace_events');
+
+ if (semver.gte(version, '10.5.0') && (experimental || semver.gte(version, '12.0.0'))) {
+ coreModules.push('worker_threads');
+ }
+
+ if (semver.gte(version, '12.16.0') && experimental) {
+ coreModules.push('wasi');
+ }
+
+ return coreModules;
+};
+
+const reader = {
+ read
+};
+
+function read(jsonPath) {
+ return find(_path().dirname(jsonPath));
+}
+
+function find(dir) {
+ try {
+ const string = _fs().default.readFileSync(_path().toNamespacedPath(_path().join(dir, 'package.json')), 'utf8');
+
+ return {
+ string
+ };
+ } catch (error) {
+ if (error.code === 'ENOENT') {
+ const parent = _path().dirname(dir);
+
+ if (dir !== parent) return find(parent);
+ return {
+ string: undefined
+ };
+ }
+
+ throw error;
+ }
+}
+
+const isWindows = process.platform === 'win32';
+const own$1 = {}.hasOwnProperty;
+const codes = {};
+const messages = new Map();
+const nodeInternalPrefix = '__node_internal_';
+let userStackTraceLimit;
+codes.ERR_INVALID_MODULE_SPECIFIER = createError('ERR_INVALID_MODULE_SPECIFIER', (request, reason, base = undefined) => {
+ return `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ''}`;
+}, TypeError);
+codes.ERR_INVALID_PACKAGE_CONFIG = createError('ERR_INVALID_PACKAGE_CONFIG', (path, base, message) => {
+ return `Invalid package config ${path}${base ? ` while importing ${base}` : ''}${message ? `. ${message}` : ''}`;
+}, Error);
+codes.ERR_INVALID_PACKAGE_TARGET = createError('ERR_INVALID_PACKAGE_TARGET', (pkgPath, key, target, isImport = false, base = undefined) => {
+ const relError = typeof target === 'string' && !isImport && target.length > 0 && !target.startsWith('./');
+
+ if (key === '.') {
+ _assert()(isImport === false);
+
+ return `Invalid "exports" main target ${JSON.stringify(target)} defined ` + `in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ''}${relError ? '; targets must start with "./"' : ''}`;
+ }
+
+ return `Invalid "${isImport ? 'imports' : 'exports'}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ''}${relError ? '; targets must start with "./"' : ''}`;
+}, Error);
+codes.ERR_MODULE_NOT_FOUND = createError('ERR_MODULE_NOT_FOUND', (path, base, type = 'package') => {
+ return `Cannot find ${type} '${path}' imported from ${base}`;
+}, Error);
+codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError('ERR_PACKAGE_IMPORT_NOT_DEFINED', (specifier, packagePath, base) => {
+ return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ''} imported from ${base}`;
+}, TypeError);
+codes.ERR_PACKAGE_PATH_NOT_EXPORTED = createError('ERR_PACKAGE_PATH_NOT_EXPORTED', (pkgPath, subpath, base = undefined) => {
+ if (subpath === '.') return `No "exports" main defined in ${pkgPath}package.json${base ? ` imported from ${base}` : ''}`;
+ return `Package subpath '${subpath}' is not defined by "exports" in ${pkgPath}package.json${base ? ` imported from ${base}` : ''}`;
+}, Error);
+codes.ERR_UNSUPPORTED_DIR_IMPORT = createError('ERR_UNSUPPORTED_DIR_IMPORT', "Directory import '%s' is not supported " + 'resolving ES modules imported from %s', Error);
+codes.ERR_UNKNOWN_FILE_EXTENSION = createError('ERR_UNKNOWN_FILE_EXTENSION', 'Unknown file extension "%s" for %s', TypeError);
+codes.ERR_INVALID_ARG_VALUE = createError('ERR_INVALID_ARG_VALUE', (name, value, reason = 'is invalid') => {
+ let inspected = (0, _util().inspect)(value);
+
+ if (inspected.length > 128) {
+ inspected = `${inspected.slice(0, 128)}...`;
+ }
+
+ const type = name.includes('.') ? 'property' : 'argument';
+ return `The ${type} '${name}' ${reason}. Received ${inspected}`;
+}, TypeError);
+codes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError('ERR_UNSUPPORTED_ESM_URL_SCHEME', url => {
+ let message = 'Only file and data URLs are supported by the default ESM loader';
+
+ if (isWindows && url.protocol.length === 2) {
+ message += '. On Windows, absolute paths must be valid file:// URLs';
+ }
+
+ message += `. Received protocol '${url.protocol}'`;
+ return message;
+}, Error);
+
+function createError(sym, value, def) {
+ messages.set(sym, value);
+ return makeNodeErrorWithCode(def, sym);
+}
+
+function makeNodeErrorWithCode(Base, key) {
+ return NodeError;
+
+ function NodeError(...args) {
+ const limit = Error.stackTraceLimit;
+ if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0;
+ const error = new Base();
+ if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit;
+ const message = getMessage(key, args, error);
+ Object.defineProperty(error, 'message', {
+ value: message,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ });
+ Object.defineProperty(error, 'toString', {
+ value() {
+ return `${this.name} [${key}]: ${this.message}`;
+ },
+
+ enumerable: false,
+ writable: true,
+ configurable: true
+ });
+ addCodeToName(error, Base.name, key);
+ error.code = key;
+ return error;
+ }
+}
+
+const addCodeToName = hideStackFrames(function (error, name, code) {
+ error = captureLargerStackTrace(error);
+ error.name = `${name} [${code}]`;
+ error.stack;
+
+ if (name === 'SystemError') {
+ Object.defineProperty(error, 'name', {
+ value: name,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ });
+ } else {
+ delete error.name;
+ }
+});
+
+function isErrorStackTraceLimitWritable() {
+ const desc = Object.getOwnPropertyDescriptor(Error, 'stackTraceLimit');
+
+ if (desc === undefined) {
+ return Object.isExtensible(Error);
+ }
+
+ return own$1.call(desc, 'writable') ? desc.writable : desc.set !== undefined;
+}
+
+function hideStackFrames(fn) {
+ const hidden = nodeInternalPrefix + fn.name;
+ Object.defineProperty(fn, 'name', {
+ value: hidden
+ });
+ return fn;
+}
+
+const captureLargerStackTrace = hideStackFrames(function (error) {
+ const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
+
+ if (stackTraceLimitIsWritable) {
+ userStackTraceLimit = Error.stackTraceLimit;
+ Error.stackTraceLimit = Number.POSITIVE_INFINITY;
+ }
+
+ Error.captureStackTrace(error);
+ if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit;
+ return error;
+});
+
+function getMessage(key, args, self) {
+ const message = messages.get(key);
+
+ if (typeof message === 'function') {
+ _assert()(message.length <= args.length, `Code: ${key}; The provided arguments length (${args.length}) does not ` + `match the required ones (${message.length}).`);
+
+ return Reflect.apply(message, self, args);
+ }
+
+ const expectedLength = (message.match(/%[dfijoOs]/g) || []).length;
+
+ _assert()(expectedLength === args.length, `Code: ${key}; The provided arguments length (${args.length}) does not ` + `match the required ones (${expectedLength}).`);
+
+ if (args.length === 0) return message;
+ args.unshift(message);
+ return Reflect.apply(_util().format, null, args);
+}
+
+const {
+ ERR_UNKNOWN_FILE_EXTENSION
+} = codes;
+const extensionFormatMap = {
+ __proto__: null,
+ '.cjs': 'commonjs',
+ '.js': 'module',
+ '.mjs': 'module'
+};
+
+function defaultGetFormat(url) {
+ if (url.startsWith('node:')) {
+ return {
+ format: 'builtin'
+ };
+ }
+
+ const parsed = new (_url().URL)(url);
+
+ if (parsed.protocol === 'data:') {
+ const {
+ 1: mime
+ } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(parsed.pathname) || [null, null];
+ const format = mime === 'text/javascript' ? 'module' : null;
+ return {
+ format
+ };
+ }
+
+ if (parsed.protocol === 'file:') {
+ const ext = _path().extname(parsed.pathname);
+
+ let format;
+
+ if (ext === '.js') {
+ format = getPackageType(parsed.href) === 'module' ? 'module' : 'commonjs';
+ } else {
+ format = extensionFormatMap[ext];
+ }
+
+ if (!format) {
+ throw new ERR_UNKNOWN_FILE_EXTENSION(ext, (0, _url().fileURLToPath)(url));
+ }
+
+ return {
+ format: format || null
+ };
+ }
+
+ return {
+ format: null
+ };
+}
+
+const listOfBuiltins = builtins();
+const {
+ ERR_INVALID_MODULE_SPECIFIER,
+ ERR_INVALID_PACKAGE_CONFIG,
+ ERR_INVALID_PACKAGE_TARGET,
+ ERR_MODULE_NOT_FOUND,
+ ERR_PACKAGE_IMPORT_NOT_DEFINED,
+ ERR_PACKAGE_PATH_NOT_EXPORTED,
+ ERR_UNSUPPORTED_DIR_IMPORT,
+ ERR_UNSUPPORTED_ESM_URL_SCHEME,
+ ERR_INVALID_ARG_VALUE
+} = codes;
+const own = {}.hasOwnProperty;
+const DEFAULT_CONDITIONS = Object.freeze(['node', 'import']);
+const DEFAULT_CONDITIONS_SET = new Set(DEFAULT_CONDITIONS);
+const invalidSegmentRegEx = /(^|\\|\/)(\.\.?|node_modules)(\\|\/|$)/;
+const patternRegEx = /\*/g;
+const encodedSepRegEx = /%2f|%2c/i;
+const emittedPackageWarnings = new Set();
+const packageJsonCache = new Map();
+
+function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) {
+ const pjsonPath = (0, _url().fileURLToPath)(pjsonUrl);
+ if (emittedPackageWarnings.has(pjsonPath + '|' + match)) return;
+ emittedPackageWarnings.add(pjsonPath + '|' + match);
+ process.emitWarning(`Use of deprecated folder mapping "${match}" in the ${isExports ? '"exports"' : '"imports"'} field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url().fileURLToPath)(base)}` : ''}.\n` + `Update this package.json to use a subpath pattern like "${match}*".`, 'DeprecationWarning', 'DEP0148');
+}
+
+function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) {
+ const {
+ format
+ } = defaultGetFormat(url.href);
+ if (format !== 'module') return;
+ const path = (0, _url().fileURLToPath)(url.href);
+ const pkgPath = (0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl));
+ const basePath = (0, _url().fileURLToPath)(base);
+ if (main) process.emitWarning(`Package ${pkgPath} has a "main" field set to ${JSON.stringify(main)}, ` + `excluding the full filename and extension to the resolved file at "${path.slice(pkgPath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is` + 'deprecated for ES modules.', 'DeprecationWarning', 'DEP0151');else process.emitWarning(`No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${path.slice(pkgPath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, 'DeprecationWarning', 'DEP0151');
+}
+
+function getConditionsSet(conditions) {
+ if (conditions !== undefined && conditions !== DEFAULT_CONDITIONS) {
+ if (!Array.isArray(conditions)) {
+ throw new ERR_INVALID_ARG_VALUE('conditions', conditions, 'expected an array');
+ }
+
+ return new Set(conditions);
+ }
+
+ return DEFAULT_CONDITIONS_SET;
+}
+
+function tryStatSync(path) {
+ try {
+ return (0, _fs().statSync)(path);
+ } catch (_unused) {
+ return new (_fs().Stats)();
+ }
+}
+
+function getPackageConfig(path, specifier, base) {
+ const existing = packageJsonCache.get(path);
+
+ if (existing !== undefined) {
+ return existing;
+ }
+
+ const source = reader.read(path).string;
+
+ if (source === undefined) {
+ const packageConfig = {
+ pjsonPath: path,
+ exists: false,
+ main: undefined,
+ name: undefined,
+ type: 'none',
+ exports: undefined,
+ imports: undefined
+ };
+ packageJsonCache.set(path, packageConfig);
+ return packageConfig;
+ }
+
+ let packageJson;
+
+ try {
+ packageJson = JSON.parse(source);
+ } catch (error) {
+ throw new ERR_INVALID_PACKAGE_CONFIG(path, (base ? `"${specifier}" from ` : '') + (0, _url().fileURLToPath)(base || specifier), error.message);
+ }
+
+ const {
+ exports,
+ imports,
+ main,
+ name,
+ type
+ } = packageJson;
+ const packageConfig = {
+ pjsonPath: path,
+ exists: true,
+ main: typeof main === 'string' ? main : undefined,
+ name: typeof name === 'string' ? name : undefined,
+ type: type === 'module' || type === 'commonjs' ? type : 'none',
+ exports,
+ imports: imports && typeof imports === 'object' ? imports : undefined
+ };
+ packageJsonCache.set(path, packageConfig);
+ return packageConfig;
+}
+
+function getPackageScopeConfig(resolved) {
+ let packageJsonUrl = new (_url().URL)('./package.json', resolved);
+
+ while (true) {
+ const packageJsonPath = packageJsonUrl.pathname;
+ if (packageJsonPath.endsWith('node_modules/package.json')) break;
+ const packageConfig = getPackageConfig((0, _url().fileURLToPath)(packageJsonUrl), resolved);
+ if (packageConfig.exists) return packageConfig;
+ const lastPackageJsonUrl = packageJsonUrl;
+ packageJsonUrl = new (_url().URL)('../package.json', packageJsonUrl);
+ if (packageJsonUrl.pathname === lastPackageJsonUrl.pathname) break;
+ }
+
+ const packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl);
+ const packageConfig = {
+ pjsonPath: packageJsonPath,
+ exists: false,
+ main: undefined,
+ name: undefined,
+ type: 'none',
+ exports: undefined,
+ imports: undefined
+ };
+ packageJsonCache.set(packageJsonPath, packageConfig);
+ return packageConfig;
+}
+
+function fileExists(url) {
+ return tryStatSync((0, _url().fileURLToPath)(url)).isFile();
+}
+
+function legacyMainResolve(packageJsonUrl, packageConfig, base) {
+ let guess;
+
+ if (packageConfig.main !== undefined) {
+ guess = new (_url().URL)(`./${packageConfig.main}`, packageJsonUrl);
+ if (fileExists(guess)) return guess;
+ const tries = [`./${packageConfig.main}.js`, `./${packageConfig.main}.json`, `./${packageConfig.main}.node`, `./${packageConfig.main}/index.js`, `./${packageConfig.main}/index.json`, `./${packageConfig.main}/index.node`];
+ let i = -1;
+
+ while (++i < tries.length) {
+ guess = new (_url().URL)(tries[i], packageJsonUrl);
+ if (fileExists(guess)) break;
+ guess = undefined;
+ }
+
+ if (guess) {
+ emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);
+ return guess;
+ }
+ }
+
+ const tries = ['./index.js', './index.json', './index.node'];
+ let i = -1;
+
+ while (++i < tries.length) {
+ guess = new (_url().URL)(tries[i], packageJsonUrl);
+ if (fileExists(guess)) break;
+ guess = undefined;
+ }
+
+ if (guess) {
+ emitLegacyIndexDeprecation(guess, packageJsonUrl, base, packageConfig.main);
+ return guess;
+ }
+
+ throw new ERR_MODULE_NOT_FOUND((0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), (0, _url().fileURLToPath)(base));
+}
+
+function finalizeResolution(resolved, base) {
+ if (encodedSepRegEx.test(resolved.pathname)) throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, 'must not include encoded "/" or "\\" characters', (0, _url().fileURLToPath)(base));
+ const path = (0, _url().fileURLToPath)(resolved);
+ const stats = tryStatSync(path.endsWith('/') ? path.slice(-1) : path);
+
+ if (stats.isDirectory()) {
+ const error = new ERR_UNSUPPORTED_DIR_IMPORT(path, (0, _url().fileURLToPath)(base));
+ error.url = String(resolved);
+ throw error;
+ }
+
+ if (!stats.isFile()) {
+ throw new ERR_MODULE_NOT_FOUND(path || resolved.pathname, base && (0, _url().fileURLToPath)(base), 'module');
+ }
+
+ return resolved;
+}
+
+function throwImportNotDefined(specifier, packageJsonUrl, base) {
+ throw new ERR_PACKAGE_IMPORT_NOT_DEFINED(specifier, packageJsonUrl && (0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), (0, _url().fileURLToPath)(base));
+}
+
+function throwExportsNotFound(subpath, packageJsonUrl, base) {
+ throw new ERR_PACKAGE_PATH_NOT_EXPORTED((0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), subpath, base && (0, _url().fileURLToPath)(base));
+}
+
+function throwInvalidSubpath(subpath, packageJsonUrl, internal, base) {
+ const reason = `request is not a valid subpath for the "${internal ? 'imports' : 'exports'}" resolution of ${(0, _url().fileURLToPath)(packageJsonUrl)}`;
+ throw new ERR_INVALID_MODULE_SPECIFIER(subpath, reason, base && (0, _url().fileURLToPath)(base));
+}
+
+function throwInvalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {
+ target = typeof target === 'object' && target !== null ? JSON.stringify(target, null, '') : `${target}`;
+ throw new ERR_INVALID_PACKAGE_TARGET((0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), subpath, target, internal, base && (0, _url().fileURLToPath)(base));
+}
+
+function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, conditions) {
+ if (subpath !== '' && !pattern && target[target.length - 1] !== '/') throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);
+
+ if (!target.startsWith('./')) {
+ if (internal && !target.startsWith('../') && !target.startsWith('/')) {
+ let isURL = false;
+
+ try {
+ new (_url().URL)(target);
+ isURL = true;
+ } catch (_unused2) {}
+
+ if (!isURL) {
+ const exportTarget = pattern ? target.replace(patternRegEx, subpath) : target + subpath;
+ return packageResolve(exportTarget, packageJsonUrl, conditions);
+ }
+ }
+
+ throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);
+ }
+
+ if (invalidSegmentRegEx.test(target.slice(2))) throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);
+ const resolved = new (_url().URL)(target, packageJsonUrl);
+ const resolvedPath = resolved.pathname;
+ const packagePath = new (_url().URL)('.', packageJsonUrl).pathname;
+ if (!resolvedPath.startsWith(packagePath)) throwInvalidPackageTarget(match, target, packageJsonUrl, internal, base);
+ if (subpath === '') return resolved;
+ if (invalidSegmentRegEx.test(subpath)) throwInvalidSubpath(match + subpath, packageJsonUrl, internal, base);
+ if (pattern) return new (_url().URL)(resolved.href.replace(patternRegEx, subpath));
+ return new (_url().URL)(subpath, resolved);
+}
+
+function isArrayIndex(key) {
+ const keyNumber = Number(key);
+ if (`${keyNumber}` !== key) return false;
+ return keyNumber >= 0 && keyNumber < 0xffffffff;
+}
+
+function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, base, pattern, internal, conditions) {
+ if (typeof target === 'string') {
+ return resolvePackageTargetString(target, subpath, packageSubpath, packageJsonUrl, base, pattern, internal, conditions);
+ }
+
+ if (Array.isArray(target)) {
+ const targetList = target;
+ if (targetList.length === 0) return null;
+ let lastException;
+ let i = -1;
+
+ while (++i < targetList.length) {
+ const targetItem = targetList[i];
+ let resolved;
+
+ try {
+ resolved = resolvePackageTarget(packageJsonUrl, targetItem, subpath, packageSubpath, base, pattern, internal, conditions);
+ } catch (error) {
+ lastException = error;
+ if (error.code === 'ERR_INVALID_PACKAGE_TARGET') continue;
+ throw error;
+ }
+
+ if (resolved === undefined) continue;
+
+ if (resolved === null) {
+ lastException = null;
+ continue;
+ }
+
+ return resolved;
+ }
+
+ if (lastException === undefined || lastException === null) {
+ return lastException;
+ }
+
+ throw lastException;
+ }
+
+ if (typeof target === 'object' && target !== null) {
+ const keys = Object.getOwnPropertyNames(target);
+ let i = -1;
+
+ while (++i < keys.length) {
+ const key = keys[i];
+
+ if (isArrayIndex(key)) {
+ throw new ERR_INVALID_PACKAGE_CONFIG((0, _url().fileURLToPath)(packageJsonUrl), base, '"exports" cannot contain numeric property keys.');
+ }
+ }
+
+ i = -1;
+
+ while (++i < keys.length) {
+ const key = keys[i];
+
+ if (key === 'default' || conditions && conditions.has(key)) {
+ const conditionalTarget = target[key];
+ const resolved = resolvePackageTarget(packageJsonUrl, conditionalTarget, subpath, packageSubpath, base, pattern, internal, conditions);
+ if (resolved === undefined) continue;
+ return resolved;
+ }
+ }
+
+ return undefined;
+ }
+
+ if (target === null) {
+ return null;
+ }
+
+ throwInvalidPackageTarget(packageSubpath, target, packageJsonUrl, internal, base);
+}
+
+function isConditionalExportsMainSugar(exports, packageJsonUrl, base) {
+ if (typeof exports === 'string' || Array.isArray(exports)) return true;
+ if (typeof exports !== 'object' || exports === null) return false;
+ const keys = Object.getOwnPropertyNames(exports);
+ let isConditionalSugar = false;
+ let i = 0;
+ let j = -1;
+
+ while (++j < keys.length) {
+ const key = keys[j];
+ const curIsConditionalSugar = key === '' || key[0] !== '.';
+
+ if (i++ === 0) {
+ isConditionalSugar = curIsConditionalSugar;
+ } else if (isConditionalSugar !== curIsConditionalSugar) {
+ throw new ERR_INVALID_PACKAGE_CONFIG((0, _url().fileURLToPath)(packageJsonUrl), base, '"exports" cannot contain some keys starting with \'.\' and some not.' + ' The exports object must either be an object of package subpath keys' + ' or an object of main entry condition name keys only.');
+ }
+ }
+
+ return isConditionalSugar;
+}
+
+function packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions) {
+ let exports = packageConfig.exports;
+ if (isConditionalExportsMainSugar(exports, packageJsonUrl, base)) exports = {
+ '.': exports
+ };
+
+ if (own.call(exports, packageSubpath)) {
+ const target = exports[packageSubpath];
+ const resolved = resolvePackageTarget(packageJsonUrl, target, '', packageSubpath, base, false, false, conditions);
+ if (resolved === null || resolved === undefined) throwExportsNotFound(packageSubpath, packageJsonUrl, base);
+ return {
+ resolved,
+ exact: true
+ };
+ }
+
+ let bestMatch = '';
+ const keys = Object.getOwnPropertyNames(exports);
+ let i = -1;
+
+ while (++i < keys.length) {
+ const key = keys[i];
+
+ if (key[key.length - 1] === '*' && packageSubpath.startsWith(key.slice(0, -1)) && packageSubpath.length >= key.length && key.length > bestMatch.length) {
+ bestMatch = key;
+ } else if (key[key.length - 1] === '/' && packageSubpath.startsWith(key) && key.length > bestMatch.length) {
+ bestMatch = key;
+ }
+ }
+
+ if (bestMatch) {
+ const target = exports[bestMatch];
+ const pattern = bestMatch[bestMatch.length - 1] === '*';
+ const subpath = packageSubpath.slice(bestMatch.length - (pattern ? 1 : 0));
+ const resolved = resolvePackageTarget(packageJsonUrl, target, subpath, bestMatch, base, pattern, false, conditions);
+ if (resolved === null || resolved === undefined) throwExportsNotFound(packageSubpath, packageJsonUrl, base);
+ if (!pattern) emitFolderMapDeprecation(bestMatch, packageJsonUrl, true, base);
+ return {
+ resolved,
+ exact: pattern
+ };
+ }
+
+ throwExportsNotFound(packageSubpath, packageJsonUrl, base);
+}
+
+function packageImportsResolve(name, base, conditions) {
+ if (name === '#' || name.startsWith('#/')) {
+ const reason = 'is not a valid internal imports specifier name';
+ throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, (0, _url().fileURLToPath)(base));
+ }
+
+ let packageJsonUrl;
+ const packageConfig = getPackageScopeConfig(base);
+
+ if (packageConfig.exists) {
+ packageJsonUrl = (0, _url().pathToFileURL)(packageConfig.pjsonPath);
+ const imports = packageConfig.imports;
+
+ if (imports) {
+ if (own.call(imports, name)) {
+ const resolved = resolvePackageTarget(packageJsonUrl, imports[name], '', name, base, false, true, conditions);
+ if (resolved !== null) return {
+ resolved,
+ exact: true
+ };
+ } else {
+ let bestMatch = '';
+ const keys = Object.getOwnPropertyNames(imports);
+ let i = -1;
+
+ while (++i < keys.length) {
+ const key = keys[i];
+
+ if (key[key.length - 1] === '*' && name.startsWith(key.slice(0, -1)) && name.length >= key.length && key.length > bestMatch.length) {
+ bestMatch = key;
+ } else if (key[key.length - 1] === '/' && name.startsWith(key) && key.length > bestMatch.length) {
+ bestMatch = key;
+ }
+ }
+
+ if (bestMatch) {
+ const target = imports[bestMatch];
+ const pattern = bestMatch[bestMatch.length - 1] === '*';
+ const subpath = name.slice(bestMatch.length - (pattern ? 1 : 0));
+ const resolved = resolvePackageTarget(packageJsonUrl, target, subpath, bestMatch, base, pattern, true, conditions);
+
+ if (resolved !== null) {
+ if (!pattern) emitFolderMapDeprecation(bestMatch, packageJsonUrl, false, base);
+ return {
+ resolved,
+ exact: pattern
+ };
+ }
+ }
+ }
+ }
+ }
+
+ throwImportNotDefined(name, packageJsonUrl, base);
+}
+
+function getPackageType(url) {
+ const packageConfig = getPackageScopeConfig(url);
+ return packageConfig.type;
+}
+
+function parsePackageName(specifier, base) {
+ let separatorIndex = specifier.indexOf('/');
+ let validPackageName = true;
+ let isScoped = false;
+
+ if (specifier[0] === '@') {
+ isScoped = true;
+
+ if (separatorIndex === -1 || specifier.length === 0) {
+ validPackageName = false;
+ } else {
+ separatorIndex = specifier.indexOf('/', separatorIndex + 1);
+ }
+ }
+
+ const packageName = separatorIndex === -1 ? specifier : specifier.slice(0, separatorIndex);
+ let i = -1;
+
+ while (++i < packageName.length) {
+ if (packageName[i] === '%' || packageName[i] === '\\') {
+ validPackageName = false;
+ break;
+ }
+ }
+
+ if (!validPackageName) {
+ throw new ERR_INVALID_MODULE_SPECIFIER(specifier, 'is not a valid package name', (0, _url().fileURLToPath)(base));
+ }
+
+ const packageSubpath = '.' + (separatorIndex === -1 ? '' : specifier.slice(separatorIndex));
+ return {
+ packageName,
+ packageSubpath,
+ isScoped
+ };
+}
+
+function packageResolve(specifier, base, conditions) {
+ const {
+ packageName,
+ packageSubpath,
+ isScoped
+ } = parsePackageName(specifier, base);
+ const packageConfig = getPackageScopeConfig(base);
+
+ if (packageConfig.exists) {
+ const packageJsonUrl = (0, _url().pathToFileURL)(packageConfig.pjsonPath);
+
+ if (packageConfig.name === packageName && packageConfig.exports !== undefined && packageConfig.exports !== null) {
+ return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions).resolved;
+ }
+ }
+
+ let packageJsonUrl = new (_url().URL)('./node_modules/' + packageName + '/package.json', base);
+ let packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl);
+ let lastPath;
+
+ do {
+ const stat = tryStatSync(packageJsonPath.slice(0, -13));
+
+ if (!stat.isDirectory()) {
+ lastPath = packageJsonPath;
+ packageJsonUrl = new (_url().URL)((isScoped ? '../../../../node_modules/' : '../../../node_modules/') + packageName + '/package.json', packageJsonUrl);
+ packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl);
+ continue;
+ }
+
+ const packageConfig = getPackageConfig(packageJsonPath, specifier, base);
+ if (packageConfig.exports !== undefined && packageConfig.exports !== null) return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions).resolved;
+ if (packageSubpath === '.') return legacyMainResolve(packageJsonUrl, packageConfig, base);
+ return new (_url().URL)(packageSubpath, packageJsonUrl);
+ } while (packageJsonPath.length !== lastPath.length);
+
+ throw new ERR_MODULE_NOT_FOUND(packageName, (0, _url().fileURLToPath)(base));
+}
+
+function isRelativeSpecifier(specifier) {
+ if (specifier[0] === '.') {
+ if (specifier.length === 1 || specifier[1] === '/') return true;
+
+ if (specifier[1] === '.' && (specifier.length === 2 || specifier[2] === '/')) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function shouldBeTreatedAsRelativeOrAbsolutePath(specifier) {
+ if (specifier === '') return false;
+ if (specifier[0] === '/') return true;
+ return isRelativeSpecifier(specifier);
+}
+
+function moduleResolve(specifier, base, conditions) {
+ let resolved;
+
+ if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {
+ resolved = new (_url().URL)(specifier, base);
+ } else if (specifier[0] === '#') {
+ ({
+ resolved
+ } = packageImportsResolve(specifier, base, conditions));
+ } else {
+ try {
+ resolved = new (_url().URL)(specifier);
+ } catch (_unused3) {
+ resolved = packageResolve(specifier, base, conditions);
+ }
+ }
+
+ return finalizeResolution(resolved, base);
+}
+
+function defaultResolve(specifier, context = {}) {
+ const {
+ parentURL
+ } = context;
+ let parsed;
+
+ try {
+ parsed = new (_url().URL)(specifier);
+
+ if (parsed.protocol === 'data:') {
+ return {
+ url: specifier
+ };
+ }
+ } catch (_unused4) {}
+
+ if (parsed && parsed.protocol === 'node:') return {
+ url: specifier
+ };
+ if (parsed && parsed.protocol !== 'file:' && parsed.protocol !== 'data:') throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed);
+
+ if (listOfBuiltins.includes(specifier)) {
+ return {
+ url: 'node:' + specifier
+ };
+ }
+
+ if (parentURL.startsWith('data:')) {
+ new (_url().URL)(specifier, parentURL);
+ }
+
+ const conditions = getConditionsSet(context.conditions);
+ let url = moduleResolve(specifier, new (_url().URL)(parentURL), conditions);
+ const urlPath = (0, _url().fileURLToPath)(url);
+ const real = (0, _fs().realpathSync)(urlPath);
+ const old = url;
+ url = (0, _url().pathToFileURL)(real + (urlPath.endsWith(_path().sep) ? '/' : ''));
+ url.search = old.search;
+ url.hash = old.hash;
+ return {
+ url: `${url}`
+ };
+}
+
+function resolve(_x, _x2) {
+ return _resolve.apply(this, arguments);
+}
+
+function _resolve() {
+ _resolve = _asyncToGenerator(function* (specifier, parent) {
+ if (!parent) {
+ throw new Error('Please pass `parent`: `import-meta-resolve` cannot ponyfill that');
+ }
+
+ try {
+ return defaultResolve(specifier, {
+ parentURL: parent
+ }).url;
+ } catch (error) {
+ return error.code === 'ERR_UNSUPPORTED_DIR_IMPORT' ? error.url : Promise.reject(error);
+ }
+ });
+ return _resolve.apply(this, arguments);
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/package.json b/node_modules/@babel/core/package.json
new file mode 100644
index 0000000..86e20c3
--- /dev/null
+++ b/node_modules/@babel/core/package.json
@@ -0,0 +1,76 @@
+{
+ "name": "@babel/core",
+ "version": "7.17.5",
+ "description": "Babel compiler core.",
+ "main": "./lib/index.js",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-core"
+ },
+ "homepage": "https://babel.dev/docs/en/next/babel-core",
+ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen",
+ "keywords": [
+ "6to5",
+ "babel",
+ "classes",
+ "const",
+ "es6",
+ "harmony",
+ "let",
+ "modules",
+ "transpile",
+ "transpiler",
+ "var",
+ "babel-core",
+ "compiler"
+ ],
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ },
+ "browser": {
+ "./lib/config/files/index.js": "./lib/config/files/index-browser.js",
+ "./lib/config/resolve-targets.js": "./lib/config/resolve-targets-browser.js",
+ "./lib/transform-file.js": "./lib/transform-file-browser.js",
+ "./lib/transformation/util/clone-deep.js": "./lib/transformation/util/clone-deep-browser.js",
+ "./src/config/files/index.ts": "./src/config/files/index-browser.ts",
+ "./src/config/resolve-targets.ts": "./src/config/resolve-targets-browser.ts",
+ "./src/transform-file.ts": "./src/transform-file-browser.ts",
+ "./src/transformation/util/clone-deep.ts": "./src/transformation/util/clone-deep-browser.ts"
+ },
+ "dependencies": {
+ "@ampproject/remapping": "^2.1.0",
+ "@babel/code-frame": "^7.16.7",
+ "@babel/generator": "^7.17.3",
+ "@babel/helper-compilation-targets": "^7.16.7",
+ "@babel/helper-module-transforms": "^7.16.7",
+ "@babel/helpers": "^7.17.2",
+ "@babel/parser": "^7.17.3",
+ "@babel/template": "^7.16.7",
+ "@babel/traverse": "^7.17.3",
+ "@babel/types": "^7.17.0",
+ "convert-source-map": "^1.7.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.1.2",
+ "semver": "^6.3.0"
+ },
+ "devDependencies": {
+ "@babel/helper-transform-fixture-test-runner": "^7.17.3",
+ "@babel/plugin-transform-modules-commonjs": "^7.16.8",
+ "@jridgewell/trace-mapping": "^0.3.4",
+ "@types/convert-source-map": "^1.5.1",
+ "@types/debug": "^4.1.0",
+ "@types/resolve": "^1.3.2",
+ "@types/semver": "^5.4.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/core/src/config/files/index-browser.ts b/node_modules/@babel/core/src/config/files/index-browser.ts
new file mode 100644
index 0000000..ac615d9
--- /dev/null
+++ b/node_modules/@babel/core/src/config/files/index-browser.ts
@@ -0,0 +1,109 @@
+import type { Handler } from "gensync";
+
+import type {
+ ConfigFile,
+ IgnoreFile,
+ RelativeConfig,
+ FilePackageData,
+} from "./types";
+
+import type { CallerMetadata } from "../validation/options";
+
+export type { ConfigFile, IgnoreFile, RelativeConfig, FilePackageData };
+
+export function findConfigUpwards(
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ rootDir: string,
+): string | null {
+ return null;
+}
+
+// eslint-disable-next-line require-yield
+export function* findPackageData(filepath: string): Handler<FilePackageData> {
+ return {
+ filepath,
+ directories: [],
+ pkg: null,
+ isPackage: false,
+ };
+}
+
+// eslint-disable-next-line require-yield
+export function* findRelativeConfig(
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ pkgData: FilePackageData,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ envName: string,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ caller: CallerMetadata | void,
+): Handler<RelativeConfig> {
+ return { config: null, ignore: null };
+}
+
+// eslint-disable-next-line require-yield
+export function* findRootConfig(
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ dirname: string,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ envName: string,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ caller: CallerMetadata | void,
+): Handler<ConfigFile | null> {
+ return null;
+}
+
+// eslint-disable-next-line require-yield
+export function* loadConfig(
+ name: string,
+ dirname: string,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ envName: string,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ caller: CallerMetadata | void,
+): Handler<ConfigFile> {
+ throw new Error(`Cannot load ${name} relative to ${dirname} in a browser`);
+}
+
+// eslint-disable-next-line require-yield
+export function* resolveShowConfigPath(
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ dirname: string,
+): Handler<string | null> {
+ return null;
+}
+
+export const ROOT_CONFIG_FILENAMES = [];
+
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
+export function resolvePlugin(name: string, dirname: string): string | null {
+ return null;
+}
+
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
+export function resolvePreset(name: string, dirname: string): string | null {
+ return null;
+}
+
+export function loadPlugin(
+ name: string,
+ dirname: string,
+): Handler<{
+ filepath: string;
+ value: unknown;
+}> {
+ throw new Error(
+ `Cannot load plugin ${name} relative to ${dirname} in a browser`,
+ );
+}
+
+export function loadPreset(
+ name: string,
+ dirname: string,
+): Handler<{
+ filepath: string;
+ value: unknown;
+}> {
+ throw new Error(
+ `Cannot load preset ${name} relative to ${dirname} in a browser`,
+ );
+}
diff --git a/node_modules/@babel/core/src/config/files/index.ts b/node_modules/@babel/core/src/config/files/index.ts
new file mode 100644
index 0000000..31e8560
--- /dev/null
+++ b/node_modules/@babel/core/src/config/files/index.ts
@@ -0,0 +1,30 @@
+type indexBrowserType = typeof import("./index-browser");
+type indexType = typeof import("./index");
+
+// Kind of gross, but essentially asserting that the exports of this module are the same as the
+// exports of index-browser, since this file may be replaced at bundle time with index-browser.
+({} as any as indexBrowserType as indexType);
+
+export { findPackageData } from "./package";
+
+export {
+ findConfigUpwards,
+ findRelativeConfig,
+ findRootConfig,
+ loadConfig,
+ resolveShowConfigPath,
+ ROOT_CONFIG_FILENAMES,
+} from "./configuration";
+export type {
+ ConfigFile,
+ IgnoreFile,
+ RelativeConfig,
+ FilePackageData,
+} from "./types";
+export { loadPlugin, loadPreset } from "./plugins";
+
+import gensync from "gensync";
+import * as plugins from "./plugins";
+
+export const resolvePlugin = gensync(plugins.resolvePlugin).sync;
+export const resolvePreset = gensync(plugins.resolvePreset).sync;
diff --git a/node_modules/@babel/core/src/config/resolve-targets-browser.ts b/node_modules/@babel/core/src/config/resolve-targets-browser.ts
new file mode 100644
index 0000000..2d91c92
--- /dev/null
+++ b/node_modules/@babel/core/src/config/resolve-targets-browser.ts
@@ -0,0 +1,33 @@
+import type { ValidatedOptions } from "./validation/options";
+import getTargets from "@babel/helper-compilation-targets";
+
+import type { Targets } from "@babel/helper-compilation-targets";
+
+export function resolveBrowserslistConfigFile(
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ browserslistConfigFile: string,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ configFilePath: string,
+): string | void {
+ return undefined;
+}
+
+export function resolveTargets(
+ options: ValidatedOptions,
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ root: string,
+): Targets {
+ // todo(flow->ts) remove any and refactor to not assign different types into same variable
+ let targets: any = options.targets;
+ if (typeof targets === "string" || Array.isArray(targets)) {
+ targets = { browsers: targets };
+ }
+ if (targets && targets.esmodules) {
+ targets = { ...targets, esmodules: "intersect" };
+ }
+
+ return getTargets(targets, {
+ ignoreBrowserslistConfig: true,
+ browserslistEnv: options.browserslistEnv,
+ });
+}
diff --git a/node_modules/@babel/core/src/config/resolve-targets.ts b/node_modules/@babel/core/src/config/resolve-targets.ts
new file mode 100644
index 0000000..90a443e
--- /dev/null
+++ b/node_modules/@babel/core/src/config/resolve-targets.ts
@@ -0,0 +1,49 @@
+type browserType = typeof import("./resolve-targets-browser");
+type nodeType = typeof import("./resolve-targets");
+
+// Kind of gross, but essentially asserting that the exports of this module are the same as the
+// exports of index-browser, since this file may be replaced at bundle time with index-browser.
+({} as any as browserType as nodeType);
+
+import type { ValidatedOptions } from "./validation/options";
+import path from "path";
+import getTargets from "@babel/helper-compilation-targets";
+
+import type { Targets } from "@babel/helper-compilation-targets";
+
+export function resolveBrowserslistConfigFile(
+ browserslistConfigFile: string,
+ configFileDir: string,
+): string | undefined {
+ return path.resolve(configFileDir, browserslistConfigFile);
+}
+
+export function resolveTargets(
+ options: ValidatedOptions,
+ root: string,
+): Targets {
+ // todo(flow->ts) remove any and refactor to not assign different types into same variable
+ let targets: any = options.targets;
+ if (typeof targets === "string" || Array.isArray(targets)) {
+ targets = { browsers: targets };
+ }
+ if (targets && targets.esmodules) {
+ targets = { ...targets, esmodules: "intersect" };
+ }
+
+ const { browserslistConfigFile } = options;
+ let configFile;
+ let ignoreBrowserslistConfig = false;
+ if (typeof browserslistConfigFile === "string") {
+ configFile = browserslistConfigFile;
+ } else {
+ ignoreBrowserslistConfig = browserslistConfigFile === false;
+ }
+
+ return getTargets(targets, {
+ ignoreBrowserslistConfig,
+ configFile,
+ configPath: root,
+ browserslistEnv: options.browserslistEnv,
+ });
+}
diff --git a/node_modules/@babel/core/src/transform-file-browser.ts b/node_modules/@babel/core/src/transform-file-browser.ts
new file mode 100644
index 0000000..1adbcd6
--- /dev/null
+++ b/node_modules/@babel/core/src/transform-file-browser.ts
@@ -0,0 +1,27 @@
+// duplicated from transform-file so we do not have to import anything here
+type TransformFile = {
+ (filename: string, callback: Function): void;
+ (filename: string, opts: any, callback: Function): void;
+};
+
+export const transformFile: TransformFile = function transformFile(
+ filename,
+ opts,
+ callback?,
+) {
+ if (typeof opts === "function") {
+ callback = opts;
+ }
+
+ callback(new Error("Transforming files is not supported in browsers"), null);
+};
+
+export function transformFileSync(): never {
+ throw new Error("Transforming files is not supported in browsers");
+}
+
+export function transformFileAsync() {
+ return Promise.reject(
+ new Error("Transforming files is not supported in browsers"),
+ );
+}
diff --git a/node_modules/@babel/core/src/transform-file.ts b/node_modules/@babel/core/src/transform-file.ts
new file mode 100644
index 0000000..4be0e16
--- /dev/null
+++ b/node_modules/@babel/core/src/transform-file.ts
@@ -0,0 +1,40 @@
+import gensync from "gensync";
+
+import loadConfig from "./config";
+import type { InputOptions, ResolvedConfig } from "./config";
+import { run } from "./transformation";
+import type { FileResult, FileResultCallback } from "./transformation";
+import * as fs from "./gensync-utils/fs";
+
+type transformFileBrowserType = typeof import("./transform-file-browser");
+type transformFileType = typeof import("./transform-file");
+
+// Kind of gross, but essentially asserting that the exports of this module are the same as the
+// exports of transform-file-browser, since this file may be replaced at bundle time with
+// transform-file-browser.
+({} as any as transformFileBrowserType as transformFileType);
+
+type TransformFile = {
+ (filename: string, callback: FileResultCallback): void;
+ (
+ filename: string,
+ opts: InputOptions | undefined | null,
+ callback: FileResultCallback,
+ ): void;
+};
+
+const transformFileRunner = gensync<
+ (filename: string, opts?: InputOptions) => FileResult | null
+>(function* (filename, opts: InputOptions) {
+ const options = { ...opts, filename };
+
+ const config: ResolvedConfig | null = yield* loadConfig(options);
+ if (config === null) return null;
+
+ const code = yield* fs.readFile(filename, "utf8");
+ return yield* run(config, code);
+});
+
+export const transformFile = transformFileRunner.errback as TransformFile;
+export const transformFileSync = transformFileRunner.sync;
+export const transformFileAsync = transformFileRunner.async;
diff --git a/node_modules/@babel/core/src/transformation/util/clone-deep-browser.ts b/node_modules/@babel/core/src/transformation/util/clone-deep-browser.ts
new file mode 100644
index 0000000..78ae53e
--- /dev/null
+++ b/node_modules/@babel/core/src/transformation/util/clone-deep-browser.ts
@@ -0,0 +1,19 @@
+const serialized = "$$ babel internal serialized type" + Math.random();
+
+function serialize(key, value) {
+ if (typeof value !== "bigint") return value;
+ return {
+ [serialized]: "BigInt",
+ value: value.toString(),
+ };
+}
+
+function revive(key, value) {
+ if (!value || typeof value !== "object") return value;
+ if (value[serialized] !== "BigInt") return value;
+ return BigInt(value.value);
+}
+
+export default function (value) {
+ return JSON.parse(JSON.stringify(value, serialize), revive);
+}
diff --git a/node_modules/@babel/core/src/transformation/util/clone-deep.ts b/node_modules/@babel/core/src/transformation/util/clone-deep.ts
new file mode 100644
index 0000000..cc077ce
--- /dev/null
+++ b/node_modules/@babel/core/src/transformation/util/clone-deep.ts
@@ -0,0 +1,9 @@
+import v8 from "v8";
+import cloneDeep from "./clone-deep-browser";
+
+export default function (value) {
+ if (v8.deserialize && v8.serialize) {
+ return v8.deserialize(v8.serialize(value));
+ }
+ return cloneDeep(value);
+}
diff --git a/node_modules/@babel/generator/LICENSE b/node_modules/@babel/generator/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/generator/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/generator/README.md b/node_modules/@babel/generator/README.md
new file mode 100644
index 0000000..b760238
--- /dev/null
+++ b/node_modules/@babel/generator/README.md
@@ -0,0 +1,19 @@
+# @babel/generator
+
+> Turns an AST into code.
+
+See our website [@babel/generator](https://babeljs.io/docs/en/babel-generator) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/generator
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/generator --dev
+```
diff --git a/node_modules/@babel/generator/lib/buffer.js b/node_modules/@babel/generator/lib/buffer.js
new file mode 100644
index 0000000..1445813
--- /dev/null
+++ b/node_modules/@babel/generator/lib/buffer.js
@@ -0,0 +1,265 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+const SPACES_RE = /^[ \t]+$/;
+
+class Buffer {
+ constructor(map) {
+ this._map = null;
+ this._buf = "";
+ this._last = 0;
+ this._queue = [];
+ this._position = {
+ line: 1,
+ column: 0
+ };
+ this._sourcePosition = {
+ identifierName: null,
+ line: null,
+ column: null,
+ filename: null
+ };
+ this._disallowedPop = null;
+ this._map = map;
+ }
+
+ get() {
+ this._flush();
+
+ const map = this._map;
+ const result = {
+ code: this._buf.trimRight(),
+ map: null,
+ rawMappings: map == null ? void 0 : map.getRawMappings()
+ };
+
+ if (map) {
+ Object.defineProperty(result, "map", {
+ configurable: true,
+ enumerable: true,
+
+ get() {
+ return this.map = map.get();
+ },
+
+ set(value) {
+ Object.defineProperty(this, "map", {
+ value,
+ writable: true
+ });
+ }
+
+ });
+ }
+
+ return result;
+ }
+
+ append(str) {
+ this._flush();
+
+ const {
+ line,
+ column,
+ filename,
+ identifierName,
+ force
+ } = this._sourcePosition;
+
+ this._append(str, line, column, identifierName, filename, force);
+ }
+
+ queue(str) {
+ if (str === "\n") {
+ while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {
+ this._queue.shift();
+ }
+ }
+
+ const {
+ line,
+ column,
+ filename,
+ identifierName,
+ force
+ } = this._sourcePosition;
+
+ this._queue.unshift([str, line, column, identifierName, filename, force]);
+ }
+
+ _flush() {
+ let item;
+
+ while (item = this._queue.pop()) {
+ this._append(...item);
+ }
+ }
+
+ _append(str, line, column, identifierName, filename, force) {
+ this._buf += str;
+ this._last = str.charCodeAt(str.length - 1);
+ let i = str.indexOf("\n");
+ let last = 0;
+
+ if (i !== 0) {
+ this._mark(line, column, identifierName, filename, force);
+ }
+
+ while (i !== -1) {
+ this._position.line++;
+ this._position.column = 0;
+ last = i + 1;
+
+ if (last < str.length) {
+ this._mark(++line, 0, identifierName, filename, force);
+ }
+
+ i = str.indexOf("\n", last);
+ }
+
+ this._position.column += str.length - last;
+ }
+
+ _mark(line, column, identifierName, filename, force) {
+ var _this$_map;
+
+ (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);
+ }
+
+ removeTrailingNewline() {
+ if (this._queue.length > 0 && this._queue[0][0] === "\n") {
+ this._queue.shift();
+ }
+ }
+
+ removeLastSemicolon() {
+ if (this._queue.length > 0 && this._queue[0][0] === ";") {
+ this._queue.shift();
+ }
+ }
+
+ getLastChar() {
+ let last;
+
+ if (this._queue.length > 0) {
+ const str = this._queue[0][0];
+ last = str.charCodeAt(0);
+ } else {
+ last = this._last;
+ }
+
+ return last;
+ }
+
+ endsWithCharAndNewline() {
+ const queue = this._queue;
+
+ if (queue.length > 0) {
+ const last = queue[0][0];
+ const lastCp = last.charCodeAt(0);
+ if (lastCp !== 10) return;
+
+ if (queue.length > 1) {
+ const secondLast = queue[1][0];
+ return secondLast.charCodeAt(0);
+ } else {
+ return this._last;
+ }
+ }
+ }
+
+ hasContent() {
+ return this._queue.length > 0 || !!this._last;
+ }
+
+ exactSource(loc, cb) {
+ this.source("start", loc, true);
+ cb();
+ this.source("end", loc);
+
+ this._disallowPop("start", loc);
+ }
+
+ source(prop, loc, force) {
+ if (prop && !loc) return;
+
+ this._normalizePosition(prop, loc, this._sourcePosition, force);
+ }
+
+ withSource(prop, loc, cb) {
+ if (!this._map) return cb();
+ const originalLine = this._sourcePosition.line;
+ const originalColumn = this._sourcePosition.column;
+ const originalFilename = this._sourcePosition.filename;
+ const originalIdentifierName = this._sourcePosition.identifierName;
+ this.source(prop, loc);
+ cb();
+
+ if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) {
+ this._sourcePosition.line = originalLine;
+ this._sourcePosition.column = originalColumn;
+ this._sourcePosition.filename = originalFilename;
+ this._sourcePosition.identifierName = originalIdentifierName;
+ this._sourcePosition.force = false;
+ this._disallowedPop = null;
+ }
+ }
+
+ _disallowPop(prop, loc) {
+ if (prop && !loc) return;
+ this._disallowedPop = this._normalizePosition(prop, loc);
+ }
+
+ _normalizePosition(prop, loc, targetObj, force) {
+ const pos = loc ? loc[prop] : null;
+
+ if (targetObj === undefined) {
+ targetObj = {
+ identifierName: null,
+ line: null,
+ column: null,
+ filename: null,
+ force: false
+ };
+ }
+
+ const origLine = targetObj.line;
+ const origColumn = targetObj.column;
+ const origFilename = targetObj.filename;
+ targetObj.identifierName = prop === "start" && (loc == null ? void 0 : loc.identifierName) || null;
+ targetObj.line = pos == null ? void 0 : pos.line;
+ targetObj.column = pos == null ? void 0 : pos.column;
+ targetObj.filename = loc == null ? void 0 : loc.filename;
+
+ if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {
+ targetObj.force = force;
+ }
+
+ return targetObj;
+ }
+
+ getCurrentColumn() {
+ const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
+
+ const lastIndex = extra.lastIndexOf("\n");
+ return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;
+ }
+
+ getCurrentLine() {
+ const extra = this._queue.reduce((acc, item) => item[0] + acc, "");
+
+ let count = 0;
+
+ for (let i = 0; i < extra.length; i++) {
+ if (extra[i] === "\n") count++;
+ }
+
+ return this._position.line + count;
+ }
+
+}
+
+exports.default = Buffer; \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/base.js b/node_modules/@babel/generator/lib/generators/base.js
new file mode 100644
index 0000000..be9285c
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/base.js
@@ -0,0 +1,96 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.BlockStatement = BlockStatement;
+exports.Directive = Directive;
+exports.DirectiveLiteral = DirectiveLiteral;
+exports.File = File;
+exports.InterpreterDirective = InterpreterDirective;
+exports.Placeholder = Placeholder;
+exports.Program = Program;
+
+function File(node) {
+ if (node.program) {
+ this.print(node.program.interpreter, node);
+ }
+
+ this.print(node.program, node);
+}
+
+function Program(node) {
+ this.printInnerComments(node, false);
+ this.printSequence(node.directives, node);
+ if (node.directives && node.directives.length) this.newline();
+ this.printSequence(node.body, node);
+}
+
+function BlockStatement(node) {
+ var _node$directives;
+
+ this.token("{");
+ this.printInnerComments(node);
+ const hasDirectives = (_node$directives = node.directives) == null ? void 0 : _node$directives.length;
+
+ if (node.body.length || hasDirectives) {
+ this.newline();
+ this.printSequence(node.directives, node, {
+ indent: true
+ });
+ if (hasDirectives) this.newline();
+ this.printSequence(node.body, node, {
+ indent: true
+ });
+ this.removeTrailingNewline();
+ this.source("end", node.loc);
+ if (!this.endsWith(10)) this.newline();
+ this.rightBrace();
+ } else {
+ this.source("end", node.loc);
+ this.token("}");
+ }
+}
+
+function Directive(node) {
+ this.print(node.value, node);
+ this.semicolon();
+}
+
+const unescapedSingleQuoteRE = /(?:^|[^\\])(?:\\\\)*'/;
+const unescapedDoubleQuoteRE = /(?:^|[^\\])(?:\\\\)*"/;
+
+function DirectiveLiteral(node) {
+ const raw = this.getPossibleRaw(node);
+
+ if (!this.format.minified && raw != null) {
+ this.token(raw);
+ return;
+ }
+
+ const {
+ value
+ } = node;
+
+ if (!unescapedDoubleQuoteRE.test(value)) {
+ this.token(`"${value}"`);
+ } else if (!unescapedSingleQuoteRE.test(value)) {
+ this.token(`'${value}'`);
+ } else {
+ throw new Error("Malformed AST: it is not possible to print a directive containing" + " both unescaped single and double quotes.");
+ }
+}
+
+function InterpreterDirective(node) {
+ this.token(`#!${node.value}\n`);
+}
+
+function Placeholder(node) {
+ this.token("%%");
+ this.print(node.name);
+ this.token("%%");
+
+ if (node.expectedNode === "Statement") {
+ this.semicolon();
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/classes.js b/node_modules/@babel/generator/lib/generators/classes.js
new file mode 100644
index 0000000..141dfda
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/classes.js
@@ -0,0 +1,213 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ClassAccessorProperty = ClassAccessorProperty;
+exports.ClassBody = ClassBody;
+exports.ClassExpression = exports.ClassDeclaration = ClassDeclaration;
+exports.ClassMethod = ClassMethod;
+exports.ClassPrivateMethod = ClassPrivateMethod;
+exports.ClassPrivateProperty = ClassPrivateProperty;
+exports.ClassProperty = ClassProperty;
+exports.StaticBlock = StaticBlock;
+exports._classMethodHead = _classMethodHead;
+
+var _t = require("@babel/types");
+
+const {
+ isExportDefaultDeclaration,
+ isExportNamedDeclaration
+} = _t;
+
+function ClassDeclaration(node, parent) {
+ if (!this.format.decoratorsBeforeExport || !isExportDefaultDeclaration(parent) && !isExportNamedDeclaration(parent)) {
+ this.printJoin(node.decorators, node);
+ }
+
+ if (node.declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ if (node.abstract) {
+ this.word("abstract");
+ this.space();
+ }
+
+ this.word("class");
+ this.printInnerComments(node);
+
+ if (node.id) {
+ this.space();
+ this.print(node.id, node);
+ }
+
+ this.print(node.typeParameters, node);
+
+ if (node.superClass) {
+ this.space();
+ this.word("extends");
+ this.space();
+ this.print(node.superClass, node);
+ this.print(node.superTypeParameters, node);
+ }
+
+ if (node.implements) {
+ this.space();
+ this.word("implements");
+ this.space();
+ this.printList(node.implements, node);
+ }
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function ClassBody(node) {
+ this.token("{");
+ this.printInnerComments(node);
+
+ if (node.body.length === 0) {
+ this.token("}");
+ } else {
+ this.newline();
+ this.indent();
+ this.printSequence(node.body, node);
+ this.dedent();
+ if (!this.endsWith(10)) this.newline();
+ this.rightBrace();
+ }
+}
+
+function ClassProperty(node) {
+ this.printJoin(node.decorators, node);
+ this.source("end", node.key.loc);
+ this.tsPrintClassMemberModifiers(node, true);
+
+ if (node.computed) {
+ this.token("[");
+ this.print(node.key, node);
+ this.token("]");
+ } else {
+ this._variance(node);
+
+ this.print(node.key, node);
+ }
+
+ if (node.optional) {
+ this.token("?");
+ }
+
+ if (node.definite) {
+ this.token("!");
+ }
+
+ this.print(node.typeAnnotation, node);
+
+ if (node.value) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.value, node);
+ }
+
+ this.semicolon();
+}
+
+function ClassAccessorProperty(node) {
+ this.printJoin(node.decorators, node);
+ this.source("end", node.key.loc);
+ this.tsPrintClassMemberModifiers(node, true);
+ this.word("accessor");
+ this.printInnerComments(node);
+ this.space();
+
+ if (node.computed) {
+ this.token("[");
+ this.print(node.key, node);
+ this.token("]");
+ } else {
+ this._variance(node);
+
+ this.print(node.key, node);
+ }
+
+ if (node.optional) {
+ this.token("?");
+ }
+
+ if (node.definite) {
+ this.token("!");
+ }
+
+ this.print(node.typeAnnotation, node);
+
+ if (node.value) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.value, node);
+ }
+
+ this.semicolon();
+}
+
+function ClassPrivateProperty(node) {
+ this.printJoin(node.decorators, node);
+
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ this.print(node.key, node);
+ this.print(node.typeAnnotation, node);
+
+ if (node.value) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.value, node);
+ }
+
+ this.semicolon();
+}
+
+function ClassMethod(node) {
+ this._classMethodHead(node);
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function ClassPrivateMethod(node) {
+ this._classMethodHead(node);
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function _classMethodHead(node) {
+ this.printJoin(node.decorators, node);
+ this.source("end", node.key.loc);
+ this.tsPrintClassMemberModifiers(node, false);
+
+ this._methodHead(node);
+}
+
+function StaticBlock(node) {
+ this.word("static");
+ this.space();
+ this.token("{");
+
+ if (node.body.length === 0) {
+ this.token("}");
+ } else {
+ this.newline();
+ this.printSequence(node.body, node, {
+ indent: true
+ });
+ this.rightBrace();
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/expressions.js b/node_modules/@babel/generator/lib/generators/expressions.js
new file mode 100644
index 0000000..aa65c5c
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/expressions.js
@@ -0,0 +1,318 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
+exports.AssignmentPattern = AssignmentPattern;
+exports.AwaitExpression = void 0;
+exports.BindExpression = BindExpression;
+exports.CallExpression = CallExpression;
+exports.ConditionalExpression = ConditionalExpression;
+exports.Decorator = Decorator;
+exports.DoExpression = DoExpression;
+exports.EmptyStatement = EmptyStatement;
+exports.ExpressionStatement = ExpressionStatement;
+exports.Import = Import;
+exports.MemberExpression = MemberExpression;
+exports.MetaProperty = MetaProperty;
+exports.ModuleExpression = ModuleExpression;
+exports.NewExpression = NewExpression;
+exports.OptionalCallExpression = OptionalCallExpression;
+exports.OptionalMemberExpression = OptionalMemberExpression;
+exports.ParenthesizedExpression = ParenthesizedExpression;
+exports.PrivateName = PrivateName;
+exports.SequenceExpression = SequenceExpression;
+exports.Super = Super;
+exports.ThisExpression = ThisExpression;
+exports.UnaryExpression = UnaryExpression;
+exports.UpdateExpression = UpdateExpression;
+exports.V8IntrinsicIdentifier = V8IntrinsicIdentifier;
+exports.YieldExpression = void 0;
+
+var _t = require("@babel/types");
+
+var n = require("../node");
+
+const {
+ isCallExpression,
+ isLiteral,
+ isMemberExpression,
+ isNewExpression
+} = _t;
+
+function UnaryExpression(node) {
+ if (node.operator === "void" || node.operator === "delete" || node.operator === "typeof" || node.operator === "throw") {
+ this.word(node.operator);
+ this.space();
+ } else {
+ this.token(node.operator);
+ }
+
+ this.print(node.argument, node);
+}
+
+function DoExpression(node) {
+ if (node.async) {
+ this.word("async");
+ this.space();
+ }
+
+ this.word("do");
+ this.space();
+ this.print(node.body, node);
+}
+
+function ParenthesizedExpression(node) {
+ this.token("(");
+ this.print(node.expression, node);
+ this.token(")");
+}
+
+function UpdateExpression(node) {
+ if (node.prefix) {
+ this.token(node.operator);
+ this.print(node.argument, node);
+ } else {
+ this.startTerminatorless(true);
+ this.print(node.argument, node);
+ this.endTerminatorless();
+ this.token(node.operator);
+ }
+}
+
+function ConditionalExpression(node) {
+ this.print(node.test, node);
+ this.space();
+ this.token("?");
+ this.space();
+ this.print(node.consequent, node);
+ this.space();
+ this.token(":");
+ this.space();
+ this.print(node.alternate, node);
+}
+
+function NewExpression(node, parent) {
+ this.word("new");
+ this.space();
+ this.print(node.callee, node);
+
+ if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression(parent, {
+ callee: node
+ }) && !isMemberExpression(parent) && !isNewExpression(parent)) {
+ return;
+ }
+
+ this.print(node.typeArguments, node);
+ this.print(node.typeParameters, node);
+
+ if (node.optional) {
+ this.token("?.");
+ }
+
+ this.token("(");
+ this.printList(node.arguments, node);
+ this.token(")");
+}
+
+function SequenceExpression(node) {
+ this.printList(node.expressions, node);
+}
+
+function ThisExpression() {
+ this.word("this");
+}
+
+function Super() {
+ this.word("super");
+}
+
+function Decorator(node) {
+ this.token("@");
+ this.print(node.expression, node);
+ this.newline();
+}
+
+function OptionalMemberExpression(node) {
+ this.print(node.object, node);
+
+ if (!node.computed && isMemberExpression(node.property)) {
+ throw new TypeError("Got a MemberExpression for MemberExpression property");
+ }
+
+ let computed = node.computed;
+
+ if (isLiteral(node.property) && typeof node.property.value === "number") {
+ computed = true;
+ }
+
+ if (node.optional) {
+ this.token("?.");
+ }
+
+ if (computed) {
+ this.token("[");
+ this.print(node.property, node);
+ this.token("]");
+ } else {
+ if (!node.optional) {
+ this.token(".");
+ }
+
+ this.print(node.property, node);
+ }
+}
+
+function OptionalCallExpression(node) {
+ this.print(node.callee, node);
+ this.print(node.typeArguments, node);
+ this.print(node.typeParameters, node);
+
+ if (node.optional) {
+ this.token("?.");
+ }
+
+ this.token("(");
+ this.printList(node.arguments, node);
+ this.token(")");
+}
+
+function CallExpression(node) {
+ this.print(node.callee, node);
+ this.print(node.typeArguments, node);
+ this.print(node.typeParameters, node);
+ this.token("(");
+ this.printList(node.arguments, node);
+ this.token(")");
+}
+
+function Import() {
+ this.word("import");
+}
+
+function buildYieldAwait(keyword) {
+ return function (node) {
+ this.word(keyword);
+
+ if (node.delegate) {
+ this.token("*");
+ }
+
+ if (node.argument) {
+ this.space();
+ const terminatorState = this.startTerminatorless();
+ this.print(node.argument, node);
+ this.endTerminatorless(terminatorState);
+ }
+ };
+}
+
+const YieldExpression = buildYieldAwait("yield");
+exports.YieldExpression = YieldExpression;
+const AwaitExpression = buildYieldAwait("await");
+exports.AwaitExpression = AwaitExpression;
+
+function EmptyStatement() {
+ this.semicolon(true);
+}
+
+function ExpressionStatement(node) {
+ this.print(node.expression, node);
+ this.semicolon();
+}
+
+function AssignmentPattern(node) {
+ this.print(node.left, node);
+ if (node.left.optional) this.token("?");
+ this.print(node.left.typeAnnotation, node);
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.right, node);
+}
+
+function AssignmentExpression(node, parent) {
+ const parens = this.inForStatementInitCounter && node.operator === "in" && !n.needsParens(node, parent);
+
+ if (parens) {
+ this.token("(");
+ }
+
+ this.print(node.left, node);
+ this.space();
+
+ if (node.operator === "in" || node.operator === "instanceof") {
+ this.word(node.operator);
+ } else {
+ this.token(node.operator);
+ }
+
+ this.space();
+ this.print(node.right, node);
+
+ if (parens) {
+ this.token(")");
+ }
+}
+
+function BindExpression(node) {
+ this.print(node.object, node);
+ this.token("::");
+ this.print(node.callee, node);
+}
+
+function MemberExpression(node) {
+ this.print(node.object, node);
+
+ if (!node.computed && isMemberExpression(node.property)) {
+ throw new TypeError("Got a MemberExpression for MemberExpression property");
+ }
+
+ let computed = node.computed;
+
+ if (isLiteral(node.property) && typeof node.property.value === "number") {
+ computed = true;
+ }
+
+ if (computed) {
+ this.token("[");
+ this.print(node.property, node);
+ this.token("]");
+ } else {
+ this.token(".");
+ this.print(node.property, node);
+ }
+}
+
+function MetaProperty(node) {
+ this.print(node.meta, node);
+ this.token(".");
+ this.print(node.property, node);
+}
+
+function PrivateName(node) {
+ this.token("#");
+ this.print(node.id, node);
+}
+
+function V8IntrinsicIdentifier(node) {
+ this.token("%");
+ this.word(node.name);
+}
+
+function ModuleExpression(node) {
+ this.word("module");
+ this.space();
+ this.token("{");
+
+ if (node.body.body.length === 0) {
+ this.token("}");
+ } else {
+ this.newline();
+ this.printSequence(node.body.body, node, {
+ indent: true
+ });
+ this.rightBrace();
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/flow.js b/node_modules/@babel/generator/lib/generators/flow.js
new file mode 100644
index 0000000..7c0bc7d
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/flow.js
@@ -0,0 +1,795 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.AnyTypeAnnotation = AnyTypeAnnotation;
+exports.ArrayTypeAnnotation = ArrayTypeAnnotation;
+exports.BooleanLiteralTypeAnnotation = BooleanLiteralTypeAnnotation;
+exports.BooleanTypeAnnotation = BooleanTypeAnnotation;
+exports.DeclareClass = DeclareClass;
+exports.DeclareExportAllDeclaration = DeclareExportAllDeclaration;
+exports.DeclareExportDeclaration = DeclareExportDeclaration;
+exports.DeclareFunction = DeclareFunction;
+exports.DeclareInterface = DeclareInterface;
+exports.DeclareModule = DeclareModule;
+exports.DeclareModuleExports = DeclareModuleExports;
+exports.DeclareOpaqueType = DeclareOpaqueType;
+exports.DeclareTypeAlias = DeclareTypeAlias;
+exports.DeclareVariable = DeclareVariable;
+exports.DeclaredPredicate = DeclaredPredicate;
+exports.EmptyTypeAnnotation = EmptyTypeAnnotation;
+exports.EnumBooleanBody = EnumBooleanBody;
+exports.EnumBooleanMember = EnumBooleanMember;
+exports.EnumDeclaration = EnumDeclaration;
+exports.EnumDefaultedMember = EnumDefaultedMember;
+exports.EnumNumberBody = EnumNumberBody;
+exports.EnumNumberMember = EnumNumberMember;
+exports.EnumStringBody = EnumStringBody;
+exports.EnumStringMember = EnumStringMember;
+exports.EnumSymbolBody = EnumSymbolBody;
+exports.ExistsTypeAnnotation = ExistsTypeAnnotation;
+exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
+exports.FunctionTypeParam = FunctionTypeParam;
+exports.IndexedAccessType = IndexedAccessType;
+exports.InferredPredicate = InferredPredicate;
+exports.InterfaceDeclaration = InterfaceDeclaration;
+exports.GenericTypeAnnotation = exports.ClassImplements = exports.InterfaceExtends = InterfaceExtends;
+exports.InterfaceTypeAnnotation = InterfaceTypeAnnotation;
+exports.IntersectionTypeAnnotation = IntersectionTypeAnnotation;
+exports.MixedTypeAnnotation = MixedTypeAnnotation;
+exports.NullLiteralTypeAnnotation = NullLiteralTypeAnnotation;
+exports.NullableTypeAnnotation = NullableTypeAnnotation;
+Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _types2.NumericLiteral;
+ }
+});
+exports.NumberTypeAnnotation = NumberTypeAnnotation;
+exports.ObjectTypeAnnotation = ObjectTypeAnnotation;
+exports.ObjectTypeCallProperty = ObjectTypeCallProperty;
+exports.ObjectTypeIndexer = ObjectTypeIndexer;
+exports.ObjectTypeInternalSlot = ObjectTypeInternalSlot;
+exports.ObjectTypeProperty = ObjectTypeProperty;
+exports.ObjectTypeSpreadProperty = ObjectTypeSpreadProperty;
+exports.OpaqueType = OpaqueType;
+exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
+exports.QualifiedTypeIdentifier = QualifiedTypeIdentifier;
+Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _types2.StringLiteral;
+ }
+});
+exports.StringTypeAnnotation = StringTypeAnnotation;
+exports.SymbolTypeAnnotation = SymbolTypeAnnotation;
+exports.ThisTypeAnnotation = ThisTypeAnnotation;
+exports.TupleTypeAnnotation = TupleTypeAnnotation;
+exports.TypeAlias = TypeAlias;
+exports.TypeAnnotation = TypeAnnotation;
+exports.TypeCastExpression = TypeCastExpression;
+exports.TypeParameter = TypeParameter;
+exports.TypeParameterDeclaration = exports.TypeParameterInstantiation = TypeParameterInstantiation;
+exports.TypeofTypeAnnotation = TypeofTypeAnnotation;
+exports.UnionTypeAnnotation = UnionTypeAnnotation;
+exports.Variance = Variance;
+exports.VoidTypeAnnotation = VoidTypeAnnotation;
+exports._interfaceish = _interfaceish;
+exports._variance = _variance;
+
+var _t = require("@babel/types");
+
+var _modules = require("./modules");
+
+var _types2 = require("./types");
+
+const {
+ isDeclareExportDeclaration,
+ isStatement
+} = _t;
+
+function AnyTypeAnnotation() {
+ this.word("any");
+}
+
+function ArrayTypeAnnotation(node) {
+ this.print(node.elementType, node);
+ this.token("[");
+ this.token("]");
+}
+
+function BooleanTypeAnnotation() {
+ this.word("boolean");
+}
+
+function BooleanLiteralTypeAnnotation(node) {
+ this.word(node.value ? "true" : "false");
+}
+
+function NullLiteralTypeAnnotation() {
+ this.word("null");
+}
+
+function DeclareClass(node, parent) {
+ if (!isDeclareExportDeclaration(parent)) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word("class");
+ this.space();
+
+ this._interfaceish(node);
+}
+
+function DeclareFunction(node, parent) {
+ if (!isDeclareExportDeclaration(parent)) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word("function");
+ this.space();
+ this.print(node.id, node);
+ this.print(node.id.typeAnnotation.typeAnnotation, node);
+
+ if (node.predicate) {
+ this.space();
+ this.print(node.predicate, node);
+ }
+
+ this.semicolon();
+}
+
+function InferredPredicate() {
+ this.token("%");
+ this.word("checks");
+}
+
+function DeclaredPredicate(node) {
+ this.token("%");
+ this.word("checks");
+ this.token("(");
+ this.print(node.value, node);
+ this.token(")");
+}
+
+function DeclareInterface(node) {
+ this.word("declare");
+ this.space();
+ this.InterfaceDeclaration(node);
+}
+
+function DeclareModule(node) {
+ this.word("declare");
+ this.space();
+ this.word("module");
+ this.space();
+ this.print(node.id, node);
+ this.space();
+ this.print(node.body, node);
+}
+
+function DeclareModuleExports(node) {
+ this.word("declare");
+ this.space();
+ this.word("module");
+ this.token(".");
+ this.word("exports");
+ this.print(node.typeAnnotation, node);
+}
+
+function DeclareTypeAlias(node) {
+ this.word("declare");
+ this.space();
+ this.TypeAlias(node);
+}
+
+function DeclareOpaqueType(node, parent) {
+ if (!isDeclareExportDeclaration(parent)) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.OpaqueType(node);
+}
+
+function DeclareVariable(node, parent) {
+ if (!isDeclareExportDeclaration(parent)) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word("var");
+ this.space();
+ this.print(node.id, node);
+ this.print(node.id.typeAnnotation, node);
+ this.semicolon();
+}
+
+function DeclareExportDeclaration(node) {
+ this.word("declare");
+ this.space();
+ this.word("export");
+ this.space();
+
+ if (node.default) {
+ this.word("default");
+ this.space();
+ }
+
+ FlowExportDeclaration.apply(this, arguments);
+}
+
+function DeclareExportAllDeclaration() {
+ this.word("declare");
+ this.space();
+
+ _modules.ExportAllDeclaration.apply(this, arguments);
+}
+
+function EnumDeclaration(node) {
+ const {
+ id,
+ body
+ } = node;
+ this.word("enum");
+ this.space();
+ this.print(id, node);
+ this.print(body, node);
+}
+
+function enumExplicitType(context, name, hasExplicitType) {
+ if (hasExplicitType) {
+ context.space();
+ context.word("of");
+ context.space();
+ context.word(name);
+ }
+
+ context.space();
+}
+
+function enumBody(context, node) {
+ const {
+ members
+ } = node;
+ context.token("{");
+ context.indent();
+ context.newline();
+
+ for (const member of members) {
+ context.print(member, node);
+ context.newline();
+ }
+
+ if (node.hasUnknownMembers) {
+ context.token("...");
+ context.newline();
+ }
+
+ context.dedent();
+ context.token("}");
+}
+
+function EnumBooleanBody(node) {
+ const {
+ explicitType
+ } = node;
+ enumExplicitType(this, "boolean", explicitType);
+ enumBody(this, node);
+}
+
+function EnumNumberBody(node) {
+ const {
+ explicitType
+ } = node;
+ enumExplicitType(this, "number", explicitType);
+ enumBody(this, node);
+}
+
+function EnumStringBody(node) {
+ const {
+ explicitType
+ } = node;
+ enumExplicitType(this, "string", explicitType);
+ enumBody(this, node);
+}
+
+function EnumSymbolBody(node) {
+ enumExplicitType(this, "symbol", true);
+ enumBody(this, node);
+}
+
+function EnumDefaultedMember(node) {
+ const {
+ id
+ } = node;
+ this.print(id, node);
+ this.token(",");
+}
+
+function enumInitializedMember(context, node) {
+ const {
+ id,
+ init
+ } = node;
+ context.print(id, node);
+ context.space();
+ context.token("=");
+ context.space();
+ context.print(init, node);
+ context.token(",");
+}
+
+function EnumBooleanMember(node) {
+ enumInitializedMember(this, node);
+}
+
+function EnumNumberMember(node) {
+ enumInitializedMember(this, node);
+}
+
+function EnumStringMember(node) {
+ enumInitializedMember(this, node);
+}
+
+function FlowExportDeclaration(node) {
+ if (node.declaration) {
+ const declar = node.declaration;
+ this.print(declar, node);
+ if (!isStatement(declar)) this.semicolon();
+ } else {
+ this.token("{");
+
+ if (node.specifiers.length) {
+ this.space();
+ this.printList(node.specifiers, node);
+ this.space();
+ }
+
+ this.token("}");
+
+ if (node.source) {
+ this.space();
+ this.word("from");
+ this.space();
+ this.print(node.source, node);
+ }
+
+ this.semicolon();
+ }
+}
+
+function ExistsTypeAnnotation() {
+ this.token("*");
+}
+
+function FunctionTypeAnnotation(node, parent) {
+ this.print(node.typeParameters, node);
+ this.token("(");
+
+ if (node.this) {
+ this.word("this");
+ this.token(":");
+ this.space();
+ this.print(node.this.typeAnnotation, node);
+
+ if (node.params.length || node.rest) {
+ this.token(",");
+ this.space();
+ }
+ }
+
+ this.printList(node.params, node);
+
+ if (node.rest) {
+ if (node.params.length) {
+ this.token(",");
+ this.space();
+ }
+
+ this.token("...");
+ this.print(node.rest, node);
+ }
+
+ this.token(")");
+
+ if (parent && (parent.type === "ObjectTypeCallProperty" || parent.type === "DeclareFunction" || parent.type === "ObjectTypeProperty" && parent.method)) {
+ this.token(":");
+ } else {
+ this.space();
+ this.token("=>");
+ }
+
+ this.space();
+ this.print(node.returnType, node);
+}
+
+function FunctionTypeParam(node) {
+ this.print(node.name, node);
+ if (node.optional) this.token("?");
+
+ if (node.name) {
+ this.token(":");
+ this.space();
+ }
+
+ this.print(node.typeAnnotation, node);
+}
+
+function InterfaceExtends(node) {
+ this.print(node.id, node);
+ this.print(node.typeParameters, node);
+}
+
+function _interfaceish(node) {
+ var _node$extends;
+
+ this.print(node.id, node);
+ this.print(node.typeParameters, node);
+
+ if ((_node$extends = node.extends) != null && _node$extends.length) {
+ this.space();
+ this.word("extends");
+ this.space();
+ this.printList(node.extends, node);
+ }
+
+ if (node.mixins && node.mixins.length) {
+ this.space();
+ this.word("mixins");
+ this.space();
+ this.printList(node.mixins, node);
+ }
+
+ if (node.implements && node.implements.length) {
+ this.space();
+ this.word("implements");
+ this.space();
+ this.printList(node.implements, node);
+ }
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function _variance(node) {
+ if (node.variance) {
+ if (node.variance.kind === "plus") {
+ this.token("+");
+ } else if (node.variance.kind === "minus") {
+ this.token("-");
+ }
+ }
+}
+
+function InterfaceDeclaration(node) {
+ this.word("interface");
+ this.space();
+
+ this._interfaceish(node);
+}
+
+function andSeparator() {
+ this.space();
+ this.token("&");
+ this.space();
+}
+
+function InterfaceTypeAnnotation(node) {
+ this.word("interface");
+
+ if (node.extends && node.extends.length) {
+ this.space();
+ this.word("extends");
+ this.space();
+ this.printList(node.extends, node);
+ }
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function IntersectionTypeAnnotation(node) {
+ this.printJoin(node.types, node, {
+ separator: andSeparator
+ });
+}
+
+function MixedTypeAnnotation() {
+ this.word("mixed");
+}
+
+function EmptyTypeAnnotation() {
+ this.word("empty");
+}
+
+function NullableTypeAnnotation(node) {
+ this.token("?");
+ this.print(node.typeAnnotation, node);
+}
+
+function NumberTypeAnnotation() {
+ this.word("number");
+}
+
+function StringTypeAnnotation() {
+ this.word("string");
+}
+
+function ThisTypeAnnotation() {
+ this.word("this");
+}
+
+function TupleTypeAnnotation(node) {
+ this.token("[");
+ this.printList(node.types, node);
+ this.token("]");
+}
+
+function TypeofTypeAnnotation(node) {
+ this.word("typeof");
+ this.space();
+ this.print(node.argument, node);
+}
+
+function TypeAlias(node) {
+ this.word("type");
+ this.space();
+ this.print(node.id, node);
+ this.print(node.typeParameters, node);
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.right, node);
+ this.semicolon();
+}
+
+function TypeAnnotation(node) {
+ this.token(":");
+ this.space();
+ if (node.optional) this.token("?");
+ this.print(node.typeAnnotation, node);
+}
+
+function TypeParameterInstantiation(node) {
+ this.token("<");
+ this.printList(node.params, node, {});
+ this.token(">");
+}
+
+function TypeParameter(node) {
+ this._variance(node);
+
+ this.word(node.name);
+
+ if (node.bound) {
+ this.print(node.bound, node);
+ }
+
+ if (node.default) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.default, node);
+ }
+}
+
+function OpaqueType(node) {
+ this.word("opaque");
+ this.space();
+ this.word("type");
+ this.space();
+ this.print(node.id, node);
+ this.print(node.typeParameters, node);
+
+ if (node.supertype) {
+ this.token(":");
+ this.space();
+ this.print(node.supertype, node);
+ }
+
+ if (node.impltype) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.impltype, node);
+ }
+
+ this.semicolon();
+}
+
+function ObjectTypeAnnotation(node) {
+ if (node.exact) {
+ this.token("{|");
+ } else {
+ this.token("{");
+ }
+
+ const props = [...node.properties, ...(node.callProperties || []), ...(node.indexers || []), ...(node.internalSlots || [])];
+
+ if (props.length) {
+ this.space();
+ this.printJoin(props, node, {
+ addNewlines(leading) {
+ if (leading && !props[0]) return 1;
+ },
+
+ indent: true,
+ statement: true,
+ iterator: () => {
+ if (props.length !== 1 || node.inexact) {
+ this.token(",");
+ this.space();
+ }
+ }
+ });
+ this.space();
+ }
+
+ if (node.inexact) {
+ this.indent();
+ this.token("...");
+
+ if (props.length) {
+ this.newline();
+ }
+
+ this.dedent();
+ }
+
+ if (node.exact) {
+ this.token("|}");
+ } else {
+ this.token("}");
+ }
+}
+
+function ObjectTypeInternalSlot(node) {
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ this.token("[");
+ this.token("[");
+ this.print(node.id, node);
+ this.token("]");
+ this.token("]");
+ if (node.optional) this.token("?");
+
+ if (!node.method) {
+ this.token(":");
+ this.space();
+ }
+
+ this.print(node.value, node);
+}
+
+function ObjectTypeCallProperty(node) {
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ this.print(node.value, node);
+}
+
+function ObjectTypeIndexer(node) {
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ this._variance(node);
+
+ this.token("[");
+
+ if (node.id) {
+ this.print(node.id, node);
+ this.token(":");
+ this.space();
+ }
+
+ this.print(node.key, node);
+ this.token("]");
+ this.token(":");
+ this.space();
+ this.print(node.value, node);
+}
+
+function ObjectTypeProperty(node) {
+ if (node.proto) {
+ this.word("proto");
+ this.space();
+ }
+
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ if (node.kind === "get" || node.kind === "set") {
+ this.word(node.kind);
+ this.space();
+ }
+
+ this._variance(node);
+
+ this.print(node.key, node);
+ if (node.optional) this.token("?");
+
+ if (!node.method) {
+ this.token(":");
+ this.space();
+ }
+
+ this.print(node.value, node);
+}
+
+function ObjectTypeSpreadProperty(node) {
+ this.token("...");
+ this.print(node.argument, node);
+}
+
+function QualifiedTypeIdentifier(node) {
+ this.print(node.qualification, node);
+ this.token(".");
+ this.print(node.id, node);
+}
+
+function SymbolTypeAnnotation() {
+ this.word("symbol");
+}
+
+function orSeparator() {
+ this.space();
+ this.token("|");
+ this.space();
+}
+
+function UnionTypeAnnotation(node) {
+ this.printJoin(node.types, node, {
+ separator: orSeparator
+ });
+}
+
+function TypeCastExpression(node) {
+ this.token("(");
+ this.print(node.expression, node);
+ this.print(node.typeAnnotation, node);
+ this.token(")");
+}
+
+function Variance(node) {
+ if (node.kind === "plus") {
+ this.token("+");
+ } else {
+ this.token("-");
+ }
+}
+
+function VoidTypeAnnotation() {
+ this.word("void");
+}
+
+function IndexedAccessType(node) {
+ this.print(node.objectType, node);
+ this.token("[");
+ this.print(node.indexType, node);
+ this.token("]");
+}
+
+function OptionalIndexedAccessType(node) {
+ this.print(node.objectType, node);
+
+ if (node.optional) {
+ this.token("?.");
+ }
+
+ this.token("[");
+ this.print(node.indexType, node);
+ this.token("]");
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/index.js b/node_modules/@babel/generator/lib/generators/index.js
new file mode 100644
index 0000000..8820db0
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/index.js
@@ -0,0 +1,148 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+
+var _templateLiterals = require("./template-literals");
+
+Object.keys(_templateLiterals).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _templateLiterals[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _templateLiterals[key];
+ }
+ });
+});
+
+var _expressions = require("./expressions");
+
+Object.keys(_expressions).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _expressions[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _expressions[key];
+ }
+ });
+});
+
+var _statements = require("./statements");
+
+Object.keys(_statements).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _statements[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _statements[key];
+ }
+ });
+});
+
+var _classes = require("./classes");
+
+Object.keys(_classes).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _classes[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _classes[key];
+ }
+ });
+});
+
+var _methods = require("./methods");
+
+Object.keys(_methods).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _methods[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _methods[key];
+ }
+ });
+});
+
+var _modules = require("./modules");
+
+Object.keys(_modules).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _modules[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _modules[key];
+ }
+ });
+});
+
+var _types = require("./types");
+
+Object.keys(_types).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _types[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _types[key];
+ }
+ });
+});
+
+var _flow = require("./flow");
+
+Object.keys(_flow).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _flow[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _flow[key];
+ }
+ });
+});
+
+var _base = require("./base");
+
+Object.keys(_base).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _base[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _base[key];
+ }
+ });
+});
+
+var _jsx = require("./jsx");
+
+Object.keys(_jsx).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _jsx[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _jsx[key];
+ }
+ });
+});
+
+var _typescript = require("./typescript");
+
+Object.keys(_typescript).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (key in exports && exports[key] === _typescript[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _typescript[key];
+ }
+ });
+}); \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/jsx.js b/node_modules/@babel/generator/lib/generators/jsx.js
new file mode 100644
index 0000000..3c11f59
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/jsx.js
@@ -0,0 +1,145 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.JSXAttribute = JSXAttribute;
+exports.JSXClosingElement = JSXClosingElement;
+exports.JSXClosingFragment = JSXClosingFragment;
+exports.JSXElement = JSXElement;
+exports.JSXEmptyExpression = JSXEmptyExpression;
+exports.JSXExpressionContainer = JSXExpressionContainer;
+exports.JSXFragment = JSXFragment;
+exports.JSXIdentifier = JSXIdentifier;
+exports.JSXMemberExpression = JSXMemberExpression;
+exports.JSXNamespacedName = JSXNamespacedName;
+exports.JSXOpeningElement = JSXOpeningElement;
+exports.JSXOpeningFragment = JSXOpeningFragment;
+exports.JSXSpreadAttribute = JSXSpreadAttribute;
+exports.JSXSpreadChild = JSXSpreadChild;
+exports.JSXText = JSXText;
+
+function JSXAttribute(node) {
+ this.print(node.name, node);
+
+ if (node.value) {
+ this.token("=");
+ this.print(node.value, node);
+ }
+}
+
+function JSXIdentifier(node) {
+ this.word(node.name);
+}
+
+function JSXNamespacedName(node) {
+ this.print(node.namespace, node);
+ this.token(":");
+ this.print(node.name, node);
+}
+
+function JSXMemberExpression(node) {
+ this.print(node.object, node);
+ this.token(".");
+ this.print(node.property, node);
+}
+
+function JSXSpreadAttribute(node) {
+ this.token("{");
+ this.token("...");
+ this.print(node.argument, node);
+ this.token("}");
+}
+
+function JSXExpressionContainer(node) {
+ this.token("{");
+ this.print(node.expression, node);
+ this.token("}");
+}
+
+function JSXSpreadChild(node) {
+ this.token("{");
+ this.token("...");
+ this.print(node.expression, node);
+ this.token("}");
+}
+
+function JSXText(node) {
+ const raw = this.getPossibleRaw(node);
+
+ if (raw != null) {
+ this.token(raw);
+ } else {
+ this.token(node.value);
+ }
+}
+
+function JSXElement(node) {
+ const open = node.openingElement;
+ this.print(open, node);
+ if (open.selfClosing) return;
+ this.indent();
+
+ for (const child of node.children) {
+ this.print(child, node);
+ }
+
+ this.dedent();
+ this.print(node.closingElement, node);
+}
+
+function spaceSeparator() {
+ this.space();
+}
+
+function JSXOpeningElement(node) {
+ this.token("<");
+ this.print(node.name, node);
+ this.print(node.typeParameters, node);
+
+ if (node.attributes.length > 0) {
+ this.space();
+ this.printJoin(node.attributes, node, {
+ separator: spaceSeparator
+ });
+ }
+
+ if (node.selfClosing) {
+ this.space();
+ this.token("/>");
+ } else {
+ this.token(">");
+ }
+}
+
+function JSXClosingElement(node) {
+ this.token("</");
+ this.print(node.name, node);
+ this.token(">");
+}
+
+function JSXEmptyExpression(node) {
+ this.printInnerComments(node);
+}
+
+function JSXFragment(node) {
+ this.print(node.openingFragment, node);
+ this.indent();
+
+ for (const child of node.children) {
+ this.print(child, node);
+ }
+
+ this.dedent();
+ this.print(node.closingFragment, node);
+}
+
+function JSXOpeningFragment() {
+ this.token("<");
+ this.token(">");
+}
+
+function JSXClosingFragment() {
+ this.token("</");
+ this.token(">");
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/methods.js b/node_modules/@babel/generator/lib/generators/methods.js
new file mode 100644
index 0000000..d31e7fa
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/methods.js
@@ -0,0 +1,150 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ArrowFunctionExpression = ArrowFunctionExpression;
+exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
+exports._functionHead = _functionHead;
+exports._methodHead = _methodHead;
+exports._param = _param;
+exports._parameters = _parameters;
+exports._params = _params;
+exports._predicate = _predicate;
+
+var _t = require("@babel/types");
+
+const {
+ isIdentifier
+} = _t;
+
+function _params(node) {
+ this.print(node.typeParameters, node);
+ this.token("(");
+
+ this._parameters(node.params, node);
+
+ this.token(")");
+ this.print(node.returnType, node);
+}
+
+function _parameters(parameters, parent) {
+ for (let i = 0; i < parameters.length; i++) {
+ this._param(parameters[i], parent);
+
+ if (i < parameters.length - 1) {
+ this.token(",");
+ this.space();
+ }
+ }
+}
+
+function _param(parameter, parent) {
+ this.printJoin(parameter.decorators, parameter);
+ this.print(parameter, parent);
+ if (parameter.optional) this.token("?");
+ this.print(parameter.typeAnnotation, parameter);
+}
+
+function _methodHead(node) {
+ const kind = node.kind;
+ const key = node.key;
+
+ if (kind === "get" || kind === "set") {
+ this.word(kind);
+ this.space();
+ }
+
+ if (node.async) {
+ this._catchUp("start", key.loc);
+
+ this.word("async");
+ this.space();
+ }
+
+ if (kind === "method" || kind === "init") {
+ if (node.generator) {
+ this.token("*");
+ }
+ }
+
+ if (node.computed) {
+ this.token("[");
+ this.print(key, node);
+ this.token("]");
+ } else {
+ this.print(key, node);
+ }
+
+ if (node.optional) {
+ this.token("?");
+ }
+
+ this._params(node);
+}
+
+function _predicate(node) {
+ if (node.predicate) {
+ if (!node.returnType) {
+ this.token(":");
+ }
+
+ this.space();
+ this.print(node.predicate, node);
+ }
+}
+
+function _functionHead(node) {
+ if (node.async) {
+ this.word("async");
+ this.space();
+ }
+
+ this.word("function");
+ if (node.generator) this.token("*");
+ this.printInnerComments(node);
+ this.space();
+
+ if (node.id) {
+ this.print(node.id, node);
+ }
+
+ this._params(node);
+
+ this._predicate(node);
+}
+
+function FunctionExpression(node) {
+ this._functionHead(node);
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function ArrowFunctionExpression(node) {
+ if (node.async) {
+ this.word("async");
+ this.space();
+ }
+
+ const firstParam = node.params[0];
+
+ if (!this.format.retainLines && !this.format.auxiliaryCommentBefore && !this.format.auxiliaryCommentAfter && node.params.length === 1 && isIdentifier(firstParam) && !hasTypesOrComments(node, firstParam)) {
+ this.print(firstParam, node);
+ } else {
+ this._params(node);
+ }
+
+ this._predicate(node);
+
+ this.space();
+ this.token("=>");
+ this.space();
+ this.print(node.body, node);
+}
+
+function hasTypesOrComments(node, param) {
+ var _param$leadingComment, _param$trailingCommen;
+
+ return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length);
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/modules.js b/node_modules/@babel/generator/lib/generators/modules.js
new file mode 100644
index 0000000..7a3cc26
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/modules.js
@@ -0,0 +1,239 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ExportAllDeclaration = ExportAllDeclaration;
+exports.ExportDefaultDeclaration = ExportDefaultDeclaration;
+exports.ExportDefaultSpecifier = ExportDefaultSpecifier;
+exports.ExportNamedDeclaration = ExportNamedDeclaration;
+exports.ExportNamespaceSpecifier = ExportNamespaceSpecifier;
+exports.ExportSpecifier = ExportSpecifier;
+exports.ImportAttribute = ImportAttribute;
+exports.ImportDeclaration = ImportDeclaration;
+exports.ImportDefaultSpecifier = ImportDefaultSpecifier;
+exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier;
+exports.ImportSpecifier = ImportSpecifier;
+
+var _t = require("@babel/types");
+
+const {
+ isClassDeclaration,
+ isExportDefaultSpecifier,
+ isExportNamespaceSpecifier,
+ isImportDefaultSpecifier,
+ isImportNamespaceSpecifier,
+ isStatement
+} = _t;
+
+function ImportSpecifier(node) {
+ if (node.importKind === "type" || node.importKind === "typeof") {
+ this.word(node.importKind);
+ this.space();
+ }
+
+ this.print(node.imported, node);
+
+ if (node.local && node.local.name !== node.imported.name) {
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(node.local, node);
+ }
+}
+
+function ImportDefaultSpecifier(node) {
+ this.print(node.local, node);
+}
+
+function ExportDefaultSpecifier(node) {
+ this.print(node.exported, node);
+}
+
+function ExportSpecifier(node) {
+ if (node.exportKind === "type") {
+ this.word("type");
+ this.space();
+ }
+
+ this.print(node.local, node);
+
+ if (node.exported && node.local.name !== node.exported.name) {
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(node.exported, node);
+ }
+}
+
+function ExportNamespaceSpecifier(node) {
+ this.token("*");
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(node.exported, node);
+}
+
+function ExportAllDeclaration(node) {
+ this.word("export");
+ this.space();
+
+ if (node.exportKind === "type") {
+ this.word("type");
+ this.space();
+ }
+
+ this.token("*");
+ this.space();
+ this.word("from");
+ this.space();
+ this.print(node.source, node);
+ this.printAssertions(node);
+ this.semicolon();
+}
+
+function ExportNamedDeclaration(node) {
+ if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) {
+ this.printJoin(node.declaration.decorators, node);
+ }
+
+ this.word("export");
+ this.space();
+ ExportDeclaration.apply(this, arguments);
+}
+
+function ExportDefaultDeclaration(node) {
+ if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) {
+ this.printJoin(node.declaration.decorators, node);
+ }
+
+ this.word("export");
+ this.space();
+ this.word("default");
+ this.space();
+ ExportDeclaration.apply(this, arguments);
+}
+
+function ExportDeclaration(node) {
+ if (node.declaration) {
+ const declar = node.declaration;
+ this.print(declar, node);
+ if (!isStatement(declar)) this.semicolon();
+ } else {
+ if (node.exportKind === "type") {
+ this.word("type");
+ this.space();
+ }
+
+ const specifiers = node.specifiers.slice(0);
+ let hasSpecial = false;
+
+ for (;;) {
+ const first = specifiers[0];
+
+ if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) {
+ hasSpecial = true;
+ this.print(specifiers.shift(), node);
+
+ if (specifiers.length) {
+ this.token(",");
+ this.space();
+ }
+ } else {
+ break;
+ }
+ }
+
+ if (specifiers.length || !specifiers.length && !hasSpecial) {
+ this.token("{");
+
+ if (specifiers.length) {
+ this.space();
+ this.printList(specifiers, node);
+ this.space();
+ }
+
+ this.token("}");
+ }
+
+ if (node.source) {
+ this.space();
+ this.word("from");
+ this.space();
+ this.print(node.source, node);
+ this.printAssertions(node);
+ }
+
+ this.semicolon();
+ }
+}
+
+function ImportDeclaration(node) {
+ this.word("import");
+ this.space();
+
+ if (node.importKind === "type" || node.importKind === "typeof") {
+ this.word(node.importKind);
+ this.space();
+ }
+
+ const specifiers = node.specifiers.slice(0);
+
+ if (specifiers != null && specifiers.length) {
+ for (;;) {
+ const first = specifiers[0];
+
+ if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {
+ this.print(specifiers.shift(), node);
+
+ if (specifiers.length) {
+ this.token(",");
+ this.space();
+ }
+ } else {
+ break;
+ }
+ }
+
+ if (specifiers.length) {
+ this.token("{");
+ this.space();
+ this.printList(specifiers, node);
+ this.space();
+ this.token("}");
+ }
+
+ this.space();
+ this.word("from");
+ this.space();
+ }
+
+ this.print(node.source, node);
+ this.printAssertions(node);
+ {
+ var _node$attributes;
+
+ if ((_node$attributes = node.attributes) != null && _node$attributes.length) {
+ this.space();
+ this.word("with");
+ this.space();
+ this.printList(node.attributes, node);
+ }
+ }
+ this.semicolon();
+}
+
+function ImportAttribute(node) {
+ this.print(node.key);
+ this.token(":");
+ this.space();
+ this.print(node.value);
+}
+
+function ImportNamespaceSpecifier(node) {
+ this.token("*");
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(node.local, node);
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/statements.js b/node_modules/@babel/generator/lib/generators/statements.js
new file mode 100644
index 0000000..8b7b8fd
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/statements.js
@@ -0,0 +1,331 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.BreakStatement = void 0;
+exports.CatchClause = CatchClause;
+exports.ContinueStatement = void 0;
+exports.DebuggerStatement = DebuggerStatement;
+exports.DoWhileStatement = DoWhileStatement;
+exports.ForOfStatement = exports.ForInStatement = void 0;
+exports.ForStatement = ForStatement;
+exports.IfStatement = IfStatement;
+exports.LabeledStatement = LabeledStatement;
+exports.ReturnStatement = void 0;
+exports.SwitchCase = SwitchCase;
+exports.SwitchStatement = SwitchStatement;
+exports.ThrowStatement = void 0;
+exports.TryStatement = TryStatement;
+exports.VariableDeclaration = VariableDeclaration;
+exports.VariableDeclarator = VariableDeclarator;
+exports.WhileStatement = WhileStatement;
+exports.WithStatement = WithStatement;
+
+var _t = require("@babel/types");
+
+const {
+ isFor,
+ isForStatement,
+ isIfStatement,
+ isStatement
+} = _t;
+
+function WithStatement(node) {
+ this.word("with");
+ this.space();
+ this.token("(");
+ this.print(node.object, node);
+ this.token(")");
+ this.printBlock(node);
+}
+
+function IfStatement(node) {
+ this.word("if");
+ this.space();
+ this.token("(");
+ this.print(node.test, node);
+ this.token(")");
+ this.space();
+ const needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent));
+
+ if (needsBlock) {
+ this.token("{");
+ this.newline();
+ this.indent();
+ }
+
+ this.printAndIndentOnComments(node.consequent, node);
+
+ if (needsBlock) {
+ this.dedent();
+ this.newline();
+ this.token("}");
+ }
+
+ if (node.alternate) {
+ if (this.endsWith(125)) this.space();
+ this.word("else");
+ this.space();
+ this.printAndIndentOnComments(node.alternate, node);
+ }
+}
+
+function getLastStatement(statement) {
+ if (!isStatement(statement.body)) return statement;
+ return getLastStatement(statement.body);
+}
+
+function ForStatement(node) {
+ this.word("for");
+ this.space();
+ this.token("(");
+ this.inForStatementInitCounter++;
+ this.print(node.init, node);
+ this.inForStatementInitCounter--;
+ this.token(";");
+
+ if (node.test) {
+ this.space();
+ this.print(node.test, node);
+ }
+
+ this.token(";");
+
+ if (node.update) {
+ this.space();
+ this.print(node.update, node);
+ }
+
+ this.token(")");
+ this.printBlock(node);
+}
+
+function WhileStatement(node) {
+ this.word("while");
+ this.space();
+ this.token("(");
+ this.print(node.test, node);
+ this.token(")");
+ this.printBlock(node);
+}
+
+const buildForXStatement = function (op) {
+ return function (node) {
+ this.word("for");
+ this.space();
+
+ if (op === "of" && node.await) {
+ this.word("await");
+ this.space();
+ }
+
+ this.token("(");
+ this.print(node.left, node);
+ this.space();
+ this.word(op);
+ this.space();
+ this.print(node.right, node);
+ this.token(")");
+ this.printBlock(node);
+ };
+};
+
+const ForInStatement = buildForXStatement("in");
+exports.ForInStatement = ForInStatement;
+const ForOfStatement = buildForXStatement("of");
+exports.ForOfStatement = ForOfStatement;
+
+function DoWhileStatement(node) {
+ this.word("do");
+ this.space();
+ this.print(node.body, node);
+ this.space();
+ this.word("while");
+ this.space();
+ this.token("(");
+ this.print(node.test, node);
+ this.token(")");
+ this.semicolon();
+}
+
+function buildLabelStatement(prefix, key = "label") {
+ return function (node) {
+ this.word(prefix);
+ const label = node[key];
+
+ if (label) {
+ this.space();
+ const isLabel = key == "label";
+ const terminatorState = this.startTerminatorless(isLabel);
+ this.print(label, node);
+ this.endTerminatorless(terminatorState);
+ }
+
+ this.semicolon();
+ };
+}
+
+const ContinueStatement = buildLabelStatement("continue");
+exports.ContinueStatement = ContinueStatement;
+const ReturnStatement = buildLabelStatement("return", "argument");
+exports.ReturnStatement = ReturnStatement;
+const BreakStatement = buildLabelStatement("break");
+exports.BreakStatement = BreakStatement;
+const ThrowStatement = buildLabelStatement("throw", "argument");
+exports.ThrowStatement = ThrowStatement;
+
+function LabeledStatement(node) {
+ this.print(node.label, node);
+ this.token(":");
+ this.space();
+ this.print(node.body, node);
+}
+
+function TryStatement(node) {
+ this.word("try");
+ this.space();
+ this.print(node.block, node);
+ this.space();
+
+ if (node.handlers) {
+ this.print(node.handlers[0], node);
+ } else {
+ this.print(node.handler, node);
+ }
+
+ if (node.finalizer) {
+ this.space();
+ this.word("finally");
+ this.space();
+ this.print(node.finalizer, node);
+ }
+}
+
+function CatchClause(node) {
+ this.word("catch");
+ this.space();
+
+ if (node.param) {
+ this.token("(");
+ this.print(node.param, node);
+ this.print(node.param.typeAnnotation, node);
+ this.token(")");
+ this.space();
+ }
+
+ this.print(node.body, node);
+}
+
+function SwitchStatement(node) {
+ this.word("switch");
+ this.space();
+ this.token("(");
+ this.print(node.discriminant, node);
+ this.token(")");
+ this.space();
+ this.token("{");
+ this.printSequence(node.cases, node, {
+ indent: true,
+
+ addNewlines(leading, cas) {
+ if (!leading && node.cases[node.cases.length - 1] === cas) return -1;
+ }
+
+ });
+ this.token("}");
+}
+
+function SwitchCase(node) {
+ if (node.test) {
+ this.word("case");
+ this.space();
+ this.print(node.test, node);
+ this.token(":");
+ } else {
+ this.word("default");
+ this.token(":");
+ }
+
+ if (node.consequent.length) {
+ this.newline();
+ this.printSequence(node.consequent, node, {
+ indent: true
+ });
+ }
+}
+
+function DebuggerStatement() {
+ this.word("debugger");
+ this.semicolon();
+}
+
+function variableDeclarationIndent() {
+ this.token(",");
+ this.newline();
+
+ if (this.endsWith(10)) {
+ for (let i = 0; i < 4; i++) this.space(true);
+ }
+}
+
+function constDeclarationIndent() {
+ this.token(",");
+ this.newline();
+
+ if (this.endsWith(10)) {
+ for (let i = 0; i < 6; i++) this.space(true);
+ }
+}
+
+function VariableDeclaration(node, parent) {
+ if (node.declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word(node.kind);
+ this.space();
+ let hasInits = false;
+
+ if (!isFor(parent)) {
+ for (const declar of node.declarations) {
+ if (declar.init) {
+ hasInits = true;
+ }
+ }
+ }
+
+ let separator;
+
+ if (hasInits) {
+ separator = node.kind === "const" ? constDeclarationIndent : variableDeclarationIndent;
+ }
+
+ this.printList(node.declarations, node, {
+ separator
+ });
+
+ if (isFor(parent)) {
+ if (isForStatement(parent)) {
+ if (parent.init === node) return;
+ } else {
+ if (parent.left === node) return;
+ }
+ }
+
+ this.semicolon();
+}
+
+function VariableDeclarator(node) {
+ this.print(node.id, node);
+ if (node.definite) this.token("!");
+ this.print(node.id.typeAnnotation, node);
+
+ if (node.init) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.init, node);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/template-literals.js b/node_modules/@babel/generator/lib/generators/template-literals.js
new file mode 100644
index 0000000..0543303
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/template-literals.js
@@ -0,0 +1,33 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.TaggedTemplateExpression = TaggedTemplateExpression;
+exports.TemplateElement = TemplateElement;
+exports.TemplateLiteral = TemplateLiteral;
+
+function TaggedTemplateExpression(node) {
+ this.print(node.tag, node);
+ this.print(node.typeParameters, node);
+ this.print(node.quasi, node);
+}
+
+function TemplateElement(node, parent) {
+ const isFirst = parent.quasis[0] === node;
+ const isLast = parent.quasis[parent.quasis.length - 1] === node;
+ const value = (isFirst ? "`" : "}") + node.value.raw + (isLast ? "`" : "${");
+ this.token(value);
+}
+
+function TemplateLiteral(node) {
+ const quasis = node.quasis;
+
+ for (let i = 0; i < quasis.length; i++) {
+ this.print(quasis[i], node);
+
+ if (i + 1 < quasis.length) {
+ this.print(node.expressions[i], node);
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/types.js b/node_modules/@babel/generator/lib/generators/types.js
new file mode 100644
index 0000000..a56fb47
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/types.js
@@ -0,0 +1,276 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ArgumentPlaceholder = ArgumentPlaceholder;
+exports.ArrayPattern = exports.ArrayExpression = ArrayExpression;
+exports.BigIntLiteral = BigIntLiteral;
+exports.BooleanLiteral = BooleanLiteral;
+exports.DecimalLiteral = DecimalLiteral;
+exports.Identifier = Identifier;
+exports.NullLiteral = NullLiteral;
+exports.NumericLiteral = NumericLiteral;
+exports.ObjectPattern = exports.ObjectExpression = ObjectExpression;
+exports.ObjectMethod = ObjectMethod;
+exports.ObjectProperty = ObjectProperty;
+exports.PipelineBareFunction = PipelineBareFunction;
+exports.PipelinePrimaryTopicReference = PipelinePrimaryTopicReference;
+exports.PipelineTopicExpression = PipelineTopicExpression;
+exports.RecordExpression = RecordExpression;
+exports.RegExpLiteral = RegExpLiteral;
+exports.SpreadElement = exports.RestElement = RestElement;
+exports.StringLiteral = StringLiteral;
+exports.TopicReference = TopicReference;
+exports.TupleExpression = TupleExpression;
+
+var _t = require("@babel/types");
+
+var _jsesc = require("jsesc");
+
+const {
+ isAssignmentPattern,
+ isIdentifier
+} = _t;
+
+function Identifier(node) {
+ this.exactSource(node.loc, () => {
+ this.word(node.name);
+ });
+}
+
+function ArgumentPlaceholder() {
+ this.token("?");
+}
+
+function RestElement(node) {
+ this.token("...");
+ this.print(node.argument, node);
+}
+
+function ObjectExpression(node) {
+ const props = node.properties;
+ this.token("{");
+ this.printInnerComments(node);
+
+ if (props.length) {
+ this.space();
+ this.printList(props, node, {
+ indent: true,
+ statement: true
+ });
+ this.space();
+ }
+
+ this.token("}");
+}
+
+function ObjectMethod(node) {
+ this.printJoin(node.decorators, node);
+
+ this._methodHead(node);
+
+ this.space();
+ this.print(node.body, node);
+}
+
+function ObjectProperty(node) {
+ this.printJoin(node.decorators, node);
+
+ if (node.computed) {
+ this.token("[");
+ this.print(node.key, node);
+ this.token("]");
+ } else {
+ if (isAssignmentPattern(node.value) && isIdentifier(node.key) && node.key.name === node.value.left.name) {
+ this.print(node.value, node);
+ return;
+ }
+
+ this.print(node.key, node);
+
+ if (node.shorthand && isIdentifier(node.key) && isIdentifier(node.value) && node.key.name === node.value.name) {
+ return;
+ }
+ }
+
+ this.token(":");
+ this.space();
+ this.print(node.value, node);
+}
+
+function ArrayExpression(node) {
+ const elems = node.elements;
+ const len = elems.length;
+ this.token("[");
+ this.printInnerComments(node);
+
+ for (let i = 0; i < elems.length; i++) {
+ const elem = elems[i];
+
+ if (elem) {
+ if (i > 0) this.space();
+ this.print(elem, node);
+ if (i < len - 1) this.token(",");
+ } else {
+ this.token(",");
+ }
+ }
+
+ this.token("]");
+}
+
+function RecordExpression(node) {
+ const props = node.properties;
+ let startToken;
+ let endToken;
+
+ if (this.format.recordAndTupleSyntaxType === "bar") {
+ startToken = "{|";
+ endToken = "|}";
+ } else if (this.format.recordAndTupleSyntaxType === "hash") {
+ startToken = "#{";
+ endToken = "}";
+ } else {
+ throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);
+ }
+
+ this.token(startToken);
+ this.printInnerComments(node);
+
+ if (props.length) {
+ this.space();
+ this.printList(props, node, {
+ indent: true,
+ statement: true
+ });
+ this.space();
+ }
+
+ this.token(endToken);
+}
+
+function TupleExpression(node) {
+ const elems = node.elements;
+ const len = elems.length;
+ let startToken;
+ let endToken;
+
+ if (this.format.recordAndTupleSyntaxType === "bar") {
+ startToken = "[|";
+ endToken = "|]";
+ } else if (this.format.recordAndTupleSyntaxType === "hash") {
+ startToken = "#[";
+ endToken = "]";
+ } else {
+ throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);
+ }
+
+ this.token(startToken);
+ this.printInnerComments(node);
+
+ for (let i = 0; i < elems.length; i++) {
+ const elem = elems[i];
+
+ if (elem) {
+ if (i > 0) this.space();
+ this.print(elem, node);
+ if (i < len - 1) this.token(",");
+ }
+ }
+
+ this.token(endToken);
+}
+
+function RegExpLiteral(node) {
+ this.word(`/${node.pattern}/${node.flags}`);
+}
+
+function BooleanLiteral(node) {
+ this.word(node.value ? "true" : "false");
+}
+
+function NullLiteral() {
+ this.word("null");
+}
+
+function NumericLiteral(node) {
+ const raw = this.getPossibleRaw(node);
+ const opts = this.format.jsescOption;
+ const value = node.value + "";
+
+ if (opts.numbers) {
+ this.number(_jsesc(node.value, opts));
+ } else if (raw == null) {
+ this.number(value);
+ } else if (this.format.minified) {
+ this.number(raw.length < value.length ? raw : value);
+ } else {
+ this.number(raw);
+ }
+}
+
+function StringLiteral(node) {
+ const raw = this.getPossibleRaw(node);
+
+ if (!this.format.minified && raw != null) {
+ this.token(raw);
+ return;
+ }
+
+ const val = _jsesc(node.value, Object.assign(this.format.jsescOption, this.format.jsonCompatibleStrings && {
+ json: true
+ }));
+
+ return this.token(val);
+}
+
+function BigIntLiteral(node) {
+ const raw = this.getPossibleRaw(node);
+
+ if (!this.format.minified && raw != null) {
+ this.word(raw);
+ return;
+ }
+
+ this.word(node.value + "n");
+}
+
+function DecimalLiteral(node) {
+ const raw = this.getPossibleRaw(node);
+
+ if (!this.format.minified && raw != null) {
+ this.word(raw);
+ return;
+ }
+
+ this.word(node.value + "m");
+}
+
+const validTopicTokenSet = new Set(["^^", "@@", "^", "%", "#"]);
+
+function TopicReference() {
+ const {
+ topicToken
+ } = this.format;
+
+ if (validTopicTokenSet.has(topicToken)) {
+ this.token(topicToken);
+ } else {
+ const givenTopicTokenJSON = JSON.stringify(topicToken);
+ const validTopics = Array.from(validTopicTokenSet, v => JSON.stringify(v));
+ throw new Error(`The "topicToken" generator option must be one of ` + `${validTopics.join(", ")} (${givenTopicTokenJSON} received instead).`);
+ }
+}
+
+function PipelineTopicExpression(node) {
+ this.print(node.expression, node);
+}
+
+function PipelineBareFunction(node) {
+ this.print(node.callee, node);
+}
+
+function PipelinePrimaryTopicReference() {
+ this.token("#");
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/generators/typescript.js b/node_modules/@babel/generator/lib/generators/typescript.js
new file mode 100644
index 0000000..010d86d
--- /dev/null
+++ b/node_modules/@babel/generator/lib/generators/typescript.js
@@ -0,0 +1,813 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.TSAnyKeyword = TSAnyKeyword;
+exports.TSArrayType = TSArrayType;
+exports.TSAsExpression = TSAsExpression;
+exports.TSBigIntKeyword = TSBigIntKeyword;
+exports.TSBooleanKeyword = TSBooleanKeyword;
+exports.TSCallSignatureDeclaration = TSCallSignatureDeclaration;
+exports.TSConditionalType = TSConditionalType;
+exports.TSConstructSignatureDeclaration = TSConstructSignatureDeclaration;
+exports.TSConstructorType = TSConstructorType;
+exports.TSDeclareFunction = TSDeclareFunction;
+exports.TSDeclareMethod = TSDeclareMethod;
+exports.TSEnumDeclaration = TSEnumDeclaration;
+exports.TSEnumMember = TSEnumMember;
+exports.TSExportAssignment = TSExportAssignment;
+exports.TSExpressionWithTypeArguments = TSExpressionWithTypeArguments;
+exports.TSExternalModuleReference = TSExternalModuleReference;
+exports.TSFunctionType = TSFunctionType;
+exports.TSImportEqualsDeclaration = TSImportEqualsDeclaration;
+exports.TSImportType = TSImportType;
+exports.TSIndexSignature = TSIndexSignature;
+exports.TSIndexedAccessType = TSIndexedAccessType;
+exports.TSInferType = TSInferType;
+exports.TSInterfaceBody = TSInterfaceBody;
+exports.TSInterfaceDeclaration = TSInterfaceDeclaration;
+exports.TSIntersectionType = TSIntersectionType;
+exports.TSIntrinsicKeyword = TSIntrinsicKeyword;
+exports.TSLiteralType = TSLiteralType;
+exports.TSMappedType = TSMappedType;
+exports.TSMethodSignature = TSMethodSignature;
+exports.TSModuleBlock = TSModuleBlock;
+exports.TSModuleDeclaration = TSModuleDeclaration;
+exports.TSNamedTupleMember = TSNamedTupleMember;
+exports.TSNamespaceExportDeclaration = TSNamespaceExportDeclaration;
+exports.TSNeverKeyword = TSNeverKeyword;
+exports.TSNonNullExpression = TSNonNullExpression;
+exports.TSNullKeyword = TSNullKeyword;
+exports.TSNumberKeyword = TSNumberKeyword;
+exports.TSObjectKeyword = TSObjectKeyword;
+exports.TSOptionalType = TSOptionalType;
+exports.TSParameterProperty = TSParameterProperty;
+exports.TSParenthesizedType = TSParenthesizedType;
+exports.TSPropertySignature = TSPropertySignature;
+exports.TSQualifiedName = TSQualifiedName;
+exports.TSRestType = TSRestType;
+exports.TSStringKeyword = TSStringKeyword;
+exports.TSSymbolKeyword = TSSymbolKeyword;
+exports.TSThisType = TSThisType;
+exports.TSTupleType = TSTupleType;
+exports.TSTypeAliasDeclaration = TSTypeAliasDeclaration;
+exports.TSTypeAnnotation = TSTypeAnnotation;
+exports.TSTypeAssertion = TSTypeAssertion;
+exports.TSTypeLiteral = TSTypeLiteral;
+exports.TSTypeOperator = TSTypeOperator;
+exports.TSTypeParameter = TSTypeParameter;
+exports.TSTypeParameterDeclaration = exports.TSTypeParameterInstantiation = TSTypeParameterInstantiation;
+exports.TSTypePredicate = TSTypePredicate;
+exports.TSTypeQuery = TSTypeQuery;
+exports.TSTypeReference = TSTypeReference;
+exports.TSUndefinedKeyword = TSUndefinedKeyword;
+exports.TSUnionType = TSUnionType;
+exports.TSUnknownKeyword = TSUnknownKeyword;
+exports.TSVoidKeyword = TSVoidKeyword;
+exports.tsPrintBraced = tsPrintBraced;
+exports.tsPrintClassMemberModifiers = tsPrintClassMemberModifiers;
+exports.tsPrintFunctionOrConstructorType = tsPrintFunctionOrConstructorType;
+exports.tsPrintPropertyOrMethodName = tsPrintPropertyOrMethodName;
+exports.tsPrintSignatureDeclarationBase = tsPrintSignatureDeclarationBase;
+exports.tsPrintTypeLiteralOrInterfaceBody = tsPrintTypeLiteralOrInterfaceBody;
+exports.tsPrintUnionOrIntersectionType = tsPrintUnionOrIntersectionType;
+
+function TSTypeAnnotation(node) {
+ this.token(":");
+ this.space();
+ if (node.optional) this.token("?");
+ this.print(node.typeAnnotation, node);
+}
+
+function TSTypeParameterInstantiation(node, parent) {
+ this.token("<");
+ this.printList(node.params, node, {});
+
+ if (parent.type === "ArrowFunctionExpression" && node.params.length === 1) {
+ this.token(",");
+ }
+
+ this.token(">");
+}
+
+function TSTypeParameter(node) {
+ this.word(node.name);
+
+ if (node.constraint) {
+ this.space();
+ this.word("extends");
+ this.space();
+ this.print(node.constraint, node);
+ }
+
+ if (node.default) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.default, node);
+ }
+}
+
+function TSParameterProperty(node) {
+ if (node.accessibility) {
+ this.word(node.accessibility);
+ this.space();
+ }
+
+ if (node.readonly) {
+ this.word("readonly");
+ this.space();
+ }
+
+ this._param(node.parameter);
+}
+
+function TSDeclareFunction(node) {
+ if (node.declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ this._functionHead(node);
+
+ this.token(";");
+}
+
+function TSDeclareMethod(node) {
+ this._classMethodHead(node);
+
+ this.token(";");
+}
+
+function TSQualifiedName(node) {
+ this.print(node.left, node);
+ this.token(".");
+ this.print(node.right, node);
+}
+
+function TSCallSignatureDeclaration(node) {
+ this.tsPrintSignatureDeclarationBase(node);
+ this.token(";");
+}
+
+function TSConstructSignatureDeclaration(node) {
+ this.word("new");
+ this.space();
+ this.tsPrintSignatureDeclarationBase(node);
+ this.token(";");
+}
+
+function TSPropertySignature(node) {
+ const {
+ readonly,
+ initializer
+ } = node;
+
+ if (readonly) {
+ this.word("readonly");
+ this.space();
+ }
+
+ this.tsPrintPropertyOrMethodName(node);
+ this.print(node.typeAnnotation, node);
+
+ if (initializer) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(initializer, node);
+ }
+
+ this.token(";");
+}
+
+function tsPrintPropertyOrMethodName(node) {
+ if (node.computed) {
+ this.token("[");
+ }
+
+ this.print(node.key, node);
+
+ if (node.computed) {
+ this.token("]");
+ }
+
+ if (node.optional) {
+ this.token("?");
+ }
+}
+
+function TSMethodSignature(node) {
+ const {
+ kind
+ } = node;
+
+ if (kind === "set" || kind === "get") {
+ this.word(kind);
+ this.space();
+ }
+
+ this.tsPrintPropertyOrMethodName(node);
+ this.tsPrintSignatureDeclarationBase(node);
+ this.token(";");
+}
+
+function TSIndexSignature(node) {
+ const {
+ readonly,
+ static: isStatic
+ } = node;
+
+ if (isStatic) {
+ this.word("static");
+ this.space();
+ }
+
+ if (readonly) {
+ this.word("readonly");
+ this.space();
+ }
+
+ this.token("[");
+
+ this._parameters(node.parameters, node);
+
+ this.token("]");
+ this.print(node.typeAnnotation, node);
+ this.token(";");
+}
+
+function TSAnyKeyword() {
+ this.word("any");
+}
+
+function TSBigIntKeyword() {
+ this.word("bigint");
+}
+
+function TSUnknownKeyword() {
+ this.word("unknown");
+}
+
+function TSNumberKeyword() {
+ this.word("number");
+}
+
+function TSObjectKeyword() {
+ this.word("object");
+}
+
+function TSBooleanKeyword() {
+ this.word("boolean");
+}
+
+function TSStringKeyword() {
+ this.word("string");
+}
+
+function TSSymbolKeyword() {
+ this.word("symbol");
+}
+
+function TSVoidKeyword() {
+ this.word("void");
+}
+
+function TSUndefinedKeyword() {
+ this.word("undefined");
+}
+
+function TSNullKeyword() {
+ this.word("null");
+}
+
+function TSNeverKeyword() {
+ this.word("never");
+}
+
+function TSIntrinsicKeyword() {
+ this.word("intrinsic");
+}
+
+function TSThisType() {
+ this.word("this");
+}
+
+function TSFunctionType(node) {
+ this.tsPrintFunctionOrConstructorType(node);
+}
+
+function TSConstructorType(node) {
+ if (node.abstract) {
+ this.word("abstract");
+ this.space();
+ }
+
+ this.word("new");
+ this.space();
+ this.tsPrintFunctionOrConstructorType(node);
+}
+
+function tsPrintFunctionOrConstructorType(node) {
+ const {
+ typeParameters
+ } = node;
+ const parameters = node.parameters;
+ this.print(typeParameters, node);
+ this.token("(");
+
+ this._parameters(parameters, node);
+
+ this.token(")");
+ this.space();
+ this.token("=>");
+ this.space();
+ const returnType = node.typeAnnotation;
+ this.print(returnType.typeAnnotation, node);
+}
+
+function TSTypeReference(node) {
+ this.print(node.typeName, node);
+ this.print(node.typeParameters, node);
+}
+
+function TSTypePredicate(node) {
+ if (node.asserts) {
+ this.word("asserts");
+ this.space();
+ }
+
+ this.print(node.parameterName);
+
+ if (node.typeAnnotation) {
+ this.space();
+ this.word("is");
+ this.space();
+ this.print(node.typeAnnotation.typeAnnotation);
+ }
+}
+
+function TSTypeQuery(node) {
+ this.word("typeof");
+ this.space();
+ this.print(node.exprName);
+}
+
+function TSTypeLiteral(node) {
+ this.tsPrintTypeLiteralOrInterfaceBody(node.members, node);
+}
+
+function tsPrintTypeLiteralOrInterfaceBody(members, node) {
+ this.tsPrintBraced(members, node);
+}
+
+function tsPrintBraced(members, node) {
+ this.token("{");
+
+ if (members.length) {
+ this.indent();
+ this.newline();
+
+ for (const member of members) {
+ this.print(member, node);
+ this.newline();
+ }
+
+ this.dedent();
+ this.rightBrace();
+ } else {
+ this.token("}");
+ }
+}
+
+function TSArrayType(node) {
+ this.print(node.elementType, node);
+ this.token("[]");
+}
+
+function TSTupleType(node) {
+ this.token("[");
+ this.printList(node.elementTypes, node);
+ this.token("]");
+}
+
+function TSOptionalType(node) {
+ this.print(node.typeAnnotation, node);
+ this.token("?");
+}
+
+function TSRestType(node) {
+ this.token("...");
+ this.print(node.typeAnnotation, node);
+}
+
+function TSNamedTupleMember(node) {
+ this.print(node.label, node);
+ if (node.optional) this.token("?");
+ this.token(":");
+ this.space();
+ this.print(node.elementType, node);
+}
+
+function TSUnionType(node) {
+ this.tsPrintUnionOrIntersectionType(node, "|");
+}
+
+function TSIntersectionType(node) {
+ this.tsPrintUnionOrIntersectionType(node, "&");
+}
+
+function tsPrintUnionOrIntersectionType(node, sep) {
+ this.printJoin(node.types, node, {
+ separator() {
+ this.space();
+ this.token(sep);
+ this.space();
+ }
+
+ });
+}
+
+function TSConditionalType(node) {
+ this.print(node.checkType);
+ this.space();
+ this.word("extends");
+ this.space();
+ this.print(node.extendsType);
+ this.space();
+ this.token("?");
+ this.space();
+ this.print(node.trueType);
+ this.space();
+ this.token(":");
+ this.space();
+ this.print(node.falseType);
+}
+
+function TSInferType(node) {
+ this.token("infer");
+ this.space();
+ this.print(node.typeParameter);
+}
+
+function TSParenthesizedType(node) {
+ this.token("(");
+ this.print(node.typeAnnotation, node);
+ this.token(")");
+}
+
+function TSTypeOperator(node) {
+ this.word(node.operator);
+ this.space();
+ this.print(node.typeAnnotation, node);
+}
+
+function TSIndexedAccessType(node) {
+ this.print(node.objectType, node);
+ this.token("[");
+ this.print(node.indexType, node);
+ this.token("]");
+}
+
+function TSMappedType(node) {
+ const {
+ nameType,
+ optional,
+ readonly,
+ typeParameter
+ } = node;
+ this.token("{");
+ this.space();
+
+ if (readonly) {
+ tokenIfPlusMinus(this, readonly);
+ this.word("readonly");
+ this.space();
+ }
+
+ this.token("[");
+ this.word(typeParameter.name);
+ this.space();
+ this.word("in");
+ this.space();
+ this.print(typeParameter.constraint, typeParameter);
+
+ if (nameType) {
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(nameType, node);
+ }
+
+ this.token("]");
+
+ if (optional) {
+ tokenIfPlusMinus(this, optional);
+ this.token("?");
+ }
+
+ this.token(":");
+ this.space();
+ this.print(node.typeAnnotation, node);
+ this.space();
+ this.token("}");
+}
+
+function tokenIfPlusMinus(self, tok) {
+ if (tok !== true) {
+ self.token(tok);
+ }
+}
+
+function TSLiteralType(node) {
+ this.print(node.literal, node);
+}
+
+function TSExpressionWithTypeArguments(node) {
+ this.print(node.expression, node);
+ this.print(node.typeParameters, node);
+}
+
+function TSInterfaceDeclaration(node) {
+ const {
+ declare,
+ id,
+ typeParameters,
+ extends: extendz,
+ body
+ } = node;
+
+ if (declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word("interface");
+ this.space();
+ this.print(id, node);
+ this.print(typeParameters, node);
+
+ if (extendz != null && extendz.length) {
+ this.space();
+ this.word("extends");
+ this.space();
+ this.printList(extendz, node);
+ }
+
+ this.space();
+ this.print(body, node);
+}
+
+function TSInterfaceBody(node) {
+ this.tsPrintTypeLiteralOrInterfaceBody(node.body, node);
+}
+
+function TSTypeAliasDeclaration(node) {
+ const {
+ declare,
+ id,
+ typeParameters,
+ typeAnnotation
+ } = node;
+
+ if (declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ this.word("type");
+ this.space();
+ this.print(id, node);
+ this.print(typeParameters, node);
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(typeAnnotation, node);
+ this.token(";");
+}
+
+function TSAsExpression(node) {
+ const {
+ expression,
+ typeAnnotation
+ } = node;
+ this.print(expression, node);
+ this.space();
+ this.word("as");
+ this.space();
+ this.print(typeAnnotation, node);
+}
+
+function TSTypeAssertion(node) {
+ const {
+ typeAnnotation,
+ expression
+ } = node;
+ this.token("<");
+ this.print(typeAnnotation, node);
+ this.token(">");
+ this.space();
+ this.print(expression, node);
+}
+
+function TSEnumDeclaration(node) {
+ const {
+ declare,
+ const: isConst,
+ id,
+ members
+ } = node;
+
+ if (declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ if (isConst) {
+ this.word("const");
+ this.space();
+ }
+
+ this.word("enum");
+ this.space();
+ this.print(id, node);
+ this.space();
+ this.tsPrintBraced(members, node);
+}
+
+function TSEnumMember(node) {
+ const {
+ id,
+ initializer
+ } = node;
+ this.print(id, node);
+
+ if (initializer) {
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(initializer, node);
+ }
+
+ this.token(",");
+}
+
+function TSModuleDeclaration(node) {
+ const {
+ declare,
+ id
+ } = node;
+
+ if (declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ if (!node.global) {
+ this.word(id.type === "Identifier" ? "namespace" : "module");
+ this.space();
+ }
+
+ this.print(id, node);
+
+ if (!node.body) {
+ this.token(";");
+ return;
+ }
+
+ let body = node.body;
+
+ while (body.type === "TSModuleDeclaration") {
+ this.token(".");
+ this.print(body.id, body);
+ body = body.body;
+ }
+
+ this.space();
+ this.print(body, node);
+}
+
+function TSModuleBlock(node) {
+ this.tsPrintBraced(node.body, node);
+}
+
+function TSImportType(node) {
+ const {
+ argument,
+ qualifier,
+ typeParameters
+ } = node;
+ this.word("import");
+ this.token("(");
+ this.print(argument, node);
+ this.token(")");
+
+ if (qualifier) {
+ this.token(".");
+ this.print(qualifier, node);
+ }
+
+ if (typeParameters) {
+ this.print(typeParameters, node);
+ }
+}
+
+function TSImportEqualsDeclaration(node) {
+ const {
+ isExport,
+ id,
+ moduleReference
+ } = node;
+
+ if (isExport) {
+ this.word("export");
+ this.space();
+ }
+
+ this.word("import");
+ this.space();
+ this.print(id, node);
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(moduleReference, node);
+ this.token(";");
+}
+
+function TSExternalModuleReference(node) {
+ this.token("require(");
+ this.print(node.expression, node);
+ this.token(")");
+}
+
+function TSNonNullExpression(node) {
+ this.print(node.expression, node);
+ this.token("!");
+}
+
+function TSExportAssignment(node) {
+ this.word("export");
+ this.space();
+ this.token("=");
+ this.space();
+ this.print(node.expression, node);
+ this.token(";");
+}
+
+function TSNamespaceExportDeclaration(node) {
+ this.word("export");
+ this.space();
+ this.word("as");
+ this.space();
+ this.word("namespace");
+ this.space();
+ this.print(node.id, node);
+}
+
+function tsPrintSignatureDeclarationBase(node) {
+ const {
+ typeParameters
+ } = node;
+ const parameters = node.parameters;
+ this.print(typeParameters, node);
+ this.token("(");
+
+ this._parameters(parameters, node);
+
+ this.token(")");
+ const returnType = node.typeAnnotation;
+ this.print(returnType, node);
+}
+
+function tsPrintClassMemberModifiers(node, isField) {
+ if (isField && node.declare) {
+ this.word("declare");
+ this.space();
+ }
+
+ if (node.accessibility) {
+ this.word(node.accessibility);
+ this.space();
+ }
+
+ if (node.static) {
+ this.word("static");
+ this.space();
+ }
+
+ if (node.override) {
+ this.word("override");
+ this.space();
+ }
+
+ if (node.abstract) {
+ this.word("abstract");
+ this.space();
+ }
+
+ if (isField && node.readonly) {
+ this.word("readonly");
+ this.space();
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/index.js b/node_modules/@babel/generator/lib/index.js
new file mode 100644
index 0000000..ca8a0bd
--- /dev/null
+++ b/node_modules/@babel/generator/lib/index.js
@@ -0,0 +1,97 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.CodeGenerator = void 0;
+exports.default = generate;
+
+var _sourceMap = require("./source-map");
+
+var _printer = require("./printer");
+
+class Generator extends _printer.default {
+ constructor(ast, opts = {}, code) {
+ const format = normalizeOptions(code, opts);
+ const map = opts.sourceMaps ? new _sourceMap.default(opts, code) : null;
+ super(format, map);
+ this.ast = void 0;
+ this.ast = ast;
+ }
+
+ generate() {
+ return super.generate(this.ast);
+ }
+
+}
+
+function normalizeOptions(code, opts) {
+ const format = {
+ auxiliaryCommentBefore: opts.auxiliaryCommentBefore,
+ auxiliaryCommentAfter: opts.auxiliaryCommentAfter,
+ shouldPrintComment: opts.shouldPrintComment,
+ retainLines: opts.retainLines,
+ retainFunctionParens: opts.retainFunctionParens,
+ comments: opts.comments == null || opts.comments,
+ compact: opts.compact,
+ minified: opts.minified,
+ concise: opts.concise,
+ indent: {
+ adjustMultilineComment: true,
+ style: " ",
+ base: 0
+ },
+ decoratorsBeforeExport: !!opts.decoratorsBeforeExport,
+ jsescOption: Object.assign({
+ quotes: "double",
+ wrap: true,
+ minimal: false
+ }, opts.jsescOption),
+ recordAndTupleSyntaxType: opts.recordAndTupleSyntaxType,
+ topicToken: opts.topicToken
+ };
+ {
+ format.jsonCompatibleStrings = opts.jsonCompatibleStrings;
+ }
+
+ if (format.minified) {
+ format.compact = true;
+
+ format.shouldPrintComment = format.shouldPrintComment || (() => format.comments);
+ } else {
+ format.shouldPrintComment = format.shouldPrintComment || (value => format.comments || value.indexOf("@license") >= 0 || value.indexOf("@preserve") >= 0);
+ }
+
+ if (format.compact === "auto") {
+ format.compact = code.length > 500000;
+
+ if (format.compact) {
+ console.error("[BABEL] Note: The code generator has deoptimised the styling of " + `${opts.filename} as it exceeds the max of ${"500KB"}.`);
+ }
+ }
+
+ if (format.compact) {
+ format.indent.adjustMultilineComment = false;
+ }
+
+ return format;
+}
+
+class CodeGenerator {
+ constructor(ast, opts, code) {
+ this._generator = void 0;
+ this._generator = new Generator(ast, opts, code);
+ }
+
+ generate() {
+ return this._generator.generate();
+ }
+
+}
+
+exports.CodeGenerator = CodeGenerator;
+
+function generate(ast, opts, code) {
+ const gen = new Generator(ast, opts, code);
+ return gen.generate();
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/node/index.js b/node_modules/@babel/generator/lib/node/index.js
new file mode 100644
index 0000000..b594ae4
--- /dev/null
+++ b/node_modules/@babel/generator/lib/node/index.js
@@ -0,0 +1,111 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.needsParens = needsParens;
+exports.needsWhitespace = needsWhitespace;
+exports.needsWhitespaceAfter = needsWhitespaceAfter;
+exports.needsWhitespaceBefore = needsWhitespaceBefore;
+
+var whitespace = require("./whitespace");
+
+var parens = require("./parentheses");
+
+var _t = require("@babel/types");
+
+const {
+ FLIPPED_ALIAS_KEYS,
+ isCallExpression,
+ isExpressionStatement,
+ isMemberExpression,
+ isNewExpression
+} = _t;
+
+function expandAliases(obj) {
+ const newObj = {};
+
+ function add(type, func) {
+ const fn = newObj[type];
+ newObj[type] = fn ? function (node, parent, stack) {
+ const result = fn(node, parent, stack);
+ return result == null ? func(node, parent, stack) : result;
+ } : func;
+ }
+
+ for (const type of Object.keys(obj)) {
+ const aliases = FLIPPED_ALIAS_KEYS[type];
+
+ if (aliases) {
+ for (const alias of aliases) {
+ add(alias, obj[type]);
+ }
+ } else {
+ add(type, obj[type]);
+ }
+ }
+
+ return newObj;
+}
+
+const expandedParens = expandAliases(parens);
+const expandedWhitespaceNodes = expandAliases(whitespace.nodes);
+const expandedWhitespaceList = expandAliases(whitespace.list);
+
+function find(obj, node, parent, printStack) {
+ const fn = obj[node.type];
+ return fn ? fn(node, parent, printStack) : null;
+}
+
+function isOrHasCallExpression(node) {
+ if (isCallExpression(node)) {
+ return true;
+ }
+
+ return isMemberExpression(node) && isOrHasCallExpression(node.object);
+}
+
+function needsWhitespace(node, parent, type) {
+ if (!node) return 0;
+
+ if (isExpressionStatement(node)) {
+ node = node.expression;
+ }
+
+ let linesInfo = find(expandedWhitespaceNodes, node, parent);
+
+ if (!linesInfo) {
+ const items = find(expandedWhitespaceList, node, parent);
+
+ if (items) {
+ for (let i = 0; i < items.length; i++) {
+ linesInfo = needsWhitespace(items[i], node, type);
+ if (linesInfo) break;
+ }
+ }
+ }
+
+ if (typeof linesInfo === "object" && linesInfo !== null) {
+ return linesInfo[type] || 0;
+ }
+
+ return 0;
+}
+
+function needsWhitespaceBefore(node, parent) {
+ return needsWhitespace(node, parent, "before");
+}
+
+function needsWhitespaceAfter(node, parent) {
+ return needsWhitespace(node, parent, "after");
+}
+
+function needsParens(node, parent, printStack) {
+ if (!parent) return false;
+
+ if (isNewExpression(parent) && parent.callee === node) {
+ if (isOrHasCallExpression(node)) return true;
+ }
+
+ return find(expandedParens, node, parent, printStack);
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/node/parentheses.js b/node_modules/@babel/generator/lib/node/parentheses.js
new file mode 100644
index 0000000..5761a58
--- /dev/null
+++ b/node_modules/@babel/generator/lib/node/parentheses.js
@@ -0,0 +1,342 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ArrowFunctionExpression = ArrowFunctionExpression;
+exports.AssignmentExpression = AssignmentExpression;
+exports.Binary = Binary;
+exports.BinaryExpression = BinaryExpression;
+exports.ClassExpression = ClassExpression;
+exports.ConditionalExpression = ConditionalExpression;
+exports.DoExpression = DoExpression;
+exports.FunctionExpression = FunctionExpression;
+exports.FunctionTypeAnnotation = FunctionTypeAnnotation;
+exports.Identifier = Identifier;
+exports.LogicalExpression = LogicalExpression;
+exports.NullableTypeAnnotation = NullableTypeAnnotation;
+exports.ObjectExpression = ObjectExpression;
+exports.OptionalIndexedAccessType = OptionalIndexedAccessType;
+exports.OptionalCallExpression = exports.OptionalMemberExpression = OptionalMemberExpression;
+exports.SequenceExpression = SequenceExpression;
+exports.TSAsExpression = TSAsExpression;
+exports.TSInferType = TSInferType;
+exports.TSTypeAssertion = TSTypeAssertion;
+exports.TSIntersectionType = exports.TSUnionType = TSUnionType;
+exports.UnaryLike = UnaryLike;
+exports.IntersectionTypeAnnotation = exports.UnionTypeAnnotation = UnionTypeAnnotation;
+exports.UpdateExpression = UpdateExpression;
+exports.AwaitExpression = exports.YieldExpression = YieldExpression;
+
+var _t = require("@babel/types");
+
+const {
+ isArrayTypeAnnotation,
+ isArrowFunctionExpression,
+ isAssignmentExpression,
+ isAwaitExpression,
+ isBinary,
+ isBinaryExpression,
+ isCallExpression,
+ isClassDeclaration,
+ isClassExpression,
+ isConditional,
+ isConditionalExpression,
+ isExportDeclaration,
+ isExportDefaultDeclaration,
+ isExpressionStatement,
+ isFor,
+ isForInStatement,
+ isForOfStatement,
+ isForStatement,
+ isIfStatement,
+ isIndexedAccessType,
+ isIntersectionTypeAnnotation,
+ isLogicalExpression,
+ isMemberExpression,
+ isNewExpression,
+ isNullableTypeAnnotation,
+ isObjectPattern,
+ isOptionalCallExpression,
+ isOptionalMemberExpression,
+ isReturnStatement,
+ isSequenceExpression,
+ isSwitchStatement,
+ isTSArrayType,
+ isTSAsExpression,
+ isTSIntersectionType,
+ isTSNonNullExpression,
+ isTSOptionalType,
+ isTSRestType,
+ isTSTypeAssertion,
+ isTSUnionType,
+ isTaggedTemplateExpression,
+ isThrowStatement,
+ isTypeAnnotation,
+ isUnaryLike,
+ isUnionTypeAnnotation,
+ isVariableDeclarator,
+ isWhileStatement,
+ isYieldExpression
+} = _t;
+const PRECEDENCE = {
+ "||": 0,
+ "??": 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
+};
+
+const isClassExtendsClause = (node, parent) => (isClassDeclaration(parent) || isClassExpression(parent)) && parent.superClass === node;
+
+const hasPostfixPart = (node, parent) => (isMemberExpression(parent) || isOptionalMemberExpression(parent)) && parent.object === node || (isCallExpression(parent) || isOptionalCallExpression(parent) || isNewExpression(parent)) && parent.callee === node || isTaggedTemplateExpression(parent) && parent.tag === node || isTSNonNullExpression(parent);
+
+function NullableTypeAnnotation(node, parent) {
+ return isArrayTypeAnnotation(parent);
+}
+
+function FunctionTypeAnnotation(node, parent, printStack) {
+ return isUnionTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]);
+}
+
+function UpdateExpression(node, parent) {
+ return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);
+}
+
+function ObjectExpression(node, parent, printStack) {
+ return isFirstInContext(printStack, {
+ expressionStatement: true,
+ arrowBody: true
+ });
+}
+
+function DoExpression(node, parent, printStack) {
+ return !node.async && isFirstInContext(printStack, {
+ expressionStatement: true
+ });
+}
+
+function Binary(node, parent) {
+ if (node.operator === "**" && isBinaryExpression(parent, {
+ operator: "**"
+ })) {
+ return parent.left === node;
+ }
+
+ if (isClassExtendsClause(node, parent)) {
+ return true;
+ }
+
+ if (hasPostfixPart(node, parent) || isUnaryLike(parent) || isAwaitExpression(parent)) {
+ return true;
+ }
+
+ if (isBinary(parent)) {
+ const parentOp = parent.operator;
+ const parentPos = PRECEDENCE[parentOp];
+ const nodeOp = node.operator;
+ const nodePos = PRECEDENCE[nodeOp];
+
+ if (parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) {
+ return true;
+ }
+ }
+}
+
+function UnionTypeAnnotation(node, parent) {
+ return isArrayTypeAnnotation(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation(parent);
+}
+
+function OptionalIndexedAccessType(node, parent) {
+ return isIndexedAccessType(parent, {
+ objectType: node
+ });
+}
+
+function TSAsExpression() {
+ return true;
+}
+
+function TSTypeAssertion() {
+ return true;
+}
+
+function TSUnionType(node, parent) {
+ return isTSArrayType(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent);
+}
+
+function TSInferType(node, parent) {
+ return isTSArrayType(parent) || isTSOptionalType(parent);
+}
+
+function BinaryExpression(node, parent) {
+ return node.operator === "in" && (isVariableDeclarator(parent) || isFor(parent));
+}
+
+function SequenceExpression(node, parent) {
+ if (isForStatement(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement(parent) && parent.expression === node) {
+ return false;
+ }
+
+ return true;
+}
+
+function YieldExpression(node, parent) {
+ return isBinary(parent) || isUnaryLike(parent) || hasPostfixPart(node, parent) || isAwaitExpression(parent) && isYieldExpression(node) || isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);
+}
+
+function ClassExpression(node, parent, printStack) {
+ return isFirstInContext(printStack, {
+ expressionStatement: true,
+ exportDefault: true
+ });
+}
+
+function UnaryLike(node, parent) {
+ return hasPostfixPart(node, parent) || isBinaryExpression(parent, {
+ operator: "**",
+ left: node
+ }) || isClassExtendsClause(node, parent);
+}
+
+function FunctionExpression(node, parent, printStack) {
+ return isFirstInContext(printStack, {
+ expressionStatement: true,
+ exportDefault: true
+ });
+}
+
+function ArrowFunctionExpression(node, parent) {
+ return isExportDeclaration(parent) || ConditionalExpression(node, parent);
+}
+
+function ConditionalExpression(node, parent) {
+ if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, {
+ test: node
+ }) || isAwaitExpression(parent) || isTSTypeAssertion(parent) || isTSAsExpression(parent)) {
+ return true;
+ }
+
+ return UnaryLike(node, parent);
+}
+
+function OptionalMemberExpression(node, parent) {
+ return isCallExpression(parent, {
+ callee: node
+ }) || isMemberExpression(parent, {
+ object: node
+ });
+}
+
+function AssignmentExpression(node, parent) {
+ if (isObjectPattern(node.left)) {
+ return true;
+ } else {
+ return ConditionalExpression(node, parent);
+ }
+}
+
+function LogicalExpression(node, parent) {
+ switch (node.operator) {
+ case "||":
+ if (!isLogicalExpression(parent)) return false;
+ return parent.operator === "??" || parent.operator === "&&";
+
+ case "&&":
+ return isLogicalExpression(parent, {
+ operator: "??"
+ });
+
+ case "??":
+ return isLogicalExpression(parent) && parent.operator !== "??";
+ }
+}
+
+function Identifier(node, parent, printStack) {
+ if (node.name === "let") {
+ const isFollowedByBracket = isMemberExpression(parent, {
+ object: node,
+ computed: true
+ }) || isOptionalMemberExpression(parent, {
+ object: node,
+ computed: true,
+ optional: false
+ });
+ return isFirstInContext(printStack, {
+ expressionStatement: isFollowedByBracket,
+ forHead: isFollowedByBracket,
+ forInHead: isFollowedByBracket,
+ forOfHead: true
+ });
+ }
+
+ return node.name === "async" && isForOfStatement(parent) && node === parent.left;
+}
+
+function isFirstInContext(printStack, {
+ expressionStatement = false,
+ arrowBody = false,
+ exportDefault = false,
+ forHead = false,
+ forInHead = false,
+ forOfHead = false
+}) {
+ let i = printStack.length - 1;
+ let node = printStack[i];
+ i--;
+ let parent = printStack[i];
+
+ while (i >= 0) {
+ if (expressionStatement && isExpressionStatement(parent, {
+ expression: node
+ }) || exportDefault && isExportDefaultDeclaration(parent, {
+ declaration: node
+ }) || arrowBody && isArrowFunctionExpression(parent, {
+ body: node
+ }) || forHead && isForStatement(parent, {
+ init: node
+ }) || forInHead && isForInStatement(parent, {
+ left: node
+ }) || forOfHead && isForOfStatement(parent, {
+ left: node
+ })) {
+ return true;
+ }
+
+ if (hasPostfixPart(node, parent) && !isNewExpression(parent) || isSequenceExpression(parent) && parent.expressions[0] === node || isConditional(parent, {
+ test: node
+ }) || isBinary(parent, {
+ left: node
+ }) || isAssignmentExpression(parent, {
+ left: node
+ })) {
+ node = parent;
+ i--;
+ parent = printStack[i];
+ } else {
+ return false;
+ }
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/node/whitespace.js b/node_modules/@babel/generator/lib/node/whitespace.js
new file mode 100644
index 0000000..80e2da9
--- /dev/null
+++ b/node_modules/@babel/generator/lib/node/whitespace.js
@@ -0,0 +1,214 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.nodes = exports.list = void 0;
+
+var _t = require("@babel/types");
+
+const {
+ FLIPPED_ALIAS_KEYS,
+ isArrayExpression,
+ isAssignmentExpression,
+ isBinary,
+ isBlockStatement,
+ isCallExpression,
+ isFunction,
+ isIdentifier,
+ isLiteral,
+ isMemberExpression,
+ isObjectExpression,
+ isOptionalCallExpression,
+ isOptionalMemberExpression,
+ isStringLiteral
+} = _t;
+
+function crawl(node, state = {}) {
+ if (isMemberExpression(node) || isOptionalMemberExpression(node)) {
+ crawl(node.object, state);
+ if (node.computed) crawl(node.property, state);
+ } else if (isBinary(node) || isAssignmentExpression(node)) {
+ crawl(node.left, state);
+ crawl(node.right, state);
+ } else if (isCallExpression(node) || isOptionalCallExpression(node)) {
+ state.hasCall = true;
+ crawl(node.callee, state);
+ } else if (isFunction(node)) {
+ state.hasFunction = true;
+ } else if (isIdentifier(node)) {
+ state.hasHelper = state.hasHelper || isHelper(node.callee);
+ }
+
+ return state;
+}
+
+function isHelper(node) {
+ if (isMemberExpression(node)) {
+ return isHelper(node.object) || isHelper(node.property);
+ } else if (isIdentifier(node)) {
+ return node.name === "require" || node.name[0] === "_";
+ } else if (isCallExpression(node)) {
+ return isHelper(node.callee);
+ } else if (isBinary(node) || isAssignmentExpression(node)) {
+ return isIdentifier(node.left) && isHelper(node.left) || isHelper(node.right);
+ } else {
+ return false;
+ }
+}
+
+function isType(node) {
+ return isLiteral(node) || isObjectExpression(node) || isArrayExpression(node) || isIdentifier(node) || isMemberExpression(node);
+}
+
+const nodes = {
+ AssignmentExpression(node) {
+ const state = crawl(node.right);
+
+ if (state.hasCall && state.hasHelper || state.hasFunction) {
+ return {
+ before: state.hasFunction,
+ after: true
+ };
+ }
+ },
+
+ SwitchCase(node, parent) {
+ return {
+ before: !!node.consequent.length || parent.cases[0] === node,
+ after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node
+ };
+ },
+
+ LogicalExpression(node) {
+ if (isFunction(node.left) || isFunction(node.right)) {
+ return {
+ after: true
+ };
+ }
+ },
+
+ Literal(node) {
+ if (isStringLiteral(node) && node.value === "use strict") {
+ return {
+ after: true
+ };
+ }
+ },
+
+ CallExpression(node) {
+ if (isFunction(node.callee) || isHelper(node)) {
+ return {
+ before: true,
+ after: true
+ };
+ }
+ },
+
+ OptionalCallExpression(node) {
+ if (isFunction(node.callee)) {
+ return {
+ before: true,
+ after: true
+ };
+ }
+ },
+
+ VariableDeclaration(node) {
+ for (let i = 0; i < node.declarations.length; i++) {
+ const declar = node.declarations[i];
+ let enabled = isHelper(declar.id) && !isType(declar.init);
+
+ if (!enabled) {
+ const state = crawl(declar.init);
+ enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;
+ }
+
+ if (enabled) {
+ return {
+ before: true,
+ after: true
+ };
+ }
+ }
+ },
+
+ IfStatement(node) {
+ if (isBlockStatement(node.consequent)) {
+ return {
+ before: true,
+ after: true
+ };
+ }
+ }
+
+};
+exports.nodes = nodes;
+
+nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) {
+ if (parent.properties[0] === node) {
+ return {
+ before: true
+ };
+ }
+};
+
+nodes.ObjectTypeCallProperty = function (node, parent) {
+ var _parent$properties;
+
+ if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) {
+ return {
+ before: true
+ };
+ }
+};
+
+nodes.ObjectTypeIndexer = function (node, parent) {
+ var _parent$properties2, _parent$callPropertie;
+
+ if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) {
+ return {
+ before: true
+ };
+ }
+};
+
+nodes.ObjectTypeInternalSlot = function (node, parent) {
+ var _parent$properties3, _parent$callPropertie2, _parent$indexers;
+
+ if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) {
+ return {
+ before: true
+ };
+ }
+};
+
+const list = {
+ VariableDeclaration(node) {
+ return node.declarations.map(decl => decl.init);
+ },
+
+ ArrayExpression(node) {
+ return node.elements;
+ },
+
+ ObjectExpression(node) {
+ return node.properties;
+ }
+
+};
+exports.list = list;
+[["Function", true], ["Class", true], ["Loop", true], ["LabeledStatement", true], ["SwitchStatement", true], ["TryStatement", true]].forEach(function ([type, amounts]) {
+ if (typeof amounts === "boolean") {
+ amounts = {
+ after: amounts,
+ before: amounts
+ };
+ }
+
+ [type].concat(FLIPPED_ALIAS_KEYS[type] || []).forEach(function (type) {
+ nodes[type] = function () {
+ return amounts;
+ };
+ });
+}); \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/printer.js b/node_modules/@babel/generator/lib/printer.js
new file mode 100644
index 0000000..0decd21
--- /dev/null
+++ b/node_modules/@babel/generator/lib/printer.js
@@ -0,0 +1,540 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _buffer = require("./buffer");
+
+var n = require("./node");
+
+var _t = require("@babel/types");
+
+var generatorFunctions = require("./generators");
+
+const {
+ isProgram,
+ isFile,
+ isEmptyStatement
+} = _t;
+const SCIENTIFIC_NOTATION = /e/i;
+const ZERO_DECIMAL_INTEGER = /\.0+$/;
+const NON_DECIMAL_LITERAL = /^0[box]/;
+const PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/;
+const {
+ needsParens,
+ needsWhitespaceAfter,
+ needsWhitespaceBefore
+} = n;
+
+class Printer {
+ constructor(format, map) {
+ this.inForStatementInitCounter = 0;
+ this._printStack = [];
+ this._indent = 0;
+ this._insideAux = false;
+ this._parenPushNewlineState = null;
+ this._noLineTerminator = false;
+ this._printAuxAfterOnNextUserNode = false;
+ this._printedComments = new WeakSet();
+ this._endsWithInteger = false;
+ this._endsWithWord = false;
+ this.format = format;
+ this._buf = new _buffer.default(map);
+ }
+
+ generate(ast) {
+ this.print(ast);
+
+ this._maybeAddAuxComment();
+
+ return this._buf.get();
+ }
+
+ indent() {
+ if (this.format.compact || this.format.concise) return;
+ this._indent++;
+ }
+
+ dedent() {
+ if (this.format.compact || this.format.concise) return;
+ this._indent--;
+ }
+
+ semicolon(force = false) {
+ this._maybeAddAuxComment();
+
+ this._append(";", !force);
+ }
+
+ rightBrace() {
+ if (this.format.minified) {
+ this._buf.removeLastSemicolon();
+ }
+
+ this.token("}");
+ }
+
+ space(force = false) {
+ if (this.format.compact) return;
+
+ if (force) {
+ this._space();
+ } else if (this._buf.hasContent()) {
+ const lastCp = this.getLastChar();
+
+ if (lastCp !== 32 && lastCp !== 10) {
+ this._space();
+ }
+ }
+ }
+
+ word(str) {
+ if (this._endsWithWord || this.endsWith(47) && str.charCodeAt(0) === 47) {
+ this._space();
+ }
+
+ this._maybeAddAuxComment();
+
+ this._append(str);
+
+ this._endsWithWord = true;
+ }
+
+ number(str) {
+ this.word(str);
+ this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str.charCodeAt(str.length - 1) !== 46;
+ }
+
+ token(str) {
+ const lastChar = this.getLastChar();
+ const strFirst = str.charCodeAt(0);
+
+ if (str === "--" && lastChar === 33 || strFirst === 43 && lastChar === 43 || strFirst === 45 && lastChar === 45 || strFirst === 46 && this._endsWithInteger) {
+ this._space();
+ }
+
+ this._maybeAddAuxComment();
+
+ this._append(str);
+ }
+
+ newline(i = 1) {
+ if (this.format.retainLines || this.format.compact) return;
+
+ if (this.format.concise) {
+ this.space();
+ return;
+ }
+
+ const charBeforeNewline = this.endsWithCharAndNewline();
+ if (charBeforeNewline === 10) return;
+
+ if (charBeforeNewline === 123 || charBeforeNewline === 58) {
+ i--;
+ }
+
+ if (i <= 0) return;
+
+ for (let j = 0; j < i; j++) {
+ this._newline();
+ }
+ }
+
+ endsWith(char) {
+ return this.getLastChar() === char;
+ }
+
+ getLastChar() {
+ return this._buf.getLastChar();
+ }
+
+ endsWithCharAndNewline() {
+ return this._buf.endsWithCharAndNewline();
+ }
+
+ removeTrailingNewline() {
+ this._buf.removeTrailingNewline();
+ }
+
+ exactSource(loc, cb) {
+ this._catchUp("start", loc);
+
+ this._buf.exactSource(loc, cb);
+ }
+
+ source(prop, loc) {
+ this._catchUp(prop, loc);
+
+ this._buf.source(prop, loc);
+ }
+
+ withSource(prop, loc, cb) {
+ this._catchUp(prop, loc);
+
+ this._buf.withSource(prop, loc, cb);
+ }
+
+ _space() {
+ this._append(" ", true);
+ }
+
+ _newline() {
+ this._append("\n", true);
+ }
+
+ _append(str, queue = false) {
+ this._maybeAddParen(str);
+
+ this._maybeIndent(str);
+
+ if (queue) this._buf.queue(str);else this._buf.append(str);
+ this._endsWithWord = false;
+ this._endsWithInteger = false;
+ }
+
+ _maybeIndent(str) {
+ if (this._indent && this.endsWith(10) && str.charCodeAt(0) !== 10) {
+ this._buf.queue(this._getIndent());
+ }
+ }
+
+ _maybeAddParen(str) {
+ const parenPushNewlineState = this._parenPushNewlineState;
+ if (!parenPushNewlineState) return;
+ let i;
+
+ for (i = 0; i < str.length && str[i] === " "; i++) continue;
+
+ if (i === str.length) {
+ return;
+ }
+
+ const cha = str[i];
+
+ if (cha !== "\n") {
+ if (cha !== "/" || i + 1 === str.length) {
+ this._parenPushNewlineState = null;
+ return;
+ }
+
+ const chaPost = str[i + 1];
+
+ if (chaPost === "*") {
+ if (PURE_ANNOTATION_RE.test(str.slice(i + 2, str.length - 2))) {
+ return;
+ }
+ } else if (chaPost !== "/") {
+ this._parenPushNewlineState = null;
+ return;
+ }
+ }
+
+ this.token("(");
+ this.indent();
+ parenPushNewlineState.printed = true;
+ }
+
+ _catchUp(prop, loc) {
+ if (!this.format.retainLines) return;
+ const pos = loc ? loc[prop] : null;
+
+ if ((pos == null ? void 0 : pos.line) != null) {
+ const count = pos.line - this._buf.getCurrentLine();
+
+ for (let i = 0; i < count; i++) {
+ this._newline();
+ }
+ }
+ }
+
+ _getIndent() {
+ return this.format.indent.style.repeat(this._indent);
+ }
+
+ startTerminatorless(isLabel = false) {
+ if (isLabel) {
+ this._noLineTerminator = true;
+ return null;
+ } else {
+ return this._parenPushNewlineState = {
+ printed: false
+ };
+ }
+ }
+
+ endTerminatorless(state) {
+ this._noLineTerminator = false;
+
+ if (state != null && state.printed) {
+ this.dedent();
+ this.newline();
+ this.token(")");
+ }
+ }
+
+ print(node, parent) {
+ if (!node) return;
+ const oldConcise = this.format.concise;
+
+ if (node._compact) {
+ this.format.concise = true;
+ }
+
+ const printMethod = this[node.type];
+
+ if (!printMethod) {
+ throw new ReferenceError(`unknown node of type ${JSON.stringify(node.type)} with constructor ${JSON.stringify(node == null ? void 0 : node.constructor.name)}`);
+ }
+
+ this._printStack.push(node);
+
+ const oldInAux = this._insideAux;
+ this._insideAux = !node.loc;
+
+ this._maybeAddAuxComment(this._insideAux && !oldInAux);
+
+ let shouldPrintParens = needsParens(node, parent, this._printStack);
+
+ if (this.format.retainFunctionParens && node.type === "FunctionExpression" && node.extra && node.extra.parenthesized) {
+ shouldPrintParens = true;
+ }
+
+ if (shouldPrintParens) this.token("(");
+
+ this._printLeadingComments(node);
+
+ const loc = isProgram(node) || isFile(node) ? null : node.loc;
+ this.withSource("start", loc, () => {
+ printMethod.call(this, node, parent);
+ });
+
+ this._printTrailingComments(node);
+
+ if (shouldPrintParens) this.token(")");
+
+ this._printStack.pop();
+
+ this.format.concise = oldConcise;
+ this._insideAux = oldInAux;
+ }
+
+ _maybeAddAuxComment(enteredPositionlessNode) {
+ if (enteredPositionlessNode) this._printAuxBeforeComment();
+ if (!this._insideAux) this._printAuxAfterComment();
+ }
+
+ _printAuxBeforeComment() {
+ if (this._printAuxAfterOnNextUserNode) return;
+ this._printAuxAfterOnNextUserNode = true;
+ const comment = this.format.auxiliaryCommentBefore;
+
+ if (comment) {
+ this._printComment({
+ type: "CommentBlock",
+ value: comment
+ });
+ }
+ }
+
+ _printAuxAfterComment() {
+ if (!this._printAuxAfterOnNextUserNode) return;
+ this._printAuxAfterOnNextUserNode = false;
+ const comment = this.format.auxiliaryCommentAfter;
+
+ if (comment) {
+ this._printComment({
+ type: "CommentBlock",
+ value: comment
+ });
+ }
+ }
+
+ getPossibleRaw(node) {
+ const extra = node.extra;
+
+ if (extra && extra.raw != null && extra.rawValue != null && node.value === extra.rawValue) {
+ return extra.raw;
+ }
+ }
+
+ printJoin(nodes, parent, opts = {}) {
+ if (!(nodes != null && nodes.length)) return;
+ if (opts.indent) this.indent();
+ const newlineOpts = {
+ addNewlines: opts.addNewlines
+ };
+
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ if (!node) continue;
+ if (opts.statement) this._printNewline(true, node, parent, newlineOpts);
+ this.print(node, parent);
+
+ if (opts.iterator) {
+ opts.iterator(node, i);
+ }
+
+ if (opts.separator && i < nodes.length - 1) {
+ opts.separator.call(this);
+ }
+
+ if (opts.statement) this._printNewline(false, node, parent, newlineOpts);
+ }
+
+ if (opts.indent) this.dedent();
+ }
+
+ printAndIndentOnComments(node, parent) {
+ const indent = node.leadingComments && node.leadingComments.length > 0;
+ if (indent) this.indent();
+ this.print(node, parent);
+ if (indent) this.dedent();
+ }
+
+ printBlock(parent) {
+ const node = parent.body;
+
+ if (!isEmptyStatement(node)) {
+ this.space();
+ }
+
+ this.print(node, parent);
+ }
+
+ _printTrailingComments(node) {
+ this._printComments(this._getComments(false, node));
+ }
+
+ _printLeadingComments(node) {
+ this._printComments(this._getComments(true, node), true);
+ }
+
+ printInnerComments(node, indent = true) {
+ var _node$innerComments;
+
+ if (!((_node$innerComments = node.innerComments) != null && _node$innerComments.length)) return;
+ if (indent) this.indent();
+
+ this._printComments(node.innerComments);
+
+ if (indent) this.dedent();
+ }
+
+ printSequence(nodes, parent, opts = {}) {
+ opts.statement = true;
+ return this.printJoin(nodes, parent, opts);
+ }
+
+ printList(items, parent, opts = {}) {
+ if (opts.separator == null) {
+ opts.separator = commaSeparator;
+ }
+
+ return this.printJoin(items, parent, opts);
+ }
+
+ _printNewline(leading, node, parent, opts) {
+ if (this.format.retainLines || this.format.compact) return;
+
+ if (this.format.concise) {
+ this.space();
+ return;
+ }
+
+ let lines = 0;
+
+ if (this._buf.hasContent()) {
+ if (!leading) lines++;
+ if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;
+ const needs = leading ? needsWhitespaceBefore : needsWhitespaceAfter;
+ if (needs(node, parent)) lines++;
+ }
+
+ this.newline(Math.min(2, lines));
+ }
+
+ _getComments(leading, node) {
+ return node && (leading ? node.leadingComments : node.trailingComments) || [];
+ }
+
+ _printComment(comment, skipNewLines) {
+ if (!this.format.shouldPrintComment(comment.value)) return;
+ if (comment.ignore) return;
+ if (this._printedComments.has(comment)) return;
+
+ this._printedComments.add(comment);
+
+ const isBlockComment = comment.type === "CommentBlock";
+ const printNewLines = isBlockComment && !skipNewLines && !this._noLineTerminator;
+ if (printNewLines && this._buf.hasContent()) this.newline(1);
+ const lastCharCode = this.getLastChar();
+
+ if (lastCharCode !== 91 && lastCharCode !== 123) {
+ this.space();
+ }
+
+ let val = !isBlockComment && !this._noLineTerminator ? `//${comment.value}\n` : `/*${comment.value}*/`;
+
+ if (isBlockComment && this.format.indent.adjustMultilineComment) {
+ var _comment$loc;
+
+ const offset = (_comment$loc = comment.loc) == null ? void 0 : _comment$loc.start.column;
+
+ if (offset) {
+ const newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g");
+ val = val.replace(newlineRegex, "\n");
+ }
+
+ const indentSize = Math.max(this._getIndent().length, this.format.retainLines ? 0 : this._buf.getCurrentColumn());
+ val = val.replace(/\n(?!$)/g, `\n${" ".repeat(indentSize)}`);
+ }
+
+ if (this.endsWith(47)) this._space();
+ this.withSource("start", comment.loc, () => {
+ this._append(val);
+ });
+ if (printNewLines) this.newline(1);
+ }
+
+ _printComments(comments, inlinePureAnnotation) {
+ if (!(comments != null && comments.length)) return;
+
+ if (inlinePureAnnotation && comments.length === 1 && PURE_ANNOTATION_RE.test(comments[0].value)) {
+ this._printComment(comments[0], this._buf.hasContent() && !this.endsWith(10));
+ } else {
+ for (const comment of comments) {
+ this._printComment(comment);
+ }
+ }
+ }
+
+ printAssertions(node) {
+ var _node$assertions;
+
+ if ((_node$assertions = node.assertions) != null && _node$assertions.length) {
+ this.space();
+ this.word("assert");
+ this.space();
+ this.token("{");
+ this.space();
+ this.printList(node.assertions, node);
+ this.space();
+ this.token("}");
+ }
+ }
+
+}
+
+Object.assign(Printer.prototype, generatorFunctions);
+{
+ Printer.prototype.Noop = function Noop() {};
+}
+var _default = Printer;
+exports.default = _default;
+
+function commaSeparator() {
+ this.token(",");
+ this.space();
+} \ No newline at end of file
diff --git a/node_modules/@babel/generator/lib/source-map.js b/node_modules/@babel/generator/lib/source-map.js
new file mode 100644
index 0000000..99da1de
--- /dev/null
+++ b/node_modules/@babel/generator/lib/source-map.js
@@ -0,0 +1,78 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _sourceMap = require("source-map");
+
+class SourceMap {
+ constructor(opts, code) {
+ this._cachedMap = void 0;
+ this._code = void 0;
+ this._opts = void 0;
+ this._rawMappings = void 0;
+ this._lastGenLine = void 0;
+ this._lastSourceLine = void 0;
+ this._lastSourceColumn = void 0;
+ this._cachedMap = null;
+ this._code = code;
+ this._opts = opts;
+ this._rawMappings = [];
+ }
+
+ get() {
+ if (!this._cachedMap) {
+ const map = this._cachedMap = new _sourceMap.SourceMapGenerator({
+ sourceRoot: this._opts.sourceRoot
+ });
+ const code = this._code;
+
+ if (typeof code === "string") {
+ map.setSourceContent(this._opts.sourceFileName.replace(/\\/g, "/"), code);
+ } else if (typeof code === "object") {
+ Object.keys(code).forEach(sourceFileName => {
+ map.setSourceContent(sourceFileName.replace(/\\/g, "/"), code[sourceFileName]);
+ });
+ }
+
+ this._rawMappings.forEach(mapping => map.addMapping(mapping), map);
+ }
+
+ return this._cachedMap.toJSON();
+ }
+
+ getRawMappings() {
+ return this._rawMappings.slice();
+ }
+
+ mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {
+ if (this._lastGenLine !== generatedLine && line === null) return;
+
+ if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {
+ return;
+ }
+
+ this._cachedMap = null;
+ this._lastGenLine = generatedLine;
+ this._lastSourceLine = line;
+ this._lastSourceColumn = column;
+
+ this._rawMappings.push({
+ name: identifierName || undefined,
+ generated: {
+ line: generatedLine,
+ column: generatedColumn
+ },
+ source: line == null ? undefined : (filename || this._opts.sourceFileName).replace(/\\/g, "/"),
+ original: line == null ? undefined : {
+ line: line,
+ column: column
+ }
+ });
+ }
+
+}
+
+exports.default = SourceMap; \ No newline at end of file
diff --git a/node_modules/@babel/generator/node_modules/source-map/CHANGELOG.md b/node_modules/@babel/generator/node_modules/source-map/CHANGELOG.md
new file mode 100644
index 0000000..3a8c066
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/CHANGELOG.md
@@ -0,0 +1,301 @@
+# Change Log
+
+## 0.5.6
+
+* Fix for regression when people were using numbers as names in source maps. See
+ #236.
+
+## 0.5.5
+
+* Fix "regression" of unsupported, implementation behavior that half the world
+ happens to have come to depend on. See #235.
+
+* Fix regression involving function hoisting in SpiderMonkey. See #233.
+
+## 0.5.4
+
+* Large performance improvements to source-map serialization. See #228 and #229.
+
+## 0.5.3
+
+* Do not include unnecessary distribution files. See
+ commit ef7006f8d1647e0a83fdc60f04f5a7ca54886f86.
+
+## 0.5.2
+
+* Include browser distributions of the library in package.json's `files`. See
+ issue #212.
+
+## 0.5.1
+
+* Fix latent bugs in IndexedSourceMapConsumer.prototype._parseMappings. See
+ ff05274becc9e6e1295ed60f3ea090d31d843379.
+
+## 0.5.0
+
+* Node 0.8 is no longer supported.
+
+* Use webpack instead of dryice for bundling.
+
+* Big speedups serializing source maps. See pull request #203.
+
+* Fix a bug with `SourceMapConsumer.prototype.sourceContentFor` and sources that
+ explicitly start with the source root. See issue #199.
+
+## 0.4.4
+
+* Fix an issue where using a `SourceMapGenerator` after having created a
+ `SourceMapConsumer` from it via `SourceMapConsumer.fromSourceMap` failed. See
+ issue #191.
+
+* Fix an issue with where `SourceMapGenerator` would mistakenly consider
+ different mappings as duplicates of each other and avoid generating them. See
+ issue #192.
+
+## 0.4.3
+
+* A very large number of performance improvements, particularly when parsing
+ source maps. Collectively about 75% of time shaved off of the source map
+ parsing benchmark!
+
+* Fix a bug in `SourceMapConsumer.prototype.allGeneratedPositionsFor` and fuzzy
+ searching in the presence of a column option. See issue #177.
+
+* Fix a bug with joining a source and its source root when the source is above
+ the root. See issue #182.
+
+* Add the `SourceMapConsumer.prototype.hasContentsOfAllSources` method to
+ determine when all sources' contents are inlined into the source map. See
+ issue #190.
+
+## 0.4.2
+
+* Add an `.npmignore` file so that the benchmarks aren't pulled down by
+ dependent projects. Issue #169.
+
+* Add an optional `column` argument to
+ `SourceMapConsumer.prototype.allGeneratedPositionsFor` and better handle lines
+ with no mappings. Issues #172 and #173.
+
+## 0.4.1
+
+* Fix accidentally defining a global variable. #170.
+
+## 0.4.0
+
+* The default direction for fuzzy searching was changed back to its original
+ direction. See #164.
+
+* There is now a `bias` option you can supply to `SourceMapConsumer` to control
+ the fuzzy searching direction. See #167.
+
+* About an 8% speed up in parsing source maps. See #159.
+
+* Added a benchmark for parsing and generating source maps.
+
+## 0.3.0
+
+* Change the default direction that searching for positions fuzzes when there is
+ not an exact match. See #154.
+
+* Support for environments using json2.js for JSON serialization. See #156.
+
+## 0.2.0
+
+* Support for consuming "indexed" source maps which do not have any remote
+ sections. See pull request #127. This introduces a minor backwards
+ incompatibility if you are monkey patching `SourceMapConsumer.prototype`
+ methods.
+
+## 0.1.43
+
+* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue
+ #148 for some discussion and issues #150, #151, and #152 for implementations.
+
+## 0.1.42
+
+* Fix an issue where `SourceNode`s from different versions of the source-map
+ library couldn't be used in conjunction with each other. See issue #142.
+
+## 0.1.41
+
+* Fix a bug with getting the source content of relative sources with a "./"
+ prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768).
+
+* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the
+ column span of each mapping.
+
+* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find
+ all generated positions associated with a given original source and line.
+
+## 0.1.40
+
+* Performance improvements for parsing source maps in SourceMapConsumer.
+
+## 0.1.39
+
+* Fix a bug where setting a source's contents to null before any source content
+ had been set before threw a TypeError. See issue #131.
+
+## 0.1.38
+
+* Fix a bug where finding relative paths from an empty path were creating
+ absolute paths. See issue #129.
+
+## 0.1.37
+
+* Fix a bug where if the source root was an empty string, relative source paths
+ would turn into absolute source paths. Issue #124.
+
+## 0.1.36
+
+* Allow the `names` mapping property to be an empty string. Issue #121.
+
+## 0.1.35
+
+* A third optional parameter was added to `SourceNode.fromStringWithSourceMap`
+ to specify a path that relative sources in the second parameter should be
+ relative to. Issue #105.
+
+* If no file property is given to a `SourceMapGenerator`, then the resulting
+ source map will no longer have a `null` file property. The property will
+ simply not exist. Issue #104.
+
+* Fixed a bug where consecutive newlines were ignored in `SourceNode`s.
+ Issue #116.
+
+## 0.1.34
+
+* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103.
+
+* Fix bug involving source contents and the
+ `SourceMapGenerator.prototype.applySourceMap`. Issue #100.
+
+## 0.1.33
+
+* Fix some edge cases surrounding path joining and URL resolution.
+
+* Add a third parameter for relative path to
+ `SourceMapGenerator.prototype.applySourceMap`.
+
+* Fix issues with mappings and EOLs.
+
+## 0.1.32
+
+* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns
+ (issue 92).
+
+* Fixed test runner to actually report number of failed tests as its process
+ exit code.
+
+* Fixed a typo when reporting bad mappings (issue 87).
+
+## 0.1.31
+
+* Delay parsing the mappings in SourceMapConsumer until queried for a source
+ location.
+
+* Support Sass source maps (which at the time of writing deviate from the spec
+ in small ways) in SourceMapConsumer.
+
+## 0.1.30
+
+* Do not join source root with a source, when the source is a data URI.
+
+* Extend the test runner to allow running single specific test files at a time.
+
+* Performance improvements in `SourceNode.prototype.walk` and
+ `SourceMapConsumer.prototype.eachMapping`.
+
+* Source map browser builds will now work inside Workers.
+
+* Better error messages when attempting to add an invalid mapping to a
+ `SourceMapGenerator`.
+
+## 0.1.29
+
+* Allow duplicate entries in the `names` and `sources` arrays of source maps
+ (usually from TypeScript) we are parsing. Fixes github issue 72.
+
+## 0.1.28
+
+* Skip duplicate mappings when creating source maps from SourceNode; github
+ issue 75.
+
+## 0.1.27
+
+* Don't throw an error when the `file` property is missing in SourceMapConsumer,
+ we don't use it anyway.
+
+## 0.1.26
+
+* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70.
+
+## 0.1.25
+
+* Make compatible with browserify
+
+## 0.1.24
+
+* Fix issue with absolute paths and `file://` URIs. See
+ https://bugzilla.mozilla.org/show_bug.cgi?id=885597
+
+## 0.1.23
+
+* Fix issue with absolute paths and sourcesContent, github issue 64.
+
+## 0.1.22
+
+* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21.
+
+## 0.1.21
+
+* Fixed handling of sources that start with a slash so that they are relative to
+ the source root's host.
+
+## 0.1.20
+
+* Fixed github issue #43: absolute URLs aren't joined with the source root
+ anymore.
+
+## 0.1.19
+
+* Using Travis CI to run tests.
+
+## 0.1.18
+
+* Fixed a bug in the handling of sourceRoot.
+
+## 0.1.17
+
+* Added SourceNode.fromStringWithSourceMap.
+
+## 0.1.16
+
+* Added missing documentation.
+
+* Fixed the generating of empty mappings in SourceNode.
+
+## 0.1.15
+
+* Added SourceMapGenerator.applySourceMap.
+
+## 0.1.14
+
+* The sourceRoot is now handled consistently.
+
+## 0.1.13
+
+* Added SourceMapGenerator.fromSourceMap.
+
+## 0.1.12
+
+* SourceNode now generates empty mappings too.
+
+## 0.1.11
+
+* Added name support to SourceNode.
+
+## 0.1.10
+
+* Added sourcesContent support to the customer and generator.
diff --git a/node_modules/@babel/generator/node_modules/source-map/LICENSE b/node_modules/@babel/generator/node_modules/source-map/LICENSE
new file mode 100644
index 0000000..ed1b7cf
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/LICENSE
@@ -0,0 +1,28 @@
+
+Copyright (c) 2009-2011, Mozilla Foundation and contributors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+* Neither the names of the Mozilla Foundation nor the names of project
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/node_modules/@babel/generator/node_modules/source-map/README.md b/node_modules/@babel/generator/node_modules/source-map/README.md
new file mode 100644
index 0000000..3281339
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/README.md
@@ -0,0 +1,729 @@
+# Source Map
+
+[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)
+
+[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map)
+
+This is a library to generate and consume the source map format
+[described here][format].
+
+[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
+
+## Use with Node
+
+ $ npm install source-map
+
+## Use on the Web
+
+ <script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script>
+
+--------------------------------------------------------------------------------
+
+<!-- `npm run toc` to regenerate the Table of Contents -->
+
+<!-- START doctoc generated TOC please keep comment here to allow auto update -->
+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
+## Table of Contents
+
+- [Examples](#examples)
+ - [Consuming a source map](#consuming-a-source-map)
+ - [Generating a source map](#generating-a-source-map)
+ - [With SourceNode (high level API)](#with-sourcenode-high-level-api)
+ - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api)
+- [API](#api)
+ - [SourceMapConsumer](#sourcemapconsumer)
+ - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap)
+ - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans)
+ - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition)
+ - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition)
+ - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition)
+ - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources)
+ - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing)
+ - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order)
+ - [SourceMapGenerator](#sourcemapgenerator)
+ - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap)
+ - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer)
+ - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping)
+ - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent)
+ - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath)
+ - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring)
+ - [SourceNode](#sourcenode)
+ - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name)
+ - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath)
+ - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk)
+ - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk)
+ - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent)
+ - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn)
+ - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn)
+ - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep)
+ - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement)
+ - [SourceNode.prototype.toString()](#sourcenodeprototypetostring)
+ - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap)
+
+<!-- END doctoc generated TOC please keep comment here to allow auto update -->
+
+## Examples
+
+### Consuming a source map
+
+```js
+var rawSourceMap = {
+ version: 3,
+ file: 'min.js',
+ names: ['bar', 'baz', 'n'],
+ sources: ['one.js', 'two.js'],
+ sourceRoot: 'http://example.com/www/js/',
+ mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
+};
+
+var smc = new SourceMapConsumer(rawSourceMap);
+
+console.log(smc.sources);
+// [ 'http://example.com/www/js/one.js',
+// 'http://example.com/www/js/two.js' ]
+
+console.log(smc.originalPositionFor({
+ line: 2,
+ column: 28
+}));
+// { source: 'http://example.com/www/js/two.js',
+// line: 2,
+// column: 10,
+// name: 'n' }
+
+console.log(smc.generatedPositionFor({
+ source: 'http://example.com/www/js/two.js',
+ line: 2,
+ column: 10
+}));
+// { line: 2, column: 28 }
+
+smc.eachMapping(function (m) {
+ // ...
+});
+```
+
+### Generating a source map
+
+In depth guide:
+[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)
+
+#### With SourceNode (high level API)
+
+```js
+function compile(ast) {
+ switch (ast.type) {
+ case 'BinaryExpression':
+ return new SourceNode(
+ ast.location.line,
+ ast.location.column,
+ ast.location.source,
+ [compile(ast.left), " + ", compile(ast.right)]
+ );
+ case 'Literal':
+ return new SourceNode(
+ ast.location.line,
+ ast.location.column,
+ ast.location.source,
+ String(ast.value)
+ );
+ // ...
+ default:
+ throw new Error("Bad AST");
+ }
+}
+
+var ast = parse("40 + 2", "add.js");
+console.log(compile(ast).toStringWithSourceMap({
+ file: 'add.js'
+}));
+// { code: '40 + 2',
+// map: [object SourceMapGenerator] }
+```
+
+#### With SourceMapGenerator (low level API)
+
+```js
+var map = new SourceMapGenerator({
+ file: "source-mapped.js"
+});
+
+map.addMapping({
+ generated: {
+ line: 10,
+ column: 35
+ },
+ source: "foo.js",
+ original: {
+ line: 33,
+ column: 2
+ },
+ name: "christopher"
+});
+
+console.log(map.toString());
+// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}'
+```
+
+## API
+
+Get a reference to the module:
+
+```js
+// Node.js
+var sourceMap = require('source-map');
+
+// Browser builds
+var sourceMap = window.sourceMap;
+
+// Inside Firefox
+const sourceMap = require("devtools/toolkit/sourcemap/source-map.js");
+```
+
+### SourceMapConsumer
+
+A SourceMapConsumer instance represents a parsed source map which we can query
+for information about the original file positions by giving it a file position
+in the generated source.
+
+#### new SourceMapConsumer(rawSourceMap)
+
+The only parameter is the raw source map (either as a string which can be
+`JSON.parse`'d, or an object). According to the spec, source maps have the
+following attributes:
+
+* `version`: Which version of the source map spec this map is following.
+
+* `sources`: An array of URLs to the original source files.
+
+* `names`: An array of identifiers which can be referenced by individual
+ mappings.
+
+* `sourceRoot`: Optional. The URL root from which all sources are relative.
+
+* `sourcesContent`: Optional. An array of contents of the original source files.
+
+* `mappings`: A string of base64 VLQs which contain the actual mappings.
+
+* `file`: Optional. The generated filename this source map is associated with.
+
+```js
+var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData);
+```
+
+#### SourceMapConsumer.prototype.computeColumnSpans()
+
+Compute the last column for each generated mapping. The last column is
+inclusive.
+
+```js
+// Before:
+consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
+// [ { line: 2,
+// column: 1 },
+// { line: 2,
+// column: 10 },
+// { line: 2,
+// column: 20 } ]
+
+consumer.computeColumnSpans();
+
+// After:
+consumer.allGeneratedPositionsFor({ line: 2, source: "foo.coffee" })
+// [ { line: 2,
+// column: 1,
+// lastColumn: 9 },
+// { line: 2,
+// column: 10,
+// lastColumn: 19 },
+// { line: 2,
+// column: 20,
+// lastColumn: Infinity } ]
+
+```
+
+#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
+
+Returns the original source, line, and column information for the generated
+source's line and column positions provided. The only argument is an object with
+the following properties:
+
+* `line`: The line number in the generated source.
+
+* `column`: The column number in the generated source.
+
+* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or
+ `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest
+ element that is smaller than or greater than the one we are searching for,
+ respectively, if the exact element cannot be found. Defaults to
+ `SourceMapConsumer.GREATEST_LOWER_BOUND`.
+
+and an object is returned with the following properties:
+
+* `source`: The original source file, or null if this information is not
+ available.
+
+* `line`: The line number in the original source, or null if this information is
+ not available.
+
+* `column`: The column number in the original source, or null if this
+ information is not available.
+
+* `name`: The original identifier, or null if this information is not available.
+
+```js
+consumer.originalPositionFor({ line: 2, column: 10 })
+// { source: 'foo.coffee',
+// line: 2,
+// column: 2,
+// name: null }
+
+consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 })
+// { source: null,
+// line: null,
+// column: null,
+// name: null }
+```
+
+#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
+
+Returns the generated line and column information for the original source,
+line, and column positions provided. The only argument is an object with
+the following properties:
+
+* `source`: The filename of the original source.
+
+* `line`: The line number in the original source.
+
+* `column`: The column number in the original source.
+
+and an object is returned with the following properties:
+
+* `line`: The line number in the generated source, or null.
+
+* `column`: The column number in the generated source, or null.
+
+```js
+consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 })
+// { line: 1,
+// column: 56 }
+```
+
+#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
+
+Returns all generated line and column information for the original source, line,
+and column provided. If no column is provided, returns all mappings
+corresponding to a either the line we are searching for or the next closest line
+that has any mappings. Otherwise, returns all mappings corresponding to the
+given line and either the column we are searching for or the next closest column
+that has any offsets.
+
+The only argument is an object with the following properties:
+
+* `source`: The filename of the original source.
+
+* `line`: The line number in the original source.
+
+* `column`: Optional. The column number in the original source.
+
+and an array of objects is returned, each with the following properties:
+
+* `line`: The line number in the generated source, or null.
+
+* `column`: The column number in the generated source, or null.
+
+```js
+consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" })
+// [ { line: 2,
+// column: 1 },
+// { line: 2,
+// column: 10 },
+// { line: 2,
+// column: 20 } ]
+```
+
+#### SourceMapConsumer.prototype.hasContentsOfAllSources()
+
+Return true if we have the embedded source content for every source listed in
+the source map, false otherwise.
+
+In other words, if this method returns `true`, then
+`consumer.sourceContentFor(s)` will succeed for every source `s` in
+`consumer.sources`.
+
+```js
+// ...
+if (consumer.hasContentsOfAllSources()) {
+ consumerReadyCallback(consumer);
+} else {
+ fetchSources(consumer, consumerReadyCallback);
+}
+// ...
+```
+
+#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
+
+Returns the original source content for the source provided. The only
+argument is the URL of the original source file.
+
+If the source content for the given source is not found, then an error is
+thrown. Optionally, pass `true` as the second param to have `null` returned
+instead.
+
+```js
+consumer.sources
+// [ "my-cool-lib.clj" ]
+
+consumer.sourceContentFor("my-cool-lib.clj")
+// "..."
+
+consumer.sourceContentFor("this is not in the source map");
+// Error: "this is not in the source map" is not in the source map
+
+consumer.sourceContentFor("this is not in the source map", true);
+// null
+```
+
+#### SourceMapConsumer.prototype.eachMapping(callback, context, order)
+
+Iterate over each mapping between an original source/line/column and a
+generated line/column in this source map.
+
+* `callback`: The function that is called with each mapping. Mappings have the
+ form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,
+ name }`
+
+* `context`: Optional. If specified, this object will be the value of `this`
+ every time that `callback` is called.
+
+* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or
+ `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over
+ the mappings sorted by the generated file's line/column order or the
+ original's source/line/column order, respectively. Defaults to
+ `SourceMapConsumer.GENERATED_ORDER`.
+
+```js
+consumer.eachMapping(function (m) { console.log(m); })
+// ...
+// { source: 'illmatic.js',
+// generatedLine: 1,
+// generatedColumn: 0,
+// originalLine: 1,
+// originalColumn: 0,
+// name: null }
+// { source: 'illmatic.js',
+// generatedLine: 2,
+// generatedColumn: 0,
+// originalLine: 2,
+// originalColumn: 0,
+// name: null }
+// ...
+```
+### SourceMapGenerator
+
+An instance of the SourceMapGenerator represents a source map which is being
+built incrementally.
+
+#### new SourceMapGenerator([startOfSourceMap])
+
+You may pass an object with the following properties:
+
+* `file`: The filename of the generated source that this source map is
+ associated with.
+
+* `sourceRoot`: A root for all relative URLs in this source map.
+
+* `skipValidation`: Optional. When `true`, disables validation of mappings as
+ they are added. This can improve performance but should be used with
+ discretion, as a last resort. Even then, one should avoid using this flag when
+ running tests, if possible.
+
+```js
+var generator = new sourceMap.SourceMapGenerator({
+ file: "my-generated-javascript-file.js",
+ sourceRoot: "http://example.com/app/js/"
+});
+```
+
+#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)
+
+Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance.
+
+* `sourceMapConsumer` The SourceMap.
+
+```js
+var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer);
+```
+
+#### SourceMapGenerator.prototype.addMapping(mapping)
+
+Add a single mapping from original source line and column to the generated
+source's line and column for this source map being created. The mapping object
+should have the following properties:
+
+* `generated`: An object with the generated line and column positions.
+
+* `original`: An object with the original line and column positions.
+
+* `source`: The original source file (relative to the sourceRoot).
+
+* `name`: An optional original token name for this mapping.
+
+```js
+generator.addMapping({
+ source: "module-one.scm",
+ original: { line: 128, column: 0 },
+ generated: { line: 3, column: 456 }
+})
+```
+
+#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
+
+Set the source content for an original source file.
+
+* `sourceFile` the URL of the original source file.
+
+* `sourceContent` the content of the source file.
+
+```js
+generator.setSourceContent("module-one.scm",
+ fs.readFileSync("path/to/module-one.scm"))
+```
+
+#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
+
+Applies a SourceMap for a source file to the SourceMap.
+Each mapping to the supplied source file is rewritten using the
+supplied SourceMap. Note: The resolution for the resulting mappings
+is the minimum of this map and the supplied map.
+
+* `sourceMapConsumer`: The SourceMap to be applied.
+
+* `sourceFile`: Optional. The filename of the source file.
+ If omitted, sourceMapConsumer.file will be used, if it exists.
+ Otherwise an error will be thrown.
+
+* `sourceMapPath`: Optional. The dirname of the path to the SourceMap
+ to be applied. If relative, it is relative to the SourceMap.
+
+ This parameter is needed when the two SourceMaps aren't in the same
+ directory, and the SourceMap to be applied contains relative source
+ paths. If so, those relative source paths need to be rewritten
+ relative to the SourceMap.
+
+ If omitted, it is assumed that both SourceMaps are in the same directory,
+ thus not needing any rewriting. (Supplying `'.'` has the same effect.)
+
+#### SourceMapGenerator.prototype.toString()
+
+Renders the source map being generated to a string.
+
+```js
+generator.toString()
+// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}'
+```
+
+### SourceNode
+
+SourceNodes provide a way to abstract over interpolating and/or concatenating
+snippets of generated JavaScript source code, while maintaining the line and
+column information associated between those snippets and the original source
+code. This is useful as the final intermediate representation a compiler might
+use before outputting the generated JS and source map.
+
+#### new SourceNode([line, column, source[, chunk[, name]]])
+
+* `line`: The original line number associated with this source node, or null if
+ it isn't associated with an original line.
+
+* `column`: The original column number associated with this source node, or null
+ if it isn't associated with an original column.
+
+* `source`: The original source's filename; null if no filename is provided.
+
+* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see
+ below.
+
+* `name`: Optional. The original identifier.
+
+```js
+var node = new SourceNode(1, 2, "a.cpp", [
+ new SourceNode(3, 4, "b.cpp", "extern int status;\n"),
+ new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"),
+ new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"),
+]);
+```
+
+#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])
+
+Creates a SourceNode from generated code and a SourceMapConsumer.
+
+* `code`: The generated code
+
+* `sourceMapConsumer` The SourceMap for the generated code
+
+* `relativePath` The optional path that relative sources in `sourceMapConsumer`
+ should be relative to.
+
+```js
+var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map", "utf8"));
+var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"),
+ consumer);
+```
+
+#### SourceNode.prototype.add(chunk)
+
+Add a chunk of generated JS to this source node.
+
+* `chunk`: A string snippet of generated JS code, another instance of
+ `SourceNode`, or an array where each member is one of those things.
+
+```js
+node.add(" + ");
+node.add(otherNode);
+node.add([leftHandOperandNode, " + ", rightHandOperandNode]);
+```
+
+#### SourceNode.prototype.prepend(chunk)
+
+Prepend a chunk of generated JS to this source node.
+
+* `chunk`: A string snippet of generated JS code, another instance of
+ `SourceNode`, or an array where each member is one of those things.
+
+```js
+node.prepend("/** Build Id: f783haef86324gf **/\n\n");
+```
+
+#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)
+
+Set the source content for a source file. This will be added to the
+`SourceMap` in the `sourcesContent` field.
+
+* `sourceFile`: The filename of the source file
+
+* `sourceContent`: The content of the source file
+
+```js
+node.setSourceContent("module-one.scm",
+ fs.readFileSync("path/to/module-one.scm"))
+```
+
+#### SourceNode.prototype.walk(fn)
+
+Walk over the tree of JS snippets in this node and its children. The walking
+function is called once for each snippet of JS and is passed that snippet and
+the its original associated source's line/column location.
+
+* `fn`: The traversal function.
+
+```js
+var node = new SourceNode(1, 2, "a.js", [
+ new SourceNode(3, 4, "b.js", "uno"),
+ "dos",
+ [
+ "tres",
+ new SourceNode(5, 6, "c.js", "quatro")
+ ]
+]);
+
+node.walk(function (code, loc) { console.log("WALK:", code, loc); })
+// WALK: uno { source: 'b.js', line: 3, column: 4, name: null }
+// WALK: dos { source: 'a.js', line: 1, column: 2, name: null }
+// WALK: tres { source: 'a.js', line: 1, column: 2, name: null }
+// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null }
+```
+
+#### SourceNode.prototype.walkSourceContents(fn)
+
+Walk over the tree of SourceNodes. The walking function is called for each
+source file content and is passed the filename and source content.
+
+* `fn`: The traversal function.
+
+```js
+var a = new SourceNode(1, 2, "a.js", "generated from a");
+a.setSourceContent("a.js", "original a");
+var b = new SourceNode(1, 2, "b.js", "generated from b");
+b.setSourceContent("b.js", "original b");
+var c = new SourceNode(1, 2, "c.js", "generated from c");
+c.setSourceContent("c.js", "original c");
+
+var node = new SourceNode(null, null, null, [a, b, c]);
+node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); })
+// WALK: a.js : original a
+// WALK: b.js : original b
+// WALK: c.js : original c
+```
+
+#### SourceNode.prototype.join(sep)
+
+Like `Array.prototype.join` except for SourceNodes. Inserts the separator
+between each of this source node's children.
+
+* `sep`: The separator.
+
+```js
+var lhs = new SourceNode(1, 2, "a.rs", "my_copy");
+var operand = new SourceNode(3, 4, "a.rs", "=");
+var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()");
+
+var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]);
+var joinedNode = node.join(" ");
+```
+
+#### SourceNode.prototype.replaceRight(pattern, replacement)
+
+Call `String.prototype.replace` on the very right-most source snippet. Useful
+for trimming white space from the end of a source node, etc.
+
+* `pattern`: The pattern to replace.
+
+* `replacement`: The thing to replace the pattern with.
+
+```js
+// Trim trailing white space.
+node.replaceRight(/\s*$/, "");
+```
+
+#### SourceNode.prototype.toString()
+
+Return the string representation of this source node. Walks over the tree and
+concatenates all the various snippets together to one string.
+
+```js
+var node = new SourceNode(1, 2, "a.js", [
+ new SourceNode(3, 4, "b.js", "uno"),
+ "dos",
+ [
+ "tres",
+ new SourceNode(5, 6, "c.js", "quatro")
+ ]
+]);
+
+node.toString()
+// 'unodostresquatro'
+```
+
+#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])
+
+Returns the string representation of this tree of source nodes, plus a
+SourceMapGenerator which contains all the mappings between the generated and
+original sources.
+
+The arguments are the same as those to `new SourceMapGenerator`.
+
+```js
+var node = new SourceNode(1, 2, "a.js", [
+ new SourceNode(3, 4, "b.js", "uno"),
+ "dos",
+ [
+ "tres",
+ new SourceNode(5, 6, "c.js", "quatro")
+ ]
+]);
+
+node.toStringWithSourceMap({ file: "my-output-file.js" })
+// { code: 'unodostresquatro',
+// map: [object SourceMapGenerator] }
+```
diff --git a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js
new file mode 100644
index 0000000..b5ab638
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.debug.js
@@ -0,0 +1,3091 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["sourceMap"] = factory();
+ else
+ root["sourceMap"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+/******/
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /*
+ * Copyright 2009-2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE.txt or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+ exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
+ exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;
+ exports.SourceNode = __webpack_require__(10).SourceNode;
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var base64VLQ = __webpack_require__(2);
+ var util = __webpack_require__(4);
+ var ArraySet = __webpack_require__(5).ArraySet;
+ var MappingList = __webpack_require__(6).MappingList;
+
+ /**
+ * An instance of the SourceMapGenerator represents a source map which is
+ * being built incrementally. You may pass an object with the following
+ * properties:
+ *
+ * - file: The filename of the generated source.
+ * - sourceRoot: A root for all relative URLs in this source map.
+ */
+ function SourceMapGenerator(aArgs) {
+ if (!aArgs) {
+ aArgs = {};
+ }
+ this._file = util.getArg(aArgs, 'file', null);
+ this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
+ this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+ this._mappings = new MappingList();
+ this._sourcesContents = null;
+ }
+
+ SourceMapGenerator.prototype._version = 3;
+
+ /**
+ * Creates a new SourceMapGenerator based on a SourceMapConsumer
+ *
+ * @param aSourceMapConsumer The SourceMap.
+ */
+ SourceMapGenerator.fromSourceMap =
+ function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
+ var generator = new SourceMapGenerator({
+ file: aSourceMapConsumer.file,
+ sourceRoot: sourceRoot
+ });
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ var newMapping = {
+ generated: {
+ line: mapping.generatedLine,
+ column: mapping.generatedColumn
+ }
+ };
+
+ if (mapping.source != null) {
+ newMapping.source = mapping.source;
+ if (sourceRoot != null) {
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
+ }
+
+ newMapping.original = {
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ };
+
+ if (mapping.name != null) {
+ newMapping.name = mapping.name;
+ }
+ }
+
+ generator.addMapping(newMapping);
+ });
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ generator.setSourceContent(sourceFile, content);
+ }
+ });
+ return generator;
+ };
+
+ /**
+ * Add a single mapping from original source line and column to the generated
+ * source's line and column for this source map being created. The mapping
+ * object should have the following properties:
+ *
+ * - generated: An object with the generated line and column positions.
+ * - original: An object with the original line and column positions.
+ * - source: The original source file (relative to the sourceRoot).
+ * - name: An optional original token name for this mapping.
+ */
+ SourceMapGenerator.prototype.addMapping =
+ function SourceMapGenerator_addMapping(aArgs) {
+ var generated = util.getArg(aArgs, 'generated');
+ var original = util.getArg(aArgs, 'original', null);
+ var source = util.getArg(aArgs, 'source', null);
+ var name = util.getArg(aArgs, 'name', null);
+
+ if (!this._skipValidation) {
+ this._validateMapping(generated, original, source, name);
+ }
+
+ if (source != null) {
+ source = String(source);
+ if (!this._sources.has(source)) {
+ this._sources.add(source);
+ }
+ }
+
+ if (name != null) {
+ name = String(name);
+ if (!this._names.has(name)) {
+ this._names.add(name);
+ }
+ }
+
+ this._mappings.add({
+ generatedLine: generated.line,
+ generatedColumn: generated.column,
+ originalLine: original != null && original.line,
+ originalColumn: original != null && original.column,
+ source: source,
+ name: name
+ });
+ };
+
+ /**
+ * Set the source content for a source file.
+ */
+ SourceMapGenerator.prototype.setSourceContent =
+ function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
+ var source = aSourceFile;
+ if (this._sourceRoot != null) {
+ source = util.relative(this._sourceRoot, source);
+ }
+
+ if (aSourceContent != null) {
+ // Add the source content to the _sourcesContents map.
+ // Create a new _sourcesContents map if the property is null.
+ if (!this._sourcesContents) {
+ this._sourcesContents = Object.create(null);
+ }
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
+ } else if (this._sourcesContents) {
+ // Remove the source file from the _sourcesContents map.
+ // If the _sourcesContents map is empty, set the property to null.
+ delete this._sourcesContents[util.toSetString(source)];
+ if (Object.keys(this._sourcesContents).length === 0) {
+ this._sourcesContents = null;
+ }
+ }
+ };
+
+ /**
+ * Applies the mappings of a sub-source-map for a specific source file to the
+ * source map being generated. Each mapping to the supplied source file is
+ * rewritten using the supplied source map. Note: The resolution for the
+ * resulting mappings is the minimium of this map and the supplied map.
+ *
+ * @param aSourceMapConsumer The source map to be applied.
+ * @param aSourceFile Optional. The filename of the source file.
+ * If omitted, SourceMapConsumer's file property will be used.
+ * @param aSourceMapPath Optional. The dirname of the path to the source map
+ * to be applied. If relative, it is relative to the SourceMapConsumer.
+ * This parameter is needed when the two source maps aren't in the same
+ * directory, and the source map to be applied contains relative source
+ * paths. If so, those relative source paths need to be rewritten
+ * relative to the SourceMapGenerator.
+ */
+ SourceMapGenerator.prototype.applySourceMap =
+ function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
+ var sourceFile = aSourceFile;
+ // If aSourceFile is omitted, we will use the file property of the SourceMap
+ if (aSourceFile == null) {
+ if (aSourceMapConsumer.file == null) {
+ throw new Error(
+ 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
+ 'or the source map\'s "file" property. Both were omitted.'
+ );
+ }
+ sourceFile = aSourceMapConsumer.file;
+ }
+ var sourceRoot = this._sourceRoot;
+ // Make "sourceFile" relative if an absolute Url is passed.
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ // Applying the SourceMap can add and remove items from the sources and
+ // the names array.
+ var newSources = new ArraySet();
+ var newNames = new ArraySet();
+
+ // Find mappings for the "sourceFile"
+ this._mappings.unsortedForEach(function (mapping) {
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
+ // Check if it can be mapped by the source map, then update the mapping.
+ var original = aSourceMapConsumer.originalPositionFor({
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ });
+ if (original.source != null) {
+ // Copy mapping
+ mapping.source = original.source;
+ if (aSourceMapPath != null) {
+ mapping.source = util.join(aSourceMapPath, mapping.source)
+ }
+ if (sourceRoot != null) {
+ mapping.source = util.relative(sourceRoot, mapping.source);
+ }
+ mapping.originalLine = original.line;
+ mapping.originalColumn = original.column;
+ if (original.name != null) {
+ mapping.name = original.name;
+ }
+ }
+ }
+
+ var source = mapping.source;
+ if (source != null && !newSources.has(source)) {
+ newSources.add(source);
+ }
+
+ var name = mapping.name;
+ if (name != null && !newNames.has(name)) {
+ newNames.add(name);
+ }
+
+ }, this);
+ this._sources = newSources;
+ this._names = newNames;
+
+ // Copy sourcesContents of applied map.
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aSourceMapPath != null) {
+ sourceFile = util.join(aSourceMapPath, sourceFile);
+ }
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ this.setSourceContent(sourceFile, content);
+ }
+ }, this);
+ };
+
+ /**
+ * A mapping can have one of the three levels of data:
+ *
+ * 1. Just the generated position.
+ * 2. The Generated position, original position, and original source.
+ * 3. Generated and original position, original source, as well as a name
+ * token.
+ *
+ * To maintain consistency, we validate that any new mapping being added falls
+ * in to one of these categories.
+ */
+ SourceMapGenerator.prototype._validateMapping =
+ function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
+ aName) {
+ // When aOriginal is truthy but has empty values for .line and .column,
+ // it is most likely a programmer error. In this case we throw a very
+ // specific error message to try to guide them the right way.
+ // For example: https://github.com/Polymer/polymer-bundler/pull/519
+ if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
+ throw new Error(
+ 'original.line and original.column are not numbers -- you probably meant to omit ' +
+ 'the original mapping entirely and only map the generated position. If so, pass ' +
+ 'null for the original mapping instead of an object with empty or null values.'
+ );
+ }
+
+ if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && !aOriginal && !aSource && !aName) {
+ // Case 1.
+ return;
+ }
+ else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aOriginal && 'line' in aOriginal && 'column' in aOriginal
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && aOriginal.line > 0 && aOriginal.column >= 0
+ && aSource) {
+ // Cases 2 and 3.
+ return;
+ }
+ else {
+ throw new Error('Invalid mapping: ' + JSON.stringify({
+ generated: aGenerated,
+ source: aSource,
+ original: aOriginal,
+ name: aName
+ }));
+ }
+ };
+
+ /**
+ * Serialize the accumulated mappings in to the stream of base 64 VLQs
+ * specified by the source map format.
+ */
+ SourceMapGenerator.prototype._serializeMappings =
+ function SourceMapGenerator_serializeMappings() {
+ var previousGeneratedColumn = 0;
+ var previousGeneratedLine = 1;
+ var previousOriginalColumn = 0;
+ var previousOriginalLine = 0;
+ var previousName = 0;
+ var previousSource = 0;
+ var result = '';
+ var next;
+ var mapping;
+ var nameIdx;
+ var sourceIdx;
+
+ var mappings = this._mappings.toArray();
+ for (var i = 0, len = mappings.length; i < len; i++) {
+ mapping = mappings[i];
+ next = ''
+
+ if (mapping.generatedLine !== previousGeneratedLine) {
+ previousGeneratedColumn = 0;
+ while (mapping.generatedLine !== previousGeneratedLine) {
+ next += ';';
+ previousGeneratedLine++;
+ }
+ }
+ else {
+ if (i > 0) {
+ if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
+ continue;
+ }
+ next += ',';
+ }
+ }
+
+ next += base64VLQ.encode(mapping.generatedColumn
+ - previousGeneratedColumn);
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (mapping.source != null) {
+ sourceIdx = this._sources.indexOf(mapping.source);
+ next += base64VLQ.encode(sourceIdx - previousSource);
+ previousSource = sourceIdx;
+
+ // lines are stored 0-based in SourceMap spec version 3
+ next += base64VLQ.encode(mapping.originalLine - 1
+ - previousOriginalLine);
+ previousOriginalLine = mapping.originalLine - 1;
+
+ next += base64VLQ.encode(mapping.originalColumn
+ - previousOriginalColumn);
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (mapping.name != null) {
+ nameIdx = this._names.indexOf(mapping.name);
+ next += base64VLQ.encode(nameIdx - previousName);
+ previousName = nameIdx;
+ }
+ }
+
+ result += next;
+ }
+
+ return result;
+ };
+
+ SourceMapGenerator.prototype._generateSourcesContent =
+ function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
+ return aSources.map(function (source) {
+ if (!this._sourcesContents) {
+ return null;
+ }
+ if (aSourceRoot != null) {
+ source = util.relative(aSourceRoot, source);
+ }
+ var key = util.toSetString(source);
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
+ ? this._sourcesContents[key]
+ : null;
+ }, this);
+ };
+
+ /**
+ * Externalize the source map.
+ */
+ SourceMapGenerator.prototype.toJSON =
+ function SourceMapGenerator_toJSON() {
+ var map = {
+ version: this._version,
+ sources: this._sources.toArray(),
+ names: this._names.toArray(),
+ mappings: this._serializeMappings()
+ };
+ if (this._file != null) {
+ map.file = this._file;
+ }
+ if (this._sourceRoot != null) {
+ map.sourceRoot = this._sourceRoot;
+ }
+ if (this._sourcesContents) {
+ map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
+ }
+
+ return map;
+ };
+
+ /**
+ * Render the source map being generated to a string.
+ */
+ SourceMapGenerator.prototype.toString =
+ function SourceMapGenerator_toString() {
+ return JSON.stringify(this.toJSON());
+ };
+
+ exports.SourceMapGenerator = SourceMapGenerator;
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ *
+ * Based on the Base 64 VLQ implementation in Closure Compiler:
+ * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
+ *
+ * Copyright 2011 The Closure Compiler Authors. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ var base64 = __webpack_require__(3);
+
+ // A single base 64 digit can contain 6 bits of data. For the base 64 variable
+ // length quantities we use in the source map spec, the first bit is the sign,
+ // the next four bits are the actual value, and the 6th bit is the
+ // continuation bit. The continuation bit tells us whether there are more
+ // digits in this value following this digit.
+ //
+ // Continuation
+ // | Sign
+ // | |
+ // V V
+ // 101011
+
+ var VLQ_BASE_SHIFT = 5;
+
+ // binary: 100000
+ var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
+
+ // binary: 011111
+ var VLQ_BASE_MASK = VLQ_BASE - 1;
+
+ // binary: 100000
+ var VLQ_CONTINUATION_BIT = VLQ_BASE;
+
+ /**
+ * Converts from a two-complement value to a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
+ * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
+ */
+ function toVLQSigned(aValue) {
+ return aValue < 0
+ ? ((-aValue) << 1) + 1
+ : (aValue << 1) + 0;
+ }
+
+ /**
+ * Converts to a two-complement value from a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
+ * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
+ */
+ function fromVLQSigned(aValue) {
+ var isNegative = (aValue & 1) === 1;
+ var shifted = aValue >> 1;
+ return isNegative
+ ? -shifted
+ : shifted;
+ }
+
+ /**
+ * Returns the base 64 VLQ encoded value.
+ */
+ exports.encode = function base64VLQ_encode(aValue) {
+ var encoded = "";
+ var digit;
+
+ var vlq = toVLQSigned(aValue);
+
+ do {
+ digit = vlq & VLQ_BASE_MASK;
+ vlq >>>= VLQ_BASE_SHIFT;
+ if (vlq > 0) {
+ // There are still more digits in this value, so we must make sure the
+ // continuation bit is marked.
+ digit |= VLQ_CONTINUATION_BIT;
+ }
+ encoded += base64.encode(digit);
+ } while (vlq > 0);
+
+ return encoded;
+ };
+
+ /**
+ * Decodes the next base 64 VLQ value from the given string and returns the
+ * value and the rest of the string via the out parameter.
+ */
+ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
+ var strLen = aStr.length;
+ var result = 0;
+ var shift = 0;
+ var continuation, digit;
+
+ do {
+ if (aIndex >= strLen) {
+ throw new Error("Expected more digits in base 64 VLQ value.");
+ }
+
+ digit = base64.decode(aStr.charCodeAt(aIndex++));
+ if (digit === -1) {
+ throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
+ }
+
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
+ digit &= VLQ_BASE_MASK;
+ result = result + (digit << shift);
+ shift += VLQ_BASE_SHIFT;
+ } while (continuation);
+
+ aOutParam.value = fromVLQSigned(result);
+ aOutParam.rest = aIndex;
+ };
+
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+
+ /**
+ * Encode an integer in the range of 0 to 63 to a single base 64 digit.
+ */
+ exports.encode = function (number) {
+ if (0 <= number && number < intToCharMap.length) {
+ return intToCharMap[number];
+ }
+ throw new TypeError("Must be between 0 and 63: " + number);
+ };
+
+ /**
+ * Decode a single base 64 character code digit to an integer. Returns -1 on
+ * failure.
+ */
+ exports.decode = function (charCode) {
+ var bigA = 65; // 'A'
+ var bigZ = 90; // 'Z'
+
+ var littleA = 97; // 'a'
+ var littleZ = 122; // 'z'
+
+ var zero = 48; // '0'
+ var nine = 57; // '9'
+
+ var plus = 43; // '+'
+ var slash = 47; // '/'
+
+ var littleOffset = 26;
+ var numberOffset = 52;
+
+ // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ if (bigA <= charCode && charCode <= bigZ) {
+ return (charCode - bigA);
+ }
+
+ // 26 - 51: abcdefghijklmnopqrstuvwxyz
+ if (littleA <= charCode && charCode <= littleZ) {
+ return (charCode - littleA + littleOffset);
+ }
+
+ // 52 - 61: 0123456789
+ if (zero <= charCode && charCode <= nine) {
+ return (charCode - zero + numberOffset);
+ }
+
+ // 62: +
+ if (charCode == plus) {
+ return 62;
+ }
+
+ // 63: /
+ if (charCode == slash) {
+ return 63;
+ }
+
+ // Invalid base64 digit.
+ return -1;
+ };
+
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ /**
+ * This is a helper function for getting values from parameter/options
+ * objects.
+ *
+ * @param args The object we are extracting values from
+ * @param name The name of the property we are getting.
+ * @param defaultValue An optional value to return if the property is missing
+ * from the object. If this is not specified and the property is missing, an
+ * error will be thrown.
+ */
+ function getArg(aArgs, aName, aDefaultValue) {
+ if (aName in aArgs) {
+ return aArgs[aName];
+ } else if (arguments.length === 3) {
+ return aDefaultValue;
+ } else {
+ throw new Error('"' + aName + '" is a required argument.');
+ }
+ }
+ exports.getArg = getArg;
+
+ var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
+ var dataUrlRegexp = /^data:.+\,.+$/;
+
+ function urlParse(aUrl) {
+ var match = aUrl.match(urlRegexp);
+ if (!match) {
+ return null;
+ }
+ return {
+ scheme: match[1],
+ auth: match[2],
+ host: match[3],
+ port: match[4],
+ path: match[5]
+ };
+ }
+ exports.urlParse = urlParse;
+
+ function urlGenerate(aParsedUrl) {
+ var url = '';
+ if (aParsedUrl.scheme) {
+ url += aParsedUrl.scheme + ':';
+ }
+ url += '//';
+ if (aParsedUrl.auth) {
+ url += aParsedUrl.auth + '@';
+ }
+ if (aParsedUrl.host) {
+ url += aParsedUrl.host;
+ }
+ if (aParsedUrl.port) {
+ url += ":" + aParsedUrl.port
+ }
+ if (aParsedUrl.path) {
+ url += aParsedUrl.path;
+ }
+ return url;
+ }
+ exports.urlGenerate = urlGenerate;
+
+ /**
+ * Normalizes a path, or the path portion of a URL:
+ *
+ * - Replaces consecutive slashes with one slash.
+ * - Removes unnecessary '.' parts.
+ * - Removes unnecessary '<dir>/..' parts.
+ *
+ * Based on code in the Node.js 'path' core module.
+ *
+ * @param aPath The path or url to normalize.
+ */
+ function normalize(aPath) {
+ var path = aPath;
+ var url = urlParse(aPath);
+ if (url) {
+ if (!url.path) {
+ return aPath;
+ }
+ path = url.path;
+ }
+ var isAbsolute = exports.isAbsolute(path);
+
+ var parts = path.split(/\/+/);
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
+ part = parts[i];
+ if (part === '.') {
+ parts.splice(i, 1);
+ } else if (part === '..') {
+ up++;
+ } else if (up > 0) {
+ if (part === '') {
+ // The first part is blank if the path is absolute. Trying to go
+ // above the root is a no-op. Therefore we can remove all '..' parts
+ // directly after the root.
+ parts.splice(i + 1, up);
+ up = 0;
+ } else {
+ parts.splice(i, 2);
+ up--;
+ }
+ }
+ }
+ path = parts.join('/');
+
+ if (path === '') {
+ path = isAbsolute ? '/' : '.';
+ }
+
+ if (url) {
+ url.path = path;
+ return urlGenerate(url);
+ }
+ return path;
+ }
+ exports.normalize = normalize;
+
+ /**
+ * Joins two paths/URLs.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be joined with the root.
+ *
+ * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
+ * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
+ * first.
+ * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
+ * is updated with the result and aRoot is returned. Otherwise the result
+ * is returned.
+ * - If aPath is absolute, the result is aPath.
+ * - Otherwise the two paths are joined with a slash.
+ * - Joining for example 'http://' and 'www.example.com' is also supported.
+ */
+ function join(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+ if (aPath === "") {
+ aPath = ".";
+ }
+ var aPathUrl = urlParse(aPath);
+ var aRootUrl = urlParse(aRoot);
+ if (aRootUrl) {
+ aRoot = aRootUrl.path || '/';
+ }
+
+ // `join(foo, '//www.example.org')`
+ if (aPathUrl && !aPathUrl.scheme) {
+ if (aRootUrl) {
+ aPathUrl.scheme = aRootUrl.scheme;
+ }
+ return urlGenerate(aPathUrl);
+ }
+
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
+ return aPath;
+ }
+
+ // `join('http://', 'www.example.com')`
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
+ aRootUrl.host = aPath;
+ return urlGenerate(aRootUrl);
+ }
+
+ var joined = aPath.charAt(0) === '/'
+ ? aPath
+ : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
+
+ if (aRootUrl) {
+ aRootUrl.path = joined;
+ return urlGenerate(aRootUrl);
+ }
+ return joined;
+ }
+ exports.join = join;
+
+ exports.isAbsolute = function (aPath) {
+ return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
+ };
+
+ /**
+ * Make a path relative to a URL or another path.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be made relative to aRoot.
+ */
+ function relative(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+
+ aRoot = aRoot.replace(/\/$/, '');
+
+ // It is possible for the path to be above the root. In this case, simply
+ // checking whether the root is a prefix of the path won't work. Instead, we
+ // need to remove components from the root one by one, until either we find
+ // a prefix that fits, or we run out of components to remove.
+ var level = 0;
+ while (aPath.indexOf(aRoot + '/') !== 0) {
+ var index = aRoot.lastIndexOf("/");
+ if (index < 0) {
+ return aPath;
+ }
+
+ // If the only part of the root that is left is the scheme (i.e. http://,
+ // file:///, etc.), one or more slashes (/), or simply nothing at all, we
+ // have exhausted all components, so the path is not relative to the root.
+ aRoot = aRoot.slice(0, index);
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
+ return aPath;
+ }
+
+ ++level;
+ }
+
+ // Make sure we add a "../" for each component we removed from the root.
+ return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
+ }
+ exports.relative = relative;
+
+ var supportsNullProto = (function () {
+ var obj = Object.create(null);
+ return !('__proto__' in obj);
+ }());
+
+ function identity (s) {
+ return s;
+ }
+
+ /**
+ * Because behavior goes wacky when you set `__proto__` on objects, we
+ * have to prefix all the strings in our set with an arbitrary character.
+ *
+ * See https://github.com/mozilla/source-map/pull/31 and
+ * https://github.com/mozilla/source-map/issues/30
+ *
+ * @param String aStr
+ */
+ function toSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return '$' + aStr;
+ }
+
+ return aStr;
+ }
+ exports.toSetString = supportsNullProto ? identity : toSetString;
+
+ function fromSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return aStr.slice(1);
+ }
+
+ return aStr;
+ }
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
+
+ function isProtoString(s) {
+ if (!s) {
+ return false;
+ }
+
+ var length = s.length;
+
+ if (length < 9 /* "__proto__".length */) {
+ return false;
+ }
+
+ if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 2) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 4) !== 116 /* 't' */ ||
+ s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
+ s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
+ s.charCodeAt(length - 8) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 9) !== 95 /* '_' */) {
+ return false;
+ }
+
+ for (var i = length - 10; i >= 0; i--) {
+ if (s.charCodeAt(i) !== 36 /* '$' */) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Comparator between two mappings where the original positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same original source/line/column, but different generated
+ * line and column the same. Useful when searching for a mapping with a
+ * stubbed out mapping.
+ */
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
+ var cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0 || onlyCompareOriginal) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+ }
+ exports.compareByOriginalPositions = compareByOriginalPositions;
+
+ /**
+ * Comparator between two mappings with deflated source and name indices where
+ * the generated positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same generated line and column, but different
+ * source/name/original line and column the same. Useful when searching for a
+ * mapping with a stubbed out mapping.
+ */
+ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0 || onlyCompareGenerated) {
+ return cmp;
+ }
+
+ cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+ }
+ exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
+
+ function strcmp(aStr1, aStr2) {
+ if (aStr1 === aStr2) {
+ return 0;
+ }
+
+ if (aStr1 > aStr2) {
+ return 1;
+ }
+
+ return -1;
+ }
+
+ /**
+ * Comparator between two mappings with inflated source and name strings where
+ * the generated positions are compared.
+ */
+ function compareByGeneratedPositionsInflated(mappingA, mappingB) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = strcmp(mappingA.source, mappingB.source);
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return strcmp(mappingA.name, mappingB.name);
+ }
+ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
+
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+ var has = Object.prototype.hasOwnProperty;
+ var hasNativeMap = typeof Map !== "undefined";
+
+ /**
+ * A data structure which is a combination of an array and a set. Adding a new
+ * member is O(1), testing for membership is O(1), and finding the index of an
+ * element is O(1). Removing elements from the set is not supported. Only
+ * strings are supported for membership.
+ */
+ function ArraySet() {
+ this._array = [];
+ this._set = hasNativeMap ? new Map() : Object.create(null);
+ }
+
+ /**
+ * Static method for creating ArraySet instances from an existing array.
+ */
+ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
+ var set = new ArraySet();
+ for (var i = 0, len = aArray.length; i < len; i++) {
+ set.add(aArray[i], aAllowDuplicates);
+ }
+ return set;
+ };
+
+ /**
+ * Return how many unique items are in this ArraySet. If duplicates have been
+ * added, than those do not count towards the size.
+ *
+ * @returns Number
+ */
+ ArraySet.prototype.size = function ArraySet_size() {
+ return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
+ };
+
+ /**
+ * Add the given string to this set.
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
+ var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
+ var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
+ var idx = this._array.length;
+ if (!isDuplicate || aAllowDuplicates) {
+ this._array.push(aStr);
+ }
+ if (!isDuplicate) {
+ if (hasNativeMap) {
+ this._set.set(aStr, idx);
+ } else {
+ this._set[sStr] = idx;
+ }
+ }
+ };
+
+ /**
+ * Is the given string a member of this set?
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.has = function ArraySet_has(aStr) {
+ if (hasNativeMap) {
+ return this._set.has(aStr);
+ } else {
+ var sStr = util.toSetString(aStr);
+ return has.call(this._set, sStr);
+ }
+ };
+
+ /**
+ * What is the index of the given string in the array?
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
+ if (hasNativeMap) {
+ var idx = this._set.get(aStr);
+ if (idx >= 0) {
+ return idx;
+ }
+ } else {
+ var sStr = util.toSetString(aStr);
+ if (has.call(this._set, sStr)) {
+ return this._set[sStr];
+ }
+ }
+
+ throw new Error('"' + aStr + '" is not in the set.');
+ };
+
+ /**
+ * What is the element at the given index?
+ *
+ * @param Number aIdx
+ */
+ ArraySet.prototype.at = function ArraySet_at(aIdx) {
+ if (aIdx >= 0 && aIdx < this._array.length) {
+ return this._array[aIdx];
+ }
+ throw new Error('No element indexed by ' + aIdx);
+ };
+
+ /**
+ * Returns the array representation of this set (which has the proper indices
+ * indicated by indexOf). Note that this is a copy of the internal array used
+ * for storing the members so that no one can mess with internal state.
+ */
+ ArraySet.prototype.toArray = function ArraySet_toArray() {
+ return this._array.slice();
+ };
+
+ exports.ArraySet = ArraySet;
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2014 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+
+ /**
+ * Determine whether mappingB is after mappingA with respect to generated
+ * position.
+ */
+ function generatedPositionAfter(mappingA, mappingB) {
+ // Optimized for most common case
+ var lineA = mappingA.generatedLine;
+ var lineB = mappingB.generatedLine;
+ var columnA = mappingA.generatedColumn;
+ var columnB = mappingB.generatedColumn;
+ return lineB > lineA || lineB == lineA && columnB >= columnA ||
+ util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
+ }
+
+ /**
+ * A data structure to provide a sorted view of accumulated mappings in a
+ * performance conscious manner. It trades a neglibable overhead in general
+ * case for a large speedup in case of mappings being added in order.
+ */
+ function MappingList() {
+ this._array = [];
+ this._sorted = true;
+ // Serves as infimum
+ this._last = {generatedLine: -1, generatedColumn: 0};
+ }
+
+ /**
+ * Iterate through internal items. This method takes the same arguments that
+ * `Array.prototype.forEach` takes.
+ *
+ * NOTE: The order of the mappings is NOT guaranteed.
+ */
+ MappingList.prototype.unsortedForEach =
+ function MappingList_forEach(aCallback, aThisArg) {
+ this._array.forEach(aCallback, aThisArg);
+ };
+
+ /**
+ * Add the given source mapping.
+ *
+ * @param Object aMapping
+ */
+ MappingList.prototype.add = function MappingList_add(aMapping) {
+ if (generatedPositionAfter(this._last, aMapping)) {
+ this._last = aMapping;
+ this._array.push(aMapping);
+ } else {
+ this._sorted = false;
+ this._array.push(aMapping);
+ }
+ };
+
+ /**
+ * Returns the flat, sorted array of mappings. The mappings are sorted by
+ * generated position.
+ *
+ * WARNING: This method returns internal data without copying, for
+ * performance. The return value must NOT be mutated, and should be treated as
+ * an immutable borrow. If you want to take ownership, you must make your own
+ * copy.
+ */
+ MappingList.prototype.toArray = function MappingList_toArray() {
+ if (!this._sorted) {
+ this._array.sort(util.compareByGeneratedPositionsInflated);
+ this._sorted = true;
+ }
+ return this._array;
+ };
+
+ exports.MappingList = MappingList;
+
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+ var binarySearch = __webpack_require__(8);
+ var ArraySet = __webpack_require__(5).ArraySet;
+ var base64VLQ = __webpack_require__(2);
+ var quickSort = __webpack_require__(9).quickSort;
+
+ function SourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ return sourceMap.sections != null
+ ? new IndexedSourceMapConsumer(sourceMap)
+ : new BasicSourceMapConsumer(sourceMap);
+ }
+
+ SourceMapConsumer.fromSourceMap = function(aSourceMap) {
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
+ }
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ SourceMapConsumer.prototype._version = 3;
+
+ // `__generatedMappings` and `__originalMappings` are arrays that hold the
+ // parsed mapping coordinates from the source map's "mappings" attribute. They
+ // are lazily instantiated, accessed via the `_generatedMappings` and
+ // `_originalMappings` getters respectively, and we only parse the mappings
+ // and create these arrays once queried for a source location. We jump through
+ // these hoops because there can be many thousands of mappings, and parsing
+ // them is expensive, so we only want to do it if we must.
+ //
+ // Each object in the arrays is of the form:
+ //
+ // {
+ // generatedLine: The line number in the generated code,
+ // generatedColumn: The column number in the generated code,
+ // source: The path to the original source file that generated this
+ // chunk of code,
+ // originalLine: The line number in the original source that
+ // corresponds to this chunk of generated code,
+ // originalColumn: The column number in the original source that
+ // corresponds to this chunk of generated code,
+ // name: The name of the original symbol which generated this chunk of
+ // code.
+ // }
+ //
+ // All properties except for `generatedLine` and `generatedColumn` can be
+ // `null`.
+ //
+ // `_generatedMappings` is ordered by the generated positions.
+ //
+ // `_originalMappings` is ordered by the original positions.
+
+ SourceMapConsumer.prototype.__generatedMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
+ get: function () {
+ if (!this.__generatedMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__generatedMappings;
+ }
+ });
+
+ SourceMapConsumer.prototype.__originalMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
+ get: function () {
+ if (!this.__originalMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__originalMappings;
+ }
+ });
+
+ SourceMapConsumer.prototype._charIsMappingSeparator =
+ function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
+ var c = aStr.charAt(index);
+ return c === ";" || c === ",";
+ };
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ SourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ throw new Error("Subclasses must implement _parseMappings");
+ };
+
+ SourceMapConsumer.GENERATED_ORDER = 1;
+ SourceMapConsumer.ORIGINAL_ORDER = 2;
+
+ SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
+ SourceMapConsumer.LEAST_UPPER_BOUND = 2;
+
+ /**
+ * Iterate over each mapping between an original source/line/column and a
+ * generated line/column in this source map.
+ *
+ * @param Function aCallback
+ * The function that is called with each mapping.
+ * @param Object aContext
+ * Optional. If specified, this object will be the value of `this` every
+ * time that `aCallback` is called.
+ * @param aOrder
+ * Either `SourceMapConsumer.GENERATED_ORDER` or
+ * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
+ * iterate over the mappings sorted by the generated file's line/column
+ * order or the original's source/line/column order, respectively. Defaults to
+ * `SourceMapConsumer.GENERATED_ORDER`.
+ */
+ SourceMapConsumer.prototype.eachMapping =
+ function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
+ var context = aContext || null;
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
+
+ var mappings;
+ switch (order) {
+ case SourceMapConsumer.GENERATED_ORDER:
+ mappings = this._generatedMappings;
+ break;
+ case SourceMapConsumer.ORIGINAL_ORDER:
+ mappings = this._originalMappings;
+ break;
+ default:
+ throw new Error("Unknown order of iteration.");
+ }
+
+ var sourceRoot = this.sourceRoot;
+ mappings.map(function (mapping) {
+ var source = mapping.source === null ? null : this._sources.at(mapping.source);
+ if (source != null && sourceRoot != null) {
+ source = util.join(sourceRoot, source);
+ }
+ return {
+ source: source,
+ generatedLine: mapping.generatedLine,
+ generatedColumn: mapping.generatedColumn,
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: mapping.name === null ? null : this._names.at(mapping.name)
+ };
+ }, this).forEach(aCallback, context);
+ };
+
+ /**
+ * Returns all generated line and column information for the original source,
+ * line, and column provided. If no column is provided, returns all mappings
+ * corresponding to a either the line we are searching for or the next
+ * closest line that has any mappings. Otherwise, returns all mappings
+ * corresponding to the given line and either the column we are searching for
+ * or the next closest column that has any offsets.
+ *
+ * The only argument is an object with the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: Optional. the column number in the original source.
+ *
+ * and an array of objects is returned, each with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ SourceMapConsumer.prototype.allGeneratedPositionsFor =
+ function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
+ var line = util.getArg(aArgs, 'line');
+
+ // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
+ // returns the index of the closest mapping less than the needle. By
+ // setting needle.originalColumn to 0, we thus find the last mapping for
+ // the given line, provided such a mapping exists.
+ var needle = {
+ source: util.getArg(aArgs, 'source'),
+ originalLine: line,
+ originalColumn: util.getArg(aArgs, 'column', 0)
+ };
+
+ if (this.sourceRoot != null) {
+ needle.source = util.relative(this.sourceRoot, needle.source);
+ }
+ if (!this._sources.has(needle.source)) {
+ return [];
+ }
+ needle.source = this._sources.indexOf(needle.source);
+
+ var mappings = [];
+
+ var index = this._findMapping(needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ binarySearch.LEAST_UPPER_BOUND);
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (aArgs.column === undefined) {
+ var originalLine = mapping.originalLine;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we found. Since
+ // mappings are sorted, this is guaranteed to find all mappings for
+ // the line we found.
+ while (mapping && mapping.originalLine === originalLine) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ } else {
+ var originalColumn = mapping.originalColumn;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we were searching for.
+ // Since mappings are sorted, this is guaranteed to find all mappings for
+ // the line we are searching for.
+ while (mapping &&
+ mapping.originalLine === line &&
+ mapping.originalColumn == originalColumn) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ }
+ }
+
+ return mappings;
+ };
+
+ exports.SourceMapConsumer = SourceMapConsumer;
+
+ /**
+ * A BasicSourceMapConsumer instance represents a parsed source map which we can
+ * query for information about the original file positions by giving it a file
+ * position in the generated source.
+ *
+ * The only parameter is the raw source map (either as a JSON string, or
+ * already parsed to an object). According to the spec, source maps have the
+ * following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - sources: An array of URLs to the original source files.
+ * - names: An array of identifiers which can be referrenced by individual mappings.
+ * - sourceRoot: Optional. The URL root from which all sources are relative.
+ * - sourcesContent: Optional. An array of contents of the original source files.
+ * - mappings: A string of base64 VLQs which contain the actual mappings.
+ * - file: Optional. The generated file this source map is associated with.
+ *
+ * Here is an example source map, taken from the source map spec[0]:
+ *
+ * {
+ * version : 3,
+ * file: "out.js",
+ * sourceRoot : "",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AA,AB;;ABCDE;"
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
+ */
+ function BasicSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sources = util.getArg(sourceMap, 'sources');
+ // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
+ // requires the array) to play nice here.
+ var names = util.getArg(sourceMap, 'names', []);
+ var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
+ var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
+ var mappings = util.getArg(sourceMap, 'mappings');
+ var file = util.getArg(sourceMap, 'file', null);
+
+ // Once again, Sass deviates from the spec and supplies the version as a
+ // string rather than a number, so we use loose equality checking here.
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ sources = sources
+ .map(String)
+ // Some source maps produce relative source paths like "./foo.js" instead of
+ // "foo.js". Normalize these first so that future comparisons will succeed.
+ // See bugzil.la/1090768.
+ .map(util.normalize)
+ // Always ensure that absolute sources are internally stored relative to
+ // the source root, if the source root is absolute. Not doing this would
+ // be particularly problematic when the source root is a prefix of the
+ // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
+ .map(function (source) {
+ return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
+ ? util.relative(sourceRoot, source)
+ : source;
+ });
+
+ // Pass `true` below to allow duplicate names and sources. While source maps
+ // are intended to be compressed and deduplicated, the TypeScript compiler
+ // sometimes generates source maps with duplicates in them. See Github issue
+ // #72 and bugzil.la/889492.
+ this._names = ArraySet.fromArray(names.map(String), true);
+ this._sources = ArraySet.fromArray(sources, true);
+
+ this.sourceRoot = sourceRoot;
+ this.sourcesContent = sourcesContent;
+ this._mappings = mappings;
+ this.file = file;
+ }
+
+ BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
+
+ /**
+ * Create a BasicSourceMapConsumer from a SourceMapGenerator.
+ *
+ * @param SourceMapGenerator aSourceMap
+ * The source map that will be consumed.
+ * @returns BasicSourceMapConsumer
+ */
+ BasicSourceMapConsumer.fromSourceMap =
+ function SourceMapConsumer_fromSourceMap(aSourceMap) {
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
+
+ var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
+ var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
+ smc.sourceRoot = aSourceMap._sourceRoot;
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
+ smc.sourceRoot);
+ smc.file = aSourceMap._file;
+
+ // Because we are modifying the entries (by converting string sources and
+ // names to indices into the sources and names ArraySets), we have to make
+ // a copy of the entry or else bad things happen. Shared mutable state
+ // strikes again! See github issue #191.
+
+ var generatedMappings = aSourceMap._mappings.toArray().slice();
+ var destGeneratedMappings = smc.__generatedMappings = [];
+ var destOriginalMappings = smc.__originalMappings = [];
+
+ for (var i = 0, length = generatedMappings.length; i < length; i++) {
+ var srcMapping = generatedMappings[i];
+ var destMapping = new Mapping;
+ destMapping.generatedLine = srcMapping.generatedLine;
+ destMapping.generatedColumn = srcMapping.generatedColumn;
+
+ if (srcMapping.source) {
+ destMapping.source = sources.indexOf(srcMapping.source);
+ destMapping.originalLine = srcMapping.originalLine;
+ destMapping.originalColumn = srcMapping.originalColumn;
+
+ if (srcMapping.name) {
+ destMapping.name = names.indexOf(srcMapping.name);
+ }
+
+ destOriginalMappings.push(destMapping);
+ }
+
+ destGeneratedMappings.push(destMapping);
+ }
+
+ quickSort(smc.__originalMappings, util.compareByOriginalPositions);
+
+ return smc;
+ };
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ BasicSourceMapConsumer.prototype._version = 3;
+
+ /**
+ * The list of original sources.
+ */
+ Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ return this._sources.toArray().map(function (s) {
+ return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
+ }, this);
+ }
+ });
+
+ /**
+ * Provide the JIT with a nice shape / hidden class.
+ */
+ function Mapping() {
+ this.generatedLine = 0;
+ this.generatedColumn = 0;
+ this.source = null;
+ this.originalLine = null;
+ this.originalColumn = null;
+ this.name = null;
+ }
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ BasicSourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ var generatedLine = 1;
+ var previousGeneratedColumn = 0;
+ var previousOriginalLine = 0;
+ var previousOriginalColumn = 0;
+ var previousSource = 0;
+ var previousName = 0;
+ var length = aStr.length;
+ var index = 0;
+ var cachedSegments = {};
+ var temp = {};
+ var originalMappings = [];
+ var generatedMappings = [];
+ var mapping, str, segment, end, value;
+
+ while (index < length) {
+ if (aStr.charAt(index) === ';') {
+ generatedLine++;
+ index++;
+ previousGeneratedColumn = 0;
+ }
+ else if (aStr.charAt(index) === ',') {
+ index++;
+ }
+ else {
+ mapping = new Mapping();
+ mapping.generatedLine = generatedLine;
+
+ // Because each offset is encoded relative to the previous one,
+ // many segments often have the same encoding. We can exploit this
+ // fact by caching the parsed variable length fields of each segment,
+ // allowing us to avoid a second parse if we encounter the same
+ // segment again.
+ for (end = index; end < length; end++) {
+ if (this._charIsMappingSeparator(aStr, end)) {
+ break;
+ }
+ }
+ str = aStr.slice(index, end);
+
+ segment = cachedSegments[str];
+ if (segment) {
+ index += str.length;
+ } else {
+ segment = [];
+ while (index < end) {
+ base64VLQ.decode(aStr, index, temp);
+ value = temp.value;
+ index = temp.rest;
+ segment.push(value);
+ }
+
+ if (segment.length === 2) {
+ throw new Error('Found a source, but no line and column');
+ }
+
+ if (segment.length === 3) {
+ throw new Error('Found a source and line, but no column');
+ }
+
+ cachedSegments[str] = segment;
+ }
+
+ // Generated column.
+ mapping.generatedColumn = previousGeneratedColumn + segment[0];
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (segment.length > 1) {
+ // Original source.
+ mapping.source = previousSource + segment[1];
+ previousSource += segment[1];
+
+ // Original line.
+ mapping.originalLine = previousOriginalLine + segment[2];
+ previousOriginalLine = mapping.originalLine;
+ // Lines are stored 0-based
+ mapping.originalLine += 1;
+
+ // Original column.
+ mapping.originalColumn = previousOriginalColumn + segment[3];
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (segment.length > 4) {
+ // Original name.
+ mapping.name = previousName + segment[4];
+ previousName += segment[4];
+ }
+ }
+
+ generatedMappings.push(mapping);
+ if (typeof mapping.originalLine === 'number') {
+ originalMappings.push(mapping);
+ }
+ }
+ }
+
+ quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
+ this.__generatedMappings = generatedMappings;
+
+ quickSort(originalMappings, util.compareByOriginalPositions);
+ this.__originalMappings = originalMappings;
+ };
+
+ /**
+ * Find the mapping that best matches the hypothetical "needle" mapping that
+ * we are searching for in the given "haystack" of mappings.
+ */
+ BasicSourceMapConsumer.prototype._findMapping =
+ function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
+ aColumnName, aComparator, aBias) {
+ // To return the position we are searching for, we must first find the
+ // mapping for the given position and then return the opposite position it
+ // points to. Because the mappings are sorted, we can use binary search to
+ // find the best mapping.
+
+ if (aNeedle[aLineName] <= 0) {
+ throw new TypeError('Line must be greater than or equal to 1, got '
+ + aNeedle[aLineName]);
+ }
+ if (aNeedle[aColumnName] < 0) {
+ throw new TypeError('Column must be greater than or equal to 0, got '
+ + aNeedle[aColumnName]);
+ }
+
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
+ };
+
+ /**
+ * Compute the last column for each generated mapping. The last column is
+ * inclusive.
+ */
+ BasicSourceMapConsumer.prototype.computeColumnSpans =
+ function SourceMapConsumer_computeColumnSpans() {
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
+ var mapping = this._generatedMappings[index];
+
+ // Mappings do not contain a field for the last generated columnt. We
+ // can come up with an optimistic estimate, however, by assuming that
+ // mappings are contiguous (i.e. given two consecutive mappings, the
+ // first mapping ends where the second one starts).
+ if (index + 1 < this._generatedMappings.length) {
+ var nextMapping = this._generatedMappings[index + 1];
+
+ if (mapping.generatedLine === nextMapping.generatedLine) {
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
+ continue;
+ }
+ }
+
+ // The last mapping for each line spans the entire line.
+ mapping.lastGeneratedColumn = Infinity;
+ }
+ };
+
+ /**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+ BasicSourceMapConsumer.prototype.originalPositionFor =
+ function SourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._generatedMappings,
+ "generatedLine",
+ "generatedColumn",
+ util.compareByGeneratedPositionsDeflated,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._generatedMappings[index];
+
+ if (mapping.generatedLine === needle.generatedLine) {
+ var source = util.getArg(mapping, 'source', null);
+ if (source !== null) {
+ source = this._sources.at(source);
+ if (this.sourceRoot != null) {
+ source = util.join(this.sourceRoot, source);
+ }
+ }
+ var name = util.getArg(mapping, 'name', null);
+ if (name !== null) {
+ name = this._names.at(name);
+ }
+ return {
+ source: source,
+ line: util.getArg(mapping, 'originalLine', null),
+ column: util.getArg(mapping, 'originalColumn', null),
+ name: name
+ };
+ }
+ }
+
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ };
+
+ /**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+ BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function BasicSourceMapConsumer_hasContentsOfAllSources() {
+ if (!this.sourcesContent) {
+ return false;
+ }
+ return this.sourcesContent.length >= this._sources.size() &&
+ !this.sourcesContent.some(function (sc) { return sc == null; });
+ };
+
+ /**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+ BasicSourceMapConsumer.prototype.sourceContentFor =
+ function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ if (!this.sourcesContent) {
+ return null;
+ }
+
+ if (this.sourceRoot != null) {
+ aSource = util.relative(this.sourceRoot, aSource);
+ }
+
+ if (this._sources.has(aSource)) {
+ return this.sourcesContent[this._sources.indexOf(aSource)];
+ }
+
+ var url;
+ if (this.sourceRoot != null
+ && (url = util.urlParse(this.sourceRoot))) {
+ // XXX: file:// URIs and absolute paths lead to unexpected behavior for
+ // many users. We can help them out when they expect file:// URIs to
+ // behave like it would if they were running a local HTTP server. See
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
+ var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
+ if (url.scheme == "file"
+ && this._sources.has(fileUriAbsPath)) {
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
+ }
+
+ if ((!url.path || url.path == "/")
+ && this._sources.has("/" + aSource)) {
+ return this.sourcesContent[this._sources.indexOf("/" + aSource)];
+ }
+ }
+
+ // This function is used recursively from
+ // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
+ // don't want to throw if we can't find the source - we just want to
+ // return null, so we provide a flag to exit gracefully.
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+ /**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ BasicSourceMapConsumer.prototype.generatedPositionFor =
+ function SourceMapConsumer_generatedPositionFor(aArgs) {
+ var source = util.getArg(aArgs, 'source');
+ if (this.sourceRoot != null) {
+ source = util.relative(this.sourceRoot, source);
+ }
+ if (!this._sources.has(source)) {
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ }
+ source = this._sources.indexOf(source);
+
+ var needle = {
+ source: source,
+ originalLine: util.getArg(aArgs, 'line'),
+ originalColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (mapping.source === needle.source) {
+ return {
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ };
+ }
+ }
+
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ };
+
+ exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
+
+ /**
+ * An IndexedSourceMapConsumer instance represents a parsed source map which
+ * we can query for information. It differs from BasicSourceMapConsumer in
+ * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
+ * input.
+ *
+ * The only parameter is a raw source map (either as a JSON string, or already
+ * parsed to an object). According to the spec for indexed source maps, they
+ * have the following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - file: Optional. The generated file this source map is associated with.
+ * - sections: A list of section definitions.
+ *
+ * Each value under the "sections" field has two fields:
+ * - offset: The offset into the original specified at which this section
+ * begins to apply, defined as an object with a "line" and "column"
+ * field.
+ * - map: A source map definition. This source map could also be indexed,
+ * but doesn't have to be.
+ *
+ * Instead of the "map" field, it's also possible to have a "url" field
+ * specifying a URL to retrieve a source map from, but that's currently
+ * unsupported.
+ *
+ * Here's an example source map, taken from the source map spec[0], but
+ * modified to omit a section which uses the "url" field.
+ *
+ * {
+ * version : 3,
+ * file: "app.js",
+ * sections: [{
+ * offset: {line:100, column:10},
+ * map: {
+ * version : 3,
+ * file: "section.js",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AAAA,E;;ABCDE;"
+ * }
+ * }],
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
+ */
+ function IndexedSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sections = util.getArg(sourceMap, 'sections');
+
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+
+ var lastOffset = {
+ line: -1,
+ column: 0
+ };
+ this._sections = sections.map(function (s) {
+ if (s.url) {
+ // The url field will require support for asynchronicity.
+ // See https://github.com/mozilla/source-map/issues/16
+ throw new Error('Support for url field in sections not implemented.');
+ }
+ var offset = util.getArg(s, 'offset');
+ var offsetLine = util.getArg(offset, 'line');
+ var offsetColumn = util.getArg(offset, 'column');
+
+ if (offsetLine < lastOffset.line ||
+ (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
+ throw new Error('Section offsets must be ordered and non-overlapping.');
+ }
+ lastOffset = offset;
+
+ return {
+ generatedOffset: {
+ // The offset fields are 0-based, but we use 1-based indices when
+ // encoding/decoding from VLQ.
+ generatedLine: offsetLine + 1,
+ generatedColumn: offsetColumn + 1
+ },
+ consumer: new SourceMapConsumer(util.getArg(s, 'map'))
+ }
+ });
+ }
+
+ IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+ IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ IndexedSourceMapConsumer.prototype._version = 3;
+
+ /**
+ * The list of original sources.
+ */
+ Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ var sources = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
+ sources.push(this._sections[i].consumer.sources[j]);
+ }
+ }
+ return sources;
+ }
+ });
+
+ /**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+ IndexedSourceMapConsumer.prototype.originalPositionFor =
+ function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ // Find the section containing the generated position we're trying to map
+ // to an original position.
+ var sectionIndex = binarySearch.search(needle, this._sections,
+ function(needle, section) {
+ var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ return (needle.generatedColumn -
+ section.generatedOffset.generatedColumn);
+ });
+ var section = this._sections[sectionIndex];
+
+ if (!section) {
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ }
+
+ return section.consumer.originalPositionFor({
+ line: needle.generatedLine -
+ (section.generatedOffset.generatedLine - 1),
+ column: needle.generatedColumn -
+ (section.generatedOffset.generatedLine === needle.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ bias: aArgs.bias
+ });
+ };
+
+ /**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+ IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function IndexedSourceMapConsumer_hasContentsOfAllSources() {
+ return this._sections.every(function (s) {
+ return s.consumer.hasContentsOfAllSources();
+ });
+ };
+
+ /**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+ IndexedSourceMapConsumer.prototype.sourceContentFor =
+ function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ var content = section.consumer.sourceContentFor(aSource, true);
+ if (content) {
+ return content;
+ }
+ }
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+ /**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ IndexedSourceMapConsumer.prototype.generatedPositionFor =
+ function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ // Only consider this section if the requested source is in the list of
+ // sources of the consumer.
+ if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
+ continue;
+ }
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
+ if (generatedPosition) {
+ var ret = {
+ line: generatedPosition.line +
+ (section.generatedOffset.generatedLine - 1),
+ column: generatedPosition.column +
+ (section.generatedOffset.generatedLine === generatedPosition.line
+ ? section.generatedOffset.generatedColumn - 1
+ : 0)
+ };
+ return ret;
+ }
+ }
+
+ return {
+ line: null,
+ column: null
+ };
+ };
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ IndexedSourceMapConsumer.prototype._parseMappings =
+ function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+ var sectionMappings = section.consumer._generatedMappings;
+ for (var j = 0; j < sectionMappings.length; j++) {
+ var mapping = sectionMappings[j];
+
+ var source = section.consumer._sources.at(mapping.source);
+ if (section.consumer.sourceRoot !== null) {
+ source = util.join(section.consumer.sourceRoot, source);
+ }
+ this._sources.add(source);
+ source = this._sources.indexOf(source);
+
+ var name = section.consumer._names.at(mapping.name);
+ this._names.add(name);
+ name = this._names.indexOf(name);
+
+ // The mappings coming from the consumer for the section have
+ // generated positions relative to the start of the section, so we
+ // need to offset them to be relative to the start of the concatenated
+ // generated file.
+ var adjustedMapping = {
+ source: source,
+ generatedLine: mapping.generatedLine +
+ (section.generatedOffset.generatedLine - 1),
+ generatedColumn: mapping.generatedColumn +
+ (section.generatedOffset.generatedLine === mapping.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: name
+ };
+
+ this.__generatedMappings.push(adjustedMapping);
+ if (typeof adjustedMapping.originalLine === 'number') {
+ this.__originalMappings.push(adjustedMapping);
+ }
+ }
+ }
+
+ quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
+ quickSort(this.__originalMappings, util.compareByOriginalPositions);
+ };
+
+ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
+
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ exports.GREATEST_LOWER_BOUND = 1;
+ exports.LEAST_UPPER_BOUND = 2;
+
+ /**
+ * Recursive implementation of binary search.
+ *
+ * @param aLow Indices here and lower do not contain the needle.
+ * @param aHigh Indices here and higher do not contain the needle.
+ * @param aNeedle The element being searched for.
+ * @param aHaystack The non-empty array being searched.
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ */
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
+ // This function terminates when one of the following is true:
+ //
+ // 1. We find the exact element we are looking for.
+ //
+ // 2. We did not find the exact element, but we can return the index of
+ // the next-closest element.
+ //
+ // 3. We did not find the exact element, and there is no next-closest
+ // element than the one we are searching for, so we return -1.
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
+ if (cmp === 0) {
+ // Found the element we are looking for.
+ return mid;
+ }
+ else if (cmp > 0) {
+ // Our needle is greater than aHaystack[mid].
+ if (aHigh - mid > 1) {
+ // The element is in the upper half.
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // The exact needle element was not found in this haystack. Determine if
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return aHigh < aHaystack.length ? aHigh : -1;
+ } else {
+ return mid;
+ }
+ }
+ else {
+ // Our needle is less than aHaystack[mid].
+ if (mid - aLow > 1) {
+ // The element is in the lower half.
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return mid;
+ } else {
+ return aLow < 0 ? -1 : aLow;
+ }
+ }
+ }
+
+ /**
+ * This is an implementation of binary search which will always try and return
+ * the index of the closest element if there is no exact hit. This is because
+ * mappings between original and generated line/col pairs are single points,
+ * and there is an implicit region between each of them, so a miss just means
+ * that you aren't on the very start of a region.
+ *
+ * @param aNeedle The element you are looking for.
+ * @param aHaystack The array that is being searched.
+ * @param aCompare A function which takes the needle and an element in the
+ * array and returns -1, 0, or 1 depending on whether the needle is less
+ * than, equal to, or greater than the element, respectively.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
+ */
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
+ if (aHaystack.length === 0) {
+ return -1;
+ }
+
+ var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
+ aCompare, aBias || exports.GREATEST_LOWER_BOUND);
+ if (index < 0) {
+ return -1;
+ }
+
+ // We have found either the exact element, or the next-closest element than
+ // the one we are searching for. However, there may be more than one such
+ // element. Make sure we always return the smallest of these.
+ while (index - 1 >= 0) {
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
+ break;
+ }
+ --index;
+ }
+
+ return index;
+ };
+
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ // It turns out that some (most?) JavaScript engines don't self-host
+ // `Array.prototype.sort`. This makes sense because C++ will likely remain
+ // faster than JS when doing raw CPU-intensive sorting. However, when using a
+ // custom comparator function, calling back and forth between the VM's C++ and
+ // JIT'd JS is rather slow *and* loses JIT type information, resulting in
+ // worse generated code for the comparator function than would be optimal. In
+ // fact, when sorting with a comparator, these costs outweigh the benefits of
+ // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
+ // a ~3500ms mean speed-up in `bench/bench.html`.
+
+ /**
+ * Swap the elements indexed by `x` and `y` in the array `ary`.
+ *
+ * @param {Array} ary
+ * The array.
+ * @param {Number} x
+ * The index of the first item.
+ * @param {Number} y
+ * The index of the second item.
+ */
+ function swap(ary, x, y) {
+ var temp = ary[x];
+ ary[x] = ary[y];
+ ary[y] = temp;
+ }
+
+ /**
+ * Returns a random integer within the range `low .. high` inclusive.
+ *
+ * @param {Number} low
+ * The lower bound on the range.
+ * @param {Number} high
+ * The upper bound on the range.
+ */
+ function randomIntInRange(low, high) {
+ return Math.round(low + (Math.random() * (high - low)));
+ }
+
+ /**
+ * The Quick Sort algorithm.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ * @param {Number} p
+ * Start index of the array
+ * @param {Number} r
+ * End index of the array
+ */
+ function doQuickSort(ary, comparator, p, r) {
+ // If our lower bound is less than our upper bound, we (1) partition the
+ // array into two pieces and (2) recurse on each half. If it is not, this is
+ // the empty array and our base case.
+
+ if (p < r) {
+ // (1) Partitioning.
+ //
+ // The partitioning chooses a pivot between `p` and `r` and moves all
+ // elements that are less than or equal to the pivot to the before it, and
+ // all the elements that are greater than it after it. The effect is that
+ // once partition is done, the pivot is in the exact place it will be when
+ // the array is put in sorted order, and it will not need to be moved
+ // again. This runs in O(n) time.
+
+ // Always choose a random pivot so that an input array which is reverse
+ // sorted does not cause O(n^2) running time.
+ var pivotIndex = randomIntInRange(p, r);
+ var i = p - 1;
+
+ swap(ary, pivotIndex, r);
+ var pivot = ary[r];
+
+ // Immediately after `j` is incremented in this loop, the following hold
+ // true:
+ //
+ // * Every element in `ary[p .. i]` is less than or equal to the pivot.
+ //
+ // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
+ for (var j = p; j < r; j++) {
+ if (comparator(ary[j], pivot) <= 0) {
+ i += 1;
+ swap(ary, i, j);
+ }
+ }
+
+ swap(ary, i + 1, j);
+ var q = i + 1;
+
+ // (2) Recurse on each half.
+
+ doQuickSort(ary, comparator, p, q - 1);
+ doQuickSort(ary, comparator, q + 1, r);
+ }
+ }
+
+ /**
+ * Sort the given array in-place with the given comparator function.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ */
+ exports.quickSort = function (ary, comparator) {
+ doQuickSort(ary, comparator, 0, ary.length - 1);
+ };
+
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
+ var util = __webpack_require__(4);
+
+ // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
+ // operating systems these days (capturing the result).
+ var REGEX_NEWLINE = /(\r?\n)/;
+
+ // Newline character code for charCodeAt() comparisons
+ var NEWLINE_CODE = 10;
+
+ // Private symbol for identifying `SourceNode`s when multiple versions of
+ // the source-map library are loaded. This MUST NOT CHANGE across
+ // versions!
+ var isSourceNode = "$$$isSourceNode$$$";
+
+ /**
+ * SourceNodes provide a way to abstract over interpolating/concatenating
+ * snippets of generated JavaScript source code while maintaining the line and
+ * column information associated with the original source code.
+ *
+ * @param aLine The original line number.
+ * @param aColumn The original column number.
+ * @param aSource The original source's filename.
+ * @param aChunks Optional. An array of strings which are snippets of
+ * generated JS, or other SourceNodes.
+ * @param aName The original identifier.
+ */
+ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
+ this.children = [];
+ this.sourceContents = {};
+ this.line = aLine == null ? null : aLine;
+ this.column = aColumn == null ? null : aColumn;
+ this.source = aSource == null ? null : aSource;
+ this.name = aName == null ? null : aName;
+ this[isSourceNode] = true;
+ if (aChunks != null) this.add(aChunks);
+ }
+
+ /**
+ * Creates a SourceNode from generated code and a SourceMapConsumer.
+ *
+ * @param aGeneratedCode The generated code
+ * @param aSourceMapConsumer The SourceMap for the generated code
+ * @param aRelativePath Optional. The path that relative sources in the
+ * SourceMapConsumer should be relative to.
+ */
+ SourceNode.fromStringWithSourceMap =
+ function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
+ // The SourceNode we want to fill with the generated code
+ // and the SourceMap
+ var node = new SourceNode();
+
+ // All even indices of this array are one line of the generated code,
+ // while all odd indices are the newlines between two adjacent lines
+ // (since `REGEX_NEWLINE` captures its match).
+ // Processed fragments are accessed by calling `shiftNextLine`.
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
+ var remainingLinesIndex = 0;
+ var shiftNextLine = function() {
+ var lineContents = getNextLine();
+ // The last line of a file might not have a newline.
+ var newLine = getNextLine() || "";
+ return lineContents + newLine;
+
+ function getNextLine() {
+ return remainingLinesIndex < remainingLines.length ?
+ remainingLines[remainingLinesIndex++] : undefined;
+ }
+ };
+
+ // We need to remember the position of "remainingLines"
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
+
+ // The generate SourceNodes we need a code range.
+ // To extract it current and last mapping is used.
+ // Here we store the last mapping.
+ var lastMapping = null;
+
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ if (lastMapping !== null) {
+ // We add the code from "lastMapping" to "mapping":
+ // First check if there is a new line in between.
+ if (lastGeneratedLine < mapping.generatedLine) {
+ // Associate first line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ lastGeneratedLine++;
+ lastGeneratedColumn = 0;
+ // The remaining code is added without mapping
+ } else {
+ // There is no new line in between.
+ // Associate the code between "lastGeneratedColumn" and
+ // "mapping.generatedColumn" with "lastMapping"
+ var nextLine = remainingLines[remainingLinesIndex];
+ var code = nextLine.substr(0, mapping.generatedColumn -
+ lastGeneratedColumn);
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
+ lastGeneratedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ addMappingWithCode(lastMapping, code);
+ // No more remaining code, continue
+ lastMapping = mapping;
+ return;
+ }
+ }
+ // We add the generated code until the first mapping
+ // to the SourceNode without any mapping.
+ // Each line is added as separate string.
+ while (lastGeneratedLine < mapping.generatedLine) {
+ node.add(shiftNextLine());
+ lastGeneratedLine++;
+ }
+ if (lastGeneratedColumn < mapping.generatedColumn) {
+ var nextLine = remainingLines[remainingLinesIndex];
+ node.add(nextLine.substr(0, mapping.generatedColumn));
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ }
+ lastMapping = mapping;
+ }, this);
+ // We have processed all mappings.
+ if (remainingLinesIndex < remainingLines.length) {
+ if (lastMapping) {
+ // Associate the remaining code in the current line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ }
+ // and add the remaining lines without any mapping
+ node.add(remainingLines.splice(remainingLinesIndex).join(""));
+ }
+
+ // Copy sourcesContent into SourceNode
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aRelativePath != null) {
+ sourceFile = util.join(aRelativePath, sourceFile);
+ }
+ node.setSourceContent(sourceFile, content);
+ }
+ });
+
+ return node;
+
+ function addMappingWithCode(mapping, code) {
+ if (mapping === null || mapping.source === undefined) {
+ node.add(code);
+ } else {
+ var source = aRelativePath
+ ? util.join(aRelativePath, mapping.source)
+ : mapping.source;
+ node.add(new SourceNode(mapping.originalLine,
+ mapping.originalColumn,
+ source,
+ code,
+ mapping.name));
+ }
+ }
+ };
+
+ /**
+ * Add a chunk of generated JS to this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+ SourceNode.prototype.add = function SourceNode_add(aChunk) {
+ if (Array.isArray(aChunk)) {
+ aChunk.forEach(function (chunk) {
+ this.add(chunk);
+ }, this);
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ if (aChunk) {
+ this.children.push(aChunk);
+ }
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+ };
+
+ /**
+ * Add a chunk of generated JS to the beginning of this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
+ if (Array.isArray(aChunk)) {
+ for (var i = aChunk.length-1; i >= 0; i--) {
+ this.prepend(aChunk[i]);
+ }
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ this.children.unshift(aChunk);
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+ };
+
+ /**
+ * Walk over the tree of JS snippets in this node and its children. The
+ * walking function is called once for each snippet of JS and is passed that
+ * snippet and the its original associated source's line/column location.
+ *
+ * @param aFn The traversal function.
+ */
+ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
+ var chunk;
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ chunk = this.children[i];
+ if (chunk[isSourceNode]) {
+ chunk.walk(aFn);
+ }
+ else {
+ if (chunk !== '') {
+ aFn(chunk, { source: this.source,
+ line: this.line,
+ column: this.column,
+ name: this.name });
+ }
+ }
+ }
+ };
+
+ /**
+ * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
+ * each of `this.children`.
+ *
+ * @param aSep The separator.
+ */
+ SourceNode.prototype.join = function SourceNode_join(aSep) {
+ var newChildren;
+ var i;
+ var len = this.children.length;
+ if (len > 0) {
+ newChildren = [];
+ for (i = 0; i < len-1; i++) {
+ newChildren.push(this.children[i]);
+ newChildren.push(aSep);
+ }
+ newChildren.push(this.children[i]);
+ this.children = newChildren;
+ }
+ return this;
+ };
+
+ /**
+ * Call String.prototype.replace on the very right-most source snippet. Useful
+ * for trimming whitespace from the end of a source node, etc.
+ *
+ * @param aPattern The pattern to replace.
+ * @param aReplacement The thing to replace the pattern with.
+ */
+ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
+ var lastChild = this.children[this.children.length - 1];
+ if (lastChild[isSourceNode]) {
+ lastChild.replaceRight(aPattern, aReplacement);
+ }
+ else if (typeof lastChild === 'string') {
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
+ }
+ else {
+ this.children.push(''.replace(aPattern, aReplacement));
+ }
+ return this;
+ };
+
+ /**
+ * Set the source content for a source file. This will be added to the SourceMapGenerator
+ * in the sourcesContent field.
+ *
+ * @param aSourceFile The filename of the source file
+ * @param aSourceContent The content of the source file
+ */
+ SourceNode.prototype.setSourceContent =
+ function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
+ };
+
+ /**
+ * Walk over the tree of SourceNodes. The walking function is called for each
+ * source file content and is passed the filename and source content.
+ *
+ * @param aFn The traversal function.
+ */
+ SourceNode.prototype.walkSourceContents =
+ function SourceNode_walkSourceContents(aFn) {
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ if (this.children[i][isSourceNode]) {
+ this.children[i].walkSourceContents(aFn);
+ }
+ }
+
+ var sources = Object.keys(this.sourceContents);
+ for (var i = 0, len = sources.length; i < len; i++) {
+ aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
+ }
+ };
+
+ /**
+ * Return the string representation of this source node. Walks over the tree
+ * and concatenates all the various snippets together to one string.
+ */
+ SourceNode.prototype.toString = function SourceNode_toString() {
+ var str = "";
+ this.walk(function (chunk) {
+ str += chunk;
+ });
+ return str;
+ };
+
+ /**
+ * Returns the string representation of this source node along with a source
+ * map.
+ */
+ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
+ var generated = {
+ code: "",
+ line: 1,
+ column: 0
+ };
+ var map = new SourceMapGenerator(aArgs);
+ var sourceMappingActive = false;
+ var lastOriginalSource = null;
+ var lastOriginalLine = null;
+ var lastOriginalColumn = null;
+ var lastOriginalName = null;
+ this.walk(function (chunk, original) {
+ generated.code += chunk;
+ if (original.source !== null
+ && original.line !== null
+ && original.column !== null) {
+ if(lastOriginalSource !== original.source
+ || lastOriginalLine !== original.line
+ || lastOriginalColumn !== original.column
+ || lastOriginalName !== original.name) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ lastOriginalSource = original.source;
+ lastOriginalLine = original.line;
+ lastOriginalColumn = original.column;
+ lastOriginalName = original.name;
+ sourceMappingActive = true;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ generated: {
+ line: generated.line,
+ column: generated.column
+ }
+ });
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ }
+ for (var idx = 0, length = chunk.length; idx < length; idx++) {
+ if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
+ generated.line++;
+ generated.column = 0;
+ // Mappings end at eol
+ if (idx + 1 === length) {
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ } else {
+ generated.column++;
+ }
+ }
+ });
+ this.walkSourceContents(function (sourceFile, sourceContent) {
+ map.setSourceContent(sourceFile, sourceContent);
+ });
+
+ return { code: generated.code, map: map };
+ };
+
+ exports.SourceNode = SourceNode;
+
+
+/***/ })
+/******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ZXJhdGVkUG9zaXRpb25zSW5mbGF0ZWQobWFwcGluZywgbWFwcGluZ3NbaSAtIDFdKSkge1xuICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5leHQgKz0gJywnO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c0dlbmVyYXRlZENvbHVtbik7XG4gICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICBzb3VyY2VJZHggPSB0aGlzLl9zb3VyY2VzLmluZGV4T2YobWFwcGluZy5zb3VyY2UpO1xuICAgICAgICBuZXh0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICBwcmV2aW91c1NvdXJjZSA9IHNvdXJjZUlkeDtcblxuICAgICAgICAvLyBsaW5lcyBhcmUgc3RvcmVkIDAtYmFzZWQgaW4gU291cmNlTWFwIHNwZWMgdmVyc2lvbiAzXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsTGluZSAtIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBwcmV2aW91c09yaWdpbmFsTGluZSk7XG4gICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgIG5leHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLm9yaWdpbmFsQ29sdW1uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldml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gfSk7XG5cbiAgICByZXR1cm4gbm9kZTtcblxuICAgIGZ1bmN0aW9uIGFkZE1hcHBpbmdXaXRoQ29kZShtYXBwaW5nLCBjb2RlKSB7XG4gICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIG5vZGUuYWRkKGNvZGUpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICA/IHV0aWwuam9pbihhUmVsYXRpdmVQYXRoLCBtYXBwaW5nLnNvdXJjZSlcbiAgICAgICAgICA6IG1hcHBpbmcuc291cmNlO1xuICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUpKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbi8qKlxuICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gKlxuICogQHBhcmFtIGFDaHVuayBBIHN0cmluZyBzbmlwcGV0IG9mIGdlbmVyYXRlZCBKUyBjb2RlLCBhbm90aGVyIGluc3RhbmNlIG9mXG4gKiAgICAgICAgU291cmNlTm9kZSwgb3IgYW4gYXJyYXkgd2hlcmUgZWFjaCBtZW1iZXIgaXMgb25lIG9mIHRob3NlIHRoaW5ncy5cbiAqL1xuU291cmNlTm9kZS5wcm90b3R5cGUuYWRkID0gZnVuY3Rpb24gU291cmNlTm9kZV9hZGQoYUNodW5rKSB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zID0gMCJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file
diff --git a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.js b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.js
new file mode 100644
index 0000000..4e630e2
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.js
@@ -0,0 +1,3090 @@
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory();
+ else if(typeof define === 'function' && define.amd)
+ define([], factory);
+ else if(typeof exports === 'object')
+ exports["sourceMap"] = factory();
+ else
+ root["sourceMap"] = factory();
+})(this, function() {
+return /******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId])
+/******/ return installedModules[moduleId].exports;
+
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ exports: {},
+/******/ id: moduleId,
+/******/ loaded: false
+/******/ };
+
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+
+/******/ // Flag the module as loaded
+/******/ module.loaded = true;
+
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+
+
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /*
+ * Copyright 2009-2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE.txt or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+ exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
+ exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;
+ exports.SourceNode = __webpack_require__(10).SourceNode;
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var base64VLQ = __webpack_require__(2);
+ var util = __webpack_require__(4);
+ var ArraySet = __webpack_require__(5).ArraySet;
+ var MappingList = __webpack_require__(6).MappingList;
+
+ /**
+ * An instance of the SourceMapGenerator represents a source map which is
+ * being built incrementally. You may pass an object with the following
+ * properties:
+ *
+ * - file: The filename of the generated source.
+ * - sourceRoot: A root for all relative URLs in this source map.
+ */
+ function SourceMapGenerator(aArgs) {
+ if (!aArgs) {
+ aArgs = {};
+ }
+ this._file = util.getArg(aArgs, 'file', null);
+ this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
+ this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+ this._mappings = new MappingList();
+ this._sourcesContents = null;
+ }
+
+ SourceMapGenerator.prototype._version = 3;
+
+ /**
+ * Creates a new SourceMapGenerator based on a SourceMapConsumer
+ *
+ * @param aSourceMapConsumer The SourceMap.
+ */
+ SourceMapGenerator.fromSourceMap =
+ function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
+ var generator = new SourceMapGenerator({
+ file: aSourceMapConsumer.file,
+ sourceRoot: sourceRoot
+ });
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ var newMapping = {
+ generated: {
+ line: mapping.generatedLine,
+ column: mapping.generatedColumn
+ }
+ };
+
+ if (mapping.source != null) {
+ newMapping.source = mapping.source;
+ if (sourceRoot != null) {
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
+ }
+
+ newMapping.original = {
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ };
+
+ if (mapping.name != null) {
+ newMapping.name = mapping.name;
+ }
+ }
+
+ generator.addMapping(newMapping);
+ });
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ generator.setSourceContent(sourceFile, content);
+ }
+ });
+ return generator;
+ };
+
+ /**
+ * Add a single mapping from original source line and column to the generated
+ * source's line and column for this source map being created. The mapping
+ * object should have the following properties:
+ *
+ * - generated: An object with the generated line and column positions.
+ * - original: An object with the original line and column positions.
+ * - source: The original source file (relative to the sourceRoot).
+ * - name: An optional original token name for this mapping.
+ */
+ SourceMapGenerator.prototype.addMapping =
+ function SourceMapGenerator_addMapping(aArgs) {
+ var generated = util.getArg(aArgs, 'generated');
+ var original = util.getArg(aArgs, 'original', null);
+ var source = util.getArg(aArgs, 'source', null);
+ var name = util.getArg(aArgs, 'name', null);
+
+ if (!this._skipValidation) {
+ this._validateMapping(generated, original, source, name);
+ }
+
+ if (source != null) {
+ source = String(source);
+ if (!this._sources.has(source)) {
+ this._sources.add(source);
+ }
+ }
+
+ if (name != null) {
+ name = String(name);
+ if (!this._names.has(name)) {
+ this._names.add(name);
+ }
+ }
+
+ this._mappings.add({
+ generatedLine: generated.line,
+ generatedColumn: generated.column,
+ originalLine: original != null && original.line,
+ originalColumn: original != null && original.column,
+ source: source,
+ name: name
+ });
+ };
+
+ /**
+ * Set the source content for a source file.
+ */
+ SourceMapGenerator.prototype.setSourceContent =
+ function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
+ var source = aSourceFile;
+ if (this._sourceRoot != null) {
+ source = util.relative(this._sourceRoot, source);
+ }
+
+ if (aSourceContent != null) {
+ // Add the source content to the _sourcesContents map.
+ // Create a new _sourcesContents map if the property is null.
+ if (!this._sourcesContents) {
+ this._sourcesContents = Object.create(null);
+ }
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
+ } else if (this._sourcesContents) {
+ // Remove the source file from the _sourcesContents map.
+ // If the _sourcesContents map is empty, set the property to null.
+ delete this._sourcesContents[util.toSetString(source)];
+ if (Object.keys(this._sourcesContents).length === 0) {
+ this._sourcesContents = null;
+ }
+ }
+ };
+
+ /**
+ * Applies the mappings of a sub-source-map for a specific source file to the
+ * source map being generated. Each mapping to the supplied source file is
+ * rewritten using the supplied source map. Note: The resolution for the
+ * resulting mappings is the minimium of this map and the supplied map.
+ *
+ * @param aSourceMapConsumer The source map to be applied.
+ * @param aSourceFile Optional. The filename of the source file.
+ * If omitted, SourceMapConsumer's file property will be used.
+ * @param aSourceMapPath Optional. The dirname of the path to the source map
+ * to be applied. If relative, it is relative to the SourceMapConsumer.
+ * This parameter is needed when the two source maps aren't in the same
+ * directory, and the source map to be applied contains relative source
+ * paths. If so, those relative source paths need to be rewritten
+ * relative to the SourceMapGenerator.
+ */
+ SourceMapGenerator.prototype.applySourceMap =
+ function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
+ var sourceFile = aSourceFile;
+ // If aSourceFile is omitted, we will use the file property of the SourceMap
+ if (aSourceFile == null) {
+ if (aSourceMapConsumer.file == null) {
+ throw new Error(
+ 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
+ 'or the source map\'s "file" property. Both were omitted.'
+ );
+ }
+ sourceFile = aSourceMapConsumer.file;
+ }
+ var sourceRoot = this._sourceRoot;
+ // Make "sourceFile" relative if an absolute Url is passed.
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ // Applying the SourceMap can add and remove items from the sources and
+ // the names array.
+ var newSources = new ArraySet();
+ var newNames = new ArraySet();
+
+ // Find mappings for the "sourceFile"
+ this._mappings.unsortedForEach(function (mapping) {
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
+ // Check if it can be mapped by the source map, then update the mapping.
+ var original = aSourceMapConsumer.originalPositionFor({
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ });
+ if (original.source != null) {
+ // Copy mapping
+ mapping.source = original.source;
+ if (aSourceMapPath != null) {
+ mapping.source = util.join(aSourceMapPath, mapping.source)
+ }
+ if (sourceRoot != null) {
+ mapping.source = util.relative(sourceRoot, mapping.source);
+ }
+ mapping.originalLine = original.line;
+ mapping.originalColumn = original.column;
+ if (original.name != null) {
+ mapping.name = original.name;
+ }
+ }
+ }
+
+ var source = mapping.source;
+ if (source != null && !newSources.has(source)) {
+ newSources.add(source);
+ }
+
+ var name = mapping.name;
+ if (name != null && !newNames.has(name)) {
+ newNames.add(name);
+ }
+
+ }, this);
+ this._sources = newSources;
+ this._names = newNames;
+
+ // Copy sourcesContents of applied map.
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aSourceMapPath != null) {
+ sourceFile = util.join(aSourceMapPath, sourceFile);
+ }
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ this.setSourceContent(sourceFile, content);
+ }
+ }, this);
+ };
+
+ /**
+ * A mapping can have one of the three levels of data:
+ *
+ * 1. Just the generated position.
+ * 2. The Generated position, original position, and original source.
+ * 3. Generated and original position, original source, as well as a name
+ * token.
+ *
+ * To maintain consistency, we validate that any new mapping being added falls
+ * in to one of these categories.
+ */
+ SourceMapGenerator.prototype._validateMapping =
+ function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
+ aName) {
+ // When aOriginal is truthy but has empty values for .line and .column,
+ // it is most likely a programmer error. In this case we throw a very
+ // specific error message to try to guide them the right way.
+ // For example: https://github.com/Polymer/polymer-bundler/pull/519
+ if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
+ throw new Error(
+ 'original.line and original.column are not numbers -- you probably meant to omit ' +
+ 'the original mapping entirely and only map the generated position. If so, pass ' +
+ 'null for the original mapping instead of an object with empty or null values.'
+ );
+ }
+
+ if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && !aOriginal && !aSource && !aName) {
+ // Case 1.
+ return;
+ }
+ else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aOriginal && 'line' in aOriginal && 'column' in aOriginal
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && aOriginal.line > 0 && aOriginal.column >= 0
+ && aSource) {
+ // Cases 2 and 3.
+ return;
+ }
+ else {
+ throw new Error('Invalid mapping: ' + JSON.stringify({
+ generated: aGenerated,
+ source: aSource,
+ original: aOriginal,
+ name: aName
+ }));
+ }
+ };
+
+ /**
+ * Serialize the accumulated mappings in to the stream of base 64 VLQs
+ * specified by the source map format.
+ */
+ SourceMapGenerator.prototype._serializeMappings =
+ function SourceMapGenerator_serializeMappings() {
+ var previousGeneratedColumn = 0;
+ var previousGeneratedLine = 1;
+ var previousOriginalColumn = 0;
+ var previousOriginalLine = 0;
+ var previousName = 0;
+ var previousSource = 0;
+ var result = '';
+ var next;
+ var mapping;
+ var nameIdx;
+ var sourceIdx;
+
+ var mappings = this._mappings.toArray();
+ for (var i = 0, len = mappings.length; i < len; i++) {
+ mapping = mappings[i];
+ next = ''
+
+ if (mapping.generatedLine !== previousGeneratedLine) {
+ previousGeneratedColumn = 0;
+ while (mapping.generatedLine !== previousGeneratedLine) {
+ next += ';';
+ previousGeneratedLine++;
+ }
+ }
+ else {
+ if (i > 0) {
+ if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
+ continue;
+ }
+ next += ',';
+ }
+ }
+
+ next += base64VLQ.encode(mapping.generatedColumn
+ - previousGeneratedColumn);
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (mapping.source != null) {
+ sourceIdx = this._sources.indexOf(mapping.source);
+ next += base64VLQ.encode(sourceIdx - previousSource);
+ previousSource = sourceIdx;
+
+ // lines are stored 0-based in SourceMap spec version 3
+ next += base64VLQ.encode(mapping.originalLine - 1
+ - previousOriginalLine);
+ previousOriginalLine = mapping.originalLine - 1;
+
+ next += base64VLQ.encode(mapping.originalColumn
+ - previousOriginalColumn);
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (mapping.name != null) {
+ nameIdx = this._names.indexOf(mapping.name);
+ next += base64VLQ.encode(nameIdx - previousName);
+ previousName = nameIdx;
+ }
+ }
+
+ result += next;
+ }
+
+ return result;
+ };
+
+ SourceMapGenerator.prototype._generateSourcesContent =
+ function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
+ return aSources.map(function (source) {
+ if (!this._sourcesContents) {
+ return null;
+ }
+ if (aSourceRoot != null) {
+ source = util.relative(aSourceRoot, source);
+ }
+ var key = util.toSetString(source);
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
+ ? this._sourcesContents[key]
+ : null;
+ }, this);
+ };
+
+ /**
+ * Externalize the source map.
+ */
+ SourceMapGenerator.prototype.toJSON =
+ function SourceMapGenerator_toJSON() {
+ var map = {
+ version: this._version,
+ sources: this._sources.toArray(),
+ names: this._names.toArray(),
+ mappings: this._serializeMappings()
+ };
+ if (this._file != null) {
+ map.file = this._file;
+ }
+ if (this._sourceRoot != null) {
+ map.sourceRoot = this._sourceRoot;
+ }
+ if (this._sourcesContents) {
+ map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
+ }
+
+ return map;
+ };
+
+ /**
+ * Render the source map being generated to a string.
+ */
+ SourceMapGenerator.prototype.toString =
+ function SourceMapGenerator_toString() {
+ return JSON.stringify(this.toJSON());
+ };
+
+ exports.SourceMapGenerator = SourceMapGenerator;
+
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ *
+ * Based on the Base 64 VLQ implementation in Closure Compiler:
+ * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
+ *
+ * Copyright 2011 The Closure Compiler Authors. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+ var base64 = __webpack_require__(3);
+
+ // A single base 64 digit can contain 6 bits of data. For the base 64 variable
+ // length quantities we use in the source map spec, the first bit is the sign,
+ // the next four bits are the actual value, and the 6th bit is the
+ // continuation bit. The continuation bit tells us whether there are more
+ // digits in this value following this digit.
+ //
+ // Continuation
+ // | Sign
+ // | |
+ // V V
+ // 101011
+
+ var VLQ_BASE_SHIFT = 5;
+
+ // binary: 100000
+ var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
+
+ // binary: 011111
+ var VLQ_BASE_MASK = VLQ_BASE - 1;
+
+ // binary: 100000
+ var VLQ_CONTINUATION_BIT = VLQ_BASE;
+
+ /**
+ * Converts from a two-complement value to a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
+ * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
+ */
+ function toVLQSigned(aValue) {
+ return aValue < 0
+ ? ((-aValue) << 1) + 1
+ : (aValue << 1) + 0;
+ }
+
+ /**
+ * Converts to a two-complement value from a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
+ * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
+ */
+ function fromVLQSigned(aValue) {
+ var isNegative = (aValue & 1) === 1;
+ var shifted = aValue >> 1;
+ return isNegative
+ ? -shifted
+ : shifted;
+ }
+
+ /**
+ * Returns the base 64 VLQ encoded value.
+ */
+ exports.encode = function base64VLQ_encode(aValue) {
+ var encoded = "";
+ var digit;
+
+ var vlq = toVLQSigned(aValue);
+
+ do {
+ digit = vlq & VLQ_BASE_MASK;
+ vlq >>>= VLQ_BASE_SHIFT;
+ if (vlq > 0) {
+ // There are still more digits in this value, so we must make sure the
+ // continuation bit is marked.
+ digit |= VLQ_CONTINUATION_BIT;
+ }
+ encoded += base64.encode(digit);
+ } while (vlq > 0);
+
+ return encoded;
+ };
+
+ /**
+ * Decodes the next base 64 VLQ value from the given string and returns the
+ * value and the rest of the string via the out parameter.
+ */
+ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
+ var strLen = aStr.length;
+ var result = 0;
+ var shift = 0;
+ var continuation, digit;
+
+ do {
+ if (aIndex >= strLen) {
+ throw new Error("Expected more digits in base 64 VLQ value.");
+ }
+
+ digit = base64.decode(aStr.charCodeAt(aIndex++));
+ if (digit === -1) {
+ throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
+ }
+
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
+ digit &= VLQ_BASE_MASK;
+ result = result + (digit << shift);
+ shift += VLQ_BASE_SHIFT;
+ } while (continuation);
+
+ aOutParam.value = fromVLQSigned(result);
+ aOutParam.rest = aIndex;
+ };
+
+
+/***/ }),
+/* 3 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+
+ /**
+ * Encode an integer in the range of 0 to 63 to a single base 64 digit.
+ */
+ exports.encode = function (number) {
+ if (0 <= number && number < intToCharMap.length) {
+ return intToCharMap[number];
+ }
+ throw new TypeError("Must be between 0 and 63: " + number);
+ };
+
+ /**
+ * Decode a single base 64 character code digit to an integer. Returns -1 on
+ * failure.
+ */
+ exports.decode = function (charCode) {
+ var bigA = 65; // 'A'
+ var bigZ = 90; // 'Z'
+
+ var littleA = 97; // 'a'
+ var littleZ = 122; // 'z'
+
+ var zero = 48; // '0'
+ var nine = 57; // '9'
+
+ var plus = 43; // '+'
+ var slash = 47; // '/'
+
+ var littleOffset = 26;
+ var numberOffset = 52;
+
+ // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ if (bigA <= charCode && charCode <= bigZ) {
+ return (charCode - bigA);
+ }
+
+ // 26 - 51: abcdefghijklmnopqrstuvwxyz
+ if (littleA <= charCode && charCode <= littleZ) {
+ return (charCode - littleA + littleOffset);
+ }
+
+ // 52 - 61: 0123456789
+ if (zero <= charCode && charCode <= nine) {
+ return (charCode - zero + numberOffset);
+ }
+
+ // 62: +
+ if (charCode == plus) {
+ return 62;
+ }
+
+ // 63: /
+ if (charCode == slash) {
+ return 63;
+ }
+
+ // Invalid base64 digit.
+ return -1;
+ };
+
+
+/***/ }),
+/* 4 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ /**
+ * This is a helper function for getting values from parameter/options
+ * objects.
+ *
+ * @param args The object we are extracting values from
+ * @param name The name of the property we are getting.
+ * @param defaultValue An optional value to return if the property is missing
+ * from the object. If this is not specified and the property is missing, an
+ * error will be thrown.
+ */
+ function getArg(aArgs, aName, aDefaultValue) {
+ if (aName in aArgs) {
+ return aArgs[aName];
+ } else if (arguments.length === 3) {
+ return aDefaultValue;
+ } else {
+ throw new Error('"' + aName + '" is a required argument.');
+ }
+ }
+ exports.getArg = getArg;
+
+ var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
+ var dataUrlRegexp = /^data:.+\,.+$/;
+
+ function urlParse(aUrl) {
+ var match = aUrl.match(urlRegexp);
+ if (!match) {
+ return null;
+ }
+ return {
+ scheme: match[1],
+ auth: match[2],
+ host: match[3],
+ port: match[4],
+ path: match[5]
+ };
+ }
+ exports.urlParse = urlParse;
+
+ function urlGenerate(aParsedUrl) {
+ var url = '';
+ if (aParsedUrl.scheme) {
+ url += aParsedUrl.scheme + ':';
+ }
+ url += '//';
+ if (aParsedUrl.auth) {
+ url += aParsedUrl.auth + '@';
+ }
+ if (aParsedUrl.host) {
+ url += aParsedUrl.host;
+ }
+ if (aParsedUrl.port) {
+ url += ":" + aParsedUrl.port
+ }
+ if (aParsedUrl.path) {
+ url += aParsedUrl.path;
+ }
+ return url;
+ }
+ exports.urlGenerate = urlGenerate;
+
+ /**
+ * Normalizes a path, or the path portion of a URL:
+ *
+ * - Replaces consecutive slashes with one slash.
+ * - Removes unnecessary '.' parts.
+ * - Removes unnecessary '<dir>/..' parts.
+ *
+ * Based on code in the Node.js 'path' core module.
+ *
+ * @param aPath The path or url to normalize.
+ */
+ function normalize(aPath) {
+ var path = aPath;
+ var url = urlParse(aPath);
+ if (url) {
+ if (!url.path) {
+ return aPath;
+ }
+ path = url.path;
+ }
+ var isAbsolute = exports.isAbsolute(path);
+
+ var parts = path.split(/\/+/);
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
+ part = parts[i];
+ if (part === '.') {
+ parts.splice(i, 1);
+ } else if (part === '..') {
+ up++;
+ } else if (up > 0) {
+ if (part === '') {
+ // The first part is blank if the path is absolute. Trying to go
+ // above the root is a no-op. Therefore we can remove all '..' parts
+ // directly after the root.
+ parts.splice(i + 1, up);
+ up = 0;
+ } else {
+ parts.splice(i, 2);
+ up--;
+ }
+ }
+ }
+ path = parts.join('/');
+
+ if (path === '') {
+ path = isAbsolute ? '/' : '.';
+ }
+
+ if (url) {
+ url.path = path;
+ return urlGenerate(url);
+ }
+ return path;
+ }
+ exports.normalize = normalize;
+
+ /**
+ * Joins two paths/URLs.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be joined with the root.
+ *
+ * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
+ * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
+ * first.
+ * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
+ * is updated with the result and aRoot is returned. Otherwise the result
+ * is returned.
+ * - If aPath is absolute, the result is aPath.
+ * - Otherwise the two paths are joined with a slash.
+ * - Joining for example 'http://' and 'www.example.com' is also supported.
+ */
+ function join(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+ if (aPath === "") {
+ aPath = ".";
+ }
+ var aPathUrl = urlParse(aPath);
+ var aRootUrl = urlParse(aRoot);
+ if (aRootUrl) {
+ aRoot = aRootUrl.path || '/';
+ }
+
+ // `join(foo, '//www.example.org')`
+ if (aPathUrl && !aPathUrl.scheme) {
+ if (aRootUrl) {
+ aPathUrl.scheme = aRootUrl.scheme;
+ }
+ return urlGenerate(aPathUrl);
+ }
+
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
+ return aPath;
+ }
+
+ // `join('http://', 'www.example.com')`
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
+ aRootUrl.host = aPath;
+ return urlGenerate(aRootUrl);
+ }
+
+ var joined = aPath.charAt(0) === '/'
+ ? aPath
+ : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
+
+ if (aRootUrl) {
+ aRootUrl.path = joined;
+ return urlGenerate(aRootUrl);
+ }
+ return joined;
+ }
+ exports.join = join;
+
+ exports.isAbsolute = function (aPath) {
+ return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
+ };
+
+ /**
+ * Make a path relative to a URL or another path.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be made relative to aRoot.
+ */
+ function relative(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+
+ aRoot = aRoot.replace(/\/$/, '');
+
+ // It is possible for the path to be above the root. In this case, simply
+ // checking whether the root is a prefix of the path won't work. Instead, we
+ // need to remove components from the root one by one, until either we find
+ // a prefix that fits, or we run out of components to remove.
+ var level = 0;
+ while (aPath.indexOf(aRoot + '/') !== 0) {
+ var index = aRoot.lastIndexOf("/");
+ if (index < 0) {
+ return aPath;
+ }
+
+ // If the only part of the root that is left is the scheme (i.e. http://,
+ // file:///, etc.), one or more slashes (/), or simply nothing at all, we
+ // have exhausted all components, so the path is not relative to the root.
+ aRoot = aRoot.slice(0, index);
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
+ return aPath;
+ }
+
+ ++level;
+ }
+
+ // Make sure we add a "../" for each component we removed from the root.
+ return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
+ }
+ exports.relative = relative;
+
+ var supportsNullProto = (function () {
+ var obj = Object.create(null);
+ return !('__proto__' in obj);
+ }());
+
+ function identity (s) {
+ return s;
+ }
+
+ /**
+ * Because behavior goes wacky when you set `__proto__` on objects, we
+ * have to prefix all the strings in our set with an arbitrary character.
+ *
+ * See https://github.com/mozilla/source-map/pull/31 and
+ * https://github.com/mozilla/source-map/issues/30
+ *
+ * @param String aStr
+ */
+ function toSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return '$' + aStr;
+ }
+
+ return aStr;
+ }
+ exports.toSetString = supportsNullProto ? identity : toSetString;
+
+ function fromSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return aStr.slice(1);
+ }
+
+ return aStr;
+ }
+ exports.fromSetString = supportsNullProto ? identity : fromSetString;
+
+ function isProtoString(s) {
+ if (!s) {
+ return false;
+ }
+
+ var length = s.length;
+
+ if (length < 9 /* "__proto__".length */) {
+ return false;
+ }
+
+ if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 2) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 4) !== 116 /* 't' */ ||
+ s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
+ s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
+ s.charCodeAt(length - 8) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 9) !== 95 /* '_' */) {
+ return false;
+ }
+
+ for (var i = length - 10; i >= 0; i--) {
+ if (s.charCodeAt(i) !== 36 /* '$' */) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Comparator between two mappings where the original positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same original source/line/column, but different generated
+ * line and column the same. Useful when searching for a mapping with a
+ * stubbed out mapping.
+ */
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
+ var cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0 || onlyCompareOriginal) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+ }
+ exports.compareByOriginalPositions = compareByOriginalPositions;
+
+ /**
+ * Comparator between two mappings with deflated source and name indices where
+ * the generated positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same generated line and column, but different
+ * source/name/original line and column the same. Useful when searching for a
+ * mapping with a stubbed out mapping.
+ */
+ function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0 || onlyCompareGenerated) {
+ return cmp;
+ }
+
+ cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+ }
+ exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
+
+ function strcmp(aStr1, aStr2) {
+ if (aStr1 === aStr2) {
+ return 0;
+ }
+
+ if (aStr1 > aStr2) {
+ return 1;
+ }
+
+ return -1;
+ }
+
+ /**
+ * Comparator between two mappings with inflated source and name strings where
+ * the generated positions are compared.
+ */
+ function compareByGeneratedPositionsInflated(mappingA, mappingB) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = strcmp(mappingA.source, mappingB.source);
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return strcmp(mappingA.name, mappingB.name);
+ }
+ exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
+
+
+/***/ }),
+/* 5 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+ var has = Object.prototype.hasOwnProperty;
+ var hasNativeMap = typeof Map !== "undefined";
+
+ /**
+ * A data structure which is a combination of an array and a set. Adding a new
+ * member is O(1), testing for membership is O(1), and finding the index of an
+ * element is O(1). Removing elements from the set is not supported. Only
+ * strings are supported for membership.
+ */
+ function ArraySet() {
+ this._array = [];
+ this._set = hasNativeMap ? new Map() : Object.create(null);
+ }
+
+ /**
+ * Static method for creating ArraySet instances from an existing array.
+ */
+ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
+ var set = new ArraySet();
+ for (var i = 0, len = aArray.length; i < len; i++) {
+ set.add(aArray[i], aAllowDuplicates);
+ }
+ return set;
+ };
+
+ /**
+ * Return how many unique items are in this ArraySet. If duplicates have been
+ * added, than those do not count towards the size.
+ *
+ * @returns Number
+ */
+ ArraySet.prototype.size = function ArraySet_size() {
+ return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
+ };
+
+ /**
+ * Add the given string to this set.
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
+ var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
+ var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
+ var idx = this._array.length;
+ if (!isDuplicate || aAllowDuplicates) {
+ this._array.push(aStr);
+ }
+ if (!isDuplicate) {
+ if (hasNativeMap) {
+ this._set.set(aStr, idx);
+ } else {
+ this._set[sStr] = idx;
+ }
+ }
+ };
+
+ /**
+ * Is the given string a member of this set?
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.has = function ArraySet_has(aStr) {
+ if (hasNativeMap) {
+ return this._set.has(aStr);
+ } else {
+ var sStr = util.toSetString(aStr);
+ return has.call(this._set, sStr);
+ }
+ };
+
+ /**
+ * What is the index of the given string in the array?
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
+ if (hasNativeMap) {
+ var idx = this._set.get(aStr);
+ if (idx >= 0) {
+ return idx;
+ }
+ } else {
+ var sStr = util.toSetString(aStr);
+ if (has.call(this._set, sStr)) {
+ return this._set[sStr];
+ }
+ }
+
+ throw new Error('"' + aStr + '" is not in the set.');
+ };
+
+ /**
+ * What is the element at the given index?
+ *
+ * @param Number aIdx
+ */
+ ArraySet.prototype.at = function ArraySet_at(aIdx) {
+ if (aIdx >= 0 && aIdx < this._array.length) {
+ return this._array[aIdx];
+ }
+ throw new Error('No element indexed by ' + aIdx);
+ };
+
+ /**
+ * Returns the array representation of this set (which has the proper indices
+ * indicated by indexOf). Note that this is a copy of the internal array used
+ * for storing the members so that no one can mess with internal state.
+ */
+ ArraySet.prototype.toArray = function ArraySet_toArray() {
+ return this._array.slice();
+ };
+
+ exports.ArraySet = ArraySet;
+
+
+/***/ }),
+/* 6 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2014 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+
+ /**
+ * Determine whether mappingB is after mappingA with respect to generated
+ * position.
+ */
+ function generatedPositionAfter(mappingA, mappingB) {
+ // Optimized for most common case
+ var lineA = mappingA.generatedLine;
+ var lineB = mappingB.generatedLine;
+ var columnA = mappingA.generatedColumn;
+ var columnB = mappingB.generatedColumn;
+ return lineB > lineA || lineB == lineA && columnB >= columnA ||
+ util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
+ }
+
+ /**
+ * A data structure to provide a sorted view of accumulated mappings in a
+ * performance conscious manner. It trades a neglibable overhead in general
+ * case for a large speedup in case of mappings being added in order.
+ */
+ function MappingList() {
+ this._array = [];
+ this._sorted = true;
+ // Serves as infimum
+ this._last = {generatedLine: -1, generatedColumn: 0};
+ }
+
+ /**
+ * Iterate through internal items. This method takes the same arguments that
+ * `Array.prototype.forEach` takes.
+ *
+ * NOTE: The order of the mappings is NOT guaranteed.
+ */
+ MappingList.prototype.unsortedForEach =
+ function MappingList_forEach(aCallback, aThisArg) {
+ this._array.forEach(aCallback, aThisArg);
+ };
+
+ /**
+ * Add the given source mapping.
+ *
+ * @param Object aMapping
+ */
+ MappingList.prototype.add = function MappingList_add(aMapping) {
+ if (generatedPositionAfter(this._last, aMapping)) {
+ this._last = aMapping;
+ this._array.push(aMapping);
+ } else {
+ this._sorted = false;
+ this._array.push(aMapping);
+ }
+ };
+
+ /**
+ * Returns the flat, sorted array of mappings. The mappings are sorted by
+ * generated position.
+ *
+ * WARNING: This method returns internal data without copying, for
+ * performance. The return value must NOT be mutated, and should be treated as
+ * an immutable borrow. If you want to take ownership, you must make your own
+ * copy.
+ */
+ MappingList.prototype.toArray = function MappingList_toArray() {
+ if (!this._sorted) {
+ this._array.sort(util.compareByGeneratedPositionsInflated);
+ this._sorted = true;
+ }
+ return this._array;
+ };
+
+ exports.MappingList = MappingList;
+
+
+/***/ }),
+/* 7 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var util = __webpack_require__(4);
+ var binarySearch = __webpack_require__(8);
+ var ArraySet = __webpack_require__(5).ArraySet;
+ var base64VLQ = __webpack_require__(2);
+ var quickSort = __webpack_require__(9).quickSort;
+
+ function SourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ return sourceMap.sections != null
+ ? new IndexedSourceMapConsumer(sourceMap)
+ : new BasicSourceMapConsumer(sourceMap);
+ }
+
+ SourceMapConsumer.fromSourceMap = function(aSourceMap) {
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
+ }
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ SourceMapConsumer.prototype._version = 3;
+
+ // `__generatedMappings` and `__originalMappings` are arrays that hold the
+ // parsed mapping coordinates from the source map's "mappings" attribute. They
+ // are lazily instantiated, accessed via the `_generatedMappings` and
+ // `_originalMappings` getters respectively, and we only parse the mappings
+ // and create these arrays once queried for a source location. We jump through
+ // these hoops because there can be many thousands of mappings, and parsing
+ // them is expensive, so we only want to do it if we must.
+ //
+ // Each object in the arrays is of the form:
+ //
+ // {
+ // generatedLine: The line number in the generated code,
+ // generatedColumn: The column number in the generated code,
+ // source: The path to the original source file that generated this
+ // chunk of code,
+ // originalLine: The line number in the original source that
+ // corresponds to this chunk of generated code,
+ // originalColumn: The column number in the original source that
+ // corresponds to this chunk of generated code,
+ // name: The name of the original symbol which generated this chunk of
+ // code.
+ // }
+ //
+ // All properties except for `generatedLine` and `generatedColumn` can be
+ // `null`.
+ //
+ // `_generatedMappings` is ordered by the generated positions.
+ //
+ // `_originalMappings` is ordered by the original positions.
+
+ SourceMapConsumer.prototype.__generatedMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
+ get: function () {
+ if (!this.__generatedMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__generatedMappings;
+ }
+ });
+
+ SourceMapConsumer.prototype.__originalMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
+ get: function () {
+ if (!this.__originalMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__originalMappings;
+ }
+ });
+
+ SourceMapConsumer.prototype._charIsMappingSeparator =
+ function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
+ var c = aStr.charAt(index);
+ return c === ";" || c === ",";
+ };
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ SourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ throw new Error("Subclasses must implement _parseMappings");
+ };
+
+ SourceMapConsumer.GENERATED_ORDER = 1;
+ SourceMapConsumer.ORIGINAL_ORDER = 2;
+
+ SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
+ SourceMapConsumer.LEAST_UPPER_BOUND = 2;
+
+ /**
+ * Iterate over each mapping between an original source/line/column and a
+ * generated line/column in this source map.
+ *
+ * @param Function aCallback
+ * The function that is called with each mapping.
+ * @param Object aContext
+ * Optional. If specified, this object will be the value of `this` every
+ * time that `aCallback` is called.
+ * @param aOrder
+ * Either `SourceMapConsumer.GENERATED_ORDER` or
+ * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
+ * iterate over the mappings sorted by the generated file's line/column
+ * order or the original's source/line/column order, respectively. Defaults to
+ * `SourceMapConsumer.GENERATED_ORDER`.
+ */
+ SourceMapConsumer.prototype.eachMapping =
+ function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
+ var context = aContext || null;
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
+
+ var mappings;
+ switch (order) {
+ case SourceMapConsumer.GENERATED_ORDER:
+ mappings = this._generatedMappings;
+ break;
+ case SourceMapConsumer.ORIGINAL_ORDER:
+ mappings = this._originalMappings;
+ break;
+ default:
+ throw new Error("Unknown order of iteration.");
+ }
+
+ var sourceRoot = this.sourceRoot;
+ mappings.map(function (mapping) {
+ var source = mapping.source === null ? null : this._sources.at(mapping.source);
+ if (source != null && sourceRoot != null) {
+ source = util.join(sourceRoot, source);
+ }
+ return {
+ source: source,
+ generatedLine: mapping.generatedLine,
+ generatedColumn: mapping.generatedColumn,
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: mapping.name === null ? null : this._names.at(mapping.name)
+ };
+ }, this).forEach(aCallback, context);
+ };
+
+ /**
+ * Returns all generated line and column information for the original source,
+ * line, and column provided. If no column is provided, returns all mappings
+ * corresponding to a either the line we are searching for or the next
+ * closest line that has any mappings. Otherwise, returns all mappings
+ * corresponding to the given line and either the column we are searching for
+ * or the next closest column that has any offsets.
+ *
+ * The only argument is an object with the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: Optional. the column number in the original source.
+ *
+ * and an array of objects is returned, each with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ SourceMapConsumer.prototype.allGeneratedPositionsFor =
+ function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
+ var line = util.getArg(aArgs, 'line');
+
+ // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
+ // returns the index of the closest mapping less than the needle. By
+ // setting needle.originalColumn to 0, we thus find the last mapping for
+ // the given line, provided such a mapping exists.
+ var needle = {
+ source: util.getArg(aArgs, 'source'),
+ originalLine: line,
+ originalColumn: util.getArg(aArgs, 'column', 0)
+ };
+
+ if (this.sourceRoot != null) {
+ needle.source = util.relative(this.sourceRoot, needle.source);
+ }
+ if (!this._sources.has(needle.source)) {
+ return [];
+ }
+ needle.source = this._sources.indexOf(needle.source);
+
+ var mappings = [];
+
+ var index = this._findMapping(needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ binarySearch.LEAST_UPPER_BOUND);
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (aArgs.column === undefined) {
+ var originalLine = mapping.originalLine;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we found. Since
+ // mappings are sorted, this is guaranteed to find all mappings for
+ // the line we found.
+ while (mapping && mapping.originalLine === originalLine) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ } else {
+ var originalColumn = mapping.originalColumn;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we were searching for.
+ // Since mappings are sorted, this is guaranteed to find all mappings for
+ // the line we are searching for.
+ while (mapping &&
+ mapping.originalLine === line &&
+ mapping.originalColumn == originalColumn) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ }
+ }
+
+ return mappings;
+ };
+
+ exports.SourceMapConsumer = SourceMapConsumer;
+
+ /**
+ * A BasicSourceMapConsumer instance represents a parsed source map which we can
+ * query for information about the original file positions by giving it a file
+ * position in the generated source.
+ *
+ * The only parameter is the raw source map (either as a JSON string, or
+ * already parsed to an object). According to the spec, source maps have the
+ * following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - sources: An array of URLs to the original source files.
+ * - names: An array of identifiers which can be referrenced by individual mappings.
+ * - sourceRoot: Optional. The URL root from which all sources are relative.
+ * - sourcesContent: Optional. An array of contents of the original source files.
+ * - mappings: A string of base64 VLQs which contain the actual mappings.
+ * - file: Optional. The generated file this source map is associated with.
+ *
+ * Here is an example source map, taken from the source map spec[0]:
+ *
+ * {
+ * version : 3,
+ * file: "out.js",
+ * sourceRoot : "",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AA,AB;;ABCDE;"
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
+ */
+ function BasicSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sources = util.getArg(sourceMap, 'sources');
+ // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
+ // requires the array) to play nice here.
+ var names = util.getArg(sourceMap, 'names', []);
+ var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
+ var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
+ var mappings = util.getArg(sourceMap, 'mappings');
+ var file = util.getArg(sourceMap, 'file', null);
+
+ // Once again, Sass deviates from the spec and supplies the version as a
+ // string rather than a number, so we use loose equality checking here.
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ sources = sources
+ .map(String)
+ // Some source maps produce relative source paths like "./foo.js" instead of
+ // "foo.js". Normalize these first so that future comparisons will succeed.
+ // See bugzil.la/1090768.
+ .map(util.normalize)
+ // Always ensure that absolute sources are internally stored relative to
+ // the source root, if the source root is absolute. Not doing this would
+ // be particularly problematic when the source root is a prefix of the
+ // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
+ .map(function (source) {
+ return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
+ ? util.relative(sourceRoot, source)
+ : source;
+ });
+
+ // Pass `true` below to allow duplicate names and sources. While source maps
+ // are intended to be compressed and deduplicated, the TypeScript compiler
+ // sometimes generates source maps with duplicates in them. See Github issue
+ // #72 and bugzil.la/889492.
+ this._names = ArraySet.fromArray(names.map(String), true);
+ this._sources = ArraySet.fromArray(sources, true);
+
+ this.sourceRoot = sourceRoot;
+ this.sourcesContent = sourcesContent;
+ this._mappings = mappings;
+ this.file = file;
+ }
+
+ BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
+
+ /**
+ * Create a BasicSourceMapConsumer from a SourceMapGenerator.
+ *
+ * @param SourceMapGenerator aSourceMap
+ * The source map that will be consumed.
+ * @returns BasicSourceMapConsumer
+ */
+ BasicSourceMapConsumer.fromSourceMap =
+ function SourceMapConsumer_fromSourceMap(aSourceMap) {
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
+
+ var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
+ var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
+ smc.sourceRoot = aSourceMap._sourceRoot;
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
+ smc.sourceRoot);
+ smc.file = aSourceMap._file;
+
+ // Because we are modifying the entries (by converting string sources and
+ // names to indices into the sources and names ArraySets), we have to make
+ // a copy of the entry or else bad things happen. Shared mutable state
+ // strikes again! See github issue #191.
+
+ var generatedMappings = aSourceMap._mappings.toArray().slice();
+ var destGeneratedMappings = smc.__generatedMappings = [];
+ var destOriginalMappings = smc.__originalMappings = [];
+
+ for (var i = 0, length = generatedMappings.length; i < length; i++) {
+ var srcMapping = generatedMappings[i];
+ var destMapping = new Mapping;
+ destMapping.generatedLine = srcMapping.generatedLine;
+ destMapping.generatedColumn = srcMapping.generatedColumn;
+
+ if (srcMapping.source) {
+ destMapping.source = sources.indexOf(srcMapping.source);
+ destMapping.originalLine = srcMapping.originalLine;
+ destMapping.originalColumn = srcMapping.originalColumn;
+
+ if (srcMapping.name) {
+ destMapping.name = names.indexOf(srcMapping.name);
+ }
+
+ destOriginalMappings.push(destMapping);
+ }
+
+ destGeneratedMappings.push(destMapping);
+ }
+
+ quickSort(smc.__originalMappings, util.compareByOriginalPositions);
+
+ return smc;
+ };
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ BasicSourceMapConsumer.prototype._version = 3;
+
+ /**
+ * The list of original sources.
+ */
+ Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ return this._sources.toArray().map(function (s) {
+ return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
+ }, this);
+ }
+ });
+
+ /**
+ * Provide the JIT with a nice shape / hidden class.
+ */
+ function Mapping() {
+ this.generatedLine = 0;
+ this.generatedColumn = 0;
+ this.source = null;
+ this.originalLine = null;
+ this.originalColumn = null;
+ this.name = null;
+ }
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ BasicSourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ var generatedLine = 1;
+ var previousGeneratedColumn = 0;
+ var previousOriginalLine = 0;
+ var previousOriginalColumn = 0;
+ var previousSource = 0;
+ var previousName = 0;
+ var length = aStr.length;
+ var index = 0;
+ var cachedSegments = {};
+ var temp = {};
+ var originalMappings = [];
+ var generatedMappings = [];
+ var mapping, str, segment, end, value;
+
+ while (index < length) {
+ if (aStr.charAt(index) === ';') {
+ generatedLine++;
+ index++;
+ previousGeneratedColumn = 0;
+ }
+ else if (aStr.charAt(index) === ',') {
+ index++;
+ }
+ else {
+ mapping = new Mapping();
+ mapping.generatedLine = generatedLine;
+
+ // Because each offset is encoded relative to the previous one,
+ // many segments often have the same encoding. We can exploit this
+ // fact by caching the parsed variable length fields of each segment,
+ // allowing us to avoid a second parse if we encounter the same
+ // segment again.
+ for (end = index; end < length; end++) {
+ if (this._charIsMappingSeparator(aStr, end)) {
+ break;
+ }
+ }
+ str = aStr.slice(index, end);
+
+ segment = cachedSegments[str];
+ if (segment) {
+ index += str.length;
+ } else {
+ segment = [];
+ while (index < end) {
+ base64VLQ.decode(aStr, index, temp);
+ value = temp.value;
+ index = temp.rest;
+ segment.push(value);
+ }
+
+ if (segment.length === 2) {
+ throw new Error('Found a source, but no line and column');
+ }
+
+ if (segment.length === 3) {
+ throw new Error('Found a source and line, but no column');
+ }
+
+ cachedSegments[str] = segment;
+ }
+
+ // Generated column.
+ mapping.generatedColumn = previousGeneratedColumn + segment[0];
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (segment.length > 1) {
+ // Original source.
+ mapping.source = previousSource + segment[1];
+ previousSource += segment[1];
+
+ // Original line.
+ mapping.originalLine = previousOriginalLine + segment[2];
+ previousOriginalLine = mapping.originalLine;
+ // Lines are stored 0-based
+ mapping.originalLine += 1;
+
+ // Original column.
+ mapping.originalColumn = previousOriginalColumn + segment[3];
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (segment.length > 4) {
+ // Original name.
+ mapping.name = previousName + segment[4];
+ previousName += segment[4];
+ }
+ }
+
+ generatedMappings.push(mapping);
+ if (typeof mapping.originalLine === 'number') {
+ originalMappings.push(mapping);
+ }
+ }
+ }
+
+ quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
+ this.__generatedMappings = generatedMappings;
+
+ quickSort(originalMappings, util.compareByOriginalPositions);
+ this.__originalMappings = originalMappings;
+ };
+
+ /**
+ * Find the mapping that best matches the hypothetical "needle" mapping that
+ * we are searching for in the given "haystack" of mappings.
+ */
+ BasicSourceMapConsumer.prototype._findMapping =
+ function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
+ aColumnName, aComparator, aBias) {
+ // To return the position we are searching for, we must first find the
+ // mapping for the given position and then return the opposite position it
+ // points to. Because the mappings are sorted, we can use binary search to
+ // find the best mapping.
+
+ if (aNeedle[aLineName] <= 0) {
+ throw new TypeError('Line must be greater than or equal to 1, got '
+ + aNeedle[aLineName]);
+ }
+ if (aNeedle[aColumnName] < 0) {
+ throw new TypeError('Column must be greater than or equal to 0, got '
+ + aNeedle[aColumnName]);
+ }
+
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
+ };
+
+ /**
+ * Compute the last column for each generated mapping. The last column is
+ * inclusive.
+ */
+ BasicSourceMapConsumer.prototype.computeColumnSpans =
+ function SourceMapConsumer_computeColumnSpans() {
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
+ var mapping = this._generatedMappings[index];
+
+ // Mappings do not contain a field for the last generated columnt. We
+ // can come up with an optimistic estimate, however, by assuming that
+ // mappings are contiguous (i.e. given two consecutive mappings, the
+ // first mapping ends where the second one starts).
+ if (index + 1 < this._generatedMappings.length) {
+ var nextMapping = this._generatedMappings[index + 1];
+
+ if (mapping.generatedLine === nextMapping.generatedLine) {
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
+ continue;
+ }
+ }
+
+ // The last mapping for each line spans the entire line.
+ mapping.lastGeneratedColumn = Infinity;
+ }
+ };
+
+ /**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+ BasicSourceMapConsumer.prototype.originalPositionFor =
+ function SourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._generatedMappings,
+ "generatedLine",
+ "generatedColumn",
+ util.compareByGeneratedPositionsDeflated,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._generatedMappings[index];
+
+ if (mapping.generatedLine === needle.generatedLine) {
+ var source = util.getArg(mapping, 'source', null);
+ if (source !== null) {
+ source = this._sources.at(source);
+ if (this.sourceRoot != null) {
+ source = util.join(this.sourceRoot, source);
+ }
+ }
+ var name = util.getArg(mapping, 'name', null);
+ if (name !== null) {
+ name = this._names.at(name);
+ }
+ return {
+ source: source,
+ line: util.getArg(mapping, 'originalLine', null),
+ column: util.getArg(mapping, 'originalColumn', null),
+ name: name
+ };
+ }
+ }
+
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ };
+
+ /**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+ BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function BasicSourceMapConsumer_hasContentsOfAllSources() {
+ if (!this.sourcesContent) {
+ return false;
+ }
+ return this.sourcesContent.length >= this._sources.size() &&
+ !this.sourcesContent.some(function (sc) { return sc == null; });
+ };
+
+ /**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+ BasicSourceMapConsumer.prototype.sourceContentFor =
+ function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ if (!this.sourcesContent) {
+ return null;
+ }
+
+ if (this.sourceRoot != null) {
+ aSource = util.relative(this.sourceRoot, aSource);
+ }
+
+ if (this._sources.has(aSource)) {
+ return this.sourcesContent[this._sources.indexOf(aSource)];
+ }
+
+ var url;
+ if (this.sourceRoot != null
+ && (url = util.urlParse(this.sourceRoot))) {
+ // XXX: file:// URIs and absolute paths lead to unexpected behavior for
+ // many users. We can help them out when they expect file:// URIs to
+ // behave like it would if they were running a local HTTP server. See
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
+ var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
+ if (url.scheme == "file"
+ && this._sources.has(fileUriAbsPath)) {
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
+ }
+
+ if ((!url.path || url.path == "/")
+ && this._sources.has("/" + aSource)) {
+ return this.sourcesContent[this._sources.indexOf("/" + aSource)];
+ }
+ }
+
+ // This function is used recursively from
+ // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
+ // don't want to throw if we can't find the source - we just want to
+ // return null, so we provide a flag to exit gracefully.
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+ /**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ BasicSourceMapConsumer.prototype.generatedPositionFor =
+ function SourceMapConsumer_generatedPositionFor(aArgs) {
+ var source = util.getArg(aArgs, 'source');
+ if (this.sourceRoot != null) {
+ source = util.relative(this.sourceRoot, source);
+ }
+ if (!this._sources.has(source)) {
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ }
+ source = this._sources.indexOf(source);
+
+ var needle = {
+ source: source,
+ originalLine: util.getArg(aArgs, 'line'),
+ originalColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (mapping.source === needle.source) {
+ return {
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ };
+ }
+ }
+
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ };
+
+ exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
+
+ /**
+ * An IndexedSourceMapConsumer instance represents a parsed source map which
+ * we can query for information. It differs from BasicSourceMapConsumer in
+ * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
+ * input.
+ *
+ * The only parameter is a raw source map (either as a JSON string, or already
+ * parsed to an object). According to the spec for indexed source maps, they
+ * have the following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - file: Optional. The generated file this source map is associated with.
+ * - sections: A list of section definitions.
+ *
+ * Each value under the "sections" field has two fields:
+ * - offset: The offset into the original specified at which this section
+ * begins to apply, defined as an object with a "line" and "column"
+ * field.
+ * - map: A source map definition. This source map could also be indexed,
+ * but doesn't have to be.
+ *
+ * Instead of the "map" field, it's also possible to have a "url" field
+ * specifying a URL to retrieve a source map from, but that's currently
+ * unsupported.
+ *
+ * Here's an example source map, taken from the source map spec[0], but
+ * modified to omit a section which uses the "url" field.
+ *
+ * {
+ * version : 3,
+ * file: "app.js",
+ * sections: [{
+ * offset: {line:100, column:10},
+ * map: {
+ * version : 3,
+ * file: "section.js",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AAAA,E;;ABCDE;"
+ * }
+ * }],
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
+ */
+ function IndexedSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sections = util.getArg(sourceMap, 'sections');
+
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+
+ var lastOffset = {
+ line: -1,
+ column: 0
+ };
+ this._sections = sections.map(function (s) {
+ if (s.url) {
+ // The url field will require support for asynchronicity.
+ // See https://github.com/mozilla/source-map/issues/16
+ throw new Error('Support for url field in sections not implemented.');
+ }
+ var offset = util.getArg(s, 'offset');
+ var offsetLine = util.getArg(offset, 'line');
+ var offsetColumn = util.getArg(offset, 'column');
+
+ if (offsetLine < lastOffset.line ||
+ (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
+ throw new Error('Section offsets must be ordered and non-overlapping.');
+ }
+ lastOffset = offset;
+
+ return {
+ generatedOffset: {
+ // The offset fields are 0-based, but we use 1-based indices when
+ // encoding/decoding from VLQ.
+ generatedLine: offsetLine + 1,
+ generatedColumn: offsetColumn + 1
+ },
+ consumer: new SourceMapConsumer(util.getArg(s, 'map'))
+ }
+ });
+ }
+
+ IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+ IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ IndexedSourceMapConsumer.prototype._version = 3;
+
+ /**
+ * The list of original sources.
+ */
+ Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ var sources = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
+ sources.push(this._sections[i].consumer.sources[j]);
+ }
+ }
+ return sources;
+ }
+ });
+
+ /**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+ IndexedSourceMapConsumer.prototype.originalPositionFor =
+ function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ // Find the section containing the generated position we're trying to map
+ // to an original position.
+ var sectionIndex = binarySearch.search(needle, this._sections,
+ function(needle, section) {
+ var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ return (needle.generatedColumn -
+ section.generatedOffset.generatedColumn);
+ });
+ var section = this._sections[sectionIndex];
+
+ if (!section) {
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ }
+
+ return section.consumer.originalPositionFor({
+ line: needle.generatedLine -
+ (section.generatedOffset.generatedLine - 1),
+ column: needle.generatedColumn -
+ (section.generatedOffset.generatedLine === needle.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ bias: aArgs.bias
+ });
+ };
+
+ /**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+ IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function IndexedSourceMapConsumer_hasContentsOfAllSources() {
+ return this._sections.every(function (s) {
+ return s.consumer.hasContentsOfAllSources();
+ });
+ };
+
+ /**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+ IndexedSourceMapConsumer.prototype.sourceContentFor =
+ function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ var content = section.consumer.sourceContentFor(aSource, true);
+ if (content) {
+ return content;
+ }
+ }
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+ /**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ IndexedSourceMapConsumer.prototype.generatedPositionFor =
+ function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ // Only consider this section if the requested source is in the list of
+ // sources of the consumer.
+ if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
+ continue;
+ }
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
+ if (generatedPosition) {
+ var ret = {
+ line: generatedPosition.line +
+ (section.generatedOffset.generatedLine - 1),
+ column: generatedPosition.column +
+ (section.generatedOffset.generatedLine === generatedPosition.line
+ ? section.generatedOffset.generatedColumn - 1
+ : 0)
+ };
+ return ret;
+ }
+ }
+
+ return {
+ line: null,
+ column: null
+ };
+ };
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ IndexedSourceMapConsumer.prototype._parseMappings =
+ function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+ var sectionMappings = section.consumer._generatedMappings;
+ for (var j = 0; j < sectionMappings.length; j++) {
+ var mapping = sectionMappings[j];
+
+ var source = section.consumer._sources.at(mapping.source);
+ if (section.consumer.sourceRoot !== null) {
+ source = util.join(section.consumer.sourceRoot, source);
+ }
+ this._sources.add(source);
+ source = this._sources.indexOf(source);
+
+ var name = section.consumer._names.at(mapping.name);
+ this._names.add(name);
+ name = this._names.indexOf(name);
+
+ // The mappings coming from the consumer for the section have
+ // generated positions relative to the start of the section, so we
+ // need to offset them to be relative to the start of the concatenated
+ // generated file.
+ var adjustedMapping = {
+ source: source,
+ generatedLine: mapping.generatedLine +
+ (section.generatedOffset.generatedLine - 1),
+ generatedColumn: mapping.generatedColumn +
+ (section.generatedOffset.generatedLine === mapping.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: name
+ };
+
+ this.__generatedMappings.push(adjustedMapping);
+ if (typeof adjustedMapping.originalLine === 'number') {
+ this.__originalMappings.push(adjustedMapping);
+ }
+ }
+ }
+
+ quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
+ quickSort(this.__originalMappings, util.compareByOriginalPositions);
+ };
+
+ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
+
+
+/***/ }),
+/* 8 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ exports.GREATEST_LOWER_BOUND = 1;
+ exports.LEAST_UPPER_BOUND = 2;
+
+ /**
+ * Recursive implementation of binary search.
+ *
+ * @param aLow Indices here and lower do not contain the needle.
+ * @param aHigh Indices here and higher do not contain the needle.
+ * @param aNeedle The element being searched for.
+ * @param aHaystack The non-empty array being searched.
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ */
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
+ // This function terminates when one of the following is true:
+ //
+ // 1. We find the exact element we are looking for.
+ //
+ // 2. We did not find the exact element, but we can return the index of
+ // the next-closest element.
+ //
+ // 3. We did not find the exact element, and there is no next-closest
+ // element than the one we are searching for, so we return -1.
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
+ if (cmp === 0) {
+ // Found the element we are looking for.
+ return mid;
+ }
+ else if (cmp > 0) {
+ // Our needle is greater than aHaystack[mid].
+ if (aHigh - mid > 1) {
+ // The element is in the upper half.
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // The exact needle element was not found in this haystack. Determine if
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return aHigh < aHaystack.length ? aHigh : -1;
+ } else {
+ return mid;
+ }
+ }
+ else {
+ // Our needle is less than aHaystack[mid].
+ if (mid - aLow > 1) {
+ // The element is in the lower half.
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return mid;
+ } else {
+ return aLow < 0 ? -1 : aLow;
+ }
+ }
+ }
+
+ /**
+ * This is an implementation of binary search which will always try and return
+ * the index of the closest element if there is no exact hit. This is because
+ * mappings between original and generated line/col pairs are single points,
+ * and there is an implicit region between each of them, so a miss just means
+ * that you aren't on the very start of a region.
+ *
+ * @param aNeedle The element you are looking for.
+ * @param aHaystack The array that is being searched.
+ * @param aCompare A function which takes the needle and an element in the
+ * array and returns -1, 0, or 1 depending on whether the needle is less
+ * than, equal to, or greater than the element, respectively.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
+ */
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
+ if (aHaystack.length === 0) {
+ return -1;
+ }
+
+ var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
+ aCompare, aBias || exports.GREATEST_LOWER_BOUND);
+ if (index < 0) {
+ return -1;
+ }
+
+ // We have found either the exact element, or the next-closest element than
+ // the one we are searching for. However, there may be more than one such
+ // element. Make sure we always return the smallest of these.
+ while (index - 1 >= 0) {
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
+ break;
+ }
+ --index;
+ }
+
+ return index;
+ };
+
+
+/***/ }),
+/* 9 */
+/***/ (function(module, exports) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ // It turns out that some (most?) JavaScript engines don't self-host
+ // `Array.prototype.sort`. This makes sense because C++ will likely remain
+ // faster than JS when doing raw CPU-intensive sorting. However, when using a
+ // custom comparator function, calling back and forth between the VM's C++ and
+ // JIT'd JS is rather slow *and* loses JIT type information, resulting in
+ // worse generated code for the comparator function than would be optimal. In
+ // fact, when sorting with a comparator, these costs outweigh the benefits of
+ // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
+ // a ~3500ms mean speed-up in `bench/bench.html`.
+
+ /**
+ * Swap the elements indexed by `x` and `y` in the array `ary`.
+ *
+ * @param {Array} ary
+ * The array.
+ * @param {Number} x
+ * The index of the first item.
+ * @param {Number} y
+ * The index of the second item.
+ */
+ function swap(ary, x, y) {
+ var temp = ary[x];
+ ary[x] = ary[y];
+ ary[y] = temp;
+ }
+
+ /**
+ * Returns a random integer within the range `low .. high` inclusive.
+ *
+ * @param {Number} low
+ * The lower bound on the range.
+ * @param {Number} high
+ * The upper bound on the range.
+ */
+ function randomIntInRange(low, high) {
+ return Math.round(low + (Math.random() * (high - low)));
+ }
+
+ /**
+ * The Quick Sort algorithm.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ * @param {Number} p
+ * Start index of the array
+ * @param {Number} r
+ * End index of the array
+ */
+ function doQuickSort(ary, comparator, p, r) {
+ // If our lower bound is less than our upper bound, we (1) partition the
+ // array into two pieces and (2) recurse on each half. If it is not, this is
+ // the empty array and our base case.
+
+ if (p < r) {
+ // (1) Partitioning.
+ //
+ // The partitioning chooses a pivot between `p` and `r` and moves all
+ // elements that are less than or equal to the pivot to the before it, and
+ // all the elements that are greater than it after it. The effect is that
+ // once partition is done, the pivot is in the exact place it will be when
+ // the array is put in sorted order, and it will not need to be moved
+ // again. This runs in O(n) time.
+
+ // Always choose a random pivot so that an input array which is reverse
+ // sorted does not cause O(n^2) running time.
+ var pivotIndex = randomIntInRange(p, r);
+ var i = p - 1;
+
+ swap(ary, pivotIndex, r);
+ var pivot = ary[r];
+
+ // Immediately after `j` is incremented in this loop, the following hold
+ // true:
+ //
+ // * Every element in `ary[p .. i]` is less than or equal to the pivot.
+ //
+ // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
+ for (var j = p; j < r; j++) {
+ if (comparator(ary[j], pivot) <= 0) {
+ i += 1;
+ swap(ary, i, j);
+ }
+ }
+
+ swap(ary, i + 1, j);
+ var q = i + 1;
+
+ // (2) Recurse on each half.
+
+ doQuickSort(ary, comparator, p, q - 1);
+ doQuickSort(ary, comparator, q + 1, r);
+ }
+ }
+
+ /**
+ * Sort the given array in-place with the given comparator function.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ */
+ exports.quickSort = function (ary, comparator) {
+ doQuickSort(ary, comparator, 0, ary.length - 1);
+ };
+
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* -*- Mode: js; js-indent-level: 2; -*- */
+ /*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+ var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
+ var util = __webpack_require__(4);
+
+ // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
+ // operating systems these days (capturing the result).
+ var REGEX_NEWLINE = /(\r?\n)/;
+
+ // Newline character code for charCodeAt() comparisons
+ var NEWLINE_CODE = 10;
+
+ // Private symbol for identifying `SourceNode`s when multiple versions of
+ // the source-map library are loaded. This MUST NOT CHANGE across
+ // versions!
+ var isSourceNode = "$$$isSourceNode$$$";
+
+ /**
+ * SourceNodes provide a way to abstract over interpolating/concatenating
+ * snippets of generated JavaScript source code while maintaining the line and
+ * column information associated with the original source code.
+ *
+ * @param aLine The original line number.
+ * @param aColumn The original column number.
+ * @param aSource The original source's filename.
+ * @param aChunks Optional. An array of strings which are snippets of
+ * generated JS, or other SourceNodes.
+ * @param aName The original identifier.
+ */
+ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
+ this.children = [];
+ this.sourceContents = {};
+ this.line = aLine == null ? null : aLine;
+ this.column = aColumn == null ? null : aColumn;
+ this.source = aSource == null ? null : aSource;
+ this.name = aName == null ? null : aName;
+ this[isSourceNode] = true;
+ if (aChunks != null) this.add(aChunks);
+ }
+
+ /**
+ * Creates a SourceNode from generated code and a SourceMapConsumer.
+ *
+ * @param aGeneratedCode The generated code
+ * @param aSourceMapConsumer The SourceMap for the generated code
+ * @param aRelativePath Optional. The path that relative sources in the
+ * SourceMapConsumer should be relative to.
+ */
+ SourceNode.fromStringWithSourceMap =
+ function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
+ // The SourceNode we want to fill with the generated code
+ // and the SourceMap
+ var node = new SourceNode();
+
+ // All even indices of this array are one line of the generated code,
+ // while all odd indices are the newlines between two adjacent lines
+ // (since `REGEX_NEWLINE` captures its match).
+ // Processed fragments are accessed by calling `shiftNextLine`.
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
+ var remainingLinesIndex = 0;
+ var shiftNextLine = function() {
+ var lineContents = getNextLine();
+ // The last line of a file might not have a newline.
+ var newLine = getNextLine() || "";
+ return lineContents + newLine;
+
+ function getNextLine() {
+ return remainingLinesIndex < remainingLines.length ?
+ remainingLines[remainingLinesIndex++] : undefined;
+ }
+ };
+
+ // We need to remember the position of "remainingLines"
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
+
+ // The generate SourceNodes we need a code range.
+ // To extract it current and last mapping is used.
+ // Here we store the last mapping.
+ var lastMapping = null;
+
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ if (lastMapping !== null) {
+ // We add the code from "lastMapping" to "mapping":
+ // First check if there is a new line in between.
+ if (lastGeneratedLine < mapping.generatedLine) {
+ // Associate first line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ lastGeneratedLine++;
+ lastGeneratedColumn = 0;
+ // The remaining code is added without mapping
+ } else {
+ // There is no new line in between.
+ // Associate the code between "lastGeneratedColumn" and
+ // "mapping.generatedColumn" with "lastMapping"
+ var nextLine = remainingLines[remainingLinesIndex];
+ var code = nextLine.substr(0, mapping.generatedColumn -
+ lastGeneratedColumn);
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
+ lastGeneratedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ addMappingWithCode(lastMapping, code);
+ // No more remaining code, continue
+ lastMapping = mapping;
+ return;
+ }
+ }
+ // We add the generated code until the first mapping
+ // to the SourceNode without any mapping.
+ // Each line is added as separate string.
+ while (lastGeneratedLine < mapping.generatedLine) {
+ node.add(shiftNextLine());
+ lastGeneratedLine++;
+ }
+ if (lastGeneratedColumn < mapping.generatedColumn) {
+ var nextLine = remainingLines[remainingLinesIndex];
+ node.add(nextLine.substr(0, mapping.generatedColumn));
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ }
+ lastMapping = mapping;
+ }, this);
+ // We have processed all mappings.
+ if (remainingLinesIndex < remainingLines.length) {
+ if (lastMapping) {
+ // Associate the remaining code in the current line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ }
+ // and add the remaining lines without any mapping
+ node.add(remainingLines.splice(remainingLinesIndex).join(""));
+ }
+
+ // Copy sourcesContent into SourceNode
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aRelativePath != null) {
+ sourceFile = util.join(aRelativePath, sourceFile);
+ }
+ node.setSourceContent(sourceFile, content);
+ }
+ });
+
+ return node;
+
+ function addMappingWithCode(mapping, code) {
+ if (mapping === null || mapping.source === undefined) {
+ node.add(code);
+ } else {
+ var source = aRelativePath
+ ? util.join(aRelativePath, mapping.source)
+ : mapping.source;
+ node.add(new SourceNode(mapping.originalLine,
+ mapping.originalColumn,
+ source,
+ code,
+ mapping.name));
+ }
+ }
+ };
+
+ /**
+ * Add a chunk of generated JS to this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+ SourceNode.prototype.add = function SourceNode_add(aChunk) {
+ if (Array.isArray(aChunk)) {
+ aChunk.forEach(function (chunk) {
+ this.add(chunk);
+ }, this);
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ if (aChunk) {
+ this.children.push(aChunk);
+ }
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+ };
+
+ /**
+ * Add a chunk of generated JS to the beginning of this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
+ if (Array.isArray(aChunk)) {
+ for (var i = aChunk.length-1; i >= 0; i--) {
+ this.prepend(aChunk[i]);
+ }
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ this.children.unshift(aChunk);
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+ };
+
+ /**
+ * Walk over the tree of JS snippets in this node and its children. The
+ * walking function is called once for each snippet of JS and is passed that
+ * snippet and the its original associated source's line/column location.
+ *
+ * @param aFn The traversal function.
+ */
+ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
+ var chunk;
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ chunk = this.children[i];
+ if (chunk[isSourceNode]) {
+ chunk.walk(aFn);
+ }
+ else {
+ if (chunk !== '') {
+ aFn(chunk, { source: this.source,
+ line: this.line,
+ column: this.column,
+ name: this.name });
+ }
+ }
+ }
+ };
+
+ /**
+ * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
+ * each of `this.children`.
+ *
+ * @param aSep The separator.
+ */
+ SourceNode.prototype.join = function SourceNode_join(aSep) {
+ var newChildren;
+ var i;
+ var len = this.children.length;
+ if (len > 0) {
+ newChildren = [];
+ for (i = 0; i < len-1; i++) {
+ newChildren.push(this.children[i]);
+ newChildren.push(aSep);
+ }
+ newChildren.push(this.children[i]);
+ this.children = newChildren;
+ }
+ return this;
+ };
+
+ /**
+ * Call String.prototype.replace on the very right-most source snippet. Useful
+ * for trimming whitespace from the end of a source node, etc.
+ *
+ * @param aPattern The pattern to replace.
+ * @param aReplacement The thing to replace the pattern with.
+ */
+ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
+ var lastChild = this.children[this.children.length - 1];
+ if (lastChild[isSourceNode]) {
+ lastChild.replaceRight(aPattern, aReplacement);
+ }
+ else if (typeof lastChild === 'string') {
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
+ }
+ else {
+ this.children.push(''.replace(aPattern, aReplacement));
+ }
+ return this;
+ };
+
+ /**
+ * Set the source content for a source file. This will be added to the SourceMapGenerator
+ * in the sourcesContent field.
+ *
+ * @param aSourceFile The filename of the source file
+ * @param aSourceContent The content of the source file
+ */
+ SourceNode.prototype.setSourceContent =
+ function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
+ };
+
+ /**
+ * Walk over the tree of SourceNodes. The walking function is called for each
+ * source file content and is passed the filename and source content.
+ *
+ * @param aFn The traversal function.
+ */
+ SourceNode.prototype.walkSourceContents =
+ function SourceNode_walkSourceContents(aFn) {
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ if (this.children[i][isSourceNode]) {
+ this.children[i].walkSourceContents(aFn);
+ }
+ }
+
+ var sources = Object.keys(this.sourceContents);
+ for (var i = 0, len = sources.length; i < len; i++) {
+ aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
+ }
+ };
+
+ /**
+ * Return the string representation of this source node. Walks over the tree
+ * and concatenates all the various snippets together to one string.
+ */
+ SourceNode.prototype.toString = function SourceNode_toString() {
+ var str = "";
+ this.walk(function (chunk) {
+ str += chunk;
+ });
+ return str;
+ };
+
+ /**
+ * Returns the string representation of this source node along with a source
+ * map.
+ */
+ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
+ var generated = {
+ code: "",
+ line: 1,
+ column: 0
+ };
+ var map = new SourceMapGenerator(aArgs);
+ var sourceMappingActive = false;
+ var lastOriginalSource = null;
+ var lastOriginalLine = null;
+ var lastOriginalColumn = null;
+ var lastOriginalName = null;
+ this.walk(function (chunk, original) {
+ generated.code += chunk;
+ if (original.source !== null
+ && original.line !== null
+ && original.column !== null) {
+ if(lastOriginalSource !== original.source
+ || lastOriginalLine !== original.line
+ || lastOriginalColumn !== original.column
+ || lastOriginalName !== original.name) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ lastOriginalSource = original.source;
+ lastOriginalLine = original.line;
+ lastOriginalColumn = original.column;
+ lastOriginalName = original.name;
+ sourceMappingActive = true;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ generated: {
+ line: generated.line,
+ column: generated.column
+ }
+ });
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ }
+ for (var idx = 0, length = chunk.length; idx < length; idx++) {
+ if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
+ generated.line++;
+ generated.column = 0;
+ // Mappings end at eol
+ if (idx + 1 === length) {
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ } else {
+ generated.column++;
+ }
+ }
+ });
+ this.walkSourceContents(function (sourceFile, sourceContent) {
+ map.setSourceContent(sourceFile, sourceContent);
+ });
+
+ return { code: generated.code, map: map };
+ };
+
+ exports.SourceNode = SourceNode;
+
+
+/***/ })
+/******/ ])
+});
+; \ No newline at end of file
diff --git a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js
new file mode 100644
index 0000000..f2a46bd
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js
@@ -0,0 +1,2 @@
+!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null!=t&&(t=String(t),this._sources.has(t)||this._sources.add(t)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if(n&&"number"!=typeof n.line&&"number"!=typeof n.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t,s=0,a=1,u=0,l=0,c=0,g=0,p="",h=this._mappings.toArray(),f=0,d=h.length;f<d;f++){if(n=h[f],e="",n.generatedLine!==a)for(s=0;n.generatedLine!==a;)e+=";",a++;else if(f>0){if(!i.compareByGeneratedPositionsInflated(n,h[f-1]))continue;e+=","}e+=o.encode(n.generatedColumn-s),s=n.generatedColumn,null!=n.source&&(t=this._sources.indexOf(n.source),e+=o.encode(t-g),g=t,e+=o.encode(n.originalLine-1-l),l=n.originalLine-1,e+=o.encode(n.originalColumn-u),u=n.originalColumn,null!=n.name&&(r=this._names.indexOf(n.name),e+=o.encode(r-c),c=r)),p+=e}return p},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return e<0?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<<s,u=a-1,l=a;n.encode=function(e){var n,r="",o=t(e);do n=o&u,o>>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),a===-1)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<<p,p+=s}while(t);r.value=o(g),r.rest=n}},function(e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(0<=e&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){var n=65,r=90,t=97,o=122,i=48,s=57,a=43,u=47,l=26,c=52;return n<=e&&e<=r?e-n:t<=e&&e<=o?e-t+l:i<=e&&e<=s?e-i+c:e==a?62:e==u?63:-1}},function(e,n){function r(e,n,r){if(n in e)return e[n];if(3===arguments.length)return r;throw new Error('"'+n+'" is a required argument.')}function t(e){var n=e.match(m);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(e){var r=e,i=t(e);if(i){if(!i.path)return e;r=i.path}for(var s,a=n.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(_))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(t<0)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return e}function l(e){return g(e)?"$"+e:e}function c(e){return g(e)?e.slice(1):e}function g(e){if(!e)return!1;var n=e.length;if(n<9)return!1;if(95!==e.charCodeAt(n-1)||95!==e.charCodeAt(n-2)||111!==e.charCodeAt(n-3)||116!==e.charCodeAt(n-4)||111!==e.charCodeAt(n-5)||114!==e.charCodeAt(n-6)||112!==e.charCodeAt(n-7)||95!==e.charCodeAt(n-8)||95!==e.charCodeAt(n-9))return!1;for(var r=n-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function p(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function h(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function f(e,n){return e===n?0:e>n?1:-1}function d(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=f(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:f(e.name,n.name)))))}n.getArg=r;var m=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,_=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(m)},n.relative=a;var v=function(){var e=Object.create(null);return!("__proto__"in e)}();n.toSetString=v?u:l,n.fromSetString=v?u:c,n.compareByOriginalPositions=p,n.compareByGeneratedPositionsDeflated=h,n.compareByGeneratedPositionsInflated=d},function(e,n,r){function t(){this._array=[],this._set=s?new Map:Object.create(null)}var o=r(4),i=Object.prototype.hasOwnProperty,s="undefined"!=typeof Map;t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;o<i;o++)r.add(e[o],n);return r},t.prototype.size=function(){return s?this._set.size:Object.getOwnPropertyNames(this._set).length},t.prototype.add=function(e,n){var r=s?e:o.toSetString(e),t=s?this.has(e):i.call(this._set,r),a=this._array.length;t&&!n||this._array.push(e),t||(s?this._set.set(e,a):this._set[r]=a)},t.prototype.has=function(e){if(s)return this._set.has(e);var n=o.toSetString(e);return i.call(this._set,n)},t.prototype.indexOf=function(e){if(s){var n=this._set.get(e);if(n>=0)return n}else{var r=o.toSetString(e);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},t.prototype.toArray=function(){return this._array.slice()},n.ArraySet=t},function(e,n,r){function t(e,n){var r=e.generatedLine,t=n.generatedLine,o=e.generatedColumn,s=n.generatedColumn;return t>r||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(String).map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o.map(String),!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r<i.line||r===i.line&&o<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=n,{generatedOffset:{generatedLine:r+1,generatedColumn:o+1},consumer:new t(a.getArg(e,"map"))}})}var a=r(4),u=r(8),l=r(5).ArraySet,c=r(2),g=r(9).quickSort;t.fromSourceMap=function(e){return o.fromSourceMap(e)},t.prototype._version=3,t.prototype.__generatedMappings=null,Object.defineProperty(t.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),t.prototype.__originalMappings=null,Object.defineProperty(t.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),t.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return";"===r||","===r},t.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},t.GENERATED_ORDER=1,t.ORIGINAL_ORDER=2,t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.prototype.eachMapping=function(e,n,r){var o,i=n||null,s=r||t.GENERATED_ORDER;switch(s){case t.GENERATED_ORDER:o=this._generatedMappings;break;case t.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(e){var n=null===e.source?null:this._sources.at(e.source);return null!=n&&null!=u&&(n=a.join(u,n)),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,i)},t.prototype.allGeneratedPositionsFor=function(e){var n=a.getArg(e,"line"),r={source:a.getArg(e,"source"),originalLine:n,originalColumn:a.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=a.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var t=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;p<h;p++){var f=s[p],d=new i;d.generatedLine=f.generatedLine,d.generatedColumn=f.generatedColumn,f.source&&(d.source=t.indexOf(f.source),d.originalLine=f.originalLine,d.originalColumn=f.originalColumn,f.name&&(d.name=r.indexOf(f.name)),c.push(d)),u.push(d)}return g(n.__originalMappings,a.compareByOriginalPositions),n},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?a.join(this.sourceRoot,e):e},this)}}),o.prototype._parseMappings=function(e,n){for(var r,t,o,s,u,l=1,p=0,h=0,f=0,d=0,m=0,_=e.length,v=0,y={},C={},A=[],S=[];v<_;)if(";"===e.charAt(v))l++,v++,p=0;else if(","===e.charAt(v))v++;else{for(r=new i,r.generatedLine=l,s=v;s<_&&!this._charIsMappingSeparator(e,s);s++);if(t=e.slice(v,s),o=y[t])v+=t.length;else{for(o=[];v<s;)c.decode(e,v,C),u=C.value,v=C.rest,o.push(u);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");y[t]=o}r.generatedColumn=p+o[0],p=r.generatedColumn,o.length>1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",a.compareByGeneratedPositionsDeflated,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(r>=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&(this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}))},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var r=0;r<this._sections[n].consumer.sources.length;r++)e.push(this._sections[n].consumer.sources[r]);return e}}),s.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=u.search(n,this._sections,function(e,n){var r=e.generatedLine-n.generatedOffset.generatedLine;return r?r:e.generatedColumn-n.generatedOffset.generatedColumn}),t=this._sections[r];return t?t.consumer.originalPositionFor({line:n.generatedLine-(t.generatedOffset.generatedLine-1),column:n.generatedColumn-(t.generatedOffset.generatedLine===n.generatedLine?t.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},s.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r],o=t.consumer.sourceContentFor(e,!0);if(o)return o}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(r.consumer.sources.indexOf(a.getArg(e,"source"))!==-1){var t=r.consumer.generatedPositionFor(e);if(t){var o={line:t.line+(r.generatedOffset.generatedLine-1),column:t.column+(r.generatedOffset.generatedLine===t.line?r.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},s.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var t=this._sections[r],o=t.consumer._generatedMappings,i=0;i<o.length;i++){var s=o[i],u=t.consumer._sources.at(s.source);null!==t.consumer.sourceRoot&&(u=a.join(t.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var l=t.consumer._names.at(s.name);this._names.add(l),l=this._names.indexOf(l);var c={source:u,generatedLine:s.generatedLine+(t.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(t.generatedOffset.generatedLine===s.generatedLine?t.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}g(this.__generatedMappings,a.compareByGeneratedPositionsDeflated),g(this.__originalMappings,a.compareByOriginalPositions)},n.IndexedSourceMapConsumer=s},function(e,n){function r(e,t,o,i,s,a){var u=Math.floor((t-e)/2)+e,l=s(o,i[u],!0);return 0===l?u:l>0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t<i.length?t:-1:u:u-e>1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:e<0?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(i<s){var a=t(i,s),u=i-1;r(e,a,s);for(var l=e[s],c=i;c<s;c++)n(e[c],l)<=0&&(u+=1,r(e,u,c));r(e,u+1,c);var g=u+1;o(e,n,i,g-1),o(e,n,g+1,s)}}n.quickSort=function(e,n){o(e,n,0,e.length-1)}},function(e,n,r){function t(e,n,r,t,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==r?null:r,this.name=null==o?null:o,this[u]=!0,null!=t&&this.add(t)}var o=r(1).SourceMapGenerator,i=r(4),s=/(\r?\n)/,a=10,u="$$$isSourceNode$$$";t.fromStringWithSourceMap=function(e,n,r){function o(e,n){if(null===e||void 0===e.source)a.add(n);else{var o=r?i.join(r,e.source):e.source;a.add(new t(e.originalLine,e.originalColumn,o,n,e.name))}}var a=new t,u=e.split(s),l=0,c=function(){function e(){return l<u.length?u[l++]:void 0}var n=e(),r=e()||"";return n+r},g=1,p=0,h=null;return n.eachMapping(function(e){if(null!==h){if(!(g<e.generatedLine)){var n=u[l],r=n.substr(0,e.generatedColumn-p);return u[l]=n.substr(e.generatedColumn-p),p=e.generatedColumn,o(h,r),void(h=e)}o(h,c()),g++,p=0}for(;g<e.generatedLine;)a.add(c()),g++;if(p<e.generatedColumn){var n=u[l];a.add(n.substr(0,e.generatedColumn)),u[l]=n.substr(e.generatedColumn),p=e.generatedColumn}h=e},this),l<u.length&&(h&&o(h,c()),a.add(u.splice(l).join(""))),n.sources.forEach(function(e){var t=n.sourceContentFor(e);null!=t&&(null!=r&&(e=i.join(r,e)),a.setSourceContent(e,t))}),a},t.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"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},t.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;r<t;r++)n=this.children[r],n[u]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},t.prototype.join=function(e){var n,r,t=this.children.length;if(t>0){for(n=[],r=0;r<t-1;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this},t.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[u]?r.replaceRight(e,n):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this},t.prototype.setSourceContent=function(e,n){this.sourceContents[i.toSetString(e)]=n},t.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;n<r;n++)this.children[n][u]&&this.children[n].walkSourceContents(e);for(var t=Object.keys(this.sourceContents),n=0,r=t.length;n<r;n++)e(i.fromSetString(t[n]),this.sourceContents[t[n]])},t.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},t.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new o(e),t=!1,i=null,s=null,u=null,l=null;return this.walk(function(e,o){n.code+=e,null!==o.source&&null!==o.line&&null!==o.column?(i===o.source&&s===o.line&&u===o.column&&l===o.name||r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name}),i=o.source,s=o.line,u=o.column,l=o.name,t=!0):t&&(r.addMapping({generated:{line:n.line,column:n.column}}),i=null,t=!1);for(var c=0,g=e.length;c<g;c++)e.charCodeAt(c)===a?(n.line++,n.column=0,c+1===g?(i=null,t=!1):t&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name})):n.column++}),this.walkSourceContents(function(e,n){r.setSourceContent(e,n)}),{code:n.code,map:r}},n.SourceNode=t}])});
+//# sourceMappingURL=source-map.min.js.map \ No newline at end of file
diff --git a/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js.map b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js.map
new file mode 100644
index 0000000..588b70c
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/dist/source-map.min.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///source-map.min.js","webpack:///webpack/bootstrap 42c329f865e32e011afb","webpack:///./source-map.js","webpack:///./lib/source-map-generator.js","webpack:///./lib/base64-vlq.js","webpack:///./lib/base64.js","webpack:///./lib/util.js","webpack:///./lib/array-set.js","webpack:///./lib/mapping-list.js","webpack:///./lib/source-map-consumer.js","webpack:///./lib/binary-search.js","webpack:///./lib/quick-sort.js","webpack:///./lib/source-node.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","SourceMapGenerator","SourceMapConsumer","SourceNode","aArgs","_file","util","getArg","_sourceRoot","_skipValidation","_sources","ArraySet","_names","_mappings","MappingList","_sourcesContents","base64VLQ","prototype","_version","fromSourceMap","aSourceMapConsumer","sourceRoot","generator","file","eachMapping","mapping","newMapping","generated","line","generatedLine","column","generatedColumn","source","relative","original","originalLine","originalColumn","name","addMapping","sources","forEach","sourceFile","content","sourceContentFor","setSourceContent","_validateMapping","String","has","add","aSourceFile","aSourceContent","Object","create","toSetString","keys","length","applySourceMap","aSourceMapPath","Error","newSources","newNames","unsortedForEach","originalPositionFor","join","aGenerated","aOriginal","aSource","aName","JSON","stringify","_serializeMappings","next","nameIdx","sourceIdx","previousGeneratedColumn","previousGeneratedLine","previousOriginalColumn","previousOriginalLine","previousName","previousSource","result","mappings","toArray","i","len","compareByGeneratedPositionsInflated","encode","indexOf","_generateSourcesContent","aSources","aSourceRoot","map","key","hasOwnProperty","toJSON","version","names","sourcesContent","toString","toVLQSigned","aValue","fromVLQSigned","isNegative","shifted","base64","VLQ_BASE_SHIFT","VLQ_BASE","VLQ_BASE_MASK","VLQ_CONTINUATION_BIT","digit","encoded","vlq","decode","aStr","aIndex","aOutParam","continuation","strLen","shift","charCodeAt","charAt","value","rest","intToCharMap","split","number","TypeError","charCode","bigA","bigZ","littleA","littleZ","zero","nine","plus","slash","littleOffset","numberOffset","aDefaultValue","arguments","urlParse","aUrl","match","urlRegexp","scheme","auth","host","port","path","urlGenerate","aParsedUrl","url","normalize","aPath","part","isAbsolute","parts","up","splice","aRoot","aPathUrl","aRootUrl","dataUrlRegexp","joined","replace","level","index","lastIndexOf","slice","Array","substr","identity","s","isProtoString","fromSetString","compareByOriginalPositions","mappingA","mappingB","onlyCompareOriginal","cmp","compareByGeneratedPositionsDeflated","onlyCompareGenerated","strcmp","aStr1","aStr2","supportsNullProto","obj","_array","_set","hasNativeMap","Map","fromArray","aArray","aAllowDuplicates","set","size","getOwnPropertyNames","sStr","isDuplicate","idx","push","get","at","aIdx","generatedPositionAfter","lineA","lineB","columnA","columnB","_sorted","_last","aCallback","aThisArg","aMapping","sort","aSourceMap","sourceMap","parse","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","Mapping","lastOffset","_sections","offset","offsetLine","offsetColumn","generatedOffset","consumer","binarySearch","quickSort","__generatedMappings","defineProperty","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","aContext","aOrder","context","order","_generatedMappings","_originalMappings","allGeneratedPositionsFor","needle","_findMapping","undefined","lastColumn","smc","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","str","segment","end","cachedSegments","temp","originalMappings","aNeedle","aMappings","aLineName","aColumnName","aComparator","aBias","search","computeColumnSpans","nextMapping","lastGeneratedColumn","Infinity","hasContentsOfAllSources","some","sc","nullOnMissing","fileUriAbsPath","generatedPositionFor","constructor","j","sectionIndex","section","bias","every","generatedPosition","ret","sectionMappings","adjustedMapping","recursiveSearch","aLow","aHigh","aHaystack","aCompare","mid","Math","floor","swap","ary","x","y","randomIntInRange","low","high","round","random","doQuickSort","comparator","r","pivotIndex","pivot","q","aLine","aColumn","aChunks","children","sourceContents","isSourceNode","REGEX_NEWLINE","NEWLINE_CODE","fromStringWithSourceMap","aGeneratedCode","aRelativePath","addMappingWithCode","code","node","remainingLines","remainingLinesIndex","shiftNextLine","getNextLine","lineContents","newLine","lastGeneratedLine","lastMapping","nextLine","aChunk","isArray","chunk","prepend","unshift","walk","aFn","aSep","newChildren","replaceRight","aPattern","aReplacement","lastChild","walkSourceContents","toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","sourceContent"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,UAAAD,IAEAD,EAAA,UAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAAUL,EAAQD,EAASM,GEjDjCN,EAAAe,mBAAAT,EAAA,GAAAS,mBACAf,EAAAgB,kBAAAV,EAAA,GAAAU,kBACAhB,EAAAiB,WAAAX,EAAA,IAAAW,YF6DM,SAAUhB,EAAQD,EAASM,GGhDjC,QAAAS,GAAAG,GACAA,IACAA,MAEAd,KAAAe,MAAAC,EAAAC,OAAAH,EAAA,aACAd,KAAAkB,YAAAF,EAAAC,OAAAH,EAAA,mBACAd,KAAAmB,gBAAAH,EAAAC,OAAAH,EAAA,qBACAd,KAAAoB,SAAA,GAAAC,GACArB,KAAAsB,OAAA,GAAAD,GACArB,KAAAuB,UAAA,GAAAC,GACAxB,KAAAyB,iBAAA,KAvBA,GAAAC,GAAAxB,EAAA,GACAc,EAAAd,EAAA,GACAmB,EAAAnB,EAAA,GAAAmB,SACAG,EAAAtB,EAAA,GAAAsB,WAuBAb,GAAAgB,UAAAC,SAAA,EAOAjB,EAAAkB,cACA,SAAA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sD,EAAArD,YACAN,OAAAE,EAAAF,OACAE,UACAN,KAAAM,EAAAN,KACAE,OAAAI,EAAAJ,QAEAH,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,QAEAO,KAAAH,EAAAG,OAGA2T,EAAA9T,EAAAF,OACAiU,EAAA/T,EAAAN,KACAsU,EAAAhU,EAAAJ,OACAqU,EAAAjU,EAAAG,KACA0T,GAAA,GACKA,IACLpQ,EAAArD,YACAX,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,UAGAkU,EAAA,KACAD,GAAA,EAEA,QAAAxJ,GAAA,EAAAhJ,EAAA2R,EAAA3R,OAA4CgJ,EAAAhJ,EAAcgJ,IAC1D2I,EAAA3N,WAAAgF,KAAAyH,GACArS,EAAAC,OACAD,EAAAG,OAAA,EAEAyK,EAAA,IAAAhJ,GACAyS,EAAA,KACAD,GAAA,GACSA,GACTpQ,EAAArD,YACAN,OAAAE,EAAAF,OACAE,UACAN,KAAAM,EAAAN,KACAE,OAAAI,EAAAJ,QAEAH,WACAC,KAAAD,EAAAC,KACAE,OAAAH,EAAAG,QAEAO,KAAAH,EAAAG,QAIAV,EAAAG,WAIAxC,KAAAuW,mBAAA,SAAApT,EAAA2T,GACAzQ,EAAA/C,iBAAAH,EAAA2T,MAGU/B,KAAA1S,EAAA0S,KAAA1O,QAGVzG,EAAAiB","file":"source-map.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/*\n\t * Copyright 2009-2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE.txt or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\texports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\texports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;\n\texports.SourceNode = __webpack_require__(10).SourceNode;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar base64VLQ = __webpack_require__(2);\n\tvar util = __webpack_require__(4);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar MappingList = __webpack_require__(6).MappingList;\n\t\n\t/**\n\t * An instance of the SourceMapGenerator represents a source map which is\n\t * being built incrementally. You may pass an object with the following\n\t * properties:\n\t *\n\t * - file: The filename of the generated source.\n\t * - sourceRoot: A root for all relative URLs in this source map.\n\t */\n\tfunction SourceMapGenerator(aArgs) {\n\t if (!aArgs) {\n\t aArgs = {};\n\t }\n\t this._file = util.getArg(aArgs, 'file', null);\n\t this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n\t this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t this._mappings = new MappingList();\n\t this._sourcesContents = null;\n\t}\n\t\n\tSourceMapGenerator.prototype._version = 3;\n\t\n\t/**\n\t * Creates a new SourceMapGenerator based on a SourceMapConsumer\n\t *\n\t * @param aSourceMapConsumer The SourceMap.\n\t */\n\tSourceMapGenerator.fromSourceMap =\n\t function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n\t var sourceRoot = aSourceMapConsumer.sourceRoot;\n\t var generator = new SourceMapGenerator({\n\t file: aSourceMapConsumer.file,\n\t sourceRoot: sourceRoot\n\t });\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t var newMapping = {\n\t generated: {\n\t line: mapping.generatedLine,\n\t column: mapping.generatedColumn\n\t }\n\t };\n\t\n\t if (mapping.source != null) {\n\t newMapping.source = mapping.source;\n\t if (sourceRoot != null) {\n\t newMapping.source = util.relative(sourceRoot, newMapping.source);\n\t }\n\t\n\t newMapping.original = {\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t };\n\t\n\t if (mapping.name != null) {\n\t newMapping.name = mapping.name;\n\t }\n\t }\n\t\n\t generator.addMapping(newMapping);\n\t });\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t generator.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return generator;\n\t };\n\t\n\t/**\n\t * Add a single mapping from original source line and column to the generated\n\t * source's line and column for this source map being created. The mapping\n\t * object should have the following properties:\n\t *\n\t * - generated: An object with the generated line and column positions.\n\t * - original: An object with the original line and column positions.\n\t * - source: The original source file (relative to the sourceRoot).\n\t * - name: An optional original token name for this mapping.\n\t */\n\tSourceMapGenerator.prototype.addMapping =\n\t function SourceMapGenerator_addMapping(aArgs) {\n\t var generated = util.getArg(aArgs, 'generated');\n\t var original = util.getArg(aArgs, 'original', null);\n\t var source = util.getArg(aArgs, 'source', null);\n\t var name = util.getArg(aArgs, 'name', null);\n\t\n\t if (!this._skipValidation) {\n\t this._validateMapping(generated, original, source, name);\n\t }\n\t\n\t if (source != null) {\n\t source = String(source);\n\t if (!this._sources.has(source)) {\n\t this._sources.add(source);\n\t }\n\t }\n\t\n\t if (name != null) {\n\t name = String(name);\n\t if (!this._names.has(name)) {\n\t this._names.add(name);\n\t }\n\t }\n\t\n\t this._mappings.add({\n\t generatedLine: generated.line,\n\t generatedColumn: generated.column,\n\t originalLine: original != null && original.line,\n\t originalColumn: original != null && original.column,\n\t source: source,\n\t name: name\n\t });\n\t };\n\t\n\t/**\n\t * Set the source content for a source file.\n\t */\n\tSourceMapGenerator.prototype.setSourceContent =\n\t function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n\t var source = aSourceFile;\n\t if (this._sourceRoot != null) {\n\t source = util.relative(this._sourceRoot, source);\n\t }\n\t\n\t if (aSourceContent != null) {\n\t // Add the source content to the _sourcesContents map.\n\t // Create a new _sourcesContents map if the property is null.\n\t if (!this._sourcesContents) {\n\t this._sourcesContents = Object.create(null);\n\t }\n\t this._sourcesContents[util.toSetString(source)] = aSourceContent;\n\t } else if (this._sourcesContents) {\n\t // Remove the source file from the _sourcesContents map.\n\t // If the _sourcesContents map is empty, set the property to null.\n\t delete this._sourcesContents[util.toSetString(source)];\n\t if (Object.keys(this._sourcesContents).length === 0) {\n\t this._sourcesContents = null;\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Applies the mappings of a sub-source-map for a specific source file to the\n\t * source map being generated. Each mapping to the supplied source file is\n\t * rewritten using the supplied source map. Note: The resolution for the\n\t * resulting mappings is the minimium of this map and the supplied map.\n\t *\n\t * @param aSourceMapConsumer The source map to be applied.\n\t * @param aSourceFile Optional. The filename of the source file.\n\t * If omitted, SourceMapConsumer's file property will be used.\n\t * @param aSourceMapPath Optional. The dirname of the path to the source map\n\t * to be applied. If relative, it is relative to the SourceMapConsumer.\n\t * This parameter is needed when the two source maps aren't in the same\n\t * directory, and the source map to be applied contains relative source\n\t * paths. If so, those relative source paths need to be rewritten\n\t * relative to the SourceMapGenerator.\n\t */\n\tSourceMapGenerator.prototype.applySourceMap =\n\t function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n\t var sourceFile = aSourceFile;\n\t // If aSourceFile is omitted, we will use the file property of the SourceMap\n\t if (aSourceFile == null) {\n\t if (aSourceMapConsumer.file == null) {\n\t throw new Error(\n\t 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n\t 'or the source map\\'s \"file\" property. Both were omitted.'\n\t );\n\t }\n\t sourceFile = aSourceMapConsumer.file;\n\t }\n\t var sourceRoot = this._sourceRoot;\n\t // Make \"sourceFile\" relative if an absolute Url is passed.\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t // Applying the SourceMap can add and remove items from the sources and\n\t // the names array.\n\t var newSources = new ArraySet();\n\t var newNames = new ArraySet();\n\t\n\t // Find mappings for the \"sourceFile\"\n\t this._mappings.unsortedForEach(function (mapping) {\n\t if (mapping.source === sourceFile && mapping.originalLine != null) {\n\t // Check if it can be mapped by the source map, then update the mapping.\n\t var original = aSourceMapConsumer.originalPositionFor({\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t });\n\t if (original.source != null) {\n\t // Copy mapping\n\t mapping.source = original.source;\n\t if (aSourceMapPath != null) {\n\t mapping.source = util.join(aSourceMapPath, mapping.source)\n\t }\n\t if (sourceRoot != null) {\n\t mapping.source = util.relative(sourceRoot, mapping.source);\n\t }\n\t mapping.originalLine = original.line;\n\t mapping.originalColumn = original.column;\n\t if (original.name != null) {\n\t mapping.name = original.name;\n\t }\n\t }\n\t }\n\t\n\t var source = mapping.source;\n\t if (source != null && !newSources.has(source)) {\n\t newSources.add(source);\n\t }\n\t\n\t var name = mapping.name;\n\t if (name != null && !newNames.has(name)) {\n\t newNames.add(name);\n\t }\n\t\n\t }, this);\n\t this._sources = newSources;\n\t this._names = newNames;\n\t\n\t // Copy sourcesContents of applied map.\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aSourceMapPath != null) {\n\t sourceFile = util.join(aSourceMapPath, sourceFile);\n\t }\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t this.setSourceContent(sourceFile, content);\n\t }\n\t }, this);\n\t };\n\t\n\t/**\n\t * A mapping can have one of the three levels of data:\n\t *\n\t * 1. Just the generated position.\n\t * 2. The Generated position, original position, and original source.\n\t * 3. Generated and original position, original source, as well as a name\n\t * token.\n\t *\n\t * To maintain consistency, we validate that any new mapping being added falls\n\t * in to one of these categories.\n\t */\n\tSourceMapGenerator.prototype._validateMapping =\n\t function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n\t aName) {\n\t // When aOriginal is truthy but has empty values for .line and .column,\n\t // it is most likely a programmer error. In this case we throw a very\n\t // specific error message to try to guide them the right way.\n\t // For example: https://github.com/Polymer/polymer-bundler/pull/519\n\t if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n\t throw new Error(\n\t 'original.line and original.column are not numbers -- you probably meant to omit ' +\n\t 'the original mapping entirely and only map the generated position. If so, pass ' +\n\t 'null for the original mapping instead of an object with empty or null values.'\n\t );\n\t }\n\t\n\t if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t/**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\tSourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = ''\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t next += ',';\n\t }\n\t }\n\t\n\t next += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t next += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t next += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t\n\t result += next;\n\t }\n\t\n\t return result;\n\t };\n\t\n\tSourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t/**\n\t * Externalize the source map.\n\t */\n\tSourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t/**\n\t * Render the source map being generated to a string.\n\t */\n\tSourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\texports.SourceMapGenerator = SourceMapGenerator;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t\n\tvar base64 = __webpack_require__(3);\n\t\n\t// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t// length quantities we use in the source map spec, the first bit is the sign,\n\t// the next four bits are the actual value, and the 6th bit is the\n\t// continuation bit. The continuation bit tells us whether there are more\n\t// digits in this value following this digit.\n\t//\n\t// Continuation\n\t// | Sign\n\t// | |\n\t// V V\n\t// 101011\n\t\n\tvar VLQ_BASE_SHIFT = 5;\n\t\n\t// binary: 100000\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t// binary: 011111\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t// binary: 100000\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t/**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t}\n\t\n\t/**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t}\n\t\n\t/**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\texports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t};\n\t\n\t/**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\texports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t/**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\texports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\t\n\t/**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\texports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t/**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\tfunction getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t}\n\texports.getArg = getArg;\n\t\n\tvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\tvar dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\tfunction urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t}\n\texports.urlParse = urlParse;\n\t\n\tfunction urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t}\n\texports.urlGenerate = urlGenerate;\n\t\n\t/**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consecutive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '<dir>/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\tfunction normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t}\n\texports.normalize = normalize;\n\t\n\t/**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\tfunction join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t}\n\texports.join = join;\n\t\n\texports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t};\n\t\n\t/**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\tfunction relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t}\n\texports.relative = relative;\n\t\n\tvar supportsNullProto = (function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t}());\n\t\n\tfunction identity (s) {\n\t return s;\n\t}\n\t\n\t/**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\tfunction toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\t\n\t return aStr;\n\t}\n\texports.toSetString = supportsNullProto ? identity : toSetString;\n\t\n\tfunction fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\t\n\t return aStr;\n\t}\n\texports.fromSetString = supportsNullProto ? identity : fromSetString;\n\t\n\tfunction isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\t\n\t var length = s.length;\n\t\n\t if (length < 9 /* \"__proto__\".length */) {\n\t return false;\n\t }\n\t\n\t if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n\t s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n\t s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n\t s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n\t s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n\t s.charCodeAt(length - 9) !== 95 /* '_' */) {\n\t return false;\n\t }\n\t\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36 /* '$' */) {\n\t return false;\n\t }\n\t }\n\t\n\t return true;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\tfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t/**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\tfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t}\n\texports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\tfunction strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t}\n\t\n\t/**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\tfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t}\n\texports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\t\n\t/**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\tfunction ArraySet() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\t\n\t/**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\tArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t};\n\t\n\t/**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\tArraySet.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\t\n\t/**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t return has.call(this._set, sStr);\n\t }\n\t};\n\t\n\t/**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\tArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util.toSetString(aStr);\n\t if (has.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\t\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\t\n\t/**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\tArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\t\n\t/**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\tArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\t\n\texports.ArraySet = ArraySet;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\t\n\t/**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\t\n\t/**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\tfunction MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t}\n\t\n\t/**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\tMappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t/**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\tMappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t};\n\t\n\t/**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\tMappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t};\n\t\n\texports.MappingList = MappingList;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar util = __webpack_require__(4);\n\tvar binarySearch = __webpack_require__(8);\n\tvar ArraySet = __webpack_require__(5).ArraySet;\n\tvar base64VLQ = __webpack_require__(2);\n\tvar quickSort = __webpack_require__(9).quickSort;\n\t\n\tfunction SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t}\n\t\n\tSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t}\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tSourceMapConsumer.prototype._version = 3;\n\t\n\t// `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t// are lazily instantiated, accessed via the `_generatedMappings` and\n\t// `_originalMappings` getters respectively, and we only parse the mappings\n\t// and create these arrays once queried for a source location. We jump through\n\t// these hoops because there can be many thousands of mappings, and parsing\n\t// them is expensive, so we only want to do it if we must.\n\t//\n\t// Each object in the arrays is of the form:\n\t//\n\t// {\n\t// generatedLine: The line number in the generated code,\n\t// generatedColumn: The column number in the generated code,\n\t// source: The path to the original source file that generated this\n\t// chunk of code,\n\t// originalLine: The line number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// originalColumn: The column number in the original source that\n\t// corresponds to this chunk of generated code,\n\t// name: The name of the original symbol which generated this chunk of\n\t// code.\n\t// }\n\t//\n\t// All properties except for `generatedLine` and `generatedColumn` can be\n\t// `null`.\n\t//\n\t// `_generatedMappings` is ordered by the generated positions.\n\t//\n\t// `_originalMappings` is ordered by the original positions.\n\t\n\tSourceMapConsumer.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t});\n\t\n\tSourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\tSourceMapConsumer.GENERATED_ORDER = 1;\n\tSourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\tSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\tSourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t/**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tSourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\texports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t/**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t .map(String)\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\t\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t/**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\tBasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tBasicSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\t\n\t/**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tBasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t/**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\tBasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t/**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\tBasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tBasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tBasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\texports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t/**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t}\n\t\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t/**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t/**\n\t * The list of original sources.\n\t */\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t});\n\t\n\t/**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t/**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t/**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\tIndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t/**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t/**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\tIndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\texports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\texports.GREATEST_LOWER_BOUND = 1;\n\texports.LEAST_UPPER_BOUND = 2;\n\t\n\t/**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\tfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t}\n\t\n\t/**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\texports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\t// It turns out that some (most?) JavaScript engines don't self-host\n\t// `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t// faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t// custom comparator function, calling back and forth between the VM's C++ and\n\t// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t// worse generated code for the comparator function than would be optimal. In\n\t// fact, when sorting with a comparator, these costs outweigh the benefits of\n\t// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t// a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t/**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\t\n\t/**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t}\n\t\n\t/**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\t\n\t/**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\texports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t\n\tvar SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\tvar util = __webpack_require__(4);\n\t\n\t// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t// operating systems these days (capturing the result).\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t// Newline character code for charCodeAt() comparisons\n\tvar NEWLINE_CODE = 10;\n\t\n\t// Private symbol for identifying `SourceNode`s when multiple versions of\n\t// the source-map library are loaded. This MUST NOT CHANGE across\n\t// versions!\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t/**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\tfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\t\n\t/**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\tSourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are accessed by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\t var shiftNextLine = function() {\n\t var lineContents = getNextLine();\n\t // The last line of a file might not have a newline.\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\t\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ?\n\t remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t/**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\tSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t};\n\t\n\t/**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\tSourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\tSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t};\n\t\n\t/**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\tSourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t/**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\tSourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t/**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\tSourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\t\n\t/**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\tSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t};\n\t\n\texports.SourceNode = SourceNode;\n\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// source-map.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 42c329f865e32e011afb","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./source-map.js\n// module id = 0\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar base64VLQ = require('./base64-vlq');\nvar util = require('./util');\nvar ArraySet = require('./array-set').ArraySet;\nvar MappingList = require('./mapping-list').MappingList;\n\n/**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\nfunction SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n}\n\nSourceMapGenerator.prototype._version = 3;\n\n/**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\nSourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n/**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\nSourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null) {\n source = String(source);\n if (!this._sources.has(source)) {\n this._sources.add(source);\n }\n }\n\n if (name != null) {\n name = String(name);\n if (!this._names.has(name)) {\n this._names.add(name);\n }\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n/**\n * Set the source content for a source file.\n */\nSourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = Object.create(null);\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n/**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\nSourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n/**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\nSourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n // When aOriginal is truthy but has empty values for .line and .column,\n // it is most likely a programmer error. In this case we throw a very\n // specific error message to try to guide them the right way.\n // For example: https://github.com/Polymer/polymer-bundler/pull/519\n if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n throw new Error(\n 'original.line and original.column are not numbers -- you probably meant to omit ' +\n 'the original mapping entirely and only map the generated position. If so, pass ' +\n 'null for the original mapping instead of an object with empty or null values.'\n );\n }\n\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n/**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\nSourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var next;\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n next = ''\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n next += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n next += ',';\n }\n }\n\n next += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n next += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n next += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n next += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n next += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n\n result += next;\n }\n\n return result;\n };\n\nSourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n/**\n * Externalize the source map.\n */\nSourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n/**\n * Render the source map being generated to a string.\n */\nSourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\nexports.SourceMapGenerator = SourceMapGenerator;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-generator.js\n// module id = 1\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nvar base64 = require('./base64');\n\n// A single base 64 digit can contain 6 bits of data. For the base 64 variable\n// length quantities we use in the source map spec, the first bit is the sign,\n// the next four bits are the actual value, and the 6th bit is the\n// continuation bit. The continuation bit tells us whether there are more\n// digits in this value following this digit.\n//\n// Continuation\n// | Sign\n// | |\n// V V\n// 101011\n\nvar VLQ_BASE_SHIFT = 5;\n\n// binary: 100000\nvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n// binary: 011111\nvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\n// binary: 100000\nvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n/**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\nfunction toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n}\n\n/**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\nfunction fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n}\n\n/**\n * Returns the base 64 VLQ encoded value.\n */\nexports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n};\n\n/**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\nexports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64-vlq.js\n// module id = 2\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n/**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\nexports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n};\n\n/**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\nexports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/base64.js\n// module id = 3\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n/**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\nfunction getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n}\nexports.getArg = getArg;\n\nvar urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\nvar dataUrlRegexp = /^data:.+\\,.+$/;\n\nfunction urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n}\nexports.urlParse = urlParse;\n\nfunction urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n}\nexports.urlGenerate = urlGenerate;\n\n/**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consecutive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\nfunction normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n}\nexports.normalize = normalize;\n\n/**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\nfunction join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n}\nexports.join = join;\n\nexports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n};\n\n/**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\nfunction relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n}\nexports.relative = relative;\n\nvar supportsNullProto = (function () {\n var obj = Object.create(null);\n return !('__proto__' in obj);\n}());\n\nfunction identity (s) {\n return s;\n}\n\n/**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\nfunction toSetString(aStr) {\n if (isProtoString(aStr)) {\n return '$' + aStr;\n }\n\n return aStr;\n}\nexports.toSetString = supportsNullProto ? identity : toSetString;\n\nfunction fromSetString(aStr) {\n if (isProtoString(aStr)) {\n return aStr.slice(1);\n }\n\n return aStr;\n}\nexports.fromSetString = supportsNullProto ? identity : fromSetString;\n\nfunction isProtoString(s) {\n if (!s) {\n return false;\n }\n\n var length = s.length;\n\n if (length < 9 /* \"__proto__\".length */) {\n return false;\n }\n\n if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||\n s.charCodeAt(length - 2) !== 95 /* '_' */ ||\n s.charCodeAt(length - 3) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 4) !== 116 /* 't' */ ||\n s.charCodeAt(length - 5) !== 111 /* 'o' */ ||\n s.charCodeAt(length - 6) !== 114 /* 'r' */ ||\n s.charCodeAt(length - 7) !== 112 /* 'p' */ ||\n s.charCodeAt(length - 8) !== 95 /* '_' */ ||\n s.charCodeAt(length - 9) !== 95 /* '_' */) {\n return false;\n }\n\n for (var i = length - 10; i >= 0; i--) {\n if (s.charCodeAt(i) !== 36 /* '$' */) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\nfunction compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByOriginalPositions = compareByOriginalPositions;\n\n/**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\nfunction compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n}\nexports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\nfunction strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n}\n\n/**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\nfunction compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n}\nexports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/util.js\n// module id = 4\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar has = Object.prototype.hasOwnProperty;\nvar hasNativeMap = typeof Map !== \"undefined\";\n\n/**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\nfunction ArraySet() {\n this._array = [];\n this._set = hasNativeMap ? new Map() : Object.create(null);\n}\n\n/**\n * Static method for creating ArraySet instances from an existing array.\n */\nArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n};\n\n/**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\nArraySet.prototype.size = function ArraySet_size() {\n return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n};\n\n/**\n * Add the given string to this set.\n *\n * @param String aStr\n */\nArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = hasNativeMap ? aStr : util.toSetString(aStr);\n var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n if (hasNativeMap) {\n this._set.set(aStr, idx);\n } else {\n this._set[sStr] = idx;\n }\n }\n};\n\n/**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\nArraySet.prototype.has = function ArraySet_has(aStr) {\n if (hasNativeMap) {\n return this._set.has(aStr);\n } else {\n var sStr = util.toSetString(aStr);\n return has.call(this._set, sStr);\n }\n};\n\n/**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\nArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n if (hasNativeMap) {\n var idx = this._set.get(aStr);\n if (idx >= 0) {\n return idx;\n }\n } else {\n var sStr = util.toSetString(aStr);\n if (has.call(this._set, sStr)) {\n return this._set[sStr];\n }\n }\n\n throw new Error('\"' + aStr + '\" is not in the set.');\n};\n\n/**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\nArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n};\n\n/**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\nArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n};\n\nexports.ArraySet = ArraySet;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/array-set.js\n// module id = 5\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\n\n/**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\nfunction generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n}\n\n/**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\nfunction MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n}\n\n/**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\nMappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n/**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\nMappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n};\n\n/**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\nMappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n};\n\nexports.MappingList = MappingList;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/mapping-list.js\n// module id = 6\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar util = require('./util');\nvar binarySearch = require('./binary-search');\nvar ArraySet = require('./array-set').ArraySet;\nvar base64VLQ = require('./base64-vlq');\nvar quickSort = require('./quick-sort').quickSort;\n\nfunction SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n}\n\nSourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n}\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nSourceMapConsumer.prototype._version = 3;\n\n// `__generatedMappings` and `__originalMappings` are arrays that hold the\n// parsed mapping coordinates from the source map's \"mappings\" attribute. They\n// are lazily instantiated, accessed via the `_generatedMappings` and\n// `_originalMappings` getters respectively, and we only parse the mappings\n// and create these arrays once queried for a source location. We jump through\n// these hoops because there can be many thousands of mappings, and parsing\n// them is expensive, so we only want to do it if we must.\n//\n// Each object in the arrays is of the form:\n//\n// {\n// generatedLine: The line number in the generated code,\n// generatedColumn: The column number in the generated code,\n// source: The path to the original source file that generated this\n// chunk of code,\n// originalLine: The line number in the original source that\n// corresponds to this chunk of generated code,\n// originalColumn: The column number in the original source that\n// corresponds to this chunk of generated code,\n// name: The name of the original symbol which generated this chunk of\n// code.\n// }\n//\n// All properties except for `generatedLine` and `generatedColumn` can be\n// `null`.\n//\n// `_generatedMappings` is ordered by the generated positions.\n//\n// `_originalMappings` is ordered by the original positions.\n\nSourceMapConsumer.prototype.__generatedMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n});\n\nSourceMapConsumer.prototype.__originalMappings = null;\nObject.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n});\n\nSourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\nSourceMapConsumer.GENERATED_ORDER = 1;\nSourceMapConsumer.ORIGINAL_ORDER = 2;\n\nSourceMapConsumer.GREATEST_LOWER_BOUND = 1;\nSourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n/**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\nSourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n/**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nSourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\nexports.SourceMapConsumer = SourceMapConsumer;\n\n/**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\nfunction BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n .map(String)\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names.map(String), true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n}\n\nBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n/**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\nBasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nBasicSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n});\n\n/**\n * Provide the JIT with a nice shape / hidden class.\n */\nfunction Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n}\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nBasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n/**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\nBasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n/**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\nBasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nBasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nBasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nBasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nBasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\nexports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n/**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\nfunction IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n}\n\nIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\nIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n/**\n * The version of the source mapping spec that we are consuming.\n */\nIndexedSourceMapConsumer.prototype._version = 3;\n\n/**\n * The list of original sources.\n */\nObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n});\n\n/**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\nIndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n/**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\nIndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n/**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\nIndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n/**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\nIndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n/**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\nIndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\nexports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-map-consumer.js\n// module id = 7\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nexports.GREATEST_LOWER_BOUND = 1;\nexports.LEAST_UPPER_BOUND = 2;\n\n/**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\nfunction recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n}\n\n/**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\nexports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/binary-search.js\n// module id = 8\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\n// It turns out that some (most?) JavaScript engines don't self-host\n// `Array.prototype.sort`. This makes sense because C++ will likely remain\n// faster than JS when doing raw CPU-intensive sorting. However, when using a\n// custom comparator function, calling back and forth between the VM's C++ and\n// JIT'd JS is rather slow *and* loses JIT type information, resulting in\n// worse generated code for the comparator function than would be optimal. In\n// fact, when sorting with a comparator, these costs outweigh the benefits of\n// sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n// a ~3500ms mean speed-up in `bench/bench.html`.\n\n/**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\nfunction swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n}\n\n/**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\nfunction randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n}\n\n/**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\nfunction doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n}\n\n/**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\nexports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/quick-sort.js\n// module id = 9\n// module chunks = 0","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n\nvar SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\nvar util = require('./util');\n\n// Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n// operating systems these days (capturing the result).\nvar REGEX_NEWLINE = /(\\r?\\n)/;\n\n// Newline character code for charCodeAt() comparisons\nvar NEWLINE_CODE = 10;\n\n// Private symbol for identifying `SourceNode`s when multiple versions of\n// the source-map library are loaded. This MUST NOT CHANGE across\n// versions!\nvar isSourceNode = \"$$$isSourceNode$$$\";\n\n/**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\nfunction SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n}\n\n/**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\nSourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are accessed by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var remainingLinesIndex = 0;\n var shiftNextLine = function() {\n var lineContents = getNextLine();\n // The last line of a file might not have a newline.\n var newLine = getNextLine() || \"\";\n return lineContents + newLine;\n\n function getNextLine() {\n return remainingLinesIndex < remainingLines.length ?\n remainingLines[remainingLinesIndex++] : undefined;\n }\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[remainingLinesIndex];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[remainingLinesIndex];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLinesIndex < remainingLines.length) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n/**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\nSourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n};\n\n/**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n};\n\n/**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\nSourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n};\n\n/**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\nSourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n};\n\n/**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\nSourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n/**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\nSourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n/**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\nSourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n};\n\n/**\n * Returns the string representation of this source node along with a source\n * map.\n */\nSourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n};\n\nexports.SourceNode = SourceNode;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./lib/source-node.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file
diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/array-set.js b/node_modules/@babel/generator/node_modules/source-map/lib/array-set.js
new file mode 100644
index 0000000..fbd5c81
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/lib/array-set.js
@@ -0,0 +1,121 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var util = require('./util');
+var has = Object.prototype.hasOwnProperty;
+var hasNativeMap = typeof Map !== "undefined";
+
+/**
+ * A data structure which is a combination of an array and a set. Adding a new
+ * member is O(1), testing for membership is O(1), and finding the index of an
+ * element is O(1). Removing elements from the set is not supported. Only
+ * strings are supported for membership.
+ */
+function ArraySet() {
+ this._array = [];
+ this._set = hasNativeMap ? new Map() : Object.create(null);
+}
+
+/**
+ * Static method for creating ArraySet instances from an existing array.
+ */
+ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
+ var set = new ArraySet();
+ for (var i = 0, len = aArray.length; i < len; i++) {
+ set.add(aArray[i], aAllowDuplicates);
+ }
+ return set;
+};
+
+/**
+ * Return how many unique items are in this ArraySet. If duplicates have been
+ * added, than those do not count towards the size.
+ *
+ * @returns Number
+ */
+ArraySet.prototype.size = function ArraySet_size() {
+ return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
+};
+
+/**
+ * Add the given string to this set.
+ *
+ * @param String aStr
+ */
+ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
+ var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
+ var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
+ var idx = this._array.length;
+ if (!isDuplicate || aAllowDuplicates) {
+ this._array.push(aStr);
+ }
+ if (!isDuplicate) {
+ if (hasNativeMap) {
+ this._set.set(aStr, idx);
+ } else {
+ this._set[sStr] = idx;
+ }
+ }
+};
+
+/**
+ * Is the given string a member of this set?
+ *
+ * @param String aStr
+ */
+ArraySet.prototype.has = function ArraySet_has(aStr) {
+ if (hasNativeMap) {
+ return this._set.has(aStr);
+ } else {
+ var sStr = util.toSetString(aStr);
+ return has.call(this._set, sStr);
+ }
+};
+
+/**
+ * What is the index of the given string in the array?
+ *
+ * @param String aStr
+ */
+ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
+ if (hasNativeMap) {
+ var idx = this._set.get(aStr);
+ if (idx >= 0) {
+ return idx;
+ }
+ } else {
+ var sStr = util.toSetString(aStr);
+ if (has.call(this._set, sStr)) {
+ return this._set[sStr];
+ }
+ }
+
+ throw new Error('"' + aStr + '" is not in the set.');
+};
+
+/**
+ * What is the element at the given index?
+ *
+ * @param Number aIdx
+ */
+ArraySet.prototype.at = function ArraySet_at(aIdx) {
+ if (aIdx >= 0 && aIdx < this._array.length) {
+ return this._array[aIdx];
+ }
+ throw new Error('No element indexed by ' + aIdx);
+};
+
+/**
+ * Returns the array representation of this set (which has the proper indices
+ * indicated by indexOf). Note that this is a copy of the internal array used
+ * for storing the members so that no one can mess with internal state.
+ */
+ArraySet.prototype.toArray = function ArraySet_toArray() {
+ return this._array.slice();
+};
+
+exports.ArraySet = ArraySet;
diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js b/node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js
new file mode 100644
index 0000000..612b404
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/lib/base64-vlq.js
@@ -0,0 +1,140 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ *
+ * Based on the Base 64 VLQ implementation in Closure Compiler:
+ * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
+ *
+ * Copyright 2011 The Closure Compiler Authors. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+var base64 = require('./base64');
+
+// A single base 64 digit can contain 6 bits of data. For the base 64 variable
+// length quantities we use in the source map spec, the first bit is the sign,
+// the next four bits are the actual value, and the 6th bit is the
+// continuation bit. The continuation bit tells us whether there are more
+// digits in this value following this digit.
+//
+// Continuation
+// | Sign
+// | |
+// V V
+// 101011
+
+var VLQ_BASE_SHIFT = 5;
+
+// binary: 100000
+var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
+
+// binary: 011111
+var VLQ_BASE_MASK = VLQ_BASE - 1;
+
+// binary: 100000
+var VLQ_CONTINUATION_BIT = VLQ_BASE;
+
+/**
+ * Converts from a two-complement value to a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
+ * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
+ */
+function toVLQSigned(aValue) {
+ return aValue < 0
+ ? ((-aValue) << 1) + 1
+ : (aValue << 1) + 0;
+}
+
+/**
+ * Converts to a two-complement value from a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
+ * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
+ */
+function fromVLQSigned(aValue) {
+ var isNegative = (aValue & 1) === 1;
+ var shifted = aValue >> 1;
+ return isNegative
+ ? -shifted
+ : shifted;
+}
+
+/**
+ * Returns the base 64 VLQ encoded value.
+ */
+exports.encode = function base64VLQ_encode(aValue) {
+ var encoded = "";
+ var digit;
+
+ var vlq = toVLQSigned(aValue);
+
+ do {
+ digit = vlq & VLQ_BASE_MASK;
+ vlq >>>= VLQ_BASE_SHIFT;
+ if (vlq > 0) {
+ // There are still more digits in this value, so we must make sure the
+ // continuation bit is marked.
+ digit |= VLQ_CONTINUATION_BIT;
+ }
+ encoded += base64.encode(digit);
+ } while (vlq > 0);
+
+ return encoded;
+};
+
+/**
+ * Decodes the next base 64 VLQ value from the given string and returns the
+ * value and the rest of the string via the out parameter.
+ */
+exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
+ var strLen = aStr.length;
+ var result = 0;
+ var shift = 0;
+ var continuation, digit;
+
+ do {
+ if (aIndex >= strLen) {
+ throw new Error("Expected more digits in base 64 VLQ value.");
+ }
+
+ digit = base64.decode(aStr.charCodeAt(aIndex++));
+ if (digit === -1) {
+ throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
+ }
+
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
+ digit &= VLQ_BASE_MASK;
+ result = result + (digit << shift);
+ shift += VLQ_BASE_SHIFT;
+ } while (continuation);
+
+ aOutParam.value = fromVLQSigned(result);
+ aOutParam.rest = aIndex;
+};
diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/base64.js b/node_modules/@babel/generator/node_modules/source-map/lib/base64.js
new file mode 100644
index 0000000..8aa86b3
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/lib/base64.js
@@ -0,0 +1,67 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+
+/**
+ * Encode an integer in the range of 0 to 63 to a single base 64 digit.
+ */
+exports.encode = function (number) {
+ if (0 <= number && number < intToCharMap.length) {
+ return intToCharMap[number];
+ }
+ throw new TypeError("Must be between 0 and 63: " + number);
+};
+
+/**
+ * Decode a single base 64 character code digit to an integer. Returns -1 on
+ * failure.
+ */
+exports.decode = function (charCode) {
+ var bigA = 65; // 'A'
+ var bigZ = 90; // 'Z'
+
+ var littleA = 97; // 'a'
+ var littleZ = 122; // 'z'
+
+ var zero = 48; // '0'
+ var nine = 57; // '9'
+
+ var plus = 43; // '+'
+ var slash = 47; // '/'
+
+ var littleOffset = 26;
+ var numberOffset = 52;
+
+ // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
+ if (bigA <= charCode && charCode <= bigZ) {
+ return (charCode - bigA);
+ }
+
+ // 26 - 51: abcdefghijklmnopqrstuvwxyz
+ if (littleA <= charCode && charCode <= littleZ) {
+ return (charCode - littleA + littleOffset);
+ }
+
+ // 52 - 61: 0123456789
+ if (zero <= charCode && charCode <= nine) {
+ return (charCode - zero + numberOffset);
+ }
+
+ // 62: +
+ if (charCode == plus) {
+ return 62;
+ }
+
+ // 63: /
+ if (charCode == slash) {
+ return 63;
+ }
+
+ // Invalid base64 digit.
+ return -1;
+};
diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js b/node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js
new file mode 100644
index 0000000..010ac94
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/lib/binary-search.js
@@ -0,0 +1,111 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+exports.GREATEST_LOWER_BOUND = 1;
+exports.LEAST_UPPER_BOUND = 2;
+
+/**
+ * Recursive implementation of binary search.
+ *
+ * @param aLow Indices here and lower do not contain the needle.
+ * @param aHigh Indices here and higher do not contain the needle.
+ * @param aNeedle The element being searched for.
+ * @param aHaystack The non-empty array being searched.
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ */
+function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
+ // This function terminates when one of the following is true:
+ //
+ // 1. We find the exact element we are looking for.
+ //
+ // 2. We did not find the exact element, but we can return the index of
+ // the next-closest element.
+ //
+ // 3. We did not find the exact element, and there is no next-closest
+ // element than the one we are searching for, so we return -1.
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
+ if (cmp === 0) {
+ // Found the element we are looking for.
+ return mid;
+ }
+ else if (cmp > 0) {
+ // Our needle is greater than aHaystack[mid].
+ if (aHigh - mid > 1) {
+ // The element is in the upper half.
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // The exact needle element was not found in this haystack. Determine if
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return aHigh < aHaystack.length ? aHigh : -1;
+ } else {
+ return mid;
+ }
+ }
+ else {
+ // Our needle is less than aHaystack[mid].
+ if (mid - aLow > 1) {
+ // The element is in the lower half.
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return mid;
+ } else {
+ return aLow < 0 ? -1 : aLow;
+ }
+ }
+}
+
+/**
+ * This is an implementation of binary search which will always try and return
+ * the index of the closest element if there is no exact hit. This is because
+ * mappings between original and generated line/col pairs are single points,
+ * and there is an implicit region between each of them, so a miss just means
+ * that you aren't on the very start of a region.
+ *
+ * @param aNeedle The element you are looking for.
+ * @param aHaystack The array that is being searched.
+ * @param aCompare A function which takes the needle and an element in the
+ * array and returns -1, 0, or 1 depending on whether the needle is less
+ * than, equal to, or greater than the element, respectively.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
+ */
+exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
+ if (aHaystack.length === 0) {
+ return -1;
+ }
+
+ var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
+ aCompare, aBias || exports.GREATEST_LOWER_BOUND);
+ if (index < 0) {
+ return -1;
+ }
+
+ // We have found either the exact element, or the next-closest element than
+ // the one we are searching for. However, there may be more than one such
+ // element. Make sure we always return the smallest of these.
+ while (index - 1 >= 0) {
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
+ break;
+ }
+ --index;
+ }
+
+ return index;
+};
diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js b/node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js
new file mode 100644
index 0000000..06d1274
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/lib/mapping-list.js
@@ -0,0 +1,79 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2014 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var util = require('./util');
+
+/**
+ * Determine whether mappingB is after mappingA with respect to generated
+ * position.
+ */
+function generatedPositionAfter(mappingA, mappingB) {
+ // Optimized for most common case
+ var lineA = mappingA.generatedLine;
+ var lineB = mappingB.generatedLine;
+ var columnA = mappingA.generatedColumn;
+ var columnB = mappingB.generatedColumn;
+ return lineB > lineA || lineB == lineA && columnB >= columnA ||
+ util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
+}
+
+/**
+ * A data structure to provide a sorted view of accumulated mappings in a
+ * performance conscious manner. It trades a neglibable overhead in general
+ * case for a large speedup in case of mappings being added in order.
+ */
+function MappingList() {
+ this._array = [];
+ this._sorted = true;
+ // Serves as infimum
+ this._last = {generatedLine: -1, generatedColumn: 0};
+}
+
+/**
+ * Iterate through internal items. This method takes the same arguments that
+ * `Array.prototype.forEach` takes.
+ *
+ * NOTE: The order of the mappings is NOT guaranteed.
+ */
+MappingList.prototype.unsortedForEach =
+ function MappingList_forEach(aCallback, aThisArg) {
+ this._array.forEach(aCallback, aThisArg);
+ };
+
+/**
+ * Add the given source mapping.
+ *
+ * @param Object aMapping
+ */
+MappingList.prototype.add = function MappingList_add(aMapping) {
+ if (generatedPositionAfter(this._last, aMapping)) {
+ this._last = aMapping;
+ this._array.push(aMapping);
+ } else {
+ this._sorted = false;
+ this._array.push(aMapping);
+ }
+};
+
+/**
+ * Returns the flat, sorted array of mappings. The mappings are sorted by
+ * generated position.
+ *
+ * WARNING: This method returns internal data without copying, for
+ * performance. The return value must NOT be mutated, and should be treated as
+ * an immutable borrow. If you want to take ownership, you must make your own
+ * copy.
+ */
+MappingList.prototype.toArray = function MappingList_toArray() {
+ if (!this._sorted) {
+ this._array.sort(util.compareByGeneratedPositionsInflated);
+ this._sorted = true;
+ }
+ return this._array;
+};
+
+exports.MappingList = MappingList;
diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js b/node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js
new file mode 100644
index 0000000..6a7caad
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/lib/quick-sort.js
@@ -0,0 +1,114 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+// It turns out that some (most?) JavaScript engines don't self-host
+// `Array.prototype.sort`. This makes sense because C++ will likely remain
+// faster than JS when doing raw CPU-intensive sorting. However, when using a
+// custom comparator function, calling back and forth between the VM's C++ and
+// JIT'd JS is rather slow *and* loses JIT type information, resulting in
+// worse generated code for the comparator function than would be optimal. In
+// fact, when sorting with a comparator, these costs outweigh the benefits of
+// sorting in C++. By using our own JS-implemented Quick Sort (below), we get
+// a ~3500ms mean speed-up in `bench/bench.html`.
+
+/**
+ * Swap the elements indexed by `x` and `y` in the array `ary`.
+ *
+ * @param {Array} ary
+ * The array.
+ * @param {Number} x
+ * The index of the first item.
+ * @param {Number} y
+ * The index of the second item.
+ */
+function swap(ary, x, y) {
+ var temp = ary[x];
+ ary[x] = ary[y];
+ ary[y] = temp;
+}
+
+/**
+ * Returns a random integer within the range `low .. high` inclusive.
+ *
+ * @param {Number} low
+ * The lower bound on the range.
+ * @param {Number} high
+ * The upper bound on the range.
+ */
+function randomIntInRange(low, high) {
+ return Math.round(low + (Math.random() * (high - low)));
+}
+
+/**
+ * The Quick Sort algorithm.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ * @param {Number} p
+ * Start index of the array
+ * @param {Number} r
+ * End index of the array
+ */
+function doQuickSort(ary, comparator, p, r) {
+ // If our lower bound is less than our upper bound, we (1) partition the
+ // array into two pieces and (2) recurse on each half. If it is not, this is
+ // the empty array and our base case.
+
+ if (p < r) {
+ // (1) Partitioning.
+ //
+ // The partitioning chooses a pivot between `p` and `r` and moves all
+ // elements that are less than or equal to the pivot to the before it, and
+ // all the elements that are greater than it after it. The effect is that
+ // once partition is done, the pivot is in the exact place it will be when
+ // the array is put in sorted order, and it will not need to be moved
+ // again. This runs in O(n) time.
+
+ // Always choose a random pivot so that an input array which is reverse
+ // sorted does not cause O(n^2) running time.
+ var pivotIndex = randomIntInRange(p, r);
+ var i = p - 1;
+
+ swap(ary, pivotIndex, r);
+ var pivot = ary[r];
+
+ // Immediately after `j` is incremented in this loop, the following hold
+ // true:
+ //
+ // * Every element in `ary[p .. i]` is less than or equal to the pivot.
+ //
+ // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
+ for (var j = p; j < r; j++) {
+ if (comparator(ary[j], pivot) <= 0) {
+ i += 1;
+ swap(ary, i, j);
+ }
+ }
+
+ swap(ary, i + 1, j);
+ var q = i + 1;
+
+ // (2) Recurse on each half.
+
+ doQuickSort(ary, comparator, p, q - 1);
+ doQuickSort(ary, comparator, q + 1, r);
+ }
+}
+
+/**
+ * Sort the given array in-place with the given comparator function.
+ *
+ * @param {Array} ary
+ * An array to sort.
+ * @param {function} comparator
+ * Function to use to compare two items.
+ */
+exports.quickSort = function (ary, comparator) {
+ doQuickSort(ary, comparator, 0, ary.length - 1);
+};
diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js b/node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js
new file mode 100644
index 0000000..6abcc28
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/lib/source-map-consumer.js
@@ -0,0 +1,1082 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var util = require('./util');
+var binarySearch = require('./binary-search');
+var ArraySet = require('./array-set').ArraySet;
+var base64VLQ = require('./base64-vlq');
+var quickSort = require('./quick-sort').quickSort;
+
+function SourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ return sourceMap.sections != null
+ ? new IndexedSourceMapConsumer(sourceMap)
+ : new BasicSourceMapConsumer(sourceMap);
+}
+
+SourceMapConsumer.fromSourceMap = function(aSourceMap) {
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
+}
+
+/**
+ * The version of the source mapping spec that we are consuming.
+ */
+SourceMapConsumer.prototype._version = 3;
+
+// `__generatedMappings` and `__originalMappings` are arrays that hold the
+// parsed mapping coordinates from the source map's "mappings" attribute. They
+// are lazily instantiated, accessed via the `_generatedMappings` and
+// `_originalMappings` getters respectively, and we only parse the mappings
+// and create these arrays once queried for a source location. We jump through
+// these hoops because there can be many thousands of mappings, and parsing
+// them is expensive, so we only want to do it if we must.
+//
+// Each object in the arrays is of the form:
+//
+// {
+// generatedLine: The line number in the generated code,
+// generatedColumn: The column number in the generated code,
+// source: The path to the original source file that generated this
+// chunk of code,
+// originalLine: The line number in the original source that
+// corresponds to this chunk of generated code,
+// originalColumn: The column number in the original source that
+// corresponds to this chunk of generated code,
+// name: The name of the original symbol which generated this chunk of
+// code.
+// }
+//
+// All properties except for `generatedLine` and `generatedColumn` can be
+// `null`.
+//
+// `_generatedMappings` is ordered by the generated positions.
+//
+// `_originalMappings` is ordered by the original positions.
+
+SourceMapConsumer.prototype.__generatedMappings = null;
+Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
+ get: function () {
+ if (!this.__generatedMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__generatedMappings;
+ }
+});
+
+SourceMapConsumer.prototype.__originalMappings = null;
+Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
+ get: function () {
+ if (!this.__originalMappings) {
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__originalMappings;
+ }
+});
+
+SourceMapConsumer.prototype._charIsMappingSeparator =
+ function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
+ var c = aStr.charAt(index);
+ return c === ";" || c === ",";
+ };
+
+/**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+SourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ throw new Error("Subclasses must implement _parseMappings");
+ };
+
+SourceMapConsumer.GENERATED_ORDER = 1;
+SourceMapConsumer.ORIGINAL_ORDER = 2;
+
+SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
+SourceMapConsumer.LEAST_UPPER_BOUND = 2;
+
+/**
+ * Iterate over each mapping between an original source/line/column and a
+ * generated line/column in this source map.
+ *
+ * @param Function aCallback
+ * The function that is called with each mapping.
+ * @param Object aContext
+ * Optional. If specified, this object will be the value of `this` every
+ * time that `aCallback` is called.
+ * @param aOrder
+ * Either `SourceMapConsumer.GENERATED_ORDER` or
+ * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
+ * iterate over the mappings sorted by the generated file's line/column
+ * order or the original's source/line/column order, respectively. Defaults to
+ * `SourceMapConsumer.GENERATED_ORDER`.
+ */
+SourceMapConsumer.prototype.eachMapping =
+ function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
+ var context = aContext || null;
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
+
+ var mappings;
+ switch (order) {
+ case SourceMapConsumer.GENERATED_ORDER:
+ mappings = this._generatedMappings;
+ break;
+ case SourceMapConsumer.ORIGINAL_ORDER:
+ mappings = this._originalMappings;
+ break;
+ default:
+ throw new Error("Unknown order of iteration.");
+ }
+
+ var sourceRoot = this.sourceRoot;
+ mappings.map(function (mapping) {
+ var source = mapping.source === null ? null : this._sources.at(mapping.source);
+ if (source != null && sourceRoot != null) {
+ source = util.join(sourceRoot, source);
+ }
+ return {
+ source: source,
+ generatedLine: mapping.generatedLine,
+ generatedColumn: mapping.generatedColumn,
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: mapping.name === null ? null : this._names.at(mapping.name)
+ };
+ }, this).forEach(aCallback, context);
+ };
+
+/**
+ * Returns all generated line and column information for the original source,
+ * line, and column provided. If no column is provided, returns all mappings
+ * corresponding to a either the line we are searching for or the next
+ * closest line that has any mappings. Otherwise, returns all mappings
+ * corresponding to the given line and either the column we are searching for
+ * or the next closest column that has any offsets.
+ *
+ * The only argument is an object with the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: Optional. the column number in the original source.
+ *
+ * and an array of objects is returned, each with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+SourceMapConsumer.prototype.allGeneratedPositionsFor =
+ function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
+ var line = util.getArg(aArgs, 'line');
+
+ // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
+ // returns the index of the closest mapping less than the needle. By
+ // setting needle.originalColumn to 0, we thus find the last mapping for
+ // the given line, provided such a mapping exists.
+ var needle = {
+ source: util.getArg(aArgs, 'source'),
+ originalLine: line,
+ originalColumn: util.getArg(aArgs, 'column', 0)
+ };
+
+ if (this.sourceRoot != null) {
+ needle.source = util.relative(this.sourceRoot, needle.source);
+ }
+ if (!this._sources.has(needle.source)) {
+ return [];
+ }
+ needle.source = this._sources.indexOf(needle.source);
+
+ var mappings = [];
+
+ var index = this._findMapping(needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ binarySearch.LEAST_UPPER_BOUND);
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (aArgs.column === undefined) {
+ var originalLine = mapping.originalLine;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we found. Since
+ // mappings are sorted, this is guaranteed to find all mappings for
+ // the line we found.
+ while (mapping && mapping.originalLine === originalLine) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ } else {
+ var originalColumn = mapping.originalColumn;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line than the one we were searching for.
+ // Since mappings are sorted, this is guaranteed to find all mappings for
+ // the line we are searching for.
+ while (mapping &&
+ mapping.originalLine === line &&
+ mapping.originalColumn == originalColumn) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ }
+ }
+
+ return mappings;
+ };
+
+exports.SourceMapConsumer = SourceMapConsumer;
+
+/**
+ * A BasicSourceMapConsumer instance represents a parsed source map which we can
+ * query for information about the original file positions by giving it a file
+ * position in the generated source.
+ *
+ * The only parameter is the raw source map (either as a JSON string, or
+ * already parsed to an object). According to the spec, source maps have the
+ * following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - sources: An array of URLs to the original source files.
+ * - names: An array of identifiers which can be referrenced by individual mappings.
+ * - sourceRoot: Optional. The URL root from which all sources are relative.
+ * - sourcesContent: Optional. An array of contents of the original source files.
+ * - mappings: A string of base64 VLQs which contain the actual mappings.
+ * - file: Optional. The generated file this source map is associated with.
+ *
+ * Here is an example source map, taken from the source map spec[0]:
+ *
+ * {
+ * version : 3,
+ * file: "out.js",
+ * sourceRoot : "",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AA,AB;;ABCDE;"
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
+ */
+function BasicSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sources = util.getArg(sourceMap, 'sources');
+ // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
+ // requires the array) to play nice here.
+ var names = util.getArg(sourceMap, 'names', []);
+ var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
+ var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
+ var mappings = util.getArg(sourceMap, 'mappings');
+ var file = util.getArg(sourceMap, 'file', null);
+
+ // Once again, Sass deviates from the spec and supplies the version as a
+ // string rather than a number, so we use loose equality checking here.
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ sources = sources
+ .map(String)
+ // Some source maps produce relative source paths like "./foo.js" instead of
+ // "foo.js". Normalize these first so that future comparisons will succeed.
+ // See bugzil.la/1090768.
+ .map(util.normalize)
+ // Always ensure that absolute sources are internally stored relative to
+ // the source root, if the source root is absolute. Not doing this would
+ // be particularly problematic when the source root is a prefix of the
+ // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
+ .map(function (source) {
+ return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
+ ? util.relative(sourceRoot, source)
+ : source;
+ });
+
+ // Pass `true` below to allow duplicate names and sources. While source maps
+ // are intended to be compressed and deduplicated, the TypeScript compiler
+ // sometimes generates source maps with duplicates in them. See Github issue
+ // #72 and bugzil.la/889492.
+ this._names = ArraySet.fromArray(names.map(String), true);
+ this._sources = ArraySet.fromArray(sources, true);
+
+ this.sourceRoot = sourceRoot;
+ this.sourcesContent = sourcesContent;
+ this._mappings = mappings;
+ this.file = file;
+}
+
+BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
+
+/**
+ * Create a BasicSourceMapConsumer from a SourceMapGenerator.
+ *
+ * @param SourceMapGenerator aSourceMap
+ * The source map that will be consumed.
+ * @returns BasicSourceMapConsumer
+ */
+BasicSourceMapConsumer.fromSourceMap =
+ function SourceMapConsumer_fromSourceMap(aSourceMap) {
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
+
+ var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
+ var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
+ smc.sourceRoot = aSourceMap._sourceRoot;
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
+ smc.sourceRoot);
+ smc.file = aSourceMap._file;
+
+ // Because we are modifying the entries (by converting string sources and
+ // names to indices into the sources and names ArraySets), we have to make
+ // a copy of the entry or else bad things happen. Shared mutable state
+ // strikes again! See github issue #191.
+
+ var generatedMappings = aSourceMap._mappings.toArray().slice();
+ var destGeneratedMappings = smc.__generatedMappings = [];
+ var destOriginalMappings = smc.__originalMappings = [];
+
+ for (var i = 0, length = generatedMappings.length; i < length; i++) {
+ var srcMapping = generatedMappings[i];
+ var destMapping = new Mapping;
+ destMapping.generatedLine = srcMapping.generatedLine;
+ destMapping.generatedColumn = srcMapping.generatedColumn;
+
+ if (srcMapping.source) {
+ destMapping.source = sources.indexOf(srcMapping.source);
+ destMapping.originalLine = srcMapping.originalLine;
+ destMapping.originalColumn = srcMapping.originalColumn;
+
+ if (srcMapping.name) {
+ destMapping.name = names.indexOf(srcMapping.name);
+ }
+
+ destOriginalMappings.push(destMapping);
+ }
+
+ destGeneratedMappings.push(destMapping);
+ }
+
+ quickSort(smc.__originalMappings, util.compareByOriginalPositions);
+
+ return smc;
+ };
+
+/**
+ * The version of the source mapping spec that we are consuming.
+ */
+BasicSourceMapConsumer.prototype._version = 3;
+
+/**
+ * The list of original sources.
+ */
+Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ return this._sources.toArray().map(function (s) {
+ return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
+ }, this);
+ }
+});
+
+/**
+ * Provide the JIT with a nice shape / hidden class.
+ */
+function Mapping() {
+ this.generatedLine = 0;
+ this.generatedColumn = 0;
+ this.source = null;
+ this.originalLine = null;
+ this.originalColumn = null;
+ this.name = null;
+}
+
+/**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+BasicSourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ var generatedLine = 1;
+ var previousGeneratedColumn = 0;
+ var previousOriginalLine = 0;
+ var previousOriginalColumn = 0;
+ var previousSource = 0;
+ var previousName = 0;
+ var length = aStr.length;
+ var index = 0;
+ var cachedSegments = {};
+ var temp = {};
+ var originalMappings = [];
+ var generatedMappings = [];
+ var mapping, str, segment, end, value;
+
+ while (index < length) {
+ if (aStr.charAt(index) === ';') {
+ generatedLine++;
+ index++;
+ previousGeneratedColumn = 0;
+ }
+ else if (aStr.charAt(index) === ',') {
+ index++;
+ }
+ else {
+ mapping = new Mapping();
+ mapping.generatedLine = generatedLine;
+
+ // Because each offset is encoded relative to the previous one,
+ // many segments often have the same encoding. We can exploit this
+ // fact by caching the parsed variable length fields of each segment,
+ // allowing us to avoid a second parse if we encounter the same
+ // segment again.
+ for (end = index; end < length; end++) {
+ if (this._charIsMappingSeparator(aStr, end)) {
+ break;
+ }
+ }
+ str = aStr.slice(index, end);
+
+ segment = cachedSegments[str];
+ if (segment) {
+ index += str.length;
+ } else {
+ segment = [];
+ while (index < end) {
+ base64VLQ.decode(aStr, index, temp);
+ value = temp.value;
+ index = temp.rest;
+ segment.push(value);
+ }
+
+ if (segment.length === 2) {
+ throw new Error('Found a source, but no line and column');
+ }
+
+ if (segment.length === 3) {
+ throw new Error('Found a source and line, but no column');
+ }
+
+ cachedSegments[str] = segment;
+ }
+
+ // Generated column.
+ mapping.generatedColumn = previousGeneratedColumn + segment[0];
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (segment.length > 1) {
+ // Original source.
+ mapping.source = previousSource + segment[1];
+ previousSource += segment[1];
+
+ // Original line.
+ mapping.originalLine = previousOriginalLine + segment[2];
+ previousOriginalLine = mapping.originalLine;
+ // Lines are stored 0-based
+ mapping.originalLine += 1;
+
+ // Original column.
+ mapping.originalColumn = previousOriginalColumn + segment[3];
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (segment.length > 4) {
+ // Original name.
+ mapping.name = previousName + segment[4];
+ previousName += segment[4];
+ }
+ }
+
+ generatedMappings.push(mapping);
+ if (typeof mapping.originalLine === 'number') {
+ originalMappings.push(mapping);
+ }
+ }
+ }
+
+ quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
+ this.__generatedMappings = generatedMappings;
+
+ quickSort(originalMappings, util.compareByOriginalPositions);
+ this.__originalMappings = originalMappings;
+ };
+
+/**
+ * Find the mapping that best matches the hypothetical "needle" mapping that
+ * we are searching for in the given "haystack" of mappings.
+ */
+BasicSourceMapConsumer.prototype._findMapping =
+ function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
+ aColumnName, aComparator, aBias) {
+ // To return the position we are searching for, we must first find the
+ // mapping for the given position and then return the opposite position it
+ // points to. Because the mappings are sorted, we can use binary search to
+ // find the best mapping.
+
+ if (aNeedle[aLineName] <= 0) {
+ throw new TypeError('Line must be greater than or equal to 1, got '
+ + aNeedle[aLineName]);
+ }
+ if (aNeedle[aColumnName] < 0) {
+ throw new TypeError('Column must be greater than or equal to 0, got '
+ + aNeedle[aColumnName]);
+ }
+
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
+ };
+
+/**
+ * Compute the last column for each generated mapping. The last column is
+ * inclusive.
+ */
+BasicSourceMapConsumer.prototype.computeColumnSpans =
+ function SourceMapConsumer_computeColumnSpans() {
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
+ var mapping = this._generatedMappings[index];
+
+ // Mappings do not contain a field for the last generated columnt. We
+ // can come up with an optimistic estimate, however, by assuming that
+ // mappings are contiguous (i.e. given two consecutive mappings, the
+ // first mapping ends where the second one starts).
+ if (index + 1 < this._generatedMappings.length) {
+ var nextMapping = this._generatedMappings[index + 1];
+
+ if (mapping.generatedLine === nextMapping.generatedLine) {
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
+ continue;
+ }
+ }
+
+ // The last mapping for each line spans the entire line.
+ mapping.lastGeneratedColumn = Infinity;
+ }
+ };
+
+/**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+BasicSourceMapConsumer.prototype.originalPositionFor =
+ function SourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._generatedMappings,
+ "generatedLine",
+ "generatedColumn",
+ util.compareByGeneratedPositionsDeflated,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._generatedMappings[index];
+
+ if (mapping.generatedLine === needle.generatedLine) {
+ var source = util.getArg(mapping, 'source', null);
+ if (source !== null) {
+ source = this._sources.at(source);
+ if (this.sourceRoot != null) {
+ source = util.join(this.sourceRoot, source);
+ }
+ }
+ var name = util.getArg(mapping, 'name', null);
+ if (name !== null) {
+ name = this._names.at(name);
+ }
+ return {
+ source: source,
+ line: util.getArg(mapping, 'originalLine', null),
+ column: util.getArg(mapping, 'originalColumn', null),
+ name: name
+ };
+ }
+ }
+
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ };
+
+/**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function BasicSourceMapConsumer_hasContentsOfAllSources() {
+ if (!this.sourcesContent) {
+ return false;
+ }
+ return this.sourcesContent.length >= this._sources.size() &&
+ !this.sourcesContent.some(function (sc) { return sc == null; });
+ };
+
+/**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+BasicSourceMapConsumer.prototype.sourceContentFor =
+ function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ if (!this.sourcesContent) {
+ return null;
+ }
+
+ if (this.sourceRoot != null) {
+ aSource = util.relative(this.sourceRoot, aSource);
+ }
+
+ if (this._sources.has(aSource)) {
+ return this.sourcesContent[this._sources.indexOf(aSource)];
+ }
+
+ var url;
+ if (this.sourceRoot != null
+ && (url = util.urlParse(this.sourceRoot))) {
+ // XXX: file:// URIs and absolute paths lead to unexpected behavior for
+ // many users. We can help them out when they expect file:// URIs to
+ // behave like it would if they were running a local HTTP server. See
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
+ var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
+ if (url.scheme == "file"
+ && this._sources.has(fileUriAbsPath)) {
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
+ }
+
+ if ((!url.path || url.path == "/")
+ && this._sources.has("/" + aSource)) {
+ return this.sourcesContent[this._sources.indexOf("/" + aSource)];
+ }
+ }
+
+ // This function is used recursively from
+ // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
+ // don't want to throw if we can't find the source - we just want to
+ // return null, so we provide a flag to exit gracefully.
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+/**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+BasicSourceMapConsumer.prototype.generatedPositionFor =
+ function SourceMapConsumer_generatedPositionFor(aArgs) {
+ var source = util.getArg(aArgs, 'source');
+ if (this.sourceRoot != null) {
+ source = util.relative(this.sourceRoot, source);
+ }
+ if (!this._sources.has(source)) {
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ }
+ source = this._sources.indexOf(source);
+
+ var needle = {
+ source: source,
+ originalLine: util.getArg(aArgs, 'line'),
+ originalColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (mapping.source === needle.source) {
+ return {
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ };
+ }
+ }
+
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ };
+
+exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
+
+/**
+ * An IndexedSourceMapConsumer instance represents a parsed source map which
+ * we can query for information. It differs from BasicSourceMapConsumer in
+ * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
+ * input.
+ *
+ * The only parameter is a raw source map (either as a JSON string, or already
+ * parsed to an object). According to the spec for indexed source maps, they
+ * have the following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - file: Optional. The generated file this source map is associated with.
+ * - sections: A list of section definitions.
+ *
+ * Each value under the "sections" field has two fields:
+ * - offset: The offset into the original specified at which this section
+ * begins to apply, defined as an object with a "line" and "column"
+ * field.
+ * - map: A source map definition. This source map could also be indexed,
+ * but doesn't have to be.
+ *
+ * Instead of the "map" field, it's also possible to have a "url" field
+ * specifying a URL to retrieve a source map from, but that's currently
+ * unsupported.
+ *
+ * Here's an example source map, taken from the source map spec[0], but
+ * modified to omit a section which uses the "url" field.
+ *
+ * {
+ * version : 3,
+ * file: "app.js",
+ * sections: [{
+ * offset: {line:100, column:10},
+ * map: {
+ * version : 3,
+ * file: "section.js",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AAAA,E;;ABCDE;"
+ * }
+ * }],
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
+ */
+function IndexedSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sections = util.getArg(sourceMap, 'sections');
+
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+
+ var lastOffset = {
+ line: -1,
+ column: 0
+ };
+ this._sections = sections.map(function (s) {
+ if (s.url) {
+ // The url field will require support for asynchronicity.
+ // See https://github.com/mozilla/source-map/issues/16
+ throw new Error('Support for url field in sections not implemented.');
+ }
+ var offset = util.getArg(s, 'offset');
+ var offsetLine = util.getArg(offset, 'line');
+ var offsetColumn = util.getArg(offset, 'column');
+
+ if (offsetLine < lastOffset.line ||
+ (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
+ throw new Error('Section offsets must be ordered and non-overlapping.');
+ }
+ lastOffset = offset;
+
+ return {
+ generatedOffset: {
+ // The offset fields are 0-based, but we use 1-based indices when
+ // encoding/decoding from VLQ.
+ generatedLine: offsetLine + 1,
+ generatedColumn: offsetColumn + 1
+ },
+ consumer: new SourceMapConsumer(util.getArg(s, 'map'))
+ }
+ });
+}
+
+IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
+
+/**
+ * The version of the source mapping spec that we are consuming.
+ */
+IndexedSourceMapConsumer.prototype._version = 3;
+
+/**
+ * The list of original sources.
+ */
+Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ var sources = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
+ sources.push(this._sections[i].consumer.sources[j]);
+ }
+ }
+ return sources;
+ }
+});
+
+/**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+IndexedSourceMapConsumer.prototype.originalPositionFor =
+ function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ // Find the section containing the generated position we're trying to map
+ // to an original position.
+ var sectionIndex = binarySearch.search(needle, this._sections,
+ function(needle, section) {
+ var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ return (needle.generatedColumn -
+ section.generatedOffset.generatedColumn);
+ });
+ var section = this._sections[sectionIndex];
+
+ if (!section) {
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ }
+
+ return section.consumer.originalPositionFor({
+ line: needle.generatedLine -
+ (section.generatedOffset.generatedLine - 1),
+ column: needle.generatedColumn -
+ (section.generatedOffset.generatedLine === needle.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ bias: aArgs.bias
+ });
+ };
+
+/**
+ * Return true if we have the source content for every source in the source
+ * map, false otherwise.
+ */
+IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
+ function IndexedSourceMapConsumer_hasContentsOfAllSources() {
+ return this._sections.every(function (s) {
+ return s.consumer.hasContentsOfAllSources();
+ });
+ };
+
+/**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+IndexedSourceMapConsumer.prototype.sourceContentFor =
+ function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ var content = section.consumer.sourceContentFor(aSource, true);
+ if (content) {
+ return content;
+ }
+ }
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+/**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+IndexedSourceMapConsumer.prototype.generatedPositionFor =
+ function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ // Only consider this section if the requested source is in the list of
+ // sources of the consumer.
+ if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
+ continue;
+ }
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
+ if (generatedPosition) {
+ var ret = {
+ line: generatedPosition.line +
+ (section.generatedOffset.generatedLine - 1),
+ column: generatedPosition.column +
+ (section.generatedOffset.generatedLine === generatedPosition.line
+ ? section.generatedOffset.generatedColumn - 1
+ : 0)
+ };
+ return ret;
+ }
+ }
+
+ return {
+ line: null,
+ column: null
+ };
+ };
+
+/**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+IndexedSourceMapConsumer.prototype._parseMappings =
+ function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+ var sectionMappings = section.consumer._generatedMappings;
+ for (var j = 0; j < sectionMappings.length; j++) {
+ var mapping = sectionMappings[j];
+
+ var source = section.consumer._sources.at(mapping.source);
+ if (section.consumer.sourceRoot !== null) {
+ source = util.join(section.consumer.sourceRoot, source);
+ }
+ this._sources.add(source);
+ source = this._sources.indexOf(source);
+
+ var name = section.consumer._names.at(mapping.name);
+ this._names.add(name);
+ name = this._names.indexOf(name);
+
+ // The mappings coming from the consumer for the section have
+ // generated positions relative to the start of the section, so we
+ // need to offset them to be relative to the start of the concatenated
+ // generated file.
+ var adjustedMapping = {
+ source: source,
+ generatedLine: mapping.generatedLine +
+ (section.generatedOffset.generatedLine - 1),
+ generatedColumn: mapping.generatedColumn +
+ (section.generatedOffset.generatedLine === mapping.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: name
+ };
+
+ this.__generatedMappings.push(adjustedMapping);
+ if (typeof adjustedMapping.originalLine === 'number') {
+ this.__originalMappings.push(adjustedMapping);
+ }
+ }
+ }
+
+ quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
+ quickSort(this.__originalMappings, util.compareByOriginalPositions);
+ };
+
+exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js b/node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js
new file mode 100644
index 0000000..aff1e7f
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/lib/source-map-generator.js
@@ -0,0 +1,416 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var base64VLQ = require('./base64-vlq');
+var util = require('./util');
+var ArraySet = require('./array-set').ArraySet;
+var MappingList = require('./mapping-list').MappingList;
+
+/**
+ * An instance of the SourceMapGenerator represents a source map which is
+ * being built incrementally. You may pass an object with the following
+ * properties:
+ *
+ * - file: The filename of the generated source.
+ * - sourceRoot: A root for all relative URLs in this source map.
+ */
+function SourceMapGenerator(aArgs) {
+ if (!aArgs) {
+ aArgs = {};
+ }
+ this._file = util.getArg(aArgs, 'file', null);
+ this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
+ this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+ this._mappings = new MappingList();
+ this._sourcesContents = null;
+}
+
+SourceMapGenerator.prototype._version = 3;
+
+/**
+ * Creates a new SourceMapGenerator based on a SourceMapConsumer
+ *
+ * @param aSourceMapConsumer The SourceMap.
+ */
+SourceMapGenerator.fromSourceMap =
+ function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
+ var generator = new SourceMapGenerator({
+ file: aSourceMapConsumer.file,
+ sourceRoot: sourceRoot
+ });
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ var newMapping = {
+ generated: {
+ line: mapping.generatedLine,
+ column: mapping.generatedColumn
+ }
+ };
+
+ if (mapping.source != null) {
+ newMapping.source = mapping.source;
+ if (sourceRoot != null) {
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
+ }
+
+ newMapping.original = {
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ };
+
+ if (mapping.name != null) {
+ newMapping.name = mapping.name;
+ }
+ }
+
+ generator.addMapping(newMapping);
+ });
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ generator.setSourceContent(sourceFile, content);
+ }
+ });
+ return generator;
+ };
+
+/**
+ * Add a single mapping from original source line and column to the generated
+ * source's line and column for this source map being created. The mapping
+ * object should have the following properties:
+ *
+ * - generated: An object with the generated line and column positions.
+ * - original: An object with the original line and column positions.
+ * - source: The original source file (relative to the sourceRoot).
+ * - name: An optional original token name for this mapping.
+ */
+SourceMapGenerator.prototype.addMapping =
+ function SourceMapGenerator_addMapping(aArgs) {
+ var generated = util.getArg(aArgs, 'generated');
+ var original = util.getArg(aArgs, 'original', null);
+ var source = util.getArg(aArgs, 'source', null);
+ var name = util.getArg(aArgs, 'name', null);
+
+ if (!this._skipValidation) {
+ this._validateMapping(generated, original, source, name);
+ }
+
+ if (source != null) {
+ source = String(source);
+ if (!this._sources.has(source)) {
+ this._sources.add(source);
+ }
+ }
+
+ if (name != null) {
+ name = String(name);
+ if (!this._names.has(name)) {
+ this._names.add(name);
+ }
+ }
+
+ this._mappings.add({
+ generatedLine: generated.line,
+ generatedColumn: generated.column,
+ originalLine: original != null && original.line,
+ originalColumn: original != null && original.column,
+ source: source,
+ name: name
+ });
+ };
+
+/**
+ * Set the source content for a source file.
+ */
+SourceMapGenerator.prototype.setSourceContent =
+ function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
+ var source = aSourceFile;
+ if (this._sourceRoot != null) {
+ source = util.relative(this._sourceRoot, source);
+ }
+
+ if (aSourceContent != null) {
+ // Add the source content to the _sourcesContents map.
+ // Create a new _sourcesContents map if the property is null.
+ if (!this._sourcesContents) {
+ this._sourcesContents = Object.create(null);
+ }
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
+ } else if (this._sourcesContents) {
+ // Remove the source file from the _sourcesContents map.
+ // If the _sourcesContents map is empty, set the property to null.
+ delete this._sourcesContents[util.toSetString(source)];
+ if (Object.keys(this._sourcesContents).length === 0) {
+ this._sourcesContents = null;
+ }
+ }
+ };
+
+/**
+ * Applies the mappings of a sub-source-map for a specific source file to the
+ * source map being generated. Each mapping to the supplied source file is
+ * rewritten using the supplied source map. Note: The resolution for the
+ * resulting mappings is the minimium of this map and the supplied map.
+ *
+ * @param aSourceMapConsumer The source map to be applied.
+ * @param aSourceFile Optional. The filename of the source file.
+ * If omitted, SourceMapConsumer's file property will be used.
+ * @param aSourceMapPath Optional. The dirname of the path to the source map
+ * to be applied. If relative, it is relative to the SourceMapConsumer.
+ * This parameter is needed when the two source maps aren't in the same
+ * directory, and the source map to be applied contains relative source
+ * paths. If so, those relative source paths need to be rewritten
+ * relative to the SourceMapGenerator.
+ */
+SourceMapGenerator.prototype.applySourceMap =
+ function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
+ var sourceFile = aSourceFile;
+ // If aSourceFile is omitted, we will use the file property of the SourceMap
+ if (aSourceFile == null) {
+ if (aSourceMapConsumer.file == null) {
+ throw new Error(
+ 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
+ 'or the source map\'s "file" property. Both were omitted.'
+ );
+ }
+ sourceFile = aSourceMapConsumer.file;
+ }
+ var sourceRoot = this._sourceRoot;
+ // Make "sourceFile" relative if an absolute Url is passed.
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ // Applying the SourceMap can add and remove items from the sources and
+ // the names array.
+ var newSources = new ArraySet();
+ var newNames = new ArraySet();
+
+ // Find mappings for the "sourceFile"
+ this._mappings.unsortedForEach(function (mapping) {
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
+ // Check if it can be mapped by the source map, then update the mapping.
+ var original = aSourceMapConsumer.originalPositionFor({
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ });
+ if (original.source != null) {
+ // Copy mapping
+ mapping.source = original.source;
+ if (aSourceMapPath != null) {
+ mapping.source = util.join(aSourceMapPath, mapping.source)
+ }
+ if (sourceRoot != null) {
+ mapping.source = util.relative(sourceRoot, mapping.source);
+ }
+ mapping.originalLine = original.line;
+ mapping.originalColumn = original.column;
+ if (original.name != null) {
+ mapping.name = original.name;
+ }
+ }
+ }
+
+ var source = mapping.source;
+ if (source != null && !newSources.has(source)) {
+ newSources.add(source);
+ }
+
+ var name = mapping.name;
+ if (name != null && !newNames.has(name)) {
+ newNames.add(name);
+ }
+
+ }, this);
+ this._sources = newSources;
+ this._names = newNames;
+
+ // Copy sourcesContents of applied map.
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aSourceMapPath != null) {
+ sourceFile = util.join(aSourceMapPath, sourceFile);
+ }
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ this.setSourceContent(sourceFile, content);
+ }
+ }, this);
+ };
+
+/**
+ * A mapping can have one of the three levels of data:
+ *
+ * 1. Just the generated position.
+ * 2. The Generated position, original position, and original source.
+ * 3. Generated and original position, original source, as well as a name
+ * token.
+ *
+ * To maintain consistency, we validate that any new mapping being added falls
+ * in to one of these categories.
+ */
+SourceMapGenerator.prototype._validateMapping =
+ function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
+ aName) {
+ // When aOriginal is truthy but has empty values for .line and .column,
+ // it is most likely a programmer error. In this case we throw a very
+ // specific error message to try to guide them the right way.
+ // For example: https://github.com/Polymer/polymer-bundler/pull/519
+ if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
+ throw new Error(
+ 'original.line and original.column are not numbers -- you probably meant to omit ' +
+ 'the original mapping entirely and only map the generated position. If so, pass ' +
+ 'null for the original mapping instead of an object with empty or null values.'
+ );
+ }
+
+ if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && !aOriginal && !aSource && !aName) {
+ // Case 1.
+ return;
+ }
+ else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aOriginal && 'line' in aOriginal && 'column' in aOriginal
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && aOriginal.line > 0 && aOriginal.column >= 0
+ && aSource) {
+ // Cases 2 and 3.
+ return;
+ }
+ else {
+ throw new Error('Invalid mapping: ' + JSON.stringify({
+ generated: aGenerated,
+ source: aSource,
+ original: aOriginal,
+ name: aName
+ }));
+ }
+ };
+
+/**
+ * Serialize the accumulated mappings in to the stream of base 64 VLQs
+ * specified by the source map format.
+ */
+SourceMapGenerator.prototype._serializeMappings =
+ function SourceMapGenerator_serializeMappings() {
+ var previousGeneratedColumn = 0;
+ var previousGeneratedLine = 1;
+ var previousOriginalColumn = 0;
+ var previousOriginalLine = 0;
+ var previousName = 0;
+ var previousSource = 0;
+ var result = '';
+ var next;
+ var mapping;
+ var nameIdx;
+ var sourceIdx;
+
+ var mappings = this._mappings.toArray();
+ for (var i = 0, len = mappings.length; i < len; i++) {
+ mapping = mappings[i];
+ next = ''
+
+ if (mapping.generatedLine !== previousGeneratedLine) {
+ previousGeneratedColumn = 0;
+ while (mapping.generatedLine !== previousGeneratedLine) {
+ next += ';';
+ previousGeneratedLine++;
+ }
+ }
+ else {
+ if (i > 0) {
+ if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
+ continue;
+ }
+ next += ',';
+ }
+ }
+
+ next += base64VLQ.encode(mapping.generatedColumn
+ - previousGeneratedColumn);
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (mapping.source != null) {
+ sourceIdx = this._sources.indexOf(mapping.source);
+ next += base64VLQ.encode(sourceIdx - previousSource);
+ previousSource = sourceIdx;
+
+ // lines are stored 0-based in SourceMap spec version 3
+ next += base64VLQ.encode(mapping.originalLine - 1
+ - previousOriginalLine);
+ previousOriginalLine = mapping.originalLine - 1;
+
+ next += base64VLQ.encode(mapping.originalColumn
+ - previousOriginalColumn);
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (mapping.name != null) {
+ nameIdx = this._names.indexOf(mapping.name);
+ next += base64VLQ.encode(nameIdx - previousName);
+ previousName = nameIdx;
+ }
+ }
+
+ result += next;
+ }
+
+ return result;
+ };
+
+SourceMapGenerator.prototype._generateSourcesContent =
+ function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
+ return aSources.map(function (source) {
+ if (!this._sourcesContents) {
+ return null;
+ }
+ if (aSourceRoot != null) {
+ source = util.relative(aSourceRoot, source);
+ }
+ var key = util.toSetString(source);
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
+ ? this._sourcesContents[key]
+ : null;
+ }, this);
+ };
+
+/**
+ * Externalize the source map.
+ */
+SourceMapGenerator.prototype.toJSON =
+ function SourceMapGenerator_toJSON() {
+ var map = {
+ version: this._version,
+ sources: this._sources.toArray(),
+ names: this._names.toArray(),
+ mappings: this._serializeMappings()
+ };
+ if (this._file != null) {
+ map.file = this._file;
+ }
+ if (this._sourceRoot != null) {
+ map.sourceRoot = this._sourceRoot;
+ }
+ if (this._sourcesContents) {
+ map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
+ }
+
+ return map;
+ };
+
+/**
+ * Render the source map being generated to a string.
+ */
+SourceMapGenerator.prototype.toString =
+ function SourceMapGenerator_toString() {
+ return JSON.stringify(this.toJSON());
+ };
+
+exports.SourceMapGenerator = SourceMapGenerator;
diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/source-node.js b/node_modules/@babel/generator/node_modules/source-map/lib/source-node.js
new file mode 100644
index 0000000..d196a53
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/lib/source-node.js
@@ -0,0 +1,413 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;
+var util = require('./util');
+
+// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
+// operating systems these days (capturing the result).
+var REGEX_NEWLINE = /(\r?\n)/;
+
+// Newline character code for charCodeAt() comparisons
+var NEWLINE_CODE = 10;
+
+// Private symbol for identifying `SourceNode`s when multiple versions of
+// the source-map library are loaded. This MUST NOT CHANGE across
+// versions!
+var isSourceNode = "$$$isSourceNode$$$";
+
+/**
+ * SourceNodes provide a way to abstract over interpolating/concatenating
+ * snippets of generated JavaScript source code while maintaining the line and
+ * column information associated with the original source code.
+ *
+ * @param aLine The original line number.
+ * @param aColumn The original column number.
+ * @param aSource The original source's filename.
+ * @param aChunks Optional. An array of strings which are snippets of
+ * generated JS, or other SourceNodes.
+ * @param aName The original identifier.
+ */
+function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
+ this.children = [];
+ this.sourceContents = {};
+ this.line = aLine == null ? null : aLine;
+ this.column = aColumn == null ? null : aColumn;
+ this.source = aSource == null ? null : aSource;
+ this.name = aName == null ? null : aName;
+ this[isSourceNode] = true;
+ if (aChunks != null) this.add(aChunks);
+}
+
+/**
+ * Creates a SourceNode from generated code and a SourceMapConsumer.
+ *
+ * @param aGeneratedCode The generated code
+ * @param aSourceMapConsumer The SourceMap for the generated code
+ * @param aRelativePath Optional. The path that relative sources in the
+ * SourceMapConsumer should be relative to.
+ */
+SourceNode.fromStringWithSourceMap =
+ function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
+ // The SourceNode we want to fill with the generated code
+ // and the SourceMap
+ var node = new SourceNode();
+
+ // All even indices of this array are one line of the generated code,
+ // while all odd indices are the newlines between two adjacent lines
+ // (since `REGEX_NEWLINE` captures its match).
+ // Processed fragments are accessed by calling `shiftNextLine`.
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
+ var remainingLinesIndex = 0;
+ var shiftNextLine = function() {
+ var lineContents = getNextLine();
+ // The last line of a file might not have a newline.
+ var newLine = getNextLine() || "";
+ return lineContents + newLine;
+
+ function getNextLine() {
+ return remainingLinesIndex < remainingLines.length ?
+ remainingLines[remainingLinesIndex++] : undefined;
+ }
+ };
+
+ // We need to remember the position of "remainingLines"
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
+
+ // The generate SourceNodes we need a code range.
+ // To extract it current and last mapping is used.
+ // Here we store the last mapping.
+ var lastMapping = null;
+
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ if (lastMapping !== null) {
+ // We add the code from "lastMapping" to "mapping":
+ // First check if there is a new line in between.
+ if (lastGeneratedLine < mapping.generatedLine) {
+ // Associate first line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ lastGeneratedLine++;
+ lastGeneratedColumn = 0;
+ // The remaining code is added without mapping
+ } else {
+ // There is no new line in between.
+ // Associate the code between "lastGeneratedColumn" and
+ // "mapping.generatedColumn" with "lastMapping"
+ var nextLine = remainingLines[remainingLinesIndex];
+ var code = nextLine.substr(0, mapping.generatedColumn -
+ lastGeneratedColumn);
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn -
+ lastGeneratedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ addMappingWithCode(lastMapping, code);
+ // No more remaining code, continue
+ lastMapping = mapping;
+ return;
+ }
+ }
+ // We add the generated code until the first mapping
+ // to the SourceNode without any mapping.
+ // Each line is added as separate string.
+ while (lastGeneratedLine < mapping.generatedLine) {
+ node.add(shiftNextLine());
+ lastGeneratedLine++;
+ }
+ if (lastGeneratedColumn < mapping.generatedColumn) {
+ var nextLine = remainingLines[remainingLinesIndex];
+ node.add(nextLine.substr(0, mapping.generatedColumn));
+ remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ }
+ lastMapping = mapping;
+ }, this);
+ // We have processed all mappings.
+ if (remainingLinesIndex < remainingLines.length) {
+ if (lastMapping) {
+ // Associate the remaining code in the current line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ }
+ // and add the remaining lines without any mapping
+ node.add(remainingLines.splice(remainingLinesIndex).join(""));
+ }
+
+ // Copy sourcesContent into SourceNode
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aRelativePath != null) {
+ sourceFile = util.join(aRelativePath, sourceFile);
+ }
+ node.setSourceContent(sourceFile, content);
+ }
+ });
+
+ return node;
+
+ function addMappingWithCode(mapping, code) {
+ if (mapping === null || mapping.source === undefined) {
+ node.add(code);
+ } else {
+ var source = aRelativePath
+ ? util.join(aRelativePath, mapping.source)
+ : mapping.source;
+ node.add(new SourceNode(mapping.originalLine,
+ mapping.originalColumn,
+ source,
+ code,
+ mapping.name));
+ }
+ }
+ };
+
+/**
+ * Add a chunk of generated JS to this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+SourceNode.prototype.add = function SourceNode_add(aChunk) {
+ if (Array.isArray(aChunk)) {
+ aChunk.forEach(function (chunk) {
+ this.add(chunk);
+ }, this);
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ if (aChunk) {
+ this.children.push(aChunk);
+ }
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+};
+
+/**
+ * Add a chunk of generated JS to the beginning of this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
+ if (Array.isArray(aChunk)) {
+ for (var i = aChunk.length-1; i >= 0; i--) {
+ this.prepend(aChunk[i]);
+ }
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ this.children.unshift(aChunk);
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+};
+
+/**
+ * Walk over the tree of JS snippets in this node and its children. The
+ * walking function is called once for each snippet of JS and is passed that
+ * snippet and the its original associated source's line/column location.
+ *
+ * @param aFn The traversal function.
+ */
+SourceNode.prototype.walk = function SourceNode_walk(aFn) {
+ var chunk;
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ chunk = this.children[i];
+ if (chunk[isSourceNode]) {
+ chunk.walk(aFn);
+ }
+ else {
+ if (chunk !== '') {
+ aFn(chunk, { source: this.source,
+ line: this.line,
+ column: this.column,
+ name: this.name });
+ }
+ }
+ }
+};
+
+/**
+ * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
+ * each of `this.children`.
+ *
+ * @param aSep The separator.
+ */
+SourceNode.prototype.join = function SourceNode_join(aSep) {
+ var newChildren;
+ var i;
+ var len = this.children.length;
+ if (len > 0) {
+ newChildren = [];
+ for (i = 0; i < len-1; i++) {
+ newChildren.push(this.children[i]);
+ newChildren.push(aSep);
+ }
+ newChildren.push(this.children[i]);
+ this.children = newChildren;
+ }
+ return this;
+};
+
+/**
+ * Call String.prototype.replace on the very right-most source snippet. Useful
+ * for trimming whitespace from the end of a source node, etc.
+ *
+ * @param aPattern The pattern to replace.
+ * @param aReplacement The thing to replace the pattern with.
+ */
+SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
+ var lastChild = this.children[this.children.length - 1];
+ if (lastChild[isSourceNode]) {
+ lastChild.replaceRight(aPattern, aReplacement);
+ }
+ else if (typeof lastChild === 'string') {
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
+ }
+ else {
+ this.children.push(''.replace(aPattern, aReplacement));
+ }
+ return this;
+};
+
+/**
+ * Set the source content for a source file. This will be added to the SourceMapGenerator
+ * in the sourcesContent field.
+ *
+ * @param aSourceFile The filename of the source file
+ * @param aSourceContent The content of the source file
+ */
+SourceNode.prototype.setSourceContent =
+ function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
+ };
+
+/**
+ * Walk over the tree of SourceNodes. The walking function is called for each
+ * source file content and is passed the filename and source content.
+ *
+ * @param aFn The traversal function.
+ */
+SourceNode.prototype.walkSourceContents =
+ function SourceNode_walkSourceContents(aFn) {
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ if (this.children[i][isSourceNode]) {
+ this.children[i].walkSourceContents(aFn);
+ }
+ }
+
+ var sources = Object.keys(this.sourceContents);
+ for (var i = 0, len = sources.length; i < len; i++) {
+ aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
+ }
+ };
+
+/**
+ * Return the string representation of this source node. Walks over the tree
+ * and concatenates all the various snippets together to one string.
+ */
+SourceNode.prototype.toString = function SourceNode_toString() {
+ var str = "";
+ this.walk(function (chunk) {
+ str += chunk;
+ });
+ return str;
+};
+
+/**
+ * Returns the string representation of this source node along with a source
+ * map.
+ */
+SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
+ var generated = {
+ code: "",
+ line: 1,
+ column: 0
+ };
+ var map = new SourceMapGenerator(aArgs);
+ var sourceMappingActive = false;
+ var lastOriginalSource = null;
+ var lastOriginalLine = null;
+ var lastOriginalColumn = null;
+ var lastOriginalName = null;
+ this.walk(function (chunk, original) {
+ generated.code += chunk;
+ if (original.source !== null
+ && original.line !== null
+ && original.column !== null) {
+ if(lastOriginalSource !== original.source
+ || lastOriginalLine !== original.line
+ || lastOriginalColumn !== original.column
+ || lastOriginalName !== original.name) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ lastOriginalSource = original.source;
+ lastOriginalLine = original.line;
+ lastOriginalColumn = original.column;
+ lastOriginalName = original.name;
+ sourceMappingActive = true;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ generated: {
+ line: generated.line,
+ column: generated.column
+ }
+ });
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ }
+ for (var idx = 0, length = chunk.length; idx < length; idx++) {
+ if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
+ generated.line++;
+ generated.column = 0;
+ // Mappings end at eol
+ if (idx + 1 === length) {
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ } else {
+ generated.column++;
+ }
+ }
+ });
+ this.walkSourceContents(function (sourceFile, sourceContent) {
+ map.setSourceContent(sourceFile, sourceContent);
+ });
+
+ return { code: generated.code, map: map };
+};
+
+exports.SourceNode = SourceNode;
diff --git a/node_modules/@babel/generator/node_modules/source-map/lib/util.js b/node_modules/@babel/generator/node_modules/source-map/lib/util.js
new file mode 100644
index 0000000..44e0e45
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/lib/util.js
@@ -0,0 +1,417 @@
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+
+/**
+ * This is a helper function for getting values from parameter/options
+ * objects.
+ *
+ * @param args The object we are extracting values from
+ * @param name The name of the property we are getting.
+ * @param defaultValue An optional value to return if the property is missing
+ * from the object. If this is not specified and the property is missing, an
+ * error will be thrown.
+ */
+function getArg(aArgs, aName, aDefaultValue) {
+ if (aName in aArgs) {
+ return aArgs[aName];
+ } else if (arguments.length === 3) {
+ return aDefaultValue;
+ } else {
+ throw new Error('"' + aName + '" is a required argument.');
+ }
+}
+exports.getArg = getArg;
+
+var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
+var dataUrlRegexp = /^data:.+\,.+$/;
+
+function urlParse(aUrl) {
+ var match = aUrl.match(urlRegexp);
+ if (!match) {
+ return null;
+ }
+ return {
+ scheme: match[1],
+ auth: match[2],
+ host: match[3],
+ port: match[4],
+ path: match[5]
+ };
+}
+exports.urlParse = urlParse;
+
+function urlGenerate(aParsedUrl) {
+ var url = '';
+ if (aParsedUrl.scheme) {
+ url += aParsedUrl.scheme + ':';
+ }
+ url += '//';
+ if (aParsedUrl.auth) {
+ url += aParsedUrl.auth + '@';
+ }
+ if (aParsedUrl.host) {
+ url += aParsedUrl.host;
+ }
+ if (aParsedUrl.port) {
+ url += ":" + aParsedUrl.port
+ }
+ if (aParsedUrl.path) {
+ url += aParsedUrl.path;
+ }
+ return url;
+}
+exports.urlGenerate = urlGenerate;
+
+/**
+ * Normalizes a path, or the path portion of a URL:
+ *
+ * - Replaces consecutive slashes with one slash.
+ * - Removes unnecessary '.' parts.
+ * - Removes unnecessary '<dir>/..' parts.
+ *
+ * Based on code in the Node.js 'path' core module.
+ *
+ * @param aPath The path or url to normalize.
+ */
+function normalize(aPath) {
+ var path = aPath;
+ var url = urlParse(aPath);
+ if (url) {
+ if (!url.path) {
+ return aPath;
+ }
+ path = url.path;
+ }
+ var isAbsolute = exports.isAbsolute(path);
+
+ var parts = path.split(/\/+/);
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
+ part = parts[i];
+ if (part === '.') {
+ parts.splice(i, 1);
+ } else if (part === '..') {
+ up++;
+ } else if (up > 0) {
+ if (part === '') {
+ // The first part is blank if the path is absolute. Trying to go
+ // above the root is a no-op. Therefore we can remove all '..' parts
+ // directly after the root.
+ parts.splice(i + 1, up);
+ up = 0;
+ } else {
+ parts.splice(i, 2);
+ up--;
+ }
+ }
+ }
+ path = parts.join('/');
+
+ if (path === '') {
+ path = isAbsolute ? '/' : '.';
+ }
+
+ if (url) {
+ url.path = path;
+ return urlGenerate(url);
+ }
+ return path;
+}
+exports.normalize = normalize;
+
+/**
+ * Joins two paths/URLs.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be joined with the root.
+ *
+ * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
+ * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
+ * first.
+ * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
+ * is updated with the result and aRoot is returned. Otherwise the result
+ * is returned.
+ * - If aPath is absolute, the result is aPath.
+ * - Otherwise the two paths are joined with a slash.
+ * - Joining for example 'http://' and 'www.example.com' is also supported.
+ */
+function join(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+ if (aPath === "") {
+ aPath = ".";
+ }
+ var aPathUrl = urlParse(aPath);
+ var aRootUrl = urlParse(aRoot);
+ if (aRootUrl) {
+ aRoot = aRootUrl.path || '/';
+ }
+
+ // `join(foo, '//www.example.org')`
+ if (aPathUrl && !aPathUrl.scheme) {
+ if (aRootUrl) {
+ aPathUrl.scheme = aRootUrl.scheme;
+ }
+ return urlGenerate(aPathUrl);
+ }
+
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
+ return aPath;
+ }
+
+ // `join('http://', 'www.example.com')`
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
+ aRootUrl.host = aPath;
+ return urlGenerate(aRootUrl);
+ }
+
+ var joined = aPath.charAt(0) === '/'
+ ? aPath
+ : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
+
+ if (aRootUrl) {
+ aRootUrl.path = joined;
+ return urlGenerate(aRootUrl);
+ }
+ return joined;
+}
+exports.join = join;
+
+exports.isAbsolute = function (aPath) {
+ return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
+};
+
+/**
+ * Make a path relative to a URL or another path.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be made relative to aRoot.
+ */
+function relative(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+
+ aRoot = aRoot.replace(/\/$/, '');
+
+ // It is possible for the path to be above the root. In this case, simply
+ // checking whether the root is a prefix of the path won't work. Instead, we
+ // need to remove components from the root one by one, until either we find
+ // a prefix that fits, or we run out of components to remove.
+ var level = 0;
+ while (aPath.indexOf(aRoot + '/') !== 0) {
+ var index = aRoot.lastIndexOf("/");
+ if (index < 0) {
+ return aPath;
+ }
+
+ // If the only part of the root that is left is the scheme (i.e. http://,
+ // file:///, etc.), one or more slashes (/), or simply nothing at all, we
+ // have exhausted all components, so the path is not relative to the root.
+ aRoot = aRoot.slice(0, index);
+ if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
+ return aPath;
+ }
+
+ ++level;
+ }
+
+ // Make sure we add a "../" for each component we removed from the root.
+ return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
+}
+exports.relative = relative;
+
+var supportsNullProto = (function () {
+ var obj = Object.create(null);
+ return !('__proto__' in obj);
+}());
+
+function identity (s) {
+ return s;
+}
+
+/**
+ * Because behavior goes wacky when you set `__proto__` on objects, we
+ * have to prefix all the strings in our set with an arbitrary character.
+ *
+ * See https://github.com/mozilla/source-map/pull/31 and
+ * https://github.com/mozilla/source-map/issues/30
+ *
+ * @param String aStr
+ */
+function toSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return '$' + aStr;
+ }
+
+ return aStr;
+}
+exports.toSetString = supportsNullProto ? identity : toSetString;
+
+function fromSetString(aStr) {
+ if (isProtoString(aStr)) {
+ return aStr.slice(1);
+ }
+
+ return aStr;
+}
+exports.fromSetString = supportsNullProto ? identity : fromSetString;
+
+function isProtoString(s) {
+ if (!s) {
+ return false;
+ }
+
+ var length = s.length;
+
+ if (length < 9 /* "__proto__".length */) {
+ return false;
+ }
+
+ if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 2) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 4) !== 116 /* 't' */ ||
+ s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
+ s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
+ s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
+ s.charCodeAt(length - 8) !== 95 /* '_' */ ||
+ s.charCodeAt(length - 9) !== 95 /* '_' */) {
+ return false;
+ }
+
+ for (var i = length - 10; i >= 0; i--) {
+ if (s.charCodeAt(i) !== 36 /* '$' */) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+/**
+ * Comparator between two mappings where the original positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same original source/line/column, but different generated
+ * line and column the same. Useful when searching for a mapping with a
+ * stubbed out mapping.
+ */
+function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
+ var cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0 || onlyCompareOriginal) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+}
+exports.compareByOriginalPositions = compareByOriginalPositions;
+
+/**
+ * Comparator between two mappings with deflated source and name indices where
+ * the generated positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same generated line and column, but different
+ * source/name/original line and column the same. Useful when searching for a
+ * mapping with a stubbed out mapping.
+ */
+function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0 || onlyCompareGenerated) {
+ return cmp;
+ }
+
+ cmp = mappingA.source - mappingB.source;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return mappingA.name - mappingB.name;
+}
+exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
+
+function strcmp(aStr1, aStr2) {
+ if (aStr1 === aStr2) {
+ return 0;
+ }
+
+ if (aStr1 > aStr2) {
+ return 1;
+ }
+
+ return -1;
+}
+
+/**
+ * Comparator between two mappings with inflated source and name strings where
+ * the generated positions are compared.
+ */
+function compareByGeneratedPositionsInflated(mappingA, mappingB) {
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = strcmp(mappingA.source, mappingB.source);
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp !== 0) {
+ return cmp;
+ }
+
+ return strcmp(mappingA.name, mappingB.name);
+}
+exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
diff --git a/node_modules/@babel/generator/node_modules/source-map/package.json b/node_modules/@babel/generator/node_modules/source-map/package.json
new file mode 100644
index 0000000..048e3ae
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/package.json
@@ -0,0 +1,72 @@
+{
+ "name": "source-map",
+ "description": "Generates and consumes source maps",
+ "version": "0.5.7",
+ "homepage": "https://github.com/mozilla/source-map",
+ "author": "Nick Fitzgerald <nfitzgerald@mozilla.com>",
+ "contributors": [
+ "Tobias Koppers <tobias.koppers@googlemail.com>",
+ "Duncan Beevers <duncan@dweebd.com>",
+ "Stephen Crane <scrane@mozilla.com>",
+ "Ryan Seddon <seddon.ryan@gmail.com>",
+ "Miles Elam <miles.elam@deem.com>",
+ "Mihai Bazon <mihai.bazon@gmail.com>",
+ "Michael Ficarra <github.public.email@michael.ficarra.me>",
+ "Todd Wolfson <todd@twolfson.com>",
+ "Alexander Solovyov <alexander@solovyov.net>",
+ "Felix Gnass <fgnass@gmail.com>",
+ "Conrad Irwin <conrad.irwin@gmail.com>",
+ "usrbincc <usrbincc@yahoo.com>",
+ "David Glasser <glasser@davidglasser.net>",
+ "Chase Douglas <chase@newrelic.com>",
+ "Evan Wallace <evan.exe@gmail.com>",
+ "Heather Arthur <fayearthur@gmail.com>",
+ "Hugh Kennedy <hughskennedy@gmail.com>",
+ "David Glasser <glasser@davidglasser.net>",
+ "Simon Lydell <simon.lydell@gmail.com>",
+ "Jmeas Smith <jellyes2@gmail.com>",
+ "Michael Z Goddard <mzgoddard@gmail.com>",
+ "azu <azu@users.noreply.github.com>",
+ "John Gozde <john@gozde.ca>",
+ "Adam Kirkton <akirkton@truefitinnovation.com>",
+ "Chris Montgomery <christopher.montgomery@dowjones.com>",
+ "J. Ryan Stinnett <jryans@gmail.com>",
+ "Jack Herrington <jherrington@walmartlabs.com>",
+ "Chris Truter <jeffpalentine@gmail.com>",
+ "Daniel Espeset <daniel@danielespeset.com>",
+ "Jamie Wong <jamie.lf.wong@gmail.com>",
+ "Eddy Bruël <ejpbruel@mozilla.com>",
+ "Hawken Rives <hawkrives@gmail.com>",
+ "Gilad Peleg <giladp007@gmail.com>",
+ "djchie <djchie.dev@gmail.com>",
+ "Gary Ye <garysye@gmail.com>",
+ "Nicolas Lalevée <nicolas.lalevee@hibnet.org>"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "http://github.com/mozilla/source-map.git"
+ },
+ "main": "./source-map.js",
+ "files": [
+ "source-map.js",
+ "lib/",
+ "dist/source-map.debug.js",
+ "dist/source-map.js",
+ "dist/source-map.min.js",
+ "dist/source-map.min.js.map"
+ ],
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "license": "BSD-3-Clause",
+ "scripts": {
+ "test": "npm run build && node test/run-tests.js",
+ "build": "webpack --color",
+ "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
+ },
+ "devDependencies": {
+ "doctoc": "^0.15.0",
+ "webpack": "^1.12.0"
+ },
+ "typings": "source-map"
+}
diff --git a/node_modules/@babel/generator/node_modules/source-map/source-map.js b/node_modules/@babel/generator/node_modules/source-map/source-map.js
new file mode 100644
index 0000000..bc88fe8
--- /dev/null
+++ b/node_modules/@babel/generator/node_modules/source-map/source-map.js
@@ -0,0 +1,8 @@
+/*
+ * Copyright 2009-2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE.txt or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;
+exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;
+exports.SourceNode = require('./lib/source-node').SourceNode;
diff --git a/node_modules/@babel/generator/package.json b/node_modules/@babel/generator/package.json
new file mode 100644
index 0000000..55d477f
--- /dev/null
+++ b/node_modules/@babel/generator/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "@babel/generator",
+ "version": "7.17.3",
+ "description": "Turns an AST into code.",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-generator"
+ },
+ "homepage": "https://babel.dev/docs/en/next/babel-generator",
+ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20generator%22+is%3Aopen",
+ "main": "./lib/index.js",
+ "files": [
+ "lib"
+ ],
+ "dependencies": {
+ "@babel/types": "^7.17.0",
+ "jsesc": "^2.5.1",
+ "source-map": "^0.5.0"
+ },
+ "devDependencies": {
+ "@babel/helper-fixtures": "^7.17.0",
+ "@babel/parser": "^7.17.3",
+ "@jridgewell/trace-mapping": "^0.3.4",
+ "@types/jsesc": "^2.5.0",
+ "@types/source-map": "^0.5.0",
+ "charcodes": "^0.2.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-compilation-targets/LICENSE b/node_modules/@babel/helper-compilation-targets/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-compilation-targets/README.md b/node_modules/@babel/helper-compilation-targets/README.md
new file mode 100644
index 0000000..29f043b
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-compilation-targets
+
+> Helper functions on Babel compilation targets
+
+See our website [@babel/helper-compilation-targets](https://babeljs.io/docs/en/babel-helper-compilation-targets) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-compilation-targets
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-compilation-targets
+```
diff --git a/node_modules/@babel/helper-compilation-targets/lib/debug.js b/node_modules/@babel/helper-compilation-targets/lib/debug.js
new file mode 100644
index 0000000..4e05fdd
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/lib/debug.js
@@ -0,0 +1,33 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getInclusionReasons = getInclusionReasons;
+
+var _semver = require("semver");
+
+var _pretty = require("./pretty");
+
+var _utils = require("./utils");
+
+function getInclusionReasons(item, targetVersions, list) {
+ const minVersions = list[item] || {};
+ return Object.keys(targetVersions).reduce((result, env) => {
+ const minVersion = (0, _utils.getLowestImplementedVersion)(minVersions, env);
+ const targetVersion = targetVersions[env];
+
+ if (!minVersion) {
+ result[env] = (0, _pretty.prettifyVersion)(targetVersion);
+ } else {
+ const minIsUnreleased = (0, _utils.isUnreleasedVersion)(minVersion, env);
+ const targetIsUnreleased = (0, _utils.isUnreleasedVersion)(targetVersion, env);
+
+ if (!targetIsUnreleased && (minIsUnreleased || _semver.lt(targetVersion.toString(), (0, _utils.semverify)(minVersion)))) {
+ result[env] = (0, _pretty.prettifyVersion)(targetVersion);
+ }
+ }
+
+ return result;
+ }, {});
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-compilation-targets/lib/filter-items.js b/node_modules/@babel/helper-compilation-targets/lib/filter-items.js
new file mode 100644
index 0000000..f47f605
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/lib/filter-items.js
@@ -0,0 +1,88 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = filterItems;
+exports.isRequired = isRequired;
+exports.targetsSupported = targetsSupported;
+
+var _semver = require("semver");
+
+var _plugins = require("@babel/compat-data/plugins");
+
+var _utils = require("./utils");
+
+function targetsSupported(target, support) {
+ const targetEnvironments = Object.keys(target);
+
+ if (targetEnvironments.length === 0) {
+ return false;
+ }
+
+ const unsupportedEnvironments = targetEnvironments.filter(environment => {
+ const lowestImplementedVersion = (0, _utils.getLowestImplementedVersion)(support, environment);
+
+ if (!lowestImplementedVersion) {
+ return true;
+ }
+
+ const lowestTargetedVersion = target[environment];
+
+ if ((0, _utils.isUnreleasedVersion)(lowestTargetedVersion, environment)) {
+ return false;
+ }
+
+ if ((0, _utils.isUnreleasedVersion)(lowestImplementedVersion, environment)) {
+ return true;
+ }
+
+ if (!_semver.valid(lowestTargetedVersion.toString())) {
+ throw new Error(`Invalid version passed for target "${environment}": "${lowestTargetedVersion}". ` + "Versions must be in semver format (major.minor.patch)");
+ }
+
+ return _semver.gt((0, _utils.semverify)(lowestImplementedVersion), lowestTargetedVersion.toString());
+ });
+ return unsupportedEnvironments.length === 0;
+}
+
+function isRequired(name, targets, {
+ compatData = _plugins,
+ includes,
+ excludes
+} = {}) {
+ if (excludes != null && excludes.has(name)) return false;
+ if (includes != null && includes.has(name)) return true;
+ return !targetsSupported(targets, compatData[name]);
+}
+
+function filterItems(list, includes, excludes, targets, defaultIncludes, defaultExcludes, pluginSyntaxMap) {
+ const result = new Set();
+ const options = {
+ compatData: list,
+ includes,
+ excludes
+ };
+
+ for (const item in list) {
+ if (isRequired(item, targets, options)) {
+ result.add(item);
+ } else if (pluginSyntaxMap) {
+ const shippedProposalsSyntax = pluginSyntaxMap.get(item);
+
+ if (shippedProposalsSyntax) {
+ result.add(shippedProposalsSyntax);
+ }
+ }
+ }
+
+ if (defaultIncludes) {
+ defaultIncludes.forEach(item => !excludes.has(item) && result.add(item));
+ }
+
+ if (defaultExcludes) {
+ defaultExcludes.forEach(item => !includes.has(item) && result.delete(item));
+ }
+
+ return result;
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-compilation-targets/lib/index.js b/node_modules/@babel/helper-compilation-targets/lib/index.js
new file mode 100644
index 0000000..c186599
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/lib/index.js
@@ -0,0 +1,255 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "TargetNames", {
+ enumerable: true,
+ get: function () {
+ return _options.TargetNames;
+ }
+});
+exports.default = getTargets;
+Object.defineProperty(exports, "filterItems", {
+ enumerable: true,
+ get: function () {
+ return _filterItems.default;
+ }
+});
+Object.defineProperty(exports, "getInclusionReasons", {
+ enumerable: true,
+ get: function () {
+ return _debug.getInclusionReasons;
+ }
+});
+exports.isBrowsersQueryValid = isBrowsersQueryValid;
+Object.defineProperty(exports, "isRequired", {
+ enumerable: true,
+ get: function () {
+ return _filterItems.isRequired;
+ }
+});
+Object.defineProperty(exports, "prettifyTargets", {
+ enumerable: true,
+ get: function () {
+ return _pretty.prettifyTargets;
+ }
+});
+Object.defineProperty(exports, "unreleasedLabels", {
+ enumerable: true,
+ get: function () {
+ return _targets.unreleasedLabels;
+ }
+});
+
+var _browserslist = require("browserslist");
+
+var _helperValidatorOption = require("@babel/helper-validator-option");
+
+var _nativeModules = require("@babel/compat-data/native-modules");
+
+var _utils = require("./utils");
+
+var _targets = require("./targets");
+
+var _options = require("./options");
+
+var _pretty = require("./pretty");
+
+var _debug = require("./debug");
+
+var _filterItems = require("./filter-items");
+
+const ESM_SUPPORT = _nativeModules["es6.module"];
+const v = new _helperValidatorOption.OptionValidator("@babel/helper-compilation-targets");
+
+function validateTargetNames(targets) {
+ const validTargets = Object.keys(_options.TargetNames);
+
+ for (const target of Object.keys(targets)) {
+ if (!(target in _options.TargetNames)) {
+ throw new Error(v.formatMessage(`'${target}' is not a valid target
+- Did you mean '${(0, _helperValidatorOption.findSuggestion)(target, validTargets)}'?`));
+ }
+ }
+
+ return targets;
+}
+
+function isBrowsersQueryValid(browsers) {
+ return typeof browsers === "string" || Array.isArray(browsers) && browsers.every(b => typeof b === "string");
+}
+
+function validateBrowsers(browsers) {
+ v.invariant(browsers === undefined || isBrowsersQueryValid(browsers), `'${String(browsers)}' is not a valid browserslist query`);
+ return browsers;
+}
+
+function getLowestVersions(browsers) {
+ return browsers.reduce((all, browser) => {
+ const [browserName, browserVersion] = browser.split(" ");
+ const normalizedBrowserName = _targets.browserNameMap[browserName];
+
+ if (!normalizedBrowserName) {
+ return all;
+ }
+
+ try {
+ const splitVersion = browserVersion.split("-")[0].toLowerCase();
+ const isSplitUnreleased = (0, _utils.isUnreleasedVersion)(splitVersion, browserName);
+
+ if (!all[normalizedBrowserName]) {
+ all[normalizedBrowserName] = isSplitUnreleased ? splitVersion : (0, _utils.semverify)(splitVersion);
+ return all;
+ }
+
+ const version = all[normalizedBrowserName];
+ const isUnreleased = (0, _utils.isUnreleasedVersion)(version, browserName);
+
+ if (isUnreleased && isSplitUnreleased) {
+ all[normalizedBrowserName] = (0, _utils.getLowestUnreleased)(version, splitVersion, browserName);
+ } else if (isUnreleased) {
+ all[normalizedBrowserName] = (0, _utils.semverify)(splitVersion);
+ } else if (!isUnreleased && !isSplitUnreleased) {
+ const parsedBrowserVersion = (0, _utils.semverify)(splitVersion);
+ all[normalizedBrowserName] = (0, _utils.semverMin)(version, parsedBrowserVersion);
+ }
+ } catch (e) {}
+
+ return all;
+ }, {});
+}
+
+function outputDecimalWarning(decimalTargets) {
+ if (!decimalTargets.length) {
+ return;
+ }
+
+ console.warn("Warning, the following targets are using a decimal version:\n");
+ decimalTargets.forEach(({
+ target,
+ value
+ }) => console.warn(` ${target}: ${value}`));
+ console.warn(`
+We recommend using a string for minor/patch versions to avoid numbers like 6.10
+getting parsed as 6.1, which can lead to unexpected behavior.
+`);
+}
+
+function semverifyTarget(target, value) {
+ try {
+ return (0, _utils.semverify)(value);
+ } catch (error) {
+ throw new Error(v.formatMessage(`'${value}' is not a valid value for 'targets.${target}'.`));
+ }
+}
+
+const targetParserMap = {
+ __default(target, value) {
+ const version = (0, _utils.isUnreleasedVersion)(value, target) ? value.toLowerCase() : semverifyTarget(target, value);
+ return [target, version];
+ },
+
+ node(target, value) {
+ const parsed = value === true || value === "current" ? process.versions.node : semverifyTarget(target, value);
+ return [target, parsed];
+ }
+
+};
+
+function generateTargets(inputTargets) {
+ const input = Object.assign({}, inputTargets);
+ delete input.esmodules;
+ delete input.browsers;
+ return input;
+}
+
+function resolveTargets(queries, env) {
+ const resolved = _browserslist(queries, {
+ mobileToDesktop: true,
+ env
+ });
+
+ return getLowestVersions(resolved);
+}
+
+function getTargets(inputTargets = {}, options = {}) {
+ var _browsers;
+
+ let {
+ browsers,
+ esmodules
+ } = inputTargets;
+ const {
+ configPath = "."
+ } = options;
+ validateBrowsers(browsers);
+ const input = generateTargets(inputTargets);
+ let targets = validateTargetNames(input);
+ const shouldParseBrowsers = !!browsers;
+ const hasTargets = shouldParseBrowsers || Object.keys(targets).length > 0;
+ const shouldSearchForConfig = !options.ignoreBrowserslistConfig && !hasTargets;
+
+ if (!browsers && shouldSearchForConfig) {
+ browsers = _browserslist.loadConfig({
+ config: options.configFile,
+ path: configPath,
+ env: options.browserslistEnv
+ });
+
+ if (browsers == null) {
+ {
+ browsers = [];
+ }
+ }
+ }
+
+ if (esmodules && (esmodules !== "intersect" || !((_browsers = browsers) != null && _browsers.length))) {
+ browsers = Object.keys(ESM_SUPPORT).map(browser => `${browser} >= ${ESM_SUPPORT[browser]}`).join(", ");
+ esmodules = false;
+ }
+
+ if (browsers) {
+ const queryBrowsers = resolveTargets(browsers, options.browserslistEnv);
+
+ if (esmodules === "intersect") {
+ for (const browser of Object.keys(queryBrowsers)) {
+ const version = queryBrowsers[browser];
+
+ if (ESM_SUPPORT[browser]) {
+ queryBrowsers[browser] = (0, _utils.getHighestUnreleased)(version, (0, _utils.semverify)(ESM_SUPPORT[browser]), browser);
+ } else {
+ delete queryBrowsers[browser];
+ }
+ }
+ }
+
+ targets = Object.assign(queryBrowsers, targets);
+ }
+
+ const result = {};
+ const decimalWarnings = [];
+
+ for (const target of Object.keys(targets).sort()) {
+ var _targetParserMap$targ;
+
+ const value = targets[target];
+
+ if (typeof value === "number" && value % 1 !== 0) {
+ decimalWarnings.push({
+ target,
+ value
+ });
+ }
+
+ const parser = (_targetParserMap$targ = targetParserMap[target]) != null ? _targetParserMap$targ : targetParserMap.__default;
+ const [parsedTarget, parsedValue] = parser(target, value);
+
+ if (parsedValue) {
+ result[parsedTarget] = parsedValue;
+ }
+ }
+
+ outputDecimalWarning(decimalWarnings);
+ return result;
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-compilation-targets/lib/options.js b/node_modules/@babel/helper-compilation-targets/lib/options.js
new file mode 100644
index 0000000..cbf4de0
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/lib/options.js
@@ -0,0 +1,21 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.TargetNames = void 0;
+const TargetNames = {
+ node: "node",
+ chrome: "chrome",
+ opera: "opera",
+ edge: "edge",
+ firefox: "firefox",
+ safari: "safari",
+ ie: "ie",
+ ios: "ios",
+ android: "android",
+ electron: "electron",
+ samsung: "samsung",
+ rhino: "rhino"
+};
+exports.TargetNames = TargetNames; \ No newline at end of file
diff --git a/node_modules/@babel/helper-compilation-targets/lib/pretty.js b/node_modules/@babel/helper-compilation-targets/lib/pretty.js
new file mode 100644
index 0000000..88df640
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/lib/pretty.js
@@ -0,0 +1,47 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.prettifyTargets = prettifyTargets;
+exports.prettifyVersion = prettifyVersion;
+
+var _semver = require("semver");
+
+var _targets = require("./targets");
+
+function prettifyVersion(version) {
+ if (typeof version !== "string") {
+ return version;
+ }
+
+ const parts = [_semver.major(version)];
+
+ const minor = _semver.minor(version);
+
+ const patch = _semver.patch(version);
+
+ if (minor || patch) {
+ parts.push(minor);
+ }
+
+ if (patch) {
+ parts.push(patch);
+ }
+
+ return parts.join(".");
+}
+
+function prettifyTargets(targets) {
+ return Object.keys(targets).reduce((results, target) => {
+ let value = targets[target];
+ const unreleasedLabel = _targets.unreleasedLabels[target];
+
+ if (typeof value === "string" && unreleasedLabel !== value) {
+ value = prettifyVersion(value);
+ }
+
+ results[target] = value;
+ return results;
+ }, {});
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-compilation-targets/lib/targets.js b/node_modules/@babel/helper-compilation-targets/lib/targets.js
new file mode 100644
index 0000000..3cbaeac
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/lib/targets.js
@@ -0,0 +1,27 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.unreleasedLabels = exports.browserNameMap = void 0;
+const unreleasedLabels = {
+ safari: "tp"
+};
+exports.unreleasedLabels = unreleasedLabels;
+const browserNameMap = {
+ and_chr: "chrome",
+ and_ff: "firefox",
+ android: "android",
+ chrome: "chrome",
+ edge: "edge",
+ firefox: "firefox",
+ ie: "ie",
+ ie_mob: "ie",
+ ios_saf: "ios",
+ node: "node",
+ op_mob: "opera",
+ opera: "opera",
+ safari: "safari",
+ samsung: "samsung"
+};
+exports.browserNameMap = browserNameMap; \ No newline at end of file
diff --git a/node_modules/@babel/helper-compilation-targets/lib/types.js b/node_modules/@babel/helper-compilation-targets/lib/types.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/lib/types.js
diff --git a/node_modules/@babel/helper-compilation-targets/lib/utils.js b/node_modules/@babel/helper-compilation-targets/lib/utils.js
new file mode 100644
index 0000000..711a84f
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/lib/utils.js
@@ -0,0 +1,69 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.getHighestUnreleased = getHighestUnreleased;
+exports.getLowestImplementedVersion = getLowestImplementedVersion;
+exports.getLowestUnreleased = getLowestUnreleased;
+exports.isUnreleasedVersion = isUnreleasedVersion;
+exports.semverMin = semverMin;
+exports.semverify = semverify;
+
+var _semver = require("semver");
+
+var _helperValidatorOption = require("@babel/helper-validator-option");
+
+var _targets = require("./targets");
+
+const versionRegExp = /^(\d+|\d+.\d+)$/;
+const v = new _helperValidatorOption.OptionValidator("@babel/helper-compilation-targets");
+
+function semverMin(first, second) {
+ return first && _semver.lt(first, second) ? first : second;
+}
+
+function semverify(version) {
+ if (typeof version === "string" && _semver.valid(version)) {
+ return version;
+ }
+
+ v.invariant(typeof version === "number" || typeof version === "string" && versionRegExp.test(version), `'${version}' is not a valid version`);
+ const split = version.toString().split(".");
+
+ while (split.length < 3) {
+ split.push("0");
+ }
+
+ return split.join(".");
+}
+
+function isUnreleasedVersion(version, env) {
+ const unreleasedLabel = _targets.unreleasedLabels[env];
+ return !!unreleasedLabel && unreleasedLabel === version.toString().toLowerCase();
+}
+
+function getLowestUnreleased(a, b, env) {
+ const unreleasedLabel = _targets.unreleasedLabels[env];
+ const hasUnreleased = [a, b].some(item => item === unreleasedLabel);
+
+ if (hasUnreleased) {
+ return a === hasUnreleased ? b : a || b;
+ }
+
+ return semverMin(a, b);
+}
+
+function getHighestUnreleased(a, b, env) {
+ return getLowestUnreleased(a, b, env) === a ? b : a;
+}
+
+function getLowestImplementedVersion(plugin, environment) {
+ const result = plugin[environment];
+
+ if (!result && environment === "android") {
+ return plugin.chrome;
+ }
+
+ return result;
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-compilation-targets/package.json b/node_modules/@babel/helper-compilation-targets/package.json
new file mode 100644
index 0000000..d35c368
--- /dev/null
+++ b/node_modules/@babel/helper-compilation-targets/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "@babel/helper-compilation-targets",
+ "version": "7.16.7",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "license": "MIT",
+ "description": "Helper functions on Babel compilation targets",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-compilation-targets"
+ },
+ "main": "./lib/index.js",
+ "exports": {
+ ".": "./lib/index.js",
+ "./package.json": "./package.json"
+ },
+ "publishConfig": {
+ "access": "public"
+ },
+ "keywords": [
+ "babel",
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/compat-data": "^7.16.4",
+ "@babel/helper-validator-option": "^7.16.7",
+ "browserslist": "^4.17.5",
+ "semver": "^6.3.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.16.7",
+ "@babel/helper-plugin-test-runner": "^7.16.7",
+ "@types/semver": "^5.5.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-environment-visitor/LICENSE b/node_modules/@babel/helper-environment-visitor/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-environment-visitor/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-environment-visitor/README.md b/node_modules/@babel/helper-environment-visitor/README.md
new file mode 100644
index 0000000..ec74ac3
--- /dev/null
+++ b/node_modules/@babel/helper-environment-visitor/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-environment-visitor
+
+> Helper visitor to only visit nodes in the current 'this' context
+
+See our website [@babel/helper-environment-visitor](https://babeljs.io/docs/en/babel-helper-environment-visitor) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helper-environment-visitor
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-environment-visitor --dev
+```
diff --git a/node_modules/@babel/helper-environment-visitor/lib/index.js b/node_modules/@babel/helper-environment-visitor/lib/index.js
new file mode 100644
index 0000000..e85bf13
--- /dev/null
+++ b/node_modules/@babel/helper-environment-visitor/lib/index.js
@@ -0,0 +1,38 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+exports.skipAllButComputedKey = skipAllButComputedKey;
+
+var _t = require("@babel/types");
+
+const {
+ VISITOR_KEYS,
+ staticBlock
+} = _t;
+
+function skipAllButComputedKey(path) {
+ if (!path.node.computed) {
+ path.skip();
+ return;
+ }
+
+ const keys = VISITOR_KEYS[path.type];
+
+ for (const key of keys) {
+ if (key !== "key") path.skipKey(key);
+ }
+}
+
+const skipKey = (staticBlock ? "StaticBlock|" : "") + "ClassPrivateProperty|TypeAnnotation|FunctionDeclaration|FunctionExpression";
+var _default = {
+ [skipKey]: path => path.skip(),
+
+ "Method|ClassProperty"(path) {
+ skipAllButComputedKey(path);
+ }
+
+};
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/helper-environment-visitor/package.json b/node_modules/@babel/helper-environment-visitor/package.json
new file mode 100644
index 0000000..ffc31a3
--- /dev/null
+++ b/node_modules/@babel/helper-environment-visitor/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "@babel/helper-environment-visitor",
+ "version": "7.16.7",
+ "description": "Helper visitor to only visit nodes in the current 'this' context",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-environment-visitor"
+ },
+ "homepage": "https://babel.dev/docs/en/next/babel-helper-environment-visitor",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "exports": {
+ ".": "./lib/index.js",
+ "./package.json": "./package.json"
+ },
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "devDependencies": {
+ "@babel/traverse": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)"
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-function-name/LICENSE b/node_modules/@babel/helper-function-name/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-function-name/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-function-name/README.md b/node_modules/@babel/helper-function-name/README.md
new file mode 100644
index 0000000..1e490ae
--- /dev/null
+++ b/node_modules/@babel/helper-function-name/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-function-name
+
+> Helper function to change the property 'name' of every function
+
+See our website [@babel/helper-function-name](https://babeljs.io/docs/en/babel-helper-function-name) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-function-name
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-function-name
+```
diff --git a/node_modules/@babel/helper-function-name/lib/index.js b/node_modules/@babel/helper-function-name/lib/index.js
new file mode 100644
index 0000000..2fa33dc
--- /dev/null
+++ b/node_modules/@babel/helper-function-name/lib/index.js
@@ -0,0 +1,192 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+var _helperGetFunctionArity = require("@babel/helper-get-function-arity");
+
+var _template = require("@babel/template");
+
+var _t = require("@babel/types");
+
+const {
+ NOT_LOCAL_BINDING,
+ cloneNode,
+ identifier,
+ isAssignmentExpression,
+ isFunction,
+ isIdentifier,
+ isLiteral,
+ isNullLiteral,
+ isObjectMethod,
+ isObjectProperty,
+ isRegExpLiteral,
+ isTemplateLiteral,
+ isVariableDeclarator,
+ toBindingIdentifierName
+} = _t;
+const buildPropertyMethodAssignmentWrapper = (0, _template.default)(`
+ (function (FUNCTION_KEY) {
+ function FUNCTION_ID() {
+ return FUNCTION_KEY.apply(this, arguments);
+ }
+
+ FUNCTION_ID.toString = function () {
+ return FUNCTION_KEY.toString();
+ }
+
+ return FUNCTION_ID;
+ })(FUNCTION)
+`);
+const buildGeneratorPropertyMethodAssignmentWrapper = (0, _template.default)(`
+ (function (FUNCTION_KEY) {
+ function* FUNCTION_ID() {
+ return yield* FUNCTION_KEY.apply(this, arguments);
+ }
+
+ FUNCTION_ID.toString = function () {
+ return FUNCTION_KEY.toString();
+ };
+
+ return FUNCTION_ID;
+ })(FUNCTION)
+`);
+const visitor = {
+ "ReferencedIdentifier|BindingIdentifier"(path, state) {
+ if (path.node.name !== state.name) return;
+ const localDeclar = path.scope.getBindingIdentifier(state.name);
+ if (localDeclar !== state.outerDeclar) return;
+ state.selfReference = true;
+ path.stop();
+ }
+
+};
+
+function getNameFromLiteralId(id) {
+ if (isNullLiteral(id)) {
+ return "null";
+ }
+
+ if (isRegExpLiteral(id)) {
+ return `_${id.pattern}_${id.flags}`;
+ }
+
+ if (isTemplateLiteral(id)) {
+ return id.quasis.map(quasi => quasi.value.raw).join("");
+ }
+
+ if (id.value !== undefined) {
+ return id.value + "";
+ }
+
+ return "";
+}
+
+function wrap(state, method, id, scope) {
+ if (state.selfReference) {
+ if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
+ scope.rename(id.name);
+ } else {
+ if (!isFunction(method)) return;
+ let build = buildPropertyMethodAssignmentWrapper;
+
+ if (method.generator) {
+ build = buildGeneratorPropertyMethodAssignmentWrapper;
+ }
+
+ const template = build({
+ FUNCTION: method,
+ FUNCTION_ID: id,
+ FUNCTION_KEY: scope.generateUidIdentifier(id.name)
+ }).expression;
+ const params = template.callee.body.body[0].params;
+
+ for (let i = 0, len = (0, _helperGetFunctionArity.default)(method); i < len; i++) {
+ params.push(scope.generateUidIdentifier("x"));
+ }
+
+ return template;
+ }
+ }
+
+ method.id = id;
+ scope.getProgramParent().references[id.name] = true;
+}
+
+function visit(node, name, scope) {
+ const state = {
+ selfAssignment: false,
+ selfReference: false,
+ outerDeclar: scope.getBindingIdentifier(name),
+ references: [],
+ name: name
+ };
+ const binding = scope.getOwnBinding(name);
+
+ if (binding) {
+ if (binding.kind === "param") {
+ state.selfReference = true;
+ } else {}
+ } else if (state.outerDeclar || scope.hasGlobal(name)) {
+ scope.traverse(node, visitor, state);
+ }
+
+ return state;
+}
+
+function _default({
+ node,
+ parent,
+ scope,
+ id
+}, localBinding = false, supportUnicodeId = false) {
+ if (node.id) return;
+
+ if ((isObjectProperty(parent) || isObjectMethod(parent, {
+ kind: "method"
+ })) && (!parent.computed || isLiteral(parent.key))) {
+ id = parent.key;
+ } else if (isVariableDeclarator(parent)) {
+ id = parent.id;
+
+ if (isIdentifier(id) && !localBinding) {
+ const binding = scope.parent.getBinding(id.name);
+
+ if (binding && binding.constant && scope.getBinding(id.name) === binding) {
+ node.id = cloneNode(id);
+ node.id[NOT_LOCAL_BINDING] = true;
+ return;
+ }
+ }
+ } else if (isAssignmentExpression(parent, {
+ operator: "="
+ })) {
+ id = parent.left;
+ } else if (!id) {
+ return;
+ }
+
+ let name;
+
+ if (id && isLiteral(id)) {
+ name = getNameFromLiteralId(id);
+ } else if (id && isIdentifier(id)) {
+ name = id.name;
+ }
+
+ if (name === undefined) {
+ return;
+ }
+
+ if (!supportUnicodeId && isFunction(node) && /[\uD800-\uDFFF]/.test(name)) {
+ return;
+ }
+
+ name = toBindingIdentifierName(name);
+ id = identifier(name);
+ id[NOT_LOCAL_BINDING] = true;
+ const state = visit(node, name, scope);
+ return wrap(state, node, id, scope) || node;
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-function-name/package.json b/node_modules/@babel/helper-function-name/package.json
new file mode 100644
index 0000000..1a46e7c
--- /dev/null
+++ b/node_modules/@babel/helper-function-name/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "@babel/helper-function-name",
+ "version": "7.16.7",
+ "description": "Helper function to change the property 'name' of every function",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-function-name"
+ },
+ "homepage": "https://babel.dev/docs/en/next/babel-helper-function-name",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/helper-get-function-arity": "^7.16.7",
+ "@babel/template": "^7.16.7",
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)"
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-get-function-arity/LICENSE b/node_modules/@babel/helper-get-function-arity/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-get-function-arity/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-get-function-arity/README.md b/node_modules/@babel/helper-get-function-arity/README.md
new file mode 100644
index 0000000..ca7f8b1
--- /dev/null
+++ b/node_modules/@babel/helper-get-function-arity/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-get-function-arity
+
+> Helper function to get function arity
+
+See our website [@babel/helper-get-function-arity](https://babeljs.io/docs/en/babel-helper-get-function-arity) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-get-function-arity
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-get-function-arity
+```
diff --git a/node_modules/@babel/helper-get-function-arity/lib/index.js b/node_modules/@babel/helper-get-function-arity/lib/index.js
new file mode 100644
index 0000000..61e22ed
--- /dev/null
+++ b/node_modules/@babel/helper-get-function-arity/lib/index.js
@@ -0,0 +1,27 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+var _t = require("@babel/types");
+
+const {
+ isAssignmentPattern,
+ isRestElement
+} = _t;
+
+function _default(node) {
+ const params = node.params;
+
+ for (let i = 0; i < params.length; i++) {
+ const param = params[i];
+
+ if (isAssignmentPattern(param) || isRestElement(param)) {
+ return i;
+ }
+ }
+
+ return params.length;
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-get-function-arity/package.json b/node_modules/@babel/helper-get-function-arity/package.json
new file mode 100644
index 0000000..4ea7562
--- /dev/null
+++ b/node_modules/@babel/helper-get-function-arity/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/helper-get-function-arity",
+ "version": "7.16.7",
+ "description": "Helper function to get function arity",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-get-function-arity"
+ },
+ "homepage": "https://babel.dev/docs/en/next/babel-helper-get-function-arity",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)"
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-hoist-variables/LICENSE b/node_modules/@babel/helper-hoist-variables/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-hoist-variables/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-hoist-variables/README.md b/node_modules/@babel/helper-hoist-variables/README.md
new file mode 100644
index 0000000..ef87821
--- /dev/null
+++ b/node_modules/@babel/helper-hoist-variables/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-hoist-variables
+
+> Helper function to hoist variables
+
+See our website [@babel/helper-hoist-variables](https://babeljs.io/docs/en/babel-helper-hoist-variables) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-hoist-variables
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-hoist-variables
+```
diff --git a/node_modules/@babel/helper-hoist-variables/lib/index.js b/node_modules/@babel/helper-hoist-variables/lib/index.js
new file mode 100644
index 0000000..31fb847
--- /dev/null
+++ b/node_modules/@babel/helper-hoist-variables/lib/index.js
@@ -0,0 +1,58 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = hoistVariables;
+
+var _t = require("@babel/types");
+
+const {
+ assignmentExpression,
+ expressionStatement,
+ identifier
+} = _t;
+const visitor = {
+ Scope(path, state) {
+ if (state.kind === "let") path.skip();
+ },
+
+ FunctionParent(path) {
+ path.skip();
+ },
+
+ VariableDeclaration(path, state) {
+ if (state.kind && path.node.kind !== state.kind) return;
+ const nodes = [];
+ const declarations = path.get("declarations");
+ let firstId;
+
+ for (const declar of declarations) {
+ firstId = declar.node.id;
+
+ if (declar.node.init) {
+ nodes.push(expressionStatement(assignmentExpression("=", declar.node.id, declar.node.init)));
+ }
+
+ for (const name of Object.keys(declar.getBindingIdentifiers())) {
+ state.emit(identifier(name), name, declar.node.init !== null);
+ }
+ }
+
+ if (path.parentPath.isFor({
+ left: path.node
+ })) {
+ path.replaceWith(firstId);
+ } else {
+ path.replaceWithMultiple(nodes);
+ }
+ }
+
+};
+
+function hoistVariables(path, emit, kind = "var") {
+ path.traverse(visitor, {
+ kind,
+ emit
+ });
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-hoist-variables/package.json b/node_modules/@babel/helper-hoist-variables/package.json
new file mode 100644
index 0000000..ec99d90
--- /dev/null
+++ b/node_modules/@babel/helper-hoist-variables/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "@babel/helper-hoist-variables",
+ "version": "7.16.7",
+ "description": "Helper function to hoist variables",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-hoist-variables"
+ },
+ "homepage": "https://babel.dev/docs/en/next/babel-helper-hoist-variables",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "TODO": "The @babel/traverse dependency is only needed for the NodePath TS type. We can consider exporting it from @babel/core.",
+ "devDependencies": {
+ "@babel/traverse": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)"
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-imports/LICENSE b/node_modules/@babel/helper-module-imports/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-module-imports/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-module-imports/README.md b/node_modules/@babel/helper-module-imports/README.md
new file mode 100644
index 0000000..933c5b7
--- /dev/null
+++ b/node_modules/@babel/helper-module-imports/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-module-imports
+
+> Babel helper functions for inserting module loads
+
+See our website [@babel/helper-module-imports](https://babeljs.io/docs/en/babel-helper-module-imports) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-module-imports
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-module-imports
+```
diff --git a/node_modules/@babel/helper-module-imports/lib/import-builder.js b/node_modules/@babel/helper-module-imports/lib/import-builder.js
new file mode 100644
index 0000000..8a1800e
--- /dev/null
+++ b/node_modules/@babel/helper-module-imports/lib/import-builder.js
@@ -0,0 +1,162 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _assert = require("assert");
+
+var _t = require("@babel/types");
+
+const {
+ callExpression,
+ cloneNode,
+ expressionStatement,
+ identifier,
+ importDeclaration,
+ importDefaultSpecifier,
+ importNamespaceSpecifier,
+ importSpecifier,
+ memberExpression,
+ stringLiteral,
+ variableDeclaration,
+ variableDeclarator
+} = _t;
+
+class ImportBuilder {
+ constructor(importedSource, scope, hub) {
+ this._statements = [];
+ this._resultName = null;
+ this._scope = null;
+ this._hub = null;
+ this._importedSource = void 0;
+ this._scope = scope;
+ this._hub = hub;
+ this._importedSource = importedSource;
+ }
+
+ done() {
+ return {
+ statements: this._statements,
+ resultName: this._resultName
+ };
+ }
+
+ import() {
+ this._statements.push(importDeclaration([], stringLiteral(this._importedSource)));
+
+ return this;
+ }
+
+ require() {
+ this._statements.push(expressionStatement(callExpression(identifier("require"), [stringLiteral(this._importedSource)])));
+
+ return this;
+ }
+
+ namespace(name = "namespace") {
+ const local = this._scope.generateUidIdentifier(name);
+
+ const statement = this._statements[this._statements.length - 1];
+
+ _assert(statement.type === "ImportDeclaration");
+
+ _assert(statement.specifiers.length === 0);
+
+ statement.specifiers = [importNamespaceSpecifier(local)];
+ this._resultName = cloneNode(local);
+ return this;
+ }
+
+ default(name) {
+ name = this._scope.generateUidIdentifier(name);
+ const statement = this._statements[this._statements.length - 1];
+
+ _assert(statement.type === "ImportDeclaration");
+
+ _assert(statement.specifiers.length === 0);
+
+ statement.specifiers = [importDefaultSpecifier(name)];
+ this._resultName = cloneNode(name);
+ return this;
+ }
+
+ named(name, importName) {
+ if (importName === "default") return this.default(name);
+ name = this._scope.generateUidIdentifier(name);
+ const statement = this._statements[this._statements.length - 1];
+
+ _assert(statement.type === "ImportDeclaration");
+
+ _assert(statement.specifiers.length === 0);
+
+ statement.specifiers = [importSpecifier(name, identifier(importName))];
+ this._resultName = cloneNode(name);
+ return this;
+ }
+
+ var(name) {
+ name = this._scope.generateUidIdentifier(name);
+ let statement = this._statements[this._statements.length - 1];
+
+ if (statement.type !== "ExpressionStatement") {
+ _assert(this._resultName);
+
+ statement = expressionStatement(this._resultName);
+
+ this._statements.push(statement);
+ }
+
+ this._statements[this._statements.length - 1] = variableDeclaration("var", [variableDeclarator(name, statement.expression)]);
+ this._resultName = cloneNode(name);
+ return this;
+ }
+
+ defaultInterop() {
+ return this._interop(this._hub.addHelper("interopRequireDefault"));
+ }
+
+ wildcardInterop() {
+ return this._interop(this._hub.addHelper("interopRequireWildcard"));
+ }
+
+ _interop(callee) {
+ const statement = this._statements[this._statements.length - 1];
+
+ if (statement.type === "ExpressionStatement") {
+ statement.expression = callExpression(callee, [statement.expression]);
+ } else if (statement.type === "VariableDeclaration") {
+ _assert(statement.declarations.length === 1);
+
+ statement.declarations[0].init = callExpression(callee, [statement.declarations[0].init]);
+ } else {
+ _assert.fail("Unexpected type.");
+ }
+
+ return this;
+ }
+
+ prop(name) {
+ const statement = this._statements[this._statements.length - 1];
+
+ if (statement.type === "ExpressionStatement") {
+ statement.expression = memberExpression(statement.expression, identifier(name));
+ } else if (statement.type === "VariableDeclaration") {
+ _assert(statement.declarations.length === 1);
+
+ statement.declarations[0].init = memberExpression(statement.declarations[0].init, identifier(name));
+ } else {
+ _assert.fail("Unexpected type:" + statement.type);
+ }
+
+ return this;
+ }
+
+ read(name) {
+ this._resultName = memberExpression(this._resultName, identifier(name));
+ }
+
+}
+
+exports.default = ImportBuilder; \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-imports/lib/import-injector.js b/node_modules/@babel/helper-module-imports/lib/import-injector.js
new file mode 100644
index 0000000..adb9627
--- /dev/null
+++ b/node_modules/@babel/helper-module-imports/lib/import-injector.js
@@ -0,0 +1,290 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _assert = require("assert");
+
+var _t = require("@babel/types");
+
+var _importBuilder = require("./import-builder");
+
+var _isModule = require("./is-module");
+
+const {
+ numericLiteral,
+ sequenceExpression
+} = _t;
+
+class ImportInjector {
+ constructor(path, importedSource, opts) {
+ this._defaultOpts = {
+ importedSource: null,
+ importedType: "commonjs",
+ importedInterop: "babel",
+ importingInterop: "babel",
+ ensureLiveReference: false,
+ ensureNoContext: false,
+ importPosition: "before"
+ };
+ const programPath = path.find(p => p.isProgram());
+ this._programPath = programPath;
+ this._programScope = programPath.scope;
+ this._hub = programPath.hub;
+ this._defaultOpts = this._applyDefaults(importedSource, opts, true);
+ }
+
+ addDefault(importedSourceIn, opts) {
+ return this.addNamed("default", importedSourceIn, opts);
+ }
+
+ addNamed(importName, importedSourceIn, opts) {
+ _assert(typeof importName === "string");
+
+ return this._generateImport(this._applyDefaults(importedSourceIn, opts), importName);
+ }
+
+ addNamespace(importedSourceIn, opts) {
+ return this._generateImport(this._applyDefaults(importedSourceIn, opts), null);
+ }
+
+ addSideEffect(importedSourceIn, opts) {
+ return this._generateImport(this._applyDefaults(importedSourceIn, opts), false);
+ }
+
+ _applyDefaults(importedSource, opts, isInit = false) {
+ const optsList = [];
+
+ if (typeof importedSource === "string") {
+ optsList.push({
+ importedSource
+ });
+ optsList.push(opts);
+ } else {
+ _assert(!opts, "Unexpected secondary arguments.");
+
+ optsList.push(importedSource);
+ }
+
+ const newOpts = Object.assign({}, this._defaultOpts);
+
+ for (const opts of optsList) {
+ if (!opts) continue;
+ Object.keys(newOpts).forEach(key => {
+ if (opts[key] !== undefined) newOpts[key] = opts[key];
+ });
+
+ if (!isInit) {
+ if (opts.nameHint !== undefined) newOpts.nameHint = opts.nameHint;
+ if (opts.blockHoist !== undefined) newOpts.blockHoist = opts.blockHoist;
+ }
+ }
+
+ return newOpts;
+ }
+
+ _generateImport(opts, importName) {
+ const isDefault = importName === "default";
+ const isNamed = !!importName && !isDefault;
+ const isNamespace = importName === null;
+ const {
+ importedSource,
+ importedType,
+ importedInterop,
+ importingInterop,
+ ensureLiveReference,
+ ensureNoContext,
+ nameHint,
+ importPosition,
+ blockHoist
+ } = opts;
+ let name = nameHint || importName;
+ const isMod = (0, _isModule.default)(this._programPath);
+ const isModuleForNode = isMod && importingInterop === "node";
+ const isModuleForBabel = isMod && importingInterop === "babel";
+
+ if (importPosition === "after" && !isMod) {
+ throw new Error(`"importPosition": "after" is only supported in modules`);
+ }
+
+ const builder = new _importBuilder.default(importedSource, this._programScope, this._hub);
+
+ if (importedType === "es6") {
+ if (!isModuleForNode && !isModuleForBabel) {
+ throw new Error("Cannot import an ES6 module from CommonJS");
+ }
+
+ builder.import();
+
+ if (isNamespace) {
+ builder.namespace(nameHint || importedSource);
+ } else if (isDefault || isNamed) {
+ builder.named(name, importName);
+ }
+ } else if (importedType !== "commonjs") {
+ throw new Error(`Unexpected interopType "${importedType}"`);
+ } else if (importedInterop === "babel") {
+ if (isModuleForNode) {
+ name = name !== "default" ? name : importedSource;
+ const es6Default = `${importedSource}$es6Default`;
+ builder.import();
+
+ if (isNamespace) {
+ builder.default(es6Default).var(name || importedSource).wildcardInterop();
+ } else if (isDefault) {
+ if (ensureLiveReference) {
+ builder.default(es6Default).var(name || importedSource).defaultInterop().read("default");
+ } else {
+ builder.default(es6Default).var(name).defaultInterop().prop(importName);
+ }
+ } else if (isNamed) {
+ builder.default(es6Default).read(importName);
+ }
+ } else if (isModuleForBabel) {
+ builder.import();
+
+ if (isNamespace) {
+ builder.namespace(name || importedSource);
+ } else if (isDefault || isNamed) {
+ builder.named(name, importName);
+ }
+ } else {
+ builder.require();
+
+ if (isNamespace) {
+ builder.var(name || importedSource).wildcardInterop();
+ } else if ((isDefault || isNamed) && ensureLiveReference) {
+ if (isDefault) {
+ name = name !== "default" ? name : importedSource;
+ builder.var(name).read(importName);
+ builder.defaultInterop();
+ } else {
+ builder.var(importedSource).read(importName);
+ }
+ } else if (isDefault) {
+ builder.var(name).defaultInterop().prop(importName);
+ } else if (isNamed) {
+ builder.var(name).prop(importName);
+ }
+ }
+ } else if (importedInterop === "compiled") {
+ if (isModuleForNode) {
+ builder.import();
+
+ if (isNamespace) {
+ builder.default(name || importedSource);
+ } else if (isDefault || isNamed) {
+ builder.default(importedSource).read(name);
+ }
+ } else if (isModuleForBabel) {
+ builder.import();
+
+ if (isNamespace) {
+ builder.namespace(name || importedSource);
+ } else if (isDefault || isNamed) {
+ builder.named(name, importName);
+ }
+ } else {
+ builder.require();
+
+ if (isNamespace) {
+ builder.var(name || importedSource);
+ } else if (isDefault || isNamed) {
+ if (ensureLiveReference) {
+ builder.var(importedSource).read(name);
+ } else {
+ builder.prop(importName).var(name);
+ }
+ }
+ }
+ } else if (importedInterop === "uncompiled") {
+ if (isDefault && ensureLiveReference) {
+ throw new Error("No live reference for commonjs default");
+ }
+
+ if (isModuleForNode) {
+ builder.import();
+
+ if (isNamespace) {
+ builder.default(name || importedSource);
+ } else if (isDefault) {
+ builder.default(name);
+ } else if (isNamed) {
+ builder.default(importedSource).read(name);
+ }
+ } else if (isModuleForBabel) {
+ builder.import();
+
+ if (isNamespace) {
+ builder.default(name || importedSource);
+ } else if (isDefault) {
+ builder.default(name);
+ } else if (isNamed) {
+ builder.named(name, importName);
+ }
+ } else {
+ builder.require();
+
+ if (isNamespace) {
+ builder.var(name || importedSource);
+ } else if (isDefault) {
+ builder.var(name);
+ } else if (isNamed) {
+ if (ensureLiveReference) {
+ builder.var(importedSource).read(name);
+ } else {
+ builder.var(name).prop(importName);
+ }
+ }
+ }
+ } else {
+ throw new Error(`Unknown importedInterop "${importedInterop}".`);
+ }
+
+ const {
+ statements,
+ resultName
+ } = builder.done();
+
+ this._insertStatements(statements, importPosition, blockHoist);
+
+ if ((isDefault || isNamed) && ensureNoContext && resultName.type !== "Identifier") {
+ return sequenceExpression([numericLiteral(0), resultName]);
+ }
+
+ return resultName;
+ }
+
+ _insertStatements(statements, importPosition = "before", blockHoist = 3) {
+ const body = this._programPath.get("body");
+
+ if (importPosition === "after") {
+ for (let i = body.length - 1; i >= 0; i--) {
+ if (body[i].isImportDeclaration()) {
+ body[i].insertAfter(statements);
+ return;
+ }
+ }
+ } else {
+ statements.forEach(node => {
+ node._blockHoist = blockHoist;
+ });
+ const targetPath = body.find(p => {
+ const val = p.node._blockHoist;
+ return Number.isFinite(val) && val < 4;
+ });
+
+ if (targetPath) {
+ targetPath.insertBefore(statements);
+ return;
+ }
+ }
+
+ this._programPath.unshiftContainer("body", statements);
+ }
+
+}
+
+exports.default = ImportInjector; \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-imports/lib/index.js b/node_modules/@babel/helper-module-imports/lib/index.js
new file mode 100644
index 0000000..a3d7921
--- /dev/null
+++ b/node_modules/@babel/helper-module-imports/lib/index.js
@@ -0,0 +1,41 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "ImportInjector", {
+ enumerable: true,
+ get: function () {
+ return _importInjector.default;
+ }
+});
+exports.addDefault = addDefault;
+exports.addNamed = addNamed;
+exports.addNamespace = addNamespace;
+exports.addSideEffect = addSideEffect;
+Object.defineProperty(exports, "isModule", {
+ enumerable: true,
+ get: function () {
+ return _isModule.default;
+ }
+});
+
+var _importInjector = require("./import-injector");
+
+var _isModule = require("./is-module");
+
+function addDefault(path, importedSource, opts) {
+ return new _importInjector.default(path).addDefault(importedSource, opts);
+}
+
+function addNamed(path, name, importedSource, opts) {
+ return new _importInjector.default(path).addNamed(name, importedSource, opts);
+}
+
+function addNamespace(path, importedSource, opts) {
+ return new _importInjector.default(path).addNamespace(importedSource, opts);
+}
+
+function addSideEffect(path, importedSource, opts) {
+ return new _importInjector.default(path).addSideEffect(importedSource, opts);
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-imports/lib/is-module.js b/node_modules/@babel/helper-module-imports/lib/is-module.js
new file mode 100644
index 0000000..ad9e399
--- /dev/null
+++ b/node_modules/@babel/helper-module-imports/lib/is-module.js
@@ -0,0 +1,18 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isModule;
+
+function isModule(path) {
+ const {
+ sourceType
+ } = path.node;
+
+ if (sourceType !== "module" && sourceType !== "script") {
+ throw path.buildCodeFrameError(`Unknown sourceType "${sourceType}", cannot transform.`);
+ }
+
+ return path.node.sourceType === "module";
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-imports/package.json b/node_modules/@babel/helper-module-imports/package.json
new file mode 100644
index 0000000..7814505
--- /dev/null
+++ b/node_modules/@babel/helper-module-imports/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "@babel/helper-module-imports",
+ "version": "7.16.7",
+ "description": "Babel helper functions for inserting module loads",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-helper-module-imports",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-module-imports"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.16.7",
+ "@babel/traverse": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-transforms/LICENSE b/node_modules/@babel/helper-module-transforms/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-module-transforms/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-module-transforms/README.md b/node_modules/@babel/helper-module-transforms/README.md
new file mode 100644
index 0000000..c7b1a38
--- /dev/null
+++ b/node_modules/@babel/helper-module-transforms/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-module-transforms
+
+> Babel helper functions for implementing ES6 module transformations
+
+See our website [@babel/helper-module-transforms](https://babeljs.io/docs/en/babel-helper-module-transforms) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-module-transforms
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-module-transforms
+```
diff --git a/node_modules/@babel/helper-module-transforms/lib/get-module-name.js b/node_modules/@babel/helper-module-transforms/lib/get-module-name.js
new file mode 100644
index 0000000..87c2b83
--- /dev/null
+++ b/node_modules/@babel/helper-module-transforms/lib/get-module-name.js
@@ -0,0 +1,54 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = getModuleName;
+{
+ const originalGetModuleName = getModuleName;
+
+ exports.default = getModuleName = function getModuleName(rootOpts, pluginOpts) {
+ var _pluginOpts$moduleId, _pluginOpts$moduleIds, _pluginOpts$getModule, _pluginOpts$moduleRoo;
+
+ return originalGetModuleName(rootOpts, {
+ moduleId: (_pluginOpts$moduleId = pluginOpts.moduleId) != null ? _pluginOpts$moduleId : rootOpts.moduleId,
+ moduleIds: (_pluginOpts$moduleIds = pluginOpts.moduleIds) != null ? _pluginOpts$moduleIds : rootOpts.moduleIds,
+ getModuleId: (_pluginOpts$getModule = pluginOpts.getModuleId) != null ? _pluginOpts$getModule : rootOpts.getModuleId,
+ moduleRoot: (_pluginOpts$moduleRoo = pluginOpts.moduleRoot) != null ? _pluginOpts$moduleRoo : rootOpts.moduleRoot
+ });
+ };
+}
+
+function getModuleName(rootOpts, pluginOpts) {
+ const {
+ filename,
+ filenameRelative = filename,
+ sourceRoot = pluginOpts.moduleRoot
+ } = rootOpts;
+ const {
+ moduleId,
+ moduleIds = !!moduleId,
+ getModuleId,
+ moduleRoot = sourceRoot
+ } = pluginOpts;
+ if (!moduleIds) return null;
+
+ if (moduleId != null && !getModuleId) {
+ return moduleId;
+ }
+
+ let moduleName = moduleRoot != null ? moduleRoot + "/" : "";
+
+ if (filenameRelative) {
+ const sourceRootReplacer = sourceRoot != null ? new RegExp("^" + sourceRoot + "/?") : "";
+ moduleName += filenameRelative.replace(sourceRootReplacer, "").replace(/\.(\w*?)$/, "");
+ }
+
+ moduleName = moduleName.replace(/\\/g, "/");
+
+ if (getModuleId) {
+ return getModuleId(moduleName) || moduleName;
+ } else {
+ return moduleName;
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-transforms/lib/index.js b/node_modules/@babel/helper-module-transforms/lib/index.js
new file mode 100644
index 0000000..b9688eb
--- /dev/null
+++ b/node_modules/@babel/helper-module-transforms/lib/index.js
@@ -0,0 +1,420 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.buildNamespaceInitStatements = buildNamespaceInitStatements;
+exports.ensureStatementsHoisted = ensureStatementsHoisted;
+Object.defineProperty(exports, "getModuleName", {
+ enumerable: true,
+ get: function () {
+ return _getModuleName.default;
+ }
+});
+Object.defineProperty(exports, "hasExports", {
+ enumerable: true,
+ get: function () {
+ return _normalizeAndLoadMetadata.hasExports;
+ }
+});
+Object.defineProperty(exports, "isModule", {
+ enumerable: true,
+ get: function () {
+ return _helperModuleImports.isModule;
+ }
+});
+Object.defineProperty(exports, "isSideEffectImport", {
+ enumerable: true,
+ get: function () {
+ return _normalizeAndLoadMetadata.isSideEffectImport;
+ }
+});
+exports.rewriteModuleStatementsAndPrepareHeader = rewriteModuleStatementsAndPrepareHeader;
+Object.defineProperty(exports, "rewriteThis", {
+ enumerable: true,
+ get: function () {
+ return _rewriteThis.default;
+ }
+});
+exports.wrapInterop = wrapInterop;
+
+var _assert = require("assert");
+
+var _t = require("@babel/types");
+
+var _template = require("@babel/template");
+
+var _helperModuleImports = require("@babel/helper-module-imports");
+
+var _rewriteThis = require("./rewrite-this");
+
+var _rewriteLiveReferences = require("./rewrite-live-references");
+
+var _normalizeAndLoadMetadata = require("./normalize-and-load-metadata");
+
+var _getModuleName = require("./get-module-name");
+
+const {
+ booleanLiteral,
+ callExpression,
+ cloneNode,
+ directive,
+ directiveLiteral,
+ expressionStatement,
+ identifier,
+ isIdentifier,
+ memberExpression,
+ stringLiteral,
+ valueToNode,
+ variableDeclaration,
+ variableDeclarator
+} = _t;
+
+function rewriteModuleStatementsAndPrepareHeader(path, {
+ loose,
+ exportName,
+ strict,
+ allowTopLevelThis,
+ strictMode,
+ noInterop,
+ importInterop = noInterop ? "none" : "babel",
+ lazy,
+ esNamespaceOnly,
+ constantReexports = loose,
+ enumerableModuleMeta = loose,
+ noIncompleteNsImportDetection
+}) {
+ (0, _normalizeAndLoadMetadata.validateImportInteropOption)(importInterop);
+
+ _assert((0, _helperModuleImports.isModule)(path), "Cannot process module statements in a script");
+
+ path.node.sourceType = "script";
+ const meta = (0, _normalizeAndLoadMetadata.default)(path, exportName, {
+ importInterop,
+ initializeReexports: constantReexports,
+ lazy,
+ esNamespaceOnly
+ });
+
+ if (!allowTopLevelThis) {
+ (0, _rewriteThis.default)(path);
+ }
+
+ (0, _rewriteLiveReferences.default)(path, meta);
+
+ if (strictMode !== false) {
+ const hasStrict = path.node.directives.some(directive => {
+ return directive.value.value === "use strict";
+ });
+
+ if (!hasStrict) {
+ path.unshiftContainer("directives", directive(directiveLiteral("use strict")));
+ }
+ }
+
+ const headers = [];
+
+ if ((0, _normalizeAndLoadMetadata.hasExports)(meta) && !strict) {
+ headers.push(buildESModuleHeader(meta, enumerableModuleMeta));
+ }
+
+ const nameList = buildExportNameListDeclaration(path, meta);
+
+ if (nameList) {
+ meta.exportNameListName = nameList.name;
+ headers.push(nameList.statement);
+ }
+
+ headers.push(...buildExportInitializationStatements(path, meta, constantReexports, noIncompleteNsImportDetection));
+ return {
+ meta,
+ headers
+ };
+}
+
+function ensureStatementsHoisted(statements) {
+ statements.forEach(header => {
+ header._blockHoist = 3;
+ });
+}
+
+function wrapInterop(programPath, expr, type) {
+ if (type === "none") {
+ return null;
+ }
+
+ if (type === "node-namespace") {
+ return callExpression(programPath.hub.addHelper("interopRequireWildcard"), [expr, booleanLiteral(true)]);
+ } else if (type === "node-default") {
+ return null;
+ }
+
+ let helper;
+
+ if (type === "default") {
+ helper = "interopRequireDefault";
+ } else if (type === "namespace") {
+ helper = "interopRequireWildcard";
+ } else {
+ throw new Error(`Unknown interop: ${type}`);
+ }
+
+ return callExpression(programPath.hub.addHelper(helper), [expr]);
+}
+
+function buildNamespaceInitStatements(metadata, sourceMetadata, constantReexports = false) {
+ const statements = [];
+ let srcNamespace = identifier(sourceMetadata.name);
+ if (sourceMetadata.lazy) srcNamespace = callExpression(srcNamespace, []);
+
+ for (const localName of sourceMetadata.importsNamespace) {
+ if (localName === sourceMetadata.name) continue;
+ statements.push(_template.default.statement`var NAME = SOURCE;`({
+ NAME: localName,
+ SOURCE: cloneNode(srcNamespace)
+ }));
+ }
+
+ if (constantReexports) {
+ statements.push(...buildReexportsFromMeta(metadata, sourceMetadata, true));
+ }
+
+ for (const exportName of sourceMetadata.reexportNamespace) {
+ statements.push((sourceMetadata.lazy ? _template.default.statement`
+ Object.defineProperty(EXPORTS, "NAME", {
+ enumerable: true,
+ get: function() {
+ return NAMESPACE;
+ }
+ });
+ ` : _template.default.statement`EXPORTS.NAME = NAMESPACE;`)({
+ EXPORTS: metadata.exportName,
+ NAME: exportName,
+ NAMESPACE: cloneNode(srcNamespace)
+ }));
+ }
+
+ if (sourceMetadata.reexportAll) {
+ const statement = buildNamespaceReexport(metadata, cloneNode(srcNamespace), constantReexports);
+ statement.loc = sourceMetadata.reexportAll.loc;
+ statements.push(statement);
+ }
+
+ return statements;
+}
+
+const ReexportTemplate = {
+ constant: _template.default.statement`EXPORTS.EXPORT_NAME = NAMESPACE_IMPORT;`,
+ constantComputed: _template.default.statement`EXPORTS["EXPORT_NAME"] = NAMESPACE_IMPORT;`,
+ spec: _template.default.statement`
+ Object.defineProperty(EXPORTS, "EXPORT_NAME", {
+ enumerable: true,
+ get: function() {
+ return NAMESPACE_IMPORT;
+ },
+ });
+ `
+};
+
+const buildReexportsFromMeta = (meta, metadata, constantReexports) => {
+ const namespace = metadata.lazy ? callExpression(identifier(metadata.name), []) : identifier(metadata.name);
+ const {
+ stringSpecifiers
+ } = meta;
+ return Array.from(metadata.reexports, ([exportName, importName]) => {
+ let NAMESPACE_IMPORT = cloneNode(namespace);
+
+ if (importName === "default" && metadata.interop === "node-default") {} else if (stringSpecifiers.has(importName)) {
+ NAMESPACE_IMPORT = memberExpression(NAMESPACE_IMPORT, stringLiteral(importName), true);
+ } else {
+ NAMESPACE_IMPORT = memberExpression(NAMESPACE_IMPORT, identifier(importName));
+ }
+
+ const astNodes = {
+ EXPORTS: meta.exportName,
+ EXPORT_NAME: exportName,
+ NAMESPACE_IMPORT
+ };
+
+ if (constantReexports || isIdentifier(NAMESPACE_IMPORT)) {
+ if (stringSpecifiers.has(exportName)) {
+ return ReexportTemplate.constantComputed(astNodes);
+ } else {
+ return ReexportTemplate.constant(astNodes);
+ }
+ } else {
+ return ReexportTemplate.spec(astNodes);
+ }
+ });
+};
+
+function buildESModuleHeader(metadata, enumerableModuleMeta = false) {
+ return (enumerableModuleMeta ? _template.default.statement`
+ EXPORTS.__esModule = true;
+ ` : _template.default.statement`
+ Object.defineProperty(EXPORTS, "__esModule", {
+ value: true,
+ });
+ `)({
+ EXPORTS: metadata.exportName
+ });
+}
+
+function buildNamespaceReexport(metadata, namespace, constantReexports) {
+ return (constantReexports ? _template.default.statement`
+ Object.keys(NAMESPACE).forEach(function(key) {
+ if (key === "default" || key === "__esModule") return;
+ VERIFY_NAME_LIST;
+ if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
+
+ EXPORTS[key] = NAMESPACE[key];
+ });
+ ` : _template.default.statement`
+ Object.keys(NAMESPACE).forEach(function(key) {
+ if (key === "default" || key === "__esModule") return;
+ VERIFY_NAME_LIST;
+ if (key in EXPORTS && EXPORTS[key] === NAMESPACE[key]) return;
+
+ Object.defineProperty(EXPORTS, key, {
+ enumerable: true,
+ get: function() {
+ return NAMESPACE[key];
+ },
+ });
+ });
+ `)({
+ NAMESPACE: namespace,
+ EXPORTS: metadata.exportName,
+ VERIFY_NAME_LIST: metadata.exportNameListName ? (0, _template.default)`
+ if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
+ `({
+ EXPORTS_LIST: metadata.exportNameListName
+ }) : null
+ });
+}
+
+function buildExportNameListDeclaration(programPath, metadata) {
+ const exportedVars = Object.create(null);
+
+ for (const data of metadata.local.values()) {
+ for (const name of data.names) {
+ exportedVars[name] = true;
+ }
+ }
+
+ let hasReexport = false;
+
+ for (const data of metadata.source.values()) {
+ for (const exportName of data.reexports.keys()) {
+ exportedVars[exportName] = true;
+ }
+
+ for (const exportName of data.reexportNamespace) {
+ exportedVars[exportName] = true;
+ }
+
+ hasReexport = hasReexport || !!data.reexportAll;
+ }
+
+ if (!hasReexport || Object.keys(exportedVars).length === 0) return null;
+ const name = programPath.scope.generateUidIdentifier("exportNames");
+ delete exportedVars.default;
+ return {
+ name: name.name,
+ statement: variableDeclaration("var", [variableDeclarator(name, valueToNode(exportedVars))])
+ };
+}
+
+function buildExportInitializationStatements(programPath, metadata, constantReexports = false, noIncompleteNsImportDetection = false) {
+ const initStatements = [];
+
+ for (const [localName, data] of metadata.local) {
+ if (data.kind === "import") {} else if (data.kind === "hoisted") {
+ initStatements.push([data.names[0], buildInitStatement(metadata, data.names, identifier(localName))]);
+ } else if (!noIncompleteNsImportDetection) {
+ for (const exportName of data.names) {
+ initStatements.push([exportName, null]);
+ }
+ }
+ }
+
+ for (const data of metadata.source.values()) {
+ if (!constantReexports) {
+ const reexportsStatements = buildReexportsFromMeta(metadata, data, false);
+ const reexports = [...data.reexports.keys()];
+
+ for (let i = 0; i < reexportsStatements.length; i++) {
+ initStatements.push([reexports[i], reexportsStatements[i]]);
+ }
+ }
+
+ if (!noIncompleteNsImportDetection) {
+ for (const exportName of data.reexportNamespace) {
+ initStatements.push([exportName, null]);
+ }
+ }
+ }
+
+ initStatements.sort(([a], [b]) => {
+ if (a < b) return -1;
+ if (b < a) return 1;
+ return 0;
+ });
+ const results = [];
+
+ if (noIncompleteNsImportDetection) {
+ for (const [, initStatement] of initStatements) {
+ results.push(initStatement);
+ }
+ } else {
+ const chunkSize = 100;
+
+ for (let i = 0, uninitializedExportNames = []; i < initStatements.length; i += chunkSize) {
+ for (let j = 0; j < chunkSize && i + j < initStatements.length; j++) {
+ const [exportName, initStatement] = initStatements[i + j];
+
+ if (initStatement !== null) {
+ if (uninitializedExportNames.length > 0) {
+ results.push(buildInitStatement(metadata, uninitializedExportNames, programPath.scope.buildUndefinedNode()));
+ uninitializedExportNames = [];
+ }
+
+ results.push(initStatement);
+ } else {
+ uninitializedExportNames.push(exportName);
+ }
+ }
+
+ if (uninitializedExportNames.length > 0) {
+ results.push(buildInitStatement(metadata, uninitializedExportNames, programPath.scope.buildUndefinedNode()));
+ }
+ }
+ }
+
+ return results;
+}
+
+const InitTemplate = {
+ computed: _template.default.expression`EXPORTS["NAME"] = VALUE`,
+ default: _template.default.expression`EXPORTS.NAME = VALUE`
+};
+
+function buildInitStatement(metadata, exportNames, initExpr) {
+ const {
+ stringSpecifiers,
+ exportName: EXPORTS
+ } = metadata;
+ return expressionStatement(exportNames.reduce((acc, exportName) => {
+ const params = {
+ EXPORTS,
+ NAME: exportName,
+ VALUE: acc
+ };
+
+ if (stringSpecifiers.has(exportName)) {
+ return InitTemplate.computed(params);
+ } else {
+ return InitTemplate.default(params);
+ }
+ }, initExpr));
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js b/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js
new file mode 100644
index 0000000..f98ee95
--- /dev/null
+++ b/node_modules/@babel/helper-module-transforms/lib/normalize-and-load-metadata.js
@@ -0,0 +1,398 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = normalizeModuleAndLoadMetadata;
+exports.hasExports = hasExports;
+exports.isSideEffectImport = isSideEffectImport;
+exports.validateImportInteropOption = validateImportInteropOption;
+
+var _path = require("path");
+
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+
+var _helperSplitExportDeclaration = require("@babel/helper-split-export-declaration");
+
+function hasExports(metadata) {
+ return metadata.hasExports;
+}
+
+function isSideEffectImport(source) {
+ return source.imports.size === 0 && source.importsNamespace.size === 0 && source.reexports.size === 0 && source.reexportNamespace.size === 0 && !source.reexportAll;
+}
+
+function validateImportInteropOption(importInterop) {
+ if (typeof importInterop !== "function" && importInterop !== "none" && importInterop !== "babel" && importInterop !== "node") {
+ throw new Error(`.importInterop must be one of "none", "babel", "node", or a function returning one of those values (received ${importInterop}).`);
+ }
+
+ return importInterop;
+}
+
+function resolveImportInterop(importInterop, source) {
+ if (typeof importInterop === "function") {
+ return validateImportInteropOption(importInterop(source));
+ }
+
+ return importInterop;
+}
+
+function normalizeModuleAndLoadMetadata(programPath, exportName, {
+ importInterop,
+ initializeReexports = false,
+ lazy = false,
+ esNamespaceOnly = false
+}) {
+ if (!exportName) {
+ exportName = programPath.scope.generateUidIdentifier("exports").name;
+ }
+
+ const stringSpecifiers = new Set();
+ nameAnonymousExports(programPath);
+ const {
+ local,
+ source,
+ hasExports
+ } = getModuleMetadata(programPath, {
+ initializeReexports,
+ lazy
+ }, stringSpecifiers);
+ removeModuleDeclarations(programPath);
+
+ for (const [, metadata] of source) {
+ if (metadata.importsNamespace.size > 0) {
+ metadata.name = metadata.importsNamespace.values().next().value;
+ }
+
+ const resolvedInterop = resolveImportInterop(importInterop, metadata.source);
+
+ if (resolvedInterop === "none") {
+ metadata.interop = "none";
+ } else if (resolvedInterop === "node" && metadata.interop === "namespace") {
+ metadata.interop = "node-namespace";
+ } else if (resolvedInterop === "node" && metadata.interop === "default") {
+ metadata.interop = "node-default";
+ } else if (esNamespaceOnly && metadata.interop === "namespace") {
+ metadata.interop = "default";
+ }
+ }
+
+ return {
+ exportName,
+ exportNameListName: null,
+ hasExports,
+ local,
+ source,
+ stringSpecifiers
+ };
+}
+
+function getExportSpecifierName(path, stringSpecifiers) {
+ if (path.isIdentifier()) {
+ return path.node.name;
+ } else if (path.isStringLiteral()) {
+ const stringValue = path.node.value;
+
+ if (!(0, _helperValidatorIdentifier.isIdentifierName)(stringValue)) {
+ stringSpecifiers.add(stringValue);
+ }
+
+ return stringValue;
+ } else {
+ throw new Error(`Expected export specifier to be either Identifier or StringLiteral, got ${path.node.type}`);
+ }
+}
+
+function assertExportSpecifier(path) {
+ if (path.isExportSpecifier()) {
+ return;
+ } else if (path.isExportNamespaceSpecifier()) {
+ throw path.buildCodeFrameError("Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`.");
+ } else {
+ throw path.buildCodeFrameError("Unexpected export specifier type");
+ }
+}
+
+function getModuleMetadata(programPath, {
+ lazy,
+ initializeReexports
+}, stringSpecifiers) {
+ const localData = getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers);
+ const sourceData = new Map();
+
+ const getData = sourceNode => {
+ const source = sourceNode.value;
+ let data = sourceData.get(source);
+
+ if (!data) {
+ data = {
+ name: programPath.scope.generateUidIdentifier((0, _path.basename)(source, (0, _path.extname)(source))).name,
+ interop: "none",
+ loc: null,
+ imports: new Map(),
+ importsNamespace: new Set(),
+ reexports: new Map(),
+ reexportNamespace: new Set(),
+ reexportAll: null,
+ lazy: false,
+ source
+ };
+ sourceData.set(source, data);
+ }
+
+ return data;
+ };
+
+ let hasExports = false;
+ programPath.get("body").forEach(child => {
+ if (child.isImportDeclaration()) {
+ const data = getData(child.node.source);
+ if (!data.loc) data.loc = child.node.loc;
+ child.get("specifiers").forEach(spec => {
+ if (spec.isImportDefaultSpecifier()) {
+ const localName = spec.get("local").node.name;
+ data.imports.set(localName, "default");
+ const reexport = localData.get(localName);
+
+ if (reexport) {
+ localData.delete(localName);
+ reexport.names.forEach(name => {
+ data.reexports.set(name, "default");
+ });
+ }
+ } else if (spec.isImportNamespaceSpecifier()) {
+ const localName = spec.get("local").node.name;
+ data.importsNamespace.add(localName);
+ const reexport = localData.get(localName);
+
+ if (reexport) {
+ localData.delete(localName);
+ reexport.names.forEach(name => {
+ data.reexportNamespace.add(name);
+ });
+ }
+ } else if (spec.isImportSpecifier()) {
+ const importName = getExportSpecifierName(spec.get("imported"), stringSpecifiers);
+ const localName = spec.get("local").node.name;
+ data.imports.set(localName, importName);
+ const reexport = localData.get(localName);
+
+ if (reexport) {
+ localData.delete(localName);
+ reexport.names.forEach(name => {
+ data.reexports.set(name, importName);
+ });
+ }
+ }
+ });
+ } else if (child.isExportAllDeclaration()) {
+ hasExports = true;
+ const data = getData(child.node.source);
+ if (!data.loc) data.loc = child.node.loc;
+ data.reexportAll = {
+ loc: child.node.loc
+ };
+ } else if (child.isExportNamedDeclaration() && child.node.source) {
+ hasExports = true;
+ const data = getData(child.node.source);
+ if (!data.loc) data.loc = child.node.loc;
+ child.get("specifiers").forEach(spec => {
+ assertExportSpecifier(spec);
+ const importName = getExportSpecifierName(spec.get("local"), stringSpecifiers);
+ const exportName = getExportSpecifierName(spec.get("exported"), stringSpecifiers);
+ data.reexports.set(exportName, importName);
+
+ if (exportName === "__esModule") {
+ throw spec.get("exported").buildCodeFrameError('Illegal export "__esModule".');
+ }
+ });
+ } else if (child.isExportNamedDeclaration() || child.isExportDefaultDeclaration()) {
+ hasExports = true;
+ }
+ });
+
+ for (const metadata of sourceData.values()) {
+ let needsDefault = false;
+ let needsNamed = false;
+
+ if (metadata.importsNamespace.size > 0) {
+ needsDefault = true;
+ needsNamed = true;
+ }
+
+ if (metadata.reexportAll) {
+ needsNamed = true;
+ }
+
+ for (const importName of metadata.imports.values()) {
+ if (importName === "default") needsDefault = true;else needsNamed = true;
+ }
+
+ for (const importName of metadata.reexports.values()) {
+ if (importName === "default") needsDefault = true;else needsNamed = true;
+ }
+
+ if (needsDefault && needsNamed) {
+ metadata.interop = "namespace";
+ } else if (needsDefault) {
+ metadata.interop = "default";
+ }
+ }
+
+ for (const [source, metadata] of sourceData) {
+ if (lazy !== false && !(isSideEffectImport(metadata) || metadata.reexportAll)) {
+ if (lazy === true) {
+ metadata.lazy = !/\./.test(source);
+ } else if (Array.isArray(lazy)) {
+ metadata.lazy = lazy.indexOf(source) !== -1;
+ } else if (typeof lazy === "function") {
+ metadata.lazy = lazy(source);
+ } else {
+ throw new Error(`.lazy must be a boolean, string array, or function`);
+ }
+ }
+ }
+
+ return {
+ hasExports,
+ local: localData,
+ source: sourceData
+ };
+}
+
+function getLocalExportMetadata(programPath, initializeReexports, stringSpecifiers) {
+ const bindingKindLookup = new Map();
+ programPath.get("body").forEach(child => {
+ let kind;
+
+ if (child.isImportDeclaration()) {
+ kind = "import";
+ } else {
+ if (child.isExportDefaultDeclaration()) child = child.get("declaration");
+
+ if (child.isExportNamedDeclaration()) {
+ if (child.node.declaration) {
+ child = child.get("declaration");
+ } else if (initializeReexports && child.node.source && child.get("source").isStringLiteral()) {
+ child.get("specifiers").forEach(spec => {
+ assertExportSpecifier(spec);
+ bindingKindLookup.set(spec.get("local").node.name, "block");
+ });
+ return;
+ }
+ }
+
+ if (child.isFunctionDeclaration()) {
+ kind = "hoisted";
+ } else if (child.isClassDeclaration()) {
+ kind = "block";
+ } else if (child.isVariableDeclaration({
+ kind: "var"
+ })) {
+ kind = "var";
+ } else if (child.isVariableDeclaration()) {
+ kind = "block";
+ } else {
+ return;
+ }
+ }
+
+ Object.keys(child.getOuterBindingIdentifiers()).forEach(name => {
+ bindingKindLookup.set(name, kind);
+ });
+ });
+ const localMetadata = new Map();
+
+ const getLocalMetadata = idPath => {
+ const localName = idPath.node.name;
+ let metadata = localMetadata.get(localName);
+
+ if (!metadata) {
+ const kind = bindingKindLookup.get(localName);
+
+ if (kind === undefined) {
+ throw idPath.buildCodeFrameError(`Exporting local "${localName}", which is not declared.`);
+ }
+
+ metadata = {
+ names: [],
+ kind
+ };
+ localMetadata.set(localName, metadata);
+ }
+
+ return metadata;
+ };
+
+ programPath.get("body").forEach(child => {
+ if (child.isExportNamedDeclaration() && (initializeReexports || !child.node.source)) {
+ if (child.node.declaration) {
+ const declaration = child.get("declaration");
+ const ids = declaration.getOuterBindingIdentifierPaths();
+ Object.keys(ids).forEach(name => {
+ if (name === "__esModule") {
+ throw declaration.buildCodeFrameError('Illegal export "__esModule".');
+ }
+
+ getLocalMetadata(ids[name]).names.push(name);
+ });
+ } else {
+ child.get("specifiers").forEach(spec => {
+ const local = spec.get("local");
+ const exported = spec.get("exported");
+ const localMetadata = getLocalMetadata(local);
+ const exportName = getExportSpecifierName(exported, stringSpecifiers);
+
+ if (exportName === "__esModule") {
+ throw exported.buildCodeFrameError('Illegal export "__esModule".');
+ }
+
+ localMetadata.names.push(exportName);
+ });
+ }
+ } else if (child.isExportDefaultDeclaration()) {
+ const declaration = child.get("declaration");
+
+ if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
+ getLocalMetadata(declaration.get("id")).names.push("default");
+ } else {
+ throw declaration.buildCodeFrameError("Unexpected default expression export.");
+ }
+ }
+ });
+ return localMetadata;
+}
+
+function nameAnonymousExports(programPath) {
+ programPath.get("body").forEach(child => {
+ if (!child.isExportDefaultDeclaration()) return;
+ (0, _helperSplitExportDeclaration.default)(child);
+ });
+}
+
+function removeModuleDeclarations(programPath) {
+ programPath.get("body").forEach(child => {
+ if (child.isImportDeclaration()) {
+ child.remove();
+ } else if (child.isExportNamedDeclaration()) {
+ if (child.node.declaration) {
+ child.node.declaration._blockHoist = child.node._blockHoist;
+ child.replaceWith(child.node.declaration);
+ } else {
+ child.remove();
+ }
+ } else if (child.isExportDefaultDeclaration()) {
+ const declaration = child.get("declaration");
+
+ if (declaration.isFunctionDeclaration() || declaration.isClassDeclaration()) {
+ declaration._blockHoist = child.node._blockHoist;
+ child.replaceWith(declaration);
+ } else {
+ throw declaration.buildCodeFrameError("Unexpected default expression export.");
+ }
+ } else if (child.isExportAllDeclaration()) {
+ child.remove();
+ }
+ });
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js b/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js
new file mode 100644
index 0000000..8173fd5
--- /dev/null
+++ b/node_modules/@babel/helper-module-transforms/lib/rewrite-live-references.js
@@ -0,0 +1,360 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = rewriteLiveReferences;
+
+var _assert = require("assert");
+
+var _t = require("@babel/types");
+
+var _template = require("@babel/template");
+
+var _helperSimpleAccess = require("@babel/helper-simple-access");
+
+const {
+ assignmentExpression,
+ callExpression,
+ cloneNode,
+ expressionStatement,
+ getOuterBindingIdentifiers,
+ identifier,
+ isMemberExpression,
+ isVariableDeclaration,
+ jsxIdentifier,
+ jsxMemberExpression,
+ memberExpression,
+ numericLiteral,
+ sequenceExpression,
+ stringLiteral,
+ variableDeclaration,
+ variableDeclarator
+} = _t;
+
+function isInType(path) {
+ do {
+ switch (path.parent.type) {
+ case "TSTypeAnnotation":
+ case "TSTypeAliasDeclaration":
+ case "TSTypeReference":
+ case "TypeAnnotation":
+ case "TypeAlias":
+ return true;
+
+ case "ExportSpecifier":
+ return path.parentPath.parent.exportKind === "type";
+
+ default:
+ if (path.parentPath.isStatement() || path.parentPath.isExpression()) {
+ return false;
+ }
+
+ }
+ } while (path = path.parentPath);
+}
+
+function rewriteLiveReferences(programPath, metadata) {
+ const imported = new Map();
+ const exported = new Map();
+
+ const requeueInParent = path => {
+ programPath.requeue(path);
+ };
+
+ for (const [source, data] of metadata.source) {
+ for (const [localName, importName] of data.imports) {
+ imported.set(localName, [source, importName, null]);
+ }
+
+ for (const localName of data.importsNamespace) {
+ imported.set(localName, [source, null, localName]);
+ }
+ }
+
+ for (const [local, data] of metadata.local) {
+ let exportMeta = exported.get(local);
+
+ if (!exportMeta) {
+ exportMeta = [];
+ exported.set(local, exportMeta);
+ }
+
+ exportMeta.push(...data.names);
+ }
+
+ const rewriteBindingInitVisitorState = {
+ metadata,
+ requeueInParent,
+ scope: programPath.scope,
+ exported
+ };
+ programPath.traverse(rewriteBindingInitVisitor, rewriteBindingInitVisitorState);
+ (0, _helperSimpleAccess.default)(programPath, new Set([...Array.from(imported.keys()), ...Array.from(exported.keys())]));
+ const rewriteReferencesVisitorState = {
+ seen: new WeakSet(),
+ metadata,
+ requeueInParent,
+ scope: programPath.scope,
+ imported,
+ exported,
+ buildImportReference: ([source, importName, localName], identNode) => {
+ const meta = metadata.source.get(source);
+
+ if (localName) {
+ if (meta.lazy) identNode = callExpression(identNode, []);
+ return identNode;
+ }
+
+ let namespace = identifier(meta.name);
+ if (meta.lazy) namespace = callExpression(namespace, []);
+
+ if (importName === "default" && meta.interop === "node-default") {
+ return namespace;
+ }
+
+ const computed = metadata.stringSpecifiers.has(importName);
+ return memberExpression(namespace, computed ? stringLiteral(importName) : identifier(importName), computed);
+ }
+ };
+ programPath.traverse(rewriteReferencesVisitor, rewriteReferencesVisitorState);
+}
+
+const rewriteBindingInitVisitor = {
+ Scope(path) {
+ path.skip();
+ },
+
+ ClassDeclaration(path) {
+ const {
+ requeueInParent,
+ exported,
+ metadata
+ } = this;
+ const {
+ id
+ } = path.node;
+ if (!id) throw new Error("Expected class to have a name");
+ const localName = id.name;
+ const exportNames = exported.get(localName) || [];
+
+ if (exportNames.length > 0) {
+ const statement = expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, identifier(localName)));
+ statement._blockHoist = path.node._blockHoist;
+ requeueInParent(path.insertAfter(statement)[0]);
+ }
+ },
+
+ VariableDeclaration(path) {
+ const {
+ requeueInParent,
+ exported,
+ metadata
+ } = this;
+ Object.keys(path.getOuterBindingIdentifiers()).forEach(localName => {
+ const exportNames = exported.get(localName) || [];
+
+ if (exportNames.length > 0) {
+ const statement = expressionStatement(buildBindingExportAssignmentExpression(metadata, exportNames, identifier(localName)));
+ statement._blockHoist = path.node._blockHoist;
+ requeueInParent(path.insertAfter(statement)[0]);
+ }
+ });
+ }
+
+};
+
+const buildBindingExportAssignmentExpression = (metadata, exportNames, localExpr) => {
+ return (exportNames || []).reduce((expr, exportName) => {
+ const {
+ stringSpecifiers
+ } = metadata;
+ const computed = stringSpecifiers.has(exportName);
+ return assignmentExpression("=", memberExpression(identifier(metadata.exportName), computed ? stringLiteral(exportName) : identifier(exportName), computed), expr);
+ }, localExpr);
+};
+
+const buildImportThrow = localName => {
+ return _template.default.expression.ast`
+ (function() {
+ throw new Error('"' + '${localName}' + '" is read-only.');
+ })()
+ `;
+};
+
+const rewriteReferencesVisitor = {
+ ReferencedIdentifier(path) {
+ const {
+ seen,
+ buildImportReference,
+ scope,
+ imported,
+ requeueInParent
+ } = this;
+ if (seen.has(path.node)) return;
+ seen.add(path.node);
+ const localName = path.node.name;
+ const importData = imported.get(localName);
+
+ if (importData) {
+ if (isInType(path)) {
+ throw path.buildCodeFrameError(`Cannot transform the imported binding "${localName}" since it's also used in a type annotation. ` + `Please strip type annotations using @babel/preset-typescript or @babel/preset-flow.`);
+ }
+
+ const localBinding = path.scope.getBinding(localName);
+ const rootBinding = scope.getBinding(localName);
+ if (rootBinding !== localBinding) return;
+ const ref = buildImportReference(importData, path.node);
+ ref.loc = path.node.loc;
+
+ if ((path.parentPath.isCallExpression({
+ callee: path.node
+ }) || path.parentPath.isOptionalCallExpression({
+ callee: path.node
+ }) || path.parentPath.isTaggedTemplateExpression({
+ tag: path.node
+ })) && isMemberExpression(ref)) {
+ path.replaceWith(sequenceExpression([numericLiteral(0), ref]));
+ } else if (path.isJSXIdentifier() && isMemberExpression(ref)) {
+ const {
+ object,
+ property
+ } = ref;
+ path.replaceWith(jsxMemberExpression(jsxIdentifier(object.name), jsxIdentifier(property.name)));
+ } else {
+ path.replaceWith(ref);
+ }
+
+ requeueInParent(path);
+ path.skip();
+ }
+ },
+
+ AssignmentExpression: {
+ exit(path) {
+ const {
+ scope,
+ seen,
+ imported,
+ exported,
+ requeueInParent,
+ buildImportReference
+ } = this;
+ if (seen.has(path.node)) return;
+ seen.add(path.node);
+ const left = path.get("left");
+ if (left.isMemberExpression()) return;
+
+ if (left.isIdentifier()) {
+ const localName = left.node.name;
+
+ if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
+ return;
+ }
+
+ const exportedNames = exported.get(localName);
+ const importData = imported.get(localName);
+
+ if ((exportedNames == null ? void 0 : exportedNames.length) > 0 || importData) {
+ _assert(path.node.operator === "=", "Path was not simplified");
+
+ const assignment = path.node;
+
+ if (importData) {
+ assignment.left = buildImportReference(importData, assignment.left);
+ assignment.right = sequenceExpression([assignment.right, buildImportThrow(localName)]);
+ }
+
+ path.replaceWith(buildBindingExportAssignmentExpression(this.metadata, exportedNames, assignment));
+ requeueInParent(path);
+ }
+ } else {
+ const ids = left.getOuterBindingIdentifiers();
+ const programScopeIds = Object.keys(ids).filter(localName => scope.getBinding(localName) === path.scope.getBinding(localName));
+ const id = programScopeIds.find(localName => imported.has(localName));
+
+ if (id) {
+ path.node.right = sequenceExpression([path.node.right, buildImportThrow(id)]);
+ }
+
+ const items = [];
+ programScopeIds.forEach(localName => {
+ const exportedNames = exported.get(localName) || [];
+
+ if (exportedNames.length > 0) {
+ items.push(buildBindingExportAssignmentExpression(this.metadata, exportedNames, identifier(localName)));
+ }
+ });
+
+ if (items.length > 0) {
+ let node = sequenceExpression(items);
+
+ if (path.parentPath.isExpressionStatement()) {
+ node = expressionStatement(node);
+ node._blockHoist = path.parentPath.node._blockHoist;
+ }
+
+ const statement = path.insertAfter(node)[0];
+ requeueInParent(statement);
+ }
+ }
+ }
+
+ },
+
+ "ForOfStatement|ForInStatement"(path) {
+ const {
+ scope,
+ node
+ } = path;
+ const {
+ left
+ } = node;
+ const {
+ exported,
+ imported,
+ scope: programScope
+ } = this;
+
+ if (!isVariableDeclaration(left)) {
+ let didTransformExport = false,
+ importConstViolationName;
+ const loopBodyScope = path.get("body").scope;
+
+ for (const name of Object.keys(getOuterBindingIdentifiers(left))) {
+ if (programScope.getBinding(name) === scope.getBinding(name)) {
+ if (exported.has(name)) {
+ didTransformExport = true;
+
+ if (loopBodyScope.hasOwnBinding(name)) {
+ loopBodyScope.rename(name);
+ }
+ }
+
+ if (imported.has(name) && !importConstViolationName) {
+ importConstViolationName = name;
+ }
+ }
+ }
+
+ if (!didTransformExport && !importConstViolationName) {
+ return;
+ }
+
+ path.ensureBlock();
+ const bodyPath = path.get("body");
+ const newLoopId = scope.generateUidIdentifierBasedOnNode(left);
+ path.get("left").replaceWith(variableDeclaration("let", [variableDeclarator(cloneNode(newLoopId))]));
+ scope.registerDeclaration(path.get("left"));
+
+ if (didTransformExport) {
+ bodyPath.unshiftContainer("body", expressionStatement(assignmentExpression("=", left, newLoopId)));
+ }
+
+ if (importConstViolationName) {
+ bodyPath.unshiftContainer("body", expressionStatement(buildImportThrow(importConstViolationName)));
+ }
+ }
+ }
+
+}; \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js b/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js
new file mode 100644
index 0000000..9165539
--- /dev/null
+++ b/node_modules/@babel/helper-module-transforms/lib/rewrite-this.js
@@ -0,0 +1,30 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = rewriteThis;
+
+var _helperEnvironmentVisitor = require("@babel/helper-environment-visitor");
+
+var _traverse = require("@babel/traverse");
+
+var _t = require("@babel/types");
+
+const {
+ numericLiteral,
+ unaryExpression
+} = _t;
+
+function rewriteThis(programPath) {
+ (0, _traverse.default)(programPath.node, Object.assign({}, rewriteThisVisitor, {
+ noScope: true
+ }));
+}
+
+const rewriteThisVisitor = _traverse.default.visitors.merge([_helperEnvironmentVisitor.default, {
+ ThisExpression(path) {
+ path.replaceWith(unaryExpression("void", numericLiteral(0), true));
+ }
+
+}]); \ No newline at end of file
diff --git a/node_modules/@babel/helper-module-transforms/package.json b/node_modules/@babel/helper-module-transforms/package.json
new file mode 100644
index 0000000..267d86b
--- /dev/null
+++ b/node_modules/@babel/helper-module-transforms/package.json
@@ -0,0 +1,30 @@
+{
+ "name": "@babel/helper-module-transforms",
+ "version": "7.17.6",
+ "description": "Babel helper functions for implementing ES6 module transformations",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-helper-module-transforms",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-module-transforms"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/helper-environment-visitor": "^7.16.7",
+ "@babel/helper-module-imports": "^7.16.7",
+ "@babel/helper-simple-access": "^7.16.7",
+ "@babel/helper-split-export-declaration": "^7.16.7",
+ "@babel/helper-validator-identifier": "^7.16.7",
+ "@babel/template": "^7.16.7",
+ "@babel/traverse": "^7.17.3",
+ "@babel/types": "^7.17.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-plugin-utils/LICENSE b/node_modules/@babel/helper-plugin-utils/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-plugin-utils/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-plugin-utils/README.md b/node_modules/@babel/helper-plugin-utils/README.md
new file mode 100644
index 0000000..c17852d
--- /dev/null
+++ b/node_modules/@babel/helper-plugin-utils/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-plugin-utils
+
+> General utilities for plugins to use
+
+See our website [@babel/helper-plugin-utils](https://babeljs.io/docs/en/babel-helper-plugin-utils) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-plugin-utils
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-plugin-utils
+```
diff --git a/node_modules/@babel/helper-plugin-utils/lib/index.js b/node_modules/@babel/helper-plugin-utils/lib/index.js
new file mode 100644
index 0000000..0ba1be0
--- /dev/null
+++ b/node_modules/@babel/helper-plugin-utils/lib/index.js
@@ -0,0 +1,90 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.declare = declare;
+
+function declare(builder) {
+ return (api, options, dirname) => {
+ var _clonedApi2;
+
+ let clonedApi;
+
+ for (const name of Object.keys(apiPolyfills)) {
+ var _clonedApi;
+
+ if (api[name]) continue;
+ clonedApi = (_clonedApi = clonedApi) != null ? _clonedApi : copyApiObject(api);
+ clonedApi[name] = apiPolyfills[name](clonedApi);
+ }
+
+ return builder((_clonedApi2 = clonedApi) != null ? _clonedApi2 : api, options || {}, dirname);
+ };
+}
+
+const apiPolyfills = {
+ assertVersion: api => range => {
+ throwVersionError(range, api.version);
+ },
+ targets: () => () => {
+ return {};
+ },
+ assumption: () => () => {}
+};
+
+function copyApiObject(api) {
+ let proto = null;
+
+ if (typeof api.version === "string" && /^7\./.test(api.version)) {
+ proto = Object.getPrototypeOf(api);
+
+ if (proto && (!has(proto, "version") || !has(proto, "transform") || !has(proto, "template") || !has(proto, "types"))) {
+ proto = null;
+ }
+ }
+
+ return Object.assign({}, proto, api);
+}
+
+function has(obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key);
+}
+
+function throwVersionError(range, version) {
+ if (typeof range === "number") {
+ if (!Number.isInteger(range)) {
+ throw new Error("Expected string or integer value.");
+ }
+
+ range = `^${range}.0.0-0`;
+ }
+
+ if (typeof range !== "string") {
+ throw new Error("Expected string or integer value.");
+ }
+
+ const limit = Error.stackTraceLimit;
+
+ if (typeof limit === "number" && limit < 25) {
+ Error.stackTraceLimit = 25;
+ }
+
+ let err;
+
+ if (version.slice(0, 2) === "7.") {
+ err = new Error(`Requires Babel "^7.0.0-beta.41", but was loaded with "${version}". ` + `You'll need to update your @babel/core version.`);
+ } else {
+ err = new Error(`Requires Babel "${range}", but was loaded with "${version}". ` + `If you are sure you have a compatible version of @babel/core, ` + `it is likely that something in your build process is loading the ` + `wrong version. Inspect the stack trace of this error to look for ` + `the first entry that doesn't mention "@babel/core" or "babel-core" ` + `to see what is calling Babel.`);
+ }
+
+ if (typeof limit === "number") {
+ Error.stackTraceLimit = limit;
+ }
+
+ throw Object.assign(err, {
+ code: "BABEL_VERSION_UNSUPPORTED",
+ version,
+ range
+ });
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-plugin-utils/package.json b/node_modules/@babel/helper-plugin-utils/package.json
new file mode 100644
index 0000000..740d52a
--- /dev/null
+++ b/node_modules/@babel/helper-plugin-utils/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "@babel/helper-plugin-utils",
+ "version": "7.16.7",
+ "description": "General utilities for plugins to use",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-helper-plugin-utils",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-plugin-utils"
+ },
+ "main": "./lib/index.js",
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-simple-access/LICENSE b/node_modules/@babel/helper-simple-access/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-simple-access/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-simple-access/README.md b/node_modules/@babel/helper-simple-access/README.md
new file mode 100644
index 0000000..01aa70a
--- /dev/null
+++ b/node_modules/@babel/helper-simple-access/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-simple-access
+
+> Babel helper for ensuring that access to a given value is performed through simple accesses
+
+See our website [@babel/helper-simple-access](https://babeljs.io/docs/en/babel-helper-simple-access) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-simple-access
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-simple-access
+```
diff --git a/node_modules/@babel/helper-simple-access/lib/index.js b/node_modules/@babel/helper-simple-access/lib/index.js
new file mode 100644
index 0000000..69bacda
--- /dev/null
+++ b/node_modules/@babel/helper-simple-access/lib/index.js
@@ -0,0 +1,93 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = simplifyAccess;
+
+var _t = require("@babel/types");
+
+const {
+ LOGICAL_OPERATORS,
+ assignmentExpression,
+ binaryExpression,
+ cloneNode,
+ identifier,
+ logicalExpression,
+ numericLiteral,
+ sequenceExpression,
+ unaryExpression
+} = _t;
+
+function simplifyAccess(path, bindingNames) {
+ path.traverse(simpleAssignmentVisitor, {
+ scope: path.scope,
+ bindingNames,
+ seen: new WeakSet()
+ });
+}
+
+const simpleAssignmentVisitor = {
+ UpdateExpression: {
+ exit(path) {
+ const {
+ scope,
+ bindingNames
+ } = this;
+ const arg = path.get("argument");
+ if (!arg.isIdentifier()) return;
+ const localName = arg.node.name;
+ if (!bindingNames.has(localName)) return;
+
+ if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
+ return;
+ }
+
+ if (path.parentPath.isExpressionStatement() && !path.isCompletionRecord()) {
+ const operator = path.node.operator == "++" ? "+=" : "-=";
+ path.replaceWith(assignmentExpression(operator, arg.node, numericLiteral(1)));
+ } else if (path.node.prefix) {
+ path.replaceWith(assignmentExpression("=", identifier(localName), binaryExpression(path.node.operator[0], unaryExpression("+", arg.node), numericLiteral(1))));
+ } else {
+ const old = path.scope.generateUidIdentifierBasedOnNode(arg.node, "old");
+ const varName = old.name;
+ path.scope.push({
+ id: old
+ });
+ const binary = binaryExpression(path.node.operator[0], identifier(varName), numericLiteral(1));
+ path.replaceWith(sequenceExpression([assignmentExpression("=", identifier(varName), unaryExpression("+", arg.node)), assignmentExpression("=", cloneNode(arg.node), binary), identifier(varName)]));
+ }
+ }
+
+ },
+ AssignmentExpression: {
+ exit(path) {
+ const {
+ scope,
+ seen,
+ bindingNames
+ } = this;
+ if (path.node.operator === "=") return;
+ if (seen.has(path.node)) return;
+ seen.add(path.node);
+ const left = path.get("left");
+ if (!left.isIdentifier()) return;
+ const localName = left.node.name;
+ if (!bindingNames.has(localName)) return;
+
+ if (scope.getBinding(localName) !== path.scope.getBinding(localName)) {
+ return;
+ }
+
+ const operator = path.node.operator.slice(0, -1);
+
+ if (LOGICAL_OPERATORS.includes(operator)) {
+ path.replaceWith(logicalExpression(operator, path.node.left, assignmentExpression("=", cloneNode(path.node.left), path.node.right)));
+ } else {
+ path.node.right = binaryExpression(operator, cloneNode(path.node.left), path.node.right);
+ path.node.operator = "=";
+ }
+ }
+
+ }
+}; \ No newline at end of file
diff --git a/node_modules/@babel/helper-simple-access/package.json b/node_modules/@babel/helper-simple-access/package.json
new file mode 100644
index 0000000..e30c7ed
--- /dev/null
+++ b/node_modules/@babel/helper-simple-access/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "@babel/helper-simple-access",
+ "version": "7.16.7",
+ "description": "Babel helper for ensuring that access to a given value is performed through simple accesses",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-helper-simple-access",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-simple-access"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "devDependencies": {
+ "@babel/traverse": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-split-export-declaration/LICENSE b/node_modules/@babel/helper-split-export-declaration/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-split-export-declaration/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-split-export-declaration/README.md b/node_modules/@babel/helper-split-export-declaration/README.md
new file mode 100644
index 0000000..b76e8ef
--- /dev/null
+++ b/node_modules/@babel/helper-split-export-declaration/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-split-export-declaration
+
+>
+
+See our website [@babel/helper-split-export-declaration](https://babeljs.io/docs/en/babel-helper-split-export-declaration) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-split-export-declaration
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-split-export-declaration
+```
diff --git a/node_modules/@babel/helper-split-export-declaration/lib/index.js b/node_modules/@babel/helper-split-export-declaration/lib/index.js
new file mode 100644
index 0000000..6007f89
--- /dev/null
+++ b/node_modules/@babel/helper-split-export-declaration/lib/index.js
@@ -0,0 +1,67 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = splitExportDeclaration;
+
+var _t = require("@babel/types");
+
+const {
+ cloneNode,
+ exportNamedDeclaration,
+ exportSpecifier,
+ identifier,
+ variableDeclaration,
+ variableDeclarator
+} = _t;
+
+function splitExportDeclaration(exportDeclaration) {
+ if (!exportDeclaration.isExportDeclaration()) {
+ throw new Error("Only export declarations can be split.");
+ }
+
+ const isDefault = exportDeclaration.isExportDefaultDeclaration();
+ const declaration = exportDeclaration.get("declaration");
+ const isClassDeclaration = declaration.isClassDeclaration();
+
+ if (isDefault) {
+ const standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;
+ const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
+ let id = declaration.node.id;
+ let needBindingRegistration = false;
+
+ if (!id) {
+ needBindingRegistration = true;
+ id = scope.generateUidIdentifier("default");
+
+ if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {
+ declaration.node.id = cloneNode(id);
+ }
+ }
+
+ const updatedDeclaration = standaloneDeclaration ? declaration : variableDeclaration("var", [variableDeclarator(cloneNode(id), declaration.node)]);
+ const updatedExportDeclaration = exportNamedDeclaration(null, [exportSpecifier(cloneNode(id), identifier("default"))]);
+ exportDeclaration.insertAfter(updatedExportDeclaration);
+ exportDeclaration.replaceWith(updatedDeclaration);
+
+ if (needBindingRegistration) {
+ scope.registerDeclaration(exportDeclaration);
+ }
+
+ return exportDeclaration;
+ }
+
+ if (exportDeclaration.get("specifiers").length > 0) {
+ throw new Error("It doesn't make sense to split exported specifiers.");
+ }
+
+ const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
+ const specifiers = Object.keys(bindingIdentifiers).map(name => {
+ return exportSpecifier(identifier(name), identifier(name));
+ });
+ const aliasDeclar = exportNamedDeclaration(null, specifiers);
+ exportDeclaration.insertAfter(aliasDeclar);
+ exportDeclaration.replaceWith(declaration.node);
+ return exportDeclaration;
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-split-export-declaration/package.json b/node_modules/@babel/helper-split-export-declaration/package.json
new file mode 100644
index 0000000..3836b19
--- /dev/null
+++ b/node_modules/@babel/helper-split-export-declaration/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/helper-split-export-declaration",
+ "version": "7.16.7",
+ "description": "",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-split-export-declaration"
+ },
+ "homepage": "https://babel.dev/docs/en/next/babel-helper-split-export-declaration",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)"
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/LICENSE b/node_modules/@babel/helper-validator-identifier/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-validator-identifier/README.md b/node_modules/@babel/helper-validator-identifier/README.md
new file mode 100644
index 0000000..4f704c4
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-validator-identifier
+
+> Validate identifier/keywords name
+
+See our website [@babel/helper-validator-identifier](https://babeljs.io/docs/en/babel-helper-validator-identifier) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-validator-identifier
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-validator-identifier
+```
diff --git a/node_modules/@babel/helper-validator-identifier/lib/identifier.js b/node_modules/@babel/helper-validator-identifier/lib/identifier.js
new file mode 100644
index 0000000..cbade22
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/lib/identifier.js
@@ -0,0 +1,84 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isIdentifierChar = isIdentifierChar;
+exports.isIdentifierName = isIdentifierName;
+exports.isIdentifierStart = isIdentifierStart;
+let nonASCIIidentifierStartChars = "\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\u0560-\u0588\u05d0-\u05ea\u05ef-\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\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\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\u09fc\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\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\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-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\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-\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-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\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-\uab69\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";
+let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
+const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
+const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
+nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
+const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 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, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 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, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 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, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 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, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
+const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 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, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
+
+function isInAstralSet(code, set) {
+ let pos = 0x10000;
+
+ for (let i = 0, length = set.length; i < length; i += 2) {
+ pos += set[i];
+ if (pos > code) return false;
+ pos += set[i + 1];
+ if (pos >= code) return true;
+ }
+
+ return false;
+}
+
+function isIdentifierStart(code) {
+ if (code < 65) return code === 36;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
+ }
+
+ return isInAstralSet(code, astralIdentifierStartCodes);
+}
+
+function isIdentifierChar(code) {
+ if (code < 48) return code === 36;
+ if (code < 58) return true;
+ if (code < 65) return false;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
+ }
+
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
+}
+
+function isIdentifierName(name) {
+ let isFirst = true;
+
+ for (let i = 0; i < name.length; i++) {
+ let cp = name.charCodeAt(i);
+
+ if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {
+ const trail = name.charCodeAt(++i);
+
+ if ((trail & 0xfc00) === 0xdc00) {
+ cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
+ }
+ }
+
+ if (isFirst) {
+ isFirst = false;
+
+ if (!isIdentifierStart(cp)) {
+ return false;
+ }
+ } else if (!isIdentifierChar(cp)) {
+ return false;
+ }
+ }
+
+ return !isFirst;
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/lib/index.js b/node_modules/@babel/helper-validator-identifier/lib/index.js
new file mode 100644
index 0000000..ca9decf
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/lib/index.js
@@ -0,0 +1,57 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "isIdentifierChar", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierChar;
+ }
+});
+Object.defineProperty(exports, "isIdentifierName", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierName;
+ }
+});
+Object.defineProperty(exports, "isIdentifierStart", {
+ enumerable: true,
+ get: function () {
+ return _identifier.isIdentifierStart;
+ }
+});
+Object.defineProperty(exports, "isKeyword", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isKeyword;
+ }
+});
+Object.defineProperty(exports, "isReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictBindOnlyReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictBindOnlyReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictBindReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictBindReservedWord;
+ }
+});
+Object.defineProperty(exports, "isStrictReservedWord", {
+ enumerable: true,
+ get: function () {
+ return _keyword.isStrictReservedWord;
+ }
+});
+
+var _identifier = require("./identifier");
+
+var _keyword = require("./keyword"); \ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/lib/keyword.js b/node_modules/@babel/helper-validator-identifier/lib/keyword.js
new file mode 100644
index 0000000..0939e9a
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/lib/keyword.js
@@ -0,0 +1,38 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isKeyword = isKeyword;
+exports.isReservedWord = isReservedWord;
+exports.isStrictBindOnlyReservedWord = isStrictBindOnlyReservedWord;
+exports.isStrictBindReservedWord = isStrictBindReservedWord;
+exports.isStrictReservedWord = isStrictReservedWord;
+const reservedWords = {
+ keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
+ strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
+ strictBind: ["eval", "arguments"]
+};
+const keywords = new Set(reservedWords.keyword);
+const reservedWordsStrictSet = new Set(reservedWords.strict);
+const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
+
+function isReservedWord(word, inModule) {
+ return inModule && word === "await" || word === "enum";
+}
+
+function isStrictReservedWord(word, inModule) {
+ return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
+}
+
+function isStrictBindOnlyReservedWord(word) {
+ return reservedWordsStrictBindSet.has(word);
+}
+
+function isStrictBindReservedWord(word, inModule) {
+ return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
+}
+
+function isKeyword(word) {
+ return keywords.has(word);
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/package.json b/node_modules/@babel/helper-validator-identifier/package.json
new file mode 100644
index 0000000..972fdf1
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/package.json
@@ -0,0 +1,27 @@
+{
+ "name": "@babel/helper-validator-identifier",
+ "version": "7.16.7",
+ "description": "Validate identifier/keywords name",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-validator-identifier"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "exports": {
+ ".": "./lib/index.js",
+ "./package.json": "./package.json"
+ },
+ "devDependencies": {
+ "@unicode/unicode-14.0.0": "^1.2.1",
+ "charcodes": "^0.2.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)"
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js b/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js
new file mode 100644
index 0000000..f644d77
--- /dev/null
+++ b/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js
@@ -0,0 +1,75 @@
+"use strict";
+
+// Always use the latest available version of Unicode!
+// https://tc39.github.io/ecma262/#sec-conformance
+const version = "14.0.0";
+
+const start = require("@unicode/unicode-" +
+ version +
+ "/Binary_Property/ID_Start/code-points.js").filter(function (ch) {
+ return ch > 0x7f;
+});
+let last = -1;
+const cont = [0x200c, 0x200d].concat(
+ require("@unicode/unicode-" +
+ version +
+ "/Binary_Property/ID_Continue/code-points.js").filter(function (ch) {
+ return ch > 0x7f && search(start, ch, last + 1) == -1;
+ })
+);
+
+function search(arr, ch, starting) {
+ for (let i = starting; arr[i] <= ch && i < arr.length; last = i++) {
+ if (arr[i] === ch) return i;
+ }
+ return -1;
+}
+
+function pad(str, width) {
+ while (str.length < width) str = "0" + str;
+ return str;
+}
+
+function esc(code) {
+ const hex = code.toString(16);
+ if (hex.length <= 2) return "\\x" + pad(hex, 2);
+ else return "\\u" + pad(hex, 4);
+}
+
+function generate(chars) {
+ const astral = [];
+ let re = "";
+ for (let i = 0, at = 0x10000; i < chars.length; i++) {
+ const from = chars[i];
+ let to = from;
+ while (i < chars.length - 1 && chars[i + 1] == to + 1) {
+ i++;
+ to++;
+ }
+ if (to <= 0xffff) {
+ if (from == to) re += esc(from);
+ else if (from + 1 == to) re += esc(from) + esc(to);
+ else re += esc(from) + "-" + esc(to);
+ } else {
+ astral.push(from - at, to - from);
+ at = to;
+ }
+ }
+ return { nonASCII: re, astral: astral };
+}
+
+const startData = generate(start);
+const contData = generate(cont);
+
+console.log("/* prettier-ignore */");
+console.log('let nonASCIIidentifierStartChars = "' + startData.nonASCII + '";');
+console.log("/* prettier-ignore */");
+console.log('let nonASCIIidentifierChars = "' + contData.nonASCII + '";');
+console.log("/* prettier-ignore */");
+console.log(
+ "const astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";"
+);
+console.log("/* prettier-ignore */");
+console.log(
+ "const astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";"
+);
diff --git a/node_modules/@babel/helper-validator-option/LICENSE b/node_modules/@babel/helper-validator-option/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helper-validator-option/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helper-validator-option/README.md b/node_modules/@babel/helper-validator-option/README.md
new file mode 100644
index 0000000..94ab428
--- /dev/null
+++ b/node_modules/@babel/helper-validator-option/README.md
@@ -0,0 +1,19 @@
+# @babel/helper-validator-option
+
+> Validate plugin/preset options
+
+See our website [@babel/helper-validator-option](https://babeljs.io/docs/en/babel-helper-validator-option) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save @babel/helper-validator-option
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helper-validator-option
+```
diff --git a/node_modules/@babel/helper-validator-option/lib/find-suggestion.js b/node_modules/@babel/helper-validator-option/lib/find-suggestion.js
new file mode 100644
index 0000000..019ea93
--- /dev/null
+++ b/node_modules/@babel/helper-validator-option/lib/find-suggestion.js
@@ -0,0 +1,45 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.findSuggestion = findSuggestion;
+const {
+ min
+} = Math;
+
+function levenshtein(a, b) {
+ let t = [],
+ u = [],
+ i,
+ j;
+ const m = a.length,
+ n = b.length;
+
+ if (!m) {
+ return n;
+ }
+
+ if (!n) {
+ return m;
+ }
+
+ for (j = 0; j <= n; j++) {
+ t[j] = j;
+ }
+
+ for (i = 1; i <= m; i++) {
+ for (u = [i], j = 1; j <= n; j++) {
+ u[j] = a[i - 1] === b[j - 1] ? t[j - 1] : min(t[j - 1], t[j], u[j - 1]) + 1;
+ }
+
+ t = u;
+ }
+
+ return u[n];
+}
+
+function findSuggestion(str, arr) {
+ const distances = arr.map(el => levenshtein(el, str));
+ return arr[distances.indexOf(min(...distances))];
+} \ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-option/lib/index.js b/node_modules/@babel/helper-validator-option/lib/index.js
new file mode 100644
index 0000000..8afe861
--- /dev/null
+++ b/node_modules/@babel/helper-validator-option/lib/index.js
@@ -0,0 +1,21 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "OptionValidator", {
+ enumerable: true,
+ get: function () {
+ return _validator.OptionValidator;
+ }
+});
+Object.defineProperty(exports, "findSuggestion", {
+ enumerable: true,
+ get: function () {
+ return _findSuggestion.findSuggestion;
+ }
+});
+
+var _validator = require("./validator");
+
+var _findSuggestion = require("./find-suggestion"); \ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-option/lib/validator.js b/node_modules/@babel/helper-validator-option/lib/validator.js
new file mode 100644
index 0000000..5b4bad1
--- /dev/null
+++ b/node_modules/@babel/helper-validator-option/lib/validator.js
@@ -0,0 +1,58 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.OptionValidator = void 0;
+
+var _findSuggestion = require("./find-suggestion");
+
+class OptionValidator {
+ constructor(descriptor) {
+ this.descriptor = descriptor;
+ }
+
+ validateTopLevelOptions(options, TopLevelOptionShape) {
+ const validOptionNames = Object.keys(TopLevelOptionShape);
+
+ for (const option of Object.keys(options)) {
+ if (!validOptionNames.includes(option)) {
+ throw new Error(this.formatMessage(`'${option}' is not a valid top-level option.
+- Did you mean '${(0, _findSuggestion.findSuggestion)(option, validOptionNames)}'?`));
+ }
+ }
+ }
+
+ validateBooleanOption(name, value, defaultValue) {
+ if (value === undefined) {
+ return defaultValue;
+ } else {
+ this.invariant(typeof value === "boolean", `'${name}' option must be a boolean.`);
+ }
+
+ return value;
+ }
+
+ validateStringOption(name, value, defaultValue) {
+ if (value === undefined) {
+ return defaultValue;
+ } else {
+ this.invariant(typeof value === "string", `'${name}' option must be a string.`);
+ }
+
+ return value;
+ }
+
+ invariant(condition, message) {
+ if (!condition) {
+ throw new Error(this.formatMessage(message));
+ }
+ }
+
+ formatMessage(message) {
+ return `${this.descriptor}: ${message}`;
+ }
+
+}
+
+exports.OptionValidator = OptionValidator; \ No newline at end of file
diff --git a/node_modules/@babel/helper-validator-option/package.json b/node_modules/@babel/helper-validator-option/package.json
new file mode 100644
index 0000000..1fe2da8
--- /dev/null
+++ b/node_modules/@babel/helper-validator-option/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/helper-validator-option",
+ "version": "7.16.7",
+ "description": "Validate plugin/preset options",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helper-validator-option"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "exports": {
+ ".": "./lib/index.js",
+ "./package.json": "./package.json"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)"
+} \ No newline at end of file
diff --git a/node_modules/@babel/helpers/LICENSE b/node_modules/@babel/helpers/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/helpers/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/helpers/README.md b/node_modules/@babel/helpers/README.md
new file mode 100644
index 0000000..3b79dbf
--- /dev/null
+++ b/node_modules/@babel/helpers/README.md
@@ -0,0 +1,19 @@
+# @babel/helpers
+
+> Collection of helper functions used by Babel transforms.
+
+See our website [@babel/helpers](https://babeljs.io/docs/en/babel-helpers) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/helpers
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/helpers --dev
+```
diff --git a/node_modules/@babel/helpers/lib/helpers-generated.js b/node_modules/@babel/helpers/lib/helpers-generated.js
new file mode 100644
index 0000000..9ef543e
--- /dev/null
+++ b/node_modules/@babel/helpers/lib/helpers-generated.js
@@ -0,0 +1,26 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _template = require("@babel/template");
+
+function helper(minVersion, source) {
+ return Object.freeze({
+ minVersion,
+ ast: () => _template.default.program.ast(source)
+ });
+}
+
+var _default = Object.freeze({
+ applyDecs: helper("7.17.0", 'function createMetadataMethodsForProperty(metadataMap,kind,property){return{getMetadata:function(key){if("symbol"!=typeof key)throw new TypeError("Metadata keys must be symbols, received: "+key);var metadataForKey=metadataMap[key];if(void 0!==metadataForKey)if(1===kind){var pub=metadataForKey.public;if(void 0!==pub)return pub[property]}else if(2===kind){var priv=metadataForKey.private;if(void 0!==priv)return priv.get(property)}else if(Object.hasOwnProperty.call(metadataForKey,"constructor"))return metadataForKey.constructor},setMetadata:function(key,value){if("symbol"!=typeof key)throw new TypeError("Metadata keys must be symbols, received: "+key);var metadataForKey=metadataMap[key];if(void 0===metadataForKey&&(metadataForKey=metadataMap[key]={}),1===kind){var pub=metadataForKey.public;void 0===pub&&(pub=metadataForKey.public={}),pub[property]=value}else if(2===kind){var priv=metadataForKey.priv;void 0===priv&&(priv=metadataForKey.private=new Map),priv.set(property,value)}else metadataForKey.constructor=value}}}function convertMetadataMapToFinal(obj,metadataMap){var parentMetadataMap=obj[Symbol.metadata||Symbol.for("Symbol.metadata")],metadataKeys=Object.getOwnPropertySymbols(metadataMap);if(0!==metadataKeys.length){for(var i=0;i<metadataKeys.length;i++){var key=metadataKeys[i],metaForKey=metadataMap[key],parentMetaForKey=parentMetadataMap?parentMetadataMap[key]:null,pub=metaForKey.public,parentPub=parentMetaForKey?parentMetaForKey.public:null;pub&&parentPub&&Object.setPrototypeOf(pub,parentPub);var priv=metaForKey.private;if(priv){var privArr=Array.from(priv.values()),parentPriv=parentMetaForKey?parentMetaForKey.private:null;parentPriv&&(privArr=privArr.concat(parentPriv)),metaForKey.private=privArr}parentMetaForKey&&Object.setPrototypeOf(metaForKey,parentMetaForKey)}parentMetadataMap&&Object.setPrototypeOf(metadataMap,parentMetadataMap),obj[Symbol.metadata||Symbol.for("Symbol.metadata")]=metadataMap}}function createAddInitializerMethod(initializers){return function(initializer){assertValidInitializer(initializer),initializers.push(initializer)}}function memberDecCtx(base,name,desc,metadataMap,initializers,kind,isStatic,isPrivate){var kindStr;switch(kind){case 1:kindStr="accessor";break;case 2:kindStr="method";break;case 3:kindStr="getter";break;case 4:kindStr="setter";break;default:kindStr="field"}var metadataKind,metadataName,ctx={kind:kindStr,name:isPrivate?"#"+name:name,isStatic:isStatic,isPrivate:isPrivate};if(0!==kind&&(ctx.addInitializer=createAddInitializerMethod(initializers)),isPrivate){metadataKind=2,metadataName=Symbol(name);var access={};0===kind?(access.get=desc.get,access.set=desc.set):2===kind?access.get=function(){return desc.value}:(1!==kind&&3!==kind||(access.get=function(){return desc.get.call(this)}),1!==kind&&4!==kind||(access.set=function(v){desc.set.call(this,v)})),ctx.access=access}else metadataKind=1,metadataName=name;return Object.assign(ctx,createMetadataMethodsForProperty(metadataMap,metadataKind,metadataName))}function assertValidInitializer(initializer){if("function"!=typeof initializer)throw new Error("initializers must be functions")}function assertValidReturnValue(kind,value){var type=typeof value;if(1===kind){if("object"!==type||null===value)throw new Error("accessor decorators must return an object with get, set, or initializer properties or void 0")}else if("function"!==type)throw 0===kind?new Error("field decorators must return a initializer function or void 0"):new Error("method decorators must return a function or void 0")}function applyMemberDec(ret,base,decInfo,name,kind,isStatic,isPrivate,metadataMap,initializers){var desc,initializer,value,decs=decInfo[0];isPrivate?desc=0===kind||1===kind?{get:decInfo[3],set:decInfo[4]}:3===kind?{get:decInfo[3]}:4===kind?{set:decInfo[3]}:{value:decInfo[3]}:0!==kind&&(desc=Object.getOwnPropertyDescriptor(base,name)),1===kind?value={get:desc.get,set:desc.set}:2===kind?value=desc.value:3===kind?value=desc.get:4===kind&&(value=desc.set);var newValue,get,set,ctx=memberDecCtx(base,name,desc,metadataMap,initializers,kind,isStatic,isPrivate);if("function"==typeof decs)void 0!==(newValue=decs(value,ctx))&&(assertValidReturnValue(kind,newValue),0===kind?initializer=newValue:1===kind?(initializer=newValue.initializer,get=newValue.get||value.get,set=newValue.set||value.set,value={get:get,set:set}):value=newValue);else for(var i=decs.length-1;i>=0;i--){var newInit;if(void 0!==(newValue=(0,decs[i])(value,ctx)))assertValidReturnValue(kind,newValue),0===kind?newInit=newValue:1===kind?(newInit=newValue.initializer,get=newValue.get||value.get,set=newValue.set||value.set,value={get:get,set:set}):value=newValue,void 0!==newInit&&(void 0===initializer?initializer=newInit:"function"==typeof initializer?initializer=[initializer,newInit]:initializer.push(newInit))}if(0===kind||1===kind){if(void 0===initializer)initializer=function(instance,init){return init};else if("function"!=typeof initializer){var ownInitializers=initializer;initializer=function(instance,init){for(var value=init,i=0;i<ownInitializers.length;i++)value=ownInitializers[i].call(instance,value);return value}}else{var originalInitializer=initializer;initializer=function(instance,init){return originalInitializer.call(instance,init)}}ret.push(initializer)}0!==kind&&(1===kind?(desc.get=value.get,desc.set=value.set):2===kind?desc.value=value:3===kind?desc.get=value:4===kind&&(desc.set=value),isPrivate?1===kind?(ret.push((function(instance,args){return value.get.call(instance,args)})),ret.push((function(instance,args){return value.set.call(instance,args)}))):2===kind?ret.push(value):ret.push((function(instance,args){return value.call(instance,args)})):Object.defineProperty(base,name,desc))}function applyMemberDecs(ret,Class,protoMetadataMap,staticMetadataMap,decInfos){for(var protoInitializers=[],staticInitializers=[],existingProtoNonFields=new Map,existingStaticNonFields=new Map,i=0;i<decInfos.length;i++){var decInfo=decInfos[i];if(Array.isArray(decInfo)){var base,metadataMap,initializers,kind=decInfo[1],name=decInfo[2],isPrivate=decInfo.length>3,isStatic=kind>=5;if(isStatic?(base=Class,metadataMap=staticMetadataMap,kind-=5,initializers=staticInitializers):(base=Class.prototype,metadataMap=protoMetadataMap,initializers=protoInitializers),0!==kind&&!isPrivate){var existingNonFields=isStatic?existingStaticNonFields:existingProtoNonFields,existingKind=existingNonFields.get(name)||0;if(!0===existingKind||3===existingKind&&4!==kind||4===existingKind&&3!==kind)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+name);!existingKind&&kind>2?existingNonFields.set(name,kind):existingNonFields.set(name,!0)}applyMemberDec(ret,base,decInfo,name,kind,isStatic,isPrivate,metadataMap,initializers)}}protoInitializers.length>0&&pushInitializers(ret,protoInitializers),staticInitializers.length>0&&pushInitializers(ret,staticInitializers)}function pushInitializers(ret,initializers){initializers.length>0?(initializers=initializers.slice(),ret.push((function(instance){for(var i=0;i<initializers.length;i++)initializers[i].call(instance,instance);return instance}))):ret.push((function(instance){return instance}))}function applyClassDecs(ret,targetClass,metadataMap,classDecs){for(var initializers=[],newClass=targetClass,name=targetClass.name,ctx=Object.assign({kind:"class",name:name,addInitializer:createAddInitializerMethod(initializers)},createMetadataMethodsForProperty(metadataMap,0,name)),i=classDecs.length-1;i>=0;i--)newClass=classDecs[i](newClass,ctx)||newClass;ret.push(newClass),initializers.length>0?ret.push((function(){for(var i=0;i<initializers.length;i++)initializers[i].call(newClass,newClass)})):ret.push((function(){}))}export default function applyDecs(targetClass,memberDecs,classDecs){var ret=[],staticMetadataMap={};if(memberDecs){var protoMetadataMap={};applyMemberDecs(ret,targetClass,protoMetadataMap,staticMetadataMap,memberDecs),convertMetadataMapToFinal(targetClass.prototype,protoMetadataMap)}return classDecs&&applyClassDecs(ret,targetClass,staticMetadataMap,classDecs),convertMetadataMapToFinal(targetClass,staticMetadataMap),ret}'),
+ asyncIterator: helper("7.15.9", 'export default function _asyncIterator(iterable){var method,async,sync,retry=2;for("undefined"!=typeof Symbol&&(async=Symbol.asyncIterator,sync=Symbol.iterator);retry--;){if(async&&null!=(method=iterable[async]))return method.call(iterable);if(sync&&null!=(method=iterable[sync]))return new AsyncFromSyncIterator(method.call(iterable));async="@@asyncIterator",sync="@@iterator"}throw new TypeError("Object is not async iterable")}function AsyncFromSyncIterator(s){function AsyncFromSyncIteratorContinuation(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var done=r.done;return Promise.resolve(r.value).then((function(value){return{value:value,done:done}}))}return AsyncFromSyncIterator=function(s){this.s=s,this.n=s.next},AsyncFromSyncIterator.prototype={s:null,n:null,next:function(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments))},return:function(value){var ret=this.s.return;return void 0===ret?Promise.resolve({value:value,done:!0}):AsyncFromSyncIteratorContinuation(ret.apply(this.s,arguments))},throw:function(value){var thr=this.s.return;return void 0===thr?Promise.reject(value):AsyncFromSyncIteratorContinuation(thr.apply(this.s,arguments))}},new AsyncFromSyncIterator(s)}'),
+ jsx: helper("7.0.0-beta.0", 'var REACT_ELEMENT_TYPE;export default function _createRawReactElement(type,props,key,children){REACT_ELEMENT_TYPE||(REACT_ELEMENT_TYPE="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var defaultProps=type&&type.defaultProps,childrenLength=arguments.length-3;if(props||0===childrenLength||(props={children:void 0}),1===childrenLength)props.children=children;else if(childrenLength>1){for(var childArray=new Array(childrenLength),i=0;i<childrenLength;i++)childArray[i]=arguments[i+3];props.children=childArray}if(props&&defaultProps)for(var propName in defaultProps)void 0===props[propName]&&(props[propName]=defaultProps[propName]);else props||(props=defaultProps||{});return{$$typeof:REACT_ELEMENT_TYPE,type:type,key:void 0===key?null:""+key,ref:null,props:props,_owner:null}}'),
+ objectSpread2: helper("7.5.0", 'import defineProperty from"defineProperty";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter((function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable}))),keys.push.apply(keys,symbols)}return keys}export default function _objectSpread2(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach((function(key){defineProperty(target,key,source[key])})):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach((function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))}))}return target}'),
+ typeof: helper("7.0.0-beta.0", 'export default function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}'),
+ wrapRegExp: helper("7.2.6", 'import setPrototypeOf from"setPrototypeOf";import inherits from"inherits";export default function _wrapRegExp(){_wrapRegExp=function(re,groups){return new BabelRegExp(re,void 0,groups)};var _super=RegExp.prototype,_groups=new WeakMap;function BabelRegExp(re,flags,groups){var _this=new RegExp(re,flags);return _groups.set(_this,groups||_groups.get(re)),setPrototypeOf(_this,BabelRegExp.prototype)}function buildGroups(result,re){var g=_groups.get(re);return Object.keys(g).reduce((function(groups,name){return groups[name]=result[g[name]],groups}),Object.create(null))}return inherits(BabelRegExp,RegExp),BabelRegExp.prototype.exec=function(str){var result=_super.exec.call(this,str);return result&&(result.groups=buildGroups(result,this)),result},BabelRegExp.prototype[Symbol.replace]=function(str,substitution){if("string"==typeof substitution){var groups=_groups.get(this);return _super[Symbol.replace].call(this,str,substitution.replace(/\\$<([^>]+)>/g,(function(_,name){return"$"+groups[name]})))}if("function"==typeof substitution){var _this=this;return _super[Symbol.replace].call(this,str,(function(){var args=arguments;return"object"!=typeof args[args.length-1]&&(args=[].slice.call(args)).push(buildGroups(args,_this)),substitution.apply(this,args)}))}return _super[Symbol.replace].call(this,str,substitution)},_wrapRegExp.apply(this,arguments)}')
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/helpers/lib/helpers.js b/node_modules/@babel/helpers/lib/helpers.js
new file mode 100644
index 0000000..3b8eea2
--- /dev/null
+++ b/node_modules/@babel/helpers/lib/helpers.js
@@ -0,0 +1,1959 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _template = require("@babel/template");
+
+var _helpersGenerated = require("./helpers-generated");
+
+const helpers = Object.assign({
+ __proto__: null
+}, _helpersGenerated.default);
+var _default = helpers;
+exports.default = _default;
+
+const helper = minVersion => tpl => ({
+ minVersion,
+ ast: () => _template.default.program.ast(tpl)
+});
+
+helpers.AwaitValue = helper("7.0.0-beta.0")`
+ export default function _AwaitValue(value) {
+ this.wrapped = value;
+ }
+`;
+helpers.AsyncGenerator = helper("7.0.0-beta.0")`
+ import AwaitValue from "AwaitValue";
+
+ export default function AsyncGenerator(gen) {
+ var front, back;
+
+ function send(key, arg) {
+ return new Promise(function (resolve, reject) {
+ var request = {
+ key: key,
+ arg: arg,
+ resolve: resolve,
+ reject: reject,
+ next: null,
+ };
+
+ if (back) {
+ back = back.next = request;
+ } else {
+ front = back = request;
+ resume(key, arg);
+ }
+ });
+ }
+
+ function resume(key, arg) {
+ try {
+ var result = gen[key](arg)
+ var value = result.value;
+ var wrappedAwait = value instanceof AwaitValue;
+
+ Promise.resolve(wrappedAwait ? value.wrapped : value).then(
+ function (arg) {
+ if (wrappedAwait) {
+ resume(key === "return" ? "return" : "next", arg);
+ return
+ }
+
+ settle(result.done ? "return" : "normal", arg);
+ },
+ function (err) { resume("throw", err); });
+ } catch (err) {
+ settle("throw", err);
+ }
+ }
+
+ function settle(type, value) {
+ switch (type) {
+ case "return":
+ front.resolve({ value: value, done: true });
+ break;
+ case "throw":
+ front.reject(value);
+ break;
+ default:
+ front.resolve({ value: value, done: false });
+ break;
+ }
+
+ front = front.next;
+ if (front) {
+ resume(front.key, front.arg);
+ } else {
+ back = null;
+ }
+ }
+
+ this._invoke = send;
+
+ // Hide "return" method if generator return is not supported
+ if (typeof gen.return !== "function") {
+ this.return = undefined;
+ }
+ }
+
+ AsyncGenerator.prototype[typeof Symbol === "function" && Symbol.asyncIterator || "@@asyncIterator"] = function () { return this; };
+
+ AsyncGenerator.prototype.next = function (arg) { return this._invoke("next", arg); };
+ AsyncGenerator.prototype.throw = function (arg) { return this._invoke("throw", arg); };
+ AsyncGenerator.prototype.return = function (arg) { return this._invoke("return", arg); };
+`;
+helpers.wrapAsyncGenerator = helper("7.0.0-beta.0")`
+ import AsyncGenerator from "AsyncGenerator";
+
+ export default function _wrapAsyncGenerator(fn) {
+ return function () {
+ return new AsyncGenerator(fn.apply(this, arguments));
+ };
+ }
+`;
+helpers.awaitAsyncGenerator = helper("7.0.0-beta.0")`
+ import AwaitValue from "AwaitValue";
+
+ export default function _awaitAsyncGenerator(value) {
+ return new AwaitValue(value);
+ }
+`;
+helpers.asyncGeneratorDelegate = helper("7.0.0-beta.0")`
+ export default function _asyncGeneratorDelegate(inner, awaitWrap) {
+ var iter = {}, waiting = false;
+
+ function pump(key, value) {
+ waiting = true;
+ value = new Promise(function (resolve) { resolve(inner[key](value)); });
+ return { done: false, value: awaitWrap(value) };
+ };
+
+ iter[typeof Symbol !== "undefined" && Symbol.iterator || "@@iterator"] = function () { return this; };
+
+ iter.next = function (value) {
+ if (waiting) {
+ waiting = false;
+ return value;
+ }
+ return pump("next", value);
+ };
+
+ if (typeof inner.throw === "function") {
+ iter.throw = function (value) {
+ if (waiting) {
+ waiting = false;
+ throw value;
+ }
+ return pump("throw", value);
+ };
+ }
+
+ if (typeof inner.return === "function") {
+ iter.return = function (value) {
+ if (waiting) {
+ waiting = false;
+ return value;
+ }
+ return pump("return", value);
+ };
+ }
+
+ return iter;
+ }
+`;
+helpers.asyncToGenerator = helper("7.0.0-beta.0")`
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
+ try {
+ var info = gen[key](arg);
+ var value = info.value;
+ } catch (error) {
+ reject(error);
+ return;
+ }
+
+ if (info.done) {
+ resolve(value);
+ } else {
+ Promise.resolve(value).then(_next, _throw);
+ }
+ }
+
+ export default function _asyncToGenerator(fn) {
+ return function () {
+ var self = this, args = arguments;
+ return new Promise(function (resolve, reject) {
+ var gen = fn.apply(self, args);
+ function _next(value) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
+ }
+ function _throw(err) {
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
+ }
+
+ _next(undefined);
+ });
+ };
+ }
+`;
+helpers.classCallCheck = helper("7.0.0-beta.0")`
+ export default function _classCallCheck(instance, Constructor) {
+ if (!(instance instanceof Constructor)) {
+ throw new TypeError("Cannot call a class as a function");
+ }
+ }
+`;
+helpers.createClass = helper("7.0.0-beta.0")`
+ function _defineProperties(target, props) {
+ for (var i = 0; i < props.length; i ++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ Object.defineProperty(target, descriptor.key, descriptor);
+ }
+ }
+
+ export default function _createClass(Constructor, protoProps, staticProps) {
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) _defineProperties(Constructor, staticProps);
+ Object.defineProperty(Constructor, "prototype", { writable: false });
+ return Constructor;
+ }
+`;
+helpers.defineEnumerableProperties = helper("7.0.0-beta.0")`
+ export default function _defineEnumerableProperties(obj, descs) {
+ for (var key in descs) {
+ var desc = descs[key];
+ desc.configurable = desc.enumerable = true;
+ if ("value" in desc) desc.writable = true;
+ Object.defineProperty(obj, key, desc);
+ }
+
+ // Symbols are not enumerated over by for-in loops. If native
+ // Symbols are available, fetch all of the descs object's own
+ // symbol properties and define them on our target object too.
+ if (Object.getOwnPropertySymbols) {
+ var objectSymbols = Object.getOwnPropertySymbols(descs);
+ for (var i = 0; i < objectSymbols.length; i++) {
+ var sym = objectSymbols[i];
+ var desc = descs[sym];
+ desc.configurable = desc.enumerable = true;
+ if ("value" in desc) desc.writable = true;
+ Object.defineProperty(obj, sym, desc);
+ }
+ }
+ return obj;
+ }
+`;
+helpers.defaults = helper("7.0.0-beta.0")`
+ export default function _defaults(obj, defaults) {
+ var keys = Object.getOwnPropertyNames(defaults);
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ var value = Object.getOwnPropertyDescriptor(defaults, key);
+ if (value && value.configurable && obj[key] === undefined) {
+ Object.defineProperty(obj, key, value);
+ }
+ }
+ return obj;
+ }
+`;
+helpers.defineProperty = helper("7.0.0-beta.0")`
+ export default function _defineProperty(obj, key, value) {
+ // Shortcircuit the slow defineProperty path when possible.
+ // We are trying to avoid issues where setters defined on the
+ // prototype cause side effects under the fast path of simple
+ // assignment. By checking for existence of the property with
+ // the in operator, we can optimize most of this overhead away.
+ if (key in obj) {
+ Object.defineProperty(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+ return obj;
+ }
+`;
+helpers.extends = helper("7.0.0-beta.0")`
+ export default function _extends() {
+ _extends = Object.assign || function (target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i];
+ for (var key in source) {
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
+ target[key] = source[key];
+ }
+ }
+ }
+ return target;
+ };
+
+ return _extends.apply(this, arguments);
+ }
+`;
+helpers.objectSpread = helper("7.0.0-beta.0")`
+ import defineProperty from "defineProperty";
+
+ export default function _objectSpread(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = (arguments[i] != null) ? Object(arguments[i]) : {};
+ var ownKeys = Object.keys(source);
+ if (typeof Object.getOwnPropertySymbols === 'function') {
+ ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function(sym) {
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
+ }));
+ }
+ ownKeys.forEach(function(key) {
+ defineProperty(target, key, source[key]);
+ });
+ }
+ return target;
+ }
+`;
+helpers.inherits = helper("7.0.0-beta.0")`
+ import setPrototypeOf from "setPrototypeOf";
+
+ export default function _inherits(subClass, superClass) {
+ if (typeof superClass !== "function" && superClass !== null) {
+ throw new TypeError("Super expression must either be null or a function");
+ }
+ // We can't use defineProperty to set the prototype in a single step because it
+ // doesn't work in Chrome <= 36. https://github.com/babel/babel/issues/14056
+ // V8 bug: https://bugs.chromium.org/p/v8/issues/detail?id=3334
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
+ constructor: {
+ value: subClass,
+ writable: true,
+ configurable: true
+ }
+ });
+ Object.defineProperty(subClass, "prototype", { writable: false });
+ if (superClass) setPrototypeOf(subClass, superClass);
+ }
+`;
+helpers.inheritsLoose = helper("7.0.0-beta.0")`
+ import setPrototypeOf from "setPrototypeOf";
+
+ export default function _inheritsLoose(subClass, superClass) {
+ subClass.prototype = Object.create(superClass.prototype);
+ subClass.prototype.constructor = subClass;
+ setPrototypeOf(subClass, superClass);
+ }
+`;
+helpers.getPrototypeOf = helper("7.0.0-beta.0")`
+ export default function _getPrototypeOf(o) {
+ _getPrototypeOf = Object.setPrototypeOf
+ ? Object.getPrototypeOf
+ : function _getPrototypeOf(o) {
+ return o.__proto__ || Object.getPrototypeOf(o);
+ };
+ return _getPrototypeOf(o);
+ }
+`;
+helpers.setPrototypeOf = helper("7.0.0-beta.0")`
+ export default function _setPrototypeOf(o, p) {
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
+ o.__proto__ = p;
+ return o;
+ };
+ return _setPrototypeOf(o, p);
+ }
+`;
+helpers.isNativeReflectConstruct = helper("7.9.0")`
+ export default function _isNativeReflectConstruct() {
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
+
+ // core-js@3
+ if (Reflect.construct.sham) return false;
+
+ // Proxy can't be polyfilled. Every browser implemented
+ // proxies before or at the same time as Reflect.construct,
+ // so if they support Proxy they also support Reflect.construct.
+ if (typeof Proxy === "function") return true;
+
+ // Since Reflect.construct can't be properly polyfilled, some
+ // implementations (e.g. core-js@2) don't set the correct internal slots.
+ // Those polyfills don't allow us to subclass built-ins, so we need to
+ // use our fallback implementation.
+ try {
+ // If the internal slots aren't set, this throws an error similar to
+ // TypeError: this is not a Boolean object.
+
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
+ return true;
+ } catch (e) {
+ return false;
+ }
+ }
+`;
+helpers.construct = helper("7.0.0-beta.0")`
+ import setPrototypeOf from "setPrototypeOf";
+ import isNativeReflectConstruct from "isNativeReflectConstruct";
+
+ export default function _construct(Parent, args, Class) {
+ if (isNativeReflectConstruct()) {
+ _construct = Reflect.construct;
+ } else {
+ // NOTE: If Parent !== Class, the correct __proto__ is set *after*
+ // calling the constructor.
+ _construct = function _construct(Parent, args, Class) {
+ var a = [null];
+ a.push.apply(a, args);
+ var Constructor = Function.bind.apply(Parent, a);
+ var instance = new Constructor();
+ if (Class) setPrototypeOf(instance, Class.prototype);
+ return instance;
+ };
+ }
+ // Avoid issues with Class being present but undefined when it wasn't
+ // present in the original call.
+ return _construct.apply(null, arguments);
+ }
+`;
+helpers.isNativeFunction = helper("7.0.0-beta.0")`
+ export default function _isNativeFunction(fn) {
+ // Note: This function returns "true" for core-js functions.
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
+ }
+`;
+helpers.wrapNativeSuper = helper("7.0.0-beta.0")`
+ import getPrototypeOf from "getPrototypeOf";
+ import setPrototypeOf from "setPrototypeOf";
+ import isNativeFunction from "isNativeFunction";
+ import construct from "construct";
+
+ export default function _wrapNativeSuper(Class) {
+ var _cache = typeof Map === "function" ? new Map() : undefined;
+
+ _wrapNativeSuper = function _wrapNativeSuper(Class) {
+ if (Class === null || !isNativeFunction(Class)) return Class;
+ if (typeof Class !== "function") {
+ throw new TypeError("Super expression must either be null or a function");
+ }
+ if (typeof _cache !== "undefined") {
+ if (_cache.has(Class)) return _cache.get(Class);
+ _cache.set(Class, Wrapper);
+ }
+ function Wrapper() {
+ return construct(Class, arguments, getPrototypeOf(this).constructor)
+ }
+ Wrapper.prototype = Object.create(Class.prototype, {
+ constructor: {
+ value: Wrapper,
+ enumerable: false,
+ writable: true,
+ configurable: true,
+ }
+ });
+
+ return setPrototypeOf(Wrapper, Class);
+ }
+
+ return _wrapNativeSuper(Class)
+ }
+`;
+helpers.instanceof = helper("7.0.0-beta.0")`
+ export default function _instanceof(left, right) {
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
+ return !!right[Symbol.hasInstance](left);
+ } else {
+ return left instanceof right;
+ }
+ }
+`;
+helpers.interopRequireDefault = helper("7.0.0-beta.0")`
+ export default function _interopRequireDefault(obj) {
+ return obj && obj.__esModule ? obj : { default: obj };
+ }
+`;
+helpers.interopRequireWildcard = helper("7.14.0")`
+ function _getRequireWildcardCache(nodeInterop) {
+ if (typeof WeakMap !== "function") return null;
+
+ var cacheBabelInterop = new WeakMap();
+ var cacheNodeInterop = new WeakMap();
+ return (_getRequireWildcardCache = function (nodeInterop) {
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
+ })(nodeInterop);
+ }
+
+ export default function _interopRequireWildcard(obj, nodeInterop) {
+ if (!nodeInterop && obj && obj.__esModule) {
+ return obj;
+ }
+
+ if (obj === null || (typeof obj !== "object" && typeof obj !== "function")) {
+ return { default: obj }
+ }
+
+ var cache = _getRequireWildcardCache(nodeInterop);
+ if (cache && cache.has(obj)) {
+ return cache.get(obj);
+ }
+
+ var newObj = {};
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
+ for (var key in obj) {
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
+ var desc = hasPropertyDescriptor
+ ? Object.getOwnPropertyDescriptor(obj, key)
+ : null;
+ if (desc && (desc.get || desc.set)) {
+ Object.defineProperty(newObj, key, desc);
+ } else {
+ newObj[key] = obj[key];
+ }
+ }
+ }
+ newObj.default = obj;
+ if (cache) {
+ cache.set(obj, newObj);
+ }
+ return newObj;
+ }
+`;
+helpers.newArrowCheck = helper("7.0.0-beta.0")`
+ export default function _newArrowCheck(innerThis, boundThis) {
+ if (innerThis !== boundThis) {
+ throw new TypeError("Cannot instantiate an arrow function");
+ }
+ }
+`;
+helpers.objectDestructuringEmpty = helper("7.0.0-beta.0")`
+ export default function _objectDestructuringEmpty(obj) {
+ if (obj == null) throw new TypeError("Cannot destructure undefined");
+ }
+`;
+helpers.objectWithoutPropertiesLoose = helper("7.0.0-beta.0")`
+ export default function _objectWithoutPropertiesLoose(source, excluded) {
+ if (source == null) return {};
+
+ var target = {};
+ var sourceKeys = Object.keys(source);
+ var key, i;
+
+ for (i = 0; i < sourceKeys.length; i++) {
+ key = sourceKeys[i];
+ if (excluded.indexOf(key) >= 0) continue;
+ target[key] = source[key];
+ }
+
+ return target;
+ }
+`;
+helpers.objectWithoutProperties = helper("7.0.0-beta.0")`
+ import objectWithoutPropertiesLoose from "objectWithoutPropertiesLoose";
+
+ export default function _objectWithoutProperties(source, excluded) {
+ if (source == null) return {};
+
+ var target = objectWithoutPropertiesLoose(source, excluded);
+ var key, i;
+
+ if (Object.getOwnPropertySymbols) {
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
+ key = sourceSymbolKeys[i];
+ if (excluded.indexOf(key) >= 0) continue;
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
+ target[key] = source[key];
+ }
+ }
+
+ return target;
+ }
+`;
+helpers.assertThisInitialized = helper("7.0.0-beta.0")`
+ export default function _assertThisInitialized(self) {
+ if (self === void 0) {
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
+ }
+ return self;
+ }
+`;
+helpers.possibleConstructorReturn = helper("7.0.0-beta.0")`
+ import assertThisInitialized from "assertThisInitialized";
+
+ export default function _possibleConstructorReturn(self, call) {
+ if (call && (typeof call === "object" || typeof call === "function")) {
+ return call;
+ } else if (call !== void 0) {
+ throw new TypeError("Derived constructors may only return object or undefined");
+ }
+
+ return assertThisInitialized(self);
+ }
+`;
+helpers.createSuper = helper("7.9.0")`
+ import getPrototypeOf from "getPrototypeOf";
+ import isNativeReflectConstruct from "isNativeReflectConstruct";
+ import possibleConstructorReturn from "possibleConstructorReturn";
+
+ export default function _createSuper(Derived) {
+ var hasNativeReflectConstruct = isNativeReflectConstruct();
+
+ return function _createSuperInternal() {
+ var Super = getPrototypeOf(Derived), result;
+ if (hasNativeReflectConstruct) {
+ // NOTE: This doesn't work if this.__proto__.constructor has been modified.
+ var NewTarget = getPrototypeOf(this).constructor;
+ result = Reflect.construct(Super, arguments, NewTarget);
+ } else {
+ result = Super.apply(this, arguments);
+ }
+ return possibleConstructorReturn(this, result);
+ }
+ }
+ `;
+helpers.superPropBase = helper("7.0.0-beta.0")`
+ import getPrototypeOf from "getPrototypeOf";
+
+ export default function _superPropBase(object, property) {
+ // Yes, this throws if object is null to being with, that's on purpose.
+ while (!Object.prototype.hasOwnProperty.call(object, property)) {
+ object = getPrototypeOf(object);
+ if (object === null) break;
+ }
+ return object;
+ }
+`;
+helpers.get = helper("7.0.0-beta.0")`
+ import superPropBase from "superPropBase";
+
+ export default function _get() {
+ if (typeof Reflect !== "undefined" && Reflect.get) {
+ _get = Reflect.get;
+ } else {
+ _get = function _get(target, property, receiver) {
+ var base = superPropBase(target, property);
+
+ if (!base) return;
+
+ var desc = Object.getOwnPropertyDescriptor(base, property);
+ if (desc.get) {
+ // STEP 3. If receiver is not present, then set receiver to target.
+ return desc.get.call(arguments.length < 3 ? target : receiver);
+ }
+
+ return desc.value;
+ };
+ }
+ return _get.apply(this, arguments);
+ }
+`;
+helpers.set = helper("7.0.0-beta.0")`
+ import superPropBase from "superPropBase";
+ import defineProperty from "defineProperty";
+
+ function set(target, property, value, receiver) {
+ if (typeof Reflect !== "undefined" && Reflect.set) {
+ set = Reflect.set;
+ } else {
+ set = function set(target, property, value, receiver) {
+ var base = superPropBase(target, property);
+ var desc;
+
+ if (base) {
+ desc = Object.getOwnPropertyDescriptor(base, property);
+ if (desc.set) {
+ desc.set.call(receiver, value);
+ return true;
+ } else if (!desc.writable) {
+ // Both getter and non-writable fall into this.
+ return false;
+ }
+ }
+
+ // Without a super that defines the property, spec boils down to
+ // "define on receiver" for some reason.
+ desc = Object.getOwnPropertyDescriptor(receiver, property);
+ if (desc) {
+ if (!desc.writable) {
+ // Setter, getter, and non-writable fall into this.
+ return false;
+ }
+
+ desc.value = value;
+ Object.defineProperty(receiver, property, desc);
+ } else {
+ // Avoid setters that may be defined on Sub's prototype, but not on
+ // the instance.
+ defineProperty(receiver, property, value);
+ }
+
+ return true;
+ };
+ }
+
+ return set(target, property, value, receiver);
+ }
+
+ export default function _set(target, property, value, receiver, isStrict) {
+ var s = set(target, property, value, receiver || target);
+ if (!s && isStrict) {
+ throw new Error('failed to set property');
+ }
+
+ return value;
+ }
+`;
+helpers.taggedTemplateLiteral = helper("7.0.0-beta.0")`
+ export default function _taggedTemplateLiteral(strings, raw) {
+ if (!raw) { raw = strings.slice(0); }
+ return Object.freeze(Object.defineProperties(strings, {
+ raw: { value: Object.freeze(raw) }
+ }));
+ }
+`;
+helpers.taggedTemplateLiteralLoose = helper("7.0.0-beta.0")`
+ export default function _taggedTemplateLiteralLoose(strings, raw) {
+ if (!raw) { raw = strings.slice(0); }
+ strings.raw = raw;
+ return strings;
+ }
+`;
+helpers.readOnlyError = helper("7.0.0-beta.0")`
+ export default function _readOnlyError(name) {
+ throw new TypeError("\\"" + name + "\\" is read-only");
+ }
+`;
+helpers.writeOnlyError = helper("7.12.13")`
+ export default function _writeOnlyError(name) {
+ throw new TypeError("\\"" + name + "\\" is write-only");
+ }
+`;
+helpers.classNameTDZError = helper("7.0.0-beta.0")`
+ export default function _classNameTDZError(name) {
+ throw new Error("Class \\"" + name + "\\" cannot be referenced in computed property keys.");
+ }
+`;
+helpers.temporalUndefined = helper("7.0.0-beta.0")`
+ // This function isn't mean to be called, but to be used as a reference.
+ // We can't use a normal object because it isn't hoisted.
+ export default function _temporalUndefined() {}
+`;
+helpers.tdz = helper("7.5.5")`
+ export default function _tdzError(name) {
+ throw new ReferenceError(name + " is not defined - temporal dead zone");
+ }
+`;
+helpers.temporalRef = helper("7.0.0-beta.0")`
+ import undef from "temporalUndefined";
+ import err from "tdz";
+
+ export default function _temporalRef(val, name) {
+ return val === undef ? err(name) : val;
+ }
+`;
+helpers.slicedToArray = helper("7.0.0-beta.0")`
+ import arrayWithHoles from "arrayWithHoles";
+ import iterableToArrayLimit from "iterableToArrayLimit";
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+ import nonIterableRest from "nonIterableRest";
+
+ export default function _slicedToArray(arr, i) {
+ return (
+ arrayWithHoles(arr) ||
+ iterableToArrayLimit(arr, i) ||
+ unsupportedIterableToArray(arr, i) ||
+ nonIterableRest()
+ );
+ }
+`;
+helpers.slicedToArrayLoose = helper("7.0.0-beta.0")`
+ import arrayWithHoles from "arrayWithHoles";
+ import iterableToArrayLimitLoose from "iterableToArrayLimitLoose";
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+ import nonIterableRest from "nonIterableRest";
+
+ export default function _slicedToArrayLoose(arr, i) {
+ return (
+ arrayWithHoles(arr) ||
+ iterableToArrayLimitLoose(arr, i) ||
+ unsupportedIterableToArray(arr, i) ||
+ nonIterableRest()
+ );
+ }
+`;
+helpers.toArray = helper("7.0.0-beta.0")`
+ import arrayWithHoles from "arrayWithHoles";
+ import iterableToArray from "iterableToArray";
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+ import nonIterableRest from "nonIterableRest";
+
+ export default function _toArray(arr) {
+ return (
+ arrayWithHoles(arr) ||
+ iterableToArray(arr) ||
+ unsupportedIterableToArray(arr) ||
+ nonIterableRest()
+ );
+ }
+`;
+helpers.toConsumableArray = helper("7.0.0-beta.0")`
+ import arrayWithoutHoles from "arrayWithoutHoles";
+ import iterableToArray from "iterableToArray";
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+ import nonIterableSpread from "nonIterableSpread";
+
+ export default function _toConsumableArray(arr) {
+ return (
+ arrayWithoutHoles(arr) ||
+ iterableToArray(arr) ||
+ unsupportedIterableToArray(arr) ||
+ nonIterableSpread()
+ );
+ }
+`;
+helpers.arrayWithoutHoles = helper("7.0.0-beta.0")`
+ import arrayLikeToArray from "arrayLikeToArray";
+
+ export default function _arrayWithoutHoles(arr) {
+ if (Array.isArray(arr)) return arrayLikeToArray(arr);
+ }
+`;
+helpers.arrayWithHoles = helper("7.0.0-beta.0")`
+ export default function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+ }
+`;
+helpers.maybeArrayLike = helper("7.9.0")`
+ import arrayLikeToArray from "arrayLikeToArray";
+
+ export default function _maybeArrayLike(next, arr, i) {
+ if (arr && !Array.isArray(arr) && typeof arr.length === "number") {
+ var len = arr.length;
+ return arrayLikeToArray(arr, i !== void 0 && i < len ? i : len);
+ }
+ return next(arr, i);
+ }
+`;
+helpers.iterableToArray = helper("7.0.0-beta.0")`
+ export default function _iterableToArray(iter) {
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
+ }
+`;
+helpers.iterableToArrayLimit = helper("7.0.0-beta.0")`
+ export default function _iterableToArrayLimit(arr, i) {
+ // this is an expanded form of \`for...of\` that properly supports abrupt completions of
+ // iterators etc. variable names have been minimised to reduce the size of this massive
+ // helper. sometimes spec compliance is annoying :(
+ //
+ // _n = _iteratorNormalCompletion
+ // _d = _didIteratorError
+ // _e = _iteratorError
+ // _i = _iterator
+ // _s = _step
+
+ var _i = arr == null ? null : (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
+ if (_i == null) return;
+
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _s, _e;
+ try {
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+ return _arr;
+ }
+`;
+helpers.iterableToArrayLimitLoose = helper("7.0.0-beta.0")`
+ export default function _iterableToArrayLimitLoose(arr, i) {
+ var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]);
+ if (_i == null) return;
+
+ var _arr = [];
+ for (_i = _i.call(arr), _step; !(_step = _i.next()).done;) {
+ _arr.push(_step.value);
+ if (i && _arr.length === i) break;
+ }
+ return _arr;
+ }
+`;
+helpers.unsupportedIterableToArray = helper("7.9.0")`
+ import arrayLikeToArray from "arrayLikeToArray";
+
+ export default function _unsupportedIterableToArray(o, minLen) {
+ if (!o) return;
+ if (typeof o === "string") return arrayLikeToArray(o, minLen);
+ var n = Object.prototype.toString.call(o).slice(8, -1);
+ if (n === "Object" && o.constructor) n = o.constructor.name;
+ if (n === "Map" || n === "Set") return Array.from(o);
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
+ return arrayLikeToArray(o, minLen);
+ }
+`;
+helpers.arrayLikeToArray = helper("7.9.0")`
+ export default function _arrayLikeToArray(arr, len) {
+ if (len == null || len > arr.length) len = arr.length;
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+ return arr2;
+ }
+`;
+helpers.nonIterableSpread = helper("7.0.0-beta.0")`
+ export default function _nonIterableSpread() {
+ throw new TypeError(
+ "Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
+ );
+ }
+`;
+helpers.nonIterableRest = helper("7.0.0-beta.0")`
+ export default function _nonIterableRest() {
+ throw new TypeError(
+ "Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
+ );
+ }
+`;
+helpers.createForOfIteratorHelper = helper("7.9.0")`
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+
+ // s: start (create the iterator)
+ // n: next
+ // e: error (called whenever something throws)
+ // f: finish (always called at the end)
+
+ export default function _createForOfIteratorHelper(o, allowArrayLike) {
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
+
+ if (!it) {
+ // Fallback for engines without symbol support
+ if (
+ Array.isArray(o) ||
+ (it = unsupportedIterableToArray(o)) ||
+ (allowArrayLike && o && typeof o.length === "number")
+ ) {
+ if (it) o = it;
+ var i = 0;
+ var F = function(){};
+ return {
+ s: F,
+ n: function() {
+ if (i >= o.length) return { done: true };
+ return { done: false, value: o[i++] };
+ },
+ e: function(e) { throw e; },
+ f: F,
+ };
+ }
+
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+
+ var normalCompletion = true, didErr = false, err;
+
+ return {
+ s: function() {
+ it = it.call(o);
+ },
+ n: function() {
+ var step = it.next();
+ normalCompletion = step.done;
+ return step;
+ },
+ e: function(e) {
+ didErr = true;
+ err = e;
+ },
+ f: function() {
+ try {
+ if (!normalCompletion && it.return != null) it.return();
+ } finally {
+ if (didErr) throw err;
+ }
+ }
+ };
+ }
+`;
+helpers.createForOfIteratorHelperLoose = helper("7.9.0")`
+ import unsupportedIterableToArray from "unsupportedIterableToArray";
+
+ export default function _createForOfIteratorHelperLoose(o, allowArrayLike) {
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
+
+ if (it) return (it = it.call(o)).next.bind(it);
+
+ // Fallback for engines without symbol support
+ if (
+ Array.isArray(o) ||
+ (it = unsupportedIterableToArray(o)) ||
+ (allowArrayLike && o && typeof o.length === "number")
+ ) {
+ if (it) o = it;
+ var i = 0;
+ return function() {
+ if (i >= o.length) return { done: true };
+ return { done: false, value: o[i++] };
+ }
+ }
+
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+ }
+`;
+helpers.skipFirstGeneratorNext = helper("7.0.0-beta.0")`
+ export default function _skipFirstGeneratorNext(fn) {
+ return function () {
+ var it = fn.apply(this, arguments);
+ it.next();
+ return it;
+ }
+ }
+`;
+helpers.toPrimitive = helper("7.1.5")`
+ export default function _toPrimitive(
+ input,
+ hint /*: "default" | "string" | "number" | void */
+ ) {
+ if (typeof input !== "object" || input === null) return input;
+ var prim = input[Symbol.toPrimitive];
+ if (prim !== undefined) {
+ var res = prim.call(input, hint || "default");
+ if (typeof res !== "object") return res;
+ throw new TypeError("@@toPrimitive must return a primitive value.");
+ }
+ return (hint === "string" ? String : Number)(input);
+ }
+`;
+helpers.toPropertyKey = helper("7.1.5")`
+ import toPrimitive from "toPrimitive";
+
+ export default function _toPropertyKey(arg) {
+ var key = toPrimitive(arg, "string");
+ return typeof key === "symbol" ? key : String(key);
+ }
+`;
+helpers.initializerWarningHelper = helper("7.0.0-beta.0")`
+ export default function _initializerWarningHelper(descriptor, context){
+ throw new Error(
+ 'Decorating class property failed. Please ensure that ' +
+ 'proposal-class-properties is enabled and runs after the decorators transform.'
+ );
+ }
+`;
+helpers.initializerDefineProperty = helper("7.0.0-beta.0")`
+ export default function _initializerDefineProperty(target, property, descriptor, context){
+ if (!descriptor) return;
+
+ Object.defineProperty(target, property, {
+ enumerable: descriptor.enumerable,
+ configurable: descriptor.configurable,
+ writable: descriptor.writable,
+ value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,
+ });
+ }
+`;
+helpers.applyDecoratedDescriptor = helper("7.0.0-beta.0")`
+ export default function _applyDecoratedDescriptor(target, property, decorators, descriptor, context){
+ var desc = {};
+ Object.keys(descriptor).forEach(function(key){
+ desc[key] = descriptor[key];
+ });
+ desc.enumerable = !!desc.enumerable;
+ desc.configurable = !!desc.configurable;
+ if ('value' in desc || desc.initializer){
+ desc.writable = true;
+ }
+
+ desc = decorators.slice().reverse().reduce(function(desc, decorator){
+ return decorator(target, property, desc) || desc;
+ }, desc);
+
+ if (context && desc.initializer !== void 0){
+ desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
+ desc.initializer = undefined;
+ }
+
+ if (desc.initializer === void 0){
+ Object.defineProperty(target, property, desc);
+ desc = null;
+ }
+
+ return desc;
+ }
+`;
+helpers.classPrivateFieldLooseKey = helper("7.0.0-beta.0")`
+ var id = 0;
+ export default function _classPrivateFieldKey(name) {
+ return "__private_" + (id++) + "_" + name;
+ }
+`;
+helpers.classPrivateFieldLooseBase = helper("7.0.0-beta.0")`
+ export default function _classPrivateFieldBase(receiver, privateKey) {
+ if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
+ throw new TypeError("attempted to use private field on non-instance");
+ }
+ return receiver;
+ }
+`;
+helpers.classPrivateFieldGet = helper("7.0.0-beta.0")`
+ import classApplyDescriptorGet from "classApplyDescriptorGet";
+ import classExtractFieldDescriptor from "classExtractFieldDescriptor";
+ export default function _classPrivateFieldGet(receiver, privateMap) {
+ var descriptor = classExtractFieldDescriptor(receiver, privateMap, "get");
+ return classApplyDescriptorGet(receiver, descriptor);
+ }
+`;
+helpers.classPrivateFieldSet = helper("7.0.0-beta.0")`
+ import classApplyDescriptorSet from "classApplyDescriptorSet";
+ import classExtractFieldDescriptor from "classExtractFieldDescriptor";
+ export default function _classPrivateFieldSet(receiver, privateMap, value) {
+ var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
+ classApplyDescriptorSet(receiver, descriptor, value);
+ return value;
+ }
+`;
+helpers.classPrivateFieldDestructureSet = helper("7.4.4")`
+ import classApplyDescriptorDestructureSet from "classApplyDescriptorDestructureSet";
+ import classExtractFieldDescriptor from "classExtractFieldDescriptor";
+ export default function _classPrivateFieldDestructureSet(receiver, privateMap) {
+ var descriptor = classExtractFieldDescriptor(receiver, privateMap, "set");
+ return classApplyDescriptorDestructureSet(receiver, descriptor);
+ }
+`;
+helpers.classExtractFieldDescriptor = helper("7.13.10")`
+ export default function _classExtractFieldDescriptor(receiver, privateMap, action) {
+ if (!privateMap.has(receiver)) {
+ throw new TypeError("attempted to " + action + " private field on non-instance");
+ }
+ return privateMap.get(receiver);
+ }
+`;
+helpers.classStaticPrivateFieldSpecGet = helper("7.0.2")`
+ import classApplyDescriptorGet from "classApplyDescriptorGet";
+ import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
+ import classCheckPrivateStaticFieldDescriptor from "classCheckPrivateStaticFieldDescriptor";
+ export default function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {
+ classCheckPrivateStaticAccess(receiver, classConstructor);
+ classCheckPrivateStaticFieldDescriptor(descriptor, "get");
+ return classApplyDescriptorGet(receiver, descriptor);
+ }
+`;
+helpers.classStaticPrivateFieldSpecSet = helper("7.0.2")`
+ import classApplyDescriptorSet from "classApplyDescriptorSet";
+ import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
+ import classCheckPrivateStaticFieldDescriptor from "classCheckPrivateStaticFieldDescriptor";
+ export default function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {
+ classCheckPrivateStaticAccess(receiver, classConstructor);
+ classCheckPrivateStaticFieldDescriptor(descriptor, "set");
+ classApplyDescriptorSet(receiver, descriptor, value);
+ return value;
+ }
+`;
+helpers.classStaticPrivateMethodGet = helper("7.3.2")`
+ import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
+ export default function _classStaticPrivateMethodGet(receiver, classConstructor, method) {
+ classCheckPrivateStaticAccess(receiver, classConstructor);
+ return method;
+ }
+`;
+helpers.classStaticPrivateMethodSet = helper("7.3.2")`
+ export default function _classStaticPrivateMethodSet() {
+ throw new TypeError("attempted to set read only static private field");
+ }
+`;
+helpers.classApplyDescriptorGet = helper("7.13.10")`
+ export default function _classApplyDescriptorGet(receiver, descriptor) {
+ if (descriptor.get) {
+ return descriptor.get.call(receiver);
+ }
+ return descriptor.value;
+ }
+`;
+helpers.classApplyDescriptorSet = helper("7.13.10")`
+ export default function _classApplyDescriptorSet(receiver, descriptor, value) {
+ if (descriptor.set) {
+ descriptor.set.call(receiver, value);
+ } else {
+ if (!descriptor.writable) {
+ // This should only throw in strict mode, but class bodies are
+ // always strict and private fields can only be used inside
+ // class bodies.
+ throw new TypeError("attempted to set read only private field");
+ }
+ descriptor.value = value;
+ }
+ }
+`;
+helpers.classApplyDescriptorDestructureSet = helper("7.13.10")`
+ export default function _classApplyDescriptorDestructureSet(receiver, descriptor) {
+ if (descriptor.set) {
+ if (!("__destrObj" in descriptor)) {
+ descriptor.__destrObj = {
+ set value(v) {
+ descriptor.set.call(receiver, v)
+ },
+ };
+ }
+ return descriptor.__destrObj;
+ } else {
+ if (!descriptor.writable) {
+ // This should only throw in strict mode, but class bodies are
+ // always strict and private fields can only be used inside
+ // class bodies.
+ throw new TypeError("attempted to set read only private field");
+ }
+
+ return descriptor;
+ }
+ }
+`;
+helpers.classStaticPrivateFieldDestructureSet = helper("7.13.10")`
+ import classApplyDescriptorDestructureSet from "classApplyDescriptorDestructureSet";
+ import classCheckPrivateStaticAccess from "classCheckPrivateStaticAccess";
+ import classCheckPrivateStaticFieldDescriptor from "classCheckPrivateStaticFieldDescriptor";
+ export default function _classStaticPrivateFieldDestructureSet(receiver, classConstructor, descriptor) {
+ classCheckPrivateStaticAccess(receiver, classConstructor);
+ classCheckPrivateStaticFieldDescriptor(descriptor, "set");
+ return classApplyDescriptorDestructureSet(receiver, descriptor);
+ }
+`;
+helpers.classCheckPrivateStaticAccess = helper("7.13.10")`
+ export default function _classCheckPrivateStaticAccess(receiver, classConstructor) {
+ if (receiver !== classConstructor) {
+ throw new TypeError("Private static access of wrong provenance");
+ }
+ }
+`;
+helpers.classCheckPrivateStaticFieldDescriptor = helper("7.13.10")`
+ export default function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
+ if (descriptor === undefined) {
+ throw new TypeError("attempted to " + action + " private static field before its declaration");
+ }
+ }
+`;
+helpers.decorate = helper("7.1.5")`
+ import toArray from "toArray";
+ import toPropertyKey from "toPropertyKey";
+
+ // These comments are stripped by @babel/template
+ /*::
+ type PropertyDescriptor =
+ | {
+ value: any,
+ writable: boolean,
+ configurable: boolean,
+ enumerable: boolean,
+ }
+ | {
+ get?: () => any,
+ set?: (v: any) => void,
+ configurable: boolean,
+ enumerable: boolean,
+ };
+
+ type FieldDescriptor ={
+ writable: boolean,
+ configurable: boolean,
+ enumerable: boolean,
+ };
+
+ type Placement = "static" | "prototype" | "own";
+ type Key = string | symbol; // PrivateName is not supported yet.
+
+ type ElementDescriptor =
+ | {
+ kind: "method",
+ key: Key,
+ placement: Placement,
+ descriptor: PropertyDescriptor
+ }
+ | {
+ kind: "field",
+ key: Key,
+ placement: Placement,
+ descriptor: FieldDescriptor,
+ initializer?: () => any,
+ };
+
+ // This is exposed to the user code
+ type ElementObjectInput = ElementDescriptor & {
+ [@@toStringTag]?: "Descriptor"
+ };
+
+ // This is exposed to the user code
+ type ElementObjectOutput = ElementDescriptor & {
+ [@@toStringTag]?: "Descriptor"
+ extras?: ElementDescriptor[],
+ finisher?: ClassFinisher,
+ };
+
+ // This is exposed to the user code
+ type ClassObject = {
+ [@@toStringTag]?: "Descriptor",
+ kind: "class",
+ elements: ElementDescriptor[],
+ };
+
+ type ElementDecorator = (descriptor: ElementObjectInput) => ?ElementObjectOutput;
+ type ClassDecorator = (descriptor: ClassObject) => ?ClassObject;
+ type ClassFinisher = <A, B>(cl: Class<A>) => Class<B>;
+
+ // Only used by Babel in the transform output, not part of the spec.
+ type ElementDefinition =
+ | {
+ kind: "method",
+ value: any,
+ key: Key,
+ static?: boolean,
+ decorators?: ElementDecorator[],
+ }
+ | {
+ kind: "field",
+ value: () => any,
+ key: Key,
+ static?: boolean,
+ decorators?: ElementDecorator[],
+ };
+
+ declare function ClassFactory<C>(initialize: (instance: C) => void): {
+ F: Class<C>,
+ d: ElementDefinition[]
+ }
+
+ */
+
+ /*::
+ // Various combinations with/without extras and with one or many finishers
+
+ type ElementFinisherExtras = {
+ element: ElementDescriptor,
+ finisher?: ClassFinisher,
+ extras?: ElementDescriptor[],
+ };
+
+ type ElementFinishersExtras = {
+ element: ElementDescriptor,
+ finishers: ClassFinisher[],
+ extras: ElementDescriptor[],
+ };
+
+ type ElementsFinisher = {
+ elements: ElementDescriptor[],
+ finisher?: ClassFinisher,
+ };
+
+ type ElementsFinishers = {
+ elements: ElementDescriptor[],
+ finishers: ClassFinisher[],
+ };
+
+ */
+
+ /*::
+
+ type Placements = {
+ static: Key[],
+ prototype: Key[],
+ own: Key[],
+ };
+
+ */
+
+ // ClassDefinitionEvaluation (Steps 26-*)
+ export default function _decorate(
+ decorators /*: ClassDecorator[] */,
+ factory /*: ClassFactory */,
+ superClass /*: ?Class<*> */,
+ mixins /*: ?Array<Function> */,
+ ) /*: Class<*> */ {
+ var api = _getDecoratorsApi();
+ if (mixins) {
+ for (var i = 0; i < mixins.length; i++) {
+ api = mixins[i](api);
+ }
+ }
+
+ var r = factory(function initialize(O) {
+ api.initializeInstanceElements(O, decorated.elements);
+ }, superClass);
+ var decorated = api.decorateClass(
+ _coalesceClassElements(r.d.map(_createElementDescriptor)),
+ decorators,
+ );
+
+ api.initializeClassElements(r.F, decorated.elements);
+
+ return api.runClassFinishers(r.F, decorated.finishers);
+ }
+
+ function _getDecoratorsApi() {
+ _getDecoratorsApi = function() {
+ return api;
+ };
+
+ var api = {
+ elementsDefinitionOrder: [["method"], ["field"]],
+
+ // InitializeInstanceElements
+ initializeInstanceElements: function(
+ /*::<C>*/ O /*: C */,
+ elements /*: ElementDescriptor[] */,
+ ) {
+ ["method", "field"].forEach(function(kind) {
+ elements.forEach(function(element /*: ElementDescriptor */) {
+ if (element.kind === kind && element.placement === "own") {
+ this.defineClassElement(O, element);
+ }
+ }, this);
+ }, this);
+ },
+
+ // InitializeClassElements
+ initializeClassElements: function(
+ /*::<C>*/ F /*: Class<C> */,
+ elements /*: ElementDescriptor[] */,
+ ) {
+ var proto = F.prototype;
+
+ ["method", "field"].forEach(function(kind) {
+ elements.forEach(function(element /*: ElementDescriptor */) {
+ var placement = element.placement;
+ if (
+ element.kind === kind &&
+ (placement === "static" || placement === "prototype")
+ ) {
+ var receiver = placement === "static" ? F : proto;
+ this.defineClassElement(receiver, element);
+ }
+ }, this);
+ }, this);
+ },
+
+ // DefineClassElement
+ defineClassElement: function(
+ /*::<C>*/ receiver /*: C | Class<C> */,
+ element /*: ElementDescriptor */,
+ ) {
+ var descriptor /*: PropertyDescriptor */ = element.descriptor;
+ if (element.kind === "field") {
+ var initializer = element.initializer;
+ descriptor = {
+ enumerable: descriptor.enumerable,
+ writable: descriptor.writable,
+ configurable: descriptor.configurable,
+ value: initializer === void 0 ? void 0 : initializer.call(receiver),
+ };
+ }
+ Object.defineProperty(receiver, element.key, descriptor);
+ },
+
+ // DecorateClass
+ decorateClass: function(
+ elements /*: ElementDescriptor[] */,
+ decorators /*: ClassDecorator[] */,
+ ) /*: ElementsFinishers */ {
+ var newElements /*: ElementDescriptor[] */ = [];
+ var finishers /*: ClassFinisher[] */ = [];
+ var placements /*: Placements */ = {
+ static: [],
+ prototype: [],
+ own: [],
+ };
+
+ elements.forEach(function(element /*: ElementDescriptor */) {
+ this.addElementPlacement(element, placements);
+ }, this);
+
+ elements.forEach(function(element /*: ElementDescriptor */) {
+ if (!_hasDecorators(element)) return newElements.push(element);
+
+ var elementFinishersExtras /*: ElementFinishersExtras */ = this.decorateElement(
+ element,
+ placements,
+ );
+ newElements.push(elementFinishersExtras.element);
+ newElements.push.apply(newElements, elementFinishersExtras.extras);
+ finishers.push.apply(finishers, elementFinishersExtras.finishers);
+ }, this);
+
+ if (!decorators) {
+ return { elements: newElements, finishers: finishers };
+ }
+
+ var result /*: ElementsFinishers */ = this.decorateConstructor(
+ newElements,
+ decorators,
+ );
+ finishers.push.apply(finishers, result.finishers);
+ result.finishers = finishers;
+
+ return result;
+ },
+
+ // AddElementPlacement
+ addElementPlacement: function(
+ element /*: ElementDescriptor */,
+ placements /*: Placements */,
+ silent /*: boolean */,
+ ) {
+ var keys = placements[element.placement];
+ if (!silent && keys.indexOf(element.key) !== -1) {
+ throw new TypeError("Duplicated element (" + element.key + ")");
+ }
+ keys.push(element.key);
+ },
+
+ // DecorateElement
+ decorateElement: function(
+ element /*: ElementDescriptor */,
+ placements /*: Placements */,
+ ) /*: ElementFinishersExtras */ {
+ var extras /*: ElementDescriptor[] */ = [];
+ var finishers /*: ClassFinisher[] */ = [];
+
+ for (
+ var decorators = element.decorators, i = decorators.length - 1;
+ i >= 0;
+ i--
+ ) {
+ // (inlined) RemoveElementPlacement
+ var keys = placements[element.placement];
+ keys.splice(keys.indexOf(element.key), 1);
+
+ var elementObject /*: ElementObjectInput */ = this.fromElementDescriptor(
+ element,
+ );
+ var elementFinisherExtras /*: ElementFinisherExtras */ = this.toElementFinisherExtras(
+ (0, decorators[i])(elementObject) /*: ElementObjectOutput */ ||
+ elementObject,
+ );
+
+ element = elementFinisherExtras.element;
+ this.addElementPlacement(element, placements);
+
+ if (elementFinisherExtras.finisher) {
+ finishers.push(elementFinisherExtras.finisher);
+ }
+
+ var newExtras /*: ElementDescriptor[] | void */ =
+ elementFinisherExtras.extras;
+ if (newExtras) {
+ for (var j = 0; j < newExtras.length; j++) {
+ this.addElementPlacement(newExtras[j], placements);
+ }
+ extras.push.apply(extras, newExtras);
+ }
+ }
+
+ return { element: element, finishers: finishers, extras: extras };
+ },
+
+ // DecorateConstructor
+ decorateConstructor: function(
+ elements /*: ElementDescriptor[] */,
+ decorators /*: ClassDecorator[] */,
+ ) /*: ElementsFinishers */ {
+ var finishers /*: ClassFinisher[] */ = [];
+
+ for (var i = decorators.length - 1; i >= 0; i--) {
+ var obj /*: ClassObject */ = this.fromClassDescriptor(elements);
+ var elementsAndFinisher /*: ElementsFinisher */ = this.toClassDescriptor(
+ (0, decorators[i])(obj) /*: ClassObject */ || obj,
+ );
+
+ if (elementsAndFinisher.finisher !== undefined) {
+ finishers.push(elementsAndFinisher.finisher);
+ }
+
+ if (elementsAndFinisher.elements !== undefined) {
+ elements = elementsAndFinisher.elements;
+
+ for (var j = 0; j < elements.length - 1; j++) {
+ for (var k = j + 1; k < elements.length; k++) {
+ if (
+ elements[j].key === elements[k].key &&
+ elements[j].placement === elements[k].placement
+ ) {
+ throw new TypeError(
+ "Duplicated element (" + elements[j].key + ")",
+ );
+ }
+ }
+ }
+ }
+ }
+
+ return { elements: elements, finishers: finishers };
+ },
+
+ // FromElementDescriptor
+ fromElementDescriptor: function(
+ element /*: ElementDescriptor */,
+ ) /*: ElementObject */ {
+ var obj /*: ElementObject */ = {
+ kind: element.kind,
+ key: element.key,
+ placement: element.placement,
+ descriptor: element.descriptor,
+ };
+
+ var desc = {
+ value: "Descriptor",
+ configurable: true,
+ };
+ Object.defineProperty(obj, Symbol.toStringTag, desc);
+
+ if (element.kind === "field") obj.initializer = element.initializer;
+
+ return obj;
+ },
+
+ // ToElementDescriptors
+ toElementDescriptors: function(
+ elementObjects /*: ElementObject[] */,
+ ) /*: ElementDescriptor[] */ {
+ if (elementObjects === undefined) return;
+ return toArray(elementObjects).map(function(elementObject) {
+ var element = this.toElementDescriptor(elementObject);
+ this.disallowProperty(elementObject, "finisher", "An element descriptor");
+ this.disallowProperty(elementObject, "extras", "An element descriptor");
+ return element;
+ }, this);
+ },
+
+ // ToElementDescriptor
+ toElementDescriptor: function(
+ elementObject /*: ElementObject */,
+ ) /*: ElementDescriptor */ {
+ var kind = String(elementObject.kind);
+ if (kind !== "method" && kind !== "field") {
+ throw new TypeError(
+ 'An element descriptor\\'s .kind property must be either "method" or' +
+ ' "field", but a decorator created an element descriptor with' +
+ ' .kind "' +
+ kind +
+ '"',
+ );
+ }
+
+ var key = toPropertyKey(elementObject.key);
+
+ var placement = String(elementObject.placement);
+ if (
+ placement !== "static" &&
+ placement !== "prototype" &&
+ placement !== "own"
+ ) {
+ throw new TypeError(
+ 'An element descriptor\\'s .placement property must be one of "static",' +
+ ' "prototype" or "own", but a decorator created an element descriptor' +
+ ' with .placement "' +
+ placement +
+ '"',
+ );
+ }
+
+ var descriptor /*: PropertyDescriptor */ = elementObject.descriptor;
+
+ this.disallowProperty(elementObject, "elements", "An element descriptor");
+
+ var element /*: ElementDescriptor */ = {
+ kind: kind,
+ key: key,
+ placement: placement,
+ descriptor: Object.assign({}, descriptor),
+ };
+
+ if (kind !== "field") {
+ this.disallowProperty(elementObject, "initializer", "A method descriptor");
+ } else {
+ this.disallowProperty(
+ descriptor,
+ "get",
+ "The property descriptor of a field descriptor",
+ );
+ this.disallowProperty(
+ descriptor,
+ "set",
+ "The property descriptor of a field descriptor",
+ );
+ this.disallowProperty(
+ descriptor,
+ "value",
+ "The property descriptor of a field descriptor",
+ );
+
+ element.initializer = elementObject.initializer;
+ }
+
+ return element;
+ },
+
+ toElementFinisherExtras: function(
+ elementObject /*: ElementObject */,
+ ) /*: ElementFinisherExtras */ {
+ var element /*: ElementDescriptor */ = this.toElementDescriptor(
+ elementObject,
+ );
+ var finisher /*: ClassFinisher */ = _optionalCallableProperty(
+ elementObject,
+ "finisher",
+ );
+ var extras /*: ElementDescriptors[] */ = this.toElementDescriptors(
+ elementObject.extras,
+ );
+
+ return { element: element, finisher: finisher, extras: extras };
+ },
+
+ // FromClassDescriptor
+ fromClassDescriptor: function(
+ elements /*: ElementDescriptor[] */,
+ ) /*: ClassObject */ {
+ var obj = {
+ kind: "class",
+ elements: elements.map(this.fromElementDescriptor, this),
+ };
+
+ var desc = { value: "Descriptor", configurable: true };
+ Object.defineProperty(obj, Symbol.toStringTag, desc);
+
+ return obj;
+ },
+
+ // ToClassDescriptor
+ toClassDescriptor: function(
+ obj /*: ClassObject */,
+ ) /*: ElementsFinisher */ {
+ var kind = String(obj.kind);
+ if (kind !== "class") {
+ throw new TypeError(
+ 'A class descriptor\\'s .kind property must be "class", but a decorator' +
+ ' created a class descriptor with .kind "' +
+ kind +
+ '"',
+ );
+ }
+
+ this.disallowProperty(obj, "key", "A class descriptor");
+ this.disallowProperty(obj, "placement", "A class descriptor");
+ this.disallowProperty(obj, "descriptor", "A class descriptor");
+ this.disallowProperty(obj, "initializer", "A class descriptor");
+ this.disallowProperty(obj, "extras", "A class descriptor");
+
+ var finisher = _optionalCallableProperty(obj, "finisher");
+ var elements = this.toElementDescriptors(obj.elements);
+
+ return { elements: elements, finisher: finisher };
+ },
+
+ // RunClassFinishers
+ runClassFinishers: function(
+ constructor /*: Class<*> */,
+ finishers /*: ClassFinisher[] */,
+ ) /*: Class<*> */ {
+ for (var i = 0; i < finishers.length; i++) {
+ var newConstructor /*: ?Class<*> */ = (0, finishers[i])(constructor);
+ if (newConstructor !== undefined) {
+ // NOTE: This should check if IsConstructor(newConstructor) is false.
+ if (typeof newConstructor !== "function") {
+ throw new TypeError("Finishers must return a constructor.");
+ }
+ constructor = newConstructor;
+ }
+ }
+ return constructor;
+ },
+
+ disallowProperty: function(obj, name, objectType) {
+ if (obj[name] !== undefined) {
+ throw new TypeError(objectType + " can't have a ." + name + " property.");
+ }
+ }
+ };
+
+ return api;
+ }
+
+ // ClassElementEvaluation
+ function _createElementDescriptor(
+ def /*: ElementDefinition */,
+ ) /*: ElementDescriptor */ {
+ var key = toPropertyKey(def.key);
+
+ var descriptor /*: PropertyDescriptor */;
+ if (def.kind === "method") {
+ descriptor = {
+ value: def.value,
+ writable: true,
+ configurable: true,
+ enumerable: false,
+ };
+ } else if (def.kind === "get") {
+ descriptor = { get: def.value, configurable: true, enumerable: false };
+ } else if (def.kind === "set") {
+ descriptor = { set: def.value, configurable: true, enumerable: false };
+ } else if (def.kind === "field") {
+ descriptor = { configurable: true, writable: true, enumerable: true };
+ }
+
+ var element /*: ElementDescriptor */ = {
+ kind: def.kind === "field" ? "field" : "method",
+ key: key,
+ placement: def.static
+ ? "static"
+ : def.kind === "field"
+ ? "own"
+ : "prototype",
+ descriptor: descriptor,
+ };
+ if (def.decorators) element.decorators = def.decorators;
+ if (def.kind === "field") element.initializer = def.value;
+
+ return element;
+ }
+
+ // CoalesceGetterSetter
+ function _coalesceGetterSetter(
+ element /*: ElementDescriptor */,
+ other /*: ElementDescriptor */,
+ ) {
+ if (element.descriptor.get !== undefined) {
+ other.descriptor.get = element.descriptor.get;
+ } else {
+ other.descriptor.set = element.descriptor.set;
+ }
+ }
+
+ // CoalesceClassElements
+ function _coalesceClassElements(
+ elements /*: ElementDescriptor[] */,
+ ) /*: ElementDescriptor[] */ {
+ var newElements /*: ElementDescriptor[] */ = [];
+
+ var isSameElement = function(
+ other /*: ElementDescriptor */,
+ ) /*: boolean */ {
+ return (
+ other.kind === "method" &&
+ other.key === element.key &&
+ other.placement === element.placement
+ );
+ };
+
+ for (var i = 0; i < elements.length; i++) {
+ var element /*: ElementDescriptor */ = elements[i];
+ var other /*: ElementDescriptor */;
+
+ if (
+ element.kind === "method" &&
+ (other = newElements.find(isSameElement))
+ ) {
+ if (
+ _isDataDescriptor(element.descriptor) ||
+ _isDataDescriptor(other.descriptor)
+ ) {
+ if (_hasDecorators(element) || _hasDecorators(other)) {
+ throw new ReferenceError(
+ "Duplicated methods (" + element.key + ") can't be decorated.",
+ );
+ }
+ other.descriptor = element.descriptor;
+ } else {
+ if (_hasDecorators(element)) {
+ if (_hasDecorators(other)) {
+ throw new ReferenceError(
+ "Decorators can't be placed on different accessors with for " +
+ "the same property (" +
+ element.key +
+ ").",
+ );
+ }
+ other.decorators = element.decorators;
+ }
+ _coalesceGetterSetter(element, other);
+ }
+ } else {
+ newElements.push(element);
+ }
+ }
+
+ return newElements;
+ }
+
+ function _hasDecorators(element /*: ElementDescriptor */) /*: boolean */ {
+ return element.decorators && element.decorators.length;
+ }
+
+ function _isDataDescriptor(desc /*: PropertyDescriptor */) /*: boolean */ {
+ return (
+ desc !== undefined &&
+ !(desc.value === undefined && desc.writable === undefined)
+ );
+ }
+
+ function _optionalCallableProperty /*::<T>*/(
+ obj /*: T */,
+ name /*: $Keys<T> */,
+ ) /*: ?Function */ {
+ var value = obj[name];
+ if (value !== undefined && typeof value !== "function") {
+ throw new TypeError("Expected '" + name + "' to be a function");
+ }
+ return value;
+ }
+
+`;
+helpers.classPrivateMethodGet = helper("7.1.6")`
+ export default function _classPrivateMethodGet(receiver, privateSet, fn) {
+ if (!privateSet.has(receiver)) {
+ throw new TypeError("attempted to get private field on non-instance");
+ }
+ return fn;
+ }
+`;
+helpers.checkPrivateRedeclaration = helper("7.14.1")`
+ export default function _checkPrivateRedeclaration(obj, privateCollection) {
+ if (privateCollection.has(obj)) {
+ throw new TypeError("Cannot initialize the same private elements twice on an object");
+ }
+ }
+`;
+helpers.classPrivateFieldInitSpec = helper("7.14.1")`
+ import checkPrivateRedeclaration from "checkPrivateRedeclaration";
+
+ export default function _classPrivateFieldInitSpec(obj, privateMap, value) {
+ checkPrivateRedeclaration(obj, privateMap);
+ privateMap.set(obj, value);
+ }
+`;
+helpers.classPrivateMethodInitSpec = helper("7.14.1")`
+ import checkPrivateRedeclaration from "checkPrivateRedeclaration";
+
+ export default function _classPrivateMethodInitSpec(obj, privateSet) {
+ checkPrivateRedeclaration(obj, privateSet);
+ privateSet.add(obj);
+ }
+`;
+{
+ helpers.classPrivateMethodSet = helper("7.1.6")`
+ export default function _classPrivateMethodSet() {
+ throw new TypeError("attempted to reassign private method");
+ }
+ `;
+}
+helpers.identity = helper("7.17.0")`
+ export default function _identity(x) {
+ return x;
+ }
+`; \ No newline at end of file
diff --git a/node_modules/@babel/helpers/lib/helpers/applyDecs.js b/node_modules/@babel/helpers/lib/helpers/applyDecs.js
new file mode 100644
index 0000000..27dc4e2
--- /dev/null
+++ b/node_modules/@babel/helpers/lib/helpers/applyDecs.js
@@ -0,0 +1,483 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = applyDecs;
+
+function createMetadataMethodsForProperty(metadataMap, kind, property) {
+ return {
+ getMetadata: function (key) {
+ if (typeof key !== "symbol") {
+ throw new TypeError("Metadata keys must be symbols, received: " + key);
+ }
+
+ var metadataForKey = metadataMap[key];
+ if (metadataForKey === void 0) return void 0;
+
+ if (kind === 1) {
+ var pub = metadataForKey.public;
+
+ if (pub !== void 0) {
+ return pub[property];
+ }
+ } else if (kind === 2) {
+ var priv = metadataForKey.private;
+
+ if (priv !== void 0) {
+ return priv.get(property);
+ }
+ } else if (Object.hasOwnProperty.call(metadataForKey, "constructor")) {
+ return metadataForKey.constructor;
+ }
+ },
+ setMetadata: function (key, value) {
+ if (typeof key !== "symbol") {
+ throw new TypeError("Metadata keys must be symbols, received: " + key);
+ }
+
+ var metadataForKey = metadataMap[key];
+
+ if (metadataForKey === void 0) {
+ metadataForKey = metadataMap[key] = {};
+ }
+
+ if (kind === 1) {
+ var pub = metadataForKey.public;
+
+ if (pub === void 0) {
+ pub = metadataForKey.public = {};
+ }
+
+ pub[property] = value;
+ } else if (kind === 2) {
+ var priv = metadataForKey.priv;
+
+ if (priv === void 0) {
+ priv = metadataForKey.private = new Map();
+ }
+
+ priv.set(property, value);
+ } else {
+ metadataForKey.constructor = value;
+ }
+ }
+ };
+}
+
+function convertMetadataMapToFinal(obj, metadataMap) {
+ var parentMetadataMap = obj[Symbol.metadata || Symbol.for("Symbol.metadata")];
+ var metadataKeys = Object.getOwnPropertySymbols(metadataMap);
+ if (metadataKeys.length === 0) return;
+
+ for (var i = 0; i < metadataKeys.length; i++) {
+ var key = metadataKeys[i];
+ var metaForKey = metadataMap[key];
+ var parentMetaForKey = parentMetadataMap ? parentMetadataMap[key] : null;
+ var pub = metaForKey.public;
+ var parentPub = parentMetaForKey ? parentMetaForKey.public : null;
+
+ if (pub && parentPub) {
+ Object.setPrototypeOf(pub, parentPub);
+ }
+
+ var priv = metaForKey.private;
+
+ if (priv) {
+ var privArr = Array.from(priv.values());
+ var parentPriv = parentMetaForKey ? parentMetaForKey.private : null;
+
+ if (parentPriv) {
+ privArr = privArr.concat(parentPriv);
+ }
+
+ metaForKey.private = privArr;
+ }
+
+ if (parentMetaForKey) {
+ Object.setPrototypeOf(metaForKey, parentMetaForKey);
+ }
+ }
+
+ if (parentMetadataMap) {
+ Object.setPrototypeOf(metadataMap, parentMetadataMap);
+ }
+
+ obj[Symbol.metadata || Symbol.for("Symbol.metadata")] = metadataMap;
+}
+
+function createAddInitializerMethod(initializers) {
+ return function addInitializer(initializer) {
+ assertValidInitializer(initializer);
+ initializers.push(initializer);
+ };
+}
+
+function memberDecCtx(base, name, desc, metadataMap, initializers, kind, isStatic, isPrivate) {
+ var kindStr;
+
+ switch (kind) {
+ case 1:
+ kindStr = "accessor";
+ break;
+
+ case 2:
+ kindStr = "method";
+ break;
+
+ case 3:
+ kindStr = "getter";
+ break;
+
+ case 4:
+ kindStr = "setter";
+ break;
+
+ default:
+ kindStr = "field";
+ }
+
+ var ctx = {
+ kind: kindStr,
+ name: isPrivate ? "#" + name : name,
+ isStatic: isStatic,
+ isPrivate: isPrivate
+ };
+
+ if (kind !== 0) {
+ ctx.addInitializer = createAddInitializerMethod(initializers);
+ }
+
+ var metadataKind, metadataName;
+
+ if (isPrivate) {
+ metadataKind = 2;
+ metadataName = Symbol(name);
+ var access = {};
+
+ if (kind === 0) {
+ access.get = desc.get;
+ access.set = desc.set;
+ } else if (kind === 2) {
+ access.get = function () {
+ return desc.value;
+ };
+ } else {
+ if (kind === 1 || kind === 3) {
+ access.get = function () {
+ return desc.get.call(this);
+ };
+ }
+
+ if (kind === 1 || kind === 4) {
+ access.set = function (v) {
+ desc.set.call(this, v);
+ };
+ }
+ }
+
+ ctx.access = access;
+ } else {
+ metadataKind = 1;
+ metadataName = name;
+ }
+
+ return Object.assign(ctx, createMetadataMethodsForProperty(metadataMap, metadataKind, metadataName));
+}
+
+function assertValidInitializer(initializer) {
+ if (typeof initializer !== "function") {
+ throw new Error("initializers must be functions");
+ }
+}
+
+function assertValidReturnValue(kind, value) {
+ var type = typeof value;
+
+ if (kind === 1) {
+ if (type !== "object" || value === null) {
+ throw new Error("accessor decorators must return an object with get, set, or initializer properties or void 0");
+ }
+ } else if (type !== "function") {
+ if (kind === 0) {
+ throw new Error("field decorators must return a initializer function or void 0");
+ } else {
+ throw new Error("method decorators must return a function or void 0");
+ }
+ }
+}
+
+function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers) {
+ var decs = decInfo[0];
+ var desc, initializer, value;
+
+ if (isPrivate) {
+ if (kind === 0 || kind === 1) {
+ desc = {
+ get: decInfo[3],
+ set: decInfo[4]
+ };
+ } else if (kind === 3) {
+ desc = {
+ get: decInfo[3]
+ };
+ } else if (kind === 4) {
+ desc = {
+ set: decInfo[3]
+ };
+ } else {
+ desc = {
+ value: decInfo[3]
+ };
+ }
+ } else if (kind !== 0) {
+ desc = Object.getOwnPropertyDescriptor(base, name);
+ }
+
+ if (kind === 1) {
+ value = {
+ get: desc.get,
+ set: desc.set
+ };
+ } else if (kind === 2) {
+ value = desc.value;
+ } else if (kind === 3) {
+ value = desc.get;
+ } else if (kind === 4) {
+ value = desc.set;
+ }
+
+ var ctx = memberDecCtx(base, name, desc, metadataMap, initializers, kind, isStatic, isPrivate);
+ var newValue, get, set;
+
+ if (typeof decs === "function") {
+ newValue = decs(value, ctx);
+
+ if (newValue !== void 0) {
+ assertValidReturnValue(kind, newValue);
+
+ if (kind === 0) {
+ initializer = newValue;
+ } else if (kind === 1) {
+ initializer = newValue.initializer;
+ get = newValue.get || value.get;
+ set = newValue.set || value.set;
+ value = {
+ get: get,
+ set: set
+ };
+ } else {
+ value = newValue;
+ }
+ }
+ } else {
+ for (var i = decs.length - 1; i >= 0; i--) {
+ var dec = decs[i];
+ newValue = dec(value, ctx);
+
+ if (newValue !== void 0) {
+ assertValidReturnValue(kind, newValue);
+ var newInit;
+
+ if (kind === 0) {
+ newInit = newValue;
+ } else if (kind === 1) {
+ newInit = newValue.initializer;
+ get = newValue.get || value.get;
+ set = newValue.set || value.set;
+ value = {
+ get: get,
+ set: set
+ };
+ } else {
+ value = newValue;
+ }
+
+ if (newInit !== void 0) {
+ if (initializer === void 0) {
+ initializer = newInit;
+ } else if (typeof initializer === "function") {
+ initializer = [initializer, newInit];
+ } else {
+ initializer.push(newInit);
+ }
+ }
+ }
+ }
+ }
+
+ if (kind === 0 || kind === 1) {
+ if (initializer === void 0) {
+ initializer = function (instance, init) {
+ return init;
+ };
+ } else if (typeof initializer !== "function") {
+ var ownInitializers = initializer;
+
+ initializer = function (instance, init) {
+ var value = init;
+
+ for (var i = 0; i < ownInitializers.length; i++) {
+ value = ownInitializers[i].call(instance, value);
+ }
+
+ return value;
+ };
+ } else {
+ var originalInitializer = initializer;
+
+ initializer = function (instance, init) {
+ return originalInitializer.call(instance, init);
+ };
+ }
+
+ ret.push(initializer);
+ }
+
+ if (kind !== 0) {
+ if (kind === 1) {
+ desc.get = value.get;
+ desc.set = value.set;
+ } else if (kind === 2) {
+ desc.value = value;
+ } else if (kind === 3) {
+ desc.get = value;
+ } else if (kind === 4) {
+ desc.set = value;
+ }
+
+ if (isPrivate) {
+ if (kind === 1) {
+ ret.push(function (instance, args) {
+ return value.get.call(instance, args);
+ });
+ ret.push(function (instance, args) {
+ return value.set.call(instance, args);
+ });
+ } else if (kind === 2) {
+ ret.push(value);
+ } else {
+ ret.push(function (instance, args) {
+ return value.call(instance, args);
+ });
+ }
+ } else {
+ Object.defineProperty(base, name, desc);
+ }
+ }
+}
+
+function applyMemberDecs(ret, Class, protoMetadataMap, staticMetadataMap, decInfos) {
+ var protoInitializers = [];
+ var staticInitializers = [];
+ var existingProtoNonFields = new Map();
+ var existingStaticNonFields = new Map();
+
+ for (var i = 0; i < decInfos.length; i++) {
+ var decInfo = decInfos[i];
+ if (!Array.isArray(decInfo)) continue;
+ var kind = decInfo[1];
+ var name = decInfo[2];
+ var isPrivate = decInfo.length > 3;
+ var isStatic = kind >= 5;
+ var base;
+ var metadataMap;
+ var initializers;
+
+ if (isStatic) {
+ base = Class;
+ metadataMap = staticMetadataMap;
+ kind = kind - 5;
+ initializers = staticInitializers;
+ } else {
+ base = Class.prototype;
+ metadataMap = protoMetadataMap;
+ initializers = protoInitializers;
+ }
+
+ if (kind !== 0 && !isPrivate) {
+ var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
+ var existingKind = existingNonFields.get(name) || 0;
+
+ if (existingKind === true || existingKind === 3 && kind !== 4 || existingKind === 4 && kind !== 3) {
+ throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + name);
+ } else if (!existingKind && kind > 2) {
+ existingNonFields.set(name, kind);
+ } else {
+ existingNonFields.set(name, true);
+ }
+ }
+
+ applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, metadataMap, initializers);
+ }
+
+ if (protoInitializers.length > 0) {
+ pushInitializers(ret, protoInitializers);
+ }
+
+ if (staticInitializers.length > 0) {
+ pushInitializers(ret, staticInitializers);
+ }
+}
+
+function pushInitializers(ret, initializers) {
+ if (initializers.length > 0) {
+ initializers = initializers.slice();
+ ret.push(function (instance) {
+ for (var i = 0; i < initializers.length; i++) {
+ initializers[i].call(instance, instance);
+ }
+
+ return instance;
+ });
+ } else {
+ ret.push(function (instance) {
+ return instance;
+ });
+ }
+}
+
+function applyClassDecs(ret, targetClass, metadataMap, classDecs) {
+ var initializers = [];
+ var newClass = targetClass;
+ var name = targetClass.name;
+ var ctx = Object.assign({
+ kind: "class",
+ name: name,
+ addInitializer: createAddInitializerMethod(initializers)
+ }, createMetadataMethodsForProperty(metadataMap, 0, name));
+
+ for (var i = classDecs.length - 1; i >= 0; i--) {
+ newClass = classDecs[i](newClass, ctx) || newClass;
+ }
+
+ ret.push(newClass);
+
+ if (initializers.length > 0) {
+ ret.push(function () {
+ for (var i = 0; i < initializers.length; i++) {
+ initializers[i].call(newClass, newClass);
+ }
+ });
+ } else {
+ ret.push(function () {});
+ }
+}
+
+function applyDecs(targetClass, memberDecs, classDecs) {
+ var ret = [];
+ var staticMetadataMap = {};
+
+ if (memberDecs) {
+ var protoMetadataMap = {};
+ applyMemberDecs(ret, targetClass, protoMetadataMap, staticMetadataMap, memberDecs);
+ convertMetadataMapToFinal(targetClass.prototype, protoMetadataMap);
+ }
+
+ if (classDecs) {
+ applyClassDecs(ret, targetClass, staticMetadataMap, classDecs);
+ }
+
+ convertMetadataMapToFinal(targetClass, staticMetadataMap);
+ return ret;
+} \ No newline at end of file
diff --git a/node_modules/@babel/helpers/lib/helpers/asyncIterator.js b/node_modules/@babel/helpers/lib/helpers/asyncIterator.js
new file mode 100644
index 0000000..0a6d9de
--- /dev/null
+++ b/node_modules/@babel/helpers/lib/helpers/asyncIterator.js
@@ -0,0 +1,81 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _asyncIterator;
+
+function _asyncIterator(iterable) {
+ var method,
+ async,
+ sync,
+ retry = 2;
+
+ if (typeof Symbol !== "undefined") {
+ async = Symbol.asyncIterator;
+ sync = Symbol.iterator;
+ }
+
+ while (retry--) {
+ if (async && (method = iterable[async]) != null) {
+ return method.call(iterable);
+ }
+
+ if (sync && (method = iterable[sync]) != null) {
+ return new AsyncFromSyncIterator(method.call(iterable));
+ }
+
+ async = "@@asyncIterator";
+ sync = "@@iterator";
+ }
+
+ throw new TypeError("Object is not async iterable");
+}
+
+function AsyncFromSyncIterator(s) {
+ AsyncFromSyncIterator = function (s) {
+ this.s = s;
+ this.n = s.next;
+ };
+
+ AsyncFromSyncIterator.prototype = {
+ s: null,
+ n: null,
+ next: function () {
+ return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
+ },
+ return: function (value) {
+ var ret = this.s.return;
+
+ if (ret === undefined) {
+ return Promise.resolve({
+ value: value,
+ done: true
+ });
+ }
+
+ return AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments));
+ },
+ throw: function (value) {
+ var thr = this.s.return;
+ if (thr === undefined) return Promise.reject(value);
+ return AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments));
+ }
+ };
+
+ function AsyncFromSyncIteratorContinuation(r) {
+ if (Object(r) !== r) {
+ return Promise.reject(new TypeError(r + " is not an object."));
+ }
+
+ var done = r.done;
+ return Promise.resolve(r.value).then(function (value) {
+ return {
+ value: value,
+ done: done
+ };
+ });
+ }
+
+ return new AsyncFromSyncIterator(s);
+} \ No newline at end of file
diff --git a/node_modules/@babel/helpers/lib/helpers/jsx.js b/node_modules/@babel/helpers/lib/helpers/jsx.js
new file mode 100644
index 0000000..68de168
--- /dev/null
+++ b/node_modules/@babel/helpers/lib/helpers/jsx.js
@@ -0,0 +1,53 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _createRawReactElement;
+var REACT_ELEMENT_TYPE;
+
+function _createRawReactElement(type, props, key, children) {
+ if (!REACT_ELEMENT_TYPE) {
+ REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol["for"] && Symbol["for"]("react.element") || 0xeac7;
+ }
+
+ var defaultProps = type && type.defaultProps;
+ var childrenLength = arguments.length - 3;
+
+ if (!props && childrenLength !== 0) {
+ props = {
+ children: void 0
+ };
+ }
+
+ if (childrenLength === 1) {
+ props.children = children;
+ } else if (childrenLength > 1) {
+ var childArray = new Array(childrenLength);
+
+ for (var i = 0; i < childrenLength; i++) {
+ childArray[i] = arguments[i + 3];
+ }
+
+ props.children = childArray;
+ }
+
+ if (props && defaultProps) {
+ for (var propName in defaultProps) {
+ if (props[propName] === void 0) {
+ props[propName] = defaultProps[propName];
+ }
+ }
+ } else if (!props) {
+ props = defaultProps || {};
+ }
+
+ return {
+ $$typeof: REACT_ELEMENT_TYPE,
+ type: type,
+ key: key === undefined ? null : "" + key,
+ ref: null,
+ props: props,
+ _owner: null
+ };
+} \ No newline at end of file
diff --git a/node_modules/@babel/helpers/lib/helpers/objectSpread2.js b/node_modules/@babel/helpers/lib/helpers/objectSpread2.js
new file mode 100644
index 0000000..03db006
--- /dev/null
+++ b/node_modules/@babel/helpers/lib/helpers/objectSpread2.js
@@ -0,0 +1,46 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _objectSpread2;
+
+var _defineProperty = require("defineProperty");
+
+function ownKeys(object, enumerableOnly) {
+ var keys = Object.keys(object);
+
+ if (Object.getOwnPropertySymbols) {
+ var symbols = Object.getOwnPropertySymbols(object);
+
+ if (enumerableOnly) {
+ symbols = symbols.filter(function (sym) {
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
+ });
+ }
+
+ keys.push.apply(keys, symbols);
+ }
+
+ return keys;
+}
+
+function _objectSpread2(target) {
+ for (var i = 1; i < arguments.length; i++) {
+ var source = arguments[i] != null ? arguments[i] : {};
+
+ if (i % 2) {
+ ownKeys(Object(source), true).forEach(function (key) {
+ _defineProperty(target, key, source[key]);
+ });
+ } else if (Object.getOwnPropertyDescriptors) {
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
+ } else {
+ ownKeys(Object(source)).forEach(function (key) {
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
+ });
+ }
+ }
+
+ return target;
+} \ No newline at end of file
diff --git a/node_modules/@babel/helpers/lib/helpers/typeof.js b/node_modules/@babel/helpers/lib/helpers/typeof.js
new file mode 100644
index 0000000..b1a728b
--- /dev/null
+++ b/node_modules/@babel/helpers/lib/helpers/typeof.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _typeof;
+
+function _typeof(obj) {
+ "@babel/helpers - typeof";
+
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
+ exports.default = _typeof = function (obj) {
+ return typeof obj;
+ };
+ } else {
+ exports.default = _typeof = function (obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ };
+ }
+
+ return _typeof(obj);
+} \ No newline at end of file
diff --git a/node_modules/@babel/helpers/lib/helpers/wrapRegExp.js b/node_modules/@babel/helpers/lib/helpers/wrapRegExp.js
new file mode 100644
index 0000000..6375b71
--- /dev/null
+++ b/node_modules/@babel/helpers/lib/helpers/wrapRegExp.js
@@ -0,0 +1,73 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _wrapRegExp;
+
+var _setPrototypeOf = require("setPrototypeOf");
+
+var _inherits = require("inherits");
+
+function _wrapRegExp() {
+ exports.default = _wrapRegExp = function (re, groups) {
+ return new BabelRegExp(re, undefined, groups);
+ };
+
+ var _super = RegExp.prototype;
+
+ var _groups = new WeakMap();
+
+ function BabelRegExp(re, flags, groups) {
+ var _this = new RegExp(re, flags);
+
+ _groups.set(_this, groups || _groups.get(re));
+
+ return _setPrototypeOf(_this, BabelRegExp.prototype);
+ }
+
+ _inherits(BabelRegExp, RegExp);
+
+ BabelRegExp.prototype.exec = function (str) {
+ var result = _super.exec.call(this, str);
+
+ if (result) result.groups = buildGroups(result, this);
+ return result;
+ };
+
+ BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
+ if (typeof substitution === "string") {
+ var groups = _groups.get(this);
+
+ return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
+ return "$" + groups[name];
+ }));
+ } else if (typeof substitution === "function") {
+ var _this = this;
+
+ return _super[Symbol.replace].call(this, str, function () {
+ var args = arguments;
+
+ if (typeof args[args.length - 1] !== "object") {
+ args = [].slice.call(args);
+ args.push(buildGroups(args, _this));
+ }
+
+ return substitution.apply(this, args);
+ });
+ } else {
+ return _super[Symbol.replace].call(this, str, substitution);
+ }
+ };
+
+ function buildGroups(result, re) {
+ var g = _groups.get(re);
+
+ return Object.keys(g).reduce(function (groups, name) {
+ groups[name] = result[g[name]];
+ return groups;
+ }, Object.create(null));
+ }
+
+ return _wrapRegExp.apply(this, arguments);
+} \ No newline at end of file
diff --git a/node_modules/@babel/helpers/lib/index.js b/node_modules/@babel/helpers/lib/index.js
new file mode 100644
index 0000000..5e793d5
--- /dev/null
+++ b/node_modules/@babel/helpers/lib/index.js
@@ -0,0 +1,300 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+exports.ensure = ensure;
+exports.get = get;
+exports.getDependencies = getDependencies;
+exports.list = void 0;
+exports.minVersion = minVersion;
+
+var _traverse = require("@babel/traverse");
+
+var _t = require("@babel/types");
+
+var _helpers = require("./helpers");
+
+const {
+ assignmentExpression,
+ cloneNode,
+ expressionStatement,
+ file: t_file,
+ identifier,
+ variableDeclaration,
+ variableDeclarator
+} = _t;
+
+function makePath(path) {
+ const parts = [];
+
+ for (; path.parentPath; path = path.parentPath) {
+ parts.push(path.key);
+ if (path.inList) parts.push(path.listKey);
+ }
+
+ return parts.reverse().join(".");
+}
+
+let fileClass = undefined;
+
+function getHelperMetadata(file) {
+ const globals = new Set();
+ const localBindingNames = new Set();
+ const dependencies = new Map();
+ let exportName;
+ let exportPath;
+ const exportBindingAssignments = [];
+ const importPaths = [];
+ const importBindingsReferences = [];
+ const dependencyVisitor = {
+ ImportDeclaration(child) {
+ const name = child.node.source.value;
+
+ if (!_helpers.default[name]) {
+ throw child.buildCodeFrameError(`Unknown helper ${name}`);
+ }
+
+ if (child.get("specifiers").length !== 1 || !child.get("specifiers.0").isImportDefaultSpecifier()) {
+ throw child.buildCodeFrameError("Helpers can only import a default value");
+ }
+
+ const bindingIdentifier = child.node.specifiers[0].local;
+ dependencies.set(bindingIdentifier, name);
+ importPaths.push(makePath(child));
+ },
+
+ ExportDefaultDeclaration(child) {
+ const decl = child.get("declaration");
+
+ if (decl.isFunctionDeclaration()) {
+ if (!decl.node.id) {
+ throw decl.buildCodeFrameError("Helpers should give names to their exported func declaration");
+ }
+
+ exportName = decl.node.id.name;
+ }
+
+ exportPath = makePath(child);
+ },
+
+ ExportAllDeclaration(child) {
+ throw child.buildCodeFrameError("Helpers can only export default");
+ },
+
+ ExportNamedDeclaration(child) {
+ throw child.buildCodeFrameError("Helpers can only export default");
+ },
+
+ Statement(child) {
+ if (child.isModuleDeclaration()) return;
+ child.skip();
+ }
+
+ };
+ const referenceVisitor = {
+ Program(path) {
+ const bindings = path.scope.getAllBindings();
+ Object.keys(bindings).forEach(name => {
+ if (name === exportName) return;
+ if (dependencies.has(bindings[name].identifier)) return;
+ localBindingNames.add(name);
+ });
+ },
+
+ ReferencedIdentifier(child) {
+ const name = child.node.name;
+ const binding = child.scope.getBinding(name);
+
+ if (!binding) {
+ globals.add(name);
+ } else if (dependencies.has(binding.identifier)) {
+ importBindingsReferences.push(makePath(child));
+ }
+ },
+
+ AssignmentExpression(child) {
+ const left = child.get("left");
+ if (!(exportName in left.getBindingIdentifiers())) return;
+
+ if (!left.isIdentifier()) {
+ throw left.buildCodeFrameError("Only simple assignments to exports are allowed in helpers");
+ }
+
+ const binding = child.scope.getBinding(exportName);
+
+ if (binding != null && binding.scope.path.isProgram()) {
+ exportBindingAssignments.push(makePath(child));
+ }
+ }
+
+ };
+ (0, _traverse.default)(file.ast, dependencyVisitor, file.scope);
+ (0, _traverse.default)(file.ast, referenceVisitor, file.scope);
+ if (!exportPath) throw new Error("Helpers must default-export something.");
+ exportBindingAssignments.reverse();
+ return {
+ globals: Array.from(globals),
+ localBindingNames: Array.from(localBindingNames),
+ dependencies,
+ exportBindingAssignments,
+ exportPath,
+ exportName,
+ importBindingsReferences,
+ importPaths
+ };
+}
+
+function permuteHelperAST(file, metadata, id, localBindings, getDependency) {
+ if (localBindings && !id) {
+ throw new Error("Unexpected local bindings for module-based helpers.");
+ }
+
+ if (!id) return;
+ const {
+ localBindingNames,
+ dependencies,
+ exportBindingAssignments,
+ exportPath,
+ exportName,
+ importBindingsReferences,
+ importPaths
+ } = metadata;
+ const dependenciesRefs = {};
+ dependencies.forEach((name, id) => {
+ dependenciesRefs[id.name] = typeof getDependency === "function" && getDependency(name) || id;
+ });
+ const toRename = {};
+ const bindings = new Set(localBindings || []);
+ localBindingNames.forEach(name => {
+ let newName = name;
+
+ while (bindings.has(newName)) newName = "_" + newName;
+
+ if (newName !== name) toRename[name] = newName;
+ });
+
+ if (id.type === "Identifier" && exportName !== id.name) {
+ toRename[exportName] = id.name;
+ }
+
+ const visitor = {
+ Program(path) {
+ const exp = path.get(exportPath);
+ const imps = importPaths.map(p => path.get(p));
+ const impsBindingRefs = importBindingsReferences.map(p => path.get(p));
+ const decl = exp.get("declaration");
+
+ if (id.type === "Identifier") {
+ if (decl.isFunctionDeclaration()) {
+ exp.replaceWith(decl);
+ } else {
+ exp.replaceWith(variableDeclaration("var", [variableDeclarator(id, decl.node)]));
+ }
+ } else if (id.type === "MemberExpression") {
+ if (decl.isFunctionDeclaration()) {
+ exportBindingAssignments.forEach(assignPath => {
+ const assign = path.get(assignPath);
+ assign.replaceWith(assignmentExpression("=", id, assign.node));
+ });
+ exp.replaceWith(decl);
+ path.pushContainer("body", expressionStatement(assignmentExpression("=", id, identifier(exportName))));
+ } else {
+ exp.replaceWith(expressionStatement(assignmentExpression("=", id, decl.node)));
+ }
+ } else {
+ throw new Error("Unexpected helper format.");
+ }
+
+ Object.keys(toRename).forEach(name => {
+ path.scope.rename(name, toRename[name]);
+ });
+
+ for (const path of imps) path.remove();
+
+ for (const path of impsBindingRefs) {
+ const node = cloneNode(dependenciesRefs[path.node.name]);
+ path.replaceWith(node);
+ }
+
+ path.stop();
+ }
+
+ };
+ (0, _traverse.default)(file.ast, visitor, file.scope);
+}
+
+const helperData = Object.create(null);
+
+function loadHelper(name) {
+ if (!helperData[name]) {
+ const helper = _helpers.default[name];
+
+ if (!helper) {
+ throw Object.assign(new ReferenceError(`Unknown helper ${name}`), {
+ code: "BABEL_HELPER_UNKNOWN",
+ helper: name
+ });
+ }
+
+ const fn = () => {
+ const file = {
+ ast: t_file(helper.ast())
+ };
+
+ if (fileClass) {
+ return new fileClass({
+ filename: `babel-helper://${name}`
+ }, file);
+ }
+
+ return file;
+ };
+
+ const metadata = getHelperMetadata(fn());
+ helperData[name] = {
+ build(getDependency, id, localBindings) {
+ const file = fn();
+ permuteHelperAST(file, metadata, id, localBindings, getDependency);
+ return {
+ nodes: file.ast.program.body,
+ globals: metadata.globals
+ };
+ },
+
+ minVersion() {
+ return helper.minVersion;
+ },
+
+ dependencies: metadata.dependencies
+ };
+ }
+
+ return helperData[name];
+}
+
+function get(name, getDependency, id, localBindings) {
+ return loadHelper(name).build(getDependency, id, localBindings);
+}
+
+function minVersion(name) {
+ return loadHelper(name).minVersion();
+}
+
+function getDependencies(name) {
+ return Array.from(loadHelper(name).dependencies.values());
+}
+
+function ensure(name, newFileClass) {
+ if (!fileClass) {
+ fileClass = newFileClass;
+ }
+
+ loadHelper(name);
+}
+
+const list = Object.keys(_helpers.default).map(name => name.replace(/^_/, ""));
+exports.list = list;
+var _default = get;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/helpers/package.json b/node_modules/@babel/helpers/package.json
new file mode 100644
index 0000000..95203cd
--- /dev/null
+++ b/node_modules/@babel/helpers/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "@babel/helpers",
+ "version": "7.17.2",
+ "description": "Collection of helper functions used by Babel transforms.",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-helpers",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-helpers"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/template": "^7.16.7",
+ "@babel/traverse": "^7.17.0",
+ "@babel/types": "^7.17.0"
+ },
+ "devDependencies": {
+ "@babel/helper-plugin-test-runner": "^7.16.7",
+ "terser": "^5.9.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/helpers/scripts/generate-helpers.js b/node_modules/@babel/helpers/scripts/generate-helpers.js
new file mode 100644
index 0000000..1c59746
--- /dev/null
+++ b/node_modules/@babel/helpers/scripts/generate-helpers.js
@@ -0,0 +1,64 @@
+import fs from "fs";
+import { join } from "path";
+import { URL, fileURLToPath } from "url";
+import { minify } from "terser"; // eslint-disable-line
+
+const HELPERS_FOLDER = new URL("../src/helpers", import.meta.url);
+const IGNORED_FILES = new Set(["package.json"]);
+
+export default async function generateHelpers() {
+ let output = `/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'yarn gulp generate-runtime-helpers'
+ */
+
+import template from "@babel/template";
+
+function helper(minVersion, source) {
+ return Object.freeze({
+ minVersion,
+ ast: () => template.program.ast(source),
+ })
+}
+
+export default Object.freeze({
+`;
+
+ for (const file of (await fs.promises.readdir(HELPERS_FOLDER)).sort()) {
+ if (IGNORED_FILES.has(file)) continue;
+ if (file.startsWith(".")) continue; // ignore e.g. vim swap files
+
+ const [helperName] = file.split(".");
+
+ const filePath = join(fileURLToPath(HELPERS_FOLDER), file);
+ if (!file.endsWith(".js")) {
+ console.error("ignoring", filePath);
+ continue;
+ }
+
+ const fileContents = await fs.promises.readFile(filePath, "utf8");
+ const minVersionMatch = fileContents.match(
+ /^\s*\/\*\s*@minVersion\s+(?<minVersion>\S+)\s*\*\/\s*$/m
+ );
+ if (!minVersionMatch) {
+ throw new Error(`@minVersion number missing in ${filePath}`);
+ }
+ const { minVersion } = minVersionMatch.groups;
+
+ const source = await minify(fileContents, {
+ mangle: false,
+ // The _typeof helper has a custom directive that we must keep
+ compress: { directives: false },
+ });
+
+ output += `\
+ ${JSON.stringify(helperName)}: helper(
+ ${JSON.stringify(minVersion)},
+ ${JSON.stringify(source.code)},
+ ),
+`;
+ }
+
+ output += "});";
+ return output;
+}
diff --git a/node_modules/@babel/helpers/scripts/package.json b/node_modules/@babel/helpers/scripts/package.json
new file mode 100644
index 0000000..5ffd980
--- /dev/null
+++ b/node_modules/@babel/helpers/scripts/package.json
@@ -0,0 +1 @@
+{ "type": "module" }
diff --git a/node_modules/@babel/highlight/LICENSE b/node_modules/@babel/highlight/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/highlight/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/highlight/README.md b/node_modules/@babel/highlight/README.md
new file mode 100644
index 0000000..f8887ad
--- /dev/null
+++ b/node_modules/@babel/highlight/README.md
@@ -0,0 +1,19 @@
+# @babel/highlight
+
+> Syntax highlight JavaScript strings for output in terminals.
+
+See our website [@babel/highlight](https://babeljs.io/docs/en/babel-highlight) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/highlight
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/highlight --dev
+```
diff --git a/node_modules/@babel/highlight/lib/index.js b/node_modules/@babel/highlight/lib/index.js
new file mode 100644
index 0000000..d323b39
--- /dev/null
+++ b/node_modules/@babel/highlight/lib/index.js
@@ -0,0 +1,116 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = highlight;
+exports.getChalk = getChalk;
+exports.shouldHighlight = shouldHighlight;
+
+var _jsTokens = require("js-tokens");
+
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+
+var _chalk = require("chalk");
+
+const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]);
+
+function getDefs(chalk) {
+ return {
+ keyword: chalk.cyan,
+ capitalized: chalk.yellow,
+ jsxIdentifier: chalk.yellow,
+ punctuator: chalk.yellow,
+ number: chalk.magenta,
+ string: chalk.green,
+ regex: chalk.magenta,
+ comment: chalk.grey,
+ invalid: chalk.white.bgRed.bold
+ };
+}
+
+const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
+const BRACKET = /^[()[\]{}]$/;
+let tokenize;
+{
+ const JSX_TAG = /^[a-z][\w-]*$/i;
+
+ const getTokenType = function (token, offset, text) {
+ if (token.type === "name") {
+ if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {
+ return "keyword";
+ }
+
+ if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == "</")) {
+ return "jsxIdentifier";
+ }
+
+ if (token.value[0] !== token.value[0].toLowerCase()) {
+ return "capitalized";
+ }
+ }
+
+ if (token.type === "punctuator" && BRACKET.test(token.value)) {
+ return "bracket";
+ }
+
+ if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
+ return "punctuator";
+ }
+
+ return token.type;
+ };
+
+ tokenize = function* (text) {
+ let match;
+
+ while (match = _jsTokens.default.exec(text)) {
+ const token = _jsTokens.matchToToken(match);
+
+ yield {
+ type: getTokenType(token, match.index, text),
+ value: token.value
+ };
+ }
+ };
+}
+
+function highlightTokens(defs, text) {
+ let highlighted = "";
+
+ for (const {
+ type,
+ value
+ } of tokenize(text)) {
+ const colorize = defs[type];
+
+ if (colorize) {
+ highlighted += value.split(NEWLINE).map(str => colorize(str)).join("\n");
+ } else {
+ highlighted += value;
+ }
+ }
+
+ return highlighted;
+}
+
+function shouldHighlight(options) {
+ return !!_chalk.supportsColor || options.forceColor;
+}
+
+function getChalk(options) {
+ return options.forceColor ? new _chalk.constructor({
+ enabled: true,
+ level: 1
+ }) : _chalk;
+}
+
+function highlight(code, options = {}) {
+ if (code !== "" && shouldHighlight(options)) {
+ const chalk = getChalk(options);
+ const defs = getDefs(chalk);
+ return highlightTokens(defs, code);
+ } else {
+ return code;
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/highlight/node_modules/ansi-styles/index.js b/node_modules/@babel/highlight/node_modules/ansi-styles/index.js
new file mode 100644
index 0000000..90a871c
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/ansi-styles/index.js
@@ -0,0 +1,165 @@
+'use strict';
+const colorConvert = require('color-convert');
+
+const wrapAnsi16 = (fn, offset) => function () {
+ const code = fn.apply(colorConvert, arguments);
+ return `\u001B[${code + offset}m`;
+};
+
+const wrapAnsi256 = (fn, offset) => function () {
+ const code = fn.apply(colorConvert, arguments);
+ return `\u001B[${38 + offset};5;${code}m`;
+};
+
+const wrapAnsi16m = (fn, offset) => function () {
+ const rgb = fn.apply(colorConvert, arguments);
+ return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
+};
+
+function assembleStyles() {
+ const codes = new Map();
+ const styles = {
+ modifier: {
+ reset: [0, 0],
+ // 21 isn't widely supported and 22 does the same thing
+ bold: [1, 22],
+ dim: [2, 22],
+ italic: [3, 23],
+ underline: [4, 24],
+ inverse: [7, 27],
+ hidden: [8, 28],
+ strikethrough: [9, 29]
+ },
+ color: {
+ 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],
+
+ // Bright color
+ redBright: [91, 39],
+ greenBright: [92, 39],
+ yellowBright: [93, 39],
+ blueBright: [94, 39],
+ magentaBright: [95, 39],
+ cyanBright: [96, 39],
+ whiteBright: [97, 39]
+ },
+ bgColor: {
+ bgBlack: [40, 49],
+ bgRed: [41, 49],
+ bgGreen: [42, 49],
+ bgYellow: [43, 49],
+ bgBlue: [44, 49],
+ bgMagenta: [45, 49],
+ bgCyan: [46, 49],
+ bgWhite: [47, 49],
+
+ // Bright color
+ bgBlackBright: [100, 49],
+ bgRedBright: [101, 49],
+ bgGreenBright: [102, 49],
+ bgYellowBright: [103, 49],
+ bgBlueBright: [104, 49],
+ bgMagentaBright: [105, 49],
+ bgCyanBright: [106, 49],
+ bgWhiteBright: [107, 49]
+ }
+ };
+
+ // Fix humans
+ styles.color.grey = styles.color.gray;
+
+ for (const groupName of Object.keys(styles)) {
+ const group = styles[groupName];
+
+ for (const styleName of Object.keys(group)) {
+ const style = group[styleName];
+
+ styles[styleName] = {
+ open: `\u001B[${style[0]}m`,
+ close: `\u001B[${style[1]}m`
+ };
+
+ group[styleName] = styles[styleName];
+
+ codes.set(style[0], style[1]);
+ }
+
+ Object.defineProperty(styles, groupName, {
+ value: group,
+ enumerable: false
+ });
+
+ Object.defineProperty(styles, 'codes', {
+ value: codes,
+ enumerable: false
+ });
+ }
+
+ const ansi2ansi = n => n;
+ const rgb2rgb = (r, g, b) => [r, g, b];
+
+ styles.color.close = '\u001B[39m';
+ styles.bgColor.close = '\u001B[49m';
+
+ styles.color.ansi = {
+ ansi: wrapAnsi16(ansi2ansi, 0)
+ };
+ styles.color.ansi256 = {
+ ansi256: wrapAnsi256(ansi2ansi, 0)
+ };
+ styles.color.ansi16m = {
+ rgb: wrapAnsi16m(rgb2rgb, 0)
+ };
+
+ styles.bgColor.ansi = {
+ ansi: wrapAnsi16(ansi2ansi, 10)
+ };
+ styles.bgColor.ansi256 = {
+ ansi256: wrapAnsi256(ansi2ansi, 10)
+ };
+ styles.bgColor.ansi16m = {
+ rgb: wrapAnsi16m(rgb2rgb, 10)
+ };
+
+ for (let key of Object.keys(colorConvert)) {
+ if (typeof colorConvert[key] !== 'object') {
+ continue;
+ }
+
+ const suite = colorConvert[key];
+
+ if (key === 'ansi16') {
+ key = 'ansi';
+ }
+
+ if ('ansi16' in suite) {
+ styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
+ styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
+ }
+
+ if ('ansi256' in suite) {
+ styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
+ styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
+ }
+
+ if ('rgb' in suite) {
+ styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
+ styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
+ }
+ }
+
+ return styles;
+}
+
+// Make the export immutable
+Object.defineProperty(module, 'exports', {
+ enumerable: true,
+ get: assembleStyles
+});
diff --git a/node_modules/@babel/highlight/node_modules/ansi-styles/license b/node_modules/@babel/highlight/node_modules/ansi-styles/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/ansi-styles/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/highlight/node_modules/ansi-styles/package.json b/node_modules/@babel/highlight/node_modules/ansi-styles/package.json
new file mode 100644
index 0000000..65edb48
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/ansi-styles/package.json
@@ -0,0 +1,56 @@
+{
+ "name": "ansi-styles",
+ "version": "3.2.1",
+ "description": "ANSI escape codes for styling strings in the terminal",
+ "license": "MIT",
+ "repository": "chalk/ansi-styles",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava",
+ "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "ansi",
+ "styles",
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "tty",
+ "escape",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "color-convert": "^1.9.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "babel-polyfill": "^6.23.0",
+ "svg-term-cli": "^2.1.1",
+ "xo": "*"
+ },
+ "ava": {
+ "require": "babel-polyfill"
+ }
+}
diff --git a/node_modules/@babel/highlight/node_modules/ansi-styles/readme.md b/node_modules/@babel/highlight/node_modules/ansi-styles/readme.md
new file mode 100644
index 0000000..3158e2d
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/ansi-styles/readme.md
@@ -0,0 +1,147 @@
+# ansi-styles [![Build Status](https://travis-ci.org/chalk/ansi-styles.svg?branch=master)](https://travis-ci.org/chalk/ansi-styles)
+
+> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal
+
+You probably want the higher-level [chalk](https://github.com/chalk/chalk) module for styling your strings.
+
+<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" width="900">
+
+
+## Install
+
+```
+$ npm install ansi-styles
+```
+
+
+## Usage
+
+```js
+const style = require('ansi-styles');
+
+console.log(`${style.green.open}Hello world!${style.green.close}`);
+
+
+// Color conversion between 16/256/truecolor
+// NOTE: If conversion goes to 16 colors or 256 colors, the original color
+// may be degraded to fit that color palette. This means terminals
+// that do not support 16 million colors will best-match the
+// original color.
+console.log(style.bgColor.ansi.hsl(120, 80, 72) + 'Hello world!' + style.bgColor.close);
+console.log(style.color.ansi256.rgb(199, 20, 250) + 'Hello world!' + style.color.close);
+console.log(style.color.ansi16m.hex('#ABCDEF') + 'Hello world!' + style.color.close);
+```
+
+## API
+
+Each style has an `open` and `close` property.
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(Not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(Not widely supported)*
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue`
+- `magenta`
+- `cyan`
+- `white`
+- `gray` ("bright black")
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright`
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+
+## Advanced usage
+
+By default, you get a map of styles, but the styles are also available as groups. They are non-enumerable so they don't show up unless you access them explicitly. This makes it easier to expose only a subset in a higher-level module.
+
+- `style.modifier`
+- `style.color`
+- `style.bgColor`
+
+###### Example
+
+```js
+console.log(style.color.green.open);
+```
+
+Raw escape codes (i.e. without the CSI escape prefix `\u001B[` and render mode postfix `m`) are available under `style.codes`, which returns a `Map` with the open codes as keys and close codes as values.
+
+###### Example
+
+```js
+console.log(style.codes.get(36));
+//=> 39
+```
+
+
+## [256 / 16 million (TrueColor) support](https://gist.github.com/XVilka/8346728)
+
+`ansi-styles` uses the [`color-convert`](https://github.com/Qix-/color-convert) package to allow for converting between various colors and ANSI escapes, with support for 256 and 16 million colors.
+
+To use these, call the associated conversion function with the intended output, for example:
+
+```js
+style.color.ansi.rgb(100, 200, 15); // RGB to 16 color ansi foreground code
+style.bgColor.ansi.rgb(100, 200, 15); // RGB to 16 color ansi background code
+
+style.color.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
+style.bgColor.ansi256.hsl(120, 100, 60); // HSL to 256 color ansi foreground code
+
+style.color.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color foreground code
+style.bgColor.ansi16m.hex('#C0FFEE'); // Hex (RGB) to 16 million color background code
+```
+
+
+## Related
+
+- [ansi-escapes](https://github.com/sindresorhus/ansi-escapes) - ANSI escape codes for manipulating the terminal
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/node_modules/@babel/highlight/node_modules/chalk/index.js b/node_modules/@babel/highlight/node_modules/chalk/index.js
new file mode 100644
index 0000000..1cc5fa8
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/chalk/index.js
@@ -0,0 +1,228 @@
+'use strict';
+const escapeStringRegexp = require('escape-string-regexp');
+const ansiStyles = require('ansi-styles');
+const stdoutColor = require('supports-color').stdout;
+
+const template = require('./templates.js');
+
+const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCase().startsWith('xterm');
+
+// `supportsColor.level` → `ansiStyles.color[name]` mapping
+const levelMapping = ['ansi', 'ansi', 'ansi256', 'ansi16m'];
+
+// `color-convert` models to exclude from the Chalk API due to conflicts and such
+const skipModels = new Set(['gray']);
+
+const styles = Object.create(null);
+
+function applyOptions(obj, options) {
+ options = options || {};
+
+ // Detect level if not set manually
+ const scLevel = stdoutColor ? stdoutColor.level : 0;
+ obj.level = options.level === undefined ? scLevel : options.level;
+ obj.enabled = 'enabled' in options ? options.enabled : obj.level > 0;
+}
+
+function Chalk(options) {
+ // We check for this.template here since calling `chalk.constructor()`
+ // by itself will have a `this` of a previously constructed chalk object
+ if (!this || !(this instanceof Chalk) || this.template) {
+ const chalk = {};
+ applyOptions(chalk, options);
+
+ chalk.template = function () {
+ const args = [].slice.call(arguments);
+ return chalkTag.apply(null, [chalk.template].concat(args));
+ };
+
+ Object.setPrototypeOf(chalk, Chalk.prototype);
+ Object.setPrototypeOf(chalk.template, chalk);
+
+ chalk.template.constructor = Chalk;
+
+ return chalk.template;
+ }
+
+ applyOptions(this, options);
+}
+
+// Use bright blue on Windows as the normal blue color is illegible
+if (isSimpleWindowsTerm) {
+ ansiStyles.blue.open = '\u001B[94m';
+}
+
+for (const key of Object.keys(ansiStyles)) {
+ ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g');
+
+ styles[key] = {
+ get() {
+ const codes = ansiStyles[key];
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
+ }
+ };
+}
+
+styles.visible = {
+ get() {
+ return build.call(this, this._styles || [], true, 'visible');
+ }
+};
+
+ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), 'g');
+for (const model of Object.keys(ansiStyles.color.ansi)) {
+ if (skipModels.has(model)) {
+ continue;
+ }
+
+ styles[model] = {
+ get() {
+ const level = this.level;
+ return function () {
+ const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
+ const codes = {
+ open,
+ close: ansiStyles.color.close,
+ closeRe: ansiStyles.color.closeRe
+ };
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
+ };
+ }
+ };
+}
+
+ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), 'g');
+for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
+ if (skipModels.has(model)) {
+ continue;
+ }
+
+ const bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);
+ styles[bgModel] = {
+ get() {
+ const level = this.level;
+ return function () {
+ const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
+ const codes = {
+ open,
+ close: ansiStyles.bgColor.close,
+ closeRe: ansiStyles.bgColor.closeRe
+ };
+ return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
+ };
+ }
+ };
+}
+
+const proto = Object.defineProperties(() => {}, styles);
+
+function build(_styles, _empty, key) {
+ const builder = function () {
+ return applyStyle.apply(builder, arguments);
+ };
+
+ builder._styles = _styles;
+ builder._empty = _empty;
+
+ const self = this;
+
+ Object.defineProperty(builder, 'level', {
+ enumerable: true,
+ get() {
+ return self.level;
+ },
+ set(level) {
+ self.level = level;
+ }
+ });
+
+ Object.defineProperty(builder, 'enabled', {
+ enumerable: true,
+ get() {
+ return self.enabled;
+ },
+ set(enabled) {
+ self.enabled = enabled;
+ }
+ });
+
+ // See below for fix regarding invisible grey/dim combination on Windows
+ builder.hasGrey = this.hasGrey || key === 'gray' || key === 'grey';
+
+ // `__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; // eslint-disable-line no-proto
+
+ return builder;
+}
+
+function applyStyle() {
+ // Support varags, but simply cast to string in case there's only one arg
+ const args = arguments;
+ const argsLen = args.length;
+ let str = String(arguments[0]);
+
+ if (argsLen === 0) {
+ return '';
+ }
+
+ if (argsLen > 1) {
+ // Don't slice `arguments`, it prevents V8 optimizations
+ for (let a = 1; a < argsLen; a++) {
+ str += ' ' + args[a];
+ }
+ }
+
+ if (!this.enabled || this.level <= 0 || !str) {
+ return this._empty ? '' : str;
+ }
+
+ // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe,
+ // see https://github.com/chalk/chalk/issues/58
+ // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop.
+ const originalDim = ansiStyles.dim.open;
+ if (isSimpleWindowsTerm && this.hasGrey) {
+ ansiStyles.dim.open = '';
+ }
+
+ for (const code of this._styles.slice().reverse()) {
+ // Replace any instances already present with a re-opening code
+ // otherwise only the part of the string until said closing code
+ // will be colored, and the rest will simply be 'plain'.
+ str = code.open + str.replace(code.closeRe, code.open) + code.close;
+
+ // Close the styling before a linebreak and reopen
+ // after next line to fix a bleed issue on macOS
+ // https://github.com/chalk/chalk/pull/92
+ str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
+ }
+
+ // Reset the original `dim` if we changed it to work around the Windows dimmed gray issue
+ ansiStyles.dim.open = originalDim;
+
+ return str;
+}
+
+function chalkTag(chalk, strings) {
+ if (!Array.isArray(strings)) {
+ // If chalk() was called by itself or with a string,
+ // return the string itself as a string.
+ return [].slice.call(arguments, 1).join(' ');
+ }
+
+ const args = [].slice.call(arguments, 2);
+ const parts = [strings.raw[0]];
+
+ for (let i = 1; i < strings.length; i++) {
+ parts.push(String(args[i - 1]).replace(/[{}\\]/g, '\\$&'));
+ parts.push(String(strings.raw[i]));
+ }
+
+ return template(chalk, parts.join(''));
+}
+
+Object.defineProperties(Chalk.prototype, styles);
+
+module.exports = Chalk(); // eslint-disable-line new-cap
+module.exports.supportsColor = stdoutColor;
+module.exports.default = module.exports; // For TypeScript
diff --git a/node_modules/@babel/highlight/node_modules/chalk/index.js.flow b/node_modules/@babel/highlight/node_modules/chalk/index.js.flow
new file mode 100644
index 0000000..622caaa
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/chalk/index.js.flow
@@ -0,0 +1,93 @@
+// @flow strict
+
+type TemplateStringsArray = $ReadOnlyArray<string>;
+
+export type Level = $Values<{
+ None: 0,
+ Basic: 1,
+ Ansi256: 2,
+ TrueColor: 3
+}>;
+
+export type ChalkOptions = {|
+ enabled?: boolean,
+ level?: Level
+|};
+
+export type ColorSupport = {|
+ level: Level,
+ hasBasic: boolean,
+ has256: boolean,
+ has16m: boolean
+|};
+
+export interface Chalk {
+ (...text: string[]): string,
+ (text: TemplateStringsArray, ...placeholders: string[]): string,
+ constructor(options?: ChalkOptions): Chalk,
+ enabled: boolean,
+ level: Level,
+ rgb(r: number, g: number, b: number): Chalk,
+ hsl(h: number, s: number, l: number): Chalk,
+ hsv(h: number, s: number, v: number): Chalk,
+ hwb(h: number, w: number, b: number): Chalk,
+ bgHex(color: string): Chalk,
+ bgKeyword(color: string): Chalk,
+ bgRgb(r: number, g: number, b: number): Chalk,
+ bgHsl(h: number, s: number, l: number): Chalk,
+ bgHsv(h: number, s: number, v: number): Chalk,
+ bgHwb(h: number, w: number, b: number): Chalk,
+ hex(color: string): Chalk,
+ keyword(color: string): Chalk,
+
+ +reset: Chalk,
+ +bold: Chalk,
+ +dim: Chalk,
+ +italic: Chalk,
+ +underline: Chalk,
+ +inverse: Chalk,
+ +hidden: Chalk,
+ +strikethrough: Chalk,
+
+ +visible: Chalk,
+
+ +black: Chalk,
+ +red: Chalk,
+ +green: Chalk,
+ +yellow: Chalk,
+ +blue: Chalk,
+ +magenta: Chalk,
+ +cyan: Chalk,
+ +white: Chalk,
+ +gray: Chalk,
+ +grey: Chalk,
+ +blackBright: Chalk,
+ +redBright: Chalk,
+ +greenBright: Chalk,
+ +yellowBright: Chalk,
+ +blueBright: Chalk,
+ +magentaBright: Chalk,
+ +cyanBright: Chalk,
+ +whiteBright: Chalk,
+
+ +bgBlack: Chalk,
+ +bgRed: Chalk,
+ +bgGreen: Chalk,
+ +bgYellow: Chalk,
+ +bgBlue: Chalk,
+ +bgMagenta: Chalk,
+ +bgCyan: Chalk,
+ +bgWhite: Chalk,
+ +bgBlackBright: Chalk,
+ +bgRedBright: Chalk,
+ +bgGreenBright: Chalk,
+ +bgYellowBright: Chalk,
+ +bgBlueBright: Chalk,
+ +bgMagentaBright: Chalk,
+ +bgCyanBright: Chalk,
+ +bgWhiteBrigh: Chalk,
+
+ supportsColor: ColorSupport
+};
+
+declare module.exports: Chalk;
diff --git a/node_modules/@babel/highlight/node_modules/chalk/license b/node_modules/@babel/highlight/node_modules/chalk/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/chalk/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/highlight/node_modules/chalk/package.json b/node_modules/@babel/highlight/node_modules/chalk/package.json
new file mode 100644
index 0000000..bc32468
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/chalk/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "chalk",
+ "version": "2.4.2",
+ "description": "Terminal string styling done right",
+ "license": "MIT",
+ "repository": "chalk/chalk",
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && tsc --project types && flow --max-warnings=0 && nyc ava",
+ "bench": "matcha benchmark.js",
+ "coveralls": "nyc report --reporter=text-lcov | coveralls"
+ },
+ "files": [
+ "index.js",
+ "templates.js",
+ "types/index.d.ts",
+ "index.js.flow"
+ ],
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "string",
+ "str",
+ "ansi",
+ "style",
+ "styles",
+ "tty",
+ "formatting",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "log",
+ "logging",
+ "command-line",
+ "text"
+ ],
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "devDependencies": {
+ "ava": "*",
+ "coveralls": "^3.0.0",
+ "execa": "^0.9.0",
+ "flow-bin": "^0.68.0",
+ "import-fresh": "^2.0.0",
+ "matcha": "^0.7.0",
+ "nyc": "^11.0.2",
+ "resolve-from": "^4.0.0",
+ "typescript": "^2.5.3",
+ "xo": "*"
+ },
+ "types": "types/index.d.ts",
+ "xo": {
+ "envs": [
+ "node",
+ "mocha"
+ ],
+ "ignores": [
+ "test/_flow.js"
+ ]
+ }
+}
diff --git a/node_modules/@babel/highlight/node_modules/chalk/readme.md b/node_modules/@babel/highlight/node_modules/chalk/readme.md
new file mode 100644
index 0000000..d298e2c
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/chalk/readme.md
@@ -0,0 +1,314 @@
+<h1 align="center">
+ <br>
+ <br>
+ <img width="320" src="media/logo.svg" alt="Chalk">
+ <br>
+ <br>
+ <br>
+</h1>
+
+> Terminal string styling done right
+
+[![Build Status](https://travis-ci.org/chalk/chalk.svg?branch=master)](https://travis-ci.org/chalk/chalk) [![Coverage Status](https://coveralls.io/repos/github/chalk/chalk/badge.svg?branch=master)](https://coveralls.io/github/chalk/chalk?branch=master) [![](https://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo) [![Mentioned in Awesome Node.js](https://awesome.re/mentioned-badge.svg)](https://github.com/sindresorhus/awesome-nodejs)
+
+### [See what's new in Chalk 2](https://github.com/chalk/chalk/releases/tag/v2.0.0)
+
+<img src="https://cdn.rawgit.com/chalk/ansi-styles/8261697c95bf34b6c7767e2cbe9941a851d59385/screenshot.svg" alt="" width="900">
+
+
+## Highlights
+
+- Expressive API
+- Highly performant
+- Ability to nest styles
+- [256/Truecolor color support](#256-and-truecolor-color-support)
+- Auto-detects color support
+- Doesn't extend `String.prototype`
+- Clean and focused
+- Actively maintained
+- [Used by ~23,000 packages](https://www.npmjs.com/browse/depended/chalk) as of December 31, 2017
+
+
+## Install
+
+```console
+$ npm install chalk
+```
+
+<a href="https://www.patreon.com/sindresorhus">
+ <img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" width="160">
+</a>
+
+
+## Usage
+
+```js
+const chalk = require('chalk');
+
+console.log(chalk.blue('Hello world!'));
+```
+
+Chalk comes with an easy to use composable API where you just chain and nest the styles you want.
+
+```js
+const chalk = require('chalk');
+const log = console.log;
+
+// Combine styled and normal strings
+log(chalk.blue('Hello') + ' World' + chalk.red('!'));
+
+// Compose multiple styles using the chainable API
+log(chalk.blue.bgRed.bold('Hello world!'));
+
+// Pass in multiple arguments
+log(chalk.blue('Hello', 'World!', 'Foo', 'bar', 'biz', 'baz'));
+
+// Nest styles
+log(chalk.red('Hello', chalk.underline.bgBlue('world') + '!'));
+
+// Nest styles of the same type even (color, underline, background)
+log(chalk.green(
+ 'I am a green line ' +
+ chalk.blue.underline.bold('with a blue substring') +
+ ' that becomes green again!'
+));
+
+// ES2015 template literal
+log(`
+CPU: ${chalk.red('90%')}
+RAM: ${chalk.green('40%')}
+DISK: ${chalk.yellow('70%')}
+`);
+
+// ES2015 tagged template literal
+log(chalk`
+CPU: {red ${cpu.totalPercent}%}
+RAM: {green ${ram.used / ram.total * 100}%}
+DISK: {rgb(255,131,0) ${disk.used / disk.total * 100}%}
+`);
+
+// Use RGB colors in terminal emulators that support it.
+log(chalk.keyword('orange')('Yay for orange colored text!'));
+log(chalk.rgb(123, 45, 67).underline('Underlined reddish color'));
+log(chalk.hex('#DEADED').bold('Bold gray!'));
+```
+
+Easily define your own themes:
+
+```js
+const chalk = require('chalk');
+
+const error = chalk.bold.red;
+const warning = chalk.keyword('orange');
+
+console.log(error('Error!'));
+console.log(warning('Warning!'));
+```
+
+Take advantage of console.log [string substitution](https://nodejs.org/docs/latest/api/console.html#console_console_log_data_args):
+
+```js
+const name = 'Sindre';
+console.log(chalk.green('Hello %s'), name);
+//=> 'Hello Sindre'
+```
+
+
+## API
+
+### chalk.`<style>[.<style>...](string, [string...])`
+
+Example: `chalk.red.bold.underline('Hello', 'world');`
+
+Chain [styles](#styles) and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that `chalk.red.yellow.green` is equivalent to `chalk.green`.
+
+Multiple arguments will be separated by space.
+
+### chalk.enabled
+
+Color support is automatically detected, as is the level (see `chalk.level`). However, if you'd like to simply enable/disable Chalk, you can do so via the `.enabled` property.
+
+Chalk is enabled by default unless explicitly disabled via the constructor or `chalk.level` is `0`.
+
+If you need to change this in a reusable module, create a new instance:
+
+```js
+const ctx = new chalk.constructor({enabled: false});
+```
+
+### chalk.level
+
+Color support is automatically detected, but you can override it by setting the `level` property. You should however only do this in your own code as it applies globally to all Chalk consumers.
+
+If you need to change this in a reusable module, create a new instance:
+
+```js
+const ctx = new chalk.constructor({level: 0});
+```
+
+Levels are as follows:
+
+0. All colors disabled
+1. Basic color support (16 colors)
+2. 256 color support
+3. Truecolor support (16 million colors)
+
+### chalk.supportsColor
+
+Detect whether the terminal [supports color](https://github.com/chalk/supports-color). Used internally and handled for you, but exposed for convenience.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
+
+Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+
+## Styles
+
+### Modifiers
+
+- `reset`
+- `bold`
+- `dim`
+- `italic` *(Not widely supported)*
+- `underline`
+- `inverse`
+- `hidden`
+- `strikethrough` *(Not widely supported)*
+- `visible` (Text is emitted only if enabled)
+
+### Colors
+
+- `black`
+- `red`
+- `green`
+- `yellow`
+- `blue` *(On Windows the bright version is used since normal blue is illegible)*
+- `magenta`
+- `cyan`
+- `white`
+- `gray` ("bright black")
+- `redBright`
+- `greenBright`
+- `yellowBright`
+- `blueBright`
+- `magentaBright`
+- `cyanBright`
+- `whiteBright`
+
+### Background colors
+
+- `bgBlack`
+- `bgRed`
+- `bgGreen`
+- `bgYellow`
+- `bgBlue`
+- `bgMagenta`
+- `bgCyan`
+- `bgWhite`
+- `bgBlackBright`
+- `bgRedBright`
+- `bgGreenBright`
+- `bgYellowBright`
+- `bgBlueBright`
+- `bgMagentaBright`
+- `bgCyanBright`
+- `bgWhiteBright`
+
+
+## Tagged template literal
+
+Chalk can be used as a [tagged template literal](http://exploringjs.com/es6/ch_template-literals.html#_tagged-template-literals).
+
+```js
+const chalk = require('chalk');
+
+const miles = 18;
+const calculateFeet = miles => miles * 5280;
+
+console.log(chalk`
+ There are {bold 5280 feet} in a mile.
+ In {bold ${miles} miles}, there are {green.bold ${calculateFeet(miles)} feet}.
+`);
+```
+
+Blocks are delimited by an opening curly brace (`{`), a style, some content, and a closing curly brace (`}`).
+
+Template styles are chained exactly like normal Chalk styles. The following two statements are equivalent:
+
+```js
+console.log(chalk.bold.rgb(10, 100, 200)('Hello!'));
+console.log(chalk`{bold.rgb(10,100,200) Hello!}`);
+```
+
+Note that function styles (`rgb()`, `hsl()`, `keyword()`, etc.) may not contain spaces between parameters.
+
+All interpolated values (`` chalk`${foo}` ``) are converted to strings via the `.toString()` method. All curly braces (`{` and `}`) in interpolated value strings are escaped.
+
+
+## 256 and Truecolor color support
+
+Chalk supports 256 colors and [Truecolor](https://gist.github.com/XVilka/8346728) (16 million colors) on supported terminal apps.
+
+Colors are downsampled from 16 million RGB values to an ANSI color format that is supported by the terminal emulator (or by specifying `{level: n}` as a Chalk option). For example, Chalk configured to run at level 1 (basic color support) will downsample an RGB value of #FF0000 (red) to 31 (ANSI escape for red).
+
+Examples:
+
+- `chalk.hex('#DEADED').underline('Hello, world!')`
+- `chalk.keyword('orange')('Some orange text')`
+- `chalk.rgb(15, 100, 204).inverse('Hello!')`
+
+Background versions of these models are prefixed with `bg` and the first level of the module capitalized (e.g. `keyword` for foreground colors and `bgKeyword` for background colors).
+
+- `chalk.bgHex('#DEADED').underline('Hello, world!')`
+- `chalk.bgKeyword('orange')('Some orange text')`
+- `chalk.bgRgb(15, 100, 204).inverse('Hello!')`
+
+The following color models can be used:
+
+- [`rgb`](https://en.wikipedia.org/wiki/RGB_color_model) - Example: `chalk.rgb(255, 136, 0).bold('Orange!')`
+- [`hex`](https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) - Example: `chalk.hex('#FF8800').bold('Orange!')`
+- [`keyword`](https://www.w3.org/wiki/CSS/Properties/color/keywords) (CSS keywords) - Example: `chalk.keyword('orange').bold('Orange!')`
+- [`hsl`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsl(32, 100, 50).bold('Orange!')`
+- [`hsv`](https://en.wikipedia.org/wiki/HSL_and_HSV) - Example: `chalk.hsv(32, 100, 100).bold('Orange!')`
+- [`hwb`](https://en.wikipedia.org/wiki/HWB_color_model) - Example: `chalk.hwb(32, 0, 50).bold('Orange!')`
+- `ansi16`
+- `ansi256`
+
+
+## Windows
+
+If you're on Windows, do yourself a favor and use [`cmder`](http://cmder.net/) instead of `cmd.exe`.
+
+
+## Origin story
+
+[colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68) and the package is unmaintained. Although there are other packages, they either do too much or not enough. Chalk is a clean and focused alternative.
+
+
+## Related
+
+- [chalk-cli](https://github.com/chalk/chalk-cli) - CLI for this module
+- [ansi-styles](https://github.com/chalk/ansi-styles) - ANSI escape codes for styling strings in the terminal
+- [supports-color](https://github.com/chalk/supports-color) - Detect whether a terminal supports color
+- [strip-ansi](https://github.com/chalk/strip-ansi) - Strip ANSI escape codes
+- [strip-ansi-stream](https://github.com/chalk/strip-ansi-stream) - Strip ANSI escape codes from a stream
+- [has-ansi](https://github.com/chalk/has-ansi) - Check if a string has ANSI escape codes
+- [ansi-regex](https://github.com/chalk/ansi-regex) - Regular expression for matching ANSI escape codes
+- [wrap-ansi](https://github.com/chalk/wrap-ansi) - Wordwrap a string with ANSI escape codes
+- [slice-ansi](https://github.com/chalk/slice-ansi) - Slice a string with ANSI escape codes
+- [color-convert](https://github.com/qix-/color-convert) - Converts colors between different models
+- [chalk-animation](https://github.com/bokub/chalk-animation) - Animate strings in the terminal
+- [gradient-string](https://github.com/bokub/gradient-string) - Apply color gradients to strings
+- [chalk-pipe](https://github.com/LitoMore/chalk-pipe) - Create chalk style schemes with simpler style strings
+- [terminal-link](https://github.com/sindresorhus/terminal-link) - Create clickable links in the terminal
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/node_modules/@babel/highlight/node_modules/chalk/templates.js b/node_modules/@babel/highlight/node_modules/chalk/templates.js
new file mode 100644
index 0000000..dbdf9b2
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/chalk/templates.js
@@ -0,0 +1,128 @@
+'use strict';
+const TEMPLATE_REGEX = /(?:\\(u[a-f\d]{4}|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
+const STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
+const STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
+const ESCAPE_REGEX = /\\(u[a-f\d]{4}|x[a-f\d]{2}|.)|([^\\])/gi;
+
+const ESCAPES = new Map([
+ ['n', '\n'],
+ ['r', '\r'],
+ ['t', '\t'],
+ ['b', '\b'],
+ ['f', '\f'],
+ ['v', '\v'],
+ ['0', '\0'],
+ ['\\', '\\'],
+ ['e', '\u001B'],
+ ['a', '\u0007']
+]);
+
+function unescape(c) {
+ if ((c[0] === 'u' && c.length === 5) || (c[0] === 'x' && c.length === 3)) {
+ return String.fromCharCode(parseInt(c.slice(1), 16));
+ }
+
+ return ESCAPES.get(c) || c;
+}
+
+function parseArguments(name, args) {
+ const results = [];
+ const chunks = args.trim().split(/\s*,\s*/g);
+ let matches;
+
+ for (const chunk of chunks) {
+ if (!isNaN(chunk)) {
+ results.push(Number(chunk));
+ } else if ((matches = chunk.match(STRING_REGEX))) {
+ results.push(matches[2].replace(ESCAPE_REGEX, (m, escape, chr) => escape ? unescape(escape) : chr));
+ } else {
+ throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
+ }
+ }
+
+ return results;
+}
+
+function parseStyle(style) {
+ STYLE_REGEX.lastIndex = 0;
+
+ const results = [];
+ let matches;
+
+ while ((matches = STYLE_REGEX.exec(style)) !== null) {
+ const name = matches[1];
+
+ if (matches[2]) {
+ const args = parseArguments(name, matches[2]);
+ results.push([name].concat(args));
+ } else {
+ results.push([name]);
+ }
+ }
+
+ return results;
+}
+
+function buildStyle(chalk, styles) {
+ const enabled = {};
+
+ for (const layer of styles) {
+ for (const style of layer.styles) {
+ enabled[style[0]] = layer.inverse ? null : style.slice(1);
+ }
+ }
+
+ let current = chalk;
+ for (const styleName of Object.keys(enabled)) {
+ if (Array.isArray(enabled[styleName])) {
+ if (!(styleName in current)) {
+ throw new Error(`Unknown Chalk style: ${styleName}`);
+ }
+
+ if (enabled[styleName].length > 0) {
+ current = current[styleName].apply(current, enabled[styleName]);
+ } else {
+ current = current[styleName];
+ }
+ }
+ }
+
+ return current;
+}
+
+module.exports = (chalk, tmp) => {
+ const styles = [];
+ const chunks = [];
+ let chunk = [];
+
+ // eslint-disable-next-line max-params
+ tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
+ if (escapeChar) {
+ chunk.push(unescape(escapeChar));
+ } else if (style) {
+ const str = chunk.join('');
+ chunk = [];
+ chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
+ styles.push({inverse, styles: parseStyle(style)});
+ } else if (close) {
+ if (styles.length === 0) {
+ throw new Error('Found extraneous } in Chalk template literal');
+ }
+
+ chunks.push(buildStyle(chalk, styles)(chunk.join('')));
+ chunk = [];
+ styles.pop();
+ } else {
+ chunk.push(chr);
+ }
+ });
+
+ chunks.push(chunk.join(''));
+
+ if (styles.length > 0) {
+ const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\`}\`)`;
+ throw new Error(errMsg);
+ }
+
+ return chunks.join('');
+};
diff --git a/node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts b/node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts
new file mode 100644
index 0000000..b4e4dc5
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts
@@ -0,0 +1,97 @@
+// Type definitions for Chalk
+// Definitions by: Thomas Sauer <https://github.com/t-sauer>
+
+export const enum Level {
+ None = 0,
+ Basic = 1,
+ Ansi256 = 2,
+ TrueColor = 3
+}
+
+export interface ChalkOptions {
+ enabled?: boolean;
+ level?: Level;
+}
+
+export interface ChalkConstructor {
+ new (options?: ChalkOptions): Chalk;
+ (options?: ChalkOptions): Chalk;
+}
+
+export interface ColorSupport {
+ level: Level;
+ hasBasic: boolean;
+ has256: boolean;
+ has16m: boolean;
+}
+
+export interface Chalk {
+ (...text: string[]): string;
+ (text: TemplateStringsArray, ...placeholders: string[]): string;
+ constructor: ChalkConstructor;
+ enabled: boolean;
+ level: Level;
+ rgb(r: number, g: number, b: number): this;
+ hsl(h: number, s: number, l: number): this;
+ hsv(h: number, s: number, v: number): this;
+ hwb(h: number, w: number, b: number): this;
+ bgHex(color: string): this;
+ bgKeyword(color: string): this;
+ bgRgb(r: number, g: number, b: number): this;
+ bgHsl(h: number, s: number, l: number): this;
+ bgHsv(h: number, s: number, v: number): this;
+ bgHwb(h: number, w: number, b: number): this;
+ hex(color: string): this;
+ keyword(color: string): this;
+
+ readonly reset: this;
+ readonly bold: this;
+ readonly dim: this;
+ readonly italic: this;
+ readonly underline: this;
+ readonly inverse: this;
+ readonly hidden: this;
+ readonly strikethrough: this;
+
+ readonly visible: this;
+
+ readonly black: this;
+ readonly red: this;
+ readonly green: this;
+ readonly yellow: this;
+ readonly blue: this;
+ readonly magenta: this;
+ readonly cyan: this;
+ readonly white: this;
+ readonly gray: this;
+ readonly grey: this;
+ readonly blackBright: this;
+ readonly redBright: this;
+ readonly greenBright: this;
+ readonly yellowBright: this;
+ readonly blueBright: this;
+ readonly magentaBright: this;
+ readonly cyanBright: this;
+ readonly whiteBright: this;
+
+ readonly bgBlack: this;
+ readonly bgRed: this;
+ readonly bgGreen: this;
+ readonly bgYellow: this;
+ readonly bgBlue: this;
+ readonly bgMagenta: this;
+ readonly bgCyan: this;
+ readonly bgWhite: this;
+ readonly bgBlackBright: this;
+ readonly bgRedBright: this;
+ readonly bgGreenBright: this;
+ readonly bgYellowBright: this;
+ readonly bgBlueBright: this;
+ readonly bgMagentaBright: this;
+ readonly bgCyanBright: this;
+ readonly bgWhiteBright: this;
+}
+
+declare const chalk: Chalk & { supportsColor: ColorSupport };
+
+export default chalk
diff --git a/node_modules/@babel/highlight/node_modules/color-convert/CHANGELOG.md b/node_modules/@babel/highlight/node_modules/color-convert/CHANGELOG.md
new file mode 100644
index 0000000..0a7bce4
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-convert/CHANGELOG.md
@@ -0,0 +1,54 @@
+# 1.0.0 - 2016-01-07
+
+- Removed: unused speed test
+- Added: Automatic routing between previously unsupported conversions
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Removed: `xxx2xxx()` and `xxx2xxxRaw()` functions
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Removed: `convert()` class
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Changed: all functions to lookup dictionary
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Changed: `ansi` to `ansi256`
+([#27](https://github.com/Qix-/color-convert/pull/27))
+- Fixed: argument grouping for functions requiring only one argument
+([#27](https://github.com/Qix-/color-convert/pull/27))
+
+# 0.6.0 - 2015-07-23
+
+- Added: methods to handle
+[ANSI](https://en.wikipedia.org/wiki/ANSI_escape_code#Colors) 16/256 colors:
+ - rgb2ansi16
+ - rgb2ansi
+ - hsl2ansi16
+ - hsl2ansi
+ - hsv2ansi16
+ - hsv2ansi
+ - hwb2ansi16
+ - hwb2ansi
+ - cmyk2ansi16
+ - cmyk2ansi
+ - keyword2ansi16
+ - keyword2ansi
+ - ansi162rgb
+ - ansi162hsl
+ - ansi162hsv
+ - ansi162hwb
+ - ansi162cmyk
+ - ansi162keyword
+ - ansi2rgb
+ - ansi2hsl
+ - ansi2hsv
+ - ansi2hwb
+ - ansi2cmyk
+ - ansi2keyword
+([#18](https://github.com/harthur/color-convert/pull/18))
+
+# 0.5.3 - 2015-06-02
+
+- Fixed: hsl2hsv does not return `NaN` anymore when using `[0,0,0]`
+([#15](https://github.com/harthur/color-convert/issues/15))
+
+---
+
+Check out commit logs for older releases
diff --git a/node_modules/@babel/highlight/node_modules/color-convert/LICENSE b/node_modules/@babel/highlight/node_modules/color-convert/LICENSE
new file mode 100644
index 0000000..5b4c386
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-convert/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
diff --git a/node_modules/@babel/highlight/node_modules/color-convert/README.md b/node_modules/@babel/highlight/node_modules/color-convert/README.md
new file mode 100644
index 0000000..d4b08fc
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-convert/README.md
@@ -0,0 +1,68 @@
+# color-convert
+
+[![Build Status](https://travis-ci.org/Qix-/color-convert.svg?branch=master)](https://travis-ci.org/Qix-/color-convert)
+
+Color-convert is a color conversion library for JavaScript and node.
+It converts all ways between `rgb`, `hsl`, `hsv`, `hwb`, `cmyk`, `ansi`, `ansi16`, `hex` strings, and CSS `keyword`s (will round to closest):
+
+```js
+var convert = require('color-convert');
+
+convert.rgb.hsl(140, 200, 100); // [96, 48, 59]
+convert.keyword.rgb('blue'); // [0, 0, 255]
+
+var rgbChannels = convert.rgb.channels; // 3
+var cmykChannels = convert.cmyk.channels; // 4
+var ansiChannels = convert.ansi16.channels; // 1
+```
+
+# Install
+
+```console
+$ npm install color-convert
+```
+
+# API
+
+Simply get the property of the _from_ and _to_ conversion that you're looking for.
+
+All functions have a rounded and unrounded variant. By default, return values are rounded. To get the unrounded (raw) results, simply tack on `.raw` to the function.
+
+All 'from' functions have a hidden property called `.channels` that indicates the number of channels the function expects (not including alpha).
+
+```js
+var convert = require('color-convert');
+
+// Hex to LAB
+convert.hex.lab('DEADBF'); // [ 76, 21, -2 ]
+convert.hex.lab.raw('DEADBF'); // [ 75.56213190997677, 20.653827952644754, -2.290532499330533 ]
+
+// RGB to CMYK
+convert.rgb.cmyk(167, 255, 4); // [ 35, 0, 98, 0 ]
+convert.rgb.cmyk.raw(167, 255, 4); // [ 34.509803921568626, 0, 98.43137254901961, 0 ]
+```
+
+### Arrays
+All functions that accept multiple arguments also support passing an array.
+
+Note that this does **not** apply to functions that convert from a color that only requires one value (e.g. `keyword`, `ansi256`, `hex`, etc.)
+
+```js
+var convert = require('color-convert');
+
+convert.rgb.hex(123, 45, 67); // '7B2D43'
+convert.rgb.hex([123, 45, 67]); // '7B2D43'
+```
+
+## Routing
+
+Conversions that don't have an _explicitly_ defined conversion (in [conversions.js](conversions.js)), but can be converted by means of sub-conversions (e.g. XYZ -> **RGB** -> CMYK), are automatically routed together. This allows just about any color model supported by `color-convert` to be converted to any other model, so long as a sub-conversion path exists. This is also true for conversions requiring more than one step in between (e.g. LCH -> **LAB** -> **XYZ** -> **RGB** -> Hex).
+
+Keep in mind that extensive conversions _may_ result in a loss of precision, and exist only to be complete. For a list of "direct" (single-step) conversions, see [conversions.js](conversions.js).
+
+# Contribute
+
+If there is a new model you would like to support, or want to add a direct conversion between two existing models, please send us a pull request.
+
+# License
+Copyright &copy; 2011-2016, Heather Arthur and Josh Junon. Licensed under the [MIT License](LICENSE).
diff --git a/node_modules/@babel/highlight/node_modules/color-convert/conversions.js b/node_modules/@babel/highlight/node_modules/color-convert/conversions.js
new file mode 100644
index 0000000..3217200
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-convert/conversions.js
@@ -0,0 +1,868 @@
+/* MIT license */
+var cssKeywords = require('color-name');
+
+// NOTE: conversions should only return primitive values (i.e. arrays, or
+// values that give correct `typeof` results).
+// do not use box values types (i.e. Number(), String(), etc.)
+
+var reverseKeywords = {};
+for (var key in cssKeywords) {
+ if (cssKeywords.hasOwnProperty(key)) {
+ reverseKeywords[cssKeywords[key]] = key;
+ }
+}
+
+var convert = module.exports = {
+ rgb: {channels: 3, labels: 'rgb'},
+ hsl: {channels: 3, labels: 'hsl'},
+ hsv: {channels: 3, labels: 'hsv'},
+ hwb: {channels: 3, labels: 'hwb'},
+ cmyk: {channels: 4, labels: 'cmyk'},
+ xyz: {channels: 3, labels: 'xyz'},
+ lab: {channels: 3, labels: 'lab'},
+ lch: {channels: 3, labels: 'lch'},
+ hex: {channels: 1, labels: ['hex']},
+ keyword: {channels: 1, labels: ['keyword']},
+ ansi16: {channels: 1, labels: ['ansi16']},
+ ansi256: {channels: 1, labels: ['ansi256']},
+ hcg: {channels: 3, labels: ['h', 'c', 'g']},
+ apple: {channels: 3, labels: ['r16', 'g16', 'b16']},
+ gray: {channels: 1, labels: ['gray']}
+};
+
+// hide .channels and .labels properties
+for (var model in convert) {
+ if (convert.hasOwnProperty(model)) {
+ if (!('channels' in convert[model])) {
+ throw new Error('missing channels property: ' + model);
+ }
+
+ if (!('labels' in convert[model])) {
+ throw new Error('missing channel labels property: ' + model);
+ }
+
+ if (convert[model].labels.length !== convert[model].channels) {
+ throw new Error('channel and label counts mismatch: ' + model);
+ }
+
+ var channels = convert[model].channels;
+ var labels = convert[model].labels;
+ delete convert[model].channels;
+ delete convert[model].labels;
+ Object.defineProperty(convert[model], 'channels', {value: channels});
+ Object.defineProperty(convert[model], 'labels', {value: labels});
+ }
+}
+
+convert.rgb.hsl = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var min = Math.min(r, g, b);
+ var max = Math.max(r, g, b);
+ var delta = max - min;
+ var h;
+ var s;
+ var l;
+
+ if (max === min) {
+ h = 0;
+ } else if (r === max) {
+ h = (g - b) / delta;
+ } else if (g === max) {
+ h = 2 + (b - r) / delta;
+ } else if (b === max) {
+ h = 4 + (r - g) / delta;
+ }
+
+ h = Math.min(h * 60, 360);
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ l = (min + max) / 2;
+
+ if (max === min) {
+ s = 0;
+ } else if (l <= 0.5) {
+ s = delta / (max + min);
+ } else {
+ s = delta / (2 - max - min);
+ }
+
+ return [h, s * 100, l * 100];
+};
+
+convert.rgb.hsv = function (rgb) {
+ var rdif;
+ var gdif;
+ var bdif;
+ var h;
+ var s;
+
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var v = Math.max(r, g, b);
+ var diff = v - Math.min(r, g, b);
+ var diffc = function (c) {
+ return (v - c) / 6 / diff + 1 / 2;
+ };
+
+ if (diff === 0) {
+ h = s = 0;
+ } else {
+ s = diff / v;
+ rdif = diffc(r);
+ gdif = diffc(g);
+ bdif = diffc(b);
+
+ if (r === v) {
+ h = bdif - gdif;
+ } else if (g === v) {
+ h = (1 / 3) + rdif - bdif;
+ } else if (b === v) {
+ h = (2 / 3) + gdif - rdif;
+ }
+ if (h < 0) {
+ h += 1;
+ } else if (h > 1) {
+ h -= 1;
+ }
+ }
+
+ return [
+ h * 360,
+ s * 100,
+ v * 100
+ ];
+};
+
+convert.rgb.hwb = function (rgb) {
+ var r = rgb[0];
+ var g = rgb[1];
+ var b = rgb[2];
+ var h = convert.rgb.hsl(rgb)[0];
+ var w = 1 / 255 * Math.min(r, Math.min(g, b));
+
+ b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
+
+ return [h, w * 100, b * 100];
+};
+
+convert.rgb.cmyk = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var c;
+ var m;
+ var y;
+ var k;
+
+ k = Math.min(1 - r, 1 - g, 1 - b);
+ c = (1 - r - k) / (1 - k) || 0;
+ m = (1 - g - k) / (1 - k) || 0;
+ y = (1 - b - k) / (1 - k) || 0;
+
+ return [c * 100, m * 100, y * 100, k * 100];
+};
+
+/**
+ * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance
+ * */
+function comparativeDistance(x, y) {
+ return (
+ Math.pow(x[0] - y[0], 2) +
+ Math.pow(x[1] - y[1], 2) +
+ Math.pow(x[2] - y[2], 2)
+ );
+}
+
+convert.rgb.keyword = function (rgb) {
+ var reversed = reverseKeywords[rgb];
+ if (reversed) {
+ return reversed;
+ }
+
+ var currentClosestDistance = Infinity;
+ var currentClosestKeyword;
+
+ for (var keyword in cssKeywords) {
+ if (cssKeywords.hasOwnProperty(keyword)) {
+ var value = cssKeywords[keyword];
+
+ // Compute comparative distance
+ var distance = comparativeDistance(rgb, value);
+
+ // Check if its less, if so set as closest
+ if (distance < currentClosestDistance) {
+ currentClosestDistance = distance;
+ currentClosestKeyword = keyword;
+ }
+ }
+ }
+
+ return currentClosestKeyword;
+};
+
+convert.keyword.rgb = function (keyword) {
+ return cssKeywords[keyword];
+};
+
+convert.rgb.xyz = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+
+ // assume sRGB
+ r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);
+ g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);
+ b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);
+
+ var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);
+ var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);
+ var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);
+
+ return [x * 100, y * 100, z * 100];
+};
+
+convert.rgb.lab = function (rgb) {
+ var xyz = convert.rgb.xyz(rgb);
+ var x = xyz[0];
+ var y = xyz[1];
+ var z = xyz[2];
+ var l;
+ var a;
+ var b;
+
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+
+ x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
+
+ l = (116 * y) - 16;
+ a = 500 * (x - y);
+ b = 200 * (y - z);
+
+ return [l, a, b];
+};
+
+convert.hsl.rgb = function (hsl) {
+ var h = hsl[0] / 360;
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var t1;
+ var t2;
+ var t3;
+ var rgb;
+ var val;
+
+ if (s === 0) {
+ val = l * 255;
+ return [val, val, val];
+ }
+
+ if (l < 0.5) {
+ t2 = l * (1 + s);
+ } else {
+ t2 = l + s - l * s;
+ }
+
+ t1 = 2 * l - t2;
+
+ rgb = [0, 0, 0];
+ for (var i = 0; i < 3; i++) {
+ t3 = h + 1 / 3 * -(i - 1);
+ if (t3 < 0) {
+ t3++;
+ }
+ if (t3 > 1) {
+ t3--;
+ }
+
+ if (6 * t3 < 1) {
+ val = t1 + (t2 - t1) * 6 * t3;
+ } else if (2 * t3 < 1) {
+ val = t2;
+ } else if (3 * t3 < 2) {
+ val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
+ } else {
+ val = t1;
+ }
+
+ rgb[i] = val * 255;
+ }
+
+ return rgb;
+};
+
+convert.hsl.hsv = function (hsl) {
+ var h = hsl[0];
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var smin = s;
+ var lmin = Math.max(l, 0.01);
+ var sv;
+ var v;
+
+ l *= 2;
+ s *= (l <= 1) ? l : 2 - l;
+ smin *= lmin <= 1 ? lmin : 2 - lmin;
+ v = (l + s) / 2;
+ sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);
+
+ return [h, sv * 100, v * 100];
+};
+
+convert.hsv.rgb = function (hsv) {
+ var h = hsv[0] / 60;
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+ var hi = Math.floor(h) % 6;
+
+ var f = h - Math.floor(h);
+ var p = 255 * v * (1 - s);
+ var q = 255 * v * (1 - (s * f));
+ var t = 255 * v * (1 - (s * (1 - f)));
+ v *= 255;
+
+ switch (hi) {
+ case 0:
+ return [v, t, p];
+ case 1:
+ return [q, v, p];
+ case 2:
+ return [p, v, t];
+ case 3:
+ return [p, q, v];
+ case 4:
+ return [t, p, v];
+ case 5:
+ return [v, p, q];
+ }
+};
+
+convert.hsv.hsl = function (hsv) {
+ var h = hsv[0];
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+ var vmin = Math.max(v, 0.01);
+ var lmin;
+ var sl;
+ var l;
+
+ l = (2 - s) * v;
+ lmin = (2 - s) * vmin;
+ sl = s * vmin;
+ sl /= (lmin <= 1) ? lmin : 2 - lmin;
+ sl = sl || 0;
+ l /= 2;
+
+ return [h, sl * 100, l * 100];
+};
+
+// http://dev.w3.org/csswg/css-color/#hwb-to-rgb
+convert.hwb.rgb = function (hwb) {
+ var h = hwb[0] / 360;
+ var wh = hwb[1] / 100;
+ var bl = hwb[2] / 100;
+ var ratio = wh + bl;
+ var i;
+ var v;
+ var f;
+ var n;
+
+ // wh + bl cant be > 1
+ if (ratio > 1) {
+ wh /= ratio;
+ bl /= ratio;
+ }
+
+ i = Math.floor(6 * h);
+ v = 1 - bl;
+ f = 6 * h - i;
+
+ if ((i & 0x01) !== 0) {
+ f = 1 - f;
+ }
+
+ n = wh + f * (v - wh); // linear interpolation
+
+ var r;
+ var g;
+ var b;
+ switch (i) {
+ default:
+ case 6:
+ case 0: r = v; g = n; b = wh; break;
+ case 1: r = n; g = v; b = wh; break;
+ case 2: r = wh; g = v; b = n; break;
+ case 3: r = wh; g = n; b = v; break;
+ case 4: r = n; g = wh; b = v; break;
+ case 5: r = v; g = wh; b = n; break;
+ }
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.cmyk.rgb = function (cmyk) {
+ var c = cmyk[0] / 100;
+ var m = cmyk[1] / 100;
+ var y = cmyk[2] / 100;
+ var k = cmyk[3] / 100;
+ var r;
+ var g;
+ var b;
+
+ r = 1 - Math.min(1, c * (1 - k) + k);
+ g = 1 - Math.min(1, m * (1 - k) + k);
+ b = 1 - Math.min(1, y * (1 - k) + k);
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.xyz.rgb = function (xyz) {
+ var x = xyz[0] / 100;
+ var y = xyz[1] / 100;
+ var z = xyz[2] / 100;
+ var r;
+ var g;
+ var b;
+
+ r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);
+ g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);
+ b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);
+
+ // assume sRGB
+ r = r > 0.0031308
+ ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)
+ : r * 12.92;
+
+ g = g > 0.0031308
+ ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)
+ : g * 12.92;
+
+ b = b > 0.0031308
+ ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)
+ : b * 12.92;
+
+ r = Math.min(Math.max(0, r), 1);
+ g = Math.min(Math.max(0, g), 1);
+ b = Math.min(Math.max(0, b), 1);
+
+ return [r * 255, g * 255, b * 255];
+};
+
+convert.xyz.lab = function (xyz) {
+ var x = xyz[0];
+ var y = xyz[1];
+ var z = xyz[2];
+ var l;
+ var a;
+ var b;
+
+ x /= 95.047;
+ y /= 100;
+ z /= 108.883;
+
+ x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);
+ y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);
+ z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);
+
+ l = (116 * y) - 16;
+ a = 500 * (x - y);
+ b = 200 * (y - z);
+
+ return [l, a, b];
+};
+
+convert.lab.xyz = function (lab) {
+ var l = lab[0];
+ var a = lab[1];
+ var b = lab[2];
+ var x;
+ var y;
+ var z;
+
+ y = (l + 16) / 116;
+ x = a / 500 + y;
+ z = y - b / 200;
+
+ var y2 = Math.pow(y, 3);
+ var x2 = Math.pow(x, 3);
+ var z2 = Math.pow(z, 3);
+ y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;
+ x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;
+ z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;
+
+ x *= 95.047;
+ y *= 100;
+ z *= 108.883;
+
+ return [x, y, z];
+};
+
+convert.lab.lch = function (lab) {
+ var l = lab[0];
+ var a = lab[1];
+ var b = lab[2];
+ var hr;
+ var h;
+ var c;
+
+ hr = Math.atan2(b, a);
+ h = hr * 360 / 2 / Math.PI;
+
+ if (h < 0) {
+ h += 360;
+ }
+
+ c = Math.sqrt(a * a + b * b);
+
+ return [l, c, h];
+};
+
+convert.lch.lab = function (lch) {
+ var l = lch[0];
+ var c = lch[1];
+ var h = lch[2];
+ var a;
+ var b;
+ var hr;
+
+ hr = h / 360 * 2 * Math.PI;
+ a = c * Math.cos(hr);
+ b = c * Math.sin(hr);
+
+ return [l, a, b];
+};
+
+convert.rgb.ansi16 = function (args) {
+ var r = args[0];
+ var g = args[1];
+ var b = args[2];
+ var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization
+
+ value = Math.round(value / 50);
+
+ if (value === 0) {
+ return 30;
+ }
+
+ var ansi = 30
+ + ((Math.round(b / 255) << 2)
+ | (Math.round(g / 255) << 1)
+ | Math.round(r / 255));
+
+ if (value === 2) {
+ ansi += 60;
+ }
+
+ return ansi;
+};
+
+convert.hsv.ansi16 = function (args) {
+ // optimization here; we already know the value and don't need to get
+ // it converted for us.
+ return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
+};
+
+convert.rgb.ansi256 = function (args) {
+ var r = args[0];
+ var g = args[1];
+ var b = args[2];
+
+ // we use the extended greyscale palette here, with the exception of
+ // black and white. normal palette only has 4 greyscale shades.
+ if (r === g && g === b) {
+ if (r < 8) {
+ return 16;
+ }
+
+ if (r > 248) {
+ return 231;
+ }
+
+ return Math.round(((r - 8) / 247) * 24) + 232;
+ }
+
+ var ansi = 16
+ + (36 * Math.round(r / 255 * 5))
+ + (6 * Math.round(g / 255 * 5))
+ + Math.round(b / 255 * 5);
+
+ return ansi;
+};
+
+convert.ansi16.rgb = function (args) {
+ var color = args % 10;
+
+ // handle greyscale
+ if (color === 0 || color === 7) {
+ if (args > 50) {
+ color += 3.5;
+ }
+
+ color = color / 10.5 * 255;
+
+ return [color, color, color];
+ }
+
+ var mult = (~~(args > 50) + 1) * 0.5;
+ var r = ((color & 1) * mult) * 255;
+ var g = (((color >> 1) & 1) * mult) * 255;
+ var b = (((color >> 2) & 1) * mult) * 255;
+
+ return [r, g, b];
+};
+
+convert.ansi256.rgb = function (args) {
+ // handle greyscale
+ if (args >= 232) {
+ var c = (args - 232) * 10 + 8;
+ return [c, c, c];
+ }
+
+ args -= 16;
+
+ var rem;
+ var r = Math.floor(args / 36) / 5 * 255;
+ var g = Math.floor((rem = args % 36) / 6) / 5 * 255;
+ var b = (rem % 6) / 5 * 255;
+
+ return [r, g, b];
+};
+
+convert.rgb.hex = function (args) {
+ var integer = ((Math.round(args[0]) & 0xFF) << 16)
+ + ((Math.round(args[1]) & 0xFF) << 8)
+ + (Math.round(args[2]) & 0xFF);
+
+ var string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
+
+convert.hex.rgb = function (args) {
+ var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
+ if (!match) {
+ return [0, 0, 0];
+ }
+
+ var colorString = match[0];
+
+ if (match[0].length === 3) {
+ colorString = colorString.split('').map(function (char) {
+ return char + char;
+ }).join('');
+ }
+
+ var integer = parseInt(colorString, 16);
+ var r = (integer >> 16) & 0xFF;
+ var g = (integer >> 8) & 0xFF;
+ var b = integer & 0xFF;
+
+ return [r, g, b];
+};
+
+convert.rgb.hcg = function (rgb) {
+ var r = rgb[0] / 255;
+ var g = rgb[1] / 255;
+ var b = rgb[2] / 255;
+ var max = Math.max(Math.max(r, g), b);
+ var min = Math.min(Math.min(r, g), b);
+ var chroma = (max - min);
+ var grayscale;
+ var hue;
+
+ if (chroma < 1) {
+ grayscale = min / (1 - chroma);
+ } else {
+ grayscale = 0;
+ }
+
+ if (chroma <= 0) {
+ hue = 0;
+ } else
+ if (max === r) {
+ hue = ((g - b) / chroma) % 6;
+ } else
+ if (max === g) {
+ hue = 2 + (b - r) / chroma;
+ } else {
+ hue = 4 + (r - g) / chroma + 4;
+ }
+
+ hue /= 6;
+ hue %= 1;
+
+ return [hue * 360, chroma * 100, grayscale * 100];
+};
+
+convert.hsl.hcg = function (hsl) {
+ var s = hsl[1] / 100;
+ var l = hsl[2] / 100;
+ var c = 1;
+ var f = 0;
+
+ if (l < 0.5) {
+ c = 2.0 * s * l;
+ } else {
+ c = 2.0 * s * (1.0 - l);
+ }
+
+ if (c < 1.0) {
+ f = (l - 0.5 * c) / (1.0 - c);
+ }
+
+ return [hsl[0], c * 100, f * 100];
+};
+
+convert.hsv.hcg = function (hsv) {
+ var s = hsv[1] / 100;
+ var v = hsv[2] / 100;
+
+ var c = s * v;
+ var f = 0;
+
+ if (c < 1.0) {
+ f = (v - c) / (1 - c);
+ }
+
+ return [hsv[0], c * 100, f * 100];
+};
+
+convert.hcg.rgb = function (hcg) {
+ var h = hcg[0] / 360;
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+
+ if (c === 0.0) {
+ return [g * 255, g * 255, g * 255];
+ }
+
+ var pure = [0, 0, 0];
+ var hi = (h % 1) * 6;
+ var v = hi % 1;
+ var w = 1 - v;
+ var mg = 0;
+
+ switch (Math.floor(hi)) {
+ case 0:
+ pure[0] = 1; pure[1] = v; pure[2] = 0; break;
+ case 1:
+ pure[0] = w; pure[1] = 1; pure[2] = 0; break;
+ case 2:
+ pure[0] = 0; pure[1] = 1; pure[2] = v; break;
+ case 3:
+ pure[0] = 0; pure[1] = w; pure[2] = 1; break;
+ case 4:
+ pure[0] = v; pure[1] = 0; pure[2] = 1; break;
+ default:
+ pure[0] = 1; pure[1] = 0; pure[2] = w;
+ }
+
+ mg = (1.0 - c) * g;
+
+ return [
+ (c * pure[0] + mg) * 255,
+ (c * pure[1] + mg) * 255,
+ (c * pure[2] + mg) * 255
+ ];
+};
+
+convert.hcg.hsv = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+
+ var v = c + g * (1.0 - c);
+ var f = 0;
+
+ if (v > 0.0) {
+ f = c / v;
+ }
+
+ return [hcg[0], f * 100, v * 100];
+};
+
+convert.hcg.hsl = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+
+ var l = g * (1.0 - c) + 0.5 * c;
+ var s = 0;
+
+ if (l > 0.0 && l < 0.5) {
+ s = c / (2 * l);
+ } else
+ if (l >= 0.5 && l < 1.0) {
+ s = c / (2 * (1 - l));
+ }
+
+ return [hcg[0], s * 100, l * 100];
+};
+
+convert.hcg.hwb = function (hcg) {
+ var c = hcg[1] / 100;
+ var g = hcg[2] / 100;
+ var v = c + g * (1.0 - c);
+ return [hcg[0], (v - c) * 100, (1 - v) * 100];
+};
+
+convert.hwb.hcg = function (hwb) {
+ var w = hwb[1] / 100;
+ var b = hwb[2] / 100;
+ var v = 1 - b;
+ var c = v - w;
+ var g = 0;
+
+ if (c < 1) {
+ g = (v - c) / (1 - c);
+ }
+
+ return [hwb[0], c * 100, g * 100];
+};
+
+convert.apple.rgb = function (apple) {
+ return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];
+};
+
+convert.rgb.apple = function (rgb) {
+ return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];
+};
+
+convert.gray.rgb = function (args) {
+ return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
+};
+
+convert.gray.hsl = convert.gray.hsv = function (args) {
+ return [0, 0, args[0]];
+};
+
+convert.gray.hwb = function (gray) {
+ return [0, 100, gray[0]];
+};
+
+convert.gray.cmyk = function (gray) {
+ return [0, 0, 0, gray[0]];
+};
+
+convert.gray.lab = function (gray) {
+ return [gray[0], 0, 0];
+};
+
+convert.gray.hex = function (gray) {
+ var val = Math.round(gray[0] / 100 * 255) & 0xFF;
+ var integer = (val << 16) + (val << 8) + val;
+
+ var string = integer.toString(16).toUpperCase();
+ return '000000'.substring(string.length) + string;
+};
+
+convert.rgb.gray = function (rgb) {
+ var val = (rgb[0] + rgb[1] + rgb[2]) / 3;
+ return [val / 255 * 100];
+};
diff --git a/node_modules/@babel/highlight/node_modules/color-convert/index.js b/node_modules/@babel/highlight/node_modules/color-convert/index.js
new file mode 100644
index 0000000..e65b5d7
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-convert/index.js
@@ -0,0 +1,78 @@
+var conversions = require('./conversions');
+var route = require('./route');
+
+var convert = {};
+
+var models = Object.keys(conversions);
+
+function wrapRaw(fn) {
+ var wrappedFn = function (args) {
+ if (args === undefined || args === null) {
+ return args;
+ }
+
+ if (arguments.length > 1) {
+ args = Array.prototype.slice.call(arguments);
+ }
+
+ return fn(args);
+ };
+
+ // preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
+
+ return wrappedFn;
+}
+
+function wrapRounded(fn) {
+ var wrappedFn = function (args) {
+ if (args === undefined || args === null) {
+ return args;
+ }
+
+ if (arguments.length > 1) {
+ args = Array.prototype.slice.call(arguments);
+ }
+
+ var result = fn(args);
+
+ // we're assuming the result is an array here.
+ // see notice in conversions.js; don't use box types
+ // in conversion functions.
+ if (typeof result === 'object') {
+ for (var len = result.length, i = 0; i < len; i++) {
+ result[i] = Math.round(result[i]);
+ }
+ }
+
+ return result;
+ };
+
+ // preserve .conversion property if there is one
+ if ('conversion' in fn) {
+ wrappedFn.conversion = fn.conversion;
+ }
+
+ return wrappedFn;
+}
+
+models.forEach(function (fromModel) {
+ convert[fromModel] = {};
+
+ Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});
+ Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});
+
+ var routes = route(fromModel);
+ var routeModels = Object.keys(routes);
+
+ routeModels.forEach(function (toModel) {
+ var fn = routes[toModel];
+
+ convert[fromModel][toModel] = wrapRounded(fn);
+ convert[fromModel][toModel].raw = wrapRaw(fn);
+ });
+});
+
+module.exports = convert;
diff --git a/node_modules/@babel/highlight/node_modules/color-convert/package.json b/node_modules/@babel/highlight/node_modules/color-convert/package.json
new file mode 100644
index 0000000..dfbc471
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-convert/package.json
@@ -0,0 +1,46 @@
+{
+ "name": "color-convert",
+ "description": "Plain color conversion functions",
+ "version": "1.9.3",
+ "author": "Heather Arthur <fayearthur@gmail.com>",
+ "license": "MIT",
+ "repository": "Qix-/color-convert",
+ "scripts": {
+ "pretest": "xo",
+ "test": "node test/basic.js"
+ },
+ "keywords": [
+ "color",
+ "colour",
+ "convert",
+ "converter",
+ "conversion",
+ "rgb",
+ "hsl",
+ "hsv",
+ "hwb",
+ "cmyk",
+ "ansi",
+ "ansi16"
+ ],
+ "files": [
+ "index.js",
+ "conversions.js",
+ "css-keywords.js",
+ "route.js"
+ ],
+ "xo": {
+ "rules": {
+ "default-case": 0,
+ "no-inline-comments": 0,
+ "operator-linebreak": 0
+ }
+ },
+ "devDependencies": {
+ "chalk": "1.1.1",
+ "xo": "0.11.2"
+ },
+ "dependencies": {
+ "color-name": "1.1.3"
+ }
+}
diff --git a/node_modules/@babel/highlight/node_modules/color-convert/route.js b/node_modules/@babel/highlight/node_modules/color-convert/route.js
new file mode 100644
index 0000000..0a1fdea
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-convert/route.js
@@ -0,0 +1,97 @@
+var conversions = require('./conversions');
+
+/*
+ this function routes a model to all other models.
+
+ all functions that are routed have a property `.conversion` attached
+ to the returned synthetic function. This property is an array
+ of strings, each with the steps in between the 'from' and 'to'
+ color models (inclusive).
+
+ conversions that are not possible simply are not included.
+*/
+
+function buildGraph() {
+ var graph = {};
+ // https://jsperf.com/object-keys-vs-for-in-with-closure/3
+ var models = Object.keys(conversions);
+
+ for (var len = models.length, i = 0; i < len; i++) {
+ graph[models[i]] = {
+ // http://jsperf.com/1-vs-infinity
+ // micro-opt, but this is simple.
+ distance: -1,
+ parent: null
+ };
+ }
+
+ return graph;
+}
+
+// https://en.wikipedia.org/wiki/Breadth-first_search
+function deriveBFS(fromModel) {
+ var graph = buildGraph();
+ var queue = [fromModel]; // unshift -> queue -> pop
+
+ graph[fromModel].distance = 0;
+
+ while (queue.length) {
+ var current = queue.pop();
+ var adjacents = Object.keys(conversions[current]);
+
+ for (var len = adjacents.length, i = 0; i < len; i++) {
+ var adjacent = adjacents[i];
+ var node = graph[adjacent];
+
+ if (node.distance === -1) {
+ node.distance = graph[current].distance + 1;
+ node.parent = current;
+ queue.unshift(adjacent);
+ }
+ }
+ }
+
+ return graph;
+}
+
+function link(from, to) {
+ return function (args) {
+ return to(from(args));
+ };
+}
+
+function wrapConversion(toModel, graph) {
+ var path = [graph[toModel].parent, toModel];
+ var fn = conversions[graph[toModel].parent][toModel];
+
+ var cur = graph[toModel].parent;
+ while (graph[cur].parent) {
+ path.unshift(graph[cur].parent);
+ fn = link(conversions[graph[cur].parent][cur], fn);
+ cur = graph[cur].parent;
+ }
+
+ fn.conversion = path;
+ return fn;
+}
+
+module.exports = function (fromModel) {
+ var graph = deriveBFS(fromModel);
+ var conversion = {};
+
+ var models = Object.keys(graph);
+ for (var len = models.length, i = 0; i < len; i++) {
+ var toModel = models[i];
+ var node = graph[toModel];
+
+ if (node.parent === null) {
+ // no possible conversion, or this node is the source model.
+ continue;
+ }
+
+ conversion[toModel] = wrapConversion(toModel, graph);
+ }
+
+ return conversion;
+};
+
diff --git a/node_modules/@babel/highlight/node_modules/color-name/.eslintrc.json b/node_modules/@babel/highlight/node_modules/color-name/.eslintrc.json
new file mode 100644
index 0000000..c50c250
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-name/.eslintrc.json
@@ -0,0 +1,43 @@
+{
+ "env": {
+ "browser": true,
+ "node": true,
+ "commonjs": true,
+ "es6": true
+ },
+ "extends": "eslint:recommended",
+ "rules": {
+ "strict": 2,
+ "indent": 0,
+ "linebreak-style": 0,
+ "quotes": 0,
+ "semi": 0,
+ "no-cond-assign": 1,
+ "no-constant-condition": 1,
+ "no-duplicate-case": 1,
+ "no-empty": 1,
+ "no-ex-assign": 1,
+ "no-extra-boolean-cast": 1,
+ "no-extra-semi": 1,
+ "no-fallthrough": 1,
+ "no-func-assign": 1,
+ "no-global-assign": 1,
+ "no-implicit-globals": 2,
+ "no-inner-declarations": ["error", "functions"],
+ "no-irregular-whitespace": 2,
+ "no-loop-func": 1,
+ "no-multi-str": 1,
+ "no-mixed-spaces-and-tabs": 1,
+ "no-proto": 1,
+ "no-sequences": 1,
+ "no-throw-literal": 1,
+ "no-unmodified-loop-condition": 1,
+ "no-useless-call": 1,
+ "no-void": 1,
+ "no-with": 2,
+ "wrap-iife": 1,
+ "no-redeclare": 1,
+ "no-unused-vars": ["error", { "vars": "all", "args": "none" }],
+ "no-sparse-arrays": 1
+ }
+}
diff --git a/node_modules/@babel/highlight/node_modules/color-name/.npmignore b/node_modules/@babel/highlight/node_modules/color-name/.npmignore
new file mode 100644
index 0000000..f9f2816
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-name/.npmignore
@@ -0,0 +1,107 @@
+//this will affect all the git repos
+git config --global core.excludesfile ~/.gitignore
+
+
+//update files since .ignore won't if already tracked
+git rm --cached <file>
+
+# Compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.o
+*.so
+
+# Packages #
+############
+# it's better to unpack these files and commit the raw source
+# git has its own built in compression methods
+*.7z
+*.dmg
+*.gz
+*.iso
+*.jar
+*.rar
+*.tar
+*.zip
+
+# Logs and databases #
+######################
+*.log
+*.sql
+*.sqlite
+
+# OS generated files #
+######################
+.DS_Store
+.DS_Store?
+._*
+.Spotlight-V100
+.Trashes
+# Icon?
+ehthumbs.db
+Thumbs.db
+.cache
+.project
+.settings
+.tmproj
+*.esproj
+nbproject
+
+# Numerous always-ignore extensions #
+#####################################
+*.diff
+*.err
+*.orig
+*.rej
+*.swn
+*.swo
+*.swp
+*.vi
+*~
+*.sass-cache
+*.grunt
+*.tmp
+
+# Dreamweaver added files #
+###########################
+_notes
+dwsync.xml
+
+# Komodo #
+###########################
+*.komodoproject
+.komodotools
+
+# Node #
+#####################
+node_modules
+
+# Bower #
+#####################
+bower_components
+
+# Folders to ignore #
+#####################
+.hg
+.svn
+.CVS
+intermediate
+publish
+.idea
+.graphics
+_test
+_archive
+uploads
+tmp
+
+# Vim files to ignore #
+#######################
+.VimballRecord
+.netrwhist
+
+bundle.*
+
+_demo \ No newline at end of file
diff --git a/node_modules/@babel/highlight/node_modules/color-name/LICENSE b/node_modules/@babel/highlight/node_modules/color-name/LICENSE
new file mode 100644
index 0000000..c6b1001
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-name/LICENSE
@@ -0,0 +1,8 @@
+The MIT License (MIT)
+Copyright (c) 2015 Dmitry Ivanov
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/@babel/highlight/node_modules/color-name/README.md b/node_modules/@babel/highlight/node_modules/color-name/README.md
new file mode 100644
index 0000000..932b979
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-name/README.md
@@ -0,0 +1,11 @@
+A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors.
+
+[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/)
+
+
+```js
+var colors = require('color-name');
+colors.red //[255,0,0]
+```
+
+<a href="LICENSE"><img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" width="120"/></a>
diff --git a/node_modules/@babel/highlight/node_modules/color-name/index.js b/node_modules/@babel/highlight/node_modules/color-name/index.js
new file mode 100644
index 0000000..b7c198a
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-name/index.js
@@ -0,0 +1,152 @@
+'use strict'
+
+module.exports = {
+ "aliceblue": [240, 248, 255],
+ "antiquewhite": [250, 235, 215],
+ "aqua": [0, 255, 255],
+ "aquamarine": [127, 255, 212],
+ "azure": [240, 255, 255],
+ "beige": [245, 245, 220],
+ "bisque": [255, 228, 196],
+ "black": [0, 0, 0],
+ "blanchedalmond": [255, 235, 205],
+ "blue": [0, 0, 255],
+ "blueviolet": [138, 43, 226],
+ "brown": [165, 42, 42],
+ "burlywood": [222, 184, 135],
+ "cadetblue": [95, 158, 160],
+ "chartreuse": [127, 255, 0],
+ "chocolate": [210, 105, 30],
+ "coral": [255, 127, 80],
+ "cornflowerblue": [100, 149, 237],
+ "cornsilk": [255, 248, 220],
+ "crimson": [220, 20, 60],
+ "cyan": [0, 255, 255],
+ "darkblue": [0, 0, 139],
+ "darkcyan": [0, 139, 139],
+ "darkgoldenrod": [184, 134, 11],
+ "darkgray": [169, 169, 169],
+ "darkgreen": [0, 100, 0],
+ "darkgrey": [169, 169, 169],
+ "darkkhaki": [189, 183, 107],
+ "darkmagenta": [139, 0, 139],
+ "darkolivegreen": [85, 107, 47],
+ "darkorange": [255, 140, 0],
+ "darkorchid": [153, 50, 204],
+ "darkred": [139, 0, 0],
+ "darksalmon": [233, 150, 122],
+ "darkseagreen": [143, 188, 143],
+ "darkslateblue": [72, 61, 139],
+ "darkslategray": [47, 79, 79],
+ "darkslategrey": [47, 79, 79],
+ "darkturquoise": [0, 206, 209],
+ "darkviolet": [148, 0, 211],
+ "deeppink": [255, 20, 147],
+ "deepskyblue": [0, 191, 255],
+ "dimgray": [105, 105, 105],
+ "dimgrey": [105, 105, 105],
+ "dodgerblue": [30, 144, 255],
+ "firebrick": [178, 34, 34],
+ "floralwhite": [255, 250, 240],
+ "forestgreen": [34, 139, 34],
+ "fuchsia": [255, 0, 255],
+ "gainsboro": [220, 220, 220],
+ "ghostwhite": [248, 248, 255],
+ "gold": [255, 215, 0],
+ "goldenrod": [218, 165, 32],
+ "gray": [128, 128, 128],
+ "green": [0, 128, 0],
+ "greenyellow": [173, 255, 47],
+ "grey": [128, 128, 128],
+ "honeydew": [240, 255, 240],
+ "hotpink": [255, 105, 180],
+ "indianred": [205, 92, 92],
+ "indigo": [75, 0, 130],
+ "ivory": [255, 255, 240],
+ "khaki": [240, 230, 140],
+ "lavender": [230, 230, 250],
+ "lavenderblush": [255, 240, 245],
+ "lawngreen": [124, 252, 0],
+ "lemonchiffon": [255, 250, 205],
+ "lightblue": [173, 216, 230],
+ "lightcoral": [240, 128, 128],
+ "lightcyan": [224, 255, 255],
+ "lightgoldenrodyellow": [250, 250, 210],
+ "lightgray": [211, 211, 211],
+ "lightgreen": [144, 238, 144],
+ "lightgrey": [211, 211, 211],
+ "lightpink": [255, 182, 193],
+ "lightsalmon": [255, 160, 122],
+ "lightseagreen": [32, 178, 170],
+ "lightskyblue": [135, 206, 250],
+ "lightslategray": [119, 136, 153],
+ "lightslategrey": [119, 136, 153],
+ "lightsteelblue": [176, 196, 222],
+ "lightyellow": [255, 255, 224],
+ "lime": [0, 255, 0],
+ "limegreen": [50, 205, 50],
+ "linen": [250, 240, 230],
+ "magenta": [255, 0, 255],
+ "maroon": [128, 0, 0],
+ "mediumaquamarine": [102, 205, 170],
+ "mediumblue": [0, 0, 205],
+ "mediumorchid": [186, 85, 211],
+ "mediumpurple": [147, 112, 219],
+ "mediumseagreen": [60, 179, 113],
+ "mediumslateblue": [123, 104, 238],
+ "mediumspringgreen": [0, 250, 154],
+ "mediumturquoise": [72, 209, 204],
+ "mediumvioletred": [199, 21, 133],
+ "midnightblue": [25, 25, 112],
+ "mintcream": [245, 255, 250],
+ "mistyrose": [255, 228, 225],
+ "moccasin": [255, 228, 181],
+ "navajowhite": [255, 222, 173],
+ "navy": [0, 0, 128],
+ "oldlace": [253, 245, 230],
+ "olive": [128, 128, 0],
+ "olivedrab": [107, 142, 35],
+ "orange": [255, 165, 0],
+ "orangered": [255, 69, 0],
+ "orchid": [218, 112, 214],
+ "palegoldenrod": [238, 232, 170],
+ "palegreen": [152, 251, 152],
+ "paleturquoise": [175, 238, 238],
+ "palevioletred": [219, 112, 147],
+ "papayawhip": [255, 239, 213],
+ "peachpuff": [255, 218, 185],
+ "peru": [205, 133, 63],
+ "pink": [255, 192, 203],
+ "plum": [221, 160, 221],
+ "powderblue": [176, 224, 230],
+ "purple": [128, 0, 128],
+ "rebeccapurple": [102, 51, 153],
+ "red": [255, 0, 0],
+ "rosybrown": [188, 143, 143],
+ "royalblue": [65, 105, 225],
+ "saddlebrown": [139, 69, 19],
+ "salmon": [250, 128, 114],
+ "sandybrown": [244, 164, 96],
+ "seagreen": [46, 139, 87],
+ "seashell": [255, 245, 238],
+ "sienna": [160, 82, 45],
+ "silver": [192, 192, 192],
+ "skyblue": [135, 206, 235],
+ "slateblue": [106, 90, 205],
+ "slategray": [112, 128, 144],
+ "slategrey": [112, 128, 144],
+ "snow": [255, 250, 250],
+ "springgreen": [0, 255, 127],
+ "steelblue": [70, 130, 180],
+ "tan": [210, 180, 140],
+ "teal": [0, 128, 128],
+ "thistle": [216, 191, 216],
+ "tomato": [255, 99, 71],
+ "turquoise": [64, 224, 208],
+ "violet": [238, 130, 238],
+ "wheat": [245, 222, 179],
+ "white": [255, 255, 255],
+ "whitesmoke": [245, 245, 245],
+ "yellow": [255, 255, 0],
+ "yellowgreen": [154, 205, 50]
+};
diff --git a/node_modules/@babel/highlight/node_modules/color-name/package.json b/node_modules/@babel/highlight/node_modules/color-name/package.json
new file mode 100644
index 0000000..d061123
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-name/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "color-name",
+ "version": "1.1.3",
+ "description": "A list of color names and its values",
+ "main": "index.js",
+ "scripts": {
+ "test": "node test.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:dfcreative/color-name.git"
+ },
+ "keywords": [
+ "color-name",
+ "color",
+ "color-keyword",
+ "keyword"
+ ],
+ "author": "DY <dfcreative@gmail.com>",
+ "license": "MIT",
+ "bugs": {
+ "url": "https://github.com/dfcreative/color-name/issues"
+ },
+ "homepage": "https://github.com/dfcreative/color-name"
+}
diff --git a/node_modules/@babel/highlight/node_modules/color-name/test.js b/node_modules/@babel/highlight/node_modules/color-name/test.js
new file mode 100644
index 0000000..6e6bf30
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/color-name/test.js
@@ -0,0 +1,7 @@
+'use strict'
+
+var names = require('./');
+var assert = require('assert');
+
+assert.deepEqual(names.red, [255,0,0]);
+assert.deepEqual(names.aliceblue, [240,248,255]);
diff --git a/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js b/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js
new file mode 100644
index 0000000..7834bf9
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js
@@ -0,0 +1,11 @@
+'use strict';
+
+var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
+
+module.exports = function (str) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string');
+ }
+
+ return str.replace(matchOperatorsRe, '\\$&');
+};
diff --git a/node_modules/@babel/highlight/node_modules/escape-string-regexp/license b/node_modules/@babel/highlight/node_modules/escape-string-regexp/license
new file mode 100644
index 0000000..654d0bf
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/escape-string-regexp/license
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json b/node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json
new file mode 100644
index 0000000..f307df3
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json
@@ -0,0 +1,41 @@
+{
+ "name": "escape-string-regexp",
+ "version": "1.0.5",
+ "description": "Escape RegExp special characters",
+ "license": "MIT",
+ "repository": "sindresorhus/escape-string-regexp",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "maintainers": [
+ "Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)",
+ "Joshua Boy Nicolai Appelman <joshua@jbna.nl> (jbna.nl)"
+ ],
+ "engines": {
+ "node": ">=0.8.0"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "escape",
+ "regex",
+ "regexp",
+ "re",
+ "regular",
+ "expression",
+ "string",
+ "str",
+ "special",
+ "characters"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md b/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md
new file mode 100644
index 0000000..87ac82d
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md
@@ -0,0 +1,27 @@
+# escape-string-regexp [![Build Status](https://travis-ci.org/sindresorhus/escape-string-regexp.svg?branch=master)](https://travis-ci.org/sindresorhus/escape-string-regexp)
+
+> Escape RegExp special characters
+
+
+## Install
+
+```
+$ npm install --save escape-string-regexp
+```
+
+
+## Usage
+
+```js
+const escapeStringRegexp = require('escape-string-regexp');
+
+const escapedString = escapeStringRegexp('how much $ for a unicorn?');
+//=> 'how much \$ for a unicorn\?'
+
+new RegExp(escapedString);
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)
diff --git a/node_modules/@babel/highlight/node_modules/has-flag/index.js b/node_modules/@babel/highlight/node_modules/has-flag/index.js
new file mode 100644
index 0000000..5139728
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/has-flag/index.js
@@ -0,0 +1,8 @@
+'use strict';
+module.exports = (flag, argv) => {
+ argv = argv || process.argv;
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
+ const pos = argv.indexOf(prefix + flag);
+ const terminatorPos = argv.indexOf('--');
+ return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
+};
diff --git a/node_modules/@babel/highlight/node_modules/has-flag/license b/node_modules/@babel/highlight/node_modules/has-flag/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/has-flag/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/highlight/node_modules/has-flag/package.json b/node_modules/@babel/highlight/node_modules/has-flag/package.json
new file mode 100644
index 0000000..e1eb17a
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/has-flag/package.json
@@ -0,0 +1,44 @@
+{
+ "name": "has-flag",
+ "version": "3.0.0",
+ "description": "Check if argv has a specific flag",
+ "license": "MIT",
+ "repository": "sindresorhus/has-flag",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "has",
+ "check",
+ "detect",
+ "contains",
+ "find",
+ "flag",
+ "cli",
+ "command-line",
+ "argv",
+ "process",
+ "arg",
+ "args",
+ "argument",
+ "arguments",
+ "getopt",
+ "minimist",
+ "optimist"
+ ],
+ "devDependencies": {
+ "ava": "*",
+ "xo": "*"
+ }
+}
diff --git a/node_modules/@babel/highlight/node_modules/has-flag/readme.md b/node_modules/@babel/highlight/node_modules/has-flag/readme.md
new file mode 100644
index 0000000..677893c
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/has-flag/readme.md
@@ -0,0 +1,70 @@
+# has-flag [![Build Status](https://travis-ci.org/sindresorhus/has-flag.svg?branch=master)](https://travis-ci.org/sindresorhus/has-flag)
+
+> Check if [`argv`](https://nodejs.org/docs/latest/api/process.html#process_process_argv) has a specific flag
+
+Correctly stops looking after an `--` argument terminator.
+
+
+## Install
+
+```
+$ npm install has-flag
+```
+
+
+## Usage
+
+```js
+// foo.js
+const hasFlag = require('has-flag');
+
+hasFlag('unicorn');
+//=> true
+
+hasFlag('--unicorn');
+//=> true
+
+hasFlag('f');
+//=> true
+
+hasFlag('-f');
+//=> true
+
+hasFlag('foo=bar');
+//=> true
+
+hasFlag('foo');
+//=> false
+
+hasFlag('rainbow');
+//=> false
+```
+
+```
+$ node foo.js -f --unicorn --foo=bar -- --rainbow
+```
+
+
+## API
+
+### hasFlag(flag, [argv])
+
+Returns a boolean for whether the flag exists.
+
+#### flag
+
+Type: `string`
+
+CLI flag to look for. The `--` prefix is optional.
+
+#### argv
+
+Type: `string[]`<br>
+Default: `process.argv`
+
+CLI arguments.
+
+
+## License
+
+MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/@babel/highlight/node_modules/supports-color/browser.js b/node_modules/@babel/highlight/node_modules/supports-color/browser.js
new file mode 100644
index 0000000..62afa3a
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/supports-color/browser.js
@@ -0,0 +1,5 @@
+'use strict';
+module.exports = {
+ stdout: false,
+ stderr: false
+};
diff --git a/node_modules/@babel/highlight/node_modules/supports-color/index.js b/node_modules/@babel/highlight/node_modules/supports-color/index.js
new file mode 100644
index 0000000..1704131
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/supports-color/index.js
@@ -0,0 +1,131 @@
+'use strict';
+const os = require('os');
+const hasFlag = require('has-flag');
+
+const env = process.env;
+
+let forceColor;
+if (hasFlag('no-color') ||
+ hasFlag('no-colors') ||
+ hasFlag('color=false')) {
+ forceColor = false;
+} else if (hasFlag('color') ||
+ hasFlag('colors') ||
+ hasFlag('color=true') ||
+ hasFlag('color=always')) {
+ forceColor = true;
+}
+if ('FORCE_COLOR' in env) {
+ forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
+}
+
+function translateLevel(level) {
+ if (level === 0) {
+ return false;
+ }
+
+ return {
+ level,
+ hasBasic: true,
+ has256: level >= 2,
+ has16m: level >= 3
+ };
+}
+
+function supportsColor(stream) {
+ if (forceColor === false) {
+ return 0;
+ }
+
+ if (hasFlag('color=16m') ||
+ hasFlag('color=full') ||
+ hasFlag('color=truecolor')) {
+ return 3;
+ }
+
+ if (hasFlag('color=256')) {
+ return 2;
+ }
+
+ if (stream && !stream.isTTY && forceColor !== true) {
+ return 0;
+ }
+
+ const min = forceColor ? 1 : 0;
+
+ if (process.platform === 'win32') {
+ // Node.js 7.5.0 is the first version of Node.js to include a patch to
+ // libuv that enables 256 color output on Windows. Anything earlier and it
+ // won't work. However, here we target Node.js 8 at minimum as it is an LTS
+ // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
+ // release that supports 256 colors. Windows 10 build 14931 is the first release
+ // that supports 16m/TrueColor.
+ const osRelease = os.release().split('.');
+ if (
+ Number(process.versions.node.split('.')[0]) >= 8 &&
+ Number(osRelease[0]) >= 10 &&
+ Number(osRelease[2]) >= 10586
+ ) {
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
+ }
+
+ return 1;
+ }
+
+ if ('CI' in env) {
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
+ return 1;
+ }
+
+ return min;
+ }
+
+ if ('TEAMCITY_VERSION' in env) {
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
+ }
+
+ if (env.COLORTERM === 'truecolor') {
+ return 3;
+ }
+
+ if ('TERM_PROGRAM' in env) {
+ const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
+
+ switch (env.TERM_PROGRAM) {
+ case 'iTerm.app':
+ return version >= 3 ? 3 : 2;
+ case 'Apple_Terminal':
+ return 2;
+ // No default
+ }
+ }
+
+ if (/-256(color)?$/i.test(env.TERM)) {
+ return 2;
+ }
+
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
+ return 1;
+ }
+
+ if ('COLORTERM' in env) {
+ return 1;
+ }
+
+ if (env.TERM === 'dumb') {
+ return min;
+ }
+
+ return min;
+}
+
+function getSupportLevel(stream) {
+ const level = supportsColor(stream);
+ return translateLevel(level);
+}
+
+module.exports = {
+ supportsColor: getSupportLevel,
+ stdout: getSupportLevel(process.stdout),
+ stderr: getSupportLevel(process.stderr)
+};
diff --git a/node_modules/@babel/highlight/node_modules/supports-color/license b/node_modules/@babel/highlight/node_modules/supports-color/license
new file mode 100644
index 0000000..e7af2f7
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/supports-color/license
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/highlight/node_modules/supports-color/package.json b/node_modules/@babel/highlight/node_modules/supports-color/package.json
new file mode 100644
index 0000000..ad199f5
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/supports-color/package.json
@@ -0,0 +1,53 @@
+{
+ "name": "supports-color",
+ "version": "5.5.0",
+ "description": "Detect whether a terminal supports color",
+ "license": "MIT",
+ "repository": "chalk/supports-color",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "sindresorhus.com"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "scripts": {
+ "test": "xo && ava"
+ },
+ "files": [
+ "index.js",
+ "browser.js"
+ ],
+ "keywords": [
+ "color",
+ "colour",
+ "colors",
+ "terminal",
+ "console",
+ "cli",
+ "ansi",
+ "styles",
+ "tty",
+ "rgb",
+ "256",
+ "shell",
+ "xterm",
+ "command-line",
+ "support",
+ "supports",
+ "capability",
+ "detect",
+ "truecolor",
+ "16m"
+ ],
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "devDependencies": {
+ "ava": "^0.25.0",
+ "import-fresh": "^2.0.0",
+ "xo": "^0.20.0"
+ },
+ "browser": "browser.js"
+}
diff --git a/node_modules/@babel/highlight/node_modules/supports-color/readme.md b/node_modules/@babel/highlight/node_modules/supports-color/readme.md
new file mode 100644
index 0000000..f6e4019
--- /dev/null
+++ b/node_modules/@babel/highlight/node_modules/supports-color/readme.md
@@ -0,0 +1,66 @@
+# supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
+
+> Detect whether a terminal supports color
+
+
+## Install
+
+```
+$ npm install supports-color
+```
+
+
+## Usage
+
+```js
+const supportsColor = require('supports-color');
+
+if (supportsColor.stdout) {
+ console.log('Terminal stdout supports color');
+}
+
+if (supportsColor.stdout.has256) {
+ console.log('Terminal stdout supports 256 colors');
+}
+
+if (supportsColor.stderr.has16m) {
+ console.log('Terminal stderr supports 16 million colors (truecolor)');
+}
+```
+
+
+## API
+
+Returns an `Object` with a `stdout` and `stderr` property for testing either streams. Each property is an `Object`, or `false` if color is not supported.
+
+The `stdout`/`stderr` objects specifies a level of support for color through a `.level` property and a corresponding flag:
+
+- `.level = 1` and `.hasBasic = true`: Basic color support (16 colors)
+- `.level = 2` and `.has256 = true`: 256 color support
+- `.level = 3` and `.has16m = true`: Truecolor support (16 million colors)
+
+
+## Info
+
+It obeys the `--color` and `--no-color` CLI flags.
+
+Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
+
+Explicit 256/Truecolor mode can be enabled using the `--color=256` and `--color=16m` flags, respectively.
+
+
+## Related
+
+- [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
+- [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
+
+
+## Maintainers
+
+- [Sindre Sorhus](https://github.com/sindresorhus)
+- [Josh Junon](https://github.com/qix-)
+
+
+## License
+
+MIT
diff --git a/node_modules/@babel/highlight/package.json b/node_modules/@babel/highlight/package.json
new file mode 100644
index 0000000..935013b
--- /dev/null
+++ b/node_modules/@babel/highlight/package.json
@@ -0,0 +1,29 @@
+{
+ "name": "@babel/highlight",
+ "version": "7.16.10",
+ "description": "Syntax highlight JavaScript strings for output in terminals.",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-highlight",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-highlight"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.16.7",
+ "chalk": "^2.0.0",
+ "js-tokens": "^4.0.0"
+ },
+ "devDependencies": {
+ "@types/chalk": "^2.0.0",
+ "strip-ansi": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/parser/CHANGELOG.md b/node_modules/@babel/parser/CHANGELOG.md
new file mode 100644
index 0000000..b3840ac
--- /dev/null
+++ b/node_modules/@babel/parser/CHANGELOG.md
@@ -0,0 +1,1073 @@
+# Changelog
+
+> **Tags:**
+> - :boom: [Breaking Change]
+> - :eyeglasses: [Spec Compliance]
+> - :rocket: [New Feature]
+> - :bug: [Bug Fix]
+> - :memo: [Documentation]
+> - :house: [Internal]
+> - :nail_care: [Polish]
+
+> Semver Policy: https://github.com/babel/babel/tree/main/packages/babel-parser#semver
+
+_Note: Gaps between patch versions are faulty, broken or test releases._
+
+See the [Babel Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) for the pre-6.8.0 version Changelog.
+
+## 6.17.1 (2017-05-10)
+
+### :bug: Bug Fix
+ * Fix typo in flow spread operator error (Brian Ng)
+ * Fixed invalid number literal parsing ([#473](https://github.com/babel/babylon/pull/473)) (Alex Kuzmenko)
+ * Fix number parser ([#433](https://github.com/babel/babylon/pull/433)) (Alex Kuzmenko)
+ * Ensure non pattern shorthand props are checked for reserved words ([#479](https://github.com/babel/babylon/pull/479)) (Brian Ng)
+ * Remove jsx context when parsing arrow functions ([#475](https://github.com/babel/babylon/pull/475)) (Brian Ng)
+ * Allow super in class properties ([#499](https://github.com/babel/babylon/pull/499)) (Brian Ng)
+ * Allow flow class field to be named constructor ([#510](https://github.com/babel/babylon/pull/510)) (Brian Ng)
+
+## 6.17.0 (2017-04-20)
+
+### :bug: Bug Fix
+ * Cherry-pick #418 to 6.x ([#476](https://github.com/babel/babylon/pull/476)) (Sebastian McKenzie)
+ * Add support for invalid escapes in tagged templates ([#274](https://github.com/babel/babylon/pull/274)) (Kevin Gibbons)
+ * Throw error if new.target is used outside of a function ([#402](https://github.com/babel/babylon/pull/402)) (Brian Ng)
+ * Fix parsing of class properties ([#351](https://github.com/babel/babylon/pull/351)) (Kevin Gibbons)
+ * Fix parsing yield with dynamicImport ([#383](https://github.com/babel/babylon/pull/383)) (Brian Ng)
+ * Ensure consistent start args for parseParenItem ([#386](https://github.com/babel/babylon/pull/386)) (Brian Ng)
+
+## 7.0.0-beta.8 (2017-04-04)
+
+### New Feature
+* Add support for flow type spread (#418) (Conrad Buck)
+* Allow statics in flow interfaces (#427) (Brian Ng)
+
+### Bug Fix
+* Fix predicate attachment to match flow parser (#428) (Brian Ng)
+* Add extra.raw back to JSXText and JSXAttribute (#344) (Alex Rattray)
+* Fix rest parameters with array and objects (#424) (Brian Ng)
+* Fix number parser (#433) (Alex Kuzmenko)
+
+### Docs
+* Fix CONTRIBUTING.md [skip ci] (#432) (Alex Kuzmenko)
+
+### Internal
+* Use babel-register script when running babel smoke tests (#442) (Brian Ng)
+
+## 7.0.0-beta.7 (2017-03-22)
+
+### Spec Compliance
+* Remove babylon plugin for template revision since it's stage-4 (#426) (Henry Zhu)
+
+### Bug Fix
+
+* Fix push-pop logic in flow (#405) (Daniel Tschinder)
+
+## 7.0.0-beta.6 (2017-03-21)
+
+### New Feature
+* Add support for invalid escapes in tagged templates (#274) (Kevin Gibbons)
+
+### Polish
+* Improves error message when super is called outside of constructor (#408) (Arshabh Kumar Agarwal)
+
+### Docs
+
+* [7.0] Moved value field in spec from ObjectMember to ObjectProperty as ObjectMethod's don't have it (#415) [skip ci] (James Browning)
+
+## 7.0.0-beta.5 (2017-03-21)
+
+### Bug Fix
+* Throw error if new.target is used outside of a function (#402) (Brian Ng)
+* Fix parsing of class properties (#351) (Kevin Gibbons)
+
+### Other
+ * Test runner: Detect extra property in 'actual' but not in 'expected'. (#407) (Andy)
+ * Optimize travis builds (#419) (Daniel Tschinder)
+ * Update codecov to 2.0 (#412) (Daniel Tschinder)
+ * Fix spec for ClassMethod: It doesn't have a function, it *is* a function. (#406) [skip ci] (Andy)
+ * Changed Non-existent RestPattern to RestElement which is what is actually parsed (#409) [skip ci] (James Browning)
+ * Upgrade flow to 0.41 (Daniel Tschinder)
+ * Fix watch command (#403) (Brian Ng)
+ * Update yarn lock (Daniel Tschinder)
+ * Fix watch command (#403) (Brian Ng)
+ * chore(package): update flow-bin to version 0.41.0 (#395) (greenkeeper[bot])
+ * Add estree test for correct order of directives (Daniel Tschinder)
+ * Add DoExpression to spec (#364) (Alex Kuzmenko)
+ * Mention cloning of repository in CONTRIBUTING.md (#391) [skip ci] (Sumedh Nimkarde)
+ * Explain how to run only one test (#389) [skip ci] (Aaron Ang)
+
+ ## 7.0.0-beta.4 (2017-03-01)
+
+* Don't consume async when checking for async func decl (#377) (Brian Ng)
+* add `ranges` option [skip ci] (Henry Zhu)
+* Don't parse class properties without initializers when classProperties is disabled and Flow is enabled (#300) (Andrew Levine)
+
+## 7.0.0-beta.3 (2017-02-28)
+
+- [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384)
+- Merge changes from 6.x
+
+## 7.0.0-beta.2 (2017-02-20)
+
+- estree: correctly change literals in all cases (#368) (Daniel Tschinder)
+
+## 7.0.0-beta.1 (2017-02-20)
+
+- Fix negative number literal typeannotations (#366) (Daniel Tschinder)
+- Update contributing with more test info [skip ci] (#355) (Brian Ng)
+
+## 7.0.0-beta.0 (2017-02-15)
+
+- Reintroduce Variance node (#333) (Daniel Tschinder)
+- Rename NumericLiteralTypeAnnotation to NumberLiteralTypeAnnotation (#332) (Charles Pick)
+- [7.0] Remove ForAwaitStatement, add await flag to ForOfStatement (#349) (Brandon Dail)
+- chore(package): update ava to version 0.18.0 (#345) (greenkeeper[bot])
+- chore(package): update babel-plugin-istanbul to version 4.0.0 (#350) (greenkeeper[bot])
+- Change location of ObjectTypeIndexer to match flow (#228) (Daniel Tschinder)
+- Rename flow AST Type ExistentialTypeParam to ExistsTypeAnnotation (#322) (Toru Kobayashi)
+- Revert "Temporary rollback for erroring on trailing comma with spread (#154)" (#290) (Daniel Tschinder)
+- Remove classConstructorCall plugin (#291) (Brian Ng)
+- Update yarn.lock (Daniel Tschinder)
+- Update cross-env to 3.x (Daniel Tschinder)
+- [7.0] Remove node 0.10, 0.12 and 5 from Travis (#284) (Sergey Rubanov)
+- Remove `String.fromCodePoint` shim (#279) (Mathias Bynens)
+
+## 6.16.1 (2017-02-23)
+
+### :bug: Regression
+
+- Revert "Fix export default async function to be FunctionDeclaration" ([#375](https://github.com/babel/babylon/pull/375))
+
+Need to modify Babel for this AST node change, so moving to 7.0.
+
+- Revert "Don't parse class properties without initializers when classProperties plugin is disabled, and Flow is enabled" ([#376](https://github.com/babel/babylon/pull/376))
+
+[react-native](https://github.com/facebook/react-native/issues/12542) broke with this so we reverted.
+
+## 6.16.0 (2017-02-23)
+
+### :rocket: New Feature
+
+***ESTree*** compatibility as plugin ([#277](https://github.com/babel/babylon/pull/277)) (Daniel Tschinder)
+
+We finally introduce a new compatibility layer for ESTree. To put babylon into ESTree-compatible mode the new plugin `estree` can be enabled. In this mode the parser will output an AST that is compliant to the specs of [ESTree](https://github.com/estree/estree/)
+
+We highly recommend everyone who uses babylon outside of babel to use this plugin. This will make it much easier for users to switch between different ESTree-compatible parsers. We so far tested several projects with different parsers and exchanged their parser to babylon and in nearly all cases it worked out of the box. Some other estree-compatible parsers include `acorn`, `esprima`, `espree`, `flow-parser`, etc.
+
+To enable `estree` mode simply add the plugin in the config:
+```json
+{
+ "plugins": [ "estree" ]
+}
+```
+
+If you want to migrate your project from non-ESTree mode to ESTree, have a look at our [Readme](https://github.com/babel/babylon/#output), where all deviations are mentioned.
+
+Add a parseExpression public method ([#213](https://github.com/babel/babylon/pull/213)) (jeromew)
+
+Babylon exports a new function to parse a single expression
+
+```js
+import { parseExpression } from 'babylon';
+
+const ast = parseExpression('x || y && z', options);
+```
+
+The returned AST will only consist of the expression. The options are the same as for `parse()`
+
+Add startLine option ([#346](https://github.com/babel/babylon/pull/346)) (Raphael Mu)
+
+A new option was added to babylon allowing to change the initial linenumber for the first line which is usually `1`.
+Changing this for example to `100` will make line `1` of the input source to be marked as line `100`, line `2` as `101`, line `3` as `102`, ...
+
+Function predicate declaration ([#103](https://github.com/babel/babylon/pull/103)) (Panagiotis Vekris)
+
+Added support for function predicates which flow introduced in version 0.33.0
+
+```js
+declare function is_number(x: mixed): boolean %checks(typeof x === "number");
+```
+
+Allow imports in declare module ([#315](https://github.com/babel/babylon/pull/315)) (Daniel Tschinder)
+
+Added support for imports within module declarations which flow introduced in version 0.37.0
+
+```js
+declare module "C" {
+ import type { DT } from "D";
+ declare export type CT = { D: DT };
+}
+```
+
+### :eyeglasses: Spec Compliance
+
+Forbid semicolons after decorators in classes ([#352](https://github.com/babel/babylon/pull/352)) (Kevin Gibbons)
+
+This example now correctly throws an error when there is a semicolon after the decorator:
+
+```js
+class A {
+@a;
+foo(){}
+}
+```
+
+Keywords are not allowed as local specifier ([#307](https://github.com/babel/babylon/pull/307)) (Daniel Tschinder)
+
+Using keywords in imports is not allowed anymore:
+
+```js
+import { default } from "foo";
+import { a as debugger } from "foo";
+```
+
+Do not allow overwritting of primitive types ([#314](https://github.com/babel/babylon/pull/314)) (Daniel Tschinder)
+
+In flow it is now forbidden to overwrite the primitive types `"any"`, `"mixed"`, `"empty"`, `"bool"`, `"boolean"`, `"number"`, `"string"`, `"void"` and `"null"` with your own type declaration.
+
+Disallow import type { type a } from … ([#305](https://github.com/babel/babylon/pull/305)) (Daniel Tschinder)
+
+The following code now correctly throws an error
+
+```js
+import type { type a } from "foo";
+```
+
+Don't parse class properties without initializers when classProperties is disabled and Flow is enabled ([#300](https://github.com/babel/babylon/pull/300)) (Andrew Levine)
+
+Ensure that you enable the `classProperties` plugin in order to enable correct parsing of class properties. Prior to this version it was possible to parse them by enabling the `flow` plugin but this was not intended the behaviour.
+
+If you enable the flow plugin you can only define the type of the class properties, but not initialize them.
+
+Fix export default async function to be FunctionDeclaration ([#324](https://github.com/babel/babylon/pull/324)) (Daniel Tschinder)
+
+Parsing the following code now returns a `FunctionDeclaration` AST node instead of `FunctionExpression`.
+
+```js
+export default async function bar() {};
+```
+
+### :nail_care: Polish
+
+Improve error message on attempt to destructure named import ([#288](https://github.com/babel/babylon/pull/288)) (Brian Ng)
+
+### :bug: Bug Fix
+
+Fix negative number literal typeannotations ([#366](https://github.com/babel/babylon/pull/366)) (Daniel Tschinder)
+
+Ensure takeDecorators is called on exported class ([#358](https://github.com/babel/babylon/pull/358)) (Brian Ng)
+
+ESTree: correctly change literals in all cases ([#368](https://github.com/babel/babylon/pull/368)) (Daniel Tschinder)
+
+Correctly convert RestProperty to Assignable ([#339](https://github.com/babel/babylon/pull/339)) (Daniel Tschinder)
+
+Fix #321 by allowing question marks in type params ([#338](https://github.com/babel/babylon/pull/338)) (Daniel Tschinder)
+
+Fix #336 by correctly setting arrow-param ([#337](https://github.com/babel/babylon/pull/337)) (Daniel Tschinder)
+
+Fix parse error when destructuring `set` with default value ([#317](https://github.com/babel/babylon/pull/317)) (Brian Ng)
+
+Fix ObjectTypeCallProperty static ([#298](https://github.com/babel/babylon/pull/298)) (Dan Harper)
+
+
+### :house: Internal
+
+Fix generator-method-with-computed-name spec ([#360](https://github.com/babel/babylon/pull/360)) (Alex Rattray)
+
+Fix flow type-parameter-declaration test with unintended semantic ([#361](https://github.com/babel/babylon/pull/361)) (Alex Rattray)
+
+Cleanup and splitup parser functions ([#295](https://github.com/babel/babylon/pull/295)) (Daniel Tschinder)
+
+chore(package): update flow-bin to version 0.38.0 ([#313](https://github.com/babel/babylon/pull/313)) (greenkeeper[bot])
+
+Call inner function instead of 1:1 copy to plugin ([#294](https://github.com/babel/babylon/pull/294)) (Daniel Tschinder)
+
+Update eslint-config-babel to the latest version 🚀 ([#299](https://github.com/babel/babylon/pull/299)) (greenkeeper[bot])
+
+Update eslint-config-babel to the latest version 🚀 ([#293](https://github.com/babel/babylon/pull/293)) (greenkeeper[bot])
+
+devDeps: remove eslint-plugin-babel ([#292](https://github.com/babel/babylon/pull/292)) (Kai Cataldo)
+
+Correct indent eslint rule config ([#276](https://github.com/babel/babylon/pull/276)) (Daniel Tschinder)
+
+Fail tests that have expected.json and throws-option ([#285](https://github.com/babel/babylon/pull/285)) (Daniel Tschinder)
+
+### :memo: Documentation
+
+Update contributing with more test info [skip ci] ([#355](https://github.com/babel/babylon/pull/355)) (Brian Ng)
+
+Update API documentation ([#330](https://github.com/babel/babylon/pull/330)) (Timothy Gu)
+
+Added keywords to package.json ([#323](https://github.com/babel/babylon/pull/323)) (Dmytro)
+
+AST spec: fix casing of `RegExpLiteral` ([#318](https://github.com/babel/babylon/pull/318)) (Mathias Bynens)
+
+## 6.15.0 (2017-01-10)
+
+### :eyeglasses: Spec Compliance
+
+Add support for Flow shorthand import type ([#267](https://github.com/babel/babylon/pull/267)) (Jeff Morrison)
+
+This change implements flows new shorthand import syntax
+and where previously you had to write this code:
+
+```js
+import {someValue} from "blah";
+import type {someType} from "blah";
+import typeof {someOtherValue} from "blah";
+```
+
+you can now write it like this:
+
+```js
+import {
+ someValue,
+ type someType,
+ typeof someOtherValue,
+} from "blah";
+```
+
+For more information look at [this](https://github.com/facebook/flow/pull/2890) pull request.
+
+flow: allow leading pipes in all positions ([#256](https://github.com/babel/babylon/pull/256)) (Vladimir Kurchatkin)
+
+This change now allows a leading pipe everywhere types can be used:
+```js
+var f = (x): | 1 | 2 => 1;
+```
+
+Throw error when exporting non-declaration ([#241](https://github.com/babel/babylon/pull/241)) (Kai Cataldo)
+
+Previously babylon parsed the following exports, although they are not valid:
+```js
+export typeof foo;
+export new Foo();
+export function() {};
+export for (;;);
+export while(foo);
+```
+
+### :bug: Bug Fix
+
+Don't set inType flag when parsing property names ([#266](https://github.com/babel/babylon/pull/266)) (Vladimir Kurchatkin)
+
+This fixes parsing of this case:
+
+```js
+const map = {
+ [age <= 17] : 'Too young'
+};
+```
+
+Fix source location for JSXEmptyExpression nodes (fixes #248) ([#249](https://github.com/babel/babylon/pull/249)) (James Long)
+
+The following case produced an invalid AST
+```js
+<div>{/* foo */}</div>
+```
+
+Use fromCodePoint to convert high value unicode entities ([#243](https://github.com/babel/babylon/pull/243)) (Ryan Duffy)
+
+When high value unicode entities (e.g. 💩) were used in the input source code they are now correctly encoded in the resulting AST.
+
+Rename folder to avoid Windows-illegal characters ([#281](https://github.com/babel/babylon/pull/281)) (Ryan Plant)
+
+Allow this.state.clone() when parsing decorators ([#262](https://github.com/babel/babylon/pull/262)) (Alex Rattray)
+
+### :house: Internal
+
+User external-helpers ([#254](https://github.com/babel/babylon/pull/254)) (Daniel Tschinder)
+
+Add watch script for dev ([#234](https://github.com/babel/babylon/pull/234)) (Kai Cataldo)
+
+Freeze current plugins list for "*" option, and remove from README.md ([#245](https://github.com/babel/babylon/pull/245)) (Andrew Levine)
+
+Prepare tests for multiple fixture runners. ([#240](https://github.com/babel/babylon/pull/240)) (Daniel Tschinder)
+
+Add some test coverage for decorators stage-0 plugin ([#250](https://github.com/babel/babylon/pull/250)) (Andrew Levine)
+
+Refactor tokenizer types file ([#263](https://github.com/babel/babylon/pull/263)) (Sven SAULEAU)
+
+Update eslint-config-babel to the latest version 🚀 ([#273](https://github.com/babel/babylon/pull/273)) (greenkeeper[bot])
+
+chore(package): update rollup to version 0.41.0 ([#272](https://github.com/babel/babylon/pull/272)) (greenkeeper[bot])
+
+chore(package): update flow-bin to version 0.37.0 ([#255](https://github.com/babel/babylon/pull/255)) (greenkeeper[bot])
+
+## 6.14.1 (2016-11-17)
+
+### :bug: Bug Fix
+
+Allow `"plugins": ["*"]` ([#229](https://github.com/babel/babylon/pull/229)) (Daniel Tschinder)
+
+```js
+{
+ "plugins": ["*"]
+}
+```
+
+Will include all parser plugins instead of specifying each one individually. Useful for tools like babel-eslint, jscodeshift, and ast-explorer.
+
+## 6.14.0 (2016-11-16)
+
+### :eyeglasses: Spec Compliance
+
+Throw error for reserved words `enum` and `await` ([#195](https://github.com/babel/babylon/pull/195)) (Kai Cataldo)
+
+[11.6.2.2 Future Reserved Words](http://www.ecma-international.org/ecma-262/6.0/#sec-future-reserved-words)
+
+Babylon will throw for more reserved words such as `enum` or `await` (in strict mode).
+
+```
+class enum {} // throws
+class await {} // throws in strict mode (module)
+```
+
+Optional names for function types and object type indexers ([#197](https://github.com/babel/babylon/pull/197)) (Gabe Levi)
+
+So where you used to have to write
+
+```js
+type A = (x: string, y: boolean) => number;
+type B = (z: string) => number;
+type C = { [key: string]: number };
+```
+
+you can now write (with flow 0.34.0)
+
+```js
+type A = (string, boolean) => number;
+type B = string => number;
+type C = { [string]: number };
+```
+
+Parse flow nested array type annotations like `number[][]` ([#219](https://github.com/babel/babylon/pull/219)) (Bernhard Häussner)
+
+Supports these form now of specifying array types:
+
+```js
+var a: number[][][][];
+var b: string[][];
+```
+
+### :bug: Bug Fix
+
+Correctly eat semicolon at the end of `DelcareModuleExports` ([#223](https://github.com/babel/babylon/pull/223)) (Daniel Tschinder)
+
+```
+declare module "foo" { declare module.exports: number }
+declare module "foo" { declare module.exports: number; } // also allowed now
+```
+
+### :house: Internal
+
+ * Count Babel tests towards Babylon code coverage ([#182](https://github.com/babel/babylon/pull/182)) (Moti Zilberman)
+ * Fix strange line endings ([#214](https://github.com/babel/babylon/pull/214)) (Thomas Grainger)
+ * Add node 7 (Daniel Tschinder)
+ * chore(package): update flow-bin to version 0.34.0 ([#204](https://github.com/babel/babylon/pull/204)) (Greenkeeper)
+
+## v6.13.1 (2016-10-26)
+
+### :nail_care: Polish
+
+- Use rollup for bundling to speed up startup time ([#190](https://github.com/babel/babylon/pull/190)) ([@drewml](https://github.com/DrewML))
+
+```js
+const babylon = require('babylon');
+const ast = babylon.parse('var foo = "lol";');
+```
+
+With that test case, there was a ~95ms savings by removing the need for node to build/traverse the dependency graph.
+
+**Without bundling**
+![image](https://cloud.githubusercontent.com/assets/5233399/19420264/3133497e-93ad-11e6-9a6a-2da59c4f5c13.png)
+
+**With bundling**
+![image](https://cloud.githubusercontent.com/assets/5233399/19420267/388f556e-93ad-11e6-813e-7c5c396be322.png)
+
+- add clean command [skip ci] ([#201](https://github.com/babel/babylon/pull/201)) (Henry Zhu)
+- add ForAwaitStatement (async generator already added) [skip ci] ([#196](https://github.com/babel/babylon/pull/196)) (Henry Zhu)
+
+## v6.13.0 (2016-10-21)
+
+### :eyeglasses: Spec Compliance
+
+Property variance type annotations for Flow plugin ([#161](https://github.com/babel/babylon/pull/161)) (Sam Goldman)
+
+> See https://flowtype.org/docs/variance.html for more information
+
+```js
+type T = { +p: T };
+interface T { -p: T };
+declare class T { +[k:K]: V };
+class T { -[k:K]: V };
+class C2 { +p: T = e };
+```
+
+Raise error on duplicate definition of __proto__ ([#183](https://github.com/babel/babylon/pull/183)) (Moti Zilberman)
+
+```js
+({ __proto__: 1, __proto__: 2 }) // Throws an error now
+```
+
+### :bug: Bug Fix
+
+Flow: Allow class properties to be named `static` ([#184](https://github.com/babel/babylon/pull/184)) (Moti Zilberman)
+
+```js
+declare class A {
+ static: T;
+}
+```
+
+Allow "async" as identifier for object literal property shorthand ([#187](https://github.com/babel/babylon/pull/187)) (Andrew Levine)
+
+```js
+var foo = { async, bar };
+```
+
+### :nail_care: Polish
+
+Fix flowtype and add inType to state ([#189](https://github.com/babel/babylon/pull/189)) (Daniel Tschinder)
+
+> This improves the performance slightly (because of hidden classes)
+
+### :house: Internal
+
+Fix .gitattributes line ending setting ([#191](https://github.com/babel/babylon/pull/191)) (Moti Zilberman)
+
+Increase test coverage ([#175](https://github.com/babel/babylon/pull/175) (Moti Zilberman)
+
+Readd missin .eslinignore for IDEs (Daniel Tschinder)
+
+Error on missing expected.json fixture in CI ([#188](https://github.com/babel/babylon/pull/188)) (Moti Zilberman)
+
+Add .gitattributes and .editorconfig for LF line endings ([#179](https://github.com/babel/babylon/pull/179)) (Moti Zilberman)
+
+Fixes two tests that are failing after the merge of #172 ([#177](https://github.com/babel/babylon/pull/177)) (Moti Zilberman)
+
+## v6.12.0 (2016-10-14)
+
+### :eyeglasses: Spec Compliance
+
+Implement import() syntax ([#163](https://github.com/babel/babylon/pull/163)) (Jordan Gensler)
+
+#### Dynamic Import
+
+- Proposal Repo: https://github.com/domenic/proposal-dynamic-import
+- Championed by [@domenic](https://github.com/domenic)
+- stage-2
+- [sept-28 tc39 notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-09/sept-28.md#113a-import)
+
+> This repository contains a proposal for adding a "function-like" import() module loading syntactic form to JavaScript
+
+```js
+import(`./section-modules/${link.dataset.entryModule}.js`)
+.then(module => {
+ module.loadPageInto(main);
+})
+```
+
+Add EmptyTypeAnnotation ([#171](https://github.com/babel/babylon/pull/171)) (Sam Goldman)
+
+#### EmptyTypeAnnotation
+
+Just wasn't covered before.
+
+```js
+type T = empty;
+```
+
+### :bug: Bug Fix
+
+Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels)
+
+```js
+// was failing due to sparse array
+export const { foo: [ ,, qux7 ] } = bar;
+```
+
+Allow keyword in Flow object declaration property names with type parameters ([#146](https://github.com/babel/babylon/pull/146)) (Dan Harper)
+
+```js
+declare class X {
+ foobar<T>(): void;
+ static foobar<T>(): void;
+}
+```
+
+Allow keyword in object/class property names with Flow type parameters ([#145](https://github.com/babel/babylon/pull/145)) (Dan Harper)
+
+```js
+class Foo {
+ delete<T>(item: T): T {
+ return item;
+ }
+}
+```
+
+Allow typeAnnotations for yield expressions ([#174](https://github.com/babel/babylon/pull/174))) (Daniel Tschinder)
+
+```js
+function *foo() {
+ const x = (yield 5: any);
+}
+```
+
+### :nail_care: Polish
+
+Annotate more errors with expected token ([#172](https://github.com/babel/babylon/pull/172))) (Moti Zilberman)
+
+```js
+// Unexpected token, expected ; (1:6)
+{ set 1 }
+```
+
+### :house: Internal
+
+Remove kcheck ([#173](https://github.com/babel/babylon/pull/173))) (Daniel Tschinder)
+
+Also run flow, linting, babel tests on separate instances (add back node 0.10)
+
+## v6.11.6 (2016-10-12)
+
+### :bug: Bug Fix/Regression
+
+Fix crash when exporting with destructuring and sparse array ([#170](https://github.com/babel/babylon/pull/170)) (Jeroen Engels)
+
+```js
+// was failing with `Cannot read property 'type' of null` because of null identifiers
+export const { foo: [ ,, qux7 ] } = bar;
+```
+
+## v6.11.5 (2016-10-12)
+
+### :eyeglasses: Spec Compliance
+
+Fix: Check for duplicate named exports in exported destructuring assignments ([#144](https://github.com/babel/babylon/pull/144)) (Kai Cataldo)
+
+```js
+// `foo` has already been exported. Exported identifiers must be unique. (2:20)
+export function foo() {};
+export const { a: [{foo}] } = bar;
+```
+
+Fix: Check for duplicate named exports in exported rest elements/properties ([#164](https://github.com/babel/babylon/pull/164)) (Kai Cataldo)
+
+```js
+// `foo` has already been exported. Exported identifiers must be unique. (2:22)
+export const foo = 1;
+export const [bar, ...foo] = baz;
+```
+
+### :bug: Bug Fix
+
+Fix: Allow identifier `async` for default param in arrow expression ([#165](https://github.com/babel/babylon/pull/165)) (Kai Cataldo)
+
+```js
+// this is ok now
+const test = ({async = true}) => {};
+```
+
+### :nail_care: Polish
+
+Babylon will now print out the token it's expecting if there's a `SyntaxError` ([#150](https://github.com/babel/babylon/pull/150)) (Daniel Tschinder)
+
+```bash
+# So in the case of a missing ending curly (`}`)
+Module build failed: SyntaxError: Unexpected token, expected } (30:0)
+ 28 | }
+ 29 |
+> 30 |
+ | ^
+```
+
+## v6.11.4 (2016-10-03)
+
+Temporary rollback for erroring on trailing comma with spread (#154) (Henry Zhu)
+
+## v6.11.3 (2016-10-01)
+
+### :eyeglasses: Spec Compliance
+
+Add static errors for object rest (#149) ([@danez](https://github.com/danez))
+
+> https://github.com/sebmarkbage/ecmascript-rest-spread
+
+Object rest copies the *rest* of properties from the right hand side `obj` starting from the left to right.
+
+```js
+let { x, y, ...z } = { x: 1, y: 2, z: 3 };
+// x = 1
+// y = 2
+// z = { z: 3 }
+```
+
+#### New Syntax Errors:
+
+**SyntaxError**: The rest element has to be the last element when destructuring (1:10)
+```bash
+> 1 | let { ...x, y, z } = { x: 1, y: 2, z: 3};
+ | ^
+# Previous behavior:
+# x = { x: 1, y: 2, z: 3 }
+# y = 2
+# z = 3
+```
+
+Before, this was just a more verbose way of shallow copying `obj` since it doesn't actually do what you think.
+
+**SyntaxError**: Cannot have multiple rest elements when destructuring (1:13)
+
+```bash
+> 1 | let { x, ...y, ...z } = { x: 1, y: 2, z: 3};
+ | ^
+# Previous behavior:
+# x = 1
+# y = { y: 2, z: 3 }
+# z = { y: 2, z: 3 }
+```
+
+Before y and z would just be the same value anyway so there is no reason to need to have both.
+
+**SyntaxError**: A trailing comma is not permitted after the rest element (1:16)
+
+```js
+let { x, y, ...z, } = obj;
+```
+
+The rationale for this is that the use case for trailing comma is that you can add something at the end without affecting the line above. Since a RestProperty always has to be the last property it doesn't make sense.
+
+---
+
+get / set are valid property names in default assignment (#142) ([@jezell](https://github.com/jezell))
+
+```js
+// valid
+function something({ set = null, get = null }) {}
+```
+
+## v6.11.2 (2016-09-23)
+
+### Bug Fix
+
+- [#139](https://github.com/babel/babylon/issues/139) Don't do the duplicate check if not an identifier (#140) @hzoo
+
+```js
+// regression with duplicate export check
+SyntaxError: ./typography.js: `undefined` has already been exported. Exported identifiers must be unique. (22:13)
+ 20 |
+ 21 | export const { rhythm } = typography;
+> 22 | export const { TypographyStyle } = typography
+```
+
+Bail out for now, and make a change to account for destructuring in the next release.
+
+## 6.11.1 (2016-09-22)
+
+### Bug Fix
+- [#137](https://github.com/babel/babylon/pull/137) - Fix a regression with duplicate exports - it was erroring on all keys in `Object.prototype`. @danez
+
+```javascript
+export toString from './toString';
+```
+
+```bash
+`toString` has already been exported. Exported identifiers must be unique. (1:7)
+> 1 | export toString from './toString';
+ | ^
+ 2 |
+```
+
+## 6.11.0 (2016-09-22)
+
+### Spec Compliance (will break CI)
+
+- Disallow duplicate named exports ([#107](https://github.com/babel/babylon/pull/107)) @kaicataldo
+
+```js
+// Only one default export allowed per module. (2:9)
+export default function() {};
+export { foo as default };
+
+// Only one default export allowed per module. (2:0)
+export default {};
+export default function() {};
+
+// `Foo` has already been exported. Exported identifiers must be unique. (2:0)
+export { Foo };
+export class Foo {};
+```
+
+### New Feature (Syntax)
+
+- Add support for computed class property names ([#121](https://github.com/babel/babylon/pull/121)) @motiz88
+
+```js
+// AST
+interface ClassProperty <: Node {
+ type: "ClassProperty";
+ key: Identifier;
+ value: Expression;
+ computed: boolean; // added
+}
+```
+
+```js
+// with "plugins": ["classProperties"]
+class Foo {
+ [x]
+ ['y']
+}
+
+class Bar {
+ [p]
+ [m] () {}
+}
+ ```
+
+### Bug Fix
+
+- Fix `static` property falling through in the declare class Flow AST ([#135](https://github.com/babel/babylon/pull/135)) @danharper
+
+```js
+declare class X {
+ a: number;
+ static b: number; // static
+ c: number; // this was being marked as static in the AST as well
+}
+```
+
+### Polish
+
+- Rephrase "assigning/binding to rvalue" errors to include context ([#119](https://github.com/babel/babylon/pull/119)) @motiz88
+
+```js
+// Used to error with:
+// SyntaxError: Assigning to rvalue (1:0)
+
+// Now:
+// Invalid left-hand side in assignment expression (1:0)
+3 = 4
+
+// Invalid left-hand side in for-in statement (1:5)
+for (+i in {});
+```
+
+### Internal
+
+- Fix call to `this.parseMaybeAssign` with correct arguments ([#133](https://github.com/babel/babylon/pull/133)) @danez
+- Add semver note to changelog ([#131](https://github.com/babel/babylon/pull/131)) @hzoo
+
+## 6.10.0 (2016-09-19)
+
+> We plan to include some spec compliance bugs in patch versions. An example was the multiple default exports issue.
+
+### Spec Compliance
+
+* Implement ES2016 check for simple parameter list in strict mode ([#106](https://github.com/babel/babylon/pull/106)) (Timothy Gu)
+
+> It is a Syntax Error if ContainsUseStrict of FunctionBody is true and IsSimpleParameterList of FormalParameters is false. https://tc39.github.io/ecma262/2016/#sec-function-definitions-static-semantics-early-errors
+
+More Context: [tc39-notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-29.md#611-the-scope-of-use-strict-with-respect-to-destructuring-in-parameter-lists)
+
+For example:
+
+```js
+// this errors because it uses destructuring and default parameters
+// in a function with a "use strict" directive
+function a([ option1, option2 ] = []) {
+ "use strict";
+}
+ ```
+
+The solution would be to use a top level "use strict" or to remove the destructuring or default parameters when using a function + "use strict" or to.
+
+### New Feature
+
+* Exact object type annotations for Flow plugin ([#104](https://github.com/babel/babylon/pull/104)) (Basil Hosmer)
+
+Added to flow in https://github.com/facebook/flow/commit/c710c40aa2a115435098d6c0dfeaadb023cd39b8
+
+Looks like:
+
+```js
+var a : {| x: number, y: string |} = { x: 0, y: 'foo' };
+```
+
+### Bug Fixes
+
+* Include `typeParameter` location in `ArrowFunctionExpression` ([#126](https://github.com/babel/babylon/pull/126)) (Daniel Tschinder)
+* Error on invalid flow type annotation with default assignment ([#122](https://github.com/babel/babylon/pull/122)) (Dan Harper)
+* Fix Flow return types on arrow functions ([#124](https://github.com/babel/babylon/pull/124)) (Dan Harper)
+
+### Misc
+
+* Add tests for export extensions ([#127](https://github.com/babel/babylon/pull/127)) (Daniel Tschinder)
+* Fix Contributing guidelines [skip ci] (Daniel Tschinder)
+
+## 6.9.2 (2016-09-09)
+
+The only change is to remove the `babel-runtime` dependency by compiling with Babel's ES2015 loose mode. So using babylon standalone should be smaller.
+
+## 6.9.1 (2016-08-23)
+
+This release contains mainly small bugfixes but also updates babylons default mode to es2017. The features for `exponentiationOperator`, `asyncFunctions` and `trailingFunctionCommas` which previously needed to be activated via plugin are now enabled by default and the plugins are now no-ops.
+
+### Bug Fixes
+
+- Fix issues with default object params in async functions ([#96](https://github.com/babel/babylon/pull/96)) @danez
+- Fix issues with flow-types and async function ([#95](https://github.com/babel/babylon/pull/95)) @danez
+- Fix arrow functions with destructuring, types & default value ([#94](https://github.com/babel/babylon/pull/94)) @danharper
+- Fix declare class with qualified type identifier ([#97](https://github.com/babel/babylon/pull/97)) @danez
+- Remove exponentiationOperator, asyncFunctions, trailingFunctionCommas plugins and enable them by default ([#98](https://github.com/babel/babylon/pull/98)) @danez
+
+## 6.9.0 (2016-08-16)
+
+### New syntax support
+
+- Add JSX spread children ([#42](https://github.com/babel/babylon/pull/42)) @calebmer
+
+(Be aware that React is not going to support this syntax)
+
+```js
+<div>
+ {...todos.map(todo => <Todo key={todo.id} todo={todo}/>)}
+</div>
+```
+
+- Add support for declare module.exports ([#72](https://github.com/babel/babylon/pull/72)) @danez
+
+```js
+declare module "foo" {
+ declare module.exports: {}
+}
+```
+
+### New Features
+
+- If supplied, attach filename property to comment node loc. ([#80](https://github.com/babel/babylon/pull/80)) @divmain
+- Add identifier name to node loc field ([#90](https://github.com/babel/babylon/pull/90)) @kittens
+
+### Bug Fixes
+
+- Fix exponential operator to behave according to spec ([#75](https://github.com/babel/babylon/pull/75)) @danez
+- Fix lookahead to not add comments to arrays which are not cloned ([#76](https://github.com/babel/babylon/pull/76)) @danez
+- Fix accidental fall-through in Flow type parsing. ([#82](https://github.com/babel/babylon/pull/82)) @xiemaisi
+- Only allow declares inside declare module ([#73](https://github.com/babel/babylon/pull/73)) @danez
+- Small fix for parsing type parameter declarations ([#83](https://github.com/babel/babylon/pull/83)) @gabelevi
+- Fix arrow param locations with flow types ([#57](https://github.com/babel/babylon/pull/57)) @danez
+- Fixes SyntaxError position with flow optional type ([#65](https://github.com/babel/babylon/pull/65)) @danez
+
+### Internal
+
+- Add codecoverage to tests @danez
+- Fix tests to not save expected output if we expect the test to fail @danez
+- Make a shallow clone of babel for testing @danez
+- chore(package): update cross-env to version 2.0.0 ([#77](https://github.com/babel/babylon/pull/77)) @greenkeeperio-bot
+- chore(package): update ava to version 0.16.0 ([#86](https://github.com/babel/babylon/pull/86)) @greenkeeperio-bot
+- chore(package): update babel-plugin-istanbul to version 2.0.0 ([#89](https://github.com/babel/babylon/pull/89)) @greenkeeperio-bot
+- chore(package): update nyc to version 8.0.0 ([#88](https://github.com/babel/babylon/pull/88)) @greenkeeperio-bot
+
+## 6.8.4 (2016-07-06)
+
+### Bug Fixes
+
+- Fix the location of params, when flow and default value used ([#68](https://github.com/babel/babylon/pull/68)) @danez
+
+## 6.8.3 (2016-07-02)
+
+### Bug Fixes
+
+- Fix performance regression introduced in 6.8.2 with conditionals ([#63](https://github.com/babel/babylon/pull/63)) @danez
+
+## 6.8.2 (2016-06-24)
+
+### Bug Fixes
+
+- Fix parse error with yielding jsx elements in generators `function* it() { yield <a></a>; }` ([#31](https://github.com/babel/babylon/pull/31)) @eldereal
+- When cloning nodes do not clone its comments ([#24](https://github.com/babel/babylon/pull/24)) @danez
+- Fix parse errors when using arrow functions with an spread element and return type `(...props): void => {}` ([#10](https://github.com/babel/babylon/pull/10)) @danez
+- Fix leading comments added from previous node ([#23](https://github.com/babel/babylon/pull/23)) @danez
+- Fix parse errors with flow's optional arguments `(arg?) => {}` ([#19](https://github.com/babel/babylon/pull/19)) @danez
+- Support negative numeric type literals @kittens
+- Remove line terminator restriction after await keyword @kittens
+- Remove grouped type arrow restriction as it seems flow no longer has it @kittens
+- Fix parse error with generic methods that have the name `get` or `set` `class foo { get() {} }` ([#55](https://github.com/babel/babylon/pull/55)) @vkurchatkin
+- Fix parse error with arrow functions that have flow type parameter declarations `<T>(x: T): T => x;` ([#54](https://github.com/babel/babylon/pull/54)) @gabelevi
+
+### Documentation
+
+- Document AST differences from ESTree ([#41](https://github.com/babel/babylon/pull/41)) @nene
+- Move ast spec from babel/babel ([#46](https://github.com/babel/babylon/pull/46)) @hzoo
+
+### Internal
+
+- Enable skipped tests ([#16](https://github.com/babel/babylon/pull/16)) @danez
+- Add script to test latest version of babylon with babel ([#21](https://github.com/babel/babylon/pull/21)) @danez
+- Upgrade test runner ava @kittens
+- Add missing generate-identifier-regex script @kittens
+- Rename parser context types @kittens
+- Add node v6 to travis testing @hzoo
+- Update to Unicode v9 ([#45](https://github.com/babel/babylon/pull/45)) @mathiasbynens
+
+## 6.8.1 (2016-06-06)
+
+### New Feature
+
+- Parse type parameter declarations with defaults like `type Foo<T = string> = T`
+
+### Bug Fixes
+- Type parameter declarations need 1 or more type parameters.
+- The existential type `*` is not a valid type parameter.
+- The existential type `*` is a primary type
+
+### Spec Compliance
+- The param list for type parameter declarations now consists of `TypeParameter` nodes
+- New `TypeParameter` AST Node (replaces using the `Identifier` node before)
+
+```
+interface TypeParameter <: Node {
+ bound: TypeAnnotation;
+ default: TypeAnnotation;
+ name: string;
+ variance: "plus" | "minus";
+}
+```
+
+## 6.8.0 (2016-05-02)
+
+#### New Feature
+
+##### Parse Method Parameter Decorators ([#12](https://github.com/babel/babylon/pull/12))
+
+> [Method Parameter Decorators](https://goo.gl/8MmCMG) is now a TC39 [stage 0 proposal](https://github.com/tc39/ecma262/blob/master/stage0.md).
+
+Examples:
+
+```js
+class Foo {
+ constructor(@foo() x, @bar({ a: 123 }) @baz() y) {}
+}
+
+export default function func(@foo() x, @bar({ a: 123 }) @baz() y) {}
+
+var obj = {
+ method(@foo() x, @bar({ a: 123 }) @baz() y) {}
+};
+```
+
+##### Parse for-await statements (w/ `asyncGenerators` plugin) ([#17](https://github.com/babel/babylon/pull/17))
+
+There is also a new node type, `ForAwaitStatement`.
+
+> [Async generators and for-await](https://github.com/tc39/proposal-async-iteration) are now a [stage 2 proposal](https://github.com/tc39/ecma262#current-proposals).
+
+Example:
+
+```js
+async function f() {
+ for await (let x of y);
+}
+```
diff --git a/node_modules/@babel/parser/LICENSE b/node_modules/@babel/parser/LICENSE
new file mode 100644
index 0000000..d4c7fc5
--- /dev/null
+++ b/node_modules/@babel/parser/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2012-2014 by various contributors (see AUTHORS)
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/node_modules/@babel/parser/README.md b/node_modules/@babel/parser/README.md
new file mode 100644
index 0000000..513748c
--- /dev/null
+++ b/node_modules/@babel/parser/README.md
@@ -0,0 +1,19 @@
+# @babel/parser
+
+> A JavaScript parser
+
+See our website [@babel/parser](https://babeljs.io/docs/en/babel-parser) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20parser%20(babylon)%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/parser
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/parser --dev
+```
diff --git a/node_modules/@babel/parser/bin/babel-parser.js b/node_modules/@babel/parser/bin/babel-parser.js
new file mode 100755
index 0000000..3aca314
--- /dev/null
+++ b/node_modules/@babel/parser/bin/babel-parser.js
@@ -0,0 +1,15 @@
+#!/usr/bin/env node
+/* eslint no-var: 0 */
+
+var parser = require("..");
+var fs = require("fs");
+
+var filename = process.argv[2];
+if (!filename) {
+ console.error("no filename specified");
+} else {
+ var file = fs.readFileSync(filename, "utf8");
+ var ast = parser.parse(file);
+
+ console.log(JSON.stringify(ast, null, " "));
+}
diff --git a/node_modules/@babel/parser/lib/index.js b/node_modules/@babel/parser/lib/index.js
new file mode 100644
index 0000000..b955911
--- /dev/null
+++ b/node_modules/@babel/parser/lib/index.js
@@ -0,0 +1,16051 @@
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+class BaseParser {
+ constructor() {
+ this.sawUnambiguousESM = false;
+ this.ambiguousScriptDifferentAst = false;
+ }
+
+ hasPlugin(pluginConfig) {
+ if (typeof pluginConfig === "string") {
+ return this.plugins.has(pluginConfig);
+ } else {
+ const [pluginName, pluginOptions] = pluginConfig;
+
+ if (!this.hasPlugin(pluginName)) {
+ return false;
+ }
+
+ const actualOptions = this.plugins.get(pluginName);
+
+ for (const key of Object.keys(pluginOptions)) {
+ if ((actualOptions == null ? void 0 : actualOptions[key]) !== pluginOptions[key]) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ }
+
+ getPluginOption(plugin, name) {
+ var _this$plugins$get;
+
+ return (_this$plugins$get = this.plugins.get(plugin)) == null ? void 0 : _this$plugins$get[name];
+ }
+
+}
+
+function setTrailingComments(node, comments) {
+ if (node.trailingComments === undefined) {
+ node.trailingComments = comments;
+ } else {
+ node.trailingComments.unshift(...comments);
+ }
+}
+
+function setLeadingComments(node, comments) {
+ if (node.leadingComments === undefined) {
+ node.leadingComments = comments;
+ } else {
+ node.leadingComments.unshift(...comments);
+ }
+}
+
+function setInnerComments(node, comments) {
+ if (node.innerComments === undefined) {
+ node.innerComments = comments;
+ } else {
+ node.innerComments.unshift(...comments);
+ }
+}
+
+function adjustInnerComments(node, elements, commentWS) {
+ let lastElement = null;
+ let i = elements.length;
+
+ while (lastElement === null && i > 0) {
+ lastElement = elements[--i];
+ }
+
+ if (lastElement === null || lastElement.start > commentWS.start) {
+ setInnerComments(node, commentWS.comments);
+ } else {
+ setTrailingComments(lastElement, commentWS.comments);
+ }
+}
+
+class CommentsParser extends BaseParser {
+ addComment(comment) {
+ if (this.filename) comment.loc.filename = this.filename;
+ this.state.comments.push(comment);
+ }
+
+ processComment(node) {
+ const {
+ commentStack
+ } = this.state;
+ const commentStackLength = commentStack.length;
+ if (commentStackLength === 0) return;
+ let i = commentStackLength - 1;
+ const lastCommentWS = commentStack[i];
+
+ if (lastCommentWS.start === node.end) {
+ lastCommentWS.leadingNode = node;
+ i--;
+ }
+
+ const {
+ start: nodeStart
+ } = node;
+
+ for (; i >= 0; i--) {
+ const commentWS = commentStack[i];
+ const commentEnd = commentWS.end;
+
+ if (commentEnd > nodeStart) {
+ commentWS.containingNode = node;
+ this.finalizeComment(commentWS);
+ commentStack.splice(i, 1);
+ } else {
+ if (commentEnd === nodeStart) {
+ commentWS.trailingNode = node;
+ }
+
+ break;
+ }
+ }
+ }
+
+ finalizeComment(commentWS) {
+ const {
+ comments
+ } = commentWS;
+
+ if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {
+ if (commentWS.leadingNode !== null) {
+ setTrailingComments(commentWS.leadingNode, comments);
+ }
+
+ if (commentWS.trailingNode !== null) {
+ setLeadingComments(commentWS.trailingNode, comments);
+ }
+ } else {
+ const {
+ containingNode: node,
+ start: commentStart
+ } = commentWS;
+
+ if (this.input.charCodeAt(commentStart - 1) === 44) {
+ switch (node.type) {
+ case "ObjectExpression":
+ case "ObjectPattern":
+ case "RecordExpression":
+ adjustInnerComments(node, node.properties, commentWS);
+ break;
+
+ case "CallExpression":
+ case "OptionalCallExpression":
+ adjustInnerComments(node, node.arguments, commentWS);
+ break;
+
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ case "ArrowFunctionExpression":
+ case "ObjectMethod":
+ case "ClassMethod":
+ case "ClassPrivateMethod":
+ adjustInnerComments(node, node.params, commentWS);
+ break;
+
+ case "ArrayExpression":
+ case "ArrayPattern":
+ case "TupleExpression":
+ adjustInnerComments(node, node.elements, commentWS);
+ break;
+
+ case "ExportNamedDeclaration":
+ case "ImportDeclaration":
+ adjustInnerComments(node, node.specifiers, commentWS);
+ break;
+
+ default:
+ {
+ setInnerComments(node, comments);
+ }
+ }
+ } else {
+ setInnerComments(node, comments);
+ }
+ }
+ }
+
+ finalizeRemainingComments() {
+ const {
+ commentStack
+ } = this.state;
+
+ for (let i = commentStack.length - 1; i >= 0; i--) {
+ this.finalizeComment(commentStack[i]);
+ }
+
+ this.state.commentStack = [];
+ }
+
+ resetPreviousNodeTrailingComments(node) {
+ const {
+ commentStack
+ } = this.state;
+ const {
+ length
+ } = commentStack;
+ if (length === 0) return;
+ const commentWS = commentStack[length - 1];
+
+ if (commentWS.leadingNode === node) {
+ commentWS.leadingNode = null;
+ }
+ }
+
+ takeSurroundingComments(node, start, end) {
+ const {
+ commentStack
+ } = this.state;
+ const commentStackLength = commentStack.length;
+ if (commentStackLength === 0) return;
+ let i = commentStackLength - 1;
+
+ for (; i >= 0; i--) {
+ const commentWS = commentStack[i];
+ const commentEnd = commentWS.end;
+ const commentStart = commentWS.start;
+
+ if (commentStart === end) {
+ commentWS.leadingNode = node;
+ } else if (commentEnd === start) {
+ commentWS.trailingNode = node;
+ } else if (commentEnd < start) {
+ break;
+ }
+ }
+ }
+
+}
+
+const ErrorCodes = Object.freeze({
+ SyntaxError: "BABEL_PARSER_SYNTAX_ERROR",
+ SourceTypeModuleError: "BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED"
+});
+
+const ErrorMessages = makeErrorTemplates({
+ AccessorIsGenerator: "A %0ter cannot be a generator.",
+ ArgumentsInClass: "'arguments' is only allowed in functions and class methods.",
+ AsyncFunctionInSingleStatementContext: "Async functions can only be declared at the top level or inside a block.",
+ AwaitBindingIdentifier: "Can not use 'await' as identifier inside an async function.",
+ AwaitBindingIdentifierInStaticBlock: "Can not use 'await' as identifier inside a static block.",
+ AwaitExpressionFormalParameter: "'await' is not allowed in async function parameters.",
+ AwaitNotInAsyncContext: "'await' is only allowed within async functions and at the top levels of modules.",
+ AwaitNotInAsyncFunction: "'await' is only allowed within async functions.",
+ BadGetterArity: "A 'get' accesor must not have any formal parameters.",
+ BadSetterArity: "A 'set' accesor must have exactly one formal parameter.",
+ BadSetterRestParameter: "A 'set' accesor function argument must not be a rest parameter.",
+ ConstructorClassField: "Classes may not have a field named 'constructor'.",
+ ConstructorClassPrivateField: "Classes may not have a private field named '#constructor'.",
+ ConstructorIsAccessor: "Class constructor may not be an accessor.",
+ ConstructorIsAsync: "Constructor can't be an async function.",
+ ConstructorIsGenerator: "Constructor can't be a generator.",
+ DeclarationMissingInitializer: "'%0' require an initialization value.",
+ DecoratorBeforeExport: "Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.",
+ DecoratorConstructor: "Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",
+ DecoratorExportClass: "Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.",
+ DecoratorSemicolon: "Decorators must not be followed by a semicolon.",
+ DecoratorStaticBlock: "Decorators can't be used with a static block.",
+ DeletePrivateField: "Deleting a private field is not allowed.",
+ DestructureNamedImport: "ES2015 named imports do not destructure. Use another statement for destructuring after the import.",
+ DuplicateConstructor: "Duplicate constructor in the same class.",
+ DuplicateDefaultExport: "Only one default export allowed per module.",
+ DuplicateExport: "`%0` has already been exported. Exported identifiers must be unique.",
+ DuplicateProto: "Redefinition of __proto__ property.",
+ DuplicateRegExpFlags: "Duplicate regular expression flag.",
+ ElementAfterRest: "Rest element must be last element.",
+ EscapedCharNotAnIdentifier: "Invalid Unicode escape.",
+ ExportBindingIsString: "A string literal cannot be used as an exported binding without `from`.\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?",
+ ExportDefaultFromAsIdentifier: "'from' is not allowed as an identifier after 'export default'.",
+ ForInOfLoopInitializer: "'%0' loop variable declaration may not have an initializer.",
+ ForOfAsync: "The left-hand side of a for-of loop may not be 'async'.",
+ ForOfLet: "The left-hand side of a for-of loop may not start with 'let'.",
+ GeneratorInSingleStatementContext: "Generators can only be declared at the top level or inside a block.",
+ IllegalBreakContinue: "Unsyntactic %0.",
+ IllegalLanguageModeDirective: "Illegal 'use strict' directive in function with non-simple parameter list.",
+ IllegalReturn: "'return' outside of function.",
+ ImportBindingIsString: 'A string literal cannot be used as an imported binding.\n- Did you mean `import { "%0" as foo }`?',
+ ImportCallArgumentTrailingComma: "Trailing comma is disallowed inside import(...) arguments.",
+ ImportCallArity: "`import()` requires exactly %0.",
+ ImportCallNotNewExpression: "Cannot use new with import(...).",
+ ImportCallSpreadArgument: "`...` is not allowed in `import()`.",
+ IncompatibleRegExpUVFlags: "The 'u' and 'v' regular expression flags cannot be enabled at the same time.",
+ InvalidBigIntLiteral: "Invalid BigIntLiteral.",
+ InvalidCodePoint: "Code point out of bounds.",
+ InvalidCoverInitializedName: "Invalid shorthand property initializer.",
+ InvalidDecimal: "Invalid decimal.",
+ InvalidDigit: "Expected number in radix %0.",
+ InvalidEscapeSequence: "Bad character escape sequence.",
+ InvalidEscapeSequenceTemplate: "Invalid escape sequence in template.",
+ InvalidEscapedReservedWord: "Escape sequence in keyword %0.",
+ InvalidIdentifier: "Invalid identifier %0.",
+ InvalidLhs: "Invalid left-hand side in %0.",
+ InvalidLhsBinding: "Binding invalid left-hand side in %0.",
+ InvalidNumber: "Invalid number.",
+ InvalidOrMissingExponent: "Floating-point numbers require a valid exponent after the 'e'.",
+ InvalidOrUnexpectedToken: "Unexpected character '%0'.",
+ InvalidParenthesizedAssignment: "Invalid parenthesized assignment pattern.",
+ InvalidPrivateFieldResolution: "Private name #%0 is not defined.",
+ InvalidPropertyBindingPattern: "Binding member expression.",
+ InvalidRecordProperty: "Only properties and spread elements are allowed in record definitions.",
+ InvalidRestAssignmentPattern: "Invalid rest operator's argument.",
+ LabelRedeclaration: "Label '%0' is already declared.",
+ LetInLexicalBinding: "'let' is not allowed to be used as a name in 'let' or 'const' declarations.",
+ LineTerminatorBeforeArrow: "No line break is allowed before '=>'.",
+ MalformedRegExpFlags: "Invalid regular expression flag.",
+ MissingClassName: "A class name is required.",
+ MissingEqInAssignment: "Only '=' operator can be used for specifying default value.",
+ MissingSemicolon: "Missing semicolon.",
+ MissingUnicodeEscape: "Expecting Unicode escape sequence \\uXXXX.",
+ MixingCoalesceWithLogical: "Nullish coalescing operator(??) requires parens when mixing with logical operators.",
+ ModuleAttributeDifferentFromType: "The only accepted module attribute is `type`.",
+ ModuleAttributeInvalidValue: "Only string literals are allowed as module attribute values.",
+ ModuleAttributesWithDuplicateKeys: 'Duplicate key "%0" is not allowed in module attributes.',
+ ModuleExportNameHasLoneSurrogate: "An export name cannot include a lone surrogate, found '\\u%0'.",
+ ModuleExportUndefined: "Export '%0' is not defined.",
+ MultipleDefaultsInSwitch: "Multiple default clauses.",
+ NewlineAfterThrow: "Illegal newline after throw.",
+ NoCatchOrFinally: "Missing catch or finally clause.",
+ NumberIdentifier: "Identifier directly after number.",
+ NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",
+ ObsoleteAwaitStar: "'await*' has been removed from the async functions proposal. Use Promise.all() instead.",
+ OptionalChainingNoNew: "Constructors in/after an Optional Chain are not allowed.",
+ OptionalChainingNoTemplate: "Tagged Template Literals are not allowed in optionalChain.",
+ OverrideOnConstructor: "'override' modifier cannot appear on a constructor declaration.",
+ ParamDupe: "Argument name clash.",
+ PatternHasAccessor: "Object pattern can't contain getter or setter.",
+ PatternHasMethod: "Object pattern can't contain methods.",
+ PipeBodyIsTighter: "Unexpected %0 after pipeline body; any %0 expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",
+ PipeTopicRequiresHackPipes: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',
+ PipeTopicUnbound: "Topic reference is unbound; it must be inside a pipe body.",
+ PipeTopicUnconfiguredToken: 'Invalid topic token %0. In order to use %0 as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "%0" }.',
+ PipeTopicUnused: "Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",
+ PipeUnparenthesizedBody: "Hack-style pipe body cannot be an unparenthesized %0 expression; please wrap it in parentheses.",
+ PipelineBodyNoArrow: 'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',
+ PipelineBodySequenceExpression: "Pipeline body may not be a comma-separated sequence expression.",
+ PipelineHeadSequenceExpression: "Pipeline head should not be a comma-separated sequence expression.",
+ PipelineTopicUnused: "Pipeline is in topic style but does not use topic reference.",
+ PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
+ PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',
+ PrivateInExpectedIn: "Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).",
+ PrivateNameRedeclaration: "Duplicate private name #%0.",
+ RecordExpressionBarIncorrectEndSyntaxType: "Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
+ RecordExpressionBarIncorrectStartSyntaxType: "Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
+ RecordExpressionHashIncorrectStartSyntaxType: "Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
+ RecordNoProto: "'__proto__' is not allowed in Record expressions.",
+ RestTrailingComma: "Unexpected trailing comma after rest element.",
+ SloppyFunction: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
+ StaticPrototype: "Classes may not have static property named prototype.",
+ StrictDelete: "Deleting local variable in strict mode.",
+ StrictEvalArguments: "Assigning to '%0' in strict mode.",
+ StrictEvalArgumentsBinding: "Binding '%0' in strict mode.",
+ StrictFunction: "In strict mode code, functions can only be declared at top level or inside a block.",
+ StrictNumericEscape: "The only valid numeric escape in strict mode is '\\0'.",
+ StrictOctalLiteral: "Legacy octal literals are not allowed in strict mode.",
+ StrictWith: "'with' in strict mode.",
+ SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
+ SuperPrivateField: "Private fields can't be accessed on super.",
+ TrailingDecorator: "Decorators must be attached to a class element.",
+ TupleExpressionBarIncorrectEndSyntaxType: "Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
+ TupleExpressionBarIncorrectStartSyntaxType: "Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",
+ TupleExpressionHashIncorrectStartSyntaxType: "Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",
+ UnexpectedArgumentPlaceholder: "Unexpected argument placeholder.",
+ UnexpectedAwaitAfterPipelineBody: 'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',
+ UnexpectedDigitAfterHash: "Unexpected digit after hash token.",
+ UnexpectedImportExport: "'import' and 'export' may only appear at the top level.",
+ UnexpectedKeyword: "Unexpected keyword '%0'.",
+ UnexpectedLeadingDecorator: "Leading decorators must be attached to a class declaration.",
+ UnexpectedLexicalDeclaration: "Lexical declaration cannot appear in a single-statement context.",
+ UnexpectedNewTarget: "`new.target` can only be used in functions or class properties.",
+ UnexpectedNumericSeparator: "A numeric separator is only allowed between two digits.",
+ UnexpectedPrivateField: "Unexpected private name.",
+ UnexpectedReservedWord: "Unexpected reserved word '%0'.",
+ UnexpectedSuper: "'super' is only allowed in object methods and classes.",
+ UnexpectedToken: "Unexpected token '%0'.",
+ UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
+ UnsupportedBind: "Binding should be performed on object property.",
+ UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
+ UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
+ UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
+ UnsupportedMetaProperty: "The only valid meta property for %0 is %0.%1.",
+ UnsupportedParameterDecorator: "Decorators cannot be used to decorate parameters.",
+ UnsupportedPropertyDecorator: "Decorators cannot be used to decorate object literal properties.",
+ UnsupportedSuper: "'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",
+ UnterminatedComment: "Unterminated comment.",
+ UnterminatedRegExp: "Unterminated regular expression.",
+ UnterminatedString: "Unterminated string constant.",
+ UnterminatedTemplate: "Unterminated template.",
+ VarRedeclaration: "Identifier '%0' has already been declared.",
+ YieldBindingIdentifier: "Can not use 'yield' as identifier inside a generator.",
+ YieldInParameter: "Yield expression is not allowed in formal parameters.",
+ ZeroDigitNumericSeparator: "Numeric separator can not be used after leading 0."
+}, ErrorCodes.SyntaxError);
+const SourceTypeModuleErrorMessages = makeErrorTemplates({
+ ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: "module"'`,
+ ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: "module"'`
+}, ErrorCodes.SourceTypeModuleError);
+
+function keepReasonCodeCompat(reasonCode, syntaxPlugin) {
+ {
+ if (syntaxPlugin === "flow" && reasonCode === "PatternIsOptional") {
+ return "OptionalBindingPattern";
+ }
+ }
+ return reasonCode;
+}
+
+function makeErrorTemplates(messages, code, syntaxPlugin) {
+ const templates = {};
+ Object.keys(messages).forEach(reasonCode => {
+ templates[reasonCode] = Object.freeze({
+ code,
+ reasonCode: keepReasonCodeCompat(reasonCode, syntaxPlugin),
+ template: messages[reasonCode]
+ });
+ });
+ return Object.freeze(templates);
+}
+class ParserError extends CommentsParser {
+ raise({
+ code,
+ reasonCode,
+ template
+ }, origin, ...params) {
+ return this.raiseWithData(origin.node ? origin.node.loc.start : origin.at, {
+ code,
+ reasonCode
+ }, template, ...params);
+ }
+
+ raiseOverwrite(loc, {
+ code,
+ template
+ }, ...params) {
+ const pos = loc.index;
+ const message = template.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
+
+ if (this.options.errorRecovery) {
+ const errors = this.state.errors;
+
+ for (let i = errors.length - 1; i >= 0; i--) {
+ const error = errors[i];
+
+ if (error.pos === pos) {
+ return Object.assign(error, {
+ message
+ });
+ } else if (error.pos < pos) {
+ break;
+ }
+ }
+ }
+
+ return this._raise({
+ code,
+ loc,
+ pos
+ }, message);
+ }
+
+ raiseWithData(loc, data, errorTemplate, ...params) {
+ const pos = loc.index;
+ const message = errorTemplate.replace(/%(\d+)/g, (_, i) => params[i]) + ` (${loc.line}:${loc.column})`;
+ return this._raise(Object.assign({
+ loc,
+ pos
+ }, data), message);
+ }
+
+ _raise(errorContext, message) {
+ const err = new SyntaxError(message);
+ Object.assign(err, errorContext);
+
+ if (this.options.errorRecovery) {
+ if (!this.isLookahead) this.state.errors.push(err);
+ return err;
+ } else {
+ throw err;
+ }
+ }
+
+}
+
+const {
+ defineProperty
+} = Object;
+
+const toUnenumerable = (object, key) => defineProperty(object, key, {
+ enumerable: false,
+ value: object[key]
+});
+
+function toESTreeLocation(node) {
+ toUnenumerable(node.loc.start, "index");
+ toUnenumerable(node.loc.end, "index");
+ return node;
+}
+
+var estree = (superClass => class extends superClass {
+ parse() {
+ const file = toESTreeLocation(super.parse());
+
+ if (this.options.tokens) {
+ file.tokens = file.tokens.map(toESTreeLocation);
+ }
+
+ return file;
+ }
+
+ parseRegExpLiteral({
+ pattern,
+ flags
+ }) {
+ let regex = null;
+
+ try {
+ regex = new RegExp(pattern, flags);
+ } catch (e) {}
+
+ const node = this.estreeParseLiteral(regex);
+ node.regex = {
+ pattern,
+ flags
+ };
+ return node;
+ }
+
+ parseBigIntLiteral(value) {
+ let bigInt;
+
+ try {
+ bigInt = BigInt(value);
+ } catch (_unused) {
+ bigInt = null;
+ }
+
+ const node = this.estreeParseLiteral(bigInt);
+ node.bigint = String(node.value || value);
+ return node;
+ }
+
+ parseDecimalLiteral(value) {
+ const decimal = null;
+ const node = this.estreeParseLiteral(decimal);
+ node.decimal = String(node.value || value);
+ return node;
+ }
+
+ estreeParseLiteral(value) {
+ return this.parseLiteral(value, "Literal");
+ }
+
+ parseStringLiteral(value) {
+ return this.estreeParseLiteral(value);
+ }
+
+ parseNumericLiteral(value) {
+ return this.estreeParseLiteral(value);
+ }
+
+ parseNullLiteral() {
+ return this.estreeParseLiteral(null);
+ }
+
+ parseBooleanLiteral(value) {
+ return this.estreeParseLiteral(value);
+ }
+
+ directiveToStmt(directive) {
+ const directiveLiteral = directive.value;
+ const stmt = this.startNodeAt(directive.start, directive.loc.start);
+ const expression = this.startNodeAt(directiveLiteral.start, directiveLiteral.loc.start);
+ expression.value = directiveLiteral.extra.expressionValue;
+ expression.raw = directiveLiteral.extra.raw;
+ stmt.expression = this.finishNodeAt(expression, "Literal", directiveLiteral.loc.end);
+ stmt.directive = directiveLiteral.extra.raw.slice(1, -1);
+ return this.finishNodeAt(stmt, "ExpressionStatement", directive.loc.end);
+ }
+
+ initFunction(node, isAsync) {
+ super.initFunction(node, isAsync);
+ node.expression = false;
+ }
+
+ checkDeclaration(node) {
+ if (node != null && this.isObjectProperty(node)) {
+ this.checkDeclaration(node.value);
+ } else {
+ super.checkDeclaration(node);
+ }
+ }
+
+ getObjectOrClassMethodParams(method) {
+ return method.value.params;
+ }
+
+ isValidDirective(stmt) {
+ var _stmt$expression$extr;
+
+ return stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && typeof stmt.expression.value === "string" && !((_stmt$expression$extr = stmt.expression.extra) != null && _stmt$expression$extr.parenthesized);
+ }
+
+ parseBlockBody(node, ...args) {
+ super.parseBlockBody(node, ...args);
+ const directiveStatements = node.directives.map(d => this.directiveToStmt(d));
+ node.body = directiveStatements.concat(node.body);
+ delete node.directives;
+ }
+
+ pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
+ this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true);
+
+ if (method.typeParameters) {
+ method.value.typeParameters = method.typeParameters;
+ delete method.typeParameters;
+ }
+
+ classBody.body.push(method);
+ }
+
+ parsePrivateName() {
+ const node = super.parsePrivateName();
+ {
+ if (!this.getPluginOption("estree", "classFeatures")) {
+ return node;
+ }
+ }
+ return this.convertPrivateNameToPrivateIdentifier(node);
+ }
+
+ convertPrivateNameToPrivateIdentifier(node) {
+ const name = super.getPrivateNameSV(node);
+ node = node;
+ delete node.id;
+ node.name = name;
+ node.type = "PrivateIdentifier";
+ return node;
+ }
+
+ isPrivateName(node) {
+ {
+ if (!this.getPluginOption("estree", "classFeatures")) {
+ return super.isPrivateName(node);
+ }
+ }
+ return node.type === "PrivateIdentifier";
+ }
+
+ getPrivateNameSV(node) {
+ {
+ if (!this.getPluginOption("estree", "classFeatures")) {
+ return super.getPrivateNameSV(node);
+ }
+ }
+ return node.name;
+ }
+
+ parseLiteral(value, type) {
+ const node = super.parseLiteral(value, type);
+ node.raw = node.extra.raw;
+ delete node.extra;
+ return node;
+ }
+
+ parseFunctionBody(node, allowExpression, isMethod = false) {
+ super.parseFunctionBody(node, allowExpression, isMethod);
+ node.expression = node.body.type !== "BlockStatement";
+ }
+
+ parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
+ let funcNode = this.startNode();
+ funcNode.kind = node.kind;
+ funcNode = super.parseMethod(funcNode, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope);
+ funcNode.type = "FunctionExpression";
+ delete funcNode.kind;
+ node.value = funcNode;
+
+ if (type === "ClassPrivateMethod") {
+ node.computed = false;
+ }
+
+ type = "MethodDefinition";
+ return this.finishNode(node, type);
+ }
+
+ parseClassProperty(...args) {
+ const propertyNode = super.parseClassProperty(...args);
+ {
+ if (!this.getPluginOption("estree", "classFeatures")) {
+ return propertyNode;
+ }
+ }
+ propertyNode.type = "PropertyDefinition";
+ return propertyNode;
+ }
+
+ parseClassPrivateProperty(...args) {
+ const propertyNode = super.parseClassPrivateProperty(...args);
+ {
+ if (!this.getPluginOption("estree", "classFeatures")) {
+ return propertyNode;
+ }
+ }
+ propertyNode.type = "PropertyDefinition";
+ propertyNode.computed = false;
+ return propertyNode;
+ }
+
+ parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
+ const node = super.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor);
+
+ if (node) {
+ node.type = "Property";
+ if (node.kind === "method") node.kind = "init";
+ node.shorthand = false;
+ }
+
+ return node;
+ }
+
+ parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
+ const node = super.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
+
+ if (node) {
+ node.kind = "init";
+ node.type = "Property";
+ }
+
+ return node;
+ }
+
+ isAssignable(node, isBinding) {
+ if (node != null && this.isObjectProperty(node)) {
+ return this.isAssignable(node.value, isBinding);
+ }
+
+ return super.isAssignable(node, isBinding);
+ }
+
+ toAssignable(node, isLHS = false) {
+ if (node != null && this.isObjectProperty(node)) {
+ const {
+ key,
+ value
+ } = node;
+
+ if (this.isPrivateName(key)) {
+ this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start);
+ }
+
+ this.toAssignable(value, isLHS);
+ return node;
+ }
+
+ return super.toAssignable(node, isLHS);
+ }
+
+ toAssignableObjectExpressionProp(prop, ...args) {
+ if (prop.kind === "get" || prop.kind === "set") {
+ this.raise(ErrorMessages.PatternHasAccessor, {
+ node: prop.key
+ });
+ } else if (prop.method) {
+ this.raise(ErrorMessages.PatternHasMethod, {
+ node: prop.key
+ });
+ } else {
+ super.toAssignableObjectExpressionProp(prop, ...args);
+ }
+ }
+
+ finishCallExpression(node, optional) {
+ super.finishCallExpression(node, optional);
+
+ if (node.callee.type === "Import") {
+ node.type = "ImportExpression";
+ node.source = node.arguments[0];
+
+ if (this.hasPlugin("importAssertions")) {
+ var _node$arguments$;
+
+ node.attributes = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null;
+ }
+
+ delete node.arguments;
+ delete node.callee;
+ }
+
+ return node;
+ }
+
+ toReferencedArguments(node) {
+ if (node.type === "ImportExpression") {
+ return;
+ }
+
+ super.toReferencedArguments(node);
+ }
+
+ parseExport(node) {
+ super.parseExport(node);
+
+ switch (node.type) {
+ case "ExportAllDeclaration":
+ node.exported = null;
+ break;
+
+ case "ExportNamedDeclaration":
+ if (node.specifiers.length === 1 && node.specifiers[0].type === "ExportNamespaceSpecifier") {
+ node.type = "ExportAllDeclaration";
+ node.exported = node.specifiers[0].exported;
+ delete node.specifiers;
+ }
+
+ break;
+ }
+
+ return node;
+ }
+
+ parseSubscript(base, startPos, startLoc, noCalls, state) {
+ const node = super.parseSubscript(base, startPos, startLoc, noCalls, state);
+
+ if (state.optionalChainMember) {
+ if (node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression") {
+ node.type = node.type.substring(8);
+ }
+
+ if (state.stop) {
+ const chain = this.startNodeAtNode(node);
+ chain.expression = node;
+ return this.finishNode(chain, "ChainExpression");
+ }
+ } else if (node.type === "MemberExpression" || node.type === "CallExpression") {
+ node.optional = false;
+ }
+
+ return node;
+ }
+
+ hasPropertyAsPrivateName(node) {
+ if (node.type === "ChainExpression") {
+ node = node.expression;
+ }
+
+ return super.hasPropertyAsPrivateName(node);
+ }
+
+ isOptionalChain(node) {
+ return node.type === "ChainExpression";
+ }
+
+ isObjectProperty(node) {
+ return node.type === "Property" && node.kind === "init" && !node.method;
+ }
+
+ isObjectMethod(node) {
+ return node.method || node.kind === "get" || node.kind === "set";
+ }
+
+ finishNodeAt(node, type, endLoc) {
+ return toESTreeLocation(super.finishNodeAt(node, type, endLoc));
+ }
+
+ resetEndLocation(node, endLoc = this.state.lastTokEndLoc) {
+ super.resetEndLocation(node, endLoc);
+ toESTreeLocation(node);
+ }
+
+});
+
+class TokContext {
+ constructor(token, preserveSpace) {
+ this.token = void 0;
+ this.preserveSpace = void 0;
+ this.token = token;
+ this.preserveSpace = !!preserveSpace;
+ }
+
+}
+const types = {
+ brace: new TokContext("{"),
+ j_oTag: new TokContext("<tag"),
+ j_cTag: new TokContext("</tag"),
+ j_expr: new TokContext("<tag>...</tag>", true)
+};
+{
+ types.template = new TokContext("`", true);
+}
+
+const beforeExpr = true;
+const startsExpr = true;
+const isLoop = true;
+const isAssign = true;
+const prefix = true;
+const postfix = true;
+class ExportedTokenType {
+ constructor(label, conf = {}) {
+ this.label = void 0;
+ this.keyword = void 0;
+ this.beforeExpr = void 0;
+ this.startsExpr = void 0;
+ this.rightAssociative = void 0;
+ this.isLoop = void 0;
+ this.isAssign = void 0;
+ this.prefix = void 0;
+ this.postfix = void 0;
+ this.binop = void 0;
+ this.label = label;
+ this.keyword = conf.keyword;
+ this.beforeExpr = !!conf.beforeExpr;
+ this.startsExpr = !!conf.startsExpr;
+ this.rightAssociative = !!conf.rightAssociative;
+ this.isLoop = !!conf.isLoop;
+ this.isAssign = !!conf.isAssign;
+ this.prefix = !!conf.prefix;
+ this.postfix = !!conf.postfix;
+ this.binop = conf.binop != null ? conf.binop : null;
+ {
+ this.updateContext = null;
+ }
+ }
+
+}
+const keywords$1 = new Map();
+
+function createKeyword(name, options = {}) {
+ options.keyword = name;
+ const token = createToken(name, options);
+ keywords$1.set(name, token);
+ return token;
+}
+
+function createBinop(name, binop) {
+ return createToken(name, {
+ beforeExpr,
+ binop
+ });
+}
+
+let tokenTypeCounter = -1;
+const tokenTypes = [];
+const tokenLabels = [];
+const tokenBinops = [];
+const tokenBeforeExprs = [];
+const tokenStartsExprs = [];
+const tokenPrefixes = [];
+
+function createToken(name, options = {}) {
+ var _options$binop, _options$beforeExpr, _options$startsExpr, _options$prefix;
+
+ ++tokenTypeCounter;
+ tokenLabels.push(name);
+ tokenBinops.push((_options$binop = options.binop) != null ? _options$binop : -1);
+ tokenBeforeExprs.push((_options$beforeExpr = options.beforeExpr) != null ? _options$beforeExpr : false);
+ tokenStartsExprs.push((_options$startsExpr = options.startsExpr) != null ? _options$startsExpr : false);
+ tokenPrefixes.push((_options$prefix = options.prefix) != null ? _options$prefix : false);
+ tokenTypes.push(new ExportedTokenType(name, options));
+ return tokenTypeCounter;
+}
+
+function createKeywordLike(name, options = {}) {
+ var _options$binop2, _options$beforeExpr2, _options$startsExpr2, _options$prefix2;
+
+ ++tokenTypeCounter;
+ keywords$1.set(name, tokenTypeCounter);
+ tokenLabels.push(name);
+ tokenBinops.push((_options$binop2 = options.binop) != null ? _options$binop2 : -1);
+ tokenBeforeExprs.push((_options$beforeExpr2 = options.beforeExpr) != null ? _options$beforeExpr2 : false);
+ tokenStartsExprs.push((_options$startsExpr2 = options.startsExpr) != null ? _options$startsExpr2 : false);
+ tokenPrefixes.push((_options$prefix2 = options.prefix) != null ? _options$prefix2 : false);
+ tokenTypes.push(new ExportedTokenType("name", options));
+ return tokenTypeCounter;
+}
+
+const tt = {
+ bracketL: createToken("[", {
+ beforeExpr,
+ startsExpr
+ }),
+ bracketHashL: createToken("#[", {
+ beforeExpr,
+ startsExpr
+ }),
+ bracketBarL: createToken("[|", {
+ beforeExpr,
+ startsExpr
+ }),
+ bracketR: createToken("]"),
+ bracketBarR: createToken("|]"),
+ braceL: createToken("{", {
+ beforeExpr,
+ startsExpr
+ }),
+ braceBarL: createToken("{|", {
+ beforeExpr,
+ startsExpr
+ }),
+ braceHashL: createToken("#{", {
+ beforeExpr,
+ startsExpr
+ }),
+ braceR: createToken("}", {
+ beforeExpr
+ }),
+ braceBarR: createToken("|}"),
+ parenL: createToken("(", {
+ beforeExpr,
+ startsExpr
+ }),
+ parenR: createToken(")"),
+ comma: createToken(",", {
+ beforeExpr
+ }),
+ semi: createToken(";", {
+ beforeExpr
+ }),
+ colon: createToken(":", {
+ beforeExpr
+ }),
+ doubleColon: createToken("::", {
+ beforeExpr
+ }),
+ dot: createToken("."),
+ question: createToken("?", {
+ beforeExpr
+ }),
+ questionDot: createToken("?."),
+ arrow: createToken("=>", {
+ beforeExpr
+ }),
+ template: createToken("template"),
+ ellipsis: createToken("...", {
+ beforeExpr
+ }),
+ backQuote: createToken("`", {
+ startsExpr
+ }),
+ dollarBraceL: createToken("${", {
+ beforeExpr,
+ startsExpr
+ }),
+ templateTail: createToken("...`", {
+ startsExpr
+ }),
+ templateNonTail: createToken("...${", {
+ beforeExpr,
+ startsExpr
+ }),
+ at: createToken("@"),
+ hash: createToken("#", {
+ startsExpr
+ }),
+ interpreterDirective: createToken("#!..."),
+ eq: createToken("=", {
+ beforeExpr,
+ isAssign
+ }),
+ assign: createToken("_=", {
+ beforeExpr,
+ isAssign
+ }),
+ slashAssign: createToken("_=", {
+ beforeExpr,
+ isAssign
+ }),
+ xorAssign: createToken("_=", {
+ beforeExpr,
+ isAssign
+ }),
+ moduloAssign: createToken("_=", {
+ beforeExpr,
+ isAssign
+ }),
+ incDec: createToken("++/--", {
+ prefix,
+ postfix,
+ startsExpr
+ }),
+ bang: createToken("!", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ tilde: createToken("~", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ doubleCaret: createToken("^^", {
+ startsExpr
+ }),
+ doubleAt: createToken("@@", {
+ startsExpr
+ }),
+ pipeline: createBinop("|>", 0),
+ nullishCoalescing: createBinop("??", 1),
+ logicalOR: createBinop("||", 1),
+ logicalAND: createBinop("&&", 2),
+ bitwiseOR: createBinop("|", 3),
+ bitwiseXOR: createBinop("^", 4),
+ bitwiseAND: createBinop("&", 5),
+ equality: createBinop("==/!=/===/!==", 6),
+ lt: createBinop("</>/<=/>=", 7),
+ gt: createBinop("</>/<=/>=", 7),
+ relational: createBinop("</>/<=/>=", 7),
+ bitShift: createBinop("<</>>/>>>", 8),
+ bitShiftL: createBinop("<</>>/>>>", 8),
+ bitShiftR: createBinop("<</>>/>>>", 8),
+ plusMin: createToken("+/-", {
+ beforeExpr,
+ binop: 9,
+ prefix,
+ startsExpr
+ }),
+ modulo: createToken("%", {
+ binop: 10,
+ startsExpr
+ }),
+ star: createToken("*", {
+ binop: 10
+ }),
+ slash: createBinop("/", 10),
+ exponent: createToken("**", {
+ beforeExpr,
+ binop: 11,
+ rightAssociative: true
+ }),
+ _in: createKeyword("in", {
+ beforeExpr,
+ binop: 7
+ }),
+ _instanceof: createKeyword("instanceof", {
+ beforeExpr,
+ binop: 7
+ }),
+ _break: createKeyword("break"),
+ _case: createKeyword("case", {
+ beforeExpr
+ }),
+ _catch: createKeyword("catch"),
+ _continue: createKeyword("continue"),
+ _debugger: createKeyword("debugger"),
+ _default: createKeyword("default", {
+ beforeExpr
+ }),
+ _else: createKeyword("else", {
+ beforeExpr
+ }),
+ _finally: createKeyword("finally"),
+ _function: createKeyword("function", {
+ startsExpr
+ }),
+ _if: createKeyword("if"),
+ _return: createKeyword("return", {
+ beforeExpr
+ }),
+ _switch: createKeyword("switch"),
+ _throw: createKeyword("throw", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ _try: createKeyword("try"),
+ _var: createKeyword("var"),
+ _const: createKeyword("const"),
+ _with: createKeyword("with"),
+ _new: createKeyword("new", {
+ beforeExpr,
+ startsExpr
+ }),
+ _this: createKeyword("this", {
+ startsExpr
+ }),
+ _super: createKeyword("super", {
+ startsExpr
+ }),
+ _class: createKeyword("class", {
+ startsExpr
+ }),
+ _extends: createKeyword("extends", {
+ beforeExpr
+ }),
+ _export: createKeyword("export"),
+ _import: createKeyword("import", {
+ startsExpr
+ }),
+ _null: createKeyword("null", {
+ startsExpr
+ }),
+ _true: createKeyword("true", {
+ startsExpr
+ }),
+ _false: createKeyword("false", {
+ startsExpr
+ }),
+ _typeof: createKeyword("typeof", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ _void: createKeyword("void", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ _delete: createKeyword("delete", {
+ beforeExpr,
+ prefix,
+ startsExpr
+ }),
+ _do: createKeyword("do", {
+ isLoop,
+ beforeExpr
+ }),
+ _for: createKeyword("for", {
+ isLoop
+ }),
+ _while: createKeyword("while", {
+ isLoop
+ }),
+ _as: createKeywordLike("as", {
+ startsExpr
+ }),
+ _assert: createKeywordLike("assert", {
+ startsExpr
+ }),
+ _async: createKeywordLike("async", {
+ startsExpr
+ }),
+ _await: createKeywordLike("await", {
+ startsExpr
+ }),
+ _from: createKeywordLike("from", {
+ startsExpr
+ }),
+ _get: createKeywordLike("get", {
+ startsExpr
+ }),
+ _let: createKeywordLike("let", {
+ startsExpr
+ }),
+ _meta: createKeywordLike("meta", {
+ startsExpr
+ }),
+ _of: createKeywordLike("of", {
+ startsExpr
+ }),
+ _sent: createKeywordLike("sent", {
+ startsExpr
+ }),
+ _set: createKeywordLike("set", {
+ startsExpr
+ }),
+ _static: createKeywordLike("static", {
+ startsExpr
+ }),
+ _yield: createKeywordLike("yield", {
+ startsExpr
+ }),
+ _asserts: createKeywordLike("asserts", {
+ startsExpr
+ }),
+ _checks: createKeywordLike("checks", {
+ startsExpr
+ }),
+ _exports: createKeywordLike("exports", {
+ startsExpr
+ }),
+ _global: createKeywordLike("global", {
+ startsExpr
+ }),
+ _implements: createKeywordLike("implements", {
+ startsExpr
+ }),
+ _intrinsic: createKeywordLike("intrinsic", {
+ startsExpr
+ }),
+ _infer: createKeywordLike("infer", {
+ startsExpr
+ }),
+ _is: createKeywordLike("is", {
+ startsExpr
+ }),
+ _mixins: createKeywordLike("mixins", {
+ startsExpr
+ }),
+ _proto: createKeywordLike("proto", {
+ startsExpr
+ }),
+ _require: createKeywordLike("require", {
+ startsExpr
+ }),
+ _keyof: createKeywordLike("keyof", {
+ startsExpr
+ }),
+ _readonly: createKeywordLike("readonly", {
+ startsExpr
+ }),
+ _unique: createKeywordLike("unique", {
+ startsExpr
+ }),
+ _abstract: createKeywordLike("abstract", {
+ startsExpr
+ }),
+ _declare: createKeywordLike("declare", {
+ startsExpr
+ }),
+ _enum: createKeywordLike("enum", {
+ startsExpr
+ }),
+ _module: createKeywordLike("module", {
+ startsExpr
+ }),
+ _namespace: createKeywordLike("namespace", {
+ startsExpr
+ }),
+ _interface: createKeywordLike("interface", {
+ startsExpr
+ }),
+ _type: createKeywordLike("type", {
+ startsExpr
+ }),
+ _opaque: createKeywordLike("opaque", {
+ startsExpr
+ }),
+ name: createToken("name", {
+ startsExpr
+ }),
+ string: createToken("string", {
+ startsExpr
+ }),
+ num: createToken("num", {
+ startsExpr
+ }),
+ bigint: createToken("bigint", {
+ startsExpr
+ }),
+ decimal: createToken("decimal", {
+ startsExpr
+ }),
+ regexp: createToken("regexp", {
+ startsExpr
+ }),
+ privateName: createToken("#name", {
+ startsExpr
+ }),
+ eof: createToken("eof"),
+ jsxName: createToken("jsxName"),
+ jsxText: createToken("jsxText", {
+ beforeExpr: true
+ }),
+ jsxTagStart: createToken("jsxTagStart", {
+ startsExpr: true
+ }),
+ jsxTagEnd: createToken("jsxTagEnd"),
+ placeholder: createToken("%%", {
+ startsExpr: true
+ })
+};
+function tokenIsIdentifier(token) {
+ return token >= 93 && token <= 128;
+}
+function tokenKeywordOrIdentifierIsKeyword(token) {
+ return token <= 92;
+}
+function tokenIsKeywordOrIdentifier(token) {
+ return token >= 58 && token <= 128;
+}
+function tokenIsLiteralPropertyName(token) {
+ return token >= 58 && token <= 132;
+}
+function tokenComesBeforeExpression(token) {
+ return tokenBeforeExprs[token];
+}
+function tokenCanStartExpression(token) {
+ return tokenStartsExprs[token];
+}
+function tokenIsAssignment(token) {
+ return token >= 29 && token <= 33;
+}
+function tokenIsFlowInterfaceOrTypeOrOpaque(token) {
+ return token >= 125 && token <= 127;
+}
+function tokenIsLoop(token) {
+ return token >= 90 && token <= 92;
+}
+function tokenIsKeyword(token) {
+ return token >= 58 && token <= 92;
+}
+function tokenIsOperator(token) {
+ return token >= 39 && token <= 59;
+}
+function tokenIsPostfix(token) {
+ return token === 34;
+}
+function tokenIsPrefix(token) {
+ return tokenPrefixes[token];
+}
+function tokenIsTSTypeOperator(token) {
+ return token >= 117 && token <= 119;
+}
+function tokenIsTSDeclarationStart(token) {
+ return token >= 120 && token <= 126;
+}
+function tokenLabelName(token) {
+ return tokenLabels[token];
+}
+function tokenOperatorPrecedence(token) {
+ return tokenBinops[token];
+}
+function tokenIsRightAssociative(token) {
+ return token === 57;
+}
+function tokenIsTemplate(token) {
+ return token >= 24 && token <= 25;
+}
+function getExportedToken(token) {
+ return tokenTypes[token];
+}
+{
+ tokenTypes[8].updateContext = context => {
+ context.pop();
+ };
+
+ tokenTypes[5].updateContext = tokenTypes[7].updateContext = tokenTypes[23].updateContext = context => {
+ context.push(types.brace);
+ };
+
+ tokenTypes[22].updateContext = context => {
+ if (context[context.length - 1] === types.template) {
+ context.pop();
+ } else {
+ context.push(types.template);
+ }
+ };
+
+ tokenTypes[138].updateContext = context => {
+ context.push(types.j_expr, types.j_oTag);
+ };
+}
+
+class Position {
+ constructor(line, col, index) {
+ this.line = void 0;
+ this.column = void 0;
+ this.index = void 0;
+ this.line = line;
+ this.column = col;
+ this.index = index;
+ }
+
+}
+class SourceLocation {
+ constructor(start, end) {
+ this.start = void 0;
+ this.end = void 0;
+ this.filename = void 0;
+ this.identifierName = void 0;
+ this.start = start;
+ this.end = end;
+ }
+
+}
+function createPositionWithColumnOffset(position, columnOffset) {
+ const {
+ line,
+ column,
+ index
+ } = position;
+ return new Position(line, column + columnOffset, index + columnOffset);
+}
+
+let nonASCIIidentifierStartChars = "\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\u0560-\u0588\u05d0-\u05ea\u05ef-\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\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\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\u09fc\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\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\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-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\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-\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-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\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-\uab69\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";
+let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
+const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
+const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
+nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
+const astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 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, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 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, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 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, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 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, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
+const astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 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, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
+
+function isInAstralSet(code, set) {
+ let pos = 0x10000;
+
+ for (let i = 0, length = set.length; i < length; i += 2) {
+ pos += set[i];
+ if (pos > code) return false;
+ pos += set[i + 1];
+ if (pos >= code) return true;
+ }
+
+ return false;
+}
+
+function isIdentifierStart(code) {
+ if (code < 65) return code === 36;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
+ }
+
+ return isInAstralSet(code, astralIdentifierStartCodes);
+}
+function isIdentifierChar(code) {
+ if (code < 48) return code === 36;
+ if (code < 58) return true;
+ if (code < 65) return false;
+ if (code <= 90) return true;
+ if (code < 97) return code === 95;
+ if (code <= 122) return true;
+
+ if (code <= 0xffff) {
+ return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
+ }
+
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
+}
+
+const reservedWords = {
+ keyword: ["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete"],
+ strict: ["implements", "interface", "let", "package", "private", "protected", "public", "static", "yield"],
+ strictBind: ["eval", "arguments"]
+};
+const keywords = new Set(reservedWords.keyword);
+const reservedWordsStrictSet = new Set(reservedWords.strict);
+const reservedWordsStrictBindSet = new Set(reservedWords.strictBind);
+function isReservedWord(word, inModule) {
+ return inModule && word === "await" || word === "enum";
+}
+function isStrictReservedWord(word, inModule) {
+ return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);
+}
+function isStrictBindOnlyReservedWord(word) {
+ return reservedWordsStrictBindSet.has(word);
+}
+function isStrictBindReservedWord(word, inModule) {
+ return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);
+}
+function isKeyword(word) {
+ return keywords.has(word);
+}
+
+function isIteratorStart(current, next, next2) {
+ return current === 64 && next === 64 && isIdentifierStart(next2);
+}
+const reservedWordLikeSet = new Set(["break", "case", "catch", "continue", "debugger", "default", "do", "else", "finally", "for", "function", "if", "return", "switch", "throw", "try", "var", "const", "while", "with", "new", "this", "super", "class", "extends", "export", "import", "null", "true", "false", "in", "instanceof", "typeof", "void", "delete", "implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "eval", "arguments", "enum", "await"]);
+function canBeReservedWord(word) {
+ return reservedWordLikeSet.has(word);
+}
+
+const SCOPE_OTHER = 0b000000000,
+ SCOPE_PROGRAM = 0b000000001,
+ SCOPE_FUNCTION = 0b000000010,
+ SCOPE_ARROW = 0b000000100,
+ SCOPE_SIMPLE_CATCH = 0b000001000,
+ SCOPE_SUPER = 0b000010000,
+ SCOPE_DIRECT_SUPER = 0b000100000,
+ SCOPE_CLASS = 0b001000000,
+ SCOPE_STATIC_BLOCK = 0b010000000,
+ SCOPE_TS_MODULE = 0b100000000,
+ SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_TS_MODULE;
+const BIND_KIND_VALUE = 0b000000000001,
+ BIND_KIND_TYPE = 0b000000000010,
+ BIND_SCOPE_VAR = 0b000000000100,
+ BIND_SCOPE_LEXICAL = 0b000000001000,
+ BIND_SCOPE_FUNCTION = 0b000000010000,
+ BIND_FLAGS_NONE = 0b000001000000,
+ BIND_FLAGS_CLASS = 0b000010000000,
+ BIND_FLAGS_TS_ENUM = 0b000100000000,
+ BIND_FLAGS_TS_CONST_ENUM = 0b001000000000,
+ BIND_FLAGS_TS_EXPORT_ONLY = 0b010000000000,
+ BIND_FLAGS_FLOW_DECLARE_FN = 0b100000000000;
+const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS,
+ BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0,
+ BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0,
+ BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0,
+ BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS,
+ BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0,
+ BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM,
+ BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,
+ BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE,
+ BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE,
+ BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM,
+ BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,
+ BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;
+const CLASS_ELEMENT_FLAG_STATIC = 0b100,
+ CLASS_ELEMENT_KIND_GETTER = 0b010,
+ CLASS_ELEMENT_KIND_SETTER = 0b001,
+ CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;
+const CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC,
+ CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC,
+ CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER,
+ CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER,
+ CLASS_ELEMENT_OTHER = 0;
+
+class Scope {
+ constructor(flags) {
+ this.var = new Set();
+ this.lexical = new Set();
+ this.functions = new Set();
+ this.flags = flags;
+ }
+
+}
+class ScopeHandler {
+ constructor(raise, inModule) {
+ this.scopeStack = [];
+ this.undefinedExports = new Map();
+ this.raise = raise;
+ this.inModule = inModule;
+ }
+
+ get inFunction() {
+ return (this.currentVarScopeFlags() & SCOPE_FUNCTION) > 0;
+ }
+
+ get allowSuper() {
+ return (this.currentThisScopeFlags() & SCOPE_SUPER) > 0;
+ }
+
+ get allowDirectSuper() {
+ return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER) > 0;
+ }
+
+ get inClass() {
+ return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0;
+ }
+
+ get inClassAndNotInNonArrowFunction() {
+ const flags = this.currentThisScopeFlags();
+ return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION) === 0;
+ }
+
+ get inStaticBlock() {
+ for (let i = this.scopeStack.length - 1;; i--) {
+ const {
+ flags
+ } = this.scopeStack[i];
+
+ if (flags & SCOPE_STATIC_BLOCK) {
+ return true;
+ }
+
+ if (flags & (SCOPE_VAR | SCOPE_CLASS)) {
+ return false;
+ }
+ }
+ }
+
+ get inNonArrowFunction() {
+ return (this.currentThisScopeFlags() & SCOPE_FUNCTION) > 0;
+ }
+
+ get treatFunctionsAsVar() {
+ return this.treatFunctionsAsVarInScope(this.currentScope());
+ }
+
+ createScope(flags) {
+ return new Scope(flags);
+ }
+
+ enter(flags) {
+ this.scopeStack.push(this.createScope(flags));
+ }
+
+ exit() {
+ this.scopeStack.pop();
+ }
+
+ treatFunctionsAsVarInScope(scope) {
+ return !!(scope.flags & SCOPE_FUNCTION || !this.inModule && scope.flags & SCOPE_PROGRAM);
+ }
+
+ declareName(name, bindingType, loc) {
+ let scope = this.currentScope();
+
+ if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {
+ this.checkRedeclarationInScope(scope, name, bindingType, loc);
+
+ if (bindingType & BIND_SCOPE_FUNCTION) {
+ scope.functions.add(name);
+ } else {
+ scope.lexical.add(name);
+ }
+
+ if (bindingType & BIND_SCOPE_LEXICAL) {
+ this.maybeExportDefined(scope, name);
+ }
+ } else if (bindingType & BIND_SCOPE_VAR) {
+ for (let i = this.scopeStack.length - 1; i >= 0; --i) {
+ scope = this.scopeStack[i];
+ this.checkRedeclarationInScope(scope, name, bindingType, loc);
+ scope.var.add(name);
+ this.maybeExportDefined(scope, name);
+ if (scope.flags & SCOPE_VAR) break;
+ }
+ }
+
+ if (this.inModule && scope.flags & SCOPE_PROGRAM) {
+ this.undefinedExports.delete(name);
+ }
+ }
+
+ maybeExportDefined(scope, name) {
+ if (this.inModule && scope.flags & SCOPE_PROGRAM) {
+ this.undefinedExports.delete(name);
+ }
+ }
+
+ checkRedeclarationInScope(scope, name, bindingType, loc) {
+ if (this.isRedeclaredInScope(scope, name, bindingType)) {
+ this.raise(ErrorMessages.VarRedeclaration, {
+ at: loc
+ }, name);
+ }
+ }
+
+ isRedeclaredInScope(scope, name, bindingType) {
+ if (!(bindingType & BIND_KIND_VALUE)) return false;
+
+ if (bindingType & BIND_SCOPE_LEXICAL) {
+ return scope.lexical.has(name) || scope.functions.has(name) || scope.var.has(name);
+ }
+
+ if (bindingType & BIND_SCOPE_FUNCTION) {
+ return scope.lexical.has(name) || !this.treatFunctionsAsVarInScope(scope) && scope.var.has(name);
+ }
+
+ return scope.lexical.has(name) && !(scope.flags & SCOPE_SIMPLE_CATCH && scope.lexical.values().next().value === name) || !this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name);
+ }
+
+ checkLocalExport(id) {
+ const {
+ name
+ } = id;
+ const topLevelScope = this.scopeStack[0];
+
+ if (!topLevelScope.lexical.has(name) && !topLevelScope.var.has(name) && !topLevelScope.functions.has(name)) {
+ this.undefinedExports.set(name, id.loc.start);
+ }
+ }
+
+ currentScope() {
+ return this.scopeStack[this.scopeStack.length - 1];
+ }
+
+ currentVarScopeFlags() {
+ for (let i = this.scopeStack.length - 1;; i--) {
+ const {
+ flags
+ } = this.scopeStack[i];
+
+ if (flags & SCOPE_VAR) {
+ return flags;
+ }
+ }
+ }
+
+ currentThisScopeFlags() {
+ for (let i = this.scopeStack.length - 1;; i--) {
+ const {
+ flags
+ } = this.scopeStack[i];
+
+ if (flags & (SCOPE_VAR | SCOPE_CLASS) && !(flags & SCOPE_ARROW)) {
+ return flags;
+ }
+ }
+ }
+
+}
+
+class FlowScope extends Scope {
+ constructor(...args) {
+ super(...args);
+ this.declareFunctions = new Set();
+ }
+
+}
+
+class FlowScopeHandler extends ScopeHandler {
+ createScope(flags) {
+ return new FlowScope(flags);
+ }
+
+ declareName(name, bindingType, loc) {
+ const scope = this.currentScope();
+
+ if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
+ this.checkRedeclarationInScope(scope, name, bindingType, loc);
+ this.maybeExportDefined(scope, name);
+ scope.declareFunctions.add(name);
+ return;
+ }
+
+ super.declareName(...arguments);
+ }
+
+ isRedeclaredInScope(scope, name, bindingType) {
+ if (super.isRedeclaredInScope(...arguments)) return true;
+
+ if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {
+ return !scope.declareFunctions.has(name) && (scope.lexical.has(name) || scope.functions.has(name));
+ }
+
+ return false;
+ }
+
+ checkLocalExport(id) {
+ if (!this.scopeStack[0].declareFunctions.has(id.name)) {
+ super.checkLocalExport(id);
+ }
+ }
+
+}
+
+const lineBreak = /\r\n?|[\n\u2028\u2029]/;
+const lineBreakG = new RegExp(lineBreak.source, "g");
+function isNewLine(code) {
+ switch (code) {
+ case 10:
+ case 13:
+ case 8232:
+ case 8233:
+ return true;
+
+ default:
+ return false;
+ }
+}
+const skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
+const skipWhiteSpaceInLine = /(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y;
+const skipWhiteSpaceToLineBreak = new RegExp("(?=(" + skipWhiteSpaceInLine.source + "))\\1" + /(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source, "y");
+function isWhitespace(code) {
+ switch (code) {
+ case 0x0009:
+ case 0x000b:
+ case 0x000c:
+ case 32:
+ case 160:
+ case 5760:
+ case 0x2000:
+ case 0x2001:
+ case 0x2002:
+ case 0x2003:
+ case 0x2004:
+ case 0x2005:
+ case 0x2006:
+ case 0x2007:
+ case 0x2008:
+ case 0x2009:
+ case 0x200a:
+ case 0x202f:
+ case 0x205f:
+ case 0x3000:
+ case 0xfeff:
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+class State {
+ constructor() {
+ this.strict = void 0;
+ this.curLine = void 0;
+ this.lineStart = void 0;
+ this.startLoc = void 0;
+ this.endLoc = void 0;
+ this.errors = [];
+ this.potentialArrowAt = -1;
+ this.noArrowAt = [];
+ this.noArrowParamsConversionAt = [];
+ this.maybeInArrowParameters = false;
+ this.inType = false;
+ this.noAnonFunctionType = false;
+ this.hasFlowComment = false;
+ this.isAmbientContext = false;
+ this.inAbstractClass = false;
+ this.topicContext = {
+ maxNumOfResolvableTopics: 0,
+ maxTopicIndex: null
+ };
+ this.soloAwait = false;
+ this.inFSharpPipelineDirectBody = false;
+ this.labels = [];
+ this.decoratorStack = [[]];
+ this.comments = [];
+ this.commentStack = [];
+ this.pos = 0;
+ this.type = 135;
+ this.value = null;
+ this.start = 0;
+ this.end = 0;
+ this.lastTokEndLoc = null;
+ this.lastTokStartLoc = null;
+ this.lastTokStart = 0;
+ this.context = [types.brace];
+ this.canStartJSXElement = true;
+ this.containsEsc = false;
+ this.strictErrors = new Map();
+ this.tokensLength = 0;
+ }
+
+ init({
+ strictMode,
+ sourceType,
+ startLine,
+ startColumn
+ }) {
+ this.strict = strictMode === false ? false : strictMode === true ? true : sourceType === "module";
+ this.curLine = startLine;
+ this.lineStart = -startColumn;
+ this.startLoc = this.endLoc = new Position(startLine, startColumn, 0);
+ }
+
+ curPosition() {
+ return new Position(this.curLine, this.pos - this.lineStart, this.pos);
+ }
+
+ clone(skipArrays) {
+ const state = new State();
+ const keys = Object.keys(this);
+
+ for (let i = 0, length = keys.length; i < length; i++) {
+ const key = keys[i];
+ let val = this[key];
+
+ if (!skipArrays && Array.isArray(val)) {
+ val = val.slice();
+ }
+
+ state[key] = val;
+ }
+
+ return state;
+ }
+
+}
+
+var _isDigit = function isDigit(code) {
+ return code >= 48 && code <= 57;
+};
+const VALID_REGEX_FLAGS = new Set([103, 109, 115, 105, 121, 117, 100, 118]);
+const forbiddenNumericSeparatorSiblings = {
+ decBinOct: [46, 66, 69, 79, 95, 98, 101, 111],
+ hex: [46, 88, 95, 120]
+};
+const allowedNumericSeparatorSiblings = {};
+allowedNumericSeparatorSiblings.bin = [48, 49];
+allowedNumericSeparatorSiblings.oct = [...allowedNumericSeparatorSiblings.bin, 50, 51, 52, 53, 54, 55];
+allowedNumericSeparatorSiblings.dec = [...allowedNumericSeparatorSiblings.oct, 56, 57];
+allowedNumericSeparatorSiblings.hex = [...allowedNumericSeparatorSiblings.dec, 65, 66, 67, 68, 69, 70, 97, 98, 99, 100, 101, 102];
+class Token {
+ constructor(state) {
+ this.type = state.type;
+ this.value = state.value;
+ this.start = state.start;
+ this.end = state.end;
+ this.loc = new SourceLocation(state.startLoc, state.endLoc);
+ }
+
+}
+class Tokenizer extends ParserError {
+ constructor(options, input) {
+ super();
+ this.isLookahead = void 0;
+ this.tokens = [];
+ this.state = new State();
+ this.state.init(options);
+ this.input = input;
+ this.length = input.length;
+ this.isLookahead = false;
+ }
+
+ pushToken(token) {
+ this.tokens.length = this.state.tokensLength;
+ this.tokens.push(token);
+ ++this.state.tokensLength;
+ }
+
+ next() {
+ this.checkKeywordEscapes();
+
+ if (this.options.tokens) {
+ this.pushToken(new Token(this.state));
+ }
+
+ this.state.lastTokStart = this.state.start;
+ this.state.lastTokEndLoc = this.state.endLoc;
+ this.state.lastTokStartLoc = this.state.startLoc;
+ this.nextToken();
+ }
+
+ eat(type) {
+ if (this.match(type)) {
+ this.next();
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ match(type) {
+ return this.state.type === type;
+ }
+
+ createLookaheadState(state) {
+ return {
+ pos: state.pos,
+ value: null,
+ type: state.type,
+ start: state.start,
+ end: state.end,
+ context: [this.curContext()],
+ inType: state.inType,
+ startLoc: state.startLoc,
+ lastTokEndLoc: state.lastTokEndLoc,
+ curLine: state.curLine,
+ lineStart: state.lineStart,
+ curPosition: state.curPosition
+ };
+ }
+
+ lookahead() {
+ const old = this.state;
+ this.state = this.createLookaheadState(old);
+ this.isLookahead = true;
+ this.nextToken();
+ this.isLookahead = false;
+ const curr = this.state;
+ this.state = old;
+ return curr;
+ }
+
+ nextTokenStart() {
+ return this.nextTokenStartSince(this.state.pos);
+ }
+
+ nextTokenStartSince(pos) {
+ skipWhiteSpace.lastIndex = pos;
+ return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos;
+ }
+
+ lookaheadCharCode() {
+ return this.input.charCodeAt(this.nextTokenStart());
+ }
+
+ codePointAtPos(pos) {
+ let cp = this.input.charCodeAt(pos);
+
+ if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) {
+ const trail = this.input.charCodeAt(pos);
+
+ if ((trail & 0xfc00) === 0xdc00) {
+ cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);
+ }
+ }
+
+ return cp;
+ }
+
+ setStrict(strict) {
+ this.state.strict = strict;
+
+ if (strict) {
+ this.state.strictErrors.forEach(({
+ message,
+ loc
+ }) => this.raise(message, {
+ at: loc
+ }));
+ this.state.strictErrors.clear();
+ }
+ }
+
+ curContext() {
+ return this.state.context[this.state.context.length - 1];
+ }
+
+ nextToken() {
+ this.skipSpace();
+ this.state.start = this.state.pos;
+ if (!this.isLookahead) this.state.startLoc = this.state.curPosition();
+
+ if (this.state.pos >= this.length) {
+ this.finishToken(135);
+ return;
+ }
+
+ this.getTokenFromCode(this.codePointAtPos(this.state.pos));
+ }
+
+ skipBlockComment() {
+ let startLoc;
+ if (!this.isLookahead) startLoc = this.state.curPosition();
+ const start = this.state.pos;
+ const end = this.input.indexOf("*/", start + 2);
+
+ if (end === -1) {
+ throw this.raise(ErrorMessages.UnterminatedComment, {
+ at: this.state.curPosition()
+ });
+ }
+
+ this.state.pos = end + 2;
+ lineBreakG.lastIndex = start + 2;
+
+ while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) {
+ ++this.state.curLine;
+ this.state.lineStart = lineBreakG.lastIndex;
+ }
+
+ if (this.isLookahead) return;
+ const comment = {
+ type: "CommentBlock",
+ value: this.input.slice(start + 2, end),
+ start,
+ end: end + 2,
+ loc: new SourceLocation(startLoc, this.state.curPosition())
+ };
+ if (this.options.tokens) this.pushToken(comment);
+ return comment;
+ }
+
+ skipLineComment(startSkip) {
+ const start = this.state.pos;
+ let startLoc;
+ if (!this.isLookahead) startLoc = this.state.curPosition();
+ let ch = this.input.charCodeAt(this.state.pos += startSkip);
+
+ if (this.state.pos < this.length) {
+ while (!isNewLine(ch) && ++this.state.pos < this.length) {
+ ch = this.input.charCodeAt(this.state.pos);
+ }
+ }
+
+ if (this.isLookahead) return;
+ const end = this.state.pos;
+ const value = this.input.slice(start + startSkip, end);
+ const comment = {
+ type: "CommentLine",
+ value,
+ start,
+ end,
+ loc: new SourceLocation(startLoc, this.state.curPosition())
+ };
+ if (this.options.tokens) this.pushToken(comment);
+ return comment;
+ }
+
+ skipSpace() {
+ const spaceStart = this.state.pos;
+ const comments = [];
+
+ loop: while (this.state.pos < this.length) {
+ const ch = this.input.charCodeAt(this.state.pos);
+
+ switch (ch) {
+ case 32:
+ case 160:
+ case 9:
+ ++this.state.pos;
+ break;
+
+ case 13:
+ if (this.input.charCodeAt(this.state.pos + 1) === 10) {
+ ++this.state.pos;
+ }
+
+ case 10:
+ case 8232:
+ case 8233:
+ ++this.state.pos;
+ ++this.state.curLine;
+ this.state.lineStart = this.state.pos;
+ break;
+
+ case 47:
+ switch (this.input.charCodeAt(this.state.pos + 1)) {
+ case 42:
+ {
+ const comment = this.skipBlockComment();
+
+ if (comment !== undefined) {
+ this.addComment(comment);
+ if (this.options.attachComment) comments.push(comment);
+ }
+
+ break;
+ }
+
+ case 47:
+ {
+ const comment = this.skipLineComment(2);
+
+ if (comment !== undefined) {
+ this.addComment(comment);
+ if (this.options.attachComment) comments.push(comment);
+ }
+
+ break;
+ }
+
+ default:
+ break loop;
+ }
+
+ break;
+
+ default:
+ if (isWhitespace(ch)) {
+ ++this.state.pos;
+ } else if (ch === 45 && !this.inModule) {
+ const pos = this.state.pos;
+
+ if (this.input.charCodeAt(pos + 1) === 45 && this.input.charCodeAt(pos + 2) === 62 && (spaceStart === 0 || this.state.lineStart > spaceStart)) {
+ const comment = this.skipLineComment(3);
+
+ if (comment !== undefined) {
+ this.addComment(comment);
+ if (this.options.attachComment) comments.push(comment);
+ }
+ } else {
+ break loop;
+ }
+ } else if (ch === 60 && !this.inModule) {
+ const pos = this.state.pos;
+
+ if (this.input.charCodeAt(pos + 1) === 33 && this.input.charCodeAt(pos + 2) === 45 && this.input.charCodeAt(pos + 3) === 45) {
+ const comment = this.skipLineComment(4);
+
+ if (comment !== undefined) {
+ this.addComment(comment);
+ if (this.options.attachComment) comments.push(comment);
+ }
+ } else {
+ break loop;
+ }
+ } else {
+ break loop;
+ }
+
+ }
+ }
+
+ if (comments.length > 0) {
+ const end = this.state.pos;
+ const CommentWhitespace = {
+ start: spaceStart,
+ end,
+ comments,
+ leadingNode: null,
+ trailingNode: null,
+ containingNode: null
+ };
+ this.state.commentStack.push(CommentWhitespace);
+ }
+ }
+
+ finishToken(type, val) {
+ this.state.end = this.state.pos;
+ this.state.endLoc = this.state.curPosition();
+ const prevType = this.state.type;
+ this.state.type = type;
+ this.state.value = val;
+
+ if (!this.isLookahead) {
+ this.updateContext(prevType);
+ }
+ }
+
+ replaceToken(type) {
+ this.state.type = type;
+ this.updateContext();
+ }
+
+ readToken_numberSign() {
+ if (this.state.pos === 0 && this.readToken_interpreter()) {
+ return;
+ }
+
+ const nextPos = this.state.pos + 1;
+ const next = this.codePointAtPos(nextPos);
+
+ if (next >= 48 && next <= 57) {
+ throw this.raise(ErrorMessages.UnexpectedDigitAfterHash, {
+ at: this.state.curPosition()
+ });
+ }
+
+ if (next === 123 || next === 91 && this.hasPlugin("recordAndTuple")) {
+ this.expectPlugin("recordAndTuple");
+
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "hash") {
+ throw this.raise(next === 123 ? ErrorMessages.RecordExpressionHashIncorrectStartSyntaxType : ErrorMessages.TupleExpressionHashIncorrectStartSyntaxType, {
+ at: this.state.curPosition()
+ });
+ }
+
+ this.state.pos += 2;
+
+ if (next === 123) {
+ this.finishToken(7);
+ } else {
+ this.finishToken(1);
+ }
+ } else if (isIdentifierStart(next)) {
+ ++this.state.pos;
+ this.finishToken(134, this.readWord1(next));
+ } else if (next === 92) {
+ ++this.state.pos;
+ this.finishToken(134, this.readWord1());
+ } else {
+ this.finishOp(27, 1);
+ }
+ }
+
+ readToken_dot() {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next >= 48 && next <= 57) {
+ this.readNumber(true);
+ return;
+ }
+
+ if (next === 46 && this.input.charCodeAt(this.state.pos + 2) === 46) {
+ this.state.pos += 3;
+ this.finishToken(21);
+ } else {
+ ++this.state.pos;
+ this.finishToken(16);
+ }
+ }
+
+ readToken_slash() {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 61) {
+ this.finishOp(31, 2);
+ } else {
+ this.finishOp(56, 1);
+ }
+ }
+
+ readToken_interpreter() {
+ if (this.state.pos !== 0 || this.length < 2) return false;
+ let ch = this.input.charCodeAt(this.state.pos + 1);
+ if (ch !== 33) return false;
+ const start = this.state.pos;
+ this.state.pos += 1;
+
+ while (!isNewLine(ch) && ++this.state.pos < this.length) {
+ ch = this.input.charCodeAt(this.state.pos);
+ }
+
+ const value = this.input.slice(start + 2, this.state.pos);
+ this.finishToken(28, value);
+ return true;
+ }
+
+ readToken_mult_modulo(code) {
+ let type = code === 42 ? 55 : 54;
+ let width = 1;
+ let next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (code === 42 && next === 42) {
+ width++;
+ next = this.input.charCodeAt(this.state.pos + 2);
+ type = 57;
+ }
+
+ if (next === 61 && !this.state.inType) {
+ width++;
+ type = code === 37 ? 33 : 30;
+ }
+
+ this.finishOp(type, width);
+ }
+
+ readToken_pipe_amp(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === code) {
+ if (this.input.charCodeAt(this.state.pos + 2) === 61) {
+ this.finishOp(30, 3);
+ } else {
+ this.finishOp(code === 124 ? 41 : 42, 2);
+ }
+
+ return;
+ }
+
+ if (code === 124) {
+ if (next === 62) {
+ this.finishOp(39, 2);
+ return;
+ }
+
+ if (this.hasPlugin("recordAndTuple") && next === 125) {
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
+ throw this.raise(ErrorMessages.RecordExpressionBarIncorrectEndSyntaxType, {
+ at: this.state.curPosition()
+ });
+ }
+
+ this.state.pos += 2;
+ this.finishToken(9);
+ return;
+ }
+
+ if (this.hasPlugin("recordAndTuple") && next === 93) {
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
+ throw this.raise(ErrorMessages.TupleExpressionBarIncorrectEndSyntaxType, {
+ at: this.state.curPosition()
+ });
+ }
+
+ this.state.pos += 2;
+ this.finishToken(4);
+ return;
+ }
+ }
+
+ if (next === 61) {
+ this.finishOp(30, 2);
+ return;
+ }
+
+ this.finishOp(code === 124 ? 43 : 45, 1);
+ }
+
+ readToken_caret() {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 61 && !this.state.inType) {
+ this.finishOp(32, 2);
+ } else if (next === 94 && this.hasPlugin(["pipelineOperator", {
+ proposal: "hack",
+ topicToken: "^^"
+ }])) {
+ this.finishOp(37, 2);
+ const lookaheadCh = this.input.codePointAt(this.state.pos);
+
+ if (lookaheadCh === 94) {
+ throw this.unexpected();
+ }
+ } else {
+ this.finishOp(44, 1);
+ }
+ }
+
+ readToken_atSign() {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 64 && this.hasPlugin(["pipelineOperator", {
+ proposal: "hack",
+ topicToken: "@@"
+ }])) {
+ this.finishOp(38, 2);
+ } else {
+ this.finishOp(26, 1);
+ }
+ }
+
+ readToken_plus_min(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === code) {
+ this.finishOp(34, 2);
+ return;
+ }
+
+ if (next === 61) {
+ this.finishOp(30, 2);
+ } else {
+ this.finishOp(53, 1);
+ }
+ }
+
+ readToken_lt() {
+ const {
+ pos
+ } = this.state;
+ const next = this.input.charCodeAt(pos + 1);
+
+ if (next === 60) {
+ if (this.input.charCodeAt(pos + 2) === 61) {
+ this.finishOp(30, 3);
+ return;
+ }
+
+ this.finishOp(51, 2);
+ return;
+ }
+
+ if (next === 61) {
+ this.finishOp(49, 2);
+ return;
+ }
+
+ this.finishOp(47, 1);
+ }
+
+ readToken_gt() {
+ const {
+ pos
+ } = this.state;
+ const next = this.input.charCodeAt(pos + 1);
+
+ if (next === 62) {
+ const size = this.input.charCodeAt(pos + 2) === 62 ? 3 : 2;
+
+ if (this.input.charCodeAt(pos + size) === 61) {
+ this.finishOp(30, size + 1);
+ return;
+ }
+
+ this.finishOp(52, size);
+ return;
+ }
+
+ if (next === 61) {
+ this.finishOp(49, 2);
+ return;
+ }
+
+ this.finishOp(48, 1);
+ }
+
+ readToken_eq_excl(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 61) {
+ this.finishOp(46, this.input.charCodeAt(this.state.pos + 2) === 61 ? 3 : 2);
+ return;
+ }
+
+ if (code === 61 && next === 62) {
+ this.state.pos += 2;
+ this.finishToken(19);
+ return;
+ }
+
+ this.finishOp(code === 61 ? 29 : 35, 1);
+ }
+
+ readToken_question() {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+ const next2 = this.input.charCodeAt(this.state.pos + 2);
+
+ if (next === 63) {
+ if (next2 === 61) {
+ this.finishOp(30, 3);
+ } else {
+ this.finishOp(40, 2);
+ }
+ } else if (next === 46 && !(next2 >= 48 && next2 <= 57)) {
+ this.state.pos += 2;
+ this.finishToken(18);
+ } else {
+ ++this.state.pos;
+ this.finishToken(17);
+ }
+ }
+
+ getTokenFromCode(code) {
+ switch (code) {
+ case 46:
+ this.readToken_dot();
+ return;
+
+ case 40:
+ ++this.state.pos;
+ this.finishToken(10);
+ return;
+
+ case 41:
+ ++this.state.pos;
+ this.finishToken(11);
+ return;
+
+ case 59:
+ ++this.state.pos;
+ this.finishToken(13);
+ return;
+
+ case 44:
+ ++this.state.pos;
+ this.finishToken(12);
+ return;
+
+ case 91:
+ if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
+ throw this.raise(ErrorMessages.TupleExpressionBarIncorrectStartSyntaxType, {
+ at: this.state.curPosition()
+ });
+ }
+
+ this.state.pos += 2;
+ this.finishToken(2);
+ } else {
+ ++this.state.pos;
+ this.finishToken(0);
+ }
+
+ return;
+
+ case 93:
+ ++this.state.pos;
+ this.finishToken(3);
+ return;
+
+ case 123:
+ if (this.hasPlugin("recordAndTuple") && this.input.charCodeAt(this.state.pos + 1) === 124) {
+ if (this.getPluginOption("recordAndTuple", "syntaxType") !== "bar") {
+ throw this.raise(ErrorMessages.RecordExpressionBarIncorrectStartSyntaxType, {
+ at: this.state.curPosition()
+ });
+ }
+
+ this.state.pos += 2;
+ this.finishToken(6);
+ } else {
+ ++this.state.pos;
+ this.finishToken(5);
+ }
+
+ return;
+
+ case 125:
+ ++this.state.pos;
+ this.finishToken(8);
+ return;
+
+ case 58:
+ if (this.hasPlugin("functionBind") && this.input.charCodeAt(this.state.pos + 1) === 58) {
+ this.finishOp(15, 2);
+ } else {
+ ++this.state.pos;
+ this.finishToken(14);
+ }
+
+ return;
+
+ case 63:
+ this.readToken_question();
+ return;
+
+ case 96:
+ this.readTemplateToken();
+ return;
+
+ case 48:
+ {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (next === 120 || next === 88) {
+ this.readRadixNumber(16);
+ return;
+ }
+
+ if (next === 111 || next === 79) {
+ this.readRadixNumber(8);
+ return;
+ }
+
+ if (next === 98 || next === 66) {
+ this.readRadixNumber(2);
+ return;
+ }
+ }
+
+ case 49:
+ case 50:
+ case 51:
+ case 52:
+ case 53:
+ case 54:
+ case 55:
+ case 56:
+ case 57:
+ this.readNumber(false);
+ return;
+
+ case 34:
+ case 39:
+ this.readString(code);
+ return;
+
+ case 47:
+ this.readToken_slash();
+ return;
+
+ case 37:
+ case 42:
+ this.readToken_mult_modulo(code);
+ return;
+
+ case 124:
+ case 38:
+ this.readToken_pipe_amp(code);
+ return;
+
+ case 94:
+ this.readToken_caret();
+ return;
+
+ case 43:
+ case 45:
+ this.readToken_plus_min(code);
+ return;
+
+ case 60:
+ this.readToken_lt();
+ return;
+
+ case 62:
+ this.readToken_gt();
+ return;
+
+ case 61:
+ case 33:
+ this.readToken_eq_excl(code);
+ return;
+
+ case 126:
+ this.finishOp(36, 1);
+ return;
+
+ case 64:
+ this.readToken_atSign();
+ return;
+
+ case 35:
+ this.readToken_numberSign();
+ return;
+
+ case 92:
+ this.readWord();
+ return;
+
+ default:
+ if (isIdentifierStart(code)) {
+ this.readWord(code);
+ return;
+ }
+
+ }
+
+ throw this.raise(ErrorMessages.InvalidOrUnexpectedToken, {
+ at: this.state.curPosition()
+ }, String.fromCodePoint(code));
+ }
+
+ finishOp(type, size) {
+ const str = this.input.slice(this.state.pos, this.state.pos + size);
+ this.state.pos += size;
+ this.finishToken(type, str);
+ }
+
+ readRegexp() {
+ const startLoc = this.state.startLoc;
+ const start = this.state.start + 1;
+ let escaped, inClass;
+ let {
+ pos
+ } = this.state;
+
+ for (;; ++pos) {
+ if (pos >= this.length) {
+ throw this.raise(ErrorMessages.UnterminatedRegExp, {
+ at: createPositionWithColumnOffset(startLoc, 1)
+ });
+ }
+
+ const ch = this.input.charCodeAt(pos);
+
+ if (isNewLine(ch)) {
+ throw this.raise(ErrorMessages.UnterminatedRegExp, {
+ at: createPositionWithColumnOffset(startLoc, 1)
+ });
+ }
+
+ if (escaped) {
+ escaped = false;
+ } else {
+ if (ch === 91) {
+ inClass = true;
+ } else if (ch === 93 && inClass) {
+ inClass = false;
+ } else if (ch === 47 && !inClass) {
+ break;
+ }
+
+ escaped = ch === 92;
+ }
+ }
+
+ const content = this.input.slice(start, pos);
+ ++pos;
+ let mods = "";
+
+ const nextPos = () => createPositionWithColumnOffset(startLoc, pos + 2 - start);
+
+ while (pos < this.length) {
+ const cp = this.codePointAtPos(pos);
+ const char = String.fromCharCode(cp);
+
+ if (VALID_REGEX_FLAGS.has(cp)) {
+ if (cp === 118) {
+ this.expectPlugin("regexpUnicodeSets", nextPos());
+
+ if (mods.includes("u")) {
+ this.raise(ErrorMessages.IncompatibleRegExpUVFlags, {
+ at: nextPos()
+ });
+ }
+ } else if (cp === 117) {
+ if (mods.includes("v")) {
+ this.raise(ErrorMessages.IncompatibleRegExpUVFlags, {
+ at: nextPos()
+ });
+ }
+ }
+
+ if (mods.includes(char)) {
+ this.raise(ErrorMessages.DuplicateRegExpFlags, {
+ at: nextPos()
+ });
+ }
+ } else if (isIdentifierChar(cp) || cp === 92) {
+ this.raise(ErrorMessages.MalformedRegExpFlags, {
+ at: nextPos()
+ });
+ } else {
+ break;
+ }
+
+ ++pos;
+ mods += char;
+ }
+
+ this.state.pos = pos;
+ this.finishToken(133, {
+ pattern: content,
+ flags: mods
+ });
+ }
+
+ readInt(radix, len, forceLen, allowNumSeparator = true) {
+ const start = this.state.pos;
+ const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
+ const allowedSiblings = radix === 16 ? allowedNumericSeparatorSiblings.hex : radix === 10 ? allowedNumericSeparatorSiblings.dec : radix === 8 ? allowedNumericSeparatorSiblings.oct : allowedNumericSeparatorSiblings.bin;
+ let invalid = false;
+ let total = 0;
+
+ for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
+ const code = this.input.charCodeAt(this.state.pos);
+ let val;
+
+ if (code === 95) {
+ const prev = this.input.charCodeAt(this.state.pos - 1);
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (allowedSiblings.indexOf(next) === -1) {
+ this.raise(ErrorMessages.UnexpectedNumericSeparator, {
+ at: this.state.curPosition()
+ });
+ } else if (forbiddenSiblings.indexOf(prev) > -1 || forbiddenSiblings.indexOf(next) > -1 || Number.isNaN(next)) {
+ this.raise(ErrorMessages.UnexpectedNumericSeparator, {
+ at: this.state.curPosition()
+ });
+ }
+
+ if (!allowNumSeparator) {
+ this.raise(ErrorMessages.NumericSeparatorInEscapeSequence, {
+ at: this.state.curPosition()
+ });
+ }
+
+ ++this.state.pos;
+ continue;
+ }
+
+ if (code >= 97) {
+ val = code - 97 + 10;
+ } else if (code >= 65) {
+ val = code - 65 + 10;
+ } else if (_isDigit(code)) {
+ val = code - 48;
+ } else {
+ val = Infinity;
+ }
+
+ if (val >= radix) {
+ if (this.options.errorRecovery && val <= 9) {
+ val = 0;
+ this.raise(ErrorMessages.InvalidDigit, {
+ at: this.state.curPosition()
+ }, radix);
+ } else if (forceLen) {
+ val = 0;
+ invalid = true;
+ } else {
+ break;
+ }
+ }
+
+ ++this.state.pos;
+ total = total * radix + val;
+ }
+
+ if (this.state.pos === start || len != null && this.state.pos - start !== len || invalid) {
+ return null;
+ }
+
+ return total;
+ }
+
+ readRadixNumber(radix) {
+ const startLoc = this.state.curPosition();
+ let isBigInt = false;
+ this.state.pos += 2;
+ const val = this.readInt(radix);
+
+ if (val == null) {
+ this.raise(ErrorMessages.InvalidDigit, {
+ at: createPositionWithColumnOffset(startLoc, 2)
+ }, radix);
+ }
+
+ const next = this.input.charCodeAt(this.state.pos);
+
+ if (next === 110) {
+ ++this.state.pos;
+ isBigInt = true;
+ } else if (next === 109) {
+ throw this.raise(ErrorMessages.InvalidDecimal, {
+ at: startLoc
+ });
+ }
+
+ if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {
+ throw this.raise(ErrorMessages.NumberIdentifier, {
+ at: this.state.curPosition()
+ });
+ }
+
+ if (isBigInt) {
+ const str = this.input.slice(startLoc.index, this.state.pos).replace(/[_n]/g, "");
+ this.finishToken(131, str);
+ return;
+ }
+
+ this.finishToken(130, val);
+ }
+
+ readNumber(startsWithDot) {
+ const start = this.state.pos;
+ const startLoc = this.state.curPosition();
+ let isFloat = false;
+ let isBigInt = false;
+ let isDecimal = false;
+ let hasExponent = false;
+ let isOctal = false;
+
+ if (!startsWithDot && this.readInt(10) === null) {
+ this.raise(ErrorMessages.InvalidNumber, {
+ at: this.state.curPosition()
+ });
+ }
+
+ const hasLeadingZero = this.state.pos - start >= 2 && this.input.charCodeAt(start) === 48;
+
+ if (hasLeadingZero) {
+ const integer = this.input.slice(start, this.state.pos);
+ this.recordStrictModeErrors(ErrorMessages.StrictOctalLiteral, startLoc);
+
+ if (!this.state.strict) {
+ const underscorePos = integer.indexOf("_");
+
+ if (underscorePos > 0) {
+ this.raise(ErrorMessages.ZeroDigitNumericSeparator, {
+ at: createPositionWithColumnOffset(startLoc, underscorePos)
+ });
+ }
+ }
+
+ isOctal = hasLeadingZero && !/[89]/.test(integer);
+ }
+
+ let next = this.input.charCodeAt(this.state.pos);
+
+ if (next === 46 && !isOctal) {
+ ++this.state.pos;
+ this.readInt(10);
+ isFloat = true;
+ next = this.input.charCodeAt(this.state.pos);
+ }
+
+ if ((next === 69 || next === 101) && !isOctal) {
+ next = this.input.charCodeAt(++this.state.pos);
+
+ if (next === 43 || next === 45) {
+ ++this.state.pos;
+ }
+
+ if (this.readInt(10) === null) {
+ this.raise(ErrorMessages.InvalidOrMissingExponent, {
+ at: startLoc
+ });
+ }
+
+ isFloat = true;
+ hasExponent = true;
+ next = this.input.charCodeAt(this.state.pos);
+ }
+
+ if (next === 110) {
+ if (isFloat || hasLeadingZero) {
+ this.raise(ErrorMessages.InvalidBigIntLiteral, {
+ at: startLoc
+ });
+ }
+
+ ++this.state.pos;
+ isBigInt = true;
+ }
+
+ if (next === 109) {
+ this.expectPlugin("decimal", this.state.curPosition());
+
+ if (hasExponent || hasLeadingZero) {
+ this.raise(ErrorMessages.InvalidDecimal, {
+ at: startLoc
+ });
+ }
+
+ ++this.state.pos;
+ isDecimal = true;
+ }
+
+ if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {
+ throw this.raise(ErrorMessages.NumberIdentifier, {
+ at: this.state.curPosition()
+ });
+ }
+
+ const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, "");
+
+ if (isBigInt) {
+ this.finishToken(131, str);
+ return;
+ }
+
+ if (isDecimal) {
+ this.finishToken(132, str);
+ return;
+ }
+
+ const val = isOctal ? parseInt(str, 8) : parseFloat(str);
+ this.finishToken(130, val);
+ }
+
+ readCodePoint(throwOnInvalid) {
+ const ch = this.input.charCodeAt(this.state.pos);
+ let code;
+
+ if (ch === 123) {
+ ++this.state.pos;
+ code = this.readHexChar(this.input.indexOf("}", this.state.pos) - this.state.pos, true, throwOnInvalid);
+ ++this.state.pos;
+
+ if (code !== null && code > 0x10ffff) {
+ if (throwOnInvalid) {
+ this.raise(ErrorMessages.InvalidCodePoint, {
+ at: this.state.curPosition()
+ });
+ } else {
+ return null;
+ }
+ }
+ } else {
+ code = this.readHexChar(4, false, throwOnInvalid);
+ }
+
+ return code;
+ }
+
+ readString(quote) {
+ let out = "",
+ chunkStart = ++this.state.pos;
+
+ for (;;) {
+ if (this.state.pos >= this.length) {
+ throw this.raise(ErrorMessages.UnterminatedString, {
+ at: this.state.startLoc
+ });
+ }
+
+ const ch = this.input.charCodeAt(this.state.pos);
+ if (ch === quote) break;
+
+ if (ch === 92) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.readEscapedChar(false);
+ chunkStart = this.state.pos;
+ } else if (ch === 8232 || ch === 8233) {
+ ++this.state.pos;
+ ++this.state.curLine;
+ this.state.lineStart = this.state.pos;
+ } else if (isNewLine(ch)) {
+ throw this.raise(ErrorMessages.UnterminatedString, {
+ at: this.state.startLoc
+ });
+ } else {
+ ++this.state.pos;
+ }
+ }
+
+ out += this.input.slice(chunkStart, this.state.pos++);
+ this.finishToken(129, out);
+ }
+
+ readTemplateContinuation() {
+ if (!this.match(8)) {
+ this.unexpected(null, 8);
+ }
+
+ this.state.pos--;
+ this.readTemplateToken();
+ }
+
+ readTemplateToken() {
+ let out = "",
+ chunkStart = this.state.pos,
+ containsInvalid = false;
+ ++this.state.pos;
+
+ for (;;) {
+ if (this.state.pos >= this.length) {
+ throw this.raise(ErrorMessages.UnterminatedTemplate, {
+ at: createPositionWithColumnOffset(this.state.startLoc, 1)
+ });
+ }
+
+ const ch = this.input.charCodeAt(this.state.pos);
+
+ if (ch === 96) {
+ ++this.state.pos;
+ out += this.input.slice(chunkStart, this.state.pos);
+ this.finishToken(24, containsInvalid ? null : out);
+ return;
+ }
+
+ if (ch === 36 && this.input.charCodeAt(this.state.pos + 1) === 123) {
+ this.state.pos += 2;
+ out += this.input.slice(chunkStart, this.state.pos);
+ this.finishToken(25, containsInvalid ? null : out);
+ return;
+ }
+
+ if (ch === 92) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ const escaped = this.readEscapedChar(true);
+
+ if (escaped === null) {
+ containsInvalid = true;
+ } else {
+ out += escaped;
+ }
+
+ chunkStart = this.state.pos;
+ } else if (isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ ++this.state.pos;
+
+ switch (ch) {
+ case 13:
+ if (this.input.charCodeAt(this.state.pos) === 10) {
+ ++this.state.pos;
+ }
+
+ case 10:
+ out += "\n";
+ break;
+
+ default:
+ out += String.fromCharCode(ch);
+ break;
+ }
+
+ ++this.state.curLine;
+ this.state.lineStart = this.state.pos;
+ chunkStart = this.state.pos;
+ } else {
+ ++this.state.pos;
+ }
+ }
+ }
+
+ recordStrictModeErrors(message, loc) {
+ if (this.state.strict && !this.state.strictErrors.has(loc.index)) {
+ this.raise(message, {
+ at: loc
+ });
+ } else {
+ this.state.strictErrors.set(loc.index, {
+ loc,
+ message
+ });
+ }
+ }
+
+ readEscapedChar(inTemplate) {
+ const throwOnInvalid = !inTemplate;
+ const ch = this.input.charCodeAt(++this.state.pos);
+ ++this.state.pos;
+
+ switch (ch) {
+ case 110:
+ return "\n";
+
+ case 114:
+ return "\r";
+
+ case 120:
+ {
+ const code = this.readHexChar(2, false, throwOnInvalid);
+ return code === null ? null : String.fromCharCode(code);
+ }
+
+ case 117:
+ {
+ const code = this.readCodePoint(throwOnInvalid);
+ return code === null ? null : String.fromCodePoint(code);
+ }
+
+ case 116:
+ return "\t";
+
+ case 98:
+ return "\b";
+
+ case 118:
+ return "\u000b";
+
+ case 102:
+ return "\f";
+
+ case 13:
+ if (this.input.charCodeAt(this.state.pos) === 10) {
+ ++this.state.pos;
+ }
+
+ case 10:
+ this.state.lineStart = this.state.pos;
+ ++this.state.curLine;
+
+ case 8232:
+ case 8233:
+ return "";
+
+ case 56:
+ case 57:
+ if (inTemplate) {
+ return null;
+ } else {
+ this.recordStrictModeErrors(ErrorMessages.StrictNumericEscape, createPositionWithColumnOffset(this.state.curPosition(), -1));
+ }
+
+ default:
+ if (ch >= 48 && ch <= 55) {
+ const codePos = createPositionWithColumnOffset(this.state.curPosition(), -1);
+ const match = this.input.substr(this.state.pos - 1, 3).match(/^[0-7]+/);
+ let octalStr = match[0];
+ let octal = parseInt(octalStr, 8);
+
+ if (octal > 255) {
+ octalStr = octalStr.slice(0, -1);
+ octal = parseInt(octalStr, 8);
+ }
+
+ this.state.pos += octalStr.length - 1;
+ const next = this.input.charCodeAt(this.state.pos);
+
+ if (octalStr !== "0" || next === 56 || next === 57) {
+ if (inTemplate) {
+ return null;
+ } else {
+ this.recordStrictModeErrors(ErrorMessages.StrictNumericEscape, codePos);
+ }
+ }
+
+ return String.fromCharCode(octal);
+ }
+
+ return String.fromCharCode(ch);
+ }
+ }
+
+ readHexChar(len, forceLen, throwOnInvalid) {
+ const codeLoc = this.state.curPosition();
+ const n = this.readInt(16, len, forceLen, false);
+
+ if (n === null) {
+ if (throwOnInvalid) {
+ this.raise(ErrorMessages.InvalidEscapeSequence, {
+ at: codeLoc
+ });
+ } else {
+ this.state.pos = codeLoc.index - 1;
+ }
+ }
+
+ return n;
+ }
+
+ readWord1(firstCode) {
+ this.state.containsEsc = false;
+ let word = "";
+ const start = this.state.pos;
+ let chunkStart = this.state.pos;
+
+ if (firstCode !== undefined) {
+ this.state.pos += firstCode <= 0xffff ? 1 : 2;
+ }
+
+ while (this.state.pos < this.length) {
+ const ch = this.codePointAtPos(this.state.pos);
+
+ if (isIdentifierChar(ch)) {
+ this.state.pos += ch <= 0xffff ? 1 : 2;
+ } else if (ch === 92) {
+ this.state.containsEsc = true;
+ word += this.input.slice(chunkStart, this.state.pos);
+ const escStart = this.state.curPosition();
+ const identifierCheck = this.state.pos === start ? isIdentifierStart : isIdentifierChar;
+
+ if (this.input.charCodeAt(++this.state.pos) !== 117) {
+ this.raise(ErrorMessages.MissingUnicodeEscape, {
+ at: this.state.curPosition()
+ });
+ chunkStart = this.state.pos - 1;
+ continue;
+ }
+
+ ++this.state.pos;
+ const esc = this.readCodePoint(true);
+
+ if (esc !== null) {
+ if (!identifierCheck(esc)) {
+ this.raise(ErrorMessages.EscapedCharNotAnIdentifier, {
+ at: escStart
+ });
+ }
+
+ word += String.fromCodePoint(esc);
+ }
+
+ chunkStart = this.state.pos;
+ } else {
+ break;
+ }
+ }
+
+ return word + this.input.slice(chunkStart, this.state.pos);
+ }
+
+ readWord(firstCode) {
+ const word = this.readWord1(firstCode);
+ const type = keywords$1.get(word);
+
+ if (type !== undefined) {
+ this.finishToken(type, tokenLabelName(type));
+ } else {
+ this.finishToken(128, word);
+ }
+ }
+
+ checkKeywordEscapes() {
+ const {
+ type
+ } = this.state;
+
+ if (tokenIsKeyword(type) && this.state.containsEsc) {
+ this.raise(ErrorMessages.InvalidEscapedReservedWord, {
+ at: this.state.startLoc
+ }, tokenLabelName(type));
+ }
+ }
+
+ updateContext(prevType) {}
+
+}
+
+class ClassScope {
+ constructor() {
+ this.privateNames = new Set();
+ this.loneAccessors = new Map();
+ this.undefinedPrivateNames = new Map();
+ }
+
+}
+class ClassScopeHandler {
+ constructor(raise) {
+ this.stack = [];
+ this.undefinedPrivateNames = new Map();
+ this.raise = raise;
+ }
+
+ current() {
+ return this.stack[this.stack.length - 1];
+ }
+
+ enter() {
+ this.stack.push(new ClassScope());
+ }
+
+ exit() {
+ const oldClassScope = this.stack.pop();
+ const current = this.current();
+
+ for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) {
+ if (current) {
+ if (!current.undefinedPrivateNames.has(name)) {
+ current.undefinedPrivateNames.set(name, loc);
+ }
+ } else {
+ this.raise(ErrorMessages.InvalidPrivateFieldResolution, {
+ at: loc
+ }, name);
+ }
+ }
+ }
+
+ declarePrivateName(name, elementType, loc) {
+ const {
+ privateNames,
+ loneAccessors,
+ undefinedPrivateNames
+ } = this.current();
+ let redefined = privateNames.has(name);
+
+ if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {
+ const accessor = redefined && loneAccessors.get(name);
+
+ if (accessor) {
+ const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;
+ const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;
+ const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;
+ const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;
+ redefined = oldKind === newKind || oldStatic !== newStatic;
+ if (!redefined) loneAccessors.delete(name);
+ } else if (!redefined) {
+ loneAccessors.set(name, elementType);
+ }
+ }
+
+ if (redefined) {
+ this.raise(ErrorMessages.PrivateNameRedeclaration, {
+ at: loc
+ }, name);
+ }
+
+ privateNames.add(name);
+ undefinedPrivateNames.delete(name);
+ }
+
+ usePrivateName(name, loc) {
+ let classScope;
+
+ for (classScope of this.stack) {
+ if (classScope.privateNames.has(name)) return;
+ }
+
+ if (classScope) {
+ classScope.undefinedPrivateNames.set(name, loc);
+ } else {
+ this.raise(ErrorMessages.InvalidPrivateFieldResolution, {
+ at: loc
+ }, name);
+ }
+ }
+
+}
+
+const kExpression = 0,
+ kMaybeArrowParameterDeclaration = 1,
+ kMaybeAsyncArrowParameterDeclaration = 2,
+ kParameterDeclaration = 3;
+
+class ExpressionScope {
+ constructor(type = kExpression) {
+ this.type = void 0;
+ this.type = type;
+ }
+
+ canBeArrowParameterDeclaration() {
+ return this.type === kMaybeAsyncArrowParameterDeclaration || this.type === kMaybeArrowParameterDeclaration;
+ }
+
+ isCertainlyParameterDeclaration() {
+ return this.type === kParameterDeclaration;
+ }
+
+}
+
+class ArrowHeadParsingScope extends ExpressionScope {
+ constructor(type) {
+ super(type);
+ this.errors = new Map();
+ }
+
+ recordDeclarationError(message, loc) {
+ this.errors.set(loc.index, {
+ message,
+ loc
+ });
+ }
+
+ clearDeclarationError(loc) {
+ this.errors.delete(loc.index);
+ }
+
+ iterateErrors(iterator) {
+ this.errors.forEach(iterator);
+ }
+
+}
+
+class ExpressionScopeHandler {
+ constructor(raise) {
+ this.stack = [new ExpressionScope()];
+ this.raise = raise;
+ }
+
+ enter(scope) {
+ this.stack.push(scope);
+ }
+
+ exit() {
+ this.stack.pop();
+ }
+
+ recordParameterInitializerError(loc, template) {
+ const {
+ stack
+ } = this;
+ let i = stack.length - 1;
+ let scope = stack[i];
+
+ while (!scope.isCertainlyParameterDeclaration()) {
+ if (scope.canBeArrowParameterDeclaration()) {
+ scope.recordDeclarationError(template, loc);
+ } else {
+ return;
+ }
+
+ scope = stack[--i];
+ }
+
+ this.raise(template, {
+ at: loc
+ });
+ }
+
+ recordParenthesizedIdentifierError(template, loc) {
+ const {
+ stack
+ } = this;
+ const scope = stack[stack.length - 1];
+
+ if (scope.isCertainlyParameterDeclaration()) {
+ this.raise(template, {
+ at: loc
+ });
+ } else if (scope.canBeArrowParameterDeclaration()) {
+ scope.recordDeclarationError(template, loc);
+ } else {
+ return;
+ }
+ }
+
+ recordAsyncArrowParametersError(template, loc) {
+ const {
+ stack
+ } = this;
+ let i = stack.length - 1;
+ let scope = stack[i];
+
+ while (scope.canBeArrowParameterDeclaration()) {
+ if (scope.type === kMaybeAsyncArrowParameterDeclaration) {
+ scope.recordDeclarationError(template, loc);
+ }
+
+ scope = stack[--i];
+ }
+ }
+
+ validateAsPattern() {
+ const {
+ stack
+ } = this;
+ const currentScope = stack[stack.length - 1];
+ if (!currentScope.canBeArrowParameterDeclaration()) return;
+ currentScope.iterateErrors(({
+ message,
+ loc
+ }) => {
+ this.raise(message, {
+ at: loc
+ });
+ let i = stack.length - 2;
+ let scope = stack[i];
+
+ while (scope.canBeArrowParameterDeclaration()) {
+ scope.clearDeclarationError(loc);
+ scope = stack[--i];
+ }
+ });
+ }
+
+}
+function newParameterDeclarationScope() {
+ return new ExpressionScope(kParameterDeclaration);
+}
+function newArrowHeadScope() {
+ return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);
+}
+function newAsyncArrowScope() {
+ return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);
+}
+function newExpressionScope() {
+ return new ExpressionScope();
+}
+
+const PARAM = 0b0000,
+ PARAM_YIELD = 0b0001,
+ PARAM_AWAIT = 0b0010,
+ PARAM_RETURN = 0b0100,
+ PARAM_IN = 0b1000;
+class ProductionParameterHandler {
+ constructor() {
+ this.stacks = [];
+ }
+
+ enter(flags) {
+ this.stacks.push(flags);
+ }
+
+ exit() {
+ this.stacks.pop();
+ }
+
+ currentFlags() {
+ return this.stacks[this.stacks.length - 1];
+ }
+
+ get hasAwait() {
+ return (this.currentFlags() & PARAM_AWAIT) > 0;
+ }
+
+ get hasYield() {
+ return (this.currentFlags() & PARAM_YIELD) > 0;
+ }
+
+ get hasReturn() {
+ return (this.currentFlags() & PARAM_RETURN) > 0;
+ }
+
+ get hasIn() {
+ return (this.currentFlags() & PARAM_IN) > 0;
+ }
+
+}
+function functionFlags(isAsync, isGenerator) {
+ return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);
+}
+
+class UtilParser extends Tokenizer {
+ addExtra(node, key, value, enumerable = true) {
+ if (!node) return;
+ const extra = node.extra = node.extra || {};
+
+ if (enumerable) {
+ extra[key] = value;
+ } else {
+ Object.defineProperty(extra, key, {
+ enumerable,
+ value
+ });
+ }
+ }
+
+ isContextual(token) {
+ return this.state.type === token && !this.state.containsEsc;
+ }
+
+ isUnparsedContextual(nameStart, name) {
+ const nameEnd = nameStart + name.length;
+
+ if (this.input.slice(nameStart, nameEnd) === name) {
+ const nextCh = this.input.charCodeAt(nameEnd);
+ return !(isIdentifierChar(nextCh) || (nextCh & 0xfc00) === 0xd800);
+ }
+
+ return false;
+ }
+
+ isLookaheadContextual(name) {
+ const next = this.nextTokenStart();
+ return this.isUnparsedContextual(next, name);
+ }
+
+ eatContextual(token) {
+ if (this.isContextual(token)) {
+ this.next();
+ return true;
+ }
+
+ return false;
+ }
+
+ expectContextual(token, template) {
+ if (!this.eatContextual(token)) {
+ if (template != null) {
+ throw this.raise(template, {
+ at: this.state.startLoc
+ });
+ }
+
+ throw this.unexpected(null, token);
+ }
+ }
+
+ canInsertSemicolon() {
+ return this.match(135) || this.match(8) || this.hasPrecedingLineBreak();
+ }
+
+ hasPrecedingLineBreak() {
+ return lineBreak.test(this.input.slice(this.state.lastTokEndLoc.index, this.state.start));
+ }
+
+ hasFollowingLineBreak() {
+ skipWhiteSpaceToLineBreak.lastIndex = this.state.end;
+ return skipWhiteSpaceToLineBreak.test(this.input);
+ }
+
+ isLineTerminator() {
+ return this.eat(13) || this.canInsertSemicolon();
+ }
+
+ semicolon(allowAsi = true) {
+ if (allowAsi ? this.isLineTerminator() : this.eat(13)) return;
+ this.raise(ErrorMessages.MissingSemicolon, {
+ at: this.state.lastTokEndLoc
+ });
+ }
+
+ expect(type, loc) {
+ this.eat(type) || this.unexpected(loc, type);
+ }
+
+ assertNoSpace(message = "Unexpected space.") {
+ if (this.state.start > this.state.lastTokEndLoc.index) {
+ this.raise({
+ code: ErrorCodes.SyntaxError,
+ reasonCode: "UnexpectedSpace",
+ template: message
+ }, {
+ at: this.state.lastTokEndLoc
+ });
+ }
+ }
+
+ unexpected(loc, type) {
+ throw this.raise({
+ code: ErrorCodes.SyntaxError,
+ reasonCode: "UnexpectedToken",
+ template: type != null ? `Unexpected token, expected "${tokenLabelName(type)}"` : "Unexpected token"
+ }, {
+ at: loc != null ? loc : this.state.startLoc
+ });
+ }
+
+ getPluginNamesFromConfigs(pluginConfigs) {
+ return pluginConfigs.map(c => {
+ if (typeof c === "string") {
+ return c;
+ } else {
+ return c[0];
+ }
+ });
+ }
+
+ expectPlugin(pluginConfig, loc) {
+ if (!this.hasPlugin(pluginConfig)) {
+ throw this.raiseWithData(loc != null ? loc : this.state.startLoc, {
+ missingPlugin: this.getPluginNamesFromConfigs([pluginConfig])
+ }, `This experimental syntax requires enabling the parser plugin: ${JSON.stringify(pluginConfig)}.`);
+ }
+
+ return true;
+ }
+
+ expectOnePlugin(pluginConfigs) {
+ if (!pluginConfigs.some(c => this.hasPlugin(c))) {
+ throw this.raiseWithData(this.state.startLoc, {
+ missingPlugin: this.getPluginNamesFromConfigs(pluginConfigs)
+ }, `This experimental syntax requires enabling one of the following parser plugin(s): ${pluginConfigs.map(c => JSON.stringify(c)).join(", ")}.`);
+ }
+ }
+
+ tryParse(fn, oldState = this.state.clone()) {
+ const abortSignal = {
+ node: null
+ };
+
+ try {
+ const node = fn((node = null) => {
+ abortSignal.node = node;
+ throw abortSignal;
+ });
+
+ if (this.state.errors.length > oldState.errors.length) {
+ const failState = this.state;
+ this.state = oldState;
+ this.state.tokensLength = failState.tokensLength;
+ return {
+ node,
+ error: failState.errors[oldState.errors.length],
+ thrown: false,
+ aborted: false,
+ failState
+ };
+ }
+
+ return {
+ node,
+ error: null,
+ thrown: false,
+ aborted: false,
+ failState: null
+ };
+ } catch (error) {
+ const failState = this.state;
+ this.state = oldState;
+
+ if (error instanceof SyntaxError) {
+ return {
+ node: null,
+ error,
+ thrown: true,
+ aborted: false,
+ failState
+ };
+ }
+
+ if (error === abortSignal) {
+ return {
+ node: abortSignal.node,
+ error: null,
+ thrown: false,
+ aborted: true,
+ failState
+ };
+ }
+
+ throw error;
+ }
+ }
+
+ checkExpressionErrors(refExpressionErrors, andThrow) {
+ if (!refExpressionErrors) return false;
+ const {
+ shorthandAssignLoc,
+ doubleProtoLoc,
+ privateKeyLoc,
+ optionalParametersLoc
+ } = refExpressionErrors;
+ const hasErrors = !!shorthandAssignLoc || !!doubleProtoLoc || !!optionalParametersLoc || !!privateKeyLoc;
+
+ if (!andThrow) {
+ return hasErrors;
+ }
+
+ if (shorthandAssignLoc != null) {
+ this.raise(ErrorMessages.InvalidCoverInitializedName, {
+ at: shorthandAssignLoc
+ });
+ }
+
+ if (doubleProtoLoc != null) {
+ this.raise(ErrorMessages.DuplicateProto, {
+ at: doubleProtoLoc
+ });
+ }
+
+ if (privateKeyLoc != null) {
+ this.raise(ErrorMessages.UnexpectedPrivateField, {
+ at: privateKeyLoc
+ });
+ }
+
+ if (optionalParametersLoc != null) {
+ this.unexpected(optionalParametersLoc);
+ }
+ }
+
+ isLiteralPropertyName() {
+ return tokenIsLiteralPropertyName(this.state.type);
+ }
+
+ isPrivateName(node) {
+ return node.type === "PrivateName";
+ }
+
+ getPrivateNameSV(node) {
+ return node.id.name;
+ }
+
+ hasPropertyAsPrivateName(node) {
+ return (node.type === "MemberExpression" || node.type === "OptionalMemberExpression") && this.isPrivateName(node.property);
+ }
+
+ isOptionalChain(node) {
+ return node.type === "OptionalMemberExpression" || node.type === "OptionalCallExpression";
+ }
+
+ isObjectProperty(node) {
+ return node.type === "ObjectProperty";
+ }
+
+ isObjectMethod(node) {
+ return node.type === "ObjectMethod";
+ }
+
+ initializeScopes(inModule = this.options.sourceType === "module") {
+ const oldLabels = this.state.labels;
+ this.state.labels = [];
+ const oldExportedIdentifiers = this.exportedIdentifiers;
+ this.exportedIdentifiers = new Set();
+ const oldInModule = this.inModule;
+ this.inModule = inModule;
+ const oldScope = this.scope;
+ const ScopeHandler = this.getScopeHandler();
+ this.scope = new ScopeHandler(this.raise.bind(this), this.inModule);
+ const oldProdParam = this.prodParam;
+ this.prodParam = new ProductionParameterHandler();
+ const oldClassScope = this.classScope;
+ this.classScope = new ClassScopeHandler(this.raise.bind(this));
+ const oldExpressionScope = this.expressionScope;
+ this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));
+ return () => {
+ this.state.labels = oldLabels;
+ this.exportedIdentifiers = oldExportedIdentifiers;
+ this.inModule = oldInModule;
+ this.scope = oldScope;
+ this.prodParam = oldProdParam;
+ this.classScope = oldClassScope;
+ this.expressionScope = oldExpressionScope;
+ };
+ }
+
+ enterInitialScopes() {
+ let paramFlags = PARAM;
+
+ if (this.inModule) {
+ paramFlags |= PARAM_AWAIT;
+ }
+
+ this.scope.enter(SCOPE_PROGRAM);
+ this.prodParam.enter(paramFlags);
+ }
+
+ checkDestructuringPrivate(refExpressionErrors) {
+ const {
+ privateKeyLoc
+ } = refExpressionErrors;
+
+ if (privateKeyLoc !== null) {
+ this.expectPlugin("destructuringPrivate", privateKeyLoc);
+ }
+ }
+
+}
+class ExpressionErrors {
+ constructor() {
+ this.shorthandAssignLoc = null;
+ this.doubleProtoLoc = null;
+ this.privateKeyLoc = null;
+ this.optionalParametersLoc = null;
+ }
+
+}
+
+class Node {
+ constructor(parser, pos, loc) {
+ this.type = "";
+ this.start = pos;
+ this.end = 0;
+ this.loc = new SourceLocation(loc);
+ if (parser != null && parser.options.ranges) this.range = [pos, 0];
+ if (parser != null && parser.filename) this.loc.filename = parser.filename;
+ }
+
+}
+
+const NodePrototype = Node.prototype;
+{
+ NodePrototype.__clone = function () {
+ const newNode = new Node();
+ const keys = Object.keys(this);
+
+ for (let i = 0, length = keys.length; i < length; i++) {
+ const key = keys[i];
+
+ if (key !== "leadingComments" && key !== "trailingComments" && key !== "innerComments") {
+ newNode[key] = this[key];
+ }
+ }
+
+ return newNode;
+ };
+}
+
+function clonePlaceholder(node) {
+ return cloneIdentifier(node);
+}
+
+function cloneIdentifier(node) {
+ const {
+ type,
+ start,
+ end,
+ loc,
+ range,
+ extra,
+ name
+ } = node;
+ const cloned = Object.create(NodePrototype);
+ cloned.type = type;
+ cloned.start = start;
+ cloned.end = end;
+ cloned.loc = loc;
+ cloned.range = range;
+ cloned.extra = extra;
+ cloned.name = name;
+
+ if (type === "Placeholder") {
+ cloned.expectedNode = node.expectedNode;
+ }
+
+ return cloned;
+}
+function cloneStringLiteral(node) {
+ const {
+ type,
+ start,
+ end,
+ loc,
+ range,
+ extra
+ } = node;
+
+ if (type === "Placeholder") {
+ return clonePlaceholder(node);
+ }
+
+ const cloned = Object.create(NodePrototype);
+ cloned.type = type;
+ cloned.start = start;
+ cloned.end = end;
+ cloned.loc = loc;
+ cloned.range = range;
+
+ if (node.raw !== undefined) {
+ cloned.raw = node.raw;
+ } else {
+ cloned.extra = extra;
+ }
+
+ cloned.value = node.value;
+ return cloned;
+}
+class NodeUtils extends UtilParser {
+ startNode() {
+ return new Node(this, this.state.start, this.state.startLoc);
+ }
+
+ startNodeAt(pos, loc) {
+ return new Node(this, pos, loc);
+ }
+
+ startNodeAtNode(type) {
+ return this.startNodeAt(type.start, type.loc.start);
+ }
+
+ finishNode(node, type) {
+ return this.finishNodeAt(node, type, this.state.lastTokEndLoc);
+ }
+
+ finishNodeAt(node, type, endLoc) {
+
+ node.type = type;
+ node.end = endLoc.index;
+ node.loc.end = endLoc;
+ if (this.options.ranges) node.range[1] = endLoc.index;
+ if (this.options.attachComment) this.processComment(node);
+ return node;
+ }
+
+ resetStartLocation(node, start, startLoc) {
+ node.start = start;
+ node.loc.start = startLoc;
+ if (this.options.ranges) node.range[0] = start;
+ }
+
+ resetEndLocation(node, endLoc = this.state.lastTokEndLoc) {
+ node.end = endLoc.index;
+ node.loc.end = endLoc;
+ if (this.options.ranges) node.range[1] = endLoc.index;
+ }
+
+ resetStartLocationFromNode(node, locationNode) {
+ this.resetStartLocation(node, locationNode.start, locationNode.loc.start);
+ }
+
+}
+
+const reservedTypes = new Set(["_", "any", "bool", "boolean", "empty", "extends", "false", "interface", "mixed", "null", "number", "static", "string", "true", "typeof", "void"]);
+const FlowErrors = makeErrorTemplates({
+ AmbiguousConditionalArrow: "Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",
+ AmbiguousDeclareModuleKind: "Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",
+ AssignReservedType: "Cannot overwrite reserved type %0.",
+ DeclareClassElement: "The `declare` modifier can only appear on class fields.",
+ DeclareClassFieldInitializer: "Initializers are not allowed in fields with the `declare` modifier.",
+ DuplicateDeclareModuleExports: "Duplicate `declare module.exports` statement.",
+ EnumBooleanMemberNotInitialized: "Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.",
+ EnumDuplicateMemberName: "Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.",
+ EnumInconsistentMemberValues: "Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.",
+ EnumInvalidExplicitType: "Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
+ EnumInvalidExplicitTypeUnknownSupplied: "Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.",
+ EnumInvalidMemberInitializerPrimaryType: "Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.",
+ EnumInvalidMemberInitializerSymbolType: "Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.",
+ EnumInvalidMemberInitializerUnknownType: "The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.",
+ EnumInvalidMemberName: "Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.",
+ EnumNumberMemberNotInitialized: "Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.",
+ EnumStringMemberInconsistentlyInitailized: "String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.",
+ GetterMayNotHaveThisParam: "A getter cannot have a `this` parameter.",
+ ImportTypeShorthandOnlyInPureImport: "The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",
+ InexactInsideExact: "Explicit inexact syntax cannot appear inside an explicit exact object type.",
+ InexactInsideNonObject: "Explicit inexact syntax cannot appear in class or interface definitions.",
+ InexactVariance: "Explicit inexact syntax cannot have variance.",
+ InvalidNonTypeImportInDeclareModule: "Imports within a `declare module` body must always be `import type` or `import typeof`.",
+ MissingTypeParamDefault: "Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",
+ NestedDeclareModule: "`declare module` cannot be used inside another `declare module`.",
+ NestedFlowComment: "Cannot have a flow comment inside another flow comment.",
+ PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
+ SetterMayNotHaveThisParam: "A setter cannot have a `this` parameter.",
+ SpreadVariance: "Spread properties cannot have variance.",
+ ThisParamAnnotationRequired: "A type annotation is required for the `this` parameter.",
+ ThisParamBannedInConstructor: "Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",
+ ThisParamMayNotBeOptional: "The `this` parameter cannot be optional.",
+ ThisParamMustBeFirst: "The `this` parameter must be the first function parameter.",
+ ThisParamNoDefault: "The `this` parameter may not have a default value.",
+ TypeBeforeInitializer: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
+ TypeCastInPattern: "The type cast expression is expected to be wrapped with parenthesis.",
+ UnexpectedExplicitInexactInObject: "Explicit inexact syntax must appear at the end of an inexact object.",
+ UnexpectedReservedType: "Unexpected reserved type %0.",
+ UnexpectedReservedUnderscore: "`_` is only allowed as a type argument to call or new.",
+ UnexpectedSpaceBetweenModuloChecks: "Spaces between `%` and `checks` are not allowed here.",
+ UnexpectedSpreadType: "Spread operator cannot appear in class or interface definitions.",
+ UnexpectedSubtractionOperand: 'Unexpected token, expected "number" or "bigint".',
+ UnexpectedTokenAfterTypeParameter: "Expected an arrow function after this type parameter declaration.",
+ UnexpectedTypeParameterBeforeAsyncArrowFunction: "Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",
+ UnsupportedDeclareExportKind: "`declare export %0` is not supported. Use `%1` instead.",
+ UnsupportedStatementInDeclareModule: "Only declares and type imports are allowed inside declare module.",
+ UnterminatedFlowComment: "Unterminated flow-comment."
+}, ErrorCodes.SyntaxError, "flow");
+
+function isEsModuleType(bodyElement) {
+ return bodyElement.type === "DeclareExportAllDeclaration" || bodyElement.type === "DeclareExportDeclaration" && (!bodyElement.declaration || bodyElement.declaration.type !== "TypeAlias" && bodyElement.declaration.type !== "InterfaceDeclaration");
+}
+
+function hasTypeImportKind(node) {
+ return node.importKind === "type" || node.importKind === "typeof";
+}
+
+function isMaybeDefaultImport(type) {
+ return tokenIsKeywordOrIdentifier(type) && type !== 97;
+}
+
+const exportSuggestions = {
+ const: "declare export var",
+ let: "declare export var",
+ type: "export type",
+ interface: "export interface"
+};
+
+function partition(list, test) {
+ const list1 = [];
+ const list2 = [];
+
+ for (let i = 0; i < list.length; i++) {
+ (test(list[i], i, list) ? list1 : list2).push(list[i]);
+ }
+
+ return [list1, list2];
+}
+
+const FLOW_PRAGMA_REGEX = /\*?\s*@((?:no)?flow)\b/;
+var flow = (superClass => class extends superClass {
+ constructor(...args) {
+ super(...args);
+ this.flowPragma = undefined;
+ }
+
+ getScopeHandler() {
+ return FlowScopeHandler;
+ }
+
+ shouldParseTypes() {
+ return this.getPluginOption("flow", "all") || this.flowPragma === "flow";
+ }
+
+ shouldParseEnums() {
+ return !!this.getPluginOption("flow", "enums");
+ }
+
+ finishToken(type, val) {
+ if (type !== 129 && type !== 13 && type !== 28) {
+ if (this.flowPragma === undefined) {
+ this.flowPragma = null;
+ }
+ }
+
+ return super.finishToken(type, val);
+ }
+
+ addComment(comment) {
+ if (this.flowPragma === undefined) {
+ const matches = FLOW_PRAGMA_REGEX.exec(comment.value);
+
+ if (!matches) ; else if (matches[1] === "flow") {
+ this.flowPragma = "flow";
+ } else if (matches[1] === "noflow") {
+ this.flowPragma = "noflow";
+ } else {
+ throw new Error("Unexpected flow pragma");
+ }
+ }
+
+ return super.addComment(comment);
+ }
+
+ flowParseTypeInitialiser(tok) {
+ const oldInType = this.state.inType;
+ this.state.inType = true;
+ this.expect(tok || 14);
+ const type = this.flowParseType();
+ this.state.inType = oldInType;
+ return type;
+ }
+
+ flowParsePredicate() {
+ const node = this.startNode();
+ const moduloLoc = this.state.startLoc;
+ this.next();
+ this.expectContextual(107);
+
+ if (this.state.lastTokStart > moduloLoc.index + 1) {
+ this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, {
+ at: moduloLoc
+ });
+ }
+
+ if (this.eat(10)) {
+ node.value = this.parseExpression();
+ this.expect(11);
+ return this.finishNode(node, "DeclaredPredicate");
+ } else {
+ return this.finishNode(node, "InferredPredicate");
+ }
+ }
+
+ flowParseTypeAndPredicateInitialiser() {
+ const oldInType = this.state.inType;
+ this.state.inType = true;
+ this.expect(14);
+ let type = null;
+ let predicate = null;
+
+ if (this.match(54)) {
+ this.state.inType = oldInType;
+ predicate = this.flowParsePredicate();
+ } else {
+ type = this.flowParseType();
+ this.state.inType = oldInType;
+
+ if (this.match(54)) {
+ predicate = this.flowParsePredicate();
+ }
+ }
+
+ return [type, predicate];
+ }
+
+ flowParseDeclareClass(node) {
+ this.next();
+ this.flowParseInterfaceish(node, true);
+ return this.finishNode(node, "DeclareClass");
+ }
+
+ flowParseDeclareFunction(node) {
+ this.next();
+ const id = node.id = this.parseIdentifier();
+ const typeNode = this.startNode();
+ const typeContainer = this.startNode();
+
+ if (this.match(47)) {
+ typeNode.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ typeNode.typeParameters = null;
+ }
+
+ this.expect(10);
+ const tmp = this.flowParseFunctionTypeParams();
+ typeNode.params = tmp.params;
+ typeNode.rest = tmp.rest;
+ typeNode.this = tmp._this;
+ this.expect(11);
+ [typeNode.returnType, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
+ typeContainer.typeAnnotation = this.finishNode(typeNode, "FunctionTypeAnnotation");
+ id.typeAnnotation = this.finishNode(typeContainer, "TypeAnnotation");
+ this.resetEndLocation(id);
+ this.semicolon();
+ this.scope.declareName(node.id.name, BIND_FLOW_DECLARE_FN, node.id.loc.start);
+ return this.finishNode(node, "DeclareFunction");
+ }
+
+ flowParseDeclare(node, insideModule) {
+ if (this.match(80)) {
+ return this.flowParseDeclareClass(node);
+ } else if (this.match(68)) {
+ return this.flowParseDeclareFunction(node);
+ } else if (this.match(74)) {
+ return this.flowParseDeclareVariable(node);
+ } else if (this.eatContextual(123)) {
+ if (this.match(16)) {
+ return this.flowParseDeclareModuleExports(node);
+ } else {
+ if (insideModule) {
+ this.raise(FlowErrors.NestedDeclareModule, {
+ at: this.state.lastTokStartLoc
+ });
+ }
+
+ return this.flowParseDeclareModule(node);
+ }
+ } else if (this.isContextual(126)) {
+ return this.flowParseDeclareTypeAlias(node);
+ } else if (this.isContextual(127)) {
+ return this.flowParseDeclareOpaqueType(node);
+ } else if (this.isContextual(125)) {
+ return this.flowParseDeclareInterface(node);
+ } else if (this.match(82)) {
+ return this.flowParseDeclareExportDeclaration(node, insideModule);
+ } else {
+ throw this.unexpected();
+ }
+ }
+
+ flowParseDeclareVariable(node) {
+ this.next();
+ node.id = this.flowParseTypeAnnotatableIdentifier(true);
+ this.scope.declareName(node.id.name, BIND_VAR, node.id.loc.start);
+ this.semicolon();
+ return this.finishNode(node, "DeclareVariable");
+ }
+
+ flowParseDeclareModule(node) {
+ this.scope.enter(SCOPE_OTHER);
+
+ if (this.match(129)) {
+ node.id = this.parseExprAtom();
+ } else {
+ node.id = this.parseIdentifier();
+ }
+
+ const bodyNode = node.body = this.startNode();
+ const body = bodyNode.body = [];
+ this.expect(5);
+
+ while (!this.match(8)) {
+ let bodyNode = this.startNode();
+
+ if (this.match(83)) {
+ this.next();
+
+ if (!this.isContextual(126) && !this.match(87)) {
+ this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, {
+ at: this.state.lastTokStartLoc
+ });
+ }
+
+ this.parseImport(bodyNode);
+ } else {
+ this.expectContextual(121, FlowErrors.UnsupportedStatementInDeclareModule);
+ bodyNode = this.flowParseDeclare(bodyNode, true);
+ }
+
+ body.push(bodyNode);
+ }
+
+ this.scope.exit();
+ this.expect(8);
+ this.finishNode(bodyNode, "BlockStatement");
+ let kind = null;
+ let hasModuleExport = false;
+ body.forEach(bodyElement => {
+ if (isEsModuleType(bodyElement)) {
+ if (kind === "CommonJS") {
+ this.raise(FlowErrors.AmbiguousDeclareModuleKind, {
+ node: bodyElement
+ });
+ }
+
+ kind = "ES";
+ } else if (bodyElement.type === "DeclareModuleExports") {
+ if (hasModuleExport) {
+ this.raise(FlowErrors.DuplicateDeclareModuleExports, {
+ node: bodyElement
+ });
+ }
+
+ if (kind === "ES") {
+ this.raise(FlowErrors.AmbiguousDeclareModuleKind, {
+ node: bodyElement
+ });
+ }
+
+ kind = "CommonJS";
+ hasModuleExport = true;
+ }
+ });
+ node.kind = kind || "CommonJS";
+ return this.finishNode(node, "DeclareModule");
+ }
+
+ flowParseDeclareExportDeclaration(node, insideModule) {
+ this.expect(82);
+
+ if (this.eat(65)) {
+ if (this.match(68) || this.match(80)) {
+ node.declaration = this.flowParseDeclare(this.startNode());
+ } else {
+ node.declaration = this.flowParseType();
+ this.semicolon();
+ }
+
+ node.default = true;
+ return this.finishNode(node, "DeclareExportDeclaration");
+ } else {
+ if (this.match(75) || this.isLet() || (this.isContextual(126) || this.isContextual(125)) && !insideModule) {
+ const label = this.state.value;
+ const suggestion = exportSuggestions[label];
+ throw this.raise(FlowErrors.UnsupportedDeclareExportKind, {
+ at: this.state.startLoc
+ }, label, suggestion);
+ }
+
+ if (this.match(74) || this.match(68) || this.match(80) || this.isContextual(127)) {
+ node.declaration = this.flowParseDeclare(this.startNode());
+ node.default = false;
+ return this.finishNode(node, "DeclareExportDeclaration");
+ } else if (this.match(55) || this.match(5) || this.isContextual(125) || this.isContextual(126) || this.isContextual(127)) {
+ node = this.parseExport(node);
+
+ if (node.type === "ExportNamedDeclaration") {
+ node.type = "ExportDeclaration";
+ node.default = false;
+ delete node.exportKind;
+ }
+
+ node.type = "Declare" + node.type;
+ return node;
+ }
+ }
+
+ throw this.unexpected();
+ }
+
+ flowParseDeclareModuleExports(node) {
+ this.next();
+ this.expectContextual(108);
+ node.typeAnnotation = this.flowParseTypeAnnotation();
+ this.semicolon();
+ return this.finishNode(node, "DeclareModuleExports");
+ }
+
+ flowParseDeclareTypeAlias(node) {
+ this.next();
+ this.flowParseTypeAlias(node);
+ node.type = "DeclareTypeAlias";
+ return node;
+ }
+
+ flowParseDeclareOpaqueType(node) {
+ this.next();
+ this.flowParseOpaqueType(node, true);
+ node.type = "DeclareOpaqueType";
+ return node;
+ }
+
+ flowParseDeclareInterface(node) {
+ this.next();
+ this.flowParseInterfaceish(node);
+ return this.finishNode(node, "DeclareInterface");
+ }
+
+ flowParseInterfaceish(node, isClass = false) {
+ node.id = this.flowParseRestrictedIdentifier(!isClass, true);
+ this.scope.declareName(node.id.name, isClass ? BIND_FUNCTION : BIND_LEXICAL, node.id.loc.start);
+
+ if (this.match(47)) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ node.typeParameters = null;
+ }
+
+ node.extends = [];
+ node.implements = [];
+ node.mixins = [];
+
+ if (this.eat(81)) {
+ do {
+ node.extends.push(this.flowParseInterfaceExtends());
+ } while (!isClass && this.eat(12));
+ }
+
+ if (this.isContextual(114)) {
+ this.next();
+
+ do {
+ node.mixins.push(this.flowParseInterfaceExtends());
+ } while (this.eat(12));
+ }
+
+ if (this.isContextual(110)) {
+ this.next();
+
+ do {
+ node.implements.push(this.flowParseInterfaceExtends());
+ } while (this.eat(12));
+ }
+
+ node.body = this.flowParseObjectType({
+ allowStatic: isClass,
+ allowExact: false,
+ allowSpread: false,
+ allowProto: isClass,
+ allowInexact: false
+ });
+ }
+
+ flowParseInterfaceExtends() {
+ const node = this.startNode();
+ node.id = this.flowParseQualifiedTypeIdentifier();
+
+ if (this.match(47)) {
+ node.typeParameters = this.flowParseTypeParameterInstantiation();
+ } else {
+ node.typeParameters = null;
+ }
+
+ return this.finishNode(node, "InterfaceExtends");
+ }
+
+ flowParseInterface(node) {
+ this.flowParseInterfaceish(node);
+ return this.finishNode(node, "InterfaceDeclaration");
+ }
+
+ checkNotUnderscore(word) {
+ if (word === "_") {
+ this.raise(FlowErrors.UnexpectedReservedUnderscore, {
+ at: this.state.startLoc
+ });
+ }
+ }
+
+ checkReservedType(word, startLoc, declaration) {
+ if (!reservedTypes.has(word)) return;
+ this.raise(declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, {
+ at: startLoc
+ }, word);
+ }
+
+ flowParseRestrictedIdentifier(liberal, declaration) {
+ this.checkReservedType(this.state.value, this.state.startLoc, declaration);
+ return this.parseIdentifier(liberal);
+ }
+
+ flowParseTypeAlias(node) {
+ node.id = this.flowParseRestrictedIdentifier(false, true);
+ this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.loc.start);
+
+ if (this.match(47)) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ node.typeParameters = null;
+ }
+
+ node.right = this.flowParseTypeInitialiser(29);
+ this.semicolon();
+ return this.finishNode(node, "TypeAlias");
+ }
+
+ flowParseOpaqueType(node, declare) {
+ this.expectContextual(126);
+ node.id = this.flowParseRestrictedIdentifier(true, true);
+ this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.loc.start);
+
+ if (this.match(47)) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ } else {
+ node.typeParameters = null;
+ }
+
+ node.supertype = null;
+
+ if (this.match(14)) {
+ node.supertype = this.flowParseTypeInitialiser(14);
+ }
+
+ node.impltype = null;
+
+ if (!declare) {
+ node.impltype = this.flowParseTypeInitialiser(29);
+ }
+
+ this.semicolon();
+ return this.finishNode(node, "OpaqueType");
+ }
+
+ flowParseTypeParameter(requireDefault = false) {
+ const nodeStartLoc = this.state.startLoc;
+ const node = this.startNode();
+ const variance = this.flowParseVariance();
+ const ident = this.flowParseTypeAnnotatableIdentifier();
+ node.name = ident.name;
+ node.variance = variance;
+ node.bound = ident.typeAnnotation;
+
+ if (this.match(29)) {
+ this.eat(29);
+ node.default = this.flowParseType();
+ } else {
+ if (requireDefault) {
+ this.raise(FlowErrors.MissingTypeParamDefault, {
+ at: nodeStartLoc
+ });
+ }
+ }
+
+ return this.finishNode(node, "TypeParameter");
+ }
+
+ flowParseTypeParameterDeclaration() {
+ const oldInType = this.state.inType;
+ const node = this.startNode();
+ node.params = [];
+ this.state.inType = true;
+
+ if (this.match(47) || this.match(138)) {
+ this.next();
+ } else {
+ this.unexpected();
+ }
+
+ let defaultRequired = false;
+
+ do {
+ const typeParameter = this.flowParseTypeParameter(defaultRequired);
+ node.params.push(typeParameter);
+
+ if (typeParameter.default) {
+ defaultRequired = true;
+ }
+
+ if (!this.match(48)) {
+ this.expect(12);
+ }
+ } while (!this.match(48));
+
+ this.expect(48);
+ this.state.inType = oldInType;
+ return this.finishNode(node, "TypeParameterDeclaration");
+ }
+
+ flowParseTypeParameterInstantiation() {
+ const node = this.startNode();
+ const oldInType = this.state.inType;
+ node.params = [];
+ this.state.inType = true;
+ this.expect(47);
+ const oldNoAnonFunctionType = this.state.noAnonFunctionType;
+ this.state.noAnonFunctionType = false;
+
+ while (!this.match(48)) {
+ node.params.push(this.flowParseType());
+
+ if (!this.match(48)) {
+ this.expect(12);
+ }
+ }
+
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+ this.expect(48);
+ this.state.inType = oldInType;
+ return this.finishNode(node, "TypeParameterInstantiation");
+ }
+
+ flowParseTypeParameterInstantiationCallOrNew() {
+ const node = this.startNode();
+ const oldInType = this.state.inType;
+ node.params = [];
+ this.state.inType = true;
+ this.expect(47);
+
+ while (!this.match(48)) {
+ node.params.push(this.flowParseTypeOrImplicitInstantiation());
+
+ if (!this.match(48)) {
+ this.expect(12);
+ }
+ }
+
+ this.expect(48);
+ this.state.inType = oldInType;
+ return this.finishNode(node, "TypeParameterInstantiation");
+ }
+
+ flowParseInterfaceType() {
+ const node = this.startNode();
+ this.expectContextual(125);
+ node.extends = [];
+
+ if (this.eat(81)) {
+ do {
+ node.extends.push(this.flowParseInterfaceExtends());
+ } while (this.eat(12));
+ }
+
+ node.body = this.flowParseObjectType({
+ allowStatic: false,
+ allowExact: false,
+ allowSpread: false,
+ allowProto: false,
+ allowInexact: false
+ });
+ return this.finishNode(node, "InterfaceTypeAnnotation");
+ }
+
+ flowParseObjectPropertyKey() {
+ return this.match(130) || this.match(129) ? this.parseExprAtom() : this.parseIdentifier(true);
+ }
+
+ flowParseObjectTypeIndexer(node, isStatic, variance) {
+ node.static = isStatic;
+
+ if (this.lookahead().type === 14) {
+ node.id = this.flowParseObjectPropertyKey();
+ node.key = this.flowParseTypeInitialiser();
+ } else {
+ node.id = null;
+ node.key = this.flowParseType();
+ }
+
+ this.expect(3);
+ node.value = this.flowParseTypeInitialiser();
+ node.variance = variance;
+ return this.finishNode(node, "ObjectTypeIndexer");
+ }
+
+ flowParseObjectTypeInternalSlot(node, isStatic) {
+ node.static = isStatic;
+ node.id = this.flowParseObjectPropertyKey();
+ this.expect(3);
+ this.expect(3);
+
+ if (this.match(47) || this.match(10)) {
+ node.method = true;
+ node.optional = false;
+ node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
+ } else {
+ node.method = false;
+
+ if (this.eat(17)) {
+ node.optional = true;
+ }
+
+ node.value = this.flowParseTypeInitialiser();
+ }
+
+ return this.finishNode(node, "ObjectTypeInternalSlot");
+ }
+
+ flowParseObjectTypeMethodish(node) {
+ node.params = [];
+ node.rest = null;
+ node.typeParameters = null;
+ node.this = null;
+
+ if (this.match(47)) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+
+ this.expect(10);
+
+ if (this.match(78)) {
+ node.this = this.flowParseFunctionTypeParam(true);
+ node.this.name = null;
+
+ if (!this.match(11)) {
+ this.expect(12);
+ }
+ }
+
+ while (!this.match(11) && !this.match(21)) {
+ node.params.push(this.flowParseFunctionTypeParam(false));
+
+ if (!this.match(11)) {
+ this.expect(12);
+ }
+ }
+
+ if (this.eat(21)) {
+ node.rest = this.flowParseFunctionTypeParam(false);
+ }
+
+ this.expect(11);
+ node.returnType = this.flowParseTypeInitialiser();
+ return this.finishNode(node, "FunctionTypeAnnotation");
+ }
+
+ flowParseObjectTypeCallProperty(node, isStatic) {
+ const valueNode = this.startNode();
+ node.static = isStatic;
+ node.value = this.flowParseObjectTypeMethodish(valueNode);
+ return this.finishNode(node, "ObjectTypeCallProperty");
+ }
+
+ flowParseObjectType({
+ allowStatic,
+ allowExact,
+ allowSpread,
+ allowProto,
+ allowInexact
+ }) {
+ const oldInType = this.state.inType;
+ this.state.inType = true;
+ const nodeStart = this.startNode();
+ nodeStart.callProperties = [];
+ nodeStart.properties = [];
+ nodeStart.indexers = [];
+ nodeStart.internalSlots = [];
+ let endDelim;
+ let exact;
+ let inexact = false;
+
+ if (allowExact && this.match(6)) {
+ this.expect(6);
+ endDelim = 9;
+ exact = true;
+ } else {
+ this.expect(5);
+ endDelim = 8;
+ exact = false;
+ }
+
+ nodeStart.exact = exact;
+
+ while (!this.match(endDelim)) {
+ let isStatic = false;
+ let protoStartLoc = null;
+ let inexactStartLoc = null;
+ const node = this.startNode();
+
+ if (allowProto && this.isContextual(115)) {
+ const lookahead = this.lookahead();
+
+ if (lookahead.type !== 14 && lookahead.type !== 17) {
+ this.next();
+ protoStartLoc = this.state.startLoc;
+ allowStatic = false;
+ }
+ }
+
+ if (allowStatic && this.isContextual(104)) {
+ const lookahead = this.lookahead();
+
+ if (lookahead.type !== 14 && lookahead.type !== 17) {
+ this.next();
+ isStatic = true;
+ }
+ }
+
+ const variance = this.flowParseVariance();
+
+ if (this.eat(0)) {
+ if (protoStartLoc != null) {
+ this.unexpected(protoStartLoc);
+ }
+
+ if (this.eat(0)) {
+ if (variance) {
+ this.unexpected(variance.loc.start);
+ }
+
+ nodeStart.internalSlots.push(this.flowParseObjectTypeInternalSlot(node, isStatic));
+ } else {
+ nodeStart.indexers.push(this.flowParseObjectTypeIndexer(node, isStatic, variance));
+ }
+ } else if (this.match(10) || this.match(47)) {
+ if (protoStartLoc != null) {
+ this.unexpected(protoStartLoc);
+ }
+
+ if (variance) {
+ this.unexpected(variance.loc.start);
+ }
+
+ nodeStart.callProperties.push(this.flowParseObjectTypeCallProperty(node, isStatic));
+ } else {
+ let kind = "init";
+
+ if (this.isContextual(98) || this.isContextual(103)) {
+ const lookahead = this.lookahead();
+
+ if (tokenIsLiteralPropertyName(lookahead.type)) {
+ kind = this.state.value;
+ this.next();
+ }
+ }
+
+ const propOrInexact = this.flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact != null ? allowInexact : !exact);
+
+ if (propOrInexact === null) {
+ inexact = true;
+ inexactStartLoc = this.state.lastTokStartLoc;
+ } else {
+ nodeStart.properties.push(propOrInexact);
+ }
+ }
+
+ this.flowObjectTypeSemicolon();
+
+ if (inexactStartLoc && !this.match(8) && !this.match(9)) {
+ this.raise(FlowErrors.UnexpectedExplicitInexactInObject, {
+ at: inexactStartLoc
+ });
+ }
+ }
+
+ this.expect(endDelim);
+
+ if (allowSpread) {
+ nodeStart.inexact = inexact;
+ }
+
+ const out = this.finishNode(nodeStart, "ObjectTypeAnnotation");
+ this.state.inType = oldInType;
+ return out;
+ }
+
+ flowParseObjectTypeProperty(node, isStatic, protoStartLoc, variance, kind, allowSpread, allowInexact) {
+ if (this.eat(21)) {
+ const isInexactToken = this.match(12) || this.match(13) || this.match(8) || this.match(9);
+
+ if (isInexactToken) {
+ if (!allowSpread) {
+ this.raise(FlowErrors.InexactInsideNonObject, {
+ at: this.state.lastTokStartLoc
+ });
+ } else if (!allowInexact) {
+ this.raise(FlowErrors.InexactInsideExact, {
+ at: this.state.lastTokStartLoc
+ });
+ }
+
+ if (variance) {
+ this.raise(FlowErrors.InexactVariance, {
+ node: variance
+ });
+ }
+
+ return null;
+ }
+
+ if (!allowSpread) {
+ this.raise(FlowErrors.UnexpectedSpreadType, {
+ at: this.state.lastTokStartLoc
+ });
+ }
+
+ if (protoStartLoc != null) {
+ this.unexpected(protoStartLoc);
+ }
+
+ if (variance) {
+ this.raise(FlowErrors.SpreadVariance, {
+ node: variance
+ });
+ }
+
+ node.argument = this.flowParseType();
+ return this.finishNode(node, "ObjectTypeSpreadProperty");
+ } else {
+ node.key = this.flowParseObjectPropertyKey();
+ node.static = isStatic;
+ node.proto = protoStartLoc != null;
+ node.kind = kind;
+ let optional = false;
+
+ if (this.match(47) || this.match(10)) {
+ node.method = true;
+
+ if (protoStartLoc != null) {
+ this.unexpected(protoStartLoc);
+ }
+
+ if (variance) {
+ this.unexpected(variance.loc.start);
+ }
+
+ node.value = this.flowParseObjectTypeMethodish(this.startNodeAt(node.start, node.loc.start));
+
+ if (kind === "get" || kind === "set") {
+ this.flowCheckGetterSetterParams(node);
+ }
+
+ if (!allowSpread && node.key.name === "constructor" && node.value.this) {
+ this.raise(FlowErrors.ThisParamBannedInConstructor, {
+ node: node.value.this
+ });
+ }
+ } else {
+ if (kind !== "init") this.unexpected();
+ node.method = false;
+
+ if (this.eat(17)) {
+ optional = true;
+ }
+
+ node.value = this.flowParseTypeInitialiser();
+ node.variance = variance;
+ }
+
+ node.optional = optional;
+ return this.finishNode(node, "ObjectTypeProperty");
+ }
+ }
+
+ flowCheckGetterSetterParams(property) {
+ const paramCount = property.kind === "get" ? 0 : 1;
+ const length = property.value.params.length + (property.value.rest ? 1 : 0);
+
+ if (property.value.this) {
+ this.raise(property.kind === "get" ? FlowErrors.GetterMayNotHaveThisParam : FlowErrors.SetterMayNotHaveThisParam, {
+ node: property.value.this
+ });
+ }
+
+ if (length !== paramCount) {
+ this.raise(property.kind === "get" ? ErrorMessages.BadGetterArity : ErrorMessages.BadSetterArity, {
+ node: property
+ });
+ }
+
+ if (property.kind === "set" && property.value.rest) {
+ this.raise(ErrorMessages.BadSetterRestParameter, {
+ node: property
+ });
+ }
+ }
+
+ flowObjectTypeSemicolon() {
+ if (!this.eat(13) && !this.eat(12) && !this.match(8) && !this.match(9)) {
+ this.unexpected();
+ }
+ }
+
+ flowParseQualifiedTypeIdentifier(startPos, startLoc, id) {
+ startPos = startPos || this.state.start;
+ startLoc = startLoc || this.state.startLoc;
+ let node = id || this.flowParseRestrictedIdentifier(true);
+
+ while (this.eat(16)) {
+ const node2 = this.startNodeAt(startPos, startLoc);
+ node2.qualification = node;
+ node2.id = this.flowParseRestrictedIdentifier(true);
+ node = this.finishNode(node2, "QualifiedTypeIdentifier");
+ }
+
+ return node;
+ }
+
+ flowParseGenericType(startPos, startLoc, id) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.typeParameters = null;
+ node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);
+
+ if (this.match(47)) {
+ node.typeParameters = this.flowParseTypeParameterInstantiation();
+ }
+
+ return this.finishNode(node, "GenericTypeAnnotation");
+ }
+
+ flowParseTypeofType() {
+ const node = this.startNode();
+ this.expect(87);
+ node.argument = this.flowParsePrimaryType();
+ return this.finishNode(node, "TypeofTypeAnnotation");
+ }
+
+ flowParseTupleType() {
+ const node = this.startNode();
+ node.types = [];
+ this.expect(0);
+
+ while (this.state.pos < this.length && !this.match(3)) {
+ node.types.push(this.flowParseType());
+ if (this.match(3)) break;
+ this.expect(12);
+ }
+
+ this.expect(3);
+ return this.finishNode(node, "TupleTypeAnnotation");
+ }
+
+ flowParseFunctionTypeParam(first) {
+ let name = null;
+ let optional = false;
+ let typeAnnotation = null;
+ const node = this.startNode();
+ const lh = this.lookahead();
+ const isThis = this.state.type === 78;
+
+ if (lh.type === 14 || lh.type === 17) {
+ if (isThis && !first) {
+ this.raise(FlowErrors.ThisParamMustBeFirst, {
+ node
+ });
+ }
+
+ name = this.parseIdentifier(isThis);
+
+ if (this.eat(17)) {
+ optional = true;
+
+ if (isThis) {
+ this.raise(FlowErrors.ThisParamMayNotBeOptional, {
+ node
+ });
+ }
+ }
+
+ typeAnnotation = this.flowParseTypeInitialiser();
+ } else {
+ typeAnnotation = this.flowParseType();
+ }
+
+ node.name = name;
+ node.optional = optional;
+ node.typeAnnotation = typeAnnotation;
+ return this.finishNode(node, "FunctionTypeParam");
+ }
+
+ reinterpretTypeAsFunctionTypeParam(type) {
+ const node = this.startNodeAt(type.start, type.loc.start);
+ node.name = null;
+ node.optional = false;
+ node.typeAnnotation = type;
+ return this.finishNode(node, "FunctionTypeParam");
+ }
+
+ flowParseFunctionTypeParams(params = []) {
+ let rest = null;
+ let _this = null;
+
+ if (this.match(78)) {
+ _this = this.flowParseFunctionTypeParam(true);
+ _this.name = null;
+
+ if (!this.match(11)) {
+ this.expect(12);
+ }
+ }
+
+ while (!this.match(11) && !this.match(21)) {
+ params.push(this.flowParseFunctionTypeParam(false));
+
+ if (!this.match(11)) {
+ this.expect(12);
+ }
+ }
+
+ if (this.eat(21)) {
+ rest = this.flowParseFunctionTypeParam(false);
+ }
+
+ return {
+ params,
+ rest,
+ _this
+ };
+ }
+
+ flowIdentToTypeAnnotation(startPos, startLoc, node, id) {
+ switch (id.name) {
+ case "any":
+ return this.finishNode(node, "AnyTypeAnnotation");
+
+ case "bool":
+ case "boolean":
+ return this.finishNode(node, "BooleanTypeAnnotation");
+
+ case "mixed":
+ return this.finishNode(node, "MixedTypeAnnotation");
+
+ case "empty":
+ return this.finishNode(node, "EmptyTypeAnnotation");
+
+ case "number":
+ return this.finishNode(node, "NumberTypeAnnotation");
+
+ case "string":
+ return this.finishNode(node, "StringTypeAnnotation");
+
+ case "symbol":
+ return this.finishNode(node, "SymbolTypeAnnotation");
+
+ default:
+ this.checkNotUnderscore(id.name);
+ return this.flowParseGenericType(startPos, startLoc, id);
+ }
+ }
+
+ flowParsePrimaryType() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const node = this.startNode();
+ let tmp;
+ let type;
+ let isGroupedType = false;
+ const oldNoAnonFunctionType = this.state.noAnonFunctionType;
+
+ switch (this.state.type) {
+ case 5:
+ return this.flowParseObjectType({
+ allowStatic: false,
+ allowExact: false,
+ allowSpread: true,
+ allowProto: false,
+ allowInexact: true
+ });
+
+ case 6:
+ return this.flowParseObjectType({
+ allowStatic: false,
+ allowExact: true,
+ allowSpread: true,
+ allowProto: false,
+ allowInexact: false
+ });
+
+ case 0:
+ this.state.noAnonFunctionType = false;
+ type = this.flowParseTupleType();
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+ return type;
+
+ case 47:
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ this.expect(10);
+ tmp = this.flowParseFunctionTypeParams();
+ node.params = tmp.params;
+ node.rest = tmp.rest;
+ node.this = tmp._this;
+ this.expect(11);
+ this.expect(19);
+ node.returnType = this.flowParseType();
+ return this.finishNode(node, "FunctionTypeAnnotation");
+
+ case 10:
+ this.next();
+
+ if (!this.match(11) && !this.match(21)) {
+ if (tokenIsIdentifier(this.state.type) || this.match(78)) {
+ const token = this.lookahead().type;
+ isGroupedType = token !== 17 && token !== 14;
+ } else {
+ isGroupedType = true;
+ }
+ }
+
+ if (isGroupedType) {
+ this.state.noAnonFunctionType = false;
+ type = this.flowParseType();
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+
+ if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) {
+ this.expect(11);
+ return type;
+ } else {
+ this.eat(12);
+ }
+ }
+
+ if (type) {
+ tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]);
+ } else {
+ tmp = this.flowParseFunctionTypeParams();
+ }
+
+ node.params = tmp.params;
+ node.rest = tmp.rest;
+ node.this = tmp._this;
+ this.expect(11);
+ this.expect(19);
+ node.returnType = this.flowParseType();
+ node.typeParameters = null;
+ return this.finishNode(node, "FunctionTypeAnnotation");
+
+ case 129:
+ return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation");
+
+ case 85:
+ case 86:
+ node.value = this.match(85);
+ this.next();
+ return this.finishNode(node, "BooleanLiteralTypeAnnotation");
+
+ case 53:
+ if (this.state.value === "-") {
+ this.next();
+
+ if (this.match(130)) {
+ return this.parseLiteralAtNode(-this.state.value, "NumberLiteralTypeAnnotation", node);
+ }
+
+ if (this.match(131)) {
+ return this.parseLiteralAtNode(-this.state.value, "BigIntLiteralTypeAnnotation", node);
+ }
+
+ throw this.raise(FlowErrors.UnexpectedSubtractionOperand, {
+ at: this.state.startLoc
+ });
+ }
+
+ throw this.unexpected();
+
+ case 130:
+ return this.parseLiteral(this.state.value, "NumberLiteralTypeAnnotation");
+
+ case 131:
+ return this.parseLiteral(this.state.value, "BigIntLiteralTypeAnnotation");
+
+ case 88:
+ this.next();
+ return this.finishNode(node, "VoidTypeAnnotation");
+
+ case 84:
+ this.next();
+ return this.finishNode(node, "NullLiteralTypeAnnotation");
+
+ case 78:
+ this.next();
+ return this.finishNode(node, "ThisTypeAnnotation");
+
+ case 55:
+ this.next();
+ return this.finishNode(node, "ExistsTypeAnnotation");
+
+ case 87:
+ return this.flowParseTypeofType();
+
+ default:
+ if (tokenIsKeyword(this.state.type)) {
+ const label = tokenLabelName(this.state.type);
+ this.next();
+ return super.createIdentifier(node, label);
+ } else if (tokenIsIdentifier(this.state.type)) {
+ if (this.isContextual(125)) {
+ return this.flowParseInterfaceType();
+ }
+
+ return this.flowIdentToTypeAnnotation(startPos, startLoc, node, this.parseIdentifier());
+ }
+
+ }
+
+ throw this.unexpected();
+ }
+
+ flowParsePostfixType() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let type = this.flowParsePrimaryType();
+ let seenOptionalIndexedAccess = false;
+
+ while ((this.match(0) || this.match(18)) && !this.canInsertSemicolon()) {
+ const node = this.startNodeAt(startPos, startLoc);
+ const optional = this.eat(18);
+ seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;
+ this.expect(0);
+
+ if (!optional && this.match(3)) {
+ node.elementType = type;
+ this.next();
+ type = this.finishNode(node, "ArrayTypeAnnotation");
+ } else {
+ node.objectType = type;
+ node.indexType = this.flowParseType();
+ this.expect(3);
+
+ if (seenOptionalIndexedAccess) {
+ node.optional = optional;
+ type = this.finishNode(node, "OptionalIndexedAccessType");
+ } else {
+ type = this.finishNode(node, "IndexedAccessType");
+ }
+ }
+ }
+
+ return type;
+ }
+
+ flowParsePrefixType() {
+ const node = this.startNode();
+
+ if (this.eat(17)) {
+ node.typeAnnotation = this.flowParsePrefixType();
+ return this.finishNode(node, "NullableTypeAnnotation");
+ } else {
+ return this.flowParsePostfixType();
+ }
+ }
+
+ flowParseAnonFunctionWithoutParens() {
+ const param = this.flowParsePrefixType();
+
+ if (!this.state.noAnonFunctionType && this.eat(19)) {
+ const node = this.startNodeAt(param.start, param.loc.start);
+ node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];
+ node.rest = null;
+ node.this = null;
+ node.returnType = this.flowParseType();
+ node.typeParameters = null;
+ return this.finishNode(node, "FunctionTypeAnnotation");
+ }
+
+ return param;
+ }
+
+ flowParseIntersectionType() {
+ const node = this.startNode();
+ this.eat(45);
+ const type = this.flowParseAnonFunctionWithoutParens();
+ node.types = [type];
+
+ while (this.eat(45)) {
+ node.types.push(this.flowParseAnonFunctionWithoutParens());
+ }
+
+ return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
+ }
+
+ flowParseUnionType() {
+ const node = this.startNode();
+ this.eat(43);
+ const type = this.flowParseIntersectionType();
+ node.types = [type];
+
+ while (this.eat(43)) {
+ node.types.push(this.flowParseIntersectionType());
+ }
+
+ return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
+ }
+
+ flowParseType() {
+ const oldInType = this.state.inType;
+ this.state.inType = true;
+ const type = this.flowParseUnionType();
+ this.state.inType = oldInType;
+ return type;
+ }
+
+ flowParseTypeOrImplicitInstantiation() {
+ if (this.state.type === 128 && this.state.value === "_") {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const node = this.parseIdentifier();
+ return this.flowParseGenericType(startPos, startLoc, node);
+ } else {
+ return this.flowParseType();
+ }
+ }
+
+ flowParseTypeAnnotation() {
+ const node = this.startNode();
+ node.typeAnnotation = this.flowParseTypeInitialiser();
+ return this.finishNode(node, "TypeAnnotation");
+ }
+
+ flowParseTypeAnnotatableIdentifier(allowPrimitiveOverride) {
+ const ident = allowPrimitiveOverride ? this.parseIdentifier() : this.flowParseRestrictedIdentifier();
+
+ if (this.match(14)) {
+ ident.typeAnnotation = this.flowParseTypeAnnotation();
+ this.resetEndLocation(ident);
+ }
+
+ return ident;
+ }
+
+ typeCastToParameter(node) {
+ node.expression.typeAnnotation = node.typeAnnotation;
+ this.resetEndLocation(node.expression, node.typeAnnotation.loc.end);
+ return node.expression;
+ }
+
+ flowParseVariance() {
+ let variance = null;
+
+ if (this.match(53)) {
+ variance = this.startNode();
+
+ if (this.state.value === "+") {
+ variance.kind = "plus";
+ } else {
+ variance.kind = "minus";
+ }
+
+ this.next();
+ this.finishNode(variance, "Variance");
+ }
+
+ return variance;
+ }
+
+ parseFunctionBody(node, allowExpressionBody, isMethod = false) {
+ if (allowExpressionBody) {
+ return this.forwardNoArrowParamsConversionAt(node, () => super.parseFunctionBody(node, true, isMethod));
+ }
+
+ return super.parseFunctionBody(node, false, isMethod);
+ }
+
+ parseFunctionBodyAndFinish(node, type, isMethod = false) {
+ if (this.match(14)) {
+ const typeNode = this.startNode();
+ [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
+ node.returnType = typeNode.typeAnnotation ? this.finishNode(typeNode, "TypeAnnotation") : null;
+ }
+
+ super.parseFunctionBodyAndFinish(node, type, isMethod);
+ }
+
+ parseStatement(context, topLevel) {
+ if (this.state.strict && this.isContextual(125)) {
+ const lookahead = this.lookahead();
+
+ if (tokenIsKeywordOrIdentifier(lookahead.type)) {
+ const node = this.startNode();
+ this.next();
+ return this.flowParseInterface(node);
+ }
+ } else if (this.shouldParseEnums() && this.isContextual(122)) {
+ const node = this.startNode();
+ this.next();
+ return this.flowParseEnumDeclaration(node);
+ }
+
+ const stmt = super.parseStatement(context, topLevel);
+
+ if (this.flowPragma === undefined && !this.isValidDirective(stmt)) {
+ this.flowPragma = null;
+ }
+
+ return stmt;
+ }
+
+ parseExpressionStatement(node, expr) {
+ if (expr.type === "Identifier") {
+ if (expr.name === "declare") {
+ if (this.match(80) || tokenIsIdentifier(this.state.type) || this.match(68) || this.match(74) || this.match(82)) {
+ return this.flowParseDeclare(node);
+ }
+ } else if (tokenIsIdentifier(this.state.type)) {
+ if (expr.name === "interface") {
+ return this.flowParseInterface(node);
+ } else if (expr.name === "type") {
+ return this.flowParseTypeAlias(node);
+ } else if (expr.name === "opaque") {
+ return this.flowParseOpaqueType(node, false);
+ }
+ }
+ }
+
+ return super.parseExpressionStatement(node, expr);
+ }
+
+ shouldParseExportDeclaration() {
+ const {
+ type
+ } = this.state;
+
+ if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 122) {
+ return !this.state.containsEsc;
+ }
+
+ return super.shouldParseExportDeclaration();
+ }
+
+ isExportDefaultSpecifier() {
+ const {
+ type
+ } = this.state;
+
+ if (tokenIsFlowInterfaceOrTypeOrOpaque(type) || this.shouldParseEnums() && type === 122) {
+ return this.state.containsEsc;
+ }
+
+ return super.isExportDefaultSpecifier();
+ }
+
+ parseExportDefaultExpression() {
+ if (this.shouldParseEnums() && this.isContextual(122)) {
+ const node = this.startNode();
+ this.next();
+ return this.flowParseEnumDeclaration(node);
+ }
+
+ return super.parseExportDefaultExpression();
+ }
+
+ parseConditional(expr, startPos, startLoc, refExpressionErrors) {
+ if (!this.match(17)) return expr;
+
+ if (this.state.maybeInArrowParameters) {
+ const nextCh = this.lookaheadCharCode();
+
+ if (nextCh === 44 || nextCh === 61 || nextCh === 58 || nextCh === 41) {
+ this.setOptionalParametersError(refExpressionErrors);
+ return expr;
+ }
+ }
+
+ this.expect(17);
+ const state = this.state.clone();
+ const originalNoArrowAt = this.state.noArrowAt;
+ const node = this.startNodeAt(startPos, startLoc);
+ let {
+ consequent,
+ failed
+ } = this.tryParseConditionalConsequent();
+ let [valid, invalid] = this.getArrowLikeExpressions(consequent);
+
+ if (failed || invalid.length > 0) {
+ const noArrowAt = [...originalNoArrowAt];
+
+ if (invalid.length > 0) {
+ this.state = state;
+ this.state.noArrowAt = noArrowAt;
+
+ for (let i = 0; i < invalid.length; i++) {
+ noArrowAt.push(invalid[i].start);
+ }
+
+ ({
+ consequent,
+ failed
+ } = this.tryParseConditionalConsequent());
+ [valid, invalid] = this.getArrowLikeExpressions(consequent);
+ }
+
+ if (failed && valid.length > 1) {
+ this.raise(FlowErrors.AmbiguousConditionalArrow, {
+ at: state.startLoc
+ });
+ }
+
+ if (failed && valid.length === 1) {
+ this.state = state;
+ noArrowAt.push(valid[0].start);
+ this.state.noArrowAt = noArrowAt;
+ ({
+ consequent,
+ failed
+ } = this.tryParseConditionalConsequent());
+ }
+ }
+
+ this.getArrowLikeExpressions(consequent, true);
+ this.state.noArrowAt = originalNoArrowAt;
+ this.expect(14);
+ node.test = expr;
+ node.consequent = consequent;
+ node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(undefined, undefined));
+ return this.finishNode(node, "ConditionalExpression");
+ }
+
+ tryParseConditionalConsequent() {
+ this.state.noArrowParamsConversionAt.push(this.state.start);
+ const consequent = this.parseMaybeAssignAllowIn();
+ const failed = !this.match(14);
+ this.state.noArrowParamsConversionAt.pop();
+ return {
+ consequent,
+ failed
+ };
+ }
+
+ getArrowLikeExpressions(node, disallowInvalid) {
+ const stack = [node];
+ const arrows = [];
+
+ while (stack.length !== 0) {
+ const node = stack.pop();
+
+ if (node.type === "ArrowFunctionExpression") {
+ if (node.typeParameters || !node.returnType) {
+ this.finishArrowValidation(node);
+ } else {
+ arrows.push(node);
+ }
+
+ stack.push(node.body);
+ } else if (node.type === "ConditionalExpression") {
+ stack.push(node.consequent);
+ stack.push(node.alternate);
+ }
+ }
+
+ if (disallowInvalid) {
+ arrows.forEach(node => this.finishArrowValidation(node));
+ return [arrows, []];
+ }
+
+ return partition(arrows, node => node.params.every(param => this.isAssignable(param, true)));
+ }
+
+ finishArrowValidation(node) {
+ var _node$extra;
+
+ this.toAssignableList(node.params, (_node$extra = node.extra) == null ? void 0 : _node$extra.trailingCommaLoc, false);
+ this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);
+ super.checkParams(node, false, true);
+ this.scope.exit();
+ }
+
+ forwardNoArrowParamsConversionAt(node, parse) {
+ let result;
+
+ if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
+ this.state.noArrowParamsConversionAt.push(this.state.start);
+ result = parse();
+ this.state.noArrowParamsConversionAt.pop();
+ } else {
+ result = parse();
+ }
+
+ return result;
+ }
+
+ parseParenItem(node, startPos, startLoc) {
+ node = super.parseParenItem(node, startPos, startLoc);
+
+ if (this.eat(17)) {
+ node.optional = true;
+ this.resetEndLocation(node);
+ }
+
+ if (this.match(14)) {
+ const typeCastNode = this.startNodeAt(startPos, startLoc);
+ typeCastNode.expression = node;
+ typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();
+ return this.finishNode(typeCastNode, "TypeCastExpression");
+ }
+
+ return node;
+ }
+
+ assertModuleNodeAllowed(node) {
+ if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") {
+ return;
+ }
+
+ super.assertModuleNodeAllowed(node);
+ }
+
+ parseExport(node) {
+ const decl = super.parseExport(node);
+
+ if (decl.type === "ExportNamedDeclaration" || decl.type === "ExportAllDeclaration") {
+ decl.exportKind = decl.exportKind || "value";
+ }
+
+ return decl;
+ }
+
+ parseExportDeclaration(node) {
+ if (this.isContextual(126)) {
+ node.exportKind = "type";
+ const declarationNode = this.startNode();
+ this.next();
+
+ if (this.match(5)) {
+ node.specifiers = this.parseExportSpecifiers(true);
+ this.parseExportFrom(node);
+ return null;
+ } else {
+ return this.flowParseTypeAlias(declarationNode);
+ }
+ } else if (this.isContextual(127)) {
+ node.exportKind = "type";
+ const declarationNode = this.startNode();
+ this.next();
+ return this.flowParseOpaqueType(declarationNode, false);
+ } else if (this.isContextual(125)) {
+ node.exportKind = "type";
+ const declarationNode = this.startNode();
+ this.next();
+ return this.flowParseInterface(declarationNode);
+ } else if (this.shouldParseEnums() && this.isContextual(122)) {
+ node.exportKind = "value";
+ const declarationNode = this.startNode();
+ this.next();
+ return this.flowParseEnumDeclaration(declarationNode);
+ } else {
+ return super.parseExportDeclaration(node);
+ }
+ }
+
+ eatExportStar(node) {
+ if (super.eatExportStar(...arguments)) return true;
+
+ if (this.isContextual(126) && this.lookahead().type === 55) {
+ node.exportKind = "type";
+ this.next();
+ this.next();
+ return true;
+ }
+
+ return false;
+ }
+
+ maybeParseExportNamespaceSpecifier(node) {
+ const {
+ startLoc
+ } = this.state;
+ const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);
+
+ if (hasNamespace && node.exportKind === "type") {
+ this.unexpected(startLoc);
+ }
+
+ return hasNamespace;
+ }
+
+ parseClassId(node, isStatement, optionalId) {
+ super.parseClassId(node, isStatement, optionalId);
+
+ if (this.match(47)) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+ }
+
+ parseClassMember(classBody, member, state) {
+ const {
+ startLoc
+ } = this.state;
+
+ if (this.isContextual(121)) {
+ if (this.parseClassMemberFromModifier(classBody, member)) {
+ return;
+ }
+
+ member.declare = true;
+ }
+
+ super.parseClassMember(classBody, member, state);
+
+ if (member.declare) {
+ if (member.type !== "ClassProperty" && member.type !== "ClassPrivateProperty" && member.type !== "PropertyDefinition") {
+ this.raise(FlowErrors.DeclareClassElement, {
+ at: startLoc
+ });
+ } else if (member.value) {
+ this.raise(FlowErrors.DeclareClassFieldInitializer, {
+ node: member.value
+ });
+ }
+ }
+ }
+
+ isIterator(word) {
+ return word === "iterator" || word === "asyncIterator";
+ }
+
+ readIterator() {
+ const word = super.readWord1();
+ const fullWord = "@@" + word;
+
+ if (!this.isIterator(word) || !this.state.inType) {
+ this.raise(ErrorMessages.InvalidIdentifier, {
+ at: this.state.curPosition()
+ }, fullWord);
+ }
+
+ this.finishToken(128, fullWord);
+ }
+
+ getTokenFromCode(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (code === 123 && next === 124) {
+ return this.finishOp(6, 2);
+ } else if (this.state.inType && (code === 62 || code === 60)) {
+ return this.finishOp(code === 62 ? 48 : 47, 1);
+ } else if (this.state.inType && code === 63) {
+ if (next === 46) {
+ return this.finishOp(18, 2);
+ }
+
+ return this.finishOp(17, 1);
+ } else if (isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))) {
+ this.state.pos += 2;
+ return this.readIterator();
+ } else {
+ return super.getTokenFromCode(code);
+ }
+ }
+
+ isAssignable(node, isBinding) {
+ if (node.type === "TypeCastExpression") {
+ return this.isAssignable(node.expression, isBinding);
+ } else {
+ return super.isAssignable(node, isBinding);
+ }
+ }
+
+ toAssignable(node, isLHS = false) {
+ if (node.type === "TypeCastExpression") {
+ return super.toAssignable(this.typeCastToParameter(node), isLHS);
+ } else {
+ return super.toAssignable(node, isLHS);
+ }
+ }
+
+ toAssignableList(exprList, trailingCommaLoc, isLHS) {
+ for (let i = 0; i < exprList.length; i++) {
+ const expr = exprList[i];
+
+ if ((expr == null ? void 0 : expr.type) === "TypeCastExpression") {
+ exprList[i] = this.typeCastToParameter(expr);
+ }
+ }
+
+ return super.toAssignableList(exprList, trailingCommaLoc, isLHS);
+ }
+
+ toReferencedList(exprList, isParenthesizedExpr) {
+ for (let i = 0; i < exprList.length; i++) {
+ var _expr$extra;
+
+ const expr = exprList[i];
+
+ if (expr && expr.type === "TypeCastExpression" && !((_expr$extra = expr.extra) != null && _expr$extra.parenthesized) && (exprList.length > 1 || !isParenthesizedExpr)) {
+ this.raise(FlowErrors.TypeCastInPattern, {
+ node: expr.typeAnnotation
+ });
+ }
+ }
+
+ return exprList;
+ }
+
+ parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
+ const node = super.parseArrayLike(close, canBePattern, isTuple, refExpressionErrors);
+
+ if (canBePattern && !this.state.maybeInArrowParameters) {
+ this.toReferencedList(node.elements);
+ }
+
+ return node;
+ }
+
+ checkLVal(expr, ...args) {
+ if (expr.type !== "TypeCastExpression") {
+ return super.checkLVal(expr, ...args);
+ }
+ }
+
+ parseClassProperty(node) {
+ if (this.match(14)) {
+ node.typeAnnotation = this.flowParseTypeAnnotation();
+ }
+
+ return super.parseClassProperty(node);
+ }
+
+ parseClassPrivateProperty(node) {
+ if (this.match(14)) {
+ node.typeAnnotation = this.flowParseTypeAnnotation();
+ }
+
+ return super.parseClassPrivateProperty(node);
+ }
+
+ isClassMethod() {
+ return this.match(47) || super.isClassMethod();
+ }
+
+ isClassProperty() {
+ return this.match(14) || super.isClassProperty();
+ }
+
+ isNonstaticConstructor(method) {
+ return !this.match(14) && super.isNonstaticConstructor(method);
+ }
+
+ pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
+ if (method.variance) {
+ this.unexpected(method.variance.loc.start);
+ }
+
+ delete method.variance;
+
+ if (this.match(47)) {
+ method.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+
+ super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
+
+ if (method.params && isConstructor) {
+ const params = method.params;
+
+ if (params.length > 0 && this.isThisParam(params[0])) {
+ this.raise(FlowErrors.ThisParamBannedInConstructor, {
+ node: method
+ });
+ }
+ } else if (method.type === "MethodDefinition" && isConstructor && method.value.params) {
+ const params = method.value.params;
+
+ if (params.length > 0 && this.isThisParam(params[0])) {
+ this.raise(FlowErrors.ThisParamBannedInConstructor, {
+ node: method
+ });
+ }
+ }
+ }
+
+ pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
+ if (method.variance) {
+ this.unexpected(method.variance.loc.start);
+ }
+
+ delete method.variance;
+
+ if (this.match(47)) {
+ method.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+
+ super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
+ }
+
+ parseClassSuper(node) {
+ super.parseClassSuper(node);
+
+ if (node.superClass && this.match(47)) {
+ node.superTypeParameters = this.flowParseTypeParameterInstantiation();
+ }
+
+ if (this.isContextual(110)) {
+ this.next();
+ const implemented = node.implements = [];
+
+ do {
+ const node = this.startNode();
+ node.id = this.flowParseRestrictedIdentifier(true);
+
+ if (this.match(47)) {
+ node.typeParameters = this.flowParseTypeParameterInstantiation();
+ } else {
+ node.typeParameters = null;
+ }
+
+ implemented.push(this.finishNode(node, "ClassImplements"));
+ } while (this.eat(12));
+ }
+ }
+
+ checkGetterSetterParams(method) {
+ super.checkGetterSetterParams(method);
+ const params = this.getObjectOrClassMethodParams(method);
+
+ if (params.length > 0) {
+ const param = params[0];
+
+ if (this.isThisParam(param) && method.kind === "get") {
+ this.raise(FlowErrors.GetterMayNotHaveThisParam, {
+ node: param
+ });
+ } else if (this.isThisParam(param)) {
+ this.raise(FlowErrors.SetterMayNotHaveThisParam, {
+ node: param
+ });
+ }
+ }
+ }
+
+ parsePropertyNamePrefixOperator(node) {
+ node.variance = this.flowParseVariance();
+ }
+
+ parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
+ if (prop.variance) {
+ this.unexpected(prop.variance.loc.start);
+ }
+
+ delete prop.variance;
+ let typeParameters;
+
+ if (this.match(47) && !isAccessor) {
+ typeParameters = this.flowParseTypeParameterDeclaration();
+ if (!this.match(10)) this.unexpected();
+ }
+
+ super.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors);
+
+ if (typeParameters) {
+ (prop.value || prop).typeParameters = typeParameters;
+ }
+ }
+
+ parseAssignableListItemTypes(param) {
+ if (this.eat(17)) {
+ if (param.type !== "Identifier") {
+ this.raise(FlowErrors.PatternIsOptional, {
+ node: param
+ });
+ }
+
+ if (this.isThisParam(param)) {
+ this.raise(FlowErrors.ThisParamMayNotBeOptional, {
+ node: param
+ });
+ }
+
+ param.optional = true;
+ }
+
+ if (this.match(14)) {
+ param.typeAnnotation = this.flowParseTypeAnnotation();
+ } else if (this.isThisParam(param)) {
+ this.raise(FlowErrors.ThisParamAnnotationRequired, {
+ node: param
+ });
+ }
+
+ if (this.match(29) && this.isThisParam(param)) {
+ this.raise(FlowErrors.ThisParamNoDefault, {
+ node: param
+ });
+ }
+
+ this.resetEndLocation(param);
+ return param;
+ }
+
+ parseMaybeDefault(startPos, startLoc, left) {
+ const node = super.parseMaybeDefault(startPos, startLoc, left);
+
+ if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
+ this.raise(FlowErrors.TypeBeforeInitializer, {
+ node: node.typeAnnotation
+ });
+ }
+
+ return node;
+ }
+
+ shouldParseDefaultImport(node) {
+ if (!hasTypeImportKind(node)) {
+ return super.shouldParseDefaultImport(node);
+ }
+
+ return isMaybeDefaultImport(this.state.type);
+ }
+
+ parseImportSpecifierLocal(node, specifier, type, contextDescription) {
+ specifier.local = hasTypeImportKind(node) ? this.flowParseRestrictedIdentifier(true, true) : this.parseIdentifier();
+ this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL);
+ node.specifiers.push(this.finishNode(specifier, type));
+ }
+
+ maybeParseDefaultImportSpecifier(node) {
+ node.importKind = "value";
+ let kind = null;
+
+ if (this.match(87)) {
+ kind = "typeof";
+ } else if (this.isContextual(126)) {
+ kind = "type";
+ }
+
+ if (kind) {
+ const lh = this.lookahead();
+ const {
+ type
+ } = lh;
+
+ if (kind === "type" && type === 55) {
+ this.unexpected(null, lh.type);
+ }
+
+ if (isMaybeDefaultImport(type) || type === 5 || type === 55) {
+ this.next();
+ node.importKind = kind;
+ }
+ }
+
+ return super.maybeParseDefaultImportSpecifier(node);
+ }
+
+ parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly) {
+ const firstIdent = specifier.imported;
+ let specifierTypeKind = null;
+
+ if (firstIdent.type === "Identifier") {
+ if (firstIdent.name === "type") {
+ specifierTypeKind = "type";
+ } else if (firstIdent.name === "typeof") {
+ specifierTypeKind = "typeof";
+ }
+ }
+
+ let isBinding = false;
+
+ if (this.isContextual(93) && !this.isLookaheadContextual("as")) {
+ const as_ident = this.parseIdentifier(true);
+
+ if (specifierTypeKind !== null && !tokenIsKeywordOrIdentifier(this.state.type)) {
+ specifier.imported = as_ident;
+ specifier.importKind = specifierTypeKind;
+ specifier.local = cloneIdentifier(as_ident);
+ } else {
+ specifier.imported = firstIdent;
+ specifier.importKind = null;
+ specifier.local = this.parseIdentifier();
+ }
+ } else {
+ if (specifierTypeKind !== null && tokenIsKeywordOrIdentifier(this.state.type)) {
+ specifier.imported = this.parseIdentifier(true);
+ specifier.importKind = specifierTypeKind;
+ } else {
+ if (importedIsString) {
+ throw this.raise(ErrorMessages.ImportBindingIsString, {
+ node: specifier
+ }, firstIdent.value);
+ }
+
+ specifier.imported = firstIdent;
+ specifier.importKind = null;
+ }
+
+ if (this.eatContextual(93)) {
+ specifier.local = this.parseIdentifier();
+ } else {
+ isBinding = true;
+ specifier.local = cloneIdentifier(specifier.imported);
+ }
+ }
+
+ const specifierIsTypeImport = hasTypeImportKind(specifier);
+
+ if (isInTypeOnlyImport && specifierIsTypeImport) {
+ this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, {
+ node: specifier
+ });
+ }
+
+ if (isInTypeOnlyImport || specifierIsTypeImport) {
+ this.checkReservedType(specifier.local.name, specifier.local.loc.start, true);
+ }
+
+ if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) {
+ this.checkReservedWord(specifier.local.name, specifier.loc.start, true, true);
+ }
+
+ this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL);
+ return this.finishNode(specifier, "ImportSpecifier");
+ }
+
+ parseBindingAtom() {
+ switch (this.state.type) {
+ case 78:
+ return this.parseIdentifier(true);
+
+ default:
+ return super.parseBindingAtom();
+ }
+ }
+
+ parseFunctionParams(node, allowModifiers) {
+ const kind = node.kind;
+
+ if (kind !== "get" && kind !== "set" && this.match(47)) {
+ node.typeParameters = this.flowParseTypeParameterDeclaration();
+ }
+
+ super.parseFunctionParams(node, allowModifiers);
+ }
+
+ parseVarId(decl, kind) {
+ super.parseVarId(decl, kind);
+
+ if (this.match(14)) {
+ decl.id.typeAnnotation = this.flowParseTypeAnnotation();
+ this.resetEndLocation(decl.id);
+ }
+ }
+
+ parseAsyncArrowFromCallExpression(node, call) {
+ if (this.match(14)) {
+ const oldNoAnonFunctionType = this.state.noAnonFunctionType;
+ this.state.noAnonFunctionType = true;
+ node.returnType = this.flowParseTypeAnnotation();
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+ }
+
+ return super.parseAsyncArrowFromCallExpression(node, call);
+ }
+
+ shouldParseAsyncArrow() {
+ return this.match(14) || super.shouldParseAsyncArrow();
+ }
+
+ parseMaybeAssign(refExpressionErrors, afterLeftParse) {
+ var _jsx;
+
+ let state = null;
+ let jsx;
+
+ if (this.hasPlugin("jsx") && (this.match(138) || this.match(47))) {
+ state = this.state.clone();
+ jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, afterLeftParse), state);
+ if (!jsx.error) return jsx.node;
+ const {
+ context
+ } = this.state;
+ const currentContext = context[context.length - 1];
+
+ if (currentContext === types.j_oTag || currentContext === types.j_expr) {
+ context.pop();
+ }
+ }
+
+ if ((_jsx = jsx) != null && _jsx.error || this.match(47)) {
+ var _jsx2, _jsx3;
+
+ state = state || this.state.clone();
+ let typeParameters;
+ const arrow = this.tryParse(abort => {
+ var _arrowExpression$extr;
+
+ typeParameters = this.flowParseTypeParameterDeclaration();
+ const arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => {
+ const result = super.parseMaybeAssign(refExpressionErrors, afterLeftParse);
+ this.resetStartLocationFromNode(result, typeParameters);
+ return result;
+ });
+ if ((_arrowExpression$extr = arrowExpression.extra) != null && _arrowExpression$extr.parenthesized) abort();
+ const expr = this.maybeUnwrapTypeCastExpression(arrowExpression);
+ if (expr.type !== "ArrowFunctionExpression") abort();
+ expr.typeParameters = typeParameters;
+ this.resetStartLocationFromNode(expr, typeParameters);
+ return arrowExpression;
+ }, state);
+ let arrowExpression = null;
+
+ if (arrow.node && this.maybeUnwrapTypeCastExpression(arrow.node).type === "ArrowFunctionExpression") {
+ if (!arrow.error && !arrow.aborted) {
+ if (arrow.node.async) {
+ this.raise(FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction, {
+ node: typeParameters
+ });
+ }
+
+ return arrow.node;
+ }
+
+ arrowExpression = arrow.node;
+ }
+
+ if ((_jsx2 = jsx) != null && _jsx2.node) {
+ this.state = jsx.failState;
+ return jsx.node;
+ }
+
+ if (arrowExpression) {
+ this.state = arrow.failState;
+ return arrowExpression;
+ }
+
+ if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error;
+ if (arrow.thrown) throw arrow.error;
+ throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, {
+ node: typeParameters
+ });
+ }
+
+ return super.parseMaybeAssign(refExpressionErrors, afterLeftParse);
+ }
+
+ parseArrow(node) {
+ if (this.match(14)) {
+ const result = this.tryParse(() => {
+ const oldNoAnonFunctionType = this.state.noAnonFunctionType;
+ this.state.noAnonFunctionType = true;
+ const typeNode = this.startNode();
+ [typeNode.typeAnnotation, node.predicate] = this.flowParseTypeAndPredicateInitialiser();
+ this.state.noAnonFunctionType = oldNoAnonFunctionType;
+ if (this.canInsertSemicolon()) this.unexpected();
+ if (!this.match(19)) this.unexpected();
+ return typeNode;
+ });
+ if (result.thrown) return null;
+ if (result.error) this.state = result.failState;
+ node.returnType = result.node.typeAnnotation ? this.finishNode(result.node, "TypeAnnotation") : null;
+ }
+
+ return super.parseArrow(node);
+ }
+
+ shouldParseArrow(params) {
+ return this.match(14) || super.shouldParseArrow(params);
+ }
+
+ setArrowFunctionParameters(node, params) {
+ if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
+ node.params = params;
+ } else {
+ super.setArrowFunctionParameters(node, params);
+ }
+ }
+
+ checkParams(node, allowDuplicates, isArrowFunction) {
+ if (isArrowFunction && this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {
+ return;
+ }
+
+ for (let i = 0; i < node.params.length; i++) {
+ if (this.isThisParam(node.params[i]) && i > 0) {
+ this.raise(FlowErrors.ThisParamMustBeFirst, {
+ node: node.params[i]
+ });
+ }
+ }
+
+ return super.checkParams(...arguments);
+ }
+
+ parseParenAndDistinguishExpression(canBeArrow) {
+ return super.parseParenAndDistinguishExpression(canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1);
+ }
+
+ parseSubscripts(base, startPos, startLoc, noCalls) {
+ if (base.type === "Identifier" && base.name === "async" && this.state.noArrowAt.indexOf(startPos) !== -1) {
+ this.next();
+ const node = this.startNodeAt(startPos, startLoc);
+ node.callee = base;
+ node.arguments = this.parseCallExpressionArguments(11, false);
+ base = this.finishNode(node, "CallExpression");
+ } else if (base.type === "Identifier" && base.name === "async" && this.match(47)) {
+ const state = this.state.clone();
+ const arrow = this.tryParse(abort => this.parseAsyncArrowWithTypeParameters(startPos, startLoc) || abort(), state);
+ if (!arrow.error && !arrow.aborted) return arrow.node;
+ const result = this.tryParse(() => super.parseSubscripts(base, startPos, startLoc, noCalls), state);
+ if (result.node && !result.error) return result.node;
+
+ if (arrow.node) {
+ this.state = arrow.failState;
+ return arrow.node;
+ }
+
+ if (result.node) {
+ this.state = result.failState;
+ return result.node;
+ }
+
+ throw arrow.error || result.error;
+ }
+
+ return super.parseSubscripts(base, startPos, startLoc, noCalls);
+ }
+
+ parseSubscript(base, startPos, startLoc, noCalls, subscriptState) {
+ if (this.match(18) && this.isLookaheadToken_lt()) {
+ subscriptState.optionalChainMember = true;
+
+ if (noCalls) {
+ subscriptState.stop = true;
+ return base;
+ }
+
+ this.next();
+ const node = this.startNodeAt(startPos, startLoc);
+ node.callee = base;
+ node.typeArguments = this.flowParseTypeParameterInstantiation();
+ this.expect(10);
+ node.arguments = this.parseCallExpressionArguments(11, false);
+ node.optional = true;
+ return this.finishCallExpression(node, true);
+ } else if (!noCalls && this.shouldParseTypes() && this.match(47)) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.callee = base;
+ const result = this.tryParse(() => {
+ node.typeArguments = this.flowParseTypeParameterInstantiationCallOrNew();
+ this.expect(10);
+ node.arguments = this.parseCallExpressionArguments(11, false);
+ if (subscriptState.optionalChainMember) node.optional = false;
+ return this.finishCallExpression(node, subscriptState.optionalChainMember);
+ });
+
+ if (result.node) {
+ if (result.error) this.state = result.failState;
+ return result.node;
+ }
+ }
+
+ return super.parseSubscript(base, startPos, startLoc, noCalls, subscriptState);
+ }
+
+ parseNewArguments(node) {
+ let targs = null;
+
+ if (this.shouldParseTypes() && this.match(47)) {
+ targs = this.tryParse(() => this.flowParseTypeParameterInstantiationCallOrNew()).node;
+ }
+
+ node.typeArguments = targs;
+ super.parseNewArguments(node);
+ }
+
+ parseAsyncArrowWithTypeParameters(startPos, startLoc) {
+ const node = this.startNodeAt(startPos, startLoc);
+ this.parseFunctionParams(node);
+ if (!this.parseArrow(node)) return;
+ return this.parseArrowExpression(node, undefined, true);
+ }
+
+ readToken_mult_modulo(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (code === 42 && next === 47 && this.state.hasFlowComment) {
+ this.state.hasFlowComment = false;
+ this.state.pos += 2;
+ this.nextToken();
+ return;
+ }
+
+ super.readToken_mult_modulo(code);
+ }
+
+ readToken_pipe_amp(code) {
+ const next = this.input.charCodeAt(this.state.pos + 1);
+
+ if (code === 124 && next === 125) {
+ this.finishOp(9, 2);
+ return;
+ }
+
+ super.readToken_pipe_amp(code);
+ }
+
+ parseTopLevel(file, program) {
+ const fileNode = super.parseTopLevel(file, program);
+
+ if (this.state.hasFlowComment) {
+ this.raise(FlowErrors.UnterminatedFlowComment, {
+ at: this.state.curPosition()
+ });
+ }
+
+ return fileNode;
+ }
+
+ skipBlockComment() {
+ if (this.hasPlugin("flowComments") && this.skipFlowComment()) {
+ if (this.state.hasFlowComment) {
+ throw this.raise(FlowErrors.NestedFlowComment, {
+ at: this.state.startLoc
+ });
+ }
+
+ this.hasFlowCommentCompletion();
+ this.state.pos += this.skipFlowComment();
+ this.state.hasFlowComment = true;
+ return;
+ }
+
+ if (this.state.hasFlowComment) {
+ const end = this.input.indexOf("*-/", this.state.pos + 2);
+
+ if (end === -1) {
+ throw this.raise(ErrorMessages.UnterminatedComment, {
+ at: this.state.curPosition()
+ });
+ }
+
+ this.state.pos = end + 2 + 3;
+ return;
+ }
+
+ return super.skipBlockComment();
+ }
+
+ skipFlowComment() {
+ const {
+ pos
+ } = this.state;
+ let shiftToFirstNonWhiteSpace = 2;
+
+ while ([32, 9].includes(this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace))) {
+ shiftToFirstNonWhiteSpace++;
+ }
+
+ const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);
+ const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);
+
+ if (ch2 === 58 && ch3 === 58) {
+ return shiftToFirstNonWhiteSpace + 2;
+ }
+
+ if (this.input.slice(shiftToFirstNonWhiteSpace + pos, shiftToFirstNonWhiteSpace + pos + 12) === "flow-include") {
+ return shiftToFirstNonWhiteSpace + 12;
+ }
+
+ if (ch2 === 58 && ch3 !== 58) {
+ return shiftToFirstNonWhiteSpace;
+ }
+
+ return false;
+ }
+
+ hasFlowCommentCompletion() {
+ const end = this.input.indexOf("*/", this.state.pos);
+
+ if (end === -1) {
+ throw this.raise(ErrorMessages.UnterminatedComment, {
+ at: this.state.curPosition()
+ });
+ }
+ }
+
+ flowEnumErrorBooleanMemberNotInitialized(loc, {
+ enumName,
+ memberName
+ }) {
+ this.raise(FlowErrors.EnumBooleanMemberNotInitialized, {
+ at: loc
+ }, memberName, enumName);
+ }
+
+ flowEnumErrorInvalidExplicitType(loc, {
+ enumName,
+ suppliedType
+ }) {
+ return this.raise(suppliedType === null ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied : FlowErrors.EnumInvalidExplicitType, {
+ at: loc
+ }, enumName, suppliedType);
+ }
+
+ flowEnumErrorInvalidMemberInitializer(loc, {
+ enumName,
+ explicitType,
+ memberName
+ }) {
+ return this.raise(explicitType === "boolean" || explicitType === "number" || explicitType === "string" ? FlowErrors.EnumInvalidMemberInitializerPrimaryType : explicitType === "symbol" ? FlowErrors.EnumInvalidMemberInitializerSymbolType : FlowErrors.EnumInvalidMemberInitializerUnknownType, {
+ at: loc
+ }, enumName, memberName, explicitType);
+ }
+
+ flowEnumErrorNumberMemberNotInitialized(loc, {
+ enumName,
+ memberName
+ }) {
+ this.raise(FlowErrors.EnumNumberMemberNotInitialized, {
+ at: loc
+ }, enumName, memberName);
+ }
+
+ flowEnumErrorStringMemberInconsistentlyInitailized(node, {
+ enumName
+ }) {
+ this.raise(FlowErrors.EnumStringMemberInconsistentlyInitailized, {
+ node
+ }, enumName);
+ }
+
+ flowEnumMemberInit() {
+ const startLoc = this.state.startLoc;
+
+ const endOfInit = () => this.match(12) || this.match(8);
+
+ switch (this.state.type) {
+ case 130:
+ {
+ const literal = this.parseNumericLiteral(this.state.value);
+
+ if (endOfInit()) {
+ return {
+ type: "number",
+ loc: literal.loc.start,
+ value: literal
+ };
+ }
+
+ return {
+ type: "invalid",
+ loc: startLoc
+ };
+ }
+
+ case 129:
+ {
+ const literal = this.parseStringLiteral(this.state.value);
+
+ if (endOfInit()) {
+ return {
+ type: "string",
+ loc: literal.loc.start,
+ value: literal
+ };
+ }
+
+ return {
+ type: "invalid",
+ loc: startLoc
+ };
+ }
+
+ case 85:
+ case 86:
+ {
+ const literal = this.parseBooleanLiteral(this.match(85));
+
+ if (endOfInit()) {
+ return {
+ type: "boolean",
+ loc: literal.loc.start,
+ value: literal
+ };
+ }
+
+ return {
+ type: "invalid",
+ loc: startLoc
+ };
+ }
+
+ default:
+ return {
+ type: "invalid",
+ loc: startLoc
+ };
+ }
+ }
+
+ flowEnumMemberRaw() {
+ const loc = this.state.startLoc;
+ const id = this.parseIdentifier(true);
+ const init = this.eat(29) ? this.flowEnumMemberInit() : {
+ type: "none",
+ loc
+ };
+ return {
+ id,
+ init
+ };
+ }
+
+ flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) {
+ const {
+ explicitType
+ } = context;
+
+ if (explicitType === null) {
+ return;
+ }
+
+ if (explicitType !== expectedType) {
+ this.flowEnumErrorInvalidMemberInitializer(loc, context);
+ }
+ }
+
+ flowEnumMembers({
+ enumName,
+ explicitType
+ }) {
+ const seenNames = new Set();
+ const members = {
+ booleanMembers: [],
+ numberMembers: [],
+ stringMembers: [],
+ defaultedMembers: []
+ };
+ let hasUnknownMembers = false;
+
+ while (!this.match(8)) {
+ if (this.eat(21)) {
+ hasUnknownMembers = true;
+ break;
+ }
+
+ const memberNode = this.startNode();
+ const {
+ id,
+ init
+ } = this.flowEnumMemberRaw();
+ const memberName = id.name;
+
+ if (memberName === "") {
+ continue;
+ }
+
+ if (/^[a-z]/.test(memberName)) {
+ this.raise(FlowErrors.EnumInvalidMemberName, {
+ node: id
+ }, memberName, memberName[0].toUpperCase() + memberName.slice(1), enumName);
+ }
+
+ if (seenNames.has(memberName)) {
+ this.raise(FlowErrors.EnumDuplicateMemberName, {
+ node: id
+ }, memberName, enumName);
+ }
+
+ seenNames.add(memberName);
+ const context = {
+ enumName,
+ explicitType,
+ memberName
+ };
+ memberNode.id = id;
+
+ switch (init.type) {
+ case "boolean":
+ {
+ this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "boolean");
+ memberNode.init = init.value;
+ members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
+ break;
+ }
+
+ case "number":
+ {
+ this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "number");
+ memberNode.init = init.value;
+ members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
+ break;
+ }
+
+ case "string":
+ {
+ this.flowEnumCheckExplicitTypeMismatch(init.loc, context, "string");
+ memberNode.init = init.value;
+ members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
+ break;
+ }
+
+ case "invalid":
+ {
+ throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context);
+ }
+
+ case "none":
+ {
+ switch (explicitType) {
+ case "boolean":
+ this.flowEnumErrorBooleanMemberNotInitialized(init.loc, context);
+ break;
+
+ case "number":
+ this.flowEnumErrorNumberMemberNotInitialized(init.loc, context);
+ break;
+
+ default:
+ members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
+ }
+ }
+ }
+
+ if (!this.match(8)) {
+ this.expect(12);
+ }
+ }
+
+ return {
+ members,
+ hasUnknownMembers
+ };
+ }
+
+ flowEnumStringMembers(initializedMembers, defaultedMembers, {
+ enumName
+ }) {
+ if (initializedMembers.length === 0) {
+ return defaultedMembers;
+ } else if (defaultedMembers.length === 0) {
+ return initializedMembers;
+ } else if (defaultedMembers.length > initializedMembers.length) {
+ for (const member of initializedMembers) {
+ this.flowEnumErrorStringMemberInconsistentlyInitailized(member, {
+ enumName
+ });
+ }
+
+ return defaultedMembers;
+ } else {
+ for (const member of defaultedMembers) {
+ this.flowEnumErrorStringMemberInconsistentlyInitailized(member, {
+ enumName
+ });
+ }
+
+ return initializedMembers;
+ }
+ }
+
+ flowEnumParseExplicitType({
+ enumName
+ }) {
+ if (this.eatContextual(101)) {
+ if (!tokenIsIdentifier(this.state.type)) {
+ throw this.flowEnumErrorInvalidExplicitType(this.state.startLoc, {
+ enumName,
+ suppliedType: null
+ });
+ }
+
+ const {
+ value
+ } = this.state;
+ this.next();
+
+ if (value !== "boolean" && value !== "number" && value !== "string" && value !== "symbol") {
+ this.flowEnumErrorInvalidExplicitType(this.state.startLoc, {
+ enumName,
+ suppliedType: value
+ });
+ }
+
+ return value;
+ }
+
+ return null;
+ }
+
+ flowEnumBody(node, id) {
+ const enumName = id.name;
+ const nameLoc = id.loc.start;
+ const explicitType = this.flowEnumParseExplicitType({
+ enumName
+ });
+ this.expect(5);
+ const {
+ members,
+ hasUnknownMembers
+ } = this.flowEnumMembers({
+ enumName,
+ explicitType
+ });
+ node.hasUnknownMembers = hasUnknownMembers;
+
+ switch (explicitType) {
+ case "boolean":
+ node.explicitType = true;
+ node.members = members.booleanMembers;
+ this.expect(8);
+ return this.finishNode(node, "EnumBooleanBody");
+
+ case "number":
+ node.explicitType = true;
+ node.members = members.numberMembers;
+ this.expect(8);
+ return this.finishNode(node, "EnumNumberBody");
+
+ case "string":
+ node.explicitType = true;
+ node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
+ enumName
+ });
+ this.expect(8);
+ return this.finishNode(node, "EnumStringBody");
+
+ case "symbol":
+ node.members = members.defaultedMembers;
+ this.expect(8);
+ return this.finishNode(node, "EnumSymbolBody");
+
+ default:
+ {
+ const empty = () => {
+ node.members = [];
+ this.expect(8);
+ return this.finishNode(node, "EnumStringBody");
+ };
+
+ node.explicitType = false;
+ const boolsLen = members.booleanMembers.length;
+ const numsLen = members.numberMembers.length;
+ const strsLen = members.stringMembers.length;
+ const defaultedLen = members.defaultedMembers.length;
+
+ if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {
+ return empty();
+ } else if (!boolsLen && !numsLen) {
+ node.members = this.flowEnumStringMembers(members.stringMembers, members.defaultedMembers, {
+ enumName
+ });
+ this.expect(8);
+ return this.finishNode(node, "EnumStringBody");
+ } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {
+ for (const member of members.defaultedMembers) {
+ this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, {
+ enumName,
+ memberName: member.id.name
+ });
+ }
+
+ node.members = members.booleanMembers;
+ this.expect(8);
+ return this.finishNode(node, "EnumBooleanBody");
+ } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {
+ for (const member of members.defaultedMembers) {
+ this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, {
+ enumName,
+ memberName: member.id.name
+ });
+ }
+
+ node.members = members.numberMembers;
+ this.expect(8);
+ return this.finishNode(node, "EnumNumberBody");
+ } else {
+ this.raise(FlowErrors.EnumInconsistentMemberValues, {
+ at: nameLoc
+ }, enumName);
+ return empty();
+ }
+ }
+ }
+ }
+
+ flowParseEnumDeclaration(node) {
+ const id = this.parseIdentifier();
+ node.id = id;
+ node.body = this.flowEnumBody(this.startNode(), id);
+ return this.finishNode(node, "EnumDeclaration");
+ }
+
+ isLookaheadToken_lt() {
+ const next = this.nextTokenStart();
+
+ if (this.input.charCodeAt(next) === 60) {
+ const afterNext = this.input.charCodeAt(next + 1);
+ return afterNext !== 60 && afterNext !== 61;
+ }
+
+ return false;
+ }
+
+ maybeUnwrapTypeCastExpression(node) {
+ return node.type === "TypeCastExpression" ? node.expression : node;
+ }
+
+});
+
+const entities = {
+ quot: "\u0022",
+ amp: "&",
+ apos: "\u0027",
+ lt: "<",
+ gt: ">",
+ nbsp: "\u00A0",
+ iexcl: "\u00A1",
+ cent: "\u00A2",
+ pound: "\u00A3",
+ curren: "\u00A4",
+ yen: "\u00A5",
+ brvbar: "\u00A6",
+ sect: "\u00A7",
+ uml: "\u00A8",
+ copy: "\u00A9",
+ ordf: "\u00AA",
+ laquo: "\u00AB",
+ not: "\u00AC",
+ shy: "\u00AD",
+ reg: "\u00AE",
+ macr: "\u00AF",
+ deg: "\u00B0",
+ plusmn: "\u00B1",
+ sup2: "\u00B2",
+ sup3: "\u00B3",
+ acute: "\u00B4",
+ micro: "\u00B5",
+ para: "\u00B6",
+ middot: "\u00B7",
+ cedil: "\u00B8",
+ sup1: "\u00B9",
+ ordm: "\u00BA",
+ raquo: "\u00BB",
+ frac14: "\u00BC",
+ frac12: "\u00BD",
+ frac34: "\u00BE",
+ iquest: "\u00BF",
+ Agrave: "\u00C0",
+ Aacute: "\u00C1",
+ Acirc: "\u00C2",
+ Atilde: "\u00C3",
+ Auml: "\u00C4",
+ Aring: "\u00C5",
+ AElig: "\u00C6",
+ Ccedil: "\u00C7",
+ Egrave: "\u00C8",
+ Eacute: "\u00C9",
+ Ecirc: "\u00CA",
+ Euml: "\u00CB",
+ Igrave: "\u00CC",
+ Iacute: "\u00CD",
+ Icirc: "\u00CE",
+ Iuml: "\u00CF",
+ ETH: "\u00D0",
+ Ntilde: "\u00D1",
+ Ograve: "\u00D2",
+ Oacute: "\u00D3",
+ Ocirc: "\u00D4",
+ Otilde: "\u00D5",
+ Ouml: "\u00D6",
+ times: "\u00D7",
+ Oslash: "\u00D8",
+ Ugrave: "\u00D9",
+ Uacute: "\u00DA",
+ Ucirc: "\u00DB",
+ Uuml: "\u00DC",
+ Yacute: "\u00DD",
+ THORN: "\u00DE",
+ szlig: "\u00DF",
+ agrave: "\u00E0",
+ aacute: "\u00E1",
+ acirc: "\u00E2",
+ atilde: "\u00E3",
+ auml: "\u00E4",
+ aring: "\u00E5",
+ aelig: "\u00E6",
+ ccedil: "\u00E7",
+ egrave: "\u00E8",
+ eacute: "\u00E9",
+ ecirc: "\u00EA",
+ euml: "\u00EB",
+ igrave: "\u00EC",
+ iacute: "\u00ED",
+ icirc: "\u00EE",
+ iuml: "\u00EF",
+ eth: "\u00F0",
+ ntilde: "\u00F1",
+ ograve: "\u00F2",
+ oacute: "\u00F3",
+ ocirc: "\u00F4",
+ otilde: "\u00F5",
+ ouml: "\u00F6",
+ divide: "\u00F7",
+ oslash: "\u00F8",
+ ugrave: "\u00F9",
+ uacute: "\u00FA",
+ ucirc: "\u00FB",
+ uuml: "\u00FC",
+ yacute: "\u00FD",
+ thorn: "\u00FE",
+ yuml: "\u00FF",
+ OElig: "\u0152",
+ oelig: "\u0153",
+ Scaron: "\u0160",
+ scaron: "\u0161",
+ Yuml: "\u0178",
+ fnof: "\u0192",
+ circ: "\u02C6",
+ tilde: "\u02DC",
+ Alpha: "\u0391",
+ Beta: "\u0392",
+ Gamma: "\u0393",
+ Delta: "\u0394",
+ Epsilon: "\u0395",
+ Zeta: "\u0396",
+ Eta: "\u0397",
+ Theta: "\u0398",
+ Iota: "\u0399",
+ Kappa: "\u039A",
+ Lambda: "\u039B",
+ Mu: "\u039C",
+ Nu: "\u039D",
+ Xi: "\u039E",
+ Omicron: "\u039F",
+ Pi: "\u03A0",
+ Rho: "\u03A1",
+ Sigma: "\u03A3",
+ Tau: "\u03A4",
+ Upsilon: "\u03A5",
+ Phi: "\u03A6",
+ Chi: "\u03A7",
+ Psi: "\u03A8",
+ Omega: "\u03A9",
+ alpha: "\u03B1",
+ beta: "\u03B2",
+ gamma: "\u03B3",
+ delta: "\u03B4",
+ epsilon: "\u03B5",
+ zeta: "\u03B6",
+ eta: "\u03B7",
+ theta: "\u03B8",
+ iota: "\u03B9",
+ kappa: "\u03BA",
+ lambda: "\u03BB",
+ mu: "\u03BC",
+ nu: "\u03BD",
+ xi: "\u03BE",
+ omicron: "\u03BF",
+ pi: "\u03C0",
+ rho: "\u03C1",
+ sigmaf: "\u03C2",
+ sigma: "\u03C3",
+ tau: "\u03C4",
+ upsilon: "\u03C5",
+ phi: "\u03C6",
+ chi: "\u03C7",
+ psi: "\u03C8",
+ omega: "\u03C9",
+ thetasym: "\u03D1",
+ upsih: "\u03D2",
+ piv: "\u03D6",
+ ensp: "\u2002",
+ emsp: "\u2003",
+ thinsp: "\u2009",
+ zwnj: "\u200C",
+ zwj: "\u200D",
+ lrm: "\u200E",
+ rlm: "\u200F",
+ ndash: "\u2013",
+ mdash: "\u2014",
+ lsquo: "\u2018",
+ rsquo: "\u2019",
+ sbquo: "\u201A",
+ ldquo: "\u201C",
+ rdquo: "\u201D",
+ bdquo: "\u201E",
+ dagger: "\u2020",
+ Dagger: "\u2021",
+ bull: "\u2022",
+ hellip: "\u2026",
+ permil: "\u2030",
+ prime: "\u2032",
+ Prime: "\u2033",
+ lsaquo: "\u2039",
+ rsaquo: "\u203A",
+ oline: "\u203E",
+ frasl: "\u2044",
+ euro: "\u20AC",
+ image: "\u2111",
+ weierp: "\u2118",
+ real: "\u211C",
+ trade: "\u2122",
+ alefsym: "\u2135",
+ larr: "\u2190",
+ uarr: "\u2191",
+ rarr: "\u2192",
+ darr: "\u2193",
+ harr: "\u2194",
+ crarr: "\u21B5",
+ lArr: "\u21D0",
+ uArr: "\u21D1",
+ rArr: "\u21D2",
+ dArr: "\u21D3",
+ hArr: "\u21D4",
+ forall: "\u2200",
+ part: "\u2202",
+ exist: "\u2203",
+ empty: "\u2205",
+ nabla: "\u2207",
+ isin: "\u2208",
+ notin: "\u2209",
+ ni: "\u220B",
+ prod: "\u220F",
+ sum: "\u2211",
+ minus: "\u2212",
+ lowast: "\u2217",
+ radic: "\u221A",
+ prop: "\u221D",
+ infin: "\u221E",
+ ang: "\u2220",
+ and: "\u2227",
+ or: "\u2228",
+ cap: "\u2229",
+ cup: "\u222A",
+ int: "\u222B",
+ there4: "\u2234",
+ sim: "\u223C",
+ cong: "\u2245",
+ asymp: "\u2248",
+ ne: "\u2260",
+ equiv: "\u2261",
+ le: "\u2264",
+ ge: "\u2265",
+ sub: "\u2282",
+ sup: "\u2283",
+ nsub: "\u2284",
+ sube: "\u2286",
+ supe: "\u2287",
+ oplus: "\u2295",
+ otimes: "\u2297",
+ perp: "\u22A5",
+ sdot: "\u22C5",
+ lceil: "\u2308",
+ rceil: "\u2309",
+ lfloor: "\u230A",
+ rfloor: "\u230B",
+ lang: "\u2329",
+ rang: "\u232A",
+ loz: "\u25CA",
+ spades: "\u2660",
+ clubs: "\u2663",
+ hearts: "\u2665",
+ diams: "\u2666"
+};
+
+const HEX_NUMBER = /^[\da-fA-F]+$/;
+const DECIMAL_NUMBER = /^\d+$/;
+const JsxErrors = makeErrorTemplates({
+ AttributeIsEmpty: "JSX attributes must only be assigned a non-empty expression.",
+ MissingClosingTagElement: "Expected corresponding JSX closing tag for <%0>.",
+ MissingClosingTagFragment: "Expected corresponding JSX closing tag for <>.",
+ UnexpectedSequenceExpression: "Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",
+ UnsupportedJsxValue: "JSX value should be either an expression or a quoted JSX text.",
+ UnterminatedJsxContent: "Unterminated JSX contents.",
+ UnwrappedAdjacentJSXElements: "Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"
+}, ErrorCodes.SyntaxError, "jsx");
+
+function isFragment(object) {
+ return object ? object.type === "JSXOpeningFragment" || object.type === "JSXClosingFragment" : false;
+}
+
+function getQualifiedJSXName(object) {
+ if (object.type === "JSXIdentifier") {
+ return object.name;
+ }
+
+ if (object.type === "JSXNamespacedName") {
+ return object.namespace.name + ":" + object.name.name;
+ }
+
+ if (object.type === "JSXMemberExpression") {
+ return getQualifiedJSXName(object.object) + "." + getQualifiedJSXName(object.property);
+ }
+
+ throw new Error("Node had unexpected type: " + object.type);
+}
+
+var jsx = (superClass => class extends superClass {
+ jsxReadToken() {
+ let out = "";
+ let chunkStart = this.state.pos;
+
+ for (;;) {
+ if (this.state.pos >= this.length) {
+ throw this.raise(JsxErrors.UnterminatedJsxContent, {
+ at: this.state.startLoc
+ });
+ }
+
+ const ch = this.input.charCodeAt(this.state.pos);
+
+ switch (ch) {
+ case 60:
+ case 123:
+ if (this.state.pos === this.state.start) {
+ if (ch === 60 && this.state.canStartJSXElement) {
+ ++this.state.pos;
+ return this.finishToken(138);
+ }
+
+ return super.getTokenFromCode(ch);
+ }
+
+ out += this.input.slice(chunkStart, this.state.pos);
+ return this.finishToken(137, out);
+
+ case 38:
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadEntity();
+ chunkStart = this.state.pos;
+ break;
+
+ case 62:
+ case 125:
+
+ default:
+ if (isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadNewLine(true);
+ chunkStart = this.state.pos;
+ } else {
+ ++this.state.pos;
+ }
+
+ }
+ }
+ }
+
+ jsxReadNewLine(normalizeCRLF) {
+ const ch = this.input.charCodeAt(this.state.pos);
+ let out;
+ ++this.state.pos;
+
+ if (ch === 13 && this.input.charCodeAt(this.state.pos) === 10) {
+ ++this.state.pos;
+ out = normalizeCRLF ? "\n" : "\r\n";
+ } else {
+ out = String.fromCharCode(ch);
+ }
+
+ ++this.state.curLine;
+ this.state.lineStart = this.state.pos;
+ return out;
+ }
+
+ jsxReadString(quote) {
+ let out = "";
+ let chunkStart = ++this.state.pos;
+
+ for (;;) {
+ if (this.state.pos >= this.length) {
+ throw this.raise(ErrorMessages.UnterminatedString, {
+ at: this.state.startLoc
+ });
+ }
+
+ const ch = this.input.charCodeAt(this.state.pos);
+ if (ch === quote) break;
+
+ if (ch === 38) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadEntity();
+ chunkStart = this.state.pos;
+ } else if (isNewLine(ch)) {
+ out += this.input.slice(chunkStart, this.state.pos);
+ out += this.jsxReadNewLine(false);
+ chunkStart = this.state.pos;
+ } else {
+ ++this.state.pos;
+ }
+ }
+
+ out += this.input.slice(chunkStart, this.state.pos++);
+ return this.finishToken(129, out);
+ }
+
+ jsxReadEntity() {
+ let str = "";
+ let count = 0;
+ let entity;
+ let ch = this.input[this.state.pos];
+ const startPos = ++this.state.pos;
+
+ while (this.state.pos < this.length && count++ < 10) {
+ ch = this.input[this.state.pos++];
+
+ if (ch === ";") {
+ if (str[0] === "#") {
+ if (str[1] === "x") {
+ str = str.substr(2);
+
+ if (HEX_NUMBER.test(str)) {
+ entity = String.fromCodePoint(parseInt(str, 16));
+ }
+ } else {
+ str = str.substr(1);
+
+ if (DECIMAL_NUMBER.test(str)) {
+ entity = String.fromCodePoint(parseInt(str, 10));
+ }
+ }
+ } else {
+ entity = entities[str];
+ }
+
+ break;
+ }
+
+ str += ch;
+ }
+
+ if (!entity) {
+ this.state.pos = startPos;
+ return "&";
+ }
+
+ return entity;
+ }
+
+ jsxReadWord() {
+ let ch;
+ const start = this.state.pos;
+
+ do {
+ ch = this.input.charCodeAt(++this.state.pos);
+ } while (isIdentifierChar(ch) || ch === 45);
+
+ return this.finishToken(136, this.input.slice(start, this.state.pos));
+ }
+
+ jsxParseIdentifier() {
+ const node = this.startNode();
+
+ if (this.match(136)) {
+ node.name = this.state.value;
+ } else if (tokenIsKeyword(this.state.type)) {
+ node.name = tokenLabelName(this.state.type);
+ } else {
+ this.unexpected();
+ }
+
+ this.next();
+ return this.finishNode(node, "JSXIdentifier");
+ }
+
+ jsxParseNamespacedName() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const name = this.jsxParseIdentifier();
+ if (!this.eat(14)) return name;
+ const node = this.startNodeAt(startPos, startLoc);
+ node.namespace = name;
+ node.name = this.jsxParseIdentifier();
+ return this.finishNode(node, "JSXNamespacedName");
+ }
+
+ jsxParseElementName() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let node = this.jsxParseNamespacedName();
+
+ if (node.type === "JSXNamespacedName") {
+ return node;
+ }
+
+ while (this.eat(16)) {
+ const newNode = this.startNodeAt(startPos, startLoc);
+ newNode.object = node;
+ newNode.property = this.jsxParseIdentifier();
+ node = this.finishNode(newNode, "JSXMemberExpression");
+ }
+
+ return node;
+ }
+
+ jsxParseAttributeValue() {
+ let node;
+
+ switch (this.state.type) {
+ case 5:
+ node = this.startNode();
+ this.setContext(types.brace);
+ this.next();
+ node = this.jsxParseExpressionContainer(node, types.j_oTag);
+
+ if (node.expression.type === "JSXEmptyExpression") {
+ this.raise(JsxErrors.AttributeIsEmpty, {
+ node
+ });
+ }
+
+ return node;
+
+ case 138:
+ case 129:
+ return this.parseExprAtom();
+
+ default:
+ throw this.raise(JsxErrors.UnsupportedJsxValue, {
+ at: this.state.startLoc
+ });
+ }
+ }
+
+ jsxParseEmptyExpression() {
+ const node = this.startNodeAt(this.state.lastTokEndLoc.index, this.state.lastTokEndLoc);
+ return this.finishNodeAt(node, "JSXEmptyExpression", this.state.startLoc);
+ }
+
+ jsxParseSpreadChild(node) {
+ this.next();
+ node.expression = this.parseExpression();
+ this.setContext(types.j_oTag);
+ this.expect(8);
+ return this.finishNode(node, "JSXSpreadChild");
+ }
+
+ jsxParseExpressionContainer(node, previousContext) {
+ if (this.match(8)) {
+ node.expression = this.jsxParseEmptyExpression();
+ } else {
+ const expression = this.parseExpression();
+ node.expression = expression;
+ }
+
+ this.setContext(previousContext);
+ this.expect(8);
+ return this.finishNode(node, "JSXExpressionContainer");
+ }
+
+ jsxParseAttribute() {
+ const node = this.startNode();
+
+ if (this.match(5)) {
+ this.setContext(types.brace);
+ this.next();
+ this.expect(21);
+ node.argument = this.parseMaybeAssignAllowIn();
+ this.setContext(types.j_oTag);
+ this.expect(8);
+ return this.finishNode(node, "JSXSpreadAttribute");
+ }
+
+ node.name = this.jsxParseNamespacedName();
+ node.value = this.eat(29) ? this.jsxParseAttributeValue() : null;
+ return this.finishNode(node, "JSXAttribute");
+ }
+
+ jsxParseOpeningElementAt(startPos, startLoc) {
+ const node = this.startNodeAt(startPos, startLoc);
+
+ if (this.match(139)) {
+ this.expect(139);
+ return this.finishNode(node, "JSXOpeningFragment");
+ }
+
+ node.name = this.jsxParseElementName();
+ return this.jsxParseOpeningElementAfterName(node);
+ }
+
+ jsxParseOpeningElementAfterName(node) {
+ const attributes = [];
+
+ while (!this.match(56) && !this.match(139)) {
+ attributes.push(this.jsxParseAttribute());
+ }
+
+ node.attributes = attributes;
+ node.selfClosing = this.eat(56);
+ this.expect(139);
+ return this.finishNode(node, "JSXOpeningElement");
+ }
+
+ jsxParseClosingElementAt(startPos, startLoc) {
+ const node = this.startNodeAt(startPos, startLoc);
+
+ if (this.match(139)) {
+ this.expect(139);
+ return this.finishNode(node, "JSXClosingFragment");
+ }
+
+ node.name = this.jsxParseElementName();
+ this.expect(139);
+ return this.finishNode(node, "JSXClosingElement");
+ }
+
+ jsxParseElementAt(startPos, startLoc) {
+ const node = this.startNodeAt(startPos, startLoc);
+ const children = [];
+ const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);
+ let closingElement = null;
+
+ if (!openingElement.selfClosing) {
+ contents: for (;;) {
+ switch (this.state.type) {
+ case 138:
+ startPos = this.state.start;
+ startLoc = this.state.startLoc;
+ this.next();
+
+ if (this.eat(56)) {
+ closingElement = this.jsxParseClosingElementAt(startPos, startLoc);
+ break contents;
+ }
+
+ children.push(this.jsxParseElementAt(startPos, startLoc));
+ break;
+
+ case 137:
+ children.push(this.parseExprAtom());
+ break;
+
+ case 5:
+ {
+ const node = this.startNode();
+ this.setContext(types.brace);
+ this.next();
+
+ if (this.match(21)) {
+ children.push(this.jsxParseSpreadChild(node));
+ } else {
+ children.push(this.jsxParseExpressionContainer(node, types.j_expr));
+ }
+
+ break;
+ }
+
+ default:
+ throw this.unexpected();
+ }
+ }
+
+ if (isFragment(openingElement) && !isFragment(closingElement) && closingElement !== null) {
+ this.raise(JsxErrors.MissingClosingTagFragment, {
+ node: closingElement
+ });
+ } else if (!isFragment(openingElement) && isFragment(closingElement)) {
+ this.raise(JsxErrors.MissingClosingTagElement, {
+ node: closingElement
+ }, getQualifiedJSXName(openingElement.name));
+ } else if (!isFragment(openingElement) && !isFragment(closingElement)) {
+ if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) {
+ this.raise(JsxErrors.MissingClosingTagElement, {
+ node: closingElement
+ }, getQualifiedJSXName(openingElement.name));
+ }
+ }
+ }
+
+ if (isFragment(openingElement)) {
+ node.openingFragment = openingElement;
+ node.closingFragment = closingElement;
+ } else {
+ node.openingElement = openingElement;
+ node.closingElement = closingElement;
+ }
+
+ node.children = children;
+
+ if (this.match(47)) {
+ throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, {
+ at: this.state.startLoc
+ });
+ }
+
+ return isFragment(openingElement) ? this.finishNode(node, "JSXFragment") : this.finishNode(node, "JSXElement");
+ }
+
+ jsxParseElement() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ this.next();
+ return this.jsxParseElementAt(startPos, startLoc);
+ }
+
+ setContext(newContext) {
+ const {
+ context
+ } = this.state;
+ context[context.length - 1] = newContext;
+ }
+
+ parseExprAtom(refExpressionErrors) {
+ if (this.match(137)) {
+ return this.parseLiteral(this.state.value, "JSXText");
+ } else if (this.match(138)) {
+ return this.jsxParseElement();
+ } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) {
+ this.replaceToken(138);
+ return this.jsxParseElement();
+ } else {
+ return super.parseExprAtom(refExpressionErrors);
+ }
+ }
+
+ skipSpace() {
+ const curContext = this.curContext();
+ if (!curContext.preserveSpace) super.skipSpace();
+ }
+
+ getTokenFromCode(code) {
+ const context = this.curContext();
+
+ if (context === types.j_expr) {
+ return this.jsxReadToken();
+ }
+
+ if (context === types.j_oTag || context === types.j_cTag) {
+ if (isIdentifierStart(code)) {
+ return this.jsxReadWord();
+ }
+
+ if (code === 62) {
+ ++this.state.pos;
+ return this.finishToken(139);
+ }
+
+ if ((code === 34 || code === 39) && context === types.j_oTag) {
+ return this.jsxReadString(code);
+ }
+ }
+
+ if (code === 60 && this.state.canStartJSXElement && this.input.charCodeAt(this.state.pos + 1) !== 33) {
+ ++this.state.pos;
+ return this.finishToken(138);
+ }
+
+ return super.getTokenFromCode(code);
+ }
+
+ updateContext(prevType) {
+ const {
+ context,
+ type
+ } = this.state;
+
+ if (type === 56 && prevType === 138) {
+ context.splice(-2, 2, types.j_cTag);
+ this.state.canStartJSXElement = false;
+ } else if (type === 138) {
+ context.push(types.j_oTag);
+ } else if (type === 139) {
+ const out = context[context.length - 1];
+
+ if (out === types.j_oTag && prevType === 56 || out === types.j_cTag) {
+ context.pop();
+ this.state.canStartJSXElement = context[context.length - 1] === types.j_expr;
+ } else {
+ this.setContext(types.j_expr);
+ this.state.canStartJSXElement = true;
+ }
+ } else {
+ this.state.canStartJSXElement = tokenComesBeforeExpression(type);
+ }
+ }
+
+});
+
+class TypeScriptScope extends Scope {
+ constructor(...args) {
+ super(...args);
+ this.types = new Set();
+ this.enums = new Set();
+ this.constEnums = new Set();
+ this.classes = new Set();
+ this.exportOnlyBindings = new Set();
+ }
+
+}
+
+class TypeScriptScopeHandler extends ScopeHandler {
+ createScope(flags) {
+ return new TypeScriptScope(flags);
+ }
+
+ declareName(name, bindingType, loc) {
+ const scope = this.currentScope();
+
+ if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {
+ this.maybeExportDefined(scope, name);
+ scope.exportOnlyBindings.add(name);
+ return;
+ }
+
+ super.declareName(...arguments);
+
+ if (bindingType & BIND_KIND_TYPE) {
+ if (!(bindingType & BIND_KIND_VALUE)) {
+ this.checkRedeclarationInScope(scope, name, bindingType, loc);
+ this.maybeExportDefined(scope, name);
+ }
+
+ scope.types.add(name);
+ }
+
+ if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.add(name);
+ if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.add(name);
+ if (bindingType & BIND_FLAGS_CLASS) scope.classes.add(name);
+ }
+
+ isRedeclaredInScope(scope, name, bindingType) {
+ if (scope.enums.has(name)) {
+ if (bindingType & BIND_FLAGS_TS_ENUM) {
+ const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);
+ const wasConst = scope.constEnums.has(name);
+ return isConst !== wasConst;
+ }
+
+ return true;
+ }
+
+ if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name)) {
+ if (scope.lexical.has(name)) {
+ return !!(bindingType & BIND_KIND_VALUE);
+ } else {
+ return false;
+ }
+ }
+
+ if (bindingType & BIND_KIND_TYPE && scope.types.has(name)) {
+ return true;
+ }
+
+ return super.isRedeclaredInScope(...arguments);
+ }
+
+ checkLocalExport(id) {
+ const topLevelScope = this.scopeStack[0];
+ const {
+ name
+ } = id;
+
+ if (!topLevelScope.types.has(name) && !topLevelScope.exportOnlyBindings.has(name)) {
+ super.checkLocalExport(id);
+ }
+ }
+
+}
+
+function nonNull(x) {
+ if (x == null) {
+ throw new Error(`Unexpected ${x} value.`);
+ }
+
+ return x;
+}
+
+function assert(x) {
+ if (!x) {
+ throw new Error("Assert fail");
+ }
+}
+
+const TSErrors = makeErrorTemplates({
+ AbstractMethodHasImplementation: "Method '%0' cannot have an implementation because it is marked abstract.",
+ AbstractPropertyHasInitializer: "Property '%0' cannot have an initializer because it is marked abstract.",
+ AccesorCannotDeclareThisParameter: "'get' and 'set' accessors cannot declare 'this' parameters.",
+ AccesorCannotHaveTypeParameters: "An accessor cannot have type parameters.",
+ ClassMethodHasDeclare: "Class methods cannot have the 'declare' modifier.",
+ ClassMethodHasReadonly: "Class methods cannot have the 'readonly' modifier.",
+ ConstructorHasTypeParameters: "Type parameters cannot appear on a constructor declaration.",
+ DeclareAccessor: "'declare' is not allowed in %0ters.",
+ DeclareClassFieldHasInitializer: "Initializers are not allowed in ambient contexts.",
+ DeclareFunctionHasImplementation: "An implementation cannot be declared in ambient contexts.",
+ DuplicateAccessibilityModifier: "Accessibility modifier already seen.",
+ DuplicateModifier: "Duplicate modifier: '%0'.",
+ EmptyHeritageClauseType: "'%0' list cannot be empty.",
+ EmptyTypeArguments: "Type argument list cannot be empty.",
+ EmptyTypeParameters: "Type parameter list cannot be empty.",
+ ExpectedAmbientAfterExportDeclare: "'export declare' must be followed by an ambient declaration.",
+ ImportAliasHasImportType: "An import alias can not use 'import type'.",
+ IncompatibleModifiers: "'%0' modifier cannot be used with '%1' modifier.",
+ IndexSignatureHasAbstract: "Index signatures cannot have the 'abstract' modifier.",
+ IndexSignatureHasAccessibility: "Index signatures cannot have an accessibility modifier ('%0').",
+ IndexSignatureHasDeclare: "Index signatures cannot have the 'declare' modifier.",
+ IndexSignatureHasOverride: "'override' modifier cannot appear on an index signature.",
+ IndexSignatureHasStatic: "Index signatures cannot have the 'static' modifier.",
+ InvalidModifierOnTypeMember: "'%0' modifier cannot appear on a type member.",
+ InvalidModifiersOrder: "'%0' modifier must precede '%1' modifier.",
+ InvalidTupleMemberLabel: "Tuple members must be labeled with a simple identifier.",
+ MissingInterfaceName: "'interface' declarations must be followed by an identifier.",
+ MixedLabeledAndUnlabeledElements: "Tuple members must all have names or all not have names.",
+ NonAbstractClassHasAbstractMethod: "Abstract methods can only appear within an abstract class.",
+ NonClassMethodPropertyHasAbstractModifer: "'abstract' modifier can only appear on a class, method, or property declaration.",
+ OptionalTypeBeforeRequired: "A required element cannot follow an optional element.",
+ OverrideNotInSubClass: "This member cannot have an 'override' modifier because its containing class does not extend another class.",
+ PatternIsOptional: "A binding pattern parameter cannot be optional in an implementation signature.",
+ PrivateElementHasAbstract: "Private elements cannot have the 'abstract' modifier.",
+ PrivateElementHasAccessibility: "Private elements cannot have an accessibility modifier ('%0').",
+ ReadonlyForMethodSignature: "'readonly' modifier can only appear on a property declaration or index signature.",
+ ReservedArrowTypeParam: "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",
+ ReservedTypeAssertion: "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",
+ SetAccesorCannotHaveOptionalParameter: "A 'set' accessor cannot have an optional parameter.",
+ SetAccesorCannotHaveRestParameter: "A 'set' accessor cannot have rest parameter.",
+ SetAccesorCannotHaveReturnType: "A 'set' accessor cannot have a return type annotation.",
+ StaticBlockCannotHaveModifier: "Static class blocks cannot have any modifier.",
+ TypeAnnotationAfterAssign: "Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",
+ TypeImportCannotSpecifyDefaultAndNamed: "A type-only import can specify a default import or named bindings, but not both.",
+ TypeModifierIsUsedInTypeExports: "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",
+ TypeModifierIsUsedInTypeImports: "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",
+ UnexpectedParameterModifier: "A parameter property is only allowed in a constructor implementation.",
+ UnexpectedReadonly: "'readonly' type modifier is only permitted on array and tuple literal types.",
+ UnexpectedTypeAnnotation: "Did not expect a type annotation here.",
+ UnexpectedTypeCastInParameter: "Unexpected type cast in parameter position.",
+ UnsupportedImportTypeArgument: "Argument in a type import must be a string literal.",
+ UnsupportedParameterPropertyKind: "A parameter property may not be declared using a binding pattern.",
+ UnsupportedSignatureParameterKind: "Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0."
+}, ErrorCodes.SyntaxError, "typescript");
+
+function keywordTypeFromName(value) {
+ switch (value) {
+ case "any":
+ return "TSAnyKeyword";
+
+ case "boolean":
+ return "TSBooleanKeyword";
+
+ case "bigint":
+ return "TSBigIntKeyword";
+
+ case "never":
+ return "TSNeverKeyword";
+
+ case "number":
+ return "TSNumberKeyword";
+
+ case "object":
+ return "TSObjectKeyword";
+
+ case "string":
+ return "TSStringKeyword";
+
+ case "symbol":
+ return "TSSymbolKeyword";
+
+ case "undefined":
+ return "TSUndefinedKeyword";
+
+ case "unknown":
+ return "TSUnknownKeyword";
+
+ default:
+ return undefined;
+ }
+}
+
+function tsIsAccessModifier(modifier) {
+ return modifier === "private" || modifier === "public" || modifier === "protected";
+}
+
+var typescript = (superClass => class extends superClass {
+ getScopeHandler() {
+ return TypeScriptScopeHandler;
+ }
+
+ tsIsIdentifier() {
+ return tokenIsIdentifier(this.state.type);
+ }
+
+ tsTokenCanFollowModifier() {
+ return (this.match(0) || this.match(5) || this.match(55) || this.match(21) || this.match(134) || this.isLiteralPropertyName()) && !this.hasPrecedingLineBreak();
+ }
+
+ tsNextTokenCanFollowModifier() {
+ this.next();
+ return this.tsTokenCanFollowModifier();
+ }
+
+ tsParseModifier(allowedModifiers, stopOnStartOfClassStaticBlock) {
+ if (!tokenIsIdentifier(this.state.type)) {
+ return undefined;
+ }
+
+ const modifier = this.state.value;
+
+ if (allowedModifiers.indexOf(modifier) !== -1) {
+ if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) {
+ return undefined;
+ }
+
+ if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {
+ return modifier;
+ }
+ }
+
+ return undefined;
+ }
+
+ tsParseModifiers(modified, allowedModifiers, disallowedModifiers, errorTemplate, stopOnStartOfClassStaticBlock) {
+ const enforceOrder = (loc, modifier, before, after) => {
+ if (modifier === before && modified[after]) {
+ this.raise(TSErrors.InvalidModifiersOrder, {
+ at: loc
+ }, before, after);
+ }
+ };
+
+ const incompatible = (loc, modifier, mod1, mod2) => {
+ if (modified[mod1] && modifier === mod2 || modified[mod2] && modifier === mod1) {
+ this.raise(TSErrors.IncompatibleModifiers, {
+ at: loc
+ }, mod1, mod2);
+ }
+ };
+
+ for (;;) {
+ const {
+ startLoc
+ } = this.state;
+ const modifier = this.tsParseModifier(allowedModifiers.concat(disallowedModifiers != null ? disallowedModifiers : []), stopOnStartOfClassStaticBlock);
+ if (!modifier) break;
+
+ if (tsIsAccessModifier(modifier)) {
+ if (modified.accessibility) {
+ this.raise(TSErrors.DuplicateAccessibilityModifier, {
+ at: startLoc
+ });
+ } else {
+ enforceOrder(startLoc, modifier, modifier, "override");
+ enforceOrder(startLoc, modifier, modifier, "static");
+ enforceOrder(startLoc, modifier, modifier, "readonly");
+ modified.accessibility = modifier;
+ }
+ } else {
+ if (Object.hasOwnProperty.call(modified, modifier)) {
+ this.raise(TSErrors.DuplicateModifier, {
+ at: startLoc
+ }, modifier);
+ } else {
+ enforceOrder(startLoc, modifier, "static", "readonly");
+ enforceOrder(startLoc, modifier, "static", "override");
+ enforceOrder(startLoc, modifier, "override", "readonly");
+ enforceOrder(startLoc, modifier, "abstract", "override");
+ incompatible(startLoc, modifier, "declare", "override");
+ incompatible(startLoc, modifier, "static", "abstract");
+ }
+
+ modified[modifier] = true;
+ }
+
+ if (disallowedModifiers != null && disallowedModifiers.includes(modifier)) {
+ this.raise(errorTemplate, {
+ at: startLoc
+ }, modifier);
+ }
+ }
+ }
+
+ tsIsListTerminator(kind) {
+ switch (kind) {
+ case "EnumMembers":
+ case "TypeMembers":
+ return this.match(8);
+
+ case "HeritageClauseElement":
+ return this.match(5);
+
+ case "TupleElementTypes":
+ return this.match(3);
+
+ case "TypeParametersOrArguments":
+ return this.match(48);
+ }
+
+ throw new Error("Unreachable");
+ }
+
+ tsParseList(kind, parseElement) {
+ const result = [];
+
+ while (!this.tsIsListTerminator(kind)) {
+ result.push(parseElement());
+ }
+
+ return result;
+ }
+
+ tsParseDelimitedList(kind, parseElement, refTrailingCommaPos) {
+ return nonNull(this.tsParseDelimitedListWorker(kind, parseElement, true, refTrailingCommaPos));
+ }
+
+ tsParseDelimitedListWorker(kind, parseElement, expectSuccess, refTrailingCommaPos) {
+ const result = [];
+ let trailingCommaPos = -1;
+
+ for (;;) {
+ if (this.tsIsListTerminator(kind)) {
+ break;
+ }
+
+ trailingCommaPos = -1;
+ const element = parseElement();
+
+ if (element == null) {
+ return undefined;
+ }
+
+ result.push(element);
+
+ if (this.eat(12)) {
+ trailingCommaPos = this.state.lastTokStart;
+ continue;
+ }
+
+ if (this.tsIsListTerminator(kind)) {
+ break;
+ }
+
+ if (expectSuccess) {
+ this.expect(12);
+ }
+
+ return undefined;
+ }
+
+ if (refTrailingCommaPos) {
+ refTrailingCommaPos.value = trailingCommaPos;
+ }
+
+ return result;
+ }
+
+ tsParseBracketedList(kind, parseElement, bracket, skipFirstToken, refTrailingCommaPos) {
+ if (!skipFirstToken) {
+ if (bracket) {
+ this.expect(0);
+ } else {
+ this.expect(47);
+ }
+ }
+
+ const result = this.tsParseDelimitedList(kind, parseElement, refTrailingCommaPos);
+
+ if (bracket) {
+ this.expect(3);
+ } else {
+ this.expect(48);
+ }
+
+ return result;
+ }
+
+ tsParseImportType() {
+ const node = this.startNode();
+ this.expect(83);
+ this.expect(10);
+
+ if (!this.match(129)) {
+ this.raise(TSErrors.UnsupportedImportTypeArgument, {
+ at: this.state.startLoc
+ });
+ }
+
+ node.argument = this.parseExprAtom();
+ this.expect(11);
+
+ if (this.eat(16)) {
+ node.qualifier = this.tsParseEntityName(true);
+ }
+
+ if (this.match(47)) {
+ node.typeParameters = this.tsParseTypeArguments();
+ }
+
+ return this.finishNode(node, "TSImportType");
+ }
+
+ tsParseEntityName(allowReservedWords) {
+ let entity = this.parseIdentifier();
+
+ while (this.eat(16)) {
+ const node = this.startNodeAtNode(entity);
+ node.left = entity;
+ node.right = this.parseIdentifier(allowReservedWords);
+ entity = this.finishNode(node, "TSQualifiedName");
+ }
+
+ return entity;
+ }
+
+ tsParseTypeReference() {
+ const node = this.startNode();
+ node.typeName = this.tsParseEntityName(false);
+
+ if (!this.hasPrecedingLineBreak() && this.match(47)) {
+ node.typeParameters = this.tsParseTypeArguments();
+ }
+
+ return this.finishNode(node, "TSTypeReference");
+ }
+
+ tsParseThisTypePredicate(lhs) {
+ this.next();
+ const node = this.startNodeAtNode(lhs);
+ node.parameterName = lhs;
+ node.typeAnnotation = this.tsParseTypeAnnotation(false);
+ node.asserts = false;
+ return this.finishNode(node, "TSTypePredicate");
+ }
+
+ tsParseThisTypeNode() {
+ const node = this.startNode();
+ this.next();
+ return this.finishNode(node, "TSThisType");
+ }
+
+ tsParseTypeQuery() {
+ const node = this.startNode();
+ this.expect(87);
+
+ if (this.match(83)) {
+ node.exprName = this.tsParseImportType();
+ } else {
+ node.exprName = this.tsParseEntityName(true);
+ }
+
+ return this.finishNode(node, "TSTypeQuery");
+ }
+
+ tsParseTypeParameter() {
+ const node = this.startNode();
+ node.name = this.tsParseTypeParameterName();
+ node.constraint = this.tsEatThenParseType(81);
+ node.default = this.tsEatThenParseType(29);
+ return this.finishNode(node, "TSTypeParameter");
+ }
+
+ tsTryParseTypeParameters() {
+ if (this.match(47)) {
+ return this.tsParseTypeParameters();
+ }
+ }
+
+ tsParseTypeParameters() {
+ const node = this.startNode();
+
+ if (this.match(47) || this.match(138)) {
+ this.next();
+ } else {
+ this.unexpected();
+ }
+
+ const refTrailingCommaPos = {
+ value: -1
+ };
+ node.params = this.tsParseBracketedList("TypeParametersOrArguments", this.tsParseTypeParameter.bind(this), false, true, refTrailingCommaPos);
+
+ if (node.params.length === 0) {
+ this.raise(TSErrors.EmptyTypeParameters, {
+ node
+ });
+ }
+
+ if (refTrailingCommaPos.value !== -1) {
+ this.addExtra(node, "trailingComma", refTrailingCommaPos.value);
+ }
+
+ return this.finishNode(node, "TSTypeParameterDeclaration");
+ }
+
+ tsTryNextParseConstantContext() {
+ if (this.lookahead().type === 75) {
+ this.next();
+ return this.tsParseTypeReference();
+ }
+
+ return null;
+ }
+
+ tsFillSignature(returnToken, signature) {
+ const returnTokenRequired = returnToken === 19;
+ const paramsKey = "parameters";
+ const returnTypeKey = "typeAnnotation";
+ signature.typeParameters = this.tsTryParseTypeParameters();
+ this.expect(10);
+ signature[paramsKey] = this.tsParseBindingListForSignature();
+
+ if (returnTokenRequired) {
+ signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
+ } else if (this.match(returnToken)) {
+ signature[returnTypeKey] = this.tsParseTypeOrTypePredicateAnnotation(returnToken);
+ }
+ }
+
+ tsParseBindingListForSignature() {
+ return this.parseBindingList(11, 41).map(pattern => {
+ if (pattern.type !== "Identifier" && pattern.type !== "RestElement" && pattern.type !== "ObjectPattern" && pattern.type !== "ArrayPattern") {
+ this.raise(TSErrors.UnsupportedSignatureParameterKind, {
+ node: pattern
+ }, pattern.type);
+ }
+
+ return pattern;
+ });
+ }
+
+ tsParseTypeMemberSemicolon() {
+ if (!this.eat(12) && !this.isLineTerminator()) {
+ this.expect(13);
+ }
+ }
+
+ tsParseSignatureMember(kind, node) {
+ this.tsFillSignature(14, node);
+ this.tsParseTypeMemberSemicolon();
+ return this.finishNode(node, kind);
+ }
+
+ tsIsUnambiguouslyIndexSignature() {
+ this.next();
+
+ if (tokenIsIdentifier(this.state.type)) {
+ this.next();
+ return this.match(14);
+ }
+
+ return false;
+ }
+
+ tsTryParseIndexSignature(node) {
+ if (!(this.match(0) && this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))) {
+ return undefined;
+ }
+
+ this.expect(0);
+ const id = this.parseIdentifier();
+ id.typeAnnotation = this.tsParseTypeAnnotation();
+ this.resetEndLocation(id);
+ this.expect(3);
+ node.parameters = [id];
+ const type = this.tsTryParseTypeAnnotation();
+ if (type) node.typeAnnotation = type;
+ this.tsParseTypeMemberSemicolon();
+ return this.finishNode(node, "TSIndexSignature");
+ }
+
+ tsParsePropertyOrMethodSignature(node, readonly) {
+ if (this.eat(17)) node.optional = true;
+ const nodeAny = node;
+
+ if (this.match(10) || this.match(47)) {
+ if (readonly) {
+ this.raise(TSErrors.ReadonlyForMethodSignature, {
+ node
+ });
+ }
+
+ const method = nodeAny;
+
+ if (method.kind && this.match(47)) {
+ this.raise(TSErrors.AccesorCannotHaveTypeParameters, {
+ at: this.state.curPosition()
+ });
+ }
+
+ this.tsFillSignature(14, method);
+ this.tsParseTypeMemberSemicolon();
+ const paramsKey = "parameters";
+ const returnTypeKey = "typeAnnotation";
+
+ if (method.kind === "get") {
+ if (method[paramsKey].length > 0) {
+ this.raise(ErrorMessages.BadGetterArity, {
+ at: this.state.curPosition()
+ });
+
+ if (this.isThisParam(method[paramsKey][0])) {
+ this.raise(TSErrors.AccesorCannotDeclareThisParameter, {
+ at: this.state.curPosition()
+ });
+ }
+ }
+ } else if (method.kind === "set") {
+ if (method[paramsKey].length !== 1) {
+ this.raise(ErrorMessages.BadSetterArity, {
+ at: this.state.curPosition()
+ });
+ } else {
+ const firstParameter = method[paramsKey][0];
+
+ if (this.isThisParam(firstParameter)) {
+ this.raise(TSErrors.AccesorCannotDeclareThisParameter, {
+ at: this.state.curPosition()
+ });
+ }
+
+ if (firstParameter.type === "Identifier" && firstParameter.optional) {
+ this.raise(TSErrors.SetAccesorCannotHaveOptionalParameter, {
+ at: this.state.curPosition()
+ });
+ }
+
+ if (firstParameter.type === "RestElement") {
+ this.raise(TSErrors.SetAccesorCannotHaveRestParameter, {
+ at: this.state.curPosition()
+ });
+ }
+ }
+
+ if (method[returnTypeKey]) {
+ this.raise(TSErrors.SetAccesorCannotHaveReturnType, {
+ node: method[returnTypeKey]
+ });
+ }
+ } else {
+ method.kind = "method";
+ }
+
+ return this.finishNode(method, "TSMethodSignature");
+ } else {
+ const property = nodeAny;
+ if (readonly) property.readonly = true;
+ const type = this.tsTryParseTypeAnnotation();
+ if (type) property.typeAnnotation = type;
+ this.tsParseTypeMemberSemicolon();
+ return this.finishNode(property, "TSPropertySignature");
+ }
+ }
+
+ tsParseTypeMember() {
+ const node = this.startNode();
+
+ if (this.match(10) || this.match(47)) {
+ return this.tsParseSignatureMember("TSCallSignatureDeclaration", node);
+ }
+
+ if (this.match(77)) {
+ const id = this.startNode();
+ this.next();
+
+ if (this.match(10) || this.match(47)) {
+ return this.tsParseSignatureMember("TSConstructSignatureDeclaration", node);
+ } else {
+ node.key = this.createIdentifier(id, "new");
+ return this.tsParsePropertyOrMethodSignature(node, false);
+ }
+ }
+
+ this.tsParseModifiers(node, ["readonly"], ["declare", "abstract", "private", "protected", "public", "static", "override"], TSErrors.InvalidModifierOnTypeMember);
+ const idx = this.tsTryParseIndexSignature(node);
+
+ if (idx) {
+ return idx;
+ }
+
+ this.parsePropertyName(node);
+
+ if (!node.computed && node.key.type === "Identifier" && (node.key.name === "get" || node.key.name === "set") && this.tsTokenCanFollowModifier()) {
+ node.kind = node.key.name;
+ this.parsePropertyName(node);
+ }
+
+ return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);
+ }
+
+ tsParseTypeLiteral() {
+ const node = this.startNode();
+ node.members = this.tsParseObjectTypeMembers();
+ return this.finishNode(node, "TSTypeLiteral");
+ }
+
+ tsParseObjectTypeMembers() {
+ this.expect(5);
+ const members = this.tsParseList("TypeMembers", this.tsParseTypeMember.bind(this));
+ this.expect(8);
+ return members;
+ }
+
+ tsIsStartOfMappedType() {
+ this.next();
+
+ if (this.eat(53)) {
+ return this.isContextual(118);
+ }
+
+ if (this.isContextual(118)) {
+ this.next();
+ }
+
+ if (!this.match(0)) {
+ return false;
+ }
+
+ this.next();
+
+ if (!this.tsIsIdentifier()) {
+ return false;
+ }
+
+ this.next();
+ return this.match(58);
+ }
+
+ tsParseMappedTypeParameter() {
+ const node = this.startNode();
+ node.name = this.tsParseTypeParameterName();
+ node.constraint = this.tsExpectThenParseType(58);
+ return this.finishNode(node, "TSTypeParameter");
+ }
+
+ tsParseMappedType() {
+ const node = this.startNode();
+ this.expect(5);
+
+ if (this.match(53)) {
+ node.readonly = this.state.value;
+ this.next();
+ this.expectContextual(118);
+ } else if (this.eatContextual(118)) {
+ node.readonly = true;
+ }
+
+ this.expect(0);
+ node.typeParameter = this.tsParseMappedTypeParameter();
+ node.nameType = this.eatContextual(93) ? this.tsParseType() : null;
+ this.expect(3);
+
+ if (this.match(53)) {
+ node.optional = this.state.value;
+ this.next();
+ this.expect(17);
+ } else if (this.eat(17)) {
+ node.optional = true;
+ }
+
+ node.typeAnnotation = this.tsTryParseType();
+ this.semicolon();
+ this.expect(8);
+ return this.finishNode(node, "TSMappedType");
+ }
+
+ tsParseTupleType() {
+ const node = this.startNode();
+ node.elementTypes = this.tsParseBracketedList("TupleElementTypes", this.tsParseTupleElementType.bind(this), true, false);
+ let seenOptionalElement = false;
+ let labeledElements = null;
+ node.elementTypes.forEach(elementNode => {
+ var _labeledElements;
+
+ let {
+ type
+ } = elementNode;
+
+ if (seenOptionalElement && type !== "TSRestType" && type !== "TSOptionalType" && !(type === "TSNamedTupleMember" && elementNode.optional)) {
+ this.raise(TSErrors.OptionalTypeBeforeRequired, {
+ node: elementNode
+ });
+ }
+
+ seenOptionalElement = seenOptionalElement || type === "TSNamedTupleMember" && elementNode.optional || type === "TSOptionalType";
+
+ if (type === "TSRestType") {
+ elementNode = elementNode.typeAnnotation;
+ type = elementNode.type;
+ }
+
+ const isLabeled = type === "TSNamedTupleMember";
+ labeledElements = (_labeledElements = labeledElements) != null ? _labeledElements : isLabeled;
+
+ if (labeledElements !== isLabeled) {
+ this.raise(TSErrors.MixedLabeledAndUnlabeledElements, {
+ node: elementNode
+ });
+ }
+ });
+ return this.finishNode(node, "TSTupleType");
+ }
+
+ tsParseTupleElementType() {
+ const {
+ start: startPos,
+ startLoc
+ } = this.state;
+ const rest = this.eat(21);
+ let type = this.tsParseType();
+ const optional = this.eat(17);
+ const labeled = this.eat(14);
+
+ if (labeled) {
+ const labeledNode = this.startNodeAtNode(type);
+ labeledNode.optional = optional;
+
+ if (type.type === "TSTypeReference" && !type.typeParameters && type.typeName.type === "Identifier") {
+ labeledNode.label = type.typeName;
+ } else {
+ this.raise(TSErrors.InvalidTupleMemberLabel, {
+ node: type
+ });
+ labeledNode.label = type;
+ }
+
+ labeledNode.elementType = this.tsParseType();
+ type = this.finishNode(labeledNode, "TSNamedTupleMember");
+ } else if (optional) {
+ const optionalTypeNode = this.startNodeAtNode(type);
+ optionalTypeNode.typeAnnotation = type;
+ type = this.finishNode(optionalTypeNode, "TSOptionalType");
+ }
+
+ if (rest) {
+ const restNode = this.startNodeAt(startPos, startLoc);
+ restNode.typeAnnotation = type;
+ type = this.finishNode(restNode, "TSRestType");
+ }
+
+ return type;
+ }
+
+ tsParseParenthesizedType() {
+ const node = this.startNode();
+ this.expect(10);
+ node.typeAnnotation = this.tsParseType();
+ this.expect(11);
+ return this.finishNode(node, "TSParenthesizedType");
+ }
+
+ tsParseFunctionOrConstructorType(type, abstract) {
+ const node = this.startNode();
+
+ if (type === "TSConstructorType") {
+ node.abstract = !!abstract;
+ if (abstract) this.next();
+ this.next();
+ }
+
+ this.tsFillSignature(19, node);
+ return this.finishNode(node, type);
+ }
+
+ tsParseLiteralTypeNode() {
+ const node = this.startNode();
+
+ node.literal = (() => {
+ switch (this.state.type) {
+ case 130:
+ case 131:
+ case 129:
+ case 85:
+ case 86:
+ return this.parseExprAtom();
+
+ default:
+ throw this.unexpected();
+ }
+ })();
+
+ return this.finishNode(node, "TSLiteralType");
+ }
+
+ tsParseTemplateLiteralType() {
+ const node = this.startNode();
+ node.literal = this.parseTemplate(false);
+ return this.finishNode(node, "TSLiteralType");
+ }
+
+ parseTemplateSubstitution() {
+ if (this.state.inType) return this.tsParseType();
+ return super.parseTemplateSubstitution();
+ }
+
+ tsParseThisTypeOrThisTypePredicate() {
+ const thisKeyword = this.tsParseThisTypeNode();
+
+ if (this.isContextual(113) && !this.hasPrecedingLineBreak()) {
+ return this.tsParseThisTypePredicate(thisKeyword);
+ } else {
+ return thisKeyword;
+ }
+ }
+
+ tsParseNonArrayType() {
+ switch (this.state.type) {
+ case 129:
+ case 130:
+ case 131:
+ case 85:
+ case 86:
+ return this.tsParseLiteralTypeNode();
+
+ case 53:
+ if (this.state.value === "-") {
+ const node = this.startNode();
+ const nextToken = this.lookahead();
+
+ if (nextToken.type !== 130 && nextToken.type !== 131) {
+ throw this.unexpected();
+ }
+
+ node.literal = this.parseMaybeUnary();
+ return this.finishNode(node, "TSLiteralType");
+ }
+
+ break;
+
+ case 78:
+ return this.tsParseThisTypeOrThisTypePredicate();
+
+ case 87:
+ return this.tsParseTypeQuery();
+
+ case 83:
+ return this.tsParseImportType();
+
+ case 5:
+ return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this)) ? this.tsParseMappedType() : this.tsParseTypeLiteral();
+
+ case 0:
+ return this.tsParseTupleType();
+
+ case 10:
+ return this.tsParseParenthesizedType();
+
+ case 25:
+ case 24:
+ return this.tsParseTemplateLiteralType();
+
+ default:
+ {
+ const {
+ type
+ } = this.state;
+
+ if (tokenIsIdentifier(type) || type === 88 || type === 84) {
+ const nodeType = type === 88 ? "TSVoidKeyword" : type === 84 ? "TSNullKeyword" : keywordTypeFromName(this.state.value);
+
+ if (nodeType !== undefined && this.lookaheadCharCode() !== 46) {
+ const node = this.startNode();
+ this.next();
+ return this.finishNode(node, nodeType);
+ }
+
+ return this.tsParseTypeReference();
+ }
+ }
+ }
+
+ throw this.unexpected();
+ }
+
+ tsParseArrayTypeOrHigher() {
+ let type = this.tsParseNonArrayType();
+
+ while (!this.hasPrecedingLineBreak() && this.eat(0)) {
+ if (this.match(3)) {
+ const node = this.startNodeAtNode(type);
+ node.elementType = type;
+ this.expect(3);
+ type = this.finishNode(node, "TSArrayType");
+ } else {
+ const node = this.startNodeAtNode(type);
+ node.objectType = type;
+ node.indexType = this.tsParseType();
+ this.expect(3);
+ type = this.finishNode(node, "TSIndexedAccessType");
+ }
+ }
+
+ return type;
+ }
+
+ tsParseTypeOperator() {
+ const node = this.startNode();
+ const operator = this.state.value;
+ this.next();
+ node.operator = operator;
+ node.typeAnnotation = this.tsParseTypeOperatorOrHigher();
+
+ if (operator === "readonly") {
+ this.tsCheckTypeAnnotationForReadOnly(node);
+ }
+
+ return this.finishNode(node, "TSTypeOperator");
+ }
+
+ tsCheckTypeAnnotationForReadOnly(node) {
+ switch (node.typeAnnotation.type) {
+ case "TSTupleType":
+ case "TSArrayType":
+ return;
+
+ default:
+ this.raise(TSErrors.UnexpectedReadonly, {
+ node
+ });
+ }
+ }
+
+ tsParseInferType() {
+ const node = this.startNode();
+ this.expectContextual(112);
+ const typeParameter = this.startNode();
+ typeParameter.name = this.tsParseTypeParameterName();
+ node.typeParameter = this.finishNode(typeParameter, "TSTypeParameter");
+ return this.finishNode(node, "TSInferType");
+ }
+
+ tsParseTypeOperatorOrHigher() {
+ const isTypeOperator = tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc;
+ return isTypeOperator ? this.tsParseTypeOperator() : this.isContextual(112) ? this.tsParseInferType() : this.tsParseArrayTypeOrHigher();
+ }
+
+ tsParseUnionOrIntersectionType(kind, parseConstituentType, operator) {
+ const node = this.startNode();
+ const hasLeadingOperator = this.eat(operator);
+ const types = [];
+
+ do {
+ types.push(parseConstituentType());
+ } while (this.eat(operator));
+
+ if (types.length === 1 && !hasLeadingOperator) {
+ return types[0];
+ }
+
+ node.types = types;
+ return this.finishNode(node, kind);
+ }
+
+ tsParseIntersectionTypeOrHigher() {
+ return this.tsParseUnionOrIntersectionType("TSIntersectionType", this.tsParseTypeOperatorOrHigher.bind(this), 45);
+ }
+
+ tsParseUnionTypeOrHigher() {
+ return this.tsParseUnionOrIntersectionType("TSUnionType", this.tsParseIntersectionTypeOrHigher.bind(this), 43);
+ }
+
+ tsIsStartOfFunctionType() {
+ if (this.match(47)) {
+ return true;
+ }
+
+ return this.match(10) && this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this));
+ }
+
+ tsSkipParameterStart() {
+ if (tokenIsIdentifier(this.state.type) || this.match(78)) {
+ this.next();
+ return true;
+ }
+
+ if (this.match(5)) {
+ let braceStackCounter = 1;
+ this.next();
+
+ while (braceStackCounter > 0) {
+ if (this.match(5)) {
+ ++braceStackCounter;
+ } else if (this.match(8)) {
+ --braceStackCounter;
+ }
+
+ this.next();
+ }
+
+ return true;
+ }
+
+ if (this.match(0)) {
+ let braceStackCounter = 1;
+ this.next();
+
+ while (braceStackCounter > 0) {
+ if (this.match(0)) {
+ ++braceStackCounter;
+ } else if (this.match(3)) {
+ --braceStackCounter;
+ }
+
+ this.next();
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ tsIsUnambiguouslyStartOfFunctionType() {
+ this.next();
+
+ if (this.match(11) || this.match(21)) {
+ return true;
+ }
+
+ if (this.tsSkipParameterStart()) {
+ if (this.match(14) || this.match(12) || this.match(17) || this.match(29)) {
+ return true;
+ }
+
+ if (this.match(11)) {
+ this.next();
+
+ if (this.match(19)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ tsParseTypeOrTypePredicateAnnotation(returnToken) {
+ return this.tsInType(() => {
+ const t = this.startNode();
+ this.expect(returnToken);
+ const node = this.startNode();
+ const asserts = !!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));
+
+ if (asserts && this.match(78)) {
+ let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();
+
+ if (thisTypePredicate.type === "TSThisType") {
+ node.parameterName = thisTypePredicate;
+ node.asserts = true;
+ node.typeAnnotation = null;
+ thisTypePredicate = this.finishNode(node, "TSTypePredicate");
+ } else {
+ this.resetStartLocationFromNode(thisTypePredicate, node);
+ thisTypePredicate.asserts = true;
+ }
+
+ t.typeAnnotation = thisTypePredicate;
+ return this.finishNode(t, "TSTypeAnnotation");
+ }
+
+ const typePredicateVariable = this.tsIsIdentifier() && this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));
+
+ if (!typePredicateVariable) {
+ if (!asserts) {
+ return this.tsParseTypeAnnotation(false, t);
+ }
+
+ node.parameterName = this.parseIdentifier();
+ node.asserts = asserts;
+ node.typeAnnotation = null;
+ t.typeAnnotation = this.finishNode(node, "TSTypePredicate");
+ return this.finishNode(t, "TSTypeAnnotation");
+ }
+
+ const type = this.tsParseTypeAnnotation(false);
+ node.parameterName = typePredicateVariable;
+ node.typeAnnotation = type;
+ node.asserts = asserts;
+ t.typeAnnotation = this.finishNode(node, "TSTypePredicate");
+ return this.finishNode(t, "TSTypeAnnotation");
+ });
+ }
+
+ tsTryParseTypeOrTypePredicateAnnotation() {
+ return this.match(14) ? this.tsParseTypeOrTypePredicateAnnotation(14) : undefined;
+ }
+
+ tsTryParseTypeAnnotation() {
+ return this.match(14) ? this.tsParseTypeAnnotation() : undefined;
+ }
+
+ tsTryParseType() {
+ return this.tsEatThenParseType(14);
+ }
+
+ tsParseTypePredicatePrefix() {
+ const id = this.parseIdentifier();
+
+ if (this.isContextual(113) && !this.hasPrecedingLineBreak()) {
+ this.next();
+ return id;
+ }
+ }
+
+ tsParseTypePredicateAsserts() {
+ if (this.state.type !== 106) {
+ return false;
+ }
+
+ const containsEsc = this.state.containsEsc;
+ this.next();
+
+ if (!tokenIsIdentifier(this.state.type) && !this.match(78)) {
+ return false;
+ }
+
+ if (containsEsc) {
+ this.raise(ErrorMessages.InvalidEscapedReservedWord, {
+ at: this.state.lastTokStartLoc
+ }, "asserts");
+ }
+
+ return true;
+ }
+
+ tsParseTypeAnnotation(eatColon = true, t = this.startNode()) {
+ this.tsInType(() => {
+ if (eatColon) this.expect(14);
+ t.typeAnnotation = this.tsParseType();
+ });
+ return this.finishNode(t, "TSTypeAnnotation");
+ }
+
+ tsParseType() {
+ assert(this.state.inType);
+ const type = this.tsParseNonConditionalType();
+
+ if (this.hasPrecedingLineBreak() || !this.eat(81)) {
+ return type;
+ }
+
+ const node = this.startNodeAtNode(type);
+ node.checkType = type;
+ node.extendsType = this.tsParseNonConditionalType();
+ this.expect(17);
+ node.trueType = this.tsParseType();
+ this.expect(14);
+ node.falseType = this.tsParseType();
+ return this.finishNode(node, "TSConditionalType");
+ }
+
+ isAbstractConstructorSignature() {
+ return this.isContextual(120) && this.lookahead().type === 77;
+ }
+
+ tsParseNonConditionalType() {
+ if (this.tsIsStartOfFunctionType()) {
+ return this.tsParseFunctionOrConstructorType("TSFunctionType");
+ }
+
+ if (this.match(77)) {
+ return this.tsParseFunctionOrConstructorType("TSConstructorType");
+ } else if (this.isAbstractConstructorSignature()) {
+ return this.tsParseFunctionOrConstructorType("TSConstructorType", true);
+ }
+
+ return this.tsParseUnionTypeOrHigher();
+ }
+
+ tsParseTypeAssertion() {
+ if (this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) {
+ this.raise(TSErrors.ReservedTypeAssertion, {
+ at: this.state.startLoc
+ });
+ }
+
+ const node = this.startNode();
+
+ const _const = this.tsTryNextParseConstantContext();
+
+ node.typeAnnotation = _const || this.tsNextThenParseType();
+ this.expect(48);
+ node.expression = this.parseMaybeUnary();
+ return this.finishNode(node, "TSTypeAssertion");
+ }
+
+ tsParseHeritageClause(descriptor) {
+ const originalStartLoc = this.state.startLoc;
+ const delimitedList = this.tsParseDelimitedList("HeritageClauseElement", this.tsParseExpressionWithTypeArguments.bind(this));
+
+ if (!delimitedList.length) {
+ this.raise(TSErrors.EmptyHeritageClauseType, {
+ at: originalStartLoc
+ }, descriptor);
+ }
+
+ return delimitedList;
+ }
+
+ tsParseExpressionWithTypeArguments() {
+ const node = this.startNode();
+ node.expression = this.tsParseEntityName(false);
+
+ if (this.match(47)) {
+ node.typeParameters = this.tsParseTypeArguments();
+ }
+
+ return this.finishNode(node, "TSExpressionWithTypeArguments");
+ }
+
+ tsParseInterfaceDeclaration(node) {
+ if (tokenIsIdentifier(this.state.type)) {
+ node.id = this.parseIdentifier();
+ this.checkLVal(node.id, "typescript interface declaration", BIND_TS_INTERFACE);
+ } else {
+ node.id = null;
+ this.raise(TSErrors.MissingInterfaceName, {
+ at: this.state.startLoc
+ });
+ }
+
+ node.typeParameters = this.tsTryParseTypeParameters();
+
+ if (this.eat(81)) {
+ node.extends = this.tsParseHeritageClause("extends");
+ }
+
+ const body = this.startNode();
+ body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
+ node.body = this.finishNode(body, "TSInterfaceBody");
+ return this.finishNode(node, "TSInterfaceDeclaration");
+ }
+
+ tsParseTypeAliasDeclaration(node) {
+ node.id = this.parseIdentifier();
+ this.checkLVal(node.id, "typescript type alias", BIND_TS_TYPE);
+ node.typeParameters = this.tsTryParseTypeParameters();
+ node.typeAnnotation = this.tsInType(() => {
+ this.expect(29);
+
+ if (this.isContextual(111) && this.lookahead().type !== 16) {
+ const node = this.startNode();
+ this.next();
+ return this.finishNode(node, "TSIntrinsicKeyword");
+ }
+
+ return this.tsParseType();
+ });
+ this.semicolon();
+ return this.finishNode(node, "TSTypeAliasDeclaration");
+ }
+
+ tsInNoContext(cb) {
+ const oldContext = this.state.context;
+ this.state.context = [oldContext[0]];
+
+ try {
+ return cb();
+ } finally {
+ this.state.context = oldContext;
+ }
+ }
+
+ tsInType(cb) {
+ const oldInType = this.state.inType;
+ this.state.inType = true;
+
+ try {
+ return cb();
+ } finally {
+ this.state.inType = oldInType;
+ }
+ }
+
+ tsEatThenParseType(token) {
+ return !this.match(token) ? undefined : this.tsNextThenParseType();
+ }
+
+ tsExpectThenParseType(token) {
+ return this.tsDoThenParseType(() => this.expect(token));
+ }
+
+ tsNextThenParseType() {
+ return this.tsDoThenParseType(() => this.next());
+ }
+
+ tsDoThenParseType(cb) {
+ return this.tsInType(() => {
+ cb();
+ return this.tsParseType();
+ });
+ }
+
+ tsParseEnumMember() {
+ const node = this.startNode();
+ node.id = this.match(129) ? this.parseExprAtom() : this.parseIdentifier(true);
+
+ if (this.eat(29)) {
+ node.initializer = this.parseMaybeAssignAllowIn();
+ }
+
+ return this.finishNode(node, "TSEnumMember");
+ }
+
+ tsParseEnumDeclaration(node, isConst) {
+ if (isConst) node.const = true;
+ node.id = this.parseIdentifier();
+ this.checkLVal(node.id, "typescript enum declaration", isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM);
+ this.expect(5);
+ node.members = this.tsParseDelimitedList("EnumMembers", this.tsParseEnumMember.bind(this));
+ this.expect(8);
+ return this.finishNode(node, "TSEnumDeclaration");
+ }
+
+ tsParseModuleBlock() {
+ const node = this.startNode();
+ this.scope.enter(SCOPE_OTHER);
+ this.expect(5);
+ this.parseBlockOrModuleBlockBody(node.body = [], undefined, true, 8);
+ this.scope.exit();
+ return this.finishNode(node, "TSModuleBlock");
+ }
+
+ tsParseModuleOrNamespaceDeclaration(node, nested = false) {
+ node.id = this.parseIdentifier();
+
+ if (!nested) {
+ this.checkLVal(node.id, "module or namespace declaration", BIND_TS_NAMESPACE);
+ }
+
+ if (this.eat(16)) {
+ const inner = this.startNode();
+ this.tsParseModuleOrNamespaceDeclaration(inner, true);
+ node.body = inner;
+ } else {
+ this.scope.enter(SCOPE_TS_MODULE);
+ this.prodParam.enter(PARAM);
+ node.body = this.tsParseModuleBlock();
+ this.prodParam.exit();
+ this.scope.exit();
+ }
+
+ return this.finishNode(node, "TSModuleDeclaration");
+ }
+
+ tsParseAmbientExternalModuleDeclaration(node) {
+ if (this.isContextual(109)) {
+ node.global = true;
+ node.id = this.parseIdentifier();
+ } else if (this.match(129)) {
+ node.id = this.parseExprAtom();
+ } else {
+ this.unexpected();
+ }
+
+ if (this.match(5)) {
+ this.scope.enter(SCOPE_TS_MODULE);
+ this.prodParam.enter(PARAM);
+ node.body = this.tsParseModuleBlock();
+ this.prodParam.exit();
+ this.scope.exit();
+ } else {
+ this.semicolon();
+ }
+
+ return this.finishNode(node, "TSModuleDeclaration");
+ }
+
+ tsParseImportEqualsDeclaration(node, isExport) {
+ node.isExport = isExport || false;
+ node.id = this.parseIdentifier();
+ this.checkLVal(node.id, "import equals declaration", BIND_LEXICAL);
+ this.expect(29);
+ const moduleReference = this.tsParseModuleReference();
+
+ if (node.importKind === "type" && moduleReference.type !== "TSExternalModuleReference") {
+ this.raise(TSErrors.ImportAliasHasImportType, {
+ node: moduleReference
+ });
+ }
+
+ node.moduleReference = moduleReference;
+ this.semicolon();
+ return this.finishNode(node, "TSImportEqualsDeclaration");
+ }
+
+ tsIsExternalModuleReference() {
+ return this.isContextual(116) && this.lookaheadCharCode() === 40;
+ }
+
+ tsParseModuleReference() {
+ return this.tsIsExternalModuleReference() ? this.tsParseExternalModuleReference() : this.tsParseEntityName(false);
+ }
+
+ tsParseExternalModuleReference() {
+ const node = this.startNode();
+ this.expectContextual(116);
+ this.expect(10);
+
+ if (!this.match(129)) {
+ throw this.unexpected();
+ }
+
+ node.expression = this.parseExprAtom();
+ this.expect(11);
+ return this.finishNode(node, "TSExternalModuleReference");
+ }
+
+ tsLookAhead(f) {
+ const state = this.state.clone();
+ const res = f();
+ this.state = state;
+ return res;
+ }
+
+ tsTryParseAndCatch(f) {
+ const result = this.tryParse(abort => f() || abort());
+ if (result.aborted || !result.node) return undefined;
+ if (result.error) this.state = result.failState;
+ return result.node;
+ }
+
+ tsTryParse(f) {
+ const state = this.state.clone();
+ const result = f();
+
+ if (result !== undefined && result !== false) {
+ return result;
+ } else {
+ this.state = state;
+ return undefined;
+ }
+ }
+
+ tsTryParseDeclare(nany) {
+ if (this.isLineTerminator()) {
+ return;
+ }
+
+ let starttype = this.state.type;
+ let kind;
+
+ if (this.isContextual(99)) {
+ starttype = 74;
+ kind = "let";
+ }
+
+ return this.tsInAmbientContext(() => {
+ switch (starttype) {
+ case 68:
+ nany.declare = true;
+ return this.parseFunctionStatement(nany, false, true);
+
+ case 80:
+ nany.declare = true;
+ return this.parseClass(nany, true, false);
+
+ case 75:
+ if (this.match(75) && this.isLookaheadContextual("enum")) {
+ this.expect(75);
+ this.expectContextual(122);
+ return this.tsParseEnumDeclaration(nany, true);
+ }
+
+ case 74:
+ kind = kind || this.state.value;
+ return this.parseVarStatement(nany, kind);
+
+ case 109:
+ return this.tsParseAmbientExternalModuleDeclaration(nany);
+
+ default:
+ {
+ if (tokenIsIdentifier(starttype)) {
+ return this.tsParseDeclaration(nany, this.state.value, true);
+ }
+ }
+ }
+ });
+ }
+
+ tsTryParseExportDeclaration() {
+ return this.tsParseDeclaration(this.startNode(), this.state.value, true);
+ }
+
+ tsParseExpressionStatement(node, expr) {
+ switch (expr.name) {
+ case "declare":
+ {
+ const declaration = this.tsTryParseDeclare(node);
+
+ if (declaration) {
+ declaration.declare = true;
+ return declaration;
+ }
+
+ break;
+ }
+
+ case "global":
+ if (this.match(5)) {
+ this.scope.enter(SCOPE_TS_MODULE);
+ this.prodParam.enter(PARAM);
+ const mod = node;
+ mod.global = true;
+ mod.id = expr;
+ mod.body = this.tsParseModuleBlock();
+ this.scope.exit();
+ this.prodParam.exit();
+ return this.finishNode(mod, "TSModuleDeclaration");
+ }
+
+ break;
+
+ default:
+ return this.tsParseDeclaration(node, expr.name, false);
+ }
+ }
+
+ tsParseDeclaration(node, value, next) {
+ switch (value) {
+ case "abstract":
+ if (this.tsCheckLineTerminator(next) && (this.match(80) || tokenIsIdentifier(this.state.type))) {
+ return this.tsParseAbstractDeclaration(node);
+ }
+
+ break;
+
+ case "enum":
+ if (next || tokenIsIdentifier(this.state.type)) {
+ if (next) this.next();
+ return this.tsParseEnumDeclaration(node, false);
+ }
+
+ break;
+
+ case "interface":
+ if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
+ return this.tsParseInterfaceDeclaration(node);
+ }
+
+ break;
+
+ case "module":
+ if (this.tsCheckLineTerminator(next)) {
+ if (this.match(129)) {
+ return this.tsParseAmbientExternalModuleDeclaration(node);
+ } else if (tokenIsIdentifier(this.state.type)) {
+ return this.tsParseModuleOrNamespaceDeclaration(node);
+ }
+ }
+
+ break;
+
+ case "namespace":
+ if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
+ return this.tsParseModuleOrNamespaceDeclaration(node);
+ }
+
+ break;
+
+ case "type":
+ if (this.tsCheckLineTerminator(next) && tokenIsIdentifier(this.state.type)) {
+ return this.tsParseTypeAliasDeclaration(node);
+ }
+
+ break;
+ }
+ }
+
+ tsCheckLineTerminator(next) {
+ if (next) {
+ if (this.hasFollowingLineBreak()) return false;
+ this.next();
+ return true;
+ }
+
+ return !this.isLineTerminator();
+ }
+
+ tsTryParseGenericAsyncArrowFunction(startPos, startLoc) {
+ if (!this.match(47)) {
+ return undefined;
+ }
+
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+ this.state.maybeInArrowParameters = true;
+ const res = this.tsTryParseAndCatch(() => {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.typeParameters = this.tsParseTypeParameters();
+ super.parseFunctionParams(node);
+ node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();
+ this.expect(19);
+ return node;
+ });
+ this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
+
+ if (!res) {
+ return undefined;
+ }
+
+ return this.parseArrowExpression(res, null, true);
+ }
+
+ tsParseTypeArgumentsInExpression() {
+ if (this.reScan_lt() !== 47) {
+ return undefined;
+ }
+
+ return this.tsParseTypeArguments();
+ }
+
+ tsParseTypeArguments() {
+ const node = this.startNode();
+ node.params = this.tsInType(() => this.tsInNoContext(() => {
+ this.expect(47);
+ return this.tsParseDelimitedList("TypeParametersOrArguments", this.tsParseType.bind(this));
+ }));
+
+ if (node.params.length === 0) {
+ this.raise(TSErrors.EmptyTypeArguments, {
+ node
+ });
+ }
+
+ this.expect(48);
+ return this.finishNode(node, "TSTypeParameterInstantiation");
+ }
+
+ tsIsDeclarationStart() {
+ return tokenIsTSDeclarationStart(this.state.type);
+ }
+
+ isExportDefaultSpecifier() {
+ if (this.tsIsDeclarationStart()) return false;
+ return super.isExportDefaultSpecifier();
+ }
+
+ parseAssignableListItem(allowModifiers, decorators) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let accessibility;
+ let readonly = false;
+ let override = false;
+
+ if (allowModifiers !== undefined) {
+ const modified = {};
+ this.tsParseModifiers(modified, ["public", "private", "protected", "override", "readonly"]);
+ accessibility = modified.accessibility;
+ override = modified.override;
+ readonly = modified.readonly;
+
+ if (allowModifiers === false && (accessibility || readonly || override)) {
+ this.raise(TSErrors.UnexpectedParameterModifier, {
+ at: startLoc
+ });
+ }
+ }
+
+ const left = this.parseMaybeDefault();
+ this.parseAssignableListItemTypes(left);
+ const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
+
+ if (accessibility || readonly || override) {
+ const pp = this.startNodeAt(startPos, startLoc);
+
+ if (decorators.length) {
+ pp.decorators = decorators;
+ }
+
+ if (accessibility) pp.accessibility = accessibility;
+ if (readonly) pp.readonly = readonly;
+ if (override) pp.override = override;
+
+ if (elt.type !== "Identifier" && elt.type !== "AssignmentPattern") {
+ this.raise(TSErrors.UnsupportedParameterPropertyKind, {
+ node: pp
+ });
+ }
+
+ pp.parameter = elt;
+ return this.finishNode(pp, "TSParameterProperty");
+ }
+
+ if (decorators.length) {
+ left.decorators = decorators;
+ }
+
+ return elt;
+ }
+
+ parseFunctionBodyAndFinish(node, type, isMethod = false) {
+ if (this.match(14)) {
+ node.returnType = this.tsParseTypeOrTypePredicateAnnotation(14);
+ }
+
+ const bodilessType = type === "FunctionDeclaration" ? "TSDeclareFunction" : type === "ClassMethod" || type === "ClassPrivateMethod" ? "TSDeclareMethod" : undefined;
+
+ if (bodilessType && !this.match(5) && this.isLineTerminator()) {
+ this.finishNode(node, bodilessType);
+ return;
+ }
+
+ if (bodilessType === "TSDeclareFunction" && this.state.isAmbientContext) {
+ this.raise(TSErrors.DeclareFunctionHasImplementation, {
+ node
+ });
+
+ if (node.declare) {
+ super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);
+ return;
+ }
+ }
+
+ super.parseFunctionBodyAndFinish(node, type, isMethod);
+ }
+
+ registerFunctionStatementId(node) {
+ if (!node.body && node.id) {
+ this.checkLVal(node.id, "function name", BIND_TS_AMBIENT);
+ } else {
+ super.registerFunctionStatementId(...arguments);
+ }
+ }
+
+ tsCheckForInvalidTypeCasts(items) {
+ items.forEach(node => {
+ if ((node == null ? void 0 : node.type) === "TSTypeCastExpression") {
+ this.raise(TSErrors.UnexpectedTypeAnnotation, {
+ node: node.typeAnnotation
+ });
+ }
+ });
+ }
+
+ toReferencedList(exprList, isInParens) {
+ this.tsCheckForInvalidTypeCasts(exprList);
+ return exprList;
+ }
+
+ parseArrayLike(...args) {
+ const node = super.parseArrayLike(...args);
+
+ if (node.type === "ArrayExpression") {
+ this.tsCheckForInvalidTypeCasts(node.elements);
+ }
+
+ return node;
+ }
+
+ parseSubscript(base, startPos, startLoc, noCalls, state) {
+ if (!this.hasPrecedingLineBreak() && this.match(35)) {
+ this.state.canStartJSXElement = false;
+ this.next();
+ const nonNullExpression = this.startNodeAt(startPos, startLoc);
+ nonNullExpression.expression = base;
+ return this.finishNode(nonNullExpression, "TSNonNullExpression");
+ }
+
+ let isOptionalCall = false;
+
+ if (this.match(18) && this.lookaheadCharCode() === 60) {
+ if (noCalls) {
+ state.stop = true;
+ return base;
+ }
+
+ state.optionalChainMember = isOptionalCall = true;
+ this.next();
+ }
+
+ if (this.match(47) || this.match(51)) {
+ let missingParenErrorLoc;
+ const result = this.tsTryParseAndCatch(() => {
+ if (!noCalls && this.atPossibleAsyncArrow(base)) {
+ const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(startPos, startLoc);
+
+ if (asyncArrowFn) {
+ return asyncArrowFn;
+ }
+ }
+
+ const node = this.startNodeAt(startPos, startLoc);
+ node.callee = base;
+ const typeArguments = this.tsParseTypeArgumentsInExpression();
+
+ if (typeArguments) {
+ if (isOptionalCall && !this.match(10)) {
+ missingParenErrorLoc = this.state.curPosition();
+ this.unexpected();
+ }
+
+ if (!noCalls && this.eat(10)) {
+ node.arguments = this.parseCallExpressionArguments(11, false);
+ this.tsCheckForInvalidTypeCasts(node.arguments);
+ node.typeParameters = typeArguments;
+
+ if (state.optionalChainMember) {
+ node.optional = isOptionalCall;
+ }
+
+ return this.finishCallExpression(node, state.optionalChainMember);
+ } else if (tokenIsTemplate(this.state.type)) {
+ const result = this.parseTaggedTemplateExpression(base, startPos, startLoc, state);
+ result.typeParameters = typeArguments;
+ return result;
+ }
+ }
+
+ this.unexpected();
+ });
+
+ if (missingParenErrorLoc) {
+ this.unexpected(missingParenErrorLoc, 10);
+ }
+
+ if (result) return result;
+ }
+
+ return super.parseSubscript(base, startPos, startLoc, noCalls, state);
+ }
+
+ parseNewArguments(node) {
+ if (this.match(47) || this.match(51)) {
+ const typeParameters = this.tsTryParseAndCatch(() => {
+ const args = this.tsParseTypeArgumentsInExpression();
+ if (!this.match(10)) this.unexpected();
+ return args;
+ });
+
+ if (typeParameters) {
+ node.typeParameters = typeParameters;
+ }
+ }
+
+ super.parseNewArguments(node);
+ }
+
+ parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
+ if (tokenOperatorPrecedence(58) > minPrec && !this.hasPrecedingLineBreak() && this.isContextual(93)) {
+ const node = this.startNodeAt(leftStartPos, leftStartLoc);
+ node.expression = left;
+
+ const _const = this.tsTryNextParseConstantContext();
+
+ if (_const) {
+ node.typeAnnotation = _const;
+ } else {
+ node.typeAnnotation = this.tsNextThenParseType();
+ }
+
+ this.finishNode(node, "TSAsExpression");
+ this.reScan_lt_gt();
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
+ }
+
+ return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec);
+ }
+
+ checkReservedWord(word, startLoc, checkKeywords, isBinding) {}
+
+ checkDuplicateExports() {}
+
+ parseImport(node) {
+ node.importKind = "value";
+
+ if (tokenIsIdentifier(this.state.type) || this.match(55) || this.match(5)) {
+ let ahead = this.lookahead();
+
+ if (this.isContextual(126) && ahead.type !== 12 && ahead.type !== 97 && ahead.type !== 29) {
+ node.importKind = "type";
+ this.next();
+ ahead = this.lookahead();
+ }
+
+ if (tokenIsIdentifier(this.state.type) && ahead.type === 29) {
+ return this.tsParseImportEqualsDeclaration(node);
+ }
+ }
+
+ const importNode = super.parseImport(node);
+
+ if (importNode.importKind === "type" && importNode.specifiers.length > 1 && importNode.specifiers[0].type === "ImportDefaultSpecifier") {
+ this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, {
+ node: importNode
+ });
+ }
+
+ return importNode;
+ }
+
+ parseExport(node) {
+ if (this.match(83)) {
+ this.next();
+
+ if (this.isContextual(126) && this.lookaheadCharCode() !== 61) {
+ node.importKind = "type";
+ this.next();
+ } else {
+ node.importKind = "value";
+ }
+
+ return this.tsParseImportEqualsDeclaration(node, true);
+ } else if (this.eat(29)) {
+ const assign = node;
+ assign.expression = this.parseExpression();
+ this.semicolon();
+ return this.finishNode(assign, "TSExportAssignment");
+ } else if (this.eatContextual(93)) {
+ const decl = node;
+ this.expectContextual(124);
+ decl.id = this.parseIdentifier();
+ this.semicolon();
+ return this.finishNode(decl, "TSNamespaceExportDeclaration");
+ } else {
+ if (this.isContextual(126) && this.lookahead().type === 5) {
+ this.next();
+ node.exportKind = "type";
+ } else {
+ node.exportKind = "value";
+ }
+
+ return super.parseExport(node);
+ }
+ }
+
+ isAbstractClass() {
+ return this.isContextual(120) && this.lookahead().type === 80;
+ }
+
+ parseExportDefaultExpression() {
+ if (this.isAbstractClass()) {
+ const cls = this.startNode();
+ this.next();
+ cls.abstract = true;
+ this.parseClass(cls, true, true);
+ return cls;
+ }
+
+ if (this.match(125)) {
+ const interfaceNode = this.startNode();
+ this.next();
+ const result = this.tsParseInterfaceDeclaration(interfaceNode);
+ if (result) return result;
+ }
+
+ return super.parseExportDefaultExpression();
+ }
+
+ parseStatementContent(context, topLevel) {
+ if (this.state.type === 75) {
+ const ahead = this.lookahead();
+
+ if (ahead.type === 122) {
+ const node = this.startNode();
+ this.next();
+ this.expectContextual(122);
+ return this.tsParseEnumDeclaration(node, true);
+ }
+ }
+
+ return super.parseStatementContent(context, topLevel);
+ }
+
+ parseAccessModifier() {
+ return this.tsParseModifier(["public", "protected", "private"]);
+ }
+
+ tsHasSomeModifiers(member, modifiers) {
+ return modifiers.some(modifier => {
+ if (tsIsAccessModifier(modifier)) {
+ return member.accessibility === modifier;
+ }
+
+ return !!member[modifier];
+ });
+ }
+
+ tsIsStartOfStaticBlocks() {
+ return this.isContextual(104) && this.lookaheadCharCode() === 123;
+ }
+
+ parseClassMember(classBody, member, state) {
+ const modifiers = ["declare", "private", "public", "protected", "override", "abstract", "readonly", "static"];
+ this.tsParseModifiers(member, modifiers, undefined, undefined, true);
+
+ const callParseClassMemberWithIsStatic = () => {
+ if (this.tsIsStartOfStaticBlocks()) {
+ this.next();
+ this.next();
+
+ if (this.tsHasSomeModifiers(member, modifiers)) {
+ this.raise(TSErrors.StaticBlockCannotHaveModifier, {
+ at: this.state.curPosition()
+ });
+ }
+
+ this.parseClassStaticBlock(classBody, member);
+ } else {
+ this.parseClassMemberWithIsStatic(classBody, member, state, !!member.static);
+ }
+ };
+
+ if (member.declare) {
+ this.tsInAmbientContext(callParseClassMemberWithIsStatic);
+ } else {
+ callParseClassMemberWithIsStatic();
+ }
+ }
+
+ parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
+ const idx = this.tsTryParseIndexSignature(member);
+
+ if (idx) {
+ classBody.body.push(idx);
+
+ if (member.abstract) {
+ this.raise(TSErrors.IndexSignatureHasAbstract, {
+ node: member
+ });
+ }
+
+ if (member.accessibility) {
+ this.raise(TSErrors.IndexSignatureHasAccessibility, {
+ node: member
+ }, member.accessibility);
+ }
+
+ if (member.declare) {
+ this.raise(TSErrors.IndexSignatureHasDeclare, {
+ node: member
+ });
+ }
+
+ if (member.override) {
+ this.raise(TSErrors.IndexSignatureHasOverride, {
+ node: member
+ });
+ }
+
+ return;
+ }
+
+ if (!this.state.inAbstractClass && member.abstract) {
+ this.raise(TSErrors.NonAbstractClassHasAbstractMethod, {
+ node: member
+ });
+ }
+
+ if (member.override) {
+ if (!state.hadSuperClass) {
+ this.raise(TSErrors.OverrideNotInSubClass, {
+ node: member
+ });
+ }
+ }
+
+ super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
+ }
+
+ parsePostMemberNameModifiers(methodOrProp) {
+ const optional = this.eat(17);
+ if (optional) methodOrProp.optional = true;
+
+ if (methodOrProp.readonly && this.match(10)) {
+ this.raise(TSErrors.ClassMethodHasReadonly, {
+ node: methodOrProp
+ });
+ }
+
+ if (methodOrProp.declare && this.match(10)) {
+ this.raise(TSErrors.ClassMethodHasDeclare, {
+ node: methodOrProp
+ });
+ }
+ }
+
+ parseExpressionStatement(node, expr) {
+ const decl = expr.type === "Identifier" ? this.tsParseExpressionStatement(node, expr) : undefined;
+ return decl || super.parseExpressionStatement(node, expr);
+ }
+
+ shouldParseExportDeclaration() {
+ if (this.tsIsDeclarationStart()) return true;
+ return super.shouldParseExportDeclaration();
+ }
+
+ parseConditional(expr, startPos, startLoc, refExpressionErrors) {
+ if (!this.state.maybeInArrowParameters || !this.match(17)) {
+ return super.parseConditional(expr, startPos, startLoc, refExpressionErrors);
+ }
+
+ const result = this.tryParse(() => super.parseConditional(expr, startPos, startLoc));
+
+ if (!result.node) {
+ if (result.error) {
+ super.setOptionalParametersError(refExpressionErrors, result.error);
+ }
+
+ return expr;
+ }
+
+ if (result.error) this.state = result.failState;
+ return result.node;
+ }
+
+ parseParenItem(node, startPos, startLoc) {
+ node = super.parseParenItem(node, startPos, startLoc);
+
+ if (this.eat(17)) {
+ node.optional = true;
+ this.resetEndLocation(node);
+ }
+
+ if (this.match(14)) {
+ const typeCastNode = this.startNodeAt(startPos, startLoc);
+ typeCastNode.expression = node;
+ typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();
+ return this.finishNode(typeCastNode, "TSTypeCastExpression");
+ }
+
+ return node;
+ }
+
+ parseExportDeclaration(node) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const isDeclare = this.eatContextual(121);
+
+ if (isDeclare && (this.isContextual(121) || !this.shouldParseExportDeclaration())) {
+ throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, {
+ at: this.state.startLoc
+ });
+ }
+
+ let declaration;
+
+ if (tokenIsIdentifier(this.state.type)) {
+ declaration = this.tsTryParseExportDeclaration();
+ }
+
+ if (!declaration) {
+ declaration = super.parseExportDeclaration(node);
+ }
+
+ if (declaration && (declaration.type === "TSInterfaceDeclaration" || declaration.type === "TSTypeAliasDeclaration" || isDeclare)) {
+ node.exportKind = "type";
+ }
+
+ if (declaration && isDeclare) {
+ this.resetStartLocation(declaration, startPos, startLoc);
+ declaration.declare = true;
+ }
+
+ return declaration;
+ }
+
+ parseClassId(node, isStatement, optionalId) {
+ if ((!isStatement || optionalId) && this.isContextual(110)) {
+ return;
+ }
+
+ super.parseClassId(node, isStatement, optionalId, node.declare ? BIND_TS_AMBIENT : BIND_CLASS);
+ const typeParameters = this.tsTryParseTypeParameters();
+ if (typeParameters) node.typeParameters = typeParameters;
+ }
+
+ parseClassPropertyAnnotation(node) {
+ if (!node.optional && this.eat(35)) {
+ node.definite = true;
+ }
+
+ const type = this.tsTryParseTypeAnnotation();
+ if (type) node.typeAnnotation = type;
+ }
+
+ parseClassProperty(node) {
+ this.parseClassPropertyAnnotation(node);
+
+ if (this.state.isAmbientContext && this.match(29)) {
+ this.raise(TSErrors.DeclareClassFieldHasInitializer, {
+ at: this.state.startLoc
+ });
+ }
+
+ if (node.abstract && this.match(29)) {
+ const {
+ key
+ } = node;
+ this.raise(TSErrors.AbstractPropertyHasInitializer, {
+ at: this.state.startLoc
+ }, key.type === "Identifier" && !node.computed ? key.name : `[${this.input.slice(key.start, key.end)}]`);
+ }
+
+ return super.parseClassProperty(node);
+ }
+
+ parseClassPrivateProperty(node) {
+ if (node.abstract) {
+ this.raise(TSErrors.PrivateElementHasAbstract, {
+ node
+ });
+ }
+
+ if (node.accessibility) {
+ this.raise(TSErrors.PrivateElementHasAccessibility, {
+ node
+ }, node.accessibility);
+ }
+
+ this.parseClassPropertyAnnotation(node);
+ return super.parseClassPrivateProperty(node);
+ }
+
+ pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
+ const typeParameters = this.tsTryParseTypeParameters();
+
+ if (typeParameters && isConstructor) {
+ this.raise(TSErrors.ConstructorHasTypeParameters, {
+ node: typeParameters
+ });
+ }
+
+ if (method.declare && (method.kind === "get" || method.kind === "set")) {
+ this.raise(TSErrors.DeclareAccessor, {
+ node: method
+ }, method.kind);
+ }
+
+ if (typeParameters) method.typeParameters = typeParameters;
+ super.pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper);
+ }
+
+ pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
+ const typeParameters = this.tsTryParseTypeParameters();
+ if (typeParameters) method.typeParameters = typeParameters;
+ super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);
+ }
+
+ declareClassPrivateMethodInScope(node, kind) {
+ if (node.type === "TSDeclareMethod") return;
+ if (node.type === "MethodDefinition" && !node.value.body) return;
+ super.declareClassPrivateMethodInScope(node, kind);
+ }
+
+ parseClassSuper(node) {
+ super.parseClassSuper(node);
+
+ if (node.superClass && (this.match(47) || this.match(51))) {
+ node.superTypeParameters = this.tsParseTypeArgumentsInExpression();
+ }
+
+ if (this.eatContextual(110)) {
+ node.implements = this.tsParseHeritageClause("implements");
+ }
+ }
+
+ parseObjPropValue(prop, ...args) {
+ const typeParameters = this.tsTryParseTypeParameters();
+ if (typeParameters) prop.typeParameters = typeParameters;
+ super.parseObjPropValue(prop, ...args);
+ }
+
+ parseFunctionParams(node, allowModifiers) {
+ const typeParameters = this.tsTryParseTypeParameters();
+ if (typeParameters) node.typeParameters = typeParameters;
+ super.parseFunctionParams(node, allowModifiers);
+ }
+
+ parseVarId(decl, kind) {
+ super.parseVarId(decl, kind);
+
+ if (decl.id.type === "Identifier" && !this.hasPrecedingLineBreak() && this.eat(35)) {
+ decl.definite = true;
+ }
+
+ const type = this.tsTryParseTypeAnnotation();
+
+ if (type) {
+ decl.id.typeAnnotation = type;
+ this.resetEndLocation(decl.id);
+ }
+ }
+
+ parseAsyncArrowFromCallExpression(node, call) {
+ if (this.match(14)) {
+ node.returnType = this.tsParseTypeAnnotation();
+ }
+
+ return super.parseAsyncArrowFromCallExpression(node, call);
+ }
+
+ parseMaybeAssign(...args) {
+ var _jsx, _jsx2, _typeCast, _jsx3, _typeCast2, _jsx4, _typeCast3;
+
+ let state;
+ let jsx;
+ let typeCast;
+
+ if (this.hasPlugin("jsx") && (this.match(138) || this.match(47))) {
+ state = this.state.clone();
+ jsx = this.tryParse(() => super.parseMaybeAssign(...args), state);
+ if (!jsx.error) return jsx.node;
+ const {
+ context
+ } = this.state;
+ const currentContext = context[context.length - 1];
+
+ if (currentContext === types.j_oTag || currentContext === types.j_expr) {
+ context.pop();
+ }
+ }
+
+ if (!((_jsx = jsx) != null && _jsx.error) && !this.match(47)) {
+ return super.parseMaybeAssign(...args);
+ }
+
+ let typeParameters;
+ state = state || this.state.clone();
+ const arrow = this.tryParse(abort => {
+ var _expr$extra, _typeParameters;
+
+ typeParameters = this.tsParseTypeParameters();
+ const expr = super.parseMaybeAssign(...args);
+
+ if (expr.type !== "ArrowFunctionExpression" || (_expr$extra = expr.extra) != null && _expr$extra.parenthesized) {
+ abort();
+ }
+
+ if (((_typeParameters = typeParameters) == null ? void 0 : _typeParameters.params.length) !== 0) {
+ this.resetStartLocationFromNode(expr, typeParameters);
+ }
+
+ expr.typeParameters = typeParameters;
+ return expr;
+ }, state);
+
+ if (!arrow.error && !arrow.aborted) {
+ if (typeParameters) this.reportReservedArrowTypeParam(typeParameters);
+ return arrow.node;
+ }
+
+ if (!jsx) {
+ assert(!this.hasPlugin("jsx"));
+ typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);
+ if (!typeCast.error) return typeCast.node;
+ }
+
+ if ((_jsx2 = jsx) != null && _jsx2.node) {
+ this.state = jsx.failState;
+ return jsx.node;
+ }
+
+ if (arrow.node) {
+ this.state = arrow.failState;
+ if (typeParameters) this.reportReservedArrowTypeParam(typeParameters);
+ return arrow.node;
+ }
+
+ if ((_typeCast = typeCast) != null && _typeCast.node) {
+ this.state = typeCast.failState;
+ return typeCast.node;
+ }
+
+ if ((_jsx3 = jsx) != null && _jsx3.thrown) throw jsx.error;
+ if (arrow.thrown) throw arrow.error;
+ if ((_typeCast2 = typeCast) != null && _typeCast2.thrown) throw typeCast.error;
+ throw ((_jsx4 = jsx) == null ? void 0 : _jsx4.error) || arrow.error || ((_typeCast3 = typeCast) == null ? void 0 : _typeCast3.error);
+ }
+
+ reportReservedArrowTypeParam(node) {
+ var _node$extra;
+
+ if (node.params.length === 1 && !((_node$extra = node.extra) != null && _node$extra.trailingComma) && this.getPluginOption("typescript", "disallowAmbiguousJSXLike")) {
+ this.raise(TSErrors.ReservedArrowTypeParam, {
+ node
+ });
+ }
+ }
+
+ parseMaybeUnary(refExpressionErrors) {
+ if (!this.hasPlugin("jsx") && this.match(47)) {
+ return this.tsParseTypeAssertion();
+ } else {
+ return super.parseMaybeUnary(refExpressionErrors);
+ }
+ }
+
+ parseArrow(node) {
+ if (this.match(14)) {
+ const result = this.tryParse(abort => {
+ const returnType = this.tsParseTypeOrTypePredicateAnnotation(14);
+ if (this.canInsertSemicolon() || !this.match(19)) abort();
+ return returnType;
+ });
+ if (result.aborted) return;
+
+ if (!result.thrown) {
+ if (result.error) this.state = result.failState;
+ node.returnType = result.node;
+ }
+ }
+
+ return super.parseArrow(node);
+ }
+
+ parseAssignableListItemTypes(param) {
+ if (this.eat(17)) {
+ if (param.type !== "Identifier" && !this.state.isAmbientContext && !this.state.inType) {
+ this.raise(TSErrors.PatternIsOptional, {
+ node: param
+ });
+ }
+
+ param.optional = true;
+ }
+
+ const type = this.tsTryParseTypeAnnotation();
+ if (type) param.typeAnnotation = type;
+ this.resetEndLocation(param);
+ return param;
+ }
+
+ isAssignable(node, isBinding) {
+ switch (node.type) {
+ case "TSTypeCastExpression":
+ return this.isAssignable(node.expression, isBinding);
+
+ case "TSParameterProperty":
+ return true;
+
+ default:
+ return super.isAssignable(node, isBinding);
+ }
+ }
+
+ toAssignable(node, isLHS = false) {
+ switch (node.type) {
+ case "TSTypeCastExpression":
+ return super.toAssignable(this.typeCastToParameter(node), isLHS);
+
+ case "TSParameterProperty":
+ return super.toAssignable(node, isLHS);
+
+ case "ParenthesizedExpression":
+ return this.toAssignableParenthesizedExpression(node, isLHS);
+
+ case "TSAsExpression":
+ case "TSNonNullExpression":
+ case "TSTypeAssertion":
+ node.expression = this.toAssignable(node.expression, isLHS);
+ return node;
+
+ default:
+ return super.toAssignable(node, isLHS);
+ }
+ }
+
+ toAssignableParenthesizedExpression(node, isLHS) {
+ switch (node.expression.type) {
+ case "TSAsExpression":
+ case "TSNonNullExpression":
+ case "TSTypeAssertion":
+ case "ParenthesizedExpression":
+ node.expression = this.toAssignable(node.expression, isLHS);
+ return node;
+
+ default:
+ return super.toAssignable(node, isLHS);
+ }
+ }
+
+ checkLVal(expr, contextDescription, ...args) {
+ var _expr$extra2;
+
+ switch (expr.type) {
+ case "TSTypeCastExpression":
+ return;
+
+ case "TSParameterProperty":
+ this.checkLVal(expr.parameter, "parameter property", ...args);
+ return;
+
+ case "TSAsExpression":
+ case "TSTypeAssertion":
+ if (!args[0] && contextDescription !== "parenthesized expression" && !((_expr$extra2 = expr.extra) != null && _expr$extra2.parenthesized)) {
+ this.raise(ErrorMessages.InvalidLhs, {
+ node: expr
+ }, contextDescription);
+ break;
+ }
+
+ this.checkLVal(expr.expression, "parenthesized expression", ...args);
+ return;
+
+ case "TSNonNullExpression":
+ this.checkLVal(expr.expression, contextDescription, ...args);
+ return;
+
+ default:
+ super.checkLVal(expr, contextDescription, ...args);
+ return;
+ }
+ }
+
+ parseBindingAtom() {
+ switch (this.state.type) {
+ case 78:
+ return this.parseIdentifier(true);
+
+ default:
+ return super.parseBindingAtom();
+ }
+ }
+
+ parseMaybeDecoratorArguments(expr) {
+ if (this.match(47) || this.match(51)) {
+ const typeArguments = this.tsParseTypeArgumentsInExpression();
+
+ if (this.match(10)) {
+ const call = super.parseMaybeDecoratorArguments(expr);
+ call.typeParameters = typeArguments;
+ return call;
+ }
+
+ this.unexpected(null, 10);
+ }
+
+ return super.parseMaybeDecoratorArguments(expr);
+ }
+
+ checkCommaAfterRest(close) {
+ if (this.state.isAmbientContext && this.match(12) && this.lookaheadCharCode() === close) {
+ this.next();
+ return false;
+ } else {
+ return super.checkCommaAfterRest(close);
+ }
+ }
+
+ isClassMethod() {
+ return this.match(47) || super.isClassMethod();
+ }
+
+ isClassProperty() {
+ return this.match(35) || this.match(14) || super.isClassProperty();
+ }
+
+ parseMaybeDefault(...args) {
+ const node = super.parseMaybeDefault(...args);
+
+ if (node.type === "AssignmentPattern" && node.typeAnnotation && node.right.start < node.typeAnnotation.start) {
+ this.raise(TSErrors.TypeAnnotationAfterAssign, {
+ node: node.typeAnnotation
+ });
+ }
+
+ return node;
+ }
+
+ getTokenFromCode(code) {
+ if (this.state.inType) {
+ if (code === 62) {
+ return this.finishOp(48, 1);
+ }
+
+ if (code === 60) {
+ return this.finishOp(47, 1);
+ }
+ }
+
+ return super.getTokenFromCode(code);
+ }
+
+ reScan_lt_gt() {
+ const {
+ type
+ } = this.state;
+
+ if (type === 47) {
+ this.state.pos -= 1;
+ this.readToken_lt();
+ } else if (type === 48) {
+ this.state.pos -= 1;
+ this.readToken_gt();
+ }
+ }
+
+ reScan_lt() {
+ const {
+ type
+ } = this.state;
+
+ if (type === 51) {
+ this.state.pos -= 2;
+ this.finishOp(47, 1);
+ return 47;
+ }
+
+ return type;
+ }
+
+ toAssignableList(exprList) {
+ for (let i = 0; i < exprList.length; i++) {
+ const expr = exprList[i];
+ if (!expr) continue;
+
+ switch (expr.type) {
+ case "TSTypeCastExpression":
+ exprList[i] = this.typeCastToParameter(expr);
+ break;
+
+ case "TSAsExpression":
+ case "TSTypeAssertion":
+ if (!this.state.maybeInArrowParameters) {
+ exprList[i] = this.typeCastToParameter(expr);
+ } else {
+ this.raise(TSErrors.UnexpectedTypeCastInParameter, {
+ node: expr
+ });
+ }
+
+ break;
+ }
+ }
+
+ return super.toAssignableList(...arguments);
+ }
+
+ typeCastToParameter(node) {
+ node.expression.typeAnnotation = node.typeAnnotation;
+ this.resetEndLocation(node.expression, node.typeAnnotation.loc.end);
+ return node.expression;
+ }
+
+ shouldParseArrow(params) {
+ if (this.match(14)) {
+ return params.every(expr => this.isAssignable(expr, true));
+ }
+
+ return super.shouldParseArrow(params);
+ }
+
+ shouldParseAsyncArrow() {
+ return this.match(14) || super.shouldParseAsyncArrow();
+ }
+
+ canHaveLeadingDecorator() {
+ return super.canHaveLeadingDecorator() || this.isAbstractClass();
+ }
+
+ jsxParseOpeningElementAfterName(node) {
+ if (this.match(47) || this.match(51)) {
+ const typeArguments = this.tsTryParseAndCatch(() => this.tsParseTypeArgumentsInExpression());
+ if (typeArguments) node.typeParameters = typeArguments;
+ }
+
+ return super.jsxParseOpeningElementAfterName(node);
+ }
+
+ getGetterSetterExpectedParamCount(method) {
+ const baseCount = super.getGetterSetterExpectedParamCount(method);
+ const params = this.getObjectOrClassMethodParams(method);
+ const firstParam = params[0];
+ const hasContextParam = firstParam && this.isThisParam(firstParam);
+ return hasContextParam ? baseCount + 1 : baseCount;
+ }
+
+ parseCatchClauseParam() {
+ const param = super.parseCatchClauseParam();
+ const type = this.tsTryParseTypeAnnotation();
+
+ if (type) {
+ param.typeAnnotation = type;
+ this.resetEndLocation(param);
+ }
+
+ return param;
+ }
+
+ tsInAmbientContext(cb) {
+ const oldIsAmbientContext = this.state.isAmbientContext;
+ this.state.isAmbientContext = true;
+
+ try {
+ return cb();
+ } finally {
+ this.state.isAmbientContext = oldIsAmbientContext;
+ }
+ }
+
+ parseClass(node, ...args) {
+ const oldInAbstractClass = this.state.inAbstractClass;
+ this.state.inAbstractClass = !!node.abstract;
+
+ try {
+ return super.parseClass(node, ...args);
+ } finally {
+ this.state.inAbstractClass = oldInAbstractClass;
+ }
+ }
+
+ tsParseAbstractDeclaration(node) {
+ if (this.match(80)) {
+ node.abstract = true;
+ return this.parseClass(node, true, false);
+ } else if (this.isContextual(125)) {
+ if (!this.hasFollowingLineBreak()) {
+ node.abstract = true;
+ this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifer, {
+ node
+ });
+ this.next();
+ return this.tsParseInterfaceDeclaration(node);
+ }
+ } else {
+ this.unexpected(null, 80);
+ }
+ }
+
+ parseMethod(...args) {
+ const method = super.parseMethod(...args);
+
+ if (method.abstract) {
+ const hasBody = this.hasPlugin("estree") ? !!method.value.body : !!method.body;
+
+ if (hasBody) {
+ const {
+ key
+ } = method;
+ this.raise(TSErrors.AbstractMethodHasImplementation, {
+ node: method
+ }, key.type === "Identifier" && !method.computed ? key.name : `[${this.input.slice(key.start, key.end)}]`);
+ }
+ }
+
+ return method;
+ }
+
+ tsParseTypeParameterName() {
+ const typeName = this.parseIdentifier();
+ return typeName.name;
+ }
+
+ shouldParseAsAmbientContext() {
+ return !!this.getPluginOption("typescript", "dts");
+ }
+
+ parse() {
+ if (this.shouldParseAsAmbientContext()) {
+ this.state.isAmbientContext = true;
+ }
+
+ return super.parse();
+ }
+
+ getExpression() {
+ if (this.shouldParseAsAmbientContext()) {
+ this.state.isAmbientContext = true;
+ }
+
+ return super.getExpression();
+ }
+
+ parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) {
+ if (!isString && isMaybeTypeOnly) {
+ this.parseTypeOnlyImportExportSpecifier(node, false, isInTypeExport);
+ return this.finishNode(node, "ExportSpecifier");
+ }
+
+ node.exportKind = "value";
+ return super.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly);
+ }
+
+ parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly) {
+ if (!importedIsString && isMaybeTypeOnly) {
+ this.parseTypeOnlyImportExportSpecifier(specifier, true, isInTypeOnlyImport);
+ return this.finishNode(specifier, "ImportSpecifier");
+ }
+
+ specifier.importKind = "value";
+ return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly);
+ }
+
+ parseTypeOnlyImportExportSpecifier(node, isImport, isInTypeOnlyImportExport) {
+ const leftOfAsKey = isImport ? "imported" : "local";
+ const rightOfAsKey = isImport ? "local" : "exported";
+ let leftOfAs = node[leftOfAsKey];
+ let rightOfAs;
+ let hasTypeSpecifier = false;
+ let canParseAsKeyword = true;
+ const loc = leftOfAs.loc.start;
+
+ if (this.isContextual(93)) {
+ const firstAs = this.parseIdentifier();
+
+ if (this.isContextual(93)) {
+ const secondAs = this.parseIdentifier();
+
+ if (tokenIsKeywordOrIdentifier(this.state.type)) {
+ hasTypeSpecifier = true;
+ leftOfAs = firstAs;
+ rightOfAs = this.parseIdentifier();
+ canParseAsKeyword = false;
+ } else {
+ rightOfAs = secondAs;
+ canParseAsKeyword = false;
+ }
+ } else if (tokenIsKeywordOrIdentifier(this.state.type)) {
+ canParseAsKeyword = false;
+ rightOfAs = this.parseIdentifier();
+ } else {
+ hasTypeSpecifier = true;
+ leftOfAs = firstAs;
+ }
+ } else if (tokenIsKeywordOrIdentifier(this.state.type)) {
+ hasTypeSpecifier = true;
+ leftOfAs = this.parseIdentifier();
+ }
+
+ if (hasTypeSpecifier && isInTypeOnlyImportExport) {
+ this.raise(isImport ? TSErrors.TypeModifierIsUsedInTypeImports : TSErrors.TypeModifierIsUsedInTypeExports, {
+ at: loc
+ });
+ }
+
+ node[leftOfAsKey] = leftOfAs;
+ node[rightOfAsKey] = rightOfAs;
+ const kindKey = isImport ? "importKind" : "exportKind";
+ node[kindKey] = hasTypeSpecifier ? "type" : "value";
+
+ if (canParseAsKeyword && this.eatContextual(93)) {
+ node[rightOfAsKey] = isImport ? this.parseIdentifier() : this.parseModuleExportName();
+ }
+
+ if (!node[rightOfAsKey]) {
+ node[rightOfAsKey] = cloneIdentifier(node[leftOfAsKey]);
+ }
+
+ if (isImport) {
+ this.checkLVal(node[rightOfAsKey], "import specifier", BIND_LEXICAL);
+ }
+ }
+
+});
+
+const PlaceholderErrors = makeErrorTemplates({
+ ClassNameIsRequired: "A class name is required."
+}, ErrorCodes.SyntaxError, "placeholders");
+var placeholders = (superClass => class extends superClass {
+ parsePlaceholder(expectedNode) {
+ if (this.match(140)) {
+ const node = this.startNode();
+ this.next();
+ this.assertNoSpace("Unexpected space in placeholder.");
+ node.name = super.parseIdentifier(true);
+ this.assertNoSpace("Unexpected space in placeholder.");
+ this.expect(140);
+ return this.finishPlaceholder(node, expectedNode);
+ }
+ }
+
+ finishPlaceholder(node, expectedNode) {
+ const isFinished = !!(node.expectedNode && node.type === "Placeholder");
+ node.expectedNode = expectedNode;
+ return isFinished ? node : this.finishNode(node, "Placeholder");
+ }
+
+ getTokenFromCode(code) {
+ if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) {
+ return this.finishOp(140, 2);
+ }
+
+ return super.getTokenFromCode(...arguments);
+ }
+
+ parseExprAtom() {
+ return this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments);
+ }
+
+ parseIdentifier() {
+ return this.parsePlaceholder("Identifier") || super.parseIdentifier(...arguments);
+ }
+
+ checkReservedWord(word) {
+ if (word !== undefined) super.checkReservedWord(...arguments);
+ }
+
+ parseBindingAtom() {
+ return this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments);
+ }
+
+ checkLVal(expr) {
+ if (expr.type !== "Placeholder") super.checkLVal(...arguments);
+ }
+
+ toAssignable(node) {
+ if (node && node.type === "Placeholder" && node.expectedNode === "Expression") {
+ node.expectedNode = "Pattern";
+ return node;
+ }
+
+ return super.toAssignable(...arguments);
+ }
+
+ isLet(context) {
+ if (super.isLet(context)) {
+ return true;
+ }
+
+ if (!this.isContextual(99)) {
+ return false;
+ }
+
+ if (context) return false;
+ const nextToken = this.lookahead();
+
+ if (nextToken.type === 140) {
+ return true;
+ }
+
+ return false;
+ }
+
+ verifyBreakContinue(node) {
+ if (node.label && node.label.type === "Placeholder") return;
+ super.verifyBreakContinue(...arguments);
+ }
+
+ parseExpressionStatement(node, expr) {
+ if (expr.type !== "Placeholder" || expr.extra && expr.extra.parenthesized) {
+ return super.parseExpressionStatement(...arguments);
+ }
+
+ if (this.match(14)) {
+ const stmt = node;
+ stmt.label = this.finishPlaceholder(expr, "Identifier");
+ this.next();
+ stmt.body = this.parseStatement("label");
+ return this.finishNode(stmt, "LabeledStatement");
+ }
+
+ this.semicolon();
+ node.name = expr.name;
+ return this.finishPlaceholder(node, "Statement");
+ }
+
+ parseBlock() {
+ return this.parsePlaceholder("BlockStatement") || super.parseBlock(...arguments);
+ }
+
+ parseFunctionId() {
+ return this.parsePlaceholder("Identifier") || super.parseFunctionId(...arguments);
+ }
+
+ parseClass(node, isStatement, optionalId) {
+ const type = isStatement ? "ClassDeclaration" : "ClassExpression";
+ this.next();
+ this.takeDecorators(node);
+ const oldStrict = this.state.strict;
+ const placeholder = this.parsePlaceholder("Identifier");
+
+ if (placeholder) {
+ if (this.match(81) || this.match(140) || this.match(5)) {
+ node.id = placeholder;
+ } else if (optionalId || !isStatement) {
+ node.id = null;
+ node.body = this.finishPlaceholder(placeholder, "ClassBody");
+ return this.finishNode(node, type);
+ } else {
+ throw this.raise(PlaceholderErrors.ClassNameIsRequired, {
+ at: this.state.startLoc
+ });
+ }
+ } else {
+ this.parseClassId(node, isStatement, optionalId);
+ }
+
+ this.parseClassSuper(node);
+ node.body = this.parsePlaceholder("ClassBody") || this.parseClassBody(!!node.superClass, oldStrict);
+ return this.finishNode(node, type);
+ }
+
+ parseExport(node) {
+ const placeholder = this.parsePlaceholder("Identifier");
+ if (!placeholder) return super.parseExport(...arguments);
+
+ if (!this.isContextual(97) && !this.match(12)) {
+ node.specifiers = [];
+ node.source = null;
+ node.declaration = this.finishPlaceholder(placeholder, "Declaration");
+ return this.finishNode(node, "ExportNamedDeclaration");
+ }
+
+ this.expectPlugin("exportDefaultFrom");
+ const specifier = this.startNode();
+ specifier.exported = placeholder;
+ node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
+ return super.parseExport(node);
+ }
+
+ isExportDefaultSpecifier() {
+ if (this.match(65)) {
+ const next = this.nextTokenStart();
+
+ if (this.isUnparsedContextual(next, "from")) {
+ if (this.input.startsWith(tokenLabelName(140), this.nextTokenStartSince(next + 4))) {
+ return true;
+ }
+ }
+ }
+
+ return super.isExportDefaultSpecifier();
+ }
+
+ maybeParseExportDefaultSpecifier(node) {
+ if (node.specifiers && node.specifiers.length > 0) {
+ return true;
+ }
+
+ return super.maybeParseExportDefaultSpecifier(...arguments);
+ }
+
+ checkExport(node) {
+ const {
+ specifiers
+ } = node;
+
+ if (specifiers != null && specifiers.length) {
+ node.specifiers = specifiers.filter(node => node.exported.type === "Placeholder");
+ }
+
+ super.checkExport(node);
+ node.specifiers = specifiers;
+ }
+
+ parseImport(node) {
+ const placeholder = this.parsePlaceholder("Identifier");
+ if (!placeholder) return super.parseImport(...arguments);
+ node.specifiers = [];
+
+ if (!this.isContextual(97) && !this.match(12)) {
+ node.source = this.finishPlaceholder(placeholder, "StringLiteral");
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration");
+ }
+
+ const specifier = this.startNodeAtNode(placeholder);
+ specifier.local = placeholder;
+ this.finishNode(specifier, "ImportDefaultSpecifier");
+ node.specifiers.push(specifier);
+
+ if (this.eat(12)) {
+ const hasStarImport = this.maybeParseStarImportSpecifier(node);
+ if (!hasStarImport) this.parseNamedImportSpecifiers(node);
+ }
+
+ this.expectContextual(97);
+ node.source = this.parseImportSource();
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration");
+ }
+
+ parseImportSource() {
+ return this.parsePlaceholder("StringLiteral") || super.parseImportSource(...arguments);
+ }
+
+});
+
+var v8intrinsic = (superClass => class extends superClass {
+ parseV8Intrinsic() {
+ if (this.match(54)) {
+ const v8IntrinsicStartLoc = this.state.startLoc;
+ const node = this.startNode();
+ this.next();
+
+ if (tokenIsIdentifier(this.state.type)) {
+ const name = this.parseIdentifierName(this.state.start);
+ const identifier = this.createIdentifier(node, name);
+ identifier.type = "V8IntrinsicIdentifier";
+
+ if (this.match(10)) {
+ return identifier;
+ }
+ }
+
+ this.unexpected(v8IntrinsicStartLoc);
+ }
+ }
+
+ parseExprAtom() {
+ return this.parseV8Intrinsic() || super.parseExprAtom(...arguments);
+ }
+
+});
+
+function hasPlugin(plugins, expectedConfig) {
+ const [expectedName, expectedOptions] = typeof expectedConfig === "string" ? [expectedConfig, {}] : expectedConfig;
+ const expectedKeys = Object.keys(expectedOptions);
+ const expectedOptionsIsEmpty = expectedKeys.length === 0;
+ return plugins.some(p => {
+ if (typeof p === "string") {
+ return expectedOptionsIsEmpty && p === expectedName;
+ } else {
+ const [pluginName, pluginOptions] = p;
+
+ if (pluginName !== expectedName) {
+ return false;
+ }
+
+ for (const key of expectedKeys) {
+ if (pluginOptions[key] !== expectedOptions[key]) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ });
+}
+function getPluginOption(plugins, name, option) {
+ const plugin = plugins.find(plugin => {
+ if (Array.isArray(plugin)) {
+ return plugin[0] === name;
+ } else {
+ return plugin === name;
+ }
+ });
+
+ if (plugin && Array.isArray(plugin)) {
+ return plugin[1][option];
+ }
+
+ return null;
+}
+const PIPELINE_PROPOSALS = ["minimal", "fsharp", "hack", "smart"];
+const TOPIC_TOKENS = ["^^", "@@", "^", "%", "#"];
+const RECORD_AND_TUPLE_SYNTAX_TYPES = ["hash", "bar"];
+function validatePlugins(plugins) {
+ if (hasPlugin(plugins, "decorators")) {
+ if (hasPlugin(plugins, "decorators-legacy")) {
+ throw new Error("Cannot use the decorators and decorators-legacy plugin together");
+ }
+
+ const decoratorsBeforeExport = getPluginOption(plugins, "decorators", "decoratorsBeforeExport");
+
+ if (decoratorsBeforeExport == null) {
+ throw new Error("The 'decorators' plugin requires a 'decoratorsBeforeExport' option," + " whose value must be a boolean. If you are migrating from" + " Babylon/Babel 6 or want to use the old decorators proposal, you" + " should use the 'decorators-legacy' plugin instead of 'decorators'.");
+ } else if (typeof decoratorsBeforeExport !== "boolean") {
+ throw new Error("'decoratorsBeforeExport' must be a boolean.");
+ }
+ }
+
+ if (hasPlugin(plugins, "flow") && hasPlugin(plugins, "typescript")) {
+ throw new Error("Cannot combine flow and typescript plugins.");
+ }
+
+ if (hasPlugin(plugins, "placeholders") && hasPlugin(plugins, "v8intrinsic")) {
+ throw new Error("Cannot combine placeholders and v8intrinsic plugins.");
+ }
+
+ if (hasPlugin(plugins, "pipelineOperator")) {
+ const proposal = getPluginOption(plugins, "pipelineOperator", "proposal");
+
+ if (!PIPELINE_PROPOSALS.includes(proposal)) {
+ const proposalList = PIPELINE_PROPOSALS.map(p => `"${p}"`).join(", ");
+ throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${proposalList}.`);
+ }
+
+ const tupleSyntaxIsHash = hasPlugin(plugins, ["recordAndTuple", {
+ syntaxType: "hash"
+ }]);
+
+ if (proposal === "hack") {
+ if (hasPlugin(plugins, "placeholders")) {
+ throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");
+ }
+
+ if (hasPlugin(plugins, "v8intrinsic")) {
+ throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");
+ }
+
+ const topicToken = getPluginOption(plugins, "pipelineOperator", "topicToken");
+
+ if (!TOPIC_TOKENS.includes(topicToken)) {
+ const tokenList = TOPIC_TOKENS.map(t => `"${t}"`).join(", ");
+ throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${tokenList}.`);
+ }
+
+ if (topicToken === "#" && tupleSyntaxIsHash) {
+ throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.');
+ }
+ } else if (proposal === "smart" && tupleSyntaxIsHash) {
+ throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.');
+ }
+ }
+
+ if (hasPlugin(plugins, "moduleAttributes")) {
+ {
+ if (hasPlugin(plugins, "importAssertions")) {
+ throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");
+ }
+
+ const moduleAttributesVerionPluginOption = getPluginOption(plugins, "moduleAttributes", "version");
+
+ if (moduleAttributesVerionPluginOption !== "may-2020") {
+ throw new Error("The 'moduleAttributes' plugin requires a 'version' option," + " representing the last proposal update. Currently, the" + " only supported value is 'may-2020'.");
+ }
+ }
+ }
+
+ if (hasPlugin(plugins, "recordAndTuple") && !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(getPluginOption(plugins, "recordAndTuple", "syntaxType"))) {
+ throw new Error("'recordAndTuple' requires 'syntaxType' option whose value should be one of: " + RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(", "));
+ }
+
+ if (hasPlugin(plugins, "asyncDoExpressions") && !hasPlugin(plugins, "doExpressions")) {
+ const error = new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");
+ error.missingPlugins = "doExpressions";
+ throw error;
+ }
+}
+const mixinPlugins = {
+ estree,
+ jsx,
+ flow,
+ typescript,
+ v8intrinsic,
+ placeholders
+};
+const mixinPluginNames = Object.keys(mixinPlugins);
+
+const defaultOptions = {
+ sourceType: "script",
+ sourceFilename: undefined,
+ startColumn: 0,
+ startLine: 1,
+ allowAwaitOutsideFunction: false,
+ allowReturnOutsideFunction: false,
+ allowImportExportEverywhere: false,
+ allowSuperOutsideMethod: false,
+ allowUndeclaredExports: false,
+ plugins: [],
+ strictMode: null,
+ ranges: false,
+ tokens: false,
+ createParenthesizedExpressions: false,
+ errorRecovery: false,
+ attachComment: true
+};
+function getOptions(opts) {
+ const options = {};
+
+ for (const key of Object.keys(defaultOptions)) {
+ options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key];
+ }
+
+ return options;
+}
+
+const unwrapParenthesizedExpression = node => {
+ return node.type === "ParenthesizedExpression" ? unwrapParenthesizedExpression(node.expression) : node;
+};
+
+class LValParser extends NodeUtils {
+ toAssignable(node, isLHS = false) {
+ var _node$extra, _node$extra3;
+
+ let parenthesized = undefined;
+
+ if (node.type === "ParenthesizedExpression" || (_node$extra = node.extra) != null && _node$extra.parenthesized) {
+ parenthesized = unwrapParenthesizedExpression(node);
+
+ if (isLHS) {
+ if (parenthesized.type === "Identifier") {
+ this.expressionScope.recordParenthesizedIdentifierError(ErrorMessages.InvalidParenthesizedAssignment, node.loc.start);
+ } else if (parenthesized.type !== "MemberExpression") {
+ this.raise(ErrorMessages.InvalidParenthesizedAssignment, {
+ node
+ });
+ }
+ } else {
+ this.raise(ErrorMessages.InvalidParenthesizedAssignment, {
+ node
+ });
+ }
+ }
+
+ switch (node.type) {
+ case "Identifier":
+ case "ObjectPattern":
+ case "ArrayPattern":
+ case "AssignmentPattern":
+ case "RestElement":
+ break;
+
+ case "ObjectExpression":
+ node.type = "ObjectPattern";
+
+ for (let i = 0, length = node.properties.length, last = length - 1; i < length; i++) {
+ var _node$extra2;
+
+ const prop = node.properties[i];
+ const isLast = i === last;
+ this.toAssignableObjectExpressionProp(prop, isLast, isLHS);
+
+ if (isLast && prop.type === "RestElement" && (_node$extra2 = node.extra) != null && _node$extra2.trailingCommaLoc) {
+ this.raise(ErrorMessages.RestTrailingComma, {
+ at: node.extra.trailingCommaLoc
+ });
+ }
+ }
+
+ break;
+
+ case "ObjectProperty":
+ {
+ const {
+ key,
+ value
+ } = node;
+
+ if (this.isPrivateName(key)) {
+ this.classScope.usePrivateName(this.getPrivateNameSV(key), key.loc.start);
+ }
+
+ this.toAssignable(value, isLHS);
+ break;
+ }
+
+ case "SpreadElement":
+ {
+ this.checkToRestConversion(node);
+ node.type = "RestElement";
+ const arg = node.argument;
+ this.toAssignable(arg, isLHS);
+ break;
+ }
+
+ case "ArrayExpression":
+ node.type = "ArrayPattern";
+ this.toAssignableList(node.elements, (_node$extra3 = node.extra) == null ? void 0 : _node$extra3.trailingCommaLoc, isLHS);
+ break;
+
+ case "AssignmentExpression":
+ if (node.operator !== "=") {
+ this.raise(ErrorMessages.MissingEqInAssignment, {
+ at: node.left.loc.end
+ });
+ }
+
+ node.type = "AssignmentPattern";
+ delete node.operator;
+ this.toAssignable(node.left, isLHS);
+ break;
+
+ case "ParenthesizedExpression":
+ this.toAssignable(parenthesized, isLHS);
+ break;
+ }
+
+ return node;
+ }
+
+ toAssignableObjectExpressionProp(prop, isLast, isLHS) {
+ if (prop.type === "ObjectMethod") {
+ this.raise(prop.kind === "get" || prop.kind === "set" ? ErrorMessages.PatternHasAccessor : ErrorMessages.PatternHasMethod, {
+ node: prop.key
+ });
+ } else if (prop.type === "SpreadElement" && !isLast) {
+ this.raise(ErrorMessages.RestTrailingComma, {
+ node: prop
+ });
+ } else {
+ this.toAssignable(prop, isLHS);
+ }
+ }
+
+ toAssignableList(exprList, trailingCommaLoc, isLHS) {
+ let end = exprList.length;
+
+ if (end) {
+ const last = exprList[end - 1];
+
+ if ((last == null ? void 0 : last.type) === "RestElement") {
+ --end;
+ } else if ((last == null ? void 0 : last.type) === "SpreadElement") {
+ last.type = "RestElement";
+ let arg = last.argument;
+ this.toAssignable(arg, isLHS);
+ arg = unwrapParenthesizedExpression(arg);
+
+ if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern" && arg.type !== "ObjectPattern") {
+ this.unexpected(arg.start);
+ }
+
+ if (trailingCommaLoc) {
+ this.raise(ErrorMessages.RestTrailingComma, {
+ at: trailingCommaLoc
+ });
+ }
+
+ --end;
+ }
+ }
+
+ for (let i = 0; i < end; i++) {
+ const elt = exprList[i];
+
+ if (elt) {
+ this.toAssignable(elt, isLHS);
+
+ if (elt.type === "RestElement") {
+ this.raise(ErrorMessages.RestTrailingComma, {
+ node: elt
+ });
+ }
+ }
+ }
+
+ return exprList;
+ }
+
+ isAssignable(node, isBinding) {
+ switch (node.type) {
+ case "Identifier":
+ case "ObjectPattern":
+ case "ArrayPattern":
+ case "AssignmentPattern":
+ case "RestElement":
+ return true;
+
+ case "ObjectExpression":
+ {
+ const last = node.properties.length - 1;
+ return node.properties.every((prop, i) => {
+ return prop.type !== "ObjectMethod" && (i === last || prop.type !== "SpreadElement") && this.isAssignable(prop);
+ });
+ }
+
+ case "ObjectProperty":
+ return this.isAssignable(node.value);
+
+ case "SpreadElement":
+ return this.isAssignable(node.argument);
+
+ case "ArrayExpression":
+ return node.elements.every(element => element === null || this.isAssignable(element));
+
+ case "AssignmentExpression":
+ return node.operator === "=";
+
+ case "ParenthesizedExpression":
+ return this.isAssignable(node.expression);
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ return !isBinding;
+
+ default:
+ return false;
+ }
+ }
+
+ toReferencedList(exprList, isParenthesizedExpr) {
+ return exprList;
+ }
+
+ toReferencedListDeep(exprList, isParenthesizedExpr) {
+ this.toReferencedList(exprList, isParenthesizedExpr);
+
+ for (const expr of exprList) {
+ if ((expr == null ? void 0 : expr.type) === "ArrayExpression") {
+ this.toReferencedListDeep(expr.elements);
+ }
+ }
+ }
+
+ parseSpread(refExpressionErrors, refNeedsArrowPos) {
+ const node = this.startNode();
+ this.next();
+ node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors, undefined, refNeedsArrowPos);
+ return this.finishNode(node, "SpreadElement");
+ }
+
+ parseRestBinding() {
+ const node = this.startNode();
+ this.next();
+ node.argument = this.parseBindingAtom();
+ return this.finishNode(node, "RestElement");
+ }
+
+ parseBindingAtom() {
+ switch (this.state.type) {
+ case 0:
+ {
+ const node = this.startNode();
+ this.next();
+ node.elements = this.parseBindingList(3, 93, true);
+ return this.finishNode(node, "ArrayPattern");
+ }
+
+ case 5:
+ return this.parseObjectLike(8, true);
+ }
+
+ return this.parseIdentifier();
+ }
+
+ parseBindingList(close, closeCharCode, allowEmpty, allowModifiers) {
+ const elts = [];
+ let first = true;
+
+ while (!this.eat(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(12);
+ }
+
+ if (allowEmpty && this.match(12)) {
+ elts.push(null);
+ } else if (this.eat(close)) {
+ break;
+ } else if (this.match(21)) {
+ elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));
+
+ if (!this.checkCommaAfterRest(closeCharCode)) {
+ this.expect(close);
+ break;
+ }
+ } else {
+ const decorators = [];
+
+ if (this.match(26) && this.hasPlugin("decorators")) {
+ this.raise(ErrorMessages.UnsupportedParameterDecorator, {
+ at: this.state.startLoc
+ });
+ }
+
+ while (this.match(26)) {
+ decorators.push(this.parseDecorator());
+ }
+
+ elts.push(this.parseAssignableListItem(allowModifiers, decorators));
+ }
+ }
+
+ return elts;
+ }
+
+ parseBindingRestProperty(prop) {
+ this.next();
+ prop.argument = this.parseIdentifier();
+ this.checkCommaAfterRest(125);
+ return this.finishNode(prop, "RestElement");
+ }
+
+ parseBindingProperty() {
+ const prop = this.startNode();
+ const {
+ type,
+ start: startPos,
+ startLoc
+ } = this.state;
+
+ if (type === 21) {
+ return this.parseBindingRestProperty(prop);
+ } else if (type === 134) {
+ this.expectPlugin("destructuringPrivate", startLoc);
+ this.classScope.usePrivateName(this.state.value, startLoc);
+ prop.key = this.parsePrivateName();
+ } else {
+ this.parsePropertyName(prop);
+ }
+
+ prop.method = false;
+ this.parseObjPropValue(prop, startPos, startLoc, false, false, true, false);
+ return prop;
+ }
+
+ parseAssignableListItem(allowModifiers, decorators) {
+ const left = this.parseMaybeDefault();
+ this.parseAssignableListItemTypes(left);
+ const elt = this.parseMaybeDefault(left.start, left.loc.start, left);
+
+ if (decorators.length) {
+ left.decorators = decorators;
+ }
+
+ return elt;
+ }
+
+ parseAssignableListItemTypes(param) {
+ return param;
+ }
+
+ parseMaybeDefault(startPos, startLoc, left) {
+ var _startLoc, _startPos, _left;
+
+ startLoc = (_startLoc = startLoc) != null ? _startLoc : this.state.startLoc;
+ startPos = (_startPos = startPos) != null ? _startPos : this.state.start;
+ left = (_left = left) != null ? _left : this.parseBindingAtom();
+ if (!this.eat(29)) return left;
+ const node = this.startNodeAt(startPos, startLoc);
+ node.left = left;
+ node.right = this.parseMaybeAssignAllowIn();
+ return this.finishNode(node, "AssignmentPattern");
+ }
+
+ checkLVal(expr, contextDescription, bindingType = BIND_NONE, checkClashes, disallowLetBinding, strictModeChanged = false) {
+ switch (expr.type) {
+ case "Identifier":
+ {
+ const {
+ name
+ } = expr;
+
+ if (this.state.strict && (strictModeChanged ? isStrictBindReservedWord(name, this.inModule) : isStrictBindOnlyReservedWord(name))) {
+ this.raise(bindingType === BIND_NONE ? ErrorMessages.StrictEvalArguments : ErrorMessages.StrictEvalArgumentsBinding, {
+ node: expr
+ }, name);
+ }
+
+ if (checkClashes) {
+ if (checkClashes.has(name)) {
+ this.raise(ErrorMessages.ParamDupe, {
+ node: expr
+ });
+ } else {
+ checkClashes.add(name);
+ }
+ }
+
+ if (disallowLetBinding && name === "let") {
+ this.raise(ErrorMessages.LetInLexicalBinding, {
+ node: expr
+ });
+ }
+
+ if (!(bindingType & BIND_NONE)) {
+ this.scope.declareName(name, bindingType, expr.loc.start);
+ }
+
+ break;
+ }
+
+ case "MemberExpression":
+ if (bindingType !== BIND_NONE) {
+ this.raise(ErrorMessages.InvalidPropertyBindingPattern, {
+ node: expr
+ });
+ }
+
+ break;
+
+ case "ObjectPattern":
+ for (let prop of expr.properties) {
+ if (this.isObjectProperty(prop)) prop = prop.value;else if (this.isObjectMethod(prop)) continue;
+ this.checkLVal(prop, "object destructuring pattern", bindingType, checkClashes, disallowLetBinding);
+ }
+
+ break;
+
+ case "ArrayPattern":
+ for (const elem of expr.elements) {
+ if (elem) {
+ this.checkLVal(elem, "array destructuring pattern", bindingType, checkClashes, disallowLetBinding);
+ }
+ }
+
+ break;
+
+ case "AssignmentPattern":
+ this.checkLVal(expr.left, "assignment pattern", bindingType, checkClashes);
+ break;
+
+ case "RestElement":
+ this.checkLVal(expr.argument, "rest element", bindingType, checkClashes);
+ break;
+
+ case "ParenthesizedExpression":
+ this.checkLVal(expr.expression, "parenthesized expression", bindingType, checkClashes);
+ break;
+
+ default:
+ {
+ this.raise(bindingType === BIND_NONE ? ErrorMessages.InvalidLhs : ErrorMessages.InvalidLhsBinding, {
+ node: expr
+ }, contextDescription);
+ }
+ }
+ }
+
+ checkToRestConversion(node) {
+ if (node.argument.type !== "Identifier" && node.argument.type !== "MemberExpression") {
+ this.raise(ErrorMessages.InvalidRestAssignmentPattern, {
+ node: node.argument
+ });
+ }
+ }
+
+ checkCommaAfterRest(close) {
+ if (!this.match(12)) {
+ return false;
+ }
+
+ this.raise(this.lookaheadCharCode() === close ? ErrorMessages.RestTrailingComma : ErrorMessages.ElementAfterRest, {
+ at: this.state.startLoc
+ });
+ return true;
+ }
+
+}
+
+const invalidHackPipeBodies = new Map([["ArrowFunctionExpression", "arrow function"], ["AssignmentExpression", "assignment"], ["ConditionalExpression", "conditional"], ["YieldExpression", "yield"]]);
+class ExpressionParser extends LValParser {
+ checkProto(prop, isRecord, protoRef, refExpressionErrors) {
+ if (prop.type === "SpreadElement" || this.isObjectMethod(prop) || prop.computed || prop.shorthand) {
+ return;
+ }
+
+ const key = prop.key;
+ const name = key.type === "Identifier" ? key.name : key.value;
+
+ if (name === "__proto__") {
+ if (isRecord) {
+ this.raise(ErrorMessages.RecordNoProto, {
+ node: key
+ });
+ return;
+ }
+
+ if (protoRef.used) {
+ if (refExpressionErrors) {
+ if (refExpressionErrors.doubleProtoLoc === null) {
+ refExpressionErrors.doubleProtoLoc = key.loc.start;
+ }
+ } else {
+ this.raise(ErrorMessages.DuplicateProto, {
+ node: key
+ });
+ }
+ }
+
+ protoRef.used = true;
+ }
+ }
+
+ shouldExitDescending(expr, potentialArrowAt) {
+ return expr.type === "ArrowFunctionExpression" && expr.start === potentialArrowAt;
+ }
+
+ getExpression() {
+ this.enterInitialScopes();
+ this.nextToken();
+ const expr = this.parseExpression();
+
+ if (!this.match(135)) {
+ this.unexpected();
+ }
+
+ this.finalizeRemainingComments();
+ expr.comments = this.state.comments;
+ expr.errors = this.state.errors;
+
+ if (this.options.tokens) {
+ expr.tokens = this.tokens;
+ }
+
+ return expr;
+ }
+
+ parseExpression(disallowIn, refExpressionErrors) {
+ if (disallowIn) {
+ return this.disallowInAnd(() => this.parseExpressionBase(refExpressionErrors));
+ }
+
+ return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));
+ }
+
+ parseExpressionBase(refExpressionErrors) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const expr = this.parseMaybeAssign(refExpressionErrors);
+
+ if (this.match(12)) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.expressions = [expr];
+
+ while (this.eat(12)) {
+ node.expressions.push(this.parseMaybeAssign(refExpressionErrors));
+ }
+
+ this.toReferencedList(node.expressions);
+ return this.finishNode(node, "SequenceExpression");
+ }
+
+ return expr;
+ }
+
+ parseMaybeAssignDisallowIn(refExpressionErrors, afterLeftParse) {
+ return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse));
+ }
+
+ parseMaybeAssignAllowIn(refExpressionErrors, afterLeftParse) {
+ return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, afterLeftParse));
+ }
+
+ setOptionalParametersError(refExpressionErrors, resultError) {
+ var _resultError$loc;
+
+ refExpressionErrors.optionalParametersLoc = (_resultError$loc = resultError == null ? void 0 : resultError.loc) != null ? _resultError$loc : this.state.startLoc;
+ }
+
+ parseMaybeAssign(refExpressionErrors, afterLeftParse) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+
+ if (this.isContextual(105)) {
+ if (this.prodParam.hasYield) {
+ let left = this.parseYield();
+
+ if (afterLeftParse) {
+ left = afterLeftParse.call(this, left, startPos, startLoc);
+ }
+
+ return left;
+ }
+ }
+
+ let ownExpressionErrors;
+
+ if (refExpressionErrors) {
+ ownExpressionErrors = false;
+ } else {
+ refExpressionErrors = new ExpressionErrors();
+ ownExpressionErrors = true;
+ }
+
+ const {
+ type
+ } = this.state;
+
+ if (type === 10 || tokenIsIdentifier(type)) {
+ this.state.potentialArrowAt = this.state.start;
+ }
+
+ let left = this.parseMaybeConditional(refExpressionErrors);
+
+ if (afterLeftParse) {
+ left = afterLeftParse.call(this, left, startPos, startLoc);
+ }
+
+ if (tokenIsAssignment(this.state.type)) {
+ const node = this.startNodeAt(startPos, startLoc);
+ const operator = this.state.value;
+ node.operator = operator;
+
+ if (this.match(29)) {
+ node.left = this.toAssignable(left, true);
+
+ if (refExpressionErrors.doubleProtoLoc != null && refExpressionErrors.doubleProtoLoc.index >= startPos) {
+ refExpressionErrors.doubleProtoLoc = null;
+ }
+
+ if (refExpressionErrors.shorthandAssignLoc != null && refExpressionErrors.shorthandAssignLoc.index >= startPos) {
+ refExpressionErrors.shorthandAssignLoc = null;
+ }
+
+ if (refExpressionErrors.privateKeyLoc != null && refExpressionErrors.privateKeyLoc.index >= startPos) {
+ this.checkDestructuringPrivate(refExpressionErrors);
+ refExpressionErrors.privateKeyLoc = null;
+ }
+ } else {
+ node.left = left;
+ }
+
+ this.checkLVal(left, "assignment expression");
+ this.next();
+ node.right = this.parseMaybeAssign();
+ return this.finishNode(node, "AssignmentExpression");
+ } else if (ownExpressionErrors) {
+ this.checkExpressionErrors(refExpressionErrors, true);
+ }
+
+ return left;
+ }
+
+ parseMaybeConditional(refExpressionErrors) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const potentialArrowAt = this.state.potentialArrowAt;
+ const expr = this.parseExprOps(refExpressionErrors);
+
+ if (this.shouldExitDescending(expr, potentialArrowAt)) {
+ return expr;
+ }
+
+ return this.parseConditional(expr, startPos, startLoc, refExpressionErrors);
+ }
+
+ parseConditional(expr, startPos, startLoc, refExpressionErrors) {
+ if (this.eat(17)) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.test = expr;
+ node.consequent = this.parseMaybeAssignAllowIn();
+ this.expect(14);
+ node.alternate = this.parseMaybeAssign();
+ return this.finishNode(node, "ConditionalExpression");
+ }
+
+ return expr;
+ }
+
+ parseMaybeUnaryOrPrivate(refExpressionErrors) {
+ return this.match(134) ? this.parsePrivateName() : this.parseMaybeUnary(refExpressionErrors);
+ }
+
+ parseExprOps(refExpressionErrors) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const potentialArrowAt = this.state.potentialArrowAt;
+ const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors);
+
+ if (this.shouldExitDescending(expr, potentialArrowAt)) {
+ return expr;
+ }
+
+ return this.parseExprOp(expr, startPos, startLoc, -1);
+ }
+
+ parseExprOp(left, leftStartPos, leftStartLoc, minPrec) {
+ if (this.isPrivateName(left)) {
+ const value = this.getPrivateNameSV(left);
+
+ if (minPrec >= tokenOperatorPrecedence(58) || !this.prodParam.hasIn || !this.match(58)) {
+ this.raise(ErrorMessages.PrivateInExpectedIn, {
+ node: left
+ }, value);
+ }
+
+ this.classScope.usePrivateName(value, left.loc.start);
+ }
+
+ const op = this.state.type;
+
+ if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(58))) {
+ let prec = tokenOperatorPrecedence(op);
+
+ if (prec > minPrec) {
+ if (op === 39) {
+ this.expectPlugin("pipelineOperator");
+
+ if (this.state.inFSharpPipelineDirectBody) {
+ return left;
+ }
+
+ this.checkPipelineAtInfixOperator(left, leftStartLoc);
+ }
+
+ const node = this.startNodeAt(leftStartPos, leftStartLoc);
+ node.left = left;
+ node.operator = this.state.value;
+ const logical = op === 41 || op === 42;
+ const coalesce = op === 40;
+
+ if (coalesce) {
+ prec = tokenOperatorPrecedence(42);
+ }
+
+ this.next();
+
+ if (op === 39 && this.hasPlugin(["pipelineOperator", {
+ proposal: "minimal"
+ }])) {
+ if (this.state.type === 96 && this.prodParam.hasAwait) {
+ throw this.raise(ErrorMessages.UnexpectedAwaitAfterPipelineBody, {
+ at: this.state.startLoc
+ });
+ }
+ }
+
+ node.right = this.parseExprOpRightExpr(op, prec);
+ this.finishNode(node, logical || coalesce ? "LogicalExpression" : "BinaryExpression");
+ const nextOp = this.state.type;
+
+ if (coalesce && (nextOp === 41 || nextOp === 42) || logical && nextOp === 40) {
+ throw this.raise(ErrorMessages.MixingCoalesceWithLogical, {
+ at: this.state.startLoc
+ });
+ }
+
+ return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);
+ }
+ }
+
+ return left;
+ }
+
+ parseExprOpRightExpr(op, prec) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+
+ switch (op) {
+ case 39:
+ switch (this.getPluginOption("pipelineOperator", "proposal")) {
+ case "hack":
+ return this.withTopicBindingContext(() => {
+ return this.parseHackPipeBody();
+ });
+
+ case "smart":
+ return this.withTopicBindingContext(() => {
+ if (this.prodParam.hasYield && this.isContextual(105)) {
+ throw this.raise(ErrorMessages.PipeBodyIsTighter, {
+ at: this.state.startLoc
+ }, this.state.value);
+ }
+
+ return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(op, prec), startPos, startLoc);
+ });
+
+ case "fsharp":
+ return this.withSoloAwaitPermittingContext(() => {
+ return this.parseFSharpPipelineBody(prec);
+ });
+ }
+
+ default:
+ return this.parseExprOpBaseRightExpr(op, prec);
+ }
+ }
+
+ parseExprOpBaseRightExpr(op, prec) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ return this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startPos, startLoc, tokenIsRightAssociative(op) ? prec - 1 : prec);
+ }
+
+ parseHackPipeBody() {
+ var _body$extra;
+
+ const {
+ startLoc
+ } = this.state;
+ const body = this.parseMaybeAssign();
+
+ if (invalidHackPipeBodies.has(body.type) && !((_body$extra = body.extra) != null && _body$extra.parenthesized)) {
+ this.raise(ErrorMessages.PipeUnparenthesizedBody, {
+ at: startLoc
+ }, invalidHackPipeBodies.get(body.type));
+ }
+
+ if (!this.topicReferenceWasUsedInCurrentContext()) {
+ this.raise(ErrorMessages.PipeTopicUnused, {
+ at: startLoc
+ });
+ }
+
+ return body;
+ }
+
+ checkExponentialAfterUnary(node) {
+ if (this.match(57)) {
+ this.raise(ErrorMessages.UnexpectedTokenUnaryExponentiation, {
+ node: node.argument
+ });
+ }
+ }
+
+ parseMaybeUnary(refExpressionErrors, sawUnary) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const isAwait = this.isContextual(96);
+
+ if (isAwait && this.isAwaitAllowed()) {
+ this.next();
+ const expr = this.parseAwait(startPos, startLoc);
+ if (!sawUnary) this.checkExponentialAfterUnary(expr);
+ return expr;
+ }
+
+ const update = this.match(34);
+ const node = this.startNode();
+
+ if (tokenIsPrefix(this.state.type)) {
+ node.operator = this.state.value;
+ node.prefix = true;
+
+ if (this.match(72)) {
+ this.expectPlugin("throwExpressions");
+ }
+
+ const isDelete = this.match(89);
+ this.next();
+ node.argument = this.parseMaybeUnary(null, true);
+ this.checkExpressionErrors(refExpressionErrors, true);
+
+ if (this.state.strict && isDelete) {
+ const arg = node.argument;
+
+ if (arg.type === "Identifier") {
+ this.raise(ErrorMessages.StrictDelete, {
+ node
+ });
+ } else if (this.hasPropertyAsPrivateName(arg)) {
+ this.raise(ErrorMessages.DeletePrivateField, {
+ node
+ });
+ }
+ }
+
+ if (!update) {
+ if (!sawUnary) this.checkExponentialAfterUnary(node);
+ return this.finishNode(node, "UnaryExpression");
+ }
+ }
+
+ const expr = this.parseUpdate(node, update, refExpressionErrors);
+
+ if (isAwait) {
+ const {
+ type
+ } = this.state;
+ const startsExpr = this.hasPlugin("v8intrinsic") ? tokenCanStartExpression(type) : tokenCanStartExpression(type) && !this.match(54);
+
+ if (startsExpr && !this.isAmbiguousAwait()) {
+ this.raiseOverwrite(startLoc, ErrorMessages.AwaitNotInAsyncContext);
+ return this.parseAwait(startPos, startLoc);
+ }
+ }
+
+ return expr;
+ }
+
+ parseUpdate(node, update, refExpressionErrors) {
+ if (update) {
+ this.checkLVal(node.argument, "prefix operation");
+ return this.finishNode(node, "UpdateExpression");
+ }
+
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let expr = this.parseExprSubscripts(refExpressionErrors);
+ if (this.checkExpressionErrors(refExpressionErrors, false)) return expr;
+
+ while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.operator = this.state.value;
+ node.prefix = false;
+ node.argument = expr;
+ this.checkLVal(expr, "postfix operation");
+ this.next();
+ expr = this.finishNode(node, "UpdateExpression");
+ }
+
+ return expr;
+ }
+
+ parseExprSubscripts(refExpressionErrors) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ const potentialArrowAt = this.state.potentialArrowAt;
+ const expr = this.parseExprAtom(refExpressionErrors);
+
+ if (this.shouldExitDescending(expr, potentialArrowAt)) {
+ return expr;
+ }
+
+ return this.parseSubscripts(expr, startPos, startLoc);
+ }
+
+ parseSubscripts(base, startPos, startLoc, noCalls) {
+ const state = {
+ optionalChainMember: false,
+ maybeAsyncArrow: this.atPossibleAsyncArrow(base),
+ stop: false
+ };
+
+ do {
+ base = this.parseSubscript(base, startPos, startLoc, noCalls, state);
+ state.maybeAsyncArrow = false;
+ } while (!state.stop);
+
+ return base;
+ }
+
+ parseSubscript(base, startPos, startLoc, noCalls, state) {
+ const {
+ type
+ } = this.state;
+
+ if (!noCalls && type === 15) {
+ return this.parseBind(base, startPos, startLoc, noCalls, state);
+ } else if (tokenIsTemplate(type)) {
+ return this.parseTaggedTemplateExpression(base, startPos, startLoc, state);
+ }
+
+ let optional = false;
+
+ if (type === 18) {
+ if (noCalls && this.lookaheadCharCode() === 40) {
+ state.stop = true;
+ return base;
+ }
+
+ state.optionalChainMember = optional = true;
+ this.next();
+ }
+
+ if (!noCalls && this.match(10)) {
+ return this.parseCoverCallAndAsyncArrowHead(base, startPos, startLoc, state, optional);
+ } else {
+ const computed = this.eat(0);
+
+ if (computed || optional || this.eat(16)) {
+ return this.parseMember(base, startPos, startLoc, state, computed, optional);
+ } else {
+ state.stop = true;
+ return base;
+ }
+ }
+ }
+
+ parseMember(base, startPos, startLoc, state, computed, optional) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.object = base;
+ node.computed = computed;
+
+ if (computed) {
+ node.property = this.parseExpression();
+ this.expect(3);
+ } else if (this.match(134)) {
+ if (base.type === "Super") {
+ this.raise(ErrorMessages.SuperPrivateField, {
+ at: startLoc
+ });
+ }
+
+ this.classScope.usePrivateName(this.state.value, this.state.startLoc);
+ node.property = this.parsePrivateName();
+ } else {
+ node.property = this.parseIdentifier(true);
+ }
+
+ if (state.optionalChainMember) {
+ node.optional = optional;
+ return this.finishNode(node, "OptionalMemberExpression");
+ } else {
+ return this.finishNode(node, "MemberExpression");
+ }
+ }
+
+ parseBind(base, startPos, startLoc, noCalls, state) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.object = base;
+ this.next();
+ node.callee = this.parseNoCallExpr();
+ state.stop = true;
+ return this.parseSubscripts(this.finishNode(node, "BindExpression"), startPos, startLoc, noCalls);
+ }
+
+ parseCoverCallAndAsyncArrowHead(base, startPos, startLoc, state, optional) {
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+ let refExpressionErrors = null;
+ this.state.maybeInArrowParameters = true;
+ this.next();
+ let node = this.startNodeAt(startPos, startLoc);
+ node.callee = base;
+ const {
+ maybeAsyncArrow,
+ optionalChainMember
+ } = state;
+
+ if (maybeAsyncArrow) {
+ this.expressionScope.enter(newAsyncArrowScope());
+ refExpressionErrors = new ExpressionErrors();
+ }
+
+ if (optionalChainMember) {
+ node.optional = optional;
+ }
+
+ if (optional) {
+ node.arguments = this.parseCallExpressionArguments(11);
+ } else {
+ node.arguments = this.parseCallExpressionArguments(11, base.type === "Import", base.type !== "Super", node, refExpressionErrors);
+ }
+
+ this.finishCallExpression(node, optionalChainMember);
+
+ if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {
+ state.stop = true;
+ this.checkDestructuringPrivate(refExpressionErrors);
+ this.expressionScope.validateAsPattern();
+ this.expressionScope.exit();
+ node = this.parseAsyncArrowFromCallExpression(this.startNodeAt(startPos, startLoc), node);
+ } else {
+ if (maybeAsyncArrow) {
+ this.checkExpressionErrors(refExpressionErrors, true);
+ this.expressionScope.exit();
+ }
+
+ this.toReferencedArguments(node);
+ }
+
+ this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
+ return node;
+ }
+
+ toReferencedArguments(node, isParenthesizedExpr) {
+ this.toReferencedListDeep(node.arguments, isParenthesizedExpr);
+ }
+
+ parseTaggedTemplateExpression(base, startPos, startLoc, state) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.tag = base;
+ node.quasi = this.parseTemplate(true);
+
+ if (state.optionalChainMember) {
+ this.raise(ErrorMessages.OptionalChainingNoTemplate, {
+ at: startLoc
+ });
+ }
+
+ return this.finishNode(node, "TaggedTemplateExpression");
+ }
+
+ atPossibleAsyncArrow(base) {
+ return base.type === "Identifier" && base.name === "async" && this.state.lastTokEndLoc.index === base.end && !this.canInsertSemicolon() && base.end - base.start === 5 && base.start === this.state.potentialArrowAt;
+ }
+
+ finishCallExpression(node, optional) {
+ if (node.callee.type === "Import") {
+ if (node.arguments.length === 2) {
+ {
+ if (!this.hasPlugin("moduleAttributes")) {
+ this.expectPlugin("importAssertions");
+ }
+ }
+ }
+
+ if (node.arguments.length === 0 || node.arguments.length > 2) {
+ this.raise(ErrorMessages.ImportCallArity, {
+ node
+ }, this.hasPlugin("importAssertions") || this.hasPlugin("moduleAttributes") ? "one or two arguments" : "one argument");
+ } else {
+ for (const arg of node.arguments) {
+ if (arg.type === "SpreadElement") {
+ this.raise(ErrorMessages.ImportCallSpreadArgument, {
+ node: arg
+ });
+ }
+ }
+ }
+ }
+
+ return this.finishNode(node, optional ? "OptionalCallExpression" : "CallExpression");
+ }
+
+ parseCallExpressionArguments(close, dynamicImport, allowPlaceholder, nodeForExtra, refExpressionErrors) {
+ const elts = [];
+ let first = true;
+ const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
+ this.state.inFSharpPipelineDirectBody = false;
+
+ while (!this.eat(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(12);
+
+ if (this.match(close)) {
+ if (dynamicImport && !this.hasPlugin("importAssertions") && !this.hasPlugin("moduleAttributes")) {
+ this.raise(ErrorMessages.ImportCallArgumentTrailingComma, {
+ at: this.state.lastTokStartLoc
+ });
+ }
+
+ if (nodeForExtra) {
+ this.addTrailingCommaExtraToNode(nodeForExtra);
+ }
+
+ this.next();
+ break;
+ }
+ }
+
+ elts.push(this.parseExprListItem(false, refExpressionErrors, allowPlaceholder));
+ }
+
+ this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
+ return elts;
+ }
+
+ shouldParseAsyncArrow() {
+ return this.match(19) && !this.canInsertSemicolon();
+ }
+
+ parseAsyncArrowFromCallExpression(node, call) {
+ var _call$extra;
+
+ this.resetPreviousNodeTrailingComments(call);
+ this.expect(19);
+ this.parseArrowExpression(node, call.arguments, true, (_call$extra = call.extra) == null ? void 0 : _call$extra.trailingCommaLoc);
+
+ if (call.innerComments) {
+ setInnerComments(node, call.innerComments);
+ }
+
+ if (call.callee.trailingComments) {
+ setInnerComments(node, call.callee.trailingComments);
+ }
+
+ return node;
+ }
+
+ parseNoCallExpr() {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
+ }
+
+ parseExprAtom(refExpressionErrors) {
+ let node;
+ const {
+ type
+ } = this.state;
+
+ switch (type) {
+ case 79:
+ return this.parseSuper();
+
+ case 83:
+ node = this.startNode();
+ this.next();
+
+ if (this.match(16)) {
+ return this.parseImportMetaProperty(node);
+ }
+
+ if (!this.match(10)) {
+ this.raise(ErrorMessages.UnsupportedImport, {
+ at: this.state.lastTokStartLoc
+ });
+ }
+
+ return this.finishNode(node, "Import");
+
+ case 78:
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, "ThisExpression");
+
+ case 90:
+ {
+ return this.parseDo(this.startNode(), false);
+ }
+
+ case 56:
+ case 31:
+ {
+ this.readRegexp();
+ return this.parseRegExpLiteral(this.state.value);
+ }
+
+ case 130:
+ return this.parseNumericLiteral(this.state.value);
+
+ case 131:
+ return this.parseBigIntLiteral(this.state.value);
+
+ case 132:
+ return this.parseDecimalLiteral(this.state.value);
+
+ case 129:
+ return this.parseStringLiteral(this.state.value);
+
+ case 84:
+ return this.parseNullLiteral();
+
+ case 85:
+ return this.parseBooleanLiteral(true);
+
+ case 86:
+ return this.parseBooleanLiteral(false);
+
+ case 10:
+ {
+ const canBeArrow = this.state.potentialArrowAt === this.state.start;
+ return this.parseParenAndDistinguishExpression(canBeArrow);
+ }
+
+ case 2:
+ case 1:
+ {
+ return this.parseArrayLike(this.state.type === 2 ? 4 : 3, false, true);
+ }
+
+ case 0:
+ {
+ return this.parseArrayLike(3, true, false, refExpressionErrors);
+ }
+
+ case 6:
+ case 7:
+ {
+ return this.parseObjectLike(this.state.type === 6 ? 9 : 8, false, true);
+ }
+
+ case 5:
+ {
+ return this.parseObjectLike(8, false, false, refExpressionErrors);
+ }
+
+ case 68:
+ return this.parseFunctionOrFunctionSent();
+
+ case 26:
+ this.parseDecorators();
+
+ case 80:
+ node = this.startNode();
+ this.takeDecorators(node);
+ return this.parseClass(node, false);
+
+ case 77:
+ return this.parseNewOrNewTarget();
+
+ case 25:
+ case 24:
+ return this.parseTemplate(false);
+
+ case 15:
+ {
+ node = this.startNode();
+ this.next();
+ node.object = null;
+ const callee = node.callee = this.parseNoCallExpr();
+
+ if (callee.type === "MemberExpression") {
+ return this.finishNode(node, "BindExpression");
+ } else {
+ throw this.raise(ErrorMessages.UnsupportedBind, {
+ node: callee
+ });
+ }
+ }
+
+ case 134:
+ {
+ this.raise(ErrorMessages.PrivateInExpectedIn, {
+ at: this.state.startLoc
+ }, this.state.value);
+ return this.parsePrivateName();
+ }
+
+ case 33:
+ {
+ return this.parseTopicReferenceThenEqualsSign(54, "%");
+ }
+
+ case 32:
+ {
+ return this.parseTopicReferenceThenEqualsSign(44, "^");
+ }
+
+ case 37:
+ case 38:
+ {
+ return this.parseTopicReference("hack");
+ }
+
+ case 44:
+ case 54:
+ case 27:
+ {
+ const pipeProposal = this.getPluginOption("pipelineOperator", "proposal");
+
+ if (pipeProposal) {
+ return this.parseTopicReference(pipeProposal);
+ } else {
+ throw this.unexpected();
+ }
+ }
+
+ case 47:
+ {
+ const lookaheadCh = this.input.codePointAt(this.nextTokenStart());
+
+ if (isIdentifierStart(lookaheadCh) || lookaheadCh === 62) {
+ this.expectOnePlugin(["jsx", "flow", "typescript"]);
+ break;
+ } else {
+ throw this.unexpected();
+ }
+ }
+
+ default:
+ if (tokenIsIdentifier(type)) {
+ if (this.isContextual(123) && this.lookaheadCharCode() === 123 && !this.hasFollowingLineBreak()) {
+ return this.parseModuleExpression();
+ }
+
+ const canBeArrow = this.state.potentialArrowAt === this.state.start;
+ const containsEsc = this.state.containsEsc;
+ const id = this.parseIdentifier();
+
+ if (!containsEsc && id.name === "async" && !this.canInsertSemicolon()) {
+ const {
+ type
+ } = this.state;
+
+ if (type === 68) {
+ this.resetPreviousNodeTrailingComments(id);
+ this.next();
+ return this.parseFunction(this.startNodeAtNode(id), undefined, true);
+ } else if (tokenIsIdentifier(type)) {
+ if (this.lookaheadCharCode() === 61) {
+ return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
+ } else {
+ return id;
+ }
+ } else if (type === 90) {
+ this.resetPreviousNodeTrailingComments(id);
+ return this.parseDo(this.startNodeAtNode(id), true);
+ }
+ }
+
+ if (canBeArrow && this.match(19) && !this.canInsertSemicolon()) {
+ this.next();
+ return this.parseArrowExpression(this.startNodeAtNode(id), [id], false);
+ }
+
+ return id;
+ } else {
+ throw this.unexpected();
+ }
+
+ }
+ }
+
+ parseTopicReferenceThenEqualsSign(topicTokenType, topicTokenValue) {
+ const pipeProposal = this.getPluginOption("pipelineOperator", "proposal");
+
+ if (pipeProposal) {
+ this.state.type = topicTokenType;
+ this.state.value = topicTokenValue;
+ this.state.pos--;
+ this.state.end--;
+ this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1);
+ return this.parseTopicReference(pipeProposal);
+ } else {
+ throw this.unexpected();
+ }
+ }
+
+ parseTopicReference(pipeProposal) {
+ const node = this.startNode();
+ const startLoc = this.state.startLoc;
+ const tokenType = this.state.type;
+ this.next();
+ return this.finishTopicReference(node, startLoc, pipeProposal, tokenType);
+ }
+
+ finishTopicReference(node, startLoc, pipeProposal, tokenType) {
+ if (this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)) {
+ const nodeType = pipeProposal === "smart" ? "PipelinePrimaryTopicReference" : "TopicReference";
+
+ if (!this.topicReferenceIsAllowedInCurrentContext()) {
+ this.raise(pipeProposal === "smart" ? ErrorMessages.PrimaryTopicNotAllowed : ErrorMessages.PipeTopicUnbound, {
+ at: startLoc
+ });
+ }
+
+ this.registerTopicReference();
+ return this.finishNode(node, nodeType);
+ } else {
+ throw this.raise(ErrorMessages.PipeTopicUnconfiguredToken, {
+ at: startLoc
+ }, tokenLabelName(tokenType));
+ }
+ }
+
+ testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType) {
+ switch (pipeProposal) {
+ case "hack":
+ {
+ return this.hasPlugin(["pipelineOperator", {
+ topicToken: tokenLabelName(tokenType)
+ }]);
+ }
+
+ case "smart":
+ return tokenType === 27;
+
+ default:
+ throw this.raise(ErrorMessages.PipeTopicRequiresHackPipes, {
+ at: startLoc
+ });
+ }
+ }
+
+ parseAsyncArrowUnaryFunction(node) {
+ this.prodParam.enter(functionFlags(true, this.prodParam.hasYield));
+ const params = [this.parseIdentifier()];
+ this.prodParam.exit();
+
+ if (this.hasPrecedingLineBreak()) {
+ this.raise(ErrorMessages.LineTerminatorBeforeArrow, {
+ at: this.state.curPosition()
+ });
+ }
+
+ this.expect(19);
+ this.parseArrowExpression(node, params, true);
+ return node;
+ }
+
+ parseDo(node, isAsync) {
+ this.expectPlugin("doExpressions");
+
+ if (isAsync) {
+ this.expectPlugin("asyncDoExpressions");
+ }
+
+ node.async = isAsync;
+ this.next();
+ const oldLabels = this.state.labels;
+ this.state.labels = [];
+
+ if (isAsync) {
+ this.prodParam.enter(PARAM_AWAIT);
+ node.body = this.parseBlock();
+ this.prodParam.exit();
+ } else {
+ node.body = this.parseBlock();
+ }
+
+ this.state.labels = oldLabels;
+ return this.finishNode(node, "DoExpression");
+ }
+
+ parseSuper() {
+ const node = this.startNode();
+ this.next();
+
+ if (this.match(10) && !this.scope.allowDirectSuper && !this.options.allowSuperOutsideMethod) {
+ this.raise(ErrorMessages.SuperNotAllowed, {
+ node
+ });
+ } else if (!this.scope.allowSuper && !this.options.allowSuperOutsideMethod) {
+ this.raise(ErrorMessages.UnexpectedSuper, {
+ node
+ });
+ }
+
+ if (!this.match(10) && !this.match(0) && !this.match(16)) {
+ this.raise(ErrorMessages.UnsupportedSuper, {
+ node
+ });
+ }
+
+ return this.finishNode(node, "Super");
+ }
+
+ parsePrivateName() {
+ const node = this.startNode();
+ const id = this.startNodeAt(this.state.start + 1, new Position(this.state.curLine, this.state.start + 1 - this.state.lineStart, this.state.start + 1));
+ const name = this.state.value;
+ this.next();
+ node.id = this.createIdentifier(id, name);
+ return this.finishNode(node, "PrivateName");
+ }
+
+ parseFunctionOrFunctionSent() {
+ const node = this.startNode();
+ this.next();
+
+ if (this.prodParam.hasYield && this.match(16)) {
+ const meta = this.createIdentifier(this.startNodeAtNode(node), "function");
+ this.next();
+
+ if (this.match(102)) {
+ this.expectPlugin("functionSent");
+ } else if (!this.hasPlugin("functionSent")) {
+ this.unexpected();
+ }
+
+ return this.parseMetaProperty(node, meta, "sent");
+ }
+
+ return this.parseFunction(node);
+ }
+
+ parseMetaProperty(node, meta, propertyName) {
+ node.meta = meta;
+ const containsEsc = this.state.containsEsc;
+ node.property = this.parseIdentifier(true);
+
+ if (node.property.name !== propertyName || containsEsc) {
+ this.raise(ErrorMessages.UnsupportedMetaProperty, {
+ node: node.property
+ }, meta.name, propertyName);
+ }
+
+ return this.finishNode(node, "MetaProperty");
+ }
+
+ parseImportMetaProperty(node) {
+ const id = this.createIdentifier(this.startNodeAtNode(node), "import");
+ this.next();
+
+ if (this.isContextual(100)) {
+ if (!this.inModule) {
+ this.raise(SourceTypeModuleErrorMessages.ImportMetaOutsideModule, {
+ node: id
+ });
+ }
+
+ this.sawUnambiguousESM = true;
+ }
+
+ return this.parseMetaProperty(node, id, "meta");
+ }
+
+ parseLiteralAtNode(value, type, node) {
+ this.addExtra(node, "rawValue", value);
+ this.addExtra(node, "raw", this.input.slice(node.start, this.state.end));
+ node.value = value;
+ this.next();
+ return this.finishNode(node, type);
+ }
+
+ parseLiteral(value, type) {
+ const node = this.startNode();
+ return this.parseLiteralAtNode(value, type, node);
+ }
+
+ parseStringLiteral(value) {
+ return this.parseLiteral(value, "StringLiteral");
+ }
+
+ parseNumericLiteral(value) {
+ return this.parseLiteral(value, "NumericLiteral");
+ }
+
+ parseBigIntLiteral(value) {
+ return this.parseLiteral(value, "BigIntLiteral");
+ }
+
+ parseDecimalLiteral(value) {
+ return this.parseLiteral(value, "DecimalLiteral");
+ }
+
+ parseRegExpLiteral(value) {
+ const node = this.parseLiteral(value.value, "RegExpLiteral");
+ node.pattern = value.pattern;
+ node.flags = value.flags;
+ return node;
+ }
+
+ parseBooleanLiteral(value) {
+ const node = this.startNode();
+ node.value = value;
+ this.next();
+ return this.finishNode(node, "BooleanLiteral");
+ }
+
+ parseNullLiteral() {
+ const node = this.startNode();
+ this.next();
+ return this.finishNode(node, "NullLiteral");
+ }
+
+ parseParenAndDistinguishExpression(canBeArrow) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let val;
+ this.next();
+ this.expressionScope.enter(newArrowHeadScope());
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+ const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
+ this.state.maybeInArrowParameters = true;
+ this.state.inFSharpPipelineDirectBody = false;
+ const innerStartPos = this.state.start;
+ const innerStartLoc = this.state.startLoc;
+ const exprList = [];
+ const refExpressionErrors = new ExpressionErrors();
+ let first = true;
+ let spreadStartLoc;
+ let optionalCommaStartLoc;
+
+ while (!this.match(11)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(12, refExpressionErrors.optionalParametersLoc === null ? null : refExpressionErrors.optionalParametersLoc);
+
+ if (this.match(11)) {
+ optionalCommaStartLoc = this.state.startLoc;
+ break;
+ }
+ }
+
+ if (this.match(21)) {
+ const spreadNodeStartPos = this.state.start;
+ const spreadNodeStartLoc = this.state.startLoc;
+ spreadStartLoc = this.state.startLoc;
+ exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartPos, spreadNodeStartLoc));
+
+ if (!this.checkCommaAfterRest(41)) {
+ break;
+ }
+ } else {
+ exprList.push(this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem));
+ }
+ }
+
+ const innerEndLoc = this.state.lastTokEndLoc;
+ this.expect(11);
+ this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
+ this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
+ let arrowNode = this.startNodeAt(startPos, startLoc);
+
+ if (canBeArrow && this.shouldParseArrow(exprList) && (arrowNode = this.parseArrow(arrowNode))) {
+ this.checkDestructuringPrivate(refExpressionErrors);
+ this.expressionScope.validateAsPattern();
+ this.expressionScope.exit();
+ this.parseArrowExpression(arrowNode, exprList, false);
+ return arrowNode;
+ }
+
+ this.expressionScope.exit();
+
+ if (!exprList.length) {
+ this.unexpected(this.state.lastTokStartLoc);
+ }
+
+ if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc);
+ if (spreadStartLoc) this.unexpected(spreadStartLoc);
+ this.checkExpressionErrors(refExpressionErrors, true);
+ this.toReferencedListDeep(exprList, true);
+
+ if (exprList.length > 1) {
+ val = this.startNodeAt(innerStartPos, innerStartLoc);
+ val.expressions = exprList;
+ this.finishNode(val, "SequenceExpression");
+ this.resetEndLocation(val, innerEndLoc);
+ } else {
+ val = exprList[0];
+ }
+
+ if (!this.options.createParenthesizedExpressions) {
+ this.addExtra(val, "parenthesized", true);
+ this.addExtra(val, "parenStart", startPos);
+ this.takeSurroundingComments(val, startPos, this.state.lastTokEndLoc.index);
+ return val;
+ }
+
+ const parenExpression = this.startNodeAt(startPos, startLoc);
+ parenExpression.expression = val;
+ this.finishNode(parenExpression, "ParenthesizedExpression");
+ return parenExpression;
+ }
+
+ shouldParseArrow(params) {
+ return !this.canInsertSemicolon();
+ }
+
+ parseArrow(node) {
+ if (this.eat(19)) {
+ return node;
+ }
+ }
+
+ parseParenItem(node, startPos, startLoc) {
+ return node;
+ }
+
+ parseNewOrNewTarget() {
+ const node = this.startNode();
+ this.next();
+
+ if (this.match(16)) {
+ const meta = this.createIdentifier(this.startNodeAtNode(node), "new");
+ this.next();
+ const metaProp = this.parseMetaProperty(node, meta, "target");
+
+ if (!this.scope.inNonArrowFunction && !this.scope.inClass) {
+ this.raise(ErrorMessages.UnexpectedNewTarget, {
+ node: metaProp
+ });
+ }
+
+ return metaProp;
+ }
+
+ return this.parseNew(node);
+ }
+
+ parseNew(node) {
+ node.callee = this.parseNoCallExpr();
+
+ if (node.callee.type === "Import") {
+ this.raise(ErrorMessages.ImportCallNotNewExpression, {
+ node: node.callee
+ });
+ } else if (this.isOptionalChain(node.callee)) {
+ this.raise(ErrorMessages.OptionalChainingNoNew, {
+ at: this.state.lastTokEndLoc
+ });
+ } else if (this.eat(18)) {
+ this.raise(ErrorMessages.OptionalChainingNoNew, {
+ at: this.state.startLoc
+ });
+ }
+
+ this.parseNewArguments(node);
+ return this.finishNode(node, "NewExpression");
+ }
+
+ parseNewArguments(node) {
+ if (this.eat(10)) {
+ const args = this.parseExprList(11);
+ this.toReferencedList(args);
+ node.arguments = args;
+ } else {
+ node.arguments = [];
+ }
+ }
+
+ parseTemplateElement(isTagged) {
+ const {
+ start,
+ startLoc,
+ end,
+ value
+ } = this.state;
+ const elemStart = start + 1;
+ const elem = this.startNodeAt(elemStart, createPositionWithColumnOffset(startLoc, 1));
+
+ if (value === null) {
+ if (!isTagged) {
+ this.raise(ErrorMessages.InvalidEscapeSequenceTemplate, {
+ at: createPositionWithColumnOffset(startLoc, 2)
+ });
+ }
+ }
+
+ const isTail = this.match(24);
+ const endOffset = isTail ? -1 : -2;
+ const elemEnd = end + endOffset;
+ elem.value = {
+ raw: this.input.slice(elemStart, elemEnd).replace(/\r\n?/g, "\n"),
+ cooked: value === null ? null : value.slice(1, endOffset)
+ };
+ elem.tail = isTail;
+ this.next();
+ this.finishNode(elem, "TemplateElement");
+ this.resetEndLocation(elem, createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset));
+ return elem;
+ }
+
+ parseTemplate(isTagged) {
+ const node = this.startNode();
+ node.expressions = [];
+ let curElt = this.parseTemplateElement(isTagged);
+ node.quasis = [curElt];
+
+ while (!curElt.tail) {
+ node.expressions.push(this.parseTemplateSubstitution());
+ this.readTemplateContinuation();
+ node.quasis.push(curElt = this.parseTemplateElement(isTagged));
+ }
+
+ return this.finishNode(node, "TemplateLiteral");
+ }
+
+ parseTemplateSubstitution() {
+ return this.parseExpression();
+ }
+
+ parseObjectLike(close, isPattern, isRecord, refExpressionErrors) {
+ if (isRecord) {
+ this.expectPlugin("recordAndTuple");
+ }
+
+ const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
+ this.state.inFSharpPipelineDirectBody = false;
+ const propHash = Object.create(null);
+ let first = true;
+ const node = this.startNode();
+ node.properties = [];
+ this.next();
+
+ while (!this.match(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(12);
+
+ if (this.match(close)) {
+ this.addTrailingCommaExtraToNode(node);
+ break;
+ }
+ }
+
+ let prop;
+
+ if (isPattern) {
+ prop = this.parseBindingProperty();
+ } else {
+ prop = this.parsePropertyDefinition(refExpressionErrors);
+ this.checkProto(prop, isRecord, propHash, refExpressionErrors);
+ }
+
+ if (isRecord && !this.isObjectProperty(prop) && prop.type !== "SpreadElement") {
+ this.raise(ErrorMessages.InvalidRecordProperty, {
+ node: prop
+ });
+ }
+
+ if (prop.shorthand) {
+ this.addExtra(prop, "shorthand", true);
+ }
+
+ node.properties.push(prop);
+ }
+
+ this.next();
+ this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
+ let type = "ObjectExpression";
+
+ if (isPattern) {
+ type = "ObjectPattern";
+ } else if (isRecord) {
+ type = "RecordExpression";
+ }
+
+ return this.finishNode(node, type);
+ }
+
+ addTrailingCommaExtraToNode(node) {
+ this.addExtra(node, "trailingComma", this.state.lastTokStart);
+ this.addExtra(node, "trailingCommaLoc", this.state.lastTokStartLoc, false);
+ }
+
+ maybeAsyncOrAccessorProp(prop) {
+ return !prop.computed && prop.key.type === "Identifier" && (this.isLiteralPropertyName() || this.match(0) || this.match(55));
+ }
+
+ parsePropertyDefinition(refExpressionErrors) {
+ let decorators = [];
+
+ if (this.match(26)) {
+ if (this.hasPlugin("decorators")) {
+ this.raise(ErrorMessages.UnsupportedPropertyDecorator, {
+ at: this.state.startLoc
+ });
+ }
+
+ while (this.match(26)) {
+ decorators.push(this.parseDecorator());
+ }
+ }
+
+ const prop = this.startNode();
+ let isAsync = false;
+ let isAccessor = false;
+ let startPos;
+ let startLoc;
+
+ if (this.match(21)) {
+ if (decorators.length) this.unexpected();
+ return this.parseSpread();
+ }
+
+ if (decorators.length) {
+ prop.decorators = decorators;
+ decorators = [];
+ }
+
+ prop.method = false;
+
+ if (refExpressionErrors) {
+ startPos = this.state.start;
+ startLoc = this.state.startLoc;
+ }
+
+ let isGenerator = this.eat(55);
+ this.parsePropertyNamePrefixOperator(prop);
+ const containsEsc = this.state.containsEsc;
+ const key = this.parsePropertyName(prop, refExpressionErrors);
+
+ if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {
+ const keyName = key.name;
+
+ if (keyName === "async" && !this.hasPrecedingLineBreak()) {
+ isAsync = true;
+ this.resetPreviousNodeTrailingComments(key);
+ isGenerator = this.eat(55);
+ this.parsePropertyName(prop);
+ }
+
+ if (keyName === "get" || keyName === "set") {
+ isAccessor = true;
+ this.resetPreviousNodeTrailingComments(key);
+ prop.kind = keyName;
+
+ if (this.match(55)) {
+ isGenerator = true;
+ this.raise(ErrorMessages.AccessorIsGenerator, {
+ at: this.state.curPosition()
+ }, keyName);
+ this.next();
+ }
+
+ this.parsePropertyName(prop);
+ }
+ }
+
+ this.parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, false, isAccessor, refExpressionErrors);
+ return prop;
+ }
+
+ getGetterSetterExpectedParamCount(method) {
+ return method.kind === "get" ? 0 : 1;
+ }
+
+ getObjectOrClassMethodParams(method) {
+ return method.params;
+ }
+
+ checkGetterSetterParams(method) {
+ var _params;
+
+ const paramCount = this.getGetterSetterExpectedParamCount(method);
+ const params = this.getObjectOrClassMethodParams(method);
+
+ if (params.length !== paramCount) {
+ this.raise(method.kind === "get" ? ErrorMessages.BadGetterArity : ErrorMessages.BadSetterArity, {
+ node: method
+ });
+ }
+
+ if (method.kind === "set" && ((_params = params[params.length - 1]) == null ? void 0 : _params.type) === "RestElement") {
+ this.raise(ErrorMessages.BadSetterRestParameter, {
+ node: method
+ });
+ }
+ }
+
+ parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) {
+ if (isAccessor) {
+ this.parseMethod(prop, isGenerator, false, false, false, "ObjectMethod");
+ this.checkGetterSetterParams(prop);
+ return prop;
+ }
+
+ if (isAsync || isGenerator || this.match(10)) {
+ if (isPattern) this.unexpected();
+ prop.kind = "method";
+ prop.method = true;
+ return this.parseMethod(prop, isGenerator, isAsync, false, false, "ObjectMethod");
+ }
+ }
+
+ parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors) {
+ prop.shorthand = false;
+
+ if (this.eat(14)) {
+ prop.value = isPattern ? this.parseMaybeDefault(this.state.start, this.state.startLoc) : this.parseMaybeAssignAllowIn(refExpressionErrors);
+ return this.finishNode(prop, "ObjectProperty");
+ }
+
+ if (!prop.computed && prop.key.type === "Identifier") {
+ this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false);
+
+ if (isPattern) {
+ prop.value = this.parseMaybeDefault(startPos, startLoc, cloneIdentifier(prop.key));
+ } else if (this.match(29)) {
+ const shorthandAssignLoc = this.state.startLoc;
+
+ if (refExpressionErrors != null) {
+ if (refExpressionErrors.shorthandAssignLoc === null) {
+ refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc;
+ }
+ } else {
+ this.raise(ErrorMessages.InvalidCoverInitializedName, {
+ at: shorthandAssignLoc
+ });
+ }
+
+ prop.value = this.parseMaybeDefault(startPos, startLoc, cloneIdentifier(prop.key));
+ } else {
+ prop.value = cloneIdentifier(prop.key);
+ }
+
+ prop.shorthand = true;
+ return this.finishNode(prop, "ObjectProperty");
+ }
+ }
+
+ parseObjPropValue(prop, startPos, startLoc, isGenerator, isAsync, isPattern, isAccessor, refExpressionErrors) {
+ const node = this.parseObjectMethod(prop, isGenerator, isAsync, isPattern, isAccessor) || this.parseObjectProperty(prop, startPos, startLoc, isPattern, refExpressionErrors);
+ if (!node) this.unexpected();
+ return node;
+ }
+
+ parsePropertyName(prop, refExpressionErrors) {
+ if (this.eat(0)) {
+ prop.computed = true;
+ prop.key = this.parseMaybeAssignAllowIn();
+ this.expect(3);
+ } else {
+ const {
+ type,
+ value
+ } = this.state;
+ let key;
+
+ if (tokenIsKeywordOrIdentifier(type)) {
+ key = this.parseIdentifier(true);
+ } else {
+ switch (type) {
+ case 130:
+ key = this.parseNumericLiteral(value);
+ break;
+
+ case 129:
+ key = this.parseStringLiteral(value);
+ break;
+
+ case 131:
+ key = this.parseBigIntLiteral(value);
+ break;
+
+ case 132:
+ key = this.parseDecimalLiteral(value);
+ break;
+
+ case 134:
+ {
+ const privateKeyLoc = this.state.startLoc;
+
+ if (refExpressionErrors != null) {
+ if (refExpressionErrors.privateKeyLoc === null) {
+ refExpressionErrors.privateKeyLoc = privateKeyLoc;
+ }
+ } else {
+ this.raise(ErrorMessages.UnexpectedPrivateField, {
+ at: privateKeyLoc
+ });
+ }
+
+ key = this.parsePrivateName();
+ break;
+ }
+
+ default:
+ throw this.unexpected();
+ }
+ }
+
+ prop.key = key;
+
+ if (type !== 134) {
+ prop.computed = false;
+ }
+ }
+
+ return prop.key;
+ }
+
+ initFunction(node, isAsync) {
+ node.id = null;
+ node.generator = false;
+ node.async = !!isAsync;
+ }
+
+ parseMethod(node, isGenerator, isAsync, isConstructor, allowDirectSuper, type, inClassScope = false) {
+ this.initFunction(node, isAsync);
+ node.generator = !!isGenerator;
+ const allowModifiers = isConstructor;
+ this.scope.enter(SCOPE_FUNCTION | SCOPE_SUPER | (inClassScope ? SCOPE_CLASS : 0) | (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0));
+ this.prodParam.enter(functionFlags(isAsync, node.generator));
+ this.parseFunctionParams(node, allowModifiers);
+ this.parseFunctionBodyAndFinish(node, type, true);
+ this.prodParam.exit();
+ this.scope.exit();
+ return node;
+ }
+
+ parseArrayLike(close, canBePattern, isTuple, refExpressionErrors) {
+ if (isTuple) {
+ this.expectPlugin("recordAndTuple");
+ }
+
+ const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
+ this.state.inFSharpPipelineDirectBody = false;
+ const node = this.startNode();
+ this.next();
+ node.elements = this.parseExprList(close, !isTuple, refExpressionErrors, node);
+ this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
+ return this.finishNode(node, isTuple ? "TupleExpression" : "ArrayExpression");
+ }
+
+ parseArrowExpression(node, params, isAsync, trailingCommaLoc) {
+ this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);
+ let flags = functionFlags(isAsync, false);
+
+ if (!this.match(5) && this.prodParam.hasIn) {
+ flags |= PARAM_IN;
+ }
+
+ this.prodParam.enter(flags);
+ this.initFunction(node, isAsync);
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+
+ if (params) {
+ this.state.maybeInArrowParameters = true;
+ this.setArrowFunctionParameters(node, params, trailingCommaLoc);
+ }
+
+ this.state.maybeInArrowParameters = false;
+ this.parseFunctionBody(node, true);
+ this.prodParam.exit();
+ this.scope.exit();
+ this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
+ return this.finishNode(node, "ArrowFunctionExpression");
+ }
+
+ setArrowFunctionParameters(node, params, trailingCommaLoc) {
+ node.params = this.toAssignableList(params, trailingCommaLoc, false);
+ }
+
+ parseFunctionBodyAndFinish(node, type, isMethod = false) {
+ this.parseFunctionBody(node, false, isMethod);
+ this.finishNode(node, type);
+ }
+
+ parseFunctionBody(node, allowExpression, isMethod = false) {
+ const isExpression = allowExpression && !this.match(5);
+ this.expressionScope.enter(newExpressionScope());
+
+ if (isExpression) {
+ node.body = this.parseMaybeAssign();
+ this.checkParams(node, false, allowExpression, false);
+ } else {
+ const oldStrict = this.state.strict;
+ const oldLabels = this.state.labels;
+ this.state.labels = [];
+ this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);
+ node.body = this.parseBlock(true, false, hasStrictModeDirective => {
+ const nonSimple = !this.isSimpleParamList(node.params);
+
+ if (hasStrictModeDirective && nonSimple) {
+ const errorOrigin = (node.kind === "method" || node.kind === "constructor") && !!node.key ? {
+ at: node.key.loc.end
+ } : {
+ node
+ };
+ this.raise(ErrorMessages.IllegalLanguageModeDirective, errorOrigin);
+ }
+
+ const strictModeChanged = !oldStrict && this.state.strict;
+ this.checkParams(node, !this.state.strict && !allowExpression && !isMethod && !nonSimple, allowExpression, strictModeChanged);
+
+ if (this.state.strict && node.id) {
+ this.checkLVal(node.id, "function name", BIND_OUTSIDE, undefined, undefined, strictModeChanged);
+ }
+ });
+ this.prodParam.exit();
+ this.state.labels = oldLabels;
+ }
+
+ this.expressionScope.exit();
+ }
+
+ isSimpleParamList(params) {
+ for (let i = 0, len = params.length; i < len; i++) {
+ if (params[i].type !== "Identifier") return false;
+ }
+
+ return true;
+ }
+
+ checkParams(node, allowDuplicates, isArrowFunction, strictModeChanged = true) {
+ const checkClashes = new Set();
+
+ for (const param of node.params) {
+ this.checkLVal(param, "function parameter list", BIND_VAR, allowDuplicates ? null : checkClashes, undefined, strictModeChanged);
+ }
+ }
+
+ parseExprList(close, allowEmpty, refExpressionErrors, nodeForExtra) {
+ const elts = [];
+ let first = true;
+
+ while (!this.eat(close)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(12);
+
+ if (this.match(close)) {
+ if (nodeForExtra) {
+ this.addTrailingCommaExtraToNode(nodeForExtra);
+ }
+
+ this.next();
+ break;
+ }
+ }
+
+ elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));
+ }
+
+ return elts;
+ }
+
+ parseExprListItem(allowEmpty, refExpressionErrors, allowPlaceholder) {
+ let elt;
+
+ if (this.match(12)) {
+ if (!allowEmpty) {
+ this.raise(ErrorMessages.UnexpectedToken, {
+ at: this.state.curPosition()
+ }, ",");
+ }
+
+ elt = null;
+ } else if (this.match(21)) {
+ const spreadNodeStartPos = this.state.start;
+ const spreadNodeStartLoc = this.state.startLoc;
+ elt = this.parseParenItem(this.parseSpread(refExpressionErrors), spreadNodeStartPos, spreadNodeStartLoc);
+ } else if (this.match(17)) {
+ this.expectPlugin("partialApplication");
+
+ if (!allowPlaceholder) {
+ this.raise(ErrorMessages.UnexpectedArgumentPlaceholder, {
+ at: this.state.startLoc
+ });
+ }
+
+ const node = this.startNode();
+ this.next();
+ elt = this.finishNode(node, "ArgumentPlaceholder");
+ } else {
+ elt = this.parseMaybeAssignAllowIn(refExpressionErrors, this.parseParenItem);
+ }
+
+ return elt;
+ }
+
+ parseIdentifier(liberal) {
+ const node = this.startNode();
+ const name = this.parseIdentifierName(node.start, liberal);
+ return this.createIdentifier(node, name);
+ }
+
+ createIdentifier(node, name) {
+ node.name = name;
+ node.loc.identifierName = name;
+ return this.finishNode(node, "Identifier");
+ }
+
+ parseIdentifierName(pos, liberal) {
+ let name;
+ const {
+ startLoc,
+ type
+ } = this.state;
+
+ if (tokenIsKeywordOrIdentifier(type)) {
+ name = this.state.value;
+ } else {
+ throw this.unexpected();
+ }
+
+ const tokenIsKeyword = tokenKeywordOrIdentifierIsKeyword(type);
+
+ if (liberal) {
+ if (tokenIsKeyword) {
+ this.replaceToken(128);
+ }
+ } else {
+ this.checkReservedWord(name, startLoc, tokenIsKeyword, false);
+ }
+
+ this.next();
+ return name;
+ }
+
+ checkReservedWord(word, startLoc, checkKeywords, isBinding) {
+ if (word.length > 10) {
+ return;
+ }
+
+ if (!canBeReservedWord(word)) {
+ return;
+ }
+
+ if (word === "yield") {
+ if (this.prodParam.hasYield) {
+ this.raise(ErrorMessages.YieldBindingIdentifier, {
+ at: startLoc
+ });
+ return;
+ }
+ } else if (word === "await") {
+ if (this.prodParam.hasAwait) {
+ this.raise(ErrorMessages.AwaitBindingIdentifier, {
+ at: startLoc
+ });
+ return;
+ }
+
+ if (this.scope.inStaticBlock) {
+ this.raise(ErrorMessages.AwaitBindingIdentifierInStaticBlock, {
+ at: startLoc
+ });
+ return;
+ }
+
+ this.expressionScope.recordAsyncArrowParametersError(ErrorMessages.AwaitBindingIdentifier, startLoc);
+ } else if (word === "arguments") {
+ if (this.scope.inClassAndNotInNonArrowFunction) {
+ this.raise(ErrorMessages.ArgumentsInClass, {
+ at: startLoc
+ });
+ return;
+ }
+ }
+
+ if (checkKeywords && isKeyword(word)) {
+ this.raise(ErrorMessages.UnexpectedKeyword, {
+ at: startLoc
+ }, word);
+ return;
+ }
+
+ const reservedTest = !this.state.strict ? isReservedWord : isBinding ? isStrictBindReservedWord : isStrictReservedWord;
+
+ if (reservedTest(word, this.inModule)) {
+ this.raise(ErrorMessages.UnexpectedReservedWord, {
+ at: startLoc
+ }, word);
+ }
+ }
+
+ isAwaitAllowed() {
+ if (this.prodParam.hasAwait) return true;
+
+ if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {
+ return true;
+ }
+
+ return false;
+ }
+
+ parseAwait(startPos, startLoc) {
+ const node = this.startNodeAt(startPos, startLoc);
+ this.expressionScope.recordParameterInitializerError(node.loc.start, ErrorMessages.AwaitExpressionFormalParameter);
+
+ if (this.eat(55)) {
+ this.raise(ErrorMessages.ObsoleteAwaitStar, {
+ node
+ });
+ }
+
+ if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {
+ if (this.isAmbiguousAwait()) {
+ this.ambiguousScriptDifferentAst = true;
+ } else {
+ this.sawUnambiguousESM = true;
+ }
+ }
+
+ if (!this.state.soloAwait) {
+ node.argument = this.parseMaybeUnary(null, true);
+ }
+
+ return this.finishNode(node, "AwaitExpression");
+ }
+
+ isAmbiguousAwait() {
+ if (this.hasPrecedingLineBreak()) return true;
+ const {
+ type
+ } = this.state;
+ return type === 53 || type === 10 || type === 0 || tokenIsTemplate(type) || type === 133 || type === 56 || this.hasPlugin("v8intrinsic") && type === 54;
+ }
+
+ parseYield() {
+ const node = this.startNode();
+ this.expressionScope.recordParameterInitializerError(node.loc.start, ErrorMessages.YieldInParameter);
+ this.next();
+ let delegating = false;
+ let argument = null;
+
+ if (!this.hasPrecedingLineBreak()) {
+ delegating = this.eat(55);
+
+ switch (this.state.type) {
+ case 13:
+ case 135:
+ case 8:
+ case 11:
+ case 3:
+ case 9:
+ case 14:
+ case 12:
+ if (!delegating) break;
+
+ default:
+ argument = this.parseMaybeAssign();
+ }
+ }
+
+ node.delegate = delegating;
+ node.argument = argument;
+ return this.finishNode(node, "YieldExpression");
+ }
+
+ checkPipelineAtInfixOperator(left, leftStartLoc) {
+ if (this.hasPlugin(["pipelineOperator", {
+ proposal: "smart"
+ }])) {
+ if (left.type === "SequenceExpression") {
+ this.raise(ErrorMessages.PipelineHeadSequenceExpression, {
+ at: leftStartLoc
+ });
+ }
+ }
+ }
+
+ parseSmartPipelineBodyInStyle(childExpr, startPos, startLoc) {
+ const bodyNode = this.startNodeAt(startPos, startLoc);
+
+ if (this.isSimpleReference(childExpr)) {
+ bodyNode.callee = childExpr;
+ return this.finishNode(bodyNode, "PipelineBareFunction");
+ } else {
+ this.checkSmartPipeTopicBodyEarlyErrors(startLoc);
+ bodyNode.expression = childExpr;
+ return this.finishNode(bodyNode, "PipelineTopicExpression");
+ }
+ }
+
+ isSimpleReference(expression) {
+ switch (expression.type) {
+ case "MemberExpression":
+ return !expression.computed && this.isSimpleReference(expression.object);
+
+ case "Identifier":
+ return true;
+
+ default:
+ return false;
+ }
+ }
+
+ checkSmartPipeTopicBodyEarlyErrors(startLoc) {
+ if (this.match(19)) {
+ throw this.raise(ErrorMessages.PipelineBodyNoArrow, {
+ at: this.state.startLoc
+ });
+ }
+
+ if (!this.topicReferenceWasUsedInCurrentContext()) {
+ this.raise(ErrorMessages.PipelineTopicUnused, {
+ at: startLoc
+ });
+ }
+ }
+
+ withTopicBindingContext(callback) {
+ const outerContextTopicState = this.state.topicContext;
+ this.state.topicContext = {
+ maxNumOfResolvableTopics: 1,
+ maxTopicIndex: null
+ };
+
+ try {
+ return callback();
+ } finally {
+ this.state.topicContext = outerContextTopicState;
+ }
+ }
+
+ withSmartMixTopicForbiddingContext(callback) {
+ if (this.hasPlugin(["pipelineOperator", {
+ proposal: "smart"
+ }])) {
+ const outerContextTopicState = this.state.topicContext;
+ this.state.topicContext = {
+ maxNumOfResolvableTopics: 0,
+ maxTopicIndex: null
+ };
+
+ try {
+ return callback();
+ } finally {
+ this.state.topicContext = outerContextTopicState;
+ }
+ } else {
+ return callback();
+ }
+ }
+
+ withSoloAwaitPermittingContext(callback) {
+ const outerContextSoloAwaitState = this.state.soloAwait;
+ this.state.soloAwait = true;
+
+ try {
+ return callback();
+ } finally {
+ this.state.soloAwait = outerContextSoloAwaitState;
+ }
+ }
+
+ allowInAnd(callback) {
+ const flags = this.prodParam.currentFlags();
+ const prodParamToSet = PARAM_IN & ~flags;
+
+ if (prodParamToSet) {
+ this.prodParam.enter(flags | PARAM_IN);
+
+ try {
+ return callback();
+ } finally {
+ this.prodParam.exit();
+ }
+ }
+
+ return callback();
+ }
+
+ disallowInAnd(callback) {
+ const flags = this.prodParam.currentFlags();
+ const prodParamToClear = PARAM_IN & flags;
+
+ if (prodParamToClear) {
+ this.prodParam.enter(flags & ~PARAM_IN);
+
+ try {
+ return callback();
+ } finally {
+ this.prodParam.exit();
+ }
+ }
+
+ return callback();
+ }
+
+ registerTopicReference() {
+ this.state.topicContext.maxTopicIndex = 0;
+ }
+
+ topicReferenceIsAllowedInCurrentContext() {
+ return this.state.topicContext.maxNumOfResolvableTopics >= 1;
+ }
+
+ topicReferenceWasUsedInCurrentContext() {
+ return this.state.topicContext.maxTopicIndex != null && this.state.topicContext.maxTopicIndex >= 0;
+ }
+
+ parseFSharpPipelineBody(prec) {
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ this.state.potentialArrowAt = this.state.start;
+ const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;
+ this.state.inFSharpPipelineDirectBody = true;
+ const ret = this.parseExprOp(this.parseMaybeUnaryOrPrivate(), startPos, startLoc, prec);
+ this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;
+ return ret;
+ }
+
+ parseModuleExpression() {
+ this.expectPlugin("moduleBlocks");
+ const node = this.startNode();
+ this.next();
+ this.eat(5);
+ const revertScopes = this.initializeScopes(true);
+ this.enterInitialScopes();
+ const program = this.startNode();
+
+ try {
+ node.body = this.parseProgram(program, 8, "module");
+ } finally {
+ revertScopes();
+ }
+
+ this.eat(8);
+ return this.finishNode(node, "ModuleExpression");
+ }
+
+ parsePropertyNamePrefixOperator(prop) {}
+
+}
+
+const loopLabel = {
+ kind: "loop"
+},
+ switchLabel = {
+ kind: "switch"
+};
+const FUNC_NO_FLAGS = 0b000,
+ FUNC_STATEMENT = 0b001,
+ FUNC_HANGING_STATEMENT = 0b010,
+ FUNC_NULLABLE_ID = 0b100;
+const loneSurrogate = /[\uD800-\uDFFF]/u;
+const keywordRelationalOperator = /in(?:stanceof)?/y;
+
+function babel7CompatTokens(tokens, input) {
+ for (let i = 0; i < tokens.length; i++) {
+ const token = tokens[i];
+ const {
+ type
+ } = token;
+
+ if (typeof type === "number") {
+ {
+ if (type === 134) {
+ const {
+ loc,
+ start,
+ value,
+ end
+ } = token;
+ const hashEndPos = start + 1;
+ const hashEndLoc = createPositionWithColumnOffset(loc.start, 1);
+ tokens.splice(i, 1, new Token({
+ type: getExportedToken(27),
+ value: "#",
+ start: start,
+ end: hashEndPos,
+ startLoc: loc.start,
+ endLoc: hashEndLoc
+ }), new Token({
+ type: getExportedToken(128),
+ value: value,
+ start: hashEndPos,
+ end: end,
+ startLoc: hashEndLoc,
+ endLoc: loc.end
+ }));
+ i++;
+ continue;
+ }
+
+ if (tokenIsTemplate(type)) {
+ const {
+ loc,
+ start,
+ value,
+ end
+ } = token;
+ const backquoteEnd = start + 1;
+ const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);
+ let startToken;
+
+ if (input.charCodeAt(start) === 96) {
+ startToken = new Token({
+ type: getExportedToken(22),
+ value: "`",
+ start: start,
+ end: backquoteEnd,
+ startLoc: loc.start,
+ endLoc: backquoteEndLoc
+ });
+ } else {
+ startToken = new Token({
+ type: getExportedToken(8),
+ value: "}",
+ start: start,
+ end: backquoteEnd,
+ startLoc: loc.start,
+ endLoc: backquoteEndLoc
+ });
+ }
+
+ let templateValue, templateElementEnd, templateElementEndLoc, endToken;
+
+ if (type === 24) {
+ templateElementEnd = end - 1;
+ templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);
+ templateValue = value === null ? null : value.slice(1, -1);
+ endToken = new Token({
+ type: getExportedToken(22),
+ value: "`",
+ start: templateElementEnd,
+ end: end,
+ startLoc: templateElementEndLoc,
+ endLoc: loc.end
+ });
+ } else {
+ templateElementEnd = end - 2;
+ templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);
+ templateValue = value === null ? null : value.slice(1, -2);
+ endToken = new Token({
+ type: getExportedToken(23),
+ value: "${",
+ start: templateElementEnd,
+ end: end,
+ startLoc: templateElementEndLoc,
+ endLoc: loc.end
+ });
+ }
+
+ tokens.splice(i, 1, startToken, new Token({
+ type: getExportedToken(20),
+ value: templateValue,
+ start: backquoteEnd,
+ end: templateElementEnd,
+ startLoc: backquoteEndLoc,
+ endLoc: templateElementEndLoc
+ }), endToken);
+ i += 2;
+ continue;
+ }
+ }
+ token.type = getExportedToken(type);
+ }
+ }
+
+ return tokens;
+}
+
+class StatementParser extends ExpressionParser {
+ parseTopLevel(file, program) {
+ file.program = this.parseProgram(program);
+ file.comments = this.state.comments;
+
+ if (this.options.tokens) {
+ file.tokens = babel7CompatTokens(this.tokens, this.input);
+ }
+
+ return this.finishNode(file, "File");
+ }
+
+ parseProgram(program, end = 135, sourceType = this.options.sourceType) {
+ program.sourceType = sourceType;
+ program.interpreter = this.parseInterpreterDirective();
+ this.parseBlockBody(program, true, true, end);
+
+ if (this.inModule && !this.options.allowUndeclaredExports && this.scope.undefinedExports.size > 0) {
+ for (const [name, loc] of Array.from(this.scope.undefinedExports)) {
+ this.raise(ErrorMessages.ModuleExportUndefined, {
+ at: loc
+ }, name);
+ }
+ }
+
+ return this.finishNode(program, "Program");
+ }
+
+ stmtToDirective(stmt) {
+ const directive = stmt;
+ directive.type = "Directive";
+ directive.value = directive.expression;
+ delete directive.expression;
+ const directiveLiteral = directive.value;
+ const expressionValue = directiveLiteral.value;
+ const raw = this.input.slice(directiveLiteral.start, directiveLiteral.end);
+ const val = directiveLiteral.value = raw.slice(1, -1);
+ this.addExtra(directiveLiteral, "raw", raw);
+ this.addExtra(directiveLiteral, "rawValue", val);
+ this.addExtra(directiveLiteral, "expressionValue", expressionValue);
+ directiveLiteral.type = "DirectiveLiteral";
+ return directive;
+ }
+
+ parseInterpreterDirective() {
+ if (!this.match(28)) {
+ return null;
+ }
+
+ const node = this.startNode();
+ node.value = this.state.value;
+ this.next();
+ return this.finishNode(node, "InterpreterDirective");
+ }
+
+ isLet(context) {
+ if (!this.isContextual(99)) {
+ return false;
+ }
+
+ return this.isLetKeyword(context);
+ }
+
+ isLetKeyword(context) {
+ const next = this.nextTokenStart();
+ const nextCh = this.codePointAtPos(next);
+
+ if (nextCh === 92 || nextCh === 91) {
+ return true;
+ }
+
+ if (context) return false;
+ if (nextCh === 123) return true;
+
+ if (isIdentifierStart(nextCh)) {
+ keywordRelationalOperator.lastIndex = next;
+
+ if (keywordRelationalOperator.test(this.input)) {
+ const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex);
+
+ if (!isIdentifierChar(endCh) && endCh !== 92) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ parseStatement(context, topLevel) {
+ if (this.match(26)) {
+ this.parseDecorators(true);
+ }
+
+ return this.parseStatementContent(context, topLevel);
+ }
+
+ parseStatementContent(context, topLevel) {
+ let starttype = this.state.type;
+ const node = this.startNode();
+ let kind;
+
+ if (this.isLet(context)) {
+ starttype = 74;
+ kind = "let";
+ }
+
+ switch (starttype) {
+ case 60:
+ return this.parseBreakContinueStatement(node, true);
+
+ case 63:
+ return this.parseBreakContinueStatement(node, false);
+
+ case 64:
+ return this.parseDebuggerStatement(node);
+
+ case 90:
+ return this.parseDoStatement(node);
+
+ case 91:
+ return this.parseForStatement(node);
+
+ case 68:
+ if (this.lookaheadCharCode() === 46) break;
+
+ if (context) {
+ if (this.state.strict) {
+ this.raise(ErrorMessages.StrictFunction, {
+ at: this.state.startLoc
+ });
+ } else if (context !== "if" && context !== "label") {
+ this.raise(ErrorMessages.SloppyFunction, {
+ at: this.state.startLoc
+ });
+ }
+ }
+
+ return this.parseFunctionStatement(node, false, !context);
+
+ case 80:
+ if (context) this.unexpected();
+ return this.parseClass(node, true);
+
+ case 69:
+ return this.parseIfStatement(node);
+
+ case 70:
+ return this.parseReturnStatement(node);
+
+ case 71:
+ return this.parseSwitchStatement(node);
+
+ case 72:
+ return this.parseThrowStatement(node);
+
+ case 73:
+ return this.parseTryStatement(node);
+
+ case 75:
+ case 74:
+ kind = kind || this.state.value;
+
+ if (context && kind !== "var") {
+ this.raise(ErrorMessages.UnexpectedLexicalDeclaration, {
+ at: this.state.startLoc
+ });
+ }
+
+ return this.parseVarStatement(node, kind);
+
+ case 92:
+ return this.parseWhileStatement(node);
+
+ case 76:
+ return this.parseWithStatement(node);
+
+ case 5:
+ return this.parseBlock();
+
+ case 13:
+ return this.parseEmptyStatement(node);
+
+ case 83:
+ {
+ const nextTokenCharCode = this.lookaheadCharCode();
+
+ if (nextTokenCharCode === 40 || nextTokenCharCode === 46) {
+ break;
+ }
+ }
+
+ case 82:
+ {
+ if (!this.options.allowImportExportEverywhere && !topLevel) {
+ this.raise(ErrorMessages.UnexpectedImportExport, {
+ at: this.state.startLoc
+ });
+ }
+
+ this.next();
+ let result;
+
+ if (starttype === 83) {
+ result = this.parseImport(node);
+
+ if (result.type === "ImportDeclaration" && (!result.importKind || result.importKind === "value")) {
+ this.sawUnambiguousESM = true;
+ }
+ } else {
+ result = this.parseExport(node);
+
+ if (result.type === "ExportNamedDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportAllDeclaration" && (!result.exportKind || result.exportKind === "value") || result.type === "ExportDefaultDeclaration") {
+ this.sawUnambiguousESM = true;
+ }
+ }
+
+ this.assertModuleNodeAllowed(node);
+ return result;
+ }
+
+ default:
+ {
+ if (this.isAsyncFunction()) {
+ if (context) {
+ this.raise(ErrorMessages.AsyncFunctionInSingleStatementContext, {
+ at: this.state.startLoc
+ });
+ }
+
+ this.next();
+ return this.parseFunctionStatement(node, true, !context);
+ }
+ }
+ }
+
+ const maybeName = this.state.value;
+ const expr = this.parseExpression();
+
+ if (tokenIsIdentifier(starttype) && expr.type === "Identifier" && this.eat(14)) {
+ return this.parseLabeledStatement(node, maybeName, expr, context);
+ } else {
+ return this.parseExpressionStatement(node, expr);
+ }
+ }
+
+ assertModuleNodeAllowed(node) {
+ if (!this.options.allowImportExportEverywhere && !this.inModule) {
+ this.raise(SourceTypeModuleErrorMessages.ImportOutsideModule, {
+ node
+ });
+ }
+ }
+
+ takeDecorators(node) {
+ const decorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
+
+ if (decorators.length) {
+ node.decorators = decorators;
+ this.resetStartLocationFromNode(node, decorators[0]);
+ this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];
+ }
+ }
+
+ canHaveLeadingDecorator() {
+ return this.match(80);
+ }
+
+ parseDecorators(allowExport) {
+ const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
+
+ while (this.match(26)) {
+ const decorator = this.parseDecorator();
+ currentContextDecorators.push(decorator);
+ }
+
+ if (this.match(82)) {
+ if (!allowExport) {
+ this.unexpected();
+ }
+
+ if (this.hasPlugin("decorators") && !this.getPluginOption("decorators", "decoratorsBeforeExport")) {
+ this.raise(ErrorMessages.DecoratorExportClass, {
+ at: this.state.startLoc
+ });
+ }
+ } else if (!this.canHaveLeadingDecorator()) {
+ throw this.raise(ErrorMessages.UnexpectedLeadingDecorator, {
+ at: this.state.startLoc
+ });
+ }
+ }
+
+ parseDecorator() {
+ this.expectOnePlugin(["decorators-legacy", "decorators"]);
+ const node = this.startNode();
+ this.next();
+
+ if (this.hasPlugin("decorators")) {
+ this.state.decoratorStack.push([]);
+ const startPos = this.state.start;
+ const startLoc = this.state.startLoc;
+ let expr;
+
+ if (this.eat(10)) {
+ expr = this.parseExpression();
+ this.expect(11);
+ } else {
+ expr = this.parseIdentifier(false);
+
+ while (this.eat(16)) {
+ const node = this.startNodeAt(startPos, startLoc);
+ node.object = expr;
+ node.property = this.parseIdentifier(true);
+ node.computed = false;
+ expr = this.finishNode(node, "MemberExpression");
+ }
+ }
+
+ node.expression = this.parseMaybeDecoratorArguments(expr);
+ this.state.decoratorStack.pop();
+ } else {
+ node.expression = this.parseExprSubscripts();
+ }
+
+ return this.finishNode(node, "Decorator");
+ }
+
+ parseMaybeDecoratorArguments(expr) {
+ if (this.eat(10)) {
+ const node = this.startNodeAtNode(expr);
+ node.callee = expr;
+ node.arguments = this.parseCallExpressionArguments(11, false);
+ this.toReferencedList(node.arguments);
+ return this.finishNode(node, "CallExpression");
+ }
+
+ return expr;
+ }
+
+ parseBreakContinueStatement(node, isBreak) {
+ this.next();
+
+ if (this.isLineTerminator()) {
+ node.label = null;
+ } else {
+ node.label = this.parseIdentifier();
+ this.semicolon();
+ }
+
+ this.verifyBreakContinue(node, isBreak);
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
+ }
+
+ verifyBreakContinue(node, isBreak) {
+ let i;
+
+ for (i = 0; i < this.state.labels.length; ++i) {
+ const lab = this.state.labels[i];
+
+ if (node.label == null || lab.name === node.label.name) {
+ if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
+ if (node.label && isBreak) break;
+ }
+ }
+
+ if (i === this.state.labels.length) {
+ this.raise(ErrorMessages.IllegalBreakContinue, {
+ node
+ }, isBreak ? "break" : "continue");
+ }
+ }
+
+ parseDebuggerStatement(node) {
+ this.next();
+ this.semicolon();
+ return this.finishNode(node, "DebuggerStatement");
+ }
+
+ parseHeaderExpression() {
+ this.expect(10);
+ const val = this.parseExpression();
+ this.expect(11);
+ return val;
+ }
+
+ parseDoStatement(node) {
+ this.next();
+ this.state.labels.push(loopLabel);
+ node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("do"));
+ this.state.labels.pop();
+ this.expect(92);
+ node.test = this.parseHeaderExpression();
+ this.eat(13);
+ return this.finishNode(node, "DoWhileStatement");
+ }
+
+ parseForStatement(node) {
+ this.next();
+ this.state.labels.push(loopLabel);
+ let awaitAt = null;
+
+ if (this.isAwaitAllowed() && this.eatContextual(96)) {
+ awaitAt = this.state.lastTokStartLoc;
+ }
+
+ this.scope.enter(SCOPE_OTHER);
+ this.expect(10);
+
+ if (this.match(13)) {
+ if (awaitAt !== null) {
+ this.unexpected(awaitAt);
+ }
+
+ return this.parseFor(node, null);
+ }
+
+ const startsWithLet = this.isContextual(99);
+ const isLet = startsWithLet && this.isLetKeyword();
+
+ if (this.match(74) || this.match(75) || isLet) {
+ const init = this.startNode();
+ const kind = isLet ? "let" : this.state.value;
+ this.next();
+ this.parseVar(init, true, kind);
+ this.finishNode(init, "VariableDeclaration");
+
+ if ((this.match(58) || this.isContextual(101)) && init.declarations.length === 1) {
+ return this.parseForIn(node, init, awaitAt);
+ }
+
+ if (awaitAt !== null) {
+ this.unexpected(awaitAt);
+ }
+
+ return this.parseFor(node, init);
+ }
+
+ const startsWithAsync = this.isContextual(95);
+ const refExpressionErrors = new ExpressionErrors();
+ const init = this.parseExpression(true, refExpressionErrors);
+ const isForOf = this.isContextual(101);
+
+ if (isForOf) {
+ if (startsWithLet) {
+ this.raise(ErrorMessages.ForOfLet, {
+ node: init
+ });
+ }
+
+ if (awaitAt === null && startsWithAsync && init.type === "Identifier") {
+ this.raise(ErrorMessages.ForOfAsync, {
+ node: init
+ });
+ }
+ }
+
+ if (isForOf || this.match(58)) {
+ this.checkDestructuringPrivate(refExpressionErrors);
+ this.toAssignable(init, true);
+ const description = isForOf ? "for-of statement" : "for-in statement";
+ this.checkLVal(init, description);
+ return this.parseForIn(node, init, awaitAt);
+ } else {
+ this.checkExpressionErrors(refExpressionErrors, true);
+ }
+
+ if (awaitAt !== null) {
+ this.unexpected(awaitAt);
+ }
+
+ return this.parseFor(node, init);
+ }
+
+ parseFunctionStatement(node, isAsync, declarationPosition) {
+ this.next();
+ return this.parseFunction(node, FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT), isAsync);
+ }
+
+ parseIfStatement(node) {
+ this.next();
+ node.test = this.parseHeaderExpression();
+ node.consequent = this.parseStatement("if");
+ node.alternate = this.eat(66) ? this.parseStatement("if") : null;
+ return this.finishNode(node, "IfStatement");
+ }
+
+ parseReturnStatement(node) {
+ if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {
+ this.raise(ErrorMessages.IllegalReturn, {
+ at: this.state.startLoc
+ });
+ }
+
+ this.next();
+
+ if (this.isLineTerminator()) {
+ node.argument = null;
+ } else {
+ node.argument = this.parseExpression();
+ this.semicolon();
+ }
+
+ return this.finishNode(node, "ReturnStatement");
+ }
+
+ parseSwitchStatement(node) {
+ this.next();
+ node.discriminant = this.parseHeaderExpression();
+ const cases = node.cases = [];
+ this.expect(5);
+ this.state.labels.push(switchLabel);
+ this.scope.enter(SCOPE_OTHER);
+ let cur;
+
+ for (let sawDefault; !this.match(8);) {
+ if (this.match(61) || this.match(65)) {
+ const isCase = this.match(61);
+ if (cur) this.finishNode(cur, "SwitchCase");
+ cases.push(cur = this.startNode());
+ cur.consequent = [];
+ this.next();
+
+ if (isCase) {
+ cur.test = this.parseExpression();
+ } else {
+ if (sawDefault) {
+ this.raise(ErrorMessages.MultipleDefaultsInSwitch, {
+ at: this.state.lastTokStartLoc
+ });
+ }
+
+ sawDefault = true;
+ cur.test = null;
+ }
+
+ this.expect(14);
+ } else {
+ if (cur) {
+ cur.consequent.push(this.parseStatement(null));
+ } else {
+ this.unexpected();
+ }
+ }
+ }
+
+ this.scope.exit();
+ if (cur) this.finishNode(cur, "SwitchCase");
+ this.next();
+ this.state.labels.pop();
+ return this.finishNode(node, "SwitchStatement");
+ }
+
+ parseThrowStatement(node) {
+ this.next();
+
+ if (this.hasPrecedingLineBreak()) {
+ this.raise(ErrorMessages.NewlineAfterThrow, {
+ at: this.state.lastTokEndLoc
+ });
+ }
+
+ node.argument = this.parseExpression();
+ this.semicolon();
+ return this.finishNode(node, "ThrowStatement");
+ }
+
+ parseCatchClauseParam() {
+ const param = this.parseBindingAtom();
+ const simple = param.type === "Identifier";
+ this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0);
+ this.checkLVal(param, "catch clause", BIND_LEXICAL);
+ return param;
+ }
+
+ parseTryStatement(node) {
+ this.next();
+ node.block = this.parseBlock();
+ node.handler = null;
+
+ if (this.match(62)) {
+ const clause = this.startNode();
+ this.next();
+
+ if (this.match(10)) {
+ this.expect(10);
+ clause.param = this.parseCatchClauseParam();
+ this.expect(11);
+ } else {
+ clause.param = null;
+ this.scope.enter(SCOPE_OTHER);
+ }
+
+ clause.body = this.withSmartMixTopicForbiddingContext(() => this.parseBlock(false, false));
+ this.scope.exit();
+ node.handler = this.finishNode(clause, "CatchClause");
+ }
+
+ node.finalizer = this.eat(67) ? this.parseBlock() : null;
+
+ if (!node.handler && !node.finalizer) {
+ this.raise(ErrorMessages.NoCatchOrFinally, {
+ node
+ });
+ }
+
+ return this.finishNode(node, "TryStatement");
+ }
+
+ parseVarStatement(node, kind) {
+ this.next();
+ this.parseVar(node, false, kind);
+ this.semicolon();
+ return this.finishNode(node, "VariableDeclaration");
+ }
+
+ parseWhileStatement(node) {
+ this.next();
+ node.test = this.parseHeaderExpression();
+ this.state.labels.push(loopLabel);
+ node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("while"));
+ this.state.labels.pop();
+ return this.finishNode(node, "WhileStatement");
+ }
+
+ parseWithStatement(node) {
+ if (this.state.strict) {
+ this.raise(ErrorMessages.StrictWith, {
+ at: this.state.startLoc
+ });
+ }
+
+ this.next();
+ node.object = this.parseHeaderExpression();
+ node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("with"));
+ return this.finishNode(node, "WithStatement");
+ }
+
+ parseEmptyStatement(node) {
+ this.next();
+ return this.finishNode(node, "EmptyStatement");
+ }
+
+ parseLabeledStatement(node, maybeName, expr, context) {
+ for (const label of this.state.labels) {
+ if (label.name === maybeName) {
+ this.raise(ErrorMessages.LabelRedeclaration, {
+ node: expr
+ }, maybeName);
+ }
+ }
+
+ const kind = tokenIsLoop(this.state.type) ? "loop" : this.match(71) ? "switch" : null;
+
+ for (let i = this.state.labels.length - 1; i >= 0; i--) {
+ const label = this.state.labels[i];
+
+ if (label.statementStart === node.start) {
+ label.statementStart = this.state.start;
+ label.kind = kind;
+ } else {
+ break;
+ }
+ }
+
+ this.state.labels.push({
+ name: maybeName,
+ kind: kind,
+ statementStart: this.state.start
+ });
+ node.body = this.parseStatement(context ? context.indexOf("label") === -1 ? context + "label" : context : "label");
+ this.state.labels.pop();
+ node.label = expr;
+ return this.finishNode(node, "LabeledStatement");
+ }
+
+ parseExpressionStatement(node, expr) {
+ node.expression = expr;
+ this.semicolon();
+ return this.finishNode(node, "ExpressionStatement");
+ }
+
+ parseBlock(allowDirectives = false, createNewLexicalScope = true, afterBlockParse) {
+ const node = this.startNode();
+
+ if (allowDirectives) {
+ this.state.strictErrors.clear();
+ }
+
+ this.expect(5);
+
+ if (createNewLexicalScope) {
+ this.scope.enter(SCOPE_OTHER);
+ }
+
+ this.parseBlockBody(node, allowDirectives, false, 8, afterBlockParse);
+
+ if (createNewLexicalScope) {
+ this.scope.exit();
+ }
+
+ return this.finishNode(node, "BlockStatement");
+ }
+
+ isValidDirective(stmt) {
+ return stmt.type === "ExpressionStatement" && stmt.expression.type === "StringLiteral" && !stmt.expression.extra.parenthesized;
+ }
+
+ parseBlockBody(node, allowDirectives, topLevel, end, afterBlockParse) {
+ const body = node.body = [];
+ const directives = node.directives = [];
+ this.parseBlockOrModuleBlockBody(body, allowDirectives ? directives : undefined, topLevel, end, afterBlockParse);
+ }
+
+ parseBlockOrModuleBlockBody(body, directives, topLevel, end, afterBlockParse) {
+ const oldStrict = this.state.strict;
+ let hasStrictModeDirective = false;
+ let parsedNonDirective = false;
+
+ while (!this.match(end)) {
+ const stmt = this.parseStatement(null, topLevel);
+
+ if (directives && !parsedNonDirective) {
+ if (this.isValidDirective(stmt)) {
+ const directive = this.stmtToDirective(stmt);
+ directives.push(directive);
+
+ if (!hasStrictModeDirective && directive.value.value === "use strict") {
+ hasStrictModeDirective = true;
+ this.setStrict(true);
+ }
+
+ continue;
+ }
+
+ parsedNonDirective = true;
+ this.state.strictErrors.clear();
+ }
+
+ body.push(stmt);
+ }
+
+ if (afterBlockParse) {
+ afterBlockParse.call(this, hasStrictModeDirective);
+ }
+
+ if (!oldStrict) {
+ this.setStrict(false);
+ }
+
+ this.next();
+ }
+
+ parseFor(node, init) {
+ node.init = init;
+ this.semicolon(false);
+ node.test = this.match(13) ? null : this.parseExpression();
+ this.semicolon(false);
+ node.update = this.match(11) ? null : this.parseExpression();
+ this.expect(11);
+ node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("for"));
+ this.scope.exit();
+ this.state.labels.pop();
+ return this.finishNode(node, "ForStatement");
+ }
+
+ parseForIn(node, init, awaitAt) {
+ const isForIn = this.match(58);
+ this.next();
+
+ if (isForIn) {
+ if (awaitAt !== null) this.unexpected(awaitAt);
+ } else {
+ node.await = awaitAt !== null;
+ }
+
+ if (init.type === "VariableDeclaration" && init.declarations[0].init != null && (!isForIn || this.state.strict || init.kind !== "var" || init.declarations[0].id.type !== "Identifier")) {
+ this.raise(ErrorMessages.ForInOfLoopInitializer, {
+ node: init
+ }, isForIn ? "for-in" : "for-of");
+ }
+
+ if (init.type === "AssignmentPattern") {
+ this.raise(ErrorMessages.InvalidLhs, {
+ node: init
+ }, "for-loop");
+ }
+
+ node.left = init;
+ node.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
+ this.expect(11);
+ node.body = this.withSmartMixTopicForbiddingContext(() => this.parseStatement("for"));
+ this.scope.exit();
+ this.state.labels.pop();
+ return this.finishNode(node, isForIn ? "ForInStatement" : "ForOfStatement");
+ }
+
+ parseVar(node, isFor, kind) {
+ const declarations = node.declarations = [];
+ const isTypescript = this.hasPlugin("typescript");
+ node.kind = kind;
+
+ for (;;) {
+ const decl = this.startNode();
+ this.parseVarId(decl, kind);
+
+ if (this.eat(29)) {
+ decl.init = isFor ? this.parseMaybeAssignDisallowIn() : this.parseMaybeAssignAllowIn();
+ } else {
+ if (kind === "const" && !(this.match(58) || this.isContextual(101))) {
+ if (!isTypescript) {
+ this.raise(ErrorMessages.DeclarationMissingInitializer, {
+ at: this.state.lastTokEndLoc
+ }, "Const declarations");
+ }
+ } else if (decl.id.type !== "Identifier" && !(isFor && (this.match(58) || this.isContextual(101)))) {
+ this.raise(ErrorMessages.DeclarationMissingInitializer, {
+ at: this.state.lastTokEndLoc
+ }, "Complex binding patterns");
+ }
+
+ decl.init = null;
+ }
+
+ declarations.push(this.finishNode(decl, "VariableDeclarator"));
+ if (!this.eat(12)) break;
+ }
+
+ return node;
+ }
+
+ parseVarId(decl, kind) {
+ decl.id = this.parseBindingAtom();
+ this.checkLVal(decl.id, "variable declaration", kind === "var" ? BIND_VAR : BIND_LEXICAL, undefined, kind !== "var");
+ }
+
+ parseFunction(node, statement = FUNC_NO_FLAGS, isAsync = false) {
+ const isStatement = statement & FUNC_STATEMENT;
+ const isHangingStatement = statement & FUNC_HANGING_STATEMENT;
+ const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID);
+ this.initFunction(node, isAsync);
+
+ if (this.match(55) && isHangingStatement) {
+ this.raise(ErrorMessages.GeneratorInSingleStatementContext, {
+ at: this.state.startLoc
+ });
+ }
+
+ node.generator = this.eat(55);
+
+ if (isStatement) {
+ node.id = this.parseFunctionId(requireId);
+ }
+
+ const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
+ this.state.maybeInArrowParameters = false;
+ this.scope.enter(SCOPE_FUNCTION);
+ this.prodParam.enter(functionFlags(isAsync, node.generator));
+
+ if (!isStatement) {
+ node.id = this.parseFunctionId();
+ }
+
+ this.parseFunctionParams(node, false);
+ this.withSmartMixTopicForbiddingContext(() => {
+ this.parseFunctionBodyAndFinish(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
+ });
+ this.prodParam.exit();
+ this.scope.exit();
+
+ if (isStatement && !isHangingStatement) {
+ this.registerFunctionStatementId(node);
+ }
+
+ this.state.maybeInArrowParameters = oldMaybeInArrowParameters;
+ return node;
+ }
+
+ parseFunctionId(requireId) {
+ return requireId || tokenIsIdentifier(this.state.type) ? this.parseIdentifier() : null;
+ }
+
+ parseFunctionParams(node, allowModifiers) {
+ this.expect(10);
+ this.expressionScope.enter(newParameterDeclarationScope());
+ node.params = this.parseBindingList(11, 41, false, allowModifiers);
+ this.expressionScope.exit();
+ }
+
+ registerFunctionStatementId(node) {
+ if (!node.id) return;
+ this.scope.declareName(node.id.name, this.state.strict || node.generator || node.async ? this.scope.treatFunctionsAsVar ? BIND_VAR : BIND_LEXICAL : BIND_FUNCTION, node.id.loc.start);
+ }
+
+ parseClass(node, isStatement, optionalId) {
+ this.next();
+ this.takeDecorators(node);
+ const oldStrict = this.state.strict;
+ this.state.strict = true;
+ this.parseClassId(node, isStatement, optionalId);
+ this.parseClassSuper(node);
+ node.body = this.parseClassBody(!!node.superClass, oldStrict);
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
+ }
+
+ isClassProperty() {
+ return this.match(29) || this.match(13) || this.match(8);
+ }
+
+ isClassMethod() {
+ return this.match(10);
+ }
+
+ isNonstaticConstructor(method) {
+ return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor");
+ }
+
+ parseClassBody(hadSuperClass, oldStrict) {
+ this.classScope.enter();
+ const state = {
+ hadConstructor: false,
+ hadSuperClass
+ };
+ let decorators = [];
+ const classBody = this.startNode();
+ classBody.body = [];
+ this.expect(5);
+ this.withSmartMixTopicForbiddingContext(() => {
+ while (!this.match(8)) {
+ if (this.eat(13)) {
+ if (decorators.length > 0) {
+ throw this.raise(ErrorMessages.DecoratorSemicolon, {
+ at: this.state.lastTokEndLoc
+ });
+ }
+
+ continue;
+ }
+
+ if (this.match(26)) {
+ decorators.push(this.parseDecorator());
+ continue;
+ }
+
+ const member = this.startNode();
+
+ if (decorators.length) {
+ member.decorators = decorators;
+ this.resetStartLocationFromNode(member, decorators[0]);
+ decorators = [];
+ }
+
+ this.parseClassMember(classBody, member, state);
+
+ if (member.kind === "constructor" && member.decorators && member.decorators.length > 0) {
+ this.raise(ErrorMessages.DecoratorConstructor, {
+ node: member
+ });
+ }
+ }
+ });
+ this.state.strict = oldStrict;
+ this.next();
+
+ if (decorators.length) {
+ throw this.raise(ErrorMessages.TrailingDecorator, {
+ at: this.state.startLoc
+ });
+ }
+
+ this.classScope.exit();
+ return this.finishNode(classBody, "ClassBody");
+ }
+
+ parseClassMemberFromModifier(classBody, member) {
+ const key = this.parseIdentifier(true);
+
+ if (this.isClassMethod()) {
+ const method = member;
+ method.kind = "method";
+ method.computed = false;
+ method.key = key;
+ method.static = false;
+ this.pushClassMethod(classBody, method, false, false, false, false);
+ return true;
+ } else if (this.isClassProperty()) {
+ const prop = member;
+ prop.computed = false;
+ prop.key = key;
+ prop.static = false;
+ classBody.body.push(this.parseClassProperty(prop));
+ return true;
+ }
+
+ this.resetPreviousNodeTrailingComments(key);
+ return false;
+ }
+
+ parseClassMember(classBody, member, state) {
+ const isStatic = this.isContextual(104);
+
+ if (isStatic) {
+ if (this.parseClassMemberFromModifier(classBody, member)) {
+ return;
+ }
+
+ if (this.eat(5)) {
+ this.parseClassStaticBlock(classBody, member);
+ return;
+ }
+ }
+
+ this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);
+ }
+
+ parseClassMemberWithIsStatic(classBody, member, state, isStatic) {
+ const publicMethod = member;
+ const privateMethod = member;
+ const publicProp = member;
+ const privateProp = member;
+ const accessorProp = member;
+ const method = publicMethod;
+ const publicMember = publicMethod;
+ member.static = isStatic;
+ this.parsePropertyNamePrefixOperator(member);
+
+ if (this.eat(55)) {
+ method.kind = "method";
+ const isPrivateName = this.match(134);
+ this.parseClassElementName(method);
+
+ if (isPrivateName) {
+ this.pushClassPrivateMethod(classBody, privateMethod, true, false);
+ return;
+ }
+
+ if (this.isNonstaticConstructor(publicMethod)) {
+ this.raise(ErrorMessages.ConstructorIsGenerator, {
+ node: publicMethod.key
+ });
+ }
+
+ this.pushClassMethod(classBody, publicMethod, true, false, false, false);
+ return;
+ }
+
+ const isContextual = tokenIsIdentifier(this.state.type) && !this.state.containsEsc;
+ const isPrivate = this.match(134);
+ const key = this.parseClassElementName(member);
+ const maybeQuestionTokenStartLoc = this.state.startLoc;
+ this.parsePostMemberNameModifiers(publicMember);
+
+ if (this.isClassMethod()) {
+ method.kind = "method";
+
+ if (isPrivate) {
+ this.pushClassPrivateMethod(classBody, privateMethod, false, false);
+ return;
+ }
+
+ const isConstructor = this.isNonstaticConstructor(publicMethod);
+ let allowsDirectSuper = false;
+
+ if (isConstructor) {
+ publicMethod.kind = "constructor";
+
+ if (state.hadConstructor && !this.hasPlugin("typescript")) {
+ this.raise(ErrorMessages.DuplicateConstructor, {
+ node: key
+ });
+ }
+
+ if (isConstructor && this.hasPlugin("typescript") && member.override) {
+ this.raise(ErrorMessages.OverrideOnConstructor, {
+ node: key
+ });
+ }
+
+ state.hadConstructor = true;
+ allowsDirectSuper = state.hadSuperClass;
+ }
+
+ this.pushClassMethod(classBody, publicMethod, false, false, isConstructor, allowsDirectSuper);
+ } else if (this.isClassProperty()) {
+ if (isPrivate) {
+ this.pushClassPrivateProperty(classBody, privateProp);
+ } else {
+ this.pushClassProperty(classBody, publicProp);
+ }
+ } else if (isContextual && key.name === "async" && !this.isLineTerminator()) {
+ this.resetPreviousNodeTrailingComments(key);
+ const isGenerator = this.eat(55);
+
+ if (publicMember.optional) {
+ this.unexpected(maybeQuestionTokenStartLoc);
+ }
+
+ method.kind = "method";
+ const isPrivate = this.match(134);
+ this.parseClassElementName(method);
+ this.parsePostMemberNameModifiers(publicMember);
+
+ if (isPrivate) {
+ this.pushClassPrivateMethod(classBody, privateMethod, isGenerator, true);
+ } else {
+ if (this.isNonstaticConstructor(publicMethod)) {
+ this.raise(ErrorMessages.ConstructorIsAsync, {
+ node: publicMethod.key
+ });
+ }
+
+ this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false);
+ }
+ } else if (isContextual && (key.name === "get" || key.name === "set") && !(this.match(55) && this.isLineTerminator())) {
+ this.resetPreviousNodeTrailingComments(key);
+ method.kind = key.name;
+ const isPrivate = this.match(134);
+ this.parseClassElementName(publicMethod);
+
+ if (isPrivate) {
+ this.pushClassPrivateMethod(classBody, privateMethod, false, false);
+ } else {
+ if (this.isNonstaticConstructor(publicMethod)) {
+ this.raise(ErrorMessages.ConstructorIsAccessor, {
+ node: publicMethod.key
+ });
+ }
+
+ this.pushClassMethod(classBody, publicMethod, false, false, false, false);
+ }
+
+ this.checkGetterSetterParams(publicMethod);
+ } else if (isContextual && key.name === "accessor" && !this.isLineTerminator()) {
+ this.expectPlugin("decoratorAutoAccessors");
+ this.resetPreviousNodeTrailingComments(key);
+ const isPrivate = this.match(134);
+ this.parseClassElementName(publicProp);
+ this.pushClassAccessorProperty(classBody, accessorProp, isPrivate);
+ } else if (this.isLineTerminator()) {
+ if (isPrivate) {
+ this.pushClassPrivateProperty(classBody, privateProp);
+ } else {
+ this.pushClassProperty(classBody, publicProp);
+ }
+ } else {
+ this.unexpected();
+ }
+ }
+
+ parseClassElementName(member) {
+ const {
+ type,
+ value
+ } = this.state;
+
+ if ((type === 128 || type === 129) && member.static && value === "prototype") {
+ this.raise(ErrorMessages.StaticPrototype, {
+ at: this.state.startLoc
+ });
+ }
+
+ if (type === 134) {
+ if (value === "constructor") {
+ this.raise(ErrorMessages.ConstructorClassPrivateField, {
+ at: this.state.startLoc
+ });
+ }
+
+ const key = this.parsePrivateName();
+ member.key = key;
+ return key;
+ }
+
+ return this.parsePropertyName(member);
+ }
+
+ parseClassStaticBlock(classBody, member) {
+ var _member$decorators;
+
+ this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER);
+ const oldLabels = this.state.labels;
+ this.state.labels = [];
+ this.prodParam.enter(PARAM);
+ const body = member.body = [];
+ this.parseBlockOrModuleBlockBody(body, undefined, false, 8);
+ this.prodParam.exit();
+ this.scope.exit();
+ this.state.labels = oldLabels;
+ classBody.body.push(this.finishNode(member, "StaticBlock"));
+
+ if ((_member$decorators = member.decorators) != null && _member$decorators.length) {
+ this.raise(ErrorMessages.DecoratorStaticBlock, {
+ node: member
+ });
+ }
+ }
+
+ pushClassProperty(classBody, prop) {
+ if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) {
+ this.raise(ErrorMessages.ConstructorClassField, {
+ node: prop.key
+ });
+ }
+
+ classBody.body.push(this.parseClassProperty(prop));
+ }
+
+ pushClassPrivateProperty(classBody, prop) {
+ const node = this.parseClassPrivateProperty(prop);
+ classBody.body.push(node);
+ this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.loc.start);
+ }
+
+ pushClassAccessorProperty(classBody, prop, isPrivate) {
+ if (!isPrivate && !prop.computed) {
+ const key = prop.key;
+
+ if (key.name === "constructor" || key.value === "constructor") {
+ this.raise(ErrorMessages.ConstructorClassField, {
+ node: key
+ });
+ }
+ }
+
+ const node = this.parseClassAccessorProperty(prop);
+ classBody.body.push(node);
+
+ if (isPrivate) {
+ this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), CLASS_ELEMENT_OTHER, node.key.loc.start);
+ }
+ }
+
+ pushClassMethod(classBody, method, isGenerator, isAsync, isConstructor, allowsDirectSuper) {
+ classBody.body.push(this.parseMethod(method, isGenerator, isAsync, isConstructor, allowsDirectSuper, "ClassMethod", true));
+ }
+
+ pushClassPrivateMethod(classBody, method, isGenerator, isAsync) {
+ const node = this.parseMethod(method, isGenerator, isAsync, false, false, "ClassPrivateMethod", true);
+ classBody.body.push(node);
+ const kind = node.kind === "get" ? node.static ? CLASS_ELEMENT_STATIC_GETTER : CLASS_ELEMENT_INSTANCE_GETTER : node.kind === "set" ? node.static ? CLASS_ELEMENT_STATIC_SETTER : CLASS_ELEMENT_INSTANCE_SETTER : CLASS_ELEMENT_OTHER;
+ this.declareClassPrivateMethodInScope(node, kind);
+ }
+
+ declareClassPrivateMethodInScope(node, kind) {
+ this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), kind, node.key.loc.start);
+ }
+
+ parsePostMemberNameModifiers(methodOrProp) {}
+
+ parseClassPrivateProperty(node) {
+ this.parseInitializer(node);
+ this.semicolon();
+ return this.finishNode(node, "ClassPrivateProperty");
+ }
+
+ parseClassProperty(node) {
+ this.parseInitializer(node);
+ this.semicolon();
+ return this.finishNode(node, "ClassProperty");
+ }
+
+ parseClassAccessorProperty(node) {
+ this.parseInitializer(node);
+ this.semicolon();
+ return this.finishNode(node, "ClassAccessorProperty");
+ }
+
+ parseInitializer(node) {
+ this.scope.enter(SCOPE_CLASS | SCOPE_SUPER);
+ this.expressionScope.enter(newExpressionScope());
+ this.prodParam.enter(PARAM);
+ node.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null;
+ this.expressionScope.exit();
+ this.prodParam.exit();
+ this.scope.exit();
+ }
+
+ parseClassId(node, isStatement, optionalId, bindingType = BIND_CLASS) {
+ if (tokenIsIdentifier(this.state.type)) {
+ node.id = this.parseIdentifier();
+
+ if (isStatement) {
+ this.checkLVal(node.id, "class name", bindingType);
+ }
+ } else {
+ if (optionalId || !isStatement) {
+ node.id = null;
+ } else {
+ throw this.raise(ErrorMessages.MissingClassName, {
+ at: this.state.startLoc
+ });
+ }
+ }
+ }
+
+ parseClassSuper(node) {
+ node.superClass = this.eat(81) ? this.parseExprSubscripts() : null;
+ }
+
+ parseExport(node) {
+ const hasDefault = this.maybeParseExportDefaultSpecifier(node);
+ const parseAfterDefault = !hasDefault || this.eat(12);
+ const hasStar = parseAfterDefault && this.eatExportStar(node);
+ const hasNamespace = hasStar && this.maybeParseExportNamespaceSpecifier(node);
+ const parseAfterNamespace = parseAfterDefault && (!hasNamespace || this.eat(12));
+ const isFromRequired = hasDefault || hasStar;
+
+ if (hasStar && !hasNamespace) {
+ if (hasDefault) this.unexpected();
+ this.parseExportFrom(node, true);
+ return this.finishNode(node, "ExportAllDeclaration");
+ }
+
+ const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);
+
+ if (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers || hasNamespace && parseAfterNamespace && !hasSpecifiers) {
+ throw this.unexpected(null, 5);
+ }
+
+ let hasDeclaration;
+
+ if (isFromRequired || hasSpecifiers) {
+ hasDeclaration = false;
+ this.parseExportFrom(node, isFromRequired);
+ } else {
+ hasDeclaration = this.maybeParseExportDeclaration(node);
+ }
+
+ if (isFromRequired || hasSpecifiers || hasDeclaration) {
+ this.checkExport(node, true, false, !!node.source);
+ return this.finishNode(node, "ExportNamedDeclaration");
+ }
+
+ if (this.eat(65)) {
+ node.declaration = this.parseExportDefaultExpression();
+ this.checkExport(node, true, true);
+ return this.finishNode(node, "ExportDefaultDeclaration");
+ }
+
+ throw this.unexpected(null, 5);
+ }
+
+ eatExportStar(node) {
+ return this.eat(55);
+ }
+
+ maybeParseExportDefaultSpecifier(node) {
+ if (this.isExportDefaultSpecifier()) {
+ this.expectPlugin("exportDefaultFrom");
+ const specifier = this.startNode();
+ specifier.exported = this.parseIdentifier(true);
+ node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
+ return true;
+ }
+
+ return false;
+ }
+
+ maybeParseExportNamespaceSpecifier(node) {
+ if (this.isContextual(93)) {
+ if (!node.specifiers) node.specifiers = [];
+ const specifier = this.startNodeAt(this.state.lastTokStart, this.state.lastTokStartLoc);
+ this.next();
+ specifier.exported = this.parseModuleExportName();
+ node.specifiers.push(this.finishNode(specifier, "ExportNamespaceSpecifier"));
+ return true;
+ }
+
+ return false;
+ }
+
+ maybeParseExportNamedSpecifiers(node) {
+ if (this.match(5)) {
+ if (!node.specifiers) node.specifiers = [];
+ const isTypeExport = node.exportKind === "type";
+ node.specifiers.push(...this.parseExportSpecifiers(isTypeExport));
+ node.source = null;
+ node.declaration = null;
+
+ if (this.hasPlugin("importAssertions")) {
+ node.assertions = [];
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ maybeParseExportDeclaration(node) {
+ if (this.shouldParseExportDeclaration()) {
+ node.specifiers = [];
+ node.source = null;
+
+ if (this.hasPlugin("importAssertions")) {
+ node.assertions = [];
+ }
+
+ node.declaration = this.parseExportDeclaration(node);
+ return true;
+ }
+
+ return false;
+ }
+
+ isAsyncFunction() {
+ if (!this.isContextual(95)) return false;
+ const next = this.nextTokenStart();
+ return !lineBreak.test(this.input.slice(this.state.pos, next)) && this.isUnparsedContextual(next, "function");
+ }
+
+ parseExportDefaultExpression() {
+ const expr = this.startNode();
+ const isAsync = this.isAsyncFunction();
+
+ if (this.match(68) || isAsync) {
+ this.next();
+
+ if (isAsync) {
+ this.next();
+ }
+
+ return this.parseFunction(expr, FUNC_STATEMENT | FUNC_NULLABLE_ID, isAsync);
+ }
+
+ if (this.match(80)) {
+ return this.parseClass(expr, true, true);
+ }
+
+ if (this.match(26)) {
+ if (this.hasPlugin("decorators") && this.getPluginOption("decorators", "decoratorsBeforeExport")) {
+ this.raise(ErrorMessages.DecoratorBeforeExport, {
+ at: this.state.startLoc
+ });
+ }
+
+ this.parseDecorators(false);
+ return this.parseClass(expr, true, true);
+ }
+
+ if (this.match(75) || this.match(74) || this.isLet()) {
+ throw this.raise(ErrorMessages.UnsupportedDefaultExport, {
+ at: this.state.startLoc
+ });
+ }
+
+ const res = this.parseMaybeAssignAllowIn();
+ this.semicolon();
+ return res;
+ }
+
+ parseExportDeclaration(node) {
+ return this.parseStatement(null);
+ }
+
+ isExportDefaultSpecifier() {
+ const {
+ type
+ } = this.state;
+
+ if (tokenIsIdentifier(type)) {
+ if (type === 95 && !this.state.containsEsc || type === 99) {
+ return false;
+ }
+
+ if ((type === 126 || type === 125) && !this.state.containsEsc) {
+ const {
+ type: nextType
+ } = this.lookahead();
+
+ if (tokenIsIdentifier(nextType) && nextType !== 97 || nextType === 5) {
+ this.expectOnePlugin(["flow", "typescript"]);
+ return false;
+ }
+ }
+ } else if (!this.match(65)) {
+ return false;
+ }
+
+ const next = this.nextTokenStart();
+ const hasFrom = this.isUnparsedContextual(next, "from");
+
+ if (this.input.charCodeAt(next) === 44 || tokenIsIdentifier(this.state.type) && hasFrom) {
+ return true;
+ }
+
+ if (this.match(65) && hasFrom) {
+ const nextAfterFrom = this.input.charCodeAt(this.nextTokenStartSince(next + 4));
+ return nextAfterFrom === 34 || nextAfterFrom === 39;
+ }
+
+ return false;
+ }
+
+ parseExportFrom(node, expect) {
+ if (this.eatContextual(97)) {
+ node.source = this.parseImportSource();
+ this.checkExport(node);
+ const assertions = this.maybeParseImportAssertions();
+
+ if (assertions) {
+ node.assertions = assertions;
+ }
+ } else if (expect) {
+ this.unexpected();
+ }
+
+ this.semicolon();
+ }
+
+ shouldParseExportDeclaration() {
+ const {
+ type
+ } = this.state;
+
+ if (type === 26) {
+ this.expectOnePlugin(["decorators", "decorators-legacy"]);
+
+ if (this.hasPlugin("decorators")) {
+ if (this.getPluginOption("decorators", "decoratorsBeforeExport")) {
+ throw this.raise(ErrorMessages.DecoratorBeforeExport, {
+ at: this.state.startLoc
+ });
+ }
+
+ return true;
+ }
+ }
+
+ return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction();
+ }
+
+ checkExport(node, checkNames, isDefault, isFrom) {
+ if (checkNames) {
+ if (isDefault) {
+ this.checkDuplicateExports(node, "default");
+
+ if (this.hasPlugin("exportDefaultFrom")) {
+ var _declaration$extra;
+
+ const declaration = node.declaration;
+
+ if (declaration.type === "Identifier" && declaration.name === "from" && declaration.end - declaration.start === 4 && !((_declaration$extra = declaration.extra) != null && _declaration$extra.parenthesized)) {
+ this.raise(ErrorMessages.ExportDefaultFromAsIdentifier, {
+ node: declaration
+ });
+ }
+ }
+ } else if (node.specifiers && node.specifiers.length) {
+ for (const specifier of node.specifiers) {
+ const {
+ exported
+ } = specifier;
+ const exportedName = exported.type === "Identifier" ? exported.name : exported.value;
+ this.checkDuplicateExports(specifier, exportedName);
+
+ if (!isFrom && specifier.local) {
+ const {
+ local
+ } = specifier;
+
+ if (local.type !== "Identifier") {
+ this.raise(ErrorMessages.ExportBindingIsString, {
+ node: specifier
+ }, local.value, exportedName);
+ } else {
+ this.checkReservedWord(local.name, local.loc.start, true, false);
+ this.scope.checkLocalExport(local);
+ }
+ }
+ }
+ } else if (node.declaration) {
+ if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") {
+ const id = node.declaration.id;
+ if (!id) throw new Error("Assertion failure");
+ this.checkDuplicateExports(node, id.name);
+ } else if (node.declaration.type === "VariableDeclaration") {
+ for (const declaration of node.declaration.declarations) {
+ this.checkDeclaration(declaration.id);
+ }
+ }
+ }
+ }
+
+ const currentContextDecorators = this.state.decoratorStack[this.state.decoratorStack.length - 1];
+
+ if (currentContextDecorators.length) {
+ throw this.raise(ErrorMessages.UnsupportedDecoratorExport, {
+ node
+ });
+ }
+ }
+
+ checkDeclaration(node) {
+ if (node.type === "Identifier") {
+ this.checkDuplicateExports(node, node.name);
+ } else if (node.type === "ObjectPattern") {
+ for (const prop of node.properties) {
+ this.checkDeclaration(prop);
+ }
+ } else if (node.type === "ArrayPattern") {
+ for (const elem of node.elements) {
+ if (elem) {
+ this.checkDeclaration(elem);
+ }
+ }
+ } else if (node.type === "ObjectProperty") {
+ this.checkDeclaration(node.value);
+ } else if (node.type === "RestElement") {
+ this.checkDeclaration(node.argument);
+ } else if (node.type === "AssignmentPattern") {
+ this.checkDeclaration(node.left);
+ }
+ }
+
+ checkDuplicateExports(node, name) {
+ if (this.exportedIdentifiers.has(name)) {
+ this.raise(name === "default" ? ErrorMessages.DuplicateDefaultExport : ErrorMessages.DuplicateExport, {
+ node
+ }, name);
+ }
+
+ this.exportedIdentifiers.add(name);
+ }
+
+ parseExportSpecifiers(isInTypeExport) {
+ const nodes = [];
+ let first = true;
+ this.expect(5);
+
+ while (!this.eat(8)) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(12);
+ if (this.eat(8)) break;
+ }
+
+ const isMaybeTypeOnly = this.isContextual(126);
+ const isString = this.match(129);
+ const node = this.startNode();
+ node.local = this.parseModuleExportName();
+ nodes.push(this.parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly));
+ }
+
+ return nodes;
+ }
+
+ parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) {
+ if (this.eatContextual(93)) {
+ node.exported = this.parseModuleExportName();
+ } else if (isString) {
+ node.exported = cloneStringLiteral(node.local);
+ } else if (!node.exported) {
+ node.exported = cloneIdentifier(node.local);
+ }
+
+ return this.finishNode(node, "ExportSpecifier");
+ }
+
+ parseModuleExportName() {
+ if (this.match(129)) {
+ const result = this.parseStringLiteral(this.state.value);
+ const surrogate = result.value.match(loneSurrogate);
+
+ if (surrogate) {
+ this.raise(ErrorMessages.ModuleExportNameHasLoneSurrogate, {
+ node: result
+ }, surrogate[0].charCodeAt(0).toString(16));
+ }
+
+ return result;
+ }
+
+ return this.parseIdentifier(true);
+ }
+
+ parseImport(node) {
+ node.specifiers = [];
+
+ if (!this.match(129)) {
+ const hasDefault = this.maybeParseDefaultImportSpecifier(node);
+ const parseNext = !hasDefault || this.eat(12);
+ const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);
+ if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node);
+ this.expectContextual(97);
+ }
+
+ node.source = this.parseImportSource();
+ const assertions = this.maybeParseImportAssertions();
+
+ if (assertions) {
+ node.assertions = assertions;
+ } else {
+ const attributes = this.maybeParseModuleAttributes();
+
+ if (attributes) {
+ node.attributes = attributes;
+ }
+ }
+
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration");
+ }
+
+ parseImportSource() {
+ if (!this.match(129)) this.unexpected();
+ return this.parseExprAtom();
+ }
+
+ shouldParseDefaultImport(node) {
+ return tokenIsIdentifier(this.state.type);
+ }
+
+ parseImportSpecifierLocal(node, specifier, type, contextDescription) {
+ specifier.local = this.parseIdentifier();
+ this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL);
+ node.specifiers.push(this.finishNode(specifier, type));
+ }
+
+ parseAssertEntries() {
+ const attrs = [];
+ const attrNames = new Set();
+
+ do {
+ if (this.match(8)) {
+ break;
+ }
+
+ const node = this.startNode();
+ const keyName = this.state.value;
+
+ if (attrNames.has(keyName)) {
+ this.raise(ErrorMessages.ModuleAttributesWithDuplicateKeys, {
+ at: this.state.startLoc
+ }, keyName);
+ }
+
+ attrNames.add(keyName);
+
+ if (this.match(129)) {
+ node.key = this.parseStringLiteral(keyName);
+ } else {
+ node.key = this.parseIdentifier(true);
+ }
+
+ this.expect(14);
+
+ if (!this.match(129)) {
+ throw this.raise(ErrorMessages.ModuleAttributeInvalidValue, {
+ at: this.state.startLoc
+ });
+ }
+
+ node.value = this.parseStringLiteral(this.state.value);
+ this.finishNode(node, "ImportAttribute");
+ attrs.push(node);
+ } while (this.eat(12));
+
+ return attrs;
+ }
+
+ maybeParseModuleAttributes() {
+ if (this.match(76) && !this.hasPrecedingLineBreak()) {
+ this.expectPlugin("moduleAttributes");
+ this.next();
+ } else {
+ if (this.hasPlugin("moduleAttributes")) return [];
+ return null;
+ }
+
+ const attrs = [];
+ const attributes = new Set();
+
+ do {
+ const node = this.startNode();
+ node.key = this.parseIdentifier(true);
+
+ if (node.key.name !== "type") {
+ this.raise(ErrorMessages.ModuleAttributeDifferentFromType, {
+ node: node.key
+ }, node.key.name);
+ }
+
+ if (attributes.has(node.key.name)) {
+ this.raise(ErrorMessages.ModuleAttributesWithDuplicateKeys, {
+ node: node.key
+ }, node.key.name);
+ }
+
+ attributes.add(node.key.name);
+ this.expect(14);
+
+ if (!this.match(129)) {
+ throw this.raise(ErrorMessages.ModuleAttributeInvalidValue, {
+ at: this.state.startLoc
+ });
+ }
+
+ node.value = this.parseStringLiteral(this.state.value);
+ this.finishNode(node, "ImportAttribute");
+ attrs.push(node);
+ } while (this.eat(12));
+
+ return attrs;
+ }
+
+ maybeParseImportAssertions() {
+ if (this.isContextual(94) && !this.hasPrecedingLineBreak()) {
+ this.expectPlugin("importAssertions");
+ this.next();
+ } else {
+ if (this.hasPlugin("importAssertions")) return [];
+ return null;
+ }
+
+ this.eat(5);
+ const attrs = this.parseAssertEntries();
+ this.eat(8);
+ return attrs;
+ }
+
+ maybeParseDefaultImportSpecifier(node) {
+ if (this.shouldParseDefaultImport(node)) {
+ this.parseImportSpecifierLocal(node, this.startNode(), "ImportDefaultSpecifier", "default import specifier");
+ return true;
+ }
+
+ return false;
+ }
+
+ maybeParseStarImportSpecifier(node) {
+ if (this.match(55)) {
+ const specifier = this.startNode();
+ this.next();
+ this.expectContextual(93);
+ this.parseImportSpecifierLocal(node, specifier, "ImportNamespaceSpecifier", "import namespace specifier");
+ return true;
+ }
+
+ return false;
+ }
+
+ parseNamedImportSpecifiers(node) {
+ let first = true;
+ this.expect(5);
+
+ while (!this.eat(8)) {
+ if (first) {
+ first = false;
+ } else {
+ if (this.eat(14)) {
+ throw this.raise(ErrorMessages.DestructureNamedImport, {
+ at: this.state.startLoc
+ });
+ }
+
+ this.expect(12);
+ if (this.eat(8)) break;
+ }
+
+ const specifier = this.startNode();
+ const importedIsString = this.match(129);
+ const isMaybeTypeOnly = this.isContextual(126);
+ specifier.imported = this.parseModuleExportName();
+ const importSpecifier = this.parseImportSpecifier(specifier, importedIsString, node.importKind === "type" || node.importKind === "typeof", isMaybeTypeOnly);
+ node.specifiers.push(importSpecifier);
+ }
+ }
+
+ parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly) {
+ if (this.eatContextual(93)) {
+ specifier.local = this.parseIdentifier();
+ } else {
+ const {
+ imported
+ } = specifier;
+
+ if (importedIsString) {
+ throw this.raise(ErrorMessages.ImportBindingIsString, {
+ node: specifier
+ }, imported.value);
+ }
+
+ this.checkReservedWord(imported.name, specifier.loc.start, true, true);
+
+ if (!specifier.local) {
+ specifier.local = cloneIdentifier(imported);
+ }
+ }
+
+ this.checkLVal(specifier.local, "import specifier", BIND_LEXICAL);
+ return this.finishNode(specifier, "ImportSpecifier");
+ }
+
+ isThisParam(param) {
+ return param.type === "Identifier" && param.name === "this";
+ }
+
+}
+
+class Parser extends StatementParser {
+ constructor(options, input) {
+ options = getOptions(options);
+ super(options, input);
+ this.options = options;
+ this.initializeScopes();
+ this.plugins = pluginsMap(this.options.plugins);
+ this.filename = options.sourceFilename;
+ }
+
+ getScopeHandler() {
+ return ScopeHandler;
+ }
+
+ parse() {
+ this.enterInitialScopes();
+ const file = this.startNode();
+ const program = this.startNode();
+ this.nextToken();
+ file.errors = null;
+ this.parseTopLevel(file, program);
+ file.errors = this.state.errors;
+ return file;
+ }
+
+}
+
+function pluginsMap(plugins) {
+ const pluginMap = new Map();
+
+ for (const plugin of plugins) {
+ const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}];
+ if (!pluginMap.has(name)) pluginMap.set(name, options || {});
+ }
+
+ return pluginMap;
+}
+
+function parse(input, options) {
+ var _options;
+
+ if (((_options = options) == null ? void 0 : _options.sourceType) === "unambiguous") {
+ options = Object.assign({}, options);
+
+ try {
+ options.sourceType = "module";
+ const parser = getParser(options, input);
+ const ast = parser.parse();
+
+ if (parser.sawUnambiguousESM) {
+ return ast;
+ }
+
+ if (parser.ambiguousScriptDifferentAst) {
+ try {
+ options.sourceType = "script";
+ return getParser(options, input).parse();
+ } catch (_unused) {}
+ } else {
+ ast.program.sourceType = "script";
+ }
+
+ return ast;
+ } catch (moduleError) {
+ try {
+ options.sourceType = "script";
+ return getParser(options, input).parse();
+ } catch (_unused2) {}
+
+ throw moduleError;
+ }
+ } else {
+ return getParser(options, input).parse();
+ }
+}
+function parseExpression(input, options) {
+ const parser = getParser(options, input);
+
+ if (parser.options.strictMode) {
+ parser.state.strict = true;
+ }
+
+ return parser.getExpression();
+}
+
+function generateExportedTokenTypes(internalTokenTypes) {
+ const tokenTypes = {};
+
+ for (const typeName of Object.keys(internalTokenTypes)) {
+ tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]);
+ }
+
+ return tokenTypes;
+}
+
+const tokTypes = generateExportedTokenTypes(tt);
+
+function getParser(options, input) {
+ let cls = Parser;
+
+ if (options != null && options.plugins) {
+ validatePlugins(options.plugins);
+ cls = getParserClass(options.plugins);
+ }
+
+ return new cls(options, input);
+}
+
+const parserClassCache = {};
+
+function getParserClass(pluginsFromOptions) {
+ const pluginList = mixinPluginNames.filter(name => hasPlugin(pluginsFromOptions, name));
+ const key = pluginList.join("/");
+ let cls = parserClassCache[key];
+
+ if (!cls) {
+ cls = Parser;
+
+ for (const plugin of pluginList) {
+ cls = mixinPlugins[plugin](cls);
+ }
+
+ parserClassCache[key] = cls;
+ }
+
+ return cls;
+}
+
+exports.parse = parse;
+exports.parseExpression = parseExpression;
+exports.tokTypes = tokTypes;
+//# sourceMappingURL=index.js.map
diff --git a/node_modules/@babel/parser/lib/index.js.map b/node_modules/@babel/parser/lib/index.js.map
new file mode 100644
index 0000000..4c35ccf
--- /dev/null
+++ b/node_modules/@babel/parser/lib/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sources":["../src/parser/base.js","../src/parser/comments.js","../src/parser/error-codes.js","../src/parser/error-message.js","../src/parser/error.js","../src/plugins/estree.js","../src/tokenizer/context.js","../src/tokenizer/types.js","../src/util/location.js","../../babel-helper-validator-identifier/src/identifier.ts","../../babel-helper-validator-identifier/src/keyword.ts","../src/util/identifier.js","../src/util/scopeflags.js","../src/util/scope.js","../src/plugins/flow/scope.js","../src/util/whitespace.js","../src/tokenizer/state.js","../src/tokenizer/index.js","../src/util/class-scope.js","../src/util/expression-scope.js","../src/util/production-parameter.js","../src/parser/util.js","../src/parser/node.js","../src/plugins/flow/index.js","../src/plugins/jsx/xhtml.js","../src/plugins/jsx/index.js","../src/plugins/typescript/scope.js","../src/plugins/typescript/index.js","../src/plugins/placeholders.js","../src/plugins/v8intrinsic.js","../src/plugin-utils.js","../src/options.js","../src/parser/lval.js","../src/parser/expression.js","../src/parser/statement.js","../src/parser/index.js","../src/index.js"],"sourcesContent":["// @flow\n\nimport type { Options } from \"../options\";\nimport type State from \"../tokenizer/state\";\nimport type { PluginsMap } from \"./index\";\nimport type ScopeHandler from \"../util/scope\";\nimport type ExpressionScopeHandler from \"../util/expression-scope\";\nimport type ClassScopeHandler from \"../util/class-scope\";\nimport type ProductionParameterHandler from \"../util/production-parameter\";\n\nexport default class BaseParser {\n // Properties set by constructor in index.js\n declare options: Options;\n declare inModule: boolean;\n declare scope: ScopeHandler<*>;\n declare classScope: ClassScopeHandler;\n declare prodParam: ProductionParameterHandler;\n declare expressionScope: ExpressionScopeHandler;\n declare plugins: PluginsMap;\n declare filename: ?string;\n // Names of exports store. `default` is stored as a name for both\n // `export default foo;` and `export { foo as default };`.\n declare exportedIdentifiers: Set<string>;\n sawUnambiguousESM: boolean = false;\n ambiguousScriptDifferentAst: boolean = false;\n\n // Initialized by Tokenizer\n declare state: State;\n // input and length are not in state as they are constant and we do\n // not want to ever copy them, which happens if state gets cloned\n declare input: string;\n declare length: number;\n\n // This method accepts either a string (plugin name) or an array pair\n // (plugin name and options object). If an options object is given,\n // then each value is non-recursively checked for identity with that\n // plugin’s actual option value.\n hasPlugin(pluginConfig: PluginConfig): boolean {\n if (typeof pluginConfig === \"string\") {\n return this.plugins.has(pluginConfig);\n } else {\n const [pluginName, pluginOptions] = pluginConfig;\n if (!this.hasPlugin(pluginName)) {\n return false;\n }\n const actualOptions = this.plugins.get(pluginName);\n for (const key of Object.keys(pluginOptions)) {\n if (actualOptions?.[key] !== pluginOptions[key]) {\n return false;\n }\n }\n return true;\n }\n }\n\n getPluginOption(plugin: string, name: string) {\n return this.plugins.get(plugin)?.[name];\n }\n}\n\nexport type PluginConfig = string | [string, { [string]: any }];\n","// @flow\n\n/*:: declare var invariant; */\n\nimport BaseParser from \"./base\";\nimport type { Comment, Node } from \"../types\";\nimport * as charCodes from \"charcodes\";\n\n/**\n * A whitespace token containing comments\n * @typedef CommentWhitespace\n * @type {object}\n * @property {number} start - the start of the whitespace token.\n * @property {number} end - the end of the whitespace token.\n * @property {Array<Comment>} comments - the containing comments\n * @property {Node | null} leadingNode - the immediately preceding AST node of the whitespace token\n * @property {Node | null} trailingNode - the immediately following AST node of the whitespace token\n * @property {Node | null} containingNode - the innermost AST node containing the whitespace\n * with minimal size (|end - start|)\n */\nexport type CommentWhitespace = {\n start: number,\n end: number,\n comments: Array<Comment>,\n leadingNode: Node | null,\n trailingNode: Node | null,\n containingNode: Node | null,\n};\n\n/**\n * Merge comments with node's trailingComments or assign comments to be\n * trailingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n *\n * @param {Node} node\n * @param {Array<Comment>} comments\n */\nfunction setTrailingComments(node: Node, comments: Array<Comment>) {\n if (node.trailingComments === undefined) {\n node.trailingComments = comments;\n } else {\n node.trailingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's leadingComments or assign comments to be\n * leadingComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n *\n * @param {Node} node\n * @param {Array<Comment>} comments\n */\nfunction setLeadingComments(node: Node, comments: Array<Comment>) {\n if (node.leadingComments === undefined) {\n node.leadingComments = comments;\n } else {\n node.leadingComments.unshift(...comments);\n }\n}\n\n/**\n * Merge comments with node's innerComments or assign comments to be\n * innerComments. New comments will be placed before old comments\n * because the commentStack is enumerated reversely.\n *\n * @param {Node} node\n * @param {Array<Comment>} comments\n */\nexport function setInnerComments(node: Node, comments: Array<Comment>) {\n if (node.innerComments === undefined) {\n node.innerComments = comments;\n } else {\n node.innerComments.unshift(...comments);\n }\n}\n\n/**\n * Given node and elements array, if elements has non-null element,\n * merge comments to its trailingComments, otherwise merge comments\n * to node's innerComments\n *\n * @param {Node} node\n * @param {Array<Node>} elements\n * @param {Array<Comment>} comments\n */\nfunction adjustInnerComments(\n node: Node,\n elements: Array<Node>,\n commentWS: CommentWhitespace,\n) {\n let lastElement = null;\n let i = elements.length;\n while (lastElement === null && i > 0) {\n lastElement = elements[--i];\n }\n if (lastElement === null || lastElement.start > commentWS.start) {\n setInnerComments(node, commentWS.comments);\n } else {\n setTrailingComments(lastElement, commentWS.comments);\n }\n}\n\n/** @class CommentsParser */\nexport default class CommentsParser extends BaseParser {\n addComment(comment: Comment): void {\n if (this.filename) comment.loc.filename = this.filename;\n this.state.comments.push(comment);\n }\n\n /**\n * Given a newly created AST node _n_, attach _n_ to a comment whitespace _w_ if applicable\n * {@see {@link CommentWhitespace}}\n *\n * @param {Node} node\n * @returns {void}\n * @memberof CommentsParser\n */\n processComment(node: Node): void {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n const lastCommentWS = commentStack[i];\n\n if (lastCommentWS.start === node.end) {\n lastCommentWS.leadingNode = node;\n i--;\n }\n\n const { start: nodeStart } = node;\n // invariant: for all 0 <= j <= i, let c = commentStack[j], c must satisfy c.end < node.end\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n if (commentEnd > nodeStart) {\n // by definition of commentWhiteSpace, this implies commentWS.start > nodeStart\n // so node can be a containingNode candidate. At this time we can finalize the comment\n // whitespace, because\n // 1) its leadingNode or trailingNode, if exists, will not change\n // 2) its containingNode have been assigned and will not change because it is the\n // innermost minimal-sized AST node\n commentWS.containingNode = node;\n this.finalizeComment(commentWS);\n commentStack.splice(i, 1);\n } else {\n if (commentEnd === nodeStart) {\n commentWS.trailingNode = node;\n }\n // stop the loop when commentEnd <= nodeStart\n break;\n }\n }\n }\n\n /**\n * Assign the comments of comment whitespaces to related AST nodes.\n * Also adjust innerComments following trailing comma.\n *\n * @memberof CommentsParser\n */\n finalizeComment(commentWS: CommentWhitespace) {\n const { comments } = commentWS;\n if (commentWS.leadingNode !== null || commentWS.trailingNode !== null) {\n if (commentWS.leadingNode !== null) {\n setTrailingComments(commentWS.leadingNode, comments);\n }\n if (commentWS.trailingNode !== null) {\n setLeadingComments(commentWS.trailingNode, comments);\n }\n } else {\n /*:: invariant(commentWS.containingNode !== null) */\n const { containingNode: node, start: commentStart } = commentWS;\n if (this.input.charCodeAt(commentStart - 1) === charCodes.comma) {\n // If a commentWhitespace follows a comma and the containingNode allows\n // list structures with trailing comma, merge it to the trailingComment\n // of the last non-null list element\n switch (node.type) {\n case \"ObjectExpression\":\n case \"ObjectPattern\":\n case \"RecordExpression\":\n adjustInnerComments(node, node.properties, commentWS);\n break;\n case \"CallExpression\":\n case \"OptionalCallExpression\":\n adjustInnerComments(node, node.arguments, commentWS);\n break;\n case \"FunctionDeclaration\":\n case \"FunctionExpression\":\n case \"ArrowFunctionExpression\":\n case \"ObjectMethod\":\n case \"ClassMethod\":\n case \"ClassPrivateMethod\":\n adjustInnerComments(node, node.params, commentWS);\n break;\n case \"ArrayExpression\":\n case \"ArrayPattern\":\n case \"TupleExpression\":\n adjustInnerComments(node, node.elements, commentWS);\n break;\n case \"ExportNamedDeclaration\":\n case \"ImportDeclaration\":\n adjustInnerComments(node, node.specifiers, commentWS);\n break;\n default: {\n setInnerComments(node, comments);\n }\n }\n } else {\n setInnerComments(node, comments);\n }\n }\n }\n\n /**\n * Drains remaning commentStack and applies finalizeComment\n * to each comment whitespace. Used only in parseExpression\n * where the top level AST node is _not_ Program\n * {@see {@link CommentsParser#finalizeComment}}\n *\n * @memberof CommentsParser\n */\n finalizeRemainingComments() {\n const { commentStack } = this.state;\n for (let i = commentStack.length - 1; i >= 0; i--) {\n this.finalizeComment(commentStack[i]);\n }\n this.state.commentStack = [];\n }\n\n /**\n * Reset previous node trailing comments. Used in object / class\n * property parsing. We parse `async`, `static`, `set` and `get`\n * as an identifier but may reinterepret it into an async/static/accessor\n * method later. In this case the identifier is not part of the AST and we\n * should sync the knowledge to commentStacks\n *\n * For example, when parsing */\n // async /* 1 */ function f() {}\n /*\n * the comment whitespace \"* 1 *\" has leading node Identifier(async). When\n * we see the function token, we create a Function node and mark \"* 1 *\" as\n * inner comments. So \"* 1 *\" should be detached from the Identifier node.\n *\n * @param {N.Node} node the last finished AST node _before_ current token\n * @returns\n * @memberof CommentsParser\n */\n resetPreviousNodeTrailingComments(node: Node) {\n const { commentStack } = this.state;\n const { length } = commentStack;\n if (length === 0) return;\n const commentWS = commentStack[length - 1];\n if (commentWS.leadingNode === node) {\n commentWS.leadingNode = null;\n }\n }\n\n /**\n * Attach a node to the comment whitespaces right before/after\n * the given range.\n *\n * This is used to properly attach comments around parenthesized\n * expressions as leading/trailing comments of the inner expression.\n *\n * @param {Node} node\n * @param {number} start\n * @param {number} end\n */\n takeSurroundingComments(node: Node, start: number, end: number) {\n const { commentStack } = this.state;\n const commentStackLength = commentStack.length;\n if (commentStackLength === 0) return;\n let i = commentStackLength - 1;\n\n for (; i >= 0; i--) {\n const commentWS = commentStack[i];\n const commentEnd = commentWS.end;\n const commentStart = commentWS.start;\n\n if (commentStart === end) {\n commentWS.leadingNode = node;\n } else if (commentEnd === start) {\n commentWS.trailingNode = node;\n } else if (commentEnd < start) {\n break;\n }\n }\n }\n}\n","// @flow\n\nexport const ErrorCodes = Object.freeze({\n SyntaxError: \"BABEL_PARSER_SYNTAX_ERROR\",\n SourceTypeModuleError: \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\",\n});\n\nexport type ErrorCode = $Values<typeof ErrorCodes>;\n","// @flow\n\nimport { makeErrorTemplates, ErrorCodes } from \"./error\";\n\n/* eslint sort-keys: \"error\" */\n\n/**\n * @module parser/error-message\n */\n\n// The Errors key follows https://cs.chromium.org/chromium/src/v8/src/common/message-template.h unless it does not exist\nexport const ErrorMessages = makeErrorTemplates(\n {\n AccessorIsGenerator: \"A %0ter cannot be a generator.\",\n ArgumentsInClass:\n \"'arguments' is only allowed in functions and class methods.\",\n AsyncFunctionInSingleStatementContext:\n \"Async functions can only be declared at the top level or inside a block.\",\n AwaitBindingIdentifier:\n \"Can not use 'await' as identifier inside an async function.\",\n AwaitBindingIdentifierInStaticBlock:\n \"Can not use 'await' as identifier inside a static block.\",\n AwaitExpressionFormalParameter:\n \"'await' is not allowed in async function parameters.\",\n AwaitNotInAsyncContext:\n \"'await' is only allowed within async functions and at the top levels of modules.\",\n AwaitNotInAsyncFunction: \"'await' is only allowed within async functions.\",\n BadGetterArity: \"A 'get' accesor must not have any formal parameters.\",\n BadSetterArity: \"A 'set' accesor must have exactly one formal parameter.\",\n BadSetterRestParameter:\n \"A 'set' accesor function argument must not be a rest parameter.\",\n ConstructorClassField: \"Classes may not have a field named 'constructor'.\",\n ConstructorClassPrivateField:\n \"Classes may not have a private field named '#constructor'.\",\n ConstructorIsAccessor: \"Class constructor may not be an accessor.\",\n ConstructorIsAsync: \"Constructor can't be an async function.\",\n ConstructorIsGenerator: \"Constructor can't be a generator.\",\n DeclarationMissingInitializer: \"'%0' require an initialization value.\",\n DecoratorBeforeExport:\n \"Decorators must be placed *before* the 'export' keyword. You can set the 'decoratorsBeforeExport' option to false to use the 'export @decorator class {}' syntax.\",\n DecoratorConstructor:\n \"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?\",\n DecoratorExportClass:\n \"Using the export keyword between a decorator and a class is not allowed. Please use `export @dec class` instead.\",\n DecoratorSemicolon: \"Decorators must not be followed by a semicolon.\",\n DecoratorStaticBlock: \"Decorators can't be used with a static block.\",\n DeletePrivateField: \"Deleting a private field is not allowed.\",\n DestructureNamedImport:\n \"ES2015 named imports do not destructure. Use another statement for destructuring after the import.\",\n DuplicateConstructor: \"Duplicate constructor in the same class.\",\n DuplicateDefaultExport: \"Only one default export allowed per module.\",\n DuplicateExport:\n \"`%0` has already been exported. Exported identifiers must be unique.\",\n DuplicateProto: \"Redefinition of __proto__ property.\",\n DuplicateRegExpFlags: \"Duplicate regular expression flag.\",\n ElementAfterRest: \"Rest element must be last element.\",\n EscapedCharNotAnIdentifier: \"Invalid Unicode escape.\",\n ExportBindingIsString:\n \"A string literal cannot be used as an exported binding without `from`.\\n- Did you mean `export { '%0' as '%1' } from 'some-module'`?\",\n ExportDefaultFromAsIdentifier:\n \"'from' is not allowed as an identifier after 'export default'.\",\n ForInOfLoopInitializer:\n \"'%0' loop variable declaration may not have an initializer.\",\n ForOfAsync: \"The left-hand side of a for-of loop may not be 'async'.\",\n ForOfLet: \"The left-hand side of a for-of loop may not start with 'let'.\",\n GeneratorInSingleStatementContext:\n \"Generators can only be declared at the top level or inside a block.\",\n IllegalBreakContinue: \"Unsyntactic %0.\",\n IllegalLanguageModeDirective:\n \"Illegal 'use strict' directive in function with non-simple parameter list.\",\n IllegalReturn: \"'return' outside of function.\",\n ImportBindingIsString:\n 'A string literal cannot be used as an imported binding.\\n- Did you mean `import { \"%0\" as foo }`?',\n ImportCallArgumentTrailingComma:\n \"Trailing comma is disallowed inside import(...) arguments.\",\n ImportCallArity: \"`import()` requires exactly %0.\",\n ImportCallNotNewExpression: \"Cannot use new with import(...).\",\n ImportCallSpreadArgument: \"`...` is not allowed in `import()`.\",\n IncompatibleRegExpUVFlags:\n \"The 'u' and 'v' regular expression flags cannot be enabled at the same time.\",\n InvalidBigIntLiteral: \"Invalid BigIntLiteral.\",\n InvalidCodePoint: \"Code point out of bounds.\",\n InvalidCoverInitializedName: \"Invalid shorthand property initializer.\",\n InvalidDecimal: \"Invalid decimal.\",\n InvalidDigit: \"Expected number in radix %0.\",\n InvalidEscapeSequence: \"Bad character escape sequence.\",\n InvalidEscapeSequenceTemplate: \"Invalid escape sequence in template.\",\n InvalidEscapedReservedWord: \"Escape sequence in keyword %0.\",\n InvalidIdentifier: \"Invalid identifier %0.\",\n InvalidLhs: \"Invalid left-hand side in %0.\",\n InvalidLhsBinding: \"Binding invalid left-hand side in %0.\",\n InvalidNumber: \"Invalid number.\",\n InvalidOrMissingExponent:\n \"Floating-point numbers require a valid exponent after the 'e'.\",\n InvalidOrUnexpectedToken: \"Unexpected character '%0'.\",\n InvalidParenthesizedAssignment: \"Invalid parenthesized assignment pattern.\",\n InvalidPrivateFieldResolution: \"Private name #%0 is not defined.\",\n InvalidPropertyBindingPattern: \"Binding member expression.\",\n InvalidRecordProperty:\n \"Only properties and spread elements are allowed in record definitions.\",\n InvalidRestAssignmentPattern: \"Invalid rest operator's argument.\",\n LabelRedeclaration: \"Label '%0' is already declared.\",\n LetInLexicalBinding:\n \"'let' is not allowed to be used as a name in 'let' or 'const' declarations.\",\n LineTerminatorBeforeArrow: \"No line break is allowed before '=>'.\",\n MalformedRegExpFlags: \"Invalid regular expression flag.\",\n MissingClassName: \"A class name is required.\",\n MissingEqInAssignment:\n \"Only '=' operator can be used for specifying default value.\",\n MissingSemicolon: \"Missing semicolon.\",\n MissingUnicodeEscape: \"Expecting Unicode escape sequence \\\\uXXXX.\",\n MixingCoalesceWithLogical:\n \"Nullish coalescing operator(??) requires parens when mixing with logical operators.\",\n ModuleAttributeDifferentFromType:\n \"The only accepted module attribute is `type`.\",\n ModuleAttributeInvalidValue:\n \"Only string literals are allowed as module attribute values.\",\n ModuleAttributesWithDuplicateKeys:\n 'Duplicate key \"%0\" is not allowed in module attributes.',\n ModuleExportNameHasLoneSurrogate:\n \"An export name cannot include a lone surrogate, found '\\\\u%0'.\",\n ModuleExportUndefined: \"Export '%0' is not defined.\",\n MultipleDefaultsInSwitch: \"Multiple default clauses.\",\n NewlineAfterThrow: \"Illegal newline after throw.\",\n NoCatchOrFinally: \"Missing catch or finally clause.\",\n NumberIdentifier: \"Identifier directly after number.\",\n NumericSeparatorInEscapeSequence:\n \"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.\",\n ObsoleteAwaitStar:\n \"'await*' has been removed from the async functions proposal. Use Promise.all() instead.\",\n OptionalChainingNoNew:\n \"Constructors in/after an Optional Chain are not allowed.\",\n OptionalChainingNoTemplate:\n \"Tagged Template Literals are not allowed in optionalChain.\",\n OverrideOnConstructor:\n \"'override' modifier cannot appear on a constructor declaration.\",\n ParamDupe: \"Argument name clash.\",\n PatternHasAccessor: \"Object pattern can't contain getter or setter.\",\n PatternHasMethod: \"Object pattern can't contain methods.\",\n // This error is only used by the smart-mix proposal\n PipeBodyIsTighter:\n \"Unexpected %0 after pipeline body; any %0 expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.\",\n PipeTopicRequiresHackPipes:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n PipeTopicUnbound:\n \"Topic reference is unbound; it must be inside a pipe body.\",\n PipeTopicUnconfiguredToken:\n 'Invalid topic token %0. In order to use %0 as a topic reference, the pipelineOperator plugin must be configured with { \"proposal\": \"hack\", \"topicToken\": \"%0\" }.',\n PipeTopicUnused:\n \"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.\",\n PipeUnparenthesizedBody:\n \"Hack-style pipe body cannot be an unparenthesized %0 expression; please wrap it in parentheses.\",\n\n // Messages whose codes start with “Pipeline” or “PrimaryTopic”\n // are retained for backwards compatibility\n // with the deprecated smart-mix pipe operator proposal plugin.\n // They are subject to removal in a future major version.\n PipelineBodyNoArrow:\n 'Unexpected arrow \"=>\" after pipeline body; arrow function in pipeline body must be parenthesized.',\n PipelineBodySequenceExpression:\n \"Pipeline body may not be a comma-separated sequence expression.\",\n PipelineHeadSequenceExpression:\n \"Pipeline head should not be a comma-separated sequence expression.\",\n PipelineTopicUnused:\n \"Pipeline is in topic style but does not use topic reference.\",\n PrimaryTopicNotAllowed:\n \"Topic reference was used in a lexical context without topic binding.\",\n PrimaryTopicRequiresSmartPipeline:\n 'Topic reference is used, but the pipelineOperator plugin was not passed a \"proposal\": \"hack\" or \"smart\" option.',\n\n PrivateInExpectedIn:\n \"Private names are only allowed in property accesses (`obj.#%0`) or in `in` expressions (`#%0 in obj`).\",\n PrivateNameRedeclaration: \"Duplicate private name #%0.\",\n RecordExpressionBarIncorrectEndSyntaxType:\n \"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionBarIncorrectStartSyntaxType:\n \"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n RecordExpressionHashIncorrectStartSyntaxType:\n \"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n RecordNoProto: \"'__proto__' is not allowed in Record expressions.\",\n RestTrailingComma: \"Unexpected trailing comma after rest element.\",\n SloppyFunction:\n \"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.\",\n StaticPrototype: \"Classes may not have static property named prototype.\",\n StrictDelete: \"Deleting local variable in strict mode.\",\n StrictEvalArguments: \"Assigning to '%0' in strict mode.\",\n StrictEvalArgumentsBinding: \"Binding '%0' in strict mode.\",\n StrictFunction:\n \"In strict mode code, functions can only be declared at top level or inside a block.\",\n StrictNumericEscape:\n \"The only valid numeric escape in strict mode is '\\\\0'.\",\n StrictOctalLiteral: \"Legacy octal literals are not allowed in strict mode.\",\n StrictWith: \"'with' in strict mode.\",\n SuperNotAllowed:\n \"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?\",\n SuperPrivateField: \"Private fields can't be accessed on super.\",\n TrailingDecorator: \"Decorators must be attached to a class element.\",\n TupleExpressionBarIncorrectEndSyntaxType:\n \"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionBarIncorrectStartSyntaxType:\n \"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.\",\n TupleExpressionHashIncorrectStartSyntaxType:\n \"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.\",\n UnexpectedArgumentPlaceholder: \"Unexpected argument placeholder.\",\n UnexpectedAwaitAfterPipelineBody:\n 'Unexpected \"await\" after pipeline body; await must have parentheses in minimal proposal.',\n UnexpectedDigitAfterHash: \"Unexpected digit after hash token.\",\n UnexpectedImportExport:\n \"'import' and 'export' may only appear at the top level.\",\n UnexpectedKeyword: \"Unexpected keyword '%0'.\",\n UnexpectedLeadingDecorator:\n \"Leading decorators must be attached to a class declaration.\",\n UnexpectedLexicalDeclaration:\n \"Lexical declaration cannot appear in a single-statement context.\",\n UnexpectedNewTarget:\n \"`new.target` can only be used in functions or class properties.\",\n UnexpectedNumericSeparator:\n \"A numeric separator is only allowed between two digits.\",\n UnexpectedPrivateField: \"Unexpected private name.\",\n UnexpectedReservedWord: \"Unexpected reserved word '%0'.\",\n UnexpectedSuper: \"'super' is only allowed in object methods and classes.\",\n UnexpectedToken: \"Unexpected token '%0'.\",\n UnexpectedTokenUnaryExponentiation:\n \"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.\",\n UnsupportedBind: \"Binding should be performed on object property.\",\n UnsupportedDecoratorExport:\n \"A decorated export must export a class declaration.\",\n UnsupportedDefaultExport:\n \"Only expressions, functions or classes are allowed as the `default` export.\",\n UnsupportedImport:\n \"`import` can only be used in `import()` or `import.meta`.\",\n UnsupportedMetaProperty: \"The only valid meta property for %0 is %0.%1.\",\n UnsupportedParameterDecorator:\n \"Decorators cannot be used to decorate parameters.\",\n UnsupportedPropertyDecorator:\n \"Decorators cannot be used to decorate object literal properties.\",\n UnsupportedSuper:\n \"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).\",\n UnterminatedComment: \"Unterminated comment.\",\n UnterminatedRegExp: \"Unterminated regular expression.\",\n UnterminatedString: \"Unterminated string constant.\",\n UnterminatedTemplate: \"Unterminated template.\",\n VarRedeclaration: \"Identifier '%0' has already been declared.\",\n YieldBindingIdentifier:\n \"Can not use 'yield' as identifier inside a generator.\",\n YieldInParameter: \"Yield expression is not allowed in formal parameters.\",\n ZeroDigitNumericSeparator:\n \"Numeric separator can not be used after leading 0.\",\n },\n /* code */ ErrorCodes.SyntaxError,\n);\n\nexport const SourceTypeModuleErrorMessages = makeErrorTemplates(\n {\n ImportMetaOutsideModule: `import.meta may appear only with 'sourceType: \"module\"'`,\n ImportOutsideModule: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n },\n /* code */ ErrorCodes.SourceTypeModuleError,\n);\n","// @flow\n/* eslint sort-keys: \"error\" */\nimport { type Position } from \"../util/location\";\nimport CommentsParser from \"./comments\";\nimport { type ErrorCode, ErrorCodes } from \"./error-codes\";\nimport { type Node } from \"../types\";\n\n// This function is used to raise exceptions on parse errors. It\n// takes an offset integer (into the current `input`) to indicate\n// the location of the error, attaches the position to the end\n// of the error message, and then raises a `SyntaxError` with that\n// message.\n\ntype ErrorContext = {\n pos: number,\n loc: Position,\n missingPlugin?: Array<string>,\n code?: string,\n reasonCode?: String,\n};\nexport type ParsingError = SyntaxError & ErrorContext;\n\nexport type ErrorTemplate = {\n code: ErrorCode,\n template: string,\n reasonCode: string,\n};\nexport type ErrorTemplates = {\n [key: string]: ErrorTemplate,\n};\n\ntype Origin = {| node: Node |} | {| at: Position |};\n\ntype SyntaxPlugin =\n | \"flow\"\n | \"typescript\"\n | \"jsx\"\n | \"placeholders\"\n | typeof undefined;\n\nfunction keepReasonCodeCompat(reasonCode: string, syntaxPlugin: SyntaxPlugin) {\n if (!process.env.BABEL_8_BREAKING) {\n // For consistency in TypeScript and Flow error codes\n if (syntaxPlugin === \"flow\" && reasonCode === \"PatternIsOptional\") {\n return \"OptionalBindingPattern\";\n }\n }\n return reasonCode;\n}\n\nexport function makeErrorTemplates(\n messages: {\n [key: string]: string,\n },\n code: ErrorCode,\n syntaxPlugin?: SyntaxPlugin,\n): ErrorTemplates {\n const templates: ErrorTemplates = {};\n Object.keys(messages).forEach(reasonCode => {\n templates[reasonCode] = Object.freeze({\n code,\n reasonCode: keepReasonCodeCompat(reasonCode, syntaxPlugin),\n template: messages[reasonCode],\n });\n });\n return Object.freeze(templates);\n}\n\nexport { ErrorCodes };\nexport {\n ErrorMessages as Errors,\n SourceTypeModuleErrorMessages as SourceTypeModuleErrors,\n} from \"./error-message\";\n\nexport type raiseFunction = (ErrorTemplate, Origin, ...any) => void;\nexport type ErrorData = {| message: ErrorTemplate, loc: Position |};\n\nexport default class ParserError extends CommentsParser {\n // Forward-declaration: defined in tokenizer/index.js\n /*::\n +isLookahead: boolean;\n */\n\n raise(\n { code, reasonCode, template }: ErrorTemplate,\n origin: Origin,\n ...params: any\n ): Error | empty {\n return this.raiseWithData(\n origin.node ? origin.node.loc.start : origin.at,\n { code, reasonCode },\n template,\n ...params,\n );\n }\n\n /**\n * Raise a parsing error on given position pos. If errorRecovery is true,\n * it will first search current errors and overwrite the error thrown on the exact\n * position before with the new error message. If errorRecovery is false, it\n * fallbacks to `raise`.\n *\n * @param {number} pos\n * @param {string} errorTemplate\n * @param {...any} params\n * @returns {(Error | empty)}\n * @memberof ParserError\n */\n raiseOverwrite(\n loc: Position,\n { code, template }: ErrorTemplate,\n ...params: any\n ): Error | empty {\n const pos = loc.index;\n const message =\n template.replace(/%(\\d+)/g, (_, i: number) => params[i]) +\n ` (${loc.line}:${loc.column})`;\n if (this.options.errorRecovery) {\n const errors = this.state.errors;\n for (let i = errors.length - 1; i >= 0; i--) {\n const error = errors[i];\n if (error.pos === pos) {\n return Object.assign(error, { message });\n } else if (error.pos < pos) {\n break;\n }\n }\n }\n return this._raise({ code, loc, pos }, message);\n }\n\n raiseWithData(\n loc: Position,\n data?: {\n missingPlugin?: Array<string>,\n code?: string,\n },\n errorTemplate: string,\n ...params: any\n ): Error | empty {\n const pos = loc.index;\n const message =\n errorTemplate.replace(/%(\\d+)/g, (_, i: number) => params[i]) +\n ` (${loc.line}:${loc.column})`;\n return this._raise(Object.assign(({ loc, pos }: Object), data), message);\n }\n\n _raise(errorContext: ErrorContext, message: string): Error | empty {\n // $FlowIgnore\n const err: SyntaxError & ErrorContext = new SyntaxError(message);\n Object.assign(err, errorContext);\n if (this.options.errorRecovery) {\n if (!this.isLookahead) this.state.errors.push(err);\n return err;\n } else {\n throw err;\n }\n }\n}\n","// @flow\n\nimport { type TokenType } from \"../tokenizer/types\";\nimport type Parser from \"../parser\";\nimport type { ExpressionErrors } from \"../parser/util\";\nimport * as N from \"../types\";\nimport type { Node as NodeType, NodeBase, File } from \"../types\";\nimport type { Position } from \"../util/location\";\nimport { Errors } from \"../parser/error\";\n\nconst { defineProperty } = Object;\nconst toUnenumerable = (object, key) =>\n defineProperty(object, key, { enumerable: false, value: object[key] });\n\nfunction toESTreeLocation(node: any) {\n toUnenumerable(node.loc.start, \"index\");\n toUnenumerable(node.loc.end, \"index\");\n\n return node;\n}\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n parse(): File {\n const file = toESTreeLocation(super.parse());\n\n if (this.options.tokens) {\n file.tokens = file.tokens.map(toESTreeLocation);\n }\n\n return file;\n }\n\n parseRegExpLiteral({ pattern, flags }): N.Node {\n let regex = null;\n try {\n regex = new RegExp(pattern, flags);\n } catch (e) {\n // In environments that don't support these flags value will\n // be null as the regex can't be represented natively.\n }\n const node = this.estreeParseLiteral<N.EstreeRegExpLiteral>(regex);\n node.regex = { pattern, flags };\n\n return node;\n }\n\n parseBigIntLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/es2020.md#bigintliteral\n let bigInt;\n try {\n // $FlowIgnore\n bigInt = BigInt(value);\n } catch {\n bigInt = null;\n }\n const node = this.estreeParseLiteral<N.EstreeBigIntLiteral>(bigInt);\n node.bigint = String(node.value || value);\n\n return node;\n }\n\n parseDecimalLiteral(value: any): N.Node {\n // https://github.com/estree/estree/blob/master/experimental/decimal.md\n // todo: use BigDecimal when node supports it.\n const decimal = null;\n const node = this.estreeParseLiteral(decimal);\n node.decimal = String(node.value || value);\n\n return node;\n }\n\n estreeParseLiteral<T: N.Node>(value: any) {\n return this.parseLiteral<T>(value, \"Literal\");\n }\n\n parseStringLiteral(value: any): N.Node {\n return this.estreeParseLiteral(value);\n }\n\n parseNumericLiteral(value: any): any {\n return this.estreeParseLiteral(value);\n }\n\n parseNullLiteral(): N.Node {\n return this.estreeParseLiteral(null);\n }\n\n parseBooleanLiteral(value: boolean): N.BooleanLiteral {\n return this.estreeParseLiteral(value);\n }\n\n directiveToStmt(directive: N.Directive): N.ExpressionStatement {\n const directiveLiteral = directive.value;\n\n const stmt = this.startNodeAt(directive.start, directive.loc.start);\n const expression = this.startNodeAt(\n directiveLiteral.start,\n directiveLiteral.loc.start,\n );\n\n expression.value = directiveLiteral.extra.expressionValue;\n expression.raw = directiveLiteral.extra.raw;\n\n stmt.expression = this.finishNodeAt(\n expression,\n \"Literal\",\n directiveLiteral.loc.end,\n );\n stmt.directive = directiveLiteral.extra.raw.slice(1, -1);\n\n return this.finishNodeAt(stmt, \"ExpressionStatement\", directive.loc.end);\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n initFunction(\n node: N.BodilessFunctionOrMethodBase,\n isAsync: ?boolean,\n ): void {\n super.initFunction(node, isAsync);\n node.expression = false;\n }\n\n checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n if (node != null && this.isObjectProperty(node)) {\n this.checkDeclaration(((node: any): N.EstreeProperty).value);\n } else {\n super.checkDeclaration(node);\n }\n }\n\n getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n return ((method: any): N.EstreeProperty | N.EstreeMethodDefinition).value\n .params;\n }\n\n isValidDirective(stmt: N.Statement): boolean {\n return (\n stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"Literal\" &&\n typeof stmt.expression.value === \"string\" &&\n !stmt.expression.extra?.parenthesized\n );\n }\n\n parseBlockBody(\n node: N.BlockStatementLike,\n ...args: [?boolean, boolean, TokenType, void | (boolean => void)]\n ): void {\n super.parseBlockBody(node, ...args);\n\n const directiveStatements = node.directives.map(d =>\n this.directiveToStmt(d),\n );\n node.body = directiveStatements.concat(node.body);\n // $FlowIgnore - directives isn't optional in the type definition\n delete node.directives;\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n this.parseMethod(\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n \"ClassMethod\",\n true,\n );\n if (method.typeParameters) {\n // $FlowIgnore\n method.value.typeParameters = method.typeParameters;\n delete method.typeParameters;\n }\n classBody.body.push(method);\n }\n\n parsePrivateName(): any {\n const node = super.parsePrivateName();\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return node;\n }\n }\n return this.convertPrivateNameToPrivateIdentifier(node);\n }\n\n convertPrivateNameToPrivateIdentifier(\n node: N.PrivateName,\n ): N.EstreePrivateIdentifier {\n const name = super.getPrivateNameSV(node);\n node = (node: any);\n delete node.id;\n node.name = name;\n node.type = \"PrivateIdentifier\";\n return node;\n }\n\n isPrivateName(node: N.Node): boolean {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.isPrivateName(node);\n }\n }\n return node.type === \"PrivateIdentifier\";\n }\n\n getPrivateNameSV(node: N.Node): string {\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return super.getPrivateNameSV(node);\n }\n }\n return node.name;\n }\n\n parseLiteral<T: N.Node>(value: any, type: $ElementType<T, \"type\">): T {\n const node = super.parseLiteral<T>(value, type);\n node.raw = node.extra.raw;\n delete node.extra;\n\n return node;\n }\n\n parseFunctionBody(\n node: N.Function,\n allowExpression: ?boolean,\n isMethod?: boolean = false,\n ): void {\n super.parseFunctionBody(node, allowExpression, isMethod);\n node.expression = node.body.type !== \"BlockStatement\";\n }\n\n parseMethod<T: N.MethodLike>(\n node: T,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: string,\n inClassScope: boolean = false,\n ): T {\n let funcNode = this.startNode();\n funcNode.kind = node.kind; // provide kind, so super method correctly sets state\n funcNode = super.parseMethod(\n funcNode,\n isGenerator,\n isAsync,\n isConstructor,\n allowDirectSuper,\n type,\n inClassScope,\n );\n funcNode.type = \"FunctionExpression\";\n delete funcNode.kind;\n // $FlowIgnore\n node.value = funcNode;\n if (type === \"ClassPrivateMethod\") {\n // $FlowIgnore\n node.computed = false;\n }\n type = \"MethodDefinition\";\n return this.finishNode(node, type);\n }\n\n parseClassProperty(...args: [N.ClassProperty]): any {\n const propertyNode = (super.parseClassProperty(...args): any);\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return (propertyNode: N.EstreePropertyDefinition);\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n return (propertyNode: N.EstreePropertyDefinition);\n }\n\n parseClassPrivateProperty(...args: [N.ClassPrivateProperty]): any {\n const propertyNode = (super.parseClassPrivateProperty(...args): any);\n if (!process.env.BABEL_8_BREAKING) {\n if (!this.getPluginOption(\"estree\", \"classFeatures\")) {\n return (propertyNode: N.EstreePropertyDefinition);\n }\n }\n propertyNode.type = \"PropertyDefinition\";\n propertyNode.computed = false;\n return (propertyNode: N.EstreePropertyDefinition);\n }\n\n parseObjectMethod(\n prop: N.ObjectMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): ?N.ObjectMethod {\n const node: N.EstreeProperty = (super.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ): any);\n\n if (node) {\n node.type = \"Property\";\n if (((node: any): N.ClassMethod).kind === \"method\") node.kind = \"init\";\n node.shorthand = false;\n }\n\n return (node: any);\n }\n\n parseObjectProperty(\n prop: N.ObjectProperty,\n startPos: ?number,\n startLoc: ?Position,\n isPattern: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): ?N.ObjectProperty {\n const node: N.EstreeProperty = (super.parseObjectProperty(\n prop,\n startPos,\n startLoc,\n isPattern,\n refExpressionErrors,\n ): any);\n\n if (node) {\n node.kind = \"init\";\n node.type = \"Property\";\n }\n\n return (node: any);\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n if (node != null && this.isObjectProperty(node)) {\n return this.isAssignable(node.value, isBinding);\n }\n return super.isAssignable(node, isBinding);\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): N.Node {\n if (node != null && this.isObjectProperty(node)) {\n const { key, value } = node;\n if (this.isPrivateName(key)) {\n this.classScope.usePrivateName(\n this.getPrivateNameSV(key),\n key.loc.start,\n );\n }\n this.toAssignable(value, isLHS);\n return node;\n }\n\n return super.toAssignable(node, isLHS);\n }\n\n toAssignableObjectExpressionProp(prop: N.Node, ...args) {\n if (prop.kind === \"get\" || prop.kind === \"set\") {\n this.raise(Errors.PatternHasAccessor, { node: prop.key });\n } else if (prop.method) {\n this.raise(Errors.PatternHasMethod, { node: prop.key });\n } else {\n super.toAssignableObjectExpressionProp(prop, ...args);\n }\n }\n\n finishCallExpression<T: N.CallExpression | N.OptionalCallExpression>(\n node: T,\n optional: boolean,\n ): N.Expression {\n super.finishCallExpression(node, optional);\n\n if (node.callee.type === \"Import\") {\n ((node: N.Node): N.EstreeImportExpression).type = \"ImportExpression\";\n ((node: N.Node): N.EstreeImportExpression).source = node.arguments[0];\n if (this.hasPlugin(\"importAssertions\")) {\n ((node: N.Node): N.EstreeImportExpression).attributes =\n node.arguments[1] ?? null;\n }\n // $FlowIgnore - arguments isn't optional in the type definition\n delete node.arguments;\n // $FlowIgnore - callee isn't optional in the type definition\n delete node.callee;\n }\n\n return node;\n }\n\n toReferencedArguments(\n node:\n | N.CallExpression\n | N.OptionalCallExpression\n | N.EstreeImportExpression,\n /* isParenthesizedExpr?: boolean, */\n ) {\n // ImportExpressions do not have an arguments array.\n if (node.type === \"ImportExpression\") {\n return;\n }\n\n super.toReferencedArguments(node);\n }\n\n parseExport(node: N.Node) {\n super.parseExport(node);\n\n switch (node.type) {\n case \"ExportAllDeclaration\":\n node.exported = null;\n break;\n\n case \"ExportNamedDeclaration\":\n if (\n node.specifiers.length === 1 &&\n node.specifiers[0].type === \"ExportNamespaceSpecifier\"\n ) {\n node.type = \"ExportAllDeclaration\";\n node.exported = node.specifiers[0].exported;\n delete node.specifiers;\n }\n\n break;\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n state: N.ParseSubscriptState,\n ) {\n const node = super.parseSubscript(\n base,\n startPos,\n startLoc,\n noCalls,\n state,\n );\n\n if (state.optionalChainMember) {\n // https://github.com/estree/estree/blob/master/es2020.md#chainexpression\n if (\n node.type === \"OptionalMemberExpression\" ||\n node.type === \"OptionalCallExpression\"\n ) {\n node.type = node.type.substring(8); // strip Optional prefix\n }\n if (state.stop) {\n const chain = this.startNodeAtNode(node);\n chain.expression = node;\n return this.finishNode(chain, \"ChainExpression\");\n }\n } else if (\n node.type === \"MemberExpression\" ||\n node.type === \"CallExpression\"\n ) {\n node.optional = false;\n }\n\n return node;\n }\n\n hasPropertyAsPrivateName(node: N.Node): boolean {\n if (node.type === \"ChainExpression\") {\n node = node.expression;\n }\n return super.hasPropertyAsPrivateName(node);\n }\n\n isOptionalChain(node: N.Node): boolean {\n return node.type === \"ChainExpression\";\n }\n\n isObjectProperty(node: N.Node): boolean {\n return node.type === \"Property\" && node.kind === \"init\" && !node.method;\n }\n\n isObjectMethod(node: N.Node): boolean {\n return node.method || node.kind === \"get\" || node.kind === \"set\";\n }\n\n finishNodeAt<T: NodeType>(node: T, type: string, endLoc: Position): T {\n return toESTreeLocation(super.finishNodeAt(node, type, endLoc));\n }\n\n resetEndLocation(\n node: NodeBase,\n endLoc?: Position = this.state.lastTokEndLoc,\n ): void {\n super.resetEndLocation(node, endLoc);\n toESTreeLocation(node);\n }\n };\n","// @flow\n\n// The token context is used in JSX plugin to track\n// jsx tag / jsx text / normal JavaScript expression\n\nexport class TokContext {\n constructor(token: string, preserveSpace?: boolean) {\n this.token = token;\n this.preserveSpace = !!preserveSpace;\n }\n\n token: string;\n preserveSpace: boolean;\n}\n\nconst types: {\n [key: string]: TokContext,\n} = {\n brace: new TokContext(\"{\"), // normal JavaScript expression\n j_oTag: new TokContext(\"<tag\"), // JSX openning tag\n j_cTag: new TokContext(\"</tag\"), // JSX closing tag\n j_expr: new TokContext(\"<tag>...</tag>\", true), // JSX expressions\n};\n\nif (!process.env.BABEL_8_BREAKING) {\n types.template = new TokContext(\"`\", true);\n}\n\nexport { types };\n","// @flow\nimport { types as tc, type TokContext } from \"./context\";\n// ## Token types\n\n// The assignment of fine-grained, information-carrying type objects\n// allows the tokenizer to store the information it has about a\n// token in a way that is very cheap for the parser to look up.\n\n// All token type variables start with an underscore, to make them\n// easy to recognize.\n\n// The `beforeExpr` property is used to disambiguate between 1) binary\n// expression (<) and JSX Tag start (<name>); 2) object literal and JSX\n// texts. It is set on the `updateContext` function in the JSX plugin.\n\n// The `startsExpr` property is used to determine whether an expression\n// may be the “argument” subexpression of a `yield` expression or\n// `yield` statement. It is set on all token types that may be at the\n// start of a subexpression.\n\n// `isLoop` marks a keyword as starting a loop, which is important\n// to know when parsing a label, in order to allow or disallow\n// continue jumps to that label.\n\nconst beforeExpr = true;\nconst startsExpr = true;\nconst isLoop = true;\nconst isAssign = true;\nconst prefix = true;\nconst postfix = true;\n\ntype TokenOptions = {\n keyword?: string,\n beforeExpr?: boolean,\n startsExpr?: boolean,\n rightAssociative?: boolean,\n isLoop?: boolean,\n isAssign?: boolean,\n prefix?: boolean,\n postfix?: boolean,\n binop?: ?number,\n};\n\n// Internally the tokenizer stores token as a number\nexport opaque type TokenType = number;\n\n// The `ExportedTokenType` is exported via `tokTypes` and accessible\n// when `tokens: true` is enabled. Unlike internal token type, it provides\n// metadata of the tokens.\nexport class ExportedTokenType {\n label: string;\n keyword: ?string;\n beforeExpr: boolean;\n startsExpr: boolean;\n rightAssociative: boolean;\n isLoop: boolean;\n isAssign: boolean;\n prefix: boolean;\n postfix: boolean;\n binop: ?number;\n // todo(Babel 8): remove updateContext from exposed token layout\n declare updateContext: ?(context: Array<TokContext>) => void;\n\n constructor(label: string, conf: TokenOptions = {}) {\n this.label = label;\n this.keyword = conf.keyword;\n this.beforeExpr = !!conf.beforeExpr;\n this.startsExpr = !!conf.startsExpr;\n this.rightAssociative = !!conf.rightAssociative;\n this.isLoop = !!conf.isLoop;\n this.isAssign = !!conf.isAssign;\n this.prefix = !!conf.prefix;\n this.postfix = !!conf.postfix;\n this.binop = conf.binop != null ? conf.binop : null;\n if (!process.env.BABEL_8_BREAKING) {\n this.updateContext = null;\n }\n }\n}\n\n// A map from keyword/keyword-like string value to the token type\nexport const keywords = new Map<string, TokenType>();\n\nfunction createKeyword(name: string, options: TokenOptions = {}): TokenType {\n options.keyword = name;\n const token = createToken(name, options);\n keywords.set(name, token);\n return token;\n}\n\nfunction createBinop(name: string, binop: number) {\n return createToken(name, { beforeExpr, binop });\n}\n\nlet tokenTypeCounter = -1;\nexport const tokenTypes: ExportedTokenType[] = [];\nconst tokenLabels: string[] = [];\nconst tokenBinops: number[] = [];\nconst tokenBeforeExprs: boolean[] = [];\nconst tokenStartsExprs: boolean[] = [];\nconst tokenPrefixes: boolean[] = [];\n\nfunction createToken(name: string, options: TokenOptions = {}): TokenType {\n ++tokenTypeCounter;\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n tokenTypes.push(new ExportedTokenType(name, options));\n\n return tokenTypeCounter;\n}\n\nfunction createKeywordLike(\n name: string,\n options: TokenOptions = {},\n): TokenType {\n ++tokenTypeCounter;\n keywords.set(name, tokenTypeCounter);\n tokenLabels.push(name);\n tokenBinops.push(options.binop ?? -1);\n tokenBeforeExprs.push(options.beforeExpr ?? false);\n tokenStartsExprs.push(options.startsExpr ?? false);\n tokenPrefixes.push(options.prefix ?? false);\n // In the exported token type, we set the label as \"name\" for backward compatibility with Babel 7\n tokenTypes.push(new ExportedTokenType(\"name\", options));\n\n return tokenTypeCounter;\n}\n\n// For performance the token type helpers depend on the following declarations order.\n// When adding new token types, please also check if the token helpers need update.\n\nexport const tt: { [name: string]: TokenType } = {\n // Punctuation token types.\n bracketL: createToken(\"[\", { beforeExpr, startsExpr }),\n bracketHashL: createToken(\"#[\", { beforeExpr, startsExpr }),\n bracketBarL: createToken(\"[|\", { beforeExpr, startsExpr }),\n bracketR: createToken(\"]\"),\n bracketBarR: createToken(\"|]\"),\n braceL: createToken(\"{\", { beforeExpr, startsExpr }),\n braceBarL: createToken(\"{|\", { beforeExpr, startsExpr }),\n braceHashL: createToken(\"#{\", { beforeExpr, startsExpr }),\n braceR: createToken(\"}\", { beforeExpr }),\n braceBarR: createToken(\"|}\"),\n parenL: createToken(\"(\", { beforeExpr, startsExpr }),\n parenR: createToken(\")\"),\n comma: createToken(\",\", { beforeExpr }),\n semi: createToken(\";\", { beforeExpr }),\n colon: createToken(\":\", { beforeExpr }),\n doubleColon: createToken(\"::\", { beforeExpr }),\n dot: createToken(\".\"),\n question: createToken(\"?\", { beforeExpr }),\n questionDot: createToken(\"?.\"),\n arrow: createToken(\"=>\", { beforeExpr }),\n template: createToken(\"template\"),\n ellipsis: createToken(\"...\", { beforeExpr }),\n backQuote: createToken(\"`\", { startsExpr }),\n dollarBraceL: createToken(\"${\", { beforeExpr, startsExpr }),\n // start: isTemplate\n templateTail: createToken(\"...`\", { startsExpr }),\n templateNonTail: createToken(\"...${\", { beforeExpr, startsExpr }),\n // end: isTemplate\n at: createToken(\"@\"),\n hash: createToken(\"#\", { startsExpr }),\n\n // Special hashbang token.\n interpreterDirective: createToken(\"#!...\"),\n\n // Operators. These carry several kinds of properties to help the\n // parser use them properly (the presence of these properties is\n // what categorizes them as operators).\n //\n // `binop`, when present, specifies that this operator is a binary\n // operator, and will refer to its precedence.\n //\n // `prefix` and `postfix` mark the operator as a prefix or postfix\n // unary operator.\n //\n // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as\n // binary operators with a very low precedence, that should result\n // in AssignmentExpression nodes.\n\n // start: isAssign\n eq: createToken(\"=\", { beforeExpr, isAssign }),\n assign: createToken(\"_=\", { beforeExpr, isAssign }),\n slashAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // These are only needed to support % and ^ as a Hack-pipe topic token.\n // When the proposal settles on a token, the others can be merged with\n // tt.assign.\n xorAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n moduloAssign: createToken(\"_=\", { beforeExpr, isAssign }),\n // end: isAssign\n\n incDec: createToken(\"++/--\", { prefix, postfix, startsExpr }),\n bang: createToken(\"!\", { beforeExpr, prefix, startsExpr }),\n tilde: createToken(\"~\", { beforeExpr, prefix, startsExpr }),\n\n // More possible topic tokens.\n // When the proposal settles on a token, at least one of these may be removed.\n doubleCaret: createToken(\"^^\", { startsExpr }),\n doubleAt: createToken(\"@@\", { startsExpr }),\n\n // start: isBinop\n pipeline: createBinop(\"|>\", 0),\n nullishCoalescing: createBinop(\"??\", 1),\n logicalOR: createBinop(\"||\", 1),\n logicalAND: createBinop(\"&&\", 2),\n bitwiseOR: createBinop(\"|\", 3),\n bitwiseXOR: createBinop(\"^\", 4),\n bitwiseAND: createBinop(\"&\", 5),\n equality: createBinop(\"==/!=/===/!==\", 6),\n lt: createBinop(\"</>/<=/>=\", 7),\n gt: createBinop(\"</>/<=/>=\", 7),\n relational: createBinop(\"</>/<=/>=\", 7),\n bitShift: createBinop(\"<</>>/>>>\", 8),\n bitShiftL: createBinop(\"<</>>/>>>\", 8),\n bitShiftR: createBinop(\"<</>>/>>>\", 8),\n plusMin: createToken(\"+/-\", { beforeExpr, binop: 9, prefix, startsExpr }),\n // startsExpr: required by v8intrinsic plugin\n modulo: createToken(\"%\", { binop: 10, startsExpr }),\n // unset `beforeExpr` as it can be `function *`\n star: createToken(\"*\", { binop: 10 }),\n slash: createBinop(\"/\", 10),\n exponent: createToken(\"**\", {\n beforeExpr,\n binop: 11,\n rightAssociative: true,\n }),\n\n // Keywords\n // Don't forget to update packages/babel-helper-validator-identifier/src/keyword.js\n // when new keywords are added\n // start: isLiteralPropertyName\n // start: isKeyword\n _in: createKeyword(\"in\", { beforeExpr, binop: 7 }),\n _instanceof: createKeyword(\"instanceof\", { beforeExpr, binop: 7 }),\n // end: isBinop\n _break: createKeyword(\"break\"),\n _case: createKeyword(\"case\", { beforeExpr }),\n _catch: createKeyword(\"catch\"),\n _continue: createKeyword(\"continue\"),\n _debugger: createKeyword(\"debugger\"),\n _default: createKeyword(\"default\", { beforeExpr }),\n _else: createKeyword(\"else\", { beforeExpr }),\n _finally: createKeyword(\"finally\"),\n _function: createKeyword(\"function\", { startsExpr }),\n _if: createKeyword(\"if\"),\n _return: createKeyword(\"return\", { beforeExpr }),\n _switch: createKeyword(\"switch\"),\n _throw: createKeyword(\"throw\", { beforeExpr, prefix, startsExpr }),\n _try: createKeyword(\"try\"),\n _var: createKeyword(\"var\"),\n _const: createKeyword(\"const\"),\n _with: createKeyword(\"with\"),\n _new: createKeyword(\"new\", { beforeExpr, startsExpr }),\n _this: createKeyword(\"this\", { startsExpr }),\n _super: createKeyword(\"super\", { startsExpr }),\n _class: createKeyword(\"class\", { startsExpr }),\n _extends: createKeyword(\"extends\", { beforeExpr }),\n _export: createKeyword(\"export\"),\n _import: createKeyword(\"import\", { startsExpr }),\n _null: createKeyword(\"null\", { startsExpr }),\n _true: createKeyword(\"true\", { startsExpr }),\n _false: createKeyword(\"false\", { startsExpr }),\n _typeof: createKeyword(\"typeof\", { beforeExpr, prefix, startsExpr }),\n _void: createKeyword(\"void\", { beforeExpr, prefix, startsExpr }),\n _delete: createKeyword(\"delete\", { beforeExpr, prefix, startsExpr }),\n // start: isLoop\n _do: createKeyword(\"do\", { isLoop, beforeExpr }),\n _for: createKeyword(\"for\", { isLoop }),\n _while: createKeyword(\"while\", { isLoop }),\n // end: isLoop\n // end: isKeyword\n\n // Primary literals\n // start: isIdentifier\n _as: createKeywordLike(\"as\", { startsExpr }),\n _assert: createKeywordLike(\"assert\", { startsExpr }),\n _async: createKeywordLike(\"async\", { startsExpr }),\n _await: createKeywordLike(\"await\", { startsExpr }),\n _from: createKeywordLike(\"from\", { startsExpr }),\n _get: createKeywordLike(\"get\", { startsExpr }),\n _let: createKeywordLike(\"let\", { startsExpr }),\n _meta: createKeywordLike(\"meta\", { startsExpr }),\n _of: createKeywordLike(\"of\", { startsExpr }),\n _sent: createKeywordLike(\"sent\", { startsExpr }),\n _set: createKeywordLike(\"set\", { startsExpr }),\n _static: createKeywordLike(\"static\", { startsExpr }),\n _yield: createKeywordLike(\"yield\", { startsExpr }),\n\n // Flow and TypeScript Keywordlike\n _asserts: createKeywordLike(\"asserts\", { startsExpr }),\n _checks: createKeywordLike(\"checks\", { startsExpr }),\n _exports: createKeywordLike(\"exports\", { startsExpr }),\n _global: createKeywordLike(\"global\", { startsExpr }),\n _implements: createKeywordLike(\"implements\", { startsExpr }),\n _intrinsic: createKeywordLike(\"intrinsic\", { startsExpr }),\n _infer: createKeywordLike(\"infer\", { startsExpr }),\n _is: createKeywordLike(\"is\", { startsExpr }),\n _mixins: createKeywordLike(\"mixins\", { startsExpr }),\n _proto: createKeywordLike(\"proto\", { startsExpr }),\n _require: createKeywordLike(\"require\", { startsExpr }),\n // start: isTSTypeOperator\n _keyof: createKeywordLike(\"keyof\", { startsExpr }),\n _readonly: createKeywordLike(\"readonly\", { startsExpr }),\n _unique: createKeywordLike(\"unique\", { startsExpr }),\n // end: isTSTypeOperator\n // start: isTSDeclarationStart\n _abstract: createKeywordLike(\"abstract\", { startsExpr }),\n _declare: createKeywordLike(\"declare\", { startsExpr }),\n _enum: createKeywordLike(\"enum\", { startsExpr }),\n _module: createKeywordLike(\"module\", { startsExpr }),\n _namespace: createKeywordLike(\"namespace\", { startsExpr }),\n // start: isFlowInterfaceOrTypeOrOpaque\n _interface: createKeywordLike(\"interface\", { startsExpr }),\n _type: createKeywordLike(\"type\", { startsExpr }),\n // end: isTSDeclarationStart\n _opaque: createKeywordLike(\"opaque\", { startsExpr }),\n // end: isFlowInterfaceOrTypeOrOpaque\n name: createToken(\"name\", { startsExpr }),\n // end: isIdentifier\n\n string: createToken(\"string\", { startsExpr }),\n num: createToken(\"num\", { startsExpr }),\n bigint: createToken(\"bigint\", { startsExpr }),\n decimal: createToken(\"decimal\", { startsExpr }),\n // end: isLiteralPropertyName\n regexp: createToken(\"regexp\", { startsExpr }),\n privateName: createToken(\"#name\", { startsExpr }),\n eof: createToken(\"eof\"),\n\n // jsx plugin\n jsxName: createToken(\"jsxName\"),\n jsxText: createToken(\"jsxText\", { beforeExpr: true }),\n jsxTagStart: createToken(\"jsxTagStart\", { startsExpr: true }),\n jsxTagEnd: createToken(\"jsxTagEnd\"),\n\n // placeholder plugin\n placeholder: createToken(\"%%\", { startsExpr: true }),\n};\n\nexport function tokenIsIdentifier(token: TokenType): boolean {\n return token >= tt._as && token <= tt.name;\n}\n\nexport function tokenKeywordOrIdentifierIsKeyword(token: TokenType): boolean {\n // we can remove the token >= tt._in check when we\n // know a token is either keyword or identifier\n return token <= tt._while;\n}\n\nexport function tokenIsKeywordOrIdentifier(token: TokenType): boolean {\n return token >= tt._in && token <= tt.name;\n}\n\nexport function tokenIsLiteralPropertyName(token: TokenType): boolean {\n return token >= tt._in && token <= tt.decimal;\n}\n\nexport function tokenComesBeforeExpression(token: TokenType): boolean {\n return tokenBeforeExprs[token];\n}\n\nexport function tokenCanStartExpression(token: TokenType): boolean {\n return tokenStartsExprs[token];\n}\n\nexport function tokenIsAssignment(token: TokenType): boolean {\n return token >= tt.eq && token <= tt.moduloAssign;\n}\n\nexport function tokenIsFlowInterfaceOrTypeOrOpaque(token: TokenType): boolean {\n return token >= tt._interface && token <= tt._opaque;\n}\n\nexport function tokenIsLoop(token: TokenType): boolean {\n return token >= tt._do && token <= tt._while;\n}\n\nexport function tokenIsKeyword(token: TokenType): boolean {\n return token >= tt._in && token <= tt._while;\n}\n\nexport function tokenIsOperator(token: TokenType): boolean {\n return token >= tt.pipeline && token <= tt._instanceof;\n}\n\nexport function tokenIsPostfix(token: TokenType): boolean {\n return token === tt.incDec;\n}\n\nexport function tokenIsPrefix(token: TokenType): boolean {\n return tokenPrefixes[token];\n}\n\nexport function tokenIsTSTypeOperator(token: TokenType): boolean {\n return token >= tt._keyof && token <= tt._unique;\n}\n\nexport function tokenIsTSDeclarationStart(token: TokenType): boolean {\n return token >= tt._abstract && token <= tt._type;\n}\n\nexport function tokenLabelName(token: TokenType): string {\n return tokenLabels[token];\n}\n\nexport function tokenOperatorPrecedence(token: TokenType): number {\n return tokenBinops[token];\n}\n\nexport function tokenIsRightAssociative(token: TokenType): boolean {\n return token === tt.exponent;\n}\n\nexport function tokenIsTemplate(token: TokenType): boolean {\n return token >= tt.templateTail && token <= tt.templateNonTail;\n}\n\nexport function getExportedToken(token: TokenType): ExportedTokenType {\n return tokenTypes[token];\n}\n\nexport function isTokenType(obj: any): boolean {\n return typeof obj === \"number\";\n}\n\nif (!process.env.BABEL_8_BREAKING) {\n tokenTypes[tt.braceR].updateContext = context => {\n context.pop();\n };\n\n tokenTypes[tt.braceL].updateContext =\n tokenTypes[tt.braceHashL].updateContext =\n tokenTypes[tt.dollarBraceL].updateContext =\n context => {\n context.push(tc.brace);\n };\n\n tokenTypes[tt.backQuote].updateContext = context => {\n if (context[context.length - 1] === tc.template) {\n context.pop();\n } else {\n context.push(tc.template);\n }\n };\n\n tokenTypes[tt.jsxTagStart].updateContext = context => {\n context.push(tc.j_expr, tc.j_oTag);\n };\n}\n","// @flow\n\nexport type Pos = {\n start: number,\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n line: number;\n column: number;\n index: number;\n\n constructor(line: number, col: number, index: number) {\n this.line = line;\n this.column = col;\n this.index = index;\n }\n}\n\nexport class SourceLocation {\n start: Position;\n end: Position;\n filename: string;\n identifierName: ?string;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // $FlowIgnore (may start as null, but initialized later)\n this.end = end;\n }\n}\n\n/**\n * creates a new position with a non-zero column offset from the given position.\n * This function should be only be used when we create AST node out of the token\n * boundaries, such as TemplateElement ends before tt.templateNonTail. This\n * function does not skip whitespaces.\n *\n * @export\n * @param {Position} position\n * @param {number} columnOffset\n * @returns {Position}\n */\nexport function createPositionWithColumnOffset(\n position: Position,\n columnOffset: number,\n) {\n const { line, column, index } = position;\n return new Position(line, column + columnOffset, index + columnOffset);\n}\n","import * as charCodes from \"charcodes\";\n\n// ## Character categories\n\n// Big ugly regular expressions that match characters in the\n// whitespace, identifier, and identifier-start categories. These\n// are only applied when a character is found to actually have a\n// code point between 0x80 and 0xffff.\n// Generated by `scripts/generate-identifier-regex.js`.\n\n/* prettier-ignore */\nlet nonASCIIidentifierStartChars = \"\\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\\u0560-\\u0588\\u05d0-\\u05ea\\u05ef-\\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\\u0860-\\u086a\\u0870-\\u0887\\u0889-\\u088e\\u08a0-\\u08c9\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-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\u0e8c-\\u0ea3\\u0ea5\\u0ea7-\\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-\\u1711\\u171f-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1878\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191e\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19b0-\\u19c9\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4c\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1c80-\\u1c88\\u1c90-\\u1cba\\u1cbd-\\u1cbf\\u1ce9-\\u1cec\\u1cee-\\u1cf3\\u1cf5\\u1cf6\\u1cfa\\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-\\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-\\u312f\\u3131-\\u318e\\u31a0-\\u31bf\\u31f0-\\u31ff\\u3400-\\u4dbf\\u4e00-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua69d\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua7ca\\ua7d0\\ua7d1\\ua7d3\\ua7d5-\\ua7d9\\ua7f2-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua8fd\\ua8fe\\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-\\uab69\\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\";\n/* prettier-ignore */\nlet nonASCIIidentifierChars = \"\\u200c\\u200d\\xb7\\u0300-\\u036f\\u0387\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u064b-\\u0669\\u0670\\u06d6-\\u06dc\\u06df-\\u06e4\\u06e7\\u06e8\\u06ea-\\u06ed\\u06f0-\\u06f9\\u0711\\u0730-\\u074a\\u07a6-\\u07b0\\u07c0-\\u07c9\\u07eb-\\u07f3\\u07fd\\u0816-\\u0819\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0859-\\u085b\\u0898-\\u089f\\u08ca-\\u08e1\\u08e3-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09cb-\\u09cd\\u09d7\\u09e2\\u09e3\\u09e6-\\u09ef\\u09fe\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2\\u0ae3\\u0ae6-\\u0aef\\u0afa-\\u0aff\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b55-\\u0b57\\u0b62\\u0b63\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c00-\\u0c04\\u0c3c\\u0c3e-\\u0c44\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62\\u0c63\\u0c66-\\u0c6f\\u0c81-\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2\\u0ce3\\u0ce6-\\u0cef\\u0d00-\\u0d03\\u0d3b\\u0d3c\\u0d3e-\\u0d44\\u0d46-\\u0d48\\u0d4a-\\u0d4d\\u0d57\\u0d62\\u0d63\\u0d66-\\u0d6f\\u0d81-\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0de6-\\u0def\\u0df2\\u0df3\\u0e31\\u0e34-\\u0e3a\\u0e47-\\u0e4e\\u0e50-\\u0e59\\u0eb1\\u0eb4-\\u0ebc\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f3e\\u0f3f\\u0f71-\\u0f84\\u0f86\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u102b-\\u103e\\u1040-\\u1049\\u1056-\\u1059\\u105e-\\u1060\\u1062-\\u1064\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17b4-\\u17d3\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u180f-\\u1819\\u18a9\\u1920-\\u192b\\u1930-\\u193b\\u1946-\\u194f\\u19d0-\\u19da\\u1a17-\\u1a1b\\u1a55-\\u1a5e\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1ab0-\\u1abd\\u1abf-\\u1ace\\u1b00-\\u1b04\\u1b34-\\u1b44\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1b80-\\u1b82\\u1ba1-\\u1bad\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c24-\\u1c37\\u1c40-\\u1c49\\u1c50-\\u1c59\\u1cd0-\\u1cd2\\u1cd4-\\u1ce8\\u1ced\\u1cf4\\u1cf7-\\u1cf9\\u1dc0-\\u1dff\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2cef-\\u2cf1\\u2d7f\\u2de0-\\u2dff\\u302a-\\u302f\\u3099\\u309a\\ua620-\\ua629\\ua66f\\ua674-\\ua67d\\ua69e\\ua69f\\ua6f0\\ua6f1\\ua802\\ua806\\ua80b\\ua823-\\ua827\\ua82c\\ua880\\ua881\\ua8b4-\\ua8c5\\ua8d0-\\ua8d9\\ua8e0-\\ua8f1\\ua8ff-\\ua909\\ua926-\\ua92d\\ua947-\\ua953\\ua980-\\ua983\\ua9b3-\\ua9c0\\ua9d0-\\ua9d9\\ua9e5\\ua9f0-\\ua9f9\\uaa29-\\uaa36\\uaa43\\uaa4c\\uaa4d\\uaa50-\\uaa59\\uaa7b-\\uaa7d\\uaab0\\uaab2-\\uaab4\\uaab7\\uaab8\\uaabe\\uaabf\\uaac1\\uaaeb-\\uaaef\\uaaf5\\uaaf6\\uabe3-\\uabea\\uabec\\uabed\\uabf0-\\uabf9\\ufb1e\\ufe00-\\ufe0f\\ufe20-\\ufe2f\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f\";\n\nconst nonASCIIidentifierStart = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + \"]\",\n);\nconst nonASCIIidentifier = new RegExp(\n \"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\",\n);\n\nnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\n// These are a run-length and offset-encoded representation of the\n// >0xffff code points that are a valid part of identifiers. The\n// offset starts at 0x10000, and each pair of numbers represents an\n// offset to the next range, and then a size of the range. They were\n// generated by `scripts/generate-identifier-regex.js`.\n/* prettier-ignore */\nconst astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,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,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,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,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,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,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,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,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938];\n/* prettier-ignore */\nconst astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,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,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];\n\n// This has a complexity linear to the value of the code. The\n// assumption is that looking up astral identifier characters is\n// rare.\nfunction isInAstralSet(code: number, set: readonly number[]): boolean {\n let pos = 0x10000;\n for (let i = 0, length = set.length; i < length; i += 2) {\n pos += set[i];\n if (pos > code) return false;\n\n pos += set[i + 1];\n if (pos >= code) return true;\n }\n return false;\n}\n\n// Test whether a given character code starts an identifier.\n\nexport function isIdentifierStart(code: number): boolean {\n if (code < charCodes.uppercaseA) return code === charCodes.dollarSign;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return (\n code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))\n );\n }\n return isInAstralSet(code, astralIdentifierStartCodes);\n}\n\n// Test whether a given character is part of an identifier.\n\nexport function isIdentifierChar(code: number): boolean {\n if (code < charCodes.digit0) return code === charCodes.dollarSign;\n if (code < charCodes.colon) return true;\n if (code < charCodes.uppercaseA) return false;\n if (code <= charCodes.uppercaseZ) return true;\n if (code < charCodes.lowercaseA) return code === charCodes.underscore;\n if (code <= charCodes.lowercaseZ) return true;\n if (code <= 0xffff) {\n return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n }\n return (\n isInAstralSet(code, astralIdentifierStartCodes) ||\n isInAstralSet(code, astralIdentifierCodes)\n );\n}\n\n// Test whether a given string is a valid identifier name\n\nexport function isIdentifierName(name: string): boolean {\n let isFirst = true;\n for (let i = 0; i < name.length; i++) {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `name` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = name.charCodeAt(i);\n if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n const trail = name.charCodeAt(++i);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n if (isFirst) {\n isFirst = false;\n if (!isIdentifierStart(cp)) {\n return false;\n }\n } else if (!isIdentifierChar(cp)) {\n return false;\n }\n }\n return !isFirst;\n}\n","const reservedWords = {\n keyword: [\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n ],\n strict: [\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n ],\n strictBind: [\"eval\", \"arguments\"],\n};\nconst keywords = new Set(reservedWords.keyword);\nconst reservedWordsStrictSet = new Set(reservedWords.strict);\nconst reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\n/**\n * Checks if word is a reserved word in non-strict mode\n */\nexport function isReservedWord(word: string, inModule: boolean): boolean {\n return (inModule && word === \"await\") || word === \"enum\";\n}\n\n/**\n * Checks if word is a reserved word in non-binding strict mode\n *\n * Includes non-strict reserved words\n */\nexport function isStrictReservedWord(word: string, inModule: boolean): boolean {\n return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode, but it is allowed as\n * a normal identifier.\n */\nexport function isStrictBindOnlyReservedWord(word: string): boolean {\n return reservedWordsStrictBindSet.has(word);\n}\n\n/**\n * Checks if word is a reserved word in binding strict mode\n *\n * Includes non-strict reserved words and non-binding strict reserved words\n */\nexport function isStrictBindReservedWord(\n word: string,\n inModule: boolean,\n): boolean {\n return (\n isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word)\n );\n}\n\nexport function isKeyword(word: string): boolean {\n return keywords.has(word);\n}\n","/* eslint max-len: 0 */\n\n// @flow\n\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart } from \"@babel/helper-validator-identifier\";\n\nexport {\n isIdentifierStart,\n isIdentifierChar,\n isReservedWord,\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n isStrictReservedWord,\n isKeyword,\n} from \"@babel/helper-validator-identifier\";\n\nexport const keywordRelationalOperator = /^in(stanceof)?$/;\n\n// Test whether a current state character code and next character code is @\n\nexport function isIteratorStart(\n current: number,\n next: number,\n next2: number,\n): boolean {\n return (\n current === charCodes.atSign &&\n next === charCodes.atSign &&\n isIdentifierStart(next2)\n );\n}\n\n// This is the comprehensive set of JavaScript reserved words\n// If a word is in this set, it could be a reserved word,\n// depending on sourceType/strictMode/binding info. In other words\n// if a word is not in this set, it is not a reserved word under\n// any circumstance.\nconst reservedWordLikeSet = new Set([\n \"break\",\n \"case\",\n \"catch\",\n \"continue\",\n \"debugger\",\n \"default\",\n \"do\",\n \"else\",\n \"finally\",\n \"for\",\n \"function\",\n \"if\",\n \"return\",\n \"switch\",\n \"throw\",\n \"try\",\n \"var\",\n \"const\",\n \"while\",\n \"with\",\n \"new\",\n \"this\",\n \"super\",\n \"class\",\n \"extends\",\n \"export\",\n \"import\",\n \"null\",\n \"true\",\n \"false\",\n \"in\",\n \"instanceof\",\n \"typeof\",\n \"void\",\n \"delete\",\n // strict\n \"implements\",\n \"interface\",\n \"let\",\n \"package\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"yield\",\n // strictBind\n \"eval\",\n \"arguments\",\n // reservedWorkLike\n \"enum\",\n \"await\",\n]);\n\nexport function canBeReservedWord(word: string): boolean {\n return reservedWordLikeSet.has(word);\n}\n","// @flow\n\n// Each scope gets a bitset that may contain these flags\n// prettier-ignore\nexport const SCOPE_OTHER = 0b000000000,\n SCOPE_PROGRAM = 0b000000001,\n SCOPE_FUNCTION = 0b000000010,\n SCOPE_ARROW = 0b000000100,\n SCOPE_SIMPLE_CATCH = 0b000001000,\n SCOPE_SUPER = 0b000010000,\n SCOPE_DIRECT_SUPER = 0b000100000,\n SCOPE_CLASS = 0b001000000,\n SCOPE_STATIC_BLOCK = 0b010000000,\n SCOPE_TS_MODULE = 0b100000000,\n SCOPE_VAR = SCOPE_PROGRAM | SCOPE_FUNCTION | SCOPE_TS_MODULE;\n\nexport type ScopeFlags =\n | typeof SCOPE_OTHER\n | typeof SCOPE_PROGRAM\n | typeof SCOPE_FUNCTION\n | typeof SCOPE_VAR\n | typeof SCOPE_ARROW\n | typeof SCOPE_SIMPLE_CATCH\n | typeof SCOPE_SUPER\n | typeof SCOPE_DIRECT_SUPER\n | typeof SCOPE_CLASS\n | typeof SCOPE_STATIC_BLOCK;\n\n// These flags are meant to be _only_ used inside the Scope class (or subclasses).\n// prettier-ignore\nexport const BIND_KIND_VALUE = 0b000000_0000_01,\n BIND_KIND_TYPE = 0b000000_0000_10,\n // Used in checkLVal and declareName to determine the type of a binding\n BIND_SCOPE_VAR = 0b000000_0001_00, // Var-style binding\n BIND_SCOPE_LEXICAL = 0b000000_0010_00, // Let- or const-style binding\n BIND_SCOPE_FUNCTION = 0b000000_0100_00, // Function declaration\n BIND_SCOPE_OUTSIDE = 0b000000_1000_00, // Special case for function names as\n // bound inside the function\n // Misc flags\n BIND_FLAGS_NONE = 0b000001_0000_00,\n BIND_FLAGS_CLASS = 0b000010_0000_00,\n BIND_FLAGS_TS_ENUM = 0b000100_0000_00,\n BIND_FLAGS_TS_CONST_ENUM = 0b001000_0000_00,\n BIND_FLAGS_TS_EXPORT_ONLY = 0b010000_0000_00,\n BIND_FLAGS_FLOW_DECLARE_FN = 0b100000_0000_00;\n\n// These flags are meant to be _only_ used by Scope consumers\n// prettier-ignore\n/* = is value? | is type? | scope | misc flags */\nexport const BIND_CLASS = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_CLASS ,\n BIND_LEXICAL = BIND_KIND_VALUE | 0 | BIND_SCOPE_LEXICAL | 0 ,\n BIND_VAR = BIND_KIND_VALUE | 0 | BIND_SCOPE_VAR | 0 ,\n BIND_FUNCTION = BIND_KIND_VALUE | 0 | BIND_SCOPE_FUNCTION | 0 ,\n BIND_TS_INTERFACE = 0 | BIND_KIND_TYPE | 0 | BIND_FLAGS_CLASS ,\n BIND_TS_TYPE = 0 | BIND_KIND_TYPE | 0 | 0 ,\n BIND_TS_ENUM = BIND_KIND_VALUE | BIND_KIND_TYPE | BIND_SCOPE_LEXICAL | BIND_FLAGS_TS_ENUM,\n BIND_TS_AMBIENT = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,\n // These bindings don't introduce anything in the scope. They are used for assignments and\n // function expressions IDs.\n BIND_NONE = 0 | 0 | 0 | BIND_FLAGS_NONE ,\n BIND_OUTSIDE = BIND_KIND_VALUE | 0 | 0 | BIND_FLAGS_NONE ,\n\n BIND_TS_CONST_ENUM = BIND_TS_ENUM | BIND_FLAGS_TS_CONST_ENUM,\n BIND_TS_NAMESPACE = 0 | 0 | 0 | BIND_FLAGS_TS_EXPORT_ONLY,\n\n BIND_FLOW_DECLARE_FN = BIND_FLAGS_FLOW_DECLARE_FN;\n\nexport type BindingTypes =\n | typeof BIND_NONE\n | typeof BIND_OUTSIDE\n | typeof BIND_VAR\n | typeof BIND_LEXICAL\n | typeof BIND_CLASS\n | typeof BIND_FUNCTION\n | typeof BIND_TS_INTERFACE\n | typeof BIND_TS_TYPE\n | typeof BIND_TS_ENUM\n | typeof BIND_TS_AMBIENT\n | typeof BIND_TS_NAMESPACE;\n\n// prettier-ignore\nexport const CLASS_ELEMENT_FLAG_STATIC = 0b1_00,\n CLASS_ELEMENT_KIND_GETTER = 0b0_10,\n CLASS_ELEMENT_KIND_SETTER = 0b0_01,\n CLASS_ELEMENT_KIND_ACCESSOR = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_KIND_SETTER;\n\n// prettier-ignore\nexport const CLASS_ELEMENT_STATIC_GETTER = CLASS_ELEMENT_KIND_GETTER | CLASS_ELEMENT_FLAG_STATIC,\n CLASS_ELEMENT_STATIC_SETTER = CLASS_ELEMENT_KIND_SETTER | CLASS_ELEMENT_FLAG_STATIC,\n CLASS_ELEMENT_INSTANCE_GETTER = CLASS_ELEMENT_KIND_GETTER,\n CLASS_ELEMENT_INSTANCE_SETTER = CLASS_ELEMENT_KIND_SETTER,\n CLASS_ELEMENT_OTHER = 0;\n\nexport type ClassElementTypes =\n | typeof CLASS_ELEMENT_STATIC_GETTER\n | typeof CLASS_ELEMENT_STATIC_SETTER\n | typeof CLASS_ELEMENT_INSTANCE_GETTER\n | typeof CLASS_ELEMENT_INSTANCE_SETTER\n | typeof CLASS_ELEMENT_OTHER;\n","// @flow\nimport {\n SCOPE_ARROW,\n SCOPE_DIRECT_SUPER,\n SCOPE_FUNCTION,\n SCOPE_SIMPLE_CATCH,\n SCOPE_SUPER,\n SCOPE_PROGRAM,\n SCOPE_VAR,\n SCOPE_CLASS,\n SCOPE_STATIC_BLOCK,\n BIND_SCOPE_FUNCTION,\n BIND_SCOPE_VAR,\n BIND_SCOPE_LEXICAL,\n BIND_KIND_VALUE,\n type ScopeFlags,\n type BindingTypes,\n} from \"./scopeflags\";\nimport { Position } from \"./location\";\nimport * as N from \"../types\";\nimport { Errors, type raiseFunction } from \"../parser/error\";\n\n// Start an AST node, attaching a start offset.\nexport class Scope {\n declare flags: ScopeFlags;\n // A set of var-declared names in the current lexical scope\n var: Set<string> = new Set();\n // A set of lexically-declared names in the current lexical scope\n lexical: Set<string> = new Set();\n // A set of lexically-declared FunctionDeclaration names in the current lexical scope\n functions: Set<string> = new Set();\n\n constructor(flags: ScopeFlags) {\n this.flags = flags;\n }\n}\n\n// The functions in this module keep track of declared variables in the\n// current scope in order to detect duplicate variable names.\nexport default class ScopeHandler<IScope: Scope = Scope> {\n scopeStack: Array<IScope> = [];\n declare raise: raiseFunction;\n declare inModule: boolean;\n undefinedExports: Map<string, Position> = new Map();\n\n constructor(raise: raiseFunction, inModule: boolean) {\n this.raise = raise;\n this.inModule = inModule;\n }\n\n get inFunction() {\n return (this.currentVarScopeFlags() & SCOPE_FUNCTION) > 0;\n }\n get allowSuper() {\n return (this.currentThisScopeFlags() & SCOPE_SUPER) > 0;\n }\n get allowDirectSuper() {\n return (this.currentThisScopeFlags() & SCOPE_DIRECT_SUPER) > 0;\n }\n get inClass() {\n return (this.currentThisScopeFlags() & SCOPE_CLASS) > 0;\n }\n get inClassAndNotInNonArrowFunction() {\n const flags = this.currentThisScopeFlags();\n return (flags & SCOPE_CLASS) > 0 && (flags & SCOPE_FUNCTION) === 0;\n }\n get inStaticBlock() {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & SCOPE_STATIC_BLOCK) {\n return true;\n }\n if (flags & (SCOPE_VAR | SCOPE_CLASS)) {\n // function body, module body, class property initializers\n return false;\n }\n }\n }\n get inNonArrowFunction() {\n return (this.currentThisScopeFlags() & SCOPE_FUNCTION) > 0;\n }\n get treatFunctionsAsVar() {\n return this.treatFunctionsAsVarInScope(this.currentScope());\n }\n\n createScope(flags: ScopeFlags): Scope {\n return new Scope(flags);\n }\n // This method will be overwritten by subclasses\n /*:: +createScope: (flags: ScopeFlags) => IScope; */\n\n enter(flags: ScopeFlags) {\n this.scopeStack.push(this.createScope(flags));\n }\n\n exit() {\n this.scopeStack.pop();\n }\n\n // The spec says:\n // > At the top level of a function, or script, function declarations are\n // > treated like var declarations rather than like lexical declarations.\n treatFunctionsAsVarInScope(scope: IScope): boolean {\n return !!(\n scope.flags & SCOPE_FUNCTION ||\n (!this.inModule && scope.flags & SCOPE_PROGRAM)\n );\n }\n\n declareName(name: string, bindingType: BindingTypes, loc: Position) {\n let scope = this.currentScope();\n if (bindingType & BIND_SCOPE_LEXICAL || bindingType & BIND_SCOPE_FUNCTION) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n\n if (bindingType & BIND_SCOPE_FUNCTION) {\n scope.functions.add(name);\n } else {\n scope.lexical.add(name);\n }\n\n if (bindingType & BIND_SCOPE_LEXICAL) {\n this.maybeExportDefined(scope, name);\n }\n } else if (bindingType & BIND_SCOPE_VAR) {\n for (let i = this.scopeStack.length - 1; i >= 0; --i) {\n scope = this.scopeStack[i];\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n scope.var.add(name);\n this.maybeExportDefined(scope, name);\n\n if (scope.flags & SCOPE_VAR) break;\n }\n }\n if (this.inModule && scope.flags & SCOPE_PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n maybeExportDefined(scope: IScope, name: string) {\n if (this.inModule && scope.flags & SCOPE_PROGRAM) {\n this.undefinedExports.delete(name);\n }\n }\n\n checkRedeclarationInScope(\n scope: IScope,\n name: string,\n bindingType: BindingTypes,\n loc: Position,\n ) {\n if (this.isRedeclaredInScope(scope, name, bindingType)) {\n this.raise(Errors.VarRedeclaration, { at: loc }, name);\n }\n }\n\n isRedeclaredInScope(\n scope: IScope,\n name: string,\n bindingType: BindingTypes,\n ): boolean {\n if (!(bindingType & BIND_KIND_VALUE)) return false;\n\n if (bindingType & BIND_SCOPE_LEXICAL) {\n return (\n scope.lexical.has(name) ||\n scope.functions.has(name) ||\n scope.var.has(name)\n );\n }\n\n if (bindingType & BIND_SCOPE_FUNCTION) {\n return (\n scope.lexical.has(name) ||\n (!this.treatFunctionsAsVarInScope(scope) && scope.var.has(name))\n );\n }\n\n return (\n (scope.lexical.has(name) &&\n !(\n scope.flags & SCOPE_SIMPLE_CATCH &&\n scope.lexical.values().next().value === name\n )) ||\n (!this.treatFunctionsAsVarInScope(scope) && scope.functions.has(name))\n );\n }\n\n checkLocalExport(id: N.Identifier) {\n const { name } = id;\n const topLevelScope = this.scopeStack[0];\n if (\n !topLevelScope.lexical.has(name) &&\n !topLevelScope.var.has(name) &&\n // In strict mode, scope.functions will always be empty.\n // Modules are strict by default, but the `scriptMode` option\n // can overwrite this behavior.\n !topLevelScope.functions.has(name)\n ) {\n this.undefinedExports.set(name, id.loc.start);\n }\n }\n\n currentScope(): IScope {\n return this.scopeStack[this.scopeStack.length - 1];\n }\n\n // $FlowIgnore\n currentVarScopeFlags(): ScopeFlags {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & SCOPE_VAR) {\n return flags;\n }\n }\n }\n\n // Could be useful for `arguments`, `this`, `new.target`, `super()`, `super.property`, and `super[property]`.\n // $FlowIgnore\n currentThisScopeFlags(): ScopeFlags {\n for (let i = this.scopeStack.length - 1; ; i--) {\n const { flags } = this.scopeStack[i];\n if (flags & (SCOPE_VAR | SCOPE_CLASS) && !(flags & SCOPE_ARROW)) {\n return flags;\n }\n }\n }\n}\n","// @flow\n\nimport { Position } from \"../../util/location\";\nimport ScopeHandler, { Scope } from \"../../util/scope\";\nimport {\n BIND_FLAGS_FLOW_DECLARE_FN,\n type ScopeFlags,\n type BindingTypes,\n} from \"../../util/scopeflags\";\nimport * as N from \"../../types\";\n\n// Reference implementation: https://github.com/facebook/flow/blob/23aeb2a2ef6eb4241ce178fde5d8f17c5f747fb5/src/typing/env.ml#L536-L584\nclass FlowScope extends Scope {\n // declare function foo(): type;\n declareFunctions: Set<string> = new Set();\n}\n\nexport default class FlowScopeHandler extends ScopeHandler<FlowScope> {\n createScope(flags: ScopeFlags): FlowScope {\n return new FlowScope(flags);\n }\n\n declareName(name: string, bindingType: BindingTypes, loc: Position) {\n const scope = this.currentScope();\n if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n this.maybeExportDefined(scope, name);\n scope.declareFunctions.add(name);\n return;\n }\n\n super.declareName(...arguments);\n }\n\n isRedeclaredInScope(\n scope: FlowScope,\n name: string,\n bindingType: BindingTypes,\n ): boolean {\n if (super.isRedeclaredInScope(...arguments)) return true;\n\n if (bindingType & BIND_FLAGS_FLOW_DECLARE_FN) {\n return (\n !scope.declareFunctions.has(name) &&\n (scope.lexical.has(name) || scope.functions.has(name))\n );\n }\n\n return false;\n }\n\n checkLocalExport(id: N.Identifier) {\n if (!this.scopeStack[0].declareFunctions.has(id.name)) {\n super.checkLocalExport(id);\n }\n }\n}\n","// @flow\n\nimport * as charCodes from \"charcodes\";\n\n// Matches a whole line break (where CRLF is considered a single\n// line break). Used to count lines.\nexport const lineBreak = /\\r\\n?|[\\n\\u2028\\u2029]/;\nexport const lineBreakG = new RegExp(lineBreak.source, \"g\");\n\n// https://tc39.github.io/ecma262/#sec-line-terminators\nexport function isNewLine(code: number): boolean {\n switch (code) {\n case charCodes.lineFeed:\n case charCodes.carriageReturn:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return true;\n\n default:\n return false;\n }\n}\n\nexport const skipWhiteSpace = /(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g;\n\nexport const skipWhiteSpaceInLine =\n /(?:[^\\S\\n\\r\\u2028\\u2029]|\\/\\/.*|\\/\\*.*?\\*\\/)*/y;\n\n// Skip whitespace and single-line comments, including /* no newline here */.\n// After this RegExp matches, its lastIndex points to a line terminator, or\n// the start of multi-line comment (which is effectively a line terminator),\n// or the end of string.\nexport const skipWhiteSpaceToLineBreak = new RegExp(\n // Unfortunately JS doesn't support Perl's atomic /(?>pattern)/ or\n // possessive quantifiers, so we use a trick to prevent backtracking\n // when the look-ahead for line terminator fails.\n \"(?=(\" +\n // Capture the whitespace and comments that should be skipped inside\n // a look-ahead assertion, and then re-match the group as a unit.\n skipWhiteSpaceInLine.source +\n \"))\\\\1\" +\n // Look-ahead for either line terminator, start of multi-line comment,\n // or end of string.\n /(?=[\\n\\r\\u2028\\u2029]|\\/\\*(?!.*?\\*\\/)|$)/.source,\n \"y\", // sticky\n);\n\n// https://tc39.github.io/ecma262/#sec-white-space\nexport function isWhitespace(code: number): boolean {\n switch (code) {\n case 0x0009: // CHARACTER TABULATION\n case 0x000b: // LINE TABULATION\n case 0x000c: // FORM FEED\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.oghamSpaceMark:\n case 0x2000: // EN QUAD\n case 0x2001: // EM QUAD\n case 0x2002: // EN SPACE\n case 0x2003: // EM SPACE\n case 0x2004: // THREE-PER-EM SPACE\n case 0x2005: // FOUR-PER-EM SPACE\n case 0x2006: // SIX-PER-EM SPACE\n case 0x2007: // FIGURE SPACE\n case 0x2008: // PUNCTUATION SPACE\n case 0x2009: // THIN SPACE\n case 0x200a: // HAIR SPACE\n case 0x202f: // NARROW NO-BREAK SPACE\n case 0x205f: // MEDIUM MATHEMATICAL SPACE\n case 0x3000: // IDEOGRAPHIC SPACE\n case 0xfeff: // ZERO WIDTH NO-BREAK SPACE\n return true;\n\n default:\n return false;\n }\n}\n","// @flow\n\nimport type { Options } from \"../options\";\nimport * as N from \"../types\";\nimport type { CommentWhitespace } from \"../parser/comments\";\nimport { Position } from \"../util/location\";\n\nimport { types as ct, type TokContext } from \"./context\";\nimport { tt, type TokenType } from \"./types\";\nimport type { ErrorData, ParsingError } from \"../parser/error\";\n\ntype TopicContextState = {\n // When a topic binding has been currently established,\n // then this is 1. Otherwise, it is 0. This is forwards compatible\n // with a future plugin for multiple lexical topics.\n maxNumOfResolvableTopics: number,\n\n // When a topic binding has been currently established, and if that binding\n // has been used as a topic reference `#`, then this is 0. Otherwise, it is\n // `null`. This is forwards compatible with a future plugin for multiple\n // lexical topics.\n maxTopicIndex: null | 0,\n};\n\nexport default class State {\n strict: boolean;\n curLine: number;\n lineStart: number;\n\n // And, if locations are used, the {line, column} object\n // corresponding to those offsets\n startLoc: Position;\n endLoc: Position;\n\n init({ strictMode, sourceType, startLine, startColumn }: Options): void {\n this.strict =\n strictMode === false\n ? false\n : strictMode === true\n ? true\n : sourceType === \"module\";\n\n this.curLine = startLine;\n this.lineStart = -startColumn;\n this.startLoc = this.endLoc = new Position(startLine, startColumn, 0);\n }\n\n errors: ParsingError[] = [];\n\n // Used to signify the start of a potential arrow function\n potentialArrowAt: number = -1;\n\n // Used to signify the start of an expression which looks like a\n // typed arrow function, but it isn't\n // e.g. a ? (b) : c => d\n // ^\n noArrowAt: number[] = [];\n\n // Used to signify the start of an expression whose params, if it looks like\n // an arrow function, shouldn't be converted to assignable nodes.\n // This is used to defer the validation of typed arrow functions inside\n // conditional expressions.\n // e.g. a ? (b) : c => d\n // ^\n noArrowParamsConversionAt: number[] = [];\n\n // Flags to track\n maybeInArrowParameters: boolean = false;\n inType: boolean = false;\n noAnonFunctionType: boolean = false;\n hasFlowComment: boolean = false;\n isAmbientContext: boolean = false;\n inAbstractClass: boolean = false;\n\n // For the Hack-style pipelines plugin\n topicContext: TopicContextState = {\n maxNumOfResolvableTopics: 0,\n maxTopicIndex: null,\n };\n\n // For the F#-style pipelines plugin\n soloAwait: boolean = false;\n inFSharpPipelineDirectBody: boolean = false;\n\n // Labels in scope.\n labels: Array<{\n kind: ?(\"loop\" | \"switch\"),\n name?: ?string,\n statementStart?: number,\n }> = [];\n\n // Leading decorators. Last element of the stack represents the decorators in current context.\n // Supports nesting of decorators, e.g. @foo(@bar class inner {}) class outer {}\n // where @foo belongs to the outer class and @bar to the inner\n decoratorStack: Array<Array<N.Decorator>> = [[]];\n\n // Comment store for Program.comments\n comments: Array<N.Comment> = [];\n\n // Comment attachment store\n commentStack: Array<CommentWhitespace> = [];\n\n // The current position of the tokenizer in the input.\n pos: number = 0;\n\n // Properties of the current token:\n // Its type\n type: TokenType = tt.eof;\n\n // For tokens that include more information than their type, the value\n value: any = null;\n\n // Its start and end offset\n start: number = 0;\n end: number = 0;\n\n // Position information for the previous token\n // $FlowIgnore this is initialized when generating the second token.\n lastTokEndLoc: Position = null;\n // $FlowIgnore this is initialized when generating the second token.\n lastTokStartLoc: Position = null;\n lastTokStart: number = 0;\n\n // The context stack is used to track whether the apostrophe \"`\" starts\n // or ends a string template\n context: Array<TokContext> = [ct.brace];\n // Used to track whether a JSX element is allowed to form\n canStartJSXElement: boolean = true;\n\n // Used to signal to callers of `readWord1` whether the word\n // contained any escape sequences. This is needed because words with\n // escape sequences must not be interpreted as keywords.\n containsEsc: boolean = false;\n\n // This property is used to track the following errors\n // - StrictNumericEscape\n // - StrictOctalLiteral\n //\n // in a literal that occurs prior to/immediately after a \"use strict\" directive.\n\n // todo(JLHwung): set strictErrors to null and avoid recording string errors\n // after a non-directive is parsed\n strictErrors: Map<number, ErrorData> = new Map();\n\n // Tokens length in token store\n tokensLength: number = 0;\n\n curPosition(): Position {\n return new Position(this.curLine, this.pos - this.lineStart, this.pos);\n }\n\n clone(skipArrays?: boolean): State {\n const state = new State();\n const keys = Object.keys(this);\n for (let i = 0, length = keys.length; i < length; i++) {\n const key = keys[i];\n // $FlowIgnore\n let val = this[key];\n\n if (!skipArrays && Array.isArray(val)) {\n val = val.slice();\n }\n\n // $FlowIgnore\n state[key] = val;\n }\n\n return state;\n }\n}\n\nexport type LookaheadState = {\n pos: number,\n value: any,\n type: TokenType,\n start: number,\n end: number,\n /* Used only in readToken_mult_modulo */\n inType: boolean,\n};\n","// @flow\n\n/*:: declare var invariant; */\n\nimport type { Options } from \"../options\";\nimport { Position, createPositionWithColumnOffset } from \"../util/location\";\nimport * as N from \"../types\";\nimport * as charCodes from \"charcodes\";\nimport { isIdentifierStart, isIdentifierChar } from \"../util/identifier\";\nimport {\n tokenIsKeyword,\n tokenLabelName,\n tt,\n keywords as keywordTypes,\n type TokenType,\n} from \"./types\";\nimport { type TokContext } from \"./context\";\nimport ParserErrors, { Errors, type ErrorTemplate } from \"../parser/error\";\nimport { SourceLocation } from \"../util/location\";\nimport {\n lineBreakG,\n isNewLine,\n isWhitespace,\n skipWhiteSpace,\n} from \"../util/whitespace\";\nimport State from \"./state\";\nimport type { LookaheadState } from \"./state\";\n\nconst VALID_REGEX_FLAGS = new Set([\n charCodes.lowercaseG,\n charCodes.lowercaseM,\n charCodes.lowercaseS,\n charCodes.lowercaseI,\n charCodes.lowercaseY,\n charCodes.lowercaseU,\n charCodes.lowercaseD,\n // This is only valid when using the regexpUnicodeSets plugin\n charCodes.lowercaseV,\n]);\n\n// The following character codes are forbidden from being\n// an immediate sibling of NumericLiteralSeparator _\n\nconst forbiddenNumericSeparatorSiblings = {\n decBinOct: [\n charCodes.dot,\n charCodes.uppercaseB,\n charCodes.uppercaseE,\n charCodes.uppercaseO,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseB,\n charCodes.lowercaseE,\n charCodes.lowercaseO,\n ],\n hex: [\n charCodes.dot,\n charCodes.uppercaseX,\n charCodes.underscore, // multiple separators are not allowed\n charCodes.lowercaseX,\n ],\n};\n\nconst allowedNumericSeparatorSiblings = {};\nallowedNumericSeparatorSiblings.bin = [\n // 0 - 1\n charCodes.digit0,\n charCodes.digit1,\n];\nallowedNumericSeparatorSiblings.oct = [\n // 0 - 7\n ...allowedNumericSeparatorSiblings.bin,\n\n charCodes.digit2,\n charCodes.digit3,\n charCodes.digit4,\n charCodes.digit5,\n charCodes.digit6,\n charCodes.digit7,\n];\nallowedNumericSeparatorSiblings.dec = [\n // 0 - 9\n ...allowedNumericSeparatorSiblings.oct,\n\n charCodes.digit8,\n charCodes.digit9,\n];\n\nallowedNumericSeparatorSiblings.hex = [\n // 0 - 9, A - F, a - f,\n ...allowedNumericSeparatorSiblings.dec,\n\n charCodes.uppercaseA,\n charCodes.uppercaseB,\n charCodes.uppercaseC,\n charCodes.uppercaseD,\n charCodes.uppercaseE,\n charCodes.uppercaseF,\n\n charCodes.lowercaseA,\n charCodes.lowercaseB,\n charCodes.lowercaseC,\n charCodes.lowercaseD,\n charCodes.lowercaseE,\n charCodes.lowercaseF,\n];\n\n// Object type used to represent tokens. Note that normally, tokens\n// simply exist as properties on the parser object. This is only\n// used for the onToken callback and the external tokenizer.\n\nexport class Token {\n constructor(state: State) {\n this.type = state.type;\n this.value = state.value;\n this.start = state.start;\n this.end = state.end;\n this.loc = new SourceLocation(state.startLoc, state.endLoc);\n }\n\n declare type: TokenType;\n declare value: any;\n declare start: number;\n declare end: number;\n declare loc: SourceLocation;\n}\n\n// ## Tokenizer\n\nexport default class Tokenizer extends ParserErrors {\n // Forward-declarations\n // parser/util.js\n /*::\n +hasPrecedingLineBreak: () => boolean;\n +unexpected: (loc?: ?Position, type?: TokenType) => empty;\n +expectPlugin: (name: string, loc?: Position) => true;\n */\n\n isLookahead: boolean;\n\n // Token store.\n tokens: Array<Token | N.Comment> = [];\n\n constructor(options: Options, input: string) {\n super();\n this.state = new State();\n this.state.init(options);\n this.input = input;\n this.length = input.length;\n this.isLookahead = false;\n }\n\n pushToken(token: Token | N.Comment) {\n // Pop out invalid tokens trapped by try-catch parsing.\n // Those parsing branches are mainly created by typescript and flow plugins.\n this.tokens.length = this.state.tokensLength;\n this.tokens.push(token);\n ++this.state.tokensLength;\n }\n\n // Move to the next token\n\n next(): void {\n this.checkKeywordEscapes();\n if (this.options.tokens) {\n this.pushToken(new Token(this.state));\n }\n\n this.state.lastTokStart = this.state.start;\n this.state.lastTokEndLoc = this.state.endLoc;\n this.state.lastTokStartLoc = this.state.startLoc;\n this.nextToken();\n }\n\n // TODO\n\n eat(type: TokenType): boolean {\n if (this.match(type)) {\n this.next();\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Whether current token matches given type\n *\n * @param {TokenType} type\n * @returns {boolean}\n * @memberof Tokenizer\n */\n match(type: TokenType): boolean {\n return this.state.type === type;\n }\n\n /**\n * Create a LookaheadState from current parser state\n *\n * @param {State} state\n * @returns {LookaheadState}\n * @memberof Tokenizer\n */\n createLookaheadState(state: State): LookaheadState {\n return {\n pos: state.pos,\n value: null,\n type: state.type,\n start: state.start,\n end: state.end,\n context: [this.curContext()],\n inType: state.inType,\n startLoc: state.startLoc,\n lastTokEndLoc: state.lastTokEndLoc,\n curLine: state.curLine,\n lineStart: state.lineStart,\n curPosition: state.curPosition,\n };\n }\n\n /**\n * lookahead peeks the next token, skipping changes to token context and\n * comment stack. For performance it returns a limited LookaheadState\n * instead of full parser state.\n *\n * The { column, line } Loc info is not included in lookahead since such usage\n * is rare. Although it may return other location properties e.g. `curLine` and\n * `lineStart`, these properties are not listed in the LookaheadState interface\n * and thus the returned value is _NOT_ reliable.\n *\n * The tokenizer should make best efforts to avoid using any parser state\n * other than those defined in LookaheadState\n *\n * @returns {LookaheadState}\n * @memberof Tokenizer\n */\n lookahead(): LookaheadState {\n const old = this.state;\n // For performance we use a simpified tokenizer state structure\n // $FlowIgnore\n this.state = this.createLookaheadState(old);\n\n this.isLookahead = true;\n this.nextToken();\n this.isLookahead = false;\n\n const curr = this.state;\n this.state = old;\n return curr;\n }\n\n nextTokenStart(): number {\n return this.nextTokenStartSince(this.state.pos);\n }\n\n nextTokenStartSince(pos: number): number {\n skipWhiteSpace.lastIndex = pos;\n return skipWhiteSpace.test(this.input) ? skipWhiteSpace.lastIndex : pos;\n }\n\n lookaheadCharCode(): number {\n return this.input.charCodeAt(this.nextTokenStart());\n }\n\n codePointAtPos(pos: number): number {\n // The implementation is based on\n // https://source.chromium.org/chromium/chromium/src/+/master:v8/src/builtins/builtins-string-gen.cc;l=1455;drc=221e331b49dfefadbc6fa40b0c68e6f97606d0b3;bpv=0;bpt=1\n // We reimplement `codePointAt` because `codePointAt` is a V8 builtin which is not inlined by TurboFan (as of M91)\n // since `input` is mostly ASCII, an inlined `charCodeAt` wins here\n let cp = this.input.charCodeAt(pos);\n if ((cp & 0xfc00) === 0xd800 && ++pos < this.input.length) {\n const trail = this.input.charCodeAt(pos);\n if ((trail & 0xfc00) === 0xdc00) {\n cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n }\n }\n return cp;\n }\n\n // Toggle strict mode. Re-reads the next number or string to please\n // pedantic tests (`\"use strict\"; 010;` should fail).\n\n setStrict(strict: boolean): void {\n this.state.strict = strict;\n if (strict) {\n // Throw an error for any string decimal escape found before/immediately\n // after a \"use strict\" directive. Strict mode will be set at parse\n // time for any literals that occur after the next node of the strict\n // directive.\n this.state.strictErrors.forEach(({ message, loc }) =>\n /* eslint-disable @babel/development-internal/dry-error-messages */\n this.raise(message, { at: loc }),\n );\n this.state.strictErrors.clear();\n }\n }\n\n curContext(): TokContext {\n return this.state.context[this.state.context.length - 1];\n }\n\n // Read a single token, updating the parser object's token-related\n // properties.\n\n nextToken(): void {\n this.skipSpace();\n this.state.start = this.state.pos;\n if (!this.isLookahead) this.state.startLoc = this.state.curPosition();\n if (this.state.pos >= this.length) {\n this.finishToken(tt.eof);\n return;\n }\n\n this.getTokenFromCode(this.codePointAtPos(this.state.pos));\n }\n\n skipBlockComment(): N.CommentBlock | void {\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n const start = this.state.pos;\n const end = this.input.indexOf(\"*/\", start + 2);\n if (end === -1) {\n // We have to call this again here because startLoc may not be set...\n // This seems to be for performance reasons:\n // https://github.com/babel/babel/commit/acf2a10899f696a8aaf34df78bf9725b5ea7f2da\n throw this.raise(Errors.UnterminatedComment, {\n at: this.state.curPosition(),\n });\n }\n\n this.state.pos = end + 2;\n lineBreakG.lastIndex = start + 2;\n while (lineBreakG.test(this.input) && lineBreakG.lastIndex <= end) {\n ++this.state.curLine;\n this.state.lineStart = lineBreakG.lastIndex;\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n /*:: invariant(startLoc) */\n\n const comment = {\n type: \"CommentBlock\",\n value: this.input.slice(start + 2, end),\n start,\n end: end + 2,\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.options.tokens) this.pushToken(comment);\n return comment;\n }\n\n skipLineComment(startSkip: number): N.CommentLine | void {\n const start = this.state.pos;\n let startLoc;\n if (!this.isLookahead) startLoc = this.state.curPosition();\n let ch = this.input.charCodeAt((this.state.pos += startSkip));\n if (this.state.pos < this.length) {\n while (!isNewLine(ch) && ++this.state.pos < this.length) {\n ch = this.input.charCodeAt(this.state.pos);\n }\n }\n\n // If we are doing a lookahead right now we need to advance the position (above code)\n // but we do not want to push the comment to the state.\n if (this.isLookahead) return;\n /*:: invariant(startLoc) */\n\n const end = this.state.pos;\n const value = this.input.slice(start + startSkip, end);\n\n const comment = {\n type: \"CommentLine\",\n value,\n start,\n end,\n loc: new SourceLocation(startLoc, this.state.curPosition()),\n };\n if (this.options.tokens) this.pushToken(comment);\n return comment;\n }\n\n // Called at the start of the parse and after every token. Skips\n // whitespace and comments, and.\n\n skipSpace(): void {\n const spaceStart = this.state.pos;\n const comments = [];\n loop: while (this.state.pos < this.length) {\n const ch = this.input.charCodeAt(this.state.pos);\n switch (ch) {\n case charCodes.space:\n case charCodes.nonBreakingSpace:\n case charCodes.tab:\n ++this.state.pos;\n break;\n case charCodes.carriageReturn:\n if (\n this.input.charCodeAt(this.state.pos + 1) === charCodes.lineFeed\n ) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n ++this.state.pos;\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n break;\n\n case charCodes.slash:\n switch (this.input.charCodeAt(this.state.pos + 1)) {\n case charCodes.asterisk: {\n const comment = this.skipBlockComment();\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n break;\n }\n\n case charCodes.slash: {\n const comment = this.skipLineComment(2);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n break;\n }\n\n default:\n break loop;\n }\n break;\n\n default:\n if (isWhitespace(ch)) {\n ++this.state.pos;\n } else if (ch === charCodes.dash && !this.inModule) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.dash &&\n this.input.charCodeAt(pos + 2) === charCodes.greaterThan &&\n (spaceStart === 0 || this.state.lineStart > spaceStart)\n ) {\n // A `-->` line comment\n const comment = this.skipLineComment(3);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n } else {\n break loop;\n }\n } else if (ch === charCodes.lessThan && !this.inModule) {\n const pos = this.state.pos;\n if (\n this.input.charCodeAt(pos + 1) === charCodes.exclamationMark &&\n this.input.charCodeAt(pos + 2) === charCodes.dash &&\n this.input.charCodeAt(pos + 3) === charCodes.dash\n ) {\n // `<!--`, an XML-style comment that should be interpreted as a line comment\n const comment = this.skipLineComment(4);\n if (comment !== undefined) {\n this.addComment(comment);\n if (this.options.attachComment) comments.push(comment);\n }\n } else {\n break loop;\n }\n } else {\n break loop;\n }\n }\n }\n\n if (comments.length > 0) {\n const end = this.state.pos;\n const CommentWhitespace = {\n start: spaceStart,\n end,\n comments,\n leadingNode: null,\n trailingNode: null,\n containingNode: null,\n };\n this.state.commentStack.push(CommentWhitespace);\n }\n }\n\n // Called at the end of every token. Sets `end`, `val`, and\n // maintains `context` and `canStartJSXElement`, and skips the space after\n // the token, so that the next one's `start` will point at the\n // right position.\n\n finishToken(type: TokenType, val: any): void {\n this.state.end = this.state.pos;\n this.state.endLoc = this.state.curPosition();\n const prevType = this.state.type;\n this.state.type = type;\n this.state.value = val;\n\n if (!this.isLookahead) {\n this.updateContext(prevType);\n }\n }\n\n replaceToken(type: TokenType): void {\n this.state.type = type;\n // the prevType of updateContext is required\n // only when the new type is tt.slash/tt.jsxTagEnd\n // $FlowIgnore\n this.updateContext();\n }\n\n // ### Token reading\n\n // This is the function that is called to fetch the next token. It\n // is somewhat obscure, because it works in character codes rather\n // than characters, and because operator parsing has been inlined\n // into it.\n //\n // All in the name of speed.\n\n // number sign is \"#\"\n readToken_numberSign(): void {\n if (this.state.pos === 0 && this.readToken_interpreter()) {\n return;\n }\n\n const nextPos = this.state.pos + 1;\n const next = this.codePointAtPos(nextPos);\n if (next >= charCodes.digit0 && next <= charCodes.digit9) {\n throw this.raise(Errors.UnexpectedDigitAfterHash, {\n at: this.state.curPosition(),\n });\n }\n\n if (\n next === charCodes.leftCurlyBrace ||\n (next === charCodes.leftSquareBracket && this.hasPlugin(\"recordAndTuple\"))\n ) {\n // When we see `#{`, it is likely to be a hash record.\n // However we don't yell at `#[` since users may intend to use \"computed private fields\",\n // which is not allowed in the spec. Throwing expecting recordAndTuple is\n // misleading\n this.expectPlugin(\"recordAndTuple\");\n if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"hash\") {\n throw this.raise(\n next === charCodes.leftCurlyBrace\n ? Errors.RecordExpressionHashIncorrectStartSyntaxType\n : Errors.TupleExpressionHashIncorrectStartSyntaxType,\n { at: this.state.curPosition() },\n );\n }\n\n this.state.pos += 2;\n if (next === charCodes.leftCurlyBrace) {\n // #{\n this.finishToken(tt.braceHashL);\n } else {\n // #[\n this.finishToken(tt.bracketHashL);\n }\n } else if (isIdentifierStart(next)) {\n ++this.state.pos;\n this.finishToken(tt.privateName, this.readWord1(next));\n } else if (next === charCodes.backslash) {\n ++this.state.pos;\n this.finishToken(tt.privateName, this.readWord1());\n } else {\n this.finishOp(tt.hash, 1);\n }\n }\n\n readToken_dot(): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (next >= charCodes.digit0 && next <= charCodes.digit9) {\n this.readNumber(true);\n return;\n }\n\n if (\n next === charCodes.dot &&\n this.input.charCodeAt(this.state.pos + 2) === charCodes.dot\n ) {\n this.state.pos += 3;\n this.finishToken(tt.ellipsis);\n } else {\n ++this.state.pos;\n this.finishToken(tt.dot);\n }\n }\n\n readToken_slash(): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (next === charCodes.equalsTo) {\n this.finishOp(tt.slashAssign, 2);\n } else {\n this.finishOp(tt.slash, 1);\n }\n }\n\n readToken_interpreter(): boolean {\n if (this.state.pos !== 0 || this.length < 2) return false;\n\n let ch = this.input.charCodeAt(this.state.pos + 1);\n if (ch !== charCodes.exclamationMark) return false;\n\n const start = this.state.pos;\n this.state.pos += 1;\n\n while (!isNewLine(ch) && ++this.state.pos < this.length) {\n ch = this.input.charCodeAt(this.state.pos);\n }\n\n const value = this.input.slice(start + 2, this.state.pos);\n\n this.finishToken(tt.interpreterDirective, value);\n\n return true;\n }\n\n readToken_mult_modulo(code: number): void {\n // '%' or '*'\n let type = code === charCodes.asterisk ? tt.star : tt.modulo;\n let width = 1;\n let next = this.input.charCodeAt(this.state.pos + 1);\n\n // Exponentiation operator '**'\n if (code === charCodes.asterisk && next === charCodes.asterisk) {\n width++;\n next = this.input.charCodeAt(this.state.pos + 2);\n type = tt.exponent;\n }\n\n // '%=' or '*='\n if (next === charCodes.equalsTo && !this.state.inType) {\n width++;\n // `tt.moduloAssign` is only needed to support % as a Hack-pipe topic token.\n // If the proposal ends up choosing a different token,\n // it can be merged with tt.assign.\n type = code === charCodes.percentSign ? tt.moduloAssign : tt.assign;\n }\n\n this.finishOp(type, width);\n }\n\n readToken_pipe_amp(code: number): void {\n // '||' '&&' '||=' '&&='\n const next = this.input.charCodeAt(this.state.pos + 1);\n\n if (next === code) {\n if (this.input.charCodeAt(this.state.pos + 2) === charCodes.equalsTo) {\n this.finishOp(tt.assign, 3);\n } else {\n this.finishOp(\n code === charCodes.verticalBar ? tt.logicalOR : tt.logicalAND,\n 2,\n );\n }\n return;\n }\n\n if (code === charCodes.verticalBar) {\n // '|>'\n if (next === charCodes.greaterThan) {\n this.finishOp(tt.pipeline, 2);\n return;\n }\n // '|}'\n if (\n this.hasPlugin(\"recordAndTuple\") &&\n next === charCodes.rightCurlyBrace\n ) {\n if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n throw this.raise(Errors.RecordExpressionBarIncorrectEndSyntaxType, {\n at: this.state.curPosition(),\n });\n }\n this.state.pos += 2;\n this.finishToken(tt.braceBarR);\n return;\n }\n\n // '|]'\n if (\n this.hasPlugin(\"recordAndTuple\") &&\n next === charCodes.rightSquareBracket\n ) {\n if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n throw this.raise(Errors.TupleExpressionBarIncorrectEndSyntaxType, {\n at: this.state.curPosition(),\n });\n }\n this.state.pos += 2;\n this.finishToken(tt.bracketBarR);\n return;\n }\n }\n\n if (next === charCodes.equalsTo) {\n this.finishOp(tt.assign, 2);\n return;\n }\n\n this.finishOp(\n code === charCodes.verticalBar ? tt.bitwiseOR : tt.bitwiseAND,\n 1,\n );\n }\n\n readToken_caret(): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n\n // '^='\n if (next === charCodes.equalsTo && !this.state.inType) {\n // `tt.xorAssign` is only needed to support ^ as a Hack-pipe topic token.\n // If the proposal ends up choosing a different token,\n // it can be merged with tt.assign.\n this.finishOp(tt.xorAssign, 2);\n }\n // '^^'\n else if (\n next === charCodes.caret &&\n // If the ^^ token is not enabled, we don't throw but parse two single ^s\n // because it could be a ^ hack token followed by a ^ binary operator.\n this.hasPlugin([\n \"pipelineOperator\",\n { proposal: \"hack\", topicToken: \"^^\" },\n ])\n ) {\n this.finishOp(tt.doubleCaret, 2);\n\n // `^^^` is forbidden and must be separated by a space.\n const lookaheadCh = this.input.codePointAt(this.state.pos);\n if (lookaheadCh === charCodes.caret) {\n throw this.unexpected();\n }\n }\n // '^'\n else {\n this.finishOp(tt.bitwiseXOR, 1);\n }\n }\n\n readToken_atSign(): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n\n // '@@'\n if (\n next === charCodes.atSign &&\n this.hasPlugin([\n \"pipelineOperator\",\n { proposal: \"hack\", topicToken: \"@@\" },\n ])\n ) {\n this.finishOp(tt.doubleAt, 2);\n }\n // '@'\n else {\n this.finishOp(tt.at, 1);\n }\n }\n\n readToken_plus_min(code: number): void {\n // '+-'\n const next = this.input.charCodeAt(this.state.pos + 1);\n\n if (next === code) {\n this.finishOp(tt.incDec, 2);\n return;\n }\n\n if (next === charCodes.equalsTo) {\n this.finishOp(tt.assign, 2);\n } else {\n this.finishOp(tt.plusMin, 1);\n }\n }\n\n readToken_lt(): void {\n // '<'\n const { pos } = this.state;\n const next = this.input.charCodeAt(pos + 1);\n\n if (next === charCodes.lessThan) {\n if (this.input.charCodeAt(pos + 2) === charCodes.equalsTo) {\n this.finishOp(tt.assign, 3);\n return;\n }\n this.finishOp(tt.bitShiftL, 2);\n return;\n }\n\n if (next === charCodes.equalsTo) {\n // <=\n this.finishOp(tt.relational, 2);\n return;\n }\n\n this.finishOp(tt.lt, 1);\n }\n\n readToken_gt(): void {\n // '>'\n const { pos } = this.state;\n const next = this.input.charCodeAt(pos + 1);\n\n if (next === charCodes.greaterThan) {\n const size =\n this.input.charCodeAt(pos + 2) === charCodes.greaterThan ? 3 : 2;\n if (this.input.charCodeAt(pos + size) === charCodes.equalsTo) {\n this.finishOp(tt.assign, size + 1);\n return;\n }\n this.finishOp(tt.bitShiftR, size);\n return;\n }\n\n if (next === charCodes.equalsTo) {\n // <= | >=\n this.finishOp(tt.relational, 2);\n return;\n }\n\n this.finishOp(tt.gt, 1);\n }\n\n readToken_eq_excl(code: number): void {\n // '=!'\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (next === charCodes.equalsTo) {\n this.finishOp(\n tt.equality,\n this.input.charCodeAt(this.state.pos + 2) === charCodes.equalsTo\n ? 3\n : 2,\n );\n return;\n }\n if (code === charCodes.equalsTo && next === charCodes.greaterThan) {\n // '=>'\n this.state.pos += 2;\n this.finishToken(tt.arrow);\n return;\n }\n this.finishOp(code === charCodes.equalsTo ? tt.eq : tt.bang, 1);\n }\n\n readToken_question(): void {\n // '?'\n const next = this.input.charCodeAt(this.state.pos + 1);\n const next2 = this.input.charCodeAt(this.state.pos + 2);\n if (next === charCodes.questionMark) {\n if (next2 === charCodes.equalsTo) {\n // '??='\n this.finishOp(tt.assign, 3);\n } else {\n // '??'\n this.finishOp(tt.nullishCoalescing, 2);\n }\n } else if (\n next === charCodes.dot &&\n !(next2 >= charCodes.digit0 && next2 <= charCodes.digit9)\n ) {\n // '.' not followed by a number\n this.state.pos += 2;\n this.finishToken(tt.questionDot);\n } else {\n ++this.state.pos;\n this.finishToken(tt.question);\n }\n }\n\n getTokenFromCode(code: number): void {\n switch (code) {\n // The interpretation of a dot depends on whether it is followed\n // by a digit or another two dots.\n\n case charCodes.dot:\n this.readToken_dot();\n return;\n\n // Punctuation tokens.\n case charCodes.leftParenthesis:\n ++this.state.pos;\n this.finishToken(tt.parenL);\n return;\n case charCodes.rightParenthesis:\n ++this.state.pos;\n this.finishToken(tt.parenR);\n return;\n case charCodes.semicolon:\n ++this.state.pos;\n this.finishToken(tt.semi);\n return;\n case charCodes.comma:\n ++this.state.pos;\n this.finishToken(tt.comma);\n return;\n case charCodes.leftSquareBracket:\n if (\n this.hasPlugin(\"recordAndTuple\") &&\n this.input.charCodeAt(this.state.pos + 1) === charCodes.verticalBar\n ) {\n if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n throw this.raise(\n Errors.TupleExpressionBarIncorrectStartSyntaxType,\n { at: this.state.curPosition() },\n );\n }\n\n // [|\n this.state.pos += 2;\n this.finishToken(tt.bracketBarL);\n } else {\n ++this.state.pos;\n this.finishToken(tt.bracketL);\n }\n return;\n case charCodes.rightSquareBracket:\n ++this.state.pos;\n this.finishToken(tt.bracketR);\n return;\n case charCodes.leftCurlyBrace:\n if (\n this.hasPlugin(\"recordAndTuple\") &&\n this.input.charCodeAt(this.state.pos + 1) === charCodes.verticalBar\n ) {\n if (this.getPluginOption(\"recordAndTuple\", \"syntaxType\") !== \"bar\") {\n throw this.raise(\n Errors.RecordExpressionBarIncorrectStartSyntaxType,\n { at: this.state.curPosition() },\n );\n }\n\n // {|\n this.state.pos += 2;\n this.finishToken(tt.braceBarL);\n } else {\n ++this.state.pos;\n this.finishToken(tt.braceL);\n }\n return;\n case charCodes.rightCurlyBrace:\n ++this.state.pos;\n this.finishToken(tt.braceR);\n return;\n\n case charCodes.colon:\n if (\n this.hasPlugin(\"functionBind\") &&\n this.input.charCodeAt(this.state.pos + 1) === charCodes.colon\n ) {\n this.finishOp(tt.doubleColon, 2);\n } else {\n ++this.state.pos;\n this.finishToken(tt.colon);\n }\n return;\n\n case charCodes.questionMark:\n this.readToken_question();\n return;\n\n case charCodes.graveAccent:\n this.readTemplateToken();\n return;\n\n case charCodes.digit0: {\n const next = this.input.charCodeAt(this.state.pos + 1);\n // '0x', '0X' - hex number\n if (next === charCodes.lowercaseX || next === charCodes.uppercaseX) {\n this.readRadixNumber(16);\n return;\n }\n // '0o', '0O' - octal number\n if (next === charCodes.lowercaseO || next === charCodes.uppercaseO) {\n this.readRadixNumber(8);\n return;\n }\n // '0b', '0B' - binary number\n if (next === charCodes.lowercaseB || next === charCodes.uppercaseB) {\n this.readRadixNumber(2);\n return;\n }\n }\n // Anything else beginning with a digit is an integer, octal\n // number, or float. (fall through)\n case charCodes.digit1:\n case charCodes.digit2:\n case charCodes.digit3:\n case charCodes.digit4:\n case charCodes.digit5:\n case charCodes.digit6:\n case charCodes.digit7:\n case charCodes.digit8:\n case charCodes.digit9:\n this.readNumber(false);\n return;\n\n // Quotes produce strings.\n case charCodes.quotationMark:\n case charCodes.apostrophe:\n this.readString(code);\n return;\n\n // Operators are parsed inline in tiny state machines. '=' (charCodes.equalsTo) is\n // often referred to. `finishOp` simply skips the amount of\n // characters it is given as second argument, and returns a token\n // of the type given by its first argument.\n\n case charCodes.slash:\n this.readToken_slash();\n return;\n\n case charCodes.percentSign:\n case charCodes.asterisk:\n this.readToken_mult_modulo(code);\n return;\n\n case charCodes.verticalBar:\n case charCodes.ampersand:\n this.readToken_pipe_amp(code);\n return;\n\n case charCodes.caret:\n this.readToken_caret();\n return;\n\n case charCodes.plusSign:\n case charCodes.dash:\n this.readToken_plus_min(code);\n return;\n\n case charCodes.lessThan:\n this.readToken_lt();\n return;\n\n case charCodes.greaterThan:\n this.readToken_gt();\n return;\n\n case charCodes.equalsTo:\n case charCodes.exclamationMark:\n this.readToken_eq_excl(code);\n return;\n\n case charCodes.tilde:\n this.finishOp(tt.tilde, 1);\n return;\n\n case charCodes.atSign:\n this.readToken_atSign();\n return;\n\n case charCodes.numberSign:\n this.readToken_numberSign();\n return;\n\n case charCodes.backslash:\n this.readWord();\n return;\n\n default:\n if (isIdentifierStart(code)) {\n this.readWord(code);\n return;\n }\n }\n\n throw this.raise(\n Errors.InvalidOrUnexpectedToken,\n { at: this.state.curPosition() },\n String.fromCodePoint(code),\n );\n }\n\n finishOp(type: TokenType, size: number): void {\n const str = this.input.slice(this.state.pos, this.state.pos + size);\n this.state.pos += size;\n this.finishToken(type, str);\n }\n\n readRegexp(): void {\n const startLoc = this.state.startLoc;\n const start = this.state.start + 1;\n let escaped, inClass;\n let { pos } = this.state;\n for (; ; ++pos) {\n if (pos >= this.length) {\n // FIXME: explain\n throw this.raise(Errors.UnterminatedRegExp, {\n at: createPositionWithColumnOffset(startLoc, 1),\n });\n }\n const ch = this.input.charCodeAt(pos);\n if (isNewLine(ch)) {\n throw this.raise(Errors.UnterminatedRegExp, {\n at: createPositionWithColumnOffset(startLoc, 1),\n });\n }\n if (escaped) {\n escaped = false;\n } else {\n if (ch === charCodes.leftSquareBracket) {\n inClass = true;\n } else if (ch === charCodes.rightSquareBracket && inClass) {\n inClass = false;\n } else if (ch === charCodes.slash && !inClass) {\n break;\n }\n escaped = ch === charCodes.backslash;\n }\n }\n const content = this.input.slice(start, pos);\n ++pos;\n\n let mods = \"\";\n\n const nextPos = () =>\n // (pos + 1) + 1 - start\n createPositionWithColumnOffset(startLoc, pos + 2 - start);\n\n while (pos < this.length) {\n const cp = this.codePointAtPos(pos);\n // It doesn't matter if cp > 0xffff, the loop will either throw or break because we check on cp\n const char = String.fromCharCode(cp);\n\n if (VALID_REGEX_FLAGS.has(cp)) {\n if (cp === charCodes.lowercaseV) {\n this.expectPlugin(\"regexpUnicodeSets\", nextPos());\n\n if (mods.includes(\"u\")) {\n this.raise(Errors.IncompatibleRegExpUVFlags, { at: nextPos() });\n }\n } else if (cp === charCodes.lowercaseU) {\n if (mods.includes(\"v\")) {\n this.raise(Errors.IncompatibleRegExpUVFlags, { at: nextPos() });\n }\n }\n if (mods.includes(char)) {\n this.raise(Errors.DuplicateRegExpFlags, { at: nextPos() });\n }\n } else if (isIdentifierChar(cp) || cp === charCodes.backslash) {\n this.raise(Errors.MalformedRegExpFlags, { at: nextPos() });\n } else {\n break;\n }\n\n ++pos;\n mods += char;\n }\n this.state.pos = pos;\n\n this.finishToken(tt.regexp, {\n pattern: content,\n flags: mods,\n });\n }\n\n // Read an integer in the given radix. Return null if zero digits\n // were read, the integer value otherwise. When `len` is given, this\n // will return `null` unless the integer has exactly `len` digits.\n // When `forceLen` is `true`, it means that we already know that in case\n // of a malformed number we have to skip `len` characters anyway, instead\n // of bailing out early. For example, in \"\\u{123Z}\" we want to read up to }\n // anyway, while in \"\\u00Z\" we will stop at Z instead of consuming four\n // characters (and thus the closing quote).\n\n readInt(\n radix: number,\n len?: number,\n forceLen?: boolean,\n allowNumSeparator: boolean = true,\n ): number | null {\n const start = this.state.pos;\n const forbiddenSiblings =\n radix === 16\n ? forbiddenNumericSeparatorSiblings.hex\n : forbiddenNumericSeparatorSiblings.decBinOct;\n const allowedSiblings =\n radix === 16\n ? allowedNumericSeparatorSiblings.hex\n : radix === 10\n ? allowedNumericSeparatorSiblings.dec\n : radix === 8\n ? allowedNumericSeparatorSiblings.oct\n : allowedNumericSeparatorSiblings.bin;\n\n let invalid = false;\n let total = 0;\n\n for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {\n const code = this.input.charCodeAt(this.state.pos);\n let val;\n\n if (code === charCodes.underscore) {\n const prev = this.input.charCodeAt(this.state.pos - 1);\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (allowedSiblings.indexOf(next) === -1) {\n this.raise(Errors.UnexpectedNumericSeparator, {\n at: this.state.curPosition(),\n });\n } else if (\n forbiddenSiblings.indexOf(prev) > -1 ||\n forbiddenSiblings.indexOf(next) > -1 ||\n Number.isNaN(next)\n ) {\n this.raise(Errors.UnexpectedNumericSeparator, {\n at: this.state.curPosition(),\n });\n }\n\n if (!allowNumSeparator) {\n this.raise(Errors.NumericSeparatorInEscapeSequence, {\n at: this.state.curPosition(),\n });\n }\n\n // Ignore this _ character\n ++this.state.pos;\n continue;\n }\n\n if (code >= charCodes.lowercaseA) {\n val = code - charCodes.lowercaseA + charCodes.lineFeed;\n } else if (code >= charCodes.uppercaseA) {\n val = code - charCodes.uppercaseA + charCodes.lineFeed;\n } else if (charCodes.isDigit(code)) {\n val = code - charCodes.digit0; // 0-9\n } else {\n val = Infinity;\n }\n if (val >= radix) {\n // If we are in \"errorRecovery\" mode and we found a digit which is too big,\n // don't break the loop.\n\n if (this.options.errorRecovery && val <= 9) {\n val = 0;\n this.raise(\n Errors.InvalidDigit,\n { at: this.state.curPosition() },\n radix,\n );\n } else if (forceLen) {\n val = 0;\n invalid = true;\n } else {\n break;\n }\n }\n ++this.state.pos;\n total = total * radix + val;\n }\n if (\n this.state.pos === start ||\n (len != null && this.state.pos - start !== len) ||\n invalid\n ) {\n return null;\n }\n\n return total;\n }\n\n readRadixNumber(radix: number): void {\n const startLoc = this.state.curPosition();\n let isBigInt = false;\n\n this.state.pos += 2; // 0x\n const val = this.readInt(radix);\n if (val == null) {\n this.raise(\n Errors.InvalidDigit,\n // Numeric literals can't have newlines, so this is safe to do.\n { at: createPositionWithColumnOffset(startLoc, 2) },\n radix,\n );\n }\n const next = this.input.charCodeAt(this.state.pos);\n\n if (next === charCodes.lowercaseN) {\n ++this.state.pos;\n isBigInt = true;\n } else if (next === charCodes.lowercaseM) {\n throw this.raise(Errors.InvalidDecimal, { at: startLoc });\n }\n\n if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {\n throw this.raise(Errors.NumberIdentifier, {\n at: this.state.curPosition(),\n });\n }\n\n if (isBigInt) {\n const str = this.input\n .slice(startLoc.index, this.state.pos)\n .replace(/[_n]/g, \"\");\n this.finishToken(tt.bigint, str);\n return;\n }\n\n this.finishToken(tt.num, val);\n }\n\n // Read an integer, octal integer, or floating-point number.\n\n readNumber(startsWithDot: boolean): void {\n const start = this.state.pos;\n const startLoc = this.state.curPosition();\n let isFloat = false;\n let isBigInt = false;\n let isDecimal = false;\n let hasExponent = false;\n let isOctal = false;\n\n if (!startsWithDot && this.readInt(10) === null) {\n this.raise(Errors.InvalidNumber, { at: this.state.curPosition() });\n }\n const hasLeadingZero =\n this.state.pos - start >= 2 &&\n this.input.charCodeAt(start) === charCodes.digit0;\n\n if (hasLeadingZero) {\n const integer = this.input.slice(start, this.state.pos);\n this.recordStrictModeErrors(Errors.StrictOctalLiteral, startLoc);\n if (!this.state.strict) {\n // disallow numeric separators in non octal decimals and legacy octal likes\n const underscorePos = integer.indexOf(\"_\");\n if (underscorePos > 0) {\n // Numeric literals can't have newlines, so this is safe to do.\n this.raise(Errors.ZeroDigitNumericSeparator, {\n at: createPositionWithColumnOffset(startLoc, underscorePos),\n });\n }\n }\n isOctal = hasLeadingZero && !/[89]/.test(integer);\n }\n\n let next = this.input.charCodeAt(this.state.pos);\n if (next === charCodes.dot && !isOctal) {\n ++this.state.pos;\n this.readInt(10);\n isFloat = true;\n next = this.input.charCodeAt(this.state.pos);\n }\n\n if (\n (next === charCodes.uppercaseE || next === charCodes.lowercaseE) &&\n !isOctal\n ) {\n next = this.input.charCodeAt(++this.state.pos);\n if (next === charCodes.plusSign || next === charCodes.dash) {\n ++this.state.pos;\n }\n if (this.readInt(10) === null) {\n this.raise(Errors.InvalidOrMissingExponent, { at: startLoc });\n }\n isFloat = true;\n hasExponent = true;\n next = this.input.charCodeAt(this.state.pos);\n }\n\n if (next === charCodes.lowercaseN) {\n // disallow floats, legacy octal syntax and non octal decimals\n // new style octal (\"0o\") is handled in this.readRadixNumber\n if (isFloat || hasLeadingZero) {\n this.raise(Errors.InvalidBigIntLiteral, { at: startLoc });\n }\n ++this.state.pos;\n isBigInt = true;\n }\n\n if (next === charCodes.lowercaseM) {\n this.expectPlugin(\"decimal\", this.state.curPosition());\n if (hasExponent || hasLeadingZero) {\n this.raise(Errors.InvalidDecimal, { at: startLoc });\n }\n ++this.state.pos;\n isDecimal = true;\n }\n\n if (isIdentifierStart(this.codePointAtPos(this.state.pos))) {\n throw this.raise(Errors.NumberIdentifier, {\n at: this.state.curPosition(),\n });\n }\n\n // remove \"_\" for numeric literal separator, and trailing `m` or `n`\n const str = this.input.slice(start, this.state.pos).replace(/[_mn]/g, \"\");\n\n if (isBigInt) {\n this.finishToken(tt.bigint, str);\n return;\n }\n\n if (isDecimal) {\n this.finishToken(tt.decimal, str);\n return;\n }\n\n const val = isOctal ? parseInt(str, 8) : parseFloat(str);\n this.finishToken(tt.num, val);\n }\n\n // Read a string value, interpreting backslash-escapes.\n\n readCodePoint(throwOnInvalid: boolean): number | null {\n const ch = this.input.charCodeAt(this.state.pos);\n let code;\n\n if (ch === charCodes.leftCurlyBrace) {\n ++this.state.pos;\n code = this.readHexChar(\n this.input.indexOf(\"}\", this.state.pos) - this.state.pos,\n true,\n throwOnInvalid,\n );\n ++this.state.pos;\n if (code !== null && code > 0x10ffff) {\n if (throwOnInvalid) {\n this.raise(Errors.InvalidCodePoint, { at: this.state.curPosition() });\n } else {\n return null;\n }\n }\n } else {\n code = this.readHexChar(4, false, throwOnInvalid);\n }\n return code;\n }\n\n readString(quote: number): void {\n let out = \"\",\n chunkStart = ++this.state.pos;\n for (;;) {\n if (this.state.pos >= this.length) {\n throw this.raise(Errors.UnterminatedString, {\n at: this.state.startLoc,\n });\n }\n const ch = this.input.charCodeAt(this.state.pos);\n if (ch === quote) break;\n if (ch === charCodes.backslash) {\n out += this.input.slice(chunkStart, this.state.pos);\n // $FlowFixMe\n out += this.readEscapedChar(false);\n chunkStart = this.state.pos;\n } else if (\n ch === charCodes.lineSeparator ||\n ch === charCodes.paragraphSeparator\n ) {\n ++this.state.pos;\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n } else if (isNewLine(ch)) {\n throw this.raise(Errors.UnterminatedString, {\n at: this.state.startLoc,\n });\n } else {\n ++this.state.pos;\n }\n }\n out += this.input.slice(chunkStart, this.state.pos++);\n this.finishToken(tt.string, out);\n }\n\n // Reads tempalte continuation `}...`\n readTemplateContinuation(): void {\n if (!this.match(tt.braceR)) {\n this.unexpected(null, tt.braceR);\n }\n // rewind pos to `}`\n this.state.pos--;\n this.readTemplateToken();\n }\n\n // Reads template string tokens.\n readTemplateToken(): void {\n let out = \"\",\n chunkStart = this.state.pos,\n containsInvalid = false;\n ++this.state.pos; // eat '`' or `}`\n for (;;) {\n if (this.state.pos >= this.length) {\n // FIXME: explain\n throw this.raise(Errors.UnterminatedTemplate, {\n at: createPositionWithColumnOffset(this.state.startLoc, 1),\n });\n }\n const ch = this.input.charCodeAt(this.state.pos);\n if (ch === charCodes.graveAccent) {\n ++this.state.pos; // eat '`'\n out += this.input.slice(chunkStart, this.state.pos);\n this.finishToken(tt.templateTail, containsInvalid ? null : out);\n return;\n }\n if (\n ch === charCodes.dollarSign &&\n this.input.charCodeAt(this.state.pos + 1) === charCodes.leftCurlyBrace\n ) {\n this.state.pos += 2; // eat '${'\n out += this.input.slice(chunkStart, this.state.pos);\n this.finishToken(tt.templateNonTail, containsInvalid ? null : out);\n return;\n }\n if (ch === charCodes.backslash) {\n out += this.input.slice(chunkStart, this.state.pos);\n const escaped = this.readEscapedChar(true);\n if (escaped === null) {\n containsInvalid = true;\n } else {\n out += escaped;\n }\n chunkStart = this.state.pos;\n } else if (isNewLine(ch)) {\n out += this.input.slice(chunkStart, this.state.pos);\n ++this.state.pos;\n switch (ch) {\n case charCodes.carriageReturn:\n if (this.input.charCodeAt(this.state.pos) === charCodes.lineFeed) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n out += \"\\n\";\n break;\n default:\n out += String.fromCharCode(ch);\n break;\n }\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n chunkStart = this.state.pos;\n } else {\n ++this.state.pos;\n }\n }\n }\n\n recordStrictModeErrors(message: ErrorTemplate, loc: Position) {\n if (this.state.strict && !this.state.strictErrors.has(loc.index)) {\n this.raise(message, { at: loc });\n } else {\n this.state.strictErrors.set(loc.index, { loc, message });\n }\n }\n\n // Used to read escaped characters\n readEscapedChar(inTemplate: boolean): string | null {\n const throwOnInvalid = !inTemplate;\n const ch = this.input.charCodeAt(++this.state.pos);\n ++this.state.pos;\n switch (ch) {\n case charCodes.lowercaseN:\n return \"\\n\";\n case charCodes.lowercaseR:\n return \"\\r\";\n case charCodes.lowercaseX: {\n const code = this.readHexChar(2, false, throwOnInvalid);\n return code === null ? null : String.fromCharCode(code);\n }\n case charCodes.lowercaseU: {\n const code = this.readCodePoint(throwOnInvalid);\n return code === null ? null : String.fromCodePoint(code);\n }\n case charCodes.lowercaseT:\n return \"\\t\";\n case charCodes.lowercaseB:\n return \"\\b\";\n case charCodes.lowercaseV:\n return \"\\u000b\";\n case charCodes.lowercaseF:\n return \"\\f\";\n case charCodes.carriageReturn:\n if (this.input.charCodeAt(this.state.pos) === charCodes.lineFeed) {\n ++this.state.pos;\n }\n // fall through\n case charCodes.lineFeed:\n this.state.lineStart = this.state.pos;\n ++this.state.curLine;\n // fall through\n case charCodes.lineSeparator:\n case charCodes.paragraphSeparator:\n return \"\";\n case charCodes.digit8:\n case charCodes.digit9:\n if (inTemplate) {\n return null;\n } else {\n this.recordStrictModeErrors(\n Errors.StrictNumericEscape,\n // We immediately follow a \"\\\\\", and we're an 8 or a 9, so we must\n // be on the same line.\n createPositionWithColumnOffset(this.state.curPosition(), -1),\n );\n }\n // fall through\n default:\n if (ch >= charCodes.digit0 && ch <= charCodes.digit7) {\n // We immediately follow a \"\\\\\", and we're something between 0 and 7,\n // so we must be on the same line.\n const codePos = createPositionWithColumnOffset(\n this.state.curPosition(),\n -1,\n );\n const match = this.input\n .substr(this.state.pos - 1, 3)\n .match(/^[0-7]+/);\n\n // This is never null, because of the if condition above.\n /*:: invariant(match !== null) */\n let octalStr = match[0];\n\n let octal = parseInt(octalStr, 8);\n if (octal > 255) {\n octalStr = octalStr.slice(0, -1);\n octal = parseInt(octalStr, 8);\n }\n this.state.pos += octalStr.length - 1;\n const next = this.input.charCodeAt(this.state.pos);\n if (\n octalStr !== \"0\" ||\n next === charCodes.digit8 ||\n next === charCodes.digit9\n ) {\n if (inTemplate) {\n return null;\n } else {\n this.recordStrictModeErrors(Errors.StrictNumericEscape, codePos);\n }\n }\n\n return String.fromCharCode(octal);\n }\n\n return String.fromCharCode(ch);\n }\n }\n\n // Used to read character escape sequences ('\\x', '\\u').\n\n readHexChar(\n len: number,\n forceLen: boolean,\n throwOnInvalid: boolean,\n ): number | null {\n const codeLoc = this.state.curPosition();\n const n = this.readInt(16, len, forceLen, false);\n if (n === null) {\n if (throwOnInvalid) {\n this.raise(Errors.InvalidEscapeSequence, { at: codeLoc });\n } else {\n this.state.pos = codeLoc.index - 1;\n }\n }\n return n;\n }\n\n // Read an identifier, and return it as a string. Sets `this.state.containsEsc`\n // to whether the word contained a '\\u' escape.\n //\n // Incrementally adds only escaped chars, adding other chunks as-is\n // as a micro-optimization.\n //\n // When `firstCode` is given, it assumes it is always an identifier start and\n // will skip reading start position again\n\n readWord1(firstCode: number | void): string {\n this.state.containsEsc = false;\n let word = \"\";\n const start = this.state.pos;\n let chunkStart = this.state.pos;\n if (firstCode !== undefined) {\n this.state.pos += firstCode <= 0xffff ? 1 : 2;\n }\n\n while (this.state.pos < this.length) {\n const ch = this.codePointAtPos(this.state.pos);\n if (isIdentifierChar(ch)) {\n this.state.pos += ch <= 0xffff ? 1 : 2;\n } else if (ch === charCodes.backslash) {\n this.state.containsEsc = true;\n\n word += this.input.slice(chunkStart, this.state.pos);\n const escStart = this.state.curPosition();\n const identifierCheck =\n this.state.pos === start ? isIdentifierStart : isIdentifierChar;\n\n if (this.input.charCodeAt(++this.state.pos) !== charCodes.lowercaseU) {\n this.raise(Errors.MissingUnicodeEscape, {\n at: this.state.curPosition(),\n });\n chunkStart = this.state.pos - 1;\n continue;\n }\n\n ++this.state.pos;\n const esc = this.readCodePoint(true);\n if (esc !== null) {\n if (!identifierCheck(esc)) {\n this.raise(Errors.EscapedCharNotAnIdentifier, { at: escStart });\n }\n\n word += String.fromCodePoint(esc);\n }\n chunkStart = this.state.pos;\n } else {\n break;\n }\n }\n return word + this.input.slice(chunkStart, this.state.pos);\n }\n\n // Read an identifier or keyword token. Will check for reserved\n // words when necessary.\n\n readWord(firstCode: number | void): void {\n const word = this.readWord1(firstCode);\n const type = keywordTypes.get(word);\n if (type !== undefined) {\n // We don't use word as state.value here because word is a dynamic string\n // while token label is a shared constant string\n this.finishToken(type, tokenLabelName(type));\n } else {\n this.finishToken(tt.name, word);\n }\n }\n\n checkKeywordEscapes(): void {\n const { type } = this.state;\n if (tokenIsKeyword(type) && this.state.containsEsc) {\n this.raise(\n Errors.InvalidEscapedReservedWord,\n { at: this.state.startLoc },\n tokenLabelName(type),\n );\n }\n }\n\n // updateContext is used by the jsx plugin\n // eslint-disable-next-line no-unused-vars\n updateContext(prevType: TokenType): void {}\n}\n","// @flow\n\nimport {\n CLASS_ELEMENT_KIND_ACCESSOR,\n CLASS_ELEMENT_FLAG_STATIC,\n type ClassElementTypes,\n} from \"./scopeflags\";\nimport { Position } from \"./location\";\nimport { Errors, type raiseFunction } from \"../parser/error\";\n\nexport class ClassScope {\n // A list of private named declared in the current class\n privateNames: Set<string> = new Set();\n\n // A list of private getters of setters without their counterpart\n loneAccessors: Map<string, ClassElementTypes> = new Map();\n\n // A list of private names used before being defined, mapping to\n // their position.\n undefinedPrivateNames: Map<string, Position> = new Map();\n}\n\nexport default class ClassScopeHandler {\n stack: Array<ClassScope> = [];\n declare raise: raiseFunction;\n undefinedPrivateNames: Map<string, Position> = new Map();\n\n constructor(raise: raiseFunction) {\n this.raise = raise;\n }\n\n current(): ClassScope {\n return this.stack[this.stack.length - 1];\n }\n\n enter() {\n this.stack.push(new ClassScope());\n }\n\n exit() {\n const oldClassScope = this.stack.pop();\n\n // Migrate the usage of not yet defined private names to the outer\n // class scope, or raise an error if we reached the top-level scope.\n\n const current = this.current();\n\n // Array.from is needed because this is compiled to an array-like for loop\n for (const [name, loc] of Array.from(oldClassScope.undefinedPrivateNames)) {\n if (current) {\n if (!current.undefinedPrivateNames.has(name)) {\n current.undefinedPrivateNames.set(name, loc);\n }\n } else {\n this.raise(Errors.InvalidPrivateFieldResolution, { at: loc }, name);\n }\n }\n }\n\n declarePrivateName(\n name: string,\n elementType: ClassElementTypes,\n loc: Position,\n ) {\n const { privateNames, loneAccessors, undefinedPrivateNames } =\n this.current();\n let redefined = privateNames.has(name);\n\n if (elementType & CLASS_ELEMENT_KIND_ACCESSOR) {\n const accessor = redefined && loneAccessors.get(name);\n if (accessor) {\n const oldStatic = accessor & CLASS_ELEMENT_FLAG_STATIC;\n const newStatic = elementType & CLASS_ELEMENT_FLAG_STATIC;\n\n const oldKind = accessor & CLASS_ELEMENT_KIND_ACCESSOR;\n const newKind = elementType & CLASS_ELEMENT_KIND_ACCESSOR;\n\n // The private name can be duplicated only if it is used by\n // two accessors with different kind (get and set), and if\n // they have the same placement (static or not).\n redefined = oldKind === newKind || oldStatic !== newStatic;\n\n if (!redefined) loneAccessors.delete(name);\n } else if (!redefined) {\n loneAccessors.set(name, elementType);\n }\n }\n\n if (redefined) {\n this.raise(Errors.PrivateNameRedeclaration, { at: loc }, name);\n }\n\n privateNames.add(name);\n undefinedPrivateNames.delete(name);\n }\n\n usePrivateName(name: string, loc: Position) {\n let classScope;\n for (classScope of this.stack) {\n if (classScope.privateNames.has(name)) return;\n }\n\n if (classScope) {\n classScope.undefinedPrivateNames.set(name, loc);\n } else {\n // top-level\n this.raise(Errors.InvalidPrivateFieldResolution, { at: loc }, name);\n }\n }\n}\n","// @flow\n\nimport type { ErrorData, ErrorTemplate, raiseFunction } from \"../parser/error\";\nimport { Position } from \"./location\";\n\n/*:: declare var invariant; */\n/**\n * @module util/expression-scope\n\nExpressionScope is used to track declaration errors in these ambiguous patterns:\n\n- CoverParenthesizedExpressionAndArrowParameterList\n e.g. we don't know if `({ x })` is an parenthesized expression or an\n arrow function parameters until we see an `=>` after `)`.\n\n- CoverCallExpressionAndAsyncArrowHead\n e.g. we don't know if `async({ x })` is a call expression or an async arrow\n function parameters until we see an `=>` after `)`\n\nThe following declaration errors (@see parser/error-message) will be recorded in\nsome expression scopes and thrown later when we know what the ambigous pattern is\n\n- AwaitBindingIdentifier\n- AwaitExpressionFormalParameter\n- YieldInParameter\n- InvalidParenthesizedAssignment when parenthesized is an identifier\n\nThere are four different expression scope\n- Expression\n A general scope that represents program / function body / static block. No errors\n will be recorded nor thrown in this scope.\n\n- MaybeArrowParameterDeclaration\n A scope that represents ambiguous arrow head e.g. `(x)`. Errors will be recorded\n alongside parent scopes and thrown when `ExpressionScopeHandler#validateAsPattern`\n is called.\n\n- MaybeAsyncArrowParameterDeclaration\n A scope that represents ambiguous async arrow head e.g. `async(x)`. Errors will\n be recorded alongside parent scopes and thrown when\n `ExpressionScopeHandler#validateAsPattern` is called.\n\n- ParameterDeclaration\n A scope that represents unambiguous function parameters `function(x)`. Errors\n recorded in this scope will be thrown immediately. No errors will be recorded in\n this scope.\n\n// @see {@link https://docs.google.com/document/d/1FAvEp9EUK-G8kHfDIEo_385Hs2SUBCYbJ5H-NnLvq8M|V8 Expression Scope design docs}\n */\n\nconst kExpression = 0,\n kMaybeArrowParameterDeclaration = 1,\n kMaybeAsyncArrowParameterDeclaration = 2,\n kParameterDeclaration = 3;\n\ntype ExpressionScopeType = 0 | 1 | 2 | 3;\n\nclass ExpressionScope {\n type: ExpressionScopeType;\n\n constructor(type: ExpressionScopeType = kExpression) {\n this.type = type;\n }\n\n canBeArrowParameterDeclaration() {\n return (\n this.type === kMaybeAsyncArrowParameterDeclaration ||\n this.type === kMaybeArrowParameterDeclaration\n );\n }\n\n isCertainlyParameterDeclaration() {\n return this.type === kParameterDeclaration;\n }\n}\n\nclass ArrowHeadParsingScope extends ExpressionScope {\n errors: Map</* pos */ number, ErrorData> = new Map();\n constructor(type: 1 | 2) {\n super(type);\n }\n recordDeclarationError(message: ErrorTemplate, loc: Position) {\n this.errors.set(loc.index, { message, loc });\n }\n clearDeclarationError(loc: Position) {\n this.errors.delete(loc.index);\n }\n iterateErrors(iterator: (data: ErrorData) => void) {\n this.errors.forEach(iterator);\n }\n}\n\nexport default class ExpressionScopeHandler {\n stack: Array<ExpressionScope> = [new ExpressionScope()];\n declare raise: raiseFunction;\n constructor(raise: raiseFunction) {\n this.raise = raise;\n }\n enter(scope: ExpressionScope) {\n this.stack.push(scope);\n }\n\n exit() {\n this.stack.pop();\n }\n\n /**\n * Record likely parameter initializer errors\n *\n * When current scope is a ParameterDeclaration, the error will be thrown immediately,\n * otherwise it will be recorded to any ancestry MaybeArrowParameterDeclaration and\n * MaybeAsyncArrowParameterDeclaration scope until an Expression scope is seen.\n * @param {number} pos Error position\n * @param {ErrorTemplate} template Error template\n * @memberof ExpressionScopeHandler\n */\n recordParameterInitializerError(\n loc: Position,\n template: ErrorTemplate,\n ): void {\n const { stack } = this;\n let i = stack.length - 1;\n let scope: ExpressionScope = stack[i];\n while (!scope.isCertainlyParameterDeclaration()) {\n if (scope.canBeArrowParameterDeclaration()) {\n /*:: invariant(scope instanceof ArrowHeadParsingScope) */\n scope.recordDeclarationError(template, loc);\n } else {\n /*:: invariant(scope.type == kExpression) */\n // Type-Expression is the boundary where initializer error can populate to\n return;\n }\n scope = stack[--i];\n }\n /* eslint-disable @babel/development-internal/dry-error-messages */\n this.raise(template, { at: loc });\n }\n\n /**\n * Record parenthesized identifier errors\n *\n * A parenthesized identifier in LHS can be ambiguous because the assignment\n * can be transformed to an assignable later, but not vice versa:\n * For example, in `([(a) = []] = []) => {}`, we think `(a) = []` is an LHS in `[(a) = []]`,\n * an LHS within `[(a) = []] = []`. However the LHS chain is then transformed by toAssignable,\n * and we should throw assignment `(a)`, which is only valid in LHS. Hence we record the\n * location of parenthesized `(a)` to current scope if it is one of MaybeArrowParameterDeclaration\n * and MaybeAsyncArrowParameterDeclaration\n *\n * Unlike `recordParameterInitializerError`, we don't record to ancestry scope because we\n * validate arrow head parsing scope before exit, and then the LHS will be unambiguous:\n * For example, in `( x = ( [(a) = []] = [] ) ) => {}`, we should not record `(a)` in `( x = ... ) =>`\n * arrow scope because when we finish parsing `( [(a) = []] = [] )`, it is an unambiguous assignment\n * expression and can not be cast to pattern\n * @param {number} pos\n * @param {ErrorTemplate} template\n * @returns {void}\n * @memberof ExpressionScopeHandler\n */\n recordParenthesizedIdentifierError(\n template: ErrorTemplate,\n loc: Position,\n ): void {\n const { stack } = this;\n const scope: ExpressionScope = stack[stack.length - 1];\n if (scope.isCertainlyParameterDeclaration()) {\n this.raise(template, { at: loc });\n } else if (scope.canBeArrowParameterDeclaration()) {\n /*:: invariant(scope instanceof ArrowHeadParsingScope) */\n scope.recordDeclarationError(template, loc);\n } else {\n return;\n }\n }\n\n /**\n * Record likely async arrow parameter errors\n *\n * Errors will be recorded to any ancestry MaybeAsyncArrowParameterDeclaration\n * scope until an Expression scope is seen.\n * @param {number} pos\n * @param {ErrorTemplate} template\n * @memberof ExpressionScopeHandler\n */\n recordAsyncArrowParametersError(\n template: ErrorTemplate,\n loc: Position,\n ): void {\n const { stack } = this;\n let i = stack.length - 1;\n let scope: ExpressionScope = stack[i];\n while (scope.canBeArrowParameterDeclaration()) {\n if (scope.type === kMaybeAsyncArrowParameterDeclaration) {\n /*:: invariant(scope instanceof ArrowHeadParsingScope) */\n scope.recordDeclarationError(template, loc);\n }\n scope = stack[--i];\n }\n }\n\n validateAsPattern(): void {\n const { stack } = this;\n const currentScope = stack[stack.length - 1];\n if (!currentScope.canBeArrowParameterDeclaration()) return;\n /*:: invariant(currentScope instanceof ArrowHeadParsingScope) */\n currentScope.iterateErrors(({ message, loc }) => {\n /* eslint-disable @babel/development-internal/dry-error-messages */\n this.raise(message, { at: loc });\n // iterate from parent scope\n let i = stack.length - 2;\n let scope = stack[i];\n while (scope.canBeArrowParameterDeclaration()) {\n /*:: invariant(scope instanceof ArrowHeadParsingScope) */\n scope.clearDeclarationError(loc);\n scope = stack[--i];\n }\n });\n }\n}\n\nexport function newParameterDeclarationScope() {\n return new ExpressionScope(kParameterDeclaration);\n}\n\nexport function newArrowHeadScope() {\n return new ArrowHeadParsingScope(kMaybeArrowParameterDeclaration);\n}\n\nexport function newAsyncArrowScope() {\n return new ArrowHeadParsingScope(kMaybeAsyncArrowParameterDeclaration);\n}\n\nexport function newExpressionScope() {\n return new ExpressionScope();\n}\n","// @flow\nexport const PARAM = 0b0000, // Initial Parameter flags\n PARAM_YIELD = 0b0001, // track [Yield] production parameter\n PARAM_AWAIT = 0b0010, // track [Await] production parameter\n PARAM_RETURN = 0b0100, // track [Return] production parameter\n PARAM_IN = 0b1000; // track [In] production parameter\n\n// ProductionParameterHandler is a stack fashioned production parameter tracker\n// https://tc39.es/ecma262/#sec-grammar-notation\n// The tracked parameters are defined above.\n//\n// Whenever [+Await]/[+Yield] appears in the right-hand sides of a production,\n// we must enter a new tracking stack. For example when parsing\n//\n// AsyncFunctionDeclaration [Yield, Await]:\n// async [no LineTerminator here] function BindingIdentifier[?Yield, ?Await]\n// ( FormalParameters[~Yield, +Await] ) { AsyncFunctionBody }\n//\n// we must follow such process:\n//\n// 1. parse async keyword\n// 2. parse function keyword\n// 3. parse bindingIdentifier <= inherit current parameters: [?Await]\n// 4. enter new stack with (PARAM_AWAIT)\n// 5. parse formal parameters <= must have [Await] parameter [+Await]\n// 6. parse function body\n// 7. exit current stack\n\nexport type ParamKind =\n | typeof PARAM\n | typeof PARAM_AWAIT\n | typeof PARAM_IN\n | typeof PARAM_RETURN\n | typeof PARAM_YIELD;\n\nexport default class ProductionParameterHandler {\n stacks: Array<ParamKind> = [];\n enter(flags: ParamKind) {\n this.stacks.push(flags);\n }\n\n exit() {\n this.stacks.pop();\n }\n\n currentFlags(): ParamKind {\n return this.stacks[this.stacks.length - 1];\n }\n\n get hasAwait(): boolean {\n return (this.currentFlags() & PARAM_AWAIT) > 0;\n }\n\n get hasYield(): boolean {\n return (this.currentFlags() & PARAM_YIELD) > 0;\n }\n\n get hasReturn(): boolean {\n return (this.currentFlags() & PARAM_RETURN) > 0;\n }\n\n get hasIn(): boolean {\n return (this.currentFlags() & PARAM_IN) > 0;\n }\n}\n\nexport function functionFlags(\n isAsync: boolean,\n isGenerator: boolean,\n): ParamKind {\n return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0);\n}\n","// @flow\n\nimport { type Position } from \"../util/location\";\nimport {\n tokenIsLiteralPropertyName,\n tokenLabelName,\n tt,\n type TokenType,\n} from \"../tokenizer/types\";\nimport Tokenizer from \"../tokenizer\";\nimport State from \"../tokenizer/state\";\nimport type { Node } from \"../types\";\nimport { lineBreak, skipWhiteSpaceToLineBreak } from \"../util/whitespace\";\nimport { isIdentifierChar } from \"../util/identifier\";\nimport ClassScopeHandler from \"../util/class-scope\";\nimport ExpressionScopeHandler from \"../util/expression-scope\";\nimport { SCOPE_PROGRAM } from \"../util/scopeflags\";\nimport ProductionParameterHandler, {\n PARAM_AWAIT,\n PARAM,\n} from \"../util/production-parameter\";\nimport { Errors, type ErrorTemplate, ErrorCodes } from \"./error\";\nimport type { ParsingError } from \"./error\";\nimport type { PluginConfig } from \"./base\";\n/*::\nimport type ScopeHandler from \"../util/scope\";\n*/\n\ntype TryParse<Node, Error, Thrown, Aborted, FailState> = {\n node: Node,\n error: Error,\n thrown: Thrown,\n aborted: Aborted,\n failState: FailState,\n};\n\n// ## Parser utilities\n\nexport default class UtilParser extends Tokenizer {\n // Forward-declaration: defined in parser/index.js\n /*::\n +getScopeHandler: () => Class<ScopeHandler<*>>;\n */\n\n // TODO\n\n addExtra(\n node: Node,\n key: string,\n value: any,\n enumerable: boolean = true,\n ): void {\n if (!node) return;\n\n const extra = (node.extra = node.extra || {});\n if (enumerable) {\n extra[key] = value;\n } else {\n Object.defineProperty(extra, key, { enumerable, value });\n }\n }\n\n // Tests whether parsed token is a contextual keyword.\n\n isContextual(token: TokenType): boolean {\n return this.state.type === token && !this.state.containsEsc;\n }\n\n isUnparsedContextual(nameStart: number, name: string): boolean {\n const nameEnd = nameStart + name.length;\n if (this.input.slice(nameStart, nameEnd) === name) {\n const nextCh = this.input.charCodeAt(nameEnd);\n return !(\n isIdentifierChar(nextCh) ||\n // check if `nextCh is between 0xd800 - 0xdbff,\n // if `nextCh` is NaN, `NaN & 0xfc00` is 0, the function\n // returns true\n (nextCh & 0xfc00) === 0xd800\n );\n }\n return false;\n }\n\n isLookaheadContextual(name: string): boolean {\n const next = this.nextTokenStart();\n return this.isUnparsedContextual(next, name);\n }\n\n // Consumes contextual keyword if possible.\n\n eatContextual(token: TokenType): boolean {\n if (this.isContextual(token)) {\n this.next();\n return true;\n }\n return false;\n }\n\n // Asserts that following token is given contextual keyword.\n\n expectContextual(token: TokenType, template?: ErrorTemplate): void {\n if (!this.eatContextual(token)) {\n if (template != null) {\n /* eslint-disable @babel/development-internal/dry-error-messages */\n throw this.raise(template, { at: this.state.startLoc });\n }\n throw this.unexpected(null, token);\n }\n }\n\n // Test whether a semicolon can be inserted at the current position.\n\n canInsertSemicolon(): boolean {\n return (\n this.match(tt.eof) ||\n this.match(tt.braceR) ||\n this.hasPrecedingLineBreak()\n );\n }\n\n hasPrecedingLineBreak(): boolean {\n return lineBreak.test(\n this.input.slice(this.state.lastTokEndLoc.index, this.state.start),\n );\n }\n\n hasFollowingLineBreak(): boolean {\n skipWhiteSpaceToLineBreak.lastIndex = this.state.end;\n return skipWhiteSpaceToLineBreak.test(this.input);\n }\n\n // TODO\n\n isLineTerminator(): boolean {\n return this.eat(tt.semi) || this.canInsertSemicolon();\n }\n\n // Consume a semicolon, or, failing that, see if we are allowed to\n // pretend that there is a semicolon at this position.\n\n semicolon(allowAsi: boolean = true): void {\n if (allowAsi ? this.isLineTerminator() : this.eat(tt.semi)) return;\n this.raise(Errors.MissingSemicolon, { at: this.state.lastTokEndLoc });\n }\n\n // Expect a token of a given type. If found, consume it, otherwise,\n // raise an unexpected token error at given pos.\n\n expect(type: TokenType, loc?: ?Position): void {\n this.eat(type) || this.unexpected(loc, type);\n }\n\n // Throws if the current token and the prev one are separated by a space.\n assertNoSpace(message: string = \"Unexpected space.\"): void {\n if (this.state.start > this.state.lastTokEndLoc.index) {\n /* eslint-disable @babel/development-internal/dry-error-messages */\n this.raise(\n {\n code: ErrorCodes.SyntaxError,\n reasonCode: \"UnexpectedSpace\",\n template: message,\n },\n { at: this.state.lastTokEndLoc },\n /* eslint-enable @babel/development-internal/dry-error-messages */\n );\n }\n }\n\n // Raise an unexpected token error. Can take the expected token type\n // instead of a message string.\n\n unexpected(loc?: ?Position, type?: ?TokenType): empty {\n /* eslint-disable @babel/development-internal/dry-error-messages */\n throw this.raise(\n {\n code: ErrorCodes.SyntaxError,\n reasonCode: \"UnexpectedToken\",\n template:\n type != null\n ? `Unexpected token, expected \"${tokenLabelName(type)}\"`\n : \"Unexpected token\",\n },\n { at: loc != null ? loc : this.state.startLoc },\n );\n /* eslint-enable @babel/development-internal/dry-error-messages */\n }\n\n getPluginNamesFromConfigs(pluginConfigs: Array<PluginConfig>): Array<string> {\n return pluginConfigs.map(c => {\n if (typeof c === \"string\") {\n return c;\n } else {\n return c[0];\n }\n });\n }\n\n expectPlugin(pluginConfig: PluginConfig, loc?: ?Position): true {\n if (!this.hasPlugin(pluginConfig)) {\n throw this.raiseWithData(\n loc != null ? loc : this.state.startLoc,\n { missingPlugin: this.getPluginNamesFromConfigs([pluginConfig]) },\n `This experimental syntax requires enabling the parser plugin: ${JSON.stringify(\n pluginConfig,\n )}.`,\n );\n }\n\n return true;\n }\n\n expectOnePlugin(pluginConfigs: Array<PluginConfig>): void {\n if (!pluginConfigs.some(c => this.hasPlugin(c))) {\n throw this.raiseWithData(\n this.state.startLoc,\n { missingPlugin: this.getPluginNamesFromConfigs(pluginConfigs) },\n `This experimental syntax requires enabling one of the following parser plugin(s): ${pluginConfigs\n .map(c => JSON.stringify(c))\n .join(\", \")}.`,\n );\n }\n }\n\n // tryParse will clone parser state.\n // It is expensive and should be used with cautions\n tryParse<T: Node | $ReadOnlyArray<Node>>(\n fn: (abort: (node?: T) => empty) => T,\n oldState: State = this.state.clone(),\n ):\n | TryParse<T, null, false, false, null>\n | TryParse<T | null, ParsingError, boolean, false, State>\n | TryParse<T | null, null, false, true, State> {\n const abortSignal: { node: T | null } = { node: null };\n try {\n const node = fn((node = null) => {\n abortSignal.node = node;\n throw abortSignal;\n });\n if (this.state.errors.length > oldState.errors.length) {\n const failState = this.state;\n this.state = oldState;\n // tokensLength should be preserved during error recovery mode\n // since the parser does not halt and will instead parse the\n // remaining tokens\n this.state.tokensLength = failState.tokensLength;\n return {\n node,\n error: (failState.errors[oldState.errors.length]: ParsingError),\n thrown: false,\n aborted: false,\n failState,\n };\n }\n\n return {\n node,\n error: null,\n thrown: false,\n aborted: false,\n failState: null,\n };\n } catch (error) {\n const failState = this.state;\n this.state = oldState;\n if (error instanceof SyntaxError) {\n return { node: null, error, thrown: true, aborted: false, failState };\n }\n if (error === abortSignal) {\n return {\n node: abortSignal.node,\n error: null,\n thrown: false,\n aborted: true,\n failState,\n };\n }\n\n throw error;\n }\n }\n\n checkExpressionErrors(\n refExpressionErrors: ?ExpressionErrors,\n andThrow: boolean,\n ) {\n if (!refExpressionErrors) return false;\n const {\n shorthandAssignLoc,\n doubleProtoLoc,\n privateKeyLoc,\n optionalParametersLoc,\n } = refExpressionErrors;\n\n const hasErrors =\n !!shorthandAssignLoc ||\n !!doubleProtoLoc ||\n !!optionalParametersLoc ||\n !!privateKeyLoc;\n\n if (!andThrow) {\n return hasErrors;\n }\n\n if (shorthandAssignLoc != null) {\n this.raise(Errors.InvalidCoverInitializedName, {\n at: shorthandAssignLoc,\n });\n }\n\n if (doubleProtoLoc != null) {\n this.raise(Errors.DuplicateProto, { at: doubleProtoLoc });\n }\n\n if (privateKeyLoc != null) {\n this.raise(Errors.UnexpectedPrivateField, { at: privateKeyLoc });\n }\n\n if (optionalParametersLoc != null) {\n this.unexpected(optionalParametersLoc);\n }\n }\n\n /**\n * Test if current token is a literal property name\n * https://tc39.es/ecma262/#prod-LiteralPropertyName\n * LiteralPropertyName:\n * IdentifierName\n * StringLiteral\n * NumericLiteral\n * BigIntLiteral\n */\n isLiteralPropertyName(): boolean {\n return tokenIsLiteralPropertyName(this.state.type);\n }\n\n /*\n * Test if given node is a PrivateName\n * will be overridden in ESTree plugin\n */\n isPrivateName(node: Node): boolean {\n return node.type === \"PrivateName\";\n }\n\n /*\n * Return the string value of a given private name\n * WITHOUT `#`\n * @see {@link https://tc39.es/ecma262/#sec-static-semantics-stringvalue}\n */\n getPrivateNameSV(node: Node): string {\n return node.id.name;\n }\n\n /*\n * Return whether the given node is a member/optional chain that\n * contains a private name as its property\n * It is overridden in ESTree plugin\n */\n hasPropertyAsPrivateName(node: Node): boolean {\n return (\n (node.type === \"MemberExpression\" ||\n node.type === \"OptionalMemberExpression\") &&\n this.isPrivateName(node.property)\n );\n }\n\n isOptionalChain(node: Node): boolean {\n return (\n node.type === \"OptionalMemberExpression\" ||\n node.type === \"OptionalCallExpression\"\n );\n }\n\n isObjectProperty(node: Node): boolean {\n return node.type === \"ObjectProperty\";\n }\n\n isObjectMethod(node: Node): boolean {\n return node.type === \"ObjectMethod\";\n }\n\n initializeScopes(\n inModule: boolean = this.options.sourceType === \"module\",\n ): () => void {\n // Initialize state\n const oldLabels = this.state.labels;\n this.state.labels = [];\n\n const oldExportedIdentifiers = this.exportedIdentifiers;\n this.exportedIdentifiers = new Set();\n\n // initialize scopes\n const oldInModule = this.inModule;\n this.inModule = inModule;\n\n const oldScope = this.scope;\n const ScopeHandler = this.getScopeHandler();\n this.scope = new ScopeHandler(this.raise.bind(this), this.inModule);\n\n const oldProdParam = this.prodParam;\n this.prodParam = new ProductionParameterHandler();\n\n const oldClassScope = this.classScope;\n this.classScope = new ClassScopeHandler(this.raise.bind(this));\n\n const oldExpressionScope = this.expressionScope;\n this.expressionScope = new ExpressionScopeHandler(this.raise.bind(this));\n\n return () => {\n // Revert state\n this.state.labels = oldLabels;\n this.exportedIdentifiers = oldExportedIdentifiers;\n\n // Revert scopes\n this.inModule = oldInModule;\n this.scope = oldScope;\n this.prodParam = oldProdParam;\n this.classScope = oldClassScope;\n this.expressionScope = oldExpressionScope;\n };\n }\n\n enterInitialScopes() {\n let paramFlags = PARAM;\n if (this.inModule) {\n paramFlags |= PARAM_AWAIT;\n }\n this.scope.enter(SCOPE_PROGRAM);\n this.prodParam.enter(paramFlags);\n }\n\n checkDestructuringPrivate(refExpressionErrors: ExpressionErrors) {\n const { privateKeyLoc } = refExpressionErrors;\n if (privateKeyLoc !== null) {\n this.expectPlugin(\"destructuringPrivate\", privateKeyLoc);\n }\n }\n}\n\n/**\n * The ExpressionErrors is a context struct used to track ambiguous patterns\n * When we are sure the parsed pattern is a RHS, which means it is not a pattern,\n * we will throw on this position on invalid assign syntax, otherwise it will be reset to -1\n *\n * Types of ExpressionErrors:\n *\n * - **shorthandAssignLoc**: track initializer `=` position\n * - **doubleProtoLoc**: track the duplicate `__proto__` key position\n * - **privateKey**: track private key `#p` position\n * - **optionalParametersLoc**: track the optional paramter (`?`).\n * It's only used by typescript and flow plugins\n */\nexport class ExpressionErrors {\n shorthandAssignLoc: ?Position = null;\n doubleProtoLoc: ?Position = null;\n privateKeyLoc: ?Position = null;\n optionalParametersLoc: ?Position = null;\n}\n","// @flow\n\nimport type Parser from \"./index\";\nimport UtilParser from \"./util\";\nimport { SourceLocation, type Position } from \"../util/location\";\nimport type { Comment, Node as NodeType, NodeBase } from \"../types\";\n\n// Start an AST node, attaching a start offset.\n\nclass Node implements NodeBase {\n constructor(parser: Parser, pos: number, loc: Position) {\n this.start = pos;\n this.end = 0;\n this.loc = new SourceLocation(loc);\n if (parser?.options.ranges) this.range = [pos, 0];\n if (parser?.filename) this.loc.filename = parser.filename;\n }\n\n type: string = \"\";\n declare start: number;\n declare end: number;\n declare loc: SourceLocation;\n declare range: [number, number];\n declare leadingComments: Array<Comment>;\n declare trailingComments: Array<Comment>;\n declare innerComments: Array<Comment>;\n declare extra: { [key: string]: any };\n}\nconst NodePrototype = Node.prototype;\n\nif (!process.env.BABEL_8_BREAKING) {\n // $FlowIgnore\n NodePrototype.__clone = function (): Node {\n // $FlowIgnore\n const newNode: any = new Node();\n const keys = Object.keys(this);\n for (let i = 0, length = keys.length; i < length; i++) {\n const key = keys[i];\n // Do not clone comments that are already attached to the node\n if (\n key !== \"leadingComments\" &&\n key !== \"trailingComments\" &&\n key !== \"innerComments\"\n ) {\n newNode[key] = this[key];\n }\n }\n\n return newNode;\n };\n}\n\nfunction clonePlaceholder(node: any): any {\n return cloneIdentifier(node);\n}\n\nexport function cloneIdentifier(node: any): any {\n // We don't need to clone `typeAnnotations` and `optional`: because\n // cloneIdentifier is only used in object shorthand and named import/export.\n // Neither of them allow type annotations after the identifier or optional identifier\n const { type, start, end, loc, range, extra, name } = node;\n const cloned = Object.create(NodePrototype);\n cloned.type = type;\n cloned.start = start;\n cloned.end = end;\n cloned.loc = loc;\n cloned.range = range;\n cloned.extra = extra;\n cloned.name = name;\n if (type === \"Placeholder\") {\n cloned.expectedNode = node.expectedNode;\n }\n return cloned;\n}\n\nexport function cloneStringLiteral(node: any): any {\n const { type, start, end, loc, range, extra } = node;\n if (type === \"Placeholder\") {\n return clonePlaceholder(node);\n }\n const cloned = Object.create(NodePrototype);\n cloned.type = type;\n cloned.start = start;\n cloned.end = end;\n cloned.loc = loc;\n cloned.range = range;\n if (node.raw !== undefined) {\n // estree set node.raw instead of node.extra\n cloned.raw = node.raw;\n } else {\n cloned.extra = extra;\n }\n cloned.value = node.value;\n return cloned;\n}\n\nexport class NodeUtils extends UtilParser {\n startNode<T: NodeType>(): T {\n // $FlowIgnore\n return new Node(this, this.state.start, this.state.startLoc);\n }\n\n startNodeAt<T: NodeType>(pos: number, loc: Position): T {\n // $FlowIgnore\n return new Node(this, pos, loc);\n }\n\n /** Start a new node with a previous node's location. */\n startNodeAtNode<T: NodeType>(type: NodeType): T {\n return this.startNodeAt(type.start, type.loc.start);\n }\n\n // Finish an AST node, adding `type` and `end` properties.\n\n finishNode<T: NodeType>(node: T, type: string): T {\n return this.finishNodeAt(node, type, this.state.lastTokEndLoc);\n }\n\n // Finish node at given position\n\n finishNodeAt<T: NodeType>(node: T, type: string, endLoc: Position): T {\n if (process.env.NODE_ENV !== \"production\" && node.end > 0) {\n throw new Error(\n \"Do not call finishNode*() twice on the same node.\" +\n \" Instead use resetEndLocation() or change type directly.\",\n );\n }\n node.type = type;\n node.end = endLoc.index;\n node.loc.end = endLoc;\n if (this.options.ranges) node.range[1] = endLoc.index;\n if (this.options.attachComment) this.processComment(node);\n return node;\n }\n\n resetStartLocation(node: NodeBase, start: number, startLoc: Position): void {\n node.start = start;\n node.loc.start = startLoc;\n if (this.options.ranges) node.range[0] = start;\n }\n\n resetEndLocation(\n node: NodeBase,\n endLoc?: Position = this.state.lastTokEndLoc,\n ): void {\n node.end = endLoc.index;\n node.loc.end = endLoc;\n if (this.options.ranges) node.range[1] = endLoc.index;\n }\n\n /**\n * Reset the start location of node to the start location of locationNode\n */\n resetStartLocationFromNode(node: NodeBase, locationNode: NodeBase): void {\n this.resetStartLocation(node, locationNode.start, locationNode.loc.start);\n }\n}\n","// @flow\n\n/*:: declare var invariant; */\n\n// Error messages are colocated with the plugin.\n/* eslint-disable @babel/development-internal/dry-error-messages */\n\nimport type Parser from \"../../parser\";\nimport {\n tokenIsIdentifier,\n tokenIsKeyword,\n tokenIsKeywordOrIdentifier,\n tokenIsLiteralPropertyName,\n tokenLabelName,\n tt,\n type TokenType,\n tokenIsFlowInterfaceOrTypeOrOpaque,\n} from \"../../tokenizer/types\";\nimport * as N from \"../../types\";\nimport { Position } from \"../../util/location\";\nimport { types as tc } from \"../../tokenizer/context\";\nimport * as charCodes from \"charcodes\";\nimport { isIteratorStart } from \"../../util/identifier\";\nimport FlowScopeHandler from \"./scope\";\nimport {\n type BindingTypes,\n BIND_LEXICAL,\n BIND_VAR,\n BIND_FUNCTION,\n BIND_FLOW_DECLARE_FN,\n SCOPE_ARROW,\n SCOPE_FUNCTION,\n SCOPE_OTHER,\n} from \"../../util/scopeflags\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport { Errors, makeErrorTemplates, ErrorCodes } from \"../../parser/error\";\nimport { cloneIdentifier } from \"../../parser/node\";\n\nconst reservedTypes = new Set([\n \"_\",\n \"any\",\n \"bool\",\n \"boolean\",\n \"empty\",\n \"extends\",\n \"false\",\n \"interface\",\n \"mixed\",\n \"null\",\n \"number\",\n \"static\",\n \"string\",\n \"true\",\n \"typeof\",\n \"void\",\n]);\n\n/* eslint sort-keys: \"error\" */\n// The Errors key follows https://github.com/facebook/flow/blob/master/src/parser/parse_error.ml unless it does not exist\nconst FlowErrors = makeErrorTemplates(\n {\n AmbiguousConditionalArrow:\n \"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.\",\n AmbiguousDeclareModuleKind:\n \"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.\",\n AssignReservedType: \"Cannot overwrite reserved type %0.\",\n DeclareClassElement:\n \"The `declare` modifier can only appear on class fields.\",\n DeclareClassFieldInitializer:\n \"Initializers are not allowed in fields with the `declare` modifier.\",\n DuplicateDeclareModuleExports:\n \"Duplicate `declare module.exports` statement.\",\n EnumBooleanMemberNotInitialized:\n \"Boolean enum members need to be initialized. Use either `%0 = true,` or `%0 = false,` in enum `%1`.\",\n EnumDuplicateMemberName:\n \"Enum member names need to be unique, but the name `%0` has already been used before in enum `%1`.\",\n EnumInconsistentMemberValues:\n \"Enum `%0` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.\",\n EnumInvalidExplicitType:\n \"Enum type `%1` is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.\",\n EnumInvalidExplicitTypeUnknownSupplied:\n \"Supplied enum type is not valid. Use one of `boolean`, `number`, `string`, or `symbol` in enum `%0`.\",\n EnumInvalidMemberInitializerPrimaryType:\n \"Enum `%0` has type `%2`, so the initializer of `%1` needs to be a %2 literal.\",\n EnumInvalidMemberInitializerSymbolType:\n \"Symbol enum members cannot be initialized. Use `%1,` in enum `%0`.\",\n EnumInvalidMemberInitializerUnknownType:\n \"The enum member initializer for `%1` needs to be a literal (either a boolean, number, or string) in enum `%0`.\",\n EnumInvalidMemberName:\n \"Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `%0`, consider using `%1`, in enum `%2`.\",\n EnumNumberMemberNotInitialized:\n \"Number enum members need to be initialized, e.g. `%1 = 1` in enum `%0`.\",\n EnumStringMemberInconsistentlyInitailized:\n \"String enum members need to consistently either all use initializers, or use no initializers, in enum `%0`.\",\n GetterMayNotHaveThisParam: \"A getter cannot have a `this` parameter.\",\n ImportTypeShorthandOnlyInPureImport:\n \"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.\",\n InexactInsideExact:\n \"Explicit inexact syntax cannot appear inside an explicit exact object type.\",\n InexactInsideNonObject:\n \"Explicit inexact syntax cannot appear in class or interface definitions.\",\n InexactVariance: \"Explicit inexact syntax cannot have variance.\",\n InvalidNonTypeImportInDeclareModule:\n \"Imports within a `declare module` body must always be `import type` or `import typeof`.\",\n MissingTypeParamDefault:\n \"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.\",\n NestedDeclareModule:\n \"`declare module` cannot be used inside another `declare module`.\",\n NestedFlowComment:\n \"Cannot have a flow comment inside another flow comment.\",\n PatternIsOptional:\n \"A binding pattern parameter cannot be optional in an implementation signature.\",\n SetterMayNotHaveThisParam: \"A setter cannot have a `this` parameter.\",\n SpreadVariance: \"Spread properties cannot have variance.\",\n ThisParamAnnotationRequired:\n \"A type annotation is required for the `this` parameter.\",\n ThisParamBannedInConstructor:\n \"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.\",\n ThisParamMayNotBeOptional: \"The `this` parameter cannot be optional.\",\n ThisParamMustBeFirst:\n \"The `this` parameter must be the first function parameter.\",\n ThisParamNoDefault: \"The `this` parameter may not have a default value.\",\n TypeBeforeInitializer:\n \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",\n TypeCastInPattern:\n \"The type cast expression is expected to be wrapped with parenthesis.\",\n UnexpectedExplicitInexactInObject:\n \"Explicit inexact syntax must appear at the end of an inexact object.\",\n UnexpectedReservedType: \"Unexpected reserved type %0.\",\n UnexpectedReservedUnderscore:\n \"`_` is only allowed as a type argument to call or new.\",\n UnexpectedSpaceBetweenModuloChecks:\n \"Spaces between `%` and `checks` are not allowed here.\",\n UnexpectedSpreadType:\n \"Spread operator cannot appear in class or interface definitions.\",\n UnexpectedSubtractionOperand:\n 'Unexpected token, expected \"number\" or \"bigint\".',\n UnexpectedTokenAfterTypeParameter:\n \"Expected an arrow function after this type parameter declaration.\",\n UnexpectedTypeParameterBeforeAsyncArrowFunction:\n \"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.\",\n UnsupportedDeclareExportKind:\n \"`declare export %0` is not supported. Use `%1` instead.\",\n UnsupportedStatementInDeclareModule:\n \"Only declares and type imports are allowed inside declare module.\",\n UnterminatedFlowComment: \"Unterminated flow-comment.\",\n },\n /* code */ ErrorCodes.SyntaxError,\n /* syntaxPlugin */ \"flow\",\n);\n/* eslint-disable sort-keys */\n\nfunction isEsModuleType(bodyElement: N.Node): boolean {\n return (\n bodyElement.type === \"DeclareExportAllDeclaration\" ||\n (bodyElement.type === \"DeclareExportDeclaration\" &&\n (!bodyElement.declaration ||\n (bodyElement.declaration.type !== \"TypeAlias\" &&\n bodyElement.declaration.type !== \"InterfaceDeclaration\")))\n );\n}\n\nfunction hasTypeImportKind(node: N.Node): boolean {\n return node.importKind === \"type\" || node.importKind === \"typeof\";\n}\n\nfunction isMaybeDefaultImport(type: TokenType): boolean {\n return tokenIsKeywordOrIdentifier(type) && type !== tt._from;\n}\n\nconst exportSuggestions = {\n const: \"declare export var\",\n let: \"declare export var\",\n type: \"export type\",\n interface: \"export interface\",\n};\n\n// Like Array#filter, but returns a tuple [ acceptedElements, discardedElements ]\nfunction partition<T>(\n list: T[],\n test: (T, number, T[]) => ?boolean,\n): [T[], T[]] {\n const list1 = [];\n const list2 = [];\n for (let i = 0; i < list.length; i++) {\n (test(list[i], i, list) ? list1 : list2).push(list[i]);\n }\n return [list1, list2];\n}\n\nconst FLOW_PRAGMA_REGEX = /\\*?\\s*@((?:no)?flow)\\b/;\n\n// Flow enums types\ntype EnumExplicitType = null | \"boolean\" | \"number\" | \"string\" | \"symbol\";\ntype EnumContext = {|\n enumName: string,\n explicitType: EnumExplicitType,\n memberName: string,\n|};\ntype EnumMemberInit =\n | {| type: \"number\", loc: Position, value: N.Node |}\n | {| type: \"string\", loc: Position, value: N.Node |}\n | {| type: \"boolean\", loc: Position, value: N.Node |}\n | {| type: \"invalid\", loc: Position |}\n | {| type: \"none\", loc: Position |};\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n // The value of the @flow/@noflow pragma. Initially undefined, transitions\n // to \"@flow\" or \"@noflow\" if we see a pragma. Transitions to null if we are\n // past the initial comment.\n flowPragma: void | null | \"flow\" | \"noflow\" = undefined;\n\n getScopeHandler(): Class<FlowScopeHandler> {\n return FlowScopeHandler;\n }\n\n shouldParseTypes(): boolean {\n return this.getPluginOption(\"flow\", \"all\") || this.flowPragma === \"flow\";\n }\n\n shouldParseEnums(): boolean {\n return !!this.getPluginOption(\"flow\", \"enums\");\n }\n\n finishToken(type: TokenType, val: any): void {\n if (\n type !== tt.string &&\n type !== tt.semi &&\n type !== tt.interpreterDirective\n ) {\n if (this.flowPragma === undefined) {\n this.flowPragma = null;\n }\n }\n return super.finishToken(type, val);\n }\n\n addComment(comment: N.Comment): void {\n if (this.flowPragma === undefined) {\n // Try to parse a flow pragma.\n const matches = FLOW_PRAGMA_REGEX.exec(comment.value);\n if (!matches) {\n // do nothing\n } else if (matches[1] === \"flow\") {\n this.flowPragma = \"flow\";\n } else if (matches[1] === \"noflow\") {\n this.flowPragma = \"noflow\";\n } else {\n throw new Error(\"Unexpected flow pragma\");\n }\n }\n return super.addComment(comment);\n }\n\n flowParseTypeInitialiser(tok?: TokenType): N.FlowType {\n const oldInType = this.state.inType;\n this.state.inType = true;\n this.expect(tok || tt.colon);\n\n const type = this.flowParseType();\n this.state.inType = oldInType;\n return type;\n }\n\n flowParsePredicate(): N.FlowType {\n const node = this.startNode();\n const moduloLoc = this.state.startLoc;\n this.next(); // eat `%`\n this.expectContextual(tt._checks);\n // Force '%' and 'checks' to be adjacent\n if (this.state.lastTokStart > moduloLoc.index + 1) {\n this.raise(FlowErrors.UnexpectedSpaceBetweenModuloChecks, {\n at: moduloLoc,\n });\n }\n if (this.eat(tt.parenL)) {\n node.value = this.parseExpression();\n this.expect(tt.parenR);\n return this.finishNode(node, \"DeclaredPredicate\");\n } else {\n return this.finishNode(node, \"InferredPredicate\");\n }\n }\n\n flowParseTypeAndPredicateInitialiser(): [?N.FlowType, ?N.FlowPredicate] {\n const oldInType = this.state.inType;\n this.state.inType = true;\n this.expect(tt.colon);\n let type = null;\n let predicate = null;\n if (this.match(tt.modulo)) {\n this.state.inType = oldInType;\n predicate = this.flowParsePredicate();\n } else {\n type = this.flowParseType();\n this.state.inType = oldInType;\n if (this.match(tt.modulo)) {\n predicate = this.flowParsePredicate();\n }\n }\n return [type, predicate];\n }\n\n flowParseDeclareClass(node: N.FlowDeclareClass): N.FlowDeclareClass {\n this.next();\n this.flowParseInterfaceish(node, /*isClass*/ true);\n return this.finishNode(node, \"DeclareClass\");\n }\n\n flowParseDeclareFunction(\n node: N.FlowDeclareFunction,\n ): N.FlowDeclareFunction {\n this.next();\n\n const id = (node.id = this.parseIdentifier());\n\n const typeNode = this.startNode();\n const typeContainer = this.startNode();\n\n if (this.match(tt.lt)) {\n typeNode.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n typeNode.typeParameters = null;\n }\n\n this.expect(tt.parenL);\n const tmp = this.flowParseFunctionTypeParams();\n typeNode.params = tmp.params;\n typeNode.rest = tmp.rest;\n typeNode.this = tmp._this;\n this.expect(tt.parenR);\n\n [\n // $FlowFixMe (destructuring not supported yet)\n typeNode.returnType,\n // $FlowFixMe (destructuring not supported yet)\n node.predicate,\n ] = this.flowParseTypeAndPredicateInitialiser();\n\n typeContainer.typeAnnotation = this.finishNode(\n typeNode,\n \"FunctionTypeAnnotation\",\n );\n\n id.typeAnnotation = this.finishNode(typeContainer, \"TypeAnnotation\");\n\n this.resetEndLocation(id);\n this.semicolon();\n\n this.scope.declareName(\n node.id.name,\n BIND_FLOW_DECLARE_FN,\n node.id.loc.start,\n );\n\n return this.finishNode(node, \"DeclareFunction\");\n }\n\n flowParseDeclare(\n node: N.FlowDeclare,\n insideModule?: boolean,\n ): N.FlowDeclare {\n if (this.match(tt._class)) {\n return this.flowParseDeclareClass(node);\n } else if (this.match(tt._function)) {\n return this.flowParseDeclareFunction(node);\n } else if (this.match(tt._var)) {\n return this.flowParseDeclareVariable(node);\n } else if (this.eatContextual(tt._module)) {\n if (this.match(tt.dot)) {\n return this.flowParseDeclareModuleExports(node);\n } else {\n if (insideModule) {\n this.raise(FlowErrors.NestedDeclareModule, {\n at: this.state.lastTokStartLoc,\n });\n }\n return this.flowParseDeclareModule(node);\n }\n } else if (this.isContextual(tt._type)) {\n return this.flowParseDeclareTypeAlias(node);\n } else if (this.isContextual(tt._opaque)) {\n return this.flowParseDeclareOpaqueType(node);\n } else if (this.isContextual(tt._interface)) {\n return this.flowParseDeclareInterface(node);\n } else if (this.match(tt._export)) {\n return this.flowParseDeclareExportDeclaration(node, insideModule);\n } else {\n throw this.unexpected();\n }\n }\n\n flowParseDeclareVariable(\n node: N.FlowDeclareVariable,\n ): N.FlowDeclareVariable {\n this.next();\n node.id = this.flowParseTypeAnnotatableIdentifier(\n /*allowPrimitiveOverride*/ true,\n );\n this.scope.declareName(node.id.name, BIND_VAR, node.id.loc.start);\n this.semicolon();\n return this.finishNode(node, \"DeclareVariable\");\n }\n\n flowParseDeclareModule(node: N.FlowDeclareModule): N.FlowDeclareModule {\n this.scope.enter(SCOPE_OTHER);\n\n if (this.match(tt.string)) {\n node.id = this.parseExprAtom();\n } else {\n node.id = this.parseIdentifier();\n }\n\n const bodyNode = (node.body = this.startNode());\n const body = (bodyNode.body = []);\n this.expect(tt.braceL);\n while (!this.match(tt.braceR)) {\n let bodyNode = this.startNode();\n\n if (this.match(tt._import)) {\n this.next();\n if (!this.isContextual(tt._type) && !this.match(tt._typeof)) {\n this.raise(FlowErrors.InvalidNonTypeImportInDeclareModule, {\n at: this.state.lastTokStartLoc,\n });\n }\n this.parseImport(bodyNode);\n } else {\n this.expectContextual(\n tt._declare,\n FlowErrors.UnsupportedStatementInDeclareModule,\n );\n\n bodyNode = this.flowParseDeclare(bodyNode, true);\n }\n\n body.push(bodyNode);\n }\n\n this.scope.exit();\n\n this.expect(tt.braceR);\n\n this.finishNode(bodyNode, \"BlockStatement\");\n\n let kind = null;\n let hasModuleExport = false;\n body.forEach(bodyElement => {\n if (isEsModuleType(bodyElement)) {\n if (kind === \"CommonJS\") {\n this.raise(FlowErrors.AmbiguousDeclareModuleKind, {\n node: bodyElement,\n });\n }\n kind = \"ES\";\n } else if (bodyElement.type === \"DeclareModuleExports\") {\n if (hasModuleExport) {\n this.raise(FlowErrors.DuplicateDeclareModuleExports, {\n node: bodyElement,\n });\n }\n if (kind === \"ES\") {\n this.raise(FlowErrors.AmbiguousDeclareModuleKind, {\n node: bodyElement,\n });\n }\n kind = \"CommonJS\";\n hasModuleExport = true;\n }\n });\n\n node.kind = kind || \"CommonJS\";\n return this.finishNode(node, \"DeclareModule\");\n }\n\n flowParseDeclareExportDeclaration(\n node: N.FlowDeclareExportDeclaration,\n insideModule: ?boolean,\n ): N.FlowDeclareExportDeclaration {\n this.expect(tt._export);\n\n if (this.eat(tt._default)) {\n if (this.match(tt._function) || this.match(tt._class)) {\n // declare export default class ...\n // declare export default function ...\n node.declaration = this.flowParseDeclare(this.startNode());\n } else {\n // declare export default [type];\n node.declaration = this.flowParseType();\n this.semicolon();\n }\n node.default = true;\n\n return this.finishNode(node, \"DeclareExportDeclaration\");\n } else {\n if (\n this.match(tt._const) ||\n this.isLet() ||\n ((this.isContextual(tt._type) || this.isContextual(tt._interface)) &&\n !insideModule)\n ) {\n const label = this.state.value;\n const suggestion = exportSuggestions[label];\n\n throw this.raise(\n FlowErrors.UnsupportedDeclareExportKind,\n { at: this.state.startLoc },\n label,\n suggestion,\n );\n }\n\n if (\n this.match(tt._var) || // declare export var ...\n this.match(tt._function) || // declare export function ...\n this.match(tt._class) || // declare export class ...\n this.isContextual(tt._opaque) // declare export opaque ..\n ) {\n node.declaration = this.flowParseDeclare(this.startNode());\n node.default = false;\n\n return this.finishNode(node, \"DeclareExportDeclaration\");\n } else if (\n this.match(tt.star) || // declare export * from ''\n this.match(tt.braceL) || // declare export {} ...\n this.isContextual(tt._interface) || // declare export interface ...\n this.isContextual(tt._type) || // declare export type ...\n this.isContextual(tt._opaque) // declare export opaque type ...\n ) {\n node = this.parseExport(node);\n if (node.type === \"ExportNamedDeclaration\") {\n // flow does not support the ExportNamedDeclaration\n // $FlowIgnore\n node.type = \"ExportDeclaration\";\n // $FlowFixMe\n node.default = false;\n delete node.exportKind;\n }\n\n // $FlowIgnore\n node.type = \"Declare\" + node.type;\n\n return node;\n }\n }\n\n throw this.unexpected();\n }\n\n flowParseDeclareModuleExports(\n node: N.FlowDeclareModuleExports,\n ): N.FlowDeclareModuleExports {\n this.next();\n this.expectContextual(tt._exports);\n node.typeAnnotation = this.flowParseTypeAnnotation();\n this.semicolon();\n\n return this.finishNode(node, \"DeclareModuleExports\");\n }\n\n flowParseDeclareTypeAlias(\n node: N.FlowDeclareTypeAlias,\n ): N.FlowDeclareTypeAlias {\n this.next();\n this.flowParseTypeAlias(node);\n // Don't do finishNode as we don't want to process comments twice\n node.type = \"DeclareTypeAlias\";\n return node;\n }\n\n flowParseDeclareOpaqueType(\n node: N.FlowDeclareOpaqueType,\n ): N.FlowDeclareOpaqueType {\n this.next();\n this.flowParseOpaqueType(node, true);\n // Don't do finishNode as we don't want to process comments twice\n node.type = \"DeclareOpaqueType\";\n return node;\n }\n\n flowParseDeclareInterface(\n node: N.FlowDeclareInterface,\n ): N.FlowDeclareInterface {\n this.next();\n this.flowParseInterfaceish(node);\n return this.finishNode(node, \"DeclareInterface\");\n }\n\n // Interfaces\n\n flowParseInterfaceish(\n node: N.FlowDeclare,\n isClass?: boolean = false,\n ): void {\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ !isClass,\n /* declaration */ true,\n );\n\n this.scope.declareName(\n node.id.name,\n isClass ? BIND_FUNCTION : BIND_LEXICAL,\n node.id.loc.start,\n );\n\n if (this.match(tt.lt)) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n node.typeParameters = null;\n }\n\n node.extends = [];\n node.implements = [];\n node.mixins = [];\n\n if (this.eat(tt._extends)) {\n do {\n node.extends.push(this.flowParseInterfaceExtends());\n } while (!isClass && this.eat(tt.comma));\n }\n\n if (this.isContextual(tt._mixins)) {\n this.next();\n do {\n node.mixins.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n if (this.isContextual(tt._implements)) {\n this.next();\n do {\n node.implements.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n node.body = this.flowParseObjectType({\n allowStatic: isClass,\n allowExact: false,\n allowSpread: false,\n allowProto: isClass,\n allowInexact: false,\n });\n }\n\n flowParseInterfaceExtends(): N.FlowInterfaceExtends {\n const node = this.startNode();\n\n node.id = this.flowParseQualifiedTypeIdentifier();\n if (this.match(tt.lt)) {\n node.typeParameters = this.flowParseTypeParameterInstantiation();\n } else {\n node.typeParameters = null;\n }\n\n return this.finishNode(node, \"InterfaceExtends\");\n }\n\n flowParseInterface(node: N.FlowInterface): N.FlowInterface {\n this.flowParseInterfaceish(node);\n return this.finishNode(node, \"InterfaceDeclaration\");\n }\n\n checkNotUnderscore(word: string) {\n if (word === \"_\") {\n this.raise(FlowErrors.UnexpectedReservedUnderscore, {\n at: this.state.startLoc,\n });\n }\n }\n\n checkReservedType(word: string, startLoc: Position, declaration?: boolean) {\n if (!reservedTypes.has(word)) return;\n\n this.raise(\n declaration\n ? FlowErrors.AssignReservedType\n : FlowErrors.UnexpectedReservedType,\n { at: startLoc },\n word,\n );\n }\n\n flowParseRestrictedIdentifier(\n liberal?: boolean,\n declaration?: boolean,\n ): N.Identifier {\n this.checkReservedType(\n this.state.value,\n this.state.startLoc,\n declaration,\n );\n return this.parseIdentifier(liberal);\n }\n\n // Type aliases\n\n flowParseTypeAlias(node: N.FlowTypeAlias): N.FlowTypeAlias {\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ false,\n /* declaration */ true,\n );\n this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.loc.start);\n\n if (this.match(tt.lt)) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n node.typeParameters = null;\n }\n\n node.right = this.flowParseTypeInitialiser(tt.eq);\n this.semicolon();\n\n return this.finishNode(node, \"TypeAlias\");\n }\n\n flowParseOpaqueType(\n node: N.FlowOpaqueType,\n declare: boolean,\n ): N.FlowOpaqueType {\n this.expectContextual(tt._type);\n node.id = this.flowParseRestrictedIdentifier(\n /* liberal */ true,\n /* declaration */ true,\n );\n this.scope.declareName(node.id.name, BIND_LEXICAL, node.id.loc.start);\n\n if (this.match(tt.lt)) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n } else {\n node.typeParameters = null;\n }\n\n // Parse the supertype\n node.supertype = null;\n if (this.match(tt.colon)) {\n node.supertype = this.flowParseTypeInitialiser(tt.colon);\n }\n\n node.impltype = null;\n if (!declare) {\n node.impltype = this.flowParseTypeInitialiser(tt.eq);\n }\n this.semicolon();\n\n return this.finishNode(node, \"OpaqueType\");\n }\n\n // Type annotations\n\n flowParseTypeParameter(requireDefault?: boolean = false): N.TypeParameter {\n const nodeStartLoc = this.state.startLoc;\n\n const node = this.startNode();\n\n const variance = this.flowParseVariance();\n\n const ident = this.flowParseTypeAnnotatableIdentifier();\n node.name = ident.name;\n node.variance = variance;\n node.bound = ident.typeAnnotation;\n\n if (this.match(tt.eq)) {\n this.eat(tt.eq);\n node.default = this.flowParseType();\n } else {\n if (requireDefault) {\n this.raise(FlowErrors.MissingTypeParamDefault, { at: nodeStartLoc });\n }\n }\n\n return this.finishNode(node, \"TypeParameter\");\n }\n\n flowParseTypeParameterDeclaration(): N.TypeParameterDeclaration {\n const oldInType = this.state.inType;\n const node = this.startNode();\n node.params = [];\n\n this.state.inType = true;\n\n // istanbul ignore else: this condition is already checked at all call sites\n if (this.match(tt.lt) || this.match(tt.jsxTagStart)) {\n this.next();\n } else {\n this.unexpected();\n }\n\n let defaultRequired = false;\n\n do {\n const typeParameter = this.flowParseTypeParameter(defaultRequired);\n\n node.params.push(typeParameter);\n\n if (typeParameter.default) {\n defaultRequired = true;\n }\n\n if (!this.match(tt.gt)) {\n this.expect(tt.comma);\n }\n } while (!this.match(tt.gt));\n this.expect(tt.gt);\n\n this.state.inType = oldInType;\n\n return this.finishNode(node, \"TypeParameterDeclaration\");\n }\n\n flowParseTypeParameterInstantiation(): N.TypeParameterInstantiation {\n const node = this.startNode();\n const oldInType = this.state.inType;\n node.params = [];\n\n this.state.inType = true;\n\n this.expect(tt.lt);\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = false;\n while (!this.match(tt.gt)) {\n node.params.push(this.flowParseType());\n if (!this.match(tt.gt)) {\n this.expect(tt.comma);\n }\n }\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n this.expect(tt.gt);\n\n this.state.inType = oldInType;\n\n return this.finishNode(node, \"TypeParameterInstantiation\");\n }\n\n flowParseTypeParameterInstantiationCallOrNew(): N.TypeParameterInstantiation {\n const node = this.startNode();\n const oldInType = this.state.inType;\n node.params = [];\n\n this.state.inType = true;\n\n this.expect(tt.lt);\n while (!this.match(tt.gt)) {\n node.params.push(this.flowParseTypeOrImplicitInstantiation());\n if (!this.match(tt.gt)) {\n this.expect(tt.comma);\n }\n }\n this.expect(tt.gt);\n\n this.state.inType = oldInType;\n\n return this.finishNode(node, \"TypeParameterInstantiation\");\n }\n\n flowParseInterfaceType(): N.FlowInterfaceType {\n const node = this.startNode();\n this.expectContextual(tt._interface);\n\n node.extends = [];\n if (this.eat(tt._extends)) {\n do {\n node.extends.push(this.flowParseInterfaceExtends());\n } while (this.eat(tt.comma));\n }\n\n node.body = this.flowParseObjectType({\n allowStatic: false,\n allowExact: false,\n allowSpread: false,\n allowProto: false,\n allowInexact: false,\n });\n\n return this.finishNode(node, \"InterfaceTypeAnnotation\");\n }\n\n flowParseObjectPropertyKey(): N.Expression {\n return this.match(tt.num) || this.match(tt.string)\n ? this.parseExprAtom()\n : this.parseIdentifier(true);\n }\n\n flowParseObjectTypeIndexer(\n node: N.FlowObjectTypeIndexer,\n isStatic: boolean,\n variance: ?N.FlowVariance,\n ): N.FlowObjectTypeIndexer {\n node.static = isStatic;\n\n // Note: bracketL has already been consumed\n if (this.lookahead().type === tt.colon) {\n node.id = this.flowParseObjectPropertyKey();\n node.key = this.flowParseTypeInitialiser();\n } else {\n node.id = null;\n node.key = this.flowParseType();\n }\n this.expect(tt.bracketR);\n node.value = this.flowParseTypeInitialiser();\n node.variance = variance;\n\n return this.finishNode(node, \"ObjectTypeIndexer\");\n }\n\n flowParseObjectTypeInternalSlot(\n node: N.FlowObjectTypeInternalSlot,\n isStatic: boolean,\n ): N.FlowObjectTypeInternalSlot {\n node.static = isStatic;\n // Note: both bracketL have already been consumed\n node.id = this.flowParseObjectPropertyKey();\n this.expect(tt.bracketR);\n this.expect(tt.bracketR);\n if (this.match(tt.lt) || this.match(tt.parenL)) {\n node.method = true;\n node.optional = false;\n node.value = this.flowParseObjectTypeMethodish(\n this.startNodeAt(node.start, node.loc.start),\n );\n } else {\n node.method = false;\n if (this.eat(tt.question)) {\n node.optional = true;\n }\n node.value = this.flowParseTypeInitialiser();\n }\n return this.finishNode(node, \"ObjectTypeInternalSlot\");\n }\n\n flowParseObjectTypeMethodish(\n node: N.FlowFunctionTypeAnnotation,\n ): N.FlowFunctionTypeAnnotation {\n node.params = [];\n node.rest = null;\n node.typeParameters = null;\n node.this = null;\n\n if (this.match(tt.lt)) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n\n this.expect(tt.parenL);\n if (this.match(tt._this)) {\n node.this = this.flowParseFunctionTypeParam(/* first */ true);\n // match Flow parser behavior\n node.this.name = null;\n if (!this.match(tt.parenR)) {\n this.expect(tt.comma);\n }\n }\n while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n node.params.push(this.flowParseFunctionTypeParam(false));\n if (!this.match(tt.parenR)) {\n this.expect(tt.comma);\n }\n }\n\n if (this.eat(tt.ellipsis)) {\n node.rest = this.flowParseFunctionTypeParam(false);\n }\n this.expect(tt.parenR);\n node.returnType = this.flowParseTypeInitialiser();\n\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n }\n\n flowParseObjectTypeCallProperty(\n node: N.FlowObjectTypeCallProperty,\n isStatic: boolean,\n ): N.FlowObjectTypeCallProperty {\n const valueNode = this.startNode();\n node.static = isStatic;\n node.value = this.flowParseObjectTypeMethodish(valueNode);\n return this.finishNode(node, \"ObjectTypeCallProperty\");\n }\n\n flowParseObjectType({\n allowStatic,\n allowExact,\n allowSpread,\n allowProto,\n allowInexact,\n }: {\n allowStatic: boolean,\n allowExact: boolean,\n allowSpread: boolean,\n allowProto: boolean,\n allowInexact: boolean,\n }): N.FlowObjectTypeAnnotation {\n const oldInType = this.state.inType;\n this.state.inType = true;\n\n const nodeStart = this.startNode();\n\n nodeStart.callProperties = [];\n nodeStart.properties = [];\n nodeStart.indexers = [];\n nodeStart.internalSlots = [];\n\n let endDelim;\n let exact;\n let inexact = false;\n if (allowExact && this.match(tt.braceBarL)) {\n this.expect(tt.braceBarL);\n endDelim = tt.braceBarR;\n exact = true;\n } else {\n this.expect(tt.braceL);\n endDelim = tt.braceR;\n exact = false;\n }\n\n nodeStart.exact = exact;\n\n while (!this.match(endDelim)) {\n let isStatic = false;\n let protoStartLoc: ?Position = null;\n let inexactStartLoc: ?Position = null;\n const node = this.startNode();\n\n if (allowProto && this.isContextual(tt._proto)) {\n const lookahead = this.lookahead();\n\n if (lookahead.type !== tt.colon && lookahead.type !== tt.question) {\n this.next();\n protoStartLoc = this.state.startLoc;\n allowStatic = false;\n }\n }\n\n if (allowStatic && this.isContextual(tt._static)) {\n const lookahead = this.lookahead();\n\n // static is a valid identifier name\n if (lookahead.type !== tt.colon && lookahead.type !== tt.question) {\n this.next();\n isStatic = true;\n }\n }\n\n const variance = this.flowParseVariance();\n\n if (this.eat(tt.bracketL)) {\n if (protoStartLoc != null) {\n this.unexpected(protoStartLoc);\n }\n if (this.eat(tt.bracketL)) {\n if (variance) {\n this.unexpected(variance.loc.start);\n }\n nodeStart.internalSlots.push(\n this.flowParseObjectTypeInternalSlot(node, isStatic),\n );\n } else {\n nodeStart.indexers.push(\n this.flowParseObjectTypeIndexer(node, isStatic, variance),\n );\n }\n } else if (this.match(tt.parenL) || this.match(tt.lt)) {\n if (protoStartLoc != null) {\n this.unexpected(protoStartLoc);\n }\n if (variance) {\n this.unexpected(variance.loc.start);\n }\n nodeStart.callProperties.push(\n this.flowParseObjectTypeCallProperty(node, isStatic),\n );\n } else {\n let kind = \"init\";\n\n if (this.isContextual(tt._get) || this.isContextual(tt._set)) {\n const lookahead = this.lookahead();\n if (tokenIsLiteralPropertyName(lookahead.type)) {\n kind = this.state.value;\n this.next();\n }\n }\n\n const propOrInexact = this.flowParseObjectTypeProperty(\n node,\n isStatic,\n protoStartLoc,\n variance,\n kind,\n allowSpread,\n allowInexact ?? !exact,\n );\n\n if (propOrInexact === null) {\n inexact = true;\n inexactStartLoc = this.state.lastTokStartLoc;\n } else {\n nodeStart.properties.push(propOrInexact);\n }\n }\n\n this.flowObjectTypeSemicolon();\n\n if (\n inexactStartLoc &&\n !this.match(tt.braceR) &&\n !this.match(tt.braceBarR)\n ) {\n this.raise(FlowErrors.UnexpectedExplicitInexactInObject, {\n at: inexactStartLoc,\n });\n }\n }\n\n this.expect(endDelim);\n\n /* The inexact flag should only be added on ObjectTypeAnnotations that\n * are not the body of an interface, declare interface, or declare class.\n * Since spreads are only allowed in object types, checking that is\n * sufficient here.\n */\n if (allowSpread) {\n nodeStart.inexact = inexact;\n }\n\n const out = this.finishNode(nodeStart, \"ObjectTypeAnnotation\");\n\n this.state.inType = oldInType;\n\n return out;\n }\n\n flowParseObjectTypeProperty(\n node: N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty,\n isStatic: boolean,\n protoStartLoc: ?Position,\n variance: ?N.FlowVariance,\n kind: string,\n allowSpread: boolean,\n allowInexact: boolean,\n ): (N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty) | null {\n if (this.eat(tt.ellipsis)) {\n const isInexactToken =\n this.match(tt.comma) ||\n this.match(tt.semi) ||\n this.match(tt.braceR) ||\n this.match(tt.braceBarR);\n\n if (isInexactToken) {\n if (!allowSpread) {\n this.raise(FlowErrors.InexactInsideNonObject, {\n at: this.state.lastTokStartLoc,\n });\n } else if (!allowInexact) {\n this.raise(FlowErrors.InexactInsideExact, {\n at: this.state.lastTokStartLoc,\n });\n }\n if (variance) {\n this.raise(FlowErrors.InexactVariance, { node: variance });\n }\n\n return null;\n }\n\n if (!allowSpread) {\n this.raise(FlowErrors.UnexpectedSpreadType, {\n at: this.state.lastTokStartLoc,\n });\n }\n if (protoStartLoc != null) {\n this.unexpected(protoStartLoc);\n }\n if (variance) {\n this.raise(FlowErrors.SpreadVariance, { node: variance });\n }\n\n node.argument = this.flowParseType();\n return this.finishNode(node, \"ObjectTypeSpreadProperty\");\n } else {\n node.key = this.flowParseObjectPropertyKey();\n node.static = isStatic;\n node.proto = protoStartLoc != null;\n node.kind = kind;\n\n let optional = false;\n if (this.match(tt.lt) || this.match(tt.parenL)) {\n // This is a method property\n node.method = true;\n\n if (protoStartLoc != null) {\n this.unexpected(protoStartLoc);\n }\n if (variance) {\n this.unexpected(variance.loc.start);\n }\n\n node.value = this.flowParseObjectTypeMethodish(\n this.startNodeAt(node.start, node.loc.start),\n );\n if (kind === \"get\" || kind === \"set\") {\n this.flowCheckGetterSetterParams(node);\n }\n /** Declared classes/interfaces do not allow spread */\n if (\n !allowSpread &&\n node.key.name === \"constructor\" &&\n node.value.this\n ) {\n this.raise(FlowErrors.ThisParamBannedInConstructor, {\n node: node.value.this,\n });\n }\n } else {\n if (kind !== \"init\") this.unexpected();\n\n node.method = false;\n\n if (this.eat(tt.question)) {\n optional = true;\n }\n node.value = this.flowParseTypeInitialiser();\n node.variance = variance;\n }\n\n node.optional = optional;\n\n return this.finishNode(node, \"ObjectTypeProperty\");\n }\n }\n\n // This is similar to checkGetterSetterParams, but as\n // @babel/parser uses non estree properties we cannot reuse it here\n flowCheckGetterSetterParams(\n property: N.FlowObjectTypeProperty | N.FlowObjectTypeSpreadProperty,\n ): void {\n const paramCount = property.kind === \"get\" ? 0 : 1;\n const length =\n property.value.params.length + (property.value.rest ? 1 : 0);\n\n if (property.value.this) {\n this.raise(\n property.kind === \"get\"\n ? FlowErrors.GetterMayNotHaveThisParam\n : FlowErrors.SetterMayNotHaveThisParam,\n { node: property.value.this },\n );\n }\n\n if (length !== paramCount) {\n this.raise(\n property.kind === \"get\"\n ? Errors.BadGetterArity\n : Errors.BadSetterArity,\n { node: property },\n );\n }\n\n if (property.kind === \"set\" && property.value.rest) {\n this.raise(Errors.BadSetterRestParameter, { node: property });\n }\n }\n\n flowObjectTypeSemicolon(): void {\n if (\n !this.eat(tt.semi) &&\n !this.eat(tt.comma) &&\n !this.match(tt.braceR) &&\n !this.match(tt.braceBarR)\n ) {\n this.unexpected();\n }\n }\n\n flowParseQualifiedTypeIdentifier(\n startPos?: number,\n startLoc?: Position,\n id?: N.Identifier,\n ): N.FlowQualifiedTypeIdentifier {\n startPos = startPos || this.state.start;\n startLoc = startLoc || this.state.startLoc;\n let node = id || this.flowParseRestrictedIdentifier(true);\n\n while (this.eat(tt.dot)) {\n const node2 = this.startNodeAt(startPos, startLoc);\n node2.qualification = node;\n node2.id = this.flowParseRestrictedIdentifier(true);\n node = this.finishNode(node2, \"QualifiedTypeIdentifier\");\n }\n\n return node;\n }\n\n flowParseGenericType(\n startPos: number,\n startLoc: Position,\n id: N.Identifier,\n ): N.FlowGenericTypeAnnotation {\n const node = this.startNodeAt(startPos, startLoc);\n\n node.typeParameters = null;\n node.id = this.flowParseQualifiedTypeIdentifier(startPos, startLoc, id);\n\n if (this.match(tt.lt)) {\n node.typeParameters = this.flowParseTypeParameterInstantiation();\n }\n\n return this.finishNode(node, \"GenericTypeAnnotation\");\n }\n\n flowParseTypeofType(): N.FlowTypeofTypeAnnotation {\n const node = this.startNode();\n this.expect(tt._typeof);\n node.argument = this.flowParsePrimaryType();\n return this.finishNode(node, \"TypeofTypeAnnotation\");\n }\n\n flowParseTupleType(): N.FlowTupleTypeAnnotation {\n const node = this.startNode();\n node.types = [];\n this.expect(tt.bracketL);\n // We allow trailing commas\n while (this.state.pos < this.length && !this.match(tt.bracketR)) {\n node.types.push(this.flowParseType());\n if (this.match(tt.bracketR)) break;\n this.expect(tt.comma);\n }\n this.expect(tt.bracketR);\n return this.finishNode(node, \"TupleTypeAnnotation\");\n }\n\n flowParseFunctionTypeParam(first: boolean): N.FlowFunctionTypeParam {\n let name = null;\n let optional = false;\n let typeAnnotation = null;\n const node = this.startNode();\n const lh = this.lookahead();\n const isThis = this.state.type === tt._this;\n\n if (lh.type === tt.colon || lh.type === tt.question) {\n if (isThis && !first) {\n this.raise(FlowErrors.ThisParamMustBeFirst, { node });\n }\n name = this.parseIdentifier(isThis);\n if (this.eat(tt.question)) {\n optional = true;\n if (isThis) {\n this.raise(FlowErrors.ThisParamMayNotBeOptional, { node });\n }\n }\n typeAnnotation = this.flowParseTypeInitialiser();\n } else {\n typeAnnotation = this.flowParseType();\n }\n node.name = name;\n node.optional = optional;\n node.typeAnnotation = typeAnnotation;\n return this.finishNode(node, \"FunctionTypeParam\");\n }\n\n reinterpretTypeAsFunctionTypeParam(\n type: N.FlowType,\n ): N.FlowFunctionTypeParam {\n const node = this.startNodeAt(type.start, type.loc.start);\n node.name = null;\n node.optional = false;\n node.typeAnnotation = type;\n return this.finishNode(node, \"FunctionTypeParam\");\n }\n\n flowParseFunctionTypeParams(params: N.FlowFunctionTypeParam[] = []): {\n params: N.FlowFunctionTypeParam[],\n rest: ?N.FlowFunctionTypeParam,\n _this: ?N.FlowFunctionTypeParam,\n } {\n let rest: ?N.FlowFunctionTypeParam = null;\n let _this: ?N.FlowFunctionTypeParam = null;\n if (this.match(tt._this)) {\n _this = this.flowParseFunctionTypeParam(/* first */ true);\n // match Flow parser behavior\n _this.name = null;\n if (!this.match(tt.parenR)) {\n this.expect(tt.comma);\n }\n }\n while (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n params.push(this.flowParseFunctionTypeParam(false));\n if (!this.match(tt.parenR)) {\n this.expect(tt.comma);\n }\n }\n if (this.eat(tt.ellipsis)) {\n rest = this.flowParseFunctionTypeParam(false);\n }\n return { params, rest, _this };\n }\n\n flowIdentToTypeAnnotation(\n startPos: number,\n startLoc: Position,\n node: N.FlowTypeAnnotation,\n id: N.Identifier,\n ): N.FlowTypeAnnotation {\n switch (id.name) {\n case \"any\":\n return this.finishNode(node, \"AnyTypeAnnotation\");\n\n case \"bool\":\n case \"boolean\":\n return this.finishNode(node, \"BooleanTypeAnnotation\");\n\n case \"mixed\":\n return this.finishNode(node, \"MixedTypeAnnotation\");\n\n case \"empty\":\n return this.finishNode(node, \"EmptyTypeAnnotation\");\n\n case \"number\":\n return this.finishNode(node, \"NumberTypeAnnotation\");\n\n case \"string\":\n return this.finishNode(node, \"StringTypeAnnotation\");\n\n case \"symbol\":\n return this.finishNode(node, \"SymbolTypeAnnotation\");\n\n default:\n this.checkNotUnderscore(id.name);\n return this.flowParseGenericType(startPos, startLoc, id);\n }\n }\n\n // The parsing of types roughly parallels the parsing of expressions, and\n // primary types are kind of like primary expressions...they're the\n // primitives with which other types are constructed.\n flowParsePrimaryType(): N.FlowTypeAnnotation {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const node = this.startNode();\n let tmp;\n let type;\n let isGroupedType = false;\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n\n switch (this.state.type) {\n case tt.braceL:\n return this.flowParseObjectType({\n allowStatic: false,\n allowExact: false,\n allowSpread: true,\n allowProto: false,\n allowInexact: true,\n });\n\n case tt.braceBarL:\n return this.flowParseObjectType({\n allowStatic: false,\n allowExact: true,\n allowSpread: true,\n allowProto: false,\n allowInexact: false,\n });\n\n case tt.bracketL:\n this.state.noAnonFunctionType = false;\n type = this.flowParseTupleType();\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n return type;\n\n case tt.lt:\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n this.expect(tt.parenL);\n tmp = this.flowParseFunctionTypeParams();\n node.params = tmp.params;\n node.rest = tmp.rest;\n node.this = tmp._this;\n this.expect(tt.parenR);\n\n this.expect(tt.arrow);\n\n node.returnType = this.flowParseType();\n\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n\n case tt.parenL:\n this.next();\n\n // Check to see if this is actually a grouped type\n if (!this.match(tt.parenR) && !this.match(tt.ellipsis)) {\n if (tokenIsIdentifier(this.state.type) || this.match(tt._this)) {\n const token = this.lookahead().type;\n isGroupedType = token !== tt.question && token !== tt.colon;\n } else {\n isGroupedType = true;\n }\n }\n\n if (isGroupedType) {\n this.state.noAnonFunctionType = false;\n type = this.flowParseType();\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n\n // A `,` or a `) =>` means this is an anonymous function type\n if (\n this.state.noAnonFunctionType ||\n !(\n this.match(tt.comma) ||\n (this.match(tt.parenR) && this.lookahead().type === tt.arrow)\n )\n ) {\n this.expect(tt.parenR);\n return type;\n } else {\n // Eat a comma if there is one\n this.eat(tt.comma);\n }\n }\n\n if (type) {\n tmp = this.flowParseFunctionTypeParams([\n this.reinterpretTypeAsFunctionTypeParam(type),\n ]);\n } else {\n tmp = this.flowParseFunctionTypeParams();\n }\n\n node.params = tmp.params;\n node.rest = tmp.rest;\n node.this = tmp._this;\n\n this.expect(tt.parenR);\n\n this.expect(tt.arrow);\n\n node.returnType = this.flowParseType();\n\n node.typeParameters = null;\n\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n\n case tt.string:\n return this.parseLiteral<N.StringLiteralTypeAnnotation>(\n this.state.value,\n \"StringLiteralTypeAnnotation\",\n );\n\n case tt._true:\n case tt._false:\n node.value = this.match(tt._true);\n this.next();\n return this.finishNode<N.BooleanLiteralTypeAnnotation>(\n node,\n \"BooleanLiteralTypeAnnotation\",\n );\n\n case tt.plusMin:\n if (this.state.value === \"-\") {\n this.next();\n if (this.match(tt.num)) {\n return this.parseLiteralAtNode<N.NumberLiteralTypeAnnotation>(\n -this.state.value,\n \"NumberLiteralTypeAnnotation\",\n node,\n );\n }\n\n if (this.match(tt.bigint)) {\n return this.parseLiteralAtNode<N.BigIntLiteralTypeAnnotation>(\n -this.state.value,\n \"BigIntLiteralTypeAnnotation\",\n node,\n );\n }\n\n throw this.raise(FlowErrors.UnexpectedSubtractionOperand, {\n at: this.state.startLoc,\n });\n }\n\n throw this.unexpected();\n case tt.num:\n return this.parseLiteral(\n this.state.value,\n \"NumberLiteralTypeAnnotation\",\n );\n\n case tt.bigint:\n return this.parseLiteral(\n this.state.value,\n \"BigIntLiteralTypeAnnotation\",\n );\n\n case tt._void:\n this.next();\n return this.finishNode(node, \"VoidTypeAnnotation\");\n\n case tt._null:\n this.next();\n return this.finishNode(node, \"NullLiteralTypeAnnotation\");\n\n case tt._this:\n this.next();\n return this.finishNode(node, \"ThisTypeAnnotation\");\n\n case tt.star:\n this.next();\n return this.finishNode(node, \"ExistsTypeAnnotation\");\n\n case tt._typeof:\n return this.flowParseTypeofType();\n\n default:\n if (tokenIsKeyword(this.state.type)) {\n const label = tokenLabelName(this.state.type);\n this.next();\n return super.createIdentifier(node, label);\n } else if (tokenIsIdentifier(this.state.type)) {\n if (this.isContextual(tt._interface)) {\n return this.flowParseInterfaceType();\n }\n\n return this.flowIdentToTypeAnnotation(\n startPos,\n startLoc,\n node,\n this.parseIdentifier(),\n );\n }\n }\n\n throw this.unexpected();\n }\n\n flowParsePostfixType(): N.FlowTypeAnnotation {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n let type = this.flowParsePrimaryType();\n let seenOptionalIndexedAccess = false;\n while (\n (this.match(tt.bracketL) || this.match(tt.questionDot)) &&\n !this.canInsertSemicolon()\n ) {\n const node = this.startNodeAt(startPos, startLoc);\n const optional = this.eat(tt.questionDot);\n seenOptionalIndexedAccess = seenOptionalIndexedAccess || optional;\n this.expect(tt.bracketL);\n if (!optional && this.match(tt.bracketR)) {\n node.elementType = type;\n this.next(); // eat `]`\n type = this.finishNode(node, \"ArrayTypeAnnotation\");\n } else {\n node.objectType = type;\n node.indexType = this.flowParseType();\n this.expect(tt.bracketR);\n if (seenOptionalIndexedAccess) {\n node.optional = optional;\n type = this.finishNode<N.FlowOptionalIndexedAccessType>(\n node,\n \"OptionalIndexedAccessType\",\n );\n } else {\n type = this.finishNode<N.FlowIndexedAccessType>(\n node,\n \"IndexedAccessType\",\n );\n }\n }\n }\n return type;\n }\n\n flowParsePrefixType(): N.FlowTypeAnnotation {\n const node = this.startNode();\n if (this.eat(tt.question)) {\n node.typeAnnotation = this.flowParsePrefixType();\n return this.finishNode(node, \"NullableTypeAnnotation\");\n } else {\n return this.flowParsePostfixType();\n }\n }\n\n flowParseAnonFunctionWithoutParens(): N.FlowTypeAnnotation {\n const param = this.flowParsePrefixType();\n if (!this.state.noAnonFunctionType && this.eat(tt.arrow)) {\n // TODO: This should be a type error. Passing in a SourceLocation, and it expects a Position.\n const node = this.startNodeAt(param.start, param.loc.start);\n node.params = [this.reinterpretTypeAsFunctionTypeParam(param)];\n node.rest = null;\n node.this = null;\n node.returnType = this.flowParseType();\n node.typeParameters = null;\n return this.finishNode(node, \"FunctionTypeAnnotation\");\n }\n return param;\n }\n\n flowParseIntersectionType(): N.FlowTypeAnnotation {\n const node = this.startNode();\n this.eat(tt.bitwiseAND);\n const type = this.flowParseAnonFunctionWithoutParens();\n node.types = [type];\n while (this.eat(tt.bitwiseAND)) {\n node.types.push(this.flowParseAnonFunctionWithoutParens());\n }\n return node.types.length === 1\n ? type\n : this.finishNode(node, \"IntersectionTypeAnnotation\");\n }\n\n flowParseUnionType(): N.FlowTypeAnnotation {\n const node = this.startNode();\n this.eat(tt.bitwiseOR);\n const type = this.flowParseIntersectionType();\n node.types = [type];\n while (this.eat(tt.bitwiseOR)) {\n node.types.push(this.flowParseIntersectionType());\n }\n return node.types.length === 1\n ? type\n : this.finishNode(node, \"UnionTypeAnnotation\");\n }\n\n flowParseType(): N.FlowTypeAnnotation {\n const oldInType = this.state.inType;\n this.state.inType = true;\n const type = this.flowParseUnionType();\n this.state.inType = oldInType;\n return type;\n }\n\n flowParseTypeOrImplicitInstantiation(): N.FlowTypeAnnotation {\n if (this.state.type === tt.name && this.state.value === \"_\") {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const node = this.parseIdentifier();\n return this.flowParseGenericType(startPos, startLoc, node);\n } else {\n return this.flowParseType();\n }\n }\n\n flowParseTypeAnnotation(): N.FlowTypeAnnotation {\n const node = this.startNode();\n node.typeAnnotation = this.flowParseTypeInitialiser();\n return this.finishNode(node, \"TypeAnnotation\");\n }\n\n flowParseTypeAnnotatableIdentifier(\n allowPrimitiveOverride?: boolean,\n ): N.Identifier {\n const ident = allowPrimitiveOverride\n ? this.parseIdentifier()\n : this.flowParseRestrictedIdentifier();\n if (this.match(tt.colon)) {\n ident.typeAnnotation = this.flowParseTypeAnnotation();\n this.resetEndLocation(ident);\n }\n return ident;\n }\n\n typeCastToParameter(node: N.Node): N.Node {\n node.expression.typeAnnotation = node.typeAnnotation;\n\n this.resetEndLocation(node.expression, node.typeAnnotation.loc.end);\n\n return node.expression;\n }\n\n flowParseVariance(): ?N.FlowVariance {\n let variance = null;\n if (this.match(tt.plusMin)) {\n variance = this.startNode();\n if (this.state.value === \"+\") {\n variance.kind = \"plus\";\n } else {\n variance.kind = \"minus\";\n }\n this.next();\n this.finishNode(variance, \"Variance\");\n }\n return variance;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n parseFunctionBody(\n node: N.Function,\n allowExpressionBody: ?boolean,\n isMethod?: boolean = false,\n ): void {\n if (allowExpressionBody) {\n return this.forwardNoArrowParamsConversionAt(node, () =>\n super.parseFunctionBody(node, true, isMethod),\n );\n }\n\n return super.parseFunctionBody(node, false, isMethod);\n }\n\n parseFunctionBodyAndFinish(\n node: N.BodilessFunctionOrMethodBase,\n type: string,\n isMethod?: boolean = false,\n ): void {\n if (this.match(tt.colon)) {\n const typeNode = this.startNode();\n\n [\n // $FlowFixMe (destructuring not supported yet)\n typeNode.typeAnnotation,\n // $FlowFixMe (destructuring not supported yet)\n node.predicate,\n ] = this.flowParseTypeAndPredicateInitialiser();\n\n node.returnType = typeNode.typeAnnotation\n ? this.finishNode(typeNode, \"TypeAnnotation\")\n : null;\n }\n\n super.parseFunctionBodyAndFinish(node, type, isMethod);\n }\n\n // interfaces and enums\n parseStatement(context: ?string, topLevel?: boolean): N.Statement {\n // strict mode handling of `interface` since it's a reserved word\n if (this.state.strict && this.isContextual(tt._interface)) {\n const lookahead = this.lookahead();\n if (tokenIsKeywordOrIdentifier(lookahead.type)) {\n const node = this.startNode();\n this.next();\n return this.flowParseInterface(node);\n }\n } else if (this.shouldParseEnums() && this.isContextual(tt._enum)) {\n const node = this.startNode();\n this.next();\n return this.flowParseEnumDeclaration(node);\n }\n const stmt = super.parseStatement(context, topLevel);\n // We will parse a flow pragma in any comment before the first statement.\n if (this.flowPragma === undefined && !this.isValidDirective(stmt)) {\n this.flowPragma = null;\n }\n return stmt;\n }\n\n // declares, interfaces and type aliases\n parseExpressionStatement(\n node: N.ExpressionStatement,\n expr: N.Expression,\n ): N.ExpressionStatement {\n if (expr.type === \"Identifier\") {\n if (expr.name === \"declare\") {\n if (\n this.match(tt._class) ||\n tokenIsIdentifier(this.state.type) ||\n this.match(tt._function) ||\n this.match(tt._var) ||\n this.match(tt._export)\n ) {\n return this.flowParseDeclare(node);\n }\n } else if (tokenIsIdentifier(this.state.type)) {\n if (expr.name === \"interface\") {\n return this.flowParseInterface(node);\n } else if (expr.name === \"type\") {\n return this.flowParseTypeAlias(node);\n } else if (expr.name === \"opaque\") {\n return this.flowParseOpaqueType(node, false);\n }\n }\n }\n\n return super.parseExpressionStatement(node, expr);\n }\n\n // export type\n shouldParseExportDeclaration(): boolean {\n const { type } = this.state;\n if (\n tokenIsFlowInterfaceOrTypeOrOpaque(type) ||\n (this.shouldParseEnums() && type === tt._enum)\n ) {\n return !this.state.containsEsc;\n }\n return super.shouldParseExportDeclaration();\n }\n\n isExportDefaultSpecifier(): boolean {\n const { type } = this.state;\n if (\n tokenIsFlowInterfaceOrTypeOrOpaque(type) ||\n (this.shouldParseEnums() && type === tt._enum)\n ) {\n return this.state.containsEsc;\n }\n\n return super.isExportDefaultSpecifier();\n }\n\n parseExportDefaultExpression(): N.Expression | N.Declaration {\n if (this.shouldParseEnums() && this.isContextual(tt._enum)) {\n const node = this.startNode();\n this.next();\n return this.flowParseEnumDeclaration(node);\n }\n return super.parseExportDefaultExpression();\n }\n\n parseConditional(\n expr: N.Expression,\n startPos: number,\n startLoc: Position,\n refExpressionErrors?: ?ExpressionErrors,\n ): N.Expression {\n if (!this.match(tt.question)) return expr;\n\n if (this.state.maybeInArrowParameters) {\n const nextCh = this.lookaheadCharCode();\n // These tokens cannot start an expression, so if one of them follows\n // ? then we are probably in an arrow function parameters list and we\n // don't parse the conditional expression.\n if (\n nextCh === charCodes.comma || // (a?, b) => c\n nextCh === charCodes.equalsTo || // (a? = b) => c\n nextCh === charCodes.colon || // (a?: b) => c\n nextCh === charCodes.rightParenthesis // (a?) => c\n ) {\n /*:: invariant(refExpressionErrors != null) */\n this.setOptionalParametersError(refExpressionErrors);\n return expr;\n }\n }\n\n this.expect(tt.question);\n const state = this.state.clone();\n const originalNoArrowAt = this.state.noArrowAt;\n const node = this.startNodeAt(startPos, startLoc);\n let { consequent, failed } = this.tryParseConditionalConsequent();\n let [valid, invalid] = this.getArrowLikeExpressions(consequent);\n\n if (failed || invalid.length > 0) {\n const noArrowAt = [...originalNoArrowAt];\n\n if (invalid.length > 0) {\n this.state = state;\n this.state.noArrowAt = noArrowAt;\n\n for (let i = 0; i < invalid.length; i++) {\n noArrowAt.push(invalid[i].start);\n }\n\n ({ consequent, failed } = this.tryParseConditionalConsequent());\n [valid, invalid] = this.getArrowLikeExpressions(consequent);\n }\n\n if (failed && valid.length > 1) {\n // if there are two or more possible correct ways of parsing, throw an\n // error.\n // e.g. Source: a ? (b): c => (d): e => f\n // Result 1: a ? b : (c => ((d): e => f))\n // Result 2: a ? ((b): c => d) : (e => f)\n this.raise(FlowErrors.AmbiguousConditionalArrow, {\n at: state.startLoc,\n });\n }\n\n if (failed && valid.length === 1) {\n this.state = state;\n noArrowAt.push(valid[0].start);\n this.state.noArrowAt = noArrowAt;\n ({ consequent, failed } = this.tryParseConditionalConsequent());\n }\n }\n\n this.getArrowLikeExpressions(consequent, true);\n\n this.state.noArrowAt = originalNoArrowAt;\n this.expect(tt.colon);\n\n node.test = expr;\n node.consequent = consequent;\n node.alternate = this.forwardNoArrowParamsConversionAt(node, () =>\n this.parseMaybeAssign(undefined, undefined),\n );\n\n return this.finishNode(node, \"ConditionalExpression\");\n }\n\n tryParseConditionalConsequent(): {\n consequent: N.Expression,\n failed: boolean,\n } {\n this.state.noArrowParamsConversionAt.push(this.state.start);\n\n const consequent = this.parseMaybeAssignAllowIn();\n const failed = !this.match(tt.colon);\n\n this.state.noArrowParamsConversionAt.pop();\n\n return { consequent, failed };\n }\n\n // Given an expression, walks through out its arrow functions whose body is\n // an expression and through out conditional expressions. It returns every\n // function which has been parsed with a return type but could have been\n // parenthesized expressions.\n // These functions are separated into two arrays: one containing the ones\n // whose parameters can be converted to assignable lists, one containing the\n // others.\n getArrowLikeExpressions(\n node: N.Expression,\n disallowInvalid?: boolean,\n ): [N.ArrowFunctionExpression[], N.ArrowFunctionExpression[]] {\n const stack = [node];\n const arrows: N.ArrowFunctionExpression[] = [];\n\n while (stack.length !== 0) {\n const node = stack.pop();\n if (node.type === \"ArrowFunctionExpression\") {\n if (node.typeParameters || !node.returnType) {\n // This is an arrow expression without ambiguity, so check its parameters\n this.finishArrowValidation(node);\n } else {\n arrows.push(node);\n }\n stack.push(node.body);\n } else if (node.type === \"ConditionalExpression\") {\n stack.push(node.consequent);\n stack.push(node.alternate);\n }\n }\n\n if (disallowInvalid) {\n arrows.forEach(node => this.finishArrowValidation(node));\n return [arrows, []];\n }\n\n return partition(arrows, node =>\n node.params.every(param => this.isAssignable(param, true)),\n );\n }\n\n finishArrowValidation(node: N.ArrowFunctionExpression) {\n this.toAssignableList(\n // node.params is Expression[] instead of $ReadOnlyArray<Pattern> because it\n // has not been converted yet.\n ((node.params: any): N.Expression[]),\n node.extra?.trailingCommaLoc,\n /* isLHS */ false,\n );\n // Enter scope, as checkParams defines bindings\n this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);\n // Use super's method to force the parameters to be checked\n super.checkParams(node, false, true);\n this.scope.exit();\n }\n\n forwardNoArrowParamsConversionAt<T>(node: N.Node, parse: () => T): T {\n let result: T;\n if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {\n this.state.noArrowParamsConversionAt.push(this.state.start);\n result = parse();\n this.state.noArrowParamsConversionAt.pop();\n } else {\n result = parse();\n }\n\n return result;\n }\n\n parseParenItem(\n node: N.Expression,\n startPos: number,\n startLoc: Position,\n ): N.Expression {\n node = super.parseParenItem(node, startPos, startLoc);\n if (this.eat(tt.question)) {\n node.optional = true;\n // Include questionmark in location of node\n // Don't use this.finishNode() as otherwise we might process comments twice and\n // include already consumed parens\n this.resetEndLocation(node);\n }\n\n if (this.match(tt.colon)) {\n const typeCastNode = this.startNodeAt(startPos, startLoc);\n typeCastNode.expression = node;\n typeCastNode.typeAnnotation = this.flowParseTypeAnnotation();\n\n return this.finishNode(typeCastNode, \"TypeCastExpression\");\n }\n\n return node;\n }\n\n assertModuleNodeAllowed(node: N.Node) {\n if (\n (node.type === \"ImportDeclaration\" &&\n (node.importKind === \"type\" || node.importKind === \"typeof\")) ||\n (node.type === \"ExportNamedDeclaration\" &&\n node.exportKind === \"type\") ||\n (node.type === \"ExportAllDeclaration\" && node.exportKind === \"type\")\n ) {\n // Allow Flowtype imports and exports in all conditions because\n // Flow itself does not care about 'sourceType'.\n return;\n }\n\n super.assertModuleNodeAllowed(node);\n }\n\n parseExport(node: N.Node): N.AnyExport {\n const decl = super.parseExport(node);\n if (\n decl.type === \"ExportNamedDeclaration\" ||\n decl.type === \"ExportAllDeclaration\"\n ) {\n decl.exportKind = decl.exportKind || \"value\";\n }\n return decl;\n }\n\n parseExportDeclaration(node: N.ExportNamedDeclaration): ?N.Declaration {\n if (this.isContextual(tt._type)) {\n node.exportKind = \"type\";\n\n const declarationNode = this.startNode();\n this.next();\n\n if (this.match(tt.braceL)) {\n // export type { foo, bar };\n node.specifiers = this.parseExportSpecifiers(\n /* isInTypeExport */ true,\n );\n this.parseExportFrom(node);\n return null;\n } else {\n // export type Foo = Bar;\n return this.flowParseTypeAlias(declarationNode);\n }\n } else if (this.isContextual(tt._opaque)) {\n node.exportKind = \"type\";\n\n const declarationNode = this.startNode();\n this.next();\n // export opaque type Foo = Bar;\n return this.flowParseOpaqueType(declarationNode, false);\n } else if (this.isContextual(tt._interface)) {\n node.exportKind = \"type\";\n const declarationNode = this.startNode();\n this.next();\n return this.flowParseInterface(declarationNode);\n } else if (this.shouldParseEnums() && this.isContextual(tt._enum)) {\n node.exportKind = \"value\";\n const declarationNode = this.startNode();\n this.next();\n return this.flowParseEnumDeclaration(declarationNode);\n } else {\n return super.parseExportDeclaration(node);\n }\n }\n\n eatExportStar(node: N.Node): boolean {\n if (super.eatExportStar(...arguments)) return true;\n\n if (this.isContextual(tt._type) && this.lookahead().type === tt.star) {\n node.exportKind = \"type\";\n this.next();\n this.next();\n return true;\n }\n\n return false;\n }\n\n maybeParseExportNamespaceSpecifier(node: N.Node): boolean {\n const { startLoc } = this.state;\n const hasNamespace = super.maybeParseExportNamespaceSpecifier(node);\n if (hasNamespace && node.exportKind === \"type\") {\n this.unexpected(startLoc);\n }\n return hasNamespace;\n }\n\n parseClassId(node: N.Class, isStatement: boolean, optionalId: ?boolean) {\n super.parseClassId(node, isStatement, optionalId);\n if (this.match(tt.lt)) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n }\n\n parseClassMember(\n classBody: N.ClassBody,\n member: any,\n state: N.ParseClassMemberState,\n ): void {\n const { startLoc } = this.state;\n if (this.isContextual(tt._declare)) {\n if (this.parseClassMemberFromModifier(classBody, member)) {\n // 'declare' is a class element name\n return;\n }\n\n member.declare = true;\n }\n\n super.parseClassMember(classBody, member, state);\n\n if (member.declare) {\n if (\n member.type !== \"ClassProperty\" &&\n member.type !== \"ClassPrivateProperty\" &&\n member.type !== \"PropertyDefinition\" // Used by estree plugin\n ) {\n this.raise(FlowErrors.DeclareClassElement, { at: startLoc });\n } else if (member.value) {\n this.raise(FlowErrors.DeclareClassFieldInitializer, {\n node: member.value,\n });\n }\n }\n }\n\n isIterator(word: string): boolean {\n return word === \"iterator\" || word === \"asyncIterator\";\n }\n\n readIterator(): void {\n const word = super.readWord1();\n const fullWord = \"@@\" + word;\n\n // Allow @@iterator and @@asyncIterator as a identifier only inside type\n if (!this.isIterator(word) || !this.state.inType) {\n this.raise(\n Errors.InvalidIdentifier,\n { at: this.state.curPosition() },\n fullWord,\n );\n }\n\n this.finishToken(tt.name, fullWord);\n }\n\n // ensure that inside flow types, we bypass the jsx parser plugin\n getTokenFromCode(code: number): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (code === charCodes.leftCurlyBrace && next === charCodes.verticalBar) {\n return this.finishOp(tt.braceBarL, 2);\n } else if (\n this.state.inType &&\n (code === charCodes.greaterThan || code === charCodes.lessThan)\n ) {\n return this.finishOp(code === charCodes.greaterThan ? tt.gt : tt.lt, 1);\n } else if (this.state.inType && code === charCodes.questionMark) {\n if (next === charCodes.dot) {\n return this.finishOp(tt.questionDot, 2);\n }\n // allow double nullable types in Flow: ??string\n return this.finishOp(tt.question, 1);\n } else if (\n isIteratorStart(code, next, this.input.charCodeAt(this.state.pos + 2))\n ) {\n this.state.pos += 2; // eat \"@@\"\n return this.readIterator();\n } else {\n return super.getTokenFromCode(code);\n }\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n if (node.type === \"TypeCastExpression\") {\n return this.isAssignable(node.expression, isBinding);\n } else {\n return super.isAssignable(node, isBinding);\n }\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): N.Node {\n if (node.type === \"TypeCastExpression\") {\n return super.toAssignable(this.typeCastToParameter(node), isLHS);\n } else {\n return super.toAssignable(node, isLHS);\n }\n }\n\n // turn type casts that we found in function parameter head into type annotated params\n toAssignableList(\n exprList: N.Expression[],\n trailingCommaLoc?: ?Position,\n isLHS: boolean,\n ): $ReadOnlyArray<N.Pattern> {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (expr?.type === \"TypeCastExpression\") {\n exprList[i] = this.typeCastToParameter(expr);\n }\n }\n return super.toAssignableList(exprList, trailingCommaLoc, isLHS);\n }\n\n // this is a list of nodes, from something like a call expression, we need to filter the\n // type casts that we've found that are illegal in this context\n toReferencedList(\n exprList: $ReadOnlyArray<?N.Expression>,\n isParenthesizedExpr?: boolean,\n ): $ReadOnlyArray<?N.Expression> {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (\n expr &&\n expr.type === \"TypeCastExpression\" &&\n !expr.extra?.parenthesized &&\n (exprList.length > 1 || !isParenthesizedExpr)\n ) {\n this.raise(FlowErrors.TypeCastInPattern, {\n node: expr.typeAnnotation,\n });\n }\n }\n\n return exprList;\n }\n\n parseArrayLike(\n close: TokenType,\n canBePattern: boolean,\n isTuple: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): N.ArrayExpression | N.TupleExpression {\n const node = super.parseArrayLike(\n close,\n canBePattern,\n isTuple,\n refExpressionErrors,\n );\n\n // This could be an array pattern:\n // ([a: string, b: string]) => {}\n // In this case, we don't have to call toReferencedList. We will\n // call it, if needed, when we are sure that it is a parenthesized\n // expression by calling toReferencedListDeep.\n if (canBePattern && !this.state.maybeInArrowParameters) {\n this.toReferencedList(node.elements);\n }\n\n return node;\n }\n\n checkLVal(\n expr: N.Expression,\n ...args:\n | [string, BindingTypes | void]\n | [\n string,\n BindingTypes | void,\n ?Set<string>,\n boolean | void,\n boolean | void,\n ]\n ): void {\n if (expr.type !== \"TypeCastExpression\") {\n return super.checkLVal(expr, ...args);\n }\n }\n\n // parse class property type annotations\n parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n if (this.match(tt.colon)) {\n node.typeAnnotation = this.flowParseTypeAnnotation();\n }\n return super.parseClassProperty(node);\n }\n\n parseClassPrivateProperty(\n node: N.ClassPrivateProperty,\n ): N.ClassPrivateProperty {\n if (this.match(tt.colon)) {\n node.typeAnnotation = this.flowParseTypeAnnotation();\n }\n return super.parseClassPrivateProperty(node);\n }\n\n // determine whether or not we're currently in the position where a class method would appear\n isClassMethod(): boolean {\n return this.match(tt.lt) || super.isClassMethod();\n }\n\n // determine whether or not we're currently in the position where a class property would appear\n isClassProperty(): boolean {\n return this.match(tt.colon) || super.isClassProperty();\n }\n\n isNonstaticConstructor(method: N.ClassMethod | N.ClassProperty): boolean {\n return !this.match(tt.colon) && super.isNonstaticConstructor(method);\n }\n\n // parse type parameters for class methods\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n if ((method: $FlowFixMe).variance) {\n this.unexpected((method: $FlowFixMe).variance.loc.start);\n }\n delete (method: $FlowFixMe).variance;\n if (this.match(tt.lt)) {\n method.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n\n super.pushClassMethod(\n classBody,\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n );\n\n if (method.params && isConstructor) {\n const params = method.params;\n if (params.length > 0 && this.isThisParam(params[0])) {\n this.raise(FlowErrors.ThisParamBannedInConstructor, { node: method });\n }\n // estree support\n } else if (\n // $FlowFixMe flow does not know about the face that estree can replace ClassMethod with MethodDefinition\n method.type === \"MethodDefinition\" &&\n isConstructor &&\n method.value.params\n ) {\n const params = method.value.params;\n if (params.length > 0 && this.isThisParam(params[0])) {\n this.raise(FlowErrors.ThisParamBannedInConstructor, { node: method });\n }\n }\n }\n\n pushClassPrivateMethod(\n classBody: N.ClassBody,\n method: N.ClassPrivateMethod,\n isGenerator: boolean,\n isAsync: boolean,\n ): void {\n if ((method: $FlowFixMe).variance) {\n this.unexpected((method: $FlowFixMe).variance.loc.start);\n }\n delete (method: $FlowFixMe).variance;\n if (this.match(tt.lt)) {\n method.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n\n super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);\n }\n\n // parse a the super class type parameters and implements\n parseClassSuper(node: N.Class): void {\n super.parseClassSuper(node);\n if (node.superClass && this.match(tt.lt)) {\n node.superTypeParameters = this.flowParseTypeParameterInstantiation();\n }\n if (this.isContextual(tt._implements)) {\n this.next();\n const implemented: N.FlowClassImplements[] = (node.implements = []);\n do {\n const node = this.startNode();\n node.id = this.flowParseRestrictedIdentifier(/*liberal*/ true);\n if (this.match(tt.lt)) {\n node.typeParameters = this.flowParseTypeParameterInstantiation();\n } else {\n node.typeParameters = null;\n }\n implemented.push(this.finishNode(node, \"ClassImplements\"));\n } while (this.eat(tt.comma));\n }\n }\n\n checkGetterSetterParams(method: N.ObjectMethod | N.ClassMethod): void {\n super.checkGetterSetterParams(method);\n const params = this.getObjectOrClassMethodParams(method);\n if (params.length > 0) {\n const param = params[0];\n if (this.isThisParam(param) && method.kind === \"get\") {\n this.raise(FlowErrors.GetterMayNotHaveThisParam, { node: param });\n } else if (this.isThisParam(param)) {\n this.raise(FlowErrors.SetterMayNotHaveThisParam, { node: param });\n }\n }\n }\n\n parsePropertyNamePrefixOperator(\n node: N.ObjectOrClassMember | N.ClassMember,\n ): void {\n node.variance = this.flowParseVariance();\n }\n\n // parse type parameters for object method shorthand\n parseObjPropValue(\n prop: N.ObjectMember,\n startPos: ?number,\n startLoc: ?Position,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): void {\n if ((prop: $FlowFixMe).variance) {\n this.unexpected((prop: $FlowFixMe).variance.loc.start);\n }\n delete (prop: $FlowFixMe).variance;\n\n let typeParameters;\n\n // method shorthand\n if (this.match(tt.lt) && !isAccessor) {\n typeParameters = this.flowParseTypeParameterDeclaration();\n if (!this.match(tt.parenL)) this.unexpected();\n }\n\n super.parseObjPropValue(\n prop,\n startPos,\n startLoc,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n refExpressionErrors,\n );\n\n // add typeParameters if we found them\n if (typeParameters) {\n (prop.value || prop).typeParameters = typeParameters;\n }\n }\n\n parseAssignableListItemTypes(param: N.Pattern): N.Pattern {\n if (this.eat(tt.question)) {\n if (param.type !== \"Identifier\") {\n this.raise(FlowErrors.PatternIsOptional, { node: param });\n }\n if (this.isThisParam(param)) {\n this.raise(FlowErrors.ThisParamMayNotBeOptional, { node: param });\n }\n\n ((param: any): N.Identifier).optional = true;\n }\n if (this.match(tt.colon)) {\n param.typeAnnotation = this.flowParseTypeAnnotation();\n } else if (this.isThisParam(param)) {\n this.raise(FlowErrors.ThisParamAnnotationRequired, { node: param });\n }\n\n if (this.match(tt.eq) && this.isThisParam(param)) {\n this.raise(FlowErrors.ThisParamNoDefault, { node: param });\n }\n\n this.resetEndLocation(param);\n return param;\n }\n\n parseMaybeDefault(\n startPos?: ?number,\n startLoc?: ?Position,\n left?: ?N.Pattern,\n ): N.Pattern {\n const node = super.parseMaybeDefault(startPos, startLoc, left);\n\n if (\n node.type === \"AssignmentPattern\" &&\n node.typeAnnotation &&\n node.right.start < node.typeAnnotation.start\n ) {\n this.raise(FlowErrors.TypeBeforeInitializer, {\n node: node.typeAnnotation,\n });\n }\n\n return node;\n }\n\n shouldParseDefaultImport(node: N.ImportDeclaration): boolean {\n if (!hasTypeImportKind(node)) {\n return super.shouldParseDefaultImport(node);\n }\n\n return isMaybeDefaultImport(this.state.type);\n }\n\n parseImportSpecifierLocal(\n node: N.ImportDeclaration,\n specifier: N.Node,\n type: string,\n contextDescription: string,\n ): void {\n specifier.local = hasTypeImportKind(node)\n ? this.flowParseRestrictedIdentifier(\n /* liberal */ true,\n /* declaration */ true,\n )\n : this.parseIdentifier();\n\n this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL);\n node.specifiers.push(this.finishNode(specifier, type));\n }\n\n // parse typeof and type imports\n maybeParseDefaultImportSpecifier(node: N.ImportDeclaration): boolean {\n node.importKind = \"value\";\n\n let kind = null;\n if (this.match(tt._typeof)) {\n kind = \"typeof\";\n } else if (this.isContextual(tt._type)) {\n kind = \"type\";\n }\n if (kind) {\n const lh = this.lookahead();\n const { type } = lh;\n\n // import type * is not allowed\n if (kind === \"type\" && type === tt.star) {\n // FIXME: lh.start?\n this.unexpected(null, lh.type);\n }\n\n if (\n isMaybeDefaultImport(type) ||\n type === tt.braceL ||\n type === tt.star\n ) {\n this.next();\n node.importKind = kind;\n }\n }\n\n return super.maybeParseDefaultImportSpecifier(node);\n }\n\n // parse import-type/typeof shorthand\n parseImportSpecifier(\n specifier: any,\n importedIsString: boolean,\n isInTypeOnlyImport: boolean,\n // eslint-disable-next-line no-unused-vars\n isMaybeTypeOnly: boolean,\n ): N.ImportSpecifier {\n const firstIdent = specifier.imported;\n\n let specifierTypeKind = null;\n if (firstIdent.type === \"Identifier\") {\n if (firstIdent.name === \"type\") {\n specifierTypeKind = \"type\";\n } else if (firstIdent.name === \"typeof\") {\n specifierTypeKind = \"typeof\";\n }\n }\n\n let isBinding = false;\n if (this.isContextual(tt._as) && !this.isLookaheadContextual(\"as\")) {\n const as_ident = this.parseIdentifier(true);\n if (\n specifierTypeKind !== null &&\n !tokenIsKeywordOrIdentifier(this.state.type)\n ) {\n // `import {type as ,` or `import {type as }`\n specifier.imported = as_ident;\n specifier.importKind = specifierTypeKind;\n specifier.local = cloneIdentifier(as_ident);\n } else {\n // `import {type as foo`\n specifier.imported = firstIdent;\n specifier.importKind = null;\n specifier.local = this.parseIdentifier();\n }\n } else {\n if (\n specifierTypeKind !== null &&\n tokenIsKeywordOrIdentifier(this.state.type)\n ) {\n // `import {type foo`\n specifier.imported = this.parseIdentifier(true);\n specifier.importKind = specifierTypeKind;\n } else {\n if (importedIsString) {\n /*:: invariant(firstIdent instanceof N.StringLiteral) */\n throw this.raise(\n Errors.ImportBindingIsString,\n { node: specifier },\n firstIdent.value,\n );\n }\n /*:: invariant(firstIdent instanceof N.Node) */\n specifier.imported = firstIdent;\n specifier.importKind = null;\n }\n\n if (this.eatContextual(tt._as)) {\n specifier.local = this.parseIdentifier();\n } else {\n isBinding = true;\n specifier.local = cloneIdentifier(specifier.imported);\n }\n }\n\n const specifierIsTypeImport = hasTypeImportKind(specifier);\n\n if (isInTypeOnlyImport && specifierIsTypeImport) {\n this.raise(FlowErrors.ImportTypeShorthandOnlyInPureImport, {\n node: specifier,\n });\n }\n\n if (isInTypeOnlyImport || specifierIsTypeImport) {\n this.checkReservedType(\n specifier.local.name,\n specifier.local.loc.start,\n /* declaration */ true,\n );\n }\n\n if (isBinding && !isInTypeOnlyImport && !specifierIsTypeImport) {\n this.checkReservedWord(\n specifier.local.name,\n specifier.loc.start,\n true,\n true,\n );\n }\n\n this.checkLVal(specifier.local, \"import specifier\", BIND_LEXICAL);\n return this.finishNode(specifier, \"ImportSpecifier\");\n }\n\n parseBindingAtom(): N.Pattern {\n switch (this.state.type) {\n case tt._this:\n // \"this\" may be the name of a parameter, so allow it.\n return this.parseIdentifier(/* liberal */ true);\n default:\n return super.parseBindingAtom();\n }\n }\n\n // parse function type parameters - function foo<T>() {}\n parseFunctionParams(node: N.Function, allowModifiers?: boolean): void {\n // $FlowFixMe\n const kind = node.kind;\n if (kind !== \"get\" && kind !== \"set\" && this.match(tt.lt)) {\n node.typeParameters = this.flowParseTypeParameterDeclaration();\n }\n super.parseFunctionParams(node, allowModifiers);\n }\n\n // parse flow type annotations on variable declarator heads - let foo: string = bar\n parseVarId(\n decl: N.VariableDeclarator,\n kind: \"var\" | \"let\" | \"const\",\n ): void {\n super.parseVarId(decl, kind);\n if (this.match(tt.colon)) {\n decl.id.typeAnnotation = this.flowParseTypeAnnotation();\n this.resetEndLocation(decl.id); // set end position to end of type\n }\n }\n\n // parse the return type of an async arrow function - let foo = (async (): number => {});\n parseAsyncArrowFromCallExpression(\n node: N.ArrowFunctionExpression,\n call: N.CallExpression,\n ): N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = true;\n node.returnType = this.flowParseTypeAnnotation();\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n }\n\n return super.parseAsyncArrowFromCallExpression(node, call);\n }\n\n // todo description\n shouldParseAsyncArrow(): boolean {\n return this.match(tt.colon) || super.shouldParseAsyncArrow();\n }\n\n // We need to support type parameter declarations for arrow functions. This\n // is tricky. There are three situations we need to handle\n //\n // 1. This is either JSX or an arrow function. We'll try JSX first. If that\n // fails, we'll try an arrow function. If that fails, we'll throw the JSX\n // error.\n // 2. This is an arrow function. We'll parse the type parameter declaration,\n // parse the rest, make sure the rest is an arrow function, and go from\n // there\n // 3. This is neither. Just call the super method\n parseMaybeAssign(\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n ): N.Expression {\n let state = null;\n\n let jsx;\n\n if (\n this.hasPlugin(\"jsx\") &&\n (this.match(tt.jsxTagStart) || this.match(tt.lt))\n ) {\n state = this.state.clone();\n\n jsx = this.tryParse(\n () => super.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n state,\n );\n\n /*:: invariant(!jsx.aborted) */\n /*:: invariant(jsx.node != null) */\n if (!jsx.error) return jsx.node;\n\n // Remove `tc.j_expr` and `tc.j_oTag` from context added\n // by parsing `jsxTagStart` to stop the JSX plugin from\n // messing with the tokens\n const { context } = this.state;\n const currentContext = context[context.length - 1];\n if (currentContext === tc.j_oTag || currentContext === tc.j_expr) {\n context.pop();\n }\n }\n\n if (jsx?.error || this.match(tt.lt)) {\n state = state || this.state.clone();\n\n let typeParameters;\n\n const arrow = this.tryParse(abort => {\n typeParameters = this.flowParseTypeParameterDeclaration();\n\n const arrowExpression = this.forwardNoArrowParamsConversionAt(\n typeParameters,\n () => {\n const result = super.parseMaybeAssign(\n refExpressionErrors,\n afterLeftParse,\n );\n\n this.resetStartLocationFromNode(result, typeParameters);\n\n return result;\n },\n );\n\n // <T>(() => {});\n // <T>(() => {}: any);\n if (arrowExpression.extra?.parenthesized) abort();\n\n // The above can return a TypeCastExpression when the arrow\n // expression is not wrapped in parens. See also `this.parseParenItem`.\n // (<T>() => {}: any);\n const expr = this.maybeUnwrapTypeCastExpression(arrowExpression);\n\n if (expr.type !== \"ArrowFunctionExpression\") abort();\n\n expr.typeParameters = typeParameters;\n this.resetStartLocationFromNode(expr, typeParameters);\n\n return arrowExpression;\n }, state);\n\n let arrowExpression: ?(\n | N.ArrowFunctionExpression\n | N.TypeCastExpression\n ) = null;\n\n if (\n arrow.node &&\n this.maybeUnwrapTypeCastExpression(arrow.node).type ===\n \"ArrowFunctionExpression\"\n ) {\n if (!arrow.error && !arrow.aborted) {\n // <T> async () => {}\n if (arrow.node.async) {\n /*:: invariant(typeParameters) */\n this.raise(\n FlowErrors.UnexpectedTypeParameterBeforeAsyncArrowFunction,\n { node: typeParameters },\n );\n }\n\n return arrow.node;\n }\n\n arrowExpression = arrow.node;\n }\n\n // If we are here, both JSX and Flow parsing attempts failed.\n // Give the precedence to the JSX error, except if JSX had an\n // unrecoverable error while Flow didn't.\n // If the error is recoverable, we can only re-report it if there is\n // a node we can return.\n\n if (jsx?.node) {\n /*:: invariant(jsx.failState) */\n this.state = jsx.failState;\n return jsx.node;\n }\n\n if (arrowExpression) {\n /*:: invariant(arrow.failState) */\n this.state = arrow.failState;\n return arrowExpression;\n }\n\n if (jsx?.thrown) throw jsx.error;\n if (arrow.thrown) throw arrow.error;\n\n /*:: invariant(typeParameters) */\n throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, {\n node: typeParameters,\n });\n }\n\n return super.parseMaybeAssign(refExpressionErrors, afterLeftParse);\n }\n\n // handle return types for arrow functions\n parseArrow(node: N.ArrowFunctionExpression): ?N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n const result = this.tryParse(() => {\n const oldNoAnonFunctionType = this.state.noAnonFunctionType;\n this.state.noAnonFunctionType = true;\n\n const typeNode = this.startNode();\n\n [\n // $FlowFixMe (destructuring not supported yet)\n typeNode.typeAnnotation,\n // $FlowFixMe (destructuring not supported yet)\n node.predicate,\n ] = this.flowParseTypeAndPredicateInitialiser();\n\n this.state.noAnonFunctionType = oldNoAnonFunctionType;\n\n if (this.canInsertSemicolon()) this.unexpected();\n if (!this.match(tt.arrow)) this.unexpected();\n\n return typeNode;\n });\n\n if (result.thrown) return null;\n /*:: invariant(result.node) */\n\n if (result.error) this.state = result.failState;\n\n // assign after it is clear it is an arrow\n node.returnType = result.node.typeAnnotation\n ? this.finishNode(result.node, \"TypeAnnotation\")\n : null;\n }\n\n return super.parseArrow(node);\n }\n\n shouldParseArrow(params: Array<N.Node>): boolean {\n return this.match(tt.colon) || super.shouldParseArrow(params);\n }\n\n setArrowFunctionParameters(\n node: N.ArrowFunctionExpression,\n params: N.Expression[],\n ): void {\n if (this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1) {\n node.params = params;\n } else {\n super.setArrowFunctionParameters(node, params);\n }\n }\n\n checkParams(\n node: N.Function,\n allowDuplicates: boolean,\n isArrowFunction: ?boolean,\n ): void {\n if (\n isArrowFunction &&\n this.state.noArrowParamsConversionAt.indexOf(node.start) !== -1\n ) {\n return;\n }\n\n // ensure the `this` param is first, if it exists\n for (let i = 0; i < node.params.length; i++) {\n if (this.isThisParam(node.params[i]) && i > 0) {\n this.raise(FlowErrors.ThisParamMustBeFirst, { node: node.params[i] });\n }\n }\n\n return super.checkParams(...arguments);\n }\n\n parseParenAndDistinguishExpression(canBeArrow: boolean): N.Expression {\n return super.parseParenAndDistinguishExpression(\n canBeArrow && this.state.noArrowAt.indexOf(this.state.start) === -1,\n );\n }\n\n parseSubscripts(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls?: ?boolean,\n ): N.Expression {\n if (\n base.type === \"Identifier\" &&\n base.name === \"async\" &&\n this.state.noArrowAt.indexOf(startPos) !== -1\n ) {\n this.next();\n\n const node = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n base = this.finishNode(node, \"CallExpression\");\n } else if (\n base.type === \"Identifier\" &&\n base.name === \"async\" &&\n this.match(tt.lt)\n ) {\n const state = this.state.clone();\n const arrow = this.tryParse(\n abort =>\n this.parseAsyncArrowWithTypeParameters(startPos, startLoc) ||\n abort(),\n state,\n );\n\n /*:: invariant(arrow.node != null) */\n if (!arrow.error && !arrow.aborted) return arrow.node;\n\n const result = this.tryParse(\n () => super.parseSubscripts(base, startPos, startLoc, noCalls),\n state,\n );\n\n if (result.node && !result.error) return result.node;\n\n if (arrow.node) {\n this.state = arrow.failState;\n return arrow.node;\n }\n\n if (result.node) {\n this.state = result.failState;\n return result.node;\n }\n\n throw arrow.error || result.error;\n }\n\n return super.parseSubscripts(base, startPos, startLoc, noCalls);\n }\n\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n subscriptState: N.ParseSubscriptState,\n ): N.Expression {\n if (this.match(tt.questionDot) && this.isLookaheadToken_lt()) {\n subscriptState.optionalChainMember = true;\n if (noCalls) {\n subscriptState.stop = true;\n return base;\n }\n this.next();\n const node: N.OptionalCallExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n node.callee = base;\n node.typeArguments = this.flowParseTypeParameterInstantiation();\n this.expect(tt.parenL);\n // $FlowFixMe\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n node.optional = true;\n return this.finishCallExpression(node, /* optional */ true);\n } else if (!noCalls && this.shouldParseTypes() && this.match(tt.lt)) {\n const node = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n\n const result = this.tryParse(() => {\n node.typeArguments =\n this.flowParseTypeParameterInstantiationCallOrNew();\n this.expect(tt.parenL);\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n if (subscriptState.optionalChainMember) node.optional = false;\n return this.finishCallExpression(\n node,\n subscriptState.optionalChainMember,\n );\n });\n\n if (result.node) {\n if (result.error) this.state = result.failState;\n return result.node;\n }\n }\n\n return super.parseSubscript(\n base,\n startPos,\n startLoc,\n noCalls,\n subscriptState,\n );\n }\n\n parseNewArguments(node: N.NewExpression): void {\n let targs = null;\n if (this.shouldParseTypes() && this.match(tt.lt)) {\n targs = this.tryParse(() =>\n this.flowParseTypeParameterInstantiationCallOrNew(),\n ).node;\n }\n node.typeArguments = targs;\n\n super.parseNewArguments(node);\n }\n\n parseAsyncArrowWithTypeParameters(\n startPos: number,\n startLoc: Position,\n ): ?N.ArrowFunctionExpression {\n const node = this.startNodeAt(startPos, startLoc);\n this.parseFunctionParams(node);\n if (!this.parseArrow(node)) return;\n return this.parseArrowExpression(\n node,\n /* params */ undefined,\n /* isAsync */ true,\n );\n }\n\n readToken_mult_modulo(code: number): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (\n code === charCodes.asterisk &&\n next === charCodes.slash &&\n this.state.hasFlowComment\n ) {\n this.state.hasFlowComment = false;\n this.state.pos += 2;\n this.nextToken();\n return;\n }\n\n super.readToken_mult_modulo(code);\n }\n\n readToken_pipe_amp(code: number): void {\n const next = this.input.charCodeAt(this.state.pos + 1);\n if (\n code === charCodes.verticalBar &&\n next === charCodes.rightCurlyBrace\n ) {\n // '|}'\n this.finishOp(tt.braceBarR, 2);\n return;\n }\n\n super.readToken_pipe_amp(code);\n }\n\n parseTopLevel(file: N.File, program: N.Program): N.File {\n const fileNode = super.parseTopLevel(file, program);\n if (this.state.hasFlowComment) {\n this.raise(FlowErrors.UnterminatedFlowComment, {\n at: this.state.curPosition(),\n });\n }\n return fileNode;\n }\n\n skipBlockComment(): N.CommentBlock | void {\n if (this.hasPlugin(\"flowComments\") && this.skipFlowComment()) {\n if (this.state.hasFlowComment) {\n throw this.raise(FlowErrors.NestedFlowComment, {\n at: this.state.startLoc,\n });\n }\n this.hasFlowCommentCompletion();\n this.state.pos += this.skipFlowComment();\n this.state.hasFlowComment = true;\n return;\n }\n\n if (this.state.hasFlowComment) {\n const end = this.input.indexOf(\"*-/\", this.state.pos + 2);\n if (end === -1) {\n throw this.raise(Errors.UnterminatedComment, {\n at: this.state.curPosition(),\n });\n }\n this.state.pos = end + 2 + 3;\n return;\n }\n\n return super.skipBlockComment();\n }\n\n skipFlowComment(): number | boolean {\n const { pos } = this.state;\n let shiftToFirstNonWhiteSpace = 2;\n while (\n [charCodes.space, charCodes.tab].includes(\n this.input.charCodeAt(pos + shiftToFirstNonWhiteSpace),\n )\n ) {\n shiftToFirstNonWhiteSpace++;\n }\n\n const ch2 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos);\n const ch3 = this.input.charCodeAt(shiftToFirstNonWhiteSpace + pos + 1);\n\n if (ch2 === charCodes.colon && ch3 === charCodes.colon) {\n return shiftToFirstNonWhiteSpace + 2; // check for /*::\n }\n if (\n this.input.slice(\n shiftToFirstNonWhiteSpace + pos,\n shiftToFirstNonWhiteSpace + pos + 12,\n ) === \"flow-include\"\n ) {\n return shiftToFirstNonWhiteSpace + 12; // check for /*flow-include\n }\n if (ch2 === charCodes.colon && ch3 !== charCodes.colon) {\n return shiftToFirstNonWhiteSpace; // check for /*:, advance up to :\n }\n return false;\n }\n\n hasFlowCommentCompletion(): void {\n const end = this.input.indexOf(\"*/\", this.state.pos);\n if (end === -1) {\n throw this.raise(Errors.UnterminatedComment, {\n at: this.state.curPosition(),\n });\n }\n }\n\n // Flow enum parsing\n\n flowEnumErrorBooleanMemberNotInitialized(\n loc: Position,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n this.raise(\n FlowErrors.EnumBooleanMemberNotInitialized,\n { at: loc },\n memberName,\n enumName,\n );\n }\n\n flowEnumErrorInvalidExplicitType(\n loc: Position,\n {\n enumName,\n suppliedType,\n }: { enumName: string, suppliedType: null | string },\n ) {\n return this.raise(\n suppliedType === null\n ? FlowErrors.EnumInvalidExplicitTypeUnknownSupplied\n : FlowErrors.EnumInvalidExplicitType,\n { at: loc },\n enumName,\n suppliedType,\n );\n }\n\n flowEnumErrorInvalidMemberInitializer(\n loc: Position,\n { enumName, explicitType, memberName }: EnumContext,\n ) {\n return this.raise(\n explicitType === \"boolean\" ||\n explicitType === \"number\" ||\n explicitType === \"string\"\n ? FlowErrors.EnumInvalidMemberInitializerPrimaryType\n : explicitType === \"symbol\"\n ? FlowErrors.EnumInvalidMemberInitializerSymbolType\n : FlowErrors.EnumInvalidMemberInitializerUnknownType,\n { at: loc },\n enumName,\n memberName,\n explicitType,\n );\n }\n\n flowEnumErrorNumberMemberNotInitialized(\n loc: Position,\n { enumName, memberName }: { enumName: string, memberName: string },\n ): void {\n this.raise(\n FlowErrors.EnumNumberMemberNotInitialized,\n { at: loc },\n enumName,\n memberName,\n );\n }\n\n flowEnumErrorStringMemberInconsistentlyInitailized(\n node: N.Node,\n { enumName }: { enumName: string },\n ): void {\n this.raise(\n FlowErrors.EnumStringMemberInconsistentlyInitailized,\n { node },\n enumName,\n );\n }\n\n flowEnumMemberInit(): EnumMemberInit {\n const startLoc = this.state.startLoc;\n const endOfInit = () => this.match(tt.comma) || this.match(tt.braceR);\n switch (this.state.type) {\n case tt.num: {\n const literal = this.parseNumericLiteral(this.state.value);\n if (endOfInit()) {\n return { type: \"number\", loc: literal.loc.start, value: literal };\n }\n return { type: \"invalid\", loc: startLoc };\n }\n case tt.string: {\n const literal = this.parseStringLiteral(this.state.value);\n if (endOfInit()) {\n return { type: \"string\", loc: literal.loc.start, value: literal };\n }\n return { type: \"invalid\", loc: startLoc };\n }\n case tt._true:\n case tt._false: {\n const literal = this.parseBooleanLiteral(this.match(tt._true));\n if (endOfInit()) {\n return {\n type: \"boolean\",\n loc: literal.loc.start,\n value: literal,\n };\n }\n return { type: \"invalid\", loc: startLoc };\n }\n default:\n return { type: \"invalid\", loc: startLoc };\n }\n }\n\n flowEnumMemberRaw(): { id: N.Node, init: EnumMemberInit } {\n const loc = this.state.startLoc;\n const id = this.parseIdentifier(true);\n const init = this.eat(tt.eq)\n ? this.flowEnumMemberInit()\n : { type: \"none\", loc };\n return { id, init };\n }\n\n flowEnumCheckExplicitTypeMismatch(\n loc: Position,\n context: EnumContext,\n expectedType: EnumExplicitType,\n ): void {\n const { explicitType } = context;\n if (explicitType === null) {\n return;\n }\n if (explicitType !== expectedType) {\n this.flowEnumErrorInvalidMemberInitializer(loc, context);\n }\n }\n\n flowEnumMembers({\n enumName,\n explicitType,\n }: {\n enumName: string,\n explicitType: EnumExplicitType,\n }): {|\n members: {|\n booleanMembers: Array<N.Node>,\n numberMembers: Array<N.Node>,\n stringMembers: Array<N.Node>,\n defaultedMembers: Array<N.Node>,\n |},\n hasUnknownMembers: boolean,\n |} {\n const seenNames = new Set();\n const members = {\n booleanMembers: [],\n numberMembers: [],\n stringMembers: [],\n defaultedMembers: [],\n };\n let hasUnknownMembers = false;\n while (!this.match(tt.braceR)) {\n if (this.eat(tt.ellipsis)) {\n hasUnknownMembers = true;\n break;\n }\n const memberNode = this.startNode();\n const { id, init } = this.flowEnumMemberRaw();\n const memberName = id.name;\n if (memberName === \"\") {\n continue;\n }\n if (/^[a-z]/.test(memberName)) {\n this.raise(\n FlowErrors.EnumInvalidMemberName,\n { node: id },\n memberName,\n // suggestion\n memberName[0].toUpperCase() + memberName.slice(1),\n enumName,\n );\n }\n if (seenNames.has(memberName)) {\n this.raise(\n FlowErrors.EnumDuplicateMemberName,\n { node: id },\n memberName,\n enumName,\n );\n }\n seenNames.add(memberName);\n const context = { enumName, explicitType, memberName };\n memberNode.id = id;\n switch (init.type) {\n case \"boolean\": {\n this.flowEnumCheckExplicitTypeMismatch(\n init.loc,\n context,\n \"boolean\",\n );\n memberNode.init = init.value;\n members.booleanMembers.push(\n this.finishNode(memberNode, \"EnumBooleanMember\"),\n );\n break;\n }\n case \"number\": {\n this.flowEnumCheckExplicitTypeMismatch(init.loc, context, \"number\");\n memberNode.init = init.value;\n members.numberMembers.push(\n this.finishNode(memberNode, \"EnumNumberMember\"),\n );\n break;\n }\n case \"string\": {\n this.flowEnumCheckExplicitTypeMismatch(init.loc, context, \"string\");\n memberNode.init = init.value;\n members.stringMembers.push(\n this.finishNode(memberNode, \"EnumStringMember\"),\n );\n break;\n }\n case \"invalid\": {\n throw this.flowEnumErrorInvalidMemberInitializer(init.loc, context);\n }\n case \"none\": {\n switch (explicitType) {\n case \"boolean\":\n this.flowEnumErrorBooleanMemberNotInitialized(\n init.loc,\n context,\n );\n break;\n case \"number\":\n this.flowEnumErrorNumberMemberNotInitialized(init.loc, context);\n break;\n default:\n members.defaultedMembers.push(\n this.finishNode(memberNode, \"EnumDefaultedMember\"),\n );\n }\n }\n }\n\n if (!this.match(tt.braceR)) {\n this.expect(tt.comma);\n }\n }\n return { members, hasUnknownMembers };\n }\n\n flowEnumStringMembers(\n initializedMembers: Array<N.Node>,\n defaultedMembers: Array<N.Node>,\n { enumName }: { enumName: string },\n ): Array<N.Node> {\n if (initializedMembers.length === 0) {\n return defaultedMembers;\n } else if (defaultedMembers.length === 0) {\n return initializedMembers;\n } else if (defaultedMembers.length > initializedMembers.length) {\n for (const member of initializedMembers) {\n this.flowEnumErrorStringMemberInconsistentlyInitailized(member, {\n enumName,\n });\n }\n return defaultedMembers;\n } else {\n for (const member of defaultedMembers) {\n this.flowEnumErrorStringMemberInconsistentlyInitailized(member, {\n enumName,\n });\n }\n return initializedMembers;\n }\n }\n\n flowEnumParseExplicitType({\n enumName,\n }: {\n enumName: string,\n }): EnumExplicitType {\n if (this.eatContextual(tt._of)) {\n if (!tokenIsIdentifier(this.state.type)) {\n throw this.flowEnumErrorInvalidExplicitType(this.state.startLoc, {\n enumName,\n suppliedType: null,\n });\n }\n\n const { value } = this.state;\n this.next();\n\n if (\n value !== \"boolean\" &&\n value !== \"number\" &&\n value !== \"string\" &&\n value !== \"symbol\"\n ) {\n this.flowEnumErrorInvalidExplicitType(this.state.startLoc, {\n enumName,\n suppliedType: value,\n });\n }\n\n return value;\n }\n return null;\n }\n\n flowEnumBody(node: N.Node, id: N.Node): N.Node {\n const enumName = id.name;\n const nameLoc = id.loc.start;\n const explicitType = this.flowEnumParseExplicitType({ enumName });\n this.expect(tt.braceL);\n const { members, hasUnknownMembers } = this.flowEnumMembers({\n enumName,\n explicitType,\n });\n node.hasUnknownMembers = hasUnknownMembers;\n\n switch (explicitType) {\n case \"boolean\":\n node.explicitType = true;\n node.members = members.booleanMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumBooleanBody\");\n case \"number\":\n node.explicitType = true;\n node.members = members.numberMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumNumberBody\");\n case \"string\":\n node.explicitType = true;\n node.members = this.flowEnumStringMembers(\n members.stringMembers,\n members.defaultedMembers,\n { enumName },\n );\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumStringBody\");\n case \"symbol\":\n node.members = members.defaultedMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumSymbolBody\");\n default: {\n // `explicitType` is `null`\n const empty = () => {\n node.members = [];\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumStringBody\");\n };\n node.explicitType = false;\n\n const boolsLen = members.booleanMembers.length;\n const numsLen = members.numberMembers.length;\n const strsLen = members.stringMembers.length;\n const defaultedLen = members.defaultedMembers.length;\n\n if (!boolsLen && !numsLen && !strsLen && !defaultedLen) {\n return empty();\n } else if (!boolsLen && !numsLen) {\n node.members = this.flowEnumStringMembers(\n members.stringMembers,\n members.defaultedMembers,\n { enumName },\n );\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumStringBody\");\n } else if (!numsLen && !strsLen && boolsLen >= defaultedLen) {\n for (const member of members.defaultedMembers) {\n this.flowEnumErrorBooleanMemberNotInitialized(member.loc.start, {\n enumName,\n memberName: member.id.name,\n });\n }\n node.members = members.booleanMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumBooleanBody\");\n } else if (!boolsLen && !strsLen && numsLen >= defaultedLen) {\n for (const member of members.defaultedMembers) {\n this.flowEnumErrorNumberMemberNotInitialized(member.loc.start, {\n enumName,\n memberName: member.id.name,\n });\n }\n node.members = members.numberMembers;\n this.expect(tt.braceR);\n return this.finishNode(node, \"EnumNumberBody\");\n } else {\n this.raise(\n FlowErrors.EnumInconsistentMemberValues,\n { at: nameLoc },\n enumName,\n );\n return empty();\n }\n }\n }\n }\n\n flowParseEnumDeclaration(node: N.Node): N.Node {\n const id = this.parseIdentifier();\n node.id = id;\n node.body = this.flowEnumBody(this.startNode(), id);\n return this.finishNode(node, \"EnumDeclaration\");\n }\n\n // check if the next token is a tt.lt\n isLookaheadToken_lt(): boolean {\n const next = this.nextTokenStart();\n if (this.input.charCodeAt(next) === charCodes.lessThan) {\n const afterNext = this.input.charCodeAt(next + 1);\n return (\n afterNext !== charCodes.lessThan && afterNext !== charCodes.equalsTo\n );\n }\n return false;\n }\n\n maybeUnwrapTypeCastExpression(node: N.Node) {\n return node.type === \"TypeCastExpression\" ? node.expression : node;\n }\n };\n","// @flow\n\nconst entities: { [name: string]: string } = {\n quot: \"\\u0022\",\n amp: \"&\",\n apos: \"\\u0027\",\n lt: \"<\",\n gt: \">\",\n nbsp: \"\\u00A0\",\n iexcl: \"\\u00A1\",\n cent: \"\\u00A2\",\n pound: \"\\u00A3\",\n curren: \"\\u00A4\",\n yen: \"\\u00A5\",\n brvbar: \"\\u00A6\",\n sect: \"\\u00A7\",\n uml: \"\\u00A8\",\n copy: \"\\u00A9\",\n ordf: \"\\u00AA\",\n laquo: \"\\u00AB\",\n not: \"\\u00AC\",\n shy: \"\\u00AD\",\n reg: \"\\u00AE\",\n macr: \"\\u00AF\",\n deg: \"\\u00B0\",\n plusmn: \"\\u00B1\",\n sup2: \"\\u00B2\",\n sup3: \"\\u00B3\",\n acute: \"\\u00B4\",\n micro: \"\\u00B5\",\n para: \"\\u00B6\",\n middot: \"\\u00B7\",\n cedil: \"\\u00B8\",\n sup1: \"\\u00B9\",\n ordm: \"\\u00BA\",\n raquo: \"\\u00BB\",\n frac14: \"\\u00BC\",\n frac12: \"\\u00BD\",\n frac34: \"\\u00BE\",\n iquest: \"\\u00BF\",\n Agrave: \"\\u00C0\",\n Aacute: \"\\u00C1\",\n Acirc: \"\\u00C2\",\n Atilde: \"\\u00C3\",\n Auml: \"\\u00C4\",\n Aring: \"\\u00C5\",\n AElig: \"\\u00C6\",\n Ccedil: \"\\u00C7\",\n Egrave: \"\\u00C8\",\n Eacute: \"\\u00C9\",\n Ecirc: \"\\u00CA\",\n Euml: \"\\u00CB\",\n Igrave: \"\\u00CC\",\n Iacute: \"\\u00CD\",\n Icirc: \"\\u00CE\",\n Iuml: \"\\u00CF\",\n ETH: \"\\u00D0\",\n Ntilde: \"\\u00D1\",\n Ograve: \"\\u00D2\",\n Oacute: \"\\u00D3\",\n Ocirc: \"\\u00D4\",\n Otilde: \"\\u00D5\",\n Ouml: \"\\u00D6\",\n times: \"\\u00D7\",\n Oslash: \"\\u00D8\",\n Ugrave: \"\\u00D9\",\n Uacute: \"\\u00DA\",\n Ucirc: \"\\u00DB\",\n Uuml: \"\\u00DC\",\n Yacute: \"\\u00DD\",\n THORN: \"\\u00DE\",\n szlig: \"\\u00DF\",\n agrave: \"\\u00E0\",\n aacute: \"\\u00E1\",\n acirc: \"\\u00E2\",\n atilde: \"\\u00E3\",\n auml: \"\\u00E4\",\n aring: \"\\u00E5\",\n aelig: \"\\u00E6\",\n ccedil: \"\\u00E7\",\n egrave: \"\\u00E8\",\n eacute: \"\\u00E9\",\n ecirc: \"\\u00EA\",\n euml: \"\\u00EB\",\n igrave: \"\\u00EC\",\n iacute: \"\\u00ED\",\n icirc: \"\\u00EE\",\n iuml: \"\\u00EF\",\n eth: \"\\u00F0\",\n ntilde: \"\\u00F1\",\n ograve: \"\\u00F2\",\n oacute: \"\\u00F3\",\n ocirc: \"\\u00F4\",\n otilde: \"\\u00F5\",\n ouml: \"\\u00F6\",\n divide: \"\\u00F7\",\n oslash: \"\\u00F8\",\n ugrave: \"\\u00F9\",\n uacute: \"\\u00FA\",\n ucirc: \"\\u00FB\",\n uuml: \"\\u00FC\",\n yacute: \"\\u00FD\",\n thorn: \"\\u00FE\",\n yuml: \"\\u00FF\",\n OElig: \"\\u0152\",\n oelig: \"\\u0153\",\n Scaron: \"\\u0160\",\n scaron: \"\\u0161\",\n Yuml: \"\\u0178\",\n fnof: \"\\u0192\",\n circ: \"\\u02C6\",\n tilde: \"\\u02DC\",\n Alpha: \"\\u0391\",\n Beta: \"\\u0392\",\n Gamma: \"\\u0393\",\n Delta: \"\\u0394\",\n Epsilon: \"\\u0395\",\n Zeta: \"\\u0396\",\n Eta: \"\\u0397\",\n Theta: \"\\u0398\",\n Iota: \"\\u0399\",\n Kappa: \"\\u039A\",\n Lambda: \"\\u039B\",\n Mu: \"\\u039C\",\n Nu: \"\\u039D\",\n Xi: \"\\u039E\",\n Omicron: \"\\u039F\",\n Pi: \"\\u03A0\",\n Rho: \"\\u03A1\",\n Sigma: \"\\u03A3\",\n Tau: \"\\u03A4\",\n Upsilon: \"\\u03A5\",\n Phi: \"\\u03A6\",\n Chi: \"\\u03A7\",\n Psi: \"\\u03A8\",\n Omega: \"\\u03A9\",\n alpha: \"\\u03B1\",\n beta: \"\\u03B2\",\n gamma: \"\\u03B3\",\n delta: \"\\u03B4\",\n epsilon: \"\\u03B5\",\n zeta: \"\\u03B6\",\n eta: \"\\u03B7\",\n theta: \"\\u03B8\",\n iota: \"\\u03B9\",\n kappa: \"\\u03BA\",\n lambda: \"\\u03BB\",\n mu: \"\\u03BC\",\n nu: \"\\u03BD\",\n xi: \"\\u03BE\",\n omicron: \"\\u03BF\",\n pi: \"\\u03C0\",\n rho: \"\\u03C1\",\n sigmaf: \"\\u03C2\",\n sigma: \"\\u03C3\",\n tau: \"\\u03C4\",\n upsilon: \"\\u03C5\",\n phi: \"\\u03C6\",\n chi: \"\\u03C7\",\n psi: \"\\u03C8\",\n omega: \"\\u03C9\",\n thetasym: \"\\u03D1\",\n upsih: \"\\u03D2\",\n piv: \"\\u03D6\",\n ensp: \"\\u2002\",\n emsp: \"\\u2003\",\n thinsp: \"\\u2009\",\n zwnj: \"\\u200C\",\n zwj: \"\\u200D\",\n lrm: \"\\u200E\",\n rlm: \"\\u200F\",\n ndash: \"\\u2013\",\n mdash: \"\\u2014\",\n lsquo: \"\\u2018\",\n rsquo: \"\\u2019\",\n sbquo: \"\\u201A\",\n ldquo: \"\\u201C\",\n rdquo: \"\\u201D\",\n bdquo: \"\\u201E\",\n dagger: \"\\u2020\",\n Dagger: \"\\u2021\",\n bull: \"\\u2022\",\n hellip: \"\\u2026\",\n permil: \"\\u2030\",\n prime: \"\\u2032\",\n Prime: \"\\u2033\",\n lsaquo: \"\\u2039\",\n rsaquo: \"\\u203A\",\n oline: \"\\u203E\",\n frasl: \"\\u2044\",\n euro: \"\\u20AC\",\n image: \"\\u2111\",\n weierp: \"\\u2118\",\n real: \"\\u211C\",\n trade: \"\\u2122\",\n alefsym: \"\\u2135\",\n larr: \"\\u2190\",\n uarr: \"\\u2191\",\n rarr: \"\\u2192\",\n darr: \"\\u2193\",\n harr: \"\\u2194\",\n crarr: \"\\u21B5\",\n lArr: \"\\u21D0\",\n uArr: \"\\u21D1\",\n rArr: \"\\u21D2\",\n dArr: \"\\u21D3\",\n hArr: \"\\u21D4\",\n forall: \"\\u2200\",\n part: \"\\u2202\",\n exist: \"\\u2203\",\n empty: \"\\u2205\",\n nabla: \"\\u2207\",\n isin: \"\\u2208\",\n notin: \"\\u2209\",\n ni: \"\\u220B\",\n prod: \"\\u220F\",\n sum: \"\\u2211\",\n minus: \"\\u2212\",\n lowast: \"\\u2217\",\n radic: \"\\u221A\",\n prop: \"\\u221D\",\n infin: \"\\u221E\",\n ang: \"\\u2220\",\n and: \"\\u2227\",\n or: \"\\u2228\",\n cap: \"\\u2229\",\n cup: \"\\u222A\",\n int: \"\\u222B\",\n there4: \"\\u2234\",\n sim: \"\\u223C\",\n cong: \"\\u2245\",\n asymp: \"\\u2248\",\n ne: \"\\u2260\",\n equiv: \"\\u2261\",\n le: \"\\u2264\",\n ge: \"\\u2265\",\n sub: \"\\u2282\",\n sup: \"\\u2283\",\n nsub: \"\\u2284\",\n sube: \"\\u2286\",\n supe: \"\\u2287\",\n oplus: \"\\u2295\",\n otimes: \"\\u2297\",\n perp: \"\\u22A5\",\n sdot: \"\\u22C5\",\n lceil: \"\\u2308\",\n rceil: \"\\u2309\",\n lfloor: \"\\u230A\",\n rfloor: \"\\u230B\",\n lang: \"\\u2329\",\n rang: \"\\u232A\",\n loz: \"\\u25CA\",\n spades: \"\\u2660\",\n clubs: \"\\u2663\",\n hearts: \"\\u2665\",\n diams: \"\\u2666\",\n};\nexport default entities;\n","// @flow\n\n// Error messages are colocated with the plugin.\n/* eslint-disable @babel/development-internal/dry-error-messages */\n\nimport * as charCodes from \"charcodes\";\n\nimport XHTMLEntities from \"./xhtml\";\nimport type Parser from \"../../parser\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport {\n tokenComesBeforeExpression,\n tokenIsKeyword,\n tokenLabelName,\n type TokenType,\n tt,\n} from \"../../tokenizer/types\";\nimport { TokContext, types as tc } from \"../../tokenizer/context\";\nimport * as N from \"../../types\";\nimport { isIdentifierChar, isIdentifierStart } from \"../../util/identifier\";\nimport type { Position } from \"../../util/location\";\nimport { isNewLine } from \"../../util/whitespace\";\nimport { Errors, makeErrorTemplates, ErrorCodes } from \"../../parser/error\";\n\nconst HEX_NUMBER = /^[\\da-fA-F]+$/;\nconst DECIMAL_NUMBER = /^\\d+$/;\n\n/* eslint sort-keys: \"error\" */\nconst JsxErrors = makeErrorTemplates(\n {\n AttributeIsEmpty:\n \"JSX attributes must only be assigned a non-empty expression.\",\n MissingClosingTagElement:\n \"Expected corresponding JSX closing tag for <%0>.\",\n MissingClosingTagFragment: \"Expected corresponding JSX closing tag for <>.\",\n UnexpectedSequenceExpression:\n \"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?\",\n UnsupportedJsxValue:\n \"JSX value should be either an expression or a quoted JSX text.\",\n UnterminatedJsxContent: \"Unterminated JSX contents.\",\n UnwrappedAdjacentJSXElements:\n \"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?\",\n },\n /* code */ ErrorCodes.SyntaxError,\n /* syntaxPlugin */ \"jsx\",\n);\n/* eslint-disable sort-keys */\n\nfunction isFragment(object: ?N.JSXElement): boolean {\n return object\n ? object.type === \"JSXOpeningFragment\" ||\n object.type === \"JSXClosingFragment\"\n : false;\n}\n\n// Transforms JSX element name to string.\n\nfunction getQualifiedJSXName(\n object: N.JSXIdentifier | N.JSXNamespacedName | N.JSXMemberExpression,\n): string {\n if (object.type === \"JSXIdentifier\") {\n return object.name;\n }\n\n if (object.type === \"JSXNamespacedName\") {\n return object.namespace.name + \":\" + object.name.name;\n }\n\n if (object.type === \"JSXMemberExpression\") {\n return (\n getQualifiedJSXName(object.object) +\n \".\" +\n getQualifiedJSXName(object.property)\n );\n }\n\n // istanbul ignore next\n throw new Error(\"Node had unexpected type: \" + object.type);\n}\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n // Reads inline JSX contents token.\n\n jsxReadToken(): void {\n let out = \"\";\n let chunkStart = this.state.pos;\n for (;;) {\n if (this.state.pos >= this.length) {\n throw this.raise(JsxErrors.UnterminatedJsxContent, {\n at: this.state.startLoc,\n });\n }\n\n const ch = this.input.charCodeAt(this.state.pos);\n\n switch (ch) {\n case charCodes.lessThan:\n case charCodes.leftCurlyBrace:\n if (this.state.pos === this.state.start) {\n if (ch === charCodes.lessThan && this.state.canStartJSXElement) {\n ++this.state.pos;\n return this.finishToken(tt.jsxTagStart);\n }\n return super.getTokenFromCode(ch);\n }\n out += this.input.slice(chunkStart, this.state.pos);\n return this.finishToken(tt.jsxText, out);\n\n case charCodes.ampersand:\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadEntity();\n chunkStart = this.state.pos;\n break;\n\n case charCodes.greaterThan:\n case charCodes.rightCurlyBrace:\n if (process.env.BABEL_8_BREAKING) {\n const htmlEntity =\n ch === charCodes.rightCurlyBrace ? \"&rbrace;\" : \"&gt;\";\n const char = this.input[this.state.pos];\n this.raise(\n {\n code: ErrorCodes.SyntaxError,\n reasonCode: \"UnexpectedToken\",\n template: `Unexpected token \\`${char}\\`. Did you mean \\`${htmlEntity}\\` or \\`{'${char}'}\\`?`,\n },\n { at: this.state.curPosition() },\n );\n }\n /* falls through */\n\n default:\n if (isNewLine(ch)) {\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadNewLine(true);\n chunkStart = this.state.pos;\n } else {\n ++this.state.pos;\n }\n }\n }\n }\n\n jsxReadNewLine(normalizeCRLF: boolean): string {\n const ch = this.input.charCodeAt(this.state.pos);\n let out;\n ++this.state.pos;\n if (\n ch === charCodes.carriageReturn &&\n this.input.charCodeAt(this.state.pos) === charCodes.lineFeed\n ) {\n ++this.state.pos;\n out = normalizeCRLF ? \"\\n\" : \"\\r\\n\";\n } else {\n out = String.fromCharCode(ch);\n }\n ++this.state.curLine;\n this.state.lineStart = this.state.pos;\n\n return out;\n }\n\n jsxReadString(quote: number): void {\n let out = \"\";\n let chunkStart = ++this.state.pos;\n for (;;) {\n if (this.state.pos >= this.length) {\n throw this.raise(Errors.UnterminatedString, {\n at: this.state.startLoc,\n });\n }\n\n const ch = this.input.charCodeAt(this.state.pos);\n if (ch === quote) break;\n if (ch === charCodes.ampersand) {\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadEntity();\n chunkStart = this.state.pos;\n } else if (isNewLine(ch)) {\n out += this.input.slice(chunkStart, this.state.pos);\n out += this.jsxReadNewLine(false);\n chunkStart = this.state.pos;\n } else {\n ++this.state.pos;\n }\n }\n out += this.input.slice(chunkStart, this.state.pos++);\n return this.finishToken(tt.string, out);\n }\n\n jsxReadEntity(): string {\n let str = \"\";\n let count = 0;\n let entity;\n let ch = this.input[this.state.pos];\n\n const startPos = ++this.state.pos;\n while (this.state.pos < this.length && count++ < 10) {\n ch = this.input[this.state.pos++];\n if (ch === \";\") {\n if (str[0] === \"#\") {\n if (str[1] === \"x\") {\n str = str.substr(2);\n if (HEX_NUMBER.test(str)) {\n entity = String.fromCodePoint(parseInt(str, 16));\n }\n } else {\n str = str.substr(1);\n if (DECIMAL_NUMBER.test(str)) {\n entity = String.fromCodePoint(parseInt(str, 10));\n }\n }\n } else {\n entity = XHTMLEntities[str];\n }\n break;\n }\n str += ch;\n }\n if (!entity) {\n this.state.pos = startPos;\n return \"&\";\n }\n return entity;\n }\n\n // Read a JSX identifier (valid tag or attribute name).\n //\n // Optimized version since JSX identifiers can\"t contain\n // escape characters and so can be read as single slice.\n // Also assumes that first character was already checked\n // by isIdentifierStart in readToken.\n\n jsxReadWord(): void {\n let ch;\n const start = this.state.pos;\n do {\n ch = this.input.charCodeAt(++this.state.pos);\n } while (isIdentifierChar(ch) || ch === charCodes.dash);\n return this.finishToken(\n tt.jsxName,\n this.input.slice(start, this.state.pos),\n );\n }\n\n // Parse next token as JSX identifier\n\n jsxParseIdentifier(): N.JSXIdentifier {\n const node = this.startNode();\n if (this.match(tt.jsxName)) {\n node.name = this.state.value;\n } else if (tokenIsKeyword(this.state.type)) {\n node.name = tokenLabelName(this.state.type);\n } else {\n this.unexpected();\n }\n this.next();\n return this.finishNode(node, \"JSXIdentifier\");\n }\n\n // Parse namespaced identifier.\n\n jsxParseNamespacedName(): N.JSXNamespacedName {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const name = this.jsxParseIdentifier();\n if (!this.eat(tt.colon)) return name;\n\n const node = this.startNodeAt(startPos, startLoc);\n node.namespace = name;\n node.name = this.jsxParseIdentifier();\n return this.finishNode(node, \"JSXNamespacedName\");\n }\n\n // Parses element name in any form - namespaced, member\n // or single identifier.\n\n jsxParseElementName():\n | N.JSXIdentifier\n | N.JSXNamespacedName\n | N.JSXMemberExpression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n let node = this.jsxParseNamespacedName();\n if (node.type === \"JSXNamespacedName\") {\n return node;\n }\n while (this.eat(tt.dot)) {\n const newNode = this.startNodeAt(startPos, startLoc);\n newNode.object = node;\n newNode.property = this.jsxParseIdentifier();\n node = this.finishNode(newNode, \"JSXMemberExpression\");\n }\n return node;\n }\n\n // Parses any type of JSX attribute value.\n\n jsxParseAttributeValue(): N.Expression {\n let node;\n switch (this.state.type) {\n case tt.braceL:\n node = this.startNode();\n this.setContext(tc.brace);\n this.next();\n node = this.jsxParseExpressionContainer(node, tc.j_oTag);\n if (node.expression.type === \"JSXEmptyExpression\") {\n this.raise(JsxErrors.AttributeIsEmpty, { node });\n }\n return node;\n\n case tt.jsxTagStart:\n case tt.string:\n return this.parseExprAtom();\n\n default:\n throw this.raise(JsxErrors.UnsupportedJsxValue, {\n at: this.state.startLoc,\n });\n }\n }\n\n // JSXEmptyExpression is unique type since it doesn't actually parse anything,\n // and so it should start at the end of last read token (left brace) and finish\n // at the beginning of the next one (right brace).\n\n jsxParseEmptyExpression(): N.JSXEmptyExpression {\n const node = this.startNodeAt(\n this.state.lastTokEndLoc.index,\n this.state.lastTokEndLoc,\n );\n return this.finishNodeAt(node, \"JSXEmptyExpression\", this.state.startLoc);\n }\n\n // Parse JSX spread child\n\n jsxParseSpreadChild(node: N.JSXSpreadChild): N.JSXSpreadChild {\n this.next(); // ellipsis\n node.expression = this.parseExpression();\n this.setContext(tc.j_oTag);\n this.expect(tt.braceR);\n\n return this.finishNode(node, \"JSXSpreadChild\");\n }\n\n // Parses JSX expression enclosed into curly brackets.\n\n jsxParseExpressionContainer(\n node: N.JSXExpressionContainer,\n previousContext: TokContext,\n ): N.JSXExpressionContainer {\n if (this.match(tt.braceR)) {\n node.expression = this.jsxParseEmptyExpression();\n } else {\n const expression = this.parseExpression();\n\n if (process.env.BABEL_8_BREAKING) {\n if (\n expression.type === \"SequenceExpression\" &&\n !expression.extra?.parenthesized\n ) {\n this.raise(JsxErrors.UnexpectedSequenceExpression, {\n node: expression.expressions[1],\n });\n }\n }\n\n node.expression = expression;\n }\n this.setContext(previousContext);\n this.expect(tt.braceR);\n\n return this.finishNode(node, \"JSXExpressionContainer\");\n }\n\n // Parses following JSX attribute name-value pair.\n\n jsxParseAttribute(): N.JSXAttribute {\n const node = this.startNode();\n if (this.match(tt.braceL)) {\n this.setContext(tc.brace);\n this.next();\n this.expect(tt.ellipsis);\n node.argument = this.parseMaybeAssignAllowIn();\n this.setContext(tc.j_oTag);\n this.expect(tt.braceR);\n return this.finishNode(node, \"JSXSpreadAttribute\");\n }\n node.name = this.jsxParseNamespacedName();\n node.value = this.eat(tt.eq) ? this.jsxParseAttributeValue() : null;\n return this.finishNode(node, \"JSXAttribute\");\n }\n\n // Parses JSX opening tag starting after \"<\".\n\n jsxParseOpeningElementAt(\n startPos: number,\n startLoc: Position,\n ): N.JSXOpeningElement {\n const node = this.startNodeAt(startPos, startLoc);\n if (this.match(tt.jsxTagEnd)) {\n this.expect(tt.jsxTagEnd);\n return this.finishNode(node, \"JSXOpeningFragment\");\n }\n node.name = this.jsxParseElementName();\n return this.jsxParseOpeningElementAfterName(node);\n }\n\n jsxParseOpeningElementAfterName(\n node: N.JSXOpeningElement,\n ): N.JSXOpeningElement {\n const attributes: N.JSXAttribute[] = [];\n while (!this.match(tt.slash) && !this.match(tt.jsxTagEnd)) {\n attributes.push(this.jsxParseAttribute());\n }\n node.attributes = attributes;\n node.selfClosing = this.eat(tt.slash);\n this.expect(tt.jsxTagEnd);\n return this.finishNode(node, \"JSXOpeningElement\");\n }\n\n // Parses JSX closing tag starting after \"</\".\n\n jsxParseClosingElementAt(\n startPos: number,\n startLoc: Position,\n ): N.JSXClosingElement {\n const node = this.startNodeAt(startPos, startLoc);\n if (this.match(tt.jsxTagEnd)) {\n this.expect(tt.jsxTagEnd);\n return this.finishNode(node, \"JSXClosingFragment\");\n }\n node.name = this.jsxParseElementName();\n this.expect(tt.jsxTagEnd);\n return this.finishNode(node, \"JSXClosingElement\");\n }\n\n // Parses entire JSX element, including it\"s opening tag\n // (starting after \"<\"), attributes, contents and closing tag.\n\n jsxParseElementAt(startPos: number, startLoc: Position): N.JSXElement {\n const node = this.startNodeAt(startPos, startLoc);\n const children = [];\n const openingElement = this.jsxParseOpeningElementAt(startPos, startLoc);\n let closingElement = null;\n\n if (!openingElement.selfClosing) {\n contents: for (;;) {\n switch (this.state.type) {\n case tt.jsxTagStart:\n startPos = this.state.start;\n startLoc = this.state.startLoc;\n this.next();\n if (this.eat(tt.slash)) {\n closingElement = this.jsxParseClosingElementAt(\n startPos,\n startLoc,\n );\n break contents;\n }\n children.push(this.jsxParseElementAt(startPos, startLoc));\n break;\n\n case tt.jsxText:\n children.push(this.parseExprAtom());\n break;\n\n case tt.braceL: {\n const node = this.startNode();\n this.setContext(tc.brace);\n this.next();\n if (this.match(tt.ellipsis)) {\n children.push(this.jsxParseSpreadChild(node));\n } else {\n children.push(\n this.jsxParseExpressionContainer(node, tc.j_expr),\n );\n }\n\n break;\n }\n // istanbul ignore next - should never happen\n default:\n throw this.unexpected();\n }\n }\n\n if (\n isFragment(openingElement) &&\n !isFragment(closingElement) &&\n closingElement !== null\n ) {\n this.raise(JsxErrors.MissingClosingTagFragment, {\n node: closingElement,\n });\n } else if (!isFragment(openingElement) && isFragment(closingElement)) {\n this.raise(\n JsxErrors.MissingClosingTagElement,\n // $FlowIgnore\n { node: closingElement },\n getQualifiedJSXName(openingElement.name),\n );\n } else if (!isFragment(openingElement) && !isFragment(closingElement)) {\n if (\n // $FlowIgnore\n getQualifiedJSXName(closingElement.name) !==\n getQualifiedJSXName(openingElement.name)\n ) {\n this.raise(\n JsxErrors.MissingClosingTagElement,\n // $FlowIgnore\n { node: closingElement },\n getQualifiedJSXName(openingElement.name),\n );\n }\n }\n }\n\n if (isFragment(openingElement)) {\n node.openingFragment = openingElement;\n node.closingFragment = closingElement;\n } else {\n node.openingElement = openingElement;\n node.closingElement = closingElement;\n }\n node.children = children;\n if (this.match(tt.lt)) {\n throw this.raise(JsxErrors.UnwrappedAdjacentJSXElements, {\n at: this.state.startLoc,\n });\n }\n\n return isFragment(openingElement)\n ? this.finishNode(node, \"JSXFragment\")\n : this.finishNode(node, \"JSXElement\");\n }\n\n // Parses entire JSX element from current position.\n\n jsxParseElement(): N.JSXElement {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n this.next();\n return this.jsxParseElementAt(startPos, startLoc);\n }\n\n setContext(newContext: TokContext) {\n const { context } = this.state;\n context[context.length - 1] = newContext;\n }\n\n // ==================================\n // Overrides\n // ==================================\n\n parseExprAtom(refExpressionErrors: ?ExpressionErrors): N.Expression {\n if (this.match(tt.jsxText)) {\n return this.parseLiteral(this.state.value, \"JSXText\");\n } else if (this.match(tt.jsxTagStart)) {\n return this.jsxParseElement();\n } else if (\n this.match(tt.lt) &&\n this.input.charCodeAt(this.state.pos) !== charCodes.exclamationMark\n ) {\n // In case we encounter an lt token here it will always be the start of\n // jsx as the lt sign is not allowed in places that expect an expression\n this.replaceToken(tt.jsxTagStart);\n return this.jsxParseElement();\n } else {\n return super.parseExprAtom(refExpressionErrors);\n }\n }\n\n skipSpace() {\n const curContext = this.curContext();\n if (!curContext.preserveSpace) super.skipSpace();\n }\n\n getTokenFromCode(code: number): void {\n const context = this.curContext();\n\n if (context === tc.j_expr) {\n return this.jsxReadToken();\n }\n\n if (context === tc.j_oTag || context === tc.j_cTag) {\n if (isIdentifierStart(code)) {\n return this.jsxReadWord();\n }\n\n if (code === charCodes.greaterThan) {\n ++this.state.pos;\n return this.finishToken(tt.jsxTagEnd);\n }\n\n if (\n (code === charCodes.quotationMark || code === charCodes.apostrophe) &&\n context === tc.j_oTag\n ) {\n return this.jsxReadString(code);\n }\n }\n\n if (\n code === charCodes.lessThan &&\n this.state.canStartJSXElement &&\n this.input.charCodeAt(this.state.pos + 1) !== charCodes.exclamationMark\n ) {\n ++this.state.pos;\n return this.finishToken(tt.jsxTagStart);\n }\n\n return super.getTokenFromCode(code);\n }\n\n updateContext(prevType: TokenType): void {\n const { context, type } = this.state;\n if (type === tt.slash && prevType === tt.jsxTagStart) {\n // do not consider JSX expr -> JSX open tag -> ... anymore\n // reconsider as closing tag context\n context.splice(-2, 2, tc.j_cTag);\n this.state.canStartJSXElement = false;\n } else if (type === tt.jsxTagStart) {\n // start opening tag context\n context.push(tc.j_oTag);\n } else if (type === tt.jsxTagEnd) {\n const out = context[context.length - 1];\n if ((out === tc.j_oTag && prevType === tt.slash) || out === tc.j_cTag) {\n context.pop();\n this.state.canStartJSXElement =\n context[context.length - 1] === tc.j_expr;\n } else {\n this.setContext(tc.j_expr);\n this.state.canStartJSXElement = true;\n }\n } else {\n this.state.canStartJSXElement = tokenComesBeforeExpression(type);\n }\n }\n };\n","// @flow\n\nimport { Position } from \"../../util/location\";\nimport ScopeHandler, { Scope } from \"../../util/scope\";\nimport {\n BIND_KIND_TYPE,\n BIND_FLAGS_TS_ENUM,\n BIND_FLAGS_TS_CONST_ENUM,\n BIND_FLAGS_TS_EXPORT_ONLY,\n BIND_KIND_VALUE,\n BIND_FLAGS_CLASS,\n type ScopeFlags,\n type BindingTypes,\n} from \"../../util/scopeflags\";\nimport * as N from \"../../types\";\n\nclass TypeScriptScope extends Scope {\n types: Set<string> = new Set();\n\n // enums (which are also in .types)\n enums: Set<string> = new Set();\n\n // const enums (which are also in .enums and .types)\n constEnums: Set<string> = new Set();\n\n // classes (which are also in .lexical) and interface (which are also in .types)\n classes: Set<string> = new Set();\n\n // namespaces and ambient functions (or classes) are too difficult to track,\n // especially without type analysis.\n // We need to track them anyway, to avoid \"X is not defined\" errors\n // when exporting them.\n exportOnlyBindings: Set<string> = new Set();\n}\n\n// See https://github.com/babel/babel/pull/9766#discussion_r268920730 for an\n// explanation of how typescript handles scope.\n\nexport default class TypeScriptScopeHandler extends ScopeHandler<TypeScriptScope> {\n createScope(flags: ScopeFlags): TypeScriptScope {\n return new TypeScriptScope(flags);\n }\n\n declareName(name: string, bindingType: BindingTypes, loc: Position) {\n const scope = this.currentScope();\n if (bindingType & BIND_FLAGS_TS_EXPORT_ONLY) {\n this.maybeExportDefined(scope, name);\n scope.exportOnlyBindings.add(name);\n return;\n }\n\n super.declareName(...arguments);\n\n if (bindingType & BIND_KIND_TYPE) {\n if (!(bindingType & BIND_KIND_VALUE)) {\n // \"Value\" bindings have already been registered by the superclass.\n this.checkRedeclarationInScope(scope, name, bindingType, loc);\n this.maybeExportDefined(scope, name);\n }\n scope.types.add(name);\n }\n if (bindingType & BIND_FLAGS_TS_ENUM) scope.enums.add(name);\n if (bindingType & BIND_FLAGS_TS_CONST_ENUM) scope.constEnums.add(name);\n if (bindingType & BIND_FLAGS_CLASS) scope.classes.add(name);\n }\n\n isRedeclaredInScope(\n scope: TypeScriptScope,\n name: string,\n bindingType: BindingTypes,\n ): boolean {\n if (scope.enums.has(name)) {\n if (bindingType & BIND_FLAGS_TS_ENUM) {\n // Enums can be merged with other enums if they are both\n // const or both non-const.\n const isConst = !!(bindingType & BIND_FLAGS_TS_CONST_ENUM);\n const wasConst = scope.constEnums.has(name);\n return isConst !== wasConst;\n }\n return true;\n }\n if (bindingType & BIND_FLAGS_CLASS && scope.classes.has(name)) {\n if (scope.lexical.has(name)) {\n // Classes can be merged with interfaces\n return !!(bindingType & BIND_KIND_VALUE);\n } else {\n // Interface can be merged with other classes or interfaces\n return false;\n }\n }\n if (bindingType & BIND_KIND_TYPE && scope.types.has(name)) {\n return true;\n }\n\n return super.isRedeclaredInScope(...arguments);\n }\n\n checkLocalExport(id: N.Identifier) {\n const topLevelScope = this.scopeStack[0];\n const { name } = id;\n if (\n !topLevelScope.types.has(name) &&\n !topLevelScope.exportOnlyBindings.has(name)\n ) {\n super.checkLocalExport(id);\n }\n }\n}\n","// @flow\n\n/*:: declare var invariant; */\n\n// Error messages are colocated with the plugin.\n/* eslint-disable @babel/development-internal/dry-error-messages */\n\nimport type State from \"../../tokenizer/state\";\nimport {\n tokenIsIdentifier,\n tokenIsTSDeclarationStart,\n tokenIsTSTypeOperator,\n tokenOperatorPrecedence,\n tokenIsKeywordOrIdentifier,\n tt,\n type TokenType,\n tokenIsTemplate,\n} from \"../../tokenizer/types\";\nimport { types as tc } from \"../../tokenizer/context\";\nimport * as N from \"../../types\";\nimport type { Position } from \"../../util/location\";\nimport type Parser from \"../../parser\";\nimport {\n type BindingTypes,\n SCOPE_TS_MODULE,\n SCOPE_OTHER,\n BIND_TS_ENUM,\n BIND_TS_CONST_ENUM,\n BIND_TS_TYPE,\n BIND_TS_INTERFACE,\n BIND_TS_AMBIENT,\n BIND_TS_NAMESPACE,\n BIND_CLASS,\n BIND_LEXICAL,\n} from \"../../util/scopeflags\";\nimport TypeScriptScopeHandler from \"./scope\";\nimport * as charCodes from \"charcodes\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport { PARAM } from \"../../util/production-parameter\";\nimport {\n Errors,\n makeErrorTemplates,\n type ErrorTemplate,\n ErrorCodes,\n} from \"../../parser/error\";\nimport { cloneIdentifier } from \"../../parser/node\";\n\ntype TsModifier =\n | \"readonly\"\n | \"abstract\"\n | \"declare\"\n | \"static\"\n | \"override\"\n | N.Accessibility;\n\nfunction nonNull<T>(x: ?T): T {\n if (x == null) {\n // $FlowIgnore\n throw new Error(`Unexpected ${x} value.`);\n }\n return x;\n}\n\nfunction assert(x: boolean): void {\n if (!x) {\n throw new Error(\"Assert fail\");\n }\n}\n\ntype ParsingContext =\n | \"EnumMembers\"\n | \"HeritageClauseElement\"\n | \"TupleElementTypes\"\n | \"TypeMembers\"\n | \"TypeParametersOrArguments\";\n\n/* eslint sort-keys: \"error\" */\nconst TSErrors = makeErrorTemplates(\n {\n AbstractMethodHasImplementation:\n \"Method '%0' cannot have an implementation because it is marked abstract.\",\n AbstractPropertyHasInitializer:\n \"Property '%0' cannot have an initializer because it is marked abstract.\",\n AccesorCannotDeclareThisParameter:\n \"'get' and 'set' accessors cannot declare 'this' parameters.\",\n AccesorCannotHaveTypeParameters: \"An accessor cannot have type parameters.\",\n ClassMethodHasDeclare: \"Class methods cannot have the 'declare' modifier.\",\n ClassMethodHasReadonly:\n \"Class methods cannot have the 'readonly' modifier.\",\n ConstructorHasTypeParameters:\n \"Type parameters cannot appear on a constructor declaration.\",\n DeclareAccessor: \"'declare' is not allowed in %0ters.\",\n DeclareClassFieldHasInitializer:\n \"Initializers are not allowed in ambient contexts.\",\n DeclareFunctionHasImplementation:\n \"An implementation cannot be declared in ambient contexts.\",\n DuplicateAccessibilityModifier: \"Accessibility modifier already seen.\",\n DuplicateModifier: \"Duplicate modifier: '%0'.\",\n EmptyHeritageClauseType: \"'%0' list cannot be empty.\",\n EmptyTypeArguments: \"Type argument list cannot be empty.\",\n EmptyTypeParameters: \"Type parameter list cannot be empty.\",\n ExpectedAmbientAfterExportDeclare:\n \"'export declare' must be followed by an ambient declaration.\",\n ImportAliasHasImportType: \"An import alias can not use 'import type'.\",\n IncompatibleModifiers: \"'%0' modifier cannot be used with '%1' modifier.\",\n IndexSignatureHasAbstract:\n \"Index signatures cannot have the 'abstract' modifier.\",\n IndexSignatureHasAccessibility:\n \"Index signatures cannot have an accessibility modifier ('%0').\",\n IndexSignatureHasDeclare:\n \"Index signatures cannot have the 'declare' modifier.\",\n IndexSignatureHasOverride:\n \"'override' modifier cannot appear on an index signature.\",\n IndexSignatureHasStatic:\n \"Index signatures cannot have the 'static' modifier.\",\n InvalidModifierOnTypeMember:\n \"'%0' modifier cannot appear on a type member.\",\n InvalidModifiersOrder: \"'%0' modifier must precede '%1' modifier.\",\n InvalidTupleMemberLabel:\n \"Tuple members must be labeled with a simple identifier.\",\n MissingInterfaceName:\n \"'interface' declarations must be followed by an identifier.\",\n MixedLabeledAndUnlabeledElements:\n \"Tuple members must all have names or all not have names.\",\n NonAbstractClassHasAbstractMethod:\n \"Abstract methods can only appear within an abstract class.\",\n NonClassMethodPropertyHasAbstractModifer:\n \"'abstract' modifier can only appear on a class, method, or property declaration.\",\n OptionalTypeBeforeRequired:\n \"A required element cannot follow an optional element.\",\n OverrideNotInSubClass:\n \"This member cannot have an 'override' modifier because its containing class does not extend another class.\",\n PatternIsOptional:\n \"A binding pattern parameter cannot be optional in an implementation signature.\",\n PrivateElementHasAbstract:\n \"Private elements cannot have the 'abstract' modifier.\",\n PrivateElementHasAccessibility:\n \"Private elements cannot have an accessibility modifier ('%0').\",\n ReadonlyForMethodSignature:\n \"'readonly' modifier can only appear on a property declaration or index signature.\",\n ReservedArrowTypeParam:\n \"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.\",\n ReservedTypeAssertion:\n \"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.\",\n SetAccesorCannotHaveOptionalParameter:\n \"A 'set' accessor cannot have an optional parameter.\",\n SetAccesorCannotHaveRestParameter:\n \"A 'set' accessor cannot have rest parameter.\",\n SetAccesorCannotHaveReturnType:\n \"A 'set' accessor cannot have a return type annotation.\",\n StaticBlockCannotHaveModifier:\n \"Static class blocks cannot have any modifier.\",\n TypeAnnotationAfterAssign:\n \"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.\",\n TypeImportCannotSpecifyDefaultAndNamed:\n \"A type-only import can specify a default import or named bindings, but not both.\",\n TypeModifierIsUsedInTypeExports:\n \"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.\",\n TypeModifierIsUsedInTypeImports:\n \"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.\",\n UnexpectedParameterModifier:\n \"A parameter property is only allowed in a constructor implementation.\",\n UnexpectedReadonly:\n \"'readonly' type modifier is only permitted on array and tuple literal types.\",\n UnexpectedTypeAnnotation: \"Did not expect a type annotation here.\",\n UnexpectedTypeCastInParameter:\n \"Unexpected type cast in parameter position.\",\n UnsupportedImportTypeArgument:\n \"Argument in a type import must be a string literal.\",\n UnsupportedParameterPropertyKind:\n \"A parameter property may not be declared using a binding pattern.\",\n UnsupportedSignatureParameterKind:\n \"Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got %0.\",\n },\n /* code */ ErrorCodes.SyntaxError,\n /* syntaxPlugin */ \"typescript\",\n);\n/* eslint-disable sort-keys */\n\n// Doesn't handle \"void\" or \"null\" because those are keywords, not identifiers.\n// It also doesn't handle \"intrinsic\", since usually it's not a keyword.\nfunction keywordTypeFromName(\n value: string,\n): N.TsKeywordTypeType | typeof undefined {\n switch (value) {\n case \"any\":\n return \"TSAnyKeyword\";\n case \"boolean\":\n return \"TSBooleanKeyword\";\n case \"bigint\":\n return \"TSBigIntKeyword\";\n case \"never\":\n return \"TSNeverKeyword\";\n case \"number\":\n return \"TSNumberKeyword\";\n case \"object\":\n return \"TSObjectKeyword\";\n case \"string\":\n return \"TSStringKeyword\";\n case \"symbol\":\n return \"TSSymbolKeyword\";\n case \"undefined\":\n return \"TSUndefinedKeyword\";\n case \"unknown\":\n return \"TSUnknownKeyword\";\n default:\n return undefined;\n }\n}\n\nfunction tsIsAccessModifier(modifier: string): boolean %checks {\n return (\n modifier === \"private\" || modifier === \"public\" || modifier === \"protected\"\n );\n}\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n getScopeHandler(): Class<TypeScriptScopeHandler> {\n return TypeScriptScopeHandler;\n }\n\n tsIsIdentifier(): boolean {\n // TODO: actually a bit more complex in TypeScript, but shouldn't matter.\n // See https://github.com/Microsoft/TypeScript/issues/15008\n return tokenIsIdentifier(this.state.type);\n }\n\n tsTokenCanFollowModifier() {\n return (\n (this.match(tt.bracketL) ||\n this.match(tt.braceL) ||\n this.match(tt.star) ||\n this.match(tt.ellipsis) ||\n this.match(tt.privateName) ||\n this.isLiteralPropertyName()) &&\n !this.hasPrecedingLineBreak()\n );\n }\n\n tsNextTokenCanFollowModifier() {\n // Note: TypeScript's implementation is much more complicated because\n // more things are considered modifiers there.\n // This implementation only handles modifiers not handled by @babel/parser itself. And \"static\".\n // TODO: Would be nice to avoid lookahead. Want a hasLineBreakUpNext() method...\n this.next();\n return this.tsTokenCanFollowModifier();\n }\n\n /** Parses a modifier matching one the given modifier names. */\n tsParseModifier<T: TsModifier>(\n allowedModifiers: T[],\n stopOnStartOfClassStaticBlock?: boolean,\n ): ?T {\n if (!tokenIsIdentifier(this.state.type)) {\n return undefined;\n }\n\n const modifier = this.state.value;\n if (allowedModifiers.indexOf(modifier) !== -1) {\n if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) {\n return undefined;\n }\n if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) {\n return modifier;\n }\n }\n return undefined;\n }\n\n /** Parses a list of modifiers, in any order.\n * If you need a specific order, you must call this function multiple times:\n * this.tsParseModifiers(node, [\"public\"]);\n * this.tsParseModifiers(node, [\"abstract\", \"readonly\"]);\n */\n tsParseModifiers(\n modified: {\n [key: TsModifier]: ?true,\n accessibility?: N.Accessibility,\n },\n allowedModifiers: TsModifier[],\n disallowedModifiers?: TsModifier[],\n errorTemplate?: ErrorTemplate,\n stopOnStartOfClassStaticBlock?: boolean,\n ): void {\n const enforceOrder = (loc, modifier, before, after) => {\n if (modifier === before && modified[after]) {\n this.raise(\n TSErrors.InvalidModifiersOrder,\n { at: loc },\n before,\n after,\n );\n }\n };\n const incompatible = (loc, modifier, mod1, mod2) => {\n if (\n (modified[mod1] && modifier === mod2) ||\n (modified[mod2] && modifier === mod1)\n ) {\n this.raise(TSErrors.IncompatibleModifiers, { at: loc }, mod1, mod2);\n }\n };\n\n for (;;) {\n const { startLoc } = this.state;\n const modifier: ?TsModifier = this.tsParseModifier(\n allowedModifiers.concat(disallowedModifiers ?? []),\n stopOnStartOfClassStaticBlock,\n );\n\n if (!modifier) break;\n\n if (tsIsAccessModifier(modifier)) {\n if (modified.accessibility) {\n this.raise(TSErrors.DuplicateAccessibilityModifier, {\n at: startLoc,\n });\n } else {\n enforceOrder(startLoc, modifier, modifier, \"override\");\n enforceOrder(startLoc, modifier, modifier, \"static\");\n enforceOrder(startLoc, modifier, modifier, \"readonly\");\n\n modified.accessibility = modifier;\n }\n } else {\n if (Object.hasOwnProperty.call(modified, modifier)) {\n this.raise(TSErrors.DuplicateModifier, { at: startLoc }, modifier);\n } else {\n enforceOrder(startLoc, modifier, \"static\", \"readonly\");\n enforceOrder(startLoc, modifier, \"static\", \"override\");\n enforceOrder(startLoc, modifier, \"override\", \"readonly\");\n enforceOrder(startLoc, modifier, \"abstract\", \"override\");\n\n incompatible(startLoc, modifier, \"declare\", \"override\");\n incompatible(startLoc, modifier, \"static\", \"abstract\");\n }\n modified[modifier] = true;\n }\n\n if (disallowedModifiers?.includes(modifier)) {\n // $FlowIgnore\n this.raise(errorTemplate, { at: startLoc }, modifier);\n }\n }\n }\n\n tsIsListTerminator(kind: ParsingContext): boolean {\n switch (kind) {\n case \"EnumMembers\":\n case \"TypeMembers\":\n return this.match(tt.braceR);\n case \"HeritageClauseElement\":\n return this.match(tt.braceL);\n case \"TupleElementTypes\":\n return this.match(tt.bracketR);\n case \"TypeParametersOrArguments\":\n return this.match(tt.gt);\n }\n\n throw new Error(\"Unreachable\");\n }\n\n tsParseList<T: N.Node>(kind: ParsingContext, parseElement: () => T): T[] {\n const result: T[] = [];\n while (!this.tsIsListTerminator(kind)) {\n // Skipping \"parseListElement\" from the TS source since that's just for error handling.\n result.push(parseElement());\n }\n return result;\n }\n\n tsParseDelimitedList<T: N.Node>(\n kind: ParsingContext,\n parseElement: () => T,\n refTrailingCommaPos?: { value: number },\n ): T[] {\n return nonNull(\n this.tsParseDelimitedListWorker(\n kind,\n parseElement,\n /* expectSuccess */ true,\n refTrailingCommaPos,\n ),\n );\n }\n\n /**\n * If !expectSuccess, returns undefined instead of failing to parse.\n * If expectSuccess, parseElement should always return a defined value.\n */\n tsParseDelimitedListWorker<T: N.Node>(\n kind: ParsingContext,\n parseElement: () => ?T,\n expectSuccess: boolean,\n refTrailingCommaPos?: { value: number },\n ): ?(T[]) {\n const result = [];\n let trailingCommaPos = -1;\n\n for (;;) {\n if (this.tsIsListTerminator(kind)) {\n break;\n }\n trailingCommaPos = -1;\n\n const element = parseElement();\n if (element == null) {\n return undefined;\n }\n result.push(element);\n\n if (this.eat(tt.comma)) {\n trailingCommaPos = this.state.lastTokStart;\n continue;\n }\n\n if (this.tsIsListTerminator(kind)) {\n break;\n }\n\n if (expectSuccess) {\n // This will fail with an error about a missing comma\n this.expect(tt.comma);\n }\n return undefined;\n }\n\n if (refTrailingCommaPos) {\n refTrailingCommaPos.value = trailingCommaPos;\n }\n\n return result;\n }\n\n tsParseBracketedList<T: N.Node>(\n kind: ParsingContext,\n parseElement: () => T,\n bracket: boolean,\n skipFirstToken: boolean,\n refTrailingCommaPos?: { value: number },\n ): T[] {\n if (!skipFirstToken) {\n if (bracket) {\n this.expect(tt.bracketL);\n } else {\n this.expect(tt.lt);\n }\n }\n\n const result = this.tsParseDelimitedList(\n kind,\n parseElement,\n refTrailingCommaPos,\n );\n\n if (bracket) {\n this.expect(tt.bracketR);\n } else {\n this.expect(tt.gt);\n }\n\n return result;\n }\n\n tsParseImportType(): N.TsImportType {\n const node: N.TsImportType = this.startNode();\n this.expect(tt._import);\n this.expect(tt.parenL);\n if (!this.match(tt.string)) {\n this.raise(TSErrors.UnsupportedImportTypeArgument, {\n at: this.state.startLoc,\n });\n }\n\n // For compatibility to estree we cannot call parseLiteral directly here\n node.argument = this.parseExprAtom();\n this.expect(tt.parenR);\n\n if (this.eat(tt.dot)) {\n node.qualifier = this.tsParseEntityName(/* allowReservedWords */ true);\n }\n if (this.match(tt.lt)) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n return this.finishNode(node, \"TSImportType\");\n }\n\n tsParseEntityName(allowReservedWords: boolean): N.TsEntityName {\n let entity: N.TsEntityName = this.parseIdentifier();\n while (this.eat(tt.dot)) {\n const node: N.TsQualifiedName = this.startNodeAtNode(entity);\n node.left = entity;\n node.right = this.parseIdentifier(allowReservedWords);\n entity = this.finishNode(node, \"TSQualifiedName\");\n }\n return entity;\n }\n\n tsParseTypeReference(): N.TsTypeReference {\n const node: N.TsTypeReference = this.startNode();\n node.typeName = this.tsParseEntityName(/* allowReservedWords */ false);\n if (!this.hasPrecedingLineBreak() && this.match(tt.lt)) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n return this.finishNode(node, \"TSTypeReference\");\n }\n\n tsParseThisTypePredicate(lhs: N.TsThisType): N.TsTypePredicate {\n this.next();\n const node: N.TsTypePredicate = this.startNodeAtNode(lhs);\n node.parameterName = lhs;\n node.typeAnnotation = this.tsParseTypeAnnotation(/* eatColon */ false);\n node.asserts = false;\n return this.finishNode(node, \"TSTypePredicate\");\n }\n\n tsParseThisTypeNode(): N.TsThisType {\n const node: N.TsThisType = this.startNode();\n this.next();\n return this.finishNode(node, \"TSThisType\");\n }\n\n tsParseTypeQuery(): N.TsTypeQuery {\n const node: N.TsTypeQuery = this.startNode();\n this.expect(tt._typeof);\n if (this.match(tt._import)) {\n node.exprName = this.tsParseImportType();\n } else {\n node.exprName = this.tsParseEntityName(/* allowReservedWords */ true);\n }\n return this.finishNode(node, \"TSTypeQuery\");\n }\n\n tsParseTypeParameter(): N.TsTypeParameter {\n const node: N.TsTypeParameter = this.startNode();\n node.name = this.tsParseTypeParameterName();\n node.constraint = this.tsEatThenParseType(tt._extends);\n node.default = this.tsEatThenParseType(tt.eq);\n return this.finishNode(node, \"TSTypeParameter\");\n }\n\n tsTryParseTypeParameters(): ?N.TsTypeParameterDeclaration {\n if (this.match(tt.lt)) {\n return this.tsParseTypeParameters();\n }\n }\n\n tsParseTypeParameters() {\n const node: N.TsTypeParameterDeclaration = this.startNode();\n\n if (this.match(tt.lt) || this.match(tt.jsxTagStart)) {\n this.next();\n } else {\n this.unexpected();\n }\n\n const refTrailingCommaPos = { value: -1 };\n\n node.params = this.tsParseBracketedList(\n \"TypeParametersOrArguments\",\n this.tsParseTypeParameter.bind(this),\n /* bracket */ false,\n /* skipFirstToken */ true,\n refTrailingCommaPos,\n );\n if (node.params.length === 0) {\n this.raise(TSErrors.EmptyTypeParameters, { node });\n }\n if (refTrailingCommaPos.value !== -1) {\n this.addExtra(node, \"trailingComma\", refTrailingCommaPos.value);\n }\n return this.finishNode(node, \"TSTypeParameterDeclaration\");\n }\n\n tsTryNextParseConstantContext(): ?N.TsTypeReference {\n if (this.lookahead().type === tt._const) {\n this.next();\n return this.tsParseTypeReference();\n }\n return null;\n }\n\n // Note: In TypeScript implementation we must provide `yieldContext` and `awaitContext`,\n // but here it's always false, because this is only used for types.\n tsFillSignature(\n returnToken: TokenType,\n signature: N.TsSignatureDeclaration,\n ): void {\n // Arrow fns *must* have return token (`=>`). Normal functions can omit it.\n const returnTokenRequired = returnToken === tt.arrow;\n\n // https://github.com/babel/babel/issues/9231\n const paramsKey = process.env.BABEL_8_BREAKING ? \"params\" : \"parameters\";\n const returnTypeKey = process.env.BABEL_8_BREAKING\n ? \"returnType\"\n : \"typeAnnotation\";\n\n signature.typeParameters = this.tsTryParseTypeParameters();\n this.expect(tt.parenL);\n signature[paramsKey] = this.tsParseBindingListForSignature();\n if (returnTokenRequired) {\n signature[returnTypeKey] =\n this.tsParseTypeOrTypePredicateAnnotation(returnToken);\n } else if (this.match(returnToken)) {\n signature[returnTypeKey] =\n this.tsParseTypeOrTypePredicateAnnotation(returnToken);\n }\n }\n\n tsParseBindingListForSignature(): $ReadOnlyArray<\n N.Identifier | N.RestElement | N.ObjectPattern | N.ArrayPattern,\n > {\n return this.parseBindingList(tt.parenR, charCodes.rightParenthesis).map(\n pattern => {\n if (\n pattern.type !== \"Identifier\" &&\n pattern.type !== \"RestElement\" &&\n pattern.type !== \"ObjectPattern\" &&\n pattern.type !== \"ArrayPattern\"\n ) {\n this.raise(\n TSErrors.UnsupportedSignatureParameterKind,\n { node: pattern },\n pattern.type,\n );\n }\n return (pattern: any);\n },\n );\n }\n\n tsParseTypeMemberSemicolon(): void {\n if (!this.eat(tt.comma) && !this.isLineTerminator()) {\n this.expect(tt.semi);\n }\n }\n\n tsParseSignatureMember(\n kind: \"TSCallSignatureDeclaration\" | \"TSConstructSignatureDeclaration\",\n node: N.TsCallSignatureDeclaration | N.TsConstructSignatureDeclaration,\n ): N.TsCallSignatureDeclaration | N.TsConstructSignatureDeclaration {\n this.tsFillSignature(tt.colon, node);\n this.tsParseTypeMemberSemicolon();\n return this.finishNode(node, kind);\n }\n\n tsIsUnambiguouslyIndexSignature() {\n this.next(); // Skip '{'\n if (tokenIsIdentifier(this.state.type)) {\n this.next();\n return this.match(tt.colon);\n }\n return false;\n }\n\n tsTryParseIndexSignature(node: N.Node): ?N.TsIndexSignature {\n if (\n !(\n this.match(tt.bracketL) &&\n this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))\n )\n ) {\n return undefined;\n }\n\n this.expect(tt.bracketL);\n const id = this.parseIdentifier();\n id.typeAnnotation = this.tsParseTypeAnnotation();\n this.resetEndLocation(id); // set end position to end of type\n\n this.expect(tt.bracketR);\n node.parameters = [id];\n\n const type = this.tsTryParseTypeAnnotation();\n if (type) node.typeAnnotation = type;\n this.tsParseTypeMemberSemicolon();\n return this.finishNode(node, \"TSIndexSignature\");\n }\n\n tsParsePropertyOrMethodSignature(\n node: N.TsPropertySignature | N.TsMethodSignature,\n readonly: boolean,\n ): N.TsPropertySignature | N.TsMethodSignature {\n if (this.eat(tt.question)) node.optional = true;\n const nodeAny: any = node;\n\n if (this.match(tt.parenL) || this.match(tt.lt)) {\n if (readonly) {\n this.raise(TSErrors.ReadonlyForMethodSignature, { node });\n }\n const method: N.TsMethodSignature = nodeAny;\n if (method.kind && this.match(tt.lt)) {\n this.raise(TSErrors.AccesorCannotHaveTypeParameters, {\n at: this.state.curPosition(),\n });\n }\n this.tsFillSignature(tt.colon, method);\n this.tsParseTypeMemberSemicolon();\n const paramsKey = process.env.BABEL_8_BREAKING\n ? \"params\"\n : \"parameters\";\n const returnTypeKey = process.env.BABEL_8_BREAKING\n ? \"returnType\"\n : \"typeAnnotation\";\n if (method.kind === \"get\") {\n if (method[paramsKey].length > 0) {\n this.raise(Errors.BadGetterArity, { at: this.state.curPosition() });\n if (this.isThisParam(method[paramsKey][0])) {\n this.raise(TSErrors.AccesorCannotDeclareThisParameter, {\n at: this.state.curPosition(),\n });\n }\n }\n } else if (method.kind === \"set\") {\n if (method[paramsKey].length !== 1) {\n this.raise(Errors.BadSetterArity, { at: this.state.curPosition() });\n } else {\n const firstParameter = method[paramsKey][0];\n if (this.isThisParam(firstParameter)) {\n this.raise(TSErrors.AccesorCannotDeclareThisParameter, {\n at: this.state.curPosition(),\n });\n }\n if (\n firstParameter.type === \"Identifier\" &&\n firstParameter.optional\n ) {\n this.raise(TSErrors.SetAccesorCannotHaveOptionalParameter, {\n at: this.state.curPosition(),\n });\n }\n if (firstParameter.type === \"RestElement\") {\n this.raise(TSErrors.SetAccesorCannotHaveRestParameter, {\n at: this.state.curPosition(),\n });\n }\n }\n if (method[returnTypeKey]) {\n this.raise(TSErrors.SetAccesorCannotHaveReturnType, {\n node: method[returnTypeKey],\n });\n }\n } else {\n method.kind = \"method\";\n }\n return this.finishNode(method, \"TSMethodSignature\");\n } else {\n const property: N.TsPropertySignature = nodeAny;\n if (readonly) property.readonly = true;\n const type = this.tsTryParseTypeAnnotation();\n if (type) property.typeAnnotation = type;\n this.tsParseTypeMemberSemicolon();\n return this.finishNode(property, \"TSPropertySignature\");\n }\n }\n\n tsParseTypeMember(): N.TsTypeElement {\n const node: any = this.startNode();\n\n if (this.match(tt.parenL) || this.match(tt.lt)) {\n return this.tsParseSignatureMember(\"TSCallSignatureDeclaration\", node);\n }\n\n if (this.match(tt._new)) {\n const id: N.Identifier = this.startNode();\n this.next();\n if (this.match(tt.parenL) || this.match(tt.lt)) {\n return this.tsParseSignatureMember(\n \"TSConstructSignatureDeclaration\",\n node,\n );\n } else {\n node.key = this.createIdentifier(id, \"new\");\n return this.tsParsePropertyOrMethodSignature(node, false);\n }\n }\n\n this.tsParseModifiers(\n node,\n [\"readonly\"],\n [\n \"declare\",\n \"abstract\",\n \"private\",\n \"protected\",\n \"public\",\n \"static\",\n \"override\",\n ],\n TSErrors.InvalidModifierOnTypeMember,\n );\n\n const idx = this.tsTryParseIndexSignature(node);\n if (idx) {\n return idx;\n }\n\n this.parsePropertyName(node);\n if (\n !node.computed &&\n node.key.type === \"Identifier\" &&\n (node.key.name === \"get\" || node.key.name === \"set\") &&\n this.tsTokenCanFollowModifier()\n ) {\n node.kind = node.key.name;\n this.parsePropertyName(node);\n }\n return this.tsParsePropertyOrMethodSignature(node, !!node.readonly);\n }\n\n tsParseTypeLiteral(): N.TsTypeLiteral {\n const node: N.TsTypeLiteral = this.startNode();\n node.members = this.tsParseObjectTypeMembers();\n return this.finishNode(node, \"TSTypeLiteral\");\n }\n\n tsParseObjectTypeMembers(): $ReadOnlyArray<N.TsTypeElement> {\n this.expect(tt.braceL);\n const members = this.tsParseList(\n \"TypeMembers\",\n this.tsParseTypeMember.bind(this),\n );\n this.expect(tt.braceR);\n return members;\n }\n\n tsIsStartOfMappedType(): boolean {\n this.next();\n if (this.eat(tt.plusMin)) {\n return this.isContextual(tt._readonly);\n }\n if (this.isContextual(tt._readonly)) {\n this.next();\n }\n if (!this.match(tt.bracketL)) {\n return false;\n }\n this.next();\n if (!this.tsIsIdentifier()) {\n return false;\n }\n this.next();\n return this.match(tt._in);\n }\n\n tsParseMappedTypeParameter(): N.TsTypeParameter {\n const node: N.TsTypeParameter = this.startNode();\n node.name = this.tsParseTypeParameterName();\n node.constraint = this.tsExpectThenParseType(tt._in);\n return this.finishNode(node, \"TSTypeParameter\");\n }\n\n tsParseMappedType(): N.TsMappedType {\n const node: N.TsMappedType = this.startNode();\n\n this.expect(tt.braceL);\n\n if (this.match(tt.plusMin)) {\n node.readonly = this.state.value;\n this.next();\n this.expectContextual(tt._readonly);\n } else if (this.eatContextual(tt._readonly)) {\n node.readonly = true;\n }\n\n this.expect(tt.bracketL);\n node.typeParameter = this.tsParseMappedTypeParameter();\n node.nameType = this.eatContextual(tt._as) ? this.tsParseType() : null;\n\n this.expect(tt.bracketR);\n\n if (this.match(tt.plusMin)) {\n node.optional = this.state.value;\n this.next();\n this.expect(tt.question);\n } else if (this.eat(tt.question)) {\n node.optional = true;\n }\n\n node.typeAnnotation = this.tsTryParseType();\n this.semicolon();\n this.expect(tt.braceR);\n\n return this.finishNode(node, \"TSMappedType\");\n }\n\n tsParseTupleType(): N.TsTupleType {\n const node: N.TsTupleType = this.startNode();\n node.elementTypes = this.tsParseBracketedList(\n \"TupleElementTypes\",\n this.tsParseTupleElementType.bind(this),\n /* bracket */ true,\n /* skipFirstToken */ false,\n );\n\n // Validate the elementTypes to ensure that no mandatory elements\n // follow optional elements\n let seenOptionalElement = false;\n let labeledElements = null;\n node.elementTypes.forEach(elementNode => {\n let { type } = elementNode;\n\n if (\n seenOptionalElement &&\n type !== \"TSRestType\" &&\n type !== \"TSOptionalType\" &&\n !(type === \"TSNamedTupleMember\" && elementNode.optional)\n ) {\n this.raise(TSErrors.OptionalTypeBeforeRequired, {\n node: elementNode,\n });\n }\n\n // Flow doesn't support ||=\n seenOptionalElement =\n seenOptionalElement ||\n (type === \"TSNamedTupleMember\" && elementNode.optional) ||\n type === \"TSOptionalType\";\n\n // When checking labels, check the argument of the spread operator\n if (type === \"TSRestType\") {\n elementNode = elementNode.typeAnnotation;\n type = elementNode.type;\n }\n\n const isLabeled = type === \"TSNamedTupleMember\";\n // Flow doesn't support ??=\n labeledElements = labeledElements ?? isLabeled;\n if (labeledElements !== isLabeled) {\n this.raise(TSErrors.MixedLabeledAndUnlabeledElements, {\n node: elementNode,\n });\n }\n });\n\n return this.finishNode(node, \"TSTupleType\");\n }\n\n tsParseTupleElementType(): N.TsType | N.TsNamedTupleMember {\n // parses `...TsType[]`\n\n const { start: startPos, startLoc } = this.state;\n\n const rest = this.eat(tt.ellipsis);\n let type = this.tsParseType();\n const optional = this.eat(tt.question);\n const labeled = this.eat(tt.colon);\n\n if (labeled) {\n const labeledNode: N.TsNamedTupleMember = this.startNodeAtNode(type);\n labeledNode.optional = optional;\n\n if (\n type.type === \"TSTypeReference\" &&\n !type.typeParameters &&\n type.typeName.type === \"Identifier\"\n ) {\n labeledNode.label = (type.typeName: N.Identifier);\n } else {\n this.raise(TSErrors.InvalidTupleMemberLabel, { node: type });\n // This produces an invalid AST, but at least we don't drop\n // nodes representing the invalid source.\n // $FlowIgnore\n labeledNode.label = type;\n }\n\n labeledNode.elementType = this.tsParseType();\n type = this.finishNode(labeledNode, \"TSNamedTupleMember\");\n } else if (optional) {\n const optionalTypeNode: N.TsOptionalType = this.startNodeAtNode(type);\n optionalTypeNode.typeAnnotation = type;\n type = this.finishNode(optionalTypeNode, \"TSOptionalType\");\n }\n\n if (rest) {\n const restNode: N.TsRestType = this.startNodeAt(startPos, startLoc);\n restNode.typeAnnotation = type;\n type = this.finishNode(restNode, \"TSRestType\");\n }\n\n return type;\n }\n\n tsParseParenthesizedType(): N.TsParenthesizedType {\n const node = this.startNode();\n this.expect(tt.parenL);\n node.typeAnnotation = this.tsParseType();\n this.expect(tt.parenR);\n return this.finishNode(node, \"TSParenthesizedType\");\n }\n\n tsParseFunctionOrConstructorType(\n type: \"TSFunctionType\" | \"TSConstructorType\",\n abstract?: boolean,\n ): N.TsFunctionOrConstructorType {\n const node: N.TsFunctionOrConstructorType = this.startNode();\n if (type === \"TSConstructorType\") {\n // $FlowIgnore\n node.abstract = !!abstract;\n if (abstract) this.next();\n this.next(); // eat `new`\n }\n this.tsFillSignature(tt.arrow, node);\n return this.finishNode(node, type);\n }\n\n tsParseLiteralTypeNode(): N.TsLiteralType {\n const node: N.TsLiteralType = this.startNode();\n node.literal = (() => {\n switch (this.state.type) {\n case tt.num:\n case tt.bigint:\n case tt.string:\n case tt._true:\n case tt._false:\n // For compatibility to estree we cannot call parseLiteral directly here\n return this.parseExprAtom();\n default:\n throw this.unexpected();\n }\n })();\n return this.finishNode(node, \"TSLiteralType\");\n }\n\n tsParseTemplateLiteralType(): N.TsType {\n const node: N.TsLiteralType = this.startNode();\n node.literal = this.parseTemplate(false);\n return this.finishNode(node, \"TSLiteralType\");\n }\n\n parseTemplateSubstitution(): N.TsType {\n if (this.state.inType) return this.tsParseType();\n return super.parseTemplateSubstitution();\n }\n\n tsParseThisTypeOrThisTypePredicate(): N.TsThisType | N.TsTypePredicate {\n const thisKeyword = this.tsParseThisTypeNode();\n if (this.isContextual(tt._is) && !this.hasPrecedingLineBreak()) {\n return this.tsParseThisTypePredicate(thisKeyword);\n } else {\n return thisKeyword;\n }\n }\n\n tsParseNonArrayType(): N.TsType {\n switch (this.state.type) {\n case tt.string:\n case tt.num:\n case tt.bigint:\n case tt._true:\n case tt._false:\n return this.tsParseLiteralTypeNode();\n case tt.plusMin:\n if (this.state.value === \"-\") {\n const node: N.TsLiteralType = this.startNode();\n const nextToken = this.lookahead();\n if (nextToken.type !== tt.num && nextToken.type !== tt.bigint) {\n throw this.unexpected();\n }\n node.literal = this.parseMaybeUnary();\n return this.finishNode(node, \"TSLiteralType\");\n }\n break;\n case tt._this:\n return this.tsParseThisTypeOrThisTypePredicate();\n case tt._typeof:\n return this.tsParseTypeQuery();\n case tt._import:\n return this.tsParseImportType();\n case tt.braceL:\n return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))\n ? this.tsParseMappedType()\n : this.tsParseTypeLiteral();\n case tt.bracketL:\n return this.tsParseTupleType();\n case tt.parenL:\n if (process.env.BABEL_8_BREAKING) {\n if (!this.options.createParenthesizedExpressions) {\n const startPos = this.state.start;\n this.next();\n const type = this.tsParseType();\n this.expect(tt.parenR);\n this.addExtra(type, \"parenthesized\", true);\n this.addExtra(type, \"parenStart\", startPos);\n return type;\n }\n }\n\n return this.tsParseParenthesizedType();\n case tt.templateNonTail:\n case tt.templateTail:\n return this.tsParseTemplateLiteralType();\n default: {\n const { type } = this.state;\n if (\n tokenIsIdentifier(type) ||\n type === tt._void ||\n type === tt._null\n ) {\n const nodeType =\n type === tt._void\n ? \"TSVoidKeyword\"\n : type === tt._null\n ? \"TSNullKeyword\"\n : keywordTypeFromName(this.state.value);\n if (\n nodeType !== undefined &&\n this.lookaheadCharCode() !== charCodes.dot\n ) {\n const node: N.TsKeywordType = this.startNode();\n this.next();\n return this.finishNode(node, nodeType);\n }\n return this.tsParseTypeReference();\n }\n }\n }\n\n throw this.unexpected();\n }\n\n tsParseArrayTypeOrHigher(): N.TsType {\n let type = this.tsParseNonArrayType();\n while (!this.hasPrecedingLineBreak() && this.eat(tt.bracketL)) {\n if (this.match(tt.bracketR)) {\n const node: N.TsArrayType = this.startNodeAtNode(type);\n node.elementType = type;\n this.expect(tt.bracketR);\n type = this.finishNode(node, \"TSArrayType\");\n } else {\n const node: N.TsIndexedAccessType = this.startNodeAtNode(type);\n node.objectType = type;\n node.indexType = this.tsParseType();\n this.expect(tt.bracketR);\n type = this.finishNode(node, \"TSIndexedAccessType\");\n }\n }\n return type;\n }\n\n tsParseTypeOperator(): N.TsTypeOperator {\n const node: N.TsTypeOperator = this.startNode();\n const operator = this.state.value;\n this.next(); // eat operator\n node.operator = operator;\n node.typeAnnotation = this.tsParseTypeOperatorOrHigher();\n\n if (operator === \"readonly\") {\n this.tsCheckTypeAnnotationForReadOnly(node);\n }\n\n return this.finishNode(node, \"TSTypeOperator\");\n }\n\n tsCheckTypeAnnotationForReadOnly(node: N.Node) {\n switch (node.typeAnnotation.type) {\n case \"TSTupleType\":\n case \"TSArrayType\":\n return;\n default:\n this.raise(TSErrors.UnexpectedReadonly, { node });\n }\n }\n\n tsParseInferType(): N.TsInferType {\n const node = this.startNode();\n this.expectContextual(tt._infer);\n const typeParameter = this.startNode();\n typeParameter.name = this.tsParseTypeParameterName();\n node.typeParameter = this.finishNode(typeParameter, \"TSTypeParameter\");\n return this.finishNode(node, \"TSInferType\");\n }\n\n tsParseTypeOperatorOrHigher(): N.TsType {\n const isTypeOperator =\n tokenIsTSTypeOperator(this.state.type) && !this.state.containsEsc;\n return isTypeOperator\n ? this.tsParseTypeOperator()\n : this.isContextual(tt._infer)\n ? this.tsParseInferType()\n : this.tsParseArrayTypeOrHigher();\n }\n\n tsParseUnionOrIntersectionType(\n kind: \"TSUnionType\" | \"TSIntersectionType\",\n parseConstituentType: () => N.TsType,\n operator: TokenType,\n ): N.TsType {\n const node: N.TsUnionType | N.TsIntersectionType = this.startNode();\n const hasLeadingOperator = this.eat(operator);\n const types = [];\n do {\n types.push(parseConstituentType());\n } while (this.eat(operator));\n if (types.length === 1 && !hasLeadingOperator) {\n return types[0];\n }\n node.types = types;\n return this.finishNode(node, kind);\n }\n\n tsParseIntersectionTypeOrHigher(): N.TsType {\n return this.tsParseUnionOrIntersectionType(\n \"TSIntersectionType\",\n this.tsParseTypeOperatorOrHigher.bind(this),\n tt.bitwiseAND,\n );\n }\n\n tsParseUnionTypeOrHigher() {\n return this.tsParseUnionOrIntersectionType(\n \"TSUnionType\",\n this.tsParseIntersectionTypeOrHigher.bind(this),\n tt.bitwiseOR,\n );\n }\n\n tsIsStartOfFunctionType() {\n if (this.match(tt.lt)) {\n return true;\n }\n return (\n this.match(tt.parenL) &&\n this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))\n );\n }\n\n tsSkipParameterStart(): boolean {\n if (tokenIsIdentifier(this.state.type) || this.match(tt._this)) {\n this.next();\n return true;\n }\n\n if (this.match(tt.braceL)) {\n let braceStackCounter = 1;\n this.next();\n\n while (braceStackCounter > 0) {\n if (this.match(tt.braceL)) {\n ++braceStackCounter;\n } else if (this.match(tt.braceR)) {\n --braceStackCounter;\n }\n this.next();\n }\n return true;\n }\n\n if (this.match(tt.bracketL)) {\n let braceStackCounter = 1;\n this.next();\n\n while (braceStackCounter > 0) {\n if (this.match(tt.bracketL)) {\n ++braceStackCounter;\n } else if (this.match(tt.bracketR)) {\n --braceStackCounter;\n }\n this.next();\n }\n return true;\n }\n\n return false;\n }\n\n tsIsUnambiguouslyStartOfFunctionType(): boolean {\n this.next();\n if (this.match(tt.parenR) || this.match(tt.ellipsis)) {\n // ( )\n // ( ...\n return true;\n }\n if (this.tsSkipParameterStart()) {\n if (\n this.match(tt.colon) ||\n this.match(tt.comma) ||\n this.match(tt.question) ||\n this.match(tt.eq)\n ) {\n // ( xxx :\n // ( xxx ,\n // ( xxx ?\n // ( xxx =\n return true;\n }\n if (this.match(tt.parenR)) {\n this.next();\n if (this.match(tt.arrow)) {\n // ( xxx ) =>\n return true;\n }\n }\n }\n return false;\n }\n\n tsParseTypeOrTypePredicateAnnotation(\n returnToken: TokenType,\n ): N.TsTypeAnnotation {\n return this.tsInType(() => {\n const t: N.TsTypeAnnotation = this.startNode();\n this.expect(returnToken);\n\n const node = this.startNode<N.TsTypePredicate>();\n\n const asserts = !!this.tsTryParse(\n this.tsParseTypePredicateAsserts.bind(this),\n );\n\n if (asserts && this.match(tt._this)) {\n // When asserts is false, thisKeyword is handled by tsParseNonArrayType\n // : asserts this is type\n let thisTypePredicate = this.tsParseThisTypeOrThisTypePredicate();\n // if it turns out to be a `TSThisType`, wrap it with `TSTypePredicate`\n // : asserts this\n if (thisTypePredicate.type === \"TSThisType\") {\n node.parameterName = (thisTypePredicate: N.TsThisType);\n node.asserts = true;\n (node: N.TsTypePredicate).typeAnnotation = null;\n thisTypePredicate = this.finishNode(node, \"TSTypePredicate\");\n } else {\n this.resetStartLocationFromNode(thisTypePredicate, node);\n (thisTypePredicate: N.TsTypePredicate).asserts = true;\n }\n t.typeAnnotation = thisTypePredicate;\n return this.finishNode(t, \"TSTypeAnnotation\");\n }\n\n const typePredicateVariable =\n this.tsIsIdentifier() &&\n this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));\n\n if (!typePredicateVariable) {\n if (!asserts) {\n // : type\n return this.tsParseTypeAnnotation(/* eatColon */ false, t);\n }\n\n // : asserts foo\n node.parameterName = this.parseIdentifier();\n node.asserts = asserts;\n (node: N.TsTypePredicate).typeAnnotation = null;\n t.typeAnnotation = this.finishNode(node, \"TSTypePredicate\");\n return this.finishNode(t, \"TSTypeAnnotation\");\n }\n\n // : asserts foo is type\n const type = this.tsParseTypeAnnotation(/* eatColon */ false);\n node.parameterName = typePredicateVariable;\n node.typeAnnotation = type;\n node.asserts = asserts;\n t.typeAnnotation = this.finishNode(node, \"TSTypePredicate\");\n return this.finishNode(t, \"TSTypeAnnotation\");\n });\n }\n\n tsTryParseTypeOrTypePredicateAnnotation(): ?N.TsTypeAnnotation {\n return this.match(tt.colon)\n ? this.tsParseTypeOrTypePredicateAnnotation(tt.colon)\n : undefined;\n }\n\n tsTryParseTypeAnnotation(): ?N.TsTypeAnnotation {\n return this.match(tt.colon) ? this.tsParseTypeAnnotation() : undefined;\n }\n\n tsTryParseType(): ?N.TsType {\n return this.tsEatThenParseType(tt.colon);\n }\n\n tsParseTypePredicatePrefix(): ?N.Identifier {\n const id = this.parseIdentifier();\n if (this.isContextual(tt._is) && !this.hasPrecedingLineBreak()) {\n this.next();\n return id;\n }\n }\n\n tsParseTypePredicateAsserts(): boolean {\n if (this.state.type !== tt._asserts) {\n return false;\n }\n const containsEsc = this.state.containsEsc;\n this.next();\n if (!tokenIsIdentifier(this.state.type) && !this.match(tt._this)) {\n return false;\n }\n\n if (containsEsc) {\n this.raise(\n Errors.InvalidEscapedReservedWord,\n { at: this.state.lastTokStartLoc },\n \"asserts\",\n );\n }\n\n return true;\n }\n\n tsParseTypeAnnotation(\n eatColon = true,\n t: N.TsTypeAnnotation = this.startNode(),\n ): N.TsTypeAnnotation {\n this.tsInType(() => {\n if (eatColon) this.expect(tt.colon);\n t.typeAnnotation = this.tsParseType();\n });\n return this.finishNode(t, \"TSTypeAnnotation\");\n }\n\n /** Be sure to be in a type context before calling this, using `tsInType`. */\n tsParseType(): N.TsType {\n // Need to set `state.inType` so that we don't parse JSX in a type context.\n assert(this.state.inType);\n const type = this.tsParseNonConditionalType();\n if (this.hasPrecedingLineBreak() || !this.eat(tt._extends)) {\n return type;\n }\n const node: N.TsConditionalType = this.startNodeAtNode(type);\n node.checkType = type;\n node.extendsType = this.tsParseNonConditionalType();\n this.expect(tt.question);\n node.trueType = this.tsParseType();\n this.expect(tt.colon);\n node.falseType = this.tsParseType();\n return this.finishNode(node, \"TSConditionalType\");\n }\n\n isAbstractConstructorSignature(): boolean {\n return (\n this.isContextual(tt._abstract) && this.lookahead().type === tt._new\n );\n }\n\n tsParseNonConditionalType(): N.TsType {\n if (this.tsIsStartOfFunctionType()) {\n return this.tsParseFunctionOrConstructorType(\"TSFunctionType\");\n }\n if (this.match(tt._new)) {\n // As in `new () => Date`\n return this.tsParseFunctionOrConstructorType(\"TSConstructorType\");\n } else if (this.isAbstractConstructorSignature()) {\n // As in `abstract new () => Date`\n return this.tsParseFunctionOrConstructorType(\n \"TSConstructorType\",\n /* abstract */ true,\n );\n }\n return this.tsParseUnionTypeOrHigher();\n }\n\n tsParseTypeAssertion(): N.TsTypeAssertion {\n if (this.getPluginOption(\"typescript\", \"disallowAmbiguousJSXLike\")) {\n this.raise(TSErrors.ReservedTypeAssertion, { at: this.state.startLoc });\n }\n\n const node: N.TsTypeAssertion = this.startNode();\n const _const = this.tsTryNextParseConstantContext();\n node.typeAnnotation = _const || this.tsNextThenParseType();\n this.expect(tt.gt);\n node.expression = this.parseMaybeUnary();\n return this.finishNode(node, \"TSTypeAssertion\");\n }\n\n tsParseHeritageClause(\n descriptor: string,\n ): $ReadOnlyArray<N.TsExpressionWithTypeArguments> {\n const originalStartLoc = this.state.startLoc;\n\n const delimitedList = this.tsParseDelimitedList(\n \"HeritageClauseElement\",\n this.tsParseExpressionWithTypeArguments.bind(this),\n );\n\n if (!delimitedList.length) {\n this.raise(\n TSErrors.EmptyHeritageClauseType,\n { at: originalStartLoc },\n descriptor,\n );\n }\n\n return delimitedList;\n }\n\n tsParseExpressionWithTypeArguments(): N.TsExpressionWithTypeArguments {\n const node: N.TsExpressionWithTypeArguments = this.startNode();\n // Note: TS uses parseLeftHandSideExpressionOrHigher,\n // then has grammar errors later if it's not an EntityName.\n node.expression = this.tsParseEntityName(/* allowReservedWords */ false);\n if (this.match(tt.lt)) {\n node.typeParameters = this.tsParseTypeArguments();\n }\n\n return this.finishNode(node, \"TSExpressionWithTypeArguments\");\n }\n\n tsParseInterfaceDeclaration(\n node: N.TsInterfaceDeclaration,\n ): N.TsInterfaceDeclaration {\n if (tokenIsIdentifier(this.state.type)) {\n node.id = this.parseIdentifier();\n this.checkLVal(\n node.id,\n \"typescript interface declaration\",\n BIND_TS_INTERFACE,\n );\n } else {\n node.id = null;\n this.raise(TSErrors.MissingInterfaceName, { at: this.state.startLoc });\n }\n\n node.typeParameters = this.tsTryParseTypeParameters();\n if (this.eat(tt._extends)) {\n node.extends = this.tsParseHeritageClause(\"extends\");\n }\n const body: N.TSInterfaceBody = this.startNode();\n body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));\n node.body = this.finishNode(body, \"TSInterfaceBody\");\n return this.finishNode(node, \"TSInterfaceDeclaration\");\n }\n\n tsParseTypeAliasDeclaration(\n node: N.TsTypeAliasDeclaration,\n ): N.TsTypeAliasDeclaration {\n node.id = this.parseIdentifier();\n this.checkLVal(node.id, \"typescript type alias\", BIND_TS_TYPE);\n\n node.typeParameters = this.tsTryParseTypeParameters();\n node.typeAnnotation = this.tsInType(() => {\n this.expect(tt.eq);\n\n if (\n this.isContextual(tt._intrinsic) &&\n this.lookahead().type !== tt.dot\n ) {\n const node: N.TsKeywordType = this.startNode();\n this.next();\n return this.finishNode(node, \"TSIntrinsicKeyword\");\n }\n\n return this.tsParseType();\n });\n\n this.semicolon();\n return this.finishNode(node, \"TSTypeAliasDeclaration\");\n }\n\n tsInNoContext<T>(cb: () => T): T {\n const oldContext = this.state.context;\n this.state.context = [oldContext[0]];\n try {\n return cb();\n } finally {\n this.state.context = oldContext;\n }\n }\n\n /**\n * Runs `cb` in a type context.\n * This should be called one token *before* the first type token,\n * so that the call to `next()` is run in type context.\n */\n tsInType<T>(cb: () => T): T {\n const oldInType = this.state.inType;\n this.state.inType = true;\n try {\n return cb();\n } finally {\n this.state.inType = oldInType;\n }\n }\n\n tsEatThenParseType(token: TokenType): N.TsType | typeof undefined {\n return !this.match(token) ? undefined : this.tsNextThenParseType();\n }\n\n tsExpectThenParseType(token: TokenType): N.TsType {\n return this.tsDoThenParseType(() => this.expect(token));\n }\n\n tsNextThenParseType(): N.TsType {\n return this.tsDoThenParseType(() => this.next());\n }\n\n tsDoThenParseType(cb: () => void): N.TsType {\n return this.tsInType(() => {\n cb();\n return this.tsParseType();\n });\n }\n\n tsParseEnumMember(): N.TsEnumMember {\n const node: N.TsEnumMember = this.startNode();\n // Computed property names are grammar errors in an enum, so accept just string literal or identifier.\n node.id = this.match(tt.string)\n ? this.parseExprAtom()\n : this.parseIdentifier(/* liberal */ true);\n if (this.eat(tt.eq)) {\n node.initializer = this.parseMaybeAssignAllowIn();\n }\n return this.finishNode(node, \"TSEnumMember\");\n }\n\n tsParseEnumDeclaration(\n node: N.TsEnumDeclaration,\n isConst: boolean,\n ): N.TsEnumDeclaration {\n if (isConst) node.const = true;\n node.id = this.parseIdentifier();\n this.checkLVal(\n node.id,\n \"typescript enum declaration\",\n isConst ? BIND_TS_CONST_ENUM : BIND_TS_ENUM,\n );\n\n this.expect(tt.braceL);\n node.members = this.tsParseDelimitedList(\n \"EnumMembers\",\n this.tsParseEnumMember.bind(this),\n );\n this.expect(tt.braceR);\n return this.finishNode(node, \"TSEnumDeclaration\");\n }\n\n tsParseModuleBlock(): N.TsModuleBlock {\n const node: N.TsModuleBlock = this.startNode();\n this.scope.enter(SCOPE_OTHER);\n\n this.expect(tt.braceL);\n // Inside of a module block is considered \"top-level\", meaning it can have imports and exports.\n this.parseBlockOrModuleBlockBody(\n (node.body = []),\n /* directives */ undefined,\n /* topLevel */ true,\n /* end */ tt.braceR,\n );\n this.scope.exit();\n return this.finishNode(node, \"TSModuleBlock\");\n }\n\n tsParseModuleOrNamespaceDeclaration(\n node: N.TsModuleDeclaration,\n nested?: boolean = false,\n ): N.TsModuleDeclaration {\n node.id = this.parseIdentifier();\n\n if (!nested) {\n this.checkLVal(\n node.id,\n \"module or namespace declaration\",\n BIND_TS_NAMESPACE,\n );\n }\n\n if (this.eat(tt.dot)) {\n const inner = this.startNode();\n this.tsParseModuleOrNamespaceDeclaration(inner, true);\n node.body = inner;\n } else {\n this.scope.enter(SCOPE_TS_MODULE);\n this.prodParam.enter(PARAM);\n node.body = this.tsParseModuleBlock();\n this.prodParam.exit();\n this.scope.exit();\n }\n return this.finishNode(node, \"TSModuleDeclaration\");\n }\n\n tsParseAmbientExternalModuleDeclaration(\n node: N.TsModuleDeclaration,\n ): N.TsModuleDeclaration {\n if (this.isContextual(tt._global)) {\n node.global = true;\n node.id = this.parseIdentifier();\n } else if (this.match(tt.string)) {\n node.id = this.parseExprAtom();\n } else {\n this.unexpected();\n }\n if (this.match(tt.braceL)) {\n this.scope.enter(SCOPE_TS_MODULE);\n this.prodParam.enter(PARAM);\n node.body = this.tsParseModuleBlock();\n this.prodParam.exit();\n this.scope.exit();\n } else {\n this.semicolon();\n }\n\n return this.finishNode(node, \"TSModuleDeclaration\");\n }\n\n tsParseImportEqualsDeclaration(\n node: N.TsImportEqualsDeclaration,\n isExport?: boolean,\n ): N.TsImportEqualsDeclaration {\n node.isExport = isExport || false;\n node.id = this.parseIdentifier();\n this.checkLVal(node.id, \"import equals declaration\", BIND_LEXICAL);\n this.expect(tt.eq);\n const moduleReference = this.tsParseModuleReference();\n if (\n node.importKind === \"type\" &&\n moduleReference.type !== \"TSExternalModuleReference\"\n ) {\n this.raise(TSErrors.ImportAliasHasImportType, {\n node: moduleReference,\n });\n }\n node.moduleReference = moduleReference;\n this.semicolon();\n return this.finishNode(node, \"TSImportEqualsDeclaration\");\n }\n\n tsIsExternalModuleReference(): boolean {\n return (\n this.isContextual(tt._require) &&\n this.lookaheadCharCode() === charCodes.leftParenthesis\n );\n }\n\n tsParseModuleReference(): N.TsModuleReference {\n return this.tsIsExternalModuleReference()\n ? this.tsParseExternalModuleReference()\n : this.tsParseEntityName(/* allowReservedWords */ false);\n }\n\n tsParseExternalModuleReference(): N.TsExternalModuleReference {\n const node: N.TsExternalModuleReference = this.startNode();\n this.expectContextual(tt._require);\n this.expect(tt.parenL);\n if (!this.match(tt.string)) {\n throw this.unexpected();\n }\n // For compatibility to estree we cannot call parseLiteral directly here\n node.expression = this.parseExprAtom();\n this.expect(tt.parenR);\n return this.finishNode(node, \"TSExternalModuleReference\");\n }\n\n // Utilities\n\n tsLookAhead<T>(f: () => T): T {\n const state = this.state.clone();\n const res = f();\n this.state = state;\n return res;\n }\n\n tsTryParseAndCatch<T: ?N.NodeBase>(f: () => T): ?T {\n const result = this.tryParse(abort => f() || abort());\n\n if (result.aborted || !result.node) return undefined;\n if (result.error) this.state = result.failState;\n return result.node;\n }\n\n tsTryParse<T>(f: () => ?T): ?T {\n const state = this.state.clone();\n const result = f();\n if (result !== undefined && result !== false) {\n return result;\n } else {\n this.state = state;\n return undefined;\n }\n }\n\n tsTryParseDeclare(nany: any): ?N.Declaration {\n if (this.isLineTerminator()) {\n return;\n }\n let starttype = this.state.type;\n let kind;\n\n if (this.isContextual(tt._let)) {\n starttype = tt._var;\n kind = \"let\";\n }\n\n return this.tsInAmbientContext(() => {\n switch (starttype) {\n case tt._function:\n nany.declare = true;\n return this.parseFunctionStatement(\n nany,\n /* async */ false,\n /* declarationPosition */ true,\n );\n case tt._class:\n // While this is also set by tsParseExpressionStatement, we need to set it\n // before parsing the class declaration to now how to register it in the scope.\n nany.declare = true;\n return this.parseClass(\n nany,\n /* isStatement */ true,\n /* optionalId */ false,\n );\n case tt._const:\n if (this.match(tt._const) && this.isLookaheadContextual(\"enum\")) {\n // `const enum = 0;` not allowed because \"enum\" is a strict mode reserved word.\n this.expect(tt._const);\n this.expectContextual(tt._enum);\n return this.tsParseEnumDeclaration(nany, /* isConst */ true);\n }\n // falls through\n case tt._var:\n kind = kind || this.state.value;\n return this.parseVarStatement(nany, kind);\n case tt._global:\n return this.tsParseAmbientExternalModuleDeclaration(nany);\n default: {\n if (tokenIsIdentifier(starttype)) {\n return this.tsParseDeclaration(\n nany,\n this.state.value,\n /* next */ true,\n );\n }\n }\n }\n });\n }\n\n // Note: this won't be called unless the keyword is allowed in `shouldParseExportDeclaration`.\n tsTryParseExportDeclaration(): ?N.Declaration {\n return this.tsParseDeclaration(\n this.startNode(),\n this.state.value,\n /* next */ true,\n );\n }\n\n tsParseExpressionStatement(node: any, expr: N.Identifier): ?N.Declaration {\n switch (expr.name) {\n case \"declare\": {\n const declaration = this.tsTryParseDeclare(node);\n if (declaration) {\n declaration.declare = true;\n return declaration;\n }\n break;\n }\n case \"global\":\n // `global { }` (with no `declare`) may appear inside an ambient module declaration.\n // Would like to use tsParseAmbientExternalModuleDeclaration here, but already ran past \"global\".\n if (this.match(tt.braceL)) {\n this.scope.enter(SCOPE_TS_MODULE);\n this.prodParam.enter(PARAM);\n const mod: N.TsModuleDeclaration = node;\n mod.global = true;\n mod.id = expr;\n mod.body = this.tsParseModuleBlock();\n this.scope.exit();\n this.prodParam.exit();\n return this.finishNode(mod, \"TSModuleDeclaration\");\n }\n break;\n\n default:\n return this.tsParseDeclaration(node, expr.name, /* next */ false);\n }\n }\n\n // Common to tsTryParseDeclare, tsTryParseExportDeclaration, and tsParseExpressionStatement.\n tsParseDeclaration(\n node: any,\n value: string,\n next: boolean,\n ): ?N.Declaration {\n // no declaration apart from enum can be followed by a line break.\n switch (value) {\n case \"abstract\":\n if (\n this.tsCheckLineTerminator(next) &&\n (this.match(tt._class) || tokenIsIdentifier(this.state.type))\n ) {\n return this.tsParseAbstractDeclaration(node);\n }\n break;\n\n case \"enum\":\n if (next || tokenIsIdentifier(this.state.type)) {\n if (next) this.next();\n return this.tsParseEnumDeclaration(node, /* isConst */ false);\n }\n break;\n\n case \"interface\":\n if (\n this.tsCheckLineTerminator(next) &&\n tokenIsIdentifier(this.state.type)\n ) {\n return this.tsParseInterfaceDeclaration(node);\n }\n break;\n\n case \"module\":\n if (this.tsCheckLineTerminator(next)) {\n if (this.match(tt.string)) {\n return this.tsParseAmbientExternalModuleDeclaration(node);\n } else if (tokenIsIdentifier(this.state.type)) {\n return this.tsParseModuleOrNamespaceDeclaration(node);\n }\n }\n break;\n\n case \"namespace\":\n if (\n this.tsCheckLineTerminator(next) &&\n tokenIsIdentifier(this.state.type)\n ) {\n return this.tsParseModuleOrNamespaceDeclaration(node);\n }\n break;\n\n case \"type\":\n if (\n this.tsCheckLineTerminator(next) &&\n tokenIsIdentifier(this.state.type)\n ) {\n return this.tsParseTypeAliasDeclaration(node);\n }\n break;\n }\n }\n\n tsCheckLineTerminator(next: boolean) {\n if (next) {\n if (this.hasFollowingLineBreak()) return false;\n this.next();\n return true;\n }\n return !this.isLineTerminator();\n }\n\n tsTryParseGenericAsyncArrowFunction(\n startPos: number,\n startLoc: Position,\n ): ?N.ArrowFunctionExpression {\n if (!this.match(tt.lt)) {\n return undefined;\n }\n\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n this.state.maybeInArrowParameters = true;\n\n const res: ?N.ArrowFunctionExpression = this.tsTryParseAndCatch(() => {\n const node: N.ArrowFunctionExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n node.typeParameters = this.tsParseTypeParameters();\n // Don't use overloaded parseFunctionParams which would look for \"<\" again.\n super.parseFunctionParams(node);\n node.returnType = this.tsTryParseTypeOrTypePredicateAnnotation();\n this.expect(tt.arrow);\n return node;\n });\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n\n if (!res) {\n return undefined;\n }\n\n return this.parseArrowExpression(\n res,\n /* params are already set */ null,\n /* async */ true,\n );\n }\n\n // Used when parsing type arguments from ES productions, where the first token\n // has been created without state.inType. Thus we need to rescan the lt token.\n tsParseTypeArgumentsInExpression(): N.TsTypeParameterInstantiation | void {\n if (this.reScan_lt() !== tt.lt) {\n return undefined;\n }\n return this.tsParseTypeArguments();\n }\n\n tsParseTypeArguments(): N.TsTypeParameterInstantiation {\n const node = this.startNode();\n node.params = this.tsInType(() =>\n // Temporarily remove a JSX parsing context, which makes us scan different tokens.\n this.tsInNoContext(() => {\n this.expect(tt.lt);\n return this.tsParseDelimitedList(\n \"TypeParametersOrArguments\",\n this.tsParseType.bind(this),\n );\n }),\n );\n if (node.params.length === 0) {\n this.raise(TSErrors.EmptyTypeArguments, { node });\n }\n this.expect(tt.gt);\n return this.finishNode(node, \"TSTypeParameterInstantiation\");\n }\n\n tsIsDeclarationStart(): boolean {\n return tokenIsTSDeclarationStart(this.state.type);\n }\n\n // ======================================================\n // OVERRIDES\n // ======================================================\n\n isExportDefaultSpecifier(): boolean {\n if (this.tsIsDeclarationStart()) return false;\n return super.isExportDefaultSpecifier();\n }\n\n parseAssignableListItem(\n allowModifiers: ?boolean,\n decorators: N.Decorator[],\n ): N.Pattern | N.TSParameterProperty {\n // Store original location/position to include modifiers in range\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n let accessibility: ?N.Accessibility;\n let readonly = false;\n let override = false;\n if (allowModifiers !== undefined) {\n const modified = {};\n this.tsParseModifiers(modified, [\n \"public\",\n \"private\",\n \"protected\",\n \"override\",\n \"readonly\",\n ]);\n accessibility = modified.accessibility;\n override = modified.override;\n readonly = modified.readonly;\n if (\n allowModifiers === false &&\n (accessibility || readonly || override)\n ) {\n this.raise(TSErrors.UnexpectedParameterModifier, { at: startLoc });\n }\n }\n\n const left = this.parseMaybeDefault();\n this.parseAssignableListItemTypes(left);\n const elt = this.parseMaybeDefault(left.start, left.loc.start, left);\n if (accessibility || readonly || override) {\n const pp: N.TSParameterProperty = this.startNodeAt(startPos, startLoc);\n if (decorators.length) {\n pp.decorators = decorators;\n }\n if (accessibility) pp.accessibility = accessibility;\n if (readonly) pp.readonly = readonly;\n if (override) pp.override = override;\n if (elt.type !== \"Identifier\" && elt.type !== \"AssignmentPattern\") {\n this.raise(TSErrors.UnsupportedParameterPropertyKind, { node: pp });\n }\n pp.parameter = ((elt: any): N.Identifier | N.AssignmentPattern);\n return this.finishNode(pp, \"TSParameterProperty\");\n }\n\n if (decorators.length) {\n left.decorators = decorators;\n }\n\n return elt;\n }\n\n parseFunctionBodyAndFinish(\n node: N.BodilessFunctionOrMethodBase,\n type: string,\n isMethod?: boolean = false,\n ): void {\n if (this.match(tt.colon)) {\n node.returnType = this.tsParseTypeOrTypePredicateAnnotation(tt.colon);\n }\n\n const bodilessType =\n type === \"FunctionDeclaration\"\n ? \"TSDeclareFunction\"\n : type === \"ClassMethod\" || type === \"ClassPrivateMethod\"\n ? \"TSDeclareMethod\"\n : undefined;\n if (bodilessType && !this.match(tt.braceL) && this.isLineTerminator()) {\n this.finishNode(node, bodilessType);\n return;\n }\n if (bodilessType === \"TSDeclareFunction\" && this.state.isAmbientContext) {\n this.raise(TSErrors.DeclareFunctionHasImplementation, { node });\n if (\n // $FlowIgnore\n node.declare\n ) {\n super.parseFunctionBodyAndFinish(node, bodilessType, isMethod);\n return;\n }\n }\n\n super.parseFunctionBodyAndFinish(node, type, isMethod);\n }\n\n registerFunctionStatementId(node: N.Function): void {\n if (!node.body && node.id) {\n // Function ids are validated after parsing their body.\n // For bodyless function, we need to do it here.\n this.checkLVal(node.id, \"function name\", BIND_TS_AMBIENT);\n } else {\n super.registerFunctionStatementId(...arguments);\n }\n }\n\n tsCheckForInvalidTypeCasts(items: $ReadOnlyArray<?N.Expression>) {\n items.forEach(node => {\n if (node?.type === \"TSTypeCastExpression\") {\n this.raise(TSErrors.UnexpectedTypeAnnotation, {\n node: node.typeAnnotation,\n });\n }\n });\n }\n\n toReferencedList(\n exprList: $ReadOnlyArray<?N.Expression>,\n isInParens?: boolean, // eslint-disable-line no-unused-vars\n ): $ReadOnlyArray<?N.Expression> {\n // Handles invalid scenarios like: `f(a:b)`, `(a:b);`, and `(a:b,c:d)`.\n //\n // Note that `f<T>(a:b)` goes through a different path and is handled\n // in `parseSubscript` directly.\n this.tsCheckForInvalidTypeCasts(exprList);\n return exprList;\n }\n\n parseArrayLike(...args): N.ArrayExpression | N.TupleExpression {\n const node = super.parseArrayLike(...args);\n\n if (node.type === \"ArrayExpression\") {\n this.tsCheckForInvalidTypeCasts(node.elements);\n }\n\n return node;\n }\n\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n state: N.ParseSubscriptState,\n ): N.Expression {\n if (!this.hasPrecedingLineBreak() && this.match(tt.bang)) {\n // When ! is consumed as a postfix operator (non-null assertion),\n // disallow JSX tag forming after. e.g. When parsing `p! < n.p!`\n // `<n.p` can not be a start of JSX tag\n this.state.canStartJSXElement = false;\n this.next();\n\n const nonNullExpression: N.TsNonNullExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n nonNullExpression.expression = base;\n return this.finishNode(nonNullExpression, \"TSNonNullExpression\");\n }\n\n let isOptionalCall = false;\n if (\n this.match(tt.questionDot) &&\n this.lookaheadCharCode() === charCodes.lessThan\n ) {\n if (noCalls) {\n state.stop = true;\n return base;\n }\n state.optionalChainMember = isOptionalCall = true;\n this.next();\n }\n\n // handles 'f<<T>'\n if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n let missingParenErrorLoc;\n // tsTryParseAndCatch is expensive, so avoid if not necessary.\n // There are number of things we are going to \"maybe\" parse, like type arguments on\n // tagged template expressions. If any of them fail, walk it back and continue.\n const result = this.tsTryParseAndCatch(() => {\n if (!noCalls && this.atPossibleAsyncArrow(base)) {\n // Almost certainly this is a generic async function `async <T>() => ...\n // But it might be a call with a type argument `async<T>();`\n const asyncArrowFn = this.tsTryParseGenericAsyncArrowFunction(\n startPos,\n startLoc,\n );\n if (asyncArrowFn) {\n return asyncArrowFn;\n }\n }\n\n const node: N.CallExpression = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n\n const typeArguments = this.tsParseTypeArgumentsInExpression();\n\n if (typeArguments) {\n if (isOptionalCall && !this.match(tt.parenL)) {\n missingParenErrorLoc = this.state.curPosition();\n this.unexpected();\n }\n\n if (!noCalls && this.eat(tt.parenL)) {\n // possibleAsync always false here, because we would have handled it above.\n // $FlowIgnore (won't be any undefined arguments)\n node.arguments = this.parseCallExpressionArguments(\n tt.parenR,\n /* possibleAsync */ false,\n );\n\n // Handles invalid case: `f<T>(a:b)`\n this.tsCheckForInvalidTypeCasts(node.arguments);\n\n node.typeParameters = typeArguments;\n if (state.optionalChainMember) {\n // $FlowIgnore\n node.optional = isOptionalCall;\n }\n\n return this.finishCallExpression(node, state.optionalChainMember);\n } else if (tokenIsTemplate(this.state.type)) {\n const result = this.parseTaggedTemplateExpression(\n base,\n startPos,\n startLoc,\n state,\n );\n result.typeParameters = typeArguments;\n return result;\n }\n }\n\n this.unexpected();\n });\n\n if (missingParenErrorLoc) {\n this.unexpected(missingParenErrorLoc, tt.parenL);\n }\n\n if (result) return result;\n }\n\n return super.parseSubscript(base, startPos, startLoc, noCalls, state);\n }\n\n parseNewArguments(node: N.NewExpression): void {\n // tsTryParseAndCatch is expensive, so avoid if not necessary.\n // 99% certain this is `new C<T>();`. But may be `new C < T;`, which is also legal.\n // Also handles `new C<<T>`\n if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n const typeParameters = this.tsTryParseAndCatch(() => {\n const args = this.tsParseTypeArgumentsInExpression();\n if (!this.match(tt.parenL)) this.unexpected();\n return args;\n });\n if (typeParameters) {\n node.typeParameters = typeParameters;\n }\n }\n\n super.parseNewArguments(node);\n }\n\n parseExprOp(\n left: N.Expression,\n leftStartPos: number,\n leftStartLoc: Position,\n minPrec: number,\n ) {\n if (\n tokenOperatorPrecedence(tt._in) > minPrec &&\n !this.hasPrecedingLineBreak() &&\n this.isContextual(tt._as)\n ) {\n const node: N.TsAsExpression = this.startNodeAt(\n leftStartPos,\n leftStartLoc,\n );\n node.expression = left;\n const _const = this.tsTryNextParseConstantContext();\n if (_const) {\n node.typeAnnotation = _const;\n } else {\n node.typeAnnotation = this.tsNextThenParseType();\n }\n this.finishNode(node, \"TSAsExpression\");\n // rescan `<`, `>` because they were scanned when this.state.inType was true\n this.reScan_lt_gt();\n return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);\n }\n\n return super.parseExprOp(left, leftStartPos, leftStartLoc, minPrec);\n }\n\n checkReservedWord(\n word: string, // eslint-disable-line no-unused-vars\n startLoc: Position, // eslint-disable-line no-unused-vars\n checkKeywords: boolean, // eslint-disable-line no-unused-vars\n // eslint-disable-next-line no-unused-vars\n isBinding: boolean,\n ): void {\n // Don't bother checking for TypeScript code.\n // Strict mode words may be allowed as in `declare namespace N { const static: number; }`.\n // And we have a type checker anyway, so don't bother having the parser do it.\n }\n\n /*\n Don't bother doing this check in TypeScript code because:\n 1. We may have a nested export statement with the same name:\n export const x = 0;\n export namespace N {\n export const x = 1;\n }\n 2. We have a type checker to warn us about this sort of thing.\n */\n checkDuplicateExports() {}\n\n parseImport(node: N.Node): N.AnyImport {\n node.importKind = \"value\";\n if (\n tokenIsIdentifier(this.state.type) ||\n this.match(tt.star) ||\n this.match(tt.braceL)\n ) {\n let ahead = this.lookahead();\n\n if (\n this.isContextual(tt._type) &&\n // import type, { a } from \"b\";\n ahead.type !== tt.comma &&\n // import type from \"a\";\n ahead.type !== tt._from &&\n // import type = require(\"a\");\n ahead.type !== tt.eq\n ) {\n node.importKind = \"type\";\n this.next();\n ahead = this.lookahead();\n }\n\n if (tokenIsIdentifier(this.state.type) && ahead.type === tt.eq) {\n return this.tsParseImportEqualsDeclaration(node);\n }\n }\n\n const importNode = super.parseImport(node);\n /*:: invariant(importNode.type !== \"TSImportEqualsDeclaration\") */\n\n // `import type` can only be used on imports with named imports or with a\n // default import - but not both\n if (\n importNode.importKind === \"type\" &&\n importNode.specifiers.length > 1 &&\n importNode.specifiers[0].type === \"ImportDefaultSpecifier\"\n ) {\n this.raise(TSErrors.TypeImportCannotSpecifyDefaultAndNamed, {\n node: importNode,\n });\n }\n\n return importNode;\n }\n\n parseExport(node: N.Node): N.AnyExport {\n if (this.match(tt._import)) {\n // `export import A = B;`\n this.next(); // eat `tt._import`\n if (\n this.isContextual(tt._type) &&\n this.lookaheadCharCode() !== charCodes.equalsTo\n ) {\n node.importKind = \"type\";\n this.next(); // eat \"type\"\n } else {\n node.importKind = \"value\";\n }\n return this.tsParseImportEqualsDeclaration(node, /* isExport */ true);\n } else if (this.eat(tt.eq)) {\n // `export = x;`\n const assign: N.TsExportAssignment = node;\n assign.expression = this.parseExpression();\n this.semicolon();\n return this.finishNode(assign, \"TSExportAssignment\");\n } else if (this.eatContextual(tt._as)) {\n // `export as namespace A;`\n const decl: N.TsNamespaceExportDeclaration = node;\n // See `parseNamespaceExportDeclaration` in TypeScript's own parser\n this.expectContextual(tt._namespace);\n decl.id = this.parseIdentifier();\n this.semicolon();\n return this.finishNode(decl, \"TSNamespaceExportDeclaration\");\n } else {\n if (\n this.isContextual(tt._type) &&\n this.lookahead().type === tt.braceL\n ) {\n this.next();\n node.exportKind = \"type\";\n } else {\n node.exportKind = \"value\";\n }\n\n return super.parseExport(node);\n }\n }\n\n isAbstractClass(): boolean {\n return (\n this.isContextual(tt._abstract) && this.lookahead().type === tt._class\n );\n }\n\n parseExportDefaultExpression(): N.Expression | N.Declaration {\n if (this.isAbstractClass()) {\n const cls = this.startNode();\n this.next(); // Skip \"abstract\"\n cls.abstract = true;\n this.parseClass(cls, true, true);\n return cls;\n }\n\n // export default interface allowed in:\n // https://github.com/Microsoft/TypeScript/pull/16040\n if (this.match(tt._interface)) {\n const interfaceNode = this.startNode();\n this.next();\n const result = this.tsParseInterfaceDeclaration(interfaceNode);\n if (result) return result;\n }\n\n return super.parseExportDefaultExpression();\n }\n\n parseStatementContent(context: ?string, topLevel: ?boolean): N.Statement {\n if (this.state.type === tt._const) {\n const ahead = this.lookahead();\n if (ahead.type === tt._enum) {\n const node: N.TsEnumDeclaration = this.startNode();\n this.next(); // eat 'const'\n this.expectContextual(tt._enum);\n return this.tsParseEnumDeclaration(node, /* isConst */ true);\n }\n }\n return super.parseStatementContent(context, topLevel);\n }\n\n parseAccessModifier(): ?N.Accessibility {\n return this.tsParseModifier([\"public\", \"protected\", \"private\"]);\n }\n\n tsHasSomeModifiers(member: any, modifiers: TsModifier[]): boolean {\n return modifiers.some(modifier => {\n if (tsIsAccessModifier(modifier)) {\n return member.accessibility === modifier;\n }\n return !!member[modifier];\n });\n }\n\n tsIsStartOfStaticBlocks() {\n return (\n this.isContextual(tt._static) &&\n this.lookaheadCharCode() === charCodes.leftCurlyBrace\n );\n }\n\n parseClassMember(\n classBody: N.ClassBody,\n member: any,\n state: N.ParseClassMemberState,\n ): void {\n const modifiers = [\n \"declare\",\n \"private\",\n \"public\",\n \"protected\",\n \"override\",\n \"abstract\",\n \"readonly\",\n \"static\",\n ];\n this.tsParseModifiers(\n member,\n modifiers,\n /* disallowedModifiers */ undefined,\n /* errorTemplate */ undefined,\n /* stopOnStartOfClassStaticBlock */ true,\n );\n\n const callParseClassMemberWithIsStatic = () => {\n if (this.tsIsStartOfStaticBlocks()) {\n this.next(); // eat \"static\"\n this.next(); // eat \"{\"\n if (this.tsHasSomeModifiers(member, modifiers)) {\n this.raise(TSErrors.StaticBlockCannotHaveModifier, {\n at: this.state.curPosition(),\n });\n }\n this.parseClassStaticBlock(classBody, ((member: any): N.StaticBlock));\n } else {\n this.parseClassMemberWithIsStatic(\n classBody,\n member,\n state,\n !!member.static,\n );\n }\n };\n if (member.declare) {\n this.tsInAmbientContext(callParseClassMemberWithIsStatic);\n } else {\n callParseClassMemberWithIsStatic();\n }\n }\n\n parseClassMemberWithIsStatic(\n classBody: N.ClassBody,\n member: N.ClassMember | N.TsIndexSignature,\n state: N.ParseClassMemberState,\n isStatic: boolean,\n ): void {\n const idx = this.tsTryParseIndexSignature(member);\n if (idx) {\n classBody.body.push(idx);\n\n if ((member: any).abstract) {\n this.raise(TSErrors.IndexSignatureHasAbstract, { node: member });\n }\n if ((member: any).accessibility) {\n this.raise(\n TSErrors.IndexSignatureHasAccessibility,\n { node: member },\n (member: any).accessibility,\n );\n }\n if ((member: any).declare) {\n this.raise(TSErrors.IndexSignatureHasDeclare, { node: member });\n }\n if ((member: any).override) {\n this.raise(TSErrors.IndexSignatureHasOverride, { node: member });\n }\n\n return;\n }\n\n if (!this.state.inAbstractClass && (member: any).abstract) {\n this.raise(TSErrors.NonAbstractClassHasAbstractMethod, {\n node: member,\n });\n }\n\n if ((member: any).override) {\n if (!state.hadSuperClass) {\n this.raise(TSErrors.OverrideNotInSubClass, { node: member });\n }\n }\n\n /*:: invariant(member.type !== \"TSIndexSignature\") */\n\n super.parseClassMemberWithIsStatic(classBody, member, state, isStatic);\n }\n\n parsePostMemberNameModifiers(\n methodOrProp: N.ClassMethod | N.ClassProperty | N.ClassPrivateProperty,\n ): void {\n const optional = this.eat(tt.question);\n if (optional) methodOrProp.optional = true;\n\n if ((methodOrProp: any).readonly && this.match(tt.parenL)) {\n this.raise(TSErrors.ClassMethodHasReadonly, { node: methodOrProp });\n }\n\n if ((methodOrProp: any).declare && this.match(tt.parenL)) {\n this.raise(TSErrors.ClassMethodHasDeclare, { node: methodOrProp });\n }\n }\n\n // Note: The reason we do this in `parseExpressionStatement` and not `parseStatement`\n // is that e.g. `type()` is valid JS, so we must try parsing that first.\n // If it's really a type, we will parse `type` as the statement, and can correct it here\n // by parsing the rest.\n parseExpressionStatement(\n node: N.ExpressionStatement,\n expr: N.Expression,\n ): N.Statement {\n const decl =\n expr.type === \"Identifier\"\n ? this.tsParseExpressionStatement(node, expr)\n : undefined;\n return decl || super.parseExpressionStatement(node, expr);\n }\n\n // export type\n // Should be true for anything parsed by `tsTryParseExportDeclaration`.\n shouldParseExportDeclaration(): boolean {\n if (this.tsIsDeclarationStart()) return true;\n return super.shouldParseExportDeclaration();\n }\n\n // An apparent conditional expression could actually be an optional parameter in an arrow function.\n parseConditional(\n expr: N.Expression,\n startPos: number,\n startLoc: Position,\n refExpressionErrors?: ?ExpressionErrors,\n ): N.Expression {\n // only do the expensive clone if there is a question mark\n // and if we come from inside parens\n if (!this.state.maybeInArrowParameters || !this.match(tt.question)) {\n return super.parseConditional(\n expr,\n startPos,\n startLoc,\n refExpressionErrors,\n );\n }\n\n const result = this.tryParse(() =>\n super.parseConditional(expr, startPos, startLoc),\n );\n\n if (!result.node) {\n if (result.error) {\n /*:: invariant(refExpressionErrors != null) */\n super.setOptionalParametersError(refExpressionErrors, result.error);\n }\n\n return expr;\n }\n if (result.error) this.state = result.failState;\n return result.node;\n }\n\n // Note: These \"type casts\" are *not* valid TS expressions.\n // But we parse them here and change them when completing the arrow function.\n parseParenItem(\n node: N.Expression,\n startPos: number,\n startLoc: Position,\n ): N.Expression {\n node = super.parseParenItem(node, startPos, startLoc);\n if (this.eat(tt.question)) {\n node.optional = true;\n // Include questionmark in location of node\n // Don't use this.finishNode() as otherwise we might process comments twice and\n // include already consumed parens\n this.resetEndLocation(node);\n }\n\n if (this.match(tt.colon)) {\n const typeCastNode: N.TsTypeCastExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n typeCastNode.expression = node;\n typeCastNode.typeAnnotation = this.tsParseTypeAnnotation();\n\n return this.finishNode(typeCastNode, \"TSTypeCastExpression\");\n }\n\n return node;\n }\n\n parseExportDeclaration(node: N.ExportNamedDeclaration): ?N.Declaration {\n // Store original location/position\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n // \"export declare\" is equivalent to just \"export\".\n const isDeclare = this.eatContextual(tt._declare);\n\n if (\n isDeclare &&\n (this.isContextual(tt._declare) || !this.shouldParseExportDeclaration())\n ) {\n throw this.raise(TSErrors.ExpectedAmbientAfterExportDeclare, {\n at: this.state.startLoc,\n });\n }\n\n let declaration: ?N.Declaration;\n\n if (tokenIsIdentifier(this.state.type)) {\n declaration = this.tsTryParseExportDeclaration();\n }\n if (!declaration) {\n declaration = super.parseExportDeclaration(node);\n }\n if (\n declaration &&\n (declaration.type === \"TSInterfaceDeclaration\" ||\n declaration.type === \"TSTypeAliasDeclaration\" ||\n isDeclare)\n ) {\n node.exportKind = \"type\";\n }\n\n if (declaration && isDeclare) {\n // Reset location to include `declare` in range\n this.resetStartLocation(declaration, startPos, startLoc);\n\n declaration.declare = true;\n }\n\n return declaration;\n }\n\n parseClassId(\n node: N.Class,\n isStatement: boolean,\n optionalId: ?boolean,\n ): void {\n if ((!isStatement || optionalId) && this.isContextual(tt._implements)) {\n return;\n }\n\n super.parseClassId(\n node,\n isStatement,\n optionalId,\n (node: any).declare ? BIND_TS_AMBIENT : BIND_CLASS,\n );\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) node.typeParameters = typeParameters;\n }\n\n parseClassPropertyAnnotation(\n node: N.ClassProperty | N.ClassPrivateProperty,\n ): void {\n if (!node.optional && this.eat(tt.bang)) {\n node.definite = true;\n }\n\n const type = this.tsTryParseTypeAnnotation();\n if (type) node.typeAnnotation = type;\n }\n\n parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n this.parseClassPropertyAnnotation(node);\n\n if (this.state.isAmbientContext && this.match(tt.eq)) {\n this.raise(TSErrors.DeclareClassFieldHasInitializer, {\n at: this.state.startLoc,\n });\n }\n if (node.abstract && this.match(tt.eq)) {\n const { key } = node;\n this.raise(\n TSErrors.AbstractPropertyHasInitializer,\n { at: this.state.startLoc },\n key.type === \"Identifier\" && !node.computed\n ? key.name\n : `[${this.input.slice(key.start, key.end)}]`,\n );\n }\n\n return super.parseClassProperty(node);\n }\n\n parseClassPrivateProperty(\n node: N.ClassPrivateProperty,\n ): N.ClassPrivateProperty {\n // $FlowIgnore\n if (node.abstract) {\n this.raise(TSErrors.PrivateElementHasAbstract, { node });\n }\n\n // $FlowIgnore\n if (node.accessibility) {\n this.raise(\n TSErrors.PrivateElementHasAccessibility,\n { node },\n node.accessibility,\n );\n }\n\n this.parseClassPropertyAnnotation(node);\n return super.parseClassPrivateProperty(node);\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters && isConstructor) {\n this.raise(TSErrors.ConstructorHasTypeParameters, {\n node: typeParameters,\n });\n }\n\n // $FlowIgnore\n if (method.declare && (method.kind === \"get\" || method.kind === \"set\")) {\n this.raise(TSErrors.DeclareAccessor, { node: method }, method.kind);\n }\n if (typeParameters) method.typeParameters = typeParameters;\n super.pushClassMethod(\n classBody,\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n );\n }\n\n pushClassPrivateMethod(\n classBody: N.ClassBody,\n method: N.ClassPrivateMethod,\n isGenerator: boolean,\n isAsync: boolean,\n ): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) method.typeParameters = typeParameters;\n super.pushClassPrivateMethod(classBody, method, isGenerator, isAsync);\n }\n\n declareClassPrivateMethodInScope(\n node: N.ClassPrivateMethod | N.EstreeMethodDefinition | N.TSDeclareMethod,\n kind: number,\n ) {\n if (node.type === \"TSDeclareMethod\") return;\n // This happens when using the \"estree\" plugin.\n if (node.type === \"MethodDefinition\" && !node.value.body) return;\n\n super.declareClassPrivateMethodInScope(node, kind);\n }\n\n parseClassSuper(node: N.Class): void {\n super.parseClassSuper(node);\n // handle `extends f<<T>\n if (node.superClass && (this.match(tt.lt) || this.match(tt.bitShiftL))) {\n node.superTypeParameters = this.tsParseTypeArgumentsInExpression();\n }\n if (this.eatContextual(tt._implements)) {\n node.implements = this.tsParseHeritageClause(\"implements\");\n }\n }\n\n parseObjPropValue(prop: N.ObjectMember, ...args): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) prop.typeParameters = typeParameters;\n\n super.parseObjPropValue(prop, ...args);\n }\n\n parseFunctionParams(node: N.Function, allowModifiers?: boolean): void {\n const typeParameters = this.tsTryParseTypeParameters();\n if (typeParameters) node.typeParameters = typeParameters;\n super.parseFunctionParams(node, allowModifiers);\n }\n\n // `let x: number;`\n parseVarId(\n decl: N.VariableDeclarator,\n kind: \"var\" | \"let\" | \"const\",\n ): void {\n super.parseVarId(decl, kind);\n if (\n decl.id.type === \"Identifier\" &&\n !this.hasPrecedingLineBreak() &&\n this.eat(tt.bang)\n ) {\n decl.definite = true;\n }\n\n const type = this.tsTryParseTypeAnnotation();\n if (type) {\n decl.id.typeAnnotation = type;\n this.resetEndLocation(decl.id); // set end position to end of type\n }\n }\n\n // parse the return type of an async arrow function - let foo = (async (): number => {});\n parseAsyncArrowFromCallExpression(\n node: N.ArrowFunctionExpression,\n call: N.CallExpression,\n ): N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n node.returnType = this.tsParseTypeAnnotation();\n }\n return super.parseAsyncArrowFromCallExpression(node, call);\n }\n\n parseMaybeAssign(...args): N.Expression {\n // Note: When the JSX plugin is on, type assertions (`<T> x`) aren't valid syntax.\n\n let state: ?State;\n let jsx;\n let typeCast;\n\n if (\n this.hasPlugin(\"jsx\") &&\n (this.match(tt.jsxTagStart) || this.match(tt.lt))\n ) {\n // Prefer to parse JSX if possible. But may be an arrow fn.\n state = this.state.clone();\n\n jsx = this.tryParse(() => super.parseMaybeAssign(...args), state);\n\n /*:: invariant(!jsx.aborted) */\n /*:: invariant(jsx.node != null) */\n if (!jsx.error) return jsx.node;\n\n // Remove `tc.j_expr` or `tc.j_oTag` from context added\n // by parsing `jsxTagStart` to stop the JSX plugin from\n // messing with the tokens\n const { context } = this.state;\n const currentContext = context[context.length - 1];\n if (currentContext === tc.j_oTag || currentContext === tc.j_expr) {\n context.pop();\n }\n }\n\n if (!jsx?.error && !this.match(tt.lt)) {\n return super.parseMaybeAssign(...args);\n }\n\n // Either way, we're looking at a '<': tt.jsxTagStart or relational.\n\n let typeParameters: ?N.TsTypeParameterDeclaration;\n state = state || this.state.clone();\n\n const arrow = this.tryParse(abort => {\n // This is similar to TypeScript's `tryParseParenthesizedArrowFunctionExpression`.\n typeParameters = this.tsParseTypeParameters();\n const expr = super.parseMaybeAssign(...args);\n\n if (\n expr.type !== \"ArrowFunctionExpression\" ||\n expr.extra?.parenthesized\n ) {\n abort();\n }\n\n // Correct TypeScript code should have at least 1 type parameter, but don't crash on bad code.\n if (typeParameters?.params.length !== 0) {\n this.resetStartLocationFromNode(expr, typeParameters);\n }\n expr.typeParameters = typeParameters;\n return expr;\n }, state);\n\n /*:: invariant(arrow.node != null) */\n if (!arrow.error && !arrow.aborted) {\n // This error is reported outside of the this.tryParse call so that\n // in case of <T>(x) => 2, we don't consider <T>(x) as a type assertion\n // because of this error.\n if (typeParameters) this.reportReservedArrowTypeParam(typeParameters);\n return arrow.node;\n }\n\n if (!jsx) {\n // Try parsing a type cast instead of an arrow function.\n // This will never happen outside of JSX.\n // (Because in JSX the '<' should be a jsxTagStart and not a relational.\n assert(!this.hasPlugin(\"jsx\"));\n\n // This will start with a type assertion (via parseMaybeUnary).\n // But don't directly call `this.tsParseTypeAssertion` because we want to handle any binary after it.\n typeCast = this.tryParse(() => super.parseMaybeAssign(...args), state);\n /*:: invariant(!typeCast.aborted) */\n /*:: invariant(typeCast.node != null) */\n if (!typeCast.error) return typeCast.node;\n }\n\n if (jsx?.node) {\n /*:: invariant(jsx.failState) */\n this.state = jsx.failState;\n return jsx.node;\n }\n\n if (arrow.node) {\n /*:: invariant(arrow.failState) */\n this.state = arrow.failState;\n if (typeParameters) this.reportReservedArrowTypeParam(typeParameters);\n return arrow.node;\n }\n\n if (typeCast?.node) {\n /*:: invariant(typeCast.failState) */\n this.state = typeCast.failState;\n return typeCast.node;\n }\n\n if (jsx?.thrown) throw jsx.error;\n if (arrow.thrown) throw arrow.error;\n if (typeCast?.thrown) throw typeCast.error;\n\n throw jsx?.error || arrow.error || typeCast?.error;\n }\n\n reportReservedArrowTypeParam(node: any) {\n if (\n node.params.length === 1 &&\n !node.extra?.trailingComma &&\n this.getPluginOption(\"typescript\", \"disallowAmbiguousJSXLike\")\n ) {\n this.raise(TSErrors.ReservedArrowTypeParam, { node });\n }\n }\n\n // Handle type assertions\n parseMaybeUnary(refExpressionErrors?: ?ExpressionErrors): N.Expression {\n if (!this.hasPlugin(\"jsx\") && this.match(tt.lt)) {\n return this.tsParseTypeAssertion();\n } else {\n return super.parseMaybeUnary(refExpressionErrors);\n }\n }\n\n parseArrow(node: N.ArrowFunctionExpression): ?N.ArrowFunctionExpression {\n if (this.match(tt.colon)) {\n // This is different from how the TS parser does it.\n // TS uses lookahead. The Babel Parser parses it as a parenthesized expression and converts.\n\n const result = this.tryParse(abort => {\n const returnType = this.tsParseTypeOrTypePredicateAnnotation(\n tt.colon,\n );\n if (this.canInsertSemicolon() || !this.match(tt.arrow)) abort();\n return returnType;\n });\n\n if (result.aborted) return;\n\n if (!result.thrown) {\n if (result.error) this.state = result.failState;\n node.returnType = result.node;\n }\n }\n\n return super.parseArrow(node);\n }\n\n // Allow type annotations inside of a parameter list.\n parseAssignableListItemTypes(param: N.Pattern) {\n if (this.eat(tt.question)) {\n if (\n param.type !== \"Identifier\" &&\n !this.state.isAmbientContext &&\n !this.state.inType\n ) {\n this.raise(TSErrors.PatternIsOptional, { node: param });\n }\n\n ((param: any): N.Identifier).optional = true;\n }\n const type = this.tsTryParseTypeAnnotation();\n if (type) param.typeAnnotation = type;\n this.resetEndLocation(param);\n\n return param;\n }\n\n isAssignable(node: N.Node, isBinding?: boolean): boolean {\n switch (node.type) {\n case \"TSTypeCastExpression\":\n return this.isAssignable(node.expression, isBinding);\n case \"TSParameterProperty\":\n return true;\n default:\n return super.isAssignable(node, isBinding);\n }\n }\n\n toAssignable(node: N.Node, isLHS: boolean = false): N.Node {\n switch (node.type) {\n case \"TSTypeCastExpression\":\n return super.toAssignable(this.typeCastToParameter(node), isLHS);\n case \"TSParameterProperty\":\n return super.toAssignable(node, isLHS);\n case \"ParenthesizedExpression\":\n return this.toAssignableParenthesizedExpression(node, isLHS);\n case \"TSAsExpression\":\n case \"TSNonNullExpression\":\n case \"TSTypeAssertion\":\n node.expression = this.toAssignable(node.expression, isLHS);\n return node;\n default:\n return super.toAssignable(node, isLHS);\n }\n }\n\n toAssignableParenthesizedExpression(node: N.Node, isLHS: boolean) {\n switch (node.expression.type) {\n case \"TSAsExpression\":\n case \"TSNonNullExpression\":\n case \"TSTypeAssertion\":\n case \"ParenthesizedExpression\":\n node.expression = this.toAssignable(node.expression, isLHS);\n return node;\n default:\n return super.toAssignable(node, isLHS);\n }\n }\n\n checkLVal(\n expr: N.Expression,\n contextDescription: string,\n ...args:\n | [BindingTypes | void]\n | [BindingTypes | void, ?Set<string>, boolean | void, boolean | void]\n ): void {\n switch (expr.type) {\n case \"TSTypeCastExpression\":\n // Allow \"typecasts\" to appear on the left of assignment expressions,\n // because it may be in an arrow function.\n // e.g. `const f = (foo: number = 0) => foo;`\n return;\n case \"TSParameterProperty\":\n this.checkLVal(expr.parameter, \"parameter property\", ...args);\n return;\n case \"TSAsExpression\":\n case \"TSTypeAssertion\":\n if (\n /*bindingType*/ !args[0] &&\n contextDescription !== \"parenthesized expression\" &&\n !expr.extra?.parenthesized\n ) {\n this.raise(Errors.InvalidLhs, { node: expr }, contextDescription);\n break;\n }\n this.checkLVal(expr.expression, \"parenthesized expression\", ...args);\n return;\n case \"TSNonNullExpression\":\n this.checkLVal(expr.expression, contextDescription, ...args);\n return;\n default:\n super.checkLVal(expr, contextDescription, ...args);\n return;\n }\n }\n\n parseBindingAtom(): N.Pattern {\n switch (this.state.type) {\n case tt._this:\n // \"this\" may be the name of a parameter, so allow it.\n return this.parseIdentifier(/* liberal */ true);\n default:\n return super.parseBindingAtom();\n }\n }\n\n parseMaybeDecoratorArguments(expr: N.Expression): N.Expression {\n // handles `@f<<T>`\n if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n const typeArguments = this.tsParseTypeArgumentsInExpression();\n\n if (this.match(tt.parenL)) {\n const call = super.parseMaybeDecoratorArguments(expr);\n call.typeParameters = typeArguments;\n return call;\n }\n\n this.unexpected(null, tt.parenL);\n }\n\n return super.parseMaybeDecoratorArguments(expr);\n }\n\n checkCommaAfterRest(close): boolean {\n if (\n this.state.isAmbientContext &&\n this.match(tt.comma) &&\n this.lookaheadCharCode() === close\n ) {\n this.next();\n return false;\n } else {\n return super.checkCommaAfterRest(close);\n }\n }\n\n // === === === === === === === === === === === === === === === ===\n // Note: All below methods are duplicates of something in flow.js.\n // Not sure what the best way to combine these is.\n // === === === === === === === === === === === === === === === ===\n\n isClassMethod(): boolean {\n return this.match(tt.lt) || super.isClassMethod();\n }\n\n isClassProperty(): boolean {\n return (\n this.match(tt.bang) || this.match(tt.colon) || super.isClassProperty()\n );\n }\n\n parseMaybeDefault(...args): N.Pattern {\n const node = super.parseMaybeDefault(...args);\n\n if (\n node.type === \"AssignmentPattern\" &&\n node.typeAnnotation &&\n node.right.start < node.typeAnnotation.start\n ) {\n this.raise(TSErrors.TypeAnnotationAfterAssign, {\n node: node.typeAnnotation,\n });\n }\n\n return node;\n }\n\n // ensure that inside types, we bypass the jsx parser plugin\n getTokenFromCode(code: number): void {\n if (this.state.inType) {\n if (code === charCodes.greaterThan) {\n return this.finishOp(tt.gt, 1);\n }\n if (code === charCodes.lessThan) {\n return this.finishOp(tt.lt, 1);\n }\n }\n return super.getTokenFromCode(code);\n }\n\n // used after we have finished parsing types\n reScan_lt_gt() {\n const { type } = this.state;\n if (type === tt.lt) {\n this.state.pos -= 1;\n this.readToken_lt();\n } else if (type === tt.gt) {\n this.state.pos -= 1;\n this.readToken_gt();\n }\n }\n\n reScan_lt() {\n const { type } = this.state;\n if (type === tt.bitShiftL) {\n this.state.pos -= 2;\n this.finishOp(tt.lt, 1);\n return tt.lt;\n }\n return type;\n }\n\n toAssignableList(exprList: N.Expression[]): $ReadOnlyArray<N.Pattern> {\n for (let i = 0; i < exprList.length; i++) {\n const expr = exprList[i];\n if (!expr) continue;\n switch (expr.type) {\n case \"TSTypeCastExpression\":\n exprList[i] = this.typeCastToParameter(expr);\n break;\n case \"TSAsExpression\":\n case \"TSTypeAssertion\":\n if (!this.state.maybeInArrowParameters) {\n exprList[i] = this.typeCastToParameter(expr);\n } else {\n this.raise(TSErrors.UnexpectedTypeCastInParameter, {\n node: expr,\n });\n }\n break;\n }\n }\n return super.toAssignableList(...arguments);\n }\n\n typeCastToParameter(node: N.TsTypeCastExpression): N.Node {\n node.expression.typeAnnotation = node.typeAnnotation;\n\n this.resetEndLocation(node.expression, node.typeAnnotation.loc.end);\n\n return node.expression;\n }\n\n shouldParseArrow(params: Array<N.Node>) {\n if (this.match(tt.colon)) {\n return params.every(expr => this.isAssignable(expr, true));\n }\n return super.shouldParseArrow(params);\n }\n\n shouldParseAsyncArrow(): boolean {\n return this.match(tt.colon) || super.shouldParseAsyncArrow();\n }\n\n canHaveLeadingDecorator() {\n // Avoid unnecessary lookahead in checking for abstract class unless needed!\n return super.canHaveLeadingDecorator() || this.isAbstractClass();\n }\n\n jsxParseOpeningElementAfterName(\n node: N.JSXOpeningElement,\n ): N.JSXOpeningElement {\n // handles `<Component<<T>`\n if (this.match(tt.lt) || this.match(tt.bitShiftL)) {\n const typeArguments = this.tsTryParseAndCatch(() =>\n this.tsParseTypeArgumentsInExpression(),\n );\n if (typeArguments) node.typeParameters = typeArguments;\n }\n return super.jsxParseOpeningElementAfterName(node);\n }\n\n getGetterSetterExpectedParamCount(\n method: N.ObjectMethod | N.ClassMethod,\n ): number {\n const baseCount = super.getGetterSetterExpectedParamCount(method);\n const params = this.getObjectOrClassMethodParams(method);\n const firstParam = params[0];\n const hasContextParam = firstParam && this.isThisParam(firstParam);\n\n return hasContextParam ? baseCount + 1 : baseCount;\n }\n\n parseCatchClauseParam(): N.Pattern {\n const param = super.parseCatchClauseParam();\n const type = this.tsTryParseTypeAnnotation();\n\n if (type) {\n param.typeAnnotation = type;\n this.resetEndLocation(param);\n }\n\n return param;\n }\n\n tsInAmbientContext<T>(cb: () => T): T {\n const oldIsAmbientContext = this.state.isAmbientContext;\n this.state.isAmbientContext = true;\n try {\n return cb();\n } finally {\n this.state.isAmbientContext = oldIsAmbientContext;\n }\n }\n\n parseClass<T: N.Class>(node: T, ...args: any[]): T {\n const oldInAbstractClass = this.state.inAbstractClass;\n this.state.inAbstractClass = !!(node: any).abstract;\n try {\n return super.parseClass(node, ...args);\n } finally {\n this.state.inAbstractClass = oldInAbstractClass;\n }\n }\n\n tsParseAbstractDeclaration(\n node: any,\n ): N.ClassDeclaration | N.TsInterfaceDeclaration | typeof undefined {\n if (this.match(tt._class)) {\n node.abstract = true;\n return this.parseClass<N.ClassDeclaration>(\n (node: N.ClassDeclaration),\n /* isStatement */ true,\n /* optionalId */ false,\n );\n } else if (this.isContextual(tt._interface)) {\n // for invalid abstract interface\n\n // To avoid\n // abstract interface\n // Foo {}\n if (!this.hasFollowingLineBreak()) {\n node.abstract = true;\n this.raise(TSErrors.NonClassMethodPropertyHasAbstractModifer, {\n node,\n });\n this.next();\n return this.tsParseInterfaceDeclaration(\n (node: N.TsInterfaceDeclaration),\n );\n }\n } else {\n this.unexpected(null, tt._class);\n }\n }\n\n parseMethod(...args: any[]) {\n const method = super.parseMethod(...args);\n if (method.abstract) {\n const hasBody = this.hasPlugin(\"estree\")\n ? !!method.value.body\n : !!method.body;\n if (hasBody) {\n const { key } = method;\n this.raise(\n TSErrors.AbstractMethodHasImplementation,\n { node: method },\n key.type === \"Identifier\" && !method.computed\n ? key.name\n : `[${this.input.slice(key.start, key.end)}]`,\n );\n }\n }\n return method;\n }\n\n tsParseTypeParameterName(): N.Identifier | string {\n const typeName: N.Identifier = this.parseIdentifier();\n return process.env.BABEL_8_BREAKING ? typeName : typeName.name;\n }\n\n shouldParseAsAmbientContext(): boolean {\n return !!this.getPluginOption(\"typescript\", \"dts\");\n }\n\n parse() {\n if (this.shouldParseAsAmbientContext()) {\n this.state.isAmbientContext = true;\n }\n return super.parse();\n }\n\n getExpression() {\n if (this.shouldParseAsAmbientContext()) {\n this.state.isAmbientContext = true;\n }\n return super.getExpression();\n }\n\n parseExportSpecifier(\n node: any,\n isString: boolean,\n isInTypeExport: boolean,\n isMaybeTypeOnly: boolean,\n ) {\n if (!isString && isMaybeTypeOnly) {\n this.parseTypeOnlyImportExportSpecifier(\n node,\n /* isImport */ false,\n isInTypeExport,\n );\n return this.finishNode<N.ExportSpecifier>(node, \"ExportSpecifier\");\n }\n node.exportKind = \"value\";\n return super.parseExportSpecifier(\n node,\n isString,\n isInTypeExport,\n isMaybeTypeOnly,\n );\n }\n\n parseImportSpecifier(\n specifier: any,\n importedIsString: boolean,\n isInTypeOnlyImport: boolean,\n isMaybeTypeOnly: boolean,\n ): N.ImportSpecifier {\n if (!importedIsString && isMaybeTypeOnly) {\n this.parseTypeOnlyImportExportSpecifier(\n specifier,\n /* isImport */ true,\n isInTypeOnlyImport,\n );\n return this.finishNode<N.ImportSpecifier>(specifier, \"ImportSpecifier\");\n }\n specifier.importKind = \"value\";\n return super.parseImportSpecifier(\n specifier,\n importedIsString,\n isInTypeOnlyImport,\n isMaybeTypeOnly,\n );\n }\n\n parseTypeOnlyImportExportSpecifier(\n node: any,\n isImport: boolean,\n isInTypeOnlyImportExport: boolean,\n ): void {\n const leftOfAsKey = isImport ? \"imported\" : \"local\";\n const rightOfAsKey = isImport ? \"local\" : \"exported\";\n\n let leftOfAs = node[leftOfAsKey];\n let rightOfAs;\n\n let hasTypeSpecifier = false;\n let canParseAsKeyword = true;\n\n const loc = leftOfAs.loc.start;\n\n // https://github.com/microsoft/TypeScript/blob/fc4f9d83d5939047aa6bb2a43965c6e9bbfbc35b/src/compiler/parser.ts#L7411-L7456\n // import { type } from \"mod\"; - hasTypeSpecifier: false, leftOfAs: type\n // import { type as } from \"mod\"; - hasTypeSpecifier: true, leftOfAs: as\n // import { type as as } from \"mod\"; - hasTypeSpecifier: false, leftOfAs: type, rightOfAs: as\n // import { type as as as } from \"mod\"; - hasTypeSpecifier: true, leftOfAs: as, rightOfAs: as\n if (this.isContextual(tt._as)) {\n // { type as ...? }\n const firstAs = this.parseIdentifier();\n if (this.isContextual(tt._as)) {\n // { type as as ...? }\n const secondAs = this.parseIdentifier();\n if (tokenIsKeywordOrIdentifier(this.state.type)) {\n // { type as as something }\n hasTypeSpecifier = true;\n leftOfAs = firstAs;\n rightOfAs = this.parseIdentifier();\n canParseAsKeyword = false;\n } else {\n // { type as as }\n rightOfAs = secondAs;\n canParseAsKeyword = false;\n }\n } else if (tokenIsKeywordOrIdentifier(this.state.type)) {\n // { type as something }\n canParseAsKeyword = false;\n rightOfAs = this.parseIdentifier();\n } else {\n // { type as }\n hasTypeSpecifier = true;\n leftOfAs = firstAs;\n }\n } else if (tokenIsKeywordOrIdentifier(this.state.type)) {\n // { type something ...? }\n hasTypeSpecifier = true;\n leftOfAs = this.parseIdentifier();\n }\n if (hasTypeSpecifier && isInTypeOnlyImportExport) {\n this.raise(\n isImport\n ? TSErrors.TypeModifierIsUsedInTypeImports\n : TSErrors.TypeModifierIsUsedInTypeExports,\n { at: loc },\n );\n }\n\n node[leftOfAsKey] = leftOfAs;\n node[rightOfAsKey] = rightOfAs;\n\n const kindKey = isImport ? \"importKind\" : \"exportKind\";\n node[kindKey] = hasTypeSpecifier ? \"type\" : \"value\";\n\n if (canParseAsKeyword && this.eatContextual(tt._as)) {\n node[rightOfAsKey] = isImport\n ? this.parseIdentifier()\n : this.parseModuleExportName();\n }\n if (!node[rightOfAsKey]) {\n node[rightOfAsKey] = cloneIdentifier(node[leftOfAsKey]);\n }\n if (isImport) {\n this.checkLVal(node[rightOfAsKey], \"import specifier\", BIND_LEXICAL);\n }\n }\n };\n","// @flow\n\n// Error messages are colocated with the plugin.\n/* eslint-disable @babel/development-internal/dry-error-messages */\n\nimport * as charCodes from \"charcodes\";\n\nimport { tokenLabelName, tt } from \"../tokenizer/types\";\nimport type Parser from \"../parser\";\nimport * as N from \"../types\";\nimport { makeErrorTemplates, ErrorCodes } from \"../parser/error\";\n\nexport type PlaceholderTypes =\n | \"Identifier\"\n | \"StringLiteral\"\n | \"Expression\"\n | \"Statement\"\n | \"Declaration\"\n | \"BlockStatement\"\n | \"ClassBody\"\n | \"Pattern\";\n\n// $PropertyType doesn't support enums. Use a fake \"switch\" (GetPlaceholderNode)\n//type MaybePlaceholder<T: PlaceholderTypes> = $PropertyType<N, T> | N.Placeholder<T>;\n\ntype _Switch<Value, Cases, Index> = $Call<\n (\n $ElementType<$ElementType<Cases, Index>, 0>,\n ) => $ElementType<$ElementType<Cases, Index>, 1>,\n Value,\n>;\ntype $Switch<Value, Cases> = _Switch<Value, Cases, *>;\n\ntype NodeOf<T: PlaceholderTypes> = $Switch<\n T,\n [\n [\"Identifier\", N.Identifier],\n [\"StringLiteral\", N.StringLiteral],\n [\"Expression\", N.Expression],\n [\"Statement\", N.Statement],\n [\"Declaration\", N.Declaration],\n [\"BlockStatement\", N.BlockStatement],\n [\"ClassBody\", N.ClassBody],\n [\"Pattern\", N.Pattern],\n ],\n>;\n\n// Placeholder<T> breaks everything, because its type is incompatible with\n// the substituted nodes.\ntype MaybePlaceholder<T: PlaceholderTypes> = NodeOf<T>; // | Placeholder<T>\n\n/* eslint sort-keys: \"error\" */\nconst PlaceholderErrors = makeErrorTemplates(\n {\n ClassNameIsRequired: \"A class name is required.\",\n },\n /* code */ ErrorCodes.SyntaxError,\n /* syntaxPlugin */ \"placeholders\",\n);\n/* eslint-disable sort-keys */\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n parsePlaceholder<T: PlaceholderTypes>(\n expectedNode: T,\n ): /*?N.Placeholder<T>*/ ?MaybePlaceholder<T> {\n if (this.match(tt.placeholder)) {\n const node = this.startNode();\n this.next();\n this.assertNoSpace(\"Unexpected space in placeholder.\");\n\n // We can't use this.parseIdentifier because\n // we don't want nested placeholders.\n node.name = super.parseIdentifier(/* liberal */ true);\n\n this.assertNoSpace(\"Unexpected space in placeholder.\");\n this.expect(tt.placeholder);\n return this.finishPlaceholder(node, expectedNode);\n }\n }\n\n finishPlaceholder<T: PlaceholderTypes>(\n node: N.Node,\n expectedNode: T,\n ): /*N.Placeholder<T>*/ MaybePlaceholder<T> {\n const isFinished = !!(node.expectedNode && node.type === \"Placeholder\");\n node.expectedNode = expectedNode;\n\n return isFinished ? node : this.finishNode(node, \"Placeholder\");\n }\n\n /* ============================================================ *\n * tokenizer/index.js *\n * ============================================================ */\n\n getTokenFromCode(code: number) {\n if (\n code === charCodes.percentSign &&\n this.input.charCodeAt(this.state.pos + 1) === charCodes.percentSign\n ) {\n return this.finishOp(tt.placeholder, 2);\n }\n\n return super.getTokenFromCode(...arguments);\n }\n\n /* ============================================================ *\n * parser/expression.js *\n * ============================================================ */\n\n parseExprAtom(): MaybePlaceholder<\"Expression\"> {\n return (\n this.parsePlaceholder(\"Expression\") || super.parseExprAtom(...arguments)\n );\n }\n\n parseIdentifier(): MaybePlaceholder<\"Identifier\"> {\n // NOTE: This function only handles identifiers outside of\n // expressions and binding patterns, since they are already\n // handled by the parseExprAtom and parseBindingAtom functions.\n // This is needed, for example, to parse \"class %%NAME%% {}\".\n return (\n this.parsePlaceholder(\"Identifier\") ||\n super.parseIdentifier(...arguments)\n );\n }\n\n checkReservedWord(word: string): void {\n // Sometimes we call #checkReservedWord(node.name), expecting\n // that node is an Identifier. If it is a Placeholder, name\n // will be undefined.\n if (word !== undefined) super.checkReservedWord(...arguments);\n }\n\n /* ============================================================ *\n * parser/lval.js *\n * ============================================================ */\n\n parseBindingAtom(): MaybePlaceholder<\"Pattern\"> {\n return (\n this.parsePlaceholder(\"Pattern\") || super.parseBindingAtom(...arguments)\n );\n }\n\n checkLVal(expr: N.Expression): void {\n if (expr.type !== \"Placeholder\") super.checkLVal(...arguments);\n }\n\n toAssignable(node: N.Node): N.Node {\n if (\n node &&\n node.type === \"Placeholder\" &&\n node.expectedNode === \"Expression\"\n ) {\n node.expectedNode = \"Pattern\";\n return node;\n }\n return super.toAssignable(...arguments);\n }\n\n /* ============================================================ *\n * parser/statement.js *\n * ============================================================ */\n\n isLet(context: ?string): boolean {\n if (super.isLet(context)) {\n return true;\n }\n\n // Replicate the original checks that lead to looking ahead for an\n // identifier.\n if (!this.isContextual(tt._let)) {\n return false;\n }\n if (context) return false;\n\n // Accept \"let %%\" as the start of \"let %%placeholder%%\", as though the\n // placeholder were an identifier.\n const nextToken = this.lookahead();\n if (nextToken.type === tt.placeholder) {\n return true;\n }\n\n return false;\n }\n\n verifyBreakContinue(node: N.BreakStatement | N.ContinueStatement) {\n if (node.label && node.label.type === \"Placeholder\") return;\n super.verifyBreakContinue(...arguments);\n }\n\n parseExpressionStatement(\n node: MaybePlaceholder<\"Statement\">,\n expr: N.Expression,\n ): MaybePlaceholder<\"Statement\"> {\n if (\n expr.type !== \"Placeholder\" ||\n (expr.extra && expr.extra.parenthesized)\n ) {\n return super.parseExpressionStatement(...arguments);\n }\n\n if (this.match(tt.colon)) {\n const stmt: N.LabeledStatement = node;\n stmt.label = this.finishPlaceholder(expr, \"Identifier\");\n this.next();\n stmt.body = this.parseStatement(\"label\");\n return this.finishNode(stmt, \"LabeledStatement\");\n }\n\n this.semicolon();\n\n node.name = expr.name;\n return this.finishPlaceholder(node, \"Statement\");\n }\n\n parseBlock(): MaybePlaceholder<\"BlockStatement\"> {\n return (\n this.parsePlaceholder(\"BlockStatement\") ||\n super.parseBlock(...arguments)\n );\n }\n\n parseFunctionId(): ?MaybePlaceholder<\"Identifier\"> {\n return (\n this.parsePlaceholder(\"Identifier\") ||\n super.parseFunctionId(...arguments)\n );\n }\n\n parseClass<T: N.Class>(\n node: T,\n isStatement: /* T === ClassDeclaration */ boolean,\n optionalId?: boolean,\n ): T {\n const type = isStatement ? \"ClassDeclaration\" : \"ClassExpression\";\n\n this.next();\n this.takeDecorators(node);\n const oldStrict = this.state.strict;\n\n const placeholder = this.parsePlaceholder(\"Identifier\");\n if (placeholder) {\n if (\n this.match(tt._extends) ||\n this.match(tt.placeholder) ||\n this.match(tt.braceL)\n ) {\n node.id = placeholder;\n } else if (optionalId || !isStatement) {\n node.id = null;\n node.body = this.finishPlaceholder(placeholder, \"ClassBody\");\n return this.finishNode(node, type);\n } else {\n throw this.raise(PlaceholderErrors.ClassNameIsRequired, {\n at: this.state.startLoc,\n });\n }\n } else {\n this.parseClassId(node, isStatement, optionalId);\n }\n\n this.parseClassSuper(node);\n node.body =\n this.parsePlaceholder(\"ClassBody\") ||\n this.parseClassBody(!!node.superClass, oldStrict);\n return this.finishNode(node, type);\n }\n\n parseExport(node: N.Node): N.Node {\n const placeholder = this.parsePlaceholder(\"Identifier\");\n if (!placeholder) return super.parseExport(...arguments);\n\n if (!this.isContextual(tt._from) && !this.match(tt.comma)) {\n // export %%DECL%%;\n node.specifiers = [];\n node.source = null;\n node.declaration = this.finishPlaceholder(placeholder, \"Declaration\");\n return this.finishNode(node, \"ExportNamedDeclaration\");\n }\n\n // export %%NAME%% from \"foo\";\n this.expectPlugin(\"exportDefaultFrom\");\n const specifier = this.startNode();\n specifier.exported = placeholder;\n node.specifiers = [this.finishNode(specifier, \"ExportDefaultSpecifier\")];\n\n return super.parseExport(node);\n }\n\n isExportDefaultSpecifier(): boolean {\n if (this.match(tt._default)) {\n const next = this.nextTokenStart();\n if (this.isUnparsedContextual(next, \"from\")) {\n if (\n this.input.startsWith(\n tokenLabelName(tt.placeholder),\n this.nextTokenStartSince(next + 4),\n )\n ) {\n return true;\n }\n }\n }\n return super.isExportDefaultSpecifier();\n }\n\n maybeParseExportDefaultSpecifier(node: N.Node): boolean {\n if (node.specifiers && node.specifiers.length > 0) {\n // \"export %%NAME%%\" has already been parsed by #parseExport.\n return true;\n }\n return super.maybeParseExportDefaultSpecifier(...arguments);\n }\n\n checkExport(node: N.ExportNamedDeclaration): void {\n const { specifiers } = node;\n if (specifiers?.length) {\n node.specifiers = specifiers.filter(\n node => node.exported.type === \"Placeholder\",\n );\n }\n super.checkExport(node);\n node.specifiers = specifiers;\n }\n\n parseImport(\n node: N.Node,\n ): N.ImportDeclaration | N.TsImportEqualsDeclaration {\n const placeholder = this.parsePlaceholder(\"Identifier\");\n if (!placeholder) return super.parseImport(...arguments);\n\n node.specifiers = [];\n\n if (!this.isContextual(tt._from) && !this.match(tt.comma)) {\n // import %%STRING%%;\n node.source = this.finishPlaceholder(placeholder, \"StringLiteral\");\n this.semicolon();\n return this.finishNode(node, \"ImportDeclaration\");\n }\n\n // import %%DEFAULT%% ...\n const specifier = this.startNodeAtNode(placeholder);\n specifier.local = placeholder;\n this.finishNode(specifier, \"ImportDefaultSpecifier\");\n node.specifiers.push(specifier);\n\n if (this.eat(tt.comma)) {\n // import %%DEFAULT%%, * as ...\n const hasStarImport = this.maybeParseStarImportSpecifier(node);\n\n // import %%DEFAULT%%, { ...\n if (!hasStarImport) this.parseNamedImportSpecifiers(node);\n }\n\n this.expectContextual(tt._from);\n node.source = this.parseImportSource();\n this.semicolon();\n return this.finishNode(node, \"ImportDeclaration\");\n }\n\n parseImportSource(): MaybePlaceholder<\"StringLiteral\"> {\n // import ... from %%STRING%%;\n\n return (\n this.parsePlaceholder(\"StringLiteral\") ||\n super.parseImportSource(...arguments)\n );\n }\n };\n","import type Parser from \"../parser\";\nimport { tokenIsIdentifier, tt } from \"../tokenizer/types\";\nimport * as N from \"../types\";\n\nexport default (superClass: Class<Parser>): Class<Parser> =>\n class extends superClass {\n parseV8Intrinsic(): N.Expression {\n if (this.match(tt.modulo)) {\n const v8IntrinsicStartLoc = this.state.startLoc;\n // let the `loc` of Identifier starts from `%`\n const node = this.startNode();\n this.next(); // eat '%'\n if (tokenIsIdentifier(this.state.type)) {\n const name = this.parseIdentifierName(this.state.start);\n const identifier = this.createIdentifier(node, name);\n identifier.type = \"V8IntrinsicIdentifier\";\n if (this.match(tt.parenL)) {\n return identifier;\n }\n }\n this.unexpected(v8IntrinsicStartLoc);\n }\n }\n\n /* ============================================================ *\n * parser/expression.js *\n * ============================================================ */\n\n parseExprAtom(): N.Expression {\n return this.parseV8Intrinsic() || super.parseExprAtom(...arguments);\n }\n };\n","// @flow\n\nimport type Parser from \"./parser\";\nimport type { PluginConfig } from \"./parser/base\";\n\nexport type Plugin = PluginConfig;\n\nexport type PluginList = $ReadOnlyArray<PluginConfig>;\n\nexport type MixinPlugin = (superClass: Class<Parser>) => Class<Parser>;\n\n// This function’s second parameter accepts either a string (plugin name) or an\n// array pair (plugin name and options object). If an options object is given,\n// then each value is non-recursively checked for identity with the actual\n// option value of each plugin in the first argument (which is an array of\n// plugin names or array pairs).\nexport function hasPlugin(\n plugins: PluginList,\n expectedConfig: PluginConfig,\n): boolean {\n // The expectedOptions object is by default an empty object if the given\n // expectedConfig argument does not give an options object (i.e., if it is a\n // string).\n const [expectedName, expectedOptions] =\n typeof expectedConfig === \"string\" ? [expectedConfig, {}] : expectedConfig;\n\n const expectedKeys = Object.keys(expectedOptions);\n\n const expectedOptionsIsEmpty = expectedKeys.length === 0;\n\n return plugins.some(p => {\n if (typeof p === \"string\") {\n return expectedOptionsIsEmpty && p === expectedName;\n } else {\n const [pluginName, pluginOptions] = p;\n if (pluginName !== expectedName) {\n return false;\n }\n for (const key of expectedKeys) {\n if (pluginOptions[key] !== expectedOptions[key]) {\n return false;\n }\n }\n return true;\n }\n });\n}\n\nexport function getPluginOption(\n plugins: PluginList,\n name: string,\n option: string,\n) {\n const plugin = plugins.find(plugin => {\n if (Array.isArray(plugin)) {\n return plugin[0] === name;\n } else {\n return plugin === name;\n }\n });\n\n if (plugin && Array.isArray(plugin)) {\n return plugin[1][option];\n }\n\n return null;\n}\n\nconst PIPELINE_PROPOSALS = [\"minimal\", \"fsharp\", \"hack\", \"smart\"];\nconst TOPIC_TOKENS = [\"^^\", \"@@\", \"^\", \"%\", \"#\"];\nconst RECORD_AND_TUPLE_SYNTAX_TYPES = [\"hash\", \"bar\"];\n\nexport function validatePlugins(plugins: PluginList) {\n if (hasPlugin(plugins, \"decorators\")) {\n if (hasPlugin(plugins, \"decorators-legacy\")) {\n throw new Error(\n \"Cannot use the decorators and decorators-legacy plugin together\",\n );\n }\n\n const decoratorsBeforeExport = getPluginOption(\n plugins,\n \"decorators\",\n \"decoratorsBeforeExport\",\n );\n if (decoratorsBeforeExport == null) {\n throw new Error(\n \"The 'decorators' plugin requires a 'decoratorsBeforeExport' option,\" +\n \" whose value must be a boolean. If you are migrating from\" +\n \" Babylon/Babel 6 or want to use the old decorators proposal, you\" +\n \" should use the 'decorators-legacy' plugin instead of 'decorators'.\",\n );\n } else if (typeof decoratorsBeforeExport !== \"boolean\") {\n throw new Error(\"'decoratorsBeforeExport' must be a boolean.\");\n }\n }\n\n if (hasPlugin(plugins, \"flow\") && hasPlugin(plugins, \"typescript\")) {\n throw new Error(\"Cannot combine flow and typescript plugins.\");\n }\n\n if (hasPlugin(plugins, \"placeholders\") && hasPlugin(plugins, \"v8intrinsic\")) {\n throw new Error(\"Cannot combine placeholders and v8intrinsic plugins.\");\n }\n\n if (hasPlugin(plugins, \"pipelineOperator\")) {\n const proposal = getPluginOption(plugins, \"pipelineOperator\", \"proposal\");\n\n if (!PIPELINE_PROPOSALS.includes(proposal)) {\n const proposalList = PIPELINE_PROPOSALS.map(p => `\"${p}\"`).join(\", \");\n throw new Error(\n `\"pipelineOperator\" requires \"proposal\" option whose value must be one of: ${proposalList}.`,\n );\n }\n\n const tupleSyntaxIsHash = hasPlugin(plugins, [\n \"recordAndTuple\",\n { syntaxType: \"hash\" },\n ]);\n\n if (proposal === \"hack\") {\n if (hasPlugin(plugins, \"placeholders\")) {\n throw new Error(\n \"Cannot combine placeholders plugin and Hack-style pipes.\",\n );\n }\n\n if (hasPlugin(plugins, \"v8intrinsic\")) {\n throw new Error(\n \"Cannot combine v8intrinsic plugin and Hack-style pipes.\",\n );\n }\n\n const topicToken = getPluginOption(\n plugins,\n \"pipelineOperator\",\n \"topicToken\",\n );\n\n if (!TOPIC_TOKENS.includes(topicToken)) {\n const tokenList = TOPIC_TOKENS.map(t => `\"${t}\"`).join(\", \");\n\n throw new Error(\n `\"pipelineOperator\" in \"proposal\": \"hack\" mode also requires a \"topicToken\" option whose value must be one of: ${tokenList}.`,\n );\n }\n\n if (topicToken === \"#\" && tupleSyntaxIsHash) {\n throw new Error(\n 'Plugin conflict between `[\"pipelineOperator\", { proposal: \"hack\", topicToken: \"#\" }]` and `[\"recordAndtuple\", { syntaxType: \"hash\"}]`.',\n );\n }\n } else if (proposal === \"smart\" && tupleSyntaxIsHash) {\n throw new Error(\n 'Plugin conflict between `[\"pipelineOperator\", { proposal: \"smart\" }]` and `[\"recordAndtuple\", { syntaxType: \"hash\"}]`.',\n );\n }\n }\n\n if (hasPlugin(plugins, \"moduleAttributes\")) {\n if (process.env.BABEL_8_BREAKING) {\n throw new Error(\n \"`moduleAttributes` has been removed in Babel 8, please use `importAssertions` parser plugin, or `@babel/plugin-syntax-import-assertions`.\",\n );\n } else {\n if (hasPlugin(plugins, \"importAssertions\")) {\n throw new Error(\n \"Cannot combine importAssertions and moduleAttributes plugins.\",\n );\n }\n const moduleAttributesVerionPluginOption = getPluginOption(\n plugins,\n \"moduleAttributes\",\n \"version\",\n );\n if (moduleAttributesVerionPluginOption !== \"may-2020\") {\n throw new Error(\n \"The 'moduleAttributes' plugin requires a 'version' option,\" +\n \" representing the last proposal update. Currently, the\" +\n \" only supported value is 'may-2020'.\",\n );\n }\n }\n }\n\n if (\n hasPlugin(plugins, \"recordAndTuple\") &&\n !RECORD_AND_TUPLE_SYNTAX_TYPES.includes(\n getPluginOption(plugins, \"recordAndTuple\", \"syntaxType\"),\n )\n ) {\n throw new Error(\n \"'recordAndTuple' requires 'syntaxType' option whose value should be one of: \" +\n RECORD_AND_TUPLE_SYNTAX_TYPES.map(p => `'${p}'`).join(\", \"),\n );\n }\n\n if (\n hasPlugin(plugins, \"asyncDoExpressions\") &&\n !hasPlugin(plugins, \"doExpressions\")\n ) {\n const error = new Error(\n \"'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.\",\n );\n // $FlowIgnore\n error.missingPlugins = \"doExpressions\"; // so @babel/core can provide better error message\n throw error;\n }\n}\n\n// These plugins are defined using a mixin which extends the parser class.\n\nimport estree from \"./plugins/estree\";\nimport flow from \"./plugins/flow\";\nimport jsx from \"./plugins/jsx\";\nimport typescript from \"./plugins/typescript\";\nimport placeholders from \"./plugins/placeholders\";\nimport v8intrinsic from \"./plugins/v8intrinsic\";\n\n// NOTE: order is important. estree must come first; placeholders must come last.\nexport const mixinPlugins: { [name: string]: MixinPlugin } = {\n estree,\n jsx,\n flow,\n typescript,\n v8intrinsic,\n placeholders,\n};\n\nexport const mixinPluginNames: $ReadOnlyArray<string> =\n Object.keys(mixinPlugins);\n","// @flow\n\nimport type { PluginList } from \"./plugin-utils\";\n\n// A second optional argument can be given to further configure\n// the parser process. These options are recognized:\n\nexport type SourceType = \"script\" | \"module\" | \"unambiguous\";\n\nexport type Options = {\n sourceType: SourceType,\n sourceFilename?: string,\n startColumn: number,\n startLine: number,\n allowAwaitOutsideFunction: boolean,\n allowReturnOutsideFunction: boolean,\n allowImportExportEverywhere: boolean,\n allowSuperOutsideMethod: boolean,\n allowUndeclaredExports: boolean,\n plugins: PluginList,\n strictMode: ?boolean,\n ranges: boolean,\n tokens: boolean,\n createParenthesizedExpressions: boolean,\n errorRecovery: boolean,\n attachComment: boolean,\n};\n\nexport const defaultOptions: Options = {\n // Source type (\"script\" or \"module\") for different semantics\n sourceType: \"script\",\n // Source filename.\n sourceFilename: undefined,\n // Column (0-based) from which to start counting source. Useful for\n // integration with other tools.\n startColumn: 0,\n // Line (1-based) from which to start counting source. Useful for\n // integration with other tools.\n startLine: 1,\n // When enabled, await at the top level is not considered an\n // error.\n allowAwaitOutsideFunction: false,\n // When enabled, a return at the top level is not considered an\n // error.\n allowReturnOutsideFunction: false,\n // When enabled, import/export statements are not constrained to\n // appearing at the top of the program.\n allowImportExportEverywhere: false,\n // TODO\n allowSuperOutsideMethod: false,\n // When enabled, export statements can reference undeclared variables.\n allowUndeclaredExports: false,\n // An array of plugins to enable\n plugins: [],\n // TODO\n strictMode: null,\n // Nodes have their start and end characters offsets recorded in\n // `start` and `end` properties (directly on the node, rather than\n // the `loc` object, which holds line/column data. To also add a\n // [semi-standardized][range] `range` property holding a `[start,\n // end]` array with the same numbers, set the `ranges` option to\n // `true`.\n //\n // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678\n ranges: false,\n // Adds all parsed tokens to a `tokens` property on the `File` node\n tokens: false,\n // Whether to create ParenthesizedExpression AST nodes (if false\n // the parser sets extra.parenthesized on the expression nodes instead).\n createParenthesizedExpressions: false,\n // When enabled, errors are attached to the AST instead of being directly thrown.\n // Some errors will still throw, because @babel/parser can't always recover.\n errorRecovery: false,\n // When enabled, comments will be attached to adjacent AST nodes as one of\n // `leadingComments`, `trailingComments` and `innerComments`. The comment attachment\n // is vital to preserve comments after transform. If you don't print AST back,\n // consider set this option to `false` for performance\n attachComment: true,\n};\n\n// Interpret and default an options object\n\nexport function getOptions(opts: ?Options): Options {\n const options: any = {};\n for (const key of Object.keys(defaultOptions)) {\n options[key] = opts && opts[key] != null ? opts[key] : defaultOptions[key];\n }\n return options;\n}\n","// @flow\n\n/*:: declare var invariant; */\nimport * as charCodes from \"charcodes\";\nimport { tt, type TokenType } from \"../tokenizer/types\";\nimport type {\n TSParameterProperty,\n Decorator,\n Expression,\n Node,\n Pattern,\n RestElement,\n SpreadElement,\n /*:: ObjectOrClassMember, */\n /*:: ClassMember, */\n /*:: ObjectMember, */\n /*:: TsNamedTypeElementBase, */\n /*:: Identifier, */\n /*:: PrivateName, */\n /*:: ObjectExpression, */\n /*:: ObjectPattern, */\n} from \"../types\";\nimport type { Pos, Position } from \"../util/location\";\nimport {\n isStrictBindOnlyReservedWord,\n isStrictBindReservedWord,\n} from \"../util/identifier\";\nimport { NodeUtils } from \"./node\";\nimport { type BindingTypes, BIND_NONE } from \"../util/scopeflags\";\nimport { ExpressionErrors } from \"./util\";\nimport { Errors } from \"./error\";\n\nconst unwrapParenthesizedExpression = (node: Node): Node => {\n return node.type === \"ParenthesizedExpression\"\n ? unwrapParenthesizedExpression(node.expression)\n : node;\n};\n\nexport default class LValParser extends NodeUtils {\n // Forward-declaration: defined in expression.js\n /*::\n +parseIdentifier: (liberal?: boolean) => Identifier;\n +parseMaybeAssignAllowIn: (\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n refNeedsArrowPos?: ?Pos,\n ) => Expression;\n +parseObjectLike: <T: ObjectPattern | ObjectExpression>(\n close: TokenType,\n isPattern: boolean,\n isRecord?: ?boolean,\n refExpressionErrors?: ?ExpressionErrors,\n ) => T;\n +parseObjPropValue: (\n prop: any,\n startPos: ?number,\n startLoc: ?Position,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n refExpressionErrors?: ?ExpressionErrors,\n ) => void;\n +parsePropertyName: (\n prop: ObjectOrClassMember | ClassMember | TsNamedTypeElementBase,\n ) => Expression | Identifier;\n +parsePrivateName: () => PrivateName\n */\n // Forward-declaration: defined in statement.js\n /*::\n +parseDecorator: () => Decorator;\n */\n\n /**\n * Convert existing expression atom to assignable pattern\n * if possible. Also checks invalid destructuring targets:\n\n - Parenthesized Destructuring patterns\n - RestElement is not the last element\n - Missing `=` in assignment pattern\n\n NOTE: There is a corresponding \"isAssignable\" method.\n When this one is updated, please check if also that one needs to be updated.\n\n * @param {Node} node The expression atom\n * @param {boolean} [isLHS=false] Whether we are parsing a LeftHandSideExpression. If isLHS is `true`, the following cases are allowed:\n `[(a)] = [0]`, `[(a.b)] = [0]`\n\n * @returns {Node} The converted assignable pattern\n * @memberof LValParser\n */\n toAssignable(node: Node, isLHS: boolean = false): Node {\n let parenthesized = undefined;\n if (node.type === \"ParenthesizedExpression\" || node.extra?.parenthesized) {\n parenthesized = unwrapParenthesizedExpression(node);\n if (isLHS) {\n // an LHS can be reinterpreted to a binding pattern but not vice versa.\n // therefore a parenthesized identifier is ambiguous until we are sure it is an assignment expression\n // i.e. `([(a) = []] = []) => {}`\n // see also `recordParenthesizedIdentifierError` signature in packages/babel-parser/src/util/expression-scope.js\n if (parenthesized.type === \"Identifier\") {\n this.expressionScope.recordParenthesizedIdentifierError(\n Errors.InvalidParenthesizedAssignment,\n node.loc.start,\n );\n } else if (parenthesized.type !== \"MemberExpression\") {\n // A parenthesized member expression can be in LHS but not in pattern.\n // If the LHS is later interpreted as a pattern, `checkLVal` will throw for member expression binding\n // i.e. `([(a.b) = []] = []) => {}`\n this.raise(Errors.InvalidParenthesizedAssignment, { node });\n }\n } else {\n this.raise(Errors.InvalidParenthesizedAssignment, { node });\n }\n }\n\n switch (node.type) {\n case \"Identifier\":\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"AssignmentPattern\":\n case \"RestElement\":\n break;\n\n case \"ObjectExpression\":\n node.type = \"ObjectPattern\";\n for (\n let i = 0, length = node.properties.length, last = length - 1;\n i < length;\n i++\n ) {\n const prop = node.properties[i];\n const isLast = i === last;\n this.toAssignableObjectExpressionProp(prop, isLast, isLHS);\n\n if (\n isLast &&\n prop.type === \"RestElement\" &&\n node.extra?.trailingCommaLoc\n ) {\n this.raise(Errors.RestTrailingComma, {\n at: node.extra.trailingCommaLoc,\n });\n }\n }\n break;\n\n case \"ObjectProperty\": {\n const { key, value } = node;\n if (this.isPrivateName(key)) {\n this.classScope.usePrivateName(\n this.getPrivateNameSV(key),\n key.loc.start,\n );\n }\n this.toAssignable(value, isLHS);\n break;\n }\n\n case \"SpreadElement\": {\n this.checkToRestConversion(node);\n\n node.type = \"RestElement\";\n const arg = node.argument;\n this.toAssignable(arg, isLHS);\n break;\n }\n\n case \"ArrayExpression\":\n node.type = \"ArrayPattern\";\n this.toAssignableList(\n node.elements,\n node.extra?.trailingCommaLoc,\n isLHS,\n );\n break;\n\n case \"AssignmentExpression\":\n if (node.operator !== \"=\") {\n this.raise(Errors.MissingEqInAssignment, { at: node.left.loc.end });\n }\n\n node.type = \"AssignmentPattern\";\n delete node.operator;\n this.toAssignable(node.left, isLHS);\n break;\n\n case \"ParenthesizedExpression\":\n /*::invariant (parenthesized !== undefined) */\n this.toAssignable(parenthesized, isLHS);\n break;\n\n default:\n // We don't know how to deal with this node. It will\n // be reported by a later call to checkLVal\n }\n return node;\n }\n\n toAssignableObjectExpressionProp(\n prop: Node,\n isLast: boolean,\n isLHS: boolean,\n ) {\n if (prop.type === \"ObjectMethod\") {\n /* eslint-disable @babel/development-internal/dry-error-messages */\n this.raise(\n prop.kind === \"get\" || prop.kind === \"set\"\n ? Errors.PatternHasAccessor\n : Errors.PatternHasMethod,\n { node: prop.key },\n );\n /* eslint-enable @babel/development-internal/dry-error-messages */\n } else if (prop.type === \"SpreadElement\" && !isLast) {\n this.raise(Errors.RestTrailingComma, { node: prop });\n } else {\n this.toAssignable(prop, isLHS);\n }\n }\n\n // Convert list of expression atoms to binding list.\n\n toAssignableList(\n exprList: Expression[],\n trailingCommaLoc?: ?Position,\n isLHS: boolean,\n ): $ReadOnlyArray<Pattern> {\n let end = exprList.length;\n if (end) {\n const last = exprList[end - 1];\n if (last?.type === \"RestElement\") {\n --end;\n } else if (last?.type === \"SpreadElement\") {\n last.type = \"RestElement\";\n let arg = last.argument;\n this.toAssignable(arg, isLHS);\n arg = unwrapParenthesizedExpression(arg);\n if (\n arg.type !== \"Identifier\" &&\n arg.type !== \"MemberExpression\" &&\n arg.type !== \"ArrayPattern\" &&\n arg.type !== \"ObjectPattern\"\n ) {\n this.unexpected(arg.start);\n }\n\n if (trailingCommaLoc) {\n this.raise(Errors.RestTrailingComma, { at: trailingCommaLoc });\n }\n\n --end;\n }\n }\n for (let i = 0; i < end; i++) {\n const elt = exprList[i];\n if (elt) {\n this.toAssignable(elt, isLHS);\n if (elt.type === \"RestElement\") {\n this.raise(Errors.RestTrailingComma, { node: elt });\n }\n }\n }\n return exprList;\n }\n\n isAssignable(node: Node, isBinding?: boolean): boolean {\n switch (node.type) {\n case \"Identifier\":\n case \"ObjectPattern\":\n case \"ArrayPattern\":\n case \"AssignmentPattern\":\n case \"RestElement\":\n return true;\n\n case \"ObjectExpression\": {\n const last = node.properties.length - 1;\n return node.properties.every((prop, i) => {\n return (\n prop.type !== \"ObjectMethod\" &&\n (i === last || prop.type !== \"SpreadElement\") &&\n this.isAssignable(prop)\n );\n });\n }\n\n case \"ObjectProperty\":\n return this.isAssignable(node.value);\n\n case \"SpreadElement\":\n return this.isAssignable(node.argument);\n\n case \"ArrayExpression\":\n return node.elements.every(\n element => element === null || this.isAssignable(element),\n );\n\n case \"AssignmentExpression\":\n return node.operator === \"=\";\n\n case \"ParenthesizedExpression\":\n return this.isAssignable(node.expression);\n\n case \"MemberExpression\":\n case \"OptionalMemberExpression\":\n return !isBinding;\n\n default:\n return false;\n }\n }\n\n // Convert list of expression atoms to a list of\n\n toReferencedList(\n exprList: $ReadOnlyArray<?Expression>,\n isParenthesizedExpr?: boolean, // eslint-disable-line no-unused-vars\n ): $ReadOnlyArray<?Expression> {\n return exprList;\n }\n\n toReferencedListDeep(\n exprList: $ReadOnlyArray<?Expression>,\n isParenthesizedExpr?: boolean,\n ): void {\n this.toReferencedList(exprList, isParenthesizedExpr);\n\n for (const expr of exprList) {\n if (expr?.type === \"ArrayExpression\") {\n this.toReferencedListDeep(expr.elements);\n }\n }\n }\n\n // Parses spread element.\n\n parseSpread(\n refExpressionErrors: ?ExpressionErrors,\n refNeedsArrowPos?: ?Pos,\n ): SpreadElement {\n const node = this.startNode();\n this.next();\n node.argument = this.parseMaybeAssignAllowIn(\n refExpressionErrors,\n undefined,\n refNeedsArrowPos,\n );\n return this.finishNode(node, \"SpreadElement\");\n }\n\n // https://tc39.es/ecma262/#prod-BindingRestProperty\n // https://tc39.es/ecma262/#prod-BindingRestElement\n parseRestBinding(): RestElement {\n const node = this.startNode();\n this.next(); // eat `...`\n node.argument = this.parseBindingAtom();\n return this.finishNode(node, \"RestElement\");\n }\n\n // Parses lvalue (assignable) atom.\n parseBindingAtom(): Pattern {\n // https://tc39.es/ecma262/#prod-BindingPattern\n switch (this.state.type) {\n case tt.bracketL: {\n const node = this.startNode();\n this.next();\n node.elements = this.parseBindingList(\n tt.bracketR,\n charCodes.rightSquareBracket,\n true,\n );\n return this.finishNode(node, \"ArrayPattern\");\n }\n\n case tt.braceL:\n return this.parseObjectLike(tt.braceR, true);\n }\n\n // https://tc39.es/ecma262/#prod-BindingIdentifier\n return this.parseIdentifier();\n }\n\n // https://tc39.es/ecma262/#prod-BindingElementList\n parseBindingList(\n close: TokenType,\n closeCharCode: $Values<typeof charCodes>,\n allowEmpty?: boolean,\n allowModifiers?: boolean,\n ): $ReadOnlyArray<Pattern | TSParameterProperty> {\n const elts: Array<Pattern | TSParameterProperty> = [];\n let first = true;\n while (!this.eat(close)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma);\n }\n if (allowEmpty && this.match(tt.comma)) {\n // $FlowFixMe This method returns `$ReadOnlyArray<?Pattern>` if `allowEmpty` is set.\n elts.push(null);\n } else if (this.eat(close)) {\n break;\n } else if (this.match(tt.ellipsis)) {\n elts.push(this.parseAssignableListItemTypes(this.parseRestBinding()));\n if (!this.checkCommaAfterRest(closeCharCode)) {\n this.expect(close);\n break;\n }\n } else {\n const decorators = [];\n if (this.match(tt.at) && this.hasPlugin(\"decorators\")) {\n this.raise(Errors.UnsupportedParameterDecorator, {\n at: this.state.startLoc,\n });\n }\n // invariant: hasPlugin(\"decorators-legacy\")\n while (this.match(tt.at)) {\n decorators.push(this.parseDecorator());\n }\n elts.push(this.parseAssignableListItem(allowModifiers, decorators));\n }\n }\n return elts;\n }\n\n // https://tc39.es/ecma262/#prod-BindingRestProperty\n parseBindingRestProperty(prop: RestElement): RestElement {\n this.next(); // eat '...'\n // Don't use parseRestBinding() as we only allow Identifier here.\n prop.argument = this.parseIdentifier();\n this.checkCommaAfterRest(charCodes.rightCurlyBrace);\n return this.finishNode(prop, \"RestElement\");\n }\n\n // https://tc39.es/ecma262/#prod-BindingProperty\n parseBindingProperty(): ObjectMember | RestElement {\n const prop = this.startNode();\n const { type, start: startPos, startLoc } = this.state;\n if (type === tt.ellipsis) {\n return this.parseBindingRestProperty(prop);\n } else if (type === tt.privateName) {\n this.expectPlugin(\"destructuringPrivate\", startLoc);\n this.classScope.usePrivateName(this.state.value, startLoc);\n prop.key = this.parsePrivateName();\n } else {\n this.parsePropertyName(prop);\n }\n prop.method = false;\n this.parseObjPropValue(\n prop,\n startPos,\n startLoc,\n false /* isGenerator */,\n false /* isAsync */,\n true /* isPattern */,\n false /* isAccessor */,\n );\n\n return prop;\n }\n\n parseAssignableListItem(\n allowModifiers: ?boolean,\n decorators: Decorator[],\n ): Pattern | TSParameterProperty {\n const left = this.parseMaybeDefault();\n this.parseAssignableListItemTypes(left);\n const elt = this.parseMaybeDefault(left.start, left.loc.start, left);\n if (decorators.length) {\n left.decorators = decorators;\n }\n return elt;\n }\n\n // Used by flow/typescript plugin to add type annotations to binding elements\n parseAssignableListItemTypes(param: Pattern): Pattern {\n return param;\n }\n\n // Parses assignment pattern around given atom if possible.\n // https://tc39.es/ecma262/#prod-BindingElement\n parseMaybeDefault(\n startPos?: ?number,\n startLoc?: ?Position,\n left?: ?Pattern,\n ): Pattern {\n startLoc = startLoc ?? this.state.startLoc;\n startPos = startPos ?? this.state.start;\n // $FlowIgnore\n left = left ?? this.parseBindingAtom();\n if (!this.eat(tt.eq)) return left;\n\n const node = this.startNodeAt(startPos, startLoc);\n node.left = left;\n node.right = this.parseMaybeAssignAllowIn();\n return this.finishNode(node, \"AssignmentPattern\");\n }\n\n /**\n * Verify that if a node is an lval - something that can be assigned to.\n *\n * @param {Expression} expr The given node\n * @param {string} contextDescription The auxiliary context information printed when error is thrown\n * @param {BindingTypes} [bindingType=BIND_NONE] The desired binding type. If the given node is an identifier and `bindingType` is not\n BIND_NONE, `checkLVal` will register binding to the parser scope\n See also src/util/scopeflags.js\n * @param {?Set<string>} checkClashes An optional string set to check if an identifier name is included. `checkLVal` will add checked\n identifier name to `checkClashes` It is used in tracking duplicates in function parameter lists. If\n it is nullish, `checkLVal` will skip duplicate checks\n * @param {boolean} [disallowLetBinding] Whether an identifier named \"let\" should be disallowed\n * @param {boolean} [strictModeChanged=false] Whether an identifier has been parsed in a sloppy context but should be reinterpreted as\n strict-mode. e.g. `(arguments) => { \"use strict \"}`\n * @memberof LValParser\n */\n checkLVal(\n expr: Expression,\n contextDescription: string,\n bindingType: BindingTypes = BIND_NONE,\n checkClashes: ?Set<string>,\n disallowLetBinding?: boolean,\n strictModeChanged?: boolean = false,\n ): void {\n switch (expr.type) {\n case \"Identifier\": {\n const { name } = expr;\n if (\n this.state.strict &&\n // \"Global\" reserved words have already been checked by parseIdentifier,\n // unless they have been found in the id or parameters of a strict-mode\n // function in a sloppy context.\n (strictModeChanged\n ? isStrictBindReservedWord(name, this.inModule)\n : isStrictBindOnlyReservedWord(name))\n ) {\n this.raise(\n bindingType === BIND_NONE\n ? Errors.StrictEvalArguments\n : Errors.StrictEvalArgumentsBinding,\n { node: expr },\n name,\n );\n }\n\n if (checkClashes) {\n if (checkClashes.has(name)) {\n this.raise(Errors.ParamDupe, { node: expr });\n } else {\n checkClashes.add(name);\n }\n }\n if (disallowLetBinding && name === \"let\") {\n this.raise(Errors.LetInLexicalBinding, { node: expr });\n }\n if (!(bindingType & BIND_NONE)) {\n this.scope.declareName(name, bindingType, expr.loc.start);\n }\n break;\n }\n\n case \"MemberExpression\":\n if (bindingType !== BIND_NONE) {\n this.raise(Errors.InvalidPropertyBindingPattern, {\n node: expr,\n });\n }\n break;\n\n case \"ObjectPattern\":\n for (let prop of expr.properties) {\n if (this.isObjectProperty(prop)) prop = prop.value;\n // If we find here an ObjectMethod, it's because this was originally\n // an ObjectExpression which has then been converted.\n // toAssignable already reported this error with a nicer message.\n else if (this.isObjectMethod(prop)) continue;\n\n this.checkLVal(\n prop,\n \"object destructuring pattern\",\n bindingType,\n checkClashes,\n disallowLetBinding,\n );\n }\n break;\n\n case \"ArrayPattern\":\n for (const elem of expr.elements) {\n if (elem) {\n this.checkLVal(\n elem,\n \"array destructuring pattern\",\n bindingType,\n checkClashes,\n disallowLetBinding,\n );\n }\n }\n break;\n\n case \"AssignmentPattern\":\n this.checkLVal(\n expr.left,\n \"assignment pattern\",\n bindingType,\n checkClashes,\n );\n break;\n\n case \"RestElement\":\n this.checkLVal(\n expr.argument,\n \"rest element\",\n bindingType,\n checkClashes,\n );\n break;\n\n case \"ParenthesizedExpression\":\n this.checkLVal(\n expr.expression,\n \"parenthesized expression\",\n bindingType,\n checkClashes,\n );\n break;\n\n default: {\n this.raise(\n bindingType === BIND_NONE\n ? Errors.InvalidLhs\n : Errors.InvalidLhsBinding,\n { node: expr },\n contextDescription,\n );\n }\n }\n }\n\n checkToRestConversion(node: SpreadElement): void {\n if (\n node.argument.type !== \"Identifier\" &&\n node.argument.type !== \"MemberExpression\"\n ) {\n this.raise(Errors.InvalidRestAssignmentPattern, {\n node: node.argument,\n });\n }\n }\n\n checkCommaAfterRest(close: $Values<typeof charCodes>): boolean {\n if (!this.match(tt.comma)) {\n return false;\n }\n\n this.raise(\n this.lookaheadCharCode() === close\n ? Errors.RestTrailingComma\n : Errors.ElementAfterRest,\n { at: this.state.startLoc },\n );\n\n return true;\n }\n}\n","// @flow\n\n// A recursive descent parser operates by defining functions for all\n// syntactic elements, and recursively calling those, each function\n// advancing the input stream and returning an AST node. Precedence\n// of constructs (for example, the fact that `!x[1]` means `!(x[1])`\n// instead of `(!x)[1]` is handled by the fact that the parser\n// function that parses unary prefix operators is called first, and\n// in turn calls the function that parses `[]` subscripts — that\n// way, it'll receive the node for `x[1]` already parsed, and wraps\n// *that* in the unary operator node.\n//\n// Acorn uses an [operator precedence parser][opp] to handle binary\n// operator precedence, because it is much more compact than using\n// the technique outlined above, which uses different, nesting\n// functions to specify precedence, for all of the ten binary\n// precedence levels that JavaScript defines.\n//\n// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser\n\nimport {\n tokenCanStartExpression,\n tokenIsAssignment,\n tokenIsIdentifier,\n tokenIsKeywordOrIdentifier,\n tokenIsOperator,\n tokenIsPostfix,\n tokenIsPrefix,\n tokenIsRightAssociative,\n tokenIsTemplate,\n tokenKeywordOrIdentifierIsKeyword,\n tokenLabelName,\n tokenOperatorPrecedence,\n tt,\n type TokenType,\n} from \"../tokenizer/types\";\nimport * as N from \"../types\";\nimport LValParser from \"./lval\";\nimport {\n isKeyword,\n isReservedWord,\n isStrictReservedWord,\n isStrictBindReservedWord,\n isIdentifierStart,\n canBeReservedWord,\n} from \"../util/identifier\";\nimport { Position, createPositionWithColumnOffset } from \"../util/location\";\nimport * as charCodes from \"charcodes\";\nimport {\n BIND_OUTSIDE,\n BIND_VAR,\n SCOPE_ARROW,\n SCOPE_CLASS,\n SCOPE_DIRECT_SUPER,\n SCOPE_FUNCTION,\n SCOPE_SUPER,\n} from \"../util/scopeflags\";\nimport { ExpressionErrors } from \"./util\";\nimport {\n PARAM_AWAIT,\n PARAM_IN,\n PARAM_RETURN,\n functionFlags,\n} from \"../util/production-parameter\";\nimport {\n newArrowHeadScope,\n newAsyncArrowScope,\n newExpressionScope,\n} from \"../util/expression-scope\";\nimport { Errors, SourceTypeModuleErrors } from \"./error\";\nimport type { ParsingError } from \"./error\";\nimport { setInnerComments } from \"./comments\";\nimport { cloneIdentifier } from \"./node\";\n\n/*::\nimport type { SourceType } from \"../options\";\ndeclare var invariant;\n*/\n\nconst invalidHackPipeBodies = new Map([\n [\"ArrowFunctionExpression\", \"arrow function\"],\n [\"AssignmentExpression\", \"assignment\"],\n [\"ConditionalExpression\", \"conditional\"],\n [\"YieldExpression\", \"yield\"],\n]);\n\nexport default class ExpressionParser extends LValParser {\n // Forward-declaration: defined in statement.js\n /*::\n +parseBlock: (\n allowDirectives?: boolean,\n createNewLexicalScope?: boolean,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ) => N.BlockStatement;\n +parseClass: (\n node: N.Class,\n isStatement: boolean,\n optionalId?: boolean,\n ) => N.Class;\n +parseDecorators: (allowExport?: boolean) => void;\n +parseFunction: <T: N.NormalFunction>(\n node: T,\n statement?: number,\n allowExpressionBody?: boolean,\n isAsync?: boolean,\n ) => T;\n +parseFunctionParams: (node: N.Function, allowModifiers?: boolean) => void;\n +takeDecorators: (node: N.HasDecorators) => void;\n +parseBlockOrModuleBlockBody: (\n body: N.Statement[],\n directives: ?(N.Directive[]),\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void\n ) => void\n +parseProgram: (\n program: N.Program, end: TokenType, sourceType?: SourceType\n ) => N.Program\n */\n\n // For object literal, check if property __proto__ has been used more than once.\n // If the expression is a destructuring assignment, then __proto__ may appear\n // multiple times. Otherwise, __proto__ is a duplicated key.\n\n // For record expression, check if property __proto__ exists\n\n checkProto(\n prop: N.ObjectMember | N.SpreadElement,\n isRecord: ?boolean,\n protoRef: { used: boolean },\n refExpressionErrors: ?ExpressionErrors,\n ): void {\n if (\n prop.type === \"SpreadElement\" ||\n this.isObjectMethod(prop) ||\n prop.computed ||\n // $FlowIgnore\n prop.shorthand\n ) {\n return;\n }\n\n const key = prop.key;\n // It is either an Identifier or a String/NumericLiteral\n const name = key.type === \"Identifier\" ? key.name : key.value;\n\n if (name === \"__proto__\") {\n if (isRecord) {\n this.raise(Errors.RecordNoProto, { node: key });\n return;\n }\n if (protoRef.used) {\n if (refExpressionErrors) {\n // Store the first redefinition's position, otherwise ignore because\n // we are parsing ambiguous pattern\n if (refExpressionErrors.doubleProtoLoc === null) {\n refExpressionErrors.doubleProtoLoc = key.loc.start;\n }\n } else {\n this.raise(Errors.DuplicateProto, { node: key });\n }\n }\n\n protoRef.used = true;\n }\n }\n\n shouldExitDescending(expr: N.Expression, potentialArrowAt: number): boolean {\n return (\n expr.type === \"ArrowFunctionExpression\" && expr.start === potentialArrowAt\n );\n }\n\n // Convenience method to parse an Expression only\n getExpression(): N.Expression & N.ParserOutput {\n this.enterInitialScopes();\n this.nextToken();\n const expr = this.parseExpression();\n if (!this.match(tt.eof)) {\n this.unexpected();\n }\n // Unlike parseTopLevel, we need to drain remaining commentStacks\n // because the top level node is _not_ Program.\n this.finalizeRemainingComments();\n expr.comments = this.state.comments;\n expr.errors = this.state.errors;\n if (this.options.tokens) {\n expr.tokens = this.tokens;\n }\n return expr;\n }\n\n // ### Expression parsing\n\n // These nest, from the most general expression type at the top to\n // 'atomic', nondivisible expression types at the bottom. Most of\n // the functions will simply let the function (s) below them parse,\n // and, *if* the syntactic construct they handle is present, wrap\n // the AST node that the inner parser gave them in another node.\n\n // Parse a full expression.\n // - `disallowIn`\n // is used to forbid the `in` operator (in for loops initialization expressions)\n // When `disallowIn` is true, the production parameter [In] is not present.\n\n // - `refExpressionErrors `\n // provides reference for storing '=' operator inside shorthand\n // property assignment in contexts where both object expression\n // and object pattern might appear (so it's possible to raise\n // delayed syntax error at correct position).\n\n parseExpression(\n disallowIn?: boolean,\n refExpressionErrors?: ExpressionErrors,\n ): N.Expression {\n if (disallowIn) {\n return this.disallowInAnd(() =>\n this.parseExpressionBase(refExpressionErrors),\n );\n }\n return this.allowInAnd(() => this.parseExpressionBase(refExpressionErrors));\n }\n\n // https://tc39.es/ecma262/#prod-Expression\n parseExpressionBase(refExpressionErrors?: ExpressionErrors): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const expr = this.parseMaybeAssign(refExpressionErrors);\n if (this.match(tt.comma)) {\n const node = this.startNodeAt(startPos, startLoc);\n node.expressions = [expr];\n while (this.eat(tt.comma)) {\n node.expressions.push(this.parseMaybeAssign(refExpressionErrors));\n }\n this.toReferencedList(node.expressions);\n return this.finishNode(node, \"SequenceExpression\");\n }\n return expr;\n }\n\n // Set [~In] parameter for assignment expression\n parseMaybeAssignDisallowIn(\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n ) {\n return this.disallowInAnd(() =>\n this.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n );\n }\n\n // Set [+In] parameter for assignment expression\n parseMaybeAssignAllowIn(\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n ) {\n return this.allowInAnd(() =>\n this.parseMaybeAssign(refExpressionErrors, afterLeftParse),\n );\n }\n\n // This method is only used by\n // the typescript and flow plugins.\n setOptionalParametersError(\n refExpressionErrors: ExpressionErrors,\n resultError?: ParsingError,\n ) {\n refExpressionErrors.optionalParametersLoc =\n resultError?.loc ?? this.state.startLoc;\n }\n\n // Parse an assignment expression. This includes applications of\n // operators like `+=`.\n // https://tc39.es/ecma262/#prod-AssignmentExpression\n parseMaybeAssign(\n refExpressionErrors?: ?ExpressionErrors,\n afterLeftParse?: Function,\n ): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n if (this.isContextual(tt._yield)) {\n if (this.prodParam.hasYield) {\n let left = this.parseYield();\n if (afterLeftParse) {\n left = afterLeftParse.call(this, left, startPos, startLoc);\n }\n return left;\n }\n }\n\n let ownExpressionErrors;\n if (refExpressionErrors) {\n ownExpressionErrors = false;\n } else {\n refExpressionErrors = new ExpressionErrors();\n ownExpressionErrors = true;\n }\n const { type } = this.state;\n\n if (type === tt.parenL || tokenIsIdentifier(type)) {\n this.state.potentialArrowAt = this.state.start;\n }\n\n let left = this.parseMaybeConditional(refExpressionErrors);\n if (afterLeftParse) {\n left = afterLeftParse.call(this, left, startPos, startLoc);\n }\n if (tokenIsAssignment(this.state.type)) {\n const node = this.startNodeAt(startPos, startLoc);\n const operator = this.state.value;\n node.operator = operator;\n\n if (this.match(tt.eq)) {\n node.left = this.toAssignable(left, /* isLHS */ true);\n\n if (\n refExpressionErrors.doubleProtoLoc != null &&\n refExpressionErrors.doubleProtoLoc.index >= startPos\n ) {\n refExpressionErrors.doubleProtoLoc = null; // reset because double __proto__ is valid in assignment expression\n }\n if (\n refExpressionErrors.shorthandAssignLoc != null &&\n refExpressionErrors.shorthandAssignLoc.index >= startPos\n ) {\n refExpressionErrors.shorthandAssignLoc = null; // reset because shorthand default was used correctly\n }\n if (\n refExpressionErrors.privateKeyLoc != null &&\n refExpressionErrors.privateKeyLoc.index >= startPos\n ) {\n this.checkDestructuringPrivate(refExpressionErrors);\n refExpressionErrors.privateKeyLoc = null; // reset because `({ #x: x })` is an assignable pattern\n }\n } else {\n node.left = left;\n }\n\n this.checkLVal(left, \"assignment expression\");\n this.next();\n node.right = this.parseMaybeAssign();\n return this.finishNode(node, \"AssignmentExpression\");\n } else if (ownExpressionErrors) {\n this.checkExpressionErrors(refExpressionErrors, true);\n }\n\n return left;\n }\n\n // Parse a ternary conditional (`?:`) operator.\n // https://tc39.es/ecma262/#prod-ConditionalExpression\n\n parseMaybeConditional(refExpressionErrors: ExpressionErrors): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const potentialArrowAt = this.state.potentialArrowAt;\n const expr = this.parseExprOps(refExpressionErrors);\n\n if (this.shouldExitDescending(expr, potentialArrowAt)) {\n return expr;\n }\n\n return this.parseConditional(expr, startPos, startLoc, refExpressionErrors);\n }\n\n parseConditional(\n expr: N.Expression,\n startPos: number,\n startLoc: Position,\n // eslint-disable-next-line no-unused-vars\n refExpressionErrors?: ?ExpressionErrors,\n ): N.Expression {\n if (this.eat(tt.question)) {\n const node = this.startNodeAt(startPos, startLoc);\n node.test = expr;\n node.consequent = this.parseMaybeAssignAllowIn();\n this.expect(tt.colon);\n node.alternate = this.parseMaybeAssign();\n return this.finishNode(node, \"ConditionalExpression\");\n }\n return expr;\n }\n\n parseMaybeUnaryOrPrivate(\n refExpressionErrors?: ExpressionErrors,\n ): N.Expression | N.PrivateName {\n return this.match(tt.privateName)\n ? this.parsePrivateName()\n : this.parseMaybeUnary(refExpressionErrors);\n }\n\n // Start the precedence parser.\n // https://tc39.es/ecma262/#prod-ShortCircuitExpression\n\n parseExprOps(refExpressionErrors: ExpressionErrors): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const potentialArrowAt = this.state.potentialArrowAt;\n const expr = this.parseMaybeUnaryOrPrivate(refExpressionErrors);\n\n if (this.shouldExitDescending(expr, potentialArrowAt)) {\n return expr;\n }\n\n return this.parseExprOp(expr, startPos, startLoc, -1);\n }\n\n // Parse binary operators with the operator precedence parsing\n // algorithm. `left` is the left-hand side of the operator.\n // `minPrec` provides context that allows the function to stop and\n // defer further parser to one of its callers when it encounters an\n // operator that has a lower precedence than the set it is parsing.\n\n parseExprOp(\n left: N.Expression | N.PrivateName,\n leftStartPos: number,\n leftStartLoc: Position,\n minPrec: number,\n ): N.Expression {\n if (this.isPrivateName(left)) {\n // https://tc39.es/ecma262/#prod-RelationalExpression\n // RelationalExpression [In, Yield, Await]\n // [+In] PrivateIdentifier in ShiftExpression[?Yield, ?Await]\n\n const value = this.getPrivateNameSV(left);\n\n if (\n minPrec >= tokenOperatorPrecedence(tt._in) ||\n !this.prodParam.hasIn ||\n !this.match(tt._in)\n ) {\n this.raise(Errors.PrivateInExpectedIn, { node: left }, value);\n }\n\n this.classScope.usePrivateName(value, left.loc.start);\n }\n\n const op = this.state.type;\n if (tokenIsOperator(op) && (this.prodParam.hasIn || !this.match(tt._in))) {\n let prec = tokenOperatorPrecedence(op);\n if (prec > minPrec) {\n if (op === tt.pipeline) {\n this.expectPlugin(\"pipelineOperator\");\n if (this.state.inFSharpPipelineDirectBody) {\n return left;\n }\n this.checkPipelineAtInfixOperator(left, leftStartLoc);\n }\n const node = this.startNodeAt(leftStartPos, leftStartLoc);\n node.left = left;\n node.operator = this.state.value;\n\n const logical = op === tt.logicalOR || op === tt.logicalAND;\n const coalesce = op === tt.nullishCoalescing;\n\n if (coalesce) {\n // Handle the precedence of `tt.coalesce` as equal to the range of logical expressions.\n // In other words, `node.right` shouldn't contain logical expressions in order to check the mixed error.\n prec = tokenOperatorPrecedence(tt.logicalAND);\n }\n\n this.next();\n\n if (\n op === tt.pipeline &&\n this.hasPlugin([\"pipelineOperator\", { proposal: \"minimal\" }])\n ) {\n if (this.state.type === tt._await && this.prodParam.hasAwait) {\n throw this.raise(Errors.UnexpectedAwaitAfterPipelineBody, {\n at: this.state.startLoc,\n });\n }\n }\n\n node.right = this.parseExprOpRightExpr(op, prec);\n this.finishNode(\n node,\n logical || coalesce ? \"LogicalExpression\" : \"BinaryExpression\",\n );\n /* this check is for all ?? operators\n * a ?? b && c for this example\n * when op is coalesce and nextOp is logical (&&), throw at the pos of nextOp that it can not be mixed.\n * Symmetrically it also throws when op is logical and nextOp is coalesce\n */\n const nextOp = this.state.type;\n if (\n (coalesce && (nextOp === tt.logicalOR || nextOp === tt.logicalAND)) ||\n (logical && nextOp === tt.nullishCoalescing)\n ) {\n throw this.raise(Errors.MixingCoalesceWithLogical, {\n at: this.state.startLoc,\n });\n }\n\n return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec);\n }\n }\n return left;\n }\n\n // Helper function for `parseExprOp`. Parse the right-hand side of binary-\n // operator expressions, then apply any operator-specific functions.\n\n parseExprOpRightExpr(op: TokenType, prec: number): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n switch (op) {\n case tt.pipeline:\n switch (this.getPluginOption(\"pipelineOperator\", \"proposal\")) {\n case \"hack\":\n return this.withTopicBindingContext(() => {\n return this.parseHackPipeBody();\n });\n\n case \"smart\":\n return this.withTopicBindingContext(() => {\n if (this.prodParam.hasYield && this.isContextual(tt._yield)) {\n throw this.raise(\n Errors.PipeBodyIsTighter,\n { at: this.state.startLoc },\n this.state.value,\n );\n }\n return this.parseSmartPipelineBodyInStyle(\n this.parseExprOpBaseRightExpr(op, prec),\n startPos,\n startLoc,\n );\n });\n\n case \"fsharp\":\n return this.withSoloAwaitPermittingContext(() => {\n return this.parseFSharpPipelineBody(prec);\n });\n }\n\n // Falls through.\n default:\n return this.parseExprOpBaseRightExpr(op, prec);\n }\n }\n\n // Helper function for `parseExprOpRightExpr`. Parse the right-hand side of\n // binary-operator expressions without applying any operator-specific functions.\n\n parseExprOpBaseRightExpr(op: TokenType, prec: number): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n return this.parseExprOp(\n this.parseMaybeUnaryOrPrivate(),\n startPos,\n startLoc,\n tokenIsRightAssociative(op) ? prec - 1 : prec,\n );\n }\n\n parseHackPipeBody(): N.Expression {\n const { startLoc } = this.state;\n const body = this.parseMaybeAssign();\n\n // TODO: Check how to handle type casts in Flow and TS once they are supported\n if (invalidHackPipeBodies.has(body.type) && !body.extra?.parenthesized) {\n this.raise(\n Errors.PipeUnparenthesizedBody,\n { at: startLoc },\n invalidHackPipeBodies.get(body.type),\n );\n }\n if (!this.topicReferenceWasUsedInCurrentContext()) {\n // A Hack pipe body must use the topic reference at least once.\n this.raise(Errors.PipeTopicUnused, { at: startLoc });\n }\n\n return body;\n }\n\n checkExponentialAfterUnary(node: N.AwaitExpression | N.UnaryExpression) {\n if (this.match(tt.exponent)) {\n this.raise(Errors.UnexpectedTokenUnaryExponentiation, {\n node: node.argument,\n });\n }\n }\n\n // Parse unary operators, both prefix and postfix.\n // https://tc39.es/ecma262/#prod-UnaryExpression\n parseMaybeUnary(\n refExpressionErrors: ?ExpressionErrors,\n sawUnary?: boolean,\n ): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const isAwait = this.isContextual(tt._await);\n\n if (isAwait && this.isAwaitAllowed()) {\n this.next();\n const expr = this.parseAwait(startPos, startLoc);\n if (!sawUnary) this.checkExponentialAfterUnary(expr);\n return expr;\n }\n const update = this.match(tt.incDec);\n const node = this.startNode();\n if (tokenIsPrefix(this.state.type)) {\n node.operator = this.state.value;\n node.prefix = true;\n\n if (this.match(tt._throw)) {\n this.expectPlugin(\"throwExpressions\");\n }\n const isDelete = this.match(tt._delete);\n this.next();\n\n node.argument = this.parseMaybeUnary(null, true);\n\n this.checkExpressionErrors(refExpressionErrors, true);\n\n if (this.state.strict && isDelete) {\n const arg = node.argument;\n\n if (arg.type === \"Identifier\") {\n this.raise(Errors.StrictDelete, { node });\n } else if (this.hasPropertyAsPrivateName(arg)) {\n this.raise(Errors.DeletePrivateField, { node });\n }\n }\n\n if (!update) {\n if (!sawUnary) this.checkExponentialAfterUnary(node);\n return this.finishNode(node, \"UnaryExpression\");\n }\n }\n\n const expr = this.parseUpdate(node, update, refExpressionErrors);\n\n if (isAwait) {\n const { type } = this.state;\n const startsExpr = this.hasPlugin(\"v8intrinsic\")\n ? tokenCanStartExpression(type)\n : tokenCanStartExpression(type) && !this.match(tt.modulo);\n if (startsExpr && !this.isAmbiguousAwait()) {\n this.raiseOverwrite(startLoc, Errors.AwaitNotInAsyncContext);\n return this.parseAwait(startPos, startLoc);\n }\n }\n\n return expr;\n }\n\n // https://tc39.es/ecma262/#prod-UpdateExpression\n parseUpdate(\n node: N.Expression,\n update: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): N.Expression {\n if (update) {\n this.checkLVal(node.argument, \"prefix operation\");\n return this.finishNode(node, \"UpdateExpression\");\n }\n\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n let expr = this.parseExprSubscripts(refExpressionErrors);\n if (this.checkExpressionErrors(refExpressionErrors, false)) return expr;\n while (tokenIsPostfix(this.state.type) && !this.canInsertSemicolon()) {\n const node = this.startNodeAt(startPos, startLoc);\n node.operator = this.state.value;\n node.prefix = false;\n node.argument = expr;\n this.checkLVal(expr, \"postfix operation\");\n this.next();\n expr = this.finishNode(node, \"UpdateExpression\");\n }\n return expr;\n }\n\n // Parse call, dot, and `[]`-subscript expressions.\n // https://tc39.es/ecma262/#prod-LeftHandSideExpression\n parseExprSubscripts(refExpressionErrors: ?ExpressionErrors): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n const potentialArrowAt = this.state.potentialArrowAt;\n const expr = this.parseExprAtom(refExpressionErrors);\n\n if (this.shouldExitDescending(expr, potentialArrowAt)) {\n return expr;\n }\n\n return this.parseSubscripts(expr, startPos, startLoc);\n }\n\n parseSubscripts(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls?: ?boolean,\n ): N.Expression {\n const state = {\n optionalChainMember: false,\n maybeAsyncArrow: this.atPossibleAsyncArrow(base),\n stop: false,\n };\n do {\n base = this.parseSubscript(base, startPos, startLoc, noCalls, state);\n\n // After parsing a subscript, this isn't \"async\" for sure.\n state.maybeAsyncArrow = false;\n } while (!state.stop);\n return base;\n }\n\n /**\n * @param state Set 'state.stop = true' to indicate that we should stop parsing subscripts.\n * state.optionalChainMember to indicate that the member is currently in OptionalChain\n */\n parseSubscript(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n state: N.ParseSubscriptState,\n ): N.Expression {\n const { type } = this.state;\n if (!noCalls && type === tt.doubleColon) {\n return this.parseBind(base, startPos, startLoc, noCalls, state);\n } else if (tokenIsTemplate(type)) {\n return this.parseTaggedTemplateExpression(\n base,\n startPos,\n startLoc,\n state,\n );\n }\n\n let optional = false;\n\n if (type === tt.questionDot) {\n if (noCalls && this.lookaheadCharCode() === charCodes.leftParenthesis) {\n // stop at `?.` when parsing `new a?.()`\n state.stop = true;\n return base;\n }\n state.optionalChainMember = optional = true;\n this.next();\n }\n\n if (!noCalls && this.match(tt.parenL)) {\n return this.parseCoverCallAndAsyncArrowHead(\n base,\n startPos,\n startLoc,\n state,\n optional,\n );\n } else {\n const computed = this.eat(tt.bracketL);\n if (computed || optional || this.eat(tt.dot)) {\n return this.parseMember(\n base,\n startPos,\n startLoc,\n state,\n computed,\n optional,\n );\n } else {\n state.stop = true;\n return base;\n }\n }\n }\n\n // base[?Yield, ?Await] [ Expression[+In, ?Yield, ?Await] ]\n // base[?Yield, ?Await] . IdentifierName\n // base[?Yield, ?Await] . PrivateIdentifier\n // where `base` is one of CallExpression, MemberExpression and OptionalChain\n parseMember(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n state: N.ParseSubscriptState,\n computed: boolean,\n optional: boolean,\n ): N.OptionalMemberExpression | N.MemberExpression {\n const node = this.startNodeAt(startPos, startLoc);\n node.object = base;\n node.computed = computed;\n if (computed) {\n node.property = this.parseExpression();\n this.expect(tt.bracketR);\n } else if (this.match(tt.privateName)) {\n if (base.type === \"Super\") {\n this.raise(Errors.SuperPrivateField, { at: startLoc });\n }\n this.classScope.usePrivateName(this.state.value, this.state.startLoc);\n node.property = this.parsePrivateName();\n } else {\n node.property = this.parseIdentifier(true);\n }\n\n if (state.optionalChainMember) {\n node.optional = optional;\n return this.finishNode(node, \"OptionalMemberExpression\");\n } else {\n return this.finishNode(node, \"MemberExpression\");\n }\n }\n\n // https://github.com/tc39/proposal-bind-operator#syntax\n parseBind(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n noCalls: ?boolean,\n state: N.ParseSubscriptState,\n ): N.Expression {\n const node = this.startNodeAt(startPos, startLoc);\n node.object = base;\n this.next(); // eat '::'\n node.callee = this.parseNoCallExpr();\n state.stop = true;\n return this.parseSubscripts(\n this.finishNode(node, \"BindExpression\"),\n startPos,\n startLoc,\n noCalls,\n );\n }\n\n // https://tc39.es/ecma262/#prod-CoverCallExpressionAndAsyncArrowHead\n // CoverCallExpressionAndAsyncArrowHead\n // CallExpression[?Yield, ?Await] Arguments[?Yield, ?Await]\n // OptionalChain[?Yield, ?Await] Arguments[?Yield, ?Await]\n parseCoverCallAndAsyncArrowHead(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n state: N.ParseSubscriptState,\n optional: boolean,\n ): N.Expression {\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n let refExpressionErrors = null;\n\n this.state.maybeInArrowParameters = true;\n this.next(); // eat `(`\n\n let node = this.startNodeAt(startPos, startLoc);\n node.callee = base;\n const { maybeAsyncArrow, optionalChainMember } = state;\n\n if (maybeAsyncArrow) {\n this.expressionScope.enter(newAsyncArrowScope());\n refExpressionErrors = new ExpressionErrors();\n }\n\n if (optionalChainMember) {\n node.optional = optional;\n }\n\n if (optional) {\n node.arguments = this.parseCallExpressionArguments(tt.parenR);\n } else {\n node.arguments = this.parseCallExpressionArguments(\n tt.parenR,\n base.type === \"Import\",\n base.type !== \"Super\",\n node,\n refExpressionErrors,\n );\n }\n this.finishCallExpression(node, optionalChainMember);\n\n if (maybeAsyncArrow && this.shouldParseAsyncArrow() && !optional) {\n /*:: invariant(refExpressionErrors != null) */\n state.stop = true;\n this.checkDestructuringPrivate(refExpressionErrors);\n this.expressionScope.validateAsPattern();\n this.expressionScope.exit();\n node = this.parseAsyncArrowFromCallExpression(\n this.startNodeAt(startPos, startLoc),\n node,\n );\n } else {\n if (maybeAsyncArrow) {\n this.checkExpressionErrors(refExpressionErrors, true);\n this.expressionScope.exit();\n }\n this.toReferencedArguments(node);\n }\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n\n return node;\n }\n\n toReferencedArguments(\n node: N.CallExpression | N.OptionalCallExpression,\n isParenthesizedExpr?: boolean,\n ) {\n this.toReferencedListDeep(node.arguments, isParenthesizedExpr);\n }\n\n // MemberExpression [?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]\n // CallExpression [?Yield, ?Await] TemplateLiteral[?Yield, ?Await, +Tagged]\n parseTaggedTemplateExpression(\n base: N.Expression,\n startPos: number,\n startLoc: Position,\n state: N.ParseSubscriptState,\n ): N.TaggedTemplateExpression {\n const node: N.TaggedTemplateExpression = this.startNodeAt(\n startPos,\n startLoc,\n );\n node.tag = base;\n node.quasi = this.parseTemplate(true);\n if (state.optionalChainMember) {\n this.raise(Errors.OptionalChainingNoTemplate, { at: startLoc });\n }\n return this.finishNode(node, \"TaggedTemplateExpression\");\n }\n\n atPossibleAsyncArrow(base: N.Expression): boolean {\n return (\n base.type === \"Identifier\" &&\n base.name === \"async\" &&\n this.state.lastTokEndLoc.index === base.end &&\n !this.canInsertSemicolon() &&\n // check there are no escape sequences, such as \\u{61}sync\n base.end - base.start === 5 &&\n base.start === this.state.potentialArrowAt\n );\n }\n\n finishCallExpression<T: N.CallExpression | N.OptionalCallExpression>(\n node: T,\n optional: boolean,\n ): N.Expression {\n if (node.callee.type === \"Import\") {\n if (node.arguments.length === 2) {\n if (process.env.BABEL_8_BREAKING) {\n this.expectPlugin(\"importAssertions\");\n } else {\n if (!this.hasPlugin(\"moduleAttributes\")) {\n this.expectPlugin(\"importAssertions\");\n }\n }\n }\n if (node.arguments.length === 0 || node.arguments.length > 2) {\n this.raise(\n Errors.ImportCallArity,\n { node },\n this.hasPlugin(\"importAssertions\") ||\n this.hasPlugin(\"moduleAttributes\")\n ? \"one or two arguments\"\n : \"one argument\",\n );\n } else {\n for (const arg of node.arguments) {\n if (arg.type === \"SpreadElement\") {\n this.raise(Errors.ImportCallSpreadArgument, { node: arg });\n }\n }\n }\n }\n return this.finishNode(\n node,\n optional ? \"OptionalCallExpression\" : \"CallExpression\",\n );\n }\n\n parseCallExpressionArguments(\n close: TokenType,\n dynamicImport?: boolean,\n allowPlaceholder?: boolean,\n nodeForExtra?: ?N.Node,\n refExpressionErrors?: ?ExpressionErrors,\n ): $ReadOnlyArray<?N.Expression> {\n const elts = [];\n let first = true;\n const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n this.state.inFSharpPipelineDirectBody = false;\n\n while (!this.eat(close)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma);\n if (this.match(close)) {\n if (\n dynamicImport &&\n !this.hasPlugin(\"importAssertions\") &&\n !this.hasPlugin(\"moduleAttributes\")\n ) {\n this.raise(Errors.ImportCallArgumentTrailingComma, {\n at: this.state.lastTokStartLoc,\n });\n }\n if (nodeForExtra) {\n this.addTrailingCommaExtraToNode(nodeForExtra);\n }\n this.next();\n break;\n }\n }\n\n elts.push(\n this.parseExprListItem(false, refExpressionErrors, allowPlaceholder),\n );\n }\n\n this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n\n return elts;\n }\n\n shouldParseAsyncArrow(): boolean {\n return this.match(tt.arrow) && !this.canInsertSemicolon();\n }\n\n parseAsyncArrowFromCallExpression(\n node: N.ArrowFunctionExpression,\n call: N.CallExpression,\n ): N.ArrowFunctionExpression {\n this.resetPreviousNodeTrailingComments(call);\n this.expect(tt.arrow);\n this.parseArrowExpression(\n node,\n call.arguments,\n true,\n call.extra?.trailingCommaLoc,\n );\n // mark inner comments of `async()` as inner comments of `async () =>`\n if (call.innerComments) {\n setInnerComments(node, call.innerComments);\n }\n // mark trailing comments of `async` to be inner comments\n if (call.callee.trailingComments) {\n setInnerComments(node, call.callee.trailingComments);\n }\n return node;\n }\n\n // Parse a no-call expression (like argument of `new` or `::` operators).\n // https://tc39.es/ecma262/#prod-MemberExpression\n parseNoCallExpr(): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n return this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);\n }\n\n // Parse an atomic expression — either a single token that is an\n // expression, an expression started by a keyword like `function` or\n // `new`, or an expression wrapped in punctuation like `()`, `[]`,\n // or `{}`.\n\n // https://tc39.es/ecma262/#prod-PrimaryExpression\n // https://tc39.es/ecma262/#prod-AsyncArrowFunction\n // PrimaryExpression\n // Super\n // Import\n // AsyncArrowFunction\n\n parseExprAtom(refExpressionErrors?: ?ExpressionErrors): N.Expression {\n let node;\n\n const { type } = this.state;\n switch (type) {\n case tt._super:\n return this.parseSuper();\n\n case tt._import:\n node = this.startNode();\n this.next();\n\n if (this.match(tt.dot)) {\n return this.parseImportMetaProperty(node);\n }\n\n if (!this.match(tt.parenL)) {\n this.raise(Errors.UnsupportedImport, {\n at: this.state.lastTokStartLoc,\n });\n }\n return this.finishNode(node, \"Import\");\n case tt._this:\n node = this.startNode();\n this.next();\n return this.finishNode(node, \"ThisExpression\");\n\n case tt._do: {\n return this.parseDo(this.startNode(), false);\n }\n\n case tt.slash:\n case tt.slashAssign: {\n this.readRegexp();\n return this.parseRegExpLiteral(this.state.value);\n }\n\n case tt.num:\n return this.parseNumericLiteral(this.state.value);\n\n case tt.bigint:\n return this.parseBigIntLiteral(this.state.value);\n\n case tt.decimal:\n return this.parseDecimalLiteral(this.state.value);\n\n case tt.string:\n return this.parseStringLiteral(this.state.value);\n\n case tt._null:\n return this.parseNullLiteral();\n\n case tt._true:\n return this.parseBooleanLiteral(true);\n case tt._false:\n return this.parseBooleanLiteral(false);\n\n case tt.parenL: {\n const canBeArrow = this.state.potentialArrowAt === this.state.start;\n return this.parseParenAndDistinguishExpression(canBeArrow);\n }\n\n case tt.bracketBarL:\n case tt.bracketHashL: {\n return this.parseArrayLike(\n this.state.type === tt.bracketBarL ? tt.bracketBarR : tt.bracketR,\n /* canBePattern */ false,\n /* isTuple */ true,\n );\n }\n case tt.bracketL: {\n return this.parseArrayLike(\n tt.bracketR,\n /* canBePattern */ true,\n /* isTuple */ false,\n refExpressionErrors,\n );\n }\n case tt.braceBarL:\n case tt.braceHashL: {\n return this.parseObjectLike(\n this.state.type === tt.braceBarL ? tt.braceBarR : tt.braceR,\n /* isPattern */ false,\n /* isRecord */ true,\n );\n }\n case tt.braceL: {\n return this.parseObjectLike(\n tt.braceR,\n /* isPattern */ false,\n /* isRecord */ false,\n refExpressionErrors,\n );\n }\n case tt._function:\n return this.parseFunctionOrFunctionSent();\n\n case tt.at:\n this.parseDecorators();\n // fall through\n case tt._class:\n node = this.startNode();\n this.takeDecorators(node);\n return this.parseClass(node, false);\n\n case tt._new:\n return this.parseNewOrNewTarget();\n\n case tt.templateNonTail:\n case tt.templateTail:\n return this.parseTemplate(false);\n\n // BindExpression[Yield]\n // :: MemberExpression[?Yield]\n case tt.doubleColon: {\n node = this.startNode();\n this.next();\n node.object = null;\n const callee = (node.callee = this.parseNoCallExpr());\n if (callee.type === \"MemberExpression\") {\n return this.finishNode(node, \"BindExpression\");\n } else {\n throw this.raise(Errors.UnsupportedBind, { node: callee });\n }\n }\n\n case tt.privateName: {\n // Standalone private names are only allowed in \"#x in obj\"\n // expressions, and they are directly handled by callers of\n // parseExprOp. If we reach this, the input is always invalid.\n // We can throw a better error message and recover, rather than\n // just throwing \"Unexpected token\" (which is the default\n // behavior of this big switch statement).\n this.raise(\n Errors.PrivateInExpectedIn,\n { at: this.state.startLoc },\n this.state.value,\n );\n return this.parsePrivateName();\n }\n\n case tt.moduloAssign: {\n return this.parseTopicReferenceThenEqualsSign(tt.modulo, \"%\");\n }\n\n case tt.xorAssign: {\n return this.parseTopicReferenceThenEqualsSign(tt.bitwiseXOR, \"^\");\n }\n\n case tt.doubleCaret:\n case tt.doubleAt: {\n return this.parseTopicReference(\"hack\");\n }\n\n case tt.bitwiseXOR:\n case tt.modulo:\n case tt.hash: {\n const pipeProposal = this.getPluginOption(\n \"pipelineOperator\",\n \"proposal\",\n );\n\n if (pipeProposal) {\n return this.parseTopicReference(pipeProposal);\n } else {\n throw this.unexpected();\n }\n }\n\n case tt.lt: {\n const lookaheadCh = this.input.codePointAt(this.nextTokenStart());\n if (\n isIdentifierStart(lookaheadCh) || // Element/Type Parameter <foo>\n lookaheadCh === charCodes.greaterThan // Fragment <>\n ) {\n this.expectOnePlugin([\"jsx\", \"flow\", \"typescript\"]);\n break;\n } else {\n throw this.unexpected();\n }\n }\n\n default:\n if (tokenIsIdentifier(type)) {\n if (\n this.isContextual(tt._module) &&\n this.lookaheadCharCode() === charCodes.leftCurlyBrace &&\n !this.hasFollowingLineBreak()\n ) {\n return this.parseModuleExpression();\n }\n const canBeArrow = this.state.potentialArrowAt === this.state.start;\n const containsEsc = this.state.containsEsc;\n const id = this.parseIdentifier();\n\n if (\n !containsEsc &&\n id.name === \"async\" &&\n !this.canInsertSemicolon()\n ) {\n const { type } = this.state;\n if (type === tt._function) {\n this.resetPreviousNodeTrailingComments(id);\n this.next();\n return this.parseFunction(\n this.startNodeAtNode(id),\n undefined,\n true,\n );\n } else if (tokenIsIdentifier(type)) {\n // If the next token begins with \"=\", commit to parsing an async\n // arrow function. (Peeking ahead for \"=\" lets us avoid a more\n // expensive full-token lookahead on this common path.)\n if (this.lookaheadCharCode() === charCodes.equalsTo) {\n // although `id` is not used in async arrow unary function,\n // we don't need to reset `async`'s trailing comments because\n // it will be attached to the upcoming async arrow binding identifier\n return this.parseAsyncArrowUnaryFunction(\n this.startNodeAtNode(id),\n );\n } else {\n // Otherwise, treat \"async\" as an identifier and let calling code\n // deal with the current tt.name token.\n return id;\n }\n } else if (type === tt._do) {\n this.resetPreviousNodeTrailingComments(id);\n return this.parseDo(this.startNodeAtNode(id), true);\n }\n }\n\n if (\n canBeArrow &&\n this.match(tt.arrow) &&\n !this.canInsertSemicolon()\n ) {\n this.next();\n return this.parseArrowExpression(\n this.startNodeAtNode(id),\n [id],\n false,\n );\n }\n\n return id;\n } else {\n throw this.unexpected();\n }\n }\n }\n\n // This helper method should only be called\n // when the parser has reached a potential Hack pipe topic token\n // that is followed by an equals sign.\n // See <https://github.com/js-choi/proposal-hack-pipes>.\n // If we find ^= or %= in an expression position\n // (i.e., the tt.moduloAssign or tt.xorAssign token types), and if the\n // Hack-pipes proposal is active with ^ or % as its topicToken, then the ^ or\n // % could be the topic token (e.g., in x |> ^==y or x |> ^===y), and so we\n // reparse the current token as ^ or %.\n // Otherwise, this throws an unexpected-token error.\n parseTopicReferenceThenEqualsSign(\n topicTokenType: TokenType,\n topicTokenValue: string,\n ): N.Expression {\n const pipeProposal = this.getPluginOption(\"pipelineOperator\", \"proposal\");\n\n if (pipeProposal) {\n // Set the most-recent token to be a topic token\n // given by the tokenType and tokenValue.\n // Now the next readToken() call (in parseTopicReference)\n // will consume that “topic token”.\n this.state.type = topicTokenType;\n this.state.value = topicTokenValue;\n // Rewind the tokenizer to the end of the “topic token”, so that the\n // following token starts at the equals sign after that topic token.\n this.state.pos--;\n this.state.end--;\n // This is safe to do since the preceding character was either ^ or %, and\n // thus not a newline.\n this.state.endLoc = createPositionWithColumnOffset(this.state.endLoc, -1);\n // Now actually consume the topic token.\n return this.parseTopicReference(pipeProposal);\n } else {\n throw this.unexpected();\n }\n }\n\n // This helper method should only be called\n // when the proposal-pipeline-operator plugin is active,\n // and when the parser has reached a potential Hack pipe topic token.\n // Although a pipe-operator proposal is assumed to be active,\n // its configuration might not match the current token’s type.\n // See <https://github.com/js-choi/proposal-hack-pipes>.\n parseTopicReference(pipeProposal: string): N.Expression {\n const node = this.startNode();\n const startLoc = this.state.startLoc;\n const tokenType = this.state.type;\n\n // Consume the current token.\n this.next();\n\n // If the pipe-operator plugin’s configuration matches the current token’s type,\n // then this will return `node`, will have been finished as a topic reference.\n // Otherwise, this will throw a `PipeTopicUnconfiguredToken` error.\n return this.finishTopicReference(node, startLoc, pipeProposal, tokenType);\n }\n\n // This helper method attempts to finish the given `node`\n // into a topic-reference node for the given `pipeProposal`.\n // See <https://github.com/js-choi/proposal-hack-pipes>.\n //\n // The method assumes that any topic token was consumed before it was called.\n //\n // If the `pipelineOperator` plugin is active,\n // and if the given `tokenType` matches the plugin’s configuration,\n // then this method will return the finished `node`.\n //\n // If the `pipelineOperator` plugin is active,\n // but if the given `tokenType` does not match the plugin’s configuration,\n // then this method will throw a `PipeTopicUnconfiguredToken` error.\n finishTopicReference(\n node: N.Node,\n startLoc: Position,\n pipeProposal: string,\n tokenType: TokenType,\n ): N.Expression {\n if (\n this.testTopicReferenceConfiguration(pipeProposal, startLoc, tokenType)\n ) {\n // The token matches the plugin’s configuration.\n // The token is therefore a topic reference.\n\n // Determine the node type for the topic reference\n // that is appropriate for the active pipe-operator proposal.\n const nodeType =\n pipeProposal === \"smart\"\n ? \"PipelinePrimaryTopicReference\"\n : // The proposal must otherwise be \"hack\",\n // as enforced by testTopicReferenceConfiguration.\n \"TopicReference\";\n\n if (!this.topicReferenceIsAllowedInCurrentContext()) {\n this.raise(\n // The topic reference is not allowed in the current context:\n // it is outside of a pipe body.\n // Raise recoverable errors.\n pipeProposal === \"smart\"\n ? Errors.PrimaryTopicNotAllowed\n : // In this case, `pipeProposal === \"hack\"` is true.\n Errors.PipeTopicUnbound,\n { at: startLoc },\n );\n }\n\n // Register the topic reference so that its pipe body knows\n // that its topic was used at least once.\n this.registerTopicReference();\n\n return this.finishNode(node, nodeType);\n } else {\n // The token does not match the plugin’s configuration.\n throw this.raise(\n Errors.PipeTopicUnconfiguredToken,\n { at: startLoc },\n tokenLabelName(tokenType),\n );\n }\n }\n\n // This helper method tests whether the given token type\n // matches the pipelineOperator parser plugin’s configuration.\n // If the active pipe proposal is Hack style,\n // and if the given token is the same as the plugin configuration’s `topicToken`,\n // then this is a valid topic reference.\n // If the active pipe proposal is smart mix,\n // then the topic token must always be `#`.\n // If the active pipe proposal is neither (e.g., \"minimal\" or \"fsharp\"),\n // then an error is thrown.\n testTopicReferenceConfiguration(\n pipeProposal: string,\n startLoc: Position,\n tokenType: TokenType,\n ): boolean {\n switch (pipeProposal) {\n case \"hack\": {\n return this.hasPlugin([\n \"pipelineOperator\",\n {\n topicToken: tokenLabelName(tokenType),\n },\n ]);\n }\n case \"smart\":\n return tokenType === tt.hash;\n default:\n throw this.raise(Errors.PipeTopicRequiresHackPipes, { at: startLoc });\n }\n }\n\n // async [no LineTerminator here] AsyncArrowBindingIdentifier[?Yield] [no LineTerminator here] => AsyncConciseBody[?In]\n parseAsyncArrowUnaryFunction(node: N.Node): N.ArrowFunctionExpression {\n // We don't need to push a new ParameterDeclarationScope here since we are sure\n // 1) it is an async arrow, 2) no biding pattern is allowed in params\n this.prodParam.enter(functionFlags(true, this.prodParam.hasYield));\n const params = [this.parseIdentifier()];\n this.prodParam.exit();\n if (this.hasPrecedingLineBreak()) {\n this.raise(Errors.LineTerminatorBeforeArrow, {\n at: this.state.curPosition(),\n });\n }\n this.expect(tt.arrow);\n // let foo = async bar => {};\n this.parseArrowExpression(node, params, true);\n return node;\n }\n\n // https://github.com/tc39/proposal-do-expressions\n // https://github.com/tc39/proposal-async-do-expressions\n parseDo(node: N.Node, isAsync: boolean): N.DoExpression {\n this.expectPlugin(\"doExpressions\");\n if (isAsync) {\n this.expectPlugin(\"asyncDoExpressions\");\n }\n node.async = isAsync;\n this.next(); // eat `do`\n const oldLabels = this.state.labels;\n this.state.labels = [];\n if (isAsync) {\n // AsyncDoExpression :\n // async [no LineTerminator here] do Block[~Yield, +Await, ~Return]\n this.prodParam.enter(PARAM_AWAIT);\n node.body = this.parseBlock();\n this.prodParam.exit();\n } else {\n node.body = this.parseBlock();\n }\n\n this.state.labels = oldLabels;\n return this.finishNode(node, \"DoExpression\");\n }\n\n // Parse the `super` keyword\n parseSuper(): N.Super {\n const node = this.startNode();\n this.next(); // eat `super`\n if (\n this.match(tt.parenL) &&\n !this.scope.allowDirectSuper &&\n !this.options.allowSuperOutsideMethod\n ) {\n this.raise(Errors.SuperNotAllowed, { node });\n } else if (\n !this.scope.allowSuper &&\n !this.options.allowSuperOutsideMethod\n ) {\n this.raise(Errors.UnexpectedSuper, { node });\n }\n\n if (\n !this.match(tt.parenL) &&\n !this.match(tt.bracketL) &&\n !this.match(tt.dot)\n ) {\n this.raise(Errors.UnsupportedSuper, { node });\n }\n\n return this.finishNode(node, \"Super\");\n }\n\n parsePrivateName(): N.PrivateName {\n const node = this.startNode();\n const id = this.startNodeAt(\n this.state.start + 1,\n // The position is hardcoded because we merge `#` and name into a single\n // tt.privateName token\n new Position(\n this.state.curLine,\n this.state.start + 1 - this.state.lineStart,\n this.state.start + 1,\n ),\n );\n const name = this.state.value;\n this.next(); // eat #name;\n node.id = this.createIdentifier(id, name);\n return this.finishNode(node, \"PrivateName\");\n }\n\n parseFunctionOrFunctionSent(): N.FunctionExpression | N.MetaProperty {\n const node = this.startNode();\n\n // We do not do parseIdentifier here because when parseFunctionOrFunctionSent\n // is called we already know that the current token is a \"name\" with the value \"function\"\n // This will improve perf a tiny little bit as we do not do validation but more importantly\n // here is that parseIdentifier will remove an item from the expression stack\n // if \"function\" or \"class\" is parsed as identifier (in objects e.g.), which should not happen here.\n this.next(); // eat `function`\n\n if (this.prodParam.hasYield && this.match(tt.dot)) {\n const meta = this.createIdentifier(\n this.startNodeAtNode(node),\n \"function\",\n );\n this.next(); // eat `.`\n // https://github.com/tc39/proposal-function.sent#syntax-1\n if (this.match(tt._sent)) {\n this.expectPlugin(\"functionSent\");\n } else if (!this.hasPlugin(\"functionSent\")) {\n // The code wasn't `function.sent` but just `function.`, so a simple error is less confusing.\n this.unexpected();\n }\n return this.parseMetaProperty(node, meta, \"sent\");\n }\n return this.parseFunction(node);\n }\n\n parseMetaProperty(\n node: N.MetaProperty,\n meta: N.Identifier,\n propertyName: string,\n ): N.MetaProperty {\n node.meta = meta;\n\n const containsEsc = this.state.containsEsc;\n\n node.property = this.parseIdentifier(true);\n\n if (node.property.name !== propertyName || containsEsc) {\n this.raise(\n Errors.UnsupportedMetaProperty,\n { node: node.property },\n meta.name,\n propertyName,\n );\n }\n\n return this.finishNode(node, \"MetaProperty\");\n }\n\n // https://tc39.es/ecma262/#prod-ImportMeta\n parseImportMetaProperty(node: N.MetaProperty): N.MetaProperty {\n const id = this.createIdentifier(this.startNodeAtNode(node), \"import\");\n this.next(); // eat `.`\n\n if (this.isContextual(tt._meta)) {\n if (!this.inModule) {\n this.raise(SourceTypeModuleErrors.ImportMetaOutsideModule, {\n node: id,\n });\n }\n this.sawUnambiguousESM = true;\n }\n\n return this.parseMetaProperty(node, id, \"meta\");\n }\n\n parseLiteralAtNode<T: N.Node>(\n value: any,\n type: $ElementType<T, \"type\">,\n node: any,\n ): T {\n this.addExtra(node, \"rawValue\", value);\n this.addExtra(node, \"raw\", this.input.slice(node.start, this.state.end));\n node.value = value;\n this.next();\n return this.finishNode<T>(node, type);\n }\n\n parseLiteral<T: N.Node>(value: any, type: $ElementType<T, \"type\">): T {\n const node = this.startNode();\n return this.parseLiteralAtNode(value, type, node);\n }\n\n parseStringLiteral(value: any) {\n return this.parseLiteral<N.StringLiteral>(value, \"StringLiteral\");\n }\n\n parseNumericLiteral(value: any) {\n return this.parseLiteral<N.NumericLiteral>(value, \"NumericLiteral\");\n }\n\n parseBigIntLiteral(value: any) {\n return this.parseLiteral<N.BigIntLiteral>(value, \"BigIntLiteral\");\n }\n\n parseDecimalLiteral(value: any) {\n return this.parseLiteral<N.DecimalLiteral>(value, \"DecimalLiteral\");\n }\n\n parseRegExpLiteral(value: { value: any, pattern: string, flags: string }) {\n const node = this.parseLiteral<N.RegExpLiteral>(\n value.value,\n \"RegExpLiteral\",\n );\n node.pattern = value.pattern;\n node.flags = value.flags;\n return node;\n }\n\n parseBooleanLiteral(value: boolean) {\n const node = this.startNode();\n node.value = value;\n this.next();\n return this.finishNode<N.BooleanLiteral>(node, \"BooleanLiteral\");\n }\n\n parseNullLiteral() {\n const node = this.startNode();\n this.next();\n return this.finishNode<N.NullLiteral>(node, \"NullLiteral\");\n }\n\n // https://tc39.es/ecma262/#prod-CoverParenthesizedExpressionAndArrowParameterList\n parseParenAndDistinguishExpression(canBeArrow: boolean): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n let val;\n this.next(); // eat `(`\n this.expressionScope.enter(newArrowHeadScope());\n\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n this.state.maybeInArrowParameters = true;\n this.state.inFSharpPipelineDirectBody = false;\n\n const innerStartPos = this.state.start;\n const innerStartLoc = this.state.startLoc;\n const exprList = [];\n const refExpressionErrors = new ExpressionErrors();\n let first = true;\n let spreadStartLoc;\n let optionalCommaStartLoc;\n\n while (!this.match(tt.parenR)) {\n if (first) {\n first = false;\n } else {\n this.expect(\n tt.comma,\n refExpressionErrors.optionalParametersLoc === null\n ? null\n : refExpressionErrors.optionalParametersLoc,\n );\n if (this.match(tt.parenR)) {\n optionalCommaStartLoc = this.state.startLoc;\n break;\n }\n }\n\n if (this.match(tt.ellipsis)) {\n const spreadNodeStartPos = this.state.start;\n const spreadNodeStartLoc = this.state.startLoc;\n spreadStartLoc = this.state.startLoc;\n exprList.push(\n this.parseParenItem(\n this.parseRestBinding(),\n spreadNodeStartPos,\n spreadNodeStartLoc,\n ),\n );\n\n if (!this.checkCommaAfterRest(charCodes.rightParenthesis)) {\n break;\n }\n } else {\n exprList.push(\n this.parseMaybeAssignAllowIn(\n refExpressionErrors,\n this.parseParenItem,\n ),\n );\n }\n }\n\n const innerEndLoc = this.state.lastTokEndLoc;\n this.expect(tt.parenR);\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n\n let arrowNode = this.startNodeAt(startPos, startLoc);\n if (\n canBeArrow &&\n this.shouldParseArrow(exprList) &&\n (arrowNode = this.parseArrow(arrowNode))\n ) {\n this.checkDestructuringPrivate(refExpressionErrors);\n this.expressionScope.validateAsPattern();\n this.expressionScope.exit();\n this.parseArrowExpression(arrowNode, exprList, false);\n return arrowNode;\n }\n this.expressionScope.exit();\n\n if (!exprList.length) {\n this.unexpected(this.state.lastTokStartLoc);\n }\n if (optionalCommaStartLoc) this.unexpected(optionalCommaStartLoc);\n if (spreadStartLoc) this.unexpected(spreadStartLoc);\n this.checkExpressionErrors(refExpressionErrors, true);\n\n this.toReferencedListDeep(exprList, /* isParenthesizedExpr */ true);\n if (exprList.length > 1) {\n val = this.startNodeAt(innerStartPos, innerStartLoc);\n val.expressions = exprList;\n // finish node at current location so it can pick up comments after `)`\n this.finishNode(val, \"SequenceExpression\");\n this.resetEndLocation(val, innerEndLoc);\n } else {\n val = exprList[0];\n }\n\n if (!this.options.createParenthesizedExpressions) {\n this.addExtra(val, \"parenthesized\", true);\n this.addExtra(val, \"parenStart\", startPos);\n\n this.takeSurroundingComments(\n val,\n startPos,\n this.state.lastTokEndLoc.index,\n );\n\n return val;\n }\n\n const parenExpression = this.startNodeAt(startPos, startLoc);\n parenExpression.expression = val;\n this.finishNode(parenExpression, \"ParenthesizedExpression\");\n return parenExpression;\n }\n\n // eslint-disable-next-line no-unused-vars -- `params` is used in typescript plugin\n shouldParseArrow(params: Array<N.Node>): boolean {\n return !this.canInsertSemicolon();\n }\n\n parseArrow(node: N.ArrowFunctionExpression): ?N.ArrowFunctionExpression {\n if (this.eat(tt.arrow)) {\n return node;\n }\n }\n\n parseParenItem(\n node: N.Expression,\n startPos: number, // eslint-disable-line no-unused-vars\n startLoc: Position, // eslint-disable-line no-unused-vars\n ): N.Expression {\n return node;\n }\n\n parseNewOrNewTarget(): N.NewExpression | N.MetaProperty {\n const node = this.startNode();\n this.next();\n if (this.match(tt.dot)) {\n // https://tc39.es/ecma262/#prod-NewTarget\n const meta = this.createIdentifier(this.startNodeAtNode(node), \"new\");\n this.next();\n const metaProp = this.parseMetaProperty(node, meta, \"target\");\n\n if (!this.scope.inNonArrowFunction && !this.scope.inClass) {\n this.raise(Errors.UnexpectedNewTarget, { node: metaProp });\n }\n\n return metaProp;\n }\n\n return this.parseNew(node);\n }\n\n // New's precedence is slightly tricky. It must allow its argument to\n // be a `[]` or dot subscript expression, but not a call — at least,\n // not without wrapping it in parentheses. Thus, it uses the noCalls\n // argument to parseSubscripts to prevent it from consuming the\n // argument list.\n // https://tc39.es/ecma262/#prod-NewExpression\n parseNew(node: N.Expression): N.NewExpression {\n node.callee = this.parseNoCallExpr();\n if (node.callee.type === \"Import\") {\n this.raise(Errors.ImportCallNotNewExpression, { node: node.callee });\n } else if (this.isOptionalChain(node.callee)) {\n this.raise(Errors.OptionalChainingNoNew, {\n at: this.state.lastTokEndLoc,\n });\n } else if (this.eat(tt.questionDot)) {\n this.raise(Errors.OptionalChainingNoNew, {\n at: this.state.startLoc,\n });\n }\n\n this.parseNewArguments(node);\n return this.finishNode(node, \"NewExpression\");\n }\n\n parseNewArguments(node: N.NewExpression): void {\n if (this.eat(tt.parenL)) {\n const args = this.parseExprList(tt.parenR);\n this.toReferencedList(args);\n // $FlowFixMe (parseExprList should be all non-null in this case)\n node.arguments = args;\n } else {\n node.arguments = [];\n }\n }\n\n // Parse template expression.\n\n parseTemplateElement(isTagged: boolean): N.TemplateElement {\n const { start, startLoc, end, value } = this.state;\n const elemStart = start + 1;\n const elem = this.startNodeAt(\n elemStart,\n createPositionWithColumnOffset(startLoc, 1),\n );\n if (value === null) {\n if (!isTagged) {\n this.raise(Errors.InvalidEscapeSequenceTemplate, {\n // FIXME: explain\n at: createPositionWithColumnOffset(startLoc, 2),\n });\n }\n }\n\n const isTail = this.match(tt.templateTail);\n const endOffset = isTail ? -1 : -2;\n const elemEnd = end + endOffset;\n elem.value = {\n raw: this.input.slice(elemStart, elemEnd).replace(/\\r\\n?/g, \"\\n\"),\n cooked: value === null ? null : value.slice(1, endOffset),\n };\n elem.tail = isTail;\n this.next();\n this.finishNode(elem, \"TemplateElement\");\n this.resetEndLocation(\n elem,\n createPositionWithColumnOffset(this.state.lastTokEndLoc, endOffset),\n );\n return elem;\n }\n\n // https://tc39.es/ecma262/#prod-TemplateLiteral\n parseTemplate(isTagged: boolean): N.TemplateLiteral {\n const node = this.startNode();\n node.expressions = [];\n let curElt = this.parseTemplateElement(isTagged);\n node.quasis = [curElt];\n while (!curElt.tail) {\n node.expressions.push(this.parseTemplateSubstitution());\n this.readTemplateContinuation();\n node.quasis.push((curElt = this.parseTemplateElement(isTagged)));\n }\n return this.finishNode(node, \"TemplateLiteral\");\n }\n\n // This is overwritten by the TypeScript plugin to parse template types\n parseTemplateSubstitution(): N.Expression {\n return this.parseExpression();\n }\n\n // Parse an object literal, binding pattern, or record.\n\n parseObjectLike<T: N.ObjectPattern | N.ObjectExpression>(\n close: TokenType,\n isPattern: boolean,\n isRecord?: ?boolean,\n refExpressionErrors?: ?ExpressionErrors,\n ): T {\n if (isRecord) {\n this.expectPlugin(\"recordAndTuple\");\n }\n const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n this.state.inFSharpPipelineDirectBody = false;\n const propHash: any = Object.create(null);\n let first = true;\n const node = this.startNode();\n\n node.properties = [];\n this.next();\n\n while (!this.match(close)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma);\n if (this.match(close)) {\n this.addTrailingCommaExtraToNode(node);\n break;\n }\n }\n\n let prop;\n if (isPattern) {\n prop = this.parseBindingProperty();\n } else {\n prop = this.parsePropertyDefinition(refExpressionErrors);\n this.checkProto(prop, isRecord, propHash, refExpressionErrors);\n }\n\n if (\n isRecord &&\n !this.isObjectProperty(prop) &&\n prop.type !== \"SpreadElement\"\n ) {\n this.raise(Errors.InvalidRecordProperty, { node: prop });\n }\n\n // $FlowIgnore\n if (prop.shorthand) {\n this.addExtra(prop, \"shorthand\", true);\n }\n\n node.properties.push(prop);\n }\n\n this.next();\n\n this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n let type = \"ObjectExpression\";\n if (isPattern) {\n type = \"ObjectPattern\";\n } else if (isRecord) {\n type = \"RecordExpression\";\n }\n return this.finishNode(node, type);\n }\n\n addTrailingCommaExtraToNode(node: N.Node): void {\n this.addExtra(node, \"trailingComma\", this.state.lastTokStart);\n this.addExtra(node, \"trailingCommaLoc\", this.state.lastTokStartLoc, false);\n }\n\n // Check grammar production:\n // IdentifierName *_opt PropertyName\n // It is used in `parsePropertyDefinition` to detect AsyncMethod and Accessors\n maybeAsyncOrAccessorProp(prop: N.ObjectProperty): boolean {\n return (\n !prop.computed &&\n prop.key.type === \"Identifier\" &&\n (this.isLiteralPropertyName() ||\n this.match(tt.bracketL) ||\n this.match(tt.star))\n );\n }\n\n // https://tc39.es/ecma262/#prod-PropertyDefinition\n parsePropertyDefinition(\n refExpressionErrors?: ?ExpressionErrors,\n ): N.ObjectMember | N.SpreadElement {\n let decorators = [];\n if (this.match(tt.at)) {\n if (this.hasPlugin(\"decorators\")) {\n this.raise(Errors.UnsupportedPropertyDecorator, {\n at: this.state.startLoc,\n });\n }\n\n // we needn't check if decorators (stage 0) plugin is enabled since it's checked by\n // the call to this.parseDecorator\n while (this.match(tt.at)) {\n decorators.push(this.parseDecorator());\n }\n }\n\n const prop = this.startNode();\n let isAsync = false;\n let isAccessor = false;\n let startPos;\n let startLoc;\n\n if (this.match(tt.ellipsis)) {\n if (decorators.length) this.unexpected();\n return this.parseSpread();\n }\n\n if (decorators.length) {\n prop.decorators = decorators;\n decorators = [];\n }\n\n prop.method = false;\n\n if (refExpressionErrors) {\n startPos = this.state.start;\n startLoc = this.state.startLoc;\n }\n\n let isGenerator = this.eat(tt.star);\n this.parsePropertyNamePrefixOperator(prop);\n const containsEsc = this.state.containsEsc;\n const key = this.parsePropertyName(prop, refExpressionErrors);\n\n if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) {\n const keyName = key.name;\n // https://tc39.es/ecma262/#prod-AsyncMethod\n // https://tc39.es/ecma262/#prod-AsyncGeneratorMethod\n if (keyName === \"async\" && !this.hasPrecedingLineBreak()) {\n isAsync = true;\n this.resetPreviousNodeTrailingComments(key);\n isGenerator = this.eat(tt.star);\n this.parsePropertyName(prop);\n }\n // get PropertyName[?Yield, ?Await] () { FunctionBody[~Yield, ~Await] }\n // set PropertyName[?Yield, ?Await] ( PropertySetParameterList ) { FunctionBody[~Yield, ~Await] }\n if (keyName === \"get\" || keyName === \"set\") {\n isAccessor = true;\n this.resetPreviousNodeTrailingComments(key);\n prop.kind = keyName;\n if (this.match(tt.star)) {\n isGenerator = true;\n this.raise(\n Errors.AccessorIsGenerator,\n { at: this.state.curPosition() },\n keyName,\n );\n this.next();\n }\n this.parsePropertyName(prop);\n }\n }\n\n this.parseObjPropValue(\n prop,\n startPos,\n startLoc,\n isGenerator,\n isAsync,\n false /* isPattern */,\n isAccessor,\n refExpressionErrors,\n );\n\n return prop;\n }\n\n getGetterSetterExpectedParamCount(\n method: N.ObjectMethod | N.ClassMethod,\n ): number {\n return method.kind === \"get\" ? 0 : 1;\n }\n\n // This exists so we can override within the ESTree plugin\n getObjectOrClassMethodParams(method: N.ObjectMethod | N.ClassMethod) {\n return method.params;\n }\n\n // get methods aren't allowed to have any parameters\n // set methods must have exactly 1 parameter which is not a rest parameter\n checkGetterSetterParams(method: N.ObjectMethod | N.ClassMethod): void {\n const paramCount = this.getGetterSetterExpectedParamCount(method);\n const params = this.getObjectOrClassMethodParams(method);\n\n if (params.length !== paramCount) {\n this.raise(\n method.kind === \"get\" ? Errors.BadGetterArity : Errors.BadSetterArity,\n { node: method },\n );\n }\n\n if (\n method.kind === \"set\" &&\n params[params.length - 1]?.type === \"RestElement\"\n ) {\n this.raise(Errors.BadSetterRestParameter, { node: method });\n }\n }\n\n // https://tc39.es/ecma262/#prod-MethodDefinition\n parseObjectMethod(\n prop: N.ObjectMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n ): ?N.ObjectMethod {\n if (isAccessor) {\n // isAccessor implies isAsync: false, isPattern: false, isGenerator: false\n this.parseMethod(\n prop,\n // This _should_ be false, but with error recovery, we allow it to be\n // set for informational purposes\n isGenerator,\n /* isAsync */ false,\n /* isConstructor */ false,\n false,\n \"ObjectMethod\",\n );\n this.checkGetterSetterParams(prop);\n return prop;\n }\n\n if (isAsync || isGenerator || this.match(tt.parenL)) {\n if (isPattern) this.unexpected();\n prop.kind = \"method\";\n prop.method = true;\n return this.parseMethod(\n prop,\n isGenerator,\n isAsync,\n /* isConstructor */ false,\n false,\n \"ObjectMethod\",\n );\n }\n }\n\n // if `isPattern` is true, parse https://tc39.es/ecma262/#prod-BindingProperty\n // else https://tc39.es/ecma262/#prod-PropertyDefinition\n parseObjectProperty(\n prop: N.ObjectProperty,\n startPos: ?number,\n startLoc: ?Position,\n isPattern: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): ?N.ObjectProperty {\n prop.shorthand = false;\n\n if (this.eat(tt.colon)) {\n prop.value = isPattern\n ? this.parseMaybeDefault(this.state.start, this.state.startLoc)\n : this.parseMaybeAssignAllowIn(refExpressionErrors);\n\n return this.finishNode(prop, \"ObjectProperty\");\n }\n\n if (!prop.computed && prop.key.type === \"Identifier\") {\n // PropertyDefinition:\n // IdentifierReference\n // CoverInitializedName\n // Note: `{ eval } = {}` will be checked in `checkLVal` later.\n this.checkReservedWord(prop.key.name, prop.key.loc.start, true, false);\n\n if (isPattern) {\n prop.value = this.parseMaybeDefault(\n startPos,\n startLoc,\n cloneIdentifier(prop.key),\n );\n } else if (this.match(tt.eq)) {\n const shorthandAssignLoc = this.state.startLoc;\n if (refExpressionErrors != null) {\n if (refExpressionErrors.shorthandAssignLoc === null) {\n refExpressionErrors.shorthandAssignLoc = shorthandAssignLoc;\n }\n } else {\n this.raise(Errors.InvalidCoverInitializedName, {\n at: shorthandAssignLoc,\n });\n }\n prop.value = this.parseMaybeDefault(\n startPos,\n startLoc,\n cloneIdentifier(prop.key),\n );\n } else {\n prop.value = cloneIdentifier(prop.key);\n }\n prop.shorthand = true;\n\n return this.finishNode(prop, \"ObjectProperty\");\n }\n }\n\n parseObjPropValue(\n prop: any,\n startPos: ?number,\n startLoc: ?Position,\n isGenerator: boolean,\n isAsync: boolean,\n isPattern: boolean,\n isAccessor: boolean,\n refExpressionErrors?: ?ExpressionErrors,\n ): void {\n const node =\n this.parseObjectMethod(\n prop,\n isGenerator,\n isAsync,\n isPattern,\n isAccessor,\n ) ||\n this.parseObjectProperty(\n prop,\n startPos,\n startLoc,\n isPattern,\n refExpressionErrors,\n );\n\n if (!node) this.unexpected();\n\n // $FlowFixMe\n return node;\n }\n\n // https://tc39.es/ecma262/#prod-PropertyName\n // when refExpressionErrors presents, it will parse private name\n // and record the position of the first private name\n parsePropertyName(\n prop: N.ObjectOrClassMember | N.ClassMember | N.TsNamedTypeElementBase,\n refExpressionErrors?: ?ExpressionErrors,\n ): N.Expression | N.Identifier {\n if (this.eat(tt.bracketL)) {\n (prop: $FlowSubtype<N.ObjectOrClassMember>).computed = true;\n prop.key = this.parseMaybeAssignAllowIn();\n this.expect(tt.bracketR);\n } else {\n // We check if it's valid for it to be a private name when we push it.\n const { type, value } = this.state;\n let key;\n // most un-computed property names are identifiers\n if (tokenIsKeywordOrIdentifier(type)) {\n key = this.parseIdentifier(true);\n } else {\n switch (type) {\n case tt.num:\n key = this.parseNumericLiteral(value);\n break;\n case tt.string:\n key = this.parseStringLiteral(value);\n break;\n case tt.bigint:\n key = this.parseBigIntLiteral(value);\n break;\n case tt.decimal:\n key = this.parseDecimalLiteral(value);\n break;\n case tt.privateName: {\n // the class private key has been handled in parseClassElementName\n const privateKeyLoc = this.state.startLoc;\n if (refExpressionErrors != null) {\n if (refExpressionErrors.privateKeyLoc === null) {\n refExpressionErrors.privateKeyLoc = privateKeyLoc;\n }\n } else {\n this.raise(Errors.UnexpectedPrivateField, {\n at: privateKeyLoc,\n });\n }\n key = this.parsePrivateName();\n break;\n }\n default:\n throw this.unexpected();\n }\n }\n (prop: $FlowFixMe).key = key;\n if (type !== tt.privateName) {\n // ClassPrivateProperty is never computed, so we don't assign in that case.\n prop.computed = false;\n }\n }\n\n return prop.key;\n }\n\n // Initialize empty function node.\n\n initFunction(node: N.BodilessFunctionOrMethodBase, isAsync: ?boolean): void {\n node.id = null;\n node.generator = false;\n node.async = !!isAsync;\n }\n\n // Parse object or class method.\n\n parseMethod<T: N.MethodLike>(\n node: T,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowDirectSuper: boolean,\n type: string,\n inClassScope: boolean = false,\n ): T {\n this.initFunction(node, isAsync);\n node.generator = !!isGenerator;\n const allowModifiers = isConstructor; // For TypeScript parameter properties\n this.scope.enter(\n SCOPE_FUNCTION |\n SCOPE_SUPER |\n (inClassScope ? SCOPE_CLASS : 0) |\n (allowDirectSuper ? SCOPE_DIRECT_SUPER : 0),\n );\n this.prodParam.enter(functionFlags(isAsync, node.generator));\n this.parseFunctionParams((node: any), allowModifiers);\n this.parseFunctionBodyAndFinish(node, type, true);\n this.prodParam.exit();\n this.scope.exit();\n\n return node;\n }\n\n // parse an array literal or tuple literal\n // https://tc39.es/ecma262/#prod-ArrayLiteral\n // https://tc39.es/proposal-record-tuple/#prod-TupleLiteral\n parseArrayLike(\n close: TokenType,\n canBePattern: boolean,\n isTuple: boolean,\n refExpressionErrors: ?ExpressionErrors,\n ): N.ArrayExpression | N.TupleExpression {\n if (isTuple) {\n this.expectPlugin(\"recordAndTuple\");\n }\n const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n this.state.inFSharpPipelineDirectBody = false;\n const node = this.startNode();\n this.next();\n node.elements = this.parseExprList(\n close,\n /* allowEmpty */ !isTuple,\n refExpressionErrors,\n node,\n );\n this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n return this.finishNode(\n node,\n isTuple ? \"TupleExpression\" : \"ArrayExpression\",\n );\n }\n\n // Parse arrow function expression.\n // If the parameters are provided, they will be converted to an\n // assignable list.\n parseArrowExpression(\n node: N.ArrowFunctionExpression,\n params: ?(N.Expression[]),\n isAsync: boolean,\n trailingCommaLoc: ?Position,\n ): N.ArrowFunctionExpression {\n this.scope.enter(SCOPE_FUNCTION | SCOPE_ARROW);\n let flags = functionFlags(isAsync, false);\n // ConciseBody[In] :\n // [lookahead ≠ {] ExpressionBody[?In, ~Await]\n // { FunctionBody[~Yield, ~Await] }\n if (!this.match(tt.braceL) && this.prodParam.hasIn) {\n flags |= PARAM_IN;\n }\n this.prodParam.enter(flags);\n this.initFunction(node, isAsync);\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n\n if (params) {\n this.state.maybeInArrowParameters = true;\n this.setArrowFunctionParameters(node, params, trailingCommaLoc);\n }\n this.state.maybeInArrowParameters = false;\n this.parseFunctionBody(node, true);\n\n this.prodParam.exit();\n this.scope.exit();\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n\n return this.finishNode(node, \"ArrowFunctionExpression\");\n }\n\n setArrowFunctionParameters(\n node: N.ArrowFunctionExpression,\n params: N.Expression[],\n trailingCommaLoc: ?Position,\n ): void {\n node.params = this.toAssignableList(params, trailingCommaLoc, false);\n }\n\n parseFunctionBodyAndFinish(\n node: N.BodilessFunctionOrMethodBase,\n type: string,\n isMethod?: boolean = false,\n ): void {\n // $FlowIgnore (node is not bodiless if we get here)\n this.parseFunctionBody(node, false, isMethod);\n this.finishNode(node, type);\n }\n\n // Parse function body and check parameters.\n parseFunctionBody(\n node: N.Function,\n allowExpression: ?boolean,\n isMethod?: boolean = false,\n ): void {\n const isExpression = allowExpression && !this.match(tt.braceL);\n this.expressionScope.enter(newExpressionScope());\n\n if (isExpression) {\n // https://tc39.es/ecma262/#prod-ExpressionBody\n node.body = this.parseMaybeAssign();\n this.checkParams(node, false, allowExpression, false);\n } else {\n const oldStrict = this.state.strict;\n // Start a new scope with regard to labels\n // flag (restore them to their old value afterwards).\n const oldLabels = this.state.labels;\n this.state.labels = [];\n\n // FunctionBody[Yield, Await]:\n // StatementList[?Yield, ?Await, +Return] opt\n this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN);\n node.body = this.parseBlock(\n true,\n false,\n // Strict mode function checks after we parse the statements in the function body.\n (hasStrictModeDirective: boolean) => {\n const nonSimple = !this.isSimpleParamList(node.params);\n\n if (hasStrictModeDirective && nonSimple) {\n // This logic is here to align the error location with the ESTree plugin.\n const errorOrigin =\n // $FlowIgnore\n (node.kind === \"method\" || node.kind === \"constructor\") &&\n // $FlowIgnore\n !!node.key\n ? { at: node.key.loc.end }\n : { node };\n\n this.raise(Errors.IllegalLanguageModeDirective, errorOrigin);\n }\n\n const strictModeChanged = !oldStrict && this.state.strict;\n\n // Add the params to varDeclaredNames to ensure that an error is thrown\n // if a let/const declaration in the function clashes with one of the params.\n this.checkParams(\n node,\n !this.state.strict && !allowExpression && !isMethod && !nonSimple,\n allowExpression,\n strictModeChanged,\n );\n\n // Ensure the function name isn't a forbidden identifier in strict mode, e.g. 'eval'\n if (this.state.strict && node.id) {\n this.checkLVal(\n node.id,\n \"function name\",\n BIND_OUTSIDE,\n undefined,\n undefined,\n strictModeChanged,\n );\n }\n },\n );\n this.prodParam.exit();\n this.state.labels = oldLabels;\n }\n this.expressionScope.exit();\n }\n\n isSimpleParamList(\n params: $ReadOnlyArray<N.Pattern | N.TSParameterProperty>,\n ): boolean {\n for (let i = 0, len = params.length; i < len; i++) {\n if (params[i].type !== \"Identifier\") return false;\n }\n return true;\n }\n\n checkParams(\n node: N.Function,\n allowDuplicates: boolean,\n // eslint-disable-next-line no-unused-vars\n isArrowFunction: ?boolean,\n strictModeChanged?: boolean = true,\n ): void {\n const checkClashes = new Set();\n for (const param of node.params) {\n this.checkLVal(\n param,\n \"function parameter list\",\n BIND_VAR,\n allowDuplicates ? null : checkClashes,\n undefined,\n strictModeChanged,\n );\n }\n }\n\n // Parses a comma-separated list of expressions, and returns them as\n // an array. `close` is the token type that ends the list, and\n // `allowEmpty` can be turned on to allow subsequent commas with\n // nothing in between them to be parsed as `null` (which is needed\n // for array literals).\n\n parseExprList(\n close: TokenType,\n allowEmpty?: boolean,\n refExpressionErrors?: ?ExpressionErrors,\n nodeForExtra?: ?N.Node,\n ): $ReadOnlyArray<?N.Expression> {\n const elts = [];\n let first = true;\n\n while (!this.eat(close)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma);\n if (this.match(close)) {\n if (nodeForExtra) {\n this.addTrailingCommaExtraToNode(nodeForExtra);\n }\n this.next();\n break;\n }\n }\n\n elts.push(this.parseExprListItem(allowEmpty, refExpressionErrors));\n }\n return elts;\n }\n\n parseExprListItem(\n allowEmpty: ?boolean,\n refExpressionErrors?: ?ExpressionErrors,\n allowPlaceholder: ?boolean,\n ): ?N.Expression {\n let elt;\n if (this.match(tt.comma)) {\n if (!allowEmpty) {\n this.raise(\n Errors.UnexpectedToken,\n { at: this.state.curPosition() },\n \",\",\n );\n }\n elt = null;\n } else if (this.match(tt.ellipsis)) {\n const spreadNodeStartPos = this.state.start;\n const spreadNodeStartLoc = this.state.startLoc;\n\n elt = this.parseParenItem(\n this.parseSpread(refExpressionErrors),\n spreadNodeStartPos,\n spreadNodeStartLoc,\n );\n } else if (this.match(tt.question)) {\n this.expectPlugin(\"partialApplication\");\n if (!allowPlaceholder) {\n this.raise(Errors.UnexpectedArgumentPlaceholder, {\n at: this.state.startLoc,\n });\n }\n const node = this.startNode();\n this.next();\n elt = this.finishNode(node, \"ArgumentPlaceholder\");\n } else {\n elt = this.parseMaybeAssignAllowIn(\n refExpressionErrors,\n this.parseParenItem,\n );\n }\n return elt;\n }\n\n // Parse the next token as an identifier. If `liberal` is true (used\n // when parsing properties), it will also convert keywords into\n // identifiers.\n // This shouldn't be used to parse the keywords of meta properties, since they\n // are not identifiers and cannot contain escape sequences.\n\n parseIdentifier(liberal?: boolean): N.Identifier {\n const node = this.startNode();\n const name = this.parseIdentifierName(node.start, liberal);\n\n return this.createIdentifier(node, name);\n }\n\n createIdentifier(node: N.Identifier, name: string): N.Identifier {\n node.name = name;\n node.loc.identifierName = name;\n\n return this.finishNode(node, \"Identifier\");\n }\n\n parseIdentifierName(pos: number, liberal?: boolean): string {\n let name: string;\n\n const { startLoc, type } = this.state;\n\n if (tokenIsKeywordOrIdentifier(type)) {\n name = this.state.value;\n } else {\n throw this.unexpected();\n }\n\n const tokenIsKeyword = tokenKeywordOrIdentifierIsKeyword(type);\n\n if (liberal) {\n // If the current token is not used as a keyword, set its type to \"tt.name\".\n // This will prevent this.next() from throwing about unexpected escapes.\n if (tokenIsKeyword) {\n this.replaceToken(tt.name);\n }\n } else {\n this.checkReservedWord(name, startLoc, tokenIsKeyword, false);\n }\n\n this.next();\n\n return name;\n }\n\n checkReservedWord(\n word: string,\n startLoc: Position,\n checkKeywords: boolean,\n isBinding: boolean,\n ): void {\n // Every JavaScript reserved word is 10 characters or less.\n if (word.length > 10) {\n return;\n }\n // Most identifiers are not reservedWord-like, they don't need special\n // treatments afterward, which very likely ends up throwing errors\n if (!canBeReservedWord(word)) {\n return;\n }\n\n if (word === \"yield\") {\n if (this.prodParam.hasYield) {\n this.raise(Errors.YieldBindingIdentifier, { at: startLoc });\n return;\n }\n } else if (word === \"await\") {\n if (this.prodParam.hasAwait) {\n this.raise(Errors.AwaitBindingIdentifier, { at: startLoc });\n return;\n }\n\n if (this.scope.inStaticBlock) {\n this.raise(Errors.AwaitBindingIdentifierInStaticBlock, {\n at: startLoc,\n });\n return;\n }\n\n this.expressionScope.recordAsyncArrowParametersError(\n Errors.AwaitBindingIdentifier,\n startLoc,\n );\n } else if (word === \"arguments\") {\n if (this.scope.inClassAndNotInNonArrowFunction) {\n this.raise(Errors.ArgumentsInClass, { at: startLoc });\n return;\n }\n }\n\n if (checkKeywords && isKeyword(word)) {\n this.raise(Errors.UnexpectedKeyword, { at: startLoc }, word);\n return;\n }\n\n const reservedTest = !this.state.strict\n ? isReservedWord\n : isBinding\n ? isStrictBindReservedWord\n : isStrictReservedWord;\n\n if (reservedTest(word, this.inModule)) {\n this.raise(Errors.UnexpectedReservedWord, { at: startLoc }, word);\n }\n }\n\n isAwaitAllowed(): boolean {\n if (this.prodParam.hasAwait) return true;\n if (this.options.allowAwaitOutsideFunction && !this.scope.inFunction) {\n return true;\n }\n return false;\n }\n\n // Parses await expression inside async function.\n\n parseAwait(startPos: number, startLoc: Position): N.AwaitExpression {\n const node = this.startNodeAt(startPos, startLoc);\n\n this.expressionScope.recordParameterInitializerError(\n node.loc.start,\n Errors.AwaitExpressionFormalParameter,\n );\n\n if (this.eat(tt.star)) {\n this.raise(Errors.ObsoleteAwaitStar, { node });\n }\n\n if (!this.scope.inFunction && !this.options.allowAwaitOutsideFunction) {\n if (this.isAmbiguousAwait()) {\n this.ambiguousScriptDifferentAst = true;\n } else {\n this.sawUnambiguousESM = true;\n }\n }\n\n if (!this.state.soloAwait) {\n node.argument = this.parseMaybeUnary(null, true);\n }\n\n return this.finishNode(node, \"AwaitExpression\");\n }\n\n isAmbiguousAwait(): boolean {\n if (this.hasPrecedingLineBreak()) return true;\n const { type } = this.state;\n return (\n // All the following expressions are ambiguous:\n // await + 0, await - 0, await ( 0 ), await [ 0 ], await / 0 /u, await ``\n type === tt.plusMin ||\n type === tt.parenL ||\n type === tt.bracketL ||\n tokenIsTemplate(type) ||\n // Sometimes the tokenizer generates tt.slash for regexps, and this is\n // handler by parseExprAtom\n type === tt.regexp ||\n type === tt.slash ||\n // This code could be parsed both as a modulo operator or as an intrinsic:\n // await %x(0)\n (this.hasPlugin(\"v8intrinsic\") && type === tt.modulo)\n );\n }\n\n // Parses yield expression inside generator.\n\n parseYield(): N.YieldExpression {\n const node = this.startNode();\n\n this.expressionScope.recordParameterInitializerError(\n node.loc.start,\n Errors.YieldInParameter,\n );\n\n this.next();\n let delegating = false;\n let argument = null;\n if (!this.hasPrecedingLineBreak()) {\n delegating = this.eat(tt.star);\n switch (this.state.type) {\n case tt.semi:\n case tt.eof:\n case tt.braceR:\n case tt.parenR:\n case tt.bracketR:\n case tt.braceBarR:\n case tt.colon:\n case tt.comma:\n // The above is the complete set of tokens that can\n // follow an AssignmentExpression, and none of them\n // can start an AssignmentExpression\n if (!delegating) break;\n /* fallthrough */\n default:\n argument = this.parseMaybeAssign();\n }\n }\n node.delegate = delegating;\n node.argument = argument;\n return this.finishNode(node, \"YieldExpression\");\n }\n\n // Validates a pipeline (for any of the pipeline Babylon plugins) at the point\n // of the infix operator `|>`.\n\n checkPipelineAtInfixOperator(left: N.Expression, leftStartLoc: Position) {\n if (this.hasPlugin([\"pipelineOperator\", { proposal: \"smart\" }])) {\n if (left.type === \"SequenceExpression\") {\n // Ensure that the pipeline head is not a comma-delimited\n // sequence expression.\n this.raise(Errors.PipelineHeadSequenceExpression, {\n at: leftStartLoc,\n });\n }\n }\n }\n\n parseSmartPipelineBodyInStyle(\n childExpr: N.Expression,\n startPos: number,\n startLoc: Position,\n ): N.PipelineBody {\n const bodyNode = this.startNodeAt(startPos, startLoc);\n if (this.isSimpleReference(childExpr)) {\n bodyNode.callee = childExpr;\n return this.finishNode(bodyNode, \"PipelineBareFunction\");\n } else {\n this.checkSmartPipeTopicBodyEarlyErrors(startLoc);\n bodyNode.expression = childExpr;\n return this.finishNode(bodyNode, \"PipelineTopicExpression\");\n }\n }\n\n isSimpleReference(expression: N.Expression): boolean {\n switch (expression.type) {\n case \"MemberExpression\":\n return (\n !expression.computed && this.isSimpleReference(expression.object)\n );\n case \"Identifier\":\n return true;\n default:\n return false;\n }\n }\n\n // This helper method is to be called immediately\n // after a topic-style smart-mix pipe body is parsed.\n // The `startLoc` is the starting position of the pipe body.\n\n checkSmartPipeTopicBodyEarlyErrors(startLoc: Position): void {\n // If the following token is invalidly `=>`, then throw a human-friendly error\n // instead of something like 'Unexpected token, expected \";\"'.\n // For example, `x => x |> y => #` (assuming `#` is the topic reference)\n // groups into `x => (x |> y) => #`,\n // and `(x |> y) => #` is an invalid arrow function.\n // This is because smart-mix `|>` has tighter precedence than `=>`.\n if (this.match(tt.arrow)) {\n throw this.raise(Errors.PipelineBodyNoArrow, { at: this.state.startLoc });\n }\n\n // A topic-style smart-mix pipe body must use the topic reference at least once.\n if (!this.topicReferenceWasUsedInCurrentContext()) {\n this.raise(Errors.PipelineTopicUnused, { at: startLoc });\n }\n }\n\n // Enable topic references from outer contexts within Hack-style pipe bodies.\n // The function modifies the parser's topic-context state to enable or disable\n // the use of topic references.\n // The function then calls a callback, then resets the parser\n // to the old topic-context state that it had before the function was called.\n\n withTopicBindingContext<T>(callback: () => T): T {\n const outerContextTopicState = this.state.topicContext;\n this.state.topicContext = {\n // Enable the use of the primary topic reference.\n maxNumOfResolvableTopics: 1,\n // Hide the use of any topic references from outer contexts.\n maxTopicIndex: null,\n };\n\n try {\n return callback();\n } finally {\n this.state.topicContext = outerContextTopicState;\n }\n }\n\n // This helper method is used only with the deprecated smart-mix pipe proposal.\n // Disables topic references from outer contexts within syntax constructs\n // such as the bodies of iteration statements.\n // The function modifies the parser's topic-context state to enable or disable\n // the use of topic references with the smartPipelines plugin. They then run a\n // callback, then they reset the parser to the old topic-context state that it\n // had before the function was called.\n\n withSmartMixTopicForbiddingContext<T>(callback: () => T): T {\n if (this.hasPlugin([\"pipelineOperator\", { proposal: \"smart\" }])) {\n // Reset the parser’s topic context only if the smart-mix pipe proposal is active.\n const outerContextTopicState = this.state.topicContext;\n this.state.topicContext = {\n // Disable the use of the primary topic reference.\n maxNumOfResolvableTopics: 0,\n // Hide the use of any topic references from outer contexts.\n maxTopicIndex: null,\n };\n\n try {\n return callback();\n } finally {\n this.state.topicContext = outerContextTopicState;\n }\n } else {\n // If the pipe proposal is \"minimal\", \"fsharp\", or \"hack\",\n // or if no pipe proposal is active,\n // then the callback result is returned\n // without touching any extra parser state.\n return callback();\n }\n }\n\n withSoloAwaitPermittingContext<T>(callback: () => T): T {\n const outerContextSoloAwaitState = this.state.soloAwait;\n this.state.soloAwait = true;\n\n try {\n return callback();\n } finally {\n this.state.soloAwait = outerContextSoloAwaitState;\n }\n }\n\n allowInAnd<T>(callback: () => T): T {\n const flags = this.prodParam.currentFlags();\n const prodParamToSet = PARAM_IN & ~flags;\n if (prodParamToSet) {\n this.prodParam.enter(flags | PARAM_IN);\n try {\n return callback();\n } finally {\n this.prodParam.exit();\n }\n }\n return callback();\n }\n\n disallowInAnd<T>(callback: () => T): T {\n const flags = this.prodParam.currentFlags();\n const prodParamToClear = PARAM_IN & flags;\n if (prodParamToClear) {\n this.prodParam.enter(flags & ~PARAM_IN);\n try {\n return callback();\n } finally {\n this.prodParam.exit();\n }\n }\n return callback();\n }\n\n // Register the use of a topic reference within the current\n // topic-binding context.\n registerTopicReference(): void {\n this.state.topicContext.maxTopicIndex = 0;\n }\n\n topicReferenceIsAllowedInCurrentContext(): boolean {\n return this.state.topicContext.maxNumOfResolvableTopics >= 1;\n }\n\n topicReferenceWasUsedInCurrentContext(): boolean {\n return (\n this.state.topicContext.maxTopicIndex != null &&\n this.state.topicContext.maxTopicIndex >= 0\n );\n }\n\n parseFSharpPipelineBody(prec: number): N.Expression {\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n\n this.state.potentialArrowAt = this.state.start;\n const oldInFSharpPipelineDirectBody = this.state.inFSharpPipelineDirectBody;\n this.state.inFSharpPipelineDirectBody = true;\n\n const ret = this.parseExprOp(\n this.parseMaybeUnaryOrPrivate(),\n startPos,\n startLoc,\n prec,\n );\n\n this.state.inFSharpPipelineDirectBody = oldInFSharpPipelineDirectBody;\n\n return ret;\n }\n\n // https://github.com/tc39/proposal-js-module-blocks\n parseModuleExpression(): N.ModuleExpression {\n this.expectPlugin(\"moduleBlocks\");\n const node = this.startNode<N.ModuleExpression>();\n this.next(); // eat \"module\"\n this.eat(tt.braceL);\n\n const revertScopes = this.initializeScopes(/** inModule */ true);\n this.enterInitialScopes();\n\n const program = this.startNode<N.Program>();\n try {\n node.body = this.parseProgram(program, tt.braceR, \"module\");\n } finally {\n revertScopes();\n }\n this.eat(tt.braceR);\n return this.finishNode<N.ModuleExpression>(node, \"ModuleExpression\");\n }\n\n // Used in Flow plugin\n parsePropertyNamePrefixOperator(\n // eslint-disable-next-line no-unused-vars\n prop: N.ObjectOrClassMember | N.ClassMember,\n ): void {}\n}\n","// @flow\n\nimport * as N from \"../types\";\nimport {\n tokenIsIdentifier,\n tokenIsLoop,\n tokenIsTemplate,\n tt,\n type TokenType,\n getExportedToken,\n} from \"../tokenizer/types\";\nimport ExpressionParser from \"./expression\";\nimport { Errors, SourceTypeModuleErrors } from \"./error\";\nimport { isIdentifierChar, isIdentifierStart } from \"../util/identifier\";\nimport { lineBreak } from \"../util/whitespace\";\nimport * as charCodes from \"charcodes\";\nimport {\n BIND_CLASS,\n BIND_LEXICAL,\n BIND_VAR,\n BIND_FUNCTION,\n SCOPE_CLASS,\n SCOPE_FUNCTION,\n SCOPE_OTHER,\n SCOPE_SIMPLE_CATCH,\n SCOPE_STATIC_BLOCK,\n SCOPE_SUPER,\n CLASS_ELEMENT_OTHER,\n CLASS_ELEMENT_INSTANCE_GETTER,\n CLASS_ELEMENT_INSTANCE_SETTER,\n CLASS_ELEMENT_STATIC_GETTER,\n CLASS_ELEMENT_STATIC_SETTER,\n type BindingTypes,\n} from \"../util/scopeflags\";\nimport { ExpressionErrors } from \"./util\";\nimport { PARAM, functionFlags } from \"../util/production-parameter\";\nimport {\n newExpressionScope,\n newParameterDeclarationScope,\n} from \"../util/expression-scope\";\nimport type { SourceType } from \"../options\";\nimport { Token } from \"../tokenizer\";\nimport { Position, createPositionWithColumnOffset } from \"../util/location\";\nimport { cloneStringLiteral, cloneIdentifier } from \"./node\";\n\nconst loopLabel = { kind: \"loop\" },\n switchLabel = { kind: \"switch\" };\n\nconst FUNC_NO_FLAGS = 0b000,\n FUNC_STATEMENT = 0b001,\n FUNC_HANGING_STATEMENT = 0b010,\n FUNC_NULLABLE_ID = 0b100;\n\nconst loneSurrogate = /[\\uD800-\\uDFFF]/u;\n\nconst keywordRelationalOperator = /in(?:stanceof)?/y;\n\n/**\n * Convert tokens for backward Babel 7 compat.\n * tt.privateName => tt.hash + tt.name\n * tt.templateTail => tt.backquote/tt.braceR + tt.template + tt.backquote\n * tt.templateNonTail => tt.backquote/tt.braceR + tt.template + tt.dollarBraceL\n * For performance reasons this routine mutates `tokens`, it is okay\n * here since we execute `parseTopLevel` once for every file.\n * @param {*} tokens\n * @returns\n */\nfunction babel7CompatTokens(tokens, input) {\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n const { type } = token;\n if (typeof type === \"number\") {\n if (!process.env.BABEL_8_BREAKING) {\n if (type === tt.privateName) {\n const { loc, start, value, end } = token;\n const hashEndPos = start + 1;\n const hashEndLoc = createPositionWithColumnOffset(loc.start, 1);\n tokens.splice(\n i,\n 1,\n // $FlowIgnore: hacky way to create token\n new Token({\n type: getExportedToken(tt.hash),\n value: \"#\",\n start: start,\n end: hashEndPos,\n startLoc: loc.start,\n endLoc: hashEndLoc,\n }),\n // $FlowIgnore: hacky way to create token\n new Token({\n type: getExportedToken(tt.name),\n value: value,\n start: hashEndPos,\n end: end,\n startLoc: hashEndLoc,\n endLoc: loc.end,\n }),\n );\n i++;\n continue;\n }\n\n if (tokenIsTemplate(type)) {\n const { loc, start, value, end } = token;\n const backquoteEnd = start + 1;\n const backquoteEndLoc = createPositionWithColumnOffset(loc.start, 1);\n let startToken;\n if (input.charCodeAt(start) === charCodes.graveAccent) {\n // $FlowIgnore: hacky way to create token\n startToken = new Token({\n type: getExportedToken(tt.backQuote),\n value: \"`\",\n start: start,\n end: backquoteEnd,\n startLoc: loc.start,\n endLoc: backquoteEndLoc,\n });\n } else {\n // $FlowIgnore: hacky way to create token\n startToken = new Token({\n type: getExportedToken(tt.braceR),\n value: \"}\",\n start: start,\n end: backquoteEnd,\n startLoc: loc.start,\n endLoc: backquoteEndLoc,\n });\n }\n let templateValue,\n templateElementEnd,\n templateElementEndLoc,\n endToken;\n if (type === tt.templateTail) {\n // ends with '`'\n templateElementEnd = end - 1;\n templateElementEndLoc = createPositionWithColumnOffset(loc.end, -1);\n templateValue = value === null ? null : value.slice(1, -1);\n // $FlowIgnore: hacky way to create token\n endToken = new Token({\n type: getExportedToken(tt.backQuote),\n value: \"`\",\n start: templateElementEnd,\n end: end,\n startLoc: templateElementEndLoc,\n endLoc: loc.end,\n });\n } else {\n // ends with `${`\n templateElementEnd = end - 2;\n templateElementEndLoc = createPositionWithColumnOffset(loc.end, -2);\n templateValue = value === null ? null : value.slice(1, -2);\n // $FlowIgnore: hacky way to create token\n endToken = new Token({\n type: getExportedToken(tt.dollarBraceL),\n value: \"${\",\n start: templateElementEnd,\n end: end,\n startLoc: templateElementEndLoc,\n endLoc: loc.end,\n });\n }\n tokens.splice(\n i,\n 1,\n startToken,\n // $FlowIgnore: hacky way to create token\n new Token({\n type: getExportedToken(tt.template),\n value: templateValue,\n start: backquoteEnd,\n end: templateElementEnd,\n startLoc: backquoteEndLoc,\n endLoc: templateElementEndLoc,\n }),\n endToken,\n );\n i += 2;\n continue;\n }\n }\n // $FlowIgnore: we manipulate `token` for performance reasons\n token.type = getExportedToken(type);\n }\n }\n return tokens;\n}\nexport default class StatementParser extends ExpressionParser {\n // ### Statement parsing\n\n // Parse a program. Initializes the parser, reads any number of\n // statements, and wraps them in a Program node. Optionally takes a\n // `program` argument. If present, the statements will be appended\n // to its body instead of creating a new node.\n\n parseTopLevel(file: N.File, program: N.Program): N.File {\n file.program = this.parseProgram(program);\n file.comments = this.state.comments;\n\n if (this.options.tokens) {\n file.tokens = babel7CompatTokens(this.tokens, this.input);\n }\n\n return this.finishNode(file, \"File\");\n }\n\n parseProgram(\n program: N.Program,\n end: TokenType = tt.eof,\n sourceType: SourceType = this.options.sourceType,\n ): N.Program {\n program.sourceType = sourceType;\n program.interpreter = this.parseInterpreterDirective();\n this.parseBlockBody(program, true, true, end);\n if (\n this.inModule &&\n !this.options.allowUndeclaredExports &&\n this.scope.undefinedExports.size > 0\n ) {\n for (const [name, loc] of Array.from(this.scope.undefinedExports)) {\n this.raise(Errors.ModuleExportUndefined, { at: loc }, name);\n }\n }\n return this.finishNode<N.Program>(program, \"Program\");\n }\n\n // TODO\n\n /**\n * cast a Statement to a Directive. This method mutates input statement.\n *\n * @param {N.Statement} stmt\n * @returns {N.Directive}\n * @memberof StatementParser\n */\n stmtToDirective(stmt: N.Statement): N.Directive {\n const directive = (stmt: any);\n directive.type = \"Directive\";\n directive.value = directive.expression;\n delete directive.expression;\n\n const directiveLiteral = directive.value;\n const expressionValue = directiveLiteral.value;\n const raw = this.input.slice(directiveLiteral.start, directiveLiteral.end);\n const val = (directiveLiteral.value = raw.slice(1, -1)); // remove quotes\n\n this.addExtra(directiveLiteral, \"raw\", raw);\n this.addExtra(directiveLiteral, \"rawValue\", val);\n this.addExtra(directiveLiteral, \"expressionValue\", expressionValue);\n\n directiveLiteral.type = \"DirectiveLiteral\";\n\n return directive;\n }\n\n parseInterpreterDirective(): N.InterpreterDirective | null {\n if (!this.match(tt.interpreterDirective)) {\n return null;\n }\n\n const node = this.startNode();\n node.value = this.state.value;\n this.next();\n return this.finishNode(node, \"InterpreterDirective\");\n }\n\n isLet(context: ?string): boolean {\n if (!this.isContextual(tt._let)) {\n return false;\n }\n return this.isLetKeyword(context);\n }\n\n /**\n * Assuming we have seen a contextual `let`, check if it starts a variable declaration\n so that `left` should be interpreted as a `let` keyword.\n *\n * @param {?string} context When `context` is non nullish, it will return early and _skip_ checking\n if the next token after `let` is `{` or a keyword relational operator\n * @returns {boolean}\n * @memberof StatementParser\n */\n isLetKeyword(context: ?string): boolean {\n const next = this.nextTokenStart();\n const nextCh = this.codePointAtPos(next);\n // For ambiguous cases, determine if a LexicalDeclaration (or only a\n // Statement) is allowed here. If context is not empty then only a Statement\n // is allowed. However, `let [` is an explicit negative lookahead for\n // ExpressionStatement, so special-case it first.\n // Also, `let \\` is never valid as an expression so this must be a keyword.\n if (\n nextCh === charCodes.backslash ||\n nextCh === charCodes.leftSquareBracket\n ) {\n return true;\n }\n if (context) return false;\n\n if (nextCh === charCodes.leftCurlyBrace) return true;\n\n if (isIdentifierStart(nextCh)) {\n keywordRelationalOperator.lastIndex = next;\n if (keywordRelationalOperator.test(this.input)) {\n // We have seen `in` or `instanceof` so far, now check if the identfier\n // ends here\n const endCh = this.codePointAtPos(keywordRelationalOperator.lastIndex);\n if (!isIdentifierChar(endCh) && endCh !== charCodes.backslash) {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n\n // Parse a single statement.\n //\n // If expecting a statement and finding a slash operator, parse a\n // regular expression literal. This is to handle cases like\n // `if (foo) /blah/.exec(foo)`, where looking at the previous token\n // does not help.\n // https://tc39.es/ecma262/#prod-Statement\n // ImportDeclaration and ExportDeclaration are also handled here so we can throw recoverable errors\n // when they are not at the top level\n parseStatement(context: ?string, topLevel?: boolean): N.Statement {\n if (this.match(tt.at)) {\n this.parseDecorators(true);\n }\n return this.parseStatementContent(context, topLevel);\n }\n\n parseStatementContent(context: ?string, topLevel: ?boolean): N.Statement {\n let starttype = this.state.type;\n const node = this.startNode();\n let kind;\n\n if (this.isLet(context)) {\n starttype = tt._var;\n kind = \"let\";\n }\n\n // Most types of statements are recognized by the keyword they\n // start with. Many are trivial to parse, some require a bit of\n // complexity.\n\n switch (starttype) {\n case tt._break:\n return this.parseBreakContinueStatement(node, /* isBreak */ true);\n case tt._continue:\n return this.parseBreakContinueStatement(node, /* isBreak */ false);\n case tt._debugger:\n return this.parseDebuggerStatement(node);\n case tt._do:\n return this.parseDoStatement(node);\n case tt._for:\n return this.parseForStatement(node);\n case tt._function:\n if (this.lookaheadCharCode() === charCodes.dot) break;\n if (context) {\n if (this.state.strict) {\n this.raise(Errors.StrictFunction, { at: this.state.startLoc });\n } else if (context !== \"if\" && context !== \"label\") {\n this.raise(Errors.SloppyFunction, { at: this.state.startLoc });\n }\n }\n return this.parseFunctionStatement(node, false, !context);\n\n case tt._class:\n if (context) this.unexpected();\n return this.parseClass(node, true);\n\n case tt._if:\n return this.parseIfStatement(node);\n case tt._return:\n return this.parseReturnStatement(node);\n case tt._switch:\n return this.parseSwitchStatement(node);\n case tt._throw:\n return this.parseThrowStatement(node);\n case tt._try:\n return this.parseTryStatement(node);\n\n case tt._const:\n case tt._var:\n kind = kind || this.state.value;\n if (context && kind !== \"var\") {\n this.raise(Errors.UnexpectedLexicalDeclaration, {\n at: this.state.startLoc,\n });\n }\n return this.parseVarStatement(node, kind);\n\n case tt._while:\n return this.parseWhileStatement(node);\n case tt._with:\n return this.parseWithStatement(node);\n case tt.braceL:\n return this.parseBlock();\n case tt.semi:\n return this.parseEmptyStatement(node);\n case tt._import: {\n const nextTokenCharCode = this.lookaheadCharCode();\n if (\n nextTokenCharCode === charCodes.leftParenthesis || // import()\n nextTokenCharCode === charCodes.dot // import.meta\n ) {\n break;\n }\n }\n // fall through\n case tt._export: {\n if (!this.options.allowImportExportEverywhere && !topLevel) {\n this.raise(Errors.UnexpectedImportExport, {\n at: this.state.startLoc,\n });\n }\n\n this.next(); // eat `import`/`export`\n\n let result;\n if (starttype === tt._import) {\n result = this.parseImport(node);\n\n if (\n result.type === \"ImportDeclaration\" &&\n (!result.importKind || result.importKind === \"value\")\n ) {\n this.sawUnambiguousESM = true;\n }\n } else {\n result = this.parseExport(node);\n\n if (\n (result.type === \"ExportNamedDeclaration\" &&\n (!result.exportKind || result.exportKind === \"value\")) ||\n (result.type === \"ExportAllDeclaration\" &&\n (!result.exportKind || result.exportKind === \"value\")) ||\n result.type === \"ExportDefaultDeclaration\"\n ) {\n this.sawUnambiguousESM = true;\n }\n }\n\n this.assertModuleNodeAllowed(node);\n\n return result;\n }\n\n default: {\n if (this.isAsyncFunction()) {\n if (context) {\n this.raise(Errors.AsyncFunctionInSingleStatementContext, {\n at: this.state.startLoc,\n });\n }\n this.next();\n return this.parseFunctionStatement(node, true, !context);\n }\n }\n }\n\n // If the statement does not start with a statement keyword or a\n // brace, it's an ExpressionStatement or LabeledStatement. We\n // simply start parsing an expression, and afterwards, if the\n // next token is a colon and the expression was a simple\n // Identifier node, we switch to interpreting it as a label.\n const maybeName = this.state.value;\n const expr = this.parseExpression();\n\n if (\n tokenIsIdentifier(starttype) &&\n expr.type === \"Identifier\" &&\n this.eat(tt.colon)\n ) {\n return this.parseLabeledStatement(node, maybeName, expr, context);\n } else {\n return this.parseExpressionStatement(node, expr);\n }\n }\n\n assertModuleNodeAllowed(node: N.Node): void {\n if (!this.options.allowImportExportEverywhere && !this.inModule) {\n this.raise(SourceTypeModuleErrors.ImportOutsideModule, { node });\n }\n }\n\n takeDecorators(node: N.HasDecorators): void {\n const decorators =\n this.state.decoratorStack[this.state.decoratorStack.length - 1];\n if (decorators.length) {\n node.decorators = decorators;\n this.resetStartLocationFromNode(node, decorators[0]);\n this.state.decoratorStack[this.state.decoratorStack.length - 1] = [];\n }\n }\n\n canHaveLeadingDecorator(): boolean {\n return this.match(tt._class);\n }\n\n parseDecorators(allowExport?: boolean): void {\n const currentContextDecorators =\n this.state.decoratorStack[this.state.decoratorStack.length - 1];\n while (this.match(tt.at)) {\n const decorator = this.parseDecorator();\n currentContextDecorators.push(decorator);\n }\n\n if (this.match(tt._export)) {\n if (!allowExport) {\n this.unexpected();\n }\n\n if (\n this.hasPlugin(\"decorators\") &&\n !this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")\n ) {\n this.raise(Errors.DecoratorExportClass, { at: this.state.startLoc });\n }\n } else if (!this.canHaveLeadingDecorator()) {\n throw this.raise(Errors.UnexpectedLeadingDecorator, {\n at: this.state.startLoc,\n });\n }\n }\n\n parseDecorator(): N.Decorator {\n this.expectOnePlugin([\"decorators-legacy\", \"decorators\"]);\n\n const node = this.startNode();\n this.next();\n\n if (this.hasPlugin(\"decorators\")) {\n // Every time a decorator class expression is evaluated, a new empty array is pushed onto the stack\n // So that the decorators of any nested class expressions will be dealt with separately\n this.state.decoratorStack.push([]);\n\n const startPos = this.state.start;\n const startLoc = this.state.startLoc;\n let expr: N.Expression;\n\n if (this.eat(tt.parenL)) {\n expr = this.parseExpression();\n this.expect(tt.parenR);\n } else {\n expr = this.parseIdentifier(false);\n\n while (this.eat(tt.dot)) {\n const node = this.startNodeAt(startPos, startLoc);\n node.object = expr;\n node.property = this.parseIdentifier(true);\n node.computed = false;\n expr = this.finishNode(node, \"MemberExpression\");\n }\n }\n\n node.expression = this.parseMaybeDecoratorArguments(expr);\n this.state.decoratorStack.pop();\n } else {\n node.expression = this.parseExprSubscripts();\n }\n return this.finishNode(node, \"Decorator\");\n }\n\n parseMaybeDecoratorArguments(expr: N.Expression): N.Expression {\n if (this.eat(tt.parenL)) {\n const node = this.startNodeAtNode(expr);\n node.callee = expr;\n node.arguments = this.parseCallExpressionArguments(tt.parenR, false);\n this.toReferencedList(node.arguments);\n return this.finishNode(node, \"CallExpression\");\n }\n\n return expr;\n }\n\n parseBreakContinueStatement(\n node: N.BreakStatement | N.ContinueStatement,\n isBreak: boolean,\n ): N.BreakStatement | N.ContinueStatement {\n this.next();\n\n if (this.isLineTerminator()) {\n node.label = null;\n } else {\n node.label = this.parseIdentifier();\n this.semicolon();\n }\n\n this.verifyBreakContinue(node, isBreak);\n\n return this.finishNode(\n node,\n isBreak ? \"BreakStatement\" : \"ContinueStatement\",\n );\n }\n\n verifyBreakContinue(\n node: N.BreakStatement | N.ContinueStatement,\n isBreak: boolean,\n ) {\n let i;\n for (i = 0; i < this.state.labels.length; ++i) {\n const lab = this.state.labels[i];\n if (node.label == null || lab.name === node.label.name) {\n if (lab.kind != null && (isBreak || lab.kind === \"loop\")) break;\n if (node.label && isBreak) break;\n }\n }\n if (i === this.state.labels.length) {\n this.raise(\n Errors.IllegalBreakContinue,\n { node },\n isBreak ? \"break\" : \"continue\",\n );\n }\n }\n\n parseDebuggerStatement(node: N.DebuggerStatement): N.DebuggerStatement {\n this.next();\n this.semicolon();\n return this.finishNode(node, \"DebuggerStatement\");\n }\n\n parseHeaderExpression(): N.Expression {\n this.expect(tt.parenL);\n const val = this.parseExpression();\n this.expect(tt.parenR);\n return val;\n }\n\n parseDoStatement(node: N.DoWhileStatement): N.DoWhileStatement {\n this.next();\n this.state.labels.push(loopLabel);\n\n // Parse the loop body's body.\n node.body =\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the loop body. They are permitted in test expressions,\n // outside of the loop body.\n this.withSmartMixTopicForbiddingContext(() =>\n // Parse the loop body's body.\n this.parseStatement(\"do\"),\n );\n\n this.state.labels.pop();\n\n this.expect(tt._while);\n node.test = this.parseHeaderExpression();\n this.eat(tt.semi);\n return this.finishNode(node, \"DoWhileStatement\");\n }\n\n // Disambiguating between a `for` and a `for`/`in` or `for`/`of`\n // loop is non-trivial. Basically, we have to parse the init `var`\n // statement or expression, disallowing the `in` operator (see\n // the second parameter to `parseExpression`), and then check\n // whether the next token is `in` or `of`. When there is no init\n // part (semicolon immediately after the opening parenthesis), it\n // is a regular `for` loop.\n\n parseForStatement(node: N.Node): N.ForLike {\n this.next();\n this.state.labels.push(loopLabel);\n\n let awaitAt = null;\n\n if (this.isAwaitAllowed() && this.eatContextual(tt._await)) {\n awaitAt = this.state.lastTokStartLoc;\n }\n this.scope.enter(SCOPE_OTHER);\n this.expect(tt.parenL);\n\n if (this.match(tt.semi)) {\n if (awaitAt !== null) {\n this.unexpected(awaitAt);\n }\n return this.parseFor(node, null);\n }\n\n const startsWithLet = this.isContextual(tt._let);\n const isLet = startsWithLet && this.isLetKeyword();\n if (this.match(tt._var) || this.match(tt._const) || isLet) {\n const init = this.startNode();\n const kind = isLet ? \"let\" : this.state.value;\n this.next();\n this.parseVar(init, true, kind);\n this.finishNode(init, \"VariableDeclaration\");\n\n if (\n (this.match(tt._in) || this.isContextual(tt._of)) &&\n init.declarations.length === 1\n ) {\n return this.parseForIn(node, init, awaitAt);\n }\n if (awaitAt !== null) {\n this.unexpected(awaitAt);\n }\n return this.parseFor(node, init);\n }\n\n // Check whether the first token is possibly a contextual keyword, so that\n // we can forbid `for (async of` if this turns out to be a for-of loop.\n const startsWithAsync = this.isContextual(tt._async);\n\n const refExpressionErrors = new ExpressionErrors();\n const init = this.parseExpression(true, refExpressionErrors);\n const isForOf = this.isContextual(tt._of);\n if (isForOf) {\n // Check for leading tokens that are forbidden in for-of loops:\n if (startsWithLet) {\n this.raise(Errors.ForOfLet, { node: init });\n }\n\n if (\n // `for await (async of []);` is allowed.\n awaitAt === null &&\n startsWithAsync &&\n init.type === \"Identifier\"\n ) {\n // This catches the case where the `async` in `for (async of` was\n // parsed as an identifier. If it was parsed as the start of an async\n // arrow function (e.g. `for (async of => {} of []);`), the LVal check\n // further down will raise a more appropriate error.\n this.raise(Errors.ForOfAsync, { node: init });\n }\n }\n if (isForOf || this.match(tt._in)) {\n this.checkDestructuringPrivate(refExpressionErrors);\n this.toAssignable(init, /* isLHS */ true);\n const description = isForOf ? \"for-of statement\" : \"for-in statement\";\n this.checkLVal(init, description);\n return this.parseForIn(node, init, awaitAt);\n } else {\n this.checkExpressionErrors(refExpressionErrors, true);\n }\n if (awaitAt !== null) {\n this.unexpected(awaitAt);\n }\n return this.parseFor(node, init);\n }\n\n parseFunctionStatement(\n node: N.FunctionDeclaration,\n isAsync?: boolean,\n declarationPosition?: boolean,\n ): N.FunctionDeclaration {\n this.next();\n return this.parseFunction(\n node,\n FUNC_STATEMENT | (declarationPosition ? 0 : FUNC_HANGING_STATEMENT),\n isAsync,\n );\n }\n\n parseIfStatement(node: N.IfStatement): N.IfStatement {\n this.next();\n node.test = this.parseHeaderExpression();\n node.consequent = this.parseStatement(\"if\");\n node.alternate = this.eat(tt._else) ? this.parseStatement(\"if\") : null;\n return this.finishNode(node, \"IfStatement\");\n }\n\n parseReturnStatement(node: N.ReturnStatement): N.ReturnStatement {\n if (!this.prodParam.hasReturn && !this.options.allowReturnOutsideFunction) {\n this.raise(Errors.IllegalReturn, { at: this.state.startLoc });\n }\n\n this.next();\n\n // In `return` (and `break`/`continue`), the keywords with\n // optional arguments, we eagerly look for a semicolon or the\n // possibility to insert one.\n\n if (this.isLineTerminator()) {\n node.argument = null;\n } else {\n node.argument = this.parseExpression();\n this.semicolon();\n }\n\n return this.finishNode(node, \"ReturnStatement\");\n }\n\n parseSwitchStatement(node: N.SwitchStatement): N.SwitchStatement {\n this.next();\n node.discriminant = this.parseHeaderExpression();\n const cases = (node.cases = []);\n this.expect(tt.braceL);\n this.state.labels.push(switchLabel);\n this.scope.enter(SCOPE_OTHER);\n\n // Statements under must be grouped (by label) in SwitchCase\n // nodes. `cur` is used to keep the node that we are currently\n // adding statements to.\n\n let cur;\n for (let sawDefault; !this.match(tt.braceR); ) {\n if (this.match(tt._case) || this.match(tt._default)) {\n const isCase = this.match(tt._case);\n if (cur) this.finishNode(cur, \"SwitchCase\");\n cases.push((cur = this.startNode()));\n cur.consequent = [];\n this.next();\n if (isCase) {\n cur.test = this.parseExpression();\n } else {\n if (sawDefault) {\n this.raise(Errors.MultipleDefaultsInSwitch, {\n at: this.state.lastTokStartLoc,\n });\n }\n sawDefault = true;\n cur.test = null;\n }\n this.expect(tt.colon);\n } else {\n if (cur) {\n cur.consequent.push(this.parseStatement(null));\n } else {\n this.unexpected();\n }\n }\n }\n this.scope.exit();\n if (cur) this.finishNode(cur, \"SwitchCase\");\n this.next(); // Closing brace\n this.state.labels.pop();\n return this.finishNode(node, \"SwitchStatement\");\n }\n\n parseThrowStatement(node: N.ThrowStatement): N.ThrowStatement {\n this.next();\n if (this.hasPrecedingLineBreak()) {\n this.raise(Errors.NewlineAfterThrow, { at: this.state.lastTokEndLoc });\n }\n node.argument = this.parseExpression();\n this.semicolon();\n return this.finishNode(node, \"ThrowStatement\");\n }\n\n parseCatchClauseParam(): N.Pattern {\n const param = this.parseBindingAtom();\n\n const simple = param.type === \"Identifier\";\n this.scope.enter(simple ? SCOPE_SIMPLE_CATCH : 0);\n this.checkLVal(param, \"catch clause\", BIND_LEXICAL);\n\n return param;\n }\n\n parseTryStatement(node: N.TryStatement): N.TryStatement {\n this.next();\n\n node.block = this.parseBlock();\n node.handler = null;\n\n if (this.match(tt._catch)) {\n const clause = this.startNode();\n this.next();\n if (this.match(tt.parenL)) {\n this.expect(tt.parenL);\n clause.param = this.parseCatchClauseParam();\n this.expect(tt.parenR);\n } else {\n clause.param = null;\n this.scope.enter(SCOPE_OTHER);\n }\n\n // Parse the catch clause's body.\n clause.body =\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the catch clause's body.\n this.withSmartMixTopicForbiddingContext(() =>\n // Parse the catch clause's body.\n this.parseBlock(false, false),\n );\n\n this.scope.exit();\n node.handler = this.finishNode(clause, \"CatchClause\");\n }\n\n node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null;\n\n if (!node.handler && !node.finalizer) {\n this.raise(Errors.NoCatchOrFinally, { node });\n }\n\n return this.finishNode(node, \"TryStatement\");\n }\n\n parseVarStatement(\n node: N.VariableDeclaration,\n kind: \"var\" | \"let\" | \"const\",\n ): N.VariableDeclaration {\n this.next();\n this.parseVar(node, false, kind);\n this.semicolon();\n return this.finishNode(node, \"VariableDeclaration\");\n }\n\n parseWhileStatement(node: N.WhileStatement): N.WhileStatement {\n this.next();\n node.test = this.parseHeaderExpression();\n this.state.labels.push(loopLabel);\n\n // Parse the loop body.\n node.body =\n // For the smartPipelines plugin:\n // Disable topic references from outer contexts within the loop body.\n // They are permitted in test expressions, outside of the loop body.\n this.withSmartMixTopicForbiddingContext(() =>\n // Parse loop body.\n this.parseStatement(\"while\"),\n );\n\n this.state.labels.pop();\n\n return this.finishNode(node, \"WhileStatement\");\n }\n\n parseWithStatement(node: N.WithStatement): N.WithStatement {\n if (this.state.strict) {\n this.raise(Errors.StrictWith, { at: this.state.startLoc });\n }\n this.next();\n node.object = this.parseHeaderExpression();\n\n // Parse the statement body.\n node.body =\n // For the smartPipelines plugin:\n // Disable topic references from outer contexts within the with statement's body.\n // They are permitted in function default-parameter expressions, which are\n // part of the outer context, outside of the with statement's body.\n this.withSmartMixTopicForbiddingContext(() =>\n // Parse the statement body.\n this.parseStatement(\"with\"),\n );\n\n return this.finishNode(node, \"WithStatement\");\n }\n\n parseEmptyStatement(node: N.EmptyStatement): N.EmptyStatement {\n this.next();\n return this.finishNode(node, \"EmptyStatement\");\n }\n\n parseLabeledStatement(\n node: N.LabeledStatement,\n maybeName: string,\n expr: N.Identifier,\n context: ?string,\n ): N.LabeledStatement {\n for (const label of this.state.labels) {\n if (label.name === maybeName) {\n this.raise(Errors.LabelRedeclaration, { node: expr }, maybeName);\n }\n }\n\n const kind = tokenIsLoop(this.state.type)\n ? \"loop\"\n : this.match(tt._switch)\n ? \"switch\"\n : null;\n for (let i = this.state.labels.length - 1; i >= 0; i--) {\n const label = this.state.labels[i];\n if (label.statementStart === node.start) {\n label.statementStart = this.state.start;\n label.kind = kind;\n } else {\n break;\n }\n }\n\n this.state.labels.push({\n name: maybeName,\n kind: kind,\n statementStart: this.state.start,\n });\n node.body = this.parseStatement(\n context\n ? context.indexOf(\"label\") === -1\n ? context + \"label\"\n : context\n : \"label\",\n );\n\n this.state.labels.pop();\n node.label = expr;\n return this.finishNode(node, \"LabeledStatement\");\n }\n\n parseExpressionStatement(\n node: N.ExpressionStatement,\n expr: N.Expression,\n ): N.Statement {\n node.expression = expr;\n this.semicolon();\n return this.finishNode(node, \"ExpressionStatement\");\n }\n\n // Parse a semicolon-enclosed block of statements, handling `\"use\n // strict\"` declarations when `allowDirectives` is true (used for\n // function bodies).\n\n parseBlock(\n allowDirectives?: boolean = false,\n createNewLexicalScope?: boolean = true,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): N.BlockStatement {\n const node = this.startNode();\n if (allowDirectives) {\n this.state.strictErrors.clear();\n }\n this.expect(tt.braceL);\n if (createNewLexicalScope) {\n this.scope.enter(SCOPE_OTHER);\n }\n this.parseBlockBody(\n node,\n allowDirectives,\n false,\n tt.braceR,\n afterBlockParse,\n );\n if (createNewLexicalScope) {\n this.scope.exit();\n }\n return this.finishNode(node, \"BlockStatement\");\n }\n\n isValidDirective(stmt: N.Statement): boolean {\n return (\n stmt.type === \"ExpressionStatement\" &&\n stmt.expression.type === \"StringLiteral\" &&\n !stmt.expression.extra.parenthesized\n );\n }\n\n parseBlockBody(\n node: N.BlockStatementLike,\n allowDirectives: ?boolean,\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n const body = (node.body = []);\n const directives = (node.directives = []);\n this.parseBlockOrModuleBlockBody(\n body,\n allowDirectives ? directives : undefined,\n topLevel,\n end,\n afterBlockParse,\n );\n }\n\n // Undefined directives means that directives are not allowed.\n // https://tc39.es/ecma262/#prod-Block\n // https://tc39.es/ecma262/#prod-ModuleBody\n parseBlockOrModuleBlockBody(\n body: N.Statement[],\n directives: ?(N.Directive[]),\n topLevel: boolean,\n end: TokenType,\n afterBlockParse?: (hasStrictModeDirective: boolean) => void,\n ): void {\n const oldStrict = this.state.strict;\n let hasStrictModeDirective = false;\n let parsedNonDirective = false;\n\n while (!this.match(end)) {\n const stmt = this.parseStatement(null, topLevel);\n\n if (directives && !parsedNonDirective) {\n if (this.isValidDirective(stmt)) {\n const directive = this.stmtToDirective(stmt);\n directives.push(directive);\n\n if (\n !hasStrictModeDirective &&\n directive.value.value === \"use strict\"\n ) {\n hasStrictModeDirective = true;\n this.setStrict(true);\n }\n\n continue;\n }\n parsedNonDirective = true;\n // clear strict errors since the strict mode will not change within the block\n this.state.strictErrors.clear();\n }\n body.push(stmt);\n }\n\n if (afterBlockParse) {\n afterBlockParse.call(this, hasStrictModeDirective);\n }\n\n if (!oldStrict) {\n this.setStrict(false);\n }\n\n this.next();\n }\n\n // Parse a regular `for` loop. The disambiguation code in\n // `parseStatement` will already have parsed the init statement or\n // expression.\n\n parseFor(\n node: N.ForStatement,\n init: ?(N.VariableDeclaration | N.Expression),\n ): N.ForStatement {\n node.init = init;\n this.semicolon(/* allowAsi */ false);\n node.test = this.match(tt.semi) ? null : this.parseExpression();\n this.semicolon(/* allowAsi */ false);\n node.update = this.match(tt.parenR) ? null : this.parseExpression();\n this.expect(tt.parenR);\n\n // Parse the loop body.\n node.body =\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the loop body. They are permitted in test expressions,\n // outside of the loop body.\n this.withSmartMixTopicForbiddingContext(() =>\n // Parse the loop body.\n this.parseStatement(\"for\"),\n );\n\n this.scope.exit();\n this.state.labels.pop();\n\n return this.finishNode(node, \"ForStatement\");\n }\n\n // Parse a `for`/`in` and `for`/`of` loop, which are almost\n // same from parser's perspective.\n\n parseForIn(\n node: N.ForInOf,\n init: N.VariableDeclaration | N.AssignmentPattern,\n awaitAt: ?Position,\n ): N.ForInOf {\n const isForIn = this.match(tt._in);\n this.next();\n\n if (isForIn) {\n if (awaitAt !== null) this.unexpected(awaitAt);\n } else {\n node.await = awaitAt !== null;\n }\n\n if (\n init.type === \"VariableDeclaration\" &&\n init.declarations[0].init != null &&\n (!isForIn ||\n this.state.strict ||\n init.kind !== \"var\" ||\n init.declarations[0].id.type !== \"Identifier\")\n ) {\n this.raise(\n Errors.ForInOfLoopInitializer,\n { node: init },\n isForIn ? \"for-in\" : \"for-of\",\n );\n }\n\n if (init.type === \"AssignmentPattern\") {\n this.raise(Errors.InvalidLhs, { node: init }, \"for-loop\");\n }\n\n node.left = init;\n node.right = isForIn\n ? this.parseExpression()\n : this.parseMaybeAssignAllowIn();\n this.expect(tt.parenR);\n\n // Parse the loop body.\n node.body =\n // For the smartPipelines plugin:\n // Disable topic references from outer contexts within the loop body.\n // They are permitted in test expressions, outside of the loop body.\n this.withSmartMixTopicForbiddingContext(() =>\n // Parse loop body.\n this.parseStatement(\"for\"),\n );\n\n this.scope.exit();\n this.state.labels.pop();\n\n return this.finishNode(node, isForIn ? \"ForInStatement\" : \"ForOfStatement\");\n }\n\n // Parse a list of variable declarations.\n\n parseVar(\n node: N.VariableDeclaration,\n isFor: boolean,\n kind: \"var\" | \"let\" | \"const\",\n ): N.VariableDeclaration {\n const declarations = (node.declarations = []);\n const isTypescript = this.hasPlugin(\"typescript\");\n node.kind = kind;\n for (;;) {\n const decl = this.startNode();\n this.parseVarId(decl, kind);\n if (this.eat(tt.eq)) {\n decl.init = isFor\n ? this.parseMaybeAssignDisallowIn()\n : this.parseMaybeAssignAllowIn();\n } else {\n if (\n kind === \"const\" &&\n !(this.match(tt._in) || this.isContextual(tt._of))\n ) {\n // `const` with no initializer is allowed in TypeScript.\n // It could be a declaration like `const x: number;`.\n if (!isTypescript) {\n this.raise(\n Errors.DeclarationMissingInitializer,\n { at: this.state.lastTokEndLoc },\n \"Const declarations\",\n );\n }\n } else if (\n decl.id.type !== \"Identifier\" &&\n !(isFor && (this.match(tt._in) || this.isContextual(tt._of)))\n ) {\n this.raise(\n Errors.DeclarationMissingInitializer,\n { at: this.state.lastTokEndLoc },\n \"Complex binding patterns\",\n );\n }\n decl.init = null;\n }\n declarations.push(this.finishNode(decl, \"VariableDeclarator\"));\n if (!this.eat(tt.comma)) break;\n }\n return node;\n }\n\n parseVarId(decl: N.VariableDeclarator, kind: \"var\" | \"let\" | \"const\"): void {\n decl.id = this.parseBindingAtom();\n this.checkLVal(\n decl.id,\n \"variable declaration\",\n kind === \"var\" ? BIND_VAR : BIND_LEXICAL,\n undefined,\n kind !== \"var\",\n );\n }\n\n // Parse a function declaration or literal (depending on the\n // `isStatement` parameter).\n\n parseFunction<T: N.NormalFunction>(\n node: T,\n statement?: number = FUNC_NO_FLAGS,\n isAsync?: boolean = false,\n ): T {\n const isStatement = statement & FUNC_STATEMENT;\n const isHangingStatement = statement & FUNC_HANGING_STATEMENT;\n const requireId = !!isStatement && !(statement & FUNC_NULLABLE_ID);\n\n this.initFunction(node, isAsync);\n\n if (this.match(tt.star) && isHangingStatement) {\n this.raise(Errors.GeneratorInSingleStatementContext, {\n at: this.state.startLoc,\n });\n }\n node.generator = this.eat(tt.star);\n\n if (isStatement) {\n node.id = this.parseFunctionId(requireId);\n }\n\n const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;\n this.state.maybeInArrowParameters = false;\n this.scope.enter(SCOPE_FUNCTION);\n this.prodParam.enter(functionFlags(isAsync, node.generator));\n\n if (!isStatement) {\n node.id = this.parseFunctionId();\n }\n\n this.parseFunctionParams(node, /* allowModifiers */ false);\n\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the function body. They are permitted in function\n // default-parameter expressions, outside of the function body.\n this.withSmartMixTopicForbiddingContext(() => {\n // Parse the function body.\n this.parseFunctionBodyAndFinish(\n node,\n isStatement ? \"FunctionDeclaration\" : \"FunctionExpression\",\n );\n });\n\n this.prodParam.exit();\n this.scope.exit();\n\n if (isStatement && !isHangingStatement) {\n // We need to register this _after_ parsing the function body\n // because of TypeScript body-less function declarations,\n // which shouldn't be added to the scope.\n this.registerFunctionStatementId(node);\n }\n\n this.state.maybeInArrowParameters = oldMaybeInArrowParameters;\n return node;\n }\n\n parseFunctionId(requireId?: boolean): ?N.Identifier {\n return requireId || tokenIsIdentifier(this.state.type)\n ? this.parseIdentifier()\n : null;\n }\n\n parseFunctionParams(node: N.Function, allowModifiers?: boolean): void {\n this.expect(tt.parenL);\n this.expressionScope.enter(newParameterDeclarationScope());\n node.params = this.parseBindingList(\n tt.parenR,\n charCodes.rightParenthesis,\n /* allowEmpty */ false,\n allowModifiers,\n );\n\n this.expressionScope.exit();\n }\n\n registerFunctionStatementId(node: N.Function): void {\n if (!node.id) return;\n\n // If it is a regular function declaration in sloppy mode, then it is\n // subject to Annex B semantics (BIND_FUNCTION). Otherwise, the binding\n // mode depends on properties of the current scope (see\n // treatFunctionsAsVar).\n this.scope.declareName(\n node.id.name,\n this.state.strict || node.generator || node.async\n ? this.scope.treatFunctionsAsVar\n ? BIND_VAR\n : BIND_LEXICAL\n : BIND_FUNCTION,\n node.id.loc.start,\n );\n }\n\n // Parse a class declaration or literal (depending on the\n // `isStatement` parameter).\n\n parseClass<T: N.Class>(\n node: T,\n isStatement: /* T === ClassDeclaration */ boolean,\n optionalId?: boolean,\n ): T {\n this.next();\n this.takeDecorators(node);\n\n // A class definition is always strict mode code.\n const oldStrict = this.state.strict;\n this.state.strict = true;\n\n this.parseClassId(node, isStatement, optionalId);\n this.parseClassSuper(node);\n // this.state.strict is restored in parseClassBody\n node.body = this.parseClassBody(!!node.superClass, oldStrict);\n\n return this.finishNode(\n node,\n isStatement ? \"ClassDeclaration\" : \"ClassExpression\",\n );\n }\n\n isClassProperty(): boolean {\n return this.match(tt.eq) || this.match(tt.semi) || this.match(tt.braceR);\n }\n\n isClassMethod(): boolean {\n return this.match(tt.parenL);\n }\n\n isNonstaticConstructor(method: N.ClassMethod | N.ClassProperty): boolean {\n return (\n !method.computed &&\n !method.static &&\n (method.key.name === \"constructor\" || // Identifier\n method.key.value === \"constructor\") // String literal\n );\n }\n\n // https://tc39.es/ecma262/#prod-ClassBody\n parseClassBody(hadSuperClass: boolean, oldStrict: boolean): N.ClassBody {\n this.classScope.enter();\n\n const state: N.ParseClassMemberState = {\n hadConstructor: false,\n hadSuperClass,\n };\n let decorators: N.Decorator[] = [];\n const classBody: N.ClassBody = this.startNode();\n classBody.body = [];\n\n this.expect(tt.braceL);\n\n // For the smartPipelines plugin: Disable topic references from outer\n // contexts within the class body.\n this.withSmartMixTopicForbiddingContext(() => {\n // Parse the contents within the braces.\n while (!this.match(tt.braceR)) {\n if (this.eat(tt.semi)) {\n if (decorators.length > 0) {\n throw this.raise(Errors.DecoratorSemicolon, {\n at: this.state.lastTokEndLoc,\n });\n }\n continue;\n }\n\n if (this.match(tt.at)) {\n decorators.push(this.parseDecorator());\n continue;\n }\n\n const member = this.startNode();\n\n // steal the decorators if there are any\n if (decorators.length) {\n member.decorators = decorators;\n this.resetStartLocationFromNode(member, decorators[0]);\n decorators = [];\n }\n\n this.parseClassMember(classBody, member, state);\n\n if (\n member.kind === \"constructor\" &&\n member.decorators &&\n member.decorators.length > 0\n ) {\n this.raise(Errors.DecoratorConstructor, { node: member });\n }\n }\n });\n\n this.state.strict = oldStrict;\n\n this.next(); // eat `}`\n\n if (decorators.length) {\n throw this.raise(Errors.TrailingDecorator, { at: this.state.startLoc });\n }\n\n this.classScope.exit();\n\n return this.finishNode(classBody, \"ClassBody\");\n }\n\n // returns true if the current identifier is a method/field name,\n // false if it is a modifier\n parseClassMemberFromModifier(\n classBody: N.ClassBody,\n member: N.ClassMember,\n ): boolean {\n const key = this.parseIdentifier(true); // eats the modifier\n\n if (this.isClassMethod()) {\n const method: N.ClassMethod = (member: any);\n\n // a method named like the modifier\n method.kind = \"method\";\n method.computed = false;\n method.key = key;\n method.static = false;\n this.pushClassMethod(\n classBody,\n method,\n false,\n false,\n /* isConstructor */ false,\n false,\n );\n return true;\n } else if (this.isClassProperty()) {\n const prop: N.ClassProperty = (member: any);\n\n // a property named like the modifier\n prop.computed = false;\n prop.key = key;\n prop.static = false;\n classBody.body.push(this.parseClassProperty(prop));\n return true;\n }\n this.resetPreviousNodeTrailingComments(key);\n return false;\n }\n\n parseClassMember(\n classBody: N.ClassBody,\n member: N.ClassMember,\n state: N.ParseClassMemberState,\n ): void {\n const isStatic = this.isContextual(tt._static);\n\n if (isStatic) {\n if (this.parseClassMemberFromModifier(classBody, member)) {\n // a class element named 'static'\n return;\n }\n if (this.eat(tt.braceL)) {\n this.parseClassStaticBlock(classBody, ((member: any): N.StaticBlock));\n return;\n }\n }\n\n this.parseClassMemberWithIsStatic(classBody, member, state, isStatic);\n }\n\n parseClassMemberWithIsStatic(\n classBody: N.ClassBody,\n member: N.ClassMember,\n state: N.ParseClassMemberState,\n isStatic: boolean,\n ) {\n const publicMethod: $FlowSubtype<N.ClassMethod> = member;\n const privateMethod: $FlowSubtype<N.ClassPrivateMethod> = member;\n const publicProp: $FlowSubtype<N.ClassProperty> = member;\n const privateProp: $FlowSubtype<N.ClassPrivateProperty> = member;\n const accessorProp: $FlowSubtype<N.ClassAccessorProperty> = member;\n\n const method: typeof publicMethod | typeof privateMethod = publicMethod;\n const publicMember: typeof publicMethod | typeof publicProp = publicMethod;\n\n member.static = isStatic;\n this.parsePropertyNamePrefixOperator(member);\n\n if (this.eat(tt.star)) {\n // a generator\n method.kind = \"method\";\n const isPrivateName = this.match(tt.privateName);\n this.parseClassElementName(method);\n\n if (isPrivateName) {\n // Private generator method\n this.pushClassPrivateMethod(classBody, privateMethod, true, false);\n return;\n }\n\n if (this.isNonstaticConstructor(publicMethod)) {\n this.raise(Errors.ConstructorIsGenerator, {\n node: publicMethod.key,\n });\n }\n\n this.pushClassMethod(\n classBody,\n publicMethod,\n true,\n false,\n /* isConstructor */ false,\n false,\n );\n\n return;\n }\n\n const isContextual =\n tokenIsIdentifier(this.state.type) && !this.state.containsEsc;\n const isPrivate = this.match(tt.privateName);\n const key = this.parseClassElementName(member);\n const maybeQuestionTokenStartLoc = this.state.startLoc;\n\n this.parsePostMemberNameModifiers(publicMember);\n\n if (this.isClassMethod()) {\n method.kind = \"method\";\n\n if (isPrivate) {\n this.pushClassPrivateMethod(classBody, privateMethod, false, false);\n return;\n }\n\n // a normal method\n const isConstructor = this.isNonstaticConstructor(publicMethod);\n let allowsDirectSuper = false;\n if (isConstructor) {\n publicMethod.kind = \"constructor\";\n\n // TypeScript allows multiple overloaded constructor declarations.\n if (state.hadConstructor && !this.hasPlugin(\"typescript\")) {\n this.raise(Errors.DuplicateConstructor, { node: key });\n }\n if (isConstructor && this.hasPlugin(\"typescript\") && member.override) {\n this.raise(Errors.OverrideOnConstructor, { node: key });\n }\n state.hadConstructor = true;\n allowsDirectSuper = state.hadSuperClass;\n }\n\n this.pushClassMethod(\n classBody,\n publicMethod,\n false,\n false,\n isConstructor,\n allowsDirectSuper,\n );\n } else if (this.isClassProperty()) {\n if (isPrivate) {\n this.pushClassPrivateProperty(classBody, privateProp);\n } else {\n this.pushClassProperty(classBody, publicProp);\n }\n } else if (\n isContextual &&\n key.name === \"async\" &&\n !this.isLineTerminator()\n ) {\n // an async method\n this.resetPreviousNodeTrailingComments(key);\n const isGenerator = this.eat(tt.star);\n\n if (publicMember.optional) {\n this.unexpected(maybeQuestionTokenStartLoc);\n }\n\n method.kind = \"method\";\n // The so-called parsed name would have been \"async\": get the real name.\n const isPrivate = this.match(tt.privateName);\n this.parseClassElementName(method);\n this.parsePostMemberNameModifiers(publicMember);\n\n if (isPrivate) {\n // private async method\n this.pushClassPrivateMethod(\n classBody,\n privateMethod,\n isGenerator,\n true,\n );\n } else {\n if (this.isNonstaticConstructor(publicMethod)) {\n this.raise(Errors.ConstructorIsAsync, { node: publicMethod.key });\n }\n\n this.pushClassMethod(\n classBody,\n publicMethod,\n isGenerator,\n true,\n /* isConstructor */ false,\n false,\n );\n }\n } else if (\n isContextual &&\n (key.name === \"get\" || key.name === \"set\") &&\n !(this.match(tt.star) && this.isLineTerminator())\n ) {\n // `get\\n*` is an uninitialized property named 'get' followed by a generator.\n // a getter or setter\n this.resetPreviousNodeTrailingComments(key);\n method.kind = key.name;\n // The so-called parsed name would have been \"get/set\": get the real name.\n const isPrivate = this.match(tt.privateName);\n this.parseClassElementName(publicMethod);\n\n if (isPrivate) {\n // private getter/setter\n this.pushClassPrivateMethod(classBody, privateMethod, false, false);\n } else {\n if (this.isNonstaticConstructor(publicMethod)) {\n this.raise(Errors.ConstructorIsAccessor, { node: publicMethod.key });\n }\n this.pushClassMethod(\n classBody,\n publicMethod,\n false,\n false,\n /* isConstructor */ false,\n false,\n );\n }\n\n this.checkGetterSetterParams(publicMethod);\n } else if (\n isContextual &&\n key.name === \"accessor\" &&\n !this.isLineTerminator()\n ) {\n this.expectPlugin(\"decoratorAutoAccessors\");\n this.resetPreviousNodeTrailingComments(key);\n\n // The so-called parsed name would have been \"accessor\": get the real name.\n const isPrivate = this.match(tt.privateName);\n this.parseClassElementName(publicProp);\n this.pushClassAccessorProperty(classBody, accessorProp, isPrivate);\n } else if (this.isLineTerminator()) {\n // an uninitialized class property (due to ASI, since we don't otherwise recognize the next token)\n if (isPrivate) {\n this.pushClassPrivateProperty(classBody, privateProp);\n } else {\n this.pushClassProperty(classBody, publicProp);\n }\n } else {\n this.unexpected();\n }\n }\n\n // https://tc39.es/ecma262/#prod-ClassElementName\n parseClassElementName(member: N.ClassMember): N.Expression | N.Identifier {\n const { type, value } = this.state;\n if (\n (type === tt.name || type === tt.string) &&\n member.static &&\n value === \"prototype\"\n ) {\n this.raise(Errors.StaticPrototype, { at: this.state.startLoc });\n }\n\n if (type === tt.privateName) {\n if (value === \"constructor\") {\n this.raise(Errors.ConstructorClassPrivateField, {\n at: this.state.startLoc,\n });\n }\n const key = this.parsePrivateName();\n member.key = key;\n return key;\n }\n\n return this.parsePropertyName(member);\n }\n\n parseClassStaticBlock(\n classBody: N.ClassBody,\n member: N.StaticBlock & { decorators?: Array<N.Decorator> },\n ) {\n // Start a new lexical scope\n this.scope.enter(SCOPE_CLASS | SCOPE_STATIC_BLOCK | SCOPE_SUPER);\n // Start a new scope with regard to loop labels\n const oldLabels = this.state.labels;\n this.state.labels = [];\n // ClassStaticBlockStatementList:\n // StatementList[~Yield, ~Await, ~Return] opt\n this.prodParam.enter(PARAM);\n const body = (member.body = []);\n this.parseBlockOrModuleBlockBody(body, undefined, false, tt.braceR);\n this.prodParam.exit();\n this.scope.exit();\n this.state.labels = oldLabels;\n classBody.body.push(this.finishNode<N.StaticBlock>(member, \"StaticBlock\"));\n if (member.decorators?.length) {\n this.raise(Errors.DecoratorStaticBlock, { node: member });\n }\n }\n\n pushClassProperty(classBody: N.ClassBody, prop: N.ClassProperty) {\n if (\n !prop.computed &&\n (prop.key.name === \"constructor\" || prop.key.value === \"constructor\")\n ) {\n // Non-computed field, which is either an identifier named \"constructor\"\n // or a string literal named \"constructor\"\n this.raise(Errors.ConstructorClassField, { node: prop.key });\n }\n\n classBody.body.push(this.parseClassProperty(prop));\n }\n\n pushClassPrivateProperty(\n classBody: N.ClassBody,\n prop: N.ClassPrivateProperty,\n ) {\n const node = this.parseClassPrivateProperty(prop);\n classBody.body.push(node);\n\n this.classScope.declarePrivateName(\n this.getPrivateNameSV(node.key),\n CLASS_ELEMENT_OTHER,\n node.key.loc.start,\n );\n }\n\n pushClassAccessorProperty(\n classBody: N.ClassBody,\n prop: N.ClassAccessorProperty,\n isPrivate: boolean,\n ) {\n if (!isPrivate && !prop.computed) {\n // Not private, so not node is not a PrivateName and we can safely cast\n const key = (prop.key: N.Expression);\n\n if (key.name === \"constructor\" || key.value === \"constructor\") {\n // Non-computed field, which is either an identifier named \"constructor\"\n // or a string literal named \"constructor\"\n this.raise(Errors.ConstructorClassField, { node: key });\n }\n }\n\n const node = this.parseClassAccessorProperty(prop);\n classBody.body.push(node);\n\n if (isPrivate) {\n this.classScope.declarePrivateName(\n this.getPrivateNameSV(node.key),\n CLASS_ELEMENT_OTHER,\n node.key.loc.start,\n );\n }\n }\n\n pushClassMethod(\n classBody: N.ClassBody,\n method: N.ClassMethod,\n isGenerator: boolean,\n isAsync: boolean,\n isConstructor: boolean,\n allowsDirectSuper: boolean,\n ): void {\n classBody.body.push(\n this.parseMethod(\n method,\n isGenerator,\n isAsync,\n isConstructor,\n allowsDirectSuper,\n \"ClassMethod\",\n true,\n ),\n );\n }\n\n pushClassPrivateMethod(\n classBody: N.ClassBody,\n method: N.ClassPrivateMethod,\n isGenerator: boolean,\n isAsync: boolean,\n ): void {\n const node = this.parseMethod(\n method,\n isGenerator,\n isAsync,\n /* isConstructor */ false,\n false,\n \"ClassPrivateMethod\",\n true,\n );\n classBody.body.push(node);\n\n const kind =\n node.kind === \"get\"\n ? node.static\n ? CLASS_ELEMENT_STATIC_GETTER\n : CLASS_ELEMENT_INSTANCE_GETTER\n : node.kind === \"set\"\n ? node.static\n ? CLASS_ELEMENT_STATIC_SETTER\n : CLASS_ELEMENT_INSTANCE_SETTER\n : CLASS_ELEMENT_OTHER;\n this.declareClassPrivateMethodInScope(node, kind);\n }\n\n declareClassPrivateMethodInScope(\n node: N.ClassPrivateMethod | N.EstreeMethodDefinition | N.TSDeclareMethod,\n kind: number,\n ) {\n this.classScope.declarePrivateName(\n this.getPrivateNameSV(node.key),\n kind,\n node.key.loc.start,\n );\n }\n\n // Overridden in typescript.js\n parsePostMemberNameModifiers(\n // eslint-disable-next-line no-unused-vars\n methodOrProp: N.ClassMethod | N.ClassProperty,\n ): void {}\n\n // https://tc39.es/ecma262/#prod-FieldDefinition\n parseClassPrivateProperty(\n node: N.ClassPrivateProperty,\n ): N.ClassPrivateProperty {\n this.parseInitializer(node);\n this.semicolon();\n return this.finishNode(node, \"ClassPrivateProperty\");\n }\n\n // https://tc39.es/ecma262/#prod-FieldDefinition\n parseClassProperty(node: N.ClassProperty): N.ClassProperty {\n this.parseInitializer(node);\n this.semicolon();\n return this.finishNode(node, \"ClassProperty\");\n }\n\n parseClassAccessorProperty(\n node: N.ClassAccessorProperty,\n ): N.ClassAccessorProperty {\n this.parseInitializer(node);\n this.semicolon();\n return this.finishNode(node, \"ClassAccessorProperty\");\n }\n\n // https://tc39.es/ecma262/#prod-Initializer\n parseInitializer(\n node: N.ClassProperty | N.ClassPrivateProperty | N.ClassAccessorProperty,\n ): void {\n this.scope.enter(SCOPE_CLASS | SCOPE_SUPER);\n this.expressionScope.enter(newExpressionScope());\n this.prodParam.enter(PARAM);\n node.value = this.eat(tt.eq) ? this.parseMaybeAssignAllowIn() : null;\n this.expressionScope.exit();\n this.prodParam.exit();\n this.scope.exit();\n }\n\n parseClassId(\n node: N.Class,\n isStatement: boolean,\n optionalId: ?boolean,\n bindingType: BindingTypes = BIND_CLASS,\n ): void {\n if (tokenIsIdentifier(this.state.type)) {\n node.id = this.parseIdentifier();\n if (isStatement) {\n this.checkLVal(node.id, \"class name\", bindingType);\n }\n } else {\n if (optionalId || !isStatement) {\n node.id = null;\n } else {\n throw this.raise(Errors.MissingClassName, { at: this.state.startLoc });\n }\n }\n }\n\n // https://tc39.es/ecma262/#prod-ClassHeritage\n parseClassSuper(node: N.Class): void {\n node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null;\n }\n\n // Parses module export declaration.\n // https://tc39.es/ecma262/#prod-ExportDeclaration\n\n parseExport(node: N.Node): N.AnyExport {\n const hasDefault = this.maybeParseExportDefaultSpecifier(node);\n const parseAfterDefault = !hasDefault || this.eat(tt.comma);\n const hasStar = parseAfterDefault && this.eatExportStar(node);\n const hasNamespace =\n hasStar && this.maybeParseExportNamespaceSpecifier(node);\n const parseAfterNamespace =\n parseAfterDefault && (!hasNamespace || this.eat(tt.comma));\n const isFromRequired = hasDefault || hasStar;\n\n if (hasStar && !hasNamespace) {\n if (hasDefault) this.unexpected();\n this.parseExportFrom(node, true);\n\n return this.finishNode(node, \"ExportAllDeclaration\");\n }\n\n const hasSpecifiers = this.maybeParseExportNamedSpecifiers(node);\n\n if (\n (hasDefault && parseAfterDefault && !hasStar && !hasSpecifiers) ||\n (hasNamespace && parseAfterNamespace && !hasSpecifiers)\n ) {\n throw this.unexpected(null, tt.braceL);\n }\n\n let hasDeclaration;\n if (isFromRequired || hasSpecifiers) {\n hasDeclaration = false;\n this.parseExportFrom(node, isFromRequired);\n } else {\n hasDeclaration = this.maybeParseExportDeclaration(node);\n }\n\n if (isFromRequired || hasSpecifiers || hasDeclaration) {\n this.checkExport(node, true, false, !!node.source);\n return this.finishNode(node, \"ExportNamedDeclaration\");\n }\n\n if (this.eat(tt._default)) {\n // export default ...\n node.declaration = this.parseExportDefaultExpression();\n this.checkExport(node, true, true);\n\n return this.finishNode(node, \"ExportDefaultDeclaration\");\n }\n\n throw this.unexpected(null, tt.braceL);\n }\n\n // eslint-disable-next-line no-unused-vars\n eatExportStar(node: N.Node): boolean {\n return this.eat(tt.star);\n }\n\n maybeParseExportDefaultSpecifier(node: N.Node): boolean {\n if (this.isExportDefaultSpecifier()) {\n // export defaultObj ...\n this.expectPlugin(\"exportDefaultFrom\");\n const specifier = this.startNode();\n specifier.exported = this.parseIdentifier(true);\n node.specifiers = [this.finishNode(specifier, \"ExportDefaultSpecifier\")];\n return true;\n }\n return false;\n }\n\n maybeParseExportNamespaceSpecifier(node: N.Node): boolean {\n if (this.isContextual(tt._as)) {\n if (!node.specifiers) node.specifiers = [];\n\n const specifier = this.startNodeAt(\n this.state.lastTokStart,\n this.state.lastTokStartLoc,\n );\n\n this.next();\n\n specifier.exported = this.parseModuleExportName();\n node.specifiers.push(\n this.finishNode(specifier, \"ExportNamespaceSpecifier\"),\n );\n return true;\n }\n return false;\n }\n\n maybeParseExportNamedSpecifiers(node: N.Node): boolean {\n if (this.match(tt.braceL)) {\n if (!node.specifiers) node.specifiers = [];\n const isTypeExport = node.exportKind === \"type\";\n node.specifiers.push(...this.parseExportSpecifiers(isTypeExport));\n\n node.source = null;\n node.declaration = null;\n if (this.hasPlugin(\"importAssertions\")) {\n node.assertions = [];\n }\n\n return true;\n }\n return false;\n }\n\n maybeParseExportDeclaration(node: N.Node): boolean {\n if (this.shouldParseExportDeclaration()) {\n node.specifiers = [];\n node.source = null;\n if (this.hasPlugin(\"importAssertions\")) {\n node.assertions = [];\n }\n node.declaration = this.parseExportDeclaration(node);\n return true;\n }\n return false;\n }\n\n isAsyncFunction(): boolean {\n if (!this.isContextual(tt._async)) return false;\n const next = this.nextTokenStart();\n return (\n !lineBreak.test(this.input.slice(this.state.pos, next)) &&\n this.isUnparsedContextual(next, \"function\")\n );\n }\n\n parseExportDefaultExpression(): N.Expression | N.Declaration {\n const expr = this.startNode();\n\n const isAsync = this.isAsyncFunction();\n\n if (this.match(tt._function) || isAsync) {\n this.next();\n if (isAsync) {\n this.next();\n }\n\n return this.parseFunction(\n expr,\n FUNC_STATEMENT | FUNC_NULLABLE_ID,\n isAsync,\n );\n }\n\n if (this.match(tt._class)) {\n return this.parseClass(expr, true, true);\n }\n\n if (this.match(tt.at)) {\n if (\n this.hasPlugin(\"decorators\") &&\n this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")\n ) {\n this.raise(Errors.DecoratorBeforeExport, { at: this.state.startLoc });\n }\n this.parseDecorators(false);\n return this.parseClass(expr, true, true);\n }\n\n if (this.match(tt._const) || this.match(tt._var) || this.isLet()) {\n throw this.raise(Errors.UnsupportedDefaultExport, {\n at: this.state.startLoc,\n });\n }\n\n const res = this.parseMaybeAssignAllowIn();\n this.semicolon();\n return res;\n }\n\n // eslint-disable-next-line no-unused-vars\n parseExportDeclaration(node: N.ExportNamedDeclaration): ?N.Declaration {\n return this.parseStatement(null);\n }\n\n isExportDefaultSpecifier(): boolean {\n const { type } = this.state;\n if (tokenIsIdentifier(type)) {\n if ((type === tt._async && !this.state.containsEsc) || type === tt._let) {\n return false;\n }\n if (\n (type === tt._type || type === tt._interface) &&\n !this.state.containsEsc\n ) {\n const { type: nextType } = this.lookahead();\n // If we see any variable name other than `from` after `type` keyword,\n // we consider it as flow/typescript type exports\n // note that this approach may fail on some pedantic cases\n // export type from = number\n if (\n (tokenIsIdentifier(nextType) && nextType !== tt._from) ||\n nextType === tt.braceL\n ) {\n this.expectOnePlugin([\"flow\", \"typescript\"]);\n return false;\n }\n }\n } else if (!this.match(tt._default)) {\n return false;\n }\n\n const next = this.nextTokenStart();\n const hasFrom = this.isUnparsedContextual(next, \"from\");\n if (\n this.input.charCodeAt(next) === charCodes.comma ||\n (tokenIsIdentifier(this.state.type) && hasFrom)\n ) {\n return true;\n }\n // lookahead again when `export default from` is seen\n if (this.match(tt._default) && hasFrom) {\n const nextAfterFrom = this.input.charCodeAt(\n this.nextTokenStartSince(next + 4),\n );\n return (\n nextAfterFrom === charCodes.quotationMark ||\n nextAfterFrom === charCodes.apostrophe\n );\n }\n return false;\n }\n\n parseExportFrom(node: N.ExportNamedDeclaration, expect?: boolean): void {\n if (this.eatContextual(tt._from)) {\n node.source = this.parseImportSource();\n this.checkExport(node);\n const assertions = this.maybeParseImportAssertions();\n if (assertions) {\n node.assertions = assertions;\n }\n } else if (expect) {\n this.unexpected();\n }\n\n this.semicolon();\n }\n\n shouldParseExportDeclaration(): boolean {\n const { type } = this.state;\n if (type === tt.at) {\n this.expectOnePlugin([\"decorators\", \"decorators-legacy\"]);\n if (this.hasPlugin(\"decorators\")) {\n if (this.getPluginOption(\"decorators\", \"decoratorsBeforeExport\")) {\n throw this.raise(Errors.DecoratorBeforeExport, {\n at: this.state.startLoc,\n });\n }\n\n return true;\n }\n }\n\n return (\n type === tt._var ||\n type === tt._const ||\n type === tt._function ||\n type === tt._class ||\n this.isLet() ||\n this.isAsyncFunction()\n );\n }\n\n checkExport(\n node: N.ExportNamedDeclaration,\n checkNames?: boolean,\n isDefault?: boolean,\n isFrom?: boolean,\n ): void {\n if (checkNames) {\n // Check for duplicate exports\n if (isDefault) {\n // Default exports\n this.checkDuplicateExports(node, \"default\");\n if (this.hasPlugin(\"exportDefaultFrom\")) {\n const declaration = ((node: any): N.ExportDefaultDeclaration)\n .declaration;\n if (\n declaration.type === \"Identifier\" &&\n declaration.name === \"from\" &&\n declaration.end - declaration.start === 4 && // does not contain escape\n !declaration.extra?.parenthesized\n ) {\n this.raise(Errors.ExportDefaultFromAsIdentifier, {\n node: declaration,\n });\n }\n }\n } else if (node.specifiers && node.specifiers.length) {\n // Named exports\n for (const specifier of node.specifiers) {\n const { exported } = specifier;\n const exportedName =\n exported.type === \"Identifier\" ? exported.name : exported.value;\n this.checkDuplicateExports(specifier, exportedName);\n // $FlowIgnore\n if (!isFrom && specifier.local) {\n const { local } = specifier;\n if (local.type !== \"Identifier\") {\n this.raise(\n Errors.ExportBindingIsString,\n { node: specifier },\n local.value,\n exportedName,\n );\n } else {\n // check for keywords used as local names\n this.checkReservedWord(local.name, local.loc.start, true, false);\n // check if export is defined\n this.scope.checkLocalExport(local);\n }\n }\n }\n } else if (node.declaration) {\n // Exported declarations\n if (\n node.declaration.type === \"FunctionDeclaration\" ||\n node.declaration.type === \"ClassDeclaration\"\n ) {\n const id = node.declaration.id;\n if (!id) throw new Error(\"Assertion failure\");\n\n this.checkDuplicateExports(node, id.name);\n } else if (node.declaration.type === \"VariableDeclaration\") {\n for (const declaration of node.declaration.declarations) {\n this.checkDeclaration(declaration.id);\n }\n }\n }\n }\n\n const currentContextDecorators =\n this.state.decoratorStack[this.state.decoratorStack.length - 1];\n // If node.declaration is a class, it will take all decorators in the current context.\n // Thus we should throw if we see non-empty decorators here.\n if (currentContextDecorators.length) {\n throw this.raise(Errors.UnsupportedDecoratorExport, { node });\n }\n }\n\n checkDeclaration(node: N.Pattern | N.ObjectProperty): void {\n if (node.type === \"Identifier\") {\n this.checkDuplicateExports(node, node.name);\n } else if (node.type === \"ObjectPattern\") {\n for (const prop of node.properties) {\n this.checkDeclaration(prop);\n }\n } else if (node.type === \"ArrayPattern\") {\n for (const elem of node.elements) {\n if (elem) {\n this.checkDeclaration(elem);\n }\n }\n } else if (node.type === \"ObjectProperty\") {\n this.checkDeclaration(node.value);\n } else if (node.type === \"RestElement\") {\n this.checkDeclaration(node.argument);\n } else if (node.type === \"AssignmentPattern\") {\n this.checkDeclaration(node.left);\n }\n }\n\n checkDuplicateExports(\n node:\n | N.Identifier\n | N.StringLiteral\n | N.ExportNamedDeclaration\n | N.ExportSpecifier\n | N.ExportDefaultSpecifier,\n name: string,\n ): void {\n if (this.exportedIdentifiers.has(name)) {\n this.raise(\n name === \"default\"\n ? Errors.DuplicateDefaultExport\n : Errors.DuplicateExport,\n { node },\n name,\n );\n }\n this.exportedIdentifiers.add(name);\n }\n\n // Parses a comma-separated list of module exports.\n\n parseExportSpecifiers(isInTypeExport: boolean): Array<N.ExportSpecifier> {\n const nodes = [];\n let first = true;\n\n // export { x, y as z } [from '...']\n this.expect(tt.braceL);\n\n while (!this.eat(tt.braceR)) {\n if (first) {\n first = false;\n } else {\n this.expect(tt.comma);\n if (this.eat(tt.braceR)) break;\n }\n const isMaybeTypeOnly = this.isContextual(tt._type);\n const isString = this.match(tt.string);\n const node = this.startNode();\n node.local = this.parseModuleExportName();\n nodes.push(\n this.parseExportSpecifier(\n node,\n isString,\n isInTypeExport,\n isMaybeTypeOnly,\n ),\n );\n }\n\n return nodes;\n }\n\n parseExportSpecifier(\n node: any,\n isString: boolean,\n /* eslint-disable no-unused-vars -- used in TypeScript parser */\n isInTypeExport: boolean,\n isMaybeTypeOnly: boolean,\n /* eslint-enable no-unused-vars */\n ): N.ExportSpecifier {\n if (this.eatContextual(tt._as)) {\n node.exported = this.parseModuleExportName();\n } else if (isString) {\n node.exported = cloneStringLiteral(node.local);\n } else if (!node.exported) {\n node.exported = cloneIdentifier(node.local);\n }\n return this.finishNode<N.ExportSpecifier>(node, \"ExportSpecifier\");\n }\n\n // https://tc39.es/ecma262/#prod-ModuleExportName\n parseModuleExportName(): N.StringLiteral | N.Identifier {\n if (this.match(tt.string)) {\n const result = this.parseStringLiteral(this.state.value);\n const surrogate = result.value.match(loneSurrogate);\n if (surrogate) {\n this.raise(\n Errors.ModuleExportNameHasLoneSurrogate,\n { node: result },\n surrogate[0].charCodeAt(0).toString(16),\n );\n }\n return result;\n }\n return this.parseIdentifier(true);\n }\n\n // Parses import declaration.\n // https://tc39.es/ecma262/#prod-ImportDeclaration\n\n parseImport(node: N.Node): N.AnyImport {\n // import '...'\n node.specifiers = [];\n if (!this.match(tt.string)) {\n // check if we have a default import like\n // import React from \"react\";\n const hasDefault = this.maybeParseDefaultImportSpecifier(node);\n /* we are checking if we do not have a default import, then it is obvious that we need named imports\n * import { get } from \"axios\";\n * but if we do have a default import\n * we need to check if we have a comma after that and\n * that is where this `|| this.eat` condition comes into play\n */\n const parseNext = !hasDefault || this.eat(tt.comma);\n // if we do have to parse the next set of specifiers, we first check for star imports\n // import React, * from \"react\";\n const hasStar = parseNext && this.maybeParseStarImportSpecifier(node);\n // now we check if we need to parse the next imports\n // but only if they are not importing * (everything)\n if (parseNext && !hasStar) this.parseNamedImportSpecifiers(node);\n this.expectContextual(tt._from);\n }\n node.source = this.parseImportSource();\n // https://github.com/tc39/proposal-import-assertions\n // parse module import assertions if the next token is `assert` or ignore\n // and finish the ImportDeclaration node.\n const assertions = this.maybeParseImportAssertions();\n if (assertions) {\n node.assertions = assertions;\n } else if (!process.env.BABEL_8_BREAKING) {\n const attributes = this.maybeParseModuleAttributes();\n if (attributes) {\n node.attributes = attributes;\n }\n }\n\n this.semicolon();\n return this.finishNode(node, \"ImportDeclaration\");\n }\n\n parseImportSource(): N.StringLiteral {\n if (!this.match(tt.string)) this.unexpected();\n return this.parseExprAtom();\n }\n\n // eslint-disable-next-line no-unused-vars\n shouldParseDefaultImport(node: N.ImportDeclaration): boolean {\n return tokenIsIdentifier(this.state.type);\n }\n\n parseImportSpecifierLocal(\n node: N.ImportDeclaration,\n specifier: N.Node,\n type: string,\n contextDescription: string,\n ): void {\n specifier.local = this.parseIdentifier();\n this.checkLVal(specifier.local, contextDescription, BIND_LEXICAL);\n node.specifiers.push(this.finishNode(specifier, type));\n }\n\n /**\n * parse assert entries\n *\n * @see {@link https://tc39.es/proposal-import-assertions/#prod-AssertEntries |AssertEntries}\n * @returns {N.ImportAttribute[]}\n * @memberof StatementParser\n */\n parseAssertEntries(): N.ImportAttribute[] {\n const attrs = [];\n const attrNames = new Set();\n\n do {\n if (this.match(tt.braceR)) {\n break;\n }\n\n const node = this.startNode<N.ImportAttribute>();\n\n // parse AssertionKey : IdentifierName, StringLiteral\n const keyName = this.state.value;\n // check if we already have an entry for an attribute\n // if a duplicate entry is found, throw an error\n // for now this logic will come into play only when someone declares `type` twice\n if (attrNames.has(keyName)) {\n this.raise(\n Errors.ModuleAttributesWithDuplicateKeys,\n { at: this.state.startLoc },\n keyName,\n );\n }\n attrNames.add(keyName);\n if (this.match(tt.string)) {\n node.key = this.parseStringLiteral(keyName);\n } else {\n node.key = this.parseIdentifier(true);\n }\n this.expect(tt.colon);\n\n if (!this.match(tt.string)) {\n throw this.raise(Errors.ModuleAttributeInvalidValue, {\n at: this.state.startLoc,\n });\n }\n node.value = this.parseStringLiteral(this.state.value);\n this.finishNode<N.ImportAttribute>(node, \"ImportAttribute\");\n attrs.push(node);\n } while (this.eat(tt.comma));\n\n return attrs;\n }\n\n /**\n * parse module attributes\n * @deprecated It will be removed in Babel 8\n * @returns\n * @memberof StatementParser\n */\n maybeParseModuleAttributes() {\n if (this.match(tt._with) && !this.hasPrecedingLineBreak()) {\n this.expectPlugin(\"moduleAttributes\");\n this.next();\n } else {\n if (this.hasPlugin(\"moduleAttributes\")) return [];\n return null;\n }\n const attrs = [];\n const attributes = new Set();\n do {\n const node = this.startNode();\n node.key = this.parseIdentifier(true);\n\n if (node.key.name !== \"type\") {\n this.raise(\n Errors.ModuleAttributeDifferentFromType,\n { node: node.key },\n node.key.name,\n );\n }\n\n if (attributes.has(node.key.name)) {\n this.raise(\n Errors.ModuleAttributesWithDuplicateKeys,\n { node: node.key },\n node.key.name,\n );\n }\n attributes.add(node.key.name);\n this.expect(tt.colon);\n if (!this.match(tt.string)) {\n throw this.raise(Errors.ModuleAttributeInvalidValue, {\n at: this.state.startLoc,\n });\n }\n node.value = this.parseStringLiteral(this.state.value);\n this.finishNode(node, \"ImportAttribute\");\n attrs.push(node);\n } while (this.eat(tt.comma));\n\n return attrs;\n }\n\n maybeParseImportAssertions() {\n // [no LineTerminator here] AssertClause\n if (this.isContextual(tt._assert) && !this.hasPrecedingLineBreak()) {\n this.expectPlugin(\"importAssertions\");\n this.next(); // eat `assert`\n } else {\n if (this.hasPlugin(\"importAssertions\")) return [];\n return null;\n }\n // https://tc39.es/proposal-import-assertions/#prod-AssertClause\n this.eat(tt.braceL);\n const attrs = this.parseAssertEntries();\n this.eat(tt.braceR);\n\n return attrs;\n }\n\n maybeParseDefaultImportSpecifier(node: N.ImportDeclaration): boolean {\n if (this.shouldParseDefaultImport(node)) {\n // import defaultObj, { x, y as z } from '...'\n this.parseImportSpecifierLocal(\n node,\n this.startNode(),\n \"ImportDefaultSpecifier\",\n \"default import specifier\",\n );\n return true;\n }\n return false;\n }\n\n maybeParseStarImportSpecifier(node: N.ImportDeclaration): boolean {\n if (this.match(tt.star)) {\n const specifier = this.startNode();\n this.next();\n this.expectContextual(tt._as);\n\n this.parseImportSpecifierLocal(\n node,\n specifier,\n \"ImportNamespaceSpecifier\",\n \"import namespace specifier\",\n );\n return true;\n }\n return false;\n }\n\n parseNamedImportSpecifiers(node: N.ImportDeclaration) {\n let first = true;\n this.expect(tt.braceL);\n while (!this.eat(tt.braceR)) {\n if (first) {\n first = false;\n } else {\n // Detect an attempt to deep destructure\n if (this.eat(tt.colon)) {\n throw this.raise(Errors.DestructureNamedImport, {\n at: this.state.startLoc,\n });\n }\n\n this.expect(tt.comma);\n if (this.eat(tt.braceR)) break;\n }\n\n const specifier = this.startNode();\n const importedIsString = this.match(tt.string);\n const isMaybeTypeOnly = this.isContextual(tt._type);\n specifier.imported = this.parseModuleExportName();\n const importSpecifier = this.parseImportSpecifier(\n specifier,\n importedIsString,\n node.importKind === \"type\" || node.importKind === \"typeof\",\n isMaybeTypeOnly,\n );\n node.specifiers.push(importSpecifier);\n }\n }\n\n // https://tc39.es/ecma262/#prod-ImportSpecifier\n parseImportSpecifier(\n specifier: any,\n importedIsString: boolean,\n /* eslint-disable no-unused-vars -- used in TypeScript and Flow parser */\n isInTypeOnlyImport: boolean,\n isMaybeTypeOnly: boolean,\n /* eslint-enable no-unused-vars */\n ): N.ImportSpecifier {\n if (this.eatContextual(tt._as)) {\n specifier.local = this.parseIdentifier();\n } else {\n const { imported } = specifier;\n if (importedIsString) {\n throw this.raise(\n Errors.ImportBindingIsString,\n { node: specifier },\n imported.value,\n );\n }\n this.checkReservedWord(imported.name, specifier.loc.start, true, true);\n if (!specifier.local) {\n specifier.local = cloneIdentifier(imported);\n }\n }\n this.checkLVal(specifier.local, \"import specifier\", BIND_LEXICAL);\n return this.finishNode(specifier, \"ImportSpecifier\");\n }\n\n // This is used in flow and typescript plugin\n // Determine whether a parameter is a this param\n isThisParam(\n param: N.Pattern | N.Identifier | N.TSParameterProperty,\n ): boolean {\n return param.type === \"Identifier\" && param.name === \"this\";\n }\n}\n","// @flow\n\nimport type { Options } from \"../options\";\nimport type { File /*::, JSXOpeningElement */ } from \"../types\";\nimport type { PluginList } from \"../plugin-utils\";\nimport { getOptions } from \"../options\";\nimport StatementParser from \"./statement\";\nimport ScopeHandler from \"../util/scope\";\n\nexport type PluginsMap = Map<string, { [string]: any }>;\n\nexport default class Parser extends StatementParser {\n // Forward-declaration so typescript plugin can override jsx plugin\n /*::\n +jsxParseOpeningElementAfterName: (\n node: JSXOpeningElement,\n ) => JSXOpeningElement;\n */\n\n constructor(options: ?Options, input: string) {\n options = getOptions(options);\n super(options, input);\n\n this.options = options;\n this.initializeScopes();\n this.plugins = pluginsMap(this.options.plugins);\n this.filename = options.sourceFilename;\n }\n\n // This can be overwritten, for example, by the TypeScript plugin.\n getScopeHandler(): Class<ScopeHandler<*>> {\n return ScopeHandler;\n }\n\n parse(): File {\n this.enterInitialScopes();\n const file = this.startNode();\n const program = this.startNode();\n this.nextToken();\n file.errors = null;\n this.parseTopLevel(file, program);\n file.errors = this.state.errors;\n return file;\n }\n}\n\nfunction pluginsMap(plugins: PluginList): PluginsMap {\n const pluginMap: PluginsMap = new Map();\n for (const plugin of plugins) {\n const [name, options] = Array.isArray(plugin) ? plugin : [plugin, {}];\n if (!pluginMap.has(name)) pluginMap.set(name, options || {});\n }\n return pluginMap;\n}\n","// @flow\n\nimport { type Options } from \"./options\";\nimport {\n hasPlugin,\n validatePlugins,\n mixinPluginNames,\n mixinPlugins,\n type PluginList,\n} from \"./plugin-utils\";\nimport Parser from \"./parser\";\n\nimport { getExportedToken, tt as internalTokenTypes } from \"./tokenizer/types\";\nimport \"./tokenizer/context\";\n\nimport type { Expression, File } from \"./types\";\n\nexport function parse(input: string, options?: Options): File {\n if (options?.sourceType === \"unambiguous\") {\n options = {\n ...options,\n };\n try {\n options.sourceType = \"module\";\n const parser = getParser(options, input);\n const ast = parser.parse();\n\n if (parser.sawUnambiguousESM) {\n return ast;\n }\n\n if (parser.ambiguousScriptDifferentAst) {\n // Top level await introduces code which can be both a valid script and\n // a valid module, but which produces different ASTs:\n // await\n // 0\n // can be parsed either as an AwaitExpression, or as two ExpressionStatements.\n try {\n options.sourceType = \"script\";\n return getParser(options, input).parse();\n } catch {}\n } else {\n // This is both a valid module and a valid script, but\n // we parse it as a script by default\n ast.program.sourceType = \"script\";\n }\n\n return ast;\n } catch (moduleError) {\n try {\n options.sourceType = \"script\";\n return getParser(options, input).parse();\n } catch {}\n\n throw moduleError;\n }\n } else {\n return getParser(options, input).parse();\n }\n}\n\nexport function parseExpression(input: string, options?: Options): Expression {\n const parser = getParser(options, input);\n if (parser.options.strictMode) {\n parser.state.strict = true;\n }\n return parser.getExpression();\n}\n\nfunction generateExportedTokenTypes(internalTokenTypes) {\n const tokenTypes = {};\n for (const typeName of Object.keys(internalTokenTypes)) {\n tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]);\n }\n return tokenTypes;\n}\n\nexport const tokTypes = generateExportedTokenTypes(internalTokenTypes);\n\nfunction getParser(options: ?Options, input: string): Parser {\n let cls = Parser;\n if (options?.plugins) {\n validatePlugins(options.plugins);\n cls = getParserClass(options.plugins);\n }\n\n return new cls(options, input);\n}\n\nconst parserClassCache: { [key: string]: Class<Parser> } = {};\n\n/** Get a Parser class with plugins applied. */\nfunction getParserClass(pluginsFromOptions: PluginList): Class<Parser> {\n const pluginList = mixinPluginNames.filter(name =>\n hasPlugin(pluginsFromOptions, name),\n );\n\n const key = pluginList.join(\"/\");\n let cls = parserClassCache[key];\n if (!cls) {\n cls = Parser;\n for (const plugin of pluginList) {\n cls = mixinPlugins[plugin](cls);\n }\n parserClassCache[key] = cls;\n }\n return cls;\n}\n"],"names":["BaseParser","sawUnambiguousESM","ambiguousScriptDifferentAst","hasPlugin","pluginConfig","plugins","has","pluginName","pluginOptions","actualOptions","get","key","Object","keys","getPluginOption","plugin","name","setTrailingComments","node","comments","trailingComments","undefined","unshift","setLeadingComments","leadingComments","setInnerComments","innerComments","adjustInnerComments","elements","commentWS","lastElement","i","length","start","CommentsParser","addComment","comment","filename","loc","state","push","processComment","commentStack","commentStackLength","lastCommentWS","end","leadingNode","nodeStart","commentEnd","containingNode","finalizeComment","splice","trailingNode","commentStart","input","charCodeAt","type","properties","arguments","params","specifiers","finalizeRemainingComments","resetPreviousNodeTrailingComments","takeSurroundingComments","ErrorCodes","freeze","SyntaxError","SourceTypeModuleError","ErrorMessages","makeErrorTemplates","AccessorIsGenerator","ArgumentsInClass","AsyncFunctionInSingleStatementContext","AwaitBindingIdentifier","AwaitBindingIdentifierInStaticBlock","AwaitExpressionFormalParameter","AwaitNotInAsyncContext","AwaitNotInAsyncFunction","BadGetterArity","BadSetterArity","BadSetterRestParameter","ConstructorClassField","ConstructorClassPrivateField","ConstructorIsAccessor","ConstructorIsAsync","ConstructorIsGenerator","DeclarationMissingInitializer","DecoratorBeforeExport","DecoratorConstructor","DecoratorExportClass","DecoratorSemicolon","DecoratorStaticBlock","DeletePrivateField","DestructureNamedImport","DuplicateConstructor","DuplicateDefaultExport","DuplicateExport","DuplicateProto","DuplicateRegExpFlags","ElementAfterRest","EscapedCharNotAnIdentifier","ExportBindingIsString","ExportDefaultFromAsIdentifier","ForInOfLoopInitializer","ForOfAsync","ForOfLet","GeneratorInSingleStatementContext","IllegalBreakContinue","IllegalLanguageModeDirective","IllegalReturn","ImportBindingIsString","ImportCallArgumentTrailingComma","ImportCallArity","ImportCallNotNewExpression","ImportCallSpreadArgument","IncompatibleRegExpUVFlags","InvalidBigIntLiteral","InvalidCodePoint","InvalidCoverInitializedName","InvalidDecimal","InvalidDigit","InvalidEscapeSequence","InvalidEscapeSequenceTemplate","InvalidEscapedReservedWord","InvalidIdentifier","InvalidLhs","InvalidLhsBinding","InvalidNumber","InvalidOrMissingExponent","InvalidOrUnexpectedToken","InvalidParenthesizedAssignment","InvalidPrivateFieldResolution","InvalidPropertyBindingPattern","InvalidRecordProperty","InvalidRestAssignmentPattern","LabelRedeclaration","LetInLexicalBinding","LineTerminatorBeforeArrow","MalformedRegExpFlags","MissingClassName","MissingEqInAssignment","MissingSemicolon","MissingUnicodeEscape","MixingCoalesceWithLogical","ModuleAttributeDifferentFromType","ModuleAttributeInvalidValue","ModuleAttributesWithDuplicateKeys","ModuleExportNameHasLoneSurrogate","ModuleExportUndefined","MultipleDefaultsInSwitch","NewlineAfterThrow","NoCatchOrFinally","NumberIdentifier","NumericSeparatorInEscapeSequence","ObsoleteAwaitStar","OptionalChainingNoNew","OptionalChainingNoTemplate","OverrideOnConstructor","ParamDupe","PatternHasAccessor","PatternHasMethod","PipeBodyIsTighter","PipeTopicRequiresHackPipes","PipeTopicUnbound","PipeTopicUnconfiguredToken","PipeTopicUnused","PipeUnparenthesizedBody","PipelineBodyNoArrow","PipelineBodySequenceExpression","PipelineHeadSequenceExpression","PipelineTopicUnused","PrimaryTopicNotAllowed","PrimaryTopicRequiresSmartPipeline","PrivateInExpectedIn","PrivateNameRedeclaration","RecordExpressionBarIncorrectEndSyntaxType","RecordExpressionBarIncorrectStartSyntaxType","RecordExpressionHashIncorrectStartSyntaxType","RecordNoProto","RestTrailingComma","SloppyFunction","StaticPrototype","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","StrictNumericEscape","StrictOctalLiteral","StrictWith","SuperNotAllowed","SuperPrivateField","TrailingDecorator","TupleExpressionBarIncorrectEndSyntaxType","TupleExpressionBarIncorrectStartSyntaxType","TupleExpressionHashIncorrectStartSyntaxType","UnexpectedArgumentPlaceholder","UnexpectedAwaitAfterPipelineBody","UnexpectedDigitAfterHash","UnexpectedImportExport","UnexpectedKeyword","UnexpectedLeadingDecorator","UnexpectedLexicalDeclaration","UnexpectedNewTarget","UnexpectedNumericSeparator","UnexpectedPrivateField","UnexpectedReservedWord","UnexpectedSuper","UnexpectedToken","UnexpectedTokenUnaryExponentiation","UnsupportedBind","UnsupportedDecoratorExport","UnsupportedDefaultExport","UnsupportedImport","UnsupportedMetaProperty","UnsupportedParameterDecorator","UnsupportedPropertyDecorator","UnsupportedSuper","UnterminatedComment","UnterminatedRegExp","UnterminatedString","UnterminatedTemplate","VarRedeclaration","YieldBindingIdentifier","YieldInParameter","ZeroDigitNumericSeparator","SourceTypeModuleErrorMessages","ImportMetaOutsideModule","ImportOutsideModule","keepReasonCodeCompat","reasonCode","syntaxPlugin","messages","code","templates","forEach","template","ParserError","raise","origin","raiseWithData","at","raiseOverwrite","pos","index","message","replace","_","line","column","options","errorRecovery","errors","error","assign","_raise","data","errorTemplate","errorContext","err","isLookahead","defineProperty","toUnenumerable","object","enumerable","value","toESTreeLocation","superClass","parse","file","tokens","map","parseRegExpLiteral","pattern","flags","regex","RegExp","e","estreeParseLiteral","parseBigIntLiteral","bigInt","BigInt","bigint","String","parseDecimalLiteral","decimal","parseLiteral","parseStringLiteral","parseNumericLiteral","parseNullLiteral","parseBooleanLiteral","directiveToStmt","directive","directiveLiteral","stmt","startNodeAt","expression","extra","expressionValue","raw","finishNodeAt","slice","initFunction","isAsync","checkDeclaration","isObjectProperty","getObjectOrClassMethodParams","method","isValidDirective","parenthesized","parseBlockBody","args","directiveStatements","directives","d","body","concat","pushClassMethod","classBody","isGenerator","isConstructor","allowsDirectSuper","parseMethod","typeParameters","parsePrivateName","convertPrivateNameToPrivateIdentifier","getPrivateNameSV","id","isPrivateName","parseFunctionBody","allowExpression","isMethod","allowDirectSuper","inClassScope","funcNode","startNode","kind","computed","finishNode","parseClassProperty","propertyNode","parseClassPrivateProperty","parseObjectMethod","prop","isPattern","isAccessor","shorthand","parseObjectProperty","startPos","startLoc","refExpressionErrors","isAssignable","isBinding","toAssignable","isLHS","classScope","usePrivateName","toAssignableObjectExpressionProp","Errors","finishCallExpression","optional","callee","source","attributes","toReferencedArguments","parseExport","exported","parseSubscript","base","noCalls","optionalChainMember","substring","stop","chain","startNodeAtNode","hasPropertyAsPrivateName","isOptionalChain","isObjectMethod","endLoc","resetEndLocation","lastTokEndLoc","TokContext","constructor","token","preserveSpace","types","brace","j_oTag","j_cTag","j_expr","beforeExpr","startsExpr","isLoop","isAssign","prefix","postfix","ExportedTokenType","label","conf","keyword","rightAssociative","binop","updateContext","keywords","Map","createKeyword","createToken","set","createBinop","tokenTypeCounter","tokenTypes","tokenLabels","tokenBinops","tokenBeforeExprs","tokenStartsExprs","tokenPrefixes","createKeywordLike","tt","bracketL","bracketHashL","bracketBarL","bracketR","bracketBarR","braceL","braceBarL","braceHashL","braceR","braceBarR","parenL","parenR","comma","semi","colon","doubleColon","dot","question","questionDot","arrow","ellipsis","backQuote","dollarBraceL","templateTail","templateNonTail","hash","interpreterDirective","eq","slashAssign","xorAssign","moduloAssign","incDec","bang","tilde","doubleCaret","doubleAt","pipeline","nullishCoalescing","logicalOR","logicalAND","bitwiseOR","bitwiseXOR","bitwiseAND","equality","lt","gt","relational","bitShift","bitShiftL","bitShiftR","plusMin","modulo","star","slash","exponent","_in","_instanceof","_break","_case","_catch","_continue","_debugger","_default","_else","_finally","_function","_if","_return","_switch","_throw","_try","_var","_const","_with","_new","_this","_super","_class","_extends","_export","_import","_null","_true","_false","_typeof","_void","_delete","_do","_for","_while","_as","_assert","_async","_await","_from","_get","_let","_meta","_of","_sent","_set","_static","_yield","_asserts","_checks","_exports","_global","_implements","_intrinsic","_infer","_is","_mixins","_proto","_require","_keyof","_readonly","_unique","_abstract","_declare","_enum","_module","_namespace","_interface","_type","_opaque","string","num","regexp","privateName","eof","jsxName","jsxText","jsxTagStart","jsxTagEnd","placeholder","tokenIsIdentifier","tokenKeywordOrIdentifierIsKeyword","tokenIsKeywordOrIdentifier","tokenIsLiteralPropertyName","tokenComesBeforeExpression","tokenCanStartExpression","tokenIsAssignment","tokenIsFlowInterfaceOrTypeOrOpaque","tokenIsLoop","tokenIsKeyword","tokenIsOperator","tokenIsPostfix","tokenIsPrefix","tokenIsTSTypeOperator","tokenIsTSDeclarationStart","tokenLabelName","tokenOperatorPrecedence","tokenIsRightAssociative","tokenIsTemplate","getExportedToken","context","pop","tc","Position","col","SourceLocation","identifierName","createPositionWithColumnOffset","position","columnOffset","nonASCIIidentifierStartChars","nonASCIIidentifierChars","nonASCIIidentifierStart","nonASCIIidentifier","astralIdentifierStartCodes","astralIdentifierCodes","isInAstralSet","isIdentifierStart","test","fromCharCode","isIdentifierChar","reservedWords","strict","strictBind","Set","reservedWordsStrictSet","reservedWordsStrictBindSet","isReservedWord","word","inModule","isStrictReservedWord","isStrictBindOnlyReservedWord","isStrictBindReservedWord","isKeyword","isIteratorStart","current","next","next2","reservedWordLikeSet","canBeReservedWord","SCOPE_OTHER","SCOPE_PROGRAM","SCOPE_FUNCTION","SCOPE_ARROW","SCOPE_SIMPLE_CATCH","SCOPE_SUPER","SCOPE_DIRECT_SUPER","SCOPE_CLASS","SCOPE_STATIC_BLOCK","SCOPE_TS_MODULE","SCOPE_VAR","BIND_KIND_VALUE","BIND_KIND_TYPE","BIND_SCOPE_VAR","BIND_SCOPE_LEXICAL","BIND_SCOPE_FUNCTION","BIND_FLAGS_NONE","BIND_FLAGS_CLASS","BIND_FLAGS_TS_ENUM","BIND_FLAGS_TS_CONST_ENUM","BIND_FLAGS_TS_EXPORT_ONLY","BIND_FLAGS_FLOW_DECLARE_FN","BIND_CLASS","BIND_LEXICAL","BIND_VAR","BIND_FUNCTION","BIND_TS_INTERFACE","BIND_TS_TYPE","BIND_TS_ENUM","BIND_TS_AMBIENT","BIND_NONE","BIND_OUTSIDE","BIND_TS_CONST_ENUM","BIND_TS_NAMESPACE","BIND_FLOW_DECLARE_FN","CLASS_ELEMENT_FLAG_STATIC","CLASS_ELEMENT_KIND_GETTER","CLASS_ELEMENT_KIND_SETTER","CLASS_ELEMENT_KIND_ACCESSOR","CLASS_ELEMENT_STATIC_GETTER","CLASS_ELEMENT_STATIC_SETTER","CLASS_ELEMENT_INSTANCE_GETTER","CLASS_ELEMENT_INSTANCE_SETTER","CLASS_ELEMENT_OTHER","Scope","var","lexical","functions","ScopeHandler","scopeStack","undefinedExports","inFunction","currentVarScopeFlags","allowSuper","currentThisScopeFlags","inClass","inClassAndNotInNonArrowFunction","inStaticBlock","inNonArrowFunction","treatFunctionsAsVar","treatFunctionsAsVarInScope","currentScope","createScope","enter","exit","scope","declareName","bindingType","checkRedeclarationInScope","add","maybeExportDefined","delete","isRedeclaredInScope","values","checkLocalExport","topLevelScope","FlowScope","declareFunctions","FlowScopeHandler","lineBreak","lineBreakG","isNewLine","skipWhiteSpace","skipWhiteSpaceInLine","skipWhiteSpaceToLineBreak","isWhitespace","State","curLine","lineStart","potentialArrowAt","noArrowAt","noArrowParamsConversionAt","maybeInArrowParameters","inType","noAnonFunctionType","hasFlowComment","isAmbientContext","inAbstractClass","topicContext","maxNumOfResolvableTopics","maxTopicIndex","soloAwait","inFSharpPipelineDirectBody","labels","decoratorStack","lastTokStartLoc","lastTokStart","ct","canStartJSXElement","containsEsc","strictErrors","tokensLength","init","strictMode","sourceType","startLine","startColumn","curPosition","clone","skipArrays","val","Array","isArray","isDigit","VALID_REGEX_FLAGS","forbiddenNumericSeparatorSiblings","decBinOct","hex","allowedNumericSeparatorSiblings","bin","oct","dec","Token","Tokenizer","ParserErrors","pushToken","checkKeywordEscapes","nextToken","eat","match","createLookaheadState","curContext","lookahead","old","curr","nextTokenStart","nextTokenStartSince","lastIndex","lookaheadCharCode","codePointAtPos","cp","trail","setStrict","clear","skipSpace","finishToken","getTokenFromCode","skipBlockComment","indexOf","skipLineComment","startSkip","ch","spaceStart","loop","attachComment","CommentWhitespace","prevType","replaceToken","readToken_numberSign","readToken_interpreter","nextPos","expectPlugin","readWord1","finishOp","readToken_dot","readNumber","readToken_slash","readToken_mult_modulo","width","readToken_pipe_amp","readToken_caret","proposal","topicToken","lookaheadCh","codePointAt","unexpected","readToken_atSign","readToken_plus_min","readToken_lt","readToken_gt","size","readToken_eq_excl","readToken_question","readTemplateToken","readRadixNumber","readString","readWord","fromCodePoint","str","readRegexp","escaped","content","mods","char","includes","readInt","radix","len","forceLen","allowNumSeparator","forbiddenSiblings","allowedSiblings","invalid","total","Infinity","prev","Number","isNaN","isBigInt","startsWithDot","isFloat","isDecimal","hasExponent","isOctal","hasLeadingZero","integer","recordStrictModeErrors","underscorePos","parseInt","parseFloat","readCodePoint","throwOnInvalid","readHexChar","quote","out","chunkStart","readEscapedChar","readTemplateContinuation","containsInvalid","inTemplate","codePos","substr","octalStr","octal","codeLoc","n","firstCode","escStart","identifierCheck","esc","keywordTypes","ClassScope","privateNames","loneAccessors","undefinedPrivateNames","ClassScopeHandler","stack","oldClassScope","from","declarePrivateName","elementType","redefined","accessor","oldStatic","newStatic","oldKind","newKind","kExpression","kMaybeArrowParameterDeclaration","kMaybeAsyncArrowParameterDeclaration","kParameterDeclaration","ExpressionScope","canBeArrowParameterDeclaration","isCertainlyParameterDeclaration","ArrowHeadParsingScope","recordDeclarationError","clearDeclarationError","iterateErrors","iterator","ExpressionScopeHandler","recordParameterInitializerError","recordParenthesizedIdentifierError","recordAsyncArrowParametersError","validateAsPattern","newParameterDeclarationScope","newArrowHeadScope","newAsyncArrowScope","newExpressionScope","PARAM","PARAM_YIELD","PARAM_AWAIT","PARAM_RETURN","PARAM_IN","ProductionParameterHandler","stacks","currentFlags","hasAwait","hasYield","hasReturn","hasIn","functionFlags","UtilParser","addExtra","isContextual","isUnparsedContextual","nameStart","nameEnd","nextCh","isLookaheadContextual","eatContextual","expectContextual","canInsertSemicolon","hasPrecedingLineBreak","hasFollowingLineBreak","isLineTerminator","semicolon","allowAsi","expect","assertNoSpace","getPluginNamesFromConfigs","pluginConfigs","c","missingPlugin","JSON","stringify","expectOnePlugin","some","join","tryParse","fn","oldState","abortSignal","failState","thrown","aborted","checkExpressionErrors","andThrow","shorthandAssignLoc","doubleProtoLoc","privateKeyLoc","optionalParametersLoc","hasErrors","isLiteralPropertyName","property","initializeScopes","oldLabels","oldExportedIdentifiers","exportedIdentifiers","oldInModule","oldScope","getScopeHandler","bind","oldProdParam","prodParam","oldExpressionScope","expressionScope","enterInitialScopes","paramFlags","checkDestructuringPrivate","ExpressionErrors","Node","parser","ranges","range","NodePrototype","prototype","__clone","newNode","clonePlaceholder","cloneIdentifier","cloned","create","expectedNode","cloneStringLiteral","NodeUtils","resetStartLocation","resetStartLocationFromNode","locationNode","reservedTypes","FlowErrors","AmbiguousConditionalArrow","AmbiguousDeclareModuleKind","AssignReservedType","DeclareClassElement","DeclareClassFieldInitializer","DuplicateDeclareModuleExports","EnumBooleanMemberNotInitialized","EnumDuplicateMemberName","EnumInconsistentMemberValues","EnumInvalidExplicitType","EnumInvalidExplicitTypeUnknownSupplied","EnumInvalidMemberInitializerPrimaryType","EnumInvalidMemberInitializerSymbolType","EnumInvalidMemberInitializerUnknownType","EnumInvalidMemberName","EnumNumberMemberNotInitialized","EnumStringMemberInconsistentlyInitailized","GetterMayNotHaveThisParam","ImportTypeShorthandOnlyInPureImport","InexactInsideExact","InexactInsideNonObject","InexactVariance","InvalidNonTypeImportInDeclareModule","MissingTypeParamDefault","NestedDeclareModule","NestedFlowComment","PatternIsOptional","SetterMayNotHaveThisParam","SpreadVariance","ThisParamAnnotationRequired","ThisParamBannedInConstructor","ThisParamMayNotBeOptional","ThisParamMustBeFirst","ThisParamNoDefault","TypeBeforeInitializer","TypeCastInPattern","UnexpectedExplicitInexactInObject","UnexpectedReservedType","UnexpectedReservedUnderscore","UnexpectedSpaceBetweenModuloChecks","UnexpectedSpreadType","UnexpectedSubtractionOperand","UnexpectedTokenAfterTypeParameter","UnexpectedTypeParameterBeforeAsyncArrowFunction","UnsupportedDeclareExportKind","UnsupportedStatementInDeclareModule","UnterminatedFlowComment","isEsModuleType","bodyElement","declaration","hasTypeImportKind","importKind","isMaybeDefaultImport","exportSuggestions","const","let","interface","partition","list","list1","list2","FLOW_PRAGMA_REGEX","flowPragma","shouldParseTypes","shouldParseEnums","matches","exec","Error","flowParseTypeInitialiser","tok","oldInType","flowParseType","flowParsePredicate","moduloLoc","parseExpression","flowParseTypeAndPredicateInitialiser","predicate","flowParseDeclareClass","flowParseInterfaceish","flowParseDeclareFunction","parseIdentifier","typeNode","typeContainer","flowParseTypeParameterDeclaration","tmp","flowParseFunctionTypeParams","rest","this","returnType","typeAnnotation","flowParseDeclare","insideModule","flowParseDeclareVariable","flowParseDeclareModuleExports","flowParseDeclareModule","flowParseDeclareTypeAlias","flowParseDeclareOpaqueType","flowParseDeclareInterface","flowParseDeclareExportDeclaration","flowParseTypeAnnotatableIdentifier","parseExprAtom","bodyNode","parseImport","hasModuleExport","default","isLet","suggestion","exportKind","flowParseTypeAnnotation","flowParseTypeAlias","flowParseOpaqueType","isClass","flowParseRestrictedIdentifier","extends","implements","mixins","flowParseInterfaceExtends","flowParseObjectType","allowStatic","allowExact","allowSpread","allowProto","allowInexact","flowParseQualifiedTypeIdentifier","flowParseTypeParameterInstantiation","flowParseInterface","checkNotUnderscore","checkReservedType","liberal","right","declare","supertype","impltype","flowParseTypeParameter","requireDefault","nodeStartLoc","variance","flowParseVariance","ident","bound","defaultRequired","typeParameter","oldNoAnonFunctionType","flowParseTypeParameterInstantiationCallOrNew","flowParseTypeOrImplicitInstantiation","flowParseInterfaceType","flowParseObjectPropertyKey","flowParseObjectTypeIndexer","isStatic","static","flowParseObjectTypeInternalSlot","flowParseObjectTypeMethodish","flowParseFunctionTypeParam","flowParseObjectTypeCallProperty","valueNode","callProperties","indexers","internalSlots","endDelim","exact","inexact","protoStartLoc","inexactStartLoc","propOrInexact","flowParseObjectTypeProperty","flowObjectTypeSemicolon","isInexactToken","argument","proto","flowCheckGetterSetterParams","paramCount","node2","qualification","flowParseGenericType","flowParseTypeofType","flowParsePrimaryType","flowParseTupleType","first","lh","isThis","reinterpretTypeAsFunctionTypeParam","flowIdentToTypeAnnotation","isGroupedType","parseLiteralAtNode","createIdentifier","flowParsePostfixType","seenOptionalIndexedAccess","objectType","indexType","flowParsePrefixType","flowParseAnonFunctionWithoutParens","param","flowParseIntersectionType","flowParseUnionType","allowPrimitiveOverride","typeCastToParameter","allowExpressionBody","forwardNoArrowParamsConversionAt","parseFunctionBodyAndFinish","parseStatement","topLevel","flowParseEnumDeclaration","parseExpressionStatement","expr","shouldParseExportDeclaration","isExportDefaultSpecifier","parseExportDefaultExpression","parseConditional","setOptionalParametersError","originalNoArrowAt","consequent","failed","tryParseConditionalConsequent","valid","getArrowLikeExpressions","alternate","parseMaybeAssign","parseMaybeAssignAllowIn","disallowInvalid","arrows","finishArrowValidation","every","toAssignableList","trailingCommaLoc","checkParams","result","parseParenItem","typeCastNode","assertModuleNodeAllowed","decl","parseExportDeclaration","declarationNode","parseExportSpecifiers","parseExportFrom","eatExportStar","maybeParseExportNamespaceSpecifier","hasNamespace","parseClassId","isStatement","optionalId","parseClassMember","member","parseClassMemberFromModifier","isIterator","readIterator","fullWord","exprList","toReferencedList","isParenthesizedExpr","parseArrayLike","close","canBePattern","isTuple","checkLVal","isClassMethod","isClassProperty","isNonstaticConstructor","isThisParam","pushClassPrivateMethod","parseClassSuper","superTypeParameters","implemented","checkGetterSetterParams","parsePropertyNamePrefixOperator","parseObjPropValue","parseAssignableListItemTypes","parseMaybeDefault","left","shouldParseDefaultImport","parseImportSpecifierLocal","specifier","contextDescription","local","maybeParseDefaultImportSpecifier","parseImportSpecifier","importedIsString","isInTypeOnlyImport","isMaybeTypeOnly","firstIdent","imported","specifierTypeKind","as_ident","specifierIsTypeImport","checkReservedWord","parseBindingAtom","parseFunctionParams","allowModifiers","parseVarId","parseAsyncArrowFromCallExpression","call","shouldParseAsyncArrow","afterLeftParse","jsx","currentContext","abort","arrowExpression","maybeUnwrapTypeCastExpression","async","parseArrow","shouldParseArrow","setArrowFunctionParameters","allowDuplicates","isArrowFunction","parseParenAndDistinguishExpression","canBeArrow","parseSubscripts","parseCallExpressionArguments","parseAsyncArrowWithTypeParameters","subscriptState","isLookaheadToken_lt","typeArguments","parseNewArguments","targs","parseArrowExpression","parseTopLevel","program","fileNode","skipFlowComment","hasFlowCommentCompletion","shiftToFirstNonWhiteSpace","ch2","ch3","flowEnumErrorBooleanMemberNotInitialized","enumName","memberName","flowEnumErrorInvalidExplicitType","suppliedType","flowEnumErrorInvalidMemberInitializer","explicitType","flowEnumErrorNumberMemberNotInitialized","flowEnumErrorStringMemberInconsistentlyInitailized","flowEnumMemberInit","endOfInit","literal","flowEnumMemberRaw","flowEnumCheckExplicitTypeMismatch","expectedType","flowEnumMembers","seenNames","members","booleanMembers","numberMembers","stringMembers","defaultedMembers","hasUnknownMembers","memberNode","toUpperCase","flowEnumStringMembers","initializedMembers","flowEnumParseExplicitType","flowEnumBody","nameLoc","empty","boolsLen","numsLen","strsLen","defaultedLen","afterNext","entities","quot","amp","apos","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","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","nabla","isin","notin","ni","prod","sum","minus","lowast","radic","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","HEX_NUMBER","DECIMAL_NUMBER","JsxErrors","AttributeIsEmpty","MissingClosingTagElement","MissingClosingTagFragment","UnexpectedSequenceExpression","UnsupportedJsxValue","UnterminatedJsxContent","UnwrappedAdjacentJSXElements","isFragment","getQualifiedJSXName","namespace","jsxReadToken","jsxReadEntity","jsxReadNewLine","normalizeCRLF","jsxReadString","count","entity","XHTMLEntities","jsxReadWord","jsxParseIdentifier","jsxParseNamespacedName","jsxParseElementName","jsxParseAttributeValue","setContext","jsxParseExpressionContainer","jsxParseEmptyExpression","jsxParseSpreadChild","previousContext","jsxParseAttribute","jsxParseOpeningElementAt","jsxParseOpeningElementAfterName","selfClosing","jsxParseClosingElementAt","jsxParseElementAt","children","openingElement","closingElement","contents","openingFragment","closingFragment","jsxParseElement","newContext","TypeScriptScope","enums","constEnums","classes","exportOnlyBindings","TypeScriptScopeHandler","isConst","wasConst","nonNull","x","assert","TSErrors","AbstractMethodHasImplementation","AbstractPropertyHasInitializer","AccesorCannotDeclareThisParameter","AccesorCannotHaveTypeParameters","ClassMethodHasDeclare","ClassMethodHasReadonly","ConstructorHasTypeParameters","DeclareAccessor","DeclareClassFieldHasInitializer","DeclareFunctionHasImplementation","DuplicateAccessibilityModifier","DuplicateModifier","EmptyHeritageClauseType","EmptyTypeArguments","EmptyTypeParameters","ExpectedAmbientAfterExportDeclare","ImportAliasHasImportType","IncompatibleModifiers","IndexSignatureHasAbstract","IndexSignatureHasAccessibility","IndexSignatureHasDeclare","IndexSignatureHasOverride","IndexSignatureHasStatic","InvalidModifierOnTypeMember","InvalidModifiersOrder","InvalidTupleMemberLabel","MissingInterfaceName","MixedLabeledAndUnlabeledElements","NonAbstractClassHasAbstractMethod","NonClassMethodPropertyHasAbstractModifer","OptionalTypeBeforeRequired","OverrideNotInSubClass","PrivateElementHasAbstract","PrivateElementHasAccessibility","ReadonlyForMethodSignature","ReservedArrowTypeParam","ReservedTypeAssertion","SetAccesorCannotHaveOptionalParameter","SetAccesorCannotHaveRestParameter","SetAccesorCannotHaveReturnType","StaticBlockCannotHaveModifier","TypeAnnotationAfterAssign","TypeImportCannotSpecifyDefaultAndNamed","TypeModifierIsUsedInTypeExports","TypeModifierIsUsedInTypeImports","UnexpectedParameterModifier","UnexpectedReadonly","UnexpectedTypeAnnotation","UnexpectedTypeCastInParameter","UnsupportedImportTypeArgument","UnsupportedParameterPropertyKind","UnsupportedSignatureParameterKind","keywordTypeFromName","tsIsAccessModifier","modifier","tsIsIdentifier","tsTokenCanFollowModifier","tsNextTokenCanFollowModifier","tsParseModifier","allowedModifiers","stopOnStartOfClassStaticBlock","tsIsStartOfStaticBlocks","tsTryParse","tsParseModifiers","modified","disallowedModifiers","enforceOrder","before","after","incompatible","mod1","mod2","accessibility","hasOwnProperty","tsIsListTerminator","tsParseList","parseElement","tsParseDelimitedList","refTrailingCommaPos","tsParseDelimitedListWorker","expectSuccess","trailingCommaPos","element","tsParseBracketedList","bracket","skipFirstToken","tsParseImportType","qualifier","tsParseEntityName","tsParseTypeArguments","allowReservedWords","tsParseTypeReference","typeName","tsParseThisTypePredicate","lhs","parameterName","tsParseTypeAnnotation","asserts","tsParseThisTypeNode","tsParseTypeQuery","exprName","tsParseTypeParameter","tsParseTypeParameterName","constraint","tsEatThenParseType","tsTryParseTypeParameters","tsParseTypeParameters","tsTryNextParseConstantContext","tsFillSignature","returnToken","signature","returnTokenRequired","paramsKey","returnTypeKey","tsParseBindingListForSignature","tsParseTypeOrTypePredicateAnnotation","parseBindingList","tsParseTypeMemberSemicolon","tsParseSignatureMember","tsIsUnambiguouslyIndexSignature","tsTryParseIndexSignature","tsLookAhead","parameters","tsTryParseTypeAnnotation","tsParsePropertyOrMethodSignature","readonly","nodeAny","firstParameter","tsParseTypeMember","idx","parsePropertyName","tsParseTypeLiteral","tsParseObjectTypeMembers","tsIsStartOfMappedType","tsParseMappedTypeParameter","tsExpectThenParseType","tsParseMappedType","nameType","tsParseType","tsTryParseType","tsParseTupleType","elementTypes","tsParseTupleElementType","seenOptionalElement","labeledElements","elementNode","isLabeled","labeled","labeledNode","optionalTypeNode","restNode","tsParseParenthesizedType","tsParseFunctionOrConstructorType","abstract","tsParseLiteralTypeNode","tsParseTemplateLiteralType","parseTemplate","parseTemplateSubstitution","tsParseThisTypeOrThisTypePredicate","thisKeyword","tsParseNonArrayType","parseMaybeUnary","nodeType","tsParseArrayTypeOrHigher","tsParseTypeOperator","operator","tsParseTypeOperatorOrHigher","tsCheckTypeAnnotationForReadOnly","tsParseInferType","isTypeOperator","tsParseUnionOrIntersectionType","parseConstituentType","hasLeadingOperator","tsParseIntersectionTypeOrHigher","tsParseUnionTypeOrHigher","tsIsStartOfFunctionType","tsIsUnambiguouslyStartOfFunctionType","tsSkipParameterStart","braceStackCounter","tsInType","t","tsParseTypePredicateAsserts","thisTypePredicate","typePredicateVariable","tsParseTypePredicatePrefix","tsTryParseTypeOrTypePredicateAnnotation","eatColon","tsParseNonConditionalType","checkType","extendsType","trueType","falseType","isAbstractConstructorSignature","tsParseTypeAssertion","tsNextThenParseType","tsParseHeritageClause","descriptor","originalStartLoc","delimitedList","tsParseExpressionWithTypeArguments","tsParseInterfaceDeclaration","tsParseTypeAliasDeclaration","tsInNoContext","cb","oldContext","tsDoThenParseType","tsParseEnumMember","initializer","tsParseEnumDeclaration","tsParseModuleBlock","parseBlockOrModuleBlockBody","tsParseModuleOrNamespaceDeclaration","nested","inner","tsParseAmbientExternalModuleDeclaration","global","tsParseImportEqualsDeclaration","isExport","moduleReference","tsParseModuleReference","tsIsExternalModuleReference","tsParseExternalModuleReference","f","res","tsTryParseAndCatch","tsTryParseDeclare","nany","starttype","tsInAmbientContext","parseFunctionStatement","parseClass","parseVarStatement","tsParseDeclaration","tsTryParseExportDeclaration","tsParseExpressionStatement","mod","tsCheckLineTerminator","tsParseAbstractDeclaration","tsTryParseGenericAsyncArrowFunction","oldMaybeInArrowParameters","tsParseTypeArgumentsInExpression","reScan_lt","tsIsDeclarationStart","parseAssignableListItem","decorators","override","elt","pp","parameter","bodilessType","registerFunctionStatementId","tsCheckForInvalidTypeCasts","items","isInParens","nonNullExpression","isOptionalCall","missingParenErrorLoc","atPossibleAsyncArrow","asyncArrowFn","parseTaggedTemplateExpression","parseExprOp","leftStartPos","leftStartLoc","minPrec","reScan_lt_gt","checkKeywords","checkDuplicateExports","ahead","importNode","isAbstractClass","cls","interfaceNode","parseStatementContent","parseAccessModifier","tsHasSomeModifiers","modifiers","callParseClassMemberWithIsStatic","parseClassStaticBlock","parseClassMemberWithIsStatic","hadSuperClass","parsePostMemberNameModifiers","methodOrProp","isDeclare","parseClassPropertyAnnotation","definite","declareClassPrivateMethodInScope","typeCast","reportReservedArrowTypeParam","trailingComma","toAssignableParenthesizedExpression","parseMaybeDecoratorArguments","checkCommaAfterRest","canHaveLeadingDecorator","getGetterSetterExpectedParamCount","baseCount","firstParam","hasContextParam","parseCatchClauseParam","oldIsAmbientContext","oldInAbstractClass","hasBody","shouldParseAsAmbientContext","getExpression","parseExportSpecifier","isString","isInTypeExport","parseTypeOnlyImportExportSpecifier","isImport","isInTypeOnlyImportExport","leftOfAsKey","rightOfAsKey","leftOfAs","rightOfAs","hasTypeSpecifier","canParseAsKeyword","firstAs","secondAs","kindKey","parseModuleExportName","PlaceholderErrors","ClassNameIsRequired","parsePlaceholder","finishPlaceholder","isFinished","verifyBreakContinue","parseBlock","parseFunctionId","takeDecorators","oldStrict","parseClassBody","startsWith","maybeParseExportDefaultSpecifier","checkExport","filter","hasStarImport","maybeParseStarImportSpecifier","parseNamedImportSpecifiers","parseImportSource","parseV8Intrinsic","v8IntrinsicStartLoc","parseIdentifierName","identifier","expectedConfig","expectedName","expectedOptions","expectedKeys","expectedOptionsIsEmpty","p","option","find","PIPELINE_PROPOSALS","TOPIC_TOKENS","RECORD_AND_TUPLE_SYNTAX_TYPES","validatePlugins","decoratorsBeforeExport","proposalList","tupleSyntaxIsHash","syntaxType","tokenList","moduleAttributesVerionPluginOption","missingPlugins","mixinPlugins","estree","flow","typescript","v8intrinsic","placeholders","mixinPluginNames","defaultOptions","sourceFilename","allowAwaitOutsideFunction","allowReturnOutsideFunction","allowImportExportEverywhere","allowSuperOutsideMethod","allowUndeclaredExports","createParenthesizedExpressions","getOptions","opts","unwrapParenthesizedExpression","LValParser","last","isLast","checkToRestConversion","arg","toReferencedListDeep","parseSpread","refNeedsArrowPos","parseRestBinding","parseObjectLike","closeCharCode","allowEmpty","elts","parseDecorator","parseBindingRestProperty","parseBindingProperty","checkClashes","disallowLetBinding","strictModeChanged","elem","invalidHackPipeBodies","ExpressionParser","checkProto","isRecord","protoRef","used","shouldExitDescending","disallowIn","disallowInAnd","parseExpressionBase","allowInAnd","expressions","parseMaybeAssignDisallowIn","resultError","parseYield","ownExpressionErrors","parseMaybeConditional","parseExprOps","parseMaybeUnaryOrPrivate","op","prec","checkPipelineAtInfixOperator","logical","coalesce","parseExprOpRightExpr","nextOp","withTopicBindingContext","parseHackPipeBody","parseSmartPipelineBodyInStyle","parseExprOpBaseRightExpr","withSoloAwaitPermittingContext","parseFSharpPipelineBody","topicReferenceWasUsedInCurrentContext","checkExponentialAfterUnary","sawUnary","isAwait","isAwaitAllowed","parseAwait","update","isDelete","parseUpdate","isAmbiguousAwait","parseExprSubscripts","maybeAsyncArrow","parseBind","parseCoverCallAndAsyncArrowHead","parseMember","parseNoCallExpr","tag","quasi","dynamicImport","allowPlaceholder","nodeForExtra","oldInFSharpPipelineDirectBody","addTrailingCommaExtraToNode","parseExprListItem","parseSuper","parseImportMetaProperty","parseDo","parseFunctionOrFunctionSent","parseDecorators","parseNewOrNewTarget","parseTopicReferenceThenEqualsSign","parseTopicReference","pipeProposal","parseModuleExpression","parseFunction","parseAsyncArrowUnaryFunction","topicTokenType","topicTokenValue","tokenType","finishTopicReference","testTopicReferenceConfiguration","topicReferenceIsAllowedInCurrentContext","registerTopicReference","meta","parseMetaProperty","propertyName","SourceTypeModuleErrors","innerStartPos","innerStartLoc","spreadStartLoc","optionalCommaStartLoc","spreadNodeStartPos","spreadNodeStartLoc","innerEndLoc","arrowNode","parenExpression","metaProp","parseNew","parseExprList","parseTemplateElement","isTagged","elemStart","isTail","endOffset","elemEnd","cooked","tail","curElt","quasis","propHash","parsePropertyDefinition","maybeAsyncOrAccessorProp","keyName","generator","isExpression","hasStrictModeDirective","nonSimple","isSimpleParamList","errorOrigin","reservedTest","delegating","delegate","childExpr","isSimpleReference","checkSmartPipeTopicBodyEarlyErrors","callback","outerContextTopicState","withSmartMixTopicForbiddingContext","outerContextSoloAwaitState","prodParamToSet","prodParamToClear","ret","revertScopes","parseProgram","loopLabel","switchLabel","FUNC_NO_FLAGS","FUNC_STATEMENT","FUNC_HANGING_STATEMENT","FUNC_NULLABLE_ID","loneSurrogate","keywordRelationalOperator","babel7CompatTokens","hashEndPos","hashEndLoc","backquoteEnd","backquoteEndLoc","startToken","templateValue","templateElementEnd","templateElementEndLoc","endToken","StatementParser","interpreter","parseInterpreterDirective","stmtToDirective","isLetKeyword","endCh","parseBreakContinueStatement","parseDebuggerStatement","parseDoStatement","parseForStatement","parseIfStatement","parseReturnStatement","parseSwitchStatement","parseThrowStatement","parseTryStatement","parseWhileStatement","parseWithStatement","parseEmptyStatement","nextTokenCharCode","isAsyncFunction","maybeName","parseLabeledStatement","allowExport","currentContextDecorators","decorator","isBreak","lab","parseHeaderExpression","awaitAt","parseFor","startsWithLet","parseVar","declarations","parseForIn","startsWithAsync","isForOf","description","declarationPosition","discriminant","cases","cur","sawDefault","isCase","simple","block","handler","clause","finalizer","statementStart","allowDirectives","createNewLexicalScope","afterBlockParse","parsedNonDirective","isForIn","await","isFor","isTypescript","statement","isHangingStatement","requireId","hadConstructor","publicMethod","privateMethod","publicProp","privateProp","accessorProp","publicMember","parseClassElementName","isPrivate","maybeQuestionTokenStartLoc","pushClassPrivateProperty","pushClassProperty","pushClassAccessorProperty","parseClassAccessorProperty","parseInitializer","hasDefault","parseAfterDefault","hasStar","parseAfterNamespace","isFromRequired","hasSpecifiers","maybeParseExportNamedSpecifiers","hasDeclaration","maybeParseExportDeclaration","isTypeExport","assertions","nextType","hasFrom","nextAfterFrom","maybeParseImportAssertions","checkNames","isDefault","isFrom","exportedName","nodes","surrogate","toString","parseNext","maybeParseModuleAttributes","parseAssertEntries","attrs","attrNames","importSpecifier","Parser","pluginsMap","pluginMap","getParser","ast","moduleError","generateExportedTokenTypes","internalTokenTypes","tokTypes","getParserClass","parserClassCache","pluginsFromOptions","pluginList"],"mappings":";;;;AAUe,MAAMA,UAAN,CAAiB;AAAA;AAAA,SAa9BC,iBAb8B,GAaD,KAbC;AAAA,SAc9BC,2BAd8B,GAcS,KAdT;AAAA;;AA2B9BC,EAAAA,SAAS,CAACC,YAAD,EAAsC;AAC7C,QAAI,OAAOA,YAAP,KAAwB,QAA5B,EAAsC;AACpC,aAAO,KAAKC,OAAL,CAAaC,GAAb,CAAiBF,YAAjB,CAAP;AACD,KAFD,MAEO;AACL,YAAM,CAACG,UAAD,EAAaC,aAAb,IAA8BJ,YAApC;;AACA,UAAI,CAAC,KAAKD,SAAL,CAAeI,UAAf,CAAL,EAAiC;AAC/B,eAAO,KAAP;AACD;;AACD,YAAME,aAAa,GAAG,KAAKJ,OAAL,CAAaK,GAAb,CAAiBH,UAAjB,CAAtB;;AACA,WAAK,MAAMI,GAAX,IAAkBC,MAAM,CAACC,IAAP,CAAYL,aAAZ,CAAlB,EAA8C;AAC5C,YAAI,CAAAC,aAAa,QAAb,YAAAA,aAAa,CAAGE,GAAH,CAAb,MAAyBH,aAAa,CAACG,GAAD,CAA1C,EAAiD;AAC/C,iBAAO,KAAP;AACD;AACF;;AACD,aAAO,IAAP;AACD;AACF;;AAEDG,EAAAA,eAAe,CAACC,MAAD,EAAiBC,I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AML,GAAG,GAAG+vE,UAAU,CAAC/1C,IAAX,CAAgB,GAAhB,CAAZ;AACA,MAAI29B,GAAG,GAAGkY,gBAAgB,CAAC7vE,GAAD,CAA1B;;AACA,MAAI,CAAC23D,GAAL,EAAU;AACRA,IAAAA,GAAG,GAAGwX,MAAN;;AACA,SAAK,MAAM/uE,MAAX,IAAqB2vE,UAArB,EAAiC;AAC/BpY,MAAAA,GAAG,GAAG2F,YAAY,CAACl9D,MAAD,CAAZ,CAAqBu3D,GAArB,CAAN;AACD;;AACDkY,IAAAA,gBAAgB,CAAC7vE,GAAD,CAAhB,GAAwB23D,GAAxB;AACD;;AACD,SAAOA,GAAP;AACD;;;;;;"} \ No newline at end of file
diff --git a/node_modules/@babel/parser/package.json b/node_modules/@babel/parser/package.json
new file mode 100644
index 0000000..4d7a1b4
--- /dev/null
+++ b/node_modules/@babel/parser/package.json
@@ -0,0 +1,42 @@
+{
+ "name": "@babel/parser",
+ "version": "7.17.3",
+ "description": "A JavaScript parser",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-parser",
+ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A+parser+%28babylon%29%22+is%3Aopen",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "keywords": [
+ "babel",
+ "javascript",
+ "parser",
+ "tc39",
+ "ecmascript",
+ "@babel/parser"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-parser"
+ },
+ "main": "./lib/index.js",
+ "types": "./typings/babel-parser.d.ts",
+ "files": [
+ "bin",
+ "lib",
+ "typings"
+ ],
+ "engines": {
+ "node": ">=6.0.0"
+ },
+ "devDependencies": {
+ "@babel/code-frame": "^7.16.7",
+ "@babel/helper-fixtures": "^7.17.0",
+ "@babel/helper-validator-identifier": "^7.16.7",
+ "charcodes": "^0.2.0"
+ },
+ "bin": "./bin/babel-parser.js"
+} \ No newline at end of file
diff --git a/node_modules/@babel/parser/typings/babel-parser.d.ts b/node_modules/@babel/parser/typings/babel-parser.d.ts
new file mode 100644
index 0000000..5ba49fd
--- /dev/null
+++ b/node_modules/@babel/parser/typings/babel-parser.d.ts
@@ -0,0 +1,206 @@
+// Type definitions for @babel/parser
+// Project: https://github.com/babel/babel/tree/main/packages/babel-parser
+// Definitions by: Troy Gerwien <https://github.com/yortus>
+// Marvin Hagemeister <https://github.com/marvinhagemeister>
+// Avi Vahl <https://github.com/AviVahl>
+// TypeScript Version: 2.9
+
+/**
+ * Parse the provided code as an entire ECMAScript program.
+ */
+export function parse(
+ input: string,
+ options?: ParserOptions
+): ParseResult<import("@babel/types").File>;
+
+/**
+ * Parse the provided code as a single expression.
+ */
+export function parseExpression(
+ input: string,
+ options?: ParserOptions
+): ParseResult<import("@babel/types").Expression>;
+
+export interface ParserOptions {
+ /**
+ * By default, import and export declarations can only appear at a program's top level.
+ * Setting this option to true allows them anywhere where a statement is allowed.
+ */
+ allowImportExportEverywhere?: boolean;
+
+ /**
+ * By default, await use is not allowed outside of an async function.
+ * Set this to true to accept such code.
+ */
+ allowAwaitOutsideFunction?: boolean;
+
+ /**
+ * By default, a return statement at the top level raises an error.
+ * Set this to true to accept such code.
+ */
+ allowReturnOutsideFunction?: boolean;
+
+ allowSuperOutsideMethod?: boolean;
+
+ /**
+ * By default, exported identifiers must refer to a declared variable.
+ * Set this to true to allow export statements to reference undeclared variables.
+ */
+ allowUndeclaredExports?: boolean;
+
+ /**
+ * By default, Babel attaches comments to adjacent AST nodes.
+ * When this option is set to false, comments are not attached.
+ * It can provide up to 30% performance improvement when the input code has many comments.
+ * @babel/eslint-parser will set it for you.
+ * It is not recommended to use attachComment: false with Babel transform,
+ * as doing so removes all the comments in output code, and renders annotations such as
+ * /* istanbul ignore next *\/ nonfunctional.
+ */
+ attachComment?: boolean;
+
+ /**
+ * By default, Babel always throws an error when it finds some invalid code.
+ * When this option is set to true, it will store the parsing error and
+ * try to continue parsing the invalid input file.
+ */
+ errorRecovery?: boolean;
+
+ /**
+ * Indicate the mode the code should be parsed in.
+ * Can be one of "script", "module", or "unambiguous". Defaults to "script".
+ * "unambiguous" will make @babel/parser attempt to guess, based on the presence
+ * of ES6 import or export statements.
+ * Files with ES6 imports and exports are considered "module" and are otherwise "script".
+ */
+ sourceType?: "script" | "module" | "unambiguous";
+
+ /**
+ * Correlate output AST nodes with their source filename.
+ * Useful when generating code and source maps from the ASTs of multiple input files.
+ */
+ sourceFilename?: string;
+
+ /**
+ * By default, the first line of code parsed is treated as line 1.
+ * You can provide a line number to alternatively start with.
+ * Useful for integration with other source tools.
+ */
+ startLine?: number;
+
+ /**
+ * Array containing the plugins that you want to enable.
+ */
+ plugins?: ParserPlugin[];
+
+ /**
+ * Should the parser work in strict mode.
+ * Defaults to true if sourceType === 'module'. Otherwise, false.
+ */
+ strictMode?: boolean;
+
+ /**
+ * Adds a ranges property to each node: [node.start, node.end]
+ */
+ ranges?: boolean;
+
+ /**
+ * Adds all parsed tokens to a tokens property on the File node.
+ */
+ tokens?: boolean;
+
+ /**
+ * By default, the parser adds information about parentheses by setting
+ * `extra.parenthesized` to `true` as needed.
+ * When this option is `true` the parser creates `ParenthesizedExpression`
+ * AST nodes instead of using the `extra` property.
+ */
+ createParenthesizedExpressions?: boolean;
+}
+
+export type ParserPlugin =
+ | "asyncDoExpressions"
+ | "asyncGenerators"
+ | "bigInt"
+ | "classPrivateMethods"
+ | "classPrivateProperties"
+ | "classProperties"
+ | "classStaticBlock" // Enabled by default
+ | "decimal"
+ | "decorators"
+ | "decorators-legacy"
+ | "decoratorAutoAccessors"
+ | "destructuringPrivate"
+ | "doExpressions"
+ | "dynamicImport"
+ | "estree"
+ | "exportDefaultFrom"
+ | "exportNamespaceFrom" // deprecated
+ | "flow"
+ | "flowComments"
+ | "functionBind"
+ | "functionSent"
+ | "importMeta"
+ | "jsx"
+ | "logicalAssignment"
+ | "importAssertions"
+ | "moduleBlocks"
+ | "moduleStringNames"
+ | "nullishCoalescingOperator"
+ | "numericSeparator"
+ | "objectRestSpread"
+ | "optionalCatchBinding"
+ | "optionalChaining"
+ | "partialApplication"
+ | "pipelineOperator"
+ | "placeholders"
+ | "privateIn" // Enabled by default
+ | "regexpUnicodeSets"
+ | "throwExpressions"
+ | "topLevelAwait"
+ | "typescript"
+ | "v8intrinsic"
+ | ParserPluginWithOptions;
+
+export type ParserPluginWithOptions =
+ | ["decorators", DecoratorsPluginOptions]
+ | ["pipelineOperator", PipelineOperatorPluginOptions]
+ | ["recordAndTuple", RecordAndTuplePluginOptions]
+ | ["flow", FlowPluginOptions]
+ | ["typescript", TypeScriptPluginOptions];
+
+export interface DecoratorsPluginOptions {
+ decoratorsBeforeExport?: boolean;
+}
+
+export interface PipelineOperatorPluginOptions {
+ proposal: "minimal" | "fsharp" | "hack" | "smart";
+ topicToken?: "%" | "#" | "@@" | "^^";
+}
+
+export interface RecordAndTuplePluginOptions {
+ syntaxType: "bar" | "hash";
+}
+
+export interface FlowPluginOptions {
+ all?: boolean;
+}
+
+export interface TypeScriptPluginOptions {
+ dts?: boolean;
+ disallowAmbiguousJSXLike?: boolean;
+}
+
+export const tokTypes: {
+ // todo(flow->ts) real token type
+ [name: string]: any;
+};
+
+export interface ParseError {
+ code: string;
+ reasonCode: string;
+}
+
+type ParseResult<Result> = Result & {
+ errors: ParseError[];
+};
diff --git a/node_modules/@babel/plugin-syntax-async-generators/LICENSE b/node_modules/@babel/plugin-syntax-async-generators/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-async-generators/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-async-generators/README.md b/node_modules/@babel/plugin-syntax-async-generators/README.md
new file mode 100644
index 0000000..4fdb68d
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-async-generators/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-async-generators
+
+> Allow parsing of async generator functions
+
+See our website [@babel/plugin-syntax-async-generators](https://babeljs.io/docs/en/next/babel-plugin-syntax-async-generators.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-async-generators
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-async-generators --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-async-generators/lib/index.js b/node_modules/@babel/plugin-syntax-async-generators/lib/index.js
new file mode 100644
index 0000000..903d8d3
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-async-generators/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-async-generators",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("asyncGenerators");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-async-generators/package.json b/node_modules/@babel/plugin-syntax-async-generators/package.json
new file mode 100644
index 0000000..5d9d9de
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-async-generators/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/plugin-syntax-async-generators",
+ "version": "7.8.4",
+ "description": "Allow parsing of async generator functions",
+ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-async-generators",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.8.0"
+ }
+}
diff --git a/node_modules/@babel/plugin-syntax-bigint/LICENSE b/node_modules/@babel/plugin-syntax-bigint/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-bigint/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-bigint/README.md b/node_modules/@babel/plugin-syntax-bigint/README.md
new file mode 100644
index 0000000..bb49aab
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-bigint/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-bigint
+
+> Allow parsing of BigInt literals
+
+See our website [@babel/plugin-syntax-bigint](https://babeljs.io/docs/en/next/babel-plugin-syntax-bigint.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-bigint
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-bigint --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-bigint/lib/index.js b/node_modules/@babel/plugin-syntax-bigint/lib/index.js
new file mode 100644
index 0000000..472d4e0
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-bigint/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-bigint",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("bigInt");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-bigint/package.json b/node_modules/@babel/plugin-syntax-bigint/package.json
new file mode 100644
index 0000000..9a18bcd
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-bigint/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/plugin-syntax-bigint",
+ "version": "7.8.3",
+ "description": "Allow parsing of BigInt literals",
+ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-bigint",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.8.0"
+ }
+}
diff --git a/node_modules/@babel/plugin-syntax-class-properties/LICENSE b/node_modules/@babel/plugin-syntax-class-properties/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-class-properties/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-class-properties/README.md b/node_modules/@babel/plugin-syntax-class-properties/README.md
new file mode 100644
index 0000000..be6d11c
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-class-properties/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-class-properties
+
+> Allow parsing of class properties
+
+See our website [@babel/plugin-syntax-class-properties](https://babeljs.io/docs/en/babel-plugin-syntax-class-properties) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-class-properties
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-class-properties --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-class-properties/lib/index.js b/node_modules/@babel/plugin-syntax-class-properties/lib/index.js
new file mode 100644
index 0000000..9420084
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-class-properties/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-class-properties",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("classProperties", "classPrivateProperties", "classPrivateMethods");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-class-properties/package.json b/node_modules/@babel/plugin-syntax-class-properties/package.json
new file mode 100644
index 0000000..cf443ba
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-class-properties/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "@babel/plugin-syntax-class-properties",
+ "version": "7.12.13",
+ "description": "Allow parsing of class properties",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-plugin-syntax-class-properties"
+ },
+ "homepage": "https://babel.dev/docs/en/next/babel-plugin-syntax-class-properties",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.12.13"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "7.12.13"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-import-meta/LICENSE b/node_modules/@babel/plugin-syntax-import-meta/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-import-meta/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-import-meta/README.md b/node_modules/@babel/plugin-syntax-import-meta/README.md
new file mode 100644
index 0000000..dc39f7c
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-import-meta/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-import-meta
+
+> Allow parsing of import.meta
+
+See our website [@babel/plugin-syntax-import-meta](https://babeljs.io/docs/en/next/babel-plugin-syntax-import-meta.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-import-meta
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-import-meta --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-import-meta/lib/index.js b/node_modules/@babel/plugin-syntax-import-meta/lib/index.js
new file mode 100644
index 0000000..736e0b6
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-import-meta/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-import-meta",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("importMeta");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-import-meta/package.json b/node_modules/@babel/plugin-syntax-import-meta/package.json
new file mode 100644
index 0000000..de09665
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-import-meta/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "@babel/plugin-syntax-import-meta",
+ "version": "7.10.4",
+ "description": "Allow parsing of import.meta",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-plugin-syntax-import-meta"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.10.4"
+ },
+ "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
+}
diff --git a/node_modules/@babel/plugin-syntax-json-strings/LICENSE b/node_modules/@babel/plugin-syntax-json-strings/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-json-strings/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-json-strings/README.md b/node_modules/@babel/plugin-syntax-json-strings/README.md
new file mode 100644
index 0000000..03c00a2
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-json-strings/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-json-strings
+
+> Allow parsing of the U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR in JS strings
+
+See our website [@babel/plugin-syntax-json-strings](https://babeljs.io/docs/en/next/babel-plugin-syntax-json-strings.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-json-strings
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-json-strings --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-json-strings/lib/index.js b/node_modules/@babel/plugin-syntax-json-strings/lib/index.js
new file mode 100644
index 0000000..722b548
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-json-strings/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-json-strings",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("jsonStrings");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-json-strings/package.json b/node_modules/@babel/plugin-syntax-json-strings/package.json
new file mode 100644
index 0000000..e41c646
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-json-strings/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/plugin-syntax-json-strings",
+ "version": "7.8.3",
+ "description": "Allow parsing of the U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR in JS strings",
+ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-json-strings",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.8.0"
+ }
+}
diff --git a/node_modules/@babel/plugin-syntax-logical-assignment-operators/LICENSE b/node_modules/@babel/plugin-syntax-logical-assignment-operators/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-logical-assignment-operators/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-logical-assignment-operators/README.md b/node_modules/@babel/plugin-syntax-logical-assignment-operators/README.md
new file mode 100644
index 0000000..02fa394
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-logical-assignment-operators/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-logical-assignment-operators
+
+> Allow parsing of the logical assignment operators
+
+See our website [@babel/plugin-syntax-logical-assignment-operators](https://babeljs.io/docs/en/next/babel-plugin-syntax-logical-assignment-operators.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-logical-assignment-operators
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-logical-assignment-operators --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-logical-assignment-operators/lib/index.js b/node_modules/@babel/plugin-syntax-logical-assignment-operators/lib/index.js
new file mode 100644
index 0000000..d5bb56c
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-logical-assignment-operators/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-logical-assignment-operators",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("logicalAssignment");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-logical-assignment-operators/package.json b/node_modules/@babel/plugin-syntax-logical-assignment-operators/package.json
new file mode 100644
index 0000000..cce0541
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-logical-assignment-operators/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "@babel/plugin-syntax-logical-assignment-operators",
+ "version": "7.10.4",
+ "description": "Allow parsing of the logical assignment operators",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-plugin-syntax-logical-assignment-operators"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.10.4"
+ },
+ "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
+}
diff --git a/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/LICENSE b/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/README.md b/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/README.md
new file mode 100644
index 0000000..f91e811
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-nullish-coalescing-operator
+
+> Allow parsing of the nullish-coalescing operator
+
+See our website [@babel/plugin-syntax-nullish-coalescing-operator](https://babeljs.io/docs/en/next/babel-plugin-syntax-nullish-coalescing-operator.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-nullish-coalescing-operator
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-nullish-coalescing-operator --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/lib/index.js b/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/lib/index.js
new file mode 100644
index 0000000..c25b337
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-nullish-coalescing-operator",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("nullishCoalescingOperator");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/package.json b/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/package.json
new file mode 100644
index 0000000..983e655
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-nullish-coalescing-operator/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/plugin-syntax-nullish-coalescing-operator",
+ "version": "7.8.3",
+ "description": "Allow parsing of the nullish-coalescing operator",
+ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-nullish-coalescing-operator",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.8.0"
+ }
+}
diff --git a/node_modules/@babel/plugin-syntax-numeric-separator/LICENSE b/node_modules/@babel/plugin-syntax-numeric-separator/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-numeric-separator/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-numeric-separator/README.md b/node_modules/@babel/plugin-syntax-numeric-separator/README.md
new file mode 100644
index 0000000..07856b8
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-numeric-separator/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-numeric-separator
+
+> Allow parsing of Decimal, Binary, Hex and Octal literals that contain a Numeric Literal Separator
+
+See our website [@babel/plugin-syntax-numeric-separator](https://babeljs.io/docs/en/next/babel-plugin-syntax-numeric-separator.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-numeric-separator
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-numeric-separator --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-numeric-separator/lib/index.js b/node_modules/@babel/plugin-syntax-numeric-separator/lib/index.js
new file mode 100644
index 0000000..7856c2b
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-numeric-separator/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-numeric-separator",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("numericSeparator");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-numeric-separator/package.json b/node_modules/@babel/plugin-syntax-numeric-separator/package.json
new file mode 100644
index 0000000..6dc4d96
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-numeric-separator/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "@babel/plugin-syntax-numeric-separator",
+ "version": "7.10.4",
+ "description": "Allow parsing of Decimal, Binary, Hex and Octal literals that contain a Numeric Literal Separator",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-plugin-syntax-numeric-separator"
+ },
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.10.4"
+ },
+ "gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
+}
diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE b/node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-object-rest-spread/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/README.md b/node_modules/@babel/plugin-syntax-object-rest-spread/README.md
new file mode 100644
index 0000000..95c4472
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-object-rest-spread/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-object-rest-spread
+
+> Allow parsing of object rest/spread
+
+See our website [@babel/plugin-syntax-object-rest-spread](https://babeljs.io/docs/en/next/babel-plugin-syntax-object-rest-spread.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-object-rest-spread
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-object-rest-spread --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js b/node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js
new file mode 100644
index 0000000..2255388
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-object-rest-spread",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("objectRestSpread");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-object-rest-spread/package.json b/node_modules/@babel/plugin-syntax-object-rest-spread/package.json
new file mode 100644
index 0000000..66b76d3
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-object-rest-spread/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/plugin-syntax-object-rest-spread",
+ "version": "7.8.3",
+ "description": "Allow parsing of object rest/spread",
+ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-object-rest-spread",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.8.0"
+ }
+}
diff --git a/node_modules/@babel/plugin-syntax-optional-catch-binding/LICENSE b/node_modules/@babel/plugin-syntax-optional-catch-binding/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-optional-catch-binding/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-optional-catch-binding/README.md b/node_modules/@babel/plugin-syntax-optional-catch-binding/README.md
new file mode 100644
index 0000000..9085f91
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-optional-catch-binding/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-optional-catch-binding
+
+> Allow parsing of optional catch bindings
+
+See our website [@babel/plugin-syntax-optional-catch-binding](https://babeljs.io/docs/en/next/babel-plugin-syntax-optional-catch-binding.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-optional-catch-binding
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-optional-catch-binding --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-optional-catch-binding/lib/index.js b/node_modules/@babel/plugin-syntax-optional-catch-binding/lib/index.js
new file mode 100644
index 0000000..ee0dfd4
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-optional-catch-binding/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-optional-catch-binding",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("optionalCatchBinding");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-optional-catch-binding/package.json b/node_modules/@babel/plugin-syntax-optional-catch-binding/package.json
new file mode 100644
index 0000000..5b38a0c
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-optional-catch-binding/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/plugin-syntax-optional-catch-binding",
+ "version": "7.8.3",
+ "description": "Allow parsing of optional catch bindings",
+ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-optional-catch-binding",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.8.0"
+ }
+}
diff --git a/node_modules/@babel/plugin-syntax-optional-chaining/LICENSE b/node_modules/@babel/plugin-syntax-optional-chaining/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-optional-chaining/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-optional-chaining/README.md b/node_modules/@babel/plugin-syntax-optional-chaining/README.md
new file mode 100644
index 0000000..712abc3
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-optional-chaining/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-optional-chaining
+
+> Allow parsing of optional properties
+
+See our website [@babel/plugin-syntax-optional-chaining](https://babeljs.io/docs/en/next/babel-plugin-syntax-optional-chaining.html) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-optional-chaining
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-optional-chaining --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-optional-chaining/lib/index.js b/node_modules/@babel/plugin-syntax-optional-chaining/lib/index.js
new file mode 100644
index 0000000..3bc82a1
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-optional-chaining/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-optional-chaining",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("optionalChaining");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-optional-chaining/package.json b/node_modules/@babel/plugin-syntax-optional-chaining/package.json
new file mode 100644
index 0000000..a1dcdc2
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-optional-chaining/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@babel/plugin-syntax-optional-chaining",
+ "version": "7.8.3",
+ "description": "Allow parsing of optional properties",
+ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-syntax-optional-chaining",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.8.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.8.0"
+ }
+}
diff --git a/node_modules/@babel/plugin-syntax-top-level-await/LICENSE b/node_modules/@babel/plugin-syntax-top-level-await/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-top-level-await/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-top-level-await/README.md b/node_modules/@babel/plugin-syntax-top-level-await/README.md
new file mode 100644
index 0000000..040c302
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-top-level-await/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-top-level-await
+
+> Allow parsing of top-level await in modules
+
+See our website [@babel/plugin-syntax-top-level-await](https://babeljs.io/docs/en/babel-plugin-syntax-top-level-await) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-top-level-await
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-top-level-await --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-top-level-await/lib/index.js b/node_modules/@babel/plugin-syntax-top-level-await/lib/index.js
new file mode 100644
index 0000000..a57cab7
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-top-level-await/lib/index.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+var _default = (0, _helperPluginUtils.declare)(api => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-top-level-await",
+
+ manipulateOptions(opts, parserOpts) {
+ parserOpts.plugins.push("topLevelAwait");
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-top-level-await/package.json b/node_modules/@babel/plugin-syntax-top-level-await/package.json
new file mode 100644
index 0000000..70952be
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-top-level-await/package.json
@@ -0,0 +1,32 @@
+{
+ "name": "@babel/plugin-syntax-top-level-await",
+ "version": "7.14.5",
+ "description": "Allow parsing of top-level await in modules",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-plugin-syntax-top-level-await"
+ },
+ "homepage": "https://babel.dev/docs/en/next/babel-plugin-syntax-top-level-await",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "keywords": [
+ "babel-plugin"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.14.5"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "7.14.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)"
+} \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-typescript/LICENSE b/node_modules/@babel/plugin-syntax-typescript/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/plugin-syntax-typescript/README.md b/node_modules/@babel/plugin-syntax-typescript/README.md
new file mode 100644
index 0000000..9e1d1f5
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/README.md
@@ -0,0 +1,19 @@
+# @babel/plugin-syntax-typescript
+
+> Allow parsing of TypeScript syntax
+
+See our website [@babel/plugin-syntax-typescript](https://babeljs.io/docs/en/babel-plugin-syntax-typescript) for more information.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/plugin-syntax-typescript
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/plugin-syntax-typescript --dev
+```
diff --git a/node_modules/@babel/plugin-syntax-typescript/lib/index.js b/node_modules/@babel/plugin-syntax-typescript/lib/index.js
new file mode 100644
index 0000000..9e82364
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/lib/index.js
@@ -0,0 +1,54 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _helperPluginUtils = require("@babel/helper-plugin-utils");
+
+function removePlugin(plugins, name) {
+ const indices = [];
+ plugins.forEach((plugin, i) => {
+ const n = Array.isArray(plugin) ? plugin[0] : plugin;
+
+ if (n === name) {
+ indices.unshift(i);
+ }
+ });
+
+ for (const i of indices) {
+ plugins.splice(i, 1);
+ }
+}
+
+var _default = (0, _helperPluginUtils.declare)((api, {
+ isTSX,
+ disallowAmbiguousJSXLike
+}) => {
+ api.assertVersion(7);
+ return {
+ name: "syntax-typescript",
+
+ manipulateOptions(opts, parserOpts) {
+ const {
+ plugins
+ } = parserOpts;
+ removePlugin(plugins, "flow");
+ removePlugin(plugins, "jsx");
+ parserOpts.plugins.push(["typescript", {
+ disallowAmbiguousJSXLike
+ }], "classProperties");
+ {
+ parserOpts.plugins.push("objectRestSpread");
+ }
+
+ if (isTSX) {
+ parserOpts.plugins.push("jsx");
+ }
+ }
+
+ };
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-typescript/package.json b/node_modules/@babel/plugin-syntax-typescript/package.json
new file mode 100644
index 0000000..dcea4df
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "@babel/plugin-syntax-typescript",
+ "version": "7.16.7",
+ "description": "Allow parsing of TypeScript syntax",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-plugin-syntax-typescript"
+ },
+ "homepage": "https://babel.dev/docs/en/next/babel-plugin-syntax-typescript",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "main": "./lib/index.js",
+ "keywords": [
+ "babel-plugin",
+ "typescript"
+ ],
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.16.7"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ },
+ "devDependencies": {
+ "@babel/core": "^7.16.7",
+ "@babel/helper-plugin-test-runner": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "author": "The Babel Team (https://babel.dev/team)"
+} \ No newline at end of file
diff --git a/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/options.json b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/options.json
new file mode 100644
index 0000000..747f9e6
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/options.json
@@ -0,0 +1,3 @@
+{
+ "plugins": [["syntax-typescript", { "disallowAmbiguousJSXLike": true }]]
+}
diff --git a/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-assertion/input.ts b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-assertion/input.ts
new file mode 100644
index 0000000..68e8893
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-assertion/input.ts
@@ -0,0 +1 @@
+<T>x;
diff --git a/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-assertion/options.json b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-assertion/options.json
new file mode 100644
index 0000000..d59f14f
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-assertion/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead. (1:0)"
+}
diff --git a/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter-unambiguous/input.ts b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter-unambiguous/input.ts
new file mode 100644
index 0000000..d9deae0
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter-unambiguous/input.ts
@@ -0,0 +1,2 @@
+<T,>() => 1;
+<T,>(x) => 1;
diff --git a/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter-unambiguous/output.js b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter-unambiguous/output.js
new file mode 100644
index 0000000..26d3834
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter-unambiguous/output.js
@@ -0,0 +1,3 @@
+<T>() => 1;
+
+<T>(x) => 1;
diff --git a/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter/input.ts b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter/input.ts
new file mode 100644
index 0000000..4b2a849
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter/input.ts
@@ -0,0 +1,2 @@
+<T>() => 1;
+<T>(x) => 1;
diff --git a/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter/options.json b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter/options.json
new file mode 100644
index 0000000..656905e
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/test/fixtures/disallow-jsx-ambiguity/type-parameter/options.json
@@ -0,0 +1,3 @@
+{
+ "throws": "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`. (1:0)"
+}
diff --git a/node_modules/@babel/plugin-syntax-typescript/test/index.js b/node_modules/@babel/plugin-syntax-typescript/test/index.js
new file mode 100644
index 0000000..21a55ce
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/test/index.js
@@ -0,0 +1,3 @@
+import runner from "@babel/helper-plugin-test-runner";
+
+runner(import.meta.url);
diff --git a/node_modules/@babel/plugin-syntax-typescript/test/package.json b/node_modules/@babel/plugin-syntax-typescript/test/package.json
new file mode 100644
index 0000000..5ffd980
--- /dev/null
+++ b/node_modules/@babel/plugin-syntax-typescript/test/package.json
@@ -0,0 +1 @@
+{ "type": "module" }
diff --git a/node_modules/@babel/template/LICENSE b/node_modules/@babel/template/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/template/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/template/README.md b/node_modules/@babel/template/README.md
new file mode 100644
index 0000000..759c65a
--- /dev/null
+++ b/node_modules/@babel/template/README.md
@@ -0,0 +1,19 @@
+# @babel/template
+
+> Generate an AST from a string template.
+
+See our website [@babel/template](https://babeljs.io/docs/en/babel-template) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20template%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/template
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/template --dev
+```
diff --git a/node_modules/@babel/template/lib/builder.js b/node_modules/@babel/template/lib/builder.js
new file mode 100644
index 0000000..e65b27d
--- /dev/null
+++ b/node_modules/@babel/template/lib/builder.js
@@ -0,0 +1,81 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = createTemplateBuilder;
+
+var _options = require("./options");
+
+var _string = require("./string");
+
+var _literal = require("./literal");
+
+const NO_PLACEHOLDER = (0, _options.validate)({
+ placeholderPattern: false
+});
+
+function createTemplateBuilder(formatter, defaultOpts) {
+ const templateFnCache = new WeakMap();
+ const templateAstCache = new WeakMap();
+ const cachedOpts = defaultOpts || (0, _options.validate)(null);
+ return Object.assign((tpl, ...args) => {
+ if (typeof tpl === "string") {
+ if (args.length > 1) throw new Error("Unexpected extra params.");
+ return extendedTrace((0, _string.default)(formatter, tpl, (0, _options.merge)(cachedOpts, (0, _options.validate)(args[0]))));
+ } else if (Array.isArray(tpl)) {
+ let builder = templateFnCache.get(tpl);
+
+ if (!builder) {
+ builder = (0, _literal.default)(formatter, tpl, cachedOpts);
+ templateFnCache.set(tpl, builder);
+ }
+
+ return extendedTrace(builder(args));
+ } else if (typeof tpl === "object" && tpl) {
+ if (args.length > 0) throw new Error("Unexpected extra params.");
+ return createTemplateBuilder(formatter, (0, _options.merge)(cachedOpts, (0, _options.validate)(tpl)));
+ }
+
+ throw new Error(`Unexpected template param ${typeof tpl}`);
+ }, {
+ ast: (tpl, ...args) => {
+ if (typeof tpl === "string") {
+ if (args.length > 1) throw new Error("Unexpected extra params.");
+ return (0, _string.default)(formatter, tpl, (0, _options.merge)((0, _options.merge)(cachedOpts, (0, _options.validate)(args[0])), NO_PLACEHOLDER))();
+ } else if (Array.isArray(tpl)) {
+ let builder = templateAstCache.get(tpl);
+
+ if (!builder) {
+ builder = (0, _literal.default)(formatter, tpl, (0, _options.merge)(cachedOpts, NO_PLACEHOLDER));
+ templateAstCache.set(tpl, builder);
+ }
+
+ return builder(args)();
+ }
+
+ throw new Error(`Unexpected template param ${typeof tpl}`);
+ }
+ });
+}
+
+function extendedTrace(fn) {
+ let rootStack = "";
+
+ try {
+ throw new Error();
+ } catch (error) {
+ if (error.stack) {
+ rootStack = error.stack.split("\n").slice(3).join("\n");
+ }
+ }
+
+ return arg => {
+ try {
+ return fn(arg);
+ } catch (err) {
+ err.stack += `\n =============\n${rootStack}`;
+ throw err;
+ }
+ };
+} \ No newline at end of file
diff --git a/node_modules/@babel/template/lib/formatters.js b/node_modules/@babel/template/lib/formatters.js
new file mode 100644
index 0000000..ab9168b
--- /dev/null
+++ b/node_modules/@babel/template/lib/formatters.js
@@ -0,0 +1,71 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.statements = exports.statement = exports.smart = exports.program = exports.expression = void 0;
+
+var _t = require("@babel/types");
+
+const {
+ assertExpressionStatement
+} = _t;
+
+function makeStatementFormatter(fn) {
+ return {
+ code: str => `/* @babel/template */;\n${str}`,
+ validate: () => {},
+ unwrap: ast => {
+ return fn(ast.program.body.slice(1));
+ }
+ };
+}
+
+const smart = makeStatementFormatter(body => {
+ if (body.length > 1) {
+ return body;
+ } else {
+ return body[0];
+ }
+});
+exports.smart = smart;
+const statements = makeStatementFormatter(body => body);
+exports.statements = statements;
+const statement = makeStatementFormatter(body => {
+ if (body.length === 0) {
+ throw new Error("Found nothing to return.");
+ }
+
+ if (body.length > 1) {
+ throw new Error("Found multiple statements but wanted one");
+ }
+
+ return body[0];
+});
+exports.statement = statement;
+const expression = {
+ code: str => `(\n${str}\n)`,
+ validate: ast => {
+ if (ast.program.body.length > 1) {
+ throw new Error("Found multiple statements but wanted one");
+ }
+
+ if (expression.unwrap(ast).start === 0) {
+ throw new Error("Parse result included parens.");
+ }
+ },
+ unwrap: ({
+ program
+ }) => {
+ const [stmt] = program.body;
+ assertExpressionStatement(stmt);
+ return stmt.expression;
+ }
+};
+exports.expression = expression;
+const program = {
+ code: str => str,
+ validate: () => {},
+ unwrap: ast => ast.program
+};
+exports.program = program; \ No newline at end of file
diff --git a/node_modules/@babel/template/lib/index.js b/node_modules/@babel/template/lib/index.js
new file mode 100644
index 0000000..b75aacd
--- /dev/null
+++ b/node_modules/@babel/template/lib/index.js
@@ -0,0 +1,32 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.statements = exports.statement = exports.smart = exports.program = exports.expression = exports.default = void 0;
+
+var formatters = require("./formatters");
+
+var _builder = require("./builder");
+
+const smart = (0, _builder.default)(formatters.smart);
+exports.smart = smart;
+const statement = (0, _builder.default)(formatters.statement);
+exports.statement = statement;
+const statements = (0, _builder.default)(formatters.statements);
+exports.statements = statements;
+const expression = (0, _builder.default)(formatters.expression);
+exports.expression = expression;
+const program = (0, _builder.default)(formatters.program);
+exports.program = program;
+
+var _default = Object.assign(smart.bind(undefined), {
+ smart,
+ statement,
+ statements,
+ expression,
+ program,
+ ast: smart.ast
+});
+
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/template/lib/literal.js b/node_modules/@babel/template/lib/literal.js
new file mode 100644
index 0000000..fd194c6
--- /dev/null
+++ b/node_modules/@babel/template/lib/literal.js
@@ -0,0 +1,80 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = literalTemplate;
+
+var _options = require("./options");
+
+var _parse = require("./parse");
+
+var _populate = require("./populate");
+
+function literalTemplate(formatter, tpl, opts) {
+ const {
+ metadata,
+ names
+ } = buildLiteralData(formatter, tpl, opts);
+ return arg => {
+ const defaultReplacements = {};
+ arg.forEach((replacement, i) => {
+ defaultReplacements[names[i]] = replacement;
+ });
+ return arg => {
+ const replacements = (0, _options.normalizeReplacements)(arg);
+
+ if (replacements) {
+ Object.keys(replacements).forEach(key => {
+ if (Object.prototype.hasOwnProperty.call(defaultReplacements, key)) {
+ throw new Error("Unexpected replacement overlap.");
+ }
+ });
+ }
+
+ return formatter.unwrap((0, _populate.default)(metadata, replacements ? Object.assign(replacements, defaultReplacements) : defaultReplacements));
+ };
+ };
+}
+
+function buildLiteralData(formatter, tpl, opts) {
+ let names;
+ let nameSet;
+ let metadata;
+ let prefix = "";
+
+ do {
+ prefix += "$";
+ const result = buildTemplateCode(tpl, prefix);
+ names = result.names;
+ nameSet = new Set(names);
+ metadata = (0, _parse.default)(formatter, formatter.code(result.code), {
+ parser: opts.parser,
+ placeholderWhitelist: new Set(result.names.concat(opts.placeholderWhitelist ? Array.from(opts.placeholderWhitelist) : [])),
+ placeholderPattern: opts.placeholderPattern,
+ preserveComments: opts.preserveComments,
+ syntacticPlaceholders: opts.syntacticPlaceholders
+ });
+ } while (metadata.placeholders.some(placeholder => placeholder.isDuplicate && nameSet.has(placeholder.name)));
+
+ return {
+ metadata,
+ names
+ };
+}
+
+function buildTemplateCode(tpl, prefix) {
+ const names = [];
+ let code = tpl[0];
+
+ for (let i = 1; i < tpl.length; i++) {
+ const value = `${prefix}${i - 1}`;
+ names.push(value);
+ code += value + tpl[i];
+ }
+
+ return {
+ names,
+ code
+ };
+} \ No newline at end of file
diff --git a/node_modules/@babel/template/lib/options.js b/node_modules/@babel/template/lib/options.js
new file mode 100644
index 0000000..95c31e7
--- /dev/null
+++ b/node_modules/@babel/template/lib/options.js
@@ -0,0 +1,83 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.merge = merge;
+exports.normalizeReplacements = normalizeReplacements;
+exports.validate = validate;
+const _excluded = ["placeholderWhitelist", "placeholderPattern", "preserveComments", "syntacticPlaceholders"];
+
+function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
+
+function merge(a, b) {
+ const {
+ placeholderWhitelist = a.placeholderWhitelist,
+ placeholderPattern = a.placeholderPattern,
+ preserveComments = a.preserveComments,
+ syntacticPlaceholders = a.syntacticPlaceholders
+ } = b;
+ return {
+ parser: Object.assign({}, a.parser, b.parser),
+ placeholderWhitelist,
+ placeholderPattern,
+ preserveComments,
+ syntacticPlaceholders
+ };
+}
+
+function validate(opts) {
+ if (opts != null && typeof opts !== "object") {
+ throw new Error("Unknown template options.");
+ }
+
+ const _ref = opts || {},
+ {
+ placeholderWhitelist,
+ placeholderPattern,
+ preserveComments,
+ syntacticPlaceholders
+ } = _ref,
+ parser = _objectWithoutPropertiesLoose(_ref, _excluded);
+
+ if (placeholderWhitelist != null && !(placeholderWhitelist instanceof Set)) {
+ throw new Error("'.placeholderWhitelist' must be a Set, null, or undefined");
+ }
+
+ if (placeholderPattern != null && !(placeholderPattern instanceof RegExp) && placeholderPattern !== false) {
+ throw new Error("'.placeholderPattern' must be a RegExp, false, null, or undefined");
+ }
+
+ if (preserveComments != null && typeof preserveComments !== "boolean") {
+ throw new Error("'.preserveComments' must be a boolean, null, or undefined");
+ }
+
+ if (syntacticPlaceholders != null && typeof syntacticPlaceholders !== "boolean") {
+ throw new Error("'.syntacticPlaceholders' must be a boolean, null, or undefined");
+ }
+
+ if (syntacticPlaceholders === true && (placeholderWhitelist != null || placeholderPattern != null)) {
+ throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
+ }
+
+ return {
+ parser,
+ placeholderWhitelist: placeholderWhitelist || undefined,
+ placeholderPattern: placeholderPattern == null ? undefined : placeholderPattern,
+ preserveComments: preserveComments == null ? undefined : preserveComments,
+ syntacticPlaceholders: syntacticPlaceholders == null ? undefined : syntacticPlaceholders
+ };
+}
+
+function normalizeReplacements(replacements) {
+ if (Array.isArray(replacements)) {
+ return replacements.reduce((acc, replacement, i) => {
+ acc["$" + i] = replacement;
+ return acc;
+ }, {});
+ } else if (typeof replacements === "object" || replacements == null) {
+ return replacements || undefined;
+ }
+
+ throw new Error("Template replacements must be an array, object, null, or undefined");
+} \ No newline at end of file
diff --git a/node_modules/@babel/template/lib/parse.js b/node_modules/@babel/template/lib/parse.js
new file mode 100644
index 0000000..0d42ed4
--- /dev/null
+++ b/node_modules/@babel/template/lib/parse.js
@@ -0,0 +1,188 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = parseAndBuildMetadata;
+
+var _t = require("@babel/types");
+
+var _parser = require("@babel/parser");
+
+var _codeFrame = require("@babel/code-frame");
+
+const {
+ isCallExpression,
+ isExpressionStatement,
+ isFunction,
+ isIdentifier,
+ isJSXIdentifier,
+ isNewExpression,
+ isPlaceholder,
+ isStatement,
+ isStringLiteral,
+ removePropertiesDeep,
+ traverse
+} = _t;
+const PATTERN = /^[_$A-Z0-9]+$/;
+
+function parseAndBuildMetadata(formatter, code, opts) {
+ const {
+ placeholderWhitelist,
+ placeholderPattern,
+ preserveComments,
+ syntacticPlaceholders
+ } = opts;
+ const ast = parseWithCodeFrame(code, opts.parser, syntacticPlaceholders);
+ removePropertiesDeep(ast, {
+ preserveComments
+ });
+ formatter.validate(ast);
+ const syntactic = {
+ placeholders: [],
+ placeholderNames: new Set()
+ };
+ const legacy = {
+ placeholders: [],
+ placeholderNames: new Set()
+ };
+ const isLegacyRef = {
+ value: undefined
+ };
+ traverse(ast, placeholderVisitorHandler, {
+ syntactic,
+ legacy,
+ isLegacyRef,
+ placeholderWhitelist,
+ placeholderPattern,
+ syntacticPlaceholders
+ });
+ return Object.assign({
+ ast
+ }, isLegacyRef.value ? legacy : syntactic);
+}
+
+function placeholderVisitorHandler(node, ancestors, state) {
+ var _state$placeholderWhi;
+
+ let name;
+
+ if (isPlaceholder(node)) {
+ if (state.syntacticPlaceholders === false) {
+ throw new Error("%%foo%%-style placeholders can't be used when " + "'.syntacticPlaceholders' is false.");
+ } else {
+ name = node.name.name;
+ state.isLegacyRef.value = false;
+ }
+ } else if (state.isLegacyRef.value === false || state.syntacticPlaceholders) {
+ return;
+ } else if (isIdentifier(node) || isJSXIdentifier(node)) {
+ name = node.name;
+ state.isLegacyRef.value = true;
+ } else if (isStringLiteral(node)) {
+ name = node.value;
+ state.isLegacyRef.value = true;
+ } else {
+ return;
+ }
+
+ if (!state.isLegacyRef.value && (state.placeholderPattern != null || state.placeholderWhitelist != null)) {
+ throw new Error("'.placeholderWhitelist' and '.placeholderPattern' aren't compatible" + " with '.syntacticPlaceholders: true'");
+ }
+
+ if (state.isLegacyRef.value && (state.placeholderPattern === false || !(state.placeholderPattern || PATTERN).test(name)) && !((_state$placeholderWhi = state.placeholderWhitelist) != null && _state$placeholderWhi.has(name))) {
+ return;
+ }
+
+ ancestors = ancestors.slice();
+ const {
+ node: parent,
+ key
+ } = ancestors[ancestors.length - 1];
+ let type;
+
+ if (isStringLiteral(node) || isPlaceholder(node, {
+ expectedNode: "StringLiteral"
+ })) {
+ type = "string";
+ } else if (isNewExpression(parent) && key === "arguments" || isCallExpression(parent) && key === "arguments" || isFunction(parent) && key === "params") {
+ type = "param";
+ } else if (isExpressionStatement(parent) && !isPlaceholder(node)) {
+ type = "statement";
+ ancestors = ancestors.slice(0, -1);
+ } else if (isStatement(node) && isPlaceholder(node)) {
+ type = "statement";
+ } else {
+ type = "other";
+ }
+
+ const {
+ placeholders,
+ placeholderNames
+ } = state.isLegacyRef.value ? state.legacy : state.syntactic;
+ placeholders.push({
+ name,
+ type,
+ resolve: ast => resolveAncestors(ast, ancestors),
+ isDuplicate: placeholderNames.has(name)
+ });
+ placeholderNames.add(name);
+}
+
+function resolveAncestors(ast, ancestors) {
+ let parent = ast;
+
+ for (let i = 0; i < ancestors.length - 1; i++) {
+ const {
+ key,
+ index
+ } = ancestors[i];
+
+ if (index === undefined) {
+ parent = parent[key];
+ } else {
+ parent = parent[key][index];
+ }
+ }
+
+ const {
+ key,
+ index
+ } = ancestors[ancestors.length - 1];
+ return {
+ parent,
+ key,
+ index
+ };
+}
+
+function parseWithCodeFrame(code, parserOpts, syntacticPlaceholders) {
+ const plugins = (parserOpts.plugins || []).slice();
+
+ if (syntacticPlaceholders !== false) {
+ plugins.push("placeholders");
+ }
+
+ parserOpts = Object.assign({
+ allowReturnOutsideFunction: true,
+ allowSuperOutsideMethod: true,
+ sourceType: "module"
+ }, parserOpts, {
+ plugins
+ });
+
+ try {
+ return (0, _parser.parse)(code, parserOpts);
+ } catch (err) {
+ const loc = err.loc;
+
+ if (loc) {
+ err.message += "\n" + (0, _codeFrame.codeFrameColumns)(code, {
+ start: loc
+ });
+ err.code = "BABEL_TEMPLATE_PARSE_ERROR";
+ }
+
+ throw err;
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/template/lib/populate.js b/node_modules/@babel/template/lib/populate.js
new file mode 100644
index 0000000..b912556
--- /dev/null
+++ b/node_modules/@babel/template/lib/populate.js
@@ -0,0 +1,135 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = populatePlaceholders;
+
+var _t = require("@babel/types");
+
+const {
+ blockStatement,
+ cloneNode,
+ emptyStatement,
+ expressionStatement,
+ identifier,
+ isStatement,
+ isStringLiteral,
+ stringLiteral,
+ validate
+} = _t;
+
+function populatePlaceholders(metadata, replacements) {
+ const ast = cloneNode(metadata.ast);
+
+ if (replacements) {
+ metadata.placeholders.forEach(placeholder => {
+ if (!Object.prototype.hasOwnProperty.call(replacements, placeholder.name)) {
+ const placeholderName = placeholder.name;
+ throw new Error(`Error: No substitution given for "${placeholderName}". If this is not meant to be a
+ placeholder you may want to consider passing one of the following options to @babel/template:
+ - { placeholderPattern: false, placeholderWhitelist: new Set(['${placeholderName}'])}
+ - { placeholderPattern: /^${placeholderName}$/ }`);
+ }
+ });
+ Object.keys(replacements).forEach(key => {
+ if (!metadata.placeholderNames.has(key)) {
+ throw new Error(`Unknown substitution "${key}" given`);
+ }
+ });
+ }
+
+ metadata.placeholders.slice().reverse().forEach(placeholder => {
+ try {
+ applyReplacement(placeholder, ast, replacements && replacements[placeholder.name] || null);
+ } catch (e) {
+ e.message = `@babel/template placeholder "${placeholder.name}": ${e.message}`;
+ throw e;
+ }
+ });
+ return ast;
+}
+
+function applyReplacement(placeholder, ast, replacement) {
+ if (placeholder.isDuplicate) {
+ if (Array.isArray(replacement)) {
+ replacement = replacement.map(node => cloneNode(node));
+ } else if (typeof replacement === "object") {
+ replacement = cloneNode(replacement);
+ }
+ }
+
+ const {
+ parent,
+ key,
+ index
+ } = placeholder.resolve(ast);
+
+ if (placeholder.type === "string") {
+ if (typeof replacement === "string") {
+ replacement = stringLiteral(replacement);
+ }
+
+ if (!replacement || !isStringLiteral(replacement)) {
+ throw new Error("Expected string substitution");
+ }
+ } else if (placeholder.type === "statement") {
+ if (index === undefined) {
+ if (!replacement) {
+ replacement = emptyStatement();
+ } else if (Array.isArray(replacement)) {
+ replacement = blockStatement(replacement);
+ } else if (typeof replacement === "string") {
+ replacement = expressionStatement(identifier(replacement));
+ } else if (!isStatement(replacement)) {
+ replacement = expressionStatement(replacement);
+ }
+ } else {
+ if (replacement && !Array.isArray(replacement)) {
+ if (typeof replacement === "string") {
+ replacement = identifier(replacement);
+ }
+
+ if (!isStatement(replacement)) {
+ replacement = expressionStatement(replacement);
+ }
+ }
+ }
+ } else if (placeholder.type === "param") {
+ if (typeof replacement === "string") {
+ replacement = identifier(replacement);
+ }
+
+ if (index === undefined) throw new Error("Assertion failure.");
+ } else {
+ if (typeof replacement === "string") {
+ replacement = identifier(replacement);
+ }
+
+ if (Array.isArray(replacement)) {
+ throw new Error("Cannot replace single expression with an array.");
+ }
+ }
+
+ if (index === undefined) {
+ validate(parent, key, replacement);
+ parent[key] = replacement;
+ } else {
+ const items = parent[key].slice();
+
+ if (placeholder.type === "statement" || placeholder.type === "param") {
+ if (replacement == null) {
+ items.splice(index, 1);
+ } else if (Array.isArray(replacement)) {
+ items.splice(index, 1, ...replacement);
+ } else {
+ items[index] = replacement;
+ }
+ } else {
+ items[index] = replacement;
+ }
+
+ validate(parent, key, items);
+ parent[key] = items;
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/template/lib/string.js b/node_modules/@babel/template/lib/string.js
new file mode 100644
index 0000000..fa8aade
--- /dev/null
+++ b/node_modules/@babel/template/lib/string.js
@@ -0,0 +1,22 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = stringTemplate;
+
+var _options = require("./options");
+
+var _parse = require("./parse");
+
+var _populate = require("./populate");
+
+function stringTemplate(formatter, code, opts) {
+ code = formatter.code(code);
+ let metadata;
+ return arg => {
+ const replacements = (0, _options.normalizeReplacements)(arg);
+ if (!metadata) metadata = (0, _parse.default)(formatter, code, opts);
+ return formatter.unwrap((0, _populate.default)(metadata, replacements));
+ };
+} \ No newline at end of file
diff --git a/node_modules/@babel/template/package.json b/node_modules/@babel/template/package.json
new file mode 100644
index 0000000..9aca58a
--- /dev/null
+++ b/node_modules/@babel/template/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "@babel/template",
+ "version": "7.16.7",
+ "description": "Generate an AST from a string template.",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-template",
+ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20template%22+is%3Aopen",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-template"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/code-frame": "^7.16.7",
+ "@babel/parser": "^7.16.7",
+ "@babel/types": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/LICENSE b/node_modules/@babel/traverse/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/traverse/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/traverse/README.md b/node_modules/@babel/traverse/README.md
new file mode 100644
index 0000000..e478f16
--- /dev/null
+++ b/node_modules/@babel/traverse/README.md
@@ -0,0 +1,19 @@
+# @babel/traverse
+
+> The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes
+
+See our website [@babel/traverse](https://babeljs.io/docs/en/babel-traverse) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20traverse%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/traverse
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/traverse --dev
+```
diff --git a/node_modules/@babel/traverse/lib/cache.js b/node_modules/@babel/traverse/lib/cache.js
new file mode 100644
index 0000000..89f2007
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/cache.js
@@ -0,0 +1,26 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.clear = clear;
+exports.clearPath = clearPath;
+exports.clearScope = clearScope;
+exports.scope = exports.path = void 0;
+let path = new WeakMap();
+exports.path = path;
+let scope = new WeakMap();
+exports.scope = scope;
+
+function clear() {
+ clearPath();
+ clearScope();
+}
+
+function clearPath() {
+ exports.path = path = new WeakMap();
+}
+
+function clearScope() {
+ exports.scope = scope = new WeakMap();
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/context.js b/node_modules/@babel/traverse/lib/context.js
new file mode 100644
index 0000000..25e2e0a
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/context.js
@@ -0,0 +1,137 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _path = require("./path");
+
+var _t = require("@babel/types");
+
+const {
+ VISITOR_KEYS
+} = _t;
+
+class TraversalContext {
+ constructor(scope, opts, state, parentPath) {
+ this.queue = null;
+ this.priorityQueue = null;
+ this.parentPath = parentPath;
+ this.scope = scope;
+ this.state = state;
+ this.opts = opts;
+ }
+
+ shouldVisit(node) {
+ const opts = this.opts;
+ if (opts.enter || opts.exit) return true;
+ if (opts[node.type]) return true;
+ const keys = VISITOR_KEYS[node.type];
+ if (!(keys != null && keys.length)) return false;
+
+ for (const key of keys) {
+ if (node[key]) return true;
+ }
+
+ return false;
+ }
+
+ create(node, obj, key, listKey) {
+ return _path.default.get({
+ parentPath: this.parentPath,
+ parent: node,
+ container: obj,
+ key: key,
+ listKey
+ });
+ }
+
+ maybeQueue(path, notPriority) {
+ if (this.queue) {
+ if (notPriority) {
+ this.queue.push(path);
+ } else {
+ this.priorityQueue.push(path);
+ }
+ }
+ }
+
+ visitMultiple(container, parent, listKey) {
+ if (container.length === 0) return false;
+ const queue = [];
+
+ for (let key = 0; key < container.length; key++) {
+ const node = container[key];
+
+ if (node && this.shouldVisit(node)) {
+ queue.push(this.create(parent, container, key, listKey));
+ }
+ }
+
+ return this.visitQueue(queue);
+ }
+
+ visitSingle(node, key) {
+ if (this.shouldVisit(node[key])) {
+ return this.visitQueue([this.create(node, node, key)]);
+ } else {
+ return false;
+ }
+ }
+
+ visitQueue(queue) {
+ this.queue = queue;
+ this.priorityQueue = [];
+ const visited = new WeakSet();
+ let stop = false;
+
+ for (const path of queue) {
+ path.resync();
+
+ if (path.contexts.length === 0 || path.contexts[path.contexts.length - 1] !== this) {
+ path.pushContext(this);
+ }
+
+ if (path.key === null) continue;
+ const {
+ node
+ } = path;
+ if (visited.has(node)) continue;
+ if (node) visited.add(node);
+
+ if (path.visit()) {
+ stop = true;
+ break;
+ }
+
+ if (this.priorityQueue.length) {
+ stop = this.visitQueue(this.priorityQueue);
+ this.priorityQueue = [];
+ this.queue = queue;
+ if (stop) break;
+ }
+ }
+
+ for (const path of queue) {
+ path.popContext();
+ }
+
+ this.queue = null;
+ return stop;
+ }
+
+ visit(node, key) {
+ const nodes = node[key];
+ if (!nodes) return false;
+
+ if (Array.isArray(nodes)) {
+ return this.visitMultiple(nodes, node, key);
+ } else {
+ return this.visitSingle(node, key);
+ }
+ }
+
+}
+
+exports.default = TraversalContext; \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/hub.js b/node_modules/@babel/traverse/lib/hub.js
new file mode 100644
index 0000000..fe139d2
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/hub.js
@@ -0,0 +1,23 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+class Hub {
+ getCode() {}
+
+ getScope() {}
+
+ addHelper() {
+ throw new Error("Helpers are not supported by the default hub.");
+ }
+
+ buildError(node, msg, Error = TypeError) {
+ return new Error(msg);
+ }
+
+}
+
+exports.default = Hub; \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/index.js b/node_modules/@babel/traverse/lib/index.js
new file mode 100644
index 0000000..4440678
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/index.js
@@ -0,0 +1,111 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "Hub", {
+ enumerable: true,
+ get: function () {
+ return _hub.default;
+ }
+});
+Object.defineProperty(exports, "NodePath", {
+ enumerable: true,
+ get: function () {
+ return _path.default;
+ }
+});
+Object.defineProperty(exports, "Scope", {
+ enumerable: true,
+ get: function () {
+ return _scope.default;
+ }
+});
+exports.visitors = exports.default = void 0;
+
+var visitors = require("./visitors");
+
+exports.visitors = visitors;
+
+var _t = require("@babel/types");
+
+var cache = require("./cache");
+
+var _traverseNode = require("./traverse-node");
+
+var _path = require("./path");
+
+var _scope = require("./scope");
+
+var _hub = require("./hub");
+
+const {
+ VISITOR_KEYS,
+ removeProperties,
+ traverseFast
+} = _t;
+
+function traverse(parent, opts = {}, scope, state, parentPath) {
+ if (!parent) return;
+
+ if (!opts.noScope && !scope) {
+ if (parent.type !== "Program" && parent.type !== "File") {
+ throw new Error("You must pass a scope and parentPath unless traversing a Program/File. " + `Instead of that you tried to traverse a ${parent.type} node without ` + "passing scope and parentPath.");
+ }
+ }
+
+ if (!VISITOR_KEYS[parent.type]) {
+ return;
+ }
+
+ visitors.explode(opts);
+ (0, _traverseNode.traverseNode)(parent, opts, scope, state, parentPath);
+}
+
+var _default = traverse;
+exports.default = _default;
+traverse.visitors = visitors;
+traverse.verify = visitors.verify;
+traverse.explode = visitors.explode;
+
+traverse.cheap = function (node, enter) {
+ return traverseFast(node, enter);
+};
+
+traverse.node = function (node, opts, scope, state, path, skipKeys) {
+ (0, _traverseNode.traverseNode)(node, opts, scope, state, path, skipKeys);
+};
+
+traverse.clearNode = function (node, opts) {
+ removeProperties(node, opts);
+ cache.path.delete(node);
+};
+
+traverse.removeProperties = function (tree, opts) {
+ traverseFast(tree, traverse.clearNode, opts);
+ return tree;
+};
+
+function hasDenylistedType(path, state) {
+ if (path.node.type === state.type) {
+ state.has = true;
+ path.stop();
+ }
+}
+
+traverse.hasType = function (tree, type, denylistTypes) {
+ if (denylistTypes != null && denylistTypes.includes(tree.type)) return false;
+ if (tree.type === type) return true;
+ const state = {
+ has: false,
+ type: type
+ };
+ traverse(tree, {
+ noScope: true,
+ denylist: denylistTypes,
+ enter: hasDenylistedType
+ }, null, state);
+ return state.has;
+};
+
+traverse.cache = cache; \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/ancestry.js b/node_modules/@babel/traverse/lib/path/ancestry.js
new file mode 100644
index 0000000..23f6720
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/ancestry.js
@@ -0,0 +1,180 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.find = find;
+exports.findParent = findParent;
+exports.getAncestry = getAncestry;
+exports.getDeepestCommonAncestorFrom = getDeepestCommonAncestorFrom;
+exports.getEarliestCommonAncestorFrom = getEarliestCommonAncestorFrom;
+exports.getFunctionParent = getFunctionParent;
+exports.getStatementParent = getStatementParent;
+exports.inType = inType;
+exports.isAncestor = isAncestor;
+exports.isDescendant = isDescendant;
+
+var _t = require("@babel/types");
+
+var _index = require("./index");
+
+const {
+ VISITOR_KEYS
+} = _t;
+
+function findParent(callback) {
+ let path = this;
+
+ while (path = path.parentPath) {
+ if (callback(path)) return path;
+ }
+
+ return null;
+}
+
+function find(callback) {
+ let path = this;
+
+ do {
+ if (callback(path)) return path;
+ } while (path = path.parentPath);
+
+ return null;
+}
+
+function getFunctionParent() {
+ return this.findParent(p => p.isFunction());
+}
+
+function getStatementParent() {
+ let path = this;
+
+ do {
+ if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
+ break;
+ } else {
+ path = path.parentPath;
+ }
+ } while (path);
+
+ if (path && (path.isProgram() || path.isFile())) {
+ throw new Error("File/Program node, we can't possibly find a statement parent to this");
+ }
+
+ return path;
+}
+
+function getEarliestCommonAncestorFrom(paths) {
+ return this.getDeepestCommonAncestorFrom(paths, function (deepest, i, ancestries) {
+ let earliest;
+ const keys = VISITOR_KEYS[deepest.type];
+
+ for (const ancestry of ancestries) {
+ const path = ancestry[i + 1];
+
+ if (!earliest) {
+ earliest = path;
+ continue;
+ }
+
+ if (path.listKey && earliest.listKey === path.listKey) {
+ if (path.key < earliest.key) {
+ earliest = path;
+ continue;
+ }
+ }
+
+ const earliestKeyIndex = keys.indexOf(earliest.parentKey);
+ const currentKeyIndex = keys.indexOf(path.parentKey);
+
+ if (earliestKeyIndex > currentKeyIndex) {
+ earliest = path;
+ }
+ }
+
+ return earliest;
+ });
+}
+
+function getDeepestCommonAncestorFrom(paths, filter) {
+ if (!paths.length) {
+ return this;
+ }
+
+ if (paths.length === 1) {
+ return paths[0];
+ }
+
+ let minDepth = Infinity;
+ let lastCommonIndex, lastCommon;
+ const ancestries = paths.map(path => {
+ const ancestry = [];
+
+ do {
+ ancestry.unshift(path);
+ } while ((path = path.parentPath) && path !== this);
+
+ if (ancestry.length < minDepth) {
+ minDepth = ancestry.length;
+ }
+
+ return ancestry;
+ });
+ const first = ancestries[0];
+
+ depthLoop: for (let i = 0; i < minDepth; i++) {
+ const shouldMatch = first[i];
+
+ for (const ancestry of ancestries) {
+ if (ancestry[i] !== shouldMatch) {
+ break depthLoop;
+ }
+ }
+
+ lastCommonIndex = i;
+ lastCommon = shouldMatch;
+ }
+
+ if (lastCommon) {
+ if (filter) {
+ return filter(lastCommon, lastCommonIndex, ancestries);
+ } else {
+ return lastCommon;
+ }
+ } else {
+ throw new Error("Couldn't find intersection");
+ }
+}
+
+function getAncestry() {
+ let path = this;
+ const paths = [];
+
+ do {
+ paths.push(path);
+ } while (path = path.parentPath);
+
+ return paths;
+}
+
+function isAncestor(maybeDescendant) {
+ return maybeDescendant.isDescendant(this);
+}
+
+function isDescendant(maybeAncestor) {
+ return !!this.findParent(parent => parent === maybeAncestor);
+}
+
+function inType(...candidateTypes) {
+ let path = this;
+
+ while (path) {
+ for (const type of candidateTypes) {
+ if (path.node.type === type) return true;
+ }
+
+ path = path.parentPath;
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/comments.js b/node_modules/@babel/traverse/lib/path/comments.js
new file mode 100644
index 0000000..d42bd29
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/comments.js
@@ -0,0 +1,42 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.addComment = addComment;
+exports.addComments = addComments;
+exports.shareCommentsWithSiblings = shareCommentsWithSiblings;
+
+var _t = require("@babel/types");
+
+const {
+ addComment: _addComment,
+ addComments: _addComments
+} = _t;
+
+function shareCommentsWithSiblings() {
+ if (typeof this.key === "string") return;
+ const node = this.node;
+ if (!node) return;
+ const trailing = node.trailingComments;
+ const leading = node.leadingComments;
+ if (!trailing && !leading) return;
+ const prev = this.getSibling(this.key - 1);
+ const next = this.getSibling(this.key + 1);
+ const hasPrev = Boolean(prev.node);
+ const hasNext = Boolean(next.node);
+
+ if (hasPrev && !hasNext) {
+ prev.addComments("trailing", trailing);
+ } else if (hasNext && !hasPrev) {
+ next.addComments("leading", leading);
+ }
+}
+
+function addComment(type, content, line) {
+ _addComment(this.node, type, content, line);
+}
+
+function addComments(type, comments) {
+ _addComments(this.node, type, comments);
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/context.js b/node_modules/@babel/traverse/lib/path/context.js
new file mode 100644
index 0000000..b11f08d
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/context.js
@@ -0,0 +1,263 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports._call = _call;
+exports._getQueueContexts = _getQueueContexts;
+exports._resyncKey = _resyncKey;
+exports._resyncList = _resyncList;
+exports._resyncParent = _resyncParent;
+exports._resyncRemoved = _resyncRemoved;
+exports.call = call;
+exports.isBlacklisted = exports.isDenylisted = isDenylisted;
+exports.popContext = popContext;
+exports.pushContext = pushContext;
+exports.requeue = requeue;
+exports.resync = resync;
+exports.setContext = setContext;
+exports.setKey = setKey;
+exports.setScope = setScope;
+exports.setup = setup;
+exports.skip = skip;
+exports.skipKey = skipKey;
+exports.stop = stop;
+exports.visit = visit;
+
+var _traverseNode = require("../traverse-node");
+
+var _index = require("./index");
+
+function call(key) {
+ const opts = this.opts;
+ this.debug(key);
+
+ if (this.node) {
+ if (this._call(opts[key])) return true;
+ }
+
+ if (this.node) {
+ return this._call(opts[this.node.type] && opts[this.node.type][key]);
+ }
+
+ return false;
+}
+
+function _call(fns) {
+ if (!fns) return false;
+
+ for (const fn of fns) {
+ if (!fn) continue;
+ const node = this.node;
+ if (!node) return true;
+ const ret = fn.call(this.state, this, this.state);
+
+ if (ret && typeof ret === "object" && typeof ret.then === "function") {
+ throw new Error(`You appear to be using a plugin with an async traversal visitor, ` + `which your current version of Babel does not support. ` + `If you're using a published plugin, you may need to upgrade ` + `your @babel/core version.`);
+ }
+
+ if (ret) {
+ throw new Error(`Unexpected return value from visitor method ${fn}`);
+ }
+
+ if (this.node !== node) return true;
+ if (this._traverseFlags > 0) return true;
+ }
+
+ return false;
+}
+
+function isDenylisted() {
+ var _this$opts$denylist;
+
+ const denylist = (_this$opts$denylist = this.opts.denylist) != null ? _this$opts$denylist : this.opts.blacklist;
+ return denylist && denylist.indexOf(this.node.type) > -1;
+}
+
+function restoreContext(path, context) {
+ if (path.context !== context) {
+ path.context = context;
+ path.state = context.state;
+ path.opts = context.opts;
+ }
+}
+
+function visit() {
+ if (!this.node) {
+ return false;
+ }
+
+ if (this.isDenylisted()) {
+ return false;
+ }
+
+ if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
+ return false;
+ }
+
+ const currentContext = this.context;
+
+ if (this.shouldSkip || this.call("enter")) {
+ this.debug("Skip...");
+ return this.shouldStop;
+ }
+
+ restoreContext(this, currentContext);
+ this.debug("Recursing into...");
+ this.shouldStop = (0, _traverseNode.traverseNode)(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
+ restoreContext(this, currentContext);
+ this.call("exit");
+ return this.shouldStop;
+}
+
+function skip() {
+ this.shouldSkip = true;
+}
+
+function skipKey(key) {
+ if (this.skipKeys == null) {
+ this.skipKeys = {};
+ }
+
+ this.skipKeys[key] = true;
+}
+
+function stop() {
+ this._traverseFlags |= _index.SHOULD_SKIP | _index.SHOULD_STOP;
+}
+
+function setScope() {
+ if (this.opts && this.opts.noScope) return;
+ let path = this.parentPath;
+ if (this.key === "key" && path.isMethod()) path = path.parentPath;
+ let target;
+
+ while (path && !target) {
+ if (path.opts && path.opts.noScope) return;
+ target = path.scope;
+ path = path.parentPath;
+ }
+
+ this.scope = this.getScope(target);
+ if (this.scope) this.scope.init();
+}
+
+function setContext(context) {
+ if (this.skipKeys != null) {
+ this.skipKeys = {};
+ }
+
+ this._traverseFlags = 0;
+
+ if (context) {
+ this.context = context;
+ this.state = context.state;
+ this.opts = context.opts;
+ }
+
+ this.setScope();
+ return this;
+}
+
+function resync() {
+ if (this.removed) return;
+
+ this._resyncParent();
+
+ this._resyncList();
+
+ this._resyncKey();
+}
+
+function _resyncParent() {
+ if (this.parentPath) {
+ this.parent = this.parentPath.node;
+ }
+}
+
+function _resyncKey() {
+ if (!this.container) return;
+ if (this.node === this.container[this.key]) return;
+
+ if (Array.isArray(this.container)) {
+ for (let i = 0; i < this.container.length; i++) {
+ if (this.container[i] === this.node) {
+ return this.setKey(i);
+ }
+ }
+ } else {
+ for (const key of Object.keys(this.container)) {
+ if (this.container[key] === this.node) {
+ return this.setKey(key);
+ }
+ }
+ }
+
+ this.key = null;
+}
+
+function _resyncList() {
+ if (!this.parent || !this.inList) return;
+ const newContainer = this.parent[this.listKey];
+ if (this.container === newContainer) return;
+ this.container = newContainer || null;
+}
+
+function _resyncRemoved() {
+ if (this.key == null || !this.container || this.container[this.key] !== this.node) {
+ this._markRemoved();
+ }
+}
+
+function popContext() {
+ this.contexts.pop();
+
+ if (this.contexts.length > 0) {
+ this.setContext(this.contexts[this.contexts.length - 1]);
+ } else {
+ this.setContext(undefined);
+ }
+}
+
+function pushContext(context) {
+ this.contexts.push(context);
+ this.setContext(context);
+}
+
+function setup(parentPath, container, listKey, key) {
+ this.listKey = listKey;
+ this.container = container;
+ this.parentPath = parentPath || this.parentPath;
+ this.setKey(key);
+}
+
+function setKey(key) {
+ var _this$node;
+
+ this.key = key;
+ this.node = this.container[this.key];
+ this.type = (_this$node = this.node) == null ? void 0 : _this$node.type;
+}
+
+function requeue(pathToQueue = this) {
+ if (pathToQueue.removed) return;
+ ;
+ const contexts = this.contexts;
+
+ for (const context of contexts) {
+ context.maybeQueue(pathToQueue);
+ }
+}
+
+function _getQueueContexts() {
+ let path = this;
+ let contexts = this.contexts;
+
+ while (!contexts.length) {
+ path = path.parentPath;
+ if (!path) break;
+ contexts = path.contexts;
+ }
+
+ return contexts;
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/conversion.js b/node_modules/@babel/traverse/lib/path/conversion.js
new file mode 100644
index 0000000..a019d22
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/conversion.js
@@ -0,0 +1,531 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.arrowFunctionToExpression = arrowFunctionToExpression;
+exports.arrowFunctionToShadowed = arrowFunctionToShadowed;
+exports.ensureBlock = ensureBlock;
+exports.toComputedKey = toComputedKey;
+exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment;
+
+var _t = require("@babel/types");
+
+var _helperEnvironmentVisitor = require("@babel/helper-environment-visitor");
+
+var _helperFunctionName = require("@babel/helper-function-name");
+
+var _visitors = require("../visitors");
+
+const {
+ arrowFunctionExpression,
+ assignmentExpression,
+ binaryExpression,
+ blockStatement,
+ callExpression,
+ conditionalExpression,
+ expressionStatement,
+ identifier,
+ isIdentifier,
+ jsxIdentifier,
+ logicalExpression,
+ LOGICAL_OPERATORS,
+ memberExpression,
+ metaProperty,
+ numericLiteral,
+ objectExpression,
+ restElement,
+ returnStatement,
+ sequenceExpression,
+ spreadElement,
+ stringLiteral,
+ super: _super,
+ thisExpression,
+ toExpression,
+ unaryExpression
+} = _t;
+
+function toComputedKey() {
+ let key;
+
+ if (this.isMemberExpression()) {
+ key = this.node.property;
+ } else if (this.isProperty() || this.isMethod()) {
+ key = this.node.key;
+ } else {
+ throw new ReferenceError("todo");
+ }
+
+ if (!this.node.computed) {
+ if (isIdentifier(key)) key = stringLiteral(key.name);
+ }
+
+ return key;
+}
+
+function ensureBlock() {
+ const body = this.get("body");
+ const bodyNode = body.node;
+
+ if (Array.isArray(body)) {
+ throw new Error("Can't convert array path to a block statement");
+ }
+
+ if (!bodyNode) {
+ throw new Error("Can't convert node without a body");
+ }
+
+ if (body.isBlockStatement()) {
+ return bodyNode;
+ }
+
+ const statements = [];
+ let stringPath = "body";
+ let key;
+ let listKey;
+
+ if (body.isStatement()) {
+ listKey = "body";
+ key = 0;
+ statements.push(body.node);
+ } else {
+ stringPath += ".body.0";
+
+ if (this.isFunction()) {
+ key = "argument";
+ statements.push(returnStatement(body.node));
+ } else {
+ key = "expression";
+ statements.push(expressionStatement(body.node));
+ }
+ }
+
+ this.node.body = blockStatement(statements);
+ const parentPath = this.get(stringPath);
+ body.setup(parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
+ return this.node;
+}
+
+function arrowFunctionToShadowed() {
+ if (!this.isArrowFunctionExpression()) return;
+ this.arrowFunctionToExpression();
+}
+
+function unwrapFunctionEnvironment() {
+ if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
+ throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
+ }
+
+ hoistFunctionEnvironment(this);
+}
+
+function arrowFunctionToExpression({
+ allowInsertArrow = true,
+ specCompliant = false,
+ noNewArrows = !specCompliant
+} = {}) {
+ if (!this.isArrowFunctionExpression()) {
+ throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
+ }
+
+ const {
+ thisBinding,
+ fnPath: fn
+ } = hoistFunctionEnvironment(this, noNewArrows, allowInsertArrow);
+ fn.ensureBlock();
+ fn.node.type = "FunctionExpression";
+
+ if (!noNewArrows) {
+ const checkBinding = thisBinding ? null : fn.scope.generateUidIdentifier("arrowCheckId");
+
+ if (checkBinding) {
+ fn.parentPath.scope.push({
+ id: checkBinding,
+ init: objectExpression([])
+ });
+ }
+
+ fn.get("body").unshiftContainer("body", expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"), [thisExpression(), checkBinding ? identifier(checkBinding.name) : identifier(thisBinding)])));
+ fn.replaceWith(callExpression(memberExpression((0, _helperFunctionName.default)(this, true) || fn.node, identifier("bind")), [checkBinding ? identifier(checkBinding.name) : thisExpression()]));
+ }
+}
+
+const getSuperCallsVisitor = (0, _visitors.merge)([{
+ CallExpression(child, {
+ allSuperCalls
+ }) {
+ if (!child.get("callee").isSuper()) return;
+ allSuperCalls.push(child);
+ }
+
+}, _helperEnvironmentVisitor.default]);
+
+function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow = true) {
+ let arrowParent;
+ let thisEnvFn = fnPath.findParent(p => {
+ if (p.isArrowFunctionExpression()) {
+ var _arrowParent;
+
+ (_arrowParent = arrowParent) != null ? _arrowParent : arrowParent = p;
+ return false;
+ }
+
+ return p.isFunction() || p.isProgram() || p.isClassProperty({
+ static: false
+ }) || p.isClassPrivateProperty({
+ static: false
+ });
+ });
+ const inConstructor = thisEnvFn.isClassMethod({
+ kind: "constructor"
+ });
+
+ if (thisEnvFn.isClassProperty() || thisEnvFn.isClassPrivateProperty()) {
+ if (arrowParent) {
+ thisEnvFn = arrowParent;
+ } else if (allowInsertArrow) {
+ fnPath.replaceWith(callExpression(arrowFunctionExpression([], toExpression(fnPath.node)), []));
+ thisEnvFn = fnPath.get("callee");
+ fnPath = thisEnvFn.get("body");
+ } else {
+ throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
+ }
+ }
+
+ const {
+ thisPaths,
+ argumentsPaths,
+ newTargetPaths,
+ superProps,
+ superCalls
+ } = getScopeInformation(fnPath);
+
+ if (inConstructor && superCalls.length > 0) {
+ if (!allowInsertArrow) {
+ throw superCalls[0].buildCodeFrameError("Unable to handle nested super() usage in arrow");
+ }
+
+ const allSuperCalls = [];
+ thisEnvFn.traverse(getSuperCallsVisitor, {
+ allSuperCalls
+ });
+ const superBinding = getSuperBinding(thisEnvFn);
+ allSuperCalls.forEach(superCall => {
+ const callee = identifier(superBinding);
+ callee.loc = superCall.node.callee.loc;
+ superCall.get("callee").replaceWith(callee);
+ });
+ }
+
+ if (argumentsPaths.length > 0) {
+ const argumentsBinding = getBinding(thisEnvFn, "arguments", () => {
+ const args = () => identifier("arguments");
+
+ if (thisEnvFn.scope.path.isProgram()) {
+ return conditionalExpression(binaryExpression("===", unaryExpression("typeof", args()), stringLiteral("undefined")), thisEnvFn.scope.buildUndefinedNode(), args());
+ } else {
+ return args();
+ }
+ });
+ argumentsPaths.forEach(argumentsChild => {
+ const argsRef = identifier(argumentsBinding);
+ argsRef.loc = argumentsChild.node.loc;
+ argumentsChild.replaceWith(argsRef);
+ });
+ }
+
+ if (newTargetPaths.length > 0) {
+ const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => metaProperty(identifier("new"), identifier("target")));
+ newTargetPaths.forEach(targetChild => {
+ const targetRef = identifier(newTargetBinding);
+ targetRef.loc = targetChild.node.loc;
+ targetChild.replaceWith(targetRef);
+ });
+ }
+
+ if (superProps.length > 0) {
+ if (!allowInsertArrow) {
+ throw superProps[0].buildCodeFrameError("Unable to handle nested super.prop usage");
+ }
+
+ const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []);
+ flatSuperProps.forEach(superProp => {
+ const key = superProp.node.computed ? "" : superProp.get("property").node.name;
+ const isAssignment = superProp.parentPath.isAssignmentExpression({
+ left: superProp.node
+ });
+ const isCall = superProp.parentPath.isCallExpression({
+ callee: superProp.node
+ });
+ const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
+ const args = [];
+
+ if (superProp.node.computed) {
+ args.push(superProp.get("property").node);
+ }
+
+ if (isAssignment) {
+ const value = superProp.parentPath.node.right;
+ args.push(value);
+ }
+
+ const call = callExpression(identifier(superBinding), args);
+
+ if (isCall) {
+ superProp.parentPath.unshiftContainer("arguments", thisExpression());
+ superProp.replaceWith(memberExpression(call, identifier("call")));
+ thisPaths.push(superProp.parentPath.get("arguments.0"));
+ } else if (isAssignment) {
+ superProp.parentPath.replaceWith(call);
+ } else {
+ superProp.replaceWith(call);
+ }
+ });
+ }
+
+ let thisBinding;
+
+ if (thisPaths.length > 0 || !noNewArrows) {
+ thisBinding = getThisBinding(thisEnvFn, inConstructor);
+
+ if (noNewArrows || inConstructor && hasSuperClass(thisEnvFn)) {
+ thisPaths.forEach(thisChild => {
+ const thisRef = thisChild.isJSX() ? jsxIdentifier(thisBinding) : identifier(thisBinding);
+ thisRef.loc = thisChild.node.loc;
+ thisChild.replaceWith(thisRef);
+ });
+ if (!noNewArrows) thisBinding = null;
+ }
+ }
+
+ return {
+ thisBinding,
+ fnPath
+ };
+}
+
+function isLogicalOp(op) {
+ return LOGICAL_OPERATORS.includes(op);
+}
+
+function standardizeSuperProperty(superProp) {
+ if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
+ const assignmentPath = superProp.parentPath;
+ const op = assignmentPath.node.operator.slice(0, -1);
+ const value = assignmentPath.node.right;
+ const isLogicalAssignment = isLogicalOp(op);
+
+ if (superProp.node.computed) {
+ const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
+ const object = superProp.node.object;
+ const property = superProp.node.property;
+ assignmentPath.get("left").replaceWith(memberExpression(object, assignmentExpression("=", tmp, property), true));
+ assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment ? "=" : op, memberExpression(object, identifier(tmp.name), true), value));
+ } else {
+ const object = superProp.node.object;
+ const property = superProp.node.property;
+ assignmentPath.get("left").replaceWith(memberExpression(object, property));
+ assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment ? "=" : op, memberExpression(object, identifier(property.name)), value));
+ }
+
+ if (isLogicalAssignment) {
+ assignmentPath.replaceWith(logicalExpression(op, assignmentPath.node.left, assignmentPath.node.right));
+ } else {
+ assignmentPath.node.operator = "=";
+ }
+
+ return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
+ } else if (superProp.parentPath.isUpdateExpression()) {
+ const updateExpr = superProp.parentPath;
+ const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
+ const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
+ const parts = [assignmentExpression("=", tmp, memberExpression(superProp.node.object, computedKey ? assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), assignmentExpression("=", memberExpression(superProp.node.object, computedKey ? identifier(computedKey.name) : superProp.node.property, superProp.node.computed), binaryExpression(superProp.parentPath.node.operator[0], identifier(tmp.name), numericLiteral(1)))];
+
+ if (!superProp.parentPath.node.prefix) {
+ parts.push(identifier(tmp.name));
+ }
+
+ updateExpr.replaceWith(sequenceExpression(parts));
+ const left = updateExpr.get("expressions.0.right");
+ const right = updateExpr.get("expressions.1.left");
+ return [left, right];
+ }
+
+ return [superProp];
+
+ function rightExpression(op, left, right) {
+ if (op === "=") {
+ return assignmentExpression("=", left, right);
+ } else {
+ return binaryExpression(op, left, right);
+ }
+ }
+}
+
+function hasSuperClass(thisEnvFn) {
+ return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
+}
+
+const assignSuperThisVisitor = (0, _visitors.merge)([{
+ CallExpression(child, {
+ supers,
+ thisBinding
+ }) {
+ if (!child.get("callee").isSuper()) return;
+ if (supers.has(child.node)) return;
+ supers.add(child.node);
+ child.replaceWithMultiple([child.node, assignmentExpression("=", identifier(thisBinding), identifier("this"))]);
+ }
+
+}, _helperEnvironmentVisitor.default]);
+
+function getThisBinding(thisEnvFn, inConstructor) {
+ return getBinding(thisEnvFn, "this", thisBinding => {
+ if (!inConstructor || !hasSuperClass(thisEnvFn)) return thisExpression();
+ thisEnvFn.traverse(assignSuperThisVisitor, {
+ supers: new WeakSet(),
+ thisBinding
+ });
+ });
+}
+
+function getSuperBinding(thisEnvFn) {
+ return getBinding(thisEnvFn, "supercall", () => {
+ const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
+ return arrowFunctionExpression([restElement(argsBinding)], callExpression(_super(), [spreadElement(identifier(argsBinding.name))]));
+ });
+}
+
+function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
+ const op = isAssignment ? "set" : "get";
+ return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => {
+ const argsList = [];
+ let fnBody;
+
+ if (propName) {
+ fnBody = memberExpression(_super(), identifier(propName));
+ } else {
+ const method = thisEnvFn.scope.generateUidIdentifier("prop");
+ argsList.unshift(method);
+ fnBody = memberExpression(_super(), identifier(method.name), true);
+ }
+
+ if (isAssignment) {
+ const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
+ argsList.push(valueIdent);
+ fnBody = assignmentExpression("=", fnBody, identifier(valueIdent.name));
+ }
+
+ return arrowFunctionExpression(argsList, fnBody);
+ });
+}
+
+function getBinding(thisEnvFn, key, init) {
+ const cacheKey = "binding:" + key;
+ let data = thisEnvFn.getData(cacheKey);
+
+ if (!data) {
+ const id = thisEnvFn.scope.generateUidIdentifier(key);
+ data = id.name;
+ thisEnvFn.setData(cacheKey, data);
+ thisEnvFn.scope.push({
+ id: id,
+ init: init(data)
+ });
+ }
+
+ return data;
+}
+
+const getScopeInformationVisitor = (0, _visitors.merge)([{
+ ThisExpression(child, {
+ thisPaths
+ }) {
+ thisPaths.push(child);
+ },
+
+ JSXIdentifier(child, {
+ thisPaths
+ }) {
+ if (child.node.name !== "this") return;
+
+ if (!child.parentPath.isJSXMemberExpression({
+ object: child.node
+ }) && !child.parentPath.isJSXOpeningElement({
+ name: child.node
+ })) {
+ return;
+ }
+
+ thisPaths.push(child);
+ },
+
+ CallExpression(child, {
+ superCalls
+ }) {
+ if (child.get("callee").isSuper()) superCalls.push(child);
+ },
+
+ MemberExpression(child, {
+ superProps
+ }) {
+ if (child.get("object").isSuper()) superProps.push(child);
+ },
+
+ Identifier(child, {
+ argumentsPaths
+ }) {
+ if (!child.isReferencedIdentifier({
+ name: "arguments"
+ })) return;
+ let curr = child.scope;
+
+ do {
+ if (curr.hasOwnBinding("arguments")) {
+ curr.rename("arguments");
+ return;
+ }
+
+ if (curr.path.isFunction() && !curr.path.isArrowFunctionExpression()) {
+ break;
+ }
+ } while (curr = curr.parent);
+
+ argumentsPaths.push(child);
+ },
+
+ MetaProperty(child, {
+ newTargetPaths
+ }) {
+ if (!child.get("meta").isIdentifier({
+ name: "new"
+ })) return;
+ if (!child.get("property").isIdentifier({
+ name: "target"
+ })) return;
+ newTargetPaths.push(child);
+ }
+
+}, _helperEnvironmentVisitor.default]);
+
+function getScopeInformation(fnPath) {
+ const thisPaths = [];
+ const argumentsPaths = [];
+ const newTargetPaths = [];
+ const superProps = [];
+ const superCalls = [];
+ fnPath.traverse(getScopeInformationVisitor, {
+ thisPaths,
+ argumentsPaths,
+ newTargetPaths,
+ superProps,
+ superCalls
+ });
+ return {
+ thisPaths,
+ argumentsPaths,
+ newTargetPaths,
+ superProps,
+ superCalls
+ };
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/evaluation.js b/node_modules/@babel/traverse/lib/path/evaluation.js
new file mode 100644
index 0000000..abbbe05
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/evaluation.js
@@ -0,0 +1,401 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.evaluate = evaluate;
+exports.evaluateTruthy = evaluateTruthy;
+const VALID_CALLEES = ["String", "Number", "Math"];
+const INVALID_METHODS = ["random"];
+
+function evaluateTruthy() {
+ const res = this.evaluate();
+ if (res.confident) return !!res.value;
+}
+
+function deopt(path, state) {
+ if (!state.confident) return;
+ state.deoptPath = path;
+ state.confident = false;
+}
+
+function evaluateCached(path, state) {
+ const {
+ node
+ } = path;
+ const {
+ seen
+ } = state;
+
+ if (seen.has(node)) {
+ const existing = seen.get(node);
+
+ if (existing.resolved) {
+ return existing.value;
+ } else {
+ deopt(path, state);
+ return;
+ }
+ } else {
+ const item = {
+ resolved: false
+ };
+ seen.set(node, item);
+
+ const val = _evaluate(path, state);
+
+ if (state.confident) {
+ item.resolved = true;
+ item.value = val;
+ }
+
+ return val;
+ }
+}
+
+function _evaluate(path, state) {
+ if (!state.confident) return;
+
+ if (path.isSequenceExpression()) {
+ const exprs = path.get("expressions");
+ return evaluateCached(exprs[exprs.length - 1], state);
+ }
+
+ if (path.isStringLiteral() || path.isNumericLiteral() || path.isBooleanLiteral()) {
+ return path.node.value;
+ }
+
+ if (path.isNullLiteral()) {
+ return null;
+ }
+
+ if (path.isTemplateLiteral()) {
+ return evaluateQuasis(path, path.node.quasis, state);
+ }
+
+ if (path.isTaggedTemplateExpression() && path.get("tag").isMemberExpression()) {
+ const object = path.get("tag.object");
+ const {
+ node: {
+ name
+ }
+ } = object;
+ const property = path.get("tag.property");
+
+ if (object.isIdentifier() && name === "String" && !path.scope.getBinding(name) && property.isIdentifier() && property.node.name === "raw") {
+ return evaluateQuasis(path, path.node.quasi.quasis, state, true);
+ }
+ }
+
+ if (path.isConditionalExpression()) {
+ const testResult = evaluateCached(path.get("test"), state);
+ if (!state.confident) return;
+
+ if (testResult) {
+ return evaluateCached(path.get("consequent"), state);
+ } else {
+ return evaluateCached(path.get("alternate"), state);
+ }
+ }
+
+ if (path.isExpressionWrapper()) {
+ return evaluateCached(path.get("expression"), state);
+ }
+
+ if (path.isMemberExpression() && !path.parentPath.isCallExpression({
+ callee: path.node
+ })) {
+ const property = path.get("property");
+ const object = path.get("object");
+
+ if (object.isLiteral() && property.isIdentifier()) {
+ const value = object.node.value;
+ const type = typeof value;
+
+ if (type === "number" || type === "string") {
+ return value[property.node.name];
+ }
+ }
+ }
+
+ if (path.isReferencedIdentifier()) {
+ const binding = path.scope.getBinding(path.node.name);
+
+ if (binding && binding.constantViolations.length > 0) {
+ return deopt(binding.path, state);
+ }
+
+ if (binding && path.node.start < binding.path.node.end) {
+ return deopt(binding.path, state);
+ }
+
+ if (binding != null && binding.hasValue) {
+ return binding.value;
+ } else {
+ if (path.node.name === "undefined") {
+ return binding ? deopt(binding.path, state) : undefined;
+ } else if (path.node.name === "Infinity") {
+ return binding ? deopt(binding.path, state) : Infinity;
+ } else if (path.node.name === "NaN") {
+ return binding ? deopt(binding.path, state) : NaN;
+ }
+
+ const resolved = path.resolve();
+
+ if (resolved === path) {
+ return deopt(path, state);
+ } else {
+ return evaluateCached(resolved, state);
+ }
+ }
+ }
+
+ if (path.isUnaryExpression({
+ prefix: true
+ })) {
+ if (path.node.operator === "void") {
+ return undefined;
+ }
+
+ const argument = path.get("argument");
+
+ if (path.node.operator === "typeof" && (argument.isFunction() || argument.isClass())) {
+ return "function";
+ }
+
+ const arg = evaluateCached(argument, state);
+ if (!state.confident) return;
+
+ switch (path.node.operator) {
+ case "!":
+ return !arg;
+
+ case "+":
+ return +arg;
+
+ case "-":
+ return -arg;
+
+ case "~":
+ return ~arg;
+
+ case "typeof":
+ return typeof arg;
+ }
+ }
+
+ if (path.isArrayExpression()) {
+ const arr = [];
+ const elems = path.get("elements");
+
+ for (const elem of elems) {
+ const elemValue = elem.evaluate();
+
+ if (elemValue.confident) {
+ arr.push(elemValue.value);
+ } else {
+ return deopt(elemValue.deopt, state);
+ }
+ }
+
+ return arr;
+ }
+
+ if (path.isObjectExpression()) {
+ const obj = {};
+ const props = path.get("properties");
+
+ for (const prop of props) {
+ if (prop.isObjectMethod() || prop.isSpreadElement()) {
+ return deopt(prop, state);
+ }
+
+ const keyPath = prop.get("key");
+ let key = keyPath;
+
+ if (prop.node.computed) {
+ key = key.evaluate();
+
+ if (!key.confident) {
+ return deopt(key.deopt, state);
+ }
+
+ key = key.value;
+ } else if (key.isIdentifier()) {
+ key = key.node.name;
+ } else {
+ key = key.node.value;
+ }
+
+ const valuePath = prop.get("value");
+ let value = valuePath.evaluate();
+
+ if (!value.confident) {
+ return deopt(value.deopt, state);
+ }
+
+ value = value.value;
+ obj[key] = value;
+ }
+
+ return obj;
+ }
+
+ if (path.isLogicalExpression()) {
+ const wasConfident = state.confident;
+ const left = evaluateCached(path.get("left"), state);
+ const leftConfident = state.confident;
+ state.confident = wasConfident;
+ const right = evaluateCached(path.get("right"), state);
+ const rightConfident = state.confident;
+
+ switch (path.node.operator) {
+ case "||":
+ state.confident = leftConfident && (!!left || rightConfident);
+ if (!state.confident) return;
+ return left || right;
+
+ case "&&":
+ state.confident = leftConfident && (!left || rightConfident);
+ if (!state.confident) return;
+ return left && right;
+ }
+ }
+
+ if (path.isBinaryExpression()) {
+ const left = evaluateCached(path.get("left"), state);
+ if (!state.confident) return;
+ const right = evaluateCached(path.get("right"), state);
+ if (!state.confident) return;
+
+ switch (path.node.operator) {
+ case "-":
+ return left - right;
+
+ case "+":
+ return left + right;
+
+ case "/":
+ return left / right;
+
+ case "*":
+ return left * right;
+
+ case "%":
+ return left % right;
+
+ case "**":
+ return Math.pow(left, right);
+
+ case "<":
+ return left < right;
+
+ case ">":
+ return left > right;
+
+ case "<=":
+ return left <= right;
+
+ case ">=":
+ return left >= right;
+
+ case "==":
+ return left == right;
+
+ case "!=":
+ return left != right;
+
+ case "===":
+ return left === right;
+
+ case "!==":
+ return left !== right;
+
+ case "|":
+ return left | right;
+
+ case "&":
+ return left & right;
+
+ case "^":
+ return left ^ right;
+
+ case "<<":
+ return left << right;
+
+ case ">>":
+ return left >> right;
+
+ case ">>>":
+ return left >>> right;
+ }
+ }
+
+ if (path.isCallExpression()) {
+ const callee = path.get("callee");
+ let context;
+ let func;
+
+ if (callee.isIdentifier() && !path.scope.getBinding(callee.node.name) && VALID_CALLEES.indexOf(callee.node.name) >= 0) {
+ func = global[callee.node.name];
+ }
+
+ if (callee.isMemberExpression()) {
+ const object = callee.get("object");
+ const property = callee.get("property");
+
+ if (object.isIdentifier() && property.isIdentifier() && VALID_CALLEES.indexOf(object.node.name) >= 0 && INVALID_METHODS.indexOf(property.node.name) < 0) {
+ context = global[object.node.name];
+ func = context[property.node.name];
+ }
+
+ if (object.isLiteral() && property.isIdentifier()) {
+ const type = typeof object.node.value;
+
+ if (type === "string" || type === "number") {
+ context = object.node.value;
+ func = context[property.node.name];
+ }
+ }
+ }
+
+ if (func) {
+ const args = path.get("arguments").map(arg => evaluateCached(arg, state));
+ if (!state.confident) return;
+ return func.apply(context, args);
+ }
+ }
+
+ deopt(path, state);
+}
+
+function evaluateQuasis(path, quasis, state, raw = false) {
+ let str = "";
+ let i = 0;
+ const exprs = path.get("expressions");
+
+ for (const elem of quasis) {
+ if (!state.confident) break;
+ str += raw ? elem.value.raw : elem.value.cooked;
+ const expr = exprs[i++];
+ if (expr) str += String(evaluateCached(expr, state));
+ }
+
+ if (!state.confident) return;
+ return str;
+}
+
+function evaluate() {
+ const state = {
+ confident: true,
+ deoptPath: null,
+ seen: new Map()
+ };
+ let value = evaluateCached(this, state);
+ if (!state.confident) value = undefined;
+ return {
+ confident: state.confident,
+ deopt: state.deoptPath,
+ value: value
+ };
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/family.js b/node_modules/@babel/traverse/lib/path/family.js
new file mode 100644
index 0000000..6a6554b
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/family.js
@@ -0,0 +1,407 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports._getKey = _getKey;
+exports._getPattern = _getPattern;
+exports.get = get;
+exports.getAllNextSiblings = getAllNextSiblings;
+exports.getAllPrevSiblings = getAllPrevSiblings;
+exports.getBindingIdentifierPaths = getBindingIdentifierPaths;
+exports.getBindingIdentifiers = getBindingIdentifiers;
+exports.getCompletionRecords = getCompletionRecords;
+exports.getNextSibling = getNextSibling;
+exports.getOpposite = getOpposite;
+exports.getOuterBindingIdentifierPaths = getOuterBindingIdentifierPaths;
+exports.getOuterBindingIdentifiers = getOuterBindingIdentifiers;
+exports.getPrevSibling = getPrevSibling;
+exports.getSibling = getSibling;
+
+var _index = require("./index");
+
+var _t = require("@babel/types");
+
+const {
+ getBindingIdentifiers: _getBindingIdentifiers,
+ getOuterBindingIdentifiers: _getOuterBindingIdentifiers,
+ isDeclaration,
+ numericLiteral,
+ unaryExpression
+} = _t;
+const NORMAL_COMPLETION = 0;
+const BREAK_COMPLETION = 1;
+
+function NormalCompletion(path) {
+ return {
+ type: NORMAL_COMPLETION,
+ path
+ };
+}
+
+function BreakCompletion(path) {
+ return {
+ type: BREAK_COMPLETION,
+ path
+ };
+}
+
+function getOpposite() {
+ if (this.key === "left") {
+ return this.getSibling("right");
+ } else if (this.key === "right") {
+ return this.getSibling("left");
+ }
+
+ return null;
+}
+
+function addCompletionRecords(path, records, context) {
+ if (path) {
+ records.push(..._getCompletionRecords(path, context));
+ }
+
+ return records;
+}
+
+function completionRecordForSwitch(cases, records, context) {
+ let lastNormalCompletions = [];
+
+ for (let i = 0; i < cases.length; i++) {
+ const casePath = cases[i];
+
+ const caseCompletions = _getCompletionRecords(casePath, context);
+
+ const normalCompletions = [];
+ const breakCompletions = [];
+
+ for (const c of caseCompletions) {
+ if (c.type === NORMAL_COMPLETION) {
+ normalCompletions.push(c);
+ }
+
+ if (c.type === BREAK_COMPLETION) {
+ breakCompletions.push(c);
+ }
+ }
+
+ if (normalCompletions.length) {
+ lastNormalCompletions = normalCompletions;
+ }
+
+ records.push(...breakCompletions);
+ }
+
+ records.push(...lastNormalCompletions);
+ return records;
+}
+
+function normalCompletionToBreak(completions) {
+ completions.forEach(c => {
+ c.type = BREAK_COMPLETION;
+ });
+}
+
+function replaceBreakStatementInBreakCompletion(completions, reachable) {
+ completions.forEach(c => {
+ if (c.path.isBreakStatement({
+ label: null
+ })) {
+ if (reachable) {
+ c.path.replaceWith(unaryExpression("void", numericLiteral(0)));
+ } else {
+ c.path.remove();
+ }
+ }
+ });
+}
+
+function getStatementListCompletion(paths, context) {
+ const completions = [];
+
+ if (context.canHaveBreak) {
+ let lastNormalCompletions = [];
+
+ for (let i = 0; i < paths.length; i++) {
+ const path = paths[i];
+ const newContext = Object.assign({}, context, {
+ inCaseClause: false
+ });
+
+ if (path.isBlockStatement() && (context.inCaseClause || context.shouldPopulateBreak)) {
+ newContext.shouldPopulateBreak = true;
+ } else {
+ newContext.shouldPopulateBreak = false;
+ }
+
+ const statementCompletions = _getCompletionRecords(path, newContext);
+
+ if (statementCompletions.length > 0 && statementCompletions.every(c => c.type === BREAK_COMPLETION)) {
+ if (lastNormalCompletions.length > 0 && statementCompletions.every(c => c.path.isBreakStatement({
+ label: null
+ }))) {
+ normalCompletionToBreak(lastNormalCompletions);
+ completions.push(...lastNormalCompletions);
+
+ if (lastNormalCompletions.some(c => c.path.isDeclaration())) {
+ completions.push(...statementCompletions);
+ replaceBreakStatementInBreakCompletion(statementCompletions, true);
+ }
+
+ replaceBreakStatementInBreakCompletion(statementCompletions, false);
+ } else {
+ completions.push(...statementCompletions);
+
+ if (!context.shouldPopulateBreak) {
+ replaceBreakStatementInBreakCompletion(statementCompletions, true);
+ }
+ }
+
+ break;
+ }
+
+ if (i === paths.length - 1) {
+ completions.push(...statementCompletions);
+ } else {
+ lastNormalCompletions = [];
+
+ for (let i = 0; i < statementCompletions.length; i++) {
+ const c = statementCompletions[i];
+
+ if (c.type === BREAK_COMPLETION) {
+ completions.push(c);
+ }
+
+ if (c.type === NORMAL_COMPLETION) {
+ lastNormalCompletions.push(c);
+ }
+ }
+ }
+ }
+ } else if (paths.length) {
+ for (let i = paths.length - 1; i >= 0; i--) {
+ const pathCompletions = _getCompletionRecords(paths[i], context);
+
+ if (pathCompletions.length > 1 || pathCompletions.length === 1 && !pathCompletions[0].path.isVariableDeclaration()) {
+ completions.push(...pathCompletions);
+ break;
+ }
+ }
+ }
+
+ return completions;
+}
+
+function _getCompletionRecords(path, context) {
+ let records = [];
+
+ if (path.isIfStatement()) {
+ records = addCompletionRecords(path.get("consequent"), records, context);
+ records = addCompletionRecords(path.get("alternate"), records, context);
+ } else if (path.isDoExpression() || path.isFor() || path.isWhile() || path.isLabeledStatement()) {
+ return addCompletionRecords(path.get("body"), records, context);
+ } else if (path.isProgram() || path.isBlockStatement()) {
+ return getStatementListCompletion(path.get("body"), context);
+ } else if (path.isFunction()) {
+ return _getCompletionRecords(path.get("body"), context);
+ } else if (path.isTryStatement()) {
+ records = addCompletionRecords(path.get("block"), records, context);
+ records = addCompletionRecords(path.get("handler"), records, context);
+ } else if (path.isCatchClause()) {
+ return addCompletionRecords(path.get("body"), records, context);
+ } else if (path.isSwitchStatement()) {
+ return completionRecordForSwitch(path.get("cases"), records, context);
+ } else if (path.isSwitchCase()) {
+ return getStatementListCompletion(path.get("consequent"), {
+ canHaveBreak: true,
+ shouldPopulateBreak: false,
+ inCaseClause: true
+ });
+ } else if (path.isBreakStatement()) {
+ records.push(BreakCompletion(path));
+ } else {
+ records.push(NormalCompletion(path));
+ }
+
+ return records;
+}
+
+function getCompletionRecords() {
+ const records = _getCompletionRecords(this, {
+ canHaveBreak: false,
+ shouldPopulateBreak: false,
+ inCaseClause: false
+ });
+
+ return records.map(r => r.path);
+}
+
+function getSibling(key) {
+ return _index.default.get({
+ parentPath: this.parentPath,
+ parent: this.parent,
+ container: this.container,
+ listKey: this.listKey,
+ key: key
+ }).setContext(this.context);
+}
+
+function getPrevSibling() {
+ return this.getSibling(this.key - 1);
+}
+
+function getNextSibling() {
+ return this.getSibling(this.key + 1);
+}
+
+function getAllNextSiblings() {
+ let _key = this.key;
+ let sibling = this.getSibling(++_key);
+ const siblings = [];
+
+ while (sibling.node) {
+ siblings.push(sibling);
+ sibling = this.getSibling(++_key);
+ }
+
+ return siblings;
+}
+
+function getAllPrevSiblings() {
+ let _key = this.key;
+ let sibling = this.getSibling(--_key);
+ const siblings = [];
+
+ while (sibling.node) {
+ siblings.push(sibling);
+ sibling = this.getSibling(--_key);
+ }
+
+ return siblings;
+}
+
+function get(key, context = true) {
+ if (context === true) context = this.context;
+ const parts = key.split(".");
+
+ if (parts.length === 1) {
+ return this._getKey(key, context);
+ } else {
+ return this._getPattern(parts, context);
+ }
+}
+
+function _getKey(key, context) {
+ const node = this.node;
+ const container = node[key];
+
+ if (Array.isArray(container)) {
+ return container.map((_, i) => {
+ return _index.default.get({
+ listKey: key,
+ parentPath: this,
+ parent: node,
+ container: container,
+ key: i
+ }).setContext(context);
+ });
+ } else {
+ return _index.default.get({
+ parentPath: this,
+ parent: node,
+ container: node,
+ key: key
+ }).setContext(context);
+ }
+}
+
+function _getPattern(parts, context) {
+ let path = this;
+
+ for (const part of parts) {
+ if (part === ".") {
+ path = path.parentPath;
+ } else {
+ if (Array.isArray(path)) {
+ path = path[part];
+ } else {
+ path = path.get(part, context);
+ }
+ }
+ }
+
+ return path;
+}
+
+function getBindingIdentifiers(duplicates) {
+ return _getBindingIdentifiers(this.node, duplicates);
+}
+
+function getOuterBindingIdentifiers(duplicates) {
+ return _getOuterBindingIdentifiers(this.node, duplicates);
+}
+
+function getBindingIdentifierPaths(duplicates = false, outerOnly = false) {
+ const path = this;
+ const search = [path];
+ const ids = Object.create(null);
+
+ while (search.length) {
+ const id = search.shift();
+ if (!id) continue;
+ if (!id.node) continue;
+ const keys = _getBindingIdentifiers.keys[id.node.type];
+
+ if (id.isIdentifier()) {
+ if (duplicates) {
+ const _ids = ids[id.node.name] = ids[id.node.name] || [];
+
+ _ids.push(id);
+ } else {
+ ids[id.node.name] = id;
+ }
+
+ continue;
+ }
+
+ if (id.isExportDeclaration()) {
+ const declaration = id.get("declaration");
+
+ if (isDeclaration(declaration)) {
+ search.push(declaration);
+ }
+
+ continue;
+ }
+
+ if (outerOnly) {
+ if (id.isFunctionDeclaration()) {
+ search.push(id.get("id"));
+ continue;
+ }
+
+ if (id.isFunctionExpression()) {
+ continue;
+ }
+ }
+
+ if (keys) {
+ for (let i = 0; i < keys.length; i++) {
+ const key = keys[i];
+ const child = id.get(key);
+
+ if (Array.isArray(child)) {
+ search.push(...child);
+ } else if (child.node) {
+ search.push(child);
+ }
+ }
+ }
+ }
+
+ return ids;
+}
+
+function getOuterBindingIdentifierPaths(duplicates) {
+ return this.getBindingIdentifierPaths(duplicates, true);
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/generated/asserts.js b/node_modules/@babel/traverse/lib/path/generated/asserts.js
new file mode 100644
index 0000000..bee8a43
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/generated/asserts.js
@@ -0,0 +1,5 @@
+"use strict";
+
+var t = require("@babel/types");
+
+var _index = require("../index"); \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/generated/validators.js b/node_modules/@babel/traverse/lib/path/generated/validators.js
new file mode 100644
index 0000000..bee8a43
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/generated/validators.js
@@ -0,0 +1,5 @@
+"use strict";
+
+var t = require("@babel/types");
+
+var _index = require("../index"); \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/generated/virtual-types.js b/node_modules/@babel/traverse/lib/path/generated/virtual-types.js
new file mode 100644
index 0000000..bf37ed9
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/generated/virtual-types.js
@@ -0,0 +1,3 @@
+"use strict";
+
+var t = require("@babel/types"); \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/index.js b/node_modules/@babel/traverse/lib/path/index.js
new file mode 100644
index 0000000..9360260
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/index.js
@@ -0,0 +1,257 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = exports.SHOULD_STOP = exports.SHOULD_SKIP = exports.REMOVED = void 0;
+
+var virtualTypes = require("./lib/virtual-types");
+
+var _debug = require("debug");
+
+var _index = require("../index");
+
+var _scope = require("../scope");
+
+var _t = require("@babel/types");
+
+var t = _t;
+
+var _cache = require("../cache");
+
+var _generator = require("@babel/generator");
+
+var NodePath_ancestry = require("./ancestry");
+
+var NodePath_inference = require("./inference");
+
+var NodePath_replacement = require("./replacement");
+
+var NodePath_evaluation = require("./evaluation");
+
+var NodePath_conversion = require("./conversion");
+
+var NodePath_introspection = require("./introspection");
+
+var NodePath_context = require("./context");
+
+var NodePath_removal = require("./removal");
+
+var NodePath_modification = require("./modification");
+
+var NodePath_family = require("./family");
+
+var NodePath_comments = require("./comments");
+
+const {
+ validate
+} = _t;
+
+const debug = _debug("babel");
+
+const REMOVED = 1 << 0;
+exports.REMOVED = REMOVED;
+const SHOULD_STOP = 1 << 1;
+exports.SHOULD_STOP = SHOULD_STOP;
+const SHOULD_SKIP = 1 << 2;
+exports.SHOULD_SKIP = SHOULD_SKIP;
+
+class NodePath {
+ constructor(hub, parent) {
+ this.contexts = [];
+ this.state = null;
+ this.opts = null;
+ this._traverseFlags = 0;
+ this.skipKeys = null;
+ this.parentPath = null;
+ this.container = null;
+ this.listKey = null;
+ this.key = null;
+ this.node = null;
+ this.type = null;
+ this.parent = parent;
+ this.hub = hub;
+ this.data = null;
+ this.context = null;
+ this.scope = null;
+ }
+
+ static get({
+ hub,
+ parentPath,
+ parent,
+ container,
+ listKey,
+ key
+ }) {
+ if (!hub && parentPath) {
+ hub = parentPath.hub;
+ }
+
+ if (!parent) {
+ throw new Error("To get a node path the parent needs to exist");
+ }
+
+ const targetNode = container[key];
+
+ let paths = _cache.path.get(parent);
+
+ if (!paths) {
+ paths = new Map();
+
+ _cache.path.set(parent, paths);
+ }
+
+ let path = paths.get(targetNode);
+
+ if (!path) {
+ path = new NodePath(hub, parent);
+ if (targetNode) paths.set(targetNode, path);
+ }
+
+ path.setup(parentPath, container, listKey, key);
+ return path;
+ }
+
+ getScope(scope) {
+ return this.isScope() ? new _scope.default(this) : scope;
+ }
+
+ setData(key, val) {
+ if (this.data == null) {
+ this.data = Object.create(null);
+ }
+
+ return this.data[key] = val;
+ }
+
+ getData(key, def) {
+ if (this.data == null) {
+ this.data = Object.create(null);
+ }
+
+ let val = this.data[key];
+ if (val === undefined && def !== undefined) val = this.data[key] = def;
+ return val;
+ }
+
+ hasNode() {
+ return this.node != null;
+ }
+
+ buildCodeFrameError(msg, Error = SyntaxError) {
+ return this.hub.buildError(this.node, msg, Error);
+ }
+
+ traverse(visitor, state) {
+ (0, _index.default)(this.node, visitor, this.scope, state, this);
+ }
+
+ set(key, node) {
+ validate(this.node, key, node);
+ this.node[key] = node;
+ }
+
+ getPathLocation() {
+ const parts = [];
+ let path = this;
+
+ do {
+ let key = path.key;
+ if (path.inList) key = `${path.listKey}[${key}]`;
+ parts.unshift(key);
+ } while (path = path.parentPath);
+
+ return parts.join(".");
+ }
+
+ debug(message) {
+ if (!debug.enabled) return;
+ debug(`${this.getPathLocation()} ${this.type}: ${message}`);
+ }
+
+ toString() {
+ return (0, _generator.default)(this.node).code;
+ }
+
+ get inList() {
+ return !!this.listKey;
+ }
+
+ set inList(inList) {
+ if (!inList) {
+ this.listKey = null;
+ }
+ }
+
+ get parentKey() {
+ return this.listKey || this.key;
+ }
+
+ get shouldSkip() {
+ return !!(this._traverseFlags & SHOULD_SKIP);
+ }
+
+ set shouldSkip(v) {
+ if (v) {
+ this._traverseFlags |= SHOULD_SKIP;
+ } else {
+ this._traverseFlags &= ~SHOULD_SKIP;
+ }
+ }
+
+ get shouldStop() {
+ return !!(this._traverseFlags & SHOULD_STOP);
+ }
+
+ set shouldStop(v) {
+ if (v) {
+ this._traverseFlags |= SHOULD_STOP;
+ } else {
+ this._traverseFlags &= ~SHOULD_STOP;
+ }
+ }
+
+ get removed() {
+ return !!(this._traverseFlags & REMOVED);
+ }
+
+ set removed(v) {
+ if (v) {
+ this._traverseFlags |= REMOVED;
+ } else {
+ this._traverseFlags &= ~REMOVED;
+ }
+ }
+
+}
+
+Object.assign(NodePath.prototype, NodePath_ancestry, NodePath_inference, NodePath_replacement, NodePath_evaluation, NodePath_conversion, NodePath_introspection, NodePath_context, NodePath_removal, NodePath_modification, NodePath_family, NodePath_comments);
+
+for (const type of t.TYPES) {
+ const typeKey = `is${type}`;
+ const fn = t[typeKey];
+
+ NodePath.prototype[typeKey] = function (opts) {
+ return fn(this.node, opts);
+ };
+
+ NodePath.prototype[`assert${type}`] = function (opts) {
+ if (!fn(this.node, opts)) {
+ throw new TypeError(`Expected node path of type ${type}`);
+ }
+ };
+}
+
+for (const type of Object.keys(virtualTypes)) {
+ if (type[0] === "_") continue;
+ if (t.TYPES.indexOf(type) < 0) t.TYPES.push(type);
+ const virtualType = virtualTypes[type];
+
+ NodePath.prototype[`is${type}`] = function (opts) {
+ return virtualType.checkPath(this, opts);
+ };
+}
+
+var _default = NodePath;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/inference/index.js b/node_modules/@babel/traverse/lib/path/inference/index.js
new file mode 100644
index 0000000..f7fef25
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/inference/index.js
@@ -0,0 +1,156 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports._getTypeAnnotation = _getTypeAnnotation;
+exports.baseTypeStrictlyMatches = baseTypeStrictlyMatches;
+exports.couldBeBaseType = couldBeBaseType;
+exports.getTypeAnnotation = getTypeAnnotation;
+exports.isBaseType = isBaseType;
+exports.isGenericType = isGenericType;
+
+var inferers = require("./inferers");
+
+var _t = require("@babel/types");
+
+const {
+ anyTypeAnnotation,
+ isAnyTypeAnnotation,
+ isBooleanTypeAnnotation,
+ isEmptyTypeAnnotation,
+ isFlowBaseAnnotation,
+ isGenericTypeAnnotation,
+ isIdentifier,
+ isMixedTypeAnnotation,
+ isNumberTypeAnnotation,
+ isStringTypeAnnotation,
+ isTypeAnnotation,
+ isUnionTypeAnnotation,
+ isVoidTypeAnnotation,
+ stringTypeAnnotation,
+ voidTypeAnnotation
+} = _t;
+
+function getTypeAnnotation() {
+ if (this.typeAnnotation) return this.typeAnnotation;
+ let type = this._getTypeAnnotation() || anyTypeAnnotation();
+ if (isTypeAnnotation(type)) type = type.typeAnnotation;
+ return this.typeAnnotation = type;
+}
+
+const typeAnnotationInferringNodes = new WeakSet();
+
+function _getTypeAnnotation() {
+ const node = this.node;
+
+ if (!node) {
+ if (this.key === "init" && this.parentPath.isVariableDeclarator()) {
+ const declar = this.parentPath.parentPath;
+ const declarParent = declar.parentPath;
+
+ if (declar.key === "left" && declarParent.isForInStatement()) {
+ return stringTypeAnnotation();
+ }
+
+ if (declar.key === "left" && declarParent.isForOfStatement()) {
+ return anyTypeAnnotation();
+ }
+
+ return voidTypeAnnotation();
+ } else {
+ return;
+ }
+ }
+
+ if (node.typeAnnotation) {
+ return node.typeAnnotation;
+ }
+
+ if (typeAnnotationInferringNodes.has(node)) {
+ return;
+ }
+
+ typeAnnotationInferringNodes.add(node);
+
+ try {
+ var _inferer;
+
+ let inferer = inferers[node.type];
+
+ if (inferer) {
+ return inferer.call(this, node);
+ }
+
+ inferer = inferers[this.parentPath.type];
+
+ if ((_inferer = inferer) != null && _inferer.validParent) {
+ return this.parentPath.getTypeAnnotation();
+ }
+ } finally {
+ typeAnnotationInferringNodes.delete(node);
+ }
+}
+
+function isBaseType(baseName, soft) {
+ return _isBaseType(baseName, this.getTypeAnnotation(), soft);
+}
+
+function _isBaseType(baseName, type, soft) {
+ if (baseName === "string") {
+ return isStringTypeAnnotation(type);
+ } else if (baseName === "number") {
+ return isNumberTypeAnnotation(type);
+ } else if (baseName === "boolean") {
+ return isBooleanTypeAnnotation(type);
+ } else if (baseName === "any") {
+ return isAnyTypeAnnotation(type);
+ } else if (baseName === "mixed") {
+ return isMixedTypeAnnotation(type);
+ } else if (baseName === "empty") {
+ return isEmptyTypeAnnotation(type);
+ } else if (baseName === "void") {
+ return isVoidTypeAnnotation(type);
+ } else {
+ if (soft) {
+ return false;
+ } else {
+ throw new Error(`Unknown base type ${baseName}`);
+ }
+ }
+}
+
+function couldBeBaseType(name) {
+ const type = this.getTypeAnnotation();
+ if (isAnyTypeAnnotation(type)) return true;
+
+ if (isUnionTypeAnnotation(type)) {
+ for (const type2 of type.types) {
+ if (isAnyTypeAnnotation(type2) || _isBaseType(name, type2, true)) {
+ return true;
+ }
+ }
+
+ return false;
+ } else {
+ return _isBaseType(name, type, true);
+ }
+}
+
+function baseTypeStrictlyMatches(rightArg) {
+ const left = this.getTypeAnnotation();
+ const right = rightArg.getTypeAnnotation();
+
+ if (!isAnyTypeAnnotation(left) && isFlowBaseAnnotation(left)) {
+ return right.type === left.type;
+ }
+
+ return false;
+}
+
+function isGenericType(genericName) {
+ const type = this.getTypeAnnotation();
+ return isGenericTypeAnnotation(type) && isIdentifier(type.id, {
+ name: genericName
+ });
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js b/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
new file mode 100644
index 0000000..c328dc1
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/inference/inferer-reference.js
@@ -0,0 +1,206 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = _default;
+
+var _t = require("@babel/types");
+
+const {
+ BOOLEAN_NUMBER_BINARY_OPERATORS,
+ createFlowUnionType,
+ createTSUnionType,
+ createTypeAnnotationBasedOnTypeof,
+ createUnionTypeAnnotation,
+ isTSTypeAnnotation,
+ numberTypeAnnotation,
+ voidTypeAnnotation
+} = _t;
+
+function _default(node) {
+ if (!this.isReferenced()) return;
+ const binding = this.scope.getBinding(node.name);
+
+ if (binding) {
+ if (binding.identifier.typeAnnotation) {
+ return binding.identifier.typeAnnotation;
+ } else {
+ return getTypeAnnotationBindingConstantViolations(binding, this, node.name);
+ }
+ }
+
+ if (node.name === "undefined") {
+ return voidTypeAnnotation();
+ } else if (node.name === "NaN" || node.name === "Infinity") {
+ return numberTypeAnnotation();
+ } else if (node.name === "arguments") {}
+}
+
+function getTypeAnnotationBindingConstantViolations(binding, path, name) {
+ const types = [];
+ const functionConstantViolations = [];
+ let constantViolations = getConstantViolationsBefore(binding, path, functionConstantViolations);
+ const testType = getConditionalAnnotation(binding, path, name);
+
+ if (testType) {
+ const testConstantViolations = getConstantViolationsBefore(binding, testType.ifStatement);
+ constantViolations = constantViolations.filter(path => testConstantViolations.indexOf(path) < 0);
+ types.push(testType.typeAnnotation);
+ }
+
+ if (constantViolations.length) {
+ constantViolations.push(...functionConstantViolations);
+
+ for (const violation of constantViolations) {
+ types.push(violation.getTypeAnnotation());
+ }
+ }
+
+ if (!types.length) {
+ return;
+ }
+
+ if (isTSTypeAnnotation(types[0]) && createTSUnionType) {
+ return createTSUnionType(types);
+ }
+
+ if (createFlowUnionType) {
+ return createFlowUnionType(types);
+ }
+
+ return createUnionTypeAnnotation(types);
+}
+
+function getConstantViolationsBefore(binding, path, functions) {
+ const violations = binding.constantViolations.slice();
+ violations.unshift(binding.path);
+ return violations.filter(violation => {
+ violation = violation.resolve();
+
+ const status = violation._guessExecutionStatusRelativeTo(path);
+
+ if (functions && status === "unknown") functions.push(violation);
+ return status === "before";
+ });
+}
+
+function inferAnnotationFromBinaryExpression(name, path) {
+ const operator = path.node.operator;
+ const right = path.get("right").resolve();
+ const left = path.get("left").resolve();
+ let target;
+
+ if (left.isIdentifier({
+ name
+ })) {
+ target = right;
+ } else if (right.isIdentifier({
+ name
+ })) {
+ target = left;
+ }
+
+ if (target) {
+ if (operator === "===") {
+ return target.getTypeAnnotation();
+ }
+
+ if (BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
+ return numberTypeAnnotation();
+ }
+
+ return;
+ }
+
+ if (operator !== "===" && operator !== "==") return;
+ let typeofPath;
+ let typePath;
+
+ if (left.isUnaryExpression({
+ operator: "typeof"
+ })) {
+ typeofPath = left;
+ typePath = right;
+ } else if (right.isUnaryExpression({
+ operator: "typeof"
+ })) {
+ typeofPath = right;
+ typePath = left;
+ }
+
+ if (!typeofPath) return;
+ if (!typeofPath.get("argument").isIdentifier({
+ name
+ })) return;
+ typePath = typePath.resolve();
+ if (!typePath.isLiteral()) return;
+ const typeValue = typePath.node.value;
+ if (typeof typeValue !== "string") return;
+ return createTypeAnnotationBasedOnTypeof(typeValue);
+}
+
+function getParentConditionalPath(binding, path, name) {
+ let parentPath;
+
+ while (parentPath = path.parentPath) {
+ if (parentPath.isIfStatement() || parentPath.isConditionalExpression()) {
+ if (path.key === "test") {
+ return;
+ }
+
+ return parentPath;
+ }
+
+ if (parentPath.isFunction()) {
+ if (parentPath.parentPath.scope.getBinding(name) !== binding) return;
+ }
+
+ path = parentPath;
+ }
+}
+
+function getConditionalAnnotation(binding, path, name) {
+ const ifStatement = getParentConditionalPath(binding, path, name);
+ if (!ifStatement) return;
+ const test = ifStatement.get("test");
+ const paths = [test];
+ const types = [];
+
+ for (let i = 0; i < paths.length; i++) {
+ const path = paths[i];
+
+ if (path.isLogicalExpression()) {
+ if (path.node.operator === "&&") {
+ paths.push(path.get("left"));
+ paths.push(path.get("right"));
+ }
+ } else if (path.isBinaryExpression()) {
+ const type = inferAnnotationFromBinaryExpression(name, path);
+ if (type) types.push(type);
+ }
+ }
+
+ if (types.length) {
+ if (isTSTypeAnnotation(types[0]) && createTSUnionType) {
+ return {
+ typeAnnotation: createTSUnionType(types),
+ ifStatement
+ };
+ }
+
+ if (createFlowUnionType) {
+ return {
+ typeAnnotation: createFlowUnionType(types),
+ ifStatement
+ };
+ }
+
+ return {
+ typeAnnotation: createUnionTypeAnnotation(types),
+ ifStatement
+ };
+ }
+
+ return getConditionalAnnotation(ifStatement, name);
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/inference/inferers.js b/node_modules/@babel/traverse/lib/path/inference/inferers.js
new file mode 100644
index 0000000..68180ac
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/inference/inferers.js
@@ -0,0 +1,261 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.ArrayExpression = ArrayExpression;
+exports.AssignmentExpression = AssignmentExpression;
+exports.BinaryExpression = BinaryExpression;
+exports.BooleanLiteral = BooleanLiteral;
+exports.CallExpression = CallExpression;
+exports.ConditionalExpression = ConditionalExpression;
+exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
+Object.defineProperty(exports, "Identifier", {
+ enumerable: true,
+ get: function () {
+ return _infererReference.default;
+ }
+});
+exports.LogicalExpression = LogicalExpression;
+exports.NewExpression = NewExpression;
+exports.NullLiteral = NullLiteral;
+exports.NumericLiteral = NumericLiteral;
+exports.ObjectExpression = ObjectExpression;
+exports.ParenthesizedExpression = ParenthesizedExpression;
+exports.RegExpLiteral = RegExpLiteral;
+exports.RestElement = RestElement;
+exports.SequenceExpression = SequenceExpression;
+exports.StringLiteral = StringLiteral;
+exports.TaggedTemplateExpression = TaggedTemplateExpression;
+exports.TemplateLiteral = TemplateLiteral;
+exports.TypeCastExpression = TypeCastExpression;
+exports.UnaryExpression = UnaryExpression;
+exports.UpdateExpression = UpdateExpression;
+exports.VariableDeclarator = VariableDeclarator;
+
+var _t = require("@babel/types");
+
+var _infererReference = require("./inferer-reference");
+
+const {
+ BOOLEAN_BINARY_OPERATORS,
+ BOOLEAN_UNARY_OPERATORS,
+ NUMBER_BINARY_OPERATORS,
+ NUMBER_UNARY_OPERATORS,
+ STRING_UNARY_OPERATORS,
+ anyTypeAnnotation,
+ arrayTypeAnnotation,
+ booleanTypeAnnotation,
+ buildMatchMemberExpression,
+ createFlowUnionType,
+ createTSUnionType,
+ createUnionTypeAnnotation,
+ genericTypeAnnotation,
+ identifier,
+ isTSTypeAnnotation,
+ nullLiteralTypeAnnotation,
+ numberTypeAnnotation,
+ stringTypeAnnotation,
+ tupleTypeAnnotation,
+ unionTypeAnnotation,
+ voidTypeAnnotation
+} = _t;
+
+function VariableDeclarator() {
+ var _type;
+
+ const id = this.get("id");
+ if (!id.isIdentifier()) return;
+ const init = this.get("init");
+ let type = init.getTypeAnnotation();
+
+ if (((_type = type) == null ? void 0 : _type.type) === "AnyTypeAnnotation") {
+ if (init.isCallExpression() && init.get("callee").isIdentifier({
+ name: "Array"
+ }) && !init.scope.hasBinding("Array", true)) {
+ type = ArrayExpression();
+ }
+ }
+
+ return type;
+}
+
+function TypeCastExpression(node) {
+ return node.typeAnnotation;
+}
+
+TypeCastExpression.validParent = true;
+
+function NewExpression(node) {
+ if (this.get("callee").isIdentifier()) {
+ return genericTypeAnnotation(node.callee);
+ }
+}
+
+function TemplateLiteral() {
+ return stringTypeAnnotation();
+}
+
+function UnaryExpression(node) {
+ const operator = node.operator;
+
+ if (operator === "void") {
+ return voidTypeAnnotation();
+ } else if (NUMBER_UNARY_OPERATORS.indexOf(operator) >= 0) {
+ return numberTypeAnnotation();
+ } else if (STRING_UNARY_OPERATORS.indexOf(operator) >= 0) {
+ return stringTypeAnnotation();
+ } else if (BOOLEAN_UNARY_OPERATORS.indexOf(operator) >= 0) {
+ return booleanTypeAnnotation();
+ }
+}
+
+function BinaryExpression(node) {
+ const operator = node.operator;
+
+ if (NUMBER_BINARY_OPERATORS.indexOf(operator) >= 0) {
+ return numberTypeAnnotation();
+ } else if (BOOLEAN_BINARY_OPERATORS.indexOf(operator) >= 0) {
+ return booleanTypeAnnotation();
+ } else if (operator === "+") {
+ const right = this.get("right");
+ const left = this.get("left");
+
+ if (left.isBaseType("number") && right.isBaseType("number")) {
+ return numberTypeAnnotation();
+ } else if (left.isBaseType("string") || right.isBaseType("string")) {
+ return stringTypeAnnotation();
+ }
+
+ return unionTypeAnnotation([stringTypeAnnotation(), numberTypeAnnotation()]);
+ }
+}
+
+function LogicalExpression() {
+ const argumentTypes = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
+
+ if (isTSTypeAnnotation(argumentTypes[0]) && createTSUnionType) {
+ return createTSUnionType(argumentTypes);
+ }
+
+ if (createFlowUnionType) {
+ return createFlowUnionType(argumentTypes);
+ }
+
+ return createUnionTypeAnnotation(argumentTypes);
+}
+
+function ConditionalExpression() {
+ const argumentTypes = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
+
+ if (isTSTypeAnnotation(argumentTypes[0]) && createTSUnionType) {
+ return createTSUnionType(argumentTypes);
+ }
+
+ if (createFlowUnionType) {
+ return createFlowUnionType(argumentTypes);
+ }
+
+ return createUnionTypeAnnotation(argumentTypes);
+}
+
+function SequenceExpression() {
+ return this.get("expressions").pop().getTypeAnnotation();
+}
+
+function ParenthesizedExpression() {
+ return this.get("expression").getTypeAnnotation();
+}
+
+function AssignmentExpression() {
+ return this.get("right").getTypeAnnotation();
+}
+
+function UpdateExpression(node) {
+ const operator = node.operator;
+
+ if (operator === "++" || operator === "--") {
+ return numberTypeAnnotation();
+ }
+}
+
+function StringLiteral() {
+ return stringTypeAnnotation();
+}
+
+function NumericLiteral() {
+ return numberTypeAnnotation();
+}
+
+function BooleanLiteral() {
+ return booleanTypeAnnotation();
+}
+
+function NullLiteral() {
+ return nullLiteralTypeAnnotation();
+}
+
+function RegExpLiteral() {
+ return genericTypeAnnotation(identifier("RegExp"));
+}
+
+function ObjectExpression() {
+ return genericTypeAnnotation(identifier("Object"));
+}
+
+function ArrayExpression() {
+ return genericTypeAnnotation(identifier("Array"));
+}
+
+function RestElement() {
+ return ArrayExpression();
+}
+
+RestElement.validParent = true;
+
+function Func() {
+ return genericTypeAnnotation(identifier("Function"));
+}
+
+const isArrayFrom = buildMatchMemberExpression("Array.from");
+const isObjectKeys = buildMatchMemberExpression("Object.keys");
+const isObjectValues = buildMatchMemberExpression("Object.values");
+const isObjectEntries = buildMatchMemberExpression("Object.entries");
+
+function CallExpression() {
+ const {
+ callee
+ } = this.node;
+
+ if (isObjectKeys(callee)) {
+ return arrayTypeAnnotation(stringTypeAnnotation());
+ } else if (isArrayFrom(callee) || isObjectValues(callee)) {
+ return arrayTypeAnnotation(anyTypeAnnotation());
+ } else if (isObjectEntries(callee)) {
+ return arrayTypeAnnotation(tupleTypeAnnotation([stringTypeAnnotation(), anyTypeAnnotation()]));
+ }
+
+ return resolveCall(this.get("callee"));
+}
+
+function TaggedTemplateExpression() {
+ return resolveCall(this.get("tag"));
+}
+
+function resolveCall(callee) {
+ callee = callee.resolve();
+
+ if (callee.isFunction()) {
+ if (callee.is("async")) {
+ if (callee.is("generator")) {
+ return genericTypeAnnotation(identifier("AsyncIterator"));
+ } else {
+ return genericTypeAnnotation(identifier("Promise"));
+ }
+ } else {
+ if (callee.node.returnType) {
+ return callee.node.returnType;
+ } else {}
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/introspection.js b/node_modules/@babel/traverse/lib/path/introspection.js
new file mode 100644
index 0000000..48d6ef1
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/introspection.js
@@ -0,0 +1,436 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports._guessExecutionStatusRelativeTo = _guessExecutionStatusRelativeTo;
+exports._guessExecutionStatusRelativeToDifferentFunctions = _guessExecutionStatusRelativeToDifferentFunctions;
+exports._resolve = _resolve;
+exports.canHaveVariableDeclarationOrExpression = canHaveVariableDeclarationOrExpression;
+exports.canSwapBetweenExpressionAndStatement = canSwapBetweenExpressionAndStatement;
+exports.equals = equals;
+exports.getSource = getSource;
+exports.has = has;
+exports.is = void 0;
+exports.isCompletionRecord = isCompletionRecord;
+exports.isConstantExpression = isConstantExpression;
+exports.isInStrictMode = isInStrictMode;
+exports.isNodeType = isNodeType;
+exports.isStatementOrBlock = isStatementOrBlock;
+exports.isStatic = isStatic;
+exports.isnt = isnt;
+exports.matchesPattern = matchesPattern;
+exports.referencesImport = referencesImport;
+exports.resolve = resolve;
+exports.willIMaybeExecuteBefore = willIMaybeExecuteBefore;
+
+var _t = require("@babel/types");
+
+const {
+ STATEMENT_OR_BLOCK_KEYS,
+ VISITOR_KEYS,
+ isBlockStatement,
+ isExpression,
+ isIdentifier,
+ isLiteral,
+ isStringLiteral,
+ isType,
+ matchesPattern: _matchesPattern
+} = _t;
+
+function matchesPattern(pattern, allowPartial) {
+ return _matchesPattern(this.node, pattern, allowPartial);
+}
+
+function has(key) {
+ const val = this.node && this.node[key];
+
+ if (val && Array.isArray(val)) {
+ return !!val.length;
+ } else {
+ return !!val;
+ }
+}
+
+function isStatic() {
+ return this.scope.isStatic(this.node);
+}
+
+const is = has;
+exports.is = is;
+
+function isnt(key) {
+ return !this.has(key);
+}
+
+function equals(key, value) {
+ return this.node[key] === value;
+}
+
+function isNodeType(type) {
+ return isType(this.type, type);
+}
+
+function canHaveVariableDeclarationOrExpression() {
+ return (this.key === "init" || this.key === "left") && this.parentPath.isFor();
+}
+
+function canSwapBetweenExpressionAndStatement(replacement) {
+ if (this.key !== "body" || !this.parentPath.isArrowFunctionExpression()) {
+ return false;
+ }
+
+ if (this.isExpression()) {
+ return isBlockStatement(replacement);
+ } else if (this.isBlockStatement()) {
+ return isExpression(replacement);
+ }
+
+ return false;
+}
+
+function isCompletionRecord(allowInsideFunction) {
+ let path = this;
+ let first = true;
+
+ do {
+ const container = path.container;
+
+ if (path.isFunction() && !first) {
+ return !!allowInsideFunction;
+ }
+
+ first = false;
+
+ if (Array.isArray(container) && path.key !== container.length - 1) {
+ return false;
+ }
+ } while ((path = path.parentPath) && !path.isProgram());
+
+ return true;
+}
+
+function isStatementOrBlock() {
+ if (this.parentPath.isLabeledStatement() || isBlockStatement(this.container)) {
+ return false;
+ } else {
+ return STATEMENT_OR_BLOCK_KEYS.includes(this.key);
+ }
+}
+
+function referencesImport(moduleSource, importName) {
+ if (!this.isReferencedIdentifier()) {
+ if ((this.isMemberExpression() || this.isOptionalMemberExpression()) && (this.node.computed ? isStringLiteral(this.node.property, {
+ value: importName
+ }) : this.node.property.name === importName)) {
+ const object = this.get("object");
+ return object.isReferencedIdentifier() && object.referencesImport(moduleSource, "*");
+ }
+
+ return false;
+ }
+
+ const binding = this.scope.getBinding(this.node.name);
+ if (!binding || binding.kind !== "module") return false;
+ const path = binding.path;
+ const parent = path.parentPath;
+ if (!parent.isImportDeclaration()) return false;
+
+ if (parent.node.source.value === moduleSource) {
+ if (!importName) return true;
+ } else {
+ return false;
+ }
+
+ if (path.isImportDefaultSpecifier() && importName === "default") {
+ return true;
+ }
+
+ if (path.isImportNamespaceSpecifier() && importName === "*") {
+ return true;
+ }
+
+ if (path.isImportSpecifier() && isIdentifier(path.node.imported, {
+ name: importName
+ })) {
+ return true;
+ }
+
+ return false;
+}
+
+function getSource() {
+ const node = this.node;
+
+ if (node.end) {
+ const code = this.hub.getCode();
+ if (code) return code.slice(node.start, node.end);
+ }
+
+ return "";
+}
+
+function willIMaybeExecuteBefore(target) {
+ return this._guessExecutionStatusRelativeTo(target) !== "after";
+}
+
+function getOuterFunction(path) {
+ return (path.scope.getFunctionParent() || path.scope.getProgramParent()).path;
+}
+
+function isExecutionUncertain(type, key) {
+ switch (type) {
+ case "LogicalExpression":
+ return key === "right";
+
+ case "ConditionalExpression":
+ case "IfStatement":
+ return key === "consequent" || key === "alternate";
+
+ case "WhileStatement":
+ case "DoWhileStatement":
+ case "ForInStatement":
+ case "ForOfStatement":
+ return key === "body";
+
+ case "ForStatement":
+ return key === "body" || key === "update";
+
+ case "SwitchStatement":
+ return key === "cases";
+
+ case "TryStatement":
+ return key === "handler";
+
+ case "AssignmentPattern":
+ return key === "right";
+
+ case "OptionalMemberExpression":
+ return key === "property";
+
+ case "OptionalCallExpression":
+ return key === "arguments";
+
+ default:
+ return false;
+ }
+}
+
+function isExecutionUncertainInList(paths, maxIndex) {
+ for (let i = 0; i < maxIndex; i++) {
+ const path = paths[i];
+
+ if (isExecutionUncertain(path.parent.type, path.parentKey)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function _guessExecutionStatusRelativeTo(target) {
+ const funcParent = {
+ this: getOuterFunction(this),
+ target: getOuterFunction(target)
+ };
+
+ if (funcParent.target.node !== funcParent.this.node) {
+ return this._guessExecutionStatusRelativeToDifferentFunctions(funcParent.target);
+ }
+
+ const paths = {
+ target: target.getAncestry(),
+ this: this.getAncestry()
+ };
+ if (paths.target.indexOf(this) >= 0) return "after";
+ if (paths.this.indexOf(target) >= 0) return "before";
+ let commonPath;
+ const commonIndex = {
+ target: 0,
+ this: 0
+ };
+
+ while (!commonPath && commonIndex.this < paths.this.length) {
+ const path = paths.this[commonIndex.this];
+ commonIndex.target = paths.target.indexOf(path);
+
+ if (commonIndex.target >= 0) {
+ commonPath = path;
+ } else {
+ commonIndex.this++;
+ }
+ }
+
+ if (!commonPath) {
+ throw new Error("Internal Babel error - The two compared nodes" + " don't appear to belong to the same program.");
+ }
+
+ if (isExecutionUncertainInList(paths.this, commonIndex.this - 1) || isExecutionUncertainInList(paths.target, commonIndex.target - 1)) {
+ return "unknown";
+ }
+
+ const divergence = {
+ this: paths.this[commonIndex.this - 1],
+ target: paths.target[commonIndex.target - 1]
+ };
+
+ if (divergence.target.listKey && divergence.this.listKey && divergence.target.container === divergence.this.container) {
+ return divergence.target.key > divergence.this.key ? "before" : "after";
+ }
+
+ const keys = VISITOR_KEYS[commonPath.type];
+ const keyPosition = {
+ this: keys.indexOf(divergence.this.parentKey),
+ target: keys.indexOf(divergence.target.parentKey)
+ };
+ return keyPosition.target > keyPosition.this ? "before" : "after";
+}
+
+const executionOrderCheckedNodes = new WeakSet();
+
+function _guessExecutionStatusRelativeToDifferentFunctions(target) {
+ if (!target.isFunctionDeclaration() || target.parentPath.isExportDeclaration()) {
+ return "unknown";
+ }
+
+ const binding = target.scope.getBinding(target.node.id.name);
+ if (!binding.references) return "before";
+ const referencePaths = binding.referencePaths;
+ let allStatus;
+
+ for (const path of referencePaths) {
+ const childOfFunction = !!path.find(path => path.node === target.node);
+ if (childOfFunction) continue;
+
+ if (path.key !== "callee" || !path.parentPath.isCallExpression()) {
+ return "unknown";
+ }
+
+ if (executionOrderCheckedNodes.has(path.node)) continue;
+ executionOrderCheckedNodes.add(path.node);
+
+ const status = this._guessExecutionStatusRelativeTo(path);
+
+ executionOrderCheckedNodes.delete(path.node);
+
+ if (allStatus && allStatus !== status) {
+ return "unknown";
+ } else {
+ allStatus = status;
+ }
+ }
+
+ return allStatus;
+}
+
+function resolve(dangerous, resolved) {
+ return this._resolve(dangerous, resolved) || this;
+}
+
+function _resolve(dangerous, resolved) {
+ if (resolved && resolved.indexOf(this) >= 0) return;
+ resolved = resolved || [];
+ resolved.push(this);
+
+ if (this.isVariableDeclarator()) {
+ if (this.get("id").isIdentifier()) {
+ return this.get("init").resolve(dangerous, resolved);
+ } else {}
+ } else if (this.isReferencedIdentifier()) {
+ const binding = this.scope.getBinding(this.node.name);
+ if (!binding) return;
+ if (!binding.constant) return;
+ if (binding.kind === "module") return;
+
+ if (binding.path !== this) {
+ const ret = binding.path.resolve(dangerous, resolved);
+ if (this.find(parent => parent.node === ret.node)) return;
+ return ret;
+ }
+ } else if (this.isTypeCastExpression()) {
+ return this.get("expression").resolve(dangerous, resolved);
+ } else if (dangerous && this.isMemberExpression()) {
+ const targetKey = this.toComputedKey();
+ if (!isLiteral(targetKey)) return;
+ const targetName = targetKey.value;
+ const target = this.get("object").resolve(dangerous, resolved);
+
+ if (target.isObjectExpression()) {
+ const props = target.get("properties");
+
+ for (const prop of props) {
+ if (!prop.isProperty()) continue;
+ const key = prop.get("key");
+ let match = prop.isnt("computed") && key.isIdentifier({
+ name: targetName
+ });
+ match = match || key.isLiteral({
+ value: targetName
+ });
+ if (match) return prop.get("value").resolve(dangerous, resolved);
+ }
+ } else if (target.isArrayExpression() && !isNaN(+targetName)) {
+ const elems = target.get("elements");
+ const elem = elems[targetName];
+ if (elem) return elem.resolve(dangerous, resolved);
+ }
+ }
+}
+
+function isConstantExpression() {
+ if (this.isIdentifier()) {
+ const binding = this.scope.getBinding(this.node.name);
+ if (!binding) return false;
+ return binding.constant;
+ }
+
+ if (this.isLiteral()) {
+ if (this.isRegExpLiteral()) {
+ return false;
+ }
+
+ if (this.isTemplateLiteral()) {
+ return this.get("expressions").every(expression => expression.isConstantExpression());
+ }
+
+ return true;
+ }
+
+ if (this.isUnaryExpression()) {
+ if (this.node.operator !== "void") {
+ return false;
+ }
+
+ return this.get("argument").isConstantExpression();
+ }
+
+ if (this.isBinaryExpression()) {
+ return this.get("left").isConstantExpression() && this.get("right").isConstantExpression();
+ }
+
+ return false;
+}
+
+function isInStrictMode() {
+ const start = this.isProgram() ? this : this.parentPath;
+ const strictParent = start.find(path => {
+ if (path.isProgram({
+ sourceType: "module"
+ })) return true;
+ if (path.isClass()) return true;
+ if (!path.isProgram() && !path.isFunction()) return false;
+
+ if (path.isArrowFunctionExpression() && !path.get("body").isBlockStatement()) {
+ return false;
+ }
+
+ const body = path.isFunction() ? path.node.body : path.node;
+
+ for (const directive of body.directives) {
+ if (directive.value.value === "use strict") {
+ return true;
+ }
+ }
+ });
+ return !!strictParent;
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/lib/hoister.js b/node_modules/@babel/traverse/lib/path/lib/hoister.js
new file mode 100644
index 0000000..536a340
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/lib/hoister.js
@@ -0,0 +1,206 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _t = require("@babel/types");
+
+var _t2 = _t;
+const {
+ react
+} = _t;
+const {
+ cloneNode,
+ jsxExpressionContainer,
+ variableDeclaration,
+ variableDeclarator
+} = _t2;
+const referenceVisitor = {
+ ReferencedIdentifier(path, state) {
+ if (path.isJSXIdentifier() && react.isCompatTag(path.node.name) && !path.parentPath.isJSXMemberExpression()) {
+ return;
+ }
+
+ if (path.node.name === "this") {
+ let scope = path.scope;
+
+ do {
+ if (scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
+ break;
+ }
+ } while (scope = scope.parent);
+
+ if (scope) state.breakOnScopePaths.push(scope.path);
+ }
+
+ const binding = path.scope.getBinding(path.node.name);
+ if (!binding) return;
+
+ for (const violation of binding.constantViolations) {
+ if (violation.scope !== binding.path.scope) {
+ state.mutableBinding = true;
+ path.stop();
+ return;
+ }
+ }
+
+ if (binding !== state.scope.getBinding(path.node.name)) return;
+ state.bindings[path.node.name] = binding;
+ }
+
+};
+
+class PathHoister {
+ constructor(path, scope) {
+ this.breakOnScopePaths = void 0;
+ this.bindings = void 0;
+ this.mutableBinding = void 0;
+ this.scopes = void 0;
+ this.scope = void 0;
+ this.path = void 0;
+ this.attachAfter = void 0;
+ this.breakOnScopePaths = [];
+ this.bindings = {};
+ this.mutableBinding = false;
+ this.scopes = [];
+ this.scope = scope;
+ this.path = path;
+ this.attachAfter = false;
+ }
+
+ isCompatibleScope(scope) {
+ for (const key of Object.keys(this.bindings)) {
+ const binding = this.bindings[key];
+
+ if (!scope.bindingIdentifierEquals(key, binding.identifier)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ getCompatibleScopes() {
+ let scope = this.path.scope;
+
+ do {
+ if (this.isCompatibleScope(scope)) {
+ this.scopes.push(scope);
+ } else {
+ break;
+ }
+
+ if (this.breakOnScopePaths.indexOf(scope.path) >= 0) {
+ break;
+ }
+ } while (scope = scope.parent);
+ }
+
+ getAttachmentPath() {
+ let path = this._getAttachmentPath();
+
+ if (!path) return;
+ let targetScope = path.scope;
+
+ if (targetScope.path === path) {
+ targetScope = path.scope.parent;
+ }
+
+ if (targetScope.path.isProgram() || targetScope.path.isFunction()) {
+ for (const name of Object.keys(this.bindings)) {
+ if (!targetScope.hasOwnBinding(name)) continue;
+ const binding = this.bindings[name];
+
+ if (binding.kind === "param" || binding.path.parentKey === "params") {
+ continue;
+ }
+
+ const bindingParentPath = this.getAttachmentParentForPath(binding.path);
+
+ if (bindingParentPath.key >= path.key) {
+ this.attachAfter = true;
+ path = binding.path;
+
+ for (const violationPath of binding.constantViolations) {
+ if (this.getAttachmentParentForPath(violationPath).key > path.key) {
+ path = violationPath;
+ }
+ }
+ }
+ }
+ }
+
+ return path;
+ }
+
+ _getAttachmentPath() {
+ const scopes = this.scopes;
+ const scope = scopes.pop();
+ if (!scope) return;
+
+ if (scope.path.isFunction()) {
+ if (this.hasOwnParamBindings(scope)) {
+ if (this.scope === scope) return;
+ const bodies = scope.path.get("body").get("body");
+
+ for (let i = 0; i < bodies.length; i++) {
+ if (bodies[i].node._blockHoist) continue;
+ return bodies[i];
+ }
+ } else {
+ return this.getNextScopeAttachmentParent();
+ }
+ } else if (scope.path.isProgram()) {
+ return this.getNextScopeAttachmentParent();
+ }
+ }
+
+ getNextScopeAttachmentParent() {
+ const scope = this.scopes.pop();
+ if (scope) return this.getAttachmentParentForPath(scope.path);
+ }
+
+ getAttachmentParentForPath(path) {
+ do {
+ if (!path.parentPath || Array.isArray(path.container) && path.isStatement()) {
+ return path;
+ }
+ } while (path = path.parentPath);
+ }
+
+ hasOwnParamBindings(scope) {
+ for (const name of Object.keys(this.bindings)) {
+ if (!scope.hasOwnBinding(name)) continue;
+ const binding = this.bindings[name];
+ if (binding.kind === "param" && binding.constant) return true;
+ }
+
+ return false;
+ }
+
+ run() {
+ this.path.traverse(referenceVisitor, this);
+ if (this.mutableBinding) return;
+ this.getCompatibleScopes();
+ const attachTo = this.getAttachmentPath();
+ if (!attachTo) return;
+ if (attachTo.getFunctionParent() === this.path.getFunctionParent()) return;
+ let uid = attachTo.scope.generateUidIdentifier("ref");
+ const declarator = variableDeclarator(uid, this.path.node);
+ const insertFn = this.attachAfter ? "insertAfter" : "insertBefore";
+ const [attached] = attachTo[insertFn]([attachTo.isVariableDeclarator() ? declarator : variableDeclaration("var", [declarator])]);
+ const parent = this.path.parentPath;
+
+ if (parent.isJSXElement() && this.path.container === parent.node.children) {
+ uid = jsxExpressionContainer(uid);
+ }
+
+ this.path.replaceWith(cloneNode(uid));
+ return attachTo.isVariableDeclarator() ? attached.get("init") : attached.get("declarations.0.init");
+ }
+
+}
+
+exports.default = PathHoister; \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js b/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
new file mode 100644
index 0000000..23ec8fe
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js
@@ -0,0 +1,38 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.hooks = void 0;
+const hooks = [function (self, parent) {
+ const removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement();
+
+ if (removeParent) {
+ parent.remove();
+ return true;
+ }
+}, function (self, parent) {
+ if (parent.isSequenceExpression() && parent.node.expressions.length === 1) {
+ parent.replaceWith(parent.node.expressions[0]);
+ return true;
+ }
+}, function (self, parent) {
+ if (parent.isBinary()) {
+ if (self.key === "left") {
+ parent.replaceWith(parent.node.right);
+ } else {
+ parent.replaceWith(parent.node.left);
+ }
+
+ return true;
+ }
+}, function (self, parent) {
+ if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) {
+ self.replaceWith({
+ type: "BlockStatement",
+ body: []
+ });
+ return true;
+ }
+}];
+exports.hooks = hooks; \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/lib/virtual-types.js b/node_modules/@babel/traverse/lib/path/lib/virtual-types.js
new file mode 100644
index 0000000..871cb24
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/lib/virtual-types.js
@@ -0,0 +1,230 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.Var = exports.User = exports.Statement = exports.SpreadProperty = exports.Scope = exports.RestProperty = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = exports.Referenced = exports.Pure = exports.NumericLiteralTypeAnnotation = exports.Generated = exports.ForAwaitStatement = exports.Flow = exports.Expression = exports.ExistentialTypeParam = exports.BlockScoped = exports.BindingIdentifier = void 0;
+
+var _t = require("@babel/types");
+
+const {
+ isBinding,
+ isBlockScoped,
+ isExportDeclaration,
+ isExpression,
+ isFlow,
+ isForStatement,
+ isForXStatement,
+ isIdentifier,
+ isImportDeclaration,
+ isImportSpecifier,
+ isJSXIdentifier,
+ isJSXMemberExpression,
+ isMemberExpression,
+ isReferenced,
+ isScope,
+ isStatement,
+ isVar,
+ isVariableDeclaration,
+ react
+} = _t;
+const {
+ isCompatTag
+} = react;
+const ReferencedIdentifier = {
+ types: ["Identifier", "JSXIdentifier"],
+
+ checkPath(path, opts) {
+ const {
+ node,
+ parent
+ } = path;
+
+ if (!isIdentifier(node, opts) && !isJSXMemberExpression(parent, opts)) {
+ if (isJSXIdentifier(node, opts)) {
+ if (isCompatTag(node.name)) return false;
+ } else {
+ return false;
+ }
+ }
+
+ return isReferenced(node, parent, path.parentPath.parent);
+ }
+
+};
+exports.ReferencedIdentifier = ReferencedIdentifier;
+const ReferencedMemberExpression = {
+ types: ["MemberExpression"],
+
+ checkPath({
+ node,
+ parent
+ }) {
+ return isMemberExpression(node) && isReferenced(node, parent);
+ }
+
+};
+exports.ReferencedMemberExpression = ReferencedMemberExpression;
+const BindingIdentifier = {
+ types: ["Identifier"],
+
+ checkPath(path) {
+ const {
+ node,
+ parent
+ } = path;
+ const grandparent = path.parentPath.parent;
+ return isIdentifier(node) && isBinding(node, parent, grandparent);
+ }
+
+};
+exports.BindingIdentifier = BindingIdentifier;
+const Statement = {
+ types: ["Statement"],
+
+ checkPath({
+ node,
+ parent
+ }) {
+ if (isStatement(node)) {
+ if (isVariableDeclaration(node)) {
+ if (isForXStatement(parent, {
+ left: node
+ })) return false;
+ if (isForStatement(parent, {
+ init: node
+ })) return false;
+ }
+
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+};
+exports.Statement = Statement;
+const Expression = {
+ types: ["Expression"],
+
+ checkPath(path) {
+ if (path.isIdentifier()) {
+ return path.isReferencedIdentifier();
+ } else {
+ return isExpression(path.node);
+ }
+ }
+
+};
+exports.Expression = Expression;
+const Scope = {
+ types: ["Scopable", "Pattern"],
+
+ checkPath(path) {
+ return isScope(path.node, path.parent);
+ }
+
+};
+exports.Scope = Scope;
+const Referenced = {
+ checkPath(path) {
+ return isReferenced(path.node, path.parent);
+ }
+
+};
+exports.Referenced = Referenced;
+const BlockScoped = {
+ checkPath(path) {
+ return isBlockScoped(path.node);
+ }
+
+};
+exports.BlockScoped = BlockScoped;
+const Var = {
+ types: ["VariableDeclaration"],
+
+ checkPath(path) {
+ return isVar(path.node);
+ }
+
+};
+exports.Var = Var;
+const User = {
+ checkPath(path) {
+ return path.node && !!path.node.loc;
+ }
+
+};
+exports.User = User;
+const Generated = {
+ checkPath(path) {
+ return !path.isUser();
+ }
+
+};
+exports.Generated = Generated;
+const Pure = {
+ checkPath(path, opts) {
+ return path.scope.isPure(path.node, opts);
+ }
+
+};
+exports.Pure = Pure;
+const Flow = {
+ types: ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"],
+
+ checkPath({
+ node
+ }) {
+ if (isFlow(node)) {
+ return true;
+ } else if (isImportDeclaration(node)) {
+ return node.importKind === "type" || node.importKind === "typeof";
+ } else if (isExportDeclaration(node)) {
+ return node.exportKind === "type";
+ } else if (isImportSpecifier(node)) {
+ return node.importKind === "type" || node.importKind === "typeof";
+ } else {
+ return false;
+ }
+ }
+
+};
+exports.Flow = Flow;
+const RestProperty = {
+ types: ["RestElement"],
+
+ checkPath(path) {
+ return path.parentPath && path.parentPath.isObjectPattern();
+ }
+
+};
+exports.RestProperty = RestProperty;
+const SpreadProperty = {
+ types: ["RestElement"],
+
+ checkPath(path) {
+ return path.parentPath && path.parentPath.isObjectExpression();
+ }
+
+};
+exports.SpreadProperty = SpreadProperty;
+const ExistentialTypeParam = {
+ types: ["ExistsTypeAnnotation"]
+};
+exports.ExistentialTypeParam = ExistentialTypeParam;
+const NumericLiteralTypeAnnotation = {
+ types: ["NumberLiteralTypeAnnotation"]
+};
+exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation;
+const ForAwaitStatement = {
+ types: ["ForOfStatement"],
+
+ checkPath({
+ node
+ }) {
+ return node.await === true;
+ }
+
+};
+exports.ForAwaitStatement = ForAwaitStatement; \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/modification.js b/node_modules/@babel/traverse/lib/path/modification.js
new file mode 100644
index 0000000..c5de87b
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/modification.js
@@ -0,0 +1,269 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports._containerInsert = _containerInsert;
+exports._containerInsertAfter = _containerInsertAfter;
+exports._containerInsertBefore = _containerInsertBefore;
+exports._verifyNodeList = _verifyNodeList;
+exports.hoist = hoist;
+exports.insertAfter = insertAfter;
+exports.insertBefore = insertBefore;
+exports.pushContainer = pushContainer;
+exports.unshiftContainer = unshiftContainer;
+exports.updateSiblingKeys = updateSiblingKeys;
+
+var _cache = require("../cache");
+
+var _hoister = require("./lib/hoister");
+
+var _index = require("./index");
+
+var _t = require("@babel/types");
+
+const {
+ arrowFunctionExpression,
+ assertExpression,
+ assignmentExpression,
+ blockStatement,
+ callExpression,
+ cloneNode,
+ expressionStatement,
+ isAssignmentExpression,
+ isCallExpression,
+ isExpression,
+ isIdentifier,
+ isSequenceExpression,
+ isSuper,
+ thisExpression
+} = _t;
+
+function insertBefore(nodes_) {
+ this._assertUnremoved();
+
+ const nodes = this._verifyNodeList(nodes_);
+
+ const {
+ parentPath
+ } = this;
+
+ if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
+ return parentPath.insertBefore(nodes);
+ } else if (this.isNodeType("Expression") && !this.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
+ if (this.node) nodes.push(this.node);
+ return this.replaceExpressionWithStatements(nodes);
+ } else if (Array.isArray(this.container)) {
+ return this._containerInsertBefore(nodes);
+ } else if (this.isStatementOrBlock()) {
+ const node = this.node;
+ const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
+ this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
+ return this.unshiftContainer("body", nodes);
+ } else {
+ 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?");
+ }
+}
+
+function _containerInsert(from, nodes) {
+ this.updateSiblingKeys(from, nodes.length);
+ const paths = [];
+ this.container.splice(from, 0, ...nodes);
+
+ for (let i = 0; i < nodes.length; i++) {
+ const to = from + i;
+ const path = this.getSibling(to);
+ paths.push(path);
+
+ if (this.context && this.context.queue) {
+ path.pushContext(this.context);
+ }
+ }
+
+ const contexts = this._getQueueContexts();
+
+ for (const path of paths) {
+ path.setScope();
+ path.debug("Inserted.");
+
+ for (const context of contexts) {
+ context.maybeQueue(path, true);
+ }
+ }
+
+ return paths;
+}
+
+function _containerInsertBefore(nodes) {
+ return this._containerInsert(this.key, nodes);
+}
+
+function _containerInsertAfter(nodes) {
+ return this._containerInsert(this.key + 1, nodes);
+}
+
+const last = arr => arr[arr.length - 1];
+
+function isHiddenInSequenceExpression(path) {
+ return isSequenceExpression(path.parent) && (last(path.parent.expressions) !== path.node || isHiddenInSequenceExpression(path.parentPath));
+}
+
+function isAlmostConstantAssignment(node, scope) {
+ if (!isAssignmentExpression(node) || !isIdentifier(node.left)) {
+ return false;
+ }
+
+ const blockScope = scope.getBlockParent();
+ return blockScope.hasOwnBinding(node.left.name) && blockScope.getOwnBinding(node.left.name).constantViolations.length <= 1;
+}
+
+function insertAfter(nodes_) {
+ this._assertUnremoved();
+
+ if (this.isSequenceExpression()) {
+ return last(this.get("expressions")).insertAfter(nodes_);
+ }
+
+ const nodes = this._verifyNodeList(nodes_);
+
+ const {
+ parentPath
+ } = this;
+
+ if (parentPath.isExpressionStatement() || parentPath.isLabeledStatement() || parentPath.isExportNamedDeclaration() || parentPath.isExportDefaultDeclaration() && this.isDeclaration()) {
+ return parentPath.insertAfter(nodes.map(node => {
+ return isExpression(node) ? expressionStatement(node) : node;
+ }));
+ } else if (this.isNodeType("Expression") && !this.isJSXElement() && !parentPath.isJSXElement() || parentPath.isForStatement() && this.key === "init") {
+ if (this.node) {
+ const node = this.node;
+ let {
+ scope
+ } = this;
+
+ if (scope.path.isPattern()) {
+ assertExpression(node);
+ this.replaceWith(callExpression(arrowFunctionExpression([], node), []));
+ this.get("callee.body").insertAfter(nodes);
+ return [this];
+ }
+
+ if (isHiddenInSequenceExpression(this)) {
+ nodes.unshift(node);
+ } else if (isCallExpression(node) && isSuper(node.callee)) {
+ nodes.unshift(node);
+ nodes.push(thisExpression());
+ } else if (isAlmostConstantAssignment(node, scope)) {
+ nodes.unshift(node);
+ nodes.push(cloneNode(node.left));
+ } else if (scope.isPure(node, true)) {
+ nodes.push(node);
+ } else {
+ if (parentPath.isMethod({
+ computed: true,
+ key: node
+ })) {
+ scope = scope.parent;
+ }
+
+ const temp = scope.generateDeclaredUidIdentifier();
+ nodes.unshift(expressionStatement(assignmentExpression("=", cloneNode(temp), node)));
+ nodes.push(expressionStatement(cloneNode(temp)));
+ }
+ }
+
+ return this.replaceExpressionWithStatements(nodes);
+ } else if (Array.isArray(this.container)) {
+ return this._containerInsertAfter(nodes);
+ } else if (this.isStatementOrBlock()) {
+ const node = this.node;
+ const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
+ this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
+ return this.pushContainer("body", nodes);
+ } else {
+ 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?");
+ }
+}
+
+function updateSiblingKeys(fromIndex, incrementBy) {
+ if (!this.parent) return;
+
+ const paths = _cache.path.get(this.parent);
+
+ for (const [, path] of paths) {
+ if (path.key >= fromIndex) {
+ path.key += incrementBy;
+ }
+ }
+}
+
+function _verifyNodeList(nodes) {
+ if (!nodes) {
+ return [];
+ }
+
+ if (!Array.isArray(nodes)) {
+ nodes = [nodes];
+ }
+
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ let msg;
+
+ if (!node) {
+ msg = "has falsy node";
+ } else if (typeof node !== "object") {
+ msg = "contains a non-object node";
+ } else if (!node.type) {
+ msg = "without a type";
+ } else if (node instanceof _index.default) {
+ msg = "has a NodePath when it expected a raw object";
+ }
+
+ if (msg) {
+ const type = Array.isArray(node) ? "array" : typeof node;
+ throw new Error(`Node list ${msg} with the index of ${i} and type of ${type}`);
+ }
+ }
+
+ return nodes;
+}
+
+function unshiftContainer(listKey, nodes) {
+ this._assertUnremoved();
+
+ nodes = this._verifyNodeList(nodes);
+
+ const path = _index.default.get({
+ parentPath: this,
+ parent: this.node,
+ container: this.node[listKey],
+ listKey,
+ key: 0
+ }).setContext(this.context);
+
+ return path._containerInsertBefore(nodes);
+}
+
+function pushContainer(listKey, nodes) {
+ this._assertUnremoved();
+
+ const verifiedNodes = this._verifyNodeList(nodes);
+
+ const container = this.node[listKey];
+
+ const path = _index.default.get({
+ parentPath: this,
+ parent: this.node,
+ container: container,
+ listKey,
+ key: container.length
+ }).setContext(this.context);
+
+ return path.replaceWithMultiple(verifiedNodes);
+}
+
+function hoist(scope = this.scope) {
+ const hoister = new _hoister.default(this, scope);
+ return hoister.run();
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/removal.js b/node_modules/@babel/traverse/lib/path/removal.js
new file mode 100644
index 0000000..3e5d4ff
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/removal.js
@@ -0,0 +1,73 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports._assertUnremoved = _assertUnremoved;
+exports._callRemovalHooks = _callRemovalHooks;
+exports._markRemoved = _markRemoved;
+exports._remove = _remove;
+exports._removeFromScope = _removeFromScope;
+exports.remove = remove;
+
+var _removalHooks = require("./lib/removal-hooks");
+
+var _cache = require("../cache");
+
+var _index = require("./index");
+
+function remove() {
+ var _this$opts;
+
+ this._assertUnremoved();
+
+ this.resync();
+
+ if (!((_this$opts = this.opts) != null && _this$opts.noScope)) {
+ this._removeFromScope();
+ }
+
+ if (this._callRemovalHooks()) {
+ this._markRemoved();
+
+ return;
+ }
+
+ this.shareCommentsWithSiblings();
+
+ this._remove();
+
+ this._markRemoved();
+}
+
+function _removeFromScope() {
+ const bindings = this.getBindingIdentifiers();
+ Object.keys(bindings).forEach(name => this.scope.removeBinding(name));
+}
+
+function _callRemovalHooks() {
+ for (const fn of _removalHooks.hooks) {
+ if (fn(this, this.parentPath)) return true;
+ }
+}
+
+function _remove() {
+ if (Array.isArray(this.container)) {
+ this.container.splice(this.key, 1);
+ this.updateSiblingKeys(this.key, -1);
+ } else {
+ this._replaceWith(null);
+ }
+}
+
+function _markRemoved() {
+ this._traverseFlags |= _index.SHOULD_SKIP | _index.REMOVED;
+ if (this.parent) _cache.path.get(this.parent).delete(this.node);
+ this.node = null;
+}
+
+function _assertUnremoved() {
+ if (this.removed) {
+ throw this.buildCodeFrameError("NodePath has been removed so is read-only.");
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/path/replacement.js b/node_modules/@babel/traverse/lib/path/replacement.js
new file mode 100644
index 0000000..ee5cdce
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/path/replacement.js
@@ -0,0 +1,260 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports._replaceWith = _replaceWith;
+exports.replaceExpressionWithStatements = replaceExpressionWithStatements;
+exports.replaceInline = replaceInline;
+exports.replaceWith = replaceWith;
+exports.replaceWithMultiple = replaceWithMultiple;
+exports.replaceWithSourceString = replaceWithSourceString;
+
+var _codeFrame = require("@babel/code-frame");
+
+var _index = require("../index");
+
+var _index2 = require("./index");
+
+var _cache = require("../cache");
+
+var _parser = require("@babel/parser");
+
+var _t = require("@babel/types");
+
+var _helperHoistVariables = require("@babel/helper-hoist-variables");
+
+const {
+ FUNCTION_TYPES,
+ arrowFunctionExpression,
+ assignmentExpression,
+ awaitExpression,
+ blockStatement,
+ callExpression,
+ cloneNode,
+ expressionStatement,
+ identifier,
+ inheritLeadingComments,
+ inheritTrailingComments,
+ inheritsComments,
+ isExpression,
+ isProgram,
+ isStatement,
+ removeComments,
+ returnStatement,
+ toSequenceExpression,
+ validate,
+ yieldExpression
+} = _t;
+
+function replaceWithMultiple(nodes) {
+ var _pathCache$get;
+
+ this.resync();
+ nodes = this._verifyNodeList(nodes);
+ inheritLeadingComments(nodes[0], this.node);
+ inheritTrailingComments(nodes[nodes.length - 1], this.node);
+ (_pathCache$get = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get.delete(this.node);
+ this.node = this.container[this.key] = null;
+ const paths = this.insertAfter(nodes);
+
+ if (this.node) {
+ this.requeue();
+ } else {
+ this.remove();
+ }
+
+ return paths;
+}
+
+function replaceWithSourceString(replacement) {
+ this.resync();
+
+ try {
+ replacement = `(${replacement})`;
+ replacement = (0, _parser.parse)(replacement);
+ } catch (err) {
+ const loc = err.loc;
+
+ if (loc) {
+ err.message += " - make sure this is an expression.\n" + (0, _codeFrame.codeFrameColumns)(replacement, {
+ start: {
+ line: loc.line,
+ column: loc.column + 1
+ }
+ });
+ err.code = "BABEL_REPLACE_SOURCE_ERROR";
+ }
+
+ throw err;
+ }
+
+ replacement = replacement.program.body[0].expression;
+
+ _index.default.removeProperties(replacement);
+
+ return this.replaceWith(replacement);
+}
+
+function replaceWith(replacement) {
+ this.resync();
+
+ if (this.removed) {
+ throw new Error("You can't replace this node, we've already removed it");
+ }
+
+ if (replacement instanceof _index2.default) {
+ replacement = replacement.node;
+ }
+
+ if (!replacement) {
+ throw new Error("You passed `path.replaceWith()` a falsy node, use `path.remove()` instead");
+ }
+
+ if (this.node === replacement) {
+ return [this];
+ }
+
+ if (this.isProgram() && !isProgram(replacement)) {
+ throw new Error("You can only replace a Program root node with another Program node");
+ }
+
+ if (Array.isArray(replacement)) {
+ throw new Error("Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`");
+ }
+
+ if (typeof replacement === "string") {
+ throw new Error("Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`");
+ }
+
+ let nodePath = "";
+
+ if (this.isNodeType("Statement") && isExpression(replacement)) {
+ if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement) && !this.parentPath.isExportDefaultDeclaration()) {
+ replacement = expressionStatement(replacement);
+ nodePath = "expression";
+ }
+ }
+
+ if (this.isNodeType("Expression") && isStatement(replacement)) {
+ if (!this.canHaveVariableDeclarationOrExpression() && !this.canSwapBetweenExpressionAndStatement(replacement)) {
+ return this.replaceExpressionWithStatements([replacement]);
+ }
+ }
+
+ const oldNode = this.node;
+
+ if (oldNode) {
+ inheritsComments(replacement, oldNode);
+ removeComments(oldNode);
+ }
+
+ this._replaceWith(replacement);
+
+ this.type = replacement.type;
+ this.setScope();
+ this.requeue();
+ return [nodePath ? this.get(nodePath) : this];
+}
+
+function _replaceWith(node) {
+ var _pathCache$get2;
+
+ if (!this.container) {
+ throw new ReferenceError("Container is falsy");
+ }
+
+ if (this.inList) {
+ validate(this.parent, this.key, [node]);
+ } else {
+ validate(this.parent, this.key, node);
+ }
+
+ this.debug(`Replace with ${node == null ? void 0 : node.type}`);
+ (_pathCache$get2 = _cache.path.get(this.parent)) == null ? void 0 : _pathCache$get2.set(node, this).delete(this.node);
+ this.node = this.container[this.key] = node;
+}
+
+function replaceExpressionWithStatements(nodes) {
+ this.resync();
+ const nodesAsSequenceExpression = toSequenceExpression(nodes, this.scope);
+
+ if (nodesAsSequenceExpression) {
+ return this.replaceWith(nodesAsSequenceExpression)[0].get("expressions");
+ }
+
+ const functionParent = this.getFunctionParent();
+ const isParentAsync = functionParent == null ? void 0 : functionParent.is("async");
+ const isParentGenerator = functionParent == null ? void 0 : functionParent.is("generator");
+ const container = arrowFunctionExpression([], blockStatement(nodes));
+ this.replaceWith(callExpression(container, []));
+ const callee = this.get("callee");
+ (0, _helperHoistVariables.default)(callee.get("body"), id => {
+ this.scope.push({
+ id
+ });
+ }, "var");
+ const completionRecords = this.get("callee").getCompletionRecords();
+
+ for (const path of completionRecords) {
+ if (!path.isExpressionStatement()) continue;
+ const loop = path.findParent(path => path.isLoop());
+
+ if (loop) {
+ let uid = loop.getData("expressionReplacementReturnUid");
+
+ if (!uid) {
+ uid = callee.scope.generateDeclaredUidIdentifier("ret");
+ callee.get("body").pushContainer("body", returnStatement(cloneNode(uid)));
+ loop.setData("expressionReplacementReturnUid", uid);
+ } else {
+ uid = identifier(uid.name);
+ }
+
+ path.get("expression").replaceWith(assignmentExpression("=", cloneNode(uid), path.node.expression));
+ } else {
+ path.replaceWith(returnStatement(path.node.expression));
+ }
+ }
+
+ callee.arrowFunctionToExpression();
+ const newCallee = callee;
+
+ const needToAwaitFunction = isParentAsync && _index.default.hasType(this.get("callee.body").node, "AwaitExpression", FUNCTION_TYPES);
+
+ const needToYieldFunction = isParentGenerator && _index.default.hasType(this.get("callee.body").node, "YieldExpression", FUNCTION_TYPES);
+
+ if (needToAwaitFunction) {
+ newCallee.set("async", true);
+
+ if (!needToYieldFunction) {
+ this.replaceWith(awaitExpression(this.node));
+ }
+ }
+
+ if (needToYieldFunction) {
+ newCallee.set("generator", true);
+ this.replaceWith(yieldExpression(this.node, true));
+ }
+
+ return newCallee.get("body.body");
+}
+
+function replaceInline(nodes) {
+ this.resync();
+
+ if (Array.isArray(nodes)) {
+ if (Array.isArray(this.container)) {
+ nodes = this._verifyNodeList(nodes);
+
+ const paths = this._containerInsertAfter(nodes);
+
+ this.remove();
+ return paths;
+ } else {
+ return this.replaceWithMultiple(nodes);
+ }
+ } else {
+ return this.replaceWith(nodes);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/scope/binding.js b/node_modules/@babel/traverse/lib/scope/binding.js
new file mode 100644
index 0000000..16911ef
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/scope/binding.js
@@ -0,0 +1,75 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+class Binding {
+ constructor({
+ identifier,
+ scope,
+ path,
+ kind
+ }) {
+ this.identifier = void 0;
+ this.scope = void 0;
+ this.path = void 0;
+ this.kind = void 0;
+ this.constantViolations = [];
+ this.constant = true;
+ this.referencePaths = [];
+ this.referenced = false;
+ this.references = 0;
+ this.identifier = identifier;
+ this.scope = scope;
+ this.path = path;
+ this.kind = kind;
+ this.clearValue();
+ }
+
+ deoptValue() {
+ this.clearValue();
+ this.hasDeoptedValue = true;
+ }
+
+ setValue(value) {
+ if (this.hasDeoptedValue) return;
+ this.hasValue = true;
+ this.value = value;
+ }
+
+ clearValue() {
+ this.hasDeoptedValue = false;
+ this.hasValue = false;
+ this.value = null;
+ }
+
+ reassign(path) {
+ this.constant = false;
+
+ if (this.constantViolations.indexOf(path) !== -1) {
+ return;
+ }
+
+ this.constantViolations.push(path);
+ }
+
+ reference(path) {
+ if (this.referencePaths.indexOf(path) !== -1) {
+ return;
+ }
+
+ this.referenced = true;
+ this.references++;
+ this.referencePaths.push(path);
+ }
+
+ dereference() {
+ this.references--;
+ this.referenced = !!this.references;
+ }
+
+}
+
+exports.default = Binding; \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/scope/index.js b/node_modules/@babel/traverse/lib/scope/index.js
new file mode 100644
index 0000000..ee376a8
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/scope/index.js
@@ -0,0 +1,1018 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _renamer = require("./lib/renamer");
+
+var _index = require("../index");
+
+var _binding = require("./binding");
+
+var _globals = require("globals");
+
+var _t = require("@babel/types");
+
+var _cache = require("../cache");
+
+const {
+ NOT_LOCAL_BINDING,
+ callExpression,
+ cloneNode,
+ getBindingIdentifiers,
+ identifier,
+ isArrayExpression,
+ isBinary,
+ isClass,
+ isClassBody,
+ isClassDeclaration,
+ isExportAllDeclaration,
+ isExportDefaultDeclaration,
+ isExportNamedDeclaration,
+ isFunctionDeclaration,
+ isIdentifier,
+ isImportDeclaration,
+ isLiteral,
+ isMethod,
+ isModuleDeclaration,
+ isModuleSpecifier,
+ isObjectExpression,
+ isProperty,
+ isPureish,
+ isSuper,
+ isTaggedTemplateExpression,
+ isTemplateLiteral,
+ isThisExpression,
+ isUnaryExpression,
+ isVariableDeclaration,
+ matchesPattern,
+ memberExpression,
+ numericLiteral,
+ toIdentifier,
+ unaryExpression,
+ variableDeclaration,
+ variableDeclarator
+} = _t;
+
+function gatherNodeParts(node, parts) {
+ switch (node == null ? void 0 : node.type) {
+ default:
+ if (isModuleDeclaration(node)) {
+ if ((isExportAllDeclaration(node) || isExportNamedDeclaration(node) || isImportDeclaration(node)) && node.source) {
+ gatherNodeParts(node.source, parts);
+ } else if ((isExportNamedDeclaration(node) || isImportDeclaration(node)) && node.specifiers && node.specifiers.length) {
+ for (const e of node.specifiers) gatherNodeParts(e, parts);
+ } else if ((isExportDefaultDeclaration(node) || isExportNamedDeclaration(node)) && node.declaration) {
+ gatherNodeParts(node.declaration, parts);
+ }
+ } else if (isModuleSpecifier(node)) {
+ gatherNodeParts(node.local, parts);
+ } else if (isLiteral(node)) {
+ parts.push(node.value);
+ }
+
+ break;
+
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ case "JSXMemberExpression":
+ gatherNodeParts(node.object, parts);
+ gatherNodeParts(node.property, parts);
+ break;
+
+ case "Identifier":
+ case "JSXIdentifier":
+ parts.push(node.name);
+ break;
+
+ case "CallExpression":
+ case "OptionalCallExpression":
+ case "NewExpression":
+ gatherNodeParts(node.callee, parts);
+ break;
+
+ case "ObjectExpression":
+ case "ObjectPattern":
+ for (const e of node.properties) {
+ gatherNodeParts(e, parts);
+ }
+
+ break;
+
+ case "SpreadElement":
+ case "RestElement":
+ gatherNodeParts(node.argument, parts);
+ break;
+
+ case "ObjectProperty":
+ case "ObjectMethod":
+ case "ClassProperty":
+ case "ClassMethod":
+ case "ClassPrivateProperty":
+ case "ClassPrivateMethod":
+ gatherNodeParts(node.key, parts);
+ break;
+
+ case "ThisExpression":
+ parts.push("this");
+ break;
+
+ case "Super":
+ parts.push("super");
+ break;
+
+ case "Import":
+ parts.push("import");
+ break;
+
+ case "DoExpression":
+ parts.push("do");
+ break;
+
+ case "YieldExpression":
+ parts.push("yield");
+ gatherNodeParts(node.argument, parts);
+ break;
+
+ case "AwaitExpression":
+ parts.push("await");
+ gatherNodeParts(node.argument, parts);
+ break;
+
+ case "AssignmentExpression":
+ gatherNodeParts(node.left, parts);
+ break;
+
+ case "VariableDeclarator":
+ gatherNodeParts(node.id, parts);
+ break;
+
+ case "FunctionExpression":
+ case "FunctionDeclaration":
+ case "ClassExpression":
+ case "ClassDeclaration":
+ gatherNodeParts(node.id, parts);
+ break;
+
+ case "PrivateName":
+ gatherNodeParts(node.id, parts);
+ break;
+
+ case "ParenthesizedExpression":
+ gatherNodeParts(node.expression, parts);
+ break;
+
+ case "UnaryExpression":
+ case "UpdateExpression":
+ gatherNodeParts(node.argument, parts);
+ break;
+
+ case "MetaProperty":
+ gatherNodeParts(node.meta, parts);
+ gatherNodeParts(node.property, parts);
+ break;
+
+ case "JSXElement":
+ gatherNodeParts(node.openingElement, parts);
+ break;
+
+ case "JSXOpeningElement":
+ parts.push(node.name);
+ break;
+
+ case "JSXFragment":
+ gatherNodeParts(node.openingFragment, parts);
+ break;
+
+ case "JSXOpeningFragment":
+ parts.push("Fragment");
+ break;
+
+ case "JSXNamespacedName":
+ gatherNodeParts(node.namespace, parts);
+ gatherNodeParts(node.name, parts);
+ break;
+ }
+}
+
+const collectorVisitor = {
+ ForStatement(path) {
+ const declar = path.get("init");
+
+ if (declar.isVar()) {
+ const {
+ scope
+ } = path;
+ const parentScope = scope.getFunctionParent() || scope.getProgramParent();
+ parentScope.registerBinding("var", declar);
+ }
+ },
+
+ Declaration(path) {
+ if (path.isBlockScoped()) return;
+ if (path.isImportDeclaration()) return;
+ if (path.isExportDeclaration()) return;
+ const parent = path.scope.getFunctionParent() || path.scope.getProgramParent();
+ parent.registerDeclaration(path);
+ },
+
+ ImportDeclaration(path) {
+ const parent = path.scope.getBlockParent();
+ parent.registerDeclaration(path);
+ },
+
+ ReferencedIdentifier(path, state) {
+ state.references.push(path);
+ },
+
+ ForXStatement(path, state) {
+ const left = path.get("left");
+
+ if (left.isPattern() || left.isIdentifier()) {
+ state.constantViolations.push(path);
+ } else if (left.isVar()) {
+ const {
+ scope
+ } = path;
+ const parentScope = scope.getFunctionParent() || scope.getProgramParent();
+ parentScope.registerBinding("var", left);
+ }
+ },
+
+ ExportDeclaration: {
+ exit(path) {
+ const {
+ node,
+ scope
+ } = path;
+ if (isExportAllDeclaration(node)) return;
+ const declar = node.declaration;
+
+ if (isClassDeclaration(declar) || isFunctionDeclaration(declar)) {
+ const id = declar.id;
+ if (!id) return;
+ const binding = scope.getBinding(id.name);
+ binding == null ? void 0 : binding.reference(path);
+ } else if (isVariableDeclaration(declar)) {
+ for (const decl of declar.declarations) {
+ for (const name of Object.keys(getBindingIdentifiers(decl))) {
+ const binding = scope.getBinding(name);
+ binding == null ? void 0 : binding.reference(path);
+ }
+ }
+ }
+ }
+
+ },
+
+ LabeledStatement(path) {
+ path.scope.getBlockParent().registerDeclaration(path);
+ },
+
+ AssignmentExpression(path, state) {
+ state.assignments.push(path);
+ },
+
+ UpdateExpression(path, state) {
+ state.constantViolations.push(path);
+ },
+
+ UnaryExpression(path, state) {
+ if (path.node.operator === "delete") {
+ state.constantViolations.push(path);
+ }
+ },
+
+ BlockScoped(path) {
+ let scope = path.scope;
+ if (scope.path === path) scope = scope.parent;
+ const parent = scope.getBlockParent();
+ parent.registerDeclaration(path);
+
+ if (path.isClassDeclaration() && path.node.id) {
+ const id = path.node.id;
+ const name = id.name;
+ path.scope.bindings[name] = path.scope.parent.getBinding(name);
+ }
+ },
+
+ CatchClause(path) {
+ path.scope.registerBinding("let", path);
+ },
+
+ Function(path) {
+ const params = path.get("params");
+
+ for (const param of params) {
+ path.scope.registerBinding("param", param);
+ }
+
+ if (path.isFunctionExpression() && path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING]) {
+ path.scope.registerBinding("local", path.get("id"), path);
+ }
+ },
+
+ ClassExpression(path) {
+ if (path.has("id") && !path.get("id").node[NOT_LOCAL_BINDING]) {
+ path.scope.registerBinding("local", path);
+ }
+ }
+
+};
+let uid = 0;
+
+class Scope {
+ constructor(path) {
+ this.uid = void 0;
+ this.path = void 0;
+ this.block = void 0;
+ this.labels = void 0;
+ this.inited = void 0;
+ this.bindings = void 0;
+ this.references = void 0;
+ this.globals = void 0;
+ this.uids = void 0;
+ this.data = void 0;
+ this.crawling = void 0;
+ const {
+ node
+ } = path;
+
+ const cached = _cache.scope.get(node);
+
+ if ((cached == null ? void 0 : cached.path) === path) {
+ return cached;
+ }
+
+ _cache.scope.set(node, this);
+
+ this.uid = uid++;
+ this.block = node;
+ this.path = path;
+ this.labels = new Map();
+ this.inited = false;
+ }
+
+ get parent() {
+ var _parent;
+
+ let parent,
+ path = this.path;
+
+ do {
+ const isKey = path.key === "key";
+ path = path.parentPath;
+ if (isKey && path.isMethod()) path = path.parentPath;
+ if (path && path.isScope()) parent = path;
+ } while (path && !parent);
+
+ return (_parent = parent) == null ? void 0 : _parent.scope;
+ }
+
+ get parentBlock() {
+ return this.path.parent;
+ }
+
+ get hub() {
+ return this.path.hub;
+ }
+
+ traverse(node, opts, state) {
+ (0, _index.default)(node, opts, this, state, this.path);
+ }
+
+ generateDeclaredUidIdentifier(name) {
+ const id = this.generateUidIdentifier(name);
+ this.push({
+ id
+ });
+ return cloneNode(id);
+ }
+
+ generateUidIdentifier(name) {
+ return identifier(this.generateUid(name));
+ }
+
+ generateUid(name = "temp") {
+ name = toIdentifier(name).replace(/^_+/, "").replace(/[0-9]+$/g, "");
+ let uid;
+ let i = 1;
+
+ do {
+ uid = this._generateUid(name, i);
+ i++;
+ } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid));
+
+ const program = this.getProgramParent();
+ program.references[uid] = true;
+ program.uids[uid] = true;
+ return uid;
+ }
+
+ _generateUid(name, i) {
+ let id = name;
+ if (i > 1) id += i;
+ return `_${id}`;
+ }
+
+ generateUidBasedOnNode(node, defaultName) {
+ const parts = [];
+ gatherNodeParts(node, parts);
+ let id = parts.join("$");
+ id = id.replace(/^_/, "") || defaultName || "ref";
+ return this.generateUid(id.slice(0, 20));
+ }
+
+ generateUidIdentifierBasedOnNode(node, defaultName) {
+ return identifier(this.generateUidBasedOnNode(node, defaultName));
+ }
+
+ isStatic(node) {
+ if (isThisExpression(node) || isSuper(node)) {
+ return true;
+ }
+
+ if (isIdentifier(node)) {
+ const binding = this.getBinding(node.name);
+
+ if (binding) {
+ return binding.constant;
+ } else {
+ return this.hasBinding(node.name);
+ }
+ }
+
+ return false;
+ }
+
+ maybeGenerateMemoised(node, dontPush) {
+ if (this.isStatic(node)) {
+ return null;
+ } else {
+ const id = this.generateUidIdentifierBasedOnNode(node);
+
+ if (!dontPush) {
+ this.push({
+ id
+ });
+ return cloneNode(id);
+ }
+
+ return id;
+ }
+ }
+
+ checkBlockScopedCollisions(local, kind, name, id) {
+ if (kind === "param") return;
+ if (local.kind === "local") return;
+ const duplicate = kind === "let" || local.kind === "let" || local.kind === "const" || local.kind === "module" || local.kind === "param" && kind === "const";
+
+ if (duplicate) {
+ throw this.hub.buildError(id, `Duplicate declaration "${name}"`, TypeError);
+ }
+ }
+
+ rename(oldName, newName, block) {
+ const binding = this.getBinding(oldName);
+
+ if (binding) {
+ newName = newName || this.generateUidIdentifier(oldName).name;
+ return new _renamer.default(binding, oldName, newName).rename(block);
+ }
+ }
+
+ _renameFromMap(map, oldName, newName, value) {
+ if (map[oldName]) {
+ map[newName] = value;
+ map[oldName] = null;
+ }
+ }
+
+ dump() {
+ const sep = "-".repeat(60);
+ console.log(sep);
+ let scope = this;
+
+ do {
+ console.log("#", scope.block.type);
+
+ for (const name of Object.keys(scope.bindings)) {
+ const binding = scope.bindings[name];
+ console.log(" -", name, {
+ constant: binding.constant,
+ references: binding.references,
+ violations: binding.constantViolations.length,
+ kind: binding.kind
+ });
+ }
+ } while (scope = scope.parent);
+
+ console.log(sep);
+ }
+
+ toArray(node, i, arrayLikeIsIterable) {
+ if (isIdentifier(node)) {
+ const binding = this.getBinding(node.name);
+
+ if (binding != null && binding.constant && binding.path.isGenericType("Array")) {
+ return node;
+ }
+ }
+
+ if (isArrayExpression(node)) {
+ return node;
+ }
+
+ if (isIdentifier(node, {
+ name: "arguments"
+ })) {
+ return callExpression(memberExpression(memberExpression(memberExpression(identifier("Array"), identifier("prototype")), identifier("slice")), identifier("call")), [node]);
+ }
+
+ let helperName;
+ const args = [node];
+
+ if (i === true) {
+ helperName = "toConsumableArray";
+ } else if (i) {
+ args.push(numericLiteral(i));
+ helperName = "slicedToArray";
+ } else {
+ helperName = "toArray";
+ }
+
+ if (arrayLikeIsIterable) {
+ args.unshift(this.hub.addHelper(helperName));
+ helperName = "maybeArrayLike";
+ }
+
+ return callExpression(this.hub.addHelper(helperName), args);
+ }
+
+ hasLabel(name) {
+ return !!this.getLabel(name);
+ }
+
+ getLabel(name) {
+ return this.labels.get(name);
+ }
+
+ registerLabel(path) {
+ this.labels.set(path.node.label.name, path);
+ }
+
+ registerDeclaration(path) {
+ if (path.isLabeledStatement()) {
+ this.registerLabel(path);
+ } else if (path.isFunctionDeclaration()) {
+ this.registerBinding("hoisted", path.get("id"), path);
+ } else if (path.isVariableDeclaration()) {
+ const declarations = path.get("declarations");
+
+ for (const declar of declarations) {
+ this.registerBinding(path.node.kind, declar);
+ }
+ } else if (path.isClassDeclaration()) {
+ if (path.node.declare) return;
+ this.registerBinding("let", path);
+ } else if (path.isImportDeclaration()) {
+ const specifiers = path.get("specifiers");
+
+ for (const specifier of specifiers) {
+ this.registerBinding("module", specifier);
+ }
+ } else if (path.isExportDeclaration()) {
+ const declar = path.get("declaration");
+
+ if (declar.isClassDeclaration() || declar.isFunctionDeclaration() || declar.isVariableDeclaration()) {
+ this.registerDeclaration(declar);
+ }
+ } else {
+ this.registerBinding("unknown", path);
+ }
+ }
+
+ buildUndefinedNode() {
+ return unaryExpression("void", numericLiteral(0), true);
+ }
+
+ registerConstantViolation(path) {
+ const ids = path.getBindingIdentifiers();
+
+ for (const name of Object.keys(ids)) {
+ const binding = this.getBinding(name);
+ if (binding) binding.reassign(path);
+ }
+ }
+
+ registerBinding(kind, path, bindingPath = path) {
+ if (!kind) throw new ReferenceError("no `kind`");
+
+ if (path.isVariableDeclaration()) {
+ const declarators = path.get("declarations");
+
+ for (const declar of declarators) {
+ this.registerBinding(kind, declar);
+ }
+
+ return;
+ }
+
+ const parent = this.getProgramParent();
+ const ids = path.getOuterBindingIdentifiers(true);
+
+ for (const name of Object.keys(ids)) {
+ parent.references[name] = true;
+
+ for (const id of ids[name]) {
+ const local = this.getOwnBinding(name);
+
+ if (local) {
+ if (local.identifier === id) continue;
+ this.checkBlockScopedCollisions(local, kind, name, id);
+ }
+
+ if (local) {
+ this.registerConstantViolation(bindingPath);
+ } else {
+ this.bindings[name] = new _binding.default({
+ identifier: id,
+ scope: this,
+ path: bindingPath,
+ kind: kind
+ });
+ }
+ }
+ }
+ }
+
+ addGlobal(node) {
+ this.globals[node.name] = node;
+ }
+
+ hasUid(name) {
+ let scope = this;
+
+ do {
+ if (scope.uids[name]) return true;
+ } while (scope = scope.parent);
+
+ return false;
+ }
+
+ hasGlobal(name) {
+ let scope = this;
+
+ do {
+ if (scope.globals[name]) return true;
+ } while (scope = scope.parent);
+
+ return false;
+ }
+
+ hasReference(name) {
+ return !!this.getProgramParent().references[name];
+ }
+
+ isPure(node, constantsOnly) {
+ if (isIdentifier(node)) {
+ const binding = this.getBinding(node.name);
+ if (!binding) return false;
+ if (constantsOnly) return binding.constant;
+ return true;
+ } else if (isClass(node)) {
+ if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {
+ return false;
+ }
+
+ return this.isPure(node.body, constantsOnly);
+ } else if (isClassBody(node)) {
+ for (const method of node.body) {
+ if (!this.isPure(method, constantsOnly)) return false;
+ }
+
+ return true;
+ } else if (isBinary(node)) {
+ return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);
+ } else if (isArrayExpression(node)) {
+ for (const elem of node.elements) {
+ if (!this.isPure(elem, constantsOnly)) return false;
+ }
+
+ return true;
+ } else if (isObjectExpression(node)) {
+ for (const prop of node.properties) {
+ if (!this.isPure(prop, constantsOnly)) return false;
+ }
+
+ return true;
+ } else if (isMethod(node)) {
+ if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
+ if (node.kind === "get" || node.kind === "set") return false;
+ return true;
+ } else if (isProperty(node)) {
+ if (node.computed && !this.isPure(node.key, constantsOnly)) return false;
+ return this.isPure(node.value, constantsOnly);
+ } else if (isUnaryExpression(node)) {
+ return this.isPure(node.argument, constantsOnly);
+ } else if (isTaggedTemplateExpression(node)) {
+ return matchesPattern(node.tag, "String.raw") && !this.hasBinding("String", true) && this.isPure(node.quasi, constantsOnly);
+ } else if (isTemplateLiteral(node)) {
+ for (const expression of node.expressions) {
+ if (!this.isPure(expression, constantsOnly)) return false;
+ }
+
+ return true;
+ } else {
+ return isPureish(node);
+ }
+ }
+
+ setData(key, val) {
+ return this.data[key] = val;
+ }
+
+ getData(key) {
+ let scope = this;
+
+ do {
+ const data = scope.data[key];
+ if (data != null) return data;
+ } while (scope = scope.parent);
+ }
+
+ removeData(key) {
+ let scope = this;
+
+ do {
+ const data = scope.data[key];
+ if (data != null) scope.data[key] = null;
+ } while (scope = scope.parent);
+ }
+
+ init() {
+ if (!this.inited) {
+ this.inited = true;
+ this.crawl();
+ }
+ }
+
+ crawl() {
+ const path = this.path;
+ this.references = Object.create(null);
+ this.bindings = Object.create(null);
+ this.globals = Object.create(null);
+ this.uids = Object.create(null);
+ this.data = Object.create(null);
+ const programParent = this.getProgramParent();
+ if (programParent.crawling) return;
+ const state = {
+ references: [],
+ constantViolations: [],
+ assignments: []
+ };
+ this.crawling = true;
+
+ if (path.type !== "Program" && collectorVisitor._exploded) {
+ for (const visit of collectorVisitor.enter) {
+ visit(path, state);
+ }
+
+ const typeVisitors = collectorVisitor[path.type];
+
+ if (typeVisitors) {
+ for (const visit of typeVisitors.enter) {
+ visit(path, state);
+ }
+ }
+ }
+
+ path.traverse(collectorVisitor, state);
+ this.crawling = false;
+
+ for (const path of state.assignments) {
+ const ids = path.getBindingIdentifiers();
+
+ for (const name of Object.keys(ids)) {
+ if (path.scope.getBinding(name)) continue;
+ programParent.addGlobal(ids[name]);
+ }
+
+ path.scope.registerConstantViolation(path);
+ }
+
+ for (const ref of state.references) {
+ const binding = ref.scope.getBinding(ref.node.name);
+
+ if (binding) {
+ binding.reference(ref);
+ } else {
+ programParent.addGlobal(ref.node);
+ }
+ }
+
+ for (const path of state.constantViolations) {
+ path.scope.registerConstantViolation(path);
+ }
+ }
+
+ push(opts) {
+ let path = this.path;
+
+ if (!path.isBlockStatement() && !path.isProgram()) {
+ path = this.getBlockParent().path;
+ }
+
+ if (path.isSwitchStatement()) {
+ path = (this.getFunctionParent() || this.getProgramParent()).path;
+ }
+
+ if (path.isLoop() || path.isCatchClause() || path.isFunction()) {
+ path.ensureBlock();
+ path = path.get("body");
+ }
+
+ const unique = opts.unique;
+ const kind = opts.kind || "var";
+ const blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;
+ const dataKey = `declaration:${kind}:${blockHoist}`;
+ let declarPath = !unique && path.getData(dataKey);
+
+ if (!declarPath) {
+ const declar = variableDeclaration(kind, []);
+ declar._blockHoist = blockHoist;
+ [declarPath] = path.unshiftContainer("body", [declar]);
+ if (!unique) path.setData(dataKey, declarPath);
+ }
+
+ const declarator = variableDeclarator(opts.id, opts.init);
+ const len = declarPath.node.declarations.push(declarator);
+ path.scope.registerBinding(kind, declarPath.get("declarations")[len - 1]);
+ }
+
+ getProgramParent() {
+ let scope = this;
+
+ do {
+ if (scope.path.isProgram()) {
+ return scope;
+ }
+ } while (scope = scope.parent);
+
+ throw new Error("Couldn't find a Program");
+ }
+
+ getFunctionParent() {
+ let scope = this;
+
+ do {
+ if (scope.path.isFunctionParent()) {
+ return scope;
+ }
+ } while (scope = scope.parent);
+
+ return null;
+ }
+
+ getBlockParent() {
+ let scope = this;
+
+ do {
+ if (scope.path.isBlockParent()) {
+ return scope;
+ }
+ } while (scope = scope.parent);
+
+ throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...");
+ }
+
+ getAllBindings() {
+ const ids = Object.create(null);
+ let scope = this;
+
+ do {
+ for (const key of Object.keys(scope.bindings)) {
+ if (key in ids === false) {
+ ids[key] = scope.bindings[key];
+ }
+ }
+
+ scope = scope.parent;
+ } while (scope);
+
+ return ids;
+ }
+
+ getAllBindingsOfKind(...kinds) {
+ const ids = Object.create(null);
+
+ for (const kind of kinds) {
+ let scope = this;
+
+ do {
+ for (const name of Object.keys(scope.bindings)) {
+ const binding = scope.bindings[name];
+ if (binding.kind === kind) ids[name] = binding;
+ }
+
+ scope = scope.parent;
+ } while (scope);
+ }
+
+ return ids;
+ }
+
+ bindingIdentifierEquals(name, node) {
+ return this.getBindingIdentifier(name) === node;
+ }
+
+ getBinding(name) {
+ let scope = this;
+ let previousPath;
+
+ do {
+ const binding = scope.getOwnBinding(name);
+
+ if (binding) {
+ var _previousPath;
+
+ if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== "param" && binding.kind !== "local") {} else {
+ return binding;
+ }
+ } else if (!binding && name === "arguments" && scope.path.isFunction() && !scope.path.isArrowFunctionExpression()) {
+ break;
+ }
+
+ previousPath = scope.path;
+ } while (scope = scope.parent);
+ }
+
+ getOwnBinding(name) {
+ return this.bindings[name];
+ }
+
+ getBindingIdentifier(name) {
+ var _this$getBinding;
+
+ return (_this$getBinding = this.getBinding(name)) == null ? void 0 : _this$getBinding.identifier;
+ }
+
+ getOwnBindingIdentifier(name) {
+ const binding = this.bindings[name];
+ return binding == null ? void 0 : binding.identifier;
+ }
+
+ hasOwnBinding(name) {
+ return !!this.getOwnBinding(name);
+ }
+
+ hasBinding(name, noGlobals) {
+ if (!name) return false;
+ if (this.hasOwnBinding(name)) return true;
+ if (this.parentHasBinding(name, noGlobals)) return true;
+ if (this.hasUid(name)) return true;
+ if (!noGlobals && Scope.globals.includes(name)) return true;
+ if (!noGlobals && Scope.contextVariables.includes(name)) return true;
+ return false;
+ }
+
+ parentHasBinding(name, noGlobals) {
+ var _this$parent;
+
+ return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name, noGlobals);
+ }
+
+ moveBindingTo(name, scope) {
+ const info = this.getBinding(name);
+
+ if (info) {
+ info.scope.removeOwnBinding(name);
+ info.scope = scope;
+ scope.bindings[name] = info;
+ }
+ }
+
+ removeOwnBinding(name) {
+ delete this.bindings[name];
+ }
+
+ removeBinding(name) {
+ var _this$getBinding2;
+
+ (_this$getBinding2 = this.getBinding(name)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name);
+ let scope = this;
+
+ do {
+ if (scope.uids[name]) {
+ scope.uids[name] = false;
+ }
+ } while (scope = scope.parent);
+ }
+
+}
+
+exports.default = Scope;
+Scope.globals = Object.keys(_globals.builtin);
+Scope.contextVariables = ["arguments", "undefined", "Infinity", "NaN"]; \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/scope/lib/renamer.js b/node_modules/@babel/traverse/lib/scope/lib/renamer.js
new file mode 100644
index 0000000..f11bbb7
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/scope/lib/renamer.js
@@ -0,0 +1,146 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _binding = require("../binding");
+
+var _helperSplitExportDeclaration = require("@babel/helper-split-export-declaration");
+
+var _t = require("@babel/types");
+
+const {
+ VISITOR_KEYS,
+ assignmentExpression,
+ identifier,
+ toExpression,
+ variableDeclaration,
+ variableDeclarator
+} = _t;
+const renameVisitor = {
+ ReferencedIdentifier({
+ node
+ }, state) {
+ if (node.name === state.oldName) {
+ node.name = state.newName;
+ }
+ },
+
+ Scope(path, state) {
+ if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {
+ skipAllButComputedMethodKey(path);
+ }
+ },
+
+ "AssignmentExpression|Declaration|VariableDeclarator"(path, state) {
+ if (path.isVariableDeclaration()) return;
+ const ids = path.getOuterBindingIdentifiers();
+
+ for (const name in ids) {
+ if (name === state.oldName) ids[name].name = state.newName;
+ }
+ }
+
+};
+
+class Renamer {
+ constructor(binding, oldName, newName) {
+ this.newName = newName;
+ this.oldName = oldName;
+ this.binding = binding;
+ }
+
+ maybeConvertFromExportDeclaration(parentDeclar) {
+ const maybeExportDeclar = parentDeclar.parentPath;
+
+ if (!maybeExportDeclar.isExportDeclaration()) {
+ return;
+ }
+
+ if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get("declaration").node.id) {
+ return;
+ }
+
+ (0, _helperSplitExportDeclaration.default)(maybeExportDeclar);
+ }
+
+ maybeConvertFromClassFunctionDeclaration(path) {
+ return;
+ if (!path.isFunctionDeclaration() && !path.isClassDeclaration()) return;
+ if (this.binding.kind !== "hoisted") return;
+ path.node.id = identifier(this.oldName);
+ path.node._blockHoist = 3;
+ path.replaceWith(variableDeclaration("let", [variableDeclarator(identifier(this.newName), toExpression(path.node))]));
+ }
+
+ maybeConvertFromClassFunctionExpression(path) {
+ return;
+ if (!path.isFunctionExpression() && !path.isClassExpression()) return;
+ if (this.binding.kind !== "local") return;
+ path.node.id = identifier(this.oldName);
+ this.binding.scope.parent.push({
+ id: identifier(this.newName)
+ });
+ path.replaceWith(assignmentExpression("=", identifier(this.newName), path.node));
+ }
+
+ rename(block) {
+ const {
+ binding,
+ oldName,
+ newName
+ } = this;
+ const {
+ scope,
+ path
+ } = binding;
+ const parentDeclar = path.find(path => path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression());
+
+ if (parentDeclar) {
+ const bindingIds = parentDeclar.getOuterBindingIdentifiers();
+
+ if (bindingIds[oldName] === binding.identifier) {
+ this.maybeConvertFromExportDeclaration(parentDeclar);
+ }
+ }
+
+ const blockToTraverse = block || scope.block;
+
+ if ((blockToTraverse == null ? void 0 : blockToTraverse.type) === "SwitchStatement") {
+ blockToTraverse.cases.forEach(c => {
+ scope.traverse(c, renameVisitor, this);
+ });
+ } else {
+ scope.traverse(blockToTraverse, renameVisitor, this);
+ }
+
+ if (!block) {
+ scope.removeOwnBinding(oldName);
+ scope.bindings[newName] = binding;
+ this.binding.identifier.name = newName;
+ }
+
+ if (parentDeclar) {
+ this.maybeConvertFromClassFunctionDeclaration(parentDeclar);
+ this.maybeConvertFromClassFunctionExpression(parentDeclar);
+ }
+ }
+
+}
+
+exports.default = Renamer;
+
+function skipAllButComputedMethodKey(path) {
+ if (!path.isMethod() || !path.node.computed) {
+ path.skip();
+ return;
+ }
+
+ const keys = VISITOR_KEYS[path.type];
+
+ for (const key of keys) {
+ if (key !== "key") path.skipKey(key);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/traverse-node.js b/node_modules/@babel/traverse/lib/traverse-node.js
new file mode 100644
index 0000000..82437b4
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/traverse-node.js
@@ -0,0 +1,30 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.traverseNode = traverseNode;
+
+var _context = require("./context");
+
+var _t = require("@babel/types");
+
+const {
+ VISITOR_KEYS
+} = _t;
+
+function traverseNode(node, opts, scope, state, path, skipKeys) {
+ const keys = VISITOR_KEYS[node.type];
+ if (!keys) return false;
+ const context = new _context.default(scope, opts, state, path);
+
+ for (const key of keys) {
+ if (skipKeys && skipKeys[key]) continue;
+
+ if (context.visit(node, key)) {
+ return true;
+ }
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/types.js b/node_modules/@babel/traverse/lib/types.js
new file mode 100644
index 0000000..ec17ee6
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/types.js
@@ -0,0 +1,5 @@
+"use strict";
+
+var _index = require("./index");
+
+var _virtualTypes = require("./path/generated/virtual-types"); \ No newline at end of file
diff --git a/node_modules/@babel/traverse/lib/visitors.js b/node_modules/@babel/traverse/lib/visitors.js
new file mode 100644
index 0000000..81d6335
--- /dev/null
+++ b/node_modules/@babel/traverse/lib/visitors.js
@@ -0,0 +1,242 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.explode = explode;
+exports.merge = merge;
+exports.verify = verify;
+
+var virtualTypes = require("./path/lib/virtual-types");
+
+var _t = require("@babel/types");
+
+const {
+ DEPRECATED_KEYS,
+ FLIPPED_ALIAS_KEYS,
+ TYPES
+} = _t;
+
+function explode(visitor) {
+ if (visitor._exploded) return visitor;
+ visitor._exploded = true;
+
+ for (const nodeType of Object.keys(visitor)) {
+ if (shouldIgnoreKey(nodeType)) continue;
+ const parts = nodeType.split("|");
+ if (parts.length === 1) continue;
+ const fns = visitor[nodeType];
+ delete visitor[nodeType];
+
+ for (const part of parts) {
+ visitor[part] = fns;
+ }
+ }
+
+ verify(visitor);
+ delete visitor.__esModule;
+ ensureEntranceObjects(visitor);
+ ensureCallbackArrays(visitor);
+
+ for (const nodeType of Object.keys(visitor)) {
+ if (shouldIgnoreKey(nodeType)) continue;
+ const wrapper = virtualTypes[nodeType];
+ if (!wrapper) continue;
+ const fns = visitor[nodeType];
+
+ for (const type of Object.keys(fns)) {
+ fns[type] = wrapCheck(wrapper, fns[type]);
+ }
+
+ delete visitor[nodeType];
+
+ if (wrapper.types) {
+ for (const type of wrapper.types) {
+ if (visitor[type]) {
+ mergePair(visitor[type], fns);
+ } else {
+ visitor[type] = fns;
+ }
+ }
+ } else {
+ mergePair(visitor, fns);
+ }
+ }
+
+ for (const nodeType of Object.keys(visitor)) {
+ if (shouldIgnoreKey(nodeType)) continue;
+ const fns = visitor[nodeType];
+ let aliases = FLIPPED_ALIAS_KEYS[nodeType];
+ const deprecatedKey = DEPRECATED_KEYS[nodeType];
+
+ if (deprecatedKey) {
+ console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecatedKey}`);
+ aliases = [deprecatedKey];
+ }
+
+ if (!aliases) continue;
+ delete visitor[nodeType];
+
+ for (const alias of aliases) {
+ const existing = visitor[alias];
+
+ if (existing) {
+ mergePair(existing, fns);
+ } else {
+ visitor[alias] = Object.assign({}, fns);
+ }
+ }
+ }
+
+ for (const nodeType of Object.keys(visitor)) {
+ if (shouldIgnoreKey(nodeType)) continue;
+ ensureCallbackArrays(visitor[nodeType]);
+ }
+
+ return visitor;
+}
+
+function verify(visitor) {
+ if (visitor._verified) return;
+
+ if (typeof visitor === "function") {
+ throw new Error("You passed `traverse()` a function when it expected a visitor object, " + "are you sure you didn't mean `{ enter: Function }`?");
+ }
+
+ for (const nodeType of Object.keys(visitor)) {
+ if (nodeType === "enter" || nodeType === "exit") {
+ validateVisitorMethods(nodeType, visitor[nodeType]);
+ }
+
+ if (shouldIgnoreKey(nodeType)) continue;
+
+ if (TYPES.indexOf(nodeType) < 0) {
+ throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type`);
+ }
+
+ const visitors = visitor[nodeType];
+
+ if (typeof visitors === "object") {
+ for (const visitorKey of Object.keys(visitors)) {
+ if (visitorKey === "enter" || visitorKey === "exit") {
+ validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]);
+ } else {
+ throw new Error("You passed `traverse()` a visitor object with the property " + `${nodeType} that has the invalid property ${visitorKey}`);
+ }
+ }
+ }
+ }
+
+ visitor._verified = true;
+}
+
+function validateVisitorMethods(path, val) {
+ const fns = [].concat(val);
+
+ for (const fn of fns) {
+ if (typeof fn !== "function") {
+ throw new TypeError(`Non-function found defined in ${path} with type ${typeof fn}`);
+ }
+ }
+}
+
+function merge(visitors, states = [], wrapper) {
+ const rootVisitor = {};
+
+ for (let i = 0; i < visitors.length; i++) {
+ const visitor = visitors[i];
+ const state = states[i];
+ explode(visitor);
+
+ for (const type of Object.keys(visitor)) {
+ let visitorType = visitor[type];
+
+ if (state || wrapper) {
+ visitorType = wrapWithStateOrWrapper(visitorType, state, wrapper);
+ }
+
+ const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {};
+ mergePair(nodeVisitor, visitorType);
+ }
+ }
+
+ return rootVisitor;
+}
+
+function wrapWithStateOrWrapper(oldVisitor, state, wrapper) {
+ const newVisitor = {};
+
+ for (const key of Object.keys(oldVisitor)) {
+ let fns = oldVisitor[key];
+ if (!Array.isArray(fns)) continue;
+ fns = fns.map(function (fn) {
+ let newFn = fn;
+
+ if (state) {
+ newFn = function (path) {
+ return fn.call(state, path, state);
+ };
+ }
+
+ if (wrapper) {
+ newFn = wrapper(state.key, key, newFn);
+ }
+
+ if (newFn !== fn) {
+ newFn.toString = () => fn.toString();
+ }
+
+ return newFn;
+ });
+ newVisitor[key] = fns;
+ }
+
+ return newVisitor;
+}
+
+function ensureEntranceObjects(obj) {
+ for (const key of Object.keys(obj)) {
+ if (shouldIgnoreKey(key)) continue;
+ const fns = obj[key];
+
+ if (typeof fns === "function") {
+ obj[key] = {
+ enter: fns
+ };
+ }
+ }
+}
+
+function ensureCallbackArrays(obj) {
+ if (obj.enter && !Array.isArray(obj.enter)) obj.enter = [obj.enter];
+ if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit];
+}
+
+function wrapCheck(wrapper, fn) {
+ const newFn = function (path) {
+ if (wrapper.checkPath(path)) {
+ return fn.apply(this, arguments);
+ }
+ };
+
+ newFn.toString = () => fn.toString();
+
+ return newFn;
+}
+
+function shouldIgnoreKey(key) {
+ if (key[0] === "_") return true;
+ if (key === "enter" || key === "exit" || key === "shouldSkip") return true;
+
+ if (key === "denylist" || key === "noScope" || key === "skipKeys" || key === "blacklist") {
+ return true;
+ }
+
+ return false;
+}
+
+function mergePair(dest, src) {
+ for (const key of Object.keys(src)) {
+ dest[key] = [].concat(dest[key] || [], src[key]);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/package.json b/node_modules/@babel/traverse/package.json
new file mode 100644
index 0000000..401ba25
--- /dev/null
+++ b/node_modules/@babel/traverse/package.json
@@ -0,0 +1,36 @@
+{
+ "name": "@babel/traverse",
+ "version": "7.17.3",
+ "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-traverse",
+ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20traverse%22+is%3Aopen",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-traverse"
+ },
+ "main": "./lib/index.js",
+ "dependencies": {
+ "@babel/code-frame": "^7.16.7",
+ "@babel/generator": "^7.17.3",
+ "@babel/helper-environment-visitor": "^7.16.7",
+ "@babel/helper-function-name": "^7.16.7",
+ "@babel/helper-hoist-variables": "^7.16.7",
+ "@babel/helper-split-export-declaration": "^7.16.7",
+ "@babel/parser": "^7.17.3",
+ "@babel/types": "^7.17.0",
+ "debug": "^4.1.0",
+ "globals": "^11.1.0"
+ },
+ "devDependencies": {
+ "@babel/helper-plugin-test-runner": "^7.16.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/traverse/scripts/generators/asserts.js b/node_modules/@babel/traverse/scripts/generators/asserts.js
new file mode 100644
index 0000000..f10b33e
--- /dev/null
+++ b/node_modules/@babel/traverse/scripts/generators/asserts.js
@@ -0,0 +1,25 @@
+import t from "@babel/types";
+
+export default function generateAsserts() {
+ let output = `/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'make build'
+ */
+import * as t from "@babel/types";
+import NodePath from "../index";
+
+
+export interface NodePathAssetions {`;
+
+ for (const type of [...t.TYPES].sort()) {
+ output += `
+ assert${type}(
+ opts?: object,
+ ): asserts this is NodePath<t.${type}>;`;
+ }
+
+ output += `
+}`;
+
+ return output;
+}
diff --git a/node_modules/@babel/traverse/scripts/generators/validators.js b/node_modules/@babel/traverse/scripts/generators/validators.js
new file mode 100644
index 0000000..f806fc7
--- /dev/null
+++ b/node_modules/@babel/traverse/scripts/generators/validators.js
@@ -0,0 +1,42 @@
+import t from "@babel/types";
+import virtualTypes from "../../lib/path/lib/virtual-types.js";
+
+export default function generateValidators() {
+ let output = `/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'make build'
+ */
+import * as t from "@babel/types";
+import NodePath from "../index";
+import type { VirtualTypeAliases } from "./virtual-types";
+
+export interface NodePathValidators {
+`;
+
+ for (const type of [...t.TYPES].sort()) {
+ output += `is${type}(opts?: object): this is NodePath<t.${type}>;`;
+ }
+
+ for (const type of Object.keys(virtualTypes)) {
+ const { types } = virtualTypes[type];
+ if (type[0] === "_") continue;
+ if (t.NODE_FIELDS[type] || t.FLIPPED_ALIAS_KEYS[type]) {
+ output += `is${type}(opts?: object): this is NodePath<t.${type}>;`;
+ } else if (types /* in VirtualTypeAliases */) {
+ output += `is${type}(opts?: object): this is NodePath<VirtualTypeAliases["${type}"]>;`;
+ } else {
+ // if it don't have types, then VirtualTypeAliases[type] is t.Node
+ // which TS marked as always true
+ // eg. if (path.isBlockScope()) return;
+ // path resolved to `never` here
+ // so we have to return boolean instead of this is NodePath<t.Node> here
+ output += `is${type}(opts?: object): boolean;`;
+ }
+ }
+
+ output += `
+}
+`;
+
+ return output;
+}
diff --git a/node_modules/@babel/traverse/scripts/generators/virtual-types.js b/node_modules/@babel/traverse/scripts/generators/virtual-types.js
new file mode 100644
index 0000000..6d55f54
--- /dev/null
+++ b/node_modules/@babel/traverse/scripts/generators/virtual-types.js
@@ -0,0 +1,24 @@
+import virtualTypes from "../../lib/path/lib/virtual-types.js";
+
+export default function generateValidators() {
+ let output = `/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'make build'
+ */
+import * as t from "@babel/types";
+
+export interface VirtualTypeAliases {
+`;
+
+ for (const type of Object.keys(virtualTypes)) {
+ output += ` ${type}: ${(virtualTypes[type].types || ["Node"])
+ .map(t => `t.${t}`)
+ .join(" | ")};`;
+ }
+
+ output += `
+}
+`;
+
+ return output;
+}
diff --git a/node_modules/@babel/traverse/scripts/package.json b/node_modules/@babel/traverse/scripts/package.json
new file mode 100644
index 0000000..5ffd980
--- /dev/null
+++ b/node_modules/@babel/traverse/scripts/package.json
@@ -0,0 +1 @@
+{ "type": "module" }
diff --git a/node_modules/@babel/types/LICENSE b/node_modules/@babel/types/LICENSE
new file mode 100644
index 0000000..f31575e
--- /dev/null
+++ b/node_modules/@babel/types/LICENSE
@@ -0,0 +1,22 @@
+MIT License
+
+Copyright (c) 2014-present Sebastian McKenzie and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/node_modules/@babel/types/README.md b/node_modules/@babel/types/README.md
new file mode 100644
index 0000000..0071bd7
--- /dev/null
+++ b/node_modules/@babel/types/README.md
@@ -0,0 +1,19 @@
+# @babel/types
+
+> Babel Types is a Lodash-esque utility library for AST nodes
+
+See our website [@babel/types](https://babeljs.io/docs/en/babel-types) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen) associated with this package.
+
+## Install
+
+Using npm:
+
+```sh
+npm install --save-dev @babel/types
+```
+
+or using yarn:
+
+```sh
+yarn add @babel/types --dev
+```
diff --git a/node_modules/@babel/types/lib/asserts/assertNode.js b/node_modules/@babel/types/lib/asserts/assertNode.js
new file mode 100644
index 0000000..e584e3e
--- /dev/null
+++ b/node_modules/@babel/types/lib/asserts/assertNode.js
@@ -0,0 +1,17 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = assertNode;
+
+var _isNode = require("../validators/isNode");
+
+function assertNode(node) {
+ if (!(0, _isNode.default)(node)) {
+ var _node$type;
+
+ const type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);
+ throw new TypeError(`Not a valid node of type "${type}"`);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/asserts/generated/index.js b/node_modules/@babel/types/lib/asserts/generated/index.js
new file mode 100644
index 0000000..53a5516
--- /dev/null
+++ b/node_modules/@babel/types/lib/asserts/generated/index.js
@@ -0,0 +1,1517 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.assertAccessor = assertAccessor;
+exports.assertAnyTypeAnnotation = assertAnyTypeAnnotation;
+exports.assertArgumentPlaceholder = assertArgumentPlaceholder;
+exports.assertArrayExpression = assertArrayExpression;
+exports.assertArrayPattern = assertArrayPattern;
+exports.assertArrayTypeAnnotation = assertArrayTypeAnnotation;
+exports.assertArrowFunctionExpression = assertArrowFunctionExpression;
+exports.assertAssignmentExpression = assertAssignmentExpression;
+exports.assertAssignmentPattern = assertAssignmentPattern;
+exports.assertAwaitExpression = assertAwaitExpression;
+exports.assertBigIntLiteral = assertBigIntLiteral;
+exports.assertBinary = assertBinary;
+exports.assertBinaryExpression = assertBinaryExpression;
+exports.assertBindExpression = assertBindExpression;
+exports.assertBlock = assertBlock;
+exports.assertBlockParent = assertBlockParent;
+exports.assertBlockStatement = assertBlockStatement;
+exports.assertBooleanLiteral = assertBooleanLiteral;
+exports.assertBooleanLiteralTypeAnnotation = assertBooleanLiteralTypeAnnotation;
+exports.assertBooleanTypeAnnotation = assertBooleanTypeAnnotation;
+exports.assertBreakStatement = assertBreakStatement;
+exports.assertCallExpression = assertCallExpression;
+exports.assertCatchClause = assertCatchClause;
+exports.assertClass = assertClass;
+exports.assertClassAccessorProperty = assertClassAccessorProperty;
+exports.assertClassBody = assertClassBody;
+exports.assertClassDeclaration = assertClassDeclaration;
+exports.assertClassExpression = assertClassExpression;
+exports.assertClassImplements = assertClassImplements;
+exports.assertClassMethod = assertClassMethod;
+exports.assertClassPrivateMethod = assertClassPrivateMethod;
+exports.assertClassPrivateProperty = assertClassPrivateProperty;
+exports.assertClassProperty = assertClassProperty;
+exports.assertCompletionStatement = assertCompletionStatement;
+exports.assertConditional = assertConditional;
+exports.assertConditionalExpression = assertConditionalExpression;
+exports.assertContinueStatement = assertContinueStatement;
+exports.assertDebuggerStatement = assertDebuggerStatement;
+exports.assertDecimalLiteral = assertDecimalLiteral;
+exports.assertDeclaration = assertDeclaration;
+exports.assertDeclareClass = assertDeclareClass;
+exports.assertDeclareExportAllDeclaration = assertDeclareExportAllDeclaration;
+exports.assertDeclareExportDeclaration = assertDeclareExportDeclaration;
+exports.assertDeclareFunction = assertDeclareFunction;
+exports.assertDeclareInterface = assertDeclareInterface;
+exports.assertDeclareModule = assertDeclareModule;
+exports.assertDeclareModuleExports = assertDeclareModuleExports;
+exports.assertDeclareOpaqueType = assertDeclareOpaqueType;
+exports.assertDeclareTypeAlias = assertDeclareTypeAlias;
+exports.assertDeclareVariable = assertDeclareVariable;
+exports.assertDeclaredPredicate = assertDeclaredPredicate;
+exports.assertDecorator = assertDecorator;
+exports.assertDirective = assertDirective;
+exports.assertDirectiveLiteral = assertDirectiveLiteral;
+exports.assertDoExpression = assertDoExpression;
+exports.assertDoWhileStatement = assertDoWhileStatement;
+exports.assertEmptyStatement = assertEmptyStatement;
+exports.assertEmptyTypeAnnotation = assertEmptyTypeAnnotation;
+exports.assertEnumBody = assertEnumBody;
+exports.assertEnumBooleanBody = assertEnumBooleanBody;
+exports.assertEnumBooleanMember = assertEnumBooleanMember;
+exports.assertEnumDeclaration = assertEnumDeclaration;
+exports.assertEnumDefaultedMember = assertEnumDefaultedMember;
+exports.assertEnumMember = assertEnumMember;
+exports.assertEnumNumberBody = assertEnumNumberBody;
+exports.assertEnumNumberMember = assertEnumNumberMember;
+exports.assertEnumStringBody = assertEnumStringBody;
+exports.assertEnumStringMember = assertEnumStringMember;
+exports.assertEnumSymbolBody = assertEnumSymbolBody;
+exports.assertExistsTypeAnnotation = assertExistsTypeAnnotation;
+exports.assertExportAllDeclaration = assertExportAllDeclaration;
+exports.assertExportDeclaration = assertExportDeclaration;
+exports.assertExportDefaultDeclaration = assertExportDefaultDeclaration;
+exports.assertExportDefaultSpecifier = assertExportDefaultSpecifier;
+exports.assertExportNamedDeclaration = assertExportNamedDeclaration;
+exports.assertExportNamespaceSpecifier = assertExportNamespaceSpecifier;
+exports.assertExportSpecifier = assertExportSpecifier;
+exports.assertExpression = assertExpression;
+exports.assertExpressionStatement = assertExpressionStatement;
+exports.assertExpressionWrapper = assertExpressionWrapper;
+exports.assertFile = assertFile;
+exports.assertFlow = assertFlow;
+exports.assertFlowBaseAnnotation = assertFlowBaseAnnotation;
+exports.assertFlowDeclaration = assertFlowDeclaration;
+exports.assertFlowPredicate = assertFlowPredicate;
+exports.assertFlowType = assertFlowType;
+exports.assertFor = assertFor;
+exports.assertForInStatement = assertForInStatement;
+exports.assertForOfStatement = assertForOfStatement;
+exports.assertForStatement = assertForStatement;
+exports.assertForXStatement = assertForXStatement;
+exports.assertFunction = assertFunction;
+exports.assertFunctionDeclaration = assertFunctionDeclaration;
+exports.assertFunctionExpression = assertFunctionExpression;
+exports.assertFunctionParent = assertFunctionParent;
+exports.assertFunctionTypeAnnotation = assertFunctionTypeAnnotation;
+exports.assertFunctionTypeParam = assertFunctionTypeParam;
+exports.assertGenericTypeAnnotation = assertGenericTypeAnnotation;
+exports.assertIdentifier = assertIdentifier;
+exports.assertIfStatement = assertIfStatement;
+exports.assertImmutable = assertImmutable;
+exports.assertImport = assertImport;
+exports.assertImportAttribute = assertImportAttribute;
+exports.assertImportDeclaration = assertImportDeclaration;
+exports.assertImportDefaultSpecifier = assertImportDefaultSpecifier;
+exports.assertImportNamespaceSpecifier = assertImportNamespaceSpecifier;
+exports.assertImportSpecifier = assertImportSpecifier;
+exports.assertIndexedAccessType = assertIndexedAccessType;
+exports.assertInferredPredicate = assertInferredPredicate;
+exports.assertInterfaceDeclaration = assertInterfaceDeclaration;
+exports.assertInterfaceExtends = assertInterfaceExtends;
+exports.assertInterfaceTypeAnnotation = assertInterfaceTypeAnnotation;
+exports.assertInterpreterDirective = assertInterpreterDirective;
+exports.assertIntersectionTypeAnnotation = assertIntersectionTypeAnnotation;
+exports.assertJSX = assertJSX;
+exports.assertJSXAttribute = assertJSXAttribute;
+exports.assertJSXClosingElement = assertJSXClosingElement;
+exports.assertJSXClosingFragment = assertJSXClosingFragment;
+exports.assertJSXElement = assertJSXElement;
+exports.assertJSXEmptyExpression = assertJSXEmptyExpression;
+exports.assertJSXExpressionContainer = assertJSXExpressionContainer;
+exports.assertJSXFragment = assertJSXFragment;
+exports.assertJSXIdentifier = assertJSXIdentifier;
+exports.assertJSXMemberExpression = assertJSXMemberExpression;
+exports.assertJSXNamespacedName = assertJSXNamespacedName;
+exports.assertJSXOpeningElement = assertJSXOpeningElement;
+exports.assertJSXOpeningFragment = assertJSXOpeningFragment;
+exports.assertJSXSpreadAttribute = assertJSXSpreadAttribute;
+exports.assertJSXSpreadChild = assertJSXSpreadChild;
+exports.assertJSXText = assertJSXText;
+exports.assertLVal = assertLVal;
+exports.assertLabeledStatement = assertLabeledStatement;
+exports.assertLiteral = assertLiteral;
+exports.assertLogicalExpression = assertLogicalExpression;
+exports.assertLoop = assertLoop;
+exports.assertMemberExpression = assertMemberExpression;
+exports.assertMetaProperty = assertMetaProperty;
+exports.assertMethod = assertMethod;
+exports.assertMiscellaneous = assertMiscellaneous;
+exports.assertMixedTypeAnnotation = assertMixedTypeAnnotation;
+exports.assertModuleDeclaration = assertModuleDeclaration;
+exports.assertModuleExpression = assertModuleExpression;
+exports.assertModuleSpecifier = assertModuleSpecifier;
+exports.assertNewExpression = assertNewExpression;
+exports.assertNoop = assertNoop;
+exports.assertNullLiteral = assertNullLiteral;
+exports.assertNullLiteralTypeAnnotation = assertNullLiteralTypeAnnotation;
+exports.assertNullableTypeAnnotation = assertNullableTypeAnnotation;
+exports.assertNumberLiteral = assertNumberLiteral;
+exports.assertNumberLiteralTypeAnnotation = assertNumberLiteralTypeAnnotation;
+exports.assertNumberTypeAnnotation = assertNumberTypeAnnotation;
+exports.assertNumericLiteral = assertNumericLiteral;
+exports.assertObjectExpression = assertObjectExpression;
+exports.assertObjectMember = assertObjectMember;
+exports.assertObjectMethod = assertObjectMethod;
+exports.assertObjectPattern = assertObjectPattern;
+exports.assertObjectProperty = assertObjectProperty;
+exports.assertObjectTypeAnnotation = assertObjectTypeAnnotation;
+exports.assertObjectTypeCallProperty = assertObjectTypeCallProperty;
+exports.assertObjectTypeIndexer = assertObjectTypeIndexer;
+exports.assertObjectTypeInternalSlot = assertObjectTypeInternalSlot;
+exports.assertObjectTypeProperty = assertObjectTypeProperty;
+exports.assertObjectTypeSpreadProperty = assertObjectTypeSpreadProperty;
+exports.assertOpaqueType = assertOpaqueType;
+exports.assertOptionalCallExpression = assertOptionalCallExpression;
+exports.assertOptionalIndexedAccessType = assertOptionalIndexedAccessType;
+exports.assertOptionalMemberExpression = assertOptionalMemberExpression;
+exports.assertParenthesizedExpression = assertParenthesizedExpression;
+exports.assertPattern = assertPattern;
+exports.assertPatternLike = assertPatternLike;
+exports.assertPipelineBareFunction = assertPipelineBareFunction;
+exports.assertPipelinePrimaryTopicReference = assertPipelinePrimaryTopicReference;
+exports.assertPipelineTopicExpression = assertPipelineTopicExpression;
+exports.assertPlaceholder = assertPlaceholder;
+exports.assertPrivate = assertPrivate;
+exports.assertPrivateName = assertPrivateName;
+exports.assertProgram = assertProgram;
+exports.assertProperty = assertProperty;
+exports.assertPureish = assertPureish;
+exports.assertQualifiedTypeIdentifier = assertQualifiedTypeIdentifier;
+exports.assertRecordExpression = assertRecordExpression;
+exports.assertRegExpLiteral = assertRegExpLiteral;
+exports.assertRegexLiteral = assertRegexLiteral;
+exports.assertRestElement = assertRestElement;
+exports.assertRestProperty = assertRestProperty;
+exports.assertReturnStatement = assertReturnStatement;
+exports.assertScopable = assertScopable;
+exports.assertSequenceExpression = assertSequenceExpression;
+exports.assertSpreadElement = assertSpreadElement;
+exports.assertSpreadProperty = assertSpreadProperty;
+exports.assertStandardized = assertStandardized;
+exports.assertStatement = assertStatement;
+exports.assertStaticBlock = assertStaticBlock;
+exports.assertStringLiteral = assertStringLiteral;
+exports.assertStringLiteralTypeAnnotation = assertStringLiteralTypeAnnotation;
+exports.assertStringTypeAnnotation = assertStringTypeAnnotation;
+exports.assertSuper = assertSuper;
+exports.assertSwitchCase = assertSwitchCase;
+exports.assertSwitchStatement = assertSwitchStatement;
+exports.assertSymbolTypeAnnotation = assertSymbolTypeAnnotation;
+exports.assertTSAnyKeyword = assertTSAnyKeyword;
+exports.assertTSArrayType = assertTSArrayType;
+exports.assertTSAsExpression = assertTSAsExpression;
+exports.assertTSBaseType = assertTSBaseType;
+exports.assertTSBigIntKeyword = assertTSBigIntKeyword;
+exports.assertTSBooleanKeyword = assertTSBooleanKeyword;
+exports.assertTSCallSignatureDeclaration = assertTSCallSignatureDeclaration;
+exports.assertTSConditionalType = assertTSConditionalType;
+exports.assertTSConstructSignatureDeclaration = assertTSConstructSignatureDeclaration;
+exports.assertTSConstructorType = assertTSConstructorType;
+exports.assertTSDeclareFunction = assertTSDeclareFunction;
+exports.assertTSDeclareMethod = assertTSDeclareMethod;
+exports.assertTSEntityName = assertTSEntityName;
+exports.assertTSEnumDeclaration = assertTSEnumDeclaration;
+exports.assertTSEnumMember = assertTSEnumMember;
+exports.assertTSExportAssignment = assertTSExportAssignment;
+exports.assertTSExpressionWithTypeArguments = assertTSExpressionWithTypeArguments;
+exports.assertTSExternalModuleReference = assertTSExternalModuleReference;
+exports.assertTSFunctionType = assertTSFunctionType;
+exports.assertTSImportEqualsDeclaration = assertTSImportEqualsDeclaration;
+exports.assertTSImportType = assertTSImportType;
+exports.assertTSIndexSignature = assertTSIndexSignature;
+exports.assertTSIndexedAccessType = assertTSIndexedAccessType;
+exports.assertTSInferType = assertTSInferType;
+exports.assertTSInterfaceBody = assertTSInterfaceBody;
+exports.assertTSInterfaceDeclaration = assertTSInterfaceDeclaration;
+exports.assertTSIntersectionType = assertTSIntersectionType;
+exports.assertTSIntrinsicKeyword = assertTSIntrinsicKeyword;
+exports.assertTSLiteralType = assertTSLiteralType;
+exports.assertTSMappedType = assertTSMappedType;
+exports.assertTSMethodSignature = assertTSMethodSignature;
+exports.assertTSModuleBlock = assertTSModuleBlock;
+exports.assertTSModuleDeclaration = assertTSModuleDeclaration;
+exports.assertTSNamedTupleMember = assertTSNamedTupleMember;
+exports.assertTSNamespaceExportDeclaration = assertTSNamespaceExportDeclaration;
+exports.assertTSNeverKeyword = assertTSNeverKeyword;
+exports.assertTSNonNullExpression = assertTSNonNullExpression;
+exports.assertTSNullKeyword = assertTSNullKeyword;
+exports.assertTSNumberKeyword = assertTSNumberKeyword;
+exports.assertTSObjectKeyword = assertTSObjectKeyword;
+exports.assertTSOptionalType = assertTSOptionalType;
+exports.assertTSParameterProperty = assertTSParameterProperty;
+exports.assertTSParenthesizedType = assertTSParenthesizedType;
+exports.assertTSPropertySignature = assertTSPropertySignature;
+exports.assertTSQualifiedName = assertTSQualifiedName;
+exports.assertTSRestType = assertTSRestType;
+exports.assertTSStringKeyword = assertTSStringKeyword;
+exports.assertTSSymbolKeyword = assertTSSymbolKeyword;
+exports.assertTSThisType = assertTSThisType;
+exports.assertTSTupleType = assertTSTupleType;
+exports.assertTSType = assertTSType;
+exports.assertTSTypeAliasDeclaration = assertTSTypeAliasDeclaration;
+exports.assertTSTypeAnnotation = assertTSTypeAnnotation;
+exports.assertTSTypeAssertion = assertTSTypeAssertion;
+exports.assertTSTypeElement = assertTSTypeElement;
+exports.assertTSTypeLiteral = assertTSTypeLiteral;
+exports.assertTSTypeOperator = assertTSTypeOperator;
+exports.assertTSTypeParameter = assertTSTypeParameter;
+exports.assertTSTypeParameterDeclaration = assertTSTypeParameterDeclaration;
+exports.assertTSTypeParameterInstantiation = assertTSTypeParameterInstantiation;
+exports.assertTSTypePredicate = assertTSTypePredicate;
+exports.assertTSTypeQuery = assertTSTypeQuery;
+exports.assertTSTypeReference = assertTSTypeReference;
+exports.assertTSUndefinedKeyword = assertTSUndefinedKeyword;
+exports.assertTSUnionType = assertTSUnionType;
+exports.assertTSUnknownKeyword = assertTSUnknownKeyword;
+exports.assertTSVoidKeyword = assertTSVoidKeyword;
+exports.assertTaggedTemplateExpression = assertTaggedTemplateExpression;
+exports.assertTemplateElement = assertTemplateElement;
+exports.assertTemplateLiteral = assertTemplateLiteral;
+exports.assertTerminatorless = assertTerminatorless;
+exports.assertThisExpression = assertThisExpression;
+exports.assertThisTypeAnnotation = assertThisTypeAnnotation;
+exports.assertThrowStatement = assertThrowStatement;
+exports.assertTopicReference = assertTopicReference;
+exports.assertTryStatement = assertTryStatement;
+exports.assertTupleExpression = assertTupleExpression;
+exports.assertTupleTypeAnnotation = assertTupleTypeAnnotation;
+exports.assertTypeAlias = assertTypeAlias;
+exports.assertTypeAnnotation = assertTypeAnnotation;
+exports.assertTypeCastExpression = assertTypeCastExpression;
+exports.assertTypeParameter = assertTypeParameter;
+exports.assertTypeParameterDeclaration = assertTypeParameterDeclaration;
+exports.assertTypeParameterInstantiation = assertTypeParameterInstantiation;
+exports.assertTypeScript = assertTypeScript;
+exports.assertTypeofTypeAnnotation = assertTypeofTypeAnnotation;
+exports.assertUnaryExpression = assertUnaryExpression;
+exports.assertUnaryLike = assertUnaryLike;
+exports.assertUnionTypeAnnotation = assertUnionTypeAnnotation;
+exports.assertUpdateExpression = assertUpdateExpression;
+exports.assertUserWhitespacable = assertUserWhitespacable;
+exports.assertV8IntrinsicIdentifier = assertV8IntrinsicIdentifier;
+exports.assertVariableDeclaration = assertVariableDeclaration;
+exports.assertVariableDeclarator = assertVariableDeclarator;
+exports.assertVariance = assertVariance;
+exports.assertVoidTypeAnnotation = assertVoidTypeAnnotation;
+exports.assertWhile = assertWhile;
+exports.assertWhileStatement = assertWhileStatement;
+exports.assertWithStatement = assertWithStatement;
+exports.assertYieldExpression = assertYieldExpression;
+
+var _is = require("../../validators/is");
+
+function assert(type, node, opts) {
+ if (!(0, _is.default)(type, node, opts)) {
+ throw new Error(`Expected type "${type}" with option ${JSON.stringify(opts)}, ` + `but instead got "${node.type}".`);
+ }
+}
+
+function assertArrayExpression(node, opts) {
+ assert("ArrayExpression", node, opts);
+}
+
+function assertAssignmentExpression(node, opts) {
+ assert("AssignmentExpression", node, opts);
+}
+
+function assertBinaryExpression(node, opts) {
+ assert("BinaryExpression", node, opts);
+}
+
+function assertInterpreterDirective(node, opts) {
+ assert("InterpreterDirective", node, opts);
+}
+
+function assertDirective(node, opts) {
+ assert("Directive", node, opts);
+}
+
+function assertDirectiveLiteral(node, opts) {
+ assert("DirectiveLiteral", node, opts);
+}
+
+function assertBlockStatement(node, opts) {
+ assert("BlockStatement", node, opts);
+}
+
+function assertBreakStatement(node, opts) {
+ assert("BreakStatement", node, opts);
+}
+
+function assertCallExpression(node, opts) {
+ assert("CallExpression", node, opts);
+}
+
+function assertCatchClause(node, opts) {
+ assert("CatchClause", node, opts);
+}
+
+function assertConditionalExpression(node, opts) {
+ assert("ConditionalExpression", node, opts);
+}
+
+function assertContinueStatement(node, opts) {
+ assert("ContinueStatement", node, opts);
+}
+
+function assertDebuggerStatement(node, opts) {
+ assert("DebuggerStatement", node, opts);
+}
+
+function assertDoWhileStatement(node, opts) {
+ assert("DoWhileStatement", node, opts);
+}
+
+function assertEmptyStatement(node, opts) {
+ assert("EmptyStatement", node, opts);
+}
+
+function assertExpressionStatement(node, opts) {
+ assert("ExpressionStatement", node, opts);
+}
+
+function assertFile(node, opts) {
+ assert("File", node, opts);
+}
+
+function assertForInStatement(node, opts) {
+ assert("ForInStatement", node, opts);
+}
+
+function assertForStatement(node, opts) {
+ assert("ForStatement", node, opts);
+}
+
+function assertFunctionDeclaration(node, opts) {
+ assert("FunctionDeclaration", node, opts);
+}
+
+function assertFunctionExpression(node, opts) {
+ assert("FunctionExpression", node, opts);
+}
+
+function assertIdentifier(node, opts) {
+ assert("Identifier", node, opts);
+}
+
+function assertIfStatement(node, opts) {
+ assert("IfStatement", node, opts);
+}
+
+function assertLabeledStatement(node, opts) {
+ assert("LabeledStatement", node, opts);
+}
+
+function assertStringLiteral(node, opts) {
+ assert("StringLiteral", node, opts);
+}
+
+function assertNumericLiteral(node, opts) {
+ assert("NumericLiteral", node, opts);
+}
+
+function assertNullLiteral(node, opts) {
+ assert("NullLiteral", node, opts);
+}
+
+function assertBooleanLiteral(node, opts) {
+ assert("BooleanLiteral", node, opts);
+}
+
+function assertRegExpLiteral(node, opts) {
+ assert("RegExpLiteral", node, opts);
+}
+
+function assertLogicalExpression(node, opts) {
+ assert("LogicalExpression", node, opts);
+}
+
+function assertMemberExpression(node, opts) {
+ assert("MemberExpression", node, opts);
+}
+
+function assertNewExpression(node, opts) {
+ assert("NewExpression", node, opts);
+}
+
+function assertProgram(node, opts) {
+ assert("Program", node, opts);
+}
+
+function assertObjectExpression(node, opts) {
+ assert("ObjectExpression", node, opts);
+}
+
+function assertObjectMethod(node, opts) {
+ assert("ObjectMethod", node, opts);
+}
+
+function assertObjectProperty(node, opts) {
+ assert("ObjectProperty", node, opts);
+}
+
+function assertRestElement(node, opts) {
+ assert("RestElement", node, opts);
+}
+
+function assertReturnStatement(node, opts) {
+ assert("ReturnStatement", node, opts);
+}
+
+function assertSequenceExpression(node, opts) {
+ assert("SequenceExpression", node, opts);
+}
+
+function assertParenthesizedExpression(node, opts) {
+ assert("ParenthesizedExpression", node, opts);
+}
+
+function assertSwitchCase(node, opts) {
+ assert("SwitchCase", node, opts);
+}
+
+function assertSwitchStatement(node, opts) {
+ assert("SwitchStatement", node, opts);
+}
+
+function assertThisExpression(node, opts) {
+ assert("ThisExpression", node, opts);
+}
+
+function assertThrowStatement(node, opts) {
+ assert("ThrowStatement", node, opts);
+}
+
+function assertTryStatement(node, opts) {
+ assert("TryStatement", node, opts);
+}
+
+function assertUnaryExpression(node, opts) {
+ assert("UnaryExpression", node, opts);
+}
+
+function assertUpdateExpression(node, opts) {
+ assert("UpdateExpression", node, opts);
+}
+
+function assertVariableDeclaration(node, opts) {
+ assert("VariableDeclaration", node, opts);
+}
+
+function assertVariableDeclarator(node, opts) {
+ assert("VariableDeclarator", node, opts);
+}
+
+function assertWhileStatement(node, opts) {
+ assert("WhileStatement", node, opts);
+}
+
+function assertWithStatement(node, opts) {
+ assert("WithStatement", node, opts);
+}
+
+function assertAssignmentPattern(node, opts) {
+ assert("AssignmentPattern", node, opts);
+}
+
+function assertArrayPattern(node, opts) {
+ assert("ArrayPattern", node, opts);
+}
+
+function assertArrowFunctionExpression(node, opts) {
+ assert("ArrowFunctionExpression", node, opts);
+}
+
+function assertClassBody(node, opts) {
+ assert("ClassBody", node, opts);
+}
+
+function assertClassExpression(node, opts) {
+ assert("ClassExpression", node, opts);
+}
+
+function assertClassDeclaration(node, opts) {
+ assert("ClassDeclaration", node, opts);
+}
+
+function assertExportAllDeclaration(node, opts) {
+ assert("ExportAllDeclaration", node, opts);
+}
+
+function assertExportDefaultDeclaration(node, opts) {
+ assert("ExportDefaultDeclaration", node, opts);
+}
+
+function assertExportNamedDeclaration(node, opts) {
+ assert("ExportNamedDeclaration", node, opts);
+}
+
+function assertExportSpecifier(node, opts) {
+ assert("ExportSpecifier", node, opts);
+}
+
+function assertForOfStatement(node, opts) {
+ assert("ForOfStatement", node, opts);
+}
+
+function assertImportDeclaration(node, opts) {
+ assert("ImportDeclaration", node, opts);
+}
+
+function assertImportDefaultSpecifier(node, opts) {
+ assert("ImportDefaultSpecifier", node, opts);
+}
+
+function assertImportNamespaceSpecifier(node, opts) {
+ assert("ImportNamespaceSpecifier", node, opts);
+}
+
+function assertImportSpecifier(node, opts) {
+ assert("ImportSpecifier", node, opts);
+}
+
+function assertMetaProperty(node, opts) {
+ assert("MetaProperty", node, opts);
+}
+
+function assertClassMethod(node, opts) {
+ assert("ClassMethod", node, opts);
+}
+
+function assertObjectPattern(node, opts) {
+ assert("ObjectPattern", node, opts);
+}
+
+function assertSpreadElement(node, opts) {
+ assert("SpreadElement", node, opts);
+}
+
+function assertSuper(node, opts) {
+ assert("Super", node, opts);
+}
+
+function assertTaggedTemplateExpression(node, opts) {
+ assert("TaggedTemplateExpression", node, opts);
+}
+
+function assertTemplateElement(node, opts) {
+ assert("TemplateElement", node, opts);
+}
+
+function assertTemplateLiteral(node, opts) {
+ assert("TemplateLiteral", node, opts);
+}
+
+function assertYieldExpression(node, opts) {
+ assert("YieldExpression", node, opts);
+}
+
+function assertAwaitExpression(node, opts) {
+ assert("AwaitExpression", node, opts);
+}
+
+function assertImport(node, opts) {
+ assert("Import", node, opts);
+}
+
+function assertBigIntLiteral(node, opts) {
+ assert("BigIntLiteral", node, opts);
+}
+
+function assertExportNamespaceSpecifier(node, opts) {
+ assert("ExportNamespaceSpecifier", node, opts);
+}
+
+function assertOptionalMemberExpression(node, opts) {
+ assert("OptionalMemberExpression", node, opts);
+}
+
+function assertOptionalCallExpression(node, opts) {
+ assert("OptionalCallExpression", node, opts);
+}
+
+function assertClassProperty(node, opts) {
+ assert("ClassProperty", node, opts);
+}
+
+function assertClassAccessorProperty(node, opts) {
+ assert("ClassAccessorProperty", node, opts);
+}
+
+function assertClassPrivateProperty(node, opts) {
+ assert("ClassPrivateProperty", node, opts);
+}
+
+function assertClassPrivateMethod(node, opts) {
+ assert("ClassPrivateMethod", node, opts);
+}
+
+function assertPrivateName(node, opts) {
+ assert("PrivateName", node, opts);
+}
+
+function assertStaticBlock(node, opts) {
+ assert("StaticBlock", node, opts);
+}
+
+function assertAnyTypeAnnotation(node, opts) {
+ assert("AnyTypeAnnotation", node, opts);
+}
+
+function assertArrayTypeAnnotation(node, opts) {
+ assert("ArrayTypeAnnotation", node, opts);
+}
+
+function assertBooleanTypeAnnotation(node, opts) {
+ assert("BooleanTypeAnnotation", node, opts);
+}
+
+function assertBooleanLiteralTypeAnnotation(node, opts) {
+ assert("BooleanLiteralTypeAnnotation", node, opts);
+}
+
+function assertNullLiteralTypeAnnotation(node, opts) {
+ assert("NullLiteralTypeAnnotation", node, opts);
+}
+
+function assertClassImplements(node, opts) {
+ assert("ClassImplements", node, opts);
+}
+
+function assertDeclareClass(node, opts) {
+ assert("DeclareClass", node, opts);
+}
+
+function assertDeclareFunction(node, opts) {
+ assert("DeclareFunction", node, opts);
+}
+
+function assertDeclareInterface(node, opts) {
+ assert("DeclareInterface", node, opts);
+}
+
+function assertDeclareModule(node, opts) {
+ assert("DeclareModule", node, opts);
+}
+
+function assertDeclareModuleExports(node, opts) {
+ assert("DeclareModuleExports", node, opts);
+}
+
+function assertDeclareTypeAlias(node, opts) {
+ assert("DeclareTypeAlias", node, opts);
+}
+
+function assertDeclareOpaqueType(node, opts) {
+ assert("DeclareOpaqueType", node, opts);
+}
+
+function assertDeclareVariable(node, opts) {
+ assert("DeclareVariable", node, opts);
+}
+
+function assertDeclareExportDeclaration(node, opts) {
+ assert("DeclareExportDeclaration", node, opts);
+}
+
+function assertDeclareExportAllDeclaration(node, opts) {
+ assert("DeclareExportAllDeclaration", node, opts);
+}
+
+function assertDeclaredPredicate(node, opts) {
+ assert("DeclaredPredicate", node, opts);
+}
+
+function assertExistsTypeAnnotation(node, opts) {
+ assert("ExistsTypeAnnotation", node, opts);
+}
+
+function assertFunctionTypeAnnotation(node, opts) {
+ assert("FunctionTypeAnnotation", node, opts);
+}
+
+function assertFunctionTypeParam(node, opts) {
+ assert("FunctionTypeParam", node, opts);
+}
+
+function assertGenericTypeAnnotation(node, opts) {
+ assert("GenericTypeAnnotation", node, opts);
+}
+
+function assertInferredPredicate(node, opts) {
+ assert("InferredPredicate", node, opts);
+}
+
+function assertInterfaceExtends(node, opts) {
+ assert("InterfaceExtends", node, opts);
+}
+
+function assertInterfaceDeclaration(node, opts) {
+ assert("InterfaceDeclaration", node, opts);
+}
+
+function assertInterfaceTypeAnnotation(node, opts) {
+ assert("InterfaceTypeAnnotation", node, opts);
+}
+
+function assertIntersectionTypeAnnotation(node, opts) {
+ assert("IntersectionTypeAnnotation", node, opts);
+}
+
+function assertMixedTypeAnnotation(node, opts) {
+ assert("MixedTypeAnnotation", node, opts);
+}
+
+function assertEmptyTypeAnnotation(node, opts) {
+ assert("EmptyTypeAnnotation", node, opts);
+}
+
+function assertNullableTypeAnnotation(node, opts) {
+ assert("NullableTypeAnnotation", node, opts);
+}
+
+function assertNumberLiteralTypeAnnotation(node, opts) {
+ assert("NumberLiteralTypeAnnotation", node, opts);
+}
+
+function assertNumberTypeAnnotation(node, opts) {
+ assert("NumberTypeAnnotation", node, opts);
+}
+
+function assertObjectTypeAnnotation(node, opts) {
+ assert("ObjectTypeAnnotation", node, opts);
+}
+
+function assertObjectTypeInternalSlot(node, opts) {
+ assert("ObjectTypeInternalSlot", node, opts);
+}
+
+function assertObjectTypeCallProperty(node, opts) {
+ assert("ObjectTypeCallProperty", node, opts);
+}
+
+function assertObjectTypeIndexer(node, opts) {
+ assert("ObjectTypeIndexer", node, opts);
+}
+
+function assertObjectTypeProperty(node, opts) {
+ assert("ObjectTypeProperty", node, opts);
+}
+
+function assertObjectTypeSpreadProperty(node, opts) {
+ assert("ObjectTypeSpreadProperty", node, opts);
+}
+
+function assertOpaqueType(node, opts) {
+ assert("OpaqueType", node, opts);
+}
+
+function assertQualifiedTypeIdentifier(node, opts) {
+ assert("QualifiedTypeIdentifier", node, opts);
+}
+
+function assertStringLiteralTypeAnnotation(node, opts) {
+ assert("StringLiteralTypeAnnotation", node, opts);
+}
+
+function assertStringTypeAnnotation(node, opts) {
+ assert("StringTypeAnnotation", node, opts);
+}
+
+function assertSymbolTypeAnnotation(node, opts) {
+ assert("SymbolTypeAnnotation", node, opts);
+}
+
+function assertThisTypeAnnotation(node, opts) {
+ assert("ThisTypeAnnotation", node, opts);
+}
+
+function assertTupleTypeAnnotation(node, opts) {
+ assert("TupleTypeAnnotation", node, opts);
+}
+
+function assertTypeofTypeAnnotation(node, opts) {
+ assert("TypeofTypeAnnotation", node, opts);
+}
+
+function assertTypeAlias(node, opts) {
+ assert("TypeAlias", node, opts);
+}
+
+function assertTypeAnnotation(node, opts) {
+ assert("TypeAnnotation", node, opts);
+}
+
+function assertTypeCastExpression(node, opts) {
+ assert("TypeCastExpression", node, opts);
+}
+
+function assertTypeParameter(node, opts) {
+ assert("TypeParameter", node, opts);
+}
+
+function assertTypeParameterDeclaration(node, opts) {
+ assert("TypeParameterDeclaration", node, opts);
+}
+
+function assertTypeParameterInstantiation(node, opts) {
+ assert("TypeParameterInstantiation", node, opts);
+}
+
+function assertUnionTypeAnnotation(node, opts) {
+ assert("UnionTypeAnnotation", node, opts);
+}
+
+function assertVariance(node, opts) {
+ assert("Variance", node, opts);
+}
+
+function assertVoidTypeAnnotation(node, opts) {
+ assert("VoidTypeAnnotation", node, opts);
+}
+
+function assertEnumDeclaration(node, opts) {
+ assert("EnumDeclaration", node, opts);
+}
+
+function assertEnumBooleanBody(node, opts) {
+ assert("EnumBooleanBody", node, opts);
+}
+
+function assertEnumNumberBody(node, opts) {
+ assert("EnumNumberBody", node, opts);
+}
+
+function assertEnumStringBody(node, opts) {
+ assert("EnumStringBody", node, opts);
+}
+
+function assertEnumSymbolBody(node, opts) {
+ assert("EnumSymbolBody", node, opts);
+}
+
+function assertEnumBooleanMember(node, opts) {
+ assert("EnumBooleanMember", node, opts);
+}
+
+function assertEnumNumberMember(node, opts) {
+ assert("EnumNumberMember", node, opts);
+}
+
+function assertEnumStringMember(node, opts) {
+ assert("EnumStringMember", node, opts);
+}
+
+function assertEnumDefaultedMember(node, opts) {
+ assert("EnumDefaultedMember", node, opts);
+}
+
+function assertIndexedAccessType(node, opts) {
+ assert("IndexedAccessType", node, opts);
+}
+
+function assertOptionalIndexedAccessType(node, opts) {
+ assert("OptionalIndexedAccessType", node, opts);
+}
+
+function assertJSXAttribute(node, opts) {
+ assert("JSXAttribute", node, opts);
+}
+
+function assertJSXClosingElement(node, opts) {
+ assert("JSXClosingElement", node, opts);
+}
+
+function assertJSXElement(node, opts) {
+ assert("JSXElement", node, opts);
+}
+
+function assertJSXEmptyExpression(node, opts) {
+ assert("JSXEmptyExpression", node, opts);
+}
+
+function assertJSXExpressionContainer(node, opts) {
+ assert("JSXExpressionContainer", node, opts);
+}
+
+function assertJSXSpreadChild(node, opts) {
+ assert("JSXSpreadChild", node, opts);
+}
+
+function assertJSXIdentifier(node, opts) {
+ assert("JSXIdentifier", node, opts);
+}
+
+function assertJSXMemberExpression(node, opts) {
+ assert("JSXMemberExpression", node, opts);
+}
+
+function assertJSXNamespacedName(node, opts) {
+ assert("JSXNamespacedName", node, opts);
+}
+
+function assertJSXOpeningElement(node, opts) {
+ assert("JSXOpeningElement", node, opts);
+}
+
+function assertJSXSpreadAttribute(node, opts) {
+ assert("JSXSpreadAttribute", node, opts);
+}
+
+function assertJSXText(node, opts) {
+ assert("JSXText", node, opts);
+}
+
+function assertJSXFragment(node, opts) {
+ assert("JSXFragment", node, opts);
+}
+
+function assertJSXOpeningFragment(node, opts) {
+ assert("JSXOpeningFragment", node, opts);
+}
+
+function assertJSXClosingFragment(node, opts) {
+ assert("JSXClosingFragment", node, opts);
+}
+
+function assertNoop(node, opts) {
+ assert("Noop", node, opts);
+}
+
+function assertPlaceholder(node, opts) {
+ assert("Placeholder", node, opts);
+}
+
+function assertV8IntrinsicIdentifier(node, opts) {
+ assert("V8IntrinsicIdentifier", node, opts);
+}
+
+function assertArgumentPlaceholder(node, opts) {
+ assert("ArgumentPlaceholder", node, opts);
+}
+
+function assertBindExpression(node, opts) {
+ assert("BindExpression", node, opts);
+}
+
+function assertImportAttribute(node, opts) {
+ assert("ImportAttribute", node, opts);
+}
+
+function assertDecorator(node, opts) {
+ assert("Decorator", node, opts);
+}
+
+function assertDoExpression(node, opts) {
+ assert("DoExpression", node, opts);
+}
+
+function assertExportDefaultSpecifier(node, opts) {
+ assert("ExportDefaultSpecifier", node, opts);
+}
+
+function assertRecordExpression(node, opts) {
+ assert("RecordExpression", node, opts);
+}
+
+function assertTupleExpression(node, opts) {
+ assert("TupleExpression", node, opts);
+}
+
+function assertDecimalLiteral(node, opts) {
+ assert("DecimalLiteral", node, opts);
+}
+
+function assertModuleExpression(node, opts) {
+ assert("ModuleExpression", node, opts);
+}
+
+function assertTopicReference(node, opts) {
+ assert("TopicReference", node, opts);
+}
+
+function assertPipelineTopicExpression(node, opts) {
+ assert("PipelineTopicExpression", node, opts);
+}
+
+function assertPipelineBareFunction(node, opts) {
+ assert("PipelineBareFunction", node, opts);
+}
+
+function assertPipelinePrimaryTopicReference(node, opts) {
+ assert("PipelinePrimaryTopicReference", node, opts);
+}
+
+function assertTSParameterProperty(node, opts) {
+ assert("TSParameterProperty", node, opts);
+}
+
+function assertTSDeclareFunction(node, opts) {
+ assert("TSDeclareFunction", node, opts);
+}
+
+function assertTSDeclareMethod(node, opts) {
+ assert("TSDeclareMethod", node, opts);
+}
+
+function assertTSQualifiedName(node, opts) {
+ assert("TSQualifiedName", node, opts);
+}
+
+function assertTSCallSignatureDeclaration(node, opts) {
+ assert("TSCallSignatureDeclaration", node, opts);
+}
+
+function assertTSConstructSignatureDeclaration(node, opts) {
+ assert("TSConstructSignatureDeclaration", node, opts);
+}
+
+function assertTSPropertySignature(node, opts) {
+ assert("TSPropertySignature", node, opts);
+}
+
+function assertTSMethodSignature(node, opts) {
+ assert("TSMethodSignature", node, opts);
+}
+
+function assertTSIndexSignature(node, opts) {
+ assert("TSIndexSignature", node, opts);
+}
+
+function assertTSAnyKeyword(node, opts) {
+ assert("TSAnyKeyword", node, opts);
+}
+
+function assertTSBooleanKeyword(node, opts) {
+ assert("TSBooleanKeyword", node, opts);
+}
+
+function assertTSBigIntKeyword(node, opts) {
+ assert("TSBigIntKeyword", node, opts);
+}
+
+function assertTSIntrinsicKeyword(node, opts) {
+ assert("TSIntrinsicKeyword", node, opts);
+}
+
+function assertTSNeverKeyword(node, opts) {
+ assert("TSNeverKeyword", node, opts);
+}
+
+function assertTSNullKeyword(node, opts) {
+ assert("TSNullKeyword", node, opts);
+}
+
+function assertTSNumberKeyword(node, opts) {
+ assert("TSNumberKeyword", node, opts);
+}
+
+function assertTSObjectKeyword(node, opts) {
+ assert("TSObjectKeyword", node, opts);
+}
+
+function assertTSStringKeyword(node, opts) {
+ assert("TSStringKeyword", node, opts);
+}
+
+function assertTSSymbolKeyword(node, opts) {
+ assert("TSSymbolKeyword", node, opts);
+}
+
+function assertTSUndefinedKeyword(node, opts) {
+ assert("TSUndefinedKeyword", node, opts);
+}
+
+function assertTSUnknownKeyword(node, opts) {
+ assert("TSUnknownKeyword", node, opts);
+}
+
+function assertTSVoidKeyword(node, opts) {
+ assert("TSVoidKeyword", node, opts);
+}
+
+function assertTSThisType(node, opts) {
+ assert("TSThisType", node, opts);
+}
+
+function assertTSFunctionType(node, opts) {
+ assert("TSFunctionType", node, opts);
+}
+
+function assertTSConstructorType(node, opts) {
+ assert("TSConstructorType", node, opts);
+}
+
+function assertTSTypeReference(node, opts) {
+ assert("TSTypeReference", node, opts);
+}
+
+function assertTSTypePredicate(node, opts) {
+ assert("TSTypePredicate", node, opts);
+}
+
+function assertTSTypeQuery(node, opts) {
+ assert("TSTypeQuery", node, opts);
+}
+
+function assertTSTypeLiteral(node, opts) {
+ assert("TSTypeLiteral", node, opts);
+}
+
+function assertTSArrayType(node, opts) {
+ assert("TSArrayType", node, opts);
+}
+
+function assertTSTupleType(node, opts) {
+ assert("TSTupleType", node, opts);
+}
+
+function assertTSOptionalType(node, opts) {
+ assert("TSOptionalType", node, opts);
+}
+
+function assertTSRestType(node, opts) {
+ assert("TSRestType", node, opts);
+}
+
+function assertTSNamedTupleMember(node, opts) {
+ assert("TSNamedTupleMember", node, opts);
+}
+
+function assertTSUnionType(node, opts) {
+ assert("TSUnionType", node, opts);
+}
+
+function assertTSIntersectionType(node, opts) {
+ assert("TSIntersectionType", node, opts);
+}
+
+function assertTSConditionalType(node, opts) {
+ assert("TSConditionalType", node, opts);
+}
+
+function assertTSInferType(node, opts) {
+ assert("TSInferType", node, opts);
+}
+
+function assertTSParenthesizedType(node, opts) {
+ assert("TSParenthesizedType", node, opts);
+}
+
+function assertTSTypeOperator(node, opts) {
+ assert("TSTypeOperator", node, opts);
+}
+
+function assertTSIndexedAccessType(node, opts) {
+ assert("TSIndexedAccessType", node, opts);
+}
+
+function assertTSMappedType(node, opts) {
+ assert("TSMappedType", node, opts);
+}
+
+function assertTSLiteralType(node, opts) {
+ assert("TSLiteralType", node, opts);
+}
+
+function assertTSExpressionWithTypeArguments(node, opts) {
+ assert("TSExpressionWithTypeArguments", node, opts);
+}
+
+function assertTSInterfaceDeclaration(node, opts) {
+ assert("TSInterfaceDeclaration", node, opts);
+}
+
+function assertTSInterfaceBody(node, opts) {
+ assert("TSInterfaceBody", node, opts);
+}
+
+function assertTSTypeAliasDeclaration(node, opts) {
+ assert("TSTypeAliasDeclaration", node, opts);
+}
+
+function assertTSAsExpression(node, opts) {
+ assert("TSAsExpression", node, opts);
+}
+
+function assertTSTypeAssertion(node, opts) {
+ assert("TSTypeAssertion", node, opts);
+}
+
+function assertTSEnumDeclaration(node, opts) {
+ assert("TSEnumDeclaration", node, opts);
+}
+
+function assertTSEnumMember(node, opts) {
+ assert("TSEnumMember", node, opts);
+}
+
+function assertTSModuleDeclaration(node, opts) {
+ assert("TSModuleDeclaration", node, opts);
+}
+
+function assertTSModuleBlock(node, opts) {
+ assert("TSModuleBlock", node, opts);
+}
+
+function assertTSImportType(node, opts) {
+ assert("TSImportType", node, opts);
+}
+
+function assertTSImportEqualsDeclaration(node, opts) {
+ assert("TSImportEqualsDeclaration", node, opts);
+}
+
+function assertTSExternalModuleReference(node, opts) {
+ assert("TSExternalModuleReference", node, opts);
+}
+
+function assertTSNonNullExpression(node, opts) {
+ assert("TSNonNullExpression", node, opts);
+}
+
+function assertTSExportAssignment(node, opts) {
+ assert("TSExportAssignment", node, opts);
+}
+
+function assertTSNamespaceExportDeclaration(node, opts) {
+ assert("TSNamespaceExportDeclaration", node, opts);
+}
+
+function assertTSTypeAnnotation(node, opts) {
+ assert("TSTypeAnnotation", node, opts);
+}
+
+function assertTSTypeParameterInstantiation(node, opts) {
+ assert("TSTypeParameterInstantiation", node, opts);
+}
+
+function assertTSTypeParameterDeclaration(node, opts) {
+ assert("TSTypeParameterDeclaration", node, opts);
+}
+
+function assertTSTypeParameter(node, opts) {
+ assert("TSTypeParameter", node, opts);
+}
+
+function assertStandardized(node, opts) {
+ assert("Standardized", node, opts);
+}
+
+function assertExpression(node, opts) {
+ assert("Expression", node, opts);
+}
+
+function assertBinary(node, opts) {
+ assert("Binary", node, opts);
+}
+
+function assertScopable(node, opts) {
+ assert("Scopable", node, opts);
+}
+
+function assertBlockParent(node, opts) {
+ assert("BlockParent", node, opts);
+}
+
+function assertBlock(node, opts) {
+ assert("Block", node, opts);
+}
+
+function assertStatement(node, opts) {
+ assert("Statement", node, opts);
+}
+
+function assertTerminatorless(node, opts) {
+ assert("Terminatorless", node, opts);
+}
+
+function assertCompletionStatement(node, opts) {
+ assert("CompletionStatement", node, opts);
+}
+
+function assertConditional(node, opts) {
+ assert("Conditional", node, opts);
+}
+
+function assertLoop(node, opts) {
+ assert("Loop", node, opts);
+}
+
+function assertWhile(node, opts) {
+ assert("While", node, opts);
+}
+
+function assertExpressionWrapper(node, opts) {
+ assert("ExpressionWrapper", node, opts);
+}
+
+function assertFor(node, opts) {
+ assert("For", node, opts);
+}
+
+function assertForXStatement(node, opts) {
+ assert("ForXStatement", node, opts);
+}
+
+function assertFunction(node, opts) {
+ assert("Function", node, opts);
+}
+
+function assertFunctionParent(node, opts) {
+ assert("FunctionParent", node, opts);
+}
+
+function assertPureish(node, opts) {
+ assert("Pureish", node, opts);
+}
+
+function assertDeclaration(node, opts) {
+ assert("Declaration", node, opts);
+}
+
+function assertPatternLike(node, opts) {
+ assert("PatternLike", node, opts);
+}
+
+function assertLVal(node, opts) {
+ assert("LVal", node, opts);
+}
+
+function assertTSEntityName(node, opts) {
+ assert("TSEntityName", node, opts);
+}
+
+function assertLiteral(node, opts) {
+ assert("Literal", node, opts);
+}
+
+function assertImmutable(node, opts) {
+ assert("Immutable", node, opts);
+}
+
+function assertUserWhitespacable(node, opts) {
+ assert("UserWhitespacable", node, opts);
+}
+
+function assertMethod(node, opts) {
+ assert("Method", node, opts);
+}
+
+function assertObjectMember(node, opts) {
+ assert("ObjectMember", node, opts);
+}
+
+function assertProperty(node, opts) {
+ assert("Property", node, opts);
+}
+
+function assertUnaryLike(node, opts) {
+ assert("UnaryLike", node, opts);
+}
+
+function assertPattern(node, opts) {
+ assert("Pattern", node, opts);
+}
+
+function assertClass(node, opts) {
+ assert("Class", node, opts);
+}
+
+function assertModuleDeclaration(node, opts) {
+ assert("ModuleDeclaration", node, opts);
+}
+
+function assertExportDeclaration(node, opts) {
+ assert("ExportDeclaration", node, opts);
+}
+
+function assertModuleSpecifier(node, opts) {
+ assert("ModuleSpecifier", node, opts);
+}
+
+function assertAccessor(node, opts) {
+ assert("Accessor", node, opts);
+}
+
+function assertPrivate(node, opts) {
+ assert("Private", node, opts);
+}
+
+function assertFlow(node, opts) {
+ assert("Flow", node, opts);
+}
+
+function assertFlowType(node, opts) {
+ assert("FlowType", node, opts);
+}
+
+function assertFlowBaseAnnotation(node, opts) {
+ assert("FlowBaseAnnotation", node, opts);
+}
+
+function assertFlowDeclaration(node, opts) {
+ assert("FlowDeclaration", node, opts);
+}
+
+function assertFlowPredicate(node, opts) {
+ assert("FlowPredicate", node, opts);
+}
+
+function assertEnumBody(node, opts) {
+ assert("EnumBody", node, opts);
+}
+
+function assertEnumMember(node, opts) {
+ assert("EnumMember", node, opts);
+}
+
+function assertJSX(node, opts) {
+ assert("JSX", node, opts);
+}
+
+function assertMiscellaneous(node, opts) {
+ assert("Miscellaneous", node, opts);
+}
+
+function assertTypeScript(node, opts) {
+ assert("TypeScript", node, opts);
+}
+
+function assertTSTypeElement(node, opts) {
+ assert("TSTypeElement", node, opts);
+}
+
+function assertTSType(node, opts) {
+ assert("TSType", node, opts);
+}
+
+function assertTSBaseType(node, opts) {
+ assert("TSBaseType", node, opts);
+}
+
+function assertNumberLiteral(node, opts) {
+ console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
+ assert("NumberLiteral", node, opts);
+}
+
+function assertRegexLiteral(node, opts) {
+ console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
+ assert("RegexLiteral", node, opts);
+}
+
+function assertRestProperty(node, opts) {
+ console.trace("The node type RestProperty has been renamed to RestElement");
+ assert("RestProperty", node, opts);
+}
+
+function assertSpreadProperty(node, opts) {
+ console.trace("The node type SpreadProperty has been renamed to SpreadElement");
+ assert("SpreadProperty", node, opts);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/ast-types/generated/index.js b/node_modules/@babel/types/lib/ast-types/generated/index.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/@babel/types/lib/ast-types/generated/index.js
diff --git a/node_modules/@babel/types/lib/builders/builder.js b/node_modules/@babel/types/lib/builders/builder.js
new file mode 100644
index 0000000..c28edb6
--- /dev/null
+++ b/node_modules/@babel/types/lib/builders/builder.js
@@ -0,0 +1,43 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = builder;
+
+var _definitions = require("../definitions");
+
+var _validate = require("../validators/validate");
+
+function builder() {
+ const type = this;
+ const keys = _definitions.BUILDER_KEYS[type];
+ const countArgs = arguments.length;
+
+ if (countArgs > keys.length) {
+ throw new Error(`${type}: Too many arguments passed. Received ${countArgs} but can receive no more than ${keys.length}`);
+ }
+
+ const node = {
+ type
+ };
+
+ for (let i = 0; i < keys.length; ++i) {
+ const key = keys[i];
+ const field = _definitions.NODE_FIELDS[type][key];
+ let arg;
+ if (i < countArgs) arg = arguments[i];
+
+ if (arg === undefined) {
+ arg = Array.isArray(field.default) ? [] : field.default;
+ }
+
+ node[key] = arg;
+ }
+
+ for (const key in node) {
+ (0, _validate.default)(node, key, node[key]);
+ }
+
+ return node;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js b/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
new file mode 100644
index 0000000..ddf20fd
--- /dev/null
+++ b/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
@@ -0,0 +1,20 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = createFlowUnionType;
+
+var _generated = require("../generated");
+
+var _removeTypeDuplicates = require("../../modifications/flow/removeTypeDuplicates");
+
+function createFlowUnionType(types) {
+ const flattened = (0, _removeTypeDuplicates.default)(types);
+
+ if (flattened.length === 1) {
+ return flattened[0];
+ } else {
+ return (0, _generated.unionTypeAnnotation)(flattened);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js b/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
new file mode 100644
index 0000000..11dca05
--- /dev/null
+++ b/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
@@ -0,0 +1,41 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _generated = require("../generated");
+
+var _default = createTypeAnnotationBasedOnTypeof;
+exports.default = _default;
+
+function createTypeAnnotationBasedOnTypeof(type) {
+ switch (type) {
+ case "string":
+ return (0, _generated.stringTypeAnnotation)();
+
+ case "number":
+ return (0, _generated.numberTypeAnnotation)();
+
+ case "undefined":
+ return (0, _generated.voidTypeAnnotation)();
+
+ case "boolean":
+ return (0, _generated.booleanTypeAnnotation)();
+
+ case "function":
+ return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Function"));
+
+ case "object":
+ return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Object"));
+
+ case "symbol":
+ return (0, _generated.genericTypeAnnotation)((0, _generated.identifier)("Symbol"));
+
+ case "bigint":
+ return (0, _generated.anyTypeAnnotation)();
+ }
+
+ throw new Error("Invalid typeof value: " + type);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/builders/generated/index.js b/node_modules/@babel/types/lib/builders/generated/index.js
new file mode 100644
index 0000000..99851ee
--- /dev/null
+++ b/node_modules/@babel/types/lib/builders/generated/index.js
@@ -0,0 +1,1266 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.anyTypeAnnotation = anyTypeAnnotation;
+exports.argumentPlaceholder = argumentPlaceholder;
+exports.arrayExpression = arrayExpression;
+exports.arrayPattern = arrayPattern;
+exports.arrayTypeAnnotation = arrayTypeAnnotation;
+exports.arrowFunctionExpression = arrowFunctionExpression;
+exports.assignmentExpression = assignmentExpression;
+exports.assignmentPattern = assignmentPattern;
+exports.awaitExpression = awaitExpression;
+exports.bigIntLiteral = bigIntLiteral;
+exports.binaryExpression = binaryExpression;
+exports.bindExpression = bindExpression;
+exports.blockStatement = blockStatement;
+exports.booleanLiteral = booleanLiteral;
+exports.booleanLiteralTypeAnnotation = booleanLiteralTypeAnnotation;
+exports.booleanTypeAnnotation = booleanTypeAnnotation;
+exports.breakStatement = breakStatement;
+exports.callExpression = callExpression;
+exports.catchClause = catchClause;
+exports.classAccessorProperty = classAccessorProperty;
+exports.classBody = classBody;
+exports.classDeclaration = classDeclaration;
+exports.classExpression = classExpression;
+exports.classImplements = classImplements;
+exports.classMethod = classMethod;
+exports.classPrivateMethod = classPrivateMethod;
+exports.classPrivateProperty = classPrivateProperty;
+exports.classProperty = classProperty;
+exports.conditionalExpression = conditionalExpression;
+exports.continueStatement = continueStatement;
+exports.debuggerStatement = debuggerStatement;
+exports.decimalLiteral = decimalLiteral;
+exports.declareClass = declareClass;
+exports.declareExportAllDeclaration = declareExportAllDeclaration;
+exports.declareExportDeclaration = declareExportDeclaration;
+exports.declareFunction = declareFunction;
+exports.declareInterface = declareInterface;
+exports.declareModule = declareModule;
+exports.declareModuleExports = declareModuleExports;
+exports.declareOpaqueType = declareOpaqueType;
+exports.declareTypeAlias = declareTypeAlias;
+exports.declareVariable = declareVariable;
+exports.declaredPredicate = declaredPredicate;
+exports.decorator = decorator;
+exports.directive = directive;
+exports.directiveLiteral = directiveLiteral;
+exports.doExpression = doExpression;
+exports.doWhileStatement = doWhileStatement;
+exports.emptyStatement = emptyStatement;
+exports.emptyTypeAnnotation = emptyTypeAnnotation;
+exports.enumBooleanBody = enumBooleanBody;
+exports.enumBooleanMember = enumBooleanMember;
+exports.enumDeclaration = enumDeclaration;
+exports.enumDefaultedMember = enumDefaultedMember;
+exports.enumNumberBody = enumNumberBody;
+exports.enumNumberMember = enumNumberMember;
+exports.enumStringBody = enumStringBody;
+exports.enumStringMember = enumStringMember;
+exports.enumSymbolBody = enumSymbolBody;
+exports.existsTypeAnnotation = existsTypeAnnotation;
+exports.exportAllDeclaration = exportAllDeclaration;
+exports.exportDefaultDeclaration = exportDefaultDeclaration;
+exports.exportDefaultSpecifier = exportDefaultSpecifier;
+exports.exportNamedDeclaration = exportNamedDeclaration;
+exports.exportNamespaceSpecifier = exportNamespaceSpecifier;
+exports.exportSpecifier = exportSpecifier;
+exports.expressionStatement = expressionStatement;
+exports.file = file;
+exports.forInStatement = forInStatement;
+exports.forOfStatement = forOfStatement;
+exports.forStatement = forStatement;
+exports.functionDeclaration = functionDeclaration;
+exports.functionExpression = functionExpression;
+exports.functionTypeAnnotation = functionTypeAnnotation;
+exports.functionTypeParam = functionTypeParam;
+exports.genericTypeAnnotation = genericTypeAnnotation;
+exports.identifier = identifier;
+exports.ifStatement = ifStatement;
+exports.import = _import;
+exports.importAttribute = importAttribute;
+exports.importDeclaration = importDeclaration;
+exports.importDefaultSpecifier = importDefaultSpecifier;
+exports.importNamespaceSpecifier = importNamespaceSpecifier;
+exports.importSpecifier = importSpecifier;
+exports.indexedAccessType = indexedAccessType;
+exports.inferredPredicate = inferredPredicate;
+exports.interfaceDeclaration = interfaceDeclaration;
+exports.interfaceExtends = interfaceExtends;
+exports.interfaceTypeAnnotation = interfaceTypeAnnotation;
+exports.interpreterDirective = interpreterDirective;
+exports.intersectionTypeAnnotation = intersectionTypeAnnotation;
+exports.jSXAttribute = exports.jsxAttribute = jsxAttribute;
+exports.jSXClosingElement = exports.jsxClosingElement = jsxClosingElement;
+exports.jSXClosingFragment = exports.jsxClosingFragment = jsxClosingFragment;
+exports.jSXElement = exports.jsxElement = jsxElement;
+exports.jSXEmptyExpression = exports.jsxEmptyExpression = jsxEmptyExpression;
+exports.jSXExpressionContainer = exports.jsxExpressionContainer = jsxExpressionContainer;
+exports.jSXFragment = exports.jsxFragment = jsxFragment;
+exports.jSXIdentifier = exports.jsxIdentifier = jsxIdentifier;
+exports.jSXMemberExpression = exports.jsxMemberExpression = jsxMemberExpression;
+exports.jSXNamespacedName = exports.jsxNamespacedName = jsxNamespacedName;
+exports.jSXOpeningElement = exports.jsxOpeningElement = jsxOpeningElement;
+exports.jSXOpeningFragment = exports.jsxOpeningFragment = jsxOpeningFragment;
+exports.jSXSpreadAttribute = exports.jsxSpreadAttribute = jsxSpreadAttribute;
+exports.jSXSpreadChild = exports.jsxSpreadChild = jsxSpreadChild;
+exports.jSXText = exports.jsxText = jsxText;
+exports.labeledStatement = labeledStatement;
+exports.logicalExpression = logicalExpression;
+exports.memberExpression = memberExpression;
+exports.metaProperty = metaProperty;
+exports.mixedTypeAnnotation = mixedTypeAnnotation;
+exports.moduleExpression = moduleExpression;
+exports.newExpression = newExpression;
+exports.noop = noop;
+exports.nullLiteral = nullLiteral;
+exports.nullLiteralTypeAnnotation = nullLiteralTypeAnnotation;
+exports.nullableTypeAnnotation = nullableTypeAnnotation;
+exports.numberLiteral = NumberLiteral;
+exports.numberLiteralTypeAnnotation = numberLiteralTypeAnnotation;
+exports.numberTypeAnnotation = numberTypeAnnotation;
+exports.numericLiteral = numericLiteral;
+exports.objectExpression = objectExpression;
+exports.objectMethod = objectMethod;
+exports.objectPattern = objectPattern;
+exports.objectProperty = objectProperty;
+exports.objectTypeAnnotation = objectTypeAnnotation;
+exports.objectTypeCallProperty = objectTypeCallProperty;
+exports.objectTypeIndexer = objectTypeIndexer;
+exports.objectTypeInternalSlot = objectTypeInternalSlot;
+exports.objectTypeProperty = objectTypeProperty;
+exports.objectTypeSpreadProperty = objectTypeSpreadProperty;
+exports.opaqueType = opaqueType;
+exports.optionalCallExpression = optionalCallExpression;
+exports.optionalIndexedAccessType = optionalIndexedAccessType;
+exports.optionalMemberExpression = optionalMemberExpression;
+exports.parenthesizedExpression = parenthesizedExpression;
+exports.pipelineBareFunction = pipelineBareFunction;
+exports.pipelinePrimaryTopicReference = pipelinePrimaryTopicReference;
+exports.pipelineTopicExpression = pipelineTopicExpression;
+exports.placeholder = placeholder;
+exports.privateName = privateName;
+exports.program = program;
+exports.qualifiedTypeIdentifier = qualifiedTypeIdentifier;
+exports.recordExpression = recordExpression;
+exports.regExpLiteral = regExpLiteral;
+exports.regexLiteral = RegexLiteral;
+exports.restElement = restElement;
+exports.restProperty = RestProperty;
+exports.returnStatement = returnStatement;
+exports.sequenceExpression = sequenceExpression;
+exports.spreadElement = spreadElement;
+exports.spreadProperty = SpreadProperty;
+exports.staticBlock = staticBlock;
+exports.stringLiteral = stringLiteral;
+exports.stringLiteralTypeAnnotation = stringLiteralTypeAnnotation;
+exports.stringTypeAnnotation = stringTypeAnnotation;
+exports.super = _super;
+exports.switchCase = switchCase;
+exports.switchStatement = switchStatement;
+exports.symbolTypeAnnotation = symbolTypeAnnotation;
+exports.taggedTemplateExpression = taggedTemplateExpression;
+exports.templateElement = templateElement;
+exports.templateLiteral = templateLiteral;
+exports.thisExpression = thisExpression;
+exports.thisTypeAnnotation = thisTypeAnnotation;
+exports.throwStatement = throwStatement;
+exports.topicReference = topicReference;
+exports.tryStatement = tryStatement;
+exports.tSAnyKeyword = exports.tsAnyKeyword = tsAnyKeyword;
+exports.tSArrayType = exports.tsArrayType = tsArrayType;
+exports.tSAsExpression = exports.tsAsExpression = tsAsExpression;
+exports.tSBigIntKeyword = exports.tsBigIntKeyword = tsBigIntKeyword;
+exports.tSBooleanKeyword = exports.tsBooleanKeyword = tsBooleanKeyword;
+exports.tSCallSignatureDeclaration = exports.tsCallSignatureDeclaration = tsCallSignatureDeclaration;
+exports.tSConditionalType = exports.tsConditionalType = tsConditionalType;
+exports.tSConstructSignatureDeclaration = exports.tsConstructSignatureDeclaration = tsConstructSignatureDeclaration;
+exports.tSConstructorType = exports.tsConstructorType = tsConstructorType;
+exports.tSDeclareFunction = exports.tsDeclareFunction = tsDeclareFunction;
+exports.tSDeclareMethod = exports.tsDeclareMethod = tsDeclareMethod;
+exports.tSEnumDeclaration = exports.tsEnumDeclaration = tsEnumDeclaration;
+exports.tSEnumMember = exports.tsEnumMember = tsEnumMember;
+exports.tSExportAssignment = exports.tsExportAssignment = tsExportAssignment;
+exports.tSExpressionWithTypeArguments = exports.tsExpressionWithTypeArguments = tsExpressionWithTypeArguments;
+exports.tSExternalModuleReference = exports.tsExternalModuleReference = tsExternalModuleReference;
+exports.tSFunctionType = exports.tsFunctionType = tsFunctionType;
+exports.tSImportEqualsDeclaration = exports.tsImportEqualsDeclaration = tsImportEqualsDeclaration;
+exports.tSImportType = exports.tsImportType = tsImportType;
+exports.tSIndexSignature = exports.tsIndexSignature = tsIndexSignature;
+exports.tSIndexedAccessType = exports.tsIndexedAccessType = tsIndexedAccessType;
+exports.tSInferType = exports.tsInferType = tsInferType;
+exports.tSInterfaceBody = exports.tsInterfaceBody = tsInterfaceBody;
+exports.tSInterfaceDeclaration = exports.tsInterfaceDeclaration = tsInterfaceDeclaration;
+exports.tSIntersectionType = exports.tsIntersectionType = tsIntersectionType;
+exports.tSIntrinsicKeyword = exports.tsIntrinsicKeyword = tsIntrinsicKeyword;
+exports.tSLiteralType = exports.tsLiteralType = tsLiteralType;
+exports.tSMappedType = exports.tsMappedType = tsMappedType;
+exports.tSMethodSignature = exports.tsMethodSignature = tsMethodSignature;
+exports.tSModuleBlock = exports.tsModuleBlock = tsModuleBlock;
+exports.tSModuleDeclaration = exports.tsModuleDeclaration = tsModuleDeclaration;
+exports.tSNamedTupleMember = exports.tsNamedTupleMember = tsNamedTupleMember;
+exports.tSNamespaceExportDeclaration = exports.tsNamespaceExportDeclaration = tsNamespaceExportDeclaration;
+exports.tSNeverKeyword = exports.tsNeverKeyword = tsNeverKeyword;
+exports.tSNonNullExpression = exports.tsNonNullExpression = tsNonNullExpression;
+exports.tSNullKeyword = exports.tsNullKeyword = tsNullKeyword;
+exports.tSNumberKeyword = exports.tsNumberKeyword = tsNumberKeyword;
+exports.tSObjectKeyword = exports.tsObjectKeyword = tsObjectKeyword;
+exports.tSOptionalType = exports.tsOptionalType = tsOptionalType;
+exports.tSParameterProperty = exports.tsParameterProperty = tsParameterProperty;
+exports.tSParenthesizedType = exports.tsParenthesizedType = tsParenthesizedType;
+exports.tSPropertySignature = exports.tsPropertySignature = tsPropertySignature;
+exports.tSQualifiedName = exports.tsQualifiedName = tsQualifiedName;
+exports.tSRestType = exports.tsRestType = tsRestType;
+exports.tSStringKeyword = exports.tsStringKeyword = tsStringKeyword;
+exports.tSSymbolKeyword = exports.tsSymbolKeyword = tsSymbolKeyword;
+exports.tSThisType = exports.tsThisType = tsThisType;
+exports.tSTupleType = exports.tsTupleType = tsTupleType;
+exports.tSTypeAliasDeclaration = exports.tsTypeAliasDeclaration = tsTypeAliasDeclaration;
+exports.tSTypeAnnotation = exports.tsTypeAnnotation = tsTypeAnnotation;
+exports.tSTypeAssertion = exports.tsTypeAssertion = tsTypeAssertion;
+exports.tSTypeLiteral = exports.tsTypeLiteral = tsTypeLiteral;
+exports.tSTypeOperator = exports.tsTypeOperator = tsTypeOperator;
+exports.tSTypeParameter = exports.tsTypeParameter = tsTypeParameter;
+exports.tSTypeParameterDeclaration = exports.tsTypeParameterDeclaration = tsTypeParameterDeclaration;
+exports.tSTypeParameterInstantiation = exports.tsTypeParameterInstantiation = tsTypeParameterInstantiation;
+exports.tSTypePredicate = exports.tsTypePredicate = tsTypePredicate;
+exports.tSTypeQuery = exports.tsTypeQuery = tsTypeQuery;
+exports.tSTypeReference = exports.tsTypeReference = tsTypeReference;
+exports.tSUndefinedKeyword = exports.tsUndefinedKeyword = tsUndefinedKeyword;
+exports.tSUnionType = exports.tsUnionType = tsUnionType;
+exports.tSUnknownKeyword = exports.tsUnknownKeyword = tsUnknownKeyword;
+exports.tSVoidKeyword = exports.tsVoidKeyword = tsVoidKeyword;
+exports.tupleExpression = tupleExpression;
+exports.tupleTypeAnnotation = tupleTypeAnnotation;
+exports.typeAlias = typeAlias;
+exports.typeAnnotation = typeAnnotation;
+exports.typeCastExpression = typeCastExpression;
+exports.typeParameter = typeParameter;
+exports.typeParameterDeclaration = typeParameterDeclaration;
+exports.typeParameterInstantiation = typeParameterInstantiation;
+exports.typeofTypeAnnotation = typeofTypeAnnotation;
+exports.unaryExpression = unaryExpression;
+exports.unionTypeAnnotation = unionTypeAnnotation;
+exports.updateExpression = updateExpression;
+exports.v8IntrinsicIdentifier = v8IntrinsicIdentifier;
+exports.variableDeclaration = variableDeclaration;
+exports.variableDeclarator = variableDeclarator;
+exports.variance = variance;
+exports.voidTypeAnnotation = voidTypeAnnotation;
+exports.whileStatement = whileStatement;
+exports.withStatement = withStatement;
+exports.yieldExpression = yieldExpression;
+
+var _builder = require("../builder");
+
+function arrayExpression(elements) {
+ return _builder.default.apply("ArrayExpression", arguments);
+}
+
+function assignmentExpression(operator, left, right) {
+ return _builder.default.apply("AssignmentExpression", arguments);
+}
+
+function binaryExpression(operator, left, right) {
+ return _builder.default.apply("BinaryExpression", arguments);
+}
+
+function interpreterDirective(value) {
+ return _builder.default.apply("InterpreterDirective", arguments);
+}
+
+function directive(value) {
+ return _builder.default.apply("Directive", arguments);
+}
+
+function directiveLiteral(value) {
+ return _builder.default.apply("DirectiveLiteral", arguments);
+}
+
+function blockStatement(body, directives) {
+ return _builder.default.apply("BlockStatement", arguments);
+}
+
+function breakStatement(label) {
+ return _builder.default.apply("BreakStatement", arguments);
+}
+
+function callExpression(callee, _arguments) {
+ return _builder.default.apply("CallExpression", arguments);
+}
+
+function catchClause(param, body) {
+ return _builder.default.apply("CatchClause", arguments);
+}
+
+function conditionalExpression(test, consequent, alternate) {
+ return _builder.default.apply("ConditionalExpression", arguments);
+}
+
+function continueStatement(label) {
+ return _builder.default.apply("ContinueStatement", arguments);
+}
+
+function debuggerStatement() {
+ return _builder.default.apply("DebuggerStatement", arguments);
+}
+
+function doWhileStatement(test, body) {
+ return _builder.default.apply("DoWhileStatement", arguments);
+}
+
+function emptyStatement() {
+ return _builder.default.apply("EmptyStatement", arguments);
+}
+
+function expressionStatement(expression) {
+ return _builder.default.apply("ExpressionStatement", arguments);
+}
+
+function file(program, comments, tokens) {
+ return _builder.default.apply("File", arguments);
+}
+
+function forInStatement(left, right, body) {
+ return _builder.default.apply("ForInStatement", arguments);
+}
+
+function forStatement(init, test, update, body) {
+ return _builder.default.apply("ForStatement", arguments);
+}
+
+function functionDeclaration(id, params, body, generator, async) {
+ return _builder.default.apply("FunctionDeclaration", arguments);
+}
+
+function functionExpression(id, params, body, generator, async) {
+ return _builder.default.apply("FunctionExpression", arguments);
+}
+
+function identifier(name) {
+ return _builder.default.apply("Identifier", arguments);
+}
+
+function ifStatement(test, consequent, alternate) {
+ return _builder.default.apply("IfStatement", arguments);
+}
+
+function labeledStatement(label, body) {
+ return _builder.default.apply("LabeledStatement", arguments);
+}
+
+function stringLiteral(value) {
+ return _builder.default.apply("StringLiteral", arguments);
+}
+
+function numericLiteral(value) {
+ return _builder.default.apply("NumericLiteral", arguments);
+}
+
+function nullLiteral() {
+ return _builder.default.apply("NullLiteral", arguments);
+}
+
+function booleanLiteral(value) {
+ return _builder.default.apply("BooleanLiteral", arguments);
+}
+
+function regExpLiteral(pattern, flags) {
+ return _builder.default.apply("RegExpLiteral", arguments);
+}
+
+function logicalExpression(operator, left, right) {
+ return _builder.default.apply("LogicalExpression", arguments);
+}
+
+function memberExpression(object, property, computed, optional) {
+ return _builder.default.apply("MemberExpression", arguments);
+}
+
+function newExpression(callee, _arguments) {
+ return _builder.default.apply("NewExpression", arguments);
+}
+
+function program(body, directives, sourceType, interpreter) {
+ return _builder.default.apply("Program", arguments);
+}
+
+function objectExpression(properties) {
+ return _builder.default.apply("ObjectExpression", arguments);
+}
+
+function objectMethod(kind, key, params, body, computed, generator, async) {
+ return _builder.default.apply("ObjectMethod", arguments);
+}
+
+function objectProperty(key, value, computed, shorthand, decorators) {
+ return _builder.default.apply("ObjectProperty", arguments);
+}
+
+function restElement(argument) {
+ return _builder.default.apply("RestElement", arguments);
+}
+
+function returnStatement(argument) {
+ return _builder.default.apply("ReturnStatement", arguments);
+}
+
+function sequenceExpression(expressions) {
+ return _builder.default.apply("SequenceExpression", arguments);
+}
+
+function parenthesizedExpression(expression) {
+ return _builder.default.apply("ParenthesizedExpression", arguments);
+}
+
+function switchCase(test, consequent) {
+ return _builder.default.apply("SwitchCase", arguments);
+}
+
+function switchStatement(discriminant, cases) {
+ return _builder.default.apply("SwitchStatement", arguments);
+}
+
+function thisExpression() {
+ return _builder.default.apply("ThisExpression", arguments);
+}
+
+function throwStatement(argument) {
+ return _builder.default.apply("ThrowStatement", arguments);
+}
+
+function tryStatement(block, handler, finalizer) {
+ return _builder.default.apply("TryStatement", arguments);
+}
+
+function unaryExpression(operator, argument, prefix) {
+ return _builder.default.apply("UnaryExpression", arguments);
+}
+
+function updateExpression(operator, argument, prefix) {
+ return _builder.default.apply("UpdateExpression", arguments);
+}
+
+function variableDeclaration(kind, declarations) {
+ return _builder.default.apply("VariableDeclaration", arguments);
+}
+
+function variableDeclarator(id, init) {
+ return _builder.default.apply("VariableDeclarator", arguments);
+}
+
+function whileStatement(test, body) {
+ return _builder.default.apply("WhileStatement", arguments);
+}
+
+function withStatement(object, body) {
+ return _builder.default.apply("WithStatement", arguments);
+}
+
+function assignmentPattern(left, right) {
+ return _builder.default.apply("AssignmentPattern", arguments);
+}
+
+function arrayPattern(elements) {
+ return _builder.default.apply("ArrayPattern", arguments);
+}
+
+function arrowFunctionExpression(params, body, async) {
+ return _builder.default.apply("ArrowFunctionExpression", arguments);
+}
+
+function classBody(body) {
+ return _builder.default.apply("ClassBody", arguments);
+}
+
+function classExpression(id, superClass, body, decorators) {
+ return _builder.default.apply("ClassExpression", arguments);
+}
+
+function classDeclaration(id, superClass, body, decorators) {
+ return _builder.default.apply("ClassDeclaration", arguments);
+}
+
+function exportAllDeclaration(source) {
+ return _builder.default.apply("ExportAllDeclaration", arguments);
+}
+
+function exportDefaultDeclaration(declaration) {
+ return _builder.default.apply("ExportDefaultDeclaration", arguments);
+}
+
+function exportNamedDeclaration(declaration, specifiers, source) {
+ return _builder.default.apply("ExportNamedDeclaration", arguments);
+}
+
+function exportSpecifier(local, exported) {
+ return _builder.default.apply("ExportSpecifier", arguments);
+}
+
+function forOfStatement(left, right, body, _await) {
+ return _builder.default.apply("ForOfStatement", arguments);
+}
+
+function importDeclaration(specifiers, source) {
+ return _builder.default.apply("ImportDeclaration", arguments);
+}
+
+function importDefaultSpecifier(local) {
+ return _builder.default.apply("ImportDefaultSpecifier", arguments);
+}
+
+function importNamespaceSpecifier(local) {
+ return _builder.default.apply("ImportNamespaceSpecifier", arguments);
+}
+
+function importSpecifier(local, imported) {
+ return _builder.default.apply("ImportSpecifier", arguments);
+}
+
+function metaProperty(meta, property) {
+ return _builder.default.apply("MetaProperty", arguments);
+}
+
+function classMethod(kind, key, params, body, computed, _static, generator, async) {
+ return _builder.default.apply("ClassMethod", arguments);
+}
+
+function objectPattern(properties) {
+ return _builder.default.apply("ObjectPattern", arguments);
+}
+
+function spreadElement(argument) {
+ return _builder.default.apply("SpreadElement", arguments);
+}
+
+function _super() {
+ return _builder.default.apply("Super", arguments);
+}
+
+function taggedTemplateExpression(tag, quasi) {
+ return _builder.default.apply("TaggedTemplateExpression", arguments);
+}
+
+function templateElement(value, tail) {
+ return _builder.default.apply("TemplateElement", arguments);
+}
+
+function templateLiteral(quasis, expressions) {
+ return _builder.default.apply("TemplateLiteral", arguments);
+}
+
+function yieldExpression(argument, delegate) {
+ return _builder.default.apply("YieldExpression", arguments);
+}
+
+function awaitExpression(argument) {
+ return _builder.default.apply("AwaitExpression", arguments);
+}
+
+function _import() {
+ return _builder.default.apply("Import", arguments);
+}
+
+function bigIntLiteral(value) {
+ return _builder.default.apply("BigIntLiteral", arguments);
+}
+
+function exportNamespaceSpecifier(exported) {
+ return _builder.default.apply("ExportNamespaceSpecifier", arguments);
+}
+
+function optionalMemberExpression(object, property, computed, optional) {
+ return _builder.default.apply("OptionalMemberExpression", arguments);
+}
+
+function optionalCallExpression(callee, _arguments, optional) {
+ return _builder.default.apply("OptionalCallExpression", arguments);
+}
+
+function classProperty(key, value, typeAnnotation, decorators, computed, _static) {
+ return _builder.default.apply("ClassProperty", arguments);
+}
+
+function classAccessorProperty(key, value, typeAnnotation, decorators, computed, _static) {
+ return _builder.default.apply("ClassAccessorProperty", arguments);
+}
+
+function classPrivateProperty(key, value, decorators, _static) {
+ return _builder.default.apply("ClassPrivateProperty", arguments);
+}
+
+function classPrivateMethod(kind, key, params, body, _static) {
+ return _builder.default.apply("ClassPrivateMethod", arguments);
+}
+
+function privateName(id) {
+ return _builder.default.apply("PrivateName", arguments);
+}
+
+function staticBlock(body) {
+ return _builder.default.apply("StaticBlock", arguments);
+}
+
+function anyTypeAnnotation() {
+ return _builder.default.apply("AnyTypeAnnotation", arguments);
+}
+
+function arrayTypeAnnotation(elementType) {
+ return _builder.default.apply("ArrayTypeAnnotation", arguments);
+}
+
+function booleanTypeAnnotation() {
+ return _builder.default.apply("BooleanTypeAnnotation", arguments);
+}
+
+function booleanLiteralTypeAnnotation(value) {
+ return _builder.default.apply("BooleanLiteralTypeAnnotation", arguments);
+}
+
+function nullLiteralTypeAnnotation() {
+ return _builder.default.apply("NullLiteralTypeAnnotation", arguments);
+}
+
+function classImplements(id, typeParameters) {
+ return _builder.default.apply("ClassImplements", arguments);
+}
+
+function declareClass(id, typeParameters, _extends, body) {
+ return _builder.default.apply("DeclareClass", arguments);
+}
+
+function declareFunction(id) {
+ return _builder.default.apply("DeclareFunction", arguments);
+}
+
+function declareInterface(id, typeParameters, _extends, body) {
+ return _builder.default.apply("DeclareInterface", arguments);
+}
+
+function declareModule(id, body, kind) {
+ return _builder.default.apply("DeclareModule", arguments);
+}
+
+function declareModuleExports(typeAnnotation) {
+ return _builder.default.apply("DeclareModuleExports", arguments);
+}
+
+function declareTypeAlias(id, typeParameters, right) {
+ return _builder.default.apply("DeclareTypeAlias", arguments);
+}
+
+function declareOpaqueType(id, typeParameters, supertype) {
+ return _builder.default.apply("DeclareOpaqueType", arguments);
+}
+
+function declareVariable(id) {
+ return _builder.default.apply("DeclareVariable", arguments);
+}
+
+function declareExportDeclaration(declaration, specifiers, source) {
+ return _builder.default.apply("DeclareExportDeclaration", arguments);
+}
+
+function declareExportAllDeclaration(source) {
+ return _builder.default.apply("DeclareExportAllDeclaration", arguments);
+}
+
+function declaredPredicate(value) {
+ return _builder.default.apply("DeclaredPredicate", arguments);
+}
+
+function existsTypeAnnotation() {
+ return _builder.default.apply("ExistsTypeAnnotation", arguments);
+}
+
+function functionTypeAnnotation(typeParameters, params, rest, returnType) {
+ return _builder.default.apply("FunctionTypeAnnotation", arguments);
+}
+
+function functionTypeParam(name, typeAnnotation) {
+ return _builder.default.apply("FunctionTypeParam", arguments);
+}
+
+function genericTypeAnnotation(id, typeParameters) {
+ return _builder.default.apply("GenericTypeAnnotation", arguments);
+}
+
+function inferredPredicate() {
+ return _builder.default.apply("InferredPredicate", arguments);
+}
+
+function interfaceExtends(id, typeParameters) {
+ return _builder.default.apply("InterfaceExtends", arguments);
+}
+
+function interfaceDeclaration(id, typeParameters, _extends, body) {
+ return _builder.default.apply("InterfaceDeclaration", arguments);
+}
+
+function interfaceTypeAnnotation(_extends, body) {
+ return _builder.default.apply("InterfaceTypeAnnotation", arguments);
+}
+
+function intersectionTypeAnnotation(types) {
+ return _builder.default.apply("IntersectionTypeAnnotation", arguments);
+}
+
+function mixedTypeAnnotation() {
+ return _builder.default.apply("MixedTypeAnnotation", arguments);
+}
+
+function emptyTypeAnnotation() {
+ return _builder.default.apply("EmptyTypeAnnotation", arguments);
+}
+
+function nullableTypeAnnotation(typeAnnotation) {
+ return _builder.default.apply("NullableTypeAnnotation", arguments);
+}
+
+function numberLiteralTypeAnnotation(value) {
+ return _builder.default.apply("NumberLiteralTypeAnnotation", arguments);
+}
+
+function numberTypeAnnotation() {
+ return _builder.default.apply("NumberTypeAnnotation", arguments);
+}
+
+function objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {
+ return _builder.default.apply("ObjectTypeAnnotation", arguments);
+}
+
+function objectTypeInternalSlot(id, value, optional, _static, method) {
+ return _builder.default.apply("ObjectTypeInternalSlot", arguments);
+}
+
+function objectTypeCallProperty(value) {
+ return _builder.default.apply("ObjectTypeCallProperty", arguments);
+}
+
+function objectTypeIndexer(id, key, value, variance) {
+ return _builder.default.apply("ObjectTypeIndexer", arguments);
+}
+
+function objectTypeProperty(key, value, variance) {
+ return _builder.default.apply("ObjectTypeProperty", arguments);
+}
+
+function objectTypeSpreadProperty(argument) {
+ return _builder.default.apply("ObjectTypeSpreadProperty", arguments);
+}
+
+function opaqueType(id, typeParameters, supertype, impltype) {
+ return _builder.default.apply("OpaqueType", arguments);
+}
+
+function qualifiedTypeIdentifier(id, qualification) {
+ return _builder.default.apply("QualifiedTypeIdentifier", arguments);
+}
+
+function stringLiteralTypeAnnotation(value) {
+ return _builder.default.apply("StringLiteralTypeAnnotation", arguments);
+}
+
+function stringTypeAnnotation() {
+ return _builder.default.apply("StringTypeAnnotation", arguments);
+}
+
+function symbolTypeAnnotation() {
+ return _builder.default.apply("SymbolTypeAnnotation", arguments);
+}
+
+function thisTypeAnnotation() {
+ return _builder.default.apply("ThisTypeAnnotation", arguments);
+}
+
+function tupleTypeAnnotation(types) {
+ return _builder.default.apply("TupleTypeAnnotation", arguments);
+}
+
+function typeofTypeAnnotation(argument) {
+ return _builder.default.apply("TypeofTypeAnnotation", arguments);
+}
+
+function typeAlias(id, typeParameters, right) {
+ return _builder.default.apply("TypeAlias", arguments);
+}
+
+function typeAnnotation(typeAnnotation) {
+ return _builder.default.apply("TypeAnnotation", arguments);
+}
+
+function typeCastExpression(expression, typeAnnotation) {
+ return _builder.default.apply("TypeCastExpression", arguments);
+}
+
+function typeParameter(bound, _default, variance) {
+ return _builder.default.apply("TypeParameter", arguments);
+}
+
+function typeParameterDeclaration(params) {
+ return _builder.default.apply("TypeParameterDeclaration", arguments);
+}
+
+function typeParameterInstantiation(params) {
+ return _builder.default.apply("TypeParameterInstantiation", arguments);
+}
+
+function unionTypeAnnotation(types) {
+ return _builder.default.apply("UnionTypeAnnotation", arguments);
+}
+
+function variance(kind) {
+ return _builder.default.apply("Variance", arguments);
+}
+
+function voidTypeAnnotation() {
+ return _builder.default.apply("VoidTypeAnnotation", arguments);
+}
+
+function enumDeclaration(id, body) {
+ return _builder.default.apply("EnumDeclaration", arguments);
+}
+
+function enumBooleanBody(members) {
+ return _builder.default.apply("EnumBooleanBody", arguments);
+}
+
+function enumNumberBody(members) {
+ return _builder.default.apply("EnumNumberBody", arguments);
+}
+
+function enumStringBody(members) {
+ return _builder.default.apply("EnumStringBody", arguments);
+}
+
+function enumSymbolBody(members) {
+ return _builder.default.apply("EnumSymbolBody", arguments);
+}
+
+function enumBooleanMember(id) {
+ return _builder.default.apply("EnumBooleanMember", arguments);
+}
+
+function enumNumberMember(id, init) {
+ return _builder.default.apply("EnumNumberMember", arguments);
+}
+
+function enumStringMember(id, init) {
+ return _builder.default.apply("EnumStringMember", arguments);
+}
+
+function enumDefaultedMember(id) {
+ return _builder.default.apply("EnumDefaultedMember", arguments);
+}
+
+function indexedAccessType(objectType, indexType) {
+ return _builder.default.apply("IndexedAccessType", arguments);
+}
+
+function optionalIndexedAccessType(objectType, indexType) {
+ return _builder.default.apply("OptionalIndexedAccessType", arguments);
+}
+
+function jsxAttribute(name, value) {
+ return _builder.default.apply("JSXAttribute", arguments);
+}
+
+function jsxClosingElement(name) {
+ return _builder.default.apply("JSXClosingElement", arguments);
+}
+
+function jsxElement(openingElement, closingElement, children, selfClosing) {
+ return _builder.default.apply("JSXElement", arguments);
+}
+
+function jsxEmptyExpression() {
+ return _builder.default.apply("JSXEmptyExpression", arguments);
+}
+
+function jsxExpressionContainer(expression) {
+ return _builder.default.apply("JSXExpressionContainer", arguments);
+}
+
+function jsxSpreadChild(expression) {
+ return _builder.default.apply("JSXSpreadChild", arguments);
+}
+
+function jsxIdentifier(name) {
+ return _builder.default.apply("JSXIdentifier", arguments);
+}
+
+function jsxMemberExpression(object, property) {
+ return _builder.default.apply("JSXMemberExpression", arguments);
+}
+
+function jsxNamespacedName(namespace, name) {
+ return _builder.default.apply("JSXNamespacedName", arguments);
+}
+
+function jsxOpeningElement(name, attributes, selfClosing) {
+ return _builder.default.apply("JSXOpeningElement", arguments);
+}
+
+function jsxSpreadAttribute(argument) {
+ return _builder.default.apply("JSXSpreadAttribute", arguments);
+}
+
+function jsxText(value) {
+ return _builder.default.apply("JSXText", arguments);
+}
+
+function jsxFragment(openingFragment, closingFragment, children) {
+ return _builder.default.apply("JSXFragment", arguments);
+}
+
+function jsxOpeningFragment() {
+ return _builder.default.apply("JSXOpeningFragment", arguments);
+}
+
+function jsxClosingFragment() {
+ return _builder.default.apply("JSXClosingFragment", arguments);
+}
+
+function noop() {
+ return _builder.default.apply("Noop", arguments);
+}
+
+function placeholder(expectedNode, name) {
+ return _builder.default.apply("Placeholder", arguments);
+}
+
+function v8IntrinsicIdentifier(name) {
+ return _builder.default.apply("V8IntrinsicIdentifier", arguments);
+}
+
+function argumentPlaceholder() {
+ return _builder.default.apply("ArgumentPlaceholder", arguments);
+}
+
+function bindExpression(object, callee) {
+ return _builder.default.apply("BindExpression", arguments);
+}
+
+function importAttribute(key, value) {
+ return _builder.default.apply("ImportAttribute", arguments);
+}
+
+function decorator(expression) {
+ return _builder.default.apply("Decorator", arguments);
+}
+
+function doExpression(body, async) {
+ return _builder.default.apply("DoExpression", arguments);
+}
+
+function exportDefaultSpecifier(exported) {
+ return _builder.default.apply("ExportDefaultSpecifier", arguments);
+}
+
+function recordExpression(properties) {
+ return _builder.default.apply("RecordExpression", arguments);
+}
+
+function tupleExpression(elements) {
+ return _builder.default.apply("TupleExpression", arguments);
+}
+
+function decimalLiteral(value) {
+ return _builder.default.apply("DecimalLiteral", arguments);
+}
+
+function moduleExpression(body) {
+ return _builder.default.apply("ModuleExpression", arguments);
+}
+
+function topicReference() {
+ return _builder.default.apply("TopicReference", arguments);
+}
+
+function pipelineTopicExpression(expression) {
+ return _builder.default.apply("PipelineTopicExpression", arguments);
+}
+
+function pipelineBareFunction(callee) {
+ return _builder.default.apply("PipelineBareFunction", arguments);
+}
+
+function pipelinePrimaryTopicReference() {
+ return _builder.default.apply("PipelinePrimaryTopicReference", arguments);
+}
+
+function tsParameterProperty(parameter) {
+ return _builder.default.apply("TSParameterProperty", arguments);
+}
+
+function tsDeclareFunction(id, typeParameters, params, returnType) {
+ return _builder.default.apply("TSDeclareFunction", arguments);
+}
+
+function tsDeclareMethod(decorators, key, typeParameters, params, returnType) {
+ return _builder.default.apply("TSDeclareMethod", arguments);
+}
+
+function tsQualifiedName(left, right) {
+ return _builder.default.apply("TSQualifiedName", arguments);
+}
+
+function tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation) {
+ return _builder.default.apply("TSCallSignatureDeclaration", arguments);
+}
+
+function tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation) {
+ return _builder.default.apply("TSConstructSignatureDeclaration", arguments);
+}
+
+function tsPropertySignature(key, typeAnnotation, initializer) {
+ return _builder.default.apply("TSPropertySignature", arguments);
+}
+
+function tsMethodSignature(key, typeParameters, parameters, typeAnnotation) {
+ return _builder.default.apply("TSMethodSignature", arguments);
+}
+
+function tsIndexSignature(parameters, typeAnnotation) {
+ return _builder.default.apply("TSIndexSignature", arguments);
+}
+
+function tsAnyKeyword() {
+ return _builder.default.apply("TSAnyKeyword", arguments);
+}
+
+function tsBooleanKeyword() {
+ return _builder.default.apply("TSBooleanKeyword", arguments);
+}
+
+function tsBigIntKeyword() {
+ return _builder.default.apply("TSBigIntKeyword", arguments);
+}
+
+function tsIntrinsicKeyword() {
+ return _builder.default.apply("TSIntrinsicKeyword", arguments);
+}
+
+function tsNeverKeyword() {
+ return _builder.default.apply("TSNeverKeyword", arguments);
+}
+
+function tsNullKeyword() {
+ return _builder.default.apply("TSNullKeyword", arguments);
+}
+
+function tsNumberKeyword() {
+ return _builder.default.apply("TSNumberKeyword", arguments);
+}
+
+function tsObjectKeyword() {
+ return _builder.default.apply("TSObjectKeyword", arguments);
+}
+
+function tsStringKeyword() {
+ return _builder.default.apply("TSStringKeyword", arguments);
+}
+
+function tsSymbolKeyword() {
+ return _builder.default.apply("TSSymbolKeyword", arguments);
+}
+
+function tsUndefinedKeyword() {
+ return _builder.default.apply("TSUndefinedKeyword", arguments);
+}
+
+function tsUnknownKeyword() {
+ return _builder.default.apply("TSUnknownKeyword", arguments);
+}
+
+function tsVoidKeyword() {
+ return _builder.default.apply("TSVoidKeyword", arguments);
+}
+
+function tsThisType() {
+ return _builder.default.apply("TSThisType", arguments);
+}
+
+function tsFunctionType(typeParameters, parameters, typeAnnotation) {
+ return _builder.default.apply("TSFunctionType", arguments);
+}
+
+function tsConstructorType(typeParameters, parameters, typeAnnotation) {
+ return _builder.default.apply("TSConstructorType", arguments);
+}
+
+function tsTypeReference(typeName, typeParameters) {
+ return _builder.default.apply("TSTypeReference", arguments);
+}
+
+function tsTypePredicate(parameterName, typeAnnotation, asserts) {
+ return _builder.default.apply("TSTypePredicate", arguments);
+}
+
+function tsTypeQuery(exprName) {
+ return _builder.default.apply("TSTypeQuery", arguments);
+}
+
+function tsTypeLiteral(members) {
+ return _builder.default.apply("TSTypeLiteral", arguments);
+}
+
+function tsArrayType(elementType) {
+ return _builder.default.apply("TSArrayType", arguments);
+}
+
+function tsTupleType(elementTypes) {
+ return _builder.default.apply("TSTupleType", arguments);
+}
+
+function tsOptionalType(typeAnnotation) {
+ return _builder.default.apply("TSOptionalType", arguments);
+}
+
+function tsRestType(typeAnnotation) {
+ return _builder.default.apply("TSRestType", arguments);
+}
+
+function tsNamedTupleMember(label, elementType, optional) {
+ return _builder.default.apply("TSNamedTupleMember", arguments);
+}
+
+function tsUnionType(types) {
+ return _builder.default.apply("TSUnionType", arguments);
+}
+
+function tsIntersectionType(types) {
+ return _builder.default.apply("TSIntersectionType", arguments);
+}
+
+function tsConditionalType(checkType, extendsType, trueType, falseType) {
+ return _builder.default.apply("TSConditionalType", arguments);
+}
+
+function tsInferType(typeParameter) {
+ return _builder.default.apply("TSInferType", arguments);
+}
+
+function tsParenthesizedType(typeAnnotation) {
+ return _builder.default.apply("TSParenthesizedType", arguments);
+}
+
+function tsTypeOperator(typeAnnotation) {
+ return _builder.default.apply("TSTypeOperator", arguments);
+}
+
+function tsIndexedAccessType(objectType, indexType) {
+ return _builder.default.apply("TSIndexedAccessType", arguments);
+}
+
+function tsMappedType(typeParameter, typeAnnotation, nameType) {
+ return _builder.default.apply("TSMappedType", arguments);
+}
+
+function tsLiteralType(literal) {
+ return _builder.default.apply("TSLiteralType", arguments);
+}
+
+function tsExpressionWithTypeArguments(expression, typeParameters) {
+ return _builder.default.apply("TSExpressionWithTypeArguments", arguments);
+}
+
+function tsInterfaceDeclaration(id, typeParameters, _extends, body) {
+ return _builder.default.apply("TSInterfaceDeclaration", arguments);
+}
+
+function tsInterfaceBody(body) {
+ return _builder.default.apply("TSInterfaceBody", arguments);
+}
+
+function tsTypeAliasDeclaration(id, typeParameters, typeAnnotation) {
+ return _builder.default.apply("TSTypeAliasDeclaration", arguments);
+}
+
+function tsAsExpression(expression, typeAnnotation) {
+ return _builder.default.apply("TSAsExpression", arguments);
+}
+
+function tsTypeAssertion(typeAnnotation, expression) {
+ return _builder.default.apply("TSTypeAssertion", arguments);
+}
+
+function tsEnumDeclaration(id, members) {
+ return _builder.default.apply("TSEnumDeclaration", arguments);
+}
+
+function tsEnumMember(id, initializer) {
+ return _builder.default.apply("TSEnumMember", arguments);
+}
+
+function tsModuleDeclaration(id, body) {
+ return _builder.default.apply("TSModuleDeclaration", arguments);
+}
+
+function tsModuleBlock(body) {
+ return _builder.default.apply("TSModuleBlock", arguments);
+}
+
+function tsImportType(argument, qualifier, typeParameters) {
+ return _builder.default.apply("TSImportType", arguments);
+}
+
+function tsImportEqualsDeclaration(id, moduleReference) {
+ return _builder.default.apply("TSImportEqualsDeclaration", arguments);
+}
+
+function tsExternalModuleReference(expression) {
+ return _builder.default.apply("TSExternalModuleReference", arguments);
+}
+
+function tsNonNullExpression(expression) {
+ return _builder.default.apply("TSNonNullExpression", arguments);
+}
+
+function tsExportAssignment(expression) {
+ return _builder.default.apply("TSExportAssignment", arguments);
+}
+
+function tsNamespaceExportDeclaration(id) {
+ return _builder.default.apply("TSNamespaceExportDeclaration", arguments);
+}
+
+function tsTypeAnnotation(typeAnnotation) {
+ return _builder.default.apply("TSTypeAnnotation", arguments);
+}
+
+function tsTypeParameterInstantiation(params) {
+ return _builder.default.apply("TSTypeParameterInstantiation", arguments);
+}
+
+function tsTypeParameterDeclaration(params) {
+ return _builder.default.apply("TSTypeParameterDeclaration", arguments);
+}
+
+function tsTypeParameter(constraint, _default, name) {
+ return _builder.default.apply("TSTypeParameter", arguments);
+}
+
+function NumberLiteral(value) {
+ console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
+ return _builder.default.apply("NumberLiteral", arguments);
+}
+
+function RegexLiteral(pattern, flags) {
+ console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
+ return _builder.default.apply("RegexLiteral", arguments);
+}
+
+function RestProperty(argument) {
+ console.trace("The node type RestProperty has been renamed to RestElement");
+ return _builder.default.apply("RestProperty", arguments);
+}
+
+function SpreadProperty(argument) {
+ console.trace("The node type SpreadProperty has been renamed to SpreadElement");
+ return _builder.default.apply("SpreadProperty", arguments);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/builders/generated/uppercase.js b/node_modules/@babel/types/lib/builders/generated/uppercase.js
new file mode 100644
index 0000000..95c9a52
--- /dev/null
+++ b/node_modules/@babel/types/lib/builders/generated/uppercase.js
@@ -0,0 +1,1513 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "AnyTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.anyTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "ArgumentPlaceholder", {
+ enumerable: true,
+ get: function () {
+ return _index.argumentPlaceholder;
+ }
+});
+Object.defineProperty(exports, "ArrayExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.arrayExpression;
+ }
+});
+Object.defineProperty(exports, "ArrayPattern", {
+ enumerable: true,
+ get: function () {
+ return _index.arrayPattern;
+ }
+});
+Object.defineProperty(exports, "ArrayTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.arrayTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "ArrowFunctionExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.arrowFunctionExpression;
+ }
+});
+Object.defineProperty(exports, "AssignmentExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.assignmentExpression;
+ }
+});
+Object.defineProperty(exports, "AssignmentPattern", {
+ enumerable: true,
+ get: function () {
+ return _index.assignmentPattern;
+ }
+});
+Object.defineProperty(exports, "AwaitExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.awaitExpression;
+ }
+});
+Object.defineProperty(exports, "BigIntLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.bigIntLiteral;
+ }
+});
+Object.defineProperty(exports, "BinaryExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.binaryExpression;
+ }
+});
+Object.defineProperty(exports, "BindExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.bindExpression;
+ }
+});
+Object.defineProperty(exports, "BlockStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.blockStatement;
+ }
+});
+Object.defineProperty(exports, "BooleanLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.booleanLiteral;
+ }
+});
+Object.defineProperty(exports, "BooleanLiteralTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.booleanLiteralTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "BooleanTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.booleanTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "BreakStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.breakStatement;
+ }
+});
+Object.defineProperty(exports, "CallExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.callExpression;
+ }
+});
+Object.defineProperty(exports, "CatchClause", {
+ enumerable: true,
+ get: function () {
+ return _index.catchClause;
+ }
+});
+Object.defineProperty(exports, "ClassAccessorProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.classAccessorProperty;
+ }
+});
+Object.defineProperty(exports, "ClassBody", {
+ enumerable: true,
+ get: function () {
+ return _index.classBody;
+ }
+});
+Object.defineProperty(exports, "ClassDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.classDeclaration;
+ }
+});
+Object.defineProperty(exports, "ClassExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.classExpression;
+ }
+});
+Object.defineProperty(exports, "ClassImplements", {
+ enumerable: true,
+ get: function () {
+ return _index.classImplements;
+ }
+});
+Object.defineProperty(exports, "ClassMethod", {
+ enumerable: true,
+ get: function () {
+ return _index.classMethod;
+ }
+});
+Object.defineProperty(exports, "ClassPrivateMethod", {
+ enumerable: true,
+ get: function () {
+ return _index.classPrivateMethod;
+ }
+});
+Object.defineProperty(exports, "ClassPrivateProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.classPrivateProperty;
+ }
+});
+Object.defineProperty(exports, "ClassProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.classProperty;
+ }
+});
+Object.defineProperty(exports, "ConditionalExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.conditionalExpression;
+ }
+});
+Object.defineProperty(exports, "ContinueStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.continueStatement;
+ }
+});
+Object.defineProperty(exports, "DebuggerStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.debuggerStatement;
+ }
+});
+Object.defineProperty(exports, "DecimalLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.decimalLiteral;
+ }
+});
+Object.defineProperty(exports, "DeclareClass", {
+ enumerable: true,
+ get: function () {
+ return _index.declareClass;
+ }
+});
+Object.defineProperty(exports, "DeclareExportAllDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.declareExportAllDeclaration;
+ }
+});
+Object.defineProperty(exports, "DeclareExportDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.declareExportDeclaration;
+ }
+});
+Object.defineProperty(exports, "DeclareFunction", {
+ enumerable: true,
+ get: function () {
+ return _index.declareFunction;
+ }
+});
+Object.defineProperty(exports, "DeclareInterface", {
+ enumerable: true,
+ get: function () {
+ return _index.declareInterface;
+ }
+});
+Object.defineProperty(exports, "DeclareModule", {
+ enumerable: true,
+ get: function () {
+ return _index.declareModule;
+ }
+});
+Object.defineProperty(exports, "DeclareModuleExports", {
+ enumerable: true,
+ get: function () {
+ return _index.declareModuleExports;
+ }
+});
+Object.defineProperty(exports, "DeclareOpaqueType", {
+ enumerable: true,
+ get: function () {
+ return _index.declareOpaqueType;
+ }
+});
+Object.defineProperty(exports, "DeclareTypeAlias", {
+ enumerable: true,
+ get: function () {
+ return _index.declareTypeAlias;
+ }
+});
+Object.defineProperty(exports, "DeclareVariable", {
+ enumerable: true,
+ get: function () {
+ return _index.declareVariable;
+ }
+});
+Object.defineProperty(exports, "DeclaredPredicate", {
+ enumerable: true,
+ get: function () {
+ return _index.declaredPredicate;
+ }
+});
+Object.defineProperty(exports, "Decorator", {
+ enumerable: true,
+ get: function () {
+ return _index.decorator;
+ }
+});
+Object.defineProperty(exports, "Directive", {
+ enumerable: true,
+ get: function () {
+ return _index.directive;
+ }
+});
+Object.defineProperty(exports, "DirectiveLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.directiveLiteral;
+ }
+});
+Object.defineProperty(exports, "DoExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.doExpression;
+ }
+});
+Object.defineProperty(exports, "DoWhileStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.doWhileStatement;
+ }
+});
+Object.defineProperty(exports, "EmptyStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.emptyStatement;
+ }
+});
+Object.defineProperty(exports, "EmptyTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.emptyTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "EnumBooleanBody", {
+ enumerable: true,
+ get: function () {
+ return _index.enumBooleanBody;
+ }
+});
+Object.defineProperty(exports, "EnumBooleanMember", {
+ enumerable: true,
+ get: function () {
+ return _index.enumBooleanMember;
+ }
+});
+Object.defineProperty(exports, "EnumDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.enumDeclaration;
+ }
+});
+Object.defineProperty(exports, "EnumDefaultedMember", {
+ enumerable: true,
+ get: function () {
+ return _index.enumDefaultedMember;
+ }
+});
+Object.defineProperty(exports, "EnumNumberBody", {
+ enumerable: true,
+ get: function () {
+ return _index.enumNumberBody;
+ }
+});
+Object.defineProperty(exports, "EnumNumberMember", {
+ enumerable: true,
+ get: function () {
+ return _index.enumNumberMember;
+ }
+});
+Object.defineProperty(exports, "EnumStringBody", {
+ enumerable: true,
+ get: function () {
+ return _index.enumStringBody;
+ }
+});
+Object.defineProperty(exports, "EnumStringMember", {
+ enumerable: true,
+ get: function () {
+ return _index.enumStringMember;
+ }
+});
+Object.defineProperty(exports, "EnumSymbolBody", {
+ enumerable: true,
+ get: function () {
+ return _index.enumSymbolBody;
+ }
+});
+Object.defineProperty(exports, "ExistsTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.existsTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "ExportAllDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.exportAllDeclaration;
+ }
+});
+Object.defineProperty(exports, "ExportDefaultDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.exportDefaultDeclaration;
+ }
+});
+Object.defineProperty(exports, "ExportDefaultSpecifier", {
+ enumerable: true,
+ get: function () {
+ return _index.exportDefaultSpecifier;
+ }
+});
+Object.defineProperty(exports, "ExportNamedDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.exportNamedDeclaration;
+ }
+});
+Object.defineProperty(exports, "ExportNamespaceSpecifier", {
+ enumerable: true,
+ get: function () {
+ return _index.exportNamespaceSpecifier;
+ }
+});
+Object.defineProperty(exports, "ExportSpecifier", {
+ enumerable: true,
+ get: function () {
+ return _index.exportSpecifier;
+ }
+});
+Object.defineProperty(exports, "ExpressionStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.expressionStatement;
+ }
+});
+Object.defineProperty(exports, "File", {
+ enumerable: true,
+ get: function () {
+ return _index.file;
+ }
+});
+Object.defineProperty(exports, "ForInStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.forInStatement;
+ }
+});
+Object.defineProperty(exports, "ForOfStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.forOfStatement;
+ }
+});
+Object.defineProperty(exports, "ForStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.forStatement;
+ }
+});
+Object.defineProperty(exports, "FunctionDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.functionDeclaration;
+ }
+});
+Object.defineProperty(exports, "FunctionExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.functionExpression;
+ }
+});
+Object.defineProperty(exports, "FunctionTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.functionTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "FunctionTypeParam", {
+ enumerable: true,
+ get: function () {
+ return _index.functionTypeParam;
+ }
+});
+Object.defineProperty(exports, "GenericTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.genericTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "Identifier", {
+ enumerable: true,
+ get: function () {
+ return _index.identifier;
+ }
+});
+Object.defineProperty(exports, "IfStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.ifStatement;
+ }
+});
+Object.defineProperty(exports, "Import", {
+ enumerable: true,
+ get: function () {
+ return _index.import;
+ }
+});
+Object.defineProperty(exports, "ImportAttribute", {
+ enumerable: true,
+ get: function () {
+ return _index.importAttribute;
+ }
+});
+Object.defineProperty(exports, "ImportDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.importDeclaration;
+ }
+});
+Object.defineProperty(exports, "ImportDefaultSpecifier", {
+ enumerable: true,
+ get: function () {
+ return _index.importDefaultSpecifier;
+ }
+});
+Object.defineProperty(exports, "ImportNamespaceSpecifier", {
+ enumerable: true,
+ get: function () {
+ return _index.importNamespaceSpecifier;
+ }
+});
+Object.defineProperty(exports, "ImportSpecifier", {
+ enumerable: true,
+ get: function () {
+ return _index.importSpecifier;
+ }
+});
+Object.defineProperty(exports, "IndexedAccessType", {
+ enumerable: true,
+ get: function () {
+ return _index.indexedAccessType;
+ }
+});
+Object.defineProperty(exports, "InferredPredicate", {
+ enumerable: true,
+ get: function () {
+ return _index.inferredPredicate;
+ }
+});
+Object.defineProperty(exports, "InterfaceDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.interfaceDeclaration;
+ }
+});
+Object.defineProperty(exports, "InterfaceExtends", {
+ enumerable: true,
+ get: function () {
+ return _index.interfaceExtends;
+ }
+});
+Object.defineProperty(exports, "InterfaceTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.interfaceTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "InterpreterDirective", {
+ enumerable: true,
+ get: function () {
+ return _index.interpreterDirective;
+ }
+});
+Object.defineProperty(exports, "IntersectionTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.intersectionTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "JSXAttribute", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxAttribute;
+ }
+});
+Object.defineProperty(exports, "JSXClosingElement", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxClosingElement;
+ }
+});
+Object.defineProperty(exports, "JSXClosingFragment", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxClosingFragment;
+ }
+});
+Object.defineProperty(exports, "JSXElement", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxElement;
+ }
+});
+Object.defineProperty(exports, "JSXEmptyExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxEmptyExpression;
+ }
+});
+Object.defineProperty(exports, "JSXExpressionContainer", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxExpressionContainer;
+ }
+});
+Object.defineProperty(exports, "JSXFragment", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxFragment;
+ }
+});
+Object.defineProperty(exports, "JSXIdentifier", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxIdentifier;
+ }
+});
+Object.defineProperty(exports, "JSXMemberExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxMemberExpression;
+ }
+});
+Object.defineProperty(exports, "JSXNamespacedName", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxNamespacedName;
+ }
+});
+Object.defineProperty(exports, "JSXOpeningElement", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxOpeningElement;
+ }
+});
+Object.defineProperty(exports, "JSXOpeningFragment", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxOpeningFragment;
+ }
+});
+Object.defineProperty(exports, "JSXSpreadAttribute", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxSpreadAttribute;
+ }
+});
+Object.defineProperty(exports, "JSXSpreadChild", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxSpreadChild;
+ }
+});
+Object.defineProperty(exports, "JSXText", {
+ enumerable: true,
+ get: function () {
+ return _index.jsxText;
+ }
+});
+Object.defineProperty(exports, "LabeledStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.labeledStatement;
+ }
+});
+Object.defineProperty(exports, "LogicalExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.logicalExpression;
+ }
+});
+Object.defineProperty(exports, "MemberExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.memberExpression;
+ }
+});
+Object.defineProperty(exports, "MetaProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.metaProperty;
+ }
+});
+Object.defineProperty(exports, "MixedTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.mixedTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "ModuleExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.moduleExpression;
+ }
+});
+Object.defineProperty(exports, "NewExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.newExpression;
+ }
+});
+Object.defineProperty(exports, "Noop", {
+ enumerable: true,
+ get: function () {
+ return _index.noop;
+ }
+});
+Object.defineProperty(exports, "NullLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.nullLiteral;
+ }
+});
+Object.defineProperty(exports, "NullLiteralTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.nullLiteralTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "NullableTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.nullableTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "NumberLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.numberLiteral;
+ }
+});
+Object.defineProperty(exports, "NumberLiteralTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.numberLiteralTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "NumberTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.numberTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "NumericLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.numericLiteral;
+ }
+});
+Object.defineProperty(exports, "ObjectExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.objectExpression;
+ }
+});
+Object.defineProperty(exports, "ObjectMethod", {
+ enumerable: true,
+ get: function () {
+ return _index.objectMethod;
+ }
+});
+Object.defineProperty(exports, "ObjectPattern", {
+ enumerable: true,
+ get: function () {
+ return _index.objectPattern;
+ }
+});
+Object.defineProperty(exports, "ObjectProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.objectProperty;
+ }
+});
+Object.defineProperty(exports, "ObjectTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.objectTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "ObjectTypeCallProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.objectTypeCallProperty;
+ }
+});
+Object.defineProperty(exports, "ObjectTypeIndexer", {
+ enumerable: true,
+ get: function () {
+ return _index.objectTypeIndexer;
+ }
+});
+Object.defineProperty(exports, "ObjectTypeInternalSlot", {
+ enumerable: true,
+ get: function () {
+ return _index.objectTypeInternalSlot;
+ }
+});
+Object.defineProperty(exports, "ObjectTypeProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.objectTypeProperty;
+ }
+});
+Object.defineProperty(exports, "ObjectTypeSpreadProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.objectTypeSpreadProperty;
+ }
+});
+Object.defineProperty(exports, "OpaqueType", {
+ enumerable: true,
+ get: function () {
+ return _index.opaqueType;
+ }
+});
+Object.defineProperty(exports, "OptionalCallExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.optionalCallExpression;
+ }
+});
+Object.defineProperty(exports, "OptionalIndexedAccessType", {
+ enumerable: true,
+ get: function () {
+ return _index.optionalIndexedAccessType;
+ }
+});
+Object.defineProperty(exports, "OptionalMemberExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.optionalMemberExpression;
+ }
+});
+Object.defineProperty(exports, "ParenthesizedExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.parenthesizedExpression;
+ }
+});
+Object.defineProperty(exports, "PipelineBareFunction", {
+ enumerable: true,
+ get: function () {
+ return _index.pipelineBareFunction;
+ }
+});
+Object.defineProperty(exports, "PipelinePrimaryTopicReference", {
+ enumerable: true,
+ get: function () {
+ return _index.pipelinePrimaryTopicReference;
+ }
+});
+Object.defineProperty(exports, "PipelineTopicExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.pipelineTopicExpression;
+ }
+});
+Object.defineProperty(exports, "Placeholder", {
+ enumerable: true,
+ get: function () {
+ return _index.placeholder;
+ }
+});
+Object.defineProperty(exports, "PrivateName", {
+ enumerable: true,
+ get: function () {
+ return _index.privateName;
+ }
+});
+Object.defineProperty(exports, "Program", {
+ enumerable: true,
+ get: function () {
+ return _index.program;
+ }
+});
+Object.defineProperty(exports, "QualifiedTypeIdentifier", {
+ enumerable: true,
+ get: function () {
+ return _index.qualifiedTypeIdentifier;
+ }
+});
+Object.defineProperty(exports, "RecordExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.recordExpression;
+ }
+});
+Object.defineProperty(exports, "RegExpLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.regExpLiteral;
+ }
+});
+Object.defineProperty(exports, "RegexLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.regexLiteral;
+ }
+});
+Object.defineProperty(exports, "RestElement", {
+ enumerable: true,
+ get: function () {
+ return _index.restElement;
+ }
+});
+Object.defineProperty(exports, "RestProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.restProperty;
+ }
+});
+Object.defineProperty(exports, "ReturnStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.returnStatement;
+ }
+});
+Object.defineProperty(exports, "SequenceExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.sequenceExpression;
+ }
+});
+Object.defineProperty(exports, "SpreadElement", {
+ enumerable: true,
+ get: function () {
+ return _index.spreadElement;
+ }
+});
+Object.defineProperty(exports, "SpreadProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.spreadProperty;
+ }
+});
+Object.defineProperty(exports, "StaticBlock", {
+ enumerable: true,
+ get: function () {
+ return _index.staticBlock;
+ }
+});
+Object.defineProperty(exports, "StringLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.stringLiteral;
+ }
+});
+Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.stringLiteralTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "StringTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.stringTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "Super", {
+ enumerable: true,
+ get: function () {
+ return _index.super;
+ }
+});
+Object.defineProperty(exports, "SwitchCase", {
+ enumerable: true,
+ get: function () {
+ return _index.switchCase;
+ }
+});
+Object.defineProperty(exports, "SwitchStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.switchStatement;
+ }
+});
+Object.defineProperty(exports, "SymbolTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.symbolTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "TSAnyKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsAnyKeyword;
+ }
+});
+Object.defineProperty(exports, "TSArrayType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsArrayType;
+ }
+});
+Object.defineProperty(exports, "TSAsExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.tsAsExpression;
+ }
+});
+Object.defineProperty(exports, "TSBigIntKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsBigIntKeyword;
+ }
+});
+Object.defineProperty(exports, "TSBooleanKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsBooleanKeyword;
+ }
+});
+Object.defineProperty(exports, "TSCallSignatureDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.tsCallSignatureDeclaration;
+ }
+});
+Object.defineProperty(exports, "TSConditionalType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsConditionalType;
+ }
+});
+Object.defineProperty(exports, "TSConstructSignatureDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.tsConstructSignatureDeclaration;
+ }
+});
+Object.defineProperty(exports, "TSConstructorType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsConstructorType;
+ }
+});
+Object.defineProperty(exports, "TSDeclareFunction", {
+ enumerable: true,
+ get: function () {
+ return _index.tsDeclareFunction;
+ }
+});
+Object.defineProperty(exports, "TSDeclareMethod", {
+ enumerable: true,
+ get: function () {
+ return _index.tsDeclareMethod;
+ }
+});
+Object.defineProperty(exports, "TSEnumDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.tsEnumDeclaration;
+ }
+});
+Object.defineProperty(exports, "TSEnumMember", {
+ enumerable: true,
+ get: function () {
+ return _index.tsEnumMember;
+ }
+});
+Object.defineProperty(exports, "TSExportAssignment", {
+ enumerable: true,
+ get: function () {
+ return _index.tsExportAssignment;
+ }
+});
+Object.defineProperty(exports, "TSExpressionWithTypeArguments", {
+ enumerable: true,
+ get: function () {
+ return _index.tsExpressionWithTypeArguments;
+ }
+});
+Object.defineProperty(exports, "TSExternalModuleReference", {
+ enumerable: true,
+ get: function () {
+ return _index.tsExternalModuleReference;
+ }
+});
+Object.defineProperty(exports, "TSFunctionType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsFunctionType;
+ }
+});
+Object.defineProperty(exports, "TSImportEqualsDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.tsImportEqualsDeclaration;
+ }
+});
+Object.defineProperty(exports, "TSImportType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsImportType;
+ }
+});
+Object.defineProperty(exports, "TSIndexSignature", {
+ enumerable: true,
+ get: function () {
+ return _index.tsIndexSignature;
+ }
+});
+Object.defineProperty(exports, "TSIndexedAccessType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsIndexedAccessType;
+ }
+});
+Object.defineProperty(exports, "TSInferType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsInferType;
+ }
+});
+Object.defineProperty(exports, "TSInterfaceBody", {
+ enumerable: true,
+ get: function () {
+ return _index.tsInterfaceBody;
+ }
+});
+Object.defineProperty(exports, "TSInterfaceDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.tsInterfaceDeclaration;
+ }
+});
+Object.defineProperty(exports, "TSIntersectionType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsIntersectionType;
+ }
+});
+Object.defineProperty(exports, "TSIntrinsicKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsIntrinsicKeyword;
+ }
+});
+Object.defineProperty(exports, "TSLiteralType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsLiteralType;
+ }
+});
+Object.defineProperty(exports, "TSMappedType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsMappedType;
+ }
+});
+Object.defineProperty(exports, "TSMethodSignature", {
+ enumerable: true,
+ get: function () {
+ return _index.tsMethodSignature;
+ }
+});
+Object.defineProperty(exports, "TSModuleBlock", {
+ enumerable: true,
+ get: function () {
+ return _index.tsModuleBlock;
+ }
+});
+Object.defineProperty(exports, "TSModuleDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.tsModuleDeclaration;
+ }
+});
+Object.defineProperty(exports, "TSNamedTupleMember", {
+ enumerable: true,
+ get: function () {
+ return _index.tsNamedTupleMember;
+ }
+});
+Object.defineProperty(exports, "TSNamespaceExportDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.tsNamespaceExportDeclaration;
+ }
+});
+Object.defineProperty(exports, "TSNeverKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsNeverKeyword;
+ }
+});
+Object.defineProperty(exports, "TSNonNullExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.tsNonNullExpression;
+ }
+});
+Object.defineProperty(exports, "TSNullKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsNullKeyword;
+ }
+});
+Object.defineProperty(exports, "TSNumberKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsNumberKeyword;
+ }
+});
+Object.defineProperty(exports, "TSObjectKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsObjectKeyword;
+ }
+});
+Object.defineProperty(exports, "TSOptionalType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsOptionalType;
+ }
+});
+Object.defineProperty(exports, "TSParameterProperty", {
+ enumerable: true,
+ get: function () {
+ return _index.tsParameterProperty;
+ }
+});
+Object.defineProperty(exports, "TSParenthesizedType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsParenthesizedType;
+ }
+});
+Object.defineProperty(exports, "TSPropertySignature", {
+ enumerable: true,
+ get: function () {
+ return _index.tsPropertySignature;
+ }
+});
+Object.defineProperty(exports, "TSQualifiedName", {
+ enumerable: true,
+ get: function () {
+ return _index.tsQualifiedName;
+ }
+});
+Object.defineProperty(exports, "TSRestType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsRestType;
+ }
+});
+Object.defineProperty(exports, "TSStringKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsStringKeyword;
+ }
+});
+Object.defineProperty(exports, "TSSymbolKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsSymbolKeyword;
+ }
+});
+Object.defineProperty(exports, "TSThisType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsThisType;
+ }
+});
+Object.defineProperty(exports, "TSTupleType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTupleType;
+ }
+});
+Object.defineProperty(exports, "TSTypeAliasDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypeAliasDeclaration;
+ }
+});
+Object.defineProperty(exports, "TSTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "TSTypeAssertion", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypeAssertion;
+ }
+});
+Object.defineProperty(exports, "TSTypeLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypeLiteral;
+ }
+});
+Object.defineProperty(exports, "TSTypeOperator", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypeOperator;
+ }
+});
+Object.defineProperty(exports, "TSTypeParameter", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypeParameter;
+ }
+});
+Object.defineProperty(exports, "TSTypeParameterDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypeParameterDeclaration;
+ }
+});
+Object.defineProperty(exports, "TSTypeParameterInstantiation", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypeParameterInstantiation;
+ }
+});
+Object.defineProperty(exports, "TSTypePredicate", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypePredicate;
+ }
+});
+Object.defineProperty(exports, "TSTypeQuery", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypeQuery;
+ }
+});
+Object.defineProperty(exports, "TSTypeReference", {
+ enumerable: true,
+ get: function () {
+ return _index.tsTypeReference;
+ }
+});
+Object.defineProperty(exports, "TSUndefinedKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsUndefinedKeyword;
+ }
+});
+Object.defineProperty(exports, "TSUnionType", {
+ enumerable: true,
+ get: function () {
+ return _index.tsUnionType;
+ }
+});
+Object.defineProperty(exports, "TSUnknownKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsUnknownKeyword;
+ }
+});
+Object.defineProperty(exports, "TSVoidKeyword", {
+ enumerable: true,
+ get: function () {
+ return _index.tsVoidKeyword;
+ }
+});
+Object.defineProperty(exports, "TaggedTemplateExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.taggedTemplateExpression;
+ }
+});
+Object.defineProperty(exports, "TemplateElement", {
+ enumerable: true,
+ get: function () {
+ return _index.templateElement;
+ }
+});
+Object.defineProperty(exports, "TemplateLiteral", {
+ enumerable: true,
+ get: function () {
+ return _index.templateLiteral;
+ }
+});
+Object.defineProperty(exports, "ThisExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.thisExpression;
+ }
+});
+Object.defineProperty(exports, "ThisTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.thisTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "ThrowStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.throwStatement;
+ }
+});
+Object.defineProperty(exports, "TopicReference", {
+ enumerable: true,
+ get: function () {
+ return _index.topicReference;
+ }
+});
+Object.defineProperty(exports, "TryStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.tryStatement;
+ }
+});
+Object.defineProperty(exports, "TupleExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.tupleExpression;
+ }
+});
+Object.defineProperty(exports, "TupleTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.tupleTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "TypeAlias", {
+ enumerable: true,
+ get: function () {
+ return _index.typeAlias;
+ }
+});
+Object.defineProperty(exports, "TypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.typeAnnotation;
+ }
+});
+Object.defineProperty(exports, "TypeCastExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.typeCastExpression;
+ }
+});
+Object.defineProperty(exports, "TypeParameter", {
+ enumerable: true,
+ get: function () {
+ return _index.typeParameter;
+ }
+});
+Object.defineProperty(exports, "TypeParameterDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.typeParameterDeclaration;
+ }
+});
+Object.defineProperty(exports, "TypeParameterInstantiation", {
+ enumerable: true,
+ get: function () {
+ return _index.typeParameterInstantiation;
+ }
+});
+Object.defineProperty(exports, "TypeofTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.typeofTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "UnaryExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.unaryExpression;
+ }
+});
+Object.defineProperty(exports, "UnionTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.unionTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "UpdateExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.updateExpression;
+ }
+});
+Object.defineProperty(exports, "V8IntrinsicIdentifier", {
+ enumerable: true,
+ get: function () {
+ return _index.v8IntrinsicIdentifier;
+ }
+});
+Object.defineProperty(exports, "VariableDeclaration", {
+ enumerable: true,
+ get: function () {
+ return _index.variableDeclaration;
+ }
+});
+Object.defineProperty(exports, "VariableDeclarator", {
+ enumerable: true,
+ get: function () {
+ return _index.variableDeclarator;
+ }
+});
+Object.defineProperty(exports, "Variance", {
+ enumerable: true,
+ get: function () {
+ return _index.variance;
+ }
+});
+Object.defineProperty(exports, "VoidTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _index.voidTypeAnnotation;
+ }
+});
+Object.defineProperty(exports, "WhileStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.whileStatement;
+ }
+});
+Object.defineProperty(exports, "WithStatement", {
+ enumerable: true,
+ get: function () {
+ return _index.withStatement;
+ }
+});
+Object.defineProperty(exports, "YieldExpression", {
+ enumerable: true,
+ get: function () {
+ return _index.yieldExpression;
+ }
+});
+
+var _index = require("./index"); \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/builders/react/buildChildren.js b/node_modules/@babel/types/lib/builders/react/buildChildren.js
new file mode 100644
index 0000000..20a194b
--- /dev/null
+++ b/node_modules/@babel/types/lib/builders/react/buildChildren.js
@@ -0,0 +1,29 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = buildChildren;
+
+var _generated = require("../../validators/generated");
+
+var _cleanJSXElementLiteralChild = require("../../utils/react/cleanJSXElementLiteralChild");
+
+function buildChildren(node) {
+ const elements = [];
+
+ for (let i = 0; i < node.children.length; i++) {
+ let child = node.children[i];
+
+ if ((0, _generated.isJSXText)(child)) {
+ (0, _cleanJSXElementLiteralChild.default)(child, elements);
+ continue;
+ }
+
+ if ((0, _generated.isJSXExpressionContainer)(child)) child = child.expression;
+ if ((0, _generated.isJSXEmptyExpression)(child)) continue;
+ elements.push(child);
+ }
+
+ return elements;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js b/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
new file mode 100644
index 0000000..9b53be2
--- /dev/null
+++ b/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
@@ -0,0 +1,21 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = createTSUnionType;
+
+var _generated = require("../generated");
+
+var _removeTypeDuplicates = require("../../modifications/typescript/removeTypeDuplicates");
+
+function createTSUnionType(typeAnnotations) {
+ const types = typeAnnotations.map(type => type.typeAnnotation);
+ const flattened = (0, _removeTypeDuplicates.default)(types);
+
+ if (flattened.length === 1) {
+ return flattened[0];
+ } else {
+ return (0, _generated.tsUnionType)(flattened);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/clone/clone.js b/node_modules/@babel/types/lib/clone/clone.js
new file mode 100644
index 0000000..e262c63
--- /dev/null
+++ b/node_modules/@babel/types/lib/clone/clone.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = clone;
+
+var _cloneNode = require("./cloneNode");
+
+function clone(node) {
+ return (0, _cloneNode.default)(node, false);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/clone/cloneDeep.js b/node_modules/@babel/types/lib/clone/cloneDeep.js
new file mode 100644
index 0000000..9067e7b
--- /dev/null
+++ b/node_modules/@babel/types/lib/clone/cloneDeep.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cloneDeep;
+
+var _cloneNode = require("./cloneNode");
+
+function cloneDeep(node) {
+ return (0, _cloneNode.default)(node);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js b/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
new file mode 100644
index 0000000..a8c53dd
--- /dev/null
+++ b/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cloneDeepWithoutLoc;
+
+var _cloneNode = require("./cloneNode");
+
+function cloneDeepWithoutLoc(node) {
+ return (0, _cloneNode.default)(node, true, true);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/clone/cloneNode.js b/node_modules/@babel/types/lib/clone/cloneNode.js
new file mode 100644
index 0000000..5980f2d
--- /dev/null
+++ b/node_modules/@babel/types/lib/clone/cloneNode.js
@@ -0,0 +1,114 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cloneNode;
+
+var _definitions = require("../definitions");
+
+var _generated = require("../validators/generated");
+
+const has = Function.call.bind(Object.prototype.hasOwnProperty);
+
+function cloneIfNode(obj, deep, withoutLoc) {
+ if (obj && typeof obj.type === "string") {
+ return cloneNode(obj, deep, withoutLoc);
+ }
+
+ return obj;
+}
+
+function cloneIfNodeOrArray(obj, deep, withoutLoc) {
+ if (Array.isArray(obj)) {
+ return obj.map(node => cloneIfNode(node, deep, withoutLoc));
+ }
+
+ return cloneIfNode(obj, deep, withoutLoc);
+}
+
+function cloneNode(node, deep = true, withoutLoc = false) {
+ if (!node) return node;
+ const {
+ type
+ } = node;
+ const newNode = {
+ type: node.type
+ };
+
+ if ((0, _generated.isIdentifier)(node)) {
+ newNode.name = node.name;
+
+ if (has(node, "optional") && typeof node.optional === "boolean") {
+ newNode.optional = node.optional;
+ }
+
+ if (has(node, "typeAnnotation")) {
+ newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;
+ }
+ } else if (!has(_definitions.NODE_FIELDS, type)) {
+ throw new Error(`Unknown node type: "${type}"`);
+ } else {
+ for (const field of Object.keys(_definitions.NODE_FIELDS[type])) {
+ if (has(node, field)) {
+ if (deep) {
+ newNode[field] = (0, _generated.isFile)(node) && field === "comments" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);
+ } else {
+ newNode[field] = node[field];
+ }
+ }
+ }
+ }
+
+ if (has(node, "loc")) {
+ if (withoutLoc) {
+ newNode.loc = null;
+ } else {
+ newNode.loc = node.loc;
+ }
+ }
+
+ if (has(node, "leadingComments")) {
+ newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);
+ }
+
+ if (has(node, "innerComments")) {
+ newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);
+ }
+
+ if (has(node, "trailingComments")) {
+ newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);
+ }
+
+ if (has(node, "extra")) {
+ newNode.extra = Object.assign({}, node.extra);
+ }
+
+ return newNode;
+}
+
+function maybeCloneComments(comments, deep, withoutLoc) {
+ if (!comments || !deep) {
+ return comments;
+ }
+
+ return comments.map(({
+ type,
+ value,
+ loc
+ }) => {
+ if (withoutLoc) {
+ return {
+ type,
+ value,
+ loc: null
+ };
+ }
+
+ return {
+ type,
+ value,
+ loc
+ };
+ });
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js b/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
new file mode 100644
index 0000000..d0420b1
--- /dev/null
+++ b/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cloneWithoutLoc;
+
+var _cloneNode = require("./cloneNode");
+
+function cloneWithoutLoc(node) {
+ return (0, _cloneNode.default)(node, false, true);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/comments/addComment.js b/node_modules/@babel/types/lib/comments/addComment.js
new file mode 100644
index 0000000..de19ab7
--- /dev/null
+++ b/node_modules/@babel/types/lib/comments/addComment.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = addComment;
+
+var _addComments = require("./addComments");
+
+function addComment(node, type, content, line) {
+ return (0, _addComments.default)(node, type, [{
+ type: line ? "CommentLine" : "CommentBlock",
+ value: content
+ }]);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/comments/addComments.js b/node_modules/@babel/types/lib/comments/addComments.js
new file mode 100644
index 0000000..26c456f
--- /dev/null
+++ b/node_modules/@babel/types/lib/comments/addComments.js
@@ -0,0 +1,23 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = addComments;
+
+function addComments(node, type, comments) {
+ if (!comments || !node) return node;
+ const key = `${type}Comments`;
+
+ if (node[key]) {
+ if (type === "leading") {
+ node[key] = comments.concat(node[key]);
+ } else {
+ node[key].push(...comments);
+ }
+ } else {
+ node[key] = comments;
+ }
+
+ return node;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/comments/inheritInnerComments.js b/node_modules/@babel/types/lib/comments/inheritInnerComments.js
new file mode 100644
index 0000000..4b5dc9c
--- /dev/null
+++ b/node_modules/@babel/types/lib/comments/inheritInnerComments.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = inheritInnerComments;
+
+var _inherit = require("../utils/inherit");
+
+function inheritInnerComments(child, parent) {
+ (0, _inherit.default)("innerComments", child, parent);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/comments/inheritLeadingComments.js b/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
new file mode 100644
index 0000000..6aa2b25
--- /dev/null
+++ b/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = inheritLeadingComments;
+
+var _inherit = require("../utils/inherit");
+
+function inheritLeadingComments(child, parent) {
+ (0, _inherit.default)("leadingComments", child, parent);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/comments/inheritTrailingComments.js b/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
new file mode 100644
index 0000000..934ef0b
--- /dev/null
+++ b/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = inheritTrailingComments;
+
+var _inherit = require("../utils/inherit");
+
+function inheritTrailingComments(child, parent) {
+ (0, _inherit.default)("trailingComments", child, parent);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/comments/inheritsComments.js b/node_modules/@babel/types/lib/comments/inheritsComments.js
new file mode 100644
index 0000000..49476cf
--- /dev/null
+++ b/node_modules/@babel/types/lib/comments/inheritsComments.js
@@ -0,0 +1,19 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = inheritsComments;
+
+var _inheritTrailingComments = require("./inheritTrailingComments");
+
+var _inheritLeadingComments = require("./inheritLeadingComments");
+
+var _inheritInnerComments = require("./inheritInnerComments");
+
+function inheritsComments(child, parent) {
+ (0, _inheritTrailingComments.default)(child, parent);
+ (0, _inheritLeadingComments.default)(child, parent);
+ (0, _inheritInnerComments.default)(child, parent);
+ return child;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/comments/removeComments.js b/node_modules/@babel/types/lib/comments/removeComments.js
new file mode 100644
index 0000000..fe34f1a
--- /dev/null
+++ b/node_modules/@babel/types/lib/comments/removeComments.js
@@ -0,0 +1,16 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = removeComments;
+
+var _constants = require("../constants");
+
+function removeComments(node) {
+ _constants.COMMENT_KEYS.forEach(key => {
+ node[key] = null;
+ });
+
+ return node;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/constants/generated/index.js b/node_modules/@babel/types/lib/constants/generated/index.js
new file mode 100644
index 0000000..1e109e6
--- /dev/null
+++ b/node_modules/@babel/types/lib/constants/generated/index.js
@@ -0,0 +1,107 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.WHILE_TYPES = exports.USERWHITESPACABLE_TYPES = exports.UNARYLIKE_TYPES = exports.TYPESCRIPT_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.TSENTITYNAME_TYPES = exports.TSBASETYPE_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.STANDARDIZED_TYPES = exports.SCOPABLE_TYPES = exports.PUREISH_TYPES = exports.PROPERTY_TYPES = exports.PRIVATE_TYPES = exports.PATTERN_TYPES = exports.PATTERNLIKE_TYPES = exports.OBJECTMEMBER_TYPES = exports.MODULESPECIFIER_TYPES = exports.MODULEDECLARATION_TYPES = exports.MISCELLANEOUS_TYPES = exports.METHOD_TYPES = exports.LVAL_TYPES = exports.LOOP_TYPES = exports.LITERAL_TYPES = exports.JSX_TYPES = exports.IMMUTABLE_TYPES = exports.FUNCTION_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FOR_TYPES = exports.FORXSTATEMENT_TYPES = exports.FLOW_TYPES = exports.FLOWTYPE_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.EXPRESSION_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.DECLARATION_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.CLASS_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.BINARY_TYPES = exports.ACCESSOR_TYPES = void 0;
+
+var _definitions = require("../../definitions");
+
+const STANDARDIZED_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Standardized"];
+exports.STANDARDIZED_TYPES = STANDARDIZED_TYPES;
+const EXPRESSION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Expression"];
+exports.EXPRESSION_TYPES = EXPRESSION_TYPES;
+const BINARY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Binary"];
+exports.BINARY_TYPES = BINARY_TYPES;
+const SCOPABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Scopable"];
+exports.SCOPABLE_TYPES = SCOPABLE_TYPES;
+const BLOCKPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["BlockParent"];
+exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES;
+const BLOCK_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Block"];
+exports.BLOCK_TYPES = BLOCK_TYPES;
+const STATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Statement"];
+exports.STATEMENT_TYPES = STATEMENT_TYPES;
+const TERMINATORLESS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Terminatorless"];
+exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES;
+const COMPLETIONSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["CompletionStatement"];
+exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES;
+const CONDITIONAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Conditional"];
+exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES;
+const LOOP_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Loop"];
+exports.LOOP_TYPES = LOOP_TYPES;
+const WHILE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["While"];
+exports.WHILE_TYPES = WHILE_TYPES;
+const EXPRESSIONWRAPPER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExpressionWrapper"];
+exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES;
+const FOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["For"];
+exports.FOR_TYPES = FOR_TYPES;
+const FORXSTATEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ForXStatement"];
+exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES;
+const FUNCTION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Function"];
+exports.FUNCTION_TYPES = FUNCTION_TYPES;
+const FUNCTIONPARENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FunctionParent"];
+exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES;
+const PUREISH_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pureish"];
+exports.PUREISH_TYPES = PUREISH_TYPES;
+const DECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Declaration"];
+exports.DECLARATION_TYPES = DECLARATION_TYPES;
+const PATTERNLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["PatternLike"];
+exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES;
+const LVAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["LVal"];
+exports.LVAL_TYPES = LVAL_TYPES;
+const TSENTITYNAME_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSEntityName"];
+exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES;
+const LITERAL_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Literal"];
+exports.LITERAL_TYPES = LITERAL_TYPES;
+const IMMUTABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Immutable"];
+exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES;
+const USERWHITESPACABLE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UserWhitespacable"];
+exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES;
+const METHOD_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Method"];
+exports.METHOD_TYPES = METHOD_TYPES;
+const OBJECTMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ObjectMember"];
+exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES;
+const PROPERTY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Property"];
+exports.PROPERTY_TYPES = PROPERTY_TYPES;
+const UNARYLIKE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["UnaryLike"];
+exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES;
+const PATTERN_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Pattern"];
+exports.PATTERN_TYPES = PATTERN_TYPES;
+const CLASS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Class"];
+exports.CLASS_TYPES = CLASS_TYPES;
+const MODULEDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleDeclaration"];
+exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES;
+const EXPORTDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ExportDeclaration"];
+exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES;
+const MODULESPECIFIER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["ModuleSpecifier"];
+exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES;
+const ACCESSOR_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Accessor"];
+exports.ACCESSOR_TYPES = ACCESSOR_TYPES;
+const PRIVATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Private"];
+exports.PRIVATE_TYPES = PRIVATE_TYPES;
+const FLOW_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Flow"];
+exports.FLOW_TYPES = FLOW_TYPES;
+const FLOWTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowType"];
+exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES;
+const FLOWBASEANNOTATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"];
+exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES;
+const FLOWDECLARATION_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowDeclaration"];
+exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES;
+const FLOWPREDICATE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["FlowPredicate"];
+exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES;
+const ENUMBODY_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumBody"];
+exports.ENUMBODY_TYPES = ENUMBODY_TYPES;
+const ENUMMEMBER_TYPES = _definitions.FLIPPED_ALIAS_KEYS["EnumMember"];
+exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES;
+const JSX_TYPES = _definitions.FLIPPED_ALIAS_KEYS["JSX"];
+exports.JSX_TYPES = JSX_TYPES;
+const MISCELLANEOUS_TYPES = _definitions.FLIPPED_ALIAS_KEYS["Miscellaneous"];
+exports.MISCELLANEOUS_TYPES = MISCELLANEOUS_TYPES;
+const TYPESCRIPT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TypeScript"];
+exports.TYPESCRIPT_TYPES = TYPESCRIPT_TYPES;
+const TSTYPEELEMENT_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSTypeElement"];
+exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES;
+const TSTYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSType"];
+exports.TSTYPE_TYPES = TSTYPE_TYPES;
+const TSBASETYPE_TYPES = _definitions.FLIPPED_ALIAS_KEYS["TSBaseType"];
+exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES; \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/constants/index.js b/node_modules/@babel/types/lib/constants/index.js
new file mode 100644
index 0000000..3caa438
--- /dev/null
+++ b/node_modules/@babel/types/lib/constants/index.js
@@ -0,0 +1,49 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.UPDATE_OPERATORS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.STATEMENT_OR_BLOCK_KEYS = exports.NUMBER_UNARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.NOT_LOCAL_BINDING = exports.LOGICAL_OPERATORS = exports.INHERIT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.EQUALITY_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.COMMENT_KEYS = exports.BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.BLOCK_SCOPED_SYMBOL = exports.BINARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = void 0;
+const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
+exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS;
+const FLATTENABLE_KEYS = ["body", "expressions"];
+exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS;
+const FOR_INIT_KEYS = ["left", "init"];
+exports.FOR_INIT_KEYS = FOR_INIT_KEYS;
+const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"];
+exports.COMMENT_KEYS = COMMENT_KEYS;
+const LOGICAL_OPERATORS = ["||", "&&", "??"];
+exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS;
+const UPDATE_OPERATORS = ["++", "--"];
+exports.UPDATE_OPERATORS = UPDATE_OPERATORS;
+const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
+exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS;
+const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="];
+exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS;
+const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"];
+exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS;
+const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS];
+exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS;
+const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];
+exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS;
+const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS];
+exports.BINARY_OPERATORS = BINARY_OPERATORS;
+const ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map(op => op + "="), ...LOGICAL_OPERATORS.map(op => op + "=")];
+exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS;
+const BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
+exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS;
+const NUMBER_UNARY_OPERATORS = ["+", "-", "~"];
+exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS;
+const STRING_UNARY_OPERATORS = ["typeof"];
+exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS;
+const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS];
+exports.UNARY_OPERATORS = UNARY_OPERATORS;
+const INHERIT_KEYS = {
+ optional: ["typeAnnotation", "typeParameters", "returnType"],
+ force: ["start", "loc", "end"]
+};
+exports.INHERIT_KEYS = INHERIT_KEYS;
+const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
+exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL;
+const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
+exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/Scope.js b/node_modules/@babel/types/lib/converters/Scope.js
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/Scope.js
diff --git a/node_modules/@babel/types/lib/converters/ensureBlock.js b/node_modules/@babel/types/lib/converters/ensureBlock.js
new file mode 100644
index 0000000..56fdf1f
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/ensureBlock.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = ensureBlock;
+
+var _toBlock = require("./toBlock");
+
+function ensureBlock(node, key = "body") {
+ return node[key] = (0, _toBlock.default)(node[key], node);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js b/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
new file mode 100644
index 0000000..379e5ff
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
@@ -0,0 +1,75 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = gatherSequenceExpressions;
+
+var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers");
+
+var _generated = require("../validators/generated");
+
+var _generated2 = require("../builders/generated");
+
+var _cloneNode = require("../clone/cloneNode");
+
+function gatherSequenceExpressions(nodes, scope, declars) {
+ const exprs = [];
+ let ensureLastUndefined = true;
+
+ for (const node of nodes) {
+ if (!(0, _generated.isEmptyStatement)(node)) {
+ ensureLastUndefined = false;
+ }
+
+ if ((0, _generated.isExpression)(node)) {
+ exprs.push(node);
+ } else if ((0, _generated.isExpressionStatement)(node)) {
+ exprs.push(node.expression);
+ } else if ((0, _generated.isVariableDeclaration)(node)) {
+ if (node.kind !== "var") return;
+
+ for (const declar of node.declarations) {
+ const bindings = (0, _getBindingIdentifiers.default)(declar);
+
+ for (const key of Object.keys(bindings)) {
+ declars.push({
+ kind: node.kind,
+ id: (0, _cloneNode.default)(bindings[key])
+ });
+ }
+
+ if (declar.init) {
+ exprs.push((0, _generated2.assignmentExpression)("=", declar.id, declar.init));
+ }
+ }
+
+ ensureLastUndefined = true;
+ } else if ((0, _generated.isIfStatement)(node)) {
+ const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();
+ const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();
+ if (!consequent || !alternate) return;
+ exprs.push((0, _generated2.conditionalExpression)(node.test, consequent, alternate));
+ } else if ((0, _generated.isBlockStatement)(node)) {
+ const body = gatherSequenceExpressions(node.body, scope, declars);
+ if (!body) return;
+ exprs.push(body);
+ } else if ((0, _generated.isEmptyStatement)(node)) {
+ if (nodes.indexOf(node) === 0) {
+ ensureLastUndefined = true;
+ }
+ } else {
+ return;
+ }
+ }
+
+ if (ensureLastUndefined) {
+ exprs.push(scope.buildUndefinedNode());
+ }
+
+ if (exprs.length === 1) {
+ return exprs[0];
+ } else {
+ return (0, _generated2.sequenceExpression)(exprs);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js b/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
new file mode 100644
index 0000000..6bbce6e
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
@@ -0,0 +1,14 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = toBindingIdentifierName;
+
+var _toIdentifier = require("./toIdentifier");
+
+function toBindingIdentifierName(name) {
+ name = (0, _toIdentifier.default)(name);
+ if (name === "eval" || name === "arguments") name = "_" + name;
+ return name;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/toBlock.js b/node_modules/@babel/types/lib/converters/toBlock.js
new file mode 100644
index 0000000..1988683
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/toBlock.js
@@ -0,0 +1,34 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = toBlock;
+
+var _generated = require("../validators/generated");
+
+var _generated2 = require("../builders/generated");
+
+function toBlock(node, parent) {
+ if ((0, _generated.isBlockStatement)(node)) {
+ return node;
+ }
+
+ let blockNodes = [];
+
+ if ((0, _generated.isEmptyStatement)(node)) {
+ blockNodes = [];
+ } else {
+ if (!(0, _generated.isStatement)(node)) {
+ if ((0, _generated.isFunction)(parent)) {
+ node = (0, _generated2.returnStatement)(node);
+ } else {
+ node = (0, _generated2.expressionStatement)(node);
+ }
+ }
+
+ blockNodes = [node];
+ }
+
+ return (0, _generated2.blockStatement)(blockNodes);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/toComputedKey.js b/node_modules/@babel/types/lib/converters/toComputedKey.js
new file mode 100644
index 0000000..31e6770
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/toComputedKey.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = toComputedKey;
+
+var _generated = require("../validators/generated");
+
+var _generated2 = require("../builders/generated");
+
+function toComputedKey(node, key = node.key || node.property) {
+ if (!node.computed && (0, _generated.isIdentifier)(key)) key = (0, _generated2.stringLiteral)(key.name);
+ return key;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/toExpression.js b/node_modules/@babel/types/lib/converters/toExpression.js
new file mode 100644
index 0000000..2d944f0
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/toExpression.js
@@ -0,0 +1,33 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _generated = require("../validators/generated");
+
+var _default = toExpression;
+exports.default = _default;
+
+function toExpression(node) {
+ if ((0, _generated.isExpressionStatement)(node)) {
+ node = node.expression;
+ }
+
+ if ((0, _generated.isExpression)(node)) {
+ return node;
+ }
+
+ if ((0, _generated.isClass)(node)) {
+ node.type = "ClassExpression";
+ } else if ((0, _generated.isFunction)(node)) {
+ node.type = "FunctionExpression";
+ }
+
+ if (!(0, _generated.isExpression)(node)) {
+ throw new Error(`cannot turn ${node.type} to an expression`);
+ }
+
+ return node;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/toIdentifier.js b/node_modules/@babel/types/lib/converters/toIdentifier.js
new file mode 100644
index 0000000..2fd4028
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/toIdentifier.js
@@ -0,0 +1,30 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = toIdentifier;
+
+var _isValidIdentifier = require("../validators/isValidIdentifier");
+
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+
+function toIdentifier(input) {
+ input = input + "";
+ let name = "";
+
+ for (const c of input) {
+ name += (0, _helperValidatorIdentifier.isIdentifierChar)(c.codePointAt(0)) ? c : "-";
+ }
+
+ name = name.replace(/^[-0-9]+/, "");
+ name = name.replace(/[-\s]+(.)?/g, function (match, c) {
+ return c ? c.toUpperCase() : "";
+ });
+
+ if (!(0, _isValidIdentifier.default)(name)) {
+ name = `_${name}`;
+ }
+
+ return name || "_";
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/toKeyAlias.js b/node_modules/@babel/types/lib/converters/toKeyAlias.js
new file mode 100644
index 0000000..49ef4b8
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/toKeyAlias.js
@@ -0,0 +1,46 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = toKeyAlias;
+
+var _generated = require("../validators/generated");
+
+var _cloneNode = require("../clone/cloneNode");
+
+var _removePropertiesDeep = require("../modifications/removePropertiesDeep");
+
+function toKeyAlias(node, key = node.key) {
+ let alias;
+
+ if (node.kind === "method") {
+ return toKeyAlias.increment() + "";
+ } else if ((0, _generated.isIdentifier)(key)) {
+ alias = key.name;
+ } else if ((0, _generated.isStringLiteral)(key)) {
+ alias = JSON.stringify(key.value);
+ } else {
+ alias = JSON.stringify((0, _removePropertiesDeep.default)((0, _cloneNode.default)(key)));
+ }
+
+ if (node.computed) {
+ alias = `[${alias}]`;
+ }
+
+ if (node.static) {
+ alias = `static:${alias}`;
+ }
+
+ return alias;
+}
+
+toKeyAlias.uid = 0;
+
+toKeyAlias.increment = function () {
+ if (toKeyAlias.uid >= Number.MAX_SAFE_INTEGER) {
+ return toKeyAlias.uid = 0;
+ } else {
+ return toKeyAlias.uid++;
+ }
+}; \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/toSequenceExpression.js b/node_modules/@babel/types/lib/converters/toSequenceExpression.js
new file mode 100644
index 0000000..c3d3133
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/toSequenceExpression.js
@@ -0,0 +1,21 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = toSequenceExpression;
+
+var _gatherSequenceExpressions = require("./gatherSequenceExpressions");
+
+function toSequenceExpression(nodes, scope) {
+ if (!(nodes != null && nodes.length)) return;
+ const declars = [];
+ const result = (0, _gatherSequenceExpressions.default)(nodes, scope, declars);
+ if (!result) return;
+
+ for (const declar of declars) {
+ scope.push(declar);
+ }
+
+ return result;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/toStatement.js b/node_modules/@babel/types/lib/converters/toStatement.js
new file mode 100644
index 0000000..da020a6
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/toStatement.js
@@ -0,0 +1,47 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _generated = require("../validators/generated");
+
+var _generated2 = require("../builders/generated");
+
+var _default = toStatement;
+exports.default = _default;
+
+function toStatement(node, ignore) {
+ if ((0, _generated.isStatement)(node)) {
+ return node;
+ }
+
+ let mustHaveId = false;
+ let newType;
+
+ if ((0, _generated.isClass)(node)) {
+ mustHaveId = true;
+ newType = "ClassDeclaration";
+ } else if ((0, _generated.isFunction)(node)) {
+ mustHaveId = true;
+ newType = "FunctionDeclaration";
+ } else if ((0, _generated.isAssignmentExpression)(node)) {
+ return (0, _generated2.expressionStatement)(node);
+ }
+
+ if (mustHaveId && !node.id) {
+ newType = false;
+ }
+
+ if (!newType) {
+ if (ignore) {
+ return false;
+ } else {
+ throw new Error(`cannot turn ${node.type} to a statement`);
+ }
+ }
+
+ node.type = newType;
+ return node;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/converters/valueToNode.js b/node_modules/@babel/types/lib/converters/valueToNode.js
new file mode 100644
index 0000000..b3e531b
--- /dev/null
+++ b/node_modules/@babel/types/lib/converters/valueToNode.js
@@ -0,0 +1,99 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _isValidIdentifier = require("../validators/isValidIdentifier");
+
+var _generated = require("../builders/generated");
+
+var _default = valueToNode;
+exports.default = _default;
+const objectToString = Function.call.bind(Object.prototype.toString);
+
+function isRegExp(value) {
+ return objectToString(value) === "[object RegExp]";
+}
+
+function isPlainObject(value) {
+ if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
+ return false;
+ }
+
+ const proto = Object.getPrototypeOf(value);
+ return proto === null || Object.getPrototypeOf(proto) === null;
+}
+
+function valueToNode(value) {
+ if (value === undefined) {
+ return (0, _generated.identifier)("undefined");
+ }
+
+ if (value === true || value === false) {
+ return (0, _generated.booleanLiteral)(value);
+ }
+
+ if (value === null) {
+ return (0, _generated.nullLiteral)();
+ }
+
+ if (typeof value === "string") {
+ return (0, _generated.stringLiteral)(value);
+ }
+
+ if (typeof value === "number") {
+ let result;
+
+ if (Number.isFinite(value)) {
+ result = (0, _generated.numericLiteral)(Math.abs(value));
+ } else {
+ let numerator;
+
+ if (Number.isNaN(value)) {
+ numerator = (0, _generated.numericLiteral)(0);
+ } else {
+ numerator = (0, _generated.numericLiteral)(1);
+ }
+
+ result = (0, _generated.binaryExpression)("/", numerator, (0, _generated.numericLiteral)(0));
+ }
+
+ if (value < 0 || Object.is(value, -0)) {
+ result = (0, _generated.unaryExpression)("-", result);
+ }
+
+ return result;
+ }
+
+ if (isRegExp(value)) {
+ const pattern = value.source;
+ const flags = value.toString().match(/\/([a-z]+|)$/)[1];
+ return (0, _generated.regExpLiteral)(pattern, flags);
+ }
+
+ if (Array.isArray(value)) {
+ return (0, _generated.arrayExpression)(value.map(valueToNode));
+ }
+
+ if (isPlainObject(value)) {
+ const props = [];
+
+ for (const key of Object.keys(value)) {
+ let nodeKey;
+
+ if ((0, _isValidIdentifier.default)(key)) {
+ nodeKey = (0, _generated.identifier)(key);
+ } else {
+ nodeKey = (0, _generated.stringLiteral)(key);
+ }
+
+ props.push((0, _generated.objectProperty)(nodeKey, valueToNode(value[key])));
+ }
+
+ return (0, _generated.objectExpression)(props);
+ }
+
+ throw new Error("don't know how to turn this value into a node");
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/definitions/core.js b/node_modules/@babel/types/lib/definitions/core.js
new file mode 100644
index 0000000..1c46733
--- /dev/null
+++ b/node_modules/@babel/types/lib/definitions/core.js
@@ -0,0 +1,1649 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.patternLikeCommon = exports.functionTypeAnnotationCommon = exports.functionDeclarationCommon = exports.functionCommon = exports.classMethodOrPropertyCommon = exports.classMethodOrDeclareMethodCommon = void 0;
+
+var _is = require("../validators/is");
+
+var _isValidIdentifier = require("../validators/isValidIdentifier");
+
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+
+var _constants = require("../constants");
+
+var _utils = require("./utils");
+
+const defineType = (0, _utils.defineAliasedType)("Standardized");
+defineType("ArrayExpression", {
+ fields: {
+ elements: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "Expression", "SpreadElement"))),
+ default: !process.env.BABEL_TYPES_8_BREAKING ? [] : undefined
+ }
+ },
+ visitor: ["elements"],
+ aliases: ["Expression"]
+});
+defineType("AssignmentExpression", {
+ fields: {
+ operator: {
+ validate: function () {
+ if (!process.env.BABEL_TYPES_8_BREAKING) {
+ return (0, _utils.assertValueType)("string");
+ }
+
+ const identifier = (0, _utils.assertOneOf)(..._constants.ASSIGNMENT_OPERATORS);
+ const pattern = (0, _utils.assertOneOf)("=");
+ return function (node, key, val) {
+ const validator = (0, _is.default)("Pattern", node.left) ? pattern : identifier;
+ validator(node, key, val);
+ };
+ }()
+ },
+ left: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ },
+ builder: ["operator", "left", "right"],
+ visitor: ["left", "right"],
+ aliases: ["Expression"]
+});
+defineType("BinaryExpression", {
+ builder: ["operator", "left", "right"],
+ fields: {
+ operator: {
+ validate: (0, _utils.assertOneOf)(..._constants.BINARY_OPERATORS)
+ },
+ left: {
+ validate: function () {
+ const expression = (0, _utils.assertNodeType)("Expression");
+ const inOp = (0, _utils.assertNodeType)("Expression", "PrivateName");
+
+ const validator = function (node, key, val) {
+ const validator = node.operator === "in" ? inOp : expression;
+ validator(node, key, val);
+ };
+
+ validator.oneOfNodeTypes = ["Expression", "PrivateName"];
+ return validator;
+ }()
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ },
+ visitor: ["left", "right"],
+ aliases: ["Binary", "Expression"]
+});
+defineType("InterpreterDirective", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ }
+});
+defineType("Directive", {
+ visitor: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertNodeType)("DirectiveLiteral")
+ }
+ }
+});
+defineType("DirectiveLiteral", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ }
+});
+defineType("BlockStatement", {
+ builder: ["body", "directives"],
+ visitor: ["directives", "body"],
+ fields: {
+ directives: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
+ default: []
+ },
+ body: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
+ }
+ },
+ aliases: ["Scopable", "BlockParent", "Block", "Statement"]
+});
+defineType("BreakStatement", {
+ visitor: ["label"],
+ fields: {
+ label: {
+ validate: (0, _utils.assertNodeType)("Identifier"),
+ optional: true
+ }
+ },
+ aliases: ["Statement", "Terminatorless", "CompletionStatement"]
+});
+defineType("CallExpression", {
+ visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
+ builder: ["callee", "arguments"],
+ aliases: ["Expression"],
+ fields: Object.assign({
+ callee: {
+ validate: (0, _utils.assertNodeType)("Expression", "V8IntrinsicIdentifier")
+ },
+ arguments: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
+ }
+ }, !process.env.BABEL_TYPES_8_BREAKING ? {
+ optional: {
+ validate: (0, _utils.assertOneOf)(true, false),
+ optional: true
+ }
+ } : {}, {
+ typeArguments: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
+ optional: true
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
+ optional: true
+ }
+ })
+});
+defineType("CatchClause", {
+ visitor: ["param", "body"],
+ fields: {
+ param: {
+ validate: (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern"),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ },
+ aliases: ["Scopable", "BlockParent"]
+});
+defineType("ConditionalExpression", {
+ visitor: ["test", "consequent", "alternate"],
+ fields: {
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ consequent: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ alternate: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ },
+ aliases: ["Expression", "Conditional"]
+});
+defineType("ContinueStatement", {
+ visitor: ["label"],
+ fields: {
+ label: {
+ validate: (0, _utils.assertNodeType)("Identifier"),
+ optional: true
+ }
+ },
+ aliases: ["Statement", "Terminatorless", "CompletionStatement"]
+});
+defineType("DebuggerStatement", {
+ aliases: ["Statement"]
+});
+defineType("DoWhileStatement", {
+ visitor: ["test", "body"],
+ fields: {
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ },
+ aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"]
+});
+defineType("EmptyStatement", {
+ aliases: ["Statement"]
+});
+defineType("ExpressionStatement", {
+ visitor: ["expression"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ },
+ aliases: ["Statement", "ExpressionWrapper"]
+});
+defineType("File", {
+ builder: ["program", "comments", "tokens"],
+ visitor: ["program"],
+ fields: {
+ program: {
+ validate: (0, _utils.assertNodeType)("Program")
+ },
+ comments: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? Object.assign(() => {}, {
+ each: {
+ oneOfNodeTypes: ["CommentBlock", "CommentLine"]
+ }
+ }) : (0, _utils.assertEach)((0, _utils.assertNodeType)("CommentBlock", "CommentLine")),
+ optional: true
+ },
+ tokens: {
+ validate: (0, _utils.assertEach)(Object.assign(() => {}, {
+ type: "any"
+ })),
+ optional: true
+ }
+ }
+});
+defineType("ForInStatement", {
+ visitor: ["left", "right", "body"],
+ aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
+ fields: {
+ left: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("VariableDeclaration", "LVal") : (0, _utils.assertNodeType)("VariableDeclaration", "Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern")
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+defineType("ForStatement", {
+ visitor: ["init", "test", "update", "body"],
+ aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"],
+ fields: {
+ init: {
+ validate: (0, _utils.assertNodeType)("VariableDeclaration", "Expression"),
+ optional: true
+ },
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ update: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+const functionCommon = {
+ params: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
+ },
+ generator: {
+ default: false
+ },
+ async: {
+ default: false
+ }
+};
+exports.functionCommon = functionCommon;
+const functionTypeAnnotationCommon = {
+ returnType: {
+ validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
+ optional: true
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
+ optional: true
+ }
+};
+exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
+const functionDeclarationCommon = Object.assign({}, functionCommon, {
+ declare: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ id: {
+ validate: (0, _utils.assertNodeType)("Identifier"),
+ optional: true
+ }
+});
+exports.functionDeclarationCommon = functionDeclarationCommon;
+defineType("FunctionDeclaration", {
+ builder: ["id", "params", "body", "generator", "async"],
+ visitor: ["id", "params", "body", "returnType", "typeParameters"],
+ fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ }),
+ aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Statement", "Pureish", "Declaration"],
+ validate: function () {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return () => {};
+ const identifier = (0, _utils.assertNodeType)("Identifier");
+ return function (parent, key, node) {
+ if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
+ identifier(node, "id", node.id);
+ }
+ };
+ }()
+});
+defineType("FunctionExpression", {
+ inherits: "FunctionDeclaration",
+ aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
+ fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
+ id: {
+ validate: (0, _utils.assertNodeType)("Identifier"),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ })
+});
+const patternLikeCommon = {
+ typeAnnotation: {
+ validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
+ }
+};
+exports.patternLikeCommon = patternLikeCommon;
+defineType("Identifier", {
+ builder: ["name"],
+ visitor: ["typeAnnotation", "decorators"],
+ aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
+ fields: Object.assign({}, patternLikeCommon, {
+ name: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (!(0, _isValidIdentifier.default)(val, false)) {
+ throw new TypeError(`"${val}" is not a valid identifier name`);
+ }
+ }, {
+ type: "string"
+ }))
+ },
+ optional: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ }
+ }),
+
+ validate(parent, key, node) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ const match = /\.(\w+)$/.exec(key);
+ if (!match) return;
+ const [, parentKey] = match;
+ const nonComp = {
+ computed: false
+ };
+
+ if (parentKey === "property") {
+ if ((0, _is.default)("MemberExpression", parent, nonComp)) return;
+ if ((0, _is.default)("OptionalMemberExpression", parent, nonComp)) return;
+ } else if (parentKey === "key") {
+ if ((0, _is.default)("Property", parent, nonComp)) return;
+ if ((0, _is.default)("Method", parent, nonComp)) return;
+ } else if (parentKey === "exported") {
+ if ((0, _is.default)("ExportSpecifier", parent)) return;
+ } else if (parentKey === "imported") {
+ if ((0, _is.default)("ImportSpecifier", parent, {
+ imported: node
+ })) return;
+ } else if (parentKey === "meta") {
+ if ((0, _is.default)("MetaProperty", parent, {
+ meta: node
+ })) return;
+ }
+
+ if (((0, _helperValidatorIdentifier.isKeyword)(node.name) || (0, _helperValidatorIdentifier.isReservedWord)(node.name, false)) && node.name !== "this") {
+ throw new TypeError(`"${node.name}" is not a valid identifier`);
+ }
+ }
+
+});
+defineType("IfStatement", {
+ visitor: ["test", "consequent", "alternate"],
+ aliases: ["Statement", "Conditional"],
+ fields: {
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ consequent: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ },
+ alternate: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+defineType("LabeledStatement", {
+ visitor: ["label", "body"],
+ aliases: ["Statement"],
+ fields: {
+ label: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+defineType("StringLiteral", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ },
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+defineType("NumericLiteral", {
+ builder: ["value"],
+ deprecatedAlias: "NumberLiteral",
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("number")
+ }
+ },
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+defineType("NullLiteral", {
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+defineType("BooleanLiteral", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("boolean")
+ }
+ },
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+defineType("RegExpLiteral", {
+ builder: ["pattern", "flags"],
+ deprecatedAlias: "RegexLiteral",
+ aliases: ["Expression", "Pureish", "Literal"],
+ fields: {
+ pattern: {
+ validate: (0, _utils.assertValueType)("string")
+ },
+ flags: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ const invalid = /[^gimsuy]/.exec(val);
+
+ if (invalid) {
+ throw new TypeError(`"${invalid[0]}" is not a valid RegExp flag`);
+ }
+ }, {
+ type: "string"
+ })),
+ default: ""
+ }
+ }
+});
+defineType("LogicalExpression", {
+ builder: ["operator", "left", "right"],
+ visitor: ["left", "right"],
+ aliases: ["Binary", "Expression"],
+ fields: {
+ operator: {
+ validate: (0, _utils.assertOneOf)(..._constants.LOGICAL_OPERATORS)
+ },
+ left: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+defineType("MemberExpression", {
+ builder: ["object", "property", "computed", ...(!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : [])],
+ visitor: ["object", "property"],
+ aliases: ["Expression", "LVal"],
+ fields: Object.assign({
+ object: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ property: {
+ validate: function () {
+ const normal = (0, _utils.assertNodeType)("Identifier", "PrivateName");
+ const computed = (0, _utils.assertNodeType)("Expression");
+
+ const validator = function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+
+ validator.oneOfNodeTypes = ["Expression", "Identifier", "PrivateName"];
+ return validator;
+ }()
+ },
+ computed: {
+ default: false
+ }
+ }, !process.env.BABEL_TYPES_8_BREAKING ? {
+ optional: {
+ validate: (0, _utils.assertOneOf)(true, false),
+ optional: true
+ }
+ } : {})
+});
+defineType("NewExpression", {
+ inherits: "CallExpression"
+});
+defineType("Program", {
+ visitor: ["directives", "body"],
+ builder: ["body", "directives", "sourceType", "interpreter"],
+ fields: {
+ sourceFile: {
+ validate: (0, _utils.assertValueType)("string")
+ },
+ sourceType: {
+ validate: (0, _utils.assertOneOf)("script", "module"),
+ default: "script"
+ },
+ interpreter: {
+ validate: (0, _utils.assertNodeType)("InterpreterDirective"),
+ default: null,
+ optional: true
+ },
+ directives: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Directive"))),
+ default: []
+ },
+ body: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
+ }
+ },
+ aliases: ["Scopable", "BlockParent", "Block"]
+});
+defineType("ObjectExpression", {
+ visitor: ["properties"],
+ aliases: ["Expression"],
+ fields: {
+ properties: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectMethod", "ObjectProperty", "SpreadElement")))
+ }
+ }
+});
+defineType("ObjectMethod", {
+ builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
+ fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
+ kind: Object.assign({
+ validate: (0, _utils.assertOneOf)("method", "get", "set")
+ }, !process.env.BABEL_TYPES_8_BREAKING ? {
+ default: "method"
+ } : {}),
+ computed: {
+ default: false
+ },
+ key: {
+ validate: function () {
+ const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
+ const computed = (0, _utils.assertNodeType)("Expression");
+
+ const validator = function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+
+ validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
+ return validator;
+ }()
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ }),
+ visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
+ aliases: ["UserWhitespacable", "Function", "Scopable", "BlockParent", "FunctionParent", "Method", "ObjectMember"]
+});
+defineType("ObjectProperty", {
+ builder: ["key", "value", "computed", "shorthand", ...(!process.env.BABEL_TYPES_8_BREAKING ? ["decorators"] : [])],
+ fields: {
+ computed: {
+ default: false
+ },
+ key: {
+ validate: function () {
+ const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
+ const computed = (0, _utils.assertNodeType)("Expression");
+
+ const validator = function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+
+ validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
+ return validator;
+ }()
+ },
+ value: {
+ validate: (0, _utils.assertNodeType)("Expression", "PatternLike")
+ },
+ shorthand: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (val && node.computed) {
+ throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");
+ }
+ }, {
+ type: "boolean"
+ }), function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (val && !(0, _is.default)("Identifier", node.key)) {
+ throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier");
+ }
+ }),
+ default: false
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ }
+ },
+ visitor: ["key", "value", "decorators"],
+ aliases: ["UserWhitespacable", "Property", "ObjectMember"],
+ validate: function () {
+ const pattern = (0, _utils.assertNodeType)("Identifier", "Pattern");
+ const expression = (0, _utils.assertNodeType)("Expression");
+ return function (parent, key, node) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ const validator = (0, _is.default)("ObjectPattern", parent) ? pattern : expression;
+ validator(node, "value", node.value);
+ };
+ }()
+});
+defineType("RestElement", {
+ visitor: ["argument", "typeAnnotation"],
+ builder: ["argument"],
+ aliases: ["LVal", "PatternLike"],
+ deprecatedAlias: "RestProperty",
+ fields: Object.assign({}, patternLikeCommon, {
+ argument: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression")
+ },
+ optional: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ }
+ }),
+
+ validate(parent, key) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ const match = /(\w+)\[(\d+)\]/.exec(key);
+ if (!match) throw new Error("Internal Babel error: malformed key.");
+ const [, listKey, index] = match;
+
+ if (parent[listKey].length > index + 1) {
+ throw new TypeError(`RestElement must be last element of ${listKey}`);
+ }
+ }
+
+});
+defineType("ReturnStatement", {
+ visitor: ["argument"],
+ aliases: ["Statement", "Terminatorless", "CompletionStatement"],
+ fields: {
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ }
+ }
+});
+defineType("SequenceExpression", {
+ visitor: ["expressions"],
+ fields: {
+ expressions: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression")))
+ }
+ },
+ aliases: ["Expression"]
+});
+defineType("ParenthesizedExpression", {
+ visitor: ["expression"],
+ aliases: ["Expression", "ExpressionWrapper"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+defineType("SwitchCase", {
+ visitor: ["test", "consequent"],
+ fields: {
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ consequent: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
+ }
+ }
+});
+defineType("SwitchStatement", {
+ visitor: ["discriminant", "cases"],
+ aliases: ["Statement", "BlockParent", "Scopable"],
+ fields: {
+ discriminant: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ cases: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("SwitchCase")))
+ }
+ }
+});
+defineType("ThisExpression", {
+ aliases: ["Expression"]
+});
+defineType("ThrowStatement", {
+ visitor: ["argument"],
+ aliases: ["Statement", "Terminatorless", "CompletionStatement"],
+ fields: {
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+defineType("TryStatement", {
+ visitor: ["block", "handler", "finalizer"],
+ aliases: ["Statement"],
+ fields: {
+ block: {
+ validate: (0, _utils.chain)((0, _utils.assertNodeType)("BlockStatement"), Object.assign(function (node) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (!node.handler && !node.finalizer) {
+ throw new TypeError("TryStatement expects either a handler or finalizer, or both");
+ }
+ }, {
+ oneOfNodeTypes: ["BlockStatement"]
+ }))
+ },
+ handler: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("CatchClause")
+ },
+ finalizer: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ }
+});
+defineType("UnaryExpression", {
+ builder: ["operator", "argument", "prefix"],
+ fields: {
+ prefix: {
+ default: true
+ },
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ operator: {
+ validate: (0, _utils.assertOneOf)(..._constants.UNARY_OPERATORS)
+ }
+ },
+ visitor: ["argument"],
+ aliases: ["UnaryLike", "Expression"]
+});
+defineType("UpdateExpression", {
+ builder: ["operator", "argument", "prefix"],
+ fields: {
+ prefix: {
+ default: false
+ },
+ argument: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("Expression") : (0, _utils.assertNodeType)("Identifier", "MemberExpression")
+ },
+ operator: {
+ validate: (0, _utils.assertOneOf)(..._constants.UPDATE_OPERATORS)
+ }
+ },
+ visitor: ["argument"],
+ aliases: ["Expression"]
+});
+defineType("VariableDeclaration", {
+ builder: ["kind", "declarations"],
+ visitor: ["declarations"],
+ aliases: ["Statement", "Declaration"],
+ fields: {
+ declare: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ kind: {
+ validate: (0, _utils.assertOneOf)("var", "let", "const")
+ },
+ declarations: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("VariableDeclarator")))
+ }
+ },
+
+ validate(parent, key, node) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ if (!(0, _is.default)("ForXStatement", parent, {
+ left: node
+ })) return;
+
+ if (node.declarations.length !== 1) {
+ throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${parent.type}`);
+ }
+ }
+
+});
+defineType("VariableDeclarator", {
+ visitor: ["id", "init"],
+ fields: {
+ id: {
+ validate: function () {
+ if (!process.env.BABEL_TYPES_8_BREAKING) {
+ return (0, _utils.assertNodeType)("LVal");
+ }
+
+ const normal = (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern");
+ const without = (0, _utils.assertNodeType)("Identifier");
+ return function (node, key, val) {
+ const validator = node.init ? normal : without;
+ validator(node, key, val);
+ };
+ }()
+ },
+ definite: {
+ optional: true,
+ validate: (0, _utils.assertValueType)("boolean")
+ },
+ init: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+defineType("WhileStatement", {
+ visitor: ["test", "body"],
+ aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"],
+ fields: {
+ test: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+defineType("WithStatement", {
+ visitor: ["object", "body"],
+ aliases: ["Statement"],
+ fields: {
+ object: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ }
+ }
+});
+defineType("AssignmentPattern", {
+ visitor: ["left", "right", "decorators"],
+ builder: ["left", "right"],
+ aliases: ["Pattern", "PatternLike", "LVal"],
+ fields: Object.assign({}, patternLikeCommon, {
+ left: {
+ validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression")
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ }
+ })
+});
+defineType("ArrayPattern", {
+ visitor: ["elements", "typeAnnotation"],
+ builder: ["elements"],
+ aliases: ["Pattern", "PatternLike", "LVal"],
+ fields: Object.assign({}, patternLikeCommon, {
+ elements: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ optional: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ }
+ })
+});
+defineType("ArrowFunctionExpression", {
+ builder: ["params", "body", "async"],
+ visitor: ["params", "body", "returnType", "typeParameters"],
+ aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
+ fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
+ expression: {
+ validate: (0, _utils.assertValueType)("boolean")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement", "Expression")
+ }
+ })
+});
+defineType("ClassBody", {
+ visitor: ["body"],
+ fields: {
+ body: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ClassMethod", "ClassPrivateMethod", "ClassProperty", "ClassPrivateProperty", "ClassAccessorProperty", "TSDeclareMethod", "TSIndexSignature", "StaticBlock")))
+ }
+ }
+});
+defineType("ClassExpression", {
+ builder: ["id", "superClass", "body", "decorators"],
+ visitor: ["id", "body", "superClass", "mixins", "typeParameters", "superTypeParameters", "implements", "decorators"],
+ aliases: ["Scopable", "Class", "Expression"],
+ fields: {
+ id: {
+ validate: (0, _utils.assertNodeType)("Identifier"),
+ optional: true
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("ClassBody")
+ },
+ superClass: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ superTypeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
+ optional: true
+ },
+ implements: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ mixins: {
+ validate: (0, _utils.assertNodeType)("InterfaceExtends"),
+ optional: true
+ }
+ }
+});
+defineType("ClassDeclaration", {
+ inherits: "ClassExpression",
+ aliases: ["Scopable", "Class", "Statement", "Declaration"],
+ fields: {
+ id: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
+ optional: true
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("ClassBody")
+ },
+ superClass: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ superTypeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
+ optional: true
+ },
+ implements: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSExpressionWithTypeArguments", "ClassImplements"))),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ mixins: {
+ validate: (0, _utils.assertNodeType)("InterfaceExtends"),
+ optional: true
+ },
+ declare: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ abstract: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ }
+ },
+ validate: function () {
+ const identifier = (0, _utils.assertNodeType)("Identifier");
+ return function (parent, key, node) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (!(0, _is.default)("ExportDefaultDeclaration", parent)) {
+ identifier(node, "id", node.id);
+ }
+ };
+ }()
+});
+defineType("ExportAllDeclaration", {
+ visitor: ["source"],
+ aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
+ fields: {
+ source: {
+ validate: (0, _utils.assertNodeType)("StringLiteral")
+ },
+ exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value")),
+ assertions: {
+ optional: true,
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
+ }
+ }
+});
+defineType("ExportDefaultDeclaration", {
+ visitor: ["declaration"],
+ aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
+ fields: {
+ declaration: {
+ validate: (0, _utils.assertNodeType)("FunctionDeclaration", "TSDeclareFunction", "ClassDeclaration", "Expression")
+ },
+ exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("value"))
+ }
+});
+defineType("ExportNamedDeclaration", {
+ visitor: ["declaration", "specifiers", "source"],
+ aliases: ["Statement", "Declaration", "ModuleDeclaration", "ExportDeclaration"],
+ fields: {
+ declaration: {
+ optional: true,
+ validate: (0, _utils.chain)((0, _utils.assertNodeType)("Declaration"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (val && node.specifiers.length) {
+ throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
+ }
+ }, {
+ oneOfNodeTypes: ["Declaration"]
+ }), function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (val && node.source) {
+ throw new TypeError("Cannot export a declaration from a source");
+ }
+ })
+ },
+ assertions: {
+ optional: true,
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
+ },
+ specifiers: {
+ default: [],
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)(function () {
+ const sourced = (0, _utils.assertNodeType)("ExportSpecifier", "ExportDefaultSpecifier", "ExportNamespaceSpecifier");
+ const sourceless = (0, _utils.assertNodeType)("ExportSpecifier");
+ if (!process.env.BABEL_TYPES_8_BREAKING) return sourced;
+ return function (node, key, val) {
+ const validator = node.source ? sourced : sourceless;
+ validator(node, key, val);
+ };
+ }()))
+ },
+ source: {
+ validate: (0, _utils.assertNodeType)("StringLiteral"),
+ optional: true
+ },
+ exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
+ }
+});
+defineType("ExportSpecifier", {
+ visitor: ["local", "exported"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ local: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ },
+ exported: {
+ validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
+ },
+ exportKind: {
+ validate: (0, _utils.assertOneOf)("type", "value"),
+ optional: true
+ }
+ }
+});
+defineType("ForOfStatement", {
+ visitor: ["left", "right", "body"],
+ builder: ["left", "right", "body", "await"],
+ aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop", "ForXStatement"],
+ fields: {
+ left: {
+ validate: function () {
+ if (!process.env.BABEL_TYPES_8_BREAKING) {
+ return (0, _utils.assertNodeType)("VariableDeclaration", "LVal");
+ }
+
+ const declaration = (0, _utils.assertNodeType)("VariableDeclaration");
+ const lval = (0, _utils.assertNodeType)("Identifier", "MemberExpression", "ArrayPattern", "ObjectPattern");
+ return function (node, key, val) {
+ if ((0, _is.default)("VariableDeclaration", val)) {
+ declaration(node, key, val);
+ } else {
+ lval(node, key, val);
+ }
+ };
+ }()
+ },
+ right: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("Statement")
+ },
+ await: {
+ default: false
+ }
+ }
+});
+defineType("ImportDeclaration", {
+ visitor: ["specifiers", "source"],
+ aliases: ["Statement", "Declaration", "ModuleDeclaration"],
+ fields: {
+ assertions: {
+ optional: true,
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportAttribute")))
+ },
+ specifiers: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ImportSpecifier", "ImportDefaultSpecifier", "ImportNamespaceSpecifier")))
+ },
+ source: {
+ validate: (0, _utils.assertNodeType)("StringLiteral")
+ },
+ importKind: {
+ validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
+ optional: true
+ }
+ }
+});
+defineType("ImportDefaultSpecifier", {
+ visitor: ["local"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ local: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+defineType("ImportNamespaceSpecifier", {
+ visitor: ["local"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ local: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+defineType("ImportSpecifier", {
+ visitor: ["local", "imported"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ local: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ },
+ imported: {
+ validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
+ },
+ importKind: {
+ validate: (0, _utils.assertOneOf)("type", "typeof", "value"),
+ optional: true
+ }
+ }
+});
+defineType("MetaProperty", {
+ visitor: ["meta", "property"],
+ aliases: ["Expression"],
+ fields: {
+ meta: {
+ validate: (0, _utils.chain)((0, _utils.assertNodeType)("Identifier"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+ let property;
+
+ switch (val.name) {
+ case "function":
+ property = "sent";
+ break;
+
+ case "new":
+ property = "target";
+ break;
+
+ case "import":
+ property = "meta";
+ break;
+ }
+
+ if (!(0, _is.default)("Identifier", node.property, {
+ name: property
+ })) {
+ throw new TypeError("Unrecognised MetaProperty");
+ }
+ }, {
+ oneOfNodeTypes: ["Identifier"]
+ }))
+ },
+ property: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+const classMethodOrPropertyCommon = {
+ abstract: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ accessibility: {
+ validate: (0, _utils.assertOneOf)("public", "private", "protected"),
+ optional: true
+ },
+ static: {
+ default: false
+ },
+ override: {
+ default: false
+ },
+ computed: {
+ default: false
+ },
+ optional: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ key: {
+ validate: (0, _utils.chain)(function () {
+ const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
+ const computed = (0, _utils.assertNodeType)("Expression");
+ return function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+ }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
+ }
+};
+exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
+const classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
+ params: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
+ },
+ kind: {
+ validate: (0, _utils.assertOneOf)("get", "set", "method", "constructor"),
+ default: "method"
+ },
+ access: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), (0, _utils.assertOneOf)("public", "private", "protected")),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ }
+});
+exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
+defineType("ClassMethod", {
+ aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
+ builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
+ visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
+ fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ })
+});
+defineType("ObjectPattern", {
+ visitor: ["properties", "typeAnnotation", "decorators"],
+ builder: ["properties"],
+ aliases: ["Pattern", "PatternLike", "LVal"],
+ fields: Object.assign({}, patternLikeCommon, {
+ properties: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
+ }
+ })
+});
+defineType("SpreadElement", {
+ visitor: ["argument"],
+ aliases: ["UnaryLike"],
+ deprecatedAlias: "SpreadProperty",
+ fields: {
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+defineType("Super", {
+ aliases: ["Expression"]
+});
+defineType("TaggedTemplateExpression", {
+ visitor: ["tag", "quasi", "typeParameters"],
+ builder: ["tag", "quasi"],
+ aliases: ["Expression"],
+ fields: {
+ tag: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ quasi: {
+ validate: (0, _utils.assertNodeType)("TemplateLiteral")
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
+ optional: true
+ }
+ }
+});
+defineType("TemplateElement", {
+ builder: ["value", "tail"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertShape)({
+ raw: {
+ validate: (0, _utils.assertValueType)("string")
+ },
+ cooked: {
+ validate: (0, _utils.assertValueType)("string"),
+ optional: true
+ }
+ })
+ },
+ tail: {
+ default: false
+ }
+ }
+});
+defineType("TemplateLiteral", {
+ visitor: ["quasis", "expressions"],
+ aliases: ["Expression", "Literal"],
+ fields: {
+ quasis: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TemplateElement")))
+ },
+ expressions: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "TSType")), function (node, key, val) {
+ if (node.quasis.length !== val.length + 1) {
+ throw new TypeError(`Number of ${node.type} quasis should be exactly one more than the number of expressions.\nExpected ${val.length + 1} quasis but got ${node.quasis.length}`);
+ }
+ })
+ }
+ }
+});
+defineType("YieldExpression", {
+ builder: ["argument", "delegate"],
+ visitor: ["argument"],
+ aliases: ["Expression", "Terminatorless"],
+ fields: {
+ delegate: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("boolean"), Object.assign(function (node, key, val) {
+ if (!process.env.BABEL_TYPES_8_BREAKING) return;
+
+ if (val && !node.argument) {
+ throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
+ }
+ }, {
+ type: "boolean"
+ })),
+ default: false
+ },
+ argument: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+defineType("AwaitExpression", {
+ builder: ["argument"],
+ visitor: ["argument"],
+ aliases: ["Expression", "Terminatorless"],
+ fields: {
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+defineType("Import", {
+ aliases: ["Expression"]
+});
+defineType("BigIntLiteral", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ },
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+defineType("ExportNamespaceSpecifier", {
+ visitor: ["exported"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ exported: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+defineType("OptionalMemberExpression", {
+ builder: ["object", "property", "computed", "optional"],
+ visitor: ["object", "property"],
+ aliases: ["Expression"],
+ fields: {
+ object: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ property: {
+ validate: function () {
+ const normal = (0, _utils.assertNodeType)("Identifier");
+ const computed = (0, _utils.assertNodeType)("Expression");
+
+ const validator = function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+
+ validator.oneOfNodeTypes = ["Expression", "Identifier"];
+ return validator;
+ }()
+ },
+ computed: {
+ default: false
+ },
+ optional: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
+ }
+ }
+});
+defineType("OptionalCallExpression", {
+ visitor: ["callee", "arguments", "typeParameters", "typeArguments"],
+ builder: ["callee", "arguments", "optional"],
+ aliases: ["Expression"],
+ fields: {
+ callee: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ arguments: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder")))
+ },
+ optional: {
+ validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())
+ },
+ typeArguments: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation"),
+ optional: true
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TSTypeParameterInstantiation"),
+ optional: true
+ }
+ }
+});
+defineType("ClassProperty", {
+ visitor: ["key", "value", "typeAnnotation", "decorators"],
+ builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
+ aliases: ["Property"],
+ fields: Object.assign({}, classMethodOrPropertyCommon, {
+ value: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ definite: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ typeAnnotation: {
+ validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ readonly: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ declare: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ variance: {
+ validate: (0, _utils.assertNodeType)("Variance"),
+ optional: true
+ }
+ })
+});
+defineType("ClassAccessorProperty", {
+ visitor: ["key", "value", "typeAnnotation", "decorators"],
+ builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
+ aliases: ["Property", "Accessor"],
+ fields: Object.assign({}, classMethodOrPropertyCommon, {
+ key: {
+ validate: (0, _utils.chain)(function () {
+ const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "PrivateName");
+ const computed = (0, _utils.assertNodeType)("Expression");
+ return function (node, key, val) {
+ const validator = node.computed ? computed : normal;
+ validator(node, key, val);
+ };
+ }(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression", "PrivateName"))
+ },
+ value: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ definite: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ typeAnnotation: {
+ validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ readonly: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ declare: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ variance: {
+ validate: (0, _utils.assertNodeType)("Variance"),
+ optional: true
+ }
+ })
+});
+defineType("ClassPrivateProperty", {
+ visitor: ["key", "value", "decorators", "typeAnnotation"],
+ builder: ["key", "value", "decorators", "static"],
+ aliases: ["Property", "Private"],
+ fields: {
+ key: {
+ validate: (0, _utils.assertNodeType)("PrivateName")
+ },
+ value: {
+ validate: (0, _utils.assertNodeType)("Expression"),
+ optional: true
+ },
+ typeAnnotation: {
+ validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ },
+ readonly: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ definite: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ variance: {
+ validate: (0, _utils.assertNodeType)("Variance"),
+ optional: true
+ }
+ }
+});
+defineType("ClassPrivateMethod", {
+ builder: ["kind", "key", "params", "body", "static"],
+ visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
+ aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
+ fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
+ key: {
+ validate: (0, _utils.assertNodeType)("PrivateName")
+ },
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ }
+ })
+});
+defineType("PrivateName", {
+ visitor: ["id"],
+ aliases: ["Private"],
+ fields: {
+ id: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+defineType("StaticBlock", {
+ visitor: ["body"],
+ fields: {
+ body: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Statement")))
+ }
+ },
+ aliases: ["Scopable", "BlockParent", "FunctionParent"]
+}); \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/definitions/experimental.js b/node_modules/@babel/types/lib/definitions/experimental.js
new file mode 100644
index 0000000..be97c0d
--- /dev/null
+++ b/node_modules/@babel/types/lib/definitions/experimental.js
@@ -0,0 +1,133 @@
+"use strict";
+
+var _utils = require("./utils");
+
+(0, _utils.default)("ArgumentPlaceholder", {});
+(0, _utils.default)("BindExpression", {
+ visitor: ["object", "callee"],
+ aliases: ["Expression"],
+ fields: !process.env.BABEL_TYPES_8_BREAKING ? {
+ object: {
+ validate: Object.assign(() => {}, {
+ oneOfNodeTypes: ["Expression"]
+ })
+ },
+ callee: {
+ validate: Object.assign(() => {}, {
+ oneOfNodeTypes: ["Expression"]
+ })
+ }
+ } : {
+ object: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ },
+ callee: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("ImportAttribute", {
+ visitor: ["key", "value"],
+ fields: {
+ key: {
+ validate: (0, _utils.assertNodeType)("Identifier", "StringLiteral")
+ },
+ value: {
+ validate: (0, _utils.assertNodeType)("StringLiteral")
+ }
+ }
+});
+(0, _utils.default)("Decorator", {
+ visitor: ["expression"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+(0, _utils.default)("DoExpression", {
+ visitor: ["body"],
+ builder: ["body", "async"],
+ aliases: ["Expression"],
+ fields: {
+ body: {
+ validate: (0, _utils.assertNodeType)("BlockStatement")
+ },
+ async: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ default: false
+ }
+ }
+});
+(0, _utils.default)("ExportDefaultSpecifier", {
+ visitor: ["exported"],
+ aliases: ["ModuleSpecifier"],
+ fields: {
+ exported: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ }
+ }
+});
+(0, _utils.default)("RecordExpression", {
+ visitor: ["properties"],
+ aliases: ["Expression"],
+ fields: {
+ properties: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("ObjectProperty", "SpreadElement")))
+ }
+ }
+});
+(0, _utils.default)("TupleExpression", {
+ fields: {
+ elements: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement"))),
+ default: []
+ }
+ },
+ visitor: ["elements"],
+ aliases: ["Expression"]
+});
+(0, _utils.default)("DecimalLiteral", {
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ },
+ aliases: ["Expression", "Pureish", "Literal", "Immutable"]
+});
+(0, _utils.default)("ModuleExpression", {
+ visitor: ["body"],
+ fields: {
+ body: {
+ validate: (0, _utils.assertNodeType)("Program")
+ }
+ },
+ aliases: ["Expression"]
+});
+(0, _utils.default)("TopicReference", {
+ aliases: ["Expression"]
+});
+(0, _utils.default)("PipelineTopicExpression", {
+ builder: ["expression"],
+ visitor: ["expression"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ },
+ aliases: ["Expression"]
+});
+(0, _utils.default)("PipelineBareFunction", {
+ builder: ["callee"],
+ visitor: ["callee"],
+ fields: {
+ callee: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ },
+ aliases: ["Expression"]
+});
+(0, _utils.default)("PipelinePrimaryTopicReference", {
+ aliases: ["Expression"]
+}); \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/definitions/flow.js b/node_modules/@babel/types/lib/definitions/flow.js
new file mode 100644
index 0000000..706de24
--- /dev/null
+++ b/node_modules/@babel/types/lib/definitions/flow.js
@@ -0,0 +1,474 @@
+"use strict";
+
+var _utils = require("./utils");
+
+const defineType = (0, _utils.defineAliasedType)("Flow");
+
+const defineInterfaceishType = (name, typeParameterType = "TypeParameterDeclaration") => {
+ defineType(name, {
+ builder: ["id", "typeParameters", "extends", "body"],
+ visitor: ["id", "typeParameters", "extends", "mixins", "implements", "body"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)(typeParameterType),
+ extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
+ mixins: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
+ implements: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ClassImplements")),
+ body: (0, _utils.validateType)("ObjectTypeAnnotation")
+ }
+ });
+};
+
+defineType("AnyTypeAnnotation", {
+ aliases: ["FlowType", "FlowBaseAnnotation"]
+});
+defineType("ArrayTypeAnnotation", {
+ visitor: ["elementType"],
+ aliases: ["FlowType"],
+ fields: {
+ elementType: (0, _utils.validateType)("FlowType")
+ }
+});
+defineType("BooleanTypeAnnotation", {
+ aliases: ["FlowType", "FlowBaseAnnotation"]
+});
+defineType("BooleanLiteralTypeAnnotation", {
+ builder: ["value"],
+ aliases: ["FlowType"],
+ fields: {
+ value: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("NullLiteralTypeAnnotation", {
+ aliases: ["FlowType", "FlowBaseAnnotation"]
+});
+defineType("ClassImplements", {
+ visitor: ["id", "typeParameters"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
+ }
+});
+defineInterfaceishType("DeclareClass");
+defineType("DeclareFunction", {
+ visitor: ["id"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ predicate: (0, _utils.validateOptionalType)("DeclaredPredicate")
+ }
+});
+defineInterfaceishType("DeclareInterface");
+defineType("DeclareModule", {
+ builder: ["id", "body", "kind"],
+ visitor: ["id", "body"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
+ body: (0, _utils.validateType)("BlockStatement"),
+ kind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("CommonJS", "ES"))
+ }
+});
+defineType("DeclareModuleExports", {
+ visitor: ["typeAnnotation"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
+ }
+});
+defineType("DeclareTypeAlias", {
+ visitor: ["id", "typeParameters", "right"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
+ right: (0, _utils.validateType)("FlowType")
+ }
+});
+defineType("DeclareOpaqueType", {
+ visitor: ["id", "typeParameters", "supertype"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
+ supertype: (0, _utils.validateOptionalType)("FlowType"),
+ impltype: (0, _utils.validateOptionalType)("FlowType")
+ }
+});
+defineType("DeclareVariable", {
+ visitor: ["id"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier")
+ }
+});
+defineType("DeclareExportDeclaration", {
+ visitor: ["declaration", "specifiers", "source"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ declaration: (0, _utils.validateOptionalType)("Flow"),
+ specifiers: (0, _utils.validateOptional)((0, _utils.arrayOfType)(["ExportSpecifier", "ExportNamespaceSpecifier"])),
+ source: (0, _utils.validateOptionalType)("StringLiteral"),
+ default: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("DeclareExportAllDeclaration", {
+ visitor: ["source"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ source: (0, _utils.validateType)("StringLiteral"),
+ exportKind: (0, _utils.validateOptional)((0, _utils.assertOneOf)("type", "value"))
+ }
+});
+defineType("DeclaredPredicate", {
+ visitor: ["value"],
+ aliases: ["FlowPredicate"],
+ fields: {
+ value: (0, _utils.validateType)("Flow")
+ }
+});
+defineType("ExistsTypeAnnotation", {
+ aliases: ["FlowType"]
+});
+defineType("FunctionTypeAnnotation", {
+ visitor: ["typeParameters", "params", "rest", "returnType"],
+ aliases: ["FlowType"],
+ fields: {
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
+ params: (0, _utils.validate)((0, _utils.arrayOfType)("FunctionTypeParam")),
+ rest: (0, _utils.validateOptionalType)("FunctionTypeParam"),
+ this: (0, _utils.validateOptionalType)("FunctionTypeParam"),
+ returnType: (0, _utils.validateType)("FlowType")
+ }
+});
+defineType("FunctionTypeParam", {
+ visitor: ["name", "typeAnnotation"],
+ fields: {
+ name: (0, _utils.validateOptionalType)("Identifier"),
+ typeAnnotation: (0, _utils.validateType)("FlowType"),
+ optional: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("GenericTypeAnnotation", {
+ visitor: ["id", "typeParameters"],
+ aliases: ["FlowType"],
+ fields: {
+ id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
+ }
+});
+defineType("InferredPredicate", {
+ aliases: ["FlowPredicate"]
+});
+defineType("InterfaceExtends", {
+ visitor: ["id", "typeParameters"],
+ fields: {
+ id: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"]),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterInstantiation")
+ }
+});
+defineInterfaceishType("InterfaceDeclaration");
+defineType("InterfaceTypeAnnotation", {
+ visitor: ["extends", "body"],
+ aliases: ["FlowType"],
+ fields: {
+ extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("InterfaceExtends")),
+ body: (0, _utils.validateType)("ObjectTypeAnnotation")
+ }
+});
+defineType("IntersectionTypeAnnotation", {
+ visitor: ["types"],
+ aliases: ["FlowType"],
+ fields: {
+ types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
+ }
+});
+defineType("MixedTypeAnnotation", {
+ aliases: ["FlowType", "FlowBaseAnnotation"]
+});
+defineType("EmptyTypeAnnotation", {
+ aliases: ["FlowType", "FlowBaseAnnotation"]
+});
+defineType("NullableTypeAnnotation", {
+ visitor: ["typeAnnotation"],
+ aliases: ["FlowType"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("FlowType")
+ }
+});
+defineType("NumberLiteralTypeAnnotation", {
+ builder: ["value"],
+ aliases: ["FlowType"],
+ fields: {
+ value: (0, _utils.validate)((0, _utils.assertValueType)("number"))
+ }
+});
+defineType("NumberTypeAnnotation", {
+ aliases: ["FlowType", "FlowBaseAnnotation"]
+});
+defineType("ObjectTypeAnnotation", {
+ visitor: ["properties", "indexers", "callProperties", "internalSlots"],
+ aliases: ["FlowType"],
+ builder: ["properties", "indexers", "callProperties", "internalSlots", "exact"],
+ fields: {
+ properties: (0, _utils.validate)((0, _utils.arrayOfType)(["ObjectTypeProperty", "ObjectTypeSpreadProperty"])),
+ indexers: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeIndexer")),
+ callProperties: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeCallProperty")),
+ internalSlots: (0, _utils.validateOptional)((0, _utils.arrayOfType)("ObjectTypeInternalSlot")),
+ exact: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ default: false
+ },
+ inexact: (0, _utils.validateOptional)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("ObjectTypeInternalSlot", {
+ visitor: ["id", "value", "optional", "static", "method"],
+ aliases: ["UserWhitespacable"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ value: (0, _utils.validateType)("FlowType"),
+ optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("ObjectTypeCallProperty", {
+ visitor: ["value"],
+ aliases: ["UserWhitespacable"],
+ fields: {
+ value: (0, _utils.validateType)("FlowType"),
+ static: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("ObjectTypeIndexer", {
+ visitor: ["id", "key", "value", "variance"],
+ aliases: ["UserWhitespacable"],
+ fields: {
+ id: (0, _utils.validateOptionalType)("Identifier"),
+ key: (0, _utils.validateType)("FlowType"),
+ value: (0, _utils.validateType)("FlowType"),
+ static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ variance: (0, _utils.validateOptionalType)("Variance")
+ }
+});
+defineType("ObjectTypeProperty", {
+ visitor: ["key", "value", "variance"],
+ aliases: ["UserWhitespacable"],
+ fields: {
+ key: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
+ value: (0, _utils.validateType)("FlowType"),
+ kind: (0, _utils.validate)((0, _utils.assertOneOf)("init", "get", "set")),
+ static: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ proto: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ variance: (0, _utils.validateOptionalType)("Variance"),
+ method: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("ObjectTypeSpreadProperty", {
+ visitor: ["argument"],
+ aliases: ["UserWhitespacable"],
+ fields: {
+ argument: (0, _utils.validateType)("FlowType")
+ }
+});
+defineType("OpaqueType", {
+ visitor: ["id", "typeParameters", "supertype", "impltype"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
+ supertype: (0, _utils.validateOptionalType)("FlowType"),
+ impltype: (0, _utils.validateType)("FlowType")
+ }
+});
+defineType("QualifiedTypeIdentifier", {
+ visitor: ["id", "qualification"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ qualification: (0, _utils.validateType)(["Identifier", "QualifiedTypeIdentifier"])
+ }
+});
+defineType("StringLiteralTypeAnnotation", {
+ builder: ["value"],
+ aliases: ["FlowType"],
+ fields: {
+ value: (0, _utils.validate)((0, _utils.assertValueType)("string"))
+ }
+});
+defineType("StringTypeAnnotation", {
+ aliases: ["FlowType", "FlowBaseAnnotation"]
+});
+defineType("SymbolTypeAnnotation", {
+ aliases: ["FlowType", "FlowBaseAnnotation"]
+});
+defineType("ThisTypeAnnotation", {
+ aliases: ["FlowType", "FlowBaseAnnotation"]
+});
+defineType("TupleTypeAnnotation", {
+ visitor: ["types"],
+ aliases: ["FlowType"],
+ fields: {
+ types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
+ }
+});
+defineType("TypeofTypeAnnotation", {
+ visitor: ["argument"],
+ aliases: ["FlowType"],
+ fields: {
+ argument: (0, _utils.validateType)("FlowType")
+ }
+});
+defineType("TypeAlias", {
+ visitor: ["id", "typeParameters", "right"],
+ aliases: ["FlowDeclaration", "Statement", "Declaration"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TypeParameterDeclaration"),
+ right: (0, _utils.validateType)("FlowType")
+ }
+});
+defineType("TypeAnnotation", {
+ visitor: ["typeAnnotation"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("FlowType")
+ }
+});
+defineType("TypeCastExpression", {
+ visitor: ["expression", "typeAnnotation"],
+ aliases: ["ExpressionWrapper", "Expression"],
+ fields: {
+ expression: (0, _utils.validateType)("Expression"),
+ typeAnnotation: (0, _utils.validateType)("TypeAnnotation")
+ }
+});
+defineType("TypeParameter", {
+ visitor: ["bound", "default", "variance"],
+ fields: {
+ name: (0, _utils.validate)((0, _utils.assertValueType)("string")),
+ bound: (0, _utils.validateOptionalType)("TypeAnnotation"),
+ default: (0, _utils.validateOptionalType)("FlowType"),
+ variance: (0, _utils.validateOptionalType)("Variance")
+ }
+});
+defineType("TypeParameterDeclaration", {
+ visitor: ["params"],
+ fields: {
+ params: (0, _utils.validate)((0, _utils.arrayOfType)("TypeParameter"))
+ }
+});
+defineType("TypeParameterInstantiation", {
+ visitor: ["params"],
+ fields: {
+ params: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
+ }
+});
+defineType("UnionTypeAnnotation", {
+ visitor: ["types"],
+ aliases: ["FlowType"],
+ fields: {
+ types: (0, _utils.validate)((0, _utils.arrayOfType)("FlowType"))
+ }
+});
+defineType("Variance", {
+ builder: ["kind"],
+ fields: {
+ kind: (0, _utils.validate)((0, _utils.assertOneOf)("minus", "plus"))
+ }
+});
+defineType("VoidTypeAnnotation", {
+ aliases: ["FlowType", "FlowBaseAnnotation"]
+});
+defineType("EnumDeclaration", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "body"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ body: (0, _utils.validateType)(["EnumBooleanBody", "EnumNumberBody", "EnumStringBody", "EnumSymbolBody"])
+ }
+});
+defineType("EnumBooleanBody", {
+ aliases: ["EnumBody"],
+ visitor: ["members"],
+ fields: {
+ explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ members: (0, _utils.validateArrayOfType)("EnumBooleanMember"),
+ hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("EnumNumberBody", {
+ aliases: ["EnumBody"],
+ visitor: ["members"],
+ fields: {
+ explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ members: (0, _utils.validateArrayOfType)("EnumNumberMember"),
+ hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("EnumStringBody", {
+ aliases: ["EnumBody"],
+ visitor: ["members"],
+ fields: {
+ explicitType: (0, _utils.validate)((0, _utils.assertValueType)("boolean")),
+ members: (0, _utils.validateArrayOfType)(["EnumStringMember", "EnumDefaultedMember"]),
+ hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("EnumSymbolBody", {
+ aliases: ["EnumBody"],
+ visitor: ["members"],
+ fields: {
+ members: (0, _utils.validateArrayOfType)("EnumDefaultedMember"),
+ hasUnknownMembers: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+});
+defineType("EnumBooleanMember", {
+ aliases: ["EnumMember"],
+ visitor: ["id"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ init: (0, _utils.validateType)("BooleanLiteral")
+ }
+});
+defineType("EnumNumberMember", {
+ aliases: ["EnumMember"],
+ visitor: ["id", "init"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ init: (0, _utils.validateType)("NumericLiteral")
+ }
+});
+defineType("EnumStringMember", {
+ aliases: ["EnumMember"],
+ visitor: ["id", "init"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier"),
+ init: (0, _utils.validateType)("StringLiteral")
+ }
+});
+defineType("EnumDefaultedMember", {
+ aliases: ["EnumMember"],
+ visitor: ["id"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier")
+ }
+});
+defineType("IndexedAccessType", {
+ visitor: ["objectType", "indexType"],
+ aliases: ["FlowType"],
+ fields: {
+ objectType: (0, _utils.validateType)("FlowType"),
+ indexType: (0, _utils.validateType)("FlowType")
+ }
+});
+defineType("OptionalIndexedAccessType", {
+ visitor: ["objectType", "indexType"],
+ aliases: ["FlowType"],
+ fields: {
+ objectType: (0, _utils.validateType)("FlowType"),
+ indexType: (0, _utils.validateType)("FlowType"),
+ optional: (0, _utils.validate)((0, _utils.assertValueType)("boolean"))
+ }
+}); \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/definitions/index.js b/node_modules/@babel/types/lib/definitions/index.js
new file mode 100644
index 0000000..9b7c92c
--- /dev/null
+++ b/node_modules/@babel/types/lib/definitions/index.js
@@ -0,0 +1,103 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+Object.defineProperty(exports, "ALIAS_KEYS", {
+ enumerable: true,
+ get: function () {
+ return _utils.ALIAS_KEYS;
+ }
+});
+Object.defineProperty(exports, "BUILDER_KEYS", {
+ enumerable: true,
+ get: function () {
+ return _utils.BUILDER_KEYS;
+ }
+});
+Object.defineProperty(exports, "DEPRECATED_KEYS", {
+ enumerable: true,
+ get: function () {
+ return _utils.DEPRECATED_KEYS;
+ }
+});
+Object.defineProperty(exports, "FLIPPED_ALIAS_KEYS", {
+ enumerable: true,
+ get: function () {
+ return _utils.FLIPPED_ALIAS_KEYS;
+ }
+});
+Object.defineProperty(exports, "NODE_FIELDS", {
+ enumerable: true,
+ get: function () {
+ return _utils.NODE_FIELDS;
+ }
+});
+Object.defineProperty(exports, "NODE_PARENT_VALIDATIONS", {
+ enumerable: true,
+ get: function () {
+ return _utils.NODE_PARENT_VALIDATIONS;
+ }
+});
+Object.defineProperty(exports, "PLACEHOLDERS", {
+ enumerable: true,
+ get: function () {
+ return _placeholders.PLACEHOLDERS;
+ }
+});
+Object.defineProperty(exports, "PLACEHOLDERS_ALIAS", {
+ enumerable: true,
+ get: function () {
+ return _placeholders.PLACEHOLDERS_ALIAS;
+ }
+});
+Object.defineProperty(exports, "PLACEHOLDERS_FLIPPED_ALIAS", {
+ enumerable: true,
+ get: function () {
+ return _placeholders.PLACEHOLDERS_FLIPPED_ALIAS;
+ }
+});
+exports.TYPES = void 0;
+Object.defineProperty(exports, "VISITOR_KEYS", {
+ enumerable: true,
+ get: function () {
+ return _utils.VISITOR_KEYS;
+ }
+});
+
+var _toFastProperties = require("to-fast-properties");
+
+require("./core");
+
+require("./flow");
+
+require("./jsx");
+
+require("./misc");
+
+require("./experimental");
+
+require("./typescript");
+
+var _utils = require("./utils");
+
+var _placeholders = require("./placeholders");
+
+_toFastProperties(_utils.VISITOR_KEYS);
+
+_toFastProperties(_utils.ALIAS_KEYS);
+
+_toFastProperties(_utils.FLIPPED_ALIAS_KEYS);
+
+_toFastProperties(_utils.NODE_FIELDS);
+
+_toFastProperties(_utils.BUILDER_KEYS);
+
+_toFastProperties(_utils.DEPRECATED_KEYS);
+
+_toFastProperties(_placeholders.PLACEHOLDERS_ALIAS);
+
+_toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS);
+
+const TYPES = [].concat(Object.keys(_utils.VISITOR_KEYS), Object.keys(_utils.FLIPPED_ALIAS_KEYS), Object.keys(_utils.DEPRECATED_KEYS));
+exports.TYPES = TYPES; \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/definitions/jsx.js b/node_modules/@babel/types/lib/definitions/jsx.js
new file mode 100644
index 0000000..4d7fb75
--- /dev/null
+++ b/node_modules/@babel/types/lib/definitions/jsx.js
@@ -0,0 +1,156 @@
+"use strict";
+
+var _utils = require("./utils");
+
+const defineType = (0, _utils.defineAliasedType)("JSX");
+defineType("JSXAttribute", {
+ visitor: ["name", "value"],
+ aliases: ["Immutable"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXNamespacedName")
+ },
+ value: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("JSXElement", "JSXFragment", "StringLiteral", "JSXExpressionContainer")
+ }
+ }
+});
+defineType("JSXClosingElement", {
+ visitor: ["name"],
+ aliases: ["Immutable"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
+ }
+ }
+});
+defineType("JSXElement", {
+ builder: ["openingElement", "closingElement", "children", "selfClosing"],
+ visitor: ["openingElement", "children", "closingElement"],
+ aliases: ["Immutable", "Expression"],
+ fields: {
+ openingElement: {
+ validate: (0, _utils.assertNodeType)("JSXOpeningElement")
+ },
+ closingElement: {
+ optional: true,
+ validate: (0, _utils.assertNodeType)("JSXClosingElement")
+ },
+ children: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
+ },
+ selfClosing: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ }
+ }
+});
+defineType("JSXEmptyExpression", {});
+defineType("JSXExpressionContainer", {
+ visitor: ["expression"],
+ aliases: ["Immutable"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression", "JSXEmptyExpression")
+ }
+ }
+});
+defineType("JSXSpreadChild", {
+ visitor: ["expression"],
+ aliases: ["Immutable"],
+ fields: {
+ expression: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+defineType("JSXIdentifier", {
+ builder: ["name"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ }
+});
+defineType("JSXMemberExpression", {
+ visitor: ["object", "property"],
+ fields: {
+ object: {
+ validate: (0, _utils.assertNodeType)("JSXMemberExpression", "JSXIdentifier")
+ },
+ property: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier")
+ }
+ }
+});
+defineType("JSXNamespacedName", {
+ visitor: ["namespace", "name"],
+ fields: {
+ namespace: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier")
+ },
+ name: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier")
+ }
+ }
+});
+defineType("JSXOpeningElement", {
+ builder: ["name", "attributes", "selfClosing"],
+ visitor: ["name", "attributes"],
+ aliases: ["Immutable"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertNodeType)("JSXIdentifier", "JSXMemberExpression", "JSXNamespacedName")
+ },
+ selfClosing: {
+ default: false
+ },
+ attributes: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXAttribute", "JSXSpreadAttribute")))
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
+ optional: true
+ }
+ }
+});
+defineType("JSXSpreadAttribute", {
+ visitor: ["argument"],
+ fields: {
+ argument: {
+ validate: (0, _utils.assertNodeType)("Expression")
+ }
+ }
+});
+defineType("JSXText", {
+ aliases: ["Immutable"],
+ builder: ["value"],
+ fields: {
+ value: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ }
+});
+defineType("JSXFragment", {
+ builder: ["openingFragment", "closingFragment", "children"],
+ visitor: ["openingFragment", "children", "closingFragment"],
+ aliases: ["Immutable", "Expression"],
+ fields: {
+ openingFragment: {
+ validate: (0, _utils.assertNodeType)("JSXOpeningFragment")
+ },
+ closingFragment: {
+ validate: (0, _utils.assertNodeType)("JSXClosingFragment")
+ },
+ children: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("JSXText", "JSXExpressionContainer", "JSXSpreadChild", "JSXElement", "JSXFragment")))
+ }
+ }
+});
+defineType("JSXOpeningFragment", {
+ aliases: ["Immutable"]
+});
+defineType("JSXClosingFragment", {
+ aliases: ["Immutable"]
+}); \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/definitions/misc.js b/node_modules/@babel/types/lib/definitions/misc.js
new file mode 100644
index 0000000..07898bd
--- /dev/null
+++ b/node_modules/@babel/types/lib/definitions/misc.js
@@ -0,0 +1,32 @@
+"use strict";
+
+var _utils = require("./utils");
+
+var _placeholders = require("./placeholders");
+
+const defineType = (0, _utils.defineAliasedType)("Miscellaneous");
+{
+ defineType("Noop", {
+ visitor: []
+ });
+}
+defineType("Placeholder", {
+ visitor: [],
+ builder: ["expectedNode", "name"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertNodeType)("Identifier")
+ },
+ expectedNode: {
+ validate: (0, _utils.assertOneOf)(..._placeholders.PLACEHOLDERS)
+ }
+ }
+});
+defineType("V8IntrinsicIdentifier", {
+ builder: ["name"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertValueType)("string")
+ }
+ }
+}); \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/definitions/placeholders.js b/node_modules/@babel/types/lib/definitions/placeholders.js
new file mode 100644
index 0000000..7277239
--- /dev/null
+++ b/node_modules/@babel/types/lib/definitions/placeholders.js
@@ -0,0 +1,33 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0;
+
+var _utils = require("./utils");
+
+const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"];
+exports.PLACEHOLDERS = PLACEHOLDERS;
+const PLACEHOLDERS_ALIAS = {
+ Declaration: ["Statement"],
+ Pattern: ["PatternLike", "LVal"]
+};
+exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS;
+
+for (const type of PLACEHOLDERS) {
+ const alias = _utils.ALIAS_KEYS[type];
+ if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type] = alias;
+}
+
+const PLACEHOLDERS_FLIPPED_ALIAS = {};
+exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS;
+Object.keys(PLACEHOLDERS_ALIAS).forEach(type => {
+ PLACEHOLDERS_ALIAS[type].forEach(alias => {
+ if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {
+ PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];
+ }
+
+ PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);
+ });
+}); \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/definitions/typescript.js b/node_modules/@babel/types/lib/definitions/typescript.js
new file mode 100644
index 0000000..3f4382a
--- /dev/null
+++ b/node_modules/@babel/types/lib/definitions/typescript.js
@@ -0,0 +1,470 @@
+"use strict";
+
+var _utils = require("./utils");
+
+var _core = require("./core");
+
+var _is = require("../validators/is");
+
+const defineType = (0, _utils.defineAliasedType)("TypeScript");
+const bool = (0, _utils.assertValueType)("boolean");
+const tSFunctionTypeAnnotationCommon = {
+ returnType: {
+ validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
+ optional: true
+ },
+ typeParameters: {
+ validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
+ optional: true
+ }
+};
+defineType("TSParameterProperty", {
+ aliases: ["LVal"],
+ visitor: ["parameter"],
+ fields: {
+ accessibility: {
+ validate: (0, _utils.assertOneOf)("public", "private", "protected"),
+ optional: true
+ },
+ readonly: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ parameter: {
+ validate: (0, _utils.assertNodeType)("Identifier", "AssignmentPattern")
+ },
+ override: {
+ validate: (0, _utils.assertValueType)("boolean"),
+ optional: true
+ },
+ decorators: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
+ optional: true
+ }
+ }
+});
+defineType("TSDeclareFunction", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "typeParameters", "params", "returnType"],
+ fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
+});
+defineType("TSDeclareMethod", {
+ visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
+ fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
+});
+defineType("TSQualifiedName", {
+ aliases: ["TSEntityName"],
+ visitor: ["left", "right"],
+ fields: {
+ left: (0, _utils.validateType)("TSEntityName"),
+ right: (0, _utils.validateType)("Identifier")
+ }
+});
+const signatureDeclarationCommon = {
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
+ ["parameters"]: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
+ ["typeAnnotation"]: (0, _utils.validateOptionalType)("TSTypeAnnotation")
+};
+const callConstructSignatureDeclaration = {
+ aliases: ["TSTypeElement"],
+ visitor: ["typeParameters", "parameters", "typeAnnotation"],
+ fields: signatureDeclarationCommon
+};
+defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
+defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
+const namedTypeElementCommon = {
+ key: (0, _utils.validateType)("Expression"),
+ computed: (0, _utils.validate)(bool),
+ optional: (0, _utils.validateOptional)(bool)
+};
+defineType("TSPropertySignature", {
+ aliases: ["TSTypeElement"],
+ visitor: ["key", "typeAnnotation", "initializer"],
+ fields: Object.assign({}, namedTypeElementCommon, {
+ readonly: (0, _utils.validateOptional)(bool),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
+ initializer: (0, _utils.validateOptionalType)("Expression"),
+ kind: {
+ validate: (0, _utils.assertOneOf)("get", "set")
+ }
+ })
+});
+defineType("TSMethodSignature", {
+ aliases: ["TSTypeElement"],
+ visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
+ fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
+ kind: {
+ validate: (0, _utils.assertOneOf)("method", "get", "set")
+ }
+ })
+});
+defineType("TSIndexSignature", {
+ aliases: ["TSTypeElement"],
+ visitor: ["parameters", "typeAnnotation"],
+ fields: {
+ readonly: (0, _utils.validateOptional)(bool),
+ static: (0, _utils.validateOptional)(bool),
+ parameters: (0, _utils.validateArrayOfType)("Identifier"),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation")
+ }
+});
+const tsKeywordTypes = ["TSAnyKeyword", "TSBooleanKeyword", "TSBigIntKeyword", "TSIntrinsicKeyword", "TSNeverKeyword", "TSNullKeyword", "TSNumberKeyword", "TSObjectKeyword", "TSStringKeyword", "TSSymbolKeyword", "TSUndefinedKeyword", "TSUnknownKeyword", "TSVoidKeyword"];
+
+for (const type of tsKeywordTypes) {
+ defineType(type, {
+ aliases: ["TSType", "TSBaseType"],
+ visitor: [],
+ fields: {}
+ });
+}
+
+defineType("TSThisType", {
+ aliases: ["TSType", "TSBaseType"],
+ visitor: [],
+ fields: {}
+});
+const fnOrCtrBase = {
+ aliases: ["TSType"],
+ visitor: ["typeParameters", "parameters", "typeAnnotation"]
+};
+defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, {
+ fields: signatureDeclarationCommon
+}));
+defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, {
+ fields: Object.assign({}, signatureDeclarationCommon, {
+ abstract: (0, _utils.validateOptional)(bool)
+ })
+}));
+defineType("TSTypeReference", {
+ aliases: ["TSType"],
+ visitor: ["typeName", "typeParameters"],
+ fields: {
+ typeName: (0, _utils.validateType)("TSEntityName"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
+ }
+});
+defineType("TSTypePredicate", {
+ aliases: ["TSType"],
+ visitor: ["parameterName", "typeAnnotation"],
+ builder: ["parameterName", "typeAnnotation", "asserts"],
+ fields: {
+ parameterName: (0, _utils.validateType)(["Identifier", "TSThisType"]),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
+ asserts: (0, _utils.validateOptional)(bool)
+ }
+});
+defineType("TSTypeQuery", {
+ aliases: ["TSType"],
+ visitor: ["exprName"],
+ fields: {
+ exprName: (0, _utils.validateType)(["TSEntityName", "TSImportType"])
+ }
+});
+defineType("TSTypeLiteral", {
+ aliases: ["TSType"],
+ visitor: ["members"],
+ fields: {
+ members: (0, _utils.validateArrayOfType)("TSTypeElement")
+ }
+});
+defineType("TSArrayType", {
+ aliases: ["TSType"],
+ visitor: ["elementType"],
+ fields: {
+ elementType: (0, _utils.validateType)("TSType")
+ }
+});
+defineType("TSTupleType", {
+ aliases: ["TSType"],
+ visitor: ["elementTypes"],
+ fields: {
+ elementTypes: (0, _utils.validateArrayOfType)(["TSType", "TSNamedTupleMember"])
+ }
+});
+defineType("TSOptionalType", {
+ aliases: ["TSType"],
+ visitor: ["typeAnnotation"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+defineType("TSRestType", {
+ aliases: ["TSType"],
+ visitor: ["typeAnnotation"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+defineType("TSNamedTupleMember", {
+ visitor: ["label", "elementType"],
+ builder: ["label", "elementType", "optional"],
+ fields: {
+ label: (0, _utils.validateType)("Identifier"),
+ optional: {
+ validate: bool,
+ default: false
+ },
+ elementType: (0, _utils.validateType)("TSType")
+ }
+});
+const unionOrIntersection = {
+ aliases: ["TSType"],
+ visitor: ["types"],
+ fields: {
+ types: (0, _utils.validateArrayOfType)("TSType")
+ }
+};
+defineType("TSUnionType", unionOrIntersection);
+defineType("TSIntersectionType", unionOrIntersection);
+defineType("TSConditionalType", {
+ aliases: ["TSType"],
+ visitor: ["checkType", "extendsType", "trueType", "falseType"],
+ fields: {
+ checkType: (0, _utils.validateType)("TSType"),
+ extendsType: (0, _utils.validateType)("TSType"),
+ trueType: (0, _utils.validateType)("TSType"),
+ falseType: (0, _utils.validateType)("TSType")
+ }
+});
+defineType("TSInferType", {
+ aliases: ["TSType"],
+ visitor: ["typeParameter"],
+ fields: {
+ typeParameter: (0, _utils.validateType)("TSTypeParameter")
+ }
+});
+defineType("TSParenthesizedType", {
+ aliases: ["TSType"],
+ visitor: ["typeAnnotation"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+defineType("TSTypeOperator", {
+ aliases: ["TSType"],
+ visitor: ["typeAnnotation"],
+ fields: {
+ operator: (0, _utils.validate)((0, _utils.assertValueType)("string")),
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+defineType("TSIndexedAccessType", {
+ aliases: ["TSType"],
+ visitor: ["objectType", "indexType"],
+ fields: {
+ objectType: (0, _utils.validateType)("TSType"),
+ indexType: (0, _utils.validateType)("TSType")
+ }
+});
+defineType("TSMappedType", {
+ aliases: ["TSType"],
+ visitor: ["typeParameter", "typeAnnotation", "nameType"],
+ fields: {
+ readonly: (0, _utils.validateOptional)(bool),
+ typeParameter: (0, _utils.validateType)("TSTypeParameter"),
+ optional: (0, _utils.validateOptional)(bool),
+ typeAnnotation: (0, _utils.validateOptionalType)("TSType"),
+ nameType: (0, _utils.validateOptionalType)("TSType")
+ }
+});
+defineType("TSLiteralType", {
+ aliases: ["TSType", "TSBaseType"],
+ visitor: ["literal"],
+ fields: {
+ literal: {
+ validate: function () {
+ const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral");
+ const unaryOperator = (0, _utils.assertOneOf)("-");
+ const literal = (0, _utils.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral");
+
+ function validator(parent, key, node) {
+ if ((0, _is.default)("UnaryExpression", node)) {
+ unaryOperator(node, "operator", node.operator);
+ unaryExpression(node, "argument", node.argument);
+ } else {
+ literal(parent, key, node);
+ }
+ }
+
+ validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "UnaryExpression"];
+ return validator;
+ }()
+ }
+ }
+});
+defineType("TSExpressionWithTypeArguments", {
+ aliases: ["TSType"],
+ visitor: ["expression", "typeParameters"],
+ fields: {
+ expression: (0, _utils.validateType)("TSEntityName"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
+ }
+});
+defineType("TSInterfaceDeclaration", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "typeParameters", "extends", "body"],
+ fields: {
+ declare: (0, _utils.validateOptional)(bool),
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
+ extends: (0, _utils.validateOptional)((0, _utils.arrayOfType)("TSExpressionWithTypeArguments")),
+ body: (0, _utils.validateType)("TSInterfaceBody")
+ }
+});
+defineType("TSInterfaceBody", {
+ visitor: ["body"],
+ fields: {
+ body: (0, _utils.validateArrayOfType)("TSTypeElement")
+ }
+});
+defineType("TSTypeAliasDeclaration", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "typeParameters", "typeAnnotation"],
+ fields: {
+ declare: (0, _utils.validateOptional)(bool),
+ id: (0, _utils.validateType)("Identifier"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+defineType("TSAsExpression", {
+ aliases: ["Expression"],
+ visitor: ["expression", "typeAnnotation"],
+ fields: {
+ expression: (0, _utils.validateType)("Expression"),
+ typeAnnotation: (0, _utils.validateType)("TSType")
+ }
+});
+defineType("TSTypeAssertion", {
+ aliases: ["Expression"],
+ visitor: ["typeAnnotation", "expression"],
+ fields: {
+ typeAnnotation: (0, _utils.validateType)("TSType"),
+ expression: (0, _utils.validateType)("Expression")
+ }
+});
+defineType("TSEnumDeclaration", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "members"],
+ fields: {
+ declare: (0, _utils.validateOptional)(bool),
+ const: (0, _utils.validateOptional)(bool),
+ id: (0, _utils.validateType)("Identifier"),
+ members: (0, _utils.validateArrayOfType)("TSEnumMember"),
+ initializer: (0, _utils.validateOptionalType)("Expression")
+ }
+});
+defineType("TSEnumMember", {
+ visitor: ["id", "initializer"],
+ fields: {
+ id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
+ initializer: (0, _utils.validateOptionalType)("Expression")
+ }
+});
+defineType("TSModuleDeclaration", {
+ aliases: ["Statement", "Declaration"],
+ visitor: ["id", "body"],
+ fields: {
+ declare: (0, _utils.validateOptional)(bool),
+ global: (0, _utils.validateOptional)(bool),
+ id: (0, _utils.validateType)(["Identifier", "StringLiteral"]),
+ body: (0, _utils.validateType)(["TSModuleBlock", "TSModuleDeclaration"])
+ }
+});
+defineType("TSModuleBlock", {
+ aliases: ["Scopable", "Block", "BlockParent"],
+ visitor: ["body"],
+ fields: {
+ body: (0, _utils.validateArrayOfType)("Statement")
+ }
+});
+defineType("TSImportType", {
+ aliases: ["TSType"],
+ visitor: ["argument", "qualifier", "typeParameters"],
+ fields: {
+ argument: (0, _utils.validateType)("StringLiteral"),
+ qualifier: (0, _utils.validateOptionalType)("TSEntityName"),
+ typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
+ }
+});
+defineType("TSImportEqualsDeclaration", {
+ aliases: ["Statement"],
+ visitor: ["id", "moduleReference"],
+ fields: {
+ isExport: (0, _utils.validate)(bool),
+ id: (0, _utils.validateType)("Identifier"),
+ moduleReference: (0, _utils.validateType)(["TSEntityName", "TSExternalModuleReference"]),
+ importKind: {
+ validate: (0, _utils.assertOneOf)("type", "value"),
+ optional: true
+ }
+ }
+});
+defineType("TSExternalModuleReference", {
+ visitor: ["expression"],
+ fields: {
+ expression: (0, _utils.validateType)("StringLiteral")
+ }
+});
+defineType("TSNonNullExpression", {
+ aliases: ["Expression"],
+ visitor: ["expression"],
+ fields: {
+ expression: (0, _utils.validateType)("Expression")
+ }
+});
+defineType("TSExportAssignment", {
+ aliases: ["Statement"],
+ visitor: ["expression"],
+ fields: {
+ expression: (0, _utils.validateType)("Expression")
+ }
+});
+defineType("TSNamespaceExportDeclaration", {
+ aliases: ["Statement"],
+ visitor: ["id"],
+ fields: {
+ id: (0, _utils.validateType)("Identifier")
+ }
+});
+defineType("TSTypeAnnotation", {
+ visitor: ["typeAnnotation"],
+ fields: {
+ typeAnnotation: {
+ validate: (0, _utils.assertNodeType)("TSType")
+ }
+ }
+});
+defineType("TSTypeParameterInstantiation", {
+ visitor: ["params"],
+ fields: {
+ params: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSType")))
+ }
+ }
+});
+defineType("TSTypeParameterDeclaration", {
+ visitor: ["params"],
+ fields: {
+ params: {
+ validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("TSTypeParameter")))
+ }
+ }
+});
+defineType("TSTypeParameter", {
+ builder: ["constraint", "default", "name"],
+ visitor: ["constraint", "default"],
+ fields: {
+ name: {
+ validate: (0, _utils.assertValueType)("string")
+ },
+ constraint: {
+ validate: (0, _utils.assertNodeType)("TSType"),
+ optional: true
+ },
+ default: {
+ validate: (0, _utils.assertNodeType)("TSType"),
+ optional: true
+ }
+ }
+}); \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/definitions/utils.js b/node_modules/@babel/types/lib/definitions/utils.js
new file mode 100644
index 0000000..70263e5
--- /dev/null
+++ b/node_modules/@babel/types/lib/definitions/utils.js
@@ -0,0 +1,343 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.VISITOR_KEYS = exports.NODE_PARENT_VALIDATIONS = exports.NODE_FIELDS = exports.FLIPPED_ALIAS_KEYS = exports.DEPRECATED_KEYS = exports.BUILDER_KEYS = exports.ALIAS_KEYS = void 0;
+exports.arrayOf = arrayOf;
+exports.arrayOfType = arrayOfType;
+exports.assertEach = assertEach;
+exports.assertNodeOrValueType = assertNodeOrValueType;
+exports.assertNodeType = assertNodeType;
+exports.assertOneOf = assertOneOf;
+exports.assertOptionalChainStart = assertOptionalChainStart;
+exports.assertShape = assertShape;
+exports.assertValueType = assertValueType;
+exports.chain = chain;
+exports.default = defineType;
+exports.defineAliasedType = defineAliasedType;
+exports.typeIs = typeIs;
+exports.validate = validate;
+exports.validateArrayOfType = validateArrayOfType;
+exports.validateOptional = validateOptional;
+exports.validateOptionalType = validateOptionalType;
+exports.validateType = validateType;
+
+var _is = require("../validators/is");
+
+var _validate = require("../validators/validate");
+
+const VISITOR_KEYS = {};
+exports.VISITOR_KEYS = VISITOR_KEYS;
+const ALIAS_KEYS = {};
+exports.ALIAS_KEYS = ALIAS_KEYS;
+const FLIPPED_ALIAS_KEYS = {};
+exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS;
+const NODE_FIELDS = {};
+exports.NODE_FIELDS = NODE_FIELDS;
+const BUILDER_KEYS = {};
+exports.BUILDER_KEYS = BUILDER_KEYS;
+const DEPRECATED_KEYS = {};
+exports.DEPRECATED_KEYS = DEPRECATED_KEYS;
+const NODE_PARENT_VALIDATIONS = {};
+exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS;
+
+function getType(val) {
+ if (Array.isArray(val)) {
+ return "array";
+ } else if (val === null) {
+ return "null";
+ } else {
+ return typeof val;
+ }
+}
+
+function validate(validate) {
+ return {
+ validate
+ };
+}
+
+function typeIs(typeName) {
+ return typeof typeName === "string" ? assertNodeType(typeName) : assertNodeType(...typeName);
+}
+
+function validateType(typeName) {
+ return validate(typeIs(typeName));
+}
+
+function validateOptional(validate) {
+ return {
+ validate,
+ optional: true
+ };
+}
+
+function validateOptionalType(typeName) {
+ return {
+ validate: typeIs(typeName),
+ optional: true
+ };
+}
+
+function arrayOf(elementType) {
+ return chain(assertValueType("array"), assertEach(elementType));
+}
+
+function arrayOfType(typeName) {
+ return arrayOf(typeIs(typeName));
+}
+
+function validateArrayOfType(typeName) {
+ return validate(arrayOfType(typeName));
+}
+
+function assertEach(callback) {
+ function validator(node, key, val) {
+ if (!Array.isArray(val)) return;
+
+ for (let i = 0; i < val.length; i++) {
+ const subkey = `${key}[${i}]`;
+ const v = val[i];
+ callback(node, subkey, v);
+ if (process.env.BABEL_TYPES_8_BREAKING) (0, _validate.validateChild)(node, subkey, v);
+ }
+ }
+
+ validator.each = callback;
+ return validator;
+}
+
+function assertOneOf(...values) {
+ function validate(node, key, val) {
+ if (values.indexOf(val) < 0) {
+ throw new TypeError(`Property ${key} expected value to be one of ${JSON.stringify(values)} but got ${JSON.stringify(val)}`);
+ }
+ }
+
+ validate.oneOf = values;
+ return validate;
+}
+
+function assertNodeType(...types) {
+ function validate(node, key, val) {
+ for (const type of types) {
+ if ((0, _is.default)(type, val)) {
+ (0, _validate.validateChild)(node, key, val);
+ return;
+ }
+ }
+
+ throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
+ }
+
+ validate.oneOfNodeTypes = types;
+ return validate;
+}
+
+function assertNodeOrValueType(...types) {
+ function validate(node, key, val) {
+ for (const type of types) {
+ if (getType(val) === type || (0, _is.default)(type, val)) {
+ (0, _validate.validateChild)(node, key, val);
+ return;
+ }
+ }
+
+ throw new TypeError(`Property ${key} of ${node.type} expected node to be of a type ${JSON.stringify(types)} but instead got ${JSON.stringify(val == null ? void 0 : val.type)}`);
+ }
+
+ validate.oneOfNodeOrValueTypes = types;
+ return validate;
+}
+
+function assertValueType(type) {
+ function validate(node, key, val) {
+ const valid = getType(val) === type;
+
+ if (!valid) {
+ throw new TypeError(`Property ${key} expected type of ${type} but got ${getType(val)}`);
+ }
+ }
+
+ validate.type = type;
+ return validate;
+}
+
+function assertShape(shape) {
+ function validate(node, key, val) {
+ const errors = [];
+
+ for (const property of Object.keys(shape)) {
+ try {
+ (0, _validate.validateField)(node, property, val[property], shape[property]);
+ } catch (error) {
+ if (error instanceof TypeError) {
+ errors.push(error.message);
+ continue;
+ }
+
+ throw error;
+ }
+ }
+
+ if (errors.length) {
+ throw new TypeError(`Property ${key} of ${node.type} expected to have the following:\n${errors.join("\n")}`);
+ }
+ }
+
+ validate.shapeOf = shape;
+ return validate;
+}
+
+function assertOptionalChainStart() {
+ function validate(node) {
+ var _current;
+
+ let current = node;
+
+ while (node) {
+ const {
+ type
+ } = current;
+
+ if (type === "OptionalCallExpression") {
+ if (current.optional) return;
+ current = current.callee;
+ continue;
+ }
+
+ if (type === "OptionalMemberExpression") {
+ if (current.optional) return;
+ current = current.object;
+ continue;
+ }
+
+ break;
+ }
+
+ throw new TypeError(`Non-optional ${node.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${(_current = current) == null ? void 0 : _current.type}`);
+ }
+
+ return validate;
+}
+
+function chain(...fns) {
+ function validate(...args) {
+ for (const fn of fns) {
+ fn(...args);
+ }
+ }
+
+ validate.chainOf = fns;
+
+ if (fns.length >= 2 && "type" in fns[0] && fns[0].type === "array" && !("each" in fns[1])) {
+ throw new Error(`An assertValueType("array") validator can only be followed by an assertEach(...) validator.`);
+ }
+
+ return validate;
+}
+
+const validTypeOpts = ["aliases", "builder", "deprecatedAlias", "fields", "inherits", "visitor", "validate"];
+const validFieldKeys = ["default", "optional", "validate"];
+
+function defineAliasedType(...aliases) {
+ return (type, opts = {}) => {
+ let defined = opts.aliases;
+
+ if (!defined) {
+ var _store$opts$inherits$, _defined;
+
+ if (opts.inherits) defined = (_store$opts$inherits$ = store[opts.inherits].aliases) == null ? void 0 : _store$opts$inherits$.slice();
+ (_defined = defined) != null ? _defined : defined = [];
+ opts.aliases = defined;
+ }
+
+ const additional = aliases.filter(a => !defined.includes(a));
+ defined.unshift(...additional);
+ return defineType(type, opts);
+ };
+}
+
+function defineType(type, opts = {}) {
+ const inherits = opts.inherits && store[opts.inherits] || {};
+ let fields = opts.fields;
+
+ if (!fields) {
+ fields = {};
+
+ if (inherits.fields) {
+ const keys = Object.getOwnPropertyNames(inherits.fields);
+
+ for (const key of keys) {
+ const field = inherits.fields[key];
+ const def = field.default;
+
+ if (Array.isArray(def) ? def.length > 0 : def && typeof def === "object") {
+ throw new Error("field defaults can only be primitives or empty arrays currently");
+ }
+
+ fields[key] = {
+ default: Array.isArray(def) ? [] : def,
+ optional: field.optional,
+ validate: field.validate
+ };
+ }
+ }
+ }
+
+ const visitor = opts.visitor || inherits.visitor || [];
+ const aliases = opts.aliases || inherits.aliases || [];
+ const builder = opts.builder || inherits.builder || opts.visitor || [];
+
+ for (const k of Object.keys(opts)) {
+ if (validTypeOpts.indexOf(k) === -1) {
+ throw new Error(`Unknown type option "${k}" on ${type}`);
+ }
+ }
+
+ if (opts.deprecatedAlias) {
+ DEPRECATED_KEYS[opts.deprecatedAlias] = type;
+ }
+
+ for (const key of visitor.concat(builder)) {
+ fields[key] = fields[key] || {};
+ }
+
+ for (const key of Object.keys(fields)) {
+ const field = fields[key];
+
+ if (field.default !== undefined && builder.indexOf(key) === -1) {
+ field.optional = true;
+ }
+
+ if (field.default === undefined) {
+ field.default = null;
+ } else if (!field.validate && field.default != null) {
+ field.validate = assertValueType(getType(field.default));
+ }
+
+ for (const k of Object.keys(field)) {
+ if (validFieldKeys.indexOf(k) === -1) {
+ throw new Error(`Unknown field key "${k}" on ${type}.${key}`);
+ }
+ }
+ }
+
+ VISITOR_KEYS[type] = opts.visitor = visitor;
+ BUILDER_KEYS[type] = opts.builder = builder;
+ NODE_FIELDS[type] = opts.fields = fields;
+ ALIAS_KEYS[type] = opts.aliases = aliases;
+ aliases.forEach(alias => {
+ FLIPPED_ALIAS_KEYS[alias] = FLIPPED_ALIAS_KEYS[alias] || [];
+ FLIPPED_ALIAS_KEYS[alias].push(type);
+ });
+
+ if (opts.validate) {
+ NODE_PARENT_VALIDATIONS[type] = opts.validate;
+ }
+
+ store[type] = opts;
+}
+
+const store = {}; \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/index-legacy.d.ts b/node_modules/@babel/types/lib/index-legacy.d.ts
new file mode 100644
index 0000000..9c81afe
--- /dev/null
+++ b/node_modules/@babel/types/lib/index-legacy.d.ts
@@ -0,0 +1,2717 @@
+// NOTE: This file is autogenerated. Do not modify.
+// See packages/babel-types/scripts/generators/typescript-legacy.js for script used.
+
+interface BaseComment {
+ value: string;
+ start: number;
+ end: number;
+ loc: SourceLocation;
+ type: "CommentBlock" | "CommentLine";
+}
+
+export interface CommentBlock extends BaseComment {
+ type: "CommentBlock";
+}
+
+export interface CommentLine extends BaseComment {
+ type: "CommentLine";
+}
+
+export type Comment = CommentBlock | CommentLine;
+
+export interface SourceLocation {
+ start: {
+ line: number;
+ column: number;
+ };
+
+ end: {
+ line: number;
+ column: number;
+ };
+}
+
+interface BaseNode {
+ leadingComments: ReadonlyArray<Comment> | null;
+ innerComments: ReadonlyArray<Comment> | null;
+ trailingComments: ReadonlyArray<Comment> | null;
+ start: number | null;
+ end: number | null;
+ loc: SourceLocation | null;
+ type: Node["type"];
+ extra?: Record<string, unknown>;
+}
+
+export type Node = Accessor | AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | Binary | BinaryExpression | BindExpression | Block | BlockParent | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | Class | ClassAccessorProperty | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | CompletionStatement | Conditional | ConditionalExpression | ContinueStatement | DebuggerStatement | DecimalLiteral | Declaration | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBody | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | Expression | ExpressionStatement | ExpressionWrapper | File | Flow | FlowBaseAnnotation | FlowDeclaration | FlowPredicate | FlowType | For | ForInStatement | ForOfStatement | ForStatement | ForXStatement | Function | FunctionDeclaration | FunctionExpression | FunctionParent | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Immutable | Import | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | IndexedAccessType | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSX | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LVal | LabeledStatement | Literal | LogicalExpression | Loop | MemberExpression | MetaProperty | Method | Miscellaneous | MixedTypeAnnotation | ModuleDeclaration | ModuleExpression | ModuleSpecifier | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMember | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalIndexedAccessType | OptionalMemberExpression | ParenthesizedExpression | Pattern | PatternLike | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | Private | PrivateName | Program | Property | Pureish | QualifiedTypeIdentifier | RecordExpression | RegExpLiteral | RegexLiteral | RestElement | RestProperty | ReturnStatement | Scopable | SequenceExpression | SpreadElement | SpreadProperty | Standardized | Statement | StaticBlock | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBaseType | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEntityName | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeElement | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | Terminatorless | ThisExpression | ThisTypeAnnotation | ThrowStatement | TopicReference | TryStatement | TupleExpression | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeScript | TypeofTypeAnnotation | UnaryExpression | UnaryLike | UnionTypeAnnotation | UpdateExpression | UserWhitespacable | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | While | WhileStatement | WithStatement | YieldExpression;
+
+export interface ArrayExpression extends BaseNode {
+ type: "ArrayExpression";
+ elements: Array<null | Expression | SpreadElement>;
+}
+
+export interface AssignmentExpression extends BaseNode {
+ type: "AssignmentExpression";
+ operator: string;
+ left: LVal;
+ right: Expression;
+}
+
+export interface BinaryExpression extends BaseNode {
+ type: "BinaryExpression";
+ operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=";
+ left: Expression | PrivateName;
+ right: Expression;
+}
+
+export interface InterpreterDirective extends BaseNode {
+ type: "InterpreterDirective";
+ value: string;
+}
+
+export interface Directive extends BaseNode {
+ type: "Directive";
+ value: DirectiveLiteral;
+}
+
+export interface DirectiveLiteral extends BaseNode {
+ type: "DirectiveLiteral";
+ value: string;
+}
+
+export interface BlockStatement extends BaseNode {
+ type: "BlockStatement";
+ body: Array<Statement>;
+ directives: Array<Directive>;
+}
+
+export interface BreakStatement extends BaseNode {
+ type: "BreakStatement";
+ label: Identifier | null;
+}
+
+export interface CallExpression extends BaseNode {
+ type: "CallExpression";
+ callee: Expression | V8IntrinsicIdentifier;
+ arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>;
+ optional: true | false | null;
+ typeArguments: TypeParameterInstantiation | null;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface CatchClause extends BaseNode {
+ type: "CatchClause";
+ param: Identifier | ArrayPattern | ObjectPattern | null;
+ body: BlockStatement;
+}
+
+export interface ConditionalExpression extends BaseNode {
+ type: "ConditionalExpression";
+ test: Expression;
+ consequent: Expression;
+ alternate: Expression;
+}
+
+export interface ContinueStatement extends BaseNode {
+ type: "ContinueStatement";
+ label: Identifier | null;
+}
+
+export interface DebuggerStatement extends BaseNode {
+ type: "DebuggerStatement";
+}
+
+export interface DoWhileStatement extends BaseNode {
+ type: "DoWhileStatement";
+ test: Expression;
+ body: Statement;
+}
+
+export interface EmptyStatement extends BaseNode {
+ type: "EmptyStatement";
+}
+
+export interface ExpressionStatement extends BaseNode {
+ type: "ExpressionStatement";
+ expression: Expression;
+}
+
+export interface File extends BaseNode {
+ type: "File";
+ program: Program;
+ comments: Array<CommentBlock | CommentLine> | null;
+ tokens: Array<any> | null;
+}
+
+export interface ForInStatement extends BaseNode {
+ type: "ForInStatement";
+ left: VariableDeclaration | LVal;
+ right: Expression;
+ body: Statement;
+}
+
+export interface ForStatement extends BaseNode {
+ type: "ForStatement";
+ init: VariableDeclaration | Expression | null;
+ test: Expression | null;
+ update: Expression | null;
+ body: Statement;
+}
+
+export interface FunctionDeclaration extends BaseNode {
+ type: "FunctionDeclaration";
+ id: Identifier | null;
+ params: Array<Identifier | Pattern | RestElement>;
+ body: BlockStatement;
+ generator: boolean;
+ async: boolean;
+ declare: boolean | null;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface FunctionExpression extends BaseNode {
+ type: "FunctionExpression";
+ id: Identifier | null;
+ params: Array<Identifier | Pattern | RestElement>;
+ body: BlockStatement;
+ generator: boolean;
+ async: boolean;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface Identifier extends BaseNode {
+ type: "Identifier";
+ name: string;
+ decorators: Array<Decorator> | null;
+ optional: boolean | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+
+export interface IfStatement extends BaseNode {
+ type: "IfStatement";
+ test: Expression;
+ consequent: Statement;
+ alternate: Statement | null;
+}
+
+export interface LabeledStatement extends BaseNode {
+ type: "LabeledStatement";
+ label: Identifier;
+ body: Statement;
+}
+
+export interface StringLiteral extends BaseNode {
+ type: "StringLiteral";
+ value: string;
+}
+
+export interface NumericLiteral extends BaseNode {
+ type: "NumericLiteral";
+ value: number;
+}
+
+export interface NullLiteral extends BaseNode {
+ type: "NullLiteral";
+}
+
+export interface BooleanLiteral extends BaseNode {
+ type: "BooleanLiteral";
+ value: boolean;
+}
+
+export interface RegExpLiteral extends BaseNode {
+ type: "RegExpLiteral";
+ pattern: string;
+ flags: string;
+}
+
+export interface LogicalExpression extends BaseNode {
+ type: "LogicalExpression";
+ operator: "||" | "&&" | "??";
+ left: Expression;
+ right: Expression;
+}
+
+export interface MemberExpression extends BaseNode {
+ type: "MemberExpression";
+ object: Expression;
+ property: Expression | Identifier | PrivateName;
+ computed: boolean;
+ optional: true | false | null;
+}
+
+export interface NewExpression extends BaseNode {
+ type: "NewExpression";
+ callee: Expression | V8IntrinsicIdentifier;
+ arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>;
+ optional: true | false | null;
+ typeArguments: TypeParameterInstantiation | null;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface Program extends BaseNode {
+ type: "Program";
+ body: Array<Statement>;
+ directives: Array<Directive>;
+ sourceType: "script" | "module";
+ interpreter: InterpreterDirective | null;
+ sourceFile: string;
+}
+
+export interface ObjectExpression extends BaseNode {
+ type: "ObjectExpression";
+ properties: Array<ObjectMethod | ObjectProperty | SpreadElement>;
+}
+
+export interface ObjectMethod extends BaseNode {
+ type: "ObjectMethod";
+ kind: "method" | "get" | "set";
+ key: Expression | Identifier | StringLiteral | NumericLiteral;
+ params: Array<Identifier | Pattern | RestElement>;
+ body: BlockStatement;
+ computed: boolean;
+ generator: boolean;
+ async: boolean;
+ decorators: Array<Decorator> | null;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface ObjectProperty extends BaseNode {
+ type: "ObjectProperty";
+ key: Expression | Identifier | StringLiteral | NumericLiteral;
+ value: Expression | PatternLike;
+ computed: boolean;
+ shorthand: boolean;
+ decorators: Array<Decorator> | null;
+}
+
+export interface RestElement extends BaseNode {
+ type: "RestElement";
+ argument: LVal;
+ decorators: Array<Decorator> | null;
+ optional: boolean | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+
+export interface ReturnStatement extends BaseNode {
+ type: "ReturnStatement";
+ argument: Expression | null;
+}
+
+export interface SequenceExpression extends BaseNode {
+ type: "SequenceExpression";
+ expressions: Array<Expression>;
+}
+
+export interface ParenthesizedExpression extends BaseNode {
+ type: "ParenthesizedExpression";
+ expression: Expression;
+}
+
+export interface SwitchCase extends BaseNode {
+ type: "SwitchCase";
+ test: Expression | null;
+ consequent: Array<Statement>;
+}
+
+export interface SwitchStatement extends BaseNode {
+ type: "SwitchStatement";
+ discriminant: Expression;
+ cases: Array<SwitchCase>;
+}
+
+export interface ThisExpression extends BaseNode {
+ type: "ThisExpression";
+}
+
+export interface ThrowStatement extends BaseNode {
+ type: "ThrowStatement";
+ argument: Expression;
+}
+
+export interface TryStatement extends BaseNode {
+ type: "TryStatement";
+ block: BlockStatement;
+ handler: CatchClause | null;
+ finalizer: BlockStatement | null;
+}
+
+export interface UnaryExpression extends BaseNode {
+ type: "UnaryExpression";
+ operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof";
+ argument: Expression;
+ prefix: boolean;
+}
+
+export interface UpdateExpression extends BaseNode {
+ type: "UpdateExpression";
+ operator: "++" | "--";
+ argument: Expression;
+ prefix: boolean;
+}
+
+export interface VariableDeclaration extends BaseNode {
+ type: "VariableDeclaration";
+ kind: "var" | "let" | "const";
+ declarations: Array<VariableDeclarator>;
+ declare: boolean | null;
+}
+
+export interface VariableDeclarator extends BaseNode {
+ type: "VariableDeclarator";
+ id: LVal;
+ init: Expression | null;
+ definite: boolean | null;
+}
+
+export interface WhileStatement extends BaseNode {
+ type: "WhileStatement";
+ test: Expression;
+ body: Statement;
+}
+
+export interface WithStatement extends BaseNode {
+ type: "WithStatement";
+ object: Expression;
+ body: Statement;
+}
+
+export interface AssignmentPattern extends BaseNode {
+ type: "AssignmentPattern";
+ left: Identifier | ObjectPattern | ArrayPattern | MemberExpression;
+ right: Expression;
+ decorators: Array<Decorator> | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+
+export interface ArrayPattern extends BaseNode {
+ type: "ArrayPattern";
+ elements: Array<null | PatternLike>;
+ decorators: Array<Decorator> | null;
+ optional: boolean | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+
+export interface ArrowFunctionExpression extends BaseNode {
+ type: "ArrowFunctionExpression";
+ params: Array<Identifier | Pattern | RestElement>;
+ body: BlockStatement | Expression;
+ async: boolean;
+ expression: boolean;
+ generator: boolean;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface ClassBody extends BaseNode {
+ type: "ClassBody";
+ body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>;
+}
+
+export interface ClassExpression extends BaseNode {
+ type: "ClassExpression";
+ id: Identifier | null;
+ superClass: Expression | null;
+ body: ClassBody;
+ decorators: Array<Decorator> | null;
+ implements: Array<TSExpressionWithTypeArguments | ClassImplements> | null;
+ mixins: InterfaceExtends | null;
+ superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface ClassDeclaration extends BaseNode {
+ type: "ClassDeclaration";
+ id: Identifier;
+ superClass: Expression | null;
+ body: ClassBody;
+ decorators: Array<Decorator> | null;
+ abstract: boolean | null;
+ declare: boolean | null;
+ implements: Array<TSExpressionWithTypeArguments | ClassImplements> | null;
+ mixins: InterfaceExtends | null;
+ superTypeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface ExportAllDeclaration extends BaseNode {
+ type: "ExportAllDeclaration";
+ source: StringLiteral;
+ assertions: Array<ImportAttribute> | null;
+ exportKind: "type" | "value" | null;
+}
+
+export interface ExportDefaultDeclaration extends BaseNode {
+ type: "ExportDefaultDeclaration";
+ declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression;
+ exportKind: "value" | null;
+}
+
+export interface ExportNamedDeclaration extends BaseNode {
+ type: "ExportNamedDeclaration";
+ declaration: Declaration | null;
+ specifiers: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>;
+ source: StringLiteral | null;
+ assertions: Array<ImportAttribute> | null;
+ exportKind: "type" | "value" | null;
+}
+
+export interface ExportSpecifier extends BaseNode {
+ type: "ExportSpecifier";
+ local: Identifier;
+ exported: Identifier | StringLiteral;
+ exportKind: "type" | "value" | null;
+}
+
+export interface ForOfStatement extends BaseNode {
+ type: "ForOfStatement";
+ left: VariableDeclaration | LVal;
+ right: Expression;
+ body: Statement;
+ await: boolean;
+}
+
+export interface ImportDeclaration extends BaseNode {
+ type: "ImportDeclaration";
+ specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
+ source: StringLiteral;
+ assertions: Array<ImportAttribute> | null;
+ importKind: "type" | "typeof" | "value" | null;
+}
+
+export interface ImportDefaultSpecifier extends BaseNode {
+ type: "ImportDefaultSpecifier";
+ local: Identifier;
+}
+
+export interface ImportNamespaceSpecifier extends BaseNode {
+ type: "ImportNamespaceSpecifier";
+ local: Identifier;
+}
+
+export interface ImportSpecifier extends BaseNode {
+ type: "ImportSpecifier";
+ local: Identifier;
+ imported: Identifier | StringLiteral;
+ importKind: "type" | "typeof" | "value" | null;
+}
+
+export interface MetaProperty extends BaseNode {
+ type: "MetaProperty";
+ meta: Identifier;
+ property: Identifier;
+}
+
+export interface ClassMethod extends BaseNode {
+ type: "ClassMethod";
+ kind: "get" | "set" | "method" | "constructor";
+ key: Identifier | StringLiteral | NumericLiteral | Expression;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ body: BlockStatement;
+ computed: boolean;
+ static: boolean;
+ generator: boolean;
+ async: boolean;
+ abstract: boolean | null;
+ access: "public" | "private" | "protected" | null;
+ accessibility: "public" | "private" | "protected" | null;
+ decorators: Array<Decorator> | null;
+ optional: boolean | null;
+ override: boolean;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface ObjectPattern extends BaseNode {
+ type: "ObjectPattern";
+ properties: Array<RestElement | ObjectProperty>;
+ decorators: Array<Decorator> | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+
+export interface SpreadElement extends BaseNode {
+ type: "SpreadElement";
+ argument: Expression;
+}
+
+export interface Super extends BaseNode {
+ type: "Super";
+}
+
+export interface TaggedTemplateExpression extends BaseNode {
+ type: "TaggedTemplateExpression";
+ tag: Expression;
+ quasi: TemplateLiteral;
+ typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+}
+
+export interface TemplateElement extends BaseNode {
+ type: "TemplateElement";
+ value: { raw: string, cooked?: string };
+ tail: boolean;
+}
+
+export interface TemplateLiteral extends BaseNode {
+ type: "TemplateLiteral";
+ quasis: Array<TemplateElement>;
+ expressions: Array<Expression | TSType>;
+}
+
+export interface YieldExpression extends BaseNode {
+ type: "YieldExpression";
+ argument: Expression | null;
+ delegate: boolean;
+}
+
+export interface AwaitExpression extends BaseNode {
+ type: "AwaitExpression";
+ argument: Expression;
+}
+
+export interface Import extends BaseNode {
+ type: "Import";
+}
+
+export interface BigIntLiteral extends BaseNode {
+ type: "BigIntLiteral";
+ value: string;
+}
+
+export interface ExportNamespaceSpecifier extends BaseNode {
+ type: "ExportNamespaceSpecifier";
+ exported: Identifier;
+}
+
+export interface OptionalMemberExpression extends BaseNode {
+ type: "OptionalMemberExpression";
+ object: Expression;
+ property: Expression | Identifier;
+ computed: boolean;
+ optional: boolean;
+}
+
+export interface OptionalCallExpression extends BaseNode {
+ type: "OptionalCallExpression";
+ callee: Expression;
+ arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>;
+ optional: boolean;
+ typeArguments: TypeParameterInstantiation | null;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface ClassProperty extends BaseNode {
+ type: "ClassProperty";
+ key: Identifier | StringLiteral | NumericLiteral | Expression;
+ value: Expression | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ decorators: Array<Decorator> | null;
+ computed: boolean;
+ static: boolean;
+ abstract: boolean | null;
+ accessibility: "public" | "private" | "protected" | null;
+ declare: boolean | null;
+ definite: boolean | null;
+ optional: boolean | null;
+ override: boolean;
+ readonly: boolean | null;
+ variance: Variance | null;
+}
+
+export interface ClassAccessorProperty extends BaseNode {
+ type: "ClassAccessorProperty";
+ key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName;
+ value: Expression | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ decorators: Array<Decorator> | null;
+ computed: boolean;
+ static: boolean;
+ abstract: boolean | null;
+ accessibility: "public" | "private" | "protected" | null;
+ declare: boolean | null;
+ definite: boolean | null;
+ optional: boolean | null;
+ override: boolean;
+ readonly: boolean | null;
+ variance: Variance | null;
+}
+
+export interface ClassPrivateProperty extends BaseNode {
+ type: "ClassPrivateProperty";
+ key: PrivateName;
+ value: Expression | null;
+ decorators: Array<Decorator> | null;
+ static: any;
+ definite: boolean | null;
+ readonly: boolean | null;
+ typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ variance: Variance | null;
+}
+
+export interface ClassPrivateMethod extends BaseNode {
+ type: "ClassPrivateMethod";
+ kind: "get" | "set" | "method" | "constructor";
+ key: PrivateName;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ body: BlockStatement;
+ static: boolean;
+ abstract: boolean | null;
+ access: "public" | "private" | "protected" | null;
+ accessibility: "public" | "private" | "protected" | null;
+ async: boolean;
+ computed: boolean;
+ decorators: Array<Decorator> | null;
+ generator: boolean;
+ optional: boolean | null;
+ override: boolean;
+ returnType: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+
+export interface PrivateName extends BaseNode {
+ type: "PrivateName";
+ id: Identifier;
+}
+
+export interface StaticBlock extends BaseNode {
+ type: "StaticBlock";
+ body: Array<Statement>;
+}
+
+export interface AnyTypeAnnotation extends BaseNode {
+ type: "AnyTypeAnnotation";
+}
+
+export interface ArrayTypeAnnotation extends BaseNode {
+ type: "ArrayTypeAnnotation";
+ elementType: FlowType;
+}
+
+export interface BooleanTypeAnnotation extends BaseNode {
+ type: "BooleanTypeAnnotation";
+}
+
+export interface BooleanLiteralTypeAnnotation extends BaseNode {
+ type: "BooleanLiteralTypeAnnotation";
+ value: boolean;
+}
+
+export interface NullLiteralTypeAnnotation extends BaseNode {
+ type: "NullLiteralTypeAnnotation";
+}
+
+export interface ClassImplements extends BaseNode {
+ type: "ClassImplements";
+ id: Identifier;
+ typeParameters: TypeParameterInstantiation | null;
+}
+
+export interface DeclareClass extends BaseNode {
+ type: "DeclareClass";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ extends: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+ implements: Array<ClassImplements> | null;
+ mixins: Array<InterfaceExtends> | null;
+}
+
+export interface DeclareFunction extends BaseNode {
+ type: "DeclareFunction";
+ id: Identifier;
+ predicate: DeclaredPredicate | null;
+}
+
+export interface DeclareInterface extends BaseNode {
+ type: "DeclareInterface";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ extends: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+ implements: Array<ClassImplements> | null;
+ mixins: Array<InterfaceExtends> | null;
+}
+
+export interface DeclareModule extends BaseNode {
+ type: "DeclareModule";
+ id: Identifier | StringLiteral;
+ body: BlockStatement;
+ kind: "CommonJS" | "ES" | null;
+}
+
+export interface DeclareModuleExports extends BaseNode {
+ type: "DeclareModuleExports";
+ typeAnnotation: TypeAnnotation;
+}
+
+export interface DeclareTypeAlias extends BaseNode {
+ type: "DeclareTypeAlias";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ right: FlowType;
+}
+
+export interface DeclareOpaqueType extends BaseNode {
+ type: "DeclareOpaqueType";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ supertype: FlowType | null;
+ impltype: FlowType | null;
+}
+
+export interface DeclareVariable extends BaseNode {
+ type: "DeclareVariable";
+ id: Identifier;
+}
+
+export interface DeclareExportDeclaration extends BaseNode {
+ type: "DeclareExportDeclaration";
+ declaration: Flow | null;
+ specifiers: Array<ExportSpecifier | ExportNamespaceSpecifier> | null;
+ source: StringLiteral | null;
+ default: boolean | null;
+}
+
+export interface DeclareExportAllDeclaration extends BaseNode {
+ type: "DeclareExportAllDeclaration";
+ source: StringLiteral;
+ exportKind: "type" | "value" | null;
+}
+
+export interface DeclaredPredicate extends BaseNode {
+ type: "DeclaredPredicate";
+ value: Flow;
+}
+
+export interface ExistsTypeAnnotation extends BaseNode {
+ type: "ExistsTypeAnnotation";
+}
+
+export interface FunctionTypeAnnotation extends BaseNode {
+ type: "FunctionTypeAnnotation";
+ typeParameters: TypeParameterDeclaration | null;
+ params: Array<FunctionTypeParam>;
+ rest: FunctionTypeParam | null;
+ returnType: FlowType;
+ this: FunctionTypeParam | null;
+}
+
+export interface FunctionTypeParam extends BaseNode {
+ type: "FunctionTypeParam";
+ name: Identifier | null;
+ typeAnnotation: FlowType;
+ optional: boolean | null;
+}
+
+export interface GenericTypeAnnotation extends BaseNode {
+ type: "GenericTypeAnnotation";
+ id: Identifier | QualifiedTypeIdentifier;
+ typeParameters: TypeParameterInstantiation | null;
+}
+
+export interface InferredPredicate extends BaseNode {
+ type: "InferredPredicate";
+}
+
+export interface InterfaceExtends extends BaseNode {
+ type: "InterfaceExtends";
+ id: Identifier | QualifiedTypeIdentifier;
+ typeParameters: TypeParameterInstantiation | null;
+}
+
+export interface InterfaceDeclaration extends BaseNode {
+ type: "InterfaceDeclaration";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ extends: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+ implements: Array<ClassImplements> | null;
+ mixins: Array<InterfaceExtends> | null;
+}
+
+export interface InterfaceTypeAnnotation extends BaseNode {
+ type: "InterfaceTypeAnnotation";
+ extends: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+}
+
+export interface IntersectionTypeAnnotation extends BaseNode {
+ type: "IntersectionTypeAnnotation";
+ types: Array<FlowType>;
+}
+
+export interface MixedTypeAnnotation extends BaseNode {
+ type: "MixedTypeAnnotation";
+}
+
+export interface EmptyTypeAnnotation extends BaseNode {
+ type: "EmptyTypeAnnotation";
+}
+
+export interface NullableTypeAnnotation extends BaseNode {
+ type: "NullableTypeAnnotation";
+ typeAnnotation: FlowType;
+}
+
+export interface NumberLiteralTypeAnnotation extends BaseNode {
+ type: "NumberLiteralTypeAnnotation";
+ value: number;
+}
+
+export interface NumberTypeAnnotation extends BaseNode {
+ type: "NumberTypeAnnotation";
+}
+
+export interface ObjectTypeAnnotation extends BaseNode {
+ type: "ObjectTypeAnnotation";
+ properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>;
+ indexers: Array<ObjectTypeIndexer> | null;
+ callProperties: Array<ObjectTypeCallProperty> | null;
+ internalSlots: Array<ObjectTypeInternalSlot> | null;
+ exact: boolean;
+ inexact: boolean | null;
+}
+
+export interface ObjectTypeInternalSlot extends BaseNode {
+ type: "ObjectTypeInternalSlot";
+ id: Identifier;
+ value: FlowType;
+ optional: boolean;
+ static: boolean;
+ method: boolean;
+}
+
+export interface ObjectTypeCallProperty extends BaseNode {
+ type: "ObjectTypeCallProperty";
+ value: FlowType;
+ static: boolean;
+}
+
+export interface ObjectTypeIndexer extends BaseNode {
+ type: "ObjectTypeIndexer";
+ id: Identifier | null;
+ key: FlowType;
+ value: FlowType;
+ variance: Variance | null;
+ static: boolean;
+}
+
+export interface ObjectTypeProperty extends BaseNode {
+ type: "ObjectTypeProperty";
+ key: Identifier | StringLiteral;
+ value: FlowType;
+ variance: Variance | null;
+ kind: "init" | "get" | "set";
+ method: boolean;
+ optional: boolean;
+ proto: boolean;
+ static: boolean;
+}
+
+export interface ObjectTypeSpreadProperty extends BaseNode {
+ type: "ObjectTypeSpreadProperty";
+ argument: FlowType;
+}
+
+export interface OpaqueType extends BaseNode {
+ type: "OpaqueType";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ supertype: FlowType | null;
+ impltype: FlowType;
+}
+
+export interface QualifiedTypeIdentifier extends BaseNode {
+ type: "QualifiedTypeIdentifier";
+ id: Identifier;
+ qualification: Identifier | QualifiedTypeIdentifier;
+}
+
+export interface StringLiteralTypeAnnotation extends BaseNode {
+ type: "StringLiteralTypeAnnotation";
+ value: string;
+}
+
+export interface StringTypeAnnotation extends BaseNode {
+ type: "StringTypeAnnotation";
+}
+
+export interface SymbolTypeAnnotation extends BaseNode {
+ type: "SymbolTypeAnnotation";
+}
+
+export interface ThisTypeAnnotation extends BaseNode {
+ type: "ThisTypeAnnotation";
+}
+
+export interface TupleTypeAnnotation extends BaseNode {
+ type: "TupleTypeAnnotation";
+ types: Array<FlowType>;
+}
+
+export interface TypeofTypeAnnotation extends BaseNode {
+ type: "TypeofTypeAnnotation";
+ argument: FlowType;
+}
+
+export interface TypeAlias extends BaseNode {
+ type: "TypeAlias";
+ id: Identifier;
+ typeParameters: TypeParameterDeclaration | null;
+ right: FlowType;
+}
+
+export interface TypeAnnotation extends BaseNode {
+ type: "TypeAnnotation";
+ typeAnnotation: FlowType;
+}
+
+export interface TypeCastExpression extends BaseNode {
+ type: "TypeCastExpression";
+ expression: Expression;
+ typeAnnotation: TypeAnnotation;
+}
+
+export interface TypeParameter extends BaseNode {
+ type: "TypeParameter";
+ bound: TypeAnnotation | null;
+ default: FlowType | null;
+ variance: Variance | null;
+ name: string;
+}
+
+export interface TypeParameterDeclaration extends BaseNode {
+ type: "TypeParameterDeclaration";
+ params: Array<TypeParameter>;
+}
+
+export interface TypeParameterInstantiation extends BaseNode {
+ type: "TypeParameterInstantiation";
+ params: Array<FlowType>;
+}
+
+export interface UnionTypeAnnotation extends BaseNode {
+ type: "UnionTypeAnnotation";
+ types: Array<FlowType>;
+}
+
+export interface Variance extends BaseNode {
+ type: "Variance";
+ kind: "minus" | "plus";
+}
+
+export interface VoidTypeAnnotation extends BaseNode {
+ type: "VoidTypeAnnotation";
+}
+
+export interface EnumDeclaration extends BaseNode {
+ type: "EnumDeclaration";
+ id: Identifier;
+ body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody;
+}
+
+export interface EnumBooleanBody extends BaseNode {
+ type: "EnumBooleanBody";
+ members: Array<EnumBooleanMember>;
+ explicitType: boolean;
+ hasUnknownMembers: boolean;
+}
+
+export interface EnumNumberBody extends BaseNode {
+ type: "EnumNumberBody";
+ members: Array<EnumNumberMember>;
+ explicitType: boolean;
+ hasUnknownMembers: boolean;
+}
+
+export interface EnumStringBody extends BaseNode {
+ type: "EnumStringBody";
+ members: Array<EnumStringMember | EnumDefaultedMember>;
+ explicitType: boolean;
+ hasUnknownMembers: boolean;
+}
+
+export interface EnumSymbolBody extends BaseNode {
+ type: "EnumSymbolBody";
+ members: Array<EnumDefaultedMember>;
+ hasUnknownMembers: boolean;
+}
+
+export interface EnumBooleanMember extends BaseNode {
+ type: "EnumBooleanMember";
+ id: Identifier;
+ init: BooleanLiteral;
+}
+
+export interface EnumNumberMember extends BaseNode {
+ type: "EnumNumberMember";
+ id: Identifier;
+ init: NumericLiteral;
+}
+
+export interface EnumStringMember extends BaseNode {
+ type: "EnumStringMember";
+ id: Identifier;
+ init: StringLiteral;
+}
+
+export interface EnumDefaultedMember extends BaseNode {
+ type: "EnumDefaultedMember";
+ id: Identifier;
+}
+
+export interface IndexedAccessType extends BaseNode {
+ type: "IndexedAccessType";
+ objectType: FlowType;
+ indexType: FlowType;
+}
+
+export interface OptionalIndexedAccessType extends BaseNode {
+ type: "OptionalIndexedAccessType";
+ objectType: FlowType;
+ indexType: FlowType;
+ optional: boolean;
+}
+
+export interface JSXAttribute extends BaseNode {
+ type: "JSXAttribute";
+ name: JSXIdentifier | JSXNamespacedName;
+ value: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null;
+}
+
+export interface JSXClosingElement extends BaseNode {
+ type: "JSXClosingElement";
+ name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
+}
+
+export interface JSXElement extends BaseNode {
+ type: "JSXElement";
+ openingElement: JSXOpeningElement;
+ closingElement: JSXClosingElement | null;
+ children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>;
+ selfClosing: boolean | null;
+}
+
+export interface JSXEmptyExpression extends BaseNode {
+ type: "JSXEmptyExpression";
+}
+
+export interface JSXExpressionContainer extends BaseNode {
+ type: "JSXExpressionContainer";
+ expression: Expression | JSXEmptyExpression;
+}
+
+export interface JSXSpreadChild extends BaseNode {
+ type: "JSXSpreadChild";
+ expression: Expression;
+}
+
+export interface JSXIdentifier extends BaseNode {
+ type: "JSXIdentifier";
+ name: string;
+}
+
+export interface JSXMemberExpression extends BaseNode {
+ type: "JSXMemberExpression";
+ object: JSXMemberExpression | JSXIdentifier;
+ property: JSXIdentifier;
+}
+
+export interface JSXNamespacedName extends BaseNode {
+ type: "JSXNamespacedName";
+ namespace: JSXIdentifier;
+ name: JSXIdentifier;
+}
+
+export interface JSXOpeningElement extends BaseNode {
+ type: "JSXOpeningElement";
+ name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
+ attributes: Array<JSXAttribute | JSXSpreadAttribute>;
+ selfClosing: boolean;
+ typeParameters: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+}
+
+export interface JSXSpreadAttribute extends BaseNode {
+ type: "JSXSpreadAttribute";
+ argument: Expression;
+}
+
+export interface JSXText extends BaseNode {
+ type: "JSXText";
+ value: string;
+}
+
+export interface JSXFragment extends BaseNode {
+ type: "JSXFragment";
+ openingFragment: JSXOpeningFragment;
+ closingFragment: JSXClosingFragment;
+ children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>;
+}
+
+export interface JSXOpeningFragment extends BaseNode {
+ type: "JSXOpeningFragment";
+}
+
+export interface JSXClosingFragment extends BaseNode {
+ type: "JSXClosingFragment";
+}
+
+export interface Noop extends BaseNode {
+ type: "Noop";
+}
+
+export interface Placeholder extends BaseNode {
+ type: "Placeholder";
+ expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern";
+ name: Identifier;
+}
+
+export interface V8IntrinsicIdentifier extends BaseNode {
+ type: "V8IntrinsicIdentifier";
+ name: string;
+}
+
+export interface ArgumentPlaceholder extends BaseNode {
+ type: "ArgumentPlaceholder";
+}
+
+export interface BindExpression extends BaseNode {
+ type: "BindExpression";
+ object: Expression;
+ callee: Expression;
+}
+
+export interface ImportAttribute extends BaseNode {
+ type: "ImportAttribute";
+ key: Identifier | StringLiteral;
+ value: StringLiteral;
+}
+
+export interface Decorator extends BaseNode {
+ type: "Decorator";
+ expression: Expression;
+}
+
+export interface DoExpression extends BaseNode {
+ type: "DoExpression";
+ body: BlockStatement;
+ async: boolean;
+}
+
+export interface ExportDefaultSpecifier extends BaseNode {
+ type: "ExportDefaultSpecifier";
+ exported: Identifier;
+}
+
+export interface RecordExpression extends BaseNode {
+ type: "RecordExpression";
+ properties: Array<ObjectProperty | SpreadElement>;
+}
+
+export interface TupleExpression extends BaseNode {
+ type: "TupleExpression";
+ elements: Array<Expression | SpreadElement>;
+}
+
+export interface DecimalLiteral extends BaseNode {
+ type: "DecimalLiteral";
+ value: string;
+}
+
+export interface ModuleExpression extends BaseNode {
+ type: "ModuleExpression";
+ body: Program;
+}
+
+export interface TopicReference extends BaseNode {
+ type: "TopicReference";
+}
+
+export interface PipelineTopicExpression extends BaseNode {
+ type: "PipelineTopicExpression";
+ expression: Expression;
+}
+
+export interface PipelineBareFunction extends BaseNode {
+ type: "PipelineBareFunction";
+ callee: Expression;
+}
+
+export interface PipelinePrimaryTopicReference extends BaseNode {
+ type: "PipelinePrimaryTopicReference";
+}
+
+export interface TSParameterProperty extends BaseNode {
+ type: "TSParameterProperty";
+ parameter: Identifier | AssignmentPattern;
+ accessibility: "public" | "private" | "protected" | null;
+ decorators: Array<Decorator> | null;
+ override: boolean | null;
+ readonly: boolean | null;
+}
+
+export interface TSDeclareFunction extends BaseNode {
+ type: "TSDeclareFunction";
+ id: Identifier | null;
+ typeParameters: TSTypeParameterDeclaration | Noop | null;
+ params: Array<Identifier | Pattern | RestElement>;
+ returnType: TSTypeAnnotation | Noop | null;
+ async: boolean;
+ declare: boolean | null;
+ generator: boolean;
+}
+
+export interface TSDeclareMethod extends BaseNode {
+ type: "TSDeclareMethod";
+ decorators: Array<Decorator> | null;
+ key: Identifier | StringLiteral | NumericLiteral | Expression;
+ typeParameters: TSTypeParameterDeclaration | Noop | null;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ returnType: TSTypeAnnotation | Noop | null;
+ abstract: boolean | null;
+ access: "public" | "private" | "protected" | null;
+ accessibility: "public" | "private" | "protected" | null;
+ async: boolean;
+ computed: boolean;
+ generator: boolean;
+ kind: "get" | "set" | "method" | "constructor";
+ optional: boolean | null;
+ override: boolean;
+ static: boolean;
+}
+
+export interface TSQualifiedName extends BaseNode {
+ type: "TSQualifiedName";
+ left: TSEntityName;
+ right: Identifier;
+}
+
+export interface TSCallSignatureDeclaration extends BaseNode {
+ type: "TSCallSignatureDeclaration";
+ typeParameters: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement>;
+ typeAnnotation: TSTypeAnnotation | null;
+}
+
+export interface TSConstructSignatureDeclaration extends BaseNode {
+ type: "TSConstructSignatureDeclaration";
+ typeParameters: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement>;
+ typeAnnotation: TSTypeAnnotation | null;
+}
+
+export interface TSPropertySignature extends BaseNode {
+ type: "TSPropertySignature";
+ key: Expression;
+ typeAnnotation: TSTypeAnnotation | null;
+ initializer: Expression | null;
+ computed: boolean | null;
+ kind: "get" | "set";
+ optional: boolean | null;
+ readonly: boolean | null;
+}
+
+export interface TSMethodSignature extends BaseNode {
+ type: "TSMethodSignature";
+ key: Expression;
+ typeParameters: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement>;
+ typeAnnotation: TSTypeAnnotation | null;
+ computed: boolean | null;
+ kind: "method" | "get" | "set";
+ optional: boolean | null;
+}
+
+export interface TSIndexSignature extends BaseNode {
+ type: "TSIndexSignature";
+ parameters: Array<Identifier>;
+ typeAnnotation: TSTypeAnnotation | null;
+ readonly: boolean | null;
+ static: boolean | null;
+}
+
+export interface TSAnyKeyword extends BaseNode {
+ type: "TSAnyKeyword";
+}
+
+export interface TSBooleanKeyword extends BaseNode {
+ type: "TSBooleanKeyword";
+}
+
+export interface TSBigIntKeyword extends BaseNode {
+ type: "TSBigIntKeyword";
+}
+
+export interface TSIntrinsicKeyword extends BaseNode {
+ type: "TSIntrinsicKeyword";
+}
+
+export interface TSNeverKeyword extends BaseNode {
+ type: "TSNeverKeyword";
+}
+
+export interface TSNullKeyword extends BaseNode {
+ type: "TSNullKeyword";
+}
+
+export interface TSNumberKeyword extends BaseNode {
+ type: "TSNumberKeyword";
+}
+
+export interface TSObjectKeyword extends BaseNode {
+ type: "TSObjectKeyword";
+}
+
+export interface TSStringKeyword extends BaseNode {
+ type: "TSStringKeyword";
+}
+
+export interface TSSymbolKeyword extends BaseNode {
+ type: "TSSymbolKeyword";
+}
+
+export interface TSUndefinedKeyword extends BaseNode {
+ type: "TSUndefinedKeyword";
+}
+
+export interface TSUnknownKeyword extends BaseNode {
+ type: "TSUnknownKeyword";
+}
+
+export interface TSVoidKeyword extends BaseNode {
+ type: "TSVoidKeyword";
+}
+
+export interface TSThisType extends BaseNode {
+ type: "TSThisType";
+}
+
+export interface TSFunctionType extends BaseNode {
+ type: "TSFunctionType";
+ typeParameters: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement>;
+ typeAnnotation: TSTypeAnnotation | null;
+}
+
+export interface TSConstructorType extends BaseNode {
+ type: "TSConstructorType";
+ typeParameters: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement>;
+ typeAnnotation: TSTypeAnnotation | null;
+ abstract: boolean | null;
+}
+
+export interface TSTypeReference extends BaseNode {
+ type: "TSTypeReference";
+ typeName: TSEntityName;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface TSTypePredicate extends BaseNode {
+ type: "TSTypePredicate";
+ parameterName: Identifier | TSThisType;
+ typeAnnotation: TSTypeAnnotation | null;
+ asserts: boolean | null;
+}
+
+export interface TSTypeQuery extends BaseNode {
+ type: "TSTypeQuery";
+ exprName: TSEntityName | TSImportType;
+}
+
+export interface TSTypeLiteral extends BaseNode {
+ type: "TSTypeLiteral";
+ members: Array<TSTypeElement>;
+}
+
+export interface TSArrayType extends BaseNode {
+ type: "TSArrayType";
+ elementType: TSType;
+}
+
+export interface TSTupleType extends BaseNode {
+ type: "TSTupleType";
+ elementTypes: Array<TSType | TSNamedTupleMember>;
+}
+
+export interface TSOptionalType extends BaseNode {
+ type: "TSOptionalType";
+ typeAnnotation: TSType;
+}
+
+export interface TSRestType extends BaseNode {
+ type: "TSRestType";
+ typeAnnotation: TSType;
+}
+
+export interface TSNamedTupleMember extends BaseNode {
+ type: "TSNamedTupleMember";
+ label: Identifier;
+ elementType: TSType;
+ optional: boolean;
+}
+
+export interface TSUnionType extends BaseNode {
+ type: "TSUnionType";
+ types: Array<TSType>;
+}
+
+export interface TSIntersectionType extends BaseNode {
+ type: "TSIntersectionType";
+ types: Array<TSType>;
+}
+
+export interface TSConditionalType extends BaseNode {
+ type: "TSConditionalType";
+ checkType: TSType;
+ extendsType: TSType;
+ trueType: TSType;
+ falseType: TSType;
+}
+
+export interface TSInferType extends BaseNode {
+ type: "TSInferType";
+ typeParameter: TSTypeParameter;
+}
+
+export interface TSParenthesizedType extends BaseNode {
+ type: "TSParenthesizedType";
+ typeAnnotation: TSType;
+}
+
+export interface TSTypeOperator extends BaseNode {
+ type: "TSTypeOperator";
+ typeAnnotation: TSType;
+ operator: string;
+}
+
+export interface TSIndexedAccessType extends BaseNode {
+ type: "TSIndexedAccessType";
+ objectType: TSType;
+ indexType: TSType;
+}
+
+export interface TSMappedType extends BaseNode {
+ type: "TSMappedType";
+ typeParameter: TSTypeParameter;
+ typeAnnotation: TSType | null;
+ nameType: TSType | null;
+ optional: boolean | null;
+ readonly: boolean | null;
+}
+
+export interface TSLiteralType extends BaseNode {
+ type: "TSLiteralType";
+ literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | UnaryExpression;
+}
+
+export interface TSExpressionWithTypeArguments extends BaseNode {
+ type: "TSExpressionWithTypeArguments";
+ expression: TSEntityName;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface TSInterfaceDeclaration extends BaseNode {
+ type: "TSInterfaceDeclaration";
+ id: Identifier;
+ typeParameters: TSTypeParameterDeclaration | null;
+ extends: Array<TSExpressionWithTypeArguments> | null;
+ body: TSInterfaceBody;
+ declare: boolean | null;
+}
+
+export interface TSInterfaceBody extends BaseNode {
+ type: "TSInterfaceBody";
+ body: Array<TSTypeElement>;
+}
+
+export interface TSTypeAliasDeclaration extends BaseNode {
+ type: "TSTypeAliasDeclaration";
+ id: Identifier;
+ typeParameters: TSTypeParameterDeclaration | null;
+ typeAnnotation: TSType;
+ declare: boolean | null;
+}
+
+export interface TSAsExpression extends BaseNode {
+ type: "TSAsExpression";
+ expression: Expression;
+ typeAnnotation: TSType;
+}
+
+export interface TSTypeAssertion extends BaseNode {
+ type: "TSTypeAssertion";
+ typeAnnotation: TSType;
+ expression: Expression;
+}
+
+export interface TSEnumDeclaration extends BaseNode {
+ type: "TSEnumDeclaration";
+ id: Identifier;
+ members: Array<TSEnumMember>;
+ const: boolean | null;
+ declare: boolean | null;
+ initializer: Expression | null;
+}
+
+export interface TSEnumMember extends BaseNode {
+ type: "TSEnumMember";
+ id: Identifier | StringLiteral;
+ initializer: Expression | null;
+}
+
+export interface TSModuleDeclaration extends BaseNode {
+ type: "TSModuleDeclaration";
+ id: Identifier | StringLiteral;
+ body: TSModuleBlock | TSModuleDeclaration;
+ declare: boolean | null;
+ global: boolean | null;
+}
+
+export interface TSModuleBlock extends BaseNode {
+ type: "TSModuleBlock";
+ body: Array<Statement>;
+}
+
+export interface TSImportType extends BaseNode {
+ type: "TSImportType";
+ argument: StringLiteral;
+ qualifier: TSEntityName | null;
+ typeParameters: TSTypeParameterInstantiation | null;
+}
+
+export interface TSImportEqualsDeclaration extends BaseNode {
+ type: "TSImportEqualsDeclaration";
+ id: Identifier;
+ moduleReference: TSEntityName | TSExternalModuleReference;
+ importKind: "type" | "value" | null;
+ isExport: boolean;
+}
+
+export interface TSExternalModuleReference extends BaseNode {
+ type: "TSExternalModuleReference";
+ expression: StringLiteral;
+}
+
+export interface TSNonNullExpression extends BaseNode {
+ type: "TSNonNullExpression";
+ expression: Expression;
+}
+
+export interface TSExportAssignment extends BaseNode {
+ type: "TSExportAssignment";
+ expression: Expression;
+}
+
+export interface TSNamespaceExportDeclaration extends BaseNode {
+ type: "TSNamespaceExportDeclaration";
+ id: Identifier;
+}
+
+export interface TSTypeAnnotation extends BaseNode {
+ type: "TSTypeAnnotation";
+ typeAnnotation: TSType;
+}
+
+export interface TSTypeParameterInstantiation extends BaseNode {
+ type: "TSTypeParameterInstantiation";
+ params: Array<TSType>;
+}
+
+export interface TSTypeParameterDeclaration extends BaseNode {
+ type: "TSTypeParameterDeclaration";
+ params: Array<TSTypeParameter>;
+}
+
+export interface TSTypeParameter extends BaseNode {
+ type: "TSTypeParameter";
+ constraint: TSType | null;
+ default: TSType | null;
+ name: string;
+}
+
+/**
+ * @deprecated Use `NumericLiteral`
+ */
+export type NumberLiteral = NumericLiteral;
+
+/**
+ * @deprecated Use `RegExpLiteral`
+ */
+export type RegexLiteral = RegExpLiteral;
+
+/**
+ * @deprecated Use `RestElement`
+ */
+export type RestProperty = RestElement;
+
+/**
+ * @deprecated Use `SpreadElement`
+ */
+export type SpreadProperty = SpreadElement;
+
+export type Standardized = ArrayExpression | AssignmentExpression | BinaryExpression | InterpreterDirective | Directive | DirectiveLiteral | BlockStatement | BreakStatement | CallExpression | CatchClause | ConditionalExpression | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | File | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | LabeledStatement | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | Program | ObjectExpression | ObjectMethod | ObjectProperty | RestElement | ReturnStatement | SequenceExpression | ParenthesizedExpression | SwitchCase | SwitchStatement | ThisExpression | ThrowStatement | TryStatement | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | AssignmentPattern | ArrayPattern | ArrowFunctionExpression | ClassBody | ClassExpression | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ForOfStatement | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | MetaProperty | ClassMethod | ObjectPattern | SpreadElement | Super | TaggedTemplateExpression | TemplateElement | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | ExportNamespaceSpecifier | OptionalMemberExpression | OptionalCallExpression | ClassProperty | ClassAccessorProperty | ClassPrivateProperty | ClassPrivateMethod | PrivateName | StaticBlock;
+export type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | OptionalMemberExpression | OptionalCallExpression | TypeCastExpression | JSXElement | JSXFragment | BindExpression | DoExpression | RecordExpression | TupleExpression | DecimalLiteral | ModuleExpression | TopicReference | PipelineTopicExpression | PipelineBareFunction | PipelinePrimaryTopicReference | TSAsExpression | TSTypeAssertion | TSNonNullExpression;
+export type Binary = BinaryExpression | LogicalExpression;
+export type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassExpression | ClassDeclaration | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock;
+export type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock;
+export type Block = BlockStatement | Program | TSModuleBlock;
+export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration;
+export type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression;
+export type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement;
+export type Conditional = ConditionalExpression | IfStatement;
+export type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement;
+export type While = DoWhileStatement | WhileStatement;
+export type ExpressionWrapper = ExpressionStatement | ParenthesizedExpression | TypeCastExpression;
+export type For = ForInStatement | ForStatement | ForOfStatement;
+export type ForXStatement = ForInStatement | ForOfStatement;
+export type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod;
+export type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod | StaticBlock;
+export type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ArrowFunctionExpression | BigIntLiteral | DecimalLiteral;
+export type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration;
+export type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern;
+export type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty;
+export type TSEntityName = Identifier | TSQualifiedName;
+export type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral | DecimalLiteral;
+export type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | BigIntLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | DecimalLiteral;
+export type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty;
+export type Method = ObjectMethod | ClassMethod | ClassPrivateMethod;
+export type ObjectMember = ObjectMethod | ObjectProperty;
+export type Property = ObjectProperty | ClassProperty | ClassAccessorProperty | ClassPrivateProperty;
+export type UnaryLike = UnaryExpression | SpreadElement;
+export type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern;
+export type Class = ClassExpression | ClassDeclaration;
+export type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration;
+export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration;
+export type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportNamespaceSpecifier | ExportDefaultSpecifier;
+export type Accessor = ClassAccessorProperty;
+export type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName;
+export type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation | EnumDeclaration | EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody | EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember | IndexedAccessType | OptionalIndexedAccessType;
+export type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation | IndexedAccessType | OptionalIndexedAccessType;
+export type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation;
+export type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias;
+export type FlowPredicate = DeclaredPredicate | InferredPredicate;
+export type EnumBody = EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody;
+export type EnumMember = EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember;
+export type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment;
+export type Miscellaneous = Noop | Placeholder | V8IntrinsicIdentifier;
+export type TypeScript = TSParameterProperty | TSDeclareFunction | TSDeclareMethod | TSQualifiedName | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature | TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSNamedTupleMember | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSInterfaceDeclaration | TSInterfaceBody | TSTypeAliasDeclaration | TSAsExpression | TSTypeAssertion | TSEnumDeclaration | TSEnumMember | TSModuleDeclaration | TSModuleBlock | TSImportType | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | TSExportAssignment | TSNamespaceExportDeclaration | TSTypeAnnotation | TSTypeParameterInstantiation | TSTypeParameterDeclaration | TSTypeParameter;
+export type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature;
+export type TSType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType;
+export type TSBaseType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSLiteralType;
+
+export interface Aliases {
+ Standardized: Standardized;
+ Expression: Expression;
+ Binary: Binary;
+ Scopable: Scopable;
+ BlockParent: BlockParent;
+ Block: Block;
+ Statement: Statement;
+ Terminatorless: Terminatorless;
+ CompletionStatement: CompletionStatement;
+ Conditional: Conditional;
+ Loop: Loop;
+ While: While;
+ ExpressionWrapper: ExpressionWrapper;
+ For: For;
+ ForXStatement: ForXStatement;
+ Function: Function;
+ FunctionParent: FunctionParent;
+ Pureish: Pureish;
+ Declaration: Declaration;
+ PatternLike: PatternLike;
+ LVal: LVal;
+ TSEntityName: TSEntityName;
+ Literal: Literal;
+ Immutable: Immutable;
+ UserWhitespacable: UserWhitespacable;
+ Method: Method;
+ ObjectMember: ObjectMember;
+ Property: Property;
+ UnaryLike: UnaryLike;
+ Pattern: Pattern;
+ Class: Class;
+ ModuleDeclaration: ModuleDeclaration;
+ ExportDeclaration: ExportDeclaration;
+ ModuleSpecifier: ModuleSpecifier;
+ Accessor: Accessor;
+ Private: Private;
+ Flow: Flow;
+ FlowType: FlowType;
+ FlowBaseAnnotation: FlowBaseAnnotation;
+ FlowDeclaration: FlowDeclaration;
+ FlowPredicate: FlowPredicate;
+ EnumBody: EnumBody;
+ EnumMember: EnumMember;
+ JSX: JSX;
+ Miscellaneous: Miscellaneous;
+ TypeScript: TypeScript;
+ TSTypeElement: TSTypeElement;
+ TSType: TSType;
+ TSBaseType: TSBaseType;
+}
+
+export function arrayExpression(elements?: Array<null | Expression | SpreadElement>): ArrayExpression;
+export function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression;
+export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression | PrivateName, right: Expression): BinaryExpression;
+export function interpreterDirective(value: string): InterpreterDirective;
+export function directive(value: DirectiveLiteral): Directive;
+export function directiveLiteral(value: string): DirectiveLiteral;
+export function blockStatement(body: Array<Statement>, directives?: Array<Directive>): BlockStatement;
+export function breakStatement(label?: Identifier | null): BreakStatement;
+export function callExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): CallExpression;
+export function catchClause(param: Identifier | ArrayPattern | ObjectPattern | null | undefined, body: BlockStatement): CatchClause;
+export function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression;
+export function continueStatement(label?: Identifier | null): ContinueStatement;
+export function debuggerStatement(): DebuggerStatement;
+export function doWhileStatement(test: Expression, body: Statement): DoWhileStatement;
+export function emptyStatement(): EmptyStatement;
+export function expressionStatement(expression: Expression): ExpressionStatement;
+export function file(program: Program, comments?: Array<CommentBlock | CommentLine> | null, tokens?: Array<any> | null): File;
+export function forInStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement): ForInStatement;
+export function forStatement(init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement): ForStatement;
+export function functionDeclaration(id: Identifier | null | undefined, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, generator?: boolean, async?: boolean): FunctionDeclaration;
+export function functionExpression(id: Identifier | null | undefined, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, generator?: boolean, async?: boolean): FunctionExpression;
+export function identifier(name: string): Identifier;
+export function ifStatement(test: Expression, consequent: Statement, alternate?: Statement | null): IfStatement;
+export function labeledStatement(label: Identifier, body: Statement): LabeledStatement;
+export function stringLiteral(value: string): StringLiteral;
+export function numericLiteral(value: number): NumericLiteral;
+export function nullLiteral(): NullLiteral;
+export function booleanLiteral(value: boolean): BooleanLiteral;
+export function regExpLiteral(pattern: string, flags?: string): RegExpLiteral;
+export function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression;
+export function memberExpression(object: Expression, property: Expression | Identifier | PrivateName, computed?: boolean, optional?: true | false | null): MemberExpression;
+export function newExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): NewExpression;
+export function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program;
+export function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression;
+export function objectMethod(kind: "method" | "get" | "set" | undefined, key: Expression | Identifier | StringLiteral | NumericLiteral, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, computed?: boolean, generator?: boolean, async?: boolean): ObjectMethod;
+export function objectProperty(key: Expression | Identifier | StringLiteral | NumericLiteral, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<Decorator> | null): ObjectProperty;
+export function restElement(argument: LVal): RestElement;
+export function returnStatement(argument?: Expression | null): ReturnStatement;
+export function sequenceExpression(expressions: Array<Expression>): SequenceExpression;
+export function parenthesizedExpression(expression: Expression): ParenthesizedExpression;
+export function switchCase(test: Expression | null | undefined, consequent: Array<Statement>): SwitchCase;
+export function switchStatement(discriminant: Expression, cases: Array<SwitchCase>): SwitchStatement;
+export function thisExpression(): ThisExpression;
+export function throwStatement(argument: Expression): ThrowStatement;
+export function tryStatement(block: BlockStatement, handler?: CatchClause | null, finalizer?: BlockStatement | null): TryStatement;
+export function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: Expression, prefix?: boolean): UnaryExpression;
+export function updateExpression(operator: "++" | "--", argument: Expression, prefix?: boolean): UpdateExpression;
+export function variableDeclaration(kind: "var" | "let" | "const", declarations: Array<VariableDeclarator>): VariableDeclaration;
+export function variableDeclarator(id: LVal, init?: Expression | null): VariableDeclarator;
+export function whileStatement(test: Expression, body: Statement): WhileStatement;
+export function withStatement(object: Expression, body: Statement): WithStatement;
+export function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern | MemberExpression, right: Expression): AssignmentPattern;
+export function arrayPattern(elements: Array<null | PatternLike>): ArrayPattern;
+export function arrowFunctionExpression(params: Array<Identifier | Pattern | RestElement>, body: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression;
+export function classBody(body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>): ClassBody;
+export function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassExpression;
+export function classDeclaration(id: Identifier, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassDeclaration;
+export function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration;
+export function exportDefaultDeclaration(declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression): ExportDefaultDeclaration;
+export function exportNamedDeclaration(declaration?: Declaration | null, specifiers?: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>, source?: StringLiteral | null): ExportNamedDeclaration;
+export function exportSpecifier(local: Identifier, exported: Identifier | StringLiteral): ExportSpecifier;
+export function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement;
+export function importDeclaration(specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>, source: StringLiteral): ImportDeclaration;
+export function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifier;
+export function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier;
+export function importSpecifier(local: Identifier, imported: Identifier | StringLiteral): ImportSpecifier;
+export function metaProperty(meta: Identifier, property: Identifier): MetaProperty;
+export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): ClassMethod;
+export function objectPattern(properties: Array<RestElement | ObjectProperty>): ObjectPattern;
+export function spreadElement(argument: Expression): SpreadElement;
+declare function _super(): Super;
+export { _super as super}
+export function taggedTemplateExpression(tag: Expression, quasi: TemplateLiteral): TaggedTemplateExpression;
+export function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): TemplateElement;
+export function templateLiteral(quasis: Array<TemplateElement>, expressions: Array<Expression | TSType>): TemplateLiteral;
+export function yieldExpression(argument?: Expression | null, delegate?: boolean): YieldExpression;
+export function awaitExpression(argument: Expression): AwaitExpression;
+declare function _import(): Import;
+export { _import as import}
+export function bigIntLiteral(value: string): BigIntLiteral;
+export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier;
+export function optionalMemberExpression(object: Expression, property: Expression | Identifier, computed: boolean | undefined, optional: boolean): OptionalMemberExpression;
+export function optionalCallExpression(callee: Expression, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>, optional: boolean): OptionalCallExpression;
+export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassProperty;
+export function classAccessorProperty(key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassAccessorProperty;
+export function classPrivateProperty(key: PrivateName, value: Expression | null | undefined, decorators: Array<Decorator> | null | undefined, _static: any): ClassPrivateProperty;
+export function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, _static?: boolean): ClassPrivateMethod;
+export function privateName(id: Identifier): PrivateName;
+export function staticBlock(body: Array<Statement>): StaticBlock;
+export function anyTypeAnnotation(): AnyTypeAnnotation;
+export function arrayTypeAnnotation(elementType: FlowType): ArrayTypeAnnotation;
+export function booleanTypeAnnotation(): BooleanTypeAnnotation;
+export function booleanLiteralTypeAnnotation(value: boolean): BooleanLiteralTypeAnnotation;
+export function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation;
+export function classImplements(id: Identifier, typeParameters?: TypeParameterInstantiation | null): ClassImplements;
+export function declareClass(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): DeclareClass;
+export function declareFunction(id: Identifier): DeclareFunction;
+export function declareInterface(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): DeclareInterface;
+export function declareModule(id: Identifier | StringLiteral, body: BlockStatement, kind?: "CommonJS" | "ES" | null): DeclareModule;
+export function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareModuleExports;
+export function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias;
+export function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType;
+export function declareVariable(id: Identifier): DeclareVariable;
+export function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null, source?: StringLiteral | null): DeclareExportDeclaration;
+export function declareExportAllDeclaration(source: StringLiteral): DeclareExportAllDeclaration;
+export function declaredPredicate(value: Flow): DeclaredPredicate;
+export function existsTypeAnnotation(): ExistsTypeAnnotation;
+export function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array<FunctionTypeParam>, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation;
+export function functionTypeParam(name: Identifier | null | undefined, typeAnnotation: FlowType): FunctionTypeParam;
+export function genericTypeAnnotation(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): GenericTypeAnnotation;
+export function inferredPredicate(): InferredPredicate;
+export function interfaceExtends(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): InterfaceExtends;
+export function interfaceDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): InterfaceDeclaration;
+export function interfaceTypeAnnotation(_extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): InterfaceTypeAnnotation;
+export function intersectionTypeAnnotation(types: Array<FlowType>): IntersectionTypeAnnotation;
+export function mixedTypeAnnotation(): MixedTypeAnnotation;
+export function emptyTypeAnnotation(): EmptyTypeAnnotation;
+export function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation;
+export function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation;
+export function numberTypeAnnotation(): NumberTypeAnnotation;
+export function objectTypeAnnotation(properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>, indexers?: Array<ObjectTypeIndexer> | null, callProperties?: Array<ObjectTypeCallProperty> | null, internalSlots?: Array<ObjectTypeInternalSlot> | null, exact?: boolean): ObjectTypeAnnotation;
+export function objectTypeInternalSlot(id: Identifier, value: FlowType, optional: boolean, _static: boolean, method: boolean): ObjectTypeInternalSlot;
+export function objectTypeCallProperty(value: FlowType): ObjectTypeCallProperty;
+export function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null): ObjectTypeIndexer;
+export function objectTypeProperty(key: Identifier | StringLiteral, value: FlowType, variance?: Variance | null): ObjectTypeProperty;
+export function objectTypeSpreadProperty(argument: FlowType): ObjectTypeSpreadProperty;
+export function opaqueType(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, supertype: FlowType | null | undefined, impltype: FlowType): OpaqueType;
+export function qualifiedTypeIdentifier(id: Identifier, qualification: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier;
+export function stringLiteralTypeAnnotation(value: string): StringLiteralTypeAnnotation;
+export function stringTypeAnnotation(): StringTypeAnnotation;
+export function symbolTypeAnnotation(): SymbolTypeAnnotation;
+export function thisTypeAnnotation(): ThisTypeAnnotation;
+export function tupleTypeAnnotation(types: Array<FlowType>): TupleTypeAnnotation;
+export function typeofTypeAnnotation(argument: FlowType): TypeofTypeAnnotation;
+export function typeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): TypeAlias;
+export function typeAnnotation(typeAnnotation: FlowType): TypeAnnotation;
+export function typeCastExpression(expression: Expression, typeAnnotation: TypeAnnotation): TypeCastExpression;
+export function typeParameter(bound?: TypeAnnotation | null, _default?: FlowType | null, variance?: Variance | null): TypeParameter;
+export function typeParameterDeclaration(params: Array<TypeParameter>): TypeParameterDeclaration;
+export function typeParameterInstantiation(params: Array<FlowType>): TypeParameterInstantiation;
+export function unionTypeAnnotation(types: Array<FlowType>): UnionTypeAnnotation;
+export function variance(kind: "minus" | "plus"): Variance;
+export function voidTypeAnnotation(): VoidTypeAnnotation;
+export function enumDeclaration(id: Identifier, body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody): EnumDeclaration;
+export function enumBooleanBody(members: Array<EnumBooleanMember>): EnumBooleanBody;
+export function enumNumberBody(members: Array<EnumNumberMember>): EnumNumberBody;
+export function enumStringBody(members: Array<EnumStringMember | EnumDefaultedMember>): EnumStringBody;
+export function enumSymbolBody(members: Array<EnumDefaultedMember>): EnumSymbolBody;
+export function enumBooleanMember(id: Identifier): EnumBooleanMember;
+export function enumNumberMember(id: Identifier, init: NumericLiteral): EnumNumberMember;
+export function enumStringMember(id: Identifier, init: StringLiteral): EnumStringMember;
+export function enumDefaultedMember(id: Identifier): EnumDefaultedMember;
+export function indexedAccessType(objectType: FlowType, indexType: FlowType): IndexedAccessType;
+export function optionalIndexedAccessType(objectType: FlowType, indexType: FlowType): OptionalIndexedAccessType;
+export function jsxAttribute(name: JSXIdentifier | JSXNamespacedName, value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null): JSXAttribute;
+export function jsxClosingElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName): JSXClosingElement;
+export function jsxElement(openingElement: JSXOpeningElement, closingElement: JSXClosingElement | null | undefined, children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>, selfClosing?: boolean | null): JSXElement;
+export function jsxEmptyExpression(): JSXEmptyExpression;
+export function jsxExpressionContainer(expression: Expression | JSXEmptyExpression): JSXExpressionContainer;
+export function jsxSpreadChild(expression: Expression): JSXSpreadChild;
+export function jsxIdentifier(name: string): JSXIdentifier;
+export function jsxMemberExpression(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier): JSXMemberExpression;
+export function jsxNamespacedName(namespace: JSXIdentifier, name: JSXIdentifier): JSXNamespacedName;
+export function jsxOpeningElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName, attributes: Array<JSXAttribute | JSXSpreadAttribute>, selfClosing?: boolean): JSXOpeningElement;
+export function jsxSpreadAttribute(argument: Expression): JSXSpreadAttribute;
+export function jsxText(value: string): JSXText;
+export function jsxFragment(openingFragment: JSXOpeningFragment, closingFragment: JSXClosingFragment, children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>): JSXFragment;
+export function jsxOpeningFragment(): JSXOpeningFragment;
+export function jsxClosingFragment(): JSXClosingFragment;
+export function noop(): Noop;
+export function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: Identifier): Placeholder;
+export function v8IntrinsicIdentifier(name: string): V8IntrinsicIdentifier;
+export function argumentPlaceholder(): ArgumentPlaceholder;
+export function bindExpression(object: Expression, callee: Expression): BindExpression;
+export function importAttribute(key: Identifier | StringLiteral, value: StringLiteral): ImportAttribute;
+export function decorator(expression: Expression): Decorator;
+export function doExpression(body: BlockStatement, async?: boolean): DoExpression;
+export function exportDefaultSpecifier(exported: Identifier): ExportDefaultSpecifier;
+export function recordExpression(properties: Array<ObjectProperty | SpreadElement>): RecordExpression;
+export function tupleExpression(elements?: Array<Expression | SpreadElement>): TupleExpression;
+export function decimalLiteral(value: string): DecimalLiteral;
+export function moduleExpression(body: Program): ModuleExpression;
+export function topicReference(): TopicReference;
+export function pipelineTopicExpression(expression: Expression): PipelineTopicExpression;
+export function pipelineBareFunction(callee: Expression): PipelineBareFunction;
+export function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference;
+export function tsParameterProperty(parameter: Identifier | AssignmentPattern): TSParameterProperty;
+export function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareFunction;
+export function tsDeclareMethod(decorators: Array<Decorator> | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareMethod;
+export function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName;
+export function tsCallSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration;
+export function tsConstructSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration;
+export function tsPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation | null, initializer?: Expression | null): TSPropertySignature;
+export function tsMethodSignature(key: Expression, typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSMethodSignature;
+export function tsIndexSignature(parameters: Array<Identifier>, typeAnnotation?: TSTypeAnnotation | null): TSIndexSignature;
+export function tsAnyKeyword(): TSAnyKeyword;
+export function tsBooleanKeyword(): TSBooleanKeyword;
+export function tsBigIntKeyword(): TSBigIntKeyword;
+export function tsIntrinsicKeyword(): TSIntrinsicKeyword;
+export function tsNeverKeyword(): TSNeverKeyword;
+export function tsNullKeyword(): TSNullKeyword;
+export function tsNumberKeyword(): TSNumberKeyword;
+export function tsObjectKeyword(): TSObjectKeyword;
+export function tsStringKeyword(): TSStringKeyword;
+export function tsSymbolKeyword(): TSSymbolKeyword;
+export function tsUndefinedKeyword(): TSUndefinedKeyword;
+export function tsUnknownKeyword(): TSUnknownKeyword;
+export function tsVoidKeyword(): TSVoidKeyword;
+export function tsThisType(): TSThisType;
+export function tsFunctionType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSFunctionType;
+export function tsConstructorType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructorType;
+export function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference;
+export function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation?: TSTypeAnnotation | null, asserts?: boolean | null): TSTypePredicate;
+export function tsTypeQuery(exprName: TSEntityName | TSImportType): TSTypeQuery;
+export function tsTypeLiteral(members: Array<TSTypeElement>): TSTypeLiteral;
+export function tsArrayType(elementType: TSType): TSArrayType;
+export function tsTupleType(elementTypes: Array<TSType | TSNamedTupleMember>): TSTupleType;
+export function tsOptionalType(typeAnnotation: TSType): TSOptionalType;
+export function tsRestType(typeAnnotation: TSType): TSRestType;
+export function tsNamedTupleMember(label: Identifier, elementType: TSType, optional?: boolean): TSNamedTupleMember;
+export function tsUnionType(types: Array<TSType>): TSUnionType;
+export function tsIntersectionType(types: Array<TSType>): TSIntersectionType;
+export function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType;
+export function tsInferType(typeParameter: TSTypeParameter): TSInferType;
+export function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType;
+export function tsTypeOperator(typeAnnotation: TSType): TSTypeOperator;
+export function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType;
+export function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null, nameType?: TSType | null): TSMappedType;
+export function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | UnaryExpression): TSLiteralType;
+export function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments;
+export function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array<TSExpressionWithTypeArguments> | null | undefined, body: TSInterfaceBody): TSInterfaceDeclaration;
+export function tsInterfaceBody(body: Array<TSTypeElement>): TSInterfaceBody;
+export function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType): TSTypeAliasDeclaration;
+export function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression;
+export function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion;
+export function tsEnumDeclaration(id: Identifier, members: Array<TSEnumMember>): TSEnumDeclaration;
+export function tsEnumMember(id: Identifier | StringLiteral, initializer?: Expression | null): TSEnumMember;
+export function tsModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration): TSModuleDeclaration;
+export function tsModuleBlock(body: Array<Statement>): TSModuleBlock;
+export function tsImportType(argument: StringLiteral, qualifier?: TSEntityName | null, typeParameters?: TSTypeParameterInstantiation | null): TSImportType;
+export function tsImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference): TSImportEqualsDeclaration;
+export function tsExternalModuleReference(expression: StringLiteral): TSExternalModuleReference;
+export function tsNonNullExpression(expression: Expression): TSNonNullExpression;
+export function tsExportAssignment(expression: Expression): TSExportAssignment;
+export function tsNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration;
+export function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation;
+export function tsTypeParameterInstantiation(params: Array<TSType>): TSTypeParameterInstantiation;
+export function tsTypeParameterDeclaration(params: Array<TSTypeParameter>): TSTypeParameterDeclaration;
+export function tsTypeParameter(constraint: TSType | null | undefined, _default: TSType | null | undefined, name: string): TSTypeParameter;
+export function isAccessor(node: object | null | undefined, opts?: object | null): node is Accessor;
+export function assertAccessor(node: object | null | undefined, opts?: object | null): void;
+export function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation;
+export function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isArgumentPlaceholder(node: object | null | undefined, opts?: object | null): node is ArgumentPlaceholder;
+export function assertArgumentPlaceholder(node: object | null | undefined, opts?: object | null): void;
+export function isArrayExpression(node: object | null | undefined, opts?: object | null): node is ArrayExpression;
+export function assertArrayExpression(node: object | null | undefined, opts?: object | null): void;
+export function isArrayPattern(node: object | null | undefined, opts?: object | null): node is ArrayPattern;
+export function assertArrayPattern(node: object | null | undefined, opts?: object | null): void;
+export function isArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ArrayTypeAnnotation;
+export function assertArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isArrowFunctionExpression(node: object | null | undefined, opts?: object | null): node is ArrowFunctionExpression;
+export function assertArrowFunctionExpression(node: object | null | undefined, opts?: object | null): void;
+export function isAssignmentExpression(node: object | null | undefined, opts?: object | null): node is AssignmentExpression;
+export function assertAssignmentExpression(node: object | null | undefined, opts?: object | null): void;
+export function isAssignmentPattern(node: object | null | undefined, opts?: object | null): node is AssignmentPattern;
+export function assertAssignmentPattern(node: object | null | undefined, opts?: object | null): void;
+export function isAwaitExpression(node: object | null | undefined, opts?: object | null): node is AwaitExpression;
+export function assertAwaitExpression(node: object | null | undefined, opts?: object | null): void;
+export function isBigIntLiteral(node: object | null | undefined, opts?: object | null): node is BigIntLiteral;
+export function assertBigIntLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isBinary(node: object | null | undefined, opts?: object | null): node is Binary;
+export function assertBinary(node: object | null | undefined, opts?: object | null): void;
+export function isBinaryExpression(node: object | null | undefined, opts?: object | null): node is BinaryExpression;
+export function assertBinaryExpression(node: object | null | undefined, opts?: object | null): void;
+export function isBindExpression(node: object | null | undefined, opts?: object | null): node is BindExpression;
+export function assertBindExpression(node: object | null | undefined, opts?: object | null): void;
+export function isBlock(node: object | null | undefined, opts?: object | null): node is Block;
+export function assertBlock(node: object | null | undefined, opts?: object | null): void;
+export function isBlockParent(node: object | null | undefined, opts?: object | null): node is BlockParent;
+export function assertBlockParent(node: object | null | undefined, opts?: object | null): void;
+export function isBlockStatement(node: object | null | undefined, opts?: object | null): node is BlockStatement;
+export function assertBlockStatement(node: object | null | undefined, opts?: object | null): void;
+export function isBooleanLiteral(node: object | null | undefined, opts?: object | null): node is BooleanLiteral;
+export function assertBooleanLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanLiteralTypeAnnotation;
+export function assertBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanTypeAnnotation;
+export function assertBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isBreakStatement(node: object | null | undefined, opts?: object | null): node is BreakStatement;
+export function assertBreakStatement(node: object | null | undefined, opts?: object | null): void;
+export function isCallExpression(node: object | null | undefined, opts?: object | null): node is CallExpression;
+export function assertCallExpression(node: object | null | undefined, opts?: object | null): void;
+export function isCatchClause(node: object | null | undefined, opts?: object | null): node is CatchClause;
+export function assertCatchClause(node: object | null | undefined, opts?: object | null): void;
+export function isClass(node: object | null | undefined, opts?: object | null): node is Class;
+export function assertClass(node: object | null | undefined, opts?: object | null): void;
+export function isClassAccessorProperty(node: object | null | undefined, opts?: object | null): node is ClassAccessorProperty;
+export function assertClassAccessorProperty(node: object | null | undefined, opts?: object | null): void;
+export function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody;
+export function assertClassBody(node: object | null | undefined, opts?: object | null): void;
+export function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration;
+export function assertClassDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isClassExpression(node: object | null | undefined, opts?: object | null): node is ClassExpression;
+export function assertClassExpression(node: object | null | undefined, opts?: object | null): void;
+export function isClassImplements(node: object | null | undefined, opts?: object | null): node is ClassImplements;
+export function assertClassImplements(node: object | null | undefined, opts?: object | null): void;
+export function isClassMethod(node: object | null | undefined, opts?: object | null): node is ClassMethod;
+export function assertClassMethod(node: object | null | undefined, opts?: object | null): void;
+export function isClassPrivateMethod(node: object | null | undefined, opts?: object | null): node is ClassPrivateMethod;
+export function assertClassPrivateMethod(node: object | null | undefined, opts?: object | null): void;
+export function isClassPrivateProperty(node: object | null | undefined, opts?: object | null): node is ClassPrivateProperty;
+export function assertClassPrivateProperty(node: object | null | undefined, opts?: object | null): void;
+export function isClassProperty(node: object | null | undefined, opts?: object | null): node is ClassProperty;
+export function assertClassProperty(node: object | null | undefined, opts?: object | null): void;
+export function isCompletionStatement(node: object | null | undefined, opts?: object | null): node is CompletionStatement;
+export function assertCompletionStatement(node: object | null | undefined, opts?: object | null): void;
+export function isConditional(node: object | null | undefined, opts?: object | null): node is Conditional;
+export function assertConditional(node: object | null | undefined, opts?: object | null): void;
+export function isConditionalExpression(node: object | null | undefined, opts?: object | null): node is ConditionalExpression;
+export function assertConditionalExpression(node: object | null | undefined, opts?: object | null): void;
+export function isContinueStatement(node: object | null | undefined, opts?: object | null): node is ContinueStatement;
+export function assertContinueStatement(node: object | null | undefined, opts?: object | null): void;
+export function isDebuggerStatement(node: object | null | undefined, opts?: object | null): node is DebuggerStatement;
+export function assertDebuggerStatement(node: object | null | undefined, opts?: object | null): void;
+export function isDecimalLiteral(node: object | null | undefined, opts?: object | null): node is DecimalLiteral;
+export function assertDecimalLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isDeclaration(node: object | null | undefined, opts?: object | null): node is Declaration;
+export function assertDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isDeclareClass(node: object | null | undefined, opts?: object | null): node is DeclareClass;
+export function assertDeclareClass(node: object | null | undefined, opts?: object | null): void;
+export function isDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportAllDeclaration;
+export function assertDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportDeclaration;
+export function assertDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isDeclareFunction(node: object | null | undefined, opts?: object | null): node is DeclareFunction;
+export function assertDeclareFunction(node: object | null | undefined, opts?: object | null): void;
+export function isDeclareInterface(node: object | null | undefined, opts?: object | null): node is DeclareInterface;
+export function assertDeclareInterface(node: object | null | undefined, opts?: object | null): void;
+export function isDeclareModule(node: object | null | undefined, opts?: object | null): node is DeclareModule;
+export function assertDeclareModule(node: object | null | undefined, opts?: object | null): void;
+export function isDeclareModuleExports(node: object | null | undefined, opts?: object | null): node is DeclareModuleExports;
+export function assertDeclareModuleExports(node: object | null | undefined, opts?: object | null): void;
+export function isDeclareOpaqueType(node: object | null | undefined, opts?: object | null): node is DeclareOpaqueType;
+export function assertDeclareOpaqueType(node: object | null | undefined, opts?: object | null): void;
+export function isDeclareTypeAlias(node: object | null | undefined, opts?: object | null): node is DeclareTypeAlias;
+export function assertDeclareTypeAlias(node: object | null | undefined, opts?: object | null): void;
+export function isDeclareVariable(node: object | null | undefined, opts?: object | null): node is DeclareVariable;
+export function assertDeclareVariable(node: object | null | undefined, opts?: object | null): void;
+export function isDeclaredPredicate(node: object | null | undefined, opts?: object | null): node is DeclaredPredicate;
+export function assertDeclaredPredicate(node: object | null | undefined, opts?: object | null): void;
+export function isDecorator(node: object | null | undefined, opts?: object | null): node is Decorator;
+export function assertDecorator(node: object | null | undefined, opts?: object | null): void;
+export function isDirective(node: object | null | undefined, opts?: object | null): node is Directive;
+export function assertDirective(node: object | null | undefined, opts?: object | null): void;
+export function isDirectiveLiteral(node: object | null | undefined, opts?: object | null): node is DirectiveLiteral;
+export function assertDirectiveLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isDoExpression(node: object | null | undefined, opts?: object | null): node is DoExpression;
+export function assertDoExpression(node: object | null | undefined, opts?: object | null): void;
+export function isDoWhileStatement(node: object | null | undefined, opts?: object | null): node is DoWhileStatement;
+export function assertDoWhileStatement(node: object | null | undefined, opts?: object | null): void;
+export function isEmptyStatement(node: object | null | undefined, opts?: object | null): node is EmptyStatement;
+export function assertEmptyStatement(node: object | null | undefined, opts?: object | null): void;
+export function isEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is EmptyTypeAnnotation;
+export function assertEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isEnumBody(node: object | null | undefined, opts?: object | null): node is EnumBody;
+export function assertEnumBody(node: object | null | undefined, opts?: object | null): void;
+export function isEnumBooleanBody(node: object | null | undefined, opts?: object | null): node is EnumBooleanBody;
+export function assertEnumBooleanBody(node: object | null | undefined, opts?: object | null): void;
+export function isEnumBooleanMember(node: object | null | undefined, opts?: object | null): node is EnumBooleanMember;
+export function assertEnumBooleanMember(node: object | null | undefined, opts?: object | null): void;
+export function isEnumDeclaration(node: object | null | undefined, opts?: object | null): node is EnumDeclaration;
+export function assertEnumDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isEnumDefaultedMember(node: object | null | undefined, opts?: object | null): node is EnumDefaultedMember;
+export function assertEnumDefaultedMember(node: object | null | undefined, opts?: object | null): void;
+export function isEnumMember(node: object | null | undefined, opts?: object | null): node is EnumMember;
+export function assertEnumMember(node: object | null | undefined, opts?: object | null): void;
+export function isEnumNumberBody(node: object | null | undefined, opts?: object | null): node is EnumNumberBody;
+export function assertEnumNumberBody(node: object | null | undefined, opts?: object | null): void;
+export function isEnumNumberMember(node: object | null | undefined, opts?: object | null): node is EnumNumberMember;
+export function assertEnumNumberMember(node: object | null | undefined, opts?: object | null): void;
+export function isEnumStringBody(node: object | null | undefined, opts?: object | null): node is EnumStringBody;
+export function assertEnumStringBody(node: object | null | undefined, opts?: object | null): void;
+export function isEnumStringMember(node: object | null | undefined, opts?: object | null): node is EnumStringMember;
+export function assertEnumStringMember(node: object | null | undefined, opts?: object | null): void;
+export function isEnumSymbolBody(node: object | null | undefined, opts?: object | null): node is EnumSymbolBody;
+export function assertEnumSymbolBody(node: object | null | undefined, opts?: object | null): void;
+export function isExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ExistsTypeAnnotation;
+export function assertExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is ExportAllDeclaration;
+export function assertExportAllDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isExportDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDeclaration;
+export function assertExportDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDefaultDeclaration;
+export function assertExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ExportDefaultSpecifier;
+export function assertExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): void;
+export function isExportNamedDeclaration(node: object | null | undefined, opts?: object | null): node is ExportNamedDeclaration;
+export function assertExportNamedDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ExportNamespaceSpecifier;
+export function assertExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): void;
+export function isExportSpecifier(node: object | null | undefined, opts?: object | null): node is ExportSpecifier;
+export function assertExportSpecifier(node: object | null | undefined, opts?: object | null): void;
+export function isExpression(node: object | null | undefined, opts?: object | null): node is Expression;
+export function assertExpression(node: object | null | undefined, opts?: object | null): void;
+export function isExpressionStatement(node: object | null | undefined, opts?: object | null): node is ExpressionStatement;
+export function assertExpressionStatement(node: object | null | undefined, opts?: object | null): void;
+export function isExpressionWrapper(node: object | null | undefined, opts?: object | null): node is ExpressionWrapper;
+export function assertExpressionWrapper(node: object | null | undefined, opts?: object | null): void;
+export function isFile(node: object | null | undefined, opts?: object | null): node is File;
+export function assertFile(node: object | null | undefined, opts?: object | null): void;
+export function isFlow(node: object | null | undefined, opts?: object | null): node is Flow;
+export function assertFlow(node: object | null | undefined, opts?: object | null): void;
+export function isFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): node is FlowBaseAnnotation;
+export function assertFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isFlowDeclaration(node: object | null | undefined, opts?: object | null): node is FlowDeclaration;
+export function assertFlowDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isFlowPredicate(node: object | null | undefined, opts?: object | null): node is FlowPredicate;
+export function assertFlowPredicate(node: object | null | undefined, opts?: object | null): void;
+export function isFlowType(node: object | null | undefined, opts?: object | null): node is FlowType;
+export function assertFlowType(node: object | null | undefined, opts?: object | null): void;
+export function isFor(node: object | null | undefined, opts?: object | null): node is For;
+export function assertFor(node: object | null | undefined, opts?: object | null): void;
+export function isForInStatement(node: object | null | undefined, opts?: object | null): node is ForInStatement;
+export function assertForInStatement(node: object | null | undefined, opts?: object | null): void;
+export function isForOfStatement(node: object | null | undefined, opts?: object | null): node is ForOfStatement;
+export function assertForOfStatement(node: object | null | undefined, opts?: object | null): void;
+export function isForStatement(node: object | null | undefined, opts?: object | null): node is ForStatement;
+export function assertForStatement(node: object | null | undefined, opts?: object | null): void;
+export function isForXStatement(node: object | null | undefined, opts?: object | null): node is ForXStatement;
+export function assertForXStatement(node: object | null | undefined, opts?: object | null): void;
+export function isFunction(node: object | null | undefined, opts?: object | null): node is Function;
+export function assertFunction(node: object | null | undefined, opts?: object | null): void;
+export function isFunctionDeclaration(node: object | null | undefined, opts?: object | null): node is FunctionDeclaration;
+export function assertFunctionDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isFunctionExpression(node: object | null | undefined, opts?: object | null): node is FunctionExpression;
+export function assertFunctionExpression(node: object | null | undefined, opts?: object | null): void;
+export function isFunctionParent(node: object | null | undefined, opts?: object | null): node is FunctionParent;
+export function assertFunctionParent(node: object | null | undefined, opts?: object | null): void;
+export function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is FunctionTypeAnnotation;
+export function assertFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isFunctionTypeParam(node: object | null | undefined, opts?: object | null): node is FunctionTypeParam;
+export function assertFunctionTypeParam(node: object | null | undefined, opts?: object | null): void;
+export function isGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): node is GenericTypeAnnotation;
+export function assertGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isIdentifier(node: object | null | undefined, opts?: object | null): node is Identifier;
+export function assertIdentifier(node: object | null | undefined, opts?: object | null): void;
+export function isIfStatement(node: object | null | undefined, opts?: object | null): node is IfStatement;
+export function assertIfStatement(node: object | null | undefined, opts?: object | null): void;
+export function isImmutable(node: object | null | undefined, opts?: object | null): node is Immutable;
+export function assertImmutable(node: object | null | undefined, opts?: object | null): void;
+export function isImport(node: object | null | undefined, opts?: object | null): node is Import;
+export function assertImport(node: object | null | undefined, opts?: object | null): void;
+export function isImportAttribute(node: object | null | undefined, opts?: object | null): node is ImportAttribute;
+export function assertImportAttribute(node: object | null | undefined, opts?: object | null): void;
+export function isImportDeclaration(node: object | null | undefined, opts?: object | null): node is ImportDeclaration;
+export function assertImportDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ImportDefaultSpecifier;
+export function assertImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): void;
+export function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ImportNamespaceSpecifier;
+export function assertImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): void;
+export function isImportSpecifier(node: object | null | undefined, opts?: object | null): node is ImportSpecifier;
+export function assertImportSpecifier(node: object | null | undefined, opts?: object | null): void;
+export function isIndexedAccessType(node: object | null | undefined, opts?: object | null): node is IndexedAccessType;
+export function assertIndexedAccessType(node: object | null | undefined, opts?: object | null): void;
+export function isInferredPredicate(node: object | null | undefined, opts?: object | null): node is InferredPredicate;
+export function assertInferredPredicate(node: object | null | undefined, opts?: object | null): void;
+export function isInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is InterfaceDeclaration;
+export function assertInterfaceDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isInterfaceExtends(node: object | null | undefined, opts?: object | null): node is InterfaceExtends;
+export function assertInterfaceExtends(node: object | null | undefined, opts?: object | null): void;
+export function isInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): node is InterfaceTypeAnnotation;
+export function assertInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isInterpreterDirective(node: object | null | undefined, opts?: object | null): node is InterpreterDirective;
+export function assertInterpreterDirective(node: object | null | undefined, opts?: object | null): void;
+export function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is IntersectionTypeAnnotation;
+export function assertIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isJSX(node: object | null | undefined, opts?: object | null): node is JSX;
+export function assertJSX(node: object | null | undefined, opts?: object | null): void;
+export function isJSXAttribute(node: object | null | undefined, opts?: object | null): node is JSXAttribute;
+export function assertJSXAttribute(node: object | null | undefined, opts?: object | null): void;
+export function isJSXClosingElement(node: object | null | undefined, opts?: object | null): node is JSXClosingElement;
+export function assertJSXClosingElement(node: object | null | undefined, opts?: object | null): void;
+export function isJSXClosingFragment(node: object | null | undefined, opts?: object | null): node is JSXClosingFragment;
+export function assertJSXClosingFragment(node: object | null | undefined, opts?: object | null): void;
+export function isJSXElement(node: object | null | undefined, opts?: object | null): node is JSXElement;
+export function assertJSXElement(node: object | null | undefined, opts?: object | null): void;
+export function isJSXEmptyExpression(node: object | null | undefined, opts?: object | null): node is JSXEmptyExpression;
+export function assertJSXEmptyExpression(node: object | null | undefined, opts?: object | null): void;
+export function isJSXExpressionContainer(node: object | null | undefined, opts?: object | null): node is JSXExpressionContainer;
+export function assertJSXExpressionContainer(node: object | null | undefined, opts?: object | null): void;
+export function isJSXFragment(node: object | null | undefined, opts?: object | null): node is JSXFragment;
+export function assertJSXFragment(node: object | null | undefined, opts?: object | null): void;
+export function isJSXIdentifier(node: object | null | undefined, opts?: object | null): node is JSXIdentifier;
+export function assertJSXIdentifier(node: object | null | undefined, opts?: object | null): void;
+export function isJSXMemberExpression(node: object | null | undefined, opts?: object | null): node is JSXMemberExpression;
+export function assertJSXMemberExpression(node: object | null | undefined, opts?: object | null): void;
+export function isJSXNamespacedName(node: object | null | undefined, opts?: object | null): node is JSXNamespacedName;
+export function assertJSXNamespacedName(node: object | null | undefined, opts?: object | null): void;
+export function isJSXOpeningElement(node: object | null | undefined, opts?: object | null): node is JSXOpeningElement;
+export function assertJSXOpeningElement(node: object | null | undefined, opts?: object | null): void;
+export function isJSXOpeningFragment(node: object | null | undefined, opts?: object | null): node is JSXOpeningFragment;
+export function assertJSXOpeningFragment(node: object | null | undefined, opts?: object | null): void;
+export function isJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): node is JSXSpreadAttribute;
+export function assertJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): void;
+export function isJSXSpreadChild(node: object | null | undefined, opts?: object | null): node is JSXSpreadChild;
+export function assertJSXSpreadChild(node: object | null | undefined, opts?: object | null): void;
+export function isJSXText(node: object | null | undefined, opts?: object | null): node is JSXText;
+export function assertJSXText(node: object | null | undefined, opts?: object | null): void;
+export function isLVal(node: object | null | undefined, opts?: object | null): node is LVal;
+export function assertLVal(node: object | null | undefined, opts?: object | null): void;
+export function isLabeledStatement(node: object | null | undefined, opts?: object | null): node is LabeledStatement;
+export function assertLabeledStatement(node: object | null | undefined, opts?: object | null): void;
+export function isLiteral(node: object | null | undefined, opts?: object | null): node is Literal;
+export function assertLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isLogicalExpression(node: object | null | undefined, opts?: object | null): node is LogicalExpression;
+export function assertLogicalExpression(node: object | null | undefined, opts?: object | null): void;
+export function isLoop(node: object | null | undefined, opts?: object | null): node is Loop;
+export function assertLoop(node: object | null | undefined, opts?: object | null): void;
+export function isMemberExpression(node: object | null | undefined, opts?: object | null): node is MemberExpression;
+export function assertMemberExpression(node: object | null | undefined, opts?: object | null): void;
+export function isMetaProperty(node: object | null | undefined, opts?: object | null): node is MetaProperty;
+export function assertMetaProperty(node: object | null | undefined, opts?: object | null): void;
+export function isMethod(node: object | null | undefined, opts?: object | null): node is Method;
+export function assertMethod(node: object | null | undefined, opts?: object | null): void;
+export function isMiscellaneous(node: object | null | undefined, opts?: object | null): node is Miscellaneous;
+export function assertMiscellaneous(node: object | null | undefined, opts?: object | null): void;
+export function isMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): node is MixedTypeAnnotation;
+export function assertMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isModuleDeclaration(node: object | null | undefined, opts?: object | null): node is ModuleDeclaration;
+export function assertModuleDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isModuleExpression(node: object | null | undefined, opts?: object | null): node is ModuleExpression;
+export function assertModuleExpression(node: object | null | undefined, opts?: object | null): void;
+export function isModuleSpecifier(node: object | null | undefined, opts?: object | null): node is ModuleSpecifier;
+export function assertModuleSpecifier(node: object | null | undefined, opts?: object | null): void;
+export function isNewExpression(node: object | null | undefined, opts?: object | null): node is NewExpression;
+export function assertNewExpression(node: object | null | undefined, opts?: object | null): void;
+export function isNoop(node: object | null | undefined, opts?: object | null): node is Noop;
+export function assertNoop(node: object | null | undefined, opts?: object | null): void;
+export function isNullLiteral(node: object | null | undefined, opts?: object | null): node is NullLiteral;
+export function assertNullLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullLiteralTypeAnnotation;
+export function assertNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullableTypeAnnotation;
+export function assertNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+/** @deprecated Use `isNumericLiteral` */
+export function isNumberLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral;
+/** @deprecated Use `assertNumericLiteral` */
+export function assertNumberLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberLiteralTypeAnnotation;
+export function assertNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberTypeAnnotation;
+export function assertNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isNumericLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral;
+export function assertNumericLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isObjectExpression(node: object | null | undefined, opts?: object | null): node is ObjectExpression;
+export function assertObjectExpression(node: object | null | undefined, opts?: object | null): void;
+export function isObjectMember(node: object | null | undefined, opts?: object | null): node is ObjectMember;
+export function assertObjectMember(node: object | null | undefined, opts?: object | null): void;
+export function isObjectMethod(node: object | null | undefined, opts?: object | null): node is ObjectMethod;
+export function assertObjectMethod(node: object | null | undefined, opts?: object | null): void;
+export function isObjectPattern(node: object | null | undefined, opts?: object | null): node is ObjectPattern;
+export function assertObjectPattern(node: object | null | undefined, opts?: object | null): void;
+export function isObjectProperty(node: object | null | undefined, opts?: object | null): node is ObjectProperty;
+export function assertObjectProperty(node: object | null | undefined, opts?: object | null): void;
+export function isObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ObjectTypeAnnotation;
+export function assertObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeCallProperty;
+export function assertObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): void;
+export function isObjectTypeIndexer(node: object | null | undefined, opts?: object | null): node is ObjectTypeIndexer;
+export function assertObjectTypeIndexer(node: object | null | undefined, opts?: object | null): void;
+export function isObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): node is ObjectTypeInternalSlot;
+export function assertObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): void;
+export function isObjectTypeProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeProperty;
+export function assertObjectTypeProperty(node: object | null | undefined, opts?: object | null): void;
+export function isObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeSpreadProperty;
+export function assertObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): void;
+export function isOpaqueType(node: object | null | undefined, opts?: object | null): node is OpaqueType;
+export function assertOpaqueType(node: object | null | undefined, opts?: object | null): void;
+export function isOptionalCallExpression(node: object | null | undefined, opts?: object | null): node is OptionalCallExpression;
+export function assertOptionalCallExpression(node: object | null | undefined, opts?: object | null): void;
+export function isOptionalIndexedAccessType(node: object | null | undefined, opts?: object | null): node is OptionalIndexedAccessType;
+export function assertOptionalIndexedAccessType(node: object | null | undefined, opts?: object | null): void;
+export function isOptionalMemberExpression(node: object | null | undefined, opts?: object | null): node is OptionalMemberExpression;
+export function assertOptionalMemberExpression(node: object | null | undefined, opts?: object | null): void;
+export function isParenthesizedExpression(node: object | null | undefined, opts?: object | null): node is ParenthesizedExpression;
+export function assertParenthesizedExpression(node: object | null | undefined, opts?: object | null): void;
+export function isPattern(node: object | null | undefined, opts?: object | null): node is Pattern;
+export function assertPattern(node: object | null | undefined, opts?: object | null): void;
+export function isPatternLike(node: object | null | undefined, opts?: object | null): node is PatternLike;
+export function assertPatternLike(node: object | null | undefined, opts?: object | null): void;
+export function isPipelineBareFunction(node: object | null | undefined, opts?: object | null): node is PipelineBareFunction;
+export function assertPipelineBareFunction(node: object | null | undefined, opts?: object | null): void;
+export function isPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): node is PipelinePrimaryTopicReference;
+export function assertPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): void;
+export function isPipelineTopicExpression(node: object | null | undefined, opts?: object | null): node is PipelineTopicExpression;
+export function assertPipelineTopicExpression(node: object | null | undefined, opts?: object | null): void;
+export function isPlaceholder(node: object | null | undefined, opts?: object | null): node is Placeholder;
+export function assertPlaceholder(node: object | null | undefined, opts?: object | null): void;
+export function isPrivate(node: object | null | undefined, opts?: object | null): node is Private;
+export function assertPrivate(node: object | null | undefined, opts?: object | null): void;
+export function isPrivateName(node: object | null | undefined, opts?: object | null): node is PrivateName;
+export function assertPrivateName(node: object | null | undefined, opts?: object | null): void;
+export function isProgram(node: object | null | undefined, opts?: object | null): node is Program;
+export function assertProgram(node: object | null | undefined, opts?: object | null): void;
+export function isProperty(node: object | null | undefined, opts?: object | null): node is Property;
+export function assertProperty(node: object | null | undefined, opts?: object | null): void;
+export function isPureish(node: object | null | undefined, opts?: object | null): node is Pureish;
+export function assertPureish(node: object | null | undefined, opts?: object | null): void;
+export function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): node is QualifiedTypeIdentifier;
+export function assertQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): void;
+export function isRecordExpression(node: object | null | undefined, opts?: object | null): node is RecordExpression;
+export function assertRecordExpression(node: object | null | undefined, opts?: object | null): void;
+export function isRegExpLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral;
+export function assertRegExpLiteral(node: object | null | undefined, opts?: object | null): void;
+/** @deprecated Use `isRegExpLiteral` */
+export function isRegexLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral;
+/** @deprecated Use `assertRegExpLiteral` */
+export function assertRegexLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isRestElement(node: object | null | undefined, opts?: object | null): node is RestElement;
+export function assertRestElement(node: object | null | undefined, opts?: object | null): void;
+/** @deprecated Use `isRestElement` */
+export function isRestProperty(node: object | null | undefined, opts?: object | null): node is RestElement;
+/** @deprecated Use `assertRestElement` */
+export function assertRestProperty(node: object | null | undefined, opts?: object | null): void;
+export function isReturnStatement(node: object | null | undefined, opts?: object | null): node is ReturnStatement;
+export function assertReturnStatement(node: object | null | undefined, opts?: object | null): void;
+export function isScopable(node: object | null | undefined, opts?: object | null): node is Scopable;
+export function assertScopable(node: object | null | undefined, opts?: object | null): void;
+export function isSequenceExpression(node: object | null | undefined, opts?: object | null): node is SequenceExpression;
+export function assertSequenceExpression(node: object | null | undefined, opts?: object | null): void;
+export function isSpreadElement(node: object | null | undefined, opts?: object | null): node is SpreadElement;
+export function assertSpreadElement(node: object | null | undefined, opts?: object | null): void;
+/** @deprecated Use `isSpreadElement` */
+export function isSpreadProperty(node: object | null | undefined, opts?: object | null): node is SpreadElement;
+/** @deprecated Use `assertSpreadElement` */
+export function assertSpreadProperty(node: object | null | undefined, opts?: object | null): void;
+export function isStandardized(node: object | null | undefined, opts?: object | null): node is Standardized;
+export function assertStandardized(node: object | null | undefined, opts?: object | null): void;
+export function isStatement(node: object | null | undefined, opts?: object | null): node is Statement;
+export function assertStatement(node: object | null | undefined, opts?: object | null): void;
+export function isStaticBlock(node: object | null | undefined, opts?: object | null): node is StaticBlock;
+export function assertStaticBlock(node: object | null | undefined, opts?: object | null): void;
+export function isStringLiteral(node: object | null | undefined, opts?: object | null): node is StringLiteral;
+export function assertStringLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringLiteralTypeAnnotation;
+export function assertStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isStringTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringTypeAnnotation;
+export function assertStringTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isSuper(node: object | null | undefined, opts?: object | null): node is Super;
+export function assertSuper(node: object | null | undefined, opts?: object | null): void;
+export function isSwitchCase(node: object | null | undefined, opts?: object | null): node is SwitchCase;
+export function assertSwitchCase(node: object | null | undefined, opts?: object | null): void;
+export function isSwitchStatement(node: object | null | undefined, opts?: object | null): node is SwitchStatement;
+export function assertSwitchStatement(node: object | null | undefined, opts?: object | null): void;
+export function isSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): node is SymbolTypeAnnotation;
+export function assertSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isTSAnyKeyword(node: object | null | undefined, opts?: object | null): node is TSAnyKeyword;
+export function assertTSAnyKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSArrayType(node: object | null | undefined, opts?: object | null): node is TSArrayType;
+export function assertTSArrayType(node: object | null | undefined, opts?: object | null): void;
+export function isTSAsExpression(node: object | null | undefined, opts?: object | null): node is TSAsExpression;
+export function assertTSAsExpression(node: object | null | undefined, opts?: object | null): void;
+export function isTSBaseType(node: object | null | undefined, opts?: object | null): node is TSBaseType;
+export function assertTSBaseType(node: object | null | undefined, opts?: object | null): void;
+export function isTSBigIntKeyword(node: object | null | undefined, opts?: object | null): node is TSBigIntKeyword;
+export function assertTSBigIntKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSBooleanKeyword(node: object | null | undefined, opts?: object | null): node is TSBooleanKeyword;
+export function assertTSBooleanKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSCallSignatureDeclaration;
+export function assertTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isTSConditionalType(node: object | null | undefined, opts?: object | null): node is TSConditionalType;
+export function assertTSConditionalType(node: object | null | undefined, opts?: object | null): void;
+export function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSConstructSignatureDeclaration;
+export function assertTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isTSConstructorType(node: object | null | undefined, opts?: object | null): node is TSConstructorType;
+export function assertTSConstructorType(node: object | null | undefined, opts?: object | null): void;
+export function isTSDeclareFunction(node: object | null | undefined, opts?: object | null): node is TSDeclareFunction;
+export function assertTSDeclareFunction(node: object | null | undefined, opts?: object | null): void;
+export function isTSDeclareMethod(node: object | null | undefined, opts?: object | null): node is TSDeclareMethod;
+export function assertTSDeclareMethod(node: object | null | undefined, opts?: object | null): void;
+export function isTSEntityName(node: object | null | undefined, opts?: object | null): node is TSEntityName;
+export function assertTSEntityName(node: object | null | undefined, opts?: object | null): void;
+export function isTSEnumDeclaration(node: object | null | undefined, opts?: object | null): node is TSEnumDeclaration;
+export function assertTSEnumDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isTSEnumMember(node: object | null | undefined, opts?: object | null): node is TSEnumMember;
+export function assertTSEnumMember(node: object | null | undefined, opts?: object | null): void;
+export function isTSExportAssignment(node: object | null | undefined, opts?: object | null): node is TSExportAssignment;
+export function assertTSExportAssignment(node: object | null | undefined, opts?: object | null): void;
+export function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): node is TSExpressionWithTypeArguments;
+export function assertTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): void;
+export function isTSExternalModuleReference(node: object | null | undefined, opts?: object | null): node is TSExternalModuleReference;
+export function assertTSExternalModuleReference(node: object | null | undefined, opts?: object | null): void;
+export function isTSFunctionType(node: object | null | undefined, opts?: object | null): node is TSFunctionType;
+export function assertTSFunctionType(node: object | null | undefined, opts?: object | null): void;
+export function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): node is TSImportEqualsDeclaration;
+export function assertTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isTSImportType(node: object | null | undefined, opts?: object | null): node is TSImportType;
+export function assertTSImportType(node: object | null | undefined, opts?: object | null): void;
+export function isTSIndexSignature(node: object | null | undefined, opts?: object | null): node is TSIndexSignature;
+export function assertTSIndexSignature(node: object | null | undefined, opts?: object | null): void;
+export function isTSIndexedAccessType(node: object | null | undefined, opts?: object | null): node is TSIndexedAccessType;
+export function assertTSIndexedAccessType(node: object | null | undefined, opts?: object | null): void;
+export function isTSInferType(node: object | null | undefined, opts?: object | null): node is TSInferType;
+export function assertTSInferType(node: object | null | undefined, opts?: object | null): void;
+export function isTSInterfaceBody(node: object | null | undefined, opts?: object | null): node is TSInterfaceBody;
+export function assertTSInterfaceBody(node: object | null | undefined, opts?: object | null): void;
+export function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is TSInterfaceDeclaration;
+export function assertTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isTSIntersectionType(node: object | null | undefined, opts?: object | null): node is TSIntersectionType;
+export function assertTSIntersectionType(node: object | null | undefined, opts?: object | null): void;
+export function isTSIntrinsicKeyword(node: object | null | undefined, opts?: object | null): node is TSIntrinsicKeyword;
+export function assertTSIntrinsicKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSLiteralType(node: object | null | undefined, opts?: object | null): node is TSLiteralType;
+export function assertTSLiteralType(node: object | null | undefined, opts?: object | null): void;
+export function isTSMappedType(node: object | null | undefined, opts?: object | null): node is TSMappedType;
+export function assertTSMappedType(node: object | null | undefined, opts?: object | null): void;
+export function isTSMethodSignature(node: object | null | undefined, opts?: object | null): node is TSMethodSignature;
+export function assertTSMethodSignature(node: object | null | undefined, opts?: object | null): void;
+export function isTSModuleBlock(node: object | null | undefined, opts?: object | null): node is TSModuleBlock;
+export function assertTSModuleBlock(node: object | null | undefined, opts?: object | null): void;
+export function isTSModuleDeclaration(node: object | null | undefined, opts?: object | null): node is TSModuleDeclaration;
+export function assertTSModuleDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isTSNamedTupleMember(node: object | null | undefined, opts?: object | null): node is TSNamedTupleMember;
+export function assertTSNamedTupleMember(node: object | null | undefined, opts?: object | null): void;
+export function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): node is TSNamespaceExportDeclaration;
+export function assertTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isTSNeverKeyword(node: object | null | undefined, opts?: object | null): node is TSNeverKeyword;
+export function assertTSNeverKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSNonNullExpression(node: object | null | undefined, opts?: object | null): node is TSNonNullExpression;
+export function assertTSNonNullExpression(node: object | null | undefined, opts?: object | null): void;
+export function isTSNullKeyword(node: object | null | undefined, opts?: object | null): node is TSNullKeyword;
+export function assertTSNullKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSNumberKeyword(node: object | null | undefined, opts?: object | null): node is TSNumberKeyword;
+export function assertTSNumberKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSObjectKeyword(node: object | null | undefined, opts?: object | null): node is TSObjectKeyword;
+export function assertTSObjectKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSOptionalType(node: object | null | undefined, opts?: object | null): node is TSOptionalType;
+export function assertTSOptionalType(node: object | null | undefined, opts?: object | null): void;
+export function isTSParameterProperty(node: object | null | undefined, opts?: object | null): node is TSParameterProperty;
+export function assertTSParameterProperty(node: object | null | undefined, opts?: object | null): void;
+export function isTSParenthesizedType(node: object | null | undefined, opts?: object | null): node is TSParenthesizedType;
+export function assertTSParenthesizedType(node: object | null | undefined, opts?: object | null): void;
+export function isTSPropertySignature(node: object | null | undefined, opts?: object | null): node is TSPropertySignature;
+export function assertTSPropertySignature(node: object | null | undefined, opts?: object | null): void;
+export function isTSQualifiedName(node: object | null | undefined, opts?: object | null): node is TSQualifiedName;
+export function assertTSQualifiedName(node: object | null | undefined, opts?: object | null): void;
+export function isTSRestType(node: object | null | undefined, opts?: object | null): node is TSRestType;
+export function assertTSRestType(node: object | null | undefined, opts?: object | null): void;
+export function isTSStringKeyword(node: object | null | undefined, opts?: object | null): node is TSStringKeyword;
+export function assertTSStringKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSSymbolKeyword(node: object | null | undefined, opts?: object | null): node is TSSymbolKeyword;
+export function assertTSSymbolKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSThisType(node: object | null | undefined, opts?: object | null): node is TSThisType;
+export function assertTSThisType(node: object | null | undefined, opts?: object | null): void;
+export function isTSTupleType(node: object | null | undefined, opts?: object | null): node is TSTupleType;
+export function assertTSTupleType(node: object | null | undefined, opts?: object | null): void;
+export function isTSType(node: object | null | undefined, opts?: object | null): node is TSType;
+export function assertTSType(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeAliasDeclaration;
+export function assertTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TSTypeAnnotation;
+export function assertTSTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeAssertion(node: object | null | undefined, opts?: object | null): node is TSTypeAssertion;
+export function assertTSTypeAssertion(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeElement(node: object | null | undefined, opts?: object | null): node is TSTypeElement;
+export function assertTSTypeElement(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeLiteral(node: object | null | undefined, opts?: object | null): node is TSTypeLiteral;
+export function assertTSTypeLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeOperator(node: object | null | undefined, opts?: object | null): node is TSTypeOperator;
+export function assertTSTypeOperator(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeParameter(node: object | null | undefined, opts?: object | null): node is TSTypeParameter;
+export function assertTSTypeParameter(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeParameterDeclaration;
+export function assertTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TSTypeParameterInstantiation;
+export function assertTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypePredicate(node: object | null | undefined, opts?: object | null): node is TSTypePredicate;
+export function assertTSTypePredicate(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeQuery(node: object | null | undefined, opts?: object | null): node is TSTypeQuery;
+export function assertTSTypeQuery(node: object | null | undefined, opts?: object | null): void;
+export function isTSTypeReference(node: object | null | undefined, opts?: object | null): node is TSTypeReference;
+export function assertTSTypeReference(node: object | null | undefined, opts?: object | null): void;
+export function isTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): node is TSUndefinedKeyword;
+export function assertTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSUnionType(node: object | null | undefined, opts?: object | null): node is TSUnionType;
+export function assertTSUnionType(node: object | null | undefined, opts?: object | null): void;
+export function isTSUnknownKeyword(node: object | null | undefined, opts?: object | null): node is TSUnknownKeyword;
+export function assertTSUnknownKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTSVoidKeyword(node: object | null | undefined, opts?: object | null): node is TSVoidKeyword;
+export function assertTSVoidKeyword(node: object | null | undefined, opts?: object | null): void;
+export function isTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): node is TaggedTemplateExpression;
+export function assertTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): void;
+export function isTemplateElement(node: object | null | undefined, opts?: object | null): node is TemplateElement;
+export function assertTemplateElement(node: object | null | undefined, opts?: object | null): void;
+export function isTemplateLiteral(node: object | null | undefined, opts?: object | null): node is TemplateLiteral;
+export function assertTemplateLiteral(node: object | null | undefined, opts?: object | null): void;
+export function isTerminatorless(node: object | null | undefined, opts?: object | null): node is Terminatorless;
+export function assertTerminatorless(node: object | null | undefined, opts?: object | null): void;
+export function isThisExpression(node: object | null | undefined, opts?: object | null): node is ThisExpression;
+export function assertThisExpression(node: object | null | undefined, opts?: object | null): void;
+export function isThisTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ThisTypeAnnotation;
+export function assertThisTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isThrowStatement(node: object | null | undefined, opts?: object | null): node is ThrowStatement;
+export function assertThrowStatement(node: object | null | undefined, opts?: object | null): void;
+export function isTopicReference(node: object | null | undefined, opts?: object | null): node is TopicReference;
+export function assertTopicReference(node: object | null | undefined, opts?: object | null): void;
+export function isTryStatement(node: object | null | undefined, opts?: object | null): node is TryStatement;
+export function assertTryStatement(node: object | null | undefined, opts?: object | null): void;
+export function isTupleExpression(node: object | null | undefined, opts?: object | null): node is TupleExpression;
+export function assertTupleExpression(node: object | null | undefined, opts?: object | null): void;
+export function isTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TupleTypeAnnotation;
+export function assertTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isTypeAlias(node: object | null | undefined, opts?: object | null): node is TypeAlias;
+export function assertTypeAlias(node: object | null | undefined, opts?: object | null): void;
+export function isTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeAnnotation;
+export function assertTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isTypeCastExpression(node: object | null | undefined, opts?: object | null): node is TypeCastExpression;
+export function assertTypeCastExpression(node: object | null | undefined, opts?: object | null): void;
+export function isTypeParameter(node: object | null | undefined, opts?: object | null): node is TypeParameter;
+export function assertTypeParameter(node: object | null | undefined, opts?: object | null): void;
+export function isTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TypeParameterDeclaration;
+export function assertTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TypeParameterInstantiation;
+export function assertTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): void;
+export function isTypeScript(node: object | null | undefined, opts?: object | null): node is TypeScript;
+export function assertTypeScript(node: object | null | undefined, opts?: object | null): void;
+export function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeofTypeAnnotation;
+export function assertTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isUnaryExpression(node: object | null | undefined, opts?: object | null): node is UnaryExpression;
+export function assertUnaryExpression(node: object | null | undefined, opts?: object | null): void;
+export function isUnaryLike(node: object | null | undefined, opts?: object | null): node is UnaryLike;
+export function assertUnaryLike(node: object | null | undefined, opts?: object | null): void;
+export function isUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is UnionTypeAnnotation;
+export function assertUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isUpdateExpression(node: object | null | undefined, opts?: object | null): node is UpdateExpression;
+export function assertUpdateExpression(node: object | null | undefined, opts?: object | null): void;
+export function isUserWhitespacable(node: object | null | undefined, opts?: object | null): node is UserWhitespacable;
+export function assertUserWhitespacable(node: object | null | undefined, opts?: object | null): void;
+export function isV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): node is V8IntrinsicIdentifier;
+export function assertV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): void;
+export function isVariableDeclaration(node: object | null | undefined, opts?: object | null): node is VariableDeclaration;
+export function assertVariableDeclaration(node: object | null | undefined, opts?: object | null): void;
+export function isVariableDeclarator(node: object | null | undefined, opts?: object | null): node is VariableDeclarator;
+export function assertVariableDeclarator(node: object | null | undefined, opts?: object | null): void;
+export function isVariance(node: object | null | undefined, opts?: object | null): node is Variance;
+export function assertVariance(node: object | null | undefined, opts?: object | null): void;
+export function isVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): node is VoidTypeAnnotation;
+export function assertVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): void;
+export function isWhile(node: object | null | undefined, opts?: object | null): node is While;
+export function assertWhile(node: object | null | undefined, opts?: object | null): void;
+export function isWhileStatement(node: object | null | undefined, opts?: object | null): node is WhileStatement;
+export function assertWhileStatement(node: object | null | undefined, opts?: object | null): void;
+export function isWithStatement(node: object | null | undefined, opts?: object | null): node is WithStatement;
+export function assertWithStatement(node: object | null | undefined, opts?: object | null): void;
+export function isYieldExpression(node: object | null | undefined, opts?: object | null): node is YieldExpression;
+export function assertYieldExpression(node: object | null | undefined, opts?: object | null): void;
+export function assertNode(obj: any): void
+export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): StringTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | BooleanTypeAnnotation | GenericTypeAnnotation
+export function createUnionTypeAnnotation<T extends FlowType>(types: [T]): T
+export function createFlowUnionType<T extends FlowType>(types: [T]): T
+export function createUnionTypeAnnotation(types: ReadonlyArray<FlowType>): UnionTypeAnnotation
+export function createFlowUnionType(types: ReadonlyArray<FlowType>): UnionTypeAnnotation
+export function buildChildren(node: { children: ReadonlyArray<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment | JSXEmptyExpression> }): JSXElement['children']
+export function clone<T extends Node>(n: T): T;
+export function cloneDeep<T extends Node>(n: T): T;
+export function cloneDeepWithoutLoc<T extends Node>(n: T): T;
+export function cloneNode<T extends Node>(n: T, deep?: boolean, withoutLoc?: boolean): T;
+export function cloneWithoutLoc<T extends Node>(n: T): T;
+export type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'
+export function addComment<T extends Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T
+export function addComments<T extends Node>(node: T, type: CommentTypeShorthand, comments: ReadonlyArray<Comment>): T
+export function inheritInnerComments(node: Node, parent: Node): void
+export function inheritLeadingComments(node: Node, parent: Node): void
+export function inheritsComments<T extends Node>(node: T, parent: Node): void
+export function inheritTrailingComments(node: Node, parent: Node): void
+export function removeComments<T extends Node>(node: T): T
+export function ensureBlock(node: Extract<Node, { body: BlockStatement | Statement | Expression }>): BlockStatement
+export function ensureBlock<K extends keyof Extract<Node, { body: BlockStatement | Statement | Expression }> = 'body'>(node: Extract<Node, Record<K, BlockStatement | Statement | Expression>>, key: K): BlockStatement
+export function toBindingIdentifierName(name: { toString(): string } | null | undefined): string
+export function toBlock(node: Statement | Expression, parent?: Function | null): BlockStatement
+export function toComputedKey<T extends Extract<Node, { computed: boolean | null }>>(node: T, key?: Expression | Identifier): Expression
+export function toExpression(node: Function): FunctionExpression
+export function toExpression(node: Class): ClassExpression
+export function toExpression(node: ExpressionStatement | Expression | Class | Function): Expression
+export function toIdentifier(name: { toString(): string } | null | undefined): string
+export function toKeyAlias(node: Method | Property, key?: Node): string
+export function toSequenceExpression(nodes: ReadonlyArray<Node>, scope: { push(value: { id: LVal; kind: 'var'; init?: Expression}): void; buildUndefinedNode(): Node }): SequenceExpression | undefined
+export function toStatement(node: AssignmentExpression, ignore?: boolean): ExpressionStatement
+export function toStatement(node: Statement | AssignmentExpression, ignore?: boolean): Statement
+export function toStatement(node: Class, ignore: true): ClassDeclaration | undefined
+export function toStatement(node: Class, ignore?: boolean): ClassDeclaration
+export function toStatement(node: Function, ignore: true): FunctionDeclaration | undefined
+export function toStatement(node: Function, ignore?: boolean): FunctionDeclaration
+export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore: true): Statement | undefined
+export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore?: boolean): Statement
+export function valueToNode(value: undefined): Identifier
+export function valueToNode(value: boolean): BooleanLiteral
+export function valueToNode(value: null): NullLiteral
+export function valueToNode(value: string): StringLiteral
+export function valueToNode(value: number): NumericLiteral | BinaryExpression | UnaryExpression
+export function valueToNode(value: RegExp): RegExpLiteral
+export function valueToNode(value: ReadonlyArray<undefined | boolean | null | string | number | RegExp | object>): ArrayExpression
+export function valueToNode(value: object): ObjectExpression
+export function valueToNode(value: undefined | boolean | null | string | number | RegExp | object): Expression
+export function removeTypeDuplicates(types: ReadonlyArray<FlowType | false | null | undefined>): FlowType[]
+export function appendToMemberExpression<T extends Pick<MemberExpression, 'object' | 'property'>>(member: T, append: MemberExpression['property'], computed?: boolean): T
+export function inherits<T extends Node | null | undefined>(child: T, parent: Node | null | undefined): T
+export function prependToMemberExpression<T extends Pick<MemberExpression, 'object' | 'property'>>(member: T, prepend: MemberExpression['object']): T
+export function removeProperties(
+ n: Node,
+ opts?: { preserveComments: boolean } | null
+): void;
+export function removePropertiesDeep<T extends Node>(
+ n: T,
+ opts?: { preserveComments: boolean } | null
+): T;
+export function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record<string, Array<Identifier>>
+export function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record<string, Identifier>
+export function getBindingIdentifiers(node: Node, duplicates: boolean, outerOnly?: boolean): Record<string, Identifier | Array<Identifier>>
+export function getOuterBindingIdentifiers(node: Node, duplicates: true): Record<string, Array<Identifier>>
+export function getOuterBindingIdentifiers(node: Node, duplicates?: false): Record<string, Identifier>
+export function getOuterBindingIdentifiers(node: Node, duplicates: boolean): Record<string, Identifier | Array<Identifier>>
+export type TraversalAncestors = ReadonlyArray<{
+ node: Node,
+ key: string,
+ index?: number,
+}>;
+export type TraversalHandler<T> = (
+ this: undefined, node: Node, parent: TraversalAncestors, type: T
+) => void;
+export type TraversalHandlers<T> = {
+ enter?: TraversalHandler<T>,
+ exit?: TraversalHandler<T>,
+};
+export function traverse<T>(n: Node, h: TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;
+export function traverseFast<T>(n: Node, h: TraversalHandler<T>, state?: T): void;
+export function shallowEqual<T extends object>(actual: object, expected: T): actual is T
+export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (node: Node | null | undefined) => node is MemberExpression
+export function is<T extends Node['type']>(type: T, n: Node | null | undefined, required?: undefined): n is Extract<Node, { type: T }>
+export function is<T extends Node['type'], P extends Extract<Node, { type: T }>>(type: T, n: Node | null | undefined, required: Partial<P>): n is P
+export function is<P extends Node>(type: string, n: Node | null | undefined, required: Partial<P>): n is P
+export function is(type: string, n: Node | null | undefined, required?: Partial<Node>): n is Node
+export function isBinding(node: Node, parent: Node, grandparent?: Node): boolean
+export function isBlockScoped(node: Node): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration
+export function isImmutable(node: Node): node is Immutable
+export function isLet(node: Node): node is VariableDeclaration
+export function isNode(node: object | null | undefined): node is Node
+export function isNodesEquivalent<T extends Partial<Node>>(a: T, b: any): b is T
+export function isNodesEquivalent(a: any, b: any): boolean
+export function isPlaceholderType(placeholderType: Node['type'], targetType: Node['type']): boolean
+export function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean
+export function isScope(node: Node, parent: Node): node is Scopable
+export function isSpecifierDefault(specifier: ModuleSpecifier): boolean
+export function isType<T extends Node['type']>(nodetype: string, targetType: T): nodetype is T
+export function isType(nodetype: string | null | undefined, targetType: string): boolean
+export function isValidES3Identifier(name: string): boolean
+export function isValidIdentifier(name: string): boolean
+export function isVar(node: Node): node is VariableDeclaration
+export function matchesPattern(node: Node | null | undefined, match: string | ReadonlyArray<string>, allowPartial?: boolean): node is MemberExpression
+export function validate<T extends Node, K extends keyof T>(n: Node | null | undefined, key: K, value: T[K]): void;
+export function validate(n: Node, key: string, value: any): void;
diff --git a/node_modules/@babel/types/lib/index.d.ts b/node_modules/@babel/types/lib/index.d.ts
new file mode 100644
index 0000000..791ddba
--- /dev/null
+++ b/node_modules/@babel/types/lib/index.d.ts
@@ -0,0 +1,2927 @@
+interface BaseComment {
+ value: string;
+ start: number;
+ end: number;
+ loc: SourceLocation;
+ type: "CommentBlock" | "CommentLine";
+}
+interface CommentBlock extends BaseComment {
+ type: "CommentBlock";
+}
+interface CommentLine extends BaseComment {
+ type: "CommentLine";
+}
+declare type Comment = CommentBlock | CommentLine;
+interface SourceLocation {
+ start: {
+ line: number;
+ column: number;
+ };
+ end: {
+ line: number;
+ column: number;
+ };
+}
+interface BaseNode {
+ leadingComments: ReadonlyArray<Comment> | null;
+ innerComments: ReadonlyArray<Comment> | null;
+ trailingComments: ReadonlyArray<Comment> | null;
+ start: number | null;
+ end: number | null;
+ loc: SourceLocation | null;
+ type: Node["type"];
+ range?: [number, number];
+ extra?: Record<string, unknown>;
+}
+declare type CommentTypeShorthand = "leading" | "inner" | "trailing";
+declare type Node = AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | BinaryExpression | BindExpression | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | ClassAccessorProperty | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | ContinueStatement | DebuggerStatement | DecimalLiteral | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | ExpressionStatement | File | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Import | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | IndexedAccessType | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LabeledStatement | LogicalExpression | MemberExpression | MetaProperty | MixedTypeAnnotation | ModuleExpression | NewExpression | Noop | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral$1 | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalIndexedAccessType | OptionalMemberExpression | ParenthesizedExpression | PipelineBareFunction | PipelinePrimaryTopicReference | PipelineTopicExpression | Placeholder | PrivateName | Program | QualifiedTypeIdentifier | RecordExpression | RegExpLiteral | RegexLiteral$1 | RestElement | RestProperty$1 | ReturnStatement | SequenceExpression | SpreadElement | SpreadProperty$1 | StaticBlock | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExpressionWithTypeArguments | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInterfaceBody | TSInterfaceDeclaration | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSStringKeyword | TSSymbolKeyword | TSThisType | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | ThisExpression | ThisTypeAnnotation | ThrowStatement | TopicReference | TryStatement | TupleExpression | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeofTypeAnnotation | UnaryExpression | UnionTypeAnnotation | UpdateExpression | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidTypeAnnotation | WhileStatement | WithStatement | YieldExpression;
+interface ArrayExpression extends BaseNode {
+ type: "ArrayExpression";
+ elements: Array<null | Expression | SpreadElement>;
+}
+interface AssignmentExpression extends BaseNode {
+ type: "AssignmentExpression";
+ operator: string;
+ left: LVal;
+ right: Expression;
+}
+interface BinaryExpression extends BaseNode {
+ type: "BinaryExpression";
+ operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=";
+ left: Expression | PrivateName;
+ right: Expression;
+}
+interface InterpreterDirective extends BaseNode {
+ type: "InterpreterDirective";
+ value: string;
+}
+interface Directive extends BaseNode {
+ type: "Directive";
+ value: DirectiveLiteral;
+}
+interface DirectiveLiteral extends BaseNode {
+ type: "DirectiveLiteral";
+ value: string;
+}
+interface BlockStatement extends BaseNode {
+ type: "BlockStatement";
+ body: Array<Statement>;
+ directives: Array<Directive>;
+}
+interface BreakStatement extends BaseNode {
+ type: "BreakStatement";
+ label?: Identifier | null;
+}
+interface CallExpression extends BaseNode {
+ type: "CallExpression";
+ callee: Expression | V8IntrinsicIdentifier;
+ arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>;
+ optional?: true | false | null;
+ typeArguments?: TypeParameterInstantiation | null;
+ typeParameters?: TSTypeParameterInstantiation | null;
+}
+interface CatchClause extends BaseNode {
+ type: "CatchClause";
+ param?: Identifier | ArrayPattern | ObjectPattern | null;
+ body: BlockStatement;
+}
+interface ConditionalExpression extends BaseNode {
+ type: "ConditionalExpression";
+ test: Expression;
+ consequent: Expression;
+ alternate: Expression;
+}
+interface ContinueStatement extends BaseNode {
+ type: "ContinueStatement";
+ label?: Identifier | null;
+}
+interface DebuggerStatement extends BaseNode {
+ type: "DebuggerStatement";
+}
+interface DoWhileStatement extends BaseNode {
+ type: "DoWhileStatement";
+ test: Expression;
+ body: Statement;
+}
+interface EmptyStatement extends BaseNode {
+ type: "EmptyStatement";
+}
+interface ExpressionStatement extends BaseNode {
+ type: "ExpressionStatement";
+ expression: Expression;
+}
+interface File extends BaseNode {
+ type: "File";
+ program: Program;
+ comments?: Array<CommentBlock | CommentLine> | null;
+ tokens?: Array<any> | null;
+}
+interface ForInStatement extends BaseNode {
+ type: "ForInStatement";
+ left: VariableDeclaration | LVal;
+ right: Expression;
+ body: Statement;
+}
+interface ForStatement extends BaseNode {
+ type: "ForStatement";
+ init?: VariableDeclaration | Expression | null;
+ test?: Expression | null;
+ update?: Expression | null;
+ body: Statement;
+}
+interface FunctionDeclaration extends BaseNode {
+ type: "FunctionDeclaration";
+ id?: Identifier | null;
+ params: Array<Identifier | Pattern | RestElement>;
+ body: BlockStatement;
+ generator?: boolean;
+ async?: boolean;
+ declare?: boolean | null;
+ returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+interface FunctionExpression extends BaseNode {
+ type: "FunctionExpression";
+ id?: Identifier | null;
+ params: Array<Identifier | Pattern | RestElement>;
+ body: BlockStatement;
+ generator?: boolean;
+ async?: boolean;
+ returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+interface Identifier extends BaseNode {
+ type: "Identifier";
+ name: string;
+ decorators?: Array<Decorator> | null;
+ optional?: boolean | null;
+ typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+interface IfStatement extends BaseNode {
+ type: "IfStatement";
+ test: Expression;
+ consequent: Statement;
+ alternate?: Statement | null;
+}
+interface LabeledStatement extends BaseNode {
+ type: "LabeledStatement";
+ label: Identifier;
+ body: Statement;
+}
+interface StringLiteral extends BaseNode {
+ type: "StringLiteral";
+ value: string;
+}
+interface NumericLiteral extends BaseNode {
+ type: "NumericLiteral";
+ value: number;
+}
+/**
+ * @deprecated Use `NumericLiteral`
+ */
+interface NumberLiteral$1 extends BaseNode {
+ type: "NumberLiteral";
+ value: number;
+}
+interface NullLiteral extends BaseNode {
+ type: "NullLiteral";
+}
+interface BooleanLiteral extends BaseNode {
+ type: "BooleanLiteral";
+ value: boolean;
+}
+interface RegExpLiteral extends BaseNode {
+ type: "RegExpLiteral";
+ pattern: string;
+ flags: string;
+}
+/**
+ * @deprecated Use `RegExpLiteral`
+ */
+interface RegexLiteral$1 extends BaseNode {
+ type: "RegexLiteral";
+ pattern: string;
+ flags: string;
+}
+interface LogicalExpression extends BaseNode {
+ type: "LogicalExpression";
+ operator: "||" | "&&" | "??";
+ left: Expression;
+ right: Expression;
+}
+interface MemberExpression extends BaseNode {
+ type: "MemberExpression";
+ object: Expression;
+ property: Expression | Identifier | PrivateName;
+ computed: boolean;
+ optional?: true | false | null;
+}
+interface NewExpression extends BaseNode {
+ type: "NewExpression";
+ callee: Expression | V8IntrinsicIdentifier;
+ arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>;
+ optional?: true | false | null;
+ typeArguments?: TypeParameterInstantiation | null;
+ typeParameters?: TSTypeParameterInstantiation | null;
+}
+interface Program extends BaseNode {
+ type: "Program";
+ body: Array<Statement>;
+ directives: Array<Directive>;
+ sourceType: "script" | "module";
+ interpreter?: InterpreterDirective | null;
+ sourceFile: string;
+}
+interface ObjectExpression extends BaseNode {
+ type: "ObjectExpression";
+ properties: Array<ObjectMethod | ObjectProperty | SpreadElement>;
+}
+interface ObjectMethod extends BaseNode {
+ type: "ObjectMethod";
+ kind: "method" | "get" | "set";
+ key: Expression | Identifier | StringLiteral | NumericLiteral;
+ params: Array<Identifier | Pattern | RestElement>;
+ body: BlockStatement;
+ computed: boolean;
+ generator?: boolean;
+ async?: boolean;
+ decorators?: Array<Decorator> | null;
+ returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+interface ObjectProperty extends BaseNode {
+ type: "ObjectProperty";
+ key: Expression | Identifier | StringLiteral | NumericLiteral;
+ value: Expression | PatternLike;
+ computed: boolean;
+ shorthand: boolean;
+ decorators?: Array<Decorator> | null;
+}
+interface RestElement extends BaseNode {
+ type: "RestElement";
+ argument: LVal;
+ decorators?: Array<Decorator> | null;
+ optional?: boolean | null;
+ typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+/**
+ * @deprecated Use `RestElement`
+ */
+interface RestProperty$1 extends BaseNode {
+ type: "RestProperty";
+ argument: LVal;
+ decorators?: Array<Decorator> | null;
+ optional?: boolean | null;
+ typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+interface ReturnStatement extends BaseNode {
+ type: "ReturnStatement";
+ argument?: Expression | null;
+}
+interface SequenceExpression extends BaseNode {
+ type: "SequenceExpression";
+ expressions: Array<Expression>;
+}
+interface ParenthesizedExpression extends BaseNode {
+ type: "ParenthesizedExpression";
+ expression: Expression;
+}
+interface SwitchCase extends BaseNode {
+ type: "SwitchCase";
+ test?: Expression | null;
+ consequent: Array<Statement>;
+}
+interface SwitchStatement extends BaseNode {
+ type: "SwitchStatement";
+ discriminant: Expression;
+ cases: Array<SwitchCase>;
+}
+interface ThisExpression extends BaseNode {
+ type: "ThisExpression";
+}
+interface ThrowStatement extends BaseNode {
+ type: "ThrowStatement";
+ argument: Expression;
+}
+interface TryStatement extends BaseNode {
+ type: "TryStatement";
+ block: BlockStatement;
+ handler?: CatchClause | null;
+ finalizer?: BlockStatement | null;
+}
+interface UnaryExpression extends BaseNode {
+ type: "UnaryExpression";
+ operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof";
+ argument: Expression;
+ prefix: boolean;
+}
+interface UpdateExpression extends BaseNode {
+ type: "UpdateExpression";
+ operator: "++" | "--";
+ argument: Expression;
+ prefix: boolean;
+}
+interface VariableDeclaration extends BaseNode {
+ type: "VariableDeclaration";
+ kind: "var" | "let" | "const";
+ declarations: Array<VariableDeclarator>;
+ declare?: boolean | null;
+}
+interface VariableDeclarator extends BaseNode {
+ type: "VariableDeclarator";
+ id: LVal;
+ init?: Expression | null;
+ definite?: boolean | null;
+}
+interface WhileStatement extends BaseNode {
+ type: "WhileStatement";
+ test: Expression;
+ body: Statement;
+}
+interface WithStatement extends BaseNode {
+ type: "WithStatement";
+ object: Expression;
+ body: Statement;
+}
+interface AssignmentPattern extends BaseNode {
+ type: "AssignmentPattern";
+ left: Identifier | ObjectPattern | ArrayPattern | MemberExpression;
+ right: Expression;
+ decorators?: Array<Decorator> | null;
+ typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+interface ArrayPattern extends BaseNode {
+ type: "ArrayPattern";
+ elements: Array<null | PatternLike>;
+ decorators?: Array<Decorator> | null;
+ optional?: boolean | null;
+ typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+interface ArrowFunctionExpression extends BaseNode {
+ type: "ArrowFunctionExpression";
+ params: Array<Identifier | Pattern | RestElement>;
+ body: BlockStatement | Expression;
+ async?: boolean;
+ expression: boolean;
+ generator?: boolean;
+ returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+interface ClassBody extends BaseNode {
+ type: "ClassBody";
+ body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>;
+}
+interface ClassExpression extends BaseNode {
+ type: "ClassExpression";
+ id?: Identifier | null;
+ superClass?: Expression | null;
+ body: ClassBody;
+ decorators?: Array<Decorator> | null;
+ implements?: Array<TSExpressionWithTypeArguments | ClassImplements> | null;
+ mixins?: InterfaceExtends | null;
+ superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+ typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+interface ClassDeclaration extends BaseNode {
+ type: "ClassDeclaration";
+ id: Identifier;
+ superClass?: Expression | null;
+ body: ClassBody;
+ decorators?: Array<Decorator> | null;
+ abstract?: boolean | null;
+ declare?: boolean | null;
+ implements?: Array<TSExpressionWithTypeArguments | ClassImplements> | null;
+ mixins?: InterfaceExtends | null;
+ superTypeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+ typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+interface ExportAllDeclaration extends BaseNode {
+ type: "ExportAllDeclaration";
+ source: StringLiteral;
+ assertions?: Array<ImportAttribute> | null;
+ exportKind?: "type" | "value" | null;
+}
+interface ExportDefaultDeclaration extends BaseNode {
+ type: "ExportDefaultDeclaration";
+ declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression;
+ exportKind?: "value" | null;
+}
+interface ExportNamedDeclaration extends BaseNode {
+ type: "ExportNamedDeclaration";
+ declaration?: Declaration | null;
+ specifiers: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>;
+ source?: StringLiteral | null;
+ assertions?: Array<ImportAttribute> | null;
+ exportKind?: "type" | "value" | null;
+}
+interface ExportSpecifier extends BaseNode {
+ type: "ExportSpecifier";
+ local: Identifier;
+ exported: Identifier | StringLiteral;
+ exportKind?: "type" | "value" | null;
+}
+interface ForOfStatement extends BaseNode {
+ type: "ForOfStatement";
+ left: VariableDeclaration | LVal;
+ right: Expression;
+ body: Statement;
+ await: boolean;
+}
+interface ImportDeclaration extends BaseNode {
+ type: "ImportDeclaration";
+ specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
+ source: StringLiteral;
+ assertions?: Array<ImportAttribute> | null;
+ importKind?: "type" | "typeof" | "value" | null;
+}
+interface ImportDefaultSpecifier extends BaseNode {
+ type: "ImportDefaultSpecifier";
+ local: Identifier;
+}
+interface ImportNamespaceSpecifier extends BaseNode {
+ type: "ImportNamespaceSpecifier";
+ local: Identifier;
+}
+interface ImportSpecifier extends BaseNode {
+ type: "ImportSpecifier";
+ local: Identifier;
+ imported: Identifier | StringLiteral;
+ importKind?: "type" | "typeof" | "value" | null;
+}
+interface MetaProperty extends BaseNode {
+ type: "MetaProperty";
+ meta: Identifier;
+ property: Identifier;
+}
+interface ClassMethod extends BaseNode {
+ type: "ClassMethod";
+ kind?: "get" | "set" | "method" | "constructor";
+ key: Identifier | StringLiteral | NumericLiteral | Expression;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ body: BlockStatement;
+ computed?: boolean;
+ static?: boolean;
+ generator?: boolean;
+ async?: boolean;
+ abstract?: boolean | null;
+ access?: "public" | "private" | "protected" | null;
+ accessibility?: "public" | "private" | "protected" | null;
+ decorators?: Array<Decorator> | null;
+ optional?: boolean | null;
+ override?: boolean;
+ returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+interface ObjectPattern extends BaseNode {
+ type: "ObjectPattern";
+ properties: Array<RestElement | ObjectProperty>;
+ decorators?: Array<Decorator> | null;
+ typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+}
+interface SpreadElement extends BaseNode {
+ type: "SpreadElement";
+ argument: Expression;
+}
+/**
+ * @deprecated Use `SpreadElement`
+ */
+interface SpreadProperty$1 extends BaseNode {
+ type: "SpreadProperty";
+ argument: Expression;
+}
+interface Super extends BaseNode {
+ type: "Super";
+}
+interface TaggedTemplateExpression extends BaseNode {
+ type: "TaggedTemplateExpression";
+ tag: Expression;
+ quasi: TemplateLiteral;
+ typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+}
+interface TemplateElement extends BaseNode {
+ type: "TemplateElement";
+ value: {
+ raw: string;
+ cooked?: string;
+ };
+ tail: boolean;
+}
+interface TemplateLiteral extends BaseNode {
+ type: "TemplateLiteral";
+ quasis: Array<TemplateElement>;
+ expressions: Array<Expression | TSType>;
+}
+interface YieldExpression extends BaseNode {
+ type: "YieldExpression";
+ argument?: Expression | null;
+ delegate: boolean;
+}
+interface AwaitExpression extends BaseNode {
+ type: "AwaitExpression";
+ argument: Expression;
+}
+interface Import extends BaseNode {
+ type: "Import";
+}
+interface BigIntLiteral extends BaseNode {
+ type: "BigIntLiteral";
+ value: string;
+}
+interface ExportNamespaceSpecifier extends BaseNode {
+ type: "ExportNamespaceSpecifier";
+ exported: Identifier;
+}
+interface OptionalMemberExpression extends BaseNode {
+ type: "OptionalMemberExpression";
+ object: Expression;
+ property: Expression | Identifier;
+ computed: boolean;
+ optional: boolean;
+}
+interface OptionalCallExpression extends BaseNode {
+ type: "OptionalCallExpression";
+ callee: Expression;
+ arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>;
+ optional: boolean;
+ typeArguments?: TypeParameterInstantiation | null;
+ typeParameters?: TSTypeParameterInstantiation | null;
+}
+interface ClassProperty extends BaseNode {
+ type: "ClassProperty";
+ key: Identifier | StringLiteral | NumericLiteral | Expression;
+ value?: Expression | null;
+ typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ decorators?: Array<Decorator> | null;
+ computed?: boolean;
+ static?: boolean;
+ abstract?: boolean | null;
+ accessibility?: "public" | "private" | "protected" | null;
+ declare?: boolean | null;
+ definite?: boolean | null;
+ optional?: boolean | null;
+ override?: boolean;
+ readonly?: boolean | null;
+ variance?: Variance | null;
+}
+interface ClassAccessorProperty extends BaseNode {
+ type: "ClassAccessorProperty";
+ key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName;
+ value?: Expression | null;
+ typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ decorators?: Array<Decorator> | null;
+ computed?: boolean;
+ static?: boolean;
+ abstract?: boolean | null;
+ accessibility?: "public" | "private" | "protected" | null;
+ declare?: boolean | null;
+ definite?: boolean | null;
+ optional?: boolean | null;
+ override?: boolean;
+ readonly?: boolean | null;
+ variance?: Variance | null;
+}
+interface ClassPrivateProperty extends BaseNode {
+ type: "ClassPrivateProperty";
+ key: PrivateName;
+ value?: Expression | null;
+ decorators?: Array<Decorator> | null;
+ static: any;
+ definite?: boolean | null;
+ readonly?: boolean | null;
+ typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ variance?: Variance | null;
+}
+interface ClassPrivateMethod extends BaseNode {
+ type: "ClassPrivateMethod";
+ kind?: "get" | "set" | "method" | "constructor";
+ key: PrivateName;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ body: BlockStatement;
+ static?: boolean;
+ abstract?: boolean | null;
+ access?: "public" | "private" | "protected" | null;
+ accessibility?: "public" | "private" | "protected" | null;
+ async?: boolean;
+ computed?: boolean;
+ decorators?: Array<Decorator> | null;
+ generator?: boolean;
+ optional?: boolean | null;
+ override?: boolean;
+ returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null;
+ typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
+}
+interface PrivateName extends BaseNode {
+ type: "PrivateName";
+ id: Identifier;
+}
+interface StaticBlock extends BaseNode {
+ type: "StaticBlock";
+ body: Array<Statement>;
+}
+interface AnyTypeAnnotation extends BaseNode {
+ type: "AnyTypeAnnotation";
+}
+interface ArrayTypeAnnotation extends BaseNode {
+ type: "ArrayTypeAnnotation";
+ elementType: FlowType;
+}
+interface BooleanTypeAnnotation extends BaseNode {
+ type: "BooleanTypeAnnotation";
+}
+interface BooleanLiteralTypeAnnotation extends BaseNode {
+ type: "BooleanLiteralTypeAnnotation";
+ value: boolean;
+}
+interface NullLiteralTypeAnnotation extends BaseNode {
+ type: "NullLiteralTypeAnnotation";
+}
+interface ClassImplements extends BaseNode {
+ type: "ClassImplements";
+ id: Identifier;
+ typeParameters?: TypeParameterInstantiation | null;
+}
+interface DeclareClass extends BaseNode {
+ type: "DeclareClass";
+ id: Identifier;
+ typeParameters?: TypeParameterDeclaration | null;
+ extends?: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+ implements?: Array<ClassImplements> | null;
+ mixins?: Array<InterfaceExtends> | null;
+}
+interface DeclareFunction extends BaseNode {
+ type: "DeclareFunction";
+ id: Identifier;
+ predicate?: DeclaredPredicate | null;
+}
+interface DeclareInterface extends BaseNode {
+ type: "DeclareInterface";
+ id: Identifier;
+ typeParameters?: TypeParameterDeclaration | null;
+ extends?: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+ implements?: Array<ClassImplements> | null;
+ mixins?: Array<InterfaceExtends> | null;
+}
+interface DeclareModule extends BaseNode {
+ type: "DeclareModule";
+ id: Identifier | StringLiteral;
+ body: BlockStatement;
+ kind?: "CommonJS" | "ES" | null;
+}
+interface DeclareModuleExports extends BaseNode {
+ type: "DeclareModuleExports";
+ typeAnnotation: TypeAnnotation;
+}
+interface DeclareTypeAlias extends BaseNode {
+ type: "DeclareTypeAlias";
+ id: Identifier;
+ typeParameters?: TypeParameterDeclaration | null;
+ right: FlowType;
+}
+interface DeclareOpaqueType extends BaseNode {
+ type: "DeclareOpaqueType";
+ id: Identifier;
+ typeParameters?: TypeParameterDeclaration | null;
+ supertype?: FlowType | null;
+ impltype?: FlowType | null;
+}
+interface DeclareVariable extends BaseNode {
+ type: "DeclareVariable";
+ id: Identifier;
+}
+interface DeclareExportDeclaration extends BaseNode {
+ type: "DeclareExportDeclaration";
+ declaration?: Flow | null;
+ specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null;
+ source?: StringLiteral | null;
+ default?: boolean | null;
+}
+interface DeclareExportAllDeclaration extends BaseNode {
+ type: "DeclareExportAllDeclaration";
+ source: StringLiteral;
+ exportKind?: "type" | "value" | null;
+}
+interface DeclaredPredicate extends BaseNode {
+ type: "DeclaredPredicate";
+ value: Flow;
+}
+interface ExistsTypeAnnotation extends BaseNode {
+ type: "ExistsTypeAnnotation";
+}
+interface FunctionTypeAnnotation extends BaseNode {
+ type: "FunctionTypeAnnotation";
+ typeParameters?: TypeParameterDeclaration | null;
+ params: Array<FunctionTypeParam>;
+ rest?: FunctionTypeParam | null;
+ returnType: FlowType;
+ this?: FunctionTypeParam | null;
+}
+interface FunctionTypeParam extends BaseNode {
+ type: "FunctionTypeParam";
+ name?: Identifier | null;
+ typeAnnotation: FlowType;
+ optional?: boolean | null;
+}
+interface GenericTypeAnnotation extends BaseNode {
+ type: "GenericTypeAnnotation";
+ id: Identifier | QualifiedTypeIdentifier;
+ typeParameters?: TypeParameterInstantiation | null;
+}
+interface InferredPredicate extends BaseNode {
+ type: "InferredPredicate";
+}
+interface InterfaceExtends extends BaseNode {
+ type: "InterfaceExtends";
+ id: Identifier | QualifiedTypeIdentifier;
+ typeParameters?: TypeParameterInstantiation | null;
+}
+interface InterfaceDeclaration extends BaseNode {
+ type: "InterfaceDeclaration";
+ id: Identifier;
+ typeParameters?: TypeParameterDeclaration | null;
+ extends?: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+ implements?: Array<ClassImplements> | null;
+ mixins?: Array<InterfaceExtends> | null;
+}
+interface InterfaceTypeAnnotation extends BaseNode {
+ type: "InterfaceTypeAnnotation";
+ extends?: Array<InterfaceExtends> | null;
+ body: ObjectTypeAnnotation;
+}
+interface IntersectionTypeAnnotation extends BaseNode {
+ type: "IntersectionTypeAnnotation";
+ types: Array<FlowType>;
+}
+interface MixedTypeAnnotation extends BaseNode {
+ type: "MixedTypeAnnotation";
+}
+interface EmptyTypeAnnotation extends BaseNode {
+ type: "EmptyTypeAnnotation";
+}
+interface NullableTypeAnnotation extends BaseNode {
+ type: "NullableTypeAnnotation";
+ typeAnnotation: FlowType;
+}
+interface NumberLiteralTypeAnnotation extends BaseNode {
+ type: "NumberLiteralTypeAnnotation";
+ value: number;
+}
+interface NumberTypeAnnotation extends BaseNode {
+ type: "NumberTypeAnnotation";
+}
+interface ObjectTypeAnnotation extends BaseNode {
+ type: "ObjectTypeAnnotation";
+ properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>;
+ indexers?: Array<ObjectTypeIndexer> | null;
+ callProperties?: Array<ObjectTypeCallProperty> | null;
+ internalSlots?: Array<ObjectTypeInternalSlot> | null;
+ exact: boolean;
+ inexact?: boolean | null;
+}
+interface ObjectTypeInternalSlot extends BaseNode {
+ type: "ObjectTypeInternalSlot";
+ id: Identifier;
+ value: FlowType;
+ optional: boolean;
+ static: boolean;
+ method: boolean;
+}
+interface ObjectTypeCallProperty extends BaseNode {
+ type: "ObjectTypeCallProperty";
+ value: FlowType;
+ static: boolean;
+}
+interface ObjectTypeIndexer extends BaseNode {
+ type: "ObjectTypeIndexer";
+ id?: Identifier | null;
+ key: FlowType;
+ value: FlowType;
+ variance?: Variance | null;
+ static: boolean;
+}
+interface ObjectTypeProperty extends BaseNode {
+ type: "ObjectTypeProperty";
+ key: Identifier | StringLiteral;
+ value: FlowType;
+ variance?: Variance | null;
+ kind: "init" | "get" | "set";
+ method: boolean;
+ optional: boolean;
+ proto: boolean;
+ static: boolean;
+}
+interface ObjectTypeSpreadProperty extends BaseNode {
+ type: "ObjectTypeSpreadProperty";
+ argument: FlowType;
+}
+interface OpaqueType extends BaseNode {
+ type: "OpaqueType";
+ id: Identifier;
+ typeParameters?: TypeParameterDeclaration | null;
+ supertype?: FlowType | null;
+ impltype: FlowType;
+}
+interface QualifiedTypeIdentifier extends BaseNode {
+ type: "QualifiedTypeIdentifier";
+ id: Identifier;
+ qualification: Identifier | QualifiedTypeIdentifier;
+}
+interface StringLiteralTypeAnnotation extends BaseNode {
+ type: "StringLiteralTypeAnnotation";
+ value: string;
+}
+interface StringTypeAnnotation extends BaseNode {
+ type: "StringTypeAnnotation";
+}
+interface SymbolTypeAnnotation extends BaseNode {
+ type: "SymbolTypeAnnotation";
+}
+interface ThisTypeAnnotation extends BaseNode {
+ type: "ThisTypeAnnotation";
+}
+interface TupleTypeAnnotation extends BaseNode {
+ type: "TupleTypeAnnotation";
+ types: Array<FlowType>;
+}
+interface TypeofTypeAnnotation extends BaseNode {
+ type: "TypeofTypeAnnotation";
+ argument: FlowType;
+}
+interface TypeAlias extends BaseNode {
+ type: "TypeAlias";
+ id: Identifier;
+ typeParameters?: TypeParameterDeclaration | null;
+ right: FlowType;
+}
+interface TypeAnnotation extends BaseNode {
+ type: "TypeAnnotation";
+ typeAnnotation: FlowType;
+}
+interface TypeCastExpression extends BaseNode {
+ type: "TypeCastExpression";
+ expression: Expression;
+ typeAnnotation: TypeAnnotation;
+}
+interface TypeParameter extends BaseNode {
+ type: "TypeParameter";
+ bound?: TypeAnnotation | null;
+ default?: FlowType | null;
+ variance?: Variance | null;
+ name: string;
+}
+interface TypeParameterDeclaration extends BaseNode {
+ type: "TypeParameterDeclaration";
+ params: Array<TypeParameter>;
+}
+interface TypeParameterInstantiation extends BaseNode {
+ type: "TypeParameterInstantiation";
+ params: Array<FlowType>;
+}
+interface UnionTypeAnnotation extends BaseNode {
+ type: "UnionTypeAnnotation";
+ types: Array<FlowType>;
+}
+interface Variance extends BaseNode {
+ type: "Variance";
+ kind: "minus" | "plus";
+}
+interface VoidTypeAnnotation extends BaseNode {
+ type: "VoidTypeAnnotation";
+}
+interface EnumDeclaration extends BaseNode {
+ type: "EnumDeclaration";
+ id: Identifier;
+ body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody;
+}
+interface EnumBooleanBody extends BaseNode {
+ type: "EnumBooleanBody";
+ members: Array<EnumBooleanMember>;
+ explicitType: boolean;
+ hasUnknownMembers: boolean;
+}
+interface EnumNumberBody extends BaseNode {
+ type: "EnumNumberBody";
+ members: Array<EnumNumberMember>;
+ explicitType: boolean;
+ hasUnknownMembers: boolean;
+}
+interface EnumStringBody extends BaseNode {
+ type: "EnumStringBody";
+ members: Array<EnumStringMember | EnumDefaultedMember>;
+ explicitType: boolean;
+ hasUnknownMembers: boolean;
+}
+interface EnumSymbolBody extends BaseNode {
+ type: "EnumSymbolBody";
+ members: Array<EnumDefaultedMember>;
+ hasUnknownMembers: boolean;
+}
+interface EnumBooleanMember extends BaseNode {
+ type: "EnumBooleanMember";
+ id: Identifier;
+ init: BooleanLiteral;
+}
+interface EnumNumberMember extends BaseNode {
+ type: "EnumNumberMember";
+ id: Identifier;
+ init: NumericLiteral;
+}
+interface EnumStringMember extends BaseNode {
+ type: "EnumStringMember";
+ id: Identifier;
+ init: StringLiteral;
+}
+interface EnumDefaultedMember extends BaseNode {
+ type: "EnumDefaultedMember";
+ id: Identifier;
+}
+interface IndexedAccessType extends BaseNode {
+ type: "IndexedAccessType";
+ objectType: FlowType;
+ indexType: FlowType;
+}
+interface OptionalIndexedAccessType extends BaseNode {
+ type: "OptionalIndexedAccessType";
+ objectType: FlowType;
+ indexType: FlowType;
+ optional: boolean;
+}
+interface JSXAttribute extends BaseNode {
+ type: "JSXAttribute";
+ name: JSXIdentifier | JSXNamespacedName;
+ value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null;
+}
+interface JSXClosingElement extends BaseNode {
+ type: "JSXClosingElement";
+ name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
+}
+interface JSXElement extends BaseNode {
+ type: "JSXElement";
+ openingElement: JSXOpeningElement;
+ closingElement?: JSXClosingElement | null;
+ children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>;
+ selfClosing?: boolean | null;
+}
+interface JSXEmptyExpression extends BaseNode {
+ type: "JSXEmptyExpression";
+}
+interface JSXExpressionContainer extends BaseNode {
+ type: "JSXExpressionContainer";
+ expression: Expression | JSXEmptyExpression;
+}
+interface JSXSpreadChild extends BaseNode {
+ type: "JSXSpreadChild";
+ expression: Expression;
+}
+interface JSXIdentifier extends BaseNode {
+ type: "JSXIdentifier";
+ name: string;
+}
+interface JSXMemberExpression extends BaseNode {
+ type: "JSXMemberExpression";
+ object: JSXMemberExpression | JSXIdentifier;
+ property: JSXIdentifier;
+}
+interface JSXNamespacedName extends BaseNode {
+ type: "JSXNamespacedName";
+ namespace: JSXIdentifier;
+ name: JSXIdentifier;
+}
+interface JSXOpeningElement extends BaseNode {
+ type: "JSXOpeningElement";
+ name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
+ attributes: Array<JSXAttribute | JSXSpreadAttribute>;
+ selfClosing: boolean;
+ typeParameters?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
+}
+interface JSXSpreadAttribute extends BaseNode {
+ type: "JSXSpreadAttribute";
+ argument: Expression;
+}
+interface JSXText extends BaseNode {
+ type: "JSXText";
+ value: string;
+}
+interface JSXFragment extends BaseNode {
+ type: "JSXFragment";
+ openingFragment: JSXOpeningFragment;
+ closingFragment: JSXClosingFragment;
+ children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>;
+}
+interface JSXOpeningFragment extends BaseNode {
+ type: "JSXOpeningFragment";
+}
+interface JSXClosingFragment extends BaseNode {
+ type: "JSXClosingFragment";
+}
+interface Noop extends BaseNode {
+ type: "Noop";
+}
+interface Placeholder extends BaseNode {
+ type: "Placeholder";
+ expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern";
+ name: Identifier;
+}
+interface V8IntrinsicIdentifier extends BaseNode {
+ type: "V8IntrinsicIdentifier";
+ name: string;
+}
+interface ArgumentPlaceholder extends BaseNode {
+ type: "ArgumentPlaceholder";
+}
+interface BindExpression extends BaseNode {
+ type: "BindExpression";
+ object: Expression;
+ callee: Expression;
+}
+interface ImportAttribute extends BaseNode {
+ type: "ImportAttribute";
+ key: Identifier | StringLiteral;
+ value: StringLiteral;
+}
+interface Decorator extends BaseNode {
+ type: "Decorator";
+ expression: Expression;
+}
+interface DoExpression extends BaseNode {
+ type: "DoExpression";
+ body: BlockStatement;
+ async: boolean;
+}
+interface ExportDefaultSpecifier extends BaseNode {
+ type: "ExportDefaultSpecifier";
+ exported: Identifier;
+}
+interface RecordExpression extends BaseNode {
+ type: "RecordExpression";
+ properties: Array<ObjectProperty | SpreadElement>;
+}
+interface TupleExpression extends BaseNode {
+ type: "TupleExpression";
+ elements: Array<Expression | SpreadElement>;
+}
+interface DecimalLiteral extends BaseNode {
+ type: "DecimalLiteral";
+ value: string;
+}
+interface ModuleExpression extends BaseNode {
+ type: "ModuleExpression";
+ body: Program;
+}
+interface TopicReference extends BaseNode {
+ type: "TopicReference";
+}
+interface PipelineTopicExpression extends BaseNode {
+ type: "PipelineTopicExpression";
+ expression: Expression;
+}
+interface PipelineBareFunction extends BaseNode {
+ type: "PipelineBareFunction";
+ callee: Expression;
+}
+interface PipelinePrimaryTopicReference extends BaseNode {
+ type: "PipelinePrimaryTopicReference";
+}
+interface TSParameterProperty extends BaseNode {
+ type: "TSParameterProperty";
+ parameter: Identifier | AssignmentPattern;
+ accessibility?: "public" | "private" | "protected" | null;
+ decorators?: Array<Decorator> | null;
+ override?: boolean | null;
+ readonly?: boolean | null;
+}
+interface TSDeclareFunction extends BaseNode {
+ type: "TSDeclareFunction";
+ id?: Identifier | null;
+ typeParameters?: TSTypeParameterDeclaration | Noop | null;
+ params: Array<Identifier | Pattern | RestElement>;
+ returnType?: TSTypeAnnotation | Noop | null;
+ async?: boolean;
+ declare?: boolean | null;
+ generator?: boolean;
+}
+interface TSDeclareMethod extends BaseNode {
+ type: "TSDeclareMethod";
+ decorators?: Array<Decorator> | null;
+ key: Identifier | StringLiteral | NumericLiteral | Expression;
+ typeParameters?: TSTypeParameterDeclaration | Noop | null;
+ params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
+ returnType?: TSTypeAnnotation | Noop | null;
+ abstract?: boolean | null;
+ access?: "public" | "private" | "protected" | null;
+ accessibility?: "public" | "private" | "protected" | null;
+ async?: boolean;
+ computed?: boolean;
+ generator?: boolean;
+ kind?: "get" | "set" | "method" | "constructor";
+ optional?: boolean | null;
+ override?: boolean;
+ static?: boolean;
+}
+interface TSQualifiedName extends BaseNode {
+ type: "TSQualifiedName";
+ left: TSEntityName;
+ right: Identifier;
+}
+interface TSCallSignatureDeclaration extends BaseNode {
+ type: "TSCallSignatureDeclaration";
+ typeParameters?: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement>;
+ typeAnnotation?: TSTypeAnnotation | null;
+}
+interface TSConstructSignatureDeclaration extends BaseNode {
+ type: "TSConstructSignatureDeclaration";
+ typeParameters?: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement>;
+ typeAnnotation?: TSTypeAnnotation | null;
+}
+interface TSPropertySignature extends BaseNode {
+ type: "TSPropertySignature";
+ key: Expression;
+ typeAnnotation?: TSTypeAnnotation | null;
+ initializer?: Expression | null;
+ computed?: boolean | null;
+ kind: "get" | "set";
+ optional?: boolean | null;
+ readonly?: boolean | null;
+}
+interface TSMethodSignature extends BaseNode {
+ type: "TSMethodSignature";
+ key: Expression;
+ typeParameters?: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement>;
+ typeAnnotation?: TSTypeAnnotation | null;
+ computed?: boolean | null;
+ kind: "method" | "get" | "set";
+ optional?: boolean | null;
+}
+interface TSIndexSignature extends BaseNode {
+ type: "TSIndexSignature";
+ parameters: Array<Identifier>;
+ typeAnnotation?: TSTypeAnnotation | null;
+ readonly?: boolean | null;
+ static?: boolean | null;
+}
+interface TSAnyKeyword extends BaseNode {
+ type: "TSAnyKeyword";
+}
+interface TSBooleanKeyword extends BaseNode {
+ type: "TSBooleanKeyword";
+}
+interface TSBigIntKeyword extends BaseNode {
+ type: "TSBigIntKeyword";
+}
+interface TSIntrinsicKeyword extends BaseNode {
+ type: "TSIntrinsicKeyword";
+}
+interface TSNeverKeyword extends BaseNode {
+ type: "TSNeverKeyword";
+}
+interface TSNullKeyword extends BaseNode {
+ type: "TSNullKeyword";
+}
+interface TSNumberKeyword extends BaseNode {
+ type: "TSNumberKeyword";
+}
+interface TSObjectKeyword extends BaseNode {
+ type: "TSObjectKeyword";
+}
+interface TSStringKeyword extends BaseNode {
+ type: "TSStringKeyword";
+}
+interface TSSymbolKeyword extends BaseNode {
+ type: "TSSymbolKeyword";
+}
+interface TSUndefinedKeyword extends BaseNode {
+ type: "TSUndefinedKeyword";
+}
+interface TSUnknownKeyword extends BaseNode {
+ type: "TSUnknownKeyword";
+}
+interface TSVoidKeyword extends BaseNode {
+ type: "TSVoidKeyword";
+}
+interface TSThisType extends BaseNode {
+ type: "TSThisType";
+}
+interface TSFunctionType extends BaseNode {
+ type: "TSFunctionType";
+ typeParameters?: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement>;
+ typeAnnotation?: TSTypeAnnotation | null;
+}
+interface TSConstructorType extends BaseNode {
+ type: "TSConstructorType";
+ typeParameters?: TSTypeParameterDeclaration | null;
+ parameters: Array<Identifier | RestElement>;
+ typeAnnotation?: TSTypeAnnotation | null;
+ abstract?: boolean | null;
+}
+interface TSTypeReference extends BaseNode {
+ type: "TSTypeReference";
+ typeName: TSEntityName;
+ typeParameters?: TSTypeParameterInstantiation | null;
+}
+interface TSTypePredicate extends BaseNode {
+ type: "TSTypePredicate";
+ parameterName: Identifier | TSThisType;
+ typeAnnotation?: TSTypeAnnotation | null;
+ asserts?: boolean | null;
+}
+interface TSTypeQuery extends BaseNode {
+ type: "TSTypeQuery";
+ exprName: TSEntityName | TSImportType;
+}
+interface TSTypeLiteral extends BaseNode {
+ type: "TSTypeLiteral";
+ members: Array<TSTypeElement>;
+}
+interface TSArrayType extends BaseNode {
+ type: "TSArrayType";
+ elementType: TSType;
+}
+interface TSTupleType extends BaseNode {
+ type: "TSTupleType";
+ elementTypes: Array<TSType | TSNamedTupleMember>;
+}
+interface TSOptionalType extends BaseNode {
+ type: "TSOptionalType";
+ typeAnnotation: TSType;
+}
+interface TSRestType extends BaseNode {
+ type: "TSRestType";
+ typeAnnotation: TSType;
+}
+interface TSNamedTupleMember extends BaseNode {
+ type: "TSNamedTupleMember";
+ label: Identifier;
+ elementType: TSType;
+ optional: boolean;
+}
+interface TSUnionType extends BaseNode {
+ type: "TSUnionType";
+ types: Array<TSType>;
+}
+interface TSIntersectionType extends BaseNode {
+ type: "TSIntersectionType";
+ types: Array<TSType>;
+}
+interface TSConditionalType extends BaseNode {
+ type: "TSConditionalType";
+ checkType: TSType;
+ extendsType: TSType;
+ trueType: TSType;
+ falseType: TSType;
+}
+interface TSInferType extends BaseNode {
+ type: "TSInferType";
+ typeParameter: TSTypeParameter;
+}
+interface TSParenthesizedType extends BaseNode {
+ type: "TSParenthesizedType";
+ typeAnnotation: TSType;
+}
+interface TSTypeOperator extends BaseNode {
+ type: "TSTypeOperator";
+ typeAnnotation: TSType;
+ operator: string;
+}
+interface TSIndexedAccessType extends BaseNode {
+ type: "TSIndexedAccessType";
+ objectType: TSType;
+ indexType: TSType;
+}
+interface TSMappedType extends BaseNode {
+ type: "TSMappedType";
+ typeParameter: TSTypeParameter;
+ typeAnnotation?: TSType | null;
+ nameType?: TSType | null;
+ optional?: boolean | null;
+ readonly?: boolean | null;
+}
+interface TSLiteralType extends BaseNode {
+ type: "TSLiteralType";
+ literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | UnaryExpression;
+}
+interface TSExpressionWithTypeArguments extends BaseNode {
+ type: "TSExpressionWithTypeArguments";
+ expression: TSEntityName;
+ typeParameters?: TSTypeParameterInstantiation | null;
+}
+interface TSInterfaceDeclaration extends BaseNode {
+ type: "TSInterfaceDeclaration";
+ id: Identifier;
+ typeParameters?: TSTypeParameterDeclaration | null;
+ extends?: Array<TSExpressionWithTypeArguments> | null;
+ body: TSInterfaceBody;
+ declare?: boolean | null;
+}
+interface TSInterfaceBody extends BaseNode {
+ type: "TSInterfaceBody";
+ body: Array<TSTypeElement>;
+}
+interface TSTypeAliasDeclaration extends BaseNode {
+ type: "TSTypeAliasDeclaration";
+ id: Identifier;
+ typeParameters?: TSTypeParameterDeclaration | null;
+ typeAnnotation: TSType;
+ declare?: boolean | null;
+}
+interface TSAsExpression extends BaseNode {
+ type: "TSAsExpression";
+ expression: Expression;
+ typeAnnotation: TSType;
+}
+interface TSTypeAssertion extends BaseNode {
+ type: "TSTypeAssertion";
+ typeAnnotation: TSType;
+ expression: Expression;
+}
+interface TSEnumDeclaration extends BaseNode {
+ type: "TSEnumDeclaration";
+ id: Identifier;
+ members: Array<TSEnumMember>;
+ const?: boolean | null;
+ declare?: boolean | null;
+ initializer?: Expression | null;
+}
+interface TSEnumMember extends BaseNode {
+ type: "TSEnumMember";
+ id: Identifier | StringLiteral;
+ initializer?: Expression | null;
+}
+interface TSModuleDeclaration extends BaseNode {
+ type: "TSModuleDeclaration";
+ id: Identifier | StringLiteral;
+ body: TSModuleBlock | TSModuleDeclaration;
+ declare?: boolean | null;
+ global?: boolean | null;
+}
+interface TSModuleBlock extends BaseNode {
+ type: "TSModuleBlock";
+ body: Array<Statement>;
+}
+interface TSImportType extends BaseNode {
+ type: "TSImportType";
+ argument: StringLiteral;
+ qualifier?: TSEntityName | null;
+ typeParameters?: TSTypeParameterInstantiation | null;
+}
+interface TSImportEqualsDeclaration extends BaseNode {
+ type: "TSImportEqualsDeclaration";
+ id: Identifier;
+ moduleReference: TSEntityName | TSExternalModuleReference;
+ importKind?: "type" | "value" | null;
+ isExport: boolean;
+}
+interface TSExternalModuleReference extends BaseNode {
+ type: "TSExternalModuleReference";
+ expression: StringLiteral;
+}
+interface TSNonNullExpression extends BaseNode {
+ type: "TSNonNullExpression";
+ expression: Expression;
+}
+interface TSExportAssignment extends BaseNode {
+ type: "TSExportAssignment";
+ expression: Expression;
+}
+interface TSNamespaceExportDeclaration extends BaseNode {
+ type: "TSNamespaceExportDeclaration";
+ id: Identifier;
+}
+interface TSTypeAnnotation extends BaseNode {
+ type: "TSTypeAnnotation";
+ typeAnnotation: TSType;
+}
+interface TSTypeParameterInstantiation extends BaseNode {
+ type: "TSTypeParameterInstantiation";
+ params: Array<TSType>;
+}
+interface TSTypeParameterDeclaration extends BaseNode {
+ type: "TSTypeParameterDeclaration";
+ params: Array<TSTypeParameter>;
+}
+interface TSTypeParameter extends BaseNode {
+ type: "TSTypeParameter";
+ constraint?: TSType | null;
+ default?: TSType | null;
+ name: string;
+}
+declare type Standardized = ArrayExpression | AssignmentExpression | BinaryExpression | InterpreterDirective | Directive | DirectiveLiteral | BlockStatement | BreakStatement | CallExpression | CatchClause | ConditionalExpression | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | File | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Identifier | IfStatement | LabeledStatement | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | Program | ObjectExpression | ObjectMethod | ObjectProperty | RestElement | ReturnStatement | SequenceExpression | ParenthesizedExpression | SwitchCase | SwitchStatement | ThisExpression | ThrowStatement | TryStatement | UnaryExpression | UpdateExpression | VariableDeclaration | VariableDeclarator | WhileStatement | WithStatement | AssignmentPattern | ArrayPattern | ArrowFunctionExpression | ClassBody | ClassExpression | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExportSpecifier | ForOfStatement | ImportDeclaration | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | MetaProperty | ClassMethod | ObjectPattern | SpreadElement | Super | TaggedTemplateExpression | TemplateElement | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | ExportNamespaceSpecifier | OptionalMemberExpression | OptionalCallExpression | ClassProperty | ClassAccessorProperty | ClassPrivateProperty | ClassPrivateMethod | PrivateName | StaticBlock;
+declare type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | Super | TaggedTemplateExpression | TemplateLiteral | YieldExpression | AwaitExpression | Import | BigIntLiteral | OptionalMemberExpression | OptionalCallExpression | TypeCastExpression | JSXElement | JSXFragment | BindExpression | DoExpression | RecordExpression | TupleExpression | DecimalLiteral | ModuleExpression | TopicReference | PipelineTopicExpression | PipelineBareFunction | PipelinePrimaryTopicReference | TSAsExpression | TSTypeAssertion | TSNonNullExpression;
+declare type Binary = BinaryExpression | LogicalExpression;
+declare type Scopable = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ClassExpression | ClassDeclaration | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock;
+declare type BlockParent = BlockStatement | CatchClause | DoWhileStatement | ForInStatement | ForStatement | FunctionDeclaration | FunctionExpression | Program | ObjectMethod | SwitchStatement | WhileStatement | ArrowFunctionExpression | ForOfStatement | ClassMethod | ClassPrivateMethod | StaticBlock | TSModuleBlock;
+declare type Block = BlockStatement | Program | TSModuleBlock;
+declare type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration;
+declare type Terminatorless = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement | YieldExpression | AwaitExpression;
+declare type CompletionStatement = BreakStatement | ContinueStatement | ReturnStatement | ThrowStatement;
+declare type Conditional = ConditionalExpression | IfStatement;
+declare type Loop = DoWhileStatement | ForInStatement | ForStatement | WhileStatement | ForOfStatement;
+declare type While = DoWhileStatement | WhileStatement;
+declare type ExpressionWrapper = ExpressionStatement | ParenthesizedExpression | TypeCastExpression;
+declare type For = ForInStatement | ForStatement | ForOfStatement;
+declare type ForXStatement = ForInStatement | ForOfStatement;
+declare type Function = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod;
+declare type FunctionParent = FunctionDeclaration | FunctionExpression | ObjectMethod | ArrowFunctionExpression | ClassMethod | ClassPrivateMethod | StaticBlock;
+declare type Pureish = FunctionDeclaration | FunctionExpression | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | ArrowFunctionExpression | BigIntLiteral | DecimalLiteral;
+declare type Declaration = FunctionDeclaration | VariableDeclaration | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration;
+declare type PatternLike = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern;
+declare type LVal = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | TSParameterProperty;
+declare type TSEntityName = Identifier | TSQualifiedName;
+declare type Literal = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | TemplateLiteral | BigIntLiteral | DecimalLiteral;
+declare type Immutable = StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | BigIntLiteral | JSXAttribute | JSXClosingElement | JSXElement | JSXExpressionContainer | JSXSpreadChild | JSXOpeningElement | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment | DecimalLiteral;
+declare type UserWhitespacable = ObjectMethod | ObjectProperty | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty;
+declare type Method = ObjectMethod | ClassMethod | ClassPrivateMethod;
+declare type ObjectMember = ObjectMethod | ObjectProperty;
+declare type Property = ObjectProperty | ClassProperty | ClassAccessorProperty | ClassPrivateProperty;
+declare type UnaryLike = UnaryExpression | SpreadElement;
+declare type Pattern = AssignmentPattern | ArrayPattern | ObjectPattern;
+declare type Class = ClassExpression | ClassDeclaration;
+declare type ModuleDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration;
+declare type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration;
+declare type ModuleSpecifier = ExportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier | ExportNamespaceSpecifier | ExportDefaultSpecifier;
+declare type Accessor = ClassAccessorProperty;
+declare type Private = ClassPrivateProperty | ClassPrivateMethod | PrivateName;
+declare type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation | EnumDeclaration | EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody | EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember | IndexedAccessType | OptionalIndexedAccessType;
+declare type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation | IndexedAccessType | OptionalIndexedAccessType;
+declare type FlowBaseAnnotation = AnyTypeAnnotation | BooleanTypeAnnotation | NullLiteralTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NumberTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | VoidTypeAnnotation;
+declare type FlowDeclaration = DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias;
+declare type FlowPredicate = DeclaredPredicate | InferredPredicate;
+declare type EnumBody = EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody;
+declare type EnumMember = EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember;
+declare type JSX = JSXAttribute | JSXClosingElement | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXSpreadChild | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXSpreadAttribute | JSXText | JSXFragment | JSXOpeningFragment | JSXClosingFragment;
+declare type Miscellaneous = Noop | Placeholder | V8IntrinsicIdentifier;
+declare type TypeScript = TSParameterProperty | TSDeclareFunction | TSDeclareMethod | TSQualifiedName | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature | TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSNamedTupleMember | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSInterfaceDeclaration | TSInterfaceBody | TSTypeAliasDeclaration | TSAsExpression | TSTypeAssertion | TSEnumDeclaration | TSEnumMember | TSModuleDeclaration | TSModuleBlock | TSImportType | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | TSExportAssignment | TSNamespaceExportDeclaration | TSTypeAnnotation | TSTypeParameterInstantiation | TSTypeParameterDeclaration | TSTypeParameter;
+declare type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature;
+declare type TSType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSLiteralType | TSExpressionWithTypeArguments | TSImportType;
+declare type TSBaseType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSLiteralType;
+interface Aliases {
+ Standardized: Standardized;
+ Expression: Expression;
+ Binary: Binary;
+ Scopable: Scopable;
+ BlockParent: BlockParent;
+ Block: Block;
+ Statement: Statement;
+ Terminatorless: Terminatorless;
+ CompletionStatement: CompletionStatement;
+ Conditional: Conditional;
+ Loop: Loop;
+ While: While;
+ ExpressionWrapper: ExpressionWrapper;
+ For: For;
+ ForXStatement: ForXStatement;
+ Function: Function;
+ FunctionParent: FunctionParent;
+ Pureish: Pureish;
+ Declaration: Declaration;
+ PatternLike: PatternLike;
+ LVal: LVal;
+ TSEntityName: TSEntityName;
+ Literal: Literal;
+ Immutable: Immutable;
+ UserWhitespacable: UserWhitespacable;
+ Method: Method;
+ ObjectMember: ObjectMember;
+ Property: Property;
+ UnaryLike: UnaryLike;
+ Pattern: Pattern;
+ Class: Class;
+ ModuleDeclaration: ModuleDeclaration;
+ ExportDeclaration: ExportDeclaration;
+ ModuleSpecifier: ModuleSpecifier;
+ Accessor: Accessor;
+ Private: Private;
+ Flow: Flow;
+ FlowType: FlowType;
+ FlowBaseAnnotation: FlowBaseAnnotation;
+ FlowDeclaration: FlowDeclaration;
+ FlowPredicate: FlowPredicate;
+ EnumBody: EnumBody;
+ EnumMember: EnumMember;
+ JSX: JSX;
+ Miscellaneous: Miscellaneous;
+ TypeScript: TypeScript;
+ TSTypeElement: TSTypeElement;
+ TSType: TSType;
+ TSBaseType: TSBaseType;
+}
+declare type DeprecatedAliases = NumberLiteral$1 | RegexLiteral$1 | RestProperty$1 | SpreadProperty$1;
+
+declare function isCompatTag(tagName?: string): boolean;
+
+declare type ReturnedChild = JSXSpreadChild | JSXElement | JSXFragment | Expression;
+declare function buildChildren(node: JSXElement | JSXFragment): ReturnedChild[];
+
+declare function assertNode(node?: any): asserts node is Node;
+
+declare function assertArrayExpression(node: object | null | undefined, opts?: object | null): asserts node is ArrayExpression;
+declare function assertAssignmentExpression(node: object | null | undefined, opts?: object | null): asserts node is AssignmentExpression;
+declare function assertBinaryExpression(node: object | null | undefined, opts?: object | null): asserts node is BinaryExpression;
+declare function assertInterpreterDirective(node: object | null | undefined, opts?: object | null): asserts node is InterpreterDirective;
+declare function assertDirective(node: object | null | undefined, opts?: object | null): asserts node is Directive;
+declare function assertDirectiveLiteral(node: object | null | undefined, opts?: object | null): asserts node is DirectiveLiteral;
+declare function assertBlockStatement(node: object | null | undefined, opts?: object | null): asserts node is BlockStatement;
+declare function assertBreakStatement(node: object | null | undefined, opts?: object | null): asserts node is BreakStatement;
+declare function assertCallExpression(node: object | null | undefined, opts?: object | null): asserts node is CallExpression;
+declare function assertCatchClause(node: object | null | undefined, opts?: object | null): asserts node is CatchClause;
+declare function assertConditionalExpression(node: object | null | undefined, opts?: object | null): asserts node is ConditionalExpression;
+declare function assertContinueStatement(node: object | null | undefined, opts?: object | null): asserts node is ContinueStatement;
+declare function assertDebuggerStatement(node: object | null | undefined, opts?: object | null): asserts node is DebuggerStatement;
+declare function assertDoWhileStatement(node: object | null | undefined, opts?: object | null): asserts node is DoWhileStatement;
+declare function assertEmptyStatement(node: object | null | undefined, opts?: object | null): asserts node is EmptyStatement;
+declare function assertExpressionStatement(node: object | null | undefined, opts?: object | null): asserts node is ExpressionStatement;
+declare function assertFile(node: object | null | undefined, opts?: object | null): asserts node is File;
+declare function assertForInStatement(node: object | null | undefined, opts?: object | null): asserts node is ForInStatement;
+declare function assertForStatement(node: object | null | undefined, opts?: object | null): asserts node is ForStatement;
+declare function assertFunctionDeclaration(node: object | null | undefined, opts?: object | null): asserts node is FunctionDeclaration;
+declare function assertFunctionExpression(node: object | null | undefined, opts?: object | null): asserts node is FunctionExpression;
+declare function assertIdentifier(node: object | null | undefined, opts?: object | null): asserts node is Identifier;
+declare function assertIfStatement(node: object | null | undefined, opts?: object | null): asserts node is IfStatement;
+declare function assertLabeledStatement(node: object | null | undefined, opts?: object | null): asserts node is LabeledStatement;
+declare function assertStringLiteral(node: object | null | undefined, opts?: object | null): asserts node is StringLiteral;
+declare function assertNumericLiteral(node: object | null | undefined, opts?: object | null): asserts node is NumericLiteral;
+declare function assertNullLiteral(node: object | null | undefined, opts?: object | null): asserts node is NullLiteral;
+declare function assertBooleanLiteral(node: object | null | undefined, opts?: object | null): asserts node is BooleanLiteral;
+declare function assertRegExpLiteral(node: object | null | undefined, opts?: object | null): asserts node is RegExpLiteral;
+declare function assertLogicalExpression(node: object | null | undefined, opts?: object | null): asserts node is LogicalExpression;
+declare function assertMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is MemberExpression;
+declare function assertNewExpression(node: object | null | undefined, opts?: object | null): asserts node is NewExpression;
+declare function assertProgram(node: object | null | undefined, opts?: object | null): asserts node is Program;
+declare function assertObjectExpression(node: object | null | undefined, opts?: object | null): asserts node is ObjectExpression;
+declare function assertObjectMethod(node: object | null | undefined, opts?: object | null): asserts node is ObjectMethod;
+declare function assertObjectProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectProperty;
+declare function assertRestElement(node: object | null | undefined, opts?: object | null): asserts node is RestElement;
+declare function assertReturnStatement(node: object | null | undefined, opts?: object | null): asserts node is ReturnStatement;
+declare function assertSequenceExpression(node: object | null | undefined, opts?: object | null): asserts node is SequenceExpression;
+declare function assertParenthesizedExpression(node: object | null | undefined, opts?: object | null): asserts node is ParenthesizedExpression;
+declare function assertSwitchCase(node: object | null | undefined, opts?: object | null): asserts node is SwitchCase;
+declare function assertSwitchStatement(node: object | null | undefined, opts?: object | null): asserts node is SwitchStatement;
+declare function assertThisExpression(node: object | null | undefined, opts?: object | null): asserts node is ThisExpression;
+declare function assertThrowStatement(node: object | null | undefined, opts?: object | null): asserts node is ThrowStatement;
+declare function assertTryStatement(node: object | null | undefined, opts?: object | null): asserts node is TryStatement;
+declare function assertUnaryExpression(node: object | null | undefined, opts?: object | null): asserts node is UnaryExpression;
+declare function assertUpdateExpression(node: object | null | undefined, opts?: object | null): asserts node is UpdateExpression;
+declare function assertVariableDeclaration(node: object | null | undefined, opts?: object | null): asserts node is VariableDeclaration;
+declare function assertVariableDeclarator(node: object | null | undefined, opts?: object | null): asserts node is VariableDeclarator;
+declare function assertWhileStatement(node: object | null | undefined, opts?: object | null): asserts node is WhileStatement;
+declare function assertWithStatement(node: object | null | undefined, opts?: object | null): asserts node is WithStatement;
+declare function assertAssignmentPattern(node: object | null | undefined, opts?: object | null): asserts node is AssignmentPattern;
+declare function assertArrayPattern(node: object | null | undefined, opts?: object | null): asserts node is ArrayPattern;
+declare function assertArrowFunctionExpression(node: object | null | undefined, opts?: object | null): asserts node is ArrowFunctionExpression;
+declare function assertClassBody(node: object | null | undefined, opts?: object | null): asserts node is ClassBody;
+declare function assertClassExpression(node: object | null | undefined, opts?: object | null): asserts node is ClassExpression;
+declare function assertClassDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ClassDeclaration;
+declare function assertExportAllDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportAllDeclaration;
+declare function assertExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportDefaultDeclaration;
+declare function assertExportNamedDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportNamedDeclaration;
+declare function assertExportSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportSpecifier;
+declare function assertForOfStatement(node: object | null | undefined, opts?: object | null): asserts node is ForOfStatement;
+declare function assertImportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ImportDeclaration;
+declare function assertImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportDefaultSpecifier;
+declare function assertImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportNamespaceSpecifier;
+declare function assertImportSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ImportSpecifier;
+declare function assertMetaProperty(node: object | null | undefined, opts?: object | null): asserts node is MetaProperty;
+declare function assertClassMethod(node: object | null | undefined, opts?: object | null): asserts node is ClassMethod;
+declare function assertObjectPattern(node: object | null | undefined, opts?: object | null): asserts node is ObjectPattern;
+declare function assertSpreadElement(node: object | null | undefined, opts?: object | null): asserts node is SpreadElement;
+declare function assertSuper(node: object | null | undefined, opts?: object | null): asserts node is Super;
+declare function assertTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): asserts node is TaggedTemplateExpression;
+declare function assertTemplateElement(node: object | null | undefined, opts?: object | null): asserts node is TemplateElement;
+declare function assertTemplateLiteral(node: object | null | undefined, opts?: object | null): asserts node is TemplateLiteral;
+declare function assertYieldExpression(node: object | null | undefined, opts?: object | null): asserts node is YieldExpression;
+declare function assertAwaitExpression(node: object | null | undefined, opts?: object | null): asserts node is AwaitExpression;
+declare function assertImport(node: object | null | undefined, opts?: object | null): asserts node is Import;
+declare function assertBigIntLiteral(node: object | null | undefined, opts?: object | null): asserts node is BigIntLiteral;
+declare function assertExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportNamespaceSpecifier;
+declare function assertOptionalMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is OptionalMemberExpression;
+declare function assertOptionalCallExpression(node: object | null | undefined, opts?: object | null): asserts node is OptionalCallExpression;
+declare function assertClassProperty(node: object | null | undefined, opts?: object | null): asserts node is ClassProperty;
+declare function assertClassAccessorProperty(node: object | null | undefined, opts?: object | null): asserts node is ClassAccessorProperty;
+declare function assertClassPrivateProperty(node: object | null | undefined, opts?: object | null): asserts node is ClassPrivateProperty;
+declare function assertClassPrivateMethod(node: object | null | undefined, opts?: object | null): asserts node is ClassPrivateMethod;
+declare function assertPrivateName(node: object | null | undefined, opts?: object | null): asserts node is PrivateName;
+declare function assertStaticBlock(node: object | null | undefined, opts?: object | null): asserts node is StaticBlock;
+declare function assertAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is AnyTypeAnnotation;
+declare function assertArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ArrayTypeAnnotation;
+declare function assertBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is BooleanTypeAnnotation;
+declare function assertBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is BooleanLiteralTypeAnnotation;
+declare function assertNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NullLiteralTypeAnnotation;
+declare function assertClassImplements(node: object | null | undefined, opts?: object | null): asserts node is ClassImplements;
+declare function assertDeclareClass(node: object | null | undefined, opts?: object | null): asserts node is DeclareClass;
+declare function assertDeclareFunction(node: object | null | undefined, opts?: object | null): asserts node is DeclareFunction;
+declare function assertDeclareInterface(node: object | null | undefined, opts?: object | null): asserts node is DeclareInterface;
+declare function assertDeclareModule(node: object | null | undefined, opts?: object | null): asserts node is DeclareModule;
+declare function assertDeclareModuleExports(node: object | null | undefined, opts?: object | null): asserts node is DeclareModuleExports;
+declare function assertDeclareTypeAlias(node: object | null | undefined, opts?: object | null): asserts node is DeclareTypeAlias;
+declare function assertDeclareOpaqueType(node: object | null | undefined, opts?: object | null): asserts node is DeclareOpaqueType;
+declare function assertDeclareVariable(node: object | null | undefined, opts?: object | null): asserts node is DeclareVariable;
+declare function assertDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is DeclareExportDeclaration;
+declare function assertDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): asserts node is DeclareExportAllDeclaration;
+declare function assertDeclaredPredicate(node: object | null | undefined, opts?: object | null): asserts node is DeclaredPredicate;
+declare function assertExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ExistsTypeAnnotation;
+declare function assertFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is FunctionTypeAnnotation;
+declare function assertFunctionTypeParam(node: object | null | undefined, opts?: object | null): asserts node is FunctionTypeParam;
+declare function assertGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is GenericTypeAnnotation;
+declare function assertInferredPredicate(node: object | null | undefined, opts?: object | null): asserts node is InferredPredicate;
+declare function assertInterfaceExtends(node: object | null | undefined, opts?: object | null): asserts node is InterfaceExtends;
+declare function assertInterfaceDeclaration(node: object | null | undefined, opts?: object | null): asserts node is InterfaceDeclaration;
+declare function assertInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is InterfaceTypeAnnotation;
+declare function assertIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is IntersectionTypeAnnotation;
+declare function assertMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is MixedTypeAnnotation;
+declare function assertEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is EmptyTypeAnnotation;
+declare function assertNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NullableTypeAnnotation;
+declare function assertNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NumberLiteralTypeAnnotation;
+declare function assertNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is NumberTypeAnnotation;
+declare function assertObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeAnnotation;
+declare function assertObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeInternalSlot;
+declare function assertObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeCallProperty;
+declare function assertObjectTypeIndexer(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeIndexer;
+declare function assertObjectTypeProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeProperty;
+declare function assertObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): asserts node is ObjectTypeSpreadProperty;
+declare function assertOpaqueType(node: object | null | undefined, opts?: object | null): asserts node is OpaqueType;
+declare function assertQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): asserts node is QualifiedTypeIdentifier;
+declare function assertStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is StringLiteralTypeAnnotation;
+declare function assertStringTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is StringTypeAnnotation;
+declare function assertSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is SymbolTypeAnnotation;
+declare function assertThisTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is ThisTypeAnnotation;
+declare function assertTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TupleTypeAnnotation;
+declare function assertTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TypeofTypeAnnotation;
+declare function assertTypeAlias(node: object | null | undefined, opts?: object | null): asserts node is TypeAlias;
+declare function assertTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TypeAnnotation;
+declare function assertTypeCastExpression(node: object | null | undefined, opts?: object | null): asserts node is TypeCastExpression;
+declare function assertTypeParameter(node: object | null | undefined, opts?: object | null): asserts node is TypeParameter;
+declare function assertTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TypeParameterDeclaration;
+declare function assertTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): asserts node is TypeParameterInstantiation;
+declare function assertUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is UnionTypeAnnotation;
+declare function assertVariance(node: object | null | undefined, opts?: object | null): asserts node is Variance;
+declare function assertVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is VoidTypeAnnotation;
+declare function assertEnumDeclaration(node: object | null | undefined, opts?: object | null): asserts node is EnumDeclaration;
+declare function assertEnumBooleanBody(node: object | null | undefined, opts?: object | null): asserts node is EnumBooleanBody;
+declare function assertEnumNumberBody(node: object | null | undefined, opts?: object | null): asserts node is EnumNumberBody;
+declare function assertEnumStringBody(node: object | null | undefined, opts?: object | null): asserts node is EnumStringBody;
+declare function assertEnumSymbolBody(node: object | null | undefined, opts?: object | null): asserts node is EnumSymbolBody;
+declare function assertEnumBooleanMember(node: object | null | undefined, opts?: object | null): asserts node is EnumBooleanMember;
+declare function assertEnumNumberMember(node: object | null | undefined, opts?: object | null): asserts node is EnumNumberMember;
+declare function assertEnumStringMember(node: object | null | undefined, opts?: object | null): asserts node is EnumStringMember;
+declare function assertEnumDefaultedMember(node: object | null | undefined, opts?: object | null): asserts node is EnumDefaultedMember;
+declare function assertIndexedAccessType(node: object | null | undefined, opts?: object | null): asserts node is IndexedAccessType;
+declare function assertOptionalIndexedAccessType(node: object | null | undefined, opts?: object | null): asserts node is OptionalIndexedAccessType;
+declare function assertJSXAttribute(node: object | null | undefined, opts?: object | null): asserts node is JSXAttribute;
+declare function assertJSXClosingElement(node: object | null | undefined, opts?: object | null): asserts node is JSXClosingElement;
+declare function assertJSXElement(node: object | null | undefined, opts?: object | null): asserts node is JSXElement;
+declare function assertJSXEmptyExpression(node: object | null | undefined, opts?: object | null): asserts node is JSXEmptyExpression;
+declare function assertJSXExpressionContainer(node: object | null | undefined, opts?: object | null): asserts node is JSXExpressionContainer;
+declare function assertJSXSpreadChild(node: object | null | undefined, opts?: object | null): asserts node is JSXSpreadChild;
+declare function assertJSXIdentifier(node: object | null | undefined, opts?: object | null): asserts node is JSXIdentifier;
+declare function assertJSXMemberExpression(node: object | null | undefined, opts?: object | null): asserts node is JSXMemberExpression;
+declare function assertJSXNamespacedName(node: object | null | undefined, opts?: object | null): asserts node is JSXNamespacedName;
+declare function assertJSXOpeningElement(node: object | null | undefined, opts?: object | null): asserts node is JSXOpeningElement;
+declare function assertJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): asserts node is JSXSpreadAttribute;
+declare function assertJSXText(node: object | null | undefined, opts?: object | null): asserts node is JSXText;
+declare function assertJSXFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXFragment;
+declare function assertJSXOpeningFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXOpeningFragment;
+declare function assertJSXClosingFragment(node: object | null | undefined, opts?: object | null): asserts node is JSXClosingFragment;
+declare function assertNoop(node: object | null | undefined, opts?: object | null): asserts node is Noop;
+declare function assertPlaceholder(node: object | null | undefined, opts?: object | null): asserts node is Placeholder;
+declare function assertV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): asserts node is V8IntrinsicIdentifier;
+declare function assertArgumentPlaceholder(node: object | null | undefined, opts?: object | null): asserts node is ArgumentPlaceholder;
+declare function assertBindExpression(node: object | null | undefined, opts?: object | null): asserts node is BindExpression;
+declare function assertImportAttribute(node: object | null | undefined, opts?: object | null): asserts node is ImportAttribute;
+declare function assertDecorator(node: object | null | undefined, opts?: object | null): asserts node is Decorator;
+declare function assertDoExpression(node: object | null | undefined, opts?: object | null): asserts node is DoExpression;
+declare function assertExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ExportDefaultSpecifier;
+declare function assertRecordExpression(node: object | null | undefined, opts?: object | null): asserts node is RecordExpression;
+declare function assertTupleExpression(node: object | null | undefined, opts?: object | null): asserts node is TupleExpression;
+declare function assertDecimalLiteral(node: object | null | undefined, opts?: object | null): asserts node is DecimalLiteral;
+declare function assertModuleExpression(node: object | null | undefined, opts?: object | null): asserts node is ModuleExpression;
+declare function assertTopicReference(node: object | null | undefined, opts?: object | null): asserts node is TopicReference;
+declare function assertPipelineTopicExpression(node: object | null | undefined, opts?: object | null): asserts node is PipelineTopicExpression;
+declare function assertPipelineBareFunction(node: object | null | undefined, opts?: object | null): asserts node is PipelineBareFunction;
+declare function assertPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): asserts node is PipelinePrimaryTopicReference;
+declare function assertTSParameterProperty(node: object | null | undefined, opts?: object | null): asserts node is TSParameterProperty;
+declare function assertTSDeclareFunction(node: object | null | undefined, opts?: object | null): asserts node is TSDeclareFunction;
+declare function assertTSDeclareMethod(node: object | null | undefined, opts?: object | null): asserts node is TSDeclareMethod;
+declare function assertTSQualifiedName(node: object | null | undefined, opts?: object | null): asserts node is TSQualifiedName;
+declare function assertTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSCallSignatureDeclaration;
+declare function assertTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSConstructSignatureDeclaration;
+declare function assertTSPropertySignature(node: object | null | undefined, opts?: object | null): asserts node is TSPropertySignature;
+declare function assertTSMethodSignature(node: object | null | undefined, opts?: object | null): asserts node is TSMethodSignature;
+declare function assertTSIndexSignature(node: object | null | undefined, opts?: object | null): asserts node is TSIndexSignature;
+declare function assertTSAnyKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSAnyKeyword;
+declare function assertTSBooleanKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSBooleanKeyword;
+declare function assertTSBigIntKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSBigIntKeyword;
+declare function assertTSIntrinsicKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSIntrinsicKeyword;
+declare function assertTSNeverKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNeverKeyword;
+declare function assertTSNullKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNullKeyword;
+declare function assertTSNumberKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSNumberKeyword;
+declare function assertTSObjectKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSObjectKeyword;
+declare function assertTSStringKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSStringKeyword;
+declare function assertTSSymbolKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSSymbolKeyword;
+declare function assertTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSUndefinedKeyword;
+declare function assertTSUnknownKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSUnknownKeyword;
+declare function assertTSVoidKeyword(node: object | null | undefined, opts?: object | null): asserts node is TSVoidKeyword;
+declare function assertTSThisType(node: object | null | undefined, opts?: object | null): asserts node is TSThisType;
+declare function assertTSFunctionType(node: object | null | undefined, opts?: object | null): asserts node is TSFunctionType;
+declare function assertTSConstructorType(node: object | null | undefined, opts?: object | null): asserts node is TSConstructorType;
+declare function assertTSTypeReference(node: object | null | undefined, opts?: object | null): asserts node is TSTypeReference;
+declare function assertTSTypePredicate(node: object | null | undefined, opts?: object | null): asserts node is TSTypePredicate;
+declare function assertTSTypeQuery(node: object | null | undefined, opts?: object | null): asserts node is TSTypeQuery;
+declare function assertTSTypeLiteral(node: object | null | undefined, opts?: object | null): asserts node is TSTypeLiteral;
+declare function assertTSArrayType(node: object | null | undefined, opts?: object | null): asserts node is TSArrayType;
+declare function assertTSTupleType(node: object | null | undefined, opts?: object | null): asserts node is TSTupleType;
+declare function assertTSOptionalType(node: object | null | undefined, opts?: object | null): asserts node is TSOptionalType;
+declare function assertTSRestType(node: object | null | undefined, opts?: object | null): asserts node is TSRestType;
+declare function assertTSNamedTupleMember(node: object | null | undefined, opts?: object | null): asserts node is TSNamedTupleMember;
+declare function assertTSUnionType(node: object | null | undefined, opts?: object | null): asserts node is TSUnionType;
+declare function assertTSIntersectionType(node: object | null | undefined, opts?: object | null): asserts node is TSIntersectionType;
+declare function assertTSConditionalType(node: object | null | undefined, opts?: object | null): asserts node is TSConditionalType;
+declare function assertTSInferType(node: object | null | undefined, opts?: object | null): asserts node is TSInferType;
+declare function assertTSParenthesizedType(node: object | null | undefined, opts?: object | null): asserts node is TSParenthesizedType;
+declare function assertTSTypeOperator(node: object | null | undefined, opts?: object | null): asserts node is TSTypeOperator;
+declare function assertTSIndexedAccessType(node: object | null | undefined, opts?: object | null): asserts node is TSIndexedAccessType;
+declare function assertTSMappedType(node: object | null | undefined, opts?: object | null): asserts node is TSMappedType;
+declare function assertTSLiteralType(node: object | null | undefined, opts?: object | null): asserts node is TSLiteralType;
+declare function assertTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): asserts node is TSExpressionWithTypeArguments;
+declare function assertTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSInterfaceDeclaration;
+declare function assertTSInterfaceBody(node: object | null | undefined, opts?: object | null): asserts node is TSInterfaceBody;
+declare function assertTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAliasDeclaration;
+declare function assertTSAsExpression(node: object | null | undefined, opts?: object | null): asserts node is TSAsExpression;
+declare function assertTSTypeAssertion(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAssertion;
+declare function assertTSEnumDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSEnumDeclaration;
+declare function assertTSEnumMember(node: object | null | undefined, opts?: object | null): asserts node is TSEnumMember;
+declare function assertTSModuleDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSModuleDeclaration;
+declare function assertTSModuleBlock(node: object | null | undefined, opts?: object | null): asserts node is TSModuleBlock;
+declare function assertTSImportType(node: object | null | undefined, opts?: object | null): asserts node is TSImportType;
+declare function assertTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSImportEqualsDeclaration;
+declare function assertTSExternalModuleReference(node: object | null | undefined, opts?: object | null): asserts node is TSExternalModuleReference;
+declare function assertTSNonNullExpression(node: object | null | undefined, opts?: object | null): asserts node is TSNonNullExpression;
+declare function assertTSExportAssignment(node: object | null | undefined, opts?: object | null): asserts node is TSExportAssignment;
+declare function assertTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSNamespaceExportDeclaration;
+declare function assertTSTypeAnnotation(node: object | null | undefined, opts?: object | null): asserts node is TSTypeAnnotation;
+declare function assertTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameterInstantiation;
+declare function assertTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameterDeclaration;
+declare function assertTSTypeParameter(node: object | null | undefined, opts?: object | null): asserts node is TSTypeParameter;
+declare function assertStandardized(node: object | null | undefined, opts?: object | null): asserts node is Standardized;
+declare function assertExpression(node: object | null | undefined, opts?: object | null): asserts node is Expression;
+declare function assertBinary(node: object | null | undefined, opts?: object | null): asserts node is Binary;
+declare function assertScopable(node: object | null | undefined, opts?: object | null): asserts node is Scopable;
+declare function assertBlockParent(node: object | null | undefined, opts?: object | null): asserts node is BlockParent;
+declare function assertBlock(node: object | null | undefined, opts?: object | null): asserts node is Block;
+declare function assertStatement(node: object | null | undefined, opts?: object | null): asserts node is Statement;
+declare function assertTerminatorless(node: object | null | undefined, opts?: object | null): asserts node is Terminatorless;
+declare function assertCompletionStatement(node: object | null | undefined, opts?: object | null): asserts node is CompletionStatement;
+declare function assertConditional(node: object | null | undefined, opts?: object | null): asserts node is Conditional;
+declare function assertLoop(node: object | null | undefined, opts?: object | null): asserts node is Loop;
+declare function assertWhile(node: object | null | undefined, opts?: object | null): asserts node is While;
+declare function assertExpressionWrapper(node: object | null | undefined, opts?: object | null): asserts node is ExpressionWrapper;
+declare function assertFor(node: object | null | undefined, opts?: object | null): asserts node is For;
+declare function assertForXStatement(node: object | null | undefined, opts?: object | null): asserts node is ForXStatement;
+declare function assertFunction(node: object | null | undefined, opts?: object | null): asserts node is Function;
+declare function assertFunctionParent(node: object | null | undefined, opts?: object | null): asserts node is FunctionParent;
+declare function assertPureish(node: object | null | undefined, opts?: object | null): asserts node is Pureish;
+declare function assertDeclaration(node: object | null | undefined, opts?: object | null): asserts node is Declaration;
+declare function assertPatternLike(node: object | null | undefined, opts?: object | null): asserts node is PatternLike;
+declare function assertLVal(node: object | null | undefined, opts?: object | null): asserts node is LVal;
+declare function assertTSEntityName(node: object | null | undefined, opts?: object | null): asserts node is TSEntityName;
+declare function assertLiteral(node: object | null | undefined, opts?: object | null): asserts node is Literal;
+declare function assertImmutable(node: object | null | undefined, opts?: object | null): asserts node is Immutable;
+declare function assertUserWhitespacable(node: object | null | undefined, opts?: object | null): asserts node is UserWhitespacable;
+declare function assertMethod(node: object | null | undefined, opts?: object | null): asserts node is Method;
+declare function assertObjectMember(node: object | null | undefined, opts?: object | null): asserts node is ObjectMember;
+declare function assertProperty(node: object | null | undefined, opts?: object | null): asserts node is Property;
+declare function assertUnaryLike(node: object | null | undefined, opts?: object | null): asserts node is UnaryLike;
+declare function assertPattern(node: object | null | undefined, opts?: object | null): asserts node is Pattern;
+declare function assertClass(node: object | null | undefined, opts?: object | null): asserts node is Class;
+declare function assertModuleDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ModuleDeclaration;
+declare function assertExportDeclaration(node: object | null | undefined, opts?: object | null): asserts node is ExportDeclaration;
+declare function assertModuleSpecifier(node: object | null | undefined, opts?: object | null): asserts node is ModuleSpecifier;
+declare function assertAccessor(node: object | null | undefined, opts?: object | null): asserts node is Accessor;
+declare function assertPrivate(node: object | null | undefined, opts?: object | null): asserts node is Private;
+declare function assertFlow(node: object | null | undefined, opts?: object | null): asserts node is Flow;
+declare function assertFlowType(node: object | null | undefined, opts?: object | null): asserts node is FlowType;
+declare function assertFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): asserts node is FlowBaseAnnotation;
+declare function assertFlowDeclaration(node: object | null | undefined, opts?: object | null): asserts node is FlowDeclaration;
+declare function assertFlowPredicate(node: object | null | undefined, opts?: object | null): asserts node is FlowPredicate;
+declare function assertEnumBody(node: object | null | undefined, opts?: object | null): asserts node is EnumBody;
+declare function assertEnumMember(node: object | null | undefined, opts?: object | null): asserts node is EnumMember;
+declare function assertJSX(node: object | null | undefined, opts?: object | null): asserts node is JSX;
+declare function assertMiscellaneous(node: object | null | undefined, opts?: object | null): asserts node is Miscellaneous;
+declare function assertTypeScript(node: object | null | undefined, opts?: object | null): asserts node is TypeScript;
+declare function assertTSTypeElement(node: object | null | undefined, opts?: object | null): asserts node is TSTypeElement;
+declare function assertTSType(node: object | null | undefined, opts?: object | null): asserts node is TSType;
+declare function assertTSBaseType(node: object | null | undefined, opts?: object | null): asserts node is TSBaseType;
+declare function assertNumberLiteral(node: any, opts: any): void;
+declare function assertRegexLiteral(node: any, opts: any): void;
+declare function assertRestProperty(node: any, opts: any): void;
+declare function assertSpreadProperty(node: any, opts: any): void;
+
+declare const _default$4: {
+ (type: "string"): StringTypeAnnotation;
+ (type: "number"): NumberTypeAnnotation;
+ (type: "undefined"): VoidTypeAnnotation;
+ (type: "boolean"): BooleanTypeAnnotation;
+ (type: "function"): GenericTypeAnnotation;
+ (type: "object"): GenericTypeAnnotation;
+ (type: "symbol"): GenericTypeAnnotation;
+ (type: "bigint"): AnyTypeAnnotation;
+};
+//# sourceMappingURL=createTypeAnnotationBasedOnTypeof.d.ts.map
+
+/**
+ * Takes an array of `types` and flattens them, removing duplicates and
+ * returns a `UnionTypeAnnotation` node containing them.
+ */
+declare function createFlowUnionType<T extends FlowType>(types: [T] | Array<T>): T | UnionTypeAnnotation;
+
+/**
+ * Takes an array of `types` and flattens them, removing duplicates and
+ * returns a `UnionTypeAnnotation` node containing them.
+ */
+declare function createTSUnionType(typeAnnotations: Array<TSTypeAnnotation>): TSType;
+
+declare function arrayExpression(elements?: Array<null | Expression | SpreadElement>): ArrayExpression;
+declare function assignmentExpression(operator: string, left: LVal, right: Expression): AssignmentExpression;
+declare function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: Expression | PrivateName, right: Expression): BinaryExpression;
+declare function interpreterDirective(value: string): InterpreterDirective;
+declare function directive(value: DirectiveLiteral): Directive;
+declare function directiveLiteral(value: string): DirectiveLiteral;
+declare function blockStatement(body: Array<Statement>, directives?: Array<Directive>): BlockStatement;
+declare function breakStatement(label?: Identifier | null): BreakStatement;
+declare function callExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): CallExpression;
+declare function catchClause(param: Identifier | ArrayPattern | ObjectPattern | null | undefined, body: BlockStatement): CatchClause;
+declare function conditionalExpression(test: Expression, consequent: Expression, alternate: Expression): ConditionalExpression;
+declare function continueStatement(label?: Identifier | null): ContinueStatement;
+declare function debuggerStatement(): DebuggerStatement;
+declare function doWhileStatement(test: Expression, body: Statement): DoWhileStatement;
+declare function emptyStatement(): EmptyStatement;
+declare function expressionStatement(expression: Expression): ExpressionStatement;
+declare function file(program: Program, comments?: Array<CommentBlock | CommentLine> | null, tokens?: Array<any> | null): File;
+declare function forInStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement): ForInStatement;
+declare function forStatement(init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement): ForStatement;
+declare function functionDeclaration(id: Identifier | null | undefined, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, generator?: boolean, async?: boolean): FunctionDeclaration;
+declare function functionExpression(id: Identifier | null | undefined, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, generator?: boolean, async?: boolean): FunctionExpression;
+declare function identifier(name: string): Identifier;
+declare function ifStatement(test: Expression, consequent: Statement, alternate?: Statement | null): IfStatement;
+declare function labeledStatement(label: Identifier, body: Statement): LabeledStatement;
+declare function stringLiteral(value: string): StringLiteral;
+declare function numericLiteral(value: number): NumericLiteral;
+declare function nullLiteral(): NullLiteral;
+declare function booleanLiteral(value: boolean): BooleanLiteral;
+declare function regExpLiteral(pattern: string, flags?: string): RegExpLiteral;
+declare function logicalExpression(operator: "||" | "&&" | "??", left: Expression, right: Expression): LogicalExpression;
+declare function memberExpression(object: Expression, property: Expression | Identifier | PrivateName, computed?: boolean, optional?: true | false | null): MemberExpression;
+declare function newExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): NewExpression;
+declare function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program;
+declare function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression;
+declare function objectMethod(kind: "method" | "get" | "set" | undefined, key: Expression | Identifier | StringLiteral | NumericLiteral, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, computed?: boolean, generator?: boolean, async?: boolean): ObjectMethod;
+declare function objectProperty(key: Expression | Identifier | StringLiteral | NumericLiteral, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<Decorator> | null): ObjectProperty;
+declare function restElement(argument: LVal): RestElement;
+declare function returnStatement(argument?: Expression | null): ReturnStatement;
+declare function sequenceExpression(expressions: Array<Expression>): SequenceExpression;
+declare function parenthesizedExpression(expression: Expression): ParenthesizedExpression;
+declare function switchCase(test: Expression | null | undefined, consequent: Array<Statement>): SwitchCase;
+declare function switchStatement(discriminant: Expression, cases: Array<SwitchCase>): SwitchStatement;
+declare function thisExpression(): ThisExpression;
+declare function throwStatement(argument: Expression): ThrowStatement;
+declare function tryStatement(block: BlockStatement, handler?: CatchClause | null, finalizer?: BlockStatement | null): TryStatement;
+declare function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: Expression, prefix?: boolean): UnaryExpression;
+declare function updateExpression(operator: "++" | "--", argument: Expression, prefix?: boolean): UpdateExpression;
+declare function variableDeclaration(kind: "var" | "let" | "const", declarations: Array<VariableDeclarator>): VariableDeclaration;
+declare function variableDeclarator(id: LVal, init?: Expression | null): VariableDeclarator;
+declare function whileStatement(test: Expression, body: Statement): WhileStatement;
+declare function withStatement(object: Expression, body: Statement): WithStatement;
+declare function assignmentPattern(left: Identifier | ObjectPattern | ArrayPattern | MemberExpression, right: Expression): AssignmentPattern;
+declare function arrayPattern(elements: Array<null | PatternLike>): ArrayPattern;
+declare function arrowFunctionExpression(params: Array<Identifier | Pattern | RestElement>, body: BlockStatement | Expression, async?: boolean): ArrowFunctionExpression;
+declare function classBody(body: Array<ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock>): ClassBody;
+declare function classExpression(id: Identifier | null | undefined, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassExpression;
+declare function classDeclaration(id: Identifier, superClass: Expression | null | undefined, body: ClassBody, decorators?: Array<Decorator> | null): ClassDeclaration;
+declare function exportAllDeclaration(source: StringLiteral): ExportAllDeclaration;
+declare function exportDefaultDeclaration(declaration: FunctionDeclaration | TSDeclareFunction | ClassDeclaration | Expression): ExportDefaultDeclaration;
+declare function exportNamedDeclaration(declaration?: Declaration | null, specifiers?: Array<ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier>, source?: StringLiteral | null): ExportNamedDeclaration;
+declare function exportSpecifier(local: Identifier, exported: Identifier | StringLiteral): ExportSpecifier;
+declare function forOfStatement(left: VariableDeclaration | LVal, right: Expression, body: Statement, _await?: boolean): ForOfStatement;
+declare function importDeclaration(specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>, source: StringLiteral): ImportDeclaration;
+declare function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifier;
+declare function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier;
+declare function importSpecifier(local: Identifier, imported: Identifier | StringLiteral): ImportSpecifier;
+declare function metaProperty(meta: Identifier, property: Identifier): MetaProperty;
+declare function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): ClassMethod;
+declare function objectPattern(properties: Array<RestElement | ObjectProperty>): ObjectPattern;
+declare function spreadElement(argument: Expression): SpreadElement;
+declare function _super(): Super;
+
+declare function taggedTemplateExpression(tag: Expression, quasi: TemplateLiteral): TaggedTemplateExpression;
+declare function templateElement(value: {
+ raw: string;
+ cooked?: string;
+}, tail?: boolean): TemplateElement;
+declare function templateLiteral(quasis: Array<TemplateElement>, expressions: Array<Expression | TSType>): TemplateLiteral;
+declare function yieldExpression(argument?: Expression | null, delegate?: boolean): YieldExpression;
+declare function awaitExpression(argument: Expression): AwaitExpression;
+declare function _import(): Import;
+
+declare function bigIntLiteral(value: string): BigIntLiteral;
+declare function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier;
+declare function optionalMemberExpression(object: Expression, property: Expression | Identifier, computed: boolean | undefined, optional: boolean): OptionalMemberExpression;
+declare function optionalCallExpression(callee: Expression, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>, optional: boolean): OptionalCallExpression;
+declare function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassProperty;
+declare function classAccessorProperty(key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassAccessorProperty;
+declare function classPrivateProperty(key: PrivateName, value: Expression | null | undefined, decorators: Array<Decorator> | null | undefined, _static: any): ClassPrivateProperty;
+declare function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, _static?: boolean): ClassPrivateMethod;
+declare function privateName(id: Identifier): PrivateName;
+declare function staticBlock(body: Array<Statement>): StaticBlock;
+declare function anyTypeAnnotation(): AnyTypeAnnotation;
+declare function arrayTypeAnnotation(elementType: FlowType): ArrayTypeAnnotation;
+declare function booleanTypeAnnotation(): BooleanTypeAnnotation;
+declare function booleanLiteralTypeAnnotation(value: boolean): BooleanLiteralTypeAnnotation;
+declare function nullLiteralTypeAnnotation(): NullLiteralTypeAnnotation;
+declare function classImplements(id: Identifier, typeParameters?: TypeParameterInstantiation | null): ClassImplements;
+declare function declareClass(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): DeclareClass;
+declare function declareFunction(id: Identifier): DeclareFunction;
+declare function declareInterface(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): DeclareInterface;
+declare function declareModule(id: Identifier | StringLiteral, body: BlockStatement, kind?: "CommonJS" | "ES" | null): DeclareModule;
+declare function declareModuleExports(typeAnnotation: TypeAnnotation): DeclareModuleExports;
+declare function declareTypeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): DeclareTypeAlias;
+declare function declareOpaqueType(id: Identifier, typeParameters?: TypeParameterDeclaration | null, supertype?: FlowType | null): DeclareOpaqueType;
+declare function declareVariable(id: Identifier): DeclareVariable;
+declare function declareExportDeclaration(declaration?: Flow | null, specifiers?: Array<ExportSpecifier | ExportNamespaceSpecifier> | null, source?: StringLiteral | null): DeclareExportDeclaration;
+declare function declareExportAllDeclaration(source: StringLiteral): DeclareExportAllDeclaration;
+declare function declaredPredicate(value: Flow): DeclaredPredicate;
+declare function existsTypeAnnotation(): ExistsTypeAnnotation;
+declare function functionTypeAnnotation(typeParameters: TypeParameterDeclaration | null | undefined, params: Array<FunctionTypeParam>, rest: FunctionTypeParam | null | undefined, returnType: FlowType): FunctionTypeAnnotation;
+declare function functionTypeParam(name: Identifier | null | undefined, typeAnnotation: FlowType): FunctionTypeParam;
+declare function genericTypeAnnotation(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): GenericTypeAnnotation;
+declare function inferredPredicate(): InferredPredicate;
+declare function interfaceExtends(id: Identifier | QualifiedTypeIdentifier, typeParameters?: TypeParameterInstantiation | null): InterfaceExtends;
+declare function interfaceDeclaration(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, _extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): InterfaceDeclaration;
+declare function interfaceTypeAnnotation(_extends: Array<InterfaceExtends> | null | undefined, body: ObjectTypeAnnotation): InterfaceTypeAnnotation;
+declare function intersectionTypeAnnotation(types: Array<FlowType>): IntersectionTypeAnnotation;
+declare function mixedTypeAnnotation(): MixedTypeAnnotation;
+declare function emptyTypeAnnotation(): EmptyTypeAnnotation;
+declare function nullableTypeAnnotation(typeAnnotation: FlowType): NullableTypeAnnotation;
+declare function numberLiteralTypeAnnotation(value: number): NumberLiteralTypeAnnotation;
+declare function numberTypeAnnotation(): NumberTypeAnnotation;
+declare function objectTypeAnnotation(properties: Array<ObjectTypeProperty | ObjectTypeSpreadProperty>, indexers?: Array<ObjectTypeIndexer> | null, callProperties?: Array<ObjectTypeCallProperty> | null, internalSlots?: Array<ObjectTypeInternalSlot> | null, exact?: boolean): ObjectTypeAnnotation;
+declare function objectTypeInternalSlot(id: Identifier, value: FlowType, optional: boolean, _static: boolean, method: boolean): ObjectTypeInternalSlot;
+declare function objectTypeCallProperty(value: FlowType): ObjectTypeCallProperty;
+declare function objectTypeIndexer(id: Identifier | null | undefined, key: FlowType, value: FlowType, variance?: Variance | null): ObjectTypeIndexer;
+declare function objectTypeProperty(key: Identifier | StringLiteral, value: FlowType, variance?: Variance | null): ObjectTypeProperty;
+declare function objectTypeSpreadProperty(argument: FlowType): ObjectTypeSpreadProperty;
+declare function opaqueType(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, supertype: FlowType | null | undefined, impltype: FlowType): OpaqueType;
+declare function qualifiedTypeIdentifier(id: Identifier, qualification: Identifier | QualifiedTypeIdentifier): QualifiedTypeIdentifier;
+declare function stringLiteralTypeAnnotation(value: string): StringLiteralTypeAnnotation;
+declare function stringTypeAnnotation(): StringTypeAnnotation;
+declare function symbolTypeAnnotation(): SymbolTypeAnnotation;
+declare function thisTypeAnnotation(): ThisTypeAnnotation;
+declare function tupleTypeAnnotation(types: Array<FlowType>): TupleTypeAnnotation;
+declare function typeofTypeAnnotation(argument: FlowType): TypeofTypeAnnotation;
+declare function typeAlias(id: Identifier, typeParameters: TypeParameterDeclaration | null | undefined, right: FlowType): TypeAlias;
+declare function typeAnnotation(typeAnnotation: FlowType): TypeAnnotation;
+declare function typeCastExpression(expression: Expression, typeAnnotation: TypeAnnotation): TypeCastExpression;
+declare function typeParameter(bound?: TypeAnnotation | null, _default?: FlowType | null, variance?: Variance | null): TypeParameter;
+declare function typeParameterDeclaration(params: Array<TypeParameter>): TypeParameterDeclaration;
+declare function typeParameterInstantiation(params: Array<FlowType>): TypeParameterInstantiation;
+declare function unionTypeAnnotation(types: Array<FlowType>): UnionTypeAnnotation;
+declare function variance(kind: "minus" | "plus"): Variance;
+declare function voidTypeAnnotation(): VoidTypeAnnotation;
+declare function enumDeclaration(id: Identifier, body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody): EnumDeclaration;
+declare function enumBooleanBody(members: Array<EnumBooleanMember>): EnumBooleanBody;
+declare function enumNumberBody(members: Array<EnumNumberMember>): EnumNumberBody;
+declare function enumStringBody(members: Array<EnumStringMember | EnumDefaultedMember>): EnumStringBody;
+declare function enumSymbolBody(members: Array<EnumDefaultedMember>): EnumSymbolBody;
+declare function enumBooleanMember(id: Identifier): EnumBooleanMember;
+declare function enumNumberMember(id: Identifier, init: NumericLiteral): EnumNumberMember;
+declare function enumStringMember(id: Identifier, init: StringLiteral): EnumStringMember;
+declare function enumDefaultedMember(id: Identifier): EnumDefaultedMember;
+declare function indexedAccessType(objectType: FlowType, indexType: FlowType): IndexedAccessType;
+declare function optionalIndexedAccessType(objectType: FlowType, indexType: FlowType): OptionalIndexedAccessType;
+declare function jsxAttribute(name: JSXIdentifier | JSXNamespacedName, value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null): JSXAttribute;
+
+declare function jsxClosingElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName): JSXClosingElement;
+
+declare function jsxElement(openingElement: JSXOpeningElement, closingElement: JSXClosingElement | null | undefined, children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>, selfClosing?: boolean | null): JSXElement;
+
+declare function jsxEmptyExpression(): JSXEmptyExpression;
+
+declare function jsxExpressionContainer(expression: Expression | JSXEmptyExpression): JSXExpressionContainer;
+
+declare function jsxSpreadChild(expression: Expression): JSXSpreadChild;
+
+declare function jsxIdentifier(name: string): JSXIdentifier;
+
+declare function jsxMemberExpression(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier): JSXMemberExpression;
+
+declare function jsxNamespacedName(namespace: JSXIdentifier, name: JSXIdentifier): JSXNamespacedName;
+
+declare function jsxOpeningElement(name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName, attributes: Array<JSXAttribute | JSXSpreadAttribute>, selfClosing?: boolean): JSXOpeningElement;
+
+declare function jsxSpreadAttribute(argument: Expression): JSXSpreadAttribute;
+
+declare function jsxText(value: string): JSXText;
+
+declare function jsxFragment(openingFragment: JSXOpeningFragment, closingFragment: JSXClosingFragment, children: Array<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment>): JSXFragment;
+
+declare function jsxOpeningFragment(): JSXOpeningFragment;
+
+declare function jsxClosingFragment(): JSXClosingFragment;
+
+declare function noop(): Noop;
+declare function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: Identifier): Placeholder;
+declare function v8IntrinsicIdentifier(name: string): V8IntrinsicIdentifier;
+declare function argumentPlaceholder(): ArgumentPlaceholder;
+declare function bindExpression(object: Expression, callee: Expression): BindExpression;
+declare function importAttribute(key: Identifier | StringLiteral, value: StringLiteral): ImportAttribute;
+declare function decorator(expression: Expression): Decorator;
+declare function doExpression(body: BlockStatement, async?: boolean): DoExpression;
+declare function exportDefaultSpecifier(exported: Identifier): ExportDefaultSpecifier;
+declare function recordExpression(properties: Array<ObjectProperty | SpreadElement>): RecordExpression;
+declare function tupleExpression(elements?: Array<Expression | SpreadElement>): TupleExpression;
+declare function decimalLiteral(value: string): DecimalLiteral;
+declare function moduleExpression(body: Program): ModuleExpression;
+declare function topicReference(): TopicReference;
+declare function pipelineTopicExpression(expression: Expression): PipelineTopicExpression;
+declare function pipelineBareFunction(callee: Expression): PipelineBareFunction;
+declare function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference;
+declare function tsParameterProperty(parameter: Identifier | AssignmentPattern): TSParameterProperty;
+
+declare function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareFunction;
+
+declare function tsDeclareMethod(decorators: Array<Decorator> | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareMethod;
+
+declare function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName;
+
+declare function tsCallSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration;
+
+declare function tsConstructSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration;
+
+declare function tsPropertySignature(key: Expression, typeAnnotation?: TSTypeAnnotation | null, initializer?: Expression | null): TSPropertySignature;
+
+declare function tsMethodSignature(key: Expression, typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSMethodSignature;
+
+declare function tsIndexSignature(parameters: Array<Identifier>, typeAnnotation?: TSTypeAnnotation | null): TSIndexSignature;
+
+declare function tsAnyKeyword(): TSAnyKeyword;
+
+declare function tsBooleanKeyword(): TSBooleanKeyword;
+
+declare function tsBigIntKeyword(): TSBigIntKeyword;
+
+declare function tsIntrinsicKeyword(): TSIntrinsicKeyword;
+
+declare function tsNeverKeyword(): TSNeverKeyword;
+
+declare function tsNullKeyword(): TSNullKeyword;
+
+declare function tsNumberKeyword(): TSNumberKeyword;
+
+declare function tsObjectKeyword(): TSObjectKeyword;
+
+declare function tsStringKeyword(): TSStringKeyword;
+
+declare function tsSymbolKeyword(): TSSymbolKeyword;
+
+declare function tsUndefinedKeyword(): TSUndefinedKeyword;
+
+declare function tsUnknownKeyword(): TSUnknownKeyword;
+
+declare function tsVoidKeyword(): TSVoidKeyword;
+
+declare function tsThisType(): TSThisType;
+
+declare function tsFunctionType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSFunctionType;
+
+declare function tsConstructorType(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructorType;
+
+declare function tsTypeReference(typeName: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSTypeReference;
+
+declare function tsTypePredicate(parameterName: Identifier | TSThisType, typeAnnotation?: TSTypeAnnotation | null, asserts?: boolean | null): TSTypePredicate;
+
+declare function tsTypeQuery(exprName: TSEntityName | TSImportType): TSTypeQuery;
+
+declare function tsTypeLiteral(members: Array<TSTypeElement>): TSTypeLiteral;
+
+declare function tsArrayType(elementType: TSType): TSArrayType;
+
+declare function tsTupleType(elementTypes: Array<TSType | TSNamedTupleMember>): TSTupleType;
+
+declare function tsOptionalType(typeAnnotation: TSType): TSOptionalType;
+
+declare function tsRestType(typeAnnotation: TSType): TSRestType;
+
+declare function tsNamedTupleMember(label: Identifier, elementType: TSType, optional?: boolean): TSNamedTupleMember;
+
+declare function tsUnionType(types: Array<TSType>): TSUnionType;
+
+declare function tsIntersectionType(types: Array<TSType>): TSIntersectionType;
+
+declare function tsConditionalType(checkType: TSType, extendsType: TSType, trueType: TSType, falseType: TSType): TSConditionalType;
+
+declare function tsInferType(typeParameter: TSTypeParameter): TSInferType;
+
+declare function tsParenthesizedType(typeAnnotation: TSType): TSParenthesizedType;
+
+declare function tsTypeOperator(typeAnnotation: TSType): TSTypeOperator;
+
+declare function tsIndexedAccessType(objectType: TSType, indexType: TSType): TSIndexedAccessType;
+
+declare function tsMappedType(typeParameter: TSTypeParameter, typeAnnotation?: TSType | null, nameType?: TSType | null): TSMappedType;
+
+declare function tsLiteralType(literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | UnaryExpression): TSLiteralType;
+
+declare function tsExpressionWithTypeArguments(expression: TSEntityName, typeParameters?: TSTypeParameterInstantiation | null): TSExpressionWithTypeArguments;
+
+declare function tsInterfaceDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, _extends: Array<TSExpressionWithTypeArguments> | null | undefined, body: TSInterfaceBody): TSInterfaceDeclaration;
+
+declare function tsInterfaceBody(body: Array<TSTypeElement>): TSInterfaceBody;
+
+declare function tsTypeAliasDeclaration(id: Identifier, typeParameters: TSTypeParameterDeclaration | null | undefined, typeAnnotation: TSType): TSTypeAliasDeclaration;
+
+declare function tsAsExpression(expression: Expression, typeAnnotation: TSType): TSAsExpression;
+
+declare function tsTypeAssertion(typeAnnotation: TSType, expression: Expression): TSTypeAssertion;
+
+declare function tsEnumDeclaration(id: Identifier, members: Array<TSEnumMember>): TSEnumDeclaration;
+
+declare function tsEnumMember(id: Identifier | StringLiteral, initializer?: Expression | null): TSEnumMember;
+
+declare function tsModuleDeclaration(id: Identifier | StringLiteral, body: TSModuleBlock | TSModuleDeclaration): TSModuleDeclaration;
+
+declare function tsModuleBlock(body: Array<Statement>): TSModuleBlock;
+
+declare function tsImportType(argument: StringLiteral, qualifier?: TSEntityName | null, typeParameters?: TSTypeParameterInstantiation | null): TSImportType;
+
+declare function tsImportEqualsDeclaration(id: Identifier, moduleReference: TSEntityName | TSExternalModuleReference): TSImportEqualsDeclaration;
+
+declare function tsExternalModuleReference(expression: StringLiteral): TSExternalModuleReference;
+
+declare function tsNonNullExpression(expression: Expression): TSNonNullExpression;
+
+declare function tsExportAssignment(expression: Expression): TSExportAssignment;
+
+declare function tsNamespaceExportDeclaration(id: Identifier): TSNamespaceExportDeclaration;
+
+declare function tsTypeAnnotation(typeAnnotation: TSType): TSTypeAnnotation;
+
+declare function tsTypeParameterInstantiation(params: Array<TSType>): TSTypeParameterInstantiation;
+
+declare function tsTypeParameterDeclaration(params: Array<TSTypeParameter>): TSTypeParameterDeclaration;
+
+declare function tsTypeParameter(constraint: TSType | null | undefined, _default: TSType | null | undefined, name: string): TSTypeParameter;
+
+/** @deprecated */
+declare function NumberLiteral(value: number): NumberLiteral$1;
+
+/** @deprecated */
+declare function RegexLiteral(pattern: string, flags?: string): RegexLiteral$1;
+
+/** @deprecated */
+declare function RestProperty(argument: LVal): RestProperty$1;
+
+/** @deprecated */
+declare function SpreadProperty(argument: Expression): SpreadProperty$1;
+
+/**
+ * Create a clone of a `node` including only properties belonging to the node.
+ * If the second parameter is `false`, cloneNode performs a shallow clone.
+ * If the third parameter is true, the cloned nodes exclude location properties.
+ */
+declare function cloneNode<T extends Node>(node: T, deep?: boolean, withoutLoc?: boolean): T;
+
+/**
+ * Create a shallow clone of a `node`, including only
+ * properties belonging to the node.
+ * @deprecated Use t.cloneNode instead.
+ */
+declare function clone<T extends Node>(node: T): T;
+
+/**
+ * Create a deep clone of a `node` and all of it's child nodes
+ * including only properties belonging to the node.
+ * @deprecated Use t.cloneNode instead.
+ */
+declare function cloneDeep<T extends Node>(node: T): T;
+
+/**
+ * Create a deep clone of a `node` and all of it's child nodes
+ * including only properties belonging to the node.
+ * excluding `_private` and location properties.
+ */
+declare function cloneDeepWithoutLoc<T extends Node>(node: T): T;
+
+/**
+ * Create a shallow clone of a `node` excluding `_private` and location properties.
+ */
+declare function cloneWithoutLoc<T extends Node>(node: T): T;
+
+/**
+ * Add comment of certain type to a node.
+ */
+declare function addComment<T extends Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T;
+
+/**
+ * Add comments of certain type to a node.
+ */
+declare function addComments<T extends Node>(node: T, type: CommentTypeShorthand, comments: ReadonlyArray<Comment>): T;
+
+declare function inheritInnerComments(child: Node, parent: Node): void;
+
+declare function inheritLeadingComments(child: Node, parent: Node): void;
+
+/**
+ * Inherit all unique comments from `parent` node to `child` node.
+ */
+declare function inheritsComments<T extends Node>(child: T, parent: Node): T;
+
+declare function inheritTrailingComments(child: Node, parent: Node): void;
+
+/**
+ * Remove comment properties from a node.
+ */
+declare function removeComments<T extends Node>(node: T): T;
+
+declare const STANDARDIZED_TYPES: string[];
+declare const EXPRESSION_TYPES: string[];
+declare const BINARY_TYPES: string[];
+declare const SCOPABLE_TYPES: string[];
+declare const BLOCKPARENT_TYPES: string[];
+declare const BLOCK_TYPES: string[];
+declare const STATEMENT_TYPES: string[];
+declare const TERMINATORLESS_TYPES: string[];
+declare const COMPLETIONSTATEMENT_TYPES: string[];
+declare const CONDITIONAL_TYPES: string[];
+declare const LOOP_TYPES: string[];
+declare const WHILE_TYPES: string[];
+declare const EXPRESSIONWRAPPER_TYPES: string[];
+declare const FOR_TYPES: string[];
+declare const FORXSTATEMENT_TYPES: string[];
+declare const FUNCTION_TYPES: string[];
+declare const FUNCTIONPARENT_TYPES: string[];
+declare const PUREISH_TYPES: string[];
+declare const DECLARATION_TYPES: string[];
+declare const PATTERNLIKE_TYPES: string[];
+declare const LVAL_TYPES: string[];
+declare const TSENTITYNAME_TYPES: string[];
+declare const LITERAL_TYPES: string[];
+declare const IMMUTABLE_TYPES: string[];
+declare const USERWHITESPACABLE_TYPES: string[];
+declare const METHOD_TYPES: string[];
+declare const OBJECTMEMBER_TYPES: string[];
+declare const PROPERTY_TYPES: string[];
+declare const UNARYLIKE_TYPES: string[];
+declare const PATTERN_TYPES: string[];
+declare const CLASS_TYPES: string[];
+declare const MODULEDECLARATION_TYPES: string[];
+declare const EXPORTDECLARATION_TYPES: string[];
+declare const MODULESPECIFIER_TYPES: string[];
+declare const ACCESSOR_TYPES: string[];
+declare const PRIVATE_TYPES: string[];
+declare const FLOW_TYPES: string[];
+declare const FLOWTYPE_TYPES: string[];
+declare const FLOWBASEANNOTATION_TYPES: string[];
+declare const FLOWDECLARATION_TYPES: string[];
+declare const FLOWPREDICATE_TYPES: string[];
+declare const ENUMBODY_TYPES: string[];
+declare const ENUMMEMBER_TYPES: string[];
+declare const JSX_TYPES: string[];
+declare const MISCELLANEOUS_TYPES: string[];
+declare const TYPESCRIPT_TYPES: string[];
+declare const TSTYPEELEMENT_TYPES: string[];
+declare const TSTYPE_TYPES: string[];
+declare const TSBASETYPE_TYPES: string[];
+
+declare const STATEMENT_OR_BLOCK_KEYS: string[];
+declare const FLATTENABLE_KEYS: string[];
+declare const FOR_INIT_KEYS: string[];
+declare const COMMENT_KEYS: string[];
+declare const LOGICAL_OPERATORS: string[];
+declare const UPDATE_OPERATORS: string[];
+declare const BOOLEAN_NUMBER_BINARY_OPERATORS: string[];
+declare const EQUALITY_BINARY_OPERATORS: string[];
+declare const COMPARISON_BINARY_OPERATORS: string[];
+declare const BOOLEAN_BINARY_OPERATORS: string[];
+declare const NUMBER_BINARY_OPERATORS: string[];
+declare const BINARY_OPERATORS: string[];
+declare const ASSIGNMENT_OPERATORS: string[];
+declare const BOOLEAN_UNARY_OPERATORS: string[];
+declare const NUMBER_UNARY_OPERATORS: string[];
+declare const STRING_UNARY_OPERATORS: string[];
+declare const UNARY_OPERATORS: string[];
+declare const INHERIT_KEYS: {
+ optional: string[];
+ force: string[];
+};
+declare const BLOCK_SCOPED_SYMBOL: unique symbol;
+declare const NOT_LOCAL_BINDING: unique symbol;
+
+/**
+ * Ensure the `key` (defaults to "body") of a `node` is a block.
+ * Casting it to a block if it is not.
+ *
+ * Returns the BlockStatement
+ */
+declare function ensureBlock(node: Node, key?: string): BlockStatement;
+
+declare function toBindingIdentifierName(name: string): string;
+
+declare function toBlock(node: Statement | Expression, parent?: Node): BlockStatement;
+
+declare function toComputedKey(node: ObjectMember | ObjectProperty | ClassMethod | ClassProperty | ClassAccessorProperty | MemberExpression | OptionalMemberExpression, key?: Expression): Expression;
+
+declare const _default$3: {
+ (node: Function): FunctionExpression;
+ (node: Class): ClassExpression;
+ (node: ExpressionStatement | Expression | Class | Function): Expression;
+};
+//# sourceMappingURL=toExpression.d.ts.map
+
+declare function toIdentifier(input: string): string;
+
+declare function toKeyAlias(node: Method | Property, key?: Node): string;
+declare namespace toKeyAlias {
+ var uid: number;
+ var increment: () => number;
+}
+//# sourceMappingURL=toKeyAlias.d.ts.map
+
+declare type Scope = {
+ push(value: {
+ id: LVal;
+ kind: "var";
+ init?: Expression;
+ }): void;
+ buildUndefinedNode(): Node;
+};
+
+/**
+ * Turn an array of statement `nodes` into a `SequenceExpression`.
+ *
+ * Variable declarations are turned into simple assignments and their
+ * declarations hoisted to the top of the current scope.
+ *
+ * Expression statements are just resolved to their expression.
+ */
+declare function toSequenceExpression(nodes: ReadonlyArray<Node>, scope: Scope): SequenceExpression | undefined;
+
+declare const _default$2: {
+ (node: AssignmentExpression, ignore?: boolean): ExpressionStatement;
+ <T extends Statement>(node: T, ignore: false): T;
+ <T_1 extends Statement>(node: T_1, ignore?: boolean): false | T_1;
+ (node: Class, ignore: false): ClassDeclaration;
+ (node: Class, ignore?: boolean): ClassDeclaration | false;
+ (node: Function, ignore: false): FunctionDeclaration;
+ (node: Function, ignore?: boolean): FunctionDeclaration | false;
+ (node: Node, ignore: false): Statement;
+ (node: Node, ignore?: boolean): Statement | false;
+};
+//# sourceMappingURL=toStatement.d.ts.map
+
+declare const _default$1: {
+ (value: undefined): Identifier;
+ (value: boolean): BooleanLiteral;
+ (value: null): NullLiteral;
+ (value: string): StringLiteral;
+ (value: number): NumericLiteral | BinaryExpression | UnaryExpression;
+ (value: RegExp): RegExpLiteral;
+ (value: ReadonlyArray<unknown>): ArrayExpression;
+ (value: object): ObjectExpression;
+ (value: unknown): Expression;
+};
+//# sourceMappingURL=valueToNode.d.ts.map
+
+declare const VISITOR_KEYS: Record<string, string[]>;
+declare const ALIAS_KEYS: Record<string, string[]>;
+declare const FLIPPED_ALIAS_KEYS: Record<string, string[]>;
+declare const NODE_FIELDS: Record<string, {}>;
+declare const BUILDER_KEYS: Record<string, string[]>;
+declare const DEPRECATED_KEYS: Record<string, string>;
+declare const NODE_PARENT_VALIDATIONS: {};
+
+declare const PLACEHOLDERS: string[];
+declare const PLACEHOLDERS_ALIAS: Record<string, string[]>;
+declare const PLACEHOLDERS_FLIPPED_ALIAS: Record<string, string[]>;
+
+declare const TYPES: Array<string>;
+//# sourceMappingURL=index.d.ts.map
+
+/**
+ * Append a node to a member expression.
+ */
+declare function appendToMemberExpression(member: MemberExpression, append: MemberExpression["property"], computed?: boolean): MemberExpression;
+
+/**
+ * Inherit all contextual properties from `parent` node to `child` node.
+ */
+declare function inherits<T extends Node | null | undefined>(child: T, parent: Node | null | undefined): T;
+
+/**
+ * Prepend a node to a member expression.
+ */
+declare function prependToMemberExpression<T extends Pick<MemberExpression, "object" | "property">>(member: T, prepend: MemberExpression["object"]): T;
+
+/**
+ * Remove all of the _* properties from a node along with the additional metadata
+ * properties like location data and raw token data.
+ */
+declare function removeProperties(node: Node, opts?: {
+ preserveComments?: boolean;
+}): void;
+
+declare function removePropertiesDeep<T extends Node>(tree: T, opts?: {
+ preserveComments: boolean;
+} | null): T;
+
+/**
+ * Dedupe type annotations.
+ */
+declare function removeTypeDuplicates(nodes: ReadonlyArray<FlowType | false | null | undefined>): FlowType[];
+
+declare function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record<string, Array<Identifier>>;
+declare function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record<string, Identifier>;
+declare function getBindingIdentifiers(node: Node, duplicates?: boolean, outerOnly?: boolean): Record<string, Identifier> | Record<string, Array<Identifier>>;
+declare namespace getBindingIdentifiers {
+ var keys: {
+ DeclareClass: string[];
+ DeclareFunction: string[];
+ DeclareModule: string[];
+ DeclareVariable: string[];
+ DeclareInterface: string[];
+ DeclareTypeAlias: string[];
+ DeclareOpaqueType: string[];
+ InterfaceDeclaration: string[];
+ TypeAlias: string[];
+ OpaqueType: string[];
+ CatchClause: string[];
+ LabeledStatement: string[];
+ UnaryExpression: string[];
+ AssignmentExpression: string[];
+ ImportSpecifier: string[];
+ ImportNamespaceSpecifier: string[];
+ ImportDefaultSpecifier: string[];
+ ImportDeclaration: string[];
+ ExportSpecifier: string[];
+ ExportNamespaceSpecifier: string[];
+ ExportDefaultSpecifier: string[];
+ FunctionDeclaration: string[];
+ FunctionExpression: string[];
+ ArrowFunctionExpression: string[];
+ ObjectMethod: string[];
+ ClassMethod: string[];
+ ClassPrivateMethod: string[];
+ ForInStatement: string[];
+ ForOfStatement: string[];
+ ClassDeclaration: string[];
+ ClassExpression: string[];
+ RestElement: string[];
+ UpdateExpression: string[];
+ ObjectProperty: string[];
+ AssignmentPattern: string[];
+ ArrayPattern: string[];
+ ObjectPattern: string[];
+ VariableDeclaration: string[];
+ VariableDeclarator: string[];
+ };
+}
+//# sourceMappingURL=getBindingIdentifiers.d.ts.map
+
+declare const _default: {
+ (node: Node, duplicates: true): Record<string, Array<Identifier>>;
+ (node: Node, duplicates?: false): Record<string, Identifier>;
+ (node: Node, duplicates?: boolean): Record<string, Identifier> | Record<string, Array<Identifier>>;
+};
+//# sourceMappingURL=getOuterBindingIdentifiers.d.ts.map
+
+declare type TraversalAncestors = Array<{
+ node: Node;
+ key: string;
+ index?: number;
+}>;
+declare type TraversalHandler<T> = (this: undefined, node: Node, parent: TraversalAncestors, state: T) => void;
+declare type TraversalHandlers<T> = {
+ enter?: TraversalHandler<T>;
+ exit?: TraversalHandler<T>;
+};
+/**
+ * A general AST traversal with both prefix and postfix handlers, and a
+ * state object. Exposes ancestry data to each handler so that more complex
+ * AST data can be taken into account.
+ */
+declare function traverse<T>(node: Node, handlers: TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;
+
+/**
+ * A prefix AST traversal implementation meant for simple searching
+ * and processing.
+ */
+declare function traverseFast(node: Node | null | undefined, enter: (node: Node, opts?: any) => void, opts?: any): void;
+
+declare function shallowEqual<T extends object>(actual: object, expected: T): actual is T;
+
+declare function is<T extends Node["type"]>(type: T, node: Node | null | undefined, opts?: undefined): node is Extract<Node, {
+ type: T;
+}>;
+declare function is<T extends Node["type"], P extends Extract<Node, {
+ type: T;
+}>>(type: T, n: Node | null | undefined, required: Partial<P>): n is P;
+declare function is<P extends Node>(type: string, node: Node | null | undefined, opts: Partial<P>): node is P;
+declare function is(type: string, node: Node | null | undefined, opts?: Partial<Node>): node is Node;
+
+/**
+ * Check if the input `node` is a binding identifier.
+ */
+declare function isBinding(node: Node, parent: Node, grandparent?: Node): boolean;
+
+/**
+ * Check if the input `node` is block scoped.
+ */
+declare function isBlockScoped(node: Node): boolean;
+
+/**
+ * Check if the input `node` is definitely immutable.
+ */
+declare function isImmutable(node: Node): boolean;
+
+/**
+ * Check if the input `node` is a `let` variable declaration.
+ */
+declare function isLet(node: Node): boolean;
+
+declare function isNode(node: any): node is Node;
+
+/**
+ * Check if two nodes are equivalent
+ */
+declare function isNodesEquivalent<T extends Partial<Node>>(a: T, b: any): b is T;
+
+/**
+ * Test if a `placeholderType` is a `targetType` or if `targetType` is an alias of `placeholderType`.
+ */
+declare function isPlaceholderType(placeholderType: string, targetType: string): boolean;
+
+/**
+ * Check if the input `node` is a reference to a bound variable.
+ */
+declare function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean;
+
+/**
+ * Check if the input `node` is a scope.
+ */
+declare function isScope(node: Node, parent: Node): boolean;
+
+/**
+ * Check if the input `specifier` is a `default` import or export.
+ */
+declare function isSpecifierDefault(specifier: ModuleSpecifier): boolean;
+
+declare function isType<T extends Node["type"]>(nodeType: string, targetType: T): nodeType is T;
+declare function isType(nodeType: string | null | undefined, targetType: string): boolean;
+
+/**
+ * Check if the input `name` is a valid identifier name according to the ES3 specification.
+ *
+ * Additional ES3 reserved words are
+ */
+declare function isValidES3Identifier(name: string): boolean;
+
+/**
+ * Check if the input `name` is a valid identifier name
+ * and isn't a reserved word.
+ */
+declare function isValidIdentifier(name: string, reserved?: boolean): boolean;
+
+/**
+ * Check if the input `node` is a variable declaration.
+ */
+declare function isVar(node: Node): boolean;
+
+/**
+ * Determines whether or not the input node `member` matches the
+ * input `match`.
+ *
+ * For example, given the match `React.createClass` it would match the
+ * parsed nodes of `React.createClass` and `React["createClass"]`.
+ */
+declare function matchesPattern(member: Node | null | undefined, match: string | string[], allowPartial?: boolean): boolean;
+
+declare function validate(node: Node | undefined | null, key: string, val: any): void;
+
+/**
+ * Build a function that when called will return whether or not the
+ * input `node` `MemberExpression` matches the input `match`.
+ *
+ * For example, given the match `React.createClass` it would match the
+ * parsed nodes of `React.createClass` and `React["createClass"]`.
+ */
+declare function buildMatchMemberExpression(match: string, allowPartial?: boolean): (member: Node) => boolean;
+
+declare function isArrayExpression(node: object | null | undefined, opts?: object | null): node is ArrayExpression;
+declare function isAssignmentExpression(node: object | null | undefined, opts?: object | null): node is AssignmentExpression;
+declare function isBinaryExpression(node: object | null | undefined, opts?: object | null): node is BinaryExpression;
+declare function isInterpreterDirective(node: object | null | undefined, opts?: object | null): node is InterpreterDirective;
+declare function isDirective(node: object | null | undefined, opts?: object | null): node is Directive;
+declare function isDirectiveLiteral(node: object | null | undefined, opts?: object | null): node is DirectiveLiteral;
+declare function isBlockStatement(node: object | null | undefined, opts?: object | null): node is BlockStatement;
+declare function isBreakStatement(node: object | null | undefined, opts?: object | null): node is BreakStatement;
+declare function isCallExpression(node: object | null | undefined, opts?: object | null): node is CallExpression;
+declare function isCatchClause(node: object | null | undefined, opts?: object | null): node is CatchClause;
+declare function isConditionalExpression(node: object | null | undefined, opts?: object | null): node is ConditionalExpression;
+declare function isContinueStatement(node: object | null | undefined, opts?: object | null): node is ContinueStatement;
+declare function isDebuggerStatement(node: object | null | undefined, opts?: object | null): node is DebuggerStatement;
+declare function isDoWhileStatement(node: object | null | undefined, opts?: object | null): node is DoWhileStatement;
+declare function isEmptyStatement(node: object | null | undefined, opts?: object | null): node is EmptyStatement;
+declare function isExpressionStatement(node: object | null | undefined, opts?: object | null): node is ExpressionStatement;
+declare function isFile(node: object | null | undefined, opts?: object | null): node is File;
+declare function isForInStatement(node: object | null | undefined, opts?: object | null): node is ForInStatement;
+declare function isForStatement(node: object | null | undefined, opts?: object | null): node is ForStatement;
+declare function isFunctionDeclaration(node: object | null | undefined, opts?: object | null): node is FunctionDeclaration;
+declare function isFunctionExpression(node: object | null | undefined, opts?: object | null): node is FunctionExpression;
+declare function isIdentifier(node: object | null | undefined, opts?: object | null): node is Identifier;
+declare function isIfStatement(node: object | null | undefined, opts?: object | null): node is IfStatement;
+declare function isLabeledStatement(node: object | null | undefined, opts?: object | null): node is LabeledStatement;
+declare function isStringLiteral(node: object | null | undefined, opts?: object | null): node is StringLiteral;
+declare function isNumericLiteral(node: object | null | undefined, opts?: object | null): node is NumericLiteral;
+declare function isNullLiteral(node: object | null | undefined, opts?: object | null): node is NullLiteral;
+declare function isBooleanLiteral(node: object | null | undefined, opts?: object | null): node is BooleanLiteral;
+declare function isRegExpLiteral(node: object | null | undefined, opts?: object | null): node is RegExpLiteral;
+declare function isLogicalExpression(node: object | null | undefined, opts?: object | null): node is LogicalExpression;
+declare function isMemberExpression(node: object | null | undefined, opts?: object | null): node is MemberExpression;
+declare function isNewExpression(node: object | null | undefined, opts?: object | null): node is NewExpression;
+declare function isProgram(node: object | null | undefined, opts?: object | null): node is Program;
+declare function isObjectExpression(node: object | null | undefined, opts?: object | null): node is ObjectExpression;
+declare function isObjectMethod(node: object | null | undefined, opts?: object | null): node is ObjectMethod;
+declare function isObjectProperty(node: object | null | undefined, opts?: object | null): node is ObjectProperty;
+declare function isRestElement(node: object | null | undefined, opts?: object | null): node is RestElement;
+declare function isReturnStatement(node: object | null | undefined, opts?: object | null): node is ReturnStatement;
+declare function isSequenceExpression(node: object | null | undefined, opts?: object | null): node is SequenceExpression;
+declare function isParenthesizedExpression(node: object | null | undefined, opts?: object | null): node is ParenthesizedExpression;
+declare function isSwitchCase(node: object | null | undefined, opts?: object | null): node is SwitchCase;
+declare function isSwitchStatement(node: object | null | undefined, opts?: object | null): node is SwitchStatement;
+declare function isThisExpression(node: object | null | undefined, opts?: object | null): node is ThisExpression;
+declare function isThrowStatement(node: object | null | undefined, opts?: object | null): node is ThrowStatement;
+declare function isTryStatement(node: object | null | undefined, opts?: object | null): node is TryStatement;
+declare function isUnaryExpression(node: object | null | undefined, opts?: object | null): node is UnaryExpression;
+declare function isUpdateExpression(node: object | null | undefined, opts?: object | null): node is UpdateExpression;
+declare function isVariableDeclaration(node: object | null | undefined, opts?: object | null): node is VariableDeclaration;
+declare function isVariableDeclarator(node: object | null | undefined, opts?: object | null): node is VariableDeclarator;
+declare function isWhileStatement(node: object | null | undefined, opts?: object | null): node is WhileStatement;
+declare function isWithStatement(node: object | null | undefined, opts?: object | null): node is WithStatement;
+declare function isAssignmentPattern(node: object | null | undefined, opts?: object | null): node is AssignmentPattern;
+declare function isArrayPattern(node: object | null | undefined, opts?: object | null): node is ArrayPattern;
+declare function isArrowFunctionExpression(node: object | null | undefined, opts?: object | null): node is ArrowFunctionExpression;
+declare function isClassBody(node: object | null | undefined, opts?: object | null): node is ClassBody;
+declare function isClassExpression(node: object | null | undefined, opts?: object | null): node is ClassExpression;
+declare function isClassDeclaration(node: object | null | undefined, opts?: object | null): node is ClassDeclaration;
+declare function isExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is ExportAllDeclaration;
+declare function isExportDefaultDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDefaultDeclaration;
+declare function isExportNamedDeclaration(node: object | null | undefined, opts?: object | null): node is ExportNamedDeclaration;
+declare function isExportSpecifier(node: object | null | undefined, opts?: object | null): node is ExportSpecifier;
+declare function isForOfStatement(node: object | null | undefined, opts?: object | null): node is ForOfStatement;
+declare function isImportDeclaration(node: object | null | undefined, opts?: object | null): node is ImportDeclaration;
+declare function isImportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ImportDefaultSpecifier;
+declare function isImportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ImportNamespaceSpecifier;
+declare function isImportSpecifier(node: object | null | undefined, opts?: object | null): node is ImportSpecifier;
+declare function isMetaProperty(node: object | null | undefined, opts?: object | null): node is MetaProperty;
+declare function isClassMethod(node: object | null | undefined, opts?: object | null): node is ClassMethod;
+declare function isObjectPattern(node: object | null | undefined, opts?: object | null): node is ObjectPattern;
+declare function isSpreadElement(node: object | null | undefined, opts?: object | null): node is SpreadElement;
+declare function isSuper(node: object | null | undefined, opts?: object | null): node is Super;
+declare function isTaggedTemplateExpression(node: object | null | undefined, opts?: object | null): node is TaggedTemplateExpression;
+declare function isTemplateElement(node: object | null | undefined, opts?: object | null): node is TemplateElement;
+declare function isTemplateLiteral(node: object | null | undefined, opts?: object | null): node is TemplateLiteral;
+declare function isYieldExpression(node: object | null | undefined, opts?: object | null): node is YieldExpression;
+declare function isAwaitExpression(node: object | null | undefined, opts?: object | null): node is AwaitExpression;
+declare function isImport(node: object | null | undefined, opts?: object | null): node is Import;
+declare function isBigIntLiteral(node: object | null | undefined, opts?: object | null): node is BigIntLiteral;
+declare function isExportNamespaceSpecifier(node: object | null | undefined, opts?: object | null): node is ExportNamespaceSpecifier;
+declare function isOptionalMemberExpression(node: object | null | undefined, opts?: object | null): node is OptionalMemberExpression;
+declare function isOptionalCallExpression(node: object | null | undefined, opts?: object | null): node is OptionalCallExpression;
+declare function isClassProperty(node: object | null | undefined, opts?: object | null): node is ClassProperty;
+declare function isClassAccessorProperty(node: object | null | undefined, opts?: object | null): node is ClassAccessorProperty;
+declare function isClassPrivateProperty(node: object | null | undefined, opts?: object | null): node is ClassPrivateProperty;
+declare function isClassPrivateMethod(node: object | null | undefined, opts?: object | null): node is ClassPrivateMethod;
+declare function isPrivateName(node: object | null | undefined, opts?: object | null): node is PrivateName;
+declare function isStaticBlock(node: object | null | undefined, opts?: object | null): node is StaticBlock;
+declare function isAnyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is AnyTypeAnnotation;
+declare function isArrayTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ArrayTypeAnnotation;
+declare function isBooleanTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanTypeAnnotation;
+declare function isBooleanLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is BooleanLiteralTypeAnnotation;
+declare function isNullLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullLiteralTypeAnnotation;
+declare function isClassImplements(node: object | null | undefined, opts?: object | null): node is ClassImplements;
+declare function isDeclareClass(node: object | null | undefined, opts?: object | null): node is DeclareClass;
+declare function isDeclareFunction(node: object | null | undefined, opts?: object | null): node is DeclareFunction;
+declare function isDeclareInterface(node: object | null | undefined, opts?: object | null): node is DeclareInterface;
+declare function isDeclareModule(node: object | null | undefined, opts?: object | null): node is DeclareModule;
+declare function isDeclareModuleExports(node: object | null | undefined, opts?: object | null): node is DeclareModuleExports;
+declare function isDeclareTypeAlias(node: object | null | undefined, opts?: object | null): node is DeclareTypeAlias;
+declare function isDeclareOpaqueType(node: object | null | undefined, opts?: object | null): node is DeclareOpaqueType;
+declare function isDeclareVariable(node: object | null | undefined, opts?: object | null): node is DeclareVariable;
+declare function isDeclareExportDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportDeclaration;
+declare function isDeclareExportAllDeclaration(node: object | null | undefined, opts?: object | null): node is DeclareExportAllDeclaration;
+declare function isDeclaredPredicate(node: object | null | undefined, opts?: object | null): node is DeclaredPredicate;
+declare function isExistsTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ExistsTypeAnnotation;
+declare function isFunctionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is FunctionTypeAnnotation;
+declare function isFunctionTypeParam(node: object | null | undefined, opts?: object | null): node is FunctionTypeParam;
+declare function isGenericTypeAnnotation(node: object | null | undefined, opts?: object | null): node is GenericTypeAnnotation;
+declare function isInferredPredicate(node: object | null | undefined, opts?: object | null): node is InferredPredicate;
+declare function isInterfaceExtends(node: object | null | undefined, opts?: object | null): node is InterfaceExtends;
+declare function isInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is InterfaceDeclaration;
+declare function isInterfaceTypeAnnotation(node: object | null | undefined, opts?: object | null): node is InterfaceTypeAnnotation;
+declare function isIntersectionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is IntersectionTypeAnnotation;
+declare function isMixedTypeAnnotation(node: object | null | undefined, opts?: object | null): node is MixedTypeAnnotation;
+declare function isEmptyTypeAnnotation(node: object | null | undefined, opts?: object | null): node is EmptyTypeAnnotation;
+declare function isNullableTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NullableTypeAnnotation;
+declare function isNumberLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberLiteralTypeAnnotation;
+declare function isNumberTypeAnnotation(node: object | null | undefined, opts?: object | null): node is NumberTypeAnnotation;
+declare function isObjectTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ObjectTypeAnnotation;
+declare function isObjectTypeInternalSlot(node: object | null | undefined, opts?: object | null): node is ObjectTypeInternalSlot;
+declare function isObjectTypeCallProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeCallProperty;
+declare function isObjectTypeIndexer(node: object | null | undefined, opts?: object | null): node is ObjectTypeIndexer;
+declare function isObjectTypeProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeProperty;
+declare function isObjectTypeSpreadProperty(node: object | null | undefined, opts?: object | null): node is ObjectTypeSpreadProperty;
+declare function isOpaqueType(node: object | null | undefined, opts?: object | null): node is OpaqueType;
+declare function isQualifiedTypeIdentifier(node: object | null | undefined, opts?: object | null): node is QualifiedTypeIdentifier;
+declare function isStringLiteralTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringLiteralTypeAnnotation;
+declare function isStringTypeAnnotation(node: object | null | undefined, opts?: object | null): node is StringTypeAnnotation;
+declare function isSymbolTypeAnnotation(node: object | null | undefined, opts?: object | null): node is SymbolTypeAnnotation;
+declare function isThisTypeAnnotation(node: object | null | undefined, opts?: object | null): node is ThisTypeAnnotation;
+declare function isTupleTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TupleTypeAnnotation;
+declare function isTypeofTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeofTypeAnnotation;
+declare function isTypeAlias(node: object | null | undefined, opts?: object | null): node is TypeAlias;
+declare function isTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TypeAnnotation;
+declare function isTypeCastExpression(node: object | null | undefined, opts?: object | null): node is TypeCastExpression;
+declare function isTypeParameter(node: object | null | undefined, opts?: object | null): node is TypeParameter;
+declare function isTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TypeParameterDeclaration;
+declare function isTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TypeParameterInstantiation;
+declare function isUnionTypeAnnotation(node: object | null | undefined, opts?: object | null): node is UnionTypeAnnotation;
+declare function isVariance(node: object | null | undefined, opts?: object | null): node is Variance;
+declare function isVoidTypeAnnotation(node: object | null | undefined, opts?: object | null): node is VoidTypeAnnotation;
+declare function isEnumDeclaration(node: object | null | undefined, opts?: object | null): node is EnumDeclaration;
+declare function isEnumBooleanBody(node: object | null | undefined, opts?: object | null): node is EnumBooleanBody;
+declare function isEnumNumberBody(node: object | null | undefined, opts?: object | null): node is EnumNumberBody;
+declare function isEnumStringBody(node: object | null | undefined, opts?: object | null): node is EnumStringBody;
+declare function isEnumSymbolBody(node: object | null | undefined, opts?: object | null): node is EnumSymbolBody;
+declare function isEnumBooleanMember(node: object | null | undefined, opts?: object | null): node is EnumBooleanMember;
+declare function isEnumNumberMember(node: object | null | undefined, opts?: object | null): node is EnumNumberMember;
+declare function isEnumStringMember(node: object | null | undefined, opts?: object | null): node is EnumStringMember;
+declare function isEnumDefaultedMember(node: object | null | undefined, opts?: object | null): node is EnumDefaultedMember;
+declare function isIndexedAccessType(node: object | null | undefined, opts?: object | null): node is IndexedAccessType;
+declare function isOptionalIndexedAccessType(node: object | null | undefined, opts?: object | null): node is OptionalIndexedAccessType;
+declare function isJSXAttribute(node: object | null | undefined, opts?: object | null): node is JSXAttribute;
+declare function isJSXClosingElement(node: object | null | undefined, opts?: object | null): node is JSXClosingElement;
+declare function isJSXElement(node: object | null | undefined, opts?: object | null): node is JSXElement;
+declare function isJSXEmptyExpression(node: object | null | undefined, opts?: object | null): node is JSXEmptyExpression;
+declare function isJSXExpressionContainer(node: object | null | undefined, opts?: object | null): node is JSXExpressionContainer;
+declare function isJSXSpreadChild(node: object | null | undefined, opts?: object | null): node is JSXSpreadChild;
+declare function isJSXIdentifier(node: object | null | undefined, opts?: object | null): node is JSXIdentifier;
+declare function isJSXMemberExpression(node: object | null | undefined, opts?: object | null): node is JSXMemberExpression;
+declare function isJSXNamespacedName(node: object | null | undefined, opts?: object | null): node is JSXNamespacedName;
+declare function isJSXOpeningElement(node: object | null | undefined, opts?: object | null): node is JSXOpeningElement;
+declare function isJSXSpreadAttribute(node: object | null | undefined, opts?: object | null): node is JSXSpreadAttribute;
+declare function isJSXText(node: object | null | undefined, opts?: object | null): node is JSXText;
+declare function isJSXFragment(node: object | null | undefined, opts?: object | null): node is JSXFragment;
+declare function isJSXOpeningFragment(node: object | null | undefined, opts?: object | null): node is JSXOpeningFragment;
+declare function isJSXClosingFragment(node: object | null | undefined, opts?: object | null): node is JSXClosingFragment;
+declare function isNoop(node: object | null | undefined, opts?: object | null): node is Noop;
+declare function isPlaceholder(node: object | null | undefined, opts?: object | null): node is Placeholder;
+declare function isV8IntrinsicIdentifier(node: object | null | undefined, opts?: object | null): node is V8IntrinsicIdentifier;
+declare function isArgumentPlaceholder(node: object | null | undefined, opts?: object | null): node is ArgumentPlaceholder;
+declare function isBindExpression(node: object | null | undefined, opts?: object | null): node is BindExpression;
+declare function isImportAttribute(node: object | null | undefined, opts?: object | null): node is ImportAttribute;
+declare function isDecorator(node: object | null | undefined, opts?: object | null): node is Decorator;
+declare function isDoExpression(node: object | null | undefined, opts?: object | null): node is DoExpression;
+declare function isExportDefaultSpecifier(node: object | null | undefined, opts?: object | null): node is ExportDefaultSpecifier;
+declare function isRecordExpression(node: object | null | undefined, opts?: object | null): node is RecordExpression;
+declare function isTupleExpression(node: object | null | undefined, opts?: object | null): node is TupleExpression;
+declare function isDecimalLiteral(node: object | null | undefined, opts?: object | null): node is DecimalLiteral;
+declare function isModuleExpression(node: object | null | undefined, opts?: object | null): node is ModuleExpression;
+declare function isTopicReference(node: object | null | undefined, opts?: object | null): node is TopicReference;
+declare function isPipelineTopicExpression(node: object | null | undefined, opts?: object | null): node is PipelineTopicExpression;
+declare function isPipelineBareFunction(node: object | null | undefined, opts?: object | null): node is PipelineBareFunction;
+declare function isPipelinePrimaryTopicReference(node: object | null | undefined, opts?: object | null): node is PipelinePrimaryTopicReference;
+declare function isTSParameterProperty(node: object | null | undefined, opts?: object | null): node is TSParameterProperty;
+declare function isTSDeclareFunction(node: object | null | undefined, opts?: object | null): node is TSDeclareFunction;
+declare function isTSDeclareMethod(node: object | null | undefined, opts?: object | null): node is TSDeclareMethod;
+declare function isTSQualifiedName(node: object | null | undefined, opts?: object | null): node is TSQualifiedName;
+declare function isTSCallSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSCallSignatureDeclaration;
+declare function isTSConstructSignatureDeclaration(node: object | null | undefined, opts?: object | null): node is TSConstructSignatureDeclaration;
+declare function isTSPropertySignature(node: object | null | undefined, opts?: object | null): node is TSPropertySignature;
+declare function isTSMethodSignature(node: object | null | undefined, opts?: object | null): node is TSMethodSignature;
+declare function isTSIndexSignature(node: object | null | undefined, opts?: object | null): node is TSIndexSignature;
+declare function isTSAnyKeyword(node: object | null | undefined, opts?: object | null): node is TSAnyKeyword;
+declare function isTSBooleanKeyword(node: object | null | undefined, opts?: object | null): node is TSBooleanKeyword;
+declare function isTSBigIntKeyword(node: object | null | undefined, opts?: object | null): node is TSBigIntKeyword;
+declare function isTSIntrinsicKeyword(node: object | null | undefined, opts?: object | null): node is TSIntrinsicKeyword;
+declare function isTSNeverKeyword(node: object | null | undefined, opts?: object | null): node is TSNeverKeyword;
+declare function isTSNullKeyword(node: object | null | undefined, opts?: object | null): node is TSNullKeyword;
+declare function isTSNumberKeyword(node: object | null | undefined, opts?: object | null): node is TSNumberKeyword;
+declare function isTSObjectKeyword(node: object | null | undefined, opts?: object | null): node is TSObjectKeyword;
+declare function isTSStringKeyword(node: object | null | undefined, opts?: object | null): node is TSStringKeyword;
+declare function isTSSymbolKeyword(node: object | null | undefined, opts?: object | null): node is TSSymbolKeyword;
+declare function isTSUndefinedKeyword(node: object | null | undefined, opts?: object | null): node is TSUndefinedKeyword;
+declare function isTSUnknownKeyword(node: object | null | undefined, opts?: object | null): node is TSUnknownKeyword;
+declare function isTSVoidKeyword(node: object | null | undefined, opts?: object | null): node is TSVoidKeyword;
+declare function isTSThisType(node: object | null | undefined, opts?: object | null): node is TSThisType;
+declare function isTSFunctionType(node: object | null | undefined, opts?: object | null): node is TSFunctionType;
+declare function isTSConstructorType(node: object | null | undefined, opts?: object | null): node is TSConstructorType;
+declare function isTSTypeReference(node: object | null | undefined, opts?: object | null): node is TSTypeReference;
+declare function isTSTypePredicate(node: object | null | undefined, opts?: object | null): node is TSTypePredicate;
+declare function isTSTypeQuery(node: object | null | undefined, opts?: object | null): node is TSTypeQuery;
+declare function isTSTypeLiteral(node: object | null | undefined, opts?: object | null): node is TSTypeLiteral;
+declare function isTSArrayType(node: object | null | undefined, opts?: object | null): node is TSArrayType;
+declare function isTSTupleType(node: object | null | undefined, opts?: object | null): node is TSTupleType;
+declare function isTSOptionalType(node: object | null | undefined, opts?: object | null): node is TSOptionalType;
+declare function isTSRestType(node: object | null | undefined, opts?: object | null): node is TSRestType;
+declare function isTSNamedTupleMember(node: object | null | undefined, opts?: object | null): node is TSNamedTupleMember;
+declare function isTSUnionType(node: object | null | undefined, opts?: object | null): node is TSUnionType;
+declare function isTSIntersectionType(node: object | null | undefined, opts?: object | null): node is TSIntersectionType;
+declare function isTSConditionalType(node: object | null | undefined, opts?: object | null): node is TSConditionalType;
+declare function isTSInferType(node: object | null | undefined, opts?: object | null): node is TSInferType;
+declare function isTSParenthesizedType(node: object | null | undefined, opts?: object | null): node is TSParenthesizedType;
+declare function isTSTypeOperator(node: object | null | undefined, opts?: object | null): node is TSTypeOperator;
+declare function isTSIndexedAccessType(node: object | null | undefined, opts?: object | null): node is TSIndexedAccessType;
+declare function isTSMappedType(node: object | null | undefined, opts?: object | null): node is TSMappedType;
+declare function isTSLiteralType(node: object | null | undefined, opts?: object | null): node is TSLiteralType;
+declare function isTSExpressionWithTypeArguments(node: object | null | undefined, opts?: object | null): node is TSExpressionWithTypeArguments;
+declare function isTSInterfaceDeclaration(node: object | null | undefined, opts?: object | null): node is TSInterfaceDeclaration;
+declare function isTSInterfaceBody(node: object | null | undefined, opts?: object | null): node is TSInterfaceBody;
+declare function isTSTypeAliasDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeAliasDeclaration;
+declare function isTSAsExpression(node: object | null | undefined, opts?: object | null): node is TSAsExpression;
+declare function isTSTypeAssertion(node: object | null | undefined, opts?: object | null): node is TSTypeAssertion;
+declare function isTSEnumDeclaration(node: object | null | undefined, opts?: object | null): node is TSEnumDeclaration;
+declare function isTSEnumMember(node: object | null | undefined, opts?: object | null): node is TSEnumMember;
+declare function isTSModuleDeclaration(node: object | null | undefined, opts?: object | null): node is TSModuleDeclaration;
+declare function isTSModuleBlock(node: object | null | undefined, opts?: object | null): node is TSModuleBlock;
+declare function isTSImportType(node: object | null | undefined, opts?: object | null): node is TSImportType;
+declare function isTSImportEqualsDeclaration(node: object | null | undefined, opts?: object | null): node is TSImportEqualsDeclaration;
+declare function isTSExternalModuleReference(node: object | null | undefined, opts?: object | null): node is TSExternalModuleReference;
+declare function isTSNonNullExpression(node: object | null | undefined, opts?: object | null): node is TSNonNullExpression;
+declare function isTSExportAssignment(node: object | null | undefined, opts?: object | null): node is TSExportAssignment;
+declare function isTSNamespaceExportDeclaration(node: object | null | undefined, opts?: object | null): node is TSNamespaceExportDeclaration;
+declare function isTSTypeAnnotation(node: object | null | undefined, opts?: object | null): node is TSTypeAnnotation;
+declare function isTSTypeParameterInstantiation(node: object | null | undefined, opts?: object | null): node is TSTypeParameterInstantiation;
+declare function isTSTypeParameterDeclaration(node: object | null | undefined, opts?: object | null): node is TSTypeParameterDeclaration;
+declare function isTSTypeParameter(node: object | null | undefined, opts?: object | null): node is TSTypeParameter;
+declare function isStandardized(node: object | null | undefined, opts?: object | null): node is Standardized;
+declare function isExpression(node: object | null | undefined, opts?: object | null): node is Expression;
+declare function isBinary(node: object | null | undefined, opts?: object | null): node is Binary;
+declare function isScopable(node: object | null | undefined, opts?: object | null): node is Scopable;
+declare function isBlockParent(node: object | null | undefined, opts?: object | null): node is BlockParent;
+declare function isBlock(node: object | null | undefined, opts?: object | null): node is Block;
+declare function isStatement(node: object | null | undefined, opts?: object | null): node is Statement;
+declare function isTerminatorless(node: object | null | undefined, opts?: object | null): node is Terminatorless;
+declare function isCompletionStatement(node: object | null | undefined, opts?: object | null): node is CompletionStatement;
+declare function isConditional(node: object | null | undefined, opts?: object | null): node is Conditional;
+declare function isLoop(node: object | null | undefined, opts?: object | null): node is Loop;
+declare function isWhile(node: object | null | undefined, opts?: object | null): node is While;
+declare function isExpressionWrapper(node: object | null | undefined, opts?: object | null): node is ExpressionWrapper;
+declare function isFor(node: object | null | undefined, opts?: object | null): node is For;
+declare function isForXStatement(node: object | null | undefined, opts?: object | null): node is ForXStatement;
+declare function isFunction(node: object | null | undefined, opts?: object | null): node is Function;
+declare function isFunctionParent(node: object | null | undefined, opts?: object | null): node is FunctionParent;
+declare function isPureish(node: object | null | undefined, opts?: object | null): node is Pureish;
+declare function isDeclaration(node: object | null | undefined, opts?: object | null): node is Declaration;
+declare function isPatternLike(node: object | null | undefined, opts?: object | null): node is PatternLike;
+declare function isLVal(node: object | null | undefined, opts?: object | null): node is LVal;
+declare function isTSEntityName(node: object | null | undefined, opts?: object | null): node is TSEntityName;
+declare function isLiteral(node: object | null | undefined, opts?: object | null): node is Literal;
+declare function isUserWhitespacable(node: object | null | undefined, opts?: object | null): node is UserWhitespacable;
+declare function isMethod(node: object | null | undefined, opts?: object | null): node is Method;
+declare function isObjectMember(node: object | null | undefined, opts?: object | null): node is ObjectMember;
+declare function isProperty(node: object | null | undefined, opts?: object | null): node is Property;
+declare function isUnaryLike(node: object | null | undefined, opts?: object | null): node is UnaryLike;
+declare function isPattern(node: object | null | undefined, opts?: object | null): node is Pattern;
+declare function isClass(node: object | null | undefined, opts?: object | null): node is Class;
+declare function isModuleDeclaration(node: object | null | undefined, opts?: object | null): node is ModuleDeclaration;
+declare function isExportDeclaration(node: object | null | undefined, opts?: object | null): node is ExportDeclaration;
+declare function isModuleSpecifier(node: object | null | undefined, opts?: object | null): node is ModuleSpecifier;
+declare function isAccessor(node: object | null | undefined, opts?: object | null): node is Accessor;
+declare function isPrivate(node: object | null | undefined, opts?: object | null): node is Private;
+declare function isFlow(node: object | null | undefined, opts?: object | null): node is Flow;
+declare function isFlowType(node: object | null | undefined, opts?: object | null): node is FlowType;
+declare function isFlowBaseAnnotation(node: object | null | undefined, opts?: object | null): node is FlowBaseAnnotation;
+declare function isFlowDeclaration(node: object | null | undefined, opts?: object | null): node is FlowDeclaration;
+declare function isFlowPredicate(node: object | null | undefined, opts?: object | null): node is FlowPredicate;
+declare function isEnumBody(node: object | null | undefined, opts?: object | null): node is EnumBody;
+declare function isEnumMember(node: object | null | undefined, opts?: object | null): node is EnumMember;
+declare function isJSX(node: object | null | undefined, opts?: object | null): node is JSX;
+declare function isMiscellaneous(node: object | null | undefined, opts?: object | null): node is Miscellaneous;
+declare function isTypeScript(node: object | null | undefined, opts?: object | null): node is TypeScript;
+declare function isTSTypeElement(node: object | null | undefined, opts?: object | null): node is TSTypeElement;
+declare function isTSType(node: object | null | undefined, opts?: object | null): node is TSType;
+declare function isTSBaseType(node: object | null | undefined, opts?: object | null): node is TSBaseType;
+declare function isNumberLiteral(node: object | null | undefined, opts?: object | null): boolean;
+declare function isRegexLiteral(node: object | null | undefined, opts?: object | null): boolean;
+declare function isRestProperty(node: object | null | undefined, opts?: object | null): boolean;
+declare function isSpreadProperty(node: object | null | undefined, opts?: object | null): boolean;
+
+declare const react: {
+ isReactComponent: (member: Node) => boolean;
+ isCompatTag: typeof isCompatTag;
+ buildChildren: typeof buildChildren;
+};
+
+export { ACCESSOR_TYPES, ALIAS_KEYS, ASSIGNMENT_OPERATORS, Accessor, Aliases, AnyTypeAnnotation, ArgumentPlaceholder, ArrayExpression, ArrayPattern, ArrayTypeAnnotation, ArrowFunctionExpression, AssignmentExpression, AssignmentPattern, AwaitExpression, BINARY_OPERATORS, BINARY_TYPES, BLOCKPARENT_TYPES, BLOCK_SCOPED_SYMBOL, BLOCK_TYPES, BOOLEAN_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS, BOOLEAN_UNARY_OPERATORS, BUILDER_KEYS, BigIntLiteral, Binary, BinaryExpression, BindExpression, Block, BlockParent, BlockStatement, BooleanLiteral, BooleanLiteralTypeAnnotation, BooleanTypeAnnotation, BreakStatement, CLASS_TYPES, COMMENT_KEYS, COMPARISON_BINARY_OPERATORS, COMPLETIONSTATEMENT_TYPES, CONDITIONAL_TYPES, CallExpression, CatchClause, Class, ClassAccessorProperty, ClassBody, ClassDeclaration, ClassExpression, ClassImplements, ClassMethod, ClassPrivateMethod, ClassPrivateProperty, ClassProperty, Comment, CommentBlock, CommentLine, CommentTypeShorthand, CompletionStatement, Conditional, ConditionalExpression, ContinueStatement, DECLARATION_TYPES, DEPRECATED_KEYS, DebuggerStatement, DecimalLiteral, Declaration, DeclareClass, DeclareExportAllDeclaration, DeclareExportDeclaration, DeclareFunction, DeclareInterface, DeclareModule, DeclareModuleExports, DeclareOpaqueType, DeclareTypeAlias, DeclareVariable, DeclaredPredicate, Decorator, DeprecatedAliases, Directive, DirectiveLiteral, DoExpression, DoWhileStatement, ENUMBODY_TYPES, ENUMMEMBER_TYPES, EQUALITY_BINARY_OPERATORS, EXPORTDECLARATION_TYPES, EXPRESSIONWRAPPER_TYPES, EXPRESSION_TYPES, EmptyStatement, EmptyTypeAnnotation, EnumBody, EnumBooleanBody, EnumBooleanMember, EnumDeclaration, EnumDefaultedMember, EnumMember, EnumNumberBody, EnumNumberMember, EnumStringBody, EnumStringMember, EnumSymbolBody, ExistsTypeAnnotation, ExportAllDeclaration, ExportDeclaration, ExportDefaultDeclaration, ExportDefaultSpecifier, ExportNamedDeclaration, ExportNamespaceSpecifier, ExportSpecifier, Expression, ExpressionStatement, ExpressionWrapper, FLATTENABLE_KEYS, FLIPPED_ALIAS_KEYS, FLOWBASEANNOTATION_TYPES, FLOWDECLARATION_TYPES, FLOWPREDICATE_TYPES, FLOWTYPE_TYPES, FLOW_TYPES, FORXSTATEMENT_TYPES, FOR_INIT_KEYS, FOR_TYPES, FUNCTIONPARENT_TYPES, FUNCTION_TYPES, File, Flow, FlowBaseAnnotation, FlowDeclaration, FlowPredicate, FlowType, For, ForInStatement, ForOfStatement, ForStatement, ForXStatement, Function, FunctionDeclaration, FunctionExpression, FunctionParent, FunctionTypeAnnotation, FunctionTypeParam, GenericTypeAnnotation, IMMUTABLE_TYPES, INHERIT_KEYS, Identifier, IfStatement, Immutable, Import, ImportAttribute, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, IndexedAccessType, InferredPredicate, InterfaceDeclaration, InterfaceExtends, InterfaceTypeAnnotation, InterpreterDirective, IntersectionTypeAnnotation, JSX, JSXAttribute, JSXClosingElement, JSXClosingFragment, JSXElement, JSXEmptyExpression, JSXExpressionContainer, JSXFragment, JSXIdentifier, JSXMemberExpression, JSXNamespacedName, JSXOpeningElement, JSXOpeningFragment, JSXSpreadAttribute, JSXSpreadChild, JSXText, JSX_TYPES, LITERAL_TYPES, LOGICAL_OPERATORS, LOOP_TYPES, LVAL_TYPES, LVal, LabeledStatement, Literal, LogicalExpression, Loop, METHOD_TYPES, MISCELLANEOUS_TYPES, MODULEDECLARATION_TYPES, MODULESPECIFIER_TYPES, MemberExpression, MetaProperty, Method, Miscellaneous, MixedTypeAnnotation, ModuleDeclaration, ModuleExpression, ModuleSpecifier, NODE_FIELDS, NODE_PARENT_VALIDATIONS, NOT_LOCAL_BINDING, NUMBER_BINARY_OPERATORS, NUMBER_UNARY_OPERATORS, NewExpression, Node, Noop, NullLiteral, NullLiteralTypeAnnotation, NullableTypeAnnotation, NumberLiteral$1 as NumberLiteral, NumberLiteralTypeAnnotation, NumberTypeAnnotation, NumericLiteral, OBJECTMEMBER_TYPES, ObjectExpression, ObjectMember, ObjectMethod, ObjectPattern, ObjectProperty, ObjectTypeAnnotation, ObjectTypeCallProperty, ObjectTypeIndexer, ObjectTypeInternalSlot, ObjectTypeProperty, ObjectTypeSpreadProperty, OpaqueType, OptionalCallExpression, OptionalIndexedAccessType, OptionalMemberExpression, PATTERNLIKE_TYPES, PATTERN_TYPES, PLACEHOLDERS, PLACEHOLDERS_ALIAS, PLACEHOLDERS_FLIPPED_ALIAS, PRIVATE_TYPES, PROPERTY_TYPES, PUREISH_TYPES, ParenthesizedExpression, Pattern, PatternLike, PipelineBareFunction, PipelinePrimaryTopicReference, PipelineTopicExpression, Placeholder, Private, PrivateName, Program, Property, Pureish, QualifiedTypeIdentifier, RecordExpression, RegExpLiteral, RegexLiteral$1 as RegexLiteral, RestElement, RestProperty$1 as RestProperty, ReturnStatement, SCOPABLE_TYPES, STANDARDIZED_TYPES, STATEMENT_OR_BLOCK_KEYS, STATEMENT_TYPES, STRING_UNARY_OPERATORS, Scopable, SequenceExpression, SourceLocation, SpreadElement, SpreadProperty$1 as SpreadProperty, Standardized, Statement, StaticBlock, StringLiteral, StringLiteralTypeAnnotation, StringTypeAnnotation, Super, SwitchCase, SwitchStatement, SymbolTypeAnnotation, TERMINATORLESS_TYPES, TSAnyKeyword, TSArrayType, TSAsExpression, TSBASETYPE_TYPES, TSBaseType, TSBigIntKeyword, TSBooleanKeyword, TSCallSignatureDeclaration, TSConditionalType, TSConstructSignatureDeclaration, TSConstructorType, TSDeclareFunction, TSDeclareMethod, TSENTITYNAME_TYPES, TSEntityName, TSEnumDeclaration, TSEnumMember, TSExportAssignment, TSExpressionWithTypeArguments, TSExternalModuleReference, TSFunctionType, TSImportEqualsDeclaration, TSImportType, TSIndexSignature, TSIndexedAccessType, TSInferType, TSInterfaceBody, TSInterfaceDeclaration, TSIntersectionType, TSIntrinsicKeyword, TSLiteralType, TSMappedType, TSMethodSignature, TSModuleBlock, TSModuleDeclaration, TSNamedTupleMember, TSNamespaceExportDeclaration, TSNeverKeyword, TSNonNullExpression, TSNullKeyword, TSNumberKeyword, TSObjectKeyword, TSOptionalType, TSParameterProperty, TSParenthesizedType, TSPropertySignature, TSQualifiedName, TSRestType, TSStringKeyword, TSSymbolKeyword, TSTYPEELEMENT_TYPES, TSTYPE_TYPES, TSThisType, TSTupleType, TSType, TSTypeAliasDeclaration, TSTypeAnnotation, TSTypeAssertion, TSTypeElement, TSTypeLiteral, TSTypeOperator, TSTypeParameter, TSTypeParameterDeclaration, TSTypeParameterInstantiation, TSTypePredicate, TSTypeQuery, TSTypeReference, TSUndefinedKeyword, TSUnionType, TSUnknownKeyword, TSVoidKeyword, TYPES, TYPESCRIPT_TYPES, TaggedTemplateExpression, TemplateElement, TemplateLiteral, Terminatorless, ThisExpression, ThisTypeAnnotation, ThrowStatement, TopicReference, TraversalAncestors, TraversalHandler, TraversalHandlers, TryStatement, TupleExpression, TupleTypeAnnotation, TypeAlias, TypeAnnotation, TypeCastExpression, TypeParameter, TypeParameterDeclaration, TypeParameterInstantiation, TypeScript, TypeofTypeAnnotation, UNARYLIKE_TYPES, UNARY_OPERATORS, UPDATE_OPERATORS, USERWHITESPACABLE_TYPES, UnaryExpression, UnaryLike, UnionTypeAnnotation, UpdateExpression, UserWhitespacable, V8IntrinsicIdentifier, VISITOR_KEYS, VariableDeclaration, VariableDeclarator, Variance, VoidTypeAnnotation, WHILE_TYPES, While, WhileStatement, WithStatement, YieldExpression, addComment, addComments, anyTypeAnnotation, appendToMemberExpression, argumentPlaceholder, arrayExpression, arrayPattern, arrayTypeAnnotation, arrowFunctionExpression, assertAccessor, assertAnyTypeAnnotation, assertArgumentPlaceholder, assertArrayExpression, assertArrayPattern, assertArrayTypeAnnotation, assertArrowFunctionExpression, assertAssignmentExpression, assertAssignmentPattern, assertAwaitExpression, assertBigIntLiteral, assertBinary, assertBinaryExpression, assertBindExpression, assertBlock, assertBlockParent, assertBlockStatement, assertBooleanLiteral, assertBooleanLiteralTypeAnnotation, assertBooleanTypeAnnotation, assertBreakStatement, assertCallExpression, assertCatchClause, assertClass, assertClassAccessorProperty, assertClassBody, assertClassDeclaration, assertClassExpression, assertClassImplements, assertClassMethod, assertClassPrivateMethod, assertClassPrivateProperty, assertClassProperty, assertCompletionStatement, assertConditional, assertConditionalExpression, assertContinueStatement, assertDebuggerStatement, assertDecimalLiteral, assertDeclaration, assertDeclareClass, assertDeclareExportAllDeclaration, assertDeclareExportDeclaration, assertDeclareFunction, assertDeclareInterface, assertDeclareModule, assertDeclareModuleExports, assertDeclareOpaqueType, assertDeclareTypeAlias, assertDeclareVariable, assertDeclaredPredicate, assertDecorator, assertDirective, assertDirectiveLiteral, assertDoExpression, assertDoWhileStatement, assertEmptyStatement, assertEmptyTypeAnnotation, assertEnumBody, assertEnumBooleanBody, assertEnumBooleanMember, assertEnumDeclaration, assertEnumDefaultedMember, assertEnumMember, assertEnumNumberBody, assertEnumNumberMember, assertEnumStringBody, assertEnumStringMember, assertEnumSymbolBody, assertExistsTypeAnnotation, assertExportAllDeclaration, assertExportDeclaration, assertExportDefaultDeclaration, assertExportDefaultSpecifier, assertExportNamedDeclaration, assertExportNamespaceSpecifier, assertExportSpecifier, assertExpression, assertExpressionStatement, assertExpressionWrapper, assertFile, assertFlow, assertFlowBaseAnnotation, assertFlowDeclaration, assertFlowPredicate, assertFlowType, assertFor, assertForInStatement, assertForOfStatement, assertForStatement, assertForXStatement, assertFunction, assertFunctionDeclaration, assertFunctionExpression, assertFunctionParent, assertFunctionTypeAnnotation, assertFunctionTypeParam, assertGenericTypeAnnotation, assertIdentifier, assertIfStatement, assertImmutable, assertImport, assertImportAttribute, assertImportDeclaration, assertImportDefaultSpecifier, assertImportNamespaceSpecifier, assertImportSpecifier, assertIndexedAccessType, assertInferredPredicate, assertInterfaceDeclaration, assertInterfaceExtends, assertInterfaceTypeAnnotation, assertInterpreterDirective, assertIntersectionTypeAnnotation, assertJSX, assertJSXAttribute, assertJSXClosingElement, assertJSXClosingFragment, assertJSXElement, assertJSXEmptyExpression, assertJSXExpressionContainer, assertJSXFragment, assertJSXIdentifier, assertJSXMemberExpression, assertJSXNamespacedName, assertJSXOpeningElement, assertJSXOpeningFragment, assertJSXSpreadAttribute, assertJSXSpreadChild, assertJSXText, assertLVal, assertLabeledStatement, assertLiteral, assertLogicalExpression, assertLoop, assertMemberExpression, assertMetaProperty, assertMethod, assertMiscellaneous, assertMixedTypeAnnotation, assertModuleDeclaration, assertModuleExpression, assertModuleSpecifier, assertNewExpression, assertNode, assertNoop, assertNullLiteral, assertNullLiteralTypeAnnotation, assertNullableTypeAnnotation, assertNumberLiteral, assertNumberLiteralTypeAnnotation, assertNumberTypeAnnotation, assertNumericLiteral, assertObjectExpression, assertObjectMember, assertObjectMethod, assertObjectPattern, assertObjectProperty, assertObjectTypeAnnotation, assertObjectTypeCallProperty, assertObjectTypeIndexer, assertObjectTypeInternalSlot, assertObjectTypeProperty, assertObjectTypeSpreadProperty, assertOpaqueType, assertOptionalCallExpression, assertOptionalIndexedAccessType, assertOptionalMemberExpression, assertParenthesizedExpression, assertPattern, assertPatternLike, assertPipelineBareFunction, assertPipelinePrimaryTopicReference, assertPipelineTopicExpression, assertPlaceholder, assertPrivate, assertPrivateName, assertProgram, assertProperty, assertPureish, assertQualifiedTypeIdentifier, assertRecordExpression, assertRegExpLiteral, assertRegexLiteral, assertRestElement, assertRestProperty, assertReturnStatement, assertScopable, assertSequenceExpression, assertSpreadElement, assertSpreadProperty, assertStandardized, assertStatement, assertStaticBlock, assertStringLiteral, assertStringLiteralTypeAnnotation, assertStringTypeAnnotation, assertSuper, assertSwitchCase, assertSwitchStatement, assertSymbolTypeAnnotation, assertTSAnyKeyword, assertTSArrayType, assertTSAsExpression, assertTSBaseType, assertTSBigIntKeyword, assertTSBooleanKeyword, assertTSCallSignatureDeclaration, assertTSConditionalType, assertTSConstructSignatureDeclaration, assertTSConstructorType, assertTSDeclareFunction, assertTSDeclareMethod, assertTSEntityName, assertTSEnumDeclaration, assertTSEnumMember, assertTSExportAssignment, assertTSExpressionWithTypeArguments, assertTSExternalModuleReference, assertTSFunctionType, assertTSImportEqualsDeclaration, assertTSImportType, assertTSIndexSignature, assertTSIndexedAccessType, assertTSInferType, assertTSInterfaceBody, assertTSInterfaceDeclaration, assertTSIntersectionType, assertTSIntrinsicKeyword, assertTSLiteralType, assertTSMappedType, assertTSMethodSignature, assertTSModuleBlock, assertTSModuleDeclaration, assertTSNamedTupleMember, assertTSNamespaceExportDeclaration, assertTSNeverKeyword, assertTSNonNullExpression, assertTSNullKeyword, assertTSNumberKeyword, assertTSObjectKeyword, assertTSOptionalType, assertTSParameterProperty, assertTSParenthesizedType, assertTSPropertySignature, assertTSQualifiedName, assertTSRestType, assertTSStringKeyword, assertTSSymbolKeyword, assertTSThisType, assertTSTupleType, assertTSType, assertTSTypeAliasDeclaration, assertTSTypeAnnotation, assertTSTypeAssertion, assertTSTypeElement, assertTSTypeLiteral, assertTSTypeOperator, assertTSTypeParameter, assertTSTypeParameterDeclaration, assertTSTypeParameterInstantiation, assertTSTypePredicate, assertTSTypeQuery, assertTSTypeReference, assertTSUndefinedKeyword, assertTSUnionType, assertTSUnknownKeyword, assertTSVoidKeyword, assertTaggedTemplateExpression, assertTemplateElement, assertTemplateLiteral, assertTerminatorless, assertThisExpression, assertThisTypeAnnotation, assertThrowStatement, assertTopicReference, assertTryStatement, assertTupleExpression, assertTupleTypeAnnotation, assertTypeAlias, assertTypeAnnotation, assertTypeCastExpression, assertTypeParameter, assertTypeParameterDeclaration, assertTypeParameterInstantiation, assertTypeScript, assertTypeofTypeAnnotation, assertUnaryExpression, assertUnaryLike, assertUnionTypeAnnotation, assertUpdateExpression, assertUserWhitespacable, assertV8IntrinsicIdentifier, assertVariableDeclaration, assertVariableDeclarator, assertVariance, assertVoidTypeAnnotation, assertWhile, assertWhileStatement, assertWithStatement, assertYieldExpression, assignmentExpression, assignmentPattern, awaitExpression, bigIntLiteral, binaryExpression, bindExpression, blockStatement, booleanLiteral, booleanLiteralTypeAnnotation, booleanTypeAnnotation, breakStatement, buildMatchMemberExpression, callExpression, catchClause, classAccessorProperty, classBody, classDeclaration, classExpression, classImplements, classMethod, classPrivateMethod, classPrivateProperty, classProperty, clone, cloneDeep, cloneDeepWithoutLoc, cloneNode, cloneWithoutLoc, conditionalExpression, continueStatement, createFlowUnionType, createTSUnionType, _default$4 as createTypeAnnotationBasedOnTypeof, createFlowUnionType as createUnionTypeAnnotation, debuggerStatement, decimalLiteral, declareClass, declareExportAllDeclaration, declareExportDeclaration, declareFunction, declareInterface, declareModule, declareModuleExports, declareOpaqueType, declareTypeAlias, declareVariable, declaredPredicate, decorator, directive, directiveLiteral, doExpression, doWhileStatement, emptyStatement, emptyTypeAnnotation, ensureBlock, enumBooleanBody, enumBooleanMember, enumDeclaration, enumDefaultedMember, enumNumberBody, enumNumberMember, enumStringBody, enumStringMember, enumSymbolBody, existsTypeAnnotation, exportAllDeclaration, exportDefaultDeclaration, exportDefaultSpecifier, exportNamedDeclaration, exportNamespaceSpecifier, exportSpecifier, expressionStatement, file, forInStatement, forOfStatement, forStatement, functionDeclaration, functionExpression, functionTypeAnnotation, functionTypeParam, genericTypeAnnotation, getBindingIdentifiers, _default as getOuterBindingIdentifiers, identifier, ifStatement, _import as import, importAttribute, importDeclaration, importDefaultSpecifier, importNamespaceSpecifier, importSpecifier, indexedAccessType, inferredPredicate, inheritInnerComments, inheritLeadingComments, inheritTrailingComments, inherits, inheritsComments, interfaceDeclaration, interfaceExtends, interfaceTypeAnnotation, interpreterDirective, intersectionTypeAnnotation, is, isAccessor, isAnyTypeAnnotation, isArgumentPlaceholder, isArrayExpression, isArrayPattern, isArrayTypeAnnotation, isArrowFunctionExpression, isAssignmentExpression, isAssignmentPattern, isAwaitExpression, isBigIntLiteral, isBinary, isBinaryExpression, isBindExpression, isBinding, isBlock, isBlockParent, isBlockScoped, isBlockStatement, isBooleanLiteral, isBooleanLiteralTypeAnnotation, isBooleanTypeAnnotation, isBreakStatement, isCallExpression, isCatchClause, isClass, isClassAccessorProperty, isClassBody, isClassDeclaration, isClassExpression, isClassImplements, isClassMethod, isClassPrivateMethod, isClassPrivateProperty, isClassProperty, isCompletionStatement, isConditional, isConditionalExpression, isContinueStatement, isDebuggerStatement, isDecimalLiteral, isDeclaration, isDeclareClass, isDeclareExportAllDeclaration, isDeclareExportDeclaration, isDeclareFunction, isDeclareInterface, isDeclareModule, isDeclareModuleExports, isDeclareOpaqueType, isDeclareTypeAlias, isDeclareVariable, isDeclaredPredicate, isDecorator, isDirective, isDirectiveLiteral, isDoExpression, isDoWhileStatement, isEmptyStatement, isEmptyTypeAnnotation, isEnumBody, isEnumBooleanBody, isEnumBooleanMember, isEnumDeclaration, isEnumDefaultedMember, isEnumMember, isEnumNumberBody, isEnumNumberMember, isEnumStringBody, isEnumStringMember, isEnumSymbolBody, isExistsTypeAnnotation, isExportAllDeclaration, isExportDeclaration, isExportDefaultDeclaration, isExportDefaultSpecifier, isExportNamedDeclaration, isExportNamespaceSpecifier, isExportSpecifier, isExpression, isExpressionStatement, isExpressionWrapper, isFile, isFlow, isFlowBaseAnnotation, isFlowDeclaration, isFlowPredicate, isFlowType, isFor, isForInStatement, isForOfStatement, isForStatement, isForXStatement, isFunction, isFunctionDeclaration, isFunctionExpression, isFunctionParent, isFunctionTypeAnnotation, isFunctionTypeParam, isGenericTypeAnnotation, isIdentifier, isIfStatement, isImmutable, isImport, isImportAttribute, isImportDeclaration, isImportDefaultSpecifier, isImportNamespaceSpecifier, isImportSpecifier, isIndexedAccessType, isInferredPredicate, isInterfaceDeclaration, isInterfaceExtends, isInterfaceTypeAnnotation, isInterpreterDirective, isIntersectionTypeAnnotation, isJSX, isJSXAttribute, isJSXClosingElement, isJSXClosingFragment, isJSXElement, isJSXEmptyExpression, isJSXExpressionContainer, isJSXFragment, isJSXIdentifier, isJSXMemberExpression, isJSXNamespacedName, isJSXOpeningElement, isJSXOpeningFragment, isJSXSpreadAttribute, isJSXSpreadChild, isJSXText, isLVal, isLabeledStatement, isLet, isLiteral, isLogicalExpression, isLoop, isMemberExpression, isMetaProperty, isMethod, isMiscellaneous, isMixedTypeAnnotation, isModuleDeclaration, isModuleExpression, isModuleSpecifier, isNewExpression, isNode, isNodesEquivalent, isNoop, isNullLiteral, isNullLiteralTypeAnnotation, isNullableTypeAnnotation, isNumberLiteral, isNumberLiteralTypeAnnotation, isNumberTypeAnnotation, isNumericLiteral, isObjectExpression, isObjectMember, isObjectMethod, isObjectPattern, isObjectProperty, isObjectTypeAnnotation, isObjectTypeCallProperty, isObjectTypeIndexer, isObjectTypeInternalSlot, isObjectTypeProperty, isObjectTypeSpreadProperty, isOpaqueType, isOptionalCallExpression, isOptionalIndexedAccessType, isOptionalMemberExpression, isParenthesizedExpression, isPattern, isPatternLike, isPipelineBareFunction, isPipelinePrimaryTopicReference, isPipelineTopicExpression, isPlaceholder, isPlaceholderType, isPrivate, isPrivateName, isProgram, isProperty, isPureish, isQualifiedTypeIdentifier, isRecordExpression, isReferenced, isRegExpLiteral, isRegexLiteral, isRestElement, isRestProperty, isReturnStatement, isScopable, isScope, isSequenceExpression, isSpecifierDefault, isSpreadElement, isSpreadProperty, isStandardized, isStatement, isStaticBlock, isStringLiteral, isStringLiteralTypeAnnotation, isStringTypeAnnotation, isSuper, isSwitchCase, isSwitchStatement, isSymbolTypeAnnotation, isTSAnyKeyword, isTSArrayType, isTSAsExpression, isTSBaseType, isTSBigIntKeyword, isTSBooleanKeyword, isTSCallSignatureDeclaration, isTSConditionalType, isTSConstructSignatureDeclaration, isTSConstructorType, isTSDeclareFunction, isTSDeclareMethod, isTSEntityName, isTSEnumDeclaration, isTSEnumMember, isTSExportAssignment, isTSExpressionWithTypeArguments, isTSExternalModuleReference, isTSFunctionType, isTSImportEqualsDeclaration, isTSImportType, isTSIndexSignature, isTSIndexedAccessType, isTSInferType, isTSInterfaceBody, isTSInterfaceDeclaration, isTSIntersectionType, isTSIntrinsicKeyword, isTSLiteralType, isTSMappedType, isTSMethodSignature, isTSModuleBlock, isTSModuleDeclaration, isTSNamedTupleMember, isTSNamespaceExportDeclaration, isTSNeverKeyword, isTSNonNullExpression, isTSNullKeyword, isTSNumberKeyword, isTSObjectKeyword, isTSOptionalType, isTSParameterProperty, isTSParenthesizedType, isTSPropertySignature, isTSQualifiedName, isTSRestType, isTSStringKeyword, isTSSymbolKeyword, isTSThisType, isTSTupleType, isTSType, isTSTypeAliasDeclaration, isTSTypeAnnotation, isTSTypeAssertion, isTSTypeElement, isTSTypeLiteral, isTSTypeOperator, isTSTypeParameter, isTSTypeParameterDeclaration, isTSTypeParameterInstantiation, isTSTypePredicate, isTSTypeQuery, isTSTypeReference, isTSUndefinedKeyword, isTSUnionType, isTSUnknownKeyword, isTSVoidKeyword, isTaggedTemplateExpression, isTemplateElement, isTemplateLiteral, isTerminatorless, isThisExpression, isThisTypeAnnotation, isThrowStatement, isTopicReference, isTryStatement, isTupleExpression, isTupleTypeAnnotation, isType, isTypeAlias, isTypeAnnotation, isTypeCastExpression, isTypeParameter, isTypeParameterDeclaration, isTypeParameterInstantiation, isTypeScript, isTypeofTypeAnnotation, isUnaryExpression, isUnaryLike, isUnionTypeAnnotation, isUpdateExpression, isUserWhitespacable, isV8IntrinsicIdentifier, isValidES3Identifier, isValidIdentifier, isVar, isVariableDeclaration, isVariableDeclarator, isVariance, isVoidTypeAnnotation, isWhile, isWhileStatement, isWithStatement, isYieldExpression, jsxAttribute as jSXAttribute, jsxClosingElement as jSXClosingElement, jsxClosingFragment as jSXClosingFragment, jsxElement as jSXElement, jsxEmptyExpression as jSXEmptyExpression, jsxExpressionContainer as jSXExpressionContainer, jsxFragment as jSXFragment, jsxIdentifier as jSXIdentifier, jsxMemberExpression as jSXMemberExpression, jsxNamespacedName as jSXNamespacedName, jsxOpeningElement as jSXOpeningElement, jsxOpeningFragment as jSXOpeningFragment, jsxSpreadAttribute as jSXSpreadAttribute, jsxSpreadChild as jSXSpreadChild, jsxText as jSXText, jsxAttribute, jsxClosingElement, jsxClosingFragment, jsxElement, jsxEmptyExpression, jsxExpressionContainer, jsxFragment, jsxIdentifier, jsxMemberExpression, jsxNamespacedName, jsxOpeningElement, jsxOpeningFragment, jsxSpreadAttribute, jsxSpreadChild, jsxText, labeledStatement, logicalExpression, matchesPattern, memberExpression, metaProperty, mixedTypeAnnotation, moduleExpression, newExpression, noop, nullLiteral, nullLiteralTypeAnnotation, nullableTypeAnnotation, NumberLiteral as numberLiteral, numberLiteralTypeAnnotation, numberTypeAnnotation, numericLiteral, objectExpression, objectMethod, objectPattern, objectProperty, objectTypeAnnotation, objectTypeCallProperty, objectTypeIndexer, objectTypeInternalSlot, objectTypeProperty, objectTypeSpreadProperty, opaqueType, optionalCallExpression, optionalIndexedAccessType, optionalMemberExpression, parenthesizedExpression, pipelineBareFunction, pipelinePrimaryTopicReference, pipelineTopicExpression, placeholder, prependToMemberExpression, privateName, program, qualifiedTypeIdentifier, react, recordExpression, regExpLiteral, RegexLiteral as regexLiteral, removeComments, removeProperties, removePropertiesDeep, removeTypeDuplicates, restElement, RestProperty as restProperty, returnStatement, sequenceExpression, shallowEqual, spreadElement, SpreadProperty as spreadProperty, staticBlock, stringLiteral, stringLiteralTypeAnnotation, stringTypeAnnotation, _super as super, switchCase, switchStatement, symbolTypeAnnotation, tsAnyKeyword as tSAnyKeyword, tsArrayType as tSArrayType, tsAsExpression as tSAsExpression, tsBigIntKeyword as tSBigIntKeyword, tsBooleanKeyword as tSBooleanKeyword, tsCallSignatureDeclaration as tSCallSignatureDeclaration, tsConditionalType as tSConditionalType, tsConstructSignatureDeclaration as tSConstructSignatureDeclaration, tsConstructorType as tSConstructorType, tsDeclareFunction as tSDeclareFunction, tsDeclareMethod as tSDeclareMethod, tsEnumDeclaration as tSEnumDeclaration, tsEnumMember as tSEnumMember, tsExportAssignment as tSExportAssignment, tsExpressionWithTypeArguments as tSExpressionWithTypeArguments, tsExternalModuleReference as tSExternalModuleReference, tsFunctionType as tSFunctionType, tsImportEqualsDeclaration as tSImportEqualsDeclaration, tsImportType as tSImportType, tsIndexSignature as tSIndexSignature, tsIndexedAccessType as tSIndexedAccessType, tsInferType as tSInferType, tsInterfaceBody as tSInterfaceBody, tsInterfaceDeclaration as tSInterfaceDeclaration, tsIntersectionType as tSIntersectionType, tsIntrinsicKeyword as tSIntrinsicKeyword, tsLiteralType as tSLiteralType, tsMappedType as tSMappedType, tsMethodSignature as tSMethodSignature, tsModuleBlock as tSModuleBlock, tsModuleDeclaration as tSModuleDeclaration, tsNamedTupleMember as tSNamedTupleMember, tsNamespaceExportDeclaration as tSNamespaceExportDeclaration, tsNeverKeyword as tSNeverKeyword, tsNonNullExpression as tSNonNullExpression, tsNullKeyword as tSNullKeyword, tsNumberKeyword as tSNumberKeyword, tsObjectKeyword as tSObjectKeyword, tsOptionalType as tSOptionalType, tsParameterProperty as tSParameterProperty, tsParenthesizedType as tSParenthesizedType, tsPropertySignature as tSPropertySignature, tsQualifiedName as tSQualifiedName, tsRestType as tSRestType, tsStringKeyword as tSStringKeyword, tsSymbolKeyword as tSSymbolKeyword, tsThisType as tSThisType, tsTupleType as tSTupleType, tsTypeAliasDeclaration as tSTypeAliasDeclaration, tsTypeAnnotation as tSTypeAnnotation, tsTypeAssertion as tSTypeAssertion, tsTypeLiteral as tSTypeLiteral, tsTypeOperator as tSTypeOperator, tsTypeParameter as tSTypeParameter, tsTypeParameterDeclaration as tSTypeParameterDeclaration, tsTypeParameterInstantiation as tSTypeParameterInstantiation, tsTypePredicate as tSTypePredicate, tsTypeQuery as tSTypeQuery, tsTypeReference as tSTypeReference, tsUndefinedKeyword as tSUndefinedKeyword, tsUnionType as tSUnionType, tsUnknownKeyword as tSUnknownKeyword, tsVoidKeyword as tSVoidKeyword, taggedTemplateExpression, templateElement, templateLiteral, thisExpression, thisTypeAnnotation, throwStatement, toBindingIdentifierName, toBlock, toComputedKey, _default$3 as toExpression, toIdentifier, toKeyAlias, toSequenceExpression, _default$2 as toStatement, topicReference, traverse, traverseFast, tryStatement, tsAnyKeyword, tsArrayType, tsAsExpression, tsBigIntKeyword, tsBooleanKeyword, tsCallSignatureDeclaration, tsConditionalType, tsConstructSignatureDeclaration, tsConstructorType, tsDeclareFunction, tsDeclareMethod, tsEnumDeclaration, tsEnumMember, tsExportAssignment, tsExpressionWithTypeArguments, tsExternalModuleReference, tsFunctionType, tsImportEqualsDeclaration, tsImportType, tsIndexSignature, tsIndexedAccessType, tsInferType, tsInterfaceBody, tsInterfaceDeclaration, tsIntersectionType, tsIntrinsicKeyword, tsLiteralType, tsMappedType, tsMethodSignature, tsModuleBlock, tsModuleDeclaration, tsNamedTupleMember, tsNamespaceExportDeclaration, tsNeverKeyword, tsNonNullExpression, tsNullKeyword, tsNumberKeyword, tsObjectKeyword, tsOptionalType, tsParameterProperty, tsParenthesizedType, tsPropertySignature, tsQualifiedName, tsRestType, tsStringKeyword, tsSymbolKeyword, tsThisType, tsTupleType, tsTypeAliasDeclaration, tsTypeAnnotation, tsTypeAssertion, tsTypeLiteral, tsTypeOperator, tsTypeParameter, tsTypeParameterDeclaration, tsTypeParameterInstantiation, tsTypePredicate, tsTypeQuery, tsTypeReference, tsUndefinedKeyword, tsUnionType, tsUnknownKeyword, tsVoidKeyword, tupleExpression, tupleTypeAnnotation, typeAlias, typeAnnotation, typeCastExpression, typeParameter, typeParameterDeclaration, typeParameterInstantiation, typeofTypeAnnotation, unaryExpression, unionTypeAnnotation, updateExpression, v8IntrinsicIdentifier, validate, _default$1 as valueToNode, variableDeclaration, variableDeclarator, variance, voidTypeAnnotation, whileStatement, withStatement, yieldExpression };
diff --git a/node_modules/@babel/types/lib/index.js b/node_modules/@babel/types/lib/index.js
new file mode 100644
index 0000000..677a331
--- /dev/null
+++ b/node_modules/@babel/types/lib/index.js
@@ -0,0 +1,647 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+var _exportNames = {
+ react: true,
+ assertNode: true,
+ createTypeAnnotationBasedOnTypeof: true,
+ createUnionTypeAnnotation: true,
+ createFlowUnionType: true,
+ createTSUnionType: true,
+ cloneNode: true,
+ clone: true,
+ cloneDeep: true,
+ cloneDeepWithoutLoc: true,
+ cloneWithoutLoc: true,
+ addComment: true,
+ addComments: true,
+ inheritInnerComments: true,
+ inheritLeadingComments: true,
+ inheritsComments: true,
+ inheritTrailingComments: true,
+ removeComments: true,
+ ensureBlock: true,
+ toBindingIdentifierName: true,
+ toBlock: true,
+ toComputedKey: true,
+ toExpression: true,
+ toIdentifier: true,
+ toKeyAlias: true,
+ toSequenceExpression: true,
+ toStatement: true,
+ valueToNode: true,
+ appendToMemberExpression: true,
+ inherits: true,
+ prependToMemberExpression: true,
+ removeProperties: true,
+ removePropertiesDeep: true,
+ removeTypeDuplicates: true,
+ getBindingIdentifiers: true,
+ getOuterBindingIdentifiers: true,
+ traverse: true,
+ traverseFast: true,
+ shallowEqual: true,
+ is: true,
+ isBinding: true,
+ isBlockScoped: true,
+ isImmutable: true,
+ isLet: true,
+ isNode: true,
+ isNodesEquivalent: true,
+ isPlaceholderType: true,
+ isReferenced: true,
+ isScope: true,
+ isSpecifierDefault: true,
+ isType: true,
+ isValidES3Identifier: true,
+ isValidIdentifier: true,
+ isVar: true,
+ matchesPattern: true,
+ validate: true,
+ buildMatchMemberExpression: true
+};
+Object.defineProperty(exports, "addComment", {
+ enumerable: true,
+ get: function () {
+ return _addComment.default;
+ }
+});
+Object.defineProperty(exports, "addComments", {
+ enumerable: true,
+ get: function () {
+ return _addComments.default;
+ }
+});
+Object.defineProperty(exports, "appendToMemberExpression", {
+ enumerable: true,
+ get: function () {
+ return _appendToMemberExpression.default;
+ }
+});
+Object.defineProperty(exports, "assertNode", {
+ enumerable: true,
+ get: function () {
+ return _assertNode.default;
+ }
+});
+Object.defineProperty(exports, "buildMatchMemberExpression", {
+ enumerable: true,
+ get: function () {
+ return _buildMatchMemberExpression.default;
+ }
+});
+Object.defineProperty(exports, "clone", {
+ enumerable: true,
+ get: function () {
+ return _clone.default;
+ }
+});
+Object.defineProperty(exports, "cloneDeep", {
+ enumerable: true,
+ get: function () {
+ return _cloneDeep.default;
+ }
+});
+Object.defineProperty(exports, "cloneDeepWithoutLoc", {
+ enumerable: true,
+ get: function () {
+ return _cloneDeepWithoutLoc.default;
+ }
+});
+Object.defineProperty(exports, "cloneNode", {
+ enumerable: true,
+ get: function () {
+ return _cloneNode.default;
+ }
+});
+Object.defineProperty(exports, "cloneWithoutLoc", {
+ enumerable: true,
+ get: function () {
+ return _cloneWithoutLoc.default;
+ }
+});
+Object.defineProperty(exports, "createFlowUnionType", {
+ enumerable: true,
+ get: function () {
+ return _createFlowUnionType.default;
+ }
+});
+Object.defineProperty(exports, "createTSUnionType", {
+ enumerable: true,
+ get: function () {
+ return _createTSUnionType.default;
+ }
+});
+Object.defineProperty(exports, "createTypeAnnotationBasedOnTypeof", {
+ enumerable: true,
+ get: function () {
+ return _createTypeAnnotationBasedOnTypeof.default;
+ }
+});
+Object.defineProperty(exports, "createUnionTypeAnnotation", {
+ enumerable: true,
+ get: function () {
+ return _createFlowUnionType.default;
+ }
+});
+Object.defineProperty(exports, "ensureBlock", {
+ enumerable: true,
+ get: function () {
+ return _ensureBlock.default;
+ }
+});
+Object.defineProperty(exports, "getBindingIdentifiers", {
+ enumerable: true,
+ get: function () {
+ return _getBindingIdentifiers.default;
+ }
+});
+Object.defineProperty(exports, "getOuterBindingIdentifiers", {
+ enumerable: true,
+ get: function () {
+ return _getOuterBindingIdentifiers.default;
+ }
+});
+Object.defineProperty(exports, "inheritInnerComments", {
+ enumerable: true,
+ get: function () {
+ return _inheritInnerComments.default;
+ }
+});
+Object.defineProperty(exports, "inheritLeadingComments", {
+ enumerable: true,
+ get: function () {
+ return _inheritLeadingComments.default;
+ }
+});
+Object.defineProperty(exports, "inheritTrailingComments", {
+ enumerable: true,
+ get: function () {
+ return _inheritTrailingComments.default;
+ }
+});
+Object.defineProperty(exports, "inherits", {
+ enumerable: true,
+ get: function () {
+ return _inherits.default;
+ }
+});
+Object.defineProperty(exports, "inheritsComments", {
+ enumerable: true,
+ get: function () {
+ return _inheritsComments.default;
+ }
+});
+Object.defineProperty(exports, "is", {
+ enumerable: true,
+ get: function () {
+ return _is.default;
+ }
+});
+Object.defineProperty(exports, "isBinding", {
+ enumerable: true,
+ get: function () {
+ return _isBinding.default;
+ }
+});
+Object.defineProperty(exports, "isBlockScoped", {
+ enumerable: true,
+ get: function () {
+ return _isBlockScoped.default;
+ }
+});
+Object.defineProperty(exports, "isImmutable", {
+ enumerable: true,
+ get: function () {
+ return _isImmutable.default;
+ }
+});
+Object.defineProperty(exports, "isLet", {
+ enumerable: true,
+ get: function () {
+ return _isLet.default;
+ }
+});
+Object.defineProperty(exports, "isNode", {
+ enumerable: true,
+ get: function () {
+ return _isNode.default;
+ }
+});
+Object.defineProperty(exports, "isNodesEquivalent", {
+ enumerable: true,
+ get: function () {
+ return _isNodesEquivalent.default;
+ }
+});
+Object.defineProperty(exports, "isPlaceholderType", {
+ enumerable: true,
+ get: function () {
+ return _isPlaceholderType.default;
+ }
+});
+Object.defineProperty(exports, "isReferenced", {
+ enumerable: true,
+ get: function () {
+ return _isReferenced.default;
+ }
+});
+Object.defineProperty(exports, "isScope", {
+ enumerable: true,
+ get: function () {
+ return _isScope.default;
+ }
+});
+Object.defineProperty(exports, "isSpecifierDefault", {
+ enumerable: true,
+ get: function () {
+ return _isSpecifierDefault.default;
+ }
+});
+Object.defineProperty(exports, "isType", {
+ enumerable: true,
+ get: function () {
+ return _isType.default;
+ }
+});
+Object.defineProperty(exports, "isValidES3Identifier", {
+ enumerable: true,
+ get: function () {
+ return _isValidES3Identifier.default;
+ }
+});
+Object.defineProperty(exports, "isValidIdentifier", {
+ enumerable: true,
+ get: function () {
+ return _isValidIdentifier.default;
+ }
+});
+Object.defineProperty(exports, "isVar", {
+ enumerable: true,
+ get: function () {
+ return _isVar.default;
+ }
+});
+Object.defineProperty(exports, "matchesPattern", {
+ enumerable: true,
+ get: function () {
+ return _matchesPattern.default;
+ }
+});
+Object.defineProperty(exports, "prependToMemberExpression", {
+ enumerable: true,
+ get: function () {
+ return _prependToMemberExpression.default;
+ }
+});
+exports.react = void 0;
+Object.defineProperty(exports, "removeComments", {
+ enumerable: true,
+ get: function () {
+ return _removeComments.default;
+ }
+});
+Object.defineProperty(exports, "removeProperties", {
+ enumerable: true,
+ get: function () {
+ return _removeProperties.default;
+ }
+});
+Object.defineProperty(exports, "removePropertiesDeep", {
+ enumerable: true,
+ get: function () {
+ return _removePropertiesDeep.default;
+ }
+});
+Object.defineProperty(exports, "removeTypeDuplicates", {
+ enumerable: true,
+ get: function () {
+ return _removeTypeDuplicates.default;
+ }
+});
+Object.defineProperty(exports, "shallowEqual", {
+ enumerable: true,
+ get: function () {
+ return _shallowEqual.default;
+ }
+});
+Object.defineProperty(exports, "toBindingIdentifierName", {
+ enumerable: true,
+ get: function () {
+ return _toBindingIdentifierName.default;
+ }
+});
+Object.defineProperty(exports, "toBlock", {
+ enumerable: true,
+ get: function () {
+ return _toBlock.default;
+ }
+});
+Object.defineProperty(exports, "toComputedKey", {
+ enumerable: true,
+ get: function () {
+ return _toComputedKey.default;
+ }
+});
+Object.defineProperty(exports, "toExpression", {
+ enumerable: true,
+ get: function () {
+ return _toExpression.default;
+ }
+});
+Object.defineProperty(exports, "toIdentifier", {
+ enumerable: true,
+ get: function () {
+ return _toIdentifier.default;
+ }
+});
+Object.defineProperty(exports, "toKeyAlias", {
+ enumerable: true,
+ get: function () {
+ return _toKeyAlias.default;
+ }
+});
+Object.defineProperty(exports, "toSequenceExpression", {
+ enumerable: true,
+ get: function () {
+ return _toSequenceExpression.default;
+ }
+});
+Object.defineProperty(exports, "toStatement", {
+ enumerable: true,
+ get: function () {
+ return _toStatement.default;
+ }
+});
+Object.defineProperty(exports, "traverse", {
+ enumerable: true,
+ get: function () {
+ return _traverse.default;
+ }
+});
+Object.defineProperty(exports, "traverseFast", {
+ enumerable: true,
+ get: function () {
+ return _traverseFast.default;
+ }
+});
+Object.defineProperty(exports, "validate", {
+ enumerable: true,
+ get: function () {
+ return _validate.default;
+ }
+});
+Object.defineProperty(exports, "valueToNode", {
+ enumerable: true,
+ get: function () {
+ return _valueToNode.default;
+ }
+});
+
+var _isReactComponent = require("./validators/react/isReactComponent");
+
+var _isCompatTag = require("./validators/react/isCompatTag");
+
+var _buildChildren = require("./builders/react/buildChildren");
+
+var _assertNode = require("./asserts/assertNode");
+
+var _generated = require("./asserts/generated");
+
+Object.keys(_generated).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _generated[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated[key];
+ }
+ });
+});
+
+var _createTypeAnnotationBasedOnTypeof = require("./builders/flow/createTypeAnnotationBasedOnTypeof");
+
+var _createFlowUnionType = require("./builders/flow/createFlowUnionType");
+
+var _createTSUnionType = require("./builders/typescript/createTSUnionType");
+
+var _generated2 = require("./builders/generated");
+
+Object.keys(_generated2).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _generated2[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated2[key];
+ }
+ });
+});
+
+var _uppercase = require("./builders/generated/uppercase");
+
+Object.keys(_uppercase).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _uppercase[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _uppercase[key];
+ }
+ });
+});
+
+var _cloneNode = require("./clone/cloneNode");
+
+var _clone = require("./clone/clone");
+
+var _cloneDeep = require("./clone/cloneDeep");
+
+var _cloneDeepWithoutLoc = require("./clone/cloneDeepWithoutLoc");
+
+var _cloneWithoutLoc = require("./clone/cloneWithoutLoc");
+
+var _addComment = require("./comments/addComment");
+
+var _addComments = require("./comments/addComments");
+
+var _inheritInnerComments = require("./comments/inheritInnerComments");
+
+var _inheritLeadingComments = require("./comments/inheritLeadingComments");
+
+var _inheritsComments = require("./comments/inheritsComments");
+
+var _inheritTrailingComments = require("./comments/inheritTrailingComments");
+
+var _removeComments = require("./comments/removeComments");
+
+var _generated3 = require("./constants/generated");
+
+Object.keys(_generated3).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _generated3[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated3[key];
+ }
+ });
+});
+
+var _constants = require("./constants");
+
+Object.keys(_constants).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _constants[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _constants[key];
+ }
+ });
+});
+
+var _ensureBlock = require("./converters/ensureBlock");
+
+var _toBindingIdentifierName = require("./converters/toBindingIdentifierName");
+
+var _toBlock = require("./converters/toBlock");
+
+var _toComputedKey = require("./converters/toComputedKey");
+
+var _toExpression = require("./converters/toExpression");
+
+var _toIdentifier = require("./converters/toIdentifier");
+
+var _toKeyAlias = require("./converters/toKeyAlias");
+
+var _toSequenceExpression = require("./converters/toSequenceExpression");
+
+var _toStatement = require("./converters/toStatement");
+
+var _valueToNode = require("./converters/valueToNode");
+
+var _definitions = require("./definitions");
+
+Object.keys(_definitions).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _definitions[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _definitions[key];
+ }
+ });
+});
+
+var _appendToMemberExpression = require("./modifications/appendToMemberExpression");
+
+var _inherits = require("./modifications/inherits");
+
+var _prependToMemberExpression = require("./modifications/prependToMemberExpression");
+
+var _removeProperties = require("./modifications/removeProperties");
+
+var _removePropertiesDeep = require("./modifications/removePropertiesDeep");
+
+var _removeTypeDuplicates = require("./modifications/flow/removeTypeDuplicates");
+
+var _getBindingIdentifiers = require("./retrievers/getBindingIdentifiers");
+
+var _getOuterBindingIdentifiers = require("./retrievers/getOuterBindingIdentifiers");
+
+var _traverse = require("./traverse/traverse");
+
+Object.keys(_traverse).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _traverse[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _traverse[key];
+ }
+ });
+});
+
+var _traverseFast = require("./traverse/traverseFast");
+
+var _shallowEqual = require("./utils/shallowEqual");
+
+var _is = require("./validators/is");
+
+var _isBinding = require("./validators/isBinding");
+
+var _isBlockScoped = require("./validators/isBlockScoped");
+
+var _isImmutable = require("./validators/isImmutable");
+
+var _isLet = require("./validators/isLet");
+
+var _isNode = require("./validators/isNode");
+
+var _isNodesEquivalent = require("./validators/isNodesEquivalent");
+
+var _isPlaceholderType = require("./validators/isPlaceholderType");
+
+var _isReferenced = require("./validators/isReferenced");
+
+var _isScope = require("./validators/isScope");
+
+var _isSpecifierDefault = require("./validators/isSpecifierDefault");
+
+var _isType = require("./validators/isType");
+
+var _isValidES3Identifier = require("./validators/isValidES3Identifier");
+
+var _isValidIdentifier = require("./validators/isValidIdentifier");
+
+var _isVar = require("./validators/isVar");
+
+var _matchesPattern = require("./validators/matchesPattern");
+
+var _validate = require("./validators/validate");
+
+var _buildMatchMemberExpression = require("./validators/buildMatchMemberExpression");
+
+var _generated4 = require("./validators/generated");
+
+Object.keys(_generated4).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _generated4[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated4[key];
+ }
+ });
+});
+
+var _generated5 = require("./ast-types/generated");
+
+Object.keys(_generated5).forEach(function (key) {
+ if (key === "default" || key === "__esModule") return;
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
+ if (key in exports && exports[key] === _generated5[key]) return;
+ Object.defineProperty(exports, key, {
+ enumerable: true,
+ get: function () {
+ return _generated5[key];
+ }
+ });
+});
+const react = {
+ isReactComponent: _isReactComponent.default,
+ isCompatTag: _isCompatTag.default,
+ buildChildren: _buildChildren.default
+};
+exports.react = react; \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/index.js.flow b/node_modules/@babel/types/lib/index.js.flow
new file mode 100644
index 0000000..331add0
--- /dev/null
+++ b/node_modules/@babel/types/lib/index.js.flow
@@ -0,0 +1,2572 @@
+// NOTE: This file is autogenerated. Do not modify.
+// See packages/babel-types/scripts/generators/flow.js for script used.
+
+declare class BabelNodeComment {
+ value: string;
+ start: number;
+ end: number;
+ loc: BabelNodeSourceLocation;
+}
+
+declare class BabelNodeCommentBlock extends BabelNodeComment {
+ type: "CommentBlock";
+}
+
+declare class BabelNodeCommentLine extends BabelNodeComment {
+ type: "CommentLine";
+}
+
+declare class BabelNodeSourceLocation {
+ start: {
+ line: number;
+ column: number;
+ };
+
+ end: {
+ line: number;
+ column: number;
+ };
+}
+
+declare class BabelNode {
+ leadingComments?: Array<BabelNodeComment>;
+ innerComments?: Array<BabelNodeComment>;
+ trailingComments?: Array<BabelNodeComment>;
+ start: ?number;
+ end: ?number;
+ loc: ?BabelNodeSourceLocation;
+ extra?: { [string]: mixed };
+}
+
+declare class BabelNodeArrayExpression extends BabelNode {
+ type: "ArrayExpression";
+ elements?: Array<null | BabelNodeExpression | BabelNodeSpreadElement>;
+}
+
+declare class BabelNodeAssignmentExpression extends BabelNode {
+ type: "AssignmentExpression";
+ operator: string;
+ left: BabelNodeLVal;
+ right: BabelNodeExpression;
+}
+
+declare class BabelNodeBinaryExpression extends BabelNode {
+ type: "BinaryExpression";
+ operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=";
+ left: BabelNodeExpression | BabelNodePrivateName;
+ right: BabelNodeExpression;
+}
+
+declare class BabelNodeInterpreterDirective extends BabelNode {
+ type: "InterpreterDirective";
+ value: string;
+}
+
+declare class BabelNodeDirective extends BabelNode {
+ type: "Directive";
+ value: BabelNodeDirectiveLiteral;
+}
+
+declare class BabelNodeDirectiveLiteral extends BabelNode {
+ type: "DirectiveLiteral";
+ value: string;
+}
+
+declare class BabelNodeBlockStatement extends BabelNode {
+ type: "BlockStatement";
+ body: Array<BabelNodeStatement>;
+ directives?: Array<BabelNodeDirective>;
+}
+
+declare class BabelNodeBreakStatement extends BabelNode {
+ type: "BreakStatement";
+ label?: BabelNodeIdentifier;
+}
+
+declare class BabelNodeCallExpression extends BabelNode {
+ type: "CallExpression";
+ callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier;
+ arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>;
+ optional?: true | false;
+ typeArguments?: BabelNodeTypeParameterInstantiation;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeCatchClause extends BabelNode {
+ type: "CatchClause";
+ param?: BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern;
+ body: BabelNodeBlockStatement;
+}
+
+declare class BabelNodeConditionalExpression extends BabelNode {
+ type: "ConditionalExpression";
+ test: BabelNodeExpression;
+ consequent: BabelNodeExpression;
+ alternate: BabelNodeExpression;
+}
+
+declare class BabelNodeContinueStatement extends BabelNode {
+ type: "ContinueStatement";
+ label?: BabelNodeIdentifier;
+}
+
+declare class BabelNodeDebuggerStatement extends BabelNode {
+ type: "DebuggerStatement";
+}
+
+declare class BabelNodeDoWhileStatement extends BabelNode {
+ type: "DoWhileStatement";
+ test: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeEmptyStatement extends BabelNode {
+ type: "EmptyStatement";
+}
+
+declare class BabelNodeExpressionStatement extends BabelNode {
+ type: "ExpressionStatement";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeFile extends BabelNode {
+ type: "File";
+ program: BabelNodeProgram;
+ comments?: Array<BabelNodeCommentBlock | BabelNodeCommentLine>;
+ tokens?: Array<any>;
+}
+
+declare class BabelNodeForInStatement extends BabelNode {
+ type: "ForInStatement";
+ left: BabelNodeVariableDeclaration | BabelNodeLVal;
+ right: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeForStatement extends BabelNode {
+ type: "ForStatement";
+ init?: BabelNodeVariableDeclaration | BabelNodeExpression;
+ test?: BabelNodeExpression;
+ update?: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeFunctionDeclaration extends BabelNode {
+ type: "FunctionDeclaration";
+ id?: BabelNodeIdentifier;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>;
+ body: BabelNodeBlockStatement;
+ generator?: boolean;
+ async?: boolean;
+ declare?: boolean;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeFunctionExpression extends BabelNode {
+ type: "FunctionExpression";
+ id?: BabelNodeIdentifier;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>;
+ body: BabelNodeBlockStatement;
+ generator?: boolean;
+ async?: boolean;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeIdentifier extends BabelNode {
+ type: "Identifier";
+ name: string;
+ decorators?: Array<BabelNodeDecorator>;
+ optional?: boolean;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+}
+
+declare class BabelNodeIfStatement extends BabelNode {
+ type: "IfStatement";
+ test: BabelNodeExpression;
+ consequent: BabelNodeStatement;
+ alternate?: BabelNodeStatement;
+}
+
+declare class BabelNodeLabeledStatement extends BabelNode {
+ type: "LabeledStatement";
+ label: BabelNodeIdentifier;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeStringLiteral extends BabelNode {
+ type: "StringLiteral";
+ value: string;
+}
+
+declare class BabelNodeNumericLiteral extends BabelNode {
+ type: "NumericLiteral";
+ value: number;
+}
+
+declare class BabelNodeNullLiteral extends BabelNode {
+ type: "NullLiteral";
+}
+
+declare class BabelNodeBooleanLiteral extends BabelNode {
+ type: "BooleanLiteral";
+ value: boolean;
+}
+
+declare class BabelNodeRegExpLiteral extends BabelNode {
+ type: "RegExpLiteral";
+ pattern: string;
+ flags?: string;
+}
+
+declare class BabelNodeLogicalExpression extends BabelNode {
+ type: "LogicalExpression";
+ operator: "||" | "&&" | "??";
+ left: BabelNodeExpression;
+ right: BabelNodeExpression;
+}
+
+declare class BabelNodeMemberExpression extends BabelNode {
+ type: "MemberExpression";
+ object: BabelNodeExpression;
+ property: BabelNodeExpression | BabelNodeIdentifier | BabelNodePrivateName;
+ computed?: boolean;
+ optional?: true | false;
+}
+
+declare class BabelNodeNewExpression extends BabelNode {
+ type: "NewExpression";
+ callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier;
+ arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>;
+ optional?: true | false;
+ typeArguments?: BabelNodeTypeParameterInstantiation;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeProgram extends BabelNode {
+ type: "Program";
+ body: Array<BabelNodeStatement>;
+ directives?: Array<BabelNodeDirective>;
+ sourceType?: "script" | "module";
+ interpreter?: BabelNodeInterpreterDirective;
+ sourceFile: string;
+}
+
+declare class BabelNodeObjectExpression extends BabelNode {
+ type: "ObjectExpression";
+ properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>;
+}
+
+declare class BabelNodeObjectMethod extends BabelNode {
+ type: "ObjectMethod";
+ kind?: "method" | "get" | "set";
+ key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>;
+ body: BabelNodeBlockStatement;
+ computed?: boolean;
+ generator?: boolean;
+ async?: boolean;
+ decorators?: Array<BabelNodeDecorator>;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeObjectProperty extends BabelNode {
+ type: "ObjectProperty";
+ key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral;
+ value: BabelNodeExpression | BabelNodePatternLike;
+ computed?: boolean;
+ shorthand?: boolean;
+ decorators?: Array<BabelNodeDecorator>;
+}
+
+declare class BabelNodeRestElement extends BabelNode {
+ type: "RestElement";
+ argument: BabelNodeLVal;
+ decorators?: Array<BabelNodeDecorator>;
+ optional?: boolean;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+}
+
+declare class BabelNodeReturnStatement extends BabelNode {
+ type: "ReturnStatement";
+ argument?: BabelNodeExpression;
+}
+
+declare class BabelNodeSequenceExpression extends BabelNode {
+ type: "SequenceExpression";
+ expressions: Array<BabelNodeExpression>;
+}
+
+declare class BabelNodeParenthesizedExpression extends BabelNode {
+ type: "ParenthesizedExpression";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeSwitchCase extends BabelNode {
+ type: "SwitchCase";
+ test?: BabelNodeExpression;
+ consequent: Array<BabelNodeStatement>;
+}
+
+declare class BabelNodeSwitchStatement extends BabelNode {
+ type: "SwitchStatement";
+ discriminant: BabelNodeExpression;
+ cases: Array<BabelNodeSwitchCase>;
+}
+
+declare class BabelNodeThisExpression extends BabelNode {
+ type: "ThisExpression";
+}
+
+declare class BabelNodeThrowStatement extends BabelNode {
+ type: "ThrowStatement";
+ argument: BabelNodeExpression;
+}
+
+declare class BabelNodeTryStatement extends BabelNode {
+ type: "TryStatement";
+ block: BabelNodeBlockStatement;
+ handler?: BabelNodeCatchClause;
+ finalizer?: BabelNodeBlockStatement;
+}
+
+declare class BabelNodeUnaryExpression extends BabelNode {
+ type: "UnaryExpression";
+ operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof";
+ argument: BabelNodeExpression;
+ prefix?: boolean;
+}
+
+declare class BabelNodeUpdateExpression extends BabelNode {
+ type: "UpdateExpression";
+ operator: "++" | "--";
+ argument: BabelNodeExpression;
+ prefix?: boolean;
+}
+
+declare class BabelNodeVariableDeclaration extends BabelNode {
+ type: "VariableDeclaration";
+ kind: "var" | "let" | "const";
+ declarations: Array<BabelNodeVariableDeclarator>;
+ declare?: boolean;
+}
+
+declare class BabelNodeVariableDeclarator extends BabelNode {
+ type: "VariableDeclarator";
+ id: BabelNodeLVal;
+ init?: BabelNodeExpression;
+ definite?: boolean;
+}
+
+declare class BabelNodeWhileStatement extends BabelNode {
+ type: "WhileStatement";
+ test: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeWithStatement extends BabelNode {
+ type: "WithStatement";
+ object: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeAssignmentPattern extends BabelNode {
+ type: "AssignmentPattern";
+ left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression;
+ right: BabelNodeExpression;
+ decorators?: Array<BabelNodeDecorator>;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+}
+
+declare class BabelNodeArrayPattern extends BabelNode {
+ type: "ArrayPattern";
+ elements: Array<null | BabelNodePatternLike>;
+ decorators?: Array<BabelNodeDecorator>;
+ optional?: boolean;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+}
+
+declare class BabelNodeArrowFunctionExpression extends BabelNode {
+ type: "ArrowFunctionExpression";
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>;
+ body: BabelNodeBlockStatement | BabelNodeExpression;
+ async?: boolean;
+ expression: boolean;
+ generator?: boolean;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeClassBody extends BabelNode {
+ type: "ClassBody";
+ body: Array<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeClassAccessorProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature | BabelNodeStaticBlock>;
+}
+
+declare class BabelNodeClassExpression extends BabelNode {
+ type: "ClassExpression";
+ id?: BabelNodeIdentifier;
+ superClass?: BabelNodeExpression;
+ body: BabelNodeClassBody;
+ decorators?: Array<BabelNodeDecorator>;
+ mixins?: BabelNodeInterfaceExtends;
+ superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeClassDeclaration extends BabelNode {
+ type: "ClassDeclaration";
+ id: BabelNodeIdentifier;
+ superClass?: BabelNodeExpression;
+ body: BabelNodeClassBody;
+ decorators?: Array<BabelNodeDecorator>;
+ abstract?: boolean;
+ declare?: boolean;
+ mixins?: BabelNodeInterfaceExtends;
+ superTypeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeExportAllDeclaration extends BabelNode {
+ type: "ExportAllDeclaration";
+ source: BabelNodeStringLiteral;
+ assertions?: Array<BabelNodeImportAttribute>;
+ exportKind?: "type" | "value";
+}
+
+declare class BabelNodeExportDefaultDeclaration extends BabelNode {
+ type: "ExportDefaultDeclaration";
+ declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression;
+ exportKind?: "value";
+}
+
+declare class BabelNodeExportNamedDeclaration extends BabelNode {
+ type: "ExportNamedDeclaration";
+ declaration?: BabelNodeDeclaration;
+ specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier>;
+ source?: BabelNodeStringLiteral;
+ assertions?: Array<BabelNodeImportAttribute>;
+ exportKind?: "type" | "value";
+}
+
+declare class BabelNodeExportSpecifier extends BabelNode {
+ type: "ExportSpecifier";
+ local: BabelNodeIdentifier;
+ exported: BabelNodeIdentifier | BabelNodeStringLiteral;
+ exportKind?: "type" | "value";
+}
+
+declare class BabelNodeForOfStatement extends BabelNode {
+ type: "ForOfStatement";
+ left: BabelNodeVariableDeclaration | BabelNodeLVal;
+ right: BabelNodeExpression;
+ body: BabelNodeStatement;
+}
+
+declare class BabelNodeImportDeclaration extends BabelNode {
+ type: "ImportDeclaration";
+ specifiers: Array<BabelNodeImportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier>;
+ source: BabelNodeStringLiteral;
+ assertions?: Array<BabelNodeImportAttribute>;
+ importKind?: "type" | "typeof" | "value";
+}
+
+declare class BabelNodeImportDefaultSpecifier extends BabelNode {
+ type: "ImportDefaultSpecifier";
+ local: BabelNodeIdentifier;
+}
+
+declare class BabelNodeImportNamespaceSpecifier extends BabelNode {
+ type: "ImportNamespaceSpecifier";
+ local: BabelNodeIdentifier;
+}
+
+declare class BabelNodeImportSpecifier extends BabelNode {
+ type: "ImportSpecifier";
+ local: BabelNodeIdentifier;
+ imported: BabelNodeIdentifier | BabelNodeStringLiteral;
+ importKind?: "type" | "typeof" | "value";
+}
+
+declare class BabelNodeMetaProperty extends BabelNode {
+ type: "MetaProperty";
+ meta: BabelNodeIdentifier;
+ property: BabelNodeIdentifier;
+}
+
+declare class BabelNodeClassMethod extends BabelNode {
+ type: "ClassMethod";
+ kind?: "get" | "set" | "method" | "constructor";
+ key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ body: BabelNodeBlockStatement;
+ computed?: boolean;
+ generator?: boolean;
+ async?: boolean;
+ abstract?: boolean;
+ access?: "public" | "private" | "protected";
+ accessibility?: "public" | "private" | "protected";
+ decorators?: Array<BabelNodeDecorator>;
+ optional?: boolean;
+ override?: boolean;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodeObjectPattern extends BabelNode {
+ type: "ObjectPattern";
+ properties: Array<BabelNodeRestElement | BabelNodeObjectProperty>;
+ decorators?: Array<BabelNodeDecorator>;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+}
+
+declare class BabelNodeSpreadElement extends BabelNode {
+ type: "SpreadElement";
+ argument: BabelNodeExpression;
+}
+
+declare class BabelNodeSuper extends BabelNode {
+ type: "Super";
+}
+
+declare class BabelNodeTaggedTemplateExpression extends BabelNode {
+ type: "TaggedTemplateExpression";
+ tag: BabelNodeExpression;
+ quasi: BabelNodeTemplateLiteral;
+ typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeTemplateElement extends BabelNode {
+ type: "TemplateElement";
+ value: { raw: string, cooked?: string };
+ tail?: boolean;
+}
+
+declare class BabelNodeTemplateLiteral extends BabelNode {
+ type: "TemplateLiteral";
+ quasis: Array<BabelNodeTemplateElement>;
+ expressions: Array<BabelNodeExpression | BabelNodeTSType>;
+}
+
+declare class BabelNodeYieldExpression extends BabelNode {
+ type: "YieldExpression";
+ argument?: BabelNodeExpression;
+ delegate?: boolean;
+}
+
+declare class BabelNodeAwaitExpression extends BabelNode {
+ type: "AwaitExpression";
+ argument: BabelNodeExpression;
+}
+
+declare class BabelNodeImport extends BabelNode {
+ type: "Import";
+}
+
+declare class BabelNodeBigIntLiteral extends BabelNode {
+ type: "BigIntLiteral";
+ value: string;
+}
+
+declare class BabelNodeExportNamespaceSpecifier extends BabelNode {
+ type: "ExportNamespaceSpecifier";
+ exported: BabelNodeIdentifier;
+}
+
+declare class BabelNodeOptionalMemberExpression extends BabelNode {
+ type: "OptionalMemberExpression";
+ object: BabelNodeExpression;
+ property: BabelNodeExpression | BabelNodeIdentifier;
+ computed?: boolean;
+ optional: boolean;
+}
+
+declare class BabelNodeOptionalCallExpression extends BabelNode {
+ type: "OptionalCallExpression";
+ callee: BabelNodeExpression;
+ arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>;
+ optional: boolean;
+ typeArguments?: BabelNodeTypeParameterInstantiation;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeClassProperty extends BabelNode {
+ type: "ClassProperty";
+ key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;
+ value?: BabelNodeExpression;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ decorators?: Array<BabelNodeDecorator>;
+ computed?: boolean;
+ abstract?: boolean;
+ accessibility?: "public" | "private" | "protected";
+ declare?: boolean;
+ definite?: boolean;
+ optional?: boolean;
+ override?: boolean;
+ readonly?: boolean;
+ variance?: BabelNodeVariance;
+}
+
+declare class BabelNodeClassAccessorProperty extends BabelNode {
+ type: "ClassAccessorProperty";
+ key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression | BabelNodePrivateName;
+ value?: BabelNodeExpression;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ decorators?: Array<BabelNodeDecorator>;
+ computed?: boolean;
+ abstract?: boolean;
+ accessibility?: "public" | "private" | "protected";
+ declare?: boolean;
+ definite?: boolean;
+ optional?: boolean;
+ override?: boolean;
+ readonly?: boolean;
+ variance?: BabelNodeVariance;
+}
+
+declare class BabelNodeClassPrivateProperty extends BabelNode {
+ type: "ClassPrivateProperty";
+ key: BabelNodePrivateName;
+ value?: BabelNodeExpression;
+ decorators?: Array<BabelNodeDecorator>;
+ definite?: boolean;
+ readonly?: boolean;
+ typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ variance?: BabelNodeVariance;
+}
+
+declare class BabelNodeClassPrivateMethod extends BabelNode {
+ type: "ClassPrivateMethod";
+ kind?: "get" | "set" | "method" | "constructor";
+ key: BabelNodePrivateName;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ body: BabelNodeBlockStatement;
+ abstract?: boolean;
+ access?: "public" | "private" | "protected";
+ accessibility?: "public" | "private" | "protected";
+ async?: boolean;
+ computed?: boolean;
+ decorators?: Array<BabelNodeDecorator>;
+ generator?: boolean;
+ optional?: boolean;
+ override?: boolean;
+ returnType?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ typeParameters?: BabelNodeTypeParameterDeclaration | BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+}
+
+declare class BabelNodePrivateName extends BabelNode {
+ type: "PrivateName";
+ id: BabelNodeIdentifier;
+}
+
+declare class BabelNodeStaticBlock extends BabelNode {
+ type: "StaticBlock";
+ body: Array<BabelNodeStatement>;
+}
+
+declare class BabelNodeAnyTypeAnnotation extends BabelNode {
+ type: "AnyTypeAnnotation";
+}
+
+declare class BabelNodeArrayTypeAnnotation extends BabelNode {
+ type: "ArrayTypeAnnotation";
+ elementType: BabelNodeFlowType;
+}
+
+declare class BabelNodeBooleanTypeAnnotation extends BabelNode {
+ type: "BooleanTypeAnnotation";
+}
+
+declare class BabelNodeBooleanLiteralTypeAnnotation extends BabelNode {
+ type: "BooleanLiteralTypeAnnotation";
+ value: boolean;
+}
+
+declare class BabelNodeNullLiteralTypeAnnotation extends BabelNode {
+ type: "NullLiteralTypeAnnotation";
+}
+
+declare class BabelNodeClassImplements extends BabelNode {
+ type: "ClassImplements";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterInstantiation;
+}
+
+declare class BabelNodeDeclareClass extends BabelNode {
+ type: "DeclareClass";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ body: BabelNodeObjectTypeAnnotation;
+ mixins?: Array<BabelNodeInterfaceExtends>;
+}
+
+declare class BabelNodeDeclareFunction extends BabelNode {
+ type: "DeclareFunction";
+ id: BabelNodeIdentifier;
+ predicate?: BabelNodeDeclaredPredicate;
+}
+
+declare class BabelNodeDeclareInterface extends BabelNode {
+ type: "DeclareInterface";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ body: BabelNodeObjectTypeAnnotation;
+ mixins?: Array<BabelNodeInterfaceExtends>;
+}
+
+declare class BabelNodeDeclareModule extends BabelNode {
+ type: "DeclareModule";
+ id: BabelNodeIdentifier | BabelNodeStringLiteral;
+ body: BabelNodeBlockStatement;
+ kind?: "CommonJS" | "ES";
+}
+
+declare class BabelNodeDeclareModuleExports extends BabelNode {
+ type: "DeclareModuleExports";
+ typeAnnotation: BabelNodeTypeAnnotation;
+}
+
+declare class BabelNodeDeclareTypeAlias extends BabelNode {
+ type: "DeclareTypeAlias";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ right: BabelNodeFlowType;
+}
+
+declare class BabelNodeDeclareOpaqueType extends BabelNode {
+ type: "DeclareOpaqueType";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ supertype?: BabelNodeFlowType;
+ impltype?: BabelNodeFlowType;
+}
+
+declare class BabelNodeDeclareVariable extends BabelNode {
+ type: "DeclareVariable";
+ id: BabelNodeIdentifier;
+}
+
+declare class BabelNodeDeclareExportDeclaration extends BabelNode {
+ type: "DeclareExportDeclaration";
+ declaration?: BabelNodeFlow;
+ specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>;
+ source?: BabelNodeStringLiteral;
+}
+
+declare class BabelNodeDeclareExportAllDeclaration extends BabelNode {
+ type: "DeclareExportAllDeclaration";
+ source: BabelNodeStringLiteral;
+ exportKind?: "type" | "value";
+}
+
+declare class BabelNodeDeclaredPredicate extends BabelNode {
+ type: "DeclaredPredicate";
+ value: BabelNodeFlow;
+}
+
+declare class BabelNodeExistsTypeAnnotation extends BabelNode {
+ type: "ExistsTypeAnnotation";
+}
+
+declare class BabelNodeFunctionTypeAnnotation extends BabelNode {
+ type: "FunctionTypeAnnotation";
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ params: Array<BabelNodeFunctionTypeParam>;
+ rest?: BabelNodeFunctionTypeParam;
+ returnType: BabelNodeFlowType;
+}
+
+declare class BabelNodeFunctionTypeParam extends BabelNode {
+ type: "FunctionTypeParam";
+ name?: BabelNodeIdentifier;
+ typeAnnotation: BabelNodeFlowType;
+ optional?: boolean;
+}
+
+declare class BabelNodeGenericTypeAnnotation extends BabelNode {
+ type: "GenericTypeAnnotation";
+ id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;
+ typeParameters?: BabelNodeTypeParameterInstantiation;
+}
+
+declare class BabelNodeInferredPredicate extends BabelNode {
+ type: "InferredPredicate";
+}
+
+declare class BabelNodeInterfaceExtends extends BabelNode {
+ type: "InterfaceExtends";
+ id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;
+ typeParameters?: BabelNodeTypeParameterInstantiation;
+}
+
+declare class BabelNodeInterfaceDeclaration extends BabelNode {
+ type: "InterfaceDeclaration";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ body: BabelNodeObjectTypeAnnotation;
+ mixins?: Array<BabelNodeInterfaceExtends>;
+}
+
+declare class BabelNodeInterfaceTypeAnnotation extends BabelNode {
+ type: "InterfaceTypeAnnotation";
+ body: BabelNodeObjectTypeAnnotation;
+}
+
+declare class BabelNodeIntersectionTypeAnnotation extends BabelNode {
+ type: "IntersectionTypeAnnotation";
+ types: Array<BabelNodeFlowType>;
+}
+
+declare class BabelNodeMixedTypeAnnotation extends BabelNode {
+ type: "MixedTypeAnnotation";
+}
+
+declare class BabelNodeEmptyTypeAnnotation extends BabelNode {
+ type: "EmptyTypeAnnotation";
+}
+
+declare class BabelNodeNullableTypeAnnotation extends BabelNode {
+ type: "NullableTypeAnnotation";
+ typeAnnotation: BabelNodeFlowType;
+}
+
+declare class BabelNodeNumberLiteralTypeAnnotation extends BabelNode {
+ type: "NumberLiteralTypeAnnotation";
+ value: number;
+}
+
+declare class BabelNodeNumberTypeAnnotation extends BabelNode {
+ type: "NumberTypeAnnotation";
+}
+
+declare class BabelNodeObjectTypeAnnotation extends BabelNode {
+ type: "ObjectTypeAnnotation";
+ properties: Array<BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty>;
+ indexers?: Array<BabelNodeObjectTypeIndexer>;
+ callProperties?: Array<BabelNodeObjectTypeCallProperty>;
+ internalSlots?: Array<BabelNodeObjectTypeInternalSlot>;
+ exact?: boolean;
+ inexact?: boolean;
+}
+
+declare class BabelNodeObjectTypeInternalSlot extends BabelNode {
+ type: "ObjectTypeInternalSlot";
+ id: BabelNodeIdentifier;
+ value: BabelNodeFlowType;
+ optional: boolean;
+ method: boolean;
+}
+
+declare class BabelNodeObjectTypeCallProperty extends BabelNode {
+ type: "ObjectTypeCallProperty";
+ value: BabelNodeFlowType;
+}
+
+declare class BabelNodeObjectTypeIndexer extends BabelNode {
+ type: "ObjectTypeIndexer";
+ id?: BabelNodeIdentifier;
+ key: BabelNodeFlowType;
+ value: BabelNodeFlowType;
+ variance?: BabelNodeVariance;
+}
+
+declare class BabelNodeObjectTypeProperty extends BabelNode {
+ type: "ObjectTypeProperty";
+ key: BabelNodeIdentifier | BabelNodeStringLiteral;
+ value: BabelNodeFlowType;
+ variance?: BabelNodeVariance;
+ kind: "init" | "get" | "set";
+ method: boolean;
+ optional: boolean;
+ proto: boolean;
+}
+
+declare class BabelNodeObjectTypeSpreadProperty extends BabelNode {
+ type: "ObjectTypeSpreadProperty";
+ argument: BabelNodeFlowType;
+}
+
+declare class BabelNodeOpaqueType extends BabelNode {
+ type: "OpaqueType";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ supertype?: BabelNodeFlowType;
+ impltype: BabelNodeFlowType;
+}
+
+declare class BabelNodeQualifiedTypeIdentifier extends BabelNode {
+ type: "QualifiedTypeIdentifier";
+ id: BabelNodeIdentifier;
+ qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier;
+}
+
+declare class BabelNodeStringLiteralTypeAnnotation extends BabelNode {
+ type: "StringLiteralTypeAnnotation";
+ value: string;
+}
+
+declare class BabelNodeStringTypeAnnotation extends BabelNode {
+ type: "StringTypeAnnotation";
+}
+
+declare class BabelNodeSymbolTypeAnnotation extends BabelNode {
+ type: "SymbolTypeAnnotation";
+}
+
+declare class BabelNodeThisTypeAnnotation extends BabelNode {
+ type: "ThisTypeAnnotation";
+}
+
+declare class BabelNodeTupleTypeAnnotation extends BabelNode {
+ type: "TupleTypeAnnotation";
+ types: Array<BabelNodeFlowType>;
+}
+
+declare class BabelNodeTypeofTypeAnnotation extends BabelNode {
+ type: "TypeofTypeAnnotation";
+ argument: BabelNodeFlowType;
+}
+
+declare class BabelNodeTypeAlias extends BabelNode {
+ type: "TypeAlias";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTypeParameterDeclaration;
+ right: BabelNodeFlowType;
+}
+
+declare class BabelNodeTypeAnnotation extends BabelNode {
+ type: "TypeAnnotation";
+ typeAnnotation: BabelNodeFlowType;
+}
+
+declare class BabelNodeTypeCastExpression extends BabelNode {
+ type: "TypeCastExpression";
+ expression: BabelNodeExpression;
+ typeAnnotation: BabelNodeTypeAnnotation;
+}
+
+declare class BabelNodeTypeParameter extends BabelNode {
+ type: "TypeParameter";
+ bound?: BabelNodeTypeAnnotation;
+ variance?: BabelNodeVariance;
+ name: string;
+}
+
+declare class BabelNodeTypeParameterDeclaration extends BabelNode {
+ type: "TypeParameterDeclaration";
+ params: Array<BabelNodeTypeParameter>;
+}
+
+declare class BabelNodeTypeParameterInstantiation extends BabelNode {
+ type: "TypeParameterInstantiation";
+ params: Array<BabelNodeFlowType>;
+}
+
+declare class BabelNodeUnionTypeAnnotation extends BabelNode {
+ type: "UnionTypeAnnotation";
+ types: Array<BabelNodeFlowType>;
+}
+
+declare class BabelNodeVariance extends BabelNode {
+ type: "Variance";
+ kind: "minus" | "plus";
+}
+
+declare class BabelNodeVoidTypeAnnotation extends BabelNode {
+ type: "VoidTypeAnnotation";
+}
+
+declare class BabelNodeEnumDeclaration extends BabelNode {
+ type: "EnumDeclaration";
+ id: BabelNodeIdentifier;
+ body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody;
+}
+
+declare class BabelNodeEnumBooleanBody extends BabelNode {
+ type: "EnumBooleanBody";
+ members: Array<BabelNodeEnumBooleanMember>;
+ explicitType: boolean;
+ hasUnknownMembers: boolean;
+}
+
+declare class BabelNodeEnumNumberBody extends BabelNode {
+ type: "EnumNumberBody";
+ members: Array<BabelNodeEnumNumberMember>;
+ explicitType: boolean;
+ hasUnknownMembers: boolean;
+}
+
+declare class BabelNodeEnumStringBody extends BabelNode {
+ type: "EnumStringBody";
+ members: Array<BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember>;
+ explicitType: boolean;
+ hasUnknownMembers: boolean;
+}
+
+declare class BabelNodeEnumSymbolBody extends BabelNode {
+ type: "EnumSymbolBody";
+ members: Array<BabelNodeEnumDefaultedMember>;
+ hasUnknownMembers: boolean;
+}
+
+declare class BabelNodeEnumBooleanMember extends BabelNode {
+ type: "EnumBooleanMember";
+ id: BabelNodeIdentifier;
+ init: BabelNodeBooleanLiteral;
+}
+
+declare class BabelNodeEnumNumberMember extends BabelNode {
+ type: "EnumNumberMember";
+ id: BabelNodeIdentifier;
+ init: BabelNodeNumericLiteral;
+}
+
+declare class BabelNodeEnumStringMember extends BabelNode {
+ type: "EnumStringMember";
+ id: BabelNodeIdentifier;
+ init: BabelNodeStringLiteral;
+}
+
+declare class BabelNodeEnumDefaultedMember extends BabelNode {
+ type: "EnumDefaultedMember";
+ id: BabelNodeIdentifier;
+}
+
+declare class BabelNodeIndexedAccessType extends BabelNode {
+ type: "IndexedAccessType";
+ objectType: BabelNodeFlowType;
+ indexType: BabelNodeFlowType;
+}
+
+declare class BabelNodeOptionalIndexedAccessType extends BabelNode {
+ type: "OptionalIndexedAccessType";
+ objectType: BabelNodeFlowType;
+ indexType: BabelNodeFlowType;
+ optional: boolean;
+}
+
+declare class BabelNodeJSXAttribute extends BabelNode {
+ type: "JSXAttribute";
+ name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName;
+ value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer;
+}
+
+declare class BabelNodeJSXClosingElement extends BabelNode {
+ type: "JSXClosingElement";
+ name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName;
+}
+
+declare class BabelNodeJSXElement extends BabelNode {
+ type: "JSXElement";
+ openingElement: BabelNodeJSXOpeningElement;
+ closingElement?: BabelNodeJSXClosingElement;
+ children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>;
+ selfClosing?: boolean;
+}
+
+declare class BabelNodeJSXEmptyExpression extends BabelNode {
+ type: "JSXEmptyExpression";
+}
+
+declare class BabelNodeJSXExpressionContainer extends BabelNode {
+ type: "JSXExpressionContainer";
+ expression: BabelNodeExpression | BabelNodeJSXEmptyExpression;
+}
+
+declare class BabelNodeJSXSpreadChild extends BabelNode {
+ type: "JSXSpreadChild";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeJSXIdentifier extends BabelNode {
+ type: "JSXIdentifier";
+ name: string;
+}
+
+declare class BabelNodeJSXMemberExpression extends BabelNode {
+ type: "JSXMemberExpression";
+ object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier;
+ property: BabelNodeJSXIdentifier;
+}
+
+declare class BabelNodeJSXNamespacedName extends BabelNode {
+ type: "JSXNamespacedName";
+ namespace: BabelNodeJSXIdentifier;
+ name: BabelNodeJSXIdentifier;
+}
+
+declare class BabelNodeJSXOpeningElement extends BabelNode {
+ type: "JSXOpeningElement";
+ name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName;
+ attributes: Array<BabelNodeJSXAttribute | BabelNodeJSXSpreadAttribute>;
+ selfClosing?: boolean;
+ typeParameters?: BabelNodeTypeParameterInstantiation | BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeJSXSpreadAttribute extends BabelNode {
+ type: "JSXSpreadAttribute";
+ argument: BabelNodeExpression;
+}
+
+declare class BabelNodeJSXText extends BabelNode {
+ type: "JSXText";
+ value: string;
+}
+
+declare class BabelNodeJSXFragment extends BabelNode {
+ type: "JSXFragment";
+ openingFragment: BabelNodeJSXOpeningFragment;
+ closingFragment: BabelNodeJSXClosingFragment;
+ children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>;
+}
+
+declare class BabelNodeJSXOpeningFragment extends BabelNode {
+ type: "JSXOpeningFragment";
+}
+
+declare class BabelNodeJSXClosingFragment extends BabelNode {
+ type: "JSXClosingFragment";
+}
+
+declare class BabelNodeNoop extends BabelNode {
+ type: "Noop";
+}
+
+declare class BabelNodePlaceholder extends BabelNode {
+ type: "Placeholder";
+ expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern";
+ name: BabelNodeIdentifier;
+}
+
+declare class BabelNodeV8IntrinsicIdentifier extends BabelNode {
+ type: "V8IntrinsicIdentifier";
+ name: string;
+}
+
+declare class BabelNodeArgumentPlaceholder extends BabelNode {
+ type: "ArgumentPlaceholder";
+}
+
+declare class BabelNodeBindExpression extends BabelNode {
+ type: "BindExpression";
+ object: BabelNodeExpression;
+ callee: BabelNodeExpression;
+}
+
+declare class BabelNodeImportAttribute extends BabelNode {
+ type: "ImportAttribute";
+ key: BabelNodeIdentifier | BabelNodeStringLiteral;
+ value: BabelNodeStringLiteral;
+}
+
+declare class BabelNodeDecorator extends BabelNode {
+ type: "Decorator";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeDoExpression extends BabelNode {
+ type: "DoExpression";
+ body: BabelNodeBlockStatement;
+ async?: boolean;
+}
+
+declare class BabelNodeExportDefaultSpecifier extends BabelNode {
+ type: "ExportDefaultSpecifier";
+ exported: BabelNodeIdentifier;
+}
+
+declare class BabelNodeRecordExpression extends BabelNode {
+ type: "RecordExpression";
+ properties: Array<BabelNodeObjectProperty | BabelNodeSpreadElement>;
+}
+
+declare class BabelNodeTupleExpression extends BabelNode {
+ type: "TupleExpression";
+ elements?: Array<BabelNodeExpression | BabelNodeSpreadElement>;
+}
+
+declare class BabelNodeDecimalLiteral extends BabelNode {
+ type: "DecimalLiteral";
+ value: string;
+}
+
+declare class BabelNodeModuleExpression extends BabelNode {
+ type: "ModuleExpression";
+ body: BabelNodeProgram;
+}
+
+declare class BabelNodeTopicReference extends BabelNode {
+ type: "TopicReference";
+}
+
+declare class BabelNodePipelineTopicExpression extends BabelNode {
+ type: "PipelineTopicExpression";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodePipelineBareFunction extends BabelNode {
+ type: "PipelineBareFunction";
+ callee: BabelNodeExpression;
+}
+
+declare class BabelNodePipelinePrimaryTopicReference extends BabelNode {
+ type: "PipelinePrimaryTopicReference";
+}
+
+declare class BabelNodeTSParameterProperty extends BabelNode {
+ type: "TSParameterProperty";
+ parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern;
+ accessibility?: "public" | "private" | "protected";
+ decorators?: Array<BabelNodeDecorator>;
+ override?: boolean;
+ readonly?: boolean;
+}
+
+declare class BabelNodeTSDeclareFunction extends BabelNode {
+ type: "TSDeclareFunction";
+ id?: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>;
+ returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ async?: boolean;
+ declare?: boolean;
+ generator?: boolean;
+}
+
+declare class BabelNodeTSDeclareMethod extends BabelNode {
+ type: "TSDeclareMethod";
+ decorators?: Array<BabelNodeDecorator>;
+ key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression;
+ typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop;
+ params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>;
+ returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop;
+ abstract?: boolean;
+ access?: "public" | "private" | "protected";
+ accessibility?: "public" | "private" | "protected";
+ async?: boolean;
+ computed?: boolean;
+ generator?: boolean;
+ kind?: "get" | "set" | "method" | "constructor";
+ optional?: boolean;
+ override?: boolean;
+}
+
+declare class BabelNodeTSQualifiedName extends BabelNode {
+ type: "TSQualifiedName";
+ left: BabelNodeTSEntityName;
+ right: BabelNodeIdentifier;
+}
+
+declare class BabelNodeTSCallSignatureDeclaration extends BabelNode {
+ type: "TSCallSignatureDeclaration";
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+}
+
+declare class BabelNodeTSConstructSignatureDeclaration extends BabelNode {
+ type: "TSConstructSignatureDeclaration";
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+}
+
+declare class BabelNodeTSPropertySignature extends BabelNode {
+ type: "TSPropertySignature";
+ key: BabelNodeExpression;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ initializer?: BabelNodeExpression;
+ computed?: boolean;
+ kind: "get" | "set";
+ optional?: boolean;
+ readonly?: boolean;
+}
+
+declare class BabelNodeTSMethodSignature extends BabelNode {
+ type: "TSMethodSignature";
+ key: BabelNodeExpression;
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ computed?: boolean;
+ kind: "method" | "get" | "set";
+ optional?: boolean;
+}
+
+declare class BabelNodeTSIndexSignature extends BabelNode {
+ type: "TSIndexSignature";
+ parameters: Array<BabelNodeIdentifier>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ readonly?: boolean;
+}
+
+declare class BabelNodeTSAnyKeyword extends BabelNode {
+ type: "TSAnyKeyword";
+}
+
+declare class BabelNodeTSBooleanKeyword extends BabelNode {
+ type: "TSBooleanKeyword";
+}
+
+declare class BabelNodeTSBigIntKeyword extends BabelNode {
+ type: "TSBigIntKeyword";
+}
+
+declare class BabelNodeTSIntrinsicKeyword extends BabelNode {
+ type: "TSIntrinsicKeyword";
+}
+
+declare class BabelNodeTSNeverKeyword extends BabelNode {
+ type: "TSNeverKeyword";
+}
+
+declare class BabelNodeTSNullKeyword extends BabelNode {
+ type: "TSNullKeyword";
+}
+
+declare class BabelNodeTSNumberKeyword extends BabelNode {
+ type: "TSNumberKeyword";
+}
+
+declare class BabelNodeTSObjectKeyword extends BabelNode {
+ type: "TSObjectKeyword";
+}
+
+declare class BabelNodeTSStringKeyword extends BabelNode {
+ type: "TSStringKeyword";
+}
+
+declare class BabelNodeTSSymbolKeyword extends BabelNode {
+ type: "TSSymbolKeyword";
+}
+
+declare class BabelNodeTSUndefinedKeyword extends BabelNode {
+ type: "TSUndefinedKeyword";
+}
+
+declare class BabelNodeTSUnknownKeyword extends BabelNode {
+ type: "TSUnknownKeyword";
+}
+
+declare class BabelNodeTSVoidKeyword extends BabelNode {
+ type: "TSVoidKeyword";
+}
+
+declare class BabelNodeTSThisType extends BabelNode {
+ type: "TSThisType";
+}
+
+declare class BabelNodeTSFunctionType extends BabelNode {
+ type: "TSFunctionType";
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+}
+
+declare class BabelNodeTSConstructorType extends BabelNode {
+ type: "TSConstructorType";
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ abstract?: boolean;
+}
+
+declare class BabelNodeTSTypeReference extends BabelNode {
+ type: "TSTypeReference";
+ typeName: BabelNodeTSEntityName;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeTSTypePredicate extends BabelNode {
+ type: "TSTypePredicate";
+ parameterName: BabelNodeIdentifier | BabelNodeTSThisType;
+ typeAnnotation?: BabelNodeTSTypeAnnotation;
+ asserts?: boolean;
+}
+
+declare class BabelNodeTSTypeQuery extends BabelNode {
+ type: "TSTypeQuery";
+ exprName: BabelNodeTSEntityName | BabelNodeTSImportType;
+}
+
+declare class BabelNodeTSTypeLiteral extends BabelNode {
+ type: "TSTypeLiteral";
+ members: Array<BabelNodeTSTypeElement>;
+}
+
+declare class BabelNodeTSArrayType extends BabelNode {
+ type: "TSArrayType";
+ elementType: BabelNodeTSType;
+}
+
+declare class BabelNodeTSTupleType extends BabelNode {
+ type: "TSTupleType";
+ elementTypes: Array<BabelNodeTSType | BabelNodeTSNamedTupleMember>;
+}
+
+declare class BabelNodeTSOptionalType extends BabelNode {
+ type: "TSOptionalType";
+ typeAnnotation: BabelNodeTSType;
+}
+
+declare class BabelNodeTSRestType extends BabelNode {
+ type: "TSRestType";
+ typeAnnotation: BabelNodeTSType;
+}
+
+declare class BabelNodeTSNamedTupleMember extends BabelNode {
+ type: "TSNamedTupleMember";
+ label: BabelNodeIdentifier;
+ elementType: BabelNodeTSType;
+ optional?: boolean;
+}
+
+declare class BabelNodeTSUnionType extends BabelNode {
+ type: "TSUnionType";
+ types: Array<BabelNodeTSType>;
+}
+
+declare class BabelNodeTSIntersectionType extends BabelNode {
+ type: "TSIntersectionType";
+ types: Array<BabelNodeTSType>;
+}
+
+declare class BabelNodeTSConditionalType extends BabelNode {
+ type: "TSConditionalType";
+ checkType: BabelNodeTSType;
+ extendsType: BabelNodeTSType;
+ trueType: BabelNodeTSType;
+ falseType: BabelNodeTSType;
+}
+
+declare class BabelNodeTSInferType extends BabelNode {
+ type: "TSInferType";
+ typeParameter: BabelNodeTSTypeParameter;
+}
+
+declare class BabelNodeTSParenthesizedType extends BabelNode {
+ type: "TSParenthesizedType";
+ typeAnnotation: BabelNodeTSType;
+}
+
+declare class BabelNodeTSTypeOperator extends BabelNode {
+ type: "TSTypeOperator";
+ typeAnnotation: BabelNodeTSType;
+ operator: string;
+}
+
+declare class BabelNodeTSIndexedAccessType extends BabelNode {
+ type: "TSIndexedAccessType";
+ objectType: BabelNodeTSType;
+ indexType: BabelNodeTSType;
+}
+
+declare class BabelNodeTSMappedType extends BabelNode {
+ type: "TSMappedType";
+ typeParameter: BabelNodeTSTypeParameter;
+ typeAnnotation?: BabelNodeTSType;
+ nameType?: BabelNodeTSType;
+ optional?: boolean;
+ readonly?: boolean;
+}
+
+declare class BabelNodeTSLiteralType extends BabelNode {
+ type: "TSLiteralType";
+ literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral | BabelNodeUnaryExpression;
+}
+
+declare class BabelNodeTSExpressionWithTypeArguments extends BabelNode {
+ type: "TSExpressionWithTypeArguments";
+ expression: BabelNodeTSEntityName;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeTSInterfaceDeclaration extends BabelNode {
+ type: "TSInterfaceDeclaration";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ body: BabelNodeTSInterfaceBody;
+ declare?: boolean;
+}
+
+declare class BabelNodeTSInterfaceBody extends BabelNode {
+ type: "TSInterfaceBody";
+ body: Array<BabelNodeTSTypeElement>;
+}
+
+declare class BabelNodeTSTypeAliasDeclaration extends BabelNode {
+ type: "TSTypeAliasDeclaration";
+ id: BabelNodeIdentifier;
+ typeParameters?: BabelNodeTSTypeParameterDeclaration;
+ typeAnnotation: BabelNodeTSType;
+ declare?: boolean;
+}
+
+declare class BabelNodeTSAsExpression extends BabelNode {
+ type: "TSAsExpression";
+ expression: BabelNodeExpression;
+ typeAnnotation: BabelNodeTSType;
+}
+
+declare class BabelNodeTSTypeAssertion extends BabelNode {
+ type: "TSTypeAssertion";
+ typeAnnotation: BabelNodeTSType;
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeTSEnumDeclaration extends BabelNode {
+ type: "TSEnumDeclaration";
+ id: BabelNodeIdentifier;
+ members: Array<BabelNodeTSEnumMember>;
+ declare?: boolean;
+ initializer?: BabelNodeExpression;
+}
+
+declare class BabelNodeTSEnumMember extends BabelNode {
+ type: "TSEnumMember";
+ id: BabelNodeIdentifier | BabelNodeStringLiteral;
+ initializer?: BabelNodeExpression;
+}
+
+declare class BabelNodeTSModuleDeclaration extends BabelNode {
+ type: "TSModuleDeclaration";
+ id: BabelNodeIdentifier | BabelNodeStringLiteral;
+ body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration;
+ declare?: boolean;
+ global?: boolean;
+}
+
+declare class BabelNodeTSModuleBlock extends BabelNode {
+ type: "TSModuleBlock";
+ body: Array<BabelNodeStatement>;
+}
+
+declare class BabelNodeTSImportType extends BabelNode {
+ type: "TSImportType";
+ argument: BabelNodeStringLiteral;
+ qualifier?: BabelNodeTSEntityName;
+ typeParameters?: BabelNodeTSTypeParameterInstantiation;
+}
+
+declare class BabelNodeTSImportEqualsDeclaration extends BabelNode {
+ type: "TSImportEqualsDeclaration";
+ id: BabelNodeIdentifier;
+ moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference;
+ importKind?: "type" | "value";
+ isExport: boolean;
+}
+
+declare class BabelNodeTSExternalModuleReference extends BabelNode {
+ type: "TSExternalModuleReference";
+ expression: BabelNodeStringLiteral;
+}
+
+declare class BabelNodeTSNonNullExpression extends BabelNode {
+ type: "TSNonNullExpression";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeTSExportAssignment extends BabelNode {
+ type: "TSExportAssignment";
+ expression: BabelNodeExpression;
+}
+
+declare class BabelNodeTSNamespaceExportDeclaration extends BabelNode {
+ type: "TSNamespaceExportDeclaration";
+ id: BabelNodeIdentifier;
+}
+
+declare class BabelNodeTSTypeAnnotation extends BabelNode {
+ type: "TSTypeAnnotation";
+ typeAnnotation: BabelNodeTSType;
+}
+
+declare class BabelNodeTSTypeParameterInstantiation extends BabelNode {
+ type: "TSTypeParameterInstantiation";
+ params: Array<BabelNodeTSType>;
+}
+
+declare class BabelNodeTSTypeParameterDeclaration extends BabelNode {
+ type: "TSTypeParameterDeclaration";
+ params: Array<BabelNodeTSTypeParameter>;
+}
+
+declare class BabelNodeTSTypeParameter extends BabelNode {
+ type: "TSTypeParameter";
+ constraint?: BabelNodeTSType;
+ name: string;
+}
+
+type BabelNodeStandardized = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeInterpreterDirective | BabelNodeDirective | BabelNodeDirectiveLiteral | BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeCallExpression | BabelNodeCatchClause | BabelNodeConditionalExpression | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeFile | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeProgram | BabelNodeObjectExpression | BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeRestElement | BabelNodeReturnStatement | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeSwitchCase | BabelNodeSwitchStatement | BabelNodeThisExpression | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeVariableDeclaration | BabelNodeVariableDeclarator | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeArrowFunctionExpression | BabelNodeClassBody | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeExportSpecifier | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeMetaProperty | BabelNodeClassMethod | BabelNodeObjectPattern | BabelNodeSpreadElement | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateElement | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeAwaitExpression | BabelNodeImport | BabelNodeBigIntLiteral | BabelNodeExportNamespaceSpecifier | BabelNodeOptionalMemberExpression | BabelNodeOptionalCallExpression | BabelNodeClassProperty | BabelNodeClassAccessorProperty | BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName | BabelNodeStaticBlock;
+type BabelNodeExpression = BabelNodeArrayExpression | BabelNodeAssignmentExpression | BabelNodeBinaryExpression | BabelNodeCallExpression | BabelNodeConditionalExpression | BabelNodeFunctionExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeLogicalExpression | BabelNodeMemberExpression | BabelNodeNewExpression | BabelNodeObjectExpression | BabelNodeSequenceExpression | BabelNodeParenthesizedExpression | BabelNodeThisExpression | BabelNodeUnaryExpression | BabelNodeUpdateExpression | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeMetaProperty | BabelNodeSuper | BabelNodeTaggedTemplateExpression | BabelNodeTemplateLiteral | BabelNodeYieldExpression | BabelNodeAwaitExpression | BabelNodeImport | BabelNodeBigIntLiteral | BabelNodeOptionalMemberExpression | BabelNodeOptionalCallExpression | BabelNodeTypeCastExpression | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeBindExpression | BabelNodeDoExpression | BabelNodeRecordExpression | BabelNodeTupleExpression | BabelNodeDecimalLiteral | BabelNodeModuleExpression | BabelNodeTopicReference | BabelNodePipelineTopicExpression | BabelNodePipelineBareFunction | BabelNodePipelinePrimaryTopicReference | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSNonNullExpression;
+type BabelNodeBinary = BabelNodeBinaryExpression | BabelNodeLogicalExpression;
+type BabelNodeScopable = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeClassExpression | BabelNodeClassDeclaration | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeStaticBlock | BabelNodeTSModuleBlock;
+type BabelNodeBlockParent = BabelNodeBlockStatement | BabelNodeCatchClause | BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeProgram | BabelNodeObjectMethod | BabelNodeSwitchStatement | BabelNodeWhileStatement | BabelNodeArrowFunctionExpression | BabelNodeForOfStatement | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeStaticBlock | BabelNodeTSModuleBlock;
+type BabelNodeBlock = BabelNodeBlockStatement | BabelNodeProgram | BabelNodeTSModuleBlock;
+type BabelNodeStatement = BabelNodeBlockStatement | BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeDebuggerStatement | BabelNodeDoWhileStatement | BabelNodeEmptyStatement | BabelNodeExpressionStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeFunctionDeclaration | BabelNodeIfStatement | BabelNodeLabeledStatement | BabelNodeReturnStatement | BabelNodeSwitchStatement | BabelNodeThrowStatement | BabelNodeTryStatement | BabelNodeVariableDeclaration | BabelNodeWhileStatement | BabelNodeWithStatement | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeForOfStatement | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration;
+type BabelNodeTerminatorless = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement | BabelNodeYieldExpression | BabelNodeAwaitExpression;
+type BabelNodeCompletionStatement = BabelNodeBreakStatement | BabelNodeContinueStatement | BabelNodeReturnStatement | BabelNodeThrowStatement;
+type BabelNodeConditional = BabelNodeConditionalExpression | BabelNodeIfStatement;
+type BabelNodeLoop = BabelNodeDoWhileStatement | BabelNodeForInStatement | BabelNodeForStatement | BabelNodeWhileStatement | BabelNodeForOfStatement;
+type BabelNodeWhile = BabelNodeDoWhileStatement | BabelNodeWhileStatement;
+type BabelNodeExpressionWrapper = BabelNodeExpressionStatement | BabelNodeParenthesizedExpression | BabelNodeTypeCastExpression;
+type BabelNodeFor = BabelNodeForInStatement | BabelNodeForStatement | BabelNodeForOfStatement;
+type BabelNodeForXStatement = BabelNodeForInStatement | BabelNodeForOfStatement;
+type BabelNodeFunction = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod;
+type BabelNodeFunctionParent = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeObjectMethod | BabelNodeArrowFunctionExpression | BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeStaticBlock;
+type BabelNodePureish = BabelNodeFunctionDeclaration | BabelNodeFunctionExpression | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeArrowFunctionExpression | BabelNodeBigIntLiteral | BabelNodeDecimalLiteral;
+type BabelNodeDeclaration = BabelNodeFunctionDeclaration | BabelNodeVariableDeclaration | BabelNodeClassDeclaration | BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias | BabelNodeEnumDeclaration | BabelNodeTSDeclareFunction | BabelNodeTSInterfaceDeclaration | BabelNodeTSTypeAliasDeclaration | BabelNodeTSEnumDeclaration | BabelNodeTSModuleDeclaration;
+type BabelNodePatternLike = BabelNodeIdentifier | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern;
+type BabelNodeLVal = BabelNodeIdentifier | BabelNodeMemberExpression | BabelNodeRestElement | BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern | BabelNodeTSParameterProperty;
+type BabelNodeTSEntityName = BabelNodeIdentifier | BabelNodeTSQualifiedName;
+type BabelNodeLiteral = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeRegExpLiteral | BabelNodeTemplateLiteral | BabelNodeBigIntLiteral | BabelNodeDecimalLiteral;
+type BabelNodeImmutable = BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeNullLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral | BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXOpeningElement | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment | BabelNodeDecimalLiteral;
+type BabelNodeUserWhitespacable = BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty;
+type BabelNodeMethod = BabelNodeObjectMethod | BabelNodeClassMethod | BabelNodeClassPrivateMethod;
+type BabelNodeObjectMember = BabelNodeObjectMethod | BabelNodeObjectProperty;
+type BabelNodeProperty = BabelNodeObjectProperty | BabelNodeClassProperty | BabelNodeClassAccessorProperty | BabelNodeClassPrivateProperty;
+type BabelNodeUnaryLike = BabelNodeUnaryExpression | BabelNodeSpreadElement;
+type BabelNodePattern = BabelNodeAssignmentPattern | BabelNodeArrayPattern | BabelNodeObjectPattern;
+type BabelNodeClass = BabelNodeClassExpression | BabelNodeClassDeclaration;
+type BabelNodeModuleDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration | BabelNodeImportDeclaration;
+type BabelNodeExportDeclaration = BabelNodeExportAllDeclaration | BabelNodeExportDefaultDeclaration | BabelNodeExportNamedDeclaration;
+type BabelNodeModuleSpecifier = BabelNodeExportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier | BabelNodeImportSpecifier | BabelNodeExportNamespaceSpecifier | BabelNodeExportDefaultSpecifier;
+type BabelNodeAccessor = BabelNodeClassAccessorProperty;
+type BabelNodePrivate = BabelNodeClassPrivateProperty | BabelNodeClassPrivateMethod | BabelNodePrivateName;
+type BabelNodeFlow = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeClassImplements | BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeDeclaredPredicate | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeFunctionTypeParam | BabelNodeGenericTypeAnnotation | BabelNodeInferredPredicate | BabelNodeInterfaceExtends | BabelNodeInterfaceDeclaration | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeObjectTypeInternalSlot | BabelNodeObjectTypeCallProperty | BabelNodeObjectTypeIndexer | BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty | BabelNodeOpaqueType | BabelNodeQualifiedTypeIdentifier | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeTypeAlias | BabelNodeTypeAnnotation | BabelNodeTypeCastExpression | BabelNodeTypeParameter | BabelNodeTypeParameterDeclaration | BabelNodeTypeParameterInstantiation | BabelNodeUnionTypeAnnotation | BabelNodeVariance | BabelNodeVoidTypeAnnotation | BabelNodeEnumDeclaration | BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody | BabelNodeEnumBooleanMember | BabelNodeEnumNumberMember | BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember | BabelNodeIndexedAccessType | BabelNodeOptionalIndexedAccessType;
+type BabelNodeFlowType = BabelNodeAnyTypeAnnotation | BabelNodeArrayTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeBooleanLiteralTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeExistsTypeAnnotation | BabelNodeFunctionTypeAnnotation | BabelNodeGenericTypeAnnotation | BabelNodeInterfaceTypeAnnotation | BabelNodeIntersectionTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNullableTypeAnnotation | BabelNodeNumberLiteralTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeObjectTypeAnnotation | BabelNodeStringLiteralTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeTupleTypeAnnotation | BabelNodeTypeofTypeAnnotation | BabelNodeUnionTypeAnnotation | BabelNodeVoidTypeAnnotation | BabelNodeIndexedAccessType | BabelNodeOptionalIndexedAccessType;
+type BabelNodeFlowBaseAnnotation = BabelNodeAnyTypeAnnotation | BabelNodeBooleanTypeAnnotation | BabelNodeNullLiteralTypeAnnotation | BabelNodeMixedTypeAnnotation | BabelNodeEmptyTypeAnnotation | BabelNodeNumberTypeAnnotation | BabelNodeStringTypeAnnotation | BabelNodeSymbolTypeAnnotation | BabelNodeThisTypeAnnotation | BabelNodeVoidTypeAnnotation;
+type BabelNodeFlowDeclaration = BabelNodeDeclareClass | BabelNodeDeclareFunction | BabelNodeDeclareInterface | BabelNodeDeclareModule | BabelNodeDeclareModuleExports | BabelNodeDeclareTypeAlias | BabelNodeDeclareOpaqueType | BabelNodeDeclareVariable | BabelNodeDeclareExportDeclaration | BabelNodeDeclareExportAllDeclaration | BabelNodeInterfaceDeclaration | BabelNodeOpaqueType | BabelNodeTypeAlias;
+type BabelNodeFlowPredicate = BabelNodeDeclaredPredicate | BabelNodeInferredPredicate;
+type BabelNodeEnumBody = BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody;
+type BabelNodeEnumMember = BabelNodeEnumBooleanMember | BabelNodeEnumNumberMember | BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember;
+type BabelNodeJSX = BabelNodeJSXAttribute | BabelNodeJSXClosingElement | BabelNodeJSXElement | BabelNodeJSXEmptyExpression | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName | BabelNodeJSXOpeningElement | BabelNodeJSXSpreadAttribute | BabelNodeJSXText | BabelNodeJSXFragment | BabelNodeJSXOpeningFragment | BabelNodeJSXClosingFragment;
+type BabelNodeMiscellaneous = BabelNodeNoop | BabelNodePlaceholder | BabelNodeV8IntrinsicIdentifier;
+type BabelNodeTypeScript = BabelNodeTSParameterProperty | BabelNodeTSDeclareFunction | BabelNodeTSDeclareMethod | BabelNodeTSQualifiedName | BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature | BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSIntrinsicKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSNamedTupleMember | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSInterfaceDeclaration | BabelNodeTSInterfaceBody | BabelNodeTSTypeAliasDeclaration | BabelNodeTSAsExpression | BabelNodeTSTypeAssertion | BabelNodeTSEnumDeclaration | BabelNodeTSEnumMember | BabelNodeTSModuleDeclaration | BabelNodeTSModuleBlock | BabelNodeTSImportType | BabelNodeTSImportEqualsDeclaration | BabelNodeTSExternalModuleReference | BabelNodeTSNonNullExpression | BabelNodeTSExportAssignment | BabelNodeTSNamespaceExportDeclaration | BabelNodeTSTypeAnnotation | BabelNodeTSTypeParameterInstantiation | BabelNodeTSTypeParameterDeclaration | BabelNodeTSTypeParameter;
+type BabelNodeTSTypeElement = BabelNodeTSCallSignatureDeclaration | BabelNodeTSConstructSignatureDeclaration | BabelNodeTSPropertySignature | BabelNodeTSMethodSignature | BabelNodeTSIndexSignature;
+type BabelNodeTSType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSIntrinsicKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSFunctionType | BabelNodeTSConstructorType | BabelNodeTSTypeReference | BabelNodeTSTypePredicate | BabelNodeTSTypeQuery | BabelNodeTSTypeLiteral | BabelNodeTSArrayType | BabelNodeTSTupleType | BabelNodeTSOptionalType | BabelNodeTSRestType | BabelNodeTSUnionType | BabelNodeTSIntersectionType | BabelNodeTSConditionalType | BabelNodeTSInferType | BabelNodeTSParenthesizedType | BabelNodeTSTypeOperator | BabelNodeTSIndexedAccessType | BabelNodeTSMappedType | BabelNodeTSLiteralType | BabelNodeTSExpressionWithTypeArguments | BabelNodeTSImportType;
+type BabelNodeTSBaseType = BabelNodeTSAnyKeyword | BabelNodeTSBooleanKeyword | BabelNodeTSBigIntKeyword | BabelNodeTSIntrinsicKeyword | BabelNodeTSNeverKeyword | BabelNodeTSNullKeyword | BabelNodeTSNumberKeyword | BabelNodeTSObjectKeyword | BabelNodeTSStringKeyword | BabelNodeTSSymbolKeyword | BabelNodeTSUndefinedKeyword | BabelNodeTSUnknownKeyword | BabelNodeTSVoidKeyword | BabelNodeTSThisType | BabelNodeTSLiteralType;
+
+declare module "@babel/types" {
+ declare export function arrayExpression(elements?: Array<null | BabelNodeExpression | BabelNodeSpreadElement>): BabelNodeArrayExpression;
+ declare export function assignmentExpression(operator: string, left: BabelNodeLVal, right: BabelNodeExpression): BabelNodeAssignmentExpression;
+ declare export function binaryExpression(operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "in" | "instanceof" | ">" | "<" | ">=" | "<=", left: BabelNodeExpression | BabelNodePrivateName, right: BabelNodeExpression): BabelNodeBinaryExpression;
+ declare export function interpreterDirective(value: string): BabelNodeInterpreterDirective;
+ declare export function directive(value: BabelNodeDirectiveLiteral): BabelNodeDirective;
+ declare export function directiveLiteral(value: string): BabelNodeDirectiveLiteral;
+ declare export function blockStatement(body: Array<BabelNodeStatement>, directives?: Array<BabelNodeDirective>): BabelNodeBlockStatement;
+ declare export function breakStatement(label?: BabelNodeIdentifier): BabelNodeBreakStatement;
+ declare export function callExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>): BabelNodeCallExpression;
+ declare export function catchClause(param?: BabelNodeIdentifier | BabelNodeArrayPattern | BabelNodeObjectPattern, body: BabelNodeBlockStatement): BabelNodeCatchClause;
+ declare export function conditionalExpression(test: BabelNodeExpression, consequent: BabelNodeExpression, alternate: BabelNodeExpression): BabelNodeConditionalExpression;
+ declare export function continueStatement(label?: BabelNodeIdentifier): BabelNodeContinueStatement;
+ declare export function debuggerStatement(): BabelNodeDebuggerStatement;
+ declare export function doWhileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeDoWhileStatement;
+ declare export function emptyStatement(): BabelNodeEmptyStatement;
+ declare export function expressionStatement(expression: BabelNodeExpression): BabelNodeExpressionStatement;
+ declare export function file(program: BabelNodeProgram, comments?: Array<BabelNodeCommentBlock | BabelNodeCommentLine>, tokens?: Array<any>): BabelNodeFile;
+ declare export function forInStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForInStatement;
+ declare export function forStatement(init?: BabelNodeVariableDeclaration | BabelNodeExpression, test?: BabelNodeExpression, update?: BabelNodeExpression, body: BabelNodeStatement): BabelNodeForStatement;
+ declare export function functionDeclaration(id?: BabelNodeIdentifier, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean): BabelNodeFunctionDeclaration;
+ declare export function functionExpression(id?: BabelNodeIdentifier, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>, body: BabelNodeBlockStatement, generator?: boolean, async?: boolean): BabelNodeFunctionExpression;
+ declare export function identifier(name: string): BabelNodeIdentifier;
+ declare export function ifStatement(test: BabelNodeExpression, consequent: BabelNodeStatement, alternate?: BabelNodeStatement): BabelNodeIfStatement;
+ declare export function labeledStatement(label: BabelNodeIdentifier, body: BabelNodeStatement): BabelNodeLabeledStatement;
+ declare export function stringLiteral(value: string): BabelNodeStringLiteral;
+ declare export function numericLiteral(value: number): BabelNodeNumericLiteral;
+ declare export function nullLiteral(): BabelNodeNullLiteral;
+ declare export function booleanLiteral(value: boolean): BabelNodeBooleanLiteral;
+ declare export function regExpLiteral(pattern: string, flags?: string): BabelNodeRegExpLiteral;
+ declare export function logicalExpression(operator: "||" | "&&" | "??", left: BabelNodeExpression, right: BabelNodeExpression): BabelNodeLogicalExpression;
+ declare export function memberExpression(object: BabelNodeExpression, property: BabelNodeExpression | BabelNodeIdentifier | BabelNodePrivateName, computed?: boolean, optional?: true | false): BabelNodeMemberExpression;
+ declare export function newExpression(callee: BabelNodeExpression | BabelNodeV8IntrinsicIdentifier, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>): BabelNodeNewExpression;
+ declare export function program(body: Array<BabelNodeStatement>, directives?: Array<BabelNodeDirective>, sourceType?: "script" | "module", interpreter?: BabelNodeInterpreterDirective): BabelNodeProgram;
+ declare export function objectExpression(properties: Array<BabelNodeObjectMethod | BabelNodeObjectProperty | BabelNodeSpreadElement>): BabelNodeObjectExpression;
+ declare export function objectMethod(kind?: "method" | "get" | "set", key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>, body: BabelNodeBlockStatement, computed?: boolean, generator?: boolean, async?: boolean): BabelNodeObjectMethod;
+ declare export function objectProperty(key: BabelNodeExpression | BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral, value: BabelNodeExpression | BabelNodePatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<BabelNodeDecorator>): BabelNodeObjectProperty;
+ declare export function restElement(argument: BabelNodeLVal): BabelNodeRestElement;
+ declare export function returnStatement(argument?: BabelNodeExpression): BabelNodeReturnStatement;
+ declare export function sequenceExpression(expressions: Array<BabelNodeExpression>): BabelNodeSequenceExpression;
+ declare export function parenthesizedExpression(expression: BabelNodeExpression): BabelNodeParenthesizedExpression;
+ declare export function switchCase(test?: BabelNodeExpression, consequent: Array<BabelNodeStatement>): BabelNodeSwitchCase;
+ declare export function switchStatement(discriminant: BabelNodeExpression, cases: Array<BabelNodeSwitchCase>): BabelNodeSwitchStatement;
+ declare export function thisExpression(): BabelNodeThisExpression;
+ declare export function throwStatement(argument: BabelNodeExpression): BabelNodeThrowStatement;
+ declare export function tryStatement(block: BabelNodeBlockStatement, handler?: BabelNodeCatchClause, finalizer?: BabelNodeBlockStatement): BabelNodeTryStatement;
+ declare export function unaryExpression(operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUnaryExpression;
+ declare export function updateExpression(operator: "++" | "--", argument: BabelNodeExpression, prefix?: boolean): BabelNodeUpdateExpression;
+ declare export function variableDeclaration(kind: "var" | "let" | "const", declarations: Array<BabelNodeVariableDeclarator>): BabelNodeVariableDeclaration;
+ declare export function variableDeclarator(id: BabelNodeLVal, init?: BabelNodeExpression): BabelNodeVariableDeclarator;
+ declare export function whileStatement(test: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWhileStatement;
+ declare export function withStatement(object: BabelNodeExpression, body: BabelNodeStatement): BabelNodeWithStatement;
+ declare export function assignmentPattern(left: BabelNodeIdentifier | BabelNodeObjectPattern | BabelNodeArrayPattern | BabelNodeMemberExpression, right: BabelNodeExpression): BabelNodeAssignmentPattern;
+ declare export function arrayPattern(elements: Array<null | BabelNodePatternLike>): BabelNodeArrayPattern;
+ declare export function arrowFunctionExpression(params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>, body: BabelNodeBlockStatement | BabelNodeExpression, async?: boolean): BabelNodeArrowFunctionExpression;
+ declare export function classBody(body: Array<BabelNodeClassMethod | BabelNodeClassPrivateMethod | BabelNodeClassProperty | BabelNodeClassPrivateProperty | BabelNodeClassAccessorProperty | BabelNodeTSDeclareMethod | BabelNodeTSIndexSignature | BabelNodeStaticBlock>): BabelNodeClassBody;
+ declare export function classExpression(id?: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array<BabelNodeDecorator>): BabelNodeClassExpression;
+ declare export function classDeclaration(id: BabelNodeIdentifier, superClass?: BabelNodeExpression, body: BabelNodeClassBody, decorators?: Array<BabelNodeDecorator>): BabelNodeClassDeclaration;
+ declare export function exportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeExportAllDeclaration;
+ declare export function exportDefaultDeclaration(declaration: BabelNodeFunctionDeclaration | BabelNodeTSDeclareFunction | BabelNodeClassDeclaration | BabelNodeExpression): BabelNodeExportDefaultDeclaration;
+ declare export function exportNamedDeclaration(declaration?: BabelNodeDeclaration, specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportDefaultSpecifier | BabelNodeExportNamespaceSpecifier>, source?: BabelNodeStringLiteral): BabelNodeExportNamedDeclaration;
+ declare export function exportSpecifier(local: BabelNodeIdentifier, exported: BabelNodeIdentifier | BabelNodeStringLiteral): BabelNodeExportSpecifier;
+ declare export function forOfStatement(left: BabelNodeVariableDeclaration | BabelNodeLVal, right: BabelNodeExpression, body: BabelNodeStatement, _await?: boolean): BabelNodeForOfStatement;
+ declare export function importDeclaration(specifiers: Array<BabelNodeImportSpecifier | BabelNodeImportDefaultSpecifier | BabelNodeImportNamespaceSpecifier>, source: BabelNodeStringLiteral): BabelNodeImportDeclaration;
+ declare export function importDefaultSpecifier(local: BabelNodeIdentifier): BabelNodeImportDefaultSpecifier;
+ declare export function importNamespaceSpecifier(local: BabelNodeIdentifier): BabelNodeImportNamespaceSpecifier;
+ declare export function importSpecifier(local: BabelNodeIdentifier, imported: BabelNodeIdentifier | BabelNodeStringLiteral): BabelNodeImportSpecifier;
+ declare export function metaProperty(meta: BabelNodeIdentifier, property: BabelNodeIdentifier): BabelNodeMetaProperty;
+ declare export function classMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): BabelNodeClassMethod;
+ declare export function objectPattern(properties: Array<BabelNodeRestElement | BabelNodeObjectProperty>): BabelNodeObjectPattern;
+ declare export function spreadElement(argument: BabelNodeExpression): BabelNodeSpreadElement;
+ declare function _super(): BabelNodeSuper;
+ declare export { _super as super }
+ declare export function taggedTemplateExpression(tag: BabelNodeExpression, quasi: BabelNodeTemplateLiteral): BabelNodeTaggedTemplateExpression;
+ declare export function templateElement(value: { raw: string, cooked?: string }, tail?: boolean): BabelNodeTemplateElement;
+ declare export function templateLiteral(quasis: Array<BabelNodeTemplateElement>, expressions: Array<BabelNodeExpression | BabelNodeTSType>): BabelNodeTemplateLiteral;
+ declare export function yieldExpression(argument?: BabelNodeExpression, delegate?: boolean): BabelNodeYieldExpression;
+ declare export function awaitExpression(argument: BabelNodeExpression): BabelNodeAwaitExpression;
+ declare function _import(): BabelNodeImport;
+ declare export { _import as import }
+ declare export function bigIntLiteral(value: string): BabelNodeBigIntLiteral;
+ declare export function exportNamespaceSpecifier(exported: BabelNodeIdentifier): BabelNodeExportNamespaceSpecifier;
+ declare export function optionalMemberExpression(object: BabelNodeExpression, property: BabelNodeExpression | BabelNodeIdentifier, computed?: boolean, optional: boolean): BabelNodeOptionalMemberExpression;
+ declare export function optionalCallExpression(callee: BabelNodeExpression, _arguments: Array<BabelNodeExpression | BabelNodeSpreadElement | BabelNodeJSXNamespacedName | BabelNodeArgumentPlaceholder>, optional: boolean): BabelNodeOptionalCallExpression;
+ declare export function classProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array<BabelNodeDecorator>, computed?: boolean, _static?: boolean): BabelNodeClassProperty;
+ declare export function classAccessorProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression | BabelNodePrivateName, value?: BabelNodeExpression, typeAnnotation?: BabelNodeTypeAnnotation | BabelNodeTSTypeAnnotation | BabelNodeNoop, decorators?: Array<BabelNodeDecorator>, computed?: boolean, _static?: boolean): BabelNodeClassAccessorProperty;
+ declare export function classPrivateProperty(key: BabelNodePrivateName, value?: BabelNodeExpression, decorators?: Array<BabelNodeDecorator>, _static: any): BabelNodeClassPrivateProperty;
+ declare export function classPrivateMethod(kind?: "get" | "set" | "method" | "constructor", key: BabelNodePrivateName, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, body: BabelNodeBlockStatement, _static?: boolean): BabelNodeClassPrivateMethod;
+ declare export function privateName(id: BabelNodeIdentifier): BabelNodePrivateName;
+ declare export function staticBlock(body: Array<BabelNodeStatement>): BabelNodeStaticBlock;
+ declare export function anyTypeAnnotation(): BabelNodeAnyTypeAnnotation;
+ declare export function arrayTypeAnnotation(elementType: BabelNodeFlowType): BabelNodeArrayTypeAnnotation;
+ declare export function booleanTypeAnnotation(): BabelNodeBooleanTypeAnnotation;
+ declare export function booleanLiteralTypeAnnotation(value: boolean): BabelNodeBooleanLiteralTypeAnnotation;
+ declare export function nullLiteralTypeAnnotation(): BabelNodeNullLiteralTypeAnnotation;
+ declare export function classImplements(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeClassImplements;
+ declare export function declareClass(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareClass;
+ declare export function declareFunction(id: BabelNodeIdentifier): BabelNodeDeclareFunction;
+ declare export function declareInterface(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeDeclareInterface;
+ declare export function declareModule(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeBlockStatement, kind?: "CommonJS" | "ES"): BabelNodeDeclareModule;
+ declare export function declareModuleExports(typeAnnotation: BabelNodeTypeAnnotation): BabelNodeDeclareModuleExports;
+ declare export function declareTypeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeDeclareTypeAlias;
+ declare export function declareOpaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType): BabelNodeDeclareOpaqueType;
+ declare export function declareVariable(id: BabelNodeIdentifier): BabelNodeDeclareVariable;
+ declare export function declareExportDeclaration(declaration?: BabelNodeFlow, specifiers?: Array<BabelNodeExportSpecifier | BabelNodeExportNamespaceSpecifier>, source?: BabelNodeStringLiteral): BabelNodeDeclareExportDeclaration;
+ declare export function declareExportAllDeclaration(source: BabelNodeStringLiteral): BabelNodeDeclareExportAllDeclaration;
+ declare export function declaredPredicate(value: BabelNodeFlow): BabelNodeDeclaredPredicate;
+ declare export function existsTypeAnnotation(): BabelNodeExistsTypeAnnotation;
+ declare export function functionTypeAnnotation(typeParameters?: BabelNodeTypeParameterDeclaration, params: Array<BabelNodeFunctionTypeParam>, rest?: BabelNodeFunctionTypeParam, returnType: BabelNodeFlowType): BabelNodeFunctionTypeAnnotation;
+ declare export function functionTypeParam(name?: BabelNodeIdentifier, typeAnnotation: BabelNodeFlowType): BabelNodeFunctionTypeParam;
+ declare export function genericTypeAnnotation(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeGenericTypeAnnotation;
+ declare export function inferredPredicate(): BabelNodeInferredPredicate;
+ declare export function interfaceExtends(id: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier, typeParameters?: BabelNodeTypeParameterInstantiation): BabelNodeInterfaceExtends;
+ declare export function interfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, _extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceDeclaration;
+ declare export function interfaceTypeAnnotation(_extends?: Array<BabelNodeInterfaceExtends>, body: BabelNodeObjectTypeAnnotation): BabelNodeInterfaceTypeAnnotation;
+ declare export function intersectionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeIntersectionTypeAnnotation;
+ declare export function mixedTypeAnnotation(): BabelNodeMixedTypeAnnotation;
+ declare export function emptyTypeAnnotation(): BabelNodeEmptyTypeAnnotation;
+ declare export function nullableTypeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeNullableTypeAnnotation;
+ declare export function numberLiteralTypeAnnotation(value: number): BabelNodeNumberLiteralTypeAnnotation;
+ declare export function numberTypeAnnotation(): BabelNodeNumberTypeAnnotation;
+ declare export function objectTypeAnnotation(properties: Array<BabelNodeObjectTypeProperty | BabelNodeObjectTypeSpreadProperty>, indexers?: Array<BabelNodeObjectTypeIndexer>, callProperties?: Array<BabelNodeObjectTypeCallProperty>, internalSlots?: Array<BabelNodeObjectTypeInternalSlot>, exact?: boolean): BabelNodeObjectTypeAnnotation;
+ declare export function objectTypeInternalSlot(id: BabelNodeIdentifier, value: BabelNodeFlowType, optional: boolean, _static: boolean, method: boolean): BabelNodeObjectTypeInternalSlot;
+ declare export function objectTypeCallProperty(value: BabelNodeFlowType): BabelNodeObjectTypeCallProperty;
+ declare export function objectTypeIndexer(id?: BabelNodeIdentifier, key: BabelNodeFlowType, value: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeObjectTypeIndexer;
+ declare export function objectTypeProperty(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeObjectTypeProperty;
+ declare export function objectTypeSpreadProperty(argument: BabelNodeFlowType): BabelNodeObjectTypeSpreadProperty;
+ declare export function opaqueType(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, supertype?: BabelNodeFlowType, impltype: BabelNodeFlowType): BabelNodeOpaqueType;
+ declare export function qualifiedTypeIdentifier(id: BabelNodeIdentifier, qualification: BabelNodeIdentifier | BabelNodeQualifiedTypeIdentifier): BabelNodeQualifiedTypeIdentifier;
+ declare export function stringLiteralTypeAnnotation(value: string): BabelNodeStringLiteralTypeAnnotation;
+ declare export function stringTypeAnnotation(): BabelNodeStringTypeAnnotation;
+ declare export function symbolTypeAnnotation(): BabelNodeSymbolTypeAnnotation;
+ declare export function thisTypeAnnotation(): BabelNodeThisTypeAnnotation;
+ declare export function tupleTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeTupleTypeAnnotation;
+ declare export function typeofTypeAnnotation(argument: BabelNodeFlowType): BabelNodeTypeofTypeAnnotation;
+ declare export function typeAlias(id: BabelNodeIdentifier, typeParameters?: BabelNodeTypeParameterDeclaration, right: BabelNodeFlowType): BabelNodeTypeAlias;
+ declare export function typeAnnotation(typeAnnotation: BabelNodeFlowType): BabelNodeTypeAnnotation;
+ declare export function typeCastExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTypeAnnotation): BabelNodeTypeCastExpression;
+ declare export function typeParameter(bound?: BabelNodeTypeAnnotation, _default?: BabelNodeFlowType, variance?: BabelNodeVariance): BabelNodeTypeParameter;
+ declare export function typeParameterDeclaration(params: Array<BabelNodeTypeParameter>): BabelNodeTypeParameterDeclaration;
+ declare export function typeParameterInstantiation(params: Array<BabelNodeFlowType>): BabelNodeTypeParameterInstantiation;
+ declare export function unionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation;
+ declare export function variance(kind: "minus" | "plus"): BabelNodeVariance;
+ declare export function voidTypeAnnotation(): BabelNodeVoidTypeAnnotation;
+ declare export function enumDeclaration(id: BabelNodeIdentifier, body: BabelNodeEnumBooleanBody | BabelNodeEnumNumberBody | BabelNodeEnumStringBody | BabelNodeEnumSymbolBody): BabelNodeEnumDeclaration;
+ declare export function enumBooleanBody(members: Array<BabelNodeEnumBooleanMember>): BabelNodeEnumBooleanBody;
+ declare export function enumNumberBody(members: Array<BabelNodeEnumNumberMember>): BabelNodeEnumNumberBody;
+ declare export function enumStringBody(members: Array<BabelNodeEnumStringMember | BabelNodeEnumDefaultedMember>): BabelNodeEnumStringBody;
+ declare export function enumSymbolBody(members: Array<BabelNodeEnumDefaultedMember>): BabelNodeEnumSymbolBody;
+ declare export function enumBooleanMember(id: BabelNodeIdentifier): BabelNodeEnumBooleanMember;
+ declare export function enumNumberMember(id: BabelNodeIdentifier, init: BabelNodeNumericLiteral): BabelNodeEnumNumberMember;
+ declare export function enumStringMember(id: BabelNodeIdentifier, init: BabelNodeStringLiteral): BabelNodeEnumStringMember;
+ declare export function enumDefaultedMember(id: BabelNodeIdentifier): BabelNodeEnumDefaultedMember;
+ declare export function indexedAccessType(objectType: BabelNodeFlowType, indexType: BabelNodeFlowType): BabelNodeIndexedAccessType;
+ declare export function optionalIndexedAccessType(objectType: BabelNodeFlowType, indexType: BabelNodeFlowType): BabelNodeOptionalIndexedAccessType;
+ declare export function jsxAttribute(name: BabelNodeJSXIdentifier | BabelNodeJSXNamespacedName, value?: BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeStringLiteral | BabelNodeJSXExpressionContainer): BabelNodeJSXAttribute;
+ declare export function jsxClosingElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName): BabelNodeJSXClosingElement;
+ declare export function jsxElement(openingElement: BabelNodeJSXOpeningElement, closingElement?: BabelNodeJSXClosingElement, children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>, selfClosing?: boolean): BabelNodeJSXElement;
+ declare export function jsxEmptyExpression(): BabelNodeJSXEmptyExpression;
+ declare export function jsxExpressionContainer(expression: BabelNodeExpression | BabelNodeJSXEmptyExpression): BabelNodeJSXExpressionContainer;
+ declare export function jsxSpreadChild(expression: BabelNodeExpression): BabelNodeJSXSpreadChild;
+ declare export function jsxIdentifier(name: string): BabelNodeJSXIdentifier;
+ declare export function jsxMemberExpression(object: BabelNodeJSXMemberExpression | BabelNodeJSXIdentifier, property: BabelNodeJSXIdentifier): BabelNodeJSXMemberExpression;
+ declare export function jsxNamespacedName(namespace: BabelNodeJSXIdentifier, name: BabelNodeJSXIdentifier): BabelNodeJSXNamespacedName;
+ declare export function jsxOpeningElement(name: BabelNodeJSXIdentifier | BabelNodeJSXMemberExpression | BabelNodeJSXNamespacedName, attributes: Array<BabelNodeJSXAttribute | BabelNodeJSXSpreadAttribute>, selfClosing?: boolean): BabelNodeJSXOpeningElement;
+ declare export function jsxSpreadAttribute(argument: BabelNodeExpression): BabelNodeJSXSpreadAttribute;
+ declare export function jsxText(value: string): BabelNodeJSXText;
+ declare export function jsxFragment(openingFragment: BabelNodeJSXOpeningFragment, closingFragment: BabelNodeJSXClosingFragment, children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>): BabelNodeJSXFragment;
+ declare export function jsxOpeningFragment(): BabelNodeJSXOpeningFragment;
+ declare export function jsxClosingFragment(): BabelNodeJSXClosingFragment;
+ declare export function noop(): BabelNodeNoop;
+ declare export function placeholder(expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern", name: BabelNodeIdentifier): BabelNodePlaceholder;
+ declare export function v8IntrinsicIdentifier(name: string): BabelNodeV8IntrinsicIdentifier;
+ declare export function argumentPlaceholder(): BabelNodeArgumentPlaceholder;
+ declare export function bindExpression(object: BabelNodeExpression, callee: BabelNodeExpression): BabelNodeBindExpression;
+ declare export function importAttribute(key: BabelNodeIdentifier | BabelNodeStringLiteral, value: BabelNodeStringLiteral): BabelNodeImportAttribute;
+ declare export function decorator(expression: BabelNodeExpression): BabelNodeDecorator;
+ declare export function doExpression(body: BabelNodeBlockStatement, async?: boolean): BabelNodeDoExpression;
+ declare export function exportDefaultSpecifier(exported: BabelNodeIdentifier): BabelNodeExportDefaultSpecifier;
+ declare export function recordExpression(properties: Array<BabelNodeObjectProperty | BabelNodeSpreadElement>): BabelNodeRecordExpression;
+ declare export function tupleExpression(elements?: Array<BabelNodeExpression | BabelNodeSpreadElement>): BabelNodeTupleExpression;
+ declare export function decimalLiteral(value: string): BabelNodeDecimalLiteral;
+ declare export function moduleExpression(body: BabelNodeProgram): BabelNodeModuleExpression;
+ declare export function topicReference(): BabelNodeTopicReference;
+ declare export function pipelineTopicExpression(expression: BabelNodeExpression): BabelNodePipelineTopicExpression;
+ declare export function pipelineBareFunction(callee: BabelNodeExpression): BabelNodePipelineBareFunction;
+ declare export function pipelinePrimaryTopicReference(): BabelNodePipelinePrimaryTopicReference;
+ declare export function tsParameterProperty(parameter: BabelNodeIdentifier | BabelNodeAssignmentPattern): BabelNodeTSParameterProperty;
+ declare export function tsDeclareFunction(id?: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement>, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareFunction;
+ declare export function tsDeclareMethod(decorators?: Array<BabelNodeDecorator>, key: BabelNodeIdentifier | BabelNodeStringLiteral | BabelNodeNumericLiteral | BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration | BabelNodeNoop, params: Array<BabelNodeIdentifier | BabelNodePattern | BabelNodeRestElement | BabelNodeTSParameterProperty>, returnType?: BabelNodeTSTypeAnnotation | BabelNodeNoop): BabelNodeTSDeclareMethod;
+ declare export function tsQualifiedName(left: BabelNodeTSEntityName, right: BabelNodeIdentifier): BabelNodeTSQualifiedName;
+ declare export function tsCallSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSCallSignatureDeclaration;
+ declare export function tsConstructSignatureDeclaration(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructSignatureDeclaration;
+ declare export function tsPropertySignature(key: BabelNodeExpression, typeAnnotation?: BabelNodeTSTypeAnnotation, initializer?: BabelNodeExpression): BabelNodeTSPropertySignature;
+ declare export function tsMethodSignature(key: BabelNodeExpression, typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSMethodSignature;
+ declare export function tsIndexSignature(parameters: Array<BabelNodeIdentifier>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSIndexSignature;
+ declare export function tsAnyKeyword(): BabelNodeTSAnyKeyword;
+ declare export function tsBooleanKeyword(): BabelNodeTSBooleanKeyword;
+ declare export function tsBigIntKeyword(): BabelNodeTSBigIntKeyword;
+ declare export function tsIntrinsicKeyword(): BabelNodeTSIntrinsicKeyword;
+ declare export function tsNeverKeyword(): BabelNodeTSNeverKeyword;
+ declare export function tsNullKeyword(): BabelNodeTSNullKeyword;
+ declare export function tsNumberKeyword(): BabelNodeTSNumberKeyword;
+ declare export function tsObjectKeyword(): BabelNodeTSObjectKeyword;
+ declare export function tsStringKeyword(): BabelNodeTSStringKeyword;
+ declare export function tsSymbolKeyword(): BabelNodeTSSymbolKeyword;
+ declare export function tsUndefinedKeyword(): BabelNodeTSUndefinedKeyword;
+ declare export function tsUnknownKeyword(): BabelNodeTSUnknownKeyword;
+ declare export function tsVoidKeyword(): BabelNodeTSVoidKeyword;
+ declare export function tsThisType(): BabelNodeTSThisType;
+ declare export function tsFunctionType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSFunctionType;
+ declare export function tsConstructorType(typeParameters?: BabelNodeTSTypeParameterDeclaration, parameters: Array<BabelNodeIdentifier | BabelNodeRestElement>, typeAnnotation?: BabelNodeTSTypeAnnotation): BabelNodeTSConstructorType;
+ declare export function tsTypeReference(typeName: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSTypeReference;
+ declare export function tsTypePredicate(parameterName: BabelNodeIdentifier | BabelNodeTSThisType, typeAnnotation?: BabelNodeTSTypeAnnotation, asserts?: boolean): BabelNodeTSTypePredicate;
+ declare export function tsTypeQuery(exprName: BabelNodeTSEntityName | BabelNodeTSImportType): BabelNodeTSTypeQuery;
+ declare export function tsTypeLiteral(members: Array<BabelNodeTSTypeElement>): BabelNodeTSTypeLiteral;
+ declare export function tsArrayType(elementType: BabelNodeTSType): BabelNodeTSArrayType;
+ declare export function tsTupleType(elementTypes: Array<BabelNodeTSType | BabelNodeTSNamedTupleMember>): BabelNodeTSTupleType;
+ declare export function tsOptionalType(typeAnnotation: BabelNodeTSType): BabelNodeTSOptionalType;
+ declare export function tsRestType(typeAnnotation: BabelNodeTSType): BabelNodeTSRestType;
+ declare export function tsNamedTupleMember(label: BabelNodeIdentifier, elementType: BabelNodeTSType, optional?: boolean): BabelNodeTSNamedTupleMember;
+ declare export function tsUnionType(types: Array<BabelNodeTSType>): BabelNodeTSUnionType;
+ declare export function tsIntersectionType(types: Array<BabelNodeTSType>): BabelNodeTSIntersectionType;
+ declare export function tsConditionalType(checkType: BabelNodeTSType, extendsType: BabelNodeTSType, trueType: BabelNodeTSType, falseType: BabelNodeTSType): BabelNodeTSConditionalType;
+ declare export function tsInferType(typeParameter: BabelNodeTSTypeParameter): BabelNodeTSInferType;
+ declare export function tsParenthesizedType(typeAnnotation: BabelNodeTSType): BabelNodeTSParenthesizedType;
+ declare export function tsTypeOperator(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeOperator;
+ declare export function tsIndexedAccessType(objectType: BabelNodeTSType, indexType: BabelNodeTSType): BabelNodeTSIndexedAccessType;
+ declare export function tsMappedType(typeParameter: BabelNodeTSTypeParameter, typeAnnotation?: BabelNodeTSType, nameType?: BabelNodeTSType): BabelNodeTSMappedType;
+ declare export function tsLiteralType(literal: BabelNodeNumericLiteral | BabelNodeStringLiteral | BabelNodeBooleanLiteral | BabelNodeBigIntLiteral | BabelNodeUnaryExpression): BabelNodeTSLiteralType;
+ declare export function tsExpressionWithTypeArguments(expression: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSExpressionWithTypeArguments;
+ declare export function tsInterfaceDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, _extends?: Array<BabelNodeTSExpressionWithTypeArguments>, body: BabelNodeTSInterfaceBody): BabelNodeTSInterfaceDeclaration;
+ declare export function tsInterfaceBody(body: Array<BabelNodeTSTypeElement>): BabelNodeTSInterfaceBody;
+ declare export function tsTypeAliasDeclaration(id: BabelNodeIdentifier, typeParameters?: BabelNodeTSTypeParameterDeclaration, typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAliasDeclaration;
+ declare export function tsAsExpression(expression: BabelNodeExpression, typeAnnotation: BabelNodeTSType): BabelNodeTSAsExpression;
+ declare export function tsTypeAssertion(typeAnnotation: BabelNodeTSType, expression: BabelNodeExpression): BabelNodeTSTypeAssertion;
+ declare export function tsEnumDeclaration(id: BabelNodeIdentifier, members: Array<BabelNodeTSEnumMember>): BabelNodeTSEnumDeclaration;
+ declare export function tsEnumMember(id: BabelNodeIdentifier | BabelNodeStringLiteral, initializer?: BabelNodeExpression): BabelNodeTSEnumMember;
+ declare export function tsModuleDeclaration(id: BabelNodeIdentifier | BabelNodeStringLiteral, body: BabelNodeTSModuleBlock | BabelNodeTSModuleDeclaration): BabelNodeTSModuleDeclaration;
+ declare export function tsModuleBlock(body: Array<BabelNodeStatement>): BabelNodeTSModuleBlock;
+ declare export function tsImportType(argument: BabelNodeStringLiteral, qualifier?: BabelNodeTSEntityName, typeParameters?: BabelNodeTSTypeParameterInstantiation): BabelNodeTSImportType;
+ declare export function tsImportEqualsDeclaration(id: BabelNodeIdentifier, moduleReference: BabelNodeTSEntityName | BabelNodeTSExternalModuleReference): BabelNodeTSImportEqualsDeclaration;
+ declare export function tsExternalModuleReference(expression: BabelNodeStringLiteral): BabelNodeTSExternalModuleReference;
+ declare export function tsNonNullExpression(expression: BabelNodeExpression): BabelNodeTSNonNullExpression;
+ declare export function tsExportAssignment(expression: BabelNodeExpression): BabelNodeTSExportAssignment;
+ declare export function tsNamespaceExportDeclaration(id: BabelNodeIdentifier): BabelNodeTSNamespaceExportDeclaration;
+ declare export function tsTypeAnnotation(typeAnnotation: BabelNodeTSType): BabelNodeTSTypeAnnotation;
+ declare export function tsTypeParameterInstantiation(params: Array<BabelNodeTSType>): BabelNodeTSTypeParameterInstantiation;
+ declare export function tsTypeParameterDeclaration(params: Array<BabelNodeTSTypeParameter>): BabelNodeTSTypeParameterDeclaration;
+ declare export function tsTypeParameter(constraint?: BabelNodeTSType, _default?: BabelNodeTSType, name: string): BabelNodeTSTypeParameter;
+ declare export function isArrayExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayExpression)
+ declare export function assertArrayExpression(node: ?Object, opts?: ?Object): void
+ declare export function isAssignmentExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentExpression)
+ declare export function assertAssignmentExpression(node: ?Object, opts?: ?Object): void
+ declare export function isBinaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBinaryExpression)
+ declare export function assertBinaryExpression(node: ?Object, opts?: ?Object): void
+ declare export function isInterpreterDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterpreterDirective)
+ declare export function assertInterpreterDirective(node: ?Object, opts?: ?Object): void
+ declare export function isDirective(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirective)
+ declare export function assertDirective(node: ?Object, opts?: ?Object): void
+ declare export function isDirectiveLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDirectiveLiteral)
+ declare export function assertDirectiveLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isBlockStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBlockStatement)
+ declare export function assertBlockStatement(node: ?Object, opts?: ?Object): void
+ declare export function isBreakStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBreakStatement)
+ declare export function assertBreakStatement(node: ?Object, opts?: ?Object): void
+ declare export function isCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCallExpression)
+ declare export function assertCallExpression(node: ?Object, opts?: ?Object): void
+ declare export function isCatchClause(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeCatchClause)
+ declare export function assertCatchClause(node: ?Object, opts?: ?Object): void
+ declare export function isConditionalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeConditionalExpression)
+ declare export function assertConditionalExpression(node: ?Object, opts?: ?Object): void
+ declare export function isContinueStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeContinueStatement)
+ declare export function assertContinueStatement(node: ?Object, opts?: ?Object): void
+ declare export function isDebuggerStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDebuggerStatement)
+ declare export function assertDebuggerStatement(node: ?Object, opts?: ?Object): void
+ declare export function isDoWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoWhileStatement)
+ declare export function assertDoWhileStatement(node: ?Object, opts?: ?Object): void
+ declare export function isEmptyStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyStatement)
+ declare export function assertEmptyStatement(node: ?Object, opts?: ?Object): void
+ declare export function isExpressionStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExpressionStatement)
+ declare export function assertExpressionStatement(node: ?Object, opts?: ?Object): void
+ declare export function isFile(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFile)
+ declare export function assertFile(node: ?Object, opts?: ?Object): void
+ declare export function isForInStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForInStatement)
+ declare export function assertForInStatement(node: ?Object, opts?: ?Object): void
+ declare export function isForStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForStatement)
+ declare export function assertForStatement(node: ?Object, opts?: ?Object): void
+ declare export function isFunctionDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionDeclaration)
+ declare export function assertFunctionDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionExpression)
+ declare export function assertFunctionExpression(node: ?Object, opts?: ?Object): void
+ declare export function isIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIdentifier)
+ declare export function assertIdentifier(node: ?Object, opts?: ?Object): void
+ declare export function isIfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIfStatement)
+ declare export function assertIfStatement(node: ?Object, opts?: ?Object): void
+ declare export function isLabeledStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLabeledStatement)
+ declare export function assertLabeledStatement(node: ?Object, opts?: ?Object): void
+ declare export function isStringLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteral)
+ declare export function assertStringLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isNumericLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral)
+ declare export function assertNumericLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isNullLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteral)
+ declare export function assertNullLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isBooleanLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteral)
+ declare export function assertBooleanLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isRegExpLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral)
+ declare export function assertRegExpLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isLogicalExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeLogicalExpression)
+ declare export function assertLogicalExpression(node: ?Object, opts?: ?Object): void
+ declare export function isMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMemberExpression)
+ declare export function assertMemberExpression(node: ?Object, opts?: ?Object): void
+ declare export function isNewExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNewExpression)
+ declare export function assertNewExpression(node: ?Object, opts?: ?Object): void
+ declare export function isProgram(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeProgram)
+ declare export function assertProgram(node: ?Object, opts?: ?Object): void
+ declare export function isObjectExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectExpression)
+ declare export function assertObjectExpression(node: ?Object, opts?: ?Object): void
+ declare export function isObjectMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectMethod)
+ declare export function assertObjectMethod(node: ?Object, opts?: ?Object): void
+ declare export function isObjectProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectProperty)
+ declare export function assertObjectProperty(node: ?Object, opts?: ?Object): void
+ declare export function isRestElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement)
+ declare export function assertRestElement(node: ?Object, opts?: ?Object): void
+ declare export function isReturnStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeReturnStatement)
+ declare export function assertReturnStatement(node: ?Object, opts?: ?Object): void
+ declare export function isSequenceExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSequenceExpression)
+ declare export function assertSequenceExpression(node: ?Object, opts?: ?Object): void
+ declare export function isParenthesizedExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeParenthesizedExpression)
+ declare export function assertParenthesizedExpression(node: ?Object, opts?: ?Object): void
+ declare export function isSwitchCase(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchCase)
+ declare export function assertSwitchCase(node: ?Object, opts?: ?Object): void
+ declare export function isSwitchStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSwitchStatement)
+ declare export function assertSwitchStatement(node: ?Object, opts?: ?Object): void
+ declare export function isThisExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisExpression)
+ declare export function assertThisExpression(node: ?Object, opts?: ?Object): void
+ declare export function isThrowStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThrowStatement)
+ declare export function assertThrowStatement(node: ?Object, opts?: ?Object): void
+ declare export function isTryStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTryStatement)
+ declare export function assertTryStatement(node: ?Object, opts?: ?Object): void
+ declare export function isUnaryExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnaryExpression)
+ declare export function assertUnaryExpression(node: ?Object, opts?: ?Object): void
+ declare export function isUpdateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUpdateExpression)
+ declare export function assertUpdateExpression(node: ?Object, opts?: ?Object): void
+ declare export function isVariableDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclaration)
+ declare export function assertVariableDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isVariableDeclarator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariableDeclarator)
+ declare export function assertVariableDeclarator(node: ?Object, opts?: ?Object): void
+ declare export function isWhileStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWhileStatement)
+ declare export function assertWhileStatement(node: ?Object, opts?: ?Object): void
+ declare export function isWithStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeWithStatement)
+ declare export function assertWithStatement(node: ?Object, opts?: ?Object): void
+ declare export function isAssignmentPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAssignmentPattern)
+ declare export function assertAssignmentPattern(node: ?Object, opts?: ?Object): void
+ declare export function isArrayPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayPattern)
+ declare export function assertArrayPattern(node: ?Object, opts?: ?Object): void
+ declare export function isArrowFunctionExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrowFunctionExpression)
+ declare export function assertArrowFunctionExpression(node: ?Object, opts?: ?Object): void
+ declare export function isClassBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassBody)
+ declare export function assertClassBody(node: ?Object, opts?: ?Object): void
+ declare export function isClassExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassExpression)
+ declare export function assertClassExpression(node: ?Object, opts?: ?Object): void
+ declare export function isClassDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassDeclaration)
+ declare export function assertClassDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportAllDeclaration)
+ declare export function assertExportAllDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isExportDefaultDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultDeclaration)
+ declare export function assertExportDefaultDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isExportNamedDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamedDeclaration)
+ declare export function assertExportNamedDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isExportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportSpecifier)
+ declare export function assertExportSpecifier(node: ?Object, opts?: ?Object): void
+ declare export function isForOfStatement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeForOfStatement)
+ declare export function assertForOfStatement(node: ?Object, opts?: ?Object): void
+ declare export function isImportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDeclaration)
+ declare export function assertImportDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isImportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportDefaultSpecifier)
+ declare export function assertImportDefaultSpecifier(node: ?Object, opts?: ?Object): void
+ declare export function isImportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportNamespaceSpecifier)
+ declare export function assertImportNamespaceSpecifier(node: ?Object, opts?: ?Object): void
+ declare export function isImportSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportSpecifier)
+ declare export function assertImportSpecifier(node: ?Object, opts?: ?Object): void
+ declare export function isMetaProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMetaProperty)
+ declare export function assertMetaProperty(node: ?Object, opts?: ?Object): void
+ declare export function isClassMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassMethod)
+ declare export function assertClassMethod(node: ?Object, opts?: ?Object): void
+ declare export function isObjectPattern(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectPattern)
+ declare export function assertObjectPattern(node: ?Object, opts?: ?Object): void
+ declare export function isSpreadElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement)
+ declare export function assertSpreadElement(node: ?Object, opts?: ?Object): void
+ declare export function isSuper(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSuper)
+ declare export function assertSuper(node: ?Object, opts?: ?Object): void
+ declare export function isTaggedTemplateExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTaggedTemplateExpression)
+ declare export function assertTaggedTemplateExpression(node: ?Object, opts?: ?Object): void
+ declare export function isTemplateElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateElement)
+ declare export function assertTemplateElement(node: ?Object, opts?: ?Object): void
+ declare export function isTemplateLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTemplateLiteral)
+ declare export function assertTemplateLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isYieldExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeYieldExpression)
+ declare export function assertYieldExpression(node: ?Object, opts?: ?Object): void
+ declare export function isAwaitExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAwaitExpression)
+ declare export function assertAwaitExpression(node: ?Object, opts?: ?Object): void
+ declare export function isImport(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImport)
+ declare export function assertImport(node: ?Object, opts?: ?Object): void
+ declare export function isBigIntLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBigIntLiteral)
+ declare export function assertBigIntLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isExportNamespaceSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportNamespaceSpecifier)
+ declare export function assertExportNamespaceSpecifier(node: ?Object, opts?: ?Object): void
+ declare export function isOptionalMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalMemberExpression)
+ declare export function assertOptionalMemberExpression(node: ?Object, opts?: ?Object): void
+ declare export function isOptionalCallExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalCallExpression)
+ declare export function assertOptionalCallExpression(node: ?Object, opts?: ?Object): void
+ declare export function isClassProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassProperty)
+ declare export function assertClassProperty(node: ?Object, opts?: ?Object): void
+ declare export function isClassAccessorProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassAccessorProperty)
+ declare export function assertClassAccessorProperty(node: ?Object, opts?: ?Object): void
+ declare export function isClassPrivateProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateProperty)
+ declare export function assertClassPrivateProperty(node: ?Object, opts?: ?Object): void
+ declare export function isClassPrivateMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassPrivateMethod)
+ declare export function assertClassPrivateMethod(node: ?Object, opts?: ?Object): void
+ declare export function isPrivateName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePrivateName)
+ declare export function assertPrivateName(node: ?Object, opts?: ?Object): void
+ declare export function isStaticBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStaticBlock)
+ declare export function assertStaticBlock(node: ?Object, opts?: ?Object): void
+ declare export function isAnyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeAnyTypeAnnotation)
+ declare export function assertAnyTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isArrayTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArrayTypeAnnotation)
+ declare export function assertArrayTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isBooleanTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanTypeAnnotation)
+ declare export function assertBooleanTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBooleanLiteralTypeAnnotation)
+ declare export function assertBooleanLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullLiteralTypeAnnotation)
+ declare export function assertNullLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isClassImplements(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeClassImplements)
+ declare export function assertClassImplements(node: ?Object, opts?: ?Object): void
+ declare export function isDeclareClass(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareClass)
+ declare export function assertDeclareClass(node: ?Object, opts?: ?Object): void
+ declare export function isDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareFunction)
+ declare export function assertDeclareFunction(node: ?Object, opts?: ?Object): void
+ declare export function isDeclareInterface(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareInterface)
+ declare export function assertDeclareInterface(node: ?Object, opts?: ?Object): void
+ declare export function isDeclareModule(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModule)
+ declare export function assertDeclareModule(node: ?Object, opts?: ?Object): void
+ declare export function isDeclareModuleExports(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareModuleExports)
+ declare export function assertDeclareModuleExports(node: ?Object, opts?: ?Object): void
+ declare export function isDeclareTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareTypeAlias)
+ declare export function assertDeclareTypeAlias(node: ?Object, opts?: ?Object): void
+ declare export function isDeclareOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareOpaqueType)
+ declare export function assertDeclareOpaqueType(node: ?Object, opts?: ?Object): void
+ declare export function isDeclareVariable(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareVariable)
+ declare export function assertDeclareVariable(node: ?Object, opts?: ?Object): void
+ declare export function isDeclareExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportDeclaration)
+ declare export function assertDeclareExportDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclareExportAllDeclaration)
+ declare export function assertDeclareExportAllDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isDeclaredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDeclaredPredicate)
+ declare export function assertDeclaredPredicate(node: ?Object, opts?: ?Object): void
+ declare export function isExistsTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExistsTypeAnnotation)
+ declare export function assertExistsTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isFunctionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeAnnotation)
+ declare export function assertFunctionTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isFunctionTypeParam(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeFunctionTypeParam)
+ declare export function assertFunctionTypeParam(node: ?Object, opts?: ?Object): void
+ declare export function isGenericTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeGenericTypeAnnotation)
+ declare export function assertGenericTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isInferredPredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInferredPredicate)
+ declare export function assertInferredPredicate(node: ?Object, opts?: ?Object): void
+ declare export function isInterfaceExtends(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceExtends)
+ declare export function assertInterfaceExtends(node: ?Object, opts?: ?Object): void
+ declare export function isInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceDeclaration)
+ declare export function assertInterfaceDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeInterfaceTypeAnnotation)
+ declare export function assertInterfaceTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIntersectionTypeAnnotation)
+ declare export function assertIntersectionTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isMixedTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeMixedTypeAnnotation)
+ declare export function assertMixedTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isEmptyTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEmptyTypeAnnotation)
+ declare export function assertEmptyTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isNullableTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNullableTypeAnnotation)
+ declare export function assertNullableTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberLiteralTypeAnnotation)
+ declare export function assertNumberLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isNumberTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumberTypeAnnotation)
+ declare export function assertNumberTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isObjectTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeAnnotation)
+ declare export function assertObjectTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isObjectTypeInternalSlot(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeInternalSlot)
+ declare export function assertObjectTypeInternalSlot(node: ?Object, opts?: ?Object): void
+ declare export function isObjectTypeCallProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeCallProperty)
+ declare export function assertObjectTypeCallProperty(node: ?Object, opts?: ?Object): void
+ declare export function isObjectTypeIndexer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeIndexer)
+ declare export function assertObjectTypeIndexer(node: ?Object, opts?: ?Object): void
+ declare export function isObjectTypeProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeProperty)
+ declare export function assertObjectTypeProperty(node: ?Object, opts?: ?Object): void
+ declare export function isObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeObjectTypeSpreadProperty)
+ declare export function assertObjectTypeSpreadProperty(node: ?Object, opts?: ?Object): void
+ declare export function isOpaqueType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOpaqueType)
+ declare export function assertOpaqueType(node: ?Object, opts?: ?Object): void
+ declare export function isQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeQualifiedTypeIdentifier)
+ declare export function assertQualifiedTypeIdentifier(node: ?Object, opts?: ?Object): void
+ declare export function isStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringLiteralTypeAnnotation)
+ declare export function assertStringLiteralTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isStringTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeStringTypeAnnotation)
+ declare export function assertStringTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isSymbolTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSymbolTypeAnnotation)
+ declare export function assertSymbolTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isThisTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeThisTypeAnnotation)
+ declare export function assertThisTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isTupleTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleTypeAnnotation)
+ declare export function assertTupleTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isTypeofTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeofTypeAnnotation)
+ declare export function assertTypeofTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isTypeAlias(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAlias)
+ declare export function assertTypeAlias(node: ?Object, opts?: ?Object): void
+ declare export function isTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeAnnotation)
+ declare export function assertTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isTypeCastExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeCastExpression)
+ declare export function assertTypeCastExpression(node: ?Object, opts?: ?Object): void
+ declare export function isTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameter)
+ declare export function assertTypeParameter(node: ?Object, opts?: ?Object): void
+ declare export function isTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterDeclaration)
+ declare export function assertTypeParameterDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTypeParameterInstantiation)
+ declare export function assertTypeParameterInstantiation(node: ?Object, opts?: ?Object): void
+ declare export function isUnionTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeUnionTypeAnnotation)
+ declare export function assertUnionTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isVariance(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVariance)
+ declare export function assertVariance(node: ?Object, opts?: ?Object): void
+ declare export function isVoidTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeVoidTypeAnnotation)
+ declare export function assertVoidTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDeclaration)
+ declare export function assertEnumDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isEnumBooleanBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanBody)
+ declare export function assertEnumBooleanBody(node: ?Object, opts?: ?Object): void
+ declare export function isEnumNumberBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberBody)
+ declare export function assertEnumNumberBody(node: ?Object, opts?: ?Object): void
+ declare export function isEnumStringBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringBody)
+ declare export function assertEnumStringBody(node: ?Object, opts?: ?Object): void
+ declare export function isEnumSymbolBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumSymbolBody)
+ declare export function assertEnumSymbolBody(node: ?Object, opts?: ?Object): void
+ declare export function isEnumBooleanMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumBooleanMember)
+ declare export function assertEnumBooleanMember(node: ?Object, opts?: ?Object): void
+ declare export function isEnumNumberMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumNumberMember)
+ declare export function assertEnumNumberMember(node: ?Object, opts?: ?Object): void
+ declare export function isEnumStringMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumStringMember)
+ declare export function assertEnumStringMember(node: ?Object, opts?: ?Object): void
+ declare export function isEnumDefaultedMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeEnumDefaultedMember)
+ declare export function assertEnumDefaultedMember(node: ?Object, opts?: ?Object): void
+ declare export function isIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeIndexedAccessType)
+ declare export function assertIndexedAccessType(node: ?Object, opts?: ?Object): void
+ declare export function isOptionalIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeOptionalIndexedAccessType)
+ declare export function assertOptionalIndexedAccessType(node: ?Object, opts?: ?Object): void
+ declare export function isJSXAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXAttribute)
+ declare export function assertJSXAttribute(node: ?Object, opts?: ?Object): void
+ declare export function isJSXClosingElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingElement)
+ declare export function assertJSXClosingElement(node: ?Object, opts?: ?Object): void
+ declare export function isJSXElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXElement)
+ declare export function assertJSXElement(node: ?Object, opts?: ?Object): void
+ declare export function isJSXEmptyExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXEmptyExpression)
+ declare export function assertJSXEmptyExpression(node: ?Object, opts?: ?Object): void
+ declare export function isJSXExpressionContainer(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXExpressionContainer)
+ declare export function assertJSXExpressionContainer(node: ?Object, opts?: ?Object): void
+ declare export function isJSXSpreadChild(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadChild)
+ declare export function assertJSXSpreadChild(node: ?Object, opts?: ?Object): void
+ declare export function isJSXIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXIdentifier)
+ declare export function assertJSXIdentifier(node: ?Object, opts?: ?Object): void
+ declare export function isJSXMemberExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXMemberExpression)
+ declare export function assertJSXMemberExpression(node: ?Object, opts?: ?Object): void
+ declare export function isJSXNamespacedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXNamespacedName)
+ declare export function assertJSXNamespacedName(node: ?Object, opts?: ?Object): void
+ declare export function isJSXOpeningElement(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningElement)
+ declare export function assertJSXOpeningElement(node: ?Object, opts?: ?Object): void
+ declare export function isJSXSpreadAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXSpreadAttribute)
+ declare export function assertJSXSpreadAttribute(node: ?Object, opts?: ?Object): void
+ declare export function isJSXText(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXText)
+ declare export function assertJSXText(node: ?Object, opts?: ?Object): void
+ declare export function isJSXFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXFragment)
+ declare export function assertJSXFragment(node: ?Object, opts?: ?Object): void
+ declare export function isJSXOpeningFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXOpeningFragment)
+ declare export function assertJSXOpeningFragment(node: ?Object, opts?: ?Object): void
+ declare export function isJSXClosingFragment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeJSXClosingFragment)
+ declare export function assertJSXClosingFragment(node: ?Object, opts?: ?Object): void
+ declare export function isNoop(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNoop)
+ declare export function assertNoop(node: ?Object, opts?: ?Object): void
+ declare export function isPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePlaceholder)
+ declare export function assertPlaceholder(node: ?Object, opts?: ?Object): void
+ declare export function isV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeV8IntrinsicIdentifier)
+ declare export function assertV8IntrinsicIdentifier(node: ?Object, opts?: ?Object): void
+ declare export function isArgumentPlaceholder(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeArgumentPlaceholder)
+ declare export function assertArgumentPlaceholder(node: ?Object, opts?: ?Object): void
+ declare export function isBindExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeBindExpression)
+ declare export function assertBindExpression(node: ?Object, opts?: ?Object): void
+ declare export function isImportAttribute(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeImportAttribute)
+ declare export function assertImportAttribute(node: ?Object, opts?: ?Object): void
+ declare export function isDecorator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecorator)
+ declare export function assertDecorator(node: ?Object, opts?: ?Object): void
+ declare export function isDoExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDoExpression)
+ declare export function assertDoExpression(node: ?Object, opts?: ?Object): void
+ declare export function isExportDefaultSpecifier(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeExportDefaultSpecifier)
+ declare export function assertExportDefaultSpecifier(node: ?Object, opts?: ?Object): void
+ declare export function isRecordExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRecordExpression)
+ declare export function assertRecordExpression(node: ?Object, opts?: ?Object): void
+ declare export function isTupleExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTupleExpression)
+ declare export function assertTupleExpression(node: ?Object, opts?: ?Object): void
+ declare export function isDecimalLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeDecimalLiteral)
+ declare export function assertDecimalLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isModuleExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeModuleExpression)
+ declare export function assertModuleExpression(node: ?Object, opts?: ?Object): void
+ declare export function isTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTopicReference)
+ declare export function assertTopicReference(node: ?Object, opts?: ?Object): void
+ declare export function isPipelineTopicExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineTopicExpression)
+ declare export function assertPipelineTopicExpression(node: ?Object, opts?: ?Object): void
+ declare export function isPipelineBareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelineBareFunction)
+ declare export function assertPipelineBareFunction(node: ?Object, opts?: ?Object): void
+ declare export function isPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodePipelinePrimaryTopicReference)
+ declare export function assertPipelinePrimaryTopicReference(node: ?Object, opts?: ?Object): void
+ declare export function isTSParameterProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParameterProperty)
+ declare export function assertTSParameterProperty(node: ?Object, opts?: ?Object): void
+ declare export function isTSDeclareFunction(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareFunction)
+ declare export function assertTSDeclareFunction(node: ?Object, opts?: ?Object): void
+ declare export function isTSDeclareMethod(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSDeclareMethod)
+ declare export function assertTSDeclareMethod(node: ?Object, opts?: ?Object): void
+ declare export function isTSQualifiedName(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSQualifiedName)
+ declare export function assertTSQualifiedName(node: ?Object, opts?: ?Object): void
+ declare export function isTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSCallSignatureDeclaration)
+ declare export function assertTSCallSignatureDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructSignatureDeclaration)
+ declare export function assertTSConstructSignatureDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isTSPropertySignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSPropertySignature)
+ declare export function assertTSPropertySignature(node: ?Object, opts?: ?Object): void
+ declare export function isTSMethodSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMethodSignature)
+ declare export function assertTSMethodSignature(node: ?Object, opts?: ?Object): void
+ declare export function isTSIndexSignature(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexSignature)
+ declare export function assertTSIndexSignature(node: ?Object, opts?: ?Object): void
+ declare export function isTSAnyKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAnyKeyword)
+ declare export function assertTSAnyKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSBooleanKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBooleanKeyword)
+ declare export function assertTSBooleanKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSBigIntKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSBigIntKeyword)
+ declare export function assertTSBigIntKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSIntrinsicKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntrinsicKeyword)
+ declare export function assertTSIntrinsicKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSNeverKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNeverKeyword)
+ declare export function assertTSNeverKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSNullKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNullKeyword)
+ declare export function assertTSNullKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSNumberKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNumberKeyword)
+ declare export function assertTSNumberKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSObjectKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSObjectKeyword)
+ declare export function assertTSObjectKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSStringKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSStringKeyword)
+ declare export function assertTSStringKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSSymbolKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSSymbolKeyword)
+ declare export function assertTSSymbolKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSUndefinedKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUndefinedKeyword)
+ declare export function assertTSUndefinedKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSUnknownKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnknownKeyword)
+ declare export function assertTSUnknownKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSVoidKeyword(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSVoidKeyword)
+ declare export function assertTSVoidKeyword(node: ?Object, opts?: ?Object): void
+ declare export function isTSThisType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSThisType)
+ declare export function assertTSThisType(node: ?Object, opts?: ?Object): void
+ declare export function isTSFunctionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSFunctionType)
+ declare export function assertTSFunctionType(node: ?Object, opts?: ?Object): void
+ declare export function isTSConstructorType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConstructorType)
+ declare export function assertTSConstructorType(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeReference)
+ declare export function assertTSTypeReference(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypePredicate(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypePredicate)
+ declare export function assertTSTypePredicate(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeQuery(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeQuery)
+ declare export function assertTSTypeQuery(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeLiteral)
+ declare export function assertTSTypeLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isTSArrayType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSArrayType)
+ declare export function assertTSArrayType(node: ?Object, opts?: ?Object): void
+ declare export function isTSTupleType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTupleType)
+ declare export function assertTSTupleType(node: ?Object, opts?: ?Object): void
+ declare export function isTSOptionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSOptionalType)
+ declare export function assertTSOptionalType(node: ?Object, opts?: ?Object): void
+ declare export function isTSRestType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSRestType)
+ declare export function assertTSRestType(node: ?Object, opts?: ?Object): void
+ declare export function isTSNamedTupleMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamedTupleMember)
+ declare export function assertTSNamedTupleMember(node: ?Object, opts?: ?Object): void
+ declare export function isTSUnionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSUnionType)
+ declare export function assertTSUnionType(node: ?Object, opts?: ?Object): void
+ declare export function isTSIntersectionType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIntersectionType)
+ declare export function assertTSIntersectionType(node: ?Object, opts?: ?Object): void
+ declare export function isTSConditionalType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSConditionalType)
+ declare export function assertTSConditionalType(node: ?Object, opts?: ?Object): void
+ declare export function isTSInferType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInferType)
+ declare export function assertTSInferType(node: ?Object, opts?: ?Object): void
+ declare export function isTSParenthesizedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSParenthesizedType)
+ declare export function assertTSParenthesizedType(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeOperator(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeOperator)
+ declare export function assertTSTypeOperator(node: ?Object, opts?: ?Object): void
+ declare export function isTSIndexedAccessType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSIndexedAccessType)
+ declare export function assertTSIndexedAccessType(node: ?Object, opts?: ?Object): void
+ declare export function isTSMappedType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSMappedType)
+ declare export function assertTSMappedType(node: ?Object, opts?: ?Object): void
+ declare export function isTSLiteralType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSLiteralType)
+ declare export function assertTSLiteralType(node: ?Object, opts?: ?Object): void
+ declare export function isTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExpressionWithTypeArguments)
+ declare export function assertTSExpressionWithTypeArguments(node: ?Object, opts?: ?Object): void
+ declare export function isTSInterfaceDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceDeclaration)
+ declare export function assertTSInterfaceDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isTSInterfaceBody(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSInterfaceBody)
+ declare export function assertTSInterfaceBody(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAliasDeclaration)
+ declare export function assertTSTypeAliasDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isTSAsExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSAsExpression)
+ declare export function assertTSAsExpression(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeAssertion(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAssertion)
+ declare export function assertTSTypeAssertion(node: ?Object, opts?: ?Object): void
+ declare export function isTSEnumDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumDeclaration)
+ declare export function assertTSEnumDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isTSEnumMember(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSEnumMember)
+ declare export function assertTSEnumMember(node: ?Object, opts?: ?Object): void
+ declare export function isTSModuleDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleDeclaration)
+ declare export function assertTSModuleDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isTSModuleBlock(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSModuleBlock)
+ declare export function assertTSModuleBlock(node: ?Object, opts?: ?Object): void
+ declare export function isTSImportType(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportType)
+ declare export function assertTSImportType(node: ?Object, opts?: ?Object): void
+ declare export function isTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSImportEqualsDeclaration)
+ declare export function assertTSImportEqualsDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isTSExternalModuleReference(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExternalModuleReference)
+ declare export function assertTSExternalModuleReference(node: ?Object, opts?: ?Object): void
+ declare export function isTSNonNullExpression(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNonNullExpression)
+ declare export function assertTSNonNullExpression(node: ?Object, opts?: ?Object): void
+ declare export function isTSExportAssignment(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSExportAssignment)
+ declare export function assertTSExportAssignment(node: ?Object, opts?: ?Object): void
+ declare export function isTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSNamespaceExportDeclaration)
+ declare export function assertTSNamespaceExportDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeAnnotation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeAnnotation)
+ declare export function assertTSTypeAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterInstantiation)
+ declare export function assertTSTypeParameterInstantiation(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameterDeclaration)
+ declare export function assertTSTypeParameterDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeParameter(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeTSTypeParameter)
+ declare export function assertTSTypeParameter(node: ?Object, opts?: ?Object): void
+ declare export function isStandardized(node: ?Object, opts?: ?Object): boolean
+ declare export function assertStandardized(node: ?Object, opts?: ?Object): void
+ declare export function isExpression(node: ?Object, opts?: ?Object): boolean
+ declare export function assertExpression(node: ?Object, opts?: ?Object): void
+ declare export function isBinary(node: ?Object, opts?: ?Object): boolean
+ declare export function assertBinary(node: ?Object, opts?: ?Object): void
+ declare export function isScopable(node: ?Object, opts?: ?Object): boolean
+ declare export function assertScopable(node: ?Object, opts?: ?Object): void
+ declare export function isBlockParent(node: ?Object, opts?: ?Object): boolean
+ declare export function assertBlockParent(node: ?Object, opts?: ?Object): void
+ declare export function isBlock(node: ?Object, opts?: ?Object): boolean
+ declare export function assertBlock(node: ?Object, opts?: ?Object): void
+ declare export function isStatement(node: ?Object, opts?: ?Object): boolean
+ declare export function assertStatement(node: ?Object, opts?: ?Object): void
+ declare export function isTerminatorless(node: ?Object, opts?: ?Object): boolean
+ declare export function assertTerminatorless(node: ?Object, opts?: ?Object): void
+ declare export function isCompletionStatement(node: ?Object, opts?: ?Object): boolean
+ declare export function assertCompletionStatement(node: ?Object, opts?: ?Object): void
+ declare export function isConditional(node: ?Object, opts?: ?Object): boolean
+ declare export function assertConditional(node: ?Object, opts?: ?Object): void
+ declare export function isLoop(node: ?Object, opts?: ?Object): boolean
+ declare export function assertLoop(node: ?Object, opts?: ?Object): void
+ declare export function isWhile(node: ?Object, opts?: ?Object): boolean
+ declare export function assertWhile(node: ?Object, opts?: ?Object): void
+ declare export function isExpressionWrapper(node: ?Object, opts?: ?Object): boolean
+ declare export function assertExpressionWrapper(node: ?Object, opts?: ?Object): void
+ declare export function isFor(node: ?Object, opts?: ?Object): boolean
+ declare export function assertFor(node: ?Object, opts?: ?Object): void
+ declare export function isForXStatement(node: ?Object, opts?: ?Object): boolean
+ declare export function assertForXStatement(node: ?Object, opts?: ?Object): void
+ declare export function isFunction(node: ?Object, opts?: ?Object): boolean
+ declare export function assertFunction(node: ?Object, opts?: ?Object): void
+ declare export function isFunctionParent(node: ?Object, opts?: ?Object): boolean
+ declare export function assertFunctionParent(node: ?Object, opts?: ?Object): void
+ declare export function isPureish(node: ?Object, opts?: ?Object): boolean
+ declare export function assertPureish(node: ?Object, opts?: ?Object): void
+ declare export function isDeclaration(node: ?Object, opts?: ?Object): boolean
+ declare export function assertDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isPatternLike(node: ?Object, opts?: ?Object): boolean
+ declare export function assertPatternLike(node: ?Object, opts?: ?Object): void
+ declare export function isLVal(node: ?Object, opts?: ?Object): boolean
+ declare export function assertLVal(node: ?Object, opts?: ?Object): void
+ declare export function isTSEntityName(node: ?Object, opts?: ?Object): boolean
+ declare export function assertTSEntityName(node: ?Object, opts?: ?Object): void
+ declare export function isLiteral(node: ?Object, opts?: ?Object): boolean
+ declare export function assertLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isImmutable(node: ?Object, opts?: ?Object): boolean
+ declare export function assertImmutable(node: ?Object, opts?: ?Object): void
+ declare export function isUserWhitespacable(node: ?Object, opts?: ?Object): boolean
+ declare export function assertUserWhitespacable(node: ?Object, opts?: ?Object): void
+ declare export function isMethod(node: ?Object, opts?: ?Object): boolean
+ declare export function assertMethod(node: ?Object, opts?: ?Object): void
+ declare export function isObjectMember(node: ?Object, opts?: ?Object): boolean
+ declare export function assertObjectMember(node: ?Object, opts?: ?Object): void
+ declare export function isProperty(node: ?Object, opts?: ?Object): boolean
+ declare export function assertProperty(node: ?Object, opts?: ?Object): void
+ declare export function isUnaryLike(node: ?Object, opts?: ?Object): boolean
+ declare export function assertUnaryLike(node: ?Object, opts?: ?Object): void
+ declare export function isPattern(node: ?Object, opts?: ?Object): boolean
+ declare export function assertPattern(node: ?Object, opts?: ?Object): void
+ declare export function isClass(node: ?Object, opts?: ?Object): boolean
+ declare export function assertClass(node: ?Object, opts?: ?Object): void
+ declare export function isModuleDeclaration(node: ?Object, opts?: ?Object): boolean
+ declare export function assertModuleDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isExportDeclaration(node: ?Object, opts?: ?Object): boolean
+ declare export function assertExportDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isModuleSpecifier(node: ?Object, opts?: ?Object): boolean
+ declare export function assertModuleSpecifier(node: ?Object, opts?: ?Object): void
+ declare export function isAccessor(node: ?Object, opts?: ?Object): boolean
+ declare export function assertAccessor(node: ?Object, opts?: ?Object): void
+ declare export function isPrivate(node: ?Object, opts?: ?Object): boolean
+ declare export function assertPrivate(node: ?Object, opts?: ?Object): void
+ declare export function isFlow(node: ?Object, opts?: ?Object): boolean
+ declare export function assertFlow(node: ?Object, opts?: ?Object): void
+ declare export function isFlowType(node: ?Object, opts?: ?Object): boolean
+ declare export function assertFlowType(node: ?Object, opts?: ?Object): void
+ declare export function isFlowBaseAnnotation(node: ?Object, opts?: ?Object): boolean
+ declare export function assertFlowBaseAnnotation(node: ?Object, opts?: ?Object): void
+ declare export function isFlowDeclaration(node: ?Object, opts?: ?Object): boolean
+ declare export function assertFlowDeclaration(node: ?Object, opts?: ?Object): void
+ declare export function isFlowPredicate(node: ?Object, opts?: ?Object): boolean
+ declare export function assertFlowPredicate(node: ?Object, opts?: ?Object): void
+ declare export function isEnumBody(node: ?Object, opts?: ?Object): boolean
+ declare export function assertEnumBody(node: ?Object, opts?: ?Object): void
+ declare export function isEnumMember(node: ?Object, opts?: ?Object): boolean
+ declare export function assertEnumMember(node: ?Object, opts?: ?Object): void
+ declare export function isJSX(node: ?Object, opts?: ?Object): boolean
+ declare export function assertJSX(node: ?Object, opts?: ?Object): void
+ declare export function isMiscellaneous(node: ?Object, opts?: ?Object): boolean
+ declare export function assertMiscellaneous(node: ?Object, opts?: ?Object): void
+ declare export function isTypeScript(node: ?Object, opts?: ?Object): boolean
+ declare export function assertTypeScript(node: ?Object, opts?: ?Object): void
+ declare export function isTSTypeElement(node: ?Object, opts?: ?Object): boolean
+ declare export function assertTSTypeElement(node: ?Object, opts?: ?Object): void
+ declare export function isTSType(node: ?Object, opts?: ?Object): boolean
+ declare export function assertTSType(node: ?Object, opts?: ?Object): void
+ declare export function isTSBaseType(node: ?Object, opts?: ?Object): boolean
+ declare export function assertTSBaseType(node: ?Object, opts?: ?Object): void
+ declare export function isNumberLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeNumericLiteral)
+ declare export function assertNumberLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isRegexLiteral(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRegExpLiteral)
+ declare export function assertRegexLiteral(node: ?Object, opts?: ?Object): void
+ declare export function isRestProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeRestElement)
+ declare export function assertRestProperty(node: ?Object, opts?: ?Object): void
+ declare export function isSpreadProperty(node: ?Object, opts?: ?Object): boolean %checks (node instanceof BabelNodeSpreadElement)
+ declare export function assertSpreadProperty(node: ?Object, opts?: ?Object): void
+ declare export var VISITOR_KEYS: { [type: string]: string[] }
+ declare export function assertNode(obj: any): void
+ declare export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): BabelNodeTypeAnnotation
+ declare export function createUnionTypeAnnotation(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation
+ declare export function createFlowUnionType(types: Array<BabelNodeFlowType>): BabelNodeUnionTypeAnnotation
+ declare export function buildChildren(node: { children: Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment | BabelNodeJSXEmptyExpression> }): Array<BabelNodeJSXText | BabelNodeJSXExpressionContainer | BabelNodeJSXSpreadChild | BabelNodeJSXElement | BabelNodeJSXFragment>
+ declare export function clone<T>(n: T): T;
+ declare export function cloneDeep<T>(n: T): T;
+ declare export function cloneDeepWithoutLoc<T>(n: T): T;
+ declare export function cloneNode<T>(n: T, deep?: boolean, withoutLoc?: boolean): T;
+ declare export function cloneWithoutLoc<T>(n: T): T;
+ declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'
+ declare export function addComment<T: BabelNode>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T
+ declare export function addComments<T: BabelNode>(node: T, type: CommentTypeShorthand, comments: Array<Comment>): T
+ declare export function inheritInnerComments(node: BabelNode, parent: BabelNode): void
+ declare export function inheritLeadingComments(node: BabelNode, parent: BabelNode): void
+ declare export function inheritsComments<T: BabelNode>(node: T, parent: BabelNode): void
+ declare export function inheritTrailingComments(node: BabelNode, parent: BabelNode): void
+ declare export function removeComments<T: BabelNode>(node: T): T
+ declare export function ensureBlock(node: BabelNode, key: string): BabelNodeBlockStatement
+ declare export function toBindingIdentifierName(name?: ?string): string
+ declare export function toBlock(node: BabelNodeStatement | BabelNodeExpression, parent?: BabelNodeFunction | null): BabelNodeBlockStatement
+ declare export function toComputedKey(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNodeExpression | BabelNodeIdentifier): BabelNodeExpression
+ declare export function toExpression(node: BabelNodeExpressionStatement | BabelNodeExpression | BabelNodeClass | BabelNodeFunction): BabelNodeExpression
+ declare export function toIdentifier(name?: ?string): string
+ declare export function toKeyAlias(node: BabelNodeMethod | BabelNodeProperty, key?: BabelNode): string
+ declare export function toStatement(node: BabelNodeStatement | BabelNodeClass | BabelNodeFunction | BabelNodeAssignmentExpression, ignore?: boolean): BabelNodeStatement | void
+ declare export function valueToNode(value: any): BabelNodeExpression
+ declare export function removeTypeDuplicates(types: Array<BabelNodeFlowType>): Array<BabelNodeFlowType>
+ declare export function appendToMemberExpression(member: BabelNodeMemberExpression, append: BabelNode, computed?: boolean): BabelNodeMemberExpression
+ declare export function inherits<T: BabelNode>(child: T, parent: BabelNode | null | void): T
+ declare export function prependToMemberExpression(member: BabelNodeMemberExpression, prepend: BabelNodeExpression): BabelNodeMemberExpression
+ declare export function removeProperties<T>(n: T, opts: ?{}): void;
+ declare export function removePropertiesDeep<T>(n: T, opts: ?{}): T;
+ declare export var getBindingIdentifiers: {
+ (node: BabelNode, duplicates?: boolean, outerOnly?: boolean): { [key: string]: BabelNodeIdentifier | Array<BabelNodeIdentifier> },
+ keys: { [type: string]: string[] }
+ }
+ declare export function getOuterBindingIdentifiers(node: BabelNode, duplicates?: boolean): { [key: string]: BabelNodeIdentifier | Array<BabelNodeIdentifier> }
+ declare type TraversalAncestors = Array<{
+ node: BabelNode,
+ key: string,
+ index?: number,
+ }>;
+ declare type TraversalHandler<T> = (BabelNode, TraversalAncestors, T) => void;
+ declare type TraversalHandlers<T> = {
+ enter?: TraversalHandler<T>,
+ exit?: TraversalHandler<T>,
+ };
+ declare export function traverse<T>(n: BabelNode, TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;
+ declare export function traverseFast<T>(n: BabelNode, h: TraversalHandler<T>, state?: T): void;
+ declare export function shallowEqual(actual: Object, expected: Object): boolean
+ declare export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean
+ declare export function is(type: string, n: BabelNode, opts: Object): boolean;
+ declare export function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean
+ declare export function isBlockScoped(node: BabelNode): boolean
+ declare export function isImmutable(node: BabelNode): boolean
+ declare export function isLet(node: BabelNode): boolean
+ declare export function isNode(node: ?Object): boolean
+ declare export function isNodesEquivalent(a: any, b: any): boolean
+ declare export function isPlaceholderType(placeholderType: string, targetType: string): boolean
+ declare export function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean
+ declare export function isScope(node: BabelNode, parent: BabelNode): boolean
+ declare export function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean
+ declare export function isType(nodetype: ?string, targetType: string): boolean
+ declare export function isValidES3Identifier(name: string): boolean
+ declare export function isValidES3Identifier(name: string): boolean
+ declare export function isValidIdentifier(name: string): boolean
+ declare export function isVar(node: BabelNode): boolean
+ declare export function matchesPattern(node: ?BabelNode, match: string | Array<string>, allowPartial?: boolean): boolean
+ declare export function validate(n: BabelNode, key: string, value: mixed): void;
+}
diff --git a/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js b/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
new file mode 100644
index 0000000..6a0ac93
--- /dev/null
+++ b/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = appendToMemberExpression;
+
+var _generated = require("../builders/generated");
+
+function appendToMemberExpression(member, append, computed = false) {
+ member.object = (0, _generated.memberExpression)(member.object, member.property, member.computed);
+ member.property = append;
+ member.computed = !!computed;
+ return member;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js b/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
new file mode 100644
index 0000000..de9464d
--- /dev/null
+++ b/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
@@ -0,0 +1,78 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = removeTypeDuplicates;
+
+var _generated = require("../../validators/generated");
+
+function getQualifiedName(node) {
+ return (0, _generated.isIdentifier)(node) ? node.name : `${node.id.name}.${getQualifiedName(node.qualification)}`;
+}
+
+function removeTypeDuplicates(nodes) {
+ const generics = {};
+ const bases = {};
+ const typeGroups = new Set();
+ const types = [];
+
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ if (!node) continue;
+
+ if (types.indexOf(node) >= 0) {
+ continue;
+ }
+
+ if ((0, _generated.isAnyTypeAnnotation)(node)) {
+ return [node];
+ }
+
+ if ((0, _generated.isFlowBaseAnnotation)(node)) {
+ bases[node.type] = node;
+ continue;
+ }
+
+ if ((0, _generated.isUnionTypeAnnotation)(node)) {
+ if (!typeGroups.has(node.types)) {
+ nodes = nodes.concat(node.types);
+ typeGroups.add(node.types);
+ }
+
+ continue;
+ }
+
+ if ((0, _generated.isGenericTypeAnnotation)(node)) {
+ const name = getQualifiedName(node.id);
+
+ if (generics[name]) {
+ let existing = generics[name];
+
+ if (existing.typeParameters) {
+ if (node.typeParameters) {
+ existing.typeParameters.params = removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params));
+ }
+ } else {
+ existing = node.typeParameters;
+ }
+ } else {
+ generics[name] = node;
+ }
+
+ continue;
+ }
+
+ types.push(node);
+ }
+
+ for (const type of Object.keys(bases)) {
+ types.push(bases[type]);
+ }
+
+ for (const name of Object.keys(generics)) {
+ types.push(generics[name]);
+ }
+
+ return types;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/modifications/inherits.js b/node_modules/@babel/types/lib/modifications/inherits.js
new file mode 100644
index 0000000..8701897
--- /dev/null
+++ b/node_modules/@babel/types/lib/modifications/inherits.js
@@ -0,0 +1,31 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = inherits;
+
+var _constants = require("../constants");
+
+var _inheritsComments = require("../comments/inheritsComments");
+
+function inherits(child, parent) {
+ if (!child || !parent) return child;
+
+ for (const key of _constants.INHERIT_KEYS.optional) {
+ if (child[key] == null) {
+ child[key] = parent[key];
+ }
+ }
+
+ for (const key of Object.keys(parent)) {
+ if (key[0] === "_" && key !== "__clone") child[key] = parent[key];
+ }
+
+ for (const key of _constants.INHERIT_KEYS.force) {
+ child[key] = parent[key];
+ }
+
+ (0, _inheritsComments.default)(child, parent);
+ return child;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js b/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
new file mode 100644
index 0000000..ee6de0e
--- /dev/null
+++ b/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
@@ -0,0 +1,13 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = prependToMemberExpression;
+
+var _generated = require("../builders/generated");
+
+function prependToMemberExpression(member, prepend) {
+ member.object = (0, _generated.memberExpression)(prepend, member.object);
+ return member;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/modifications/removeProperties.js b/node_modules/@babel/types/lib/modifications/removeProperties.js
new file mode 100644
index 0000000..f9cf8e6
--- /dev/null
+++ b/node_modules/@babel/types/lib/modifications/removeProperties.js
@@ -0,0 +1,30 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = removeProperties;
+
+var _constants = require("../constants");
+
+const CLEAR_KEYS = ["tokens", "start", "end", "loc", "raw", "rawValue"];
+
+const CLEAR_KEYS_PLUS_COMMENTS = _constants.COMMENT_KEYS.concat(["comments"]).concat(CLEAR_KEYS);
+
+function removeProperties(node, opts = {}) {
+ const map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;
+
+ for (const key of map) {
+ if (node[key] != null) node[key] = undefined;
+ }
+
+ for (const key of Object.keys(node)) {
+ if (key[0] === "_" && node[key] != null) node[key] = undefined;
+ }
+
+ const symbols = Object.getOwnPropertySymbols(node);
+
+ for (const sym of symbols) {
+ node[sym] = null;
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js b/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
new file mode 100644
index 0000000..e36f755
--- /dev/null
+++ b/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = removePropertiesDeep;
+
+var _traverseFast = require("../traverse/traverseFast");
+
+var _removeProperties = require("./removeProperties");
+
+function removePropertiesDeep(tree, opts) {
+ (0, _traverseFast.default)(tree, _removeProperties.default, opts);
+ return tree;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js b/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
new file mode 100644
index 0000000..25defea
--- /dev/null
+++ b/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
@@ -0,0 +1,54 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = removeTypeDuplicates;
+
+var _generated = require("../../validators/generated");
+
+function removeTypeDuplicates(nodes) {
+ const generics = {};
+ const bases = {};
+ const typeGroups = new Set();
+ const types = [];
+
+ for (let i = 0; i < nodes.length; i++) {
+ const node = nodes[i];
+ if (!node) continue;
+
+ if (types.indexOf(node) >= 0) {
+ continue;
+ }
+
+ if ((0, _generated.isTSAnyKeyword)(node)) {
+ return [node];
+ }
+
+ if ((0, _generated.isTSBaseType)(node)) {
+ bases[node.type] = node;
+ continue;
+ }
+
+ if ((0, _generated.isTSUnionType)(node)) {
+ if (!typeGroups.has(node.types)) {
+ nodes.push(...node.types);
+ typeGroups.add(node.types);
+ }
+
+ continue;
+ }
+
+ types.push(node);
+ }
+
+ for (const type of Object.keys(bases)) {
+ types.push(bases[type]);
+ }
+
+ for (const name of Object.keys(generics)) {
+ types.push(generics[name]);
+ }
+
+ return types;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js b/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
new file mode 100644
index 0000000..4daaf8b
--- /dev/null
+++ b/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
@@ -0,0 +1,104 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = getBindingIdentifiers;
+
+var _generated = require("../validators/generated");
+
+function getBindingIdentifiers(node, duplicates, outerOnly) {
+ let search = [].concat(node);
+ const ids = Object.create(null);
+
+ while (search.length) {
+ const id = search.shift();
+ if (!id) continue;
+ const keys = getBindingIdentifiers.keys[id.type];
+
+ if ((0, _generated.isIdentifier)(id)) {
+ if (duplicates) {
+ const _ids = ids[id.name] = ids[id.name] || [];
+
+ _ids.push(id);
+ } else {
+ ids[id.name] = id;
+ }
+
+ continue;
+ }
+
+ if ((0, _generated.isExportDeclaration)(id) && !(0, _generated.isExportAllDeclaration)(id)) {
+ if ((0, _generated.isDeclaration)(id.declaration)) {
+ search.push(id.declaration);
+ }
+
+ continue;
+ }
+
+ if (outerOnly) {
+ if ((0, _generated.isFunctionDeclaration)(id)) {
+ search.push(id.id);
+ continue;
+ }
+
+ if ((0, _generated.isFunctionExpression)(id)) {
+ continue;
+ }
+ }
+
+ if (keys) {
+ for (let i = 0; i < keys.length; i++) {
+ const key = keys[i];
+
+ if (id[key]) {
+ search = search.concat(id[key]);
+ }
+ }
+ }
+ }
+
+ return ids;
+}
+
+getBindingIdentifiers.keys = {
+ DeclareClass: ["id"],
+ DeclareFunction: ["id"],
+ DeclareModule: ["id"],
+ DeclareVariable: ["id"],
+ DeclareInterface: ["id"],
+ DeclareTypeAlias: ["id"],
+ DeclareOpaqueType: ["id"],
+ InterfaceDeclaration: ["id"],
+ TypeAlias: ["id"],
+ OpaqueType: ["id"],
+ CatchClause: ["param"],
+ LabeledStatement: ["label"],
+ UnaryExpression: ["argument"],
+ AssignmentExpression: ["left"],
+ ImportSpecifier: ["local"],
+ ImportNamespaceSpecifier: ["local"],
+ ImportDefaultSpecifier: ["local"],
+ ImportDeclaration: ["specifiers"],
+ ExportSpecifier: ["exported"],
+ ExportNamespaceSpecifier: ["exported"],
+ ExportDefaultSpecifier: ["exported"],
+ FunctionDeclaration: ["id", "params"],
+ FunctionExpression: ["id", "params"],
+ ArrowFunctionExpression: ["params"],
+ ObjectMethod: ["params"],
+ ClassMethod: ["params"],
+ ClassPrivateMethod: ["params"],
+ ForInStatement: ["left"],
+ ForOfStatement: ["left"],
+ ClassDeclaration: ["id"],
+ ClassExpression: ["id"],
+ RestElement: ["argument"],
+ UpdateExpression: ["argument"],
+ ObjectProperty: ["value"],
+ AssignmentPattern: ["left"],
+ ArrayPattern: ["elements"],
+ ObjectPattern: ["properties"],
+ VariableDeclaration: ["declarations"],
+ VariableDeclarator: ["id"]
+}; \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js b/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
new file mode 100644
index 0000000..c27cffe
--- /dev/null
+++ b/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
@@ -0,0 +1,15 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _getBindingIdentifiers = require("./getBindingIdentifiers");
+
+var _default = getOuterBindingIdentifiers;
+exports.default = _default;
+
+function getOuterBindingIdentifiers(node, duplicates) {
+ return (0, _getBindingIdentifiers.default)(node, duplicates, true);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/traverse/traverse.js b/node_modules/@babel/types/lib/traverse/traverse.js
new file mode 100644
index 0000000..775aed1
--- /dev/null
+++ b/node_modules/@babel/types/lib/traverse/traverse.js
@@ -0,0 +1,55 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = traverse;
+
+var _definitions = require("../definitions");
+
+function traverse(node, handlers, state) {
+ if (typeof handlers === "function") {
+ handlers = {
+ enter: handlers
+ };
+ }
+
+ const {
+ enter,
+ exit
+ } = handlers;
+ traverseSimpleImpl(node, enter, exit, state, []);
+}
+
+function traverseSimpleImpl(node, enter, exit, state, ancestors) {
+ const keys = _definitions.VISITOR_KEYS[node.type];
+ if (!keys) return;
+ if (enter) enter(node, ancestors, state);
+
+ for (const key of keys) {
+ const subNode = node[key];
+
+ if (Array.isArray(subNode)) {
+ for (let i = 0; i < subNode.length; i++) {
+ const child = subNode[i];
+ if (!child) continue;
+ ancestors.push({
+ node,
+ key,
+ index: i
+ });
+ traverseSimpleImpl(child, enter, exit, state, ancestors);
+ ancestors.pop();
+ }
+ } else if (subNode) {
+ ancestors.push({
+ node,
+ key
+ });
+ traverseSimpleImpl(subNode, enter, exit, state, ancestors);
+ ancestors.pop();
+ }
+ }
+
+ if (exit) exit(node, ancestors, state);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/traverse/traverseFast.js b/node_modules/@babel/types/lib/traverse/traverseFast.js
new file mode 100644
index 0000000..f038dd8
--- /dev/null
+++ b/node_modules/@babel/types/lib/traverse/traverseFast.js
@@ -0,0 +1,28 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = traverseFast;
+
+var _definitions = require("../definitions");
+
+function traverseFast(node, enter, opts) {
+ if (!node) return;
+ const keys = _definitions.VISITOR_KEYS[node.type];
+ if (!keys) return;
+ opts = opts || {};
+ enter(node, opts);
+
+ for (const key of keys) {
+ const subNode = node[key];
+
+ if (Array.isArray(subNode)) {
+ for (const node of subNode) {
+ traverseFast(node, enter, opts);
+ }
+ } else {
+ traverseFast(subNode, enter, opts);
+ }
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/utils/inherit.js b/node_modules/@babel/types/lib/utils/inherit.js
new file mode 100644
index 0000000..35f3381
--- /dev/null
+++ b/node_modules/@babel/types/lib/utils/inherit.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = inherit;
+
+function inherit(key, child, parent) {
+ if (child && parent) {
+ child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js b/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
new file mode 100644
index 0000000..f0ca133
--- /dev/null
+++ b/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
@@ -0,0 +1,47 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = cleanJSXElementLiteralChild;
+
+var _generated = require("../../builders/generated");
+
+function cleanJSXElementLiteralChild(child, args) {
+ const lines = child.value.split(/\r\n|\n|\r/);
+ let lastNonEmptyLine = 0;
+
+ for (let i = 0; i < lines.length; i++) {
+ if (lines[i].match(/[^ \t]/)) {
+ lastNonEmptyLine = i;
+ }
+ }
+
+ let str = "";
+
+ for (let i = 0; i < lines.length; i++) {
+ const line = lines[i];
+ const isFirstLine = i === 0;
+ const isLastLine = i === lines.length - 1;
+ const isLastNonEmptyLine = i === lastNonEmptyLine;
+ let trimmedLine = line.replace(/\t/g, " ");
+
+ if (!isFirstLine) {
+ trimmedLine = trimmedLine.replace(/^[ ]+/, "");
+ }
+
+ if (!isLastLine) {
+ trimmedLine = trimmedLine.replace(/[ ]+$/, "");
+ }
+
+ if (trimmedLine) {
+ if (!isLastNonEmptyLine) {
+ trimmedLine += " ";
+ }
+
+ str += trimmedLine;
+ }
+ }
+
+ if (str) args.push((0, _generated.stringLiteral)(str));
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/utils/shallowEqual.js b/node_modules/@babel/types/lib/utils/shallowEqual.js
new file mode 100644
index 0000000..fae259e
--- /dev/null
+++ b/node_modules/@babel/types/lib/utils/shallowEqual.js
@@ -0,0 +1,18 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = shallowEqual;
+
+function shallowEqual(actual, expected) {
+ const keys = Object.keys(expected);
+
+ for (const key of keys) {
+ if (actual[key] !== expected[key]) {
+ return false;
+ }
+ }
+
+ return true;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js b/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
new file mode 100644
index 0000000..c006496
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
@@ -0,0 +1,13 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = buildMatchMemberExpression;
+
+var _matchesPattern = require("./matchesPattern");
+
+function buildMatchMemberExpression(match, allowPartial) {
+ const parts = match.split(".");
+ return member => (0, _matchesPattern.default)(member, parts, allowPartial);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/generated/index.js b/node_modules/@babel/types/lib/validators/generated/index.js
new file mode 100644
index 0000000..f2956ec
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/generated/index.js
@@ -0,0 +1,4811 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.isAccessor = isAccessor;
+exports.isAnyTypeAnnotation = isAnyTypeAnnotation;
+exports.isArgumentPlaceholder = isArgumentPlaceholder;
+exports.isArrayExpression = isArrayExpression;
+exports.isArrayPattern = isArrayPattern;
+exports.isArrayTypeAnnotation = isArrayTypeAnnotation;
+exports.isArrowFunctionExpression = isArrowFunctionExpression;
+exports.isAssignmentExpression = isAssignmentExpression;
+exports.isAssignmentPattern = isAssignmentPattern;
+exports.isAwaitExpression = isAwaitExpression;
+exports.isBigIntLiteral = isBigIntLiteral;
+exports.isBinary = isBinary;
+exports.isBinaryExpression = isBinaryExpression;
+exports.isBindExpression = isBindExpression;
+exports.isBlock = isBlock;
+exports.isBlockParent = isBlockParent;
+exports.isBlockStatement = isBlockStatement;
+exports.isBooleanLiteral = isBooleanLiteral;
+exports.isBooleanLiteralTypeAnnotation = isBooleanLiteralTypeAnnotation;
+exports.isBooleanTypeAnnotation = isBooleanTypeAnnotation;
+exports.isBreakStatement = isBreakStatement;
+exports.isCallExpression = isCallExpression;
+exports.isCatchClause = isCatchClause;
+exports.isClass = isClass;
+exports.isClassAccessorProperty = isClassAccessorProperty;
+exports.isClassBody = isClassBody;
+exports.isClassDeclaration = isClassDeclaration;
+exports.isClassExpression = isClassExpression;
+exports.isClassImplements = isClassImplements;
+exports.isClassMethod = isClassMethod;
+exports.isClassPrivateMethod = isClassPrivateMethod;
+exports.isClassPrivateProperty = isClassPrivateProperty;
+exports.isClassProperty = isClassProperty;
+exports.isCompletionStatement = isCompletionStatement;
+exports.isConditional = isConditional;
+exports.isConditionalExpression = isConditionalExpression;
+exports.isContinueStatement = isContinueStatement;
+exports.isDebuggerStatement = isDebuggerStatement;
+exports.isDecimalLiteral = isDecimalLiteral;
+exports.isDeclaration = isDeclaration;
+exports.isDeclareClass = isDeclareClass;
+exports.isDeclareExportAllDeclaration = isDeclareExportAllDeclaration;
+exports.isDeclareExportDeclaration = isDeclareExportDeclaration;
+exports.isDeclareFunction = isDeclareFunction;
+exports.isDeclareInterface = isDeclareInterface;
+exports.isDeclareModule = isDeclareModule;
+exports.isDeclareModuleExports = isDeclareModuleExports;
+exports.isDeclareOpaqueType = isDeclareOpaqueType;
+exports.isDeclareTypeAlias = isDeclareTypeAlias;
+exports.isDeclareVariable = isDeclareVariable;
+exports.isDeclaredPredicate = isDeclaredPredicate;
+exports.isDecorator = isDecorator;
+exports.isDirective = isDirective;
+exports.isDirectiveLiteral = isDirectiveLiteral;
+exports.isDoExpression = isDoExpression;
+exports.isDoWhileStatement = isDoWhileStatement;
+exports.isEmptyStatement = isEmptyStatement;
+exports.isEmptyTypeAnnotation = isEmptyTypeAnnotation;
+exports.isEnumBody = isEnumBody;
+exports.isEnumBooleanBody = isEnumBooleanBody;
+exports.isEnumBooleanMember = isEnumBooleanMember;
+exports.isEnumDeclaration = isEnumDeclaration;
+exports.isEnumDefaultedMember = isEnumDefaultedMember;
+exports.isEnumMember = isEnumMember;
+exports.isEnumNumberBody = isEnumNumberBody;
+exports.isEnumNumberMember = isEnumNumberMember;
+exports.isEnumStringBody = isEnumStringBody;
+exports.isEnumStringMember = isEnumStringMember;
+exports.isEnumSymbolBody = isEnumSymbolBody;
+exports.isExistsTypeAnnotation = isExistsTypeAnnotation;
+exports.isExportAllDeclaration = isExportAllDeclaration;
+exports.isExportDeclaration = isExportDeclaration;
+exports.isExportDefaultDeclaration = isExportDefaultDeclaration;
+exports.isExportDefaultSpecifier = isExportDefaultSpecifier;
+exports.isExportNamedDeclaration = isExportNamedDeclaration;
+exports.isExportNamespaceSpecifier = isExportNamespaceSpecifier;
+exports.isExportSpecifier = isExportSpecifier;
+exports.isExpression = isExpression;
+exports.isExpressionStatement = isExpressionStatement;
+exports.isExpressionWrapper = isExpressionWrapper;
+exports.isFile = isFile;
+exports.isFlow = isFlow;
+exports.isFlowBaseAnnotation = isFlowBaseAnnotation;
+exports.isFlowDeclaration = isFlowDeclaration;
+exports.isFlowPredicate = isFlowPredicate;
+exports.isFlowType = isFlowType;
+exports.isFor = isFor;
+exports.isForInStatement = isForInStatement;
+exports.isForOfStatement = isForOfStatement;
+exports.isForStatement = isForStatement;
+exports.isForXStatement = isForXStatement;
+exports.isFunction = isFunction;
+exports.isFunctionDeclaration = isFunctionDeclaration;
+exports.isFunctionExpression = isFunctionExpression;
+exports.isFunctionParent = isFunctionParent;
+exports.isFunctionTypeAnnotation = isFunctionTypeAnnotation;
+exports.isFunctionTypeParam = isFunctionTypeParam;
+exports.isGenericTypeAnnotation = isGenericTypeAnnotation;
+exports.isIdentifier = isIdentifier;
+exports.isIfStatement = isIfStatement;
+exports.isImmutable = isImmutable;
+exports.isImport = isImport;
+exports.isImportAttribute = isImportAttribute;
+exports.isImportDeclaration = isImportDeclaration;
+exports.isImportDefaultSpecifier = isImportDefaultSpecifier;
+exports.isImportNamespaceSpecifier = isImportNamespaceSpecifier;
+exports.isImportSpecifier = isImportSpecifier;
+exports.isIndexedAccessType = isIndexedAccessType;
+exports.isInferredPredicate = isInferredPredicate;
+exports.isInterfaceDeclaration = isInterfaceDeclaration;
+exports.isInterfaceExtends = isInterfaceExtends;
+exports.isInterfaceTypeAnnotation = isInterfaceTypeAnnotation;
+exports.isInterpreterDirective = isInterpreterDirective;
+exports.isIntersectionTypeAnnotation = isIntersectionTypeAnnotation;
+exports.isJSX = isJSX;
+exports.isJSXAttribute = isJSXAttribute;
+exports.isJSXClosingElement = isJSXClosingElement;
+exports.isJSXClosingFragment = isJSXClosingFragment;
+exports.isJSXElement = isJSXElement;
+exports.isJSXEmptyExpression = isJSXEmptyExpression;
+exports.isJSXExpressionContainer = isJSXExpressionContainer;
+exports.isJSXFragment = isJSXFragment;
+exports.isJSXIdentifier = isJSXIdentifier;
+exports.isJSXMemberExpression = isJSXMemberExpression;
+exports.isJSXNamespacedName = isJSXNamespacedName;
+exports.isJSXOpeningElement = isJSXOpeningElement;
+exports.isJSXOpeningFragment = isJSXOpeningFragment;
+exports.isJSXSpreadAttribute = isJSXSpreadAttribute;
+exports.isJSXSpreadChild = isJSXSpreadChild;
+exports.isJSXText = isJSXText;
+exports.isLVal = isLVal;
+exports.isLabeledStatement = isLabeledStatement;
+exports.isLiteral = isLiteral;
+exports.isLogicalExpression = isLogicalExpression;
+exports.isLoop = isLoop;
+exports.isMemberExpression = isMemberExpression;
+exports.isMetaProperty = isMetaProperty;
+exports.isMethod = isMethod;
+exports.isMiscellaneous = isMiscellaneous;
+exports.isMixedTypeAnnotation = isMixedTypeAnnotation;
+exports.isModuleDeclaration = isModuleDeclaration;
+exports.isModuleExpression = isModuleExpression;
+exports.isModuleSpecifier = isModuleSpecifier;
+exports.isNewExpression = isNewExpression;
+exports.isNoop = isNoop;
+exports.isNullLiteral = isNullLiteral;
+exports.isNullLiteralTypeAnnotation = isNullLiteralTypeAnnotation;
+exports.isNullableTypeAnnotation = isNullableTypeAnnotation;
+exports.isNumberLiteral = isNumberLiteral;
+exports.isNumberLiteralTypeAnnotation = isNumberLiteralTypeAnnotation;
+exports.isNumberTypeAnnotation = isNumberTypeAnnotation;
+exports.isNumericLiteral = isNumericLiteral;
+exports.isObjectExpression = isObjectExpression;
+exports.isObjectMember = isObjectMember;
+exports.isObjectMethod = isObjectMethod;
+exports.isObjectPattern = isObjectPattern;
+exports.isObjectProperty = isObjectProperty;
+exports.isObjectTypeAnnotation = isObjectTypeAnnotation;
+exports.isObjectTypeCallProperty = isObjectTypeCallProperty;
+exports.isObjectTypeIndexer = isObjectTypeIndexer;
+exports.isObjectTypeInternalSlot = isObjectTypeInternalSlot;
+exports.isObjectTypeProperty = isObjectTypeProperty;
+exports.isObjectTypeSpreadProperty = isObjectTypeSpreadProperty;
+exports.isOpaqueType = isOpaqueType;
+exports.isOptionalCallExpression = isOptionalCallExpression;
+exports.isOptionalIndexedAccessType = isOptionalIndexedAccessType;
+exports.isOptionalMemberExpression = isOptionalMemberExpression;
+exports.isParenthesizedExpression = isParenthesizedExpression;
+exports.isPattern = isPattern;
+exports.isPatternLike = isPatternLike;
+exports.isPipelineBareFunction = isPipelineBareFunction;
+exports.isPipelinePrimaryTopicReference = isPipelinePrimaryTopicReference;
+exports.isPipelineTopicExpression = isPipelineTopicExpression;
+exports.isPlaceholder = isPlaceholder;
+exports.isPrivate = isPrivate;
+exports.isPrivateName = isPrivateName;
+exports.isProgram = isProgram;
+exports.isProperty = isProperty;
+exports.isPureish = isPureish;
+exports.isQualifiedTypeIdentifier = isQualifiedTypeIdentifier;
+exports.isRecordExpression = isRecordExpression;
+exports.isRegExpLiteral = isRegExpLiteral;
+exports.isRegexLiteral = isRegexLiteral;
+exports.isRestElement = isRestElement;
+exports.isRestProperty = isRestProperty;
+exports.isReturnStatement = isReturnStatement;
+exports.isScopable = isScopable;
+exports.isSequenceExpression = isSequenceExpression;
+exports.isSpreadElement = isSpreadElement;
+exports.isSpreadProperty = isSpreadProperty;
+exports.isStandardized = isStandardized;
+exports.isStatement = isStatement;
+exports.isStaticBlock = isStaticBlock;
+exports.isStringLiteral = isStringLiteral;
+exports.isStringLiteralTypeAnnotation = isStringLiteralTypeAnnotation;
+exports.isStringTypeAnnotation = isStringTypeAnnotation;
+exports.isSuper = isSuper;
+exports.isSwitchCase = isSwitchCase;
+exports.isSwitchStatement = isSwitchStatement;
+exports.isSymbolTypeAnnotation = isSymbolTypeAnnotation;
+exports.isTSAnyKeyword = isTSAnyKeyword;
+exports.isTSArrayType = isTSArrayType;
+exports.isTSAsExpression = isTSAsExpression;
+exports.isTSBaseType = isTSBaseType;
+exports.isTSBigIntKeyword = isTSBigIntKeyword;
+exports.isTSBooleanKeyword = isTSBooleanKeyword;
+exports.isTSCallSignatureDeclaration = isTSCallSignatureDeclaration;
+exports.isTSConditionalType = isTSConditionalType;
+exports.isTSConstructSignatureDeclaration = isTSConstructSignatureDeclaration;
+exports.isTSConstructorType = isTSConstructorType;
+exports.isTSDeclareFunction = isTSDeclareFunction;
+exports.isTSDeclareMethod = isTSDeclareMethod;
+exports.isTSEntityName = isTSEntityName;
+exports.isTSEnumDeclaration = isTSEnumDeclaration;
+exports.isTSEnumMember = isTSEnumMember;
+exports.isTSExportAssignment = isTSExportAssignment;
+exports.isTSExpressionWithTypeArguments = isTSExpressionWithTypeArguments;
+exports.isTSExternalModuleReference = isTSExternalModuleReference;
+exports.isTSFunctionType = isTSFunctionType;
+exports.isTSImportEqualsDeclaration = isTSImportEqualsDeclaration;
+exports.isTSImportType = isTSImportType;
+exports.isTSIndexSignature = isTSIndexSignature;
+exports.isTSIndexedAccessType = isTSIndexedAccessType;
+exports.isTSInferType = isTSInferType;
+exports.isTSInterfaceBody = isTSInterfaceBody;
+exports.isTSInterfaceDeclaration = isTSInterfaceDeclaration;
+exports.isTSIntersectionType = isTSIntersectionType;
+exports.isTSIntrinsicKeyword = isTSIntrinsicKeyword;
+exports.isTSLiteralType = isTSLiteralType;
+exports.isTSMappedType = isTSMappedType;
+exports.isTSMethodSignature = isTSMethodSignature;
+exports.isTSModuleBlock = isTSModuleBlock;
+exports.isTSModuleDeclaration = isTSModuleDeclaration;
+exports.isTSNamedTupleMember = isTSNamedTupleMember;
+exports.isTSNamespaceExportDeclaration = isTSNamespaceExportDeclaration;
+exports.isTSNeverKeyword = isTSNeverKeyword;
+exports.isTSNonNullExpression = isTSNonNullExpression;
+exports.isTSNullKeyword = isTSNullKeyword;
+exports.isTSNumberKeyword = isTSNumberKeyword;
+exports.isTSObjectKeyword = isTSObjectKeyword;
+exports.isTSOptionalType = isTSOptionalType;
+exports.isTSParameterProperty = isTSParameterProperty;
+exports.isTSParenthesizedType = isTSParenthesizedType;
+exports.isTSPropertySignature = isTSPropertySignature;
+exports.isTSQualifiedName = isTSQualifiedName;
+exports.isTSRestType = isTSRestType;
+exports.isTSStringKeyword = isTSStringKeyword;
+exports.isTSSymbolKeyword = isTSSymbolKeyword;
+exports.isTSThisType = isTSThisType;
+exports.isTSTupleType = isTSTupleType;
+exports.isTSType = isTSType;
+exports.isTSTypeAliasDeclaration = isTSTypeAliasDeclaration;
+exports.isTSTypeAnnotation = isTSTypeAnnotation;
+exports.isTSTypeAssertion = isTSTypeAssertion;
+exports.isTSTypeElement = isTSTypeElement;
+exports.isTSTypeLiteral = isTSTypeLiteral;
+exports.isTSTypeOperator = isTSTypeOperator;
+exports.isTSTypeParameter = isTSTypeParameter;
+exports.isTSTypeParameterDeclaration = isTSTypeParameterDeclaration;
+exports.isTSTypeParameterInstantiation = isTSTypeParameterInstantiation;
+exports.isTSTypePredicate = isTSTypePredicate;
+exports.isTSTypeQuery = isTSTypeQuery;
+exports.isTSTypeReference = isTSTypeReference;
+exports.isTSUndefinedKeyword = isTSUndefinedKeyword;
+exports.isTSUnionType = isTSUnionType;
+exports.isTSUnknownKeyword = isTSUnknownKeyword;
+exports.isTSVoidKeyword = isTSVoidKeyword;
+exports.isTaggedTemplateExpression = isTaggedTemplateExpression;
+exports.isTemplateElement = isTemplateElement;
+exports.isTemplateLiteral = isTemplateLiteral;
+exports.isTerminatorless = isTerminatorless;
+exports.isThisExpression = isThisExpression;
+exports.isThisTypeAnnotation = isThisTypeAnnotation;
+exports.isThrowStatement = isThrowStatement;
+exports.isTopicReference = isTopicReference;
+exports.isTryStatement = isTryStatement;
+exports.isTupleExpression = isTupleExpression;
+exports.isTupleTypeAnnotation = isTupleTypeAnnotation;
+exports.isTypeAlias = isTypeAlias;
+exports.isTypeAnnotation = isTypeAnnotation;
+exports.isTypeCastExpression = isTypeCastExpression;
+exports.isTypeParameter = isTypeParameter;
+exports.isTypeParameterDeclaration = isTypeParameterDeclaration;
+exports.isTypeParameterInstantiation = isTypeParameterInstantiation;
+exports.isTypeScript = isTypeScript;
+exports.isTypeofTypeAnnotation = isTypeofTypeAnnotation;
+exports.isUnaryExpression = isUnaryExpression;
+exports.isUnaryLike = isUnaryLike;
+exports.isUnionTypeAnnotation = isUnionTypeAnnotation;
+exports.isUpdateExpression = isUpdateExpression;
+exports.isUserWhitespacable = isUserWhitespacable;
+exports.isV8IntrinsicIdentifier = isV8IntrinsicIdentifier;
+exports.isVariableDeclaration = isVariableDeclaration;
+exports.isVariableDeclarator = isVariableDeclarator;
+exports.isVariance = isVariance;
+exports.isVoidTypeAnnotation = isVoidTypeAnnotation;
+exports.isWhile = isWhile;
+exports.isWhileStatement = isWhileStatement;
+exports.isWithStatement = isWithStatement;
+exports.isYieldExpression = isYieldExpression;
+
+var _shallowEqual = require("../../utils/shallowEqual");
+
+function isArrayExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ArrayExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isAssignmentExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "AssignmentExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBinaryExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BinaryExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isInterpreterDirective(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "InterpreterDirective") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDirective(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Directive") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDirectiveLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DirectiveLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBlockStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BlockStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBreakStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BreakStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isCallExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "CallExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isCatchClause(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "CatchClause") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isConditionalExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ConditionalExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isContinueStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ContinueStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDebuggerStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DebuggerStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDoWhileStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DoWhileStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEmptyStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EmptyStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExpressionStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExpressionStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFile(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "File") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isForInStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ForInStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isForStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ForStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunctionDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FunctionDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunctionExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FunctionExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isIdentifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Identifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isIfStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "IfStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isLabeledStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "LabeledStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStringLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "StringLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNumericLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NumericLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNullLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NullLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBooleanLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BooleanLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isRegExpLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "RegExpLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isLogicalExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "LogicalExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isMemberExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "MemberExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNewExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NewExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isProgram(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Program") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectMethod(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectMethod") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isRestElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "RestElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isReturnStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ReturnStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSequenceExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SequenceExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isParenthesizedExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ParenthesizedExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSwitchCase(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SwitchCase") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSwitchStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SwitchStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isThisExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ThisExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isThrowStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ThrowStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTryStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TryStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isUnaryExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "UnaryExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isUpdateExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "UpdateExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isVariableDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "VariableDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isVariableDeclarator(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "VariableDeclarator") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isWhileStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "WhileStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isWithStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "WithStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isAssignmentPattern(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "AssignmentPattern") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isArrayPattern(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ArrayPattern") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isArrowFunctionExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ArrowFunctionExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportAllDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportAllDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportDefaultDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportDefaultDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportNamedDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportNamedDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isForOfStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ForOfStatement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImportDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ImportDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImportDefaultSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ImportDefaultSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImportNamespaceSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ImportNamespaceSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImportSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ImportSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isMetaProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "MetaProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassMethod(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassMethod") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectPattern(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectPattern") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSpreadElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SpreadElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSuper(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Super") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTaggedTemplateExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TaggedTemplateExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTemplateElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TemplateElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTemplateLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TemplateLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isYieldExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "YieldExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isAwaitExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "AwaitExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImport(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Import") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBigIntLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BigIntLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportNamespaceSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportNamespaceSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isOptionalMemberExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "OptionalMemberExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isOptionalCallExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "OptionalCallExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassAccessorProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassAccessorProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassPrivateProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassPrivateProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassPrivateMethod(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassPrivateMethod") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPrivateName(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "PrivateName") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStaticBlock(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "StaticBlock") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isAnyTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "AnyTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isArrayTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ArrayTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBooleanTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BooleanTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBooleanLiteralTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BooleanLiteralTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNullLiteralTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NullLiteralTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClassImplements(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ClassImplements") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareClass(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareClass") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareFunction(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareFunction") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareInterface(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareInterface") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareModule(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareModule") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareModuleExports(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareModuleExports") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareTypeAlias(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareTypeAlias") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareOpaqueType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareOpaqueType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareVariable(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareVariable") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareExportDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareExportDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclareExportAllDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclareExportAllDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclaredPredicate(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DeclaredPredicate") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExistsTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExistsTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunctionTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FunctionTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunctionTypeParam(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "FunctionTypeParam") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isGenericTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "GenericTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isInferredPredicate(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "InferredPredicate") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isInterfaceExtends(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "InterfaceExtends") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isInterfaceDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "InterfaceDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isInterfaceTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "InterfaceTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isIntersectionTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "IntersectionTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isMixedTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "MixedTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEmptyTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EmptyTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNullableTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NullableTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNumberLiteralTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NumberLiteralTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNumberTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NumberTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeInternalSlot(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeInternalSlot") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeCallProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeCallProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeIndexer(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeIndexer") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectTypeSpreadProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ObjectTypeSpreadProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isOpaqueType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "OpaqueType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isQualifiedTypeIdentifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "QualifiedTypeIdentifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStringLiteralTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "StringLiteralTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStringTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "StringTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSymbolTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SymbolTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isThisTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ThisTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTupleTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TupleTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeofTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeofTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeAlias(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeAlias") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeCastExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeCastExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeParameter(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeParameter") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeParameterDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeParameterDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeParameterInstantiation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TypeParameterInstantiation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isUnionTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "UnionTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isVariance(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Variance") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isVoidTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "VoidTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumBooleanBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumBooleanBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumNumberBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumNumberBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumStringBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumStringBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumSymbolBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumSymbolBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumBooleanMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumBooleanMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumNumberMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumNumberMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumStringMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumStringMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumDefaultedMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "EnumDefaultedMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isIndexedAccessType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "IndexedAccessType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isOptionalIndexedAccessType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "OptionalIndexedAccessType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXAttribute(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXAttribute") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXClosingElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXClosingElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXEmptyExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXEmptyExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXExpressionContainer(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXExpressionContainer") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXSpreadChild(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXSpreadChild") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXIdentifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXIdentifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXMemberExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXMemberExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXNamespacedName(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXNamespacedName") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXOpeningElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXOpeningElement") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXSpreadAttribute(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXSpreadAttribute") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXText(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXText") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXFragment(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXFragment") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXOpeningFragment(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXOpeningFragment") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSXClosingFragment(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "JSXClosingFragment") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNoop(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Noop") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPlaceholder(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Placeholder") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isV8IntrinsicIdentifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "V8IntrinsicIdentifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isArgumentPlaceholder(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ArgumentPlaceholder") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBindExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "BindExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImportAttribute(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ImportAttribute") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDecorator(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "Decorator") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDoExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DoExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportDefaultSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ExportDefaultSpecifier") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isRecordExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "RecordExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTupleExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TupleExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDecimalLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "DecimalLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isModuleExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "ModuleExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTopicReference(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TopicReference") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPipelineTopicExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "PipelineTopicExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPipelineBareFunction(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "PipelineBareFunction") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPipelinePrimaryTopicReference(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "PipelinePrimaryTopicReference") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSParameterProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSParameterProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSDeclareFunction(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSDeclareFunction") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSDeclareMethod(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSDeclareMethod") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSQualifiedName(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSQualifiedName") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSCallSignatureDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSCallSignatureDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSConstructSignatureDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSConstructSignatureDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSPropertySignature(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSPropertySignature") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSMethodSignature(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSMethodSignature") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSIndexSignature(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSIndexSignature") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSAnyKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSAnyKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSBooleanKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSBooleanKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSBigIntKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSBigIntKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSIntrinsicKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSIntrinsicKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNeverKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNeverKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNullKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNullKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNumberKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNumberKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSObjectKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSObjectKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSStringKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSStringKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSSymbolKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSSymbolKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSUndefinedKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSUndefinedKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSUnknownKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSUnknownKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSVoidKeyword(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSVoidKeyword") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSThisType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSThisType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSFunctionType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSFunctionType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSConstructorType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSConstructorType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeReference(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeReference") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypePredicate(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypePredicate") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeQuery(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeQuery") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSArrayType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSArrayType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTupleType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTupleType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSOptionalType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSOptionalType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSRestType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSRestType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNamedTupleMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNamedTupleMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSUnionType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSUnionType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSIntersectionType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSIntersectionType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSConditionalType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSConditionalType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSInferType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSInferType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSParenthesizedType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSParenthesizedType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeOperator(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeOperator") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSIndexedAccessType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSIndexedAccessType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSMappedType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSMappedType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSLiteralType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSLiteralType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSExpressionWithTypeArguments(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSExpressionWithTypeArguments") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSInterfaceDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSInterfaceDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSInterfaceBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSInterfaceBody") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeAliasDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeAliasDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSAsExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSAsExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeAssertion(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeAssertion") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSEnumDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSEnumDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSEnumMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSEnumMember") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSModuleDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSModuleDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSModuleBlock(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSModuleBlock") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSImportType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSImportType") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSImportEqualsDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSImportEqualsDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSExternalModuleReference(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSExternalModuleReference") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNonNullExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNonNullExpression") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSExportAssignment(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSExportAssignment") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSNamespaceExportDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSNamespaceExportDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeAnnotation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeParameterInstantiation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeParameterInstantiation") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeParameterDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeParameterDeclaration") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeParameter(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "TSTypeParameter") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStandardized(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "InterpreterDirective" === nodeType || "Directive" === nodeType || "DirectiveLiteral" === nodeType || "BlockStatement" === nodeType || "BreakStatement" === nodeType || "CallExpression" === nodeType || "CatchClause" === nodeType || "ConditionalExpression" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "File" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "Program" === nodeType || "ObjectExpression" === nodeType || "ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "RestElement" === nodeType || "ReturnStatement" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "SwitchCase" === nodeType || "SwitchStatement" === nodeType || "ThisExpression" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "VariableDeclaration" === nodeType || "VariableDeclarator" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassBody" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ExportSpecifier" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "MetaProperty" === nodeType || "ClassMethod" === nodeType || "ObjectPattern" === nodeType || "SpreadElement" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateElement" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "ExportNamespaceSpecifier" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "ClassProperty" === nodeType || "ClassAccessorProperty" === nodeType || "ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType || "StaticBlock" === nodeType || nodeType === "Placeholder" && ("Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode || "BlockStatement" === node.expectedNode || "ClassBody" === node.expectedNode)) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExpression(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ArrayExpression" === nodeType || "AssignmentExpression" === nodeType || "BinaryExpression" === nodeType || "CallExpression" === nodeType || "ConditionalExpression" === nodeType || "FunctionExpression" === nodeType || "Identifier" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "LogicalExpression" === nodeType || "MemberExpression" === nodeType || "NewExpression" === nodeType || "ObjectExpression" === nodeType || "SequenceExpression" === nodeType || "ParenthesizedExpression" === nodeType || "ThisExpression" === nodeType || "UnaryExpression" === nodeType || "UpdateExpression" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "MetaProperty" === nodeType || "Super" === nodeType || "TaggedTemplateExpression" === nodeType || "TemplateLiteral" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType || "Import" === nodeType || "BigIntLiteral" === nodeType || "OptionalMemberExpression" === nodeType || "OptionalCallExpression" === nodeType || "TypeCastExpression" === nodeType || "JSXElement" === nodeType || "JSXFragment" === nodeType || "BindExpression" === nodeType || "DoExpression" === nodeType || "RecordExpression" === nodeType || "TupleExpression" === nodeType || "DecimalLiteral" === nodeType || "ModuleExpression" === nodeType || "TopicReference" === nodeType || "PipelineTopicExpression" === nodeType || "PipelineBareFunction" === nodeType || "PipelinePrimaryTopicReference" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSNonNullExpression" === nodeType || nodeType === "Placeholder" && ("Expression" === node.expectedNode || "Identifier" === node.expectedNode || "StringLiteral" === node.expectedNode)) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBinary(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("BinaryExpression" === nodeType || "LogicalExpression" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isScopable(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassExpression" === nodeType || "ClassDeclaration" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBlockParent(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("BlockStatement" === nodeType || "CatchClause" === nodeType || "DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "Program" === nodeType || "ObjectMethod" === nodeType || "SwitchStatement" === nodeType || "WhileStatement" === nodeType || "ArrowFunctionExpression" === nodeType || "ForOfStatement" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isBlock(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("BlockStatement" === nodeType || "Program" === nodeType || "TSModuleBlock" === nodeType || nodeType === "Placeholder" && "BlockStatement" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("BlockStatement" === nodeType || "BreakStatement" === nodeType || "ContinueStatement" === nodeType || "DebuggerStatement" === nodeType || "DoWhileStatement" === nodeType || "EmptyStatement" === nodeType || "ExpressionStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "FunctionDeclaration" === nodeType || "IfStatement" === nodeType || "LabeledStatement" === nodeType || "ReturnStatement" === nodeType || "SwitchStatement" === nodeType || "ThrowStatement" === nodeType || "TryStatement" === nodeType || "VariableDeclaration" === nodeType || "WhileStatement" === nodeType || "WithStatement" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ForOfStatement" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || nodeType === "Placeholder" && ("Statement" === node.expectedNode || "Declaration" === node.expectedNode || "BlockStatement" === node.expectedNode)) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTerminatorless(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType || "YieldExpression" === nodeType || "AwaitExpression" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isCompletionStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("BreakStatement" === nodeType || "ContinueStatement" === nodeType || "ReturnStatement" === nodeType || "ThrowStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isConditional(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ConditionalExpression" === nodeType || "IfStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isLoop(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("DoWhileStatement" === nodeType || "ForInStatement" === nodeType || "ForStatement" === nodeType || "WhileStatement" === nodeType || "ForOfStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isWhile(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("DoWhileStatement" === nodeType || "WhileStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExpressionWrapper(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ExpressionStatement" === nodeType || "ParenthesizedExpression" === nodeType || "TypeCastExpression" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFor(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ForInStatement" === nodeType || "ForStatement" === nodeType || "ForOfStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isForXStatement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ForInStatement" === nodeType || "ForOfStatement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunction(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFunctionParent(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "ObjectMethod" === nodeType || "ArrowFunctionExpression" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType || "StaticBlock" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPureish(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("FunctionDeclaration" === nodeType || "FunctionExpression" === nodeType || "StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "ArrowFunctionExpression" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("FunctionDeclaration" === nodeType || "VariableDeclaration" === nodeType || "ClassDeclaration" === nodeType || "ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType || "EnumDeclaration" === nodeType || "TSDeclareFunction" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSEnumDeclaration" === nodeType || "TSModuleDeclaration" === nodeType || nodeType === "Placeholder" && "Declaration" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPatternLike(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("Identifier" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isLVal(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("Identifier" === nodeType || "MemberExpression" === nodeType || "RestElement" === nodeType || "AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || "TSParameterProperty" === nodeType || nodeType === "Placeholder" && ("Pattern" === node.expectedNode || "Identifier" === node.expectedNode)) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSEntityName(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("Identifier" === nodeType || "TSQualifiedName" === nodeType || nodeType === "Placeholder" && "Identifier" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isLiteral(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "RegExpLiteral" === nodeType || "TemplateLiteral" === nodeType || "BigIntLiteral" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isImmutable(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("StringLiteral" === nodeType || "NumericLiteral" === nodeType || "NullLiteral" === nodeType || "BooleanLiteral" === nodeType || "BigIntLiteral" === nodeType || "JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXOpeningElement" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType || "DecimalLiteral" === nodeType || nodeType === "Placeholder" && "StringLiteral" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isUserWhitespacable(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isMethod(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ObjectMethod" === nodeType || "ClassMethod" === nodeType || "ClassPrivateMethod" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isObjectMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ObjectMethod" === nodeType || "ObjectProperty" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isProperty(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ObjectProperty" === nodeType || "ClassProperty" === nodeType || "ClassAccessorProperty" === nodeType || "ClassPrivateProperty" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isUnaryLike(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("UnaryExpression" === nodeType || "SpreadElement" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPattern(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("AssignmentPattern" === nodeType || "ArrayPattern" === nodeType || "ObjectPattern" === nodeType || nodeType === "Placeholder" && "Pattern" === node.expectedNode) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isClass(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ClassExpression" === nodeType || "ClassDeclaration" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isModuleDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType || "ImportDeclaration" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isExportDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ExportAllDeclaration" === nodeType || "ExportDefaultDeclaration" === nodeType || "ExportNamedDeclaration" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isModuleSpecifier(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ExportSpecifier" === nodeType || "ImportDefaultSpecifier" === nodeType || "ImportNamespaceSpecifier" === nodeType || "ImportSpecifier" === nodeType || "ExportNamespaceSpecifier" === nodeType || "ExportDefaultSpecifier" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isAccessor(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ClassAccessorProperty" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isPrivate(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("ClassPrivateProperty" === nodeType || "ClassPrivateMethod" === nodeType || "PrivateName" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFlow(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ClassImplements" === nodeType || "DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "DeclaredPredicate" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "FunctionTypeParam" === nodeType || "GenericTypeAnnotation" === nodeType || "InferredPredicate" === nodeType || "InterfaceExtends" === nodeType || "InterfaceDeclaration" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "ObjectTypeInternalSlot" === nodeType || "ObjectTypeCallProperty" === nodeType || "ObjectTypeIndexer" === nodeType || "ObjectTypeProperty" === nodeType || "ObjectTypeSpreadProperty" === nodeType || "OpaqueType" === nodeType || "QualifiedTypeIdentifier" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "TypeAlias" === nodeType || "TypeAnnotation" === nodeType || "TypeCastExpression" === nodeType || "TypeParameter" === nodeType || "TypeParameterDeclaration" === nodeType || "TypeParameterInstantiation" === nodeType || "UnionTypeAnnotation" === nodeType || "Variance" === nodeType || "VoidTypeAnnotation" === nodeType || "EnumDeclaration" === nodeType || "EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType || "EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFlowType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("AnyTypeAnnotation" === nodeType || "ArrayTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "BooleanLiteralTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "ExistsTypeAnnotation" === nodeType || "FunctionTypeAnnotation" === nodeType || "GenericTypeAnnotation" === nodeType || "InterfaceTypeAnnotation" === nodeType || "IntersectionTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NullableTypeAnnotation" === nodeType || "NumberLiteralTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "ObjectTypeAnnotation" === nodeType || "StringLiteralTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "TupleTypeAnnotation" === nodeType || "TypeofTypeAnnotation" === nodeType || "UnionTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType || "IndexedAccessType" === nodeType || "OptionalIndexedAccessType" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFlowBaseAnnotation(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("AnyTypeAnnotation" === nodeType || "BooleanTypeAnnotation" === nodeType || "NullLiteralTypeAnnotation" === nodeType || "MixedTypeAnnotation" === nodeType || "EmptyTypeAnnotation" === nodeType || "NumberTypeAnnotation" === nodeType || "StringTypeAnnotation" === nodeType || "SymbolTypeAnnotation" === nodeType || "ThisTypeAnnotation" === nodeType || "VoidTypeAnnotation" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFlowDeclaration(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("DeclareClass" === nodeType || "DeclareFunction" === nodeType || "DeclareInterface" === nodeType || "DeclareModule" === nodeType || "DeclareModuleExports" === nodeType || "DeclareTypeAlias" === nodeType || "DeclareOpaqueType" === nodeType || "DeclareVariable" === nodeType || "DeclareExportDeclaration" === nodeType || "DeclareExportAllDeclaration" === nodeType || "InterfaceDeclaration" === nodeType || "OpaqueType" === nodeType || "TypeAlias" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isFlowPredicate(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("DeclaredPredicate" === nodeType || "InferredPredicate" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumBody(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("EnumBooleanBody" === nodeType || "EnumNumberBody" === nodeType || "EnumStringBody" === nodeType || "EnumSymbolBody" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isEnumMember(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("EnumBooleanMember" === nodeType || "EnumNumberMember" === nodeType || "EnumStringMember" === nodeType || "EnumDefaultedMember" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isJSX(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("JSXAttribute" === nodeType || "JSXClosingElement" === nodeType || "JSXElement" === nodeType || "JSXEmptyExpression" === nodeType || "JSXExpressionContainer" === nodeType || "JSXSpreadChild" === nodeType || "JSXIdentifier" === nodeType || "JSXMemberExpression" === nodeType || "JSXNamespacedName" === nodeType || "JSXOpeningElement" === nodeType || "JSXSpreadAttribute" === nodeType || "JSXText" === nodeType || "JSXFragment" === nodeType || "JSXOpeningFragment" === nodeType || "JSXClosingFragment" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isMiscellaneous(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("Noop" === nodeType || "Placeholder" === nodeType || "V8IntrinsicIdentifier" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTypeScript(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("TSParameterProperty" === nodeType || "TSDeclareFunction" === nodeType || "TSDeclareMethod" === nodeType || "TSQualifiedName" === nodeType || "TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType || "TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSNamedTupleMember" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSInterfaceDeclaration" === nodeType || "TSInterfaceBody" === nodeType || "TSTypeAliasDeclaration" === nodeType || "TSAsExpression" === nodeType || "TSTypeAssertion" === nodeType || "TSEnumDeclaration" === nodeType || "TSEnumMember" === nodeType || "TSModuleDeclaration" === nodeType || "TSModuleBlock" === nodeType || "TSImportType" === nodeType || "TSImportEqualsDeclaration" === nodeType || "TSExternalModuleReference" === nodeType || "TSNonNullExpression" === nodeType || "TSExportAssignment" === nodeType || "TSNamespaceExportDeclaration" === nodeType || "TSTypeAnnotation" === nodeType || "TSTypeParameterInstantiation" === nodeType || "TSTypeParameterDeclaration" === nodeType || "TSTypeParameter" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSTypeElement(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("TSCallSignatureDeclaration" === nodeType || "TSConstructSignatureDeclaration" === nodeType || "TSPropertySignature" === nodeType || "TSMethodSignature" === nodeType || "TSIndexSignature" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSFunctionType" === nodeType || "TSConstructorType" === nodeType || "TSTypeReference" === nodeType || "TSTypePredicate" === nodeType || "TSTypeQuery" === nodeType || "TSTypeLiteral" === nodeType || "TSArrayType" === nodeType || "TSTupleType" === nodeType || "TSOptionalType" === nodeType || "TSRestType" === nodeType || "TSUnionType" === nodeType || "TSIntersectionType" === nodeType || "TSConditionalType" === nodeType || "TSInferType" === nodeType || "TSParenthesizedType" === nodeType || "TSTypeOperator" === nodeType || "TSIndexedAccessType" === nodeType || "TSMappedType" === nodeType || "TSLiteralType" === nodeType || "TSExpressionWithTypeArguments" === nodeType || "TSImportType" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isTSBaseType(node, opts) {
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if ("TSAnyKeyword" === nodeType || "TSBooleanKeyword" === nodeType || "TSBigIntKeyword" === nodeType || "TSIntrinsicKeyword" === nodeType || "TSNeverKeyword" === nodeType || "TSNullKeyword" === nodeType || "TSNumberKeyword" === nodeType || "TSObjectKeyword" === nodeType || "TSStringKeyword" === nodeType || "TSSymbolKeyword" === nodeType || "TSUndefinedKeyword" === nodeType || "TSUnknownKeyword" === nodeType || "TSVoidKeyword" === nodeType || "TSThisType" === nodeType || "TSLiteralType" === nodeType) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isNumberLiteral(node, opts) {
+ console.trace("The node type NumberLiteral has been renamed to NumericLiteral");
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "NumberLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isRegexLiteral(node, opts) {
+ console.trace("The node type RegexLiteral has been renamed to RegExpLiteral");
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "RegexLiteral") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isRestProperty(node, opts) {
+ console.trace("The node type RestProperty has been renamed to RestElement");
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "RestProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+}
+
+function isSpreadProperty(node, opts) {
+ console.trace("The node type SpreadProperty has been renamed to SpreadElement");
+ if (!node) return false;
+ const nodeType = node.type;
+
+ if (nodeType === "SpreadProperty") {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/is.js b/node_modules/@babel/types/lib/validators/is.js
new file mode 100644
index 0000000..581979f
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/is.js
@@ -0,0 +1,33 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = is;
+
+var _shallowEqual = require("../utils/shallowEqual");
+
+var _isType = require("./isType");
+
+var _isPlaceholderType = require("./isPlaceholderType");
+
+var _definitions = require("../definitions");
+
+function is(type, node, opts) {
+ if (!node) return false;
+ const matches = (0, _isType.default)(node.type, type);
+
+ if (!matches) {
+ if (!opts && node.type === "Placeholder" && type in _definitions.FLIPPED_ALIAS_KEYS) {
+ return (0, _isPlaceholderType.default)(node.expectedNode, type);
+ }
+
+ return false;
+ }
+
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return (0, _shallowEqual.default)(node, opts);
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isBinding.js b/node_modules/@babel/types/lib/validators/isBinding.js
new file mode 100644
index 0000000..74c86dd
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isBinding.js
@@ -0,0 +1,31 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isBinding;
+
+var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers");
+
+function isBinding(node, parent, grandparent) {
+ if (grandparent && node.type === "Identifier" && parent.type === "ObjectProperty" && grandparent.type === "ObjectExpression") {
+ return false;
+ }
+
+ const keys = _getBindingIdentifiers.default.keys[parent.type];
+
+ if (keys) {
+ for (let i = 0; i < keys.length; i++) {
+ const key = keys[i];
+ const val = parent[key];
+
+ if (Array.isArray(val)) {
+ if (val.indexOf(node) >= 0) return true;
+ } else {
+ if (val === node) return true;
+ }
+ }
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isBlockScoped.js b/node_modules/@babel/types/lib/validators/isBlockScoped.js
new file mode 100644
index 0000000..77ec166
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isBlockScoped.js
@@ -0,0 +1,14 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isBlockScoped;
+
+var _generated = require("./generated");
+
+var _isLet = require("./isLet");
+
+function isBlockScoped(node) {
+ return (0, _generated.isFunctionDeclaration)(node) || (0, _generated.isClassDeclaration)(node) || (0, _isLet.default)(node);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isImmutable.js b/node_modules/@babel/types/lib/validators/isImmutable.js
new file mode 100644
index 0000000..27754f6
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isImmutable.js
@@ -0,0 +1,24 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isImmutable;
+
+var _isType = require("./isType");
+
+var _generated = require("./generated");
+
+function isImmutable(node) {
+ if ((0, _isType.default)(node.type, "Immutable")) return true;
+
+ if ((0, _generated.isIdentifier)(node)) {
+ if (node.name === "undefined") {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isLet.js b/node_modules/@babel/types/lib/validators/isLet.js
new file mode 100644
index 0000000..93d7562
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isLet.js
@@ -0,0 +1,14 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isLet;
+
+var _generated = require("./generated");
+
+var _constants = require("../constants");
+
+function isLet(node) {
+ return (0, _generated.isVariableDeclaration)(node) && (node.kind !== "var" || node[_constants.BLOCK_SCOPED_SYMBOL]);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isNode.js b/node_modules/@babel/types/lib/validators/isNode.js
new file mode 100644
index 0000000..e88a47a
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isNode.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isNode;
+
+var _definitions = require("../definitions");
+
+function isNode(node) {
+ return !!(node && _definitions.VISITOR_KEYS[node.type]);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isNodesEquivalent.js b/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
new file mode 100644
index 0000000..f829834
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
@@ -0,0 +1,67 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isNodesEquivalent;
+
+var _definitions = require("../definitions");
+
+function isNodesEquivalent(a, b) {
+ if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
+ return a === b;
+ }
+
+ if (a.type !== b.type) {
+ return false;
+ }
+
+ const fields = Object.keys(_definitions.NODE_FIELDS[a.type] || a.type);
+ const visitorKeys = _definitions.VISITOR_KEYS[a.type];
+
+ for (const field of fields) {
+ if (typeof a[field] !== typeof b[field]) {
+ return false;
+ }
+
+ if (a[field] == null && b[field] == null) {
+ continue;
+ } else if (a[field] == null || b[field] == null) {
+ return false;
+ }
+
+ if (Array.isArray(a[field])) {
+ if (!Array.isArray(b[field])) {
+ return false;
+ }
+
+ if (a[field].length !== b[field].length) {
+ return false;
+ }
+
+ for (let i = 0; i < a[field].length; i++) {
+ if (!isNodesEquivalent(a[field][i], b[field][i])) {
+ return false;
+ }
+ }
+
+ continue;
+ }
+
+ if (typeof a[field] === "object" && !(visitorKeys != null && visitorKeys.includes(field))) {
+ for (const key of Object.keys(a[field])) {
+ if (a[field][key] !== b[field][key]) {
+ return false;
+ }
+ }
+
+ continue;
+ }
+
+ if (!isNodesEquivalent(a[field], b[field])) {
+ return false;
+ }
+ }
+
+ return true;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isPlaceholderType.js b/node_modules/@babel/types/lib/validators/isPlaceholderType.js
new file mode 100644
index 0000000..e8271de
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isPlaceholderType.js
@@ -0,0 +1,21 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isPlaceholderType;
+
+var _definitions = require("../definitions");
+
+function isPlaceholderType(placeholderType, targetType) {
+ if (placeholderType === targetType) return true;
+ const aliases = _definitions.PLACEHOLDERS_ALIAS[placeholderType];
+
+ if (aliases) {
+ for (const alias of aliases) {
+ if (targetType === alias) return true;
+ }
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isReferenced.js b/node_modules/@babel/types/lib/validators/isReferenced.js
new file mode 100644
index 0000000..471150b
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isReferenced.js
@@ -0,0 +1,128 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isReferenced;
+
+function isReferenced(node, parent, grandparent) {
+ switch (parent.type) {
+ case "MemberExpression":
+ case "OptionalMemberExpression":
+ if (parent.property === node) {
+ return !!parent.computed;
+ }
+
+ return parent.object === node;
+
+ case "JSXMemberExpression":
+ return parent.object === node;
+
+ case "VariableDeclarator":
+ return parent.init === node;
+
+ case "ArrowFunctionExpression":
+ return parent.body === node;
+
+ case "PrivateName":
+ return false;
+
+ case "ClassMethod":
+ case "ClassPrivateMethod":
+ case "ObjectMethod":
+ if (parent.key === node) {
+ return !!parent.computed;
+ }
+
+ return false;
+
+ case "ObjectProperty":
+ if (parent.key === node) {
+ return !!parent.computed;
+ }
+
+ return !grandparent || grandparent.type !== "ObjectPattern";
+
+ case "ClassProperty":
+ case "ClassAccessorProperty":
+ if (parent.key === node) {
+ return !!parent.computed;
+ }
+
+ return true;
+
+ case "ClassPrivateProperty":
+ return parent.key !== node;
+
+ case "ClassDeclaration":
+ case "ClassExpression":
+ return parent.superClass === node;
+
+ case "AssignmentExpression":
+ return parent.right === node;
+
+ case "AssignmentPattern":
+ return parent.right === node;
+
+ case "LabeledStatement":
+ return false;
+
+ case "CatchClause":
+ return false;
+
+ case "RestElement":
+ return false;
+
+ case "BreakStatement":
+ case "ContinueStatement":
+ return false;
+
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ return false;
+
+ case "ExportNamespaceSpecifier":
+ case "ExportDefaultSpecifier":
+ return false;
+
+ case "ExportSpecifier":
+ if (grandparent != null && grandparent.source) {
+ return false;
+ }
+
+ return parent.local === node;
+
+ case "ImportDefaultSpecifier":
+ case "ImportNamespaceSpecifier":
+ case "ImportSpecifier":
+ return false;
+
+ case "ImportAttribute":
+ return false;
+
+ case "JSXAttribute":
+ return false;
+
+ case "ObjectPattern":
+ case "ArrayPattern":
+ return false;
+
+ case "MetaProperty":
+ return false;
+
+ case "ObjectTypeProperty":
+ return parent.key !== node;
+
+ case "TSEnumMember":
+ return parent.id !== node;
+
+ case "TSPropertySignature":
+ if (parent.key === node) {
+ return !!parent.computed;
+ }
+
+ return true;
+ }
+
+ return true;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isScope.js b/node_modules/@babel/types/lib/validators/isScope.js
new file mode 100644
index 0000000..0f82449
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isScope.js
@@ -0,0 +1,20 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isScope;
+
+var _generated = require("./generated");
+
+function isScope(node, parent) {
+ if ((0, _generated.isBlockStatement)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
+ return false;
+ }
+
+ if ((0, _generated.isPattern)(node) && ((0, _generated.isFunction)(parent) || (0, _generated.isCatchClause)(parent))) {
+ return true;
+ }
+
+ return (0, _generated.isScopable)(node);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isSpecifierDefault.js b/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
new file mode 100644
index 0000000..25431cc
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
@@ -0,0 +1,14 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isSpecifierDefault;
+
+var _generated = require("./generated");
+
+function isSpecifierDefault(specifier) {
+ return (0, _generated.isImportDefaultSpecifier)(specifier) || (0, _generated.isIdentifier)(specifier.imported || specifier.exported, {
+ name: "default"
+ });
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isType.js b/node_modules/@babel/types/lib/validators/isType.js
new file mode 100644
index 0000000..59d31df
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isType.js
@@ -0,0 +1,24 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isType;
+
+var _definitions = require("../definitions");
+
+function isType(nodeType, targetType) {
+ if (nodeType === targetType) return true;
+ if (_definitions.ALIAS_KEYS[targetType]) return false;
+ const aliases = _definitions.FLIPPED_ALIAS_KEYS[targetType];
+
+ if (aliases) {
+ if (aliases[0] === nodeType) return true;
+
+ for (const alias of aliases) {
+ if (nodeType === alias) return true;
+ }
+ }
+
+ return false;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isValidES3Identifier.js b/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
new file mode 100644
index 0000000..5cef566
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
@@ -0,0 +1,14 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isValidES3Identifier;
+
+var _isValidIdentifier = require("./isValidIdentifier");
+
+const RESERVED_WORDS_ES3_ONLY = new Set(["abstract", "boolean", "byte", "char", "double", "enum", "final", "float", "goto", "implements", "int", "interface", "long", "native", "package", "private", "protected", "public", "short", "static", "synchronized", "throws", "transient", "volatile"]);
+
+function isValidES3Identifier(name) {
+ return (0, _isValidIdentifier.default)(name) && !RESERVED_WORDS_ES3_ONLY.has(name);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isValidIdentifier.js b/node_modules/@babel/types/lib/validators/isValidIdentifier.js
new file mode 100644
index 0000000..3fa6f98
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isValidIdentifier.js
@@ -0,0 +1,20 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isValidIdentifier;
+
+var _helperValidatorIdentifier = require("@babel/helper-validator-identifier");
+
+function isValidIdentifier(name, reserved = true) {
+ if (typeof name !== "string") return false;
+
+ if (reserved) {
+ if ((0, _helperValidatorIdentifier.isKeyword)(name) || (0, _helperValidatorIdentifier.isStrictReservedWord)(name, true)) {
+ return false;
+ }
+ }
+
+ return (0, _helperValidatorIdentifier.isIdentifierName)(name);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/isVar.js b/node_modules/@babel/types/lib/validators/isVar.js
new file mode 100644
index 0000000..a34801d
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/isVar.js
@@ -0,0 +1,16 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isVar;
+
+var _generated = require("./generated");
+
+var _constants = require("../constants");
+
+function isVar(node) {
+ return (0, _generated.isVariableDeclaration)(node, {
+ kind: "var"
+ }) && !node[_constants.BLOCK_SCOPED_SYMBOL];
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/matchesPattern.js b/node_modules/@babel/types/lib/validators/matchesPattern.js
new file mode 100644
index 0000000..d961f5a
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/matchesPattern.js
@@ -0,0 +1,42 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = matchesPattern;
+
+var _generated = require("./generated");
+
+function matchesPattern(member, match, allowPartial) {
+ if (!(0, _generated.isMemberExpression)(member)) return false;
+ const parts = Array.isArray(match) ? match : match.split(".");
+ const nodes = [];
+ let node;
+
+ for (node = member; (0, _generated.isMemberExpression)(node); node = node.object) {
+ nodes.push(node.property);
+ }
+
+ nodes.push(node);
+ if (nodes.length < parts.length) return false;
+ if (!allowPartial && nodes.length > parts.length) return false;
+
+ for (let i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {
+ const node = nodes[j];
+ let value;
+
+ if ((0, _generated.isIdentifier)(node)) {
+ value = node.name;
+ } else if ((0, _generated.isStringLiteral)(node)) {
+ value = node.value;
+ } else if ((0, _generated.isThisExpression)(node)) {
+ value = "this";
+ } else {
+ return false;
+ }
+
+ if (parts[i] !== value) return false;
+ }
+
+ return true;
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/react/isCompatTag.js b/node_modules/@babel/types/lib/validators/react/isCompatTag.js
new file mode 100644
index 0000000..57761c2
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/react/isCompatTag.js
@@ -0,0 +1,10 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = isCompatTag;
+
+function isCompatTag(tagName) {
+ return !!tagName && /^[a-z]/.test(tagName);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/react/isReactComponent.js b/node_modules/@babel/types/lib/validators/react/isReactComponent.js
new file mode 100644
index 0000000..0dd2102
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/react/isReactComponent.js
@@ -0,0 +1,12 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = void 0;
+
+var _buildMatchMemberExpression = require("../buildMatchMemberExpression");
+
+const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component");
+var _default = isReactComponent;
+exports.default = _default; \ No newline at end of file
diff --git a/node_modules/@babel/types/lib/validators/validate.js b/node_modules/@babel/types/lib/validators/validate.js
new file mode 100644
index 0000000..a2bfe3d
--- /dev/null
+++ b/node_modules/@babel/types/lib/validators/validate.js
@@ -0,0 +1,32 @@
+"use strict";
+
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
+exports.default = validate;
+exports.validateChild = validateChild;
+exports.validateField = validateField;
+
+var _definitions = require("../definitions");
+
+function validate(node, key, val) {
+ if (!node) return;
+ const fields = _definitions.NODE_FIELDS[node.type];
+ if (!fields) return;
+ const field = fields[key];
+ validateField(node, key, val, field);
+ validateChild(node, key, val);
+}
+
+function validateField(node, key, val, field) {
+ if (!(field != null && field.validate)) return;
+ if (field.optional && val == null) return;
+ field.validate(node, key, val);
+}
+
+function validateChild(node, key, val) {
+ if (val == null) return;
+ const validate = _definitions.NODE_PARENT_VALIDATIONS[val.type];
+ if (!validate) return;
+ validate(node, key, val);
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/package.json b/node_modules/@babel/types/package.json
new file mode 100644
index 0000000..bf92dac
--- /dev/null
+++ b/node_modules/@babel/types/package.json
@@ -0,0 +1,39 @@
+{
+ "name": "@babel/types",
+ "version": "7.17.0",
+ "description": "Babel Types is a Lodash-esque utility library for AST nodes",
+ "author": "The Babel Team (https://babel.dev/team)",
+ "homepage": "https://babel.dev/docs/en/next/babel-types",
+ "bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen",
+ "license": "MIT",
+ "publishConfig": {
+ "access": "public"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/babel/babel.git",
+ "directory": "packages/babel-types"
+ },
+ "main": "./lib/index.js",
+ "types": "./lib/index-legacy.d.ts",
+ "typesVersions": {
+ ">=3.7": {
+ "lib/index-legacy.d.ts": [
+ "lib/index.d.ts"
+ ]
+ }
+ },
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.16.7",
+ "to-fast-properties": "^2.0.0"
+ },
+ "devDependencies": {
+ "@babel/generator": "^7.17.0",
+ "@babel/parser": "^7.17.0",
+ "chalk": "^4.1.0",
+ "glob": "^7.1.7"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+} \ No newline at end of file
diff --git a/node_modules/@babel/types/scripts/generators/asserts.js b/node_modules/@babel/types/scripts/generators/asserts.js
new file mode 100644
index 0000000..bdfd948
--- /dev/null
+++ b/node_modules/@babel/types/scripts/generators/asserts.js
@@ -0,0 +1,50 @@
+import definitions from "../../lib/definitions/index.js";
+
+function addAssertHelper(type) {
+ const result =
+ definitions.NODE_FIELDS[type] || definitions.FLIPPED_ALIAS_KEYS[type]
+ ? `node is t.${type}`
+ : "boolean";
+
+ return `export function assert${type}(node: object | null | undefined, opts?: object | null): asserts ${
+ result === "boolean" ? "node" : result
+ } {
+ assert("${type}", node, opts) }
+ `;
+}
+
+export default function generateAsserts() {
+ let output = `/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'make build'
+ */
+import is from "../../validators/is";
+import type * as t from "../..";
+
+function assert(type: string, node: any, opts?: any): void {
+ if (!is(type, node, opts)) {
+ throw new Error(
+ \`Expected type "\${type}" with option \${JSON.stringify(opts)}, \` +
+ \`but instead got "\${node.type}".\`,
+ );
+ }
+}\n\n`;
+
+ Object.keys(definitions.VISITOR_KEYS).forEach(type => {
+ output += addAssertHelper(type);
+ });
+
+ Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => {
+ output += addAssertHelper(type);
+ });
+
+ Object.keys(definitions.DEPRECATED_KEYS).forEach(type => {
+ const newType = definitions.DEPRECATED_KEYS[type];
+ output += `export function assert${type}(node: any, opts: any): void {
+ console.trace("The node type ${type} has been renamed to ${newType}");
+ assert("${type}", node, opts);
+}\n`;
+ });
+
+ return output;
+}
diff --git a/node_modules/@babel/types/scripts/generators/ast-types.js b/node_modules/@babel/types/scripts/generators/ast-types.js
new file mode 100644
index 0000000..3bf4286
--- /dev/null
+++ b/node_modules/@babel/types/scripts/generators/ast-types.js
@@ -0,0 +1,144 @@
+import t from "../../lib/index.js";
+import stringifyValidator from "../utils/stringifyValidator.js";
+
+export default function generateAstTypes() {
+ let code = `// NOTE: This file is autogenerated. Do not modify.
+// See packages/babel-types/scripts/generators/ast-types.js for script used.
+
+interface BaseComment {
+ value: string;
+ start: number;
+ end: number;
+ loc: SourceLocation;
+ type: "CommentBlock" | "CommentLine";
+}
+
+export interface CommentBlock extends BaseComment {
+ type: "CommentBlock";
+}
+
+export interface CommentLine extends BaseComment {
+ type: "CommentLine";
+}
+
+export type Comment = CommentBlock | CommentLine;
+
+export interface SourceLocation {
+ start: {
+ line: number;
+ column: number;
+ };
+
+ end: {
+ line: number;
+ column: number;
+ };
+}
+
+interface BaseNode {
+ leadingComments: ReadonlyArray<Comment> | null;
+ innerComments: ReadonlyArray<Comment> | null;
+ trailingComments: ReadonlyArray<Comment> | null;
+ start: number | null;
+ end: number | null;
+ loc: SourceLocation | null;
+ type: Node["type"];
+ range?: [number, number];
+ extra?: Record<string, unknown>;
+}
+
+export type CommentTypeShorthand = "leading" | "inner" | "trailing";
+
+export type Node = ${t.TYPES.filter(k => !t.FLIPPED_ALIAS_KEYS[k])
+ .sort()
+ .join(" | ")};\n\n`;
+
+ const deprecatedAlias = {};
+ for (const type in t.DEPRECATED_KEYS) {
+ deprecatedAlias[t.DEPRECATED_KEYS[type]] = type;
+ }
+ for (const type in t.NODE_FIELDS) {
+ const fields = t.NODE_FIELDS[type];
+ const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type);
+ const struct = [];
+
+ fieldNames.forEach(fieldName => {
+ const field = fields[fieldName];
+ // Future / annoying TODO:
+ // MemberExpression.property, ObjectProperty.key and ObjectMethod.key need special cases; either:
+ // - convert the declaration to chain() like ClassProperty.key and ClassMethod.key,
+ // - declare an alias type for valid keys, detect the case and reuse it here,
+ // - declare a disjoint union with, for example, ObjectPropertyBase,
+ // ObjectPropertyLiteralKey and ObjectPropertyComputedKey, and declare ObjectProperty
+ // as "ObjectPropertyBase & (ObjectPropertyLiteralKey | ObjectPropertyComputedKey)"
+ let typeAnnotation = stringifyValidator(field.validate, "");
+
+ if (isNullable(field) && !hasDefault(field)) {
+ typeAnnotation += " | null";
+ }
+
+ const alphaNumeric = /^\w+$/;
+ const optional = field.optional ? "?" : "";
+
+ if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) {
+ struct.push(`${fieldName}${optional}: ${typeAnnotation};`);
+ } else {
+ struct.push(`"${fieldName}"${optional}: ${typeAnnotation};`);
+ }
+ });
+
+ code += `export interface ${type} extends BaseNode {
+ type: "${type}";
+ ${struct.join("\n ").trim()}
+}\n\n`;
+
+ if (deprecatedAlias[type]) {
+ code += `/**
+ * @deprecated Use \`${type}\`
+ */
+export interface ${deprecatedAlias[type]} extends BaseNode {
+ type: "${deprecatedAlias[type]}";
+ ${struct.join("\n ").trim()}
+}\n\n
+`;
+ }
+ }
+
+ for (const type in t.FLIPPED_ALIAS_KEYS) {
+ const types = t.FLIPPED_ALIAS_KEYS[type];
+ code += `export type ${type} = ${types
+ .map(type => `${type}`)
+ .join(" | ")};\n`;
+ }
+ code += "\n";
+
+ code += "export interface Aliases {\n";
+ for (const type in t.FLIPPED_ALIAS_KEYS) {
+ code += ` ${type}: ${type};\n`;
+ }
+ code += "}\n\n";
+ code += `export type DeprecatedAliases = ${Object.keys(
+ t.DEPRECATED_KEYS
+ ).join(" | ")}\n\n`;
+
+ return code;
+}
+
+function hasDefault(field) {
+ return field.default != null;
+}
+
+function isNullable(field) {
+ return field.optional || hasDefault(field);
+}
+
+function sortFieldNames(fields, type) {
+ return fields.sort((fieldA, fieldB) => {
+ const indexA = t.BUILDER_KEYS[type].indexOf(fieldA);
+ const indexB = t.BUILDER_KEYS[type].indexOf(fieldB);
+ if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ });
+}
diff --git a/node_modules/@babel/types/scripts/generators/builders.js b/node_modules/@babel/types/scripts/generators/builders.js
new file mode 100644
index 0000000..13e772e
--- /dev/null
+++ b/node_modules/@babel/types/scripts/generators/builders.js
@@ -0,0 +1,163 @@
+import t from "../../lib/index.js";
+import definitions from "../../lib/definitions/index.js";
+import formatBuilderName from "../utils/formatBuilderName.js";
+import lowerFirst from "../utils/lowerFirst.js";
+import stringifyValidator from "../utils/stringifyValidator.js";
+
+function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) {
+ const index = fieldNames.indexOf(fieldName);
+ return fieldNames.slice(index).every(_ => isNullable(fields[_]));
+}
+
+function hasDefault(field) {
+ return field.default != null;
+}
+
+function isNullable(field) {
+ return field.optional || hasDefault(field);
+}
+
+function sortFieldNames(fields, type) {
+ return fields.sort((fieldA, fieldB) => {
+ const indexA = t.BUILDER_KEYS[type].indexOf(fieldA);
+ const indexB = t.BUILDER_KEYS[type].indexOf(fieldB);
+ if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ });
+}
+
+function generateBuilderArgs(type) {
+ const fields = t.NODE_FIELDS[type];
+ const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type);
+ const builderNames = t.BUILDER_KEYS[type];
+
+ const args = [];
+
+ fieldNames.forEach(fieldName => {
+ const field = fields[fieldName];
+ // Future / annoying TODO:
+ // MemberExpression.property, ObjectProperty.key and ObjectMethod.key need special cases; either:
+ // - convert the declaration to chain() like ClassProperty.key and ClassMethod.key,
+ // - declare an alias type for valid keys, detect the case and reuse it here,
+ // - declare a disjoint union with, for example, ObjectPropertyBase,
+ // ObjectPropertyLiteralKey and ObjectPropertyComputedKey, and declare ObjectProperty
+ // as "ObjectPropertyBase & (ObjectPropertyLiteralKey | ObjectPropertyComputedKey)"
+ let typeAnnotation = stringifyValidator(field.validate, "t.");
+
+ if (isNullable(field) && !hasDefault(field)) {
+ typeAnnotation += " | null";
+ }
+
+ if (builderNames.includes(fieldName)) {
+ const bindingIdentifierName = t.toBindingIdentifierName(fieldName);
+ if (areAllRemainingFieldsNullable(fieldName, builderNames, fields)) {
+ args.push(
+ `${bindingIdentifierName}${
+ isNullable(field) ? "?:" : ":"
+ } ${typeAnnotation}`
+ );
+ } else {
+ args.push(
+ `${bindingIdentifierName}: ${typeAnnotation}${
+ isNullable(field) ? " | undefined" : ""
+ }`
+ );
+ }
+ }
+ });
+
+ return args;
+}
+
+export default function generateBuilders(kind) {
+ return kind === "uppercase.js"
+ ? generateUppercaseBuilders()
+ : generateLowercaseBuilders();
+}
+
+function generateLowercaseBuilders() {
+ let output = `/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'make build'
+ */
+import builder from "../builder";
+import type * as t from "../..";
+
+/* eslint-disable @typescript-eslint/no-unused-vars */
+
+`;
+
+ const reservedNames = new Set(["super", "import"]);
+ Object.keys(definitions.BUILDER_KEYS).forEach(type => {
+ const defArgs = generateBuilderArgs(type);
+ const formatedBuilderName = formatBuilderName(type);
+ const formatedBuilderNameLocal = reservedNames.has(formatedBuilderName)
+ ? `_${formatedBuilderName}`
+ : formatedBuilderName;
+ output += `${
+ formatedBuilderNameLocal === formatedBuilderName ? "export " : ""
+ }function ${formatedBuilderNameLocal}(${defArgs.join(
+ ", "
+ )}): t.${type} { return builder.apply("${type}", arguments); }\n`;
+ if (formatedBuilderNameLocal !== formatedBuilderName) {
+ output += `export { ${formatedBuilderNameLocal} as ${formatedBuilderName} };\n`;
+ }
+
+ // This is needed for backwards compatibility.
+ // It should be removed in the next major version.
+ // JSXIdentifier -> jSXIdentifier
+ if (/^[A-Z]{2}/.test(type)) {
+ output += `export { ${formatedBuilderNameLocal} as ${lowerFirst(
+ type
+ )} }\n`;
+ }
+ });
+
+ Object.keys(definitions.DEPRECATED_KEYS).forEach(type => {
+ const newType = definitions.DEPRECATED_KEYS[type];
+ const formatedBuilderName = formatBuilderName(type);
+ output += `/** @deprecated */
+function ${type}(${generateBuilderArgs(newType).join(", ")}): t.${type} {
+ console.trace("The node type ${type} has been renamed to ${newType}");
+ return builder.apply("${type}", arguments);
+}
+export { ${type} as ${formatedBuilderName} };\n`;
+ // This is needed for backwards compatibility.
+ // It should be removed in the next major version.
+ // JSXIdentifier -> jSXIdentifier
+ if (/^[A-Z]{2}/.test(type)) {
+ output += `export { ${type} as ${lowerFirst(type)} }\n`;
+ }
+ });
+
+ return output;
+}
+
+function generateUppercaseBuilders() {
+ let output = `/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'make build'
+ */
+
+/**
+ * This file is written in JavaScript and not TypeScript because uppercase builders
+ * conflict with AST types. TypeScript reads the uppercase.d.ts file instead.
+ */
+
+ export {\n`;
+
+ Object.keys(definitions.BUILDER_KEYS).forEach(type => {
+ const formatedBuilderName = formatBuilderName(type);
+ output += ` ${formatedBuilderName} as ${type},\n`;
+ });
+
+ Object.keys(definitions.DEPRECATED_KEYS).forEach(type => {
+ const formatedBuilderName = formatBuilderName(type);
+ output += ` ${formatedBuilderName} as ${type},\n`;
+ });
+
+ output += ` } from './index';\n`;
+ return output;
+}
diff --git a/node_modules/@babel/types/scripts/generators/constants.js b/node_modules/@babel/types/scripts/generators/constants.js
new file mode 100644
index 0000000..68abdbd
--- /dev/null
+++ b/node_modules/@babel/types/scripts/generators/constants.js
@@ -0,0 +1,15 @@
+import definitions from "../../lib/definitions/index.js";
+
+export default function generateConstants() {
+ let output = `/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'make build'
+ */
+import { FLIPPED_ALIAS_KEYS } from "../../definitions";\n\n`;
+
+ Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => {
+ output += `export const ${type.toUpperCase()}_TYPES = FLIPPED_ALIAS_KEYS["${type}"];\n`;
+ });
+
+ return output;
+}
diff --git a/node_modules/@babel/types/scripts/generators/docs.js b/node_modules/@babel/types/scripts/generators/docs.js
new file mode 100644
index 0000000..95e4815
--- /dev/null
+++ b/node_modules/@babel/types/scripts/generators/docs.js
@@ -0,0 +1,282 @@
+import util from "util";
+import stringifyValidator from "../utils/stringifyValidator.js";
+import toFunctionName from "../utils/toFunctionName.js";
+
+import t from "../../lib/index.js";
+
+const readme = [
+ `---
+id: babel-types
+title: @babel/types
+---
+<!-- Do not modify! This file is automatically generated by
+ github.com/babel/babel/babel-types/scripts/generators/docs.js !-->
+
+> This module contains methods for building ASTs manually and for checking the types of AST nodes.
+
+## Install
+
+\`\`\`sh
+npm install --save-dev @babel/types
+\`\`\`
+
+## API`,
+];
+
+const customTypes = {
+ ClassMethod: {
+ key: "if computed then `Expression` else `Identifier | Literal`",
+ },
+ Identifier: {
+ name: "`string`",
+ },
+ MemberExpression: {
+ property: "if computed then `Expression` else `Identifier`",
+ },
+ ObjectMethod: {
+ key: "if computed then `Expression` else `Identifier | Literal`",
+ },
+ ObjectProperty: {
+ key: "if computed then `Expression` else `Identifier | Literal`",
+ },
+ ClassPrivateMethod: {
+ computed: "'false'",
+ },
+ ClassPrivateProperty: {
+ computed: "'false'",
+ },
+};
+const APIHistory = {
+ ClassProperty: [["v7.6.0", "Supports `static`"]],
+};
+function formatHistory(historyItems) {
+ const lines = historyItems.map(
+ item => "| `" + item[0] + "` | " + item[1] + " |"
+ );
+ return [
+ "<details>",
+ " <summary>History</summary>",
+ "| Version | Changes |",
+ "| --- | --- |",
+ ...lines,
+ "</details>",
+ ];
+}
+function printAPIHistory(key, readme) {
+ if (APIHistory[key]) {
+ readme.push("");
+ readme.push(...formatHistory(APIHistory[key]));
+ }
+}
+function printNodeFields(key, readme) {
+ if (Object.keys(t.NODE_FIELDS[key]).length > 0) {
+ readme.push("");
+ readme.push("AST Node `" + key + "` shape:");
+ Object.keys(t.NODE_FIELDS[key])
+ .sort(function (fieldA, fieldB) {
+ const indexA = t.BUILDER_KEYS[key].indexOf(fieldA);
+ const indexB = t.BUILDER_KEYS[key].indexOf(fieldB);
+ if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ })
+ .forEach(function (field) {
+ const defaultValue = t.NODE_FIELDS[key][field].default;
+ const fieldDescription = ["`" + field + "`"];
+ const validator = t.NODE_FIELDS[key][field].validate;
+ if (customTypes[key] && customTypes[key][field]) {
+ fieldDescription.push(`: ${customTypes[key][field]}`);
+ } else if (validator) {
+ try {
+ fieldDescription.push(
+ ": `" + stringifyValidator(validator, "") + "`"
+ );
+ } catch (ex) {
+ if (ex.code === "UNEXPECTED_VALIDATOR_TYPE") {
+ console.log(
+ "Unrecognised validator type for " + key + "." + field
+ );
+ console.dir(ex.validator, { depth: 10, colors: true });
+ }
+ }
+ }
+ if (defaultValue !== null || t.NODE_FIELDS[key][field].optional) {
+ fieldDescription.push(
+ " (default: `" + util.inspect(defaultValue) + "`"
+ );
+ if (t.BUILDER_KEYS[key].indexOf(field) < 0) {
+ fieldDescription.push(", excluded from builder function");
+ }
+ fieldDescription.push(")");
+ } else {
+ fieldDescription.push(" (required)");
+ }
+ readme.push("- " + fieldDescription.join(""));
+ });
+ }
+}
+
+function printAliasKeys(key, readme) {
+ if (t.ALIAS_KEYS[key] && t.ALIAS_KEYS[key].length) {
+ readme.push("");
+ readme.push(
+ "Aliases: " +
+ t.ALIAS_KEYS[key]
+ .map(function (key) {
+ return "[`" + key + "`](#" + key.toLowerCase() + ")";
+ })
+ .join(", ")
+ );
+ }
+}
+readme.push("### Node Builders");
+readme.push("");
+Object.keys(t.BUILDER_KEYS)
+ .sort()
+ .forEach(function (key) {
+ readme.push("#### " + toFunctionName(key));
+ readme.push("");
+ readme.push("```javascript");
+ readme.push(
+ "t." + toFunctionName(key) + "(" + t.BUILDER_KEYS[key].join(", ") + ");"
+ );
+ readme.push("```");
+ printAPIHistory(key, readme);
+ readme.push("");
+ readme.push(
+ "See also `t.is" +
+ key +
+ "(node, opts)` and `t.assert" +
+ key +
+ "(node, opts)`."
+ );
+
+ printNodeFields(key, readme);
+ printAliasKeys(key, readme);
+
+ readme.push("");
+ readme.push("---");
+ readme.push("");
+ });
+
+function generateMapAliasToNodeTypes() {
+ const result = new Map();
+ for (const nodeType of Object.keys(t.ALIAS_KEYS)) {
+ const aliases = t.ALIAS_KEYS[nodeType];
+ if (!aliases) continue;
+ for (const alias of aliases) {
+ if (!result.has(alias)) {
+ result.set(alias, []);
+ }
+ const nodeTypes = result.get(alias);
+ nodeTypes.push(nodeType);
+ }
+ }
+ return result;
+}
+const aliasDescriptions = {
+ Binary:
+ "A cover of BinaryExpression and LogicalExpression, which share the same AST shape.",
+ Block: "Deprecated. Will be removed in Babel 8.",
+ BlockParent:
+ "A cover of AST nodes that start an execution context with new [LexicalEnvironment](https://tc39.es/ecma262/#table-additional-state-components-for-ecmascript-code-execution-contexts). In other words, they define the scope of `let` and `const` declarations.",
+ Class:
+ "A cover of ClassExpression and ClassDeclaration, which share the same AST shape.",
+ CompletionStatement:
+ "A statement that indicates the [completion records](https://tc39.es/ecma262/#sec-completion-record-specification-type). In other words, they define the control flow of the program, such as when should a loop break or an action throws critical errors.",
+ Conditional:
+ "A cover of ConditionalExpression and IfStatement, which share the same AST shape.",
+ Declaration:
+ "A cover of any [Declaration](https://tc39.es/ecma262/#prod-Declaration)s.",
+ EnumBody: "A cover of Flow enum bodies.",
+ EnumMember: "A cover of Flow enum membors.",
+ ExportDeclaration:
+ "A cover of any [ExportDeclaration](https://tc39.es/ecma262/#prod-ExportDeclaration)s.",
+ Expression:
+ "A cover of any [Expression](https://tc39.es/ecma262/#sec-ecmascript-language-expressions)s.",
+ ExpressionWrapper:
+ "A wrapper of expression that does not have runtime semantics.",
+ Flow: "A cover of AST nodes defined for Flow.",
+ FlowBaseAnnotation: "A cover of primary Flow type annotations.",
+ FlowDeclaration: "A cover of Flow declarations.",
+ FlowPredicate: "A cover of Flow predicates.",
+ FlowType: "A cover of Flow type annotations.",
+ For: "A cover of [ForStatement](https://tc39.es/ecma262/#sec-for-statement)s and [ForXStatement](#forxstatement)s.",
+ ForXStatement:
+ "A cover of [ForInStatements and ForOfStatements](https://tc39.es/ecma262/#sec-for-in-and-for-of-statements).",
+ Function:
+ "A cover of functions and [method](#method)s, the must have `body` and `params`. Note: `Function` is different to `FunctionParent`. For example, a `StaticBlock` is a `FunctionParent` but not `Function`.",
+ FunctionParent:
+ "A cover of AST nodes that start an execution context with new [VariableEnvironment](https://tc39.es/ecma262/#table-additional-state-components-for-ecmascript-code-execution-contexts). In other words, they define the scope of `var` declarations. FunctionParent did not include `Program` since Babel 7.",
+ Immutable:
+ "A cover of immutable objects and JSX elements. An object is [immutable](https://tc39.es/ecma262/#immutable-prototype-exotic-object) if no other properties can be defined once created.",
+ JSX: "A cover of AST nodes defined for [JSX](https://facebook.github.io/jsx/).",
+ LVal: "A cover of left hand side expressions used in the `left` of assignment expressions and [ForXStatement](#forxstatement)s. ",
+ Literal:
+ "A cover of [Literal](https://tc39.es/ecma262/#sec-primary-expression-literals)s, [Regular Expression Literal](https://tc39.es/ecma262/#sec-primary-expression-regular-expression-literals)s and [Template Literal](https://tc39.es/ecma262/#sec-template-literals)s.",
+ Loop: "A cover of loop statements.",
+ Method: "A cover of object methods and class methods.",
+ Miscellaneous:
+ "A cover of non-standard AST types that are sometimes useful for development.",
+ ModuleDeclaration:
+ "A cover of ImportDeclaration and [ExportDeclaration](#exportdeclaration)",
+ ModuleSpecifier:
+ "A cover of import and export specifiers. Note: It is _not_ the [ModuleSpecifier](https://tc39.es/ecma262/#prod-ModuleSpecifier) defined in the spec.",
+ ObjectMember:
+ "A cover of [members](https://tc39.es/ecma262/#prod-PropertyDefinitionList) in an object literal.",
+ Pattern:
+ "A cover of [BindingPattern](https://tc39.es/ecma262/#prod-BindingPattern) except Identifiers.",
+ PatternLike:
+ "A cover of [BindingPattern](https://tc39.es/ecma262/#prod-BindingPattern)s. ",
+ Private: "A cover of private class elements and private identifiers.",
+ Property: "A cover of object properties and class properties.",
+ Pureish:
+ "A cover of AST nodes which do not have side-effects. In other words, there is no observable behaviour changes if they are evaluated more than once.",
+ Scopable:
+ "A cover of [FunctionParent](#functionparent) and [BlockParent](#blockparent).",
+ Standardized:
+ "A cover of AST nodes which are part of an official ECMAScript specification.",
+ Statement:
+ "A cover of any [Statement](https://tc39.es/ecma262/#prod-Statement)s.",
+ TSBaseType: "A cover of primary TypeScript type annotations.",
+ TSEntityName: "A cover of ts entities.",
+ TSType: "A cover of TypeScript type annotations.",
+ TSTypeElement: "A cover of TypeScript type declarations.",
+ TypeScript: "A cover of AST nodes defined for TypeScript.",
+ Terminatorless:
+ "A cover of AST nodes whose semantic will change when a line terminator is inserted between the operator and the operand.",
+ UnaryLike: "A cover of UnaryExpression and SpreadElement.",
+ UserWhitespacable: "Deprecated. Will be removed in Babel 8.",
+ While:
+ "A cover of DoWhileStatement and WhileStatement, which share the same AST shape.",
+};
+const mapAliasToNodeTypes = generateMapAliasToNodeTypes();
+readme.push("### Aliases");
+readme.push("");
+for (const alias of [...mapAliasToNodeTypes.keys()].sort()) {
+ const nodeTypes = mapAliasToNodeTypes.get(alias);
+ nodeTypes.sort();
+ if (!(alias in aliasDescriptions)) {
+ throw new Error(
+ 'Missing alias descriptions of "' +
+ alias +
+ ", which covers " +
+ nodeTypes.join(",")
+ );
+ }
+ readme.push("#### " + alias);
+ readme.push("");
+ readme.push(aliasDescriptions[alias]);
+ readme.push("```javascript");
+ readme.push("t.is" + alias + "(node);");
+ readme.push("```");
+ readme.push("");
+ readme.push("Covered nodes: ");
+ for (const nodeType of nodeTypes) {
+ readme.push("- [`" + nodeType + "`](#" + nodeType.toLowerCase() + ")");
+ }
+ readme.push("");
+}
+
+process.stdout.write(readme.join("\n"));
diff --git a/node_modules/@babel/types/scripts/generators/flow.js b/node_modules/@babel/types/scripts/generators/flow.js
new file mode 100644
index 0000000..7fabcc6
--- /dev/null
+++ b/node_modules/@babel/types/scripts/generators/flow.js
@@ -0,0 +1,260 @@
+import t from "../../lib/index.js";
+import stringifyValidator from "../utils/stringifyValidator.js";
+import toFunctionName from "../utils/toFunctionName.js";
+
+const NODE_PREFIX = "BabelNode";
+
+let code = `// NOTE: This file is autogenerated. Do not modify.
+// See packages/babel-types/scripts/generators/flow.js for script used.
+
+declare class ${NODE_PREFIX}Comment {
+ value: string;
+ start: number;
+ end: number;
+ loc: ${NODE_PREFIX}SourceLocation;
+}
+
+declare class ${NODE_PREFIX}CommentBlock extends ${NODE_PREFIX}Comment {
+ type: "CommentBlock";
+}
+
+declare class ${NODE_PREFIX}CommentLine extends ${NODE_PREFIX}Comment {
+ type: "CommentLine";
+}
+
+declare class ${NODE_PREFIX}SourceLocation {
+ start: {
+ line: number;
+ column: number;
+ };
+
+ end: {
+ line: number;
+ column: number;
+ };
+}
+
+declare class ${NODE_PREFIX} {
+ leadingComments?: Array<${NODE_PREFIX}Comment>;
+ innerComments?: Array<${NODE_PREFIX}Comment>;
+ trailingComments?: Array<${NODE_PREFIX}Comment>;
+ start: ?number;
+ end: ?number;
+ loc: ?${NODE_PREFIX}SourceLocation;
+ extra?: { [string]: mixed };
+}\n\n`;
+
+//
+
+const lines = [];
+
+for (const type in t.NODE_FIELDS) {
+ const fields = t.NODE_FIELDS[type];
+
+ const struct = ['type: "' + type + '";'];
+ const args = [];
+ const builderNames = t.BUILDER_KEYS[type];
+
+ Object.keys(t.NODE_FIELDS[type])
+ .sort((fieldA, fieldB) => {
+ const indexA = t.BUILDER_KEYS[type].indexOf(fieldA);
+ const indexB = t.BUILDER_KEYS[type].indexOf(fieldB);
+ if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ })
+ .forEach(fieldName => {
+ const field = fields[fieldName];
+
+ let suffix = "";
+ if (field.optional || field.default != null) suffix += "?";
+
+ let typeAnnotation = "any";
+
+ const validate = field.validate;
+ if (validate) {
+ typeAnnotation = stringifyValidator(validate, NODE_PREFIX);
+ }
+
+ if (typeAnnotation) {
+ suffix += ": " + typeAnnotation;
+ }
+ if (builderNames.includes(fieldName)) {
+ args.push(t.toBindingIdentifierName(fieldName) + suffix);
+ }
+
+ if (t.isValidIdentifier(fieldName)) {
+ struct.push(fieldName + suffix + ";");
+ }
+ });
+
+ code += `declare class ${NODE_PREFIX}${type} extends ${NODE_PREFIX} {
+ ${struct.join("\n ").trim()}
+}\n\n`;
+
+ // Flow chokes on super() and import() :/
+ if (type !== "Super" && type !== "Import") {
+ lines.push(
+ `declare export function ${toFunctionName(type)}(${args.join(
+ ", "
+ )}): ${NODE_PREFIX}${type};`
+ );
+ } else {
+ const functionName = toFunctionName(type);
+ lines.push(
+ `declare function _${functionName}(${args.join(
+ ", "
+ )}): ${NODE_PREFIX}${type};`,
+ `declare export { _${functionName} as ${functionName} }`
+ );
+ }
+}
+
+for (const typeName of t.TYPES) {
+ const isDeprecated = !!t.DEPRECATED_KEYS[typeName];
+ const realName = isDeprecated ? t.DEPRECATED_KEYS[typeName] : typeName;
+
+ let decl = `declare export function is${typeName}(node: ?Object, opts?: ?Object): boolean`;
+ if (t.NODE_FIELDS[realName]) {
+ decl += ` %checks (node instanceof ${NODE_PREFIX}${realName})`;
+ }
+ lines.push(decl);
+
+ lines.push(
+ `declare export function assert${typeName}(node: ?Object, opts?: ?Object): void`
+ );
+}
+
+lines.push(
+ `declare export var VISITOR_KEYS: { [type: string]: string[] }`,
+
+ // assert/
+ `declare export function assertNode(obj: any): void`,
+
+ // builders/
+ // eslint-disable-next-line max-len
+ `declare export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): ${NODE_PREFIX}TypeAnnotation`,
+ // eslint-disable-next-line max-len
+ `declare export function createUnionTypeAnnotation(types: Array<${NODE_PREFIX}FlowType>): ${NODE_PREFIX}UnionTypeAnnotation`,
+ // eslint-disable-next-line max-len
+ `declare export function createFlowUnionType(types: Array<${NODE_PREFIX}FlowType>): ${NODE_PREFIX}UnionTypeAnnotation`,
+ // this smells like "internal API"
+ // eslint-disable-next-line max-len
+ `declare export function buildChildren(node: { children: Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment | ${NODE_PREFIX}JSXEmptyExpression> }): Array<${NODE_PREFIX}JSXText | ${NODE_PREFIX}JSXExpressionContainer | ${NODE_PREFIX}JSXSpreadChild | ${NODE_PREFIX}JSXElement | ${NODE_PREFIX}JSXFragment>`,
+
+ // clone/
+ `declare export function clone<T>(n: T): T;`,
+ `declare export function cloneDeep<T>(n: T): T;`,
+ `declare export function cloneDeepWithoutLoc<T>(n: T): T;`,
+ `declare export function cloneNode<T>(n: T, deep?: boolean, withoutLoc?: boolean): T;`,
+ `declare export function cloneWithoutLoc<T>(n: T): T;`,
+
+ // comments/
+ `declare type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'`,
+ // eslint-disable-next-line max-len
+ `declare export function addComment<T: BabelNode>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T`,
+ // eslint-disable-next-line max-len
+ `declare export function addComments<T: BabelNode>(node: T, type: CommentTypeShorthand, comments: Array<Comment>): T`,
+ `declare export function inheritInnerComments(node: BabelNode, parent: BabelNode): void`,
+ `declare export function inheritLeadingComments(node: BabelNode, parent: BabelNode): void`,
+ `declare export function inheritsComments<T: BabelNode>(node: T, parent: BabelNode): void`,
+ `declare export function inheritTrailingComments(node: BabelNode, parent: BabelNode): void`,
+ `declare export function removeComments<T: BabelNode>(node: T): T`,
+
+ // converters/
+ `declare export function ensureBlock(node: ${NODE_PREFIX}, key: string): ${NODE_PREFIX}BlockStatement`,
+ `declare export function toBindingIdentifierName(name?: ?string): string`,
+ // eslint-disable-next-line max-len
+ `declare export function toBlock(node: ${NODE_PREFIX}Statement | ${NODE_PREFIX}Expression, parent?: ${NODE_PREFIX}Function | null): ${NODE_PREFIX}BlockStatement`,
+ // eslint-disable-next-line max-len
+ `declare export function toComputedKey(node: ${NODE_PREFIX}Method | ${NODE_PREFIX}Property, key?: ${NODE_PREFIX}Expression | ${NODE_PREFIX}Identifier): ${NODE_PREFIX}Expression`,
+ // eslint-disable-next-line max-len
+ `declare export function toExpression(node: ${NODE_PREFIX}ExpressionStatement | ${NODE_PREFIX}Expression | ${NODE_PREFIX}Class | ${NODE_PREFIX}Function): ${NODE_PREFIX}Expression`,
+ `declare export function toIdentifier(name?: ?string): string`,
+ // eslint-disable-next-line max-len
+ `declare export function toKeyAlias(node: ${NODE_PREFIX}Method | ${NODE_PREFIX}Property, key?: ${NODE_PREFIX}): string`,
+ // toSequenceExpression relies on types that aren't declared in flow
+ // eslint-disable-next-line max-len
+ `declare export function toStatement(node: ${NODE_PREFIX}Statement | ${NODE_PREFIX}Class | ${NODE_PREFIX}Function | ${NODE_PREFIX}AssignmentExpression, ignore?: boolean): ${NODE_PREFIX}Statement | void`,
+ `declare export function valueToNode(value: any): ${NODE_PREFIX}Expression`,
+
+ // modifications/
+ // eslint-disable-next-line max-len
+ `declare export function removeTypeDuplicates(types: Array<${NODE_PREFIX}FlowType>): Array<${NODE_PREFIX}FlowType>`,
+ // eslint-disable-next-line max-len
+ `declare export function appendToMemberExpression(member: ${NODE_PREFIX}MemberExpression, append: ${NODE_PREFIX}, computed?: boolean): ${NODE_PREFIX}MemberExpression`,
+ // eslint-disable-next-line max-len
+ `declare export function inherits<T: BabelNode>(child: T, parent: ${NODE_PREFIX} | null | void): T`,
+ // eslint-disable-next-line max-len
+ `declare export function prependToMemberExpression(member: ${NODE_PREFIX}MemberExpression, prepend: ${NODE_PREFIX}Expression): ${NODE_PREFIX}MemberExpression`,
+ `declare export function removeProperties<T>(n: T, opts: ?{}): void;`,
+ `declare export function removePropertiesDeep<T>(n: T, opts: ?{}): T;`,
+
+ // retrievers/
+ // eslint-disable-next-line max-len
+ `declare export var getBindingIdentifiers: {
+ (node: ${NODE_PREFIX}, duplicates?: boolean, outerOnly?: boolean): { [key: string]: ${NODE_PREFIX}Identifier | Array<${NODE_PREFIX}Identifier> },
+ keys: { [type: string]: string[] }
+ }`,
+ // eslint-disable-next-line max-len
+ `declare export function getOuterBindingIdentifiers(node: BabelNode, duplicates?: boolean): { [key: string]: ${NODE_PREFIX}Identifier | Array<${NODE_PREFIX}Identifier> }`,
+
+ // traverse/
+ `declare type TraversalAncestors = Array<{
+ node: BabelNode,
+ key: string,
+ index?: number,
+ }>;
+ declare type TraversalHandler<T> = (BabelNode, TraversalAncestors, T) => void;
+ declare type TraversalHandlers<T> = {
+ enter?: TraversalHandler<T>,
+ exit?: TraversalHandler<T>,
+ };`.replace(/(^|\n) {2}/g, "$1"),
+ // eslint-disable-next-line
+ `declare export function traverse<T>(n: BabelNode, TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;`,
+ `declare export function traverseFast<T>(n: BabelNode, h: TraversalHandler<T>, state?: T): void;`,
+
+ // utils/
+ // cleanJSXElementLiteralChild is not exported
+ // inherit is not exported
+ `declare export function shallowEqual(actual: Object, expected: Object): boolean`,
+
+ // validators/
+ // eslint-disable-next-line max-len
+ `declare export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (?BabelNode) => boolean`,
+ `declare export function is(type: string, n: BabelNode, opts: Object): boolean;`,
+ `declare export function isBinding(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean`,
+ `declare export function isBlockScoped(node: BabelNode): boolean`,
+ `declare export function isImmutable(node: BabelNode): boolean`,
+ `declare export function isLet(node: BabelNode): boolean`,
+ `declare export function isNode(node: ?Object): boolean`,
+ `declare export function isNodesEquivalent(a: any, b: any): boolean`,
+ `declare export function isPlaceholderType(placeholderType: string, targetType: string): boolean`,
+ `declare export function isReferenced(node: BabelNode, parent: BabelNode, grandparent?: BabelNode): boolean`,
+ `declare export function isScope(node: BabelNode, parent: BabelNode): boolean`,
+ `declare export function isSpecifierDefault(specifier: BabelNodeModuleSpecifier): boolean`,
+ `declare export function isType(nodetype: ?string, targetType: string): boolean`,
+ `declare export function isValidES3Identifier(name: string): boolean`,
+ `declare export function isValidES3Identifier(name: string): boolean`,
+ `declare export function isValidIdentifier(name: string): boolean`,
+ `declare export function isVar(node: BabelNode): boolean`,
+ // eslint-disable-next-line max-len
+ `declare export function matchesPattern(node: ?BabelNode, match: string | Array<string>, allowPartial?: boolean): boolean`,
+ `declare export function validate(n: BabelNode, key: string, value: mixed): void;`
+);
+
+for (const type in t.FLIPPED_ALIAS_KEYS) {
+ const types = t.FLIPPED_ALIAS_KEYS[type];
+ code += `type ${NODE_PREFIX}${type} = ${types
+ .map(type => `${NODE_PREFIX}${type}`)
+ .join(" | ")};\n`;
+}
+
+code += `\ndeclare module "@babel/types" {
+ ${lines.join("\n").replace(/\n/g, "\n ").trim()}
+}\n`;
+
+//
+
+process.stdout.write(code);
diff --git a/node_modules/@babel/types/scripts/generators/typescript-legacy.js b/node_modules/@babel/types/scripts/generators/typescript-legacy.js
new file mode 100644
index 0000000..40da48f
--- /dev/null
+++ b/node_modules/@babel/types/scripts/generators/typescript-legacy.js
@@ -0,0 +1,369 @@
+import t from "../../lib/index.js";
+import stringifyValidator from "../utils/stringifyValidator.js";
+import toFunctionName from "../utils/toFunctionName.js";
+
+let code = `// NOTE: This file is autogenerated. Do not modify.
+// See packages/babel-types/scripts/generators/typescript-legacy.js for script used.
+
+interface BaseComment {
+ value: string;
+ start: number;
+ end: number;
+ loc: SourceLocation;
+ type: "CommentBlock" | "CommentLine";
+}
+
+export interface CommentBlock extends BaseComment {
+ type: "CommentBlock";
+}
+
+export interface CommentLine extends BaseComment {
+ type: "CommentLine";
+}
+
+export type Comment = CommentBlock | CommentLine;
+
+export interface SourceLocation {
+ start: {
+ line: number;
+ column: number;
+ };
+
+ end: {
+ line: number;
+ column: number;
+ };
+}
+
+interface BaseNode {
+ leadingComments: ReadonlyArray<Comment> | null;
+ innerComments: ReadonlyArray<Comment> | null;
+ trailingComments: ReadonlyArray<Comment> | null;
+ start: number | null;
+ end: number | null;
+ loc: SourceLocation | null;
+ type: Node["type"];
+ extra?: Record<string, unknown>;
+}
+
+export type Node = ${t.TYPES.sort().join(" | ")};\n\n`;
+
+//
+
+const lines = [];
+
+for (const type in t.NODE_FIELDS) {
+ const fields = t.NODE_FIELDS[type];
+ const fieldNames = sortFieldNames(Object.keys(t.NODE_FIELDS[type]), type);
+ const builderNames = t.BUILDER_KEYS[type];
+
+ const struct = ['type: "' + type + '";'];
+ const args = [];
+
+ fieldNames.forEach(fieldName => {
+ const field = fields[fieldName];
+ // Future / annoying TODO:
+ // MemberExpression.property, ObjectProperty.key and ObjectMethod.key need special cases; either:
+ // - convert the declaration to chain() like ClassProperty.key and ClassMethod.key,
+ // - declare an alias type for valid keys, detect the case and reuse it here,
+ // - declare a disjoint union with, for example, ObjectPropertyBase,
+ // ObjectPropertyLiteralKey and ObjectPropertyComputedKey, and declare ObjectProperty
+ // as "ObjectPropertyBase & (ObjectPropertyLiteralKey | ObjectPropertyComputedKey)"
+ let typeAnnotation = stringifyValidator(field.validate, "");
+
+ if (isNullable(field) && !hasDefault(field)) {
+ typeAnnotation += " | null";
+ }
+
+ if (builderNames.includes(fieldName)) {
+ if (areAllRemainingFieldsNullable(fieldName, builderNames, fields)) {
+ args.push(
+ `${t.toBindingIdentifierName(fieldName)}${
+ isNullable(field) ? "?:" : ":"
+ } ${typeAnnotation}`
+ );
+ } else {
+ args.push(
+ `${t.toBindingIdentifierName(fieldName)}: ${typeAnnotation}${
+ isNullable(field) ? " | undefined" : ""
+ }`
+ );
+ }
+ }
+
+ const alphaNumeric = /^\w+$/;
+
+ if (t.isValidIdentifier(fieldName) || alphaNumeric.test(fieldName)) {
+ struct.push(`${fieldName}: ${typeAnnotation};`);
+ } else {
+ struct.push(`"${fieldName}": ${typeAnnotation};`);
+ }
+ });
+
+ code += `export interface ${type} extends BaseNode {
+ ${struct.join("\n ").trim()}
+}\n\n`;
+
+ // super and import are reserved words in JavaScript
+ if (type !== "Super" && type !== "Import") {
+ lines.push(
+ `export function ${toFunctionName(type)}(${args.join(", ")}): ${type};`
+ );
+ } else {
+ const functionName = toFunctionName(type);
+ lines.push(
+ `declare function _${functionName}(${args.join(", ")}): ${type};`,
+ `export { _${functionName} as ${functionName}}`
+ );
+ }
+}
+
+for (const typeName of t.TYPES) {
+ const isDeprecated = !!t.DEPRECATED_KEYS[typeName];
+ const realName = isDeprecated ? t.DEPRECATED_KEYS[typeName] : typeName;
+
+ const result =
+ t.NODE_FIELDS[realName] || t.FLIPPED_ALIAS_KEYS[realName]
+ ? `node is ${realName}`
+ : "boolean";
+
+ if (isDeprecated) {
+ lines.push(`/** @deprecated Use \`is${realName}\` */`);
+ }
+ lines.push(
+ `export function is${typeName}(node: object | null | undefined, opts?: object | null): ${result};`
+ );
+
+ if (isDeprecated) {
+ lines.push(`/** @deprecated Use \`assert${realName}\` */`);
+ }
+ lines.push(
+ `export function assert${typeName}(node: object | null | undefined, opts?: object | null): void;`
+ );
+}
+
+lines.push(
+ // assert/
+ `export function assertNode(obj: any): void`,
+
+ // builders/
+ // eslint-disable-next-line max-len
+ `export function createTypeAnnotationBasedOnTypeof(type: 'string' | 'number' | 'undefined' | 'boolean' | 'function' | 'object' | 'symbol'): StringTypeAnnotation | VoidTypeAnnotation | NumberTypeAnnotation | BooleanTypeAnnotation | GenericTypeAnnotation`,
+ `export function createUnionTypeAnnotation<T extends FlowType>(types: [T]): T`,
+ `export function createFlowUnionType<T extends FlowType>(types: [T]): T`,
+ // this probably misbehaves if there are 0 elements, and it's not a UnionTypeAnnotation if there's only 1
+ // it is possible to require "2 or more" for this overload ([T, T, ...T[]]) but it requires typescript 3.0
+ `export function createUnionTypeAnnotation(types: ReadonlyArray<FlowType>): UnionTypeAnnotation`,
+ `export function createFlowUnionType(types: ReadonlyArray<FlowType>): UnionTypeAnnotation`,
+ // this smells like "internal API"
+ // eslint-disable-next-line max-len
+ `export function buildChildren(node: { children: ReadonlyArray<JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment | JSXEmptyExpression> }): JSXElement['children']`,
+
+ // clone/
+ `export function clone<T extends Node>(n: T): T;`,
+ `export function cloneDeep<T extends Node>(n: T): T;`,
+ `export function cloneDeepWithoutLoc<T extends Node>(n: T): T;`,
+ `export function cloneNode<T extends Node>(n: T, deep?: boolean, withoutLoc?: boolean): T;`,
+ `export function cloneWithoutLoc<T extends Node>(n: T): T;`,
+
+ // comments/
+ `export type CommentTypeShorthand = 'leading' | 'inner' | 'trailing'`,
+ // eslint-disable-next-line max-len
+ `export function addComment<T extends Node>(node: T, type: CommentTypeShorthand, content: string, line?: boolean): T`,
+ // eslint-disable-next-line max-len
+ `export function addComments<T extends Node>(node: T, type: CommentTypeShorthand, comments: ReadonlyArray<Comment>): T`,
+ `export function inheritInnerComments(node: Node, parent: Node): void`,
+ `export function inheritLeadingComments(node: Node, parent: Node): void`,
+ `export function inheritsComments<T extends Node>(node: T, parent: Node): void`,
+ `export function inheritTrailingComments(node: Node, parent: Node): void`,
+ `export function removeComments<T extends Node>(node: T): T`,
+
+ // converters/
+ // eslint-disable-next-line max-len
+ `export function ensureBlock(node: Extract<Node, { body: BlockStatement | Statement | Expression }>): BlockStatement`,
+ // too complex?
+ // eslint-disable-next-line max-len
+ `export function ensureBlock<K extends keyof Extract<Node, { body: BlockStatement | Statement | Expression }> = 'body'>(node: Extract<Node, Record<K, BlockStatement | Statement | Expression>>, key: K): BlockStatement`,
+ // gatherSequenceExpressions is not exported
+ `export function toBindingIdentifierName(name: { toString(): string } | null | undefined): string`,
+ `export function toBlock(node: Statement | Expression, parent?: Function | null): BlockStatement`,
+ // it is possible for `node` to be an arbitrary object if `key` is always provided,
+ // but that doesn't look like intended API
+ // eslint-disable-next-line max-len
+ `export function toComputedKey<T extends Extract<Node, { computed: boolean | null }>>(node: T, key?: Expression | Identifier): Expression`,
+ `export function toExpression(node: Function): FunctionExpression`,
+ `export function toExpression(node: Class): ClassExpression`,
+ `export function toExpression(node: ExpressionStatement | Expression | Class | Function): Expression`,
+ `export function toIdentifier(name: { toString(): string } | null | undefined): string`,
+ `export function toKeyAlias(node: Method | Property, key?: Node): string`,
+ // NOTE: this actually uses Scope from @babel/traverse, but we can't add a dependency on its types,
+ // as they live in @types. Declare the structural subset that is required.
+ // eslint-disable-next-line max-len
+ `export function toSequenceExpression(nodes: ReadonlyArray<Node>, scope: { push(value: { id: LVal; kind: 'var'; init?: Expression}): void; buildUndefinedNode(): Node }): SequenceExpression | undefined`,
+ `export function toStatement(node: AssignmentExpression, ignore?: boolean): ExpressionStatement`,
+ `export function toStatement(node: Statement | AssignmentExpression, ignore?: boolean): Statement`,
+ `export function toStatement(node: Class, ignore: true): ClassDeclaration | undefined`,
+ `export function toStatement(node: Class, ignore?: boolean): ClassDeclaration`,
+ `export function toStatement(node: Function, ignore: true): FunctionDeclaration | undefined`,
+ `export function toStatement(node: Function, ignore?: boolean): FunctionDeclaration`,
+ // eslint-disable-next-line max-len
+ `export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore: true): Statement | undefined`,
+ // eslint-disable-next-line max-len
+ `export function toStatement(node: Statement | Class | Function | AssignmentExpression, ignore?: boolean): Statement`,
+ // eslint-disable-next-line max-len
+ `export function valueToNode(value: undefined): Identifier`, // (should this not be a UnaryExpression to avoid shadowing?)
+ `export function valueToNode(value: boolean): BooleanLiteral`,
+ `export function valueToNode(value: null): NullLiteral`,
+ `export function valueToNode(value: string): StringLiteral`,
+ // Infinities and NaN need to use a BinaryExpression; negative values must be wrapped in UnaryExpression
+ `export function valueToNode(value: number): NumericLiteral | BinaryExpression | UnaryExpression`,
+ `export function valueToNode(value: RegExp): RegExpLiteral`,
+ // eslint-disable-next-line max-len
+ `export function valueToNode(value: ReadonlyArray<undefined | boolean | null | string | number | RegExp | object>): ArrayExpression`,
+ // this throws with objects that are not PlainObject according to lodash,
+ // or if there are non-valueToNode-able values
+ `export function valueToNode(value: object): ObjectExpression`,
+ // eslint-disable-next-line max-len
+ `export function valueToNode(value: undefined | boolean | null | string | number | RegExp | object): Expression`,
+
+ // modifications/
+ // eslint-disable-next-line max-len
+ `export function removeTypeDuplicates(types: ReadonlyArray<FlowType | false | null | undefined>): FlowType[]`,
+ // eslint-disable-next-line max-len
+ `export function appendToMemberExpression<T extends Pick<MemberExpression, 'object' | 'property'>>(member: T, append: MemberExpression['property'], computed?: boolean): T`,
+ // eslint-disable-next-line max-len
+ `export function inherits<T extends Node | null | undefined>(child: T, parent: Node | null | undefined): T`,
+ // eslint-disable-next-line max-len
+ `export function prependToMemberExpression<T extends Pick<MemberExpression, 'object' | 'property'>>(member: T, prepend: MemberExpression['object']): T`,
+ `export function removeProperties(
+ n: Node,
+ opts?: { preserveComments: boolean } | null
+): void;`,
+ `export function removePropertiesDeep<T extends Node>(
+ n: T,
+ opts?: { preserveComments: boolean } | null
+): T;`,
+
+ // retrievers/
+ // eslint-disable-next-line max-len
+ `export function getBindingIdentifiers(node: Node, duplicates: true, outerOnly?: boolean): Record<string, Array<Identifier>>`,
+ // eslint-disable-next-line max-len
+ `export function getBindingIdentifiers(node: Node, duplicates?: false, outerOnly?: boolean): Record<string, Identifier>`,
+ // eslint-disable-next-line max-len
+ `export function getBindingIdentifiers(node: Node, duplicates: boolean, outerOnly?: boolean): Record<string, Identifier | Array<Identifier>>`,
+ // eslint-disable-next-line max-len
+ `export function getOuterBindingIdentifiers(node: Node, duplicates: true): Record<string, Array<Identifier>>`,
+ `export function getOuterBindingIdentifiers(node: Node, duplicates?: false): Record<string, Identifier>`,
+ // eslint-disable-next-line max-len
+ `export function getOuterBindingIdentifiers(node: Node, duplicates: boolean): Record<string, Identifier | Array<Identifier>>`,
+
+ // traverse/
+ `export type TraversalAncestors = ReadonlyArray<{
+ node: Node,
+ key: string,
+ index?: number,
+ }>;
+ export type TraversalHandler<T> = (
+ this: undefined, node: Node, parent: TraversalAncestors, type: T
+ ) => void;
+ export type TraversalHandlers<T> = {
+ enter?: TraversalHandler<T>,
+ exit?: TraversalHandler<T>,
+ };`.replace(/(^|\n) {2}/g, "$1"),
+ // eslint-disable-next-line
+ `export function traverse<T>(n: Node, h: TraversalHandler<T> | TraversalHandlers<T>, state?: T): void;`,
+ `export function traverseFast<T>(n: Node, h: TraversalHandler<T>, state?: T): void;`,
+
+ // utils/
+ // cleanJSXElementLiteralChild is not exported
+ // inherit is not exported
+ `export function shallowEqual<T extends object>(actual: object, expected: T): actual is T`,
+
+ // validators/
+ // eslint-disable-next-line max-len
+ `export function buildMatchMemberExpression(match: string, allowPartial?: boolean): (node: Node | null | undefined) => node is MemberExpression`,
+ // eslint-disable-next-line max-len
+ `export function is<T extends Node['type']>(type: T, n: Node | null | undefined, required?: undefined): n is Extract<Node, { type: T }>`,
+ // eslint-disable-next-line max-len
+ `export function is<T extends Node['type'], P extends Extract<Node, { type: T }>>(type: T, n: Node | null | undefined, required: Partial<P>): n is P`,
+ // eslint-disable-next-line max-len
+ `export function is<P extends Node>(type: string, n: Node | null | undefined, required: Partial<P>): n is P`,
+ `export function is(type: string, n: Node | null | undefined, required?: Partial<Node>): n is Node`,
+ `export function isBinding(node: Node, parent: Node, grandparent?: Node): boolean`,
+ // eslint-disable-next-line max-len
+ `export function isBlockScoped(node: Node): node is FunctionDeclaration | ClassDeclaration | VariableDeclaration`,
+ `export function isImmutable(node: Node): node is Immutable`,
+ `export function isLet(node: Node): node is VariableDeclaration`,
+ `export function isNode(node: object | null | undefined): node is Node`,
+ `export function isNodesEquivalent<T extends Partial<Node>>(a: T, b: any): b is T`,
+ `export function isNodesEquivalent(a: any, b: any): boolean`,
+ `export function isPlaceholderType(placeholderType: Node['type'], targetType: Node['type']): boolean`,
+ `export function isReferenced(node: Node, parent: Node, grandparent?: Node): boolean`,
+ `export function isScope(node: Node, parent: Node): node is Scopable`,
+ `export function isSpecifierDefault(specifier: ModuleSpecifier): boolean`,
+ `export function isType<T extends Node['type']>(nodetype: string, targetType: T): nodetype is T`,
+ `export function isType(nodetype: string | null | undefined, targetType: string): boolean`,
+ `export function isValidES3Identifier(name: string): boolean`,
+ `export function isValidIdentifier(name: string): boolean`,
+ `export function isVar(node: Node): node is VariableDeclaration`,
+ // the MemberExpression implication is incidental, but it follows from the implementation
+ // eslint-disable-next-line max-len
+ `export function matchesPattern(node: Node | null | undefined, match: string | ReadonlyArray<string>, allowPartial?: boolean): node is MemberExpression`,
+ // eslint-disable-next-line max-len
+ `export function validate<T extends Node, K extends keyof T>(n: Node | null | undefined, key: K, value: T[K]): void;`,
+ `export function validate(n: Node, key: string, value: any): void;`
+);
+
+for (const type in t.DEPRECATED_KEYS) {
+ code += `/**
+ * @deprecated Use \`${t.DEPRECATED_KEYS[type]}\`
+ */
+export type ${type} = ${t.DEPRECATED_KEYS[type]};\n
+`;
+}
+
+for (const type in t.FLIPPED_ALIAS_KEYS) {
+ const types = t.FLIPPED_ALIAS_KEYS[type];
+ code += `export type ${type} = ${types
+ .map(type => `${type}`)
+ .join(" | ")};\n`;
+}
+code += "\n";
+
+code += "export interface Aliases {\n";
+for (const type in t.FLIPPED_ALIAS_KEYS) {
+ code += ` ${type}: ${type};\n`;
+}
+code += "}\n\n";
+
+code += lines.join("\n") + "\n";
+
+//
+
+process.stdout.write(code);
+
+//
+
+function areAllRemainingFieldsNullable(fieldName, fieldNames, fields) {
+ const index = fieldNames.indexOf(fieldName);
+ return fieldNames.slice(index).every(_ => isNullable(fields[_]));
+}
+
+function hasDefault(field) {
+ return field.default != null;
+}
+
+function isNullable(field) {
+ return field.optional || hasDefault(field);
+}
+
+function sortFieldNames(fields, type) {
+ return fields.sort((fieldA, fieldB) => {
+ const indexA = t.BUILDER_KEYS[type].indexOf(fieldA);
+ const indexB = t.BUILDER_KEYS[type].indexOf(fieldB);
+ if (indexA === indexB) return fieldA < fieldB ? -1 : 1;
+ if (indexA === -1) return 1;
+ if (indexB === -1) return -1;
+ return indexA - indexB;
+ });
+}
diff --git a/node_modules/@babel/types/scripts/generators/validators.js b/node_modules/@babel/types/scripts/generators/validators.js
new file mode 100644
index 0000000..acd6da6
--- /dev/null
+++ b/node_modules/@babel/types/scripts/generators/validators.js
@@ -0,0 +1,87 @@
+import definitions from "../../lib/definitions/index.js";
+
+const has = Function.call.bind(Object.prototype.hasOwnProperty);
+
+function joinComparisons(leftArr, right) {
+ return (
+ leftArr.map(JSON.stringify).join(` === ${right} || `) + ` === ${right}`
+ );
+}
+
+function addIsHelper(type, aliasKeys, deprecated) {
+ const targetType = JSON.stringify(type);
+ let aliasSource = "";
+ if (aliasKeys) {
+ aliasSource = joinComparisons(aliasKeys, "nodeType");
+ }
+
+ let placeholderSource = "";
+ const placeholderTypes = [];
+ if (
+ definitions.PLACEHOLDERS.includes(type) &&
+ has(definitions.FLIPPED_ALIAS_KEYS, type)
+ ) {
+ placeholderTypes.push(type);
+ }
+ if (has(definitions.PLACEHOLDERS_FLIPPED_ALIAS, type)) {
+ placeholderTypes.push(...definitions.PLACEHOLDERS_FLIPPED_ALIAS[type]);
+ }
+ if (placeholderTypes.length > 0) {
+ placeholderSource =
+ ' || nodeType === "Placeholder" && (' +
+ joinComparisons(
+ placeholderTypes,
+ "(node as t.Placeholder).expectedNode"
+ ) +
+ ")";
+ }
+
+ const result =
+ definitions.NODE_FIELDS[type] || definitions.FLIPPED_ALIAS_KEYS[type]
+ ? `node is t.${type}`
+ : "boolean";
+
+ return `export function is${type}(node: object | null | undefined, opts?: object | null): ${result} {
+ ${deprecated || ""}
+ if (!node) return false;
+
+ const nodeType = (node as t.Node).type;
+ if (${
+ aliasSource ? aliasSource : `nodeType === ${targetType}`
+ }${placeholderSource}) {
+ if (typeof opts === "undefined") {
+ return true;
+ } else {
+ return shallowEqual(node, opts);
+ }
+ }
+
+ return false;
+ }
+ `;
+}
+
+export default function generateValidators() {
+ let output = `/*
+ * This file is auto-generated! Do not modify it directly.
+ * To re-generate run 'make build'
+ */
+import shallowEqual from "../../utils/shallowEqual";
+import type * as t from "../..";\n\n`;
+
+ Object.keys(definitions.VISITOR_KEYS).forEach(type => {
+ output += addIsHelper(type);
+ });
+
+ Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => {
+ output += addIsHelper(type, definitions.FLIPPED_ALIAS_KEYS[type]);
+ });
+
+ Object.keys(definitions.DEPRECATED_KEYS).forEach(type => {
+ const newType = definitions.DEPRECATED_KEYS[type];
+ const deprecated = `console.trace("The node type ${type} has been renamed to ${newType}");`;
+ output += addIsHelper(type, null, deprecated);
+ });
+
+ return output;
+}
diff --git a/node_modules/@babel/types/scripts/package.json b/node_modules/@babel/types/scripts/package.json
new file mode 100644
index 0000000..5ffd980
--- /dev/null
+++ b/node_modules/@babel/types/scripts/package.json
@@ -0,0 +1 @@
+{ "type": "module" }
diff --git a/node_modules/@babel/types/scripts/utils/formatBuilderName.js b/node_modules/@babel/types/scripts/utils/formatBuilderName.js
new file mode 100644
index 0000000..f00a3c4
--- /dev/null
+++ b/node_modules/@babel/types/scripts/utils/formatBuilderName.js
@@ -0,0 +1,8 @@
+const toLowerCase = Function.call.bind("".toLowerCase);
+
+export default function formatBuilderName(type) {
+ // FunctionExpression -> functionExpression
+ // JSXIdentifier -> jsxIdentifier
+ // V8IntrinsicIdentifier -> v8IntrinsicIdentifier
+ return type.replace(/^([A-Z](?=[a-z0-9])|[A-Z]+(?=[A-Z]))/, toLowerCase);
+}
diff --git a/node_modules/@babel/types/scripts/utils/lowerFirst.js b/node_modules/@babel/types/scripts/utils/lowerFirst.js
new file mode 100644
index 0000000..012f252
--- /dev/null
+++ b/node_modules/@babel/types/scripts/utils/lowerFirst.js
@@ -0,0 +1,3 @@
+export default function lowerFirst(string) {
+ return string[0].toLowerCase() + string.slice(1);
+}
diff --git a/node_modules/@babel/types/scripts/utils/stringifyValidator.js b/node_modules/@babel/types/scripts/utils/stringifyValidator.js
new file mode 100644
index 0000000..4b8d29c
--- /dev/null
+++ b/node_modules/@babel/types/scripts/utils/stringifyValidator.js
@@ -0,0 +1,66 @@
+export default function stringifyValidator(validator, nodePrefix) {
+ if (validator === undefined) {
+ return "any";
+ }
+
+ if (validator.each) {
+ return `Array<${stringifyValidator(validator.each, nodePrefix)}>`;
+ }
+
+ if (validator.chainOf) {
+ return stringifyValidator(validator.chainOf[1], nodePrefix);
+ }
+
+ if (validator.oneOf) {
+ return validator.oneOf.map(JSON.stringify).join(" | ");
+ }
+
+ if (validator.oneOfNodeTypes) {
+ return validator.oneOfNodeTypes.map(_ => nodePrefix + _).join(" | ");
+ }
+
+ if (validator.oneOfNodeOrValueTypes) {
+ return validator.oneOfNodeOrValueTypes
+ .map(_ => {
+ return isValueType(_) ? _ : nodePrefix + _;
+ })
+ .join(" | ");
+ }
+
+ if (validator.type) {
+ return validator.type;
+ }
+
+ if (validator.shapeOf) {
+ return (
+ "{ " +
+ Object.keys(validator.shapeOf)
+ .map(shapeKey => {
+ const propertyDefinition = validator.shapeOf[shapeKey];
+ if (propertyDefinition.validate) {
+ const isOptional =
+ propertyDefinition.optional || propertyDefinition.default != null;
+ return (
+ shapeKey +
+ (isOptional ? "?: " : ": ") +
+ stringifyValidator(propertyDefinition.validate)
+ );
+ }
+ return null;
+ })
+ .filter(Boolean)
+ .join(", ") +
+ " }"
+ );
+ }
+
+ return ["any"];
+}
+
+/**
+ * Heuristic to decide whether or not the given type is a value type (eg. "null")
+ * or a Node type (eg. "Expression").
+ */
+function isValueType(type) {
+ return type.charAt(0).toLowerCase() === type.charAt(0);
+}
diff --git a/node_modules/@babel/types/scripts/utils/toFunctionName.js b/node_modules/@babel/types/scripts/utils/toFunctionName.js
new file mode 100644
index 0000000..2b64578
--- /dev/null
+++ b/node_modules/@babel/types/scripts/utils/toFunctionName.js
@@ -0,0 +1,4 @@
+export default function toFunctionName(typeName) {
+ const _ = typeName.replace(/^TS/, "ts").replace(/^JSX/, "jsx");
+ return _.slice(0, 1).toLowerCase() + _.slice(1);
+}