UNPKG

@react-goodies/hand-signed

Version:

[![Node.js CI](https://github.com/marborkowski/hand-signed/actions/workflows/node.js.yml/badge.svg?branch=main)](https://github.com/marborkowski/hand-signed/actions/workflows/node.js.yml)

3 lines (2 loc) 47.8 kB
import*as r from"react";var e=function(){return e=Object.assign||function(r){for(var e,n=1,t=arguments.length;n<t;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r},e.apply(this,arguments)};function n(r,e){var n,t,a,f,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return f={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(f[Symbol.iterator]=function(){return this}),f;function u(f){return function(u){return function(f){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,t&&(a=2&f[0]?t.return:f[0]?t.throw||((a=t.return)&&a.call(t),0):t.next)&&!(a=a.call(t,f[1])).done)return a;switch(t=0,a&&(f=[2&f[0],a.value]),f[0]){case 0:case 1:a=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,t=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==f[0]&&2!==f[0])){o=0;continue}if(3===f[0]&&(!a||f[1]>a[0]&&f[1]<a[3])){o.label=f[1];break}if(6===f[0]&&o.label<a[1]){o.label=a[1],a=f;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(f);break}a[2]&&o.ops.pop(),o.trys.pop();continue}f=e.call(r,o)}catch(r){f=[6,r],t=0}finally{n=a=0}if(5&f[0])throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}([f,u])}}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var t={exports:{}},a=t.exports=function(){for(var r=function(r,e,n){return void 0===e&&(e=0),void 0===n&&(n=1),r<e?e:r>n?n:r},e=r,n=function(r){r._clipped=!1,r._unclipped=r.slice(0);for(var n=0;n<=3;n++)n<3?((r[n]<0||r[n]>255)&&(r._clipped=!0),r[n]=e(r[n],0,255)):3===n&&(r[n]=e(r[n],0,1));return r},t={},a=0,f=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];a<f.length;a+=1){var o=f[a];t["[object "+o+"]"]=o.toLowerCase()}var u=function(r){return t[Object.prototype.toString.call(r)]||"object"},c=u,i=function(r,e){return void 0===e&&(e=null),r.length>=3?Array.prototype.slice.call(r):"object"==c(r[0])&&e?e.split("").filter((function(e){return void 0!==r[0][e]})).map((function(e){return r[0][e]})):r[0]},l=u,h=function(r){if(r.length<2)return null;var e=r.length-1;return"string"==l(r[e])?r[e].toLowerCase():null},s=Math.PI,d={clip_rgb:n,limit:r,type:u,unpack:i,last:h,PI:s,TWOPI:2*s,PITHIRD:s/3,DEG2RAD:s/180,RAD2DEG:180/s},b={format:{},autodetect:[]},p=d.last,g=d.clip_rgb,v=d.type,y=b,m=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=this;if("object"===v(r[0])&&r[0].constructor&&r[0].constructor===this.constructor)return r[0];var t=p(r),a=!1;if(!t){a=!0,y.sorted||(y.autodetect=y.autodetect.sort((function(r,e){return e.p-r.p})),y.sorted=!0);for(var f=0,o=y.autodetect;f<o.length;f+=1){var u=o[f];if(t=u.test.apply(u,r))break}}if(!y.format[t])throw new Error("unknown format: "+r);var c=y.format[t].apply(null,a?r:r.slice(0,-1));n._rgb=g(c),3===n._rgb.length&&n._rgb.push(1)};m.prototype.toString=function(){return"function"==v(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var w=m,k=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(k.Color,[null].concat(r)))};k.Color=w,k.version="2.4.2";var M=k,N=d.unpack,_=Math.max,x=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=N(r,"rgb"),t=n[0],a=n[1],f=n[2],o=1-_(t/=255,_(a/=255,f/=255)),u=o<1?1/(1-o):0;return[(1-t-o)*u,(1-a-o)*u,(1-f-o)*u,o]},O=x,E=d.unpack,A=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=E(r,"cmyk"))[0],t=r[1],a=r[2],f=r[3],o=r.length>4?r[4]:1;return 1===f?[0,0,0,o]:[n>=1?0:255*(1-n)*(1-f),t>=1?0:255*(1-t)*(1-f),a>=1?0:255*(1-a)*(1-f),o]},P=A,R=M,F=w,j=b,T=d.unpack,S=d.type,G=O;F.prototype.cmyk=function(){return G(this._rgb)},R.cmyk=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(F,[null].concat(r,["cmyk"])))},j.format.cmyk=P,j.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=T(r,"cmyk"),"array"===S(r)&&4===r.length)return"cmyk"}});var L=d.unpack,q=d.last,D=function(r){return Math.round(100*r)/100},C=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=L(r,"hsla"),t=q(r)||"lsa";return n[0]=D(n[0]||0),n[1]=D(100*n[1])+"%",n[2]=D(100*n[2])+"%","hsla"===t||n.length>3&&n[3]<1?(n[3]=n.length>3?n[3]:1,t="hsla"):n.length=3,t+"("+n.join(",")+")"},I=C,B=d.unpack,Y=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=B(r,"rgba"))[0],t=r[1],a=r[2];n/=255,t/=255,a/=255;var f,o,u=Math.min(n,t,a),c=Math.max(n,t,a),i=(c+u)/2;return c===u?(f=0,o=Number.NaN):f=i<.5?(c-u)/(c+u):(c-u)/(2-c-u),n==c?o=(t-a)/(c-u):t==c?o=2+(a-n)/(c-u):a==c&&(o=4+(n-t)/(c-u)),(o*=60)<0&&(o+=360),r.length>3&&void 0!==r[3]?[o,f,i,r[3]]:[o,f,i]},X=Y,$=d.unpack,z=d.last,U=I,W=X,V=Math.round,H=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=$(r,"rgba"),t=z(r)||"rgb";return"hsl"==t.substr(0,3)?U(W(n),t):(n[0]=V(n[0]),n[1]=V(n[1]),n[2]=V(n[2]),("rgba"===t||n.length>3&&n[3]<1)&&(n[3]=n.length>3?n[3]:1,t="rgba"),t+"("+n.slice(0,"rgb"===t?3:4).join(",")+")")},K=H,Z=d.unpack,J=Math.round,Q=function(){for(var r,e=[],n=arguments.length;n--;)e[n]=arguments[n];var t,a,f,o=(e=Z(e,"hsl"))[0],u=e[1],c=e[2];if(0===u)t=a=f=255*c;else{var i=[0,0,0],l=[0,0,0],h=c<.5?c*(1+u):c+u-c*u,s=2*c-h,d=o/360;i[0]=d+1/3,i[1]=d,i[2]=d-1/3;for(var b=0;b<3;b++)i[b]<0&&(i[b]+=1),i[b]>1&&(i[b]-=1),6*i[b]<1?l[b]=s+6*(h-s)*i[b]:2*i[b]<1?l[b]=h:3*i[b]<2?l[b]=s+(h-s)*(2/3-i[b])*6:l[b]=s;t=(r=[J(255*l[0]),J(255*l[1]),J(255*l[2])])[0],a=r[1],f=r[2]}return e.length>3?[t,a,f,e[3]]:[t,a,f,1]},rr=Q,er=rr,nr=b,tr=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,ar=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,fr=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,or=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ur=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,cr=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ir=Math.round,lr=function(r){var e;if(r=r.toLowerCase().trim(),nr.format.named)try{return nr.format.named(r)}catch(r){}if(e=r.match(tr)){for(var n=e.slice(1,4),t=0;t<3;t++)n[t]=+n[t];return n[3]=1,n}if(e=r.match(ar)){for(var a=e.slice(1,5),f=0;f<4;f++)a[f]=+a[f];return a}if(e=r.match(fr)){for(var o=e.slice(1,4),u=0;u<3;u++)o[u]=ir(2.55*o[u]);return o[3]=1,o}if(e=r.match(or)){for(var c=e.slice(1,5),i=0;i<3;i++)c[i]=ir(2.55*c[i]);return c[3]=+c[3],c}if(e=r.match(ur)){var l=e.slice(1,4);l[1]*=.01,l[2]*=.01;var h=er(l);return h[3]=1,h}if(e=r.match(cr)){var s=e.slice(1,4);s[1]*=.01,s[2]*=.01;var d=er(s);return d[3]=+e[4],d}};lr.test=function(r){return tr.test(r)||ar.test(r)||fr.test(r)||or.test(r)||ur.test(r)||cr.test(r)};var hr=lr,sr=M,dr=w,br=b,pr=d.type,gr=K,vr=hr;dr.prototype.css=function(r){return gr(this._rgb,r)},sr.css=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(dr,[null].concat(r,["css"])))},br.format.css=vr,br.autodetect.push({p:5,test:function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(!e.length&&"string"===pr(r)&&vr.test(r))return"css"}});var yr=w,mr=M,wr=b,kr=d.unpack;wr.format.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=kr(r,"rgba");return n[0]*=255,n[1]*=255,n[2]*=255,n},mr.gl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(yr,[null].concat(r,["gl"])))},yr.prototype.gl=function(){var r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};var Mr=d.unpack,Nr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=Mr(r,"rgb"),a=t[0],f=t[1],o=t[2],u=Math.min(a,f,o),c=Math.max(a,f,o),i=c-u,l=100*i/255,h=u/(255-i)*100;return 0===i?n=Number.NaN:(a===c&&(n=(f-o)/i),f===c&&(n=2+(o-a)/i),o===c&&(n=4+(a-f)/i),(n*=60)<0&&(n+=360)),[n,l,h]},_r=Nr,xr=d.unpack,Or=Math.floor,Er=function(){for(var r,e,n,t,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=xr(o,"hcg"))[0],s=o[1],d=o[2];d*=255;var b=255*s;if(0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var p=Or(h/=60),g=h-p,v=d*(1-s),y=v+b*(1-g),m=v+b*g,w=v+b;switch(p){case 0:c=(r=[w,m,v])[0],i=r[1],l=r[2];break;case 1:c=(e=[y,w,v])[0],i=e[1],l=e[2];break;case 2:c=(n=[v,w,m])[0],i=n[1],l=n[2];break;case 3:c=(t=[v,y,w])[0],i=t[1],l=t[2];break;case 4:c=(a=[m,v,w])[0],i=a[1],l=a[2];break;case 5:c=(f=[w,v,y])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Ar=Er,Pr=d.unpack,Rr=d.type,Fr=M,jr=w,Tr=b,Sr=_r;jr.prototype.hcg=function(){return Sr(this._rgb)},Fr.hcg=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(jr,[null].concat(r,["hcg"])))},Tr.format.hcg=Ar,Tr.autodetect.push({p:1,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pr(r,"hcg"),"array"===Rr(r)&&3===r.length)return"hcg"}});var Gr=d.unpack,Lr=d.last,qr=Math.round,Dr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Gr(r,"rgba"),t=n[0],a=n[1],f=n[2],o=n[3],u=Lr(r)||"auto";void 0===o&&(o=1),"auto"===u&&(u=o<1?"rgba":"rgb");var c="000000"+((t=qr(t))<<16|(a=qr(a))<<8|(f=qr(f))).toString(16);c=c.substr(c.length-6);var i="0"+qr(255*o).toString(16);switch(i=i.substr(i.length-2),u.toLowerCase()){case"rgba":return"#"+c+i;case"argb":return"#"+i+c;default:return"#"+c}},Cr=Dr,Ir=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Br=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Yr=function(r){if(r.match(Ir)){4!==r.length&&7!==r.length||(r=r.substr(1)),3===r.length&&(r=(r=r.split(""))[0]+r[0]+r[1]+r[1]+r[2]+r[2]);var e=parseInt(r,16);return[e>>16,e>>8&255,255&e,1]}if(r.match(Br)){5!==r.length&&9!==r.length||(r=r.substr(1)),4===r.length&&(r=(r=r.split(""))[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);var n=parseInt(r,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: "+r)},Xr=M,$r=w,zr=d.type,Ur=b,Wr=Cr;$r.prototype.hex=function(r){return Wr(this._rgb,r)},Xr.hex=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply($r,[null].concat(r,["hex"])))},Ur.format.hex=Yr,Ur.autodetect.push({p:4,test:function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(!e.length&&"string"===zr(r)&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});var Vr=d.unpack,Hr=d.TWOPI,Kr=Math.min,Zr=Math.sqrt,Jr=Math.acos,Qr=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t=Vr(r,"rgb"),a=t[0],f=t[1],o=t[2],u=Kr(a/=255,f/=255,o/=255),c=(a+f+o)/3,i=c>0?1-u/c:0;return 0===i?n=NaN:(n=(a-f+(a-o))/2,n/=Zr((a-f)*(a-f)+(a-o)*(f-o)),n=Jr(n),o>f&&(n=Hr-n),n/=Hr),[360*n,i,c]},re=Qr,ee=d.unpack,ne=d.limit,te=d.TWOPI,ae=d.PITHIRD,fe=Math.cos,oe=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=ee(r,"hsi"))[0],o=r[1],u=r[2];return isNaN(f)&&(f=0),isNaN(o)&&(o=0),f>360&&(f-=360),f<0&&(f+=360),(f/=360)<1/3?t=1-((a=(1-o)/3)+(n=(1+o*fe(te*f)/fe(ae-te*f))/3)):f<2/3?a=1-((n=(1-o)/3)+(t=(1+o*fe(te*(f-=1/3))/fe(ae-te*f))/3)):n=1-((t=(1-o)/3)+(a=(1+o*fe(te*(f-=2/3))/fe(ae-te*f))/3)),[255*(n=ne(u*n*3)),255*(t=ne(u*t*3)),255*(a=ne(u*a*3)),r.length>3?r[3]:1]},ue=oe,ce=d.unpack,ie=d.type,le=M,he=w,se=b,de=re;he.prototype.hsi=function(){return de(this._rgb)},le.hsi=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(he,[null].concat(r,["hsi"])))},se.format.hsi=ue,se.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=ce(r,"hsi"),"array"===ie(r)&&3===r.length)return"hsi"}});var be=d.unpack,pe=d.type,ge=M,ve=w,ye=b,me=X;ve.prototype.hsl=function(){return me(this._rgb)},ge.hsl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(ve,[null].concat(r,["hsl"])))},ye.format.hsl=rr,ye.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=be(r,"hsl"),"array"===pe(r)&&3===r.length)return"hsl"}});var we=d.unpack,ke=Math.min,Me=Math.max,Ne=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=we(r,"rgb"))[0],o=r[1],u=r[2],c=ke(f,o,u),i=Me(f,o,u),l=i-c;return a=i/255,0===i?(n=Number.NaN,t=0):(t=l/i,f===i&&(n=(o-u)/l),o===i&&(n=2+(u-f)/l),u===i&&(n=4+(f-o)/l),(n*=60)<0&&(n+=360)),[n,t,a]},_e=Ne,xe=d.unpack,Oe=Math.floor,Ee=function(){for(var r,e,n,t,a,f,o=[],u=arguments.length;u--;)o[u]=arguments[u];var c,i,l,h=(o=xe(o,"hsv"))[0],s=o[1],d=o[2];if(d*=255,0===s)c=i=l=d;else{360===h&&(h=0),h>360&&(h-=360),h<0&&(h+=360);var b=Oe(h/=60),p=h-b,g=d*(1-s),v=d*(1-s*p),y=d*(1-s*(1-p));switch(b){case 0:c=(r=[d,y,g])[0],i=r[1],l=r[2];break;case 1:c=(e=[v,d,g])[0],i=e[1],l=e[2];break;case 2:c=(n=[g,d,y])[0],i=n[1],l=n[2];break;case 3:c=(t=[g,v,d])[0],i=t[1],l=t[2];break;case 4:c=(a=[y,g,d])[0],i=a[1],l=a[2];break;case 5:c=(f=[d,g,v])[0],i=f[1],l=f[2]}}return[c,i,l,o.length>3?o[3]:1]},Ae=Ee,Pe=d.unpack,Re=d.type,Fe=M,je=w,Te=b,Se=_e;je.prototype.hsv=function(){return Se(this._rgb)},Fe.hsv=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(je,[null].concat(r,["hsv"])))},Te.format.hsv=Ae,Te.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Pe(r,"hsv"),"array"===Re(r)&&3===r.length)return"hsv"}});var Ge={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},Le=Ge,qe=d.unpack,De=Math.pow,Ce=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=qe(r,"rgb"),t=n[0],a=n[1],f=n[2],o=Ye(t,a,f),u=o[0],c=o[1],i=116*c-16;return[i<0?0:i,500*(u-c),200*(c-o[2])]},Ie=function(r){return(r/=255)<=.04045?r/12.92:De((r+.055)/1.055,2.4)},Be=function(r){return r>Le.t3?De(r,1/3):r/Le.t2+Le.t0},Ye=function(r,e,n){return r=Ie(r),e=Ie(e),n=Ie(n),[Be((.4124564*r+.3575761*e+.1804375*n)/Le.Xn),Be((.2126729*r+.7151522*e+.072175*n)/Le.Yn),Be((.0193339*r+.119192*e+.9503041*n)/Le.Zn)]},Xe=Ce,$e=Ge,ze=d.unpack,Ue=Math.pow,We=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n,t,a,f=(r=ze(r,"lab"))[0],o=r[1],u=r[2];return t=(f+16)/116,n=isNaN(o)?t:t+o/500,a=isNaN(u)?t:t-u/200,t=$e.Yn*He(t),n=$e.Xn*He(n),a=$e.Zn*He(a),[Ve(3.2404542*n-1.5371385*t-.4985314*a),Ve(-.969266*n+1.8760108*t+.041556*a),Ve(.0556434*n-.2040259*t+1.0572252*a),r.length>3?r[3]:1]},Ve=function(r){return 255*(r<=.00304?12.92*r:1.055*Ue(r,1/2.4)-.055)},He=function(r){return r>$e.t1?r*r*r:$e.t2*(r-$e.t0)},Ke=We,Ze=d.unpack,Je=d.type,Qe=M,rn=w,en=b,nn=Xe;rn.prototype.lab=function(){return nn(this._rgb)},Qe.lab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(rn,[null].concat(r,["lab"])))},en.format.lab=Ke,en.autodetect.push({p:2,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Ze(r,"lab"),"array"===Je(r)&&3===r.length)return"lab"}});var tn=d.unpack,an=d.RAD2DEG,fn=Math.sqrt,on=Math.atan2,un=Math.round,cn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=tn(r,"lab"),t=n[0],a=n[1],f=n[2],o=fn(a*a+f*f),u=(on(f,a)*an+360)%360;return 0===un(1e4*o)&&(u=Number.NaN),[t,o,u]},ln=cn,hn=d.unpack,sn=Xe,dn=ln,bn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=hn(r,"rgb"),t=n[0],a=n[1],f=n[2],o=sn(t,a,f),u=o[0],c=o[1],i=o[2];return dn(u,c,i)},pn=bn,gn=d.unpack,vn=d.DEG2RAD,yn=Math.sin,mn=Math.cos,wn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=gn(r,"lch"),t=n[0],a=n[1],f=n[2];return isNaN(f)&&(f=0),[t,mn(f*=vn)*a,yn(f)*a]},kn=wn,Mn=d.unpack,Nn=kn,_n=Ke,xn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Mn(r,"lch"))[0],t=r[1],a=r[2],f=Nn(n,t,a),o=f[0],u=f[1],c=f[2],i=_n(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},On=xn,En=d.unpack,An=On,Pn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=En(r,"hcl").reverse();return An.apply(void 0,n)},Rn=Pn,Fn=d.unpack,jn=d.type,Tn=M,Sn=w,Gn=b,Ln=pn;Sn.prototype.lch=function(){return Ln(this._rgb)},Sn.prototype.hcl=function(){return Ln(this._rgb).reverse()},Tn.lch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Sn,[null].concat(r,["lch"])))},Tn.hcl=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Sn,[null].concat(r,["hcl"])))},Gn.format.lch=On,Gn.format.hcl=Rn,["lch","hcl"].forEach((function(r){return Gn.autodetect.push({p:2,test:function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];if(e=Fn(e,r),"array"===jn(e)&&3===e.length)return r}})}));var qn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Dn=w,Cn=b,In=d.type,Bn=qn,Yn=Yr,Xn=Cr;Dn.prototype.name=function(){for(var r=Xn(this._rgb,"rgb"),e=0,n=Object.keys(Bn);e<n.length;e+=1){var t=n[e];if(Bn[t]===r)return t.toLowerCase()}return r},Cn.format.named=function(r){if(r=r.toLowerCase(),Bn[r])return Yn(Bn[r]);throw new Error("unknown color name: "+r)},Cn.autodetect.push({p:5,test:function(r){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];if(!e.length&&"string"===In(r)&&Bn[r.toLowerCase()])return"named"}});var $n=d.unpack,zn=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=$n(r,"rgb");return(n[0]<<16)+(n[1]<<8)+n[2]},Un=zn,Wn=d.type,Vn=function(r){if("number"==Wn(r)&&r>=0&&r<=16777215)return[r>>16,r>>8&255,255&r,1];throw new Error("unknown num color: "+r)},Hn=Vn,Kn=M,Zn=w,Jn=b,Qn=d.type,rt=Un;Zn.prototype.num=function(){return rt(this._rgb)},Kn.num=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Zn,[null].concat(r,["num"])))},Jn.format.num=Hn,Jn.autodetect.push({p:5,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(1===r.length&&"number"===Qn(r[0])&&r[0]>=0&&r[0]<=16777215)return"num"}});var et=M,nt=w,tt=b,at=d.unpack,ft=d.type,ot=Math.round;nt.prototype.rgb=function(r){return void 0===r&&(r=!0),!1===r?this._rgb.slice(0,3):this._rgb.slice(0,3).map(ot)},nt.prototype.rgba=function(r){return void 0===r&&(r=!0),this._rgb.slice(0,4).map((function(e,n){return n<3?!1===r?e:ot(e):e}))},et.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(nt,[null].concat(r,["rgb"])))},tt.format.rgb=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=at(r,"rgba");return void 0===n[3]&&(n[3]=1),n},tt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=at(r,"rgba"),"array"===ft(r)&&(3===r.length||4===r.length&&"number"==ft(r[3])&&r[3]>=0&&r[3]<=1))return"rgb"}});var ut=Math.log,ct=function(r){var e,n,t,a=r/100;return a<66?(e=255,n=a<6?0:-155.25485562709179-.44596950469579133*(n=a-2)+104.49216199393888*ut(n),t=a<20?0:.8274096064007395*(t=a-10)-254.76935184120902+115.67994401066147*ut(t)):(e=351.97690566805693+.114206453784165*(e=a-55)-40.25366309332127*ut(e),n=325.4494125711974+.07943456536662342*(n=a-50)-28.0852963507957*ut(n),t=255),[e,n,t,1]},it=ct,lt=d.unpack,ht=Math.round,st=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];for(var n,t=lt(r,"rgb"),a=t[0],f=t[2],o=1e3,u=4e4,c=.4;u-o>c;){var i=it(n=.5*(u+o));i[2]/i[0]>=f/a?u=n:o=n}return ht(n)},dt=M,bt=w,pt=b,gt=st;bt.prototype.temp=bt.prototype.kelvin=bt.prototype.temperature=function(){return gt(this._rgb)},dt.temp=dt.kelvin=dt.temperature=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(bt,[null].concat(r,["temp"])))},pt.format.temp=pt.format.kelvin=pt.format.temperature=ct;var vt=d.unpack,yt=Math.cbrt,mt=Math.pow,wt=Math.sign,kt=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=vt(r,"rgb"),t=n[0],a=n[1],f=n[2],o=[Nt(t/255),Nt(a/255),Nt(f/255)],u=o[0],c=o[1],i=o[2],l=yt(.4122214708*u+.5363325363*c+.0514459929*i),h=yt(.2119034982*u+.6806995451*c+.1073969566*i),s=yt(.0883024619*u+.2817188376*c+.6299787005*i);return[.2104542553*l+.793617785*h-.0040720468*s,1.9779984951*l-2.428592205*h+.4505937099*s,.0259040371*l+.7827717662*h-.808675766*s]},Mt=kt;function Nt(r){var e=Math.abs(r);return e<.04045?r/12.92:(wt(r)||1)*mt((e+.055)/1.055,2.4)}var _t=d.unpack,xt=Math.pow,Ot=Math.sign,Et=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=_t(r,"lab"))[0],t=r[1],a=r[2],f=xt(n+.3963377774*t+.2158037573*a,3),o=xt(n-.1055613458*t-.0638541728*a,3),u=xt(n-.0894841775*t-1.291485548*a,3);return[255*Pt(4.0767416621*f-3.3077115913*o+.2309699292*u),255*Pt(-1.2684380046*f+2.6097574011*o-.3413193965*u),255*Pt(-.0041960863*f-.7034186147*o+1.707614701*u),r.length>3?r[3]:1]},At=Et;function Pt(r){var e=Math.abs(r);return e>.0031308?(Ot(r)||1)*(1.055*xt(e,1/2.4)-.055):12.92*r}var Rt=d.unpack,Ft=d.type,jt=M,Tt=w,St=b,Gt=Mt;Tt.prototype.oklab=function(){return Gt(this._rgb)},jt.oklab=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Tt,[null].concat(r,["oklab"])))},St.format.oklab=At,St.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Rt(r,"oklab"),"array"===Ft(r)&&3===r.length)return"oklab"}});var Lt=d.unpack,qt=Mt,Dt=ln,Ct=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=Lt(r,"rgb"),t=n[0],a=n[1],f=n[2],o=qt(t,a,f),u=o[0],c=o[1],i=o[2];return Dt(u,c,i)},It=Ct,Bt=d.unpack,Yt=kn,Xt=At,$t=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];var n=(r=Bt(r,"lch"))[0],t=r[1],a=r[2],f=Yt(n,t,a),o=f[0],u=f[1],c=f[2],i=Xt(o,u,c);return[i[0],i[1],i[2],r.length>3?r[3]:1]},zt=$t,Ut=d.unpack,Wt=d.type,Vt=M,Ht=w,Kt=b,Zt=It;Ht.prototype.oklch=function(){return Zt(this._rgb)},Vt.oklch=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];return new(Function.prototype.bind.apply(Ht,[null].concat(r,["oklch"])))},Kt.format.oklch=zt,Kt.autodetect.push({p:3,test:function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];if(r=Ut(r,"oklch"),"array"===Wt(r)&&3===r.length)return"oklch"}});var Jt=w,Qt=d.type;Jt.prototype.alpha=function(r,e){return void 0===e&&(e=!1),void 0!==r&&"number"===Qt(r)?e?(this._rgb[3]=r,this):new Jt([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]},w.prototype.clipped=function(){return this._rgb._clipped||!1};var ra=w,ea=Ge;ra.prototype.darken=function(r){void 0===r&&(r=1);var e=this,n=e.lab();return n[0]-=ea.Kn*r,new ra(n,"lab").alpha(e.alpha(),!0)},ra.prototype.brighten=function(r){return void 0===r&&(r=1),this.darken(-r)},ra.prototype.darker=ra.prototype.darken,ra.prototype.brighter=ra.prototype.brighten,w.prototype.get=function(r){var e=r.split("."),n=e[0],t=e[1],a=this[n]();if(t){var f=n.indexOf(t)-("ok"===n.substr(0,2)?2:0);if(f>-1)return a[f];throw new Error("unknown channel "+t+" in mode "+n)}return a};var na=w,ta=d.type,aa=Math.pow,fa=1e-7,oa=20;na.prototype.luminance=function(r){if(void 0!==r&&"number"===ta(r)){if(0===r)return new na([0,0,0,this._rgb[3]],"rgb");if(1===r)return new na([255,255,255,this._rgb[3]],"rgb");var e=this.luminance(),n="rgb",t=oa,a=function(e,f){var o=e.interpolate(f,.5,n),u=o.luminance();return Math.abs(r-u)<fa||!t--?o:u>r?a(e,o):a(o,f)},f=(e>r?a(new na([0,0,0]),this):a(this,new na([255,255,255]))).rgb();return new na(f.concat([this._rgb[3]]))}return ua.apply(void 0,this._rgb.slice(0,3))};var ua=function(r,e,n){return.2126*(r=ca(r))+.7152*(e=ca(e))+.0722*(n=ca(n))},ca=function(r){return(r/=255)<=.03928?r/12.92:aa((r+.055)/1.055,2.4)},ia={},la=w,ha=d.type,sa=ia,da=function(r,e,n){void 0===n&&(n=.5);for(var t=[],a=arguments.length-3;a-- >0;)t[a]=arguments[a+3];var f=t[0]||"lrgb";if(sa[f]||t.length||(f=Object.keys(sa)[0]),!sa[f])throw new Error("interpolation mode "+f+" is not defined");return"object"!==ha(r)&&(r=new la(r)),"object"!==ha(e)&&(e=new la(e)),sa[f](r,e,n).alpha(r.alpha()+n*(e.alpha()-r.alpha()))},ba=w,pa=da;ba.prototype.mix=ba.prototype.interpolate=function(r,e){void 0===e&&(e=.5);for(var n=[],t=arguments.length-2;t-- >0;)n[t]=arguments[t+2];return pa.apply(void 0,[this,r,e].concat(n))};var ga=w;ga.prototype.premultiply=function(r){void 0===r&&(r=!1);var e=this._rgb,n=e[3];return r?(this._rgb=[e[0]*n,e[1]*n,e[2]*n,n],this):new ga([e[0]*n,e[1]*n,e[2]*n,n],"rgb")};var va=w,ya=Ge;va.prototype.saturate=function(r){void 0===r&&(r=1);var e=this,n=e.lch();return n[1]+=ya.Kn*r,n[1]<0&&(n[1]=0),new va(n,"lch").alpha(e.alpha(),!0)},va.prototype.desaturate=function(r){return void 0===r&&(r=1),this.saturate(-r)};var ma=w,wa=d.type;ma.prototype.set=function(r,e,n){void 0===n&&(n=!1);var t=r.split("."),a=t[0],f=t[1],o=this[a]();if(f){var u=a.indexOf(f)-("ok"===a.substr(0,2)?2:0);if(u>-1){if("string"==wa(e))switch(e.charAt(0)){case"+":case"-":o[u]+=+e;break;case"*":o[u]*=+e.substr(1);break;case"/":o[u]/=+e.substr(1);break;default:o[u]=+e}else{if("number"!==wa(e))throw new Error("unsupported value for Color.set");o[u]=e}var c=new ma(o,a);return n?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+f+" in mode "+a)}return o};var ka=w,Ma=function(r,e,n){var t=r._rgb,a=e._rgb;return new ka(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"rgb")};ia.rgb=Ma;var Na=w,_a=Math.sqrt,xa=Math.pow,Oa=function(r,e,n){var t=r._rgb,a=t[0],f=t[1],o=t[2],u=e._rgb,c=u[0],i=u[1],l=u[2];return new Na(_a(xa(a,2)*(1-n)+xa(c,2)*n),_a(xa(f,2)*(1-n)+xa(i,2)*n),_a(xa(o,2)*(1-n)+xa(l,2)*n),"rgb")};ia.lrgb=Oa;var Ea=w,Aa=function(r,e,n){var t=r.lab(),a=e.lab();return new Ea(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"lab")};ia.lab=Aa;var Pa=w,Ra=function(r,e,n,t){var a,f,o,u,c,i,l,h,s,d,b,p,g;return"hsl"===t?(o=r.hsl(),u=e.hsl()):"hsv"===t?(o=r.hsv(),u=e.hsv()):"hcg"===t?(o=r.hcg(),u=e.hcg()):"hsi"===t?(o=r.hsi(),u=e.hsi()):"lch"===t||"hcl"===t?(t="hcl",o=r.hcl(),u=e.hcl()):"oklch"===t&&(o=r.oklch().reverse(),u=e.oklch().reverse()),"h"!==t.substr(0,1)&&"oklch"!==t||(c=(a=o)[0],l=a[1],s=a[2],i=(f=u)[0],h=f[1],d=f[2]),isNaN(c)||isNaN(i)?isNaN(c)?isNaN(i)?p=Number.NaN:(p=i,1!=s&&0!=s||"hsv"==t||(b=h)):(p=c,1!=d&&0!=d||"hsv"==t||(b=l)):p=c+n*(i>c&&i-c>180?i-(c+360):i<c&&c-i>180?i+360-c:i-c),void 0===b&&(b=l+n*(h-l)),g=s+n*(d-s),new Pa("oklch"===t?[g,b,p]:[p,b,g],t)},Fa=Ra,ja=function(r,e,n){return Fa(r,e,n,"lch")};ia.lch=ja,ia.hcl=ja;var Ta=w,Sa=function(r,e,n){var t=r.num(),a=e.num();return new Ta(t+n*(a-t),"num")};ia.num=Sa;var Ga=Ra,La=function(r,e,n){return Ga(r,e,n,"hcg")};ia.hcg=La;var qa=Ra,Da=function(r,e,n){return qa(r,e,n,"hsi")};ia.hsi=Da;var Ca=Ra,Ia=function(r,e,n){return Ca(r,e,n,"hsl")};ia.hsl=Ia;var Ba=Ra,Ya=function(r,e,n){return Ba(r,e,n,"hsv")};ia.hsv=Ya;var Xa=w,$a=function(r,e,n){var t=r.oklab(),a=e.oklab();return new Xa(t[0]+n*(a[0]-t[0]),t[1]+n*(a[1]-t[1]),t[2]+n*(a[2]-t[2]),"oklab")};ia.oklab=$a;var za=Ra,Ua=function(r,e,n){return za(r,e,n,"oklch")};ia.oklch=Ua;var Wa=w,Va=d.clip_rgb,Ha=Math.pow,Ka=Math.sqrt,Za=Math.PI,Ja=Math.cos,Qa=Math.sin,rf=Math.atan2,ef=function(r,e,n){void 0===e&&(e="lrgb"),void 0===n&&(n=null);var t=r.length;n||(n=Array.from(new Array(t)).map((function(){return 1})));var a=t/n.reduce((function(r,e){return r+e}));if(n.forEach((function(r,e){n[e]*=a})),r=r.map((function(r){return new Wa(r)})),"lrgb"===e)return nf(r,n);for(var f=r.shift(),o=f.get(e),u=[],c=0,i=0,l=0;l<o.length;l++)if(o[l]=(o[l]||0)*n[0],u.push(isNaN(o[l])?0:n[0]),"h"===e.charAt(l)&&!isNaN(o[l])){var h=o[l]/180*Za;c+=Ja(h)*n[0],i+=Qa(h)*n[0]}var s=f.alpha()*n[0];r.forEach((function(r,t){var a=r.get(e);s+=r.alpha()*n[t+1];for(var f=0;f<o.length;f++)if(!isNaN(a[f]))if(u[f]+=n[t+1],"h"===e.charAt(f)){var l=a[f]/180*Za;c+=Ja(l)*n[t+1],i+=Qa(l)*n[t+1]}else o[f]+=a[f]*n[t+1]}));for(var d=0;d<o.length;d++)if("h"===e.charAt(d)){for(var b=rf(i/u[d],c/u[d])/Za*180;b<0;)b+=360;for(;b>=360;)b-=360;o[d]=b}else o[d]=o[d]/u[d];return s/=t,new Wa(o,e).alpha(s>.99999?1:s,!0)},nf=function(r,e){for(var n=r.length,t=[0,0,0,0],a=0;a<r.length;a++){var f=r[a],o=e[a]/n,u=f._rgb;t[0]+=Ha(u[0],2)*o,t[1]+=Ha(u[1],2)*o,t[2]+=Ha(u[2],2)*o,t[3]+=u[3]*o}return t[0]=Ka(t[0]),t[1]=Ka(t[1]),t[2]=Ka(t[2]),t[3]>.9999999&&(t[3]=1),new Wa(Va(t))},tf=M,af=d.type,ff=Math.pow,of=function(r){var e="rgb",n=tf("#ccc"),t=0,a=[0,1],f=[],o=[0,0],u=!1,c=[],i=!1,l=0,h=1,s=!1,d={},b=!0,p=1,g=function(r){if((r=r||["#fff","#000"])&&"string"===af(r)&&tf.brewer&&tf.brewer[r.toLowerCase()]&&(r=tf.brewer[r.toLowerCase()]),"array"===af(r)){1===r.length&&(r=[r[0],r[0]]),r=r.slice(0);for(var e=0;e<r.length;e++)r[e]=tf(r[e]);f.length=0;for(var n=0;n<r.length;n++)f.push(n/(r.length-1))}return k(),c=r},v=function(r){if(null!=u){for(var e=u.length-1,n=0;n<e&&r>=u[n];)n++;return n-1}return 0},y=function(r){return r},m=function(r){return r},w=function(r,t){var a,i;if(null==t&&(t=!1),isNaN(r)||null===r)return n;i=t?r:u&&u.length>2?v(r)/(u.length-2):h!==l?(r-l)/(h-l):1,i=m(i),t||(i=y(i)),1!==p&&(i=ff(i,p)),i=o[0]+i*(1-o[0]-o[1]),i=Math.min(1,Math.max(0,i));var s=Math.floor(1e4*i);if(b&&d[s])a=d[s];else{if("array"===af(c))for(var g=0;g<f.length;g++){var w=f[g];if(i<=w){a=c[g];break}if(i>=w&&g===f.length-1){a=c[g];break}if(i>w&&i<f[g+1]){i=(i-w)/(f[g+1]-w),a=tf.interpolate(c[g],c[g+1],i,e);break}}else"function"===af(c)&&(a=c(i));b&&(d[s]=a)}return a},k=function(){return d={}};g(r);var M=function(r){var e=tf(w(r));return i&&e[i]?e[i]():e};return M.classes=function(r){if(null!=r){if("array"===af(r))u=r,a=[r[0],r[r.length-1]];else{var e=tf.analyze(a);u=0===r?[e.min,e.max]:tf.limits(e,"e",r)}return M}return u},M.domain=function(r){if(!arguments.length)return a;l=r[0],h=r[r.length-1],f=[];var e=c.length;if(r.length===e&&l!==h)for(var n=0,t=Array.from(r);n<t.length;n+=1){var o=t[n];f.push((o-l)/(h-l))}else{for(var u=0;u<e;u++)f.push(u/(e-1));if(r.length>2){var i=r.map((function(e,n){return n/(r.length-1)})),s=r.map((function(r){return(r-l)/(h-l)}));s.every((function(r,e){return i[e]===r}))||(m=function(r){if(r<=0||r>=1)return r;for(var e=0;r>=s[e+1];)e++;var n=(r-s[e])/(s[e+1]-s[e]);return i[e]+n*(i[e+1]-i[e])})}}return a=[l,h],M},M.mode=function(r){return arguments.length?(e=r,k(),M):e},M.range=function(r,e){return g(r),M},M.out=function(r){return i=r,M},M.spread=function(r){return arguments.length?(t=r,M):t},M.correctLightness=function(r){return null==r&&(r=!0),s=r,k(),y=s?function(r){for(var e=w(0,!0).lab()[0],n=w(1,!0).lab()[0],t=e>n,a=w(r,!0).lab()[0],f=e+(n-e)*r,o=a-f,u=0,c=1,i=20;Math.abs(o)>.01&&i-- >0;)t&&(o*=-1),o<0?(u=r,r+=.5*(c-r)):(c=r,r+=.5*(u-r)),a=w(r,!0).lab()[0],o=a-f;return r}:function(r){return r},M},M.padding=function(r){return null!=r?("number"===af(r)&&(r=[r,r]),o=r,M):o},M.colors=function(e,n){arguments.length<2&&(n="hex");var t=[];if(0===arguments.length)t=c.slice(0);else if(1===e)t=[M(.5)];else if(e>1){var f=a[0],o=a[1]-f;t=uf(0,e,!1).map((function(r){return M(f+r/(e-1)*o)}))}else{r=[];var i=[];if(u&&u.length>2)for(var l=1,h=u.length,s=1<=h;s?l<h:l>h;s?l++:l--)i.push(.5*(u[l-1]+u[l]));else i=a;t=i.map((function(r){return M(r)}))}return tf[n]&&(t=t.map((function(r){return r[n]()}))),t},M.cache=function(r){return null!=r?(b=r,M):b},M.gamma=function(r){return null!=r?(p=r,M):p},M.nodata=function(r){return null!=r?(n=tf(r),M):n},M};function uf(r,e,n){for(var t=[],a=r<e,f=n?a?e+1:e-1:e,o=r;a?o<f:o>f;a?o++:o--)t.push(o);return t}var cf=w,lf=of,hf=function(r){for(var e=[1,1],n=1;n<r;n++){for(var t=[1],a=1;a<=e.length;a++)t[a]=(e[a]||0)+e[a-1];e=t}return e},sf=function(r){var e,n,t,a,f,o,u;if(2===(r=r.map((function(r){return new cf(r)}))).length)e=r.map((function(r){return r.lab()})),f=e[0],o=e[1],a=function(r){var e=[0,1,2].map((function(e){return f[e]+r*(o[e]-f[e])}));return new cf(e,"lab")};else if(3===r.length)n=r.map((function(r){return r.lab()})),f=n[0],o=n[1],u=n[2],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*f[e]+2*(1-r)*r*o[e]+r*r*u[e]}));return new cf(e,"lab")};else if(4===r.length){var c;t=r.map((function(r){return r.lab()})),f=t[0],o=t[1],u=t[2],c=t[3],a=function(r){var e=[0,1,2].map((function(e){return(1-r)*(1-r)*(1-r)*f[e]+3*(1-r)*(1-r)*r*o[e]+3*(1-r)*r*r*u[e]+r*r*r*c[e]}));return new cf(e,"lab")}}else{if(!(r.length>=5))throw new RangeError("No point in running bezier with only one color.");var i,l,h;i=r.map((function(r){return r.lab()})),h=r.length-1,l=hf(h),a=function(r){var e=1-r,n=[0,1,2].map((function(n){return i.reduce((function(t,a,f){return t+l[f]*Math.pow(e,h-f)*Math.pow(r,f)*a[n]}),0)}));return new cf(n,"lab")}}return a},df=function(r){var e=sf(r);return e.scale=function(){return lf(e)},e},bf=M,pf=function(r,e,n){if(!pf[n])throw new Error("unknown blend mode "+n);return pf[n](r,e)},gf=function(r){return function(e,n){var t=bf(n).rgb(),a=bf(e).rgb();return bf.rgb(r(t,a))}},vf=function(r){return function(e,n){var t=[];return t[0]=r(e[0],n[0]),t[1]=r(e[1],n[1]),t[2]=r(e[2],n[2]),t}},yf=function(r){return r},mf=function(r,e){return r*e/255},wf=function(r,e){return r>e?e:r},kf=function(r,e){return r>e?r:e},Mf=function(r,e){return 255*(1-(1-r/255)*(1-e/255))},Nf=function(r,e){return e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255))},_f=function(r,e){return 255*(1-(1-e/255)/(r/255))},xf=function(r,e){return 255===r||(r=e/255*255/(1-r/255))>255?255:r};pf.normal=gf(vf(yf)),pf.multiply=gf(vf(mf)),pf.screen=gf(vf(Mf)),pf.overlay=gf(vf(Nf)),pf.darken=gf(vf(wf)),pf.lighten=gf(vf(kf)),pf.dodge=gf(vf(xf)),pf.burn=gf(vf(_f));for(var Of=pf,Ef=d.type,Af=d.clip_rgb,Pf=d.TWOPI,Rf=Math.pow,Ff=Math.sin,jf=Math.cos,Tf=M,Sf=function(r,e,n,t,a){void 0===r&&(r=300),void 0===e&&(e=-1.5),void 0===n&&(n=1),void 0===t&&(t=1),void 0===a&&(a=[0,1]);var f,o=0;"array"===Ef(a)?f=a[1]-a[0]:(f=0,a=[a,a]);var u=function(u){var c=Pf*((r+120)/360+e*u),i=Rf(a[0]+f*u,t),l=(0!==o?n[0]+u*o:n)*i*(1-i)/2,h=jf(c),s=Ff(c);return Tf(Af([255*(i+l*(-.14861*h+1.78277*s)),255*(i+l*(-.29227*h-.90649*s)),255*(i+l*(1.97294*h)),1]))};return u.start=function(e){return null==e?r:(r=e,u)},u.rotations=function(r){return null==r?e:(e=r,u)},u.gamma=function(r){return null==r?t:(t=r,u)},u.hue=function(r){return null==r?n:("array"===Ef(n=r)?0==(o=n[1]-n[0])&&(n=n[1]):o=0,u)},u.lightness=function(r){return null==r?a:("array"===Ef(r)?(a=r,f=r[1]-r[0]):(a=[r,r],f=0),u)},u.scale=function(){return Tf.scale(u)},u.hue(n),u},Gf=w,Lf="0123456789abcdef",qf=Math.floor,Df=Math.random,Cf=function(){for(var r="#",e=0;e<6;e++)r+=Lf.charAt(qf(16*Df()));return new Gf(r,"hex")},If=u,Bf=Math.log,Yf=Math.pow,Xf=Math.floor,$f=Math.abs,zf=function(r,e){void 0===e&&(e=null);var n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===If(r)&&(r=Object.values(r)),r.forEach((function(r){e&&"object"===If(r)&&(r=r[e]),null==r||isNaN(r)||(n.values.push(r),n.sum+=r,r<n.min&&(n.min=r),r>n.max&&(n.max=r),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(r,e){return Uf(n,r,e)},n},Uf=function(r,e,n){void 0===e&&(e="equal"),void 0===n&&(n=7),"array"==If(r)&&(r=zf(r));var t=r.min,a=r.max,f=r.values.sort((function(r,e){return r-e}));if(1===n)return[t,a];var o=[];if("c"===e.substr(0,1)&&(o.push(t),o.push(a)),"e"===e.substr(0,1)){o.push(t);for(var u=1;u<n;u++)o.push(t+u/n*(a-t));o.push(a)}else if("l"===e.substr(0,1)){if(t<=0)throw new Error("Logarithmic scales are only possible for values > 0");var c=Math.LOG10E*Bf(t),i=Math.LOG10E*Bf(a);o.push(t);for(var l=1;l<n;l++)o.push(Yf(10,c+l/n*(i-c)));o.push(a)}else if("q"===e.substr(0,1)){o.push(t);for(var h=1;h<n;h++){var s=(f.length-1)*h/n,d=Xf(s);if(d===s)o.push(f[d]);else{var b=s-d;o.push(f[d]*(1-b)+f[d+1]*b)}}o.push(a)}else if("k"===e.substr(0,1)){var p,g=f.length,v=new Array(g),y=new Array(n),m=!0,w=0,k=null;(k=[]).push(t);for(var M=1;M<n;M++)k.push(t+M/n*(a-t));for(k.push(a);m;){for(var N=0;N<n;N++)y[N]=0;for(var _=0;_<g;_++)for(var x=f[_],O=Number.MAX_VALUE,E=void 0,A=0;A<n;A++){var P=$f(k[A]-x);P<O&&(O=P,E=A),y[E]++,v[_]=E}for(var R=new Array(n),F=0;F<n;F++)R[F]=null;for(var j=0;j<g;j++)null===R[p=v[j]]?R[p]=f[j]:R[p]+=f[j];for(var T=0;T<n;T++)R[T]*=1/y[T];m=!1;for(var S=0;S<n;S++)if(R[S]!==k[S]){m=!0;break}k=R,++w>200&&(m=!1)}for(var G={},L=0;L<n;L++)G[L]=[];for(var q=0;q<g;q++)G[p=v[q]].push(f[q]);for(var D=[],C=0;C<n;C++)D.push(G[C][0]),D.push(G[C][G[C].length-1]);D=D.sort((function(r,e){return r-e})),o.push(D[0]);for(var I=1;I<D.length;I+=2){var B=D[I];isNaN(B)||-1!==o.indexOf(B)||o.push(B)}}return o},Wf={analyze:zf,limits:Uf},Vf=w,Hf=function(r,e){r=new Vf(r),e=new Vf(e);var n=r.luminance(),t=e.luminance();return n>t?(n+.05)/(t+.05):(t+.05)/(n+.05)},Kf=w,Zf=Math.sqrt,Jf=Math.pow,Qf=Math.min,ro=Math.max,eo=Math.atan2,no=Math.abs,to=Math.cos,ao=Math.sin,fo=Math.exp,oo=Math.PI,uo=function(r,e,n,t,a){void 0===n&&(n=1),void 0===t&&(t=1),void 0===a&&(a=1);var f=function(r){return 360*r/(2*oo)},o=function(r){return 2*oo*r/360};r=new Kf(r),e=new Kf(e);var u=Array.from(r.lab()),c=u[0],i=u[1],l=u[2],h=Array.from(e.lab()),s=h[0],d=h[1],b=h[2],p=(c+s)/2,g=(Zf(Jf(i,2)+Jf(l,2))+Zf(Jf(d,2)+Jf(b,2)))/2,v=.5*(1-Zf(Jf(g,7)/(Jf(g,7)+Jf(25,7)))),y=i*(1+v),m=d*(1+v),w=Zf(Jf(y,2)+Jf(l,2)),k=Zf(Jf(m,2)+Jf(b,2)),M=(w+k)/2,N=f(eo(l,y)),_=f(eo(b,m)),x=N>=0?N:N+360,O=_>=0?_:_+360,E=no(x-O)>180?(x+O+360)/2:(x+O)/2,A=1-.17*to(o(E-30))+.24*to(o(2*E))+.32*to(o(3*E+6))-.2*to(o(4*E-63)),P=O-x;P=no(P)<=180?P:O<=x?P+360:P-360,P=2*Zf(w*k)*ao(o(P)/2);var R=s-c,F=k-w,j=1+.015*Jf(p-50,2)/Zf(20+Jf(p-50,2)),T=1+.045*M,S=1+.015*M*A,G=30*fo(-Jf((E-275)/25,2)),L=-2*Zf(Jf(M,7)/(Jf(M,7)+Jf(25,7)))*ao(2*o(G)),q=Zf(Jf(R/(n*j),2)+Jf(F/(t*T),2)+Jf(P/(a*S),2)+L*(F/(t*T))*(P/(a*S)));return ro(0,Qf(100,q))},co=w,io=function(r,e,n){void 0===n&&(n="lab"),r=new co(r),e=new co(e);var t=r.get(n),a=e.get(n),f=0;for(var o in t){var u=(t[o]||0)-(a[o]||0);f+=u*u}return Math.sqrt(f)},lo=w,ho=function(){for(var r=[],e=arguments.length;e--;)r[e]=arguments[e];try{return new(Function.prototype.bind.apply(lo,[null].concat(r))),!0}catch(r){return!1}},so=M,bo=of,po={cool:function(){return bo([so.hsl(180,1,.9),so.hsl(250,.7,.4)])},hot:function(){return bo(["#000","#f00","#ff0","#fff"]).mode("rgb")}},go={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},vo=0,yo=Object.keys(go);vo<yo.length;vo+=1){var mo=yo[vo];go[mo.toLowerCase()]=go[mo]}var wo=go,ko=M;return ko.average=ef,ko.bezier=df,ko.blend=Of,ko.cubehelix=Sf,ko.mix=ko.interpolate=da,ko.random=Cf,ko.scale=of,ko.analyze=Wf.analyze,ko.contrast=Hf,ko.deltaE=uo,ko.distance=io,ko.limits=Wf.limits,ko.valid=ho,ko.scales=po,ko.colors=qn,ko.brewer=wo,ko}(),f=null,o=function(){return null==f?void 0:f.next()},u=function(r){var e=r.changedTouches,n=r.target.getBoundingClientRect();return e?{x:e[0].clientX-n.left,y:e[0].clientY-n.top}:{x:r.clientX-n.left,y:r.clientY-n.top}},c=function(r,e,t){var a,u,c,i;return n(this,(function(n){switch(n.label){case 0:a=0,n.label=1;case 1:return a<e.length?(0===a&&(r.beginPath(),r.moveTo(e[0].x,e[0].y)),(u=e[a])?(r.lineTo(u.x,u.y),r.strokeStyle=t,r.stroke()):(c=e[a+1],i=e[a-1],c?(r.beginPath(),r.moveTo(c.x,c.y)):(r.beginPath(),r.moveTo(i.x,i.y))),setTimeout((function(){f&&window.requestAnimationFrame(o)}),10+function(r,e,n,t){return void 0===r&&(r=0),void 0===e&&(e=20),void 0===n&&(n=10),void 0===t&&(t=10),isNaN(r)?0:Math.abs(e/2+n*Math.sin(r/t)-0)}(a)),[4,a++]):[3,3];case 2:return n.sent(),[3,1];case 3:return[2]}}))},i=r.forwardRef((function(n,t){var o=n.color,i=void 0===o?"#000000":o,l=n.initialData,h=void 0===l?[]:l,s=n.width,d=void 0===s?"700":s,b=n.height,p=void 0===b?"300":b,g=function(r,e){var n={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(n[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(t=Object.getOwnPropertySymbols(r);a<t.length;a++)e.indexOf(t[a])<0&&Object.prototype.propertyIsEnumerable.call(r,t[a])&&(n[t[a]]=r[t[a]])}return n}(n,["color","initialData","width","height"]),v=r.useRef(null),y=r.useState(h||[]),m=y[0],w=y[1],k=r.useState(!1),M=k[0],N=k[1],_=r.useState(null),x=_[0],O=_[1],E=function(r){if(x){var e=u(r),n=e.x,t=e.y;x.beginPath(),x.moveTo(n,t),N(!0)}},A=function(r){if(x&&M){var e=u(r),n=e.x,t=e.y;x.lineTo(n,t),x.strokeStyle=i,x.stroke(),m.push({x:n,y:t}),w(m)}},P=function(r){if(x&&M){var e=u(r),n=e.x,t=e.y;x.lineTo(n,t),x.strokeStyle=i,x.stroke(),m.push(null),w(m),N(!1)}};r.useImperativeHandle(t,(function(){return{internalRef:v,getRawData:function(){return m.filter((function(r,e){return e<m.length-1}))},clear:function(){x&&(w([]),x.clearRect(0,0,x.canvas.width,x.canvas.height))},getDataURL:function(){return x?x.canvas.toDataURL("image/png"):""}}}));return r.useEffect((function(){!function(){var r=v.current;if(r){var e=r.getContext("2d");if(e){var n=a(i).rgb();e.shadowColor="rgba(".concat(n[0],", ").concat(n[1],", ").concat(n[2],", .5)"),e.shadowBlur=1.5,e.lineCap="round",e.lineJoin="round",e.lineWidth=1,O(e)}}}()}),[]),r.useEffect((function(){x&&function(r,e,n){(f=c(r,e,n)).next()}(x,h,i)}),[x]),r.createElement("canvas",e({},g,{width:d,height:p,ref:v,onMouseDown:E,onTouchStart:E,onMouseMove:A,onTouchMove:A,onMouseUp:P,onMouseOut:P,onTouchEnd:P}))}));export{i as HandSigned}; //# sourceMappingURL=index.js.map