@storm-software/esbuild 0.35.5 → 0.35.7

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.
Files changed (56) hide show
  1. package/README.md +2 -1
  2. package/bin/esbuild.cjs +1 -1
  3. package/dist/assets.cjs +6 -6
  4. package/dist/assets.js +5 -5
  5. package/dist/build.cjs +14 -14
  6. package/dist/build.js +13 -13
  7. package/dist/{chunk-IGG5GIIV.js → chunk-3S3PZ7EY.js} +2 -2
  8. package/dist/{chunk-RT5QOWTF.js → chunk-4RTT7CNA.js} +514 -237
  9. package/dist/{chunk-VW5VOVX7.js → chunk-6IWYW2O3.js} +2 -2
  10. package/dist/{chunk-DK7FJ3YJ.js → chunk-A6IWHLKB.js} +3 -3
  11. package/dist/{chunk-N5MGZ2YM.cjs → chunk-AB6MCXGW.cjs} +7 -7
  12. package/dist/{chunk-2DAVPJ7D.cjs → chunk-ATYG4K55.cjs} +106 -106
  13. package/dist/{chunk-EP4M3VJ3.cjs → chunk-BDAEVRE2.cjs} +14 -14
  14. package/dist/{chunk-QNVXA3GL.js → chunk-CJU3AWWU.js} +3 -3
  15. package/dist/{chunk-WCXP7IBU.js → chunk-EB5Y3WAG.js} +2 -2
  16. package/dist/{chunk-ODOBFGX6.js → chunk-EDL2KB25.js} +8 -8
  17. package/dist/{chunk-XWGV6MFZ.js → chunk-ENZZJ5B6.js} +7 -7
  18. package/dist/{chunk-FWIPARM7.js → chunk-HWMRRY5X.js} +2 -2
  19. package/dist/{chunk-347I4FKJ.js → chunk-IAXKJC2K.js} +1 -1
  20. package/dist/{chunk-POL6NUTY.cjs → chunk-JSWTO2OC.cjs} +19 -19
  21. package/dist/chunk-K6SD2RXI.cjs +6 -0
  22. package/dist/{chunk-FBR7AR6F.cjs → chunk-KU3PHLUZ.cjs} +734 -459
  23. package/dist/{chunk-6YDZYQLV.js → chunk-L2IEBOYL.js} +2 -2
  24. package/dist/{chunk-CQGBWOR4.cjs → chunk-LGNAN6MS.cjs} +28 -28
  25. package/dist/{chunk-2SU3HI5Q.cjs → chunk-LKXMEOMY.cjs} +51 -51
  26. package/dist/{chunk-T2DBJGI2.cjs → chunk-MFXVX4RL.cjs} +8 -8
  27. package/dist/{chunk-6WPLL2C2.cjs → chunk-N2NUZ6C6.cjs} +7 -7
  28. package/dist/{chunk-C23H24WU.cjs → chunk-NSXYKOKK.cjs} +5 -5
  29. package/dist/{chunk-MFZUNTR7.js → chunk-QFPOX3D5.js} +4 -4
  30. package/dist/{chunk-SJESTPEC.cjs → chunk-QOP64GGO.cjs} +2 -2
  31. package/dist/{chunk-V5SXPYDB.js → chunk-S6TVQK6G.js} +2 -2
  32. package/dist/{chunk-RIGD2PFD.cjs → chunk-SMZKC6PE.cjs} +7 -7
  33. package/dist/{chunk-X3XWFR6F.js → chunk-VCCAKBC6.js} +1 -1
  34. package/dist/{chunk-AEHXBLG2.cjs → chunk-WXQTUY4R.cjs} +7 -7
  35. package/dist/clean.cjs +5 -5
  36. package/dist/clean.js +4 -4
  37. package/dist/config.cjs +6 -6
  38. package/dist/config.js +5 -5
  39. package/dist/context.cjs +8 -8
  40. package/dist/context.js +7 -7
  41. package/dist/index.cjs +16 -16
  42. package/dist/index.js +14 -14
  43. package/dist/package-json.cjs +6 -6
  44. package/dist/package-json.js +5 -5
  45. package/dist/plugins/deps-check.cjs +5 -5
  46. package/dist/plugins/deps-check.js +4 -4
  47. package/dist/plugins/resolve-paths.cjs +4 -4
  48. package/dist/plugins/resolve-paths.js +3 -3
  49. package/dist/tsup.cjs +5 -5
  50. package/dist/tsup.js +4 -4
  51. package/dist/types.cjs +2 -2
  52. package/dist/types.js +2 -2
  53. package/dist/watch.cjs +14 -14
  54. package/dist/watch.js +3 -3
  55. package/package.json +4 -4
  56. package/dist/chunk-N3AYB46G.cjs +0 -6
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getStopwatch,
3
3
  writeDebug
4
- } from "./chunk-6YDZYQLV.js";
4
+ } from "./chunk-L2IEBOYL.js";
5
5
  import {
6
6
  joinPaths
7
- } from "./chunk-347I4FKJ.js";
7
+ } from "./chunk-IAXKJC2K.js";
8
8
  import {
9
9
  __commonJS,
10
10
  __dirname,
@@ -12,11 +12,11 @@ import {
12
12
  __require,
13
13
  __toESM,
14
14
  init_esm_shims
15
- } from "./chunk-V5SXPYDB.js";
15
+ } from "./chunk-S6TVQK6G.js";
16
16
 
