import { InternMap as e } from "../../internmap/src/index.js";
import { initRange as t } from "./init.js";
//#region ../../node_modules/d3-scale/src/ordinal.js
var n = Symbol("implicit");
function r() {
	var i = new e(), a = [], o = [], s = n;
	function c(e) {
		let t = i.get(e);
		if (t === void 0) {
			if (s !== n) return s;
			i.set(e, t = a.push(e) - 1);
		}
		return o[t % o.length];
	}
	return c.domain = function(t) {
		if (!arguments.length) return a.slice();
		a = [], i = new e();
		for (let e of t) i.has(e) || i.set(e, a.push(e) - 1);
		return c;
	}, c.range = function(e) {
		return arguments.length ? (o = Array.from(e), c) : o.slice();
	}, c.unknown = function(e) {
		return arguments.length ? (s = e, c) : s;
	}, c.copy = function() {
		return r(a, o).unknown(s);
	}, t.apply(c, arguments), c;
}
//#endregion
export { r as default, n as implicit };
