/**
 * Copyright (c) 2024 Visa, Inc.
 *
 * This source code is licensed under the MIT license
 * https://github.com/visa/visa-chart-components/blob/master/LICENSE
 *
 **/
function t(t){return function i(){return t}}const i=Math.PI,h=2*i,s=1e-6,r=h-s;function $(t){this._+=t[0];for(let i=1,h=t.length;i<h;++i){this._+=arguments[i]+t[i]}}function e(t){let i=Math.floor(t);if(!(i>=0))throw new Error(`invalid digits: ${t}`);if(i>15)return $;const h=10**i;return function(t){this._+=t[0];for(let i=1,s=t.length;i<s;++i){this._+=Math.round(arguments[i]*h)/h+t[i]}}}class n{constructor(t){this._x0=this._y0=this._x1=this._y1=null;this._="";this._append=t==null?$:e(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){if(this._x1!==null){this._x1=this._x0,this._y1=this._y0;this._append`Z`}}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,h,s){this._append`Q${+t},${+i},${this._x1=+h},${this._y1=+s}`}bezierCurveTo(t,i,h,s,r,$){this._append`C${+t},${+i},${+h},${+s},${this._x1=+r},${this._y1=+$}`}arcTo(t,h,r,$,e){t=+t,h=+h,r=+r,$=+$,e=+e;if(e<0)throw new Error(`negative radius: ${e}`);let n=this._x1,a=this._y1,o=r-t,l=$-h,u=n-t,f=a-h,c=u*u+f*f;if(this._x1===null){this._append`M${this._x1=t},${this._y1=h}`}else if(!(c>s));else if(!(Math.abs(f*o-l*u)>s)||!e){this._append`L${this._x1=t},${this._y1=h}`}else{let M=r-n,w=$-a,v=o*o+l*l,d=M*M+w*w,g=Math.sqrt(v),A=Math.sqrt(c),T=e*Math.tan((i-Math.acos((v+c-d)/(2*g*A)))/2),E=T/A,L=T/g;if(Math.abs(E-1)>s){this._append`L${t+E*u},${h+E*f}`}this._append`A${e},${e},0,0,${+(f*M>u*w)},${this._x1=t+L*o},${this._y1=h+L*l}`}}arc(t,$,e,n,a,o){t=+t,$=+$,e=+e,o=!!o;if(e<0)throw new Error(`negative radius: ${e}`);let l=e*Math.cos(n),u=e*Math.sin(n),f=t+l,c=$+u,M=1^o,w=o?n-a:a-n;if(this._x1===null){this._append`M${f},${c}`}else if(Math.abs(this._x1-f)>s||Math.abs(this._y1-c)>s){this._append`L${f},${c}`}if(!e)return;if(w<0)w=w%h+h;if(w>r){this._append`A${e},${e},0,1,${M},${t-l},${$-u}A${e},${e},0,1,${M},${this._x1=f},${this._y1=c}`}else if(w>s){this._append`A${e},${e},0,${+(w>=i)},${M},${this._x1=t+e*Math.cos(a)},${this._y1=$+e*Math.sin(a)}`}}rect(t,i,h,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${h=+h}v${+s}h${-h}Z`}toString(){return this._}}function a(t){let i=3;t.digits=function(h){if(!arguments.length)return i;if(h==null){i=null}else{const t=Math.floor(h);if(!(t>=0))throw new RangeError(`invalid digits: ${h}`);i=t}return t};return()=>new n(i)}var o=Array.prototype.slice;function l(t){return typeof t==="object"&&"length"in t?t:Array.from(t)}export{l as a,t as c,o as s,a as w};
//# sourceMappingURL=p-fa69d97e.js.map