@rolldown/browser 1.0.0-beta.7-commit.a0a7d95

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 (121) hide show
  1. package/LICENSE +25 -0
  2. package/bin/cli.mjs +2 -0
  3. package/dist/browser-bundler.mjs +3514 -0
  4. package/dist/browser.js +4626 -0
  5. package/dist/cli.cjs +1759 -0
  6. package/dist/cli.mjs +1828 -0
  7. package/dist/experimental-index.cjs +87 -0
  8. package/dist/experimental-index.mjs +67 -0
  9. package/dist/index.cjs +9 -0
  10. package/dist/index.mjs +5 -0
  11. package/dist/parallel-plugin-worker.cjs +43 -0
  12. package/dist/parallel-plugin-worker.mjs +48 -0
  13. package/dist/parallel-plugin.cjs +9 -0
  14. package/dist/parallel-plugin.mjs +8 -0
  15. package/dist/parse-ast-index.cjs +4 -0
  16. package/dist/parse-ast-index.mjs +4 -0
  17. package/dist/rolldown-binding.wasi-browser.js +102 -0
  18. package/dist/rolldown-binding.wasi.cjs +127 -0
  19. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  20. package/dist/shared/chunk-BuCFLigr.mjs +12 -0
  21. package/dist/shared/chunk-Dc32QXFI.cjs +31 -0
  22. package/dist/shared/parse-ast-index-C29iO6Jv.cjs +316 -0
  23. package/dist/shared/parse-ast-index-GcZLh6_d.mjs +273 -0
  24. package/dist/shared/prompt-B3VJLbs9.mjs +854 -0
  25. package/dist/shared/prompt-wpCBKCzA.cjs +855 -0
  26. package/dist/shared/src-6_rb-jCl.cjs +3147 -0
  27. package/dist/shared/src-QrPvO0Ec.mjs +4375 -0
  28. package/dist/types/api/build.d.ts +18 -0
  29. package/dist/types/api/experimental.d.ts +7 -0
  30. package/dist/types/api/rolldown/index.d.ts +3 -0
  31. package/dist/types/api/rolldown/rolldown-build.d.ts +15 -0
  32. package/dist/types/api/watch/index.d.ts +3 -0
  33. package/dist/types/api/watch/watch-emitter.d.ts +31 -0
  34. package/dist/types/api/watch/watcher.d.ts +13 -0
  35. package/dist/types/binding.d.ts +1504 -0
  36. package/dist/types/builtin-plugin/alias-plugin.d.ts +10 -0
  37. package/dist/types/builtin-plugin/constructors.d.ts +22 -0
  38. package/dist/types/builtin-plugin/replace-plugin.d.ts +27 -0
  39. package/dist/types/builtin-plugin/transform-plugin.d.ts +9 -0
  40. package/dist/types/builtin-plugin/utils.d.ts +8 -0
  41. package/dist/types/cli/arguments/alias.d.ts +16 -0
  42. package/dist/types/cli/arguments/index.d.ts +15 -0
  43. package/dist/types/cli/arguments/normalize.d.ts +16 -0
  44. package/dist/types/cli/arguments/utils.d.ts +8 -0
  45. package/dist/types/cli/commands/bundle.d.ts +3 -0
  46. package/dist/types/cli/commands/help.d.ts +1 -0
  47. package/dist/types/cli/index.d.ts +1 -0
  48. package/dist/types/cli/load-config.d.ts +5 -0
  49. package/dist/types/cli/logger.d.ts +5 -0
  50. package/dist/types/constants/plugin-context.d.ts +7 -0
  51. package/dist/types/constants/plugin.d.ts +45 -0
  52. package/dist/types/experimental-index.d.ts +9 -0
  53. package/dist/types/index.d.ts +31 -0
  54. package/dist/types/log/log-handler.d.ts +4 -0
  55. package/dist/types/log/logger.d.ts +6 -0
  56. package/dist/types/log/logging.d.ts +12 -0
  57. package/dist/types/log/logs.d.ts +18 -0
  58. package/dist/types/options/generated/checks-options.d.ts +57 -0
  59. package/dist/types/options/input-options.d.ts +185 -0
  60. package/dist/types/options/normalized-input-options.d.ts +18 -0
  61. package/dist/types/options/normalized-output-options.d.ts +70 -0
  62. package/dist/types/options/output-options.d.ts +182 -0
  63. package/dist/types/options/watch-options.d.ts +5 -0
  64. package/dist/types/parallel-plugin-worker.d.ts +1 -0
  65. package/dist/types/parallel-plugin.d.ts +1 -0
  66. package/dist/types/parse-ast-index.d.ts +5 -0
  67. package/dist/types/plugin/bindingify-build-hooks.d.ts +10 -0
  68. package/dist/types/plugin/bindingify-hook-filter.d.ts +7 -0
  69. package/dist/types/plugin/bindingify-output-hooks.d.ts +14 -0
  70. package/dist/types/plugin/bindingify-plugin-hook-meta.d.ts +8 -0
  71. package/dist/types/plugin/bindingify-plugin.d.ts +17 -0
  72. package/dist/types/plugin/bindingify-watch-hooks.d.ts +5 -0
  73. package/dist/types/plugin/hook-filter.d.ts +49 -0
  74. package/dist/types/plugin/index.d.ts +141 -0
  75. package/dist/types/plugin/minimal-plugin-context.d.ts +24 -0
  76. package/dist/types/plugin/parallel-plugin-implementation.d.ts +10 -0
  77. package/dist/types/plugin/parallel-plugin.d.ts +9 -0
  78. package/dist/types/plugin/plugin-context-data.d.ts +21 -0
  79. package/dist/types/plugin/plugin-context.d.ts +67 -0
  80. package/dist/types/plugin/plugin-driver.d.ts +10 -0
  81. package/dist/types/plugin/transform-plugin-context.d.ts +28 -0
  82. package/dist/types/plugin/with-filter.d.ts +10 -0
  83. package/dist/types/types/assert.d.ts +14 -0
  84. package/dist/types/types/config-export.d.ts +5 -0
  85. package/dist/types/types/misc.d.ts +40 -0
  86. package/dist/types/types/module-info.d.ts +15 -0
  87. package/dist/types/types/module-side-effects.d.ts +12 -0
  88. package/dist/types/types/output-bundle.d.ts +4 -0
  89. package/dist/types/types/rolldown-options.d.ts +5 -0
  90. package/dist/types/types/rolldown-output.d.ts +66 -0
  91. package/dist/types/types/schema.d.ts +33 -0
  92. package/dist/types/types/sourcemap.d.ts +14 -0
  93. package/dist/types/types/utils.d.ts +13 -0
  94. package/dist/types/types.d.ts +7 -0
  95. package/dist/types/utils/asset-source.d.ts +4 -0
  96. package/dist/types/utils/async-flatten.d.ts +1 -0
  97. package/dist/types/utils/bindingify-input-options.d.ts +7 -0
  98. package/dist/types/utils/bindingify-output-options.d.ts +5 -0
  99. package/dist/types/utils/code-frame.d.ts +1 -0
  100. package/dist/types/utils/compose-js-plugins.d.ts +2 -0
  101. package/dist/types/utils/create-bundler-option.d.ts +11 -0
  102. package/dist/types/utils/create-bundler.d.ts +9 -0
  103. package/dist/types/utils/define-config.d.ts +5 -0
  104. package/dist/types/utils/error.d.ts +2 -0
  105. package/dist/types/utils/initialize-parallel-plugins.d.ts +17 -0
  106. package/dist/types/utils/misc.d.ts +7 -0
  107. package/dist/types/utils/normalize-hook.d.ts +7 -0
  108. package/dist/types/utils/normalize-plugin-option.d.ts +13 -0
  109. package/dist/types/utils/normalize-string-or-regex.d.ts +2 -0
  110. package/dist/types/utils/plugin/index.d.ts +2 -0
  111. package/dist/types/utils/resolved-external.d.ts +4 -0
  112. package/dist/types/utils/transform-module-info.d.ts +4 -0
  113. package/dist/types/utils/transform-rendered-chunk.d.ts +4 -0
  114. package/dist/types/utils/transform-rendered-module.d.ts +3 -0
  115. package/dist/types/utils/transform-side-effects.d.ts +3 -0
  116. package/dist/types/utils/transform-sourcemap.d.ts +3 -0
  117. package/dist/types/utils/transform-to-rollup-output.d.ts +11 -0
  118. package/dist/types/utils/validator.d.ts +6 -0
  119. package/dist/wasi-worker-browser.mjs +39 -0
  120. package/dist/wasi-worker.mjs +63 -0
  121. package/package.json +85 -0
