@latticexyz/cli 1.33.1 → 1.35.0

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.
@@ -1,27 +1,10 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
6
  var __getProtoOf = Object.getPrototypeOf;
10
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b ||= {})
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
8
  var __commonJS = (cb, mod) => function __require() {
26
9
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
27
10
  };
@@ -42,26 +25,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
42
25
  mod
43
26
  ));
44
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
45
- var __async = (__this, __arguments, generator) => {
46
- return new Promise((resolve, reject) => {
47
- var fulfilled = (value) => {
48
- try {
49
- step(generator.next(value));
50
- } catch (e) {
51
- reject(e);
52
- }
53
- };
54
- var rejected = (value) => {
55
- try {
56
- step(generator.throw(value));
57
- } catch (e) {
58
- reject(e);
59
- }
60
- };
61
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
62
- step((generator = generator.apply(__this, __arguments)).next());
63
- });
64
- };
65
28
 
66
29
  // ../../node_modules/bn.js/lib/bn.js
67
30
  var require_bn = __commonJS({
@@ -37585,14 +37548,14 @@ var require_lodash = __commonJS({
37585
37548
  var baseCreate = function() {
37586
37549
  function object() {
37587
37550
  }
37588
- return function(proto) {
37589
- if (!isObject(proto)) {
37551
+ return function(proto2) {
37552
+ if (!isObject(proto2)) {
37590
37553
  return {};
37591
37554
  }
37592
37555
  if (objectCreate) {
37593
- return objectCreate(proto);
37556
+ return objectCreate(proto2);
37594
37557
  }
37595
- object.prototype = proto;
37558
+ object.prototype = proto2;
37596
37559
  var result2 = new object();
37597
37560
  object.prototype = undefined2;
37598
37561
  return result2;
@@ -39746,8 +39709,8 @@ var require_lodash = __commonJS({
39746
39709
  }
39747
39710
  var isMaskable = coreJsData ? isFunction : stubFalse;
39748
39711
  function isPrototype(value) {
39749
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
39750
- return value === proto;
39712
+ var Ctor = value && value.constructor, proto2 = typeof Ctor == "function" && Ctor.prototype || objectProto;
39713
+ return value === proto2;
39751
39714
  }
39752
39715
  function isStrictComparable(value) {
39753
39716
  return value === value && !isObject(value);
@@ -40959,11 +40922,11 @@ var require_lodash = __commonJS({
40959
40922
  if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
40960
40923
  return false;
40961
40924
  }
40962
- var proto = getPrototype(value);
40963
- if (proto === null) {
40925
+ var proto2 = getPrototype(value);
40926
+ if (proto2 === null) {
40964
40927
  return true;
40965
40928
  }
40966
- var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
40929
+ var Ctor = hasOwnProperty.call(proto2, "constructor") && proto2.constructor;
40967
40930
  return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
40968
40931
  }
40969
40932
  var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
@@ -42568,7 +42531,7 @@ var require_ms = __commonJS({
42568
42531
  // ../../node_modules/debug/src/common.js
42569
42532
  var require_common3 = __commonJS({
42570
42533
  "../../node_modules/debug/src/common.js"(exports, module2) {
42571
- function setup(env) {
42534
+ function setup(env2) {
42572
42535
  createDebug.debug = createDebug;
42573
42536
  createDebug.default = createDebug;
42574
42537
  createDebug.coerce = coerce;
@@ -42577,8 +42540,8 @@ var require_common3 = __commonJS({
42577
42540
  createDebug.enabled = enabled;
42578
42541
  createDebug.humanize = require_ms();
42579
42542
  createDebug.destroy = destroy;
42580
- Object.keys(env).forEach((key) => {
42581
- createDebug[key] = env[key];
42543
+ Object.keys(env2).forEach((key) => {
42544
+ createDebug[key] = env2[key];
42582
42545
  });
42583
42546
  createDebug.names = [];
42584
42547
  createDebug.skips = [];
@@ -42910,26 +42873,26 @@ var require_has_flag = __commonJS({
42910
42873
  var require_supports_color = __commonJS({
42911
42874
  "../../node_modules/supports-color/index.js"(exports, module2) {
42912
42875
  "use strict";
42913
- var os2 = require("os");
42914
- var tty = require("tty");
42915
- var hasFlag = require_has_flag();
42916
- var { env } = process;
42876
+ var os3 = require("os");
42877
+ var tty2 = require("tty");
42878
+ var hasFlag2 = require_has_flag();
42879
+ var { env: env2 } = process;
42917
42880
  var forceColor;
42918
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
42881
+ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false") || hasFlag2("color=never")) {
42919
42882
  forceColor = 0;
42920
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
42883
+ } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
42921
42884
  forceColor = 1;
42922
42885
  }
42923
- if ("FORCE_COLOR" in env) {
42924
- if (env.FORCE_COLOR === "true") {
42886
+ if ("FORCE_COLOR" in env2) {
42887
+ if (env2.FORCE_COLOR === "true") {
42925
42888
  forceColor = 1;
42926
- } else if (env.FORCE_COLOR === "false") {
42889
+ } else if (env2.FORCE_COLOR === "false") {
42927
42890
  forceColor = 0;
42928
42891
  } else {
42929
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
42892
+ forceColor = env2.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env2.FORCE_COLOR, 10), 3);
42930
42893
  }
42931
42894
  }
42932
- function translateLevel(level) {
42895
+ function translateLevel2(level) {
42933
42896
  if (level === 0) {
42934
42897
  return false;
42935
42898
  }
@@ -42940,70 +42903,70 @@ var require_supports_color = __commonJS({
42940
42903
  has16m: level >= 3
42941
42904
  };
42942
42905
  }
42943
- function supportsColor(haveStream, streamIsTTY) {
42906
+ function supportsColor2(haveStream, streamIsTTY) {
42944
42907
  if (forceColor === 0) {
42945
42908
  return 0;
42946
42909
  }
42947
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
42910
+ if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
42948
42911
  return 3;
42949
42912
  }
42950
- if (hasFlag("color=256")) {
42913
+ if (hasFlag2("color=256")) {
42951
42914
  return 2;
42952
42915
  }
42953
42916
  if (haveStream && !streamIsTTY && forceColor === void 0) {
42954
42917
  return 0;
42955
42918
  }
42956
42919
  const min = forceColor || 0;
42957
- if (env.TERM === "dumb") {
42920
+ if (env2.TERM === "dumb") {
42958
42921
  return min;
42959
42922
  }
42960
42923
  if (process.platform === "win32") {
42961
- const osRelease = os2.release().split(".");
42924
+ const osRelease = os3.release().split(".");
42962
42925
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
42963
42926
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
42964
42927
  }
42965
42928
  return 1;
42966
42929
  }
42967
- if ("CI" in env) {
42968
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
42930
+ if ("CI" in env2) {
42931
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
42969
42932
  return 1;
42970
42933
  }
42971
42934
  return min;
42972
42935
  }
42973
- if ("TEAMCITY_VERSION" in env) {
42974
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
42936
+ if ("TEAMCITY_VERSION" in env2) {
42937
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
42975
42938
  }
42976
- if (env.COLORTERM === "truecolor") {
42939
+ if (env2.COLORTERM === "truecolor") {
42977
42940
  return 3;
42978
42941
  }
42979
- if ("TERM_PROGRAM" in env) {
42980
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
42981
- switch (env.TERM_PROGRAM) {
42942
+ if ("TERM_PROGRAM" in env2) {
42943
+ const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
42944
+ switch (env2.TERM_PROGRAM) {
42982
42945
  case "iTerm.app":
42983
42946
  return version >= 3 ? 3 : 2;
42984
42947
  case "Apple_Terminal":
42985
42948
  return 2;
42986
42949
  }
42987
42950
  }
42988
- if (/-256(color)?$/i.test(env.TERM)) {
42951
+ if (/-256(color)?$/i.test(env2.TERM)) {
42989
42952
  return 2;
42990
42953
  }
42991
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
42954
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
42992
42955
  return 1;
42993
42956
  }
42994
- if ("COLORTERM" in env) {
42957
+ if ("COLORTERM" in env2) {
42995
42958
  return 1;
42996
42959
  }
42997
42960
  return min;
42998
42961
  }
42999
42962
  function getSupportLevel(stream) {
43000
- const level = supportsColor(stream, stream && stream.isTTY);
43001
- return translateLevel(level);
42963
+ const level = supportsColor2(stream, stream && stream.isTTY);
42964
+ return translateLevel2(level);
43002
42965
  }
43003
42966
  module2.exports = {
43004
42967
  supportsColor: getSupportLevel,
43005
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
43006
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
42968
+ stdout: translateLevel2(supportsColor2(true, tty2.isatty(1))),
42969
+ stderr: translateLevel2(supportsColor2(true, tty2.isatty(2)))
43007
42970
  };
43008
42971
  }
43009
42972
  });
@@ -43011,7 +42974,7 @@ var require_supports_color = __commonJS({
43011
42974
  // ../../node_modules/debug/src/node.js
43012
42975
  var require_node = __commonJS({
43013
42976
  "../../node_modules/debug/src/node.js"(exports, module2) {
43014
- var tty = require("tty");
42977
+ var tty2 = require("tty");
43015
42978
  var util = require("util");
43016
42979
  exports.init = init;
43017
42980
  exports.log = log;
@@ -43026,8 +42989,8 @@ var require_node = __commonJS({
43026
42989
  );
43027
42990
  exports.colors = [6, 2, 3, 4, 5, 1];
43028
42991
  try {
43029
- const supportsColor = require_supports_color();
43030
- if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
42992
+ const supportsColor2 = require_supports_color();
42993
+ if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
43031
42994
  exports.colors = [
43032
42995
  20,
43033
42996
  21,
@@ -43129,7 +43092,7 @@ var require_node = __commonJS({
43129
43092
  return obj;
43130
43093
  }, {});
43131
43094
  function useColors() {
43132
- return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
43095
+ return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
43133
43096
  }
43134
43097
  function formatArgs(args) {
43135
43098
  const { namespace: name, useColors: useColors2 } = this;
@@ -47141,21 +47104,21 @@ var require_third_party = __commonJS({
47141
47104
  "node_modules/ansi-styles/index.js"(exports2, module22) {
47142
47105
  "use strict";
47143
47106
  var colorConvert = require_color_convert();
47144
- var wrapAnsi16 = (fn, offset) => function() {
47107
+ var wrapAnsi162 = (fn, offset) => function() {
47145
47108
  const code = fn.apply(colorConvert, arguments);
47146
47109
  return `\x1B[${code + offset}m`;
47147
47110
  };
47148
- var wrapAnsi256 = (fn, offset) => function() {
47111
+ var wrapAnsi2562 = (fn, offset) => function() {
47149
47112
  const code = fn.apply(colorConvert, arguments);
47150
47113
  return `\x1B[${38 + offset};5;${code}m`;
47151
47114
  };
47152
- var wrapAnsi16m = (fn, offset) => function() {
47115
+ var wrapAnsi16m2 = (fn, offset) => function() {
47153
47116
  const rgb = fn.apply(colorConvert, arguments);
47154
47117
  return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
47155
47118
  };
47156
- function assembleStyles() {
47119
+ function assembleStyles2() {
47157
47120
  const codes = /* @__PURE__ */ new Map();
47158
- const styles = {
47121
+ const styles2 = {
47159
47122
  modifier: {
47160
47123
  reset: [0, 0],
47161
47124
  bold: [1, 22],
@@ -47203,48 +47166,48 @@ var require_third_party = __commonJS({
47203
47166
  bgWhiteBright: [107, 49]
47204
47167
  }
47205
47168
  };
47206
- styles.color.grey = styles.color.gray;
47207
- for (const groupName of Object.keys(styles)) {
47208
- const group = styles[groupName];
47169
+ styles2.color.grey = styles2.color.gray;
47170
+ for (const groupName of Object.keys(styles2)) {
47171
+ const group = styles2[groupName];
47209
47172
  for (const styleName of Object.keys(group)) {
47210
47173
  const style = group[styleName];
47211
- styles[styleName] = {
47174
+ styles2[styleName] = {
47212
47175
  open: `\x1B[${style[0]}m`,
47213
47176
  close: `\x1B[${style[1]}m`
47214
47177
  };
47215
- group[styleName] = styles[styleName];
47178
+ group[styleName] = styles2[styleName];
47216
47179
  codes.set(style[0], style[1]);
47217
47180
  }
47218
- Object.defineProperty(styles, groupName, {
47181
+ Object.defineProperty(styles2, groupName, {
47219
47182
  value: group,
47220
47183
  enumerable: false
47221
47184
  });
47222
- Object.defineProperty(styles, "codes", {
47185
+ Object.defineProperty(styles2, "codes", {
47223
47186
  value: codes,
47224
47187
  enumerable: false
47225
47188
  });
47226
47189
  }
47227
47190
  const ansi2ansi = (n) => n;
47228
47191
  const rgb2rgb = (r, g, b) => [r, g, b];
47229
- styles.color.close = "\x1B[39m";
47230
- styles.bgColor.close = "\x1B[49m";
47231
- styles.color.ansi = {
47232
- ansi: wrapAnsi16(ansi2ansi, 0)
47192
+ styles2.color.close = "\x1B[39m";
47193
+ styles2.bgColor.close = "\x1B[49m";
47194
+ styles2.color.ansi = {
47195
+ ansi: wrapAnsi162(ansi2ansi, 0)
47233
47196
  };
47234
- styles.color.ansi256 = {
47235
- ansi256: wrapAnsi256(ansi2ansi, 0)
47197
+ styles2.color.ansi256 = {
47198
+ ansi256: wrapAnsi2562(ansi2ansi, 0)
47236
47199
  };
47237
- styles.color.ansi16m = {
47238
- rgb: wrapAnsi16m(rgb2rgb, 0)
47200
+ styles2.color.ansi16m = {
47201
+ rgb: wrapAnsi16m2(rgb2rgb, 0)
47239
47202
  };
47240
- styles.bgColor.ansi = {
47241
- ansi: wrapAnsi16(ansi2ansi, 10)
47203
+ styles2.bgColor.ansi = {
47204
+ ansi: wrapAnsi162(ansi2ansi, 10)
47242
47205
  };
47243
- styles.bgColor.ansi256 = {
47244
- ansi256: wrapAnsi256(ansi2ansi, 10)
47206
+ styles2.bgColor.ansi256 = {
47207
+ ansi256: wrapAnsi2562(ansi2ansi, 10)
47245
47208
  };
47246
- styles.bgColor.ansi16m = {
47247
- rgb: wrapAnsi16m(rgb2rgb, 10)
47209
+ styles2.bgColor.ansi16m = {
47210
+ rgb: wrapAnsi16m2(rgb2rgb, 10)
47248
47211
  };
47249
47212
  for (let key of Object.keys(colorConvert)) {
47250
47213
  if (typeof colorConvert[key] !== "object") {
@@ -47255,23 +47218,23 @@ var require_third_party = __commonJS({
47255
47218
  key = "ansi";
47256
47219
  }
47257
47220
  if ("ansi16" in suite) {
47258
- styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
47259
- styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
47221
+ styles2.color.ansi[key] = wrapAnsi162(suite.ansi16, 0);
47222
+ styles2.bgColor.ansi[key] = wrapAnsi162(suite.ansi16, 10);
47260
47223
  }
47261
47224
  if ("ansi256" in suite) {
47262
- styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
47263
- styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
47225
+ styles2.color.ansi256[key] = wrapAnsi2562(suite.ansi256, 0);
47226
+ styles2.bgColor.ansi256[key] = wrapAnsi2562(suite.ansi256, 10);
47264
47227
  }
47265
47228
  if ("rgb" in suite) {
47266
- styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
47267
- styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
47229
+ styles2.color.ansi16m[key] = wrapAnsi16m2(suite.rgb, 0);
47230
+ styles2.bgColor.ansi16m[key] = wrapAnsi16m2(suite.rgb, 10);
47268
47231
  }
47269
47232
  }
47270
- return styles;
47233
+ return styles2;
47271
47234
  }
47272
47235
  Object.defineProperty(module22, "exports", {
47273
47236
  enumerable: true,
47274
- get: assembleStyles
47237
+ get: assembleStyles2
47275
47238
  });
47276
47239
  }
47277
47240
  });
@@ -47290,19 +47253,19 @@ var require_third_party = __commonJS({
47290
47253
  var require_supports_color2 = __commonJS2({
47291
47254
  "node_modules/@babel/highlight/node_modules/supports-color/index.js"(exports2, module22) {
47292
47255
  "use strict";
47293
- var os2 = require("os");
47294
- var hasFlag = require_has_flag2();
47295
- var env = process.env;
47256
+ var os3 = require("os");
47257
+ var hasFlag2 = require_has_flag2();
47258
+ var env2 = process.env;
47296
47259
  var forceColor;
47297
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
47260
+ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false")) {
47298
47261
  forceColor = false;
47299
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
47262
+ } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
47300
47263
  forceColor = true;
47301
47264
  }
47302
- if ("FORCE_COLOR" in env) {
47303
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
47265
+ if ("FORCE_COLOR" in env2) {
47266
+ forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0;
47304
47267
  }
47305
- function translateLevel(level) {
47268
+ function translateLevel2(level) {
47306
47269
  if (level === 0) {
47307
47270
  return false;
47308
47271
  }
@@ -47313,14 +47276,14 @@ var require_third_party = __commonJS({
47313
47276
  has16m: level >= 3
47314
47277
  };
47315
47278
  }
47316
- function supportsColor(stream) {
47279
+ function supportsColor2(stream) {
47317
47280
  if (forceColor === false) {
47318
47281
  return 0;
47319
47282
  }
47320
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
47283
+ if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
47321
47284
  return 3;
47322
47285
  }
47323
- if (hasFlag("color=256")) {
47286
+ if (hasFlag2("color=256")) {
47324
47287
  return 2;
47325
47288
  }
47326
47289
  if (stream && !stream.isTTY && forceColor !== true) {
@@ -47328,50 +47291,50 @@ var require_third_party = __commonJS({
47328
47291
  }
47329
47292
  const min = forceColor ? 1 : 0;
47330
47293
  if (process.platform === "win32") {
47331
- const osRelease = os2.release().split(".");
47294
+ const osRelease = os3.release().split(".");
47332
47295
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
47333
47296
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
47334
47297
  }
47335
47298
  return 1;
47336
47299
  }
47337
- if ("CI" in env) {
47338
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
47300
+ if ("CI" in env2) {
47301
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
47339
47302
  return 1;
47340
47303
  }
47341
47304
  return min;
47342
47305
  }
47343
- if ("TEAMCITY_VERSION" in env) {
47344
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
47306
+ if ("TEAMCITY_VERSION" in env2) {
47307
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
47345
47308
  }
47346
- if (env.COLORTERM === "truecolor") {
47309
+ if (env2.COLORTERM === "truecolor") {
47347
47310
  return 3;
47348
47311
  }
47349
- if ("TERM_PROGRAM" in env) {
47350
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
47351
- switch (env.TERM_PROGRAM) {
47312
+ if ("TERM_PROGRAM" in env2) {
47313
+ const version = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
47314
+ switch (env2.TERM_PROGRAM) {
47352
47315
  case "iTerm.app":
47353
47316
  return version >= 3 ? 3 : 2;
47354
47317
  case "Apple_Terminal":
47355
47318
  return 2;
47356
47319
  }
47357
47320
  }
47358
- if (/-256(color)?$/i.test(env.TERM)) {
47321
+ if (/-256(color)?$/i.test(env2.TERM)) {
47359
47322
  return 2;
47360
47323
  }
47361
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
47324
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
47362
47325
  return 1;
47363
47326
  }
47364
- if ("COLORTERM" in env) {
47327
+ if ("COLORTERM" in env2) {
47365
47328
  return 1;
47366
47329
  }
47367
- if (env.TERM === "dumb") {
47330
+ if (env2.TERM === "dumb") {
47368
47331
  return min;
47369
47332
  }
47370
47333
  return min;
47371
47334
  }
47372
47335
  function getSupportLevel(stream) {
47373
- const level = supportsColor(stream);
47374
- return translateLevel(level);
47336
+ const level = supportsColor2(stream);
47337
+ return translateLevel2(level);
47375
47338
  }
47376
47339
  module22.exports = {
47377
47340
  supportsColor: getSupportLevel,
@@ -47424,14 +47387,14 @@ var require_third_party = __commonJS({
47424
47387
  }
47425
47388
  return results;
47426
47389
  }
47427
- function buildStyle(chalk, styles) {
47390
+ function buildStyle(chalk2, styles2) {
47428
47391
  const enabled = {};
47429
- for (const layer of styles) {
47392
+ for (const layer of styles2) {
47430
47393
  for (const style of layer.styles) {
47431
47394
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
47432
47395
  }
47433
47396
  }
47434
- let current = chalk;
47397
+ let current = chalk2;
47435
47398
  for (const styleName of Object.keys(enabled)) {
47436
47399
  if (Array.isArray(enabled[styleName])) {
47437
47400
  if (!(styleName in current)) {
@@ -47446,8 +47409,8 @@ var require_third_party = __commonJS({
47446
47409
  }
47447
47410
  return current;
47448
47411
  }
47449
- module22.exports = (chalk, tmp) => {
47450
- const styles = [];
47412
+ module22.exports = (chalk2, tmp) => {
47413
+ const styles2 = [];
47451
47414
  const chunks = [];
47452
47415
  let chunk = [];
47453
47416
  tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
@@ -47456,25 +47419,25 @@ var require_third_party = __commonJS({
47456
47419
  } else if (style) {
47457
47420
  const str = chunk.join("");
47458
47421
  chunk = [];
47459
- chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
47460
- styles.push({
47422
+ chunks.push(styles2.length === 0 ? str : buildStyle(chalk2, styles2)(str));
47423
+ styles2.push({
47461
47424
  inverse,
47462
47425
  styles: parseStyle(style)
47463
47426
  });
47464
47427
  } else if (close) {
47465
- if (styles.length === 0) {
47428
+ if (styles2.length === 0) {
47466
47429
  throw new Error("Found extraneous } in Chalk template literal");
47467
47430
  }
47468
- chunks.push(buildStyle(chalk, styles)(chunk.join("")));
47431
+ chunks.push(buildStyle(chalk2, styles2)(chunk.join("")));
47469
47432
  chunk = [];
47470
- styles.pop();
47433
+ styles2.pop();
47471
47434
  } else {
47472
47435
  chunk.push(chr);
47473
47436
  }
47474
47437
  });
47475
47438
  chunks.push(chunk.join(""));
47476
- if (styles.length > 0) {
47477
- const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
47439
+ if (styles2.length > 0) {
47440
+ const errMsg = `Chalk template literal is missing ${styles2.length} closing bracket${styles2.length === 1 ? "" : "s"} (\`}\`)`;
47478
47441
  throw new Error(errMsg);
47479
47442
  }
47480
47443
  return chunks.join("");
@@ -47485,97 +47448,97 @@ var require_third_party = __commonJS({
47485
47448
  "node_modules/@babel/highlight/node_modules/chalk/index.js"(exports2, module22) {
47486
47449
  "use strict";
47487
47450
  var escapeStringRegexp = require_escape_string_regexp();
47488
- var ansiStyles = require_ansi_styles();
47489
- var stdoutColor = require_supports_color2().stdout;
47451
+ var ansiStyles2 = require_ansi_styles();
47452
+ var stdoutColor2 = require_supports_color2().stdout;
47490
47453
  var template = require_templates();
47491
47454
  var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
47492
- var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
47455
+ var levelMapping2 = ["ansi", "ansi", "ansi256", "ansi16m"];
47493
47456
  var skipModels = /* @__PURE__ */ new Set(["gray"]);
47494
- var styles = /* @__PURE__ */ Object.create(null);
47495
- function applyOptions(obj, options) {
47457
+ var styles2 = /* @__PURE__ */ Object.create(null);
47458
+ function applyOptions2(obj, options) {
47496
47459
  options = options || {};
47497
- const scLevel = stdoutColor ? stdoutColor.level : 0;
47460
+ const scLevel = stdoutColor2 ? stdoutColor2.level : 0;
47498
47461
  obj.level = options.level === void 0 ? scLevel : options.level;
47499
47462
  obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
47500
47463
  }
47501
47464
  function Chalk(options) {
47502
47465
  if (!this || !(this instanceof Chalk) || this.template) {
47503
- const chalk = {};
47504
- applyOptions(chalk, options);
47505
- chalk.template = function() {
47466
+ const chalk2 = {};
47467
+ applyOptions2(chalk2, options);
47468
+ chalk2.template = function() {
47506
47469
  const args = [].slice.call(arguments);
47507
- return chalkTag.apply(null, [chalk.template].concat(args));
47470
+ return chalkTag.apply(null, [chalk2.template].concat(args));
47508
47471
  };
47509
- Object.setPrototypeOf(chalk, Chalk.prototype);
47510
- Object.setPrototypeOf(chalk.template, chalk);
47511
- chalk.template.constructor = Chalk;
47512
- return chalk.template;
47472
+ Object.setPrototypeOf(chalk2, Chalk.prototype);
47473
+ Object.setPrototypeOf(chalk2.template, chalk2);
47474
+ chalk2.template.constructor = Chalk;
47475
+ return chalk2.template;
47513
47476
  }
47514
- applyOptions(this, options);
47477
+ applyOptions2(this, options);
47515
47478
  }
47516
47479
  if (isSimpleWindowsTerm) {
47517
- ansiStyles.blue.open = "\x1B[94m";
47480
+ ansiStyles2.blue.open = "\x1B[94m";
47518
47481
  }
47519
- for (const key of Object.keys(ansiStyles)) {
47520
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
47521
- styles[key] = {
47482
+ for (const key of Object.keys(ansiStyles2)) {
47483
+ ansiStyles2[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles2[key].close), "g");
47484
+ styles2[key] = {
47522
47485
  get() {
47523
- const codes = ansiStyles[key];
47486
+ const codes = ansiStyles2[key];
47524
47487
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
47525
47488
  }
47526
47489
  };
47527
47490
  }
47528
- styles.visible = {
47491
+ styles2.visible = {
47529
47492
  get() {
47530
47493
  return build.call(this, this._styles || [], true, "visible");
47531
47494
  }
47532
47495
  };
47533
- ansiStyles.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles.color.close), "g");
47534
- for (const model of Object.keys(ansiStyles.color.ansi)) {
47496
+ ansiStyles2.color.closeRe = new RegExp(escapeStringRegexp(ansiStyles2.color.close), "g");
47497
+ for (const model of Object.keys(ansiStyles2.color.ansi)) {
47535
47498
  if (skipModels.has(model)) {
47536
47499
  continue;
47537
47500
  }
47538
- styles[model] = {
47501
+ styles2[model] = {
47539
47502
  get() {
47540
47503
  const level = this.level;
47541
47504
  return function() {
47542
- const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
47505
+ const open = ansiStyles2.color[levelMapping2[level]][model].apply(null, arguments);
47543
47506
  const codes = {
47544
47507
  open,
47545
- close: ansiStyles.color.close,
47546
- closeRe: ansiStyles.color.closeRe
47508
+ close: ansiStyles2.color.close,
47509
+ closeRe: ansiStyles2.color.closeRe
47547
47510
  };
47548
47511
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
47549
47512
  };
47550
47513
  }
47551
47514
  };
47552
47515
  }
47553
- ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles.bgColor.close), "g");
47554
- for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
47516
+ ansiStyles2.bgColor.closeRe = new RegExp(escapeStringRegexp(ansiStyles2.bgColor.close), "g");
47517
+ for (const model of Object.keys(ansiStyles2.bgColor.ansi)) {
47555
47518
  if (skipModels.has(model)) {
47556
47519
  continue;
47557
47520
  }
47558
47521
  const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
47559
- styles[bgModel] = {
47522
+ styles2[bgModel] = {
47560
47523
  get() {
47561
47524
  const level = this.level;
47562
47525
  return function() {
47563
- const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
47526
+ const open = ansiStyles2.bgColor[levelMapping2[level]][model].apply(null, arguments);
47564
47527
  const codes = {
47565
47528
  open,
47566
- close: ansiStyles.bgColor.close,
47567
- closeRe: ansiStyles.bgColor.closeRe
47529
+ close: ansiStyles2.bgColor.close,
47530
+ closeRe: ansiStyles2.bgColor.closeRe
47568
47531
  };
47569
47532
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
47570
47533
  };
47571
47534
  }
47572
47535
  };
47573
47536
  }
47574
- var proto = Object.defineProperties(() => {
47575
- }, styles);
47537
+ var proto2 = Object.defineProperties(() => {
47538
+ }, styles2);
47576
47539
  function build(_styles, _empty, key) {
47577
47540
  const builder2 = function() {
47578
- return applyStyle.apply(builder2, arguments);
47541
+ return applyStyle2.apply(builder2, arguments);
47579
47542
  };
47580
47543
  builder2._styles = _styles;
47581
47544
  builder2._empty = _empty;
@@ -47599,10 +47562,10 @@ var require_third_party = __commonJS({
47599
47562
  }
47600
47563
  });
47601
47564
  builder2.hasGrey = this.hasGrey || key === "gray" || key === "grey";
47602
- builder2.__proto__ = proto;
47565
+ builder2.__proto__ = proto2;
47603
47566
  return builder2;
47604
47567
  }
47605
- function applyStyle() {
47568
+ function applyStyle2() {
47606
47569
  const args = arguments;
47607
47570
  const argsLen = args.length;
47608
47571
  let str = String(arguments[0]);
@@ -47617,18 +47580,18 @@ var require_third_party = __commonJS({
47617
47580
  if (!this.enabled || this.level <= 0 || !str) {
47618
47581
  return this._empty ? "" : str;
47619
47582
  }
47620
- const originalDim = ansiStyles.dim.open;
47583
+ const originalDim = ansiStyles2.dim.open;
47621
47584
  if (isSimpleWindowsTerm && this.hasGrey) {
47622
- ansiStyles.dim.open = "";
47585
+ ansiStyles2.dim.open = "";
47623
47586
  }
47624
47587
  for (const code of this._styles.slice().reverse()) {
47625
47588
  str = code.open + str.replace(code.closeRe, code.open) + code.close;
47626
47589
  str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
47627
47590
  }
47628
- ansiStyles.dim.open = originalDim;
47591
+ ansiStyles2.dim.open = originalDim;
47629
47592
  return str;
47630
47593
  }
47631
- function chalkTag(chalk, strings) {
47594
+ function chalkTag(chalk2, strings) {
47632
47595
  if (!Array.isArray(strings)) {
47633
47596
  return [].slice.call(arguments, 1).join(" ");
47634
47597
  }
@@ -47638,11 +47601,11 @@ var require_third_party = __commonJS({
47638
47601
  parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
47639
47602
  parts.push(String(strings.raw[i]));
47640
47603
  }
47641
- return template(chalk, parts.join(""));
47604
+ return template(chalk2, parts.join(""));
47642
47605
  }
47643
- Object.defineProperties(Chalk.prototype, styles);
47606
+ Object.defineProperties(Chalk.prototype, styles2);
47644
47607
  module22.exports = Chalk();
47645
- module22.exports.supportsColor = stdoutColor;
47608
+ module22.exports.supportsColor = stdoutColor2;
47646
47609
  module22.exports.default = module22.exports;
47647
47610
  }
47648
47611
  });
@@ -47659,17 +47622,17 @@ var require_third_party = __commonJS({
47659
47622
  var _helperValidatorIdentifier = require_lib34();
47660
47623
  var _chalk = require_chalk();
47661
47624
  var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
47662
- function getDefs(chalk) {
47625
+ function getDefs(chalk2) {
47663
47626
  return {
47664
- keyword: chalk.cyan,
47665
- capitalized: chalk.yellow,
47666
- jsxIdentifier: chalk.yellow,
47667
- punctuator: chalk.yellow,
47668
- number: chalk.magenta,
47669
- string: chalk.green,
47670
- regex: chalk.magenta,
47671
- comment: chalk.grey,
47672
- invalid: chalk.white.bgRed.bold
47627
+ keyword: chalk2.cyan,
47628
+ capitalized: chalk2.yellow,
47629
+ jsxIdentifier: chalk2.yellow,
47630
+ punctuator: chalk2.yellow,
47631
+ number: chalk2.magenta,
47632
+ string: chalk2.green,
47633
+ regex: chalk2.magenta,
47634
+ comment: chalk2.grey,
47635
+ invalid: chalk2.white.bgRed.bold
47673
47636
  };
47674
47637
  }
47675
47638
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -47734,8 +47697,8 @@ var require_third_party = __commonJS({
47734
47697
  }
47735
47698
  function highlight(code, options = {}) {
47736
47699
  if (code !== "" && shouldHighlight(options)) {
47737
- const chalk = getChalk(options);
47738
- const defs = getDefs(chalk);
47700
+ const chalk2 = getChalk(options);
47701
+ const defs = getDefs(chalk2);
47739
47702
  return highlightTokens(defs, code);
47740
47703
  } else {
47741
47704
  return code;
@@ -47753,11 +47716,11 @@ var require_third_party = __commonJS({
47753
47716
  exports2.default = _default;
47754
47717
  var _highlight = require_lib210();
47755
47718
  var deprecationWarningShown = false;
47756
- function getDefs(chalk) {
47719
+ function getDefs(chalk2) {
47757
47720
  return {
47758
- gutter: chalk.grey,
47759
- marker: chalk.red.bold,
47760
- message: chalk.red.bold
47721
+ gutter: chalk2.grey,
47722
+ marker: chalk2.red.bold,
47723
+ message: chalk2.red.bold
47761
47724
  };
47762
47725
  }
47763
47726
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -47819,8 +47782,8 @@ var require_third_party = __commonJS({
47819
47782
  }
47820
47783
  function codeFrameColumns(rawLines, loc, opts = {}) {
47821
47784
  const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
47822
- const chalk = (0, _highlight.getChalk)(opts);
47823
- const defs = getDefs(chalk);
47785
+ const chalk2 = (0, _highlight.getChalk)(opts);
47786
+ const defs = getDefs(chalk2);
47824
47787
  const maybeHighlight = (chalkFn, string) => {
47825
47788
  return highlighted ? chalkFn(string) : string;
47826
47789
  };
@@ -47859,7 +47822,7 @@ var require_third_party = __commonJS({
47859
47822
  ${frame}`;
47860
47823
  }
47861
47824
  if (highlighted) {
47862
- return chalk.reset(frame);
47825
+ return chalk2.reset(frame);
47863
47826
  } else {
47864
47827
  return frame;
47865
47828
  }
@@ -52297,15 +52260,15 @@ ${pair.comment}` : item.comment;
52297
52260
  }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, "")
52298
52261
  };
52299
52262
  function shouldWarn(deprecation) {
52300
- const env = typeof process !== "undefined" && process.env || {};
52263
+ const env2 = typeof process !== "undefined" && process.env || {};
52301
52264
  if (deprecation) {
52302
52265
  if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== "undefined")
52303
52266
  return !YAML_SILENCE_DEPRECATION_WARNINGS;
52304
- return !env.YAML_SILENCE_DEPRECATION_WARNINGS;
52267
+ return !env2.YAML_SILENCE_DEPRECATION_WARNINGS;
52305
52268
  }
52306
52269
  if (typeof YAML_SILENCE_WARNINGS !== "undefined")
52307
52270
  return !YAML_SILENCE_WARNINGS;
52308
- return !env.YAML_SILENCE_WARNINGS;
52271
+ return !env2.YAML_SILENCE_WARNINGS;
52309
52272
  }
52310
52273
  function warn(warning, type) {
52311
52274
  if (shouldWarn(false)) {
@@ -54446,7 +54409,7 @@ ${error.message}`;
54446
54409
  "node_modules/ci-info/index.js"(exports2) {
54447
54410
  "use strict";
54448
54411
  var vendors = require_vendors();
54449
- var env = process.env;
54412
+ var env2 = process.env;
54450
54413
  Object.defineProperty(exports2, "_vendors", {
54451
54414
  value: vendors.map(function(v) {
54452
54415
  return v.constant;
@@ -54464,14 +54427,14 @@ ${error.message}`;
54464
54427
  exports2.name = vendor.name;
54465
54428
  switch (typeof vendor.pr) {
54466
54429
  case "string":
54467
- exports2.isPR = !!env[vendor.pr];
54430
+ exports2.isPR = !!env2[vendor.pr];
54468
54431
  break;
54469
54432
  case "object":
54470
54433
  if ("env" in vendor.pr) {
54471
- exports2.isPR = vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne;
54434
+ exports2.isPR = vendor.pr.env in env2 && env2[vendor.pr.env] !== vendor.pr.ne;
54472
54435
  } else if ("any" in vendor.pr) {
54473
54436
  exports2.isPR = vendor.pr.any.some(function(key) {
54474
- return !!env[key];
54437
+ return !!env2[key];
54475
54438
  });
54476
54439
  } else {
54477
54440
  exports2.isPR = checkEnv(vendor.pr);
@@ -54482,12 +54445,12 @@ ${error.message}`;
54482
54445
  }
54483
54446
  }
54484
54447
  });
54485
- exports2.isCI = !!(env.CI || env.CONTINUOUS_INTEGRATION || env.BUILD_NUMBER || env.RUN_ID || exports2.name || false);
54448
+ exports2.isCI = !!(env2.CI || env2.CONTINUOUS_INTEGRATION || env2.BUILD_NUMBER || env2.RUN_ID || exports2.name || false);
54486
54449
  function checkEnv(obj) {
54487
54450
  if (typeof obj === "string")
54488
- return !!env[obj];
54451
+ return !!env2[obj];
54489
54452
  return Object.keys(obj).every(function(k) {
54490
- return env[k] === obj[k];
54453
+ return env2[k] === obj[k];
54491
54454
  });
54492
54455
  }
54493
54456
  }
@@ -56204,7 +56167,7 @@ var require_parser_babel = __commonJS({
56204
56167
  constructor(t) {
56205
56168
  this.var = /* @__PURE__ */ new Set(), this.lexical = /* @__PURE__ */ new Set(), this.functions = /* @__PURE__ */ new Set(), this.flags = t;
56206
56169
  }
56207
- }, os2 = class {
56170
+ }, os3 = class {
56208
56171
  constructor(t, r) {
56209
56172
  this.parser = void 0, this.scopeStack = [], this.inModule = void 0, this.undefinedExports = /* @__PURE__ */ new Map(), this.parser = t, this.inModule = r;
56210
56173
  }
@@ -56297,7 +56260,7 @@ var require_parser_babel = __commonJS({
56297
56260
  constructor() {
56298
56261
  super(...arguments), this.declareFunctions = /* @__PURE__ */ new Set();
56299
56262
  }
56300
- }, rl = class extends os2 {
56263
+ }, rl = class extends os3 {
56301
56264
  createScope(t) {
56302
56265
  return new sl(t);
56303
56266
  }
@@ -58940,7 +58903,7 @@ var require_parser_babel = __commonJS({
58940
58903
  constructor() {
58941
58904
  super(...arguments), this.types = /* @__PURE__ */ new Set(), this.enums = /* @__PURE__ */ new Set(), this.constEnums = /* @__PURE__ */ new Set(), this.classes = /* @__PURE__ */ new Set(), this.exportOnlyBindings = /* @__PURE__ */ new Set();
58942
58905
  }
58943
- }, _l = class extends os2 {
58906
+ }, _l = class extends os3 {
58944
58907
  constructor() {
58945
58908
  super(...arguments), this.importsStack = [];
58946
58909
  }
@@ -62573,7 +62536,7 @@ var require_parser_babel = __commonJS({
62573
62536
  t = Gl(t), super(t, r), this.options = t, this.initializeScopes(), this.plugins = rh(this.options.plugins), this.filename = t.sourceFilename;
62574
62537
  }
62575
62538
  getScopeHandler() {
62576
- return os2;
62539
+ return os3;
62577
62540
  }
62578
62541
  parse() {
62579
62542
  this.enterInitialScopes();
@@ -63954,21 +63917,21 @@ var require_parser_flow = __commonJS({
63954
63917
  return t.c[n];
63955
63918
  }
63956
63919
  }
63957
- function os2(t, n) {
63920
+ function os3(t, n) {
63958
63921
  if (t.fun)
63959
- return os2(t.fun, n);
63922
+ return os3(t.fun, n);
63960
63923
  if (typeof t != "function")
63961
63924
  return t;
63962
63925
  var e = t.length | 0;
63963
63926
  if (e === 0)
63964
63927
  return t.apply(null, n);
63965
63928
  var i = n.length | 0, x = e - i | 0;
63966
- return x == 0 ? t.apply(null, n) : x < 0 ? os2(t.apply(null, n.slice(0, e)), n.slice(e)) : function() {
63929
+ return x == 0 ? t.apply(null, n) : x < 0 ? os3(t.apply(null, n.slice(0, e)), n.slice(e)) : function() {
63967
63930
  for (var c = arguments.length == 0 ? 1 : arguments.length, s = new Array(n.length + c), p = 0; p < n.length; p++)
63968
63931
  s[p] = n[p];
63969
63932
  for (var p = 0; p < arguments.length; p++)
63970
63933
  s[n.length + p] = arguments[p];
63971
- return os2(t, s);
63934
+ return os3(t, s);
63972
63935
  };
63973
63936
  }
63974
63937
  function il() {
@@ -65828,22 +65791,22 @@ var require_parser_flow = __commonJS({
65828
65791
  }
65829
65792
  ei0();
65830
65793
  function u(t, n) {
65831
- return t.length == 1 ? t(n) : os2(t, [n]);
65794
+ return t.length == 1 ? t(n) : os3(t, [n]);
65832
65795
  }
65833
65796
  function o(t, n, e) {
65834
- return t.length == 2 ? t(n, e) : os2(t, [n, e]);
65797
+ return t.length == 2 ? t(n, e) : os3(t, [n, e]);
65835
65798
  }
65836
65799
  function ur(t, n, e, i) {
65837
- return t.length == 3 ? t(n, e, i) : os2(t, [n, e, i]);
65800
+ return t.length == 3 ? t(n, e, i) : os3(t, [n, e, i]);
65838
65801
  }
65839
65802
  function R(t, n, e, i, x) {
65840
- return t.length == 4 ? t(n, e, i, x) : os2(t, [n, e, i, x]);
65803
+ return t.length == 4 ? t(n, e, i, x) : os3(t, [n, e, i, x]);
65841
65804
  }
65842
65805
  function m7(t, n, e, i, x, c) {
65843
- return t.length == 5 ? t(n, e, i, x, c) : os2(t, [n, e, i, x, c]);
65806
+ return t.length == 5 ? t(n, e, i, x, c) : os3(t, [n, e, i, x, c]);
65844
65807
  }
65845
65808
  function ni0(t, n, e, i, x, c, s, p) {
65846
- return t.length == 7 ? t(n, e, i, x, c, s, p) : os2(t, [n, e, i, x, c, s, p]);
65809
+ return t.length == 7 ? t(n, e, i, x, c, s, p) : os3(t, [n, e, i, x, c, s, p]);
65847
65810
  }
65848
65811
  var $A = [St, r(wX), -1], $V = [St, r(DH), -2], U7 = [St, r(AH), -3], ZA = [St, r(fH), -4], Jt = [St, r(KU), -7], ZV = [St, r(LY), -8], QV = [St, r(VU), -9], gn = [St, r(wU), -11], sl = [St, r(uX), -12], rz = [0, v7], ti0 = [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, 0]]], QA = [0, [11, r('File "'), [2, 0, [11, r('", line '), [4, 0, 0, 0, [11, r(yH), [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, [11, r(": "), [2, 0, 0]]]]]]]]]], r('File "%s", line %d, characters %d-%d: %s')], ez = [0, 0, [0, 0, 0], [0, 0, 0]], rN = r(""), eN = r("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"), qv = [0, 0, 0, 0, 1, 0], nz = [0, r(Rx), r(co), r(Ea), r(ca), r(Vo), r(Hf), r(Kx), r(lf), r(xf), r(Gx), r(Sn), r(Ha), r(N7), r(Tf), r(lx), r(po), r(sx), r(Qi), r(Ef), r(Ua), r(oa), r(Ba), r(mf), r(tc), r(Df), r(ga), r(tf), r(kf), r(Ga), r(Uf), r(gx), r(fx), r(go), r(hf), r(_o), r($f), r(xa), r($o), r(C7), r(A7), r(xx), r(Ta), r(ja), r(zf), r(na), r(so), r(Fo), r(wx), r(Ra), r(ho), r(l7), r(la), r(ra), r(sa), r(Bx), r(Ho), r(qx), r(jf), r(If), r(Za), r(jx), r(Af), r(vo), r(Sa), r(sf), r(Qa), r(ua), r(ea), r(Au), r(Tx), r(eo), r(Sf), r(qf), r(ka), r(Mx), r(Fc), r(Xa), r(La), r(yx), r(ic), r(bi), r(So), r(lo), r(Tc), r(Ia), r(hx), r(Ix), r(gc), r(Lf), r(nf), r(tx), r(_a), r(Go), r(kx), r(qa), r(vf), r(ba), r(mx), r(M7), r(Wa), r(bc), r(Vf), r(hi), r(pf), r(ia), r(Ya), r(Uu), r(Ec), r(bo), r(Hx), r(Ca), r(Fx), r(Aa), r(e7), r(af), r(ko), r(ro), r(za), r(Rf), r(ac), r(ya), r(Wo), r(Qf), r(of), r(ff), r(Ax), r(pc), r(Ao), r(jo), r(io), r(Ox), r(ao), r(Nx), r(rf), r(rc), r(Ko), r(Da), r(wc), r(Jo), r(vx), r(hc), r(Px), r(ha), r(Dx), r(nx), r(zx), r(Pa), r(Ux), r(Wx), r(_c), r(xr), r(mc), r(Of), r(yf), r(bx), r(Bo), r(Lx), r(gf), r(nc), r(Kf), r(da), r(ma), r(ex), r(Xf), r(uf), r(Nf), r(ix), r(oo), r(Zo), r(fc), r(lc), r(Xo), r(Va), r(df), r(Mo), r(Qo), r(_i), r(rx), r(Zf), r(zo), r(bf), r(va), r(vc), r(kc), r(Wf), r(Yf), r(qo), r(Cf), r(ta), r(aa), r(sc), r(Zx), r(wa), r(Yo), r($a), r(r7), r(De), r(pa), r(px), r(Ju), r(cx), r(Mf), r(Sc), r(_f), r(Vx), r(Sx), r(Na), r(yc), r(L7), r(yo), r(Uo), r(Jf), r($x), r(wo), r(Pf), r(Io), r(T7), r(no), r(fa), r(xo), r(_x), r(Jx), r(Xx), r(Ka), r(Ro), r(Bf), r(Oa), r(ax), r(Ff), r(Cx), r(uo), r(Ja), r(wf), r(No), r(ec), r(Po), r(To), r(Gf), r(oc), r(ux), r(dc), r(au), r(Oo), r(to), r(Yx), r(wu)], tz = [0, r("first_leading"), r("last_trailing")], uz = [0, 0];
65849
65812
  di(11, sl, uX), di(10, gn, wU), di(9, [St, r(dY), CX], dY), di(8, QV, VU), di(7, ZV, LY), di(6, Jt, KU), di(5, [St, r(rY), -6], rY), di(4, [St, r(IH), -5], IH), di(3, ZA, fH), di(2, U7, AH), di(1, $V, DH), di(0, $A, wX);
@@ -109791,7 +109754,7 @@ m2: `).concat(this.mapper2.__debugToString().split(`
109791
109754
  }
109792
109755
  e.isCommonJsExportPropertyAssignment = _r;
109793
109756
  function lr(n) {
109794
- return (e.isVariableDeclaration(n) ? ri(n) && e.isIdentifier(n.name) && Me(n) : e.isPropertyDeclaration(n) ? os2(n) && u_(n) : e.isPropertySignature(n) && os2(n)) || _r(n);
109757
+ return (e.isVariableDeclaration(n) ? ri(n) && e.isIdentifier(n.name) && Me(n) : e.isPropertyDeclaration(n) ? os3(n) && u_(n) : e.isPropertySignature(n) && os3(n)) || _r(n);
109795
109758
  }
109796
109759
  e.isValidESSymbolDeclaration = lr;
109797
109760
  function Vr(n) {
@@ -111899,10 +111862,10 @@ m2: `).concat(this.mapper2.__debugToString().split(`
111899
111862
  return aa(n, 128);
111900
111863
  }
111901
111864
  e.hasAccessorModifier = _u;
111902
- function os2(n) {
111865
+ function os3(n) {
111903
111866
  return is(n, 64);
111904
111867
  }
111905
- e.hasEffectiveReadonlyModifier = os2;
111868
+ e.hasEffectiveReadonlyModifier = os3;
111906
111869
  function ss(n) {
111907
111870
  return aa(n, 131072);
111908
111871
  }
@@ -114099,7 +114062,7 @@ m2: `).concat(this.mapper2.__debugToString().split(`
114099
114062
  return Se(334);
114100
114063
  }, get updateJSDocDeprecatedTag() {
114101
114064
  return Xe(334);
114102
- }, createJSDocUnknownTag: sc, updateJSDocUnknownTag: su, createJSDocText: _c, updateJSDocText: _u, createJSDocComment: os2, updateJSDocComment: ss, createJsxElement: l_, updateJsxElement: p_, createJsxSelfClosingElement: jo, updateJsxSelfClosingElement: f_, createJsxOpeningElement: Jo, updateJsxOpeningElement: _s, createJsxClosingElement: d_, updateJsxClosingElement: cu, createJsxFragment: Ai, createJsxText: uo, updateJsxText: uu, createJsxOpeningFragment: cs, createJsxJsxClosingFragment: lu, updateJsxFragment: m_, createJsxAttribute: Ia, updateJsxAttribute: cc, createJsxAttributes: g_, updateJsxAttributes: us, createJsxSpreadAttribute: uc, updateJsxSpreadAttribute: y_, createJsxExpression: Oa, updateJsxExpression: Ma, createCaseClause: ls, updateCaseClause: ps, createDefaultClause: h_, updateDefaultClause: Fo, createHeritageClause: Va, updateHeritageClause: pu, createCatchClause: v_, updateCatchClause: lc, createPropertyAssignment: fs, updatePropertyAssignment: pc, createShorthandPropertyAssignment: fc, updateShorthandPropertyAssignment: fu, createSpreadAssignment: ya, updateSpreadAssignment: dc, createEnumMember: po, updateEnumMember: mu, createSourceFile: Wa, updateSourceFile: mc, createBundle: gc, updateBundle: yc, createUnparsedSource: hc, createUnparsedPrologue: ms, createUnparsedPrepend: gu, createUnparsedTextLike: gs, createUnparsedSyntheticReference: vc, createInputFiles: yu, createSyntheticExpression: ys, createSyntaxList: bc, createNotEmittedStatement: hu, createPartiallyEmittedExpression: Ec, updatePartiallyEmittedExpression: Tc, createCommaListExpression: b_, updateCommaListExpression: Cc, createEndOfDeclarationMarker: Dc, createMergeDeclarationMarker: xc, createSyntheticReferenceExpression: Ka, updateSyntheticReferenceExpression: fo, cloneNode: hs, get createComma() {
114065
+ }, createJSDocUnknownTag: sc, updateJSDocUnknownTag: su, createJSDocText: _c, updateJSDocText: _u, createJSDocComment: os3, updateJSDocComment: ss, createJsxElement: l_, updateJsxElement: p_, createJsxSelfClosingElement: jo, updateJsxSelfClosingElement: f_, createJsxOpeningElement: Jo, updateJsxOpeningElement: _s, createJsxClosingElement: d_, updateJsxClosingElement: cu, createJsxFragment: Ai, createJsxText: uo, updateJsxText: uu, createJsxOpeningFragment: cs, createJsxJsxClosingFragment: lu, updateJsxFragment: m_, createJsxAttribute: Ia, updateJsxAttribute: cc, createJsxAttributes: g_, updateJsxAttributes: us, createJsxSpreadAttribute: uc, updateJsxSpreadAttribute: y_, createJsxExpression: Oa, updateJsxExpression: Ma, createCaseClause: ls, updateCaseClause: ps, createDefaultClause: h_, updateDefaultClause: Fo, createHeritageClause: Va, updateHeritageClause: pu, createCatchClause: v_, updateCatchClause: lc, createPropertyAssignment: fs, updatePropertyAssignment: pc, createShorthandPropertyAssignment: fc, updateShorthandPropertyAssignment: fu, createSpreadAssignment: ya, updateSpreadAssignment: dc, createEnumMember: po, updateEnumMember: mu, createSourceFile: Wa, updateSourceFile: mc, createBundle: gc, updateBundle: yc, createUnparsedSource: hc, createUnparsedPrologue: ms, createUnparsedPrepend: gu, createUnparsedTextLike: gs, createUnparsedSyntheticReference: vc, createInputFiles: yu, createSyntheticExpression: ys, createSyntaxList: bc, createNotEmittedStatement: hu, createPartiallyEmittedExpression: Ec, updatePartiallyEmittedExpression: Tc, createCommaListExpression: b_, updateCommaListExpression: Cc, createEndOfDeclarationMarker: Dc, createMergeDeclarationMarker: xc, createSyntheticReferenceExpression: Ka, updateSyntheticReferenceExpression: fo, cloneNode: hs, get createComma() {
114103
114066
  return Re(27);
114104
114067
  }, get createAssignment() {
114105
114068
  return Re(63);
@@ -115568,12 +115531,12 @@ m2: `).concat(this.mapper2.__debugToString().split(`
115568
115531
  function _u(i, o) {
115569
115532
  return i.text !== o ? j(_c(o), i) : i;
115570
115533
  }
115571
- function os2(i, o) {
115534
+ function os3(i, o) {
115572
115535
  var u = he(323);
115573
115536
  return u.comment = i, u.tags = Xn(o), u;
115574
115537
  }
115575
115538
  function ss(i, o, u) {
115576
- return i.comment !== o || i.tags !== u ? j(os2(o, u), i) : i;
115539
+ return i.comment !== o || i.tags !== u ? j(os3(o, u), i) : i;
115577
115540
  }
115578
115541
  function l_(i, o, u) {
115579
115542
  var b = he(281);
@@ -121420,7 +121383,7 @@ m2: `).concat(this.mapper2.__debugToString().split(`
121420
121383
  var d = ke(), P = ur();
121421
121384
  return rr(87), Bn(), ue(Ue(r.createDebuggerStatement(), d), P);
121422
121385
  }
121423
- function os2() {
121386
+ function os3() {
121424
121387
  var d = ke(), P = ur(), $, ce = L() === 20, Pe = Vt(pi);
121425
121388
  return e.isIdentifier(Pe) && Xr(58) ? $ = r.createLabeledStatement(Pe, Ai()) : (li() || rn(Pe), $ = r.createExpressionStatement(Pe), ce && (P = false)), ue(Ue($, d), P);
121426
121389
  }
@@ -121603,7 +121566,7 @@ m2: `).concat(this.mapper2.__debugToString().split(`
121603
121566
  return uo();
121604
121567
  break;
121605
121568
  }
121606
- return os2();
121569
+ return os3();
121607
121570
  }
121608
121571
  function m_(d) {
121609
121572
  return d.kind === 136;
@@ -138306,7 +138269,7 @@ var require_parser_espree = __commonJS({
138306
138269
  return _o(!Eo(bo.f, o, u), o[u]);
138307
138270
  };
138308
138271
  });
138309
- var os2 = k((gl, ns) => {
138272
+ var os3 = k((gl, ns) => {
138310
138273
  var Bo = Se(), To = Ae();
138311
138274
  ns.exports = Bo && To(function() {
138312
138275
  return Object.defineProperty(function() {
@@ -138322,7 +138285,7 @@ var require_parser_espree = __commonJS({
138322
138285
  };
138323
138286
  });
138324
138287
  var Wt = k((cs) => {
138325
- var Do = Z(), Oo = Se(), Lo = Vt(), Vo = os2(), at = jt(), ls = Ot(), Ro = Do.TypeError, qt = Object.defineProperty, jo = Object.getOwnPropertyDescriptor, Mt = "enumerable", Ut = "configurable", zt = "writable";
138288
+ var Do = Z(), Oo = Se(), Lo = Vt(), Vo = os3(), at = jt(), ls = Ot(), Ro = Do.TypeError, qt = Object.defineProperty, jo = Object.getOwnPropertyDescriptor, Mt = "enumerable", Ut = "configurable", zt = "writable";
138326
138289
  cs.f = Oo ? Vo ? function(o, u, l) {
138327
138290
  if (at(o), u = ls(u), at(l), typeof o == "function" && u === "prototype" && "value" in l && zt in l && !l[zt]) {
138328
138291
  var v = jo(o, u);
@@ -145339,11 +145302,11 @@ var require_parser_postcss = __commonJS({
145339
145302
  };
145340
145303
  });
145341
145304
  var us = V((gh, as) => {
145342
- var os2 = Se(), Kc = ss(), Qc = Ur(), Yc = Jr();
145305
+ var os3 = Se(), Kc = ss(), Qc = Ur(), Yc = Jr();
145343
145306
  as.exports = function(e, n, i) {
145344
145307
  for (var c = Kc(n), o = Yc.f, h = Qc.f, l = 0; l < c.length; l++) {
145345
145308
  var f = c[l];
145346
- !os2(e, f) && !(i && os2(i, f)) && o(e, f, h(n, f));
145309
+ !os3(e, f) && !(i && os3(i, f)) && o(e, f, h(n, f));
145347
145310
  }
145348
145311
  };
145349
145312
  });
@@ -156792,9 +156755,9 @@ var require_parser_markdown = __commonJS({
156792
156755
  en.exports = { set: mr, get: Xe, has: Er, enforce: ts, getterFor: ns };
156793
156756
  });
156794
156757
  var nn = H((Gf, tn) => {
156795
- var eu = _e(), is = we(), un = Function.prototype, as = eu && Object.getOwnPropertyDescriptor, ru = is(un, "name"), os2 = ru && function() {
156758
+ var eu = _e(), is = we(), un = Function.prototype, as = eu && Object.getOwnPropertyDescriptor, ru = is(un, "name"), os3 = ru && function() {
156796
156759
  }.name === "something", ss = ru && (!eu || eu && as(un, "name").configurable);
156797
- tn.exports = { EXISTS: ru, PROPER: os2, CONFIGURABLE: ss };
156760
+ tn.exports = { EXISTS: ru, PROPER: os3, CONFIGURABLE: ss };
156798
156761
  });
156799
156762
  var cn = H((Uf, ln) => {
156800
156763
  var ls = ue(), an = me(), cs = we(), on = hr(), Ds = cr(), fs = vr(), sn = rn(), ps = nn().CONFIGURABLE, ds = sn.get, hs = sn.enforce, vs = String(String).split("String");
@@ -161609,7 +161572,7 @@ var require_parser_html = __commonJS({
161609
161572
  }
161610
161573
  var ul = Ee({ "node_modules/escape-string-regexp/index.js"() {
161611
161574
  q();
161612
- } }), os2 = I({ "node_modules/semver/internal/debug.js"(e, r) {
161575
+ } }), os3 = I({ "node_modules/semver/internal/debug.js"(e, r) {
161613
161576
  q();
161614
161577
  var u = typeof Se == "object" && Se.env && Se.env.NODE_DEBUG && /\bsemver\b/i.test(Se.env.NODE_DEBUG) ? function() {
161615
161578
  for (var s = arguments.length, D = new Array(s), n = 0; n < s; n++)
@@ -161624,7 +161587,7 @@ var require_parser_html = __commonJS({
161624
161587
  r.exports = { SEMVER_SPEC_VERSION: u, MAX_LENGTH: s, MAX_SAFE_INTEGER: D, MAX_SAFE_COMPONENT_LENGTH: n };
161625
161588
  } }), tl = I({ "node_modules/semver/internal/re.js"(e, r) {
161626
161589
  q();
161627
- var { MAX_SAFE_COMPONENT_LENGTH: u } = Ds(), s = os2();
161590
+ var { MAX_SAFE_COMPONENT_LENGTH: u } = Ds(), s = os3();
161628
161591
  e = r.exports = {};
161629
161592
  var D = e.re = [], n = e.src = [], i = e.t = {}, p = 0, l = (g, a, c) => {
161630
161593
  let h = p++;
@@ -161644,7 +161607,7 @@ var require_parser_html = __commonJS({
161644
161607
  r.exports = { compareIdentifiers: s, rcompareIdentifiers: D };
161645
161608
  } }), il = I({ "node_modules/semver/classes/semver.js"(e, r) {
161646
161609
  q();
161647
- var u = os2(), { MAX_LENGTH: s, MAX_SAFE_INTEGER: D } = Ds(), { re: n, t: i } = tl(), p = nl(), { compareIdentifiers: l } = sl(), g = class {
161610
+ var u = os3(), { MAX_LENGTH: s, MAX_SAFE_INTEGER: D } = Ds(), { re: n, t: i } = tl(), p = nl(), { compareIdentifiers: l } = sl(), g = class {
161648
161611
  constructor(a, c) {
161649
161612
  if (c = p(c), a instanceof g) {
161650
161613
  if (a.loose === !!c.loose && a.includePrerelease === !!c.includePrerelease)
@@ -172877,21 +172840,21 @@ var require_prettier = __commonJS({
172877
172840
  "node_modules/ansi-styles/index.js"(exports2, module22) {
172878
172841
  "use strict";
172879
172842
  var colorConvert = require_color_convert();
172880
- var wrapAnsi16 = (fn, offset) => function() {
172843
+ var wrapAnsi162 = (fn, offset) => function() {
172881
172844
  const code = fn.apply(colorConvert, arguments);
172882
172845
  return `\x1B[${code + offset}m`;
172883
172846
  };
172884
- var wrapAnsi256 = (fn, offset) => function() {
172847
+ var wrapAnsi2562 = (fn, offset) => function() {
172885
172848
  const code = fn.apply(colorConvert, arguments);
172886
172849
  return `\x1B[${38 + offset};5;${code}m`;
172887
172850
  };
172888
- var wrapAnsi16m = (fn, offset) => function() {
172851
+ var wrapAnsi16m2 = (fn, offset) => function() {
172889
172852
  const rgb = fn.apply(colorConvert, arguments);
172890
172853
  return `\x1B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;
172891
172854
  };
172892
- function assembleStyles() {
172855
+ function assembleStyles2() {
172893
172856
  const codes = /* @__PURE__ */ new Map();
172894
- const styles = {
172857
+ const styles2 = {
172895
172858
  modifier: {
172896
172859
  reset: [0, 0],
172897
172860
  bold: [1, 22],
@@ -172939,48 +172902,48 @@ var require_prettier = __commonJS({
172939
172902
  bgWhiteBright: [107, 49]
172940
172903
  }
172941
172904
  };
172942
- styles.color.grey = styles.color.gray;
172943
- for (const groupName of Object.keys(styles)) {
172944
- const group = styles[groupName];
172905
+ styles2.color.grey = styles2.color.gray;
172906
+ for (const groupName of Object.keys(styles2)) {
172907
+ const group = styles2[groupName];
172945
172908
  for (const styleName of Object.keys(group)) {
172946
172909
  const style = group[styleName];
172947
- styles[styleName] = {
172910
+ styles2[styleName] = {
172948
172911
  open: `\x1B[${style[0]}m`,
172949
172912
  close: `\x1B[${style[1]}m`
172950
172913
  };
172951
- group[styleName] = styles[styleName];
172914
+ group[styleName] = styles2[styleName];
172952
172915
  codes.set(style[0], style[1]);
172953
172916
  }
172954
- Object.defineProperty(styles, groupName, {
172917
+ Object.defineProperty(styles2, groupName, {
172955
172918
  value: group,
172956
172919
  enumerable: false
172957
172920
  });
172958
- Object.defineProperty(styles, "codes", {
172921
+ Object.defineProperty(styles2, "codes", {
172959
172922
  value: codes,
172960
172923
  enumerable: false
172961
172924
  });
172962
172925
  }
172963
172926
  const ansi2ansi = (n) => n;
172964
172927
  const rgb2rgb = (r, g, b) => [r, g, b];
172965
- styles.color.close = "\x1B[39m";
172966
- styles.bgColor.close = "\x1B[49m";
172967
- styles.color.ansi = {
172968
- ansi: wrapAnsi16(ansi2ansi, 0)
172928
+ styles2.color.close = "\x1B[39m";
172929
+ styles2.bgColor.close = "\x1B[49m";
172930
+ styles2.color.ansi = {
172931
+ ansi: wrapAnsi162(ansi2ansi, 0)
172969
172932
  };
172970
- styles.color.ansi256 = {
172971
- ansi256: wrapAnsi256(ansi2ansi, 0)
172933
+ styles2.color.ansi256 = {
172934
+ ansi256: wrapAnsi2562(ansi2ansi, 0)
172972
172935
  };
172973
- styles.color.ansi16m = {
172974
- rgb: wrapAnsi16m(rgb2rgb, 0)
172936
+ styles2.color.ansi16m = {
172937
+ rgb: wrapAnsi16m2(rgb2rgb, 0)
172975
172938
  };
172976
- styles.bgColor.ansi = {
172977
- ansi: wrapAnsi16(ansi2ansi, 10)
172939
+ styles2.bgColor.ansi = {
172940
+ ansi: wrapAnsi162(ansi2ansi, 10)
172978
172941
  };
172979
- styles.bgColor.ansi256 = {
172980
- ansi256: wrapAnsi256(ansi2ansi, 10)
172942
+ styles2.bgColor.ansi256 = {
172943
+ ansi256: wrapAnsi2562(ansi2ansi, 10)
172981
172944
  };
172982
- styles.bgColor.ansi16m = {
172983
- rgb: wrapAnsi16m(rgb2rgb, 10)
172945
+ styles2.bgColor.ansi16m = {
172946
+ rgb: wrapAnsi16m2(rgb2rgb, 10)
172984
172947
  };
172985
172948
  for (let key of Object.keys(colorConvert)) {
172986
172949
  if (typeof colorConvert[key] !== "object") {
@@ -172991,23 +172954,23 @@ var require_prettier = __commonJS({
172991
172954
  key = "ansi";
172992
172955
  }
172993
172956
  if ("ansi16" in suite) {
172994
- styles.color.ansi[key] = wrapAnsi16(suite.ansi16, 0);
172995
- styles.bgColor.ansi[key] = wrapAnsi16(suite.ansi16, 10);
172957
+ styles2.color.ansi[key] = wrapAnsi162(suite.ansi16, 0);
172958
+ styles2.bgColor.ansi[key] = wrapAnsi162(suite.ansi16, 10);
172996
172959
  }
172997
172960
  if ("ansi256" in suite) {
172998
- styles.color.ansi256[key] = wrapAnsi256(suite.ansi256, 0);
172999
- styles.bgColor.ansi256[key] = wrapAnsi256(suite.ansi256, 10);
172961
+ styles2.color.ansi256[key] = wrapAnsi2562(suite.ansi256, 0);
172962
+ styles2.bgColor.ansi256[key] = wrapAnsi2562(suite.ansi256, 10);
173000
172963
  }
173001
172964
  if ("rgb" in suite) {
173002
- styles.color.ansi16m[key] = wrapAnsi16m(suite.rgb, 0);
173003
- styles.bgColor.ansi16m[key] = wrapAnsi16m(suite.rgb, 10);
172965
+ styles2.color.ansi16m[key] = wrapAnsi16m2(suite.rgb, 0);
172966
+ styles2.bgColor.ansi16m[key] = wrapAnsi16m2(suite.rgb, 10);
173004
172967
  }
173005
172968
  }
173006
- return styles;
172969
+ return styles2;
173007
172970
  }
173008
172971
  Object.defineProperty(module22, "exports", {
173009
172972
  enumerable: true,
173010
- get: assembleStyles
172973
+ get: assembleStyles2
173011
172974
  });
173012
172975
  }
173013
172976
  });
@@ -173026,19 +172989,19 @@ var require_prettier = __commonJS({
173026
172989
  var require_supports_color2 = __commonJS22({
173027
172990
  "node_modules/vnopts/node_modules/supports-color/index.js"(exports2, module22) {
173028
172991
  "use strict";
173029
- var os2 = require("os");
173030
- var hasFlag = require_has_flag2();
173031
- var env = process.env;
172992
+ var os3 = require("os");
172993
+ var hasFlag2 = require_has_flag2();
172994
+ var env2 = process.env;
173032
172995
  var forceColor;
173033
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
172996
+ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false")) {
173034
172997
  forceColor = false;
173035
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
172998
+ } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
173036
172999
  forceColor = true;
173037
173000
  }
173038
- if ("FORCE_COLOR" in env) {
173039
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
173001
+ if ("FORCE_COLOR" in env2) {
173002
+ forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0;
173040
173003
  }
173041
- function translateLevel(level) {
173004
+ function translateLevel2(level) {
173042
173005
  if (level === 0) {
173043
173006
  return false;
173044
173007
  }
@@ -173049,14 +173012,14 @@ var require_prettier = __commonJS({
173049
173012
  has16m: level >= 3
173050
173013
  };
173051
173014
  }
173052
- function supportsColor(stream) {
173015
+ function supportsColor2(stream) {
173053
173016
  if (forceColor === false) {
173054
173017
  return 0;
173055
173018
  }
173056
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
173019
+ if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
173057
173020
  return 3;
173058
173021
  }
173059
- if (hasFlag("color=256")) {
173022
+ if (hasFlag2("color=256")) {
173060
173023
  return 2;
173061
173024
  }
173062
173025
  if (stream && !stream.isTTY && forceColor !== true) {
@@ -173064,50 +173027,50 @@ var require_prettier = __commonJS({
173064
173027
  }
173065
173028
  const min = forceColor ? 1 : 0;
173066
173029
  if (process.platform === "win32") {
173067
- const osRelease = os2.release().split(".");
173030
+ const osRelease = os3.release().split(".");
173068
173031
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
173069
173032
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
173070
173033
  }
173071
173034
  return 1;
173072
173035
  }
173073
- if ("CI" in env) {
173074
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
173036
+ if ("CI" in env2) {
173037
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
173075
173038
  return 1;
173076
173039
  }
173077
173040
  return min;
173078
173041
  }
173079
- if ("TEAMCITY_VERSION" in env) {
173080
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
173042
+ if ("TEAMCITY_VERSION" in env2) {
173043
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
173081
173044
  }
173082
- if (env.COLORTERM === "truecolor") {
173045
+ if (env2.COLORTERM === "truecolor") {
173083
173046
  return 3;
173084
173047
  }
173085
- if ("TERM_PROGRAM" in env) {
173086
- const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
173087
- switch (env.TERM_PROGRAM) {
173048
+ if ("TERM_PROGRAM" in env2) {
173049
+ const version2 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
173050
+ switch (env2.TERM_PROGRAM) {
173088
173051
  case "iTerm.app":
173089
173052
  return version2 >= 3 ? 3 : 2;
173090
173053
  case "Apple_Terminal":
173091
173054
  return 2;
173092
173055
  }
173093
173056
  }
173094
- if (/-256(color)?$/i.test(env.TERM)) {
173057
+ if (/-256(color)?$/i.test(env2.TERM)) {
173095
173058
  return 2;
173096
173059
  }
173097
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
173060
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
173098
173061
  return 1;
173099
173062
  }
173100
- if ("COLORTERM" in env) {
173063
+ if ("COLORTERM" in env2) {
173101
173064
  return 1;
173102
173065
  }
173103
- if (env.TERM === "dumb") {
173066
+ if (env2.TERM === "dumb") {
173104
173067
  return min;
173105
173068
  }
173106
173069
  return min;
173107
173070
  }
173108
173071
  function getSupportLevel(stream) {
173109
- const level = supportsColor(stream);
173110
- return translateLevel(level);
173072
+ const level = supportsColor2(stream);
173073
+ return translateLevel2(level);
173111
173074
  }
173112
173075
  module22.exports = {
173113
173076
  supportsColor: getSupportLevel,
@@ -173160,14 +173123,14 @@ var require_prettier = __commonJS({
173160
173123
  }
173161
173124
  return results;
173162
173125
  }
173163
- function buildStyle(chalk, styles) {
173126
+ function buildStyle(chalk2, styles2) {
173164
173127
  const enabled = {};
173165
- for (const layer of styles) {
173128
+ for (const layer of styles2) {
173166
173129
  for (const style of layer.styles) {
173167
173130
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
173168
173131
  }
173169
173132
  }
173170
- let current = chalk;
173133
+ let current = chalk2;
173171
173134
  for (const styleName of Object.keys(enabled)) {
173172
173135
  if (Array.isArray(enabled[styleName])) {
173173
173136
  if (!(styleName in current)) {
@@ -173182,8 +173145,8 @@ var require_prettier = __commonJS({
173182
173145
  }
173183
173146
  return current;
173184
173147
  }
173185
- module22.exports = (chalk, tmp) => {
173186
- const styles = [];
173148
+ module22.exports = (chalk2, tmp) => {
173149
+ const styles2 = [];
173187
173150
  const chunks = [];
173188
173151
  let chunk = [];
173189
173152
  tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
@@ -173192,25 +173155,25 @@ var require_prettier = __commonJS({
173192
173155
  } else if (style) {
173193
173156
  const str = chunk.join("");
173194
173157
  chunk = [];
173195
- chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
173196
- styles.push({
173158
+ chunks.push(styles2.length === 0 ? str : buildStyle(chalk2, styles2)(str));
173159
+ styles2.push({
173197
173160
  inverse,
173198
173161
  styles: parseStyle(style)
173199
173162
  });
173200
173163
  } else if (close) {
173201
- if (styles.length === 0) {
173164
+ if (styles2.length === 0) {
173202
173165
  throw new Error("Found extraneous } in Chalk template literal");
173203
173166
  }
173204
- chunks.push(buildStyle(chalk, styles)(chunk.join("")));
173167
+ chunks.push(buildStyle(chalk2, styles2)(chunk.join("")));
173205
173168
  chunk = [];
173206
- styles.pop();
173169
+ styles2.pop();
173207
173170
  } else {
173208
173171
  chunk.push(chr);
173209
173172
  }
173210
173173
  });
173211
173174
  chunks.push(chunk.join(""));
173212
- if (styles.length > 0) {
173213
- const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
173175
+ if (styles2.length > 0) {
173176
+ const errMsg = `Chalk template literal is missing ${styles2.length} closing bracket${styles2.length === 1 ? "" : "s"} (\`}\`)`;
173214
173177
  throw new Error(errMsg);
173215
173178
  }
173216
173179
  return chunks.join("");
@@ -173221,97 +173184,97 @@ var require_prettier = __commonJS({
173221
173184
  "node_modules/vnopts/node_modules/chalk/index.js"(exports2, module22) {
173222
173185
  "use strict";
173223
173186
  var escapeStringRegexp2 = require_escape_string_regexp();
173224
- var ansiStyles = require_ansi_styles();
173225
- var stdoutColor = require_supports_color2().stdout;
173187
+ var ansiStyles2 = require_ansi_styles();
173188
+ var stdoutColor2 = require_supports_color2().stdout;
173226
173189
  var template = require_templates();
173227
173190
  var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
173228
- var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
173191
+ var levelMapping2 = ["ansi", "ansi", "ansi256", "ansi16m"];
173229
173192
  var skipModels = /* @__PURE__ */ new Set(["gray"]);
173230
- var styles = /* @__PURE__ */ Object.create(null);
173231
- function applyOptions(obj, options) {
173193
+ var styles2 = /* @__PURE__ */ Object.create(null);
173194
+ function applyOptions2(obj, options) {
173232
173195
  options = options || {};
173233
- const scLevel = stdoutColor ? stdoutColor.level : 0;
173196
+ const scLevel = stdoutColor2 ? stdoutColor2.level : 0;
173234
173197
  obj.level = options.level === void 0 ? scLevel : options.level;
173235
173198
  obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
173236
173199
  }
173237
173200
  function Chalk(options) {
173238
173201
  if (!this || !(this instanceof Chalk) || this.template) {
173239
- const chalk = {};
173240
- applyOptions(chalk, options);
173241
- chalk.template = function() {
173202
+ const chalk2 = {};
173203
+ applyOptions2(chalk2, options);
173204
+ chalk2.template = function() {
173242
173205
  const args = [].slice.call(arguments);
173243
- return chalkTag.apply(null, [chalk.template].concat(args));
173206
+ return chalkTag.apply(null, [chalk2.template].concat(args));
173244
173207
  };
173245
- Object.setPrototypeOf(chalk, Chalk.prototype);
173246
- Object.setPrototypeOf(chalk.template, chalk);
173247
- chalk.template.constructor = Chalk;
173248
- return chalk.template;
173208
+ Object.setPrototypeOf(chalk2, Chalk.prototype);
173209
+ Object.setPrototypeOf(chalk2.template, chalk2);
173210
+ chalk2.template.constructor = Chalk;
173211
+ return chalk2.template;
173249
173212
  }
173250
- applyOptions(this, options);
173213
+ applyOptions2(this, options);
173251
173214
  }
173252
173215
  if (isSimpleWindowsTerm) {
173253
- ansiStyles.blue.open = "\x1B[94m";
173216
+ ansiStyles2.blue.open = "\x1B[94m";
173254
173217
  }
173255
- for (const key of Object.keys(ansiStyles)) {
173256
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp2(ansiStyles[key].close), "g");
173257
- styles[key] = {
173218
+ for (const key of Object.keys(ansiStyles2)) {
173219
+ ansiStyles2[key].closeRe = new RegExp(escapeStringRegexp2(ansiStyles2[key].close), "g");
173220
+ styles2[key] = {
173258
173221
  get() {
173259
- const codes = ansiStyles[key];
173222
+ const codes = ansiStyles2[key];
173260
173223
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
173261
173224
  }
173262
173225
  };
173263
173226
  }
173264
- styles.visible = {
173227
+ styles2.visible = {
173265
173228
  get() {
173266
173229
  return build.call(this, this._styles || [], true, "visible");
173267
173230
  }
173268
173231
  };
173269
- ansiStyles.color.closeRe = new RegExp(escapeStringRegexp2(ansiStyles.color.close), "g");
173270
- for (const model of Object.keys(ansiStyles.color.ansi)) {
173232
+ ansiStyles2.color.closeRe = new RegExp(escapeStringRegexp2(ansiStyles2.color.close), "g");
173233
+ for (const model of Object.keys(ansiStyles2.color.ansi)) {
173271
173234
  if (skipModels.has(model)) {
173272
173235
  continue;
173273
173236
  }
173274
- styles[model] = {
173237
+ styles2[model] = {
173275
173238
  get() {
173276
173239
  const level = this.level;
173277
173240
  return function() {
173278
- const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
173241
+ const open = ansiStyles2.color[levelMapping2[level]][model].apply(null, arguments);
173279
173242
  const codes = {
173280
173243
  open,
173281
- close: ansiStyles.color.close,
173282
- closeRe: ansiStyles.color.closeRe
173244
+ close: ansiStyles2.color.close,
173245
+ closeRe: ansiStyles2.color.closeRe
173283
173246
  };
173284
173247
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
173285
173248
  };
173286
173249
  }
173287
173250
  };
173288
173251
  }
173289
- ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp2(ansiStyles.bgColor.close), "g");
173290
- for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
173252
+ ansiStyles2.bgColor.closeRe = new RegExp(escapeStringRegexp2(ansiStyles2.bgColor.close), "g");
173253
+ for (const model of Object.keys(ansiStyles2.bgColor.ansi)) {
173291
173254
  if (skipModels.has(model)) {
173292
173255
  continue;
173293
173256
  }
173294
173257
  const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
173295
- styles[bgModel] = {
173258
+ styles2[bgModel] = {
173296
173259
  get() {
173297
173260
  const level = this.level;
173298
173261
  return function() {
173299
- const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
173262
+ const open = ansiStyles2.bgColor[levelMapping2[level]][model].apply(null, arguments);
173300
173263
  const codes = {
173301
173264
  open,
173302
- close: ansiStyles.bgColor.close,
173303
- closeRe: ansiStyles.bgColor.closeRe
173265
+ close: ansiStyles2.bgColor.close,
173266
+ closeRe: ansiStyles2.bgColor.closeRe
173304
173267
  };
173305
173268
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
173306
173269
  };
173307
173270
  }
173308
173271
  };
173309
173272
  }
173310
- var proto = Object.defineProperties(() => {
173311
- }, styles);
173273
+ var proto2 = Object.defineProperties(() => {
173274
+ }, styles2);
173312
173275
  function build(_styles, _empty, key) {
173313
173276
  const builder2 = function() {
173314
- return applyStyle.apply(builder2, arguments);
173277
+ return applyStyle2.apply(builder2, arguments);
173315
173278
  };
173316
173279
  builder2._styles = _styles;
173317
173280
  builder2._empty = _empty;
@@ -173335,10 +173298,10 @@ var require_prettier = __commonJS({
173335
173298
  }
173336
173299
  });
173337
173300
  builder2.hasGrey = this.hasGrey || key === "gray" || key === "grey";
173338
- builder2.__proto__ = proto;
173301
+ builder2.__proto__ = proto2;
173339
173302
  return builder2;
173340
173303
  }
173341
- function applyStyle() {
173304
+ function applyStyle2() {
173342
173305
  const args = arguments;
173343
173306
  const argsLen = args.length;
173344
173307
  let str = String(arguments[0]);
@@ -173353,18 +173316,18 @@ var require_prettier = __commonJS({
173353
173316
  if (!this.enabled || this.level <= 0 || !str) {
173354
173317
  return this._empty ? "" : str;
173355
173318
  }
173356
- const originalDim = ansiStyles.dim.open;
173319
+ const originalDim = ansiStyles2.dim.open;
173357
173320
  if (isSimpleWindowsTerm && this.hasGrey) {
173358
- ansiStyles.dim.open = "";
173321
+ ansiStyles2.dim.open = "";
173359
173322
  }
173360
173323
  for (const code of this._styles.slice().reverse()) {
173361
173324
  str = code.open + str.replace(code.closeRe, code.open) + code.close;
173362
173325
  str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
173363
173326
  }
173364
- ansiStyles.dim.open = originalDim;
173327
+ ansiStyles2.dim.open = originalDim;
173365
173328
  return str;
173366
173329
  }
173367
- function chalkTag(chalk, strings) {
173330
+ function chalkTag(chalk2, strings) {
173368
173331
  if (!Array.isArray(strings)) {
173369
173332
  return [].slice.call(arguments, 1).join(" ");
173370
173333
  }
@@ -173374,11 +173337,11 @@ var require_prettier = __commonJS({
173374
173337
  parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
173375
173338
  parts.push(String(strings.raw[i]));
173376
173339
  }
173377
- return template(chalk, parts.join(""));
173340
+ return template(chalk2, parts.join(""));
173378
173341
  }
173379
- Object.defineProperties(Chalk.prototype, styles);
173342
+ Object.defineProperties(Chalk.prototype, styles2);
173380
173343
  module22.exports = Chalk();
173381
- module22.exports.supportsColor = stdoutColor;
173344
+ module22.exports.supportsColor = stdoutColor2;
173382
173345
  module22.exports.default = module22.exports;
173383
173346
  }
173384
173347
  });
@@ -174716,19 +174679,19 @@ var require_prettier = __commonJS({
174716
174679
  var require_supports_color22 = __commonJS22({
174717
174680
  "node_modules/@babel/highlight/node_modules/supports-color/index.js"(exports2, module22) {
174718
174681
  "use strict";
174719
- var os2 = require("os");
174720
- var hasFlag = require_has_flag22();
174721
- var env = process.env;
174682
+ var os3 = require("os");
174683
+ var hasFlag2 = require_has_flag22();
174684
+ var env2 = process.env;
174722
174685
  var forceColor;
174723
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
174686
+ if (hasFlag2("no-color") || hasFlag2("no-colors") || hasFlag2("color=false")) {
174724
174687
  forceColor = false;
174725
- } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
174688
+ } else if (hasFlag2("color") || hasFlag2("colors") || hasFlag2("color=true") || hasFlag2("color=always")) {
174726
174689
  forceColor = true;
174727
174690
  }
174728
- if ("FORCE_COLOR" in env) {
174729
- forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
174691
+ if ("FORCE_COLOR" in env2) {
174692
+ forceColor = env2.FORCE_COLOR.length === 0 || parseInt(env2.FORCE_COLOR, 10) !== 0;
174730
174693
  }
174731
- function translateLevel(level) {
174694
+ function translateLevel2(level) {
174732
174695
  if (level === 0) {
174733
174696
  return false;
174734
174697
  }
@@ -174739,14 +174702,14 @@ var require_prettier = __commonJS({
174739
174702
  has16m: level >= 3
174740
174703
  };
174741
174704
  }
174742
- function supportsColor(stream) {
174705
+ function supportsColor2(stream) {
174743
174706
  if (forceColor === false) {
174744
174707
  return 0;
174745
174708
  }
174746
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
174709
+ if (hasFlag2("color=16m") || hasFlag2("color=full") || hasFlag2("color=truecolor")) {
174747
174710
  return 3;
174748
174711
  }
174749
- if (hasFlag("color=256")) {
174712
+ if (hasFlag2("color=256")) {
174750
174713
  return 2;
174751
174714
  }
174752
174715
  if (stream && !stream.isTTY && forceColor !== true) {
@@ -174754,50 +174717,50 @@ var require_prettier = __commonJS({
174754
174717
  }
174755
174718
  const min = forceColor ? 1 : 0;
174756
174719
  if (process.platform === "win32") {
174757
- const osRelease = os2.release().split(".");
174720
+ const osRelease = os3.release().split(".");
174758
174721
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
174759
174722
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
174760
174723
  }
174761
174724
  return 1;
174762
174725
  }
174763
- if ("CI" in env) {
174764
- if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
174726
+ if ("CI" in env2) {
174727
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some((sign) => sign in env2) || env2.CI_NAME === "codeship") {
174765
174728
  return 1;
174766
174729
  }
174767
174730
  return min;
174768
174731
  }
174769
- if ("TEAMCITY_VERSION" in env) {
174770
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
174732
+ if ("TEAMCITY_VERSION" in env2) {
174733
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
174771
174734
  }
174772
- if (env.COLORTERM === "truecolor") {
174735
+ if (env2.COLORTERM === "truecolor") {
174773
174736
  return 3;
174774
174737
  }
174775
- if ("TERM_PROGRAM" in env) {
174776
- const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
174777
- switch (env.TERM_PROGRAM) {
174738
+ if ("TERM_PROGRAM" in env2) {
174739
+ const version2 = parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
174740
+ switch (env2.TERM_PROGRAM) {
174778
174741
  case "iTerm.app":
174779
174742
  return version2 >= 3 ? 3 : 2;
174780
174743
  case "Apple_Terminal":
174781
174744
  return 2;
174782
174745
  }
174783
174746
  }
174784
- if (/-256(color)?$/i.test(env.TERM)) {
174747
+ if (/-256(color)?$/i.test(env2.TERM)) {
174785
174748
  return 2;
174786
174749
  }
174787
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
174750
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM)) {
174788
174751
  return 1;
174789
174752
  }
174790
- if ("COLORTERM" in env) {
174753
+ if ("COLORTERM" in env2) {
174791
174754
  return 1;
174792
174755
  }
174793
- if (env.TERM === "dumb") {
174756
+ if (env2.TERM === "dumb") {
174794
174757
  return min;
174795
174758
  }
174796
174759
  return min;
174797
174760
  }
174798
174761
  function getSupportLevel(stream) {
174799
- const level = supportsColor(stream);
174800
- return translateLevel(level);
174762
+ const level = supportsColor2(stream);
174763
+ return translateLevel2(level);
174801
174764
  }
174802
174765
  module22.exports = {
174803
174766
  supportsColor: getSupportLevel,
@@ -174850,14 +174813,14 @@ var require_prettier = __commonJS({
174850
174813
  }
174851
174814
  return results;
174852
174815
  }
174853
- function buildStyle(chalk, styles) {
174816
+ function buildStyle(chalk2, styles2) {
174854
174817
  const enabled = {};
174855
- for (const layer of styles) {
174818
+ for (const layer of styles2) {
174856
174819
  for (const style of layer.styles) {
174857
174820
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
174858
174821
  }
174859
174822
  }
174860
- let current = chalk;
174823
+ let current = chalk2;
174861
174824
  for (const styleName of Object.keys(enabled)) {
174862
174825
  if (Array.isArray(enabled[styleName])) {
174863
174826
  if (!(styleName in current)) {
@@ -174872,8 +174835,8 @@ var require_prettier = __commonJS({
174872
174835
  }
174873
174836
  return current;
174874
174837
  }
174875
- module22.exports = (chalk, tmp) => {
174876
- const styles = [];
174838
+ module22.exports = (chalk2, tmp) => {
174839
+ const styles2 = [];
174877
174840
  const chunks = [];
174878
174841
  let chunk = [];
174879
174842
  tmp.replace(TEMPLATE_REGEX, (m, escapeChar, inverse, style, close, chr) => {
@@ -174882,25 +174845,25 @@ var require_prettier = __commonJS({
174882
174845
  } else if (style) {
174883
174846
  const str = chunk.join("");
174884
174847
  chunk = [];
174885
- chunks.push(styles.length === 0 ? str : buildStyle(chalk, styles)(str));
174886
- styles.push({
174848
+ chunks.push(styles2.length === 0 ? str : buildStyle(chalk2, styles2)(str));
174849
+ styles2.push({
174887
174850
  inverse,
174888
174851
  styles: parseStyle(style)
174889
174852
  });
174890
174853
  } else if (close) {
174891
- if (styles.length === 0) {
174854
+ if (styles2.length === 0) {
174892
174855
  throw new Error("Found extraneous } in Chalk template literal");
174893
174856
  }
174894
- chunks.push(buildStyle(chalk, styles)(chunk.join("")));
174857
+ chunks.push(buildStyle(chalk2, styles2)(chunk.join("")));
174895
174858
  chunk = [];
174896
- styles.pop();
174859
+ styles2.pop();
174897
174860
  } else {
174898
174861
  chunk.push(chr);
174899
174862
  }
174900
174863
  });
174901
174864
  chunks.push(chunk.join(""));
174902
- if (styles.length > 0) {
174903
- const errMsg = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
174865
+ if (styles2.length > 0) {
174866
+ const errMsg = `Chalk template literal is missing ${styles2.length} closing bracket${styles2.length === 1 ? "" : "s"} (\`}\`)`;
174904
174867
  throw new Error(errMsg);
174905
174868
  }
174906
174869
  return chunks.join("");
@@ -174911,97 +174874,97 @@ var require_prettier = __commonJS({
174911
174874
  "node_modules/@babel/highlight/node_modules/chalk/index.js"(exports2, module22) {
174912
174875
  "use strict";
174913
174876
  var escapeStringRegexp2 = require_escape_string_regexp2();
174914
- var ansiStyles = require_ansi_styles();
174915
- var stdoutColor = require_supports_color22().stdout;
174877
+ var ansiStyles2 = require_ansi_styles();
174878
+ var stdoutColor2 = require_supports_color22().stdout;
174916
174879
  var template = require_templates2();
174917
174880
  var isSimpleWindowsTerm = process.platform === "win32" && !(process.env.TERM || "").toLowerCase().startsWith("xterm");
174918
- var levelMapping = ["ansi", "ansi", "ansi256", "ansi16m"];
174881
+ var levelMapping2 = ["ansi", "ansi", "ansi256", "ansi16m"];
174919
174882
  var skipModels = /* @__PURE__ */ new Set(["gray"]);
174920
- var styles = /* @__PURE__ */ Object.create(null);
174921
- function applyOptions(obj, options) {
174883
+ var styles2 = /* @__PURE__ */ Object.create(null);
174884
+ function applyOptions2(obj, options) {
174922
174885
  options = options || {};
174923
- const scLevel = stdoutColor ? stdoutColor.level : 0;
174886
+ const scLevel = stdoutColor2 ? stdoutColor2.level : 0;
174924
174887
  obj.level = options.level === void 0 ? scLevel : options.level;
174925
174888
  obj.enabled = "enabled" in options ? options.enabled : obj.level > 0;
174926
174889
  }
174927
174890
  function Chalk(options) {
174928
174891
  if (!this || !(this instanceof Chalk) || this.template) {
174929
- const chalk = {};
174930
- applyOptions(chalk, options);
174931
- chalk.template = function() {
174892
+ const chalk2 = {};
174893
+ applyOptions2(chalk2, options);
174894
+ chalk2.template = function() {
174932
174895
  const args = [].slice.call(arguments);
174933
- return chalkTag.apply(null, [chalk.template].concat(args));
174896
+ return chalkTag.apply(null, [chalk2.template].concat(args));
174934
174897
  };
174935
- Object.setPrototypeOf(chalk, Chalk.prototype);
174936
- Object.setPrototypeOf(chalk.template, chalk);
174937
- chalk.template.constructor = Chalk;
174938
- return chalk.template;
174898
+ Object.setPrototypeOf(chalk2, Chalk.prototype);
174899
+ Object.setPrototypeOf(chalk2.template, chalk2);
174900
+ chalk2.template.constructor = Chalk;
174901
+ return chalk2.template;
174939
174902
  }
174940
- applyOptions(this, options);
174903
+ applyOptions2(this, options);
174941
174904
  }
174942
174905
  if (isSimpleWindowsTerm) {
174943
- ansiStyles.blue.open = "\x1B[94m";
174906
+ ansiStyles2.blue.open = "\x1B[94m";
174944
174907
  }
174945
- for (const key of Object.keys(ansiStyles)) {
174946
- ansiStyles[key].closeRe = new RegExp(escapeStringRegexp2(ansiStyles[key].close), "g");
174947
- styles[key] = {
174908
+ for (const key of Object.keys(ansiStyles2)) {
174909
+ ansiStyles2[key].closeRe = new RegExp(escapeStringRegexp2(ansiStyles2[key].close), "g");
174910
+ styles2[key] = {
174948
174911
  get() {
174949
- const codes = ansiStyles[key];
174912
+ const codes = ansiStyles2[key];
174950
174913
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, key);
174951
174914
  }
174952
174915
  };
174953
174916
  }
174954
- styles.visible = {
174917
+ styles2.visible = {
174955
174918
  get() {
174956
174919
  return build.call(this, this._styles || [], true, "visible");
174957
174920
  }
174958
174921
  };
174959
- ansiStyles.color.closeRe = new RegExp(escapeStringRegexp2(ansiStyles.color.close), "g");
174960
- for (const model of Object.keys(ansiStyles.color.ansi)) {
174922
+ ansiStyles2.color.closeRe = new RegExp(escapeStringRegexp2(ansiStyles2.color.close), "g");
174923
+ for (const model of Object.keys(ansiStyles2.color.ansi)) {
174961
174924
  if (skipModels.has(model)) {
174962
174925
  continue;
174963
174926
  }
174964
- styles[model] = {
174927
+ styles2[model] = {
174965
174928
  get() {
174966
174929
  const level = this.level;
174967
174930
  return function() {
174968
- const open = ansiStyles.color[levelMapping[level]][model].apply(null, arguments);
174931
+ const open = ansiStyles2.color[levelMapping2[level]][model].apply(null, arguments);
174969
174932
  const codes = {
174970
174933
  open,
174971
- close: ansiStyles.color.close,
174972
- closeRe: ansiStyles.color.closeRe
174934
+ close: ansiStyles2.color.close,
174935
+ closeRe: ansiStyles2.color.closeRe
174973
174936
  };
174974
174937
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
174975
174938
  };
174976
174939
  }
174977
174940
  };
174978
174941
  }
174979
- ansiStyles.bgColor.closeRe = new RegExp(escapeStringRegexp2(ansiStyles.bgColor.close), "g");
174980
- for (const model of Object.keys(ansiStyles.bgColor.ansi)) {
174942
+ ansiStyles2.bgColor.closeRe = new RegExp(escapeStringRegexp2(ansiStyles2.bgColor.close), "g");
174943
+ for (const model of Object.keys(ansiStyles2.bgColor.ansi)) {
174981
174944
  if (skipModels.has(model)) {
174982
174945
  continue;
174983
174946
  }
174984
174947
  const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
174985
- styles[bgModel] = {
174948
+ styles2[bgModel] = {
174986
174949
  get() {
174987
174950
  const level = this.level;
174988
174951
  return function() {
174989
- const open = ansiStyles.bgColor[levelMapping[level]][model].apply(null, arguments);
174952
+ const open = ansiStyles2.bgColor[levelMapping2[level]][model].apply(null, arguments);
174990
174953
  const codes = {
174991
174954
  open,
174992
- close: ansiStyles.bgColor.close,
174993
- closeRe: ansiStyles.bgColor.closeRe
174955
+ close: ansiStyles2.bgColor.close,
174956
+ closeRe: ansiStyles2.bgColor.closeRe
174994
174957
  };
174995
174958
  return build.call(this, this._styles ? this._styles.concat(codes) : [codes], this._empty, model);
174996
174959
  };
174997
174960
  }
174998
174961
  };
174999
174962
  }
175000
- var proto = Object.defineProperties(() => {
175001
- }, styles);
174963
+ var proto2 = Object.defineProperties(() => {
174964
+ }, styles2);
175002
174965
  function build(_styles, _empty, key) {
175003
174966
  const builder2 = function() {
175004
- return applyStyle.apply(builder2, arguments);
174967
+ return applyStyle2.apply(builder2, arguments);
175005
174968
  };
175006
174969
  builder2._styles = _styles;
175007
174970
  builder2._empty = _empty;
@@ -175025,10 +174988,10 @@ var require_prettier = __commonJS({
175025
174988
  }
175026
174989
  });
175027
174990
  builder2.hasGrey = this.hasGrey || key === "gray" || key === "grey";
175028
- builder2.__proto__ = proto;
174991
+ builder2.__proto__ = proto2;
175029
174992
  return builder2;
175030
174993
  }
175031
- function applyStyle() {
174994
+ function applyStyle2() {
175032
174995
  const args = arguments;
175033
174996
  const argsLen = args.length;
175034
174997
  let str = String(arguments[0]);
@@ -175043,18 +175006,18 @@ var require_prettier = __commonJS({
175043
175006
  if (!this.enabled || this.level <= 0 || !str) {
175044
175007
  return this._empty ? "" : str;
175045
175008
  }
175046
- const originalDim = ansiStyles.dim.open;
175009
+ const originalDim = ansiStyles2.dim.open;
175047
175010
  if (isSimpleWindowsTerm && this.hasGrey) {
175048
- ansiStyles.dim.open = "";
175011
+ ansiStyles2.dim.open = "";
175049
175012
  }
175050
175013
  for (const code of this._styles.slice().reverse()) {
175051
175014
  str = code.open + str.replace(code.closeRe, code.open) + code.close;
175052
175015
  str = str.replace(/\r?\n/g, `${code.close}$&${code.open}`);
175053
175016
  }
175054
- ansiStyles.dim.open = originalDim;
175017
+ ansiStyles2.dim.open = originalDim;
175055
175018
  return str;
175056
175019
  }
175057
- function chalkTag(chalk, strings) {
175020
+ function chalkTag(chalk2, strings) {
175058
175021
  if (!Array.isArray(strings)) {
175059
175022
  return [].slice.call(arguments, 1).join(" ");
175060
175023
  }
@@ -175064,11 +175027,11 @@ var require_prettier = __commonJS({
175064
175027
  parts.push(String(args[i - 1]).replace(/[{}\\]/g, "\\$&"));
175065
175028
  parts.push(String(strings.raw[i]));
175066
175029
  }
175067
- return template(chalk, parts.join(""));
175030
+ return template(chalk2, parts.join(""));
175068
175031
  }
175069
- Object.defineProperties(Chalk.prototype, styles);
175032
+ Object.defineProperties(Chalk.prototype, styles2);
175070
175033
  module22.exports = Chalk();
175071
- module22.exports.supportsColor = stdoutColor;
175034
+ module22.exports.supportsColor = stdoutColor2;
175072
175035
  module22.exports.default = module22.exports;
175073
175036
  }
175074
175037
  });
@@ -175085,17 +175048,17 @@ var require_prettier = __commonJS({
175085
175048
  var _helperValidatorIdentifier = require_lib35();
175086
175049
  var _chalk = require_chalk2();
175087
175050
  var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
175088
- function getDefs(chalk) {
175051
+ function getDefs(chalk2) {
175089
175052
  return {
175090
- keyword: chalk.cyan,
175091
- capitalized: chalk.yellow,
175092
- jsxIdentifier: chalk.yellow,
175093
- punctuator: chalk.yellow,
175094
- number: chalk.magenta,
175095
- string: chalk.green,
175096
- regex: chalk.magenta,
175097
- comment: chalk.grey,
175098
- invalid: chalk.white.bgRed.bold
175053
+ keyword: chalk2.cyan,
175054
+ capitalized: chalk2.yellow,
175055
+ jsxIdentifier: chalk2.yellow,
175056
+ punctuator: chalk2.yellow,
175057
+ number: chalk2.magenta,
175058
+ string: chalk2.green,
175059
+ regex: chalk2.magenta,
175060
+ comment: chalk2.grey,
175061
+ invalid: chalk2.white.bgRed.bold
175099
175062
  };
175100
175063
  }
175101
175064
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -175160,8 +175123,8 @@ var require_prettier = __commonJS({
175160
175123
  }
175161
175124
  function highlight(code, options = {}) {
175162
175125
  if (code !== "" && shouldHighlight(options)) {
175163
- const chalk = getChalk(options);
175164
- const defs = getDefs(chalk);
175126
+ const chalk2 = getChalk(options);
175127
+ const defs = getDefs(chalk2);
175165
175128
  return highlightTokens(defs, code);
175166
175129
  } else {
175167
175130
  return code;
@@ -175179,11 +175142,11 @@ var require_prettier = __commonJS({
175179
175142
  exports2.default = _default;
175180
175143
  var _highlight = require_lib42();
175181
175144
  var deprecationWarningShown = false;
175182
- function getDefs(chalk) {
175145
+ function getDefs(chalk2) {
175183
175146
  return {
175184
- gutter: chalk.grey,
175185
- marker: chalk.red.bold,
175186
- message: chalk.red.bold
175147
+ gutter: chalk2.grey,
175148
+ marker: chalk2.red.bold,
175149
+ message: chalk2.red.bold
175187
175150
  };
175188
175151
  }
175189
175152
  var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
@@ -175245,8 +175208,8 @@ var require_prettier = __commonJS({
175245
175208
  }
175246
175209
  function codeFrameColumns(rawLines, loc, opts = {}) {
175247
175210
  const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
175248
- const chalk = (0, _highlight.getChalk)(opts);
175249
- const defs = getDefs(chalk);
175211
+ const chalk2 = (0, _highlight.getChalk)(opts);
175212
+ const defs = getDefs(chalk2);
175250
175213
  const maybeHighlight = (chalkFn, string) => {
175251
175214
  return highlighted ? chalkFn(string) : string;
175252
175215
  };
@@ -175285,7 +175248,7 @@ var require_prettier = __commonJS({
175285
175248
  ${frame}`;
175286
175249
  }
175287
175250
  if (highlighted) {
175288
- return chalk.reset(frame);
175251
+ return chalk2.reset(frame);
175289
175252
  } else {
175290
175253
  return frame;
175291
175254
  }
@@ -182608,8 +182571,8 @@ ${error.message}`;
182608
182571
  var require_homedir = __commonJS22({
182609
182572
  "node_modules/resolve/lib/homedir.js"(exports2, module22) {
182610
182573
  "use strict";
182611
- var os2 = require("os");
182612
- module22.exports = os2.homedir || function homedir() {
182574
+ var os3 = require("os");
182575
+ module22.exports = os3.homedir || function homedir() {
182613
182576
  var home = process.env.HOME;
182614
182577
  var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;
182615
182578
  if (process.platform === "win32") {
@@ -189224,8 +189187,8 @@ ${fromBody}`;
189224
189187
  });
189225
189188
  exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
189226
189189
  var fs = require("fs");
189227
- var os2 = require("os");
189228
- var CPU_COUNT = Math.max(os2.cpus().length, 1);
189190
+ var os3 = require("os");
189191
+ var CPU_COUNT = Math.max(os3.cpus().length, 1);
189229
189192
  exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
189230
189193
  lstat: fs.lstat,
189231
189194
  lstatSync: fs.lstatSync,
@@ -202801,11 +202764,11 @@ ${extracted.content}`;
202801
202764
  var CompileStylesheetMetadata = class {
202802
202765
  constructor({
202803
202766
  moduleUrl,
202804
- styles,
202767
+ styles: styles2,
202805
202768
  styleUrls
202806
202769
  } = {}) {
202807
202770
  this.moduleUrl = moduleUrl || null;
202808
- this.styles = _normalizeArray(styles);
202771
+ this.styles = _normalizeArray(styles2);
202809
202772
  this.styleUrls = _normalizeArray(styleUrls);
202810
202773
  }
202811
202774
  };
@@ -202816,7 +202779,7 @@ ${extracted.content}`;
202816
202779
  template,
202817
202780
  templateUrl,
202818
202781
  htmlAst,
202819
- styles,
202782
+ styles: styles2,
202820
202783
  styleUrls,
202821
202784
  externalStylesheets,
202822
202785
  animations,
@@ -202829,7 +202792,7 @@ ${extracted.content}`;
202829
202792
  this.template = template;
202830
202793
  this.templateUrl = templateUrl;
202831
202794
  this.htmlAst = htmlAst;
202832
- this.styles = _normalizeArray(styles);
202795
+ this.styles = _normalizeArray(styles2);
202833
202796
  this.styleUrls = _normalizeArray(styleUrls);
202834
202797
  this.externalStylesheets = _normalizeArray(externalStylesheets);
202835
202798
  this.animations = animations ? flatten(animations) : [];
@@ -210698,7 +210661,7 @@ var require_resolveCommand = __commonJS({
210698
210661
  var which = require_which();
210699
210662
  var getPathKey = require_path_key();
210700
210663
  function resolveCommandAttempt(parsed, withoutPathExt) {
210701
- const env = parsed.options.env || process.env;
210664
+ const env2 = parsed.options.env || process.env;
210702
210665
  const cwd = process.cwd();
210703
210666
  const hasCustomCwd = parsed.options.cwd != null;
210704
210667
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
@@ -210711,7 +210674,7 @@ var require_resolveCommand = __commonJS({
210711
210674
  let resolved;
210712
210675
  try {
210713
210676
  resolved = which.sync(parsed.command, {
210714
- path: env[getPathKey({ env })],
210677
+ path: env2[getPathKey({ env: env2 })],
210715
210678
  pathExt: withoutPathExt ? path6.delimiter : void 0
210716
210679
  });
210717
210680
  } catch (e) {
@@ -210926,7 +210889,7 @@ var require_cross_spawn = __commonJS({
210926
210889
  var cp = require("child_process");
210927
210890
  var parse = require_parse();
210928
210891
  var enoent = require_enoent();
210929
- function spawn2(command2, args, options) {
210892
+ function spawn(command2, args, options) {
210930
210893
  const parsed = parse(command2, args, options);
210931
210894
  const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
210932
210895
  enoent.hookChildProcess(spawned, parsed);
@@ -210938,8 +210901,8 @@ var require_cross_spawn = __commonJS({
210938
210901
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
210939
210902
  return result;
210940
210903
  }
210941
- module2.exports = spawn2;
210942
- module2.exports.spawn = spawn2;
210904
+ module2.exports = spawn;
210905
+ module2.exports.spawn = spawn;
210943
210906
  module2.exports.sync = spawnSync;
210944
210907
  module2.exports._parse = parse;
210945
210908
  module2.exports._enoent = enoent;
@@ -210983,11 +210946,11 @@ var require_signals = __commonJS({
210983
210946
  // ../../node_modules/signal-exit/index.js
210984
210947
  var require_signal_exit = __commonJS({
210985
210948
  "../../node_modules/signal-exit/index.js"(exports, module2) {
210986
- var process4 = global.process;
210987
- var processOk = function(process5) {
210988
- return process5 && typeof process5 === "object" && typeof process5.removeListener === "function" && typeof process5.emit === "function" && typeof process5.reallyExit === "function" && typeof process5.listeners === "function" && typeof process5.kill === "function" && typeof process5.pid === "number" && typeof process5.on === "function";
210949
+ var process5 = global.process;
210950
+ var processOk = function(process6) {
210951
+ return process6 && typeof process6 === "object" && typeof process6.removeListener === "function" && typeof process6.emit === "function" && typeof process6.reallyExit === "function" && typeof process6.listeners === "function" && typeof process6.kill === "function" && typeof process6.pid === "number" && typeof process6.on === "function";
210989
210952
  };
210990
- if (!processOk(process4)) {
210953
+ if (!processOk(process5)) {
210991
210954
  module2.exports = function() {
210992
210955
  return function() {
210993
210956
  };
@@ -210995,15 +210958,15 @@ var require_signal_exit = __commonJS({
210995
210958
  } else {
210996
210959
  assert = require("assert");
210997
210960
  signals = require_signals();
210998
- isWin = /^win/i.test(process4.platform);
210961
+ isWin = /^win/i.test(process5.platform);
210999
210962
  EE = require("events");
211000
210963
  if (typeof EE !== "function") {
211001
210964
  EE = EE.EventEmitter;
211002
210965
  }
211003
- if (process4.__signal_exit_emitter__) {
211004
- emitter = process4.__signal_exit_emitter__;
210966
+ if (process5.__signal_exit_emitter__) {
210967
+ emitter = process5.__signal_exit_emitter__;
211005
210968
  } else {
211006
- emitter = process4.__signal_exit_emitter__ = new EE();
210969
+ emitter = process5.__signal_exit_emitter__ = new EE();
211007
210970
  emitter.count = 0;
211008
210971
  emitter.emitted = {};
211009
210972
  }
@@ -211040,12 +211003,12 @@ var require_signal_exit = __commonJS({
211040
211003
  loaded = false;
211041
211004
  signals.forEach(function(sig) {
211042
211005
  try {
211043
- process4.removeListener(sig, sigListeners[sig]);
211006
+ process5.removeListener(sig, sigListeners[sig]);
211044
211007
  } catch (er) {
211045
211008
  }
211046
211009
  });
211047
- process4.emit = originalProcessEmit;
211048
- process4.reallyExit = originalProcessReallyExit;
211010
+ process5.emit = originalProcessEmit;
211011
+ process5.reallyExit = originalProcessReallyExit;
211049
211012
  emitter.count -= 1;
211050
211013
  };
211051
211014
  module2.exports.unload = unload;
@@ -211062,7 +211025,7 @@ var require_signal_exit = __commonJS({
211062
211025
  if (!processOk(global.process)) {
211063
211026
  return;
211064
211027
  }
211065
- var listeners = process4.listeners(sig);
211028
+ var listeners = process5.listeners(sig);
211066
211029
  if (listeners.length === emitter.count) {
211067
211030
  unload();
211068
211031
  emit("exit", null, sig);
@@ -211070,7 +211033,7 @@ var require_signal_exit = __commonJS({
211070
211033
  if (isWin && sig === "SIGHUP") {
211071
211034
  sig = "SIGINT";
211072
211035
  }
211073
- process4.kill(process4.pid, sig);
211036
+ process5.kill(process5.pid, sig);
211074
211037
  }
211075
211038
  };
211076
211039
  });
@@ -211086,35 +211049,35 @@ var require_signal_exit = __commonJS({
211086
211049
  emitter.count += 1;
211087
211050
  signals = signals.filter(function(sig) {
211088
211051
  try {
211089
- process4.on(sig, sigListeners[sig]);
211052
+ process5.on(sig, sigListeners[sig]);
211090
211053
  return true;
211091
211054
  } catch (er) {
211092
211055
  return false;
211093
211056
  }
211094
211057
  });
211095
- process4.emit = processEmit;
211096
- process4.reallyExit = processReallyExit;
211058
+ process5.emit = processEmit;
211059
+ process5.reallyExit = processReallyExit;
211097
211060
  };
211098
211061
  module2.exports.load = load;
211099
- originalProcessReallyExit = process4.reallyExit;
211062
+ originalProcessReallyExit = process5.reallyExit;
211100
211063
  processReallyExit = function processReallyExit2(code) {
211101
211064
  if (!processOk(global.process)) {
211102
211065
  return;
211103
211066
  }
211104
- process4.exitCode = code || 0;
211105
- emit("exit", process4.exitCode, null);
211106
- emit("afterexit", process4.exitCode, null);
211107
- originalProcessReallyExit.call(process4, process4.exitCode);
211067
+ process5.exitCode = code || 0;
211068
+ emit("exit", process5.exitCode, null);
211069
+ emit("afterexit", process5.exitCode, null);
211070
+ originalProcessReallyExit.call(process5, process5.exitCode);
211108
211071
  };
211109
- originalProcessEmit = process4.emit;
211072
+ originalProcessEmit = process5.emit;
211110
211073
  processEmit = function processEmit2(ev, arg) {
211111
211074
  if (ev === "exit" && processOk(global.process)) {
211112
211075
  if (arg !== void 0) {
211113
- process4.exitCode = arg;
211076
+ process5.exitCode = arg;
211114
211077
  }
211115
211078
  var ret = originalProcessEmit.apply(this, arguments);
211116
- emit("exit", process4.exitCode, null);
211117
- emit("afterexit", process4.exitCode, null);
211079
+ emit("exit", process5.exitCode, null);
211080
+ emit("afterexit", process5.exitCode, null);
211118
211081
  return ret;
211119
211082
  } else {
211120
211083
  return originalProcessEmit.apply(this, arguments);
@@ -214580,7 +214543,7 @@ var require_constants4 = __commonJS({
214580
214543
  "use strict";
214581
214544
  var { sep } = require("path");
214582
214545
  var { platform } = process;
214583
- var os2 = require("os");
214546
+ var os3 = require("os");
214584
214547
  exports.EV_ALL = "all";
214585
214548
  exports.EV_READY = "ready";
214586
214549
  exports.EV_ADD = "add";
@@ -214633,7 +214596,7 @@ var require_constants4 = __commonJS({
214633
214596
  exports.isWindows = platform === "win32";
214634
214597
  exports.isMacos = platform === "darwin";
214635
214598
  exports.isLinux = platform === "linux";
214636
- exports.isIBMi = os2.type() === "OS400";
214599
+ exports.isIBMi = os3.type() === "OS400";
214637
214600
  }
214638
214601
  });
214639
214602
 
@@ -216182,7 +216145,7 @@ var require_chokidar = __commonJS({
216182
216145
  // ../../node_modules/openurl/openurl.js
216183
216146
  var require_openurl = __commonJS({
216184
216147
  "../../node_modules/openurl/openurl.js"(exports) {
216185
- var spawn2 = require("child_process").spawn;
216148
+ var spawn = require("child_process").spawn;
216186
216149
  var command2;
216187
216150
  switch (process.platform) {
216188
216151
  case "darwin":
@@ -216198,7 +216161,7 @@ var require_openurl = __commonJS({
216198
216161
  throw new Error("Unsupported platform: " + process.platform);
216199
216162
  }
216200
216163
  function open(url2, callback) {
216201
- var child = spawn2(command2, [url2]);
216164
+ var child = spawn(command2, [url2]);
216202
216165
  var errorText = "";
216203
216166
  child.stderr.setEncoding("utf8");
216204
216167
  child.stderr.on("data", function(data) {
@@ -216245,9 +216208,6 @@ __export(deploy_contracts_exports, {
216245
216208
  });
216246
216209
  module.exports = __toCommonJS(deploy_contracts_exports);
216247
216210
 
216248
- // src/utils/exec.ts
216249
- var import_child_process = require("child_process");
216250
-
216251
216211
  // src/utils/deferred.ts
216252
216212
  function deferred() {
216253
216213
  let resolve = null;
@@ -216259,21 +216219,9 @@ function deferred() {
216259
216219
  return [resolve, reject, promise];
216260
216220
  }
216261
216221
 
216262
- // src/utils/exec.ts
216263
- function execLog(command2, options) {
216264
- return __async(this, null, function* () {
216265
- console.log("Cmd:");
216266
- console.log([command2, ...options].join(" "));
216267
- const [resolve, , promise] = deferred();
216268
- const child = (0, import_child_process.spawn)(command2, options, { stdio: [process.stdin, process.stdout, process.stderr] });
216269
- child.on("exit", (code) => resolve({ exitCode: code != null ? code : 0, child }));
216270
- return promise;
216271
- });
216272
- }
216273
-
216274
216222
  // src/utils/ids.ts
216275
216223
  var import_fs = require("fs");
216276
- var IDregex = new RegExp(new RegExp('(?<=uint256 constant ID = uint256\\(keccak256\\(")(.*)(?="\\))'));
216224
+ var IDregex = new RegExp(/(?<=uint256 constant ID = uint256\(keccak256\(")(.*)(?="\))/);
216277
216225
  function extractIdFromFile(path6) {
216278
216226
  const content = (0, import_fs.readFileSync)(path6).toString();
216279
216227
  const regexResult = IDregex.exec(content);
@@ -216286,26 +216234,23 @@ var import_ejs = __toESM(require_ejs());
216286
216234
  var import_path = __toESM(require("path"));
216287
216235
  var contractsDir = import_path.default.join(__dirname, "../../src/contracts");
216288
216236
  var stubLibDeploy = (0, import_promises.readFile)(import_path.default.join(contractsDir, "LibDeployStub.sol"));
216289
- function generateLibDeploy(configPath, out, systems) {
216290
- return __async(this, null, function* () {
216291
- const config = JSON.parse(yield (0, import_promises.readFile)(configPath, { encoding: "utf8" }));
216292
- if (systems) {
216293
- const systemsArray = Array.isArray(systems) ? systems : [systems];
216294
- config.systems = config.systems.filter((system) => systemsArray.includes(system.name));
216295
- }
216296
- console.log(`Deploy config:
216237
+ async function generateLibDeploy(configPath, out, systems) {
216238
+ const config = JSON.parse(await (0, import_promises.readFile)(configPath, { encoding: "utf8" }));
216239
+ config.initializers ??= [];
216240
+ if (systems) {
216241
+ const systemsArray = Array.isArray(systems) ? systems : [systems];
216242
+ config.systems = config.systems.filter((system) => systemsArray.includes(system.name));
216243
+ }
216244
+ console.log(`Deploy config:
216297
216245
  `, JSON.stringify(config, null, 2));
216298
- console.log("Generating deployment script");
216299
- const LibDeploy = yield import_ejs.default.renderFile(import_path.default.join(contractsDir, "LibDeploy.ejs"), config, { async: true });
216300
- const libDeployPath = import_path.default.join(out, "LibDeploy.sol");
216301
- yield (0, import_promises.writeFile)(libDeployPath, LibDeploy);
216302
- return libDeployPath;
216303
- });
216246
+ console.log("Generating deployment script");
216247
+ const LibDeploy = await import_ejs.default.renderFile(import_path.default.join(contractsDir, "LibDeploy.ejs"), config, { async: true });
216248
+ const libDeployPath = import_path.default.join(out, "LibDeploy.sol");
216249
+ await (0, import_promises.writeFile)(libDeployPath, LibDeploy);
216250
+ return libDeployPath;
216304
216251
  }
216305
- function resetLibDeploy(out) {
216306
- return __async(this, null, function* () {
216307
- yield (0, import_promises.writeFile)(import_path.default.join(out, "LibDeploy.sol"), yield stubLibDeploy);
216308
- });
216252
+ async function resetLibDeploy(out) {
216253
+ await (0, import_promises.writeFile)(import_path.default.join(out, "LibDeploy.sol"), await stubLibDeploy);
216309
216254
  }
216310
216255
 
216311
216256
  // src/utils/deploy.ts
@@ -216327,148 +216272,6 @@ var import_glob = __toESM(require_glob3());
216327
216272
  var import_fs3 = require("fs");
216328
216273
  var import_path3 = __toESM(require("path"));
216329
216274
 
216330
- // src/utils/build.ts
216331
- var import_fs2 = require("fs");
216332
- var import_path2 = __toESM(require("path"));
216333
- function forgeBuild(out = "out", options) {
216334
- if (options == null ? void 0 : options.clear) {
216335
- console.log("Clearing forge build output directory", out);
216336
- (0, import_fs2.rmSync)(out, { recursive: true, force: true });
216337
- }
216338
- return execLog("forge", ["build", "-o", out]);
216339
- }
216340
- function getContractsInDir(dir, exclude) {
216341
- return (0, import_fs2.readdirSync)(dir).filter((item) => item.includes(".sol")).map((item) => item.replace(".sol", "")).filter((item) => !(exclude == null ? void 0 : exclude.includes(item)));
216342
- }
216343
- function copyAbi(inDir, outDir, contract) {
216344
- try {
216345
- return (0, import_fs2.copyFileSync)(import_path2.default.join(inDir, contract + ".sol", contract + ".json"), import_path2.default.join(outDir, contract + ".json"));
216346
- } catch (e) {
216347
- console.log("Skipping", contract);
216348
- }
216349
- }
216350
- function filterAbi(abiIn = "./out", abiOut = "./abi", exclude = ["Component", "IComponent"]) {
216351
- console.log(`Cleaning output directory (${abiOut}})`);
216352
- (0, import_fs2.rmSync)(abiOut, { recursive: true, force: true });
216353
- (0, import_fs2.mkdirSync)(abiOut);
216354
- const include = ["Component", "System", "World", "LibQuery"];
216355
- const contracts = getContractsInDir(abiIn, exclude).filter((item) => include.find((i) => item.includes(i)));
216356
- console.log("Selected ABIs: ", contracts);
216357
- for (const contract of contracts) {
216358
- if (contract.includes(".t"))
216359
- continue;
216360
- copyAbi(abiIn, abiOut, contract);
216361
- }
216362
- console.log("Successfully moved selected ABIs to ./abi");
216363
- }
216364
-
216365
- // src/utils/types.ts
216366
- function generateAbiTypes(inputDir, outputDir, options) {
216367
- return __async(this, null, function* () {
216368
- var _a;
216369
- if (options == null ? void 0 : options.clear) {
216370
- console.log("Clearing typechain output directory", outputDir);
216371
- (0, import_fs3.rmSync)(outputDir, { recursive: true, force: true });
216372
- }
216373
- const cwd = (_a = options == null ? void 0 : options.cwd) != null ? _a : process.cwd();
216374
- const allFiles = (0, import_typechain.glob)(cwd, [`${inputDir}/**/+([a-zA-Z0-9_]).json`]);
216375
- const result = yield (0, import_typechain.runTypeChain)({
216376
- cwd,
216377
- filesToProcess: allFiles,
216378
- allFiles,
216379
- outDir: outputDir,
216380
- target: "ethers-v5"
216381
- });
216382
- console.log(`Successfully generated ${result.filesGenerated} files`);
216383
- });
216384
- }
216385
- function generateSystemTypes(inputDir, outputDir, options) {
216386
- return __async(this, null, function* () {
216387
- if (options == null ? void 0 : options.clear) {
216388
- console.log("Clearing system type output files", outputDir);
216389
- (0, import_fs3.rmSync)(import_path3.default.join(outputDir, "/SystemTypes.ts"), { force: true });
216390
- (0, import_fs3.rmSync)(import_path3.default.join(outputDir, "/SystemAbis.mts"), { force: true });
216391
- (0, import_fs3.rmSync)(import_path3.default.join(outputDir, "/SystemAbis.mjs"), { force: true });
216392
- (0, import_fs3.rmSync)(import_path3.default.join(outputDir, "/SystemMappings.ts"), { force: true });
216393
- }
216394
- let abis = [];
216395
- let systems = [];
216396
- let ids = [];
216397
- let typePaths = [];
216398
- const systemsPath = `${inputDir}/*.sol`;
216399
- const [resolve, , promise] = deferred();
216400
- (0, import_glob.default)(systemsPath, {}, (_, matches) => {
216401
- systems = matches.map((path6) => {
216402
- const fragments = path6.split("/");
216403
- return fragments[fragments.length - 1].split(".sol")[0];
216404
- });
216405
- ids = matches.map((path6, index) => {
216406
- const id = extractIdFromFile(path6);
216407
- if (!id) {
216408
- console.log("Path:", path6);
216409
- console.log("ID:", id);
216410
- throw new Error(
216411
- "No ID found for" + matches[index] + ". Make sure your system source file includes a ID definition (uint256 constant ID = uint256(keccak256(<ID>));)"
216412
- );
216413
- }
216414
- return id;
216415
- });
216416
- abis = systems.map((system) => `../abi/${system}.json`);
216417
- typePaths = systems.map((system) => `./ethers-contracts/${system}.ts`);
216418
- resolve();
216419
- });
216420
- yield promise;
216421
- console.log("Matches", systems);
216422
- console.log("Solidity", ids);
216423
- console.log("Type paths", typePaths);
216424
- console.log("ABIs", abis);
216425
- const SystemMappings = `// Autogenerated using mud system-types
216426
- export const systemToId = {
216427
- ${systems.map((system, index) => ` ${system}: "${ids[index]}",`).join("\n")}
216428
- };
216429
-
216430
- export const idToSystem = {
216431
- ${ids.map((id, index) => ` "${id}": "${systems[index]}",`).join("\n")}
216432
- };
216433
- `;
216434
- const SystemTypes = `// Autogenerated using mud system-types
216435
- ${typePaths.map((path6, index) => `import { ${systems[index]} } from "${path6.replace(".ts", "")}";`).join("\n")}
216436
-
216437
- export type SystemTypes = {
216438
- ${systems.map((system, index) => ` "${ids[index]}": ${system};`).join("\n")}
216439
- };
216440
- `;
216441
- const SystemAbis = `// Autogenerated using mud system-types
216442
- ${abis.map((path6, index) => `import ${systems[index]} from "${path6}";`).join("\n")}
216443
-
216444
- export const SystemAbis = {
216445
- ${systems.map((system, index) => ` "${ids[index]}": ${system}.abi,`).join("\n")}
216446
- };
216447
- `;
216448
- console.log("Generating files:");
216449
- console.log("SystemTypes.ts", SystemTypes);
216450
- console.log("SystemAbis.mts", SystemAbis);
216451
- console.log("SystemMappings.ts", SystemMappings);
216452
- (0, import_fs3.writeFileSync)(`${outputDir}/SystemTypes.ts`, SystemTypes);
216453
- (0, import_fs3.writeFileSync)(`${outputDir}/SystemAbis.mts`, SystemAbis);
216454
- (0, import_fs3.writeFileSync)(`${outputDir}/SystemAbis.mjs`, SystemAbis);
216455
- (0, import_fs3.writeFileSync)(`${outputDir}/SystemMappings.ts`, SystemMappings);
216456
- });
216457
- }
216458
- function generateTypes(abiDir, outputDir = "./types", options) {
216459
- return __async(this, null, function* () {
216460
- if (!abiDir) {
216461
- console.log("Compiling contracts");
216462
- const buildOutput = "./out";
216463
- abiDir = "./abi";
216464
- yield forgeBuild(buildOutput, options);
216465
- filterAbi(buildOutput, abiDir);
216466
- }
216467
- yield generateAbiTypes(abiDir, import_path3.default.join(outputDir, "ethers-contracts"), options);
216468
- yield generateSystemTypes("./src/systems", outputDir, options);
216469
- });
216470
- }
216471
-
216472
216275
  // node_modules/execa/index.js
216473
216276
  var import_node_buffer = require("node:buffer");
216474
216277
  var import_node_path2 = __toESM(require("node:path"), 1);
@@ -216497,13 +216300,13 @@ var import_node_url = __toESM(require("node:url"), 1);
216497
216300
  // node_modules/path-key/index.js
216498
216301
  function pathKey(options = {}) {
216499
216302
  const {
216500
- env = process.env,
216303
+ env: env2 = process.env,
216501
216304
  platform = process.platform
216502
216305
  } = options;
216503
216306
  if (platform !== "win32") {
216504
216307
  return "PATH";
216505
216308
  }
216506
- return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
216309
+ return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
216507
216310
  }
216508
216311
 
216509
216312
  // node_modules/npm-run-path/index.js
@@ -216525,12 +216328,12 @@ function npmRunPath(options = {}) {
216525
216328
  result.push(import_node_path.default.resolve(cwdString, execPath, ".."));
216526
216329
  return [...result, path_].join(import_node_path.default.delimiter);
216527
216330
  }
216528
- function npmRunPathEnv({ env = import_node_process.default.env, ...options } = {}) {
216529
- env = { ...env };
216530
- const path6 = pathKey({ env });
216531
- options.path = env[path6];
216532
- env[path6] = npmRunPath(options);
216533
- return env;
216331
+ function npmRunPathEnv({ env: env2 = import_node_process.default.env, ...options } = {}) {
216332
+ env2 = { ...env2 };
216333
+ const path6 = pathKey({ env: env2 });
216334
+ options.path = env2[path6];
216335
+ env2[path6] = npmRunPath(options);
216336
+ return env2;
216534
216337
  }
216535
216338
 
216536
216339
  // node_modules/mimic-fn/index.js
@@ -217256,11 +217059,11 @@ var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => e
217256
217059
  // node_modules/execa/index.js
217257
217060
  var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
217258
217061
  var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
217259
- const env = extendEnv ? { ...import_node_process2.default.env, ...envOption } : envOption;
217062
+ const env2 = extendEnv ? { ...import_node_process2.default.env, ...envOption } : envOption;
217260
217063
  if (preferLocal) {
217261
- return npmRunPathEnv({ env, cwd: localDir, execPath });
217064
+ return npmRunPathEnv({ env: env2, cwd: localDir, execPath });
217262
217065
  }
217263
- return env;
217066
+ return env2;
217264
217067
  };
217265
217068
  var handleArguments = (file, args, options = {}) => {
217266
217069
  const parsed = import_cross_spawn.default._parse(file, args, options);
@@ -217372,91 +217175,222 @@ function execa(file, args, options) {
217372
217175
  return mergePromise(spawned, handlePromiseOnce);
217373
217176
  }
217374
217177
 
217178
+ // src/utils/build.ts
217179
+ var import_fs2 = require("fs");
217180
+ var import_path2 = __toESM(require("path"));
217181
+ async function forgeBuild(out = "out", options) {
217182
+ if (options?.clear) {
217183
+ console.log("Clearing forge build output directory", out);
217184
+ (0, import_fs2.rmSync)(out, { recursive: true, force: true });
217185
+ }
217186
+ console.log("Running forge build");
217187
+ const child = execa("forge", ["build", "-o", out], {
217188
+ stdio: ["inherit", "pipe", "inherit"]
217189
+ });
217190
+ return (await child).stdout;
217191
+ }
217192
+ function getContractsInDir(dir, exclude) {
217193
+ return (0, import_fs2.readdirSync)(dir).filter((item) => item.includes(".sol")).map((item) => item.replace(".sol", "")).filter((item) => !exclude?.includes(item));
217194
+ }
217195
+ function copyAbi(inDir, outDir, contract) {
217196
+ try {
217197
+ return (0, import_fs2.copyFileSync)(import_path2.default.join(inDir, contract + ".sol", contract + ".json"), import_path2.default.join(outDir, contract + ".json"));
217198
+ } catch (e) {
217199
+ console.log("Skipping", contract);
217200
+ }
217201
+ }
217202
+ function filterAbi(abiIn = "./out", abiOut = "./abi", exclude = ["Component", "IComponent"]) {
217203
+ console.log(`Cleaning output directory (${abiOut}})`);
217204
+ (0, import_fs2.rmSync)(abiOut, { recursive: true, force: true });
217205
+ (0, import_fs2.mkdirSync)(abiOut);
217206
+ const include = ["Component", "System", "World", "LibQuery"];
217207
+ const contracts = getContractsInDir(abiIn, exclude).filter((item) => include.find((i) => item.includes(i)));
217208
+ console.log("Selected ABIs: ", contracts);
217209
+ for (const contract of contracts) {
217210
+ if (contract.includes(".t"))
217211
+ continue;
217212
+ copyAbi(abiIn, abiOut, contract);
217213
+ }
217214
+ console.log("Successfully moved selected ABIs to ./abi");
217215
+ }
217216
+
217217
+ // src/utils/types.ts
217218
+ async function generateAbiTypes(inputDir, outputDir, options) {
217219
+ if (options?.clear) {
217220
+ console.log("Clearing typechain output directory", outputDir);
217221
+ (0, import_fs3.rmSync)(outputDir, { recursive: true, force: true });
217222
+ }
217223
+ const cwd = options?.cwd ?? process.cwd();
217224
+ const allFiles = (0, import_typechain.glob)(cwd, [`${inputDir}/**/+([a-zA-Z0-9_]).json`]);
217225
+ const result = await (0, import_typechain.runTypeChain)({
217226
+ cwd,
217227
+ filesToProcess: allFiles,
217228
+ allFiles,
217229
+ outDir: outputDir,
217230
+ target: "ethers-v5"
217231
+ });
217232
+ console.log(`Successfully generated ${result.filesGenerated} files`);
217233
+ }
217234
+ async function generateSystemTypes(inputDir, outputDir, options) {
217235
+ if (options?.clear) {
217236
+ console.log("Clearing system type output files", outputDir);
217237
+ (0, import_fs3.rmSync)(import_path3.default.join(outputDir, "/SystemTypes.ts"), { force: true });
217238
+ (0, import_fs3.rmSync)(import_path3.default.join(outputDir, "/SystemAbis.mts"), { force: true });
217239
+ (0, import_fs3.rmSync)(import_path3.default.join(outputDir, "/SystemAbis.mjs"), { force: true });
217240
+ (0, import_fs3.rmSync)(import_path3.default.join(outputDir, "/SystemMappings.ts"), { force: true });
217241
+ }
217242
+ let abis = [];
217243
+ let systems = [];
217244
+ let ids = [];
217245
+ let typePaths = [];
217246
+ const systemsPath = `${inputDir}/*.sol`;
217247
+ const [resolve, , promise] = deferred();
217248
+ (0, import_glob.default)(systemsPath, {}, (_, matches) => {
217249
+ systems = matches.map((path6) => {
217250
+ const fragments = path6.split("/");
217251
+ return fragments[fragments.length - 1].split(".sol")[0];
217252
+ });
217253
+ ids = matches.map((path6, index) => {
217254
+ const id = extractIdFromFile(path6);
217255
+ if (!id) {
217256
+ console.log("Path:", path6);
217257
+ console.log("ID:", id);
217258
+ throw new Error(
217259
+ "No ID found for" + matches[index] + ". Make sure your system source file includes a ID definition (uint256 constant ID = uint256(keccak256(<ID>));)"
217260
+ );
217261
+ }
217262
+ return id;
217263
+ });
217264
+ abis = systems.map((system) => `../abi/${system}.json`);
217265
+ typePaths = systems.map((system) => `./ethers-contracts/${system}.ts`);
217266
+ resolve();
217267
+ });
217268
+ await promise;
217269
+ console.log("Matches", systems);
217270
+ console.log("Solidity", ids);
217271
+ console.log("Type paths", typePaths);
217272
+ console.log("ABIs", abis);
217273
+ const SystemMappings = `// Autogenerated using mud system-types
217274
+ export const systemToId = {
217275
+ ${systems.map((system, index) => ` ${system}: "${ids[index]}",`).join("\n")}
217276
+ };
217277
+
217278
+ export const idToSystem = {
217279
+ ${ids.map((id, index) => ` "${id}": "${systems[index]}",`).join("\n")}
217280
+ };
217281
+ `;
217282
+ const SystemTypes = `// Autogenerated using mud system-types
217283
+ ${typePaths.map((path6, index) => `import { ${systems[index]} } from "${path6.replace(".ts", "")}";`).join("\n")}
217284
+
217285
+ export type SystemTypes = {
217286
+ ${systems.map((system, index) => ` "${ids[index]}": ${system};`).join("\n")}
217287
+ };
217288
+ `;
217289
+ const SystemAbis = `// Autogenerated using mud system-types
217290
+ ${abis.map((path6, index) => `import ${systems[index]} from "${path6}";`).join("\n")}
217291
+
217292
+ export const SystemAbis = {
217293
+ ${systems.map((system, index) => ` "${ids[index]}": ${system}.abi,`).join("\n")}
217294
+ };
217295
+ `;
217296
+ console.log("Generating files:");
217297
+ console.log("SystemTypes.ts", SystemTypes);
217298
+ console.log("SystemAbis.mts", SystemAbis);
217299
+ console.log("SystemMappings.ts", SystemMappings);
217300
+ (0, import_fs3.writeFileSync)(`${outputDir}/SystemTypes.ts`, SystemTypes);
217301
+ (0, import_fs3.writeFileSync)(`${outputDir}/SystemAbis.mts`, SystemAbis);
217302
+ (0, import_fs3.writeFileSync)(`${outputDir}/SystemAbis.mjs`, SystemAbis);
217303
+ (0, import_fs3.writeFileSync)(`${outputDir}/SystemMappings.ts`, SystemMappings);
217304
+ }
217305
+ async function generateTypes(abiDir, outputDir = "./types", options) {
217306
+ if (!abiDir) {
217307
+ console.log("Compiling contracts");
217308
+ const buildOutput = "./out";
217309
+ abiDir = "./abi";
217310
+ await forgeBuild(buildOutput, options);
217311
+ filterAbi(buildOutput, abiDir);
217312
+ }
217313
+ await generateAbiTypes(abiDir, import_path3.default.join(outputDir, "ethers-contracts"), options);
217314
+ await generateSystemTypes("./src/systems", outputDir, options);
217315
+ }
217316
+
217375
217317
  // src/utils/deploy.ts
217376
217318
  var import_providers = __toESM(require_lib32());
217377
217319
  var contractsDir2 = __dirname + "/../../src/contracts";
217378
- function deploy(deployerPrivateKey, rpc = "http://localhost:8545", worldAddress, reuseComponents, gasPrice) {
217379
- return __async(this, null, function* () {
217380
- var _a, _b, _c;
217381
- const address = deployerPrivateKey ? new import_ethers.Wallet(deployerPrivateKey).address : import_ethers.constants.AddressZero;
217382
- if (gasPrice == null) {
217383
- try {
217384
- console.log("Fetching gas price...");
217385
- const provider = new import_providers.StaticJsonRpcProvider(rpc, { name: "AnyNetwork", chainId: 1234 });
217386
- gasPrice = (yield provider.getGasPrice()).toNumber() * 1.3;
217387
- console.log("Gas price:", gasPrice);
217388
- } catch (e) {
217389
- console.log("Could not fetch gas price");
217390
- }
217391
- }
217392
- const child = execa(
217393
- "forge",
217394
- [
217395
- "script",
217396
- contractsDir2 + "/Deploy.sol",
217397
- "--target-contract",
217398
- "Deploy",
217399
- "-vvv",
217400
- ...!deployerPrivateKey ? [] : ["--broadcast", "--private-keys", deployerPrivateKey],
217401
- "--sig",
217402
- "broadcastDeploy(address,address,bool)",
217403
- address,
217404
- worldAddress || import_ethers.constants.AddressZero,
217405
- reuseComponents ? "true" : "false",
217406
- "--fork-url",
217407
- rpc,
217408
- ...gasPrice != null ? ["--with-gas-price", String(gasPrice)] : []
217409
- ],
217410
- { stdio: ["inherit", "pipe", "pipe"] }
217411
- );
217412
- (_a = child.stderr) == null ? void 0 : _a.on("data", (data) => console.log("stderr:", data.toString()));
217413
- (_b = child.stdout) == null ? void 0 : _b.on("data", (data) => console.log(data.toString()));
217414
- const lines = (_c = (yield child).stdout) == null ? void 0 : _c.split("\n");
217415
- const deployedWorldAddress = findLog(lines, "world: address");
217416
- const initialBlockNumber = findLog(lines, "initialBlockNumber: uint256");
217417
- return { child: yield child, deployedWorldAddress, initialBlockNumber };
217418
- });
217419
- }
217420
- function generateAndDeploy(args) {
217421
- return __async(this, null, function* () {
217422
- let libDeployPath;
217423
- let deployedWorldAddress;
217424
- let initialBlockNumber;
217320
+ async function deploy(deployerPrivateKey, rpc = "http://localhost:8545", worldAddress, reuseComponents, gasPrice) {
217321
+ const address = deployerPrivateKey ? new import_ethers.Wallet(deployerPrivateKey).address : import_ethers.constants.AddressZero;
217322
+ if (gasPrice == null) {
217425
217323
  try {
217426
- libDeployPath = yield generateLibDeploy(args.config, contractsDir2, args.systems);
217427
- yield generateTypes(void 0, "./types", { clear: args.clear });
217428
- const result = yield deploy(
217429
- args.deployerPrivateKey,
217430
- args.rpc,
217431
- args.worldAddress,
217432
- Boolean(args.systems),
217433
- args.gasPrice
217434
- );
217435
- deployedWorldAddress = result.deployedWorldAddress;
217436
- initialBlockNumber = result.initialBlockNumber;
217324
+ console.log("Fetching gas price...");
217325
+ const provider = new import_providers.StaticJsonRpcProvider(rpc, { name: "AnyNetwork", chainId: 1234 });
217326
+ gasPrice = (await provider.getGasPrice()).toNumber() * 1.3;
217327
+ console.log("Gas price:", gasPrice);
217437
217328
  } catch (e) {
217438
- console.error(e);
217439
- } finally {
217440
- console.log("Cleaning up deployment script");
217441
- if (libDeployPath)
217442
- yield resetLibDeploy(contractsDir2);
217329
+ console.log("Could not fetch gas price");
217443
217330
  }
217444
- return { deployedWorldAddress, initialBlockNumber };
217445
- });
217331
+ }
217332
+ const child = execa(
217333
+ "forge",
217334
+ [
217335
+ "script",
217336
+ contractsDir2 + "/Deploy.sol",
217337
+ "--target-contract",
217338
+ "Deploy",
217339
+ "-vvv",
217340
+ ...!deployerPrivateKey ? [] : ["--broadcast", "--private-keys", deployerPrivateKey],
217341
+ "--sig",
217342
+ "broadcastDeploy(address,address,bool)",
217343
+ address,
217344
+ worldAddress || import_ethers.constants.AddressZero,
217345
+ reuseComponents ? "true" : "false",
217346
+ "--fork-url",
217347
+ rpc,
217348
+ ...gasPrice != null ? ["--with-gas-price", String(Math.round(gasPrice))] : []
217349
+ ],
217350
+ { stdio: ["inherit", "pipe", "pipe"] }
217351
+ );
217352
+ child.stderr?.on("data", (data) => console.log("stderr:", data.toString()));
217353
+ child.stdout?.on("data", (data) => console.log(data.toString()));
217354
+ const lines = (await child).stdout?.split("\n");
217355
+ const deployedWorldAddress = findLog(lines, "world: address");
217356
+ const initialBlockNumber = findLog(lines, "initialBlockNumber: uint256");
217357
+ return { child: await child, deployedWorldAddress, initialBlockNumber };
217358
+ }
217359
+ async function generateAndDeploy(args) {
217360
+ let libDeployPath;
217361
+ let deployedWorldAddress;
217362
+ let initialBlockNumber;
217363
+ try {
217364
+ libDeployPath = await generateLibDeploy(args.config, contractsDir2, args.systems);
217365
+ await generateTypes(void 0, "./types", { clear: args.clear });
217366
+ const result = await deploy(
217367
+ args.deployerPrivateKey,
217368
+ args.rpc,
217369
+ args.worldAddress,
217370
+ Boolean(args.reuseComponents),
217371
+ args.gasPrice
217372
+ );
217373
+ deployedWorldAddress = result.deployedWorldAddress;
217374
+ initialBlockNumber = result.initialBlockNumber;
217375
+ } finally {
217376
+ console.log("Cleaning up deployment script");
217377
+ if (libDeployPath)
217378
+ await resetLibDeploy(contractsDir2);
217379
+ }
217380
+ return { deployedWorldAddress, initialBlockNumber };
217446
217381
  }
217447
217382
 
217448
217383
  // src/utils/hsr.ts
217449
217384
  var import_chokidar = __toESM(require_chokidar());
217450
217385
  var import_fs4 = require("fs");
217451
- var ImportsRegex = new RegExp(new RegExp('(?<=import ").*(?=";)|(?<=from ").*(?=";)', "g"));
217386
+ var ImportsRegex = new RegExp(/(?<=import ").*(?=";)|(?<=from ").*(?=";)/g);
217452
217387
  function extractImports(path6) {
217453
217388
  const content = (0, import_fs4.readFileSync)(path6).toString();
217454
217389
  const regexResult = [...content.matchAll(ImportsRegex)].map((match) => match[0]).map((path7) => path7.split("/").at(-1));
217455
217390
  return regexResult;
217456
217391
  }
217457
217392
  function findDependencies(file, dependencyGraph, visited = []) {
217458
- var _a;
217459
- const dependencies = (_a = dependencyGraph[file]) != null ? _a : [];
217393
+ const dependencies = dependencyGraph[file] ?? [];
217460
217394
  const subDependencies = dependencies.flatMap((d) => {
217461
217395
  if (visited.includes(d)) {
217462
217396
  console.warn("Circular dependency detected: ", d, dependencyGraph[d]);
@@ -217470,14 +217404,13 @@ function hsr(root, replaceSystems) {
217470
217404
  const dependencyGraph = {};
217471
217405
  const systems = /* @__PURE__ */ new Set();
217472
217406
  console.log("Watching system file changes...");
217473
- import_chokidar.default.watch(root).on("all", (event, path6, stats) => __async(this, null, function* () {
217474
- var _a;
217407
+ import_chokidar.default.watch(root).on("all", async (event, path6, stats) => {
217475
217408
  console.log(`[${event}]: ${path6}`);
217476
217409
  const changedFile = path6.split("/").at(-1);
217477
217410
  if (["add", "change"].includes(event)) {
217478
217411
  const imports = extractImports(path6);
217479
217412
  for (const importedFile of imports) {
217480
- (_a = dependencyGraph[importedFile]) != null ? _a : dependencyGraph[importedFile] = [];
217413
+ dependencyGraph[importedFile] ??= [];
217481
217414
  dependencyGraph[importedFile].push(changedFile);
217482
217415
  }
217483
217416
  if (path6.includes("systems") && path6.includes(".sol"))
@@ -217490,14 +217423,484 @@ function hsr(root, replaceSystems) {
217490
217423
  ];
217491
217424
  console.log("Systems to replace", changedSystems);
217492
217425
  if (changedSystems.length > 0)
217493
- yield replaceSystems(changedSystems);
217426
+ await replaceSystems(changedSystems);
217494
217427
  console.log("Watching system file changes...");
217495
217428
  }
217496
- }));
217429
+ });
217497
217430
  }
217498
217431
 
217499
217432
  // src/commands/deploy-contracts.ts
217500
217433
  var import_openurl = __toESM(require_openurl());
217434
+
217435
+ // node_modules/chalk/source/vendor/ansi-styles/index.js
217436
+ var ANSI_BACKGROUND_OFFSET = 10;
217437
+ var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
217438
+ var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
217439
+ var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
217440
+ function assembleStyles() {
217441
+ const codes = /* @__PURE__ */ new Map();
217442
+ const styles2 = {
217443
+ modifier: {
217444
+ reset: [0, 0],
217445
+ bold: [1, 22],
217446
+ dim: [2, 22],
217447
+ italic: [3, 23],
217448
+ underline: [4, 24],
217449
+ overline: [53, 55],
217450
+ inverse: [7, 27],
217451
+ hidden: [8, 28],
217452
+ strikethrough: [9, 29]
217453
+ },
217454
+ color: {
217455
+ black: [30, 39],
217456
+ red: [31, 39],
217457
+ green: [32, 39],
217458
+ yellow: [33, 39],
217459
+ blue: [34, 39],
217460
+ magenta: [35, 39],
217461
+ cyan: [36, 39],
217462
+ white: [37, 39],
217463
+ blackBright: [90, 39],
217464
+ redBright: [91, 39],
217465
+ greenBright: [92, 39],
217466
+ yellowBright: [93, 39],
217467
+ blueBright: [94, 39],
217468
+ magentaBright: [95, 39],
217469
+ cyanBright: [96, 39],
217470
+ whiteBright: [97, 39]
217471
+ },
217472
+ bgColor: {
217473
+ bgBlack: [40, 49],
217474
+ bgRed: [41, 49],
217475
+ bgGreen: [42, 49],
217476
+ bgYellow: [43, 49],
217477
+ bgBlue: [44, 49],
217478
+ bgMagenta: [45, 49],
217479
+ bgCyan: [46, 49],
217480
+ bgWhite: [47, 49],
217481
+ bgBlackBright: [100, 49],
217482
+ bgRedBright: [101, 49],
217483
+ bgGreenBright: [102, 49],
217484
+ bgYellowBright: [103, 49],
217485
+ bgBlueBright: [104, 49],
217486
+ bgMagentaBright: [105, 49],
217487
+ bgCyanBright: [106, 49],
217488
+ bgWhiteBright: [107, 49]
217489
+ }
217490
+ };
217491
+ styles2.color.gray = styles2.color.blackBright;
217492
+ styles2.bgColor.bgGray = styles2.bgColor.bgBlackBright;
217493
+ styles2.color.grey = styles2.color.blackBright;
217494
+ styles2.bgColor.bgGrey = styles2.bgColor.bgBlackBright;
217495
+ for (const [groupName, group] of Object.entries(styles2)) {
217496
+ for (const [styleName, style] of Object.entries(group)) {
217497
+ styles2[styleName] = {
217498
+ open: `\x1B[${style[0]}m`,
217499
+ close: `\x1B[${style[1]}m`
217500
+ };
217501
+ group[styleName] = styles2[styleName];
217502
+ codes.set(style[0], style[1]);
217503
+ }
217504
+ Object.defineProperty(styles2, groupName, {
217505
+ value: group,
217506
+ enumerable: false
217507
+ });
217508
+ }
217509
+ Object.defineProperty(styles2, "codes", {
217510
+ value: codes,
217511
+ enumerable: false
217512
+ });
217513
+ styles2.color.close = "\x1B[39m";
217514
+ styles2.bgColor.close = "\x1B[49m";
217515
+ styles2.color.ansi = wrapAnsi16();
217516
+ styles2.color.ansi256 = wrapAnsi256();
217517
+ styles2.color.ansi16m = wrapAnsi16m();
217518
+ styles2.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
217519
+ styles2.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
217520
+ styles2.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
217521
+ Object.defineProperties(styles2, {
217522
+ rgbToAnsi256: {
217523
+ value: (red, green, blue) => {
217524
+ if (red === green && green === blue) {
217525
+ if (red < 8) {
217526
+ return 16;
217527
+ }
217528
+ if (red > 248) {
217529
+ return 231;
217530
+ }
217531
+ return Math.round((red - 8) / 247 * 24) + 232;
217532
+ }
217533
+ return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
217534
+ },
217535
+ enumerable: false
217536
+ },
217537
+ hexToRgb: {
217538
+ value: (hex) => {
217539
+ const matches = /(?<colorString>[a-f\d]{6}|[a-f\d]{3})/i.exec(hex.toString(16));
217540
+ if (!matches) {
217541
+ return [0, 0, 0];
217542
+ }
217543
+ let { colorString } = matches.groups;
217544
+ if (colorString.length === 3) {
217545
+ colorString = [...colorString].map((character) => character + character).join("");
217546
+ }
217547
+ const integer = Number.parseInt(colorString, 16);
217548
+ return [
217549
+ integer >> 16 & 255,
217550
+ integer >> 8 & 255,
217551
+ integer & 255
217552
+ ];
217553
+ },
217554
+ enumerable: false
217555
+ },
217556
+ hexToAnsi256: {
217557
+ value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
217558
+ enumerable: false
217559
+ },
217560
+ ansi256ToAnsi: {
217561
+ value: (code) => {
217562
+ if (code < 8) {
217563
+ return 30 + code;
217564
+ }
217565
+ if (code < 16) {
217566
+ return 90 + (code - 8);
217567
+ }
217568
+ let red;
217569
+ let green;
217570
+ let blue;
217571
+ if (code >= 232) {
217572
+ red = ((code - 232) * 10 + 8) / 255;
217573
+ green = red;
217574
+ blue = red;
217575
+ } else {
217576
+ code -= 16;
217577
+ const remainder = code % 36;
217578
+ red = Math.floor(code / 36) / 5;
217579
+ green = Math.floor(remainder / 6) / 5;
217580
+ blue = remainder % 6 / 5;
217581
+ }
217582
+ const value = Math.max(red, green, blue) * 2;
217583
+ if (value === 0) {
217584
+ return 30;
217585
+ }
217586
+ let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
217587
+ if (value === 2) {
217588
+ result += 60;
217589
+ }
217590
+ return result;
217591
+ },
217592
+ enumerable: false
217593
+ },
217594
+ rgbToAnsi: {
217595
+ value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
217596
+ enumerable: false
217597
+ },
217598
+ hexToAnsi: {
217599
+ value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
217600
+ enumerable: false
217601
+ }
217602
+ });
217603
+ return styles2;
217604
+ }
217605
+ var ansiStyles = assembleStyles();
217606
+ var ansi_styles_default = ansiStyles;
217607
+
217608
+ // node_modules/chalk/source/vendor/supports-color/index.js
217609
+ var import_node_process3 = __toESM(require("node:process"), 1);
217610
+ var import_node_os2 = __toESM(require("node:os"), 1);
217611
+ var import_node_tty = __toESM(require("node:tty"), 1);
217612
+ function hasFlag(flag, argv = import_node_process3.default.argv) {
217613
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
217614
+ const position = argv.indexOf(prefix + flag);
217615
+ const terminatorPosition = argv.indexOf("--");
217616
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
217617
+ }
217618
+ var { env } = import_node_process3.default;
217619
+ var flagForceColor;
217620
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
217621
+ flagForceColor = 0;
217622
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
217623
+ flagForceColor = 1;
217624
+ }
217625
+ function envForceColor() {
217626
+ if ("FORCE_COLOR" in env) {
217627
+ if (env.FORCE_COLOR === "true") {
217628
+ return 1;
217629
+ }
217630
+ if (env.FORCE_COLOR === "false") {
217631
+ return 0;
217632
+ }
217633
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
217634
+ }
217635
+ }
217636
+ function translateLevel(level) {
217637
+ if (level === 0) {
217638
+ return false;
217639
+ }
217640
+ return {
217641
+ level,
217642
+ hasBasic: true,
217643
+ has256: level >= 2,
217644
+ has16m: level >= 3
217645
+ };
217646
+ }
217647
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
217648
+ const noFlagForceColor = envForceColor();
217649
+ if (noFlagForceColor !== void 0) {
217650
+ flagForceColor = noFlagForceColor;
217651
+ }
217652
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
217653
+ if (forceColor === 0) {
217654
+ return 0;
217655
+ }
217656
+ if (sniffFlags) {
217657
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
217658
+ return 3;
217659
+ }
217660
+ if (hasFlag("color=256")) {
217661
+ return 2;
217662
+ }
217663
+ }
217664
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
217665
+ return 0;
217666
+ }
217667
+ const min = forceColor || 0;
217668
+ if (env.TERM === "dumb") {
217669
+ return min;
217670
+ }
217671
+ if (import_node_process3.default.platform === "win32") {
217672
+ const osRelease = import_node_os2.default.release().split(".");
217673
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
217674
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
217675
+ }
217676
+ return 1;
217677
+ }
217678
+ if ("CI" in env) {
217679
+ if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
217680
+ return 1;
217681
+ }
217682
+ return min;
217683
+ }
217684
+ if ("TEAMCITY_VERSION" in env) {
217685
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
217686
+ }
217687
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
217688
+ return 1;
217689
+ }
217690
+ if (env.COLORTERM === "truecolor") {
217691
+ return 3;
217692
+ }
217693
+ if ("TERM_PROGRAM" in env) {
217694
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
217695
+ switch (env.TERM_PROGRAM) {
217696
+ case "iTerm.app":
217697
+ return version >= 3 ? 3 : 2;
217698
+ case "Apple_Terminal":
217699
+ return 2;
217700
+ }
217701
+ }
217702
+ if (/-256(color)?$/i.test(env.TERM)) {
217703
+ return 2;
217704
+ }
217705
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
217706
+ return 1;
217707
+ }
217708
+ if ("COLORTERM" in env) {
217709
+ return 1;
217710
+ }
217711
+ return min;
217712
+ }
217713
+ function createSupportsColor(stream, options = {}) {
217714
+ const level = _supportsColor(stream, {
217715
+ streamIsTTY: stream && stream.isTTY,
217716
+ ...options
217717
+ });
217718
+ return translateLevel(level);
217719
+ }
217720
+ var supportsColor = {
217721
+ stdout: createSupportsColor({ isTTY: import_node_tty.default.isatty(1) }),
217722
+ stderr: createSupportsColor({ isTTY: import_node_tty.default.isatty(2) })
217723
+ };
217724
+ var supports_color_default = supportsColor;
217725
+
217726
+ // node_modules/chalk/source/utilities.js
217727
+ function stringReplaceAll(string, substring, replacer) {
217728
+ let index = string.indexOf(substring);
217729
+ if (index === -1) {
217730
+ return string;
217731
+ }
217732
+ const substringLength = substring.length;
217733
+ let endIndex = 0;
217734
+ let returnValue = "";
217735
+ do {
217736
+ returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
217737
+ endIndex = index + substringLength;
217738
+ index = string.indexOf(substring, endIndex);
217739
+ } while (index !== -1);
217740
+ returnValue += string.slice(endIndex);
217741
+ return returnValue;
217742
+ }
217743
+ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
217744
+ let endIndex = 0;
217745
+ let returnValue = "";
217746
+ do {
217747
+ const gotCR = string[index - 1] === "\r";
217748
+ returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
217749
+ endIndex = index + 1;
217750
+ index = string.indexOf("\n", endIndex);
217751
+ } while (index !== -1);
217752
+ returnValue += string.slice(endIndex);
217753
+ return returnValue;
217754
+ }
217755
+
217756
+ // node_modules/chalk/source/index.js
217757
+ var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
217758
+ var GENERATOR = Symbol("GENERATOR");
217759
+ var STYLER = Symbol("STYLER");
217760
+ var IS_EMPTY = Symbol("IS_EMPTY");
217761
+ var levelMapping = [
217762
+ "ansi",
217763
+ "ansi",
217764
+ "ansi256",
217765
+ "ansi16m"
217766
+ ];
217767
+ var styles = /* @__PURE__ */ Object.create(null);
217768
+ var applyOptions = (object, options = {}) => {
217769
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
217770
+ throw new Error("The `level` option should be an integer from 0 to 3");
217771
+ }
217772
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
217773
+ object.level = options.level === void 0 ? colorLevel : options.level;
217774
+ };
217775
+ var chalkFactory = (options) => {
217776
+ const chalk2 = (...strings) => strings.join(" ");
217777
+ applyOptions(chalk2, options);
217778
+ Object.setPrototypeOf(chalk2, createChalk.prototype);
217779
+ return chalk2;
217780
+ };
217781
+ function createChalk(options) {
217782
+ return chalkFactory(options);
217783
+ }
217784
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
217785
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) {
217786
+ styles[styleName] = {
217787
+ get() {
217788
+ const builder2 = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
217789
+ Object.defineProperty(this, styleName, { value: builder2 });
217790
+ return builder2;
217791
+ }
217792
+ };
217793
+ }
217794
+ styles.visible = {
217795
+ get() {
217796
+ const builder2 = createBuilder(this, this[STYLER], true);
217797
+ Object.defineProperty(this, "visible", { value: builder2 });
217798
+ return builder2;
217799
+ }
217800
+ };
217801
+ var getModelAnsi = (model, level, type, ...arguments_) => {
217802
+ if (model === "rgb") {
217803
+ if (level === "ansi16m") {
217804
+ return ansi_styles_default[type].ansi16m(...arguments_);
217805
+ }
217806
+ if (level === "ansi256") {
217807
+ return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
217808
+ }
217809
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
217810
+ }
217811
+ if (model === "hex") {
217812
+ return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
217813
+ }
217814
+ return ansi_styles_default[type][model](...arguments_);
217815
+ };
217816
+ var usedModels = ["rgb", "hex", "ansi256"];
217817
+ for (const model of usedModels) {
217818
+ styles[model] = {
217819
+ get() {
217820
+ const { level } = this;
217821
+ return function(...arguments_) {
217822
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
217823
+ return createBuilder(this, styler, this[IS_EMPTY]);
217824
+ };
217825
+ }
217826
+ };
217827
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
217828
+ styles[bgModel] = {
217829
+ get() {
217830
+ const { level } = this;
217831
+ return function(...arguments_) {
217832
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
217833
+ return createBuilder(this, styler, this[IS_EMPTY]);
217834
+ };
217835
+ }
217836
+ };
217837
+ }
217838
+ var proto = Object.defineProperties(() => {
217839
+ }, {
217840
+ ...styles,
217841
+ level: {
217842
+ enumerable: true,
217843
+ get() {
217844
+ return this[GENERATOR].level;
217845
+ },
217846
+ set(level) {
217847
+ this[GENERATOR].level = level;
217848
+ }
217849
+ }
217850
+ });
217851
+ var createStyler = (open, close, parent) => {
217852
+ let openAll;
217853
+ let closeAll;
217854
+ if (parent === void 0) {
217855
+ openAll = open;
217856
+ closeAll = close;
217857
+ } else {
217858
+ openAll = parent.openAll + open;
217859
+ closeAll = close + parent.closeAll;
217860
+ }
217861
+ return {
217862
+ open,
217863
+ close,
217864
+ openAll,
217865
+ closeAll,
217866
+ parent
217867
+ };
217868
+ };
217869
+ var createBuilder = (self2, _styler, _isEmpty) => {
217870
+ const builder2 = (...arguments_) => applyStyle(builder2, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
217871
+ Object.setPrototypeOf(builder2, proto);
217872
+ builder2[GENERATOR] = self2;
217873
+ builder2[STYLER] = _styler;
217874
+ builder2[IS_EMPTY] = _isEmpty;
217875
+ return builder2;
217876
+ };
217877
+ var applyStyle = (self2, string) => {
217878
+ if (self2.level <= 0 || !string) {
217879
+ return self2[IS_EMPTY] ? "" : string;
217880
+ }
217881
+ let styler = self2[STYLER];
217882
+ if (styler === void 0) {
217883
+ return string;
217884
+ }
217885
+ const { openAll, closeAll } = styler;
217886
+ if (string.includes("\x1B")) {
217887
+ while (styler !== void 0) {
217888
+ string = stringReplaceAll(string, styler.close, styler.open);
217889
+ styler = styler.parent;
217890
+ }
217891
+ }
217892
+ const lfIndex = string.indexOf("\n");
217893
+ if (lfIndex !== -1) {
217894
+ string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
217895
+ }
217896
+ return openAll + string + closeAll;
217897
+ };
217898
+ Object.defineProperties(createChalk.prototype, styles);
217899
+ var chalk = createChalk();
217900
+ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
217901
+ var source_default = chalk;
217902
+
217903
+ // src/commands/deploy-contracts.ts
217501
217904
  var command = "deploy-contracts";
217502
217905
  var desc = "Deploy mud contracts";
217503
217906
  var builder = (yargs) => yargs.options({
@@ -217511,17 +217914,27 @@ var builder = (yargs) => yargs.options({
217511
217914
  openUrl: { type: "string", desc: "Opens a browser at the provided url with the worldAddress url param prefilled" },
217512
217915
  gasPrice: { type: "number", desc: "Gas price to set for deploy transactions" }
217513
217916
  });
217514
- var handler = (args) => __async(void 0, null, function* () {
217515
- var _a;
217917
+ var handler = async (args) => {
217516
217918
  if (args.system != null && !args.worldAddress) {
217517
217919
  console.error("Error: Upgrading systems requires a World address.");
217518
217920
  process.exit(1);
217519
217921
  }
217520
- const deployerPrivateKey = (_a = args.deployerPrivateKey) != null ? _a : args.dev ? "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" : void 0;
217521
- const { deployedWorldAddress: worldAddress, initialBlockNumber } = yield generateAndDeploy(__spreadProps(__spreadValues({}, args), {
217522
- deployerPrivateKey,
217523
- clear: true
217524
- }));
217922
+ const deployerPrivateKey = args.deployerPrivateKey ?? (args.dev ? "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" : void 0);
217923
+ let genDeployResult;
217924
+ try {
217925
+ genDeployResult = await generateAndDeploy({
217926
+ ...args,
217927
+ deployerPrivateKey,
217928
+ clear: true
217929
+ });
217930
+ } catch (e) {
217931
+ if (!e.stderr) {
217932
+ console.log(e);
217933
+ }
217934
+ console.log(source_default.red("\n-----------\nError during generateAndDeploy (see above)"));
217935
+ process.exit();
217936
+ }
217937
+ const { deployedWorldAddress: worldAddress, initialBlockNumber } = genDeployResult;
217525
217938
  console.log("World deployed at", worldAddress, "at block", initialBlockNumber);
217526
217939
  if (worldAddress && args.openUrl) {
217527
217940
  const url2 = new URL(args.openUrl);
@@ -217530,20 +217943,28 @@ var handler = (args) => __async(void 0, null, function* () {
217530
217943
  }
217531
217944
  if (args.watch) {
217532
217945
  const { config, rpc, gasPrice } = args;
217533
- hsr("./src", (systems) => {
217534
- return generateAndDeploy({
217535
- config,
217536
- deployerPrivateKey,
217537
- worldAddress,
217538
- rpc,
217539
- systems,
217540
- gasPrice
217541
- });
217946
+ hsr("./src", async (systems) => {
217947
+ try {
217948
+ return await generateAndDeploy({
217949
+ config,
217950
+ deployerPrivateKey,
217951
+ worldAddress,
217952
+ rpc,
217953
+ systems,
217954
+ gasPrice,
217955
+ reuseComponents: true
217956
+ });
217957
+ } catch (e) {
217958
+ if (!e.stderr) {
217959
+ console.log(e);
217960
+ }
217961
+ console.log(source_default.red("\n-----------\nError during generateAndDeploy in HSR (see above)"));
217962
+ }
217542
217963
  });
217543
217964
  } else {
217544
217965
  process.exit(0);
217545
217966
  }
217546
- });
217967
+ };
217547
217968
  // Annotate the CommonJS export names for ESM import in node:
217548
217969
  0 && (module.exports = {
217549
217970
  builder,