weapp-tailwindcss 5.5.4 → 5.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundlers/gulp/shared/create-native-framework-plugins/file-transforms.d.ts +5 -4
- package/dist/bundlers/shared/final-css-cleanup.d.ts +1 -2
- package/dist/bundlers/shared/framework-css-composition.d.ts +1 -0
- package/dist/bundlers/shared/framework-postcss.d.ts +2 -1
- package/dist/bundlers/shared/framework-user-css.d.ts +1 -0
- package/dist/bundlers/shared/generated-css-marker.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/generation-helpers/results.d.ts +5 -7
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +4 -1
- package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +1 -4
- package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/pipeline/context.d.ts +4 -2
- package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/types.d.ts +6 -3
- package/dist/bundlers/shared/generator-css/user-css/apply-only.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/user-css/compile-functions.d.ts +4 -0
- package/dist/bundlers/shared/generator-css/user-css/generated-cleanup.d.ts +3 -1
- package/dist/bundlers/shared/generator-css/user-css/source-fragments.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/user-css/transform.d.ts +3 -0
- package/dist/bundlers/shared/style-handler-options.d.ts +7 -0
- package/dist/bundlers/shared/v4-generation-core.d.ts +0 -1
- package/dist/bundlers/vite/css-finalizer/css-calc.d.ts +3 -0
- package/dist/bundlers/vite/css-finalizer/final-assets.d.ts +3 -0
- package/dist/bundlers/vite/css-handler-options.d.ts +1 -1
- package/dist/bundlers/vite/frameworks/generic/web.d.ts +2 -1
- package/dist/bundlers/vite/generate-bundle/css-transform-decision-plan.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/finalize/sync-processed-css.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/framework-style-memory.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +7 -0
- package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/runtime.d.ts +3 -1
- package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/temporary-css-assets.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/types.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/web-css-module.d.ts +1 -0
- package/dist/bundlers/vite/plugin-hook.d.ts +3 -0
- package/dist/bundlers/vite/processed-css-assets/coverage.d.ts +3 -1
- package/dist/bundlers/vite/processed-css-assets/markers-imports.d.ts +1 -1
- package/dist/bundlers/vite/processed-css-assets/scoped-tailwind-noise.d.ts +1 -1
- package/dist/bundlers/vite/shared/create-framework-plugins-runtime.d.ts +3 -1
- package/dist/bundlers/vite/shared/framework-module-candidates.d.ts +2 -1
- package/dist/bundlers/vite/shared/framework-runtime-configuration.d.ts +3 -0
- package/dist/bundlers/vite/shared/framework-runtime-options.d.ts +9 -0
- package/dist/bundlers/vite/shared/framework-runtime-utils.d.ts +6 -5
- package/dist/bundlers/vite/shared/framework-source-scan-session.d.ts +3 -3
- package/dist/bundlers/vite/shared/framework-strategy.d.ts +3 -1
- package/dist/bundlers/vite/shared/hmr-source.d.ts +2 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/processed-css-task.d.ts +2 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
- package/dist/bundlers/webpack/shared/create-framework-plugin/plugin.d.ts +1 -1
- package/dist/compiler/index.d.ts +2 -0
- package/dist/compiler/semantic-css.d.ts +1 -1
- package/dist/compiler/types.d.ts +1 -1
- package/dist/{compiler-DFROuh5Z.cjs → compiler-C8FqI-P3.cjs} +1060 -1163
- package/dist/{compiler-CJ5yX-on.js → compiler-D3GBwxoa.js} +32 -23
- package/dist/core/compiler/transforms.d.ts +1 -1
- package/dist/core.cjs +4 -4
- package/dist/core.js +4 -4
- package/dist/{css-imports-_5cwJnx-.cjs → css-imports-XvtI1zCY.cjs} +2 -3
- package/dist/css-macro.cjs +1 -1
- package/dist/css-macro.js +1 -1
- package/dist/{defaults-CKx-4LcW.js → defaults-AQuvJS-h.js} +4 -2
- package/dist/{defaults-CiGsr8Xq.cjs → defaults-CyX5iO9y.cjs} +4 -2
- package/dist/defaults.cjs +1 -1
- package/dist/defaults.js +1 -1
- package/dist/final-css-cleanup-CDTmVAye.cjs +1 -0
- package/dist/{final-css-cleanup-B0HUBtiE.js → final-css-cleanup-u_sI2p56.js} +1 -126
- package/dist/framework/index.d.ts +1 -1
- package/dist/framework/platform.d.ts +2 -2
- package/dist/{generator-RK2HtgOb.cjs → generator-Bvr4WmuF.cjs} +150 -150
- package/dist/{generator-BgbYHNgD.js → generator-C0BJjyLM.js} +131 -131
- package/dist/generator.cjs +1 -1
- package/dist/generator.js +1 -1
- package/dist/{gulp-BS7fTmyj.cjs → gulp-BExe5RBF.cjs} +8 -8
- package/dist/{gulp-nl-2p5Dw.js → gulp-BhkIIk7J.js} +5 -5
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-BfxWwMeT.js → hmr-timing-B9Yt86-U.js} +299 -404
- package/dist/{hmr-timing-D45cTIzM.cjs → hmr-timing-CoiJIqDu.cjs} +4 -4
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/js/NodePathWalker.d.ts +1 -1
- package/dist/js/node-path-walker/export-handlers.d.ts +1 -1
- package/dist/js/node-path-walker/import-tokens.d.ts +1 -1
- package/dist/{pipeline-helpers-BEhISt4D.cjs → pipeline-helpers-BOjTEmMi.cjs} +6 -6
- package/dist/postcss.cjs +1 -1
- package/dist/postcss.js +1 -1
- package/dist/presets.cjs +2 -2
- package/dist/presets.js +2 -2
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +2 -2
- package/dist/{scoped-generator-Dqq2iLky.js → scoped-generator-B6Y1bxzM.js} +46 -31
- package/dist/{scoped-generator-DccPwmJT.cjs → scoped-generator-BUBls_oM.cjs} +46 -31
- package/dist/{source-candidate-scan-signature-CnUlGWhP.cjs → source-candidate-scan-signature-BtJZp28T.cjs} +32 -3
- package/dist/{source-candidate-scan-signature-BJkQJtRM.js → source-candidate-scan-signature-DNuGKTqf.js} +21 -4
- package/dist/style-injector/internal.d.ts +118 -8
- package/dist/style-injector/options.d.ts +5 -1
- package/dist/tailwindcss/runtime-options.d.ts +5 -0
- package/dist/tailwindcss/v4/preflight.d.ts +0 -1
- package/dist/tailwindcss/v4-engine/generator/incremental-cache.d.ts +1 -0
- package/dist/tailwindcss/v4-engine/generator/style-context.d.ts +4 -0
- package/dist/{tailwindcss-o3Xe-o7M.js → tailwindcss-B_4E52WF.js} +7 -13
- package/dist/{tailwindcss-B03BGeTO.cjs → tailwindcss-CBYjzRmV.cjs} +4 -10
- package/dist/{transform-BVH7iLHn.js → transform-CkEnJYIP.js} +18 -12
- package/dist/{transform-MIhriZRr.cjs → transform-FkqbTBJR.cjs} +17 -11
- package/dist/types/index.d.ts +3 -2
- package/dist/uni-app-x/border-preflight.d.ts +1 -2
- package/dist/uni-app-x/component-local-style.d.ts +2 -1
- package/dist/uni-app-x/transform.d.ts +4 -2
- package/dist/uni-app-x/vite/author-apply.d.ts +3 -1
- package/dist/uni-app-x/vite/native-hmr.d.ts +1 -1
- package/dist/uni-app-x/vite/style-result.d.ts +5 -0
- package/dist/{v4-generation-core-BvW2aK23.cjs → v4-generation-core-Cz1D7wm1.cjs} +313 -418
- package/dist/vite/web.cjs +1 -1
- package/dist/vite/web.js +1 -1
- package/dist/{vite-4RznbXVI.cjs → vite-DxuKPZlp.cjs} +565 -592
- package/dist/{vite-hGECCqfq.js → vite-lP35OguX.js} +558 -578
- package/dist/vite-web.d.ts +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/weapp-tw-css-generation-loader.cjs +2 -2
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +7 -7
- package/dist/{web-0FAisq6H.js → web-Dfz_jpNj.js} +144 -107
- package/dist/{web-DQZ27KWH.cjs → web-DhDxhlkq.cjs} +156 -107
- package/dist/{webpack-8cQlXIo4.js → webpack-D6jp1o3m.js} +18 -17
- package/dist/{webpack-DOQ_3ViW.cjs → webpack-R2Sbggiy.cjs} +20 -20
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/dist/wxml/utils/codegen/legacy-visitor.d.ts +2 -2
- package/dist/wxml/utils/custom-template.d.ts +1 -1
- package/package.json +9 -11
- package/dist/final-css-cleanup-DSjczga3.cjs +0 -138
- package/dist/tailwindcss/v4-engine/css-import.d.ts +0 -14
- package/dist/uni-app-x/style-asset/source-parser.d.ts +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-Ctb5zv51.cjs");
|
|
2
2
|
const require_framework = require("./framework.cjs");
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
3
|
+
const require_generator = require("./generator-Bvr4WmuF.cjs");
|
|
4
|
+
const require_tailwindcss = require("./tailwindcss-CBYjzRmV.cjs");
|
|
5
5
|
require("./utils-CuKLf1Zv.cjs");
|
|
6
|
-
const require_defaults = require("./defaults-
|
|
6
|
+
const require_defaults = require("./defaults-CyX5iO9y.cjs");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
9
9
|
let node_process = require("node:process");
|
|
@@ -3298,7 +3298,7 @@ function readCodePoint$1(input, pos, lineStart, curLine, throwOnInvalid, errors)
|
|
|
3298
3298
|
};
|
|
3299
3299
|
}
|
|
3300
3300
|
//#endregion
|
|
3301
|
-
//#region ../../node_modules/.pnpm/@babel+types@8.0.
|
|
3301
|
+
//#region ../../node_modules/.pnpm/@babel+types@8.0.5/node_modules/@babel/types/lib/index.js
|
|
3302
3302
|
var lib_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
3303
3303
|
ACCESSOR_TYPES: () => ACCESSOR_TYPES,
|
|
3304
3304
|
ALIAS_KEYS: () => ALIAS_KEYS,
|
|
@@ -4341,7 +4341,7 @@ var lib_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
|
4341
4341
|
isTopicReference: () => isTopicReference$1,
|
|
4342
4342
|
isTryStatement: () => isTryStatement,
|
|
4343
4343
|
isTupleTypeAnnotation: () => isTupleTypeAnnotation$1,
|
|
4344
|
-
isType: () => isType$
|
|
4344
|
+
isType: () => isType$2,
|
|
4345
4345
|
isTypeAlias: () => isTypeAlias,
|
|
4346
4346
|
isTypeAnnotation: () => isTypeAnnotation$1,
|
|
4347
4347
|
isTypeCastExpression: () => isTypeCastExpression,
|
|
@@ -4553,6 +4553,9 @@ function shallowEqual(actual, expected) {
|
|
|
4553
4553
|
for (const key of keys) if (actual[key] !== expected[key]) return false;
|
|
4554
4554
|
return true;
|
|
4555
4555
|
}
|
|
4556
|
+
function isType$1(type, node, opts) {
|
|
4557
|
+
return node?.type === type && (opts == null || shallowEqual(node, opts));
|
|
4558
|
+
}
|
|
4556
4559
|
const warnings = /* @__PURE__ */ new Set();
|
|
4557
4560
|
function deprecationWarning$1(oldName, newName, prefix = "", cacheKey = oldName) {
|
|
4558
4561
|
if (warnings.has(cacheKey)) return;
|
|
@@ -4582,1244 +4585,748 @@ function captureShortStackTrace(skip, length) {
|
|
|
4582
4585
|
};
|
|
4583
4586
|
}
|
|
4584
4587
|
function isArrayExpression$1(node, opts) {
|
|
4585
|
-
|
|
4586
|
-
if (node.type !== "ArrayExpression") return false;
|
|
4587
|
-
return opts == null || shallowEqual(node, opts);
|
|
4588
|
+
return isType$1("ArrayExpression", node, opts);
|
|
4588
4589
|
}
|
|
4589
4590
|
function isAssignmentExpression$1(node, opts) {
|
|
4590
|
-
|
|
4591
|
-
if (node.type !== "AssignmentExpression") return false;
|
|
4592
|
-
return opts == null || shallowEqual(node, opts);
|
|
4591
|
+
return isType$1("AssignmentExpression", node, opts);
|
|
4593
4592
|
}
|
|
4594
4593
|
function isBinaryExpression(node, opts) {
|
|
4595
|
-
|
|
4596
|
-
if (node.type !== "BinaryExpression") return false;
|
|
4597
|
-
return opts == null || shallowEqual(node, opts);
|
|
4594
|
+
return isType$1("BinaryExpression", node, opts);
|
|
4598
4595
|
}
|
|
4599
4596
|
function isInterpreterDirective(node, opts) {
|
|
4600
|
-
|
|
4601
|
-
if (node.type !== "InterpreterDirective") return false;
|
|
4602
|
-
return opts == null || shallowEqual(node, opts);
|
|
4597
|
+
return isType$1("InterpreterDirective", node, opts);
|
|
4603
4598
|
}
|
|
4604
4599
|
function isDirective(node, opts) {
|
|
4605
|
-
|
|
4606
|
-
if (node.type !== "Directive") return false;
|
|
4607
|
-
return opts == null || shallowEqual(node, opts);
|
|
4600
|
+
return isType$1("Directive", node, opts);
|
|
4608
4601
|
}
|
|
4609
4602
|
function isDirectiveLiteral(node, opts) {
|
|
4610
|
-
|
|
4611
|
-
if (node.type !== "DirectiveLiteral") return false;
|
|
4612
|
-
return opts == null || shallowEqual(node, opts);
|
|
4603
|
+
return isType$1("DirectiveLiteral", node, opts);
|
|
4613
4604
|
}
|
|
4614
4605
|
function isBlockStatement$2(node, opts) {
|
|
4615
|
-
|
|
4616
|
-
if (node.type !== "BlockStatement") return false;
|
|
4617
|
-
return opts == null || shallowEqual(node, opts);
|
|
4606
|
+
return isType$1("BlockStatement", node, opts);
|
|
4618
4607
|
}
|
|
4619
4608
|
function isBreakStatement(node, opts) {
|
|
4620
|
-
|
|
4621
|
-
if (node.type !== "BreakStatement") return false;
|
|
4622
|
-
return opts == null || shallowEqual(node, opts);
|
|
4609
|
+
return isType$1("BreakStatement", node, opts);
|
|
4623
4610
|
}
|
|
4624
4611
|
function isCallExpression$4(node, opts) {
|
|
4625
|
-
|
|
4626
|
-
if (node.type !== "CallExpression") return false;
|
|
4627
|
-
return opts == null || shallowEqual(node, opts);
|
|
4612
|
+
return isType$1("CallExpression", node, opts);
|
|
4628
4613
|
}
|
|
4629
4614
|
function isCatchClause(node, opts) {
|
|
4630
|
-
|
|
4631
|
-
if (node.type !== "CatchClause") return false;
|
|
4632
|
-
return opts == null || shallowEqual(node, opts);
|
|
4615
|
+
return isType$1("CatchClause", node, opts);
|
|
4633
4616
|
}
|
|
4634
4617
|
function isConditionalExpression(node, opts) {
|
|
4635
|
-
|
|
4636
|
-
if (node.type !== "ConditionalExpression") return false;
|
|
4637
|
-
return opts == null || shallowEqual(node, opts);
|
|
4618
|
+
return isType$1("ConditionalExpression", node, opts);
|
|
4638
4619
|
}
|
|
4639
4620
|
function isContinueStatement(node, opts) {
|
|
4640
|
-
|
|
4641
|
-
if (node.type !== "ContinueStatement") return false;
|
|
4642
|
-
return opts == null || shallowEqual(node, opts);
|
|
4621
|
+
return isType$1("ContinueStatement", node, opts);
|
|
4643
4622
|
}
|
|
4644
4623
|
function isDebuggerStatement(node, opts) {
|
|
4645
|
-
|
|
4646
|
-
if (node.type !== "DebuggerStatement") return false;
|
|
4647
|
-
return opts == null || shallowEqual(node, opts);
|
|
4624
|
+
return isType$1("DebuggerStatement", node, opts);
|
|
4648
4625
|
}
|
|
4649
4626
|
function isDoWhileStatement(node, opts) {
|
|
4650
|
-
|
|
4651
|
-
if (node.type !== "DoWhileStatement") return false;
|
|
4652
|
-
return opts == null || shallowEqual(node, opts);
|
|
4627
|
+
return isType$1("DoWhileStatement", node, opts);
|
|
4653
4628
|
}
|
|
4654
4629
|
function isEmptyStatement$1(node, opts) {
|
|
4655
|
-
|
|
4656
|
-
if (node.type !== "EmptyStatement") return false;
|
|
4657
|
-
return opts == null || shallowEqual(node, opts);
|
|
4630
|
+
return isType$1("EmptyStatement", node, opts);
|
|
4658
4631
|
}
|
|
4659
4632
|
function isExpressionStatement$2(node, opts) {
|
|
4660
|
-
|
|
4661
|
-
if (node.type !== "ExpressionStatement") return false;
|
|
4662
|
-
return opts == null || shallowEqual(node, opts);
|
|
4633
|
+
return isType$1("ExpressionStatement", node, opts);
|
|
4663
4634
|
}
|
|
4664
4635
|
function isFile(node, opts) {
|
|
4665
|
-
|
|
4666
|
-
if (node.type !== "File") return false;
|
|
4667
|
-
return opts == null || shallowEqual(node, opts);
|
|
4636
|
+
return isType$1("File", node, opts);
|
|
4668
4637
|
}
|
|
4669
4638
|
function isForInStatement(node, opts) {
|
|
4670
|
-
|
|
4671
|
-
if (node.type !== "ForInStatement") return false;
|
|
4672
|
-
return opts == null || shallowEqual(node, opts);
|
|
4639
|
+
return isType$1("ForInStatement", node, opts);
|
|
4673
4640
|
}
|
|
4674
4641
|
function isForStatement$1(node, opts) {
|
|
4675
|
-
|
|
4676
|
-
if (node.type !== "ForStatement") return false;
|
|
4677
|
-
return opts == null || shallowEqual(node, opts);
|
|
4642
|
+
return isType$1("ForStatement", node, opts);
|
|
4678
4643
|
}
|
|
4679
4644
|
function isFunctionDeclaration$1(node, opts) {
|
|
4680
|
-
|
|
4681
|
-
if (node.type !== "FunctionDeclaration") return false;
|
|
4682
|
-
return opts == null || shallowEqual(node, opts);
|
|
4645
|
+
return isType$1("FunctionDeclaration", node, opts);
|
|
4683
4646
|
}
|
|
4684
4647
|
function isFunctionExpression(node, opts) {
|
|
4685
|
-
|
|
4686
|
-
if (node.type !== "FunctionExpression") return false;
|
|
4687
|
-
return opts == null || shallowEqual(node, opts);
|
|
4648
|
+
return isType$1("FunctionExpression", node, opts);
|
|
4688
4649
|
}
|
|
4689
4650
|
function isIdentifier$7(node, opts) {
|
|
4690
|
-
|
|
4691
|
-
if (node.type !== "Identifier") return false;
|
|
4692
|
-
return opts == null || shallowEqual(node, opts);
|
|
4651
|
+
return isType$1("Identifier", node, opts);
|
|
4693
4652
|
}
|
|
4694
4653
|
function isIfStatement$2(node, opts) {
|
|
4695
|
-
|
|
4696
|
-
if (node.type !== "IfStatement") return false;
|
|
4697
|
-
return opts == null || shallowEqual(node, opts);
|
|
4654
|
+
return isType$1("IfStatement", node, opts);
|
|
4698
4655
|
}
|
|
4699
4656
|
function isLabeledStatement(node, opts) {
|
|
4700
|
-
|
|
4701
|
-
if (node.type !== "LabeledStatement") return false;
|
|
4702
|
-
return opts == null || shallowEqual(node, opts);
|
|
4657
|
+
return isType$1("LabeledStatement", node, opts);
|
|
4703
4658
|
}
|
|
4704
4659
|
function isStringLiteral$3(node, opts) {
|
|
4705
|
-
|
|
4706
|
-
if (node.type !== "StringLiteral") return false;
|
|
4707
|
-
return opts == null || shallowEqual(node, opts);
|
|
4660
|
+
return isType$1("StringLiteral", node, opts);
|
|
4708
4661
|
}
|
|
4709
4662
|
function isNumericLiteral(node, opts) {
|
|
4710
|
-
|
|
4711
|
-
if (node.type !== "NumericLiteral") return false;
|
|
4712
|
-
return opts == null || shallowEqual(node, opts);
|
|
4663
|
+
return isType$1("NumericLiteral", node, opts);
|
|
4713
4664
|
}
|
|
4714
4665
|
function isNullLiteral$1(node, opts) {
|
|
4715
|
-
|
|
4716
|
-
if (node.type !== "NullLiteral") return false;
|
|
4717
|
-
return opts == null || shallowEqual(node, opts);
|
|
4666
|
+
return isType$1("NullLiteral", node, opts);
|
|
4718
4667
|
}
|
|
4719
4668
|
function isBooleanLiteral(node, opts) {
|
|
4720
|
-
|
|
4721
|
-
if (node.type !== "BooleanLiteral") return false;
|
|
4722
|
-
return opts == null || shallowEqual(node, opts);
|
|
4669
|
+
return isType$1("BooleanLiteral", node, opts);
|
|
4723
4670
|
}
|
|
4724
4671
|
function isRegExpLiteral$1(node, opts) {
|
|
4725
|
-
|
|
4726
|
-
if (node.type !== "RegExpLiteral") return false;
|
|
4727
|
-
return opts == null || shallowEqual(node, opts);
|
|
4672
|
+
return isType$1("RegExpLiteral", node, opts);
|
|
4728
4673
|
}
|
|
4729
4674
|
function isLogicalExpression(node, opts) {
|
|
4730
|
-
|
|
4731
|
-
if (node.type !== "LogicalExpression") return false;
|
|
4732
|
-
return opts == null || shallowEqual(node, opts);
|
|
4675
|
+
return isType$1("LogicalExpression", node, opts);
|
|
4733
4676
|
}
|
|
4734
4677
|
function isMemberExpression$3(node, opts) {
|
|
4735
|
-
|
|
4736
|
-
if (node.type !== "MemberExpression") return false;
|
|
4737
|
-
return opts == null || shallowEqual(node, opts);
|
|
4678
|
+
return isType$1("MemberExpression", node, opts);
|
|
4738
4679
|
}
|
|
4739
4680
|
function isNewExpression$2(node, opts) {
|
|
4740
|
-
|
|
4741
|
-
if (node.type !== "NewExpression") return false;
|
|
4742
|
-
return opts == null || shallowEqual(node, opts);
|
|
4681
|
+
return isType$1("NewExpression", node, opts);
|
|
4743
4682
|
}
|
|
4744
4683
|
function isProgram$1(node, opts) {
|
|
4745
|
-
|
|
4746
|
-
if (node.type !== "Program") return false;
|
|
4747
|
-
return opts == null || shallowEqual(node, opts);
|
|
4684
|
+
return isType$1("Program", node, opts);
|
|
4748
4685
|
}
|
|
4749
4686
|
function isObjectExpression$1(node, opts) {
|
|
4750
|
-
|
|
4751
|
-
if (node.type !== "ObjectExpression") return false;
|
|
4752
|
-
return opts == null || shallowEqual(node, opts);
|
|
4687
|
+
return isType$1("ObjectExpression", node, opts);
|
|
4753
4688
|
}
|
|
4754
4689
|
function isObjectMethod(node, opts) {
|
|
4755
|
-
|
|
4756
|
-
if (node.type !== "ObjectMethod") return false;
|
|
4757
|
-
return opts == null || shallowEqual(node, opts);
|
|
4690
|
+
return isType$1("ObjectMethod", node, opts);
|
|
4758
4691
|
}
|
|
4759
4692
|
function isObjectProperty$1(node, opts) {
|
|
4760
|
-
|
|
4761
|
-
if (node.type !== "ObjectProperty") return false;
|
|
4762
|
-
return opts == null || shallowEqual(node, opts);
|
|
4693
|
+
return isType$1("ObjectProperty", node, opts);
|
|
4763
4694
|
}
|
|
4764
4695
|
function isRestElement$1(node, opts) {
|
|
4765
|
-
|
|
4766
|
-
if (node.type !== "RestElement") return false;
|
|
4767
|
-
return opts == null || shallowEqual(node, opts);
|
|
4696
|
+
return isType$1("RestElement", node, opts);
|
|
4768
4697
|
}
|
|
4769
4698
|
function isReturnStatement(node, opts) {
|
|
4770
|
-
|
|
4771
|
-
if (node.type !== "ReturnStatement") return false;
|
|
4772
|
-
return opts == null || shallowEqual(node, opts);
|
|
4699
|
+
return isType$1("ReturnStatement", node, opts);
|
|
4773
4700
|
}
|
|
4774
4701
|
function isSequenceExpression$1(node, opts) {
|
|
4775
|
-
|
|
4776
|
-
if (node.type !== "SequenceExpression") return false;
|
|
4777
|
-
return opts == null || shallowEqual(node, opts);
|
|
4702
|
+
return isType$1("SequenceExpression", node, opts);
|
|
4778
4703
|
}
|
|
4779
4704
|
function isParenthesizedExpression(node, opts) {
|
|
4780
|
-
|
|
4781
|
-
if (node.type !== "ParenthesizedExpression") return false;
|
|
4782
|
-
return opts == null || shallowEqual(node, opts);
|
|
4705
|
+
return isType$1("ParenthesizedExpression", node, opts);
|
|
4783
4706
|
}
|
|
4784
4707
|
function isSwitchCase(node, opts) {
|
|
4785
|
-
|
|
4786
|
-
if (node.type !== "SwitchCase") return false;
|
|
4787
|
-
return opts == null || shallowEqual(node, opts);
|
|
4708
|
+
return isType$1("SwitchCase", node, opts);
|
|
4788
4709
|
}
|
|
4789
4710
|
function isSwitchStatement(node, opts) {
|
|
4790
|
-
|
|
4791
|
-
if (node.type !== "SwitchStatement") return false;
|
|
4792
|
-
return opts == null || shallowEqual(node, opts);
|
|
4711
|
+
return isType$1("SwitchStatement", node, opts);
|
|
4793
4712
|
}
|
|
4794
4713
|
function isThisExpression$1(node, opts) {
|
|
4795
|
-
|
|
4796
|
-
if (node.type !== "ThisExpression") return false;
|
|
4797
|
-
return opts == null || shallowEqual(node, opts);
|
|
4714
|
+
return isType$1("ThisExpression", node, opts);
|
|
4798
4715
|
}
|
|
4799
4716
|
function isThrowStatement(node, opts) {
|
|
4800
|
-
|
|
4801
|
-
if (node.type !== "ThrowStatement") return false;
|
|
4802
|
-
return opts == null || shallowEqual(node, opts);
|
|
4717
|
+
return isType$1("ThrowStatement", node, opts);
|
|
4803
4718
|
}
|
|
4804
4719
|
function isTryStatement(node, opts) {
|
|
4805
|
-
|
|
4806
|
-
if (node.type !== "TryStatement") return false;
|
|
4807
|
-
return opts == null || shallowEqual(node, opts);
|
|
4720
|
+
return isType$1("TryStatement", node, opts);
|
|
4808
4721
|
}
|
|
4809
4722
|
function isUnaryExpression$1(node, opts) {
|
|
4810
|
-
|
|
4811
|
-
if (node.type !== "UnaryExpression") return false;
|
|
4812
|
-
return opts == null || shallowEqual(node, opts);
|
|
4723
|
+
return isType$1("UnaryExpression", node, opts);
|
|
4813
4724
|
}
|
|
4814
4725
|
function isUpdateExpression(node, opts) {
|
|
4815
|
-
|
|
4816
|
-
if (node.type !== "UpdateExpression") return false;
|
|
4817
|
-
return opts == null || shallowEqual(node, opts);
|
|
4726
|
+
return isType$1("UpdateExpression", node, opts);
|
|
4818
4727
|
}
|
|
4819
4728
|
function isVariableDeclaration$3(node, opts) {
|
|
4820
|
-
|
|
4821
|
-
if (node.type !== "VariableDeclaration") return false;
|
|
4822
|
-
return opts == null || shallowEqual(node, opts);
|
|
4729
|
+
return isType$1("VariableDeclaration", node, opts);
|
|
4823
4730
|
}
|
|
4824
4731
|
function isVariableDeclarator(node, opts) {
|
|
4825
|
-
|
|
4826
|
-
if (node.type !== "VariableDeclarator") return false;
|
|
4827
|
-
return opts == null || shallowEqual(node, opts);
|
|
4732
|
+
return isType$1("VariableDeclarator", node, opts);
|
|
4828
4733
|
}
|
|
4829
4734
|
function isWhileStatement(node, opts) {
|
|
4830
|
-
|
|
4831
|
-
if (node.type !== "WhileStatement") return false;
|
|
4832
|
-
return opts == null || shallowEqual(node, opts);
|
|
4735
|
+
return isType$1("WhileStatement", node, opts);
|
|
4833
4736
|
}
|
|
4834
4737
|
function isWithStatement(node, opts) {
|
|
4835
|
-
|
|
4836
|
-
if (node.type !== "WithStatement") return false;
|
|
4837
|
-
return opts == null || shallowEqual(node, opts);
|
|
4738
|
+
return isType$1("WithStatement", node, opts);
|
|
4838
4739
|
}
|
|
4839
4740
|
function isAssignmentPattern$2(node, opts) {
|
|
4840
|
-
|
|
4841
|
-
if (node.type !== "AssignmentPattern") return false;
|
|
4842
|
-
return opts == null || shallowEqual(node, opts);
|
|
4741
|
+
return isType$1("AssignmentPattern", node, opts);
|
|
4843
4742
|
}
|
|
4844
4743
|
function isArrayPattern(node, opts) {
|
|
4845
|
-
|
|
4846
|
-
if (node.type !== "ArrayPattern") return false;
|
|
4847
|
-
return opts == null || shallowEqual(node, opts);
|
|
4744
|
+
return isType$1("ArrayPattern", node, opts);
|
|
4848
4745
|
}
|
|
4849
4746
|
function isArrowFunctionExpression(node, opts) {
|
|
4850
|
-
|
|
4851
|
-
if (node.type !== "ArrowFunctionExpression") return false;
|
|
4852
|
-
return opts == null || shallowEqual(node, opts);
|
|
4747
|
+
return isType$1("ArrowFunctionExpression", node, opts);
|
|
4853
4748
|
}
|
|
4854
4749
|
function isClassBody$2(node, opts) {
|
|
4855
|
-
|
|
4856
|
-
if (node.type !== "ClassBody") return false;
|
|
4857
|
-
return opts == null || shallowEqual(node, opts);
|
|
4750
|
+
return isType$1("ClassBody", node, opts);
|
|
4858
4751
|
}
|
|
4859
4752
|
function isClassExpression(node, opts) {
|
|
4860
|
-
|
|
4861
|
-
if (node.type !== "ClassExpression") return false;
|
|
4862
|
-
return opts == null || shallowEqual(node, opts);
|
|
4753
|
+
return isType$1("ClassExpression", node, opts);
|
|
4863
4754
|
}
|
|
4864
4755
|
function isClassDeclaration$2(node, opts) {
|
|
4865
|
-
|
|
4866
|
-
if (node.type !== "ClassDeclaration") return false;
|
|
4867
|
-
return opts == null || shallowEqual(node, opts);
|
|
4756
|
+
return isType$1("ClassDeclaration", node, opts);
|
|
4868
4757
|
}
|
|
4869
4758
|
function isExportAllDeclaration$1(node, opts) {
|
|
4870
|
-
|
|
4871
|
-
if (node.type !== "ExportAllDeclaration") return false;
|
|
4872
|
-
return opts == null || shallowEqual(node, opts);
|
|
4759
|
+
return isType$1("ExportAllDeclaration", node, opts);
|
|
4873
4760
|
}
|
|
4874
4761
|
function isExportDefaultDeclaration$2(node, opts) {
|
|
4875
|
-
|
|
4876
|
-
if (node.type !== "ExportDefaultDeclaration") return false;
|
|
4877
|
-
return opts == null || shallowEqual(node, opts);
|
|
4762
|
+
return isType$1("ExportDefaultDeclaration", node, opts);
|
|
4878
4763
|
}
|
|
4879
4764
|
function isExportNamedDeclaration$3(node, opts) {
|
|
4880
|
-
|
|
4881
|
-
if (node.type !== "ExportNamedDeclaration") return false;
|
|
4882
|
-
return opts == null || shallowEqual(node, opts);
|
|
4765
|
+
return isType$1("ExportNamedDeclaration", node, opts);
|
|
4883
4766
|
}
|
|
4884
4767
|
function isExportSpecifier(node, opts) {
|
|
4885
|
-
|
|
4886
|
-
if (node.type !== "ExportSpecifier") return false;
|
|
4887
|
-
return opts == null || shallowEqual(node, opts);
|
|
4768
|
+
return isType$1("ExportSpecifier", node, opts);
|
|
4888
4769
|
}
|
|
4889
4770
|
function isForOfStatement$1(node, opts) {
|
|
4890
|
-
|
|
4891
|
-
if (node.type !== "ForOfStatement") return false;
|
|
4892
|
-
return opts == null || shallowEqual(node, opts);
|
|
4771
|
+
return isType$1("ForOfStatement", node, opts);
|
|
4893
4772
|
}
|
|
4894
4773
|
function isImportDeclaration$2(node, opts) {
|
|
4895
|
-
|
|
4896
|
-
if (node.type !== "ImportDeclaration") return false;
|
|
4897
|
-
return opts == null || shallowEqual(node, opts);
|
|
4774
|
+
return isType$1("ImportDeclaration", node, opts);
|
|
4898
4775
|
}
|
|
4899
4776
|
function isImportDefaultSpecifier$1(node, opts) {
|
|
4900
|
-
|
|
4901
|
-
if (node.type !== "ImportDefaultSpecifier") return false;
|
|
4902
|
-
return opts == null || shallowEqual(node, opts);
|
|
4777
|
+
return isType$1("ImportDefaultSpecifier", node, opts);
|
|
4903
4778
|
}
|
|
4904
4779
|
function isImportNamespaceSpecifier$1(node, opts) {
|
|
4905
|
-
|
|
4906
|
-
if (node.type !== "ImportNamespaceSpecifier") return false;
|
|
4907
|
-
return opts == null || shallowEqual(node, opts);
|
|
4780
|
+
return isType$1("ImportNamespaceSpecifier", node, opts);
|
|
4908
4781
|
}
|
|
4909
4782
|
function isImportSpecifier$1(node, opts) {
|
|
4910
|
-
|
|
4911
|
-
if (node.type !== "ImportSpecifier") return false;
|
|
4912
|
-
return opts == null || shallowEqual(node, opts);
|
|
4783
|
+
return isType$1("ImportSpecifier", node, opts);
|
|
4913
4784
|
}
|
|
4914
4785
|
function isMetaProperty$1(node, opts) {
|
|
4915
|
-
|
|
4916
|
-
if (node.type !== "MetaProperty") return false;
|
|
4917
|
-
return opts == null || shallowEqual(node, opts);
|
|
4786
|
+
return isType$1("MetaProperty", node, opts);
|
|
4918
4787
|
}
|
|
4919
4788
|
function isClassMethod(node, opts) {
|
|
4920
|
-
|
|
4921
|
-
if (node.type !== "ClassMethod") return false;
|
|
4922
|
-
return opts == null || shallowEqual(node, opts);
|
|
4789
|
+
return isType$1("ClassMethod", node, opts);
|
|
4923
4790
|
}
|
|
4924
4791
|
function isObjectPattern(node, opts) {
|
|
4925
|
-
|
|
4926
|
-
if (node.type !== "ObjectPattern") return false;
|
|
4927
|
-
return opts == null || shallowEqual(node, opts);
|
|
4792
|
+
return isType$1("ObjectPattern", node, opts);
|
|
4928
4793
|
}
|
|
4929
4794
|
function isSpreadElement(node, opts) {
|
|
4930
|
-
|
|
4931
|
-
if (node.type !== "SpreadElement") return false;
|
|
4932
|
-
return opts == null || shallowEqual(node, opts);
|
|
4795
|
+
return isType$1("SpreadElement", node, opts);
|
|
4933
4796
|
}
|
|
4934
4797
|
function isSuper$2(node, opts) {
|
|
4935
|
-
|
|
4936
|
-
if (node.type !== "Super") return false;
|
|
4937
|
-
return opts == null || shallowEqual(node, opts);
|
|
4798
|
+
return isType$1("Super", node, opts);
|
|
4938
4799
|
}
|
|
4939
4800
|
function isTaggedTemplateExpression$1(node, opts) {
|
|
4940
|
-
|
|
4941
|
-
if (node.type !== "TaggedTemplateExpression") return false;
|
|
4942
|
-
return opts == null || shallowEqual(node, opts);
|
|
4801
|
+
return isType$1("TaggedTemplateExpression", node, opts);
|
|
4943
4802
|
}
|
|
4944
4803
|
function isTemplateElement(node, opts) {
|
|
4945
|
-
|
|
4946
|
-
if (node.type !== "TemplateElement") return false;
|
|
4947
|
-
return opts == null || shallowEqual(node, opts);
|
|
4804
|
+
return isType$1("TemplateElement", node, opts);
|
|
4948
4805
|
}
|
|
4949
4806
|
function isTemplateLiteral$1(node, opts) {
|
|
4950
|
-
|
|
4951
|
-
if (node.type !== "TemplateLiteral") return false;
|
|
4952
|
-
return opts == null || shallowEqual(node, opts);
|
|
4807
|
+
return isType$1("TemplateLiteral", node, opts);
|
|
4953
4808
|
}
|
|
4954
4809
|
function isYieldExpression$1(node, opts) {
|
|
4955
|
-
|
|
4956
|
-
if (node.type !== "YieldExpression") return false;
|
|
4957
|
-
return opts == null || shallowEqual(node, opts);
|
|
4810
|
+
return isType$1("YieldExpression", node, opts);
|
|
4958
4811
|
}
|
|
4959
4812
|
function isAwaitExpression(node, opts) {
|
|
4960
|
-
|
|
4961
|
-
if (node.type !== "AwaitExpression") return false;
|
|
4962
|
-
return opts == null || shallowEqual(node, opts);
|
|
4813
|
+
return isType$1("AwaitExpression", node, opts);
|
|
4963
4814
|
}
|
|
4964
4815
|
function isImportExpression(node, opts) {
|
|
4965
|
-
|
|
4966
|
-
if (node.type !== "ImportExpression") return false;
|
|
4967
|
-
return opts == null || shallowEqual(node, opts);
|
|
4816
|
+
return isType$1("ImportExpression", node, opts);
|
|
4968
4817
|
}
|
|
4969
4818
|
function isImport(node, opts) {
|
|
4970
|
-
|
|
4971
|
-
if (node.type !== "Import") return false;
|
|
4972
|
-
return opts == null || shallowEqual(node, opts);
|
|
4819
|
+
return isType$1("Import", node, opts);
|
|
4973
4820
|
}
|
|
4974
4821
|
function isBigIntLiteral(node, opts) {
|
|
4975
|
-
|
|
4976
|
-
if (node.type !== "BigIntLiteral") return false;
|
|
4977
|
-
return opts == null || shallowEqual(node, opts);
|
|
4822
|
+
return isType$1("BigIntLiteral", node, opts);
|
|
4978
4823
|
}
|
|
4979
4824
|
function isExportNamespaceSpecifier$1(node, opts) {
|
|
4980
|
-
|
|
4981
|
-
if (node.type !== "ExportNamespaceSpecifier") return false;
|
|
4982
|
-
return opts == null || shallowEqual(node, opts);
|
|
4825
|
+
return isType$1("ExportNamespaceSpecifier", node, opts);
|
|
4983
4826
|
}
|
|
4984
4827
|
function isOptionalMemberExpression$1(node, opts) {
|
|
4985
|
-
|
|
4986
|
-
if (node.type !== "OptionalMemberExpression") return false;
|
|
4987
|
-
return opts == null || shallowEqual(node, opts);
|
|
4828
|
+
return isType$1("OptionalMemberExpression", node, opts);
|
|
4988
4829
|
}
|
|
4989
4830
|
function isOptionalCallExpression(node, opts) {
|
|
4990
|
-
|
|
4991
|
-
if (node.type !== "OptionalCallExpression") return false;
|
|
4992
|
-
return opts == null || shallowEqual(node, opts);
|
|
4831
|
+
return isType$1("OptionalCallExpression", node, opts);
|
|
4993
4832
|
}
|
|
4994
4833
|
function isClassProperty(node, opts) {
|
|
4995
|
-
|
|
4996
|
-
if (node.type !== "ClassProperty") return false;
|
|
4997
|
-
return opts == null || shallowEqual(node, opts);
|
|
4834
|
+
return isType$1("ClassProperty", node, opts);
|
|
4998
4835
|
}
|
|
4999
4836
|
function isClassPrivateProperty(node, opts) {
|
|
5000
|
-
|
|
5001
|
-
if (node.type !== "ClassPrivateProperty") return false;
|
|
5002
|
-
return opts == null || shallowEqual(node, opts);
|
|
4837
|
+
return isType$1("ClassPrivateProperty", node, opts);
|
|
5003
4838
|
}
|
|
5004
4839
|
function isClassPrivateMethod(node, opts) {
|
|
5005
|
-
|
|
5006
|
-
if (node.type !== "ClassPrivateMethod") return false;
|
|
5007
|
-
return opts == null || shallowEqual(node, opts);
|
|
4840
|
+
return isType$1("ClassPrivateMethod", node, opts);
|
|
5008
4841
|
}
|
|
5009
4842
|
function isPrivateName$1(node, opts) {
|
|
5010
|
-
|
|
5011
|
-
if (node.type !== "PrivateName") return false;
|
|
5012
|
-
return opts == null || shallowEqual(node, opts);
|
|
4843
|
+
return isType$1("PrivateName", node, opts);
|
|
5013
4844
|
}
|
|
5014
4845
|
function isStaticBlock(node, opts) {
|
|
5015
|
-
|
|
5016
|
-
if (node.type !== "StaticBlock") return false;
|
|
5017
|
-
return opts == null || shallowEqual(node, opts);
|
|
4846
|
+
return isType$1("StaticBlock", node, opts);
|
|
5018
4847
|
}
|
|
5019
4848
|
function isImportAttribute(node, opts) {
|
|
5020
|
-
|
|
5021
|
-
if (node.type !== "ImportAttribute") return false;
|
|
5022
|
-
return opts == null || shallowEqual(node, opts);
|
|
4849
|
+
return isType$1("ImportAttribute", node, opts);
|
|
5023
4850
|
}
|
|
5024
4851
|
function isAnyTypeAnnotation$1(node, opts) {
|
|
5025
|
-
|
|
5026
|
-
if (node.type !== "AnyTypeAnnotation") return false;
|
|
5027
|
-
return opts == null || shallowEqual(node, opts);
|
|
4852
|
+
return isType$1("AnyTypeAnnotation", node, opts);
|
|
5028
4853
|
}
|
|
5029
4854
|
function isArrayTypeAnnotation$1(node, opts) {
|
|
5030
|
-
|
|
5031
|
-
if (node.type !== "ArrayTypeAnnotation") return false;
|
|
5032
|
-
return opts == null || shallowEqual(node, opts);
|
|
4855
|
+
return isType$1("ArrayTypeAnnotation", node, opts);
|
|
5033
4856
|
}
|
|
5034
4857
|
function isBooleanTypeAnnotation$1(node, opts) {
|
|
5035
|
-
|
|
5036
|
-
if (node.type !== "BooleanTypeAnnotation") return false;
|
|
5037
|
-
return opts == null || shallowEqual(node, opts);
|
|
4858
|
+
return isType$1("BooleanTypeAnnotation", node, opts);
|
|
5038
4859
|
}
|
|
5039
4860
|
function isBooleanLiteralTypeAnnotation(node, opts) {
|
|
5040
|
-
|
|
5041
|
-
if (node.type !== "BooleanLiteralTypeAnnotation") return false;
|
|
5042
|
-
return opts == null || shallowEqual(node, opts);
|
|
4861
|
+
return isType$1("BooleanLiteralTypeAnnotation", node, opts);
|
|
5043
4862
|
}
|
|
5044
4863
|
function isNullLiteralTypeAnnotation(node, opts) {
|
|
5045
|
-
|
|
5046
|
-
if (node.type !== "NullLiteralTypeAnnotation") return false;
|
|
5047
|
-
return opts == null || shallowEqual(node, opts);
|
|
4864
|
+
return isType$1("NullLiteralTypeAnnotation", node, opts);
|
|
5048
4865
|
}
|
|
5049
4866
|
function isClassImplements(node, opts) {
|
|
5050
|
-
|
|
5051
|
-
if (node.type !== "ClassImplements") return false;
|
|
5052
|
-
return opts == null || shallowEqual(node, opts);
|
|
4867
|
+
return isType$1("ClassImplements", node, opts);
|
|
5053
4868
|
}
|
|
5054
4869
|
function isDeclareClass(node, opts) {
|
|
5055
|
-
|
|
5056
|
-
if (node.type !== "DeclareClass") return false;
|
|
5057
|
-
return opts == null || shallowEqual(node, opts);
|
|
4870
|
+
return isType$1("DeclareClass", node, opts);
|
|
5058
4871
|
}
|
|
5059
4872
|
function isDeclareFunction(node, opts) {
|
|
5060
|
-
|
|
5061
|
-
if (node.type !== "DeclareFunction") return false;
|
|
5062
|
-
return opts == null || shallowEqual(node, opts);
|
|
4873
|
+
return isType$1("DeclareFunction", node, opts);
|
|
5063
4874
|
}
|
|
5064
4875
|
function isDeclareInterface(node, opts) {
|
|
5065
|
-
|
|
5066
|
-
if (node.type !== "DeclareInterface") return false;
|
|
5067
|
-
return opts == null || shallowEqual(node, opts);
|
|
4876
|
+
return isType$1("DeclareInterface", node, opts);
|
|
5068
4877
|
}
|
|
5069
4878
|
function isDeclareModule(node, opts) {
|
|
5070
|
-
|
|
5071
|
-
if (node.type !== "DeclareModule") return false;
|
|
5072
|
-
return opts == null || shallowEqual(node, opts);
|
|
4879
|
+
return isType$1("DeclareModule", node, opts);
|
|
5073
4880
|
}
|
|
5074
4881
|
function isDeclareModuleExports(node, opts) {
|
|
5075
|
-
|
|
5076
|
-
if (node.type !== "DeclareModuleExports") return false;
|
|
5077
|
-
return opts == null || shallowEqual(node, opts);
|
|
4882
|
+
return isType$1("DeclareModuleExports", node, opts);
|
|
5078
4883
|
}
|
|
5079
4884
|
function isDeclareTypeAlias(node, opts) {
|
|
5080
|
-
|
|
5081
|
-
if (node.type !== "DeclareTypeAlias") return false;
|
|
5082
|
-
return opts == null || shallowEqual(node, opts);
|
|
4885
|
+
return isType$1("DeclareTypeAlias", node, opts);
|
|
5083
4886
|
}
|
|
5084
4887
|
function isDeclareOpaqueType(node, opts) {
|
|
5085
|
-
|
|
5086
|
-
if (node.type !== "DeclareOpaqueType") return false;
|
|
5087
|
-
return opts == null || shallowEqual(node, opts);
|
|
4888
|
+
return isType$1("DeclareOpaqueType", node, opts);
|
|
5088
4889
|
}
|
|
5089
4890
|
function isDeclareVariable(node, opts) {
|
|
5090
|
-
|
|
5091
|
-
if (node.type !== "DeclareVariable") return false;
|
|
5092
|
-
return opts == null || shallowEqual(node, opts);
|
|
4891
|
+
return isType$1("DeclareVariable", node, opts);
|
|
5093
4892
|
}
|
|
5094
4893
|
function isDeclareExportDeclaration$1(node, opts) {
|
|
5095
|
-
|
|
5096
|
-
if (node.type !== "DeclareExportDeclaration") return false;
|
|
5097
|
-
return opts == null || shallowEqual(node, opts);
|
|
4894
|
+
return isType$1("DeclareExportDeclaration", node, opts);
|
|
5098
4895
|
}
|
|
5099
4896
|
function isDeclareExportAllDeclaration(node, opts) {
|
|
5100
|
-
|
|
5101
|
-
if (node.type !== "DeclareExportAllDeclaration") return false;
|
|
5102
|
-
return opts == null || shallowEqual(node, opts);
|
|
4897
|
+
return isType$1("DeclareExportAllDeclaration", node, opts);
|
|
5103
4898
|
}
|
|
5104
4899
|
function isDeclaredPredicate(node, opts) {
|
|
5105
|
-
|
|
5106
|
-
if (node.type !== "DeclaredPredicate") return false;
|
|
5107
|
-
return opts == null || shallowEqual(node, opts);
|
|
4900
|
+
return isType$1("DeclaredPredicate", node, opts);
|
|
5108
4901
|
}
|
|
5109
4902
|
function isExistsTypeAnnotation(node, opts) {
|
|
5110
|
-
|
|
5111
|
-
if (node.type !== "ExistsTypeAnnotation") return false;
|
|
5112
|
-
return opts == null || shallowEqual(node, opts);
|
|
4903
|
+
return isType$1("ExistsTypeAnnotation", node, opts);
|
|
5113
4904
|
}
|
|
5114
4905
|
function isFunctionTypeAnnotation(node, opts) {
|
|
5115
|
-
|
|
5116
|
-
if (node.type !== "FunctionTypeAnnotation") return false;
|
|
5117
|
-
return opts == null || shallowEqual(node, opts);
|
|
4906
|
+
return isType$1("FunctionTypeAnnotation", node, opts);
|
|
5118
4907
|
}
|
|
5119
4908
|
function isFunctionTypeParam(node, opts) {
|
|
5120
|
-
|
|
5121
|
-
if (node.type !== "FunctionTypeParam") return false;
|
|
5122
|
-
return opts == null || shallowEqual(node, opts);
|
|
4909
|
+
return isType$1("FunctionTypeParam", node, opts);
|
|
5123
4910
|
}
|
|
5124
4911
|
function isGenericTypeAnnotation$1(node, opts) {
|
|
5125
|
-
|
|
5126
|
-
if (node.type !== "GenericTypeAnnotation") return false;
|
|
5127
|
-
return opts == null || shallowEqual(node, opts);
|
|
4912
|
+
return isType$1("GenericTypeAnnotation", node, opts);
|
|
5128
4913
|
}
|
|
5129
4914
|
function isInferredPredicate(node, opts) {
|
|
5130
|
-
|
|
5131
|
-
if (node.type !== "InferredPredicate") return false;
|
|
5132
|
-
return opts == null || shallowEqual(node, opts);
|
|
4915
|
+
return isType$1("InferredPredicate", node, opts);
|
|
5133
4916
|
}
|
|
5134
4917
|
function isInterfaceExtends(node, opts) {
|
|
5135
|
-
|
|
5136
|
-
if (node.type !== "InterfaceExtends") return false;
|
|
5137
|
-
return opts == null || shallowEqual(node, opts);
|
|
4918
|
+
return isType$1("InterfaceExtends", node, opts);
|
|
5138
4919
|
}
|
|
5139
4920
|
function isInterfaceDeclaration(node, opts) {
|
|
5140
|
-
|
|
5141
|
-
if (node.type !== "InterfaceDeclaration") return false;
|
|
5142
|
-
return opts == null || shallowEqual(node, opts);
|
|
4921
|
+
return isType$1("InterfaceDeclaration", node, opts);
|
|
5143
4922
|
}
|
|
5144
4923
|
function isInterfaceTypeAnnotation(node, opts) {
|
|
5145
|
-
|
|
5146
|
-
if (node.type !== "InterfaceTypeAnnotation") return false;
|
|
5147
|
-
return opts == null || shallowEqual(node, opts);
|
|
4924
|
+
return isType$1("InterfaceTypeAnnotation", node, opts);
|
|
5148
4925
|
}
|
|
5149
4926
|
function isIntersectionTypeAnnotation(node, opts) {
|
|
5150
|
-
|
|
5151
|
-
if (node.type !== "IntersectionTypeAnnotation") return false;
|
|
5152
|
-
return opts == null || shallowEqual(node, opts);
|
|
4927
|
+
return isType$1("IntersectionTypeAnnotation", node, opts);
|
|
5153
4928
|
}
|
|
5154
4929
|
function isMixedTypeAnnotation$1(node, opts) {
|
|
5155
|
-
|
|
5156
|
-
if (node.type !== "MixedTypeAnnotation") return false;
|
|
5157
|
-
return opts == null || shallowEqual(node, opts);
|
|
4930
|
+
return isType$1("MixedTypeAnnotation", node, opts);
|
|
5158
4931
|
}
|
|
5159
4932
|
function isEmptyTypeAnnotation$1(node, opts) {
|
|
5160
|
-
|
|
5161
|
-
if (node.type !== "EmptyTypeAnnotation") return false;
|
|
5162
|
-
return opts == null || shallowEqual(node, opts);
|
|
4933
|
+
return isType$1("EmptyTypeAnnotation", node, opts);
|
|
5163
4934
|
}
|
|
5164
4935
|
function isNullableTypeAnnotation(node, opts) {
|
|
5165
|
-
|
|
5166
|
-
if (node.type !== "NullableTypeAnnotation") return false;
|
|
5167
|
-
return opts == null || shallowEqual(node, opts);
|
|
4936
|
+
return isType$1("NullableTypeAnnotation", node, opts);
|
|
5168
4937
|
}
|
|
5169
4938
|
function isNumberLiteralTypeAnnotation(node, opts) {
|
|
5170
|
-
|
|
5171
|
-
if (node.type !== "NumberLiteralTypeAnnotation") return false;
|
|
5172
|
-
return opts == null || shallowEqual(node, opts);
|
|
4939
|
+
return isType$1("NumberLiteralTypeAnnotation", node, opts);
|
|
5173
4940
|
}
|
|
5174
4941
|
function isBigIntLiteralTypeAnnotation(node, opts) {
|
|
5175
|
-
|
|
5176
|
-
if (node.type !== "BigIntLiteralTypeAnnotation") return false;
|
|
5177
|
-
return opts == null || shallowEqual(node, opts);
|
|
4942
|
+
return isType$1("BigIntLiteralTypeAnnotation", node, opts);
|
|
5178
4943
|
}
|
|
5179
4944
|
function isNumberTypeAnnotation$1(node, opts) {
|
|
5180
|
-
|
|
5181
|
-
if (node.type !== "NumberTypeAnnotation") return false;
|
|
5182
|
-
return opts == null || shallowEqual(node, opts);
|
|
4945
|
+
return isType$1("NumberTypeAnnotation", node, opts);
|
|
5183
4946
|
}
|
|
5184
4947
|
function isObjectTypeAnnotation(node, opts) {
|
|
5185
|
-
|
|
5186
|
-
if (node.type !== "ObjectTypeAnnotation") return false;
|
|
5187
|
-
return opts == null || shallowEqual(node, opts);
|
|
4948
|
+
return isType$1("ObjectTypeAnnotation", node, opts);
|
|
5188
4949
|
}
|
|
5189
4950
|
function isObjectTypeInternalSlot(node, opts) {
|
|
5190
|
-
|
|
5191
|
-
if (node.type !== "ObjectTypeInternalSlot") return false;
|
|
5192
|
-
return opts == null || shallowEqual(node, opts);
|
|
4951
|
+
return isType$1("ObjectTypeInternalSlot", node, opts);
|
|
5193
4952
|
}
|
|
5194
4953
|
function isObjectTypeCallProperty(node, opts) {
|
|
5195
|
-
|
|
5196
|
-
if (node.type !== "ObjectTypeCallProperty") return false;
|
|
5197
|
-
return opts == null || shallowEqual(node, opts);
|
|
4954
|
+
return isType$1("ObjectTypeCallProperty", node, opts);
|
|
5198
4955
|
}
|
|
5199
4956
|
function isObjectTypeIndexer(node, opts) {
|
|
5200
|
-
|
|
5201
|
-
if (node.type !== "ObjectTypeIndexer") return false;
|
|
5202
|
-
return opts == null || shallowEqual(node, opts);
|
|
4957
|
+
return isType$1("ObjectTypeIndexer", node, opts);
|
|
5203
4958
|
}
|
|
5204
4959
|
function isObjectTypeProperty(node, opts) {
|
|
5205
|
-
|
|
5206
|
-
if (node.type !== "ObjectTypeProperty") return false;
|
|
5207
|
-
return opts == null || shallowEqual(node, opts);
|
|
4960
|
+
return isType$1("ObjectTypeProperty", node, opts);
|
|
5208
4961
|
}
|
|
5209
4962
|
function isObjectTypeSpreadProperty(node, opts) {
|
|
5210
|
-
|
|
5211
|
-
if (node.type !== "ObjectTypeSpreadProperty") return false;
|
|
5212
|
-
return opts == null || shallowEqual(node, opts);
|
|
4963
|
+
return isType$1("ObjectTypeSpreadProperty", node, opts);
|
|
5213
4964
|
}
|
|
5214
4965
|
function isOpaqueType(node, opts) {
|
|
5215
|
-
|
|
5216
|
-
if (node.type !== "OpaqueType") return false;
|
|
5217
|
-
return opts == null || shallowEqual(node, opts);
|
|
4966
|
+
return isType$1("OpaqueType", node, opts);
|
|
5218
4967
|
}
|
|
5219
4968
|
function isQualifiedTypeIdentifier(node, opts) {
|
|
5220
|
-
|
|
5221
|
-
if (node.type !== "QualifiedTypeIdentifier") return false;
|
|
5222
|
-
return opts == null || shallowEqual(node, opts);
|
|
4969
|
+
return isType$1("QualifiedTypeIdentifier", node, opts);
|
|
5223
4970
|
}
|
|
5224
4971
|
function isStringLiteralTypeAnnotation(node, opts) {
|
|
5225
|
-
|
|
5226
|
-
if (node.type !== "StringLiteralTypeAnnotation") return false;
|
|
5227
|
-
return opts == null || shallowEqual(node, opts);
|
|
4972
|
+
return isType$1("StringLiteralTypeAnnotation", node, opts);
|
|
5228
4973
|
}
|
|
5229
4974
|
function isStringTypeAnnotation$1(node, opts) {
|
|
5230
|
-
|
|
5231
|
-
if (node.type !== "StringTypeAnnotation") return false;
|
|
5232
|
-
return opts == null || shallowEqual(node, opts);
|
|
4975
|
+
return isType$1("StringTypeAnnotation", node, opts);
|
|
5233
4976
|
}
|
|
5234
4977
|
function isSymbolTypeAnnotation(node, opts) {
|
|
5235
|
-
|
|
5236
|
-
if (node.type !== "SymbolTypeAnnotation") return false;
|
|
5237
|
-
return opts == null || shallowEqual(node, opts);
|
|
4978
|
+
return isType$1("SymbolTypeAnnotation", node, opts);
|
|
5238
4979
|
}
|
|
5239
4980
|
function isThisTypeAnnotation(node, opts) {
|
|
5240
|
-
|
|
5241
|
-
if (node.type !== "ThisTypeAnnotation") return false;
|
|
5242
|
-
return opts == null || shallowEqual(node, opts);
|
|
4981
|
+
return isType$1("ThisTypeAnnotation", node, opts);
|
|
5243
4982
|
}
|
|
5244
4983
|
function isTupleTypeAnnotation$1(node, opts) {
|
|
5245
|
-
|
|
5246
|
-
if (node.type !== "TupleTypeAnnotation") return false;
|
|
5247
|
-
return opts == null || shallowEqual(node, opts);
|
|
4984
|
+
return isType$1("TupleTypeAnnotation", node, opts);
|
|
5248
4985
|
}
|
|
5249
4986
|
function isTypeofTypeAnnotation(node, opts) {
|
|
5250
|
-
|
|
5251
|
-
if (node.type !== "TypeofTypeAnnotation") return false;
|
|
5252
|
-
return opts == null || shallowEqual(node, opts);
|
|
4987
|
+
return isType$1("TypeofTypeAnnotation", node, opts);
|
|
5253
4988
|
}
|
|
5254
4989
|
function isTypeAlias(node, opts) {
|
|
5255
|
-
|
|
5256
|
-
if (node.type !== "TypeAlias") return false;
|
|
5257
|
-
return opts == null || shallowEqual(node, opts);
|
|
4990
|
+
return isType$1("TypeAlias", node, opts);
|
|
5258
4991
|
}
|
|
5259
4992
|
function isTypeAnnotation$1(node, opts) {
|
|
5260
|
-
|
|
5261
|
-
if (node.type !== "TypeAnnotation") return false;
|
|
5262
|
-
return opts == null || shallowEqual(node, opts);
|
|
4993
|
+
return isType$1("TypeAnnotation", node, opts);
|
|
5263
4994
|
}
|
|
5264
4995
|
function isTypeCastExpression(node, opts) {
|
|
5265
|
-
|
|
5266
|
-
if (node.type !== "TypeCastExpression") return false;
|
|
5267
|
-
return opts == null || shallowEqual(node, opts);
|
|
4996
|
+
return isType$1("TypeCastExpression", node, opts);
|
|
5268
4997
|
}
|
|
5269
4998
|
function isTypeParameter(node, opts) {
|
|
5270
|
-
|
|
5271
|
-
if (node.type !== "TypeParameter") return false;
|
|
5272
|
-
return opts == null || shallowEqual(node, opts);
|
|
4999
|
+
return isType$1("TypeParameter", node, opts);
|
|
5273
5000
|
}
|
|
5274
5001
|
function isTypeParameterDeclaration(node, opts) {
|
|
5275
|
-
|
|
5276
|
-
if (node.type !== "TypeParameterDeclaration") return false;
|
|
5277
|
-
return opts == null || shallowEqual(node, opts);
|
|
5002
|
+
return isType$1("TypeParameterDeclaration", node, opts);
|
|
5278
5003
|
}
|
|
5279
5004
|
function isTypeParameterInstantiation(node, opts) {
|
|
5280
|
-
|
|
5281
|
-
if (node.type !== "TypeParameterInstantiation") return false;
|
|
5282
|
-
return opts == null || shallowEqual(node, opts);
|
|
5005
|
+
return isType$1("TypeParameterInstantiation", node, opts);
|
|
5283
5006
|
}
|
|
5284
5007
|
function isUnionTypeAnnotation$1(node, opts) {
|
|
5285
|
-
|
|
5286
|
-
if (node.type !== "UnionTypeAnnotation") return false;
|
|
5287
|
-
return opts == null || shallowEqual(node, opts);
|
|
5008
|
+
return isType$1("UnionTypeAnnotation", node, opts);
|
|
5288
5009
|
}
|
|
5289
5010
|
function isVariance(node, opts) {
|
|
5290
|
-
|
|
5291
|
-
if (node.type !== "Variance") return false;
|
|
5292
|
-
return opts == null || shallowEqual(node, opts);
|
|
5011
|
+
return isType$1("Variance", node, opts);
|
|
5293
5012
|
}
|
|
5294
5013
|
function isVoidTypeAnnotation$1(node, opts) {
|
|
5295
|
-
|
|
5296
|
-
if (node.type !== "VoidTypeAnnotation") return false;
|
|
5297
|
-
return opts == null || shallowEqual(node, opts);
|
|
5014
|
+
return isType$1("VoidTypeAnnotation", node, opts);
|
|
5298
5015
|
}
|
|
5299
5016
|
function isEnumDeclaration(node, opts) {
|
|
5300
|
-
|
|
5301
|
-
if (node.type !== "EnumDeclaration") return false;
|
|
5302
|
-
return opts == null || shallowEqual(node, opts);
|
|
5017
|
+
return isType$1("EnumDeclaration", node, opts);
|
|
5303
5018
|
}
|
|
5304
5019
|
function isEnumBooleanBody(node, opts) {
|
|
5305
|
-
|
|
5306
|
-
if (node.type !== "EnumBooleanBody") return false;
|
|
5307
|
-
return opts == null || shallowEqual(node, opts);
|
|
5020
|
+
return isType$1("EnumBooleanBody", node, opts);
|
|
5308
5021
|
}
|
|
5309
5022
|
function isEnumNumberBody(node, opts) {
|
|
5310
|
-
|
|
5311
|
-
if (node.type !== "EnumNumberBody") return false;
|
|
5312
|
-
return opts == null || shallowEqual(node, opts);
|
|
5023
|
+
return isType$1("EnumNumberBody", node, opts);
|
|
5313
5024
|
}
|
|
5314
5025
|
function isEnumStringBody(node, opts) {
|
|
5315
|
-
|
|
5316
|
-
if (node.type !== "EnumStringBody") return false;
|
|
5317
|
-
return opts == null || shallowEqual(node, opts);
|
|
5026
|
+
return isType$1("EnumStringBody", node, opts);
|
|
5318
5027
|
}
|
|
5319
5028
|
function isEnumSymbolBody(node, opts) {
|
|
5320
|
-
|
|
5321
|
-
if (node.type !== "EnumSymbolBody") return false;
|
|
5322
|
-
return opts == null || shallowEqual(node, opts);
|
|
5029
|
+
return isType$1("EnumSymbolBody", node, opts);
|
|
5323
5030
|
}
|
|
5324
5031
|
function isEnumBooleanMember(node, opts) {
|
|
5325
|
-
|
|
5326
|
-
if (node.type !== "EnumBooleanMember") return false;
|
|
5327
|
-
return opts == null || shallowEqual(node, opts);
|
|
5032
|
+
return isType$1("EnumBooleanMember", node, opts);
|
|
5328
5033
|
}
|
|
5329
5034
|
function isEnumNumberMember(node, opts) {
|
|
5330
|
-
|
|
5331
|
-
if (node.type !== "EnumNumberMember") return false;
|
|
5332
|
-
return opts == null || shallowEqual(node, opts);
|
|
5035
|
+
return isType$1("EnumNumberMember", node, opts);
|
|
5333
5036
|
}
|
|
5334
5037
|
function isEnumStringMember(node, opts) {
|
|
5335
|
-
|
|
5336
|
-
if (node.type !== "EnumStringMember") return false;
|
|
5337
|
-
return opts == null || shallowEqual(node, opts);
|
|
5038
|
+
return isType$1("EnumStringMember", node, opts);
|
|
5338
5039
|
}
|
|
5339
5040
|
function isEnumDefaultedMember(node, opts) {
|
|
5340
|
-
|
|
5341
|
-
if (node.type !== "EnumDefaultedMember") return false;
|
|
5342
|
-
return opts == null || shallowEqual(node, opts);
|
|
5041
|
+
return isType$1("EnumDefaultedMember", node, opts);
|
|
5343
5042
|
}
|
|
5344
5043
|
function isIndexedAccessType(node, opts) {
|
|
5345
|
-
|
|
5346
|
-
if (node.type !== "IndexedAccessType") return false;
|
|
5347
|
-
return opts == null || shallowEqual(node, opts);
|
|
5044
|
+
return isType$1("IndexedAccessType", node, opts);
|
|
5348
5045
|
}
|
|
5349
5046
|
function isOptionalIndexedAccessType(node, opts) {
|
|
5350
|
-
|
|
5351
|
-
if (node.type !== "OptionalIndexedAccessType") return false;
|
|
5352
|
-
return opts == null || shallowEqual(node, opts);
|
|
5047
|
+
return isType$1("OptionalIndexedAccessType", node, opts);
|
|
5353
5048
|
}
|
|
5354
5049
|
function isJSXAttribute(node, opts) {
|
|
5355
|
-
|
|
5356
|
-
if (node.type !== "JSXAttribute") return false;
|
|
5357
|
-
return opts == null || shallowEqual(node, opts);
|
|
5050
|
+
return isType$1("JSXAttribute", node, opts);
|
|
5358
5051
|
}
|
|
5359
5052
|
function isJSXClosingElement(node, opts) {
|
|
5360
|
-
|
|
5361
|
-
if (node.type !== "JSXClosingElement") return false;
|
|
5362
|
-
return opts == null || shallowEqual(node, opts);
|
|
5053
|
+
return isType$1("JSXClosingElement", node, opts);
|
|
5363
5054
|
}
|
|
5364
5055
|
function isJSXElement(node, opts) {
|
|
5365
|
-
|
|
5366
|
-
if (node.type !== "JSXElement") return false;
|
|
5367
|
-
return opts == null || shallowEqual(node, opts);
|
|
5056
|
+
return isType$1("JSXElement", node, opts);
|
|
5368
5057
|
}
|
|
5369
5058
|
function isJSXEmptyExpression(node, opts) {
|
|
5370
|
-
|
|
5371
|
-
if (node.type !== "JSXEmptyExpression") return false;
|
|
5372
|
-
return opts == null || shallowEqual(node, opts);
|
|
5059
|
+
return isType$1("JSXEmptyExpression", node, opts);
|
|
5373
5060
|
}
|
|
5374
5061
|
function isJSXExpressionContainer(node, opts) {
|
|
5375
|
-
|
|
5376
|
-
if (node.type !== "JSXExpressionContainer") return false;
|
|
5377
|
-
return opts == null || shallowEqual(node, opts);
|
|
5062
|
+
return isType$1("JSXExpressionContainer", node, opts);
|
|
5378
5063
|
}
|
|
5379
5064
|
function isJSXSpreadChild(node, opts) {
|
|
5380
|
-
|
|
5381
|
-
if (node.type !== "JSXSpreadChild") return false;
|
|
5382
|
-
return opts == null || shallowEqual(node, opts);
|
|
5065
|
+
return isType$1("JSXSpreadChild", node, opts);
|
|
5383
5066
|
}
|
|
5384
5067
|
function isJSXIdentifier$2(node, opts) {
|
|
5385
|
-
|
|
5386
|
-
if (node.type !== "JSXIdentifier") return false;
|
|
5387
|
-
return opts == null || shallowEqual(node, opts);
|
|
5068
|
+
return isType$1("JSXIdentifier", node, opts);
|
|
5388
5069
|
}
|
|
5389
5070
|
function isJSXMemberExpression$1(node, opts) {
|
|
5390
|
-
|
|
5391
|
-
if (node.type !== "JSXMemberExpression") return false;
|
|
5392
|
-
return opts == null || shallowEqual(node, opts);
|
|
5071
|
+
return isType$1("JSXMemberExpression", node, opts);
|
|
5393
5072
|
}
|
|
5394
5073
|
function isJSXNamespacedName(node, opts) {
|
|
5395
|
-
|
|
5396
|
-
if (node.type !== "JSXNamespacedName") return false;
|
|
5397
|
-
return opts == null || shallowEqual(node, opts);
|
|
5074
|
+
return isType$1("JSXNamespacedName", node, opts);
|
|
5398
5075
|
}
|
|
5399
5076
|
function isJSXOpeningElement(node, opts) {
|
|
5400
|
-
|
|
5401
|
-
if (node.type !== "JSXOpeningElement") return false;
|
|
5402
|
-
return opts == null || shallowEqual(node, opts);
|
|
5077
|
+
return isType$1("JSXOpeningElement", node, opts);
|
|
5403
5078
|
}
|
|
5404
5079
|
function isJSXSpreadAttribute(node, opts) {
|
|
5405
|
-
|
|
5406
|
-
if (node.type !== "JSXSpreadAttribute") return false;
|
|
5407
|
-
return opts == null || shallowEqual(node, opts);
|
|
5080
|
+
return isType$1("JSXSpreadAttribute", node, opts);
|
|
5408
5081
|
}
|
|
5409
5082
|
function isJSXText(node, opts) {
|
|
5410
|
-
|
|
5411
|
-
if (node.type !== "JSXText") return false;
|
|
5412
|
-
return opts == null || shallowEqual(node, opts);
|
|
5083
|
+
return isType$1("JSXText", node, opts);
|
|
5413
5084
|
}
|
|
5414
5085
|
function isJSXFragment(node, opts) {
|
|
5415
|
-
|
|
5416
|
-
if (node.type !== "JSXFragment") return false;
|
|
5417
|
-
return opts == null || shallowEqual(node, opts);
|
|
5086
|
+
return isType$1("JSXFragment", node, opts);
|
|
5418
5087
|
}
|
|
5419
5088
|
function isJSXOpeningFragment(node, opts) {
|
|
5420
|
-
|
|
5421
|
-
if (node.type !== "JSXOpeningFragment") return false;
|
|
5422
|
-
return opts == null || shallowEqual(node, opts);
|
|
5089
|
+
return isType$1("JSXOpeningFragment", node, opts);
|
|
5423
5090
|
}
|
|
5424
5091
|
function isJSXClosingFragment(node, opts) {
|
|
5425
|
-
|
|
5426
|
-
if (node.type !== "JSXClosingFragment") return false;
|
|
5427
|
-
return opts == null || shallowEqual(node, opts);
|
|
5092
|
+
return isType$1("JSXClosingFragment", node, opts);
|
|
5428
5093
|
}
|
|
5429
5094
|
function isPlaceholder$1(node, opts) {
|
|
5430
|
-
|
|
5431
|
-
if (node.type !== "Placeholder") return false;
|
|
5432
|
-
return opts == null || shallowEqual(node, opts);
|
|
5095
|
+
return isType$1("Placeholder", node, opts);
|
|
5433
5096
|
}
|
|
5434
5097
|
function isV8IntrinsicIdentifier(node, opts) {
|
|
5435
|
-
|
|
5436
|
-
if (node.type !== "V8IntrinsicIdentifier") return false;
|
|
5437
|
-
return opts == null || shallowEqual(node, opts);
|
|
5098
|
+
return isType$1("V8IntrinsicIdentifier", node, opts);
|
|
5438
5099
|
}
|
|
5439
5100
|
function isArgumentPlaceholder(node, opts) {
|
|
5440
|
-
|
|
5441
|
-
if (node.type !== "ArgumentPlaceholder") return false;
|
|
5442
|
-
return opts == null || shallowEqual(node, opts);
|
|
5101
|
+
return isType$1("ArgumentPlaceholder", node, opts);
|
|
5443
5102
|
}
|
|
5444
5103
|
function isBindExpression(node, opts) {
|
|
5445
|
-
|
|
5446
|
-
if (node.type !== "BindExpression") return false;
|
|
5447
|
-
return opts == null || shallowEqual(node, opts);
|
|
5104
|
+
return isType$1("BindExpression", node, opts);
|
|
5448
5105
|
}
|
|
5449
5106
|
function isClassAccessorProperty(node, opts) {
|
|
5450
|
-
|
|
5451
|
-
if (node.type !== "ClassAccessorProperty") return false;
|
|
5452
|
-
return opts == null || shallowEqual(node, opts);
|
|
5107
|
+
return isType$1("ClassAccessorProperty", node, opts);
|
|
5453
5108
|
}
|
|
5454
5109
|
function isDecorator(node, opts) {
|
|
5455
|
-
|
|
5456
|
-
if (node.type !== "Decorator") return false;
|
|
5457
|
-
return opts == null || shallowEqual(node, opts);
|
|
5110
|
+
return isType$1("Decorator", node, opts);
|
|
5458
5111
|
}
|
|
5459
5112
|
function isDoExpression(node, opts) {
|
|
5460
|
-
|
|
5461
|
-
if (node.type !== "DoExpression") return false;
|
|
5462
|
-
return opts == null || shallowEqual(node, opts);
|
|
5113
|
+
return isType$1("DoExpression", node, opts);
|
|
5463
5114
|
}
|
|
5464
5115
|
function isExportDefaultSpecifier$1(node, opts) {
|
|
5465
|
-
|
|
5466
|
-
if (node.type !== "ExportDefaultSpecifier") return false;
|
|
5467
|
-
return opts == null || shallowEqual(node, opts);
|
|
5116
|
+
return isType$1("ExportDefaultSpecifier", node, opts);
|
|
5468
5117
|
}
|
|
5469
5118
|
function isModuleExpression(node, opts) {
|
|
5470
|
-
|
|
5471
|
-
if (node.type !== "ModuleExpression") return false;
|
|
5472
|
-
return opts == null || shallowEqual(node, opts);
|
|
5119
|
+
return isType$1("ModuleExpression", node, opts);
|
|
5473
5120
|
}
|
|
5474
5121
|
function isTopicReference$1(node, opts) {
|
|
5475
|
-
|
|
5476
|
-
if (node.type !== "TopicReference") return false;
|
|
5477
|
-
return opts == null || shallowEqual(node, opts);
|
|
5122
|
+
return isType$1("TopicReference", node, opts);
|
|
5478
5123
|
}
|
|
5479
5124
|
function isVoidPattern$1(node, opts) {
|
|
5480
|
-
|
|
5481
|
-
if (node.type !== "VoidPattern") return false;
|
|
5482
|
-
return opts == null || shallowEqual(node, opts);
|
|
5125
|
+
return isType$1("VoidPattern", node, opts);
|
|
5483
5126
|
}
|
|
5484
5127
|
function isTSParameterProperty(node, opts) {
|
|
5485
|
-
|
|
5486
|
-
if (node.type !== "TSParameterProperty") return false;
|
|
5487
|
-
return opts == null || shallowEqual(node, opts);
|
|
5128
|
+
return isType$1("TSParameterProperty", node, opts);
|
|
5488
5129
|
}
|
|
5489
5130
|
function isTSDeclareFunction(node, opts) {
|
|
5490
|
-
|
|
5491
|
-
if (node.type !== "TSDeclareFunction") return false;
|
|
5492
|
-
return opts == null || shallowEqual(node, opts);
|
|
5131
|
+
return isType$1("TSDeclareFunction", node, opts);
|
|
5493
5132
|
}
|
|
5494
5133
|
function isTSDeclareMethod(node, opts) {
|
|
5495
|
-
|
|
5496
|
-
if (node.type !== "TSDeclareMethod") return false;
|
|
5497
|
-
return opts == null || shallowEqual(node, opts);
|
|
5134
|
+
return isType$1("TSDeclareMethod", node, opts);
|
|
5498
5135
|
}
|
|
5499
5136
|
function isTSQualifiedName(node, opts) {
|
|
5500
|
-
|
|
5501
|
-
if (node.type !== "TSQualifiedName") return false;
|
|
5502
|
-
return opts == null || shallowEqual(node, opts);
|
|
5137
|
+
return isType$1("TSQualifiedName", node, opts);
|
|
5503
5138
|
}
|
|
5504
5139
|
function isTSCallSignatureDeclaration(node, opts) {
|
|
5505
|
-
|
|
5506
|
-
if (node.type !== "TSCallSignatureDeclaration") return false;
|
|
5507
|
-
return opts == null || shallowEqual(node, opts);
|
|
5140
|
+
return isType$1("TSCallSignatureDeclaration", node, opts);
|
|
5508
5141
|
}
|
|
5509
5142
|
function isTSConstructSignatureDeclaration(node, opts) {
|
|
5510
|
-
|
|
5511
|
-
if (node.type !== "TSConstructSignatureDeclaration") return false;
|
|
5512
|
-
return opts == null || shallowEqual(node, opts);
|
|
5143
|
+
return isType$1("TSConstructSignatureDeclaration", node, opts);
|
|
5513
5144
|
}
|
|
5514
5145
|
function isTSPropertySignature(node, opts) {
|
|
5515
|
-
|
|
5516
|
-
if (node.type !== "TSPropertySignature") return false;
|
|
5517
|
-
return opts == null || shallowEqual(node, opts);
|
|
5146
|
+
return isType$1("TSPropertySignature", node, opts);
|
|
5518
5147
|
}
|
|
5519
5148
|
function isTSMethodSignature(node, opts) {
|
|
5520
|
-
|
|
5521
|
-
if (node.type !== "TSMethodSignature") return false;
|
|
5522
|
-
return opts == null || shallowEqual(node, opts);
|
|
5149
|
+
return isType$1("TSMethodSignature", node, opts);
|
|
5523
5150
|
}
|
|
5524
5151
|
function isTSIndexSignature(node, opts) {
|
|
5525
|
-
|
|
5526
|
-
if (node.type !== "TSIndexSignature") return false;
|
|
5527
|
-
return opts == null || shallowEqual(node, opts);
|
|
5152
|
+
return isType$1("TSIndexSignature", node, opts);
|
|
5528
5153
|
}
|
|
5529
5154
|
function isTSAnyKeyword(node, opts) {
|
|
5530
|
-
|
|
5531
|
-
if (node.type !== "TSAnyKeyword") return false;
|
|
5532
|
-
return opts == null || shallowEqual(node, opts);
|
|
5155
|
+
return isType$1("TSAnyKeyword", node, opts);
|
|
5533
5156
|
}
|
|
5534
5157
|
function isTSBooleanKeyword(node, opts) {
|
|
5535
|
-
|
|
5536
|
-
if (node.type !== "TSBooleanKeyword") return false;
|
|
5537
|
-
return opts == null || shallowEqual(node, opts);
|
|
5158
|
+
return isType$1("TSBooleanKeyword", node, opts);
|
|
5538
5159
|
}
|
|
5539
5160
|
function isTSBigIntKeyword(node, opts) {
|
|
5540
|
-
|
|
5541
|
-
if (node.type !== "TSBigIntKeyword") return false;
|
|
5542
|
-
return opts == null || shallowEqual(node, opts);
|
|
5161
|
+
return isType$1("TSBigIntKeyword", node, opts);
|
|
5543
5162
|
}
|
|
5544
5163
|
function isTSIntrinsicKeyword(node, opts) {
|
|
5545
|
-
|
|
5546
|
-
if (node.type !== "TSIntrinsicKeyword") return false;
|
|
5547
|
-
return opts == null || shallowEqual(node, opts);
|
|
5164
|
+
return isType$1("TSIntrinsicKeyword", node, opts);
|
|
5548
5165
|
}
|
|
5549
5166
|
function isTSNeverKeyword(node, opts) {
|
|
5550
|
-
|
|
5551
|
-
if (node.type !== "TSNeverKeyword") return false;
|
|
5552
|
-
return opts == null || shallowEqual(node, opts);
|
|
5167
|
+
return isType$1("TSNeverKeyword", node, opts);
|
|
5553
5168
|
}
|
|
5554
5169
|
function isTSNullKeyword(node, opts) {
|
|
5555
|
-
|
|
5556
|
-
if (node.type !== "TSNullKeyword") return false;
|
|
5557
|
-
return opts == null || shallowEqual(node, opts);
|
|
5170
|
+
return isType$1("TSNullKeyword", node, opts);
|
|
5558
5171
|
}
|
|
5559
5172
|
function isTSNumberKeyword(node, opts) {
|
|
5560
|
-
|
|
5561
|
-
if (node.type !== "TSNumberKeyword") return false;
|
|
5562
|
-
return opts == null || shallowEqual(node, opts);
|
|
5173
|
+
return isType$1("TSNumberKeyword", node, opts);
|
|
5563
5174
|
}
|
|
5564
5175
|
function isTSObjectKeyword(node, opts) {
|
|
5565
|
-
|
|
5566
|
-
if (node.type !== "TSObjectKeyword") return false;
|
|
5567
|
-
return opts == null || shallowEqual(node, opts);
|
|
5176
|
+
return isType$1("TSObjectKeyword", node, opts);
|
|
5568
5177
|
}
|
|
5569
5178
|
function isTSStringKeyword(node, opts) {
|
|
5570
|
-
|
|
5571
|
-
if (node.type !== "TSStringKeyword") return false;
|
|
5572
|
-
return opts == null || shallowEqual(node, opts);
|
|
5179
|
+
return isType$1("TSStringKeyword", node, opts);
|
|
5573
5180
|
}
|
|
5574
5181
|
function isTSSymbolKeyword(node, opts) {
|
|
5575
|
-
|
|
5576
|
-
if (node.type !== "TSSymbolKeyword") return false;
|
|
5577
|
-
return opts == null || shallowEqual(node, opts);
|
|
5182
|
+
return isType$1("TSSymbolKeyword", node, opts);
|
|
5578
5183
|
}
|
|
5579
5184
|
function isTSUndefinedKeyword(node, opts) {
|
|
5580
|
-
|
|
5581
|
-
if (node.type !== "TSUndefinedKeyword") return false;
|
|
5582
|
-
return opts == null || shallowEqual(node, opts);
|
|
5185
|
+
return isType$1("TSUndefinedKeyword", node, opts);
|
|
5583
5186
|
}
|
|
5584
5187
|
function isTSUnknownKeyword(node, opts) {
|
|
5585
|
-
|
|
5586
|
-
if (node.type !== "TSUnknownKeyword") return false;
|
|
5587
|
-
return opts == null || shallowEqual(node, opts);
|
|
5188
|
+
return isType$1("TSUnknownKeyword", node, opts);
|
|
5588
5189
|
}
|
|
5589
5190
|
function isTSVoidKeyword(node, opts) {
|
|
5590
|
-
|
|
5591
|
-
if (node.type !== "TSVoidKeyword") return false;
|
|
5592
|
-
return opts == null || shallowEqual(node, opts);
|
|
5191
|
+
return isType$1("TSVoidKeyword", node, opts);
|
|
5593
5192
|
}
|
|
5594
5193
|
function isTSThisType(node, opts) {
|
|
5595
|
-
|
|
5596
|
-
if (node.type !== "TSThisType") return false;
|
|
5597
|
-
return opts == null || shallowEqual(node, opts);
|
|
5194
|
+
return isType$1("TSThisType", node, opts);
|
|
5598
5195
|
}
|
|
5599
5196
|
function isTSFunctionType(node, opts) {
|
|
5600
|
-
|
|
5601
|
-
if (node.type !== "TSFunctionType") return false;
|
|
5602
|
-
return opts == null || shallowEqual(node, opts);
|
|
5197
|
+
return isType$1("TSFunctionType", node, opts);
|
|
5603
5198
|
}
|
|
5604
5199
|
function isTSConstructorType(node, opts) {
|
|
5605
|
-
|
|
5606
|
-
if (node.type !== "TSConstructorType") return false;
|
|
5607
|
-
return opts == null || shallowEqual(node, opts);
|
|
5200
|
+
return isType$1("TSConstructorType", node, opts);
|
|
5608
5201
|
}
|
|
5609
5202
|
function isTSTypeReference$1(node, opts) {
|
|
5610
|
-
|
|
5611
|
-
if (node.type !== "TSTypeReference") return false;
|
|
5612
|
-
return opts == null || shallowEqual(node, opts);
|
|
5203
|
+
return isType$1("TSTypeReference", node, opts);
|
|
5613
5204
|
}
|
|
5614
5205
|
function isTSTypePredicate(node, opts) {
|
|
5615
|
-
|
|
5616
|
-
if (node.type !== "TSTypePredicate") return false;
|
|
5617
|
-
return opts == null || shallowEqual(node, opts);
|
|
5206
|
+
return isType$1("TSTypePredicate", node, opts);
|
|
5618
5207
|
}
|
|
5619
5208
|
function isTSTypeQuery(node, opts) {
|
|
5620
|
-
|
|
5621
|
-
if (node.type !== "TSTypeQuery") return false;
|
|
5622
|
-
return opts == null || shallowEqual(node, opts);
|
|
5209
|
+
return isType$1("TSTypeQuery", node, opts);
|
|
5623
5210
|
}
|
|
5624
5211
|
function isTSTypeLiteral(node, opts) {
|
|
5625
|
-
|
|
5626
|
-
if (node.type !== "TSTypeLiteral") return false;
|
|
5627
|
-
return opts == null || shallowEqual(node, opts);
|
|
5212
|
+
return isType$1("TSTypeLiteral", node, opts);
|
|
5628
5213
|
}
|
|
5629
5214
|
function isTSArrayType$1(node, opts) {
|
|
5630
|
-
|
|
5631
|
-
if (node.type !== "TSArrayType") return false;
|
|
5632
|
-
return opts == null || shallowEqual(node, opts);
|
|
5215
|
+
return isType$1("TSArrayType", node, opts);
|
|
5633
5216
|
}
|
|
5634
5217
|
function isTSTupleType(node, opts) {
|
|
5635
|
-
|
|
5636
|
-
if (node.type !== "TSTupleType") return false;
|
|
5637
|
-
return opts == null || shallowEqual(node, opts);
|
|
5218
|
+
return isType$1("TSTupleType", node, opts);
|
|
5638
5219
|
}
|
|
5639
5220
|
function isTSOptionalType(node, opts) {
|
|
5640
|
-
|
|
5641
|
-
if (node.type !== "TSOptionalType") return false;
|
|
5642
|
-
return opts == null || shallowEqual(node, opts);
|
|
5221
|
+
return isType$1("TSOptionalType", node, opts);
|
|
5643
5222
|
}
|
|
5644
5223
|
function isTSRestType(node, opts) {
|
|
5645
|
-
|
|
5646
|
-
if (node.type !== "TSRestType") return false;
|
|
5647
|
-
return opts == null || shallowEqual(node, opts);
|
|
5224
|
+
return isType$1("TSRestType", node, opts);
|
|
5648
5225
|
}
|
|
5649
5226
|
function isTSNamedTupleMember(node, opts) {
|
|
5650
|
-
|
|
5651
|
-
if (node.type !== "TSNamedTupleMember") return false;
|
|
5652
|
-
return opts == null || shallowEqual(node, opts);
|
|
5227
|
+
return isType$1("TSNamedTupleMember", node, opts);
|
|
5653
5228
|
}
|
|
5654
5229
|
function isTSUnionType(node, opts) {
|
|
5655
|
-
|
|
5656
|
-
if (node.type !== "TSUnionType") return false;
|
|
5657
|
-
return opts == null || shallowEqual(node, opts);
|
|
5230
|
+
return isType$1("TSUnionType", node, opts);
|
|
5658
5231
|
}
|
|
5659
5232
|
function isTSIntersectionType(node, opts) {
|
|
5660
|
-
|
|
5661
|
-
if (node.type !== "TSIntersectionType") return false;
|
|
5662
|
-
return opts == null || shallowEqual(node, opts);
|
|
5233
|
+
return isType$1("TSIntersectionType", node, opts);
|
|
5663
5234
|
}
|
|
5664
5235
|
function isTSConditionalType(node, opts) {
|
|
5665
|
-
|
|
5666
|
-
if (node.type !== "TSConditionalType") return false;
|
|
5667
|
-
return opts == null || shallowEqual(node, opts);
|
|
5236
|
+
return isType$1("TSConditionalType", node, opts);
|
|
5668
5237
|
}
|
|
5669
5238
|
function isTSInferType(node, opts) {
|
|
5670
|
-
|
|
5671
|
-
if (node.type !== "TSInferType") return false;
|
|
5672
|
-
return opts == null || shallowEqual(node, opts);
|
|
5239
|
+
return isType$1("TSInferType", node, opts);
|
|
5673
5240
|
}
|
|
5674
5241
|
function isTSParenthesizedType(node, opts) {
|
|
5675
|
-
|
|
5676
|
-
if (node.type !== "TSParenthesizedType") return false;
|
|
5677
|
-
return opts == null || shallowEqual(node, opts);
|
|
5242
|
+
return isType$1("TSParenthesizedType", node, opts);
|
|
5678
5243
|
}
|
|
5679
5244
|
function isTSTypeOperator(node, opts) {
|
|
5680
|
-
|
|
5681
|
-
if (node.type !== "TSTypeOperator") return false;
|
|
5682
|
-
return opts == null || shallowEqual(node, opts);
|
|
5245
|
+
return isType$1("TSTypeOperator", node, opts);
|
|
5683
5246
|
}
|
|
5684
5247
|
function isTSIndexedAccessType(node, opts) {
|
|
5685
|
-
|
|
5686
|
-
if (node.type !== "TSIndexedAccessType") return false;
|
|
5687
|
-
return opts == null || shallowEqual(node, opts);
|
|
5248
|
+
return isType$1("TSIndexedAccessType", node, opts);
|
|
5688
5249
|
}
|
|
5689
5250
|
function isTSMappedType(node, opts) {
|
|
5690
|
-
|
|
5691
|
-
if (node.type !== "TSMappedType") return false;
|
|
5692
|
-
return opts == null || shallowEqual(node, opts);
|
|
5251
|
+
return isType$1("TSMappedType", node, opts);
|
|
5693
5252
|
}
|
|
5694
5253
|
function isTSTemplateLiteralType(node, opts) {
|
|
5695
|
-
|
|
5696
|
-
if (node.type !== "TSTemplateLiteralType") return false;
|
|
5697
|
-
return opts == null || shallowEqual(node, opts);
|
|
5254
|
+
return isType$1("TSTemplateLiteralType", node, opts);
|
|
5698
5255
|
}
|
|
5699
5256
|
function isTSLiteralType(node, opts) {
|
|
5700
|
-
|
|
5701
|
-
if (node.type !== "TSLiteralType") return false;
|
|
5702
|
-
return opts == null || shallowEqual(node, opts);
|
|
5257
|
+
return isType$1("TSLiteralType", node, opts);
|
|
5703
5258
|
}
|
|
5704
5259
|
function isTSClassImplements(node, opts) {
|
|
5705
|
-
|
|
5706
|
-
if (node.type !== "TSClassImplements") return false;
|
|
5707
|
-
return opts == null || shallowEqual(node, opts);
|
|
5260
|
+
return isType$1("TSClassImplements", node, opts);
|
|
5708
5261
|
}
|
|
5709
5262
|
function isTSInterfaceHeritage(node, opts) {
|
|
5710
|
-
|
|
5711
|
-
if (node.type !== "TSInterfaceHeritage") return false;
|
|
5712
|
-
return opts == null || shallowEqual(node, opts);
|
|
5263
|
+
return isType$1("TSInterfaceHeritage", node, opts);
|
|
5713
5264
|
}
|
|
5714
5265
|
function isTSInterfaceDeclaration(node, opts) {
|
|
5715
|
-
|
|
5716
|
-
if (node.type !== "TSInterfaceDeclaration") return false;
|
|
5717
|
-
return opts == null || shallowEqual(node, opts);
|
|
5266
|
+
return isType$1("TSInterfaceDeclaration", node, opts);
|
|
5718
5267
|
}
|
|
5719
5268
|
function isTSInterfaceBody$1(node, opts) {
|
|
5720
|
-
|
|
5721
|
-
if (node.type !== "TSInterfaceBody") return false;
|
|
5722
|
-
return opts == null || shallowEqual(node, opts);
|
|
5269
|
+
return isType$1("TSInterfaceBody", node, opts);
|
|
5723
5270
|
}
|
|
5724
5271
|
function isTSTypeAliasDeclaration(node, opts) {
|
|
5725
|
-
|
|
5726
|
-
if (node.type !== "TSTypeAliasDeclaration") return false;
|
|
5727
|
-
return opts == null || shallowEqual(node, opts);
|
|
5272
|
+
return isType$1("TSTypeAliasDeclaration", node, opts);
|
|
5728
5273
|
}
|
|
5729
5274
|
function isTSInstantiationExpression(node, opts) {
|
|
5730
|
-
|
|
5731
|
-
if (node.type !== "TSInstantiationExpression") return false;
|
|
5732
|
-
return opts == null || shallowEqual(node, opts);
|
|
5275
|
+
return isType$1("TSInstantiationExpression", node, opts);
|
|
5733
5276
|
}
|
|
5734
5277
|
function isTSAsExpression(node, opts) {
|
|
5735
|
-
|
|
5736
|
-
if (node.type !== "TSAsExpression") return false;
|
|
5737
|
-
return opts == null || shallowEqual(node, opts);
|
|
5278
|
+
return isType$1("TSAsExpression", node, opts);
|
|
5738
5279
|
}
|
|
5739
5280
|
function isTSSatisfiesExpression(node, opts) {
|
|
5740
|
-
|
|
5741
|
-
if (node.type !== "TSSatisfiesExpression") return false;
|
|
5742
|
-
return opts == null || shallowEqual(node, opts);
|
|
5281
|
+
return isType$1("TSSatisfiesExpression", node, opts);
|
|
5743
5282
|
}
|
|
5744
5283
|
function isTSTypeAssertion(node, opts) {
|
|
5745
|
-
|
|
5746
|
-
if (node.type !== "TSTypeAssertion") return false;
|
|
5747
|
-
return opts == null || shallowEqual(node, opts);
|
|
5284
|
+
return isType$1("TSTypeAssertion", node, opts);
|
|
5748
5285
|
}
|
|
5749
5286
|
function isTSEnumBody(node, opts) {
|
|
5750
|
-
|
|
5751
|
-
if (node.type !== "TSEnumBody") return false;
|
|
5752
|
-
return opts == null || shallowEqual(node, opts);
|
|
5287
|
+
return isType$1("TSEnumBody", node, opts);
|
|
5753
5288
|
}
|
|
5754
5289
|
function isTSEnumDeclaration(node, opts) {
|
|
5755
|
-
|
|
5756
|
-
if (node.type !== "TSEnumDeclaration") return false;
|
|
5757
|
-
return opts == null || shallowEqual(node, opts);
|
|
5290
|
+
return isType$1("TSEnumDeclaration", node, opts);
|
|
5758
5291
|
}
|
|
5759
5292
|
function isTSEnumMember$1(node, opts) {
|
|
5760
|
-
|
|
5761
|
-
if (node.type !== "TSEnumMember") return false;
|
|
5762
|
-
return opts == null || shallowEqual(node, opts);
|
|
5293
|
+
return isType$1("TSEnumMember", node, opts);
|
|
5763
5294
|
}
|
|
5764
5295
|
function isTSModuleDeclaration(node, opts) {
|
|
5765
|
-
|
|
5766
|
-
if (node.type !== "TSModuleDeclaration") return false;
|
|
5767
|
-
return opts == null || shallowEqual(node, opts);
|
|
5296
|
+
return isType$1("TSModuleDeclaration", node, opts);
|
|
5768
5297
|
}
|
|
5769
5298
|
function isTSModuleBlock(node, opts) {
|
|
5770
|
-
|
|
5771
|
-
if (node.type !== "TSModuleBlock") return false;
|
|
5772
|
-
return opts == null || shallowEqual(node, opts);
|
|
5299
|
+
return isType$1("TSModuleBlock", node, opts);
|
|
5773
5300
|
}
|
|
5774
5301
|
function isTSImportType(node, opts) {
|
|
5775
|
-
|
|
5776
|
-
if (node.type !== "TSImportType") return false;
|
|
5777
|
-
return opts == null || shallowEqual(node, opts);
|
|
5302
|
+
return isType$1("TSImportType", node, opts);
|
|
5778
5303
|
}
|
|
5779
5304
|
function isTSImportEqualsDeclaration(node, opts) {
|
|
5780
|
-
|
|
5781
|
-
if (node.type !== "TSImportEqualsDeclaration") return false;
|
|
5782
|
-
return opts == null || shallowEqual(node, opts);
|
|
5305
|
+
return isType$1("TSImportEqualsDeclaration", node, opts);
|
|
5783
5306
|
}
|
|
5784
5307
|
function isTSExternalModuleReference(node, opts) {
|
|
5785
|
-
|
|
5786
|
-
if (node.type !== "TSExternalModuleReference") return false;
|
|
5787
|
-
return opts == null || shallowEqual(node, opts);
|
|
5308
|
+
return isType$1("TSExternalModuleReference", node, opts);
|
|
5788
5309
|
}
|
|
5789
5310
|
function isTSNonNullExpression(node, opts) {
|
|
5790
|
-
|
|
5791
|
-
if (node.type !== "TSNonNullExpression") return false;
|
|
5792
|
-
return opts == null || shallowEqual(node, opts);
|
|
5311
|
+
return isType$1("TSNonNullExpression", node, opts);
|
|
5793
5312
|
}
|
|
5794
5313
|
function isTSExportAssignment(node, opts) {
|
|
5795
|
-
|
|
5796
|
-
if (node.type !== "TSExportAssignment") return false;
|
|
5797
|
-
return opts == null || shallowEqual(node, opts);
|
|
5314
|
+
return isType$1("TSExportAssignment", node, opts);
|
|
5798
5315
|
}
|
|
5799
5316
|
function isTSNamespaceExportDeclaration(node, opts) {
|
|
5800
|
-
|
|
5801
|
-
if (node.type !== "TSNamespaceExportDeclaration") return false;
|
|
5802
|
-
return opts == null || shallowEqual(node, opts);
|
|
5317
|
+
return isType$1("TSNamespaceExportDeclaration", node, opts);
|
|
5803
5318
|
}
|
|
5804
5319
|
function isTSTypeAnnotation$1(node, opts) {
|
|
5805
|
-
|
|
5806
|
-
if (node.type !== "TSTypeAnnotation") return false;
|
|
5807
|
-
return opts == null || shallowEqual(node, opts);
|
|
5320
|
+
return isType$1("TSTypeAnnotation", node, opts);
|
|
5808
5321
|
}
|
|
5809
5322
|
function isTSTypeParameterInstantiation(node, opts) {
|
|
5810
|
-
|
|
5811
|
-
if (node.type !== "TSTypeParameterInstantiation") return false;
|
|
5812
|
-
return opts == null || shallowEqual(node, opts);
|
|
5323
|
+
return isType$1("TSTypeParameterInstantiation", node, opts);
|
|
5813
5324
|
}
|
|
5814
5325
|
function isTSTypeParameterDeclaration(node, opts) {
|
|
5815
|
-
|
|
5816
|
-
if (node.type !== "TSTypeParameterDeclaration") return false;
|
|
5817
|
-
return opts == null || shallowEqual(node, opts);
|
|
5326
|
+
return isType$1("TSTypeParameterDeclaration", node, opts);
|
|
5818
5327
|
}
|
|
5819
5328
|
function isTSTypeParameter(node, opts) {
|
|
5820
|
-
|
|
5821
|
-
if (node.type !== "TSTypeParameter") return false;
|
|
5822
|
-
return opts == null || shallowEqual(node, opts);
|
|
5329
|
+
return isType$1("TSTypeParameter", node, opts);
|
|
5823
5330
|
}
|
|
5824
5331
|
function isStandardized(node, opts) {
|
|
5825
5332
|
if (!node) return false;
|
|
@@ -6814,6 +6321,7 @@ function isTSType$1(node, opts) {
|
|
|
6814
6321
|
case "TSTupleType":
|
|
6815
6322
|
case "TSOptionalType":
|
|
6816
6323
|
case "TSRestType":
|
|
6324
|
+
case "TSNamedTupleMember":
|
|
6817
6325
|
case "TSUnionType":
|
|
6818
6326
|
case "TSIntersectionType":
|
|
6819
6327
|
case "TSConditionalType":
|
|
@@ -6856,27 +6364,19 @@ function isTSBaseType(node, opts) {
|
|
|
6856
6364
|
}
|
|
6857
6365
|
function isNumberLiteral(node, opts) {
|
|
6858
6366
|
deprecationWarning$1("isNumberLiteral", "isNumericLiteral");
|
|
6859
|
-
|
|
6860
|
-
if (node.type !== "NumberLiteral") return false;
|
|
6861
|
-
return opts == null || shallowEqual(node, opts);
|
|
6367
|
+
return isType$1("NumberLiteral", node, opts);
|
|
6862
6368
|
}
|
|
6863
6369
|
function isRegexLiteral(node, opts) {
|
|
6864
6370
|
deprecationWarning$1("isRegexLiteral", "isRegExpLiteral");
|
|
6865
|
-
|
|
6866
|
-
if (node.type !== "RegexLiteral") return false;
|
|
6867
|
-
return opts == null || shallowEqual(node, opts);
|
|
6371
|
+
return isType$1("RegexLiteral", node, opts);
|
|
6868
6372
|
}
|
|
6869
6373
|
function isRestProperty$1(node, opts) {
|
|
6870
6374
|
deprecationWarning$1("isRestProperty", "isRestElement");
|
|
6871
|
-
|
|
6872
|
-
if (node.type !== "RestProperty") return false;
|
|
6873
|
-
return opts == null || shallowEqual(node, opts);
|
|
6375
|
+
return isType$1("RestProperty", node, opts);
|
|
6874
6376
|
}
|
|
6875
6377
|
function isSpreadProperty$1(node, opts) {
|
|
6876
6378
|
deprecationWarning$1("isSpreadProperty", "isSpreadElement");
|
|
6877
|
-
|
|
6878
|
-
if (node.type !== "SpreadProperty") return false;
|
|
6879
|
-
return opts == null || shallowEqual(node, opts);
|
|
6379
|
+
return isType$1("SpreadProperty", node, opts);
|
|
6880
6380
|
}
|
|
6881
6381
|
function isModuleDeclaration(node, opts) {
|
|
6882
6382
|
deprecationWarning$1("isModuleDeclaration", "isImportOrExportDeclaration");
|
|
@@ -6915,7 +6415,7 @@ const isReactComponent = buildMatchMemberExpression$1("React.Component");
|
|
|
6915
6415
|
function isCompatTag$1(tagName) {
|
|
6916
6416
|
return !!tagName && /^[a-z]/.test(tagName);
|
|
6917
6417
|
}
|
|
6918
|
-
function isType$
|
|
6418
|
+
function isType$2(nodeType, targetType) {
|
|
6919
6419
|
if (nodeType === targetType) return true;
|
|
6920
6420
|
if (nodeType == null) return false;
|
|
6921
6421
|
if (ALIAS_KEYS[targetType]) return false;
|
|
@@ -6929,7 +6429,7 @@ function isPlaceholderType(placeholderType, targetType) {
|
|
|
6929
6429
|
}
|
|
6930
6430
|
function is(type, node, opts) {
|
|
6931
6431
|
if (!node) return false;
|
|
6932
|
-
if (!isType$
|
|
6432
|
+
if (!isType$2(node.type, type)) {
|
|
6933
6433
|
if (!opts && node.type === "Placeholder" && type in FLIPPED_ALIAS_KEYS$1) return isPlaceholderType(node.expectedNode, type);
|
|
6934
6434
|
return false;
|
|
6935
6435
|
}
|
|
@@ -7848,7 +7348,7 @@ defineType$4("MemberExpression", {
|
|
|
7848
7348
|
defineType$4("NewExpression", {
|
|
7849
7349
|
inherits: "CallExpression",
|
|
7850
7350
|
fields: {
|
|
7851
|
-
callee: { validate: assertNodeType("Expression") },
|
|
7351
|
+
callee: { validate: assertNodeType("Expression", "V8IntrinsicIdentifier") },
|
|
7852
7352
|
arguments: validateArrayOfType("Expression", "SpreadElement", "ArgumentPlaceholder"),
|
|
7853
7353
|
typeArguments: {
|
|
7854
7354
|
validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
@@ -8199,11 +7699,7 @@ defineType$4("AssignmentPattern", {
|
|
|
8199
7699
|
fields: {
|
|
8200
7700
|
...patternLikeCommon(),
|
|
8201
7701
|
left: { validate: assertNodeType("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression", "TSAsExpression", "TSSatisfiesExpression", "TSTypeAssertion", "TSNonNullExpression") },
|
|
8202
|
-
right: { validate: assertNodeType("Expression") }
|
|
8203
|
-
decorators: {
|
|
8204
|
-
validate: arrayOfType("Decorator"),
|
|
8205
|
-
optional: true
|
|
8206
|
-
}
|
|
7702
|
+
right: { validate: assertNodeType("Expression") }
|
|
8207
7703
|
}
|
|
8208
7704
|
});
|
|
8209
7705
|
defineType$4("ArrayPattern", {
|
|
@@ -8302,7 +7798,7 @@ defineType$4("ClassExpression", {
|
|
|
8302
7798
|
optional: true,
|
|
8303
7799
|
validate: assertNodeType("Expression")
|
|
8304
7800
|
},
|
|
8305
|
-
|
|
7801
|
+
superTypeArguments: {
|
|
8306
7802
|
validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
8307
7803
|
optional: true
|
|
8308
7804
|
},
|
|
@@ -8342,7 +7838,7 @@ defineType$4("ClassDeclaration", {
|
|
|
8342
7838
|
optional: true,
|
|
8343
7839
|
validate: assertNodeType("Expression")
|
|
8344
7840
|
},
|
|
8345
|
-
|
|
7841
|
+
superTypeArguments: {
|
|
8346
7842
|
validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
8347
7843
|
optional: true
|
|
8348
7844
|
},
|
|
@@ -8472,7 +7968,7 @@ defineType$4("ExportSpecifier", {
|
|
|
8472
7968
|
visitor: ["local", "exported"],
|
|
8473
7969
|
aliases: ["ModuleSpecifier"],
|
|
8474
7970
|
fields: {
|
|
8475
|
-
local: { validate: assertNodeType("Identifier") },
|
|
7971
|
+
local: { validate: assertNodeType("Identifier", "StringLiteral") },
|
|
8476
7972
|
exported: { validate: assertNodeType("Identifier", "StringLiteral") },
|
|
8477
7973
|
exportKind: {
|
|
8478
7974
|
validate: assertOneOf("type", "value"),
|
|
@@ -8624,11 +8120,11 @@ const classMethodOrPropertyCommon = () => ({
|
|
|
8624
8120
|
},
|
|
8625
8121
|
key: { validate: chain(function() {
|
|
8626
8122
|
const normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral");
|
|
8627
|
-
const computed = assertNodeType("Expression");
|
|
8123
|
+
const computed = assertNodeType("Expression", "PrivateName");
|
|
8628
8124
|
return function(node, key, val) {
|
|
8629
8125
|
(node.computed ? computed : normal)(node, key, val);
|
|
8630
8126
|
};
|
|
8631
|
-
}(), assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression")) }
|
|
8127
|
+
}(), assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression", "PrivateName")) }
|
|
8632
8128
|
});
|
|
8633
8129
|
const classMethodOrDeclareMethodCommon = (allowDecorators = true) => ({
|
|
8634
8130
|
...functionCommon(),
|
|
@@ -8716,7 +8212,7 @@ defineType$4("TaggedTemplateExpression", {
|
|
|
8716
8212
|
fields: {
|
|
8717
8213
|
tag: { validate: assertNodeType("Expression") },
|
|
8718
8214
|
quasi: { validate: assertNodeType("TemplateLiteral") },
|
|
8719
|
-
|
|
8215
|
+
typeArguments: {
|
|
8720
8216
|
validate: assertNodeType("TypeParameterInstantiation", "TSTypeParameterInstantiation"),
|
|
8721
8217
|
optional: true
|
|
8722
8218
|
}
|
|
@@ -9435,7 +8931,7 @@ defineType$3("TupleTypeAnnotation", {
|
|
|
9435
8931
|
defineType$3("TypeofTypeAnnotation", {
|
|
9436
8932
|
visitor: ["argument"],
|
|
9437
8933
|
aliases: ["FlowType"],
|
|
9438
|
-
fields: { argument: validateType("FlowType") }
|
|
8934
|
+
fields: { argument: validateType("FlowType", "Identifier") }
|
|
9439
8935
|
});
|
|
9440
8936
|
defineType$3("TypeAlias", {
|
|
9441
8937
|
visitor: [
|
|
@@ -9456,7 +8952,7 @@ defineType$3("TypeAlias", {
|
|
|
9456
8952
|
});
|
|
9457
8953
|
defineType$3("TypeAnnotation", {
|
|
9458
8954
|
visitor: ["typeAnnotation"],
|
|
9459
|
-
fields: { typeAnnotation: validateType("FlowType") }
|
|
8955
|
+
fields: { typeAnnotation: validateType("FlowType", "Identifier") }
|
|
9460
8956
|
});
|
|
9461
8957
|
defineType$3("TypeCastExpression", {
|
|
9462
8958
|
visitor: ["expression", "typeAnnotation"],
|
|
@@ -9902,7 +9398,7 @@ defineType("TSDeclareMethod", {
|
|
|
9902
9398
|
"params",
|
|
9903
9399
|
"returnType"
|
|
9904
9400
|
],
|
|
9905
|
-
...classMethodOrPropertyUnionShapeCommon(),
|
|
9401
|
+
...classMethodOrPropertyUnionShapeCommon(true),
|
|
9906
9402
|
fields: {
|
|
9907
9403
|
...classMethodOrDeclareMethodCommon(false),
|
|
9908
9404
|
...tSFunctionTypeAnnotationCommon()
|
|
@@ -9918,8 +9414,8 @@ defineType("TSQualifiedName", {
|
|
|
9918
9414
|
});
|
|
9919
9415
|
const signatureDeclarationCommon = () => ({
|
|
9920
9416
|
typeParameters: validateOptionalType("TSTypeParameterDeclaration"),
|
|
9921
|
-
|
|
9922
|
-
|
|
9417
|
+
params: validateArrayOfType("ArrayPattern", "Identifier", "ObjectPattern", "RestElement"),
|
|
9418
|
+
returnType: validateOptionalType("TSTypeAnnotation")
|
|
9923
9419
|
});
|
|
9924
9420
|
const callConstructSignatureDeclaration = {
|
|
9925
9421
|
aliases: ["TSTypeElement"],
|
|
@@ -10025,7 +9521,7 @@ defineType("TSTypeReference", {
|
|
|
10025
9521
|
visitor: ["typeName", "typeArguments"],
|
|
10026
9522
|
fields: {
|
|
10027
9523
|
typeName: validateType("TSEntityName"),
|
|
10028
|
-
|
|
9524
|
+
typeArguments: validateOptionalType("TSTypeParameterInstantiation")
|
|
10029
9525
|
}
|
|
10030
9526
|
});
|
|
10031
9527
|
defineType("TSTypePredicate", {
|
|
@@ -10047,7 +9543,7 @@ defineType("TSTypeQuery", {
|
|
|
10047
9543
|
visitor: ["exprName", "typeArguments"],
|
|
10048
9544
|
fields: {
|
|
10049
9545
|
exprName: validateType("TSEntityName", "TSImportType"),
|
|
10050
|
-
|
|
9546
|
+
typeArguments: validateOptionalType("TSTypeParameterInstantiation")
|
|
10051
9547
|
}
|
|
10052
9548
|
});
|
|
10053
9549
|
defineType("TSTypeLiteral", {
|
|
@@ -10076,6 +9572,7 @@ defineType("TSRestType", {
|
|
|
10076
9572
|
fields: { typeAnnotation: validateType("TSType") }
|
|
10077
9573
|
});
|
|
10078
9574
|
defineType("TSNamedTupleMember", {
|
|
9575
|
+
aliases: ["TSType"],
|
|
10079
9576
|
visitor: ["label", "elementType"],
|
|
10080
9577
|
builder: [
|
|
10081
9578
|
"label",
|
|
@@ -10253,7 +9750,7 @@ defineType("TSInstantiationExpression", {
|
|
|
10253
9750
|
visitor: ["expression", "typeArguments"],
|
|
10254
9751
|
fields: {
|
|
10255
9752
|
expression: validateType("Expression"),
|
|
10256
|
-
|
|
9753
|
+
typeArguments: validateOptionalType("TSTypeParameterInstantiation")
|
|
10257
9754
|
}
|
|
10258
9755
|
});
|
|
10259
9756
|
const TSTypeExpression = {
|
|
@@ -15145,7 +14642,7 @@ function isBlockScoped$1(node) {
|
|
|
15145
14642
|
return isFunctionDeclaration$1(node) || isClassDeclaration$2(node) || isLet(node);
|
|
15146
14643
|
}
|
|
15147
14644
|
function isImmutable(node) {
|
|
15148
|
-
if (isType$
|
|
14645
|
+
if (isType$2(node.type, "Immutable")) return true;
|
|
15149
14646
|
if (isIdentifier$7(node)) {
|
|
15150
14647
|
if (node.name === "undefined") return true;
|
|
15151
14648
|
else return false;
|
|
@@ -15278,7 +14775,7 @@ const react$1 = {
|
|
|
15278
14775
|
buildChildren
|
|
15279
14776
|
};
|
|
15280
14777
|
//#endregion
|
|
15281
|
-
//#region ../../node_modules/.pnpm/@babel+parser@8.0.
|
|
14778
|
+
//#region ../../node_modules/.pnpm/@babel+parser@8.0.5/node_modules/@babel/parser/lib/index.js
|
|
15282
14779
|
var Position = class {
|
|
15283
14780
|
constructor(line, col, index) {
|
|
15284
14781
|
this.line = void 0;
|
|
@@ -15655,7 +15152,7 @@ const estree = (superClass) => class ESTreeParserMixin extends superClass {
|
|
|
15655
15152
|
bigInt = null;
|
|
15656
15153
|
}
|
|
15657
15154
|
const node = this.estreeParseLiteral(bigInt);
|
|
15658
|
-
node.bigint = String(node.value
|
|
15155
|
+
node.bigint = node.value !== null ? String(node.value) : value;
|
|
15659
15156
|
return node;
|
|
15660
15157
|
}
|
|
15661
15158
|
estreeParseLiteral(value) {
|
|
@@ -17652,7 +17149,7 @@ const flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
17652
17149
|
if (this.flowPragma === void 0 && !this.isValidDirective(stmt)) this.flowPragma = null;
|
|
17653
17150
|
return stmt;
|
|
17654
17151
|
}
|
|
17655
|
-
parseExpressionStatement(node, expr
|
|
17152
|
+
parseExpressionStatement(node, expr) {
|
|
17656
17153
|
if (expr.type === "Identifier") {
|
|
17657
17154
|
if (expr.name === "declare") {
|
|
17658
17155
|
if (this.match(76) || tokenIsIdentifier(this.state.type) || this.match(64) || this.match(70) || this.match(78)) return this.flowParseDeclare(node);
|
|
@@ -17662,7 +17159,7 @@ const flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
17662
17159
|
else if (expr.name === "opaque") return this.flowParseOpaqueType(node, false);
|
|
17663
17160
|
}
|
|
17664
17161
|
}
|
|
17665
|
-
return super.parseExpressionStatement(node, expr
|
|
17162
|
+
return super.parseExpressionStatement(node, expr);
|
|
17666
17163
|
}
|
|
17667
17164
|
shouldParseExportDeclaration() {
|
|
17668
17165
|
const { type } = this.state;
|
|
@@ -17721,7 +17218,7 @@ const flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
17721
17218
|
this.expect(10);
|
|
17722
17219
|
node.test = expr;
|
|
17723
17220
|
node.consequent = consequent;
|
|
17724
|
-
node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign(
|
|
17221
|
+
node.alternate = this.forwardNoArrowParamsConversionAt(node, () => this.parseMaybeAssign());
|
|
17725
17222
|
return this.finishNode(node, "ConditionalExpression");
|
|
17726
17223
|
}
|
|
17727
17224
|
tryParseConditionalConsequent() {
|
|
@@ -18086,12 +17583,12 @@ const flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
18086
17583
|
shouldParseAsyncArrow() {
|
|
18087
17584
|
return this.match(10) || super.shouldParseAsyncArrow();
|
|
18088
17585
|
}
|
|
18089
|
-
parseMaybeAssign(refExpressionErrors,
|
|
17586
|
+
parseMaybeAssign(refExpressionErrors, isParenItem) {
|
|
18090
17587
|
let state = null;
|
|
18091
17588
|
let jsx;
|
|
18092
17589
|
if (this.hasPlugin("jsx") && (this.match(138) || this.match(43))) {
|
|
18093
17590
|
state = this.state.clone();
|
|
18094
|
-
jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors,
|
|
17591
|
+
jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, isParenItem), state);
|
|
18095
17592
|
if (!jsx.error) return jsx.node;
|
|
18096
17593
|
const { context } = this.state;
|
|
18097
17594
|
const currentContext = context[context.length - 1];
|
|
@@ -18103,7 +17600,7 @@ const flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
18103
17600
|
const arrow = this.tryParse((abort) => {
|
|
18104
17601
|
typeParameters = this.flowParseTypeParameterDeclaration();
|
|
18105
17602
|
const arrowExpression = this.forwardNoArrowParamsConversionAt(typeParameters, () => {
|
|
18106
|
-
const result = super.parseMaybeAssign(refExpressionErrors,
|
|
17603
|
+
const result = super.parseMaybeAssign(refExpressionErrors, isParenItem);
|
|
18107
17604
|
this.resetStartLocationFromNode(result, typeParameters);
|
|
18108
17605
|
return result;
|
|
18109
17606
|
});
|
|
@@ -18134,7 +17631,7 @@ const flow = (superClass) => class FlowParserMixin extends superClass {
|
|
|
18134
17631
|
if (arrow.thrown) throw arrow.error;
|
|
18135
17632
|
throw this.raise(FlowErrors.UnexpectedTokenAfterTypeParameter, typeParameters);
|
|
18136
17633
|
}
|
|
18137
|
-
return super.parseMaybeAssign(refExpressionErrors,
|
|
17634
|
+
return super.parseMaybeAssign(refExpressionErrors, isParenItem);
|
|
18138
17635
|
}
|
|
18139
17636
|
parseArrow(node) {
|
|
18140
17637
|
if (this.match(10)) {
|
|
@@ -18951,7 +18448,7 @@ const jsx = (superClass) => class JSXParserMixin extends superClass {
|
|
|
18951
18448
|
++this.state.pos;
|
|
18952
18449
|
}
|
|
18953
18450
|
const codePoint = this.readInt(radix, void 0, false, "bail");
|
|
18954
|
-
if (codePoint !== null && this.codePointAtPos(this.state.pos) === 59) {
|
|
18451
|
+
if (codePoint !== null && codePoint <= 1114111 && this.codePointAtPos(this.state.pos) === 59) {
|
|
18955
18452
|
++this.state.pos;
|
|
18956
18453
|
return String.fromCodePoint(codePoint);
|
|
18957
18454
|
}
|
|
@@ -20045,7 +19542,8 @@ var Tokenizer$1 = class extends CommentsParser {
|
|
|
20045
19542
|
}
|
|
20046
19543
|
skipSpace() {
|
|
20047
19544
|
const spaceStart = this.state.pos;
|
|
20048
|
-
const
|
|
19545
|
+
const attachComment = (this.optionFlags & 8192) > 0;
|
|
19546
|
+
let comments;
|
|
20049
19547
|
loop: while (this.state.pos < this.length) {
|
|
20050
19548
|
const ch = this.input.charCodeAt(this.state.pos);
|
|
20051
19549
|
switch (ch) {
|
|
@@ -20068,7 +19566,7 @@ var Tokenizer$1 = class extends CommentsParser {
|
|
|
20068
19566
|
const comment = this.skipBlockComment("*/");
|
|
20069
19567
|
if (comment !== void 0) {
|
|
20070
19568
|
this.addComment(comment);
|
|
20071
|
-
comments
|
|
19569
|
+
if (attachComment) (comments ?? (comments = [])).push(comment);
|
|
20072
19570
|
}
|
|
20073
19571
|
break;
|
|
20074
19572
|
}
|
|
@@ -20076,7 +19574,7 @@ var Tokenizer$1 = class extends CommentsParser {
|
|
|
20076
19574
|
const comment = this.skipLineComment(2);
|
|
20077
19575
|
if (comment !== void 0) {
|
|
20078
19576
|
this.addComment(comment);
|
|
20079
|
-
comments
|
|
19577
|
+
if (attachComment) (comments ?? (comments = [])).push(comment);
|
|
20080
19578
|
}
|
|
20081
19579
|
break;
|
|
20082
19580
|
}
|
|
@@ -20090,7 +19588,7 @@ var Tokenizer$1 = class extends CommentsParser {
|
|
|
20090
19588
|
const comment = this.skipLineComment(3);
|
|
20091
19589
|
if (comment !== void 0) {
|
|
20092
19590
|
this.addComment(comment);
|
|
20093
|
-
comments
|
|
19591
|
+
if (attachComment) (comments ?? (comments = [])).push(comment);
|
|
20094
19592
|
}
|
|
20095
19593
|
} else break loop;
|
|
20096
19594
|
} else if (ch === 60 && !this.inModule && this.optionFlags & 16384) {
|
|
@@ -20099,13 +19597,13 @@ var Tokenizer$1 = class extends CommentsParser {
|
|
|
20099
19597
|
const comment = this.skipLineComment(4);
|
|
20100
19598
|
if (comment !== void 0) {
|
|
20101
19599
|
this.addComment(comment);
|
|
20102
|
-
comments
|
|
19600
|
+
if (attachComment) (comments ?? (comments = [])).push(comment);
|
|
20103
19601
|
}
|
|
20104
19602
|
} else break loop;
|
|
20105
19603
|
} else break loop;
|
|
20106
19604
|
}
|
|
20107
19605
|
}
|
|
20108
|
-
if (comments?.length
|
|
19606
|
+
if (comments?.length) {
|
|
20109
19607
|
const end = this.state.pos;
|
|
20110
19608
|
const commentWhitespace = {
|
|
20111
19609
|
start: this.sourceToOffsetPos(spaceStart),
|
|
@@ -21224,7 +20722,7 @@ var LValParser = class extends NodeUtils {
|
|
|
21224
20722
|
parseSpread(refExpressionErrors) {
|
|
21225
20723
|
const node = this.startNode();
|
|
21226
20724
|
this.next();
|
|
21227
|
-
node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors
|
|
20725
|
+
node.argument = this.parseMaybeAssignAllowIn(refExpressionErrors);
|
|
21228
20726
|
return this.finishNode(node, "SpreadElement");
|
|
21229
20727
|
}
|
|
21230
20728
|
parseRestBinding() {
|
|
@@ -21451,23 +20949,23 @@ var ExpressionParser = class extends LValParser {
|
|
|
21451
20949
|
}
|
|
21452
20950
|
return expr;
|
|
21453
20951
|
}
|
|
21454
|
-
parseMaybeAssignDisallowIn(refExpressionErrors
|
|
21455
|
-
return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors
|
|
20952
|
+
parseMaybeAssignDisallowIn(refExpressionErrors) {
|
|
20953
|
+
return this.disallowInAnd(() => this.parseMaybeAssign(refExpressionErrors));
|
|
21456
20954
|
}
|
|
21457
|
-
parseMaybeAssignAllowIn(refExpressionErrors,
|
|
21458
|
-
return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors,
|
|
20955
|
+
parseMaybeAssignAllowIn(refExpressionErrors, isParenItem) {
|
|
20956
|
+
return this.allowInAnd(() => this.parseMaybeAssign(refExpressionErrors, isParenItem));
|
|
21459
20957
|
}
|
|
21460
20958
|
setOptionalParametersError(refExpressionErrors) {
|
|
21461
20959
|
refExpressionErrors.optionalParametersLoc = this.state.startLoc;
|
|
21462
20960
|
}
|
|
21463
|
-
parseMaybeAssign(refExpressionErrors,
|
|
20961
|
+
parseMaybeAssign(refExpressionErrors, isParenItem) {
|
|
21464
20962
|
const startLoc = this.state.startLoc;
|
|
21465
20963
|
const isYield = this.isContextual(104);
|
|
21466
20964
|
if (isYield) {
|
|
21467
20965
|
if (this.prodParam.hasYield) {
|
|
21468
20966
|
this.next();
|
|
21469
20967
|
let left = this.parseYield(startLoc);
|
|
21470
|
-
if (
|
|
20968
|
+
if (isParenItem) left = this.parseParenItem(left, startLoc);
|
|
21471
20969
|
return left;
|
|
21472
20970
|
}
|
|
21473
20971
|
}
|
|
@@ -21479,7 +20977,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
21479
20977
|
}
|
|
21480
20978
|
this.state.canStartArrow = true;
|
|
21481
20979
|
let left = this.parseMaybeConditional(refExpressionErrors);
|
|
21482
|
-
if (
|
|
20980
|
+
if (isParenItem) left = this.parseParenItem(left, startLoc);
|
|
21483
20981
|
if (tokenIsAssignment(this.state.type)) {
|
|
21484
20982
|
const node = this.startNodeAt(startLoc);
|
|
21485
20983
|
const operator = this.state.value;
|
|
@@ -21715,9 +21213,10 @@ var ExpressionParser = class extends LValParser {
|
|
|
21715
21213
|
const node = this.startNodeAt(startLoc);
|
|
21716
21214
|
node.object = base;
|
|
21717
21215
|
this.next();
|
|
21718
|
-
const
|
|
21719
|
-
|
|
21720
|
-
|
|
21216
|
+
const callee = this.parseNoCallExpr((base) => {
|
|
21217
|
+
throw this.raise(Errors.UnsupportedBindRHS, base);
|
|
21218
|
+
});
|
|
21219
|
+
if (callee.type === "Super" || callee.type === "Import") throw this.raise(Errors.UnsupportedBindRHS, callee);
|
|
21721
21220
|
node.callee = callee;
|
|
21722
21221
|
state.stop = true;
|
|
21723
21222
|
return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, false);
|
|
@@ -21796,9 +21295,12 @@ var ExpressionParser = class extends LValParser {
|
|
|
21796
21295
|
if (call.callee.trailingComments) setInnerComments(node, call.callee.trailingComments);
|
|
21797
21296
|
return node;
|
|
21798
21297
|
}
|
|
21799
|
-
parseNoCallExpr() {
|
|
21298
|
+
parseNoCallExpr(onUnparenthesizedImportExpression) {
|
|
21800
21299
|
const startLoc = this.state.startLoc;
|
|
21801
|
-
|
|
21300
|
+
const isImport = this.match(79);
|
|
21301
|
+
const base = this.parseExprAtom();
|
|
21302
|
+
if (isImport && base.type === "ImportExpression") onUnparenthesizedImportExpression(base);
|
|
21303
|
+
return this.parseSubscripts(base, startLoc, true);
|
|
21802
21304
|
}
|
|
21803
21305
|
parseExprAtom(refExpressionErrors) {
|
|
21804
21306
|
let node;
|
|
@@ -21845,7 +21347,9 @@ var ExpressionParser = class extends LValParser {
|
|
|
21845
21347
|
node = this.startNode();
|
|
21846
21348
|
this.next();
|
|
21847
21349
|
node.object = null;
|
|
21848
|
-
const callee = node.callee = this.parseNoCallExpr()
|
|
21350
|
+
const callee = node.callee = this.parseNoCallExpr((base) => {
|
|
21351
|
+
throw this.raise(Errors.UnsupportedBind, base);
|
|
21352
|
+
});
|
|
21849
21353
|
if (callee.type === "MemberExpression") return this.finishNode(node, "BindExpression");
|
|
21850
21354
|
else throw this.raise(Errors.UnsupportedBind, callee);
|
|
21851
21355
|
}
|
|
@@ -22078,7 +21582,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
22078
21582
|
spreadStartLoc = this.state.startLoc;
|
|
22079
21583
|
exprList.push(this.parseParenItem(this.parseRestBinding(), spreadNodeStartLoc));
|
|
22080
21584
|
if (!this.checkCommaAfterRest(41)) break;
|
|
22081
|
-
} else exprList.push(this.parseMaybeAssignAllowInOrVoidPattern(7, refExpressionErrors,
|
|
21585
|
+
} else exprList.push(this.parseMaybeAssignAllowInOrVoidPattern(7, refExpressionErrors, true));
|
|
22082
21586
|
}
|
|
22083
21587
|
const innerEndLoc = this.state.lastTokEndLoc;
|
|
22084
21588
|
this.expect(7);
|
|
@@ -22146,10 +21650,10 @@ var ExpressionParser = class extends LValParser {
|
|
|
22146
21650
|
return this.finishNode(node, "NewExpression");
|
|
22147
21651
|
}
|
|
22148
21652
|
parseNewCallee(node) {
|
|
22149
|
-
const
|
|
22150
|
-
|
|
21653
|
+
const callee = this.parseNoCallExpr((base) => {
|
|
21654
|
+
this.raise(Errors.ImportCallNotNewExpression, base, base);
|
|
21655
|
+
});
|
|
22151
21656
|
node.callee = callee;
|
|
22152
|
-
if (isImport && callee.type === "ImportExpression") this.raise(Errors.ImportCallNotNewExpression, callee, callee);
|
|
22153
21657
|
if (callee.type === "Import") this.raise(Errors.ImportCallNotNewExpression, callee);
|
|
22154
21658
|
if (callee.type === "Super") this.raise(Errors.SuperCallNotNewExpression, callee);
|
|
22155
21659
|
}
|
|
@@ -22348,7 +21852,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
22348
21852
|
key = this.parsePrivateName();
|
|
22349
21853
|
break;
|
|
22350
21854
|
}
|
|
22351
|
-
default: this.unexpected();
|
|
21855
|
+
default: throw this.unexpected();
|
|
22352
21856
|
}
|
|
22353
21857
|
prop.key = key;
|
|
22354
21858
|
if (type !== 134) prop.computed = false;
|
|
@@ -22462,7 +21966,7 @@ var ExpressionParser = class extends LValParser {
|
|
|
22462
21966
|
const node = this.startNode();
|
|
22463
21967
|
this.next();
|
|
22464
21968
|
elt = this.finishNode(node, "ArgumentPlaceholder");
|
|
22465
|
-
} else elt = this.parseMaybeAssignAllowInOrVoidPattern(close, refExpressionErrors,
|
|
21969
|
+
} else elt = this.parseMaybeAssignAllowInOrVoidPattern(close, refExpressionErrors, true);
|
|
22466
21970
|
return elt;
|
|
22467
21971
|
}
|
|
22468
21972
|
parseIdentifier(liberal) {
|
|
@@ -22666,12 +22170,12 @@ var ExpressionParser = class extends LValParser {
|
|
|
22666
22170
|
this.next();
|
|
22667
22171
|
return this.finishNode(node, "VoidPattern");
|
|
22668
22172
|
}
|
|
22669
|
-
parseMaybeAssignAllowInOrVoidPattern(close, refExpressionErrors,
|
|
22173
|
+
parseMaybeAssignAllowInOrVoidPattern(close, refExpressionErrors, isParenItem) {
|
|
22670
22174
|
if (refExpressionErrors != null && this.match(84)) {
|
|
22671
22175
|
const nextCode = this.lookaheadCharCode();
|
|
22672
22176
|
if (nextCode === 44 || nextCode === (close === 1 ? 93 : close === 4 ? 125 : 41) || nextCode === 61) return this.parseMaybeDefault(this.state.startLoc, this.parseVoidPattern(refExpressionErrors));
|
|
22673
22177
|
}
|
|
22674
|
-
return this.parseMaybeAssignAllowIn(refExpressionErrors,
|
|
22178
|
+
return this.parseMaybeAssignAllowIn(refExpressionErrors, isParenItem);
|
|
22675
22179
|
}
|
|
22676
22180
|
parsePropertyNamePrefixOperator(prop) {}
|
|
22677
22181
|
};
|
|
@@ -22888,7 +22392,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
22888
22392
|
const maybeName = this.state.value;
|
|
22889
22393
|
const expr = this.parseExpression();
|
|
22890
22394
|
if (tokenIsIdentifier(startType) && expr.type === "Identifier" && this.eat(10)) return this.parseLabeledStatement(node, maybeName, expr, flags);
|
|
22891
|
-
else return this.parseExpressionStatement(node, expr
|
|
22395
|
+
else return this.parseExpressionStatement(node, expr);
|
|
22892
22396
|
}
|
|
22893
22397
|
assertModuleNodeAllowed(node) {
|
|
22894
22398
|
if (!(this.optionFlags & 8) && !this.inModule) this.raise(Errors.ImportOutsideModule, node);
|
|
@@ -23040,7 +22544,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
23040
22544
|
const init = this.finishNode(initNode, "VariableDeclaration");
|
|
23041
22545
|
const isForIn = this.match(54);
|
|
23042
22546
|
if (isForIn && starsWithUsingDeclaration) this.raise(Errors.ForInUsing, init);
|
|
23043
|
-
if ((isForIn || this.isContextual(98)) && init.declarations.length === 1) return this.
|
|
22547
|
+
if ((isForIn || this.isContextual(98)) && init.declarations.length === 1) return this.parseForX(node, init, awaitAt);
|
|
23044
22548
|
if (awaitAt !== null) this.unexpected(awaitAt);
|
|
23045
22549
|
return this.parseFor(node, init);
|
|
23046
22550
|
}
|
|
@@ -23058,7 +22562,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
23058
22562
|
this.toAssignable(init, true);
|
|
23059
22563
|
const type = isForOf ? "ForOfStatement" : "ForInStatement";
|
|
23060
22564
|
this.checkLVal(init, { type });
|
|
23061
|
-
return this.
|
|
22565
|
+
return this.parseForX(node, init, awaitAt);
|
|
23062
22566
|
} else this.checkExpressionErrors(refExpressionErrors, true);
|
|
23063
22567
|
if (awaitAt !== null) this.unexpected(awaitAt);
|
|
23064
22568
|
return this.parseFor(node, init);
|
|
@@ -23194,7 +22698,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
23194
22698
|
node.label = expr;
|
|
23195
22699
|
return this.finishNode(node, "LabeledStatement");
|
|
23196
22700
|
}
|
|
23197
|
-
parseExpressionStatement(node, expr
|
|
22701
|
+
parseExpressionStatement(node, expr) {
|
|
23198
22702
|
node.expression = expr;
|
|
23199
22703
|
this.semicolon();
|
|
23200
22704
|
return this.finishNode(node, "ExpressionStatement");
|
|
@@ -23253,7 +22757,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
23253
22757
|
this.state.labels.pop();
|
|
23254
22758
|
return this.finishNode(node, "ForStatement");
|
|
23255
22759
|
}
|
|
23256
|
-
|
|
22760
|
+
parseForX(node, init, awaitAt) {
|
|
23257
22761
|
const isForIn = this.match(54);
|
|
23258
22762
|
this.next();
|
|
23259
22763
|
if (isForIn) {
|
|
@@ -23617,7 +23121,7 @@ var StatementParser = class extends ExpressionParser {
|
|
|
23617
23121
|
} else hasDeclaration = this.maybeParseExportDeclaration(node);
|
|
23618
23122
|
if (isFromRequired || hasSpecifiers || hasDeclaration) {
|
|
23619
23123
|
const node2 = node;
|
|
23620
|
-
this.
|
|
23124
|
+
this.checkNamedExport(node2, !!node2.source);
|
|
23621
23125
|
if (node2.declaration?.type === "ClassDeclaration") this.maybeTakeDecorators(decorators, node2.declaration, node2);
|
|
23622
23126
|
else if (decorators) throw this.raise(Errors.UnsupportedDecoratorExport, node);
|
|
23623
23127
|
this.sawUnambiguousESM = true;
|
|
@@ -23629,7 +23133,10 @@ var StatementParser = class extends ExpressionParser {
|
|
|
23629
23133
|
node2.declaration = decl;
|
|
23630
23134
|
if (decl.type === "ClassDeclaration") this.maybeTakeDecorators(decorators, decl, node2);
|
|
23631
23135
|
else if (decorators) throw this.raise(Errors.UnsupportedDecoratorExport, node);
|
|
23632
|
-
this.
|
|
23136
|
+
this.checkDuplicateExports(node, "default");
|
|
23137
|
+
if (this.hasPlugin("exportDefaultFrom")) {
|
|
23138
|
+
if (decl.type === "Identifier" && decl.name === "from" && decl.end - decl.start === 4 && !decl.extra?.parenthesized) this.raise(Errors.ExportDefaultFromAsIdentifier, decl);
|
|
23139
|
+
}
|
|
23633
23140
|
this.sawUnambiguousESM = true;
|
|
23634
23141
|
return this.finishNode(node2, "ExportDefaultDeclaration");
|
|
23635
23142
|
}
|
|
@@ -23734,7 +23241,6 @@ var StatementParser = class extends ExpressionParser {
|
|
|
23734
23241
|
parseExportFrom(node, expect) {
|
|
23735
23242
|
if (this.eatContextual(94)) {
|
|
23736
23243
|
node.source = this.parseImportSource();
|
|
23737
|
-
this.checkExport(node);
|
|
23738
23244
|
this.maybeParseImportAttributes(node);
|
|
23739
23245
|
} else if (expect) this.unexpected();
|
|
23740
23246
|
this.semicolon();
|
|
@@ -23755,38 +23261,30 @@ var StatementParser = class extends ExpressionParser {
|
|
|
23755
23261
|
}
|
|
23756
23262
|
return type === 70 || type === 71 || type === 64 || type === 76 || this.isLet() || this.isAsyncFunction();
|
|
23757
23263
|
}
|
|
23758
|
-
|
|
23759
|
-
if (
|
|
23760
|
-
|
|
23761
|
-
|
|
23762
|
-
|
|
23763
|
-
|
|
23764
|
-
|
|
23765
|
-
|
|
23766
|
-
|
|
23767
|
-
|
|
23768
|
-
|
|
23769
|
-
|
|
23770
|
-
|
|
23771
|
-
|
|
23772
|
-
if (local.type !== "Identifier") this.raise(Errors.ExportBindingIsString, specifier, {
|
|
23773
|
-
localName: local.value,
|
|
23774
|
-
exportName
|
|
23775
|
-
});
|
|
23776
|
-
else {
|
|
23777
|
-
this.checkReservedWord(local.name, local.start, true, false);
|
|
23778
|
-
this.scope.checkLocalExport(local);
|
|
23779
|
-
}
|
|
23264
|
+
checkNamedExport(node, isFrom) {
|
|
23265
|
+
if (node.specifiers?.length) for (const specifier of node.specifiers) {
|
|
23266
|
+
const { exported } = specifier;
|
|
23267
|
+
const exportName = exported.type === "Identifier" ? exported.name : exported.value;
|
|
23268
|
+
this.checkDuplicateExports(specifier, exportName);
|
|
23269
|
+
if (!isFrom && specifier.type === "ExportSpecifier") {
|
|
23270
|
+
const { local } = specifier;
|
|
23271
|
+
if (local.type !== "Identifier") this.raise(Errors.ExportBindingIsString, specifier, {
|
|
23272
|
+
localName: local.value,
|
|
23273
|
+
exportName
|
|
23274
|
+
});
|
|
23275
|
+
else {
|
|
23276
|
+
this.checkReservedWord(local.name, local.start, true, false);
|
|
23277
|
+
this.scope.checkLocalExport(local);
|
|
23780
23278
|
}
|
|
23781
23279
|
}
|
|
23782
|
-
|
|
23783
|
-
|
|
23784
|
-
|
|
23785
|
-
|
|
23786
|
-
|
|
23787
|
-
|
|
23788
|
-
|
|
23789
|
-
}
|
|
23280
|
+
}
|
|
23281
|
+
else if (node.declaration) {
|
|
23282
|
+
const decl = node.declaration;
|
|
23283
|
+
if (decl.type === "FunctionDeclaration" || decl.type === "ClassDeclaration") {
|
|
23284
|
+
const { id } = decl;
|
|
23285
|
+
if (!id) throw new Error("Assertion failure");
|
|
23286
|
+
this.checkDuplicateExports(node, id.name);
|
|
23287
|
+
} else if (decl.type === "VariableDeclaration") for (const declaration of decl.declarations) this.checkDeclaration(declaration.id);
|
|
23790
23288
|
}
|
|
23791
23289
|
}
|
|
23792
23290
|
checkDeclaration(node) {
|
|
@@ -24113,45 +23611,64 @@ function tsIsEntityName(node) {
|
|
|
24113
23611
|
default: return false;
|
|
24114
23612
|
}
|
|
24115
23613
|
}
|
|
23614
|
+
const ClassMemberModifiers = buildModifiersMap([
|
|
23615
|
+
"declare",
|
|
23616
|
+
"private",
|
|
23617
|
+
"public",
|
|
23618
|
+
"protected",
|
|
23619
|
+
"override",
|
|
23620
|
+
"abstract",
|
|
23621
|
+
"readonly",
|
|
23622
|
+
"static"
|
|
23623
|
+
], ["in", "out"]);
|
|
23624
|
+
const IndexSignatureModifiers = buildModifiersMap(["readonly"], [
|
|
23625
|
+
"declare",
|
|
23626
|
+
"abstract",
|
|
23627
|
+
"private",
|
|
23628
|
+
"protected",
|
|
23629
|
+
"public",
|
|
23630
|
+
"static",
|
|
23631
|
+
"override"
|
|
23632
|
+
]);
|
|
23633
|
+
const BindingElementModifiers = buildModifiersMap([
|
|
23634
|
+
"public",
|
|
23635
|
+
"private",
|
|
23636
|
+
"protected",
|
|
23637
|
+
"override",
|
|
23638
|
+
"readonly"
|
|
23639
|
+
]);
|
|
23640
|
+
const AccessModifiers = buildModifiersMap([
|
|
23641
|
+
"private",
|
|
23642
|
+
"public",
|
|
23643
|
+
"protected"
|
|
23644
|
+
]);
|
|
24116
23645
|
const typescript = (superClass) => class TypeScriptParserMixin extends superClass {
|
|
24117
23646
|
constructor(..._args5) {
|
|
24118
23647
|
super(..._args5);
|
|
24119
|
-
require_generator._defineProperty(this, "tsParseInOutModifiers", this.tsParseModifiers.bind(this,
|
|
24120
|
-
|
|
24121
|
-
|
|
24122
|
-
|
|
24123
|
-
|
|
24124
|
-
|
|
24125
|
-
|
|
24126
|
-
|
|
24127
|
-
|
|
24128
|
-
|
|
24129
|
-
|
|
24130
|
-
|
|
24131
|
-
|
|
24132
|
-
|
|
24133
|
-
|
|
24134
|
-
|
|
24135
|
-
|
|
24136
|
-
|
|
24137
|
-
|
|
24138
|
-
|
|
24139
|
-
|
|
24140
|
-
|
|
24141
|
-
|
|
24142
|
-
|
|
24143
|
-
],
|
|
24144
|
-
disallowedModifiers: [
|
|
24145
|
-
"public",
|
|
24146
|
-
"private",
|
|
24147
|
-
"protected",
|
|
24148
|
-
"readonly",
|
|
24149
|
-
"declare",
|
|
24150
|
-
"abstract",
|
|
24151
|
-
"override"
|
|
24152
|
-
],
|
|
24153
|
-
errorTemplate: TSErrors.InvalidModifierOnTypeParameter
|
|
24154
|
-
}));
|
|
23648
|
+
require_generator._defineProperty(this, "tsParseInOutModifiers", this.tsParseModifiers.bind(this, buildModifiersMap(["in", "out"], [
|
|
23649
|
+
"const",
|
|
23650
|
+
"public",
|
|
23651
|
+
"private",
|
|
23652
|
+
"protected",
|
|
23653
|
+
"readonly",
|
|
23654
|
+
"declare",
|
|
23655
|
+
"abstract",
|
|
23656
|
+
"override"
|
|
23657
|
+
]), TSErrors.InvalidModifierOnTypeParameter));
|
|
23658
|
+
require_generator._defineProperty(this, "tsParseConstModifier", this.tsParseModifiers.bind(this, buildModifiersMap(["const"], ["in", "out"]), TSErrors.InvalidModifierOnTypeParameterPositions));
|
|
23659
|
+
require_generator._defineProperty(this, "tsParseInOutConstModifiers", this.tsParseModifiers.bind(this, buildModifiersMap([
|
|
23660
|
+
"in",
|
|
23661
|
+
"out",
|
|
23662
|
+
"const"
|
|
23663
|
+
], [
|
|
23664
|
+
"public",
|
|
23665
|
+
"private",
|
|
23666
|
+
"protected",
|
|
23667
|
+
"readonly",
|
|
23668
|
+
"declare",
|
|
23669
|
+
"abstract",
|
|
23670
|
+
"override"
|
|
23671
|
+
]), TSErrors.InvalidModifierOnTypeParameter));
|
|
24155
23672
|
}
|
|
24156
23673
|
getScopeHandler() {
|
|
24157
23674
|
return TypeScriptScopeHandler;
|
|
@@ -24174,16 +23691,16 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
24174
23691
|
}
|
|
24175
23692
|
return this.tsNextTokenOnSameLineAndCanFollowModifier();
|
|
24176
23693
|
}
|
|
24177
|
-
tsParseModifier(
|
|
23694
|
+
tsParseModifier(modifiers, stopOnStartOfClassStaticBlock, hasSeenStaticModifier) {
|
|
24178
23695
|
if (!tokenIsIdentifier(this.state.type) && this.state.type !== 54 && this.state.type !== 71) return;
|
|
24179
23696
|
const modifier = this.state.value;
|
|
24180
|
-
if (
|
|
23697
|
+
if (modifiers.has(modifier)) {
|
|
24181
23698
|
if (hasSeenStaticModifier && this.match(102)) return;
|
|
24182
23699
|
if (stopOnStartOfClassStaticBlock && this.tsIsStartOfStaticBlocks()) return;
|
|
24183
23700
|
if (this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this))) return modifier;
|
|
24184
23701
|
}
|
|
24185
23702
|
}
|
|
24186
|
-
tsParseModifiers(
|
|
23703
|
+
tsParseModifiers(modifiers, errorTemplate = TSErrors.InvalidModifierOnTypeMember, modified, stopOnStartOfClassStaticBlock = false) {
|
|
24187
23704
|
const enforceOrder = (loc, modifier, before, after) => {
|
|
24188
23705
|
if (modifier === before && modified[after]) this.raise(TSErrors.InvalidModifiersOrder, loc, { orderedModifiers: [before, after] });
|
|
24189
23706
|
};
|
|
@@ -24192,7 +23709,7 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
24192
23709
|
};
|
|
24193
23710
|
for (;;) {
|
|
24194
23711
|
const { startLoc } = this.state;
|
|
24195
|
-
const modifier = this.tsParseModifier(
|
|
23712
|
+
const modifier = this.tsParseModifier(modifiers, stopOnStartOfClassStaticBlock, modified.static);
|
|
24196
23713
|
if (!modifier) break;
|
|
24197
23714
|
if (tsIsAccessModifier(modifier)) {
|
|
24198
23715
|
if (modified.accessibility) this.raise(TSErrors.DuplicateAccessibilityModifier, startLoc, { modifier });
|
|
@@ -24218,7 +23735,7 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
24218
23735
|
}
|
|
24219
23736
|
modified[modifier] = true;
|
|
24220
23737
|
}
|
|
24221
|
-
if (
|
|
23738
|
+
if (!modifiers.get(modifier)) this.raise(errorTemplate, startLoc, { modifier });
|
|
24222
23739
|
}
|
|
24223
23740
|
}
|
|
24224
23741
|
tsIsListTerminator(kind) {
|
|
@@ -24472,18 +23989,7 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
24472
23989
|
return this.tsParsePropertyOrMethodSignature(node, false);
|
|
24473
23990
|
}
|
|
24474
23991
|
}
|
|
24475
|
-
this.tsParseModifiers(
|
|
24476
|
-
allowedModifiers: ["readonly"],
|
|
24477
|
-
disallowedModifiers: [
|
|
24478
|
-
"declare",
|
|
24479
|
-
"abstract",
|
|
24480
|
-
"private",
|
|
24481
|
-
"protected",
|
|
24482
|
-
"public",
|
|
24483
|
-
"static",
|
|
24484
|
-
"override"
|
|
24485
|
-
]
|
|
24486
|
-
}, node);
|
|
23992
|
+
this.tsParseModifiers(IndexSignatureModifiers, void 0, node);
|
|
24487
23993
|
const idx = this.tsTryParseIndexSignature(node);
|
|
24488
23994
|
if (idx) return idx;
|
|
24489
23995
|
super.parsePropertyName(node);
|
|
@@ -25271,13 +24777,7 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
25271
24777
|
parseBindingElement(flags, decorators) {
|
|
25272
24778
|
const startLoc = decorators.length ? null : this.state.startLoc;
|
|
25273
24779
|
const modified = {};
|
|
25274
|
-
this.tsParseModifiers(
|
|
25275
|
-
"public",
|
|
25276
|
-
"private",
|
|
25277
|
-
"protected",
|
|
25278
|
-
"override",
|
|
25279
|
-
"readonly"
|
|
25280
|
-
] }, modified);
|
|
24780
|
+
this.tsParseModifiers(BindingElementModifiers, void 0, modified);
|
|
25281
24781
|
const accessibility = modified.accessibility;
|
|
25282
24782
|
const override = modified.override;
|
|
25283
24783
|
const readonly = modified.readonly;
|
|
@@ -25619,11 +25119,7 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
25619
25119
|
return super.parseStatementContent(flags, decorators);
|
|
25620
25120
|
}
|
|
25621
25121
|
parseAccessModifier() {
|
|
25622
|
-
return this.tsParseModifier(
|
|
25623
|
-
"public",
|
|
25624
|
-
"protected",
|
|
25625
|
-
"private"
|
|
25626
|
-
]);
|
|
25122
|
+
return this.tsParseModifier(AccessModifiers);
|
|
25627
25123
|
}
|
|
25628
25124
|
tsHasSomeModifiers(member, modifiers) {
|
|
25629
25125
|
return modifiers.some((modifier) => {
|
|
@@ -25635,27 +25131,21 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
25635
25131
|
return this.isContextual(102) && this.lookaheadCharCode() === 123;
|
|
25636
25132
|
}
|
|
25637
25133
|
parseClassMember(classBody, member, state) {
|
|
25638
|
-
|
|
25639
|
-
"declare",
|
|
25640
|
-
"private",
|
|
25641
|
-
"public",
|
|
25642
|
-
"protected",
|
|
25643
|
-
"override",
|
|
25644
|
-
"abstract",
|
|
25645
|
-
"readonly",
|
|
25646
|
-
"static"
|
|
25647
|
-
];
|
|
25648
|
-
this.tsParseModifiers({
|
|
25649
|
-
allowedModifiers: modifiers,
|
|
25650
|
-
disallowedModifiers: ["in", "out"],
|
|
25651
|
-
stopOnStartOfClassStaticBlock: true,
|
|
25652
|
-
errorTemplate: TSErrors.InvalidModifierOnTypeParameterPositions
|
|
25653
|
-
}, member);
|
|
25134
|
+
this.tsParseModifiers(ClassMemberModifiers, TSErrors.InvalidModifierOnTypeParameterPositions, member, true);
|
|
25654
25135
|
const callParseClassMemberWithIsStatic = () => {
|
|
25655
25136
|
if (this.tsIsStartOfStaticBlocks()) {
|
|
25656
25137
|
this.next();
|
|
25657
25138
|
this.next();
|
|
25658
|
-
if (this.tsHasSomeModifiers(member,
|
|
25139
|
+
if (this.tsHasSomeModifiers(member, [
|
|
25140
|
+
"declare",
|
|
25141
|
+
"private",
|
|
25142
|
+
"public",
|
|
25143
|
+
"protected",
|
|
25144
|
+
"override",
|
|
25145
|
+
"abstract",
|
|
25146
|
+
"readonly",
|
|
25147
|
+
"static"
|
|
25148
|
+
])) this.raise(TSErrors.StaticBlockCannotHaveModifier, this.state.curPosition());
|
|
25659
25149
|
super.parseClassStaticBlock(classBody, member);
|
|
25660
25150
|
} else this.parseClassMemberWithIsStatic(classBody, member, state, !!member.static);
|
|
25661
25151
|
};
|
|
@@ -25836,24 +25326,24 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
25836
25326
|
if (this.match(10)) node.returnType = this.tsParseTypeAnnotation();
|
|
25837
25327
|
return super.parseAsyncArrowFromCallExpression(node, call);
|
|
25838
25328
|
}
|
|
25839
|
-
parseMaybeAssign(refExpressionErrors,
|
|
25329
|
+
parseMaybeAssign(refExpressionErrors, isParenItem) {
|
|
25840
25330
|
let state;
|
|
25841
25331
|
let jsx;
|
|
25842
25332
|
let typeCast;
|
|
25843
25333
|
if (this.hasPlugin("jsx") && (this.match(138) || this.match(43))) {
|
|
25844
25334
|
state = this.state.clone();
|
|
25845
|
-
jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors,
|
|
25335
|
+
jsx = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, isParenItem), state);
|
|
25846
25336
|
if (!jsx.error) return jsx.node;
|
|
25847
25337
|
const { context } = this.state;
|
|
25848
25338
|
const currentContext = context[context.length - 1];
|
|
25849
25339
|
if (currentContext === types.j_oTag || currentContext === types.j_expr) context.pop();
|
|
25850
25340
|
}
|
|
25851
|
-
if (!jsx?.error && !this.match(43)) return super.parseMaybeAssign(refExpressionErrors,
|
|
25341
|
+
if (!jsx?.error && !this.match(43)) return super.parseMaybeAssign(refExpressionErrors, isParenItem);
|
|
25852
25342
|
if (!state || state === this.state) state = this.state.clone();
|
|
25853
25343
|
let typeParameters;
|
|
25854
25344
|
const arrow = this.tryParse((abort) => {
|
|
25855
25345
|
typeParameters = this.tsParseTypeParameters(this.tsParseConstModifier);
|
|
25856
|
-
const expr = super.parseMaybeAssign(refExpressionErrors,
|
|
25346
|
+
const expr = super.parseMaybeAssign(refExpressionErrors, isParenItem);
|
|
25857
25347
|
if (expr.type !== "ArrowFunctionExpression" || expr.extra?.parenthesized) abort();
|
|
25858
25348
|
if (typeParameters?.params.length !== 0) this.resetStartLocationFromNode(expr, typeParameters);
|
|
25859
25349
|
expr.typeParameters = typeParameters;
|
|
@@ -25869,7 +25359,7 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
25869
25359
|
}
|
|
25870
25360
|
if (!jsx) {
|
|
25871
25361
|
assert(!this.hasPlugin("jsx"));
|
|
25872
|
-
typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors,
|
|
25362
|
+
typeCast = this.tryParse(() => super.parseMaybeAssign(refExpressionErrors, isParenItem), state);
|
|
25873
25363
|
if (!typeCast.error) return typeCast.node;
|
|
25874
25364
|
}
|
|
25875
25365
|
if (jsx?.node) {
|
|
@@ -26151,7 +25641,7 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
26151
25641
|
}
|
|
26152
25642
|
parseExportSpecifier(node, isString, isInTypeExport, isMaybeTypeOnly) {
|
|
26153
25643
|
if (!isString && isMaybeTypeOnly) {
|
|
26154
|
-
this.
|
|
25644
|
+
this.parseTypeOnlyExportSpecifier(node, isInTypeExport);
|
|
26155
25645
|
return this.finishNode(node, "ExportSpecifier");
|
|
26156
25646
|
}
|
|
26157
25647
|
node.exportKind = "value";
|
|
@@ -26159,20 +25649,15 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
26159
25649
|
}
|
|
26160
25650
|
parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, bindingType) {
|
|
26161
25651
|
if (!importedIsString && isMaybeTypeOnly) {
|
|
26162
|
-
this.
|
|
25652
|
+
this.parseTypeOnlyImportSpecifier(specifier, isInTypeOnlyImport);
|
|
26163
25653
|
return this.finishNode(specifier, "ImportSpecifier");
|
|
26164
25654
|
}
|
|
26165
25655
|
specifier.importKind = "value";
|
|
26166
25656
|
return super.parseImportSpecifier(specifier, importedIsString, isInTypeOnlyImport, isMaybeTypeOnly, isInTypeOnlyImport ? 4098 : 4096);
|
|
26167
25657
|
}
|
|
26168
|
-
|
|
26169
|
-
|
|
26170
|
-
const rightOfAsKey = isImport ? "local" : "exported";
|
|
26171
|
-
let leftOfAs = node[leftOfAsKey];
|
|
26172
|
-
let rightOfAs;
|
|
25658
|
+
parseTypeOnlyImportSpecifier(node, isInTypeOnly) {
|
|
25659
|
+
let leftOfAs = node.imported;
|
|
26173
25660
|
let hasTypeSpecifier = false;
|
|
26174
|
-
let canParseAsKeyword = true;
|
|
26175
|
-
const loc = leftOfAs.start;
|
|
26176
25661
|
if (this.isContextual(89)) {
|
|
26177
25662
|
const firstAs = this.parseIdentifier();
|
|
26178
25663
|
if (this.isContextual(89)) {
|
|
@@ -26180,34 +25665,47 @@ const typescript = (superClass) => class TypeScriptParserMixin extends superClas
|
|
|
26180
25665
|
if (tokenIsKeywordOrIdentifier(this.state.type)) {
|
|
26181
25666
|
hasTypeSpecifier = true;
|
|
26182
25667
|
leftOfAs = firstAs;
|
|
26183
|
-
|
|
26184
|
-
|
|
26185
|
-
|
|
26186
|
-
|
|
26187
|
-
canParseAsKeyword = false;
|
|
26188
|
-
}
|
|
26189
|
-
} else if (tokenIsKeywordOrIdentifier(this.state.type)) {
|
|
26190
|
-
canParseAsKeyword = false;
|
|
26191
|
-
rightOfAs = isImport ? this.parseIdentifier() : this.parseModuleExportName();
|
|
26192
|
-
} else {
|
|
25668
|
+
node.local = this.parseIdentifier();
|
|
25669
|
+
} else node.local = secondAs;
|
|
25670
|
+
} else if (tokenIsKeywordOrIdentifier(this.state.type)) node.local = this.parseIdentifier();
|
|
25671
|
+
else {
|
|
26193
25672
|
hasTypeSpecifier = true;
|
|
26194
25673
|
leftOfAs = firstAs;
|
|
26195
25674
|
}
|
|
26196
25675
|
} else if (tokenIsKeywordOrIdentifier(this.state.type)) {
|
|
26197
25676
|
hasTypeSpecifier = true;
|
|
26198
|
-
|
|
26199
|
-
|
|
26200
|
-
|
|
26201
|
-
|
|
26202
|
-
|
|
26203
|
-
|
|
26204
|
-
node
|
|
26205
|
-
|
|
26206
|
-
|
|
26207
|
-
|
|
26208
|
-
|
|
26209
|
-
if (
|
|
26210
|
-
|
|
25677
|
+
leftOfAs = this.parseIdentifier(true);
|
|
25678
|
+
if (!this.isContextual(89)) this.checkReservedWord(leftOfAs.name, leftOfAs.start, true, true);
|
|
25679
|
+
}
|
|
25680
|
+
if (hasTypeSpecifier && isInTypeOnly) this.raise(TSErrors.TypeModifierIsUsedInTypeImports, node.imported);
|
|
25681
|
+
node.imported = leftOfAs;
|
|
25682
|
+
node.importKind = hasTypeSpecifier ? "type" : "value";
|
|
25683
|
+
this.checkIdentifier(node.local ?? (node.local = this.eatContextual(89) ? this.parseIdentifier() : this.cloneIdentifier(node.imported)), hasTypeSpecifier ? 4098 : 4096);
|
|
25684
|
+
}
|
|
25685
|
+
parseTypeOnlyExportSpecifier(node, isInTypeOnly) {
|
|
25686
|
+
const local = node.local;
|
|
25687
|
+
let hasTypeSpecifier = false;
|
|
25688
|
+
if (this.isContextual(89)) {
|
|
25689
|
+
const firstAs = this.parseIdentifier();
|
|
25690
|
+
if (this.isContextual(89)) {
|
|
25691
|
+
const secondAs = this.parseIdentifier();
|
|
25692
|
+
if (tokenIsKeywordOrIdentifier(this.state.type)) {
|
|
25693
|
+
hasTypeSpecifier = true;
|
|
25694
|
+
node.local = firstAs;
|
|
25695
|
+
node.exported = this.parseModuleExportName();
|
|
25696
|
+
} else node.exported = secondAs;
|
|
25697
|
+
} else if (tokenIsKeywordOrIdentifier(this.state.type)) node.exported = this.parseModuleExportName();
|
|
25698
|
+
else {
|
|
25699
|
+
hasTypeSpecifier = true;
|
|
25700
|
+
node.local = firstAs;
|
|
25701
|
+
}
|
|
25702
|
+
} else if (tokenIsKeywordOrIdentifier(this.state.type)) {
|
|
25703
|
+
hasTypeSpecifier = true;
|
|
25704
|
+
node.local = this.parseModuleExportName();
|
|
25705
|
+
}
|
|
25706
|
+
if (hasTypeSpecifier && isInTypeOnly) this.raise(TSErrors.TypeModifierIsUsedInTypeExports, local);
|
|
25707
|
+
node.exportKind = hasTypeSpecifier ? "type" : "value";
|
|
25708
|
+
node.exported ?? (node.exported = this.eatContextual(89) ? this.parseModuleExportName() : this.cloneIdentifier(node.local));
|
|
26211
25709
|
}
|
|
26212
25710
|
fillOptionalPropertiesForTSESLint(node) {
|
|
26213
25711
|
switch (node.type) {
|
|
@@ -26370,6 +25868,12 @@ function isUncomputedMemberExpressionChain(expression) {
|
|
|
26370
25868
|
if (expression.type !== "MemberExpression" || expression.computed) return false;
|
|
26371
25869
|
return isUncomputedMemberExpressionChain(expression.object);
|
|
26372
25870
|
}
|
|
25871
|
+
function buildModifiersMap(allowed, disallow = []) {
|
|
25872
|
+
const map = /* @__PURE__ */ new Map();
|
|
25873
|
+
for (const modifier of allowed) map.set(modifier, true);
|
|
25874
|
+
for (const modifier of disallow) map.set(modifier, false);
|
|
25875
|
+
return map;
|
|
25876
|
+
}
|
|
26373
25877
|
const PlaceholderErrors = ParseErrorEnum`placeholders`({
|
|
26374
25878
|
ClassNameIsRequired: "A class name is required.",
|
|
26375
25879
|
UnexpectedSpace: "Unexpected space in placeholder."
|
|
@@ -26500,12 +26004,7 @@ const placeholders = (superClass) => class PlaceholdersParserMixin extends super
|
|
|
26500
26004
|
if (node.specifiers?.length) return true;
|
|
26501
26005
|
return super.maybeParseExportDefaultSpecifier(node, maybeDefaultIdentifier);
|
|
26502
26006
|
}
|
|
26503
|
-
|
|
26504
|
-
const { specifiers } = node;
|
|
26505
|
-
if (specifiers?.length) node.specifiers = specifiers.filter((node) => node.exported.type === "Placeholder");
|
|
26506
|
-
super.checkExport(node);
|
|
26507
|
-
node.specifiers = specifiers;
|
|
26508
|
-
}
|
|
26007
|
+
checkNamedExport() {}
|
|
26509
26008
|
parseImport(node) {
|
|
26510
26009
|
const placeholder = this.parsePlaceholder("Identifier");
|
|
26511
26010
|
if (!placeholder) return super.parseImport(node);
|
|
@@ -26785,11 +26284,11 @@ var builtin_upper_default = [
|
|
|
26785
26284
|
var comma = ",".charCodeAt(0);
|
|
26786
26285
|
var semicolon = ";".charCodeAt(0);
|
|
26787
26286
|
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
26788
|
-
var intToChar = /* @__PURE__ */ new Uint8Array(64);
|
|
26287
|
+
var intToChar$1 = /* @__PURE__ */ new Uint8Array(64);
|
|
26789
26288
|
var charToInt = /* @__PURE__ */ new Uint8Array(128);
|
|
26790
26289
|
for (let i = 0; i < chars.length; i++) {
|
|
26791
26290
|
const c = chars.charCodeAt(i);
|
|
26792
|
-
intToChar[i] = c;
|
|
26291
|
+
intToChar$1[i] = c;
|
|
26793
26292
|
charToInt[c] = i;
|
|
26794
26293
|
}
|
|
26795
26294
|
function decodeInteger(reader) {
|
|
@@ -26811,7 +26310,7 @@ function encodeInteger(builder, num) {
|
|
|
26811
26310
|
let clamped = num & 31;
|
|
26812
26311
|
num >>>= 5;
|
|
26813
26312
|
if (num > 0) clamped |= 32;
|
|
26814
|
-
builder.write(intToChar[clamped]);
|
|
26313
|
+
builder.write(intToChar$1[clamped]);
|
|
26815
26314
|
} while (num > 0);
|
|
26816
26315
|
}
|
|
26817
26316
|
function encodeSign(num) {
|
|
@@ -26865,6 +26364,21 @@ var StringReader = class {
|
|
|
26865
26364
|
return idx === -1 ? buffer.length : idx;
|
|
26866
26365
|
}
|
|
26867
26366
|
};
|
|
26367
|
+
function encodeRangeMappings(decoded) {
|
|
26368
|
+
if (decoded.length === 0) return "";
|
|
26369
|
+
const writer = new StringWriter();
|
|
26370
|
+
for (let i = 0; i < decoded.length; i++) {
|
|
26371
|
+
const indices = decoded[i];
|
|
26372
|
+
if (i > 0) writer.write(semicolon);
|
|
26373
|
+
let index = 0;
|
|
26374
|
+
for (let j = 0; j < indices.length; j++) {
|
|
26375
|
+
const offset = indices[j];
|
|
26376
|
+
encodeInteger(writer, offset - index);
|
|
26377
|
+
index = offset;
|
|
26378
|
+
}
|
|
26379
|
+
}
|
|
26380
|
+
return writer.flush();
|
|
26381
|
+
}
|
|
26868
26382
|
function decode(mappings) {
|
|
26869
26383
|
const { length } = mappings;
|
|
26870
26384
|
const reader = new StringReader(mappings);
|
|
@@ -27271,7 +26785,7 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
27271
26785
|
return index;
|
|
27272
26786
|
}
|
|
27273
26787
|
//#endregion
|
|
27274
|
-
//#region ../../node_modules/.pnpm/@jridgewell+gen-mapping@0.
|
|
26788
|
+
//#region ../../node_modules/.pnpm/@jridgewell+gen-mapping@0.4.0-beta.0/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
|
|
27275
26789
|
var SetArray = class {
|
|
27276
26790
|
constructor() {
|
|
27277
26791
|
this._indexes = { __proto__: null };
|
|
@@ -27305,6 +26819,7 @@ var GenMapping = class {
|
|
|
27305
26819
|
this.file = file;
|
|
27306
26820
|
this.sourceRoot = sourceRoot;
|
|
27307
26821
|
this._ignoreList = new SetArray();
|
|
26822
|
+
this._rangeMappings = [];
|
|
27308
26823
|
}
|
|
27309
26824
|
};
|
|
27310
26825
|
function cast2(map) {
|
|
@@ -27318,9 +26833,23 @@ function setSourceContent(map, source, content) {
|
|
|
27318
26833
|
const index = put(sources, source);
|
|
27319
26834
|
sourcesContent[index] = content;
|
|
27320
26835
|
}
|
|
26836
|
+
function setRangeSegment(map, line, column, add = true) {
|
|
26837
|
+
const { _mappings: mappings, _rangeMappings: rangeMappings } = cast2(map);
|
|
26838
|
+
const index = getSegmentIndex(getLine(mappings, line), column) - 1;
|
|
26839
|
+
const ranges = getLine(rangeMappings, line);
|
|
26840
|
+
const i = getRangeIndex(ranges, index);
|
|
26841
|
+
if (add) {
|
|
26842
|
+
if (i >= 0) return;
|
|
26843
|
+
insert(ranges, ~i, index);
|
|
26844
|
+
} else {
|
|
26845
|
+
if (i < 0) return;
|
|
26846
|
+
ranges.splice(i, 1);
|
|
26847
|
+
}
|
|
26848
|
+
}
|
|
27321
26849
|
function toDecodedMap(map) {
|
|
27322
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: ignoreList } = cast2(map);
|
|
26850
|
+
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _ignoreList: { array: ignoreList }, _rangeMappings: rangeMappings } = cast2(map);
|
|
27323
26851
|
removeEmptyFinalLines(mappings);
|
|
26852
|
+
removeEmptyFinalLines(rangeMappings);
|
|
27324
26853
|
return {
|
|
27325
26854
|
version: 3,
|
|
27326
26855
|
file: map.file || void 0,
|
|
@@ -27329,16 +26858,20 @@ function toDecodedMap(map) {
|
|
|
27329
26858
|
sources: sources.array,
|
|
27330
26859
|
sourcesContent,
|
|
27331
26860
|
mappings,
|
|
27332
|
-
ignoreList: ignoreList.
|
|
26861
|
+
ignoreList: ignoreList.length > 0 ? ignoreList : void 0,
|
|
26862
|
+
rangeMappings: rangeMappings.length > 0 ? rangeMappings : void 0
|
|
27333
26863
|
};
|
|
27334
26864
|
}
|
|
27335
26865
|
function toEncodedMap(map) {
|
|
27336
26866
|
const decoded = toDecodedMap(map);
|
|
27337
|
-
|
|
26867
|
+
const encoded = decoded;
|
|
26868
|
+
encoded.mappings = encode(decoded.mappings);
|
|
26869
|
+
if (decoded.rangeMappings) encoded.rangeMappings = encodeRangeMappings(decoded.rangeMappings);
|
|
26870
|
+
return encoded;
|
|
27338
26871
|
}
|
|
27339
26872
|
function allMappings(map) {
|
|
27340
26873
|
const out = [];
|
|
27341
|
-
const { _mappings: mappings, _sources: sources, _names: names } = cast2(map);
|
|
26874
|
+
const { _mappings: mappings, _sources: { array: sources }, _names: { array: names } } = cast2(map);
|
|
27342
26875
|
for (let i = 0; i < mappings.length; i++) {
|
|
27343
26876
|
const line = mappings[i];
|
|
27344
26877
|
for (let j = 0; j < line.length; j++) {
|
|
@@ -27351,12 +26884,12 @@ function allMappings(map) {
|
|
|
27351
26884
|
let original = void 0;
|
|
27352
26885
|
let name = void 0;
|
|
27353
26886
|
if (seg.length !== 1) {
|
|
27354
|
-
source = sources
|
|
26887
|
+
source = sources[seg[SOURCES_INDEX]];
|
|
27355
26888
|
original = {
|
|
27356
26889
|
line: seg[SOURCE_LINE] + 1,
|
|
27357
26890
|
column: seg[SOURCE_COLUMN]
|
|
27358
26891
|
};
|
|
27359
|
-
if (seg.length === 5) name = names
|
|
26892
|
+
if (seg.length === 5) name = names[seg[NAMES_INDEX]];
|
|
27360
26893
|
}
|
|
27361
26894
|
out.push({
|
|
27362
26895
|
generated,
|
|
@@ -27369,18 +26902,21 @@ function allMappings(map) {
|
|
|
27369
26902
|
return out;
|
|
27370
26903
|
}
|
|
27371
26904
|
function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
|
|
27372
|
-
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = cast2(map);
|
|
27373
|
-
const line =
|
|
27374
|
-
const index =
|
|
26905
|
+
const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names, _rangeMappings: rangeMappings } = cast2(map);
|
|
26906
|
+
const line = getLine(mappings, genLine);
|
|
26907
|
+
const index = getSegmentIndex(line, genColumn);
|
|
27375
26908
|
if (!source) {
|
|
27376
|
-
if (skipable && skipSourceless(line, index)) return;
|
|
27377
|
-
|
|
26909
|
+
if (skipable && skipSourceless(line, index) && !isRangeOpen(mappings, rangeMappings, genLine, index - 1)) return;
|
|
26910
|
+
if (index < line.length) adjustRangeMappings(rangeMappings, genLine, index);
|
|
26911
|
+
insert(line, index, [genColumn]);
|
|
26912
|
+
return;
|
|
27378
26913
|
}
|
|
27379
26914
|
const sourcesIndex = put(sources, source);
|
|
27380
26915
|
const namesIndex = name ? put(names, name) : NO_NAME;
|
|
27381
26916
|
if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
|
|
27382
|
-
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) return;
|
|
27383
|
-
|
|
26917
|
+
if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) && !isRangeOpen(mappings, rangeMappings, genLine, index - 1)) return;
|
|
26918
|
+
if (index < line.length) adjustRangeMappings(rangeMappings, genLine, index);
|
|
26919
|
+
insert(line, index, name ? [
|
|
27384
26920
|
genColumn,
|
|
27385
26921
|
sourcesIndex,
|
|
27386
26922
|
sourceLine,
|
|
@@ -27393,24 +26929,53 @@ function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLin
|
|
|
27393
26929
|
sourceColumn
|
|
27394
26930
|
]);
|
|
27395
26931
|
}
|
|
27396
|
-
function
|
|
26932
|
+
function getLine(arr, index) {
|
|
27397
26933
|
for (let i = arr.length; i <= index; i++) arr[i] = [];
|
|
27398
26934
|
return arr[index];
|
|
27399
26935
|
}
|
|
27400
|
-
function
|
|
27401
|
-
let
|
|
27402
|
-
|
|
27403
|
-
|
|
26936
|
+
function getSegmentIndex(line, genColumn) {
|
|
26937
|
+
for (let i = line.length; i > 0; i--) if (genColumn >= line[i - 1][COLUMN]) return i;
|
|
26938
|
+
return 0;
|
|
26939
|
+
}
|
|
26940
|
+
function isRangeOpen(mappings, rangeMappings, genLine, index) {
|
|
26941
|
+
if (rangeMappings.length === 0) return false;
|
|
26942
|
+
if (index < 0) while (--genLine >= 0) {
|
|
26943
|
+
const segments = mappings[genLine];
|
|
26944
|
+
if (segments.length > 0) {
|
|
26945
|
+
index = segments.length - 1;
|
|
26946
|
+
break;
|
|
26947
|
+
}
|
|
26948
|
+
}
|
|
26949
|
+
if (genLine < 0) return false;
|
|
26950
|
+
if (genLine >= rangeMappings.length) return false;
|
|
26951
|
+
const ranges = rangeMappings[genLine];
|
|
26952
|
+
return getRangeIndex(ranges, index) >= 0;
|
|
27404
26953
|
}
|
|
27405
26954
|
function insert(array, index, value) {
|
|
27406
26955
|
for (let i = array.length; i > index; i--) array[i] = array[i - 1];
|
|
27407
26956
|
array[index] = value;
|
|
27408
26957
|
}
|
|
27409
26958
|
function removeEmptyFinalLines(mappings) {
|
|
27410
|
-
|
|
27411
|
-
|
|
27412
|
-
|
|
27413
|
-
|
|
26959
|
+
for (let i = mappings.length - 1; i >= 0; i--) {
|
|
26960
|
+
if (mappings[i].length > 0) break;
|
|
26961
|
+
mappings.pop();
|
|
26962
|
+
}
|
|
26963
|
+
}
|
|
26964
|
+
function getRangeIndex(ranges, index) {
|
|
26965
|
+
for (let i = ranges.length; i > 0; i--) {
|
|
26966
|
+
const range = ranges[i - 1];
|
|
26967
|
+
if (range === index) return i - 1;
|
|
26968
|
+
if (range < index) return ~i;
|
|
26969
|
+
}
|
|
26970
|
+
return -1;
|
|
26971
|
+
}
|
|
26972
|
+
function adjustRangeMappings(rangeMappings, genLine, index) {
|
|
26973
|
+
if (genLine >= rangeMappings.length) return;
|
|
26974
|
+
const line = rangeMappings[genLine];
|
|
26975
|
+
for (let i = line.length - 1; i >= 0; i--) {
|
|
26976
|
+
if (line[i] < index) break;
|
|
26977
|
+
line[i]++;
|
|
26978
|
+
}
|
|
27414
26979
|
}
|
|
27415
26980
|
function skipSourceless(line, index) {
|
|
27416
26981
|
if (index === 0) return true;
|
|
@@ -27423,9 +26988,10 @@ function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIn
|
|
|
27423
26988
|
return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
|
|
27424
26989
|
}
|
|
27425
26990
|
function addMappingInternal(skipable, map, mapping) {
|
|
27426
|
-
const { generated, source, original, name, content } = mapping;
|
|
27427
|
-
if (!source)
|
|
27428
|
-
|
|
26991
|
+
const { generated, source, original, name, content, isRange } = mapping;
|
|
26992
|
+
if (!source) addSegmentInternal(skipable, map, generated.line - 1, generated.column, null, null, null, null, null);
|
|
26993
|
+
else addSegmentInternal(skipable, map, generated.line - 1, generated.column, source, original.line - 1, original.column, name, content);
|
|
26994
|
+
if (isRange) setRangeSegment(map, generated.line - 1, generated.column);
|
|
27429
26995
|
}
|
|
27430
26996
|
//#endregion
|
|
27431
26997
|
//#region ../../node_modules/.pnpm/jsesc@3.1.0/node_modules/jsesc/jsesc.js
|
|
@@ -27634,7 +27200,7 @@ var require_jsesc = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exp
|
|
|
27634
27200
|
module.exports = jsesc;
|
|
27635
27201
|
}));
|
|
27636
27202
|
//#endregion
|
|
27637
|
-
//#region ../../node_modules/.pnpm/@babel+generator@8.0.
|
|
27203
|
+
//#region ../../node_modules/.pnpm/@babel+generator@8.0.5/node_modules/@babel/generator/lib/index.js
|
|
27638
27204
|
var import_jsesc = /* @__PURE__ */ require_rolldown_runtime.__toESM(require_jsesc(), 1);
|
|
27639
27205
|
var SourceMap$1 = class {
|
|
27640
27206
|
constructor(opts, code) {
|
|
@@ -27657,10 +27223,14 @@ var SourceMap$1 = class {
|
|
|
27657
27223
|
else if (typeof code === "object") for (const sourceFileName of Object.keys(code)) setSourceContent(map, sourceFileName.replace(/\\/g, "/"), code[sourceFileName]);
|
|
27658
27224
|
}
|
|
27659
27225
|
get() {
|
|
27660
|
-
|
|
27226
|
+
const encoded = toEncodedMap(this._map);
|
|
27227
|
+
encoded.ignoreList ?? (encoded.ignoreList = []);
|
|
27228
|
+
return encoded;
|
|
27661
27229
|
}
|
|
27662
27230
|
getDecoded() {
|
|
27663
|
-
|
|
27231
|
+
const decoded = toDecodedMap(this._map);
|
|
27232
|
+
decoded.ignoreList ?? (decoded.ignoreList = []);
|
|
27233
|
+
return decoded;
|
|
27664
27234
|
}
|
|
27665
27235
|
getRawMappings() {
|
|
27666
27236
|
return this._rawMappings || (this._rawMappings = allMappings(this._map));
|
|
@@ -30847,6 +30417,19 @@ function newCalleeNeedsParens(node) {
|
|
|
30847
30417
|
case "TaggedTemplateExpression":
|
|
30848
30418
|
current = current.tag;
|
|
30849
30419
|
break;
|
|
30420
|
+
case "TSInstantiationExpression":
|
|
30421
|
+
case "TSNonNullExpression":
|
|
30422
|
+
current = current.expression;
|
|
30423
|
+
break;
|
|
30424
|
+
default: return false;
|
|
30425
|
+
}
|
|
30426
|
+
}
|
|
30427
|
+
function templateTagNeedsParens(node) {
|
|
30428
|
+
let current = node;
|
|
30429
|
+
while (true) switch (current.type) {
|
|
30430
|
+
case "OptionalCallExpression":
|
|
30431
|
+
case "OptionalMemberExpression": return true;
|
|
30432
|
+
case "TSInstantiationExpression":
|
|
30850
30433
|
case "TSNonNullExpression":
|
|
30851
30434
|
current = current.expression;
|
|
30852
30435
|
break;
|
|
@@ -30858,6 +30441,9 @@ function parentNeedsParens(node, parent, parentId) {
|
|
|
30858
30441
|
case 113:
|
|
30859
30442
|
if (parent.callee === node) return newCalleeNeedsParens(node);
|
|
30860
30443
|
break;
|
|
30444
|
+
case 220:
|
|
30445
|
+
if (parent.tag === node) return templateTagNeedsParens(node);
|
|
30446
|
+
break;
|
|
30861
30447
|
case 43: return !isDecoratorMemberExpression(node) && !(node.type === "CallExpression" && isDecoratorMemberExpression(node.callee)) && node.type !== "ParenthesizedExpression";
|
|
30862
30448
|
}
|
|
30863
30449
|
return false;
|
|
@@ -32033,7 +31619,7 @@ const index = Object.assign(smart.bind(void 0), {
|
|
|
32033
31619
|
ast: smart.ast
|
|
32034
31620
|
});
|
|
32035
31621
|
//#endregion
|
|
32036
|
-
//#region ../../node_modules/.pnpm/@babel+traverse@8.0.
|
|
31622
|
+
//#region ../../node_modules/.pnpm/@babel+traverse@8.0.5/node_modules/@babel/traverse/lib/index.js
|
|
32037
31623
|
const virtualTypes = /*#__PURE__*/ Object.defineProperty({
|
|
32038
31624
|
__proto__: null,
|
|
32039
31625
|
BindingIdentifier: ["Identifier"],
|
|
@@ -32329,7 +31915,7 @@ function verify$1(visitor) {
|
|
|
32329
31915
|
for (const nodeType of Object.keys(visitor)) {
|
|
32330
31916
|
if (nodeType === "enter" || nodeType === "exit") validateVisitorMethods(nodeType, visitor[nodeType]);
|
|
32331
31917
|
if (shouldIgnoreKey(nodeType)) continue;
|
|
32332
|
-
if (!TYPES.includes(nodeType)) throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse 8.0.
|
|
31918
|
+
if (!TYPES.includes(nodeType)) throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse 8.0.5`);
|
|
32333
31919
|
const visitors = visitor[nodeType];
|
|
32334
31920
|
if (typeof visitors === "object") for (const visitorKey of Object.keys(visitors)) if (visitorKey === "enter" || visitorKey === "exit") validateVisitorMethods(`${nodeType}.${visitorKey}`, visitors[visitorKey]);
|
|
32335
31921
|
else throw new Error(`You passed \`traverse()\` a visitor object with the property ${nodeType} that has the invalid property ${visitorKey}`);
|
|
@@ -33720,8 +33306,8 @@ const hooks = [
|
|
|
33720
33306
|
}
|
|
33721
33307
|
},
|
|
33722
33308
|
function(self, parent) {
|
|
33723
|
-
if (parent.isSequenceExpression() && parent.node.expressions.length ===
|
|
33724
|
-
parent.replaceWith(parent.node.expressions[0]);
|
|
33309
|
+
if (parent.isSequenceExpression() && parent.node.expressions.length === 2) {
|
|
33310
|
+
parent.replaceWith(parent.node.expressions[self.key === 0 ? 1 : 0]);
|
|
33725
33311
|
return true;
|
|
33726
33312
|
}
|
|
33727
33313
|
},
|
|
@@ -35171,23 +34757,17 @@ function getNextSibling() {
|
|
|
35171
34757
|
return this.getSibling(this.key + 1);
|
|
35172
34758
|
}
|
|
35173
34759
|
function getAllNextSiblings() {
|
|
35174
|
-
|
|
35175
|
-
|
|
35176
|
-
const siblings = [];
|
|
35177
|
-
|
|
35178
|
-
siblings.push(sibling);
|
|
35179
|
-
sibling = this.getSibling(++_key);
|
|
35180
|
-
}
|
|
34760
|
+
const _key = this.key;
|
|
34761
|
+
if (!Number.isInteger(_key)) return [];
|
|
34762
|
+
const siblings = [], containerLength = this.container.length;
|
|
34763
|
+
for (let key = _key + 1; key < containerLength; key++) siblings.push(this.getSibling(key));
|
|
35181
34764
|
return siblings;
|
|
35182
34765
|
}
|
|
35183
34766
|
function getAllPrevSiblings() {
|
|
35184
|
-
|
|
35185
|
-
|
|
34767
|
+
const _key = this.key;
|
|
34768
|
+
if (!Number.isInteger(_key)) return [];
|
|
35186
34769
|
const siblings = [];
|
|
35187
|
-
|
|
35188
|
-
siblings.push(sibling);
|
|
35189
|
-
sibling = this.getSibling(--_key);
|
|
35190
|
-
}
|
|
34770
|
+
for (let key = _key - 1; key >= 0; key--) siblings.push(this.getSibling(key));
|
|
35191
34771
|
return siblings;
|
|
35192
34772
|
}
|
|
35193
34773
|
function get(key, context = true) {
|
|
@@ -35790,7 +35370,7 @@ function babelParse(code, opts = {}) {
|
|
|
35790
35370
|
return result;
|
|
35791
35371
|
}
|
|
35792
35372
|
//#endregion
|
|
35793
|
-
//#region ../../node_modules/.pnpm/magic-string@1.
|
|
35373
|
+
//#region ../../node_modules/.pnpm/magic-string@1.4.1/node_modules/magic-string/dist/index.mjs
|
|
35794
35374
|
var BitSet = class BitSet {
|
|
35795
35375
|
constructor(arg) {
|
|
35796
35376
|
this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
|
|
@@ -35901,8 +35481,10 @@ var Chunk = class Chunk {
|
|
|
35901
35481
|
if (this.outro.length) return true;
|
|
35902
35482
|
const trimmed = this.content.replace(rx, "");
|
|
35903
35483
|
if (trimmed.length) {
|
|
35904
|
-
if (trimmed !== this.content)
|
|
35905
|
-
|
|
35484
|
+
if (trimmed !== this.content) {
|
|
35485
|
+
if (this.edited) this.edit(trimmed, this.storeName, true);
|
|
35486
|
+
else this.split(this.start + trimmed.length).edit("", void 0, true);
|
|
35487
|
+
}
|
|
35906
35488
|
return true;
|
|
35907
35489
|
} else {
|
|
35908
35490
|
this.edit("", void 0, true);
|
|
@@ -35915,10 +35497,12 @@ var Chunk = class Chunk {
|
|
|
35915
35497
|
if (this.intro.length) return true;
|
|
35916
35498
|
const trimmed = this.content.replace(rx, "");
|
|
35917
35499
|
if (trimmed.length) {
|
|
35918
|
-
if (trimmed !== this.content)
|
|
35919
|
-
|
|
35920
|
-
|
|
35921
|
-
|
|
35500
|
+
if (trimmed !== this.content) {
|
|
35501
|
+
if (this.edited) this.edit(trimmed, this.storeName, true);
|
|
35502
|
+
else {
|
|
35503
|
+
this.split(this.end - trimmed.length);
|
|
35504
|
+
this.edit("", void 0, true);
|
|
35505
|
+
}
|
|
35922
35506
|
}
|
|
35923
35507
|
return true;
|
|
35924
35508
|
} else {
|
|
@@ -35941,12 +35525,14 @@ var MagicStringError = class extends Error {
|
|
|
35941
35525
|
}
|
|
35942
35526
|
};
|
|
35943
35527
|
function getBtoa() {
|
|
35528
|
+
/* v8 ignore next -- environment fallback, unreachable when `btoa` is present */
|
|
35944
35529
|
if (typeof globalThis !== "undefined" && typeof globalThis.btoa === "function") return (str) => globalThis.btoa(unescape(encodeURIComponent(str)));
|
|
35945
35530
|
const buffer = globalThis["Buffer"];
|
|
35946
35531
|
if (buffer) return (str) => buffer.from(str, "utf-8").toString("base64");
|
|
35947
35532
|
return () => {
|
|
35948
35533
|
throw new MagicStringError("unsupported environment: `btoa` or `Buffer` is required");
|
|
35949
35534
|
};
|
|
35535
|
+
/* v8 ignore stop */
|
|
35950
35536
|
}
|
|
35951
35537
|
const btoa = /* #__PURE__ */ getBtoa();
|
|
35952
35538
|
var SourceMap = class {
|
|
@@ -35956,9 +35542,17 @@ var SourceMap = class {
|
|
|
35956
35542
|
this.sources = properties.sources;
|
|
35957
35543
|
this.sourcesContent = properties.sourcesContent;
|
|
35958
35544
|
this.names = properties.names;
|
|
35959
|
-
this.mappings = encode(properties.mappings);
|
|
35545
|
+
this.mappings = typeof properties.mappings === "string" ? properties.mappings : encode(properties.mappings);
|
|
35960
35546
|
if (typeof properties.x_google_ignoreList !== "undefined") this.x_google_ignoreList = properties.x_google_ignoreList;
|
|
35961
35547
|
if (typeof properties.debugId !== "undefined") this.debugId = properties.debugId;
|
|
35548
|
+
if (typeof properties.rangeMappings !== "undefined") {
|
|
35549
|
+
let shouldOutputRangeMapping = false;
|
|
35550
|
+
for (const line of properties.rangeMappings) if (line.length !== 0) {
|
|
35551
|
+
shouldOutputRangeMapping = true;
|
|
35552
|
+
break;
|
|
35553
|
+
}
|
|
35554
|
+
if (shouldOutputRangeMapping) this.rangeMappings = encodeRangeMappings(properties.rangeMappings);
|
|
35555
|
+
}
|
|
35962
35556
|
}
|
|
35963
35557
|
/**
|
|
35964
35558
|
* Returns the equivalent of `JSON.stringify(map)`
|
|
@@ -35975,12 +35569,8 @@ var SourceMap = class {
|
|
|
35975
35569
|
}
|
|
35976
35570
|
};
|
|
35977
35571
|
function getLocator(source) {
|
|
35978
|
-
const
|
|
35979
|
-
|
|
35980
|
-
for (let i = 0, pos = 0; i < originalLines.length; i++) {
|
|
35981
|
-
lineOffsets.push(pos);
|
|
35982
|
-
pos += originalLines[i].length + 1;
|
|
35983
|
-
}
|
|
35572
|
+
const lineOffsets = [0];
|
|
35573
|
+
for (let i = source.indexOf("\n"); i !== -1; i = source.indexOf("\n", i + 1)) lineOffsets.push(i + 1);
|
|
35984
35574
|
return function locate(index) {
|
|
35985
35575
|
let i = 0;
|
|
35986
35576
|
let j = lineOffsets.length;
|
|
@@ -36026,15 +35616,120 @@ const toString = Object.prototype.toString;
|
|
|
36026
35616
|
function isObject(thing) {
|
|
36027
35617
|
return toString.call(thing) === "[object Object]";
|
|
36028
35618
|
}
|
|
36029
|
-
const
|
|
35619
|
+
const BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
35620
|
+
const intToChar = /* #__PURE__ */ (() => {
|
|
35621
|
+
const chars = /* @__PURE__ */ new Uint8Array(64);
|
|
35622
|
+
for (let i = 0; i < 64; i++) chars[i] = BASE64_CHARS.charCodeAt(i);
|
|
35623
|
+
return chars;
|
|
35624
|
+
})();
|
|
35625
|
+
const COMMA = 44;
|
|
35626
|
+
const SEMICOLON = 59;
|
|
35627
|
+
const BUFFER_SIZE = 16384;
|
|
35628
|
+
const FLUSH_THRESHOLD = 16348;
|
|
35629
|
+
const scratch = /* #__PURE__ */ new Uint8Array(BUFFER_SIZE);
|
|
35630
|
+
function writeVlq(pos, num) {
|
|
35631
|
+
num = num < 0 ? -num << 1 | 1 : num << 1;
|
|
35632
|
+
do {
|
|
35633
|
+
let clamped = num & 31;
|
|
35634
|
+
num >>>= 5;
|
|
35635
|
+
if (num > 0) clamped |= 32;
|
|
35636
|
+
scratch[pos++] = intToChar[clamped];
|
|
35637
|
+
} while (num > 0);
|
|
35638
|
+
return pos;
|
|
35639
|
+
}
|
|
35640
|
+
const decoder = /* #__PURE__ */ new TextDecoder();
|
|
35641
|
+
var MappingsEncoder = class {
|
|
35642
|
+
constructor() {
|
|
35643
|
+
this.out = "";
|
|
35644
|
+
this.pos = 0;
|
|
35645
|
+
this.lines = [];
|
|
35646
|
+
this.buffered = 0;
|
|
35647
|
+
this.needsComma = false;
|
|
35648
|
+
this.prevGenColumn = 0;
|
|
35649
|
+
this.prevSourceIndex = 0;
|
|
35650
|
+
this.prevSourceLine = 0;
|
|
35651
|
+
this.prevSourceColumn = 0;
|
|
35652
|
+
this.prevNameIndex = 0;
|
|
35653
|
+
}
|
|
35654
|
+
endLine(segments) {
|
|
35655
|
+
this.lines.push(segments);
|
|
35656
|
+
this.buffered += segments.length + 1;
|
|
35657
|
+
if (this.buffered >= 4096) this.drain(null);
|
|
35658
|
+
}
|
|
35659
|
+
segments(segments) {
|
|
35660
|
+
this.drain(segments);
|
|
35661
|
+
}
|
|
35662
|
+
finish(segments) {
|
|
35663
|
+
this.drain(segments);
|
|
35664
|
+
this.flush();
|
|
35665
|
+
return this.out;
|
|
35666
|
+
}
|
|
35667
|
+
drain(trailing) {
|
|
35668
|
+
const lines = this.lines;
|
|
35669
|
+
const lineCount = lines.length;
|
|
35670
|
+
for (let l = 0; l <= lineCount; l++) {
|
|
35671
|
+
const line = l < lineCount ? lines[l] : trailing;
|
|
35672
|
+
if (line === null) break;
|
|
35673
|
+
for (let i = 0; i < line.length; i++) {
|
|
35674
|
+
if (this.pos > FLUSH_THRESHOLD) this.flush();
|
|
35675
|
+
const segment = line[i];
|
|
35676
|
+
if (this.needsComma) scratch[this.pos++] = COMMA;
|
|
35677
|
+
this.needsComma = true;
|
|
35678
|
+
this.pos = writeVlq(this.pos, segment[0] - this.prevGenColumn);
|
|
35679
|
+
this.prevGenColumn = segment[0];
|
|
35680
|
+
this.pos = writeVlq(this.pos, segment[1] - this.prevSourceIndex);
|
|
35681
|
+
this.prevSourceIndex = segment[1];
|
|
35682
|
+
this.pos = writeVlq(this.pos, segment[2] - this.prevSourceLine);
|
|
35683
|
+
this.prevSourceLine = segment[2];
|
|
35684
|
+
this.pos = writeVlq(this.pos, segment[3] - this.prevSourceColumn);
|
|
35685
|
+
this.prevSourceColumn = segment[3];
|
|
35686
|
+
if (segment.length === 5) {
|
|
35687
|
+
this.pos = writeVlq(this.pos, segment[4] - this.prevNameIndex);
|
|
35688
|
+
this.prevNameIndex = segment[4];
|
|
35689
|
+
}
|
|
35690
|
+
}
|
|
35691
|
+
if (l < lineCount) {
|
|
35692
|
+
if (this.pos > FLUSH_THRESHOLD) this.flush();
|
|
35693
|
+
scratch[this.pos++] = SEMICOLON;
|
|
35694
|
+
this.needsComma = false;
|
|
35695
|
+
this.prevGenColumn = 0;
|
|
35696
|
+
}
|
|
35697
|
+
}
|
|
35698
|
+
lines.length = 0;
|
|
35699
|
+
this.buffered = 0;
|
|
35700
|
+
this.flush();
|
|
35701
|
+
}
|
|
35702
|
+
flush() {
|
|
35703
|
+
this.out += decoder.decode(scratch.subarray(0, this.pos));
|
|
35704
|
+
this.pos = 0;
|
|
35705
|
+
}
|
|
35706
|
+
};
|
|
35707
|
+
const NEWLINE_CHAR$1 = 10;
|
|
35708
|
+
function isWordCode(code) {
|
|
35709
|
+
return code >= 97 && code <= 122 || code >= 65 && code <= 90 || code >= 48 && code <= 57 || code === 95;
|
|
35710
|
+
}
|
|
36030
35711
|
var Mappings = class {
|
|
36031
|
-
constructor(hires) {
|
|
35712
|
+
constructor(hires, encoder = null) {
|
|
36032
35713
|
this.hires = hires;
|
|
36033
35714
|
this.generatedCodeLine = 0;
|
|
36034
35715
|
this.generatedCodeColumn = 0;
|
|
36035
35716
|
this.raw = [];
|
|
36036
35717
|
this.rawSegments = this.raw[this.generatedCodeLine] = [];
|
|
36037
|
-
this.
|
|
35718
|
+
this.rawRangeMappings = [];
|
|
35719
|
+
this.rawRangeMappingsIndices = this.rawRangeMappings[this.generatedCodeLine] = [];
|
|
35720
|
+
this.encoder = encoder;
|
|
35721
|
+
}
|
|
35722
|
+
nextLine() {
|
|
35723
|
+
if (this.encoder === null) {
|
|
35724
|
+
this.generatedCodeLine += 1;
|
|
35725
|
+
this.raw[this.generatedCodeLine] = this.rawSegments = [];
|
|
35726
|
+
} else {
|
|
35727
|
+
this.encoder.endLine(this.rawSegments);
|
|
35728
|
+
this.rawSegments = [];
|
|
35729
|
+
this.generatedCodeLine += 1;
|
|
35730
|
+
}
|
|
35731
|
+
this.generatedCodeColumn = 0;
|
|
35732
|
+
this.rawRangeMappings[this.generatedCodeLine] = this.rawRangeMappingsIndices = [];
|
|
36038
35733
|
}
|
|
36039
35734
|
addEdit(sourceIndex, content, loc, nameIndex) {
|
|
36040
35735
|
if (content.length) {
|
|
@@ -36050,9 +35745,7 @@ var Mappings = class {
|
|
|
36050
35745
|
];
|
|
36051
35746
|
if (nameIndex >= 0) segment.push(nameIndex);
|
|
36052
35747
|
this.rawSegments.push(segment);
|
|
36053
|
-
this.
|
|
36054
|
-
this.raw[this.generatedCodeLine] = this.rawSegments = [];
|
|
36055
|
-
this.generatedCodeColumn = 0;
|
|
35748
|
+
this.nextLine();
|
|
36056
35749
|
previousContentLineEnd = contentLineEnd;
|
|
36057
35750
|
contentLineEnd = content.indexOf("\n", contentLineEnd + 1);
|
|
36058
35751
|
}
|
|
@@ -36065,63 +35758,122 @@ var Mappings = class {
|
|
|
36065
35758
|
if (nameIndex >= 0) segment.push(nameIndex);
|
|
36066
35759
|
this.rawSegments.push(segment);
|
|
36067
35760
|
this.advance(content.slice(previousContentLineEnd + 1));
|
|
36068
|
-
} else if (this.pending) {
|
|
36069
|
-
this.rawSegments.push(this.pending);
|
|
36070
|
-
this.advance(content);
|
|
36071
35761
|
}
|
|
36072
|
-
this.pending = null;
|
|
36073
35762
|
}
|
|
36074
35763
|
addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {
|
|
36075
|
-
|
|
36076
|
-
let
|
|
36077
|
-
|
|
36078
|
-
|
|
36079
|
-
|
|
36080
|
-
|
|
36081
|
-
|
|
36082
|
-
|
|
36083
|
-
|
|
36084
|
-
|
|
36085
|
-
|
|
36086
|
-
|
|
36087
|
-
|
|
36088
|
-
|
|
36089
|
-
|
|
35764
|
+
const end = chunk.end;
|
|
35765
|
+
let i = chunk.start;
|
|
35766
|
+
if (this.hires) {
|
|
35767
|
+
const boundary = this.hires === "boundary";
|
|
35768
|
+
const experimentalRange = this.hires === "experimental-range";
|
|
35769
|
+
const encoder = experimentalRange ? null : this.encoder;
|
|
35770
|
+
let charInHiresBoundary = false;
|
|
35771
|
+
while (i < end) {
|
|
35772
|
+
if (encoder !== null && this.rawSegments.length >= 4096) {
|
|
35773
|
+
encoder.segments(this.rawSegments);
|
|
35774
|
+
this.rawSegments.length = 0;
|
|
35775
|
+
}
|
|
35776
|
+
if (experimentalRange && i + 1 >= end) this.rawSegments.push([
|
|
35777
|
+
this.generatedCodeColumn,
|
|
35778
|
+
sourceIndex,
|
|
35779
|
+
loc.line,
|
|
35780
|
+
loc.column
|
|
35781
|
+
]);
|
|
35782
|
+
const code = original.charCodeAt(i);
|
|
35783
|
+
if (code === NEWLINE_CHAR$1) {
|
|
35784
|
+
loc.line += 1;
|
|
35785
|
+
loc.column = 0;
|
|
35786
|
+
this.nextLine();
|
|
35787
|
+
charInHiresBoundary = false;
|
|
35788
|
+
} else {
|
|
35789
|
+
if (boundary) {
|
|
35790
|
+
if (isWordCode(code)) {
|
|
35791
|
+
if (!charInHiresBoundary) {
|
|
35792
|
+
this.rawSegments.push([
|
|
35793
|
+
this.generatedCodeColumn,
|
|
35794
|
+
sourceIndex,
|
|
35795
|
+
loc.line,
|
|
35796
|
+
loc.column
|
|
35797
|
+
]);
|
|
35798
|
+
charInHiresBoundary = true;
|
|
35799
|
+
}
|
|
35800
|
+
} else {
|
|
35801
|
+
this.rawSegments.push([
|
|
35802
|
+
this.generatedCodeColumn,
|
|
35803
|
+
sourceIndex,
|
|
35804
|
+
loc.line,
|
|
35805
|
+
loc.column
|
|
35806
|
+
]);
|
|
35807
|
+
charInHiresBoundary = false;
|
|
35808
|
+
}
|
|
35809
|
+
} else if (experimentalRange) {
|
|
35810
|
+
if (i === chunk.start) {
|
|
35811
|
+
this.rawRangeMappingsIndices.push(this.rawSegments.length);
|
|
35812
|
+
this.rawSegments.push([
|
|
35813
|
+
this.generatedCodeColumn,
|
|
35814
|
+
sourceIndex,
|
|
35815
|
+
loc.line,
|
|
35816
|
+
loc.column
|
|
35817
|
+
]);
|
|
35818
|
+
}
|
|
35819
|
+
} else this.rawSegments.push([
|
|
36090
35820
|
this.generatedCodeColumn,
|
|
36091
35821
|
sourceIndex,
|
|
36092
35822
|
loc.line,
|
|
36093
35823
|
loc.column
|
|
36094
|
-
];
|
|
36095
|
-
|
|
36096
|
-
|
|
36097
|
-
|
|
36098
|
-
|
|
35824
|
+
]);
|
|
35825
|
+
loc.column += 1;
|
|
35826
|
+
this.generatedCodeColumn += 1;
|
|
35827
|
+
}
|
|
35828
|
+
i += 1;
|
|
35829
|
+
}
|
|
35830
|
+
} else {
|
|
35831
|
+
const bits = sourcemapLocations.bits;
|
|
35832
|
+
while (i < end) {
|
|
35833
|
+
let newline = original.indexOf("\n", i);
|
|
35834
|
+
if (newline === -1 || newline > end) newline = end;
|
|
35835
|
+
if (newline > i) {
|
|
35836
|
+
this.rawSegments.push([
|
|
35837
|
+
this.generatedCodeColumn,
|
|
35838
|
+
sourceIndex,
|
|
35839
|
+
loc.line,
|
|
35840
|
+
loc.column
|
|
35841
|
+
]);
|
|
35842
|
+
for (let w = i + 1 >> 5, last = newline - 1 >> 5; w <= last; w++) {
|
|
35843
|
+
let word = bits[w];
|
|
35844
|
+
if (!word) continue;
|
|
35845
|
+
const base = w << 5;
|
|
35846
|
+
while (word) {
|
|
35847
|
+
const lowest = word & -word;
|
|
35848
|
+
const index = base + 31 - Math.clz32(lowest);
|
|
35849
|
+
if (index > i && index < newline) {
|
|
35850
|
+
const offset = index - i;
|
|
35851
|
+
this.rawSegments.push([
|
|
35852
|
+
this.generatedCodeColumn + offset,
|
|
35853
|
+
sourceIndex,
|
|
35854
|
+
loc.line,
|
|
35855
|
+
loc.column + offset
|
|
35856
|
+
]);
|
|
35857
|
+
}
|
|
35858
|
+
word ^= lowest;
|
|
36099
35859
|
}
|
|
36100
|
-
} else {
|
|
36101
|
-
this.rawSegments.push(segment);
|
|
36102
|
-
charInHiresBoundary = false;
|
|
36103
35860
|
}
|
|
36104
|
-
|
|
35861
|
+
loc.column += newline - i;
|
|
35862
|
+
this.generatedCodeColumn += newline - i;
|
|
36105
35863
|
}
|
|
36106
|
-
|
|
36107
|
-
|
|
36108
|
-
|
|
35864
|
+
if (newline === end) break;
|
|
35865
|
+
loc.line += 1;
|
|
35866
|
+
loc.column = 0;
|
|
35867
|
+
this.nextLine();
|
|
35868
|
+
i = newline + 1;
|
|
36109
35869
|
}
|
|
36110
|
-
originalCharIndex += 1;
|
|
36111
35870
|
}
|
|
36112
|
-
this.pending = null;
|
|
36113
35871
|
}
|
|
36114
35872
|
advance(str) {
|
|
36115
35873
|
if (!str) return;
|
|
36116
|
-
const
|
|
36117
|
-
|
|
36118
|
-
|
|
36119
|
-
this.generatedCodeLine++;
|
|
36120
|
-
this.raw[this.generatedCodeLine] = this.rawSegments = [];
|
|
36121
|
-
}
|
|
36122
|
-
this.generatedCodeColumn = 0;
|
|
36123
|
-
}
|
|
36124
|
-
this.generatedCodeColumn += lines[lines.length - 1].length;
|
|
35874
|
+
const lastNewline = str.lastIndexOf("\n");
|
|
35875
|
+
for (let i = str.indexOf("\n"); i !== -1; i = str.indexOf("\n", i + 1)) this.nextLine();
|
|
35876
|
+
this.generatedCodeColumn += str.length - lastNewline - 1;
|
|
36125
35877
|
}
|
|
36126
35878
|
};
|
|
36127
35879
|
const n = "\n";
|
|
@@ -36132,6 +35884,63 @@ const warned = {
|
|
|
36132
35884
|
insertRight: false,
|
|
36133
35885
|
storeName: false
|
|
36134
35886
|
};
|
|
35887
|
+
/**
|
|
35888
|
+
* Expands the `$` substitution patterns that `String.prototype.replace` accepts
|
|
35889
|
+
* in a string replacement.
|
|
35890
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter
|
|
35891
|
+
*
|
|
35892
|
+
* `captures` holds the capture groups in order, so `captures[0]` is `$1`.
|
|
35893
|
+
* `namedCaptures` is `undefined` when the pattern has no named groups, and
|
|
35894
|
+
* `$<name>` is then literal text - which is also the case for a string search
|
|
35895
|
+
* value, where there are no groups of either kind.
|
|
35896
|
+
*/
|
|
35897
|
+
function expandReplacement(replacement, matched, position, str, captures, namedCaptures) {
|
|
35898
|
+
if (!replacement.includes("$")) return replacement;
|
|
35899
|
+
let result = "";
|
|
35900
|
+
let index = 0;
|
|
35901
|
+
while (index < replacement.length) {
|
|
35902
|
+
const dollar = replacement.indexOf("$", index);
|
|
35903
|
+
if (dollar === -1) {
|
|
35904
|
+
result += replacement.slice(index);
|
|
35905
|
+
break;
|
|
35906
|
+
}
|
|
35907
|
+
result += replacement.slice(index, dollar);
|
|
35908
|
+
const char = replacement[dollar + 1];
|
|
35909
|
+
let expansion = "$";
|
|
35910
|
+
let consumed = 1;
|
|
35911
|
+
if (char === "$") consumed = 2;
|
|
35912
|
+
else if (char === "&") {
|
|
35913
|
+
expansion = matched;
|
|
35914
|
+
consumed = 2;
|
|
35915
|
+
} else if (char === "`") {
|
|
35916
|
+
expansion = str.slice(0, position);
|
|
35917
|
+
consumed = 2;
|
|
35918
|
+
} else if (char === "'") {
|
|
35919
|
+
expansion = str.slice(position + matched.length);
|
|
35920
|
+
consumed = 2;
|
|
35921
|
+
} else if (char === "<" && namedCaptures !== void 0) {
|
|
35922
|
+
const close = replacement.indexOf(">", dollar + 2);
|
|
35923
|
+
if (close !== -1) {
|
|
35924
|
+
expansion = namedCaptures[replacement.slice(dollar + 2, close)] ?? "";
|
|
35925
|
+
consumed = close + 1 - dollar;
|
|
35926
|
+
}
|
|
35927
|
+
} else if (char >= "0" && char <= "9") {
|
|
35928
|
+
const second = replacement[dollar + 2];
|
|
35929
|
+
const double = second >= "0" && second <= "9" ? Number(char + second) : NaN;
|
|
35930
|
+
const single = Number(char);
|
|
35931
|
+
if (double >= 1 && double <= captures.length) {
|
|
35932
|
+
expansion = captures[double - 1] ?? "";
|
|
35933
|
+
consumed = 3;
|
|
35934
|
+
} else if (single >= 1 && single <= captures.length) {
|
|
35935
|
+
expansion = captures[single - 1] ?? "";
|
|
35936
|
+
consumed = 2;
|
|
35937
|
+
}
|
|
35938
|
+
}
|
|
35939
|
+
result += expansion;
|
|
35940
|
+
index = dollar + consumed;
|
|
35941
|
+
}
|
|
35942
|
+
return result;
|
|
35943
|
+
}
|
|
36135
35944
|
var MagicString = class MagicString {
|
|
36136
35945
|
constructor(string, options = {}) {
|
|
36137
35946
|
const chunk = new Chunk(0, string.length, string);
|
|
@@ -36282,9 +36091,32 @@ var MagicString = class MagicString {
|
|
|
36282
36091
|
*/
|
|
36283
36092
|
generateDecodedMap(options) {
|
|
36284
36093
|
options = options || {};
|
|
36094
|
+
const mappings = new Mappings(options.hires);
|
|
36095
|
+
const names = this._generateMappings(mappings);
|
|
36096
|
+
return {
|
|
36097
|
+
...this._mapProperties(options, names),
|
|
36098
|
+
mappings: mappings.raw,
|
|
36099
|
+
rangeMappings: mappings.rawRangeMappings
|
|
36100
|
+
};
|
|
36101
|
+
}
|
|
36102
|
+
/**
|
|
36103
|
+
* Generates a version 3 sourcemap.
|
|
36104
|
+
*/
|
|
36105
|
+
generateMap(options) {
|
|
36106
|
+
options = options || {};
|
|
36107
|
+
const encoder = new MappingsEncoder();
|
|
36108
|
+
const mappings = new Mappings(options.hires, encoder);
|
|
36109
|
+
const names = this._generateMappings(mappings);
|
|
36110
|
+
return new SourceMap({
|
|
36111
|
+
...this._mapProperties(options, names),
|
|
36112
|
+
mappings: encoder.finish(mappings.rawSegments),
|
|
36113
|
+
rangeMappings: mappings.rawRangeMappings
|
|
36114
|
+
});
|
|
36115
|
+
}
|
|
36116
|
+
/** @internal */
|
|
36117
|
+
_generateMappings(mappings) {
|
|
36285
36118
|
const sourceIndex = 0;
|
|
36286
36119
|
const names = Object.keys(this.storedNames);
|
|
36287
|
-
const mappings = new Mappings(options.hires);
|
|
36288
36120
|
const locate = getLocator(this.original);
|
|
36289
36121
|
if (this.intro) mappings.advance(this.intro);
|
|
36290
36122
|
this.firstChunk.eachNext((chunk) => {
|
|
@@ -36295,21 +36127,18 @@ var MagicString = class MagicString {
|
|
|
36295
36127
|
if (chunk.outro.length) mappings.advance(chunk.outro);
|
|
36296
36128
|
});
|
|
36297
36129
|
if (this.outro) mappings.advance(this.outro);
|
|
36130
|
+
return names;
|
|
36131
|
+
}
|
|
36132
|
+
/** @internal */
|
|
36133
|
+
_mapProperties(options, names) {
|
|
36298
36134
|
return {
|
|
36299
36135
|
file: options.file ? options.file.split(/[/\\]/).pop() : void 0,
|
|
36300
36136
|
sources: [options.source ? getRelativePath(options.file || "", options.source) : options.file || ""],
|
|
36301
36137
|
sourcesContent: options.includeContent ? [this.original] : void 0,
|
|
36302
36138
|
names,
|
|
36303
|
-
|
|
36304
|
-
x_google_ignoreList: this.ignoreList ? [sourceIndex] : void 0
|
|
36139
|
+
x_google_ignoreList: this.ignoreList ? [0] : void 0
|
|
36305
36140
|
};
|
|
36306
36141
|
}
|
|
36307
|
-
/**
|
|
36308
|
-
* Generates a version 3 sourcemap.
|
|
36309
|
-
*/
|
|
36310
|
-
generateMap(options) {
|
|
36311
|
-
return new SourceMap(this.generateDecodedMap(options));
|
|
36312
|
-
}
|
|
36313
36142
|
/** @internal */
|
|
36314
36143
|
_ensureindentStr() {
|
|
36315
36144
|
if (this.indentStr === void 0) this.indentStr = guessIndent(this.original);
|
|
@@ -36341,17 +36170,18 @@ var MagicString = class MagicString {
|
|
|
36341
36170
|
for (let i = exclusion[0]; i < exclusion[1]; i += 1) isExcluded[i] = true;
|
|
36342
36171
|
});
|
|
36343
36172
|
let shouldIndentNextCharacter = options.indentStart !== false;
|
|
36344
|
-
const
|
|
36345
|
-
if (
|
|
36346
|
-
|
|
36347
|
-
|
|
36173
|
+
const indentPiece = (str) => {
|
|
36174
|
+
if (str === "") return str;
|
|
36175
|
+
const indented = str.replace(pattern, (match, offset) => offset > 0 || shouldIndentNextCharacter ? `${resolvedIndentStr}${match}` : match);
|
|
36176
|
+
shouldIndentNextCharacter = str[str.length - 1] === "\n";
|
|
36177
|
+
return indented;
|
|
36348
36178
|
};
|
|
36349
|
-
this.intro = this.intro
|
|
36179
|
+
this.intro = indentPiece(this.intro);
|
|
36350
36180
|
let charIndex = 0;
|
|
36351
36181
|
let chunk = this.firstChunk;
|
|
36352
36182
|
const indentAt = (index) => {
|
|
36353
36183
|
shouldIndentNextCharacter = false;
|
|
36354
|
-
if (index === chunk.start) chunk.
|
|
36184
|
+
if (index === chunk.start) chunk.appendRight(resolvedIndentStr);
|
|
36355
36185
|
else {
|
|
36356
36186
|
this._splitChunk(chunk, index);
|
|
36357
36187
|
chunk = chunk.next;
|
|
@@ -36360,11 +36190,9 @@ var MagicString = class MagicString {
|
|
|
36360
36190
|
};
|
|
36361
36191
|
while (chunk) {
|
|
36362
36192
|
const end = chunk.end;
|
|
36193
|
+
if (!isExcluded[chunk.start]) chunk.intro = indentPiece(chunk.intro);
|
|
36363
36194
|
if (chunk.edited) {
|
|
36364
|
-
if (!isExcluded[charIndex])
|
|
36365
|
-
chunk.content = chunk.content.replace(pattern, replacer);
|
|
36366
|
-
if (chunk.content.length) shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === "\n";
|
|
36367
|
-
}
|
|
36195
|
+
if (!isExcluded[charIndex]) chunk.content = indentPiece(chunk.content);
|
|
36368
36196
|
} else if (options.exclude) {
|
|
36369
36197
|
charIndex = chunk.start;
|
|
36370
36198
|
while (charIndex < end) {
|
|
@@ -36394,10 +36222,11 @@ var MagicString = class MagicString {
|
|
|
36394
36222
|
charIndex += 1;
|
|
36395
36223
|
}
|
|
36396
36224
|
}
|
|
36225
|
+
if (!isExcluded[chunk.end - 1]) chunk.outro = indentPiece(chunk.outro);
|
|
36397
36226
|
charIndex = chunk.end;
|
|
36398
36227
|
chunk = chunk.next;
|
|
36399
36228
|
}
|
|
36400
|
-
this.outro = this.outro
|
|
36229
|
+
this.outro = indentPiece(this.outro);
|
|
36401
36230
|
return this;
|
|
36402
36231
|
}
|
|
36403
36232
|
/** @internal */
|
|
@@ -36422,8 +36251,14 @@ var MagicString = class MagicString {
|
|
|
36422
36251
|
}
|
|
36423
36252
|
/**
|
|
36424
36253
|
* Moves the characters from `start` and `end` to `index`.
|
|
36254
|
+
*
|
|
36255
|
+
* `affinity` controls where the range is anchored at `index`. With the
|
|
36256
|
+
* default `'right'`, it is inserted before the content that starts at `index`;
|
|
36257
|
+
* with `'left'`, it is inserted after the content that ends at `index`. The
|
|
36258
|
+
* two differ only when other content has already been moved to that boundary,
|
|
36259
|
+
* mirroring the `appendLeft`/`appendRight` distinction.
|
|
36425
36260
|
*/
|
|
36426
|
-
move(start, end, index) {
|
|
36261
|
+
move(start, end, index, affinity = "right") {
|
|
36427
36262
|
start = start + this.offset;
|
|
36428
36263
|
end = end + this.offset;
|
|
36429
36264
|
index = index + this.offset;
|
|
@@ -36443,9 +36278,27 @@ var MagicString = class MagicString {
|
|
|
36443
36278
|
}
|
|
36444
36279
|
const oldLeft = first.previous;
|
|
36445
36280
|
const oldRight = last.next;
|
|
36446
|
-
|
|
36447
|
-
|
|
36448
|
-
|
|
36281
|
+
let newLeft;
|
|
36282
|
+
let newRight;
|
|
36283
|
+
if (affinity === "left") {
|
|
36284
|
+
newLeft = this.byEnd.get(index) ?? null;
|
|
36285
|
+
if (!newLeft) {
|
|
36286
|
+
if (first === this.firstChunk) return this;
|
|
36287
|
+
newRight = this.firstChunk;
|
|
36288
|
+
} else {
|
|
36289
|
+
if (newLeft.next === first) return this;
|
|
36290
|
+
newRight = newLeft.next;
|
|
36291
|
+
}
|
|
36292
|
+
} else {
|
|
36293
|
+
newRight = this.byStart.get(index) ?? null;
|
|
36294
|
+
if (!newRight) {
|
|
36295
|
+
if (last === this.lastChunk) return this;
|
|
36296
|
+
newLeft = this.lastChunk;
|
|
36297
|
+
} else {
|
|
36298
|
+
if (newRight.previous === last) return this;
|
|
36299
|
+
newLeft = newRight.previous;
|
|
36300
|
+
}
|
|
36301
|
+
}
|
|
36449
36302
|
if (oldLeft) oldLeft.next = oldRight;
|
|
36450
36303
|
if (oldRight) oldRight.previous = oldLeft;
|
|
36451
36304
|
if (newLeft) newLeft.next = first;
|
|
@@ -36520,6 +36373,7 @@ var MagicString = class MagicString {
|
|
|
36520
36373
|
}
|
|
36521
36374
|
const first = this.byStart.get(start);
|
|
36522
36375
|
const last = this.byEnd.get(end);
|
|
36376
|
+
/* v8 ignore else -- unreachable: a valid start/end always yields a `first` chunk */
|
|
36523
36377
|
if (first) {
|
|
36524
36378
|
let chunk = first;
|
|
36525
36379
|
while (chunk !== last) {
|
|
@@ -36569,6 +36423,9 @@ var MagicString = class MagicString {
|
|
|
36569
36423
|
}
|
|
36570
36424
|
/**
|
|
36571
36425
|
* Removes the characters from `start` to `end` (of the original string, **not** the generated string).
|
|
36426
|
+
* Content appended or prepended at positions strictly inside the range is removed with it, while
|
|
36427
|
+
* content attached at `start` or `end` is preserved — use `s.overwrite(start, end, '')` to remove
|
|
36428
|
+
* the range including its edge inserts.
|
|
36572
36429
|
* Removing the same content twice, or making removals that partially overlap, will cause an error.
|
|
36573
36430
|
*/
|
|
36574
36431
|
remove(start, end) {
|
|
@@ -36585,9 +36442,9 @@ var MagicString = class MagicString {
|
|
|
36585
36442
|
this._split(end);
|
|
36586
36443
|
let chunk = this.byStart.get(start);
|
|
36587
36444
|
while (chunk) {
|
|
36588
|
-
chunk.intro = "";
|
|
36589
|
-
chunk.outro = "";
|
|
36590
|
-
chunk.edit("");
|
|
36445
|
+
if (chunk.start > start) chunk.intro = "";
|
|
36446
|
+
if (chunk.end < end) chunk.outro = "";
|
|
36447
|
+
chunk.edit("", false, true);
|
|
36591
36448
|
chunk = end > chunk.end ? this.byStart.get(chunk.end) : null;
|
|
36592
36449
|
}
|
|
36593
36450
|
return this;
|
|
@@ -36667,12 +36524,13 @@ var MagicString = class MagicString {
|
|
|
36667
36524
|
let result = "";
|
|
36668
36525
|
let chunk = this.firstChunk;
|
|
36669
36526
|
while (chunk && (chunk.start > start || chunk.end <= start)) {
|
|
36670
|
-
if (chunk.start < end && chunk.end >= end) return result;
|
|
36527
|
+
if (chunk.start < end && chunk.end >= end || end === 0 && chunk.start === 0) return result;
|
|
36671
36528
|
chunk = chunk.next;
|
|
36672
36529
|
}
|
|
36673
36530
|
if (chunk && chunk.edited && chunk.start !== start) throw new MagicStringError(`cannot use edited character ${start} as slice start anchor`);
|
|
36674
36531
|
const startChunk = chunk;
|
|
36675
36532
|
while (chunk) {
|
|
36533
|
+
if (end === 0 && chunk.start === 0) break;
|
|
36676
36534
|
if (chunk.intro && (startChunk !== chunk || chunk.start === start)) result += chunk.intro;
|
|
36677
36535
|
const containsEnd = chunk.start < end && chunk.end >= end;
|
|
36678
36536
|
if (containsEnd && chunk.edited && chunk.end !== end) throw new MagicStringError(`cannot use edited character ${end} as slice end anchor`);
|
|
@@ -36737,11 +36595,13 @@ var MagicString = class MagicString {
|
|
|
36737
36595
|
* Returns true if the resulting source is empty (disregarding white space).
|
|
36738
36596
|
*/
|
|
36739
36597
|
isEmpty() {
|
|
36598
|
+
if (this.intro.length && this.intro.trim()) return false;
|
|
36740
36599
|
let chunk = this.firstChunk;
|
|
36741
36600
|
while (chunk) {
|
|
36742
36601
|
if (chunk.intro.length && chunk.intro.trim() || chunk.content.length && chunk.content.trim() || chunk.outro.length && chunk.outro.trim()) return false;
|
|
36743
36602
|
chunk = chunk.next;
|
|
36744
36603
|
}
|
|
36604
|
+
if (this.outro.length && this.outro.trim()) return false;
|
|
36745
36605
|
return true;
|
|
36746
36606
|
}
|
|
36747
36607
|
length() {
|
|
@@ -36783,7 +36643,8 @@ var MagicString = class MagicString {
|
|
|
36783
36643
|
if (aborted) return true;
|
|
36784
36644
|
chunk = chunk.previous;
|
|
36785
36645
|
} while (chunk);
|
|
36786
|
-
|
|
36646
|
+
this.intro = this.intro.replace(rx, "");
|
|
36647
|
+
return this.intro.length > 0;
|
|
36787
36648
|
}
|
|
36788
36649
|
/**
|
|
36789
36650
|
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end.
|
|
@@ -36810,7 +36671,8 @@ var MagicString = class MagicString {
|
|
|
36810
36671
|
if (aborted) return true;
|
|
36811
36672
|
chunk = chunk.next;
|
|
36812
36673
|
} while (chunk);
|
|
36813
|
-
|
|
36674
|
+
this.outro = this.outro.replace(rx, "");
|
|
36675
|
+
return this.outro.length > 0;
|
|
36814
36676
|
}
|
|
36815
36677
|
/**
|
|
36816
36678
|
* Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start.
|
|
@@ -36837,41 +36699,66 @@ var MagicString = class MagicString {
|
|
|
36837
36699
|
}
|
|
36838
36700
|
return outputIndex !== this.original.length;
|
|
36839
36701
|
}
|
|
36702
|
+
/**
|
|
36703
|
+
* Whether the original range [start, end) has had any of its characters
|
|
36704
|
+
* removed. `replace`/`replaceAll` search `original`, so a match can land on
|
|
36705
|
+
* text that is no longer in the output - overwriting it would resurrect the
|
|
36706
|
+
* removed characters, so such matches are skipped instead.
|
|
36707
|
+
*
|
|
36708
|
+
* @internal
|
|
36709
|
+
*/
|
|
36710
|
+
_hasRemovedContent(start, end) {
|
|
36711
|
+
let chunk = this.firstChunk;
|
|
36712
|
+
while (chunk) {
|
|
36713
|
+
if (chunk.content === "" && chunk.start < end && chunk.end > start) return true;
|
|
36714
|
+
chunk = chunk.next;
|
|
36715
|
+
}
|
|
36716
|
+
return false;
|
|
36717
|
+
}
|
|
36840
36718
|
/** @internal */
|
|
36841
36719
|
_replaceRegexp(searchValue, replacement) {
|
|
36842
36720
|
function getReplacement(match, str) {
|
|
36843
|
-
if (typeof replacement === "string") return replacement.
|
|
36844
|
-
|
|
36845
|
-
if (i === "&") return match[0];
|
|
36846
|
-
if (+i < match.length) return match[+i];
|
|
36847
|
-
return `$${i}`;
|
|
36848
|
-
});
|
|
36849
|
-
else return replacement(match[0], ...match.slice(1), match.index, str, match.groups);
|
|
36721
|
+
if (typeof replacement === "string") return expandReplacement(replacement, match[0], match.index, str, match.slice(1), match.groups);
|
|
36722
|
+
else return match.groups === void 0 ? replacement(match[0], ...match.slice(1), match.index, str) : replacement(match[0], ...match.slice(1), match.index, str, match.groups);
|
|
36850
36723
|
}
|
|
36851
36724
|
const replaceMatch = (match) => {
|
|
36852
|
-
|
|
36725
|
+
/* v8 ignore next 2 -- `match.index` is always defined for matches from `matchAll` */
|
|
36726
|
+
if (match.index == null) return false;
|
|
36727
|
+
if (this._hasRemovedContent(match.index, match.index + match[0].length)) return false;
|
|
36853
36728
|
const replacement = getReplacement(match, this.original);
|
|
36854
|
-
if (replacement === match[0]) return;
|
|
36729
|
+
if (replacement === match[0]) return true;
|
|
36855
36730
|
if (match[0].length === 0) this.appendRight(match.index, replacement);
|
|
36856
36731
|
else this.overwrite(match.index, match.index + match[0].length, replacement);
|
|
36732
|
+
return true;
|
|
36857
36733
|
};
|
|
36858
36734
|
if (searchValue.global) {
|
|
36859
36735
|
searchValue.lastIndex = 0;
|
|
36860
36736
|
for (const match of this.original.matchAll(searchValue)) replaceMatch(match);
|
|
36861
36737
|
} else {
|
|
36862
36738
|
const match = this.original.match(searchValue);
|
|
36863
|
-
if (match
|
|
36739
|
+
if (match && !replaceMatch(match)) {
|
|
36740
|
+
const global = new RegExp(searchValue.source, `${searchValue.flags}g`);
|
|
36741
|
+
for (const next of this.original.matchAll(global)) if (replaceMatch(next)) break;
|
|
36742
|
+
}
|
|
36864
36743
|
}
|
|
36865
36744
|
return this;
|
|
36866
36745
|
}
|
|
36867
36746
|
/** @internal */
|
|
36868
36747
|
_replaceString(string, replacement) {
|
|
36869
36748
|
const { original } = this;
|
|
36870
|
-
|
|
36871
|
-
|
|
36749
|
+
let index = original.indexOf(string);
|
|
36750
|
+
while (index !== -1) {
|
|
36751
|
+
if (this._hasRemovedContent(index, index + string.length)) {
|
|
36752
|
+
index = original.indexOf(string, index + string.length);
|
|
36753
|
+
continue;
|
|
36754
|
+
}
|
|
36872
36755
|
if (typeof replacement === "function") replacement = replacement(string, index, original);
|
|
36873
|
-
|
|
36874
|
-
|
|
36756
|
+
else replacement = expandReplacement(replacement, string, index, original, [], void 0);
|
|
36757
|
+
if (string !== replacement) {
|
|
36758
|
+
if (string.length === 0) this.appendRight(index, replacement);
|
|
36759
|
+
else this.overwrite(index, index + string.length, replacement);
|
|
36760
|
+
}
|
|
36761
|
+
break;
|
|
36875
36762
|
}
|
|
36876
36763
|
return this;
|
|
36877
36764
|
}
|
|
@@ -36888,14 +36775,15 @@ var MagicString = class MagicString {
|
|
|
36888
36775
|
const stringLength = string.length;
|
|
36889
36776
|
if (stringLength === 0) {
|
|
36890
36777
|
for (let index = 0; index <= original.length; index += 1) {
|
|
36891
|
-
const _replacement = typeof replacement === "function" ? replacement("", index, original) : replacement;
|
|
36778
|
+
const _replacement = typeof replacement === "function" ? replacement("", index, original) : expandReplacement(replacement, "", index, original, [], void 0);
|
|
36892
36779
|
if (_replacement !== "") this.appendRight(index, _replacement);
|
|
36893
36780
|
}
|
|
36894
36781
|
return this;
|
|
36895
36782
|
}
|
|
36896
36783
|
for (let index = original.indexOf(string); index !== -1; index = original.indexOf(string, index + stringLength)) {
|
|
36784
|
+
if (this._hasRemovedContent(index, index + stringLength)) continue;
|
|
36897
36785
|
const previous = original.slice(index, index + stringLength);
|
|
36898
|
-
const _replacement = typeof replacement === "function" ? replacement(previous, index, original) : replacement;
|
|
36786
|
+
const _replacement = typeof replacement === "function" ? replacement(previous, index, original) : expandReplacement(replacement, previous, index, original, [], void 0);
|
|
36899
36787
|
if (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);
|
|
36900
36788
|
}
|
|
36901
36789
|
return this;
|
|
@@ -38337,7 +38225,7 @@ var CandidateIndex = class {
|
|
|
38337
38225
|
layer: "candidate-index",
|
|
38338
38226
|
keyFingerprint: createCompilerValueFingerprint(sourceId),
|
|
38339
38227
|
hit: addedCandidates.size === 0 && removedCandidates.size === 0,
|
|
38340
|
-
|
|
38228
|
+
...addedCandidates.size || removedCandidates.size ? { invalidationReason: "source-change" } : {},
|
|
38341
38229
|
entries: this.candidatesBySource.size,
|
|
38342
38230
|
memoryBytes: [...this.candidatesBySource.values()].reduce((total, values) => total + values.size * 32, 0)
|
|
38343
38231
|
});
|
|
@@ -39326,7 +39214,7 @@ const readonlySetValues = /* @__PURE__ */ new WeakMap();
|
|
|
39326
39214
|
const snapshotRegistry = /* @__PURE__ */ new WeakMap();
|
|
39327
39215
|
var ImmutableSetView = class {
|
|
39328
39216
|
constructor(values) {
|
|
39329
|
-
readonlySetValues.set(this, new Set(values));
|
|
39217
|
+
readonlySetValues.set(this, values instanceof Set ? values : new Set(values));
|
|
39330
39218
|
Object.freeze(this);
|
|
39331
39219
|
}
|
|
39332
39220
|
get size() {
|
|
@@ -39371,29 +39259,32 @@ function uniqueSortedSources(sources) {
|
|
|
39371
39259
|
}
|
|
39372
39260
|
return Object.freeze([...values.entries()].sort(([left], [right]) => left.localeCompare(right)).map(([, value]) => value));
|
|
39373
39261
|
}
|
|
39262
|
+
function createFingerprint(parts) {
|
|
39263
|
+
return (0, _weapp_tailwindcss_shared_node.md5)([...parts].join("\0"));
|
|
39264
|
+
}
|
|
39374
39265
|
function createRootFingerprint(root, target, classSet, dependencies, sources) {
|
|
39375
|
-
return [
|
|
39266
|
+
return createFingerprint([
|
|
39376
39267
|
root.id,
|
|
39377
39268
|
String(root.revision),
|
|
39378
39269
|
target,
|
|
39379
39270
|
...[...classSet].sort(),
|
|
39380
39271
|
...dependencies,
|
|
39381
39272
|
...[...sources].map(sourceKey)
|
|
39382
|
-
]
|
|
39273
|
+
]);
|
|
39383
39274
|
}
|
|
39384
39275
|
function createSnapshotFromState(state, reusableClassSet, reusableClassSetView) {
|
|
39385
39276
|
const roots = Object.freeze([...state.roots.values()].sort((left, right) => left.id.localeCompare(right.id)).map(({ id, revision }) => Object.freeze({
|
|
39386
39277
|
id,
|
|
39387
39278
|
revision
|
|
39388
39279
|
})));
|
|
39389
|
-
const classSet = reusableClassSet ?? new Set(state.classSet);
|
|
39390
|
-
const fingerprint = [
|
|
39280
|
+
const classSet = reusableClassSet ?? (state.classSet instanceof Set ? state.classSet : new Set(state.classSet));
|
|
39281
|
+
const fingerprint = createFingerprint([
|
|
39391
39282
|
state.target,
|
|
39392
39283
|
...[...state.roots.values()].map((root) => `${root.id}\0${root.revision}\0${root.fingerprint}`).sort(),
|
|
39393
39284
|
...[...classSet].sort(),
|
|
39394
39285
|
...state.dependencies,
|
|
39395
39286
|
...state.sources.map(sourceKey)
|
|
39396
|
-
]
|
|
39287
|
+
]);
|
|
39397
39288
|
const snapshot = Object.freeze({
|
|
39398
39289
|
classSet: reusableClassSetView ?? new ImmutableSetView(classSet),
|
|
39399
39290
|
dependencies: state.dependencies,
|
|
@@ -39685,12 +39576,14 @@ async function collectTailwindV4GeneratorClassSet(tailwindRuntime) {
|
|
|
39685
39576
|
if (typeof tailwindRuntime.collectContentTokens !== "function") return;
|
|
39686
39577
|
try {
|
|
39687
39578
|
const source = require_generator.resolveCssMacroTailwindV4Source(await require_generator.resolveTailwindV4SourceFromRuntime(tailwindRuntime));
|
|
39579
|
+
const bareArbitraryValues = require_generator.resolveRuntimeBareArbitraryValues(tailwindRuntime.options);
|
|
39688
39580
|
const generated = await require_generator.createTailwindV4Engine(source).generate({
|
|
39581
|
+
...bareArbitraryValues === void 0 ? {} : { bareArbitraryValues },
|
|
39689
39582
|
scanSources: true,
|
|
39690
39583
|
target: "web"
|
|
39691
39584
|
});
|
|
39692
39585
|
const designSystem = await (0, _tailwindcss_mangle_engine.loadTailwindV4DesignSystem)(source);
|
|
39693
|
-
const classSet = (0, _tailwindcss_mangle_engine.resolveValidTailwindV4Candidates)(designSystem, generated.classSet, { ...
|
|
39586
|
+
const classSet = (0, _tailwindcss_mangle_engine.resolveValidTailwindV4Candidates)(designSystem, generated.classSet, { ...bareArbitraryValues === void 0 ? {} : { bareArbitraryValues } });
|
|
39694
39587
|
debug$1("runtime class set resolved via tailwindcss v4 generator source scan, raw=%d valid=%d", generated.classSet.size, classSet.size);
|
|
39695
39588
|
return classSet;
|
|
39696
39589
|
} catch (error) {
|
|
@@ -40067,7 +39960,7 @@ function toCustomAttributesEntities(customAttributes) {
|
|
|
40067
39960
|
return Object.entries(customAttributes);
|
|
40068
39961
|
}
|
|
40069
39962
|
//#endregion
|
|
40070
|
-
//#region ../../node_modules/.pnpm/oxc-walker@1.1.1_@oxc-project+types@0.149.0_oxc-parser@0.
|
|
39963
|
+
//#region ../../node_modules/.pnpm/oxc-walker@1.1.1_@oxc-project+types@0.149.0_oxc-parser@0.150.0_rolldown@1.2.7/node_modules/oxc-walker/dist/index.mjs
|
|
40071
39964
|
function isNode(v) {
|
|
40072
39965
|
return v !== null && typeof v === "object" && typeof v.type === "string";
|
|
40073
39966
|
}
|
|
@@ -41118,10 +41011,10 @@ function syncLegacyFieldsToCssOptions(ctx) {
|
|
|
41118
41011
|
}
|
|
41119
41012
|
function applyFrameworkPlatformDefaults(ctx) {
|
|
41120
41013
|
if (ctx.cssOptions?.platform || ctx.platform) {
|
|
41121
|
-
ctx.platform = normalizeFrameworkStylePlatform(ctx.cssOptions?.platform ?? ctx.platform, ctx.appType);
|
|
41014
|
+
ctx.platform = normalizeFrameworkStylePlatform(ctx.cssOptions?.platform ?? ctx.platform, ctx.appType) ?? ctx.platform;
|
|
41122
41015
|
return;
|
|
41123
41016
|
}
|
|
41124
|
-
if (ctx.appType === "mpx") ctx.platform = normalizeFrameworkStylePlatform(require_framework.resolveMpxPlatform().normalized, ctx.appType);
|
|
41017
|
+
if (ctx.appType === "mpx") ctx.platform = normalizeFrameworkStylePlatform(require_framework.resolveMpxPlatform().normalized, ctx.appType) ?? ctx.platform;
|
|
41125
41018
|
}
|
|
41126
41019
|
async function clearTailwindcssRuntimeCache(tailwindRuntime, options) {
|
|
41127
41020
|
if (!tailwindRuntime) return;
|
|
@@ -41137,7 +41030,7 @@ async function clearTailwindcssRuntimeCache(tailwindRuntime, options) {
|
|
|
41137
41030
|
const normalizedCacheOptions = typeof cacheOptions === "object" ? cacheOptions : void 0;
|
|
41138
41031
|
const privateCachePath = tailwindRuntime?.cacheStore?.options?.path;
|
|
41139
41032
|
if (privateCachePath) cachePaths.set(privateCachePath, false);
|
|
41140
|
-
if (normalizedCacheOptions
|
|
41033
|
+
if (normalizedCacheOptions && "path" in normalizedCacheOptions && typeof normalizedCacheOptions.path === "string") cachePaths.set(normalizedCacheOptions.path, false);
|
|
41141
41034
|
if (options?.removeDirectory && normalizedCacheOptions?.dir) cachePaths.set(normalizedCacheOptions.dir, true);
|
|
41142
41035
|
if (!cachePaths.size) return;
|
|
41143
41036
|
for (const [cachePath, recursive] of cachePaths.entries()) try {
|
|
@@ -41225,8 +41118,11 @@ function resolveCssTransformOptions(options) {
|
|
|
41225
41118
|
};
|
|
41226
41119
|
}
|
|
41227
41120
|
function finalizeResultRoot(result, snapshot, shouldFinalize) {
|
|
41228
|
-
if (!shouldFinalize
|
|
41229
|
-
(0, _weapp_tailwindcss_postcss.finalizeMiniProgramCssRoot)(result.root, { isTailwindcssV4: snapshot.target === "weapp" });
|
|
41121
|
+
if (!shouldFinalize) return;
|
|
41122
|
+
if (result.root.type === "root") (0, _weapp_tailwindcss_postcss.finalizeMiniProgramCssRoot)(result.root, { isTailwindcssV4: snapshot.target === "weapp" });
|
|
41123
|
+
if (snapshot.target === "weapp") result.root.walkComments((comment) => {
|
|
41124
|
+
if (/^!\s*tailwindcss v/i.test(comment.text)) comment.remove();
|
|
41125
|
+
});
|
|
41230
41126
|
result.css = result.root.toString();
|
|
41231
41127
|
}
|
|
41232
41128
|
function createCompilerTransforms({ ensureActive, track, userOptions }) {
|
|
@@ -41348,19 +41244,20 @@ function createCompiler(options = {}) {
|
|
|
41348
41244
|
const prepared = prepareCompilerGeneration(entry, request, source, !sourceReused || entry.appliedInvalidation !== invalidation);
|
|
41349
41245
|
const generationCacheKey = createCompilerGenerationCacheKey(request, prepared.compilation.candidates, target);
|
|
41350
41246
|
const reusableGeneration = engineReused && entry.generationCache && isSameCompilerGenerationCacheKey(entry.generationCache.key, generationCacheKey) ? entry.generationCache.result : void 0;
|
|
41247
|
+
const latestRevision = getLatestRevision(entry);
|
|
41351
41248
|
cacheTelemetry?.record({
|
|
41352
41249
|
layer: "tailwind-generation",
|
|
41353
41250
|
keyFingerprint: generationCacheKey.candidateSignature,
|
|
41354
41251
|
hit: reusableGeneration !== void 0,
|
|
41355
|
-
|
|
41252
|
+
...reusableGeneration === void 0 && !engineReused ? { invalidationReason: "source-change" } : {},
|
|
41356
41253
|
entries: entry.generationCache ? 1 : 0,
|
|
41357
|
-
revision:
|
|
41254
|
+
...latestRevision === void 0 ? {} : { revision: latestRevision },
|
|
41358
41255
|
operationId: entry.id
|
|
41359
41256
|
});
|
|
41360
41257
|
try {
|
|
41361
41258
|
const generated = reusableGeneration ? reuseCompilerGenerationResult(reusableGeneration) : await generator.generate({
|
|
41362
41259
|
...generateOptions,
|
|
41363
|
-
|
|
41260
|
+
...prepared.explicitCandidates ? { candidates: prepared.compilation.candidates } : {},
|
|
41364
41261
|
incrementalCache: generateOptions.incrementalCache ?? true,
|
|
41365
41262
|
target: target === "tailwind" ? "web" : target
|
|
41366
41263
|
});
|
|
@@ -41788,10 +41685,10 @@ function createJsRuntimeAffectingSignature(source) {
|
|
|
41788
41685
|
const stack = [ast];
|
|
41789
41686
|
while (stack.length > 0) {
|
|
41790
41687
|
const node = stack.pop();
|
|
41791
|
-
if (node.type === "StringLiteral" && typeof node
|
|
41792
|
-
else if (node.type === "TemplateElement" && node
|
|
41793
|
-
else if (node.type === "JSXText" && typeof node
|
|
41794
|
-
const value = node
|
|
41688
|
+
if (node.type === "StringLiteral" && typeof node["value"] === "string") parts.push(`s:${node["value"]}`);
|
|
41689
|
+
else if (node.type === "TemplateElement" && node["value"] && typeof node["value"] === "object" && "raw" in node["value"] && typeof node["value"].raw === "string") parts.push(`t:${node["value"].raw}`);
|
|
41690
|
+
else if (node.type === "JSXText" && typeof node["value"] === "string") {
|
|
41691
|
+
const value = node["value"].trim();
|
|
41795
41692
|
if (value.length > 0) parts.push(`x:${value}`);
|
|
41796
41693
|
}
|
|
41797
41694
|
const children = [];
|