//#region node_modules/.pnpm/@shikijs+markdown-it@4.2.0/node_modules/@shikijs/markdown-it/dist/core.mjs
function e(e, t, n) {
	let { parseMetaString: r, trimEndingNewline: i = !0, defaultLanguage: a = "text", fallbackLanguage: o } = n, s = t.getLoadedLanguages();
	e.options.highlight = (e, c = "text", l) => {
		c === "" && (c = a), o && !s.includes(c) && (c = o);
		let u = r?.(l, e, c) || {}, d = {
			...n,
			lang: c,
			meta: {
				...n.meta,
				...u,
				__raw: l
			}
		}, f = [];
		return f.push({
			name: "@shikijs/markdown-it:block-class",
			code(e) {
				e.properties.class = `language-${c}`;
			}
		}), i && e.endsWith("\n") && (e = e.slice(0, -1)), t.codeToHtml(e, {
			...d,
			transformers: [...f, ...d.transformers || []]
		});
	};
}
function t(t, n) {
	return function(r) {
		e(r, t, n);
	};
}
//#endregion
export { t as fromHighlighter };
