import { tweenValue as c } from "./tween.js";
import l from "./interpolate.js";
import f from "../../../../../d3-selection@3.0.0/node_modules/d3-selection/src/namespace.js";
import { interpolateTransformSvg as g } from "../../../../../d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js";
function p(t) {
  return function() {
    this.removeAttribute(t);
  };
}
function v(t) {
  return function() {
    this.removeAttributeNS(t.space, t.local);
  };
}
function h(t, e, r) {
  var i, u = r + "", o;
  return function() {
    var n = this.getAttribute(t);
    return n === u ? null : n === i ? o : o = e(i = n, r);
  };
}
function m(t, e, r) {
  var i, u = r + "", o;
  return function() {
    var n = this.getAttributeNS(t.space, t.local);
    return n === u ? null : n === i ? o : o = e(i = n, r);
  };
}
function b(t, e, r) {
  var i, u, o;
  return function() {
    var n, a = r(this), s;
    return a == null ? void this.removeAttribute(t) : (n = this.getAttribute(t), s = a + "", n === s ? null : n === i && s === u ? o : (u = s, o = e(i = n, a)));
  };
}
function A(t, e, r) {
  var i, u, o;
  return function() {
    var n, a = r(this), s;
    return a == null ? void this.removeAttributeNS(t.space, t.local) : (n = this.getAttributeNS(t.space, t.local), s = a + "", n === s ? null : n === i && s === u ? o : (u = s, o = e(i = n, a)));
  };
}
function C(t, e) {
  var r = f(t), i = r === "transform" ? g : l;
  return this.attrTween(t, typeof e == "function" ? (r.local ? A : b)(r, i, c(this, "attr." + t, e)) : e == null ? (r.local ? v : p)(r) : (r.local ? m : h)(r, i, e));
}
export {
  C as default
};
