//#region ../../node_modules/d3-selection/src/selection/classed.js
function e(e) {
	return e.trim().split(/^|\s+/);
}
function t(e) {
	return e.classList || new n(e);
}
function n(t) {
	this._node = t, this._names = e(t.getAttribute("class") || "");
}
n.prototype = {
	add: function(e) {
		this._names.indexOf(e) < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" ")));
	},
	remove: function(e) {
		var t = this._names.indexOf(e);
		t >= 0 && (this._names.splice(t, 1), this._node.setAttribute("class", this._names.join(" ")));
	},
	contains: function(e) {
		return this._names.indexOf(e) >= 0;
	}
};
function r(e, n) {
	for (var r = t(e), i = -1, a = n.length; ++i < a;) r.add(n[i]);
}
function i(e, n) {
	for (var r = t(e), i = -1, a = n.length; ++i < a;) r.remove(n[i]);
}
function a(e) {
	return function() {
		r(this, e);
	};
}
function o(e) {
	return function() {
		i(this, e);
	};
}
function s(e, t) {
	return function() {
		(t.apply(this, arguments) ? r : i)(this, e);
	};
}
function c(n, r) {
	var i = e(n + "");
	if (arguments.length < 2) {
		for (var c = t(this.node()), l = -1, u = i.length; ++l < u;) if (!c.contains(i[l])) return !1;
		return !0;
	}
	return this.each((typeof r == "function" ? s : r ? a : o)(i, r));
}
//#endregion
export { c as default };
