import { visitParents as e } from "../../unist-util-visit-parents/lib/index.js";
//#region ../../node_modules/unist-util-visit/lib/index.js
function t(t, n, r, i) {
	let a, o, s;
	typeof n == "function" && typeof r != "function" ? (o = void 0, s = n, a = r) : (o = n, s = r, a = i), e(t, o, c, a);
	function c(e, t) {
		let n = t[t.length - 1], r = n ? n.children.indexOf(e) : void 0;
		return s(e, r, n);
	}
}
//#endregion
export { t as visit };