@@ -0,0 +1,4375 @@
1
+ import { __esm } from "./chunk-BuCFLigr.mjs";
2
+ import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMinifyWarning, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-GcZLh6_d.mjs";
3
+ import { BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
4
+ import path from "node:path";
5
+ import colors from "ansis";
6
+ import { toJsonSchema } from "@valibot/to-json-schema";
7
+ import * as v from "valibot";
8
+ import { availableParallelism } from "node:os";
9
+ import { Worker } from "node:worker_threads";
10
+
11
+ //#region package.json
12
+ var version = "1.0.0-beta.7-commit.a0a7d95";
13
+ var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
14
+
15
+ //#endregion
16
+ //#region src/builtin-plugin/utils.ts
17
+ function makeBuiltinPluginCallable(plugin) {
18
+ let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
19
+ const wrappedPlugin = plugin;
20
+ for (const key in callablePlugin) wrappedPlugin[key] = function(...args) {
21
+ return callablePlugin[key](...args);
22
+ };
23
+ return wrappedPlugin;
24
+ }
25
+ function bindingifyBuiltInPlugin(plugin) {
26
+ return {
27
+ __name: plugin.name,
28
+ options: plugin._options
29
+ };
30
+ }
31
+ var init_utils = __esm({ "src/builtin-plugin/utils.ts"() {} });
32
+
33
+ //#endregion
34
+ //#region src/builtin-plugin/constructors.ts
35
+ function modulePreloadPolyfillPlugin(config) {
36
+ return new BuiltinPlugin("builtin:module-preload-polyfill", config);
37
+ }
38
+ function dynamicImportVarsPlugin() {
39
+ return new BuiltinPlugin("builtin:dynamic-import-vars");
40
+ }
41
+ function importGlobPlugin(config) {
42
+ return new BuiltinPlugin("builtin:import-glob", config);
43
+ }
44
+ function manifestPlugin(config) {
45
+ return new BuiltinPlugin("builtin:manifest", config);
46
+ }
47
+ function wasmHelperPlugin() {
48
+ return new BuiltinPlugin("builtin:wasm-helper");
49
+ }
50
+ function wasmFallbackPlugin() {
51
+ return new BuiltinPlugin("builtin:wasm-fallback");
52
+ }
53
+ function loadFallbackPlugin() {
54
+ return new BuiltinPlugin("builtin:load-fallback");
55
+ }
56
+ function jsonPlugin(config) {
57
+ return new BuiltinPlugin("builtin:json", config);
58
+ }
59
+ function buildImportAnalysisPlugin(config) {
60
+ return new BuiltinPlugin("builtin:build-import-analysis", config);
61
+ }
62
+ function viteResolvePlugin(config) {
63
+ const builtinPlugin = new BuiltinPlugin("builtin:vite-resolve", {
64
+ ...config,
65
+ runtime: process.versions.deno ? "deno" : process.versions.bun ? "bun" : "node"
66
+ });
67
+ return makeBuiltinPluginCallable(builtinPlugin);
68
+ }
69
+ function moduleFederationPlugin(config) {
70
+ return new BuiltinPlugin("builtin:module-federation", {
71
+ ...config,
72
+ remotes: config.remotes && Object.entries(config.remotes).map(([name, remote]) => {
73
+ if (typeof remote === "string") {
74
+ const [entryGlobalName] = remote.split("@");
75
+ const entry = remote.replace(entryGlobalName + "@", "");
76
+ return {
77
+ entry,
78
+ name,
79
+ entryGlobalName
80
+ };
81
+ }
82
+ return {
83
+ ...remote,
84
+ name: remote.name ?? name
85
+ };
86
+ }),
87
+ manifest: config.manifest === false ? void 0 : config.manifest === true ? {} : config.manifest
88
+ });
89
+ }
90
+ function isolatedDeclarationPlugin(config) {
91
+ return new BuiltinPlugin("builtin:isolated-declaration", config);
92
+ }
93
+ var BuiltinPlugin;
94
+ var init_constructors = __esm({ "src/builtin-plugin/constructors.ts"() {
95
+ init_utils();
96
+ BuiltinPlugin = class {
97
+ constructor(name, _options) {
98
+ this.name = name;
99
+ this._options = _options;
100
+ }
101
+ };
102
+ } });
103
+
104
+ //#endregion
105
+ //#region src/utils/misc.ts
106
+ function arraify(value) {
107
+ return Array.isArray(value) ? value : [value];
108
+ }
109
+ function isNullish(value) {
110
+ return value === null || value === void 0;
111
+ }
112
+ function isPromiseLike(value) {
113
+ return value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
114
+ }
115
+ function unimplemented(info) {
116
+ if (info) throw new Error(`unimplemented: ${info}`);
117
+ throw new Error("unimplemented");
118
+ }
119
+ function unreachable(info) {
120
+ if (info) throw new Error(`unreachable: ${info}`);
121
+ throw new Error("unreachable");
122
+ }
123
+ function unsupported(info) {
124
+ throw new Error(`UNSUPPORTED: ${info}`);
125
+ }
126
+ function noop(..._args) {}
127
+ var init_misc = __esm({ "src/utils/misc.ts"() {} });
128
+
129
+ //#endregion
130
+ //#region src/log/logging.ts
131
+ var LOG_LEVEL_SILENT, LOG_LEVEL_ERROR, LOG_LEVEL_WARN, LOG_LEVEL_INFO, LOG_LEVEL_DEBUG, logLevelPriority;
132
+ var init_logging = __esm({ "src/log/logging.ts"() {
133
+ LOG_LEVEL_SILENT = "silent";
134
+ LOG_LEVEL_ERROR = "error";
135
+ LOG_LEVEL_WARN = "warn";
136
+ LOG_LEVEL_INFO = "info";
137
+ LOG_LEVEL_DEBUG = "debug";
138
+ logLevelPriority = {
139
+ [LOG_LEVEL_DEBUG]: 0,
140
+ [LOG_LEVEL_INFO]: 1,
141
+ [LOG_LEVEL_WARN]: 2,
142
+ [LOG_LEVEL_SILENT]: 3
143
+ };
144
+ } });
145
+
146
+ //#endregion
147
+ //#region src/log/log-handler.ts
148
+ function getLogHandler(level, code, logger, pluginName, logLevel) {
149
+ if (logLevelPriority[level] < logLevelPriority[logLevel]) return noop;
150
+ return (log, pos) => {
151
+ if (pos != null) logger(LOG_LEVEL_WARN, logInvalidLogPosition(pluginName));
152
+ log = normalizeLog(log);
153
+ if (log.code && !log.pluginCode) log.pluginCode = log.code;
154
+ log.code = code;
155
+ log.plugin = pluginName;
156
+ logger(level, log);
157
+ };
158
+ }
159
+ var normalizeLog;
160
+ var init_log_handler = __esm({ "src/log/log-handler.ts"() {
161
+ init_misc();
162
+ init_logging();
163
+ init_logs();
164
+ normalizeLog = (log) => typeof log === "string" ? { message: log } : typeof log === "function" ? normalizeLog(log()) : log;
165
+ } });
166
+
167
+ //#endregion
168
+ //#region src/log/logger.ts
169
+ function getLogger(plugins, onLog, logLevel, watchMode) {
170
+ const minimalPriority = logLevelPriority[logLevel];
171
+ const logger = (level, log, skipped = new Set()) => {
172
+ const logPriority = logLevelPriority[level];
173
+ if (logPriority < minimalPriority) return;
174
+ for (const plugin of getSortedPlugins("onLog", plugins)) {
175
+ if (skipped.has(plugin)) continue;
176
+ const { onLog: pluginOnLog } = plugin;
177
+ if (pluginOnLog) {
178
+ const getLogHandler$1 = (level$1) => {
179
+ if (logLevelPriority[level$1] < minimalPriority) return () => {};
180
+ return (log$1) => logger(level$1, normalizeLog(log$1), new Set(skipped).add(plugin));
181
+ };
182
+ const handler = "handler" in pluginOnLog ? pluginOnLog.handler : pluginOnLog;
183
+ if (handler.call({
184
+ debug: getLogHandler$1(LOG_LEVEL_DEBUG),
185
+ error: (log$1) => error(normalizeLog(log$1)),
186
+ info: getLogHandler$1(LOG_LEVEL_INFO),
187
+ meta: {
188
+ rollupVersion: "4.23.0",
189
+ rolldownVersion: VERSION,
190
+ watchMode
191
+ },
192
+ warn: getLogHandler$1(LOG_LEVEL_WARN),
193
+ pluginName: plugin.name || "unknown"
194
+ }, level, log) === false) return;
195
+ }
196
+ }
197
+ onLog(level, log);
198
+ };
199
+ return logger;
200
+ }
201
+ function relativeId(id) {
202
+ if (!path.isAbsolute(id)) return id;
203
+ return path.relative(path.resolve(), id);
204
+ }
205
+ var getOnLog, getDefaultOnLog, addLogToString, defaultPrintLog, getExtendedLogMessage;
206
+ var init_logger = __esm({ "src/log/logger.ts"() {
207
+ init_src();
208
+ init_plugin_driver();
209
+ init_log_handler();
210
+ init_logging();
211
+ init_logs();
212
+ getOnLog = (config, logLevel, printLog = defaultPrintLog) => {
213
+ const { onwarn, onLog } = config;
214
+ const defaultOnLog = getDefaultOnLog(printLog, onwarn);
215
+ if (onLog) {
216
+ const minimalPriority = logLevelPriority[logLevel];
217
+ return (level, log) => onLog(level, addLogToString(log), (level$1, handledLog) => {
218
+ if (level$1 === LOG_LEVEL_ERROR) return error(normalizeLog(handledLog));
219
+ if (logLevelPriority[level$1] >= minimalPriority) defaultOnLog(level$1, normalizeLog(handledLog));
220
+ });
221
+ }
222
+ return defaultOnLog;
223
+ };
224
+ getDefaultOnLog = (printLog, onwarn) => onwarn ? (level, log) => {
225
+ if (level === LOG_LEVEL_WARN) onwarn(addLogToString(log), (warning) => printLog(LOG_LEVEL_WARN, normalizeLog(warning)));
226
+ else printLog(level, log);
227
+ } : printLog;
228
+ addLogToString = (log) => {
229
+ Object.defineProperty(log, "toString", {
230
+ value: () => getExtendedLogMessage(log),
231
+ writable: true
232
+ });
233
+ return log;
234
+ };
235
+ defaultPrintLog = (level, log) => {
236
+ const message = getExtendedLogMessage(log);
237
+ switch (level) {
238
+ case LOG_LEVEL_WARN: return console.warn(message);
239
+ case LOG_LEVEL_DEBUG: return console.debug(message);
240
+ default: return console.info(message);
241
+ }
242
+ };
243
+ getExtendedLogMessage = (log) => {
244
+ let prefix = "";
245
+ if (log.plugin) prefix += `(${log.plugin} plugin) `;
246
+ if (log.loc) prefix += `${relativeId(log.loc.file)} (${log.loc.line}:${log.loc.column}) `;
247
+ return prefix + log.message;
248
+ };
249
+ } });
250
+
251
+ //#endregion
252
+ //#region src/utils/normalize-hook.ts
253
+ function normalizeHook(hook) {
254
+ if (typeof hook === "function" || typeof hook === "string") return {
255
+ handler: hook,
256
+ options: {},
257
+ meta: {}
258
+ };
259
+ if (typeof hook === "object" && hook !== null) {
260
+ const { handler, order,...options } = hook;
261
+ return {
262
+ handler,
263
+ options,
264
+ meta: { order }
265
+ };
266
+ }
267
+ unreachable("Invalid hook type");
268
+ }
269
+ var init_normalize_hook = __esm({ "src/utils/normalize-hook.ts"() {
270
+ init_misc();
271
+ } });
272
+
273
+ //#endregion
274
+ //#region src/constants/plugin.ts
275
+ var ENUMERATED_INPUT_PLUGIN_HOOK_NAMES, ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES, ENUMERATED_PLUGIN_HOOK_NAMES, DEFINED_HOOK_NAMES;
276
+ var init_plugin$2 = __esm({ "src/constants/plugin.ts"() {
277
+ ENUMERATED_INPUT_PLUGIN_HOOK_NAMES = [
278
+ "options",
279
+ "buildStart",
280
+ "resolveId",
281
+ "load",
282
+ "transform",
283
+ "moduleParsed",
284
+ "buildEnd",
285
+ "onLog",
286
+ "resolveDynamicImport",
287
+ "closeBundle",
288
+ "closeWatcher",
289
+ "watchChange"
290
+ ];
291
+ ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES = [
292
+ "augmentChunkHash",
293
+ "outputOptions",
294
+ "renderChunk",
295
+ "renderStart",
296
+ "renderError",
297
+ "writeBundle",
298
+ "generateBundle"
299
+ ];
300
+ ENUMERATED_PLUGIN_HOOK_NAMES = [
301
+ ...ENUMERATED_INPUT_PLUGIN_HOOK_NAMES,
302
+ ...ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES,
303
+ "footer",
304
+ "banner",
305
+ "intro",
306
+ "outro"
307
+ ];
308
+ DEFINED_HOOK_NAMES = {
309
+ [ENUMERATED_PLUGIN_HOOK_NAMES[0]]: ENUMERATED_PLUGIN_HOOK_NAMES[0],
310
+ [ENUMERATED_PLUGIN_HOOK_NAMES[1]]: ENUMERATED_PLUGIN_HOOK_NAMES[1],
311
+ [ENUMERATED_PLUGIN_HOOK_NAMES[2]]: ENUMERATED_PLUGIN_HOOK_NAMES[2],
312
+ [ENUMERATED_PLUGIN_HOOK_NAMES[3]]: ENUMERATED_PLUGIN_HOOK_NAMES[3],
313
+ [ENUMERATED_PLUGIN_HOOK_NAMES[4]]: ENUMERATED_PLUGIN_HOOK_NAMES[4],
314
+ [ENUMERATED_PLUGIN_HOOK_NAMES[5]]: ENUMERATED_PLUGIN_HOOK_NAMES[5],
315
+ [ENUMERATED_PLUGIN_HOOK_NAMES[6]]: ENUMERATED_PLUGIN_HOOK_NAMES[6],
316
+ [ENUMERATED_PLUGIN_HOOK_NAMES[7]]: ENUMERATED_PLUGIN_HOOK_NAMES[7],
317
+ [ENUMERATED_PLUGIN_HOOK_NAMES[8]]: ENUMERATED_PLUGIN_HOOK_NAMES[8],
318
+ [ENUMERATED_PLUGIN_HOOK_NAMES[9]]: ENUMERATED_PLUGIN_HOOK_NAMES[9],
319
+ [ENUMERATED_PLUGIN_HOOK_NAMES[10]]: ENUMERATED_PLUGIN_HOOK_NAMES[10],
320
+ [ENUMERATED_PLUGIN_HOOK_NAMES[11]]: ENUMERATED_PLUGIN_HOOK_NAMES[11],
321
+ [ENUMERATED_PLUGIN_HOOK_NAMES[12]]: ENUMERATED_PLUGIN_HOOK_NAMES[12],
322
+ [ENUMERATED_PLUGIN_HOOK_NAMES[13]]: ENUMERATED_PLUGIN_HOOK_NAMES[13],
323
+ [ENUMERATED_PLUGIN_HOOK_NAMES[14]]: ENUMERATED_PLUGIN_HOOK_NAMES[14],
324
+ [ENUMERATED_PLUGIN_HOOK_NAMES[15]]: ENUMERATED_PLUGIN_HOOK_NAMES[15],
325
+ [ENUMERATED_PLUGIN_HOOK_NAMES[16]]: ENUMERATED_PLUGIN_HOOK_NAMES[16],
326
+ [ENUMERATED_PLUGIN_HOOK_NAMES[17]]: ENUMERATED_PLUGIN_HOOK_NAMES[17],
327
+ [ENUMERATED_PLUGIN_HOOK_NAMES[18]]: ENUMERATED_PLUGIN_HOOK_NAMES[18],
328
+ [ENUMERATED_PLUGIN_HOOK_NAMES[19]]: ENUMERATED_PLUGIN_HOOK_NAMES[19],
329
+ [ENUMERATED_PLUGIN_HOOK_NAMES[20]]: ENUMERATED_PLUGIN_HOOK_NAMES[20],
330
+ [ENUMERATED_PLUGIN_HOOK_NAMES[21]]: ENUMERATED_PLUGIN_HOOK_NAMES[21],
331
+ [ENUMERATED_PLUGIN_HOOK_NAMES[22]]: ENUMERATED_PLUGIN_HOOK_NAMES[22]
332
+ };
333
+ } });
334
+
335
+ //#endregion
336
+ //#region src/utils/async-flatten.ts
337
+ async function asyncFlatten(array) {
338
+ do
339
+ array = (await Promise.all(array)).flat(Infinity);
340
+ while (array.some((v$1) => v$1?.then));
341
+ return array;
342
+ }
343
+ var init_async_flatten = __esm({ "src/utils/async-flatten.ts"() {} });
344
+
345
+ //#endregion
346
+ //#region src/utils/normalize-plugin-option.ts
347
+ function checkOutputPluginOption(plugins, onLog) {
348
+ for (const plugin of plugins) for (const hook of ENUMERATED_INPUT_PLUGIN_HOOK_NAMES) if (hook in plugin) {
349
+ delete plugin[hook];
350
+ onLog(LOG_LEVEL_WARN, logInputHookInOutputPlugin(plugin.name, hook));
351
+ }
352
+ return plugins;
353
+ }
354
+ function normalizePlugins(plugins, anonymousPrefix) {
355
+ for (const [index, plugin] of plugins.entries()) {
356
+ if ("_parallel" in plugin) continue;
357
+ if (plugin instanceof BuiltinPlugin) continue;
358
+ if (!plugin.name) plugin.name = `${anonymousPrefix}${index + 1}`;
359
+ }
360
+ return plugins;
361
+ }
362
+ var normalizePluginOption, ANONYMOUS_PLUGIN_PREFIX, ANONYMOUS_OUTPUT_PLUGIN_PREFIX;
363
+ var init_normalize_plugin_option = __esm({ "src/utils/normalize-plugin-option.ts"() {
364
+ init_constructors();
365
+ init_plugin$2();
366
+ init_logging();
367
+ init_logs();
368
+ init_async_flatten();
369
+ normalizePluginOption = async (plugins) => (await asyncFlatten([plugins])).filter(Boolean);
370
+ ANONYMOUS_PLUGIN_PREFIX = "at position ";
371
+ ANONYMOUS_OUTPUT_PLUGIN_PREFIX = "at output position ";
372
+ } });
373
+
374
+ //#endregion
375
+ //#region src/plugin/minimal-plugin-context.ts
376
+ var MinimalPluginContextImpl;
377
+ var init_minimal_plugin_context = __esm({ "src/plugin/minimal-plugin-context.ts"() {
378
+ init_src();
379
+ init_log_handler();
380
+ init_logging();
381
+ init_logs();
382
+ MinimalPluginContextImpl = class {
383
+ info;
384
+ warn;
385
+ debug;
386
+ meta;
387
+ constructor(onLog, logLevel, pluginName, watchMode, hookName) {
388
+ this.pluginName = pluginName;
389
+ this.hookName = hookName;
390
+ this.debug = getLogHandler(LOG_LEVEL_DEBUG, "PLUGIN_LOG", onLog, pluginName, logLevel);
391
+ this.info = getLogHandler(LOG_LEVEL_INFO, "PLUGIN_LOG", onLog, pluginName, logLevel);
392
+ this.warn = getLogHandler(LOG_LEVEL_WARN, "PLUGIN_WARNING", onLog, pluginName, logLevel);
393
+ this.meta = {
394
+ rollupVersion: "4.23.0",
395
+ rolldownVersion: VERSION,
396
+ watchMode
397
+ };
398
+ }
399
+ error(e$5) {
400
+ return error(logPluginError(normalizeLog(e$5), this.pluginName, { hook: this.hookName }));
401
+ }
402
+ };
403
+ } });
404
+
405
+ //#endregion
406
+ //#region src/plugin/plugin-driver.ts
407
+ function getObjectPlugins(plugins) {
408
+ return plugins.filter((plugin) => {
409
+ if (!plugin) return void 0;
410
+ if ("_parallel" in plugin) return void 0;
411
+ if (plugin instanceof BuiltinPlugin) return void 0;
412
+ return plugin;
413
+ });
414
+ }
415
+ function getSortedPlugins(hookName, plugins) {
416
+ const pre = [];
417
+ const normal = [];
418
+ const post = [];
419
+ for (const plugin of plugins) {
420
+ const hook = plugin[hookName];
421
+ if (hook) {
422
+ if (typeof hook === "object") {
423
+ if (hook.order === "pre") {
424
+ pre.push(plugin);
425
+ continue;
426
+ }
427
+ if (hook.order === "post") {
428
+ post.push(plugin);
429
+ continue;
430
+ }
431
+ }
432
+ normal.push(plugin);
433
+ }
434
+ }
435
+ return [
436
+ ...pre,
437
+ ...normal,
438
+ ...post
439
+ ];
440
+ }
441
+ var PluginDriver;
442
+ var init_plugin_driver = __esm({ "src/plugin/plugin-driver.ts"() {
443
+ init_constructors();
444
+ init_logger();
445
+ init_logging();
446
+ init_normalize_hook();
447
+ init_normalize_plugin_option();
448
+ init_minimal_plugin_context();
449
+ PluginDriver = class {
450
+ static async callOptionsHook(inputOptions, watchMode = false) {
451
+ const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
452
+ const plugins = getSortedPlugins("options", getObjectPlugins(await normalizePluginOption(inputOptions.plugins)));
453
+ const logger = getLogger(plugins, getOnLog(inputOptions, logLevel), logLevel, watchMode);
454
+ for (const plugin of plugins) {
455
+ const name = plugin.name || "unknown";
456
+ const options = plugin.options;
457
+ if (options) {
458
+ const { handler } = normalizeHook(options);
459
+ const result = await handler.call(new MinimalPluginContextImpl(logger, logLevel, name, watchMode, "onLog"), inputOptions);
460
+ if (result) inputOptions = result;
461
+ }
462
+ }
463
+ return inputOptions;
464
+ }
465
+ static callOutputOptionsHook(rawPlugins, outputOptions, onLog, logLevel, watchMode) {
466
+ const sortedPlugins = getSortedPlugins("outputOptions", getObjectPlugins(rawPlugins));
467
+ for (const plugin of sortedPlugins) {
468
+ const name = plugin.name || "unknown";
469
+ const options = plugin.outputOptions;
470
+ if (options) {
471
+ const { handler } = normalizeHook(options);
472
+ const result = handler.call(new MinimalPluginContextImpl(onLog, logLevel, name, watchMode), outputOptions);
473
+ if (result) outputOptions = result;
474
+ }
475
+ }
476
+ return outputOptions;
477
+ }
478
+ };
479
+ } });
480
+
481
+ //#endregion
482
+ //#region src/utils/validator.ts
483
+ function validateCliOptions(options) {
484
+ let parsed = v.safeParse(CliOptionsSchema, options);
485
+ return [parsed.output, parsed.issues?.map((issue) => {
486
+ const option = issue.path?.map((pathItem) => pathItem.key).join(" ");
487
+ return `Invalid value for option ${option}: ${issue.message}`;
488
+ })];
489
+ }
490
+ function validateOption(key, options) {
491
+ if (globalThis.process?.env?.ROLLDOWN_OPTIONS_VALIDATION === "loose") return;
492
+ let parsed = v.safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
493
+ if (!parsed.success) {
494
+ const errors = parsed.issues.map((issue) => {
495
+ const issuePaths = issue.path.map((path$1) => path$1.key);
496
+ let issueMsg = issue.message;
497
+ if (issue.type === "union") {
498
+ const subIssue = issue.issues?.find((i$21) => !(i$21.type !== issue.received && i$21.input === issue.input));
499
+ if (subIssue) {
500
+ if (subIssue.path) issuePaths.push(subIssue.path.map((path$1) => path$1.key));
501
+ issueMsg = subIssue.message;
502
+ }
503
+ }
504
+ const stringPath = issuePaths.join(".");
505
+ const helper = key === "input" ? inputHelperMsgRecord[stringPath] : outputHelperMsgRecord[stringPath];
506
+ if (helper && helper.ignored) return "";
507
+ return `- For the "${stringPath}". ${issueMsg}. ${helper ? helper.msg : ""}`;
508
+ }).filter(Boolean);
509
+ if (errors.length) throw new Error(`Failed validate ${key} options.\n` + errors.join("\n"));
510
+ }
511
+ }
512
+ function getInputCliKeys() {
513
+ return v.keyof(InputCliOptionsSchema).options;
514
+ }
515
+ function getOutputCliKeys() {
516
+ return v.keyof(OutputCliOptionsSchema).options;
517
+ }
518
+ function getJsonSchema() {
519
+ return toJsonSchema(CliOptionsSchema);
520
+ }
521
+ var StringOrRegExpSchema, LogLevelSchema, LogLevelOptionSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, InputOptionSchema, ExternalSchema, ModuleTypesSchema, JsxOptionsSchema, HelperModeSchema, DecoratorOptionSchema, HelpersSchema, RewriteImportExtensionsSchema, TypescriptSchema, AssumptionsSchema, TransformOptionsSchema, WatchOptionsSchema, ChecksOptionsSchema, MinifyOptionsSchema, ResolveOptionsSchema, TreeshakingOptionsSchema, OnLogSchema, OnwarnSchema, HmrSchema, InputOptionsSchema, InputCliOverrideSchema, InputCliOptionsSchema, ESTarget, ModuleFormatSchema, AddonFunctionSchema, ChunkFileNamesSchema, AssetFileNamesSchema, SanitizeFileNameSchema, GlobalsFunctionSchema, AdvancedChunksSchema, OutputOptionsSchema, getAddonDescription, OutputCliOverrideSchema, OutputCliOptionsSchema, CliOptionsSchema, inputHelperMsgRecord, outputHelperMsgRecord;
522
+ var init_validator = __esm({ "src/utils/validator.ts"() {
523
+ StringOrRegExpSchema = v.union([v.string(), v.instance(RegExp)]);
524
+ LogLevelSchema = v.union([
525
+ v.literal("debug"),
526
+ v.literal("info"),
527
+ v.literal("warn")
528
+ ]);
529
+ LogLevelOptionSchema = v.union([LogLevelSchema, v.literal("silent")]);
530
+ LogLevelWithErrorSchema = v.union([LogLevelSchema, v.literal("error")]);
531
+ RollupLogSchema = v.any();
532
+ RollupLogWithStringSchema = v.union([RollupLogSchema, v.string()]);
533
+ InputOptionSchema = v.union([
534
+ v.string(),
535
+ v.array(v.string()),
536
+ v.record(v.string(), v.string())
537
+ ]);
538
+ ExternalSchema = v.union([
539
+ StringOrRegExpSchema,
540
+ v.array(StringOrRegExpSchema),
541
+ v.pipe(v.function(), v.args(v.tuple([
542
+ v.string(),
543
+ v.optional(v.string()),
544
+ v.boolean()
545
+ ])), v.returns(v.nullish(v.boolean())))
546
+ ]);
547
+ ModuleTypesSchema = v.record(v.string(), v.union([
548
+ v.literal("base64"),
549
+ v.literal("binary"),
550
+ v.literal("css"),
551
+ v.literal("dataurl"),
552
+ v.literal("empty"),
553
+ v.literal("js"),
554
+ v.literal("json"),
555
+ v.literal("jsx"),
556
+ v.literal("text"),
557
+ v.literal("ts"),
558
+ v.literal("tsx")
559
+ ]));
560
+ JsxOptionsSchema = v.strictObject({
561
+ development: v.pipe(v.optional(v.boolean()), v.description("Development specific information")),
562
+ factory: v.pipe(v.optional(v.string()), v.description("Jsx element transformation")),
563
+ fragment: v.pipe(v.optional(v.string()), v.description("Jsx fragment transformation")),
564
+ importSource: v.pipe(v.optional(v.string()), v.description("Import the factory of element and fragment if mode is classic")),
565
+ jsxImportSource: v.pipe(v.optional(v.string()), v.description("Import the factory of element and fragment if mode is automatic")),
566
+ mode: v.pipe(v.optional(v.union([
567
+ v.literal("classic"),
568
+ v.literal("automatic"),
569
+ v.literal("preserve")
570
+ ])), v.description("Jsx transformation mode")),
571
+ refresh: v.pipe(v.optional(v.boolean()), v.description("React refresh transformation"))
572
+ });
573
+ HelperModeSchema = v.union([v.literal("Runtime"), v.literal("External")]);
574
+ DecoratorOptionSchema = v.object({
575
+ legacy: v.optional(v.boolean()),
576
+ emitDecoratorMetadata: v.optional(v.boolean())
577
+ });
578
+ HelpersSchema = v.object({ mode: v.optional(HelperModeSchema) });
579
+ RewriteImportExtensionsSchema = v.union([
580
+ v.literal("rewrite"),
581
+ v.literal("remove"),
582
+ v.boolean()
583
+ ]);
584
+ TypescriptSchema = v.object({
585
+ jsxPragma: v.optional(v.string()),
586
+ jsxPragmaFrag: v.optional(v.string()),
587
+ onlyRemoveTypeImports: v.optional(v.boolean()),
588
+ allowNamespaces: v.optional(v.boolean()),
589
+ allowDeclareFields: v.optional(v.boolean()),
590
+ declaration: v.optional(v.object({
591
+ stripInternal: v.optional(v.boolean()),
592
+ sourcemap: v.optional(v.boolean())
593
+ })),
594
+ rewriteImportExtensions: v.optional(RewriteImportExtensionsSchema)
595
+ });
596
+ AssumptionsSchema = v.object({
597
+ ignoreFunctionLength: v.optional(v.boolean()),
598
+ noDocumentAll: v.optional(v.boolean()),
599
+ objectRestNoSymbols: v.optional(v.boolean()),
600
+ pureGetters: v.optional(v.boolean()),
601
+ setPublicClassFields: v.optional(v.boolean())
602
+ });
603
+ TransformOptionsSchema = v.object({
604
+ assumptions: v.optional(AssumptionsSchema),
605
+ typescript: v.optional(TypescriptSchema),
606
+ helpers: v.optional(HelpersSchema),
607
+ decorators: v.optional(DecoratorOptionSchema)
608
+ });
609
+ WatchOptionsSchema = v.strictObject({
610
+ chokidar: v.optional(v.never(`The "watch.chokidar" option is deprecated, please use "watch.notify" instead of it`)),
611
+ exclude: v.optional(v.union([StringOrRegExpSchema, v.array(StringOrRegExpSchema)])),
612
+ include: v.optional(v.union([StringOrRegExpSchema, v.array(StringOrRegExpSchema)])),
613
+ notify: v.pipe(v.optional(v.strictObject({
614
+ compareContents: v.optional(v.boolean()),
615
+ pollInterval: v.optional(v.number())
616
+ })), v.description("Notify options")),
617
+ skipWrite: v.pipe(v.optional(v.boolean()), v.description("Skip the bundle.write() step")),
618
+ buildDelay: v.pipe(v.optional(v.number()), v.description("Throttle watch rebuilds"))
619
+ });
620
+ ChecksOptionsSchema = v.strictObject({
621
+ circularDependency: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting circular dependency")),
622
+ eval: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting eval")),
623
+ missingGlobalName: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting missing global name")),
624
+ missingNameOptionForIifeExport: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting missing name option for iife export")),
625
+ mixedExport: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting mixed export")),
626
+ unresolvedEntry: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting unresolved entry")),
627
+ unresolvedImport: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting unresolved import")),
628
+ filenameConflict: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting filename conflict")),
629
+ commonJsVariableInEsm: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting common js variable in esm")),
630
+ importIsUndefined: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting import is undefined")),
631
+ configurationFieldConflict: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warning when detecting configuration field conflict"))
632
+ });
633
+ MinifyOptionsSchema = v.strictObject({
634
+ mangle: v.boolean(),
635
+ compress: v.boolean(),
636
+ deadCodeElimination: v.boolean(),
637
+ removeWhitespace: v.boolean()
638
+ });
639
+ ResolveOptionsSchema = v.strictObject({
640
+ alias: v.optional(v.record(v.string(), v.union([v.string(), v.array(v.string())]))),
641
+ aliasFields: v.optional(v.array(v.array(v.string()))),
642
+ conditionNames: v.optional(v.array(v.string())),
643
+ extensionAlias: v.optional(v.record(v.string(), v.array(v.string()))),
644
+ exportsFields: v.optional(v.array(v.array(v.string()))),
645
+ extensions: v.optional(v.array(v.string())),
646
+ mainFields: v.optional(v.array(v.string())),
647
+ mainFiles: v.optional(v.array(v.string())),
648
+ modules: v.optional(v.array(v.string())),
649
+ symlinks: v.optional(v.boolean()),
650
+ tsconfigFilename: v.optional(v.string())
651
+ });
652
+ TreeshakingOptionsSchema = v.union([v.boolean(), v.looseObject({
653
+ annotations: v.optional(v.boolean()),
654
+ manualPureFunctions: v.optional(v.array(v.string())),
655
+ unknownGlobalSideEffects: v.optional(v.boolean())
656
+ })]);
657
+ OnLogSchema = v.pipe(v.function(), v.args(v.tuple([
658
+ LogLevelSchema,
659
+ RollupLogSchema,
660
+ v.pipe(v.function(), v.args(v.tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])))
661
+ ])));
662
+ OnwarnSchema = v.pipe(v.function(), v.args(v.tuple([RollupLogSchema, v.pipe(v.function(), v.args(v.tuple([v.union([RollupLogWithStringSchema, v.pipe(v.function(), v.returns(RollupLogWithStringSchema))])])))])));
663
+ HmrSchema = v.union([v.boolean(), v.strictObject({
664
+ port: v.optional(v.number()),
665
+ host: v.optional(v.string()),
666
+ implement: v.optional(v.string())
667
+ })]);
668
+ InputOptionsSchema = v.strictObject({
669
+ input: v.optional(InputOptionSchema),
670
+ plugins: v.optional(v.custom(() => true)),
671
+ external: v.optional(ExternalSchema),
672
+ resolve: v.optional(ResolveOptionsSchema),
673
+ cwd: v.pipe(v.optional(v.string()), v.description("Current working directory")),
674
+ platform: v.pipe(v.optional(v.union([
675
+ v.literal("browser"),
676
+ v.literal("neutral"),
677
+ v.literal("node")
678
+ ])), v.description(`Platform for which the code should be generated (node, ${colors.underline("browser")}, neutral)`)),
679
+ shimMissingExports: v.pipe(v.optional(v.boolean()), v.description("Create shim variables for missing exports")),
680
+ treeshake: v.optional(TreeshakingOptionsSchema),
681
+ logLevel: v.pipe(v.optional(LogLevelOptionSchema), v.description(`Log level (${colors.dim("silent")}, ${colors.underline(colors.gray("info"))}, debug, ${colors.yellow("warn")})`)),
682
+ onLog: v.optional(OnLogSchema),
683
+ onwarn: v.optional(OnwarnSchema),
684
+ moduleTypes: v.pipe(v.optional(ModuleTypesSchema), v.description("Module types for customized extensions")),
685
+ experimental: v.optional(v.strictObject({
686
+ disableLiveBindings: v.optional(v.boolean()),
687
+ enableComposingJsPlugins: v.optional(v.boolean()),
688
+ resolveNewUrlToAsset: v.optional(v.boolean()),
689
+ strictExecutionOrder: v.optional(v.boolean()),
690
+ hmr: v.optional(HmrSchema)
691
+ })),
692
+ define: v.pipe(v.optional(v.record(v.string(), v.string())), v.description("Define global variables")),
693
+ inject: v.optional(v.record(v.string(), v.union([v.string(), v.tuple([v.string(), v.string()])]))),
694
+ profilerNames: v.optional(v.boolean()),
695
+ jsx: v.optional(v.union([
696
+ v.boolean(),
697
+ JsxOptionsSchema,
698
+ v.string("react"),
699
+ v.string("react-jsx"),
700
+ v.string("preserve")
701
+ ])),
702
+ transform: v.optional(TransformOptionsSchema),
703
+ watch: v.optional(v.union([WatchOptionsSchema, v.literal(false)])),
704
+ dropLabels: v.pipe(v.optional(v.array(v.string())), v.description("Remove labeled statements with these label names")),
705
+ checks: v.optional(ChecksOptionsSchema),
706
+ keepNames: v.pipe(v.optional(v.boolean()), v.description("Keep function/class name")),
707
+ debug: v.pipe(v.optional(v.object({ buildId: v.pipe(v.optional(v.string()), v.description("Used to name the build.")) })), v.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
708
+ });
709
+ InputCliOverrideSchema = v.strictObject({
710
+ external: v.pipe(v.optional(v.array(v.string())), v.description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
711
+ inject: v.pipe(v.optional(v.record(v.string(), v.string())), v.description("Inject import statements on demand")),
712
+ treeshake: v.pipe(v.optional(v.boolean()), v.description("enable treeshaking")),
713
+ jsx: v.pipe(v.optional(JsxOptionsSchema), v.description("enable jsx"))
714
+ });
715
+ InputCliOptionsSchema = v.omit(v.strictObject({
716
+ ...InputOptionsSchema.entries,
717
+ ...InputCliOverrideSchema.entries
718
+ }), [
719
+ "input",
720
+ "plugins",
721
+ "onwarn",
722
+ "onLog",
723
+ "resolve",
724
+ "experimental",
725
+ "profilerNames",
726
+ "watch"
727
+ ]);
728
+ ESTarget = /* @__PURE__ */ function(ESTarget$1) {
729
+ ESTarget$1["ES6"] = "es6";
730
+ ESTarget$1["ES2015"] = "es2015";
731
+ ESTarget$1["ES2016"] = "es2016";
732
+ ESTarget$1["ES2017"] = "es2017";
733
+ ESTarget$1["ES2018"] = "es2018";
734
+ ESTarget$1["ES2019"] = "es2019";
735
+ ESTarget$1["ES2020"] = "es2020";
736
+ ESTarget$1["ES2021"] = "es2021";
737
+ ESTarget$1["ES2022"] = "es2022";
738
+ ESTarget$1["ES2023"] = "es2023";
739
+ ESTarget$1["ES2024"] = "es2024";
740
+ ESTarget$1["ESNext"] = "esnext";
741
+ return ESTarget$1;
742
+ }(ESTarget || {});
743
+ ModuleFormatSchema = v.union([
744
+ v.literal("es"),
745
+ v.literal("cjs"),
746
+ v.literal("esm"),
747
+ v.literal("module"),
748
+ v.literal("commonjs"),
749
+ v.literal("iife"),
750
+ v.literal("umd")
751
+ ]);
752
+ AddonFunctionSchema = v.pipe(v.function(), v.args(v.tuple([v.custom(() => true)])), v.returnsAsync(v.unionAsync([v.string(), v.pipeAsync(v.promise(), v.awaitAsync(), v.string())])));
753
+ ChunkFileNamesSchema = v.union([v.string(), v.pipe(v.function(), v.args(v.tuple([v.custom(() => true)])), v.returns(v.string()))]);
754
+ AssetFileNamesSchema = v.union([v.string(), v.pipe(v.function(), v.args(v.tuple([v.custom(() => true)])), v.returns(v.string()))]);
755
+ SanitizeFileNameSchema = v.union([v.boolean(), v.pipe(v.function(), v.args(v.tuple([v.string()])), v.returns(v.string()))]);
756
+ GlobalsFunctionSchema = v.pipe(v.function(), v.args(v.tuple([v.string()])), v.returns(v.string()));
757
+ AdvancedChunksSchema = v.strictObject({
758
+ minSize: v.optional(v.number()),
759
+ maxSize: v.optional(v.number()),
760
+ minModuleSize: v.optional(v.number()),
761
+ maxModuleSize: v.optional(v.number()),
762
+ minShareCount: v.optional(v.number()),
763
+ groups: v.optional(v.array(v.strictObject({
764
+ name: v.string(),
765
+ test: v.optional(v.union([v.string(), v.instance(RegExp)])),
766
+ priority: v.optional(v.number()),
767
+ minSize: v.optional(v.number()),
768
+ minShareCount: v.optional(v.number()),
769
+ maxSize: v.optional(v.number()),
770
+ minModuleSize: v.optional(v.number()),
771
+ maxModuleSize: v.optional(v.number())
772
+ })))
773
+ });
774
+ OutputOptionsSchema = v.strictObject({
775
+ dir: v.pipe(v.optional(v.string()), v.description("Output directory, defaults to `dist` if `file` is not set")),
776
+ file: v.pipe(v.optional(v.string()), v.description("Single output file")),
777
+ exports: v.pipe(v.optional(v.union([
778
+ v.literal("auto"),
779
+ v.literal("named"),
780
+ v.literal("default"),
781
+ v.literal("none")
782
+ ])), v.description(`Specify a export mode (${colors.underline("auto")}, named, default, none)`)),
783
+ hashCharacters: v.pipe(v.optional(v.union([
784
+ v.literal("base64"),
785
+ v.literal("base36"),
786
+ v.literal("hex")
787
+ ])), v.description("Use the specified character set for file hashes")),
788
+ format: v.pipe(v.optional(ModuleFormatSchema), v.description(`Output format of the generated bundle (supports ${colors.underline("esm")}, cjs, and iife)`)),
789
+ sourcemap: v.pipe(v.optional(v.union([
790
+ v.boolean(),
791
+ v.literal("inline"),
792
+ v.literal("hidden")
793
+ ])), v.description(`Generate sourcemap (\`-s inline\` for inline, or ${colors.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
794
+ sourcemapDebugIds: v.pipe(v.optional(v.boolean()), v.description("Inject sourcemap debug IDs")),
795
+ sourcemapIgnoreList: v.optional(v.union([v.boolean(), v.custom(() => true)])),
796
+ sourcemapPathTransform: v.optional(v.custom(() => true)),
797
+ banner: v.optional(v.union([v.string(), AddonFunctionSchema])),
798
+ footer: v.optional(v.union([v.string(), AddonFunctionSchema])),
799
+ intro: v.optional(v.union([v.string(), AddonFunctionSchema])),
800
+ outro: v.optional(v.union([v.string(), AddonFunctionSchema])),
801
+ extend: v.pipe(v.optional(v.boolean()), v.description("Extend global variable defined by name in IIFE / UMD formats")),
802
+ esModule: v.optional(v.union([v.boolean(), v.literal("if-default-prop")])),
803
+ assetFileNames: v.optional(AssetFileNamesSchema),
804
+ entryFileNames: v.optional(ChunkFileNamesSchema),
805
+ chunkFileNames: v.optional(ChunkFileNamesSchema),
806
+ cssEntryFileNames: v.optional(ChunkFileNamesSchema),
807
+ cssChunkFileNames: v.optional(ChunkFileNamesSchema),
808
+ sanitizeFileName: v.optional(SanitizeFileNameSchema),
809
+ minify: v.pipe(v.optional(v.union([
810
+ v.boolean(),
811
+ v.string("dce-only"),
812
+ MinifyOptionsSchema
813
+ ])), v.description("Minify the bundled file")),
814
+ name: v.pipe(v.optional(v.string()), v.description("Name for UMD / IIFE format outputs")),
815
+ globals: v.pipe(v.optional(v.union([v.record(v.string(), v.string()), GlobalsFunctionSchema])), v.description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
816
+ externalLiveBindings: v.pipe(v.optional(v.boolean()), v.description("external live bindings")),
817
+ inlineDynamicImports: v.pipe(v.optional(v.boolean()), v.description("Inline dynamic imports")),
818
+ advancedChunks: v.optional(AdvancedChunksSchema),
819
+ comments: v.pipe(v.optional(v.union([v.literal("none"), v.literal("preserve-legal")])), v.description("Control comments in the output")),
820
+ target: v.pipe(v.optional(v.enum(ESTarget)), v.description("The JavaScript target environment")),
821
+ plugins: v.optional(v.custom(() => true))
822
+ });
823
+ getAddonDescription = (placement, wrapper) => {
824
+ return `Code to insert the ${colors.bold(placement)} of the bundled file (${colors.bold(wrapper)} the wrapper function)`;
825
+ };
826
+ OutputCliOverrideSchema = v.strictObject({
827
+ assetFileNames: v.pipe(v.optional(v.string()), v.description("Name pattern for asset files")),
828
+ entryFileNames: v.pipe(v.optional(v.string()), v.description("Name pattern for emitted entry chunks")),
829
+ chunkFileNames: v.pipe(v.optional(v.string()), v.description("Name pattern for emitted secondary chunks")),
830
+ cssEntryFileNames: v.pipe(v.optional(v.string()), v.description("Name pattern for emitted css entry chunks")),
831
+ cssChunkFileNames: v.pipe(v.optional(v.string()), v.description("Name pattern for emitted css secondary chunks")),
832
+ sanitizeFileName: v.pipe(v.optional(v.boolean()), v.description("Sanitize file name")),
833
+ banner: v.pipe(v.optional(v.string()), v.description(getAddonDescription("top", "outside"))),
834
+ footer: v.pipe(v.optional(v.string()), v.description(getAddonDescription("bottom", "outside"))),
835
+ intro: v.pipe(v.optional(v.string()), v.description(getAddonDescription("top", "inside"))),
836
+ outro: v.pipe(v.optional(v.string()), v.description(getAddonDescription("bottom", "inside"))),
837
+ esModule: v.pipe(v.optional(v.boolean()), v.description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
838
+ globals: v.pipe(v.optional(v.record(v.string(), v.string())), v.description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
839
+ advancedChunks: v.pipe(v.optional(v.strictObject({
840
+ minSize: v.pipe(v.optional(v.number()), v.description("Minimum size of the chunk")),
841
+ minShareCount: v.pipe(v.optional(v.number()), v.description("Minimum share count of the chunk"))
842
+ })), v.description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
843
+ minify: v.pipe(v.optional(v.boolean()), v.description("Minify the bundled file"))
844
+ });
845
+ OutputCliOptionsSchema = v.omit(v.strictObject({
846
+ ...OutputOptionsSchema.entries,
847
+ ...OutputCliOverrideSchema.entries
848
+ }), [
849
+ "sourcemapIgnoreList",
850
+ "sourcemapPathTransform",
851
+ "plugins"
852
+ ]);
853
+ CliOptionsSchema = v.strictObject({
854
+ config: v.pipe(v.optional(v.union([v.string(), v.boolean()])), v.description("Path to the config file (default: `rolldown.config.js`)")),
855
+ help: v.pipe(v.optional(v.boolean()), v.description("Show help")),
856
+ version: v.pipe(v.optional(v.boolean()), v.description("Show version number")),
857
+ watch: v.pipe(v.optional(v.boolean()), v.description("Watch files in bundle and rebuild on changes")),
858
+ ...InputCliOptionsSchema.entries,
859
+ ...OutputCliOptionsSchema.entries
860
+ });
861
+ inputHelperMsgRecord = { output: { ignored: true } };
862
+ outputHelperMsgRecord = {};
863
+ } });
864
+
865
+ //#endregion
866
+ //#region src/constants/plugin-context.ts
867
+ var SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF;
868
+ var init_plugin_context$1 = __esm({ "src/constants/plugin-context.ts"() {
869
+ SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF = Symbol("plugin-context-resolve-caller");
870
+ } });
871
+
872
+ //#endregion
873
+ //#region src/options/normalized-input-options.ts
874
+ var NormalizedInputOptionsImpl;
875
+ var init_normalized_input_options = __esm({ "src/options/normalized-input-options.ts"() {
876
+ NormalizedInputOptionsImpl = class {
877
+ inner;
878
+ constructor(inner, onLog) {
879
+ this.onLog = onLog;
880
+ this.inner = inner;
881
+ }
882
+ get shimMissingExports() {
883
+ return this.inner.shimMissingExports;
884
+ }
885
+ get input() {
886
+ return this.inner.input;
887
+ }
888
+ get cwd() {
889
+ return this.inner.cwd ?? void 0;
890
+ }
891
+ get platform() {
892
+ return this.inner.platform;
893
+ }
894
+ };
895
+ } });
896
+
897
+ //#endregion
898
+ //#region src/types/sourcemap.ts
899
+ function bindingifySourcemap(map) {
900
+ if (map == null) return;
901
+ return { inner: typeof map === "string" ? map : {
902
+ file: map.file ?? void 0,
903
+ mappings: map.mappings,
904
+ sourceRoot: "sourceRoot" in map ? map.sourceRoot ?? void 0 : void 0,
905
+ sources: map.sources?.map((s$10) => s$10 ?? void 0),
906
+ sourcesContent: map.sourcesContent?.map((s$10) => s$10 ?? void 0),
907
+ names: map.names,
908
+ x_google_ignoreList: map.x_google_ignoreList,
909
+ debugId: "debugId" in map ? map.debugId : void 0
910
+ } };
911
+ }
912
+ var init_sourcemap = __esm({ "src/types/sourcemap.ts"() {} });
913
+
914
+ //#endregion
915
+ //#region src/utils/error.ts
916
+ function normalizeErrors(rawErrors) {
917
+ const errors = rawErrors.map((e$5) => e$5 instanceof Error ? e$5 : Object.assign(new Error(), {
918
+ kind: e$5.kind,
919
+ message: e$5.message,
920
+ stack: void 0
921
+ }));
922
+ let summary = `Build failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
923
+ for (let i$21 = 0; i$21 < errors.length; i$21++) {
924
+ summary += "\n";
925
+ if (i$21 >= 5) {
926
+ summary += "...";
927
+ break;
928
+ }
929
+ summary += getErrorMessage(errors[i$21]);
930
+ }
931
+ const wrapper = new Error(summary);
932
+ Object.defineProperty(wrapper, "errors", {
933
+ configurable: true,
934
+ enumerable: true,
935
+ get: () => errors,
936
+ set: (value) => Object.defineProperty(wrapper, "errors", {
937
+ configurable: true,
938
+ enumerable: true,
939
+ value
940
+ })
941
+ });
942
+ return wrapper;
943
+ }
944
+ function getErrorMessage(e$5) {
945
+ if (Object.hasOwn(e$5, "kind")) return e$5.message;
946
+ let s$10 = "";
947
+ if (e$5.plugin) s$10 += `[plugin ${e$5.plugin}]`;
948
+ const id = e$5.id ?? e$5.loc?.file;
949
+ if (id) {
950
+ s$10 += " " + id;
951
+ if (e$5.loc) s$10 += `:${e$5.loc.line}:${e$5.loc.column}`;
952
+ }
953
+ if (s$10) s$10 += "\n";
954
+ const message = `${e$5.name ?? "Error"}: ${e$5.message}`;
955
+ s$10 += message;
956
+ if (e$5.frame) s$10 = joinNewLine(s$10, e$5.frame);
957
+ if (e$5.stack) s$10 = joinNewLine(s$10, e$5.stack.replace(message, ""));
958
+ return s$10;
959
+ }
960
+ function joinNewLine(s1, s2) {
961
+ return s1.replace(/\n+$/, "") + "\n" + s2.replace(/^\n+/, "");
962
+ }
963
+ var init_error = __esm({ "src/utils/error.ts"() {} });
964
+
965
+ //#endregion
966
+ //#region src/utils/resolved-external.ts
967
+ function transformResolvedExternal(bindingResolvedExternal$1) {
968
+ switch (bindingResolvedExternal$1.type) {
969
+ case "Bool": return bindingResolvedExternal$1.field0;
970
+ case "Absolute": return "absolute";
971
+ case "Relative": unreachable(`The PluginContext resolve result external couldn't be 'relative'`);
972
+ }
973
+ }
974
+ function bindingResolvedExternal(external) {
975
+ if (typeof external === "boolean") return {
976
+ type: "Bool",
977
+ field0: external
978
+ };
979
+ if (external === "absolute") return { type: "Absolute" };
980
+ if (external === "relative") return { type: "Relative" };
981
+ }
982
+ var init_resolved_external = __esm({ "src/utils/resolved-external.ts"() {
983
+ init_misc();
984
+ } });
985
+
986
+ //#endregion
987
+ //#region src/utils/transform-module-info.ts
988
+ function transformModuleInfo(info, option) {
989
+ return {
990
+ get ast() {
991
+ return unsupported("ModuleInfo#ast");
992
+ },
993
+ get code() {
994
+ return info.code;
995
+ },
996
+ id: info.id,
997
+ importers: info.importers,
998
+ dynamicImporters: info.dynamicImporters,
999
+ importedIds: info.importedIds,
1000
+ dynamicallyImportedIds: info.dynamicallyImportedIds,
1001
+ exports: info.exports,
1002
+ isEntry: info.isEntry,
1003
+ ...option
1004
+ };
1005
+ }
1006
+ var init_transform_module_info = __esm({ "src/utils/transform-module-info.ts"() {
1007
+ init_misc();
1008
+ } });
1009
+
1010
+ //#endregion
1011
+ //#region src/utils/transform-side-effects.ts
1012
+ function bindingifySideEffects(sideEffects) {
1013
+ switch (sideEffects) {
1014
+ case true: return BindingHookSideEffects.True;
1015
+ case false: return BindingHookSideEffects.False;
1016
+ case "no-treeshake": return BindingHookSideEffects.NoTreeshake;
1017
+ case null:
1018
+ case void 0: return void 0;
1019
+ default: throw new Error(`Unexpected side effects: ${sideEffects}`);
1020
+ }
1021
+ }
1022
+ var init_transform_side_effects = __esm({ "src/utils/transform-side-effects.ts"() {} });
1023
+
1024
+ //#endregion
1025
+ //#region src/utils/transform-sourcemap.ts
1026
+ function isEmptySourcemapFiled(array) {
1027
+ if (!array) return true;
1028
+ if (array.length === 0 || !array[0]) return true;
1029
+ return false;
1030
+ }
1031
+ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
1032
+ if (!rawMap) return;
1033
+ let map = typeof rawMap === "object" ? rawMap : JSON.parse(rawMap);
1034
+ if (isEmptySourcemapFiled(map.sourcesContent)) map.sourcesContent = [originalCode];
1035
+ if (isEmptySourcemapFiled(map.sources) || map.sources && map.sources.length === 1 && map.sources[0] !== id) map.sources = [id];
1036
+ return map;
1037
+ }
1038
+ var init_transform_sourcemap = __esm({ "src/utils/transform-sourcemap.ts"() {} });
1039
+
1040
+ //#endregion
1041
+ //#region src/plugin/bindingify-hook-filter.ts
1042
+ function bindingifyStringFilter(matcher) {
1043
+ if (typeof matcher === "string" || matcher instanceof RegExp) return { include: [matcher] };
1044
+ if (Array.isArray(matcher)) return { include: matcher };
1045
+ return {
1046
+ include: matcher.include ? arraify(matcher.include) : void 0,
1047
+ exclude: matcher.exclude ? arraify(matcher.exclude) : void 0
1048
+ };
1049
+ }
1050
+ function bindingifyResolveIdFilter(filterOption) {
1051
+ return filterOption?.id ? bindingifyStringFilter(filterOption.id) : void 0;
1052
+ }
1053
+ function bindingifyLoadFilter(filterOption) {
1054
+ return filterOption?.id ? bindingifyStringFilter(filterOption.id) : void 0;
1055
+ }
1056
+ function bindingifyTransformFilter(filterOption) {
1057
+ if (!filterOption) return void 0;
1058
+ const { id, code, moduleType } = filterOption;
1059
+ let moduleTypeRet;
1060
+ if (moduleType) if (Array.isArray(moduleType)) moduleTypeRet = moduleType;
1061
+ else moduleTypeRet = moduleType.include;
1062
+ return {
1063
+ id: id ? bindingifyStringFilter(id) : void 0,
1064
+ code: code ? bindingifyStringFilter(code) : void 0,
1065
+ moduleType: moduleTypeRet
1066
+ };
1067
+ }
1068
+ var init_bindingify_hook_filter = __esm({ "src/plugin/bindingify-hook-filter.ts"() {
1069
+ init_misc();
1070
+ } });
1071
+
1072
+ //#endregion
1073
+ //#region src/plugin/bindingify-plugin-hook-meta.ts
1074
+ function bindingifyPluginHookMeta(options) {
1075
+ return { order: bindingPluginOrder(options.order) };
1076
+ }
1077
+ function bindingPluginOrder(order) {
1078
+ switch (order) {
1079
+ case "post": return BindingPluginOrder.Post;
1080
+ case "pre": return BindingPluginOrder.Pre;
1081
+ case null:
1082
+ case void 0: return void 0;
1083
+ default: throw new Error(`Unknown plugin order: ${order}`);
1084
+ }
1085
+ }
1086
+ var init_bindingify_plugin_hook_meta = __esm({ "src/plugin/bindingify-plugin-hook-meta.ts"() {} });
1087
+
1088
+ //#endregion
1089
+ //#region src/utils/asset-source.ts
1090
+ function transformAssetSource(bindingAssetSource$1) {
1091
+ return bindingAssetSource$1.inner;
1092
+ }
1093
+ function bindingAssetSource(source) {
1094
+ return { inner: source };
1095
+ }
1096
+ var init_asset_source = __esm({ "src/utils/asset-source.ts"() {} });
1097
+
1098
+ //#endregion
1099
+ //#region src/plugin/plugin-context.ts
1100
+ var PluginContextImpl;
1101
+ var init_plugin_context = __esm({ "src/plugin/plugin-context.ts"() {
1102
+ init_logging();
1103
+ init_logs();
1104
+ init_parse_ast_index();
1105
+ init_minimal_plugin_context();
1106
+ init_asset_source();
1107
+ init_misc();
1108
+ init_resolved_external();
1109
+ init_transform_side_effects();
1110
+ PluginContextImpl = class extends MinimalPluginContextImpl {
1111
+ getModuleInfo;
1112
+ constructor(outputOptions, context, plugin, data, onLog, logLevel, watchMode, currentLoadingModule) {
1113
+ super(onLog, logLevel, plugin.name, watchMode);
1114
+ this.outputOptions = outputOptions;
1115
+ this.context = context;
1116
+ this.data = data;
1117
+ this.onLog = onLog;
1118
+ this.currentLoadingModule = currentLoadingModule;
1119
+ this.getModuleInfo = (id) => this.data.getModuleInfo(id, context);
1120
+ }
1121
+ async load(options) {
1122
+ const id = options.id;
1123
+ if (id === this.currentLoadingModule) this.onLog(LOG_LEVEL_WARN, logCycleLoading(this.pluginName, this.currentLoadingModule));
1124
+ const moduleInfo = this.data.getModuleInfo(id, this.context);
1125
+ if (moduleInfo && moduleInfo.code !== null) return moduleInfo;
1126
+ const rawOptions = {
1127
+ meta: options.meta || {},
1128
+ moduleSideEffects: options.moduleSideEffects || null,
1129
+ invalidate: false
1130
+ };
1131
+ this.data.updateModuleOption(id, rawOptions);
1132
+ async function createLoadModulePromise(context, data) {
1133
+ const loadPromise = data.loadModulePromiseMap.get(id);
1134
+ if (loadPromise) return loadPromise;
1135
+ let resolveFn;
1136
+ const promise = new Promise((resolve, _) => {
1137
+ resolveFn = resolve;
1138
+ });
1139
+ data.loadModulePromiseMap.set(id, promise);
1140
+ try {
1141
+ await context.load(id, bindingifySideEffects(options.moduleSideEffects), (_success) => {
1142
+ resolveFn();
1143
+ });
1144
+ } finally {
1145
+ data.loadModulePromiseMap.delete(id);
1146
+ }
1147
+ return promise;
1148
+ }
1149
+ await createLoadModulePromise(this.context, this.data);
1150
+ return this.data.getModuleInfo(id, this.context);
1151
+ }
1152
+ async resolve(source, importer, options) {
1153
+ let receipt = void 0;
1154
+ if (options != null) receipt = this.data.saveResolveOptions(options);
1155
+ const res = await this.context.resolve(source, importer, {
1156
+ custom: receipt,
1157
+ skipSelf: options?.skipSelf
1158
+ });
1159
+ if (receipt != null) this.data.removeSavedResolveOptions(receipt);
1160
+ if (res == null) return null;
1161
+ const info = this.data.getModuleOption(res.id) || {};
1162
+ return {
1163
+ ...res,
1164
+ external: transformResolvedExternal(res.external),
1165
+ ...info
1166
+ };
1167
+ }
1168
+ emitFile = (file) => {
1169
+ if (file.type === "prebuilt-chunk") return unimplemented("PluginContext.emitFile with type prebuilt-chunk");
1170
+ if (file.type === "chunk") return this.context.emitChunk(file);
1171
+ const fnSanitizedFileName = file.fileName || typeof this.outputOptions.sanitizeFileName !== "function" ? void 0 : this.outputOptions.sanitizeFileName(file.name || "asset");
1172
+ const filename = file.fileName ? void 0 : this.getAssetFileNames(file);
1173
+ return this.context.emitFile({
1174
+ ...file,
1175
+ originalFileName: file.originalFileName || void 0,
1176
+ source: bindingAssetSource(file.source)
1177
+ }, filename, fnSanitizedFileName);
1178
+ };
1179
+ getAssetFileNames(file) {
1180
+ if (typeof this.outputOptions.assetFileNames === "function") return this.outputOptions.assetFileNames({
1181
+ names: file.name ? [file.name] : [],
1182
+ originalFileNames: file.originalFileName ? [file.originalFileName] : [],
1183
+ source: file.source,
1184
+ type: "asset"
1185
+ });
1186
+ }
1187
+ getFileName(referenceId) {
1188
+ return this.context.getFileName(referenceId);
1189
+ }
1190
+ getModuleIds() {
1191
+ return this.data.getModuleIds(this.context);
1192
+ }
1193
+ addWatchFile(id) {
1194
+ this.context.addWatchFile(id);
1195
+ }
1196
+ parse(input, options) {
1197
+ return parseAst(input, options);
1198
+ }
1199
+ };
1200
+ } });
1201
+
1202
+ //#endregion
1203
+ //#region src/plugin/transform-plugin-context.ts
1204
+ var TransformPluginContextImpl;
1205
+ var init_transform_plugin_context = __esm({ "src/plugin/transform-plugin-context.ts"() {
1206
+ init_log_handler();
1207
+ init_logs();
1208
+ init_plugin_context();
1209
+ TransformPluginContextImpl = class extends PluginContextImpl {
1210
+ constructor(outputOptions, context, plugin, data, inner, moduleId, moduleSource, onLog, LogLevelOption, watchMode) {
1211
+ super(outputOptions, context, plugin, data, onLog, LogLevelOption, watchMode, moduleId);
1212
+ this.inner = inner;
1213
+ this.moduleId = moduleId;
1214
+ this.moduleSource = moduleSource;
1215
+ const getLogHandler$1 = (handler) => (log, pos) => {
1216
+ log = normalizeLog(log);
1217
+ if (pos) augmentCodeLocation(log, pos, moduleSource, moduleId);
1218
+ log.id = moduleId;
1219
+ log.hook = "transform";
1220
+ handler(log);
1221
+ };
1222
+ this.debug = getLogHandler$1(this.debug);
1223
+ this.warn = getLogHandler$1(this.warn);
1224
+ this.info = getLogHandler$1(this.info);
1225
+ }
1226
+ error(e$5, pos) {
1227
+ if (typeof e$5 === "string") e$5 = { message: e$5 };
1228
+ if (pos) augmentCodeLocation(e$5, pos, this.moduleSource, this.moduleId);
1229
+ e$5.id = this.moduleId;
1230
+ e$5.hook = "transform";
1231
+ return error(logPluginError(normalizeLog(e$5), this.pluginName));
1232
+ }
1233
+ getCombinedSourcemap() {
1234
+ return JSON.parse(this.inner.getCombinedSourcemap());
1235
+ }
1236
+ };
1237
+ } });
1238
+
1239
+ //#endregion
1240
+ //#region src/plugin/bindingify-build-hooks.ts
1241
+ function bindingifyBuildStart(args) {
1242
+ const hook = args.plugin.buildStart;
1243
+ if (!hook) return {};
1244
+ const { handler, meta } = normalizeHook(hook);
1245
+ return {
1246
+ plugin: async (ctx, opts) => {
1247
+ await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), new NormalizedInputOptionsImpl(opts, args.onLog));
1248
+ },
1249
+ meta: bindingifyPluginHookMeta(meta)
1250
+ };
1251
+ }
1252
+ function bindingifyBuildEnd(args) {
1253
+ const hook = args.plugin.buildEnd;
1254
+ if (!hook) return {};
1255
+ const { handler, meta } = normalizeHook(hook);
1256
+ return {
1257
+ plugin: async (ctx, err) => {
1258
+ await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), err ? normalizeErrors(err) : void 0);
1259
+ },
1260
+ meta: bindingifyPluginHookMeta(meta)
1261
+ };
1262
+ }
1263
+ function bindingifyResolveId(args) {
1264
+ const hook = args.plugin.resolveId;
1265
+ if (!hook) return {};
1266
+ const { handler, meta, options } = normalizeHook(hook);
1267
+ return {
1268
+ plugin: async (ctx, specifier, importer, extraOptions) => {
1269
+ const contextResolveOptions = extraOptions.custom != null ? args.pluginContextData.getSavedResolveOptions(extraOptions.custom) : void 0;
1270
+ const newExtraOptions = {
1271
+ ...extraOptions,
1272
+ custom: contextResolveOptions?.custom,
1273
+ [SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF]: contextResolveOptions?.[SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF]
1274
+ };
1275
+ const ret = await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), specifier, importer ?? void 0, newExtraOptions);
1276
+ if (ret == null) return;
1277
+ if (ret === false) return {
1278
+ id: specifier,
1279
+ external: bindingResolvedExternal(true),
1280
+ normalizeExternalId: true
1281
+ };
1282
+ if (typeof ret === "string") return {
1283
+ id: ret,
1284
+ normalizeExternalId: true
1285
+ };
1286
+ let exist = args.pluginContextData.updateModuleOption(ret.id, {
1287
+ meta: ret.meta || {},
1288
+ moduleSideEffects: ret.moduleSideEffects ?? null,
1289
+ invalidate: false
1290
+ });
1291
+ return {
1292
+ id: ret.id,
1293
+ external: bindingResolvedExternal(ret.external),
1294
+ normalizeExternalId: false,
1295
+ sideEffects: bindingifySideEffects(exist.moduleSideEffects)
1296
+ };
1297
+ },
1298
+ meta: bindingifyPluginHookMeta(meta),
1299
+ filter: bindingifyResolveIdFilter(options.filter)
1300
+ };
1301
+ }
1302
+ function bindingifyResolveDynamicImport(args) {
1303
+ const hook = args.plugin.resolveDynamicImport;
1304
+ if (!hook) return {};
1305
+ const { handler, meta } = normalizeHook(hook);
1306
+ return {
1307
+ plugin: async (ctx, specifier, importer) => {
1308
+ const ret = await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), specifier, importer ?? void 0);
1309
+ if (ret == null) return;
1310
+ if (ret === false) return {
1311
+ id: specifier,
1312
+ external: bindingResolvedExternal(true)
1313
+ };
1314
+ if (typeof ret === "string") return { id: ret };
1315
+ const result = {
1316
+ id: ret.id,
1317
+ external: bindingResolvedExternal(ret.external)
1318
+ };
1319
+ if (ret.moduleSideEffects !== null) result.sideEffects = bindingifySideEffects(ret.moduleSideEffects);
1320
+ args.pluginContextData.updateModuleOption(ret.id, {
1321
+ meta: ret.meta || {},
1322
+ moduleSideEffects: ret.moduleSideEffects || null,
1323
+ invalidate: false
1324
+ });
1325
+ return result;
1326
+ },
1327
+ meta: bindingifyPluginHookMeta(meta)
1328
+ };
1329
+ }
1330
+ function bindingifyTransform(args) {
1331
+ const hook = args.plugin.transform;
1332
+ if (!hook) return {};
1333
+ const { handler, meta, options } = normalizeHook(hook);
1334
+ return {
1335
+ plugin: async (ctx, code, id, meta$1) => {
1336
+ const ret = await handler.call(new TransformPluginContextImpl(args.outputOptions, ctx.inner(), args.plugin, args.pluginContextData, ctx, id, code, args.onLog, args.logLevel, args.watchMode), code, id, meta$1);
1337
+ if (ret == null) return void 0;
1338
+ if (typeof ret === "string") return { code: ret };
1339
+ let moduleOption = args.pluginContextData.updateModuleOption(id, {
1340
+ meta: ret.meta ?? {},
1341
+ moduleSideEffects: ret.moduleSideEffects ?? null,
1342
+ invalidate: false
1343
+ });
1344
+ return {
1345
+ code: ret.code,
1346
+ map: bindingifySourcemap(normalizeTransformHookSourcemap(id, code, ret.map)),
1347
+ sideEffects: bindingifySideEffects(moduleOption.moduleSideEffects),
1348
+ moduleType: ret.moduleType
1349
+ };
1350
+ },
1351
+ meta: bindingifyPluginHookMeta(meta),
1352
+ filter: bindingifyTransformFilter(options.filter)
1353
+ };
1354
+ }
1355
+ function bindingifyLoad(args) {
1356
+ const hook = args.plugin.load;
1357
+ if (!hook) return {};
1358
+ const { handler, meta, options } = normalizeHook(hook);
1359
+ return {
1360
+ plugin: async (ctx, id) => {
1361
+ const ret = await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode, id), id);
1362
+ if (ret == null) return;
1363
+ if (typeof ret === "string") return { code: ret };
1364
+ let moduleOption = args.pluginContextData.updateModuleOption(id, {
1365
+ meta: ret.meta || {},
1366
+ moduleSideEffects: ret.moduleSideEffects ?? null,
1367
+ invalidate: false
1368
+ });
1369
+ let map = preProcessSourceMap(ret, id);
1370
+ return {
1371
+ code: ret.code,
1372
+ map: bindingifySourcemap(map),
1373
+ moduleType: ret.moduleType,
1374
+ sideEffects: bindingifySideEffects(moduleOption.moduleSideEffects)
1375
+ };
1376
+ },
1377
+ meta: bindingifyPluginHookMeta(meta),
1378
+ filter: bindingifyLoadFilter(options.filter)
1379
+ };
1380
+ }
1381
+ function preProcessSourceMap(ret, id) {
1382
+ if (!ret.map) return;
1383
+ let map = typeof ret.map === "object" ? ret.map : JSON.parse(ret.map);
1384
+ if (!isEmptySourcemapFiled(map.sources)) {
1385
+ const directory = path.dirname(id) || ".";
1386
+ const sourceRoot = map.sourceRoot || ".";
1387
+ map.sources = map.sources.map((source) => path.resolve(directory, sourceRoot, source));
1388
+ }
1389
+ return map;
1390
+ }
1391
+ function bindingifyModuleParsed(args) {
1392
+ const hook = args.plugin.moduleParsed;
1393
+ if (!hook) return {};
1394
+ const { handler, meta } = normalizeHook(hook);
1395
+ return {
1396
+ plugin: async (ctx, moduleInfo) => {
1397
+ await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), transformModuleInfo(moduleInfo, args.pluginContextData.getModuleOption(moduleInfo.id)));
1398
+ },
1399
+ meta: bindingifyPluginHookMeta(meta)
1400
+ };
1401
+ }
1402
+ var init_bindingify_build_hooks = __esm({ "src/plugin/bindingify-build-hooks.ts"() {
1403
+ init_normalize_hook();
1404
+ init_plugin_context$1();
1405
+ init_normalized_input_options();
1406
+ init_sourcemap();
1407
+ init_error();
1408
+ init_resolved_external();
1409
+ init_transform_module_info();
1410
+ init_transform_side_effects();
1411
+ init_transform_sourcemap();
1412
+ init_bindingify_hook_filter();
1413
+ init_bindingify_plugin_hook_meta();
1414
+ init_plugin_context();
1415
+ init_transform_plugin_context();
1416
+ } });
1417
+
1418
+ //#endregion
1419
+ //#region src/utils/transform-rendered-module.ts
1420
+ function transformToRenderedModule(bindingRenderedModule) {
1421
+ return {
1422
+ get code() {
1423
+ return bindingRenderedModule.code;
1424
+ },
1425
+ get renderedLength() {
1426
+ return bindingRenderedModule.code?.length || 0;
1427
+ },
1428
+ get renderedExports() {
1429
+ return bindingRenderedModule.renderedExports;
1430
+ }
1431
+ };
1432
+ }
1433
+ var init_transform_rendered_module = __esm({ "src/utils/transform-rendered-module.ts"() {} });
1434
+
1435
+ //#endregion
1436
+ //#region src/utils/transform-rendered-chunk.ts
1437
+ function transformRenderedChunk(chunk) {
1438
+ let modules = null;
1439
+ return {
1440
+ get name() {
1441
+ return chunk.name;
1442
+ },
1443
+ get isEntry() {
1444
+ return chunk.isEntry;
1445
+ },
1446
+ get isDynamicEntry() {
1447
+ return chunk.isDynamicEntry;
1448
+ },
1449
+ get facadeModuleId() {
1450
+ return chunk.facadeModuleId;
1451
+ },
1452
+ get moduleIds() {
1453
+ return chunk.moduleIds;
1454
+ },
1455
+ get exports() {
1456
+ return chunk.exports;
1457
+ },
1458
+ get fileName() {
1459
+ return chunk.fileName;
1460
+ },
1461
+ get imports() {
1462
+ return chunk.imports;
1463
+ },
1464
+ get dynamicImports() {
1465
+ return chunk.dynamicImports;
1466
+ },
1467
+ get modules() {
1468
+ if (!modules) modules = transformChunkModules(chunk.modules);
1469
+ return modules;
1470
+ }
1471
+ };
1472
+ }
1473
+ function transformChunkModules(modules) {
1474
+ const result = {};
1475
+ for (let i$21 = 0; i$21 < modules.values.length; i$21++) {
1476
+ let key = modules.keys[i$21];
1477
+ const mod = modules.values[i$21];
1478
+ result[key] = transformToRenderedModule(mod);
1479
+ }
1480
+ return result;
1481
+ }
1482
+ var init_transform_rendered_chunk = __esm({ "src/utils/transform-rendered-chunk.ts"() {
1483
+ init_transform_rendered_module();
1484
+ } });
1485
+
1486
+ //#endregion
1487
+ //#region src/utils/bindingify-output-options.ts
1488
+ function bindingifyOutputOptions(outputOptions) {
1489
+ const { dir, format, exports, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName } = outputOptions;
1490
+ return {
1491
+ dir,
1492
+ file: file == null ? void 0 : file,
1493
+ format: bindingifyFormat(format),
1494
+ exports,
1495
+ hashCharacters,
1496
+ sourcemap: bindingifySourcemap$1(sourcemap),
1497
+ sourcemapDebugIds,
1498
+ sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
1499
+ sourcemapPathTransform,
1500
+ banner: bindingifyAddon(banner),
1501
+ footer: bindingifyAddon(footer),
1502
+ intro: bindingifyAddon(intro),
1503
+ outro: bindingifyAddon(outro),
1504
+ extend: outputOptions.extend,
1505
+ globals,
1506
+ esModule,
1507
+ name,
1508
+ assetFileNames: bindingifyAssetFilenames(assetFileNames),
1509
+ entryFileNames,
1510
+ chunkFileNames,
1511
+ cssEntryFileNames,
1512
+ cssChunkFileNames,
1513
+ plugins: [],
1514
+ minify: outputOptions.minify,
1515
+ externalLiveBindings: outputOptions.externalLiveBindings,
1516
+ inlineDynamicImports: outputOptions.inlineDynamicImports,
1517
+ advancedChunks: outputOptions.advancedChunks,
1518
+ polyfillRequire: outputOptions.polyfillRequire,
1519
+ target: outputOptions.target,
1520
+ sanitizeFileName
1521
+ };
1522
+ }
1523
+ function bindingifyAddon(configAddon) {
1524
+ return async (chunk) => {
1525
+ if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
1526
+ return configAddon || "";
1527
+ };
1528
+ }
1529
+ function bindingifyFormat(format) {
1530
+ switch (format) {
1531
+ case void 0:
1532
+ case "es":
1533
+ case "esm":
1534
+ case "module": return "es";
1535
+ case "cjs":
1536
+ case "commonjs": return "cjs";
1537
+ case "iife": return "iife";
1538
+ case "umd": return "umd";
1539
+ case "experimental-app": return "app";
1540
+ default: unimplemented(`output.format: ${format}`);
1541
+ }
1542
+ }
1543
+ function bindingifySourcemap$1(sourcemap) {
1544
+ switch (sourcemap) {
1545
+ case true: return "file";
1546
+ case "inline": return "inline";
1547
+ case false:
1548
+ case void 0: return void 0;
1549
+ case "hidden": return "hidden";
1550
+ default: throw new Error(`unknown sourcemap: ${sourcemap}`);
1551
+ }
1552
+ }
1553
+ function bindingifySourcemapIgnoreList(sourcemapIgnoreList) {
1554
+ return typeof sourcemapIgnoreList === "function" ? sourcemapIgnoreList : sourcemapIgnoreList === false ? () => false : (relativeSourcePath, _sourcemapPath) => relativeSourcePath.includes("node_modules");
1555
+ }
1556
+ function bindingifyAssetFilenames(assetFileNames) {
1557
+ if (typeof assetFileNames === "function") return (asset) => {
1558
+ return assetFileNames({
1559
+ names: asset.names,
1560
+ originalFileNames: asset.originalFileNames,
1561
+ source: transformAssetSource(asset.source),
1562
+ type: "asset"
1563
+ });
1564
+ };
1565
+ return assetFileNames;
1566
+ }
1567
+ var init_bindingify_output_options = __esm({ "src/utils/bindingify-output-options.ts"() {
1568
+ init_asset_source();
1569
+ init_misc();
1570
+ init_transform_rendered_chunk();
1571
+ } });
1572
+
1573
+ //#endregion
1574
+ //#region src/options/normalized-output-options.ts
1575
+ function normalizeAddon(value) {
1576
+ if (typeof value === "function") return value;
1577
+ return () => value || "";
1578
+ }
1579
+ var NormalizedOutputOptionsImpl;
1580
+ var init_normalized_output_options = __esm({ "src/options/normalized-output-options.ts"() {
1581
+ init_bindingify_output_options();
1582
+ NormalizedOutputOptionsImpl = class {
1583
+ constructor(inner, outputOptions, normalizedOutputPlugins) {
1584
+ this.inner = inner;
1585
+ this.outputOptions = outputOptions;
1586
+ this.normalizedOutputPlugins = normalizedOutputPlugins;
1587
+ }
1588
+ get dir() {
1589
+ return this.inner.dir ?? void 0;
1590
+ }
1591
+ get entryFileNames() {
1592
+ return this.inner.entryFilenames || this.outputOptions.entryFileNames;
1593
+ }
1594
+ get chunkFileNames() {
1595
+ return this.inner.chunkFilenames || this.outputOptions.chunkFileNames;
1596
+ }
1597
+ get assetFileNames() {
1598
+ return this.inner.assetFilenames || this.outputOptions.assetFileNames;
1599
+ }
1600
+ get format() {
1601
+ return this.inner.format;
1602
+ }
1603
+ get exports() {
1604
+ return this.inner.exports;
1605
+ }
1606
+ get sourcemap() {
1607
+ return this.inner.sourcemap;
1608
+ }
1609
+ get cssEntryFileNames() {
1610
+ return this.inner.cssEntryFilenames || this.outputOptions.cssEntryFileNames;
1611
+ }
1612
+ get cssChunkFileNames() {
1613
+ return this.inner.cssChunkFilenames || this.outputOptions.cssChunkFileNames;
1614
+ }
1615
+ get shimMissingExports() {
1616
+ return this.inner.shimMissingExports;
1617
+ }
1618
+ get name() {
1619
+ return this.inner.name ?? void 0;
1620
+ }
1621
+ get file() {
1622
+ return this.inner.file ?? void 0;
1623
+ }
1624
+ get inlineDynamicImports() {
1625
+ return this.inner.inlineDynamicImports;
1626
+ }
1627
+ get externalLiveBindings() {
1628
+ return this.inner.externalLiveBindings;
1629
+ }
1630
+ get banner() {
1631
+ return normalizeAddon(this.outputOptions.banner);
1632
+ }
1633
+ get footer() {
1634
+ return normalizeAddon(this.outputOptions.footer);
1635
+ }
1636
+ get intro() {
1637
+ return normalizeAddon(this.outputOptions.intro);
1638
+ }
1639
+ get outro() {
1640
+ return normalizeAddon(this.outputOptions.outro);
1641
+ }
1642
+ get esModule() {
1643
+ return this.inner.esModule;
1644
+ }
1645
+ get extend() {
1646
+ return this.inner.extend;
1647
+ }
1648
+ get globals() {
1649
+ return this.inner.globals || this.outputOptions.globals;
1650
+ }
1651
+ get hashCharacters() {
1652
+ return this.inner.hashCharacters;
1653
+ }
1654
+ get sourcemapDebugIds() {
1655
+ return this.inner.sourcemapDebugIds;
1656
+ }
1657
+ get sourcemapIgnoreList() {
1658
+ return bindingifySourcemapIgnoreList(this.outputOptions.sourcemapIgnoreList);
1659
+ }
1660
+ get sourcemapPathTransform() {
1661
+ return this.outputOptions.sourcemapPathTransform;
1662
+ }
1663
+ get minify() {
1664
+ return this.inner.minify;
1665
+ }
1666
+ get comments() {
1667
+ return this.inner.comments;
1668
+ }
1669
+ get polyfillRequire() {
1670
+ return this.inner.polyfillRequire;
1671
+ }
1672
+ get plugins() {
1673
+ return this.normalizedOutputPlugins;
1674
+ }
1675
+ };
1676
+ } });
1677
+
1678
+ //#endregion
1679
+ //#region src/utils/transform-to-rollup-output.ts
1680
+ function transformToRollupSourceMap(map) {
1681
+ const parsed = JSON.parse(map);
1682
+ const obj = {
1683
+ ...parsed,
1684
+ toString() {
1685
+ return JSON.stringify(obj);
1686
+ },
1687
+ toUrl() {
1688
+ return `data:application/json;charset=utf-8;base64,${Buffer.from(obj.toString(), "utf-8").toString("base64")}`;
1689
+ }
1690
+ };
1691
+ return obj;
1692
+ }
1693
+ function transformToRollupOutputChunk(bindingChunk, changed) {
1694
+ const chunk = {
1695
+ type: "chunk",
1696
+ get code() {
1697
+ return bindingChunk.code;
1698
+ },
1699
+ fileName: bindingChunk.fileName,
1700
+ name: bindingChunk.name,
1701
+ get modules() {
1702
+ return transformChunkModules(bindingChunk.modules);
1703
+ },
1704
+ get imports() {
1705
+ return bindingChunk.imports;
1706
+ },
1707
+ get dynamicImports() {
1708
+ return bindingChunk.dynamicImports;
1709
+ },
1710
+ exports: bindingChunk.exports,
1711
+ isEntry: bindingChunk.isEntry,
1712
+ facadeModuleId: bindingChunk.facadeModuleId || null,
1713
+ isDynamicEntry: bindingChunk.isDynamicEntry,
1714
+ get moduleIds() {
1715
+ return bindingChunk.moduleIds;
1716
+ },
1717
+ get map() {
1718
+ return bindingChunk.map ? transformToRollupSourceMap(bindingChunk.map) : null;
1719
+ },
1720
+ sourcemapFileName: bindingChunk.sourcemapFileName || null,
1721
+ preliminaryFileName: bindingChunk.preliminaryFileName
1722
+ };
1723
+ const cache = {};
1724
+ return new Proxy(chunk, {
1725
+ get(target, p$3) {
1726
+ if (p$3 in cache) return cache[p$3];
1727
+ const value = target[p$3];
1728
+ cache[p$3] = value;
1729
+ return value;
1730
+ },
1731
+ set(target, p$3, newValue) {
1732
+ cache[p$3] = newValue;
1733
+ changed?.updated.add(bindingChunk.fileName);
1734
+ return true;
1735
+ },
1736
+ has(target, p$3) {
1737
+ if (p$3 in cache) return true;
1738
+ return p$3 in target;
1739
+ }
1740
+ });
1741
+ }
1742
+ function transformToRollupOutputAsset(bindingAsset, changed) {
1743
+ const asset = {
1744
+ type: "asset",
1745
+ fileName: bindingAsset.fileName,
1746
+ originalFileName: bindingAsset.originalFileName || null,
1747
+ originalFileNames: bindingAsset.originalFileNames,
1748
+ get source() {
1749
+ return transformAssetSource(bindingAsset.source);
1750
+ },
1751
+ name: bindingAsset.name ?? void 0,
1752
+ names: bindingAsset.names
1753
+ };
1754
+ const cache = {};
1755
+ return new Proxy(asset, {
1756
+ get(target, p$3) {
1757
+ if (p$3 in cache) return cache[p$3];
1758
+ const value = target[p$3];
1759
+ cache[p$3] = value;
1760
+ return value;
1761
+ },
1762
+ set(target, p$3, newValue) {
1763
+ cache[p$3] = newValue;
1764
+ changed?.updated.add(bindingAsset.fileName);
1765
+ return true;
1766
+ }
1767
+ });
1768
+ }
1769
+ function transformToRollupOutput(output, changed) {
1770
+ handleOutputErrors(output);
1771
+ const { chunks, assets } = output;
1772
+ return { output: [...chunks.map((chunk) => transformToRollupOutputChunk(chunk, changed)), ...assets.map((asset) => transformToRollupOutputAsset(asset, changed))] };
1773
+ }
1774
+ function handleOutputErrors(output) {
1775
+ const rawErrors = output.errors;
1776
+ if (rawErrors.length > 0) throw normalizeErrors(rawErrors);
1777
+ }
1778
+ function transformToOutputBundle(output, changed) {
1779
+ const bundle = Object.fromEntries(transformToRollupOutput(output, changed).output.map((item) => [item.fileName, item]));
1780
+ return new Proxy(bundle, { deleteProperty(target, property) {
1781
+ if (typeof property === "string") changed.deleted.add(property);
1782
+ return true;
1783
+ } });
1784
+ }
1785
+ function collectChangedBundle(changed, bundle) {
1786
+ const assets = [];
1787
+ const chunks = [];
1788
+ for (const key in bundle) {
1789
+ if (changed.deleted.has(key) || !changed.updated.has(key)) continue;
1790
+ const item = bundle[key];
1791
+ if (item.type === "asset") assets.push({
1792
+ filename: item.fileName,
1793
+ originalFileNames: item.originalFileNames,
1794
+ source: bindingAssetSource(item.source),
1795
+ names: item.names
1796
+ });
1797
+ else chunks.push({
1798
+ code: item.code,
1799
+ filename: item.fileName,
1800
+ name: item.name,
1801
+ isEntry: item.isEntry,
1802
+ exports: item.exports,
1803
+ modules: {},
1804
+ imports: item.imports,
1805
+ dynamicImports: item.dynamicImports,
1806
+ facadeModuleId: item.facadeModuleId || void 0,
1807
+ isDynamicEntry: item.isDynamicEntry,
1808
+ moduleIds: item.moduleIds,
1809
+ map: bindingifySourcemap(item.map),
1810
+ sourcemapFilename: item.sourcemapFileName || void 0,
1811
+ preliminaryFilename: item.preliminaryFileName
1812
+ });
1813
+ }
1814
+ return {
1815
+ assets,
1816
+ chunks,
1817
+ deleted: Array.from(changed.deleted)
1818
+ };
1819
+ }
1820
+ var init_transform_to_rollup_output = __esm({ "src/utils/transform-to-rollup-output.ts"() {
1821
+ init_sourcemap();
1822
+ init_asset_source();
1823
+ init_error();
1824
+ init_transform_rendered_chunk();
1825
+ } });
1826
+
1827
+ //#endregion
1828
+ //#region src/plugin/bindingify-output-hooks.ts
1829
+ function bindingifyRenderStart(args) {
1830
+ const hook = args.plugin.renderStart;
1831
+ if (!hook) return {};
1832
+ const { handler, meta } = normalizeHook(hook);
1833
+ return {
1834
+ plugin: async (ctx, opts) => {
1835
+ handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), new NormalizedOutputOptionsImpl(opts, args.outputOptions, args.normalizedOutputPlugins), new NormalizedInputOptionsImpl(opts, args.onLog));
1836
+ },
1837
+ meta: bindingifyPluginHookMeta(meta)
1838
+ };
1839
+ }
1840
+ function bindingifyRenderChunk(args) {
1841
+ const hook = args.plugin.renderChunk;
1842
+ if (!hook) return {};
1843
+ const { handler, meta } = normalizeHook(hook);
1844
+ return {
1845
+ plugin: async (ctx, code, chunk, opts, meta$1) => {
1846
+ if (args.pluginContextData.getRenderChunkMeta() == null) args.pluginContextData.setRenderChunkMeta({ chunks: Object.fromEntries(Object.entries(meta$1.chunks).map(([key, value]) => [key, transformRenderedChunk(value)])) });
1847
+ const ret = await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), code, transformRenderedChunk(chunk), new NormalizedOutputOptionsImpl(opts, args.outputOptions, args.normalizedOutputPlugins), args.pluginContextData.getRenderChunkMeta());
1848
+ if (ret == null) return;
1849
+ if (typeof ret === "string") return { code: ret };
1850
+ if (!ret.map) return { code: ret.code };
1851
+ return {
1852
+ code: ret.code,
1853
+ map: bindingifySourcemap(ret.map)
1854
+ };
1855
+ },
1856
+ meta: bindingifyPluginHookMeta(meta)
1857
+ };
1858
+ }
1859
+ function bindingifyAugmentChunkHash(args) {
1860
+ const hook = args.plugin.augmentChunkHash;
1861
+ if (!hook) return {};
1862
+ const { handler, meta } = normalizeHook(hook);
1863
+ return {
1864
+ plugin: async (ctx, chunk) => {
1865
+ return await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), transformRenderedChunk(chunk));
1866
+ },
1867
+ meta: bindingifyPluginHookMeta(meta)
1868
+ };
1869
+ }
1870
+ function bindingifyRenderError(args) {
1871
+ const hook = args.plugin.renderError;
1872
+ if (!hook) return {};
1873
+ const { handler, meta } = normalizeHook(hook);
1874
+ return {
1875
+ plugin: async (ctx, err) => {
1876
+ handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), normalizeErrors(err));
1877
+ },
1878
+ meta: bindingifyPluginHookMeta(meta)
1879
+ };
1880
+ }
1881
+ function bindingifyGenerateBundle(args) {
1882
+ const hook = args.plugin.generateBundle;
1883
+ if (!hook) return {};
1884
+ const { handler, meta } = normalizeHook(hook);
1885
+ return {
1886
+ plugin: async (ctx, bundle, isWrite, opts) => {
1887
+ const changed = {
1888
+ updated: new Set(),
1889
+ deleted: new Set()
1890
+ };
1891
+ const output = transformToOutputBundle(bundle, changed);
1892
+ await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), new NormalizedOutputOptionsImpl(opts, args.outputOptions, args.normalizedOutputPlugins), output, isWrite);
1893
+ return collectChangedBundle(changed, output);
1894
+ },
1895
+ meta: bindingifyPluginHookMeta(meta)
1896
+ };
1897
+ }
1898
+ function bindingifyWriteBundle(args) {
1899
+ const hook = args.plugin.writeBundle;
1900
+ if (!hook) return {};
1901
+ const { handler, meta } = normalizeHook(hook);
1902
+ return {
1903
+ plugin: async (ctx, bundle, opts) => {
1904
+ const changed = {
1905
+ updated: new Set(),
1906
+ deleted: new Set()
1907
+ };
1908
+ const output = transformToOutputBundle(bundle, changed);
1909
+ await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), new NormalizedOutputOptionsImpl(opts, args.outputOptions, args.normalizedOutputPlugins), output);
1910
+ return collectChangedBundle(changed, output);
1911
+ },
1912
+ meta: bindingifyPluginHookMeta(meta)
1913
+ };
1914
+ }
1915
+ function bindingifyCloseBundle(args) {
1916
+ const hook = args.plugin.closeBundle;
1917
+ if (!hook) return {};
1918
+ const { handler, meta } = normalizeHook(hook);
1919
+ return {
1920
+ plugin: async (ctx) => {
1921
+ await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode));
1922
+ },
1923
+ meta: bindingifyPluginHookMeta(meta)
1924
+ };
1925
+ }
1926
+ function bindingifyBanner(args) {
1927
+ const hook = args.plugin.banner;
1928
+ if (!hook) return {};
1929
+ const { handler, meta } = normalizeHook(hook);
1930
+ return {
1931
+ plugin: async (ctx, chunk) => {
1932
+ if (typeof handler === "string") return handler;
1933
+ return handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), transformRenderedChunk(chunk));
1934
+ },
1935
+ meta: bindingifyPluginHookMeta(meta)
1936
+ };
1937
+ }
1938
+ function bindingifyFooter(args) {
1939
+ const hook = args.plugin.footer;
1940
+ if (!hook) return {};
1941
+ const { handler, meta } = normalizeHook(hook);
1942
+ return {
1943
+ plugin: async (ctx, chunk) => {
1944
+ if (typeof handler === "string") return handler;
1945
+ return handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), transformRenderedChunk(chunk));
1946
+ },
1947
+ meta: bindingifyPluginHookMeta(meta)
1948
+ };
1949
+ }
1950
+ function bindingifyIntro(args) {
1951
+ const hook = args.plugin.intro;
1952
+ if (!hook) return {};
1953
+ const { handler, meta } = normalizeHook(hook);
1954
+ return {
1955
+ plugin: async (ctx, chunk) => {
1956
+ if (typeof handler === "string") return handler;
1957
+ return handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), transformRenderedChunk(chunk));
1958
+ },
1959
+ meta: bindingifyPluginHookMeta(meta)
1960
+ };
1961
+ }
1962
+ function bindingifyOutro(args) {
1963
+ const hook = args.plugin.outro;
1964
+ if (!hook) return {};
1965
+ const { handler, meta } = normalizeHook(hook);
1966
+ return {
1967
+ plugin: async (ctx, chunk) => {
1968
+ if (typeof handler === "string") return handler;
1969
+ return handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), transformRenderedChunk(chunk));
1970
+ },
1971
+ meta: bindingifyPluginHookMeta(meta)
1972
+ };
1973
+ }
1974
+ var init_bindingify_output_hooks = __esm({ "src/plugin/bindingify-output-hooks.ts"() {
1975
+ init_normalized_input_options();
1976
+ init_normalized_output_options();
1977
+ init_sourcemap();
1978
+ init_error();
1979
+ init_normalize_hook();
1980
+ init_transform_rendered_chunk();
1981
+ init_transform_to_rollup_output();
1982
+ init_bindingify_plugin_hook_meta();
1983
+ init_plugin_context();
1984
+ } });
1985
+
1986
+ //#endregion
1987
+ //#region src/plugin/bindingify-watch-hooks.ts
1988
+ function bindingifyWatchChange(args) {
1989
+ const hook = args.plugin.watchChange;
1990
+ if (!hook) return {};
1991
+ const { handler, meta } = normalizeHook(hook);
1992
+ return {
1993
+ plugin: async (ctx, id, event) => {
1994
+ await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode), id, { event });
1995
+ },
1996
+ meta: bindingifyPluginHookMeta(meta)
1997
+ };
1998
+ }
1999
+ function bindingifyCloseWatcher(args) {
2000
+ const hook = args.plugin.closeWatcher;
2001
+ if (!hook) return {};
2002
+ const { handler, meta } = normalizeHook(hook);
2003
+ return {
2004
+ plugin: async (ctx) => {
2005
+ await handler.call(new PluginContextImpl(args.outputOptions, ctx, args.plugin, args.pluginContextData, args.onLog, args.logLevel, args.watchMode));
2006
+ },
2007
+ meta: bindingifyPluginHookMeta(meta)
2008
+ };
2009
+ }
2010
+ var init_bindingify_watch_hooks = __esm({ "src/plugin/bindingify-watch-hooks.ts"() {
2011
+ init_normalize_hook();
2012
+ init_bindingify_plugin_hook_meta();
2013
+ init_plugin_context();
2014
+ } });
2015
+
2016
+ //#endregion
2017
+ //#region src/plugin/bindingify-plugin.ts
2018
+ function bindingifyPlugin(plugin, options, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode) {
2019
+ const args = {
2020
+ plugin,
2021
+ options,
2022
+ outputOptions,
2023
+ pluginContextData,
2024
+ onLog,
2025
+ logLevel,
2026
+ watchMode,
2027
+ normalizedOutputPlugins
2028
+ };
2029
+ const { plugin: buildStart, meta: buildStartMeta } = bindingifyBuildStart(args);
2030
+ const { plugin: resolveId, meta: resolveIdMeta, filter: resolveIdFilter } = bindingifyResolveId(args);
2031
+ const { plugin: resolveDynamicImport, meta: resolveDynamicImportMeta } = bindingifyResolveDynamicImport(args);
2032
+ const { plugin: buildEnd, meta: buildEndMeta } = bindingifyBuildEnd(args);
2033
+ const { plugin: transform, meta: transformMeta, filter: transformFilter } = bindingifyTransform(args);
2034
+ const { plugin: moduleParsed, meta: moduleParsedMeta } = bindingifyModuleParsed(args);
2035
+ const { plugin: load, meta: loadMeta, filter: loadFilter } = bindingifyLoad(args);
2036
+ const { plugin: renderChunk, meta: renderChunkMeta } = bindingifyRenderChunk(args);
2037
+ const { plugin: augmentChunkHash, meta: augmentChunkHashMeta } = bindingifyAugmentChunkHash(args);
2038
+ const { plugin: renderStart, meta: renderStartMeta } = bindingifyRenderStart(args);
2039
+ const { plugin: renderError, meta: renderErrorMeta } = bindingifyRenderError(args);
2040
+ const { plugin: generateBundle, meta: generateBundleMeta } = bindingifyGenerateBundle(args);
2041
+ const { plugin: writeBundle, meta: writeBundleMeta } = bindingifyWriteBundle(args);
2042
+ const { plugin: closeBundle, meta: closeBundleMeta } = bindingifyCloseBundle(args);
2043
+ const { plugin: banner, meta: bannerMeta } = bindingifyBanner(args);
2044
+ const { plugin: footer, meta: footerMeta } = bindingifyFooter(args);
2045
+ const { plugin: intro, meta: introMeta } = bindingifyIntro(args);
2046
+ const { plugin: outro, meta: outroMeta } = bindingifyOutro(args);
2047
+ const { plugin: watchChange, meta: watchChangeMeta } = bindingifyWatchChange(args);
2048
+ const { plugin: closeWatcher, meta: closeWatcherMeta } = bindingifyCloseWatcher(args);
2049
+ const result = {
2050
+ name: plugin.name,
2051
+ buildStart,
2052
+ buildStartMeta,
2053
+ resolveId,
2054
+ resolveIdMeta,
2055
+ resolveIdFilter,
2056
+ resolveDynamicImport,
2057
+ resolveDynamicImportMeta,
2058
+ buildEnd,
2059
+ buildEndMeta,
2060
+ transform,
2061
+ transformMeta,
2062
+ transformFilter,
2063
+ moduleParsed,
2064
+ moduleParsedMeta,
2065
+ load,
2066
+ loadMeta,
2067
+ loadFilter,
2068
+ renderChunk,
2069
+ renderChunkMeta,
2070
+ augmentChunkHash,
2071
+ augmentChunkHashMeta,
2072
+ renderStart,
2073
+ renderStartMeta,
2074
+ renderError,
2075
+ renderErrorMeta,
2076
+ generateBundle,
2077
+ generateBundleMeta,
2078
+ writeBundle,
2079
+ writeBundleMeta,
2080
+ closeBundle,
2081
+ closeBundleMeta,
2082
+ banner,
2083
+ bannerMeta,
2084
+ footer,
2085
+ footerMeta,
2086
+ intro,
2087
+ introMeta,
2088
+ outro,
2089
+ outroMeta,
2090
+ watchChange,
2091
+ watchChangeMeta,
2092
+ closeWatcher,
2093
+ closeWatcherMeta
2094
+ };
2095
+ return wrapHandlers(result);
2096
+ }
2097
+ function wrapHandlers(plugin) {
2098
+ for (const hookName of [
2099
+ "buildStart",
2100
+ "resolveId",
2101
+ "resolveDynamicImport",
2102
+ "buildEnd",
2103
+ "transform",
2104
+ "moduleParsed",
2105
+ "load",
2106
+ "renderChunk",
2107
+ "augmentChunkHash",
2108
+ "renderStart",
2109
+ "renderError",
2110
+ "generateBundle",
2111
+ "writeBundle",
2112
+ "closeBundle",
2113
+ "banner",
2114
+ "footer",
2115
+ "intro",
2116
+ "outro",
2117
+ "watchChange",
2118
+ "closeWatcher"
2119
+ ]) {
2120
+ const handler = plugin[hookName];
2121
+ if (handler) plugin[hookName] = async (...args) => {
2122
+ try {
2123
+ return await handler(...args);
2124
+ } catch (e$5) {
2125
+ return error(logPluginError(e$5, plugin.name, {
2126
+ hook: hookName,
2127
+ id: hookName === "transform" ? args[2] : void 0
2128
+ }));
2129
+ }
2130
+ };
2131
+ }
2132
+ return plugin;
2133
+ }
2134
+ var init_bindingify_plugin = __esm({ "src/plugin/bindingify-plugin.ts"() {
2135
+ init_bindingify_build_hooks();
2136
+ init_bindingify_output_hooks();
2137
+ init_logs();
2138
+ init_bindingify_watch_hooks();
2139
+ } });
2140
+
2141
+ //#endregion
2142
+ //#region src/plugin/plugin-context-data.ts
2143
+ var PluginContextData;
2144
+ var init_plugin_context_data = __esm({ "src/plugin/plugin-context-data.ts"() {
2145
+ init_transform_module_info();
2146
+ PluginContextData = class {
2147
+ moduleOptionMap = new Map();
2148
+ resolveOptionsMap = new Map();
2149
+ loadModulePromiseMap = new Map();
2150
+ meta = null;
2151
+ updateModuleOption(id, option) {
2152
+ const existing = this.moduleOptionMap.get(id);
2153
+ if (existing) {
2154
+ if (option.moduleSideEffects != null) existing.moduleSideEffects = option.moduleSideEffects;
2155
+ if (option.meta != null) Object.assign(existing.meta, option.meta);
2156
+ if (option.invalidate != null) existing.invalidate = option.invalidate;
2157
+ } else {
2158
+ this.moduleOptionMap.set(id, option);
2159
+ return option;
2160
+ }
2161
+ return existing;
2162
+ }
2163
+ getModuleOption(id) {
2164
+ const option = this.moduleOptionMap.get(id);
2165
+ if (!option) {
2166
+ const raw = {
2167
+ moduleSideEffects: null,
2168
+ meta: {}
2169
+ };
2170
+ this.moduleOptionMap.set(id, raw);
2171
+ return raw;
2172
+ }
2173
+ return option;
2174
+ }
2175
+ getModuleInfo(id, context) {
2176
+ const bindingInfo = context.getModuleInfo(id);
2177
+ if (bindingInfo) {
2178
+ const info = transformModuleInfo(bindingInfo, this.getModuleOption(id));
2179
+ return this.proxyModuleInfo(id, info);
2180
+ }
2181
+ return null;
2182
+ }
2183
+ proxyModuleInfo(id, info) {
2184
+ let moduleSideEffects = info.moduleSideEffects;
2185
+ Object.defineProperty(info, "moduleSideEffects", {
2186
+ get() {
2187
+ return moduleSideEffects;
2188
+ },
2189
+ set: (v$1) => {
2190
+ this.updateModuleOption(id, {
2191
+ moduleSideEffects: v$1,
2192
+ meta: info.meta,
2193
+ invalidate: true
2194
+ });
2195
+ moduleSideEffects = v$1;
2196
+ }
2197
+ });
2198
+ return info;
2199
+ }
2200
+ getModuleIds(context) {
2201
+ const moduleIds = context.getModuleIds();
2202
+ return moduleIds.values();
2203
+ }
2204
+ saveResolveOptions(options) {
2205
+ const index = this.resolveOptionsMap.size;
2206
+ this.resolveOptionsMap.set(index, options);
2207
+ return index;
2208
+ }
2209
+ getSavedResolveOptions(receipt) {
2210
+ return this.resolveOptionsMap.get(receipt);
2211
+ }
2212
+ removeSavedResolveOptions(receipt) {
2213
+ this.resolveOptionsMap.delete(receipt);
2214
+ }
2215
+ setRenderChunkMeta(meta) {
2216
+ this.meta = meta;
2217
+ }
2218
+ getRenderChunkMeta() {
2219
+ return this.meta;
2220
+ }
2221
+ };
2222
+ } });
2223
+
2224
+ //#endregion
2225
+ //#region src/utils/normalize-string-or-regex.ts
2226
+ function normalizedStringOrRegex(pattern) {
2227
+ if (!pattern) return void 0;
2228
+ if (!Array.isArray(pattern)) pattern = [pattern];
2229
+ return pattern;
2230
+ }
2231
+ var init_normalize_string_or_regex = __esm({ "src/utils/normalize-string-or-regex.ts"() {} });
2232
+
2233
+ //#endregion
2234
+ //#region src/utils/bindingify-input-options.ts
2235
+ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode) {
2236
+ const pluginContextData = new PluginContextData();
2237
+ const plugins = rawPlugins.map((plugin) => {
2238
+ if ("_parallel" in plugin) return void 0;
2239
+ if (plugin instanceof BuiltinPlugin) return bindingifyBuiltInPlugin(plugin);
2240
+ return bindingifyPlugin(plugin, inputOptions, outputOptions, pluginContextData, normalizedOutputPlugins, onLog, logLevel, watchMode);
2241
+ });
2242
+ return {
2243
+ input: bindingifyInput(inputOptions.input),
2244
+ plugins,
2245
+ cwd: inputOptions.cwd ?? process.cwd(),
2246
+ external: bindingifyExternal(inputOptions.external),
2247
+ resolve: bindingifyResolve(inputOptions.resolve),
2248
+ platform: inputOptions.platform,
2249
+ shimMissingExports: inputOptions.shimMissingExports,
2250
+ logLevel: bindingifyLogLevel(logLevel),
2251
+ onLog,
2252
+ treeshake: bindingifyTreeshakeOptions(inputOptions.treeshake),
2253
+ moduleTypes: inputOptions.moduleTypes,
2254
+ define: inputOptions.define ? Object.entries(inputOptions.define) : void 0,
2255
+ inject: bindingifyInject(inputOptions.inject),
2256
+ experimental: {
2257
+ strictExecutionOrder: inputOptions.experimental?.strictExecutionOrder,
2258
+ disableLiveBindings: inputOptions.experimental?.disableLiveBindings,
2259
+ viteMode: inputOptions.experimental?.viteMode,
2260
+ resolveNewUrlToAsset: inputOptions.experimental?.resolveNewUrlToAsset,
2261
+ hmr: bindingifyHmr(inputOptions.experimental?.hmr)
2262
+ },
2263
+ profilerNames: inputOptions?.profilerNames,
2264
+ jsx: bindingifyJsx(inputOptions.jsx),
2265
+ transform: inputOptions.transform,
2266
+ watch: bindingifyWatch(inputOptions.watch),
2267
+ dropLabels: inputOptions.dropLabels,
2268
+ keepNames: inputOptions.keepNames,
2269
+ checks: inputOptions.checks,
2270
+ deferSyncScanData: () => {
2271
+ let ret = [];
2272
+ pluginContextData.moduleOptionMap.forEach((value, key) => {
2273
+ if (value.invalidate) ret.push({
2274
+ id: key,
2275
+ sideEffects: bindingifySideEffects(value.moduleSideEffects)
2276
+ });
2277
+ });
2278
+ return ret;
2279
+ },
2280
+ makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),
2281
+ debug: inputOptions.debug
2282
+ };
2283
+ }
2284
+ function bindingifyHmr(hmr) {
2285
+ if (hmr) {
2286
+ if (typeof hmr === "boolean") return hmr ? {} : void 0;
2287
+ return hmr;
2288
+ }
2289
+ }
2290
+ function bindingifyExternal(external) {
2291
+ if (external) {
2292
+ if (typeof external === "function") return (id, importer, isResolved) => {
2293
+ if (id.startsWith("\0")) return false;
2294
+ return external(id, importer, isResolved) ?? false;
2295
+ };
2296
+ const externalArr = arraify(external);
2297
+ return (id, _importer, _isResolved) => {
2298
+ return externalArr.some((pat) => {
2299
+ if (pat instanceof RegExp) return pat.test(id);
2300
+ return id === pat;
2301
+ });
2302
+ };
2303
+ }
2304
+ }
2305
+ function bindingifyResolve(resolve) {
2306
+ if (resolve) {
2307
+ const { alias, extensionAlias,...rest } = resolve;
2308
+ return {
2309
+ alias: alias ? Object.entries(alias).map(([name, replacement]) => ({
2310
+ find: name,
2311
+ replacements: arraify(replacement)
2312
+ })) : void 0,
2313
+ extensionAlias: extensionAlias ? Object.entries(extensionAlias).map(([name, value]) => ({
2314
+ target: name,
2315
+ replacements: value
2316
+ })) : void 0,
2317
+ ...rest
2318
+ };
2319
+ }
2320
+ }
2321
+ function bindingifyInject(inject) {
2322
+ if (inject) return Object.entries(inject).map(([alias, item]) => {
2323
+ if (Array.isArray(item)) {
2324
+ if (item[1] === "*") return {
2325
+ tagNamespace: true,
2326
+ alias,
2327
+ from: item[0]
2328
+ };
2329
+ return {
2330
+ tagNamed: true,
2331
+ alias,
2332
+ from: item[0],
2333
+ imported: item[1]
2334
+ };
2335
+ } else return {
2336
+ tagNamed: true,
2337
+ imported: "default",
2338
+ alias,
2339
+ from: item
2340
+ };
2341
+ });
2342
+ }
2343
+ function bindingifyLogLevel(logLevel) {
2344
+ switch (logLevel) {
2345
+ case "silent": return BindingLogLevel.Silent;
2346
+ case "debug": return BindingLogLevel.Debug;
2347
+ case "warn": return BindingLogLevel.Warn;
2348
+ case "info": return BindingLogLevel.Info;
2349
+ default: throw new Error(`Unexpected log level: ${logLevel}`);
2350
+ }
2351
+ }
2352
+ function bindingifyInput(input) {
2353
+ if (input === void 0) return [];
2354
+ if (typeof input === "string") return [{ import: input }];
2355
+ if (Array.isArray(input)) return input.map((src) => ({ import: src }));
2356
+ return Object.entries(input).map(([name, import_path]) => {
2357
+ return {
2358
+ name,
2359
+ import: import_path
2360
+ };
2361
+ });
2362
+ }
2363
+ function bindingifyJsx(input) {
2364
+ switch (input) {
2365
+ case false: return { type: "Disable" };
2366
+ case "react": return { type: "React" };
2367
+ case "react-jsx": return { type: "ReactJsx" };
2368
+ case "preserve": return { type: "Preserve" };
2369
+ case void 0: return void 0;
2370
+ }
2371
+ if (input.mode === "preserve") return { type: "Preserve" };
2372
+ const mode = input.mode ?? "automatic";
2373
+ return {
2374
+ type: "Enable",
2375
+ field0: {
2376
+ runtime: mode,
2377
+ importSource: mode === "classic" ? input.importSource : mode === "automatic" ? input.jsxImportSource : void 0,
2378
+ pragma: input.factory,
2379
+ pragmaFrag: input.fragment,
2380
+ development: input.development,
2381
+ refresh: input.refresh
2382
+ }
2383
+ };
2384
+ }
2385
+ function bindingifyWatch(watch$1) {
2386
+ if (watch$1) return {
2387
+ buildDelay: watch$1.buildDelay,
2388
+ skipWrite: watch$1.skipWrite,
2389
+ include: normalizedStringOrRegex(watch$1.include),
2390
+ exclude: normalizedStringOrRegex(watch$1.exclude)
2391
+ };
2392
+ }
2393
+ function bindingifyTreeshakeOptions(config) {
2394
+ if (config === false) return void 0;
2395
+ if (config === true || config === void 0) return { moduleSideEffects: true };
2396
+ let normalizedConfig = {
2397
+ moduleSideEffects: true,
2398
+ annotations: config.annotations,
2399
+ manualPureFunctions: config.manualPureFunctions,
2400
+ unknownGlobalSideEffects: config.unknownGlobalSideEffects
2401
+ };
2402
+ if (config.moduleSideEffects === void 0) normalizedConfig.moduleSideEffects = true;
2403
+ else if (config.moduleSideEffects === "no-external") normalizedConfig.moduleSideEffects = [{
2404
+ external: true,
2405
+ sideEffects: false
2406
+ }, {
2407
+ external: false,
2408
+ sideEffects: true
2409
+ }];
2410
+ else normalizedConfig.moduleSideEffects = config.moduleSideEffects;
2411
+ return normalizedConfig;
2412
+ }
2413
+ function bindingifyMakeAbsoluteExternalsRelative(makeAbsoluteExternalsRelative) {
2414
+ if (makeAbsoluteExternalsRelative === "ifRelativeSource") return { type: "IfRelativeSource" };
2415
+ if (typeof makeAbsoluteExternalsRelative === "boolean") return {
2416
+ type: "Bool",
2417
+ field0: makeAbsoluteExternalsRelative
2418
+ };
2419
+ }
2420
+ var init_bindingify_input_options = __esm({ "src/utils/bindingify-input-options.ts"() {
2421
+ init_constructors();
2422
+ init_utils();
2423
+ init_bindingify_plugin();
2424
+ init_plugin_context_data();
2425
+ init_misc();
2426
+ init_normalize_string_or_regex();
2427
+ init_transform_side_effects();
2428
+ } });
2429
+
2430
+ //#endregion
2431
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ANXBDSUI.js
2432
+ var init_chunk_ANXBDSUI = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ANXBDSUI.js"() {} });
2433
+
2434
+ //#endregion
2435
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3GOCSNFN.js
2436
+ var init_chunk_3GOCSNFN = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3GOCSNFN.js"() {
2437
+ init_chunk_ANXBDSUI();
2438
+ } });
2439
+
2440
+ //#endregion
2441
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-LFJW7BOT.js
2442
+ var init_chunk_LFJW7BOT = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-LFJW7BOT.js"() {
2443
+ init_chunk_3GOCSNFN();
2444
+ } });
2445
+
2446
+ //#endregion
2447
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-7ZI6JRPB.js
2448
+ var init_chunk_7ZI6JRPB = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-7ZI6JRPB.js"() {
2449
+ init_chunk_LFJW7BOT();
2450
+ init_chunk_ANXBDSUI();
2451
+ } });
2452
+
2453
+ //#endregion
2454
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OXJMERKM.js
2455
+ var init_chunk_OXJMERKM = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OXJMERKM.js"() {
2456
+ init_chunk_LFJW7BOT();
2457
+ init_chunk_ANXBDSUI();
2458
+ } });
2459
+
2460
+ //#endregion
2461
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-D6FCK2GA.js
2462
+ function u$13(o$12, n$7, a$15) {
2463
+ let t$14 = (r$12) => o$12(r$12, ...n$7);
2464
+ return a$15 === void 0 ? t$14 : Object.assign(t$14, {
2465
+ lazy: a$15,
2466
+ lazyArgs: n$7
2467
+ });
2468
+ }
2469
+ var init_chunk_D6FCK2GA = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-D6FCK2GA.js"() {} });
2470
+
2471
+ //#endregion
2472
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WIMGWYZL.js
2473
+ function u$11(r$12, n$7, o$12) {
2474
+ let a$15 = r$12.length - n$7.length;
2475
+ if (a$15 === 0) return r$12(...n$7);
2476
+ if (a$15 === 1) return u$13(r$12, n$7, o$12);
2477
+ throw new Error("Wrong number of arguments");
2478
+ }
2479
+ var init_chunk_WIMGWYZL = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WIMGWYZL.js"() {
2480
+ init_chunk_D6FCK2GA();
2481
+ } });
2482
+
2483
+ //#endregion
2484
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-BSLJB6JE.js
2485
+ var init_chunk_BSLJB6JE = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-BSLJB6JE.js"() {
2486
+ init_chunk_WIMGWYZL();
2487
+ } });
2488
+
2489
+ //#endregion
2490
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-NJXNQM3G.js
2491
+ var init_chunk_NJXNQM3G = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-NJXNQM3G.js"() {} });
2492
+
2493
+ //#endregion
2494
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-6RKHJ2CP.js
2495
+ var init_chunk_6RKHJ2CP = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-6RKHJ2CP.js"() {
2496
+ init_chunk_WIMGWYZL();
2497
+ } });
2498
+
2499
+ //#endregion
2500
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QDGUNRDA.js
2501
+ var init_chunk_QDGUNRDA = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QDGUNRDA.js"() {
2502
+ init_chunk_D6FCK2GA();
2503
+ } });
2504
+
2505
+ //#endregion
2506
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-MYLLMFC7.js
2507
+ var init_chunk_MYLLMFC7 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-MYLLMFC7.js"() {
2508
+ init_chunk_WIMGWYZL();
2509
+ } });
2510
+
2511
+ //#endregion
2512
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-DEVKGLTN.js
2513
+ var o$11, c$3, i$20;
2514
+ var init_chunk_DEVKGLTN = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-DEVKGLTN.js"() {
2515
+ o$11 = [
2516
+ " ",
2517
+ `
2518
+ `,
2519
+ "\v",
2520
+ "\f",
2521
+ "\r",
2522
+ " ",
2523
+ "…",
2524
+ "\xA0",
2525
+ " ",
2526
+ " ",
2527
+ " ",
2528
+ " ",
2529
+ " ",
2530
+ " ",
2531
+ " ",
2532
+ " ",
2533
+ " ",
2534
+ " ",
2535
+ " ",
2536
+ " ",
2537
+ "\u2028",
2538
+ "\u2029",
2539
+ " ",
2540
+ " ",
2541
+ " ",
2542
+ ""
2543
+ ], c$3 = new Set([
2544
+ "-",
2545
+ "_",
2546
+ ...o$11
2547
+ ]), i$20 = (r$12) => {
2548
+ let e$5 = [], t$14 = "", u$14 = () => {
2549
+ t$14.length > 0 && (e$5.push(t$14), t$14 = "");
2550
+ };
2551
+ for (let s$10 of r$12) {
2552
+ if (c$3.has(s$10)) {
2553
+ u$14();
2554
+ continue;
2555
+ }
2556
+ if (/[a-z]$/u.test(t$14) && /[A-Z]/u.test(s$10)) u$14();
2557
+ else if (/[A-Z][A-Z]$/u.test(t$14) && /[a-z]/u.test(s$10)) {
2558
+ let n$7 = t$14.slice(-1);
2559
+ t$14 = t$14.slice(0, -1), u$14(), t$14 = n$7;
2560
+ } else /\d$/u.test(t$14) !== /\d/u.test(s$10) && u$14();
2561
+ t$14 += s$10;
2562
+ }
2563
+ return u$14(), e$5;
2564
+ };
2565
+ } });
2566
+
2567
+ //#endregion
2568
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-N4JUOEMS.js
2569
+ var init_chunk_N4JUOEMS = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-N4JUOEMS.js"() {
2570
+ init_chunk_DEVKGLTN();
2571
+ } });
2572
+
2573
+ //#endregion
2574
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-YRJ25UV2.js
2575
+ var init_chunk_YRJ25UV2 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-YRJ25UV2.js"() {
2576
+ init_chunk_DEVKGLTN();
2577
+ init_chunk_WIMGWYZL();
2578
+ } });
2579
+
2580
+ //#endregion
2581
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-Q5ASJ5N7.js
2582
+ var init_chunk_Q5ASJ5N7 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-Q5ASJ5N7.js"() {
2583
+ init_chunk_WIMGWYZL();
2584
+ } });
2585
+
2586
+ //#endregion
2587
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WZOX4VKU.js
2588
+ var init_chunk_WZOX4VKU = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WZOX4VKU.js"() {
2589
+ init_chunk_DEVKGLTN();
2590
+ init_chunk_WIMGWYZL();
2591
+ } });
2592
+
2593
+ //#endregion
2594
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-Y3VKZ3P5.js
2595
+ var init_chunk_Y3VKZ3P5 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-Y3VKZ3P5.js"() {
2596
+ init_chunk_WIMGWYZL();
2597
+ } });
2598
+
2599
+ //#endregion
2600
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ZRKG4NSC.js
2601
+ var init_chunk_ZRKG4NSC = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ZRKG4NSC.js"() {
2602
+ init_chunk_WIMGWYZL();
2603
+ } });
2604
+
2605
+ //#endregion
2606
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QJLMYOTX.js
2607
+ var init_chunk_QJLMYOTX = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QJLMYOTX.js"() {
2608
+ init_chunk_LFJW7BOT();
2609
+ init_chunk_ANXBDSUI();
2610
+ } });
2611
+
2612
+ //#endregion
2613
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-DM52TTEP.js
2614
+ var init_chunk_DM52TTEP = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-DM52TTEP.js"() {
2615
+ init_chunk_WIMGWYZL();
2616
+ } });
2617
+
2618
+ //#endregion
2619
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-2P44HXVH.js
2620
+ var init_chunk_2P44HXVH = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-2P44HXVH.js"() {
2621
+ init_chunk_WIMGWYZL();
2622
+ } });
2623
+
2624
+ //#endregion
2625
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ZJS5DNQW.js
2626
+ var init_chunk_ZJS5DNQW = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ZJS5DNQW.js"() {
2627
+ init_chunk_ANXBDSUI();
2628
+ init_chunk_WIMGWYZL();
2629
+ } });
2630
+
2631
+ //#endregion
2632
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-DH3BPT6T.js
2633
+ var init_chunk_DH3BPT6T = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-DH3BPT6T.js"() {} });
2634
+
2635
+ //#endregion
2636
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OAMXQXGR.js
2637
+ var init_chunk_OAMXQXGR = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OAMXQXGR.js"() {
2638
+ init_chunk_WIMGWYZL();
2639
+ } });
2640
+
2641
+ //#endregion
2642
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-P5WDBFN2.js
2643
+ var init_chunk_P5WDBFN2 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-P5WDBFN2.js"() {
2644
+ init_chunk_DH3BPT6T();
2645
+ init_chunk_OAMXQXGR();
2646
+ } });
2647
+
2648
+ //#endregion
2649
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-EMIEIAAH.js
2650
+ var init_chunk_EMIEIAAH = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-EMIEIAAH.js"() {} });
2651
+
2652
+ //#endregion
2653
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-AHDTEY6L.js
2654
+ var init_chunk_AHDTEY6L = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-AHDTEY6L.js"() {
2655
+ init_chunk_P5WDBFN2();
2656
+ init_chunk_EMIEIAAH();
2657
+ } });
2658
+
2659
+ //#endregion
2660
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-4UEQNEAO.js
2661
+ var init_chunk_4UEQNEAO = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-4UEQNEAO.js"() {
2662
+ init_chunk_WIMGWYZL();
2663
+ } });
2664
+
2665
+ //#endregion
2666
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-T4PLMLCP.js
2667
+ var init_chunk_T4PLMLCP = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-T4PLMLCP.js"() {
2668
+ init_chunk_WIMGWYZL();
2669
+ } });
2670
+
2671
+ //#endregion
2672
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-SSDL7ATG.js
2673
+ var init_chunk_SSDL7ATG = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-SSDL7ATG.js"() {
2674
+ init_chunk_WIMGWYZL();
2675
+ } });
2676
+
2677
+ //#endregion
2678
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-EVIH3PFY.js
2679
+ var init_chunk_EVIH3PFY = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-EVIH3PFY.js"() {
2680
+ init_chunk_WIMGWYZL();
2681
+ } });
2682
+
2683
+ //#endregion
2684
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-RBODUO3Q.js
2685
+ var init_chunk_RBODUO3Q = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-RBODUO3Q.js"() {} });
2686
+
2687
+ //#endregion
2688
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-S52RID4A.js
2689
+ var init_chunk_S52RID4A = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-S52RID4A.js"() {
2690
+ init_chunk_WIMGWYZL();
2691
+ } });
2692
+
2693
+ //#endregion
2694
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WWPMIW33.js
2695
+ var init_chunk_WWPMIW33 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WWPMIW33.js"() {
2696
+ init_chunk_WIMGWYZL();
2697
+ } });
2698
+
2699
+ //#endregion
2700
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-57KROWWS.js
2701
+ var init_chunk_57KROWWS = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-57KROWWS.js"() {
2702
+ init_chunk_WIMGWYZL();
2703
+ } });
2704
+
2705
+ //#endregion
2706
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-V6HCOU6T.js
2707
+ var init_chunk_V6HCOU6T = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-V6HCOU6T.js"() {} });
2708
+
2709
+ //#endregion
2710
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ALS6JP7S.js
2711
+ var init_chunk_ALS6JP7S = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ALS6JP7S.js"() {
2712
+ init_chunk_WIMGWYZL();
2713
+ } });
2714
+
2715
+ //#endregion
2716
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QTQTP2VB.js
2717
+ var init_chunk_QTQTP2VB = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QTQTP2VB.js"() {
2718
+ init_chunk_WIMGWYZL();
2719
+ } });
2720
+
2721
+ //#endregion
2722
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-NFFV4IQT.js
2723
+ var init_chunk_NFFV4IQT = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-NFFV4IQT.js"() {
2724
+ init_chunk_WIMGWYZL();
2725
+ } });
2726
+
2727
+ //#endregion
2728
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-FDH4IRIM.js
2729
+ var init_chunk_FDH4IRIM = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-FDH4IRIM.js"() {
2730
+ init_chunk_EMIEIAAH();
2731
+ } });
2732
+
2733
+ //#endregion
2734
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QEKOZYJ5.js
2735
+ var init_chunk_QEKOZYJ5 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QEKOZYJ5.js"() {} });
2736
+
2737
+ //#endregion
2738
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-YDIA5YQI.js
2739
+ var init_chunk_YDIA5YQI = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-YDIA5YQI.js"() {
2740
+ init_chunk_QEKOZYJ5();
2741
+ init_chunk_WIMGWYZL();
2742
+ } });
2743
+
2744
+ //#endregion
2745
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-6OEKBHIX.js
2746
+ var init_chunk_6OEKBHIX = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-6OEKBHIX.js"() {
2747
+ init_chunk_QEKOZYJ5();
2748
+ init_chunk_WIMGWYZL();
2749
+ } });
2750
+
2751
+ //#endregion
2752
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GDGEDZJG.js
2753
+ var init_chunk_GDGEDZJG = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GDGEDZJG.js"() {
2754
+ init_chunk_QEKOZYJ5();
2755
+ init_chunk_WIMGWYZL();
2756
+ } });
2757
+
2758
+ //#endregion
2759
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XE3XIKTJ.js
2760
+ var init_chunk_XE3XIKTJ = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XE3XIKTJ.js"() {
2761
+ init_chunk_QEKOZYJ5();
2762
+ init_chunk_WIMGWYZL();
2763
+ } });
2764
+
2765
+ //#endregion
2766
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-HVJXDSOP.js
2767
+ var init_chunk_HVJXDSOP = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-HVJXDSOP.js"() {
2768
+ init_chunk_QEKOZYJ5();
2769
+ init_chunk_WIMGWYZL();
2770
+ } });
2771
+
2772
+ //#endregion
2773
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-MSOX5OUI.js
2774
+ var init_chunk_MSOX5OUI = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-MSOX5OUI.js"() {
2775
+ init_chunk_WIMGWYZL();
2776
+ } });
2777
+
2778
+ //#endregion
2779
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-C4OZY4Z2.js
2780
+ var init_chunk_C4OZY4Z2 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-C4OZY4Z2.js"() {
2781
+ init_chunk_WIMGWYZL();
2782
+ } });
2783
+
2784
+ //#endregion
2785
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-P2PQB7KO.js
2786
+ var init_chunk_P2PQB7KO = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-P2PQB7KO.js"() {
2787
+ init_chunk_WIMGWYZL();
2788
+ } });
2789
+
2790
+ //#endregion
2791
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-FZHIMCK6.js
2792
+ var init_chunk_FZHIMCK6 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-FZHIMCK6.js"() {} });
2793
+
2794
+ //#endregion
2795
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-UHZ33J57.js
2796
+ var init_chunk_UHZ33J57 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-UHZ33J57.js"() {
2797
+ init_chunk_FZHIMCK6();
2798
+ init_chunk_WIMGWYZL();
2799
+ } });
2800
+
2801
+ //#endregion
2802
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-6RL33UFT.js
2803
+ var init_chunk_6RL33UFT = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-6RL33UFT.js"() {
2804
+ init_chunk_WIMGWYZL();
2805
+ } });
2806
+
2807
+ //#endregion
2808
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-YNNF733L.js
2809
+ var init_chunk_YNNF733L = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-YNNF733L.js"() {
2810
+ init_chunk_WIMGWYZL();
2811
+ } });
2812
+
2813
+ //#endregion
2814
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-4YLWJIJ6.js
2815
+ var init_chunk_4YLWJIJ6 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-4YLWJIJ6.js"() {
2816
+ init_chunk_WIMGWYZL();
2817
+ } });
2818
+
2819
+ //#endregion
2820
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-KVHF7QRD.js
2821
+ var init_chunk_KVHF7QRD = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-KVHF7QRD.js"() {
2822
+ init_chunk_WIMGWYZL();
2823
+ } });
2824
+
2825
+ //#endregion
2826
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-UA6DVSZ3.js
2827
+ var init_chunk_UA6DVSZ3 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-UA6DVSZ3.js"() {} });
2828
+
2829
+ //#endregion
2830
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-G5B2IDWB.js
2831
+ var init_chunk_G5B2IDWB = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-G5B2IDWB.js"() {
2832
+ init_chunk_WIMGWYZL();
2833
+ } });
2834
+
2835
+ //#endregion
2836
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3FKP6OOU.js
2837
+ var init_chunk_3FKP6OOU = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3FKP6OOU.js"() {
2838
+ init_chunk_WIMGWYZL();
2839
+ } });
2840
+
2841
+ //#endregion
2842
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VFSOOVKJ.js
2843
+ var init_chunk_VFSOOVKJ = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VFSOOVKJ.js"() {} });
2844
+
2845
+ //#endregion
2846
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-K3UJMX27.js
2847
+ var init_chunk_K3UJMX27 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-K3UJMX27.js"() {} });
2848
+
2849
+ //#endregion
2850
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-LE6I3KC6.js
2851
+ var init_chunk_LE6I3KC6 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-LE6I3KC6.js"() {
2852
+ init_chunk_WIMGWYZL();
2853
+ } });
2854
+
2855
+ //#endregion
2856
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ENS7GPLZ.js
2857
+ var init_chunk_ENS7GPLZ = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ENS7GPLZ.js"() {
2858
+ init_chunk_WIMGWYZL();
2859
+ } });
2860
+
2861
+ //#endregion
2862
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-DSLWSGID.js
2863
+ var init_chunk_DSLWSGID = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-DSLWSGID.js"() {
2864
+ init_chunk_EMIEIAAH();
2865
+ } });
2866
+
2867
+ //#endregion
2868
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-R72GEKLP.js
2869
+ var init_chunk_R72GEKLP = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-R72GEKLP.js"() {} });
2870
+
2871
+ //#endregion
2872
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3IFJP4R5.js
2873
+ var init_chunk_3IFJP4R5 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3IFJP4R5.js"() {
2874
+ init_chunk_WIMGWYZL();
2875
+ } });
2876
+
2877
+ //#endregion
2878
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-J4EKWFDW.js
2879
+ var init_chunk_J4EKWFDW = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-J4EKWFDW.js"() {
2880
+ init_chunk_WIMGWYZL();
2881
+ } });
2882
+
2883
+ //#endregion
2884
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PGMPBC5Q.js
2885
+ var init_chunk_PGMPBC5Q = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PGMPBC5Q.js"() {
2886
+ init_chunk_WIMGWYZL();
2887
+ } });
2888
+
2889
+ //#endregion
2890
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GGYFZTDW.js
2891
+ var init_chunk_GGYFZTDW = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GGYFZTDW.js"() {
2892
+ init_chunk_WIMGWYZL();
2893
+ } });
2894
+
2895
+ //#endregion
2896
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-EDOGCRPU.js
2897
+ var init_chunk_EDOGCRPU = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-EDOGCRPU.js"() {
2898
+ init_chunk_3GOCSNFN();
2899
+ } });
2900
+
2901
+ //#endregion
2902
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-4NRWDO7P.js
2903
+ var init_chunk_4NRWDO7P = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-4NRWDO7P.js"() {
2904
+ init_chunk_WIMGWYZL();
2905
+ } });
2906
+
2907
+ //#endregion
2908
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-W6ZHPGFP.js
2909
+ var init_chunk_W6ZHPGFP = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-W6ZHPGFP.js"() {
2910
+ init_chunk_WIMGWYZL();
2911
+ } });
2912
+
2913
+ //#endregion
2914
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-J3IRE4DI.js
2915
+ var init_chunk_J3IRE4DI = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-J3IRE4DI.js"() {
2916
+ init_chunk_DH3BPT6T();
2917
+ init_chunk_EMIEIAAH();
2918
+ } });
2919
+
2920
+ //#endregion
2921
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-RZUYD7QY.js
2922
+ var init_chunk_RZUYD7QY = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-RZUYD7QY.js"() {
2923
+ init_chunk_WIMGWYZL();
2924
+ } });
2925
+
2926
+ //#endregion
2927
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-A3PVMI4K.js
2928
+ var init_chunk_A3PVMI4K = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-A3PVMI4K.js"() {
2929
+ init_chunk_OAMXQXGR();
2930
+ init_chunk_WIMGWYZL();
2931
+ } });
2932
+
2933
+ //#endregion
2934
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-4ZFFLFWV.js
2935
+ var init_chunk_4ZFFLFWV = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-4ZFFLFWV.js"() {
2936
+ init_chunk_WIMGWYZL();
2937
+ } });
2938
+
2939
+ //#endregion
2940
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-C6IMN7SF.js
2941
+ var init_chunk_C6IMN7SF = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-C6IMN7SF.js"() {} });
2942
+
2943
+ //#endregion
2944
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-NS6ZBRLP.js
2945
+ var init_chunk_NS6ZBRLP = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-NS6ZBRLP.js"() {
2946
+ init_chunk_WIMGWYZL();
2947
+ } });
2948
+
2949
+ //#endregion
2950
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-FMPZ2CLX.js
2951
+ var init_chunk_FMPZ2CLX = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-FMPZ2CLX.js"() {} });
2952
+
2953
+ //#endregion
2954
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3ZJAREUD.js
2955
+ var init_chunk_3ZJAREUD = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3ZJAREUD.js"() {
2956
+ init_chunk_WIMGWYZL();
2957
+ } });
2958
+
2959
+ //#endregion
2960
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ZXVA7VDE.js
2961
+ var init_chunk_ZXVA7VDE = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ZXVA7VDE.js"() {
2962
+ init_chunk_LFJW7BOT();
2963
+ } });
2964
+
2965
+ //#endregion
2966
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-567G5ZXL.js
2967
+ var init_chunk_567G5ZXL = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-567G5ZXL.js"() {
2968
+ init_chunk_WIMGWYZL();
2969
+ } });
2970
+
2971
+ //#endregion
2972
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-KQRZQWDE.js
2973
+ var init_chunk_KQRZQWDE = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-KQRZQWDE.js"() {
2974
+ init_chunk_567G5ZXL();
2975
+ init_chunk_WIMGWYZL();
2976
+ } });
2977
+
2978
+ //#endregion
2979
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3D3RWAVJ.js
2980
+ var init_chunk_3D3RWAVJ = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3D3RWAVJ.js"() {
2981
+ init_chunk_WIMGWYZL();
2982
+ } });
2983
+
2984
+ //#endregion
2985
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-K2FFNW24.js
2986
+ var init_chunk_K2FFNW24 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-K2FFNW24.js"() {
2987
+ init_chunk_WIMGWYZL();
2988
+ } });
2989
+
2990
+ //#endregion
2991
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-5S4PYKVY.js
2992
+ var init_chunk_5S4PYKVY = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-5S4PYKVY.js"() {
2993
+ init_chunk_WIMGWYZL();
2994
+ } });
2995
+
2996
+ //#endregion
2997
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-5WKPQX7L.js
2998
+ var init_chunk_5WKPQX7L = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-5WKPQX7L.js"() {} });
2999
+
3000
+ //#endregion
3001
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-BZNENX2T.js
3002
+ var init_chunk_BZNENX2T = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-BZNENX2T.js"() {} });
3003
+
3004
+ //#endregion
3005
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PDQFB3TV.js
3006
+ var init_chunk_PDQFB3TV = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PDQFB3TV.js"() {
3007
+ init_chunk_BZNENX2T();
3008
+ init_chunk_WIMGWYZL();
3009
+ } });
3010
+
3011
+ //#endregion
3012
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XMLUDZIW.js
3013
+ var init_chunk_XMLUDZIW = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XMLUDZIW.js"() {} });
3014
+
3015
+ //#endregion
3016
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GMMLSO2N.js
3017
+ var init_chunk_GMMLSO2N = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GMMLSO2N.js"() {
3018
+ init_chunk_WIMGWYZL();
3019
+ } });
3020
+
3021
+ //#endregion
3022
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-5NQBDF4H.js
3023
+ function t$5(...n$7) {
3024
+ return u$11(Object.keys, n$7);
3025
+ }
3026
+ var init_chunk_5NQBDF4H = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-5NQBDF4H.js"() {
3027
+ init_chunk_WIMGWYZL();
3028
+ } });
3029
+
3030
+ //#endregion
3031
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PFSVCZNE.js
3032
+ var init_chunk_PFSVCZNE = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PFSVCZNE.js"() {
3033
+ init_chunk_WIMGWYZL();
3034
+ } });
3035
+
3036
+ //#endregion
3037
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VO5MRBXA.js
3038
+ var init_chunk_VO5MRBXA = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VO5MRBXA.js"() {
3039
+ init_chunk_WIMGWYZL();
3040
+ } });
3041
+
3042
+ //#endregion
3043
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XUX3ZEXI.js
3044
+ var init_chunk_XUX3ZEXI = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XUX3ZEXI.js"() {
3045
+ init_chunk_WIMGWYZL();
3046
+ } });
3047
+
3048
+ //#endregion
3049
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-KZIKCQ56.js
3050
+ var init_chunk_KZIKCQ56 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-KZIKCQ56.js"() {
3051
+ init_chunk_WIMGWYZL();
3052
+ } });
3053
+
3054
+ //#endregion
3055
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-P3DXEVTH.js
3056
+ var init_chunk_P3DXEVTH = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-P3DXEVTH.js"() {
3057
+ init_chunk_WIMGWYZL();
3058
+ } });
3059
+
3060
+ //#endregion
3061
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-6GTAPB47.js
3062
+ var init_chunk_6GTAPB47 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-6GTAPB47.js"() {} });
3063
+
3064
+ //#endregion
3065
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-NMC53JVB.js
3066
+ var init_chunk_NMC53JVB = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-NMC53JVB.js"() {} });
3067
+
3068
+ //#endregion
3069
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PULGOXDA.js
3070
+ var init_chunk_PULGOXDA = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PULGOXDA.js"() {} });
3071
+
3072
+ //#endregion
3073
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OLNQBNAJ.js
3074
+ var init_chunk_OLNQBNAJ = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OLNQBNAJ.js"() {
3075
+ init_chunk_WIMGWYZL();
3076
+ } });
3077
+
3078
+ //#endregion
3079
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QOEIYQAG.js
3080
+ var init_chunk_QOEIYQAG = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QOEIYQAG.js"() {
3081
+ init_chunk_WIMGWYZL();
3082
+ } });
3083
+
3084
+ //#endregion
3085
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-SFZGYJFI.js
3086
+ var init_chunk_SFZGYJFI = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-SFZGYJFI.js"() {} });
3087
+
3088
+ //#endregion
3089
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-JJZ7E4YG.js
3090
+ var init_chunk_JJZ7E4YG = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-JJZ7E4YG.js"() {} });
3091
+
3092
+ //#endregion
3093
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VCYTMP4D.js
3094
+ var init_chunk_VCYTMP4D = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VCYTMP4D.js"() {} });
3095
+
3096
+ //#endregion
3097
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-CAZXBO45.js
3098
+ var init_chunk_CAZXBO45 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-CAZXBO45.js"() {} });
3099
+
3100
+ //#endregion
3101
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ENOHV5LT.js
3102
+ var init_chunk_ENOHV5LT = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ENOHV5LT.js"() {} });
3103
+
3104
+ //#endregion
3105
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-U753ZCO5.js
3106
+ var init_chunk_U753ZCO5 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-U753ZCO5.js"() {} });
3107
+
3108
+ //#endregion
3109
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-5DU4ITSF.js
3110
+ var init_chunk_5DU4ITSF = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-5DU4ITSF.js"() {} });
3111
+
3112
+ //#endregion
3113
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GK5I7C4J.js
3114
+ var init_chunk_GK5I7C4J = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GK5I7C4J.js"() {} });
3115
+
3116
+ //#endregion
3117
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-HV3WACXG.js
3118
+ var init_chunk_HV3WACXG = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-HV3WACXG.js"() {} });
3119
+
3120
+ //#endregion
3121
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-JK3VNB42.js
3122
+ var init_chunk_JK3VNB42 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-JK3VNB42.js"() {} });
3123
+
3124
+ //#endregion
3125
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-T45O7BFY.js
3126
+ var init_chunk_T45O7BFY = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-T45O7BFY.js"() {
3127
+ init_chunk_LFJW7BOT();
3128
+ init_chunk_ANXBDSUI();
3129
+ } });
3130
+
3131
+ //#endregion
3132
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OP5ZF26D.js
3133
+ var init_chunk_OP5ZF26D = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OP5ZF26D.js"() {
3134
+ init_chunk_WIMGWYZL();
3135
+ } });
3136
+
3137
+ //#endregion
3138
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-BO3LQZNF.js
3139
+ var init_chunk_BO3LQZNF = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-BO3LQZNF.js"() {} });
3140
+
3141
+ //#endregion
3142
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-I3D2BSWJ.js
3143
+ var init_chunk_I3D2BSWJ = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-I3D2BSWJ.js"() {} });
3144
+
3145
+ //#endregion
3146
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-7QX4DO53.js
3147
+ var init_chunk_7QX4DO53 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-7QX4DO53.js"() {} });
3148
+
3149
+ //#endregion
3150
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VMV5GVZ5.js
3151
+ var init_chunk_VMV5GVZ5 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VMV5GVZ5.js"() {} });
3152
+
3153
+ //#endregion
3154
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OWH4IQQW.js
3155
+ var init_chunk_OWH4IQQW = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OWH4IQQW.js"() {} });
3156
+
3157
+ //#endregion
3158
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ETADWPSK.js
3159
+ var init_chunk_ETADWPSK = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ETADWPSK.js"() {} });
3160
+
3161
+ //#endregion
3162
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OFZGPGDZ.js
3163
+ var init_chunk_OFZGPGDZ = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OFZGPGDZ.js"() {
3164
+ init_chunk_WIMGWYZL();
3165
+ } });
3166
+
3167
+ //#endregion
3168
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-HGKLN5KY.js
3169
+ var init_chunk_HGKLN5KY = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-HGKLN5KY.js"() {
3170
+ init_chunk_WIMGWYZL();
3171
+ } });
3172
+
3173
+ //#endregion
3174
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-R7PILVSQ.js
3175
+ var init_chunk_R7PILVSQ = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-R7PILVSQ.js"() {
3176
+ init_chunk_HGKLN5KY();
3177
+ init_chunk_WIMGWYZL();
3178
+ } });
3179
+
3180
+ //#endregion
3181
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-HJSE3ESO.js
3182
+ var init_chunk_HJSE3ESO = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-HJSE3ESO.js"() {} });
3183
+
3184
+ //#endregion
3185
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-B6PG574O.js
3186
+ var init_chunk_B6PG574O = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-B6PG574O.js"() {
3187
+ init_chunk_WIMGWYZL();
3188
+ } });
3189
+
3190
+ //#endregion
3191
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ICBBHOCR.js
3192
+ var init_chunk_ICBBHOCR = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ICBBHOCR.js"() {
3193
+ init_chunk_LFJW7BOT();
3194
+ init_chunk_ANXBDSUI();
3195
+ } });
3196
+
3197
+ //#endregion
3198
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-DAE7EJQ2.js
3199
+ var init_chunk_DAE7EJQ2 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-DAE7EJQ2.js"() {
3200
+ init_chunk_EMIEIAAH();
3201
+ init_chunk_OAMXQXGR();
3202
+ } });
3203
+
3204
+ //#endregion
3205
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XPCYQPKH.js
3206
+ var init_chunk_XPCYQPKH = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XPCYQPKH.js"() {
3207
+ init_chunk_ANXBDSUI();
3208
+ init_chunk_D6FCK2GA();
3209
+ } });
3210
+
3211
+ //#endregion
3212
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-FRNNS7AX.js
3213
+ var init_chunk_FRNNS7AX = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-FRNNS7AX.js"() {
3214
+ init_chunk_WIMGWYZL();
3215
+ } });
3216
+
3217
+ //#endregion
3218
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QJOWZFYO.js
3219
+ var init_chunk_QJOWZFYO = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-QJOWZFYO.js"() {
3220
+ init_chunk_FZHIMCK6();
3221
+ init_chunk_WIMGWYZL();
3222
+ } });
3223
+
3224
+ //#endregion
3225
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VIBSXWWU.js
3226
+ var init_chunk_VIBSXWWU = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VIBSXWWU.js"() {
3227
+ init_chunk_WIMGWYZL();
3228
+ } });
3229
+
3230
+ //#endregion
3231
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-T4H4IOYC.js
3232
+ var init_chunk_T4H4IOYC = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-T4H4IOYC.js"() {
3233
+ init_chunk_WIMGWYZL();
3234
+ } });
3235
+
3236
+ //#endregion
3237
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GPLTWAVR.js
3238
+ var init_chunk_GPLTWAVR = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GPLTWAVR.js"() {
3239
+ init_chunk_WIMGWYZL();
3240
+ } });
3241
+
3242
+ //#endregion
3243
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PIX5OHMW.js
3244
+ var init_chunk_PIX5OHMW = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PIX5OHMW.js"() {
3245
+ init_chunk_WIMGWYZL();
3246
+ } });
3247
+
3248
+ //#endregion
3249
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VVM5DH6Z.js
3250
+ var init_chunk_VVM5DH6Z = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VVM5DH6Z.js"() {
3251
+ init_chunk_WIMGWYZL();
3252
+ } });
3253
+
3254
+ //#endregion
3255
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PVYOMZ3I.js
3256
+ var init_chunk_PVYOMZ3I = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-PVYOMZ3I.js"() {
3257
+ init_chunk_WIMGWYZL();
3258
+ } });
3259
+
3260
+ //#endregion
3261
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-P6LAFGAN.js
3262
+ var init_chunk_P6LAFGAN = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-P6LAFGAN.js"() {
3263
+ init_chunk_ANXBDSUI();
3264
+ init_chunk_WIMGWYZL();
3265
+ } });
3266
+
3267
+ //#endregion
3268
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-SGAFZVQH.js
3269
+ var init_chunk_SGAFZVQH = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-SGAFZVQH.js"() {} });
3270
+
3271
+ //#endregion
3272
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-MQDP6CFS.js
3273
+ var init_chunk_MQDP6CFS = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-MQDP6CFS.js"() {
3274
+ init_chunk_SGAFZVQH();
3275
+ init_chunk_ANXBDSUI();
3276
+ init_chunk_WIMGWYZL();
3277
+ } });
3278
+
3279
+ //#endregion
3280
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-UZ6BOIAH.js
3281
+ var init_chunk_UZ6BOIAH = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-UZ6BOIAH.js"() {
3282
+ init_chunk_WIMGWYZL();
3283
+ } });
3284
+
3285
+ //#endregion
3286
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-KI5UAETW.js
3287
+ var init_chunk_KI5UAETW = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-KI5UAETW.js"() {
3288
+ init_chunk_WIMGWYZL();
3289
+ } });
3290
+
3291
+ //#endregion
3292
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GYH2VCL4.js
3293
+ var init_chunk_GYH2VCL4 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GYH2VCL4.js"() {
3294
+ init_chunk_WIMGWYZL();
3295
+ } });
3296
+
3297
+ //#endregion
3298
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-26ILFTOP.js
3299
+ var init_chunk_26ILFTOP = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-26ILFTOP.js"() {
3300
+ init_chunk_SGAFZVQH();
3301
+ init_chunk_WIMGWYZL();
3302
+ } });
3303
+
3304
+ //#endregion
3305
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-2KIKGHAO.js
3306
+ var init_chunk_2KIKGHAO = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-2KIKGHAO.js"() {
3307
+ init_chunk_WIMGWYZL();
3308
+ } });
3309
+
3310
+ //#endregion
3311
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-YVMG2XEU.js
3312
+ var init_chunk_YVMG2XEU = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-YVMG2XEU.js"() {} });
3313
+
3314
+ //#endregion
3315
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ZP6YI2JT.js
3316
+ var init_chunk_ZP6YI2JT = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ZP6YI2JT.js"() {
3317
+ init_chunk_ANXBDSUI();
3318
+ init_chunk_WIMGWYZL();
3319
+ } });
3320
+
3321
+ //#endregion
3322
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OCJMJQKO.js
3323
+ var init_chunk_OCJMJQKO = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OCJMJQKO.js"() {
3324
+ init_chunk_P5WDBFN2();
3325
+ init_chunk_EMIEIAAH();
3326
+ } });
3327
+
3328
+ //#endregion
3329
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-J7R2OSHS.js
3330
+ var init_chunk_J7R2OSHS = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-J7R2OSHS.js"() {
3331
+ init_chunk_WIMGWYZL();
3332
+ } });
3333
+
3334
+ //#endregion
3335
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GIKF2ZNG.js
3336
+ var init_chunk_GIKF2ZNG = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GIKF2ZNG.js"() {
3337
+ init_chunk_WIMGWYZL();
3338
+ } });
3339
+
3340
+ //#endregion
3341
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XWBKJZIP.js
3342
+ var init_chunk_XWBKJZIP = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XWBKJZIP.js"() {
3343
+ init_chunk_WIMGWYZL();
3344
+ } });
3345
+
3346
+ //#endregion
3347
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XHPQVWZM.js
3348
+ var init_chunk_XHPQVWZM = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XHPQVWZM.js"() {
3349
+ init_chunk_WIMGWYZL();
3350
+ } });
3351
+
3352
+ //#endregion
3353
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-2OQBQB3V.js
3354
+ var init_chunk_2OQBQB3V = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-2OQBQB3V.js"() {
3355
+ init_chunk_WIMGWYZL();
3356
+ } });
3357
+
3358
+ //#endregion
3359
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-H4OTHZJB.js
3360
+ var init_chunk_H4OTHZJB = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-H4OTHZJB.js"() {
3361
+ init_chunk_WIMGWYZL();
3362
+ } });
3363
+
3364
+ //#endregion
3365
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XZ6COQKM.js
3366
+ function a$13(n$7, t$14, e$5) {
3367
+ return n$7(e$5[0]) ? (r$12) => t$14(r$12, ...e$5) : t$14(...e$5);
3368
+ }
3369
+ function u$12(...n$7) {
3370
+ return a$13(s$8, o$9, n$7);
3371
+ }
3372
+ function o$9(n$7, ...t$14) {
3373
+ for (let [e$5, r$12] of t$14) if (e$5(n$7)) return r$12(n$7);
3374
+ throw new Error("conditional: data failed for all cases");
3375
+ }
3376
+ function s$8(n$7) {
3377
+ if (!Array.isArray(n$7)) return !1;
3378
+ let [t$14, e$5, ...r$12] = n$7;
3379
+ return typeof t$14 == "function" && t$14.length <= 1 && typeof e$5 == "function" && e$5.length <= 1 && r$12.length === 0;
3380
+ }
3381
+ function R(n$7 = d$11) {
3382
+ return [T$7, n$7];
3383
+ }
3384
+ var x$2, T$7, d$11;
3385
+ var init_chunk_XZ6COQKM = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-XZ6COQKM.js"() {
3386
+ x$2 = Object.assign(u$12, { defaultCase: R });
3387
+ T$7 = () => !0, d$11 = () => {};
3388
+ } });
3389
+
3390
+ //#endregion
3391
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-T5XG33UI.js
3392
+ var init_chunk_T5XG33UI = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-T5XG33UI.js"() {} });
3393
+
3394
+ //#endregion
3395
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ZTNFU7RH.js
3396
+ var init_chunk_ZTNFU7RH = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-ZTNFU7RH.js"() {
3397
+ init_chunk_WIMGWYZL();
3398
+ } });
3399
+
3400
+ //#endregion
3401
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OIQJEOF7.js
3402
+ var init_chunk_OIQJEOF7 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-OIQJEOF7.js"() {} });
3403
+
3404
+ //#endregion
3405
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GKXRNLHM.js
3406
+ var init_chunk_GKXRNLHM = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-GKXRNLHM.js"() {
3407
+ init_chunk_LFJW7BOT();
3408
+ init_chunk_ANXBDSUI();
3409
+ } });
3410
+
3411
+ //#endregion
3412
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-NYIWN625.js
3413
+ var init_chunk_NYIWN625 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-NYIWN625.js"() {
3414
+ init_chunk_LFJW7BOT();
3415
+ init_chunk_ANXBDSUI();
3416
+ } });
3417
+
3418
+ //#endregion
3419
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WPTI67A4.js
3420
+ var init_chunk_WPTI67A4 = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WPTI67A4.js"() {
3421
+ init_chunk_WIMGWYZL();
3422
+ } });
3423
+
3424
+ //#endregion
3425
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-W2ARC73P.js
3426
+ var init_chunk_W2ARC73P = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-W2ARC73P.js"() {
3427
+ init_chunk_WIMGWYZL();
3428
+ } });
3429
+
3430
+ //#endregion
3431
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3UBK2BVM.js
3432
+ var init_chunk_3UBK2BVM = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-3UBK2BVM.js"() {
3433
+ init_chunk_WIMGWYZL();
3434
+ } });
3435
+
3436
+ //#endregion
3437
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VFECZ57D.js
3438
+ var init_chunk_VFECZ57D = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VFECZ57D.js"() {
3439
+ init_chunk_WIMGWYZL();
3440
+ } });
3441
+
3442
+ //#endregion
3443
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VG2NVNXT.js
3444
+ var init_chunk_VG2NVNXT = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-VG2NVNXT.js"() {
3445
+ init_chunk_WIMGWYZL();
3446
+ } });
3447
+
3448
+ //#endregion
3449
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-HJSE36CH.js
3450
+ var init_chunk_HJSE36CH = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-HJSE36CH.js"() {
3451
+ init_chunk_FZHIMCK6();
3452
+ init_chunk_WIMGWYZL();
3453
+ } });
3454
+
3455
+ //#endregion
3456
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WFMWIRTS.js
3457
+ var init_chunk_WFMWIRTS = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-WFMWIRTS.js"() {
3458
+ init_chunk_WIMGWYZL();
3459
+ } });
3460
+
3461
+ //#endregion
3462
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-UHDYHGOF.js
3463
+ var init_chunk_UHDYHGOF = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/chunk-UHDYHGOF.js"() {
3464
+ init_chunk_WIMGWYZL();
3465
+ } });
3466
+
3467
+ //#endregion
3468
+ //#region ../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/index.js
3469
+ var init_dist = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/remeda/dist/index.js"() {
3470
+ init_chunk_7ZI6JRPB();
3471
+ init_chunk_OXJMERKM();
3472
+ init_chunk_BSLJB6JE();
3473
+ init_chunk_NJXNQM3G();
3474
+ init_chunk_6RKHJ2CP();
3475
+ init_chunk_QDGUNRDA();
3476
+ init_chunk_MYLLMFC7();
3477
+ init_chunk_N4JUOEMS();
3478
+ init_chunk_YRJ25UV2();
3479
+ init_chunk_Q5ASJ5N7();
3480
+ init_chunk_WZOX4VKU();
3481
+ init_chunk_Y3VKZ3P5();
3482
+ init_chunk_ZRKG4NSC();
3483
+ init_chunk_QJLMYOTX();
3484
+ init_chunk_DM52TTEP();
3485
+ init_chunk_2P44HXVH();
3486
+ init_chunk_ZJS5DNQW();
3487
+ init_chunk_AHDTEY6L();
3488
+ init_chunk_4UEQNEAO();
3489
+ init_chunk_T4PLMLCP();
3490
+ init_chunk_SSDL7ATG();
3491
+ init_chunk_EVIH3PFY();
3492
+ init_chunk_RBODUO3Q();
3493
+ init_chunk_S52RID4A();
3494
+ init_chunk_WWPMIW33();
3495
+ init_chunk_57KROWWS();
3496
+ init_chunk_V6HCOU6T();
3497
+ init_chunk_ALS6JP7S();
3498
+ init_chunk_QTQTP2VB();
3499
+ init_chunk_NFFV4IQT();
3500
+ init_chunk_FDH4IRIM();
3501
+ init_chunk_YDIA5YQI();
3502
+ init_chunk_6OEKBHIX();
3503
+ init_chunk_GDGEDZJG();
3504
+ init_chunk_XE3XIKTJ();
3505
+ init_chunk_HVJXDSOP();
3506
+ init_chunk_MSOX5OUI();
3507
+ init_chunk_C4OZY4Z2();
3508
+ init_chunk_P2PQB7KO();
3509
+ init_chunk_UHZ33J57();
3510
+ init_chunk_6RL33UFT();
3511
+ init_chunk_YNNF733L();
3512
+ init_chunk_4YLWJIJ6();
3513
+ init_chunk_KVHF7QRD();
3514
+ init_chunk_UA6DVSZ3();
3515
+ init_chunk_G5B2IDWB();
3516
+ init_chunk_3FKP6OOU();
3517
+ init_chunk_VFSOOVKJ();
3518
+ init_chunk_K3UJMX27();
3519
+ init_chunk_LE6I3KC6();
3520
+ init_chunk_ENS7GPLZ();
3521
+ init_chunk_DSLWSGID();
3522
+ init_chunk_R72GEKLP();
3523
+ init_chunk_3IFJP4R5();
3524
+ init_chunk_J4EKWFDW();
3525
+ init_chunk_PGMPBC5Q();
3526
+ init_chunk_GGYFZTDW();
3527
+ init_chunk_EDOGCRPU();
3528
+ init_chunk_4NRWDO7P();
3529
+ init_chunk_W6ZHPGFP();
3530
+ init_chunk_J3IRE4DI();
3531
+ init_chunk_RZUYD7QY();
3532
+ init_chunk_A3PVMI4K();
3533
+ init_chunk_4ZFFLFWV();
3534
+ init_chunk_C6IMN7SF();
3535
+ init_chunk_NS6ZBRLP();
3536
+ init_chunk_FMPZ2CLX();
3537
+ init_chunk_3ZJAREUD();
3538
+ init_chunk_ZXVA7VDE();
3539
+ init_chunk_KQRZQWDE();
3540
+ init_chunk_567G5ZXL();
3541
+ init_chunk_3D3RWAVJ();
3542
+ init_chunk_K2FFNW24();
3543
+ init_chunk_5S4PYKVY();
3544
+ init_chunk_5WKPQX7L();
3545
+ init_chunk_PDQFB3TV();
3546
+ init_chunk_XMLUDZIW();
3547
+ init_chunk_GMMLSO2N();
3548
+ init_chunk_5NQBDF4H();
3549
+ init_chunk_PFSVCZNE();
3550
+ init_chunk_VO5MRBXA();
3551
+ init_chunk_XUX3ZEXI();
3552
+ init_chunk_KZIKCQ56();
3553
+ init_chunk_P3DXEVTH();
3554
+ init_chunk_6GTAPB47();
3555
+ init_chunk_NMC53JVB();
3556
+ init_chunk_BZNENX2T();
3557
+ init_chunk_PULGOXDA();
3558
+ init_chunk_OLNQBNAJ();
3559
+ init_chunk_QOEIYQAG();
3560
+ init_chunk_SFZGYJFI();
3561
+ init_chunk_JJZ7E4YG();
3562
+ init_chunk_VCYTMP4D();
3563
+ init_chunk_CAZXBO45();
3564
+ init_chunk_ENOHV5LT();
3565
+ init_chunk_U753ZCO5();
3566
+ init_chunk_5DU4ITSF();
3567
+ init_chunk_GK5I7C4J();
3568
+ init_chunk_HV3WACXG();
3569
+ init_chunk_JK3VNB42();
3570
+ init_chunk_T45O7BFY();
3571
+ init_chunk_OP5ZF26D();
3572
+ init_chunk_BO3LQZNF();
3573
+ init_chunk_I3D2BSWJ();
3574
+ init_chunk_7QX4DO53();
3575
+ init_chunk_VMV5GVZ5();
3576
+ init_chunk_OWH4IQQW();
3577
+ init_chunk_ETADWPSK();
3578
+ init_chunk_OFZGPGDZ();
3579
+ init_chunk_R7PILVSQ();
3580
+ init_chunk_HGKLN5KY();
3581
+ init_chunk_HJSE3ESO();
3582
+ init_chunk_B6PG574O();
3583
+ init_chunk_ICBBHOCR();
3584
+ init_chunk_DAE7EJQ2();
3585
+ init_chunk_XPCYQPKH();
3586
+ init_chunk_FRNNS7AX();
3587
+ init_chunk_QJOWZFYO();
3588
+ init_chunk_VIBSXWWU();
3589
+ init_chunk_T4H4IOYC();
3590
+ init_chunk_GPLTWAVR();
3591
+ init_chunk_PIX5OHMW();
3592
+ init_chunk_VVM5DH6Z();
3593
+ init_chunk_PVYOMZ3I();
3594
+ init_chunk_P6LAFGAN();
3595
+ init_chunk_MQDP6CFS();
3596
+ init_chunk_UZ6BOIAH();
3597
+ init_chunk_KI5UAETW();
3598
+ init_chunk_GYH2VCL4();
3599
+ init_chunk_26ILFTOP();
3600
+ init_chunk_2KIKGHAO();
3601
+ init_chunk_YVMG2XEU();
3602
+ init_chunk_ZP6YI2JT();
3603
+ init_chunk_OCJMJQKO();
3604
+ init_chunk_P5WDBFN2();
3605
+ init_chunk_OAMXQXGR();
3606
+ init_chunk_J7R2OSHS();
3607
+ init_chunk_GIKF2ZNG();
3608
+ init_chunk_XWBKJZIP();
3609
+ init_chunk_XHPQVWZM();
3610
+ init_chunk_2OQBQB3V();
3611
+ init_chunk_H4OTHZJB();
3612
+ init_chunk_XZ6COQKM();
3613
+ init_chunk_T5XG33UI();
3614
+ init_chunk_ZTNFU7RH();
3615
+ init_chunk_OIQJEOF7();
3616
+ init_chunk_GKXRNLHM();
3617
+ init_chunk_NYIWN625();
3618
+ init_chunk_LFJW7BOT();
3619
+ init_chunk_3GOCSNFN();
3620
+ init_chunk_WPTI67A4();
3621
+ init_chunk_W2ARC73P();
3622
+ init_chunk_3UBK2BVM();
3623
+ init_chunk_VFECZ57D();
3624
+ init_chunk_VG2NVNXT();
3625
+ init_chunk_HJSE36CH();
3626
+ init_chunk_WFMWIRTS();
3627
+ init_chunk_UHDYHGOF();
3628
+ init_chunk_WIMGWYZL();
3629
+ } });
3630
+
3631
+ //#endregion
3632
+ //#region src/utils/plugin/index.ts
3633
+ var isPluginHookName;
3634
+ var init_plugin$1 = __esm({ "src/utils/plugin/index.ts"() {
3635
+ init_plugin$2();
3636
+ isPluginHookName = function() {
3637
+ const PLUGIN_HOOK_NAMES_SET = new Set(ENUMERATED_PLUGIN_HOOK_NAMES);
3638
+ return function isPluginHookName$1(hookName) {
3639
+ return PLUGIN_HOOK_NAMES_SET.has(hookName);
3640
+ };
3641
+ }();
3642
+ } });
3643
+
3644
+ //#endregion
3645
+ //#region src/utils/compose-js-plugins.ts
3646
+ function isUnsupportedHooks(hookName) {
3647
+ return unsupportedHooks.has(hookName);
3648
+ }
3649
+ function createComposedPlugin(plugins) {
3650
+ const names = [];
3651
+ const batchedHooks = {};
3652
+ plugins.forEach((plugin, index) => {
3653
+ const pluginName = plugin.name || `Anonymous(index: ${index})`;
3654
+ names.push(pluginName);
3655
+ t$5(plugin).forEach((pluginProp) => {
3656
+ if (isUnsupportedHooks(pluginProp)) throw new Error(`Failed to compose js plugins. Plugin ${pluginName} has an unsupported hook: ${pluginProp}`);
3657
+ if (!isPluginHookName(pluginProp)) return;
3658
+ switch (pluginProp) {
3659
+ case "buildStart": {
3660
+ const handlers = batchedHooks.buildStart ?? [];
3661
+ batchedHooks.buildStart = handlers;
3662
+ if (plugin.buildStart) handlers.push([plugin.buildStart, plugin]);
3663
+ break;
3664
+ }
3665
+ case "load": {
3666
+ const handlers = batchedHooks.load ?? [];
3667
+ batchedHooks.load = handlers;
3668
+ if (plugin.load) handlers.push([plugin.load, plugin]);
3669
+ break;
3670
+ }
3671
+ case "transform": {
3672
+ const handlers = batchedHooks.transform ?? [];
3673
+ batchedHooks.transform = handlers;
3674
+ if (plugin.transform) handlers.push([plugin.transform, plugin]);
3675
+ break;
3676
+ }
3677
+ case "resolveId": {
3678
+ const handlers = batchedHooks.resolveId ?? [];
3679
+ batchedHooks.resolveId = handlers;
3680
+ if (plugin.resolveId) handlers.push([plugin.resolveId, plugin]);
3681
+ break;
3682
+ }
3683
+ case "buildEnd": {
3684
+ const handlers = batchedHooks.buildEnd ?? [];
3685
+ batchedHooks.buildEnd = handlers;
3686
+ if (plugin.buildEnd) handlers.push([plugin.buildEnd, plugin]);
3687
+ break;
3688
+ }
3689
+ case "renderChunk": {
3690
+ const handlers = batchedHooks.renderChunk ?? [];
3691
+ batchedHooks.renderChunk = handlers;
3692
+ if (plugin.renderChunk) handlers.push([plugin.renderChunk, plugin]);
3693
+ break;
3694
+ }
3695
+ case "banner":
3696
+ case "footer":
3697
+ case "intro":
3698
+ case "outro": {
3699
+ const hook = plugin[pluginProp];
3700
+ if (hook) (batchedHooks[pluginProp] ??= []).push([hook, plugin]);
3701
+ break;
3702
+ }
3703
+ case "closeBundle": {
3704
+ const handlers = batchedHooks.closeBundle ?? [];
3705
+ batchedHooks.closeBundle = handlers;
3706
+ if (plugin.closeBundle) handlers.push([plugin.closeBundle, plugin]);
3707
+ break;
3708
+ }
3709
+ case "watchChange": {
3710
+ const handlers = batchedHooks.watchChange ?? [];
3711
+ batchedHooks.watchChange = handlers;
3712
+ if (plugin.watchChange) handlers.push([plugin.watchChange, plugin]);
3713
+ break;
3714
+ }
3715
+ case "closeWatcher": {
3716
+ const handlers = batchedHooks.closeWatcher ?? [];
3717
+ batchedHooks.closeWatcher = handlers;
3718
+ if (plugin.closeWatcher) handlers.push([plugin.closeWatcher, plugin]);
3719
+ break;
3720
+ }
3721
+ default: {}
3722
+ }
3723
+ });
3724
+ });
3725
+ const composed = { name: `Composed(${names.join(", ")})` };
3726
+ const createFixedPluginResolveFnMap = new Map();
3727
+ function applyFixedPluginResolveFn(ctx, plugin) {
3728
+ const createFixedPluginResolveFn = createFixedPluginResolveFnMap.get(plugin);
3729
+ if (createFixedPluginResolveFn) ctx.resolve = createFixedPluginResolveFn(ctx, ctx.resolve.bind(ctx));
3730
+ return ctx;
3731
+ }
3732
+ if (batchedHooks.resolveId) {
3733
+ const batchedHandlers = batchedHooks.resolveId;
3734
+ const handlerSymbols = batchedHandlers.map(([_handler, plugin]) => Symbol(plugin.name ?? `Anonymous`));
3735
+ for (let handlerIdx = 0; handlerIdx < batchedHandlers.length; handlerIdx++) {
3736
+ const [_handler, plugin] = batchedHandlers[handlerIdx];
3737
+ const handlerSymbol = handlerSymbols[handlerIdx];
3738
+ const createFixedPluginResolveFn = (ctx, resolve) => {
3739
+ return (source, importer, rawContextResolveOptions) => {
3740
+ const contextResolveOptions = rawContextResolveOptions ?? {};
3741
+ if (contextResolveOptions.skipSelf) {
3742
+ contextResolveOptions[SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF] = handlerSymbol;
3743
+ contextResolveOptions.skipSelf = false;
3744
+ }
3745
+ return resolve(source, importer, contextResolveOptions);
3746
+ };
3747
+ };
3748
+ createFixedPluginResolveFnMap.set(plugin, createFixedPluginResolveFn);
3749
+ }
3750
+ composed.resolveId = async function(source, importer, rawHookResolveIdOptions) {
3751
+ const hookResolveIdOptions = rawHookResolveIdOptions;
3752
+ const symbolForCallerThatSkipSelf = hookResolveIdOptions?.[SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF];
3753
+ for (let handlerIdx = 0; handlerIdx < batchedHandlers.length; handlerIdx++) {
3754
+ const [handler, plugin] = batchedHandlers[handlerIdx];
3755
+ const handlerSymbol = handlerSymbols[handlerIdx];
3756
+ if (symbolForCallerThatSkipSelf === handlerSymbol) continue;
3757
+ const { handler: handlerFn } = normalizeHook(handler);
3758
+ const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), source, importer, rawHookResolveIdOptions);
3759
+ if (!isNullish(result)) return result;
3760
+ }
3761
+ };
3762
+ }
3763
+ t$5(batchedHooks).forEach((hookName) => {
3764
+ switch (hookName) {
3765
+ case "resolveId": break;
3766
+ case "buildStart": {
3767
+ if (batchedHooks.buildStart) {
3768
+ const batchedHandlers = batchedHooks.buildStart;
3769
+ composed.buildStart = async function(options) {
3770
+ await Promise.all(batchedHandlers.map(([handler, plugin]) => {
3771
+ const { handler: handlerFn } = normalizeHook(handler);
3772
+ return handlerFn.call(applyFixedPluginResolveFn(this, plugin), options);
3773
+ }));
3774
+ };
3775
+ }
3776
+ break;
3777
+ }
3778
+ case "load": {
3779
+ if (batchedHooks.load) {
3780
+ const batchedHandlers = batchedHooks.load;
3781
+ composed.load = async function(id) {
3782
+ for (const [handler, plugin] of batchedHandlers) {
3783
+ const { handler: handlerFn } = normalizeHook(handler);
3784
+ const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), id);
3785
+ if (!isNullish(result)) return result;
3786
+ }
3787
+ };
3788
+ }
3789
+ break;
3790
+ }
3791
+ case "transform": {
3792
+ if (batchedHooks.transform) {
3793
+ const batchedHandlers = batchedHooks.transform;
3794
+ composed.transform = async function(initialCode, id, moduleType) {
3795
+ let code = initialCode;
3796
+ let moduleSideEffects = void 0;
3797
+ function updateOutput(newCode, newModuleSideEffects) {
3798
+ code = newCode;
3799
+ moduleSideEffects = newModuleSideEffects ?? void 0;
3800
+ }
3801
+ for (const [handler, plugin] of batchedHandlers) {
3802
+ const { handler: handlerFn } = normalizeHook(handler);
3803
+ this.getCombinedSourcemap = () => {
3804
+ throw new Error(`The getCombinedSourcemap is not implement in transform hook at composedJsPlugins`);
3805
+ };
3806
+ const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), code, id, moduleType);
3807
+ if (!isNullish(result)) {
3808
+ if (typeof result === "string") updateOutput(result);
3809
+ else if (result.code) updateOutput(result.code, result.moduleSideEffects);
3810
+ }
3811
+ }
3812
+ return {
3813
+ code,
3814
+ moduleSideEffects
3815
+ };
3816
+ };
3817
+ }
3818
+ break;
3819
+ }
3820
+ case "buildEnd": {
3821
+ if (batchedHooks.buildEnd) {
3822
+ const batchedHandlers = batchedHooks.buildEnd;
3823
+ composed.buildEnd = async function(err) {
3824
+ await Promise.all(batchedHandlers.map(([handler, plugin]) => {
3825
+ const { handler: handlerFn } = normalizeHook(handler);
3826
+ return handlerFn.call(applyFixedPluginResolveFn(this, plugin), err);
3827
+ }));
3828
+ };
3829
+ }
3830
+ break;
3831
+ }
3832
+ case "renderChunk": {
3833
+ if (batchedHooks.renderChunk) {
3834
+ const batchedHandlers = batchedHooks.renderChunk;
3835
+ composed.renderChunk = async function(code, chunk, options, meta) {
3836
+ for (const [handler, plugin] of batchedHandlers) {
3837
+ const { handler: handlerFn } = normalizeHook(handler);
3838
+ const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), code, chunk, options, meta);
3839
+ if (!isNullish(result)) return result;
3840
+ }
3841
+ };
3842
+ }
3843
+ break;
3844
+ }
3845
+ case "banner":
3846
+ case "footer":
3847
+ case "intro":
3848
+ case "outro": {
3849
+ const hooks = batchedHooks[hookName];
3850
+ if (hooks?.length) composed[hookName] = async function(chunk) {
3851
+ const ret = [];
3852
+ for (const [hook, plugin] of hooks) {
3853
+ const { handler } = normalizeHook(hook);
3854
+ ret.push(typeof handler === "string" ? handler : await handler.call(applyFixedPluginResolveFn(this, plugin), chunk));
3855
+ }
3856
+ return ret.join("\n");
3857
+ };
3858
+ break;
3859
+ }
3860
+ case "closeBundle": {
3861
+ if (batchedHooks.closeBundle) {
3862
+ const batchedHandlers = batchedHooks.closeBundle;
3863
+ composed.closeBundle = async function() {
3864
+ await Promise.all(batchedHandlers.map(([handler, plugin]) => {
3865
+ const { handler: handlerFn } = normalizeHook(handler);
3866
+ return handlerFn.call(applyFixedPluginResolveFn(this, plugin));
3867
+ }));
3868
+ };
3869
+ }
3870
+ break;
3871
+ }
3872
+ case "watchChange": {
3873
+ if (batchedHooks.watchChange) {
3874
+ const batchedHandlers = batchedHooks.watchChange;
3875
+ composed.watchChange = async function(id, event) {
3876
+ await Promise.all(batchedHandlers.map(([handler, plugin]) => {
3877
+ const { handler: handlerFn } = normalizeHook(handler);
3878
+ return handlerFn.call(applyFixedPluginResolveFn(this, plugin), id, event);
3879
+ }));
3880
+ };
3881
+ }
3882
+ break;
3883
+ }
3884
+ case "closeWatcher": {
3885
+ if (batchedHooks.closeWatcher) {
3886
+ const batchedHandlers = batchedHooks.closeWatcher;
3887
+ composed.closeWatcher = async function() {
3888
+ await Promise.all(batchedHandlers.map(([handler, plugin]) => {
3889
+ const { handler: handlerFn } = normalizeHook(handler);
3890
+ return handlerFn.call(applyFixedPluginResolveFn(this, plugin));
3891
+ }));
3892
+ };
3893
+ }
3894
+ break;
3895
+ }
3896
+ default: {}
3897
+ }
3898
+ });
3899
+ return composed;
3900
+ }
3901
+ function isComposablePlugin(plugin) {
3902
+ if (plugin instanceof BuiltinPlugin) return false;
3903
+ if ("_parallel" in plugin) return false;
3904
+ const hasNotComposablePattern = t$5(plugin).some((hookName) => {
3905
+ if (!isPluginHookName(hookName)) return false;
3906
+ const OK_TO_COMPOSE = false;
3907
+ if (isUnsupportedHooks(hookName)) return !OK_TO_COMPOSE;
3908
+ if (plugin[hookName]) {
3909
+ const { meta } = normalizeHook(plugin[hookName]);
3910
+ if (meta.order === "pre" || meta.order === "post") return !OK_TO_COMPOSE;
3911
+ }
3912
+ return OK_TO_COMPOSE;
3913
+ });
3914
+ if (hasNotComposablePattern) return false;
3915
+ return true;
3916
+ }
3917
+ function composeJsPlugins(plugins) {
3918
+ const newPlugins = [];
3919
+ const toBeComposed = [];
3920
+ plugins.forEach((plugin) => {
3921
+ if (isComposablePlugin(plugin)) toBeComposed.push(plugin);
3922
+ else {
3923
+ if (toBeComposed.length > 0) {
3924
+ if (toBeComposed.length > 1) newPlugins.push(createComposedPlugin(toBeComposed));
3925
+ else newPlugins.push(toBeComposed[0]);
3926
+ toBeComposed.length = 0;
3927
+ }
3928
+ newPlugins.push(plugin);
3929
+ }
3930
+ });
3931
+ if (toBeComposed.length > 0) {
3932
+ if (toBeComposed.length > 1) newPlugins.push(createComposedPlugin(toBeComposed));
3933
+ else newPlugins.push(toBeComposed[0]);
3934
+ toBeComposed.length = 0;
3935
+ }
3936
+ return newPlugins;
3937
+ }
3938
+ var unsupportedHookName, unsupportedHooks;
3939
+ var init_compose_js_plugins = __esm({ "src/utils/compose-js-plugins.ts"() {
3940
+ init_dist();
3941
+ init_constructors();
3942
+ init_plugin_context$1();
3943
+ init_misc();
3944
+ init_normalize_hook();
3945
+ init_plugin$1();
3946
+ unsupportedHookName = [
3947
+ "augmentChunkHash",
3948
+ "generateBundle",
3949
+ "moduleParsed",
3950
+ "onLog",
3951
+ "options",
3952
+ "outputOptions",
3953
+ "renderError",
3954
+ "renderStart",
3955
+ "resolveDynamicImport",
3956
+ "writeBundle"
3957
+ ];
3958
+ unsupportedHooks = new Set(unsupportedHookName);
3959
+ } });
3960
+
3961
+ //#endregion
3962
+ //#region src/utils/initialize-parallel-plugins.ts
3963
+ async function initializeParallelPlugins(plugins) {
3964
+ const pluginInfos = [];
3965
+ for (const [index, plugin] of plugins.entries()) if ("_parallel" in plugin) {
3966
+ const { fileUrl, options } = plugin._parallel;
3967
+ pluginInfos.push({
3968
+ index,
3969
+ fileUrl,
3970
+ options
3971
+ });
3972
+ }
3973
+ if (pluginInfos.length <= 0) return void 0;
3974
+ const count = Math.min(availableParallelism(), 8);
3975
+ const parallelJsPluginRegistry = new ParallelJsPluginRegistry(count);
3976
+ const registryId = parallelJsPluginRegistry.id;
3977
+ const workers = await initializeWorkers(registryId, count, pluginInfos);
3978
+ const stopWorkers = async () => {
3979
+ await Promise.all(workers.map((worker) => worker.terminate()));
3980
+ };
3981
+ return {
3982
+ registry: parallelJsPluginRegistry,
3983
+ stopWorkers
3984
+ };
3985
+ }
3986
+ function initializeWorkers(registryId, count, pluginInfos) {
3987
+ return Promise.all(Array.from({ length: count }, (_, i$21) => initializeWorker(registryId, pluginInfos, i$21)));
3988
+ }
3989
+ async function initializeWorker(registryId, pluginInfos, threadNumber) {
3990
+ const urlString = import.meta.resolve("#parallel-plugin-worker");
3991
+ const workerData$1 = {
3992
+ registryId,
3993
+ pluginInfos,
3994
+ threadNumber
3995
+ };
3996
+ let worker;
3997
+ try {
3998
+ worker = new Worker(new URL(urlString), { workerData: workerData$1 });
3999
+ worker.unref();
4000
+ await new Promise((resolve, reject) => {
4001
+ worker.once("message", async (message) => {
4002
+ if (message.type === "error") reject(message.error);
4003
+ else resolve();
4004
+ });
4005
+ });
4006
+ return worker;
4007
+ } catch (e$5) {
4008
+ worker?.terminate();
4009
+ throw e$5;
4010
+ }
4011
+ }
4012
+ var init_initialize_parallel_plugins = __esm({ "src/utils/initialize-parallel-plugins.ts"() {} });
4013
+
4014
+ //#endregion
4015
+ //#region src/utils/create-bundler-option.ts
4016
+ async function createBundlerOptions(inputOptions, outputOptions, watchMode, isClose) {
4017
+ const inputPlugins = await normalizePluginOption(inputOptions.plugins);
4018
+ const outputPlugins = await normalizePluginOption(outputOptions.plugins);
4019
+ const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
4020
+ const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel, watchMode);
4021
+ if (!isClose) outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions, onLog, logLevel, watchMode);
4022
+ if (outputOptions.minify === true) onLog(LOG_LEVEL_WARN, logMinifyWarning());
4023
+ const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
4024
+ let plugins = [...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX), ...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)];
4025
+ if (inputOptions.experimental?.enableComposingJsPlugins ?? false) plugins = composeJsPlugins(plugins);
4026
+ const parallelPluginInitResult = await initializeParallelPlugins(plugins);
4027
+ try {
4028
+ const bindingInputOptions = bindingifyInputOptions(plugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode);
4029
+ const bindingOutputOptions = bindingifyOutputOptions(outputOptions);
4030
+ return {
4031
+ bundlerOptions: {
4032
+ inputOptions: bindingInputOptions,
4033
+ outputOptions: bindingOutputOptions,
4034
+ parallelPluginsRegistry: parallelPluginInitResult?.registry
4035
+ },
4036
+ inputOptions,
4037
+ onLog,
4038
+ stopWorkers: parallelPluginInitResult?.stopWorkers
4039
+ };
4040
+ } catch (e$5) {
4041
+ await parallelPluginInitResult?.stopWorkers();
4042
+ throw e$5;
4043
+ }
4044
+ }
4045
+ var init_create_bundler_option = __esm({ "src/utils/create-bundler-option.ts"() {
4046
+ init_logger();
4047
+ init_logging();
4048
+ init_logs();
4049
+ init_plugin_driver();
4050
+ init_bindingify_input_options();
4051
+ init_bindingify_output_options();
4052
+ init_compose_js_plugins();
4053
+ init_initialize_parallel_plugins();
4054
+ init_normalize_plugin_option();
4055
+ } });
4056
+
4057
+ //#endregion
4058
+ //#region src/utils/create-bundler.ts
4059
+ async function createBundler(inputOptions, outputOptions, isClose) {
4060
+ const option = await createBundlerOptions(inputOptions, outputOptions, false, isClose);
4061
+ if (asyncRuntimeShutdown) startAsyncRuntime();
4062
+ try {
4063
+ return {
4064
+ bundler: new Bundler(option.bundlerOptions),
4065
+ stopWorkers: option.stopWorkers,
4066
+ shutdown: () => {
4067
+ shutdownAsyncRuntime();
4068
+ asyncRuntimeShutdown = true;
4069
+ }
4070
+ };
4071
+ } catch (e$5) {
4072
+ await option.stopWorkers?.();
4073
+ throw e$5;
4074
+ }
4075
+ }
4076
+ var asyncRuntimeShutdown;
4077
+ var init_create_bundler = __esm({ "src/utils/create-bundler.ts"() {
4078
+ init_create_bundler_option();
4079
+ asyncRuntimeShutdown = false;
4080
+ } });
4081
+
4082
+ //#endregion
4083
+ //#region src/api/rolldown/rolldown-build.ts
4084
+ var RolldownBuild;
4085
+ var init_rolldown_build = __esm({ "src/api/rolldown/rolldown-build.ts"() {
4086
+ init_create_bundler();
4087
+ init_transform_to_rollup_output();
4088
+ init_validator();
4089
+ Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
4090
+ RolldownBuild = class {
4091
+ #inputOptions;
4092
+ #bundler;
4093
+ constructor(inputOptions) {
4094
+ this.#inputOptions = inputOptions;
4095
+ }
4096
+ get closed() {
4097
+ return this.#bundler?.bundler.closed ?? false;
4098
+ }
4099
+ async #getBundlerWithStopWorker(outputOptions, isClose) {
4100
+ if (this.#bundler) await this.#bundler.stopWorkers?.();
4101
+ return this.#bundler = await createBundler(this.#inputOptions, outputOptions, isClose);
4102
+ }
4103
+ async generate(outputOptions = {}) {
4104
+ validateOption("output", outputOptions);
4105
+ const { bundler } = await this.#getBundlerWithStopWorker(outputOptions);
4106
+ const output = await bundler.generate();
4107
+ return transformToRollupOutput(output);
4108
+ }
4109
+ async write(outputOptions = {}) {
4110
+ validateOption("output", outputOptions);
4111
+ const { bundler } = await this.#getBundlerWithStopWorker(outputOptions);
4112
+ const output = await bundler.write();
4113
+ return transformToRollupOutput(output);
4114
+ }
4115
+ async close() {
4116
+ const { bundler, stopWorkers, shutdown } = await this.#getBundlerWithStopWorker({}, true);
4117
+ await stopWorkers?.();
4118
+ await bundler.close();
4119
+ shutdown();
4120
+ }
4121
+ async [Symbol.asyncDispose]() {
4122
+ await this.close();
4123
+ }
4124
+ async generateHmrPatch(changedFiles) {
4125
+ return this.#bundler?.bundler.generateHmrPatch(changedFiles);
4126
+ }
4127
+ get watchFiles() {
4128
+ return this.#bundler?.bundler.watchFiles ?? [];
4129
+ }
4130
+ };
4131
+ } });
4132
+
4133
+ //#endregion
4134
+ //#region src/api/rolldown/index.ts
4135
+ var rolldown;
4136
+ var init_rolldown = __esm({ "src/api/rolldown/index.ts"() {
4137
+ init_plugin_driver();
4138
+ init_validator();
4139
+ init_rolldown_build();
4140
+ rolldown = async (input) => {
4141
+ validateOption("input", input);
4142
+ const inputOptions = await PluginDriver.callOptionsHook(input);
4143
+ return new RolldownBuild(inputOptions);
4144
+ };
4145
+ } });
4146
+
4147
+ //#endregion
4148
+ //#region src/api/build.ts
4149
+ async function build(options) {
4150
+ if (Array.isArray(options)) return Promise.all(options.map((opts) => build(opts)));
4151
+ else {
4152
+ const { output, write = true,...inputOptions } = options;
4153
+ const build$1 = await rolldown(inputOptions);
4154
+ try {
4155
+ if (write) return await build$1.write(output);
4156
+ else return await build$1.generate(output);
4157
+ } finally {
4158
+ await build$1.close();
4159
+ }
4160
+ }
4161
+ }
4162
+ var init_build = __esm({ "src/api/build.ts"() {
4163
+ init_rolldown();
4164
+ } });
4165
+
4166
+ //#endregion
4167
+ //#region src/api/watch/watch-emitter.ts
4168
+ var WatcherEmitter;
4169
+ var init_watch_emitter = __esm({ "src/api/watch/watch-emitter.ts"() {
4170
+ init_error();
4171
+ WatcherEmitter = class {
4172
+ listeners = new Map();
4173
+ timer;
4174
+ constructor() {
4175
+ this.timer = setInterval(
4176
+ () => {},
4177
+ 1e9
4178
+ /* Low power usage */
4179
+ );
4180
+ }
4181
+ on(event, listener) {
4182
+ const listeners = this.listeners.get(event);
4183
+ if (listeners) listeners.push(listener);
4184
+ else this.listeners.set(event, [listener]);
4185
+ return this;
4186
+ }
4187
+ async onEvent(event) {
4188
+ const listeners = this.listeners.get(event.eventKind());
4189
+ if (listeners) switch (event.eventKind()) {
4190
+ case "close":
4191
+ case "restart":
4192
+ for (const listener of listeners) await listener();
4193
+ break;
4194
+ case "event":
4195
+ for (const listener of listeners) {
4196
+ const code = event.bundleEventKind();
4197
+ switch (code) {
4198
+ case "BUNDLE_END":
4199
+ const { duration, output } = event.bundleEndData();
4200
+ await listener({
4201
+ code: "BUNDLE_END",
4202
+ duration,
4203
+ output: [output]
4204
+ });
4205
+ break;
4206
+ case "ERROR":
4207
+ const errors = event.errors();
4208
+ await listener({
4209
+ code: "ERROR",
4210
+ error: normalizeErrors(errors)
4211
+ });
4212
+ break;
4213
+ default:
4214
+ await listener({ code });
4215
+ break;
4216
+ }
4217
+ }
4218
+ break;
4219
+ case "change":
4220
+ for (const listener of listeners) {
4221
+ const { path: path$1, kind } = event.watchChangeData();
4222
+ await listener(path$1, { event: kind });
4223
+ }
4224
+ break;
4225
+ default: throw new Error(`Unknown event: ${event}`);
4226
+ }
4227
+ }
4228
+ async close() {
4229
+ clearInterval(this.timer);
4230
+ }
4231
+ };
4232
+ } });
4233
+
4234
+ //#endregion
4235
+ //#region src/api/watch/watcher.ts
4236
+ async function createWatcher(emitter, input) {
4237
+ const options = arraify(input);
4238
+ const bundlerOptions = await Promise.all(options.map((option) => arraify(option.output || {}).map(async (output) => {
4239
+ const inputOptions = await PluginDriver.callOptionsHook(option, true);
4240
+ return createBundlerOptions(inputOptions, output, true);
4241
+ })).flat());
4242
+ const notifyOptions = getValidNotifyOption(bundlerOptions);
4243
+ const bindingWatcher = new BindingWatcher(bundlerOptions.map((option) => option.bundlerOptions), notifyOptions);
4244
+ const watcher = new Watcher(emitter, bindingWatcher, bundlerOptions.map((option) => option.stopWorkers));
4245
+ watcher.start();
4246
+ }
4247
+ function getValidNotifyOption(bundlerOptions) {
4248
+ let result;
4249
+ for (const option of bundlerOptions) if (option.inputOptions.watch) {
4250
+ const notifyOption = option.inputOptions.watch.notify;
4251
+ if (notifyOption) if (result) {
4252
+ option.onLog(LOG_LEVEL_WARN, logMultiplyNotifyOption());
4253
+ return result;
4254
+ } else result = notifyOption;
4255
+ }
4256
+ }
4257
+ var Watcher;
4258
+ var init_watcher = __esm({ "src/api/watch/watcher.ts"() {
4259
+ init_logging();
4260
+ init_logs();
4261
+ init_plugin_driver();
4262
+ init_create_bundler_option();
4263
+ init_misc();
4264
+ Watcher = class {
4265
+ closed;
4266
+ inner;
4267
+ emitter;
4268
+ stopWorkers;
4269
+ constructor(emitter, inner, stopWorkers) {
4270
+ this.closed = false;
4271
+ this.inner = inner;
4272
+ this.emitter = emitter;
4273
+ const originClose = emitter.close.bind(emitter);
4274
+ emitter.close = async () => {
4275
+ await this.close();
4276
+ originClose();
4277
+ };
4278
+ this.stopWorkers = stopWorkers;
4279
+ }
4280
+ async close() {
4281
+ if (this.closed) return;
4282
+ this.closed = true;
4283
+ for (const stop of this.stopWorkers) await stop?.();
4284
+ await this.inner.close();
4285
+ shutdownAsyncRuntime();
4286
+ }
4287
+ start() {
4288
+ process.nextTick(() => this.inner.start(this.emitter.onEvent.bind(this.emitter)));
4289
+ }
4290
+ };
4291
+ } });
4292
+
4293
+ //#endregion
4294
+ //#region src/api/watch/index.ts
4295
+ var watch;
4296
+ var init_watch = __esm({ "src/api/watch/index.ts"() {
4297
+ init_watch_emitter();
4298
+ init_watcher();
4299
+ watch = (input) => {
4300
+ const emitter = new WatcherEmitter();
4301
+ createWatcher(emitter, input);
4302
+ return emitter;
4303
+ };
4304
+ } });
4305
+
4306
+ //#endregion
4307
+ //#region src/plugin/with-filter.ts
4308
+ function withFilterImpl(pluginOption, filterObjectList) {
4309
+ if (isPromiseLike(pluginOption)) return pluginOption.then((p$3) => withFilter(p$3, filterObjectList));
4310
+ if (pluginOption == false || pluginOption == null) return pluginOption;
4311
+ if (Array.isArray(pluginOption)) return pluginOption.map((p$3) => withFilter(p$3, filterObjectList));
4312
+ let plugin = pluginOption;
4313
+ let filterObjectIndex = findMatchedFilterObject(plugin.name, filterObjectList);
4314
+ if (filterObjectIndex === -1) return plugin;
4315
+ let filterObject = filterObjectList[filterObjectIndex];
4316
+ Object.keys(plugin).forEach((key) => {
4317
+ switch (key) {
4318
+ case "transform":
4319
+ case "resolveId":
4320
+ case "load":
4321
+ if (!plugin[key]) return;
4322
+ if (typeof plugin[key] === "object") plugin[key].filter = filterObject[key] ?? plugin[key].filter;
4323
+ else plugin[key] = {
4324
+ handler: plugin[key],
4325
+ filter: filterObject[key]
4326
+ };
4327
+ break;
4328
+ default: break;
4329
+ }
4330
+ });
4331
+ return plugin;
4332
+ }
4333
+ function withFilter(pluginOption, filterObject) {
4334
+ return withFilterImpl(pluginOption, arraify(filterObject));
4335
+ }
4336
+ function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
4337
+ if (overrideFilterObjectList.length === 1 && overrideFilterObjectList[0].pluginNamePattern === void 0) return 0;
4338
+ for (let i$21 = 0; i$21 < overrideFilterObjectList.length; i$21++) for (let j$1 = 0; j$1 < (overrideFilterObjectList[i$21].pluginNamePattern ?? []).length; j$1++) {
4339
+ let pattern = overrideFilterObjectList[i$21].pluginNamePattern[j$1];
4340
+ if (typeof pattern === "string" && pattern === pluginName) return i$21;
4341
+ else if (pattern instanceof RegExp && pattern.test(pluginName)) return i$21;
4342
+ }
4343
+ return -1;
4344
+ }
4345
+ var init_with_filter = __esm({ "src/plugin/with-filter.ts"() {
4346
+ init_misc();
4347
+ } });
4348
+
4349
+ //#endregion
4350
+ //#region src/plugin/index.ts
4351
+ var init_plugin = __esm({ "src/plugin/index.ts"() {
4352
+ init_with_filter();
4353
+ } });
4354
+
4355
+ //#endregion
4356
+ //#region src/utils/define-config.ts
4357
+ function defineConfig(config) {
4358
+ return config;
4359
+ }
4360
+ var init_define_config = __esm({ "src/utils/define-config.ts"() {} });
4361
+
4362
+ //#endregion
4363
+ //#region src/index.ts
4364
+ var VERSION;
4365
+ var init_src = __esm({ "src/index.ts"() {
4366
+ init_build();
4367
+ init_rolldown();
4368
+ init_watch();
4369
+ init_plugin();
4370
+ init_define_config();
4371
+ VERSION = version;
4372
+ } });
4373
+
4374
+ //#endregion
4375
+ export { BuiltinPlugin, PluginContextData, VERSION, arraify, bindingifyPlugin, build, buildImportAnalysisPlugin, composeJsPlugins, createBundler, defineConfig, description, dynamicImportVarsPlugin, getInputCliKeys, getJsonSchema, getOutputCliKeys, handleOutputErrors, importGlobPlugin, init_bindingify_plugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_misc, init_normalize_string_or_regex, init_plugin_context_data, init_rolldown, init_src, init_transform_to_rollup_output, init_validator, init_watch, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, rolldown, validateCliOptions, version, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, withFilter };