//#region ../../node_modules/stringify-entities/lib/core.js
var e = /["&'<>`]/g, t = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, n = /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g, r = /[|\\{}()[\]^$+*?.]/g, i = /* @__PURE__ */ new WeakMap();
function a(r, i) {
	if (r = r.replace(i.subset ? o(i.subset) : e, s), i.subset || i.escapeOnly) return r;
	return r.replace(t, a).replace(n, s);
	function a(e, t, n) {
		return i.format((e.charCodeAt(0) - 55296) * 1024 + e.charCodeAt(1) - 56320 + 65536, n.charCodeAt(t + 2), i);
	}
	function s(e, t, n) {
		return i.format(e.charCodeAt(0), n.charCodeAt(t + 1), i);
	}
}
function o(e) {
	let t = i.get(e);
	return t || (t = s(e), i.set(e, t)), t;
}
function s(e) {
	let t = [], n = -1;
	for (; ++n < e.length;) t.push(e[n].replace(r, "\\$&"));
	return RegExp("(?:" + t.join("|") + ")", "g");
}
//#endregion
export { a as core };
