import { import_binding } from "../shared/parse-ast-index-CVCVLNV5.mjs";
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-BUnkpoo3.mjs";
import { pathToFileURL } from "node:url";

//#region src/plugin/parallel-plugin.ts
function defineParallelPlugin(pluginPath) {
	return (options) => {
		return { _parallel: {
			fileUrl: pathToFileURL(pluginPath).href,
			options
		} };
	};
}

//#endregion
//#region src/api/experimental.ts
const experimental_scan = async (input) => {
	const { bundler, stopWorkers } = await createBundler(input, {});
	const output = await bundler.scan();
	handleOutputErrors(output);
	await stopWorkers?.();
};

//#endregion
//#region src/builtin-plugin/transform-plugin.ts
function normalizeEcmaTransformPluginConfig(config) {
	if (!config) return void 0;
	let normalizedConfig = {
		...config,
		exclude: normalizedStringOrRegex(config.exclude),
		include: normalizedStringOrRegex(config.include)
	};
	return normalizedConfig;
}
function transformPlugin(config) {
	return new BuiltinPlugin("builtin:transform", normalizeEcmaTransformPluginConfig(config));
}

//#endregion
//#region src/builtin-plugin/replace-plugin.ts
function replacePlugin(values = {}, options = {}) {
	return new BuiltinPlugin("builtin:replace", {
		...options,
		values
	});
}

//#endregion
//#region src/builtin-plugin/alias-plugin.ts
function aliasPlugin(config) {
	return new BuiltinPlugin("builtin:alias", config);
}

//#endregion
var moduleRunnerTransform = import_binding.moduleRunnerTransform;
var transform = import_binding.transform;
export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };