import React from "react";
var ErrorBoundary = class extends React.Component {
	constructor(props) {
		super(props);
		this.state = { error: false };
	}
	componentDidCatch() {
		this.setState({ error: true });
	}
	componentDidUpdate(prevProps) {
		if (prevProps.reset !== this.props.reset) this.setState({ error: false });
	}
	render() {
		return this.state.error ? this.props.fallback : this.props.children;
	}
};
var ErrorBoundary_default = ErrorBoundary;
var __rolldown_dynamic_import_helper_default = (glob, path, segments) => {
	const query = path.lastIndexOf("?");
	const v = glob[query === -1 || query < path.lastIndexOf("/") ? path : path.slice(0, query)];
	if (v) return typeof v === "function" ? v() : Promise.resolve(v);
	return new Promise((_, reject) => {
		(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + path + (path.split("/").length !== segments ? ". Note that variables only represent file names one level deep." : ""))));
	});
};
export { ErrorBoundary_default as n, __rolldown_dynamic_import_helper_default as t };

//# sourceMappingURL=_rolldown_dynamic_import_helper.js.map