/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var al=Object.create;var Kt=Object.defineProperty;var sl=Object.getOwnPropertyDescriptor;var ol=Object.getOwnPropertyNames;var ll=Object.getPrototypeOf,cl=Object.prototype.hasOwnProperty;var Zr=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),ul=(e,n)=>{for(var t in n)Kt(e,t,{get:n[t],enumerable:!0})},Zn=(e,n,t,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of ol(n))!cl.call(e,i)&&i!==t&&Kt(e,i,{get:()=>n[i],enumerable:!(a=sl(n,i))||a.enumerable});return e};var Xt=(e,n,t)=>(t=e!=null?al(ll(e)):{},Zn(n||!e||!e.__esModule?Kt(t,"default",{value:e,enumerable:!0}):t,e)),fl=e=>Zn(Kt({},"__esModule",{value:!0}),e);var Jn=Zr((Jr,en)=>{(function(e,n){typeof Jr=="object"&&typeof en!="undefined"?en.exports=n():typeof define=="function"&&define.amd?define(n):e.chroma=n()})(Jr,function(){"use strict";for(var e=function(r,s,o){return s===void 0&&(s=0),o===void 0&&(o=1),ro?o:r},n=function(r){r._clipped=!1,r._unclipped=r.slice(0);for(var s=0;s<=3;s++)s<3?((r[s]<0||r[s]>255)&&(r._clipped=!0),r[s]=e(r[s],0,255)):s===3&&(r[s]=e(r[s],0,1));return r},t={},a=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];a=3?Array.prototype.slice.call(r):c(r[0])=="object"&&s?s.split("").filter(function(o){return r[0][o]!==void 0}).map(function(o){return r[0][o]}):r[0]},p=function(r){if(r.length<2)return null;var s=r.length-1;return c(r[s])=="string"?r[s].toLowerCase():null},w=Math.PI,S={clip_rgb:n,limit:e,type:c,unpack:f,last:p,PI:w,TWOPI:w*2,PITHIRD:w/3,DEG2RAD:w/180,RAD2DEG:180/w},E={format:{},autodetect:[]},B=S.last,Y=S.clip_rgb,K=S.type,Q=function(){for(var s=[],o=arguments.length;o--;)s[o]=arguments[o];var g=this;if(K(s[0])==="object"&&s[0].constructor&&s[0].constructor===this.constructor)return s[0];var b=B(s),y=!1;if(!b){y=!0,E.sorted||(E.autodetect=E.autodetect.sort(function(R,O){return O.p-R.p}),E.sorted=!0);for(var d=0,A=E.autodetect;d4?r[4]:1;return y===1?[0,0,0,d]:[o>=1?0:255*(1-o)*(1-y),g>=1?0:255*(1-g)*(1-y),b>=1?0:255*(1-b)*(1-y),d]},Pe=xe,Qe=S.unpack,ie=S.type;L.prototype.cmyk=function(){return qe(this._rgb)},F.cmyk=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["cmyk"])))},E.format.cmyk=Pe,E.autodetect.push({p:2,test:function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];if(r=Qe(r,"cmyk"),ie(r)==="array"&&r.length===4)return"cmyk"}});var Tt=S.unpack,Ve=S.last,V=function(r){return Math.round(r*100)/100},M=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=Tt(r,"hsla"),g=Ve(r)||"lsa";return o[0]=V(o[0]||0),o[1]=V(o[1]*100)+"%",o[2]=V(o[2]*100)+"%",g==="hsla"||o.length>3&&o[3]<1?(o[3]=o.length>3?o[3]:1,g="hsla"):o.length=3,g+"("+o.join(",")+")"},_=M,u=S.unpack,h=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];r=u(r,"rgba");var o=r[0],g=r[1],b=r[2];o/=255,g/=255,b/=255;var y=Math.min(o,g,b),d=Math.max(o,g,b),A=(d+y)/2,k,N;return d===y?(k=0,N=Number.NaN):k=A<.5?(d-y)/(d+y):(d-y)/(2-d-y),o==d?N=(g-b)/(d-y):g==d?N=2+(b-o)/(d-y):b==d&&(N=4+(o-g)/(d-y)),N*=60,N<0&&(N+=360),r.length>3&&r[3]!==void 0?[N,k,A,r[3]]:[N,k,A]},m=h,C=S.unpack,v=S.last,x=Math.round,T=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=C(r,"rgba"),g=v(r)||"rgb";return g.substr(0,3)=="hsl"?_(m(o),g):(o[0]=x(o[0]),o[1]=x(o[1]),o[2]=x(o[2]),(g==="rgba"||o.length>3&&o[3]<1)&&(o[3]=o.length>3?o[3]:1,g="rgba"),g+"("+o.slice(0,g==="rgb"?3:4).join(",")+")")},I=T,D=S.unpack,P=Math.round,G=function(){for(var r,s=[],o=arguments.length;o--;)s[o]=arguments[o];s=D(s,"hsl");var g=s[0],b=s[1],y=s[2],d,A,k;if(b===0)d=A=k=y*255;else{var N=[0,0,0],R=[0,0,0],O=y<.5?y*(1+b):y+b-y*b,j=2*y-O,H=g/360;N[0]=H+1/3,N[1]=H,N[2]=H-1/3;for(var X=0;X<3;X++)N[X]<0&&(N[X]+=1),N[X]>1&&(N[X]-=1),6*N[X]<1?R[X]=j+(O-j)*6*N[X]:2*N[X]<1?R[X]=O:3*N[X]<2?R[X]=j+(O-j)*(2/3-N[X])*6:R[X]=j;r=[P(R[0]*255),P(R[1]*255),P(R[2]*255)],d=r[0],A=r[1],k=r[2]}return s.length>3?[d,A,k,s[3]]:[d,A,k,1]},q=G,U=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,fe=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,le=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Oe=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ye=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Se=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ae=Math.round,Re=function(r){r=r.toLowerCase().trim();var s;if(E.format.named)try{return E.format.named(r)}catch(X){}if(s=r.match(U)){for(var o=s.slice(1,4),g=0;g<3;g++)o[g]=+o[g];return o[3]=1,o}if(s=r.match(fe)){for(var b=s.slice(1,5),y=0;y<4;y++)b[y]=+b[y];return b}if(s=r.match(le)){for(var d=s.slice(1,4),A=0;A<3;A++)d[A]=ae(d[A]*2.55);return d[3]=1,d}if(s=r.match(Oe)){for(var k=s.slice(1,5),N=0;N<3;N++)k[N]=ae(k[N]*2.55);return k[3]=+k[3],k}if(s=r.match(ye)){var R=s.slice(1,4);R[1]*=.01,R[2]*=.01;var O=q(R);return O[3]=1,O}if(s=r.match(Se)){var j=s.slice(1,4);j[1]*=.01,j[2]*=.01;var H=q(j);return H[3]=+s[4],H}};Re.test=function(r){return U.test(r)||fe.test(r)||le.test(r)||Oe.test(r)||ye.test(r)||Se.test(r)};var _e=Re,Ke=S.type;L.prototype.css=function(r){return I(this._rgb,r)},F.css=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["css"])))},E.format.css=_e,E.autodetect.push({p:5,test:function(r){for(var s=[],o=arguments.length-1;o-- >0;)s[o]=arguments[o+1];if(!s.length&&Ke(r)==="string"&&_e.test(r))return"css"}});var Le=S.unpack;E.format.gl=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=Le(r,"rgba");return o[0]*=255,o[1]*=255,o[2]*=255,o},F.gl=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["gl"])))},L.prototype.gl=function(){var r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};var et=S.unpack,gt=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=et(r,"rgb"),g=o[0],b=o[1],y=o[2],d=Math.min(g,b,y),A=Math.max(g,b,y),k=A-d,N=k*100/255,R=d/(255-k)*100,O;return k===0?O=Number.NaN:(g===A&&(O=(b-y)/k),b===A&&(O=2+(y-g)/k),y===A&&(O=4+(g-b)/k),O*=60,O<0&&(O+=360)),[O,N,R]},tt=gt,Ar=S.unpack,kr=Math.floor,Tr=function(){for(var r,s,o,g,b,y,d=[],A=arguments.length;A--;)d[A]=arguments[A];d=Ar(d,"hcg");var k=d[0],N=d[1],R=d[2],O,j,H;R=R*255;var X=N*255;if(N===0)O=j=H=R;else{k===360&&(k=0),k>360&&(k-=360),k<0&&(k+=360),k/=60;var ee=kr(k),Z=k-ee,se=R*(1-N),ge=se+X*(1-Z),Me=se+X*Z,Ie=se+X;switch(ee){case 0:r=[Ie,Me,se],O=r[0],j=r[1],H=r[2];break;case 1:s=[ge,Ie,se],O=s[0],j=s[1],H=s[2];break;case 2:o=[se,Ie,Me],O=o[0],j=o[1],H=o[2];break;case 3:g=[se,ge,Ie],O=g[0],j=g[1],H=g[2];break;case 4:b=[Me,se,Ie],O=b[0],j=b[1],H=b[2];break;case 5:y=[Ie,se,ge],O=y[0],j=y[1],H=y[2];break}}return[O,j,H,d.length>3?d[3]:1]},Lr=Tr,Mr=S.unpack,Ir=S.type;L.prototype.hcg=function(){return tt(this._rgb)},F.hcg=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["hcg"])))},E.format.hcg=Lr,E.autodetect.push({p:1,test:function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];if(r=Mr(r,"hcg"),Ir(r)==="array"&&r.length===3)return"hcg"}});var jt=S.unpack,Lt=S.last,Gt=Math.round,ja=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=jt(r,"rgba"),g=o[0],b=o[1],y=o[2],d=o[3],A=Lt(r)||"auto";d===void 0&&(d=1),A==="auto"&&(A=d<1?"rgba":"rgb"),g=Gt(g),b=Gt(b),y=Gt(y);var k=g<<16|b<<8|y,N="000000"+k.toString(16);N=N.substr(N.length-6);var R="0"+Gt(d*255).toString(16);switch(R=R.substr(R.length-2),A.toLowerCase()){case"rgba":return"#"+N+R;case"argb":return"#"+R+N;default:return"#"+N}},An=ja,Ga=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Ya=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Ua=function(r){if(r.match(Ga)){(r.length===4||r.length===7)&&(r=r.substr(1)),r.length===3&&(r=r.split(""),r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]);var s=parseInt(r,16),o=s>>16,g=s>>8&255,b=s&255;return[o,g,b,1]}if(r.match(Ya)){(r.length===5||r.length===9)&&(r=r.substr(1)),r.length===4&&(r=r.split(""),r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);var y=parseInt(r,16),d=y>>24&255,A=y>>16&255,k=y>>8&255,N=Math.round((y&255)/255*100)/100;return[d,A,k,N]}throw new Error("unknown hex color: "+r)},kn=Ua,Wa=S.type;L.prototype.hex=function(r){return An(this._rgb,r)},F.hex=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["hex"])))},E.format.hex=kn,E.autodetect.push({p:4,test:function(r){for(var s=[],o=arguments.length-1;o-- >0;)s[o]=arguments[o+1];if(!s.length&&Wa(r)==="string"&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});var qa=S.unpack,Tn=S.TWOPI,za=Math.min,Ka=Math.sqrt,Xa=Math.acos,Qa=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=qa(r,"rgb"),g=o[0],b=o[1],y=o[2];g/=255,b/=255,y/=255;var d,A=za(g,b,y),k=(g+b+y)/3,N=k>0?1-A/k:0;return N===0?d=NaN:(d=(g-b+(g-y))/2,d/=Ka((g-b)*(g-b)+(g-y)*(b-y)),d=Xa(d),y>b&&(d=Tn-d),d/=Tn),[d*360,N,k]},Za=Qa,Ja=S.unpack,Fr=S.limit,pt=S.TWOPI,Nr=S.PITHIRD,ht=Math.cos,es=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];r=Ja(r,"hsi");var o=r[0],g=r[1],b=r[2],y,d,A;return isNaN(o)&&(o=0),isNaN(g)&&(g=0),o>360&&(o-=360),o<0&&(o+=360),o/=360,o<1/3?(A=(1-g)/3,y=(1+g*ht(pt*o)/ht(Nr-pt*o))/3,d=1-(A+y)):o<2/3?(o-=1/3,y=(1-g)/3,d=(1+g*ht(pt*o)/ht(Nr-pt*o))/3,A=1-(y+d)):(o-=2/3,d=(1-g)/3,A=(1+g*ht(pt*o)/ht(Nr-pt*o))/3,y=1-(d+A)),y=Fr(b*y*3),d=Fr(b*d*3),A=Fr(b*A*3),[y*255,d*255,A*255,r.length>3?r[3]:1]},ts=es,rs=S.unpack,ns=S.type;L.prototype.hsi=function(){return Za(this._rgb)},F.hsi=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["hsi"])))},E.format.hsi=ts,E.autodetect.push({p:2,test:function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];if(r=rs(r,"hsi"),ns(r)==="array"&&r.length===3)return"hsi"}});var is=S.unpack,as=S.type;L.prototype.hsl=function(){return m(this._rgb)},F.hsl=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["hsl"])))},E.format.hsl=q,E.autodetect.push({p:2,test:function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];if(r=is(r,"hsl"),as(r)==="array"&&r.length===3)return"hsl"}});var ss=S.unpack,os=Math.min,ls=Math.max,cs=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];r=ss(r,"rgb");var o=r[0],g=r[1],b=r[2],y=os(o,g,b),d=ls(o,g,b),A=d-y,k,N,R;return R=d/255,d===0?(k=Number.NaN,N=0):(N=A/d,o===d&&(k=(g-b)/A),g===d&&(k=2+(b-o)/A),b===d&&(k=4+(o-g)/A),k*=60,k<0&&(k+=360)),[k,N,R]},us=cs,fs=S.unpack,gs=Math.floor,ps=function(){for(var r,s,o,g,b,y,d=[],A=arguments.length;A--;)d[A]=arguments[A];d=fs(d,"hsv");var k=d[0],N=d[1],R=d[2],O,j,H;if(R*=255,N===0)O=j=H=R;else{k===360&&(k=0),k>360&&(k-=360),k<0&&(k+=360),k/=60;var X=gs(k),ee=k-X,Z=R*(1-N),se=R*(1-N*ee),ge=R*(1-N*(1-ee));switch(X){case 0:r=[R,ge,Z],O=r[0],j=r[1],H=r[2];break;case 1:s=[se,R,Z],O=s[0],j=s[1],H=s[2];break;case 2:o=[Z,R,ge],O=o[0],j=o[1],H=o[2];break;case 3:g=[Z,se,R],O=g[0],j=g[1],H=g[2];break;case 4:b=[ge,Z,R],O=b[0],j=b[1],H=b[2];break;case 5:y=[R,Z,se],O=y[0],j=y[1],H=y[2];break}}return[O,j,H,d.length>3?d[3]:1]},hs=ps,ds=S.unpack,vs=S.type;L.prototype.hsv=function(){return us(this._rgb)},F.hsv=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["hsv"])))},E.format.hsv=hs,E.autodetect.push({p:2,test:function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];if(r=ds(r,"hsv"),vs(r)==="array"&&r.length===3)return"hsv"}});var Be={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},ms=S.unpack,Ln=Math.pow,bs=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=ms(r,"rgb"),g=o[0],b=o[1],y=o[2],d=ys(g,b,y),A=d[0],k=d[1],N=d[2],R=116*k-16;return[R<0?0:R,500*(A-k),200*(k-N)]},Or=function(r){return(r/=255)<=.04045?r/12.92:Ln((r+.055)/1.055,2.4)},Dr=function(r){return r>Be.t3?Ln(r,1/3):r/Be.t2+Be.t0},ys=function(r,s,o){r=Or(r),s=Or(s),o=Or(o);var g=Dr((.4124564*r+.3575761*s+.1804375*o)/Be.Xn),b=Dr((.2126729*r+.7151522*s+.072175*o)/Be.Yn),y=Dr((.0193339*r+.119192*s+.9503041*o)/Be.Zn);return[g,b,y]},Mn=bs,Ss=S.unpack,Cs=Math.pow,xs=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];r=Ss(r,"lab");var o=r[0],g=r[1],b=r[2],y,d,A,k,N,R;return d=(o+16)/116,y=isNaN(g)?d:d+g/500,A=isNaN(b)?d:d-b/200,d=Be.Yn*$r(d),y=Be.Xn*$r(y),A=Be.Zn*$r(A),k=Rr(3.2404542*y-1.5371385*d-.4985314*A),N=Rr(-.969266*y+1.8760108*d+.041556*A),R=Rr(.0556434*y-.2040259*d+1.0572252*A),[k,N,R,r.length>3?r[3]:1]},Rr=function(r){return 255*(r<=.00304?12.92*r:1.055*Cs(r,1/2.4)-.055)},$r=function(r){return r>Be.t1?r*r*r:Be.t2*(r-Be.t0)},In=xs,ws=S.unpack,Es=S.type;L.prototype.lab=function(){return Mn(this._rgb)},F.lab=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["lab"])))},E.format.lab=In,E.autodetect.push({p:2,test:function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];if(r=ws(r,"lab"),Es(r)==="array"&&r.length===3)return"lab"}});var _s=S.unpack,As=S.RAD2DEG,ks=Math.sqrt,Ts=Math.atan2,Ls=Math.round,Ms=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=_s(r,"lab"),g=o[0],b=o[1],y=o[2],d=ks(b*b+y*y),A=(Ts(y,b)*As+360)%360;return Ls(d*1e4)===0&&(A=Number.NaN),[g,d,A]},Is=Ms,Fs=S.unpack,Ns=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=Fs(r,"rgb"),g=o[0],b=o[1],y=o[2],d=Mn(g,b,y),A=d[0],k=d[1],N=d[2];return Is(A,k,N)},Fn=Ns,Os=S.unpack,Ds=S.DEG2RAD,Rs=Math.sin,$s=Math.cos,Ps=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=Os(r,"lch"),g=o[0],b=o[1],y=o[2];return isNaN(y)&&(y=0),y=y*Ds,[g,$s(y)*b,Rs(y)*b]},Vs=Ps,Bs=S.unpack,Hs=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];r=Bs(r,"lch");var o=r[0],g=r[1],b=r[2],y=Vs(o,g,b),d=y[0],A=y[1],k=y[2],N=In(d,A,k),R=N[0],O=N[1],j=N[2];return[R,O,j,r.length>3?r[3]:1]},Nn=Hs,js=S.unpack,Gs=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=js(r,"hcl").reverse();return Nn.apply(void 0,o)},Ys=Gs,Us=S.unpack,Ws=S.type;L.prototype.lch=function(){return Fn(this._rgb)},L.prototype.hcl=function(){return Fn(this._rgb).reverse()},F.lch=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["lch"])))},F.hcl=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["hcl"])))},E.format.lch=Nn,E.format.hcl=Ys,["lch","hcl"].forEach(function(r){return E.autodetect.push({p:2,test:function(){for(var s=[],o=arguments.length;o--;)s[o]=arguments[o];if(s=Us(s,r),Ws(s)==="array"&&s.length===3)return r}})});var qs={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"},dt=qs,zs=S.type;L.prototype.name=function(){for(var r=An(this._rgb,"rgb"),s=0,o=Object.keys(dt);s0;)s[o]=arguments[o+1];if(!s.length&&zs(r)==="string"&&dt[r.toLowerCase()])return"named"}});var Ks=S.unpack,Xs=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=Ks(r,"rgb"),g=o[0],b=o[1],y=o[2];return(g<<16)+(b<<8)+y},Qs=Xs,Zs=S.type,Js=function(r){if(Zs(r)=="number"&&r>=0&&r<=16777215){var s=r>>16,o=r>>8&255,g=r&255;return[s,o,g,1]}throw new Error("unknown num color: "+r)},eo=Js,to=S.type;L.prototype.num=function(){return Qs(this._rgb)},F.num=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["num"])))},E.format.num=eo,E.autodetect.push({p:5,test:function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];if(r.length===1&&to(r[0])==="number"&&r[0]>=0&&r[0]<=16777215)return"num"}});var On=S.unpack,Dn=S.type,Rn=Math.round;L.prototype.rgb=function(r){return r===void 0&&(r=!0),r===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Rn)},L.prototype.rgba=function(r){return r===void 0&&(r=!0),this._rgb.slice(0,4).map(function(s,o){return o<3?r===!1?s:Rn(s):s})},F.rgb=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["rgb"])))},E.format.rgb=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=On(r,"rgba");return o[3]===void 0&&(o[3]=1),o},E.autodetect.push({p:3,test:function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];if(r=On(r,"rgba"),Dn(r)==="array"&&(r.length===3||r.length===4&&Dn(r[3])=="number"&&r[3]>=0&&r[3]<=1))return"rgb"}});var Yt=Math.log,ro=function(r){var s=r/100,o,g,b;return s<66?(o=255,g=-155.25485562709179-.44596950469579133*(g=s-2)+104.49216199393888*Yt(g),b=s<20?0:-254.76935184120902+.8274096064007395*(b=s-10)+115.67994401066147*Yt(b)):(o=351.97690566805693+.114206453784165*(o=s-55)-40.25366309332127*Yt(o),g=325.4494125711974+.07943456536662342*(g=s-50)-28.0852963507957*Yt(g),b=255),[o,g,b,1]},$n=ro,no=S.unpack,io=Math.round,ao=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];for(var o=no(r,"rgb"),g=o[0],b=o[2],y=1e3,d=4e4,A=.4,k;d-y>A;){k=(d+y)*.5;var N=$n(k);N[2]/N[0]>=b/g?d=k:y=k}return io(k)},so=ao;L.prototype.temp=L.prototype.kelvin=L.prototype.temperature=function(){return so(this._rgb)},F.temp=F.kelvin=F.temperature=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["temp"])))},E.format.temp=E.format.kelvin=E.format.temperature=$n;var oo=S.type;L.prototype.alpha=function(r,s){return s===void 0&&(s=!1),r!==void 0&&oo(r)==="number"?s?(this._rgb[3]=r,this):new L([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]},L.prototype.clipped=function(){return this._rgb._clipped||!1},L.prototype.darken=function(r){r===void 0&&(r=1);var s=this,o=s.lab();return o[0]-=Be.Kn*r,new L(o,"lab").alpha(s.alpha(),!0)},L.prototype.brighten=function(r){return r===void 0&&(r=1),this.darken(-r)},L.prototype.darker=L.prototype.darken,L.prototype.brighter=L.prototype.brighten,L.prototype.get=function(r){var s=r.split("."),o=s[0],g=s[1],b=this[o]();if(g){var y=o.indexOf(g);if(y>-1)return b[y];throw new Error("unknown channel "+g+" in mode "+o)}else return b};var lo=S.type,co=Math.pow,uo=1e-7,fo=20;L.prototype.luminance=function(r){if(r!==void 0&&lo(r)==="number"){if(r===0)return new L([0,0,0,this._rgb[3]],"rgb");if(r===1)return new L([255,255,255,this._rgb[3]],"rgb");var s=this.luminance(),o="rgb",g=fo,b=function(d,A){var k=d.interpolate(A,.5,o),N=k.luminance();return Math.abs(r-N)r?b(d,k):b(k,A)},y=(s>r?b(new L([0,0,0]),this):b(this,new L([255,255,255]))).rgb();return new L(y.concat([this._rgb[3]]))}return go.apply(void 0,this._rgb.slice(0,3))};var go=function(r,s,o){return r=Pr(r),s=Pr(s),o=Pr(o),.2126*r+.7152*s+.0722*o},Pr=function(r){return r/=255,r<=.03928?r/12.92:co((r+.055)/1.055,2.4)},He={},Pn=S.type,Vn=function(r,s,o){o===void 0&&(o=.5);for(var g=[],b=arguments.length-3;b-- >0;)g[b]=arguments[b+3];var y=g[0]||"lrgb";if(!He[y]&&!g.length&&(y=Object.keys(He)[0]),!He[y])throw new Error("interpolation mode "+y+" is not defined");return Pn(r)!=="object"&&(r=new L(r)),Pn(s)!=="object"&&(s=new L(s)),He[y](r,s,o).alpha(r.alpha()+o*(s.alpha()-r.alpha()))};L.prototype.mix=L.prototype.interpolate=function(r,s){s===void 0&&(s=.5);for(var o=[],g=arguments.length-2;g-- >0;)o[g]=arguments[g+2];return Vn.apply(void 0,[this,r,s].concat(o))},L.prototype.premultiply=function(r){r===void 0&&(r=!1);var s=this._rgb,o=s[3];return r?(this._rgb=[s[0]*o,s[1]*o,s[2]*o,o],this):new L([s[0]*o,s[1]*o,s[2]*o,o],"rgb")},L.prototype.saturate=function(r){r===void 0&&(r=1);var s=this,o=s.lch();return o[1]+=Be.Kn*r,o[1]<0&&(o[1]=0),new L(o,"lch").alpha(s.alpha(),!0)},L.prototype.desaturate=function(r){return r===void 0&&(r=1),this.saturate(-r)};var Bn=S.type;L.prototype.set=function(r,s,o){o===void 0&&(o=!1);var g=r.split("."),b=g[0],y=g[1],d=this[b]();if(y){var A=b.indexOf(y);if(A>-1){if(Bn(s)=="string")switch(s.charAt(0)){case"+":d[A]+=+s;break;case"-":d[A]+=+s;break;case"*":d[A]*=+s.substr(1);break;case"/":d[A]/=+s.substr(1);break;default:d[A]=+s}else if(Bn(s)==="number")d[A]=s;else throw new Error("unsupported value for Color.set");var k=new L(d,b);return o?(this._rgb=k._rgb,this):k}throw new Error("unknown channel "+y+" in mode "+b)}else return d};var po=function(r,s,o){var g=r._rgb,b=s._rgb;return new L(g[0]+o*(b[0]-g[0]),g[1]+o*(b[1]-g[1]),g[2]+o*(b[2]-g[2]),"rgb")};He.rgb=po;var Vr=Math.sqrt,vt=Math.pow,ho=function(r,s,o){var g=r._rgb,b=g[0],y=g[1],d=g[2],A=s._rgb,k=A[0],N=A[1],R=A[2];return new L(Vr(vt(b,2)*(1-o)+vt(k,2)*o),Vr(vt(y,2)*(1-o)+vt(N,2)*o),Vr(vt(d,2)*(1-o)+vt(R,2)*o),"rgb")};He.lrgb=ho;var vo=function(r,s,o){var g=r.lab(),b=s.lab();return new L(g[0]+o*(b[0]-g[0]),g[1]+o*(b[1]-g[1]),g[2]+o*(b[2]-g[2]),"lab")};He.lab=vo;var Mt=function(r,s,o,g){var b,y,d,A;g==="hsl"?(d=r.hsl(),A=s.hsl()):g==="hsv"?(d=r.hsv(),A=s.hsv()):g==="hcg"?(d=r.hcg(),A=s.hcg()):g==="hsi"?(d=r.hsi(),A=s.hsi()):(g==="lch"||g==="hcl")&&(g="hcl",d=r.hcl(),A=s.hcl());var k,N,R,O,j,H;g.substr(0,1)==="h"&&(b=d,k=b[0],R=b[1],j=b[2],y=A,N=y[0],O=y[1],H=y[2]);var X,ee,Z,se;return!isNaN(k)&&!isNaN(N)?(N>k&&N-k>180?se=N-(k+360):N180?se=N+360-k:se=N-k,ee=k+o*se):isNaN(k)?isNaN(N)?ee=Number.NaN:(ee=N,(j==1||j==0)&&g!="hsv"&&(X=O)):(ee=k,(H==1||H==0)&&g!="hsv"&&(X=R)),X===void 0&&(X=R+o*(O-R)),Z=j+o*(H-j),new L([ee,X,Z],g)},Hn=function(r,s,o){return Mt(r,s,o,"lch")};He.lch=Hn,He.hcl=Hn;var mo=function(r,s,o){var g=r.num(),b=s.num();return new L(g+o*(b-g),"num")};He.num=mo;var bo=function(r,s,o){return Mt(r,s,o,"hcg")};He.hcg=bo;var yo=function(r,s,o){return Mt(r,s,o,"hsi")};He.hsi=yo;var So=function(r,s,o){return Mt(r,s,o,"hsl")};He.hsl=So;var Co=function(r,s,o){return Mt(r,s,o,"hsv")};He.hsv=Co;var xo=S.clip_rgb,Br=Math.pow,Hr=Math.sqrt,jr=Math.PI,jn=Math.cos,Gn=Math.sin,wo=Math.atan2,Eo=function(r,s,o){s===void 0&&(s="lrgb"),o===void 0&&(o=null);var g=r.length;o||(o=Array.from(new Array(g)).map(function(){return 1}));var b=g/o.reduce(function(ee,Z){return ee+Z});if(o.forEach(function(ee,Z){o[Z]*=b}),r=r.map(function(ee){return new L(ee)}),s==="lrgb")return _o(r,o);for(var y=r.shift(),d=y.get(s),A=[],k=0,N=0,R=0;R=360;)X-=360;d[H]=X}else d[H]=d[H]/A[H];return j/=g,new L(d,s).alpha(j>.99999?1:j,!0)},_o=function(r,s){for(var o=r.length,g=[0,0,0,0],b=0;b.9999999&&(g[3]=1),new L(xo(g))},mt=S.type,Ao=Math.pow,Ut=function(r){var s="rgb",o=F("#ccc"),g=0,b=[0,1],y=[],d=[0,0],A=!1,k=[],N=!1,R=0,O=1,j=!1,H={},X=!0,ee=1,Z=function($){if($=$||["#fff","#000"],$&&mt($)==="string"&&F.brewer&&F.brewer[$.toLowerCase()]&&($=F.brewer[$.toLowerCase()]),mt($)==="array"){$.length===1&&($=[$[0],$[0]]),$=$.slice(0);for(var z=0;z<$.length;z++)$[z]=F($[z]);y.length=0;for(var te=0;te<$.length;te++)y.push(te/($.length-1))}return Ue(),k=$},se=function($){if(A!=null){for(var z=A.length-1,te=0;te=A[te];)te++;return te-1}return 0},ge=function($){return $},Me=function($){return $},Ie=function($,z){var te,J;if(z==null&&(z=!1),isNaN($)||$===null)return o;if(z)J=$;else if(A&&A.length>2){var je=se($);J=je/(A.length-2)}else O!==R?J=($-R)/(O-R):J=1;J=Me(J),z||(J=ge(J)),ee!==1&&(J=Ao(J,ee)),J=d[0]+J*(1-d[0]-d[1]),J=Math.min(1,Math.max(0,J));var be=Math.floor(J*1e4);if(X&&H[be])te=H[be];else{if(mt(k)==="array")for(var ce=0;ce=ue&&ce===y.length-1){te=k[ce];break}if(J>ue&&J2){var ce=$.map(function(we,pe){return pe/($.length-1)}),ue=$.map(function(we){return(we-R)/(O-R)});ue.every(function(we,pe){return ce[pe]===we})||(Me=function(we){if(we<=0||we>=1)return we;for(var pe=0;we>=ue[pe+1];)pe++;var it=(we-ue[pe])/(ue[pe+1]-ue[pe]),bt=ce[pe]+it*(ce[pe+1]-ce[pe]);return bt})}}return b=[R,O],ne},ne.mode=function($){return arguments.length?(s=$,Ue(),ne):s},ne.range=function($,z){return Z($,z),ne},ne.out=function($){return N=$,ne},ne.spread=function($){return arguments.length?(g=$,ne):g},ne.correctLightness=function($){return $==null&&($=!0),j=$,Ue(),j?ge=function(z){for(var te=Ie(0,!0).lab()[0],J=Ie(1,!0).lab()[0],je=te>J,be=Ie(z,!0).lab()[0],ce=te+(J-te)*z,ue=be-ce,we=0,pe=1,it=20;Math.abs(ue)>.01&&it-- >0;)(function(){return je&&(ue*=-1),ue<0?(we=z,z+=(pe-z)*.5):(pe=z,z+=(we-z)*.5),be=Ie(z,!0).lab()[0],ue=be-ce})();return z}:ge=function(z){return z},ne},ne.padding=function($){return $!=null?(mt($)==="number"&&($=[$,$]),d=$,ne):d},ne.colors=function($,z){arguments.length<2&&(z="hex");var te=[];if(arguments.length===0)te=k.slice(0);else if($===1)te=[ne(.5)];else if($>1){var J=b[0],je=b[1]-J;te=ko(0,$,!1).map(function(pe){return ne(J+pe/($-1)*je)})}else{r=[];var be=[];if(A&&A.length>2)for(var ce=1,ue=A.length,we=1<=ue;we?ceue;we?ce++:ce--)be.push((A[ce-1]+A[ce])*.5);else be=b;te=be.map(function(pe){return ne(pe)})}return F[z]&&(te=te.map(function(pe){return pe[z]()})),te},ne.cache=function($){return $!=null?(X=$,ne):X},ne.gamma=function($){return $!=null?(ee=$,ne):ee},ne.nodata=function($){return $!=null?(o=F($),ne):o},ne};function ko(r,s,o){for(var g=[],b=ry;b?d++:d--)g.push(d);return g}var Gr=function(r){var s,o,g,b,y,d,A;if(r=r.map(function(O){return new L(O)}),r.length===2)s=r.map(function(O){return O.lab()}),y=s[0],d=s[1],b=function(O){var j=[0,1,2].map(function(H){return y[H]+O*(d[H]-y[H])});return new L(j,"lab")};else if(r.length===3)o=r.map(function(O){return O.lab()}),y=o[0],d=o[1],A=o[2],b=function(O){var j=[0,1,2].map(function(H){return(1-O)*(1-O)*y[H]+2*(1-O)*O*d[H]+O*O*A[H]});return new L(j,"lab")};else if(r.length===4){var k;g=r.map(function(O){return O.lab()}),y=g[0],d=g[1],A=g[2],k=g[3],b=function(O){var j=[0,1,2].map(function(H){return(1-O)*(1-O)*(1-O)*y[H]+3*(1-O)*(1-O)*O*d[H]+3*(1-O)*O*O*A[H]+O*O*O*k[H]});return new L(j,"lab")}}else if(r.length===5){var N=Gr(r.slice(0,3)),R=Gr(r.slice(2,5));b=function(O){return O<.5?N(O*2):R((O-.5)*2)}}return b},To=function(r){var s=Gr(r);return s.scale=function(){return Ut(s)},s},ze=function(r,s,o){if(!ze[o])throw new Error("unknown blend mode "+o);return ze[o](r,s)},rt=function(r){return function(s,o){var g=F(o).rgb(),b=F(s).rgb();return F.rgb(r(g,b))}},nt=function(r){return function(s,o){var g=[];return g[0]=r(s[0],o[0]),g[1]=r(s[1],o[1]),g[2]=r(s[2],o[2]),g}},Lo=function(r){return r},Mo=function(r,s){return r*s/255},Io=function(r,s){return r>s?s:r},Fo=function(r,s){return r>s?r:s},No=function(r,s){return 255*(1-(1-r/255)*(1-s/255))},Oo=function(r,s){return s<128?2*r*s/255:255*(1-2*(1-r/255)*(1-s/255))},Do=function(r,s){return 255*(1-(1-s/255)/(r/255))},Ro=function(r,s){return r===255?255:(r=255*(s/255)/(1-r/255),r>255?255:r)};ze.normal=rt(nt(Lo)),ze.multiply=rt(nt(Mo)),ze.screen=rt(nt(No)),ze.overlay=rt(nt(Oo)),ze.darken=rt(nt(Io)),ze.lighten=rt(nt(Fo)),ze.dodge=rt(nt(Ro)),ze.burn=rt(nt(Do));for(var $o=ze,Yr=S.type,Po=S.clip_rgb,Vo=S.TWOPI,Bo=Math.pow,Ho=Math.sin,jo=Math.cos,Go=function(r,s,o,g,b){r===void 0&&(r=300),s===void 0&&(s=-1.5),o===void 0&&(o=1),g===void 0&&(g=1),b===void 0&&(b=[0,1]);var y=0,d;Yr(b)==="array"?d=b[1]-b[0]:(d=0,b=[b,b]);var A=function(k){var N=Vo*((r+120)/360+s*k),R=Bo(b[0]+d*k,g),O=y!==0?o[0]+k*y:o,j=O*R*(1-R)/2,H=jo(N),X=Ho(N),ee=R+j*(-.14861*H+1.78277*X),Z=R+j*(-.29227*H-.90649*X),se=R+j*(1.97294*H);return F(Po([ee*255,Z*255,se*255,1]))};return A.start=function(k){return k==null?r:(r=k,A)},A.rotations=function(k){return k==null?s:(s=k,A)},A.gamma=function(k){return k==null?g:(g=k,A)},A.hue=function(k){return k==null?o:(o=k,Yr(o)==="array"?(y=o[1]-o[0],y===0&&(o=o[1])):y=0,A)},A.lightness=function(k){return k==null?b:(Yr(k)==="array"?(b=k,d=k[1]-k[0]):(b=[k,k],d=0),A)},A.scale=function(){return F.scale(A)},A.hue(o),A},Yo="0123456789abcdef",Uo=Math.floor,Wo=Math.random,qo=function(){for(var r="#",s=0;s<6;s++)r+=Yo.charAt(Uo(Wo()*16));return new L(r,"hex")},Yn=Math.log,zo=Math.pow,Ko=Math.floor,Xo=Math.abs,Un=function(r,s){s===void 0&&(s=null);var o={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return c(r)==="object"&&(r=Object.values(r)),r.forEach(function(g){s&&c(g)==="object"&&(g=g[s]),g!=null&&!isNaN(g)&&(o.values.push(g),o.sum+=g,go.max&&(o.max=g),o.count+=1)}),o.domain=[o.min,o.max],o.limits=function(g,b){return Wn(o,g,b)},o},Wn=function(r,s,o){s===void 0&&(s="equal"),o===void 0&&(o=7),c(r)=="array"&&(r=Un(r));var g=r.min,b=r.max,y=r.values.sort(function(Xr,Qr){return Xr-Qr});if(o===1)return[g,b];var d=[];if(s.substr(0,1)==="c"&&(d.push(g),d.push(b)),s.substr(0,1)==="e"){d.push(g);for(var A=1;A 0");var k=Math.LOG10E*Yn(g),N=Math.LOG10E*Yn(b);d.push(g);for(var R=1;R200&&(Me=!1)}for(var It={},qr=0;qrg?(o+.05)/(g+.05):(g+.05)/(o+.05)},Wt=Math.sqrt,Zo=Math.atan2,zn=Math.abs,Kn=Math.cos,Ur=Math.PI,Jo=function(r,s,o,g){o===void 0&&(o=1),g===void 0&&(g=1),r=new L(r),s=new L(s);for(var b=Array.from(r.lab()),y=b[0],d=b[1],A=b[2],k=Array.from(s.lab()),N=k[0],R=k[1],O=k[2],j=Wt(d*d+A*A),H=Wt(R*R+O*O),X=y<16?.511:.040975*y/(1+.01765*y),ee=.0638*j/(1+.0131*j)+.638,Z=j<1e-6?0:Zo(A,d)*180/Ur;Z<0;)Z+=360;for(;Z>=360;)Z-=360;var se=Z>=164&&Z<=345?.56+zn(.2*Kn(Ur*(Z+168)/180)):.36+zn(.4*Kn(Ur*(Z+35)/180)),ge=j*j*j*j,Me=Wt(ge/(ge+1900)),Ie=ee*(Me*se+1-Me),Ue=y-N,ne=j-H,$=d-R,z=A-O,te=$*$+z*z-ne*ne,J=Ue/(o*X),je=ne/(g*ee),be=Ie;return Wt(J*J+je*je+te/(be*be))},el=function(r,s,o){o===void 0&&(o="lab"),r=new L(r),s=new L(s);var g=r.get(o),b=s.get(o),y=0;for(var d in g){var A=(g[d]||0)-(b[d]||0);y+=A*A}return Math.sqrt(y)},tl=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];try{return new(Function.prototype.bind.apply(L,[null].concat(r))),!0}catch(o){return!1}},rl={cool:function(){return Ut([F.hsl(180,1,.9),F.hsl(250,.7,.4)])},hot:function(){return Ut(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")}},qt={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"]},Wr=0,Xn=Object.keys(qt);Wr{((e,n)=>{typeof define=="function"&&define.amd?define([],n):typeof er=="object"&&er.exports?er.exports=n():e.fuzzysort=n()})(_i,e=>{"use strict";var n=(V,M)=>{if(V=="farzher")return{target:"farzher was here (^-^*)/",score:0,_indexes:[0]};if(!V||!M)return ie;var _=w(V);Te(M)||(M=p(M));var u=_.bitflags;return(u&M._bitflags)!==u?ie:E(_,M)},t=(V,M,_)=>{if(V=="farzher")return[{target:"farzher was here (^-^*)/",score:0,_indexes:[0],obj:M?M[0]:ie}];if(!V)return _&&_.all?S(V,M,_):Qe;var u=w(V),h=u.bitflags,m=u.containsSpace,C=_&&_.threshold||Pe,v=_&&_.limit||xe,x=0,T=0,I=M.length;if(_&&_.key)for(var D=_.key,P=0;PVe.peek().score&&Ve.replaceTop(U))))}}else if(_&&_.keys)for(var fe=_.scoreFn||Ye,le=_.keys,Oe=le.length,P=0;PVe.peek().score&&Ve.replaceTop(ye))))}else for(var P=0;PVe.peek().score&&Ve.replaceTop(U))))}}if(x===0)return Qe;for(var Re=new Array(x),P=x-1;P>=0;--P)Re[P]=Ve.poll();return Re.total=x+T,Re},a=(V,M,_)=>{if(typeof M=="function")return i(V,M);if(V===ie)return ie;M===void 0&&(M=""),_===void 0&&(_="");var u="",h=0,m=!1,C=V.target,v=C.length,x=V._indexes;x=x.slice(0,x.len).sort((D,P)=>D-P);for(var T=0;T{if(T===ie)return ie;var _=T.target,u=_.length,h=T._indexes;h=h.slice(0,h.len).sort((P,G)=>P-G);for(var m="",C=0,v=0,x=!1,T=[],I=0;IV._indexes.slice(0,V._indexes.len).sort((M,_)=>M-_),c=V=>{typeof V!="string"&&(V="");var M=Y(V);return{target:V,_targetLower:M._lower,_targetLowerCodes:M.lowerCodes,_nextBeginningIndexes:ie,_bitflags:M.bitflags,score:ie,_indexes:[0],obj:ie}},f=V=>{typeof V!="string"&&(V=""),V=V.trim();var M=Y(V),_=[];if(M.containsSpace){var u=V.split(/\s+/);u=[...new Set(u)];for(var h=0;h{if(V.length>999)return c(V);var M=re.get(V);return M!==void 0||(M=c(V),re.set(V,M)),M},w=V=>{if(V.length>999)return f(V);var M=F.get(V);return M!==void 0||(M=f(V),F.set(V,M)),M},S=(V,M,_)=>{var u=[];u.total=M.length;var h=_&&_.limit||xe;if(_&&_.key)for(var m=0;m=h)return u}}else if(_&&_.keys)for(var m=0;m=0;--I){var v=qe(C,_.keys[I]);if(!v){T[I]=ie;continue}Te(v)||(v=p(v)),v.score=Pe,v._indexes.len=0,T[I]=v}if(T.obj=C,T.score=Pe,u.push(T),u.length>=h)return u}else for(var m=0;m=h))return u}return u},E=(V,M,_=!1)=>{if(_===!1&&V.containsSpace)return B(V,M);for(var u=V._lower,h=V.lowerCodes,m=h[0],C=M._targetLowerCodes,v=h.length,x=C.length,P=0,T=0,I=0;;){var D=m===C[T];if(D){if(oe[I++]=T,++P,P===v)break;m=h[P]}if(++T,T>=x)return ie}var P=0,G=!1,q=0,U=M._nextBeginningIndexes;U===ie&&(U=M._nextBeginningIndexes=Q(M.target));var fe=T=oe[0]===0?0:U[oe[0]-1],le=0;if(T!==x)for(;;)if(T>=x){if(P<=0||(++le,le>200))break;--P;var Oe=ke[--q];T=U[Oe]}else{var D=h[P]===C[T];if(D){if(ke[q++]=T,++P,P===v){G=!0;break}++T}else T=U[T]}var ye=M._targetLower.indexOf(u,oe[0]),Se=~ye;if(Se&&!G)for(var ae=0;ae24&&(Le*=(tt-24)*10)}Se&&(Le/=1+v*v*1),Re&&(Le/=1+v*v*1),Le-=x-v,M.score=Le;for(var ae=0;ae{for(var _=new Set,u=0,h=ie,m=0,C=V.spaceSearches,I=0;Iu)return T;h.score=u;var I=0;for(let D of _)h._indexes[I++]=D;return h._indexes.len=I,h},Y=V=>{for(var M=V.length,_=V.toLowerCase(),u=[],h=0,m=!1,C=0;C=97&&v<=122?v-97:v>=48&&v<=57?26:v<=127?30:31;h|=1<{for(var M=V.length,_=[],u=0,h=!1,m=!1,C=0;C=65&&v<=90,T=x||v>=97&&v<=122||v>=48&&v<=57,I=x&&!h||!m||!T;h=x,m=T,I&&(_[u++]=C)}return _},Q=V=>{for(var M=V.length,_=K(V),u=[],h=_[0],m=0,C=0;CC?u[C]=h:(h=_[++m],u[C]=h===void 0?M:h);return u},L=()=>{re.clear(),F.clear(),oe=[],ke=[]},re=new Map,F=new Map,oe=[],ke=[],Ye=V=>{for(var M=Pe,_=V.length,u=0;u<_;++u){var h=V[u];if(h!==ie){var m=h.score;m>M&&(M=m)}}return M===Pe?ie:M},qe=(V,M)=>{var _=V[M];if(_!==void 0)return _;var u=M;Array.isArray(M)||(u=M.split("."));for(var h=u.length,m=-1;V&&++mtypeof V=="object",xe=1/0,Pe=-xe,Qe=[];Qe.total=0;var ie=null,Tt=V=>{var M=[],_=0,u={},h=m=>{for(var C=0,v=M[C],x=1;x<_;){var T=x+1;C=x,T<_&&M[T].score>1]=M[C],x=1+(C<<1)}for(var I=C-1>>1;C>0&&v.score>1)M[C]=M[I];M[C]=v};return u.add=m=>{var C=_;M[_++]=m;for(var v=C-1>>1;C>0&&m.score>1)M[C]=M[v];M[C]=m},u.poll=m=>{if(_!==0){var C=M[0];return M[0]=M[--_],h(),C}},u.peek=m=>{if(_!==0)return M[0]},u.replaceTop=m=>{M[0]=m,h()},u},Ve=Tt();return{single:n,go:t,highlight:a,prepare:c,indexes:l,cleanup:L}})});var cn=Zr((ar,ln)=>{(function(e,n){typeof ar=="object"&&typeof ln=="object"?ln.exports=n():typeof define=="function"&&define.amd?define([],n):typeof ar=="object"?ar.Pickr=n():e.Pickr=n()})(self,function(){return(()=>{"use strict";var e={d:(_,u)=>{for(var h in u)e.o(u,h)&&!e.o(_,h)&&Object.defineProperty(_,h,{enumerable:!0,get:u[h]})},o:(_,u)=>Object.prototype.hasOwnProperty.call(_,u),r:_=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})}},n={};e.d(n,{default:()=>M});var t={};function a(_,u,h,m){let C=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{};u instanceof HTMLCollection||u instanceof NodeList?u=Array.from(u):Array.isArray(u)||(u=[u]),Array.isArray(h)||(h=[h]);for(let v of u)for(let x of h)v[_](x,m,{capture:!1,...C});return Array.prototype.slice.call(arguments,1)}e.r(t),e.d(t,{adjustableInputNumbers:()=>S,createElementFromString:()=>c,createFromTemplate:()=>f,eventPath:()=>p,off:()=>l,on:()=>i,resolveElement:()=>w});let i=a.bind(null,"addEventListener"),l=a.bind(null,"removeEventListener");function c(_){let u=document.createElement("div");return u.innerHTML=_.trim(),u.firstElementChild}function f(_){let u=(m,C)=>{let v=m.getAttribute(C);return m.removeAttribute(C),v},h=function(m){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=u(m,":obj"),x=u(m,":ref"),T=v?C[v]={}:C;x&&(C[x]=m);for(let I of Array.from(m.children)){let D=u(I,":arr"),P=h(I,D?{}:T);D&&(T[D]||(T[D]=[])).push(Object.keys(P).length?P:I)}return C};return h(c(_))}function p(_){let u=_.path||_.composedPath&&_.composedPath();if(u)return u;let h=_.target.parentElement;for(u=[_.target,h];h=h.parentElement;)u.push(h);return u.push(document,window),u}function w(_){return _ instanceof Element?_:typeof _=="string"?_.split(/>>/g).reduce((u,h,m,C)=>(u=u.querySelector(h),m1&&arguments[1]!==void 0?arguments[1]:m=>m;function h(m){let C=[.001,.01,.1][Number(m.shiftKey||2*m.ctrlKey)]*(m.deltaY<0?1:-1),v=0,x=_.selectionStart;_.value=_.value.replace(/[\d.]+/g,(T,I)=>I<=x&&I+T.length>=x?(x=I,u(Number(T),C,v)):(v++,T)),_.focus(),_.setSelectionRange(x,x),m.preventDefault(),_.dispatchEvent(new Event("input"))}i(_,"focus",()=>i(window,"wheel",h,{passive:!1})),i(_,"blur",()=>l(window,"wheel",h))}let{min:E,max:B,floor:Y,round:K}=Math;function Q(_,u,h){u/=100,h/=100;let m=Y(_=_/360*6),C=_-m,v=h*(1-u),x=h*(1-C*u),T=h*(1-(1-C)*u),I=m%6;return[255*[h,x,v,v,T,h][I],255*[T,h,h,x,v,v][I],255*[v,v,T,h,h,x][I]]}function L(_,u,h){return Q(_,u,h).map(m=>K(m).toString(16).padStart(2,"0"))}function re(_,u,h){let m=Q(_,u,h),C=m[0]/255,v=m[1]/255,x=m[2]/255,T=E(1-C,1-v,1-x);return[100*(T===1?0:(1-C-T)/(1-T)),100*(T===1?0:(1-v-T)/(1-T)),100*(T===1?0:(1-x-T)/(1-T)),100*T]}function F(_,u,h){let m=(2-(u/=100))*(h/=100)/2;return m!==0&&(u=m===1?0:m<.5?u*h/(2*m):u*h/(2-2*m)),[_,100*u,100*m]}function oe(_,u,h){let m=E(_/=255,u/=255,h/=255),C=B(_,u,h),v=C-m,x,T;if(v===0)x=T=0;else{T=v/C;let I=((C-_)/6+v/2)/v,D=((C-u)/6+v/2)/v,P=((C-h)/6+v/2)/v;_===C?x=P-D:u===C?x=1/3+I-P:h===C&&(x=2/3+D-I),x<0?x+=1:x>1&&(x-=1)}return[360*x,100*T,100*C]}function ke(_,u,h,m){return u/=100,h/=100,[...oe(255*(1-E(1,(_/=100)*(1-(m/=100))+m)),255*(1-E(1,u*(1-m)+m)),255*(1-E(1,h*(1-m)+m)))]}function Ye(_,u,h){u/=100;let m=2*(u*=(h/=100)<.5?h:1-h)/(h+u)*100,C=100*(h+u);return[_,isNaN(m)?0:m,C]}function qe(_){return oe(..._.match(/.{2}/g).map(u=>parseInt(u,16)))}function Te(_){_=_.match(/^[a-zA-Z]+$/)?function(C){if(C.toLowerCase()==="black")return"#000";let v=document.createElement("canvas").getContext("2d");return v.fillStyle=C,v.fillStyle==="#000"?null:v.fillStyle}(_):_;let u={cmyk:/^cmyk[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)/i,rgba:/^((rgba)|rgb)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsla:/^((hsla)|hsl)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsva:/^((hsva)|hsv)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i},h=C=>C.map(v=>/^(|\d+)\.\d+|\d+$/.test(v)?Number(v):void 0),m;e:for(let C in u){if(!(m=u[C].exec(_)))continue;let v=x=>!!m[2]==(typeof x=="number");switch(C){case"cmyk":{let[,x,T,I,D]=h(m);if(x>100||T>100||I>100||D>100)break e;return{values:ke(x,T,I,D),type:C}}case"rgba":{let[,,,x,T,I,D]=h(m);if(x>255||T>255||I>255||D<0||D>1||!v(D))break e;return{values:[...oe(x,T,I),D],a:D,type:C}}case"hexa":{let[,x]=m;x.length!==4&&x.length!==3||(x=x.split("").map(D=>D+D).join(""));let T=x.substring(0,6),I=x.substring(6);return I=I?parseInt(I,16)/255:void 0,{values:[...qe(T),I],a:I,type:C}}case"hsla":{let[,,,x,T,I,D]=h(m);if(x>360||T>100||I>100||D<0||D>1||!v(D))break e;return{values:[...Ye(x,T,I),D],a:D,type:C}}case"hsva":{let[,,,x,T,I,D]=h(m);if(x>360||T>100||I>100||D<0||D>1||!v(D))break e;return{values:[x,T,I,D],a:D,type:C}}}}return{values:null,type:null}}function xe(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,C=(x,T)=>function(){let I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;return T(~I?x.map(D=>Number(D.toFixed(I))):x)},v={h:_,s:u,v:h,a:m,toHSVA(){let x=[v.h,v.s,v.v,v.a];return x.toString=C(x,T=>`hsva(${T[0]}, ${T[1]}%, ${T[2]}%, ${v.a})`),x},toHSLA(){let x=[...F(v.h,v.s,v.v),v.a];return x.toString=C(x,T=>`hsla(${T[0]}, ${T[1]}%, ${T[2]}%, ${v.a})`),x},toRGBA(){let x=[...Q(v.h,v.s,v.v),v.a];return x.toString=C(x,T=>`rgba(${T[0]}, ${T[1]}, ${T[2]}, ${v.a})`),x},toCMYK(){let x=re(v.h,v.s,v.v);return x.toString=C(x,T=>`cmyk(${T[0]}%, ${T[1]}%, ${T[2]}%, ${T[3]}%)`),x},toHEXA(){let x=L(v.h,v.s,v.v),T=v.a>=1?"":Number((255*v.a).toFixed(0)).toString(16).toUpperCase().padStart(2,"0");return T&&x.push(T),x.toString=()=>`#${x.join("").toUpperCase()}`,x},clone:()=>xe(v.h,v.s,v.v,v.a)};return v}let Pe=_=>Math.max(Math.min(_,1),0);function Qe(_){let u={options:Object.assign({lock:null,onchange:()=>0,onstop:()=>0},_),_keyboard(v){let{options:x}=u,{type:T,key:I}=v;if(document.activeElement===x.wrapper){let{lock:D}=u.options,P=I==="ArrowUp",G=I==="ArrowRight",q=I==="ArrowDown",U=I==="ArrowLeft";if(T==="keydown"&&(P||G||q||U)){let fe=0,le=0;D==="v"?fe=P||G?1:-1:D==="h"?fe=P||G?-1:1:(le=P?-1:q?1:0,fe=U?-1:G?1:0),u.update(Pe(u.cache.x+.01*fe),Pe(u.cache.y+.01*le)),v.preventDefault()}else I.startsWith("Arrow")&&(u.options.onstop(),v.preventDefault())}},_tapstart(v){i(document,["mouseup","touchend","touchcancel"],u._tapstop),i(document,["mousemove","touchmove"],u._tapmove),v.cancelable&&v.preventDefault(),u._tapmove(v)},_tapmove(v){let{options:x,cache:T}=u,{lock:I,element:D,wrapper:P}=x,G=P.getBoundingClientRect(),q=0,U=0;if(v){let Oe=v&&v.touches&&v.touches[0];q=v?(Oe||v).clientX:0,U=v?(Oe||v).clientY:0,qG.left+G.width&&(q=G.left+G.width),UG.top+G.height&&(U=G.top+G.height),q-=G.left,U-=G.top}else T&&(q=T.x*G.width,U=T.y*G.height);I!=="h"&&(D.style.left=`calc(${q/G.width*100}% - ${D.offsetWidth/2}px)`),I!=="v"&&(D.style.top=`calc(${U/G.height*100}% - ${D.offsetHeight/2}px)`),u.cache={x:q/G.width,y:U/G.height};let fe=Pe(q/G.width),le=Pe(U/G.height);switch(I){case"v":return x.onchange(fe);case"h":return x.onchange(le);default:return x.onchange(fe,le)}},_tapstop(){u.options.onstop(),l(document,["mouseup","touchend","touchcancel"],u._tapstop),l(document,["mousemove","touchmove"],u._tapmove)},trigger(){u._tapmove()},update(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,{left:T,top:I,width:D,height:P}=u.options.wrapper.getBoundingClientRect();u.options.lock==="h"&&(x=v),u._tapmove({clientX:T+D*v,clientY:I+P*x})},destroy(){let{options:v,_tapstart:x,_keyboard:T}=u;l(document,["keydown","keyup"],T),l([v.wrapper,v.element],"mousedown",x),l([v.wrapper,v.element],"touchstart",x,{passive:!1})}},{options:h,_tapstart:m,_keyboard:C}=u;return i([h.wrapper,h.element],"mousedown",m),i([h.wrapper,h.element],"touchstart",m,{passive:!1}),i(document,["keydown","keyup"],C),u}function ie(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};_=Object.assign({onchange:()=>0,className:"",elements:[]},_);let u=i(_.elements,"click",h=>{_.elements.forEach(m=>m.classList[h.target===m?"add":"remove"](_.className)),_.onchange(h),h.stopPropagation()});return{destroy:()=>l(...u)}}let Tt={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8},Ve=(_,u,h)=>{let{container:m,margin:C,position:v,variantFlipOrder:x,positionFlipOrder:T}={container:document.documentElement.getBoundingClientRect(),...Tt,...h},{left:I,top:D}=u.style;u.style.left="0",u.style.top="0";let P=_.getBoundingClientRect(),G=u.getBoundingClientRect(),q={t:P.top-G.height-C,b:P.bottom+C,r:P.right+C,l:P.left-G.width-C},U={vs:P.left,vm:P.left+P.width/2+-G.width/2,ve:P.left+P.width-G.width,hs:P.top,hm:P.bottom-P.height/2-G.height/2,he:P.bottom-G.height},[fe,le="middle"]=v.split("-"),Oe=T[fe],ye=x[le],{top:Se,left:ae,bottom:Re,right:_e}=m;for(let Ke of Oe){let Le=Ke==="t"||Ke==="b",et=q[Ke],[gt,tt]=Le?["top","left"]:["left","top"],[Ar,kr]=Le?[G.height,G.width]:[G.width,G.height],[Tr,Lr]=Le?[Re,_e]:[_e,Re],[Mr,Ir]=Le?[Se,ae]:[ae,Se];if(!(etTr))for(let jt of ye){let Lt=U[(Le?"v":"h")+jt];if(!(LtLr))return u.style[tt]=Lt-G[tt]+"px",u.style[gt]=et-G[gt]+"px",Ke+jt}}return u.style.left=I,u.style.top=D,null};function V(_,u,h){return u in _?Object.defineProperty(_,u,{value:h,enumerable:!0,configurable:!0,writable:!0}):_[u]=h,_}class M{constructor(u){V(this,"_initializingActive",!0),V(this,"_recalc",!0),V(this,"_nanopop",null),V(this,"_root",null),V(this,"_color",xe()),V(this,"_lastColor",xe()),V(this,"_swatchColors",[]),V(this,"_setupAnimationFrame",null),V(this,"_eventListener",{init:[],save:[],hide:[],show:[],clear:[],change:[],changestop:[],cancel:[],swatchselect:[]}),this.options=u=Object.assign({...M.DEFAULT_OPTIONS},u);let{swatches:h,components:m,theme:C,sliders:v,lockOpacity:x,padding:T}=u;["nano","monolith"].includes(C)&&!v&&(u.sliders="h"),m.interaction||(m.interaction={});let{preview:I,opacity:D,hue:P,palette:G}=m;m.opacity=!x&&D,m.palette=G||I||D||P,this._preBuild(),this._buildComponents(),this._bindEvents(),this._finalBuild(),h&&h.length&&h.forEach(le=>this.addSwatch(le));let{button:q,app:U}=this._root;this._nanopop=((le,Oe,ye)=>{let Se=typeof le!="object"||le instanceof HTMLElement?{reference:le,popper:Oe,...ye}:le;return{update(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Se,{reference:Re,popper:_e}=Object.assign(Se,ae);if(!_e||!Re)throw new Error("Popper- or reference-element missing.");return Ve(Re,_e,Se)}}})(q,U,{margin:T}),q.setAttribute("role","button"),q.setAttribute("aria-label",this._t("btn:toggle"));let fe=this;this._setupAnimationFrame=requestAnimationFrame(function le(){if(!U.offsetWidth)return fe._setupAnimationFrame=requestAnimationFrame(le);fe.setColor(u.default),fe._rePositioningPicker(),u.defaultRepresentation&&(fe._representation=u.defaultRepresentation,fe.setColorRepresentation(fe._representation)),u.showAlways&&fe.show(),fe._initializingActive=!1,fe._emit("init")})}_preBuild(){let{options:u}=this;for(let h of["el","container"])u[h]=w(u[h]);this._root=(h=>{let{components:m,useAsButton:C,inline:v,appClass:x,theme:T,lockOpacity:I}=h.options,D=U=>U?"":'style="display:none" hidden',P=U=>h._t(U),G=f(`
${C?"":''}
`),q=G.interaction;return q.options.find(U=>!U.hidden&&!U.classList.add("active")),q.type=()=>q.options.find(U=>U.classList.contains("active")),G})(this),u.useAsButton&&(this._root.button=u.el),u.container.appendChild(this._root.root)}_finalBuild(){let u=this.options,h=this._root;if(u.container.removeChild(h.root),u.inline){let m=u.el.parentElement;u.el.nextSibling?m.insertBefore(h.app,u.el.nextSibling):m.appendChild(h.app)}else u.container.appendChild(h.app);u.useAsButton?u.inline&&u.el.remove():u.el.parentNode.replaceChild(h.root,u.el),u.disabled&&this.disable(),u.comparison||(h.button.style.transition="none",u.useAsButton||(h.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){let u=this,h=this.options.components,m=(u.options.sliders||"v").repeat(2),[C,v]=m.match(/^[vh]+$/g)?m:[],x=()=>this._color||(this._color=this._lastColor.clone()),T={palette:Qe({element:u._root.palette.picker,wrapper:u._root.palette.palette,onstop:()=>u._emit("changestop","slider",u),onchange(I,D){if(!h.palette)return;let P=x(),{_root:G,options:q}=u,{lastColor:U,currentColor:fe}=G.preview;u._recalc&&(P.s=100*I,P.v=100-100*D,P.v<0&&(P.v=0),u._updateOutput("slider"));let le=P.toRGBA().toString(0);this.element.style.background=le,this.wrapper.style.background=` linear-gradient(to top, rgba(0, 0, 0, ${P.a}), transparent), linear-gradient(to left, hsla(${P.h}, 100%, 50%, ${P.a}), rgba(255, 255, 255, ${P.a})) `,q.comparison?q.useAsButton||u._lastColor||U.style.setProperty("--pcr-color",le):(G.button.style.setProperty("--pcr-color",le),G.button.classList.remove("clear"));let Oe=P.toHEXA().toString();for(let{el:ye,color:Se}of u._swatchColors)ye.classList[Oe===Se.toHEXA().toString()?"add":"remove"]("pcr-active");fe.style.setProperty("--pcr-color",le)}}),hue:Qe({lock:v==="v"?"h":"v",element:u._root.hue.picker,wrapper:u._root.hue.slider,onstop:()=>u._emit("changestop","slider",u),onchange(I){if(!h.hue||!h.palette)return;let D=x();u._recalc&&(D.h=360*I),this.element.style.backgroundColor=`hsl(${D.h}, 100%, 50%)`,T.palette.trigger()}}),opacity:Qe({lock:C==="v"?"h":"v",element:u._root.opacity.picker,wrapper:u._root.opacity.slider,onstop:()=>u._emit("changestop","slider",u),onchange(I){if(!h.opacity||!h.palette)return;let D=x();u._recalc&&(D.a=Math.round(100*I)/100),this.element.style.background=`rgba(0, 0, 0, ${D.a})`,T.palette.trigger()}}),selectable:ie({elements:u._root.interaction.options,className:"active",onchange(I){u._representation=I.target.getAttribute("data-type").toUpperCase(),u._recalc&&u._updateOutput("swatch")}})};this._components=T}_bindEvents(){let{_root:u,options:h}=this,m=[i(u.interaction.clear,"click",()=>this._clearColor()),i([u.interaction.cancel,u.preview.lastColor],"click",()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")}),i(u.interaction.save,"click",()=>{!this.applyColor()&&!h.showAlways&&this.hide()}),i(u.interaction.result,["keyup","input"],C=>{this.setColor(C.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),C.stopImmediatePropagation()}),i(u.interaction.result,["focus","blur"],C=>{this._recalc=C.type==="blur",this._recalc&&this._updateOutput(null)}),i([u.palette.palette,u.palette.picker,u.hue.slider,u.hue.picker,u.opacity.slider,u.opacity.picker],["mousedown","touchstart"],()=>this._recalc=!0,{passive:!0})];if(!h.showAlways){let C=h.closeWithKey;m.push(i(u.button,"click",()=>this.isOpen()?this.hide():this.show()),i(document,"keyup",v=>this.isOpen()&&(v.key===C||v.code===C)&&this.hide()),i(document,["touchstart","mousedown"],v=>{this.isOpen()&&!p(v).some(x=>x===u.app||x===u.button)&&this.hide()},{capture:!0}))}if(h.adjustableNumbers){let C={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};S(u.interaction.result,(v,x,T)=>{let I=C[this.getColorRepresentation().toLowerCase()];if(I){let D=I[T],P=v+(D>=100?1e3*x:x);return P<=0?0:Number((P{v.isOpen()&&(h.closeOnScroll&&v.hide(),C===null?(C=setTimeout(()=>C=null,100),requestAnimationFrame(function x(){v._rePositioningPicker(),C!==null&&requestAnimationFrame(x)})):(clearTimeout(C),C=setTimeout(()=>C=null,100)))},{capture:!0}))}this._eventBindings=m}_rePositioningPicker(){let{options:u}=this;if(!u.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:u.position})){let h=this._root.app,m=h.getBoundingClientRect();h.style.top=(window.innerHeight-m.height)/2+"px",h.style.left=(window.innerWidth-m.width)/2+"px"}}_updateOutput(u){let{_root:h,_color:m,options:C}=this;if(h.interaction.type()){let v=`to${h.interaction.type().getAttribute("data-type")}`;h.interaction.result.value=typeof m[v]=="function"?m[v]().toString(C.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",m,u,this)}_clearColor(){let u=arguments.length>0&&arguments[0]!==void 0&&arguments[0],{_root:h,options:m}=this;m.useAsButton||h.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),h.button.classList.add("clear"),m.showAlways||this.hide(),this._lastColor=null,this._initializingActive||u||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(u){let{values:h,type:m,a:C}=Te(u),{lockOpacity:v}=this.options,x=C!==void 0&&C!==1;return h&&h.length===3&&(h[3]=void 0),{values:!h||v&&x?null:h,type:m}}_t(u){return this.options.i18n[u]||M.I18N_DEFAULTS[u]}_emit(u){for(var h=arguments.length,m=new Array(h>1?h-1:0),C=1;Cv(...m,this))}on(u,h){return this._eventListener[u].push(h),this}off(u,h){let m=this._eventListener[u]||[],C=m.indexOf(h);return~C&&m.splice(C,1),this}addSwatch(u){let{values:h}=this._parseLocalColor(u);if(h){let{_swatchColors:m,_root:C}=this,v=xe(...h),x=c(`