17
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-BYH4XDRH.js
17
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/chunk-BYH4XDRH.js
18
18
  var require_chunk_BYH4XDRH = __commonJS({
19
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-BYH4XDRH.js"(exports) {
19
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/chunk-BYH4XDRH.js"(exports) {
20
20
  "use strict";
21
21
  init_esm_shims();
22
22
  Object.defineProperty(exports, "__esModule", {
@@ -27,15 +27,14 @@ var require_chunk_BYH4XDRH = __commonJS({
27
27
  }
28
28
  });
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-TWFEYLU4.js
31
- import __import_fs from "fs";
32
- import __import_path from "path";
33
- import __import_resolveFrom from "resolve-from";
34
- import __import_tinyglobby from "tinyglobby";
30
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/chunk-TWFEYLU4.js
31
+ import * as __import_fs from "fs";
32
+ import * as __import_path from "path";
33
+ import * as __import_resolveFrom from "resolve-from";
34
+ import * as __import_tinyglobby from "tinyglobby";
35
35
  var require_chunk_TWFEYLU4 = __commonJS({
36
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-TWFEYLU4.js"(exports, module) {
36
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/chunk-TWFEYLU4.js"(exports) {
37
37
  init_esm_shims();
38
- module.exports;
39
38
  Object.defineProperty(exports, "__esModule", { value: true });
40
39
  function _interopRequireDefault(obj) {
41
40
  return obj && obj.__esModule ? obj : { default: obj };
@@ -56,7 +55,7 @@ var require_chunk_TWFEYLU4 = __commonJS({
56
55
  lastAccessLHS = value;
57
56
  value = fn(value);
58
57
  } else if (op === "call" || op === "optionalCall") {
59
- value = fn((...args2) => value.call(lastAccessLHS, ...args2));
58
+ value = fn((...args) => value.call(lastAccessLHS, ...args));
60
59
  lastAccessLHS = void 0;
61
60
  }
62
61
  }
@@ -120,7 +119,7 @@ var require_chunk_TWFEYLU4 = __commonJS({
120
119
  const strip = whitespace ? stripWithWhitespace : stripWithoutWhitespace;
121
120
  let isInsideString = false;
122
121
  let isInsideComment = false;
123
- let offset2 = 0;
122
+ let offset = 0;
124
123
  let buffer = "";
125
124
  let result = "";
126
125
  let commaIndex = -1;
@@ -137,54 +136,54 @@ var require_chunk_TWFEYLU4 = __commonJS({
137
136
  continue;
138
137
  }
139
138
  if (!isInsideComment && currentCharacter + nextCharacter === "//") {
140
- buffer += jsonString.slice(offset2, index);
141
- offset2 = index;
139
+ buffer += jsonString.slice(offset, index);
140
+ offset = index;
142
141
  isInsideComment = singleComment;
143
142
  index++;
144
143
  } else if (isInsideComment === singleComment && currentCharacter + nextCharacter === "\r\n") {
145
144
  index++;
146
145
  isInsideComment = false;
147
- buffer += strip(jsonString, offset2, index);
148
- offset2 = index;
146
+ buffer += strip(jsonString, offset, index);
147
+ offset = index;
149
148
  continue;
150
149
  } else if (isInsideComment === singleComment && currentCharacter === "\n") {
151
150
  isInsideComment = false;
152
- buffer += strip(jsonString, offset2, index);
153
- offset2 = index;
151
+ buffer += strip(jsonString, offset, index);
152
+ offset = index;
154
153
  } else if (!isInsideComment && currentCharacter + nextCharacter === "/*") {
155
- buffer += jsonString.slice(offset2, index);
156
- offset2 = index;
154
+ buffer += jsonString.slice(offset, index);
155
+ offset = index;
157
156
  isInsideComment = multiComment;
158
157
  index++;
159
158
  continue;
160
159
  } else if (isInsideComment === multiComment && currentCharacter + nextCharacter === "*/") {
161
160
  index++;
162
161
  isInsideComment = false;
163
- buffer += strip(jsonString, offset2, index + 1);
164
- offset2 = index + 1;
162
+ buffer += strip(jsonString, offset, index + 1);
163
+ offset = index + 1;
165
164
  continue;
166
165
  } else if (trailingCommas && !isInsideComment) {
167
166
  if (commaIndex !== -1) {
168
167
  if (currentCharacter === "}" || currentCharacter === "]") {
169
- buffer += jsonString.slice(offset2, index);
168
+ buffer += jsonString.slice(offset, index);
170
169
  result += strip(buffer, 0, 1) + buffer.slice(1);
171
170
  buffer = "";
172
- offset2 = index;
171
+ offset = index;
173
172
  commaIndex = -1;
174
173
  } else if (currentCharacter !== " " && currentCharacter !== " " && currentCharacter !== "\r" && currentCharacter !== "\n") {
175
- buffer += jsonString.slice(offset2, index);
176
- offset2 = index;
174
+ buffer += jsonString.slice(offset, index);
175
+ offset = index;
177
176
  commaIndex = -1;
178
177
  }
179
178
  } else if (currentCharacter === ",") {
180
- result += buffer + jsonString.slice(offset2, index);
179
+ result += buffer + jsonString.slice(offset, index);
181
180
  buffer = "";
182
- offset2 = index;
181
+ offset = index;
183
182
  commaIndex = index;
184
183
  }
185
184
  }
186
185
  }
187
- return result + buffer + (isInsideComment ? strip(jsonString.slice(offset2)) : jsonString.slice(offset2));
186
+ return result + buffer + (isInsideComment ? strip(jsonString.slice(offset)) : jsonString.slice(offset));
188
187
  }
189
188
  __name(stripJsonComments, "stripJsonComments");
190
189
  var _tinyglobby = __import_tinyglobby;
@@ -213,17 +212,17 @@ var require_chunk_TWFEYLU4 = __commonJS({
213
212
  let timeout;
214
213
  let promiseInFly;
215
214
  let callbackPending;
216
- return /* @__PURE__ */ __name(function debounced(...args2) {
215
+ return /* @__PURE__ */ __name(function debounced(...args) {
217
216
  if (promiseInFly) {
218
217
  callbackPending = /* @__PURE__ */ __name(() => {
219
- debounced(...args2);
218
+ debounced(...args);
220
219
  callbackPending = void 0;
221
220
  }, "callbackPending");
222
221
  } else {
223
222
  if (timeout != null) clearTimeout(timeout);
224
223
  timeout = setTimeout(() => {
225
224
  timeout = void 0;
226
- promiseInFly = fn(...args2).catch(onError).finally(() => {
225
+ promiseInFly = fn(...args).catch(onError).finally(() => {
227
226
  promiseInFly = void 0;
228
227
  if (callbackPending) callbackPending();
229
228
  });
@@ -426,19 +425,18 @@ var require_chunk_TWFEYLU4 = __commonJS({
426
425
  }
427
426
  });
428
427
 
429
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-VGC3FXLU.js
430
- import __import_fs2 from "fs";
431
- import __import_path2 from "path";
432
- import __import_joycon from "joycon";
433
- import __import_bundleRequire from "bundle-require";
434
- import __import_util from "util";
435
- import __import_worker_threads from "worker_threads";
436
- import __import_picocolors from "picocolors";
428
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/chunk-VGC3FXLU.js
429
+ import * as __import_fs2 from "fs";
430
+ import * as __import_path2 from "path";
431
+ import * as __import_joycon from "joycon";
432
+ import * as __import_bundleRequire from "bundle-require";
433
+ import * as __import_util from "util";
434
+ import * as __import_worker_threads from "worker_threads";
435
+ import * as __import_picocolors from "picocolors";
437
436
  var require_chunk_VGC3FXLU = __commonJS({
438
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-VGC3FXLU.js"(exports, module) {
437
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/chunk-VGC3FXLU.js"(exports) {
439
438
  init_esm_shims();
440
- var import_chunk_TWFEYLU4 = __toESM(require_chunk_TWFEYLU4());
441
- module.exports;
439
+ var __import___chunkTWFEYLU4_js = __toESM(require_chunk_TWFEYLU4());
442
440
  Object.defineProperty(exports, "__esModule", { value: true });
443
441
  function _interopRequireDefault(obj) {
444
442
  return obj && obj.__esModule ? obj : { default: obj };
@@ -459,14 +457,14 @@ var require_chunk_VGC3FXLU = __commonJS({
459
457
  lastAccessLHS = value;
460
458
  value = fn(value);
461
459
  } else if (op === "call" || op === "optionalCall") {
462
- value = fn((...args2) => value.call(lastAccessLHS, ...args2));
460
+ value = fn((...args) => value.call(lastAccessLHS, ...args));
463
461
  lastAccessLHS = void 0;
464
462
  }
465
463
  }
466
464
  return value;
467
465
  }
468
466
  __name(_optionalChain, "_optionalChain");
469
- var _chunkTWFEYLU4js = import_chunk_TWFEYLU4.default;
467
+ var _chunkTWFEYLU4js = __import___chunkTWFEYLU4_js;
470
468
  var _fs = __import_fs2;
471
469
  var _fs2 = _interopRequireDefault(_fs);
472
470
  var _path = __import_path2;
@@ -572,9 +570,9 @@ var require_chunk_VGC3FXLU = __commonJS({
572
570
  const color = type === "info" ? "blue" : type === "error" ? "red" : type === "warn" ? "yellow" : "green";
573
571
  return _picocolors2.default[color](data);
574
572
  }, "colorize");
575
- var makeLabel = /* @__PURE__ */ __name((name2, input, type) => {
573
+ var makeLabel = /* @__PURE__ */ __name((name, input, type) => {
576
574
  return [
577
- name2 && `${_picocolors2.default.dim("[")}${name2.toUpperCase()}${_picocolors2.default.dim("]")}`,
575
+ name && `${_picocolors2.default.dim("[")}${name.toUpperCase()}${_picocolors2.default.dim("]")}`,
578
576
  colorize(type, input.toUpperCase())
579
577
  ].filter(Boolean).join(" ");
580
578
  }, "makeLabel");
@@ -587,26 +585,26 @@ var require_chunk_VGC3FXLU = __commonJS({
587
585
  return silent;
588
586
  }
589
587
  __name(getSilent, "getSilent");
590
- var createLogger = /* @__PURE__ */ __name((name2) => {
588
+ var createLogger = /* @__PURE__ */ __name((name) => {
591
589
  return {
592
590
  setName(_name) {
593
- name2 = _name;
591
+ name = _name;
594
592
  },
595
- success(label, ...args2) {
596
- return this.log(label, "success", ...args2);
593
+ success(label, ...args) {
594
+ return this.log(label, "success", ...args);
597
595
  },
598
- info(label, ...args2) {
599
- return this.log(label, "info", ...args2);
596
+ info(label, ...args) {
597
+ return this.log(label, "info", ...args);
600
598
  },
601
- error(label, ...args2) {
602
- return this.log(label, "error", ...args2);
599
+ error(label, ...args) {
600
+ return this.log(label, "error", ...args);
603
601
  },
604
- warn(label, ...args2) {
605
- return this.log(label, "warn", ...args2);
602
+ warn(label, ...args) {
603
+ return this.log(label, "warn", ...args);
606
604
  },
607
605
  log(label, type, ...data) {
608
- const args2 = [
609
- makeLabel(name2, label, type),
606
+ const args = [
607
+ makeLabel(name, label, type),
610
608
  ...data.map((item) => colorize(type, item, true))
611
609
  ];
612
610
  switch (type) {
@@ -614,22 +612,22 @@ var require_chunk_VGC3FXLU = __commonJS({
614
612
  if (!_worker_threads.isMainThread) {
615
613
  _optionalChain([_worker_threads.parentPort, "optionalAccess", (_) => _.postMessage, "call", (_2) => _2({
616
614
  type: "error",
617
- text: _util2.default.format(...args2)
615
+ text: _util2.default.format(...args)
618
616
  })]);
619
617
  return;
620
618
  }
621
- return console.error(...args2);
619
+ return console.error(...args);
622
620
  }
623
621
  default:
624
622
  if (silent) return;
625
623
  if (!_worker_threads.isMainThread) {
626
624
  _optionalChain([_worker_threads.parentPort, "optionalAccess", (_3) => _3.postMessage, "call", (_4) => _4({
627
625
  type: "log",
628
- text: _util2.default.format(...args2)
626
+ text: _util2.default.format(...args)
629
627
  })]);
630
628
  return;
631
629
  }
632
- console.log(...args2);
630
+ console.log(...args);
633
631
  }
634
632
  }
635
633
  };
@@ -651,11 +649,11 @@ var require_chunk_VGC3FXLU = __commonJS({
651
649
  var reportSize = /* @__PURE__ */ __name((logger, format, files) => {
652
650
  const filenames = Object.keys(files);
653
651
  const maxLength = getLengthOfLongestString(filenames) + 1;
654
- for (const name2 of filenames) {
652
+ for (const name of filenames) {
655
653
  logger.success(
656
654
  format,
657
- `${_picocolors2.default.bold(padRight(name2, maxLength))}${_picocolors2.default.green(
658
- prettyBytes(files[name2])
655
+ `${_picocolors2.default.bold(padRight(name, maxLength))}${_picocolors2.default.green(
656
+ prettyBytes(files[name])
659
657
  )}`
660
658
  );
661
659
  }
@@ -671,13 +669,12 @@ var require_chunk_VGC3FXLU = __commonJS({
671
669
  }
672
670
  });
673
671
 
674
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-JZ25TPTY.js
675
- import __import_worker_threads2 from "worker_threads";
676
- import __import_picocolors2 from "picocolors";
672
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/chunk-JZ25TPTY.js
673
+ import * as __import_worker_threads2 from "worker_threads";
674
+ import * as __import_picocolors2 from "picocolors";
677
675
  var require_chunk_JZ25TPTY = __commonJS({
678
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/chunk-JZ25TPTY.js"(exports, module) {
676
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/chunk-JZ25TPTY.js"(exports) {
679
677
  init_esm_shims();
680
- module.exports;
681
678
  Object.defineProperty(exports, "__esModule", { value: true });
682
679
  function _interopRequireDefault(obj) {
683
680
  return obj && obj.__esModule ? obj : { default: obj };
@@ -729,29 +726,371 @@ var require_chunk_JZ25TPTY = __commonJS({
729
726
  }
730
727
  });
731
728
 
732
- // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/index.js
733
- import __import_path3 from "path";
734
- import __import_fs3 from "fs";
735
- import __import_worker_threads3 from "worker_threads";
736
- import __import_bundleRequire2 from "bundle-require";
737
- import __import_tinyexec from "tinyexec";
738
- import __import_tinyglobby2 from "tinyglobby";
739
- import __import_treeKill from "tree-kill";
740
- import __import_esbuild from "esbuild";
741
- import __import_consola from "consola";
742
- import __import_sucrase from "sucrase";
743
- import __import_sourceMap from "source-map";
744
- import __import_rollup from "rollup";
745
- import __import_typescript from "typescript";
746
- import __import_chokidar from "chokidar";
729
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/commonjs-plugin.js
730
+ import * as __import_fs3 from "fs";
731
+ import * as __import_esbuild from "esbuild";
732
+ var require_commonjs_plugin = __commonJS({
733
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/commonjs-plugin.js"(exports, module) {
734
+ init_esm_shims();
735
+ var __defProp = Object.defineProperty;
736
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
737
+ var __getOwnPropNames = Object.getOwnPropertyNames;
738
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
739
+ var __export = /* @__PURE__ */ __name((target, all) => {
740
+ for (var name in all)
741
+ __defProp(target, name, { get: all[name], enumerable: true });
742
+ }, "__export");
743
+ var __copyProps = /* @__PURE__ */ __name((to, from, except, desc) => {
744
+ if (from && typeof from === "object" || typeof from === "function") {
745
+ for (let key of __getOwnPropNames(from))
746
+ if (!__hasOwnProp.call(to, key) && key !== except)
747
+ __defProp(to, key, { get: /* @__PURE__ */ __name(() => from[key], "get"), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
748
+ }
749
+ return to;
750
+ }, "__copyProps");
751
+ var __toCommonJS = /* @__PURE__ */ __name((mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod), "__toCommonJS");
752
+ var index_exports = {};
753
+ __export(index_exports, {
754
+ commonjs: /* @__PURE__ */ __name(() => commonjs, "commonjs"),
755
+ default: /* @__PURE__ */ __name(() => index_default, "default")
756
+ });
757
+ module.exports = __toCommonJS(index_exports);
758
+ var import_fs = __import_fs3;
759
+ function isNewLine(code) {
760
+ return code === 10 || code === 13 || code === 8232 || code === 8233;
761
+ }
762
+ __name(isNewLine, "isNewLine");
763
+ function codePointToString(ch) {
764
+ if (ch <= 65535) return String.fromCharCode(ch);
765
+ ch -= 65536;
766
+ return String.fromCharCode((ch >> 10) + 55296, (ch & 1023) + 56320);
767
+ }
768
+ __name(codePointToString, "codePointToString");
769
+ var Lexer = class {
770
+ static {
771
+ __name(this, "Lexer");
772
+ }
773
+ input = "";
774
+ pos = 0;
775
+ readString(input, pos) {
776
+ if (pos >= input.length) return null;
777
+ this.input = input;
778
+ this.pos = pos;
779
+ const quote = this.input.charCodeAt(pos);
780
+ if (!(quote === 34 || quote === 39)) return null;
781
+ let out = "";
782
+ let chunkStart = ++this.pos;
783
+ while (true) {
784
+ if (this.pos >= this.input.length) return null;
785
+ let ch = this.input.charCodeAt(this.pos);
786
+ if (ch === quote) break;
787
+ if (ch === 92) {
788
+ out += this.input.slice(chunkStart, this.pos);
789
+ const escaped = this.readEscapedChar();
790
+ if (escaped === null) return null;
791
+ out += escaped;
792
+ chunkStart = this.pos;
793
+ } else {
794
+ if (isNewLine(ch)) return null;
795
+ ++this.pos;
796
+ }
797
+ }
798
+ out += this.input.slice(chunkStart, this.pos++);
799
+ return out;
800
+ }
801
+ readEscapedChar() {
802
+ let ch = this.input.charCodeAt(++this.pos);
803
+ let code;
804
+ ++this.pos;
805
+ switch (ch) {
806
+ case 110:
807
+ return "\n";
808
+ case 114:
809
+ return "\r";
810
+ case 120:
811
+ code = this.readHexChar(2);
812
+ if (code === null) return null;
813
+ return String.fromCharCode(code);
814
+ case 117:
815
+ code = this.readCodePoint();
816
+ if (code === null) return null;
817
+ return codePointToString(code);
818
+ case 116:
819
+ return " ";
820
+ case 98:
821
+ return "\b";
822
+ case 118:
823
+ return "\v";
824
+ case 102:
825
+ return "\f";
826
+ case 13:
827
+ if (this.input.charCodeAt(this.pos) === 10) {
828
+ ++this.pos;
829
+ }
830
+ case 10:
831
+ return "";
832
+ case 56:
833
+ case 57:
834
+ return null;
835
+ default:
836
+ if (ch >= 48 && ch <= 55) {
837
+ let match = this.input.slice(this.pos - 1, this.pos + 2).match(/^[0-7]+/);
838
+ if (match === null) return null;
839
+ let octalStr = match[0];
840
+ let octal = parseInt(octalStr, 8);
841
+ if (octal > 255) {
842
+ octalStr = octalStr.slice(0, -1);
843
+ octal = parseInt(octalStr, 8);
844
+ }
845
+ this.pos += octalStr.length - 1;
846
+ ch = this.input.charCodeAt(this.pos);
847
+ if (octalStr !== "0" || ch === 56 || ch === 57) return null;
848
+ return String.fromCharCode(octal);
849
+ }
850
+ if (isNewLine(ch)) return "";
851
+ return String.fromCharCode(ch);
852
+ }
853
+ }
854
+ readInt(radix, len) {
855
+ let start = this.pos;
856
+ let total = 0;
857
+ for (let i = 0; i < len; ++i, ++this.pos) {
858
+ let code = this.input.charCodeAt(this.pos);
859
+ let val;
860
+ if (code >= 97) {
861
+ val = code - 97 + 10;
862
+ } else if (code >= 65) {
863
+ val = code - 65 + 10;
864
+ } else if (code >= 48 && code <= 57) {
865
+ val = code - 48;
866
+ } else {
867
+ val = Infinity;
868
+ }
869
+ if (val >= radix) break;
870
+ total = total * radix + val;
871
+ }
872
+ if (this.pos === start || len != null && this.pos - start !== len) return null;
873
+ return total;
874
+ }
875
+ readHexChar(len) {
876
+ return this.readInt(16, len);
877
+ }
878
+ readCodePoint() {
879
+ let ch = this.input.charCodeAt(this.pos);
880
+ let code;
881
+ if (ch === 123) {
882
+ ++this.pos;
883
+ code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
884
+ ++this.pos;
885
+ if (code && code > 1114111) return null;
886
+ } else {
887
+ code = this.readHexChar(4);
888
+ }
889
+ return code;
890
+ }
891
+ };
892
+ function orderedUniq(array) {
893
+ let ret = [], visited = /* @__PURE__ */ new Set();
894
+ for (let val of array) if (!visited.has(val)) visited.add(val), ret.push(val);
895
+ return ret;
896
+ }
897
+ __name(orderedUniq, "orderedUniq");
898
+ function cachedReduce(array, reducer, s) {
899
+ let cache = [s], cacheLen = 1, last = s;
900
+ return (len) => {
901
+ while (cacheLen <= len) cacheLen = cache.push(last = reducer(last, array[cacheLen - 1]));
902
+ return cache[len];
903
+ };
904
+ }
905
+ __name(cachedReduce, "cachedReduce");
906
+ var reservedWords = "break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public";
907
+ var builtin = "arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl";
908
+ var forbiddenIdentifiers = new Set(`${reservedWords} ${builtin}`.split(" "));
909
+ forbiddenIdentifiers.add("");
910
+ var makeLegalIdentifier = /* @__PURE__ */ __name(function makeLegalIdentifier2(str) {
911
+ let identifier = str.replace(/-(\w)/g, (_, letter) => letter.toUpperCase()).replace(/[^$_a-zA-Z0-9]/g, "_");
912
+ if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) {
913
+ identifier = `_${identifier}`;
914
+ }
915
+ return identifier || "_";
916
+ }, "makeLegalIdentifier2");
917
+ function prepend(code, prefix) {
918
+ if (code.startsWith("#!")) {
919
+ const i = code.indexOf("\n") + 1;
920
+ return code.slice(0, i) + prefix + code.slice(i);
921
+ }
922
+ return prefix + code;
923
+ }
924
+ __name(prepend, "prepend");
925
+ function commonjs({
926
+ filter = /\.c?js$/,
927
+ transform = false,
928
+ transformConfig,
929
+ requireReturnsDefault = false,
930
+ ignore
931
+ } = {}) {
932
+ const init_cjs_module_lexer = transform ? import("cjs-module-lexer") : void 0;
933
+ const use_default_export = typeof requireReturnsDefault === "function" ? requireReturnsDefault : (_path) => requireReturnsDefault;
934
+ const is_ignored = typeof ignore === "function" ? ignore : Array.isArray(ignore) ? (path) => ignore.includes(path) : () => false;
935
+ return {
936
+ name: "commonjs",
937
+ setup({ onLoad, esbuild }) {
938
+ let esbuild_shim;
939
+ const require_esbuild = /* @__PURE__ */ __name(() => esbuild || (esbuild_shim || (esbuild_shim = __import_esbuild)), "require_esbuild");
940
+ const read = import_fs.promises.readFile;
941
+ const lexer = new Lexer();
942
+ onLoad({ filter }, async (args) => {
943
+ let parseCJS;
944
+ if (init_cjs_module_lexer) {
945
+ const { init, parse } = await init_cjs_module_lexer;
946
+ await init();
947
+ parseCJS = parse;
948
+ }
949
+ let contents;
950
+ try {
951
+ contents = await read(args.path, "utf8");
952
+ } catch {
953
+ return null;
954
+ }
955
+ const willTransform = transform === true || typeof transform === "function" && transform(args.path);
956
+ let cjsExports;
957
+ if (parseCJS && willTransform) {
958
+ let sourcemapIndex = contents.lastIndexOf("//# sourceMappingURL=");
959
+ let sourcemap;
960
+ if (sourcemapIndex !== -1) {
961
+ sourcemap = contents.slice(sourcemapIndex);
962
+ let sourcemapEnd = sourcemap.indexOf("\n");
963
+ if (sourcemapEnd !== -1 && sourcemap.slice(sourcemapEnd + 1).trimStart().length > 0) {
964
+ sourcemap = void 0;
965
+ } else {
966
+ contents = contents.slice(0, sourcemapIndex);
967
+ }
968
+ }
969
+ cjsExports = parseCJS(contents);
970
+ let { behavior, exports: exports2, sideEffects } = typeof willTransform === "object" ? willTransform : {};
971
+ behavior ?? (behavior = (transformConfig == null ? void 0 : transformConfig.behavior) ?? "node");
972
+ exports2 = orderedUniq(cjsExports.exports.concat(exports2 ?? []));
973
+ sideEffects ?? (sideEffects = (transformConfig == null ? void 0 : transformConfig.sideEffects) ?? true);
974
+ let exportDefault = behavior === "node" ? "export default exports;" : "export default exports.__esModule ? exports.default : exports;";
975
+ let exportsMap = exports2.map((e) => [e, makeLegalIdentifier(e)]);
976
+ if (exportsMap.some(([e]) => e === "default")) {
977
+ if (behavior === "node") {
978
+ exportsMap = exportsMap.filter(([e]) => e !== "default");
979
+ } else {
980
+ exportDefault = "";
981
+ }
982
+ }
983
+ let reexports = cjsExports.reexports.map((e) => `export * from ${JSON.stringify(e)};`).join("");
984
+ let transformed;
985
+ if (sideEffects === false) {
986
+ transformed = [
987
+ // make sure we don't manipulate the first line so that sourcemap is fine
988
+ reexports + "var mod, exports = /* @__PURE__ */ ((exports, module) => {" + contents,
989
+ "return module.exports})((mod = { exports: {} }).exports, mod); " + exportDefault
990
+ ];
991
+ if (exportsMap.length > 0) {
992
+ for (const [e, name] of exportsMap) {
993
+ transformed.push(`var ${name} = /* @__PURE__ */ (() => exports[${JSON.stringify(e)}])();`);
994
+ }
995
+ transformed.push(
996
+ `export { ${exportsMap.map(([e, name]) => e === name ? e : `${name} as ${JSON.stringify(e)}`).join(", ")} };`
997
+ );
998
+ }
999
+ } else {
1000
+ transformed = [
1001
+ reexports + "var exports = {}, module = { exports }; {" + contents,
1002
+ "}; exports = module.exports; " + exportDefault
1003
+ ];
1004
+ if (exportsMap.length > 0) {
1005
+ transformed.push(
1006
+ `var { ${exportsMap.map(([e, name]) => e === name ? e : `${JSON.stringify(e)}: ${name}`).join(", ")} } = exports;`,
1007
+ `export { ${exportsMap.map(([e, name]) => e === name ? e : `${name} as ${JSON.stringify(e)}`).join(", ")} };`
1008
+ );
1009
+ }
1010
+ }
1011
+ contents = transformed.join("\n") + (sourcemap ? "\n" + sourcemap : "");
1012
+ }
1013
+ function makeName(path) {
1014
+ let name = `__import_${makeLegalIdentifier(path)}`;
1015
+ if (contents.includes(name)) {
1016
+ let suffix = 2;
1017
+ while (contents.includes(`${name}${suffix}`)) suffix++;
1018
+ name = `${name}${suffix}`;
1019
+ }
1020
+ return name;
1021
+ }
1022
+ __name(makeName, "makeName");
1023
+ let warnings;
1024
+ try {
1025
+ ({ warnings } = await require_esbuild().transform(contents, { format: "esm", logLevel: "silent" }));
1026
+ } catch (err) {
1027
+ ({ warnings } = err);
1028
+ }
1029
+ let lines = contents.split("\n");
1030
+ let getOffset = cachedReduce(lines, (a, b) => a + 1 + b.length, 0);
1031
+ if (warnings && (warnings = warnings.filter((e) => e.text.includes('"require" to "esm"'))).length) {
1032
+ let edits = [];
1033
+ let imports = [];
1034
+ for (const { location } of warnings) {
1035
+ if (location === null) continue;
1036
+ const { line, lineText, column, length } = location;
1037
+ const leftBrace = column + length + 1;
1038
+ const path = lexer.readString(lineText, leftBrace);
1039
+ if (path === null || is_ignored(path)) continue;
1040
+ const rightBrace = lineText.indexOf(")", leftBrace + 2 + path.length) + 1;
1041
+ let name = makeName(path);
1042
+ let import_statement;
1043
+ if (use_default_export(path)) {
1044
+ import_statement = `import ${name} from ${JSON.stringify(path)};`;
1045
+ } else {
1046
+ import_statement = `import * as ${name} from ${JSON.stringify(path)};`;
1047
+ }
1048
+ let offset2 = getOffset(line - 1);
1049
+ edits.push([offset2 + column, offset2 + rightBrace, name]);
1050
+ imports.push(import_statement);
1051
+ }
1052
+ if (imports.length === 0) return null;
1053
+ imports = orderedUniq(imports);
1054
+ let offset = 0;
1055
+ for (const [start, end, name] of edits) {
1056
+ contents = contents.slice(0, start + offset) + name + contents.slice(end + offset);
1057
+ offset += name.length - (end - start);
1058
+ }
1059
+ contents = prepend(contents, [...imports, cjsExports ? "exports;" : ""].join(""));
1060
+ return { contents };
1061
+ }
1062
+ });
1063
+ }
1064
+ };
1065
+ }
1066
+ __name(commonjs, "commonjs");
1067
+ var index_default = commonjs;
1068
+ }
1069
+ });
1070
+
1071
+ // ../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/index.js
1072
+ import * as __import_path3 from "path";
1073
+ import * as __import_fs4 from "fs";
1074
+ import * as __import_worker_threads3 from "worker_threads";
1075
+ import * as __import_bundleRequire2 from "bundle-require";
1076
+ import * as __import_tinyexec from "tinyexec";
1077
+ import * as __import_tinyglobby2 from "tinyglobby";
1078
+ import * as __import_treeKill from "tree-kill";
1079
+ import * as __import_esbuild2 from "esbuild";
1080
+ import * as __import_consola from "consola";
1081
+ import * as __import_sucrase from "sucrase";
1082
+ import * as __import_sourceMap from "source-map";
1083
+ import * as __import_rollup from "rollup";
1084
+ import * as __import_typescript from "typescript";
1085
+ import * as __import_chokidar from "chokidar";
747
1086
  var require_dist = __commonJS({
748
- "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=d6d235bacb1b52781b6422127cf8179bf4fa7087e1b44c74b6d276e3935d9a55__7a3232d6d9fb61feedaa124fde7a8801/node_modules/tsup/dist/index.js"(exports, module) {
1087
+ "../../node_modules/.pnpm/tsup@8.4.0_patch_hash=214cbeb07445a723854c8fc34007a4790e4ea2ad2a5d1919d7b09d653a83dae4__55b515e7c12ac974ee579d60acf23eea/node_modules/tsup/dist/index.js"(exports) {
749
1088
  init_esm_shims();
750
- var import_chunk_BYH4XDRH = __toESM(require_chunk_BYH4XDRH());
751
- var import_chunk_VGC3FXLU = __toESM(require_chunk_VGC3FXLU());
752
- var import_chunk_JZ25TPTY = __toESM(require_chunk_JZ25TPTY());
753
- var import_chunk_TWFEYLU4 = __toESM(require_chunk_TWFEYLU4());
754
- module.exports;
1089
+ var __import___chunkBYH4XDRH_js = __toESM(require_chunk_BYH4XDRH());
1090
+ var __import___chunkVGC3FXLU_js = __toESM(require_chunk_VGC3FXLU());
1091
+ var __import___chunkJZ25TPTY_js = __toESM(require_chunk_JZ25TPTY());
1092
+ var __import___chunkTWFEYLU4_js = __toESM(require_chunk_TWFEYLU4());
1093
+ var __import___commonjsPlugin_js = __toESM(require_commonjs_plugin());
755
1094
  Object.defineProperty(exports, "__esModule", { value: true });
756
1095
  function _interopRequireWildcard(obj) {
757
1096
  if (obj && obj.__esModule) {
@@ -797,7 +1136,7 @@ var require_dist = __commonJS({
797
1136
  lastAccessLHS = value;
798
1137
  value = fn(value);
799
1138
  } else if (op === "call" || op === "optionalCall") {
800
- value = fn((...args2) => value.call(lastAccessLHS, ...args2));
1139
+ value = fn((...args) => value.call(lastAccessLHS, ...args));
801
1140
  lastAccessLHS = void 0;
802
1141
  }
803
1142
  }
@@ -805,13 +1144,14 @@ var require_dist = __commonJS({
805
1144
  }
806
1145
  __name(_optionalChain, "_optionalChain");
807
1146
  var _class;
808
- var _chunkBYH4XDRHjs = import_chunk_BYH4XDRH.default;
809
- var _chunkVGC3FXLUjs = import_chunk_VGC3FXLU.default;
810
- var _chunkJZ25TPTYjs = import_chunk_JZ25TPTY.default;
811
- var _chunkTWFEYLU4js = import_chunk_TWFEYLU4.default;
1147
+ var _chunkBYH4XDRHjs = __import___chunkBYH4XDRH_js;
1148
+ var _chunkVGC3FXLUjs = __import___chunkVGC3FXLU_js;
1149
+ var _chunkJZ25TPTYjs = __import___chunkJZ25TPTY_js;
1150
+ var _chunkTWFEYLU4js = __import___chunkTWFEYLU4_js;
1151
+ var _commonjsPluginjs = __import___commonjsPlugin_js;
812
1152
  var _path = __import_path3;
813
1153
  var _path2 = _interopRequireDefault(_path);
814
- var _fs = __import_fs3;
1154
+ var _fs = __import_fs4;
815
1155
  var _fs2 = _interopRequireDefault(_fs);
816
1156
  var _worker_threads = __import_worker_threads3;
817
1157
  var _bundlerequire = __import_bundleRequire2;
@@ -819,15 +1159,15 @@ var require_dist = __commonJS({
819
1159
  var _tinyglobby = __import_tinyglobby2;
820
1160
  var _treekill = __import_treeKill;
821
1161
  var _treekill2 = _interopRequireDefault(_treekill);
822
- var _esbuild = __import_esbuild;
1162
+ var _esbuild = __import_esbuild2;
823
1163
  var _consola = __import_consola;
824
1164
  var _consola2 = _interopRequireDefault(_consola);
825
1165
  var nodeProtocolPlugin = /* @__PURE__ */ __name(() => {
826
1166
  const nodeProtocol = "node:";
827
1167
  return {
828
1168
  name: "node-protocol-plugin",
829
- setup({ onResolve: onResolve2 }) {
830
- onResolve2(
1169
+ setup({ onResolve }) {
1170
+ onResolve(
831
1171
  {
832
1172
  filter: /^node:/
833
1173
  },
@@ -839,69 +1179,6 @@ var require_dist = __commonJS({
839
1179
  }
840
1180
  };
841
1181
  }, "nodeProtocolPlugin");
842
- var requireToImportPlugin = /* @__PURE__ */ __name(() => {
843
- return {
844
- name: "require-to-import",
845
- setup({ onResolve, onLoad, esbuild }) {
846
- function matchBrace(text, from) {
847
- if (!(text[from] === "(")) return -1;
848
- let i, k = 1;
849
- for (i = from + 1; i < text.length && k > 0; ++i) {
850
- if (text[i] === "(") k++;
851
- if (text[i] === ")") k--;
852
- }
853
- let to = i - 1;
854
- if (!(text[to] === ")") || k !== 0) return -1;
855
- return to;
856
- }
857
- __name(matchBrace, "matchBrace");
858
- function makeName(path2) {
859
- return path2.replace(/-(\w)/g, (_, x) => x.toUpperCase()).replace(/[^$_a-zA-Z0-9]/g, "_");
860
- }
861
- __name(makeName, "makeName");
862
- onLoad({ filter: /\.c?js/ }, async (args) => {
863
- let contents = await _fs2.default.promises.readFile(args.path, "utf8");
864
- let warnings;
865
- try {
866
- ({ warnings } = await esbuild.transform(contents, { format: "esm", logLevel: "silent" }));
867
- } catch (err) {
868
- ({ warnings } = err);
869
- }
870
- let lines = contents.split("\n");
871
- if (warnings && warnings.some((e) => e.text.includes('"require" to "esm"'))) {
872
- let modifications = [], imports = [];
873
- for (const { location: { line, lineText, column, length } } of warnings) {
874
- let left = column + length;
875
- let right = matchBrace(lineText, left);
876
- if (right === -1) continue;
877
- let raw = lineText.slice(left + 1, right);
878
- let path;
879
- try {
880
- path = eval(raw);
881
- if (typeof path !== "string") continue;
882
- } catch (e) {
883
- continue;
884
- }
885
- let name = `__import_${makeName(path)}`;
886
- let import_statement = `import ${name} from ${raw};`;
887
- let offset = lines.slice(0, line - 1).map((line2) => line2.length).reduce((a, b) => a + 1 + b, 0);
888
- modifications.push([offset + column, offset + right + 1, name]);
889
- imports.push(import_statement);
890
- }
891
- if (imports.length === 0) return null;
892
- imports = [...new Set(imports)];
893
- let offset = 0;
894
- for (const [start, end, name2] of modifications) {
895
- contents = contents.slice(0, start + offset) + name2 + contents.slice(end + offset);
896
- offset += name2.length - (end - start);
897
- }
898
- contents = [...imports, "module.exports", contents].join(";");
899
- return { contents };
900
- }
901
- });
902
- }
903
- };
904
- }, "requireToImportPlugin");
905
1182
  var NON_NODE_MODULE_RE = /^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/;
906
1183
  var externalPlugin = /* @__PURE__ */ __name(({
907
1184
  external,
@@ -917,29 +1194,29 @@ var require_dist = __commonJS({
917
1194
  void 0,
918
1195
  tsconfigResolvePaths || {}
919
1196
  );
920
- build2.onResolve({ filter: /.*/ }, (args2) => {
921
- if (_bundlerequire.match.call(void 0, args2.path, resolvePatterns)) {
1197
+ build2.onResolve({ filter: /.*/ }, (args) => {
1198
+ if (_bundlerequire.match.call(void 0, args.path, resolvePatterns)) {
922
1199
  return;
923
1200
  }
924
- if (_bundlerequire.match.call(void 0, args2.path, noExternal)) {
1201
+ if (_bundlerequire.match.call(void 0, args.path, noExternal)) {
925
1202
  return;
926
1203
  }
927
- if (_bundlerequire.match.call(void 0, args2.path, external)) {
1204
+ if (_bundlerequire.match.call(void 0, args.path, external)) {
928
1205
  return { external: true };
929
1206
  }
930
- if (!NON_NODE_MODULE_RE.test(args2.path)) {
1207
+ if (!NON_NODE_MODULE_RE.test(args.path)) {
931
1208
  return {
932
- path: args2.path,
1209
+ path: args.path,
933
1210
  external: true
934
1211
  };
935
1212
  }
936
1213
  });
937
1214
  } else {
938
- build2.onResolve({ filter: /.*/ }, (args2) => {
939
- if (_bundlerequire.match.call(void 0, args2.path, noExternal)) {
1215
+ build2.onResolve({ filter: /.*/ }, (args) => {
1216
+ if (_bundlerequire.match.call(void 0, args.path, noExternal)) {
940
1217
  return;
941
1218
  }
942
- if (_bundlerequire.match.call(void 0, args2.path, external)) {
1219
+ if (_bundlerequire.match.call(void 0, args.path, external)) {
943
1220
  return { external: true };
944
1221
  }
945
1222
  });
@@ -1011,12 +1288,12 @@ var require_dist = __commonJS({
1011
1288
  };
1012
1289
  }
1013
1290
  );
1014
- build2.onLoad({ filter: /\.css$/ }, async (args2) => {
1015
- let contents2;
1016
- if (css && args2.path.endsWith(".svelte.css")) {
1017
- contents2 = css.get(args2.path);
1291
+ build2.onLoad({ filter: /\.css$/ }, async (args) => {
1292
+ let contents;
1293
+ if (css && args.path.endsWith(".svelte.css")) {
1294
+ contents = css.get(args.path);
1018
1295
  } else {
1019
- contents2 = await _fs2.default.promises.readFile(args2.path, "utf8");
1296
+ contents = await _fs2.default.promises.readFile(args.path, "utf8");
1020
1297
  }
1021
1298
  const { plugins, options: options3 } = await getPostcssConfig();
1022
1299
  if (plugins && plugins.length > 0) {
@@ -1030,11 +1307,11 @@ var require_dist = __commonJS({
1030
1307
  ]
1031
1308
  };
1032
1309
  }
1033
- const result = await _optionalChain([postcss, "optionalAccess", (_2) => _2.default, "call", (_3) => _3(plugins), "access", (_4) => _4.process, "call", (_5) => _5(contents2, { ...options3, from: args2.path })]);
1034
- contents2 = result.css;
1310
+ const result = await _optionalChain([postcss, "optionalAccess", (_2) => _2.default, "call", (_3) => _3(plugins), "access", (_4) => _4.process, "call", (_5) => _5(contents, { ...options3, from: args.path })]);
1311
+ contents = result.css;
1035
1312
  }
1036
1313
  if (inject) {
1037
- contents2 = (await _esbuild.transform.call(void 0, contents2, {
1314
+ contents = (await _esbuild.transform.call(void 0, contents, {
1038
1315
  minify: build2.initialOptions.minify,
1039
1316
  minifyIdentifiers: build2.initialOptions.minifyIdentifiers,
1040
1317
  minifySyntax: build2.initialOptions.minifySyntax,
@@ -1042,16 +1319,16 @@ var require_dist = __commonJS({
1042
1319
  logLevel: build2.initialOptions.logLevel,
1043
1320
  loader: "css"
1044
1321
  })).code;
1045
- contents2 = typeof inject === "function" ? await inject(JSON.stringify(contents2), args2.path) : `import styleInject from '#style-inject';styleInject(${JSON.stringify(
1046
- contents2
1322
+ contents = typeof inject === "function" ? await inject(JSON.stringify(contents), args.path) : `import styleInject from '#style-inject';styleInject(${JSON.stringify(
1323
+ contents
1047
1324
  )})`;
1048
1325
  return {
1049
- contents: contents2,
1326
+ contents,
1050
1327
  loader: "js"
1051
1328
  };
1052
1329
  }
1053
1330
  return {
1054
- contents: contents2,
1331
+ contents,
1055
1332
  loader: _nullishCoalesce(cssLoader, () => "css")
1056
1333
  };
1057
1334
  });
@@ -1068,16 +1345,16 @@ var require_dist = __commonJS({
1068
1345
  setup(build2) {
1069
1346
  let svelte;
1070
1347
  let sveltePreprocessor;
1071
- build2.onResolve({ filter: /\.svelte\.css$/ }, (args2) => {
1348
+ build2.onResolve({ filter: /\.svelte\.css$/ }, (args) => {
1072
1349
  return {
1073
1350
  path: _path2.default.relative(
1074
1351
  options2.workspaceConfig?.workspaceRoot || process.cwd(),
1075
- _path2.default.join(args2.resolveDir, args2.path)
1352
+ _path2.default.join(args.resolveDir, args.path)
1076
1353
  ),
1077
1354
  namespace: "svelte-css"
1078
1355
  };
1079
1356
  });
1080
- build2.onLoad({ filter: /\.svelte$/ }, async (args2) => {
1357
+ build2.onLoad({ filter: /\.svelte$/ }, async (args) => {
1081
1358
  svelte = svelte || _chunkTWFEYLU4js.localRequire.call(void 0, "svelte/compiler");
1082
1359
  sveltePreprocessor = sveltePreprocessor || _chunkTWFEYLU4js.localRequire.call(void 0, "svelte-preprocess");
1083
1360
  if (!svelte) {
@@ -1088,20 +1365,20 @@ var require_dist = __commonJS({
1088
1365
  const convertMessage = /* @__PURE__ */ __name(({ message, start, end }) => {
1089
1366
  let location;
1090
1367
  if (start && end) {
1091
- const lineText2 = source.split(/\r\n|\r|\n/g)[start.line - 1];
1092
- const lineEnd = start.line === end.line ? end.column : lineText2.length;
1368
+ const lineText = source.split(/\r\n|\r|\n/g)[start.line - 1];
1369
+ const lineEnd = start.line === end.line ? end.column : lineText.length;
1093
1370
  location = {
1094
1371
  file: filename,
1095
1372
  line: start.line,
1096
1373
  column: start.column,
1097
1374
  length: lineEnd - start.column,
1098
- lineText: lineText2
1375
+ lineText
1099
1376
  };
1100
1377
  }
1101
1378
  return { text: message, location };
1102
1379
  }, "convertMessage");
1103
- const source = await _fs2.default.promises.readFile(args2.path, "utf8");
1104
- const filename = _path2.default.relative(options2.workspaceConfig?.workspaceRoot || process.cwd(), args2.path);
1380
+ const source = await _fs2.default.promises.readFile(args.path, "utf8");
1381
+ const filename = _path2.default.relative(options2.workspaceConfig?.workspaceRoot || process.cwd(), args.path);
1105
1382
  try {
1106
1383
  const preprocess = await svelte.preprocess(
1107
1384
  source,
@@ -1116,7 +1393,7 @@ var require_dist = __commonJS({
1116
1393
  async script({ content, attributes }) {
1117
1394
  if (attributes.lang !== "ts") return { code: content };
1118
1395
  const { code, map } = await _esbuild.transform.call(void 0, content, {
1119
- sourcefile: args2.path,
1396
+ sourcefile: args.path,
1120
1397
  loader: "ts",
1121
1398
  sourcemap: true,
1122
1399
  tsconfigRaw: {
@@ -1133,20 +1410,20 @@ var require_dist = __commonJS({
1133
1410
  }
1134
1411
  },
1135
1412
  {
1136
- filename: args2.path
1413
+ filename: args.path
1137
1414
  }
1138
1415
  );
1139
1416
  const result = svelte.compile(preprocess.code, {
1140
1417
  filename,
1141
1418
  css: "external"
1142
1419
  });
1143
- let contents2 = result.js.code;
1420
+ let contents = result.js.code;
1144
1421
  if (css && result.css && result.css.code) {
1145
1422
  const cssPath = useSvelteCssExtension(filename);
1146
1423
  css.set(cssPath, result.css.code);
1147
- contents2 = `import '${useSvelteCssExtension(_path2.default.basename(args2.path))}';${contents2}`;
1424
+ contents = `import '${useSvelteCssExtension(_path2.default.basename(args.path))}';${contents}`;
1148
1425
  }
1149
- return { contents: contents2, warnings: result.warnings.map(convertMessage) };
1426
+ return { contents, warnings: result.warnings.map(convertMessage) };
1150
1427
  } catch (error) {
1151
1428
  return { errors: [convertMessage(error)] };
1152
1429
  }
@@ -1167,8 +1444,8 @@ var require_dist = __commonJS({
1167
1444
  return;
1168
1445
  }
1169
1446
  build2.initialOptions.keepNames = true;
1170
- build2.onLoad({ filter: /\.[jt]sx?$/ }, async (args2) => {
1171
- const isTs = /\.tsx?$/.test(args2.path);
1447
+ build2.onLoad({ filter: /\.[jt]sx?$/ }, async (args) => {
1448
+ const isTs = /\.tsx?$/.test(args.path);
1172
1449
  const jsc = {
1173
1450
  parser: {
1174
1451
  syntax: isTs ? "typescript" : "ecmascript",
@@ -1181,7 +1458,7 @@ var require_dist = __commonJS({
1181
1458
  keepClassNames: true,
1182
1459
  target: "es2022"
1183
1460
  };
1184
- const result = await swc.transformFile(args2.path, {
1461
+ const result = await swc.transformFile(args.path, {
1185
1462
  jsc,
1186
1463
  sourceMaps: true,
1187
1464
  configFile: false,
@@ -1191,7 +1468,7 @@ var require_dist = __commonJS({
1191
1468
  if (result.map) {
1192
1469
  const map = JSON.parse(result.map);
1193
1470
  map.sources = map.sources.map((source) => {
1194
- return _path2.default.isAbsolute(source) ? _path2.default.relative(_path2.default.dirname(args2.path), source) : source;
1471
+ return _path2.default.isAbsolute(source) ? _path2.default.relative(_path2.default.dirname(args.path), source) : source;
1195
1472
  });
1196
1473
  code += `//# sourceMappingURL=data:application/json;base64,${Buffer.from(
1197
1474
  JSON.stringify(map)
@@ -1208,9 +1485,9 @@ var require_dist = __commonJS({
1208
1485
  return {
1209
1486
  name: "native-node-modules",
1210
1487
  setup(build2) {
1211
- build2.onResolve({ filter: /\.node$/, namespace: "file" }, (args2) => {
1212
- const resolvedId = _chunkTWFEYLU4js.__require.resolve(args2.path, {
1213
- paths: [args2.resolveDir]
1488
+ build2.onResolve({ filter: /\.node$/, namespace: "file" }, (args) => {
1489
+ const resolvedId = _chunkTWFEYLU4js.__require.resolve(args.path, {
1490
+ paths: [args.resolveDir]
1214
1491
  });
1215
1492
  if (resolvedId.endsWith(".node")) {
1216
1493
  return {
@@ -1222,20 +1499,20 @@ var require_dist = __commonJS({
1222
1499
  path: resolvedId
1223
1500
  };
1224
1501
  });
1225
- build2.onLoad({ filter: /.*/, namespace: "node-file" }, (args2) => {
1502
+ build2.onLoad({ filter: /.*/, namespace: "node-file" }, (args) => {
1226
1503
  return {
1227
1504
  contents: `
1228
- import path from ${JSON.stringify(args2.path)}
1505
+ import path from ${JSON.stringify(args.path)}
1229
1506
  try { module.exports = require(path) }
1230
1507
  catch {}
1231
1508
  `,
1232
- resolveDir: _path2.default.dirname(args2.path)
1509
+ resolveDir: _path2.default.dirname(args.path)
1233
1510
  };
1234
1511
  });
1235
1512
  build2.onResolve(
1236
1513
  { filter: /\.node$/, namespace: "node-file" },
1237
- (args2) => ({
1238
- path: args2.path,
1514
+ (args) => ({
1515
+ path: args.path,
1239
1516
  namespace: "file"
1240
1517
  })
1241
1518
  );
@@ -1305,7 +1582,7 @@ var require_dist = __commonJS({
1305
1582
  await pluginContainer.buildStarted();
1306
1583
  const esbuildPlugins = [
1307
1584
  format === "cjs" && options2.removeNodeProtocol && nodeProtocolPlugin(),
1308
- format === "esm" && bundle && options2.requireToImport && requireToImportPlugin(),
1585
+ format === "esm" && bundle && _commonjsPluginjs.commonjs.call(void 0),
1309
1586
  {
1310
1587
  name: "modify-options",
1311
1588
  setup(build2) {
@@ -1592,13 +1869,13 @@ var require_dist = __commonJS({
1592
1869
  }
1593
1870
  }
1594
1871
  const inlineSourceMap = this.context.options.sourcemap === "inline";
1595
- const contents2 = info.type === "chunk" ? info.code + getSourcemapComment(
1872
+ const contents = info.type === "chunk" ? info.code + getSourcemapComment(
1596
1873
  inlineSourceMap,
1597
1874
  info.map,
1598
1875
  info.path,
1599
1876
  isCSS(info.path)
1600
1877
  ) : info.contents;
1601
- await outputFile(info.path, contents2, {
1878
+ await outputFile(info.path, contents, {
1602
1879
  mode: info.type === "chunk" ? info.mode : void 0
1603
1880
  });
1604
1881
  writtenFiles.push({
@@ -1606,20 +1883,20 @@ var require_dist = __commonJS({
1606
1883
  return _path2.default.relative(options2.workspaceConfig?.workspaceRoot || process.cwd(), info.path);
1607
1884
  },
1608
1885
  get size() {
1609
- return contents2.length;
1886
+ return contents.length;
1610
1887
  }
1611
1888
  });
1612
1889
  if (info.type === "chunk" && info.map && !inlineSourceMap) {
1613
1890
  const map = typeof info.map === "string" ? JSON.parse(info.map) : info.map;
1614
1891
  const outPath = `${info.path}.map`;
1615
- const contents22 = JSON.stringify(map);
1616
- await outputFile(outPath, contents22);
1892
+ const contents2 = JSON.stringify(map);
1893
+ await outputFile(outPath, contents2);
1617
1894
  writtenFiles.push({
1618
1895
  get name() {
1619
1896
  return _path2.default.relative(options2.workspaceConfig?.workspaceRoot || process.cwd(), outPath);
1620
1897
  },
1621
1898
  get size() {
1622
- return contents22.length;
1899
+ return contents2.length;
1623
1900
  }
1624
1901
  });
1625
1902
  }
@@ -1712,7 +1989,7 @@ var require_dist = __commonJS({
1712
1989
  var _rollup = __import_rollup;
1713
1990
  var treeShakingPlugin = /* @__PURE__ */ __name(({
1714
1991
  treeshake,
1715
- name: name2,
1992
+ name,
1716
1993
  silent
1717
1994
  }) => {
1718
1995
  return {
@@ -1745,7 +2022,7 @@ var require_dist = __commonJS({
1745
2022
  file: info.path,
1746
2023
  sourcemap: !!this.options.sourcemap,
1747
2024
  compact: !!this.options.minify,
1748
- name: name2
2025
+ name
1749
2026
  });
1750
2027
  for (const file of result.output) {
1751
2028
  if (file.type === "chunk" && file.fileName === _path2.default.basename(info.path)) {
@@ -1827,11 +2104,11 @@ var require_dist = __commonJS({
1827
2104
  __init() {
1828
2105
  this.seen = /* @__PURE__ */ new Set();
1829
2106
  }
1830
- assign(name2) {
2107
+ assign(name) {
1831
2108
  let suffix = 0;
1832
- let alias = name2 === "default" ? "default_alias" : name2;
2109
+ let alias = name === "default" ? "default_alias" : name;
1833
2110
  while (this.seen.has(alias)) {
1834
- alias = `${name2}_alias_${++suffix}`;
2111
+ alias = `${name}_alias_${++suffix}`;
1835
2112
  if (suffix >= 1e3) {
1836
2113
  throw new Error(
1837
2114
  "Alias generation exceeded limit. Possible infinite loop detected."
@@ -1864,13 +2141,13 @@ var require_dist = __commonJS({
1864
2141
  const exports2 = [];
1865
2142
  const exportSymbols = checker.getExportsOfModule(moduleSymbol);
1866
2143
  exportSymbols.forEach((symbol) => {
1867
- const name2 = symbol.getName();
2144
+ const name = symbol.getName();
1868
2145
  exports2.push({
1869
2146
  kind: "named",
1870
2147
  sourceFileName,
1871
2148
  destFileName,
1872
- name: name2,
1873
- alias: assignAlias(name2),
2149
+ name,
2150
+ alias: assignAlias(name),
1874
2151
  isTypeOnly: false
1875
2152
  });
1876
2153
  });
@@ -1906,7 +2183,7 @@ var require_dist = __commonJS({
1906
2183
  const diagnosticMessages = [];
1907
2184
  diagnostics.forEach((diagnostic) => {
1908
2185
  if (diagnostic.file) {
1909
- const { line: line2, character } = _typescript2.default.getLineAndCharacterOfPosition(
2186
+ const { line, character } = _typescript2.default.getLineAndCharacterOfPosition(
1910
2187
  diagnostic.file,
1911
2188
  diagnostic.start
1912
2189
  );
@@ -1915,7 +2192,7 @@ var require_dist = __commonJS({
1915
2192
  "\n"
1916
2193
  );
1917
2194
  diagnosticMessages.push(
1918
- `${diagnostic.file.fileName} (${line2 + 1},${character + 1}): ${message}`
2195
+ `${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`
1919
2196
  );
1920
2197
  } else {
1921
2198
  const message = _typescript2.default.flattenDiagnosticMessageText(
@@ -1994,13 +2271,13 @@ ${diagnosticMessage}`
1994
2271
  }
1995
2272
  __name(runTypeScriptCompiler, "runTypeScriptCompiler");
1996
2273
  function formatAggregationExports(exports2, declarationDirPath) {
1997
- const lines2 = exports2.map(
2274
+ const lines = exports2.map(
1998
2275
  (declaration) => formatAggregationExport(declaration, declarationDirPath)
1999
2276
  ).filter(_chunkTWFEYLU4js.truthy);
2000
- if (lines2.length === 0) {
2001
- lines2.push("export {};");
2277
+ if (lines.length === 0) {
2278
+ lines.push("export {};");
2002
2279
  }
2003
- return `${lines2.join("\n")}
2280
+ return `${lines.join("\n")}
2004
2281
  `;
2005
2282
  }
2006
2283
  __name(formatAggregationExports, "formatAggregationExports");
@@ -2043,7 +2320,7 @@ ${diagnosticMessage}`
2043
2320
  named: /* @__PURE__ */ new Set(),
2044
2321
  module: /* @__PURE__ */ new Set()
2045
2322
  };
2046
- const lines2 = exports2.filter((declaration) => {
2323
+ const lines = exports2.filter((declaration) => {
2047
2324
  if (declaration.kind === "module") {
2048
2325
  if (seen.module.has(declaration.moduleName)) {
2049
2326
  return false;
@@ -2060,10 +2337,10 @@ ${diagnosticMessage}`
2060
2337
  return false;
2061
2338
  }
2062
2339
  }).map((declaration) => formatDistributionExport(declaration, importPath)).filter(_chunkTWFEYLU4js.truthy);
2063
- if (lines2.length === 0) {
2064
- lines2.push("export {};");
2340
+ if (lines.length === 0) {
2341
+ lines.push("export {};");
2065
2342
  }
2066
- return `${lines2.join("\n")}
2343
+ return `${lines.join("\n")}
2067
2344
  `;
2068
2345
  }
2069
2346
  __name(formatDistributionExports, "formatDistributionExports");