/* esm.sh - d3-transition@3.0.1/src/transition/style */
import{interpolateTransformCss as c}from"../../../../d3-interpolate@^3.0.1?target=es2022";import{style as f}from"../../../../d3-selection@^3.0.0?target=es2022";import{set as v}from"./schedule.mjs";import{tweenValue as g}from"./tween.mjs";import d from"./interpolate.mjs";function a(t,n){var i,r,s;return function(){var o=f(this,t),e=(this.style.removeProperty(t),f(this,t));return o===e?null:o===i&&e===r?s:s=n(i=o,r=e)}}function p(t){return function(){this.style.removeProperty(t)}}function T(t,n,i){var r,s=i+"",o;return function(){var e=f(this,t);return e===s?null:e===r?o:o=n(r=e,i)}}function w(t,n,i){var r,s,o;return function(){var e=f(this,t),u=i(this),l=u+"";return u==null&&(l=u=(this.style.removeProperty(t),f(this,t))),e===l?null:e===r&&l===s?o:(s=l,o=n(r=e,u))}}function m(t,n){var i,r,s,o="style."+n,e="end."+o,u;return function(){var l=v(this,t),y=l.on,h=l.value[o]==null?u||(u=p(n)):void 0;(y!==i||s!==h)&&(r=(i=y).copy()).on(e,s=h),l.on=r}}function x(t,n,i){var r=(t+="")=="transform"?c:d;return n==null?this.styleTween(t,a(t,r)).on("end.style."+t,p(t)):typeof n=="function"?this.styleTween(t,w(t,r,g(this,"style."+t,n))).each(m(this._id,t)):this.styleTween(t,T(t,r,n),i).on("end.style."+t,null)}export{x as default};
//# sourceMappingURL=style.mjs.map