storybook 10.0.0-beta.4 → 10.0.0-beta.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/assets/server/openBrowser.applescript +94 -0
- package/dist/_browser-chunks/Color-KPLIACXP.js +1569 -0
- package/dist/_browser-chunks/{WithTooltip-ERFLZL6W.js → WithTooltip-SK46ZJ2J.js} +1 -1
- package/dist/_browser-chunks/{chunk-YY5GICNT.js → chunk-6E2SHJSL.js} +175 -32
- package/dist/_browser-chunks/{chunk-MZNYTCNT.js → chunk-AM4PZYVQ.js} +10 -63
- package/dist/_browser-chunks/{chunk-EOILZP2R.js → chunk-BOOOPFZF.js} +7 -2
- package/dist/_browser-chunks/{chunk-YWDKX534.js → chunk-FA42P6MO.js} +49 -4
- package/dist/_browser-chunks/chunk-G33S6YM3.js +521 -0
- package/dist/_browser-chunks/chunk-GJ67EE65.js +67 -0
- package/dist/_browser-chunks/{chunk-4QPX7WIQ.js → chunk-JJZMHC3A.js} +57 -166
- package/dist/_browser-chunks/{chunk-MD2FTHCZ.js → chunk-JVSKG4YS.js} +3 -16
- package/dist/_browser-chunks/{chunk-E7VLET3C.js → chunk-KSCAWCCE.js} +3947 -4291
- package/dist/_browser-chunks/chunk-QK3L5AXO.js +372 -0
- package/dist/_browser-chunks/chunk-VUAFL5XK.js +20 -0
- package/dist/_browser-chunks/{chunk-T7RCAJIX.js → chunk-Y3M7TW6K.js} +43 -47
- package/dist/_browser-chunks/{chunk-PYK5ZTFK.js → chunk-YQV3EGQ5.js} +5 -5
- package/dist/_browser-chunks/{syntaxhighlighter-YYAA4CS4.js → syntaxhighlighter-RJW7FE3A.js} +3 -2
- package/dist/_node-chunks/{builder-manager-IKHPPPFE.js → builder-manager-V33CQT2M.js} +26 -151
- package/dist/_node-chunks/camelcase-BZ55OCHI.js +18 -0
- package/dist/_node-chunks/{chunk-5OILJTZE.js → chunk-2DMFI367.js} +7 -7
- package/dist/_node-chunks/{chunk-DCHFG5TX.js → chunk-4TOI4VSK.js} +7 -7
- package/dist/_node-chunks/{chunk-XA4TAMUS.js → chunk-55VWKF63.js} +710 -935
- package/dist/_node-chunks/{chunk-N3GFXZDP.js → chunk-5IEY46LQ.js} +7 -7
- package/dist/_node-chunks/{chunk-YRPXGWKW.js → chunk-6PTV7XGR.js} +8 -8
- package/dist/_node-chunks/{chunk-4FMOVB65.js → chunk-7NJGTQ3W.js} +223 -243
- package/dist/_node-chunks/{chunk-4VGW2SQA.js → chunk-7WH7AGOR.js} +7 -7
- package/dist/_node-chunks/{camelcase-O2O7JODG.js → chunk-A7CUP23N.js} +9 -8
- package/dist/_node-chunks/{chunk-XT6O5CVI.js → chunk-B3AMFGAL.js} +30 -21
- package/dist/_node-chunks/{chunk-IB5AEYPX.js → chunk-BNOZ3EKF.js} +7 -7
- package/dist/_node-chunks/{chunk-TTQRDWDJ.js → chunk-DC7OWBHB.js} +12 -12
- package/dist/_node-chunks/{chunk-3J7DQ6TI.js → chunk-E6TLN2J2.js} +7 -7
- package/dist/_node-chunks/{chunk-JP4LEAXM.js → chunk-EAOPWIKA.js} +623 -750
- package/dist/_node-chunks/{chunk-YJHXEN7U.js → chunk-EY5PTUZL.js} +583 -180
- package/dist/_node-chunks/{chunk-JSSBBVU5.js → chunk-F3PO67U3.js} +7 -7
- package/dist/_node-chunks/chunk-FDDJHDCE.js +62 -0
- package/dist/_node-chunks/{chunk-6COBULLV.js → chunk-HEBHWRWL.js} +162 -103
- package/dist/_node-chunks/{chunk-USDZSU5L.js → chunk-HPFXREVG.js} +7 -7
- package/dist/_node-chunks/{chunk-JECCFKKM.js → chunk-IINJT47N.js} +7 -7
- package/dist/_node-chunks/{chunk-OL2HWCBH.js → chunk-JNHUDBJL.js} +7 -7
- package/dist/_node-chunks/{chunk-NF3GXIEK.js → chunk-JOXYGIZK.js} +9 -9
- package/dist/_node-chunks/{chunk-NOSGJ5PL.js → chunk-MLBTKECD.js} +7 -7
- package/dist/_node-chunks/{chunk-TYGVOW7L.js → chunk-NJXBURX7.js} +8 -8
- package/dist/_node-chunks/{chunk-AXFNB3AN.js → chunk-NKZ4UPPV.js} +7 -7
- package/dist/_node-chunks/{chunk-HAVE6SGK.js → chunk-NUVGSFQI.js} +7 -7
- package/dist/_node-chunks/chunk-R5DIBOM6.js +18 -0
- package/dist/_node-chunks/{chunk-AC3BNULF.js → chunk-RIPA4LFD.js} +22 -22
- package/dist/_node-chunks/{chunk-TBAIXCHN.js → chunk-TJIMCNYJ.js} +8 -8
- package/dist/_node-chunks/{chunk-SF2IETZ2.js → chunk-UYKQJMQY.js} +36 -23
- package/dist/_node-chunks/{chunk-7IIAUEWB.js → chunk-VQH4ZFTS.js} +8 -8
- package/dist/_node-chunks/{chunk-FWFQ2GU7.js → chunk-VSC6LSCQ.js} +6 -6
- package/dist/_node-chunks/{chunk-MOO2Y4GI.js → chunk-XZTBG2TG.js} +6 -6
- package/dist/_node-chunks/{dist-BMKSKYDI.js → dist-CGGAYWME.js} +9 -9
- package/dist/_node-chunks/{globby-DASPUXWI.js → globby-3IFB7BJC.js} +17 -13
- package/dist/_node-chunks/{lib-L6BIH4EV.js → lib-IT6OBSID.js} +36 -12
- package/dist/_node-chunks/{mdx-N42X6CFJ-2COTUDSL.js → mdx-N42X6CFJ-WM36SSZ6.js} +8 -8
- package/dist/_node-chunks/{p-limit-HVR3I7TJ.js → p-limit-3V5XIKA7.js} +7 -7
- package/dist/_node-chunks/{plugin-FZOHPRK7.js → plugin-3YREMMJJ.js} +10 -10
- package/dist/_node-chunks/{plugin-2XPSFYWZ.js → plugin-GJUBUKCT.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-FGQM2EPC.js → webpack-inject-mocker-runtime-plugin-DCJQFJQ5.js} +1307 -847
- package/dist/_node-chunks/{webpack-mock-plugin-4HOAIYSX.js → webpack-mock-plugin-XJNFAHBI.js} +9 -9
- package/dist/babel/index.d.ts +1 -1
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +638 -187
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +8 -8
- package/dist/cli/index.d.ts +61 -74
- package/dist/cli/index.js +56 -44
- package/dist/common/index.js +21 -21
- package/dist/components/index.js +27 -23
- package/dist/core-events/index.d.ts +18 -2
- package/dist/core-events/index.js +7 -1
- package/dist/core-server/index.js +4545 -4115
- package/dist/core-server/presets/common-manager.js +507 -747
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +691 -29
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
- package/dist/csf/index.js +6 -6
- package/dist/csf-tools/index.js +9 -9
- package/dist/docs-tools/index.js +4 -4
- package/dist/instrumenter/index.js +1 -1
- package/dist/manager/globals-runtime.js +9164 -18083
- package/dist/manager/globals.d.ts +0 -4
- package/dist/manager/globals.js +1 -6
- package/dist/manager/runtime.js +12967 -11396
- package/dist/manager-api/index.d.ts +2 -0
- package/dist/manager-api/index.js +303 -64
- package/dist/node-logger/index.d.ts +1 -1
- package/dist/node-logger/index.js +1136 -661
- package/dist/preview/runtime.js +12068 -21585
- package/dist/preview-api/index.d.ts +68 -67
- package/dist/preview-api/index.js +6 -6
- package/dist/router/index.js +2 -2
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +24 -24
- package/dist/test/index.js +1872 -4023
- package/dist/theming/index.d.ts +2 -2
- package/dist/theming/index.js +6 -6
- package/dist/types/index.d.ts +4 -0
- package/package.json +7 -6
- package/dist/_browser-chunks/Color-SFYJJKWL.js +0 -605
- package/dist/_browser-chunks/chunk-DHO2SA6L.js +0 -12
- package/dist/_browser-chunks/chunk-WPHPDNUA.js +0 -974
- package/dist/_node-chunks/chunk-CHJLO2LV.js +0 -62
- package/dist/_node-chunks/chunk-MNG223PY.js +0 -18
- package/dist/_node-chunks/default-browser-id-J4OIAAJ5.js +0 -1719
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_0v1evul49qdo from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_0v1evul49qdo from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_0v1evul49qdo from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_0v1evul49qdo.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_0v1evul49qdo.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_0v1evul49qdo.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
resolvePackageDir
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-TJIMCNYJ.js";
|
|
15
|
+
import "./chunk-7WH7AGOR.js";
|
|
16
16
|
import {
|
|
17
17
|
require_gen_mapping_umd,
|
|
18
18
|
require_trace_mapping_umd
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-HEBHWRWL.js";
|
|
20
20
|
import {
|
|
21
21
|
__commonJS,
|
|
22
22
|
__name,
|
|
23
23
|
__require
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XZTBG2TG.js";
|
|
25
25
|
|
|
26
26
|
// ../node_modules/lodash/_freeGlobal.js
|
|
27
27
|
var require_freeGlobal = __commonJS({
|
|
@@ -15520,18 +15520,21 @@ var require_Hook = __commonJS({
|
|
|
15520
15520
|
},
|
|
15521
15521
|
"Hook.context is deprecated and will be removed"
|
|
15522
15522
|
);
|
|
15523
|
-
|
|
15523
|
+
function CALL_DELEGATE(...args) {
|
|
15524
15524
|
this.call = this._createCall("sync");
|
|
15525
15525
|
return this.call(...args);
|
|
15526
|
-
}
|
|
15527
|
-
|
|
15526
|
+
}
|
|
15527
|
+
__name(CALL_DELEGATE, "CALL_DELEGATE");
|
|
15528
|
+
function CALL_ASYNC_DELEGATE(...args) {
|
|
15528
15529
|
this.callAsync = this._createCall("async");
|
|
15529
15530
|
return this.callAsync(...args);
|
|
15530
|
-
}
|
|
15531
|
-
|
|
15531
|
+
}
|
|
15532
|
+
__name(CALL_ASYNC_DELEGATE, "CALL_ASYNC_DELEGATE");
|
|
15533
|
+
function PROMISE_DELEGATE(...args) {
|
|
15532
15534
|
this.promise = this._createCall("promise");
|
|
15533
15535
|
return this.promise(...args);
|
|
15534
|
-
}
|
|
15536
|
+
}
|
|
15537
|
+
__name(PROMISE_DELEGATE, "PROMISE_DELEGATE");
|
|
15535
15538
|
var Hook = class {
|
|
15536
15539
|
static {
|
|
15537
15540
|
__name(this, "Hook");
|
|
@@ -15553,7 +15556,7 @@ var require_Hook = __commonJS({
|
|
|
15553
15556
|
this.tapAsync = this.tapAsync;
|
|
15554
15557
|
this.tapPromise = this.tapPromise;
|
|
15555
15558
|
}
|
|
15556
|
-
compile(
|
|
15559
|
+
compile(_options) {
|
|
15557
15560
|
throw new Error("Abstract: should be overridden");
|
|
15558
15561
|
}
|
|
15559
15562
|
_createCall(type) {
|
|
@@ -15646,12 +15649,12 @@ var require_Hook = __commonJS({
|
|
|
15646
15649
|
let i = this.taps.length;
|
|
15647
15650
|
while (i > 0) {
|
|
15648
15651
|
i--;
|
|
15649
|
-
const
|
|
15650
|
-
this.taps[i + 1] =
|
|
15651
|
-
const xStage =
|
|
15652
|
+
const tap = this.taps[i];
|
|
15653
|
+
this.taps[i + 1] = tap;
|
|
15654
|
+
const xStage = tap.stage || 0;
|
|
15652
15655
|
if (before) {
|
|
15653
|
-
if (before.has(
|
|
15654
|
-
before.delete(
|
|
15656
|
+
if (before.has(tap.name)) {
|
|
15657
|
+
before.delete(tap.name);
|
|
15655
15658
|
continue;
|
|
15656
15659
|
}
|
|
15657
15660
|
if (before.size > 0) {
|
|
@@ -15692,7 +15695,8 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15692
15695
|
case "sync":
|
|
15693
15696
|
fn = new Function(
|
|
15694
15697
|
this.args(),
|
|
15695
|
-
|
|
15698
|
+
`"use strict";
|
|
15699
|
+
${this.header()}${this.contentWithInterceptors({
|
|
15696
15700
|
onError: /* @__PURE__ */ __name((err) => `throw ${err};
|
|
15697
15701
|
`, "onError"),
|
|
15698
15702
|
onResult: /* @__PURE__ */ __name((result) => `return ${result};
|
|
@@ -15700,7 +15704,7 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15700
15704
|
resultReturns: true,
|
|
15701
15705
|
onDone: /* @__PURE__ */ __name(() => "", "onDone"),
|
|
15702
15706
|
rethrowIfPossible: true
|
|
15703
|
-
})
|
|
15707
|
+
})}`
|
|
15704
15708
|
);
|
|
15705
15709
|
break;
|
|
15706
15710
|
case "async":
|
|
@@ -15708,16 +15712,17 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15708
15712
|
this.args({
|
|
15709
15713
|
after: "_callback"
|
|
15710
15714
|
}),
|
|
15711
|
-
|
|
15715
|
+
`"use strict";
|
|
15716
|
+
${this.header()}${this.contentWithInterceptors({
|
|
15712
15717
|
onError: /* @__PURE__ */ __name((err) => `_callback(${err});
|
|
15713
15718
|
`, "onError"),
|
|
15714
15719
|
onResult: /* @__PURE__ */ __name((result) => `_callback(null, ${result});
|
|
15715
15720
|
`, "onResult"),
|
|
15716
15721
|
onDone: /* @__PURE__ */ __name(() => "_callback();\n", "onDone")
|
|
15717
|
-
})
|
|
15722
|
+
})}`
|
|
15718
15723
|
);
|
|
15719
15724
|
break;
|
|
15720
|
-
case "promise":
|
|
15725
|
+
case "promise": {
|
|
15721
15726
|
let errorHelperUsed = false;
|
|
15722
15727
|
const content = this.contentWithInterceptors({
|
|
15723
15728
|
onError: /* @__PURE__ */ __name((err) => {
|
|
@@ -15749,6 +15754,7 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15749
15754
|
code += "}));\n";
|
|
15750
15755
|
fn = new Function(this.args(), code);
|
|
15751
15756
|
break;
|
|
15757
|
+
}
|
|
15752
15758
|
}
|
|
15753
15759
|
this.deinit();
|
|
15754
15760
|
return fn;
|
|
@@ -15761,7 +15767,7 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15761
15767
|
*/
|
|
15762
15768
|
init(options) {
|
|
15763
15769
|
this.options = options;
|
|
15764
|
-
this._args = options.args
|
|
15770
|
+
this._args = [...options.args];
|
|
15765
15771
|
}
|
|
15766
15772
|
deinit() {
|
|
15767
15773
|
this.options = void 0;
|
|
@@ -15769,9 +15775,7 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15769
15775
|
}
|
|
15770
15776
|
contentWithInterceptors(options) {
|
|
15771
15777
|
if (this.options.interceptors.length > 0) {
|
|
15772
|
-
const onError = options
|
|
15773
|
-
const onResult = options.onResult;
|
|
15774
|
-
const onDone = options.onDone;
|
|
15778
|
+
const { onError, onResult, onDone } = options;
|
|
15775
15779
|
let code = "";
|
|
15776
15780
|
for (let i = 0; i < this.options.interceptors.length; i++) {
|
|
15777
15781
|
const interceptor = this.options.interceptors[i];
|
|
@@ -15823,17 +15827,12 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15823
15827
|
})
|
|
15824
15828
|
);
|
|
15825
15829
|
return code;
|
|
15826
|
-
} else {
|
|
15827
|
-
return this.content(options);
|
|
15828
15830
|
}
|
|
15831
|
+
return this.content(options);
|
|
15829
15832
|
}
|
|
15830
15833
|
header() {
|
|
15831
15834
|
let code = "";
|
|
15832
|
-
|
|
15833
|
-
code += "var _context = {};\n";
|
|
15834
|
-
} else {
|
|
15835
|
-
code += "var _context;\n";
|
|
15836
|
-
}
|
|
15835
|
+
code += this.needContext() ? "var _context = {};\n" : "var _context;\n";
|
|
15837
15836
|
code += "var _x = this._x;\n";
|
|
15838
15837
|
if (this.options.interceptors.length > 0) {
|
|
15839
15838
|
code += "var _taps = this.taps;\n";
|
|
@@ -15900,12 +15899,10 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15900
15899
|
code += "}\n";
|
|
15901
15900
|
}
|
|
15902
15901
|
break;
|
|
15903
|
-
case "async":
|
|
15902
|
+
case "async": {
|
|
15904
15903
|
let cbCode = "";
|
|
15905
|
-
|
|
15906
|
-
|
|
15907
|
-
`;
|
|
15908
|
-
else cbCode += `(function(_err${tapIndex}) {
|
|
15904
|
+
cbCode += onResult ? `(function(_err${tapIndex}, _result${tapIndex}) {
|
|
15905
|
+
` : `(function(_err${tapIndex}) {
|
|
15909
15906
|
`;
|
|
15910
15907
|
cbCode += `if(_err${tapIndex}) {
|
|
15911
15908
|
`;
|
|
@@ -15925,6 +15922,7 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15925
15922
|
})});
|
|
15926
15923
|
`;
|
|
15927
15924
|
break;
|
|
15925
|
+
}
|
|
15928
15926
|
case "promise":
|
|
15929
15927
|
code += `var _hasResult${tapIndex} = false;
|
|
15930
15928
|
`;
|
|
@@ -15950,7 +15948,9 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15950
15948
|
`;
|
|
15951
15949
|
code += `if(_hasResult${tapIndex}) throw _err${tapIndex};
|
|
15952
15950
|
`;
|
|
15953
|
-
code += onError(
|
|
15951
|
+
code += onError(
|
|
15952
|
+
`!_err${tapIndex} ? new Error('Tap function (tapPromise) rejects "' + _err${tapIndex} + '" value') : _err${tapIndex}`
|
|
15953
|
+
);
|
|
15954
15954
|
code += "});\n";
|
|
15955
15955
|
break;
|
|
15956
15956
|
}
|
|
@@ -15978,8 +15978,7 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15978
15978
|
code += `function _next${i}() {
|
|
15979
15979
|
`;
|
|
15980
15980
|
code += current();
|
|
15981
|
-
code +=
|
|
15982
|
-
`;
|
|
15981
|
+
code += "}\n";
|
|
15983
15982
|
current = /* @__PURE__ */ __name(() => `${somethingReturns ? "return " : ""}_next${i}();
|
|
15984
15983
|
`, "current");
|
|
15985
15984
|
}
|
|
@@ -15990,9 +15989,7 @@ var require_HookCodeFactory = __commonJS({
|
|
|
15990
15989
|
}, "doneBreak");
|
|
15991
15990
|
const content = this.callTap(i, {
|
|
15992
15991
|
onError: /* @__PURE__ */ __name((error) => onError(i, error, done, doneBreak), "onError"),
|
|
15993
|
-
onResult: onResult && ((result) =>
|
|
15994
|
-
return onResult(i, result, done, doneBreak);
|
|
15995
|
-
}),
|
|
15992
|
+
onResult: onResult && ((result) => onResult(i, result, done, doneBreak)),
|
|
15996
15993
|
onDone: !onResult && done,
|
|
15997
15994
|
rethrowIfPossible: rethrowIfPossible && (firstAsync < 0 || i < firstAsync)
|
|
15998
15995
|
});
|
|
@@ -16030,11 +16027,9 @@ var require_HookCodeFactory = __commonJS({
|
|
|
16030
16027
|
code2 += "_loop = true;\n";
|
|
16031
16028
|
if (!syncOnly) code2 += "if(_loopAsync) _looper();\n";
|
|
16032
16029
|
code2 += doneBreak(true);
|
|
16033
|
-
code2 +=
|
|
16034
|
-
`;
|
|
16030
|
+
code2 += "} else {\n";
|
|
16035
16031
|
code2 += next();
|
|
16036
|
-
code2 +=
|
|
16037
|
-
`;
|
|
16032
|
+
code2 += "}\n";
|
|
16038
16033
|
return code2;
|
|
16039
16034
|
}, "onResult"),
|
|
16040
16035
|
onDone: onDone && (() => {
|
|
@@ -16081,11 +16076,11 @@ var require_HookCodeFactory = __commonJS({
|
|
|
16081
16076
|
for (let i = 0; i < this.options.taps.length; i++) {
|
|
16082
16077
|
const done = /* @__PURE__ */ __name(() => {
|
|
16083
16078
|
if (onDone) return "if(--_counter === 0) _done();\n";
|
|
16084
|
-
|
|
16079
|
+
return "--_counter;";
|
|
16085
16080
|
}, "done");
|
|
16086
16081
|
const doneBreak = /* @__PURE__ */ __name((skipDone) => {
|
|
16087
16082
|
if (skipDone || !onDone) return "_counter = 0;\n";
|
|
16088
|
-
|
|
16083
|
+
return "_counter = 0;\n_done();\n";
|
|
16089
16084
|
}, "doneBreak");
|
|
16090
16085
|
code += "if(_counter <= 0) break;\n";
|
|
16091
16086
|
code += onTap(
|
|
@@ -16105,9 +16100,7 @@ var require_HookCodeFactory = __commonJS({
|
|
|
16105
16100
|
code2 += "}\n";
|
|
16106
16101
|
return code2;
|
|
16107
16102
|
}),
|
|
16108
|
-
onDone: !onResult && (() =>
|
|
16109
|
-
return done();
|
|
16110
|
-
}),
|
|
16103
|
+
onDone: !onResult && (() => done()),
|
|
16111
16104
|
rethrowIfPossible
|
|
16112
16105
|
}),
|
|
16113
16106
|
done,
|
|
@@ -16119,13 +16112,12 @@ var require_HookCodeFactory = __commonJS({
|
|
|
16119
16112
|
}
|
|
16120
16113
|
args({ before, after } = {}) {
|
|
16121
16114
|
let allArgs = this._args;
|
|
16122
|
-
if (before) allArgs = [before]
|
|
16123
|
-
if (after) allArgs = allArgs
|
|
16115
|
+
if (before) allArgs = [before, ...allArgs];
|
|
16116
|
+
if (after) allArgs = [...allArgs, after];
|
|
16124
16117
|
if (allArgs.length === 0) {
|
|
16125
16118
|
return "";
|
|
16126
|
-
} else {
|
|
16127
|
-
return allArgs.join(", ");
|
|
16128
16119
|
}
|
|
16120
|
+
return allArgs.join(", ");
|
|
16129
16121
|
}
|
|
16130
16122
|
getTapFn(idx) {
|
|
16131
16123
|
return `_x[${idx}]`;
|
|
@@ -16141,236 +16133,6 @@ var require_HookCodeFactory = __commonJS({
|
|
|
16141
16133
|
}
|
|
16142
16134
|
});
|
|
16143
16135
|
|
|
16144
|
-
// ../node_modules/tapable/lib/SyncHook.js
|
|
16145
|
-
var require_SyncHook = __commonJS({
|
|
16146
|
-
"../node_modules/tapable/lib/SyncHook.js"(exports, module) {
|
|
16147
|
-
"use strict";
|
|
16148
|
-
var Hook = require_Hook();
|
|
16149
|
-
var HookCodeFactory = require_HookCodeFactory();
|
|
16150
|
-
var SyncHookCodeFactory = class extends HookCodeFactory {
|
|
16151
|
-
static {
|
|
16152
|
-
__name(this, "SyncHookCodeFactory");
|
|
16153
|
-
}
|
|
16154
|
-
content({ onError, onDone, rethrowIfPossible }) {
|
|
16155
|
-
return this.callTapsSeries({
|
|
16156
|
-
onError: /* @__PURE__ */ __name((i, err) => onError(err), "onError"),
|
|
16157
|
-
onDone,
|
|
16158
|
-
rethrowIfPossible
|
|
16159
|
-
});
|
|
16160
|
-
}
|
|
16161
|
-
};
|
|
16162
|
-
var factory = new SyncHookCodeFactory();
|
|
16163
|
-
var TAP_ASYNC = /* @__PURE__ */ __name(() => {
|
|
16164
|
-
throw new Error("tapAsync is not supported on a SyncHook");
|
|
16165
|
-
}, "TAP_ASYNC");
|
|
16166
|
-
var TAP_PROMISE = /* @__PURE__ */ __name(() => {
|
|
16167
|
-
throw new Error("tapPromise is not supported on a SyncHook");
|
|
16168
|
-
}, "TAP_PROMISE");
|
|
16169
|
-
var COMPILE = /* @__PURE__ */ __name(function(options) {
|
|
16170
|
-
factory.setup(this, options);
|
|
16171
|
-
return factory.create(options);
|
|
16172
|
-
}, "COMPILE");
|
|
16173
|
-
function SyncHook(args = [], name = void 0) {
|
|
16174
|
-
const hook = new Hook(args, name);
|
|
16175
|
-
hook.constructor = SyncHook;
|
|
16176
|
-
hook.tapAsync = TAP_ASYNC;
|
|
16177
|
-
hook.tapPromise = TAP_PROMISE;
|
|
16178
|
-
hook.compile = COMPILE;
|
|
16179
|
-
return hook;
|
|
16180
|
-
}
|
|
16181
|
-
__name(SyncHook, "SyncHook");
|
|
16182
|
-
SyncHook.prototype = null;
|
|
16183
|
-
module.exports = SyncHook;
|
|
16184
|
-
}
|
|
16185
|
-
});
|
|
16186
|
-
|
|
16187
|
-
// ../node_modules/tapable/lib/SyncBailHook.js
|
|
16188
|
-
var require_SyncBailHook = __commonJS({
|
|
16189
|
-
"../node_modules/tapable/lib/SyncBailHook.js"(exports, module) {
|
|
16190
|
-
"use strict";
|
|
16191
|
-
var Hook = require_Hook();
|
|
16192
|
-
var HookCodeFactory = require_HookCodeFactory();
|
|
16193
|
-
var SyncBailHookCodeFactory = class extends HookCodeFactory {
|
|
16194
|
-
static {
|
|
16195
|
-
__name(this, "SyncBailHookCodeFactory");
|
|
16196
|
-
}
|
|
16197
|
-
content({ onError, onResult, resultReturns, onDone, rethrowIfPossible }) {
|
|
16198
|
-
return this.callTapsSeries({
|
|
16199
|
-
onError: /* @__PURE__ */ __name((i, err) => onError(err), "onError"),
|
|
16200
|
-
onResult: /* @__PURE__ */ __name((i, result, next) => `if(${result} !== undefined) {
|
|
16201
|
-
${onResult(
|
|
16202
|
-
result
|
|
16203
|
-
)};
|
|
16204
|
-
} else {
|
|
16205
|
-
${next()}}
|
|
16206
|
-
`, "onResult"),
|
|
16207
|
-
resultReturns,
|
|
16208
|
-
onDone,
|
|
16209
|
-
rethrowIfPossible
|
|
16210
|
-
});
|
|
16211
|
-
}
|
|
16212
|
-
};
|
|
16213
|
-
var factory = new SyncBailHookCodeFactory();
|
|
16214
|
-
var TAP_ASYNC = /* @__PURE__ */ __name(() => {
|
|
16215
|
-
throw new Error("tapAsync is not supported on a SyncBailHook");
|
|
16216
|
-
}, "TAP_ASYNC");
|
|
16217
|
-
var TAP_PROMISE = /* @__PURE__ */ __name(() => {
|
|
16218
|
-
throw new Error("tapPromise is not supported on a SyncBailHook");
|
|
16219
|
-
}, "TAP_PROMISE");
|
|
16220
|
-
var COMPILE = /* @__PURE__ */ __name(function(options) {
|
|
16221
|
-
factory.setup(this, options);
|
|
16222
|
-
return factory.create(options);
|
|
16223
|
-
}, "COMPILE");
|
|
16224
|
-
function SyncBailHook(args = [], name = void 0) {
|
|
16225
|
-
const hook = new Hook(args, name);
|
|
16226
|
-
hook.constructor = SyncBailHook;
|
|
16227
|
-
hook.tapAsync = TAP_ASYNC;
|
|
16228
|
-
hook.tapPromise = TAP_PROMISE;
|
|
16229
|
-
hook.compile = COMPILE;
|
|
16230
|
-
return hook;
|
|
16231
|
-
}
|
|
16232
|
-
__name(SyncBailHook, "SyncBailHook");
|
|
16233
|
-
SyncBailHook.prototype = null;
|
|
16234
|
-
module.exports = SyncBailHook;
|
|
16235
|
-
}
|
|
16236
|
-
});
|
|
16237
|
-
|
|
16238
|
-
// ../node_modules/tapable/lib/SyncWaterfallHook.js
|
|
16239
|
-
var require_SyncWaterfallHook = __commonJS({
|
|
16240
|
-
"../node_modules/tapable/lib/SyncWaterfallHook.js"(exports, module) {
|
|
16241
|
-
"use strict";
|
|
16242
|
-
var Hook = require_Hook();
|
|
16243
|
-
var HookCodeFactory = require_HookCodeFactory();
|
|
16244
|
-
var SyncWaterfallHookCodeFactory = class extends HookCodeFactory {
|
|
16245
|
-
static {
|
|
16246
|
-
__name(this, "SyncWaterfallHookCodeFactory");
|
|
16247
|
-
}
|
|
16248
|
-
content({ onError, onResult, resultReturns, rethrowIfPossible }) {
|
|
16249
|
-
return this.callTapsSeries({
|
|
16250
|
-
onError: /* @__PURE__ */ __name((i, err) => onError(err), "onError"),
|
|
16251
|
-
onResult: /* @__PURE__ */ __name((i, result, next) => {
|
|
16252
|
-
let code = "";
|
|
16253
|
-
code += `if(${result} !== undefined) {
|
|
16254
|
-
`;
|
|
16255
|
-
code += `${this._args[0]} = ${result};
|
|
16256
|
-
`;
|
|
16257
|
-
code += `}
|
|
16258
|
-
`;
|
|
16259
|
-
code += next();
|
|
16260
|
-
return code;
|
|
16261
|
-
}, "onResult"),
|
|
16262
|
-
onDone: /* @__PURE__ */ __name(() => onResult(this._args[0]), "onDone"),
|
|
16263
|
-
doneReturns: resultReturns,
|
|
16264
|
-
rethrowIfPossible
|
|
16265
|
-
});
|
|
16266
|
-
}
|
|
16267
|
-
};
|
|
16268
|
-
var factory = new SyncWaterfallHookCodeFactory();
|
|
16269
|
-
var TAP_ASYNC = /* @__PURE__ */ __name(() => {
|
|
16270
|
-
throw new Error("tapAsync is not supported on a SyncWaterfallHook");
|
|
16271
|
-
}, "TAP_ASYNC");
|
|
16272
|
-
var TAP_PROMISE = /* @__PURE__ */ __name(() => {
|
|
16273
|
-
throw new Error("tapPromise is not supported on a SyncWaterfallHook");
|
|
16274
|
-
}, "TAP_PROMISE");
|
|
16275
|
-
var COMPILE = /* @__PURE__ */ __name(function(options) {
|
|
16276
|
-
factory.setup(this, options);
|
|
16277
|
-
return factory.create(options);
|
|
16278
|
-
}, "COMPILE");
|
|
16279
|
-
function SyncWaterfallHook(args = [], name = void 0) {
|
|
16280
|
-
if (args.length < 1)
|
|
16281
|
-
throw new Error("Waterfall hooks must have at least one argument");
|
|
16282
|
-
const hook = new Hook(args, name);
|
|
16283
|
-
hook.constructor = SyncWaterfallHook;
|
|
16284
|
-
hook.tapAsync = TAP_ASYNC;
|
|
16285
|
-
hook.tapPromise = TAP_PROMISE;
|
|
16286
|
-
hook.compile = COMPILE;
|
|
16287
|
-
return hook;
|
|
16288
|
-
}
|
|
16289
|
-
__name(SyncWaterfallHook, "SyncWaterfallHook");
|
|
16290
|
-
SyncWaterfallHook.prototype = null;
|
|
16291
|
-
module.exports = SyncWaterfallHook;
|
|
16292
|
-
}
|
|
16293
|
-
});
|
|
16294
|
-
|
|
16295
|
-
// ../node_modules/tapable/lib/SyncLoopHook.js
|
|
16296
|
-
var require_SyncLoopHook = __commonJS({
|
|
16297
|
-
"../node_modules/tapable/lib/SyncLoopHook.js"(exports, module) {
|
|
16298
|
-
"use strict";
|
|
16299
|
-
var Hook = require_Hook();
|
|
16300
|
-
var HookCodeFactory = require_HookCodeFactory();
|
|
16301
|
-
var SyncLoopHookCodeFactory = class extends HookCodeFactory {
|
|
16302
|
-
static {
|
|
16303
|
-
__name(this, "SyncLoopHookCodeFactory");
|
|
16304
|
-
}
|
|
16305
|
-
content({ onError, onDone, rethrowIfPossible }) {
|
|
16306
|
-
return this.callTapsLooping({
|
|
16307
|
-
onError: /* @__PURE__ */ __name((i, err) => onError(err), "onError"),
|
|
16308
|
-
onDone,
|
|
16309
|
-
rethrowIfPossible
|
|
16310
|
-
});
|
|
16311
|
-
}
|
|
16312
|
-
};
|
|
16313
|
-
var factory = new SyncLoopHookCodeFactory();
|
|
16314
|
-
var TAP_ASYNC = /* @__PURE__ */ __name(() => {
|
|
16315
|
-
throw new Error("tapAsync is not supported on a SyncLoopHook");
|
|
16316
|
-
}, "TAP_ASYNC");
|
|
16317
|
-
var TAP_PROMISE = /* @__PURE__ */ __name(() => {
|
|
16318
|
-
throw new Error("tapPromise is not supported on a SyncLoopHook");
|
|
16319
|
-
}, "TAP_PROMISE");
|
|
16320
|
-
var COMPILE = /* @__PURE__ */ __name(function(options) {
|
|
16321
|
-
factory.setup(this, options);
|
|
16322
|
-
return factory.create(options);
|
|
16323
|
-
}, "COMPILE");
|
|
16324
|
-
function SyncLoopHook(args = [], name = void 0) {
|
|
16325
|
-
const hook = new Hook(args, name);
|
|
16326
|
-
hook.constructor = SyncLoopHook;
|
|
16327
|
-
hook.tapAsync = TAP_ASYNC;
|
|
16328
|
-
hook.tapPromise = TAP_PROMISE;
|
|
16329
|
-
hook.compile = COMPILE;
|
|
16330
|
-
return hook;
|
|
16331
|
-
}
|
|
16332
|
-
__name(SyncLoopHook, "SyncLoopHook");
|
|
16333
|
-
SyncLoopHook.prototype = null;
|
|
16334
|
-
module.exports = SyncLoopHook;
|
|
16335
|
-
}
|
|
16336
|
-
});
|
|
16337
|
-
|
|
16338
|
-
// ../node_modules/tapable/lib/AsyncParallelHook.js
|
|
16339
|
-
var require_AsyncParallelHook = __commonJS({
|
|
16340
|
-
"../node_modules/tapable/lib/AsyncParallelHook.js"(exports, module) {
|
|
16341
|
-
"use strict";
|
|
16342
|
-
var Hook = require_Hook();
|
|
16343
|
-
var HookCodeFactory = require_HookCodeFactory();
|
|
16344
|
-
var AsyncParallelHookCodeFactory = class extends HookCodeFactory {
|
|
16345
|
-
static {
|
|
16346
|
-
__name(this, "AsyncParallelHookCodeFactory");
|
|
16347
|
-
}
|
|
16348
|
-
content({ onError, onDone }) {
|
|
16349
|
-
return this.callTapsParallel({
|
|
16350
|
-
onError: /* @__PURE__ */ __name((i, err, done, doneBreak) => onError(err) + doneBreak(true), "onError"),
|
|
16351
|
-
onDone
|
|
16352
|
-
});
|
|
16353
|
-
}
|
|
16354
|
-
};
|
|
16355
|
-
var factory = new AsyncParallelHookCodeFactory();
|
|
16356
|
-
var COMPILE = /* @__PURE__ */ __name(function(options) {
|
|
16357
|
-
factory.setup(this, options);
|
|
16358
|
-
return factory.create(options);
|
|
16359
|
-
}, "COMPILE");
|
|
16360
|
-
function AsyncParallelHook(args = [], name = void 0) {
|
|
16361
|
-
const hook = new Hook(args, name);
|
|
16362
|
-
hook.constructor = AsyncParallelHook;
|
|
16363
|
-
hook.compile = COMPILE;
|
|
16364
|
-
hook._call = void 0;
|
|
16365
|
-
hook.call = void 0;
|
|
16366
|
-
return hook;
|
|
16367
|
-
}
|
|
16368
|
-
__name(AsyncParallelHook, "AsyncParallelHook");
|
|
16369
|
-
AsyncParallelHook.prototype = null;
|
|
16370
|
-
module.exports = AsyncParallelHook;
|
|
16371
|
-
}
|
|
16372
|
-
});
|
|
16373
|
-
|
|
16374
16136
|
// ../node_modules/tapable/lib/AsyncParallelBailHook.js
|
|
16375
16137
|
var require_AsyncParallelBailHook = __commonJS({
|
|
16376
16138
|
"../node_modules/tapable/lib/AsyncParallelBailHook.js"(exports, module) {
|
|
@@ -16421,7 +16183,7 @@ var require_AsyncParallelBailHook = __commonJS({
|
|
|
16421
16183
|
code2 += "}\n";
|
|
16422
16184
|
return code2;
|
|
16423
16185
|
}, "onResult"),
|
|
16424
|
-
onTap: /* @__PURE__ */ __name((i, run, done,
|
|
16186
|
+
onTap: /* @__PURE__ */ __name((i, run, done, _doneBreak) => {
|
|
16425
16187
|
let code2 = "";
|
|
16426
16188
|
if (i > 0) {
|
|
16427
16189
|
code2 += `if(${i} >= _results.length) {
|
|
@@ -16439,10 +16201,11 @@ var require_AsyncParallelBailHook = __commonJS({
|
|
|
16439
16201
|
}
|
|
16440
16202
|
};
|
|
16441
16203
|
var factory = new AsyncParallelBailHookCodeFactory();
|
|
16442
|
-
|
|
16204
|
+
function COMPILE(options) {
|
|
16443
16205
|
factory.setup(this, options);
|
|
16444
16206
|
return factory.create(options);
|
|
16445
|
-
}
|
|
16207
|
+
}
|
|
16208
|
+
__name(COMPILE, "COMPILE");
|
|
16446
16209
|
function AsyncParallelBailHook(args = [], name = void 0) {
|
|
16447
16210
|
const hook = new Hook(args, name);
|
|
16448
16211
|
hook.constructor = AsyncParallelBailHook;
|
|
@@ -16457,39 +16220,40 @@ var require_AsyncParallelBailHook = __commonJS({
|
|
|
16457
16220
|
}
|
|
16458
16221
|
});
|
|
16459
16222
|
|
|
16460
|
-
// ../node_modules/tapable/lib/
|
|
16461
|
-
var
|
|
16462
|
-
"../node_modules/tapable/lib/
|
|
16223
|
+
// ../node_modules/tapable/lib/AsyncParallelHook.js
|
|
16224
|
+
var require_AsyncParallelHook = __commonJS({
|
|
16225
|
+
"../node_modules/tapable/lib/AsyncParallelHook.js"(exports, module) {
|
|
16463
16226
|
"use strict";
|
|
16464
16227
|
var Hook = require_Hook();
|
|
16465
16228
|
var HookCodeFactory = require_HookCodeFactory();
|
|
16466
|
-
var
|
|
16229
|
+
var AsyncParallelHookCodeFactory = class extends HookCodeFactory {
|
|
16467
16230
|
static {
|
|
16468
|
-
__name(this, "
|
|
16231
|
+
__name(this, "AsyncParallelHookCodeFactory");
|
|
16469
16232
|
}
|
|
16470
16233
|
content({ onError, onDone }) {
|
|
16471
|
-
return this.
|
|
16472
|
-
onError: /* @__PURE__ */ __name((i, err,
|
|
16234
|
+
return this.callTapsParallel({
|
|
16235
|
+
onError: /* @__PURE__ */ __name((i, err, done, doneBreak) => onError(err) + doneBreak(true), "onError"),
|
|
16473
16236
|
onDone
|
|
16474
16237
|
});
|
|
16475
16238
|
}
|
|
16476
16239
|
};
|
|
16477
|
-
var factory = new
|
|
16478
|
-
|
|
16240
|
+
var factory = new AsyncParallelHookCodeFactory();
|
|
16241
|
+
function COMPILE(options) {
|
|
16479
16242
|
factory.setup(this, options);
|
|
16480
16243
|
return factory.create(options);
|
|
16481
|
-
}
|
|
16482
|
-
|
|
16244
|
+
}
|
|
16245
|
+
__name(COMPILE, "COMPILE");
|
|
16246
|
+
function AsyncParallelHook(args = [], name = void 0) {
|
|
16483
16247
|
const hook = new Hook(args, name);
|
|
16484
|
-
hook.constructor =
|
|
16248
|
+
hook.constructor = AsyncParallelHook;
|
|
16485
16249
|
hook.compile = COMPILE;
|
|
16486
16250
|
hook._call = void 0;
|
|
16487
16251
|
hook.call = void 0;
|
|
16488
16252
|
return hook;
|
|
16489
16253
|
}
|
|
16490
|
-
__name(
|
|
16491
|
-
|
|
16492
|
-
module.exports =
|
|
16254
|
+
__name(AsyncParallelHook, "AsyncParallelHook");
|
|
16255
|
+
AsyncParallelHook.prototype = null;
|
|
16256
|
+
module.exports = AsyncParallelHook;
|
|
16493
16257
|
}
|
|
16494
16258
|
});
|
|
16495
16259
|
|
|
@@ -16519,10 +16283,11 @@ ${next()}}
|
|
|
16519
16283
|
}
|
|
16520
16284
|
};
|
|
16521
16285
|
var factory = new AsyncSeriesBailHookCodeFactory();
|
|
16522
|
-
|
|
16286
|
+
function COMPILE(options) {
|
|
16523
16287
|
factory.setup(this, options);
|
|
16524
16288
|
return factory.create(options);
|
|
16525
|
-
}
|
|
16289
|
+
}
|
|
16290
|
+
__name(COMPILE, "COMPILE");
|
|
16526
16291
|
function AsyncSeriesBailHook(args = [], name = void 0) {
|
|
16527
16292
|
const hook = new Hook(args, name);
|
|
16528
16293
|
hook.constructor = AsyncSeriesBailHook;
|
|
@@ -16537,6 +16302,43 @@ ${next()}}
|
|
|
16537
16302
|
}
|
|
16538
16303
|
});
|
|
16539
16304
|
|
|
16305
|
+
// ../node_modules/tapable/lib/AsyncSeriesHook.js
|
|
16306
|
+
var require_AsyncSeriesHook = __commonJS({
|
|
16307
|
+
"../node_modules/tapable/lib/AsyncSeriesHook.js"(exports, module) {
|
|
16308
|
+
"use strict";
|
|
16309
|
+
var Hook = require_Hook();
|
|
16310
|
+
var HookCodeFactory = require_HookCodeFactory();
|
|
16311
|
+
var AsyncSeriesHookCodeFactory = class extends HookCodeFactory {
|
|
16312
|
+
static {
|
|
16313
|
+
__name(this, "AsyncSeriesHookCodeFactory");
|
|
16314
|
+
}
|
|
16315
|
+
content({ onError, onDone }) {
|
|
16316
|
+
return this.callTapsSeries({
|
|
16317
|
+
onError: /* @__PURE__ */ __name((i, err, next, doneBreak) => onError(err) + doneBreak(true), "onError"),
|
|
16318
|
+
onDone
|
|
16319
|
+
});
|
|
16320
|
+
}
|
|
16321
|
+
};
|
|
16322
|
+
var factory = new AsyncSeriesHookCodeFactory();
|
|
16323
|
+
function COMPILE(options) {
|
|
16324
|
+
factory.setup(this, options);
|
|
16325
|
+
return factory.create(options);
|
|
16326
|
+
}
|
|
16327
|
+
__name(COMPILE, "COMPILE");
|
|
16328
|
+
function AsyncSeriesHook(args = [], name = void 0) {
|
|
16329
|
+
const hook = new Hook(args, name);
|
|
16330
|
+
hook.constructor = AsyncSeriesHook;
|
|
16331
|
+
hook.compile = COMPILE;
|
|
16332
|
+
hook._call = void 0;
|
|
16333
|
+
hook.call = void 0;
|
|
16334
|
+
return hook;
|
|
16335
|
+
}
|
|
16336
|
+
__name(AsyncSeriesHook, "AsyncSeriesHook");
|
|
16337
|
+
AsyncSeriesHook.prototype = null;
|
|
16338
|
+
module.exports = AsyncSeriesHook;
|
|
16339
|
+
}
|
|
16340
|
+
});
|
|
16341
|
+
|
|
16540
16342
|
// ../node_modules/tapable/lib/AsyncSeriesLoopHook.js
|
|
16541
16343
|
var require_AsyncSeriesLoopHook = __commonJS({
|
|
16542
16344
|
"../node_modules/tapable/lib/AsyncSeriesLoopHook.js"(exports, module) {
|
|
@@ -16555,10 +16357,11 @@ var require_AsyncSeriesLoopHook = __commonJS({
|
|
|
16555
16357
|
}
|
|
16556
16358
|
};
|
|
16557
16359
|
var factory = new AsyncSeriesLoopHookCodeFactory();
|
|
16558
|
-
|
|
16360
|
+
function COMPILE(options) {
|
|
16559
16361
|
factory.setup(this, options);
|
|
16560
16362
|
return factory.create(options);
|
|
16561
|
-
}
|
|
16363
|
+
}
|
|
16364
|
+
__name(COMPILE, "COMPILE");
|
|
16562
16365
|
function AsyncSeriesLoopHook(args = [], name = void 0) {
|
|
16563
16366
|
const hook = new Hook(args, name);
|
|
16564
16367
|
hook.constructor = AsyncSeriesLoopHook;
|
|
@@ -16583,7 +16386,7 @@ var require_AsyncSeriesWaterfallHook = __commonJS({
|
|
|
16583
16386
|
static {
|
|
16584
16387
|
__name(this, "AsyncSeriesWaterfallHookCodeFactory");
|
|
16585
16388
|
}
|
|
16586
|
-
content({ onError, onResult,
|
|
16389
|
+
content({ onError, onResult, _onDone }) {
|
|
16587
16390
|
return this.callTapsSeries({
|
|
16588
16391
|
onError: /* @__PURE__ */ __name((i, err, next, doneBreak) => onError(err) + doneBreak(true), "onError"),
|
|
16589
16392
|
onResult: /* @__PURE__ */ __name((i, result, next) => {
|
|
@@ -16592,8 +16395,7 @@ var require_AsyncSeriesWaterfallHook = __commonJS({
|
|
|
16592
16395
|
`;
|
|
16593
16396
|
code += `${this._args[0]} = ${result};
|
|
16594
16397
|
`;
|
|
16595
|
-
code +=
|
|
16596
|
-
`;
|
|
16398
|
+
code += "}\n";
|
|
16597
16399
|
code += next();
|
|
16598
16400
|
return code;
|
|
16599
16401
|
}, "onResult"),
|
|
@@ -16602,13 +16404,15 @@ var require_AsyncSeriesWaterfallHook = __commonJS({
|
|
|
16602
16404
|
}
|
|
16603
16405
|
};
|
|
16604
16406
|
var factory = new AsyncSeriesWaterfallHookCodeFactory();
|
|
16605
|
-
|
|
16407
|
+
function COMPILE(options) {
|
|
16606
16408
|
factory.setup(this, options);
|
|
16607
16409
|
return factory.create(options);
|
|
16608
|
-
}
|
|
16410
|
+
}
|
|
16411
|
+
__name(COMPILE, "COMPILE");
|
|
16609
16412
|
function AsyncSeriesWaterfallHook(args = [], name = void 0) {
|
|
16610
|
-
if (args.length < 1)
|
|
16413
|
+
if (args.length < 1) {
|
|
16611
16414
|
throw new Error("Waterfall hooks must have at least one argument");
|
|
16415
|
+
}
|
|
16612
16416
|
const hook = new Hook(args, name);
|
|
16613
16417
|
hook.constructor = AsyncSeriesWaterfallHook;
|
|
16614
16418
|
hook.compile = COMPILE;
|
|
@@ -16665,15 +16469,15 @@ var require_HookMap = __commonJS({
|
|
|
16665
16469
|
);
|
|
16666
16470
|
}
|
|
16667
16471
|
};
|
|
16668
|
-
HookMap.prototype.tap = util.deprecate(function(key, options, fn) {
|
|
16472
|
+
HookMap.prototype.tap = util.deprecate(/* @__PURE__ */ __name(function tap(key, options, fn) {
|
|
16669
16473
|
return this.for(key).tap(options, fn);
|
|
16670
|
-
}, "HookMap#tap(key,\u2026) is deprecated. Use HookMap#for(key).tap(\u2026) instead.");
|
|
16671
|
-
HookMap.prototype.tapAsync = util.deprecate(function(key, options, fn) {
|
|
16474
|
+
}, "tap"), "HookMap#tap(key,\u2026) is deprecated. Use HookMap#for(key).tap(\u2026) instead.");
|
|
16475
|
+
HookMap.prototype.tapAsync = util.deprecate(/* @__PURE__ */ __name(function tapAsync(key, options, fn) {
|
|
16672
16476
|
return this.for(key).tapAsync(options, fn);
|
|
16673
|
-
}, "HookMap#tapAsync(key,\u2026) is deprecated. Use HookMap#for(key).tapAsync(\u2026) instead.");
|
|
16674
|
-
HookMap.prototype.tapPromise = util.deprecate(function(key, options, fn) {
|
|
16477
|
+
}, "tapAsync"), "HookMap#tapAsync(key,\u2026) is deprecated. Use HookMap#for(key).tapAsync(\u2026) instead.");
|
|
16478
|
+
HookMap.prototype.tapPromise = util.deprecate(/* @__PURE__ */ __name(function tapPromise(key, options, fn) {
|
|
16675
16479
|
return this.for(key).tapPromise(options, fn);
|
|
16676
|
-
}, "HookMap#tapPromise(key,\u2026) is deprecated. Use HookMap#for(key).tapPromise(\u2026) instead.");
|
|
16480
|
+
}, "tapPromise"), "HookMap#tapPromise(key,\u2026) is deprecated. Use HookMap#for(key).tapPromise(\u2026) instead.");
|
|
16677
16481
|
module.exports = HookMap;
|
|
16678
16482
|
}
|
|
16679
16483
|
});
|
|
@@ -16682,7 +16486,6 @@ var require_HookMap = __commonJS({
|
|
|
16682
16486
|
var require_MultiHook = __commonJS({
|
|
16683
16487
|
"../node_modules/tapable/lib/MultiHook.js"(exports, module) {
|
|
16684
16488
|
"use strict";
|
|
16685
|
-
var Hook = require_Hook();
|
|
16686
16489
|
var MultiHook = class _MultiHook {
|
|
16687
16490
|
static {
|
|
16688
16491
|
__name(this, "MultiHook");
|
|
@@ -16719,7 +16522,7 @@ var require_MultiHook = __commonJS({
|
|
|
16719
16522
|
}
|
|
16720
16523
|
withOptions(options) {
|
|
16721
16524
|
return new _MultiHook(
|
|
16722
|
-
this.hooks.map((
|
|
16525
|
+
this.hooks.map((hook) => hook.withOptions(options)),
|
|
16723
16526
|
this.name
|
|
16724
16527
|
);
|
|
16725
16528
|
}
|
|
@@ -16728,23 +16531,221 @@ var require_MultiHook = __commonJS({
|
|
|
16728
16531
|
}
|
|
16729
16532
|
});
|
|
16730
16533
|
|
|
16534
|
+
// ../node_modules/tapable/lib/SyncBailHook.js
|
|
16535
|
+
var require_SyncBailHook = __commonJS({
|
|
16536
|
+
"../node_modules/tapable/lib/SyncBailHook.js"(exports, module) {
|
|
16537
|
+
"use strict";
|
|
16538
|
+
var Hook = require_Hook();
|
|
16539
|
+
var HookCodeFactory = require_HookCodeFactory();
|
|
16540
|
+
var SyncBailHookCodeFactory = class extends HookCodeFactory {
|
|
16541
|
+
static {
|
|
16542
|
+
__name(this, "SyncBailHookCodeFactory");
|
|
16543
|
+
}
|
|
16544
|
+
content({ onError, onResult, resultReturns, onDone, rethrowIfPossible }) {
|
|
16545
|
+
return this.callTapsSeries({
|
|
16546
|
+
onError: /* @__PURE__ */ __name((i, err) => onError(err), "onError"),
|
|
16547
|
+
onResult: /* @__PURE__ */ __name((i, result, next) => `if(${result} !== undefined) {
|
|
16548
|
+
${onResult(
|
|
16549
|
+
result
|
|
16550
|
+
)};
|
|
16551
|
+
} else {
|
|
16552
|
+
${next()}}
|
|
16553
|
+
`, "onResult"),
|
|
16554
|
+
resultReturns,
|
|
16555
|
+
onDone,
|
|
16556
|
+
rethrowIfPossible
|
|
16557
|
+
});
|
|
16558
|
+
}
|
|
16559
|
+
};
|
|
16560
|
+
var factory = new SyncBailHookCodeFactory();
|
|
16561
|
+
var TAP_ASYNC = /* @__PURE__ */ __name(() => {
|
|
16562
|
+
throw new Error("tapAsync is not supported on a SyncBailHook");
|
|
16563
|
+
}, "TAP_ASYNC");
|
|
16564
|
+
var TAP_PROMISE = /* @__PURE__ */ __name(() => {
|
|
16565
|
+
throw new Error("tapPromise is not supported on a SyncBailHook");
|
|
16566
|
+
}, "TAP_PROMISE");
|
|
16567
|
+
function COMPILE(options) {
|
|
16568
|
+
factory.setup(this, options);
|
|
16569
|
+
return factory.create(options);
|
|
16570
|
+
}
|
|
16571
|
+
__name(COMPILE, "COMPILE");
|
|
16572
|
+
function SyncBailHook(args = [], name = void 0) {
|
|
16573
|
+
const hook = new Hook(args, name);
|
|
16574
|
+
hook.constructor = SyncBailHook;
|
|
16575
|
+
hook.tapAsync = TAP_ASYNC;
|
|
16576
|
+
hook.tapPromise = TAP_PROMISE;
|
|
16577
|
+
hook.compile = COMPILE;
|
|
16578
|
+
return hook;
|
|
16579
|
+
}
|
|
16580
|
+
__name(SyncBailHook, "SyncBailHook");
|
|
16581
|
+
SyncBailHook.prototype = null;
|
|
16582
|
+
module.exports = SyncBailHook;
|
|
16583
|
+
}
|
|
16584
|
+
});
|
|
16585
|
+
|
|
16586
|
+
// ../node_modules/tapable/lib/SyncHook.js
|
|
16587
|
+
var require_SyncHook = __commonJS({
|
|
16588
|
+
"../node_modules/tapable/lib/SyncHook.js"(exports, module) {
|
|
16589
|
+
"use strict";
|
|
16590
|
+
var Hook = require_Hook();
|
|
16591
|
+
var HookCodeFactory = require_HookCodeFactory();
|
|
16592
|
+
var SyncHookCodeFactory = class extends HookCodeFactory {
|
|
16593
|
+
static {
|
|
16594
|
+
__name(this, "SyncHookCodeFactory");
|
|
16595
|
+
}
|
|
16596
|
+
content({ onError, onDone, rethrowIfPossible }) {
|
|
16597
|
+
return this.callTapsSeries({
|
|
16598
|
+
onError: /* @__PURE__ */ __name((i, err) => onError(err), "onError"),
|
|
16599
|
+
onDone,
|
|
16600
|
+
rethrowIfPossible
|
|
16601
|
+
});
|
|
16602
|
+
}
|
|
16603
|
+
};
|
|
16604
|
+
var factory = new SyncHookCodeFactory();
|
|
16605
|
+
var TAP_ASYNC = /* @__PURE__ */ __name(() => {
|
|
16606
|
+
throw new Error("tapAsync is not supported on a SyncHook");
|
|
16607
|
+
}, "TAP_ASYNC");
|
|
16608
|
+
var TAP_PROMISE = /* @__PURE__ */ __name(() => {
|
|
16609
|
+
throw new Error("tapPromise is not supported on a SyncHook");
|
|
16610
|
+
}, "TAP_PROMISE");
|
|
16611
|
+
function COMPILE(options) {
|
|
16612
|
+
factory.setup(this, options);
|
|
16613
|
+
return factory.create(options);
|
|
16614
|
+
}
|
|
16615
|
+
__name(COMPILE, "COMPILE");
|
|
16616
|
+
function SyncHook(args = [], name = void 0) {
|
|
16617
|
+
const hook = new Hook(args, name);
|
|
16618
|
+
hook.constructor = SyncHook;
|
|
16619
|
+
hook.tapAsync = TAP_ASYNC;
|
|
16620
|
+
hook.tapPromise = TAP_PROMISE;
|
|
16621
|
+
hook.compile = COMPILE;
|
|
16622
|
+
return hook;
|
|
16623
|
+
}
|
|
16624
|
+
__name(SyncHook, "SyncHook");
|
|
16625
|
+
SyncHook.prototype = null;
|
|
16626
|
+
module.exports = SyncHook;
|
|
16627
|
+
}
|
|
16628
|
+
});
|
|
16629
|
+
|
|
16630
|
+
// ../node_modules/tapable/lib/SyncLoopHook.js
|
|
16631
|
+
var require_SyncLoopHook = __commonJS({
|
|
16632
|
+
"../node_modules/tapable/lib/SyncLoopHook.js"(exports, module) {
|
|
16633
|
+
"use strict";
|
|
16634
|
+
var Hook = require_Hook();
|
|
16635
|
+
var HookCodeFactory = require_HookCodeFactory();
|
|
16636
|
+
var SyncLoopHookCodeFactory = class extends HookCodeFactory {
|
|
16637
|
+
static {
|
|
16638
|
+
__name(this, "SyncLoopHookCodeFactory");
|
|
16639
|
+
}
|
|
16640
|
+
content({ onError, onDone, rethrowIfPossible }) {
|
|
16641
|
+
return this.callTapsLooping({
|
|
16642
|
+
onError: /* @__PURE__ */ __name((i, err) => onError(err), "onError"),
|
|
16643
|
+
onDone,
|
|
16644
|
+
rethrowIfPossible
|
|
16645
|
+
});
|
|
16646
|
+
}
|
|
16647
|
+
};
|
|
16648
|
+
var factory = new SyncLoopHookCodeFactory();
|
|
16649
|
+
var TAP_ASYNC = /* @__PURE__ */ __name(() => {
|
|
16650
|
+
throw new Error("tapAsync is not supported on a SyncLoopHook");
|
|
16651
|
+
}, "TAP_ASYNC");
|
|
16652
|
+
var TAP_PROMISE = /* @__PURE__ */ __name(() => {
|
|
16653
|
+
throw new Error("tapPromise is not supported on a SyncLoopHook");
|
|
16654
|
+
}, "TAP_PROMISE");
|
|
16655
|
+
function COMPILE(options) {
|
|
16656
|
+
factory.setup(this, options);
|
|
16657
|
+
return factory.create(options);
|
|
16658
|
+
}
|
|
16659
|
+
__name(COMPILE, "COMPILE");
|
|
16660
|
+
function SyncLoopHook(args = [], name = void 0) {
|
|
16661
|
+
const hook = new Hook(args, name);
|
|
16662
|
+
hook.constructor = SyncLoopHook;
|
|
16663
|
+
hook.tapAsync = TAP_ASYNC;
|
|
16664
|
+
hook.tapPromise = TAP_PROMISE;
|
|
16665
|
+
hook.compile = COMPILE;
|
|
16666
|
+
return hook;
|
|
16667
|
+
}
|
|
16668
|
+
__name(SyncLoopHook, "SyncLoopHook");
|
|
16669
|
+
SyncLoopHook.prototype = null;
|
|
16670
|
+
module.exports = SyncLoopHook;
|
|
16671
|
+
}
|
|
16672
|
+
});
|
|
16673
|
+
|
|
16674
|
+
// ../node_modules/tapable/lib/SyncWaterfallHook.js
|
|
16675
|
+
var require_SyncWaterfallHook = __commonJS({
|
|
16676
|
+
"../node_modules/tapable/lib/SyncWaterfallHook.js"(exports, module) {
|
|
16677
|
+
"use strict";
|
|
16678
|
+
var Hook = require_Hook();
|
|
16679
|
+
var HookCodeFactory = require_HookCodeFactory();
|
|
16680
|
+
var SyncWaterfallHookCodeFactory = class extends HookCodeFactory {
|
|
16681
|
+
static {
|
|
16682
|
+
__name(this, "SyncWaterfallHookCodeFactory");
|
|
16683
|
+
}
|
|
16684
|
+
content({ onError, onResult, resultReturns, rethrowIfPossible }) {
|
|
16685
|
+
return this.callTapsSeries({
|
|
16686
|
+
onError: /* @__PURE__ */ __name((i, err) => onError(err), "onError"),
|
|
16687
|
+
onResult: /* @__PURE__ */ __name((i, result, next) => {
|
|
16688
|
+
let code = "";
|
|
16689
|
+
code += `if(${result} !== undefined) {
|
|
16690
|
+
`;
|
|
16691
|
+
code += `${this._args[0]} = ${result};
|
|
16692
|
+
`;
|
|
16693
|
+
code += "}\n";
|
|
16694
|
+
code += next();
|
|
16695
|
+
return code;
|
|
16696
|
+
}, "onResult"),
|
|
16697
|
+
onDone: /* @__PURE__ */ __name(() => onResult(this._args[0]), "onDone"),
|
|
16698
|
+
doneReturns: resultReturns,
|
|
16699
|
+
rethrowIfPossible
|
|
16700
|
+
});
|
|
16701
|
+
}
|
|
16702
|
+
};
|
|
16703
|
+
var factory = new SyncWaterfallHookCodeFactory();
|
|
16704
|
+
var TAP_ASYNC = /* @__PURE__ */ __name(() => {
|
|
16705
|
+
throw new Error("tapAsync is not supported on a SyncWaterfallHook");
|
|
16706
|
+
}, "TAP_ASYNC");
|
|
16707
|
+
var TAP_PROMISE = /* @__PURE__ */ __name(() => {
|
|
16708
|
+
throw new Error("tapPromise is not supported on a SyncWaterfallHook");
|
|
16709
|
+
}, "TAP_PROMISE");
|
|
16710
|
+
function COMPILE(options) {
|
|
16711
|
+
factory.setup(this, options);
|
|
16712
|
+
return factory.create(options);
|
|
16713
|
+
}
|
|
16714
|
+
__name(COMPILE, "COMPILE");
|
|
16715
|
+
function SyncWaterfallHook(args = [], name = void 0) {
|
|
16716
|
+
if (args.length < 1) {
|
|
16717
|
+
throw new Error("Waterfall hooks must have at least one argument");
|
|
16718
|
+
}
|
|
16719
|
+
const hook = new Hook(args, name);
|
|
16720
|
+
hook.constructor = SyncWaterfallHook;
|
|
16721
|
+
hook.tapAsync = TAP_ASYNC;
|
|
16722
|
+
hook.tapPromise = TAP_PROMISE;
|
|
16723
|
+
hook.compile = COMPILE;
|
|
16724
|
+
return hook;
|
|
16725
|
+
}
|
|
16726
|
+
__name(SyncWaterfallHook, "SyncWaterfallHook");
|
|
16727
|
+
SyncWaterfallHook.prototype = null;
|
|
16728
|
+
module.exports = SyncWaterfallHook;
|
|
16729
|
+
}
|
|
16730
|
+
});
|
|
16731
|
+
|
|
16731
16732
|
// ../node_modules/tapable/lib/index.js
|
|
16732
16733
|
var require_lib9 = __commonJS({
|
|
16733
|
-
"../node_modules/tapable/lib/index.js"(exports) {
|
|
16734
|
+
"../node_modules/tapable/lib/index.js"(exports, module) {
|
|
16734
16735
|
"use strict";
|
|
16735
|
-
exports.
|
|
16736
|
-
exports.
|
|
16737
|
-
exports.
|
|
16738
|
-
exports.
|
|
16739
|
-
exports.
|
|
16740
|
-
exports.
|
|
16741
|
-
exports.
|
|
16742
|
-
exports.
|
|
16743
|
-
exports.
|
|
16744
|
-
exports.
|
|
16745
|
-
exports.
|
|
16746
|
-
exports.
|
|
16747
|
-
exports.
|
|
16736
|
+
module.exports.AsyncParallelBailHook = require_AsyncParallelBailHook();
|
|
16737
|
+
module.exports.AsyncParallelHook = require_AsyncParallelHook();
|
|
16738
|
+
module.exports.AsyncSeriesBailHook = require_AsyncSeriesBailHook();
|
|
16739
|
+
module.exports.AsyncSeriesHook = require_AsyncSeriesHook();
|
|
16740
|
+
module.exports.AsyncSeriesLoopHook = require_AsyncSeriesLoopHook();
|
|
16741
|
+
module.exports.AsyncSeriesWaterfallHook = require_AsyncSeriesWaterfallHook();
|
|
16742
|
+
module.exports.HookMap = require_HookMap();
|
|
16743
|
+
module.exports.MultiHook = require_MultiHook();
|
|
16744
|
+
module.exports.SyncBailHook = require_SyncBailHook();
|
|
16745
|
+
module.exports.SyncHook = require_SyncHook();
|
|
16746
|
+
module.exports.SyncLoopHook = require_SyncLoopHook();
|
|
16747
|
+
module.exports.SyncWaterfallHook = require_SyncWaterfallHook();
|
|
16748
|
+
module.exports.__esModule = true;
|
|
16748
16749
|
}
|
|
16749
16750
|
});
|
|
16750
16751
|
|
|
@@ -31636,99 +31637,163 @@ var require_tokenchain = __commonJS({
|
|
|
31636
31637
|
}
|
|
31637
31638
|
});
|
|
31638
31639
|
|
|
31639
|
-
// ../node_modules/@jridgewell/source-map/dist/source-map.
|
|
31640
|
-
var
|
|
31641
|
-
"../node_modules/@jridgewell/source-map/dist/source-map.
|
|
31642
|
-
|
|
31643
|
-
|
|
31644
|
-
|
|
31645
|
-
|
|
31646
|
-
|
|
31647
|
-
|
|
31648
|
-
|
|
31640
|
+
// ../node_modules/@jridgewell/source-map/dist/source-map.umd.js
|
|
31641
|
+
var require_source_map_umd = __commonJS({
|
|
31642
|
+
"../node_modules/@jridgewell/source-map/dist/source-map.umd.js"(exports, module) {
|
|
31643
|
+
(function(global2, factory) {
|
|
31644
|
+
if (typeof exports === "object" && typeof module !== "undefined") {
|
|
31645
|
+
factory(module, require_gen_mapping_umd(), require_trace_mapping_umd());
|
|
31646
|
+
module.exports = def(module);
|
|
31647
|
+
} else if (typeof define === "function" && define.amd) {
|
|
31648
|
+
define(["module", "@jridgewell/gen-mapping", "@jridgewell/trace-mapping"], function(mod) {
|
|
31649
|
+
factory.apply(this, arguments);
|
|
31650
|
+
mod.exports = def(mod);
|
|
31651
|
+
});
|
|
31652
|
+
} else {
|
|
31653
|
+
const mod = { exports: {} };
|
|
31654
|
+
factory(mod, global2.genMapping, global2.traceMapping);
|
|
31655
|
+
global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self;
|
|
31656
|
+
global2.sourceMap = def(mod);
|
|
31649
31657
|
}
|
|
31650
|
-
|
|
31651
|
-
|
|
31652
|
-
this.file = trace.file;
|
|
31653
|
-
this.names = trace.names;
|
|
31654
|
-
this.sourceRoot = trace.sourceRoot;
|
|
31655
|
-
this.sources = trace.resolvedSources;
|
|
31656
|
-
this.sourcesContent = trace.sourcesContent;
|
|
31657
|
-
this.version = trace.version;
|
|
31658
|
+
function def(m) {
|
|
31659
|
+
return "default" in m.exports ? m.exports.default : m.exports;
|
|
31658
31660
|
}
|
|
31659
|
-
|
|
31660
|
-
|
|
31661
|
-
|
|
31661
|
+
__name(def, "def");
|
|
31662
|
+
})(exports, function(module2, require_genMapping, require_traceMapping) {
|
|
31663
|
+
"use strict";
|
|
31664
|
+
var __create = Object.create;
|
|
31665
|
+
var __defProp = Object.defineProperty;
|
|
31666
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
31667
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
31668
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
31669
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
31670
|
+
var __commonJS2 = /* @__PURE__ */ __name((cb, mod) => /* @__PURE__ */ __name(function __require2() {
|
|
31671
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
31672
|
+
}, "__require"), "__commonJS");
|
|
31673
|
+
var __export = /* @__PURE__ */ __name((target, all) => {
|
|
31674
|
+
for (var name in all)
|
|
31675
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
31676
|
+
}, "__export");
|
|
31677
|
+
var __copyProps = /* @__PURE__ */ __name((to, from, except, desc) => {
|
|
31678
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
31679
|
+
for (let key of __getOwnPropNames(from))
|
|
31680
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31681
|
+
__defProp(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
31682
|
+
}
|
|
31683
|
+
return to;
|
|
31684
|
+
}, "__copyProps");
|
|
31685
|
+
var __toESM = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
31686
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
31687
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31688
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
31689
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
31690
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31691
|
+
mod
|
|
31692
|
+
)), "__toESM");
|
|
31693
|
+
var __toCommonJS = /* @__PURE__ */ __name((mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
31694
|
+
var require_trace_mapping = __commonJS2({
|
|
31695
|
+
"umd:@jridgewell/trace-mapping"(exports2, module22) {
|
|
31696
|
+
module22.exports = require_traceMapping;
|
|
31662
31697
|
}
|
|
31663
|
-
|
|
31664
|
-
|
|
31665
|
-
|
|
31666
|
-
|
|
31667
|
-
|
|
31668
|
-
|
|
31669
|
-
|
|
31670
|
-
|
|
31671
|
-
|
|
31672
|
-
|
|
31673
|
-
}
|
|
31674
|
-
|
|
31675
|
-
|
|
31676
|
-
|
|
31677
|
-
|
|
31678
|
-
|
|
31679
|
-
|
|
31698
|
+
});
|
|
31699
|
+
var require_gen_mapping = __commonJS2({
|
|
31700
|
+
"umd:@jridgewell/gen-mapping"(exports2, module22) {
|
|
31701
|
+
module22.exports = require_genMapping;
|
|
31702
|
+
}
|
|
31703
|
+
});
|
|
31704
|
+
var source_map_exports = {};
|
|
31705
|
+
__export(source_map_exports, {
|
|
31706
|
+
SourceMapConsumer: /* @__PURE__ */ __name(() => SourceMapConsumer, "SourceMapConsumer"),
|
|
31707
|
+
SourceMapGenerator: /* @__PURE__ */ __name(() => SourceMapGenerator, "SourceMapGenerator")
|
|
31708
|
+
});
|
|
31709
|
+
module2.exports = __toCommonJS(source_map_exports);
|
|
31710
|
+
var import_trace_mapping = __toESM(require_trace_mapping());
|
|
31711
|
+
var import_gen_mapping = __toESM(require_gen_mapping());
|
|
31712
|
+
var SourceMapConsumer = class _SourceMapConsumer {
|
|
31713
|
+
static {
|
|
31714
|
+
__name(this, "_SourceMapConsumer");
|
|
31715
|
+
}
|
|
31716
|
+
constructor(map, mapUrl) {
|
|
31717
|
+
const trace = this._map = new import_trace_mapping.AnyMap(map, mapUrl);
|
|
31718
|
+
this.file = trace.file;
|
|
31719
|
+
this.names = trace.names;
|
|
31720
|
+
this.sourceRoot = trace.sourceRoot;
|
|
31721
|
+
this.sources = trace.resolvedSources;
|
|
31722
|
+
this.sourcesContent = trace.sourcesContent;
|
|
31723
|
+
this.version = trace.version;
|
|
31724
|
+
}
|
|
31725
|
+
static fromSourceMap(map, mapUrl) {
|
|
31726
|
+
if (map.toDecodedMap) {
|
|
31727
|
+
return new _SourceMapConsumer(map.toDecodedMap(), mapUrl);
|
|
31728
|
+
}
|
|
31729
|
+
return new _SourceMapConsumer(map.toJSON(), mapUrl);
|
|
31730
|
+
}
|
|
31731
|
+
get mappings() {
|
|
31732
|
+
return (0, import_trace_mapping.encodedMappings)(this._map);
|
|
31733
|
+
}
|
|
31734
|
+
originalPositionFor(needle) {
|
|
31735
|
+
return (0, import_trace_mapping.originalPositionFor)(this._map, needle);
|
|
31736
|
+
}
|
|
31737
|
+
generatedPositionFor(originalPosition) {
|
|
31738
|
+
return (0, import_trace_mapping.generatedPositionFor)(this._map, originalPosition);
|
|
31680
31739
|
}
|
|
31681
|
-
|
|
31682
|
-
|
|
31740
|
+
allGeneratedPositionsFor(originalPosition) {
|
|
31741
|
+
return (0, import_trace_mapping.allGeneratedPositionsFor)(this._map, originalPosition);
|
|
31742
|
+
}
|
|
31743
|
+
hasContentsOfAllSources() {
|
|
31744
|
+
if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {
|
|
31683
31745
|
return false;
|
|
31684
31746
|
}
|
|
31747
|
+
for (const content of this.sourcesContent) {
|
|
31748
|
+
if (content == null) {
|
|
31749
|
+
return false;
|
|
31750
|
+
}
|
|
31751
|
+
}
|
|
31752
|
+
return true;
|
|
31685
31753
|
}
|
|
31686
|
-
|
|
31687
|
-
|
|
31688
|
-
|
|
31689
|
-
|
|
31690
|
-
|
|
31691
|
-
|
|
31754
|
+
sourceContentFor(source, nullOnMissing) {
|
|
31755
|
+
const sourceContent = (0, import_trace_mapping.sourceContentFor)(this._map, source);
|
|
31756
|
+
if (sourceContent != null) {
|
|
31757
|
+
return sourceContent;
|
|
31758
|
+
}
|
|
31759
|
+
if (nullOnMissing) {
|
|
31760
|
+
return null;
|
|
31761
|
+
}
|
|
31762
|
+
throw new Error(`"${source}" is not in the SourceMap.`);
|
|
31692
31763
|
}
|
|
31693
|
-
|
|
31694
|
-
|
|
31764
|
+
eachMapping(callback, context) {
|
|
31765
|
+
(0, import_trace_mapping.eachMapping)(this._map, context ? callback.bind(context) : callback);
|
|
31695
31766
|
}
|
|
31696
|
-
|
|
31697
|
-
|
|
31698
|
-
|
|
31699
|
-
|
|
31700
|
-
|
|
31701
|
-
|
|
31702
|
-
|
|
31703
|
-
|
|
31704
|
-
|
|
31705
|
-
|
|
31706
|
-
|
|
31707
|
-
|
|
31708
|
-
|
|
31709
|
-
|
|
31710
|
-
|
|
31711
|
-
|
|
31712
|
-
|
|
31713
|
-
|
|
31714
|
-
|
|
31715
|
-
|
|
31716
|
-
|
|
31717
|
-
|
|
31718
|
-
|
|
31719
|
-
|
|
31720
|
-
|
|
31721
|
-
|
|
31722
|
-
|
|
31723
|
-
|
|
31724
|
-
|
|
31725
|
-
|
|
31726
|
-
toDecodedMap() {
|
|
31727
|
-
return genMapping.toDecodedMap(this._map);
|
|
31728
|
-
}
|
|
31729
|
-
};
|
|
31730
|
-
exports.SourceMapConsumer = SourceMapConsumer;
|
|
31731
|
-
exports.SourceMapGenerator = SourceMapGenerator;
|
|
31767
|
+
destroy() {
|
|
31768
|
+
}
|
|
31769
|
+
};
|
|
31770
|
+
var SourceMapGenerator = class _SourceMapGenerator {
|
|
31771
|
+
static {
|
|
31772
|
+
__name(this, "_SourceMapGenerator");
|
|
31773
|
+
}
|
|
31774
|
+
constructor(opts) {
|
|
31775
|
+
this._map = opts instanceof import_gen_mapping.GenMapping ? opts : new import_gen_mapping.GenMapping(opts);
|
|
31776
|
+
}
|
|
31777
|
+
static fromSourceMap(consumer) {
|
|
31778
|
+
return new _SourceMapGenerator((0, import_gen_mapping.fromMap)(consumer));
|
|
31779
|
+
}
|
|
31780
|
+
addMapping(mapping) {
|
|
31781
|
+
(0, import_gen_mapping.maybeAddMapping)(this._map, mapping);
|
|
31782
|
+
}
|
|
31783
|
+
setSourceContent(source, content) {
|
|
31784
|
+
(0, import_gen_mapping.setSourceContent)(this._map, source, content);
|
|
31785
|
+
}
|
|
31786
|
+
toJSON() {
|
|
31787
|
+
return (0, import_gen_mapping.toEncodedMap)(this._map);
|
|
31788
|
+
}
|
|
31789
|
+
toString() {
|
|
31790
|
+
return JSON.stringify(this.toJSON());
|
|
31791
|
+
}
|
|
31792
|
+
toDecodedMap() {
|
|
31793
|
+
return (0, import_gen_mapping.toDecodedMap)(this._map);
|
|
31794
|
+
}
|
|
31795
|
+
};
|
|
31796
|
+
});
|
|
31732
31797
|
}
|
|
31733
31798
|
});
|
|
31734
31799
|
|
|
@@ -37404,7 +37469,7 @@ var require_acorn = __commonJS({
|
|
|
37404
37469
|
var require_bundle_min = __commonJS({
|
|
37405
37470
|
"../node_modules/terser/dist/bundle.min.js"(exports, module) {
|
|
37406
37471
|
(function(global2, factory) {
|
|
37407
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports,
|
|
37472
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require_source_map_umd()) : typeof define === "function" && define.amd ? define(["exports", "@jridgewell/source-map"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.Terser = {}, global2.sourceMap));
|
|
37408
37473
|
})(exports, function(exports2, sourceMap) {
|
|
37409
37474
|
"use strict";
|
|
37410
37475
|
function characters(str) {
|
|
@@ -37644,13 +37709,13 @@ var require_bundle_min = __commonJS({
|
|
|
37644
37709
|
KEYWORDS_ATOM = makePredicate(KEYWORDS_ATOM);
|
|
37645
37710
|
ALL_RESERVED_WORDS = makePredicate(ALL_RESERVED_WORDS);
|
|
37646
37711
|
var OPERATOR_CHARS = makePredicate(characters("+-*&%=<>!?|~^"));
|
|
37647
|
-
var RE_NUM_LITERAL = /[0-9a-f]/i;
|
|
37648
37712
|
var RE_HEX_NUMBER = /^0x[0-9a-f]+$/i;
|
|
37649
37713
|
var RE_OCT_NUMBER = /^0[0-7]+$/;
|
|
37650
37714
|
var RE_ES6_OCT_NUMBER = /^0o[0-7]+$/i;
|
|
37651
37715
|
var RE_BIN_NUMBER = /^0b[01]+$/i;
|
|
37652
37716
|
var RE_DEC_NUMBER = /^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i;
|
|
37653
37717
|
var RE_BIG_INT = /^(0[xob])?[0-9a-f]+n$/i;
|
|
37718
|
+
var RE_KEYWORD_RELATIONAL_OPERATORS = /in(?:stanceof)?/y;
|
|
37654
37719
|
var OPERATORS = makePredicate([
|
|
37655
37720
|
"in",
|
|
37656
37721
|
"instanceof",
|
|
@@ -37950,6 +38015,55 @@ var require_bundle_min = __commonJS({
|
|
|
37950
38015
|
next();
|
|
37951
38016
|
}
|
|
37952
38017
|
__name(skip_whitespace, "skip_whitespace");
|
|
38018
|
+
function peek_next_token_start_or_newline() {
|
|
38019
|
+
var pos = S.pos;
|
|
38020
|
+
for (var in_multiline_comment = false; pos < S.text.length; ) {
|
|
38021
|
+
var ch = get_full_char(S.text, pos);
|
|
38022
|
+
if (NEWLINE_CHARS.has(ch)) {
|
|
38023
|
+
return { char: ch, pos };
|
|
38024
|
+
} else if (in_multiline_comment) {
|
|
38025
|
+
if (ch == "*" && get_full_char(S.text, pos + 1) == "/") {
|
|
38026
|
+
pos += 2;
|
|
38027
|
+
in_multiline_comment = false;
|
|
38028
|
+
} else {
|
|
38029
|
+
pos++;
|
|
38030
|
+
}
|
|
38031
|
+
} else if (!WHITESPACE_CHARS.has(ch)) {
|
|
38032
|
+
if (ch == "/") {
|
|
38033
|
+
var next_ch = get_full_char(S.text, pos + 1);
|
|
38034
|
+
if (next_ch == "/") {
|
|
38035
|
+
pos = find_eol();
|
|
38036
|
+
return { char: get_full_char(S.text, pos), pos };
|
|
38037
|
+
} else if (next_ch == "*") {
|
|
38038
|
+
in_multiline_comment = true;
|
|
38039
|
+
pos += 2;
|
|
38040
|
+
continue;
|
|
38041
|
+
}
|
|
38042
|
+
}
|
|
38043
|
+
return { char: ch, pos };
|
|
38044
|
+
} else {
|
|
38045
|
+
pos++;
|
|
38046
|
+
}
|
|
38047
|
+
}
|
|
38048
|
+
return { char: null, pos };
|
|
38049
|
+
}
|
|
38050
|
+
__name(peek_next_token_start_or_newline, "peek_next_token_start_or_newline");
|
|
38051
|
+
function ch_starts_binding_identifier(ch, pos) {
|
|
38052
|
+
if (ch == "\\") {
|
|
38053
|
+
return true;
|
|
38054
|
+
} else if (is_identifier_start(ch)) {
|
|
38055
|
+
RE_KEYWORD_RELATIONAL_OPERATORS.lastIndex = pos;
|
|
38056
|
+
if (RE_KEYWORD_RELATIONAL_OPERATORS.test(S.text)) {
|
|
38057
|
+
var after = get_full_char(S.text, RE_KEYWORD_RELATIONAL_OPERATORS.lastIndex);
|
|
38058
|
+
if (!is_identifier_char(after) && after != "\\") {
|
|
38059
|
+
return false;
|
|
38060
|
+
}
|
|
38061
|
+
}
|
|
38062
|
+
return true;
|
|
38063
|
+
}
|
|
38064
|
+
return false;
|
|
38065
|
+
}
|
|
38066
|
+
__name(ch_starts_binding_identifier, "ch_starts_binding_identifier");
|
|
37953
38067
|
function read_while(pred) {
|
|
37954
38068
|
var ret = "", ch, i = 0;
|
|
37955
38069
|
while ((ch = peek()) && pred(ch, i++))
|
|
@@ -37988,12 +38102,11 @@ var require_bundle_min = __commonJS({
|
|
|
37988
38102
|
return after_e;
|
|
37989
38103
|
case (after_e = false, 46):
|
|
37990
38104
|
return !has_dot && !has_x && !has_e ? has_dot = true : false;
|
|
38105
|
+
case 110:
|
|
38106
|
+
is_big_int = true;
|
|
38107
|
+
return true;
|
|
37991
38108
|
}
|
|
37992
|
-
|
|
37993
|
-
is_big_int = true;
|
|
37994
|
-
return true;
|
|
37995
|
-
}
|
|
37996
|
-
return RE_NUM_LITERAL.test(ch);
|
|
38109
|
+
return code >= 48 && code <= 57 || code >= 97 && code <= 102 || code >= 65 && code <= 70;
|
|
37997
38110
|
});
|
|
37998
38111
|
if (prefix) num = prefix + num;
|
|
37999
38112
|
LATEST_RAW = num;
|
|
@@ -38008,7 +38121,7 @@ var require_bundle_min = __commonJS({
|
|
|
38008
38121
|
}
|
|
38009
38122
|
num = num.replace(/_/g, "");
|
|
38010
38123
|
}
|
|
38011
|
-
if (
|
|
38124
|
+
if (is_big_int) {
|
|
38012
38125
|
const without_n = num.slice(0, -1);
|
|
38013
38126
|
const allow_e = RE_HEX_NUMBER.test(without_n);
|
|
38014
38127
|
const valid2 = parse_js_number(without_n, allow_e);
|
|
@@ -38137,7 +38250,7 @@ var require_bundle_min = __commonJS({
|
|
|
38137
38250
|
} else if (ch == "$" && peek() == "{") {
|
|
38138
38251
|
next(true, true);
|
|
38139
38252
|
S.brace_counter++;
|
|
38140
|
-
tok = token(begin ? "template_head" : "
|
|
38253
|
+
tok = token(begin ? "template_head" : "template_cont", content);
|
|
38141
38254
|
TEMPLATE_RAWS.set(tok, raw);
|
|
38142
38255
|
tok.template_end = false;
|
|
38143
38256
|
return tok;
|
|
@@ -38152,7 +38265,7 @@ var require_bundle_min = __commonJS({
|
|
|
38152
38265
|
content += ch;
|
|
38153
38266
|
}
|
|
38154
38267
|
S.template_braces.pop();
|
|
38155
|
-
tok = token(begin ? "template_head" : "
|
|
38268
|
+
tok = token(begin ? "template_head" : "template_cont", content);
|
|
38156
38269
|
TEMPLATE_RAWS.set(tok, raw);
|
|
38157
38270
|
tok.template_end = true;
|
|
38158
38271
|
return tok;
|
|
@@ -38183,7 +38296,17 @@ var require_bundle_min = __commonJS({
|
|
|
38183
38296
|
S.regex_allowed = regex_allowed;
|
|
38184
38297
|
return next_token;
|
|
38185
38298
|
});
|
|
38186
|
-
var read_name =
|
|
38299
|
+
var read_name = /* @__PURE__ */ __name(function() {
|
|
38300
|
+
let start = S.pos, end = start - 1, ch = "c";
|
|
38301
|
+
while ((ch = S.text.charAt(++end)) && (ch >= "a" && ch <= "z" || ch >= "A" && ch <= "Z")) ;
|
|
38302
|
+
if (end > start + 1 && ch && ch !== "\\" && !is_identifier_char(ch) && ch <= "~") {
|
|
38303
|
+
S.pos += end - start;
|
|
38304
|
+
S.col += end - start;
|
|
38305
|
+
return S.text.slice(start, S.pos);
|
|
38306
|
+
}
|
|
38307
|
+
return read_name_hard();
|
|
38308
|
+
}, "read_name");
|
|
38309
|
+
var read_name_hard = with_eof_error("Unterminated identifier name", function() {
|
|
38187
38310
|
var name = [], ch, escaped = false;
|
|
38188
38311
|
var read_escaped_identifier_char = /* @__PURE__ */ __name(function() {
|
|
38189
38312
|
escaped = true;
|
|
@@ -38417,6 +38540,8 @@ var require_bundle_min = __commonJS({
|
|
|
38417
38540
|
next_token.has_directive = function(directive) {
|
|
38418
38541
|
return S.directives[directive] > 0;
|
|
38419
38542
|
};
|
|
38543
|
+
next_token.peek_next_token_start_or_newline = peek_next_token_start_or_newline;
|
|
38544
|
+
next_token.ch_starts_binding_identifier = ch_starts_binding_identifier;
|
|
38420
38545
|
return next_token;
|
|
38421
38546
|
}
|
|
38422
38547
|
__name(tokenizer, "tokenizer");
|
|
@@ -38615,9 +38740,6 @@ var require_bundle_min = __commonJS({
|
|
|
38615
38740
|
case "atom":
|
|
38616
38741
|
return simple_statement();
|
|
38617
38742
|
case "name":
|
|
38618
|
-
case "privatename":
|
|
38619
|
-
if (is("privatename") && !S.in_class)
|
|
38620
|
-
croak("Private field must be used in an enclosing class");
|
|
38621
38743
|
if (S.token.value == "async" && is_token(peek(), "keyword", "function")) {
|
|
38622
38744
|
next();
|
|
38623
38745
|
next();
|
|
@@ -38632,7 +38754,26 @@ var require_bundle_min = __commonJS({
|
|
|
38632
38754
|
semicolon();
|
|
38633
38755
|
return node;
|
|
38634
38756
|
}
|
|
38757
|
+
if (S.token.value == "using" && is_token(peek(), "name") && !has_newline_before(peek())) {
|
|
38758
|
+
next();
|
|
38759
|
+
var node = using_();
|
|
38760
|
+
semicolon();
|
|
38761
|
+
return node;
|
|
38762
|
+
}
|
|
38763
|
+
if (S.token.value == "await" && can_await() && is_token(peek(), "name", "using") && !has_newline_before(peek())) {
|
|
38764
|
+
var next_next = S.input.peek_next_token_start_or_newline();
|
|
38765
|
+
if (S.input.ch_starts_binding_identifier(next_next.char, next_next.pos)) {
|
|
38766
|
+
next();
|
|
38767
|
+
var node = await_using_();
|
|
38768
|
+
semicolon();
|
|
38769
|
+
return node;
|
|
38770
|
+
}
|
|
38771
|
+
}
|
|
38635
38772
|
return is_token(peek(), "punc", ":") ? labeled_statement() : simple_statement();
|
|
38773
|
+
case "privatename":
|
|
38774
|
+
if (!S.in_class)
|
|
38775
|
+
croak("Private field must be used in an enclosing class");
|
|
38776
|
+
return simple_statement();
|
|
38636
38777
|
case "punc":
|
|
38637
38778
|
switch (S.token.value) {
|
|
38638
38779
|
case "{":
|
|
@@ -38833,16 +38974,19 @@ var require_bundle_min = __commonJS({
|
|
|
38833
38974
|
expect("(");
|
|
38834
38975
|
var init = null;
|
|
38835
38976
|
if (!is("punc", ";")) {
|
|
38836
|
-
init = is("keyword", "var") ? (next(), var_(true)) : is("keyword", "let") ? (next(), let_(true)) : is("keyword", "const") ? (next(), const_(true)) : expression(true, true);
|
|
38977
|
+
init = is("keyword", "var") ? (next(), var_(true)) : is("keyword", "let") ? (next(), let_(true)) : is("keyword", "const") ? (next(), const_(true)) : is("name", "using") && is_token(peek(), "name") && (peek().value != "of" || S.input.peek_next_token_start_or_newline().char == "=") ? (next(), using_(true)) : is("name", "await") && can_await() && is_token(peek(), "name", "using") ? (next(), await_using_(true)) : expression(true, true);
|
|
38837
38978
|
var is_in = is("operator", "in");
|
|
38838
38979
|
var is_of = is("name", "of");
|
|
38839
38980
|
if (await_tok && !is_of) {
|
|
38840
38981
|
token_error(await_tok, for_await_error);
|
|
38841
38982
|
}
|
|
38842
38983
|
if (is_in || is_of) {
|
|
38843
|
-
if (init instanceof
|
|
38984
|
+
if (init instanceof AST_DefinitionsLike) {
|
|
38844
38985
|
if (init.definitions.length > 1)
|
|
38845
38986
|
token_error(init.start, "Only one variable declaration allowed in for..in loop");
|
|
38987
|
+
if (is_in && init instanceof AST_Using) {
|
|
38988
|
+
token_error(init.start, "Invalid using declaration in for..in loop");
|
|
38989
|
+
}
|
|
38846
38990
|
} else if (!(is_assignable(init) || (init = to_destructuring(init)) instanceof AST_Destructuring)) {
|
|
38847
38991
|
token_error(init.start, "Invalid left-hand side in for..in loop");
|
|
38848
38992
|
}
|
|
@@ -38876,7 +39020,7 @@ var require_bundle_min = __commonJS({
|
|
|
38876
39020
|
}
|
|
38877
39021
|
__name(regular_for, "regular_for");
|
|
38878
39022
|
function for_of(init, is_await) {
|
|
38879
|
-
var lhs = init instanceof
|
|
39023
|
+
var lhs = init instanceof AST_DefinitionsLike ? init.definitions[0].name : null;
|
|
38880
39024
|
var obj = expression(true);
|
|
38881
39025
|
expect(")");
|
|
38882
39026
|
return new AST_ForOf({
|
|
@@ -38908,19 +39052,18 @@ var require_bundle_min = __commonJS({
|
|
|
38908
39052
|
}
|
|
38909
39053
|
expect_token("arrow", "=>");
|
|
38910
39054
|
var body = _function_body(is("punc", "{"), false, is_async);
|
|
38911
|
-
var end = body instanceof Array && body.length ? body[body.length - 1].end : body instanceof Array ? start : body.end;
|
|
38912
39055
|
return new AST_Arrow({
|
|
38913
39056
|
start,
|
|
38914
|
-
end,
|
|
39057
|
+
end: body.end,
|
|
38915
39058
|
async: is_async,
|
|
38916
39059
|
argnames,
|
|
38917
39060
|
body
|
|
38918
39061
|
});
|
|
38919
39062
|
}, "arrow_function");
|
|
38920
|
-
var function_ = /* @__PURE__ */ __name(function(ctor,
|
|
39063
|
+
var function_ = /* @__PURE__ */ __name(function(ctor, is_generator, is_async, is_export_default) {
|
|
38921
39064
|
var in_statement = ctor === AST_Defun;
|
|
38922
|
-
|
|
38923
|
-
|
|
39065
|
+
if (is("operator", "*")) {
|
|
39066
|
+
is_generator = true;
|
|
38924
39067
|
next();
|
|
38925
39068
|
}
|
|
38926
39069
|
var name = is("name") ? as_symbol(in_statement ? AST_SymbolDefun : AST_SymbolLambda) : null;
|
|
@@ -38934,7 +39077,7 @@ var require_bundle_min = __commonJS({
|
|
|
38934
39077
|
if (name && ctor !== AST_Accessor && !(name instanceof AST_SymbolDeclaration))
|
|
38935
39078
|
unexpected(prev());
|
|
38936
39079
|
var args = [];
|
|
38937
|
-
var body = _function_body(true, is_generator
|
|
39080
|
+
var body = _function_body(true, is_generator, is_async, name, args);
|
|
38938
39081
|
return new ctor({
|
|
38939
39082
|
start: args.start,
|
|
38940
39083
|
end: body.end,
|
|
@@ -39320,18 +39463,10 @@ var require_bundle_min = __commonJS({
|
|
|
39320
39463
|
}
|
|
39321
39464
|
__name(_await_expression, "_await_expression");
|
|
39322
39465
|
function _yield_expression() {
|
|
39323
|
-
if (!is_in_generator()) {
|
|
39324
|
-
croak(
|
|
39325
|
-
"Unexpected yield expression outside generator function",
|
|
39326
|
-
S.prev.line,
|
|
39327
|
-
S.prev.col,
|
|
39328
|
-
S.prev.pos
|
|
39329
|
-
);
|
|
39330
|
-
}
|
|
39331
39466
|
var start = S.token;
|
|
39332
39467
|
var star = false;
|
|
39333
39468
|
var has_expression = true;
|
|
39334
|
-
if (can_insert_semicolon() || is("punc") && PUNC_AFTER_EXPRESSION.has(S.token.value)) {
|
|
39469
|
+
if (can_insert_semicolon() || is("punc") && PUNC_AFTER_EXPRESSION.has(S.token.value) || is("template_cont")) {
|
|
39335
39470
|
has_expression = false;
|
|
39336
39471
|
} else if (is("operator", "*")) {
|
|
39337
39472
|
star = true;
|
|
@@ -39448,19 +39583,20 @@ var require_bundle_min = __commonJS({
|
|
|
39448
39583
|
var var_defs = [];
|
|
39449
39584
|
var def;
|
|
39450
39585
|
for (; ; ) {
|
|
39451
|
-
var sym_type = kind === "var" ? AST_SymbolVar : kind === "const" ? AST_SymbolConst : kind === "let" ? AST_SymbolLet : null;
|
|
39586
|
+
var sym_type = kind === "var" ? AST_SymbolVar : kind === "const" ? AST_SymbolConst : kind === "let" ? AST_SymbolLet : kind === "using" ? AST_SymbolUsing : kind === "await using" ? AST_SymbolUsing : null;
|
|
39587
|
+
var def_type = kind === "using" || kind === "await using" ? AST_UsingDef : AST_VarDef;
|
|
39452
39588
|
if (is("punc", "{") || is("punc", "[")) {
|
|
39453
|
-
def = new
|
|
39589
|
+
def = new def_type({
|
|
39454
39590
|
start: S.token,
|
|
39455
39591
|
name: binding_element(void 0, sym_type),
|
|
39456
39592
|
value: is("operator", "=") ? (expect_token("operator", "="), expression(false, no_in)) : null,
|
|
39457
39593
|
end: prev()
|
|
39458
39594
|
});
|
|
39459
39595
|
} else {
|
|
39460
|
-
def = new
|
|
39596
|
+
def = new def_type({
|
|
39461
39597
|
start: S.token,
|
|
39462
39598
|
name: as_symbol(sym_type),
|
|
39463
|
-
value: is("operator", "=") ? (next(), expression(false, no_in)) : !no_in && kind === "const" ? croak("Missing initializer in
|
|
39599
|
+
value: is("operator", "=") ? (next(), expression(false, no_in)) : !no_in && (kind === "const" || kind === "using" || kind === "await using") ? croak("Missing initializer in " + kind + " declaration") : null,
|
|
39464
39600
|
end: prev()
|
|
39465
39601
|
});
|
|
39466
39602
|
if (def.name.name == "import") croak("Unexpected token: import");
|
|
@@ -39494,6 +39630,22 @@ var require_bundle_min = __commonJS({
|
|
|
39494
39630
|
end: prev()
|
|
39495
39631
|
});
|
|
39496
39632
|
}, "const_");
|
|
39633
|
+
var using_ = /* @__PURE__ */ __name(function(no_in) {
|
|
39634
|
+
return new AST_Using({
|
|
39635
|
+
start: prev(),
|
|
39636
|
+
await: false,
|
|
39637
|
+
definitions: vardefs(no_in, "using"),
|
|
39638
|
+
end: prev()
|
|
39639
|
+
});
|
|
39640
|
+
}, "using_");
|
|
39641
|
+
var await_using_ = /* @__PURE__ */ __name(function(no_in) {
|
|
39642
|
+
return new AST_Using({
|
|
39643
|
+
start: prev(),
|
|
39644
|
+
await: true,
|
|
39645
|
+
definitions: (next(), vardefs(no_in, "await using")),
|
|
39646
|
+
end: prev()
|
|
39647
|
+
});
|
|
39648
|
+
}, "await_using_");
|
|
39497
39649
|
var new_ = /* @__PURE__ */ __name(function(allow_calls) {
|
|
39498
39650
|
var start = S.token;
|
|
39499
39651
|
expect_token("operator", "new");
|
|
@@ -39536,7 +39688,12 @@ var require_bundle_min = __commonJS({
|
|
|
39536
39688
|
});
|
|
39537
39689
|
break;
|
|
39538
39690
|
case "big_int":
|
|
39539
|
-
ret = new AST_BigInt({
|
|
39691
|
+
ret = new AST_BigInt({
|
|
39692
|
+
start: tok,
|
|
39693
|
+
end: tok,
|
|
39694
|
+
value: tok.value,
|
|
39695
|
+
raw: LATEST_RAW
|
|
39696
|
+
});
|
|
39540
39697
|
break;
|
|
39541
39698
|
case "string":
|
|
39542
39699
|
ret = new AST_String({
|
|
@@ -39787,7 +39944,7 @@ var require_bundle_min = __commonJS({
|
|
|
39787
39944
|
var name = as_property_name();
|
|
39788
39945
|
var value;
|
|
39789
39946
|
if (!is("punc", ":")) {
|
|
39790
|
-
var concise =
|
|
39947
|
+
var concise = object_or_class_property(name, start);
|
|
39791
39948
|
if (concise) {
|
|
39792
39949
|
a.push(concise);
|
|
39793
39950
|
continue;
|
|
@@ -39817,7 +39974,7 @@ var require_bundle_min = __commonJS({
|
|
|
39817
39974
|
const kv = new AST_ObjectKeyVal({
|
|
39818
39975
|
start,
|
|
39819
39976
|
quote: start.quote,
|
|
39820
|
-
key: name
|
|
39977
|
+
key: name,
|
|
39821
39978
|
value,
|
|
39822
39979
|
end: prev()
|
|
39823
39980
|
});
|
|
@@ -39827,7 +39984,7 @@ var require_bundle_min = __commonJS({
|
|
|
39827
39984
|
return new AST_Object({ properties: a });
|
|
39828
39985
|
}, "object_or_destructuring_"));
|
|
39829
39986
|
function class_(KindOfClass, is_export_default) {
|
|
39830
|
-
var start, method, class_name, extends_,
|
|
39987
|
+
var start, method, class_name, extends_, properties = [];
|
|
39831
39988
|
S.input.push_directives_stack();
|
|
39832
39989
|
S.input.add_directive("use strict");
|
|
39833
39990
|
if (S.token.type == "name" && S.token.value != "extends") {
|
|
@@ -39852,11 +40009,11 @@ var require_bundle_min = __commonJS({
|
|
|
39852
40009
|
}
|
|
39853
40010
|
while (!is("punc", "}")) {
|
|
39854
40011
|
start = S.token;
|
|
39855
|
-
method =
|
|
40012
|
+
method = object_or_class_property(as_property_name(), start, true);
|
|
39856
40013
|
if (!method) {
|
|
39857
40014
|
unexpected();
|
|
39858
40015
|
}
|
|
39859
|
-
|
|
40016
|
+
properties.push(method);
|
|
39860
40017
|
while (is("punc", ";")) {
|
|
39861
40018
|
next();
|
|
39862
40019
|
}
|
|
@@ -39868,29 +40025,25 @@ var require_bundle_min = __commonJS({
|
|
|
39868
40025
|
start,
|
|
39869
40026
|
name: class_name,
|
|
39870
40027
|
extends: extends_,
|
|
39871
|
-
properties
|
|
40028
|
+
properties,
|
|
39872
40029
|
end: prev()
|
|
39873
40030
|
});
|
|
39874
40031
|
}
|
|
39875
40032
|
__name(class_, "class_");
|
|
39876
|
-
function
|
|
39877
|
-
const get_symbol_ast = /* @__PURE__ */ __name((name2, SymbolClass
|
|
39878
|
-
if (typeof name2 === "string"
|
|
39879
|
-
return new SymbolClass({
|
|
39880
|
-
start,
|
|
39881
|
-
name: "" + name2,
|
|
39882
|
-
end: prev()
|
|
39883
|
-
});
|
|
40033
|
+
function object_or_class_property(name, start, is_class) {
|
|
40034
|
+
const get_symbol_ast = /* @__PURE__ */ __name((name2, SymbolClass) => {
|
|
40035
|
+
if (typeof name2 === "string") {
|
|
40036
|
+
return new SymbolClass({ start, name: name2, end: prev() });
|
|
39884
40037
|
} else if (name2 === null) {
|
|
39885
40038
|
unexpected();
|
|
39886
40039
|
}
|
|
39887
40040
|
return name2;
|
|
39888
40041
|
}, "get_symbol_ast");
|
|
39889
|
-
|
|
40042
|
+
var is_private = prev().type === "privatename";
|
|
40043
|
+
const is_not_method_start = /* @__PURE__ */ __name(() => !is("punc", "(") && !is("punc", ",") && !is("punc", "}") && !is("punc", ";") && !is("operator", "=") && !is_private, "is_not_method_start");
|
|
39890
40044
|
var is_async = false;
|
|
39891
40045
|
var is_static = false;
|
|
39892
40046
|
var is_generator = false;
|
|
39893
|
-
var is_private = false;
|
|
39894
40047
|
var accessor_type = null;
|
|
39895
40048
|
if (is_class && name === "static" && is_not_method_start()) {
|
|
39896
40049
|
const static_block = class_static_block();
|
|
@@ -39912,14 +40065,14 @@ var require_bundle_min = __commonJS({
|
|
|
39912
40065
|
accessor_type = name;
|
|
39913
40066
|
name = as_property_name();
|
|
39914
40067
|
}
|
|
39915
|
-
if (prev().type === "privatename") {
|
|
40068
|
+
if (!is_private && prev().type === "privatename") {
|
|
39916
40069
|
is_private = true;
|
|
39917
40070
|
}
|
|
39918
40071
|
const property_token = prev();
|
|
39919
40072
|
if (accessor_type != null) {
|
|
39920
40073
|
if (!is_private) {
|
|
39921
40074
|
const AccessorClass = accessor_type === "get" ? AST_ObjectGetter : AST_ObjectSetter;
|
|
39922
|
-
name = get_symbol_ast(name);
|
|
40075
|
+
name = get_symbol_ast(name, AST_SymbolMethod);
|
|
39923
40076
|
return annotate(new AccessorClass({
|
|
39924
40077
|
start,
|
|
39925
40078
|
static: is_static,
|
|
@@ -39933,20 +40086,18 @@ var require_bundle_min = __commonJS({
|
|
|
39933
40086
|
return annotate(new AccessorClass({
|
|
39934
40087
|
start,
|
|
39935
40088
|
static: is_static,
|
|
39936
|
-
key: get_symbol_ast(name),
|
|
40089
|
+
key: get_symbol_ast(name, AST_SymbolMethod),
|
|
39937
40090
|
value: create_accessor(),
|
|
39938
40091
|
end: prev()
|
|
39939
40092
|
}));
|
|
39940
40093
|
}
|
|
39941
40094
|
}
|
|
39942
40095
|
if (is("punc", "(")) {
|
|
39943
|
-
name = get_symbol_ast(name);
|
|
40096
|
+
name = get_symbol_ast(name, AST_SymbolMethod);
|
|
39944
40097
|
const AST_MethodVariant = is_private ? AST_PrivateMethod : AST_ConciseMethod;
|
|
39945
40098
|
var node = new AST_MethodVariant({
|
|
39946
40099
|
start,
|
|
39947
40100
|
static: is_static,
|
|
39948
|
-
is_generator,
|
|
39949
|
-
async: is_async,
|
|
39950
40101
|
key: name,
|
|
39951
40102
|
quote: name instanceof AST_SymbolMethod ? property_token.quote : void 0,
|
|
39952
40103
|
value: create_accessor(is_generator, is_async),
|
|
@@ -39955,9 +40106,10 @@ var require_bundle_min = __commonJS({
|
|
|
39955
40106
|
return annotate(node);
|
|
39956
40107
|
}
|
|
39957
40108
|
if (is_class) {
|
|
39958
|
-
const
|
|
39959
|
-
const quote = key instanceof AST_SymbolClassProperty ? property_token.quote : void 0;
|
|
40109
|
+
const AST_SymbolVariant = is_private ? AST_SymbolPrivateProperty : AST_SymbolClassProperty;
|
|
39960
40110
|
const AST_ClassPropertyVariant = is_private ? AST_ClassPrivateProperty : AST_ClassProperty;
|
|
40111
|
+
const key = get_symbol_ast(name, AST_SymbolVariant);
|
|
40112
|
+
const quote = key instanceof AST_SymbolClassProperty ? property_token.quote : void 0;
|
|
39961
40113
|
if (is("operator", "=")) {
|
|
39962
40114
|
next();
|
|
39963
40115
|
return annotate(
|
|
@@ -39970,7 +40122,7 @@ var require_bundle_min = __commonJS({
|
|
|
39970
40122
|
end: prev()
|
|
39971
40123
|
})
|
|
39972
40124
|
);
|
|
39973
|
-
} else if (is("name") || is("privatename") || is("punc", "[") || is("operator", "*") || is("punc", ";") || is("punc", "}")) {
|
|
40125
|
+
} else if (is("name") || is("privatename") || is("punc", "[") || is("operator", "*") || is("punc", ";") || is("punc", "}") || is("string") || is("num") || is("big_int")) {
|
|
39974
40126
|
return annotate(
|
|
39975
40127
|
new AST_ClassPropertyVariant({
|
|
39976
40128
|
start,
|
|
@@ -39983,7 +40135,7 @@ var require_bundle_min = __commonJS({
|
|
|
39983
40135
|
}
|
|
39984
40136
|
}
|
|
39985
40137
|
}
|
|
39986
|
-
__name(
|
|
40138
|
+
__name(object_or_class_property, "object_or_class_property");
|
|
39987
40139
|
function class_static_block() {
|
|
39988
40140
|
if (!is("punc", "{")) {
|
|
39989
40141
|
return null;
|
|
@@ -40079,10 +40231,12 @@ var require_bundle_min = __commonJS({
|
|
|
40079
40231
|
} else {
|
|
40080
40232
|
foreign_name = make_symbol(foreign_type, S.token.quote);
|
|
40081
40233
|
}
|
|
40082
|
-
} else if (is_import) {
|
|
40083
|
-
name = new type(foreign_name);
|
|
40084
40234
|
} else {
|
|
40085
|
-
|
|
40235
|
+
if (is_import) {
|
|
40236
|
+
name = new type(foreign_name);
|
|
40237
|
+
} else {
|
|
40238
|
+
foreign_name = new foreign_type(name);
|
|
40239
|
+
}
|
|
40086
40240
|
}
|
|
40087
40241
|
return new AST_NameMapping({
|
|
40088
40242
|
start,
|
|
@@ -40232,12 +40386,14 @@ var require_bundle_min = __commonJS({
|
|
|
40232
40386
|
case "name":
|
|
40233
40387
|
case "privatename":
|
|
40234
40388
|
case "string":
|
|
40235
|
-
case "num":
|
|
40236
|
-
case "big_int":
|
|
40237
40389
|
case "keyword":
|
|
40238
40390
|
case "atom":
|
|
40239
40391
|
next();
|
|
40240
40392
|
return tmp.value;
|
|
40393
|
+
case "num":
|
|
40394
|
+
case "big_int":
|
|
40395
|
+
next();
|
|
40396
|
+
return "" + tmp.value;
|
|
40241
40397
|
default:
|
|
40242
40398
|
unexpected(tmp);
|
|
40243
40399
|
}
|
|
@@ -41863,17 +42019,17 @@ var require_bundle_min = __commonJS({
|
|
|
41863
42019
|
}, "AST_Finally"), {
|
|
41864
42020
|
$documentation: "A `finally` node; only makes sense as part of a `try` statement"
|
|
41865
42021
|
}, AST_Block);
|
|
41866
|
-
var
|
|
42022
|
+
var AST_DefinitionsLike = DEFNODE("DefinitionsLike", "definitions", /* @__PURE__ */ __name(function AST_DefinitionsLike2(props) {
|
|
41867
42023
|
if (props) {
|
|
41868
42024
|
this.definitions = props.definitions;
|
|
41869
42025
|
this.start = props.start;
|
|
41870
42026
|
this.end = props.end;
|
|
41871
42027
|
}
|
|
41872
42028
|
this.flags = 0;
|
|
41873
|
-
}, "
|
|
41874
|
-
$documentation: "Base class for
|
|
42029
|
+
}, "AST_DefinitionsLike"), {
|
|
42030
|
+
$documentation: "Base class for variable definitions and `using`",
|
|
41875
42031
|
$propdoc: {
|
|
41876
|
-
definitions: "[AST_VarDef*] array of variable definitions"
|
|
42032
|
+
definitions: "[AST_VarDef*|AST_UsingDef*] array of variable definitions"
|
|
41877
42033
|
},
|
|
41878
42034
|
_walk: /* @__PURE__ */ __name(function(visitor) {
|
|
41879
42035
|
return visitor._visit(this, function() {
|
|
@@ -41888,6 +42044,16 @@ var require_bundle_min = __commonJS({
|
|
|
41888
42044
|
while (i--) push2(this.definitions[i]);
|
|
41889
42045
|
}
|
|
41890
42046
|
}, AST_Statement);
|
|
42047
|
+
var AST_Definitions = DEFNODE("Definitions", null, /* @__PURE__ */ __name(function AST_Definitions2(props) {
|
|
42048
|
+
if (props) {
|
|
42049
|
+
this.definitions = props.definitions;
|
|
42050
|
+
this.start = props.start;
|
|
42051
|
+
this.end = props.end;
|
|
42052
|
+
}
|
|
42053
|
+
this.flags = 0;
|
|
42054
|
+
}, "AST_Definitions"), {
|
|
42055
|
+
$documentation: "Base class for `var` or `const` nodes (variable declarations/initializations)"
|
|
42056
|
+
}, AST_DefinitionsLike);
|
|
41891
42057
|
var AST_Var = DEFNODE("Var", null, /* @__PURE__ */ __name(function AST_Var2(props) {
|
|
41892
42058
|
if (props) {
|
|
41893
42059
|
this.definitions = props.definitions;
|
|
@@ -41918,7 +42084,21 @@ var require_bundle_min = __commonJS({
|
|
|
41918
42084
|
}, "AST_Const"), {
|
|
41919
42085
|
$documentation: "A `const` statement"
|
|
41920
42086
|
}, AST_Definitions);
|
|
41921
|
-
var
|
|
42087
|
+
var AST_Using = DEFNODE("Using", "await", /* @__PURE__ */ __name(function AST_Using2(props) {
|
|
42088
|
+
if (props) {
|
|
42089
|
+
this.await = props.await;
|
|
42090
|
+
this.definitions = props.definitions;
|
|
42091
|
+
this.start = props.start;
|
|
42092
|
+
this.end = props.end;
|
|
42093
|
+
}
|
|
42094
|
+
this.flags = 0;
|
|
42095
|
+
}, "AST_Using"), {
|
|
42096
|
+
$documentation: "A `using` statement",
|
|
42097
|
+
$propdoc: {
|
|
42098
|
+
await: "[boolean] Whether it's `await using`"
|
|
42099
|
+
}
|
|
42100
|
+
}, AST_DefinitionsLike);
|
|
42101
|
+
var AST_VarDefLike = DEFNODE("VarDefLike", "name value", /* @__PURE__ */ __name(function AST_VarDefLike2(props) {
|
|
41922
42102
|
if (props) {
|
|
41923
42103
|
this.name = props.name;
|
|
41924
42104
|
this.value = props.value;
|
|
@@ -41926,10 +42106,10 @@ var require_bundle_min = __commonJS({
|
|
|
41926
42106
|
this.end = props.end;
|
|
41927
42107
|
}
|
|
41928
42108
|
this.flags = 0;
|
|
41929
|
-
}, "
|
|
41930
|
-
$documentation: "A
|
|
42109
|
+
}, "AST_VarDefLike"), {
|
|
42110
|
+
$documentation: "A name=value pair in a variable definition statement or `using`",
|
|
41931
42111
|
$propdoc: {
|
|
41932
|
-
name: "[AST_Destructuring|
|
|
42112
|
+
name: "[AST_Destructuring|AST_SymbolDeclaration] name of the variable",
|
|
41933
42113
|
value: "[AST_Node?] initializer, or null of there's no initializer"
|
|
41934
42114
|
},
|
|
41935
42115
|
_walk: /* @__PURE__ */ __name(function(visitor) {
|
|
@@ -41944,12 +42124,34 @@ var require_bundle_min = __commonJS({
|
|
|
41944
42124
|
},
|
|
41945
42125
|
declarations_as_names() {
|
|
41946
42126
|
if (this.name instanceof AST_SymbolDeclaration) {
|
|
41947
|
-
return [this];
|
|
42127
|
+
return [this.name];
|
|
41948
42128
|
} else {
|
|
41949
42129
|
return this.name.all_symbols();
|
|
41950
42130
|
}
|
|
41951
42131
|
}
|
|
41952
42132
|
});
|
|
42133
|
+
var AST_VarDef = DEFNODE("VarDef", null, /* @__PURE__ */ __name(function AST_VarDef2(props) {
|
|
42134
|
+
if (props) {
|
|
42135
|
+
this.name = props.name;
|
|
42136
|
+
this.value = props.value;
|
|
42137
|
+
this.start = props.start;
|
|
42138
|
+
this.end = props.end;
|
|
42139
|
+
}
|
|
42140
|
+
this.flags = 0;
|
|
42141
|
+
}, "AST_VarDef"), {
|
|
42142
|
+
$documentation: "A variable declaration; only appears in a AST_Definitions node"
|
|
42143
|
+
}, AST_VarDefLike);
|
|
42144
|
+
var AST_UsingDef = DEFNODE("UsingDef", null, /* @__PURE__ */ __name(function AST_UsingDef2(props) {
|
|
42145
|
+
if (props) {
|
|
42146
|
+
this.name = props.name;
|
|
42147
|
+
this.value = props.value;
|
|
42148
|
+
this.start = props.start;
|
|
42149
|
+
this.end = props.end;
|
|
42150
|
+
}
|
|
42151
|
+
this.flags = 0;
|
|
42152
|
+
}, "AST_UsingDef"), {
|
|
42153
|
+
$documentation: "Like VarDef but specific to AST_Using"
|
|
42154
|
+
}, AST_VarDefLike);
|
|
41953
42155
|
var AST_NameMapping = DEFNODE("NameMapping", "foreign_name name", /* @__PURE__ */ __name(function AST_NameMapping2(props) {
|
|
41954
42156
|
if (props) {
|
|
41955
42157
|
this.foreign_name = props.foreign_name;
|
|
@@ -42584,12 +42786,10 @@ var require_bundle_min = __commonJS({
|
|
|
42584
42786
|
return !(this.key instanceof AST_SymbolMethod);
|
|
42585
42787
|
}
|
|
42586
42788
|
}, AST_ObjectProperty);
|
|
42587
|
-
var AST_ConciseMethod = DEFNODE("ConciseMethod", "quote static
|
|
42789
|
+
var AST_ConciseMethod = DEFNODE("ConciseMethod", "quote static", /* @__PURE__ */ __name(function AST_ConciseMethod2(props) {
|
|
42588
42790
|
if (props) {
|
|
42589
42791
|
this.quote = props.quote;
|
|
42590
42792
|
this.static = props.static;
|
|
42591
|
-
this.is_generator = props.is_generator;
|
|
42592
|
-
this.async = props.async;
|
|
42593
42793
|
this.key = props.key;
|
|
42594
42794
|
this.value = props.value;
|
|
42595
42795
|
this.start = props.start;
|
|
@@ -42600,21 +42800,16 @@ var require_bundle_min = __commonJS({
|
|
|
42600
42800
|
}, "AST_ConciseMethod"), {
|
|
42601
42801
|
$propdoc: {
|
|
42602
42802
|
quote: "[string|undefined] the original quote character, if any",
|
|
42603
|
-
static: "[boolean] is this method static (classes only)"
|
|
42604
|
-
is_generator: "[boolean] is this a generator method",
|
|
42605
|
-
async: "[boolean] is this method async"
|
|
42803
|
+
static: "[boolean] is this method static (classes only)"
|
|
42606
42804
|
},
|
|
42607
42805
|
$documentation: "An ES6 concise method inside an object or class",
|
|
42608
42806
|
computed_key() {
|
|
42609
42807
|
return !(this.key instanceof AST_SymbolMethod);
|
|
42610
42808
|
}
|
|
42611
42809
|
}, AST_ObjectProperty);
|
|
42612
|
-
var AST_PrivateMethod = DEFNODE("PrivateMethod", "", /* @__PURE__ */ __name(function AST_PrivateMethod2(props) {
|
|
42810
|
+
var AST_PrivateMethod = DEFNODE("PrivateMethod", "static", /* @__PURE__ */ __name(function AST_PrivateMethod2(props) {
|
|
42613
42811
|
if (props) {
|
|
42614
|
-
this.quote = props.quote;
|
|
42615
42812
|
this.static = props.static;
|
|
42616
|
-
this.is_generator = props.is_generator;
|
|
42617
|
-
this.async = props.async;
|
|
42618
42813
|
this.key = props.key;
|
|
42619
42814
|
this.value = props.value;
|
|
42620
42815
|
this.start = props.start;
|
|
@@ -42623,6 +42818,9 @@ var require_bundle_min = __commonJS({
|
|
|
42623
42818
|
this.flags = 0;
|
|
42624
42819
|
}, "AST_PrivateMethod"), {
|
|
42625
42820
|
$documentation: "A private class method inside a class",
|
|
42821
|
+
$propdoc: {
|
|
42822
|
+
static: "[boolean] is this a static private method"
|
|
42823
|
+
},
|
|
42626
42824
|
computed_key() {
|
|
42627
42825
|
return false;
|
|
42628
42826
|
}
|
|
@@ -42764,7 +42962,6 @@ var require_bundle_min = __commonJS({
|
|
|
42764
42962
|
var AST_ClassPrivateProperty = DEFNODE("ClassPrivateProperty", "", /* @__PURE__ */ __name(function AST_ClassPrivateProperty2(props) {
|
|
42765
42963
|
if (props) {
|
|
42766
42964
|
this.static = props.static;
|
|
42767
|
-
this.quote = props.quote;
|
|
42768
42965
|
this.key = props.key;
|
|
42769
42966
|
this.value = props.value;
|
|
42770
42967
|
this.start = props.start;
|
|
@@ -42955,6 +43152,19 @@ var require_bundle_min = __commonJS({
|
|
|
42955
43152
|
}, "AST_SymbolConst"), {
|
|
42956
43153
|
$documentation: "A constant declaration"
|
|
42957
43154
|
}, AST_SymbolBlockDeclaration);
|
|
43155
|
+
var AST_SymbolUsing = DEFNODE("SymbolUsing", null, /* @__PURE__ */ __name(function AST_SymbolUsing2(props) {
|
|
43156
|
+
if (props) {
|
|
43157
|
+
this.init = props.init;
|
|
43158
|
+
this.scope = props.scope;
|
|
43159
|
+
this.name = props.name;
|
|
43160
|
+
this.thedef = props.thedef;
|
|
43161
|
+
this.start = props.start;
|
|
43162
|
+
this.end = props.end;
|
|
43163
|
+
}
|
|
43164
|
+
this.flags = 0;
|
|
43165
|
+
}, "AST_SymbolUsing"), {
|
|
43166
|
+
$documentation: "A `using` declaration"
|
|
43167
|
+
}, AST_SymbolBlockDeclaration);
|
|
42958
43168
|
var AST_SymbolLet = DEFNODE("SymbolLet", null, /* @__PURE__ */ __name(function AST_SymbolLet2(props) {
|
|
42959
43169
|
if (props) {
|
|
42960
43170
|
this.init = props.init;
|
|
@@ -43083,12 +43293,12 @@ var require_bundle_min = __commonJS({
|
|
|
43083
43293
|
}, "AST_SymbolImport"), {
|
|
43084
43294
|
$documentation: "Symbol referring to an imported name"
|
|
43085
43295
|
}, AST_SymbolBlockDeclaration);
|
|
43086
|
-
var AST_SymbolImportForeign = DEFNODE("SymbolImportForeign",
|
|
43296
|
+
var AST_SymbolImportForeign = DEFNODE("SymbolImportForeign", "quote", /* @__PURE__ */ __name(function AST_SymbolImportForeign2(props) {
|
|
43087
43297
|
if (props) {
|
|
43298
|
+
this.quote = props.quote;
|
|
43088
43299
|
this.scope = props.scope;
|
|
43089
43300
|
this.name = props.name;
|
|
43090
43301
|
this.thedef = props.thedef;
|
|
43091
|
-
this.quote = props.quote;
|
|
43092
43302
|
this.start = props.start;
|
|
43093
43303
|
this.end = props.end;
|
|
43094
43304
|
}
|
|
@@ -43129,12 +43339,12 @@ var require_bundle_min = __commonJS({
|
|
|
43129
43339
|
}, "AST_SymbolRef"), {
|
|
43130
43340
|
$documentation: "Reference to some symbol (not definition/declaration)"
|
|
43131
43341
|
}, AST_Symbol);
|
|
43132
|
-
var AST_SymbolExport = DEFNODE("SymbolExport",
|
|
43342
|
+
var AST_SymbolExport = DEFNODE("SymbolExport", "quote", /* @__PURE__ */ __name(function AST_SymbolExport2(props) {
|
|
43133
43343
|
if (props) {
|
|
43344
|
+
this.quote = props.quote;
|
|
43134
43345
|
this.scope = props.scope;
|
|
43135
43346
|
this.name = props.name;
|
|
43136
43347
|
this.thedef = props.thedef;
|
|
43137
|
-
this.quote = props.quote;
|
|
43138
43348
|
this.start = props.start;
|
|
43139
43349
|
this.end = props.end;
|
|
43140
43350
|
}
|
|
@@ -43142,12 +43352,12 @@ var require_bundle_min = __commonJS({
|
|
|
43142
43352
|
}, "AST_SymbolExport"), {
|
|
43143
43353
|
$documentation: "Symbol referring to a name to export"
|
|
43144
43354
|
}, AST_SymbolRef);
|
|
43145
|
-
var AST_SymbolExportForeign = DEFNODE("SymbolExportForeign",
|
|
43355
|
+
var AST_SymbolExportForeign = DEFNODE("SymbolExportForeign", "quote", /* @__PURE__ */ __name(function AST_SymbolExportForeign2(props) {
|
|
43146
43356
|
if (props) {
|
|
43357
|
+
this.quote = props.quote;
|
|
43147
43358
|
this.scope = props.scope;
|
|
43148
43359
|
this.name = props.name;
|
|
43149
43360
|
this.thedef = props.thedef;
|
|
43150
|
-
this.quote = props.quote;
|
|
43151
43361
|
this.start = props.start;
|
|
43152
43362
|
this.end = props.end;
|
|
43153
43363
|
}
|
|
@@ -43246,9 +43456,10 @@ var require_bundle_min = __commonJS({
|
|
|
43246
43456
|
raw: "[string] numeric value as string"
|
|
43247
43457
|
}
|
|
43248
43458
|
}, AST_Constant);
|
|
43249
|
-
var AST_BigInt = DEFNODE("BigInt", "value", /* @__PURE__ */ __name(function AST_BigInt2(props) {
|
|
43459
|
+
var AST_BigInt = DEFNODE("BigInt", "value raw", /* @__PURE__ */ __name(function AST_BigInt2(props) {
|
|
43250
43460
|
if (props) {
|
|
43251
43461
|
this.value = props.value;
|
|
43462
|
+
this.raw = props.raw;
|
|
43252
43463
|
this.start = props.start;
|
|
43253
43464
|
this.end = props.end;
|
|
43254
43465
|
}
|
|
@@ -43256,7 +43467,8 @@ var require_bundle_min = __commonJS({
|
|
|
43256
43467
|
}, "AST_BigInt"), {
|
|
43257
43468
|
$documentation: "A big int literal",
|
|
43258
43469
|
$propdoc: {
|
|
43259
|
-
value: "[string] big int value"
|
|
43470
|
+
value: "[string] big int value, represented as a string",
|
|
43471
|
+
raw: "[string] the original format preserved"
|
|
43260
43472
|
}
|
|
43261
43473
|
}, AST_Constant);
|
|
43262
43474
|
var AST_RegExp = DEFNODE("RegExp", "value", /* @__PURE__ */ __name(function AST_RegExp2(props) {
|
|
@@ -43468,6 +43680,19 @@ var require_bundle_min = __commonJS({
|
|
|
43468
43680
|
if (x instanceof type) return x;
|
|
43469
43681
|
}
|
|
43470
43682
|
}
|
|
43683
|
+
is_within_loop() {
|
|
43684
|
+
let i = this.stack.length - 1;
|
|
43685
|
+
let child = this.stack[i];
|
|
43686
|
+
while (i--) {
|
|
43687
|
+
const node = this.stack[i];
|
|
43688
|
+
if (node instanceof AST_Lambda) return false;
|
|
43689
|
+
if (node instanceof AST_IterationStatement && !(node instanceof AST_For && child === node.init) && !((node instanceof AST_ForIn || node instanceof AST_ForOf) && child === node.object)) {
|
|
43690
|
+
return true;
|
|
43691
|
+
}
|
|
43692
|
+
child = node;
|
|
43693
|
+
}
|
|
43694
|
+
return false;
|
|
43695
|
+
}
|
|
43471
43696
|
find_scope() {
|
|
43472
43697
|
var stack = this.stack;
|
|
43473
43698
|
for (var i = stack.length; --i >= 0; ) {
|
|
@@ -43598,10 +43823,10 @@ var require_bundle_min = __commonJS({
|
|
|
43598
43823
|
if (self2.argname) self2.argname = self2.argname.transform(tw);
|
|
43599
43824
|
self2.body = MAP(self2.body, tw);
|
|
43600
43825
|
});
|
|
43601
|
-
def_transform(
|
|
43826
|
+
def_transform(AST_DefinitionsLike, function(self2, tw) {
|
|
43602
43827
|
self2.definitions = MAP(self2.definitions, tw);
|
|
43603
43828
|
});
|
|
43604
|
-
def_transform(
|
|
43829
|
+
def_transform(AST_VarDefLike, function(self2, tw) {
|
|
43605
43830
|
self2.name = self2.name.transform(tw);
|
|
43606
43831
|
if (self2.value) self2.value = self2.value.transform(tw);
|
|
43607
43832
|
});
|
|
@@ -43719,6 +43944,7 @@ var require_bundle_min = __commonJS({
|
|
|
43719
43944
|
body[i] = new AST_Directive({
|
|
43720
43945
|
start: body[i].start,
|
|
43721
43946
|
end: body[i].end,
|
|
43947
|
+
quote: '"',
|
|
43722
43948
|
value: body[i].body.value
|
|
43723
43949
|
});
|
|
43724
43950
|
} else {
|
|
@@ -43831,30 +44057,26 @@ var require_bundle_min = __commonJS({
|
|
|
43831
44057
|
return new AST_Defun({
|
|
43832
44058
|
start: my_start_token(M),
|
|
43833
44059
|
end: my_end_token(M),
|
|
43834
|
-
name:
|
|
43835
|
-
argnames: M.params.map(
|
|
44060
|
+
name: M.id && from_moz_symbol(AST_SymbolDefun, M.id),
|
|
44061
|
+
argnames: M.params.map((M2) => from_moz_pattern(M2, AST_SymbolFunarg)),
|
|
43836
44062
|
is_generator: M.generator,
|
|
43837
44063
|
async: M.async,
|
|
43838
44064
|
body: normalize_directives(from_moz(M.body).body)
|
|
43839
44065
|
});
|
|
43840
44066
|
}, "FunctionDeclaration"),
|
|
43841
44067
|
FunctionExpression: /* @__PURE__ */ __name(function(M) {
|
|
43842
|
-
return
|
|
43843
|
-
|
|
43844
|
-
|
|
43845
|
-
|
|
43846
|
-
|
|
43847
|
-
is_generator: M.generator,
|
|
43848
|
-
async: M.async,
|
|
43849
|
-
body: normalize_directives(from_moz(M.body).body)
|
|
43850
|
-
});
|
|
44068
|
+
return from_moz_lambda(
|
|
44069
|
+
M,
|
|
44070
|
+
/*is_method=*/
|
|
44071
|
+
false
|
|
44072
|
+
);
|
|
43851
44073
|
}, "FunctionExpression"),
|
|
43852
44074
|
ArrowFunctionExpression: /* @__PURE__ */ __name(function(M) {
|
|
43853
44075
|
const body = M.body.type === "BlockStatement" ? from_moz(M.body).body : [make_node(AST_Return, {}, { value: from_moz(M.body) })];
|
|
43854
44076
|
return new AST_Arrow({
|
|
43855
44077
|
start: my_start_token(M),
|
|
43856
44078
|
end: my_end_token(M),
|
|
43857
|
-
argnames: M.params.map(
|
|
44079
|
+
argnames: M.params.map((p) => from_moz_pattern(p, AST_SymbolFunarg)),
|
|
43858
44080
|
body,
|
|
43859
44081
|
async: M.async
|
|
43860
44082
|
});
|
|
@@ -43880,55 +44102,50 @@ var require_bundle_min = __commonJS({
|
|
|
43880
44102
|
});
|
|
43881
44103
|
}, "TryStatement"),
|
|
43882
44104
|
Property: /* @__PURE__ */ __name(function(M) {
|
|
43883
|
-
|
|
43884
|
-
|
|
43885
|
-
|
|
43886
|
-
|
|
43887
|
-
|
|
43888
|
-
|
|
43889
|
-
|
|
43890
|
-
|
|
43891
|
-
|
|
43892
|
-
|
|
43893
|
-
if (M.method) {
|
|
43894
|
-
args.is_generator = M.value.generator;
|
|
43895
|
-
args.async = M.value.async;
|
|
43896
|
-
if (!M.computed) {
|
|
43897
|
-
args.key = new AST_SymbolMethod({ name: args.key });
|
|
43898
|
-
} else {
|
|
43899
|
-
args.key = from_moz(M.key);
|
|
43900
|
-
}
|
|
43901
|
-
return new AST_ConciseMethod(args);
|
|
43902
|
-
}
|
|
43903
|
-
if (M.kind == "init") {
|
|
43904
|
-
if (key.type != "Identifier" && key.type != "Literal") {
|
|
43905
|
-
args.key = from_moz(key);
|
|
43906
|
-
}
|
|
44105
|
+
if (M.kind == "init" && !M.method) {
|
|
44106
|
+
var args = {
|
|
44107
|
+
start: my_start_token(M.key || M.value),
|
|
44108
|
+
end: my_end_token(M.value),
|
|
44109
|
+
key: M.computed ? from_moz(M.key) : M.key.name || String(M.key.value),
|
|
44110
|
+
quote: from_moz_quote(M.key, M.computed),
|
|
44111
|
+
static: false,
|
|
44112
|
+
// always an object
|
|
44113
|
+
value: from_moz(M.value)
|
|
44114
|
+
};
|
|
43907
44115
|
return new AST_ObjectKeyVal(args);
|
|
43908
|
-
}
|
|
43909
|
-
|
|
43910
|
-
|
|
43911
|
-
|
|
43912
|
-
|
|
43913
|
-
|
|
43914
|
-
|
|
43915
|
-
|
|
43916
|
-
|
|
43917
|
-
|
|
43918
|
-
|
|
43919
|
-
|
|
43920
|
-
|
|
43921
|
-
|
|
44116
|
+
} else {
|
|
44117
|
+
var value = from_moz_lambda(
|
|
44118
|
+
M.value,
|
|
44119
|
+
/*is_method=*/
|
|
44120
|
+
true
|
|
44121
|
+
);
|
|
44122
|
+
var args = {
|
|
44123
|
+
start: my_start_token(M.key || M.value),
|
|
44124
|
+
end: my_end_token(M.value),
|
|
44125
|
+
key: M.computed ? from_moz(M.key) : from_moz_symbol(AST_SymbolMethod, M.key),
|
|
44126
|
+
quote: from_moz_quote(M.key, M.computed),
|
|
44127
|
+
static: false,
|
|
44128
|
+
// always an object
|
|
44129
|
+
value
|
|
44130
|
+
};
|
|
44131
|
+
if (M.kind == "get") return new AST_ObjectGetter(args);
|
|
44132
|
+
if (M.kind == "set") return new AST_ObjectSetter(args);
|
|
44133
|
+
if (M.method) return new AST_ConciseMethod(args);
|
|
43922
44134
|
}
|
|
43923
44135
|
}, "Property"),
|
|
43924
44136
|
MethodDefinition: /* @__PURE__ */ __name(function(M) {
|
|
43925
44137
|
const is_private = M.key.type === "PrivateIdentifier";
|
|
43926
|
-
const key = M.computed ? from_moz(M.key) : new AST_SymbolMethod({ name: M.key.name || M.key.value });
|
|
44138
|
+
const key = M.computed ? from_moz(M.key) : new AST_SymbolMethod({ name: M.key.name || String(M.key.value) });
|
|
43927
44139
|
var args = {
|
|
43928
44140
|
start: my_start_token(M),
|
|
43929
44141
|
end: my_end_token(M),
|
|
43930
44142
|
key,
|
|
43931
|
-
|
|
44143
|
+
quote: from_moz_quote(M.key, M.computed),
|
|
44144
|
+
value: from_moz_lambda(
|
|
44145
|
+
M.value,
|
|
44146
|
+
/*is_method=*/
|
|
44147
|
+
true
|
|
44148
|
+
),
|
|
43932
44149
|
static: M.static
|
|
43933
44150
|
};
|
|
43934
44151
|
if (M.kind == "get") {
|
|
@@ -43937,8 +44154,6 @@ var require_bundle_min = __commonJS({
|
|
|
43937
44154
|
if (M.kind == "set") {
|
|
43938
44155
|
return new (is_private ? AST_PrivateSetter : AST_ObjectSetter)(args);
|
|
43939
44156
|
}
|
|
43940
|
-
args.is_generator = M.value.generator;
|
|
43941
|
-
args.async = M.value.async;
|
|
43942
44157
|
return new (is_private ? AST_PrivateMethod : AST_ConciseMethod)(args);
|
|
43943
44158
|
}, "MethodDefinition"),
|
|
43944
44159
|
FieldDefinition: /* @__PURE__ */ __name(function(M) {
|
|
@@ -43952,6 +44167,7 @@ var require_bundle_min = __commonJS({
|
|
|
43952
44167
|
return new AST_ClassProperty({
|
|
43953
44168
|
start: my_start_token(M),
|
|
43954
44169
|
end: my_end_token(M),
|
|
44170
|
+
quote: from_moz_quote(M.key, M.computed),
|
|
43955
44171
|
key,
|
|
43956
44172
|
value: from_moz(M.value),
|
|
43957
44173
|
static: M.static
|
|
@@ -43970,14 +44186,12 @@ var require_bundle_min = __commonJS({
|
|
|
43970
44186
|
static: M.static
|
|
43971
44187
|
});
|
|
43972
44188
|
} else {
|
|
43973
|
-
|
|
43974
|
-
throw new Error("Non-Identifier key in PropertyDefinition");
|
|
43975
|
-
}
|
|
43976
|
-
key = from_moz(M.key);
|
|
44189
|
+
key = from_moz_symbol(AST_SymbolClassProperty, M.key);
|
|
43977
44190
|
}
|
|
43978
44191
|
return new AST_ClassProperty({
|
|
43979
44192
|
start: my_start_token(M),
|
|
43980
44193
|
end: my_end_token(M),
|
|
44194
|
+
quote: from_moz_quote(M.key, M.computed),
|
|
43981
44195
|
key,
|
|
43982
44196
|
value: from_moz(M.value),
|
|
43983
44197
|
static: M.static
|
|
@@ -44060,10 +44274,42 @@ var require_bundle_min = __commonJS({
|
|
|
44060
44274
|
});
|
|
44061
44275
|
}, "SwitchCase"),
|
|
44062
44276
|
VariableDeclaration: /* @__PURE__ */ __name(function(M) {
|
|
44063
|
-
|
|
44277
|
+
let decl_type;
|
|
44278
|
+
let defs_type = AST_VarDef;
|
|
44279
|
+
let sym_type;
|
|
44280
|
+
let await_using = false;
|
|
44281
|
+
if (M.kind === "const") {
|
|
44282
|
+
decl_type = AST_Const;
|
|
44283
|
+
sym_type = AST_SymbolConst;
|
|
44284
|
+
} else if (M.kind === "let") {
|
|
44285
|
+
decl_type = AST_Let;
|
|
44286
|
+
sym_type = AST_SymbolLet;
|
|
44287
|
+
} else if (M.kind === "using") {
|
|
44288
|
+
decl_type = AST_Using;
|
|
44289
|
+
defs_type = AST_UsingDef;
|
|
44290
|
+
sym_type = AST_SymbolUsing;
|
|
44291
|
+
} else if (M.kind === "await using") {
|
|
44292
|
+
decl_type = AST_Using;
|
|
44293
|
+
defs_type = AST_UsingDef;
|
|
44294
|
+
sym_type = AST_SymbolUsing;
|
|
44295
|
+
await_using = true;
|
|
44296
|
+
} else {
|
|
44297
|
+
decl_type = AST_Var;
|
|
44298
|
+
sym_type = AST_SymbolVar;
|
|
44299
|
+
}
|
|
44300
|
+
const definitions = M.declarations.map((M2) => {
|
|
44301
|
+
return new defs_type({
|
|
44302
|
+
start: my_start_token(M2),
|
|
44303
|
+
end: my_end_token(M2),
|
|
44304
|
+
name: from_moz_pattern(M2.id, sym_type),
|
|
44305
|
+
value: from_moz(M2.init)
|
|
44306
|
+
});
|
|
44307
|
+
});
|
|
44308
|
+
return new decl_type({
|
|
44064
44309
|
start: my_start_token(M),
|
|
44065
44310
|
end: my_end_token(M),
|
|
44066
|
-
definitions
|
|
44311
|
+
definitions,
|
|
44312
|
+
await: await_using
|
|
44067
44313
|
});
|
|
44068
44314
|
}, "VariableDeclaration"),
|
|
44069
44315
|
ImportDeclaration: /* @__PURE__ */ __name(function(M) {
|
|
@@ -44092,19 +44338,19 @@ var require_bundle_min = __commonJS({
|
|
|
44092
44338
|
return new AST_NameMapping({
|
|
44093
44339
|
start: my_start_token(M),
|
|
44094
44340
|
end: my_end_token(M),
|
|
44095
|
-
foreign_name:
|
|
44096
|
-
name:
|
|
44341
|
+
foreign_name: from_moz_symbol(AST_SymbolImportForeign, M.imported, M.imported.type === "Literal"),
|
|
44342
|
+
name: from_moz_symbol(AST_SymbolImport, M.local)
|
|
44097
44343
|
});
|
|
44098
44344
|
}, "ImportSpecifier"),
|
|
44099
44345
|
ImportDefaultSpecifier: /* @__PURE__ */ __name(function(M) {
|
|
44100
|
-
return
|
|
44346
|
+
return from_moz_symbol(AST_SymbolImport, M.local);
|
|
44101
44347
|
}, "ImportDefaultSpecifier"),
|
|
44102
44348
|
ImportNamespaceSpecifier: /* @__PURE__ */ __name(function(M) {
|
|
44103
44349
|
return new AST_NameMapping({
|
|
44104
44350
|
start: my_start_token(M),
|
|
44105
44351
|
end: my_end_token(M),
|
|
44106
44352
|
foreign_name: new AST_SymbolImportForeign({ name: "*" }),
|
|
44107
|
-
name:
|
|
44353
|
+
name: from_moz_symbol(AST_SymbolImport, M.local)
|
|
44108
44354
|
});
|
|
44109
44355
|
}, "ImportNamespaceSpecifier"),
|
|
44110
44356
|
ImportExpression: /* @__PURE__ */ __name(function(M) {
|
|
@@ -44124,13 +44370,15 @@ var require_bundle_min = __commonJS({
|
|
|
44124
44370
|
});
|
|
44125
44371
|
}, "ImportExpression"),
|
|
44126
44372
|
ExportAllDeclaration: /* @__PURE__ */ __name(function(M) {
|
|
44127
|
-
var foreign_name = M.exported == null ? new AST_SymbolExportForeign({ name: "*" }) :
|
|
44373
|
+
var foreign_name = M.exported == null ? new AST_SymbolExportForeign({ name: "*" }) : from_moz_symbol(AST_SymbolExportForeign, M.exported, M.exported.type === "Literal");
|
|
44128
44374
|
return new AST_Export({
|
|
44129
44375
|
start: my_start_token(M),
|
|
44130
44376
|
end: my_end_token(M),
|
|
44131
44377
|
exported_names: [
|
|
44132
44378
|
new AST_NameMapping({
|
|
44133
|
-
|
|
44379
|
+
start: my_start_token(M),
|
|
44380
|
+
end: my_end_token(M),
|
|
44381
|
+
name: new AST_SymbolExport({ name: "*" }),
|
|
44134
44382
|
foreign_name
|
|
44135
44383
|
})
|
|
44136
44384
|
],
|
|
@@ -44139,14 +44387,25 @@ var require_bundle_min = __commonJS({
|
|
|
44139
44387
|
});
|
|
44140
44388
|
}, "ExportAllDeclaration"),
|
|
44141
44389
|
ExportNamedDeclaration: /* @__PURE__ */ __name(function(M) {
|
|
44142
|
-
|
|
44143
|
-
|
|
44144
|
-
|
|
44145
|
-
|
|
44146
|
-
|
|
44147
|
-
|
|
44148
|
-
|
|
44149
|
-
|
|
44390
|
+
if (M.declaration) {
|
|
44391
|
+
return new AST_Export({
|
|
44392
|
+
start: my_start_token(M),
|
|
44393
|
+
end: my_end_token(M),
|
|
44394
|
+
exported_definition: from_moz(M.declaration),
|
|
44395
|
+
exported_names: null,
|
|
44396
|
+
module_name: null,
|
|
44397
|
+
attributes: null
|
|
44398
|
+
});
|
|
44399
|
+
} else {
|
|
44400
|
+
return new AST_Export({
|
|
44401
|
+
start: my_start_token(M),
|
|
44402
|
+
end: my_end_token(M),
|
|
44403
|
+
exported_definition: null,
|
|
44404
|
+
exported_names: M.specifiers && M.specifiers.length ? M.specifiers.map(from_moz) : [],
|
|
44405
|
+
module_name: from_moz(M.source),
|
|
44406
|
+
attributes: import_attributes_from_moz(M.attributes || M.assertions)
|
|
44407
|
+
});
|
|
44408
|
+
}
|
|
44150
44409
|
}, "ExportNamedDeclaration"),
|
|
44151
44410
|
ExportDefaultDeclaration: /* @__PURE__ */ __name(function(M) {
|
|
44152
44411
|
return new AST_Export({
|
|
@@ -44158,8 +44417,10 @@ var require_bundle_min = __commonJS({
|
|
|
44158
44417
|
}, "ExportDefaultDeclaration"),
|
|
44159
44418
|
ExportSpecifier: /* @__PURE__ */ __name(function(M) {
|
|
44160
44419
|
return new AST_NameMapping({
|
|
44161
|
-
|
|
44162
|
-
|
|
44420
|
+
start: my_start_token(M),
|
|
44421
|
+
end: my_end_token(M),
|
|
44422
|
+
foreign_name: from_moz_symbol(AST_SymbolExportForeign, M.exported, M.exported.type === "Literal"),
|
|
44423
|
+
name: from_moz_symbol(AST_SymbolExport, M.local, M.local.type === "Literal")
|
|
44163
44424
|
});
|
|
44164
44425
|
}, "ExportSpecifier"),
|
|
44165
44426
|
Literal: /* @__PURE__ */ __name(function(M) {
|
|
@@ -44185,27 +44446,13 @@ var require_bundle_min = __commonJS({
|
|
|
44185
44446
|
const bi = typeof M.value === "bigint" ? M.value.toString() : M.bigint;
|
|
44186
44447
|
if (typeof bi === "string") {
|
|
44187
44448
|
args.value = bi;
|
|
44449
|
+
args.raw = M.raw;
|
|
44188
44450
|
return new AST_BigInt(args);
|
|
44189
44451
|
}
|
|
44190
44452
|
if (val === null) return new AST_Null(args);
|
|
44191
44453
|
switch (typeof val) {
|
|
44192
44454
|
case "string":
|
|
44193
44455
|
args.quote = '"';
|
|
44194
|
-
var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2];
|
|
44195
|
-
if (p.type == "ImportSpecifier") {
|
|
44196
|
-
args.name = val;
|
|
44197
|
-
return new AST_SymbolImportForeign(args);
|
|
44198
|
-
} else if (p.type == "ExportSpecifier") {
|
|
44199
|
-
args.name = val;
|
|
44200
|
-
if (M == p.exported) {
|
|
44201
|
-
return new AST_SymbolExportForeign(args);
|
|
44202
|
-
} else {
|
|
44203
|
-
return new AST_SymbolExport(args);
|
|
44204
|
-
}
|
|
44205
|
-
} else if (p.type == "ExportAllDeclaration" && M == p.exported) {
|
|
44206
|
-
args.name = val;
|
|
44207
|
-
return new AST_SymbolExportForeign(args);
|
|
44208
|
-
}
|
|
44209
44456
|
args.value = val;
|
|
44210
44457
|
return new AST_String(args);
|
|
44211
44458
|
case "number":
|
|
@@ -44230,8 +44477,7 @@ var require_bundle_min = __commonJS({
|
|
|
44230
44477
|
}
|
|
44231
44478
|
}, "MetaProperty"),
|
|
44232
44479
|
Identifier: /* @__PURE__ */ __name(function(M) {
|
|
44233
|
-
|
|
44234
|
-
return new (p.type == "LabeledStatement" ? AST_Label : p.type == "VariableDeclarator" && p.id === M ? p.kind == "const" ? AST_SymbolConst : p.kind == "let" ? AST_SymbolLet : AST_SymbolVar : /Import.*Specifier/.test(p.type) ? p.local === M ? AST_SymbolImport : AST_SymbolImportForeign : p.type == "ExportSpecifier" ? p.local === M ? AST_SymbolExport : AST_SymbolExportForeign : p.type == "FunctionExpression" ? p.id === M ? AST_SymbolLambda : AST_SymbolFunarg : p.type == "FunctionDeclaration" ? p.id === M ? AST_SymbolDefun : AST_SymbolFunarg : p.type == "ArrowFunctionExpression" ? p.params.includes(M) ? AST_SymbolFunarg : AST_SymbolRef : p.type == "ClassExpression" ? p.id === M ? AST_SymbolClass : AST_SymbolRef : p.type == "Property" ? p.key === M && p.computed || p.value === M ? AST_SymbolRef : AST_SymbolMethod : p.type == "PropertyDefinition" || p.type === "FieldDefinition" ? p.key === M && p.computed || p.value === M ? AST_SymbolRef : AST_SymbolClassProperty : p.type == "ClassDeclaration" ? p.id === M ? AST_SymbolDefClass : AST_SymbolRef : p.type == "MethodDefinition" ? p.computed ? AST_SymbolRef : AST_SymbolMethod : p.type == "CatchClause" ? AST_SymbolCatch : p.type == "BreakStatement" || p.type == "ContinueStatement" ? AST_LabelRef : AST_SymbolRef)({
|
|
44480
|
+
return new AST_SymbolRef({
|
|
44235
44481
|
start: my_start_token(M),
|
|
44236
44482
|
end: my_end_token(M),
|
|
44237
44483
|
name: M.name
|
|
@@ -44260,25 +44506,32 @@ var require_bundle_min = __commonJS({
|
|
|
44260
44506
|
});
|
|
44261
44507
|
}, "IfStatement"),
|
|
44262
44508
|
LabeledStatement: /* @__PURE__ */ __name(function(M) {
|
|
44263
|
-
|
|
44264
|
-
|
|
44265
|
-
|
|
44266
|
-
|
|
44267
|
-
|
|
44268
|
-
|
|
44509
|
+
try {
|
|
44510
|
+
const label = from_moz_symbol(AST_Label, M.label);
|
|
44511
|
+
FROM_MOZ_LABELS.push(label);
|
|
44512
|
+
const stat = new AST_LabeledStatement({
|
|
44513
|
+
start: my_start_token(M),
|
|
44514
|
+
end: my_end_token(M),
|
|
44515
|
+
label,
|
|
44516
|
+
body: from_moz(M.body)
|
|
44517
|
+
});
|
|
44518
|
+
return stat;
|
|
44519
|
+
} finally {
|
|
44520
|
+
FROM_MOZ_LABELS.pop();
|
|
44521
|
+
}
|
|
44269
44522
|
}, "LabeledStatement"),
|
|
44270
44523
|
BreakStatement: /* @__PURE__ */ __name(function(M) {
|
|
44271
44524
|
return new AST_Break({
|
|
44272
44525
|
start: my_start_token(M),
|
|
44273
44526
|
end: my_end_token(M),
|
|
44274
|
-
label:
|
|
44527
|
+
label: from_moz_label_ref(M.label)
|
|
44275
44528
|
});
|
|
44276
44529
|
}, "BreakStatement"),
|
|
44277
44530
|
ContinueStatement: /* @__PURE__ */ __name(function(M) {
|
|
44278
44531
|
return new AST_Continue({
|
|
44279
44532
|
start: my_start_token(M),
|
|
44280
44533
|
end: my_end_token(M),
|
|
44281
|
-
label:
|
|
44534
|
+
label: from_moz_label_ref(M.label)
|
|
44282
44535
|
});
|
|
44283
44536
|
}, "ContinueStatement"),
|
|
44284
44537
|
WithStatement: /* @__PURE__ */ __name(function(M) {
|
|
@@ -44377,32 +44630,26 @@ var require_bundle_min = __commonJS({
|
|
|
44377
44630
|
end: my_end_token(M)
|
|
44378
44631
|
});
|
|
44379
44632
|
}, "DebuggerStatement"),
|
|
44380
|
-
VariableDeclarator: /* @__PURE__ */ __name(function(M) {
|
|
44381
|
-
return new AST_VarDef({
|
|
44382
|
-
start: my_start_token(M),
|
|
44383
|
-
end: my_end_token(M),
|
|
44384
|
-
name: from_moz(M.id),
|
|
44385
|
-
value: from_moz(M.init)
|
|
44386
|
-
});
|
|
44387
|
-
}, "VariableDeclarator"),
|
|
44388
44633
|
CatchClause: /* @__PURE__ */ __name(function(M) {
|
|
44389
44634
|
return new AST_Catch({
|
|
44390
44635
|
start: my_start_token(M),
|
|
44391
44636
|
end: my_end_token(M),
|
|
44392
|
-
argname:
|
|
44637
|
+
argname: M.param ? from_moz_pattern(M.param, AST_SymbolCatch) : null,
|
|
44393
44638
|
body: from_moz(M.body).body
|
|
44394
44639
|
});
|
|
44395
44640
|
}, "CatchClause"),
|
|
44396
44641
|
ThisExpression: /* @__PURE__ */ __name(function(M) {
|
|
44397
44642
|
return new AST_This({
|
|
44398
44643
|
start: my_start_token(M),
|
|
44644
|
+
name: "this",
|
|
44399
44645
|
end: my_end_token(M)
|
|
44400
44646
|
});
|
|
44401
44647
|
}, "ThisExpression"),
|
|
44402
44648
|
Super: /* @__PURE__ */ __name(function(M) {
|
|
44403
44649
|
return new AST_Super({
|
|
44404
44650
|
start: my_start_token(M),
|
|
44405
|
-
end: my_end_token(M)
|
|
44651
|
+
end: my_end_token(M),
|
|
44652
|
+
name: "super"
|
|
44406
44653
|
});
|
|
44407
44654
|
}, "Super"),
|
|
44408
44655
|
BinaryExpression: /* @__PURE__ */ __name(function(M) {
|
|
@@ -44440,6 +44687,7 @@ var require_bundle_min = __commonJS({
|
|
|
44440
44687
|
start: my_start_token(M),
|
|
44441
44688
|
end: my_end_token(M),
|
|
44442
44689
|
operator: M.operator,
|
|
44690
|
+
logical: M.operator === "??=" || M.operator === "&&=" || M.operator === "||=",
|
|
44443
44691
|
left: from_moz(M.left),
|
|
44444
44692
|
right: from_moz(M.right)
|
|
44445
44693
|
});
|
|
@@ -44484,7 +44732,7 @@ var require_bundle_min = __commonJS({
|
|
|
44484
44732
|
return new (M.type === "ClassDeclaration" ? AST_DefClass : AST_ClassExpression)({
|
|
44485
44733
|
start: my_start_token(M),
|
|
44486
44734
|
end: my_end_token(M),
|
|
44487
|
-
name:
|
|
44735
|
+
name: M.id && from_moz_symbol(M.type === "ClassDeclaration" ? AST_SymbolDefClass : AST_SymbolClass, M.id),
|
|
44488
44736
|
extends: from_moz(M.superClass),
|
|
44489
44737
|
properties: M.body.body.map(from_moz)
|
|
44490
44738
|
});
|
|
@@ -44611,20 +44859,13 @@ var require_bundle_min = __commonJS({
|
|
|
44611
44859
|
type: "DebuggerStatement"
|
|
44612
44860
|
};
|
|
44613
44861
|
}, "To_Moz_DebuggerStatement"));
|
|
44614
|
-
def_to_moz(
|
|
44862
|
+
def_to_moz(AST_VarDefLike, /* @__PURE__ */ __name(function To_Moz_VariableDeclarator(M) {
|
|
44615
44863
|
return {
|
|
44616
44864
|
type: "VariableDeclarator",
|
|
44617
44865
|
id: to_moz(M.name),
|
|
44618
44866
|
init: to_moz(M.value)
|
|
44619
44867
|
};
|
|
44620
44868
|
}, "To_Moz_VariableDeclarator"));
|
|
44621
|
-
def_to_moz(AST_Catch, /* @__PURE__ */ __name(function To_Moz_CatchClause(M) {
|
|
44622
|
-
return {
|
|
44623
|
-
type: "CatchClause",
|
|
44624
|
-
param: to_moz(M.argname),
|
|
44625
|
-
body: to_moz_block(M)
|
|
44626
|
-
};
|
|
44627
|
-
}, "To_Moz_CatchClause"));
|
|
44628
44869
|
def_to_moz(AST_This, /* @__PURE__ */ __name(function To_Moz_ThisExpression() {
|
|
44629
44870
|
return {
|
|
44630
44871
|
type: "ThisExpression"
|
|
@@ -44635,30 +44876,6 @@ var require_bundle_min = __commonJS({
|
|
|
44635
44876
|
type: "Super"
|
|
44636
44877
|
};
|
|
44637
44878
|
}, "To_Moz_Super"));
|
|
44638
|
-
def_to_moz(AST_Binary, /* @__PURE__ */ __name(function To_Moz_BinaryExpression(M) {
|
|
44639
|
-
return {
|
|
44640
|
-
type: "BinaryExpression",
|
|
44641
|
-
operator: M.operator,
|
|
44642
|
-
left: to_moz(M.left),
|
|
44643
|
-
right: to_moz(M.right)
|
|
44644
|
-
};
|
|
44645
|
-
}, "To_Moz_BinaryExpression"));
|
|
44646
|
-
def_to_moz(AST_Binary, /* @__PURE__ */ __name(function To_Moz_LogicalExpression(M) {
|
|
44647
|
-
return {
|
|
44648
|
-
type: "LogicalExpression",
|
|
44649
|
-
operator: M.operator,
|
|
44650
|
-
left: to_moz(M.left),
|
|
44651
|
-
right: to_moz(M.right)
|
|
44652
|
-
};
|
|
44653
|
-
}, "To_Moz_LogicalExpression"));
|
|
44654
|
-
def_to_moz(AST_Assign, /* @__PURE__ */ __name(function To_Moz_AssignmentExpression(M) {
|
|
44655
|
-
return {
|
|
44656
|
-
type: "AssignmentExpression",
|
|
44657
|
-
operator: M.operator,
|
|
44658
|
-
left: to_moz(M.left),
|
|
44659
|
-
right: to_moz(M.right)
|
|
44660
|
-
};
|
|
44661
|
-
}, "To_Moz_AssignmentExpression"));
|
|
44662
44879
|
def_to_moz(AST_Conditional, /* @__PURE__ */ __name(function To_Moz_ConditionalExpression(M) {
|
|
44663
44880
|
return {
|
|
44664
44881
|
type: "ConditionalExpression",
|
|
@@ -44680,7 +44897,7 @@ var require_bundle_min = __commonJS({
|
|
|
44680
44897
|
return {
|
|
44681
44898
|
type: "ImportExpression",
|
|
44682
44899
|
source,
|
|
44683
|
-
options
|
|
44900
|
+
options: options || null
|
|
44684
44901
|
};
|
|
44685
44902
|
}
|
|
44686
44903
|
return {
|
|
@@ -44733,31 +44950,30 @@ var require_bundle_min = __commonJS({
|
|
|
44733
44950
|
return {
|
|
44734
44951
|
type: "FunctionDeclaration",
|
|
44735
44952
|
id: to_moz(M.name),
|
|
44736
|
-
params: M.argnames.map(
|
|
44953
|
+
params: M.argnames.map(to_moz_pattern),
|
|
44737
44954
|
generator: M.is_generator,
|
|
44738
44955
|
async: M.async,
|
|
44739
44956
|
body: to_moz_scope("BlockStatement", M)
|
|
44740
44957
|
};
|
|
44741
44958
|
}, "To_Moz_FunctionDeclaration"));
|
|
44742
|
-
def_to_moz(AST_Function, /* @__PURE__ */ __name(function To_Moz_FunctionExpression(M
|
|
44743
|
-
var is_generator = parent.is_generator !== void 0 ? parent.is_generator : M.is_generator;
|
|
44959
|
+
def_to_moz(AST_Function, /* @__PURE__ */ __name(function To_Moz_FunctionExpression(M) {
|
|
44744
44960
|
return {
|
|
44745
44961
|
type: "FunctionExpression",
|
|
44746
44962
|
id: to_moz(M.name),
|
|
44747
|
-
params: M.argnames.map(
|
|
44748
|
-
generator: is_generator,
|
|
44749
|
-
async: M.async,
|
|
44963
|
+
params: M.argnames.map(to_moz_pattern),
|
|
44964
|
+
generator: M.is_generator || false,
|
|
44965
|
+
async: M.async || false,
|
|
44750
44966
|
body: to_moz_scope("BlockStatement", M)
|
|
44751
44967
|
};
|
|
44752
44968
|
}, "To_Moz_FunctionExpression"));
|
|
44753
44969
|
def_to_moz(AST_Arrow, /* @__PURE__ */ __name(function To_Moz_ArrowFunctionExpression(M) {
|
|
44754
|
-
var body = {
|
|
44970
|
+
var body = M.body.length === 1 && M.body[0] instanceof AST_Return && M.body[0].value ? to_moz(M.body[0].value) : {
|
|
44755
44971
|
type: "BlockStatement",
|
|
44756
44972
|
body: M.body.map(to_moz)
|
|
44757
44973
|
};
|
|
44758
44974
|
return {
|
|
44759
44975
|
type: "ArrowFunctionExpression",
|
|
44760
|
-
params: M.argnames.map(
|
|
44976
|
+
params: M.argnames.map(to_moz_pattern),
|
|
44761
44977
|
async: M.async,
|
|
44762
44978
|
body
|
|
44763
44979
|
};
|
|
@@ -44766,14 +44982,39 @@ var require_bundle_min = __commonJS({
|
|
|
44766
44982
|
if (M.is_array) {
|
|
44767
44983
|
return {
|
|
44768
44984
|
type: "ArrayPattern",
|
|
44769
|
-
elements: M.names.map(
|
|
44985
|
+
elements: M.names.map(
|
|
44986
|
+
(M2) => M2 instanceof AST_Hole ? null : to_moz_pattern(M2)
|
|
44987
|
+
)
|
|
44770
44988
|
};
|
|
44771
44989
|
}
|
|
44772
44990
|
return {
|
|
44773
44991
|
type: "ObjectPattern",
|
|
44774
|
-
properties: M.names.map(
|
|
44992
|
+
properties: M.names.map((M2) => {
|
|
44993
|
+
if (M2 instanceof AST_ObjectKeyVal) {
|
|
44994
|
+
var computed = M2.computed_key();
|
|
44995
|
+
const [shorthand, key] = to_moz_property_key(M2.key, computed, M2.quote, M2.value);
|
|
44996
|
+
return {
|
|
44997
|
+
type: "Property",
|
|
44998
|
+
computed,
|
|
44999
|
+
kind: "init",
|
|
45000
|
+
key,
|
|
45001
|
+
method: false,
|
|
45002
|
+
shorthand,
|
|
45003
|
+
value: to_moz_pattern(M2.value)
|
|
45004
|
+
};
|
|
45005
|
+
} else {
|
|
45006
|
+
return to_moz_pattern(M2);
|
|
45007
|
+
}
|
|
45008
|
+
})
|
|
44775
45009
|
};
|
|
44776
45010
|
}, "To_Moz_ObjectPattern"));
|
|
45011
|
+
def_to_moz(AST_DefaultAssign, /* @__PURE__ */ __name(function To_Moz_AssignmentExpression(M) {
|
|
45012
|
+
return {
|
|
45013
|
+
type: "AssignmentPattern",
|
|
45014
|
+
left: to_moz_pattern(M.left),
|
|
45015
|
+
right: to_moz(M.right)
|
|
45016
|
+
};
|
|
45017
|
+
}, "To_Moz_AssignmentExpression"));
|
|
44777
45018
|
def_to_moz(AST_Directive, /* @__PURE__ */ __name(function To_Moz_Directive(M) {
|
|
44778
45019
|
return {
|
|
44779
45020
|
type: "ExpressionStatement",
|
|
@@ -44810,15 +45051,14 @@ var require_bundle_min = __commonJS({
|
|
|
44810
45051
|
def_to_moz(AST_Catch, /* @__PURE__ */ __name(function To_Moz_CatchClause(M) {
|
|
44811
45052
|
return {
|
|
44812
45053
|
type: "CatchClause",
|
|
44813
|
-
param:
|
|
44814
|
-
guard: null,
|
|
45054
|
+
param: M.argname != null ? to_moz_pattern(M.argname) : null,
|
|
44815
45055
|
body: to_moz_block(M)
|
|
44816
45056
|
};
|
|
44817
45057
|
}, "To_Moz_CatchClause"));
|
|
44818
|
-
def_to_moz(
|
|
45058
|
+
def_to_moz(AST_DefinitionsLike, /* @__PURE__ */ __name(function To_Moz_VariableDeclaration(M) {
|
|
44819
45059
|
return {
|
|
44820
45060
|
type: "VariableDeclaration",
|
|
44821
|
-
kind: M instanceof AST_Const ? "const" : M instanceof AST_Let ? "let" : "var",
|
|
45061
|
+
kind: M instanceof AST_Const ? "const" : M instanceof AST_Let ? "let" : M instanceof AST_Using ? M.await ? "await using" : "using" : "var",
|
|
44822
45062
|
declarations: M.definitions.map(to_moz)
|
|
44823
45063
|
};
|
|
44824
45064
|
}, "To_Moz_VariableDeclaration"));
|
|
@@ -44840,8 +45080,7 @@ var require_bundle_min = __commonJS({
|
|
|
44840
45080
|
def_to_moz(AST_Export, /* @__PURE__ */ __name(function To_Moz_ExportDeclaration(M) {
|
|
44841
45081
|
if (M.exported_names) {
|
|
44842
45082
|
var first_exported = M.exported_names[0];
|
|
44843
|
-
|
|
44844
|
-
if (first_exported_name.name === "*" && !first_exported_name.quote) {
|
|
45083
|
+
if (first_exported && first_exported.name.name === "*" && !first_exported.name.quote) {
|
|
44845
45084
|
var foreign_name = first_exported.foreign_name;
|
|
44846
45085
|
var exported = foreign_name.name === "*" && !foreign_name.quote ? null : to_moz(foreign_name);
|
|
44847
45086
|
return {
|
|
@@ -44865,10 +45104,19 @@ var require_bundle_min = __commonJS({
|
|
|
44865
45104
|
attributes: import_attributes_to_moz(M.attributes)
|
|
44866
45105
|
};
|
|
44867
45106
|
}
|
|
44868
|
-
|
|
44869
|
-
|
|
44870
|
-
|
|
44871
|
-
|
|
45107
|
+
if (M.is_default) {
|
|
45108
|
+
return {
|
|
45109
|
+
type: "ExportDefaultDeclaration",
|
|
45110
|
+
declaration: to_moz(M.exported_value || M.exported_definition)
|
|
45111
|
+
};
|
|
45112
|
+
} else {
|
|
45113
|
+
return {
|
|
45114
|
+
type: "ExportNamedDeclaration",
|
|
45115
|
+
declaration: to_moz(M.exported_value || M.exported_definition),
|
|
45116
|
+
specifiers: [],
|
|
45117
|
+
source: null
|
|
45118
|
+
};
|
|
45119
|
+
}
|
|
44872
45120
|
}, "To_Moz_ExportDeclaration"));
|
|
44873
45121
|
def_to_moz(AST_Import, /* @__PURE__ */ __name(function To_Moz_ImportDeclaration(M) {
|
|
44874
45122
|
var specifiers = [];
|
|
@@ -44973,6 +45221,14 @@ var require_bundle_min = __commonJS({
|
|
|
44973
45221
|
right: to_moz(M.right)
|
|
44974
45222
|
};
|
|
44975
45223
|
}, "To_Moz_BinaryExpression"));
|
|
45224
|
+
def_to_moz(AST_Assign, /* @__PURE__ */ __name(function To_Moz_AssignmentExpression(M) {
|
|
45225
|
+
return {
|
|
45226
|
+
type: "AssignmentExpression",
|
|
45227
|
+
operator: M.operator,
|
|
45228
|
+
left: to_moz(M.left),
|
|
45229
|
+
right: to_moz(M.right)
|
|
45230
|
+
};
|
|
45231
|
+
}, "To_Moz_AssignmentExpression"));
|
|
44976
45232
|
def_to_moz(AST_PrivateIn, /* @__PURE__ */ __name(function To_Moz_BinaryExpression_PrivateIn(M) {
|
|
44977
45233
|
return {
|
|
44978
45234
|
type: "BinaryExpression",
|
|
@@ -44994,29 +45250,10 @@ var require_bundle_min = __commonJS({
|
|
|
44994
45250
|
};
|
|
44995
45251
|
}, "To_Moz_ObjectExpression"));
|
|
44996
45252
|
def_to_moz(AST_ObjectProperty, /* @__PURE__ */ __name(function To_Moz_Property(M, parent) {
|
|
44997
|
-
var
|
|
44998
|
-
|
|
44999
|
-
value: M.key
|
|
45000
|
-
};
|
|
45001
|
-
if (typeof M.key === "number") {
|
|
45002
|
-
key = {
|
|
45003
|
-
type: "Literal",
|
|
45004
|
-
value: Number(M.key)
|
|
45005
|
-
};
|
|
45006
|
-
}
|
|
45007
|
-
if (typeof M.key === "string") {
|
|
45008
|
-
key = {
|
|
45009
|
-
type: "Identifier",
|
|
45010
|
-
name: M.key
|
|
45011
|
-
};
|
|
45012
|
-
}
|
|
45253
|
+
var computed = M.computed_key();
|
|
45254
|
+
const [shorthand, key] = to_moz_property_key(M.key, computed, M.quote, M.value);
|
|
45013
45255
|
var kind;
|
|
45014
|
-
|
|
45015
|
-
var computed = string_or_num ? false : !(M.key instanceof AST_Symbol) || M.key instanceof AST_SymbolRef;
|
|
45016
|
-
if (M instanceof AST_ObjectKeyVal) {
|
|
45017
|
-
kind = "init";
|
|
45018
|
-
computed = !string_or_num;
|
|
45019
|
-
} else if (M instanceof AST_ObjectGetter) {
|
|
45256
|
+
if (M instanceof AST_ObjectGetter) {
|
|
45020
45257
|
kind = "get";
|
|
45021
45258
|
} else if (M instanceof AST_ObjectSetter) {
|
|
45022
45259
|
kind = "set";
|
|
@@ -45069,29 +45306,46 @@ var require_bundle_min = __commonJS({
|
|
|
45069
45306
|
return {
|
|
45070
45307
|
type: "Property",
|
|
45071
45308
|
computed,
|
|
45309
|
+
method: false,
|
|
45310
|
+
shorthand,
|
|
45072
45311
|
kind,
|
|
45073
45312
|
key,
|
|
45074
45313
|
value: to_moz(M.value)
|
|
45075
45314
|
};
|
|
45076
45315
|
}, "To_Moz_Property"));
|
|
45316
|
+
def_to_moz(AST_ObjectKeyVal, /* @__PURE__ */ __name(function To_Moz_Property(M) {
|
|
45317
|
+
var computed = M.computed_key();
|
|
45318
|
+
const [shorthand, key] = to_moz_property_key(M.key, computed, M.quote, M.value);
|
|
45319
|
+
return {
|
|
45320
|
+
type: "Property",
|
|
45321
|
+
computed,
|
|
45322
|
+
shorthand,
|
|
45323
|
+
method: false,
|
|
45324
|
+
kind: "init",
|
|
45325
|
+
key,
|
|
45326
|
+
value: to_moz(M.value)
|
|
45327
|
+
};
|
|
45328
|
+
}, "To_Moz_Property"));
|
|
45077
45329
|
def_to_moz(AST_ConciseMethod, /* @__PURE__ */ __name(function To_Moz_MethodDefinition(M, parent) {
|
|
45330
|
+
const computed = M.computed_key();
|
|
45331
|
+
const [_always_false, key] = to_moz_property_key(M.key, computed, M.quote, M.value);
|
|
45078
45332
|
if (parent instanceof AST_Object) {
|
|
45079
45333
|
return {
|
|
45080
45334
|
type: "Property",
|
|
45081
|
-
computed: !(M.key instanceof AST_Symbol) || M.key instanceof AST_SymbolRef,
|
|
45082
45335
|
kind: "init",
|
|
45336
|
+
computed,
|
|
45083
45337
|
method: true,
|
|
45084
45338
|
shorthand: false,
|
|
45085
|
-
key
|
|
45339
|
+
key,
|
|
45086
45340
|
value: to_moz(M.value)
|
|
45087
45341
|
};
|
|
45088
45342
|
}
|
|
45089
45343
|
return {
|
|
45090
45344
|
type: "MethodDefinition",
|
|
45091
|
-
kind: M.key === "constructor" ? "constructor" : "method",
|
|
45092
|
-
|
|
45345
|
+
kind: !computed && M.key.name === "constructor" ? "constructor" : "method",
|
|
45346
|
+
computed,
|
|
45347
|
+
key,
|
|
45093
45348
|
value: to_moz(M.value),
|
|
45094
|
-
computed: !(M.key instanceof AST_Symbol) || M.key instanceof AST_SymbolRef,
|
|
45095
45349
|
static: M.static
|
|
45096
45350
|
};
|
|
45097
45351
|
}, "To_Moz_MethodDefinition"));
|
|
@@ -45180,7 +45434,8 @@ var require_bundle_min = __commonJS({
|
|
|
45180
45434
|
value: null,
|
|
45181
45435
|
// `M.value` is a string that may be a hex number representation.
|
|
45182
45436
|
// but "bigint" property should have only decimal digits
|
|
45183
|
-
bigint: typeof BigInt === "function" ? BigInt(M.value).toString() : M.value
|
|
45437
|
+
bigint: typeof BigInt === "function" ? BigInt(M.value).toString() : M.value,
|
|
45438
|
+
raw: M.raw
|
|
45184
45439
|
}));
|
|
45185
45440
|
AST_Boolean.DEFMETHOD("to_mozilla_ast", AST_Constant.prototype.to_mozilla_ast);
|
|
45186
45441
|
AST_Null.DEFMETHOD("to_mozilla_ast", AST_Constant.prototype.to_mozilla_ast);
|
|
@@ -45221,19 +45476,120 @@ var require_bundle_min = __commonJS({
|
|
|
45221
45476
|
);
|
|
45222
45477
|
}
|
|
45223
45478
|
__name(my_end_token, "my_end_token");
|
|
45224
|
-
var
|
|
45479
|
+
var FROM_MOZ_LABELS = null;
|
|
45225
45480
|
function from_moz(node) {
|
|
45226
|
-
|
|
45227
|
-
|
|
45228
|
-
FROM_MOZ_STACK.pop();
|
|
45229
|
-
return ret;
|
|
45481
|
+
if (node == null) return null;
|
|
45482
|
+
return MOZ_TO_ME[node.type](node);
|
|
45230
45483
|
}
|
|
45231
45484
|
__name(from_moz, "from_moz");
|
|
45485
|
+
function from_moz_quote(moz_key, computed) {
|
|
45486
|
+
if (!computed && moz_key.type === "Literal" && typeof moz_key.value === "string") {
|
|
45487
|
+
return '"';
|
|
45488
|
+
} else {
|
|
45489
|
+
return "";
|
|
45490
|
+
}
|
|
45491
|
+
}
|
|
45492
|
+
__name(from_moz_quote, "from_moz_quote");
|
|
45493
|
+
function from_moz_symbol(symbol_type, M, has_quote) {
|
|
45494
|
+
return new symbol_type({
|
|
45495
|
+
start: my_start_token(M),
|
|
45496
|
+
quote: has_quote ? '"' : void 0,
|
|
45497
|
+
name: M.type === "Identifier" ? M.name : String(M.value),
|
|
45498
|
+
end: my_end_token(M)
|
|
45499
|
+
});
|
|
45500
|
+
}
|
|
45501
|
+
__name(from_moz_symbol, "from_moz_symbol");
|
|
45502
|
+
function from_moz_lambda(M, is_method) {
|
|
45503
|
+
return new (is_method ? AST_Accessor : AST_Function)({
|
|
45504
|
+
start: my_start_token(M),
|
|
45505
|
+
end: my_end_token(M),
|
|
45506
|
+
name: M.id && from_moz_symbol(is_method ? AST_SymbolMethod : AST_SymbolLambda, M.id),
|
|
45507
|
+
argnames: M.params.map((M2) => from_moz_pattern(M2, AST_SymbolFunarg)),
|
|
45508
|
+
is_generator: M.generator,
|
|
45509
|
+
async: M.async,
|
|
45510
|
+
body: normalize_directives(from_moz(M.body).body)
|
|
45511
|
+
});
|
|
45512
|
+
}
|
|
45513
|
+
__name(from_moz_lambda, "from_moz_lambda");
|
|
45514
|
+
function from_moz_pattern(M, sym_type) {
|
|
45515
|
+
switch (M.type) {
|
|
45516
|
+
case "ObjectPattern":
|
|
45517
|
+
return new AST_Destructuring({
|
|
45518
|
+
start: my_start_token(M),
|
|
45519
|
+
end: my_end_token(M),
|
|
45520
|
+
names: M.properties.map((p) => from_moz_pattern(p, sym_type)),
|
|
45521
|
+
is_array: false
|
|
45522
|
+
});
|
|
45523
|
+
case "Property":
|
|
45524
|
+
var key = M.key;
|
|
45525
|
+
var args = {
|
|
45526
|
+
start: my_start_token(key || M.value),
|
|
45527
|
+
end: my_end_token(M.value),
|
|
45528
|
+
key: key.type == "Identifier" ? key.name : String(key.value),
|
|
45529
|
+
quote: !M.computed && key.type === "Literal" && typeof key.value === "string" ? '"' : "",
|
|
45530
|
+
value: from_moz_pattern(M.value, sym_type)
|
|
45531
|
+
};
|
|
45532
|
+
if (M.computed) {
|
|
45533
|
+
args.key = from_moz(M.key);
|
|
45534
|
+
}
|
|
45535
|
+
return new AST_ObjectKeyVal(args);
|
|
45536
|
+
case "ArrayPattern":
|
|
45537
|
+
return new AST_Destructuring({
|
|
45538
|
+
start: my_start_token(M),
|
|
45539
|
+
end: my_end_token(M),
|
|
45540
|
+
names: M.elements.map(function(elm) {
|
|
45541
|
+
if (elm === null) {
|
|
45542
|
+
return new AST_Hole();
|
|
45543
|
+
}
|
|
45544
|
+
return from_moz_pattern(elm, sym_type);
|
|
45545
|
+
}),
|
|
45546
|
+
is_array: true
|
|
45547
|
+
});
|
|
45548
|
+
case "SpreadElement":
|
|
45549
|
+
case "RestElement":
|
|
45550
|
+
return new AST_Expansion({
|
|
45551
|
+
start: my_start_token(M),
|
|
45552
|
+
end: my_end_token(M),
|
|
45553
|
+
expression: from_moz_pattern(M.argument, sym_type)
|
|
45554
|
+
});
|
|
45555
|
+
case "AssignmentPattern":
|
|
45556
|
+
return new AST_DefaultAssign({
|
|
45557
|
+
start: my_start_token(M),
|
|
45558
|
+
end: my_end_token(M),
|
|
45559
|
+
left: from_moz_pattern(M.left, sym_type),
|
|
45560
|
+
operator: "=",
|
|
45561
|
+
right: from_moz(M.right)
|
|
45562
|
+
});
|
|
45563
|
+
case "Identifier":
|
|
45564
|
+
return new sym_type({
|
|
45565
|
+
start: my_start_token(M),
|
|
45566
|
+
end: my_end_token(M),
|
|
45567
|
+
name: M.name
|
|
45568
|
+
});
|
|
45569
|
+
default:
|
|
45570
|
+
throw new Error("Invalid node type for destructuring: " + M.type);
|
|
45571
|
+
}
|
|
45572
|
+
}
|
|
45573
|
+
__name(from_moz_pattern, "from_moz_pattern");
|
|
45574
|
+
function from_moz_label_ref(m_label) {
|
|
45575
|
+
if (!m_label) return null;
|
|
45576
|
+
const label = from_moz_symbol(AST_LabelRef, m_label);
|
|
45577
|
+
let i = FROM_MOZ_LABELS.length;
|
|
45578
|
+
while (i--) {
|
|
45579
|
+
const label_origin = FROM_MOZ_LABELS[i];
|
|
45580
|
+
if (label.name === label_origin.name) {
|
|
45581
|
+
label.thedef = label_origin;
|
|
45582
|
+
break;
|
|
45583
|
+
}
|
|
45584
|
+
}
|
|
45585
|
+
return label;
|
|
45586
|
+
}
|
|
45587
|
+
__name(from_moz_label_ref, "from_moz_label_ref");
|
|
45232
45588
|
AST_Node.from_mozilla_ast = function(node) {
|
|
45233
|
-
var
|
|
45234
|
-
|
|
45589
|
+
var save_labels = FROM_MOZ_LABELS;
|
|
45590
|
+
FROM_MOZ_LABELS = [];
|
|
45235
45591
|
var ast = from_moz(node);
|
|
45236
|
-
|
|
45592
|
+
FROM_MOZ_LABELS = save_labels;
|
|
45237
45593
|
return ast;
|
|
45238
45594
|
};
|
|
45239
45595
|
function set_moz_loc(mynode, moznode) {
|
|
@@ -45277,6 +45633,36 @@ var require_bundle_min = __commonJS({
|
|
|
45277
45633
|
return ast;
|
|
45278
45634
|
}
|
|
45279
45635
|
__name(to_moz, "to_moz");
|
|
45636
|
+
function to_moz_property_key(key, computed = false, quote = false, value = null) {
|
|
45637
|
+
if (computed) {
|
|
45638
|
+
return [false, to_moz(key)];
|
|
45639
|
+
}
|
|
45640
|
+
const key_name = typeof key === "string" ? key : key.name;
|
|
45641
|
+
let moz_key;
|
|
45642
|
+
if (quote) {
|
|
45643
|
+
moz_key = { type: "Literal", value: key_name, raw: JSON.stringify(key_name) };
|
|
45644
|
+
} else if ("" + +key_name === key_name && +key_name >= 0) {
|
|
45645
|
+
moz_key = { type: "Literal", value: +key_name, raw: JSON.stringify(+key_name) };
|
|
45646
|
+
} else {
|
|
45647
|
+
moz_key = { type: "Identifier", name: key_name };
|
|
45648
|
+
}
|
|
45649
|
+
const shorthand = moz_key.type === "Identifier" && moz_key.name === key_name && (value instanceof AST_Symbol && value.name === key_name || value instanceof AST_DefaultAssign && value.left.name === key_name);
|
|
45650
|
+
return [shorthand, moz_key];
|
|
45651
|
+
}
|
|
45652
|
+
__name(to_moz_property_key, "to_moz_property_key");
|
|
45653
|
+
function to_moz_pattern(node) {
|
|
45654
|
+
if (node instanceof AST_Expansion) {
|
|
45655
|
+
return {
|
|
45656
|
+
type: "RestElement",
|
|
45657
|
+
argument: to_moz_pattern(node.expression)
|
|
45658
|
+
};
|
|
45659
|
+
}
|
|
45660
|
+
if (node instanceof AST_Symbol || node instanceof AST_Destructuring || node instanceof AST_DefaultAssign || node instanceof AST_PropAccess) {
|
|
45661
|
+
return to_moz(node);
|
|
45662
|
+
}
|
|
45663
|
+
throw new Error(node.TYPE);
|
|
45664
|
+
}
|
|
45665
|
+
__name(to_moz_pattern, "to_moz_pattern");
|
|
45280
45666
|
function to_moz_in_destructuring() {
|
|
45281
45667
|
var i = TO_MOZ_STACK.length;
|
|
45282
45668
|
while (i--) {
|
|
@@ -45427,7 +45813,7 @@ var require_bundle_min = __commonJS({
|
|
|
45427
45813
|
webkit: false,
|
|
45428
45814
|
width: 80,
|
|
45429
45815
|
wrap_iife: false,
|
|
45430
|
-
wrap_func_args:
|
|
45816
|
+
wrap_func_args: false,
|
|
45431
45817
|
_destroy_ast: false
|
|
45432
45818
|
}, true);
|
|
45433
45819
|
if (options.shorthand === void 0)
|
|
@@ -46118,7 +46504,7 @@ var require_bundle_min = __commonJS({
|
|
|
46118
46504
|
});
|
|
46119
46505
|
PARENS(AST_Sequence, function(output) {
|
|
46120
46506
|
var p = output.parent();
|
|
46121
|
-
return p instanceof AST_Call || p instanceof AST_Unary || p instanceof AST_Binary || p instanceof
|
|
46507
|
+
return p instanceof AST_Call || p instanceof AST_Unary || p instanceof AST_Binary || p instanceof AST_VarDefLike || p instanceof AST_PropAccess || p instanceof AST_Array || p instanceof AST_ObjectProperty || p instanceof AST_Conditional || p instanceof AST_Arrow || p instanceof AST_DefaultAssign || p instanceof AST_Expansion || p instanceof AST_ForOf && this === p.object || p instanceof AST_Yield || p instanceof AST_Export;
|
|
46122
46508
|
});
|
|
46123
46509
|
PARENS(AST_Binary, function(output) {
|
|
46124
46510
|
var p = output.parent();
|
|
@@ -46362,7 +46748,7 @@ var require_bundle_min = __commonJS({
|
|
|
46362
46748
|
output.space();
|
|
46363
46749
|
output.with_parens(function() {
|
|
46364
46750
|
if (self2.init) {
|
|
46365
|
-
if (self2.init instanceof
|
|
46751
|
+
if (self2.init instanceof AST_DefinitionsLike) {
|
|
46366
46752
|
self2.init.print(output);
|
|
46367
46753
|
} else {
|
|
46368
46754
|
parenthesize_for_noin(self2.init, output, true);
|
|
@@ -46678,7 +47064,7 @@ var require_bundle_min = __commonJS({
|
|
|
46678
47064
|
output.space();
|
|
46679
47065
|
print_braced(self2, output);
|
|
46680
47066
|
});
|
|
46681
|
-
|
|
47067
|
+
AST_DefinitionsLike.DEFMETHOD("_do_print", function(output, kind) {
|
|
46682
47068
|
output.print(kind);
|
|
46683
47069
|
output.space();
|
|
46684
47070
|
this.definitions.forEach(function(def, i) {
|
|
@@ -46700,6 +47086,9 @@ var require_bundle_min = __commonJS({
|
|
|
46700
47086
|
DEFPRINT(AST_Const, function(self2, output) {
|
|
46701
47087
|
self2._do_print(output, "const");
|
|
46702
47088
|
});
|
|
47089
|
+
DEFPRINT(AST_Using, function(self2, output) {
|
|
47090
|
+
self2._do_print(output, self2.await ? "await using" : "using");
|
|
47091
|
+
});
|
|
46703
47092
|
DEFPRINT(AST_Import, function(self2, output) {
|
|
46704
47093
|
output.print("import");
|
|
46705
47094
|
output.space();
|
|
@@ -46746,10 +47135,10 @@ var require_bundle_min = __commonJS({
|
|
|
46746
47135
|
var definition = self2.name.definition();
|
|
46747
47136
|
var foreign_name = self2.foreign_name;
|
|
46748
47137
|
var names_are_different = (definition && definition.mangled_name || self2.name.name) !== foreign_name.name;
|
|
46749
|
-
if (!names_are_different && foreign_name.name === "*" && foreign_name.quote != self2.name.quote) {
|
|
47138
|
+
if (!names_are_different && foreign_name.name === "*" && !!foreign_name.quote != !!self2.name.quote) {
|
|
46750
47139
|
names_are_different = true;
|
|
46751
47140
|
}
|
|
46752
|
-
var foreign_name_is_name = foreign_name.quote
|
|
47141
|
+
var foreign_name_is_name = !foreign_name.quote;
|
|
46753
47142
|
if (names_are_different) {
|
|
46754
47143
|
if (is_import) {
|
|
46755
47144
|
if (foreign_name_is_name) {
|
|
@@ -46758,7 +47147,7 @@ var require_bundle_min = __commonJS({
|
|
|
46758
47147
|
output.print_string(foreign_name.name, foreign_name.quote);
|
|
46759
47148
|
}
|
|
46760
47149
|
} else {
|
|
46761
|
-
if (self2.name.quote
|
|
47150
|
+
if (!self2.name.quote) {
|
|
46762
47151
|
self2.name.print(output);
|
|
46763
47152
|
} else {
|
|
46764
47153
|
output.print_string(self2.name.name, self2.name.quote);
|
|
@@ -46777,7 +47166,7 @@ var require_bundle_min = __commonJS({
|
|
|
46777
47166
|
}
|
|
46778
47167
|
}
|
|
46779
47168
|
} else {
|
|
46780
|
-
if (self2.name.quote
|
|
47169
|
+
if (!self2.name.quote) {
|
|
46781
47170
|
self2.name.print(output);
|
|
46782
47171
|
} else {
|
|
46783
47172
|
output.print_string(self2.name.name, self2.name.quote);
|
|
@@ -46841,7 +47230,7 @@ var require_bundle_min = __commonJS({
|
|
|
46841
47230
|
node.print(output, parens);
|
|
46842
47231
|
}
|
|
46843
47232
|
__name(parenthesize_for_noin, "parenthesize_for_noin");
|
|
46844
|
-
DEFPRINT(
|
|
47233
|
+
DEFPRINT(AST_VarDefLike, function(self2, output) {
|
|
46845
47234
|
self2.name.print(output);
|
|
46846
47235
|
if (self2.value) {
|
|
46847
47236
|
output.space();
|
|
@@ -47095,7 +47484,7 @@ var require_bundle_min = __commonJS({
|
|
|
47095
47484
|
output.space();
|
|
47096
47485
|
}
|
|
47097
47486
|
output.print("#");
|
|
47098
|
-
print_property_name(self2.key.name,
|
|
47487
|
+
print_property_name(self2.key.name, void 0, output);
|
|
47099
47488
|
if (self2.value) {
|
|
47100
47489
|
output.print("=");
|
|
47101
47490
|
self2.value.print(output);
|
|
@@ -47155,22 +47544,22 @@ var require_bundle_min = __commonJS({
|
|
|
47155
47544
|
});
|
|
47156
47545
|
DEFPRINT(AST_ConciseMethod, function(self2, output) {
|
|
47157
47546
|
var type;
|
|
47158
|
-
if (self2.is_generator && self2.async) {
|
|
47547
|
+
if (self2.value.is_generator && self2.value.async) {
|
|
47159
47548
|
type = "async*";
|
|
47160
|
-
} else if (self2.is_generator) {
|
|
47549
|
+
} else if (self2.value.is_generator) {
|
|
47161
47550
|
type = "*";
|
|
47162
|
-
} else if (self2.async) {
|
|
47551
|
+
} else if (self2.value.async) {
|
|
47163
47552
|
type = "async";
|
|
47164
47553
|
}
|
|
47165
47554
|
self2._print_getter_setter(type, false, output);
|
|
47166
47555
|
});
|
|
47167
47556
|
DEFPRINT(AST_PrivateMethod, function(self2, output) {
|
|
47168
47557
|
var type;
|
|
47169
|
-
if (self2.is_generator && self2.async) {
|
|
47558
|
+
if (self2.value.is_generator && self2.value.async) {
|
|
47170
47559
|
type = "async*";
|
|
47171
|
-
} else if (self2.is_generator) {
|
|
47560
|
+
} else if (self2.value.is_generator) {
|
|
47172
47561
|
type = "*";
|
|
47173
|
-
} else if (self2.async) {
|
|
47562
|
+
} else if (self2.value.async) {
|
|
47174
47563
|
type = "async";
|
|
47175
47564
|
}
|
|
47176
47565
|
self2._print_getter_setter(type, true, output);
|
|
@@ -47218,7 +47607,11 @@ var require_bundle_min = __commonJS({
|
|
|
47218
47607
|
}
|
|
47219
47608
|
});
|
|
47220
47609
|
DEFPRINT(AST_BigInt, function(self2, output) {
|
|
47221
|
-
output.
|
|
47610
|
+
if (output.option("keep_numbers") && self2.raw) {
|
|
47611
|
+
output.print(self2.raw);
|
|
47612
|
+
} else {
|
|
47613
|
+
output.print(self2.getValue() + "n");
|
|
47614
|
+
}
|
|
47222
47615
|
});
|
|
47223
47616
|
const r_slash_script = /(<\s*\/\s*script)/i;
|
|
47224
47617
|
const r_starts_with_script = /^\s*script/i;
|
|
@@ -47243,7 +47636,7 @@ var require_bundle_min = __commonJS({
|
|
|
47243
47636
|
} else {
|
|
47244
47637
|
if (!stat || stat instanceof AST_EmptyStatement)
|
|
47245
47638
|
output.force_semicolon();
|
|
47246
|
-
else if (stat instanceof
|
|
47639
|
+
else if (stat instanceof AST_DefinitionsLike && !(stat instanceof AST_Var) || stat instanceof AST_Class)
|
|
47247
47640
|
make_block(stat, output);
|
|
47248
47641
|
else
|
|
47249
47642
|
stat.print(output);
|
|
@@ -47318,7 +47711,7 @@ var require_bundle_min = __commonJS({
|
|
|
47318
47711
|
AST_Class,
|
|
47319
47712
|
AST_Constant,
|
|
47320
47713
|
AST_Debugger,
|
|
47321
|
-
|
|
47714
|
+
AST_DefinitionsLike,
|
|
47322
47715
|
AST_Directive,
|
|
47323
47716
|
AST_Finally,
|
|
47324
47717
|
AST_Jump,
|
|
@@ -47438,17 +47831,17 @@ var require_bundle_min = __commonJS({
|
|
|
47438
47831
|
return this.argname == null ? other.argname == null : this.argname === other.argname;
|
|
47439
47832
|
};
|
|
47440
47833
|
AST_Finally.prototype.shallow_cmp = pass_through;
|
|
47441
|
-
|
|
47442
|
-
|
|
47834
|
+
AST_DefinitionsLike.prototype.shallow_cmp = pass_through;
|
|
47835
|
+
AST_VarDefLike.prototype.shallow_cmp = function(other) {
|
|
47443
47836
|
return this.value == null ? other.value == null : this.value === other.value;
|
|
47444
47837
|
};
|
|
47445
47838
|
AST_NameMapping.prototype.shallow_cmp = pass_through;
|
|
47446
47839
|
AST_Import.prototype.shallow_cmp = function(other) {
|
|
47447
|
-
return (this.imported_name == null ? other.imported_name == null : this.imported_name === other.imported_name) && (this.imported_names == null ? other.imported_names == null : this.imported_names === other.imported_names);
|
|
47840
|
+
return (this.imported_name == null ? other.imported_name == null : this.imported_name === other.imported_name) && (this.imported_names == null ? other.imported_names == null : this.imported_names === other.imported_names) && (this.attributes == null ? other.attributes == null : this.attributes === other.attributes);
|
|
47448
47841
|
};
|
|
47449
47842
|
AST_ImportMeta.prototype.shallow_cmp = pass_through;
|
|
47450
47843
|
AST_Export.prototype.shallow_cmp = function(other) {
|
|
47451
|
-
return (this.exported_definition == null ? other.exported_definition == null : this.exported_definition === other.exported_definition) && (this.exported_value == null ? other.exported_value == null : this.exported_value === other.exported_value) && (this.exported_names == null ? other.exported_names == null : this.exported_names === other.exported_names) && this.module_name === other.module_name && this.is_default === other.is_default;
|
|
47844
|
+
return (this.exported_definition == null ? other.exported_definition == null : this.exported_definition === other.exported_definition) && (this.exported_value == null ? other.exported_value == null : this.exported_value === other.exported_value) && (this.exported_names == null ? other.exported_names == null : this.exported_names === other.exported_names) && (this.attributes == null ? other.attributes == null : this.attributes === other.attributes) && this.module_name === other.module_name && this.is_default === other.is_default;
|
|
47452
47845
|
};
|
|
47453
47846
|
AST_Call.prototype.shallow_cmp = pass_through;
|
|
47454
47847
|
AST_Sequence.prototype.shallow_cmp = pass_through;
|
|
@@ -47466,12 +47859,13 @@ var require_bundle_min = __commonJS({
|
|
|
47466
47859
|
AST_Binary.prototype.shallow_cmp = function(other) {
|
|
47467
47860
|
return this.operator === other.operator;
|
|
47468
47861
|
};
|
|
47862
|
+
AST_PrivateIn.prototype.shallow_cmp = pass_through;
|
|
47469
47863
|
AST_Conditional.prototype.shallow_cmp = pass_through;
|
|
47470
47864
|
AST_Array.prototype.shallow_cmp = pass_through;
|
|
47471
47865
|
AST_Object.prototype.shallow_cmp = pass_through;
|
|
47472
47866
|
AST_ObjectProperty.prototype.shallow_cmp = pass_through;
|
|
47473
47867
|
AST_ObjectKeyVal.prototype.shallow_cmp = function(other) {
|
|
47474
|
-
return this.key === other.key;
|
|
47868
|
+
return this.key === other.key && this.quote === other.quote;
|
|
47475
47869
|
};
|
|
47476
47870
|
AST_ObjectSetter.prototype.shallow_cmp = function(other) {
|
|
47477
47871
|
return this.static === other.static;
|
|
@@ -47480,10 +47874,10 @@ var require_bundle_min = __commonJS({
|
|
|
47480
47874
|
return this.static === other.static;
|
|
47481
47875
|
};
|
|
47482
47876
|
AST_ConciseMethod.prototype.shallow_cmp = function(other) {
|
|
47483
|
-
return this.static === other.static
|
|
47877
|
+
return this.static === other.static;
|
|
47484
47878
|
};
|
|
47485
47879
|
AST_PrivateMethod.prototype.shallow_cmp = function(other) {
|
|
47486
|
-
return this.static === other.static
|
|
47880
|
+
return this.static === other.static;
|
|
47487
47881
|
};
|
|
47488
47882
|
AST_Class.prototype.shallow_cmp = function(other) {
|
|
47489
47883
|
return (this.name == null ? other.name == null : this.name === other.name) && (this.extends == null ? other.extends == null : this.extends === other.extends);
|
|
@@ -47674,7 +48068,7 @@ var require_bundle_min = __commonJS({
|
|
|
47674
48068
|
scope.def_variable(node);
|
|
47675
48069
|
} else if (node instanceof AST_SymbolDefClass) {
|
|
47676
48070
|
mark_export((node.scope = defun.parent_scope).def_function(node, defun), 1);
|
|
47677
|
-
} else if (node instanceof AST_SymbolVar || node instanceof AST_SymbolLet || node instanceof AST_SymbolConst || node instanceof AST_SymbolCatch) {
|
|
48071
|
+
} else if (node instanceof AST_SymbolVar || node instanceof AST_SymbolLet || node instanceof AST_SymbolConst || node instanceof AST_SymbolUsing || node instanceof AST_SymbolCatch) {
|
|
47678
48072
|
var def;
|
|
47679
48073
|
if (node instanceof AST_SymbolBlockDeclaration) {
|
|
47680
48074
|
def = scope.def_variable(node, null);
|
|
@@ -47686,7 +48080,7 @@ var require_bundle_min = __commonJS({
|
|
|
47686
48080
|
if (node instanceof AST_SymbolBlockDeclaration) {
|
|
47687
48081
|
return sym2 instanceof AST_SymbolLambda;
|
|
47688
48082
|
}
|
|
47689
|
-
return !(sym2 instanceof AST_SymbolLet || sym2 instanceof AST_SymbolConst);
|
|
48083
|
+
return !(sym2 instanceof AST_SymbolLet || sym2 instanceof AST_SymbolConst || sym2 instanceof AST_SymbolUsing);
|
|
47690
48084
|
})) {
|
|
47691
48085
|
js_error(
|
|
47692
48086
|
`"${node.name}" is redeclared`,
|
|
@@ -48374,7 +48768,11 @@ var require_bundle_min = __commonJS({
|
|
|
48374
48768
|
AST_Const.prototype._size = function() {
|
|
48375
48769
|
return 6 + list_overhead(this.definitions);
|
|
48376
48770
|
};
|
|
48377
|
-
|
|
48771
|
+
AST_Using.prototype._size = function() {
|
|
48772
|
+
const await_size = this.await ? 6 : 0;
|
|
48773
|
+
return await_size + 6 + list_overhead(this.definitions);
|
|
48774
|
+
};
|
|
48775
|
+
AST_VarDefLike.prototype._size = function() {
|
|
48378
48776
|
return this.value ? 1 : 0;
|
|
48379
48777
|
};
|
|
48380
48778
|
AST_NameMapping.prototype._size = function() {
|
|
@@ -48469,7 +48867,7 @@ var require_bundle_min = __commonJS({
|
|
|
48469
48867
|
return 5 + static_size(this.static) + key_size(this.key);
|
|
48470
48868
|
};
|
|
48471
48869
|
AST_ConciseMethod.prototype._size = function() {
|
|
48472
|
-
return static_size(this.static) + key_size(this.key)
|
|
48870
|
+
return static_size(this.static) + key_size(this.key);
|
|
48473
48871
|
};
|
|
48474
48872
|
AST_PrivateMethod.prototype._size = function() {
|
|
48475
48873
|
return AST_ConciseMethod.prototype._size.call(this) + 1;
|
|
@@ -48665,7 +49063,7 @@ var require_bundle_min = __commonJS({
|
|
|
48665
49063
|
return key.getValue();
|
|
48666
49064
|
}
|
|
48667
49065
|
if (key instanceof AST_UnaryPrefix && key.operator == "void" && key.expression instanceof AST_Constant) {
|
|
48668
|
-
return;
|
|
49066
|
+
return void 0;
|
|
48669
49067
|
}
|
|
48670
49068
|
return key;
|
|
48671
49069
|
}
|
|
@@ -48747,7 +49145,7 @@ var require_bundle_min = __commonJS({
|
|
|
48747
49145
|
}
|
|
48748
49146
|
__name(is_ref_of, "is_ref_of");
|
|
48749
49147
|
function can_be_evicted_from_block(node) {
|
|
48750
|
-
return !(node instanceof AST_DefClass || node instanceof AST_Defun || node instanceof AST_Let || node instanceof AST_Const || node instanceof AST_Export || node instanceof AST_Import);
|
|
49148
|
+
return !(node instanceof AST_DefClass || node instanceof AST_Defun || node instanceof AST_Let || node instanceof AST_Const || node instanceof AST_Using || node instanceof AST_Export || node instanceof AST_Import);
|
|
48751
49149
|
}
|
|
48752
49150
|
__name(can_be_evicted_from_block, "can_be_evicted_from_block");
|
|
48753
49151
|
function as_statement_array(thing) {
|
|
@@ -48974,15 +49372,21 @@ var require_bundle_min = __commonJS({
|
|
|
48974
49372
|
def_is_number(AST_Node, return_false);
|
|
48975
49373
|
def_is_number(AST_Number, return_true);
|
|
48976
49374
|
const unary = makePredicate("+ - ~ ++ --");
|
|
48977
|
-
def_is_number(AST_Unary, function() {
|
|
48978
|
-
return unary.has(this.operator) &&
|
|
49375
|
+
def_is_number(AST_Unary, function(compressor) {
|
|
49376
|
+
return unary.has(this.operator) && this.expression.is_number(compressor);
|
|
48979
49377
|
});
|
|
48980
49378
|
const numeric_ops = makePredicate("- * / % & | ^ << >> >>>");
|
|
48981
49379
|
def_is_number(AST_Binary, function(compressor) {
|
|
48982
|
-
|
|
49380
|
+
if (this.operator === "+") {
|
|
49381
|
+
return this.left.is_number(compressor) && this.right.is_number_or_bigint(compressor) || this.right.is_number(compressor) && this.left.is_number_or_bigint(compressor);
|
|
49382
|
+
} else if (numeric_ops.has(this.operator)) {
|
|
49383
|
+
return this.left.is_number(compressor) || this.right.is_number(compressor);
|
|
49384
|
+
} else {
|
|
49385
|
+
return false;
|
|
49386
|
+
}
|
|
48983
49387
|
});
|
|
48984
49388
|
def_is_number(AST_Assign, function(compressor) {
|
|
48985
|
-
return numeric_ops.has(this.operator.slice(0, -1))
|
|
49389
|
+
return (this.operator === "=" || numeric_ops.has(this.operator.slice(0, -1))) && this.right.is_number(compressor);
|
|
48986
49390
|
});
|
|
48987
49391
|
def_is_number(AST_Sequence, function(compressor) {
|
|
48988
49392
|
return this.tail_node().is_number(compressor);
|
|
@@ -48993,16 +49397,69 @@ var require_bundle_min = __commonJS({
|
|
|
48993
49397
|
})(function(node, func) {
|
|
48994
49398
|
node.DEFMETHOD("is_number", func);
|
|
48995
49399
|
});
|
|
49400
|
+
(function(def_is_bigint) {
|
|
49401
|
+
def_is_bigint(AST_Node, return_false);
|
|
49402
|
+
def_is_bigint(AST_BigInt, return_true);
|
|
49403
|
+
const unary = makePredicate("+ - ~ ++ --");
|
|
49404
|
+
def_is_bigint(AST_Unary, function(compressor) {
|
|
49405
|
+
return unary.has(this.operator) && this.expression.is_bigint(compressor);
|
|
49406
|
+
});
|
|
49407
|
+
const numeric_ops = makePredicate("- * / % & | ^ << >>");
|
|
49408
|
+
def_is_bigint(AST_Binary, function(compressor) {
|
|
49409
|
+
if (this.operator === "+") {
|
|
49410
|
+
return this.left.is_bigint(compressor) && this.right.is_number_or_bigint(compressor) || this.right.is_bigint(compressor) && this.left.is_number_or_bigint(compressor);
|
|
49411
|
+
} else if (numeric_ops.has(this.operator)) {
|
|
49412
|
+
return this.left.is_bigint(compressor) || this.right.is_bigint(compressor);
|
|
49413
|
+
} else {
|
|
49414
|
+
return false;
|
|
49415
|
+
}
|
|
49416
|
+
});
|
|
49417
|
+
def_is_bigint(AST_Assign, function(compressor) {
|
|
49418
|
+
return (numeric_ops.has(this.operator.slice(0, -1)) || this.operator == "=") && this.right.is_bigint(compressor);
|
|
49419
|
+
});
|
|
49420
|
+
def_is_bigint(AST_Sequence, function(compressor) {
|
|
49421
|
+
return this.tail_node().is_bigint(compressor);
|
|
49422
|
+
});
|
|
49423
|
+
def_is_bigint(AST_Conditional, function(compressor) {
|
|
49424
|
+
return this.consequent.is_bigint(compressor) && this.alternative.is_bigint(compressor);
|
|
49425
|
+
});
|
|
49426
|
+
})(function(node, func) {
|
|
49427
|
+
node.DEFMETHOD("is_bigint", func);
|
|
49428
|
+
});
|
|
49429
|
+
(function(def_is_number_or_bigint) {
|
|
49430
|
+
def_is_number_or_bigint(AST_Node, return_false);
|
|
49431
|
+
def_is_number_or_bigint(AST_Number, return_true);
|
|
49432
|
+
def_is_number_or_bigint(AST_BigInt, return_true);
|
|
49433
|
+
const numeric_unary_ops = makePredicate("+ - ~ ++ --");
|
|
49434
|
+
def_is_number_or_bigint(AST_Unary, function(_compressor) {
|
|
49435
|
+
return numeric_unary_ops.has(this.operator);
|
|
49436
|
+
});
|
|
49437
|
+
const numeric_ops = makePredicate("- * / % & | ^ << >>");
|
|
49438
|
+
def_is_number_or_bigint(AST_Binary, function(compressor) {
|
|
49439
|
+
return this.operator === "+" ? this.left.is_number_or_bigint(compressor) && this.right.is_number_or_bigint(compressor) : numeric_ops.has(this.operator);
|
|
49440
|
+
});
|
|
49441
|
+
def_is_number_or_bigint(AST_Assign, function(compressor) {
|
|
49442
|
+
return numeric_ops.has(this.operator.slice(0, -1)) || this.operator == "=" && this.right.is_number_or_bigint(compressor);
|
|
49443
|
+
});
|
|
49444
|
+
def_is_number_or_bigint(AST_Sequence, function(compressor) {
|
|
49445
|
+
return this.tail_node().is_number_or_bigint(compressor);
|
|
49446
|
+
});
|
|
49447
|
+
def_is_number_or_bigint(AST_Conditional, function(compressor) {
|
|
49448
|
+
return this.consequent.is_number_or_bigint(compressor) && this.alternative.is_number_or_bigint(compressor);
|
|
49449
|
+
});
|
|
49450
|
+
})(function(node, func) {
|
|
49451
|
+
node.DEFMETHOD("is_number_or_bigint", func);
|
|
49452
|
+
});
|
|
48996
49453
|
(function(def_is_32_bit_integer) {
|
|
48997
49454
|
def_is_32_bit_integer(AST_Node, return_false);
|
|
48998
|
-
def_is_32_bit_integer(AST_Number, function() {
|
|
49455
|
+
def_is_32_bit_integer(AST_Number, function(_compressor) {
|
|
48999
49456
|
return this.value === (this.value | 0);
|
|
49000
49457
|
});
|
|
49001
|
-
def_is_32_bit_integer(AST_UnaryPrefix, function() {
|
|
49002
|
-
return this.operator == "~" ? this.expression.is_number() : this.operator === "+" ? this.expression.is_32_bit_integer() : false;
|
|
49458
|
+
def_is_32_bit_integer(AST_UnaryPrefix, function(compressor) {
|
|
49459
|
+
return this.operator == "~" ? this.expression.is_number(compressor) : this.operator === "+" ? this.expression.is_32_bit_integer(compressor) : false;
|
|
49003
49460
|
});
|
|
49004
|
-
def_is_32_bit_integer(AST_Binary, function() {
|
|
49005
|
-
return bitwise_binop.has(this.operator);
|
|
49461
|
+
def_is_32_bit_integer(AST_Binary, function(compressor) {
|
|
49462
|
+
return bitwise_binop.has(this.operator) && (this.left.is_number(compressor) || this.right.is_number(compressor));
|
|
49006
49463
|
});
|
|
49007
49464
|
})(function(node, func) {
|
|
49008
49465
|
node.DEFMETHOD("is_32_bit_integer", func);
|
|
@@ -49551,28 +50008,28 @@ var require_bundle_min = __commonJS({
|
|
|
49551
50008
|
});
|
|
49552
50009
|
});
|
|
49553
50010
|
(function(def_bitwise_negate) {
|
|
49554
|
-
function
|
|
50011
|
+
function basic_bitwise_negation(exp) {
|
|
49555
50012
|
return make_node(AST_UnaryPrefix, exp, {
|
|
49556
50013
|
operator: "~",
|
|
49557
50014
|
expression: exp
|
|
49558
50015
|
});
|
|
49559
50016
|
}
|
|
49560
|
-
__name(
|
|
49561
|
-
def_bitwise_negate(AST_Node, function() {
|
|
49562
|
-
return
|
|
50017
|
+
__name(basic_bitwise_negation, "basic_bitwise_negation");
|
|
50018
|
+
def_bitwise_negate(AST_Node, function(_compressor) {
|
|
50019
|
+
return basic_bitwise_negation(this);
|
|
49563
50020
|
});
|
|
49564
|
-
def_bitwise_negate(AST_Number, function() {
|
|
50021
|
+
def_bitwise_negate(AST_Number, function(_compressor) {
|
|
49565
50022
|
const neg = ~this.value;
|
|
49566
50023
|
if (neg.toString().length > this.value.toString().length) {
|
|
49567
|
-
return
|
|
50024
|
+
return basic_bitwise_negation(this);
|
|
49568
50025
|
}
|
|
49569
50026
|
return make_node(AST_Number, this, { value: neg });
|
|
49570
50027
|
});
|
|
49571
|
-
def_bitwise_negate(AST_UnaryPrefix, function(in_32_bit_context) {
|
|
49572
|
-
if (this.operator == "~" && (
|
|
50028
|
+
def_bitwise_negate(AST_UnaryPrefix, function(compressor, in_32_bit_context) {
|
|
50029
|
+
if (this.operator == "~" && (this.expression.is_32_bit_integer(compressor) || (in_32_bit_context != null ? in_32_bit_context : compressor.in_32_bit_context()))) {
|
|
49573
50030
|
return this.expression;
|
|
49574
50031
|
} else {
|
|
49575
|
-
return
|
|
50032
|
+
return basic_bitwise_negation(this);
|
|
49576
50033
|
}
|
|
49577
50034
|
});
|
|
49578
50035
|
})(function(node, func) {
|
|
@@ -50779,7 +51236,7 @@ var require_bundle_min = __commonJS({
|
|
|
50779
51236
|
if (value.is_constant()) return;
|
|
50780
51237
|
if (value instanceof AST_ClassExpression) return;
|
|
50781
51238
|
}
|
|
50782
|
-
if (parent instanceof AST_Assign && (parent.operator === "=" || parent.logical) && node === parent.right || parent instanceof AST_Call && (node !== parent.expression || parent instanceof AST_New) || parent instanceof AST_Exit && node === parent.value && node.scope !== d.scope || parent instanceof
|
|
51239
|
+
if (parent instanceof AST_Assign && (parent.operator === "=" || parent.logical) && node === parent.right || parent instanceof AST_Call && (node !== parent.expression || parent instanceof AST_New) || parent instanceof AST_Exit && node === parent.value && node.scope !== d.scope || parent instanceof AST_VarDefLike && node === parent.value || parent instanceof AST_Yield && node === parent.value && node.scope !== d.scope) {
|
|
50783
51240
|
if (depth > 1 && !(value && value.is_constant_expression(scope))) depth = 1;
|
|
50784
51241
|
if (!d.escaped || d.escaped > depth) d.escaped = depth;
|
|
50785
51242
|
return;
|
|
@@ -51220,6 +51677,9 @@ var require_bundle_min = __commonJS({
|
|
|
51220
51677
|
}
|
|
51221
51678
|
}
|
|
51222
51679
|
});
|
|
51680
|
+
def_reduce_vars(AST_UsingDef, function() {
|
|
51681
|
+
suppress(this.name);
|
|
51682
|
+
});
|
|
51223
51683
|
def_reduce_vars(AST_While, function(tw, descend, compressor) {
|
|
51224
51684
|
reset_block_variables(compressor, this);
|
|
51225
51685
|
const saved_loop = tw.in_loop;
|
|
@@ -51361,7 +51821,7 @@ var require_bundle_min = __commonJS({
|
|
|
51361
51821
|
return node;
|
|
51362
51822
|
}
|
|
51363
51823
|
var parent = scanner.parent();
|
|
51364
|
-
if (node instanceof AST_Assign && (node.logical || node.operator != "=" && lhs.equivalent_to(node.left)) || node instanceof AST_Await || node instanceof AST_Call && lhs instanceof AST_PropAccess && lhs.equivalent_to(node.expression) || (node instanceof AST_Call || node instanceof AST_PropAccess) && node.optional || node instanceof AST_Debugger || node instanceof AST_Destructuring || node instanceof AST_Expansion && node.expression instanceof AST_Symbol && (node.expression instanceof AST_This || node.expression.definition().references.length > 1) || node instanceof AST_IterationStatement && !(node instanceof AST_For) || node instanceof AST_LoopControl || node instanceof AST_Try || node instanceof AST_With || node instanceof AST_Yield || node instanceof AST_Export || node instanceof AST_Class || parent instanceof AST_For && node !== parent.init || !replace_all && (node instanceof AST_SymbolRef && !node.is_declared(compressor2) && !pure_prop_access_globals.has(node)) || node instanceof AST_SymbolRef && parent instanceof AST_Call && has_annotation(parent, _NOINLINE) || node instanceof AST_ObjectProperty && node.key instanceof AST_Node) {
|
|
51824
|
+
if (node instanceof AST_Assign && (node.logical || node.operator != "=" && lhs.equivalent_to(node.left)) || node instanceof AST_Await || node instanceof AST_Using || node instanceof AST_Call && lhs instanceof AST_PropAccess && lhs.equivalent_to(node.expression) || (node instanceof AST_Call || node instanceof AST_PropAccess) && node.optional || node instanceof AST_Debugger || node instanceof AST_Destructuring || node instanceof AST_Expansion && node.expression instanceof AST_Symbol && (node.expression instanceof AST_This || node.expression.definition().references.length > 1) || node instanceof AST_IterationStatement && !(node instanceof AST_For) || node instanceof AST_LoopControl || node instanceof AST_Try || node instanceof AST_With || node instanceof AST_Yield || node instanceof AST_Export || node instanceof AST_Class || parent instanceof AST_For && node !== parent.init || !replace_all && (node instanceof AST_SymbolRef && !node.is_declared(compressor2) && !pure_prop_access_globals.has(node)) || node instanceof AST_SymbolRef && parent instanceof AST_Call && has_annotation(parent, _NOINLINE) || node instanceof AST_ObjectProperty && node.key instanceof AST_Node) {
|
|
51365
51825
|
abort = true;
|
|
51366
51826
|
return node;
|
|
51367
51827
|
}
|
|
@@ -51408,7 +51868,7 @@ var require_bundle_min = __commonJS({
|
|
|
51408
51868
|
return candidate;
|
|
51409
51869
|
}
|
|
51410
51870
|
var sym;
|
|
51411
|
-
if (node instanceof AST_Call || node instanceof AST_Exit && (side_effects || lhs instanceof AST_PropAccess || may_modify(lhs)) || node instanceof AST_PropAccess && (side_effects || node.expression.may_throw_on_access(compressor2)) || node instanceof AST_SymbolRef && (lvalues.has(node.name) && lvalues.get(node.name).modified || side_effects && may_modify(node)) || node instanceof AST_VarDef && node.value && (lvalues.has(node.name.name) || side_effects && may_modify(node.name)) || (sym = is_lhs(node.left, node)) && (sym instanceof AST_PropAccess || lvalues.has(sym.name)) || may_throw && (in_try ? node.has_side_effects(compressor2) : side_effects_external(node))) {
|
|
51871
|
+
if (node instanceof AST_Call || node instanceof AST_Exit && (side_effects || lhs instanceof AST_PropAccess || may_modify(lhs)) || node instanceof AST_PropAccess && (side_effects || node.expression.may_throw_on_access(compressor2)) || node instanceof AST_SymbolRef && (lvalues.has(node.name) && lvalues.get(node.name).modified || side_effects && may_modify(node)) || node instanceof AST_VarDef && node.value && (lvalues.has(node.name.name) || side_effects && may_modify(node.name)) || node instanceof AST_Using || (sym = is_lhs(node.left, node)) && (sym instanceof AST_PropAccess || lvalues.has(sym.name)) || may_throw && (in_try ? node.has_side_effects(compressor2) : side_effects_external(node))) {
|
|
51412
51872
|
stop_after = node;
|
|
51413
51873
|
if (node instanceof AST_Scope)
|
|
51414
51874
|
abort = true;
|
|
@@ -51780,7 +52240,7 @@ var require_bundle_min = __commonJS({
|
|
|
51780
52240
|
}
|
|
51781
52241
|
} else {
|
|
51782
52242
|
const lhs2 = expr instanceof AST_Assign ? expr.left : expr.expression;
|
|
51783
|
-
return !is_ref_of(lhs2, AST_SymbolConst) && !is_ref_of(lhs2, AST_SymbolLet) && lhs2;
|
|
52243
|
+
return !is_ref_of(lhs2, AST_SymbolConst) && !is_ref_of(lhs2, AST_SymbolLet) && !is_ref_of(lhs2, AST_SymbolUsing) && lhs2;
|
|
51784
52244
|
}
|
|
51785
52245
|
}
|
|
51786
52246
|
__name(get_lhs, "get_lhs");
|
|
@@ -51981,7 +52441,7 @@ var require_bundle_min = __commonJS({
|
|
|
51981
52441
|
stat = stat.clone();
|
|
51982
52442
|
stat.condition = stat.condition.negate(compressor2);
|
|
51983
52443
|
stat.body = make_node(AST_BlockStatement, stat, {
|
|
51984
|
-
body: as_statement_array(stat.alternative).concat(
|
|
52444
|
+
body: as_statement_array(stat.alternative).concat(extract_defuns())
|
|
51985
52445
|
});
|
|
51986
52446
|
stat.alternative = make_node(AST_BlockStatement, stat, {
|
|
51987
52447
|
body: new_else
|
|
@@ -51997,7 +52457,7 @@ var require_bundle_min = __commonJS({
|
|
|
51997
52457
|
CHANGED = true;
|
|
51998
52458
|
stat = stat.clone();
|
|
51999
52459
|
stat.body = make_node(AST_BlockStatement, stat.body, {
|
|
52000
|
-
body: as_statement_array(stat.body).concat(
|
|
52460
|
+
body: as_statement_array(stat.body).concat(extract_defuns())
|
|
52001
52461
|
});
|
|
52002
52462
|
stat.alternative = make_node(AST_BlockStatement, stat.alternative, {
|
|
52003
52463
|
body: new_else
|
|
@@ -52073,14 +52533,14 @@ var require_bundle_min = __commonJS({
|
|
|
52073
52533
|
return false;
|
|
52074
52534
|
for (var j2 = i + 1, len = statements2.length; j2 < len; j2++) {
|
|
52075
52535
|
var stat2 = statements2[j2];
|
|
52076
|
-
if (stat2 instanceof
|
|
52536
|
+
if (stat2 instanceof AST_DefinitionsLike && !(stat2 instanceof AST_Var))
|
|
52077
52537
|
return false;
|
|
52078
52538
|
}
|
|
52079
52539
|
var lct = ab instanceof AST_LoopControl ? compressor2.loopcontrol_target(ab) : null;
|
|
52080
52540
|
return ab instanceof AST_Return && in_lambda && is_return_void(ab.value) || ab instanceof AST_Continue && self2 === loop_body(lct) || ab instanceof AST_Break && lct instanceof AST_BlockStatement && self2 === lct;
|
|
52081
52541
|
}
|
|
52082
52542
|
__name(can_merge_flow, "can_merge_flow");
|
|
52083
|
-
function
|
|
52543
|
+
function extract_defuns() {
|
|
52084
52544
|
var tail = statements2.slice(i + 1);
|
|
52085
52545
|
statements2.length = i + 1;
|
|
52086
52546
|
return tail.filter(function(stat2) {
|
|
@@ -52091,13 +52551,16 @@ var require_bundle_min = __commonJS({
|
|
|
52091
52551
|
return true;
|
|
52092
52552
|
});
|
|
52093
52553
|
}
|
|
52094
|
-
__name(
|
|
52554
|
+
__name(extract_defuns, "extract_defuns");
|
|
52095
52555
|
function as_statement_array_with_return(node, ab) {
|
|
52096
52556
|
var body = as_statement_array(node);
|
|
52097
52557
|
if (ab !== body[body.length - 1]) {
|
|
52098
52558
|
return void 0;
|
|
52099
52559
|
}
|
|
52100
52560
|
body = body.slice(0, -1);
|
|
52561
|
+
if (!body.every((stat2) => can_be_evicted_from_block(stat2))) {
|
|
52562
|
+
return void 0;
|
|
52563
|
+
}
|
|
52101
52564
|
if (ab.value) {
|
|
52102
52565
|
body.push(make_node(AST_SimpleStatement, ab.value, {
|
|
52103
52566
|
body: ab.value.expression
|
|
@@ -52205,7 +52668,7 @@ var require_bundle_min = __commonJS({
|
|
|
52205
52668
|
var line = block.body[i];
|
|
52206
52669
|
if (line instanceof AST_Var && declarations_only(line)) {
|
|
52207
52670
|
decls.push(line);
|
|
52208
|
-
} else if (stat || line instanceof
|
|
52671
|
+
} else if (stat || line instanceof AST_DefinitionsLike && !(line instanceof AST_Var)) {
|
|
52209
52672
|
return false;
|
|
52210
52673
|
} else {
|
|
52211
52674
|
stat = line;
|
|
@@ -52229,7 +52692,7 @@ var require_bundle_min = __commonJS({
|
|
|
52229
52692
|
if (stat instanceof AST_Exit) {
|
|
52230
52693
|
stat.value = cons_seq(stat.value || make_node(AST_Undefined, stat).transform(compressor2));
|
|
52231
52694
|
} else if (stat instanceof AST_For) {
|
|
52232
|
-
if (!(stat.init instanceof
|
|
52695
|
+
if (!(stat.init instanceof AST_DefinitionsLike)) {
|
|
52233
52696
|
const abort = walk(prev.body, (node) => {
|
|
52234
52697
|
if (node instanceof AST_Scope)
|
|
52235
52698
|
return true;
|
|
@@ -52248,7 +52711,7 @@ var require_bundle_min = __commonJS({
|
|
|
52248
52711
|
}
|
|
52249
52712
|
}
|
|
52250
52713
|
} else if (stat instanceof AST_ForIn) {
|
|
52251
|
-
if (!(stat.init instanceof
|
|
52714
|
+
if (!(stat.init instanceof AST_DefinitionsLike) || stat.init instanceof AST_Var) {
|
|
52252
52715
|
stat.object = cons_seq(stat.object);
|
|
52253
52716
|
}
|
|
52254
52717
|
} else if (stat instanceof AST_If) {
|
|
@@ -52366,6 +52829,8 @@ var require_bundle_min = __commonJS({
|
|
|
52366
52829
|
statements2[++j] = stat;
|
|
52367
52830
|
defs = stat;
|
|
52368
52831
|
}
|
|
52832
|
+
} else if (stat instanceof AST_Using && prev instanceof AST_Using && prev.await === stat.await) {
|
|
52833
|
+
prev.definitions = prev.definitions.concat(stat.definitions);
|
|
52369
52834
|
} else if (stat instanceof AST_Exit) {
|
|
52370
52835
|
stat.value = extract_object_assignments(stat.value);
|
|
52371
52836
|
} else if (stat instanceof AST_For) {
|
|
@@ -52478,6 +52943,7 @@ var require_bundle_min = __commonJS({
|
|
|
52478
52943
|
def.single_use = false;
|
|
52479
52944
|
return self2;
|
|
52480
52945
|
}
|
|
52946
|
+
if (dont_inline_lambda_in_loop(compressor, fixed)) return self2;
|
|
52481
52947
|
let single_use = def.single_use && !(parent instanceof AST_Call && parent.is_callee_pure(compressor) || has_annotation(parent, _NOINLINE)) && !(parent instanceof AST_Export && fixed instanceof AST_Lambda && fixed.name);
|
|
52482
52948
|
if (single_use && fixed instanceof AST_Node) {
|
|
52483
52949
|
single_use = !fixed.has_side_effects(compressor) && !fixed.may_throw(compressor);
|
|
@@ -52580,6 +53046,7 @@ var require_bundle_min = __commonJS({
|
|
|
52580
53046
|
}
|
|
52581
53047
|
fn = fixed;
|
|
52582
53048
|
}
|
|
53049
|
+
if (dont_inline_lambda_in_loop(compressor, fn) && !has_annotation(self2, _INLINE)) return self2;
|
|
52583
53050
|
var is_func = fn instanceof AST_Lambda;
|
|
52584
53051
|
var stat = is_func && fn.body[0];
|
|
52585
53052
|
var is_regular_func = is_func && !fn.is_generator && !fn.async;
|
|
@@ -52840,6 +53307,10 @@ var require_bundle_min = __commonJS({
|
|
|
52840
53307
|
__name(flatten_fn, "flatten_fn");
|
|
52841
53308
|
}
|
|
52842
53309
|
__name(inline_into_call, "inline_into_call");
|
|
53310
|
+
function dont_inline_lambda_in_loop(compressor, maybe_lambda) {
|
|
53311
|
+
return (maybe_lambda instanceof AST_Lambda || maybe_lambda instanceof AST_Class) && !!compressor.is_within_loop();
|
|
53312
|
+
}
|
|
53313
|
+
__name(dont_inline_lambda_in_loop, "dont_inline_lambda_in_loop");
|
|
52843
53314
|
(function(def_find_defs) {
|
|
52844
53315
|
function to_node(value, orig) {
|
|
52845
53316
|
if (value instanceof AST_Node) {
|
|
@@ -53058,12 +53529,16 @@ var require_bundle_min = __commonJS({
|
|
|
53058
53529
|
}
|
|
53059
53530
|
}
|
|
53060
53531
|
}
|
|
53061
|
-
in_32_bit_context() {
|
|
53532
|
+
in_32_bit_context(other_operand_must_be_number) {
|
|
53062
53533
|
if (!this.option("evaluate")) return false;
|
|
53063
53534
|
var self2 = this.self();
|
|
53064
53535
|
for (var i = 0, p; p = this.parent(i); i++) {
|
|
53065
53536
|
if (p instanceof AST_Binary && bitwise_binop.has(p.operator)) {
|
|
53066
|
-
|
|
53537
|
+
if (other_operand_must_be_number) {
|
|
53538
|
+
return (self2 === p.left ? p.right : p.left).is_number(this);
|
|
53539
|
+
} else {
|
|
53540
|
+
return true;
|
|
53541
|
+
}
|
|
53067
53542
|
}
|
|
53068
53543
|
if (p instanceof AST_UnaryPrefix) {
|
|
53069
53544
|
return p.operator === "~";
|
|
@@ -53312,7 +53787,7 @@ var require_bundle_min = __commonJS({
|
|
|
53312
53787
|
return self2;
|
|
53313
53788
|
});
|
|
53314
53789
|
function can_be_extracted_from_if_block(node) {
|
|
53315
|
-
return !(node instanceof AST_Const || node instanceof AST_Let || node instanceof AST_Class);
|
|
53790
|
+
return !(node instanceof AST_Const || node instanceof AST_Let || node instanceof AST_Using || node instanceof AST_Class);
|
|
53316
53791
|
}
|
|
53317
53792
|
__name(can_be_extracted_from_if_block, "can_be_extracted_from_if_block");
|
|
53318
53793
|
def_optimize(AST_BlockStatement, function(self2, compressor) {
|
|
@@ -53461,7 +53936,7 @@ var require_bundle_min = __commonJS({
|
|
|
53461
53936
|
const sym = node.name;
|
|
53462
53937
|
let def;
|
|
53463
53938
|
let value;
|
|
53464
|
-
if (sym.scope === self2 && (def = sym.definition()).escaped != 1 && !def.assignments && !def.direct_access && !def.single_use && !compressor.exposed(def) && !top_retain(def) && (value = sym.fixed_value()) === node.value && value instanceof AST_Object && !value.properties.some(
|
|
53939
|
+
if (sym.scope === self2 && !(sym instanceof AST_SymbolUsing) && (def = sym.definition()).escaped != 1 && !def.assignments && !def.direct_access && !def.single_use && !compressor.exposed(def) && !top_retain(def) && (value = sym.fixed_value()) === node.value && value instanceof AST_Object && !value.properties.some(
|
|
53465
53940
|
(prop) => prop instanceof AST_Expansion || prop.computed_key()
|
|
53466
53941
|
)) {
|
|
53467
53942
|
descend(node, this);
|
|
@@ -54551,14 +55026,14 @@ var require_bundle_min = __commonJS({
|
|
|
54551
55026
|
});
|
|
54552
55027
|
}
|
|
54553
55028
|
if (compressor.option("evaluate")) {
|
|
54554
|
-
if (self2.operator === "~" && self2.expression instanceof AST_UnaryPrefix && self2.expression.operator === "~" && (compressor.in_32_bit_context() || self2.expression.expression.is_32_bit_integer())) {
|
|
55029
|
+
if (self2.operator === "~" && self2.expression instanceof AST_UnaryPrefix && self2.expression.operator === "~" && (compressor.in_32_bit_context(false) || self2.expression.expression.is_32_bit_integer(compressor))) {
|
|
54555
55030
|
return self2.expression.expression;
|
|
54556
55031
|
}
|
|
54557
55032
|
if (self2.operator === "~" && e instanceof AST_Binary && e.operator === "^") {
|
|
54558
55033
|
if (e.left instanceof AST_UnaryPrefix && e.left.operator === "~") {
|
|
54559
|
-
e.left = e.left.bitwise_negate(true);
|
|
55034
|
+
e.left = e.left.bitwise_negate(compressor, true);
|
|
54560
55035
|
} else {
|
|
54561
|
-
e.right = e.right.bitwise_negate(true);
|
|
55036
|
+
e.right = e.right.bitwise_negate(compressor, true);
|
|
54562
55037
|
}
|
|
54563
55038
|
return e;
|
|
54564
55039
|
}
|
|
@@ -54636,7 +55111,7 @@ var require_bundle_min = __commonJS({
|
|
|
54636
55111
|
case "===":
|
|
54637
55112
|
case "!==":
|
|
54638
55113
|
var is_strict_comparison = true;
|
|
54639
|
-
if (self2.left.is_string(compressor) && self2.right.is_string(compressor) || self2.left.is_number(compressor) && self2.right.is_number(compressor) || self2.left.is_boolean() && self2.right.is_boolean() || self2.left.equivalent_to(self2.right)) {
|
|
55114
|
+
if (self2.left.is_string(compressor) && self2.right.is_string(compressor) || self2.left.is_number(compressor) && self2.right.is_number(compressor) || self2.left.is_bigint(compressor) && self2.right.is_bigint(compressor) || self2.left.is_boolean() && self2.right.is_boolean() || self2.left.equivalent_to(self2.right)) {
|
|
54640
55115
|
self2.operator = self2.operator.substr(0, 2);
|
|
54641
55116
|
}
|
|
54642
55117
|
// XXX: intentionally falling down to the next case
|
|
@@ -54662,7 +55137,7 @@ var require_bundle_min = __commonJS({
|
|
|
54662
55137
|
}
|
|
54663
55138
|
} else if (self2.left instanceof AST_SymbolRef && self2.right instanceof AST_SymbolRef && self2.left.definition() === self2.right.definition() && is_object(self2.left.fixed_value())) {
|
|
54664
55139
|
return make_node(self2.operator[0] == "=" ? AST_True : AST_False, self2);
|
|
54665
|
-
} else if (self2.left.is_32_bit_integer() && self2.right.is_32_bit_integer()) {
|
|
55140
|
+
} else if (self2.left.is_32_bit_integer(compressor) && self2.right.is_32_bit_integer(compressor)) {
|
|
54666
55141
|
const not = /* @__PURE__ */ __name((node) => make_node(AST_UnaryPrefix, node, {
|
|
54667
55142
|
operator: "!",
|
|
54668
55143
|
expression: node
|
|
@@ -54681,7 +55156,7 @@ var require_bundle_min = __commonJS({
|
|
|
54681
55156
|
return booleanify(self2.left, self2.operator[0] === "!");
|
|
54682
55157
|
}
|
|
54683
55158
|
let and_op, x, mask;
|
|
54684
|
-
if ((and_op = self2.left instanceof AST_Binary ? self2.left : self2.right instanceof AST_Binary ? self2.right : null) && (mask = and_op === self2.left ? self2.right : self2.left) && and_op.operator === "&" && mask instanceof AST_Number && mask.is_32_bit_integer() && (x = and_op.left.equivalent_to(mask) ? and_op.right : and_op.right.equivalent_to(mask) ? and_op.left : null)) {
|
|
55159
|
+
if ((and_op = self2.left instanceof AST_Binary ? self2.left : self2.right instanceof AST_Binary ? self2.right : null) && (mask = and_op === self2.left ? self2.right : self2.left) && and_op.operator === "&" && mask instanceof AST_Number && mask.is_32_bit_integer(compressor) && (x = and_op.left.equivalent_to(mask) ? and_op.right : and_op.right.equivalent_to(mask) ? and_op.left : null)) {
|
|
54685
55160
|
let optimized = booleanify(make_node(AST_Binary, self2, {
|
|
54686
55161
|
operator: "&",
|
|
54687
55162
|
left: mask,
|
|
@@ -54882,7 +55357,7 @@ var require_bundle_min = __commonJS({
|
|
|
54882
55357
|
});
|
|
54883
55358
|
}
|
|
54884
55359
|
}
|
|
54885
|
-
if (self2.right instanceof AST_UnaryPrefix && self2.right.operator == "-" && self2.left.
|
|
55360
|
+
if (self2.right instanceof AST_UnaryPrefix && self2.right.operator == "-" && self2.left.is_number_or_bigint(compressor)) {
|
|
54886
55361
|
self2 = make_node(AST_Binary, self2, {
|
|
54887
55362
|
operator: "-",
|
|
54888
55363
|
left: self2.left,
|
|
@@ -54890,7 +55365,7 @@ var require_bundle_min = __commonJS({
|
|
|
54890
55365
|
});
|
|
54891
55366
|
break;
|
|
54892
55367
|
}
|
|
54893
|
-
if (self2.left instanceof AST_UnaryPrefix && self2.left.operator == "-" && reversible() && self2.right.
|
|
55368
|
+
if (self2.left instanceof AST_UnaryPrefix && self2.left.operator == "-" && reversible() && self2.right.is_number_or_bigint(compressor)) {
|
|
54894
55369
|
self2 = make_node(AST_Binary, self2, {
|
|
54895
55370
|
operator: "-",
|
|
54896
55371
|
left: self2.right,
|
|
@@ -54929,7 +55404,7 @@ var require_bundle_min = __commonJS({
|
|
|
54929
55404
|
case "&":
|
|
54930
55405
|
case "|":
|
|
54931
55406
|
case "^":
|
|
54932
|
-
if (self2.left.
|
|
55407
|
+
if (self2.left.is_number_or_bigint(compressor) && self2.right.is_number_or_bigint(compressor) && reversible() && !(self2.left instanceof AST_Binary && self2.left.operator != self2.operator && PRECEDENCE[self2.left.operator] >= PRECEDENCE[self2.operator])) {
|
|
54933
55408
|
var reversed = make_node(AST_Binary, self2, {
|
|
54934
55409
|
operator: self2.operator,
|
|
54935
55410
|
left: self2.right,
|
|
@@ -54941,7 +55416,7 @@ var require_bundle_min = __commonJS({
|
|
|
54941
55416
|
self2 = best_of(compressor, self2, reversed);
|
|
54942
55417
|
}
|
|
54943
55418
|
}
|
|
54944
|
-
if (associative && self2.
|
|
55419
|
+
if (associative && self2.is_number_or_bigint(compressor)) {
|
|
54945
55420
|
if (self2.right instanceof AST_Binary && self2.right.operator == self2.operator) {
|
|
54946
55421
|
self2 = make_node(AST_Binary, self2, {
|
|
54947
55422
|
operator: self2.operator,
|
|
@@ -55032,53 +55507,36 @@ var require_bundle_min = __commonJS({
|
|
|
55032
55507
|
}
|
|
55033
55508
|
}
|
|
55034
55509
|
}
|
|
55035
|
-
|
|
55036
|
-
|
|
55037
|
-
|
|
55038
|
-
|
|
55039
|
-
|
|
55040
|
-
|
|
55041
|
-
|
|
55042
|
-
self2.
|
|
55043
|
-
|
|
55510
|
+
if ((self2.operator === "|" || self2.operator === "&") && self2.left.equivalent_to(self2.right) && !self2.left.has_side_effects(compressor) && compressor.in_32_bit_context(true)) {
|
|
55511
|
+
self2.left = make_node(AST_Number, self2, { value: 0 });
|
|
55512
|
+
self2.operator = "|";
|
|
55513
|
+
}
|
|
55514
|
+
if (self2.operator === "^" && self2.left instanceof AST_UnaryPrefix && self2.left.operator === "~" && self2.right instanceof AST_UnaryPrefix && self2.right.operator === "~") {
|
|
55515
|
+
self2 = make_node(AST_Binary, self2, {
|
|
55516
|
+
operator: "^",
|
|
55517
|
+
left: self2.left.expression,
|
|
55518
|
+
right: self2.right.expression
|
|
55519
|
+
});
|
|
55044
55520
|
}
|
|
55045
55521
|
if ((self2.operator === "<<" || self2.operator === ">>") && self2.right instanceof AST_Number && self2.right.value === 0) {
|
|
55046
55522
|
self2.operator = "|";
|
|
55047
55523
|
}
|
|
55048
55524
|
const zero_side = self2.right instanceof AST_Number && self2.right.value === 0 ? self2.right : self2.left instanceof AST_Number && self2.left.value === 0 ? self2.left : null;
|
|
55049
55525
|
const non_zero_side = zero_side && (zero_side === self2.right ? self2.left : self2.right);
|
|
55050
|
-
if (zero_side && (self2.operator === "|" || self2.operator === "^") && (non_zero_side.is_32_bit_integer() || compressor.in_32_bit_context())) {
|
|
55526
|
+
if (zero_side && (self2.operator === "|" || self2.operator === "^") && (non_zero_side.is_32_bit_integer(compressor) || compressor.in_32_bit_context(true))) {
|
|
55051
55527
|
return non_zero_side;
|
|
55052
55528
|
}
|
|
55053
|
-
if (zero_side && self2.operator === "&" && !non_zero_side.has_side_effects(compressor)) {
|
|
55529
|
+
if (zero_side && self2.operator === "&" && !non_zero_side.has_side_effects(compressor) && non_zero_side.is_32_bit_integer(compressor)) {
|
|
55054
55530
|
return zero_side;
|
|
55055
55531
|
}
|
|
55056
|
-
const is_full_mask = /* @__PURE__ */ __name((node) => node instanceof AST_Number && node.value === -1 || node instanceof AST_UnaryPrefix &&
|
|
55532
|
+
const is_full_mask = /* @__PURE__ */ __name((node) => node instanceof AST_Number && node.value === -1 || node instanceof AST_UnaryPrefix && node.operator === "-" && node.expression instanceof AST_Number && node.expression.value === 1, "is_full_mask");
|
|
55057
55533
|
const full_mask = is_full_mask(self2.right) ? self2.right : is_full_mask(self2.left) ? self2.left : null;
|
|
55058
|
-
const
|
|
55059
|
-
|
|
55060
|
-
|
|
55061
|
-
|
|
55062
|
-
|
|
55063
|
-
|
|
55064
|
-
break;
|
|
55065
|
-
case "&":
|
|
55066
|
-
if (full_mask && (non_full_mask_side.is_32_bit_integer() || compressor.in_32_bit_context())) {
|
|
55067
|
-
return non_full_mask_side;
|
|
55068
|
-
}
|
|
55069
|
-
break;
|
|
55070
|
-
case "^":
|
|
55071
|
-
if (full_mask) {
|
|
55072
|
-
return non_full_mask_side.bitwise_negate(compressor.in_32_bit_context());
|
|
55073
|
-
}
|
|
55074
|
-
if (self2.left instanceof AST_UnaryPrefix && self2.left.operator === "~" && self2.right instanceof AST_UnaryPrefix && self2.right.operator === "~") {
|
|
55075
|
-
self2 = make_node(AST_Binary, self2, {
|
|
55076
|
-
operator: "^",
|
|
55077
|
-
left: self2.left.expression,
|
|
55078
|
-
right: self2.right.expression
|
|
55079
|
-
});
|
|
55080
|
-
}
|
|
55081
|
-
break;
|
|
55534
|
+
const other_side = full_mask === self2.right ? self2.left : self2.right;
|
|
55535
|
+
if (full_mask && self2.operator === "&" && (other_side.is_32_bit_integer(compressor) || compressor.in_32_bit_context(true))) {
|
|
55536
|
+
return other_side;
|
|
55537
|
+
}
|
|
55538
|
+
if (full_mask && self2.operator === "^" && (other_side.is_32_bit_integer(compressor) || compressor.in_32_bit_context(true))) {
|
|
55539
|
+
return other_side.bitwise_negate(compressor);
|
|
55082
55540
|
}
|
|
55083
55541
|
}
|
|
55084
55542
|
}
|
|
@@ -55544,7 +56002,7 @@ var require_bundle_min = __commonJS({
|
|
|
55544
56002
|
var prop = props[i];
|
|
55545
56003
|
if ("" + (prop instanceof AST_ConciseMethod ? prop.key.name : prop.key) == key) {
|
|
55546
56004
|
const all_props_flattenable = props.every(
|
|
55547
|
-
(p) => (p instanceof AST_ObjectKeyVal || arrows && p instanceof AST_ConciseMethod && !p.is_generator) && !p.computed_key()
|
|
56005
|
+
(p) => (p instanceof AST_ObjectKeyVal || arrows && p instanceof AST_ConciseMethod && !p.value.is_generator) && !p.computed_key()
|
|
55548
56006
|
);
|
|
55549
56007
|
if (!all_props_flattenable) return;
|
|
55550
56008
|
if (!safe_to_flatten(prop.value, compressor)) return;
|
|
@@ -55880,7 +56338,7 @@ var require_bundle_min = __commonJS({
|
|
|
55880
56338
|
if (segments.length == 1) {
|
|
55881
56339
|
return make_node(AST_String, self2, segments[0]);
|
|
55882
56340
|
}
|
|
55883
|
-
if (segments.length === 3 && segments[1] instanceof AST_Node && (segments[1].is_string(compressor) || segments[1].
|
|
56341
|
+
if (segments.length === 3 && segments[1] instanceof AST_Node && (segments[1].is_string(compressor) || segments[1].is_number_or_bigint(compressor) || is_nullish(segments[1], compressor) || compressor.option("unsafe"))) {
|
|
55884
56342
|
if (segments[2].value === "") {
|
|
55885
56343
|
return make_node(AST_Binary, self2, {
|
|
55886
56344
|
operator: "+",
|
|
@@ -55933,10 +56391,10 @@ var require_bundle_min = __commonJS({
|
|
|
55933
56391
|
def_optimize(AST_ObjectProperty, lift_key);
|
|
55934
56392
|
def_optimize(AST_ConciseMethod, function(self2, compressor) {
|
|
55935
56393
|
lift_key(self2, compressor);
|
|
55936
|
-
if (compressor.option("arrows") && compressor.parent() instanceof AST_Object && !self2.is_generator && !self2.value.uses_arguments && !self2.value.pinned() && self2.value.body.length == 1 && self2.value.body[0] instanceof AST_Return && self2.value.body[0].value && !self2.value.contains_this()) {
|
|
56394
|
+
if (compressor.option("arrows") && compressor.parent() instanceof AST_Object && !self2.value.is_generator && !self2.value.uses_arguments && !self2.value.pinned() && self2.value.body.length == 1 && self2.value.body[0] instanceof AST_Return && self2.value.body[0].value && !self2.value.contains_this()) {
|
|
55937
56395
|
var arrow = make_node(AST_Arrow, self2.value, self2.value);
|
|
55938
|
-
arrow.async = self2.async;
|
|
55939
|
-
arrow.is_generator = self2.is_generator;
|
|
56396
|
+
arrow.async = self2.value.async;
|
|
56397
|
+
arrow.is_generator = self2.value.is_generator;
|
|
55940
56398
|
return make_node(AST_ObjectKeyVal, self2, {
|
|
55941
56399
|
key: self2.key instanceof AST_SymbolMethod ? self2.key.name : self2.key,
|
|
55942
56400
|
value: arrow,
|
|
@@ -55954,8 +56412,6 @@ var require_bundle_min = __commonJS({
|
|
|
55954
56412
|
var is_arrow_with_block = value instanceof AST_Arrow && Array.isArray(value.body) && !value.contains_this();
|
|
55955
56413
|
if ((is_arrow_with_block || value instanceof AST_Function) && !value.name) {
|
|
55956
56414
|
return make_node(AST_ConciseMethod, self2, {
|
|
55957
|
-
async: value.async,
|
|
55958
|
-
is_generator: value.is_generator,
|
|
55959
56415
|
key: key instanceof AST_Node ? key : make_node(AST_SymbolMethod, self2, {
|
|
55960
56416
|
name: key
|
|
55961
56417
|
}),
|
|
@@ -65953,7 +66409,7 @@ var require_bundle_min = __commonJS({
|
|
|
65953
66409
|
if (program.parse.acorn) {
|
|
65954
66410
|
files = convert_ast(function(toplevel, name) {
|
|
65955
66411
|
return require_acorn().parse(files[name], {
|
|
65956
|
-
ecmaVersion:
|
|
66412
|
+
ecmaVersion: 2024,
|
|
65957
66413
|
locations: true,
|
|
65958
66414
|
program: toplevel,
|
|
65959
66415
|
sourceFile: name,
|
|
@@ -68381,7 +68837,9 @@ var require_html_webpack_plugin = __commonJS({
|
|
|
68381
68837
|
const templateResult = this.options.templateContent ? { mainCompilationHash: compilation.hash } : childCompilerPlugin.getCompilationEntryResult(this.options.template);
|
|
68382
68838
|
if ("error" in templateResult) {
|
|
68383
68839
|
compilation.errors.push(
|
|
68384
|
-
|
|
68840
|
+
new Error(
|
|
68841
|
+
prettyError(templateResult.error, compiler.context).toString()
|
|
68842
|
+
)
|
|
68385
68843
|
);
|
|
68386
68844
|
}
|
|
68387
68845
|
const isCompilationCached = templateResult.mainCompilationHash !== compilation.hash;
|
|
@@ -68511,7 +68969,9 @@ var require_html_webpack_plugin = __commonJS({
|
|
|
68511
68969
|
const pluginArgs = { html, plugin: this, outputName };
|
|
68512
68970
|
return _HtmlWebpackPlugin.getCompilationHooks(compilation).beforeEmit.promise(pluginArgs).then((result) => result.html);
|
|
68513
68971
|
}).catch((err) => {
|
|
68514
|
-
compilation.errors.push(
|
|
68972
|
+
compilation.errors.push(
|
|
68973
|
+
new Error(prettyError(err, compiler.context).toString())
|
|
68974
|
+
);
|
|
68515
68975
|
return this.options.showErrors ? prettyError(err, compiler.context).toHtml() : "ERROR";
|
|
68516
68976
|
}).then((html) => {
|
|
68517
68977
|
const filename = outputName.replace(
|