import { computed as e, ref as t, watch as n } from "vue";
import { deepClone as r, isJsonEqual as i } from "@milaboratories/helpers";
function a(a) {
	let o, s;
	typeof a == "function" ? o = a : (o = a.get, s = a.set);
	let c = t(o());
	return n(o, (e) => {
		i(e, c.value) || (c.value = r(e));
	}, { deep: !0 }), s ? e({
		get: () => c.value,
		set: s
	}) : c;
}
export { a as computedCached };

//# sourceMappingURL=computedCached.js.map