import{r as t,c as n}from"./d3-color-DoYtpBXr.js";const r=t=>()=>t;function e(t){return 1===(t=+t)?a:function(n,e){return e-n?function(t,n,r){return t=Math.pow(t,r),n=Math.pow(n,r)-t,r=1/r,function(e){return Math.pow(t+e*n,r)}}(n,e,t):r(isNaN(n)?e:n)}}function a(t,n){var e=n-t;return e?function(t,n){return function(r){return t+r*n}}(t,e):r(isNaN(t)?n:t)}const u=function n(r){var u=e(r);function o(n,r){var e=u((n=t(n)).r,(r=t(r)).r),o=u(n.g,r.g),i=u(n.b,r.b),s=a(n.opacity,r.opacity);return function(t){return n.r=e(t),n.g=o(t),n.b=i(t),n.opacity=s(t),n+""}}return o.gamma=n,o}(1);function o(t,n){n||(n=[]);var r,e=t?Math.min(n.length,t.length):0,a=n.slice();return function(u){for(r=0;r<e;++r)a[r]=t[r]*(1-u)+n[r]*u;return a}}function i(t,n){var r,e=n?n.length:0,a=t?Math.min(e,t.length):0,u=new Array(a),o=new Array(e);for(r=0;r<a;++r)u[r]=x(t[r],n[r]);for(;r<e;++r)o[r]=n[r];return function(t){for(r=0;r<a;++r)o[r]=u[r](t);return o}}function s(t,n){var r=new Date;return t=+t,n=+n,function(e){return r.setTime(t*(1-e)+n*e),r}}function c(t,n){return t=+t,n=+n,function(r){return t*(1-r)+n*r}}function f(t,n){var r,e={},a={};for(r in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)r in t?e[r]=x(t[r],n[r]):a[r]=n[r];return function(t){for(r in e)a[r]=e[r](t);return a}}var l=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,h=new RegExp(l.source,"g");function p(t,n){var r,e,a,u=l.lastIndex=h.lastIndex=0,o=-1,i=[],s=[];for(t+="",n+="";(r=l.exec(t))&&(e=h.exec(n));)(a=e.index)>u&&(a=n.slice(u,a),i[o]?i[o]+=a:i[++o]=a),(r=r[0])===(e=e[0])?i[o]?i[o]+=e:i[++o]=e:(i[++o]=null,s.push({i:o,x:c(r,e)})),u=h.lastIndex;return u<n.length&&(a=n.slice(u),i[o]?i[o]+=a:i[++o]=a),i.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var r,e=0;e<n;++e)i[(r=s[e]).i]=r.x(t);return i.join("")})}function x(t,e){var a,l,h=typeof e;return null==e||"boolean"===h?r(e):("number"===h?c:"string"===h?(a=n(e))?(e=a,u):p:e instanceof n?u:e instanceof Date?s:(l=e,!ArrayBuffer.isView(l)||l instanceof DataView?Array.isArray(e)?i:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?f:c:o))(t,e)}var M,g=180/Math.PI,v={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function w(t,n,r,e,a,u){var o,i,s;return(o=Math.sqrt(t*t+n*n))&&(t/=o,n/=o),(s=t*r+n*e)&&(r-=t*s,e-=n*s),(i=Math.sqrt(r*r+e*e))&&(r/=i,e/=i,s/=i),t*e<n*r&&(t=-t,n=-n,s=-s,o=-o),{translateX:a,translateY:u,rotate:Math.atan2(n,t)*g,skewX:Math.atan(s)*g,scaleX:o,scaleY:i}}function d(t,n,r,e){function a(t){return t.length?t.pop()+" ":""}return function(u,o){var i=[],s=[];return u=t(u),o=t(o),function(t,e,a,u,o,i){if(t!==a||e!==u){var s=o.push("translate(",null,n,null,r);i.push({i:s-4,x:c(t,a)},{i:s-2,x:c(e,u)})}else(a||u)&&o.push("translate("+a+n+u+r)}(u.translateX,u.translateY,o.translateX,o.translateY,i,s),function(t,n,r,u){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),u.push({i:r.push(a(r)+"rotate(",null,e)-2,x:c(t,n)})):n&&r.push(a(r)+"rotate("+n+e)}(u.rotate,o.rotate,i,s),function(t,n,r,u){t!==n?u.push({i:r.push(a(r)+"skewX(",null,e)-2,x:c(t,n)}):n&&r.push(a(r)+"skewX("+n+e)}(u.skewX,o.skewX,i,s),function(t,n,r,e,u,o){if(t!==r||n!==e){var i=u.push(a(u)+"scale(",null,",",null,")");o.push({i:i-4,x:c(t,r)},{i:i-2,x:c(n,e)})}else 1===r&&1===e||u.push(a(u)+"scale("+r+","+e+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,i,s),u=o=null,function(t){for(var n,r=-1,e=s.length;++r<e;)i[(n=s[r]).i]=n.x(t);return i.join("")}}}var y=d(function(t){const n=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?v:w(n.a,n.b,n.c,n.d,n.e,n.f)},"px, ","px)","deg)"),m=d(function(t){return null==t?v:(M||(M=document.createElementNS("http://www.w3.org/2000/svg","g")),M.setAttribute("transform",t),(t=M.transform.baseVal.consolidate())?w((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):v)},", ",")",")");function X(t){return((t=Math.exp(t))+1/t)/2}const b=function t(n,r,e){function a(t,a){var u,o,i=t[0],s=t[1],c=t[2],f=a[0],l=a[1],h=a[2],p=f-i,x=l-s,M=p*p+x*x;if(M<1e-12)o=Math.log(h/c)/n,u=function(t){return[i+t*p,s+t*x,c*Math.exp(n*t*o)]};else{var g=Math.sqrt(M),v=(h*h-c*c+e*M)/(2*c*r*g),w=(h*h-c*c-e*M)/(2*h*r*g),d=Math.log(Math.sqrt(v*v+1)-v),y=Math.log(Math.sqrt(w*w+1)-w);o=(y-d)/n,u=function(t){var e,a=t*o,u=X(d),f=c/(r*g)*(u*(e=n*a+d,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(d));return[i+f*p,s+f*x,c*u/X(n*a+d)]}}return u.duration=1e3*o*n/Math.SQRT2,u}return a.rho=function(n){var r=Math.max(.001,+n),e=r*r;return t(r,e,e*e)},a}(Math.SQRT2,2,4);export{x as a,c as b,u as c,p as d,m as e,y as f,b as i};
