var InternMap = class extends Map {
	constructor(e, n = keyof) {
		if (super(), Object.defineProperties(this, {
			_intern: { value: /* @__PURE__ */ new Map() },
			_key: { value: n }
		}), e != null) for (let [n, r] of e) this.set(n, r);
	}
	get(e) {
		return super.get(intern_get(this, e));
	}
	has(e) {
		return super.has(intern_get(this, e));
	}
	set(e, n) {
		return super.set(intern_set(this, e), n);
	}
	delete(e) {
		return super.delete(intern_delete(this, e));
	}
};
function intern_get({ _intern: e, _key: n }, r) {
	let i = n(r);
	return e.has(i) ? e.get(i) : r;
}
function intern_set({ _intern: e, _key: n }, r) {
	let i = n(r);
	return e.has(i) ? e.get(i) : (e.set(i, r), r);
}
function intern_delete({ _intern: e, _key: n }, r) {
	let i = n(r);
	return e.has(i) && (r = e.get(i), e.delete(i)), r;
}
function keyof(e) {
	return typeof e == "object" && e ? e.valueOf() : e;
}
export { InternMap };
