@tscircuit/cli 0.1.61 → 0.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +514 -404
- package/package.json +20 -20
package/dist/main.js
CHANGED
|
@@ -212881,37 +212881,37 @@ var require_minimist = __commonJS((exports2, module2) => {
|
|
|
212881
212881
|
|
|
212882
212882
|
// node_modules/prompts/node_modules/kleur/index.js
|
|
212883
212883
|
var require_kleur = __commonJS((exports2, module2) => {
|
|
212884
|
-
var { FORCE_COLOR, NODE_DISABLE_COLORS, TERM } = process.env;
|
|
212885
|
-
var $ = {
|
|
212886
|
-
enabled: !
|
|
212887
|
-
reset:
|
|
212888
|
-
bold:
|
|
212889
|
-
dim:
|
|
212890
|
-
italic:
|
|
212891
|
-
underline:
|
|
212892
|
-
inverse:
|
|
212893
|
-
hidden:
|
|
212894
|
-
strikethrough:
|
|
212895
|
-
black:
|
|
212896
|
-
red:
|
|
212897
|
-
green:
|
|
212898
|
-
yellow:
|
|
212899
|
-
blue:
|
|
212900
|
-
magenta:
|
|
212901
|
-
cyan:
|
|
212902
|
-
white:
|
|
212903
|
-
gray:
|
|
212904
|
-
grey:
|
|
212905
|
-
bgBlack:
|
|
212906
|
-
bgRed:
|
|
212907
|
-
bgGreen:
|
|
212908
|
-
bgYellow:
|
|
212909
|
-
bgBlue:
|
|
212910
|
-
bgMagenta:
|
|
212911
|
-
bgCyan:
|
|
212912
|
-
bgWhite:
|
|
212884
|
+
var { FORCE_COLOR: FORCE_COLOR2, NODE_DISABLE_COLORS: NODE_DISABLE_COLORS2, TERM: TERM2 } = process.env;
|
|
212885
|
+
var $2 = {
|
|
212886
|
+
enabled: !NODE_DISABLE_COLORS2 && TERM2 !== "dumb" && FORCE_COLOR2 !== "0",
|
|
212887
|
+
reset: init2(0, 0),
|
|
212888
|
+
bold: init2(1, 22),
|
|
212889
|
+
dim: init2(2, 22),
|
|
212890
|
+
italic: init2(3, 23),
|
|
212891
|
+
underline: init2(4, 24),
|
|
212892
|
+
inverse: init2(7, 27),
|
|
212893
|
+
hidden: init2(8, 28),
|
|
212894
|
+
strikethrough: init2(9, 29),
|
|
212895
|
+
black: init2(30, 39),
|
|
212896
|
+
red: init2(31, 39),
|
|
212897
|
+
green: init2(32, 39),
|
|
212898
|
+
yellow: init2(33, 39),
|
|
212899
|
+
blue: init2(34, 39),
|
|
212900
|
+
magenta: init2(35, 39),
|
|
212901
|
+
cyan: init2(36, 39),
|
|
212902
|
+
white: init2(37, 39),
|
|
212903
|
+
gray: init2(90, 39),
|
|
212904
|
+
grey: init2(90, 39),
|
|
212905
|
+
bgBlack: init2(40, 49),
|
|
212906
|
+
bgRed: init2(41, 49),
|
|
212907
|
+
bgGreen: init2(42, 49),
|
|
212908
|
+
bgYellow: init2(43, 49),
|
|
212909
|
+
bgBlue: init2(44, 49),
|
|
212910
|
+
bgMagenta: init2(45, 49),
|
|
212911
|
+
bgCyan: init2(46, 49),
|
|
212912
|
+
bgWhite: init2(47, 49)
|
|
212913
212913
|
};
|
|
212914
|
-
function
|
|
212914
|
+
function run2(arr, str) {
|
|
212915
212915
|
let i = 0, tmp, beg = "", end = "";
|
|
212916
212916
|
for (;i < arr.length; i++) {
|
|
212917
212917
|
tmp = arr[i];
|
|
@@ -212923,37 +212923,37 @@ var require_kleur = __commonJS((exports2, module2) => {
|
|
|
212923
212923
|
}
|
|
212924
212924
|
return beg + str + end;
|
|
212925
212925
|
}
|
|
212926
|
-
function
|
|
212926
|
+
function chain2(has, keys) {
|
|
212927
212927
|
let ctx = { has, keys };
|
|
212928
|
-
ctx.reset =
|
|
212929
|
-
ctx.bold =
|
|
212930
|
-
ctx.dim =
|
|
212931
|
-
ctx.italic =
|
|
212932
|
-
ctx.underline =
|
|
212933
|
-
ctx.inverse =
|
|
212934
|
-
ctx.hidden =
|
|
212935
|
-
ctx.strikethrough =
|
|
212936
|
-
ctx.black =
|
|
212937
|
-
ctx.red =
|
|
212938
|
-
ctx.green =
|
|
212939
|
-
ctx.yellow =
|
|
212940
|
-
ctx.blue =
|
|
212941
|
-
ctx.magenta =
|
|
212942
|
-
ctx.cyan =
|
|
212943
|
-
ctx.white =
|
|
212944
|
-
ctx.gray =
|
|
212945
|
-
ctx.grey =
|
|
212946
|
-
ctx.bgBlack =
|
|
212947
|
-
ctx.bgRed =
|
|
212948
|
-
ctx.bgGreen =
|
|
212949
|
-
ctx.bgYellow =
|
|
212950
|
-
ctx.bgBlue =
|
|
212951
|
-
ctx.bgMagenta =
|
|
212952
|
-
ctx.bgCyan =
|
|
212953
|
-
ctx.bgWhite =
|
|
212928
|
+
ctx.reset = $2.reset.bind(ctx);
|
|
212929
|
+
ctx.bold = $2.bold.bind(ctx);
|
|
212930
|
+
ctx.dim = $2.dim.bind(ctx);
|
|
212931
|
+
ctx.italic = $2.italic.bind(ctx);
|
|
212932
|
+
ctx.underline = $2.underline.bind(ctx);
|
|
212933
|
+
ctx.inverse = $2.inverse.bind(ctx);
|
|
212934
|
+
ctx.hidden = $2.hidden.bind(ctx);
|
|
212935
|
+
ctx.strikethrough = $2.strikethrough.bind(ctx);
|
|
212936
|
+
ctx.black = $2.black.bind(ctx);
|
|
212937
|
+
ctx.red = $2.red.bind(ctx);
|
|
212938
|
+
ctx.green = $2.green.bind(ctx);
|
|
212939
|
+
ctx.yellow = $2.yellow.bind(ctx);
|
|
212940
|
+
ctx.blue = $2.blue.bind(ctx);
|
|
212941
|
+
ctx.magenta = $2.magenta.bind(ctx);
|
|
212942
|
+
ctx.cyan = $2.cyan.bind(ctx);
|
|
212943
|
+
ctx.white = $2.white.bind(ctx);
|
|
212944
|
+
ctx.gray = $2.gray.bind(ctx);
|
|
212945
|
+
ctx.grey = $2.grey.bind(ctx);
|
|
212946
|
+
ctx.bgBlack = $2.bgBlack.bind(ctx);
|
|
212947
|
+
ctx.bgRed = $2.bgRed.bind(ctx);
|
|
212948
|
+
ctx.bgGreen = $2.bgGreen.bind(ctx);
|
|
212949
|
+
ctx.bgYellow = $2.bgYellow.bind(ctx);
|
|
212950
|
+
ctx.bgBlue = $2.bgBlue.bind(ctx);
|
|
212951
|
+
ctx.bgMagenta = $2.bgMagenta.bind(ctx);
|
|
212952
|
+
ctx.bgCyan = $2.bgCyan.bind(ctx);
|
|
212953
|
+
ctx.bgWhite = $2.bgWhite.bind(ctx);
|
|
212954
212954
|
return ctx;
|
|
212955
212955
|
}
|
|
212956
|
-
function
|
|
212956
|
+
function init2(open2, close) {
|
|
212957
212957
|
let blk = {
|
|
212958
212958
|
open: `\x1B[${open2}m`,
|
|
212959
212959
|
close: `\x1B[${close}m`,
|
|
@@ -212962,12 +212962,12 @@ var require_kleur = __commonJS((exports2, module2) => {
|
|
|
212962
212962
|
return function(txt) {
|
|
212963
212963
|
if (this !== undefined && this.has !== undefined) {
|
|
212964
212964
|
this.has.includes(open2) || (this.has.push(open2), this.keys.push(blk));
|
|
212965
|
-
return txt === undefined ? this :
|
|
212965
|
+
return txt === undefined ? this : $2.enabled ? run2(this.keys, txt + "") : txt + "";
|
|
212966
212966
|
}
|
|
212967
|
-
return txt === undefined ?
|
|
212967
|
+
return txt === undefined ? chain2([open2], [blk]) : $2.enabled ? run2([blk], txt + "") : txt + "";
|
|
212968
212968
|
};
|
|
212969
212969
|
}
|
|
212970
|
-
module2.exports =
|
|
212970
|
+
module2.exports = $2;
|
|
212971
212971
|
});
|
|
212972
212972
|
|
|
212973
212973
|
// node_modules/prompts/dist/util/action.js
|
|
@@ -215329,7 +215329,7 @@ var require_elements = __commonJS((exports2, module2) => {
|
|
|
215329
215329
|
|
|
215330
215330
|
// node_modules/prompts/dist/prompts.js
|
|
215331
215331
|
var require_prompts = __commonJS((exports2) => {
|
|
215332
|
-
var $ = exports2;
|
|
215332
|
+
var $2 = exports2;
|
|
215333
215333
|
var el = require_elements();
|
|
215334
215334
|
var noop = (v) => v;
|
|
215335
215335
|
function toPrompt(type, args, opts = {}) {
|
|
@@ -215344,27 +215344,27 @@ var require_prompts = __commonJS((exports2) => {
|
|
|
215344
215344
|
p.on("abort", (x) => rej(onAbort(x)));
|
|
215345
215345
|
});
|
|
215346
215346
|
}
|
|
215347
|
-
|
|
215348
|
-
|
|
215347
|
+
$2.text = (args) => toPrompt("TextPrompt", args);
|
|
215348
|
+
$2.password = (args) => {
|
|
215349
215349
|
args.style = "password";
|
|
215350
|
-
return
|
|
215350
|
+
return $2.text(args);
|
|
215351
215351
|
};
|
|
215352
|
-
|
|
215352
|
+
$2.invisible = (args) => {
|
|
215353
215353
|
args.style = "invisible";
|
|
215354
|
-
return
|
|
215354
|
+
return $2.text(args);
|
|
215355
215355
|
};
|
|
215356
|
-
|
|
215357
|
-
|
|
215358
|
-
|
|
215359
|
-
|
|
215356
|
+
$2.number = (args) => toPrompt("NumberPrompt", args);
|
|
215357
|
+
$2.date = (args) => toPrompt("DatePrompt", args);
|
|
215358
|
+
$2.confirm = (args) => toPrompt("ConfirmPrompt", args);
|
|
215359
|
+
$2.list = (args) => {
|
|
215360
215360
|
const sep = args.separator || ",";
|
|
215361
215361
|
return toPrompt("TextPrompt", args, {
|
|
215362
215362
|
onSubmit: (str) => str.split(sep).map((s) => s.trim())
|
|
215363
215363
|
});
|
|
215364
215364
|
};
|
|
215365
|
-
|
|
215366
|
-
|
|
215367
|
-
|
|
215365
|
+
$2.toggle = (args) => toPrompt("TogglePrompt", args);
|
|
215366
|
+
$2.select = (args) => toPrompt("SelectPrompt", args);
|
|
215367
|
+
$2.multiselect = (args) => {
|
|
215368
215368
|
args.choices = [].concat(args.choices || []);
|
|
215369
215369
|
const toSelected = (items) => items.filter((item) => item.selected).map((item) => item.value);
|
|
215370
215370
|
return toPrompt("MultiselectPrompt", args, {
|
|
@@ -215372,7 +215372,7 @@ var require_prompts = __commonJS((exports2) => {
|
|
|
215372
215372
|
onSubmit: toSelected
|
|
215373
215373
|
});
|
|
215374
215374
|
};
|
|
215375
|
-
|
|
215375
|
+
$2.autocompleteMultiselect = (args) => {
|
|
215376
215376
|
args.choices = [].concat(args.choices || []);
|
|
215377
215377
|
const toSelected = (items) => items.filter((item) => item.selected).map((item) => item.value);
|
|
215378
215378
|
return toPrompt("AutocompleteMultiselectPrompt", args, {
|
|
@@ -215381,7 +215381,7 @@ var require_prompts = __commonJS((exports2) => {
|
|
|
215381
215381
|
});
|
|
215382
215382
|
};
|
|
215383
215383
|
var byTitle = (input, choices) => Promise.resolve(choices.filter((item) => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase()));
|
|
215384
|
-
|
|
215384
|
+
$2.autocomplete = (args) => {
|
|
215385
215385
|
args.suggest = args.suggest || byTitle;
|
|
215386
215386
|
args.choices = [].concat(args.choices || []);
|
|
215387
215387
|
return toPrompt("AutocompletePrompt", args);
|
|
@@ -217648,7 +217648,7 @@ var require_elements2 = __commonJS((exports2, module2) => {
|
|
|
217648
217648
|
|
|
217649
217649
|
// node_modules/prompts/lib/prompts.js
|
|
217650
217650
|
var require_prompts2 = __commonJS((exports2) => {
|
|
217651
|
-
var $ = exports2;
|
|
217651
|
+
var $2 = exports2;
|
|
217652
217652
|
var el = require_elements2();
|
|
217653
217653
|
var noop = (v) => v;
|
|
217654
217654
|
function toPrompt(type, args, opts = {}) {
|
|
@@ -217663,27 +217663,27 @@ var require_prompts2 = __commonJS((exports2) => {
|
|
|
217663
217663
|
p.on("abort", (x) => rej(onAbort(x)));
|
|
217664
217664
|
});
|
|
217665
217665
|
}
|
|
217666
|
-
|
|
217667
|
-
|
|
217666
|
+
$2.text = (args) => toPrompt("TextPrompt", args);
|
|
217667
|
+
$2.password = (args) => {
|
|
217668
217668
|
args.style = "password";
|
|
217669
|
-
return
|
|
217669
|
+
return $2.text(args);
|
|
217670
217670
|
};
|
|
217671
|
-
|
|
217671
|
+
$2.invisible = (args) => {
|
|
217672
217672
|
args.style = "invisible";
|
|
217673
|
-
return
|
|
217673
|
+
return $2.text(args);
|
|
217674
217674
|
};
|
|
217675
|
-
|
|
217676
|
-
|
|
217677
|
-
|
|
217678
|
-
|
|
217675
|
+
$2.number = (args) => toPrompt("NumberPrompt", args);
|
|
217676
|
+
$2.date = (args) => toPrompt("DatePrompt", args);
|
|
217677
|
+
$2.confirm = (args) => toPrompt("ConfirmPrompt", args);
|
|
217678
|
+
$2.list = (args) => {
|
|
217679
217679
|
const sep = args.separator || ",";
|
|
217680
217680
|
return toPrompt("TextPrompt", args, {
|
|
217681
217681
|
onSubmit: (str) => str.split(sep).map((s) => s.trim())
|
|
217682
217682
|
});
|
|
217683
217683
|
};
|
|
217684
|
-
|
|
217685
|
-
|
|
217686
|
-
|
|
217684
|
+
$2.toggle = (args) => toPrompt("TogglePrompt", args);
|
|
217685
|
+
$2.select = (args) => toPrompt("SelectPrompt", args);
|
|
217686
|
+
$2.multiselect = (args) => {
|
|
217687
217687
|
args.choices = [].concat(args.choices || []);
|
|
217688
217688
|
const toSelected = (items) => items.filter((item) => item.selected).map((item) => item.value);
|
|
217689
217689
|
return toPrompt("MultiselectPrompt", args, {
|
|
@@ -217691,7 +217691,7 @@ var require_prompts2 = __commonJS((exports2) => {
|
|
|
217691
217691
|
onSubmit: toSelected
|
|
217692
217692
|
});
|
|
217693
217693
|
};
|
|
217694
|
-
|
|
217694
|
+
$2.autocompleteMultiselect = (args) => {
|
|
217695
217695
|
args.choices = [].concat(args.choices || []);
|
|
217696
217696
|
const toSelected = (items) => items.filter((item) => item.selected).map((item) => item.value);
|
|
217697
217697
|
return toPrompt("AutocompleteMultiselectPrompt", args, {
|
|
@@ -217700,7 +217700,7 @@ var require_prompts2 = __commonJS((exports2) => {
|
|
|
217700
217700
|
});
|
|
217701
217701
|
};
|
|
217702
217702
|
var byTitle = (input, choices) => Promise.resolve(choices.filter((item) => item.title.slice(0, input.length).toLowerCase() === input.toLowerCase()));
|
|
217703
|
-
|
|
217703
|
+
$2.autocomplete = (args) => {
|
|
217704
217704
|
args.suggest = args.suggest || byTitle;
|
|
217705
217705
|
args.choices = [].concat(args.choices || []);
|
|
217706
217706
|
return toPrompt("AutocompletePrompt", args);
|
|
@@ -243833,9 +243833,9 @@ var require_react_development = __commonJS((exports2, module2) => {
|
|
|
243833
243833
|
case REACT_LAZY_TYPE: {
|
|
243834
243834
|
var lazyComponent = type;
|
|
243835
243835
|
var payload = lazyComponent._payload;
|
|
243836
|
-
var
|
|
243836
|
+
var init2 = lazyComponent._init;
|
|
243837
243837
|
try {
|
|
243838
|
-
return getComponentNameFromType(
|
|
243838
|
+
return getComponentNameFromType(init2(payload));
|
|
243839
243839
|
} catch (x) {
|
|
243840
243840
|
return null;
|
|
243841
243841
|
}
|
|
@@ -244520,9 +244520,9 @@ Your code should look like:
|
|
|
244520
244520
|
var dispatcher = resolveDispatcher();
|
|
244521
244521
|
return dispatcher.useState(initialState);
|
|
244522
244522
|
}
|
|
244523
|
-
function useReducer(reducer, initialArg,
|
|
244523
|
+
function useReducer(reducer, initialArg, init2) {
|
|
244524
244524
|
var dispatcher = resolveDispatcher();
|
|
244525
|
-
return dispatcher.useReducer(reducer, initialArg,
|
|
244525
|
+
return dispatcher.useReducer(reducer, initialArg, init2);
|
|
244526
244526
|
}
|
|
244527
244527
|
function useRef(initialValue) {
|
|
244528
244528
|
var dispatcher = resolveDispatcher();
|
|
@@ -244815,9 +244815,9 @@ Your code should look like:
|
|
|
244815
244815
|
case REACT_LAZY_TYPE: {
|
|
244816
244816
|
var lazyComponent = type;
|
|
244817
244817
|
var payload = lazyComponent._payload;
|
|
244818
|
-
var
|
|
244818
|
+
var init2 = lazyComponent._init;
|
|
244819
244819
|
try {
|
|
244820
|
-
return describeUnknownElementTypeFrameInDEV(
|
|
244820
|
+
return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn);
|
|
244821
244821
|
} catch (x) {}
|
|
244822
244822
|
}
|
|
244823
244823
|
}
|
|
@@ -248225,14 +248225,14 @@ Incoming: %s`, currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + next
|
|
|
248225
248225
|
function basicStateReducer(state, action) {
|
|
248226
248226
|
return typeof action === "function" ? action(state) : action;
|
|
248227
248227
|
}
|
|
248228
|
-
function mountReducer(reducer, initialArg,
|
|
248228
|
+
function mountReducer(reducer, initialArg, init2) {
|
|
248229
248229
|
var hook = mountWorkInProgressHook();
|
|
248230
|
-
if (
|
|
248231
|
-
var initialState =
|
|
248230
|
+
if (init2 !== undefined) {
|
|
248231
|
+
var initialState = init2(initialArg);
|
|
248232
248232
|
if (shouldDoubleInvokeUserFnsInHooksDEV) {
|
|
248233
248233
|
setIsStrictModeForDevtools(true);
|
|
248234
248234
|
try {
|
|
248235
|
-
|
|
248235
|
+
init2(initialArg);
|
|
248236
248236
|
} finally {
|
|
248237
248237
|
setIsStrictModeForDevtools(false);
|
|
248238
248238
|
}
|
|
@@ -253332,8 +253332,8 @@ Learn more about this warning here: https://react.dev/link/legacy-context`, sort
|
|
|
253332
253332
|
}
|
|
253333
253333
|
}, callDestroyInDEV = callDestroy["react-stack-bottom-frame"].bind(callDestroy), callLazyInit = {
|
|
253334
253334
|
"react-stack-bottom-frame": function(lazy) {
|
|
253335
|
-
var
|
|
253336
|
-
return
|
|
253335
|
+
var init2 = lazy._init;
|
|
253336
|
+
return init2(lazy._payload);
|
|
253337
253337
|
}
|
|
253338
253338
|
}, callLazyInitInDEV = callLazyInit["react-stack-bottom-frame"].bind(callLazyInit), thenableState$1 = null, thenableIndexCounter$1 = 0, currentDebugInfo = null, didWarnAboutMaps;
|
|
253339
253339
|
var didWarnAboutGenerators = didWarnAboutMaps = false;
|
|
@@ -253452,13 +253452,13 @@ Check the top-level render call using <` + componentName2 + ">.");
|
|
|
253452
253452
|
ReactSharedInternals.H = prevDispatcher;
|
|
253453
253453
|
}
|
|
253454
253454
|
},
|
|
253455
|
-
useReducer: function(reducer, initialArg,
|
|
253455
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
253456
253456
|
currentHookNameInDev = "useReducer";
|
|
253457
253457
|
mountHookTypesDev();
|
|
253458
253458
|
var prevDispatcher = ReactSharedInternals.H;
|
|
253459
253459
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
253460
253460
|
try {
|
|
253461
|
-
return mountReducer(reducer, initialArg,
|
|
253461
|
+
return mountReducer(reducer, initialArg, init2);
|
|
253462
253462
|
} finally {
|
|
253463
253463
|
ReactSharedInternals.H = prevDispatcher;
|
|
253464
253464
|
}
|
|
@@ -253573,13 +253573,13 @@ Check the top-level render call using <` + componentName2 + ">.");
|
|
|
253573
253573
|
ReactSharedInternals.H = prevDispatcher;
|
|
253574
253574
|
}
|
|
253575
253575
|
},
|
|
253576
|
-
useReducer: function(reducer, initialArg,
|
|
253576
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
253577
253577
|
currentHookNameInDev = "useReducer";
|
|
253578
253578
|
updateHookTypesDev();
|
|
253579
253579
|
var prevDispatcher = ReactSharedInternals.H;
|
|
253580
253580
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
253581
253581
|
try {
|
|
253582
|
-
return mountReducer(reducer, initialArg,
|
|
253582
|
+
return mountReducer(reducer, initialArg, init2);
|
|
253583
253583
|
} finally {
|
|
253584
253584
|
ReactSharedInternals.H = prevDispatcher;
|
|
253585
253585
|
}
|
|
@@ -253694,13 +253694,13 @@ Check the top-level render call using <` + componentName2 + ">.");
|
|
|
253694
253694
|
ReactSharedInternals.H = prevDispatcher;
|
|
253695
253695
|
}
|
|
253696
253696
|
},
|
|
253697
|
-
useReducer: function(reducer, initialArg,
|
|
253697
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
253698
253698
|
currentHookNameInDev = "useReducer";
|
|
253699
253699
|
updateHookTypesDev();
|
|
253700
253700
|
var prevDispatcher = ReactSharedInternals.H;
|
|
253701
253701
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
253702
253702
|
try {
|
|
253703
|
-
return updateReducer(reducer, initialArg,
|
|
253703
|
+
return updateReducer(reducer, initialArg, init2);
|
|
253704
253704
|
} finally {
|
|
253705
253705
|
ReactSharedInternals.H = prevDispatcher;
|
|
253706
253706
|
}
|
|
@@ -253815,13 +253815,13 @@ Check the top-level render call using <` + componentName2 + ">.");
|
|
|
253815
253815
|
ReactSharedInternals.H = prevDispatcher;
|
|
253816
253816
|
}
|
|
253817
253817
|
},
|
|
253818
|
-
useReducer: function(reducer, initialArg,
|
|
253818
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
253819
253819
|
currentHookNameInDev = "useReducer";
|
|
253820
253820
|
updateHookTypesDev();
|
|
253821
253821
|
var prevDispatcher = ReactSharedInternals.H;
|
|
253822
253822
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
|
|
253823
253823
|
try {
|
|
253824
|
-
return rerenderReducer(reducer, initialArg,
|
|
253824
|
+
return rerenderReducer(reducer, initialArg, init2);
|
|
253825
253825
|
} finally {
|
|
253826
253826
|
ReactSharedInternals.H = prevDispatcher;
|
|
253827
253827
|
}
|
|
@@ -253947,14 +253947,14 @@ Check the top-level render call using <` + componentName2 + ">.");
|
|
|
253947
253947
|
ReactSharedInternals.H = prevDispatcher;
|
|
253948
253948
|
}
|
|
253949
253949
|
},
|
|
253950
|
-
useReducer: function(reducer, initialArg,
|
|
253950
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
253951
253951
|
currentHookNameInDev = "useReducer";
|
|
253952
253952
|
warnInvalidHookAccess();
|
|
253953
253953
|
mountHookTypesDev();
|
|
253954
253954
|
var prevDispatcher = ReactSharedInternals.H;
|
|
253955
253955
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
253956
253956
|
try {
|
|
253957
|
-
return mountReducer(reducer, initialArg,
|
|
253957
|
+
return mountReducer(reducer, initialArg, init2);
|
|
253958
253958
|
} finally {
|
|
253959
253959
|
ReactSharedInternals.H = prevDispatcher;
|
|
253960
253960
|
}
|
|
@@ -254092,14 +254092,14 @@ Check the top-level render call using <` + componentName2 + ">.");
|
|
|
254092
254092
|
ReactSharedInternals.H = prevDispatcher;
|
|
254093
254093
|
}
|
|
254094
254094
|
},
|
|
254095
|
-
useReducer: function(reducer, initialArg,
|
|
254095
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
254096
254096
|
currentHookNameInDev = "useReducer";
|
|
254097
254097
|
warnInvalidHookAccess();
|
|
254098
254098
|
updateHookTypesDev();
|
|
254099
254099
|
var prevDispatcher = ReactSharedInternals.H;
|
|
254100
254100
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
254101
254101
|
try {
|
|
254102
|
-
return updateReducer(reducer, initialArg,
|
|
254102
|
+
return updateReducer(reducer, initialArg, init2);
|
|
254103
254103
|
} finally {
|
|
254104
254104
|
ReactSharedInternals.H = prevDispatcher;
|
|
254105
254105
|
}
|
|
@@ -254237,14 +254237,14 @@ Check the top-level render call using <` + componentName2 + ">.");
|
|
|
254237
254237
|
ReactSharedInternals.H = prevDispatcher;
|
|
254238
254238
|
}
|
|
254239
254239
|
},
|
|
254240
|
-
useReducer: function(reducer, initialArg,
|
|
254240
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
254241
254241
|
currentHookNameInDev = "useReducer";
|
|
254242
254242
|
warnInvalidHookAccess();
|
|
254243
254243
|
updateHookTypesDev();
|
|
254244
254244
|
var prevDispatcher = ReactSharedInternals.H;
|
|
254245
254245
|
ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
254246
254246
|
try {
|
|
254247
|
-
return rerenderReducer(reducer, initialArg,
|
|
254247
|
+
return rerenderReducer(reducer, initialArg, init2);
|
|
254248
254248
|
} finally {
|
|
254249
254249
|
ReactSharedInternals.H = prevDispatcher;
|
|
254250
254250
|
}
|
|
@@ -255505,9 +255505,9 @@ var require_react_reconciler_development2 = __commonJS((exports2, module2) => {
|
|
|
255505
255505
|
case REACT_LAZY_TYPE: {
|
|
255506
255506
|
var lazyComponent = type;
|
|
255507
255507
|
var payload = lazyComponent._payload;
|
|
255508
|
-
var
|
|
255508
|
+
var init2 = lazyComponent._init;
|
|
255509
255509
|
try {
|
|
255510
|
-
return getComponentNameFromType(
|
|
255510
|
+
return getComponentNameFromType(init2(payload));
|
|
255511
255511
|
} catch (x) {
|
|
255512
255512
|
return null;
|
|
255513
255513
|
}
|
|
@@ -256143,9 +256143,9 @@ var require_react_reconciler_development2 = __commonJS((exports2, module2) => {
|
|
|
256143
256143
|
case REACT_LAZY_TYPE: {
|
|
256144
256144
|
var lazyComponent = type;
|
|
256145
256145
|
var payload = lazyComponent._payload;
|
|
256146
|
-
var
|
|
256146
|
+
var init2 = lazyComponent._init;
|
|
256147
256147
|
try {
|
|
256148
|
-
return describeUnknownElementTypeFrameInDEV(
|
|
256148
|
+
return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn);
|
|
256149
256149
|
} catch (x) {}
|
|
256150
256150
|
}
|
|
256151
256151
|
}
|
|
@@ -258327,8 +258327,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
258327
258327
|
}
|
|
258328
258328
|
function resolveLazy(lazyType2) {
|
|
258329
258329
|
var payload = lazyType2._payload;
|
|
258330
|
-
var
|
|
258331
|
-
return
|
|
258330
|
+
var init2 = lazyType2._init;
|
|
258331
|
+
return init2(payload);
|
|
258332
258332
|
}
|
|
258333
258333
|
function ChildReconciler(shouldTrackSideEffects) {
|
|
258334
258334
|
function deleteChild(returnFiber, childToDelete) {
|
|
@@ -258475,8 +258475,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
258475
258475
|
}
|
|
258476
258476
|
case REACT_LAZY_TYPE: {
|
|
258477
258477
|
var payload = newChild._payload;
|
|
258478
|
-
var
|
|
258479
|
-
return createChild(returnFiber,
|
|
258478
|
+
var init2 = newChild._init;
|
|
258479
|
+
return createChild(returnFiber, init2(payload), lanes);
|
|
258480
258480
|
}
|
|
258481
258481
|
}
|
|
258482
258482
|
if (isArray(newChild) || getIteratorFn(newChild)) {
|
|
@@ -258519,8 +258519,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
258519
258519
|
}
|
|
258520
258520
|
case REACT_LAZY_TYPE: {
|
|
258521
258521
|
var payload = newChild._payload;
|
|
258522
|
-
var
|
|
258523
|
-
return updateSlot(returnFiber, oldFiber,
|
|
258522
|
+
var init2 = newChild._init;
|
|
258523
|
+
return updateSlot(returnFiber, oldFiber, init2(payload), lanes);
|
|
258524
258524
|
}
|
|
258525
258525
|
}
|
|
258526
258526
|
if (isArray(newChild) || getIteratorFn(newChild)) {
|
|
@@ -258555,8 +258555,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
258555
258555
|
}
|
|
258556
258556
|
case REACT_LAZY_TYPE:
|
|
258557
258557
|
var payload = newChild._payload;
|
|
258558
|
-
var
|
|
258559
|
-
return updateFromMap(existingChildren, returnFiber, newIdx,
|
|
258558
|
+
var init2 = newChild._init;
|
|
258559
|
+
return updateFromMap(existingChildren, returnFiber, newIdx, init2(payload), lanes);
|
|
258560
258560
|
}
|
|
258561
258561
|
if (isArray(newChild) || getIteratorFn(newChild)) {
|
|
258562
258562
|
var _matchedFiber3 = existingChildren.get(newIdx) || null;
|
|
@@ -258597,8 +258597,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
258597
258597
|
break;
|
|
258598
258598
|
case REACT_LAZY_TYPE:
|
|
258599
258599
|
var payload = child._payload;
|
|
258600
|
-
var
|
|
258601
|
-
warnOnInvalidKey(
|
|
258600
|
+
var init2 = child._init;
|
|
258601
|
+
warnOnInvalidKey(init2(payload), knownKeys, returnFiber);
|
|
258602
258602
|
break;
|
|
258603
258603
|
}
|
|
258604
258604
|
}
|
|
@@ -258923,8 +258923,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
258923
258923
|
return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));
|
|
258924
258924
|
case REACT_LAZY_TYPE:
|
|
258925
258925
|
var payload = newChild._payload;
|
|
258926
|
-
var
|
|
258927
|
-
return reconcileChildFibers2(returnFiber, currentFirstChild,
|
|
258926
|
+
var init2 = newChild._init;
|
|
258927
|
+
return reconcileChildFibers2(returnFiber, currentFirstChild, init2(payload), lanes);
|
|
258928
258928
|
}
|
|
258929
258929
|
if (isArray(newChild)) {
|
|
258930
258930
|
return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
|
|
@@ -259785,8 +259785,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
259785
259785
|
workInProgressSources.length = 0;
|
|
259786
259786
|
}
|
|
259787
259787
|
function registerMutableSourceForHydration(root, mutableSource) {
|
|
259788
|
-
var
|
|
259789
|
-
var version2 =
|
|
259788
|
+
var getVersion2 = mutableSource._getVersion;
|
|
259789
|
+
var version2 = getVersion2(mutableSource._source);
|
|
259790
259790
|
if (root.mutableSourceEagerHydrationData == null) {
|
|
259791
259791
|
root.mutableSourceEagerHydrationData = [mutableSource, version2];
|
|
259792
259792
|
} else {
|
|
@@ -260076,11 +260076,11 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
260076
260076
|
function basicStateReducer(state, action) {
|
|
260077
260077
|
return typeof action === "function" ? action(state) : action;
|
|
260078
260078
|
}
|
|
260079
|
-
function mountReducer(reducer, initialArg,
|
|
260079
|
+
function mountReducer(reducer, initialArg, init2) {
|
|
260080
260080
|
var hook = mountWorkInProgressHook();
|
|
260081
260081
|
var initialState;
|
|
260082
|
-
if (
|
|
260083
|
-
initialState =
|
|
260082
|
+
if (init2 !== undefined) {
|
|
260083
|
+
initialState = init2(initialArg);
|
|
260084
260084
|
} else {
|
|
260085
260085
|
initialState = initialArg;
|
|
260086
260086
|
}
|
|
@@ -260097,7 +260097,7 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
260097
260097
|
var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);
|
|
260098
260098
|
return [hook.memoizedState, dispatch];
|
|
260099
260099
|
}
|
|
260100
|
-
function updateReducer(reducer, initialArg,
|
|
260100
|
+
function updateReducer(reducer, initialArg, init2) {
|
|
260101
260101
|
var hook = updateWorkInProgressHook();
|
|
260102
260102
|
var queue = hook.queue;
|
|
260103
260103
|
if (queue === null) {
|
|
@@ -260195,7 +260195,7 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
260195
260195
|
var dispatch = queue.dispatch;
|
|
260196
260196
|
return [hook.memoizedState, dispatch];
|
|
260197
260197
|
}
|
|
260198
|
-
function rerenderReducer(reducer, initialArg,
|
|
260198
|
+
function rerenderReducer(reducer, initialArg, init2) {
|
|
260199
260199
|
var hook = updateWorkInProgressHook();
|
|
260200
260200
|
var queue = hook.queue;
|
|
260201
260201
|
if (queue === null) {
|
|
@@ -260886,13 +260886,13 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
260886
260886
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
260887
260887
|
}
|
|
260888
260888
|
},
|
|
260889
|
-
useReducer: function(reducer, initialArg,
|
|
260889
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
260890
260890
|
currentHookNameInDev = "useReducer";
|
|
260891
260891
|
mountHookTypesDev();
|
|
260892
260892
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
260893
260893
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
260894
260894
|
try {
|
|
260895
|
-
return mountReducer(reducer, initialArg,
|
|
260895
|
+
return mountReducer(reducer, initialArg, init2);
|
|
260896
260896
|
} finally {
|
|
260897
260897
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
260898
260898
|
}
|
|
@@ -260990,13 +260990,13 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
260990
260990
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
260991
260991
|
}
|
|
260992
260992
|
},
|
|
260993
|
-
useReducer: function(reducer, initialArg,
|
|
260993
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
260994
260994
|
currentHookNameInDev = "useReducer";
|
|
260995
260995
|
updateHookTypesDev();
|
|
260996
260996
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
260997
260997
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
260998
260998
|
try {
|
|
260999
|
-
return mountReducer(reducer, initialArg,
|
|
260999
|
+
return mountReducer(reducer, initialArg, init2);
|
|
261000
261000
|
} finally {
|
|
261001
261001
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261002
261002
|
}
|
|
@@ -261094,13 +261094,13 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
261094
261094
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261095
261095
|
}
|
|
261096
261096
|
},
|
|
261097
|
-
useReducer: function(reducer, initialArg,
|
|
261097
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
261098
261098
|
currentHookNameInDev = "useReducer";
|
|
261099
261099
|
updateHookTypesDev();
|
|
261100
261100
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
261101
261101
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
261102
261102
|
try {
|
|
261103
|
-
return updateReducer(reducer, initialArg,
|
|
261103
|
+
return updateReducer(reducer, initialArg, init2);
|
|
261104
261104
|
} finally {
|
|
261105
261105
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261106
261106
|
}
|
|
@@ -261198,13 +261198,13 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
261198
261198
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261199
261199
|
}
|
|
261200
261200
|
},
|
|
261201
|
-
useReducer: function(reducer, initialArg,
|
|
261201
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
261202
261202
|
currentHookNameInDev = "useReducer";
|
|
261203
261203
|
updateHookTypesDev();
|
|
261204
261204
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
261205
261205
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
|
|
261206
261206
|
try {
|
|
261207
|
-
return rerenderReducer(reducer, initialArg,
|
|
261207
|
+
return rerenderReducer(reducer, initialArg, init2);
|
|
261208
261208
|
} finally {
|
|
261209
261209
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261210
261210
|
}
|
|
@@ -261310,14 +261310,14 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
261310
261310
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261311
261311
|
}
|
|
261312
261312
|
},
|
|
261313
|
-
useReducer: function(reducer, initialArg,
|
|
261313
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
261314
261314
|
currentHookNameInDev = "useReducer";
|
|
261315
261315
|
warnInvalidHookAccess();
|
|
261316
261316
|
mountHookTypesDev();
|
|
261317
261317
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
261318
261318
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
261319
261319
|
try {
|
|
261320
|
-
return mountReducer(reducer, initialArg,
|
|
261320
|
+
return mountReducer(reducer, initialArg, init2);
|
|
261321
261321
|
} finally {
|
|
261322
261322
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261323
261323
|
}
|
|
@@ -261431,14 +261431,14 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
261431
261431
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261432
261432
|
}
|
|
261433
261433
|
},
|
|
261434
|
-
useReducer: function(reducer, initialArg,
|
|
261434
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
261435
261435
|
currentHookNameInDev = "useReducer";
|
|
261436
261436
|
warnInvalidHookAccess();
|
|
261437
261437
|
updateHookTypesDev();
|
|
261438
261438
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
261439
261439
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
261440
261440
|
try {
|
|
261441
|
-
return updateReducer(reducer, initialArg,
|
|
261441
|
+
return updateReducer(reducer, initialArg, init2);
|
|
261442
261442
|
} finally {
|
|
261443
261443
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261444
261444
|
}
|
|
@@ -261552,14 +261552,14 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
261552
261552
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261553
261553
|
}
|
|
261554
261554
|
},
|
|
261555
|
-
useReducer: function(reducer, initialArg,
|
|
261555
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
261556
261556
|
currentHookNameInDev = "useReducer";
|
|
261557
261557
|
warnInvalidHookAccess();
|
|
261558
261558
|
updateHookTypesDev();
|
|
261559
261559
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
261560
261560
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
261561
261561
|
try {
|
|
261562
|
-
return rerenderReducer(reducer, initialArg,
|
|
261562
|
+
return rerenderReducer(reducer, initialArg, init2);
|
|
261563
261563
|
} finally {
|
|
261564
261564
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
261565
261565
|
}
|
|
@@ -262777,9 +262777,9 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
262777
262777
|
if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
|
|
262778
262778
|
var lazyComponent = outerMemoType;
|
|
262779
262779
|
var payload = lazyComponent._payload;
|
|
262780
|
-
var
|
|
262780
|
+
var init2 = lazyComponent._init;
|
|
262781
262781
|
try {
|
|
262782
|
-
outerMemoType =
|
|
262782
|
+
outerMemoType = init2(payload);
|
|
262783
262783
|
} catch (x) {
|
|
262784
262784
|
outerMemoType = null;
|
|
262785
262785
|
}
|
|
@@ -263149,8 +263149,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
263149
263149
|
var props = workInProgress2.pendingProps;
|
|
263150
263150
|
var lazyComponent = elementType;
|
|
263151
263151
|
var payload = lazyComponent._payload;
|
|
263152
|
-
var
|
|
263153
|
-
var Component =
|
|
263152
|
+
var init2 = lazyComponent._init;
|
|
263153
|
+
var Component = init2(payload);
|
|
263154
263154
|
workInProgress2.type = Component;
|
|
263155
263155
|
var resolvedTag = workInProgress2.tag = resolveLazyComponentTag(Component);
|
|
263156
263156
|
var resolvedProps = resolveDefaultProps(Component, props);
|
|
@@ -270265,9 +270265,9 @@ var require_react_jsx_runtime_development = __commonJS((exports2) => {
|
|
|
270265
270265
|
case REACT_LAZY_TYPE: {
|
|
270266
270266
|
var lazyComponent = type;
|
|
270267
270267
|
var payload = lazyComponent._payload;
|
|
270268
|
-
var
|
|
270268
|
+
var init2 = lazyComponent._init;
|
|
270269
270269
|
try {
|
|
270270
|
-
return getComponentNameFromType(
|
|
270270
|
+
return getComponentNameFromType(init2(payload));
|
|
270271
270271
|
} catch (x) {
|
|
270272
270272
|
return null;
|
|
270273
270273
|
}
|
|
@@ -270518,9 +270518,9 @@ var require_react_jsx_runtime_development = __commonJS((exports2) => {
|
|
|
270518
270518
|
case REACT_LAZY_TYPE: {
|
|
270519
270519
|
var lazyComponent = type;
|
|
270520
270520
|
var payload = lazyComponent._payload;
|
|
270521
|
-
var
|
|
270521
|
+
var init2 = lazyComponent._init;
|
|
270522
270522
|
try {
|
|
270523
|
-
return describeUnknownElementTypeFrameInDEV(
|
|
270523
|
+
return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn);
|
|
270524
270524
|
} catch (x) {}
|
|
270525
270525
|
}
|
|
270526
270526
|
}
|
|
@@ -271657,9 +271657,9 @@ var require_react_reconciler_development3 = __commonJS((exports2, module2) => {
|
|
|
271657
271657
|
case REACT_LAZY_TYPE: {
|
|
271658
271658
|
var lazyComponent = type;
|
|
271659
271659
|
var payload = lazyComponent._payload;
|
|
271660
|
-
var
|
|
271660
|
+
var init2 = lazyComponent._init;
|
|
271661
271661
|
try {
|
|
271662
|
-
return getComponentNameFromType(
|
|
271662
|
+
return getComponentNameFromType(init2(payload));
|
|
271663
271663
|
} catch (x) {
|
|
271664
271664
|
return null;
|
|
271665
271665
|
}
|
|
@@ -272295,9 +272295,9 @@ var require_react_reconciler_development3 = __commonJS((exports2, module2) => {
|
|
|
272295
272295
|
case REACT_LAZY_TYPE: {
|
|
272296
272296
|
var lazyComponent = type;
|
|
272297
272297
|
var payload = lazyComponent._payload;
|
|
272298
|
-
var
|
|
272298
|
+
var init2 = lazyComponent._init;
|
|
272299
272299
|
try {
|
|
272300
|
-
return describeUnknownElementTypeFrameInDEV(
|
|
272300
|
+
return describeUnknownElementTypeFrameInDEV(init2(payload), source, ownerFn);
|
|
272301
272301
|
} catch (x) {}
|
|
272302
272302
|
}
|
|
272303
272303
|
}
|
|
@@ -274479,8 +274479,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
274479
274479
|
}
|
|
274480
274480
|
function resolveLazy(lazyType2) {
|
|
274481
274481
|
var payload = lazyType2._payload;
|
|
274482
|
-
var
|
|
274483
|
-
return
|
|
274482
|
+
var init2 = lazyType2._init;
|
|
274483
|
+
return init2(payload);
|
|
274484
274484
|
}
|
|
274485
274485
|
function ChildReconciler(shouldTrackSideEffects) {
|
|
274486
274486
|
function deleteChild(returnFiber, childToDelete) {
|
|
@@ -274627,8 +274627,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
274627
274627
|
}
|
|
274628
274628
|
case REACT_LAZY_TYPE: {
|
|
274629
274629
|
var payload = newChild._payload;
|
|
274630
|
-
var
|
|
274631
|
-
return createChild(returnFiber,
|
|
274630
|
+
var init2 = newChild._init;
|
|
274631
|
+
return createChild(returnFiber, init2(payload), lanes);
|
|
274632
274632
|
}
|
|
274633
274633
|
}
|
|
274634
274634
|
if (isArray(newChild) || getIteratorFn(newChild)) {
|
|
@@ -274671,8 +274671,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
274671
274671
|
}
|
|
274672
274672
|
case REACT_LAZY_TYPE: {
|
|
274673
274673
|
var payload = newChild._payload;
|
|
274674
|
-
var
|
|
274675
|
-
return updateSlot(returnFiber, oldFiber,
|
|
274674
|
+
var init2 = newChild._init;
|
|
274675
|
+
return updateSlot(returnFiber, oldFiber, init2(payload), lanes);
|
|
274676
274676
|
}
|
|
274677
274677
|
}
|
|
274678
274678
|
if (isArray(newChild) || getIteratorFn(newChild)) {
|
|
@@ -274707,8 +274707,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
274707
274707
|
}
|
|
274708
274708
|
case REACT_LAZY_TYPE:
|
|
274709
274709
|
var payload = newChild._payload;
|
|
274710
|
-
var
|
|
274711
|
-
return updateFromMap(existingChildren, returnFiber, newIdx,
|
|
274710
|
+
var init2 = newChild._init;
|
|
274711
|
+
return updateFromMap(existingChildren, returnFiber, newIdx, init2(payload), lanes);
|
|
274712
274712
|
}
|
|
274713
274713
|
if (isArray(newChild) || getIteratorFn(newChild)) {
|
|
274714
274714
|
var _matchedFiber3 = existingChildren.get(newIdx) || null;
|
|
@@ -274749,8 +274749,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
274749
274749
|
break;
|
|
274750
274750
|
case REACT_LAZY_TYPE:
|
|
274751
274751
|
var payload = child._payload;
|
|
274752
|
-
var
|
|
274753
|
-
warnOnInvalidKey(
|
|
274752
|
+
var init2 = child._init;
|
|
274753
|
+
warnOnInvalidKey(init2(payload), knownKeys, returnFiber);
|
|
274754
274754
|
break;
|
|
274755
274755
|
}
|
|
274756
274756
|
}
|
|
@@ -275075,8 +275075,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
275075
275075
|
return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));
|
|
275076
275076
|
case REACT_LAZY_TYPE:
|
|
275077
275077
|
var payload = newChild._payload;
|
|
275078
|
-
var
|
|
275079
|
-
return reconcileChildFibers2(returnFiber, currentFirstChild,
|
|
275078
|
+
var init2 = newChild._init;
|
|
275079
|
+
return reconcileChildFibers2(returnFiber, currentFirstChild, init2(payload), lanes);
|
|
275080
275080
|
}
|
|
275081
275081
|
if (isArray(newChild)) {
|
|
275082
275082
|
return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
|
|
@@ -275937,8 +275937,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
275937
275937
|
workInProgressSources.length = 0;
|
|
275938
275938
|
}
|
|
275939
275939
|
function registerMutableSourceForHydration(root, mutableSource) {
|
|
275940
|
-
var
|
|
275941
|
-
var version2 =
|
|
275940
|
+
var getVersion2 = mutableSource._getVersion;
|
|
275941
|
+
var version2 = getVersion2(mutableSource._source);
|
|
275942
275942
|
if (root.mutableSourceEagerHydrationData == null) {
|
|
275943
275943
|
root.mutableSourceEagerHydrationData = [mutableSource, version2];
|
|
275944
275944
|
} else {
|
|
@@ -276228,11 +276228,11 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
276228
276228
|
function basicStateReducer(state, action) {
|
|
276229
276229
|
return typeof action === "function" ? action(state) : action;
|
|
276230
276230
|
}
|
|
276231
|
-
function mountReducer(reducer, initialArg,
|
|
276231
|
+
function mountReducer(reducer, initialArg, init2) {
|
|
276232
276232
|
var hook = mountWorkInProgressHook();
|
|
276233
276233
|
var initialState;
|
|
276234
|
-
if (
|
|
276235
|
-
initialState =
|
|
276234
|
+
if (init2 !== undefined) {
|
|
276235
|
+
initialState = init2(initialArg);
|
|
276236
276236
|
} else {
|
|
276237
276237
|
initialState = initialArg;
|
|
276238
276238
|
}
|
|
@@ -276249,7 +276249,7 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
276249
276249
|
var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);
|
|
276250
276250
|
return [hook.memoizedState, dispatch];
|
|
276251
276251
|
}
|
|
276252
|
-
function updateReducer(reducer, initialArg,
|
|
276252
|
+
function updateReducer(reducer, initialArg, init2) {
|
|
276253
276253
|
var hook = updateWorkInProgressHook();
|
|
276254
276254
|
var queue = hook.queue;
|
|
276255
276255
|
if (queue === null) {
|
|
@@ -276347,7 +276347,7 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
276347
276347
|
var dispatch = queue.dispatch;
|
|
276348
276348
|
return [hook.memoizedState, dispatch];
|
|
276349
276349
|
}
|
|
276350
|
-
function rerenderReducer(reducer, initialArg,
|
|
276350
|
+
function rerenderReducer(reducer, initialArg, init2) {
|
|
276351
276351
|
var hook = updateWorkInProgressHook();
|
|
276352
276352
|
var queue = hook.queue;
|
|
276353
276353
|
if (queue === null) {
|
|
@@ -277038,13 +277038,13 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
277038
277038
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277039
277039
|
}
|
|
277040
277040
|
},
|
|
277041
|
-
useReducer: function(reducer, initialArg,
|
|
277041
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
277042
277042
|
currentHookNameInDev = "useReducer";
|
|
277043
277043
|
mountHookTypesDev();
|
|
277044
277044
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
277045
277045
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
277046
277046
|
try {
|
|
277047
|
-
return mountReducer(reducer, initialArg,
|
|
277047
|
+
return mountReducer(reducer, initialArg, init2);
|
|
277048
277048
|
} finally {
|
|
277049
277049
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277050
277050
|
}
|
|
@@ -277142,13 +277142,13 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
277142
277142
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277143
277143
|
}
|
|
277144
277144
|
},
|
|
277145
|
-
useReducer: function(reducer, initialArg,
|
|
277145
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
277146
277146
|
currentHookNameInDev = "useReducer";
|
|
277147
277147
|
updateHookTypesDev();
|
|
277148
277148
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
277149
277149
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
277150
277150
|
try {
|
|
277151
|
-
return mountReducer(reducer, initialArg,
|
|
277151
|
+
return mountReducer(reducer, initialArg, init2);
|
|
277152
277152
|
} finally {
|
|
277153
277153
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277154
277154
|
}
|
|
@@ -277246,13 +277246,13 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
277246
277246
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277247
277247
|
}
|
|
277248
277248
|
},
|
|
277249
|
-
useReducer: function(reducer, initialArg,
|
|
277249
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
277250
277250
|
currentHookNameInDev = "useReducer";
|
|
277251
277251
|
updateHookTypesDev();
|
|
277252
277252
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
277253
277253
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
277254
277254
|
try {
|
|
277255
|
-
return updateReducer(reducer, initialArg,
|
|
277255
|
+
return updateReducer(reducer, initialArg, init2);
|
|
277256
277256
|
} finally {
|
|
277257
277257
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277258
277258
|
}
|
|
@@ -277350,13 +277350,13 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
277350
277350
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277351
277351
|
}
|
|
277352
277352
|
},
|
|
277353
|
-
useReducer: function(reducer, initialArg,
|
|
277353
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
277354
277354
|
currentHookNameInDev = "useReducer";
|
|
277355
277355
|
updateHookTypesDev();
|
|
277356
277356
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
277357
277357
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
|
|
277358
277358
|
try {
|
|
277359
|
-
return rerenderReducer(reducer, initialArg,
|
|
277359
|
+
return rerenderReducer(reducer, initialArg, init2);
|
|
277360
277360
|
} finally {
|
|
277361
277361
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277362
277362
|
}
|
|
@@ -277462,14 +277462,14 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
277462
277462
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277463
277463
|
}
|
|
277464
277464
|
},
|
|
277465
|
-
useReducer: function(reducer, initialArg,
|
|
277465
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
277466
277466
|
currentHookNameInDev = "useReducer";
|
|
277467
277467
|
warnInvalidHookAccess();
|
|
277468
277468
|
mountHookTypesDev();
|
|
277469
277469
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
277470
277470
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
|
|
277471
277471
|
try {
|
|
277472
|
-
return mountReducer(reducer, initialArg,
|
|
277472
|
+
return mountReducer(reducer, initialArg, init2);
|
|
277473
277473
|
} finally {
|
|
277474
277474
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277475
277475
|
}
|
|
@@ -277583,14 +277583,14 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
277583
277583
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277584
277584
|
}
|
|
277585
277585
|
},
|
|
277586
|
-
useReducer: function(reducer, initialArg,
|
|
277586
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
277587
277587
|
currentHookNameInDev = "useReducer";
|
|
277588
277588
|
warnInvalidHookAccess();
|
|
277589
277589
|
updateHookTypesDev();
|
|
277590
277590
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
277591
277591
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
277592
277592
|
try {
|
|
277593
|
-
return updateReducer(reducer, initialArg,
|
|
277593
|
+
return updateReducer(reducer, initialArg, init2);
|
|
277594
277594
|
} finally {
|
|
277595
277595
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277596
277596
|
}
|
|
@@ -277704,14 +277704,14 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
277704
277704
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277705
277705
|
}
|
|
277706
277706
|
},
|
|
277707
|
-
useReducer: function(reducer, initialArg,
|
|
277707
|
+
useReducer: function(reducer, initialArg, init2) {
|
|
277708
277708
|
currentHookNameInDev = "useReducer";
|
|
277709
277709
|
warnInvalidHookAccess();
|
|
277710
277710
|
updateHookTypesDev();
|
|
277711
277711
|
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
|
277712
277712
|
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
|
|
277713
277713
|
try {
|
|
277714
|
-
return rerenderReducer(reducer, initialArg,
|
|
277714
|
+
return rerenderReducer(reducer, initialArg, init2);
|
|
277715
277715
|
} finally {
|
|
277716
277716
|
ReactCurrentDispatcher$1.current = prevDispatcher;
|
|
277717
277717
|
}
|
|
@@ -278929,9 +278929,9 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
278929
278929
|
if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
|
|
278930
278930
|
var lazyComponent = outerMemoType;
|
|
278931
278931
|
var payload = lazyComponent._payload;
|
|
278932
|
-
var
|
|
278932
|
+
var init2 = lazyComponent._init;
|
|
278933
278933
|
try {
|
|
278934
|
-
outerMemoType =
|
|
278934
|
+
outerMemoType = init2(payload);
|
|
278935
278935
|
} catch (x) {
|
|
278936
278936
|
outerMemoType = null;
|
|
278937
278937
|
}
|
|
@@ -279301,8 +279301,8 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, so
|
|
|
279301
279301
|
var props = workInProgress2.pendingProps;
|
|
279302
279302
|
var lazyComponent = elementType;
|
|
279303
279303
|
var payload = lazyComponent._payload;
|
|
279304
|
-
var
|
|
279305
|
-
var Component =
|
|
279304
|
+
var init2 = lazyComponent._init;
|
|
279305
|
+
var Component = init2(payload);
|
|
279306
279306
|
workInProgress2.type = Component;
|
|
279307
279307
|
var resolvedTag = workInProgress2.tag = resolveLazyComponentTag(Component);
|
|
279308
279308
|
var resolvedProps = resolveDefaultProps(Component, props);
|
|
@@ -292263,7 +292263,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
292263
292263
|
};
|
|
292264
292264
|
}
|
|
292265
292265
|
function arrayOf(elementType) {
|
|
292266
|
-
return
|
|
292266
|
+
return chain2(assertValueType("array"), assertEach(elementType));
|
|
292267
292267
|
}
|
|
292268
292268
|
function arrayOfType() {
|
|
292269
292269
|
return arrayOf(assertNodeType.apply(undefined, arguments));
|
|
@@ -292390,7 +292390,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
292390
292390
|
}
|
|
292391
292391
|
return validate3;
|
|
292392
292392
|
}
|
|
292393
|
-
function
|
|
292393
|
+
function chain2() {
|
|
292394
292394
|
for (var _len4 = arguments.length, fns = new Array(_len4), _key4 = 0;_key4 < _len4; _key4++) {
|
|
292395
292395
|
fns[_key4] = arguments[_key4];
|
|
292396
292396
|
}
|
|
@@ -292865,7 +292865,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
292865
292865
|
aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
|
|
292866
292866
|
fields: Object.assign({}, patternLikeCommon(), {
|
|
292867
292867
|
name: {
|
|
292868
|
-
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ?
|
|
292868
|
+
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ? chain2(assertValueType("string"), Object.assign(function(node2, key, val42) {
|
|
292869
292869
|
if (!isValidIdentifier$1(val42, false)) {
|
|
292870
292870
|
throw new TypeError('"' + val42 + '" is not a valid identifier name');
|
|
292871
292871
|
}
|
|
@@ -292953,7 +292953,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
292953
292953
|
deprecatedAlias: "NumberLiteral",
|
|
292954
292954
|
fields: {
|
|
292955
292955
|
value: {
|
|
292956
|
-
validate:
|
|
292956
|
+
validate: chain2(assertValueType("number"), Object.assign(function(node2, key, val42) {}, {
|
|
292957
292957
|
type: "number"
|
|
292958
292958
|
}))
|
|
292959
292959
|
}
|
|
@@ -292981,7 +292981,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
292981
292981
|
validate: assertValueType("string")
|
|
292982
292982
|
},
|
|
292983
292983
|
flags: {
|
|
292984
|
-
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ?
|
|
292984
|
+
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ? chain2(assertValueType("string"), Object.assign(function(node2, key, val42) {
|
|
292985
292985
|
var invalid = /[^gimsuy]/.exec(val42);
|
|
292986
292986
|
if (invalid) {
|
|
292987
292987
|
throw new TypeError('"' + invalid[0] + '" is not a valid RegExp flag');
|
|
@@ -293127,7 +293127,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
293127
293127
|
validate: assertNodeType("Expression", "PatternLike")
|
|
293128
293128
|
},
|
|
293129
293129
|
shorthand: {
|
|
293130
|
-
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ?
|
|
293130
|
+
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ? chain2(assertValueType("boolean"), Object.assign(function(node2, key, shorthand) {
|
|
293131
293131
|
if (!shorthand)
|
|
293132
293132
|
return;
|
|
293133
293133
|
if (node2.computed) {
|
|
@@ -293240,7 +293240,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
293240
293240
|
aliases: ["Statement"],
|
|
293241
293241
|
fields: {
|
|
293242
293242
|
block: {
|
|
293243
|
-
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ?
|
|
293243
|
+
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ? chain2(assertNodeType("BlockStatement"), Object.assign(function(node2) {
|
|
293244
293244
|
if (!node2.handler && !node2.finalizer) {
|
|
293245
293245
|
throw new TypeError("TryStatement expects either a handler or finalizer, or both");
|
|
293246
293246
|
}
|
|
@@ -293385,7 +293385,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
293385
293385
|
aliases: ["Pattern", "PatternLike", "LVal"],
|
|
293386
293386
|
fields: Object.assign({}, patternLikeCommon(), {
|
|
293387
293387
|
elements: {
|
|
293388
|
-
validate:
|
|
293388
|
+
validate: chain2(assertValueType("array"), assertEach(assertNodeOrValueType("null", "PatternLike", "LVal")))
|
|
293389
293389
|
}
|
|
293390
293390
|
})
|
|
293391
293391
|
});
|
|
@@ -293530,7 +293530,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
293530
293530
|
fields: Object.assign({
|
|
293531
293531
|
declaration: {
|
|
293532
293532
|
optional: true,
|
|
293533
|
-
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ?
|
|
293533
|
+
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ? chain2(assertNodeType("Declaration"), Object.assign(function(node2, key, val42) {
|
|
293534
293534
|
if (val42 && node2.specifiers.length) {
|
|
293535
293535
|
throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");
|
|
293536
293536
|
}
|
|
@@ -293694,7 +293694,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
293694
293694
|
aliases: ["Expression"],
|
|
293695
293695
|
fields: {
|
|
293696
293696
|
meta: {
|
|
293697
|
-
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ?
|
|
293697
|
+
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ? chain2(assertNodeType("Identifier"), Object.assign(function(node2, key, val42) {
|
|
293698
293698
|
var property2;
|
|
293699
293699
|
switch (val42.name) {
|
|
293700
293700
|
case "function":
|
|
@@ -293745,7 +293745,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
293745
293745
|
optional: true
|
|
293746
293746
|
},
|
|
293747
293747
|
key: {
|
|
293748
|
-
validate:
|
|
293748
|
+
validate: chain2(function() {
|
|
293749
293749
|
var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral");
|
|
293750
293750
|
var computed = assertNodeType("Expression");
|
|
293751
293751
|
return function(node2, key, val42) {
|
|
@@ -293764,7 +293764,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
293764
293764
|
default: "method"
|
|
293765
293765
|
},
|
|
293766
293766
|
access: {
|
|
293767
|
-
validate:
|
|
293767
|
+
validate: chain2(assertValueType("string"), assertOneOf("public", "private", "protected")),
|
|
293768
293768
|
optional: true
|
|
293769
293769
|
},
|
|
293770
293770
|
decorators: {
|
|
@@ -293824,7 +293824,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
293824
293824
|
builder: ["value", "tail"],
|
|
293825
293825
|
fields: {
|
|
293826
293826
|
value: {
|
|
293827
|
-
validate:
|
|
293827
|
+
validate: chain2(assertShape({
|
|
293828
293828
|
raw: {
|
|
293829
293829
|
validate: assertValueType("string")
|
|
293830
293830
|
},
|
|
@@ -293865,7 +293865,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
293865
293865
|
fields: {
|
|
293866
293866
|
quasis: validateArrayOfType("TemplateElement"),
|
|
293867
293867
|
expressions: {
|
|
293868
|
-
validate:
|
|
293868
|
+
validate: chain2(assertValueType("array"), assertEach(assertNodeType("Expression", "TSType")), function(node2, key, val42) {
|
|
293869
293869
|
if (node2.quasis.length !== val42.length + 1) {
|
|
293870
293870
|
throw new TypeError("Number of " + node2.type + ` quasis should be exactly one more than the number of expressions.
|
|
293871
293871
|
Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
@@ -293880,7 +293880,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
293880
293880
|
aliases: ["Expression", "Terminatorless"],
|
|
293881
293881
|
fields: {
|
|
293882
293882
|
delegate: {
|
|
293883
|
-
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ?
|
|
293883
|
+
validate: browser$1$1.env.BABEL_TYPES_8_BREAKING ? chain2(assertValueType("boolean"), Object.assign(function(node2, key, val42) {
|
|
293884
293884
|
if (val42 && !node2.argument) {
|
|
293885
293885
|
throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument");
|
|
293886
293886
|
}
|
|
@@ -293951,7 +293951,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
293951
293951
|
default: false
|
|
293952
293952
|
},
|
|
293953
293953
|
optional: {
|
|
293954
|
-
validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? assertValueType("boolean") :
|
|
293954
|
+
validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? assertValueType("boolean") : chain2(assertValueType("boolean"), assertOptionalChainStart())
|
|
293955
293955
|
}
|
|
293956
293956
|
}
|
|
293957
293957
|
});
|
|
@@ -293965,7 +293965,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
293965
293965
|
},
|
|
293966
293966
|
arguments: validateArrayOfType("Expression", "SpreadElement", "ArgumentPlaceholder"),
|
|
293967
293967
|
optional: {
|
|
293968
|
-
validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? assertValueType("boolean") :
|
|
293968
|
+
validate: !browser$1$1.env.BABEL_TYPES_8_BREAKING ? assertValueType("boolean") : chain2(assertValueType("boolean"), assertOptionalChainStart())
|
|
293969
293969
|
},
|
|
293970
293970
|
typeArguments: {
|
|
293971
293971
|
validate: assertNodeType("TypeParameterInstantiation"),
|
|
@@ -294019,7 +294019,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
294019
294019
|
aliases: ["Property", "Accessor"],
|
|
294020
294020
|
fields: Object.assign({}, classMethodOrPropertyCommon(), {
|
|
294021
294021
|
key: {
|
|
294022
|
-
validate:
|
|
294022
|
+
validate: chain2(function() {
|
|
294023
294023
|
var normal = assertNodeType("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "PrivateName");
|
|
294024
294024
|
var computed = assertNodeType("Expression");
|
|
294025
294025
|
return function(node2, key, val42) {
|
|
@@ -295224,7 +295224,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
295224
295224
|
fields: {
|
|
295225
295225
|
quasis: validateArrayOfType("TemplateElement"),
|
|
295226
295226
|
types: {
|
|
295227
|
-
validate:
|
|
295227
|
+
validate: chain2(assertValueType("array"), assertEach(assertNodeType("TSType")), function(node2, key, val42) {
|
|
295228
295228
|
if (node2.quasis.length !== val42.length + 1) {
|
|
295229
295229
|
throw new TypeError("Number of " + node2.type + ` quasis should be exactly one more than the number of types.
|
|
295230
295230
|
Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
@@ -295719,9 +295719,9 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
295719
295719
|
validate$5(defs.body, node2, "body", body, 1);
|
|
295720
295720
|
return node2;
|
|
295721
295721
|
}
|
|
295722
|
-
function forStatement(
|
|
295723
|
-
if (
|
|
295724
|
-
|
|
295722
|
+
function forStatement(init3, test, update2, body) {
|
|
295723
|
+
if (init3 === undefined) {
|
|
295724
|
+
init3 = null;
|
|
295725
295725
|
}
|
|
295726
295726
|
if (test === undefined) {
|
|
295727
295727
|
test = null;
|
|
@@ -295731,13 +295731,13 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
295731
295731
|
}
|
|
295732
295732
|
var node2 = {
|
|
295733
295733
|
type: "ForStatement",
|
|
295734
|
-
init:
|
|
295734
|
+
init: init3,
|
|
295735
295735
|
test,
|
|
295736
295736
|
update: update2,
|
|
295737
295737
|
body
|
|
295738
295738
|
};
|
|
295739
295739
|
var defs = NODE_FIELDS.ForStatement;
|
|
295740
|
-
validate$5(defs.init, node2, "init",
|
|
295740
|
+
validate$5(defs.init, node2, "init", init3, 1);
|
|
295741
295741
|
validate$5(defs.test, node2, "test", test, 1);
|
|
295742
295742
|
validate$5(defs.update, node2, "update", update2, 1);
|
|
295743
295743
|
validate$5(defs.body, node2, "body", body, 1);
|
|
@@ -296154,18 +296154,18 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
296154
296154
|
validate$5(defs.declarations, node2, "declarations", declarations, 1);
|
|
296155
296155
|
return node2;
|
|
296156
296156
|
}
|
|
296157
|
-
function variableDeclarator$6(id,
|
|
296158
|
-
if (
|
|
296159
|
-
|
|
296157
|
+
function variableDeclarator$6(id, init3) {
|
|
296158
|
+
if (init3 === undefined) {
|
|
296159
|
+
init3 = null;
|
|
296160
296160
|
}
|
|
296161
296161
|
var node2 = {
|
|
296162
296162
|
type: "VariableDeclarator",
|
|
296163
296163
|
id,
|
|
296164
|
-
init:
|
|
296164
|
+
init: init3
|
|
296165
296165
|
};
|
|
296166
296166
|
var defs = NODE_FIELDS.VariableDeclarator;
|
|
296167
296167
|
validate$5(defs.id, node2, "id", id, 1);
|
|
296168
|
-
validate$5(defs.init, node2, "init",
|
|
296168
|
+
validate$5(defs.init, node2, "init", init3, 1);
|
|
296169
296169
|
return node2;
|
|
296170
296170
|
}
|
|
296171
296171
|
function whileStatement(test, body) {
|
|
@@ -297441,26 +297441,26 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
297441
297441
|
validate$5(defs.id, node2, "id", id, 1);
|
|
297442
297442
|
return node2;
|
|
297443
297443
|
}
|
|
297444
|
-
function enumNumberMember(id,
|
|
297444
|
+
function enumNumberMember(id, init3) {
|
|
297445
297445
|
var node2 = {
|
|
297446
297446
|
type: "EnumNumberMember",
|
|
297447
297447
|
id,
|
|
297448
|
-
init:
|
|
297448
|
+
init: init3
|
|
297449
297449
|
};
|
|
297450
297450
|
var defs = NODE_FIELDS.EnumNumberMember;
|
|
297451
297451
|
validate$5(defs.id, node2, "id", id, 1);
|
|
297452
|
-
validate$5(defs.init, node2, "init",
|
|
297452
|
+
validate$5(defs.init, node2, "init", init3, 1);
|
|
297453
297453
|
return node2;
|
|
297454
297454
|
}
|
|
297455
|
-
function enumStringMember(id,
|
|
297455
|
+
function enumStringMember(id, init3) {
|
|
297456
297456
|
var node2 = {
|
|
297457
297457
|
type: "EnumStringMember",
|
|
297458
297458
|
id,
|
|
297459
|
-
init:
|
|
297459
|
+
init: init3
|
|
297460
297460
|
};
|
|
297461
297461
|
var defs = NODE_FIELDS.EnumStringMember;
|
|
297462
297462
|
validate$5(defs.id, node2, "id", id, 1);
|
|
297463
|
-
validate$5(defs.init, node2, "init",
|
|
297463
|
+
validate$5(defs.init, node2, "init", init3, 1);
|
|
297464
297464
|
return node2;
|
|
297465
297465
|
}
|
|
297466
297466
|
function enumDefaultedMember(id) {
|
|
@@ -302962,9 +302962,9 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
302962
302962
|
node2.type = node2.type.substring(8);
|
|
302963
302963
|
}
|
|
302964
302964
|
if (state.stop) {
|
|
302965
|
-
var
|
|
302966
|
-
|
|
302967
|
-
return this.finishNode(
|
|
302965
|
+
var chain3 = this.startNodeAtNode(node2);
|
|
302966
|
+
chain3.expression = node2;
|
|
302967
|
+
return this.finishNode(chain3, "ChainExpression");
|
|
302968
302968
|
}
|
|
302969
302969
|
} else if (node2.type === "MemberExpression" || node2.type === "CallExpression") {
|
|
302970
302970
|
node2.optional = false;
|
|
@@ -308144,13 +308144,13 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
308144
308144
|
_proto.flowEnumMemberRaw = function flowEnumMemberRaw() {
|
|
308145
308145
|
var loc = this.state.startLoc;
|
|
308146
308146
|
var id = this.parseIdentifier(true);
|
|
308147
|
-
var
|
|
308147
|
+
var init3 = this.eat(29) ? this.flowEnumMemberInit() : {
|
|
308148
308148
|
type: "none",
|
|
308149
308149
|
loc
|
|
308150
308150
|
};
|
|
308151
308151
|
return {
|
|
308152
308152
|
id,
|
|
308153
|
-
init:
|
|
308153
|
+
init: init3
|
|
308154
308154
|
};
|
|
308155
308155
|
};
|
|
308156
308156
|
_proto.flowEnumCheckExplicitTypeMismatch = function flowEnumCheckExplicitTypeMismatch(loc, context, expectedType) {
|
|
@@ -308178,7 +308178,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
308178
308178
|
break;
|
|
308179
308179
|
}
|
|
308180
308180
|
var memberNode = this.startNode();
|
|
308181
|
-
var _this$flowEnumMemberR = this.flowEnumMemberRaw(), id = _this$flowEnumMemberR.id,
|
|
308181
|
+
var _this$flowEnumMemberR = this.flowEnumMemberRaw(), id = _this$flowEnumMemberR.id, init3 = _this$flowEnumMemberR.init;
|
|
308182
308182
|
var memberName = id.name;
|
|
308183
308183
|
if (memberName === "") {
|
|
308184
308184
|
continue;
|
|
@@ -308203,35 +308203,35 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
308203
308203
|
memberName
|
|
308204
308204
|
};
|
|
308205
308205
|
memberNode.id = id;
|
|
308206
|
-
switch (
|
|
308206
|
+
switch (init3.type) {
|
|
308207
308207
|
case "boolean": {
|
|
308208
|
-
this.flowEnumCheckExplicitTypeMismatch(
|
|
308209
|
-
memberNode.init =
|
|
308208
|
+
this.flowEnumCheckExplicitTypeMismatch(init3.loc, context, "boolean");
|
|
308209
|
+
memberNode.init = init3.value;
|
|
308210
308210
|
members.booleanMembers.push(this.finishNode(memberNode, "EnumBooleanMember"));
|
|
308211
308211
|
break;
|
|
308212
308212
|
}
|
|
308213
308213
|
case "number": {
|
|
308214
|
-
this.flowEnumCheckExplicitTypeMismatch(
|
|
308215
|
-
memberNode.init =
|
|
308214
|
+
this.flowEnumCheckExplicitTypeMismatch(init3.loc, context, "number");
|
|
308215
|
+
memberNode.init = init3.value;
|
|
308216
308216
|
members.numberMembers.push(this.finishNode(memberNode, "EnumNumberMember"));
|
|
308217
308217
|
break;
|
|
308218
308218
|
}
|
|
308219
308219
|
case "string": {
|
|
308220
|
-
this.flowEnumCheckExplicitTypeMismatch(
|
|
308221
|
-
memberNode.init =
|
|
308220
|
+
this.flowEnumCheckExplicitTypeMismatch(init3.loc, context, "string");
|
|
308221
|
+
memberNode.init = init3.value;
|
|
308222
308222
|
members.stringMembers.push(this.finishNode(memberNode, "EnumStringMember"));
|
|
308223
308223
|
break;
|
|
308224
308224
|
}
|
|
308225
308225
|
case "invalid": {
|
|
308226
|
-
throw this.flowEnumErrorInvalidMemberInitializer(
|
|
308226
|
+
throw this.flowEnumErrorInvalidMemberInitializer(init3.loc, context);
|
|
308227
308227
|
}
|
|
308228
308228
|
case "none": {
|
|
308229
308229
|
switch (explicitType) {
|
|
308230
308230
|
case "boolean":
|
|
308231
|
-
this.flowEnumErrorBooleanMemberNotInitialized(
|
|
308231
|
+
this.flowEnumErrorBooleanMemberNotInitialized(init3.loc, context);
|
|
308232
308232
|
break;
|
|
308233
308233
|
case "number":
|
|
308234
|
-
this.flowEnumErrorNumberMemberNotInitialized(
|
|
308234
|
+
this.flowEnumErrorNumberMemberNotInitialized(init3.loc, context);
|
|
308235
308235
|
break;
|
|
308236
308236
|
default:
|
|
308237
308237
|
members.defaultedMembers.push(this.finishNode(memberNode, "EnumDefaultedMember"));
|
|
@@ -311554,13 +311554,13 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
311554
311554
|
if (!isAmbientContext)
|
|
311555
311555
|
return declaration;
|
|
311556
311556
|
for (var _i6 = 0, _declaration$declarat2 = declaration.declarations;_i6 < _declaration$declarat2.length; _i6++) {
|
|
311557
|
-
var _declaration$declarat3 = _declaration$declarat2[_i6], id = _declaration$declarat3.id,
|
|
311558
|
-
if (!
|
|
311557
|
+
var _declaration$declarat3 = _declaration$declarat2[_i6], id = _declaration$declarat3.id, init3 = _declaration$declarat3.init;
|
|
311558
|
+
if (!init3)
|
|
311559
311559
|
continue;
|
|
311560
311560
|
if (kind !== "const" || !!id.typeAnnotation) {
|
|
311561
|
-
this.raise(TSErrors.InitializerNotAllowedInAmbientContext,
|
|
311562
|
-
} else if (!isValidAmbientConstInitializer(
|
|
311563
|
-
this.raise(TSErrors.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,
|
|
311561
|
+
this.raise(TSErrors.InitializerNotAllowedInAmbientContext, init3);
|
|
311562
|
+
} else if (!isValidAmbientConstInitializer(init3, this.hasPlugin("estree"))) {
|
|
311563
|
+
this.raise(TSErrors.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference, init3);
|
|
311564
311564
|
}
|
|
311565
311565
|
}
|
|
311566
311566
|
return declaration;
|
|
@@ -315039,31 +315039,31 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
315039
315039
|
}
|
|
315040
315040
|
var startsWithAsync = this.isContextual(95);
|
|
315041
315041
|
var refExpressionErrors = new ExpressionErrors;
|
|
315042
|
-
var
|
|
315042
|
+
var init3 = this.parseExpression(true, refExpressionErrors);
|
|
315043
315043
|
var isForOf = this.isContextual(102);
|
|
315044
315044
|
if (isForOf) {
|
|
315045
315045
|
if (startsWithLet) {
|
|
315046
|
-
this.raise(Errors.ForOfLet,
|
|
315046
|
+
this.raise(Errors.ForOfLet, init3);
|
|
315047
315047
|
}
|
|
315048
|
-
if (awaitAt === null && startsWithAsync &&
|
|
315049
|
-
this.raise(Errors.ForOfAsync,
|
|
315048
|
+
if (awaitAt === null && startsWithAsync && init3.type === "Identifier") {
|
|
315049
|
+
this.raise(Errors.ForOfAsync, init3);
|
|
315050
315050
|
}
|
|
315051
315051
|
}
|
|
315052
315052
|
if (isForOf || this.match(58)) {
|
|
315053
315053
|
this.checkDestructuringPrivate(refExpressionErrors);
|
|
315054
|
-
this.toAssignable(
|
|
315054
|
+
this.toAssignable(init3, true);
|
|
315055
315055
|
var type2 = isForOf ? "ForOfStatement" : "ForInStatement";
|
|
315056
|
-
this.checkLVal(
|
|
315056
|
+
this.checkLVal(init3, {
|
|
315057
315057
|
type: type2
|
|
315058
315058
|
});
|
|
315059
|
-
return this.parseForIn(node2,
|
|
315059
|
+
return this.parseForIn(node2, init3, awaitAt);
|
|
315060
315060
|
} else {
|
|
315061
315061
|
this.checkExpressionErrors(refExpressionErrors, true);
|
|
315062
315062
|
}
|
|
315063
315063
|
if (awaitAt !== null) {
|
|
315064
315064
|
this.unexpected(awaitAt);
|
|
315065
315065
|
}
|
|
315066
|
-
return this.parseFor(node2,
|
|
315066
|
+
return this.parseFor(node2, init3);
|
|
315067
315067
|
};
|
|
315068
315068
|
_proto.parseFunctionStatement = function parseFunctionStatement(node2, isAsync3, isHangingDeclaration) {
|
|
315069
315069
|
this.next();
|
|
@@ -315301,9 +315301,9 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
315301
315301
|
}
|
|
315302
315302
|
this.next();
|
|
315303
315303
|
};
|
|
315304
|
-
_proto.parseFor = function parseFor(node2,
|
|
315304
|
+
_proto.parseFor = function parseFor(node2, init3) {
|
|
315305
315305
|
var _this5 = this;
|
|
315306
|
-
node2.init =
|
|
315306
|
+
node2.init = init3;
|
|
315307
315307
|
this.semicolon(false);
|
|
315308
315308
|
node2.test = this.match(13) ? null : this.parseExpression();
|
|
315309
315309
|
this.semicolon(false);
|
|
@@ -315316,7 +315316,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
315316
315316
|
this.state.labels.pop();
|
|
315317
315317
|
return this.finishNode(node2, "ForStatement");
|
|
315318
315318
|
};
|
|
315319
|
-
_proto.parseForIn = function parseForIn(node2,
|
|
315319
|
+
_proto.parseForIn = function parseForIn(node2, init3, awaitAt) {
|
|
315320
315320
|
var _this6 = this;
|
|
315321
315321
|
var isForIn = this.match(58);
|
|
315322
315322
|
this.next();
|
|
@@ -315326,19 +315326,19 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
315326
315326
|
} else {
|
|
315327
315327
|
node2["await"] = awaitAt !== null;
|
|
315328
315328
|
}
|
|
315329
|
-
if (
|
|
315330
|
-
this.raise(Errors.ForInOfLoopInitializer,
|
|
315329
|
+
if (init3.type === "VariableDeclaration" && init3.declarations[0].init != null && (!isForIn || !this.options.annexB || this.state.strict || init3.kind !== "var" || init3.declarations[0].id.type !== "Identifier")) {
|
|
315330
|
+
this.raise(Errors.ForInOfLoopInitializer, init3, {
|
|
315331
315331
|
type: isForIn ? "ForInStatement" : "ForOfStatement"
|
|
315332
315332
|
});
|
|
315333
315333
|
}
|
|
315334
|
-
if (
|
|
315335
|
-
this.raise(Errors.InvalidLhs,
|
|
315334
|
+
if (init3.type === "AssignmentPattern") {
|
|
315335
|
+
this.raise(Errors.InvalidLhs, init3, {
|
|
315336
315336
|
ancestor: {
|
|
315337
315337
|
type: "ForStatement"
|
|
315338
315338
|
}
|
|
315339
315339
|
});
|
|
315340
315340
|
}
|
|
315341
|
-
node2.left =
|
|
315341
|
+
node2.left = init3;
|
|
315342
315342
|
node2.right = isForIn ? this.parseExpression() : this.parseMaybeAssignAllowIn();
|
|
315343
315343
|
this.expect(11);
|
|
315344
315344
|
node2.body = this.withSmartMixTopicForbiddingContext(function() {
|
|
@@ -321909,8 +321909,8 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
321909
321909
|
if (path17.isSwitchStatement()) {
|
|
321910
321910
|
path17 = (this.getFunctionParent() || this.getProgramParent()).path;
|
|
321911
321911
|
}
|
|
321912
|
-
var { init:
|
|
321913
|
-
if (!
|
|
321912
|
+
var { init: init3, unique, kind: _opts$kind } = opts, kind = _opts$kind === undefined ? "var" : _opts$kind, id = opts.id;
|
|
321913
|
+
if (!init3 && !unique && (kind === "var" || kind === "let") && path17.isFunction() && !path17.node.name && isCallExpression$6(path17.parent, {
|
|
321914
321914
|
callee: path17.node
|
|
321915
321915
|
}) && path17.parent.arguments.length <= path17.node.params.length && isIdentifier$b(id)) {
|
|
321916
321916
|
path17.pushContainer("params", id);
|
|
@@ -321933,7 +321933,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
321933
321933
|
if (!unique)
|
|
321934
321934
|
path17.setData(dataKey, declarPath);
|
|
321935
321935
|
}
|
|
321936
|
-
var declarator = variableDeclarator$5(id,
|
|
321936
|
+
var declarator = variableDeclarator$5(id, init3);
|
|
321937
321937
|
var len = declarPath.node.declarations.push(declarator);
|
|
321938
321938
|
path17.scope.registerBinding(kind, declarPath.get("declarations")[len - 1]);
|
|
321939
321939
|
};
|
|
@@ -322096,13 +322096,13 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
322096
322096
|
continue;
|
|
322097
322097
|
seen.add(_path3.parent);
|
|
322098
322098
|
var firstId = undefined;
|
|
322099
|
-
var
|
|
322099
|
+
var init3 = [];
|
|
322100
322100
|
for (var _iterator18 = _createForOfIteratorHelperLoose(parent.declarations), _step18;!(_step18 = _iterator18()).done; ) {
|
|
322101
322101
|
var _firstId;
|
|
322102
322102
|
var decl = _step18.value;
|
|
322103
322103
|
(_firstId = firstId) != null || (firstId = decl.id);
|
|
322104
322104
|
if (decl.init) {
|
|
322105
|
-
|
|
322105
|
+
init3.push(assignmentExpression$7("=", decl.id, decl.init));
|
|
322106
322106
|
}
|
|
322107
322107
|
var ids = Object.keys(getBindingIdentifiers$3(decl, false, true, true));
|
|
322108
322108
|
for (var _i8 = 0, _ids = ids;_i8 < _ids.length; _i8++) {
|
|
@@ -322114,10 +322114,10 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
322114
322114
|
left: parent
|
|
322115
322115
|
})) {
|
|
322116
322116
|
parentPath.replaceWith(firstId);
|
|
322117
|
-
} else if (
|
|
322117
|
+
} else if (init3.length === 0) {
|
|
322118
322118
|
parentPath.remove();
|
|
322119
322119
|
} else {
|
|
322120
|
-
var expr =
|
|
322120
|
+
var expr = init3.length === 1 ? init3[0] : sequenceExpression$5(init3);
|
|
322121
322121
|
if (parentPath.parentPath.isForStatement({
|
|
322122
322122
|
init: parent
|
|
322123
322123
|
})) {
|
|
@@ -322299,7 +322299,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
322299
322299
|
var revLookup = [];
|
|
322300
322300
|
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
322301
322301
|
var inited = false;
|
|
322302
|
-
function
|
|
322302
|
+
function init2() {
|
|
322303
322303
|
inited = true;
|
|
322304
322304
|
var code2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
322305
322305
|
for (var i = 0, len = code2.length;i < len; ++i) {
|
|
@@ -322311,7 +322311,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
322311
322311
|
}
|
|
322312
322312
|
function toByteArray(b64) {
|
|
322313
322313
|
if (!inited) {
|
|
322314
|
-
|
|
322314
|
+
init2();
|
|
322315
322315
|
}
|
|
322316
322316
|
var i, j, l, tmp, placeHolders, arr;
|
|
322317
322317
|
var len = b64.length;
|
|
@@ -322352,7 +322352,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
322352
322352
|
}
|
|
322353
322353
|
function fromByteArray(uint8) {
|
|
322354
322354
|
if (!inited) {
|
|
322355
|
-
|
|
322355
|
+
init2();
|
|
322356
322356
|
}
|
|
322357
322357
|
var tmp;
|
|
322358
322358
|
var len = uint8.length;
|
|
@@ -332202,7 +332202,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
332202
332202
|
return arrowFunctionExpression$1(argsList, fnBody);
|
|
332203
332203
|
});
|
|
332204
332204
|
}
|
|
332205
|
-
function getBinding(thisEnvFn, key,
|
|
332205
|
+
function getBinding(thisEnvFn, key, init3) {
|
|
332206
332206
|
var cacheKey = "binding:" + key;
|
|
332207
332207
|
var data2 = thisEnvFn.getData(cacheKey);
|
|
332208
332208
|
if (!data2) {
|
|
@@ -332211,7 +332211,7 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
332211
332211
|
thisEnvFn.setData(cacheKey, data2);
|
|
332212
332212
|
thisEnvFn.scope.push({
|
|
332213
332213
|
id,
|
|
332214
|
-
init:
|
|
332214
|
+
init: init3(data2)
|
|
332215
332215
|
});
|
|
332216
332216
|
}
|
|
332217
332217
|
return data2;
|
|
@@ -336582,16 +336582,16 @@ Expected ` + (val42.length + 1) + " quasis but got " + node2.quasis.length);
|
|
|
336582
336582
|
for (var _iterator5 = _createForOfIteratorHelperLoose(path17.get("declarations")), _step5;!(_step5 = _iterator5()).done; ) {
|
|
336583
336583
|
var decl = _step5.value;
|
|
336584
336584
|
var id = decl.node.id;
|
|
336585
|
-
var
|
|
336586
|
-
if (isIdentifier$e(id) && exported.has(id.name) && !isArrowFunctionExpression(
|
|
336587
|
-
if (!
|
|
336585
|
+
var init3 = decl.node.init;
|
|
336586
|
+
if (isIdentifier$e(id) && exported.has(id.name) && !isArrowFunctionExpression(init3) && (!isFunctionExpression(init3) || init3.id) && (!isClassExpression(init3) || init3.id)) {
|
|
336587
|
+
if (!init3) {
|
|
336588
336588
|
if (isVar2) {
|
|
336589
336589
|
continue;
|
|
336590
336590
|
} else {
|
|
336591
|
-
|
|
336591
|
+
init3 = path17.scope.buildUndefinedNode();
|
|
336592
336592
|
}
|
|
336593
336593
|
}
|
|
336594
|
-
decl.node.init = buildBindingExportAssignmentExpression(metadata, exported.get(id.name),
|
|
336594
|
+
decl.node.init = buildBindingExportAssignmentExpression(metadata, exported.get(id.name), init3, path17.scope);
|
|
336595
336595
|
requeueInParent(decl.get("init"));
|
|
336596
336596
|
} else {
|
|
336597
336597
|
for (var _i2 = 0, _Object$keys = Object.keys(decl.getOuterBindingIdentifiers());_i2 < _Object$keys.length; _i2++) {
|
|
@@ -347865,24 +347865,24 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
347865
347865
|
var _marked$6 = _regeneratorRuntime().mark(buildPresetChain), _marked2$4 = _regeneratorRuntime().mark(buildRootChain), _marked3$1 = _regeneratorRuntime().mark(loadFileChain), _marked4 = _regeneratorRuntime().mark(mergeExtendsChain);
|
|
347866
347866
|
var debug$1 = browserExports("babel:config:config-chain");
|
|
347867
347867
|
function buildPresetChain(arg, context) {
|
|
347868
|
-
var
|
|
347868
|
+
var chain3;
|
|
347869
347869
|
return _regeneratorRuntime().wrap(function buildPresetChain$(_context) {
|
|
347870
347870
|
while (true)
|
|
347871
347871
|
switch (_context.prev = _context.next) {
|
|
347872
347872
|
case 0:
|
|
347873
347873
|
return _context.delegateYield(buildPresetChainWalker(arg, context), "t0", 1);
|
|
347874
347874
|
case 1:
|
|
347875
|
-
|
|
347876
|
-
if (
|
|
347875
|
+
chain3 = _context.t0;
|
|
347876
|
+
if (chain3) {
|
|
347877
347877
|
_context.next = 4;
|
|
347878
347878
|
break;
|
|
347879
347879
|
}
|
|
347880
347880
|
return _context.abrupt("return", null);
|
|
347881
347881
|
case 4:
|
|
347882
347882
|
return _context.abrupt("return", {
|
|
347883
|
-
plugins: dedupDescriptors(
|
|
347884
|
-
presets: dedupDescriptors(
|
|
347885
|
-
options:
|
|
347883
|
+
plugins: dedupDescriptors(chain3.plugins),
|
|
347884
|
+
presets: dedupDescriptors(chain3.presets),
|
|
347885
|
+
options: chain3.options.map(function(o) {
|
|
347886
347886
|
return normalizeOptions$7(o);
|
|
347887
347887
|
}),
|
|
347888
347888
|
files: new Set
|
|
@@ -347931,7 +347931,7 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
347931
347931
|
});
|
|
347932
347932
|
});
|
|
347933
347933
|
function buildRootChain(opts, context) {
|
|
347934
|
-
var configReport, babelRcReport, programmaticLogger, programmaticChain, programmaticReport, configFile, babelrc, babelrcRoots, babelrcRootsDirectory, configFileChain, configFileLogger, validatedFile, result, ignoreFile, babelrcFile, isIgnored, fileChain, pkgData, _yield$findRelativeCo, _validatedFile, babelrcLogger, _result,
|
|
347934
|
+
var configReport, babelRcReport, programmaticLogger, programmaticChain, programmaticReport, configFile, babelrc, babelrcRoots, babelrcRootsDirectory, configFileChain, configFileLogger, validatedFile, result, ignoreFile, babelrcFile, isIgnored, fileChain, pkgData, _yield$findRelativeCo, _validatedFile, babelrcLogger, _result, chain3;
|
|
347935
347935
|
return _regeneratorRuntime().wrap(function buildRootChain$(_context2) {
|
|
347936
347936
|
while (true)
|
|
347937
347937
|
switch (_context2.prev = _context2.next) {
|
|
@@ -348059,18 +348059,18 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
348059
348059
|
`) + `
|
|
348060
348060
|
-----End Babel configs-----`);
|
|
348061
348061
|
}
|
|
348062
|
-
|
|
348062
|
+
chain3 = mergeChain(mergeChain(mergeChain(emptyChain(), configFileChain), fileChain), programmaticChain);
|
|
348063
348063
|
return _context2.abrupt("return", {
|
|
348064
|
-
plugins: isIgnored ? [] : dedupDescriptors(
|
|
348065
|
-
presets: isIgnored ? [] : dedupDescriptors(
|
|
348066
|
-
options: isIgnored ? [] :
|
|
348064
|
+
plugins: isIgnored ? [] : dedupDescriptors(chain3.plugins),
|
|
348065
|
+
presets: isIgnored ? [] : dedupDescriptors(chain3.presets),
|
|
348066
|
+
options: isIgnored ? [] : chain3.options.map(function(o) {
|
|
348067
348067
|
return normalizeOptions$7(o);
|
|
348068
348068
|
}),
|
|
348069
348069
|
fileHandling: isIgnored ? "ignored" : "transpile",
|
|
348070
348070
|
ignore: ignoreFile || undefined,
|
|
348071
348071
|
babelrc: babelrcFile || undefined,
|
|
348072
348072
|
config: configFile || undefined,
|
|
348073
|
-
files:
|
|
348073
|
+
files: chain3.files
|
|
348074
348074
|
});
|
|
348075
348075
|
case 58:
|
|
348076
348076
|
case "end":
|
|
@@ -348160,16 +348160,16 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
348160
348160
|
}
|
|
348161
348161
|
});
|
|
348162
348162
|
function loadFileChain(input, context, files, baseLogger) {
|
|
348163
|
-
var
|
|
348163
|
+
var chain3;
|
|
348164
348164
|
return _regeneratorRuntime().wrap(function loadFileChain$(_context3) {
|
|
348165
348165
|
while (true)
|
|
348166
348166
|
switch (_context3.prev = _context3.next) {
|
|
348167
348167
|
case 0:
|
|
348168
348168
|
return _context3.delegateYield(loadFileChainWalker(input, context, files, baseLogger), "t0", 1);
|
|
348169
348169
|
case 1:
|
|
348170
|
-
|
|
348171
|
-
|
|
348172
|
-
return _context3.abrupt("return",
|
|
348170
|
+
chain3 = _context3.t0;
|
|
348171
|
+
chain3 == null || chain3.files.add(input.filepath);
|
|
348172
|
+
return _context3.abrupt("return", chain3);
|
|
348173
348173
|
case 4:
|
|
348174
348174
|
case "end":
|
|
348175
348175
|
return _context3.stop();
|
|
@@ -348247,7 +348247,7 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
348247
348247
|
files = new Set;
|
|
348248
348248
|
}
|
|
348249
348249
|
return _regeneratorRuntime().mark(function _callee() {
|
|
348250
|
-
var dirname8, flattenedConfigs, rootOpts, envOpts,
|
|
348250
|
+
var dirname8, flattenedConfigs, rootOpts, envOpts, chain3, logger, _i2, _flattenedConfigs, _flattenedConfigs$_i, config2, index2, envName;
|
|
348251
348251
|
return _regeneratorRuntime().wrap(function _callee$(_context4) {
|
|
348252
348252
|
while (true)
|
|
348253
348253
|
switch (_context4.prev = _context4.next) {
|
|
@@ -348297,7 +348297,7 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
348297
348297
|
}
|
|
348298
348298
|
return _context4.abrupt("return", null);
|
|
348299
348299
|
case 6:
|
|
348300
|
-
|
|
348300
|
+
chain3 = emptyChain();
|
|
348301
348301
|
logger = createLogger(input, context, baseLogger);
|
|
348302
348302
|
_i2 = 0, _flattenedConfigs = flattenedConfigs;
|
|
348303
348303
|
case 9:
|
|
@@ -348306,7 +348306,7 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
348306
348306
|
break;
|
|
348307
348307
|
}
|
|
348308
348308
|
_flattenedConfigs$_i = _flattenedConfigs[_i2], config2 = _flattenedConfigs$_i.config, index2 = _flattenedConfigs$_i.index, envName = _flattenedConfigs$_i.envName;
|
|
348309
|
-
return _context4.delegateYield(mergeExtendsChain(
|
|
348309
|
+
return _context4.delegateYield(mergeExtendsChain(chain3, config2.options, dirname8, context, files, baseLogger), "t0", 12);
|
|
348310
348310
|
case 12:
|
|
348311
348311
|
if (_context4.t0) {
|
|
348312
348312
|
_context4.next = 14;
|
|
@@ -348315,13 +348315,13 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
348315
348315
|
return _context4.abrupt("return", null);
|
|
348316
348316
|
case 14:
|
|
348317
348317
|
logger(config2, index2, envName);
|
|
348318
|
-
return _context4.delegateYield(mergeChainOpts(
|
|
348318
|
+
return _context4.delegateYield(mergeChainOpts(chain3, config2), "t1", 16);
|
|
348319
348319
|
case 16:
|
|
348320
348320
|
_i2++;
|
|
348321
348321
|
_context4.next = 9;
|
|
348322
348322
|
break;
|
|
348323
348323
|
case 19:
|
|
348324
|
-
return _context4.abrupt("return",
|
|
348324
|
+
return _context4.abrupt("return", chain3);
|
|
348325
348325
|
case 20:
|
|
348326
348326
|
case "end":
|
|
348327
348327
|
return _context4.stop();
|
|
@@ -348330,7 +348330,7 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
348330
348330
|
})();
|
|
348331
348331
|
};
|
|
348332
348332
|
}
|
|
348333
|
-
function mergeExtendsChain(
|
|
348333
|
+
function mergeExtendsChain(chain3, opts, dirname8, context, files, baseLogger) {
|
|
348334
348334
|
var file2, fileChain;
|
|
348335
348335
|
return _regeneratorRuntime().wrap(function mergeExtendsChain$(_context5) {
|
|
348336
348336
|
while (true)
|
|
@@ -348367,7 +348367,7 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
348367
348367
|
}
|
|
348368
348368
|
return _context5.abrupt("return", false);
|
|
348369
348369
|
case 12:
|
|
348370
|
-
mergeChain(
|
|
348370
|
+
mergeChain(chain3, fileChain);
|
|
348371
348371
|
return _context5.abrupt("return", true);
|
|
348372
348372
|
case 14:
|
|
348373
348373
|
case "end":
|
|
@@ -349201,9 +349201,9 @@ getting parsed as 6.1, which can lead to unexpected behavior.
|
|
|
349201
349201
|
options,
|
|
349202
349202
|
dirname: dirname8
|
|
349203
349203
|
};
|
|
349204
|
-
return _context6.delegateYield(forwardAsync(loadPluginDescriptor, function(
|
|
349204
|
+
return _context6.delegateYield(forwardAsync(loadPluginDescriptor, function(run3) {
|
|
349205
349205
|
return cache2.invalidate(function(data2) {
|
|
349206
|
-
return
|
|
349206
|
+
return run3(inheritsDescriptor, data2);
|
|
349207
349207
|
});
|
|
349208
349208
|
}), "t0", 6);
|
|
349209
349209
|
case 6:
|
|
@@ -352325,9 +352325,9 @@ Consider renaming the file to '.mjs', or setting sourceType:module ` + "or sourc
|
|
|
352325
352325
|
if (prop2.isClassPrivateMethod()) {
|
|
352326
352326
|
if (prop2.node.kind === "get") {
|
|
352327
352327
|
var body = prop2.node.body.body;
|
|
352328
|
-
var $ = undefined;
|
|
352329
|
-
if (body.length === 1 && isReturnStatement($ = body[0]) && isCallExpression$8($ =
|
|
352330
|
-
update2.getId = cloneNode$e($);
|
|
352328
|
+
var $2 = undefined;
|
|
352329
|
+
if (body.length === 1 && isReturnStatement($2 = body[0]) && isCallExpression$8($2 = $2.argument) && $2.arguments.length === 1 && isThisExpression$2($2.arguments[0]) && isIdentifier$e($2 = $2.callee)) {
|
|
352330
|
+
update2.getId = cloneNode$e($2);
|
|
352331
352331
|
update2.getterDeclared = true;
|
|
352332
352332
|
} else {
|
|
352333
352333
|
update2.getId = prop2.scope.generateUidIdentifier("get_" + name2);
|
|
@@ -352361,22 +352361,22 @@ Consider renaming the file to '.mjs', or setting sourceType:module ` + "or sourc
|
|
|
352361
352361
|
var isStatic2 = value2["static"], isMethod2 = value2.method, getId = value2.getId, setId = value2.setId;
|
|
352362
352362
|
var isGetterOrSetter = getId || setId;
|
|
352363
352363
|
var id = cloneNode$e(value2.id);
|
|
352364
|
-
var
|
|
352364
|
+
var init3 = undefined;
|
|
352365
352365
|
if (privateFieldsAsProperties) {
|
|
352366
|
-
|
|
352366
|
+
init3 = callExpression$c(state.addHelper("classPrivateFieldLooseKey"), [stringLiteral$6(name2)]);
|
|
352367
352367
|
} else if (privateFieldsAsSymbols) {
|
|
352368
|
-
|
|
352368
|
+
init3 = callExpression$c(identifier$d("Symbol"), [stringLiteral$6(name2)]);
|
|
352369
352369
|
} else if (!isStatic2) {
|
|
352370
352370
|
if (injectedIds.has(id.name))
|
|
352371
352371
|
continue;
|
|
352372
352372
|
injectedIds.add(id.name);
|
|
352373
|
-
|
|
352373
|
+
init3 = newExpression(identifier$d(isMethod2 && (!isGetterOrSetter || newHelpers(state)) ? "WeakSet" : "WeakMap"), []);
|
|
352374
352374
|
}
|
|
352375
|
-
if (
|
|
352375
|
+
if (init3) {
|
|
352376
352376
|
if (!privateFieldsAsSymbols) {
|
|
352377
|
-
annotateAsPure(
|
|
352377
|
+
annotateAsPure(init3);
|
|
352378
352378
|
}
|
|
352379
|
-
initNodes.push(template$2.statement.ast(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["var ", " = ", ""])), id,
|
|
352379
|
+
initNodes.push(template$2.statement.ast(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["var ", " = ", ""])), id, init3));
|
|
352380
352380
|
}
|
|
352381
352381
|
}
|
|
352382
352382
|
return initNodes;
|
|
@@ -355411,40 +355411,40 @@ If you are using ` + '["@babel/plugin-proposal-decorators", { "version": "legacy
|
|
|
355411
355411
|
_proto.getExtendsHelper = function getExtendsHelper() {
|
|
355412
355412
|
return this.useBuiltIns ? memberExpression$9(identifier$d("Object"), identifier$d("assign")) : this.addHelper("extends");
|
|
355413
355413
|
};
|
|
355414
|
-
_proto.buildVariableAssignment = function buildVariableAssignment(id,
|
|
355414
|
+
_proto.buildVariableAssignment = function buildVariableAssignment(id, init3) {
|
|
355415
355415
|
var op = this.operator;
|
|
355416
355416
|
if (isMemberExpression$7(id) || isOptionalMemberExpression$3(id))
|
|
355417
355417
|
op = "=";
|
|
355418
355418
|
var node2;
|
|
355419
355419
|
if (op) {
|
|
355420
|
-
node2 = expressionStatement$7(assignmentExpression$8(op, id, cloneNode$e(
|
|
355420
|
+
node2 = expressionStatement$7(assignmentExpression$8(op, id, cloneNode$e(init3) || this.scope.buildUndefinedNode()));
|
|
355421
355421
|
} else {
|
|
355422
355422
|
var nodeInit;
|
|
355423
|
-
if ((this.kind === "const" || this.kind === "using") &&
|
|
355423
|
+
if ((this.kind === "const" || this.kind === "using") && init3 === null) {
|
|
355424
355424
|
nodeInit = this.scope.buildUndefinedNode();
|
|
355425
355425
|
} else {
|
|
355426
|
-
nodeInit = cloneNode$e(
|
|
355426
|
+
nodeInit = cloneNode$e(init3);
|
|
355427
355427
|
}
|
|
355428
355428
|
node2 = variableDeclaration$6(this.kind, [variableDeclarator$6(id, nodeInit)]);
|
|
355429
355429
|
}
|
|
355430
355430
|
node2._blockHoist = this.blockHoist;
|
|
355431
355431
|
return node2;
|
|
355432
355432
|
};
|
|
355433
|
-
_proto.buildVariableDeclaration = function buildVariableDeclaration(id,
|
|
355434
|
-
var declar = variableDeclaration$6("var", [variableDeclarator$6(cloneNode$e(id), cloneNode$e(
|
|
355433
|
+
_proto.buildVariableDeclaration = function buildVariableDeclaration(id, init3) {
|
|
355434
|
+
var declar = variableDeclaration$6("var", [variableDeclarator$6(cloneNode$e(id), cloneNode$e(init3))]);
|
|
355435
355435
|
declar._blockHoist = this.blockHoist;
|
|
355436
355436
|
return declar;
|
|
355437
355437
|
};
|
|
355438
355438
|
_proto.push = function push(id, _init) {
|
|
355439
|
-
var
|
|
355439
|
+
var init3 = cloneNode$e(_init);
|
|
355440
355440
|
if (isObjectPattern$1(id)) {
|
|
355441
|
-
this.pushObjectPattern(id,
|
|
355441
|
+
this.pushObjectPattern(id, init3);
|
|
355442
355442
|
} else if (isArrayPattern(id)) {
|
|
355443
|
-
this.pushArrayPattern(id,
|
|
355443
|
+
this.pushArrayPattern(id, init3);
|
|
355444
355444
|
} else if (isAssignmentPattern$4(id)) {
|
|
355445
|
-
this.pushAssignmentPattern(id,
|
|
355445
|
+
this.pushAssignmentPattern(id, init3);
|
|
355446
355446
|
} else {
|
|
355447
|
-
this.nodes.push(this.buildVariableAssignment(id,
|
|
355447
|
+
this.nodes.push(this.buildVariableAssignment(id, init3));
|
|
355448
355448
|
}
|
|
355449
355449
|
};
|
|
355450
355450
|
_proto.toArray = function toArray(node2, count) {
|
|
@@ -366635,21 +366635,21 @@ bundler handle dynamic imports.
|
|
|
366635
366635
|
var _node = optionals[i];
|
|
366636
366636
|
var isCall = isCallExpression$8(_node);
|
|
366637
366637
|
var chainWithTypes = isCall ? _node.callee : _node.object;
|
|
366638
|
-
var
|
|
366638
|
+
var chain3 = skipTransparentExprWrapperNodes(chainWithTypes);
|
|
366639
366639
|
var ref47 = undefined;
|
|
366640
366640
|
var _check = undefined;
|
|
366641
|
-
if (isCall && isIdentifier$e(
|
|
366641
|
+
if (isCall && isIdentifier$e(chain3, {
|
|
366642
366642
|
name: "eval"
|
|
366643
366643
|
})) {
|
|
366644
|
-
_check = ref47 =
|
|
366644
|
+
_check = ref47 = chain3;
|
|
366645
366645
|
_node.callee = sequenceExpression$6([numericLiteral$5(0), ref47]);
|
|
366646
|
-
} else if (pureGetters && isCall && isSimpleMemberExpression(
|
|
366646
|
+
} else if (pureGetters && isCall && isSimpleMemberExpression(chain3)) {
|
|
366647
366647
|
_check = ref47 = _node.callee;
|
|
366648
|
-
} else if (scope2.isStatic(
|
|
366648
|
+
} else if (scope2.isStatic(chain3)) {
|
|
366649
366649
|
_check = ref47 = chainWithTypes;
|
|
366650
366650
|
} else {
|
|
366651
366651
|
if (!tmpVar || isCall) {
|
|
366652
|
-
tmpVar = scope2.generateUidIdentifierBasedOnNode(
|
|
366652
|
+
tmpVar = scope2.generateUidIdentifierBasedOnNode(chain3);
|
|
366653
366653
|
scope2.push({
|
|
366654
366654
|
id: cloneNode$e(tmpVar)
|
|
366655
366655
|
});
|
|
@@ -366662,11 +366662,11 @@ bundler handle dynamic imports.
|
|
|
366662
366662
|
_node.object = ref47;
|
|
366663
366663
|
}
|
|
366664
366664
|
}
|
|
366665
|
-
if (isCall && isMemberExpression$7(
|
|
366666
|
-
if (pureGetters && isSimpleMemberExpression(
|
|
366665
|
+
if (isCall && isMemberExpression$7(chain3)) {
|
|
366666
|
+
if (pureGetters && isSimpleMemberExpression(chain3)) {
|
|
366667
366667
|
_node.callee = chainWithTypes;
|
|
366668
366668
|
} else {
|
|
366669
|
-
var object2 =
|
|
366669
|
+
var object2 = chain3.object;
|
|
366670
366670
|
var context = undefined;
|
|
366671
366671
|
if (isSuper$2(object2)) {
|
|
366672
366672
|
context = thisExpression$4();
|
|
@@ -366674,7 +366674,7 @@ bundler handle dynamic imports.
|
|
|
366674
366674
|
var memoized = scope2.maybeGenerateMemoised(object2);
|
|
366675
366675
|
if (memoized) {
|
|
366676
366676
|
context = memoized;
|
|
366677
|
-
|
|
366677
|
+
chain3.object = assignmentExpression$8("=", memoized, object2);
|
|
366678
366678
|
} else {
|
|
366679
366679
|
context = object2;
|
|
366680
366680
|
}
|
|
@@ -367022,7 +367022,7 @@ bundler handle dynamic imports.
|
|
|
367022
367022
|
fieldPath.set("value", t3.unaryExpression("void", expr));
|
|
367023
367023
|
}
|
|
367024
367024
|
}
|
|
367025
|
-
function injectInitialization$1(classPath,
|
|
367025
|
+
function injectInitialization$1(classPath, init3) {
|
|
367026
367026
|
var firstFieldPath;
|
|
367027
367027
|
var constructorPath;
|
|
367028
367028
|
for (var _iterator2 = _createForOfIteratorHelperLoose(classPath.get("body.body")), _step2;!(_step2 = _iterator2()).done; ) {
|
|
@@ -367038,9 +367038,9 @@ bundler handle dynamic imports.
|
|
|
367038
367038
|
}
|
|
367039
367039
|
}
|
|
367040
367040
|
if (firstFieldPath) {
|
|
367041
|
-
injectToFieldInit(firstFieldPath,
|
|
367041
|
+
injectToFieldInit(firstFieldPath, init3, true);
|
|
367042
367042
|
} else {
|
|
367043
|
-
injectInitialization(classPath, constructorPath, [t3.expressionStatement(
|
|
367043
|
+
injectInitialization(classPath, constructorPath, [t3.expressionStatement(init3)]);
|
|
367044
367044
|
}
|
|
367045
367045
|
}
|
|
367046
367046
|
function getWeakSetId(weakSets, outerClass, reference, name2, inject) {
|
|
@@ -370266,7 +370266,7 @@ bundler handle dynamic imports.
|
|
|
370266
370266
|
return lazy(source) ? "lazy/function" : null;
|
|
370267
370267
|
}
|
|
370268
370268
|
},
|
|
370269
|
-
buildRequireWrapper: function buildRequireWrapper(name2,
|
|
370269
|
+
buildRequireWrapper: function buildRequireWrapper(name2, init3, payload, referenced) {
|
|
370270
370270
|
if (payload === "lazy/function") {
|
|
370271
370271
|
if (!referenced)
|
|
370272
370272
|
return false;
|
|
@@ -370276,7 +370276,7 @@ bundler handle dynamic imports.
|
|
|
370276
370276
|
`, ` = function(){ return data; };
|
|
370277
370277
|
return data;
|
|
370278
370278
|
}
|
|
370279
|
-
`])), name2,
|
|
370279
|
+
`])), name2, init3, name2);
|
|
370280
370280
|
}
|
|
370281
370281
|
},
|
|
370282
370282
|
wrapReference: function wrapReference(ref47, payload) {
|
|
@@ -370479,9 +370479,9 @@ bundler handle dynamic imports.
|
|
|
370479
370479
|
header = expressionStatement$7(loadExpr);
|
|
370480
370480
|
} else {
|
|
370481
370481
|
var _header;
|
|
370482
|
-
var
|
|
370482
|
+
var init3 = wrapInterop(path17, loadExpr, metadata.interop) || loadExpr;
|
|
370483
370483
|
if (metadata.wrap) {
|
|
370484
|
-
var res2 = hooks2.buildRequireWrapper(metadata.name,
|
|
370484
|
+
var res2 = hooks2.buildRequireWrapper(metadata.name, init3, metadata.wrap, metadata.referenced);
|
|
370485
370485
|
if (res2 === false)
|
|
370486
370486
|
continue;
|
|
370487
370487
|
else
|
|
@@ -370489,7 +370489,7 @@ bundler handle dynamic imports.
|
|
|
370489
370489
|
}
|
|
370490
370490
|
(_header = header) != null || (header = template$2.statement.ast(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteralLoose([`
|
|
370491
370491
|
var `, " = ", `;
|
|
370492
|
-
`])), metadata.name,
|
|
370492
|
+
`])), metadata.name, init3));
|
|
370493
370493
|
}
|
|
370494
370494
|
header.loc = metadata.loc;
|
|
370495
370495
|
headers.push(header);
|
|
@@ -372603,9 +372603,9 @@ bundler handle dynamic imports.
|
|
|
372603
372603
|
}
|
|
372604
372604
|
},
|
|
372605
372605
|
ForStatement: function ForStatement(path17) {
|
|
372606
|
-
var
|
|
372607
|
-
if (
|
|
372608
|
-
util3.replaceWithOrRemove(
|
|
372606
|
+
var init3 = path17.get("init");
|
|
372607
|
+
if (init3.isVariableDeclaration()) {
|
|
372608
|
+
util3.replaceWithOrRemove(init3, varDeclToExpr(init3, false));
|
|
372609
372609
|
}
|
|
372610
372610
|
},
|
|
372611
372611
|
ForXStatement: function ForXStatement(path17) {
|
|
@@ -409892,12 +409892,12 @@ Using targets: ` + (0, _debugUtils.stringifyTargetsMultiline)(targets));
|
|
|
409892
409892
|
case "Program": {
|
|
409893
409893
|
var isGlobal = t3.isProgram(path17.parent);
|
|
409894
409894
|
var isSeen = seen(parentPath);
|
|
409895
|
-
var
|
|
409895
|
+
var init3 = t3.objectExpression([]);
|
|
409896
409896
|
if (isSeen || isGlobal) {
|
|
409897
|
-
|
|
409897
|
+
init3 = t3.logicalExpression("||", t3.cloneNode(fill.ID), init3);
|
|
409898
409898
|
}
|
|
409899
409899
|
var enumIIFE = buildEnumWrapper(Object.assign({}, fill, {
|
|
409900
|
-
INIT:
|
|
409900
|
+
INIT: init3
|
|
409901
409901
|
}));
|
|
409902
409902
|
if (isPure2)
|
|
409903
409903
|
annotateAsPure(enumIIFE);
|
|
@@ -410846,17 +410846,17 @@ Using targets: ` + (0, _debugUtils.stringifyTargetsMultiline)(targets));
|
|
|
410846
410846
|
},
|
|
410847
410847
|
TSImportEqualsDeclaration: function TSImportEqualsDeclaration(path17, pass) {
|
|
410848
410848
|
var _path$node = path17.node, id = _path$node.id, moduleReference = _path$node.moduleReference;
|
|
410849
|
-
var
|
|
410849
|
+
var init3;
|
|
410850
410850
|
var varKind;
|
|
410851
410851
|
if (t3.isTSExternalModuleReference(moduleReference)) {
|
|
410852
410852
|
assertCjsTransformEnabled(path17, pass, "import " + id.name + " = require(...);", "import " + id.name + " from '...';", " alongside Typescript's --allowSyntheticDefaultImports option");
|
|
410853
|
-
|
|
410853
|
+
init3 = t3.callExpression(t3.identifier("require"), [moduleReference.expression]);
|
|
410854
410854
|
varKind = "const";
|
|
410855
410855
|
} else {
|
|
410856
|
-
|
|
410856
|
+
init3 = entityNameToExpr(moduleReference);
|
|
410857
410857
|
varKind = "var";
|
|
410858
410858
|
}
|
|
410859
|
-
var newNode = t3.variableDeclaration(varKind, [t3.variableDeclarator(id,
|
|
410859
|
+
var newNode = t3.variableDeclaration(varKind, [t3.variableDeclarator(id, init3)]);
|
|
410860
410860
|
{
|
|
410861
410861
|
path17.replaceWith(path17.node.isExport ? t3.exportNamedDeclaration(newNode) : newNode);
|
|
410862
410862
|
}
|
|
@@ -411318,7 +411318,7 @@ Using targets: ` + (0, _debugUtils.stringifyTargetsMultiline)(targets));
|
|
|
411318
411318
|
}
|
|
411319
411319
|
return needsProxy ? "defer/proxy" : "defer/function";
|
|
411320
411320
|
},
|
|
411321
|
-
buildRequireWrapper: function buildRequireWrapper(name2,
|
|
411321
|
+
buildRequireWrapper: function buildRequireWrapper(name2, init3, payload, referenced) {
|
|
411322
411322
|
if (payload === "defer/proxy") {
|
|
411323
411323
|
if (!referenced)
|
|
411324
411324
|
return false;
|
|
@@ -411326,7 +411326,7 @@ Using targets: ` + (0, _debugUtils.stringifyTargetsMultiline)(targets));
|
|
|
411326
411326
|
var `, " = ", `(
|
|
411327
411327
|
() => `, `
|
|
411328
411328
|
)
|
|
411329
|
-
`])), name2, file2.addHelper("importDeferProxy"),
|
|
411329
|
+
`])), name2, file2.addHelper("importDeferProxy"), init3);
|
|
411330
411330
|
}
|
|
411331
411331
|
if (payload === "defer/function") {
|
|
411332
411332
|
if (!referenced)
|
|
@@ -411336,7 +411336,7 @@ Using targets: ` + (0, _debugUtils.stringifyTargetsMultiline)(targets));
|
|
|
411336
411336
|
`, ` = () => data;
|
|
411337
411337
|
return data = `, `;
|
|
411338
411338
|
}
|
|
411339
|
-
`])), name2, name2,
|
|
411339
|
+
`])), name2, name2, init3);
|
|
411340
411340
|
}
|
|
411341
411341
|
},
|
|
411342
411342
|
wrapReference: function wrapReference(ref47, payload) {
|
|
@@ -413064,11 +413064,11 @@ Using targets: ` + (0, _debugUtils.stringifyTargetsMultiline)(targets));
|
|
|
413064
413064
|
return addPlatformSpecificPolyfills;
|
|
413065
413065
|
}
|
|
413066
413066
|
var helpers2 = {};
|
|
413067
|
-
var
|
|
413067
|
+
var semver4 = { exports: {} };
|
|
413068
413068
|
var hasRequiredSemver;
|
|
413069
413069
|
function requireSemver() {
|
|
413070
413070
|
if (hasRequiredSemver)
|
|
413071
|
-
return
|
|
413071
|
+
return semver4.exports;
|
|
413072
413072
|
hasRequiredSemver = 1;
|
|
413073
413073
|
(function(module3, exports4) {
|
|
413074
413074
|
exports4 = module3.exports = SemVer2;
|
|
@@ -414208,8 +414208,8 @@ Using targets: ` + (0, _debugUtils.stringifyTargetsMultiline)(targets));
|
|
|
414208
414208
|
}
|
|
414209
414209
|
return parse5(match[2] + "." + (match[3] || "0") + "." + (match[4] || "0"), options);
|
|
414210
414210
|
}
|
|
414211
|
-
})(
|
|
414212
|
-
return
|
|
414211
|
+
})(semver4, semver4.exports);
|
|
414212
|
+
return semver4.exports;
|
|
414213
414213
|
}
|
|
414214
414214
|
var hasRequiredHelpers;
|
|
414215
414215
|
function requireHelpers() {
|
|
@@ -418021,7 +418021,7 @@ Using plugins:`);
|
|
|
418021
418021
|
sourceFileName: filename
|
|
418022
418022
|
};
|
|
418023
418023
|
}
|
|
418024
|
-
function
|
|
418024
|
+
function run2(transformFn, script) {
|
|
418025
418025
|
var scriptEl = document.createElement("script");
|
|
418026
418026
|
if (script.type) {
|
|
418027
418027
|
scriptEl.setAttribute("type", script.type);
|
|
@@ -418070,7 +418070,7 @@ Using plugins:`);
|
|
|
418070
418070
|
var result = results[i2];
|
|
418071
418071
|
if (result.loaded && !result.executed) {
|
|
418072
418072
|
result.executed = true;
|
|
418073
|
-
|
|
418073
|
+
run2(transformFn, result);
|
|
418074
418074
|
} else if (!result.loaded && !result.error && !result.async) {
|
|
418075
418075
|
break;
|
|
418076
418076
|
}
|
|
@@ -421405,29 +421405,11 @@ import readline from "node:readline";
|
|
|
421405
421405
|
import { execSync as execSync2 } from "node:child_process";
|
|
421406
421406
|
var import_semver = __toESM2(require_semver2(), 1);
|
|
421407
421407
|
// package.json
|
|
421408
|
-
var version = "0.1.
|
|
421408
|
+
var version = "0.1.61";
|
|
421409
421409
|
var package_default = {
|
|
421410
421410
|
name: "@tscircuit/cli",
|
|
421411
|
-
main: "dist/main.js",
|
|
421412
|
-
type: "module",
|
|
421413
421411
|
version,
|
|
421414
|
-
|
|
421415
|
-
tsci: "./dist/main.js"
|
|
421416
|
-
},
|
|
421417
|
-
files: [
|
|
421418
|
-
"dist"
|
|
421419
|
-
],
|
|
421420
|
-
scripts: {
|
|
421421
|
-
start: "bun run dev",
|
|
421422
|
-
dev: "bun --hot ./cli/main.ts dev ./example-dir/snippet1-basic.tsx",
|
|
421423
|
-
build: "bun run build:bun",
|
|
421424
|
-
"build:bun": "bun build ./cli/main.ts --target node --outfile ./dist/main.js",
|
|
421425
|
-
"build:tsup": "tsup --config ./tsup.config.js",
|
|
421426
|
-
format: "biome format --write .",
|
|
421427
|
-
"format:check": "biome format .",
|
|
421428
|
-
cli: "bun ./cli/main.ts",
|
|
421429
|
-
"pkg-pr-new-release": "bunx pkg-pr-new publish --comment=off --peerDeps"
|
|
421430
|
-
},
|
|
421412
|
+
main: "dist/main.js",
|
|
421431
421413
|
devDependencies: {
|
|
421432
421414
|
"@babel/standalone": "^7.26.9",
|
|
421433
421415
|
"@biomejs/biome": "^1.9.4",
|
|
@@ -421453,6 +421435,7 @@ var package_default = {
|
|
|
421453
421435
|
"dsn-converter": "^0.0.63",
|
|
421454
421436
|
"get-port": "^7.1.0",
|
|
421455
421437
|
"jwt-decode": "^4.0.0",
|
|
421438
|
+
kleur: "^4.1.5",
|
|
421456
421439
|
ky: "^1.7.4",
|
|
421457
421440
|
"make-vfs": "^1.0.15",
|
|
421458
421441
|
"perfect-cli": "^1.0.20",
|
|
@@ -421465,7 +421448,24 @@ var package_default = {
|
|
|
421465
421448
|
peerDependencies: {
|
|
421466
421449
|
typescript: "^5.0.0"
|
|
421467
421450
|
},
|
|
421468
|
-
|
|
421451
|
+
bin: {
|
|
421452
|
+
tsci: "./dist/main.js"
|
|
421453
|
+
},
|
|
421454
|
+
files: [
|
|
421455
|
+
"dist"
|
|
421456
|
+
],
|
|
421457
|
+
scripts: {
|
|
421458
|
+
start: "bun run dev",
|
|
421459
|
+
dev: "bun --hot ./cli/main.ts dev ./example-dir/snippet1-basic.tsx",
|
|
421460
|
+
build: "bun run build:bun",
|
|
421461
|
+
"build:bun": "bun build ./cli/main.ts --target node --outfile ./dist/main.js",
|
|
421462
|
+
"build:tsup": "tsup --config ./tsup.config.js",
|
|
421463
|
+
format: "biome format --write .",
|
|
421464
|
+
"format:check": "biome format .",
|
|
421465
|
+
cli: "bun ./cli/main.ts",
|
|
421466
|
+
"pkg-pr-new-release": "bunx pkg-pr-new publish --comment=off --peerDeps"
|
|
421467
|
+
},
|
|
421468
|
+
type: "module"
|
|
421469
421469
|
};
|
|
421470
421470
|
|
|
421471
421471
|
// lib/shared/check-for-cli-update.ts
|
|
@@ -422786,7 +422786,7 @@ var createHttpServer = async (port = 3020) => {
|
|
|
422786
422786
|
console.info("Local runframe standalone not found, falling back to the production version.");
|
|
422787
422787
|
}
|
|
422788
422788
|
res.writeHead(302, {
|
|
422789
|
-
Location: `https://cdn.jsdelivr.net/npm/@tscircuit/runframe@${{ ...package_default.devDependencies
|
|
422789
|
+
Location: `https://cdn.jsdelivr.net/npm/@tscircuit/runframe@${{ ...package_default.devDependencies }["@tscircuit/runframe"].replace(/^[^0-9]+/, "")}/dist/standalone.min.js`
|
|
422790
422790
|
});
|
|
422791
422791
|
res.end();
|
|
422792
422792
|
return;
|
|
@@ -422807,7 +422807,6 @@ var createHttpServer = async (port = 3020) => {
|
|
|
422807
422807
|
});
|
|
422808
422808
|
return new Promise((resolve2) => {
|
|
422809
422809
|
server2.listen(port, () => {
|
|
422810
|
-
console.log(`Server running at http://localhost:${port}`);
|
|
422811
422810
|
resolve2({ server: server2 });
|
|
422812
422811
|
});
|
|
422813
422812
|
});
|
|
@@ -424468,7 +424467,6 @@ class FilesystemTypesHandler {
|
|
|
424468
424467
|
this.projectRoot = this.findProjectRoot(initialDir);
|
|
424469
424468
|
}
|
|
424470
424469
|
async handleInitialTypeDependencies(filePath) {
|
|
424471
|
-
console.log("Checking initial type dependencies...");
|
|
424472
424470
|
try {
|
|
424473
424471
|
if (!this.areTypesInstalled(filePath)) {
|
|
424474
424472
|
console.log("Installing missing initial types...");
|
|
@@ -425611,10 +425609,114 @@ circuit.add(<MyCircuit />)
|
|
|
425611
425609
|
}
|
|
425612
425610
|
}
|
|
425613
425611
|
|
|
425612
|
+
// node_modules/kleur/index.mjs
|
|
425613
|
+
var FORCE_COLOR;
|
|
425614
|
+
var NODE_DISABLE_COLORS;
|
|
425615
|
+
var NO_COLOR;
|
|
425616
|
+
var TERM;
|
|
425617
|
+
var isTTY = true;
|
|
425618
|
+
if (typeof process !== "undefined") {
|
|
425619
|
+
({ FORCE_COLOR, NODE_DISABLE_COLORS, NO_COLOR, TERM } = process.env || {});
|
|
425620
|
+
isTTY = process.stdout && process.stdout.isTTY;
|
|
425621
|
+
}
|
|
425622
|
+
var $ = {
|
|
425623
|
+
enabled: !NODE_DISABLE_COLORS && NO_COLOR == null && TERM !== "dumb" && (FORCE_COLOR != null && FORCE_COLOR !== "0" || isTTY),
|
|
425624
|
+
reset: init(0, 0),
|
|
425625
|
+
bold: init(1, 22),
|
|
425626
|
+
dim: init(2, 22),
|
|
425627
|
+
italic: init(3, 23),
|
|
425628
|
+
underline: init(4, 24),
|
|
425629
|
+
inverse: init(7, 27),
|
|
425630
|
+
hidden: init(8, 28),
|
|
425631
|
+
strikethrough: init(9, 29),
|
|
425632
|
+
black: init(30, 39),
|
|
425633
|
+
red: init(31, 39),
|
|
425634
|
+
green: init(32, 39),
|
|
425635
|
+
yellow: init(33, 39),
|
|
425636
|
+
blue: init(34, 39),
|
|
425637
|
+
magenta: init(35, 39),
|
|
425638
|
+
cyan: init(36, 39),
|
|
425639
|
+
white: init(37, 39),
|
|
425640
|
+
gray: init(90, 39),
|
|
425641
|
+
grey: init(90, 39),
|
|
425642
|
+
bgBlack: init(40, 49),
|
|
425643
|
+
bgRed: init(41, 49),
|
|
425644
|
+
bgGreen: init(42, 49),
|
|
425645
|
+
bgYellow: init(43, 49),
|
|
425646
|
+
bgBlue: init(44, 49),
|
|
425647
|
+
bgMagenta: init(45, 49),
|
|
425648
|
+
bgCyan: init(46, 49),
|
|
425649
|
+
bgWhite: init(47, 49)
|
|
425650
|
+
};
|
|
425651
|
+
function run(arr, str) {
|
|
425652
|
+
let i = 0, tmp, beg = "", end = "";
|
|
425653
|
+
for (;i < arr.length; i++) {
|
|
425654
|
+
tmp = arr[i];
|
|
425655
|
+
beg += tmp.open;
|
|
425656
|
+
end += tmp.close;
|
|
425657
|
+
if (!!~str.indexOf(tmp.close)) {
|
|
425658
|
+
str = str.replace(tmp.rgx, tmp.close + tmp.open);
|
|
425659
|
+
}
|
|
425660
|
+
}
|
|
425661
|
+
return beg + str + end;
|
|
425662
|
+
}
|
|
425663
|
+
function chain(has, keys) {
|
|
425664
|
+
let ctx = { has, keys };
|
|
425665
|
+
ctx.reset = $.reset.bind(ctx);
|
|
425666
|
+
ctx.bold = $.bold.bind(ctx);
|
|
425667
|
+
ctx.dim = $.dim.bind(ctx);
|
|
425668
|
+
ctx.italic = $.italic.bind(ctx);
|
|
425669
|
+
ctx.underline = $.underline.bind(ctx);
|
|
425670
|
+
ctx.inverse = $.inverse.bind(ctx);
|
|
425671
|
+
ctx.hidden = $.hidden.bind(ctx);
|
|
425672
|
+
ctx.strikethrough = $.strikethrough.bind(ctx);
|
|
425673
|
+
ctx.black = $.black.bind(ctx);
|
|
425674
|
+
ctx.red = $.red.bind(ctx);
|
|
425675
|
+
ctx.green = $.green.bind(ctx);
|
|
425676
|
+
ctx.yellow = $.yellow.bind(ctx);
|
|
425677
|
+
ctx.blue = $.blue.bind(ctx);
|
|
425678
|
+
ctx.magenta = $.magenta.bind(ctx);
|
|
425679
|
+
ctx.cyan = $.cyan.bind(ctx);
|
|
425680
|
+
ctx.white = $.white.bind(ctx);
|
|
425681
|
+
ctx.gray = $.gray.bind(ctx);
|
|
425682
|
+
ctx.grey = $.grey.bind(ctx);
|
|
425683
|
+
ctx.bgBlack = $.bgBlack.bind(ctx);
|
|
425684
|
+
ctx.bgRed = $.bgRed.bind(ctx);
|
|
425685
|
+
ctx.bgGreen = $.bgGreen.bind(ctx);
|
|
425686
|
+
ctx.bgYellow = $.bgYellow.bind(ctx);
|
|
425687
|
+
ctx.bgBlue = $.bgBlue.bind(ctx);
|
|
425688
|
+
ctx.bgMagenta = $.bgMagenta.bind(ctx);
|
|
425689
|
+
ctx.bgCyan = $.bgCyan.bind(ctx);
|
|
425690
|
+
ctx.bgWhite = $.bgWhite.bind(ctx);
|
|
425691
|
+
return ctx;
|
|
425692
|
+
}
|
|
425693
|
+
function init(open2, close) {
|
|
425694
|
+
let blk = {
|
|
425695
|
+
open: `\x1B[${open2}m`,
|
|
425696
|
+
close: `\x1B[${close}m`,
|
|
425697
|
+
rgx: new RegExp(`\\x1b\\[${close}m`, "g")
|
|
425698
|
+
};
|
|
425699
|
+
return function(txt) {
|
|
425700
|
+
if (this !== undefined && this.has !== undefined) {
|
|
425701
|
+
!!~this.has.indexOf(open2) || (this.has.push(open2), this.keys.push(blk));
|
|
425702
|
+
return txt === undefined ? this : $.enabled ? run(this.keys, txt + "") : txt + "";
|
|
425703
|
+
}
|
|
425704
|
+
return txt === undefined ? chain([open2], [blk]) : $.enabled ? run([blk], txt + "") : txt + "";
|
|
425705
|
+
};
|
|
425706
|
+
}
|
|
425707
|
+
var kleur_default = $;
|
|
425708
|
+
|
|
425709
|
+
// lib/getVersion.ts
|
|
425710
|
+
var import_semver3 = __toESM2(require_semver2(), 1);
|
|
425711
|
+
var getVersion = () => {
|
|
425712
|
+
return import_semver3.default.inc(package_default.version, "patch") ?? package_default.version;
|
|
425713
|
+
};
|
|
425714
|
+
|
|
425614
425715
|
// cli/dev/register.ts
|
|
425615
425716
|
var registerDev = (program3) => {
|
|
425616
425717
|
program3.command("dev").description("Start development server for a snippet").argument("[file]", "Path to the snippet file").option("-p, --port <number>", "Port to run server on", "3020").action(async (file, options) => {
|
|
425617
425718
|
let port = parseInt(options.port);
|
|
425719
|
+
const startTime = Date.now();
|
|
425618
425720
|
const isPortAvailable = (port2) => {
|
|
425619
425721
|
return new Promise((resolve7) => {
|
|
425620
425722
|
const server3 = net.createServer();
|
|
@@ -425626,7 +425728,7 @@ var registerDev = (program3) => {
|
|
|
425626
425728
|
});
|
|
425627
425729
|
};
|
|
425628
425730
|
while (!await isPortAvailable(port)) {
|
|
425629
|
-
console.log(`Port ${port} is in use, trying port ${port + 1}...`);
|
|
425731
|
+
console.log(kleur_default.gray(`Port ${port} is in use, trying port ${port + 1}...`));
|
|
425630
425732
|
port += 1;
|
|
425631
425733
|
}
|
|
425632
425734
|
let absolutePath;
|
|
@@ -425647,9 +425749,9 @@ var registerDev = (program3) => {
|
|
|
425647
425749
|
}
|
|
425648
425750
|
}
|
|
425649
425751
|
try {
|
|
425650
|
-
|
|
425752
|
+
process.stdout.write(kleur_default.gray("Installing types for imported snippets..."));
|
|
425651
425753
|
await installNodeModuleTypesForSnippet(absolutePath);
|
|
425652
|
-
console.log("
|
|
425754
|
+
console.log(kleur_default.green(" done"));
|
|
425653
425755
|
} catch (error) {
|
|
425654
425756
|
console.warn("Failed to install types:", error);
|
|
425655
425757
|
}
|
|
@@ -425659,6 +425761,15 @@ var registerDev = (program3) => {
|
|
|
425659
425761
|
});
|
|
425660
425762
|
await server2.start();
|
|
425661
425763
|
await server2.addEntrypoint();
|
|
425764
|
+
const timeToStart = Date.now() - startTime;
|
|
425765
|
+
console.log(`
|
|
425766
|
+
|
|
425767
|
+
${kleur_default.green(`@tscircuit/cli@${getVersion()}`)} ${kleur_default.gray("ready in")} ${kleur_default.white(`${Math.round(timeToStart)}ms`)}`);
|
|
425768
|
+
console.log(`
|
|
425769
|
+
${kleur_default.bold("➜ Local:")} ${kleur_default.underline(kleur_default.cyan(`http://localhost:${port}`))}
|
|
425770
|
+
|
|
425771
|
+
`);
|
|
425772
|
+
console.log(kleur_default.gray(`Watching ${kleur_default.underline(server2.projectDir.split("/").slice(-2).join("/"))} for changes...`));
|
|
425662
425773
|
});
|
|
425663
425774
|
};
|
|
425664
425775
|
|
|
@@ -425839,7 +425950,6 @@ var registerClone = (program3) => {
|
|
|
425839
425950
|
|
|
425840
425951
|
// cli/main.ts
|
|
425841
425952
|
var import_perfect_cli = __toESM2(require_dist6(), 1);
|
|
425842
|
-
var import_semver3 = __toESM2(require_semver2(), 1);
|
|
425843
425953
|
|
|
425844
425954
|
// node_modules/circuit-json-to-readable-netlist/dist/index.js
|
|
425845
425955
|
init_dist2();
|
|
@@ -450572,7 +450682,7 @@ var registerPush = (program3) => {
|
|
|
450572
450682
|
|
|
450573
450683
|
// cli/main.ts
|
|
450574
450684
|
var program2 = new Command;
|
|
450575
|
-
program2.name("tsci").description("CLI for developing tscircuit snippets").version(
|
|
450685
|
+
program2.name("tsci").description("CLI for developing tscircuit snippets").version(getVersion());
|
|
450576
450686
|
registerInit(program2);
|
|
450577
450687
|
registerDev(program2);
|
|
450578
450688
|
registerClone(program2);
|