@redvars/peacock 3.15.0 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/styles.css +1 -1
- package/dist/assets/styles.css.map +1 -1
- package/dist/assets/theme.js +19 -19
- package/dist/assets/tokens.css +1 -1
- package/dist/assets/tokens.css.map +1 -1
- package/dist/card-content.js +8 -7
- package/dist/card-content.js.map +1 -1
- package/dist/card.js +142 -98
- package/dist/card.js.map +1 -1
- package/dist/{chart-bar-D5dGFJfK.js → cartesian-chart-DgE4USyC.js} +529 -312
- package/dist/cartesian-chart-DgE4USyC.js.map +1 -0
- package/dist/chart-area.js +78 -0
- package/dist/chart-area.js.map +1 -0
- package/dist/chart-bar.js +283 -213
- package/dist/chart-bar.js.map +1 -1
- package/dist/{transform-DSwFSqzD.js → chart-base-C2qRMF48.js} +771 -102
- package/dist/chart-base-C2qRMF48.js.map +1 -0
- package/dist/chart-doughnut.js +55 -287
- package/dist/chart-doughnut.js.map +1 -1
- package/dist/chart-line.js +626 -0
- package/dist/chart-line.js.map +1 -0
- package/dist/chart-pie.js +637 -195
- package/dist/chart-pie.js.map +1 -1
- package/dist/code-editor.js +704 -131
- package/dist/code-editor.js.map +1 -1
- package/dist/code-group.js +188 -0
- package/dist/code-group.js.map +1 -0
- package/dist/code-highlighter.js +895 -257
- package/dist/code-highlighter.js.map +1 -1
- package/dist/custom-elements-jsdocs.json +2278 -677
- package/dist/custom-elements.json +13962 -3690
- package/dist/image.js +5 -1
- package/dist/image.js.map +1 -1
- package/dist/index.js +8 -7
- package/dist/index.js.map +1 -1
- package/dist/loader-full.js +1 -1
- package/dist/loader.js +9 -3
- package/dist/loader.js.map +1 -1
- package/dist/{is-dark-mode-DOcaw4Yq.js → observe-theme-change-DCifz1uv.js} +2 -6
- package/dist/observe-theme-change-DCifz1uv.js.map +1 -0
- package/dist/pagination.js +408 -110
- package/dist/pagination.js.map +1 -1
- package/dist/path-CJ0Arqcy.js +166 -0
- package/dist/path-CJ0Arqcy.js.map +1 -0
- package/dist/snackbar.js +89 -34
- package/dist/snackbar.js.map +1 -1
- package/dist/src/__internal/chart/cartesian-chart.d.ts +80 -0
- package/dist/src/__internal/chart/chart-base.d.ts +113 -0
- package/dist/src/__internal/chart/paths.d.ts +5 -0
- package/dist/src/__internal/chart/types.d.ts +42 -0
- package/dist/src/card/card-content.d.ts +2 -3
- package/dist/src/card/card.d.ts +31 -17
- package/dist/src/chart-area/chart-area.d.ts +54 -0
- package/dist/src/chart-area/index.d.ts +1 -0
- package/dist/src/chart-bar/chart-bar.d.ts +44 -33
- package/dist/src/chart-bar/index.d.ts +0 -1
- package/dist/src/chart-doughnut/chart-doughnut.d.ts +33 -39
- package/dist/src/chart-line/chart-line.d.ts +69 -0
- package/dist/src/chart-line/index.d.ts +1 -0
- package/dist/src/chart-pie/chart-pie.d.ts +63 -28
- package/dist/src/code-editor/code-editor.d.ts +52 -13
- package/dist/src/code-editor/editor-theme.d.ts +60 -0
- package/dist/src/code-highlighter/code-group.d.ts +52 -0
- package/dist/src/code-highlighter/code-highlighter.d.ts +122 -15
- package/dist/src/code-highlighter/index.d.ts +1 -0
- package/dist/src/code-highlighter/line-ranges.d.ts +24 -0
- package/dist/src/code-highlighter/local.d.ts +4 -1
- package/dist/src/code-highlighter/token-colors.d.ts +8 -0
- package/dist/src/index.d.ts +4 -2
- package/dist/src/pagination/page-items.d.ts +14 -0
- package/dist/src/pagination/pagination.d.ts +46 -7
- package/dist/src/snackbar/snackbar.d.ts +13 -1
- package/dist/src/table/table.d.ts +125 -27
- package/dist/src/toolbar/toolbar.d.ts +56 -51
- package/dist/table.js +1007 -338
- package/dist/table.js.map +1 -1
- package/dist/test/chart.test.d.ts +1 -0
- package/dist/test/code-highlighter.test.d.ts +1 -0
- package/dist/test/pagination.test.d.ts +1 -0
- package/dist/test/table.test.d.ts +1 -0
- package/dist/token-colors-0TFHWbcq.js +81 -0
- package/dist/token-colors-0TFHWbcq.js.map +1 -0
- package/dist/toolbar.js +195 -184
- package/dist/toolbar.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -2
- package/readme.md +7 -6
- package/scss/_code-block.scss +139 -0
- package/scss/tokens.css +24 -0
- package/src/__internal/chart/cartesian-chart.ts +404 -0
- package/src/__internal/chart/chart-base.scss +252 -0
- package/src/__internal/chart/chart-base.ts +474 -0
- package/src/__internal/chart/paths.ts +28 -0
- package/src/__internal/chart/types.ts +49 -0
- package/src/card/card-content.ts +12 -9
- package/src/card/card.scss +66 -54
- package/src/card/card.ts +109 -73
- package/src/chart-area/chart-area.ts +82 -0
- package/src/chart-area/index.ts +1 -0
- package/src/chart-bar/chart-bar.ts +336 -250
- package/src/chart-bar/index.ts +0 -1
- package/src/chart-doughnut/chart-doughnut.ts +62 -262
- package/src/chart-doughnut/demo/index.html +14 -22
- package/src/chart-line/chart-line.scss +25 -0
- package/src/chart-line/chart-line.ts +346 -0
- package/src/chart-line/index.ts +1 -0
- package/src/chart-pie/chart-pie.scss +35 -16
- package/src/chart-pie/chart-pie.ts +282 -188
- package/src/chart-pie/demo/index.html +13 -21
- package/src/code-editor/code-editor.scss +132 -36
- package/src/code-editor/code-editor.ts +308 -88
- package/src/code-editor/demo/index.html +39 -12
- package/src/code-editor/editor-theme.ts +213 -0
- package/src/code-highlighter/code-group.scss +34 -0
- package/src/code-highlighter/code-group.ts +173 -0
- package/src/code-highlighter/code-highlighter.scss +226 -111
- package/src/code-highlighter/code-highlighter.ts +554 -199
- package/src/code-highlighter/demo/index.html +68 -4
- package/src/code-highlighter/index.ts +1 -0
- package/src/code-highlighter/line-ranges.ts +81 -0
- package/src/code-highlighter/local.ts +9 -3
- package/src/code-highlighter/token-colors.ts +42 -0
- package/src/index.ts +4 -2
- package/src/loader.ts +8 -2
- package/src/pagination/page-items.ts +50 -0
- package/src/pagination/pagination.scss +159 -44
- package/src/pagination/pagination.ts +275 -74
- package/src/snackbar/demo/index.html +39 -4
- package/src/snackbar/snackbar.scss +27 -10
- package/src/snackbar/snackbar.ts +80 -37
- package/src/table/table.scss +337 -109
- package/src/table/table.ts +812 -272
- package/src/toolbar/toolbar-colors.scss +6 -7
- package/src/toolbar/toolbar.scss +35 -106
- package/src/toolbar/toolbar.ts +180 -80
- package/dist/array-D5vjT2Xm.js +0 -14
- package/dist/array-D5vjT2Xm.js.map +0 -1
- package/dist/chart-bar-D5dGFJfK.js.map +0 -1
- package/dist/chart-stacked-bar.js +0 -403
- package/dist/chart-stacked-bar.js.map +0 -1
- package/dist/copy-to-clipboard-upGx-Ueo.js +0 -39
- package/dist/copy-to-clipboard-upGx-Ueo.js.map +0 -1
- package/dist/is-dark-mode-DOcaw4Yq.js.map +0 -1
- package/dist/pie-Dz0IDiPt.js +0 -537
- package/dist/pie-Dz0IDiPt.js.map +0 -1
- package/dist/pierre-dark-DFWl0m-C.js +0 -4
- package/dist/pierre-dark-DFWl0m-C.js.map +0 -1
- package/dist/pierre-light-BEkAPImt.js +0 -4
- package/dist/pierre-light-BEkAPImt.js.map +0 -1
- package/dist/src/chart-bar/chart-stacked-bar.d.ts +0 -78
- package/dist/src/code-highlighter/constants.d.ts +0 -1
- package/dist/transform-DSwFSqzD.js.map +0 -1
- package/src/chart-bar/chart-bar.scss +0 -58
- package/src/chart-bar/chart-stacked-bar.ts +0 -398
- package/src/chart-doughnut/chart-donut.scss +0 -37
- package/src/code-highlighter/constants.ts +0 -117
- /package/dist/test/{chart-bar.test.d.ts → card.test.d.ts} +0 -0
package/dist/assets/theme.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
var Wc=Object.create;var us=Object.defineProperty;var Gc=Object.getOwnPropertyDescriptor;var Jc=Object.getOwnPropertyNames;var Yc=Object.getPrototypeOf,Kc=Object.prototype.hasOwnProperty;var Zc=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var Qc=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Jc(t))!Kc.call(e,o)&&o!==r&&us(e,o,{get:()=>t[o],enumerable:!(n=Gc(t,o))||n.enumerable});return e};var ef=(e,t,r)=>(r=e!=null?Wc(Yc(e)):{},Qc(t||!e||!e.__esModule?us(r,"default",{value:e,enumerable:!0}):r,e));var Ds=Zc((B4,Pn)=>{var L=String,vs=function(){return{isColorSupported:!1,reset:L,bold:L,dim:L,italic:L,underline:L,inverse:L,hidden:L,strikethrough:L,black:L,red:L,green:L,yellow:L,blue:L,magenta:L,cyan:L,white:L,gray:L,bgBlack:L,bgRed:L,bgGreen:L,bgYellow:L,bgBlue:L,bgMagenta:L,bgCyan:L,bgWhite:L,blackBright:L,redBright:L,greenBright:L,yellowBright:L,blueBright:L,magentaBright:L,cyanBright:L,whiteBright:L,bgBlackBright:L,bgRedBright:L,bgGreenBright:L,bgYellowBright:L,bgBlueBright:L,bgMagentaBright:L,bgCyanBright:L,bgWhiteBright:L}};Pn.exports=vs();Pn.exports.createColors=vs});function fe(e){return e<0?-1:e===0?0:1}function kt(e,t,r){return(1-r)*e+r*t}function ls(e,t,r){return r<e?e:r>t?t:r}function Vt(e,t,r){return r<e?e:r>t?t:r}function qt(e){return e=e%360,e<0&&(e=e+360),e}function te(e){return e=e%360,e<0&&(e=e+360),e}function cs(e,t){return te(t-e)<=180?1:-1}function uo(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function yr(e,t){let r=e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],n=e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],o=e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2];return[r,n,o]}var fs=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],tf=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],ds=[95.047,100,108.883];function lo(e,t,r){return(255<<24|(e&255)<<16|(t&255)<<8|r&255)>>>0}function Sn(e){let t=St(e[0]),r=St(e[1]),n=St(e[2]);return lo(t,r,n)}function Dr(e){return e>>16&255}function xr(e){return e>>8&255}function Cr(e){return e&255}function ms(e,t,r){let n=tf,o=n[0][0]*e+n[0][1]*t+n[0][2]*r,a=n[1][0]*e+n[1][1]*t+n[1][2]*r,i=n[2][0]*e+n[2][1]*t+n[2][2]*r,s=St(o),u=St(a),l=St(i);return lo(s,u,l)}function rf(e){let t=Ve(Dr(e)),r=Ve(xr(e)),n=Ve(Cr(e));return yr([t,r,n],fs)}function Rn(e){let t=Ve(Dr(e)),r=Ve(xr(e)),n=Ve(Cr(e)),o=fs,a=o[0][0]*t+o[0][1]*r+o[0][2]*n,i=o[1][0]*t+o[1][1]*r+o[1][2]*n,s=o[2][0]*t+o[2][1]*r+o[2][2]*n,u=ds,l=a/u[0],c=i/u[1],f=s/u[2],m=vr(l),d=vr(c),g=vr(f),p=116*d-16,y=500*(m-d),b=200*(d-g);return[p,y,b]}function ps(e){let t=ze(e),r=St(t);return lo(r,r,r)}function Ar(e){let t=rf(e)[1];return 116*vr(t/100)-16}function ze(e){return 100*of((e+16)/116)}function $r(e){return vr(e/100)*116-16}function Ve(e){let t=e/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function St(e){let t=e/100,r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,ls(0,255,Math.round(r*255))}function hs(){return ds}function vr(e){let t=.008856451679035631,r=24389/27;return e>t?Math.pow(e,1/3):(r*e+16)/116}function of(e){let t=.008856451679035631,r=24389/27,n=e*e*e;return n>t?n:(116*e-16)/r}var $e=class e{static make(t=hs(),r=200/Math.PI*ze(50)/100,n=50,o=2,a=!1){let i=t,s=i[0]*.401288+i[1]*.650173+i[2]*-.051461,u=i[0]*-.250268+i[1]*1.204414+i[2]*.045854,l=i[0]*-.002079+i[1]*.048952+i[2]*.953127,c=.8+o/10,f=c>=.9?kt(.59,.69,(c-.9)*10):kt(.525,.59,(c-.8)*10),m=a?1:c*(1-1/3.6*Math.exp((-r-42)/92));m=m>1?1:m<0?0:m;let d=c,g=[m*(100/s)+1-m,m*(100/u)+1-m,m*(100/l)+1-m],p=1/(5*r+1),y=p*p*p*p,b=1-y,D=y*r+.1*b*b*Math.cbrt(5*r),C=ze(n)/t[1],F=1.48+Math.sqrt(C),v=.725/Math.pow(C,.2),M=v,$=[Math.pow(D*g[0]*s/100,.42),Math.pow(D*g[1]*u/100,.42),Math.pow(D*g[2]*l/100,.42)],w=[400*$[0]/($[0]+27.13),400*$[1]/($[1]+27.13),400*$[2]/($[2]+27.13)],R=(2*w[0]+w[1]+.05*w[2])*v;return new e(C,R,v,M,f,d,g,D,Math.pow(D,.25),F)}constructor(t,r,n,o,a,i,s,u,l,c){this.n=t,this.aw=r,this.nbb=n,this.ncb=o,this.c=a,this.nc=i,this.rgbD=s,this.fl=u,this.fLRoot=l,this.z=c}};$e.DEFAULT=$e.make();var pe=class e{constructor(t,r,n,o,a,i,s,u,l){this.hue=t,this.chroma=r,this.j=n,this.q=o,this.m=a,this.s=i,this.jstar=s,this.astar=u,this.bstar=l}distance(t){let r=this.jstar-t.jstar,n=this.astar-t.astar,o=this.bstar-t.bstar,a=Math.sqrt(r*r+n*n+o*o);return 1.41*Math.pow(a,.63)}static fromInt(t){return e.fromIntInViewingConditions(t,$e.DEFAULT)}static fromIntInViewingConditions(t,r){let n=(t&16711680)>>16,o=(t&65280)>>8,a=t&255,i=Ve(n),s=Ve(o),u=Ve(a),l=.41233895*i+.35762064*s+.18051042*u,c=.2126*i+.7152*s+.0722*u,f=.01932141*i+.11916382*s+.95034478*u,m=.401288*l+.650173*c-.051461*f,d=-.250268*l+1.204414*c+.045854*f,g=-.002079*l+.048952*c+.953127*f,p=r.rgbD[0]*m,y=r.rgbD[1]*d,b=r.rgbD[2]*g,D=Math.pow(r.fl*Math.abs(p)/100,.42),C=Math.pow(r.fl*Math.abs(y)/100,.42),F=Math.pow(r.fl*Math.abs(b)/100,.42),v=fe(p)*400*D/(D+27.13),M=fe(y)*400*C/(C+27.13),$=fe(b)*400*F/(F+27.13),w=(11*v+-12*M+$)/11,R=(v+M-2*$)/9,I=(20*v+20*M+21*$)/20,X=(40*v+20*M+$)/20,le=Math.atan2(R,w)*180/Math.PI,Z=le<0?le+360:le>=360?le-360:le,ut=Z*Math.PI/180,Ne=X*r.nbb,ce=100*Math.pow(Ne/r.aw,r.c*r.z),je=4/r.c*Math.sqrt(ce/100)*(r.aw+4)*r.fLRoot,Oe=Z<20.14?Z+360:Z,Tt=.25*(Math.cos(Oe*Math.PI/180+2)+3.8),Pe=5e4/13*Tt*r.nc*r.ncb*Math.sqrt(w*w+R*R)/(I+.305),Xe=Math.pow(Pe,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),Ue=Xe*Math.sqrt(ce/100),Ut=Ue*r.fLRoot,wt=50*Math.sqrt(Xe*r.c/(r.aw+4)),Qe=(1+100*.007)*ce/(1+.007*ce),ss=1/.0228*Math.log(1+.0228*Ut),Vc=ss*Math.cos(ut),qc=ss*Math.sin(ut);return new e(Z,Ue,ce,je,Ut,wt,Qe,Vc,qc)}static fromJch(t,r,n){return e.fromJchInViewingConditions(t,r,n,$e.DEFAULT)}static fromJchInViewingConditions(t,r,n,o){let a=4/o.c*Math.sqrt(t/100)*(o.aw+4)*o.fLRoot,i=r*o.fLRoot,s=r/Math.sqrt(t/100),u=50*Math.sqrt(s*o.c/(o.aw+4)),l=n*Math.PI/180,c=(1+100*.007)*t/(1+.007*t),f=1/.0228*Math.log(1+.0228*i),m=f*Math.cos(l),d=f*Math.sin(l);return new e(n,r,t,a,i,u,c,m,d)}static fromUcs(t,r,n){return e.fromUcsInViewingConditions(t,r,n,$e.DEFAULT)}static fromUcsInViewingConditions(t,r,n,o){let a=r,i=n,s=Math.sqrt(a*a+i*i),l=(Math.exp(s*.0228)-1)/.0228/o.fLRoot,c=Math.atan2(i,a)*(180/Math.PI);c<0&&(c+=360);let f=t/(1-(t-100)*.007);return e.fromJchInViewingConditions(f,l,c,o)}toInt(){return this.viewed($e.DEFAULT)}viewed(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),o=this.hue*Math.PI/180,a=.25*(Math.cos(o+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),s=a*(5e4/13)*t.nc*t.ncb,u=i/t.nbb,l=Math.sin(o),c=Math.cos(o),f=23*(u+.305)*n/(23*s+11*n*c+108*n*l),m=f*c,d=f*l,g=(460*u+451*m+288*d)/1403,p=(460*u-891*m-261*d)/1403,y=(460*u-220*m-6300*d)/1403,b=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),D=fe(g)*(100/t.fl)*Math.pow(b,1/.42),C=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),F=fe(p)*(100/t.fl)*Math.pow(C,1/.42),v=Math.max(0,27.13*Math.abs(y)/(400-Math.abs(y))),M=fe(y)*(100/t.fl)*Math.pow(v,1/.42),$=D/t.rgbD[0],w=F/t.rgbD[1],R=M/t.rgbD[2],I=1.86206786*$-1.01125463*w+.14918677*R,X=.38752654*$+.62144744*w-.00897398*R,G=-.0158415*$-.03412294*w+1.04996444*R;return ms(I,X,G)}static fromXyzInViewingConditions(t,r,n,o){let a=.401288*t+.650173*r-.051461*n,i=-.250268*t+1.204414*r+.045854*n,s=-.002079*t+.048952*r+.953127*n,u=o.rgbD[0]*a,l=o.rgbD[1]*i,c=o.rgbD[2]*s,f=Math.pow(o.fl*Math.abs(u)/100,.42),m=Math.pow(o.fl*Math.abs(l)/100,.42),d=Math.pow(o.fl*Math.abs(c)/100,.42),g=fe(u)*400*f/(f+27.13),p=fe(l)*400*m/(m+27.13),y=fe(c)*400*d/(d+27.13),b=(11*g+-12*p+y)/11,D=(g+p-2*y)/9,C=(20*g+20*p+21*y)/20,F=(40*g+20*p+y)/20,M=Math.atan2(D,b)*180/Math.PI,$=M<0?M+360:M>=360?M-360:M,w=$*Math.PI/180,R=F*o.nbb,I=100*Math.pow(R/o.aw,o.c*o.z),X=4/o.c*Math.sqrt(I/100)*(o.aw+4)*o.fLRoot,G=$<20.14?$+360:$,le=1/4*(Math.cos(G*Math.PI/180+2)+3.8),ut=5e4/13*le*o.nc*o.ncb*Math.sqrt(b*b+D*D)/(C+.305),Ne=Math.pow(ut,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),ce=Ne*Math.sqrt(I/100),je=ce*o.fLRoot,Oe=50*Math.sqrt(Ne*o.c/(o.aw+4)),Tt=(1+100*.007)*I/(1+.007*I),Ze=Math.log(1+.0228*je)/.0228,Pe=Ze*Math.cos(w),Xe=Ze*Math.sin(w);return new e($,ce,I,X,je,Oe,Tt,Pe,Xe)}xyzInViewingConditions(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),o=this.hue*Math.PI/180,a=.25*(Math.cos(o+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),s=a*(5e4/13)*t.nc*t.ncb,u=i/t.nbb,l=Math.sin(o),c=Math.cos(o),f=23*(u+.305)*n/(23*s+11*n*c+108*n*l),m=f*c,d=f*l,g=(460*u+451*m+288*d)/1403,p=(460*u-891*m-261*d)/1403,y=(460*u-220*m-6300*d)/1403,b=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),D=fe(g)*(100/t.fl)*Math.pow(b,1/.42),C=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),F=fe(p)*(100/t.fl)*Math.pow(C,1/.42),v=Math.max(0,27.13*Math.abs(y)/(400-Math.abs(y))),M=fe(y)*(100/t.fl)*Math.pow(v,1/.42),$=D/t.rgbD[0],w=F/t.rgbD[1],R=M/t.rgbD[2],I=1.86206786*$-1.01125463*w+.14918677*R,X=.38752654*$+.62144744*w-.00897398*R,G=-.0158415*$-.03412294*w+1.04996444*R;return[I,X,G]}};var Ie=class e{static sanitizeRadians(t){return(t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let r=t/100,n=0;return r<=.0031308?n=r*12.92:n=1.055*Math.pow(r,1/2.4)-.055,n*255}static chromaticAdaptation(t){let r=Math.pow(Math.abs(t),.42);return fe(t)*400*r/(r+27.13)}static hueOf(t){let r=yr(t,e.SCALED_DISCOUNT_FROM_LINRGB),n=e.chromaticAdaptation(r[0]),o=e.chromaticAdaptation(r[1]),a=e.chromaticAdaptation(r[2]),i=(11*n+-12*o+a)/11,s=(n+o-2*a)/9;return Math.atan2(s,i)}static areInCyclicOrder(t,r,n){let o=e.sanitizeRadians(r-t),a=e.sanitizeRadians(n-t);return o<a}static intercept(t,r,n){return(r-t)/(n-t)}static lerpPoint(t,r,n){return[t[0]+(n[0]-t[0])*r,t[1]+(n[1]-t[1])*r,t[2]+(n[2]-t[2])*r]}static setCoordinate(t,r,n,o){let a=e.intercept(t[o],r,n[o]);return e.lerpPoint(t,a,n)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,r){let n=e.Y_FROM_LINRGB[0],o=e.Y_FROM_LINRGB[1],a=e.Y_FROM_LINRGB[2],i=r%4<=1?0:100,s=r%2===0?0:100;if(r<4){let u=i,l=s,c=(t-u*o-l*a)/n;return e.isBounded(c)?[c,u,l]:[-1,-1,-1]}else if(r<8){let u=i,l=s,c=(t-l*n-u*a)/o;return e.isBounded(c)?[l,c,u]:[-1,-1,-1]}else{let u=i,l=s,c=(t-u*n-l*o)/a;return e.isBounded(c)?[u,l,c]:[-1,-1,-1]}}static bisectToSegment(t,r){let n=[-1,-1,-1],o=n,a=0,i=0,s=!1,u=!0;for(let l=0;l<12;l++){let c=e.nthVertex(t,l);if(c[0]<0)continue;let f=e.hueOf(c);if(!s){n=c,o=c,a=f,i=f,s=!0;continue}(u||e.areInCyclicOrder(a,f,i))&&(u=!1,e.areInCyclicOrder(a,r,f)?(o=c,i=f):(n=c,a=f))}return[n,o]}static midpoint(t,r){return[(t[0]+r[0])/2,(t[1]+r[1])/2,(t[2]+r[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,r){let n=e.bisectToSegment(t,r),o=n[0],a=e.hueOf(o),i=n[1];for(let s=0;s<3;s++)if(o[s]!==i[s]){let u=-1,l=255;o[s]<i[s]?(u=e.criticalPlaneBelow(e.trueDelinearized(o[s])),l=e.criticalPlaneAbove(e.trueDelinearized(i[s]))):(u=e.criticalPlaneAbove(e.trueDelinearized(o[s])),l=e.criticalPlaneBelow(e.trueDelinearized(i[s])));for(let c=0;c<8&&!(Math.abs(l-u)<=1);c++){let f=Math.floor((u+l)/2),m=e.CRITICAL_PLANES[f],d=e.setCoordinate(o,m,i,s),g=e.hueOf(d);e.areInCyclicOrder(a,r,g)?(i=d,l=f):(o=d,a=g,u=f)}}return e.midpoint(o,i)}static inverseChromaticAdaptation(t){let r=Math.abs(t),n=Math.max(0,27.13*r/(400-r));return fe(t)*Math.pow(n,1/.42)}static findResultByJ(t,r,n){let o=Math.sqrt(n)*11,a=$e.DEFAULT,i=1/Math.pow(1.64-Math.pow(.29,a.n),.73),u=.25*(Math.cos(t+2)+3.8)*(5e4/13)*a.nc*a.ncb,l=Math.sin(t),c=Math.cos(t);for(let f=0;f<5;f++){let m=o/100,d=r===0||o===0?0:r/Math.sqrt(m),g=Math.pow(d*i,1/.9),y=a.aw*Math.pow(m,1/a.c/a.z)/a.nbb,b=23*(y+.305)*g/(23*u+11*g*c+108*g*l),D=b*c,C=b*l,F=(460*y+451*D+288*C)/1403,v=(460*y-891*D-261*C)/1403,M=(460*y-220*D-6300*C)/1403,$=e.inverseChromaticAdaptation(F),w=e.inverseChromaticAdaptation(v),R=e.inverseChromaticAdaptation(M),I=yr([$,w,R],e.LINRGB_FROM_SCALED_DISCOUNT);if(I[0]<0||I[1]<0||I[2]<0)return 0;let X=e.Y_FROM_LINRGB[0],G=e.Y_FROM_LINRGB[1],le=e.Y_FROM_LINRGB[2],Z=X*I[0]+G*I[1]+le*I[2];if(Z<=0)return 0;if(f===4||Math.abs(Z-n)<.002)return I[0]>100.01||I[1]>100.01||I[2]>100.01?0:Sn(I);o=o-(Z-n)*o/(2*Z)}return 0}static solveToInt(t,r,n){if(r<1e-4||n<1e-4||n>99.9999)return ps(n);t=te(t);let o=t/180*Math.PI,a=ze(n),i=e.findResultByJ(o,r,a);if(i!==0)return i;let s=e.bisectToLimit(a,o);return Sn(s)}static solveToCam(t,r,n){return pe.fromInt(e.solveToInt(t,r,n))}};Ie.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Ie.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Ie.Y_FROM_LINRGB=[.2126,.7152,.0722];Ie.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var N=class e{static from(t,r,n){return new e(Ie.solveToInt(t,r,n))}static fromInt(t){return new e(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(Ie.solveToInt(t,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(Ie.solveToInt(this.internalHue,t,this.internalTone))}get tone(){return this.internalTone}set tone(t){this.setInternalState(Ie.solveToInt(this.internalHue,this.internalChroma,t))}constructor(t){this.argb=t;let r=pe.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=Ar(t),this.argb=t}setInternalState(t){let r=pe.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=Ar(t),this.argb=t}inViewingConditions(t){let n=pe.fromInt(this.toInt()).xyzInViewingConditions(t),o=pe.fromXyzInViewingConditions(n[0],n[1],n[2],$e.make());return e.from(o.hue,o.chroma,$r(n[1]))}};var co=class e{static harmonize(t,r){let n=N.fromInt(t),o=N.fromInt(r),a=uo(n.hue,o.hue),i=Math.min(a*.5,15),s=te(n.hue+i*cs(n.hue,o.hue));return N.from(s,n.chroma,n.tone).toInt()}static hctHue(t,r,n){let o=e.cam16Ucs(t,r,n),a=pe.fromInt(o),i=pe.fromInt(t);return N.from(a.hue,i.chroma,Ar(t)).toInt()}static cam16Ucs(t,r,n){let o=pe.fromInt(t),a=pe.fromInt(r),i=o.jstar,s=o.astar,u=o.bstar,l=a.jstar,c=a.astar,f=a.bstar,m=i+(l-i)*n,d=s+(c-s)*n,g=u+(f-u)*n;return pe.fromUcs(m,d,g).toInt()}};var he=class e{static ratioOfTones(t,r){return t=Vt(0,100,t),r=Vt(0,100,r),e.ratioOfYs(ze(t),ze(r))}static ratioOfYs(t,r){let n=t>r?t:r,o=n===r?t:r;return(n+5)/(o+5)}static lighter(t,r){if(t<0||t>100)return-1;let n=ze(t),o=r*(n+5)-5,a=e.ratioOfYs(o,n),i=Math.abs(a-r);if(a<r&&i>.04)return-1;let s=$r(o)+.4;return s<0||s>100?-1:s}static darker(t,r){if(t<0||t>100)return-1;let n=ze(t),o=(n+5)/r-5,a=e.ratioOfYs(n,o),i=Math.abs(a-r);if(a<r&&i>.04)return-1;let s=$r(o)-.4;return s<0||s>100?-1:s}static lighterUnsafe(t,r){let n=e.lighter(t,r);return n<0?100:n}static darkerUnsafe(t,r){let n=e.darker(t,r);return n<0?0:n}};var Rt=class e{static isDisliked(t){let r=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,n=Math.round(t.chroma)>16,o=Math.round(t.tone)<65;return r&&n&&o}static fixIfDisliked(t){return e.isDisliked(t)?N.from(t.hue,t.chroma,70):t}};var S=class e{static fromPalette(t){return new e(t.name??"",t.palette,t.tone,t.isBackground??!1,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}constructor(t,r,n,o,a,i,s,u){if(this.name=t,this.palette=r,this.tone=n,this.isBackground=o,this.background=a,this.secondBackground=i,this.contrastCurve=s,this.toneDeltaPair=u,this.hctCache=new Map,!a&&i)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!a&&s)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(a&&!s)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(t){return this.getHct(t).toInt()}getHct(t){let r=this.hctCache.get(t);if(r!=null)return r;let n=this.getTone(t),o=this.palette(t).getHct(n);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,o),o}getTone(t){let r=t.contrastLevel<0;if(this.toneDeltaPair){let n=this.toneDeltaPair(t),o=n.roleA,a=n.roleB,i=n.delta,s=n.polarity,u=n.stayTogether,c=this.background(t).getTone(t),f=s==="nearer"||s==="lighter"&&!t.isDark||s==="darker"&&t.isDark,m=f?o:a,d=f?a:o,g=this.name===m.name,p=t.isDark?1:-1,y=m.contrastCurve.get(t.contrastLevel),b=d.contrastCurve.get(t.contrastLevel),D=m.tone(t),C=he.ratioOfTones(c,D)>=y?D:e.foregroundTone(c,y),F=d.tone(t),v=he.ratioOfTones(c,F)>=b?F:e.foregroundTone(c,b);return r&&(C=e.foregroundTone(c,y),v=e.foregroundTone(c,b)),(v-C)*p>=i||(v=Vt(0,100,C+i*p),(v-C)*p>=i||(C=Vt(0,100,v-i*p))),50<=C&&C<60?p>0?(C=60,v=Math.max(v,C+i*p)):(C=49,v=Math.min(v,C+i*p)):50<=v&&v<60&&(u?p>0?(C=60,v=Math.max(v,C+i*p)):(C=49,v=Math.min(v,C+i*p)):p>0?v=60:v=49),g?C:v}else{let n=this.tone(t);if(this.background==null)return n;let o=this.background(t).getTone(t),a=this.contrastCurve.get(t.contrastLevel);if(he.ratioOfTones(o,n)>=a||(n=e.foregroundTone(o,a)),r&&(n=e.foregroundTone(o,a)),this.isBackground&&50<=n&&n<60&&(he.ratioOfTones(49,o)>=a?n=49:n=60),this.secondBackground){let[i,s]=[this.background,this.secondBackground],[u,l]=[i(t).getTone(t),s(t).getTone(t)],[c,f]=[Math.max(u,l),Math.min(u,l)];if(he.ratioOfTones(c,n)>=a&&he.ratioOfTones(f,n)>=a)return n;let m=he.lighter(c,a),d=he.darker(f,a),g=[];return m!==-1&&g.push(m),d!==-1&&g.push(d),e.tonePrefersLightForeground(u)||e.tonePrefersLightForeground(l)?m<0?100:m:g.length===1?g[0]:d<0?0:d}return n}}static foregroundTone(t,r){let n=he.lighterUnsafe(t,r),o=he.darkerUnsafe(t,r),a=he.ratioOfTones(n,t),i=he.ratioOfTones(o,t);if(e.tonePrefersLightForeground(t)){let u=Math.abs(a-i)<.1&&a<r&&i<r;return a>=r||a>=i||u?n:o}else return i>=r||i>=a?o:n}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return e.tonePrefersLightForeground(t)&&!e.toneAllowsLightForeground(t)?49:t}};var B=class e{static fromInt(t){let r=N.fromInt(t);return e.fromHct(r)}static fromHct(t){return new e(t.hue,t.chroma,t)}static fromHueAndChroma(t,r){let n=new Bn(t,r).create();return new e(t,r,n)}constructor(t,r,n){this.hue=t,this.chroma=r,this.keyColor=n,this.cache=new Map}tone(t){let r=this.cache.get(t);return r===void 0&&(r=N.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,r)),r}getHct(t){return N.fromInt(this.tone(t))}},Bn=class{constructor(t,r){this.hue=t,this.requestedChroma=r,this.chromaCache=new Map,this.maxChromaValue=200}create(){let o=0,a=100;for(;o<a;){let i=Math.floor((o+a)/2),s=this.maxChroma(i)<this.maxChroma(i+1);if(this.maxChroma(i)>=this.requestedChroma-.01)if(Math.abs(o-50)<Math.abs(a-50))a=i;else{if(o===i)return N.from(this.hue,this.requestedChroma,o);o=i}else s?o=i+1:a=i}return N.from(this.hue,this.requestedChroma,o)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let r=N.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,r),r}};var O=class{constructor(t,r,n,o){this.low=t,this.normal=r,this.medium=n,this.high=o}get(t){return t<=-1?this.low:t<0?kt(this.low,this.normal,(t- -1)/1):t<.5?kt(this.normal,this.medium,(t-0)/.5):t<1?kt(this.medium,this.high,(t-.5)/.5):this.high}};var ie=class{constructor(t,r,n,o,a){this.roleA=t,this.roleB=r,this.delta=n,this.polarity=o,this.stayTogether=a}};var Q;(function(e){e[e.MONOCHROME=0]="MONOCHROME",e[e.NEUTRAL=1]="NEUTRAL",e[e.TONAL_SPOT=2]="TONAL_SPOT",e[e.VIBRANT=3]="VIBRANT",e[e.EXPRESSIVE=4]="EXPRESSIVE",e[e.FIDELITY=5]="FIDELITY",e[e.CONTENT=6]="CONTENT",e[e.RAINBOW=7]="RAINBOW",e[e.FRUIT_SALAD=8]="FRUIT_SALAD"})(Q||(Q={}));function Wt(e){return e.variant===Q.FIDELITY||e.variant===Q.CONTENT}function q(e){return e.variant===Q.MONOCHROME}function nf(e,t,r,n){let o=r,a=N.from(e,t,r);if(a.chroma<t){let i=a.chroma;for(;a.chroma<t;){o+=n?-1:1;let s=N.from(e,t,o);if(i>s.chroma||Math.abs(s.chroma-t)<.4)break;let u=Math.abs(s.chroma-t),l=Math.abs(a.chroma-t);u<l&&(a=s),i=Math.max(i,s.chroma)}}return o}var h=class e{static highestSurface(t){return t.isDark?e.surfaceBright:e.surfaceDim}};h.contentAccentToneDelta=15;h.primaryPaletteKeyColor=S.fromPalette({name:"primary_palette_key_color",palette:e=>e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone});h.secondaryPaletteKeyColor=S.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone});h.tertiaryPaletteKeyColor=S.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone});h.neutralPaletteKeyColor=S.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone});h.neutralVariantPaletteKeyColor=S.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone});h.background=S.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});h.onBackground=S.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>h.background,contrastCurve:new O(3,3,4.5,7)});h.surface=S.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});h.surfaceDim=S.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new O(87,87,80,75).get(e.contrastLevel),isBackground:!0});h.surfaceBright=S.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(24,24,29,34).get(e.contrastLevel):98,isBackground:!0});h.surfaceContainerLowest=S.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(4,4,2,0).get(e.contrastLevel):100,isBackground:!0});h.surfaceContainerLow=S.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(10,10,11,12).get(e.contrastLevel):new O(96,96,96,95).get(e.contrastLevel),isBackground:!0});h.surfaceContainer=S.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(12,12,16,20).get(e.contrastLevel):new O(94,94,92,90).get(e.contrastLevel),isBackground:!0});h.surfaceContainerHigh=S.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(17,17,21,25).get(e.contrastLevel):new O(92,92,88,85).get(e.contrastLevel),isBackground:!0});h.surfaceContainerHighest=S.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(22,22,26,30).get(e.contrastLevel):new O(90,90,84,80).get(e.contrastLevel),isBackground:!0});h.onSurface=S.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>h.highestSurface(e),contrastCurve:new O(4.5,7,11,21)});h.surfaceVariant=S.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0});h.onSurfaceVariant=S.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,11)});h.inverseSurface=S.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20});h.inverseOnSurface=S.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>h.inverseSurface,contrastCurve:new O(4.5,7,11,21)});h.outline=S.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>h.highestSurface(e),contrastCurve:new O(1.5,3,4.5,7)});h.outlineVariant=S.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5)});h.shadow=S.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0});h.scrim=S.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0});h.surfaceTint=S.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0});h.primary=S.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>q(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.primaryContainer,h.primary,10,"nearer",!1)});h.onPrimary=S.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>q(e)?e.isDark?10:90:e.isDark?20:100,background:e=>h.primary,contrastCurve:new O(4.5,7,11,21)});h.primaryContainer=S.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>Wt(e)?e.sourceColorHct.tone:q(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryContainer,h.primary,10,"nearer",!1)});h.onPrimaryContainer=S.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>Wt(e)?S.foregroundTone(h.primaryContainer.tone(e),4.5):q(e)?e.isDark?0:100:e.isDark?90:30,background:e=>h.primaryContainer,contrastCurve:new O(3,4.5,7,11)});h.inversePrimary=S.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>h.inverseSurface,contrastCurve:new O(3,4.5,7,7)});h.secondary=S.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.secondaryContainer,h.secondary,10,"nearer",!1)});h.onSecondary=S.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>q(e)?e.isDark?10:100:e.isDark?20:100,background:e=>h.secondary,contrastCurve:new O(4.5,7,11,21)});h.secondaryContainer=S.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{let t=e.isDark?30:90;return q(e)?e.isDark?30:85:Wt(e)?nf(e.secondaryPalette.hue,e.secondaryPalette.chroma,t,!e.isDark):t},isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryContainer,h.secondary,10,"nearer",!1)});h.onSecondaryContainer=S.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>q(e)?e.isDark?90:10:Wt(e)?S.foregroundTone(h.secondaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>h.secondaryContainer,contrastCurve:new O(3,4.5,7,11)});h.tertiary=S.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.tertiaryContainer,h.tertiary,10,"nearer",!1)});h.onTertiary=S.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?10:90:e.isDark?20:100,background:e=>h.tertiary,contrastCurve:new O(4.5,7,11,21)});h.tertiaryContainer=S.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(q(e))return e.isDark?60:49;if(!Wt(e))return e.isDark?30:90;let t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return Rt.fixIfDisliked(t).tone},isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryContainer,h.tertiary,10,"nearer",!1)});h.onTertiaryContainer=S.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?0:100:Wt(e)?S.foregroundTone(h.tertiaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>h.tertiaryContainer,contrastCurve:new O(3,4.5,7,11)});h.error=S.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.errorContainer,h.error,10,"nearer",!1)});h.onError=S.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>h.error,contrastCurve:new O(4.5,7,11,21)});h.errorContainer=S.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.errorContainer,h.error,10,"nearer",!1)});h.onErrorContainer=S.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>q(e)?e.isDark?90:10:e.isDark?90:30,background:e=>h.errorContainer,contrastCurve:new O(3,4.5,7,11)});h.primaryFixed=S.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>q(e)?40:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryFixed,h.primaryFixedDim,10,"lighter",!0)});h.primaryFixedDim=S.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>q(e)?30:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryFixed,h.primaryFixedDim,10,"lighter",!0)});h.onPrimaryFixed=S.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>q(e)?100:10,background:e=>h.primaryFixedDim,secondBackground:e=>h.primaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onPrimaryFixedVariant=S.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>q(e)?90:30,background:e=>h.primaryFixedDim,secondBackground:e=>h.primaryFixed,contrastCurve:new O(3,4.5,7,11)});h.secondaryFixed=S.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>q(e)?80:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryFixed,h.secondaryFixedDim,10,"lighter",!0)});h.secondaryFixedDim=S.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>q(e)?70:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryFixed,h.secondaryFixedDim,10,"lighter",!0)});h.onSecondaryFixed=S.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>h.secondaryFixedDim,secondBackground:e=>h.secondaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onSecondaryFixedVariant=S.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>q(e)?25:30,background:e=>h.secondaryFixedDim,secondBackground:e=>h.secondaryFixed,contrastCurve:new O(3,4.5,7,11)});h.tertiaryFixed=S.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>q(e)?40:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryFixed,h.tertiaryFixedDim,10,"lighter",!0)});h.tertiaryFixedDim=S.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>q(e)?30:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryFixed,h.tertiaryFixedDim,10,"lighter",!0)});h.onTertiaryFixed=S.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>q(e)?100:10,background:e=>h.tertiaryFixedDim,secondBackground:e=>h.tertiaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onTertiaryFixedVariant=S.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>q(e)?90:30,background:e=>h.tertiaryFixedDim,secondBackground:e=>h.tertiaryFixed,contrastCurve:new O(3,4.5,7,11)});var W=class{constructor(t){this.sourceColorArgb=t.sourceColorArgb,this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.sourceColorHct=N.fromInt(t.sourceColorArgb),this.primaryPalette=t.primaryPalette,this.secondaryPalette=t.secondaryPalette,this.tertiaryPalette=t.tertiaryPalette,this.neutralPalette=t.neutralPalette,this.neutralVariantPalette=t.neutralVariantPalette,this.errorPalette=B.fromHueAndChroma(25,84)}static getRotatedHue(t,r,n){let o=t.hue;if(r.length!==n.length)throw new Error(`mismatch between hue length ${r.length} & rotations ${n.length}`);if(n.length===1)return te(t.hue+n[0]);let a=r.length;for(let i=0;i<=a-2;i++){let s=r[i],u=r[i+1];if(s<o&&o<u)return te(o+n[i])}return o}getArgb(t){return t.getArgb(this)}getHct(t){return t.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(h.primaryPaletteKeyColor)}get secondaryPaletteKeyColor(){return this.getArgb(h.secondaryPaletteKeyColor)}get tertiaryPaletteKeyColor(){return this.getArgb(h.tertiaryPaletteKeyColor)}get neutralPaletteKeyColor(){return this.getArgb(h.neutralPaletteKeyColor)}get neutralVariantPaletteKeyColor(){return this.getArgb(h.neutralVariantPaletteKeyColor)}get background(){return this.getArgb(h.background)}get onBackground(){return this.getArgb(h.onBackground)}get surface(){return this.getArgb(h.surface)}get surfaceDim(){return this.getArgb(h.surfaceDim)}get surfaceBright(){return this.getArgb(h.surfaceBright)}get surfaceContainerLowest(){return this.getArgb(h.surfaceContainerLowest)}get surfaceContainerLow(){return this.getArgb(h.surfaceContainerLow)}get surfaceContainer(){return this.getArgb(h.surfaceContainer)}get surfaceContainerHigh(){return this.getArgb(h.surfaceContainerHigh)}get surfaceContainerHighest(){return this.getArgb(h.surfaceContainerHighest)}get onSurface(){return this.getArgb(h.onSurface)}get surfaceVariant(){return this.getArgb(h.surfaceVariant)}get onSurfaceVariant(){return this.getArgb(h.onSurfaceVariant)}get inverseSurface(){return this.getArgb(h.inverseSurface)}get inverseOnSurface(){return this.getArgb(h.inverseOnSurface)}get outline(){return this.getArgb(h.outline)}get outlineVariant(){return this.getArgb(h.outlineVariant)}get shadow(){return this.getArgb(h.shadow)}get scrim(){return this.getArgb(h.scrim)}get surfaceTint(){return this.getArgb(h.surfaceTint)}get primary(){return this.getArgb(h.primary)}get onPrimary(){return this.getArgb(h.onPrimary)}get primaryContainer(){return this.getArgb(h.primaryContainer)}get onPrimaryContainer(){return this.getArgb(h.onPrimaryContainer)}get inversePrimary(){return this.getArgb(h.inversePrimary)}get secondary(){return this.getArgb(h.secondary)}get onSecondary(){return this.getArgb(h.onSecondary)}get secondaryContainer(){return this.getArgb(h.secondaryContainer)}get onSecondaryContainer(){return this.getArgb(h.onSecondaryContainer)}get tertiary(){return this.getArgb(h.tertiary)}get onTertiary(){return this.getArgb(h.onTertiary)}get tertiaryContainer(){return this.getArgb(h.tertiaryContainer)}get onTertiaryContainer(){return this.getArgb(h.onTertiaryContainer)}get error(){return this.getArgb(h.error)}get onError(){return this.getArgb(h.onError)}get errorContainer(){return this.getArgb(h.errorContainer)}get onErrorContainer(){return this.getArgb(h.onErrorContainer)}get primaryFixed(){return this.getArgb(h.primaryFixed)}get primaryFixedDim(){return this.getArgb(h.primaryFixedDim)}get onPrimaryFixed(){return this.getArgb(h.onPrimaryFixed)}get onPrimaryFixedVariant(){return this.getArgb(h.onPrimaryFixedVariant)}get secondaryFixed(){return this.getArgb(h.secondaryFixed)}get secondaryFixedDim(){return this.getArgb(h.secondaryFixedDim)}get onSecondaryFixed(){return this.getArgb(h.onSecondaryFixed)}get onSecondaryFixedVariant(){return this.getArgb(h.onSecondaryFixedVariant)}get tertiaryFixed(){return this.getArgb(h.tertiaryFixed)}get tertiaryFixedDim(){return this.getArgb(h.tertiaryFixedDim)}get onTertiaryFixed(){return this.getArgb(h.onTertiaryFixed)}get onTertiaryFixedVariant(){return this.getArgb(h.onTertiaryFixedVariant)}};var Ee=class e{static of(t){return new e(t,!1)}static contentOf(t){return new e(t,!0)}static fromColors(t){return e.createPaletteFromColors(!1,t)}static contentFromColors(t){return e.createPaletteFromColors(!0,t)}static createPaletteFromColors(t,r){let n=new e(r.primary,t);if(r.secondary){let o=new e(r.secondary,t);n.a2=o.a1}if(r.tertiary){let o=new e(r.tertiary,t);n.a3=o.a1}if(r.error){let o=new e(r.error,t);n.error=o.a1}if(r.neutral){let o=new e(r.neutral,t);n.n1=o.n1}if(r.neutralVariant){let o=new e(r.neutralVariant,t);n.n2=o.n2}return n}constructor(t,r){let n=N.fromInt(t),o=n.hue,a=n.chroma;r?(this.a1=B.fromHueAndChroma(o,a),this.a2=B.fromHueAndChroma(o,a/3),this.a3=B.fromHueAndChroma(o+60,a/2),this.n1=B.fromHueAndChroma(o,Math.min(a/12,4)),this.n2=B.fromHueAndChroma(o,Math.min(a/6,8))):(this.a1=B.fromHueAndChroma(o,Math.max(48,a)),this.a2=B.fromHueAndChroma(o,16),this.a3=B.fromHueAndChroma(o+60,24),this.n1=B.fromHueAndChroma(o,4),this.n2=B.fromHueAndChroma(o,8)),this.error=B.fromHueAndChroma(25,84)}};var Er=class e{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(t){return e.lightFromCorePalette(Ee.of(t))}static dark(t){return e.darkFromCorePalette(Ee.of(t))}static lightContent(t){return e.lightFromCorePalette(Ee.contentOf(t))}static darkContent(t){return e.darkFromCorePalette(Ee.contentOf(t))}static lightFromCorePalette(t){return new e({primary:t.a1.tone(40),onPrimary:t.a1.tone(100),primaryContainer:t.a1.tone(90),onPrimaryContainer:t.a1.tone(10),secondary:t.a2.tone(40),onSecondary:t.a2.tone(100),secondaryContainer:t.a2.tone(90),onSecondaryContainer:t.a2.tone(10),tertiary:t.a3.tone(40),onTertiary:t.a3.tone(100),tertiaryContainer:t.a3.tone(90),onTertiaryContainer:t.a3.tone(10),error:t.error.tone(40),onError:t.error.tone(100),errorContainer:t.error.tone(90),onErrorContainer:t.error.tone(10),background:t.n1.tone(99),onBackground:t.n1.tone(10),surface:t.n1.tone(99),onSurface:t.n1.tone(10),surfaceVariant:t.n2.tone(90),onSurfaceVariant:t.n2.tone(30),outline:t.n2.tone(50),outlineVariant:t.n2.tone(80),shadow:t.n1.tone(0),scrim:t.n1.tone(0),inverseSurface:t.n1.tone(20),inverseOnSurface:t.n1.tone(95),inversePrimary:t.a1.tone(80)})}static darkFromCorePalette(t){return new e({primary:t.a1.tone(80),onPrimary:t.a1.tone(20),primaryContainer:t.a1.tone(30),onPrimaryContainer:t.a1.tone(90),secondary:t.a2.tone(80),onSecondary:t.a2.tone(20),secondaryContainer:t.a2.tone(30),onSecondaryContainer:t.a2.tone(90),tertiary:t.a3.tone(80),onTertiary:t.a3.tone(20),tertiaryContainer:t.a3.tone(30),onTertiaryContainer:t.a3.tone(90),error:t.error.tone(80),onError:t.error.tone(20),errorContainer:t.error.tone(30),onErrorContainer:t.error.tone(80),background:t.n1.tone(10),onBackground:t.n1.tone(90),surface:t.n1.tone(10),onSurface:t.n1.tone(90),surfaceVariant:t.n2.tone(30),onSurfaceVariant:t.n2.tone(80),outline:t.n2.tone(60),outlineVariant:t.n2.tone(30),shadow:t.n1.tone(0),scrim:t.n1.tone(0),inverseSurface:t.n1.tone(90),inverseOnSurface:t.n1.tone(20),inversePrimary:t.a1.tone(40)})}constructor(t){this.props=t}toJSON(){return{...this.props}}};var Fr=class e{constructor(t){this.input=t,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),r=this.tempsByHct;return t.sort((n,o)=>r.get(n)-r.get(o)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,r=12){let n=Math.round(this.input.hue),o=this.hctsByHue[n],a=this.relativeTemperature(o),i=[o],s=0;for(let g=0;g<360;g++){let p=qt(n+g),y=this.hctsByHue[p],b=this.relativeTemperature(y),D=Math.abs(b-a);a=b,s+=D}let u=1,l=s/r,c=0;for(a=this.relativeTemperature(o);i.length<r;){let g=qt(n+u),p=this.hctsByHue[g],y=this.relativeTemperature(p),b=Math.abs(y-a);c+=b;let D=i.length*l,C=c>=D,F=1;for(;C&&i.length<r;){i.push(p);let v=(i.length+F)*l;C=c>=v,F++}if(a=y,u++,u>360){for(;i.length<r;)i.push(p);break}}let f=[this.input],m=Math.floor((t-1)/2);for(let g=1;g<m+1;g++){let p=0-g;for(;p<0;)p=i.length+p;p>=i.length&&(p=p%i.length),f.splice(0,0,i[p])}let d=t-m-1;for(let g=1;g<d+1;g++){let p=g;for(;p<0;)p=i.length+p;p>=i.length&&(p=p%i.length),f.push(i[p])}return f}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,r=this.tempsByHct.get(this.coldest),n=this.warmest.hue,a=this.tempsByHct.get(this.warmest)-r,i=e.isBetween(this.input.hue,t,n),s=i?n:t,u=i?t:n,l=1,c=1e3,f=this.hctsByHue[Math.round(this.input.hue)],m=1-this.inputRelativeTemperature;for(let d=0;d<=360;d+=1){let g=te(s+l*d);if(!e.isBetween(g,s,u))continue;let p=this.hctsByHue[Math.round(g)],y=(this.tempsByHct.get(p)-r)/a,b=Math.abs(m-y);b<c&&(c=b,f=p)}return this.complementCache=f,this.complementCache}relativeTemperature(t){let r=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),n=this.tempsByHct.get(t)-this.tempsByHct.get(this.coldest);return r===0?.5:n/r}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),r=new Map;for(let n of t)r.set(n,e.rawTemperature(n));return this.tempsByHctCache=r,r}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let r=0;r<=360;r+=1){let n=N.from(r,this.input.chroma,this.input.tone);t.push(n)}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,r,n){return r<n?r<=t&&t<=n:r<=t||t<=n}static rawTemperature(t){let r=Rn(t.toInt()),n=te(Math.atan2(r[2],r[1])*180/Math.PI),o=Math.sqrt(r[1]*r[1]+r[2]*r[2]);return-.5+.02*Math.pow(o,1.07)*Math.cos(te(n-50)*Math.PI/180)}};var Bt=class e extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.EXPRESSIVE,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(te(t.hue+240),40),secondaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.secondaryRotations),24),tertiaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.tertiaryRotations),32),neutralPalette:B.fromHueAndChroma(t.hue+15,8),neutralVariantPalette:B.fromHueAndChroma(t.hue+15,12)})}};Bt.hues=[0,21,51,121,151,191,271,321,360];Bt.secondaryRotations=[45,95,45,20,45,90,45,45,45];Bt.tertiaryRotations=[120,120,20,45,20,15,20,120,120];var fo=class extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.FIDELITY,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,t.chroma),secondaryPalette:B.fromHueAndChroma(t.hue,Math.max(t.chroma-32,t.chroma*.5)),tertiaryPalette:B.fromInt(Rt.fixIfDisliked(new Fr(t).complement).toInt()),neutralPalette:B.fromHueAndChroma(t.hue,t.chroma/8),neutralVariantPalette:B.fromHueAndChroma(t.hue,t.chroma/8+4)})}};var mo=class extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.TONAL_SPOT,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,36),secondaryPalette:B.fromHueAndChroma(t.hue,16),tertiaryPalette:B.fromHueAndChroma(te(t.hue+60),24),neutralPalette:B.fromHueAndChroma(t.hue,6),neutralVariantPalette:B.fromHueAndChroma(t.hue,8)})}};var Ot=class e extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.VIBRANT,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,200),secondaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.secondaryRotations),24),tertiaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.tertiaryRotations),32),neutralPalette:B.fromHueAndChroma(t.hue,10),neutralVariantPalette:B.fromHueAndChroma(t.hue,12)})}};Ot.hues=[0,41,61,101,131,181,251,301,360];Ot.secondaryRotations=[18,15,10,12,15,18,15,12,12];Ot.tertiaryRotations=[35,30,20,25,30,35,30,25,25];var af={desired:4,fallbackColorARGB:4282549748,filter:!0};function sf(e,t){return e.score>t.score?-1:e.score<t.score?1:0}var et=class e{constructor(){}static score(t,r){let{desired:n,fallbackColorARGB:o,filter:a}={...af,...r},i=[],s=new Array(360).fill(0),u=0;for(let[d,g]of t.entries()){let p=N.fromInt(d);i.push(p);let y=Math.floor(p.hue);s[y]+=g,u+=g}let l=new Array(360).fill(0);for(let d=0;d<360;d++){let g=s[d]/u;for(let p=d-14;p<d+16;p++){let y=qt(p);l[y]+=g}}let c=new Array;for(let d of i){let g=qt(Math.round(d.hue)),p=l[g];if(a&&(d.chroma<e.CUTOFF_CHROMA||p<=e.CUTOFF_EXCITED_PROPORTION))continue;let y=p*100*e.WEIGHT_PROPORTION,b=d.chroma<e.TARGET_CHROMA?e.WEIGHT_CHROMA_BELOW:e.WEIGHT_CHROMA_ABOVE,D=(d.chroma-e.TARGET_CHROMA)*b,C=y+D;c.push({hct:d,score:C})}c.sort(sf);let f=[];for(let d=90;d>=15;d--){f.length=0;for(let{hct:g}of c)if(f.find(y=>uo(g.hue,y.hue)<d)||f.push(g),f.length>=n)break;if(f.length>=n)break}let m=[];f.length===0&&m.push(o);for(let d of f)m.push(d.toInt());return m}};et.TARGET_CHROMA=48;et.WEIGHT_PROPORTION=.7;et.WEIGHT_CHROMA_ABOVE=.3;et.WEIGHT_CHROMA_BELOW=.1;et.CUTOFF_CHROMA=5;et.CUTOFF_EXCITED_PROPORTION=.01;function Gt(e){let t=Dr(e),r=xr(e),n=Cr(e),o=[t.toString(16),r.toString(16),n.toString(16)];for(let[a,i]of o.entries())i.length===1&&(o[a]="0"+i);return"#"+o.join("")}function Pt(e){e=e.replace("#","");let t=e.length===3,r=e.length===6,n=e.length===8;if(!t&&!r&&!n)throw new Error("unexpected hex "+e);let o=0,a=0,i=0;return t?(o=tt(e.slice(0,1).repeat(2)),a=tt(e.slice(1,2).repeat(2)),i=tt(e.slice(2,3).repeat(2))):r?(o=tt(e.slice(0,2)),a=tt(e.slice(2,4)),i=tt(e.slice(4,6))):n&&(o=tt(e.slice(2,4)),a=tt(e.slice(4,6)),i=tt(e.slice(6,8))),(255<<24|(o&255)<<16|(a&255)<<8|i&255)>>>0}function tt(e){return parseInt(e,16)}function gs(e,t=[]){let r=Ee.of(e);return{source:e,schemes:{light:Er.light(e),dark:Er.dark(e)},palettes:{primary:r.a1,secondary:r.a2,tertiary:r.a3,neutral:r.n1,neutralVariant:r.n2,error:r.error},customColors:t.map(n=>uf(e,n))}}function uf(e,t){let r=t.value,n=r,o=e;t.blend&&(r=co.harmonize(n,o));let i=Ee.of(r).a1;return{color:t,value:r,light:{color:i.tone(40),onColor:i.tone(100),colorContainer:i.tone(90),onColorContainer:i.tone(10)},dark:{color:i.tone(80),onColor:i.tone(20),colorContainer:i.tone(30),onColorContainer:i.tone(90)}}}var bs={primary:"#7c5df0",variant:"classic",contrast:"standard",shape:"default",font:{brand:"Noto Sans",plain:"Noto Sans"}};function On(e){return e==="-"||e==="^"||e==="$"||e==="+"||e==="."||e==="("||e===")"||e==="|"||e==="["||e==="]"||e==="{"||e==="}"||e==="*"||e==="?"||e==="\\"?"\\".concat(e):e}function cf(e){for(var t="",r=0;r<e.length;r++)t+=On(e[r]);return t}function ys(e,t){if(t===void 0&&(t=!0),Array.isArray(e)){var r=e.map(function(y){return"^".concat(ys(y,t),"$")});return"(?:".concat(r.join("|"),")")}var n="",o="",a=".";t===!0?(n="/",o="[/\\\\]",a="[^/\\\\]"):t&&(n=t,o=cf(n),o.length>1?(o="(?:".concat(o,")"),a="((?!".concat(o,").)")):a="[^".concat(o,"]"));for(var i=t?"".concat(o,"+?"):"",s=t?"".concat(o,"*?"):"",u=t?e.split(n):[e],l="",c=0;c<u.length;c++){var f=u[c],m=u[c+1],d="";if(!(!f&&c>0)){if(t&&(c===u.length-1?d=s:m!=="**"?d=i:d=""),t&&f==="**"){d&&(l+=c===0?"":c===u.length-1?"(?:".concat(i,"|$)"):i,l+="(?:".concat(a,"*?").concat(d,")*?"));continue}for(var g=0;g<f.length;g++){var p=f[g];p==="\\"?g<f.length-1&&(l+=On(f[g+1]),g++):p==="?"?l+=a:p==="*"?l+="".concat(a,"*?"):l+=On(p)}l+=d}}return l}function ff(e,t){if(typeof t!="string")throw new TypeError("Sample must be a string, but ".concat(typeof t," given"));return e.test(t)}function ye(e,t){if(typeof e!="string"&&!Array.isArray(e))throw new TypeError("The first argument must be a single pattern string or an array of patterns, but ".concat(typeof e," given"));if((typeof t=="string"||typeof t=="boolean")&&(t={separator:t}),arguments.length===2&&!(typeof t>"u"||typeof t=="object"&&t!==null&&!Array.isArray(t)))throw new TypeError("The second argument must be an options object or a string/boolean separator, but ".concat(typeof t," given"));if(t=t||{},t.separator==="\\")throw new Error("\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead");var r=ys(e,t.separator),n=new RegExp("^".concat(r,"$"),t.flags),o=ff.bind(null,n);return o.options=t,o.pattern=e,o.regexp=n,o}var nt=ef(Ds(),1);function po(e){return Object.prototype.toString.call(e).slice(8,-1)}function Mr(e){if(po(e)!=="Object")return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function df(e){return po(e)==="Null"}function mf(e,t,r,n,o){return a=>e(a)||t(a)||!!r&&r(a)||!!n&&n(a)||!!o&&o(a)}function pf(e){return po(e)==="Undefined"}var O4=mf(df,pf);function zn(e){return po(e)==="Symbol"}function xs(e,t,r,n){let o={}.propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";o==="enumerable"&&(e[t]=r),o==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function Cs(e,t,r){if(!Mr(t))return t;let n={};if(Mr(e)){let s=Object.getOwnPropertyNames(e),u=Object.getOwnPropertySymbols(e);n=[...s,...u].reduce((l,c)=>{let f=e[c];return(!zn(c)&&!Object.getOwnPropertyNames(t).includes(c)||zn(c)&&!Object.getOwnPropertySymbols(t).includes(c))&&xs(l,c,f,e),l},{})}let o=Object.getOwnPropertyNames(t),a=Object.getOwnPropertySymbols(t);return[...o,...a].reduce((s,u)=>{let l=t[u],c=Mr(e)?e[u]:void 0;c!==void 0&&Mr(l)&&(l=Cs(c,l,r));let f=r?r(c,l,u):l;return xs(s,u,f,t),s},n)}function _n(e,...t){return t.reduce((r,n)=>Cs(r,n),e)}var hf=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},ho=hf;var gf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},As=gf;var bf=e=>ho(As[e.toLowerCase()],6),$s=bf;var yf=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,vf=e=>{let t;return(t=e.match(yf))?ho(parseInt(t[1],16),t[1].length):void 0},Es=vf;var ge="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",q4=`(?:${ge}|none)`,zt=`${ge}%`,W4=`(?:${ge}%|none)`,Tr=`(?:${ge}%|${ge})`,Df=`(?:${ge}%|${ge}|none)`,Fs=`(?:${ge}(deg|grad|rad|turn)|${ge})`,G4=`(?:${ge}(deg|grad|rad|turn)|${ge}|none)`,lt="\\s*,\\s*";var J4=new RegExp("^"+Df+"$");var xf=new RegExp(`^rgba?\\(\\s*${ge}${lt}${ge}${lt}${ge}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),Cf=new RegExp(`^rgba?\\(\\s*${zt}${lt}${zt}${lt}${zt}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),Af=e=>{let t={mode:"rgb"},r;if(r=e.match(xf))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(Cf))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Ms=Af;var $f=(e,t)=>e===void 0?void 0:typeof e!="object"?wr(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Jt=$f;var Ef=(e="rgb")=>t=>(t=Jt(t,e))!==void 0?t.mode===e?t:Le[t.mode][e]?Le[t.mode][e](t):e==="rgb"?Le[t.mode].rgb(t):Le.rgb[e](Le[t.mode].rgb(t)):void 0,ve=Ef;var Le={},Ts={},kr=[],In={},Ff=e=>e,P=e=>(Le[e.mode]={...Le[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Le[t]||(Le[t]={}),Le[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=Ff)}),Ts[e.mode]=e,(e.parse||[]).forEach(t=>{Mf(t,e.mode)}),ve(e.mode)),Yt=e=>Ts[e],Mf=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");In[e]=t}else typeof e=="function"&&kr.indexOf(e)<0&&kr.push(e)};var Ln=/[^\x00-\x7F]|[a-zA-Z_]/,Tf=/[^\x00-\x7F]|[-\w]/,x={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},z=0;function go(e){let t=e[z],r=e[z+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[z+2]):t==="."?/\d/.test(r):/\d/.test(t)}function Hn(e){if(z>=e.length)return!1;let t=e[z];if(Ln.test(t))return!0;if(t==="-"){if(e.length-z<2)return!1;let r=e[z+1];return!!(r==="-"||Ln.test(r))}return!1}var wf={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Sr(e){let t="";if((e[z]==="-"||e[z]==="+")&&(t+=e[z++]),t+=bo(e),e[z]==="."&&/\d/.test(e[z+1])&&(t+=e[z++]+bo(e)),(e[z]==="e"||e[z]==="E")&&((e[z+1]==="-"||e[z+1]==="+")&&/\d/.test(e[z+2])?t+=e[z++]+e[z++]+bo(e):/\d/.test(e[z+1])&&(t+=e[z++]+bo(e))),Hn(e)){let r=yo(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:x.Hue,value:t*wf[r]}:void 0}return e[z]==="%"?(z++,{type:x.Percentage,value:+t}):{type:x.Number,value:+t}}function bo(e){let t="";for(;/\d/.test(e[z]);)t+=e[z++];return t}function yo(e){let t="";for(;z<e.length&&Tf.test(e[z]);)t+=e[z++];return t}function kf(e){let t=yo(e);return e[z]==="("?(z++,{type:x.Function,value:t}):t==="none"?{type:x.None,value:void 0}:{type:x.Ident,value:t}}function Sf(e=""){let t=e.trim(),r=[],n;for(z=0;z<t.length;){if(n=t[z++],n===`
|
|
1
|
+
var Gc=Object.create;var us=Object.defineProperty;var Jc=Object.getOwnPropertyDescriptor;var Yc=Object.getOwnPropertyNames;var Kc=Object.getPrototypeOf,Zc=Object.prototype.hasOwnProperty;var Qc=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var ef=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Yc(t))!Zc.call(e,o)&&o!==r&&us(e,o,{get:()=>t[o],enumerable:!(n=Jc(t,o))||n.enumerable});return e};var tf=(e,t,r)=>(r=e!=null?Gc(Kc(e)):{},ef(t||!e||!e.__esModule?us(r,"default",{value:e,enumerable:!0}):r,e));var Ds=Qc((P4,Pn)=>{var L=String,vs=function(){return{isColorSupported:!1,reset:L,bold:L,dim:L,italic:L,underline:L,inverse:L,hidden:L,strikethrough:L,black:L,red:L,green:L,yellow:L,blue:L,magenta:L,cyan:L,white:L,gray:L,bgBlack:L,bgRed:L,bgGreen:L,bgYellow:L,bgBlue:L,bgMagenta:L,bgCyan:L,bgWhite:L,blackBright:L,redBright:L,greenBright:L,yellowBright:L,blueBright:L,magentaBright:L,cyanBright:L,whiteBright:L,bgBlackBright:L,bgRedBright:L,bgGreenBright:L,bgYellowBright:L,bgBlueBright:L,bgMagentaBright:L,bgCyanBright:L,bgWhiteBright:L}};Pn.exports=vs();Pn.exports.createColors=vs});function fe(e){return e<0?-1:e===0?0:1}function wt(e,t,r){return(1-r)*e+r*t}function ls(e,t,r){return r<e?e:r>t?t:r}function Vt(e,t,r){return r<e?e:r>t?t:r}function qt(e){return e=e%360,e<0&&(e=e+360),e}function te(e){return e=e%360,e<0&&(e=e+360),e}function cs(e,t){return te(t-e)<=180?1:-1}function uo(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function yr(e,t){let r=e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],n=e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],o=e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2];return[r,n,o]}var fs=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],rf=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],ds=[95.047,100,108.883];function lo(e,t,r){return(255<<24|(e&255)<<16|(t&255)<<8|r&255)>>>0}function Sn(e){let t=St(e[0]),r=St(e[1]),n=St(e[2]);return lo(t,r,n)}function Dr(e){return e>>16&255}function xr(e){return e>>8&255}function Cr(e){return e&255}function ms(e,t,r){let n=rf,o=n[0][0]*e+n[0][1]*t+n[0][2]*r,a=n[1][0]*e+n[1][1]*t+n[1][2]*r,i=n[2][0]*e+n[2][1]*t+n[2][2]*r,s=St(o),u=St(a),l=St(i);return lo(s,u,l)}function of(e){let t=Ve(Dr(e)),r=Ve(xr(e)),n=Ve(Cr(e));return yr([t,r,n],fs)}function Rn(e){let t=Ve(Dr(e)),r=Ve(xr(e)),n=Ve(Cr(e)),o=fs,a=o[0][0]*t+o[0][1]*r+o[0][2]*n,i=o[1][0]*t+o[1][1]*r+o[1][2]*n,s=o[2][0]*t+o[2][1]*r+o[2][2]*n,u=ds,l=a/u[0],c=i/u[1],f=s/u[2],m=vr(l),d=vr(c),g=vr(f),p=116*d-16,y=500*(m-d),b=200*(d-g);return[p,y,b]}function ps(e){let t=ze(e),r=St(t);return lo(r,r,r)}function Ar(e){let t=of(e)[1];return 116*vr(t/100)-16}function ze(e){return 100*nf((e+16)/116)}function $r(e){return vr(e/100)*116-16}function Ve(e){let t=e/255;return t<=.040449936?t/12.92*100:Math.pow((t+.055)/1.055,2.4)*100}function St(e){let t=e/100,r=0;return t<=.0031308?r=t*12.92:r=1.055*Math.pow(t,1/2.4)-.055,ls(0,255,Math.round(r*255))}function hs(){return ds}function vr(e){let t=.008856451679035631,r=24389/27;return e>t?Math.pow(e,1/3):(r*e+16)/116}function nf(e){let t=.008856451679035631,r=24389/27,n=e*e*e;return n>t?n:(116*e-16)/r}var $e=class e{static make(t=hs(),r=200/Math.PI*ze(50)/100,n=50,o=2,a=!1){let i=t,s=i[0]*.401288+i[1]*.650173+i[2]*-.051461,u=i[0]*-.250268+i[1]*1.204414+i[2]*.045854,l=i[0]*-.002079+i[1]*.048952+i[2]*.953127,c=.8+o/10,f=c>=.9?wt(.59,.69,(c-.9)*10):wt(.525,.59,(c-.8)*10),m=a?1:c*(1-1/3.6*Math.exp((-r-42)/92));m=m>1?1:m<0?0:m;let d=c,g=[m*(100/s)+1-m,m*(100/u)+1-m,m*(100/l)+1-m],p=1/(5*r+1),y=p*p*p*p,b=1-y,D=y*r+.1*b*b*Math.cbrt(5*r),C=ze(n)/t[1],F=1.48+Math.sqrt(C),v=.725/Math.pow(C,.2),M=v,$=[Math.pow(D*g[0]*s/100,.42),Math.pow(D*g[1]*u/100,.42),Math.pow(D*g[2]*l/100,.42)],k=[400*$[0]/($[0]+27.13),400*$[1]/($[1]+27.13),400*$[2]/($[2]+27.13)],R=(2*k[0]+k[1]+.05*k[2])*v;return new e(C,R,v,M,f,d,g,D,Math.pow(D,.25),F)}constructor(t,r,n,o,a,i,s,u,l,c){this.n=t,this.aw=r,this.nbb=n,this.ncb=o,this.c=a,this.nc=i,this.rgbD=s,this.fl=u,this.fLRoot=l,this.z=c}};$e.DEFAULT=$e.make();var pe=class e{constructor(t,r,n,o,a,i,s,u,l){this.hue=t,this.chroma=r,this.j=n,this.q=o,this.m=a,this.s=i,this.jstar=s,this.astar=u,this.bstar=l}distance(t){let r=this.jstar-t.jstar,n=this.astar-t.astar,o=this.bstar-t.bstar,a=Math.sqrt(r*r+n*n+o*o);return 1.41*Math.pow(a,.63)}static fromInt(t){return e.fromIntInViewingConditions(t,$e.DEFAULT)}static fromIntInViewingConditions(t,r){let n=(t&16711680)>>16,o=(t&65280)>>8,a=t&255,i=Ve(n),s=Ve(o),u=Ve(a),l=.41233895*i+.35762064*s+.18051042*u,c=.2126*i+.7152*s+.0722*u,f=.01932141*i+.11916382*s+.95034478*u,m=.401288*l+.650173*c-.051461*f,d=-.250268*l+1.204414*c+.045854*f,g=-.002079*l+.048952*c+.953127*f,p=r.rgbD[0]*m,y=r.rgbD[1]*d,b=r.rgbD[2]*g,D=Math.pow(r.fl*Math.abs(p)/100,.42),C=Math.pow(r.fl*Math.abs(y)/100,.42),F=Math.pow(r.fl*Math.abs(b)/100,.42),v=fe(p)*400*D/(D+27.13),M=fe(y)*400*C/(C+27.13),$=fe(b)*400*F/(F+27.13),k=(11*v+-12*M+$)/11,R=(v+M-2*$)/9,I=(20*v+20*M+21*$)/20,X=(40*v+20*M+$)/20,le=Math.atan2(R,k)*180/Math.PI,Z=le<0?le+360:le>=360?le-360:le,ut=Z*Math.PI/180,Ne=X*r.nbb,ce=100*Math.pow(Ne/r.aw,r.c*r.z),je=4/r.c*Math.sqrt(ce/100)*(r.aw+4)*r.fLRoot,Oe=Z<20.14?Z+360:Z,Tt=.25*(Math.cos(Oe*Math.PI/180+2)+3.8),Pe=5e4/13*Tt*r.nc*r.ncb*Math.sqrt(k*k+R*R)/(I+.305),Xe=Math.pow(Pe,.9)*Math.pow(1.64-Math.pow(.29,r.n),.73),Ue=Xe*Math.sqrt(ce/100),Ut=Ue*r.fLRoot,kt=50*Math.sqrt(Xe*r.c/(r.aw+4)),Qe=(1+100*.007)*ce/(1+.007*ce),ss=1/.0228*Math.log(1+.0228*Ut),qc=ss*Math.cos(ut),Wc=ss*Math.sin(ut);return new e(Z,Ue,ce,je,Ut,kt,Qe,qc,Wc)}static fromJch(t,r,n){return e.fromJchInViewingConditions(t,r,n,$e.DEFAULT)}static fromJchInViewingConditions(t,r,n,o){let a=4/o.c*Math.sqrt(t/100)*(o.aw+4)*o.fLRoot,i=r*o.fLRoot,s=r/Math.sqrt(t/100),u=50*Math.sqrt(s*o.c/(o.aw+4)),l=n*Math.PI/180,c=(1+100*.007)*t/(1+.007*t),f=1/.0228*Math.log(1+.0228*i),m=f*Math.cos(l),d=f*Math.sin(l);return new e(n,r,t,a,i,u,c,m,d)}static fromUcs(t,r,n){return e.fromUcsInViewingConditions(t,r,n,$e.DEFAULT)}static fromUcsInViewingConditions(t,r,n,o){let a=r,i=n,s=Math.sqrt(a*a+i*i),l=(Math.exp(s*.0228)-1)/.0228/o.fLRoot,c=Math.atan2(i,a)*(180/Math.PI);c<0&&(c+=360);let f=t/(1-(t-100)*.007);return e.fromJchInViewingConditions(f,l,c,o)}toInt(){return this.viewed($e.DEFAULT)}viewed(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),o=this.hue*Math.PI/180,a=.25*(Math.cos(o+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),s=a*(5e4/13)*t.nc*t.ncb,u=i/t.nbb,l=Math.sin(o),c=Math.cos(o),f=23*(u+.305)*n/(23*s+11*n*c+108*n*l),m=f*c,d=f*l,g=(460*u+451*m+288*d)/1403,p=(460*u-891*m-261*d)/1403,y=(460*u-220*m-6300*d)/1403,b=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),D=fe(g)*(100/t.fl)*Math.pow(b,1/.42),C=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),F=fe(p)*(100/t.fl)*Math.pow(C,1/.42),v=Math.max(0,27.13*Math.abs(y)/(400-Math.abs(y))),M=fe(y)*(100/t.fl)*Math.pow(v,1/.42),$=D/t.rgbD[0],k=F/t.rgbD[1],R=M/t.rgbD[2],I=1.86206786*$-1.01125463*k+.14918677*R,X=.38752654*$+.62144744*k-.00897398*R,G=-.0158415*$-.03412294*k+1.04996444*R;return ms(I,X,G)}static fromXyzInViewingConditions(t,r,n,o){let a=.401288*t+.650173*r-.051461*n,i=-.250268*t+1.204414*r+.045854*n,s=-.002079*t+.048952*r+.953127*n,u=o.rgbD[0]*a,l=o.rgbD[1]*i,c=o.rgbD[2]*s,f=Math.pow(o.fl*Math.abs(u)/100,.42),m=Math.pow(o.fl*Math.abs(l)/100,.42),d=Math.pow(o.fl*Math.abs(c)/100,.42),g=fe(u)*400*f/(f+27.13),p=fe(l)*400*m/(m+27.13),y=fe(c)*400*d/(d+27.13),b=(11*g+-12*p+y)/11,D=(g+p-2*y)/9,C=(20*g+20*p+21*y)/20,F=(40*g+20*p+y)/20,M=Math.atan2(D,b)*180/Math.PI,$=M<0?M+360:M>=360?M-360:M,k=$*Math.PI/180,R=F*o.nbb,I=100*Math.pow(R/o.aw,o.c*o.z),X=4/o.c*Math.sqrt(I/100)*(o.aw+4)*o.fLRoot,G=$<20.14?$+360:$,le=1/4*(Math.cos(G*Math.PI/180+2)+3.8),ut=5e4/13*le*o.nc*o.ncb*Math.sqrt(b*b+D*D)/(C+.305),Ne=Math.pow(ut,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),ce=Ne*Math.sqrt(I/100),je=ce*o.fLRoot,Oe=50*Math.sqrt(Ne*o.c/(o.aw+4)),Tt=(1+100*.007)*I/(1+.007*I),Ze=Math.log(1+.0228*je)/.0228,Pe=Ze*Math.cos(k),Xe=Ze*Math.sin(k);return new e($,ce,I,X,je,Oe,Tt,Pe,Xe)}xyzInViewingConditions(t){let r=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),n=Math.pow(r/Math.pow(1.64-Math.pow(.29,t.n),.73),1/.9),o=this.hue*Math.PI/180,a=.25*(Math.cos(o+2)+3.8),i=t.aw*Math.pow(this.j/100,1/t.c/t.z),s=a*(5e4/13)*t.nc*t.ncb,u=i/t.nbb,l=Math.sin(o),c=Math.cos(o),f=23*(u+.305)*n/(23*s+11*n*c+108*n*l),m=f*c,d=f*l,g=(460*u+451*m+288*d)/1403,p=(460*u-891*m-261*d)/1403,y=(460*u-220*m-6300*d)/1403,b=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),D=fe(g)*(100/t.fl)*Math.pow(b,1/.42),C=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),F=fe(p)*(100/t.fl)*Math.pow(C,1/.42),v=Math.max(0,27.13*Math.abs(y)/(400-Math.abs(y))),M=fe(y)*(100/t.fl)*Math.pow(v,1/.42),$=D/t.rgbD[0],k=F/t.rgbD[1],R=M/t.rgbD[2],I=1.86206786*$-1.01125463*k+.14918677*R,X=.38752654*$+.62144744*k-.00897398*R,G=-.0158415*$-.03412294*k+1.04996444*R;return[I,X,G]}};var Ie=class e{static sanitizeRadians(t){return(t+Math.PI*8)%(Math.PI*2)}static trueDelinearized(t){let r=t/100,n=0;return r<=.0031308?n=r*12.92:n=1.055*Math.pow(r,1/2.4)-.055,n*255}static chromaticAdaptation(t){let r=Math.pow(Math.abs(t),.42);return fe(t)*400*r/(r+27.13)}static hueOf(t){let r=yr(t,e.SCALED_DISCOUNT_FROM_LINRGB),n=e.chromaticAdaptation(r[0]),o=e.chromaticAdaptation(r[1]),a=e.chromaticAdaptation(r[2]),i=(11*n+-12*o+a)/11,s=(n+o-2*a)/9;return Math.atan2(s,i)}static areInCyclicOrder(t,r,n){let o=e.sanitizeRadians(r-t),a=e.sanitizeRadians(n-t);return o<a}static intercept(t,r,n){return(r-t)/(n-t)}static lerpPoint(t,r,n){return[t[0]+(n[0]-t[0])*r,t[1]+(n[1]-t[1])*r,t[2]+(n[2]-t[2])*r]}static setCoordinate(t,r,n,o){let a=e.intercept(t[o],r,n[o]);return e.lerpPoint(t,a,n)}static isBounded(t){return 0<=t&&t<=100}static nthVertex(t,r){let n=e.Y_FROM_LINRGB[0],o=e.Y_FROM_LINRGB[1],a=e.Y_FROM_LINRGB[2],i=r%4<=1?0:100,s=r%2===0?0:100;if(r<4){let u=i,l=s,c=(t-u*o-l*a)/n;return e.isBounded(c)?[c,u,l]:[-1,-1,-1]}else if(r<8){let u=i,l=s,c=(t-l*n-u*a)/o;return e.isBounded(c)?[l,c,u]:[-1,-1,-1]}else{let u=i,l=s,c=(t-u*n-l*o)/a;return e.isBounded(c)?[u,l,c]:[-1,-1,-1]}}static bisectToSegment(t,r){let n=[-1,-1,-1],o=n,a=0,i=0,s=!1,u=!0;for(let l=0;l<12;l++){let c=e.nthVertex(t,l);if(c[0]<0)continue;let f=e.hueOf(c);if(!s){n=c,o=c,a=f,i=f,s=!0;continue}(u||e.areInCyclicOrder(a,f,i))&&(u=!1,e.areInCyclicOrder(a,r,f)?(o=c,i=f):(n=c,a=f))}return[n,o]}static midpoint(t,r){return[(t[0]+r[0])/2,(t[1]+r[1])/2,(t[2]+r[2])/2]}static criticalPlaneBelow(t){return Math.floor(t-.5)}static criticalPlaneAbove(t){return Math.ceil(t-.5)}static bisectToLimit(t,r){let n=e.bisectToSegment(t,r),o=n[0],a=e.hueOf(o),i=n[1];for(let s=0;s<3;s++)if(o[s]!==i[s]){let u=-1,l=255;o[s]<i[s]?(u=e.criticalPlaneBelow(e.trueDelinearized(o[s])),l=e.criticalPlaneAbove(e.trueDelinearized(i[s]))):(u=e.criticalPlaneAbove(e.trueDelinearized(o[s])),l=e.criticalPlaneBelow(e.trueDelinearized(i[s])));for(let c=0;c<8&&!(Math.abs(l-u)<=1);c++){let f=Math.floor((u+l)/2),m=e.CRITICAL_PLANES[f],d=e.setCoordinate(o,m,i,s),g=e.hueOf(d);e.areInCyclicOrder(a,r,g)?(i=d,l=f):(o=d,a=g,u=f)}}return e.midpoint(o,i)}static inverseChromaticAdaptation(t){let r=Math.abs(t),n=Math.max(0,27.13*r/(400-r));return fe(t)*Math.pow(n,1/.42)}static findResultByJ(t,r,n){let o=Math.sqrt(n)*11,a=$e.DEFAULT,i=1/Math.pow(1.64-Math.pow(.29,a.n),.73),u=.25*(Math.cos(t+2)+3.8)*(5e4/13)*a.nc*a.ncb,l=Math.sin(t),c=Math.cos(t);for(let f=0;f<5;f++){let m=o/100,d=r===0||o===0?0:r/Math.sqrt(m),g=Math.pow(d*i,1/.9),y=a.aw*Math.pow(m,1/a.c/a.z)/a.nbb,b=23*(y+.305)*g/(23*u+11*g*c+108*g*l),D=b*c,C=b*l,F=(460*y+451*D+288*C)/1403,v=(460*y-891*D-261*C)/1403,M=(460*y-220*D-6300*C)/1403,$=e.inverseChromaticAdaptation(F),k=e.inverseChromaticAdaptation(v),R=e.inverseChromaticAdaptation(M),I=yr([$,k,R],e.LINRGB_FROM_SCALED_DISCOUNT);if(I[0]<0||I[1]<0||I[2]<0)return 0;let X=e.Y_FROM_LINRGB[0],G=e.Y_FROM_LINRGB[1],le=e.Y_FROM_LINRGB[2],Z=X*I[0]+G*I[1]+le*I[2];if(Z<=0)return 0;if(f===4||Math.abs(Z-n)<.002)return I[0]>100.01||I[1]>100.01||I[2]>100.01?0:Sn(I);o=o-(Z-n)*o/(2*Z)}return 0}static solveToInt(t,r,n){if(r<1e-4||n<1e-4||n>99.9999)return ps(n);t=te(t);let o=t/180*Math.PI,a=ze(n),i=e.findResultByJ(o,r,a);if(i!==0)return i;let s=e.bisectToLimit(a,o);return Sn(s)}static solveToCam(t,r,n){return pe.fromInt(e.solveToInt(t,r,n))}};Ie.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];Ie.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];Ie.Y_FROM_LINRGB=[.2126,.7152,.0722];Ie.CRITICAL_PLANES=[.015176349177441876,.045529047532325624,.07588174588720938,.10623444424209313,.13658714259697685,.16693984095186062,.19729253930674434,.2276452376616281,.2579979360165119,.28835063437139563,.3188300904430532,.350925934958123,.3848314933096426,.42057480301049466,.458183274052838,.4976837250274023,.5391024159806381,.5824650784040898,.6277969426914107,.6751227633498623,.7244668422128921,.775853049866786,.829304845476233,.8848452951698498,.942497089126609,1.0022825574869039,1.0642236851973577,1.1283421258858297,1.1946592148522128,1.2631959812511864,1.3339731595349034,1.407011200216447,1.4823302800086415,1.5599503113873272,1.6398909516233677,1.7221716113234105,1.8068114625156377,1.8938294463134073,1.9832442801866852,2.075074464868551,2.1693382909216234,2.2660538449872063,2.36523901573795,2.4669114995532007,2.5710888059345764,2.6777882626779785,2.7870270208169257,2.898822059350997,3.0131901897720907,3.1301480604002863,3.2497121605402226,3.3718988244681087,3.4967242352587946,3.624204428461639,3.754355295633311,3.887192587735158,4.022731918402185,4.160988767090289,4.301978482107941,4.445716283538092,4.592217266055746,4.741496401646282,4.893568542229298,5.048448422192488,5.20615066083972,5.3666897647573375,5.5300801301023865,5.696336044816294,5.865471690767354,6.037501145825082,6.212438385869475,6.390297286737924,6.571091626112461,6.7548350853498045,6.941541251256611,7.131223617812143,7.323895587840543,7.5195704746346665,7.7182615035334345,7.919981813454504,8.124744458384042,8.332562408825165,8.543448553206703,8.757415699253682,8.974476575321063,9.194643831691977,9.417930041841839,9.644347703669503,9.873909240696694,10.106627003236781,10.342513269534024,10.58158024687427,10.8238400726681,11.069304815507364,11.317986476196008,11.569896988756009,11.825048221409341,12.083451977536606,12.345119996613247,12.610063955123938,12.878295467455942,13.149826086772048,13.42466730586372,13.702830557985108,13.984327217668513,14.269168601521828,14.55736596900856,14.848930523210871,15.143873411576273,15.44220572664832,15.743938506781891,16.04908273684337,16.35764934889634,16.66964922287304,16.985093187232053,17.30399201960269,17.62635644741625,17.95219714852476,18.281524751807332,18.614349837764564,18.95068293910138,19.290534541298456,19.633915083172692,19.98083495742689,20.331304511189067,20.685334046541502,21.042933821039977,21.404114048223256,21.76888489811322,22.137256497705877,22.50923893145328,22.884842241736916,23.264076429332462,23.6469514538663,24.033477234264016,24.42366364919083,24.817520537484558,25.21505769858089,25.61628489293138,26.021211842414342,26.429848230738664,26.842203703840827,27.258287870275353,27.678110301598522,28.10168053274597,28.529008062403893,28.96010235337422,29.39497283293396,29.83362889318845,30.276079891419332,30.722335150426627,31.172403958865512,31.62629557157785,32.08401920991837,32.54558406207592,33.010999283389665,33.4802739966603,33.953417292456834,34.430438229418264,34.911345834551085,35.39614910352207,35.88485700094671,36.37747846067349,36.87402238606382,37.37449765026789,37.87891309649659,38.38727753828926,38.89959975977785,39.41588851594697,39.93615253289054,40.460400508064545,40.98864111053629,41.520882981230194,42.05713473317016,42.597404951718396,43.141702194811224,43.6900349931913,44.24241185063697,44.798841244188324,45.35933162437017,45.92389141541209,46.49252901546552,47.065252796817916,47.64207110610409,48.22299226451468,48.808024568002054,49.3971762874833,49.9904556690408,50.587870934119984,51.189430279724725,51.79514187861014,52.40501387947288,53.0190544071392,53.637271562750364,54.259673423945976,54.88626804504493,55.517063457223934,56.15206766869424,56.79128866487574,57.43473440856916,58.08241284012621,58.734331877617365,59.39049941699807,60.05092333227251,60.715611475655585,61.38457167773311,62.057811747619894,62.7353394731159,63.417162620860914,64.10328893648692,64.79372614476921,65.48848194977529,66.18756403501224,66.89098006357258,67.59873767827808,68.31084450182222,69.02730813691093,69.74813616640164,70.47333615344107,71.20291564160104,71.93688215501312,72.67524319850172,73.41800625771542,74.16517879925733,74.9167682708136,75.67278210128072,76.43322770089146,77.1981124613393,77.96744375590167,78.74122893956174,79.51947534912904,80.30219030335869,81.08938110306934,81.88105503125999,82.67721935322541,83.4778813166706,84.28304815182372,85.09272707154808,85.90692527145302,86.72564993000343,87.54890820862819,88.3767072518277,89.2090541872801,90.04595612594655,90.88742016217518,91.73345337380438,92.58406282226491,93.43925555268066,94.29903859396902,95.16341895893969,96.03240364439274,96.9059996312159,97.78421388448044,98.6670533535366,99.55452497210776];var N=class e{static from(t,r,n){return new e(Ie.solveToInt(t,r,n))}static fromInt(t){return new e(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(t){this.setInternalState(Ie.solveToInt(t,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(t){this.setInternalState(Ie.solveToInt(this.internalHue,t,this.internalTone))}get tone(){return this.internalTone}set tone(t){this.setInternalState(Ie.solveToInt(this.internalHue,this.internalChroma,t))}constructor(t){this.argb=t;let r=pe.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=Ar(t),this.argb=t}setInternalState(t){let r=pe.fromInt(t);this.internalHue=r.hue,this.internalChroma=r.chroma,this.internalTone=Ar(t),this.argb=t}inViewingConditions(t){let n=pe.fromInt(this.toInt()).xyzInViewingConditions(t),o=pe.fromXyzInViewingConditions(n[0],n[1],n[2],$e.make());return e.from(o.hue,o.chroma,$r(n[1]))}};var co=class e{static harmonize(t,r){let n=N.fromInt(t),o=N.fromInt(r),a=uo(n.hue,o.hue),i=Math.min(a*.5,15),s=te(n.hue+i*cs(n.hue,o.hue));return N.from(s,n.chroma,n.tone).toInt()}static hctHue(t,r,n){let o=e.cam16Ucs(t,r,n),a=pe.fromInt(o),i=pe.fromInt(t);return N.from(a.hue,i.chroma,Ar(t)).toInt()}static cam16Ucs(t,r,n){let o=pe.fromInt(t),a=pe.fromInt(r),i=o.jstar,s=o.astar,u=o.bstar,l=a.jstar,c=a.astar,f=a.bstar,m=i+(l-i)*n,d=s+(c-s)*n,g=u+(f-u)*n;return pe.fromUcs(m,d,g).toInt()}};var he=class e{static ratioOfTones(t,r){return t=Vt(0,100,t),r=Vt(0,100,r),e.ratioOfYs(ze(t),ze(r))}static ratioOfYs(t,r){let n=t>r?t:r,o=n===r?t:r;return(n+5)/(o+5)}static lighter(t,r){if(t<0||t>100)return-1;let n=ze(t),o=r*(n+5)-5,a=e.ratioOfYs(o,n),i=Math.abs(a-r);if(a<r&&i>.04)return-1;let s=$r(o)+.4;return s<0||s>100?-1:s}static darker(t,r){if(t<0||t>100)return-1;let n=ze(t),o=(n+5)/r-5,a=e.ratioOfYs(n,o),i=Math.abs(a-r);if(a<r&&i>.04)return-1;let s=$r(o)-.4;return s<0||s>100?-1:s}static lighterUnsafe(t,r){let n=e.lighter(t,r);return n<0?100:n}static darkerUnsafe(t,r){let n=e.darker(t,r);return n<0?0:n}};var Rt=class e{static isDisliked(t){let r=Math.round(t.hue)>=90&&Math.round(t.hue)<=111,n=Math.round(t.chroma)>16,o=Math.round(t.tone)<65;return r&&n&&o}static fixIfDisliked(t){return e.isDisliked(t)?N.from(t.hue,t.chroma,70):t}};var S=class e{static fromPalette(t){return new e(t.name??"",t.palette,t.tone,t.isBackground??!1,t.background,t.secondBackground,t.contrastCurve,t.toneDeltaPair)}constructor(t,r,n,o,a,i,s,u){if(this.name=t,this.palette=r,this.tone=n,this.isBackground=o,this.background=a,this.secondBackground=i,this.contrastCurve=s,this.toneDeltaPair=u,this.hctCache=new Map,!a&&i)throw new Error(`Color ${t} has secondBackgrounddefined, but background is not defined.`);if(!a&&s)throw new Error(`Color ${t} has contrastCurvedefined, but background is not defined.`);if(a&&!s)throw new Error(`Color ${t} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(t){return this.getHct(t).toInt()}getHct(t){let r=this.hctCache.get(t);if(r!=null)return r;let n=this.getTone(t),o=this.palette(t).getHct(n);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(t,o),o}getTone(t){let r=t.contrastLevel<0;if(this.toneDeltaPair){let n=this.toneDeltaPair(t),o=n.roleA,a=n.roleB,i=n.delta,s=n.polarity,u=n.stayTogether,c=this.background(t).getTone(t),f=s==="nearer"||s==="lighter"&&!t.isDark||s==="darker"&&t.isDark,m=f?o:a,d=f?a:o,g=this.name===m.name,p=t.isDark?1:-1,y=m.contrastCurve.get(t.contrastLevel),b=d.contrastCurve.get(t.contrastLevel),D=m.tone(t),C=he.ratioOfTones(c,D)>=y?D:e.foregroundTone(c,y),F=d.tone(t),v=he.ratioOfTones(c,F)>=b?F:e.foregroundTone(c,b);return r&&(C=e.foregroundTone(c,y),v=e.foregroundTone(c,b)),(v-C)*p>=i||(v=Vt(0,100,C+i*p),(v-C)*p>=i||(C=Vt(0,100,v-i*p))),50<=C&&C<60?p>0?(C=60,v=Math.max(v,C+i*p)):(C=49,v=Math.min(v,C+i*p)):50<=v&&v<60&&(u?p>0?(C=60,v=Math.max(v,C+i*p)):(C=49,v=Math.min(v,C+i*p)):p>0?v=60:v=49),g?C:v}else{let n=this.tone(t);if(this.background==null)return n;let o=this.background(t).getTone(t),a=this.contrastCurve.get(t.contrastLevel);if(he.ratioOfTones(o,n)>=a||(n=e.foregroundTone(o,a)),r&&(n=e.foregroundTone(o,a)),this.isBackground&&50<=n&&n<60&&(he.ratioOfTones(49,o)>=a?n=49:n=60),this.secondBackground){let[i,s]=[this.background,this.secondBackground],[u,l]=[i(t).getTone(t),s(t).getTone(t)],[c,f]=[Math.max(u,l),Math.min(u,l)];if(he.ratioOfTones(c,n)>=a&&he.ratioOfTones(f,n)>=a)return n;let m=he.lighter(c,a),d=he.darker(f,a),g=[];return m!==-1&&g.push(m),d!==-1&&g.push(d),e.tonePrefersLightForeground(u)||e.tonePrefersLightForeground(l)?m<0?100:m:g.length===1?g[0]:d<0?0:d}return n}}static foregroundTone(t,r){let n=he.lighterUnsafe(t,r),o=he.darkerUnsafe(t,r),a=he.ratioOfTones(n,t),i=he.ratioOfTones(o,t);if(e.tonePrefersLightForeground(t)){let u=Math.abs(a-i)<.1&&a<r&&i<r;return a>=r||a>=i||u?n:o}else return i>=r||i>=a?o:n}static tonePrefersLightForeground(t){return Math.round(t)<60}static toneAllowsLightForeground(t){return Math.round(t)<=49}static enableLightForeground(t){return e.tonePrefersLightForeground(t)&&!e.toneAllowsLightForeground(t)?49:t}};var B=class e{static fromInt(t){let r=N.fromInt(t);return e.fromHct(r)}static fromHct(t){return new e(t.hue,t.chroma,t)}static fromHueAndChroma(t,r){let n=new Bn(t,r).create();return new e(t,r,n)}constructor(t,r,n){this.hue=t,this.chroma=r,this.keyColor=n,this.cache=new Map}tone(t){let r=this.cache.get(t);return r===void 0&&(r=N.from(this.hue,this.chroma,t).toInt(),this.cache.set(t,r)),r}getHct(t){return N.fromInt(this.tone(t))}},Bn=class{constructor(t,r){this.hue=t,this.requestedChroma=r,this.chromaCache=new Map,this.maxChromaValue=200}create(){let o=0,a=100;for(;o<a;){let i=Math.floor((o+a)/2),s=this.maxChroma(i)<this.maxChroma(i+1);if(this.maxChroma(i)>=this.requestedChroma-.01)if(Math.abs(o-50)<Math.abs(a-50))a=i;else{if(o===i)return N.from(this.hue,this.requestedChroma,o);o=i}else s?o=i+1:a=i}return N.from(this.hue,this.requestedChroma,o)}maxChroma(t){if(this.chromaCache.has(t))return this.chromaCache.get(t);let r=N.from(this.hue,this.maxChromaValue,t).chroma;return this.chromaCache.set(t,r),r}};var O=class{constructor(t,r,n,o){this.low=t,this.normal=r,this.medium=n,this.high=o}get(t){return t<=-1?this.low:t<0?wt(this.low,this.normal,(t- -1)/1):t<.5?wt(this.normal,this.medium,(t-0)/.5):t<1?wt(this.medium,this.high,(t-.5)/.5):this.high}};var ie=class{constructor(t,r,n,o,a){this.roleA=t,this.roleB=r,this.delta=n,this.polarity=o,this.stayTogether=a}};var Q;(function(e){e[e.MONOCHROME=0]="MONOCHROME",e[e.NEUTRAL=1]="NEUTRAL",e[e.TONAL_SPOT=2]="TONAL_SPOT",e[e.VIBRANT=3]="VIBRANT",e[e.EXPRESSIVE=4]="EXPRESSIVE",e[e.FIDELITY=5]="FIDELITY",e[e.CONTENT=6]="CONTENT",e[e.RAINBOW=7]="RAINBOW",e[e.FRUIT_SALAD=8]="FRUIT_SALAD"})(Q||(Q={}));function Wt(e){return e.variant===Q.FIDELITY||e.variant===Q.CONTENT}function q(e){return e.variant===Q.MONOCHROME}function af(e,t,r,n){let o=r,a=N.from(e,t,r);if(a.chroma<t){let i=a.chroma;for(;a.chroma<t;){o+=n?-1:1;let s=N.from(e,t,o);if(i>s.chroma||Math.abs(s.chroma-t)<.4)break;let u=Math.abs(s.chroma-t),l=Math.abs(a.chroma-t);u<l&&(a=s),i=Math.max(i,s.chroma)}}return o}var h=class e{static highestSurface(t){return t.isDark?e.surfaceBright:e.surfaceDim}};h.contentAccentToneDelta=15;h.primaryPaletteKeyColor=S.fromPalette({name:"primary_palette_key_color",palette:e=>e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone});h.secondaryPaletteKeyColor=S.fromPalette({name:"secondary_palette_key_color",palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone});h.tertiaryPaletteKeyColor=S.fromPalette({name:"tertiary_palette_key_color",palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone});h.neutralPaletteKeyColor=S.fromPalette({name:"neutral_palette_key_color",palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone});h.neutralVariantPaletteKeyColor=S.fromPalette({name:"neutral_variant_palette_key_color",palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone});h.background=S.fromPalette({name:"background",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});h.onBackground=S.fromPalette({name:"on_background",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>h.background,contrastCurve:new O(3,3,4.5,7)});h.surface=S.fromPalette({name:"surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0});h.surfaceDim=S.fromPalette({name:"surface_dim",palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new O(87,87,80,75).get(e.contrastLevel),isBackground:!0});h.surfaceBright=S.fromPalette({name:"surface_bright",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(24,24,29,34).get(e.contrastLevel):98,isBackground:!0});h.surfaceContainerLowest=S.fromPalette({name:"surface_container_lowest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(4,4,2,0).get(e.contrastLevel):100,isBackground:!0});h.surfaceContainerLow=S.fromPalette({name:"surface_container_low",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(10,10,11,12).get(e.contrastLevel):new O(96,96,96,95).get(e.contrastLevel),isBackground:!0});h.surfaceContainer=S.fromPalette({name:"surface_container",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(12,12,16,20).get(e.contrastLevel):new O(94,94,92,90).get(e.contrastLevel),isBackground:!0});h.surfaceContainerHigh=S.fromPalette({name:"surface_container_high",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(17,17,21,25).get(e.contrastLevel):new O(92,92,88,85).get(e.contrastLevel),isBackground:!0});h.surfaceContainerHighest=S.fromPalette({name:"surface_container_highest",palette:e=>e.neutralPalette,tone:e=>e.isDark?new O(22,22,26,30).get(e.contrastLevel):new O(90,90,84,80).get(e.contrastLevel),isBackground:!0});h.onSurface=S.fromPalette({name:"on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>h.highestSurface(e),contrastCurve:new O(4.5,7,11,21)});h.surfaceVariant=S.fromPalette({name:"surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0});h.onSurfaceVariant=S.fromPalette({name:"on_surface_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,11)});h.inverseSurface=S.fromPalette({name:"inverse_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20});h.inverseOnSurface=S.fromPalette({name:"inverse_on_surface",palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>h.inverseSurface,contrastCurve:new O(4.5,7,11,21)});h.outline=S.fromPalette({name:"outline",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>h.highestSurface(e),contrastCurve:new O(1.5,3,4.5,7)});h.outlineVariant=S.fromPalette({name:"outline_variant",palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5)});h.shadow=S.fromPalette({name:"shadow",palette:e=>e.neutralPalette,tone:e=>0});h.scrim=S.fromPalette({name:"scrim",palette:e=>e.neutralPalette,tone:e=>0});h.surfaceTint=S.fromPalette({name:"surface_tint",palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0});h.primary=S.fromPalette({name:"primary",palette:e=>e.primaryPalette,tone:e=>q(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.primaryContainer,h.primary,10,"nearer",!1)});h.onPrimary=S.fromPalette({name:"on_primary",palette:e=>e.primaryPalette,tone:e=>q(e)?e.isDark?10:90:e.isDark?20:100,background:e=>h.primary,contrastCurve:new O(4.5,7,11,21)});h.primaryContainer=S.fromPalette({name:"primary_container",palette:e=>e.primaryPalette,tone:e=>Wt(e)?e.sourceColorHct.tone:q(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryContainer,h.primary,10,"nearer",!1)});h.onPrimaryContainer=S.fromPalette({name:"on_primary_container",palette:e=>e.primaryPalette,tone:e=>Wt(e)?S.foregroundTone(h.primaryContainer.tone(e),4.5):q(e)?e.isDark?0:100:e.isDark?90:30,background:e=>h.primaryContainer,contrastCurve:new O(3,4.5,7,11)});h.inversePrimary=S.fromPalette({name:"inverse_primary",palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>h.inverseSurface,contrastCurve:new O(3,4.5,7,7)});h.secondary=S.fromPalette({name:"secondary",palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.secondaryContainer,h.secondary,10,"nearer",!1)});h.onSecondary=S.fromPalette({name:"on_secondary",palette:e=>e.secondaryPalette,tone:e=>q(e)?e.isDark?10:100:e.isDark?20:100,background:e=>h.secondary,contrastCurve:new O(4.5,7,11,21)});h.secondaryContainer=S.fromPalette({name:"secondary_container",palette:e=>e.secondaryPalette,tone:e=>{let t=e.isDark?30:90;return q(e)?e.isDark?30:85:Wt(e)?af(e.secondaryPalette.hue,e.secondaryPalette.chroma,t,!e.isDark):t},isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryContainer,h.secondary,10,"nearer",!1)});h.onSecondaryContainer=S.fromPalette({name:"on_secondary_container",palette:e=>e.secondaryPalette,tone:e=>q(e)?e.isDark?90:10:Wt(e)?S.foregroundTone(h.secondaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>h.secondaryContainer,contrastCurve:new O(3,4.5,7,11)});h.tertiary=S.fromPalette({name:"tertiary",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.tertiaryContainer,h.tertiary,10,"nearer",!1)});h.onTertiary=S.fromPalette({name:"on_tertiary",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?10:90:e.isDark?20:100,background:e=>h.tertiary,contrastCurve:new O(4.5,7,11,21)});h.tertiaryContainer=S.fromPalette({name:"tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>{if(q(e))return e.isDark?60:49;if(!Wt(e))return e.isDark?30:90;let t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return Rt.fixIfDisliked(t).tone},isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryContainer,h.tertiary,10,"nearer",!1)});h.onTertiaryContainer=S.fromPalette({name:"on_tertiary_container",palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?0:100:Wt(e)?S.foregroundTone(h.tertiaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>h.tertiaryContainer,contrastCurve:new O(3,4.5,7,11)});h.error=S.fromPalette({name:"error",palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(3,4.5,7,7),toneDeltaPair:e=>new ie(h.errorContainer,h.error,10,"nearer",!1)});h.onError=S.fromPalette({name:"on_error",palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>h.error,contrastCurve:new O(4.5,7,11,21)});h.errorContainer=S.fromPalette({name:"error_container",palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.errorContainer,h.error,10,"nearer",!1)});h.onErrorContainer=S.fromPalette({name:"on_error_container",palette:e=>e.errorPalette,tone:e=>q(e)?e.isDark?90:10:e.isDark?90:30,background:e=>h.errorContainer,contrastCurve:new O(3,4.5,7,11)});h.primaryFixed=S.fromPalette({name:"primary_fixed",palette:e=>e.primaryPalette,tone:e=>q(e)?40:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryFixed,h.primaryFixedDim,10,"lighter",!0)});h.primaryFixedDim=S.fromPalette({name:"primary_fixed_dim",palette:e=>e.primaryPalette,tone:e=>q(e)?30:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.primaryFixed,h.primaryFixedDim,10,"lighter",!0)});h.onPrimaryFixed=S.fromPalette({name:"on_primary_fixed",palette:e=>e.primaryPalette,tone:e=>q(e)?100:10,background:e=>h.primaryFixedDim,secondBackground:e=>h.primaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onPrimaryFixedVariant=S.fromPalette({name:"on_primary_fixed_variant",palette:e=>e.primaryPalette,tone:e=>q(e)?90:30,background:e=>h.primaryFixedDim,secondBackground:e=>h.primaryFixed,contrastCurve:new O(3,4.5,7,11)});h.secondaryFixed=S.fromPalette({name:"secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>q(e)?80:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryFixed,h.secondaryFixedDim,10,"lighter",!0)});h.secondaryFixedDim=S.fromPalette({name:"secondary_fixed_dim",palette:e=>e.secondaryPalette,tone:e=>q(e)?70:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.secondaryFixed,h.secondaryFixedDim,10,"lighter",!0)});h.onSecondaryFixed=S.fromPalette({name:"on_secondary_fixed",palette:e=>e.secondaryPalette,tone:e=>10,background:e=>h.secondaryFixedDim,secondBackground:e=>h.secondaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onSecondaryFixedVariant=S.fromPalette({name:"on_secondary_fixed_variant",palette:e=>e.secondaryPalette,tone:e=>q(e)?25:30,background:e=>h.secondaryFixedDim,secondBackground:e=>h.secondaryFixed,contrastCurve:new O(3,4.5,7,11)});h.tertiaryFixed=S.fromPalette({name:"tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>q(e)?40:90,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryFixed,h.tertiaryFixedDim,10,"lighter",!0)});h.tertiaryFixedDim=S.fromPalette({name:"tertiary_fixed_dim",palette:e=>e.tertiaryPalette,tone:e=>q(e)?30:80,isBackground:!0,background:e=>h.highestSurface(e),contrastCurve:new O(1,1,3,4.5),toneDeltaPair:e=>new ie(h.tertiaryFixed,h.tertiaryFixedDim,10,"lighter",!0)});h.onTertiaryFixed=S.fromPalette({name:"on_tertiary_fixed",palette:e=>e.tertiaryPalette,tone:e=>q(e)?100:10,background:e=>h.tertiaryFixedDim,secondBackground:e=>h.tertiaryFixed,contrastCurve:new O(4.5,7,11,21)});h.onTertiaryFixedVariant=S.fromPalette({name:"on_tertiary_fixed_variant",palette:e=>e.tertiaryPalette,tone:e=>q(e)?90:30,background:e=>h.tertiaryFixedDim,secondBackground:e=>h.tertiaryFixed,contrastCurve:new O(3,4.5,7,11)});var W=class{constructor(t){this.sourceColorArgb=t.sourceColorArgb,this.variant=t.variant,this.contrastLevel=t.contrastLevel,this.isDark=t.isDark,this.sourceColorHct=N.fromInt(t.sourceColorArgb),this.primaryPalette=t.primaryPalette,this.secondaryPalette=t.secondaryPalette,this.tertiaryPalette=t.tertiaryPalette,this.neutralPalette=t.neutralPalette,this.neutralVariantPalette=t.neutralVariantPalette,this.errorPalette=B.fromHueAndChroma(25,84)}static getRotatedHue(t,r,n){let o=t.hue;if(r.length!==n.length)throw new Error(`mismatch between hue length ${r.length} & rotations ${n.length}`);if(n.length===1)return te(t.hue+n[0]);let a=r.length;for(let i=0;i<=a-2;i++){let s=r[i],u=r[i+1];if(s<o&&o<u)return te(o+n[i])}return o}getArgb(t){return t.getArgb(this)}getHct(t){return t.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(h.primaryPaletteKeyColor)}get secondaryPaletteKeyColor(){return this.getArgb(h.secondaryPaletteKeyColor)}get tertiaryPaletteKeyColor(){return this.getArgb(h.tertiaryPaletteKeyColor)}get neutralPaletteKeyColor(){return this.getArgb(h.neutralPaletteKeyColor)}get neutralVariantPaletteKeyColor(){return this.getArgb(h.neutralVariantPaletteKeyColor)}get background(){return this.getArgb(h.background)}get onBackground(){return this.getArgb(h.onBackground)}get surface(){return this.getArgb(h.surface)}get surfaceDim(){return this.getArgb(h.surfaceDim)}get surfaceBright(){return this.getArgb(h.surfaceBright)}get surfaceContainerLowest(){return this.getArgb(h.surfaceContainerLowest)}get surfaceContainerLow(){return this.getArgb(h.surfaceContainerLow)}get surfaceContainer(){return this.getArgb(h.surfaceContainer)}get surfaceContainerHigh(){return this.getArgb(h.surfaceContainerHigh)}get surfaceContainerHighest(){return this.getArgb(h.surfaceContainerHighest)}get onSurface(){return this.getArgb(h.onSurface)}get surfaceVariant(){return this.getArgb(h.surfaceVariant)}get onSurfaceVariant(){return this.getArgb(h.onSurfaceVariant)}get inverseSurface(){return this.getArgb(h.inverseSurface)}get inverseOnSurface(){return this.getArgb(h.inverseOnSurface)}get outline(){return this.getArgb(h.outline)}get outlineVariant(){return this.getArgb(h.outlineVariant)}get shadow(){return this.getArgb(h.shadow)}get scrim(){return this.getArgb(h.scrim)}get surfaceTint(){return this.getArgb(h.surfaceTint)}get primary(){return this.getArgb(h.primary)}get onPrimary(){return this.getArgb(h.onPrimary)}get primaryContainer(){return this.getArgb(h.primaryContainer)}get onPrimaryContainer(){return this.getArgb(h.onPrimaryContainer)}get inversePrimary(){return this.getArgb(h.inversePrimary)}get secondary(){return this.getArgb(h.secondary)}get onSecondary(){return this.getArgb(h.onSecondary)}get secondaryContainer(){return this.getArgb(h.secondaryContainer)}get onSecondaryContainer(){return this.getArgb(h.onSecondaryContainer)}get tertiary(){return this.getArgb(h.tertiary)}get onTertiary(){return this.getArgb(h.onTertiary)}get tertiaryContainer(){return this.getArgb(h.tertiaryContainer)}get onTertiaryContainer(){return this.getArgb(h.onTertiaryContainer)}get error(){return this.getArgb(h.error)}get onError(){return this.getArgb(h.onError)}get errorContainer(){return this.getArgb(h.errorContainer)}get onErrorContainer(){return this.getArgb(h.onErrorContainer)}get primaryFixed(){return this.getArgb(h.primaryFixed)}get primaryFixedDim(){return this.getArgb(h.primaryFixedDim)}get onPrimaryFixed(){return this.getArgb(h.onPrimaryFixed)}get onPrimaryFixedVariant(){return this.getArgb(h.onPrimaryFixedVariant)}get secondaryFixed(){return this.getArgb(h.secondaryFixed)}get secondaryFixedDim(){return this.getArgb(h.secondaryFixedDim)}get onSecondaryFixed(){return this.getArgb(h.onSecondaryFixed)}get onSecondaryFixedVariant(){return this.getArgb(h.onSecondaryFixedVariant)}get tertiaryFixed(){return this.getArgb(h.tertiaryFixed)}get tertiaryFixedDim(){return this.getArgb(h.tertiaryFixedDim)}get onTertiaryFixed(){return this.getArgb(h.onTertiaryFixed)}get onTertiaryFixedVariant(){return this.getArgb(h.onTertiaryFixedVariant)}};var Ee=class e{static of(t){return new e(t,!1)}static contentOf(t){return new e(t,!0)}static fromColors(t){return e.createPaletteFromColors(!1,t)}static contentFromColors(t){return e.createPaletteFromColors(!0,t)}static createPaletteFromColors(t,r){let n=new e(r.primary,t);if(r.secondary){let o=new e(r.secondary,t);n.a2=o.a1}if(r.tertiary){let o=new e(r.tertiary,t);n.a3=o.a1}if(r.error){let o=new e(r.error,t);n.error=o.a1}if(r.neutral){let o=new e(r.neutral,t);n.n1=o.n1}if(r.neutralVariant){let o=new e(r.neutralVariant,t);n.n2=o.n2}return n}constructor(t,r){let n=N.fromInt(t),o=n.hue,a=n.chroma;r?(this.a1=B.fromHueAndChroma(o,a),this.a2=B.fromHueAndChroma(o,a/3),this.a3=B.fromHueAndChroma(o+60,a/2),this.n1=B.fromHueAndChroma(o,Math.min(a/12,4)),this.n2=B.fromHueAndChroma(o,Math.min(a/6,8))):(this.a1=B.fromHueAndChroma(o,Math.max(48,a)),this.a2=B.fromHueAndChroma(o,16),this.a3=B.fromHueAndChroma(o+60,24),this.n1=B.fromHueAndChroma(o,4),this.n2=B.fromHueAndChroma(o,8)),this.error=B.fromHueAndChroma(25,84)}};var Er=class e{get primary(){return this.props.primary}get onPrimary(){return this.props.onPrimary}get primaryContainer(){return this.props.primaryContainer}get onPrimaryContainer(){return this.props.onPrimaryContainer}get secondary(){return this.props.secondary}get onSecondary(){return this.props.onSecondary}get secondaryContainer(){return this.props.secondaryContainer}get onSecondaryContainer(){return this.props.onSecondaryContainer}get tertiary(){return this.props.tertiary}get onTertiary(){return this.props.onTertiary}get tertiaryContainer(){return this.props.tertiaryContainer}get onTertiaryContainer(){return this.props.onTertiaryContainer}get error(){return this.props.error}get onError(){return this.props.onError}get errorContainer(){return this.props.errorContainer}get onErrorContainer(){return this.props.onErrorContainer}get background(){return this.props.background}get onBackground(){return this.props.onBackground}get surface(){return this.props.surface}get onSurface(){return this.props.onSurface}get surfaceVariant(){return this.props.surfaceVariant}get onSurfaceVariant(){return this.props.onSurfaceVariant}get outline(){return this.props.outline}get outlineVariant(){return this.props.outlineVariant}get shadow(){return this.props.shadow}get scrim(){return this.props.scrim}get inverseSurface(){return this.props.inverseSurface}get inverseOnSurface(){return this.props.inverseOnSurface}get inversePrimary(){return this.props.inversePrimary}static light(t){return e.lightFromCorePalette(Ee.of(t))}static dark(t){return e.darkFromCorePalette(Ee.of(t))}static lightContent(t){return e.lightFromCorePalette(Ee.contentOf(t))}static darkContent(t){return e.darkFromCorePalette(Ee.contentOf(t))}static lightFromCorePalette(t){return new e({primary:t.a1.tone(40),onPrimary:t.a1.tone(100),primaryContainer:t.a1.tone(90),onPrimaryContainer:t.a1.tone(10),secondary:t.a2.tone(40),onSecondary:t.a2.tone(100),secondaryContainer:t.a2.tone(90),onSecondaryContainer:t.a2.tone(10),tertiary:t.a3.tone(40),onTertiary:t.a3.tone(100),tertiaryContainer:t.a3.tone(90),onTertiaryContainer:t.a3.tone(10),error:t.error.tone(40),onError:t.error.tone(100),errorContainer:t.error.tone(90),onErrorContainer:t.error.tone(10),background:t.n1.tone(99),onBackground:t.n1.tone(10),surface:t.n1.tone(99),onSurface:t.n1.tone(10),surfaceVariant:t.n2.tone(90),onSurfaceVariant:t.n2.tone(30),outline:t.n2.tone(50),outlineVariant:t.n2.tone(80),shadow:t.n1.tone(0),scrim:t.n1.tone(0),inverseSurface:t.n1.tone(20),inverseOnSurface:t.n1.tone(95),inversePrimary:t.a1.tone(80)})}static darkFromCorePalette(t){return new e({primary:t.a1.tone(80),onPrimary:t.a1.tone(20),primaryContainer:t.a1.tone(30),onPrimaryContainer:t.a1.tone(90),secondary:t.a2.tone(80),onSecondary:t.a2.tone(20),secondaryContainer:t.a2.tone(30),onSecondaryContainer:t.a2.tone(90),tertiary:t.a3.tone(80),onTertiary:t.a3.tone(20),tertiaryContainer:t.a3.tone(30),onTertiaryContainer:t.a3.tone(90),error:t.error.tone(80),onError:t.error.tone(20),errorContainer:t.error.tone(30),onErrorContainer:t.error.tone(80),background:t.n1.tone(10),onBackground:t.n1.tone(90),surface:t.n1.tone(10),onSurface:t.n1.tone(90),surfaceVariant:t.n2.tone(30),onSurfaceVariant:t.n2.tone(80),outline:t.n2.tone(60),outlineVariant:t.n2.tone(30),shadow:t.n1.tone(0),scrim:t.n1.tone(0),inverseSurface:t.n1.tone(90),inverseOnSurface:t.n1.tone(20),inversePrimary:t.a1.tone(40)})}constructor(t){this.props=t}toJSON(){return{...this.props}}};var Fr=class e{constructor(t){this.input=t,this.hctsByTempCache=[],this.hctsByHueCache=[],this.tempsByHctCache=new Map,this.inputRelativeTemperatureCache=-1,this.complementCache=null}get hctsByTemp(){if(this.hctsByTempCache.length>0)return this.hctsByTempCache;let t=this.hctsByHue.concat([this.input]),r=this.tempsByHct;return t.sort((n,o)=>r.get(n)-r.get(o)),this.hctsByTempCache=t,t}get warmest(){return this.hctsByTemp[this.hctsByTemp.length-1]}get coldest(){return this.hctsByTemp[0]}analogous(t=5,r=12){let n=Math.round(this.input.hue),o=this.hctsByHue[n],a=this.relativeTemperature(o),i=[o],s=0;for(let g=0;g<360;g++){let p=qt(n+g),y=this.hctsByHue[p],b=this.relativeTemperature(y),D=Math.abs(b-a);a=b,s+=D}let u=1,l=s/r,c=0;for(a=this.relativeTemperature(o);i.length<r;){let g=qt(n+u),p=this.hctsByHue[g],y=this.relativeTemperature(p),b=Math.abs(y-a);c+=b;let D=i.length*l,C=c>=D,F=1;for(;C&&i.length<r;){i.push(p);let v=(i.length+F)*l;C=c>=v,F++}if(a=y,u++,u>360){for(;i.length<r;)i.push(p);break}}let f=[this.input],m=Math.floor((t-1)/2);for(let g=1;g<m+1;g++){let p=0-g;for(;p<0;)p=i.length+p;p>=i.length&&(p=p%i.length),f.splice(0,0,i[p])}let d=t-m-1;for(let g=1;g<d+1;g++){let p=g;for(;p<0;)p=i.length+p;p>=i.length&&(p=p%i.length),f.push(i[p])}return f}get complement(){if(this.complementCache!=null)return this.complementCache;let t=this.coldest.hue,r=this.tempsByHct.get(this.coldest),n=this.warmest.hue,a=this.tempsByHct.get(this.warmest)-r,i=e.isBetween(this.input.hue,t,n),s=i?n:t,u=i?t:n,l=1,c=1e3,f=this.hctsByHue[Math.round(this.input.hue)],m=1-this.inputRelativeTemperature;for(let d=0;d<=360;d+=1){let g=te(s+l*d);if(!e.isBetween(g,s,u))continue;let p=this.hctsByHue[Math.round(g)],y=(this.tempsByHct.get(p)-r)/a,b=Math.abs(m-y);b<c&&(c=b,f=p)}return this.complementCache=f,this.complementCache}relativeTemperature(t){let r=this.tempsByHct.get(this.warmest)-this.tempsByHct.get(this.coldest),n=this.tempsByHct.get(t)-this.tempsByHct.get(this.coldest);return r===0?.5:n/r}get inputRelativeTemperature(){return this.inputRelativeTemperatureCache>=0?this.inputRelativeTemperatureCache:(this.inputRelativeTemperatureCache=this.relativeTemperature(this.input),this.inputRelativeTemperatureCache)}get tempsByHct(){if(this.tempsByHctCache.size>0)return this.tempsByHctCache;let t=this.hctsByHue.concat([this.input]),r=new Map;for(let n of t)r.set(n,e.rawTemperature(n));return this.tempsByHctCache=r,r}get hctsByHue(){if(this.hctsByHueCache.length>0)return this.hctsByHueCache;let t=[];for(let r=0;r<=360;r+=1){let n=N.from(r,this.input.chroma,this.input.tone);t.push(n)}return this.hctsByHueCache=t,this.hctsByHueCache}static isBetween(t,r,n){return r<n?r<=t&&t<=n:r<=t||t<=n}static rawTemperature(t){let r=Rn(t.toInt()),n=te(Math.atan2(r[2],r[1])*180/Math.PI),o=Math.sqrt(r[1]*r[1]+r[2]*r[2]);return-.5+.02*Math.pow(o,1.07)*Math.cos(te(n-50)*Math.PI/180)}};var Bt=class e extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.EXPRESSIVE,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(te(t.hue+240),40),secondaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.secondaryRotations),24),tertiaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.tertiaryRotations),32),neutralPalette:B.fromHueAndChroma(t.hue+15,8),neutralVariantPalette:B.fromHueAndChroma(t.hue+15,12)})}};Bt.hues=[0,21,51,121,151,191,271,321,360];Bt.secondaryRotations=[45,95,45,20,45,90,45,45,45];Bt.tertiaryRotations=[120,120,20,45,20,15,20,120,120];var fo=class extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.FIDELITY,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,t.chroma),secondaryPalette:B.fromHueAndChroma(t.hue,Math.max(t.chroma-32,t.chroma*.5)),tertiaryPalette:B.fromInt(Rt.fixIfDisliked(new Fr(t).complement).toInt()),neutralPalette:B.fromHueAndChroma(t.hue,t.chroma/8),neutralVariantPalette:B.fromHueAndChroma(t.hue,t.chroma/8+4)})}};var mo=class extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.TONAL_SPOT,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,36),secondaryPalette:B.fromHueAndChroma(t.hue,16),tertiaryPalette:B.fromHueAndChroma(te(t.hue+60),24),neutralPalette:B.fromHueAndChroma(t.hue,6),neutralVariantPalette:B.fromHueAndChroma(t.hue,8)})}};var Ot=class e extends W{constructor(t,r,n){super({sourceColorArgb:t.toInt(),variant:Q.VIBRANT,contrastLevel:n,isDark:r,primaryPalette:B.fromHueAndChroma(t.hue,200),secondaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.secondaryRotations),24),tertiaryPalette:B.fromHueAndChroma(W.getRotatedHue(t,e.hues,e.tertiaryRotations),32),neutralPalette:B.fromHueAndChroma(t.hue,10),neutralVariantPalette:B.fromHueAndChroma(t.hue,12)})}};Ot.hues=[0,41,61,101,131,181,251,301,360];Ot.secondaryRotations=[18,15,10,12,15,18,15,12,12];Ot.tertiaryRotations=[35,30,20,25,30,35,30,25,25];var sf={desired:4,fallbackColorARGB:4282549748,filter:!0};function uf(e,t){return e.score>t.score?-1:e.score<t.score?1:0}var et=class e{constructor(){}static score(t,r){let{desired:n,fallbackColorARGB:o,filter:a}={...sf,...r},i=[],s=new Array(360).fill(0),u=0;for(let[d,g]of t.entries()){let p=N.fromInt(d);i.push(p);let y=Math.floor(p.hue);s[y]+=g,u+=g}let l=new Array(360).fill(0);for(let d=0;d<360;d++){let g=s[d]/u;for(let p=d-14;p<d+16;p++){let y=qt(p);l[y]+=g}}let c=new Array;for(let d of i){let g=qt(Math.round(d.hue)),p=l[g];if(a&&(d.chroma<e.CUTOFF_CHROMA||p<=e.CUTOFF_EXCITED_PROPORTION))continue;let y=p*100*e.WEIGHT_PROPORTION,b=d.chroma<e.TARGET_CHROMA?e.WEIGHT_CHROMA_BELOW:e.WEIGHT_CHROMA_ABOVE,D=(d.chroma-e.TARGET_CHROMA)*b,C=y+D;c.push({hct:d,score:C})}c.sort(uf);let f=[];for(let d=90;d>=15;d--){f.length=0;for(let{hct:g}of c)if(f.find(y=>uo(g.hue,y.hue)<d)||f.push(g),f.length>=n)break;if(f.length>=n)break}let m=[];f.length===0&&m.push(o);for(let d of f)m.push(d.toInt());return m}};et.TARGET_CHROMA=48;et.WEIGHT_PROPORTION=.7;et.WEIGHT_CHROMA_ABOVE=.3;et.WEIGHT_CHROMA_BELOW=.1;et.CUTOFF_CHROMA=5;et.CUTOFF_EXCITED_PROPORTION=.01;function Gt(e){let t=Dr(e),r=xr(e),n=Cr(e),o=[t.toString(16),r.toString(16),n.toString(16)];for(let[a,i]of o.entries())i.length===1&&(o[a]="0"+i);return"#"+o.join("")}function Pt(e){e=e.replace("#","");let t=e.length===3,r=e.length===6,n=e.length===8;if(!t&&!r&&!n)throw new Error("unexpected hex "+e);let o=0,a=0,i=0;return t?(o=tt(e.slice(0,1).repeat(2)),a=tt(e.slice(1,2).repeat(2)),i=tt(e.slice(2,3).repeat(2))):r?(o=tt(e.slice(0,2)),a=tt(e.slice(2,4)),i=tt(e.slice(4,6))):n&&(o=tt(e.slice(2,4)),a=tt(e.slice(4,6)),i=tt(e.slice(6,8))),(255<<24|(o&255)<<16|(a&255)<<8|i&255)>>>0}function tt(e){return parseInt(e,16)}function gs(e,t=[]){let r=Ee.of(e);return{source:e,schemes:{light:Er.light(e),dark:Er.dark(e)},palettes:{primary:r.a1,secondary:r.a2,tertiary:r.a3,neutral:r.n1,neutralVariant:r.n2,error:r.error},customColors:t.map(n=>lf(e,n))}}function lf(e,t){let r=t.value,n=r,o=e;t.blend&&(r=co.harmonize(n,o));let i=Ee.of(r).a1;return{color:t,value:r,light:{color:i.tone(40),onColor:i.tone(100),colorContainer:i.tone(90),onColorContainer:i.tone(10)},dark:{color:i.tone(80),onColor:i.tone(20),colorContainer:i.tone(30),onColorContainer:i.tone(90)}}}var bs={primary:"#7c5df0",variant:"classic",contrast:"standard",shape:"default",font:{brand:"Noto Sans",plain:"Noto Sans"}};function On(e){return e==="-"||e==="^"||e==="$"||e==="+"||e==="."||e==="("||e===")"||e==="|"||e==="["||e==="]"||e==="{"||e==="}"||e==="*"||e==="?"||e==="\\"?"\\".concat(e):e}function ff(e){for(var t="",r=0;r<e.length;r++)t+=On(e[r]);return t}function ys(e,t){if(t===void 0&&(t=!0),Array.isArray(e)){var r=e.map(function(y){return"^".concat(ys(y,t),"$")});return"(?:".concat(r.join("|"),")")}var n="",o="",a=".";t===!0?(n="/",o="[/\\\\]",a="[^/\\\\]"):t&&(n=t,o=ff(n),o.length>1?(o="(?:".concat(o,")"),a="((?!".concat(o,").)")):a="[^".concat(o,"]"));for(var i=t?"".concat(o,"+?"):"",s=t?"".concat(o,"*?"):"",u=t?e.split(n):[e],l="",c=0;c<u.length;c++){var f=u[c],m=u[c+1],d="";if(!(!f&&c>0)){if(t&&(c===u.length-1?d=s:m!=="**"?d=i:d=""),t&&f==="**"){d&&(l+=c===0?"":c===u.length-1?"(?:".concat(i,"|$)"):i,l+="(?:".concat(a,"*?").concat(d,")*?"));continue}for(var g=0;g<f.length;g++){var p=f[g];p==="\\"?g<f.length-1&&(l+=On(f[g+1]),g++):p==="?"?l+=a:p==="*"?l+="".concat(a,"*?"):l+=On(p)}l+=d}}return l}function df(e,t){if(typeof t!="string")throw new TypeError("Sample must be a string, but ".concat(typeof t," given"));return e.test(t)}function ye(e,t){if(typeof e!="string"&&!Array.isArray(e))throw new TypeError("The first argument must be a single pattern string or an array of patterns, but ".concat(typeof e," given"));if((typeof t=="string"||typeof t=="boolean")&&(t={separator:t}),arguments.length===2&&!(typeof t>"u"||typeof t=="object"&&t!==null&&!Array.isArray(t)))throw new TypeError("The second argument must be an options object or a string/boolean separator, but ".concat(typeof t," given"));if(t=t||{},t.separator==="\\")throw new Error("\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead");var r=ys(e,t.separator),n=new RegExp("^".concat(r,"$"),t.flags),o=df.bind(null,n);return o.options=t,o.pattern=e,o.regexp=n,o}var nt=tf(Ds(),1);function po(e){return Object.prototype.toString.call(e).slice(8,-1)}function Mr(e){if(po(e)!=="Object")return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function mf(e){return po(e)==="Null"}function pf(e,t,r,n,o){return a=>e(a)||t(a)||!!r&&r(a)||!!n&&n(a)||!!o&&o(a)}function hf(e){return po(e)==="Undefined"}var z4=pf(mf,hf);function zn(e){return po(e)==="Symbol"}function xs(e,t,r,n){let o={}.propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";o==="enumerable"&&(e[t]=r),o==="nonenumerable"&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}function Cs(e,t,r){if(!Mr(t))return t;let n={};if(Mr(e)){let s=Object.getOwnPropertyNames(e),u=Object.getOwnPropertySymbols(e);n=[...s,...u].reduce((l,c)=>{let f=e[c];return(!zn(c)&&!Object.getOwnPropertyNames(t).includes(c)||zn(c)&&!Object.getOwnPropertySymbols(t).includes(c))&&xs(l,c,f,e),l},{})}let o=Object.getOwnPropertyNames(t),a=Object.getOwnPropertySymbols(t);return[...o,...a].reduce((s,u)=>{let l=t[u],c=Mr(e)?e[u]:void 0;c!==void 0&&Mr(l)&&(l=Cs(c,l,r));let f=r?r(c,l,u):l;return xs(s,u,f,t),s},n)}function _n(e,...t){return t.reduce((r,n)=>Cs(r,n),e)}var gf=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},ho=gf;var bf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},As=bf;var yf=e=>ho(As[e.toLowerCase()],6),$s=yf;var vf=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Df=e=>{let t;return(t=e.match(vf))?ho(parseInt(t[1],16),t[1].length):void 0},Es=Df;var ge="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",G4=`(?:${ge}|none)`,zt=`${ge}%`,J4=`(?:${ge}%|none)`,Tr=`(?:${ge}%|${ge})`,xf=`(?:${ge}%|${ge}|none)`,Fs=`(?:${ge}(deg|grad|rad|turn)|${ge})`,Y4=`(?:${ge}(deg|grad|rad|turn)|${ge}|none)`,lt="\\s*,\\s*";var K4=new RegExp("^"+xf+"$");var Cf=new RegExp(`^rgba?\\(\\s*${ge}${lt}${ge}${lt}${ge}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),Af=new RegExp(`^rgba?\\(\\s*${zt}${lt}${zt}${lt}${zt}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),$f=e=>{let t={mode:"rgb"},r;if(r=e.match(Cf))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(Af))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Ms=$f;var Ef=(e,t)=>e===void 0?void 0:typeof e!="object"?kr(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Jt=Ef;var Ff=(e="rgb")=>t=>(t=Jt(t,e))!==void 0?t.mode===e?t:Le[t.mode][e]?Le[t.mode][e](t):e==="rgb"?Le[t.mode].rgb(t):Le.rgb[e](Le[t.mode].rgb(t)):void 0,ve=Ff;var Le={},Ts={},wr=[],In={},Mf=e=>e,P=e=>(Le[e.mode]={...Le[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Le[t]||(Le[t]={}),Le[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=Mf)}),Ts[e.mode]=e,(e.parse||[]).forEach(t=>{Tf(t,e.mode)}),ve(e.mode)),Yt=e=>Ts[e],Tf=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");In[e]=t}else typeof e=="function"&&wr.indexOf(e)<0&&wr.push(e)};var Ln=/[^\x00-\x7F]|[a-zA-Z_]/,kf=/[^\x00-\x7F]|[-\w]/,x={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},z=0;function go(e){let t=e[z],r=e[z+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[z+2]):t==="."?/\d/.test(r):/\d/.test(t)}function Hn(e){if(z>=e.length)return!1;let t=e[z];if(Ln.test(t))return!0;if(t==="-"){if(e.length-z<2)return!1;let r=e[z+1];return!!(r==="-"||Ln.test(r))}return!1}var wf={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Sr(e){let t="";if((e[z]==="-"||e[z]==="+")&&(t+=e[z++]),t+=bo(e),e[z]==="."&&/\d/.test(e[z+1])&&(t+=e[z++]+bo(e)),(e[z]==="e"||e[z]==="E")&&((e[z+1]==="-"||e[z+1]==="+")&&/\d/.test(e[z+2])?t+=e[z++]+e[z++]+bo(e):/\d/.test(e[z+1])&&(t+=e[z++]+bo(e))),Hn(e)){let r=yo(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:x.Hue,value:t*wf[r]}:void 0}return e[z]==="%"?(z++,{type:x.Percentage,value:+t}):{type:x.Number,value:+t}}function bo(e){let t="";for(;/\d/.test(e[z]);)t+=e[z++];return t}function yo(e){let t="";for(;z<e.length&&kf.test(e[z]);)t+=e[z++];return t}function Sf(e){let t=yo(e);return e[z]==="("?(z++,{type:x.Function,value:t}):t==="none"?{type:x.None,value:void 0}:{type:x.Ident,value:t}}function Rf(e=""){let t=e.trim(),r=[],n;for(z=0;z<t.length;){if(n=t[z++],n===`
|
|
2
2
|
`||n===" "||n===" "){for(;z<t.length&&(t[z]===`
|
|
3
3
|
`||t[z]===" "||t[z]===" ");)z++;continue}if(n===",")return;if(n===")"){r.push({type:x.ParenClose});continue}if(n==="+"){if(z--,go(t)){r.push(Sr(t));continue}return}if(n==="-"){if(z--,go(t)){r.push(Sr(t));continue}if(Hn(t)){r.push({type:x.Ident,value:yo(t)});continue}return}if(n==="."){if(z--,go(t)){r.push(Sr(t));continue}return}if(n==="/"){for(;z<t.length&&(t[z]===`
|
|
4
|
-
`||t[z]===" "||t[z]===" ");)z++;let o;if(go(t)&&(o=Sr(t),o.type!==x.Hue)){r.push({type:x.Alpha,value:o});continue}if(Hn(t)&&yo(t)==="none"){r.push({type:x.Alpha,value:{type:x.None,value:void 0}});continue}return}if(/\d/.test(n)){z--,r.push(Sr(t));continue}if(Ln.test(n)){z--,r.push(kf(t));continue}return}return r}function Rf(e){e._i=0;let t=e[e._i++];if(!t||t.type!==x.Function||t.value!=="color"||(t=e[e._i++],t.type!==x.Ident))return;let r=In[t.value];if(!r)return;let n={mode:r},o=ws(e,!1);if(!o)return;let a=Yt(r).channels;for(let i=0,s,u;i<a.length;i++)s=o[i],u=a[i],s.type!==x.None&&(n[u]=s.type===x.Number?s.value:s.value/100,u==="alpha"&&(n[u]=Math.max(0,Math.min(1,n[u]))));return n}function ws(e,t){let r=[],n;for(;e._i<e.length;){if(n=e[e._i++],n.type===x.None||n.type===x.Number||n.type===x.Alpha||n.type===x.Percentage||t&&n.type===x.Hue){r.push(n);continue}if(n.type===x.ParenClose){if(e._i<e.length)return;continue}return}if(!(r.length<3||r.length>4)){if(r.length===4){if(r[3].type!==x.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:x.None,value:void 0}),r.every(o=>o.type!==x.Alpha)?r:void 0}}function Bf(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==x.Function)return;let n=ws(e,t);if(n)return n.unshift(r.value),n}var Of=e=>{if(typeof e!="string")return;let t=Sf(e),r=t?Bf(t,!0):void 0,n,o=0,a=kr.length;for(;o<a;)if((n=kr[o++](e,r))!==void 0)return n;return t?Rf(t):void 0},wr=Of;function Pf(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let r={mode:"rgb"},[,n,o,a,i]=t;if(!(n.type===x.Hue||o.type===x.Hue||a.type===x.Hue))return n.type!==x.None&&(r.r=n.type===x.Number?n.value/255:n.value/100),o.type!==x.None&&(r.g=o.type===x.Number?o.value/255:o.value/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value/255:a.value/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var ks=Pf;var zf=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Ss=zf;var Rs=(e,t,r)=>e+r*(t-e);var _f=e=>{let t=[];for(let r=0;r<e.length-1;r++){let n=e[r],o=e[r+1];n===void 0&&o===void 0?t.push(void 0):n!==void 0&&o!==void 0?t.push([n,o]):t.push(n!==void 0?[n,n]:[o,o])}return t},Bs=e=>t=>{let r=_f(t);return n=>{let o=n*r.length,a=n>=1?r.length-1:Math.max(Math.floor(o),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],o-a)}};var A=Bs(Rs);var H=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e};var If={mode:"rgb",channels:["r","g","b","alpha"],parse:[ks,Es,Ms,$s,Ss,"srgb"],serialize:"srgb",interpolate:{r:A,g:A,b:A,alpha:{use:A,fixup:H}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},De=If;var Nn=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),Lf=e=>{let t=Nn(e.r),r=Nn(e.g),n=Nn(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},jn=Lf;var Xn=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),Hf=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"a98",r:Xn(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:Xn(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:Xn(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(o.alpha=n),o},Un=Hf;var Vn=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Nf=({r:e,g:t,b:r,alpha:n})=>{let o={mode:"lrgb",r:Vn(e),g:Vn(t),b:Vn(r)};return n!==void 0&&(o.alpha=n),o},Se=Nf;var jf=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return o!==void 0&&(a.alpha=o),a},xe=jf;var qn=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},Xf=({r:e,g:t,b:r,alpha:n},o="rgb")=>{let a={mode:o,r:qn(e),g:qn(t),b:qn(r)};return n!==void 0&&(a.alpha=n),a},Re=Xf;var Uf=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Re({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(o.alpha=n),o},Ce=Uf;var Vf={...De,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Un(xe(e)),xyz65:Un},toMode:{rgb:e=>Ce(jn(e)),xyz65:jn}},vo=Vf;var qf=e=>(e=e%360)<0?e+360:e,U=qf;function Wn({h:e,s:t,l:r,alpha:n}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=r+t*(r<.5?r:1-r),a=o-(o-r)*2*Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:o,g:a,b:2*r-o};break;case 1:i={r:a,g:o,b:2*r-o};break;case 2:i={r:2*r-o,g:o,b:a};break;case 3:i={r:2*r-o,g:a,b:o};break;case 4:i={r:a,g:2*r-o,b:o};break;case 5:i={r:o,g:2*r-o,b:a};break;default:i={r:2*r-o,g:2*r-o,b:2*r-o}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function Gn({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsl",s:o===a?0:(o-a)/(1-Math.abs(o+a-1)),l:.5*(o+a)};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var Wf=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},Os=Wf;var Gf=new RegExp(`^hsla?\\(\\s*${Fs}${lt}${zt}${lt}${zt}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),Jf=e=>{let t=e.match(Gf);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=Os(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},Ps=Jf;function Yf(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Percentage)return;r.h=n.value}if(o.type!==x.None){if(o.type===x.Hue)return;r.s=o.value/100}if(a.type!==x.None){if(a.type===x.Hue)return;r.l=a.value/100}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var zs=Yf;var Kf=(e,t)=>e.map((r,n,o)=>{if(r===void 0)return r;let a=U(r);return n===0||e[n-1]===void 0?a:t(a-U(o[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),re=e=>Kf(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var ct=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=U(e.h),n=U(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},_s=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=U(e.h),n=U(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},ft=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=U(e.h),n=U(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o};var oe=e=>{let t=e.reduce((n,o)=>{if(o!==void 0){let a=o*Math.PI/180;n.sin+=Math.sin(a),n.cos+=Math.cos(a)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r};var Zf={mode:"hsl",toMode:{rgb:Wn},fromMode:{rgb:Gn},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[zs,Ps],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},s:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},Kt=Zf;function Rr({h:e,s:t,v:r,alpha:n}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*o),b:r*(1-t)};break;case 1:a={r:r*(1-t*o),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*o)};break;case 3:a={r:r*(1-t),g:r*(1-t*o),b:r};break;case 4:a={r:r*(1-t*o),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*o)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Br({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var Qf={mode:"hsv",toMode:{rgb:Rr},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Br},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:re},s:A,v:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},Zt=Qf;function Jn({h:e,w:t,b:r,alpha:n}){if(t===void 0&&(t=0),r===void 0&&(r=0),t+r>1){let o=t+r;t/=o,r/=o}return Rr({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function Yn(e){let t=Br(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function ed(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Percentage)return;r.h=n.value}if(o.type!==x.None){if(o.type===x.Hue)return;r.w=o.value/100}if(a.type!==x.None){if(a.type===x.Hue)return;r.b=a.value/100}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Is=ed;var td={mode:"hwb",toMode:{rgb:Jn},fromMode:{rgb:Yn},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Is],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},w:A,b:A,alpha:{use:A,fixup:H}},difference:{h:_s},average:{h:oe}},Do=td;var dt=Math.pow(29,3)/Math.pow(3,3),Qt=Math.pow(6,3)/Math.pow(29,3);var V={X:.9642956764295677,Y:1,Z:.8251046025104602},mt={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},_8=Math.pow(29,3)/Math.pow(3,3),I8=Math.pow(6,3)/Math.pow(29,3);var Kn=e=>Math.pow(e,3)>Qt?Math.pow(e,3):(116*e-16)/dt,rd=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz50",x:Kn(a)*V.X,y:Kn(o)*V.Y,z:Kn(i)*V.Z};return n!==void 0&&(s.alpha=n),s},er=rd;var od=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Re({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(o.alpha=n),o},qe=od;var nd=e=>qe(er(e)),xo=nd;var ad=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return o!==void 0&&(a.alpha=o),a},We=ad;var Zn=e=>e>Qt?Math.cbrt(e):(dt*e+16)/116,id=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Zn(e/V.X),a=Zn(t/V.Y),i=Zn(r/V.Z),s={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},tr=id;var sd=e=>{let t=tr(We(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Co=sd;function ud(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,o,a,i]=t;if(!(n.type===x.Hue||o.type===x.Hue||a.type===x.Hue))return n.type!==x.None&&(r.l=Math.min(Math.max(0,n.value),100)),o.type!==x.None&&(r.a=o.type===x.Number?o.value:o.value*125/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value:a.value*125/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Ls=ud;var ld={mode:"lab",toMode:{xyz50:er,rgb:xo},fromMode:{xyz50:tr,rgb:Co},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Ls],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:H}}},pt=ld;var Ao=Math.pow(29,3)/Math.pow(3,3),$o=Math.pow(6,3)/Math.pow(29,3);var Qn=e=>Math.pow(e,3)>$o?Math.pow(e,3):(116*e-16)/Ao,cd=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz65",x:Qn(a)*mt.X,y:Qn(o)*mt.Y,z:Qn(i)*mt.Z};return n!==void 0&&(s.alpha=n),s},Eo=cd;var fd=e=>Ce(Eo(e)),ht=fd;var ea=e=>e>$o?Math.cbrt(e):(Ao*e+16)/116,dd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ea(e/mt.X),a=ea(t/mt.Y),i=ea(r/mt.Z),s={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},Fo=dd;var md=e=>{let t=Fo(xe(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},gt=md;var pd={...pt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Eo,rgb:ht},fromMode:{xyz65:Fo,rgb:gt},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Mo=pd;var hd=({l:e,a:t,b:r,alpha:n},o="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:o,l:e,c:a};return a&&(i.h=U(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},Fe=hd;var gd=({l:e,c:t,h:r,alpha:n},o="lab")=>{r===void 0&&(r=0);let a={mode:o,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},Me=gd;function bd(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(o.type!==x.None&&(r.c=Math.max(0,o.type===x.Number?o.value:o.value*150/100)),a.type!==x.None){if(a.type===x.Percentage)return;r.h=a.value}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Hs=bd;var yd={mode:"lch",toMode:{lab:Me,rgb:e=>xo(Me(e))},fromMode:{rgb:e=>Fe(Co(e)),lab:Fe},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Hs],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},c:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},bt=yd;var vd={...bt,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Me(e,"lab65"),rgb:e=>ht(Me(e,"lab65"))},fromMode:{rgb:e=>Fe(gt(e),"lch65"),lab65:e=>Fe(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},To=vd;var Dd={...De,mode:"lrgb",toMode:{rgb:Re},fromMode:{rgb:Se},parse:["srgb-linear"],serialize:"srgb-linear"},wo=Dd;var xd=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),i=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*o-3.3077115392580616*a+.2309699031821044*i,g:-1.2684379732850317*o+2.6097573492876887*a-.3413193760026573*i,b:-.0041960761386756*o-.7034186179359362*a+1.7076146940746117*i};return n!==void 0&&(s.alpha=n),s},Ge=xd;var Cd=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),i=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*o+.7936177747023054*a-.0040720430116193*i,a:1.9779985324311684*o-2.42859224204858*a+.450593709617411*i,b:.0259040424655478*o+.7827717124575296*a-.8086757549230774*i};return n!==void 0&&(s.alpha=n),s},ko=Cd;var Ad=e=>{let t=ko(Se(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},yt=Ad;var $d=e=>Re(Ge(e)),vt=$d;function Ed(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,o,a,i]=t;if(!(n.type===x.Hue||o.type===x.Hue||a.type===x.Hue))return n.type!==x.None&&(r.l=Math.min(Math.max(0,n.type===x.Number?n.value:n.value/100),1)),o.type!==x.None&&(r.a=o.type===x.Number?o.value:o.value*.4/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value:a.value*.4/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Ns=Ed;var Fd={...pt,mode:"oklab",toMode:{lrgb:Ge,rgb:vt},fromMode:{lrgb:ko,rgb:yt},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Ns],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},So=Fd;function Md(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Hue)return;r.l=Math.min(Math.max(0,n.type===x.Number?n.value:n.value/100),1)}if(o.type!==x.None&&(r.c=Math.max(0,o.type===x.Number?o.value:o.value*.4/100)),a.type!==x.None){if(a.type===x.Percentage)return;r.h=a.value}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var js=Md;var Td={...bt,mode:"oklch",toMode:{oklab:e=>Me(e,"oklab"),rgb:e=>vt(Me(e,"oklab"))},fromMode:{rgb:e=>Fe(yt(e),"oklch"),oklab:e=>Fe(e,"oklch")},parse:[js],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Ro=Td;var wd=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return o!==void 0&&(a.alpha=o),a},ta=wd;var kd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Re({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(o.alpha=n),o},ra=kd;var Sd={...De,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>ra(xe(e)),xyz65:ra},toMode:{rgb:e=>Ce(ta(e)),xyz65:ta}},Bo=Sd;var oa=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},Rd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"prophoto",r:oa(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:oa(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:oa(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(o.alpha=n),o},na=Rd;var aa=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},Bd=e=>{let t=aa(e.r),r=aa(e.g),n=aa(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},ia=Bd;var Od={...De,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:na,rgb:e=>na(We(e))},toMode:{xyz50:ia,rgb:e=>qe(ia(e))}},Oo=Od;var Xs=1.09929682680944,Pd=.018053968510807,sa=e=>{let t=Math.abs(e);return t>Pd?(Math.sign(e)||1)*(Xs*Math.pow(t,.45)-(Xs-1)):4.5*e},zd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rec2020",r:sa(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:sa(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:sa(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(o.alpha=n),o},ua=zd;var Us=1.09929682680944,_d=.018053968510807,la=(e=0)=>{let t=Math.abs(e);return t<_d*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+Us-1)/Us,1/.45)},Id=e=>{let t=la(e.r),r=la(e.g),n=la(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},ca=Id;var Ld={...De,mode:"rec2020",fromMode:{xyz65:ua,rgb:e=>ua(xe(e))},toMode:{xyz65:ca,rgb:e=>Ce(ca(e))},parse:["rec2020"],serialize:"rec2020"},Po=Ld;var Hd={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:qe,lab:tr},fromMode:{rgb:We,lab:er},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:H}}},zo=Hd;var Nd=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return o!==void 0&&(a.alpha=o),a},Vs=Nd;var jd=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return o!==void 0&&(a.alpha=o),a},qs=jd;var Xd={mode:"xyz65",toMode:{rgb:Ce,xyz50:Vs},fromMode:{rgb:xe,xyz50:qs},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:H}}},_o=Xd;var P7=P(vo),z7=P(Kt),_7=P(Zt),I7=P(Do),L7=P(pt),H7=P(Mo),N7=P(bt),j7=P(To),X7=P(wo),U7=P(So),V7=P(Ro),q7=P(Bo),W7=P(Oo),G7=P(Po),J7=P(De),Y7=P(zo),K7=P(_o);var J=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Ws=Math.PI/180,Gs=180/Math.PI;var Js=J[3]*J[4],Ys=J[1]*J[4],Ks=J[1]*J[2]-J[0]*J[3],Ud=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(Ks*r+e*Js-t*Ys)/(Ks+Js-Ys),a=r-o,i=(J[4]*(t-o)-J[2]*a)/J[3],s={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+i*i)/(J[4]*o*(1-o))};return s.s&&(s.h=Math.atan2(i,a)*Gs-120),n!==void 0&&(s.alpha=n),s},Zs=Ud;var Vd=({h:e,s:t,l:r,alpha:n})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Ws,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),s=Math.sin(e);return o.r=r+a*(J[0]*i+J[1]*s),o.g=r+a*(J[2]*i+J[3]*s),o.b=r+a*(J[4]*i+J[5]*s),n!==void 0&&(o.alpha=n),o},Qs=Vd;var qd={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Zs},toMode:{rgb:Qs},interpolate:{h:{use:A,fixup:re},s:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},eu=qd;var _t=.14444444444444443*Math.PI,rr=Math.cos(_t),or=Math.sin(_t),Io=100/Math.log(139/100);var Wd=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"lab65",l:(Math.exp(e*1/Io)-1)/.0039},a=(Math.exp(.0435*t*1*1)-1)/.075,i=a*Math.cos(r/180*Math.PI-_t),s=a*Math.sin(r/180*Math.PI-_t);return o.a=i*rr-s/.83*or,o.b=i*or+s/.83*rr,n!==void 0&&(o.alpha=n),o},Pr=Wd;var Gd=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=t*rr+r*or,a=.83*(r*rr-t*or),i=Math.sqrt(o*o+a*a),s={mode:"dlch",l:Io/1*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*1*1)};return s.c&&(s.h=U((Math.atan2(a,o)+_t)/Math.PI*180)),n!==void 0&&(s.alpha=n),s},zr=Gd;var tu=e=>Pr(Fe(e,"dlch")),ru=e=>Me(zr(e),"dlab"),Jd={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:tu,rgb:e=>ht(tu(e))},fromMode:{lab65:ru,rgb:e=>ru(gt(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:H}}},ou=Jd;var Yd={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Pr,dlab:e=>Me(e,"dlab"),rgb:e=>ht(Pr(e))},fromMode:{lab65:zr,dlab:e=>Fe(e,"dlch"),rgb:e=>zr(gt(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:A,c:A,h:{use:A,fixup:re},alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},nu=Yd;function da({h:e,s:t,i:r,alpha:n}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1+t*(3/(2-o)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-o)-1)),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1+t*(3/(2-o)-1))};break;case 4:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3/(2-o)-1))};break;case 5:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function ma({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var Kd={mode:"hsi",toMode:{rgb:da},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:ma},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:re},s:A,i:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},au=Kd;var nr=.1593017578125,iu=78.84375,ar=.8359375,ir=18.8515625,sr=18.6875;function Lo(e){if(e<0)return 0;let t=Math.pow(e,1/iu);return 1e4*Math.pow(Math.max(0,t-ar)/(ir-sr*t),1/nr)}function Ho(e){if(e<0)return 0;let t=Math.pow(e/1e4,nr);return Math.pow((ar+ir*t)/(1+sr*t),iu)}var pa=e=>Math.max(e/203,0),Qd=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Lo(e+.008609037037932761*t+.11102962500302593*r),a=Lo(e-.00860903703793275*t-.11102962500302599*r),i=Lo(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:pa(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*i),y:pa(.3647385209748074*o+.680566024947227*a-.0453045459220346*i),z:pa(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*i)};return n!==void 0&&(s.alpha=n),s},ha=Qd;var ga=(e=0)=>Math.max(e*203,0),em=({x:e,y:t,z:r,alpha:n})=>{let o=ga(e),a=ga(t),i=ga(r),s=Ho(.3592832590121217*o+.6976051147779502*a-.0358915932320289*i),u=Ho(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*i),l=Ho(.0070797844607477*o+.0748396662186366*a+.8433265453898765*i),c=.5*s+.5*u,f=1.61376953125*s-3.323486328125*u+1.709716796875*l,m=4.378173828125*s-4.24560546875*u-.132568359375*l,d={mode:"itp",i:c,t:f,p:m};return n!==void 0&&(d.alpha=n),d},ba=em;var tm={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ha,rgb:e=>Ce(ha(e))},fromMode:{xyz65:ba,rgb:e=>ba(xe(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:A,t:A,p:A,alpha:{use:A,fixup:H}}},su=tm;var rm=134.03437499999998,om=16295499532821565e-27,ya=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,nr);return Math.pow((ar+ir*t)/(1+sr*t),rm)},va=(e=0)=>Math.max(e*203,0),nm=({x:e,y:t,z:r,alpha:n})=>{e=va(e),t=va(t),r=va(r);let o=1.15*e-.15*r,a=.66*t+.34*e,i=ya(.41478972*o+.579999*a+.014648*r),s=ya(-.20151*o+1.120649*a+.0531008*r),u=ya(-.0166008*o+.2648*a+.6684799*r),l=(i+s)/2,c={mode:"jab",j:.44*l/(1-.56*l)-om,a:3.524*i-4.066708*s+.542708*u,b:.199076*i+1.096799*s-1.295875*u};return n!==void 0&&(c.alpha=n),c},No=nm;var am=134.03437499999998,uu=16295499532821565e-27,Da=e=>{if(e<0)return 0;let t=Math.pow(e,1/am);return 1e4*Math.pow((ar-t)/(sr*t-ir),1/nr)},xa=e=>e/203,im=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+uu)/(.44+.56*(e+uu)),a=Da(o+.13860504*t+.058047316*r),i=Da(o-.13860504*t-.058047316*r),s=Da(o-.096019242*t-.8118919*r),u={mode:"xyz65",x:xa(1.661373024652174*a-.914523081304348*i+.23136208173913045*s),y:xa(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*s),z:xa(-.090982811*a-.31272829*i+1.5227666*s)};return n!==void 0&&(u.alpha=n),u},jo=im;var sm=e=>{let t=No(xe(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Xo=sm;var um=e=>Ce(jo(e)),Uo=um;var lm={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Xo,xyz65:No},toMode:{rgb:Uo,xyz65:jo},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:A,a:A,b:A,alpha:{use:A,fixup:H}}},lu=lm;var cm=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:o};return o&&(a.h=U(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},Ca=cm;var fm=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Aa=fm;var dm={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Aa,rgb:e=>Uo(Aa(e))},fromMode:{rgb:e=>Ca(Xo(e)),jab:Ca},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:A,fixup:re},c:A,j:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},cu=dm;var mm=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:o};return o&&(a.h=U(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},$a=mm;var pm=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Ea=pm;var fu=(e,t,r)=>4*e/(e+15*t+3*r),du=(e,t,r)=>9*t/(e+15*t+3*r),hm=fu(V.X,V.Y,V.Z),gm=du(V.X,V.Y,V.Z),bm=e=>e<=Qt?dt*e:116*Math.cbrt(e)-16,ym=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=bm(t/V.Y),a=fu(e,t,r),i=du(e,t,r);!isFinite(a)||!isFinite(i)?o=a=i=0:(a=13*o*(a-hm),i=13*o*(i-gm));let s={mode:"luv",l:o,u:a,v:i};return n!==void 0&&(s.alpha=n),s},_r=ym;var vm=(e,t,r)=>4*e/(e+15*t+3*r),Dm=(e,t,r)=>9*t/(e+15*t+3*r),xm=vm(V.X,V.Y,V.Z),Cm=Dm(V.X,V.Y,V.Z),Am=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let o=t/(13*e)+xm,a=r/(13*e)+Cm,i=V.Y*(e<=8?e/dt:Math.pow((e+16)/116,3)),s=i*(9*o)/(4*a),u=i*(12-3*o-20*a)/(4*a),l={mode:"xyz50",x:s,y:i,z:u};return n!==void 0&&(l.alpha=n),l},Ir=Am;var $m=e=>$a(_r(We(e))),Em=e=>qe(Ir(Ea(e))),Fm={mode:"lchuv",toMode:{luv:Ea,rgb:Em},fromMode:{rgb:$m,luv:$a},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:A,fixup:re},c:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},mu=Fm;var Mm={mode:"luv",toMode:{xyz50:Ir,rgb:e=>qe(Ir(e))},fromMode:{xyz50:_r,rgb:e=>_r(We(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:A,u:A,v:A,alpha:{use:A,fixup:H}}},pu=Mm;function Lr(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function It(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function Tm(e,t){let r,n,o,a,i,s,u,l;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,o=.59662641,a=.75515197,i=.56771245,s=4.0767416621,u=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,o=.08285427,a=.1254107,i=.14503204,s=-1.2684380046,u=2.6097574011,l=-.3413193965):(r=1.35733652,n=-.00915799,o=-1.1513021,a=-.50559606,i=.00692167,s=-.0041960863,u=-.7034186147,l=1.707614701);let c=r+n*e+o*t+a*e*e+i*e*t,f=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t;{let g=1+c*f,p=1+c*m,y=1+c*d,b=g*g*g,D=p*p*p,C=y*y*y,F=3*f*g*g,v=3*m*p*p,M=3*d*y*y,$=6*f*f*g,w=6*m*m*p,R=6*d*d*y,I=s*b+u*D+l*C,X=s*F+u*v+l*M,G=s*$+u*w+l*R;c=c-I*X/(X*X-.5*I*G)}return c}function Fa(e,t){let r=Tm(e,t),n=Ge({l:1,a:r*e,b:r*t}),o=Math.cbrt(1/Math.max(n.r,n.g,n.b)),a=o*r;return[o,a]}function wm(e,t,r,n,o,a=null){a||(a=Fa(e,t));let i;if((r-o)*a[1]-(a[0]-o)*n<=0)i=a[1]*o/(n*a[0]+a[1]*(o-r));else{i=a[1]*(o-1)/(n*(a[0]-1)+a[1]*(o-r));{let s=r-o,u=n,l=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,m=s+u*l,d=s+u*c,g=s+u*f;{let p=o*(1-i)+i*r,y=i*n,b=p+y*l,D=p+y*c,C=p+y*f,F=b*b*b,v=D*D*D,M=C*C*C,$=3*m*b*b,w=3*d*D*D,R=3*g*C*C,I=6*m*m*b,X=6*d*d*D,G=6*g*g*C,le=4.0767416621*F-3.3077115913*v+.2309699292*M-1,Z=4.0767416621*$-3.3077115913*w+.2309699292*R,ut=4.0767416621*I-3.3077115913*X+.2309699292*G,Ne=Z/(Z*Z-.5*le*ut),ce=-le*Ne,je=-1.2684380046*F+2.6097574011*v-.3413193965*M-1,Oe=-1.2684380046*$+2.6097574011*w-.3413193965*R,Tt=-1.2684380046*I+2.6097574011*X-.3413193965*G,Ze=Oe/(Oe*Oe-.5*je*Tt),Pe=-je*Ze,Xe=-.0041960863*F-.7034186147*v+1.707614701*M-1,Ue=-.0041960863*$-.7034186147*w+1.707614701*R,Ut=-.0041960863*I-.7034186147*X+1.707614701*G,wt=Ue/(Ue*Ue-.5*Xe*Ut),Qe=-Xe*wt;ce=Ne>=0?ce:1e6,Pe=Ze>=0?Pe:1e6,Qe=wt>=0?Qe:1e6,i+=Math.min(ce,Math.min(Pe,Qe))}}}return i}function Hr(e,t,r=null){r||(r=Fa(e,t));let n=r[0],o=r[1];return[o/n,o/(1-n)]}function Vo(e,t,r){let n=Fa(t,r),o=wm(t,r,e,1,e,n),a=Hr(t,r,n),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),u=o/Math.min(e*a[0],(1-e)*a[1]),l=e*i,c=(1-e)*s,f=.9*u*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(c*c*c*c))));return l=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(l*l)+1/(c*c))),f,o]}function qo(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Lr(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(r*r+n*n);if(!a)return o.s=0,o;let[i,s,u]=Vo(t,r/a,n/a),l;if(a<s){let c=0,f=.8*i,m=1-f/s;l=(a-c)/(f+m*(a-c))*.8}else{let c=s,f=.2*s*s*1.25*1.25/i,m=1-f/(u-s);l=.8+.2*((a-c)/(f+m*(a-c)))}return l&&(o.s=l,o.h=U(Math.atan2(n,r)*180/Math.PI)),o}function Wo(e){let t=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,n=e.l!==void 0?e.l:0,o={mode:"oklab",l:It(n)};if(e.alpha!==void 0&&(o.alpha=e.alpha),!r||n===1)return o.a=o.b=0,o;let a=Math.cos(t/180*Math.PI),i=Math.sin(t/180*Math.PI),[s,u,l]=Vo(o.l,a,i),c,f,m,d;r<.8?(c=1.25*r,f=0,m=.8*s,d=1-m/u):(c=5*(r-.8),f=u,m=.2*u*u*1.25*1.25/s,d=1-m/(l-u));let g=f+c*m/(1-d*c);return o.a=g*a,o.b=g*i,o}var km={...Kt,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:qo,rgb:e=>qo(yt(e))},toMode:{oklab:Wo,rgb:e=>vt(Wo(e))}},hu=km;function Go(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o=Math.sqrt(r*r+n*n),a=o?r/o:1,i=o?n/o:1,[s,u]=Hr(a,i),l=.5,c=1-l/s,f=u/(o+t*u),m=f*t,d=f*o,g=It(m),p=d*g/m,y=Ge({l:g,a:a*p,b:i*p}),b=Math.cbrt(1/Math.max(y.r,y.g,y.b,0));t=t/b,o=o/b*Lr(t)/t,t=Lr(t);let D={mode:"okhsv",s:o?(l+u)*d/(u*l+u*c*d):0,v:t?t/m:0};return D.s&&(D.h=U(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(D.alpha=e.alpha),D}function Jo(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[s,u]=Hr(a,i),l=.5,c=1-l/s,f=1-n*l/(l+u-u*c*n),m=n*u*l/(l+u-u*c*n),d=It(f),g=m*d/f,p=Ge({l:d,a:a*g,b:i*g}),y=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),b=It(o*f),D=m*b/f;return t.l=b*y,t.a=D*a*y,t.b=D*i*y,t}var Sm={...Zt,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Go,rgb:e=>Go(yt(e))},toMode:{oklab:Jo,rgb:e=>vt(Jo(e))}},gu=Sm;var rt=.0037930732552754493,Yo=Math.cbrt(rt);var Ma=e=>Math.cbrt(e)-Yo,Rm=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a=Ma(.3*t+.622*r+.078*n+rt),i=Ma(.23*t+.692*r+.078*n+rt),s=Ma(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+rt),u={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:s-(a+i)/2};return o!==void 0&&(u.alpha=o),u},bu=Rm;var Ta=e=>Math.pow(e+Yo,3),Bm=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Ta(e+t)-rt,a=Ta(t-e)-rt,i=Ta(r+t)-rt,s=Re({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*i});return n!==void 0&&(s.alpha=n),s},yu=Bm;var Om={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:yu},fromMode:{rgb:bu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:A,y:A,b:A,alpha:{use:A,fixup:H}}},vu=Om;var Pm=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(o.alpha=n),o},Du=Pm;var zm=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(o.alpha=n),o},xu=zm;var _m={mode:"yiq",toMode:{rgb:xu},fromMode:{rgb:Du},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:A,i:A,q:A,alpha:{use:A,fixup:H}}},Cu=_m;var Im=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Lm=(e=4)=>t=>typeof t=="number"?Im(t,e):t,Au=Lm;var iA=Au(2),Hm=e=>Math.max(0,Math.min(1,e||0)),wa=e=>Math.round(Hm(e)*255),Nm=ve("rgb"),sA=ve("hsl"),$u=e=>{if(e===void 0)return;let t=wa(e.r),r=wa(e.g),n=wa(e.b);return"#"+(1<<24|t<<16|r<<8|n).toString(16).slice(1)};var ka=e=>$u(Nm(e));var Eu=ve("rgb"),Fu=e=>{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},jm=e=>Fu(Eu(e)),Mu=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function Tu(e){return Mu(Eu(e))}function Sa(e="rgb"){let{gamut:t}=Yt(e);if(!t)return n=>!0;let r=ve(typeof t=="string"?t:e);return n=>Mu(r(n))}function wu(e="rgb"){let{gamut:t}=Yt(e);if(!t)return a=>Jt(a);let r=typeof t=="string"?t:e,n=ve(r),o=Sa(r);return a=>{let i=Jt(a);if(!i)return;let s=n(i);if(o(s))return i;let u=Fu(s);return i.mode===u.mode?u:ve(i.mode)(u)}}function Ra(e,t="lch",r="rgb"){e=Jt(e);let n=r==="rgb"?Tu:Sa(r),o=r==="rgb"?jm:wu(r);if(e===void 0||n(e))return e;let a=ve(e.mode);e=ve(t)(e);let i={...e,c:0};if(!n(i))return a(o(i));let s=0,u=e.c!==void 0?e.c:0,l=Yt(t).ranges.c,c=(l[1]-l[0])/Math.pow(2,13),f=i.c;for(;u-s>c;)i.c=s+(u-s)*.5,n(i)?(f=i.c,s=i.c):u=i.c;return a(n(i)?i:{...i,c:f})}function Ba(e){let t=ve("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function Oa(e,t){let r=Ba(e),n=Ba(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var Xm=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Pa={a98:"a98-rgb",hsl:"hsl",hwb:"hwb",lab:"lab",lab65:"lab-d65",lch:"lch",lrgb:"srgb-linear",oklab:"oklab",oklch:"oklch",okhsv:"okhsv",p3:"display-p3",prophoto:"prophoto-rgb",rec2020:"rec2020",rgb:"srgb",xyz50:"xyz-d50",xyz65:"xyz-d65"},Ko={"a98-rgb":"a98","display-p3":"p3",hsl:"hsl",hwb:"hwb",lab:"lab","lab-d65":"lab65",lch:"lch",oklab:"oklab",oklch:"oklch",okhsv:"okhsv","prophoto-rgb":"prophoto",rec2020:"rec2020",srgb:"rgb","srgb-linear":"lrgb",xyz:"xyz65","xyz-d50":"xyz50","xyz-d65":"xyz65"};function za(e){let t=wr(e);if(!t)throw new Error(`Unable to parse color "${e}"`);if(!(t.mode in Pa))throw new Error(`Unsupported color space: ${t.mode}`);let r=Pa[t.mode],n=[0,0,0];switch(t.mode){case"a98":case"rec2020":case"p3":case"prophoto":case"lrgb":case"rgb":n=[t.r,t.g,t.b];break;case"hsl":{let a=ot[r].ranges[1]?.[1]??1,i=ot[r].ranges[2]?.[1]??1;n=[t.h??0,t.s*a,t.l*i];break}case"hwb":{let a=ot[r].ranges[1]?.[1]??1,i=ot[r].ranges[2]?.[1]??1;n=[t.h??0,t.w*a,t.b*i];break}case"lab":case"lab65":case"oklab":n=[t.l,t.a,t.b];break;case"lch":case"oklch":n=[t.l,t.c,t.h??0];break;case"okhsv":n=[t.h??0,t.s,t.v];break;case"xyz50":case"xyz65":n=[t.x,t.y,t.z];break}let o={colorSpace:r,components:n,alpha:t.alpha??1};return Xm.test(e)&&(o.hex=ka(t)),o}function Nr(e){switch(e.colorSpace){case"a98-rgb":case"display-p3":case"prophoto-rgb":case"rec2020":case"srgb":case"srgb-linear":{let[t,r,n]=e.components;return{mode:Ko[e.colorSpace]||e.colorSpace,r:t,g:r,b:n,alpha:e.alpha}}case"hsl":{let[t,r,n]=e.components,o=ot[e.colorSpace].ranges[1]?.[1]??1,a=ot[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hsl",h:t,s:r/o,l:n/a,alpha:e.alpha}}case"hwb":{let[t,r,n]=e.components,o=ot[e.colorSpace].ranges[1]?.[1]??1,a=ot[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hwb",h:t,w:r/o,b:n/a,alpha:e.alpha}}case"lab":case"lab-d65":case"oklab":{let[t,r,n]=e.components;return{mode:e.colorSpace==="lab-d65"?"lab65":e.colorSpace,l:t,a:r,b:n,alpha:e.alpha}}case"lch":case"oklch":{let[t,r,n]=e.components;return{mode:e.colorSpace,l:t,c:r,h:n,alpha:e.alpha}}case"okhsv":{let[t,r,n]=e.components;return{mode:e.colorSpace,h:t,s:r,v:n,alpha:e.alpha}}case"xyz":case"xyz-d50":case"xyz-d65":{let[t,r,n]=e.components;return{mode:Ko[e.colorSpace],x:t,y:r,z:n,alpha:e.alpha}}default:throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of ${Object.keys(Ko).join(", ")}`)}}var ot={"a98-rgb":{ranges:[[0,1],[0,1],[0,1]]},"display-p3":{ranges:[[0,1],[0,1],[0,1]]},hsl:{ranges:[[0,360],[0,100],[0,100]]},hwb:{ranges:[[0,360],[0,100],[0,100]]},lab:{ranges:[[0,100],[-125,125],[-125,125]]},"lab-d65":{ranges:[[0,100],[-125,125],[-125,125]]},lch:{ranges:[[0,100],[0,150],[0,360]]},oklab:{ranges:[[0,1],[-.4,.4],[-.4,.4]]},oklch:{ranges:[[0,1],[0,.4],[0,360]]},okhsv:{ranges:[[0,360],[0,1],[0,1]]},"prophoto-rgb":{ranges:[[0,1],[0,1],[0,1]]},rec2020:{ranges:[[0,1],[0,1],[0,1]]},srgb:{ranges:[[0,1],[0,1],[0,1]]},"srgb-linear":{ranges:[[0,1],[0,1],[0,1]]},"xyz-d50":{ranges:[[0,1],[0,1],[0,1]]},xyz:{ranges:[[0,1],[0,1],[0,1]]},"xyz-d65":{ranges:[[0,1],[0,1],[0,1]]}};function jr(e,t,r){return e===1?t:r}var ku=/^\{([^}]+)\}$/;function Te(e){return ku.test(e)}function we(e){if(e.includes("#"))throw new Error("Mode aliases (# character) are no longer supported as of v0.6.0. Alias the root token instead, and apply modes in plugins.");let t=e.match(ku);return t?t[1]??t[0]:e}function Zo(e){let t=e.lastIndexOf(".");return t===-1?{local:e}:{local:e.substring(t+1),group:e.substring(0,t)}}var d$=P(vo),m$=P(eu),p$=P(ou),h$=P(nu),g$=P(au),b$=P(Kt),y$=P(Zt),v$=P(Do),D$=P(su),x$=P(lu),C$=P(cu),A$=P(pt),$$=P(Mo),E$=P(bt),F$=P(To),M$=P(mu),T$=P(wo),w$=P(pu),k$=P(hu),S$=P(gu),R$=P(So),B$=P(Ro),O$=P(Bo),P$=P(Oo),z$=P(Po),_$=P(De),I$=P(vu),L$=P(zo),H$=P(_o),N$=P(Cu);function Um(e,t,r={}){let n={column:0,line:-1,...e.start},o={...n,...e.end},{linesAbove:a=2,linesBelow:i=3}=r||{},s=n.line,u=n.column,l=o.line,c=o.column,f=Math.max(s-(a+1),0),m=Math.min(t.length,l+i);s===-1&&(f=0),l===-1&&(m=t.length);let d=l-s,g={};if(d)for(let p=0;p<=d;p++){let y=p+s;u?p===0?g[y]=[u,t[y-1].length-u+1]:p===d?g[y]=[0,c]:g[y]=[0,t[y-p].length]:g[y]=!0}else u===c?u?g[s]=[u,0]:g[s]=!0:g[s]=[u,c-u];return{start:f,end:m,markerLines:g}}var Su=/\r\n|[\n\r\u2028\u2029]/;function Vm(e,t,r={}){let{start:n,end:o,markerLines:a}=Um(t,e.split(Su),r),i=t.start&&typeof t.start.column=="number",s=String(o).length,u=e.split(Su,o).slice(n,o).map((l,c)=>{let f=n+1+c,m=` ${` ${f}`.slice(-s)} |`,d=a[f],g=!a[f+1];if(d){let p="";if(Array.isArray(d)){let y=l.slice(0,Math.max(d[0]-1,0)).replace(/[^\t]/g," "),b=d[1]||1;p=[`
|
|
4
|
+
`||t[z]===" "||t[z]===" ");)z++;let o;if(go(t)&&(o=Sr(t),o.type!==x.Hue)){r.push({type:x.Alpha,value:o});continue}if(Hn(t)&&yo(t)==="none"){r.push({type:x.Alpha,value:{type:x.None,value:void 0}});continue}return}if(/\d/.test(n)){z--,r.push(Sr(t));continue}if(Ln.test(n)){z--,r.push(Sf(t));continue}return}return r}function Bf(e){e._i=0;let t=e[e._i++];if(!t||t.type!==x.Function||t.value!=="color"||(t=e[e._i++],t.type!==x.Ident))return;let r=In[t.value];if(!r)return;let n={mode:r},o=ks(e,!1);if(!o)return;let a=Yt(r).channels;for(let i=0,s,u;i<a.length;i++)s=o[i],u=a[i],s.type!==x.None&&(n[u]=s.type===x.Number?s.value:s.value/100,u==="alpha"&&(n[u]=Math.max(0,Math.min(1,n[u]))));return n}function ks(e,t){let r=[],n;for(;e._i<e.length;){if(n=e[e._i++],n.type===x.None||n.type===x.Number||n.type===x.Alpha||n.type===x.Percentage||t&&n.type===x.Hue){r.push(n);continue}if(n.type===x.ParenClose){if(e._i<e.length)return;continue}return}if(!(r.length<3||r.length>4)){if(r.length===4){if(r[3].type!==x.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:x.None,value:void 0}),r.every(o=>o.type!==x.Alpha)?r:void 0}}function Of(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==x.Function)return;let n=ks(e,t);if(n)return n.unshift(r.value),n}var Pf=e=>{if(typeof e!="string")return;let t=Rf(e),r=t?Of(t,!0):void 0,n,o=0,a=wr.length;for(;o<a;)if((n=wr[o++](e,r))!==void 0)return n;return t?Bf(t):void 0},kr=Pf;function zf(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let r={mode:"rgb"},[,n,o,a,i]=t;if(!(n.type===x.Hue||o.type===x.Hue||a.type===x.Hue))return n.type!==x.None&&(r.r=n.type===x.Number?n.value/255:n.value/100),o.type!==x.None&&(r.g=o.type===x.Number?o.value/255:o.value/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value/255:a.value/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var ws=zf;var _f=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Ss=_f;var Rs=(e,t,r)=>e+r*(t-e);var If=e=>{let t=[];for(let r=0;r<e.length-1;r++){let n=e[r],o=e[r+1];n===void 0&&o===void 0?t.push(void 0):n!==void 0&&o!==void 0?t.push([n,o]):t.push(n!==void 0?[n,n]:[o,o])}return t},Bs=e=>t=>{let r=If(t);return n=>{let o=n*r.length,a=n>=1?r.length-1:Math.max(Math.floor(o),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],o-a)}};var A=Bs(Rs);var H=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e};var Lf={mode:"rgb",channels:["r","g","b","alpha"],parse:[ws,Es,Ms,$s,Ss,"srgb"],serialize:"srgb",interpolate:{r:A,g:A,b:A,alpha:{use:A,fixup:H}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},De=Lf;var Nn=(e=0)=>Math.pow(Math.abs(e),2.19921875)*Math.sign(e),Hf=e=>{let t=Nn(e.r),r=Nn(e.g),n=Nn(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},jn=Hf;var Xn=e=>Math.pow(Math.abs(e),.4547069271758437)*Math.sign(e),Nf=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"a98",r:Xn(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:Xn(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:Xn(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(o.alpha=n),o},Un=Nf;var Vn=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},jf=({r:e,g:t,b:r,alpha:n})=>{let o={mode:"lrgb",r:Vn(e),g:Vn(t),b:Vn(r)};return n!==void 0&&(o.alpha=n),o},Se=jf;var Xf=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return o!==void 0&&(a.alpha=o),a},xe=Xf;var qn=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,.4166666666666667)-.055):e*12.92},Uf=({r:e,g:t,b:r,alpha:n},o="rgb")=>{let a={mode:o,r:qn(e),g:qn(t),b:qn(r)};return n!==void 0&&(a.alpha=n),a},Re=Uf;var Vf=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Re({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(o.alpha=n),o},Ce=Vf;var qf={...De,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Un(xe(e)),xyz65:Un},toMode:{rgb:e=>Ce(jn(e)),xyz65:jn}},vo=qf;var Wf=e=>(e=e%360)<0?e+360:e,U=Wf;function Wn({h:e,s:t,l:r,alpha:n}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=r+t*(r<.5?r:1-r),a=o-(o-r)*2*Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:o,g:a,b:2*r-o};break;case 1:i={r:a,g:o,b:2*r-o};break;case 2:i={r:2*r-o,g:o,b:a};break;case 3:i={r:2*r-o,g:a,b:o};break;case 4:i={r:a,g:2*r-o,b:o};break;case 5:i={r:o,g:2*r-o,b:a};break;default:i={r:2*r-o,g:2*r-o,b:2*r-o}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function Gn({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsl",s:o===a?0:(o-a)/(1-Math.abs(o+a-1)),l:.5*(o+a)};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var Gf=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},Os=Gf;var Jf=new RegExp(`^hsla?\\(\\s*${Fs}${lt}${zt}${lt}${zt}\\s*(?:,\\s*${Tr}\\s*)?\\)$`),Yf=e=>{let t=e.match(Jf);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=Os(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},Ps=Yf;function Kf(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Percentage)return;r.h=n.value}if(o.type!==x.None){if(o.type===x.Hue)return;r.s=o.value/100}if(a.type!==x.None){if(a.type===x.Hue)return;r.l=a.value/100}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var zs=Kf;var Zf=(e,t)=>e.map((r,n,o)=>{if(r===void 0)return r;let a=U(r);return n===0||e[n-1]===void 0?a:t(a-U(o[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),re=e=>Zf(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t));var ct=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=U(e.h),n=U(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},_s=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=U(e.h),n=U(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},ft=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=U(e.h),n=U(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o};var oe=e=>{let t=e.reduce((n,o)=>{if(o!==void 0){let a=o*Math.PI/180;n.sin+=Math.sin(a),n.cos+=Math.cos(a)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r};var Qf={mode:"hsl",toMode:{rgb:Wn},fromMode:{rgb:Gn},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[zs,Ps],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},s:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},Kt=Qf;function Rr({h:e,s:t,v:r,alpha:n}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*o),b:r*(1-t)};break;case 1:a={r:r*(1-t*o),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*o)};break;case 3:a={r:r*(1-t),g:r*(1-t*o),b:r};break;case 4:a={r:r*(1-t*o),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*o)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Br({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var ed={mode:"hsv",toMode:{rgb:Rr},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:Br},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:re},s:A,v:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},Zt=ed;function Jn({h:e,w:t,b:r,alpha:n}){if(t===void 0&&(t=0),r===void 0&&(r=0),t+r>1){let o=t+r;t/=o,r/=o}return Rr({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function Yn(e){let t=Br(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function td(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Percentage)return;r.h=n.value}if(o.type!==x.None){if(o.type===x.Hue)return;r.w=o.value/100}if(a.type!==x.None){if(a.type===x.Hue)return;r.b=a.value/100}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Is=td;var rd={mode:"hwb",toMode:{rgb:Jn},fromMode:{rgb:Yn},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Is],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},w:A,b:A,alpha:{use:A,fixup:H}},difference:{h:_s},average:{h:oe}},Do=rd;var dt=Math.pow(29,3)/Math.pow(3,3),Qt=Math.pow(6,3)/Math.pow(29,3);var V={X:.9642956764295677,Y:1,Z:.8251046025104602},mt={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},L8=Math.pow(29,3)/Math.pow(3,3),H8=Math.pow(6,3)/Math.pow(29,3);var Kn=e=>Math.pow(e,3)>Qt?Math.pow(e,3):(116*e-16)/dt,od=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz50",x:Kn(a)*V.X,y:Kn(o)*V.Y,z:Kn(i)*V.Z};return n!==void 0&&(s.alpha=n),s},er=od;var nd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Re({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(o.alpha=n),o},qe=nd;var ad=e=>qe(er(e)),xo=ad;var id=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return o!==void 0&&(a.alpha=o),a},We=id;var Zn=e=>e>Qt?Math.cbrt(e):(dt*e+16)/116,sd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Zn(e/V.X),a=Zn(t/V.Y),i=Zn(r/V.Z),s={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},tr=sd;var ud=e=>{let t=tr(We(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Co=ud;function ld(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,o,a,i]=t;if(!(n.type===x.Hue||o.type===x.Hue||a.type===x.Hue))return n.type!==x.None&&(r.l=Math.min(Math.max(0,n.value),100)),o.type!==x.None&&(r.a=o.type===x.Number?o.value:o.value*125/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value:a.value*125/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Ls=ld;var cd={mode:"lab",toMode:{xyz50:er,rgb:xo},fromMode:{xyz50:tr,rgb:Co},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Ls],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:H}}},pt=cd;var Ao=Math.pow(29,3)/Math.pow(3,3),$o=Math.pow(6,3)/Math.pow(29,3);var Qn=e=>Math.pow(e,3)>$o?Math.pow(e,3):(116*e-16)/Ao,fd=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz65",x:Qn(a)*mt.X,y:Qn(o)*mt.Y,z:Qn(i)*mt.Z};return n!==void 0&&(s.alpha=n),s},Eo=fd;var dd=e=>Ce(Eo(e)),ht=dd;var ea=e=>e>$o?Math.cbrt(e):(Ao*e+16)/116,md=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ea(e/mt.X),a=ea(t/mt.Y),i=ea(r/mt.Z),s={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},Fo=md;var pd=e=>{let t=Fo(xe(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},gt=pd;var hd={...pt,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Eo,rgb:ht},fromMode:{xyz65:Fo,rgb:gt},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Mo=hd;var gd=({l:e,a:t,b:r,alpha:n},o="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:o,l:e,c:a};return a&&(i.h=U(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},Fe=gd;var bd=({l:e,c:t,h:r,alpha:n},o="lab")=>{r===void 0&&(r=0);let a={mode:o,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},Me=bd;function yd(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(o.type!==x.None&&(r.c=Math.max(0,o.type===x.Number?o.value:o.value*150/100)),a.type!==x.None){if(a.type===x.Percentage)return;r.h=a.value}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Hs=yd;var vd={mode:"lch",toMode:{lab:Me,rgb:e=>xo(Me(e))},fromMode:{rgb:e=>Fe(Co(e)),lab:Fe},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Hs],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:A,fixup:re},c:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},bt=vd;var Dd={...bt,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Me(e,"lab65"),rgb:e=>ht(Me(e,"lab65"))},fromMode:{rgb:e=>Fe(gt(e),"lch65"),lab65:e=>Fe(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},To=Dd;var xd={...De,mode:"lrgb",toMode:{rgb:Re},fromMode:{rgb:Se},parse:["srgb-linear"],serialize:"srgb-linear"},ko=xd;var Cd=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),i=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*o-3.3077115392580616*a+.2309699031821044*i,g:-1.2684379732850317*o+2.6097573492876887*a-.3413193760026573*i,b:-.0041960761386756*o-.7034186179359362*a+1.7076146940746117*i};return n!==void 0&&(s.alpha=n),s},Ge=Cd;var Ad=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),i=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*o+.7936177747023054*a-.0040720430116193*i,a:1.9779985324311684*o-2.42859224204858*a+.450593709617411*i,b:.0259040424655478*o+.7827717124575296*a-.8086757549230774*i};return n!==void 0&&(s.alpha=n),s},wo=Ad;var $d=e=>{let t=wo(Se(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},yt=$d;var Ed=e=>Re(Ge(e)),vt=Ed;function Fd(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,o,a,i]=t;if(!(n.type===x.Hue||o.type===x.Hue||a.type===x.Hue))return n.type!==x.None&&(r.l=Math.min(Math.max(0,n.type===x.Number?n.value:n.value/100),1)),o.type!==x.None&&(r.a=o.type===x.Number?o.value:o.value*.4/100),a.type!==x.None&&(r.b=a.type===x.Number?a.value:a.value*.4/100),i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var Ns=Fd;var Md={...pt,mode:"oklab",toMode:{lrgb:Ge,rgb:vt},fromMode:{lrgb:wo,rgb:yt},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Ns],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},So=Md;function Td(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,o,a,i]=t;if(n.type!==x.None){if(n.type===x.Hue)return;r.l=Math.min(Math.max(0,n.type===x.Number?n.value:n.value/100),1)}if(o.type!==x.None&&(r.c=Math.max(0,o.type===x.Number?o.value:o.value*.4/100)),a.type!==x.None){if(a.type===x.Percentage)return;r.h=a.value}return i.type!==x.None&&(r.alpha=Math.min(1,Math.max(0,i.type===x.Number?i.value:i.value/100))),r}var js=Td;var kd={...bt,mode:"oklch",toMode:{oklab:e=>Me(e,"oklab"),rgb:e=>vt(Me(e,"oklab"))},fromMode:{rgb:e=>Fe(yt(e),"oklch"),oklab:e=>Fe(e,"oklch")},parse:[js],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Ro=kd;var wd=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return o!==void 0&&(a.alpha=o),a},ta=wd;var Sd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Re({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(o.alpha=n),o},ra=Sd;var Rd={...De,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>ra(xe(e)),xyz65:ra},toMode:{rgb:e=>Ce(ta(e)),xyz65:ta}},Bo=Rd;var oa=e=>{let t=Math.abs(e);return t>=.001953125?Math.sign(e)*Math.pow(t,.5555555555555556):16*e},Bd=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"prophoto",r:oa(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:oa(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:oa(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(o.alpha=n),o},na=Bd;var aa=(e=0)=>{let t=Math.abs(e);return t>=.03125?Math.sign(e)*Math.pow(t,1.8):e/16},Od=e=>{let t=aa(e.r),r=aa(e.g),n=aa(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},ia=Od;var Pd={...De,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:na,rgb:e=>na(We(e))},toMode:{xyz50:ia,rgb:e=>qe(ia(e))}},Oo=Pd;var Xs=1.09929682680944,zd=.018053968510807,sa=e=>{let t=Math.abs(e);return t>zd?(Math.sign(e)||1)*(Xs*Math.pow(t,.45)-(Xs-1)):4.5*e},_d=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rec2020",r:sa(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:sa(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:sa(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(o.alpha=n),o},ua=_d;var Us=1.09929682680944,Id=.018053968510807,la=(e=0)=>{let t=Math.abs(e);return t<Id*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+Us-1)/Us,1/.45)},Ld=e=>{let t=la(e.r),r=la(e.g),n=la(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},ca=Ld;var Hd={...De,mode:"rec2020",fromMode:{xyz65:ua,rgb:e=>ua(xe(e))},toMode:{xyz65:ca,rgb:e=>Ce(ca(e))},parse:["rec2020"],serialize:"rec2020"},Po=Hd;var Nd={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:qe,lab:tr},fromMode:{rgb:We,lab:er},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:H}}},zo=Nd;var jd=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return o!==void 0&&(a.alpha=o),a},Vs=jd;var Xd=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return o!==void 0&&(a.alpha=o),a},qs=Xd;var Ud={mode:"xyz65",toMode:{rgb:Ce,xyz50:Vs},fromMode:{rgb:xe,xyz50:qs},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:A,y:A,z:A,alpha:{use:A,fixup:H}}},_o=Ud;var _7=P(vo),I7=P(Kt),L7=P(Zt),H7=P(Do),N7=P(pt),j7=P(Mo),X7=P(bt),U7=P(To),V7=P(ko),q7=P(So),W7=P(Ro),G7=P(Bo),J7=P(Oo),Y7=P(Po),K7=P(De),Z7=P(zo),Q7=P(_o);var J=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Ws=Math.PI/180,Gs=180/Math.PI;var Js=J[3]*J[4],Ys=J[1]*J[4],Ks=J[1]*J[2]-J[0]*J[3],Vd=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(Ks*r+e*Js-t*Ys)/(Ks+Js-Ys),a=r-o,i=(J[4]*(t-o)-J[2]*a)/J[3],s={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+i*i)/(J[4]*o*(1-o))};return s.s&&(s.h=Math.atan2(i,a)*Gs-120),n!==void 0&&(s.alpha=n),s},Zs=Vd;var qd=({h:e,s:t,l:r,alpha:n})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Ws,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),s=Math.sin(e);return o.r=r+a*(J[0]*i+J[1]*s),o.g=r+a*(J[2]*i+J[3]*s),o.b=r+a*(J[4]*i+J[5]*s),n!==void 0&&(o.alpha=n),o},Qs=qd;var Wd={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Zs},toMode:{rgb:Qs},interpolate:{h:{use:A,fixup:re},s:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},eu=Wd;var _t=.14444444444444443*Math.PI,rr=Math.cos(_t),or=Math.sin(_t),Io=100/Math.log(139/100);var Gd=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"lab65",l:(Math.exp(e*1/Io)-1)/.0039},a=(Math.exp(.0435*t*1*1)-1)/.075,i=a*Math.cos(r/180*Math.PI-_t),s=a*Math.sin(r/180*Math.PI-_t);return o.a=i*rr-s/.83*or,o.b=i*or+s/.83*rr,n!==void 0&&(o.alpha=n),o},Pr=Gd;var Jd=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=t*rr+r*or,a=.83*(r*rr-t*or),i=Math.sqrt(o*o+a*a),s={mode:"dlch",l:Io/1*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*1*1)};return s.c&&(s.h=U((Math.atan2(a,o)+_t)/Math.PI*180)),n!==void 0&&(s.alpha=n),s},zr=Jd;var tu=e=>Pr(Fe(e,"dlch")),ru=e=>Me(zr(e),"dlab"),Yd={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:tu,rgb:e=>ht(tu(e))},fromMode:{lab65:ru,rgb:e=>ru(gt(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:A,a:A,b:A,alpha:{use:A,fixup:H}}},ou=Yd;var Kd={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:Pr,dlab:e=>Me(e,"dlab"),rgb:e=>ht(Pr(e))},fromMode:{lab65:zr,dlab:e=>Fe(e,"dlch"),rgb:e=>zr(gt(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:A,c:A,h:{use:A,fixup:re},alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},nu=Kd;function da({h:e,s:t,i:r,alpha:n}){e=U(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1+t*(3/(2-o)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-o)-1)),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1+t*(3/(2-o)-1))};break;case 4:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3/(2-o)-1))};break;case 5:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function ma({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var Zd={mode:"hsi",toMode:{rgb:da},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:ma},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:A,fixup:re},s:A,i:A,alpha:{use:A,fixup:H}},difference:{h:ct},average:{h:oe}},au=Zd;var nr=.1593017578125,iu=78.84375,ar=.8359375,ir=18.8515625,sr=18.6875;function Lo(e){if(e<0)return 0;let t=Math.pow(e,1/iu);return 1e4*Math.pow(Math.max(0,t-ar)/(ir-sr*t),1/nr)}function Ho(e){if(e<0)return 0;let t=Math.pow(e/1e4,nr);return Math.pow((ar+ir*t)/(1+sr*t),iu)}var pa=e=>Math.max(e/203,0),em=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Lo(e+.008609037037932761*t+.11102962500302593*r),a=Lo(e-.00860903703793275*t-.11102962500302599*r),i=Lo(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:pa(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*i),y:pa(.3647385209748074*o+.680566024947227*a-.0453045459220346*i),z:pa(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*i)};return n!==void 0&&(s.alpha=n),s},ha=em;var ga=(e=0)=>Math.max(e*203,0),tm=({x:e,y:t,z:r,alpha:n})=>{let o=ga(e),a=ga(t),i=ga(r),s=Ho(.3592832590121217*o+.6976051147779502*a-.0358915932320289*i),u=Ho(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*i),l=Ho(.0070797844607477*o+.0748396662186366*a+.8433265453898765*i),c=.5*s+.5*u,f=1.61376953125*s-3.323486328125*u+1.709716796875*l,m=4.378173828125*s-4.24560546875*u-.132568359375*l,d={mode:"itp",i:c,t:f,p:m};return n!==void 0&&(d.alpha=n),d},ba=tm;var rm={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ha,rgb:e=>Ce(ha(e))},fromMode:{xyz65:ba,rgb:e=>ba(xe(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:A,t:A,p:A,alpha:{use:A,fixup:H}}},su=rm;var om=134.03437499999998,nm=16295499532821565e-27,ya=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,nr);return Math.pow((ar+ir*t)/(1+sr*t),om)},va=(e=0)=>Math.max(e*203,0),am=({x:e,y:t,z:r,alpha:n})=>{e=va(e),t=va(t),r=va(r);let o=1.15*e-.15*r,a=.66*t+.34*e,i=ya(.41478972*o+.579999*a+.014648*r),s=ya(-.20151*o+1.120649*a+.0531008*r),u=ya(-.0166008*o+.2648*a+.6684799*r),l=(i+s)/2,c={mode:"jab",j:.44*l/(1-.56*l)-nm,a:3.524*i-4.066708*s+.542708*u,b:.199076*i+1.096799*s-1.295875*u};return n!==void 0&&(c.alpha=n),c},No=am;var im=134.03437499999998,uu=16295499532821565e-27,Da=e=>{if(e<0)return 0;let t=Math.pow(e,1/im);return 1e4*Math.pow((ar-t)/(sr*t-ir),1/nr)},xa=e=>e/203,sm=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+uu)/(.44+.56*(e+uu)),a=Da(o+.13860504*t+.058047316*r),i=Da(o-.13860504*t-.058047316*r),s=Da(o-.096019242*t-.8118919*r),u={mode:"xyz65",x:xa(1.661373024652174*a-.914523081304348*i+.23136208173913045*s),y:xa(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*s),z:xa(-.090982811*a-.31272829*i+1.5227666*s)};return n!==void 0&&(u.alpha=n),u},jo=sm;var um=e=>{let t=No(xe(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Xo=um;var lm=e=>Ce(jo(e)),Uo=lm;var cm={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Xo,xyz65:No},toMode:{rgb:Uo,xyz65:jo},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:A,a:A,b:A,alpha:{use:A,fixup:H}}},lu=cm;var fm=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:o};return o&&(a.h=U(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},Ca=fm;var dm=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Aa=dm;var mm={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Aa,rgb:e=>Uo(Aa(e))},fromMode:{rgb:e=>Ca(Xo(e)),jab:Ca},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:A,fixup:re},c:A,j:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},cu=mm;var pm=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:o};return o&&(a.h=U(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},$a=pm;var hm=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Ea=hm;var fu=(e,t,r)=>4*e/(e+15*t+3*r),du=(e,t,r)=>9*t/(e+15*t+3*r),gm=fu(V.X,V.Y,V.Z),bm=du(V.X,V.Y,V.Z),ym=e=>e<=Qt?dt*e:116*Math.cbrt(e)-16,vm=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ym(t/V.Y),a=fu(e,t,r),i=du(e,t,r);!isFinite(a)||!isFinite(i)?o=a=i=0:(a=13*o*(a-gm),i=13*o*(i-bm));let s={mode:"luv",l:o,u:a,v:i};return n!==void 0&&(s.alpha=n),s},_r=vm;var Dm=(e,t,r)=>4*e/(e+15*t+3*r),xm=(e,t,r)=>9*t/(e+15*t+3*r),Cm=Dm(V.X,V.Y,V.Z),Am=xm(V.X,V.Y,V.Z),$m=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let o=t/(13*e)+Cm,a=r/(13*e)+Am,i=V.Y*(e<=8?e/dt:Math.pow((e+16)/116,3)),s=i*(9*o)/(4*a),u=i*(12-3*o-20*a)/(4*a),l={mode:"xyz50",x:s,y:i,z:u};return n!==void 0&&(l.alpha=n),l},Ir=$m;var Em=e=>$a(_r(We(e))),Fm=e=>qe(Ir(Ea(e))),Mm={mode:"lchuv",toMode:{luv:Ea,rgb:Fm},fromMode:{rgb:Em,luv:$a},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:A,fixup:re},c:A,l:A,alpha:{use:A,fixup:H}},difference:{h:ft},average:{h:oe}},mu=Mm;var Tm={mode:"luv",toMode:{xyz50:Ir,rgb:e=>qe(Ir(e))},fromMode:{xyz50:_r,rgb:e=>_r(We(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:A,u:A,v:A,alpha:{use:A,fixup:H}}},pu=Tm;function Lr(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function It(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function km(e,t){let r,n,o,a,i,s,u,l;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,o=.59662641,a=.75515197,i=.56771245,s=4.0767416621,u=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,o=.08285427,a=.1254107,i=.14503204,s=-1.2684380046,u=2.6097574011,l=-.3413193965):(r=1.35733652,n=-.00915799,o=-1.1513021,a=-.50559606,i=.00692167,s=-.0041960863,u=-.7034186147,l=1.707614701);let c=r+n*e+o*t+a*e*e+i*e*t,f=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t;{let g=1+c*f,p=1+c*m,y=1+c*d,b=g*g*g,D=p*p*p,C=y*y*y,F=3*f*g*g,v=3*m*p*p,M=3*d*y*y,$=6*f*f*g,k=6*m*m*p,R=6*d*d*y,I=s*b+u*D+l*C,X=s*F+u*v+l*M,G=s*$+u*k+l*R;c=c-I*X/(X*X-.5*I*G)}return c}function Fa(e,t){let r=km(e,t),n=Ge({l:1,a:r*e,b:r*t}),o=Math.cbrt(1/Math.max(n.r,n.g,n.b)),a=o*r;return[o,a]}function wm(e,t,r,n,o,a=null){a||(a=Fa(e,t));let i;if((r-o)*a[1]-(a[0]-o)*n<=0)i=a[1]*o/(n*a[0]+a[1]*(o-r));else{i=a[1]*(o-1)/(n*(a[0]-1)+a[1]*(o-r));{let s=r-o,u=n,l=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,m=s+u*l,d=s+u*c,g=s+u*f;{let p=o*(1-i)+i*r,y=i*n,b=p+y*l,D=p+y*c,C=p+y*f,F=b*b*b,v=D*D*D,M=C*C*C,$=3*m*b*b,k=3*d*D*D,R=3*g*C*C,I=6*m*m*b,X=6*d*d*D,G=6*g*g*C,le=4.0767416621*F-3.3077115913*v+.2309699292*M-1,Z=4.0767416621*$-3.3077115913*k+.2309699292*R,ut=4.0767416621*I-3.3077115913*X+.2309699292*G,Ne=Z/(Z*Z-.5*le*ut),ce=-le*Ne,je=-1.2684380046*F+2.6097574011*v-.3413193965*M-1,Oe=-1.2684380046*$+2.6097574011*k-.3413193965*R,Tt=-1.2684380046*I+2.6097574011*X-.3413193965*G,Ze=Oe/(Oe*Oe-.5*je*Tt),Pe=-je*Ze,Xe=-.0041960863*F-.7034186147*v+1.707614701*M-1,Ue=-.0041960863*$-.7034186147*k+1.707614701*R,Ut=-.0041960863*I-.7034186147*X+1.707614701*G,kt=Ue/(Ue*Ue-.5*Xe*Ut),Qe=-Xe*kt;ce=Ne>=0?ce:1e6,Pe=Ze>=0?Pe:1e6,Qe=kt>=0?Qe:1e6,i+=Math.min(ce,Math.min(Pe,Qe))}}}return i}function Hr(e,t,r=null){r||(r=Fa(e,t));let n=r[0],o=r[1];return[o/n,o/(1-n)]}function Vo(e,t,r){let n=Fa(t,r),o=wm(t,r,e,1,e,n),a=Hr(t,r,n),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),u=o/Math.min(e*a[0],(1-e)*a[1]),l=e*i,c=(1-e)*s,f=.9*u*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(c*c*c*c))));return l=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(l*l)+1/(c*c))),f,o]}function qo(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Lr(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(r*r+n*n);if(!a)return o.s=0,o;let[i,s,u]=Vo(t,r/a,n/a),l;if(a<s){let c=0,f=.8*i,m=1-f/s;l=(a-c)/(f+m*(a-c))*.8}else{let c=s,f=.2*s*s*1.25*1.25/i,m=1-f/(u-s);l=.8+.2*((a-c)/(f+m*(a-c)))}return l&&(o.s=l,o.h=U(Math.atan2(n,r)*180/Math.PI)),o}function Wo(e){let t=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,n=e.l!==void 0?e.l:0,o={mode:"oklab",l:It(n)};if(e.alpha!==void 0&&(o.alpha=e.alpha),!r||n===1)return o.a=o.b=0,o;let a=Math.cos(t/180*Math.PI),i=Math.sin(t/180*Math.PI),[s,u,l]=Vo(o.l,a,i),c,f,m,d;r<.8?(c=1.25*r,f=0,m=.8*s,d=1-m/u):(c=5*(r-.8),f=u,m=.2*u*u*1.25*1.25/s,d=1-m/(l-u));let g=f+c*m/(1-d*c);return o.a=g*a,o.b=g*i,o}var Sm={...Kt,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:qo,rgb:e=>qo(yt(e))},toMode:{oklab:Wo,rgb:e=>vt(Wo(e))}},hu=Sm;function Go(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o=Math.sqrt(r*r+n*n),a=o?r/o:1,i=o?n/o:1,[s,u]=Hr(a,i),l=.5,c=1-l/s,f=u/(o+t*u),m=f*t,d=f*o,g=It(m),p=d*g/m,y=Ge({l:g,a:a*p,b:i*p}),b=Math.cbrt(1/Math.max(y.r,y.g,y.b,0));t=t/b,o=o/b*Lr(t)/t,t=Lr(t);let D={mode:"okhsv",s:o?(l+u)*d/(u*l+u*c*d):0,v:t?t/m:0};return D.s&&(D.h=U(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(D.alpha=e.alpha),D}function Jo(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[s,u]=Hr(a,i),l=.5,c=1-l/s,f=1-n*l/(l+u-u*c*n),m=n*u*l/(l+u-u*c*n),d=It(f),g=m*d/f,p=Ge({l:d,a:a*g,b:i*g}),y=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),b=It(o*f),D=m*b/f;return t.l=b*y,t.a=D*a*y,t.b=D*i*y,t}var Rm={...Zt,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Go,rgb:e=>Go(yt(e))},toMode:{oklab:Jo,rgb:e=>vt(Jo(e))}},gu=Rm;var rt=.0037930732552754493,Yo=Math.cbrt(rt);var Ma=e=>Math.cbrt(e)-Yo,Bm=e=>{let{r:t,g:r,b:n,alpha:o}=Se(e),a=Ma(.3*t+.622*r+.078*n+rt),i=Ma(.23*t+.692*r+.078*n+rt),s=Ma(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+rt),u={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:s-(a+i)/2};return o!==void 0&&(u.alpha=o),u},bu=Bm;var Ta=e=>Math.pow(e+Yo,3),Om=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Ta(e+t)-rt,a=Ta(t-e)-rt,i=Ta(r+t)-rt,s=Re({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*i});return n!==void 0&&(s.alpha=n),s},yu=Om;var Pm={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:yu},fromMode:{rgb:bu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:A,y:A,b:A,alpha:{use:A,fixup:H}}},vu=Pm;var zm=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(o.alpha=n),o},Du=zm;var _m=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(o.alpha=n),o},xu=_m;var Im={mode:"yiq",toMode:{rgb:xu},fromMode:{rgb:Du},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:A,i:A,q:A,alpha:{use:A,fixup:H}}},Cu=Im;var Lm=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Hm=(e=4)=>t=>typeof t=="number"?Lm(t,e):t,Au=Hm;var uA=Au(2),Nm=e=>Math.max(0,Math.min(1,e||0)),ka=e=>Math.round(Nm(e)*255),jm=ve("rgb"),lA=ve("hsl"),$u=e=>{if(e===void 0)return;let t=ka(e.r),r=ka(e.g),n=ka(e.b);return"#"+(1<<24|t<<16|r<<8|n).toString(16).slice(1)};var wa=e=>$u(jm(e));var Eu=ve("rgb"),Fu=e=>{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},Xm=e=>Fu(Eu(e)),Mu=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function Tu(e){return Mu(Eu(e))}function Sa(e="rgb"){let{gamut:t}=Yt(e);if(!t)return n=>!0;let r=ve(typeof t=="string"?t:e);return n=>Mu(r(n))}function ku(e="rgb"){let{gamut:t}=Yt(e);if(!t)return a=>Jt(a);let r=typeof t=="string"?t:e,n=ve(r),o=Sa(r);return a=>{let i=Jt(a);if(!i)return;let s=n(i);if(o(s))return i;let u=Fu(s);return i.mode===u.mode?u:ve(i.mode)(u)}}function Ra(e,t="lch",r="rgb"){e=Jt(e);let n=r==="rgb"?Tu:Sa(r),o=r==="rgb"?Xm:ku(r);if(e===void 0||n(e))return e;let a=ve(e.mode);e=ve(t)(e);let i={...e,c:0};if(!n(i))return a(o(i));let s=0,u=e.c!==void 0?e.c:0,l=Yt(t).ranges.c,c=(l[1]-l[0])/Math.pow(2,13),f=i.c;for(;u-s>c;)i.c=s+(u-s)*.5,n(i)?(f=i.c,s=i.c):u=i.c;return a(n(i)?i:{...i,c:f})}function Ba(e){let t=ve("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function Oa(e,t){let r=Ba(e),n=Ba(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var Um=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Pa={a98:"a98-rgb",hsl:"hsl",hwb:"hwb",lab:"lab",lab65:"lab-d65",lch:"lch",lrgb:"srgb-linear",oklab:"oklab",oklch:"oklch",okhsv:"okhsv",p3:"display-p3",prophoto:"prophoto-rgb",rec2020:"rec2020",rgb:"srgb",xyz50:"xyz-d50",xyz65:"xyz-d65"},Ko={"a98-rgb":"a98","display-p3":"p3",hsl:"hsl",hwb:"hwb",lab:"lab","lab-d65":"lab65",lch:"lch",oklab:"oklab",oklch:"oklch",okhsv:"okhsv","prophoto-rgb":"prophoto",rec2020:"rec2020",srgb:"rgb","srgb-linear":"lrgb",xyz:"xyz65","xyz-d50":"xyz50","xyz-d65":"xyz65"};function za(e){let t=kr(e);if(!t)throw new Error(`Unable to parse color "${e}"`);if(!(t.mode in Pa))throw new Error(`Unsupported color space: ${t.mode}`);let r=Pa[t.mode],n=[0,0,0];switch(t.mode){case"a98":case"rec2020":case"p3":case"prophoto":case"lrgb":case"rgb":n=[t.r,t.g,t.b];break;case"hsl":{let a=ot[r].ranges[1]?.[1]??1,i=ot[r].ranges[2]?.[1]??1;n=[t.h??0,t.s*a,t.l*i];break}case"hwb":{let a=ot[r].ranges[1]?.[1]??1,i=ot[r].ranges[2]?.[1]??1;n=[t.h??0,t.w*a,t.b*i];break}case"lab":case"lab65":case"oklab":n=[t.l,t.a,t.b];break;case"lch":case"oklch":n=[t.l,t.c,t.h??0];break;case"okhsv":n=[t.h??0,t.s,t.v];break;case"xyz50":case"xyz65":n=[t.x,t.y,t.z];break}let o={colorSpace:r,components:n,alpha:t.alpha??1};return Um.test(e)&&(o.hex=wa(t)),o}function Nr(e){switch(e.colorSpace){case"a98-rgb":case"display-p3":case"prophoto-rgb":case"rec2020":case"srgb":case"srgb-linear":{let[t,r,n]=e.components;return{mode:Ko[e.colorSpace]||e.colorSpace,r:t,g:r,b:n,alpha:e.alpha}}case"hsl":{let[t,r,n]=e.components,o=ot[e.colorSpace].ranges[1]?.[1]??1,a=ot[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hsl",h:t,s:r/o,l:n/a,alpha:e.alpha}}case"hwb":{let[t,r,n]=e.components,o=ot[e.colorSpace].ranges[1]?.[1]??1,a=ot[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hwb",h:t,w:r/o,b:n/a,alpha:e.alpha}}case"lab":case"lab-d65":case"oklab":{let[t,r,n]=e.components;return{mode:e.colorSpace==="lab-d65"?"lab65":e.colorSpace,l:t,a:r,b:n,alpha:e.alpha}}case"lch":case"oklch":{let[t,r,n]=e.components;return{mode:e.colorSpace,l:t,c:r,h:n,alpha:e.alpha}}case"okhsv":{let[t,r,n]=e.components;return{mode:e.colorSpace,h:t,s:r,v:n,alpha:e.alpha}}case"xyz":case"xyz-d50":case"xyz-d65":{let[t,r,n]=e.components;return{mode:Ko[e.colorSpace],x:t,y:r,z:n,alpha:e.alpha}}default:throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of ${Object.keys(Ko).join(", ")}`)}}var ot={"a98-rgb":{ranges:[[0,1],[0,1],[0,1]]},"display-p3":{ranges:[[0,1],[0,1],[0,1]]},hsl:{ranges:[[0,360],[0,100],[0,100]]},hwb:{ranges:[[0,360],[0,100],[0,100]]},lab:{ranges:[[0,100],[-125,125],[-125,125]]},"lab-d65":{ranges:[[0,100],[-125,125],[-125,125]]},lch:{ranges:[[0,100],[0,150],[0,360]]},oklab:{ranges:[[0,1],[-.4,.4],[-.4,.4]]},oklch:{ranges:[[0,1],[0,.4],[0,360]]},okhsv:{ranges:[[0,360],[0,1],[0,1]]},"prophoto-rgb":{ranges:[[0,1],[0,1],[0,1]]},rec2020:{ranges:[[0,1],[0,1],[0,1]]},srgb:{ranges:[[0,1],[0,1],[0,1]]},"srgb-linear":{ranges:[[0,1],[0,1],[0,1]]},"xyz-d50":{ranges:[[0,1],[0,1],[0,1]]},xyz:{ranges:[[0,1],[0,1],[0,1]]},"xyz-d65":{ranges:[[0,1],[0,1],[0,1]]}};function jr(e,t,r){return e===1?t:r}var wu=/^\{([^}]+)\}$/;function Te(e){return wu.test(e)}function ke(e){if(e.includes("#"))throw new Error("Mode aliases (# character) are no longer supported as of v0.6.0. Alias the root token instead, and apply modes in plugins.");let t=e.match(wu);return t?t[1]??t[0]:e}function Zo(e){let t=e.lastIndexOf(".");return t===-1?{local:e}:{local:e.substring(t+1),group:e.substring(0,t)}}var p$=P(vo),h$=P(eu),g$=P(ou),b$=P(nu),y$=P(au),v$=P(Kt),D$=P(Zt),x$=P(Do),C$=P(su),A$=P(lu),$$=P(cu),E$=P(pt),F$=P(Mo),M$=P(bt),T$=P(To),k$=P(mu),w$=P(ko),S$=P(pu),R$=P(hu),B$=P(gu),O$=P(So),P$=P(Ro),z$=P(Bo),_$=P(Oo),I$=P(Po),L$=P(De),H$=P(vu),N$=P(zo),j$=P(_o),X$=P(Cu);function Vm(e,t,r={}){let n={column:0,line:-1,...e.start},o={...n,...e.end},{linesAbove:a=2,linesBelow:i=3}=r||{},s=n.line,u=n.column,l=o.line,c=o.column,f=Math.max(s-(a+1),0),m=Math.min(t.length,l+i);s===-1&&(f=0),l===-1&&(m=t.length);let d=l-s,g={};if(d)for(let p=0;p<=d;p++){let y=p+s;u?p===0?g[y]=[u,t[y-1].length-u+1]:p===d?g[y]=[0,c]:g[y]=[0,t[y-p].length]:g[y]=!0}else u===c?u?g[s]=[u,0]:g[s]=!0:g[s]=[u,c-u];return{start:f,end:m,markerLines:g}}var Su=/\r\n|[\n\r\u2028\u2029]/;function qm(e,t,r={}){let{start:n,end:o,markerLines:a}=Vm(t,e.split(Su),r),i=t.start&&typeof t.start.column=="number",s=String(o).length,u=e.split(Su,o).slice(n,o).map((l,c)=>{let f=n+1+c,m=` ${` ${f}`.slice(-s)} |`,d=a[f],g=!a[f+1];if(d){let p="";if(Array.isArray(d)){let y=l.slice(0,Math.max(d[0]-1,0)).replace(/[^\t]/g," "),b=d[1]||1;p=[`
|
|
5
5
|
`,m.replace(/\d/g," ")," ",y,"^".repeat(b)].join(""),g&&r.message&&(p+=` ${r.message}`)}return[">",m,l.length>0?` ${l}`:"",p].join("")}else return` ${m}${l.length>0?` ${l}`:""}`}).join(`
|
|
6
6
|
`);return r.message&&!i&&(u=`${" ".repeat(s+1)}${r.message}
|
|
7
|
-
${u}`),u}var ur=["error","warn","info","debug"],Ru={error:nt.default.red,warn:nt.default.yellow},
|
|
7
|
+
${u}`),u}var ur=["error","warn","info","debug"],Ru={error:nt.default.red,warn:nt.default.yellow},Wm=new Intl.DateTimeFormat("en-us",{hour:"numeric",hour12:!1,minute:"numeric",second:"numeric",fractionalSecondDigits:3});function Qo(e,t){let r=e.message;if(r=`[${e.group}${e.label?`:${e.label}`:""}] ${r}`,t in Ru&&(r=Ru[t](r)),e.src){let n=e.node?.loc?.start??{line:0,column:0},o=e.filename?`${e.filename?.href.replace(/^file:\/\//,"")}:${n?.line??0}:${n?.column??0}
|
|
8
8
|
|
|
9
|
-
`:"",a=
|
|
9
|
+
`:"",a=qm(e.src,{start:n},{highlightCode:!1});r=`${r}
|
|
10
10
|
|
|
11
|
-
${o}${a}`}return r}var Wr=class{level="info";debugScope="*";errorCount=0;warnCount=0;infoCount=0;debugCount=0;constructor(e){e?.level&&(this.level=e.level),e?.debugScope&&(this.debugScope=e.debugScope)}setLevel(e){this.level=e}error(e){this.errorCount++;let t=Qo(e,"error");if(e.continueOnError){console.error(t);return}throw e.node?new Wm(t):new Error(t)}info(e){if(this.infoCount++,this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("info"))return;let t=Qo(e,"info");console.log(t)}warn(e){if(this.warnCount++,this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("warn"))return;let t=Qo(e,"warn");console.warn(t)}debug(e){if(this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("debug"))return;this.debugCount++;let t=Qo(e,"debug"),r=e.label?`${e.group}:${e.label}`:e.group;if(!(this.debugScope!=="*"&&!ye(this.debugScope)(r))){if(t.replace(/\[config[^\]]+\]/,n=>nt.default.green(n)).replace(/\[parser[^\]]+\]/,n=>nt.default.magenta(n)).replace(/\[lint[^\]]+\]/,n=>nt.default.yellow(n)).replace(/\[plugin[^\]]+\]/,n=>nt.default.cyan(n)),t=`${nt.default.dim(qm.format(performance.now()))} ${t}`,typeof e.timing=="number"){let n="";e.timing<1e3?n=`${Math.round(e.timing*100)/100}ms`:e.timing<6e4&&(n=`${Math.round(e.timing*100)/1e5}s`),t=`${t} ${nt.default.dim(`[${n}]`)}`}console.log(t)}}stats(){return{errorCount:this.errorCount,warnCount:this.warnCount,infoCount:this.infoCount,debugCount:this.debugCount}}},Wm=class extends Error{constructor(e){super(e),this.name="TokensJSONError"}},Bu="SINGLE_VALUE",Ou="MULTI_VALUE";function Gm({params:e,logger:t,pluginName:r}){let n={group:"plugin",label:r,message:""};(!e.value||typeof e.value!="string"&&typeof e.value!="object"||Array.isArray(e.value))&&t.error({...n,message:`setTransform() value expected string or object of strings, received ${Array.isArray(e.value)?"Array":typeof e.value}`}),typeof e.value=="object"&&Object.values(e.value).some(o=>typeof o!="string")&&t.error({...n,message:"setTransform() value expected object of strings, received some non-string values"})}async function p0(e,{sources:t,logger:r=new Wr,config:n}){let o={},a={outputFiles:[]};function i(f){if(!f?.format)return r.warn({group:"plugin",message:'"format" missing from getTransforms(), no tokens returned.'}),[];let m=f.id?ye(Array.isArray(f.id)?f.id:[f.id]):null,d=f.mode?ye(f.mode):null;return(o[f.format]??[]).filter(g=>{if(f.$type){if(typeof f.$type=="string"&&g.token.$type!==f.$type)return!1;if(Array.isArray(f.$type)&&!f.$type.some(p=>g.token.$type===p))return!1}return!(f.id&&f.id!=="*"&&m&&!m(g.token.id)||d&&!d(g.mode))})}let s=!1,u=performance.now();for(let f of n.plugins)typeof f.transform=="function"&&await f.transform({tokens:e,sources:t,getTransforms:i,setTransform(m,d){if(s){r.warn({message:"Attempted to call setTransform() after transform step has completed.",group:"plugin",label:f.name});return}let g=e[m],p=typeof d.value=="string"?d.value:{...d.value};if(typeof p=="object")for(let b of Object.keys(p))p[b]===void 0&&delete p[b];Gm({logger:r,params:{...d,value:p},pluginName:f.name}),o[d.format]||(o[d.format]=[]);let y=o[d.format].findIndex(b=>m===b.id&&(!d.localID||d.localID===b.localID)&&(!d.mode||d.mode===b.mode));y===-1?o[d.format].push({...d,id:m,value:p,type:typeof p=="string"?Bu:Ou,mode:d.mode||".",token:structuredClone(g)}):(o[d.format][y].value=p,o[d.format][y].type=typeof p=="string"?Bu:Ou)}});s=!0,r.debug({group:"parser",label:"transform",message:"transform() step",timing:performance.now()-u});let l=performance.now();for(let f of n.plugins)if(typeof f.build=="function"){let m=performance.now();await f.build({tokens:e,sources:t,getTransforms:i,outputFile(d,g){let p=new URL(d,n.outDir);a.outputFiles.some(y=>new URL(y.filename,n.outDir).href===p.href)&&r.error({group:"plugin",message:`Can\u2019t overwrite file "${d}"`,label:f.name}),a.outputFiles.push({filename:d,contents:g,plugin:f.name,time:performance.now()-m})}})}r.debug({group:"parser",label:"build",message:"build() step",timing:performance.now()-l});let c=performance.now();for(let f of n.plugins)typeof f.buildEnd=="function"&&await f.buildEnd({outputFiles:structuredClone(a.outputFiles)});return r.debug({group:"parser",label:"build",message:"buildEnd() step",timing:performance.now()-c}),a}function Je(e){return`https://terrazzo.app/docs/cli/lint#${e.replaceAll("/","")}`}var h0="a11y/min-contrast",Jm={AA:{default:4.5,large:3},AAA:{default:7,large:4.5}},Pu="INSUFFICIENT_CONTRAST",Ym={meta:{messages:{[Pu]:"Pair {{ index }} failed; expected {{ expected }}, got {{ actual }} ({{ level }})"},docs:{description:"Enforce colors meet minimum contrast checks for WCAG 2.",url:Je(h0)}},defaultOptions:{level:"AA",pairs:[]},create({tokens:e,options:t,report:r}){for(let n=0;n<t.pairs.length;n++){let{foreground:o,background:a,largeText:i}=t.pairs[n];if(!e[o])throw new Error(`Token ${o} does not exist`);if(e[o].$type!=="color")throw new Error(`Token ${o} isn\u2019t a color`);if(!e[a])throw new Error(`Token ${a} does not exist`);if(e[a].$type!=="color")throw new Error(`Token ${a} isn\u2019t a color`);let s=Oa(Nr(e[o].$value),Nr(e[a].$value)),u=Jm[t.level??"AA"][i?"large":"default"];s<u&&r({messageId:Pu,data:{index:n+1,expected:u,actual:Math.round(s*100)/100,level:t.level}})}}},Km=Ym,g0="a11y/min-font-size",zu="TOO_SMALL",Zm={meta:{messages:{[zu]:"{{ id }} font size too small. Expected minimum of {{ min }}"},docs:{description:"Enforce font sizes are no smaller than the given value.",url:Je(g0)}},defaultOptions:{},create({tokens:e,options:t,report:r}){if(!t.minSizePx&&!t.minSizeRem)throw new Error("Must specify at least one of minSizePx or minSizeRem");let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&!o.aliasOf&&o.$type==="typography"&&"fontSize"in o.$value){let a=o.$value.fontSize;(a.unit==="px"&&t.minSizePx&&a.value<t.minSizePx||a.unit==="rem"&&t.minSizeRem&&a.value<t.minSizeRem)&&r({messageId:zu,data:{id:o.id,min:t.minSizePx?`${t.minSizePx}px`:`${t.minSizeRem}rem`}})}}},Qm=Zm,b0="core/colorspace",_u="COLOR",Iu="BORDER",Lu="GRADIENT",Hu="SHADOW",ep={meta:{messages:{[_u]:"Color {{ id }} not in colorspace {{ colorSpace }}",[Iu]:"Border {{ id }} not in colorspace {{ colorSpace }}",[Lu]:"Gradient {{ id }} not in colorspace {{ colorSpace }}",[Hu]:"Shadow {{ id }} not in colorspace {{ colorSpace }}"},docs:{description:"Enforce that all colors are in a specific colorspace.",url:Je(b0)}},defaultOptions:{colorSpace:"srgb"},create({tokens:e,options:t,report:r}){if(!t.colorSpace)return;let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&!o.aliasOf)switch(o.$type){case"color":o.$value.colorSpace!==t.colorSpace&&r({messageId:_u,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break;case"border":!o.partialAliasOf?.color&&o.$value.color.colorSpace!==t.colorSpace&&r({messageId:Iu,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break;case"gradient":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&o.$value[a].color.colorSpace!==t.colorSpace&&r({messageId:Lu,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break;case"shadow":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&o.$value[a].color.colorSpace!==t.colorSpace&&r({messageId:Hu,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break}}},tp=ep,rp=/\d/,op=["-","_","/","."];function np(e=""){if(!rp.test(e))return e!==e.toLowerCase()}function y0(e,t){let r=t??op,n=[];if(!e||typeof e!="string")return n;let o="",a,i;for(let s of e){let u=r.includes(s);if(u===!0){n.push(o),o="",a=void 0;continue}let l=np(s);if(i===!1){if(a===!1&&l===!0){n.push(o),o=s,a=l;continue}if(a===!0&&l===!1&&o.length>1){let c=o.at(-1);n.push(o.slice(0,Math.max(0,o.length-1))),o=c+s,a=l;continue}}o+=s,a=l,i=u}return n.push(o),n}function ap(e){return e?e[0].toUpperCase()+e.slice(1):""}function ip(e){return e?e[0].toLowerCase()+e.slice(1):""}function v0(e,t){return e?(Array.isArray(e)?e:y0(e)).map(r=>ap(t?.normalize?r.toLowerCase():r)).join(""):""}function sp(e,t){return ip(v0(e||"",t))}function D0(e,t){return e?(Array.isArray(e)?e:y0(e)).map(r=>r.toLowerCase()).join(t??"-"):""}function Nu(e){return D0(e||"","_")}var x0="core/consistent-naming",_a="ERROR_WRONG_FORMAT",up={meta:{messages:{[_a]:"{{ id }} doesn\u2019t match format {{ format }}"},docs:{description:"Enforce consistent naming for tokens.",url:Je(x0)}},defaultOptions:{format:"kebab-case"},create({tokens:e,options:t,report:r}){let n={"kebab-case":D0,camelCase:sp,PascalCase:v0,snake_case:Nu,SCREAMING_SNAKE_CASE:o=>Nu(o).toLocaleUpperCase()}[String(t.format)];for(let o of Object.values(e))n?o.id.split(".").every(a=>n(a)===a)||r({messageId:_a,data:{id:o.id,format:t.format},node:o.source.node}):typeof t.format=="function"&&t.format(o.id)&&r({messageId:_a,data:{id:o.id,format:"(custom)"},node:o.source.node})}},lp=up,C0="core/descriptions",ju="MISSING_DESCRIPTION",cp={meta:{messages:{[ju]:"{{ id }} missing description"},docs:{description:"Enforce tokens have descriptions.",url:Je(C0)}},defaultOptions:{},create({tokens:e,options:t,report:r}){let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))n?.(o.id)||o.$description||r({messageId:ju,data:{id:o.id},node:o.source.node})}},fp=cp,A0="core/duplicate-values",Ia="ERROR_DUPLICATE_VALUE",dp={meta:{messages:{[Ia]:"{{ id }} declared a duplicate value"},docs:{description:"Enforce tokens can\u2019t redeclare the same value (excludes aliases).",url:Je(A0)}},defaultOptions:{},create({report:e,tokens:t,options:r}){let n={},o=r.ignore?ye(r.ignore):null;for(let a of Object.values(t))if(!o?.(a.id))if(n[a.$type]||(n[a.$type]=new Set),a.$type==="boolean"||a.$type==="duration"||a.$type==="fontWeight"||a.$type==="link"||a.$type==="number"||a.$type==="string"){if(typeof a.aliasOf=="string"&&Te(a.aliasOf))continue;n[a.$type]?.has(a.$value)&&e({messageId:Ia,data:{id:a.id},node:a.source.node}),n[a.$type]?.add(a.$value)}else{for(let i of n[a.$type].values()??[])if(JSON.stringify(a.$value)===JSON.stringify(i)){e({messageId:Ia,data:{id:a.id},node:a.source.node});break}n[a.$type].add(a.$value)}}},mp=dp,$0="core/max-gamut",pp=1e-6;function en(e,t){let r=Nr(e);return r?["rgb","hsl","hwb"].includes(r.mode)?!0:hp(r,Ra(r,r.mode,t==="srgb"?"rgb":t)):!1}function hp(e,t,r=pp){for(let n in e)if(!(n==="mode"||n==="alpha")){if(!(n in t))throw new Error(`Can\u2019t compare ${e.mode} to ${t.mode}`);if(Math.abs(e[n]-t[n])>r)return!1}return!0}var Xu="COLOR",Uu="BORDER",Vu="GRADIENT",qu="SHADOW",gp={meta:{messages:{[Xu]:"Color {{ id }} is outside {{ gamut }} gamut",[Uu]:"Border {{ id }} is outside {{ gamut }} gamut",[Vu]:"Gradient {{ id }} is outside {{ gamut }} gamut",[qu]:"Shadow {{ id }} is outside {{ gamut }} gamut"},docs:{description:"Enforce colors are within the specified gamut.",url:Je($0)}},defaultOptions:{gamut:"rec2020"},create({tokens:e,options:t,report:r}){if(!t?.gamut)return;if(t.gamut!=="srgb"&&t.gamut!=="p3"&&t.gamut!=="rec2020")throw new Error(`Unknown gamut "${t.gamut}". Options are "srgb", "p3", or "rec2020"`);let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&!o.aliasOf)switch(o.$type){case"color":en(o.$value,t.gamut)||r({messageId:Xu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break;case"border":!o.partialAliasOf?.color&&!en(o.$value.color,t.gamut)&&r({messageId:Uu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break;case"gradient":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&!en(o.$value[a].color,t.gamut)&&r({messageId:Vu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break;case"shadow":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&!en(o.$value[a].color,t.gamut)&&r({messageId:qu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break}}},bp=gp,E0="core/required-children",Wu="EMPTY_MATCH",Gu="MISSING_REQUIRED_TOKENS",Ju="MISSING_REQUIRED_GROUP",yp={meta:{messages:{[Wu]:"No tokens matched {{ matcher }}",[Gu]:'Match {{ index }}: some groups missing required token "{{ token }}"',[Ju]:'Match {{ index }}: some tokens missing required group "{{ group }}"'},docs:{description:"Enforce token groups have specific children, whether tokens and/or groups.",url:Je(E0)}},defaultOptions:{matches:[]},create({tokens:e,options:t,report:r}){if(!t.matches?.length)throw new Error("Invalid config. Missing `matches: [\u2026]`");for(let n=0;n<t.matches.length;n++){let{match:o,requiredTokens:a,requiredGroups:i}=t.matches[n];if(!o.length)throw new Error(`Match ${n}: must declare \`match: [\u2026]\``);if(!a?.length&&!i?.length)throw new Error(`Match ${n}: must declare either \`requiredTokens: [\u2026]\` or \`requiredGroups: [\u2026]\``);let s=ye(o),u=[],l=[],c=!1;for(let f of Object.values(e)){if(!s(f.id))continue;c=!0;let m=f.id.split(".");l.push(m.pop()),u.push(...m)}if(!c){r({messageId:Wu,data:{matcher:JSON.stringify(o)}});continue}if(a)for(let f of a)l.includes(f)||r({messageId:Gu,data:{index:n,token:f}});if(i)for(let f of i)u.includes(f)||r({messageId:Ju,data:{index:n,group:f}})}}},vp=yp,F0="core/required-modes",Dp={meta:{docs:{description:"Enforce certain tokens have specific modes.",url:Je(F0)}},defaultOptions:{matches:[]},create({tokens:e,options:t,report:r}){if(!t?.matches?.length)throw new Error("Invalid config. Missing `matches: [\u2026]`");for(let n=0;n<t.matches.length;n++){let{match:o,modes:a}=t.matches[n];if(!o.length)throw new Error(`Match ${n}: must declare \`match: [\u2026]\``);if(!a?.length)throw new Error(`Match ${n}: must declare \`modes: [\u2026]\``);let i=ye(o),s=!1;for(let u of Object.values(e))if(i(u.id)){s=!0;for(let l of a)u.mode?.[l]||r({message:`Token ${u.id}: missing required mode "${l}"`,node:u.source.node});s||r({message:`Match "${n}": no tokens matched ${JSON.stringify(o)}`,node:u.source.node})}}}},xp=Dp,M0="core/required-typography-properties",Cp={meta:{docs:{description:"Enforce typography tokens have required properties.",url:Je(M0)}},defaultOptions:{properties:[]},create({tokens:e,options:t,report:r}){if(!t)return;if(!t.properties.length)throw new Error('"properties" can\u2019t be empty');let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&o.$type==="typography"&&!o.aliasOf)for(let a of t.properties)!o.partialAliasOf?.[a]&&!(a in o.$value)&&r({message:`${o.id} missing required typographic property "${a}"`,node:o.source.node})}},Ap=Cp;function $p(){return{name:"@terrazzo/plugin-lint-core",lint(){return{[b0]:tp,[x0]:lp,[C0]:fp,[A0]:mp,[$0]:bp,[E0]:vp,[F0]:xp,[M0]:Ap,[h0]:Km,[g0]:Qm}}}}var Ep=/\/*$/;function T0(e,{logger:t=new Wr,cwd:r}={}){let n=performance.now();r||t.error({group:"config",label:"core",message:"defineConfig() missing `cwd` for JS API"});let o=_n({},e);Fp({rawConfig:e,config:o,logger:t,cwd:r}),Mp({config:o,cwd:r,logger:t}),Tp({config:o,logger:t}),wp({config:o,logger:t}),kp({config:o,logger:t});for(let a of o.plugins)a.config?.({...o});return t.debug({group:"parser",label:"config",message:"Finish config validation",timing:performance.now()-n}),o}function Fp({rawConfig:e,config:t,logger:r,cwd:n}){if(e.tokens===void 0)t.tokens=["./tokens.json"];else if(typeof e.tokens=="string")t.tokens=[e.tokens];else if(Array.isArray(e.tokens)){t.tokens=[];for(let o of e.tokens)typeof o=="string"||o instanceof URL?t.tokens.push(o):r.error({group:"config",label:"tokens",message:`Expected array of strings, encountered ${JSON.stringify(o)}`})}else r.error({group:"config",label:"tokens",message:`Expected string or array of strings, received ${typeof e.tokens}`});for(let o=0;o<t.tokens.length;o++){let a=t.tokens[o];if(!(a instanceof URL))try{t.tokens[o]=new URL(a,n)}catch{r.error({group:"config",label:"tokens",message:`Invalid URL ${a}`})}}}function Mp({config:e,cwd:t,logger:r}){e.outDir instanceof URL||(typeof e.outDir>"u"?e.outDir=new URL("./tokens/",t):typeof e.outDir!="string"?r.error({group:"config",label:"outDir",message:`Expected string, received ${JSON.stringify(e.outDir)}`}):(e.outDir=new URL(e.outDir,t),e.outDir=new URL(e.outDir.href.replace(Ep,"/"))))}function Tp({config:e,logger:t}){typeof e.plugins>"u"&&(e.plugins=[]),Array.isArray(e.plugins)||t.error({group:"config",label:"plugins",message:`Expected array of plugins, received ${JSON.stringify(e.plugins)}`}),e.plugins.push($p());for(let r=0;r<e.plugins.length;r++){let n=e.plugins[r];typeof n!="object"?t.error({group:"config",label:`plugin[${r}]`,message:`Expected output plugin, received ${JSON.stringify(n)}`}):n.name||t.error({group:"config",label:`plugin[${r}]`,message:'Missing "name"'})}e.plugins.sort((r,n)=>r.enforce==="pre"&&n.enforce!=="pre"?-1:r.enforce==="post"&&n.enforce!=="post"?1:0)}function wp({config:e,logger:t}){if(e.lint!==void 0)if((e.lint===null||typeof e.lint!="object"||Array.isArray(e.lint))&&t.error({group:"config",label:"lint",message:"Must be an object"}),e.lint.build||(e.lint.build={enabled:!0}),e.lint.build.enabled!==void 0?typeof e.lint.build.enabled!="boolean"&&t.error({group:"config",label:"lint \u203A build \u203A enabled",message:`Expected boolean, received ${JSON.stringify(e.lint.build)}`}):e.lint.build.enabled=!0,e.lint.rules===void 0)e.lint.rules={};else{if(e.lint.rules===null||typeof e.lint.rules!="object"||Array.isArray(e.lint.rules)){t.error({group:"config",label:"lint \u203A rules",message:`Expected object, received ${JSON.stringify(e.lint.rules)}`});return}let r=new Map;for(let n of e.plugins){if(typeof n.lint!="function")continue;let o=n.lint();if(!o||Array.isArray(o)||typeof o!="object"){t.error({group:"config",label:`plugin \u203A ${n.name}`,message:`Expected object for lint() received ${JSON.stringify(o)}`});continue}for(let a of Object.keys(o))r.get(a)&&r.get(a)!==n.name&&t.error({group:"config",label:`plugin \u203A ${n.name}`,message:`Duplicate rule ${a} already registered by plugin ${r.get(a)}`}),r.set(a,n.name)}for(let n of Object.keys(e.lint.rules)){r.has(n)||t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:"Unknown rule. Is the plugin installed?"});let o=e.lint.rules[n],a="off",i;typeof o=="number"||typeof o=="string"?a=o:Array.isArray(o)?(a=o[0],i=o[1]):o!==void 0&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Invalid eyntax. Expected \`string | number | Array\`, received ${JSON.stringify(o)}}`}),e.lint.rules[n]=[a,i],typeof a=="number"?(a!==0&&a!==1&&a!==2&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Invalid number ${a}. Specify 0 (off), 1 (warn), or 2 (error).`}),e.lint.rules[n][0]=["off","warn","error"][a]):typeof a=="string"?a!=="off"&&a!=="warn"&&a!=="error"&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Invalid string ${JSON.stringify(a)}. Specify "off", "warn", or "error".`}):o!==null&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Expected string or number, received ${JSON.stringify(o)}`})}}else e.lint={build:{enabled:!0},rules:{}}}function kp({config:e,logger:t}){e.ignore||(e.ignore={}),e.ignore.tokens??=[],e.ignore.deprecated??=!1,(!Array.isArray(e.ignore.tokens)||e.ignore.tokens.some(r=>typeof r!="string"))&&t.error({group:"config",label:"ignore \u203A tokens",message:`Expected array of strings, received ${JSON.stringify(e.ignore.tokens)}`}),typeof e.ignore.deprecated!="boolean"&&t.error({group:"config",label:"ignore \u203A deprecated",message:`Expected boolean, received ${JSON.stringify(e.ignore.deprecated)}`})}var Sp=new Intl.ListFormat("en-us");async function Rp({tokens:e,filename:t,config:r={},src:n,logger:o}){let{plugins:a=[],lint:i}=r,s=Object.keys(i?.rules??{});for(let u of a)if(typeof u.lint=="function"){let l=performance.now(),c=u.lint(),f=[],m=[];await Promise.all(Object.entries(c).map(async([d,g])=>{if(!(d in i.rules)||i.rules[d]===null)return;let[p,y]=i.rules[d];if(p==="off")return;await g.create({id:d,report(D){let C="";if(!D.message&&!D.messageId&&o.error({group:"lint",label:`${u.name} \u203A lint \u203A ${d}`,message:"Unable to report error: missing message or messageId"}),D.message?C=D.message:(D.messageId in(g.meta?.messages??{})||o.error({group:"lint",label:`${u.name} \u203A lint \u203A ${d}`,message:`messageId "${D.messageId}" does not exist`}),C=g.meta?.messages?.[D.messageId]??""),D.data&&typeof D.data=="object")for(let[F,v]of Object.entries(D.data)){let M=["string","number","boolean"].includes(typeof v)?String(v):JSON.stringify(v);C=C.replace(/{{[^}]+}}/g,$=>$.substring(2,$.length-2).trim()===F?M:$)}(p==="error"?f:m).push({group:"lint",label:d,message:C,filename:t,node:D.node,src:D.source?.src})},tokens:e,filename:t,src:n,options:_n(g.meta?.defaultOptions??[],g.defaultOptions??[],y)});let b=s.indexOf(d);b!==-1&&s.splice(b,1)}));for(let d of f)o.error({...d,continueOnError:!0});for(let d of m)o.warn(d);if(o.debug({group:"lint",label:u.name,message:"Finished",timing:performance.now()-l}),f.length){let d=[jr(f.length,"error","errors")];m.length&&d.push(jr(m.length,"warning","warnings")),o.error({group:"lint",message:`Lint failed with ${Sp.format(d)}`,label:u.name,continueOnError:!1})}}for(let u of s)o.warn({group:"lint",label:"lint",message:`Unknown lint rule "${u}"`})}var Ya=48,Bp=49,w0=57,Ur=92,Op=36,Ha=46,k0=34,S0=97,Pp=101,Ka=102,R0=110,B0=116,Yu=117,Ku=120,zp=122,Na=45,Za=10,ja=43,Qa=13,_p=39,Xr=47,Ip=32,Lp=9,Hp=95,O0=65,Np=69,jp=70,Xp=78,Up=88,Vp=90,qp=98,Wp=114,Gp=118,P0=8232,z0=8233,Jp=73,Zu=42,Yp=11,Kp=12,Zp=160,Qp=65279,e1=160,t1=8192,r1=8193,o1=8194,n1=8195,a1=8196,i1=8197,s1=8198,u1=8199,l1=8200,c1=8201,f1=8202,d1=8239,m1=8287,p1=12288,h1="[",g1="]",b1="{",y1="}",v1=":",D1=",",x1="true",C1="false",A1="null",$1="NaN",E1="Infinity",Xa='"',Vr=new Map([[k0,Xa],[Ur,"\\"],[Xr,"/"],[qp,"\b"],[R0,`
|
|
12
|
-
`],[Ka,"\f"],[
|
|
13
|
-
`,"n"],["\f","f"],["\r","r"],[" ","t"]]),M1=new Map([...F1,["\v","v"],["\0","0"],["\u2028","u2028"],["\u2029","u2029"]]),rn=new Map([[h1,"LBracket"],[g1,"RBracket"],[b1,"LBrace"],[y1,"RBrace"],[v1,"Colon"],[D1,"Comma"],[x1,"Boolean"],[C1,"Boolean"],[A1,"Null"]]),tn=new Map([...rn,[$1,"Number"],[E1,"Number"]]),Ua=new Set([Za,Qa,P0,z0]),Lt=class extends Error{constructor(e,{line:t,column:r,offset:n}){super(`${e} (${t}:${r})`),this.line=t,this.column=r,this.offset=n}},T1=class extends Lt{constructor(e,t){super(`Unexpected character '${String.fromCharCode(e)}' found.`,t)}},w1=class extends Lt{constructor(e,t){super(`Unexpected identifier '${e}' found.`,t)}},lr=class extends Lt{constructor(e){super(`Unexpected token ${e.type} found.`,e.loc.start)}},_0=class extends Lt{constructor(e){super("Unexpected end of input found.",e)}},k1=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,S1=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,R1=13,Qu=10,B1=class{#n="";#u=1;#e=0;#t=-1;#i=!1;#s=-1;#r=!1;constructor(e){this.#n=e}#l(){this.#r||(this.#e++,this.#t++,this.#s=-1,this.#r=!0)}locate(){return{line:this.#u,column:this.#e,offset:this.#t}}next(){if(this.#t>=this.#n.length-1)return this.#l(),-1;this.#t++;let e=this.#n.charCodeAt(this.#t);return this.#i?(this.#u++,this.#e=1,this.#i=!1):this.#e++,e===R1?(this.#i=!0,this.peek()===Qu&&this.#t++):e===Qu&&(this.#i=!0),this.#s=e,e}peek(){return this.#t===this.#n.length-1?-1:this.#n.charCodeAt(this.#t+1)}match(e){return e(this.peek())?(this.next(),!0):!1}current(){return this.#s}},O1="Infinity",P1="NaN",z1=new Set([B0,Ka,R0]),Va=new Set([Ip,Lp,Za,Qa]),e0=new Set([...Va,Yp,Kp,Zp,P0,z0,Qp,e1,t1,r1,o1,n1,a1,i1,s1,u1,l1,c1,f1,d1,m1,p1]),_1={mode:"json",ranges:!1},I1=new Set(["true","false","null"]),j={EOF:0,Number:1,String:2,Boolean:3,Null:4,NaN:5,Infinity:6,Identifier:7,Colon:20,LBrace:21,RBrace:22,LBracket:23,RBracket:24,Comma:25,LineComment:40,BlockComment:41};function at(e){return e>=Ya&&e<=w0}function La(e){return at(e)||e>=O0&&e<=jp||e>=S0&&e<=Ka}function L1(e){return e>=Bp&&e<=w0}function H1(e){return z1.has(e)}function I0(e){return at(e)||e===Ha||e===Na}function N1(e){return I0(e)||e===ja}function t0(e,t){return e===k0||t&&e===_p}function qa(e){if(e===Op||e===Hp||e===Ur||e>=S0&&e<=zp||e>=O0&&e<=Vp||e===8204||e===8205)return!0;let t=String.fromCharCode(e);return k1.test(t)}function r0(e){if(qa(e)||at(e))return!0;let t=String.fromCharCode(e);return S1.test(t)}var j1=class{#n;#u;#e;#t;#i;#s;#r;#l;#m;#p;#h;constructor(e,t){this.#u=e,this.#n={..._1,...t},this.#e=new B1(e),this.#t=this.#n.mode==="json5",this.#i=this.#n.mode!=="json",this.#s=this.#n.ranges,this.#l=this.#t?on.has.bind(on):Vr.has.bind(Vr),this.#m=this.#t?Ua.has.bind(Ua):()=>!1,this.#p=this.#t?r=>r===Ku:()=>!1,this.#h=this.#t?e0.has.bind(e0):Va.has.bind(Va)}#o(e,t=this.#e.locate()){throw new T1(e,t)}#v(e,t=this.#e.locate()){throw new w1(e,t)}#c(){throw new _0(this.#e.locate())}#a(e,t,r,n){let o=r.offset+t,a=this.#n.ranges?{range:[r.offset,o]}:void 0;return{type:e,loc:{start:r,end:n||{line:r.line,column:r.column+t,offset:o}},...a}}#f(e){let t="",r;for(let n=0;n<e;n++){if(r=this.#e.peek(),La(r)){this.#e.next(),t+=String.fromCharCode(r);continue}this.#o(r)}return t}#d(e){let t="";do{if(t+=String.fromCharCode(e),e===Ur){e=this.#e.next(),e!==Yu&&this.#o(e),t+=String.fromCharCode(e);let r=this.#f(4),n=parseInt(r,16);if(t.length===2&&!qa(n)){let o=this.#e.locate();this.#o(Ur,{line:o.line,column:o.column-5,offset:o.offset-5})}else if(!r0(n)){let o=this.#e.locate();this.#o(n,{line:o.line,column:o.column-5,offset:o.offset-5})}t+=r}if(e=this.#e.peek(),!r0(e))break;this.#e.next()}while(!0);return t}#g(e){let t=e,r=1;for(e=this.#e.peek();e!==-1&&e!==t;){if(this.#e.next(),r++,e===Ur)if(e=this.#e.peek(),this.#l(e)||this.#m(e))this.#e.next(),r++;else if(e===Yu){this.#e.next(),r++;let n=this.#f(4);r+=n.length}else if(this.#p(e)){this.#e.next(),r++;let n=this.#f(2);r+=n.length}else this.#t?(this.#e.next(),r++):this.#o(e);e=this.#e.peek()}return e===-1&&(this.#e.next(),this.#c()),this.#e.next(),r++,r}#b(e){let t=1;if(e===Na||this.#t&&e===ja){if(e=this.#e.peek(),this.#t&&(e===Jp||e===Xp)){this.#e.next();let r=this.#d(e);return r!==O1&&r!==P1&&this.#o(e),t+r.length}at(e)||this.#o(e),this.#e.next(),t++}if(e===Ya)if(e=this.#e.peek(),this.#t&&(e===Ku||e===Up)){this.#e.next(),t++,e=this.#e.peek(),La(e)||(this.#e.next(),this.#o(e));do this.#e.next(),t++,e=this.#e.peek();while(La(e))}else at(e)&&this.#o(e);else if(!this.#t||e!==Ha)for(L1(e)||this.#o(e),e=this.#e.peek();at(e);)this.#e.next(),t++,e=this.#e.peek();if(e===Ha){let r=-1;for(this.#e.next(),t++,r++,e=this.#e.peek();at(e);)this.#e.next(),t++,r++,e=this.#e.peek();!this.#t&&r===0&&(this.#e.next(),e?this.#o(e):this.#c())}if(e===Pp||e===Np)for(this.#e.next(),t++,e=this.#e.peek(),(e===ja||e===Na)&&(this.#e.next(),t++,e=this.#e.peek()),e===-1&&(this.#e.next(),this.#c()),at(e)||(this.#e.next(),this.#o(e));at(e);)this.#e.next(),t++,e=this.#e.peek();return t}#y(e){let t=1;if(e=this.#e.peek(),e===Xr){do this.#e.next(),t+=1,e=this.#e.peek();while(e>-1&&e!==Qa&&e!==Za);return{length:t,multiline:!1}}if(e===Zu){for(this.#e.next(),t+=1;e>-1;)if(e=this.#e.peek(),e===Zu){if(this.#e.next(),t+=1,e=this.#e.peek(),e===Xr)return this.#e.next(),t+=1,{length:t,multiline:!0}}else this.#e.next(),t+=1;this.#e.next(),this.#c()}this.#e.next(),this.#o(e)}next(){let e=this.#e.next();for(;this.#h(e);)e=this.#e.next();if(e===-1)return j.EOF;let t=this.#e.locate(),r=String.fromCharCode(e);if(this.#t)if(tn.has(r))this.#r=this.#a(tn.get(r),1,t);else if(qa(e)){let n=this.#d(e);tn.has(n)?this.#r=this.#a(tn.get(n),n.length,t):this.#r=this.#a("Identifier",n.length,t)}else if(N1(e)){let n=this.#b(e);this.#r=this.#a("Number",n,t)}else if(t0(e,this.#t)){let n=this.#g(e),o=this.#e.locate();this.#r=this.#a("String",n,t,{line:o.line,column:o.column+1,offset:o.offset+1})}else if(e===Xr&&this.#i){let n=this.#y(e),o=this.#e.locate();this.#r=this.#a(n.multiline?"BlockComment":"LineComment",n.length,t,{line:o.line,column:o.column+1,offset:o.offset+1})}else this.#o(e);else if(rn.has(r))this.#r=this.#a(rn.get(r),1,t);else if(H1(e)){let n=this.#d(e);I1.has(n)||this.#v(n,t),this.#r=this.#a(rn.get(n),n.length,t)}else if(I0(e)){let n=this.#b(e);this.#r=this.#a("Number",n,t)}else if(t0(e,this.#t)){let n=this.#g(e);this.#r=this.#a("String",n,t)}else if(e===Xr&&this.#i){let n=this.#y(e),o=this.#e.locate();this.#r=this.#a(n.multiline?"BlockComment":"LineComment",n.length,t,{line:o.line,column:o.column+1,offset:o.offset+1})}else this.#o(e);return j[this.#r.type]}get token(){return this.#r}},Be={document(e,t={}){return{type:"Document",body:e,loc:t.loc,...t}},string(e,t={}){return{type:"String",value:e,loc:t.loc,...t}},number(e,t={}){return{type:"Number",value:e,loc:t.loc,...t}},boolean(e,t={}){return{type:"Boolean",value:e,loc:t.loc,...t}},null(e={}){return{type:"Null",loc:e.loc,...e}},array(e,t={}){return{type:"Array",elements:e,loc:t.loc,...t}},element(e,t={}){return{type:"Element",value:e,loc:t.loc,...t}},object(e,t={}){return{type:"Object",members:e,loc:t.loc,...t}},member(e,t,r={}){return{type:"Member",name:e,value:t,loc:r.loc,...r}},identifier(e,t={}){return{type:"Identifier",name:e,loc:t.loc,...t}},nan(e="",t={}){return{type:"NaN",sign:e,loc:t.loc,...t}},infinity(e="",t={}){return{type:"Infinity",sign:e,loc:t.loc,...t}}},X1={mode:"json",ranges:!1,tokens:!1,allowTrailingCommas:!1},U1=/\\u[\da-fA-F]{4}/gu;function V1(e){return e.replace(U1,t=>String.fromCharCode(parseInt(t.slice(2),16)))}function q1(e){let t=1,r=1;for(let n=0;n<e.length;n++){let o=e[n];o===`
|
|
11
|
+
${o}${a}`}return r}var Wr=class{level="info";debugScope="*";errorCount=0;warnCount=0;infoCount=0;debugCount=0;constructor(e){e?.level&&(this.level=e.level),e?.debugScope&&(this.debugScope=e.debugScope)}setLevel(e){this.level=e}error(e){this.errorCount++;let t=Qo(e,"error");if(e.continueOnError){console.error(t);return}throw e.node?new Gm(t):new Error(t)}info(e){if(this.infoCount++,this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("info"))return;let t=Qo(e,"info");console.log(t)}warn(e){if(this.warnCount++,this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("warn"))return;let t=Qo(e,"warn");console.warn(t)}debug(e){if(this.level==="silent"||ur.indexOf(this.level)<ur.indexOf("debug"))return;this.debugCount++;let t=Qo(e,"debug"),r=e.label?`${e.group}:${e.label}`:e.group;if(!(this.debugScope!=="*"&&!ye(this.debugScope)(r))){if(t.replace(/\[config[^\]]+\]/,n=>nt.default.green(n)).replace(/\[parser[^\]]+\]/,n=>nt.default.magenta(n)).replace(/\[lint[^\]]+\]/,n=>nt.default.yellow(n)).replace(/\[plugin[^\]]+\]/,n=>nt.default.cyan(n)),t=`${nt.default.dim(Wm.format(performance.now()))} ${t}`,typeof e.timing=="number"){let n="";e.timing<1e3?n=`${Math.round(e.timing*100)/100}ms`:e.timing<6e4&&(n=`${Math.round(e.timing*100)/1e5}s`),t=`${t} ${nt.default.dim(`[${n}]`)}`}console.log(t)}}stats(){return{errorCount:this.errorCount,warnCount:this.warnCount,infoCount:this.infoCount,debugCount:this.debugCount}}},Gm=class extends Error{constructor(e){super(e),this.name="TokensJSONError"}},Bu="SINGLE_VALUE",Ou="MULTI_VALUE";function Jm({params:e,logger:t,pluginName:r}){let n={group:"plugin",label:r,message:""};(!e.value||typeof e.value!="string"&&typeof e.value!="object"||Array.isArray(e.value))&&t.error({...n,message:`setTransform() value expected string or object of strings, received ${Array.isArray(e.value)?"Array":typeof e.value}`}),typeof e.value=="object"&&Object.values(e.value).some(o=>typeof o!="string")&&t.error({...n,message:"setTransform() value expected object of strings, received some non-string values"})}async function p0(e,{sources:t,logger:r=new Wr,config:n}){let o={},a={outputFiles:[]};function i(f){if(!f?.format)return r.warn({group:"plugin",message:'"format" missing from getTransforms(), no tokens returned.'}),[];let m=f.id?ye(Array.isArray(f.id)?f.id:[f.id]):null,d=f.mode?ye(f.mode):null;return(o[f.format]??[]).filter(g=>{if(f.$type){if(typeof f.$type=="string"&&g.token.$type!==f.$type)return!1;if(Array.isArray(f.$type)&&!f.$type.some(p=>g.token.$type===p))return!1}return!(f.id&&f.id!=="*"&&m&&!m(g.token.id)||d&&!d(g.mode))})}let s=!1,u=performance.now();for(let f of n.plugins)typeof f.transform=="function"&&await f.transform({tokens:e,sources:t,getTransforms:i,setTransform(m,d){if(s){r.warn({message:"Attempted to call setTransform() after transform step has completed.",group:"plugin",label:f.name});return}let g=e[m],p=typeof d.value=="string"?d.value:{...d.value};if(typeof p=="object")for(let b of Object.keys(p))p[b]===void 0&&delete p[b];Jm({logger:r,params:{...d,value:p},pluginName:f.name}),o[d.format]||(o[d.format]=[]);let y=o[d.format].findIndex(b=>m===b.id&&(!d.localID||d.localID===b.localID)&&(!d.mode||d.mode===b.mode));y===-1?o[d.format].push({...d,id:m,value:p,type:typeof p=="string"?Bu:Ou,mode:d.mode||".",token:structuredClone(g)}):(o[d.format][y].value=p,o[d.format][y].type=typeof p=="string"?Bu:Ou)}});s=!0,r.debug({group:"parser",label:"transform",message:"transform() step",timing:performance.now()-u});let l=performance.now();for(let f of n.plugins)if(typeof f.build=="function"){let m=performance.now();await f.build({tokens:e,sources:t,getTransforms:i,outputFile(d,g){let p=new URL(d,n.outDir);a.outputFiles.some(y=>new URL(y.filename,n.outDir).href===p.href)&&r.error({group:"plugin",message:`Can\u2019t overwrite file "${d}"`,label:f.name}),a.outputFiles.push({filename:d,contents:g,plugin:f.name,time:performance.now()-m})}})}r.debug({group:"parser",label:"build",message:"build() step",timing:performance.now()-l});let c=performance.now();for(let f of n.plugins)typeof f.buildEnd=="function"&&await f.buildEnd({outputFiles:structuredClone(a.outputFiles)});return r.debug({group:"parser",label:"build",message:"buildEnd() step",timing:performance.now()-c}),a}function Je(e){return`https://terrazzo.app/docs/cli/lint#${e.replaceAll("/","")}`}var h0="a11y/min-contrast",Ym={AA:{default:4.5,large:3},AAA:{default:7,large:4.5}},Pu="INSUFFICIENT_CONTRAST",Km={meta:{messages:{[Pu]:"Pair {{ index }} failed; expected {{ expected }}, got {{ actual }} ({{ level }})"},docs:{description:"Enforce colors meet minimum contrast checks for WCAG 2.",url:Je(h0)}},defaultOptions:{level:"AA",pairs:[]},create({tokens:e,options:t,report:r}){for(let n=0;n<t.pairs.length;n++){let{foreground:o,background:a,largeText:i}=t.pairs[n];if(!e[o])throw new Error(`Token ${o} does not exist`);if(e[o].$type!=="color")throw new Error(`Token ${o} isn\u2019t a color`);if(!e[a])throw new Error(`Token ${a} does not exist`);if(e[a].$type!=="color")throw new Error(`Token ${a} isn\u2019t a color`);let s=Oa(Nr(e[o].$value),Nr(e[a].$value)),u=Ym[t.level??"AA"][i?"large":"default"];s<u&&r({messageId:Pu,data:{index:n+1,expected:u,actual:Math.round(s*100)/100,level:t.level}})}}},Zm=Km,g0="a11y/min-font-size",zu="TOO_SMALL",Qm={meta:{messages:{[zu]:"{{ id }} font size too small. Expected minimum of {{ min }}"},docs:{description:"Enforce font sizes are no smaller than the given value.",url:Je(g0)}},defaultOptions:{},create({tokens:e,options:t,report:r}){if(!t.minSizePx&&!t.minSizeRem)throw new Error("Must specify at least one of minSizePx or minSizeRem");let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&!o.aliasOf&&o.$type==="typography"&&"fontSize"in o.$value){let a=o.$value.fontSize;(a.unit==="px"&&t.minSizePx&&a.value<t.minSizePx||a.unit==="rem"&&t.minSizeRem&&a.value<t.minSizeRem)&&r({messageId:zu,data:{id:o.id,min:t.minSizePx?`${t.minSizePx}px`:`${t.minSizeRem}rem`}})}}},ep=Qm,b0="core/colorspace",_u="COLOR",Iu="BORDER",Lu="GRADIENT",Hu="SHADOW",tp={meta:{messages:{[_u]:"Color {{ id }} not in colorspace {{ colorSpace }}",[Iu]:"Border {{ id }} not in colorspace {{ colorSpace }}",[Lu]:"Gradient {{ id }} not in colorspace {{ colorSpace }}",[Hu]:"Shadow {{ id }} not in colorspace {{ colorSpace }}"},docs:{description:"Enforce that all colors are in a specific colorspace.",url:Je(b0)}},defaultOptions:{colorSpace:"srgb"},create({tokens:e,options:t,report:r}){if(!t.colorSpace)return;let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&!o.aliasOf)switch(o.$type){case"color":o.$value.colorSpace!==t.colorSpace&&r({messageId:_u,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break;case"border":!o.partialAliasOf?.color&&o.$value.color.colorSpace!==t.colorSpace&&r({messageId:Iu,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break;case"gradient":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&o.$value[a].color.colorSpace!==t.colorSpace&&r({messageId:Lu,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break;case"shadow":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&o.$value[a].color.colorSpace!==t.colorSpace&&r({messageId:Hu,data:{id:o.id,colorSpace:t.colorSpace},node:o.source.node});break}}},rp=tp,op=/\d/,np=["-","_","/","."];function ap(e=""){if(!op.test(e))return e!==e.toLowerCase()}function y0(e,t){let r=t??np,n=[];if(!e||typeof e!="string")return n;let o="",a,i;for(let s of e){let u=r.includes(s);if(u===!0){n.push(o),o="",a=void 0;continue}let l=ap(s);if(i===!1){if(a===!1&&l===!0){n.push(o),o=s,a=l;continue}if(a===!0&&l===!1&&o.length>1){let c=o.at(-1);n.push(o.slice(0,Math.max(0,o.length-1))),o=c+s,a=l;continue}}o+=s,a=l,i=u}return n.push(o),n}function ip(e){return e?e[0].toUpperCase()+e.slice(1):""}function sp(e){return e?e[0].toLowerCase()+e.slice(1):""}function v0(e,t){return e?(Array.isArray(e)?e:y0(e)).map(r=>ip(t?.normalize?r.toLowerCase():r)).join(""):""}function up(e,t){return sp(v0(e||"",t))}function D0(e,t){return e?(Array.isArray(e)?e:y0(e)).map(r=>r.toLowerCase()).join(t??"-"):""}function Nu(e){return D0(e||"","_")}var x0="core/consistent-naming",_a="ERROR_WRONG_FORMAT",lp={meta:{messages:{[_a]:"{{ id }} doesn\u2019t match format {{ format }}"},docs:{description:"Enforce consistent naming for tokens.",url:Je(x0)}},defaultOptions:{format:"kebab-case"},create({tokens:e,options:t,report:r}){let n={"kebab-case":D0,camelCase:up,PascalCase:v0,snake_case:Nu,SCREAMING_SNAKE_CASE:o=>Nu(o).toLocaleUpperCase()}[String(t.format)];for(let o of Object.values(e))n?o.id.split(".").every(a=>n(a)===a)||r({messageId:_a,data:{id:o.id,format:t.format},node:o.source.node}):typeof t.format=="function"&&t.format(o.id)&&r({messageId:_a,data:{id:o.id,format:"(custom)"},node:o.source.node})}},cp=lp,C0="core/descriptions",ju="MISSING_DESCRIPTION",fp={meta:{messages:{[ju]:"{{ id }} missing description"},docs:{description:"Enforce tokens have descriptions.",url:Je(C0)}},defaultOptions:{},create({tokens:e,options:t,report:r}){let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))n?.(o.id)||o.$description||r({messageId:ju,data:{id:o.id},node:o.source.node})}},dp=fp,A0="core/duplicate-values",Ia="ERROR_DUPLICATE_VALUE",mp={meta:{messages:{[Ia]:"{{ id }} declared a duplicate value"},docs:{description:"Enforce tokens can\u2019t redeclare the same value (excludes aliases).",url:Je(A0)}},defaultOptions:{},create({report:e,tokens:t,options:r}){let n={},o=r.ignore?ye(r.ignore):null;for(let a of Object.values(t))if(!o?.(a.id))if(n[a.$type]||(n[a.$type]=new Set),a.$type==="boolean"||a.$type==="duration"||a.$type==="fontWeight"||a.$type==="link"||a.$type==="number"||a.$type==="string"){if(typeof a.aliasOf=="string"&&Te(a.aliasOf))continue;n[a.$type]?.has(a.$value)&&e({messageId:Ia,data:{id:a.id},node:a.source.node}),n[a.$type]?.add(a.$value)}else{for(let i of n[a.$type].values()??[])if(JSON.stringify(a.$value)===JSON.stringify(i)){e({messageId:Ia,data:{id:a.id},node:a.source.node});break}n[a.$type].add(a.$value)}}},pp=mp,$0="core/max-gamut",hp=1e-6;function en(e,t){let r=Nr(e);return r?["rgb","hsl","hwb"].includes(r.mode)?!0:gp(r,Ra(r,r.mode,t==="srgb"?"rgb":t)):!1}function gp(e,t,r=hp){for(let n in e)if(!(n==="mode"||n==="alpha")){if(!(n in t))throw new Error(`Can\u2019t compare ${e.mode} to ${t.mode}`);if(Math.abs(e[n]-t[n])>r)return!1}return!0}var Xu="COLOR",Uu="BORDER",Vu="GRADIENT",qu="SHADOW",bp={meta:{messages:{[Xu]:"Color {{ id }} is outside {{ gamut }} gamut",[Uu]:"Border {{ id }} is outside {{ gamut }} gamut",[Vu]:"Gradient {{ id }} is outside {{ gamut }} gamut",[qu]:"Shadow {{ id }} is outside {{ gamut }} gamut"},docs:{description:"Enforce colors are within the specified gamut.",url:Je($0)}},defaultOptions:{gamut:"rec2020"},create({tokens:e,options:t,report:r}){if(!t?.gamut)return;if(t.gamut!=="srgb"&&t.gamut!=="p3"&&t.gamut!=="rec2020")throw new Error(`Unknown gamut "${t.gamut}". Options are "srgb", "p3", or "rec2020"`);let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&!o.aliasOf)switch(o.$type){case"color":en(o.$value,t.gamut)||r({messageId:Xu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break;case"border":!o.partialAliasOf?.color&&!en(o.$value.color,t.gamut)&&r({messageId:Uu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break;case"gradient":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&!en(o.$value[a].color,t.gamut)&&r({messageId:Vu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break;case"shadow":for(let a=0;a<o.$value.length;a++)!o.partialAliasOf?.[a]?.color&&!en(o.$value[a].color,t.gamut)&&r({messageId:qu,data:{id:o.id,gamut:t.gamut},node:o.source.node});break}}},yp=bp,E0="core/required-children",Wu="EMPTY_MATCH",Gu="MISSING_REQUIRED_TOKENS",Ju="MISSING_REQUIRED_GROUP",vp={meta:{messages:{[Wu]:"No tokens matched {{ matcher }}",[Gu]:'Match {{ index }}: some groups missing required token "{{ token }}"',[Ju]:'Match {{ index }}: some tokens missing required group "{{ group }}"'},docs:{description:"Enforce token groups have specific children, whether tokens and/or groups.",url:Je(E0)}},defaultOptions:{matches:[]},create({tokens:e,options:t,report:r}){if(!t.matches?.length)throw new Error("Invalid config. Missing `matches: [\u2026]`");for(let n=0;n<t.matches.length;n++){let{match:o,requiredTokens:a,requiredGroups:i}=t.matches[n];if(!o.length)throw new Error(`Match ${n}: must declare \`match: [\u2026]\``);if(!a?.length&&!i?.length)throw new Error(`Match ${n}: must declare either \`requiredTokens: [\u2026]\` or \`requiredGroups: [\u2026]\``);let s=ye(o),u=[],l=[],c=!1;for(let f of Object.values(e)){if(!s(f.id))continue;c=!0;let m=f.id.split(".");l.push(m.pop()),u.push(...m)}if(!c){r({messageId:Wu,data:{matcher:JSON.stringify(o)}});continue}if(a)for(let f of a)l.includes(f)||r({messageId:Gu,data:{index:n,token:f}});if(i)for(let f of i)u.includes(f)||r({messageId:Ju,data:{index:n,group:f}})}}},Dp=vp,F0="core/required-modes",xp={meta:{docs:{description:"Enforce certain tokens have specific modes.",url:Je(F0)}},defaultOptions:{matches:[]},create({tokens:e,options:t,report:r}){if(!t?.matches?.length)throw new Error("Invalid config. Missing `matches: [\u2026]`");for(let n=0;n<t.matches.length;n++){let{match:o,modes:a}=t.matches[n];if(!o.length)throw new Error(`Match ${n}: must declare \`match: [\u2026]\``);if(!a?.length)throw new Error(`Match ${n}: must declare \`modes: [\u2026]\``);let i=ye(o),s=!1;for(let u of Object.values(e))if(i(u.id)){s=!0;for(let l of a)u.mode?.[l]||r({message:`Token ${u.id}: missing required mode "${l}"`,node:u.source.node});s||r({message:`Match "${n}": no tokens matched ${JSON.stringify(o)}`,node:u.source.node})}}}},Cp=xp,M0="core/required-typography-properties",Ap={meta:{docs:{description:"Enforce typography tokens have required properties.",url:Je(M0)}},defaultOptions:{properties:[]},create({tokens:e,options:t,report:r}){if(!t)return;if(!t.properties.length)throw new Error('"properties" can\u2019t be empty');let n=t.ignore?ye(t.ignore):null;for(let o of Object.values(e))if(!n?.(o.id)&&o.$type==="typography"&&!o.aliasOf)for(let a of t.properties)!o.partialAliasOf?.[a]&&!(a in o.$value)&&r({message:`${o.id} missing required typographic property "${a}"`,node:o.source.node})}},$p=Ap;function Ep(){return{name:"@terrazzo/plugin-lint-core",lint(){return{[b0]:rp,[x0]:cp,[C0]:dp,[A0]:pp,[$0]:yp,[E0]:Dp,[F0]:Cp,[M0]:$p,[h0]:Zm,[g0]:ep}}}}var Fp=/\/*$/;function T0(e,{logger:t=new Wr,cwd:r}={}){let n=performance.now();r||t.error({group:"config",label:"core",message:"defineConfig() missing `cwd` for JS API"});let o=_n({},e);Mp({rawConfig:e,config:o,logger:t,cwd:r}),Tp({config:o,cwd:r,logger:t}),kp({config:o,logger:t}),wp({config:o,logger:t}),Sp({config:o,logger:t});for(let a of o.plugins)a.config?.({...o});return t.debug({group:"parser",label:"config",message:"Finish config validation",timing:performance.now()-n}),o}function Mp({rawConfig:e,config:t,logger:r,cwd:n}){if(e.tokens===void 0)t.tokens=["./tokens.json"];else if(typeof e.tokens=="string")t.tokens=[e.tokens];else if(Array.isArray(e.tokens)){t.tokens=[];for(let o of e.tokens)typeof o=="string"||o instanceof URL?t.tokens.push(o):r.error({group:"config",label:"tokens",message:`Expected array of strings, encountered ${JSON.stringify(o)}`})}else r.error({group:"config",label:"tokens",message:`Expected string or array of strings, received ${typeof e.tokens}`});for(let o=0;o<t.tokens.length;o++){let a=t.tokens[o];if(!(a instanceof URL))try{t.tokens[o]=new URL(a,n)}catch{r.error({group:"config",label:"tokens",message:`Invalid URL ${a}`})}}}function Tp({config:e,cwd:t,logger:r}){e.outDir instanceof URL||(typeof e.outDir>"u"?e.outDir=new URL("./tokens/",t):typeof e.outDir!="string"?r.error({group:"config",label:"outDir",message:`Expected string, received ${JSON.stringify(e.outDir)}`}):(e.outDir=new URL(e.outDir,t),e.outDir=new URL(e.outDir.href.replace(Fp,"/"))))}function kp({config:e,logger:t}){typeof e.plugins>"u"&&(e.plugins=[]),Array.isArray(e.plugins)||t.error({group:"config",label:"plugins",message:`Expected array of plugins, received ${JSON.stringify(e.plugins)}`}),e.plugins.push(Ep());for(let r=0;r<e.plugins.length;r++){let n=e.plugins[r];typeof n!="object"?t.error({group:"config",label:`plugin[${r}]`,message:`Expected output plugin, received ${JSON.stringify(n)}`}):n.name||t.error({group:"config",label:`plugin[${r}]`,message:'Missing "name"'})}e.plugins.sort((r,n)=>r.enforce==="pre"&&n.enforce!=="pre"?-1:r.enforce==="post"&&n.enforce!=="post"?1:0)}function wp({config:e,logger:t}){if(e.lint!==void 0)if((e.lint===null||typeof e.lint!="object"||Array.isArray(e.lint))&&t.error({group:"config",label:"lint",message:"Must be an object"}),e.lint.build||(e.lint.build={enabled:!0}),e.lint.build.enabled!==void 0?typeof e.lint.build.enabled!="boolean"&&t.error({group:"config",label:"lint \u203A build \u203A enabled",message:`Expected boolean, received ${JSON.stringify(e.lint.build)}`}):e.lint.build.enabled=!0,e.lint.rules===void 0)e.lint.rules={};else{if(e.lint.rules===null||typeof e.lint.rules!="object"||Array.isArray(e.lint.rules)){t.error({group:"config",label:"lint \u203A rules",message:`Expected object, received ${JSON.stringify(e.lint.rules)}`});return}let r=new Map;for(let n of e.plugins){if(typeof n.lint!="function")continue;let o=n.lint();if(!o||Array.isArray(o)||typeof o!="object"){t.error({group:"config",label:`plugin \u203A ${n.name}`,message:`Expected object for lint() received ${JSON.stringify(o)}`});continue}for(let a of Object.keys(o))r.get(a)&&r.get(a)!==n.name&&t.error({group:"config",label:`plugin \u203A ${n.name}`,message:`Duplicate rule ${a} already registered by plugin ${r.get(a)}`}),r.set(a,n.name)}for(let n of Object.keys(e.lint.rules)){r.has(n)||t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:"Unknown rule. Is the plugin installed?"});let o=e.lint.rules[n],a="off",i;typeof o=="number"||typeof o=="string"?a=o:Array.isArray(o)?(a=o[0],i=o[1]):o!==void 0&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Invalid eyntax. Expected \`string | number | Array\`, received ${JSON.stringify(o)}}`}),e.lint.rules[n]=[a,i],typeof a=="number"?(a!==0&&a!==1&&a!==2&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Invalid number ${a}. Specify 0 (off), 1 (warn), or 2 (error).`}),e.lint.rules[n][0]=["off","warn","error"][a]):typeof a=="string"?a!=="off"&&a!=="warn"&&a!=="error"&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Invalid string ${JSON.stringify(a)}. Specify "off", "warn", or "error".`}):o!==null&&t.error({group:"config",label:`lint \u203A rule \u203A ${n}`,message:`Expected string or number, received ${JSON.stringify(o)}`})}}else e.lint={build:{enabled:!0},rules:{}}}function Sp({config:e,logger:t}){e.ignore||(e.ignore={}),e.ignore.tokens??=[],e.ignore.deprecated??=!1,(!Array.isArray(e.ignore.tokens)||e.ignore.tokens.some(r=>typeof r!="string"))&&t.error({group:"config",label:"ignore \u203A tokens",message:`Expected array of strings, received ${JSON.stringify(e.ignore.tokens)}`}),typeof e.ignore.deprecated!="boolean"&&t.error({group:"config",label:"ignore \u203A deprecated",message:`Expected boolean, received ${JSON.stringify(e.ignore.deprecated)}`})}var Rp=new Intl.ListFormat("en-us");async function Bp({tokens:e,filename:t,config:r={},src:n,logger:o}){let{plugins:a=[],lint:i}=r,s=Object.keys(i?.rules??{});for(let u of a)if(typeof u.lint=="function"){let l=performance.now(),c=u.lint(),f=[],m=[];await Promise.all(Object.entries(c).map(async([d,g])=>{if(!(d in i.rules)||i.rules[d]===null)return;let[p,y]=i.rules[d];if(p==="off")return;await g.create({id:d,report(D){let C="";if(!D.message&&!D.messageId&&o.error({group:"lint",label:`${u.name} \u203A lint \u203A ${d}`,message:"Unable to report error: missing message or messageId"}),D.message?C=D.message:(D.messageId in(g.meta?.messages??{})||o.error({group:"lint",label:`${u.name} \u203A lint \u203A ${d}`,message:`messageId "${D.messageId}" does not exist`}),C=g.meta?.messages?.[D.messageId]??""),D.data&&typeof D.data=="object")for(let[F,v]of Object.entries(D.data)){let M=["string","number","boolean"].includes(typeof v)?String(v):JSON.stringify(v);C=C.replace(/{{[^}]+}}/g,$=>$.substring(2,$.length-2).trim()===F?M:$)}(p==="error"?f:m).push({group:"lint",label:d,message:C,filename:t,node:D.node,src:D.source?.src})},tokens:e,filename:t,src:n,options:_n(g.meta?.defaultOptions??[],g.defaultOptions??[],y)});let b=s.indexOf(d);b!==-1&&s.splice(b,1)}));for(let d of f)o.error({...d,continueOnError:!0});for(let d of m)o.warn(d);if(o.debug({group:"lint",label:u.name,message:"Finished",timing:performance.now()-l}),f.length){let d=[jr(f.length,"error","errors")];m.length&&d.push(jr(m.length,"warning","warnings")),o.error({group:"lint",message:`Lint failed with ${Rp.format(d)}`,label:u.name,continueOnError:!1})}}for(let u of s)o.warn({group:"lint",label:"lint",message:`Unknown lint rule "${u}"`})}var Ya=48,Op=49,k0=57,Ur=92,Pp=36,Ha=46,w0=34,S0=97,zp=101,Ka=102,R0=110,B0=116,Yu=117,Ku=120,_p=122,Na=45,Za=10,ja=43,Qa=13,Ip=39,Xr=47,Lp=32,Hp=9,Np=95,O0=65,jp=69,Xp=70,Up=78,Vp=88,qp=90,Wp=98,Gp=114,Jp=118,P0=8232,z0=8233,Yp=73,Zu=42,Kp=11,Zp=12,Qp=160,e1=65279,t1=160,r1=8192,o1=8193,n1=8194,a1=8195,i1=8196,s1=8197,u1=8198,l1=8199,c1=8200,f1=8201,d1=8202,m1=8239,p1=8287,h1=12288,g1="[",b1="]",y1="{",v1="}",D1=":",x1=",",C1="true",A1="false",$1="null",E1="NaN",F1="Infinity",Xa='"',Vr=new Map([[w0,Xa],[Ur,"\\"],[Xr,"/"],[Wp,"\b"],[R0,`
|
|
12
|
+
`],[Ka,"\f"],[Gp,"\r"],[B0," "]]),on=new Map([...Vr,[Jp,"\v"],[Ya,"\0"]]),M1=new Map([[Xa,Xa],["\\","\\"],["/","/"],["\b","b"],[`
|
|
13
|
+
`,"n"],["\f","f"],["\r","r"],[" ","t"]]),T1=new Map([...M1,["\v","v"],["\0","0"],["\u2028","u2028"],["\u2029","u2029"]]),rn=new Map([[g1,"LBracket"],[b1,"RBracket"],[y1,"LBrace"],[v1,"RBrace"],[D1,"Colon"],[x1,"Comma"],[C1,"Boolean"],[A1,"Boolean"],[$1,"Null"]]),tn=new Map([...rn,[E1,"Number"],[F1,"Number"]]),Ua=new Set([Za,Qa,P0,z0]),Lt=class extends Error{constructor(e,{line:t,column:r,offset:n}){super(`${e} (${t}:${r})`),this.line=t,this.column=r,this.offset=n}},k1=class extends Lt{constructor(e,t){super(`Unexpected character '${String.fromCharCode(e)}' found.`,t)}},w1=class extends Lt{constructor(e,t){super(`Unexpected identifier '${e}' found.`,t)}},lr=class extends Lt{constructor(e){super(`Unexpected token ${e.type} found.`,e.loc.start)}},_0=class extends Lt{constructor(e){super("Unexpected end of input found.",e)}},S1=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,R1=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,B1=13,Qu=10,O1=class{#n="";#u=1;#e=0;#t=-1;#i=!1;#s=-1;#r=!1;constructor(e){this.#n=e}#l(){this.#r||(this.#e++,this.#t++,this.#s=-1,this.#r=!0)}locate(){return{line:this.#u,column:this.#e,offset:this.#t}}next(){if(this.#t>=this.#n.length-1)return this.#l(),-1;this.#t++;let e=this.#n.charCodeAt(this.#t);return this.#i?(this.#u++,this.#e=1,this.#i=!1):this.#e++,e===B1?(this.#i=!0,this.peek()===Qu&&this.#t++):e===Qu&&(this.#i=!0),this.#s=e,e}peek(){return this.#t===this.#n.length-1?-1:this.#n.charCodeAt(this.#t+1)}match(e){return e(this.peek())?(this.next(),!0):!1}current(){return this.#s}},P1="Infinity",z1="NaN",_1=new Set([B0,Ka,R0]),Va=new Set([Lp,Hp,Za,Qa]),e0=new Set([...Va,Kp,Zp,Qp,P0,z0,e1,t1,r1,o1,n1,a1,i1,s1,u1,l1,c1,f1,d1,m1,p1,h1]),I1={mode:"json",ranges:!1},L1=new Set(["true","false","null"]),j={EOF:0,Number:1,String:2,Boolean:3,Null:4,NaN:5,Infinity:6,Identifier:7,Colon:20,LBrace:21,RBrace:22,LBracket:23,RBracket:24,Comma:25,LineComment:40,BlockComment:41};function at(e){return e>=Ya&&e<=k0}function La(e){return at(e)||e>=O0&&e<=Xp||e>=S0&&e<=Ka}function H1(e){return e>=Op&&e<=k0}function N1(e){return _1.has(e)}function I0(e){return at(e)||e===Ha||e===Na}function j1(e){return I0(e)||e===ja}function t0(e,t){return e===w0||t&&e===Ip}function qa(e){if(e===Pp||e===Np||e===Ur||e>=S0&&e<=_p||e>=O0&&e<=qp||e===8204||e===8205)return!0;let t=String.fromCharCode(e);return S1.test(t)}function r0(e){if(qa(e)||at(e))return!0;let t=String.fromCharCode(e);return R1.test(t)}var X1=class{#n;#u;#e;#t;#i;#s;#r;#l;#m;#p;#h;constructor(e,t){this.#u=e,this.#n={...I1,...t},this.#e=new O1(e),this.#t=this.#n.mode==="json5",this.#i=this.#n.mode!=="json",this.#s=this.#n.ranges,this.#l=this.#t?on.has.bind(on):Vr.has.bind(Vr),this.#m=this.#t?Ua.has.bind(Ua):()=>!1,this.#p=this.#t?r=>r===Ku:()=>!1,this.#h=this.#t?e0.has.bind(e0):Va.has.bind(Va)}#o(e,t=this.#e.locate()){throw new k1(e,t)}#v(e,t=this.#e.locate()){throw new w1(e,t)}#c(){throw new _0(this.#e.locate())}#a(e,t,r,n){let o=r.offset+t,a=this.#n.ranges?{range:[r.offset,o]}:void 0;return{type:e,loc:{start:r,end:n||{line:r.line,column:r.column+t,offset:o}},...a}}#f(e){let t="",r;for(let n=0;n<e;n++){if(r=this.#e.peek(),La(r)){this.#e.next(),t+=String.fromCharCode(r);continue}this.#o(r)}return t}#d(e){let t="";do{if(t+=String.fromCharCode(e),e===Ur){e=this.#e.next(),e!==Yu&&this.#o(e),t+=String.fromCharCode(e);let r=this.#f(4),n=parseInt(r,16);if(t.length===2&&!qa(n)){let o=this.#e.locate();this.#o(Ur,{line:o.line,column:o.column-5,offset:o.offset-5})}else if(!r0(n)){let o=this.#e.locate();this.#o(n,{line:o.line,column:o.column-5,offset:o.offset-5})}t+=r}if(e=this.#e.peek(),!r0(e))break;this.#e.next()}while(!0);return t}#g(e){let t=e,r=1;for(e=this.#e.peek();e!==-1&&e!==t;){if(this.#e.next(),r++,e===Ur)if(e=this.#e.peek(),this.#l(e)||this.#m(e))this.#e.next(),r++;else if(e===Yu){this.#e.next(),r++;let n=this.#f(4);r+=n.length}else if(this.#p(e)){this.#e.next(),r++;let n=this.#f(2);r+=n.length}else this.#t?(this.#e.next(),r++):this.#o(e);e=this.#e.peek()}return e===-1&&(this.#e.next(),this.#c()),this.#e.next(),r++,r}#b(e){let t=1;if(e===Na||this.#t&&e===ja){if(e=this.#e.peek(),this.#t&&(e===Yp||e===Up)){this.#e.next();let r=this.#d(e);return r!==P1&&r!==z1&&this.#o(e),t+r.length}at(e)||this.#o(e),this.#e.next(),t++}if(e===Ya)if(e=this.#e.peek(),this.#t&&(e===Ku||e===Vp)){this.#e.next(),t++,e=this.#e.peek(),La(e)||(this.#e.next(),this.#o(e));do this.#e.next(),t++,e=this.#e.peek();while(La(e))}else at(e)&&this.#o(e);else if(!this.#t||e!==Ha)for(H1(e)||this.#o(e),e=this.#e.peek();at(e);)this.#e.next(),t++,e=this.#e.peek();if(e===Ha){let r=-1;for(this.#e.next(),t++,r++,e=this.#e.peek();at(e);)this.#e.next(),t++,r++,e=this.#e.peek();!this.#t&&r===0&&(this.#e.next(),e?this.#o(e):this.#c())}if(e===zp||e===jp)for(this.#e.next(),t++,e=this.#e.peek(),(e===ja||e===Na)&&(this.#e.next(),t++,e=this.#e.peek()),e===-1&&(this.#e.next(),this.#c()),at(e)||(this.#e.next(),this.#o(e));at(e);)this.#e.next(),t++,e=this.#e.peek();return t}#y(e){let t=1;if(e=this.#e.peek(),e===Xr){do this.#e.next(),t+=1,e=this.#e.peek();while(e>-1&&e!==Qa&&e!==Za);return{length:t,multiline:!1}}if(e===Zu){for(this.#e.next(),t+=1;e>-1;)if(e=this.#e.peek(),e===Zu){if(this.#e.next(),t+=1,e=this.#e.peek(),e===Xr)return this.#e.next(),t+=1,{length:t,multiline:!0}}else this.#e.next(),t+=1;this.#e.next(),this.#c()}this.#e.next(),this.#o(e)}next(){let e=this.#e.next();for(;this.#h(e);)e=this.#e.next();if(e===-1)return j.EOF;let t=this.#e.locate(),r=String.fromCharCode(e);if(this.#t)if(tn.has(r))this.#r=this.#a(tn.get(r),1,t);else if(qa(e)){let n=this.#d(e);tn.has(n)?this.#r=this.#a(tn.get(n),n.length,t):this.#r=this.#a("Identifier",n.length,t)}else if(j1(e)){let n=this.#b(e);this.#r=this.#a("Number",n,t)}else if(t0(e,this.#t)){let n=this.#g(e),o=this.#e.locate();this.#r=this.#a("String",n,t,{line:o.line,column:o.column+1,offset:o.offset+1})}else if(e===Xr&&this.#i){let n=this.#y(e),o=this.#e.locate();this.#r=this.#a(n.multiline?"BlockComment":"LineComment",n.length,t,{line:o.line,column:o.column+1,offset:o.offset+1})}else this.#o(e);else if(rn.has(r))this.#r=this.#a(rn.get(r),1,t);else if(N1(e)){let n=this.#d(e);L1.has(n)||this.#v(n,t),this.#r=this.#a(rn.get(n),n.length,t)}else if(I0(e)){let n=this.#b(e);this.#r=this.#a("Number",n,t)}else if(t0(e,this.#t)){let n=this.#g(e);this.#r=this.#a("String",n,t)}else if(e===Xr&&this.#i){let n=this.#y(e),o=this.#e.locate();this.#r=this.#a(n.multiline?"BlockComment":"LineComment",n.length,t,{line:o.line,column:o.column+1,offset:o.offset+1})}else this.#o(e);return j[this.#r.type]}get token(){return this.#r}},Be={document(e,t={}){return{type:"Document",body:e,loc:t.loc,...t}},string(e,t={}){return{type:"String",value:e,loc:t.loc,...t}},number(e,t={}){return{type:"Number",value:e,loc:t.loc,...t}},boolean(e,t={}){return{type:"Boolean",value:e,loc:t.loc,...t}},null(e={}){return{type:"Null",loc:e.loc,...e}},array(e,t={}){return{type:"Array",elements:e,loc:t.loc,...t}},element(e,t={}){return{type:"Element",value:e,loc:t.loc,...t}},object(e,t={}){return{type:"Object",members:e,loc:t.loc,...t}},member(e,t,r={}){return{type:"Member",name:e,value:t,loc:r.loc,...r}},identifier(e,t={}){return{type:"Identifier",name:e,loc:t.loc,...t}},nan(e="",t={}){return{type:"NaN",sign:e,loc:t.loc,...t}},infinity(e="",t={}){return{type:"Infinity",sign:e,loc:t.loc,...t}}},U1={mode:"json",ranges:!1,tokens:!1,allowTrailingCommas:!1},V1=/\\u[\da-fA-F]{4}/gu;function q1(e){return e.replace(V1,t=>String.fromCharCode(parseInt(t.slice(2),16)))}function W1(e){let t=1,r=1;for(let n=0;n<e.length;n++){let o=e[n];o===`
|
|
14
14
|
`?(t++,r=1):o==="\r"?(e[n+1]===`
|
|
15
|
-
`&&n++,t++,r=1):r++}return{line:t,column:r,offset:e.length}}function
|
|
16
|
-
`&&a++;else if(r)n+=i,a=o+2;else throw new Lt(`Invalid escape \\${i}.`,{line:t.loc.start.line,column:t.loc.start.column+o,offset:t.loc.start.offset+o});o=e.indexOf("\\",a)}return n+=e.slice(a),n}function
|
|
17
|
-
`:"",o=t.repeat(r),a=t.repeat(r+1);return`[${n}${e.elements.map(i=>`${a}${qr(i.value,t,r+1)}`).join(`,${n}`)}${n}${o}]`}function
|
|
18
|
-
`:"",o=t.repeat(r),a=t.repeat(r+1);return`{${n}${e.members.map(i=>`${a}${
|
|
15
|
+
`&&n++,t++,r=1):r++}return{line:t,column:r,offset:e.length}}function G1(e,t,r=!1){let n="",o=e.indexOf("\\"),a=0;for(;o>=0;){n+=e.slice(a,o);let i=e.charAt(o+1),s=i.charCodeAt(0);if(r&&on.has(s))n+=on.get(s),a=o+2;else if(Vr.has(s))n+=Vr.get(s),a=o+2;else if(i==="u"){let u=e.slice(o+2,o+6);if(u.length<4||/[^0-9a-f]/i.test(u))throw new Lt(`Invalid unicode escape \\u${u}.`,{line:t.loc.start.line,column:t.loc.start.column+o,offset:t.loc.start.offset+o});n+=String.fromCharCode(parseInt(u,16)),a=o+6}else if(r&&i==="x"){let u=e.slice(o+2,o+4);if(u.length<2||/[^0-9a-f]/i.test(u))throw new Lt(`Invalid hex escape \\x${u}.`,{line:t.loc.start.line,column:t.loc.start.column+o,offset:t.loc.start.offset+o});n+=String.fromCharCode(parseInt(u,16)),a=o+4}else if(r&&Ua.has(s))a=o+2,i==="\r"&&e.charAt(a)===`
|
|
16
|
+
`&&a++;else if(r)n+=i,a=o+2;else throw new Lt(`Invalid escape \\${i}.`,{line:t.loc.start.line,column:t.loc.start.column+o,offset:t.loc.start.offset+o});o=e.indexOf("\\",a)}return n+=e.slice(a),n}function J1(e,t,r=!1){switch(t.type){case"Boolean":return e==="true";case"Number":if(r){if(e.charCodeAt(0)===45)return-Number(e.slice(1));if(e.charCodeAt(0)===43)return Number(e.slice(1))}return Number(e);case"String":return G1(e.slice(1,-1),t,r);default:throw new TypeError(`Unknown token type "${t.type}.`)}}function Y1(e,t){t=Object.freeze({...U1,...t});let r=[],n=new X1(e,{mode:t.mode,ranges:t.ranges}),o=t.mode==="json5",a=t.allowTrailingCommas||o;function i(){let v=n.next();return v&&t.tokens&&r.push(n.token),v}function s(){let v=n.next();return v&&t.tokens&&r.push(n.token),v>=j.LineComment?s():v}let u=t.mode==="json"?i:s;function l(v,M){if(v!==M)throw new lr(n.token)}function c(v,M){if(!M.includes(v))throw new lr(n.token)}function f(v,M){return t.ranges?{range:[v.offset,M.offset]}:void 0}function m(v){let M=n.token,$=f(M.loc.start,M.loc.end),k=J1(e.slice(M.loc.start.offset,M.loc.end.offset),M,o),R={loc:{start:{...M.loc.start},end:{...M.loc.end}},...$};switch(v){case j.String:return Be.string(k,R);case j.Number:return Be.number(k,R);case j.Boolean:return Be.boolean(k,R);default:throw new TypeError(`Unknown token type ${M.type}.`)}}function d(v){let M=f(v.loc.start,v.loc.end),$=e.slice(v.loc.start.offset,v.loc.end.offset),k={loc:{start:{...v.loc.start},end:{...v.loc.end}},...M};if(v.type!=="Identifier"){let R="";return($[0]==="+"||$[0]==="-")&&(R=$[0]),Be[$.includes("NaN")?"nan":"infinity"](R,k)}return Be.identifier(q1($),k)}function g(v){let M=f(v.loc.start,v.loc.end);return Be.null({loc:{start:{...v.loc.start},end:{...v.loc.end}},...M})}function p(v){o?c(v,[j.String,j.Identifier,j.Number]):l(v,j.String);let M=n.token;if(o&&v===j.Number&&/[+\-0-9]/.test(e[M.loc.start.offset]))throw new lr(M);let $=v===j.String?m(v):d(M);if(o&&($.type==="NaN"||$.type==="Infinity")){if($.sign!=="")throw new lr(n.token);$=Be.identifier($.type,{loc:$.loc,...f($.loc.start,$.loc.end)})}v=u(),l(v,j.Colon);let k=D(),R=f($.loc.start,k.loc.end);return Be.member($,k,{loc:{start:{...$.loc.start},end:{...k.loc.end}},...R})}function y(v){l(v,j.LBrace);let M=n.token,$=[],k=u();if(k!==j.RBrace)do{if($.push(p(k)),k=u(),!k)throw new _0($[$.length-1].loc.end);if(k===j.Comma){if(k=u(),a&&k===j.RBrace)break}else break}while(k);l(k,j.RBrace);let R=n.token,I=f(M.loc.start,R.loc.end);return Be.object($,{loc:{start:{...M.loc.start},end:{...R.loc.end}},...I})}function b(v){l(v,j.LBracket);let M=n.token,$=[],k=u();if(k!==j.RBracket)do{let X=D(k);if($.push(Be.element(X,{loc:X.loc})),k=u(),k===j.Comma){if(k=u(),a&&k===j.RBracket)break}else break}while(k);l(k,j.RBracket);let R=n.token,I=f(M.loc.start,R.loc.end);return Be.array($,{loc:{start:{...M.loc.start},end:{...R.loc.end}},...I})}function D(v){v=v??u();let M=n.token;switch(v){case j.String:case j.Boolean:return m(v);case j.Number:if(o){let $=e.slice(M.loc.start.offset,M.loc.end.offset);if(($[0]==="+"||$[0]==="-")&&($=$.slice(1)),$==="NaN"||$==="Infinity")return d(M)}return m(v);case j.Null:return g(M);case j.LBrace:return y(v);case j.LBracket:return b(v);default:throw new lr(M)}}let C=D();if(u())throw new lr(n.token);let F={loc:{start:{line:1,column:1,offset:0},end:{...W1(e)}}};return t.tokens&&(F.tokens=r),t.ranges&&(F.range=[F.loc.start.offset,F.loc.end.offset]),Be.document(C,F)}function He(e){switch(e.type){case"String":return e.value;case"Number":return e.value;case"Boolean":return e.value;case"Null":return null;case"NaN":return NaN;case"Infinity":return e.sign==="-"?-1/0:1/0;case"Identifier":return e.name;case"Array":return e.elements.map(t=>He(t.value));case"Object":{let t={};return e.members.forEach(r=>{t[He(r.name)]=He(r.value)}),t}case"Document":return He(e.body);case"Element":throw new Error("Cannot evaluate array element outside of an array.");case"Member":throw new Error("Cannot evaluate object member outside of an object.");default:throw new Error(`Unknown node type ${e.type}.`)}}function K1(e){return e.value?"true":"false"}function Z1(){return"null"}function Q1(e){return e.value.toString()}function eh(){return"NaN"}function th(e){return e.sign+"Infinity"}function rh(e){let t='"';for(let r of e.value){let n=T1.get(r);if(n){t+="\\"+n;continue}if(r==='"'){t+='\\"';continue}if(r<" "||r==="\x7F"){let o=r.codePointAt(0).toString(16).toUpperCase();t+=`\\u${"0000".substring(o.length)}${o}`;continue}t+=r}return t+'"'}function oh(e){return e.name}function nh(e,t,r){let n=t?`
|
|
17
|
+
`:"",o=t.repeat(r),a=t.repeat(r+1);return`[${n}${e.elements.map(i=>`${a}${qr(i.value,t,r+1)}`).join(`,${n}`)}${n}${o}]`}function ah(e,t,r){let n=t?" ":"";return`${qr(e.name,t,r)}:${n}${qr(e.value,t,r+1)}`}function ih(e,t,r){let n=t?`
|
|
18
|
+
`:"",o=t.repeat(r),a=t.repeat(r+1);return`{${n}${e.members.map(i=>`${a}${ah(i,t,r)}`).join(`,${n}`)}${n}${o}}`}function qr(e,t,r){switch(e.type){case"String":return rh(e);case"Number":return Q1(e);case"Boolean":return K1(e);case"Null":return Z1();case"NaN":return eh();case"Infinity":return th(e);case"Identifier":return oh(e);case"Array":return nh(e,t,r);case"Object":return ih(e,t,r);case"Document":return qr(e.body,t,r);default:throw new TypeError(`Unknown node type: ${e.type}`)}}function de(e,{indent:t=0}={}){return qr(e," ".repeat(t),0)}var sh={Document:["body"],Object:["members"],Member:["name","value"],Element:["value"],Array:["elements"],String:[],Number:[],Boolean:[],Null:[],Identifier:[],NaN:[],Infinity:[]};function uh(e){return!!e&&typeof e=="object"&&"type"in e&&typeof e.type=="string"}function Y(e){let t={};if(e.type!=="Object")return t;for(let r=0;r<e.members.length;r++){let n=e.members[r];n.name.type==="String"&&(t[n.name.value]={...n.value,index:r})}return t}function o0(e,t=[]){e.type==="Object"&&e.members.push(...t)}function lh(e,t){e.members=t.type==="Document"&&t.body?.members||t.members}function ch(e,t){function r(n,o,a=[]){let i=[...a];if(n.type==="Member"){let{name:u}=n;i.push("value"in u?u.value:String(u))}t.enter?.(n,o,i);let s=sh[n.type];for(let u of s??[]){let l=n[u];if(l)if(Array.isArray(l))for(let c=0;c<l.length;c++)r(l[c],n,u==="elements"?[...i,String(c)]:i);else uh(l)&&r(l,n,i)}t.exit?.(n,o,i)}r(e,void 0,[])}function fh(e){return typeof e=="string"&&e.trim().startsWith("{")}function n0(e,{continueOnError:t,filename:r,logger:n,yamlToMomoa:o}){let a="";typeof e=="string"&&(a=e);let i={};if(typeof e=="string"&&!fh(e))if(o)try{i=o(e)}catch(s){n.error({group:"parser",label:"json",message:String(s),filename:r,src:e,continueOnError:t})}else n.error({group:"parser",label:"yaml",message:`Install \`yaml-to-momoa\` package to parse YAML, and pass in as option, e.g.:
|
|
19
19
|
|
|
20
20
|
import { parse } from '@terrazzo/parser';
|
|
21
21
|
import yamlToMomoa from 'yaml-to-momoa';
|
|
22
22
|
|
|
23
|
-
parse(yamlString, { yamlToMomoa });`,continueOnError:!1});else i=Wa(e);return a||(a=de(i,{indent:2})),{src:a,document:i}}function Wa(e,t){return J1(typeof e=="string"?e:JSON.stringify(e,void 0,2),{mode:"jsonc",ranges:!0,tokens:!0,...t})}function fh(e,t){if(e.mode["."]??={},e.mode["."].$value=e.$value,e.mode["."].originalValue??=e.originalValue.$value,e.mode["."].source??=e.source,typeof e.$value=="string"&&Te(e.$value)){let{aliasChain:r,resolvedToken:n}=xt(e.$value,{...t,token:e});e.aliasOf=n.id,e.aliasChain=r,e.$value=n.$value}for(let r of Object.keys(e.mode)){let n=e.mode[r].$value;if(typeof n=="string"&&Te(n)){let a=[e.$type],{aliasChain:i,resolvedToken:s}=xt(n,{...t,token:e,expectedType:a,node:e.mode[r].source?.node||t.node});e.mode[r].aliasOf=s.id,e.mode[r].aliasChain=i,e.mode[r].$value=s.$value;continue}if(typeof e.$value=="object"&&typeof e.mode[r].$value=="object"&&!Array.isArray(e.$value))for(let[a,i]of Object.entries(e.$value))a in e.mode[r].$value||(e.mode[r].$value[a]=i);let o=Y(t.node).$value||t.node;switch(e.$type){case"border":mh(e,r,{...t,node:o});break;case"gradient":ph(e,r,{...t,node:o});break;case"shadow":hh(e,r,{...t,node:o});break;case"strokeStyle":gh(e,r,{...t,node:o});break;case"transition":bh(e,r,{...t,node:o});break;case"typography":yh(e,r,{...t,node:o});break}}}var dh=new Intl.ListFormat("en-us",{type:"disjunction"});function xt(e,t){let r={group:"parser",label:"alias",node:t?.node,filename:t.filename,src:t.src},{logger:n,token:o,tokensSet:a}=t,{token:i,chain:s}=L0(we(e),t);a[o.id].$type||(a[o.id].$type=i.$type);let u=[...t.expectedType??[]];if(o.$type&&!u?.length&&u.push(o.$type),u?.length&&!u.includes(i.$type)&&n.error({...r,message:`Invalid alias: expected $type: ${dh.format(u)}, received $type: ${i.$type}.`,node:t.node?.type==="Object"&&Y(t.node).$value||r.node}),s?.length&&i){let l=!1;for(let c of s)c!==i.id&&!i.aliasedBy?.includes(c)&&(i.aliasedBy??=[],i.aliasedBy.push(c),l=!0),o&&!i.aliasedBy?.includes(o.id)&&(i.aliasedBy??=[],i.aliasedBy.push(o.id),l=!0);l&&i.aliasedBy.sort((c,f)=>c.localeCompare(f,"en-us",{numeric:!0}))}return{resolvedToken:i,aliasChain:s}}function L0(e,{scanned:t=[],...r}){let{logger:n,filename:o,src:a,node:i,tokensSet:s}=r,u={group:"parser",label:"alias",filename:o,src:a,node:i},l=we(e);s[l]||n.error({...u,message:`Alias {${e}} not found.`}),t.includes(l)&&n.error({...u,message:`Circular alias detected from ${e}.`});let c=s[l];return t.push(l),typeof c.originalValue.$value!="string"||!Te(c.originalValue.$value)?{token:c,chain:t}:L0(c.originalValue.$value,{...r,scanned:t})}function mh(e,t,r){for(let[n,o]of Object.entries(e.mode[t].$value))if(typeof o=="string"&&Te(o)){e.mode[t].partialAliasOf??={};let a=Y(r.node)[n]||r.node,{resolvedToken:i}=xt(o,{...r,token:e,expectedType:{color:["color"],width:["dimension"],style:["strokeStyle"]}[n],node:a});e.mode[t].partialAliasOf[n]=we(o),t==="."&&(e.partialAliasOf??={},e.partialAliasOf[n]=we(o)),e.mode[t].$value[n]=i.$value}}function ph(e,t,r){for(let n=0;n<e.mode[t].$value.length;n++){let o=e.mode[t].$value[n];for(let[a,i]of Object.entries(o))if(typeof i=="string"&&Te(i)){e.mode[t].partialAliasOf??=[],e.mode[t].partialAliasOf[n]??={};let s={color:["color"],position:["number"]}[a],u=r.node?.elements?.[n]?.value||r.node;u.type==="Object"&&(u=Y(u)[a]||u);let{resolvedToken:l}=xt(i,{...r,token:e,expectedType:s,node:u});e.mode[t].partialAliasOf[n][a]=we(i),t==="."&&(e.partialAliasOf??=[],e.partialAliasOf[n]??={},e.partialAliasOf[n][a]=we(i)),o[a]=l.$value}}}function hh(e,t,r){Array.isArray(e.mode[t].$value)||(e.mode[t].$value=[e.mode[t].$value]);for(let n=0;n<e.mode[t].$value.length;n++){let o=e.mode[t].$value[n];for(let[a,i]of Object.entries(o))if(typeof i=="string"&&Te(i)){e.mode[t].partialAliasOf??=[],e.mode[t].partialAliasOf[n]??={};let s={offsetX:["dimension"],offsetY:["dimension"],blur:["dimension"],spread:["dimension"],color:["color"],inset:["boolean"]}[a],u=r.node?.elements?.[n]||r.node;u.type==="Object"&&(u=Y(u)[a]||u);let{resolvedToken:l}=xt(i,{...r,token:e,expectedType:s,node:u});e.mode[t].partialAliasOf[n][a]=we(i),t==="."&&(e.partialAliasOf??=[],e.partialAliasOf[n]??={},e.partialAliasOf[n][a]=we(i)),o[a]=l.$value}}}function gh(e,t,r){if(!(typeof e.mode[t].$value!="object"||!("dashArray"in e.mode[t].$value)))for(let n=0;n<e.mode[t].$value.dashArray.length;n++){let o=e.mode[t].$value.dashArray[n];if(typeof o=="string"&&Te(o)){let a=Y(r.node).dashArray||r.node;a.type==="Array"&&(a=a?.elements?.[n]?.value||a);let{resolvedToken:i}=xt(o,{...r,token:e,expectedType:["dimension"],node:a});e.mode[t].$value.dashArray[n]=i.$value}}}function bh(e,t,r){for(let[n,o]of Object.entries(e.mode[t].$value))if(typeof o=="string"&&Te(o)){e.mode[t].partialAliasOf??={};let a={duration:["duration"],delay:["duration"],timingFunction:["cubicBezier"]}[n],i=Y(r.node)[n]||r.node,{resolvedToken:s}=xt(o,{...r,token:e,expectedType:a,node:i});e.mode[t].partialAliasOf[n]=we(o),t==="."&&(e.partialAliasOf??={},e.partialAliasOf[n]=we(o)),e.mode[t].$value[n]=s.$value}}function yh(e,t,r){for(let[n,o]of Object.entries(e.mode[t].$value))if(typeof o=="string"&&Te(o)){e.partialAliasOf??={},e.mode[t].partialAliasOf??={};let a={fontFamily:["fontFamily"],fontSize:["dimension"],fontWeight:["fontWeight"],letterSpacing:["dimension"],lineHeight:["dimension","number"]}[n]||["string"],i=Y(r.node)[n]||r.node,{resolvedToken:s}=xt(o,{...r,token:e,expectedType:a,node:i});e.mode[t].partialAliasOf[n]=we(o),t==="."&&(e.partialAliasOf[n]=we(o)),e.mode[t].$value[n]=s.$value}}var a0={thin:100,hairline:100,"extra-light":200,"ultra-light":200,light:300,normal:400,regular:400,book:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,"extra-bold":800,"ultra-bold":800,black:900,heavy:900,"extra-black":950,"ultra-black":950},i0=/(-?\d*\.?\d+)(.*)/;function ne(e){if(typeof e.$value=="string"&&Te(e.$value))return e.$value;switch(e.$type){case"boolean":return!!e.$value;case"border":return typeof e.$value=="string"?e.$value:{color:ne({$type:"color",$value:e.$value.color??"#000000"}),style:ne({$type:"strokeStyle",$value:e.$value.style??"solid"}),width:ne({$type:"dimension",$value:e.$value.width})};case"color":{if(typeof e.$value=="string")return za(e.$value);let t={colorSpace:e.$value.colorSpace,components:e.$value.components??e.$value.channels,alpha:e.$value.alpha??1};return"hex"in e.$value&&(t.hex=e.$value.hex),t}case"cubicBezier":return typeof e.$value=="string"?e.$value:e.$value.map(t=>typeof t=="number"?ne({$type:"number",$value:t}):t);case"dimension":if(e.$value===0)return{value:0,unit:"px"};if(typeof e.$value=="string"){let t=e.$value.match(i0);return{value:Number.parseFloat(t?.[1]||e.$value),unit:t?.[2]||"px"}}return e.$value;case"duration":if(e.$value===0)return{value:0,unit:"ms"};if(typeof e.$value=="string"){let t=e.$value.match(i0);return{value:Number.parseFloat(t?.[1]||e.$value),unit:t?.[2]||"ms"}}return e.$value;case"fontFamily":return Array.isArray(e.$value)?e.$value:[e.$value];case"fontWeight":return typeof e.$value=="string"&&a0[e.$value]?a0[e.$value]:Math.min(999,Math.max(1,typeof e.$value=="string"?Number.parseInt(e.$value):e.$value));case"gradient":{if(typeof e.$value=="string")return e.$value;let t=[];for(let r=0;r<e.$value.length;r++){let n=structuredClone(e.$value[r]);n.color=ne({$type:"color",$value:n.color}),n.position===void 0&&(n.position=r/(e.$value.length-1)),t.push(n)}return t}case"number":return typeof e.$value=="number"?e.$value:Number.parseFloat(e.$value);case"shadow":return typeof e.$value=="string"?e.$value:(Array.isArray(e.$value)?e.$value:[e.$value]).map(t=>({color:ne({$type:"color",$value:t.color}),offsetX:ne({$type:"dimension",$value:t.offsetX??{value:0,unit:"px"}}),offsetY:ne({$type:"dimension",$value:t.offsetY??{value:0,unit:"px"}}),blur:ne({$type:"dimension",$value:t.blur??{value:0,unit:"px"}}),spread:ne({$type:"dimension",$value:t.spread??{value:0,unit:"px"}}),inset:t.inset===!0}));case"strokeStyle":return e.$value;case"string":return String(e.$value);case"transition":return typeof e.$value=="string"?e.$value:{duration:ne({$type:"duration",$value:e.$value.duration??0}),delay:ne({$type:"duration",$value:e.$value.delay??0}),timingFunction:ne({$type:"cubicBezier",$value:e.$value.timingFunction})};case"typography":{if(typeof e.$value=="string")return e.$value;let t={};for(let[r,n]of Object.entries(e.$value))switch(r){case"fontFamily":t[r]=ne({$type:"fontFamily",$value:n});break;case"fontSize":case"letterSpacing":t[r]=ne({$type:"dimension",$value:n});break;case"lineHeight":t[r]=ne({$type:typeof e.$value=="number"?"number":"dimension",$value:n});break;default:t[r]=n;break}return t}default:return e.$value}}var Ga=new Intl.ListFormat("en-us",{type:"disjunction"}),vh=new Set(["adobe-rgb","display-p3","hsl","hwb","lab","lch","oklab","oklch","prophoto","rec2020","srgb","srgb-linear","xyz","xyz-d50","xyz-d65"]),s0=new Set(["thin","hairline","extra-light","ultra-light","light","normal","regular","book","medium","semi-bold","demi-bold","bold","extra-bold","ultra-bold","black","heavy","extra-black","ultra-black"]),u0=new Set(["solid","dashed","dotted","double","groove","ridge","outset","inset"]),l0=new Set(["round","butt","square"]);function ei(e){return e?.type==="String"?e.value.startsWith("{"):!1}function cr(e,t,r,{filename:n,src:o,logger:a}){let i=Y(e);for(let[s,u]of Object.entries(t)){let{validator:l,required:c}=u;if(!i[s]){c&&a.error({group:"parser",label:"validate",message:`Missing required property "${s}"`,filename:n,node:e,src:o});continue}let f=i[s];ei(f)?ti(f,r,{filename:n,src:o,logger:a}):l(f,r,{filename:n,src:o,logger:a})}}function ti(e,t,{filename:r,src:n,logger:o}){(e.type!=="String"||!Te(e.value))&&o.error({group:"parser",label:"validate",message:`Invalid alias: ${de(e)}`,filename:r,node:e,src:n})}function Dh(e,t,{filename:r,src:n,logger:o}){e.type!=="Object"?o.error({group:"parser",label:"validate",message:`Expected object, received ${e.type}`,filename:r,node:e,src:n}):cr(e,{color:{validator:nn,required:!0},style:{validator:N0,required:!0},width:{validator:Dt,required:!0}},t,{filename:r,src:n,logger:o})}function nn(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="String")e.value===""&&o.error({...a,message:"Expected color, received empty string"});else if(e.type==="Object"){let i=e.members.findIndex(s=>s.name.type==="String"&&s.name.value==="channels");i!==-1&&(o.warn({...a,message:'"channels" is deprecated; rename "channels" to "components"'}),e.members[i].name.value="components"),cr(e,{colorSpace:{validator:s=>{s.type!=="String"&&o.error({...a,message:`Expected string, received ${de(s)}`,node:s}),vh.has(s.value)||o.error({...a,message:`Unsupported colorspace ${de(s)}`,node:s})},required:!0},components:{validator:s=>{if(s.type!=="Array")o.error({...a,message:`Expected array, received ${de(s)}`,node:s});else{s.elements?.length!==3&&o.error({...a,message:`Expected 3 components, received ${s.elements?.length??0}`,node:s});for(let u of s.elements)u.value.type!=="Number"&&o.error({...a,message:`Expected number, received ${de(u.value)}`,node:u})}},required:!0},hex:{validator:s=>{(s.type!=="String"||s.value.length===6||s.value.length===8||!/^#[a-f0-9]{3,8}$/i.test(s.value))&&o.error({...a,message:`Invalid hex color ${de(s)}`,node:s})}},alpha:{validator:ri}},t,{filename:r,src:n,logger:o})}else o.error({...a,message:`Expected object, received ${e.type}`,node:e})}function H0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};e.type!=="Array"?o.error({...a,message:`Expected array of numbers, received ${de(e)}`}):e.elements.every(i=>i.value.type==="Number")?e.elements.length!==4&&o.error({...a,message:`Expected an array of 4 numbers, received ${e.elements.length}`}):o.error({...a,message:"Expected an array of 4 numbers, received some non-numbers"})}function Dt(e,t,{filename:r,src:n,logger:o}){if(e.type==="Number"&&e.value===0)return;let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="Object"){let{value:u,unit:l}=Y(e);u||o.error({...a,message:'Missing required property "value".'}),l||o.error({...a,message:'Missing required property "unit".'}),u.type!=="Number"&&o.error({...a,message:`Expected number, received ${u.type}`,node:u}),["px","em","rem"].includes(l.value)||o.error({...a,message:`Expected unit "px", "em", or "rem", received ${de(l)}`,node:l});return}e.type!=="String"&&o.error({...a,message:`Expected string, received ${e.type}`});let i=e.value.match(/^-?[0-9.]+/)?.[0],s=e.value.replace(i,"");e.value===""?o.error({...a,message:"Expected dimension, received empty string"}):["px","em","rem"].includes(s)?Number.isFinite(Number.parseFloat(i))||o.error({...a,message:`Expected dimension with units, received ${de(e)}`}):o.error({...a,message:`Expected unit "px", "em", or "rem", received ${JSON.stringify(s||e.value)}`})}function Ja(e,t,{filename:r,src:n,logger:o}){if(e.type==="Number"&&e.value===0)return;let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="Object"){let{value:u,unit:l}=Y(e);u||o.error({...a,message:'Missing required property "value".'}),l||o.error({...a,message:'Missing required property "unit".'}),u?.type!=="Number"&&o.error({...a,message:`Expected number, received ${u?.type}`,node:u}),["ms","s"].includes(l.value)||o.error({...a,message:`Expected unit "ms" or "s", received ${de(l)}`,node:l});return}e.type!=="String"&&o.error({...a,message:`Expected string, received ${e.type}`});let i=e.value.match(/^-?[0-9.]+/)?.[0],s=e.value.replace(i,"");e.value===""?o.error({...a,message:"Expected duration, received empty string"}):["ms","s"].includes(s)?Number.isFinite(Number.parseFloat(i))||o.error({...a,message:`Expected duration with units, received ${de(e)}`}):o.error({...a,message:`Expected unit "ms" or "s", received ${JSON.stringify(s||e.value)}`})}function c0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};e.type!=="String"&&e.type!=="Array"&&o.error({...a,message:`Expected string or array of strings, received ${e.type}`}),e.type==="String"&&e.value===""&&o.error({...a,message:"Expected font family name, received empty string"}),e.type==="Array"&&!e.elements.every(i=>i.value.type==="String"&&i.value.value!=="")&&o.error({...a,message:"Expected an array of strings, received some non-strings or empty strings"})}function f0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};e.type!=="String"&&e.type!=="Number"&&o.error({...a,message:`Expected a font weight name or number 0\u20131000, received ${e.type}`}),e.type==="String"&&!s0.has(e.value)&&o.error({...a,message:`Unknown font weight ${de(e)}. Expected one of: ${Ga.format([...s0])}.`}),e.type==="Number"&&(e.value<0||e.value>1e3)&&o.error({...a,message:`Expected number 0\u20131000, received ${de(e)}`})}function xh(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type!=="Array")o.error({...a,message:`Expected array of gradient stops, received ${e.type}`});else for(let i=0;i<e.elements.length;i++){let s=e.elements[i];if(s.value.type!=="Object"){o.error({...a,message:`Stop #${i+1}: Expected gradient stop, received ${s.value.type}`,node:s});break}cr(s.value,{color:{validator:nn,required:!0},position:{validator:ri,required:!0}},s,{filename:r,src:n,logger:o})}}function ri(e,t,{filename:r,src:n,logger:o}){e.type!=="Number"&&o.error({group:"parser",label:"validate",message:`Expected number, received ${e.type}`,filename:r,node:e,src:n})}function Ch(e,t,{filename:r,src:n,logger:o}){e.type!=="Boolean"&&o.error({group:"parser",label:"validate",message:`Expected boolean, received ${e.type}`,filename:r,node:e,src:n})}function d0(e,t,{filename:r,src:n,logger:o}){e.type!=="Object"?o.error({group:"parser",label:"validate",message:`Expected Object, received ${e.type}`,filename:r,node:e,src:n}):cr(e,{color:{validator:nn,required:!0},offsetX:{validator:Dt,required:!0},offsetY:{validator:Dt,required:!0},blur:{validator:Dt},spread:{validator:Dt},inset:{validator:Ch}},t,{filename:r,src:n,logger:o})}function N0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="String")u0.has(e.value)||o.error({...a,message:`Unknown stroke style ${de(e)}. Expected one of: ${Ga.format([...u0])}.`});else if(e.type==="Object"){let i=Y(e);for(let l of["dashArray","lineCap"])i[l]||o.error({...a,message:`Missing required property "${l}"`});let{lineCap:s,dashArray:u}=i;if((s?.type!=="String"||!l0.has(s.value))&&o.error({...a,message:`Unknown lineCap value ${de(s)}. Expected one of: ${Ga.format([...l0])}.`,node:t}),u?.type==="Array")for(let l of u.elements)l.value.type==="String"&&l.value.value!==""?ei(l.value)?ti(l.value,t,{logger:o,src:n}):Dt(l.value,t,{logger:o,src:n}):l.value.type==="Object"?Dt(l.value,t,{logger:o,src:n}):o.error({...a,message:`Expected array of dimensions, received ${l.value.type}.`,node:l});else o.error({...a,message:`Expected array of strings, received ${u.type}`})}else o.error({...a,message:`Expected string or object, received ${e.type}`})}function Ah(e,t,{filename:r,src:n,logger:o}){e.type!=="Object"?o.error({group:"parser",label:"validate",message:`Expected object, received ${e.type}`,filename:r,node:e,src:n}):cr(e,{duration:{validator:Ja,required:!0},delay:{validator:Ja,required:!1},timingFunction:{validator:H0,required:!0}},t,{filename:r,src:n,logger:o})}function $h(e,{filename:t,src:r,logger:n}){let o={group:"parser",label:"validate",filename:t,node:e,src:r};e.type!=="Member"&&e.type!=="Object"&&n.error({...o,message:`Expected Object, received ${JSON.stringify(e.type)}`});let a=e.value.type==="Object"?Y(e.value):{},i=a.$value,s=a.$type;if(i||n.error({...o,message:"Token missing $value"}),ei(i)){ti(i,e,{logger:n,src:r});return}switch(s||n.error({...o,message:"Token missing $type"}),s.value){case"color":nn(i,e,{logger:n,src:r});break;case"cubicBezier":H0(i,e,{logger:n,src:r});break;case"dimension":Dt(i,e,{logger:n,src:r});break;case"duration":Ja(i,e,{logger:n,src:r});break;case"fontFamily":c0(i,e,{logger:n,src:r});break;case"fontWeight":f0(i,e,{logger:n,src:r});break;case"number":ri(i,e,{logger:n,src:r});break;case"shadow":if(i.type==="Object")d0(i,e,{logger:n,src:r});else if(i.type==="Array")for(let u of i.elements)d0(u.value,i,{logger:n,src:r});else n.error({...o,message:`Expected shadow object or array of shadow objects, received ${i.type}`,node:i});break;case"boolean":i.type!=="Boolean"&&n.error({...o,message:`Expected boolean, received ${i.type}`,node:i});break;case"link":i.type!=="String"?n.error({...o,message:`Expected string, received ${i.type}`,node:i}):i.value===""&&n.error({...o,message:"Expected URL, received empty string",node:i});break;case"string":i.type!=="String"&&n.error({...o,message:`Expected string, received ${i.type}`,node:i});break;case"border":Dh(i,e,{filename:t,src:r,logger:n});break;case"gradient":xh(i,e,{filename:t,src:r,logger:n});break;case"strokeStyle":N0(i,e,{filename:t,src:r,logger:n});break;case"transition":Ah(i,e,{filename:t,src:r,logger:n});break;case"typography":if(i.type!=="Object"){n.error({...o,message:`Expected object, received ${i.type}`,node:i});break}i.members.length===0&&n.error({...o,message:"Empty typography token. Must contain at least 1 property.",node:i}),cr(i,{fontFamily:{validator:c0},fontWeight:{validator:f0}},e,{filename:t,src:r,logger:n});break;default:break}}function j0(e){return e.type!=="Object"?!1:!e.members.some(t=>t.name.type==="String"&&t.name.value==="$value")}function m0(e,t,{subpath:r,inherited:n}){if(e.value.type!=="Object")return;let o=e.value.members.find(u=>u.name.type==="String"&&u.name.value===t);if(n&&o&&j0(e.value))return n[r.join(".")||"."]=o,o;let a=r.join("."),i,s="";for(let[u,l]of Object.entries(n??{}))(u==="."||a.startsWith(u))&&u.length>s.length&&(i=l,s=u);return i}function Eh(e,{config:t,filename:r,logger:n,parent:o,inheritedDeprecatedNode:a,inheritedTypeNode:i,src:s,subpath:u}){if(u.includes("$value")||e.value.type!=="Object")return;let l=Y(e.value);if(!l.$value||u.includes("$extensions")||u.includes("$deps"))return;let c=u.join(".");!u.includes(".$value")&&l.value&&n.warn({group:"parser",label:"validate",message:`Group ${c} has "value". Did you mean "$value"?`,filename:r,node:e,src:s});let f=structuredClone(e),m=l.$type?.type==="String"&&l.$type.value||void 0;i&&!l.$type&&(o0(f.value,[i]),m=i.value.value);let d=l.$deprecated?(l.$deprecated?.type==="String",l.$deprecated.value):void 0;if(a&&!l.$deprecated&&(o0(f.value,[a]),d=(a.value.type==="String",a.value.value)),$h(f,{filename:r,src:s,logger:n}),t.ignore.deprecated&&d||t.ignore.tokens&&ye(t.ignore.tokens)(c))return;let g={id:Zo(c).group,tokens:[]};i&&i.value.type==="String"&&(g.$type=i.value.value);let p=Y(o);p.$description&&(g.$description=He(p.$description)),p.$extensions&&(g.$extensions=He(p.$extensions));let y=He(l.$value),b={$type:m,$value:y,$deprecated:d,id:c,mode:{},originalValue:He(e.value),group:g,source:{loc:r?.href,node:f.value}};l.$description?.type==="String"&&l.$description.value&&(b.$description=l.$description.value);let D=l.$extensions?Y(l.$extensions):void 0,C=D?.mode?Y(D.mode):{};for(let F of[".",...Object.keys(C)]){let v=F==="."?b.$value:He(C[F]);b.mode[F]={$value:v,originalValue:v,source:{loc:r?.href,node:C[F]}}}return b}async function X0(e,{logger:t=new Wr,skipLint:r=!1,config:n={},continueOnError:o=!1,yamlToMomoa:a,transform:i,_sources:s={}}={}){let u=Array.isArray(e)?e:[e],l={};Array.isArray(u)||t.error({group:"parser",label:"init",message:"Input must be an array of input objects."}),await Promise.all(u.map(async(d,g)=>{if((!d||typeof d!="object")&&t.error({group:"parser",label:"init",message:`Input (${g}) must be an object.`}),(!d.src||typeof d.src!="string"&&typeof d.src!="object")&&t.error({message:`Input (${g}) missing "src" with a JSON/YAML string, or JSON object.`,group:"parser",label:"init"}),d.filename&&(d.filename instanceof URL||t.error({message:`Input (${g}) "filename" must be a URL (remote or file URL).`,group:"parser",label:"init"}),s[d.filename.href]))return;let p=await Fh(d.src,{filename:d.filename,logger:t,config:n,skipLint:r,continueOnError:o,yamlToMomoa:a,transform:i});l=Object.assign(l,p.tokens),d.filename&&(s[d.filename.href]={filename:d.filename,src:p.src,document:p.document})}));let c=performance.now(),f=performance.now(),m=0;for(let[d,g]of Object.entries(l)){fh(g,{tokensSet:l,filename:s[g.source.loc]?.filename,src:s[g.source.loc]?.src,node:Y(g.source.node).$value||g.source.node,logger:t}),m++;let{group:p}=Zo(d);if(p)for(let y of Object.keys(l)){let{group:b}=Zo(y);b?.startsWith(p)&&g.group.tokens.push(y)}}if(t.debug({message:`Resolved ${m} aliases`,group:"parser",label:"alias",timing:performance.now()-f}),t.debug({message:"Finish all parser tasks",group:"parser",label:"core",timing:performance.now()-c}),o){let{errorCount:d}=t.stats();d>0&&t.error({group:"parser",message:`Parser encountered ${d} ${jr(d,"error","errors")}. Exiting.`})}return{tokens:l,sources:Object.values(s)}}async function Fh(e,{filename:t,logger:r,config:n,skipLint:o,continueOnError:a=!1,transform:i,yamlToMomoa:s}){let u=performance.now(),{src:l,document:c}=n0(e,{filename:t,logger:r,continueOnError:a,yamlToMomoa:s});r.debug({group:"parser",label:"json",message:"Finish JSON parsing",timing:performance.now()-u});let f={};if(i?.root){let b=typeof e=="string"?JSON.parse(e):e,D=i?.root(b,".",c);if(D){let C=n0(D,{filename:t,logger:r,continueOnError:a});l=C.src,c=C.document}}let m=0,d=performance.now(),g={},p={};lh(c,{enter(b,D,C){if(b.type==="Document"&&b.body.type==="Object"&&b.body.members){let{members:F}=b.body;if(j0(b.body)){let v=F.find($=>$.name.type==="String"&&$.name.value==="$type");v&&(g["."]=v);let M=F.find($=>$.name.type==="String"&&$.name.value==="$deprecated");M&&(p["."]=M)}}if(b.type==="Object"&&C.length&&!b.members.some(F=>F.name.type==="String"&&F.name.value==="$value")&&!C.includes("$value")&&!C.includes("$extensions")&&i?.group){let F=i?.group(He(b),C.join("."),b);F&&uh(b,Wa(F))}if(b.type==="Member"){let F=m0(b,"$deprecated",{subpath:C,inherited:p}),v=m0(b,"$type",{subpath:C,inherited:g});if(b.value.type==="Object"){let M=b.value.members.find(R=>R.name.type==="String"&&R.name.value==="$value"),$=v;if(!$){let R=b.value.members.find(I=>I.name.type==="String"&&I.name.value==="$type");R&&($=R)}if(M&&$?.value.type==="String"&&i?.[$.value.value]){let R=i[$.value.value]?.(He(b.value),C.join("."),b);R&&(b.value=Wa(R).body)}let w=Eh(b,{filename:t,src:l,config:n,logger:r,parent:D,subpath:C,transform:i,inheritedDeprecatedNode:F,inheritedTypeNode:v});w&&(f[w.id]=w,m++)}}}}),r.debug({message:`Validated ${m} tokens`,group:"parser",label:"validate",timing:performance.now()-d});let y=performance.now();for(let[b,D]of Object.entries(f)){try{f[b].$value=ne(D)}catch(C){let{node:F}=D.source,v=Y(F);v.$value&&(F=v.$value),r.error({group:"parser",label:"normalize",message:C.message,filename:t,src:l,node:F,continueOnError:a})}for(let[C,F]of Object.entries(D.mode))if(C!==".")try{f[b].mode[C].$value=ne({$type:D.$type,...F})}catch(v){let{node:M}=D.source,$=Y(M);$.$value&&(M=$.$value),r.error({group:"parser",label:"normalize",message:v.message,filename:t,src:l,node:F.source.node,continueOnError:a})}}if(r.debug({message:`Normalized ${m} tokens`,group:"parser",label:"normalize",timing:performance.now()-y}),!o&&n?.plugins?.length){let b=performance.now();await Rp({tokens:f,src:l,config:n,logger:r}),r.debug({message:`Linted ${m} tokens`,group:"parser",label:"lint",timing:performance.now()-b})}else r.debug({message:"Linting skipped",group:"parser",label:"lint"});return{tokens:f,document:c,src:l}}var Mh=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},vl=Mh,Th={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},wh=Th,kh=e=>vl(wh[e.toLowerCase()],6),Sh=kh,Rh=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Bh=e=>{let t;return(t=e.match(Rh))?vl(parseInt(t[1],16),t[1].length):void 0},Oh=Bh,Ae="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",aE=`(?:${Ae}|none)`,Kr=`${Ae}%`,iE=`(?:${Ae}%|none)`,Ii=`(?:${Ae}%|${Ae})`,Ph=`(?:${Ae}%|${Ae}|none)`,zh=`(?:${Ae}(deg|grad|rad|turn)|${Ae})`,sE=`(?:${Ae}(deg|grad|rad|turn)|${Ae}|none)`,mr="\\s*,\\s*",uE=new RegExp("^"+Ph+"$"),_h=new RegExp(`^rgba?\\(\\s*${Ae}${mr}${Ae}${mr}${Ae}\\s*(?:,\\s*${Ii}\\s*)?\\)$`),Ih=new RegExp(`^rgba?\\(\\s*${Kr}${mr}${Kr}${mr}${Kr}\\s*(?:,\\s*${Ii}\\s*)?\\)$`),Lh=e=>{let t={mode:"rgb"},r;if(r=e.match(_h))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(Ih))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Hh=Lh,Nh=(e,t)=>e===void 0?void 0:typeof e!="object"?Al(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Zr=Nh,jh=(e="rgb")=>t=>(t=Zr(t,e))!==void 0?t.mode===e?t:Ye[t.mode][e]?Ye[t.mode][e](t):e==="rgb"?Ye[t.mode].rgb(t):Ye.rgb[e](Ye[t.mode].rgb(t)):void 0,Ke=jh,Ye={},Dl={},ln=[],xl={},Xh=e=>e,k=e=>(Ye[e.mode]={...Ye[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Ye[t]||(Ye[t]={}),Ye[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=Xh)}),Dl[e.mode]=e,(e.parse||[]).forEach(t=>{Uh(t,e.mode)}),Ke(e.mode)),Nt=e=>Dl[e],Uh=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");xl[e]=t}else typeof e=="function"&&ln.indexOf(e)<0&&ln.push(e)},Ti=/[^\x00-\x7F]|[a-zA-Z_]/,Vh=/[^\x00-\x7F]|[-\w]/,E={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},_=0;function an(e){let t=e[_],r=e[_+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[_+2]):t==="."?/\d/.test(r):/\d/.test(t)}function wi(e){if(_>=e.length)return!1;let t=e[_];if(Ti.test(t))return!0;if(t==="-"){if(e.length-_<2)return!1;let r=e[_+1];return!!(r==="-"||Ti.test(r))}return!1}var qh={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Gr(e){let t="";if((e[_]==="-"||e[_]==="+")&&(t+=e[_++]),t+=sn(e),e[_]==="."&&/\d/.test(e[_+1])&&(t+=e[_++]+sn(e)),(e[_]==="e"||e[_]==="E")&&((e[_+1]==="-"||e[_+1]==="+")&&/\d/.test(e[_+2])?t+=e[_++]+e[_++]+sn(e):/\d/.test(e[_+1])&&(t+=e[_++]+sn(e))),wi(e)){let r=cn(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:E.Hue,value:t*qh[r]}:void 0}return e[_]==="%"?(_++,{type:E.Percentage,value:+t}):{type:E.Number,value:+t}}function sn(e){let t="";for(;/\d/.test(e[_]);)t+=e[_++];return t}function cn(e){let t="";for(;_<e.length&&Vh.test(e[_]);)t+=e[_++];return t}function Wh(e){let t=cn(e);return e[_]==="("?(_++,{type:E.Function,value:t}):t==="none"?{type:E.None,value:void 0}:{type:E.Ident,value:t}}function Gh(e=""){let t=e.trim(),r=[],n;for(_=0;_<t.length;){if(n=t[_++],n===`
|
|
23
|
+
parse(yamlString, { yamlToMomoa });`,continueOnError:!1});else i=Wa(e);return a||(a=de(i,{indent:2})),{src:a,document:i}}function Wa(e,t){return Y1(typeof e=="string"?e:JSON.stringify(e,void 0,2),{mode:"jsonc",ranges:!0,tokens:!0,...t})}function dh(e,t){if(e.mode["."]??={},e.mode["."].$value=e.$value,e.mode["."].originalValue??=e.originalValue.$value,e.mode["."].source??=e.source,typeof e.$value=="string"&&Te(e.$value)){let{aliasChain:r,resolvedToken:n}=xt(e.$value,{...t,token:e});e.aliasOf=n.id,e.aliasChain=r,e.$value=n.$value}for(let r of Object.keys(e.mode)){let n=e.mode[r].$value;if(typeof n=="string"&&Te(n)){let a=[e.$type],{aliasChain:i,resolvedToken:s}=xt(n,{...t,token:e,expectedType:a,node:e.mode[r].source?.node||t.node});e.mode[r].aliasOf=s.id,e.mode[r].aliasChain=i,e.mode[r].$value=s.$value;continue}if(typeof e.$value=="object"&&typeof e.mode[r].$value=="object"&&!Array.isArray(e.$value))for(let[a,i]of Object.entries(e.$value))a in e.mode[r].$value||(e.mode[r].$value[a]=i);let o=Y(t.node).$value||t.node;switch(e.$type){case"border":ph(e,r,{...t,node:o});break;case"gradient":hh(e,r,{...t,node:o});break;case"shadow":gh(e,r,{...t,node:o});break;case"strokeStyle":bh(e,r,{...t,node:o});break;case"transition":yh(e,r,{...t,node:o});break;case"typography":vh(e,r,{...t,node:o});break}}}var mh=new Intl.ListFormat("en-us",{type:"disjunction"});function xt(e,t){let r={group:"parser",label:"alias",node:t?.node,filename:t.filename,src:t.src},{logger:n,token:o,tokensSet:a}=t,{token:i,chain:s}=L0(ke(e),t);a[o.id].$type||(a[o.id].$type=i.$type);let u=[...t.expectedType??[]];if(o.$type&&!u?.length&&u.push(o.$type),u?.length&&!u.includes(i.$type)&&n.error({...r,message:`Invalid alias: expected $type: ${mh.format(u)}, received $type: ${i.$type}.`,node:t.node?.type==="Object"&&Y(t.node).$value||r.node}),s?.length&&i){let l=!1;for(let c of s)c!==i.id&&!i.aliasedBy?.includes(c)&&(i.aliasedBy??=[],i.aliasedBy.push(c),l=!0),o&&!i.aliasedBy?.includes(o.id)&&(i.aliasedBy??=[],i.aliasedBy.push(o.id),l=!0);l&&i.aliasedBy.sort((c,f)=>c.localeCompare(f,"en-us",{numeric:!0}))}return{resolvedToken:i,aliasChain:s}}function L0(e,{scanned:t=[],...r}){let{logger:n,filename:o,src:a,node:i,tokensSet:s}=r,u={group:"parser",label:"alias",filename:o,src:a,node:i},l=ke(e);s[l]||n.error({...u,message:`Alias {${e}} not found.`}),t.includes(l)&&n.error({...u,message:`Circular alias detected from ${e}.`});let c=s[l];return t.push(l),typeof c.originalValue.$value!="string"||!Te(c.originalValue.$value)?{token:c,chain:t}:L0(c.originalValue.$value,{...r,scanned:t})}function ph(e,t,r){for(let[n,o]of Object.entries(e.mode[t].$value))if(typeof o=="string"&&Te(o)){e.mode[t].partialAliasOf??={};let a=Y(r.node)[n]||r.node,{resolvedToken:i}=xt(o,{...r,token:e,expectedType:{color:["color"],width:["dimension"],style:["strokeStyle"]}[n],node:a});e.mode[t].partialAliasOf[n]=ke(o),t==="."&&(e.partialAliasOf??={},e.partialAliasOf[n]=ke(o)),e.mode[t].$value[n]=i.$value}}function hh(e,t,r){for(let n=0;n<e.mode[t].$value.length;n++){let o=e.mode[t].$value[n];for(let[a,i]of Object.entries(o))if(typeof i=="string"&&Te(i)){e.mode[t].partialAliasOf??=[],e.mode[t].partialAliasOf[n]??={};let s={color:["color"],position:["number"]}[a],u=r.node?.elements?.[n]?.value||r.node;u.type==="Object"&&(u=Y(u)[a]||u);let{resolvedToken:l}=xt(i,{...r,token:e,expectedType:s,node:u});e.mode[t].partialAliasOf[n][a]=ke(i),t==="."&&(e.partialAliasOf??=[],e.partialAliasOf[n]??={},e.partialAliasOf[n][a]=ke(i)),o[a]=l.$value}}}function gh(e,t,r){Array.isArray(e.mode[t].$value)||(e.mode[t].$value=[e.mode[t].$value]);for(let n=0;n<e.mode[t].$value.length;n++){let o=e.mode[t].$value[n];for(let[a,i]of Object.entries(o))if(typeof i=="string"&&Te(i)){e.mode[t].partialAliasOf??=[],e.mode[t].partialAliasOf[n]??={};let s={offsetX:["dimension"],offsetY:["dimension"],blur:["dimension"],spread:["dimension"],color:["color"],inset:["boolean"]}[a],u=r.node?.elements?.[n]||r.node;u.type==="Object"&&(u=Y(u)[a]||u);let{resolvedToken:l}=xt(i,{...r,token:e,expectedType:s,node:u});e.mode[t].partialAliasOf[n][a]=ke(i),t==="."&&(e.partialAliasOf??=[],e.partialAliasOf[n]??={},e.partialAliasOf[n][a]=ke(i)),o[a]=l.$value}}}function bh(e,t,r){if(!(typeof e.mode[t].$value!="object"||!("dashArray"in e.mode[t].$value)))for(let n=0;n<e.mode[t].$value.dashArray.length;n++){let o=e.mode[t].$value.dashArray[n];if(typeof o=="string"&&Te(o)){let a=Y(r.node).dashArray||r.node;a.type==="Array"&&(a=a?.elements?.[n]?.value||a);let{resolvedToken:i}=xt(o,{...r,token:e,expectedType:["dimension"],node:a});e.mode[t].$value.dashArray[n]=i.$value}}}function yh(e,t,r){for(let[n,o]of Object.entries(e.mode[t].$value))if(typeof o=="string"&&Te(o)){e.mode[t].partialAliasOf??={};let a={duration:["duration"],delay:["duration"],timingFunction:["cubicBezier"]}[n],i=Y(r.node)[n]||r.node,{resolvedToken:s}=xt(o,{...r,token:e,expectedType:a,node:i});e.mode[t].partialAliasOf[n]=ke(o),t==="."&&(e.partialAliasOf??={},e.partialAliasOf[n]=ke(o)),e.mode[t].$value[n]=s.$value}}function vh(e,t,r){for(let[n,o]of Object.entries(e.mode[t].$value))if(typeof o=="string"&&Te(o)){e.partialAliasOf??={},e.mode[t].partialAliasOf??={};let a={fontFamily:["fontFamily"],fontSize:["dimension"],fontWeight:["fontWeight"],letterSpacing:["dimension"],lineHeight:["dimension","number"]}[n]||["string"],i=Y(r.node)[n]||r.node,{resolvedToken:s}=xt(o,{...r,token:e,expectedType:a,node:i});e.mode[t].partialAliasOf[n]=ke(o),t==="."&&(e.partialAliasOf[n]=ke(o)),e.mode[t].$value[n]=s.$value}}var a0={thin:100,hairline:100,"extra-light":200,"ultra-light":200,light:300,normal:400,regular:400,book:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,"extra-bold":800,"ultra-bold":800,black:900,heavy:900,"extra-black":950,"ultra-black":950},i0=/(-?\d*\.?\d+)(.*)/;function ne(e){if(typeof e.$value=="string"&&Te(e.$value))return e.$value;switch(e.$type){case"boolean":return!!e.$value;case"border":return typeof e.$value=="string"?e.$value:{color:ne({$type:"color",$value:e.$value.color??"#000000"}),style:ne({$type:"strokeStyle",$value:e.$value.style??"solid"}),width:ne({$type:"dimension",$value:e.$value.width})};case"color":{if(typeof e.$value=="string")return za(e.$value);let t={colorSpace:e.$value.colorSpace,components:e.$value.components??e.$value.channels,alpha:e.$value.alpha??1};return"hex"in e.$value&&(t.hex=e.$value.hex),t}case"cubicBezier":return typeof e.$value=="string"?e.$value:e.$value.map(t=>typeof t=="number"?ne({$type:"number",$value:t}):t);case"dimension":if(e.$value===0)return{value:0,unit:"px"};if(typeof e.$value=="string"){let t=e.$value.match(i0);return{value:Number.parseFloat(t?.[1]||e.$value),unit:t?.[2]||"px"}}return e.$value;case"duration":if(e.$value===0)return{value:0,unit:"ms"};if(typeof e.$value=="string"){let t=e.$value.match(i0);return{value:Number.parseFloat(t?.[1]||e.$value),unit:t?.[2]||"ms"}}return e.$value;case"fontFamily":return Array.isArray(e.$value)?e.$value:[e.$value];case"fontWeight":return typeof e.$value=="string"&&a0[e.$value]?a0[e.$value]:Math.min(999,Math.max(1,typeof e.$value=="string"?Number.parseInt(e.$value):e.$value));case"gradient":{if(typeof e.$value=="string")return e.$value;let t=[];for(let r=0;r<e.$value.length;r++){let n=structuredClone(e.$value[r]);n.color=ne({$type:"color",$value:n.color}),n.position===void 0&&(n.position=r/(e.$value.length-1)),t.push(n)}return t}case"number":return typeof e.$value=="number"?e.$value:Number.parseFloat(e.$value);case"shadow":return typeof e.$value=="string"?e.$value:(Array.isArray(e.$value)?e.$value:[e.$value]).map(t=>({color:ne({$type:"color",$value:t.color}),offsetX:ne({$type:"dimension",$value:t.offsetX??{value:0,unit:"px"}}),offsetY:ne({$type:"dimension",$value:t.offsetY??{value:0,unit:"px"}}),blur:ne({$type:"dimension",$value:t.blur??{value:0,unit:"px"}}),spread:ne({$type:"dimension",$value:t.spread??{value:0,unit:"px"}}),inset:t.inset===!0}));case"strokeStyle":return e.$value;case"string":return String(e.$value);case"transition":return typeof e.$value=="string"?e.$value:{duration:ne({$type:"duration",$value:e.$value.duration??0}),delay:ne({$type:"duration",$value:e.$value.delay??0}),timingFunction:ne({$type:"cubicBezier",$value:e.$value.timingFunction})};case"typography":{if(typeof e.$value=="string")return e.$value;let t={};for(let[r,n]of Object.entries(e.$value))switch(r){case"fontFamily":t[r]=ne({$type:"fontFamily",$value:n});break;case"fontSize":case"letterSpacing":t[r]=ne({$type:"dimension",$value:n});break;case"lineHeight":t[r]=ne({$type:typeof e.$value=="number"?"number":"dimension",$value:n});break;default:t[r]=n;break}return t}default:return e.$value}}var Ga=new Intl.ListFormat("en-us",{type:"disjunction"}),Dh=new Set(["adobe-rgb","display-p3","hsl","hwb","lab","lch","oklab","oklch","prophoto","rec2020","srgb","srgb-linear","xyz","xyz-d50","xyz-d65"]),s0=new Set(["thin","hairline","extra-light","ultra-light","light","normal","regular","book","medium","semi-bold","demi-bold","bold","extra-bold","ultra-bold","black","heavy","extra-black","ultra-black"]),u0=new Set(["solid","dashed","dotted","double","groove","ridge","outset","inset"]),l0=new Set(["round","butt","square"]);function ei(e){return e?.type==="String"?e.value.startsWith("{"):!1}function cr(e,t,r,{filename:n,src:o,logger:a}){let i=Y(e);for(let[s,u]of Object.entries(t)){let{validator:l,required:c}=u;if(!i[s]){c&&a.error({group:"parser",label:"validate",message:`Missing required property "${s}"`,filename:n,node:e,src:o});continue}let f=i[s];ei(f)?ti(f,r,{filename:n,src:o,logger:a}):l(f,r,{filename:n,src:o,logger:a})}}function ti(e,t,{filename:r,src:n,logger:o}){(e.type!=="String"||!Te(e.value))&&o.error({group:"parser",label:"validate",message:`Invalid alias: ${de(e)}`,filename:r,node:e,src:n})}function xh(e,t,{filename:r,src:n,logger:o}){e.type!=="Object"?o.error({group:"parser",label:"validate",message:`Expected object, received ${e.type}`,filename:r,node:e,src:n}):cr(e,{color:{validator:nn,required:!0},style:{validator:N0,required:!0},width:{validator:Dt,required:!0}},t,{filename:r,src:n,logger:o})}function nn(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="String")e.value===""&&o.error({...a,message:"Expected color, received empty string"});else if(e.type==="Object"){let i=e.members.findIndex(s=>s.name.type==="String"&&s.name.value==="channels");i!==-1&&(o.warn({...a,message:'"channels" is deprecated; rename "channels" to "components"'}),e.members[i].name.value="components"),cr(e,{colorSpace:{validator:s=>{s.type!=="String"&&o.error({...a,message:`Expected string, received ${de(s)}`,node:s}),Dh.has(s.value)||o.error({...a,message:`Unsupported colorspace ${de(s)}`,node:s})},required:!0},components:{validator:s=>{if(s.type!=="Array")o.error({...a,message:`Expected array, received ${de(s)}`,node:s});else{s.elements?.length!==3&&o.error({...a,message:`Expected 3 components, received ${s.elements?.length??0}`,node:s});for(let u of s.elements)u.value.type!=="Number"&&o.error({...a,message:`Expected number, received ${de(u.value)}`,node:u})}},required:!0},hex:{validator:s=>{(s.type!=="String"||s.value.length===6||s.value.length===8||!/^#[a-f0-9]{3,8}$/i.test(s.value))&&o.error({...a,message:`Invalid hex color ${de(s)}`,node:s})}},alpha:{validator:ri}},t,{filename:r,src:n,logger:o})}else o.error({...a,message:`Expected object, received ${e.type}`,node:e})}function H0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};e.type!=="Array"?o.error({...a,message:`Expected array of numbers, received ${de(e)}`}):e.elements.every(i=>i.value.type==="Number")?e.elements.length!==4&&o.error({...a,message:`Expected an array of 4 numbers, received ${e.elements.length}`}):o.error({...a,message:"Expected an array of 4 numbers, received some non-numbers"})}function Dt(e,t,{filename:r,src:n,logger:o}){if(e.type==="Number"&&e.value===0)return;let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="Object"){let{value:u,unit:l}=Y(e);u||o.error({...a,message:'Missing required property "value".'}),l||o.error({...a,message:'Missing required property "unit".'}),u.type!=="Number"&&o.error({...a,message:`Expected number, received ${u.type}`,node:u}),["px","em","rem"].includes(l.value)||o.error({...a,message:`Expected unit "px", "em", or "rem", received ${de(l)}`,node:l});return}e.type!=="String"&&o.error({...a,message:`Expected string, received ${e.type}`});let i=e.value.match(/^-?[0-9.]+/)?.[0],s=e.value.replace(i,"");e.value===""?o.error({...a,message:"Expected dimension, received empty string"}):["px","em","rem"].includes(s)?Number.isFinite(Number.parseFloat(i))||o.error({...a,message:`Expected dimension with units, received ${de(e)}`}):o.error({...a,message:`Expected unit "px", "em", or "rem", received ${JSON.stringify(s||e.value)}`})}function Ja(e,t,{filename:r,src:n,logger:o}){if(e.type==="Number"&&e.value===0)return;let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="Object"){let{value:u,unit:l}=Y(e);u||o.error({...a,message:'Missing required property "value".'}),l||o.error({...a,message:'Missing required property "unit".'}),u?.type!=="Number"&&o.error({...a,message:`Expected number, received ${u?.type}`,node:u}),["ms","s"].includes(l.value)||o.error({...a,message:`Expected unit "ms" or "s", received ${de(l)}`,node:l});return}e.type!=="String"&&o.error({...a,message:`Expected string, received ${e.type}`});let i=e.value.match(/^-?[0-9.]+/)?.[0],s=e.value.replace(i,"");e.value===""?o.error({...a,message:"Expected duration, received empty string"}):["ms","s"].includes(s)?Number.isFinite(Number.parseFloat(i))||o.error({...a,message:`Expected duration with units, received ${de(e)}`}):o.error({...a,message:`Expected unit "ms" or "s", received ${JSON.stringify(s||e.value)}`})}function c0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};e.type!=="String"&&e.type!=="Array"&&o.error({...a,message:`Expected string or array of strings, received ${e.type}`}),e.type==="String"&&e.value===""&&o.error({...a,message:"Expected font family name, received empty string"}),e.type==="Array"&&!e.elements.every(i=>i.value.type==="String"&&i.value.value!=="")&&o.error({...a,message:"Expected an array of strings, received some non-strings or empty strings"})}function f0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};e.type!=="String"&&e.type!=="Number"&&o.error({...a,message:`Expected a font weight name or number 0\u20131000, received ${e.type}`}),e.type==="String"&&!s0.has(e.value)&&o.error({...a,message:`Unknown font weight ${de(e)}. Expected one of: ${Ga.format([...s0])}.`}),e.type==="Number"&&(e.value<0||e.value>1e3)&&o.error({...a,message:`Expected number 0\u20131000, received ${de(e)}`})}function Ch(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type!=="Array")o.error({...a,message:`Expected array of gradient stops, received ${e.type}`});else for(let i=0;i<e.elements.length;i++){let s=e.elements[i];if(s.value.type!=="Object"){o.error({...a,message:`Stop #${i+1}: Expected gradient stop, received ${s.value.type}`,node:s});break}cr(s.value,{color:{validator:nn,required:!0},position:{validator:ri,required:!0}},s,{filename:r,src:n,logger:o})}}function ri(e,t,{filename:r,src:n,logger:o}){e.type!=="Number"&&o.error({group:"parser",label:"validate",message:`Expected number, received ${e.type}`,filename:r,node:e,src:n})}function Ah(e,t,{filename:r,src:n,logger:o}){e.type!=="Boolean"&&o.error({group:"parser",label:"validate",message:`Expected boolean, received ${e.type}`,filename:r,node:e,src:n})}function d0(e,t,{filename:r,src:n,logger:o}){e.type!=="Object"?o.error({group:"parser",label:"validate",message:`Expected Object, received ${e.type}`,filename:r,node:e,src:n}):cr(e,{color:{validator:nn,required:!0},offsetX:{validator:Dt,required:!0},offsetY:{validator:Dt,required:!0},blur:{validator:Dt},spread:{validator:Dt},inset:{validator:Ah}},t,{filename:r,src:n,logger:o})}function N0(e,t,{filename:r,src:n,logger:o}){let a={group:"parser",label:"validate",filename:r,node:e,src:n};if(e.type==="String")u0.has(e.value)||o.error({...a,message:`Unknown stroke style ${de(e)}. Expected one of: ${Ga.format([...u0])}.`});else if(e.type==="Object"){let i=Y(e);for(let l of["dashArray","lineCap"])i[l]||o.error({...a,message:`Missing required property "${l}"`});let{lineCap:s,dashArray:u}=i;if((s?.type!=="String"||!l0.has(s.value))&&o.error({...a,message:`Unknown lineCap value ${de(s)}. Expected one of: ${Ga.format([...l0])}.`,node:t}),u?.type==="Array")for(let l of u.elements)l.value.type==="String"&&l.value.value!==""?ei(l.value)?ti(l.value,t,{logger:o,src:n}):Dt(l.value,t,{logger:o,src:n}):l.value.type==="Object"?Dt(l.value,t,{logger:o,src:n}):o.error({...a,message:`Expected array of dimensions, received ${l.value.type}.`,node:l});else o.error({...a,message:`Expected array of strings, received ${u.type}`})}else o.error({...a,message:`Expected string or object, received ${e.type}`})}function $h(e,t,{filename:r,src:n,logger:o}){e.type!=="Object"?o.error({group:"parser",label:"validate",message:`Expected object, received ${e.type}`,filename:r,node:e,src:n}):cr(e,{duration:{validator:Ja,required:!0},delay:{validator:Ja,required:!1},timingFunction:{validator:H0,required:!0}},t,{filename:r,src:n,logger:o})}function Eh(e,{filename:t,src:r,logger:n}){let o={group:"parser",label:"validate",filename:t,node:e,src:r};e.type!=="Member"&&e.type!=="Object"&&n.error({...o,message:`Expected Object, received ${JSON.stringify(e.type)}`});let a=e.value.type==="Object"?Y(e.value):{},i=a.$value,s=a.$type;if(i||n.error({...o,message:"Token missing $value"}),ei(i)){ti(i,e,{logger:n,src:r});return}switch(s||n.error({...o,message:"Token missing $type"}),s.value){case"color":nn(i,e,{logger:n,src:r});break;case"cubicBezier":H0(i,e,{logger:n,src:r});break;case"dimension":Dt(i,e,{logger:n,src:r});break;case"duration":Ja(i,e,{logger:n,src:r});break;case"fontFamily":c0(i,e,{logger:n,src:r});break;case"fontWeight":f0(i,e,{logger:n,src:r});break;case"number":ri(i,e,{logger:n,src:r});break;case"shadow":if(i.type==="Object")d0(i,e,{logger:n,src:r});else if(i.type==="Array")for(let u of i.elements)d0(u.value,i,{logger:n,src:r});else n.error({...o,message:`Expected shadow object or array of shadow objects, received ${i.type}`,node:i});break;case"boolean":i.type!=="Boolean"&&n.error({...o,message:`Expected boolean, received ${i.type}`,node:i});break;case"link":i.type!=="String"?n.error({...o,message:`Expected string, received ${i.type}`,node:i}):i.value===""&&n.error({...o,message:"Expected URL, received empty string",node:i});break;case"string":i.type!=="String"&&n.error({...o,message:`Expected string, received ${i.type}`,node:i});break;case"border":xh(i,e,{filename:t,src:r,logger:n});break;case"gradient":Ch(i,e,{filename:t,src:r,logger:n});break;case"strokeStyle":N0(i,e,{filename:t,src:r,logger:n});break;case"transition":$h(i,e,{filename:t,src:r,logger:n});break;case"typography":if(i.type!=="Object"){n.error({...o,message:`Expected object, received ${i.type}`,node:i});break}i.members.length===0&&n.error({...o,message:"Empty typography token. Must contain at least 1 property.",node:i}),cr(i,{fontFamily:{validator:c0},fontWeight:{validator:f0}},e,{filename:t,src:r,logger:n});break;default:break}}function j0(e){return e.type!=="Object"?!1:!e.members.some(t=>t.name.type==="String"&&t.name.value==="$value")}function m0(e,t,{subpath:r,inherited:n}){if(e.value.type!=="Object")return;let o=e.value.members.find(u=>u.name.type==="String"&&u.name.value===t);if(n&&o&&j0(e.value))return n[r.join(".")||"."]=o,o;let a=r.join("."),i,s="";for(let[u,l]of Object.entries(n??{}))(u==="."||a.startsWith(u))&&u.length>s.length&&(i=l,s=u);return i}function Fh(e,{config:t,filename:r,logger:n,parent:o,inheritedDeprecatedNode:a,inheritedTypeNode:i,src:s,subpath:u}){if(u.includes("$value")||e.value.type!=="Object")return;let l=Y(e.value);if(!l.$value||u.includes("$extensions")||u.includes("$deps"))return;let c=u.join(".");!u.includes(".$value")&&l.value&&n.warn({group:"parser",label:"validate",message:`Group ${c} has "value". Did you mean "$value"?`,filename:r,node:e,src:s});let f=structuredClone(e),m=l.$type?.type==="String"&&l.$type.value||void 0;i&&!l.$type&&(o0(f.value,[i]),m=i.value.value);let d=l.$deprecated?(l.$deprecated?.type==="String",l.$deprecated.value):void 0;if(a&&!l.$deprecated&&(o0(f.value,[a]),d=(a.value.type==="String",a.value.value)),Eh(f,{filename:r,src:s,logger:n}),t.ignore.deprecated&&d||t.ignore.tokens&&ye(t.ignore.tokens)(c))return;let g={id:Zo(c).group,tokens:[]};i&&i.value.type==="String"&&(g.$type=i.value.value);let p=Y(o);p.$description&&(g.$description=He(p.$description)),p.$extensions&&(g.$extensions=He(p.$extensions));let y=He(l.$value),b={$type:m,$value:y,$deprecated:d,id:c,mode:{},originalValue:He(e.value),group:g,source:{loc:r?.href,node:f.value}};l.$description?.type==="String"&&l.$description.value&&(b.$description=l.$description.value);let D=l.$extensions?Y(l.$extensions):void 0,C=D?.mode?Y(D.mode):{};for(let F of[".",...Object.keys(C)]){let v=F==="."?b.$value:He(C[F]);b.mode[F]={$value:v,originalValue:v,source:{loc:r?.href,node:C[F]}}}return b}async function X0(e,{logger:t=new Wr,skipLint:r=!1,config:n={},continueOnError:o=!1,yamlToMomoa:a,transform:i,_sources:s={}}={}){let u=Array.isArray(e)?e:[e],l={};Array.isArray(u)||t.error({group:"parser",label:"init",message:"Input must be an array of input objects."}),await Promise.all(u.map(async(d,g)=>{if((!d||typeof d!="object")&&t.error({group:"parser",label:"init",message:`Input (${g}) must be an object.`}),(!d.src||typeof d.src!="string"&&typeof d.src!="object")&&t.error({message:`Input (${g}) missing "src" with a JSON/YAML string, or JSON object.`,group:"parser",label:"init"}),d.filename&&(d.filename instanceof URL||t.error({message:`Input (${g}) "filename" must be a URL (remote or file URL).`,group:"parser",label:"init"}),s[d.filename.href]))return;let p=await Mh(d.src,{filename:d.filename,logger:t,config:n,skipLint:r,continueOnError:o,yamlToMomoa:a,transform:i});l=Object.assign(l,p.tokens),d.filename&&(s[d.filename.href]={filename:d.filename,src:p.src,document:p.document})}));let c=performance.now(),f=performance.now(),m=0;for(let[d,g]of Object.entries(l)){dh(g,{tokensSet:l,filename:s[g.source.loc]?.filename,src:s[g.source.loc]?.src,node:Y(g.source.node).$value||g.source.node,logger:t}),m++;let{group:p}=Zo(d);if(p)for(let y of Object.keys(l)){let{group:b}=Zo(y);b?.startsWith(p)&&g.group.tokens.push(y)}}if(t.debug({message:`Resolved ${m} aliases`,group:"parser",label:"alias",timing:performance.now()-f}),t.debug({message:"Finish all parser tasks",group:"parser",label:"core",timing:performance.now()-c}),o){let{errorCount:d}=t.stats();d>0&&t.error({group:"parser",message:`Parser encountered ${d} ${jr(d,"error","errors")}. Exiting.`})}return{tokens:l,sources:Object.values(s)}}async function Mh(e,{filename:t,logger:r,config:n,skipLint:o,continueOnError:a=!1,transform:i,yamlToMomoa:s}){let u=performance.now(),{src:l,document:c}=n0(e,{filename:t,logger:r,continueOnError:a,yamlToMomoa:s});r.debug({group:"parser",label:"json",message:"Finish JSON parsing",timing:performance.now()-u});let f={};if(i?.root){let b=typeof e=="string"?JSON.parse(e):e,D=i?.root(b,".",c);if(D){let C=n0(D,{filename:t,logger:r,continueOnError:a});l=C.src,c=C.document}}let m=0,d=performance.now(),g={},p={};ch(c,{enter(b,D,C){if(b.type==="Document"&&b.body.type==="Object"&&b.body.members){let{members:F}=b.body;if(j0(b.body)){let v=F.find($=>$.name.type==="String"&&$.name.value==="$type");v&&(g["."]=v);let M=F.find($=>$.name.type==="String"&&$.name.value==="$deprecated");M&&(p["."]=M)}}if(b.type==="Object"&&C.length&&!b.members.some(F=>F.name.type==="String"&&F.name.value==="$value")&&!C.includes("$value")&&!C.includes("$extensions")&&i?.group){let F=i?.group(He(b),C.join("."),b);F&&lh(b,Wa(F))}if(b.type==="Member"){let F=m0(b,"$deprecated",{subpath:C,inherited:p}),v=m0(b,"$type",{subpath:C,inherited:g});if(b.value.type==="Object"){let M=b.value.members.find(R=>R.name.type==="String"&&R.name.value==="$value"),$=v;if(!$){let R=b.value.members.find(I=>I.name.type==="String"&&I.name.value==="$type");R&&($=R)}if(M&&$?.value.type==="String"&&i?.[$.value.value]){let R=i[$.value.value]?.(He(b.value),C.join("."),b);R&&(b.value=Wa(R).body)}let k=Fh(b,{filename:t,src:l,config:n,logger:r,parent:D,subpath:C,transform:i,inheritedDeprecatedNode:F,inheritedTypeNode:v});k&&(f[k.id]=k,m++)}}}}),r.debug({message:`Validated ${m} tokens`,group:"parser",label:"validate",timing:performance.now()-d});let y=performance.now();for(let[b,D]of Object.entries(f)){try{f[b].$value=ne(D)}catch(C){let{node:F}=D.source,v=Y(F);v.$value&&(F=v.$value),r.error({group:"parser",label:"normalize",message:C.message,filename:t,src:l,node:F,continueOnError:a})}for(let[C,F]of Object.entries(D.mode))if(C!==".")try{f[b].mode[C].$value=ne({$type:D.$type,...F})}catch(v){let{node:M}=D.source,$=Y(M);$.$value&&(M=$.$value),r.error({group:"parser",label:"normalize",message:v.message,filename:t,src:l,node:F.source.node,continueOnError:a})}}if(r.debug({message:`Normalized ${m} tokens`,group:"parser",label:"normalize",timing:performance.now()-y}),!o&&n?.plugins?.length){let b=performance.now();await Bp({tokens:f,src:l,config:n,logger:r}),r.debug({message:`Linted ${m} tokens`,group:"parser",label:"lint",timing:performance.now()-b})}else r.debug({message:"Linting skipped",group:"parser",label:"lint"});return{tokens:f,document:c,src:l}}var Th=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},vl=Th,kh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},wh=kh,Sh=e=>vl(wh[e.toLowerCase()],6),Rh=Sh,Bh=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,Oh=e=>{let t;return(t=e.match(Bh))?vl(parseInt(t[1],16),t[1].length):void 0},Ph=Oh,Ae="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",sE=`(?:${Ae}|none)`,Kr=`${Ae}%`,uE=`(?:${Ae}%|none)`,Ii=`(?:${Ae}%|${Ae})`,zh=`(?:${Ae}%|${Ae}|none)`,_h=`(?:${Ae}(deg|grad|rad|turn)|${Ae})`,lE=`(?:${Ae}(deg|grad|rad|turn)|${Ae}|none)`,mr="\\s*,\\s*",cE=new RegExp("^"+zh+"$"),Ih=new RegExp(`^rgba?\\(\\s*${Ae}${mr}${Ae}${mr}${Ae}\\s*(?:,\\s*${Ii}\\s*)?\\)$`),Lh=new RegExp(`^rgba?\\(\\s*${Kr}${mr}${Kr}${mr}${Kr}\\s*(?:,\\s*${Ii}\\s*)?\\)$`),Hh=e=>{let t={mode:"rgb"},r;if(r=e.match(Ih))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(Lh))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Nh=Hh,jh=(e,t)=>e===void 0?void 0:typeof e!="object"?Al(e):e.mode!==void 0?e:t?{...e,mode:t}:void 0,Zr=jh,Xh=(e="rgb")=>t=>(t=Zr(t,e))!==void 0?t.mode===e?t:Ye[t.mode][e]?Ye[t.mode][e](t):e==="rgb"?Ye[t.mode].rgb(t):Ye.rgb[e](Ye[t.mode].rgb(t)):void 0,Ke=Xh,Ye={},Dl={},ln=[],xl={},Uh=e=>e,w=e=>(Ye[e.mode]={...Ye[e.mode],...e.toMode},Object.keys(e.fromMode||{}).forEach(t=>{Ye[t]||(Ye[t]={}),Ye[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=Uh)}),Dl[e.mode]=e,(e.parse||[]).forEach(t=>{Vh(t,e.mode)}),Ke(e.mode)),Nt=e=>Dl[e],Vh=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");xl[e]=t}else typeof e=="function"&&ln.indexOf(e)<0&&ln.push(e)},Ti=/[^\x00-\x7F]|[a-zA-Z_]/,qh=/[^\x00-\x7F]|[-\w]/,E={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},_=0;function an(e){let t=e[_],r=e[_+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[_+2]):t==="."?/\d/.test(r):/\d/.test(t)}function ki(e){if(_>=e.length)return!1;let t=e[_];if(Ti.test(t))return!0;if(t==="-"){if(e.length-_<2)return!1;let r=e[_+1];return!!(r==="-"||Ti.test(r))}return!1}var Wh={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function Gr(e){let t="";if((e[_]==="-"||e[_]==="+")&&(t+=e[_++]),t+=sn(e),e[_]==="."&&/\d/.test(e[_+1])&&(t+=e[_++]+sn(e)),(e[_]==="e"||e[_]==="E")&&((e[_+1]==="-"||e[_+1]==="+")&&/\d/.test(e[_+2])?t+=e[_++]+e[_++]+sn(e):/\d/.test(e[_+1])&&(t+=e[_++]+sn(e))),ki(e)){let r=cn(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:E.Hue,value:t*Wh[r]}:void 0}return e[_]==="%"?(_++,{type:E.Percentage,value:+t}):{type:E.Number,value:+t}}function sn(e){let t="";for(;/\d/.test(e[_]);)t+=e[_++];return t}function cn(e){let t="";for(;_<e.length&&qh.test(e[_]);)t+=e[_++];return t}function Gh(e){let t=cn(e);return e[_]==="("?(_++,{type:E.Function,value:t}):t==="none"?{type:E.None,value:void 0}:{type:E.Ident,value:t}}function Jh(e=""){let t=e.trim(),r=[],n;for(_=0;_<t.length;){if(n=t[_++],n===`
|
|
24
24
|
`||n===" "||n===" "){for(;_<t.length&&(t[_]===`
|
|
25
|
-
`||t[_]===" "||t[_]===" ");)_++;continue}if(n===",")return;if(n===")"){r.push({type:E.ParenClose});continue}if(n==="+"){if(_--,an(t)){r.push(Gr(t));continue}return}if(n==="-"){if(_--,an(t)){r.push(Gr(t));continue}if(
|
|
26
|
-
`||t[_]===" "||t[_]===" ");)_++;let o;if(an(t)&&(o=Gr(t),o.type!==E.Hue)){r.push({type:E.Alpha,value:o});continue}if(wi(t)&&cn(t)==="none"){r.push({type:E.Alpha,value:{type:E.None,value:void 0}});continue}return}if(/\d/.test(n)){_--,r.push(Gr(t));continue}if(Ti.test(n)){_--,r.push(Wh(t));continue}return}return r}function Jh(e){e._i=0;let t=e[e._i++];if(!t||t.type!==E.Function||t.value!=="color"||(t=e[e._i++],t.type!==E.Ident))return;let r=xl[t.value];if(!r)return;let n={mode:r},o=Cl(e,!1);if(!o)return;let a=Nt(r).channels;for(let i=0,s,u;i<a.length;i++)s=o[i],u=a[i],s.type!==E.None&&(n[u]=s.type===E.Number?s.value:s.value/100,u==="alpha"&&(n[u]=Math.max(0,Math.min(1,n[u]))));return n}function Cl(e,t){let r=[],n;for(;e._i<e.length;){if(n=e[e._i++],n.type===E.None||n.type===E.Number||n.type===E.Alpha||n.type===E.Percentage||t&&n.type===E.Hue){r.push(n);continue}if(n.type===E.ParenClose){if(e._i<e.length)return;continue}return}if(!(r.length<3||r.length>4)){if(r.length===4){if(r[3].type!==E.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:E.None,value:void 0}),r.every(o=>o.type!==E.Alpha)?r:void 0}}function Yh(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==E.Function)return;let n=Cl(e,t);if(n)return n.unshift(r.value),n}var Kh=e=>{if(typeof e!="string")return;let t=Gh(e),r=t?Yh(t,!0):void 0,n,o=0,a=ln.length;for(;o<a;)if((n=ln[o++](e,r))!==void 0)return n;return t?Jh(t):void 0},Al=Kh;function Zh(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let r={mode:"rgb"},[,n,o,a,i]=t;if(!(n.type===E.Hue||o.type===E.Hue||a.type===E.Hue))return n.type!==E.None&&(r.r=n.type===E.Number?n.value/255:n.value/100),o.type!==E.None&&(r.g=o.type===E.Number?o.value/255:o.value/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value/255:a.value/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var Qh=Zh,e2=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,t2=e2,r2=(e,t,r)=>e+r*(t-e),o2=e=>{let t=[];for(let r=0;r<e.length-1;r++){let n=e[r],o=e[r+1];n===void 0&&o===void 0?t.push(void 0):n!==void 0&&o!==void 0?t.push([n,o]):t.push(n!==void 0?[n,n]:[o,o])}return t},n2=e=>t=>{let r=o2(t);return n=>{let o=n*r.length,a=n>=1?r.length-1:Math.max(Math.floor(o),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],o-a)}},T=n2(r2),ee=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e},a2={mode:"rgb",channels:["r","g","b","alpha"],parse:[Qh,Oh,Hh,Sh,t2,"srgb"],serialize:"srgb",interpolate:{r:T,g:T,b:T,alpha:{use:T,fixup:ee}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Mt=a2,oi=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),i2=e=>{let t=oi(e.r),r=oi(e.g),n=oi(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},U0=i2,ni=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),s2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"a98",r:ni(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:ni(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:ni(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(o.alpha=n),o},V0=s2,ai=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},u2=({r:e,g:t,b:r,alpha:n})=>{let o={mode:"lrgb",r:ai(e),g:ai(t),b:ai(r)};return n!==void 0&&(o.alpha=n),o},hr=u2,l2=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return o!==void 0&&(a.alpha=o),a},jt=l2,ii=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},c2=({r:e,g:t,b:r,alpha:n},o="rgb")=>{let a={mode:o,r:ii(e),g:ii(t),b:ii(r)};return n!==void 0&&(a.alpha=n),a},gr=c2,f2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=gr({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(o.alpha=n),o},Xt=f2,d2={...Mt,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>V0(jt(e)),xyz65:V0},toMode:{rgb:e=>Xt(U0(e)),xyz65:U0}},Li=d2,m2=e=>(e=e%360)<0?e+360:e,se=m2;function p2({h:e,s:t,l:r,alpha:n}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=r+t*(r<.5?r:1-r),a=o-(o-r)*2*Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:o,g:a,b:2*r-o};break;case 1:i={r:a,g:o,b:2*r-o};break;case 2:i={r:2*r-o,g:o,b:a};break;case 3:i={r:2*r-o,g:a,b:o};break;case 4:i={r:a,g:2*r-o,b:o};break;case 5:i={r:o,g:2*r-o,b:a};break;default:i={r:2*r-o,g:2*r-o,b:2*r-o}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function h2({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsl",s:o===a?0:(o-a)/(1-Math.abs(o+a-1)),l:.5*(o+a)};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var g2=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},b2=g2,y2=new RegExp(`^hsla?\\(\\s*${zh}${mr}${Kr}${mr}${Kr}\\s*(?:,\\s*${Ii}\\s*)?\\)$`),v2=e=>{let t=e.match(y2);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=b2(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},D2=v2;function x2(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Percentage)return;r.h=n.value}if(o.type!==E.None){if(o.type===E.Hue)return;r.s=o.value/100}if(a.type!==E.None){if(a.type===E.Hue)return;r.l=a.value/100}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var C2=x2,A2=(e,t)=>e.map((r,n,o)=>{if(r===void 0)return r;let a=se(r);return n===0||e[n-1]===void 0?a:t(a-se(o[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),it=e=>A2(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),hn=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=se(e.h),n=se(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},$2=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=se(e.h),n=se(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},gn=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=se(e.h),n=se(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},E2=(e="rgb",t=[1,1,1,0])=>{let r=Nt(e),n=r.channels,o=r.difference,a=Ke(e);return(i,s)=>{let u=a(i),l=a(s);return Math.sqrt(n.reduce((c,f,m)=>{let d=o[f]?o[f](u,l):u[f]-l[f];return c+(t[m]||0)*Math.pow(isNaN(d)?0:d,2)},0))}},st=e=>{let t=e.reduce((n,o)=>{if(o!==void 0){let a=o*Math.PI/180;n.sin+=Math.sin(a),n.cos+=Math.cos(a)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},F2={mode:"hsl",toMode:{rgb:p2},fromMode:{rgb:h2},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[C2,D2],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},s:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},bn=F2;function $l({h:e,s:t,v:r,alpha:n}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*o),b:r*(1-t)};break;case 1:a={r:r*(1-t*o),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*o)};break;case 3:a={r:r*(1-t),g:r*(1-t*o),b:r};break;case 4:a={r:r*(1-t*o),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*o)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function El({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var M2={mode:"hsv",toMode:{rgb:$l},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:El},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:T,fixup:it},s:T,v:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},Hi=M2;function T2({h:e,w:t,b:r,alpha:n}){if(t===void 0&&(t=0),r===void 0&&(r=0),t+r>1){let o=t+r;t/=o,r/=o}return $l({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function w2(e){let t=El(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function k2(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Percentage)return;r.h=n.value}if(o.type!==E.None){if(o.type===E.Hue)return;r.w=o.value/100}if(a.type!==E.None){if(a.type===E.Hue)return;r.b=a.value/100}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var S2=k2,R2={mode:"hwb",toMode:{rgb:T2},fromMode:{rgb:w2},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[S2],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},w:T,b:T,alpha:{use:T,fixup:ee}},difference:{h:$2},average:{h:st}},Ni=R2,yn=Math.pow(29,3)/Math.pow(3,3),ji=Math.pow(6,3)/Math.pow(29,3),K={X:.3457/.3585,Y:1,Z:.2958/.3585},fr={X:.3127/.329,Y:1,Z:.3583/.329},lE=Math.pow(29,3)/Math.pow(3,3),cE=Math.pow(6,3)/Math.pow(29,3),si=e=>Math.pow(e,3)>ji?Math.pow(e,3):(116*e-16)/yn,B2=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz50",x:si(a)*K.X,y:si(o)*K.Y,z:si(i)*K.Z};return n!==void 0&&(s.alpha=n),s},Xi=B2,O2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=gr({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(o.alpha=n),o},eo=O2,P2=e=>eo(Xi(e)),Fl=P2,z2=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return o!==void 0&&(a.alpha=o),a},to=z2,ui=e=>e>ji?Math.cbrt(e):(yn*e+16)/116,_2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ui(e/K.X),a=ui(t/K.Y),i=ui(r/K.Z),s={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},Ui=_2,I2=e=>{let t=Ui(to(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Ml=I2;function L2(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,o,a,i]=t;if(!(n.type===E.Hue||o.type===E.Hue||a.type===E.Hue))return n.type!==E.None&&(r.l=Math.min(Math.max(0,n.value),100)),o.type!==E.None&&(r.a=o.type===E.Number?o.value:o.value*125/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value:a.value*125/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var H2=L2,N2={mode:"lab",toMode:{xyz50:Xi,rgb:Fl},fromMode:{xyz50:Ui,rgb:Ml},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[H2],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:T,a:T,b:T,alpha:{use:T,fixup:ee}}},ro=N2,Tl=Math.pow(29,3)/Math.pow(3,3),wl=Math.pow(6,3)/Math.pow(29,3),li=e=>Math.pow(e,3)>wl?Math.pow(e,3):(116*e-16)/Tl,j2=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz65",x:li(a)*fr.X,y:li(o)*fr.Y,z:li(i)*fr.Z};return n!==void 0&&(s.alpha=n),s},kl=j2,X2=e=>Xt(kl(e)),vn=X2,ci=e=>e>wl?Math.cbrt(e):(Tl*e+16)/116,U2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ci(e/fr.X),a=ci(t/fr.Y),i=ci(r/fr.Z),s={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},Sl=U2,V2=e=>{let t=Sl(jt(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Dn=V2,q2={...ro,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:kl,rgb:vn},fromMode:{xyz65:Sl,rgb:Dn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Vi=q2,W2=({l:e,a:t,b:r,alpha:n},o="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:o,l:e,c:a};return a&&(i.h=se(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},Et=W2,G2=({l:e,c:t,h:r,alpha:n},o="lab")=>{r===void 0&&(r=0);let a={mode:o,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},Ft=G2;function J2(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(o.type!==E.None&&(r.c=Math.max(0,o.type===E.Number?o.value:o.value*150/100)),a.type!==E.None){if(a.type===E.Percentage)return;r.h=a.value}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var Y2=J2,K2={mode:"lch",toMode:{lab:Ft,rgb:e=>Fl(Ft(e))},fromMode:{rgb:e=>Et(Ml(e)),lab:Et},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Y2],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},c:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},oo=K2,Z2={...oo,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Ft(e,"lab65"),rgb:e=>vn(Ft(e,"lab65"))},fromMode:{rgb:e=>Et(Dn(e),"lch65"),lab65:e=>Et(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},Rl=Z2,Q2={...Mt,mode:"lrgb",toMode:{rgb:gr},fromMode:{rgb:hr},parse:["srgb-linear"],serialize:"srgb-linear"},qi=Q2,eg=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),i=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*o-3.3077115392580616*a+.2309699031821044*i,g:-1.2684379732850317*o+2.6097573492876887*a-.3413193760026573*i,b:-.0041960761386756*o-.7034186179359362*a+1.7076146940746117*i};return n!==void 0&&(s.alpha=n),s},no=eg,tg=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),i=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*o+.7936177747023054*a-.0040720430116193*i,a:1.9779985324311684*o-2.42859224204858*a+.450593709617411*i,b:.0259040424655478*o+.7827717124575296*a-.8086757549230774*i};return n!==void 0&&(s.alpha=n),s},Bl=tg,rg=e=>{let t=Bl(hr(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},xn=rg,og=e=>gr(no(e)),Cn=og;function ng(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,o,a,i]=t;if(!(n.type===E.Hue||o.type===E.Hue||a.type===E.Hue))return n.type!==E.None&&(r.l=Math.min(Math.max(0,n.type===E.Number?n.value:n.value/100),1)),o.type!==E.None&&(r.a=o.type===E.Number?o.value:o.value*.4/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value:a.value*.4/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var ag=ng,ig={...ro,mode:"oklab",toMode:{lrgb:no,rgb:Cn},fromMode:{lrgb:Bl,rgb:xn},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[ag],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},Wi=ig;function sg(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Hue)return;r.l=Math.min(Math.max(0,n.type===E.Number?n.value:n.value/100),1)}if(o.type!==E.None&&(r.c=Math.max(0,o.type===E.Number?o.value:o.value*.4/100)),a.type!==E.None){if(a.type===E.Percentage)return;r.h=a.value}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var ug=sg,lg={...oo,mode:"oklch",toMode:{oklab:e=>Ft(e,"oklab"),rgb:e=>Cn(Ft(e,"oklab"))},fromMode:{rgb:e=>Et(xn(e),"oklch"),oklab:e=>Et(e,"oklch")},parse:[ug],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Gi=lg,cg=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return o!==void 0&&(a.alpha=o),a},q0=cg,fg=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=gr({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(o.alpha=n),o},W0=fg,dg={...Mt,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>W0(jt(e)),xyz65:W0},toMode:{rgb:e=>Xt(q0(e)),xyz65:q0}},Ji=dg,fi=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},mg=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"prophoto",r:fi(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:fi(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:fi(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(o.alpha=n),o},G0=mg,di=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},pg=e=>{let t=di(e.r),r=di(e.g),n=di(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},J0=pg,hg={...Mt,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:G0,rgb:e=>G0(to(e))},toMode:{xyz50:J0,rgb:e=>eo(J0(e))}},Yi=hg,Y0=1.09929682680944,gg=.018053968510807,mi=e=>{let t=Math.abs(e);return t>gg?(Math.sign(e)||1)*(Y0*Math.pow(t,.45)-(Y0-1)):4.5*e},bg=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rec2020",r:mi(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:mi(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:mi(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(o.alpha=n),o},K0=bg,Z0=1.09929682680944,yg=.018053968510807,pi=(e=0)=>{let t=Math.abs(e);return t<yg*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+Z0-1)/Z0,1/.45)},vg=e=>{let t=pi(e.r),r=pi(e.g),n=pi(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},Q0=vg,Dg={...Mt,mode:"rec2020",fromMode:{xyz65:K0,rgb:e=>K0(jt(e))},toMode:{xyz65:Q0,rgb:e=>Xt(Q0(e))},parse:["rec2020"],serialize:"rec2020"},Ki=Dg,xg={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:eo,lab:Ui},fromMode:{rgb:to,lab:Xi},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:ee}}},Zi=xg,Cg=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return o!==void 0&&(a.alpha=o),a},Ag=Cg,$g=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return o!==void 0&&(a.alpha=o),a},Eg=$g,Fg={mode:"xyz65",toMode:{rgb:Xt,xyz50:Ag},fromMode:{rgb:jt,xyz50:Eg},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:ee}}},Qi=Fg,fE=k(Li),dE=k(bn),mE=k(Hi),pE=k(Ni),hE=k(ro),gE=k(Vi),bE=k(oo),yE=k(Rl),vE=k(qi),DE=k(Wi),xE=k(Gi),CE=k(Ji),AE=k(Yi),$E=k(Ki),EE=k(Mt),FE=k(Zi),ME=k(Qi),ae=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Mg=Math.PI/180,Tg=180/Math.PI,el=ae[3]*ae[4],tl=ae[1]*ae[4],rl=ae[1]*ae[2]-ae[0]*ae[3],wg=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(rl*r+e*el-t*tl)/(rl+el-tl),a=r-o,i=(ae[4]*(t-o)-ae[2]*a)/ae[3],s={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+i*i)/(ae[4]*o*(1-o))};return s.s&&(s.h=Math.atan2(i,a)*Tg-120),n!==void 0&&(s.alpha=n),s},kg=wg,Sg=({h:e,s:t,l:r,alpha:n})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Mg,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),s=Math.sin(e);return o.r=r+a*(ae[0]*i+ae[1]*s),o.g=r+a*(ae[2]*i+ae[3]*s),o.b=r+a*(ae[4]*i+ae[5]*s),n!==void 0&&(o.alpha=n),o},Rg=Sg,Bg={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:kg},toMode:{rgb:Rg},interpolate:{h:{use:T,fixup:it},s:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},Og=Bg,fn=1,Ol=1,Qr=26/180*Math.PI,dn=Math.cos(Qr),mn=Math.sin(Qr),Pl=100/Math.log(139/100),Pg=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"lab65",l:(Math.exp(e*fn/Pl)-1)/.0039},a=(Math.exp(.0435*t*Ol*fn)-1)/.075,i=a*Math.cos(r/180*Math.PI-Qr),s=a*Math.sin(r/180*Math.PI-Qr);return o.a=i*dn-s/.83*mn,o.b=i*mn+s/.83*dn,n!==void 0&&(o.alpha=n),o},ki=Pg,zg=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=t*dn+r*mn,a=.83*(r*dn-t*mn),i=Math.sqrt(o*o+a*a),s={mode:"dlch",l:Pl/fn*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*Ol*fn)};return s.c&&(s.h=se((Math.atan2(a,o)+Qr)/Math.PI*180)),n!==void 0&&(s.alpha=n),s},Si=zg,ol=e=>ki(Et(e,"dlch")),nl=e=>Ft(Si(e),"dlab"),_g={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:ol,rgb:e=>vn(ol(e))},fromMode:{lab65:nl,rgb:e=>nl(Dn(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:T,a:T,b:T,alpha:{use:T,fixup:ee}}},Ig=_g,Lg={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:ki,dlab:e=>Ft(e,"dlab"),rgb:e=>vn(ki(e))},fromMode:{lab65:Si,dlab:e=>Et(e,"dlch"),rgb:e=>Si(Dn(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:T,c:T,h:{use:T,fixup:it},alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},Hg=Lg;function Ng({h:e,s:t,i:r,alpha:n}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1+t*(3/(2-o)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-o)-1)),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1+t*(3/(2-o)-1))};break;case 4:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3/(2-o)-1))};break;case 5:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function jg({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var Xg={mode:"hsi",toMode:{rgb:Ng},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:jg},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:T,fixup:it},s:T,i:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},Ug=Xg,zl=203,An=.1593017578125,_l=78.84375,$n=.8359375,En=18.8515625,Fn=18.6875;function hi(e){if(e<0)return 0;let t=Math.pow(e,1/_l);return 1e4*Math.pow(Math.max(0,t-$n)/(En-Fn*t),1/An)}function gi(e){if(e<0)return 0;let t=Math.pow(e/1e4,An);return Math.pow(($n+En*t)/(1+Fn*t),_l)}var bi=e=>Math.max(e/zl,0),Vg=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=hi(e+.008609037037932761*t+.11102962500302593*r),a=hi(e-.00860903703793275*t-.11102962500302599*r),i=hi(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:bi(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*i),y:bi(.3647385209748074*o+.680566024947227*a-.0453045459220346*i),z:bi(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*i)};return n!==void 0&&(s.alpha=n),s},al=Vg,yi=(e=0)=>Math.max(e*zl,0),qg=({x:e,y:t,z:r,alpha:n})=>{let o=yi(e),a=yi(t),i=yi(r),s=gi(.3592832590121217*o+.6976051147779502*a-.0358915932320289*i),u=gi(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*i),l=gi(.0070797844607477*o+.0748396662186366*a+.8433265453898765*i),c=.5*s+.5*u,f=1.61376953125*s-3.323486328125*u+1.709716796875*l,m=4.378173828125*s-4.24560546875*u-.132568359375*l,d={mode:"itp",i:c,t:f,p:m};return n!==void 0&&(d.alpha=n),d},il=qg,Wg={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:al,rgb:e=>Xt(al(e))},fromMode:{xyz65:il,rgb:e=>il(jt(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:T,t:T,p:T,alpha:{use:T,fixup:ee}}},Gg=Wg,Jg=134.03437499999998,Yg=16295499532821565e-27,vi=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,An);return Math.pow(($n+En*t)/(1+Fn*t),Jg)},Di=(e=0)=>Math.max(e*203,0),Kg=({x:e,y:t,z:r,alpha:n})=>{e=Di(e),t=Di(t),r=Di(r);let o=1.15*e-.15*r,a=.66*t+.34*e,i=vi(.41478972*o+.579999*a+.014648*r),s=vi(-.20151*o+1.120649*a+.0531008*r),u=vi(-.0166008*o+.2648*a+.6684799*r),l=(i+s)/2,c={mode:"jab",j:.44*l/(1-.56*l)-Yg,a:3.524*i-4.066708*s+.542708*u,b:.199076*i+1.096799*s-1.295875*u};return n!==void 0&&(c.alpha=n),c},Il=Kg,Zg=134.03437499999998,sl=16295499532821565e-27,xi=e=>{if(e<0)return 0;let t=Math.pow(e,1/Zg);return 1e4*Math.pow(($n-t)/(Fn*t-En),1/An)},Ci=e=>e/203,Qg=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+sl)/(.44+.56*(e+sl)),a=xi(o+.13860504*t+.058047316*r),i=xi(o-.13860504*t-.058047316*r),s=xi(o-.096019242*t-.8118919*r),u={mode:"xyz65",x:Ci(1.661373024652174*a-.914523081304348*i+.23136208173913045*s),y:Ci(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*s),z:Ci(-.090982811*a-.31272829*i+1.5227666*s)};return n!==void 0&&(u.alpha=n),u},Ll=Qg,e5=e=>{let t=Il(jt(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Hl=e5,t5=e=>Xt(Ll(e)),Nl=t5,r5={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Hl,xyz65:Il},toMode:{rgb:Nl,xyz65:Ll},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:T,a:T,b:T,alpha:{use:T,fixup:ee}}},o5=r5,n5=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:o};return o&&(a.h=se(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},ul=n5,a5=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},ll=a5,i5={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:ll,rgb:e=>Nl(ll(e))},fromMode:{rgb:e=>ul(Hl(e)),jab:ul},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:T,fixup:it},c:T,j:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},s5=i5,u5=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:o};return o&&(a.h=se(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},jl=u5,l5=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Xl=l5,Ul=(e,t,r)=>4*e/(e+15*t+3*r),Vl=(e,t,r)=>9*t/(e+15*t+3*r),c5=Ul(K.X,K.Y,K.Z),f5=Vl(K.X,K.Y,K.Z),d5=e=>e<=ji?yn*e:116*Math.cbrt(e)-16,m5=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=d5(t/K.Y),a=Ul(e,t,r),i=Vl(e,t,r);!isFinite(a)||!isFinite(i)?o=a=i=0:(a=13*o*(a-c5),i=13*o*(i-f5));let s={mode:"luv",l:o,u:a,v:i};return n!==void 0&&(s.alpha=n),s},Ri=m5,p5=(e,t,r)=>4*e/(e+15*t+3*r),h5=(e,t,r)=>9*t/(e+15*t+3*r),g5=p5(K.X,K.Y,K.Z),b5=h5(K.X,K.Y,K.Z),y5=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let o=t/(13*e)+g5,a=r/(13*e)+b5,i=K.Y*(e<=8?e/yn:Math.pow((e+16)/116,3)),s=i*(9*o)/(4*a),u=i*(12-3*o-20*a)/(4*a),l={mode:"xyz50",x:s,y:i,z:u};return n!==void 0&&(l.alpha=n),l},Bi=y5,v5=e=>jl(Ri(to(e))),D5=e=>eo(Bi(Xl(e))),x5={mode:"lchuv",toMode:{luv:Xl,rgb:D5},fromMode:{rgb:v5,luv:jl},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:T,fixup:it},c:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},C5=x5,A5={mode:"luv",toMode:{xyz50:Bi,rgb:e=>eo(Bi(e))},fromMode:{xyz50:Ri,rgb:e=>Ri(to(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:T,u:T,v:T,alpha:{use:T,fixup:ee}}},$5=A5;function Oi(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function pn(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function E5(e,t){let r,n,o,a,i,s,u,l;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,o=.59662641,a=.75515197,i=.56771245,s=4.0767416621,u=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,o=.08285427,a=.1254107,i=.14503204,s=-1.2684380046,u=2.6097574011,l=-.3413193965):(r=1.35733652,n=-.00915799,o=-1.1513021,a=-.50559606,i=.00692167,s=-.0041960863,u=-.7034186147,l=1.707614701);let c=r+n*e+o*t+a*e*e+i*e*t,f=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t;{let g=1+c*f,p=1+c*m,y=1+c*d,b=g*g*g,D=p*p*p,C=y*y*y,F=3*f*g*g,v=3*m*p*p,M=3*d*y*y,$=6*f*f*g,w=6*m*m*p,R=6*d*d*y,I=s*b+u*D+l*C,X=s*F+u*v+l*M,G=s*$+u*w+l*R;c=c-I*X/(X*X-.5*I*G)}return c}function es(e,t){let r=E5(e,t),n=no({l:1,a:r*e,b:r*t}),o=Math.cbrt(1/Math.max(n.r,n.g,n.b)),a=o*r;return[o,a]}function F5(e,t,r,n,o,a=null){a||(a=es(e,t));let i;if((r-o)*a[1]-(a[0]-o)*n<=0)i=a[1]*o/(n*a[0]+a[1]*(o-r));else{i=a[1]*(o-1)/(n*(a[0]-1)+a[1]*(o-r));{let s=r-o,u=n,l=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,m=s+u*l,d=s+u*c,g=s+u*f;{let p=o*(1-i)+i*r,y=i*n,b=p+y*l,D=p+y*c,C=p+y*f,F=b*b*b,v=D*D*D,M=C*C*C,$=3*m*b*b,w=3*d*D*D,R=3*g*C*C,I=6*m*m*b,X=6*d*d*D,G=6*g*g*C,le=4.0767416621*F-3.3077115913*v+.2309699292*M-1,Z=4.0767416621*$-3.3077115913*w+.2309699292*R,ut=4.0767416621*I-3.3077115913*X+.2309699292*G,Ne=Z/(Z*Z-.5*le*ut),ce=-le*Ne,je=-1.2684380046*F+2.6097574011*v-.3413193965*M-1,Oe=-1.2684380046*$+2.6097574011*w-.3413193965*R,Tt=-1.2684380046*I+2.6097574011*X-.3413193965*G,Ze=Oe/(Oe*Oe-.5*je*Tt),Pe=-je*Ze,Xe=-.0041960863*F-.7034186147*v+1.707614701*M-1,Ue=-.0041960863*$-.7034186147*w+1.707614701*R,Ut=-.0041960863*I-.7034186147*X+1.707614701*G,wt=Ue/(Ue*Ue-.5*Xe*Ut),Qe=-Xe*wt;ce=Ne>=0?ce:1e6,Pe=Ze>=0?Pe:1e6,Qe=wt>=0?Qe:1e6,i+=Math.min(ce,Math.min(Pe,Qe))}}}return i}function ts(e,t,r=null){r||(r=es(e,t));let n=r[0],o=r[1];return[o/n,o/(1-n)]}function ql(e,t,r){let n=es(t,r),o=F5(t,r,e,1,e,n),a=ts(t,r,n),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),u=o/Math.min(e*a[0],(1-e)*a[1]),l=e*i,c=(1-e)*s,f=.9*u*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(c*c*c*c))));return l=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(l*l)+1/(c*c))),f,o]}function cl(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Oi(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(r*r+n*n);if(!a)return o.s=0,o;let[i,s,u]=ql(t,r/a,n/a),l;if(a<s){let c=0,f=.8*i,m=1-f/s;l=(a-c)/(f+m*(a-c))*.8}else{let c=s,f=.2*s*s*1.25*1.25/i,m=1-f/(u-s);l=.8+.2*((a-c)/(f+m*(a-c)))}return l&&(o.s=l,o.h=se(Math.atan2(n,r)*180/Math.PI)),o}function fl(e){let t=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,n=e.l!==void 0?e.l:0,o={mode:"oklab",l:pn(n)};if(e.alpha!==void 0&&(o.alpha=e.alpha),!r||n===1)return o.a=o.b=0,o;let a=Math.cos(t/180*Math.PI),i=Math.sin(t/180*Math.PI),[s,u,l]=ql(o.l,a,i),c,f,m,d;r<.8?(c=1.25*r,f=0,m=.8*s,d=1-m/u):(c=5*(r-.8),f=u,m=.2*u*u*1.25*1.25/s,d=1-m/(l-u));let g=f+c*m/(1-d*c);return o.a=g*a,o.b=g*i,o}var M5={...bn,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:cl,rgb:e=>cl(xn(e))},toMode:{oklab:fl,rgb:e=>Cn(fl(e))}},T5=M5;function dl(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o=Math.sqrt(r*r+n*n),a=o?r/o:1,i=o?n/o:1,[s,u]=ts(a,i),l=.5,c=1-l/s,f=u/(o+t*u),m=f*t,d=f*o,g=pn(m),p=d*g/m,y=no({l:g,a:a*p,b:i*p}),b=Math.cbrt(1/Math.max(y.r,y.g,y.b,0));t=t/b,o=o/b*Oi(t)/t,t=Oi(t);let D={mode:"okhsv",s:o?(l+u)*d/(u*l+u*c*d):0,v:t?t/m:0};return D.s&&(D.h=se(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(D.alpha=e.alpha),D}function ml(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[s,u]=ts(a,i),l=.5,c=1-l/s,f=1-n*l/(l+u-u*c*n),m=n*u*l/(l+u-u*c*n),d=pn(f),g=m*d/f,p=no({l:d,a:a*g,b:i*g}),y=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),b=pn(o*f),D=m*b/f;return t.l=b*y,t.a=D*a*y,t.b=D*i*y,t}var w5={...Hi,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:dl,rgb:e=>dl(xn(e))},toMode:{oklab:ml,rgb:e=>Cn(ml(e))}},Wl=w5,Ht=.0037930732552754493,Gl=Math.cbrt(Ht),Ai=e=>Math.cbrt(e)-Gl,k5=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a=Ai(.3*t+.622*r+.078*n+Ht),i=Ai(.23*t+.692*r+.078*n+Ht),s=Ai(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+Ht),u={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:s-(a+i)/2};return o!==void 0&&(u.alpha=o),u},S5=k5,$i=e=>Math.pow(e+Gl,3),R5=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=$i(e+t)-Ht,a=$i(t-e)-Ht,i=$i(r+t)-Ht,s=gr({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*i});return n!==void 0&&(s.alpha=n),s},B5=R5,O5={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:B5},fromMode:{rgb:S5},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:T,y:T,b:T,alpha:{use:T,fixup:ee}}},P5=O5,z5=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(o.alpha=n),o},_5=z5,I5=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(o.alpha=n),o},L5=I5,H5={mode:"yiq",toMode:{rgb:L5},fromMode:{rgb:_5},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:T,i:T,q:T,alpha:{use:T,fixup:ee}}},N5=H5,j5=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,X5=(e=4)=>t=>typeof t=="number"?j5(t,e):t,Jr=X5,TE=Jr(2),U5=e=>Math.max(0,Math.min(1,e||0)),un=e=>Math.round(U5(e)*255),Jl=Ke("rgb"),wE=Ke("hsl"),Yl=e=>{if(e===void 0)return;let t=un(e.r),r=un(e.g),n=un(e.b);return"#"+(1<<24|t<<16|r<<8|n).toString(16).slice(1)},V5=e=>{if(e===void 0)return;let t=un(e.alpha!==void 0?e.alpha:1);return Yl(e)+(256|t).toString(16).slice(1)},Yr=e=>{let t=Zr(e);if(!t)return;let r=Nt(t.mode);if(!r.serialize||typeof r.serialize=="string"){let n=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((o,a)=>{o!=="alpha"&&(n+=(a?" ":"")+(t[o]!==void 0?t[o]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(n+=` / ${t.alpha}`),n+")"}if(typeof r.serialize=="function")return r.serialize(t)},Kl=e=>Yl(Jl(e)),q5=e=>V5(Jl(e)),W5=Ke("rgb"),G5=e=>{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},Zl=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function Ql(e){return Zl(W5(e))}function ec(e="rgb"){let{gamut:t}=Nt(e);if(!t)return n=>!0;let r=Ke(typeof t=="string"?t:e);return n=>Zl(r(n))}function J5(e="rgb"){let{gamut:t}=Nt(e);if(!t)return a=>Zr(a);let r=typeof t=="string"?t:e,n=Ke(r),o=ec(r);return a=>{let i=Zr(a);if(!i)return;let s=n(i);if(o(s))return i;let u=G5(s);return i.mode===u.mode?u:Ke(i.mode)(u)}}function Ei(e="rgb",t="oklch",r=E2("oklch"),n=.02){let o=Ke(e),a=Nt(e);if(!a.gamut)return c=>o(c);let i=ec(e),s=J5(e),u=Ke(t),{ranges:l}=Nt(t);if(!l.l||!l.c)throw new Error("LCH-like space expected");return c=>{if(c=Zr(c),c===void 0)return;let f={...u(c)};if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=l.l[1]){let y={...a.white,mode:e};return c.alpha!==void 0&&(y.alpha=c.alpha),y}if(f.l<=l.l[0]){let y={...a.black,mode:e};return c.alpha!==void 0&&(y.alpha=c.alpha),y}if(i(f))return o(f);let m=0,d=f.c,g=(l.c[1]-l.c[0])/4e3,p=s(f);for(;d-m>g;)f.c=(m+d)*.5,p=s(f),i(f)||r&&n>0&&r(f,p)<=n?m=f.c:d=f.c;return o(i(f)?f:p)}}var Y5=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,pl={a98:"a98-rgb",hsl:"hsl",hwb:"hwb",lab:"lab",lab65:"lab-d65",lch:"lch",lrgb:"srgb-linear",oklab:"oklab",oklch:"oklch",okhsv:"okhsv",p3:"display-p3",prophoto:"prophoto-rgb",rec2020:"rec2020",rgb:"srgb",xyz50:"xyz-d50",xyz65:"xyz-d65"},dr={"a98-rgb":"a98","display-p3":"p3",hsl:"hsl",hwb:"hwb",lab:"lab","lab-d65":"lab65",lch:"lch",oklab:"oklab",oklch:"oklch",okhsv:"okhsv","prophoto-rgb":"prophoto",rec2020:"rec2020",srgb:"rgb","srgb-linear":"lrgb",xyz:"xyz65","xyz-d50":"xyz50","xyz-d65":"xyz65"};function K5(e){let t=Al(e);if(!t)throw new Error(`Unable to parse color "${e}"`);if(!(t.mode in pl))throw new Error(`Unsupported color space: ${t.mode}`);let r=pl[t.mode],n=[0,0,0];switch(t.mode){case"a98":case"rec2020":case"p3":case"prophoto":case"lrgb":case"rgb":n=[t.r,t.g,t.b];break;case"hsl":{let a=At[r].ranges[1]?.[1]??1,i=At[r].ranges[2]?.[1]??1;n=[t.h??0,t.s*a,t.l*i];break}case"hwb":{let a=At[r].ranges[1]?.[1]??1,i=At[r].ranges[2]?.[1]??1;n=[t.h??0,t.w*a,t.b*i];break}case"lab":case"lab65":case"oklab":n=[t.l,t.a,t.b];break;case"lch":case"oklch":n=[t.l,t.c,t.h??0];break;case"okhsv":n=[t.h??0,t.s,t.v];break;case"xyz50":case"xyz65":n=[t.x,t.y,t.z];break}let o={colorSpace:r,components:n,alpha:t.alpha??1};return Y5.test(e)&&(o.hex=Kl(t)),o}function Z5(e){switch(e.colorSpace){case"a98-rgb":case"display-p3":case"prophoto-rgb":case"rec2020":case"srgb":case"srgb-linear":{let[t,r,n]=e.components;return{mode:dr[e.colorSpace]||e.colorSpace,r:t,g:r,b:n,alpha:e.alpha}}case"hsl":{let[t,r,n]=e.components,o=At[e.colorSpace].ranges[1]?.[1]??1,a=At[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hsl",h:t,s:r/o,l:n/a,alpha:e.alpha}}case"hwb":{let[t,r,n]=e.components,o=At[e.colorSpace].ranges[1]?.[1]??1,a=At[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hwb",h:t,w:r/o,b:n/a,alpha:e.alpha}}case"lab":case"lab-d65":case"oklab":{let[t,r,n]=e.components;return{mode:e.colorSpace==="lab-d65"?"lab65":e.colorSpace,l:t,a:r,b:n,alpha:e.alpha}}case"lch":case"oklch":{let[t,r,n]=e.components;return{mode:e.colorSpace,l:t,c:r,h:n,alpha:e.alpha}}case"okhsv":{let[t,r,n]=e.components;return{mode:e.colorSpace,h:t,s:r,v:n,alpha:e.alpha}}case"xyz":case"xyz-d50":case"xyz-d65":{let[t,r,n]=e.components;return{mode:dr[e.colorSpace],x:t,y:r,z:n,alpha:e.alpha}}default:throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of ${Object.keys(dr).join(", ")}`)}}var At={"a98-rgb":{ranges:[[0,1],[0,1],[0,1]]},"display-p3":{ranges:[[0,1],[0,1],[0,1]]},hsl:{ranges:[[0,360],[0,100],[0,100]]},hwb:{ranges:[[0,360],[0,100],[0,100]]},lab:{ranges:[[0,100],[-125,125],[-125,125]]},"lab-d65":{ranges:[[0,100],[-125,125],[-125,125]]},lch:{ranges:[[0,100],[0,150],[0,360]]},oklab:{ranges:[[0,1],[-.4,.4],[-.4,.4]]},oklch:{ranges:[[0,1],[0,.4],[0,360]]},okhsv:{ranges:[[0,360],[0,1],[0,1]]},"prophoto-rgb":{ranges:[[0,1],[0,1],[0,1]]},rec2020:{ranges:[[0,1],[0,1],[0,1]]},srgb:{ranges:[[0,1],[0,1],[0,1]]},"srgb-linear":{ranges:[[0,1],[0,1],[0,1]]},"xyz-d50":{ranges:[[0,1],[0,1],[0,1]]},xyz:{ranges:[[0,1],[0,1],[0,1]]},"xyz-d65":{ranges:[[0,1],[0,1],[0,1]]}};function tc(e){let t="";for(let r of e.split("")){if(r==="."){t+="-";continue}let n=!0;if(n&&/\p{Uppercase_Letter}/u.test(r)){t+=`-${r.toLocaleLowerCase()}`,n=!1;continue}else n=!0;t+=r}return t}function Pi(e){return e==="-"||e==="^"||e==="$"||e==="+"||e==="."||e==="("||e===")"||e==="|"||e==="["||e==="]"||e==="{"||e==="}"||e==="*"||e==="?"||e==="\\"?"\\".concat(e):e}function Q5(e){for(var t="",r=0;r<e.length;r++)t+=Pi(e[r]);return t}function rc(e,t){if(t===void 0&&(t=!0),Array.isArray(e)){var r=e.map(function(y){return"^".concat(rc(y,t),"$")});return"(?:".concat(r.join("|"),")")}var n="",o="",a=".";t===!0?(n="/",o="[/\\\\]",a="[^/\\\\]"):t&&(n=t,o=Q5(n),o.length>1?(o="(?:".concat(o,")"),a="((?!".concat(o,").)")):a="[^".concat(o,"]"));for(var i=t?"".concat(o,"+?"):"",s=t?"".concat(o,"*?"):"",u=t?e.split(n):[e],l="",c=0;c<u.length;c++){var f=u[c],m=u[c+1],d="";if(!(!f&&c>0)){if(t&&(c===u.length-1?d=s:m!=="**"?d=i:d=""),t&&f==="**"){d&&(l+=c===0?"":c===u.length-1?"(?:".concat(i,"|$)"):i,l+="(?:".concat(a,"*?").concat(d,")*?"));continue}for(var g=0;g<f.length;g++){var p=f[g];p==="\\"?g<f.length-1&&(l+=Pi(f[g+1]),g++):p==="?"?l+=a:p==="*"?l+="".concat(a,"*?"):l+=Pi(p)}l+=d}}return l}function eb(e,t){if(typeof t!="string")throw new TypeError("Sample must be a string, but ".concat(typeof t," given"));return e.test(t)}function oc(e,t){if(typeof e!="string"&&!Array.isArray(e))throw new TypeError("The first argument must be a single pattern string or an array of patterns, but ".concat(typeof e," given"));if((typeof t=="string"||typeof t=="boolean")&&(t={separator:t}),arguments.length===2&&!(typeof t>"u"||typeof t=="object"&&t!==null&&!Array.isArray(t)))throw new TypeError("The second argument must be an options object or a string/boolean separator, but ".concat(typeof t," given"));if(t=t||{},t.separator==="\\")throw new Error("\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead");var r=rc(e,t.separator),n=new RegExp("^".concat(r,"$"),t.flags),o=eb.bind(null,n);return o.options=t,o.pattern=e,o.regexp=n,o}function tb(e,{$type:t}){if(e){if(typeof e!="string"&&typeof e!="object"||Array.isArray(e))throw new Error(`transform(): expected string or Object of strings, received ${Array.isArray(e)?"Array":typeof e}`);switch(t){case"typography":if(typeof e!="object")throw new Error("transform(): typography tokens must be an object of keys");break}}}var kE=k(Li),SE=k(Og),RE=k(Ig),BE=k(Hg),OE=k(Ug),PE=k(bn),zE=k(Hi),_E=k(Ni),IE=k(Gg),LE=k(o5),HE=k(s5),NE=k(ro),jE=k(Vi),XE=k(oo),UE=k(Rl),VE=k(C5),qE=k(qi),WE=k($5),GE=k(T5),JE=k(Wl),YE=k(Wi),KE=k(Gi),ZE=k(Ji),QE=k(Yi),eF=k(Ki),tF=k(Mt),rF=k(P5),oF=k(Zi),nF=k(Qi),aF=k(N5);function ue(e){if(!e)throw new Error("Undefined token");return`var(${pr(e.id)})`}function hl({$type:e,localID:t}){if(e==="transition")return["duration","delay","timing-function"].map(r=>pr(`${t}-${r}`,{wrapVar:!0})).join(" ")}var rb=/(?:(\p{Uppercase_Letter}?[\p{Lowercase_Letter}\p{Number}]+|[\p{Uppercase_Letter}\p{Number}]+|[\u{80}-\u{10FFFF}\p{Number}]+)|.)/u;function pr(e,{prefix:t,wrapVar:r=!1}={}){if(typeof e!="string")throw new Error(`makeCSSVar() Expected string, received ${e}`);let n=e.split(rb).filter(Boolean).join("-");t&&!n.startsWith(`${t}-`)&&(n=`${t}-${n}`);let o=`--${n}`.toLocaleLowerCase();return r?`var(${o})`:o}function ob(e,{tokensSet:t,transformAlias:r=ue}){return e.aliasChain?.[0]?r(t[e.aliasChain[0]]):e.$value===!0?"1":"0"}function Mn(e,t){let{transformAlias:r=ue,tokensSet:n}=t;if(e.aliasChain?.[0])return r(n[e.aliasChain[0]]);let{colorSpace:o,components:a,alpha:i=1}=typeof e.$value=="string"?K5(e.$value):e.$value,s=Z5({colorSpace:o,components:a,alpha:i});if(!s)throw new Error(`Can\u2019t convert color ${JSON.stringify(e.$value)} to Culori color`);let u=Yr;return t.color?.legacyHex&&(u=s.alpha!==1?q5:Kl),Ql(s)?u(s):nb({colorSpace:o,components:a,alpha:i},s,t.color?.depth)}var Fi={a98:k(Li),hsl:k(bn),hwb:k(Ni),lab:k(ro),lab65:k(Vi),lch:k(oo),lrgb:k(qi),oklab:k(Wi),oklch:k(Gi),okhsv:k(Wl),p3:k(Ji),prophoto:k(Yi),rec2020:k(Ki),rgb:k(Mt),xyz50:k(Zi),xyz65:k(Qi)},zi={24:Jr(4),30:Jr(4),36:Jr(5),48:Jr(6)};function nb(e,t,r=30){if(!(e.colorSpace in dr))throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of: ${Object.keys(dr).join(", ")}`);let n=dr[e.colorSpace]||"oklab",o=n;o==="lab"||o==="lab65"?o="lch":o==="oklab"&&(o="oklch");let a=Fi[n](Ei("rgb",o)(t)),i=Fi[n](Ei("p3",o)(t)),s=Fi[n](Ei("rec2020",o)(t));if(typeof r=="number"){if(!zi[r])throw new Error(`Invalid bit depth: ${r}. Supported values: ${Object.keys(zi).join(", ")}`);a=Mi(a,r),i=Mi(i,r),s=Mi(s,r)}return{".":Yr(t),srgb:Yr(a),p3:Yr(i),rec2020:Yr(s)}}function Mi(e,t=30){if(t==="unlimited")return e;let r={...e};for(let[n,o]of Object.entries(e))typeof o!="number"||n==="mode"||(r[n]=zi[t](o));return r}function $t(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):e.$value.value===0?"0":`${e.$value.value}${e.$value.unit}`}function nc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):typeof e.$value=="string"?e.$value:"dashed"}function ab(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=e.partialAliasOf?.width?n(r[e.partialAliasOf.width]):$t({$value:e.$value.width},t),a=e.partialAliasOf?.color?n(r[e.partialAliasOf.color]):Mn({$value:e.$value.color},t),i=e.partialAliasOf?.style?n(r[e.partialAliasOf.style]):nc({$value:e.$value.style},t),s=u=>[o,i,typeof a=="string"?a:a[u]].join(" ");return typeof a=="string"||Ql(a.p3)?s("."):{".":s("."),srgb:s("srgb"),p3:s("p3"),rec2020:s("rec2020")}}function ac(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):`cubic-bezier(${e.$value.map((o,a)=>e.partialAliasOf?.[a]?n(r[e.partialAliasOf[a]]):o).join(", ")})`}function _i(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):`${e.$value.value}${e.$value.unit}`}var ib=/^[a-z-]+$/;function ic(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):e.$value.map(o=>ib.test(o)?o:`"${o}"`).join(", ")}function sc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):String(e.$value)}function sb(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=!1,a=[],i=[];for(let u=0;u<e.$value.length;u++){let{color:l,position:c}=e.$value[u],f=e.partialAliasOf?.[u]?.color?n(r[e.partialAliasOf[u].color]):Mn({$value:l},t);typeof f!="string"&&(o=!0),a.push(f),i.push(e.partialAliasOf?.[u]?.position?n(r[e.partialAliasOf[u].position]):`${100*c}%`)}function s(u,l="."){return`${typeof a[u]=="string"?a[u]:a[u][l]} ${i[u]}`}return o?{".":e.$value.map((u,l)=>s(l,".")).join(", "),srgb:e.$value.map((u,l)=>s(l,"srgb")).join(", "),p3:e.$value.map((u,l)=>s(l,"p3")).join(", "),rec2020:e.$value.map((u,l)=>s(l,"rec2020")).join(", ")}:e.$value.map((u,l)=>s(l,i[l])).join(", ")}function ub(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):`url("${e.$value}")`}function uc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):String(e.$value)}function lb(e,t){let{tokensSet:r,colorValue:n,partialAliasOf:o,transformAlias:a=ue}=t,i=o?.offsetX?a(r[o.offsetX]):$t({$value:e.offsetX},t),s=o?.offsetY?a(r[o.offsetY]):$t({$value:e.offsetY},t),u=o?.blur?a(r[o.blur]):$t({$value:e.blur},t),l=o?.spread?a(r[o.spread]):$t({$value:e.spread},t);return[e?.inset===!0?"inset":void 0,i,s,u,l,n].filter(Boolean).join(" ")}function cb(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=e.$value.map((s,u)=>e.partialAliasOf?.[u]?.color?n(r[e.partialAliasOf[u].color]):Mn({$value:s.color},t)),a=o.some(s=>typeof s=="object"),i=s=>e.$value.map((u,l)=>lb(u,{tokensSet:r,colorValue:typeof o[l]=="string"?o[l]:o[l][s],partialAliasOf:e.partialAliasOf?.[l],transformAlias:n})).join(", ");return a?{".":i("."),srgb:i("srgb"),p3:i("p3"),rec2020:i("rec2020")}:i(".")}function lc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):String(e.$value)}function fb(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=e.partialAliasOf?.duration?n(r[e.partialAliasOf.duration]):_i({$value:e.$value.duration},t),a=e.partialAliasOf?.delay?n(r[e.partialAliasOf.delay]):_i({$value:e.$value.delay},t),i=e.partialAliasOf?.timingFunction?n(r[e.partialAliasOf.timingFunction]):ac({$value:e.$value.timingFunction},t);return`${o} ${a} ${i}`}function db(e,t){let{tokensSet:r,transformAlias:n=ue}=t,o={};for(let[a,i]of Object.entries(e.$value)){let s,u=e.aliasChain?.[0]??e.partialAliasOf?.[a];if(u){let l=r[u];s=n(l.$type==="typography"?{id:`${u}-${a}`}:l)}else switch(a){case"fontFamily":s=ic({$value:i},t);break;case"fontSize":case"letterSpacing":s=$t({$value:i},t);break;case"fontWeight":s=sc({$value:i},t);break;case"lineHeight":typeof i=="number"?s=uc({$value:i},t):s=$t({$value:i},t);break;default:s=lc({$value:i},t);break}o[tc(a)]=s}return o}function mb(e,{mode:t,...r}){let n=e.mode[t];if(!n)return;let o={id:e.id,$type:e.$type,...n};switch(o.$type){case"boolean":return ob(o,r);case"border":return ab(o,r);case"color":return Mn(o,r);case"cubicBezier":return ac(o,r);case"dimension":return $t(o,r);case"duration":return _i(o,r);case"fontFamily":return ic(o,r);case"fontWeight":return sc(o,r);case"gradient":return sb(o,r);case"link":return ub(o,r);case"number":return uc(o,r);case"shadow":return cb(o,r);case"string":return lc(o,r);case"strokeStyle":return nc(o,r);case"transition":return fb(o,r);case"typography":return db(o,r)}}var Ct="css",pb=`/* -------------------------------------------
|
|
25
|
+
`||t[_]===" "||t[_]===" ");)_++;continue}if(n===",")return;if(n===")"){r.push({type:E.ParenClose});continue}if(n==="+"){if(_--,an(t)){r.push(Gr(t));continue}return}if(n==="-"){if(_--,an(t)){r.push(Gr(t));continue}if(ki(t)){r.push({type:E.Ident,value:cn(t)});continue}return}if(n==="."){if(_--,an(t)){r.push(Gr(t));continue}return}if(n==="/"){for(;_<t.length&&(t[_]===`
|
|
26
|
+
`||t[_]===" "||t[_]===" ");)_++;let o;if(an(t)&&(o=Gr(t),o.type!==E.Hue)){r.push({type:E.Alpha,value:o});continue}if(ki(t)&&cn(t)==="none"){r.push({type:E.Alpha,value:{type:E.None,value:void 0}});continue}return}if(/\d/.test(n)){_--,r.push(Gr(t));continue}if(Ti.test(n)){_--,r.push(Gh(t));continue}return}return r}function Yh(e){e._i=0;let t=e[e._i++];if(!t||t.type!==E.Function||t.value!=="color"||(t=e[e._i++],t.type!==E.Ident))return;let r=xl[t.value];if(!r)return;let n={mode:r},o=Cl(e,!1);if(!o)return;let a=Nt(r).channels;for(let i=0,s,u;i<a.length;i++)s=o[i],u=a[i],s.type!==E.None&&(n[u]=s.type===E.Number?s.value:s.value/100,u==="alpha"&&(n[u]=Math.max(0,Math.min(1,n[u]))));return n}function Cl(e,t){let r=[],n;for(;e._i<e.length;){if(n=e[e._i++],n.type===E.None||n.type===E.Number||n.type===E.Alpha||n.type===E.Percentage||t&&n.type===E.Hue){r.push(n);continue}if(n.type===E.ParenClose){if(e._i<e.length)return;continue}return}if(!(r.length<3||r.length>4)){if(r.length===4){if(r[3].type!==E.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:E.None,value:void 0}),r.every(o=>o.type!==E.Alpha)?r:void 0}}function Kh(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==E.Function)return;let n=Cl(e,t);if(n)return n.unshift(r.value),n}var Zh=e=>{if(typeof e!="string")return;let t=Jh(e),r=t?Kh(t,!0):void 0,n,o=0,a=ln.length;for(;o<a;)if((n=ln[o++](e,r))!==void 0)return n;return t?Yh(t):void 0},Al=Zh;function Qh(e,t){if(!t||t[0]!=="rgb"&&t[0]!=="rgba")return;let r={mode:"rgb"},[,n,o,a,i]=t;if(!(n.type===E.Hue||o.type===E.Hue||a.type===E.Hue))return n.type!==E.None&&(r.r=n.type===E.Number?n.value/255:n.value/100),o.type!==E.None&&(r.g=o.type===E.Number?o.value/255:o.value/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value/255:a.value/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var e2=Qh,t2=e=>e==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,r2=t2,o2=(e,t,r)=>e+r*(t-e),n2=e=>{let t=[];for(let r=0;r<e.length-1;r++){let n=e[r],o=e[r+1];n===void 0&&o===void 0?t.push(void 0):n!==void 0&&o!==void 0?t.push([n,o]):t.push(n!==void 0?[n,n]:[o,o])}return t},a2=e=>t=>{let r=n2(t);return n=>{let o=n*r.length,a=n>=1?r.length-1:Math.max(Math.floor(o),0),i=r[a];return i===void 0?void 0:e(i[0],i[1],o-a)}},T=a2(o2),ee=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e},i2={mode:"rgb",channels:["r","g","b","alpha"],parse:[e2,Ph,Nh,Rh,r2,"srgb"],serialize:"srgb",interpolate:{r:T,g:T,b:T,alpha:{use:T,fixup:ee}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},Mt=i2,oi=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),s2=e=>{let t=oi(e.r),r=oi(e.g),n=oi(e.b),o={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},U0=s2,ni=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),u2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"a98",r:ni(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:ni(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:ni(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(o.alpha=n),o},V0=u2,ai=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},l2=({r:e,g:t,b:r,alpha:n})=>{let o={mode:"lrgb",r:ai(e),g:ai(t),b:ai(r)};return n!==void 0&&(o.alpha=n),o},hr=l2,c2=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return o!==void 0&&(a.alpha=o),a},jt=c2,ii=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},f2=({r:e,g:t,b:r,alpha:n},o="rgb")=>{let a={mode:o,r:ii(e),g:ii(t),b:ii(r)};return n!==void 0&&(a.alpha=n),a},gr=f2,d2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=gr({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(o.alpha=n),o},Xt=d2,m2={...Mt,mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>V0(jt(e)),xyz65:V0},toMode:{rgb:e=>Xt(U0(e)),xyz65:U0}},Li=m2,p2=e=>(e=e%360)<0?e+360:e,se=p2;function h2({h:e,s:t,l:r,alpha:n}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=r+t*(r<.5?r:1-r),a=o-(o-r)*2*Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:o,g:a,b:2*r-o};break;case 1:i={r:a,g:o,b:2*r-o};break;case 2:i={r:2*r-o,g:o,b:a};break;case 3:i={r:2*r-o,g:a,b:o};break;case 4:i={r:a,g:2*r-o,b:o};break;case 5:i={r:o,g:2*r-o,b:a};break;default:i={r:2*r-o,g:2*r-o,b:2*r-o}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function g2({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsl",s:o===a?0:(o-a)/(1-Math.abs(o+a-1)),l:.5*(o+a)};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var b2=(e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},y2=b2,v2=new RegExp(`^hsla?\\(\\s*${_h}${mr}${Kr}${mr}${Kr}\\s*(?:,\\s*${Ii}\\s*)?\\)$`),D2=e=>{let t=e.match(v2);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=y2(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},x2=D2;function C2(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Percentage)return;r.h=n.value}if(o.type!==E.None){if(o.type===E.Hue)return;r.s=o.value/100}if(a.type!==E.None){if(a.type===E.Hue)return;r.l=a.value/100}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var A2=C2,$2=(e,t)=>e.map((r,n,o)=>{if(r===void 0)return r;let a=se(r);return n===0||e[n-1]===void 0?a:t(a-se(o[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),it=e=>$2(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),hn=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=se(e.h),n=se(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*o},E2=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=se(e.h),n=se(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},gn=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=se(e.h),n=se(t.h),o=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*o},F2=(e="rgb",t=[1,1,1,0])=>{let r=Nt(e),n=r.channels,o=r.difference,a=Ke(e);return(i,s)=>{let u=a(i),l=a(s);return Math.sqrt(n.reduce((c,f,m)=>{let d=o[f]?o[f](u,l):u[f]-l[f];return c+(t[m]||0)*Math.pow(isNaN(d)?0:d,2)},0))}},st=e=>{let t=e.reduce((n,o)=>{if(o!==void 0){let a=o*Math.PI/180;n.sin+=Math.sin(a),n.cos+=Math.cos(a)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},M2={mode:"hsl",toMode:{rgb:h2},fromMode:{rgb:g2},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[A2,x2],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},s:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},bn=M2;function $l({h:e,s:t,v:r,alpha:n}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r,g:r*(1-t*o),b:r*(1-t)};break;case 1:a={r:r*(1-t*o),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*o)};break;case 3:a={r:r*(1-t),g:r*(1-t*o),b:r};break;case 4:a={r:r*(1-t*o),g:r*(1-t),b:r};break;case 5:a={r,g:r*(1-t),b:r*(1-t*o)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function El({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsv",s:o===0?0:1-a/o,v:o};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var T2={mode:"hsv",toMode:{rgb:$l},parse:["--hsv"],serialize:"--hsv",fromMode:{rgb:El},channels:["h","s","v","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:T,fixup:it},s:T,v:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},Hi=T2;function k2({h:e,w:t,b:r,alpha:n}){if(t===void 0&&(t=0),r===void 0&&(r=0),t+r>1){let o=t+r;t/=o,r/=o}return $l({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function w2(e){let t=El(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,o={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(o.h=t.h),t.alpha!==void 0&&(o.alpha=t.alpha),o}function S2(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Percentage)return;r.h=n.value}if(o.type!==E.None){if(o.type===E.Hue)return;r.w=o.value/100}if(a.type!==E.None){if(a.type===E.Hue)return;r.b=a.value/100}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var R2=S2,B2={mode:"hwb",toMode:{rgb:k2},fromMode:{rgb:w2},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[R2],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},w:T,b:T,alpha:{use:T,fixup:ee}},difference:{h:E2},average:{h:st}},Ni=B2,yn=Math.pow(29,3)/Math.pow(3,3),ji=Math.pow(6,3)/Math.pow(29,3),K={X:.3457/.3585,Y:1,Z:.2958/.3585},fr={X:.3127/.329,Y:1,Z:.3583/.329},fE=Math.pow(29,3)/Math.pow(3,3),dE=Math.pow(6,3)/Math.pow(29,3),si=e=>Math.pow(e,3)>ji?Math.pow(e,3):(116*e-16)/yn,O2=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz50",x:si(a)*K.X,y:si(o)*K.Y,z:si(i)*K.Z};return n!==void 0&&(s.alpha=n),s},Xi=O2,P2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=gr({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(o.alpha=n),o},eo=P2,z2=e=>eo(Xi(e)),Fl=z2,_2=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return o!==void 0&&(a.alpha=o),a},to=_2,ui=e=>e>ji?Math.cbrt(e):(yn*e+16)/116,I2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ui(e/K.X),a=ui(t/K.Y),i=ui(r/K.Z),s={mode:"lab",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},Ui=I2,L2=e=>{let t=Ui(to(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Ml=L2;function H2(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,o,a,i]=t;if(!(n.type===E.Hue||o.type===E.Hue||a.type===E.Hue))return n.type!==E.None&&(r.l=Math.min(Math.max(0,n.value),100)),o.type!==E.None&&(r.a=o.type===E.Number?o.value:o.value*125/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value:a.value*125/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var N2=H2,j2={mode:"lab",toMode:{xyz50:Xi,rgb:Fl},fromMode:{xyz50:Ui,rgb:Ml},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[N2],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:T,a:T,b:T,alpha:{use:T,fixup:ee}}},ro=j2,Tl=Math.pow(29,3)/Math.pow(3,3),kl=Math.pow(6,3)/Math.pow(29,3),li=e=>Math.pow(e,3)>kl?Math.pow(e,3):(116*e-16)/Tl,X2=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+16)/116,a=t/500+o,i=o-r/200,s={mode:"xyz65",x:li(a)*fr.X,y:li(o)*fr.Y,z:li(i)*fr.Z};return n!==void 0&&(s.alpha=n),s},wl=X2,U2=e=>Xt(wl(e)),vn=U2,ci=e=>e>kl?Math.cbrt(e):(Tl*e+16)/116,V2=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=ci(e/fr.X),a=ci(t/fr.Y),i=ci(r/fr.Z),s={mode:"lab65",l:116*a-16,a:500*(o-a),b:200*(a-i)};return n!==void 0&&(s.alpha=n),s},Sl=V2,q2=e=>{let t=Sl(jt(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Dn=q2,W2={...ro,mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:wl,rgb:vn},fromMode:{xyz65:Sl,rgb:Dn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}},Vi=W2,G2=({l:e,a:t,b:r,alpha:n},o="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:o,l:e,c:a};return a&&(i.h=se(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},Et=G2,J2=({l:e,c:t,h:r,alpha:n},o="lab")=>{r===void 0&&(r=0);let a={mode:o,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},Ft=J2;function Y2(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(o.type!==E.None&&(r.c=Math.max(0,o.type===E.Number?o.value:o.value*150/100)),a.type!==E.None){if(a.type===E.Percentage)return;r.h=a.value}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var K2=Y2,Z2={mode:"lch",toMode:{lab:Ft,rgb:e=>Fl(Ft(e))},fromMode:{rgb:e=>Et(Ml(e)),lab:Et},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[K2],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:T,fixup:it},c:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},oo=Z2,Q2={...oo,mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>Ft(e,"lab65"),rgb:e=>vn(Ft(e,"lab65"))},fromMode:{rgb:e=>Et(Dn(e),"lch65"),lab65:e=>Et(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}},Rl=Q2,eg={...Mt,mode:"lrgb",toMode:{rgb:gr},fromMode:{rgb:hr},parse:["srgb-linear"],serialize:"srgb-linear"},qi=eg,tg=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),i=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*o-3.3077115392580616*a+.2309699031821044*i,g:-1.2684379732850317*o+2.6097573492876887*a-.3413193760026573*i,b:-.0041960761386756*o-.7034186179359362*a+1.7076146940746117*i};return n!==void 0&&(s.alpha=n),s},no=tg,rg=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),i=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*o+.7936177747023054*a-.0040720430116193*i,a:1.9779985324311684*o-2.42859224204858*a+.450593709617411*i,b:.0259040424655478*o+.7827717124575296*a-.8086757549230774*i};return n!==void 0&&(s.alpha=n),s},Bl=rg,og=e=>{let t=Bl(hr(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},xn=og,ng=e=>gr(no(e)),Cn=ng;function ag(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,o,a,i]=t;if(!(n.type===E.Hue||o.type===E.Hue||a.type===E.Hue))return n.type!==E.None&&(r.l=Math.min(Math.max(0,n.type===E.Number?n.value:n.value/100),1)),o.type!==E.None&&(r.a=o.type===E.Number?o.value:o.value*.4/100),a.type!==E.None&&(r.b=a.type===E.Number?a.value:a.value*.4/100),i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var ig=ag,sg={...ro,mode:"oklab",toMode:{lrgb:no,rgb:Cn},fromMode:{lrgb:Bl,rgb:xn},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[ig],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`},Wi=sg;function ug(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,o,a,i]=t;if(n.type!==E.None){if(n.type===E.Hue)return;r.l=Math.min(Math.max(0,n.type===E.Number?n.value:n.value/100),1)}if(o.type!==E.None&&(r.c=Math.max(0,o.type===E.Number?o.value:o.value*.4/100)),a.type!==E.None){if(a.type===E.Percentage)return;r.h=a.value}return i.type!==E.None&&(r.alpha=Math.min(1,Math.max(0,i.type===E.Number?i.value:i.value/100))),r}var lg=ug,cg={...oo,mode:"oklch",toMode:{oklab:e=>Ft(e,"oklab"),rgb:e=>Cn(Ft(e,"oklab"))},fromMode:{rgb:e=>Et(xn(e),"oklch"),oklab:e=>Et(e,"oklch")},parse:[lg],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}},Gi=cg,fg=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return o!==void 0&&(a.alpha=o),a},q0=fg,dg=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=gr({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(o.alpha=n),o},W0=dg,mg={...Mt,mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>W0(jt(e)),xyz65:W0},toMode:{rgb:e=>Xt(q0(e)),xyz65:q0}},Ji=mg,fi=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},pg=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"prophoto",r:fi(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:fi(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:fi(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(o.alpha=n),o},G0=pg,di=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},hg=e=>{let t=di(e.r),r=di(e.g),n=di(e.b),o={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},J0=hg,gg={...Mt,mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:G0,rgb:e=>G0(to(e))},toMode:{xyz50:J0,rgb:e=>eo(J0(e))}},Yi=gg,Y0=1.09929682680944,bg=.018053968510807,mi=e=>{let t=Math.abs(e);return t>bg?(Math.sign(e)||1)*(Y0*Math.pow(t,.45)-(Y0-1)):4.5*e},yg=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rec2020",r:mi(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:mi(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:mi(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(o.alpha=n),o},K0=yg,Z0=1.09929682680944,vg=.018053968510807,pi=(e=0)=>{let t=Math.abs(e);return t<vg*4.5?e/4.5:(Math.sign(e)||1)*Math.pow((t+Z0-1)/Z0,1/.45)},Dg=e=>{let t=pi(e.r),r=pi(e.g),n=pi(e.b),o={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(o.alpha=e.alpha),o},Q0=Dg,xg={...Mt,mode:"rec2020",fromMode:{xyz65:K0,rgb:e=>K0(jt(e))},toMode:{xyz65:Q0,rgb:e=>Xt(Q0(e))},parse:["rec2020"],serialize:"rec2020"},Ki=xg,Cg={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:eo,lab:Ui},fromMode:{rgb:to,lab:Xi},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:ee}}},Zi=Cg,Ag=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return o!==void 0&&(a.alpha=o),a},$g=Ag,Eg=e=>{let{x:t,y:r,z:n,alpha:o}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return o!==void 0&&(a.alpha=o),a},Fg=Eg,Mg={mode:"xyz65",toMode:{rgb:Xt,xyz50:$g},fromMode:{rgb:jt,xyz50:Fg},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:T,y:T,z:T,alpha:{use:T,fixup:ee}}},Qi=Mg,mE=w(Li),pE=w(bn),hE=w(Hi),gE=w(Ni),bE=w(ro),yE=w(Vi),vE=w(oo),DE=w(Rl),xE=w(qi),CE=w(Wi),AE=w(Gi),$E=w(Ji),EE=w(Yi),FE=w(Ki),ME=w(Mt),TE=w(Zi),kE=w(Qi),ae=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Tg=Math.PI/180,kg=180/Math.PI,el=ae[3]*ae[4],tl=ae[1]*ae[4],rl=ae[1]*ae[2]-ae[0]*ae[3],wg=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(rl*r+e*el-t*tl)/(rl+el-tl),a=r-o,i=(ae[4]*(t-o)-ae[2]*a)/ae[3],s={mode:"cubehelix",l:o,s:o===0||o===1?void 0:Math.sqrt(a*a+i*i)/(ae[4]*o*(1-o))};return s.s&&(s.h=Math.atan2(i,a)*kg-120),n!==void 0&&(s.alpha=n),s},Sg=wg,Rg=({h:e,s:t,l:r,alpha:n})=>{let o={mode:"rgb"};e=(e===void 0?0:e+120)*Tg,r===void 0&&(r=0);let a=t===void 0?0:t*r*(1-r),i=Math.cos(e),s=Math.sin(e);return o.r=r+a*(ae[0]*i+ae[1]*s),o.g=r+a*(ae[2]*i+ae[3]*s),o.b=r+a*(ae[4]*i+ae[5]*s),n!==void 0&&(o.alpha=n),o},Bg=Rg,Og={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Sg},toMode:{rgb:Bg},interpolate:{h:{use:T,fixup:it},s:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},Pg=Og,fn=1,Ol=1,Qr=26/180*Math.PI,dn=Math.cos(Qr),mn=Math.sin(Qr),Pl=100/Math.log(139/100),zg=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"lab65",l:(Math.exp(e*fn/Pl)-1)/.0039},a=(Math.exp(.0435*t*Ol*fn)-1)/.075,i=a*Math.cos(r/180*Math.PI-Qr),s=a*Math.sin(r/180*Math.PI-Qr);return o.a=i*dn-s/.83*mn,o.b=i*mn+s/.83*dn,n!==void 0&&(o.alpha=n),o},wi=zg,_g=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=t*dn+r*mn,a=.83*(r*dn-t*mn),i=Math.sqrt(o*o+a*a),s={mode:"dlch",l:Pl/fn*Math.log(1+.0039*e),c:Math.log(1+.075*i)/(.0435*Ol*fn)};return s.c&&(s.h=se((Math.atan2(a,o)+Qr)/Math.PI*180)),n!==void 0&&(s.alpha=n),s},Si=_g,ol=e=>wi(Et(e,"dlch")),nl=e=>Ft(Si(e),"dlab"),Ig={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:ol,rgb:e=>vn(ol(e))},fromMode:{lab65:nl,rgb:e=>nl(Dn(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:T,a:T,b:T,alpha:{use:T,fixup:ee}}},Lg=Ig,Hg={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:wi,dlab:e=>Ft(e,"dlab"),rgb:e=>vn(wi(e))},fromMode:{lab65:Si,dlab:e=>Et(e,"dlch"),rgb:e=>Si(Dn(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:T,c:T,h:{use:T,fixup:it},alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},Ng=Hg;function jg({h:e,s:t,i:r,alpha:n}){e=se(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1+t*(3/(2-o)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-o)-1)),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-o)/(2-o)-1)),b:r*(1+t*(3/(2-o)-1))};break;case 4:a={r:r*(1+t*(3*(1-o)/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3/(2-o)-1))};break;case 5:a={r:r*(1+t*(3/(2-o)-1)),g:r*(1-t),b:r*(1+t*(3*(1-o)/(2-o)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",n!==void 0&&(a.alpha=n),a}function Xg({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.max(e,t,r),a=Math.min(e,t,r),i={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return o-a!==0&&(i.h=(o===e?(t-r)/(o-a)+(t<r)*6:o===t?(r-e)/(o-a)+2:(e-t)/(o-a)+4)*60),n!==void 0&&(i.alpha=n),i}var Ug={mode:"hsi",toMode:{rgb:jg},parse:["--hsi"],serialize:"--hsi",fromMode:{rgb:Xg},channels:["h","s","i","alpha"],ranges:{h:[0,360]},gamut:"rgb",interpolate:{h:{use:T,fixup:it},s:T,i:T,alpha:{use:T,fixup:ee}},difference:{h:hn},average:{h:st}},Vg=Ug,zl=203,An=.1593017578125,_l=78.84375,$n=.8359375,En=18.8515625,Fn=18.6875;function hi(e){if(e<0)return 0;let t=Math.pow(e,1/_l);return 1e4*Math.pow(Math.max(0,t-$n)/(En-Fn*t),1/An)}function gi(e){if(e<0)return 0;let t=Math.pow(e/1e4,An);return Math.pow(($n+En*t)/(1+Fn*t),_l)}var bi=e=>Math.max(e/zl,0),qg=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=hi(e+.008609037037932761*t+.11102962500302593*r),a=hi(e-.00860903703793275*t-.11102962500302599*r),i=hi(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:bi(2.070152218389422*o-1.3263473389671556*a+.2066510476294051*i),y:bi(.3647385209748074*o+.680566024947227*a-.0453045459220346*i),z:bi(-.049747207535812*o-.0492609666966138*a+1.1880659249923042*i)};return n!==void 0&&(s.alpha=n),s},al=qg,yi=(e=0)=>Math.max(e*zl,0),Wg=({x:e,y:t,z:r,alpha:n})=>{let o=yi(e),a=yi(t),i=yi(r),s=gi(.3592832590121217*o+.6976051147779502*a-.0358915932320289*i),u=gi(-.1920808463704995*o+1.1004767970374323*a+.0753748658519118*i),l=gi(.0070797844607477*o+.0748396662186366*a+.8433265453898765*i),c=.5*s+.5*u,f=1.61376953125*s-3.323486328125*u+1.709716796875*l,m=4.378173828125*s-4.24560546875*u-.132568359375*l,d={mode:"itp",i:c,t:f,p:m};return n!==void 0&&(d.alpha=n),d},il=Wg,Gg={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:al,rgb:e=>Xt(al(e))},fromMode:{xyz65:il,rgb:e=>il(jt(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:T,t:T,p:T,alpha:{use:T,fixup:ee}}},Jg=Gg,Yg=134.03437499999998,Kg=16295499532821565e-27,vi=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,An);return Math.pow(($n+En*t)/(1+Fn*t),Yg)},Di=(e=0)=>Math.max(e*203,0),Zg=({x:e,y:t,z:r,alpha:n})=>{e=Di(e),t=Di(t),r=Di(r);let o=1.15*e-.15*r,a=.66*t+.34*e,i=vi(.41478972*o+.579999*a+.014648*r),s=vi(-.20151*o+1.120649*a+.0531008*r),u=vi(-.0166008*o+.2648*a+.6684799*r),l=(i+s)/2,c={mode:"jab",j:.44*l/(1-.56*l)-Kg,a:3.524*i-4.066708*s+.542708*u,b:.199076*i+1.096799*s-1.295875*u};return n!==void 0&&(c.alpha=n),c},Il=Zg,Qg=134.03437499999998,sl=16295499532821565e-27,xi=e=>{if(e<0)return 0;let t=Math.pow(e,1/Qg);return 1e4*Math.pow(($n-t)/(Fn*t-En),1/An)},Ci=e=>e/203,e5=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=(e+sl)/(.44+.56*(e+sl)),a=xi(o+.13860504*t+.058047316*r),i=xi(o-.13860504*t-.058047316*r),s=xi(o-.096019242*t-.8118919*r),u={mode:"xyz65",x:Ci(1.661373024652174*a-.914523081304348*i+.23136208173913045*s),y:Ci(-.3250758611844533*a+1.571847026732543*i-.21825383453227928*s),z:Ci(-.090982811*a-.31272829*i+1.5227666*s)};return n!==void 0&&(u.alpha=n),u},Ll=e5,t5=e=>{let t=Il(jt(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},Hl=t5,r5=e=>Xt(Ll(e)),Nl=r5,o5={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Hl,xyz65:Il},toMode:{rgb:Nl,xyz65:Ll},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:T,a:T,b:T,alpha:{use:T,fixup:ee}}},n5=o5,a5=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:o};return o&&(a.h=se(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},ul=a5,i5=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},ll=i5,s5={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:ll,rgb:e=>Nl(ll(e))},fromMode:{rgb:e=>ul(Hl(e)),jab:ul},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:T,fixup:it},c:T,j:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},u5=s5,l5=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let o=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:o};return o&&(a.h=se(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(a.alpha=n),a},jl=l5,c5=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let o={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(o.alpha=n),o},Xl=c5,Ul=(e,t,r)=>4*e/(e+15*t+3*r),Vl=(e,t,r)=>9*t/(e+15*t+3*r),f5=Ul(K.X,K.Y,K.Z),d5=Vl(K.X,K.Y,K.Z),m5=e=>e<=ji?yn*e:116*Math.cbrt(e)-16,p5=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=m5(t/K.Y),a=Ul(e,t,r),i=Vl(e,t,r);!isFinite(a)||!isFinite(i)?o=a=i=0:(a=13*o*(a-f5),i=13*o*(i-d5));let s={mode:"luv",l:o,u:a,v:i};return n!==void 0&&(s.alpha=n),s},Ri=p5,h5=(e,t,r)=>4*e/(e+15*t+3*r),g5=(e,t,r)=>9*t/(e+15*t+3*r),b5=h5(K.X,K.Y,K.Z),y5=g5(K.X,K.Y,K.Z),v5=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let o=t/(13*e)+b5,a=r/(13*e)+y5,i=K.Y*(e<=8?e/yn:Math.pow((e+16)/116,3)),s=i*(9*o)/(4*a),u=i*(12-3*o-20*a)/(4*a),l={mode:"xyz50",x:s,y:i,z:u};return n!==void 0&&(l.alpha=n),l},Bi=v5,D5=e=>jl(Ri(to(e))),x5=e=>eo(Bi(Xl(e))),C5={mode:"lchuv",toMode:{luv:Xl,rgb:x5},fromMode:{rgb:D5,luv:jl},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:T,fixup:it},c:T,l:T,alpha:{use:T,fixup:ee}},difference:{h:gn},average:{h:st}},A5=C5,$5={mode:"luv",toMode:{xyz50:Bi,rgb:e=>eo(Bi(e))},fromMode:{xyz50:Ri,rgb:e=>Ri(to(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:T,u:T,v:T,alpha:{use:T,fixup:ee}}},E5=$5;function Oi(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function pn(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function F5(e,t){let r,n,o,a,i,s,u,l;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,o=.59662641,a=.75515197,i=.56771245,s=4.0767416621,u=-3.3077115913,l=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,o=.08285427,a=.1254107,i=.14503204,s=-1.2684380046,u=2.6097574011,l=-.3413193965):(r=1.35733652,n=-.00915799,o=-1.1513021,a=-.50559606,i=.00692167,s=-.0041960863,u=-.7034186147,l=1.707614701);let c=r+n*e+o*t+a*e*e+i*e*t,f=.3963377774*e+.2158037573*t,m=-.1055613458*e-.0638541728*t,d=-.0894841775*e-1.291485548*t;{let g=1+c*f,p=1+c*m,y=1+c*d,b=g*g*g,D=p*p*p,C=y*y*y,F=3*f*g*g,v=3*m*p*p,M=3*d*y*y,$=6*f*f*g,k=6*m*m*p,R=6*d*d*y,I=s*b+u*D+l*C,X=s*F+u*v+l*M,G=s*$+u*k+l*R;c=c-I*X/(X*X-.5*I*G)}return c}function es(e,t){let r=F5(e,t),n=no({l:1,a:r*e,b:r*t}),o=Math.cbrt(1/Math.max(n.r,n.g,n.b)),a=o*r;return[o,a]}function M5(e,t,r,n,o,a=null){a||(a=es(e,t));let i;if((r-o)*a[1]-(a[0]-o)*n<=0)i=a[1]*o/(n*a[0]+a[1]*(o-r));else{i=a[1]*(o-1)/(n*(a[0]-1)+a[1]*(o-r));{let s=r-o,u=n,l=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,m=s+u*l,d=s+u*c,g=s+u*f;{let p=o*(1-i)+i*r,y=i*n,b=p+y*l,D=p+y*c,C=p+y*f,F=b*b*b,v=D*D*D,M=C*C*C,$=3*m*b*b,k=3*d*D*D,R=3*g*C*C,I=6*m*m*b,X=6*d*d*D,G=6*g*g*C,le=4.0767416621*F-3.3077115913*v+.2309699292*M-1,Z=4.0767416621*$-3.3077115913*k+.2309699292*R,ut=4.0767416621*I-3.3077115913*X+.2309699292*G,Ne=Z/(Z*Z-.5*le*ut),ce=-le*Ne,je=-1.2684380046*F+2.6097574011*v-.3413193965*M-1,Oe=-1.2684380046*$+2.6097574011*k-.3413193965*R,Tt=-1.2684380046*I+2.6097574011*X-.3413193965*G,Ze=Oe/(Oe*Oe-.5*je*Tt),Pe=-je*Ze,Xe=-.0041960863*F-.7034186147*v+1.707614701*M-1,Ue=-.0041960863*$-.7034186147*k+1.707614701*R,Ut=-.0041960863*I-.7034186147*X+1.707614701*G,kt=Ue/(Ue*Ue-.5*Xe*Ut),Qe=-Xe*kt;ce=Ne>=0?ce:1e6,Pe=Ze>=0?Pe:1e6,Qe=kt>=0?Qe:1e6,i+=Math.min(ce,Math.min(Pe,Qe))}}}return i}function ts(e,t,r=null){r||(r=es(e,t));let n=r[0],o=r[1];return[o/n,o/(1-n)]}function ql(e,t,r){let n=es(t,r),o=M5(t,r,e,1,e,n),a=ts(t,r,n),i=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),u=o/Math.min(e*a[0],(1-e)*a[1]),l=e*i,c=(1-e)*s,f=.9*u*Math.sqrt(Math.sqrt(1/(1/(l*l*l*l)+1/(c*c*c*c))));return l=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(l*l)+1/(c*c))),f,o]}function cl(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o={mode:"okhsl",l:Oi(t)};e.alpha!==void 0&&(o.alpha=e.alpha);let a=Math.sqrt(r*r+n*n);if(!a)return o.s=0,o;let[i,s,u]=ql(t,r/a,n/a),l;if(a<s){let c=0,f=.8*i,m=1-f/s;l=(a-c)/(f+m*(a-c))*.8}else{let c=s,f=.2*s*s*1.25*1.25/i,m=1-f/(u-s);l=.8+.2*((a-c)/(f+m*(a-c)))}return l&&(o.s=l,o.h=se(Math.atan2(n,r)*180/Math.PI)),o}function fl(e){let t=e.h!==void 0?e.h:0,r=e.s!==void 0?e.s:0,n=e.l!==void 0?e.l:0,o={mode:"oklab",l:pn(n)};if(e.alpha!==void 0&&(o.alpha=e.alpha),!r||n===1)return o.a=o.b=0,o;let a=Math.cos(t/180*Math.PI),i=Math.sin(t/180*Math.PI),[s,u,l]=ql(o.l,a,i),c,f,m,d;r<.8?(c=1.25*r,f=0,m=.8*s,d=1-m/u):(c=5*(r-.8),f=u,m=.2*u*u*1.25*1.25/s,d=1-m/(l-u));let g=f+c*m/(1-d*c);return o.a=g*a,o.b=g*i,o}var T5={...bn,mode:"okhsl",channels:["h","s","l","alpha"],parse:["--okhsl"],serialize:"--okhsl",fromMode:{oklab:cl,rgb:e=>cl(xn(e))},toMode:{oklab:fl,rgb:e=>Cn(fl(e))}},k5=T5;function dl(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,o=Math.sqrt(r*r+n*n),a=o?r/o:1,i=o?n/o:1,[s,u]=ts(a,i),l=.5,c=1-l/s,f=u/(o+t*u),m=f*t,d=f*o,g=pn(m),p=d*g/m,y=no({l:g,a:a*p,b:i*p}),b=Math.cbrt(1/Math.max(y.r,y.g,y.b,0));t=t/b,o=o/b*Oi(t)/t,t=Oi(t);let D={mode:"okhsv",s:o?(l+u)*d/(u*l+u*c*d):0,v:t?t/m:0};return D.s&&(D.h=se(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(D.alpha=e.alpha),D}function ml(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,o=e.v!==void 0?e.v:0,a=Math.cos(r/180*Math.PI),i=Math.sin(r/180*Math.PI),[s,u]=ts(a,i),l=.5,c=1-l/s,f=1-n*l/(l+u-u*c*n),m=n*u*l/(l+u-u*c*n),d=pn(f),g=m*d/f,p=no({l:d,a:a*g,b:i*g}),y=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),b=pn(o*f),D=m*b/f;return t.l=b*y,t.a=D*a*y,t.b=D*i*y,t}var w5={...Hi,mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:dl,rgb:e=>dl(xn(e))},toMode:{oklab:ml,rgb:e=>Cn(ml(e))}},Wl=w5,Ht=.0037930732552754493,Gl=Math.cbrt(Ht),Ai=e=>Math.cbrt(e)-Gl,S5=e=>{let{r:t,g:r,b:n,alpha:o}=hr(e),a=Ai(.3*t+.622*r+.078*n+Ht),i=Ai(.23*t+.692*r+.078*n+Ht),s=Ai(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+Ht),u={mode:"xyb",x:(a-i)/2,y:(a+i)/2,b:s-(a+i)/2};return o!==void 0&&(u.alpha=o),u},R5=S5,$i=e=>Math.pow(e+Gl,3),B5=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o=$i(e+t)-Ht,a=$i(t-e)-Ht,i=$i(r+t)-Ht,s=gr({r:11.031566904639861*o-9.866943908131562*a-.16462299650829934*i,g:-3.2541473810744237*o+4.418770377582723*a-.16462299650829934*i,b:-3.6588512867136815*o+2.7129230459360922*a+1.9459282407775895*i});return n!==void 0&&(s.alpha=n),s},O5=B5,P5={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:O5},fromMode:{rgb:R5},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:T,y:T,b:T,alpha:{use:T,fixup:ee}}},z5=P5,_5=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(o.alpha=n),o},I5=_5,L5=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let o={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(o.alpha=n),o},H5=L5,N5={mode:"yiq",toMode:{rgb:H5},fromMode:{rgb:I5},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:T,i:T,q:T,alpha:{use:T,fixup:ee}}},j5=N5,X5=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,U5=(e=4)=>t=>typeof t=="number"?X5(t,e):t,Jr=U5,wE=Jr(2),V5=e=>Math.max(0,Math.min(1,e||0)),un=e=>Math.round(V5(e)*255),Jl=Ke("rgb"),SE=Ke("hsl"),Yl=e=>{if(e===void 0)return;let t=un(e.r),r=un(e.g),n=un(e.b);return"#"+(1<<24|t<<16|r<<8|n).toString(16).slice(1)},q5=e=>{if(e===void 0)return;let t=un(e.alpha!==void 0?e.alpha:1);return Yl(e)+(256|t).toString(16).slice(1)},Yr=e=>{let t=Zr(e);if(!t)return;let r=Nt(t.mode);if(!r.serialize||typeof r.serialize=="string"){let n=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((o,a)=>{o!=="alpha"&&(n+=(a?" ":"")+(t[o]!==void 0?t[o]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(n+=` / ${t.alpha}`),n+")"}if(typeof r.serialize=="function")return r.serialize(t)},Kl=e=>Yl(Jl(e)),W5=e=>q5(Jl(e)),G5=Ke("rgb"),J5=e=>{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},Zl=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function Ql(e){return Zl(G5(e))}function ec(e="rgb"){let{gamut:t}=Nt(e);if(!t)return n=>!0;let r=Ke(typeof t=="string"?t:e);return n=>Zl(r(n))}function Y5(e="rgb"){let{gamut:t}=Nt(e);if(!t)return a=>Zr(a);let r=typeof t=="string"?t:e,n=Ke(r),o=ec(r);return a=>{let i=Zr(a);if(!i)return;let s=n(i);if(o(s))return i;let u=J5(s);return i.mode===u.mode?u:Ke(i.mode)(u)}}function Ei(e="rgb",t="oklch",r=F2("oklch"),n=.02){let o=Ke(e),a=Nt(e);if(!a.gamut)return c=>o(c);let i=ec(e),s=Y5(e),u=Ke(t),{ranges:l}=Nt(t);if(!l.l||!l.c)throw new Error("LCH-like space expected");return c=>{if(c=Zr(c),c===void 0)return;let f={...u(c)};if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=l.l[1]){let y={...a.white,mode:e};return c.alpha!==void 0&&(y.alpha=c.alpha),y}if(f.l<=l.l[0]){let y={...a.black,mode:e};return c.alpha!==void 0&&(y.alpha=c.alpha),y}if(i(f))return o(f);let m=0,d=f.c,g=(l.c[1]-l.c[0])/4e3,p=s(f);for(;d-m>g;)f.c=(m+d)*.5,p=s(f),i(f)||r&&n>0&&r(f,p)<=n?m=f.c:d=f.c;return o(i(f)?f:p)}}var K5=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,pl={a98:"a98-rgb",hsl:"hsl",hwb:"hwb",lab:"lab",lab65:"lab-d65",lch:"lch",lrgb:"srgb-linear",oklab:"oklab",oklch:"oklch",okhsv:"okhsv",p3:"display-p3",prophoto:"prophoto-rgb",rec2020:"rec2020",rgb:"srgb",xyz50:"xyz-d50",xyz65:"xyz-d65"},dr={"a98-rgb":"a98","display-p3":"p3",hsl:"hsl",hwb:"hwb",lab:"lab","lab-d65":"lab65",lch:"lch",oklab:"oklab",oklch:"oklch",okhsv:"okhsv","prophoto-rgb":"prophoto",rec2020:"rec2020",srgb:"rgb","srgb-linear":"lrgb",xyz:"xyz65","xyz-d50":"xyz50","xyz-d65":"xyz65"};function Z5(e){let t=Al(e);if(!t)throw new Error(`Unable to parse color "${e}"`);if(!(t.mode in pl))throw new Error(`Unsupported color space: ${t.mode}`);let r=pl[t.mode],n=[0,0,0];switch(t.mode){case"a98":case"rec2020":case"p3":case"prophoto":case"lrgb":case"rgb":n=[t.r,t.g,t.b];break;case"hsl":{let a=At[r].ranges[1]?.[1]??1,i=At[r].ranges[2]?.[1]??1;n=[t.h??0,t.s*a,t.l*i];break}case"hwb":{let a=At[r].ranges[1]?.[1]??1,i=At[r].ranges[2]?.[1]??1;n=[t.h??0,t.w*a,t.b*i];break}case"lab":case"lab65":case"oklab":n=[t.l,t.a,t.b];break;case"lch":case"oklch":n=[t.l,t.c,t.h??0];break;case"okhsv":n=[t.h??0,t.s,t.v];break;case"xyz50":case"xyz65":n=[t.x,t.y,t.z];break}let o={colorSpace:r,components:n,alpha:t.alpha??1};return K5.test(e)&&(o.hex=Kl(t)),o}function Q5(e){switch(e.colorSpace){case"a98-rgb":case"display-p3":case"prophoto-rgb":case"rec2020":case"srgb":case"srgb-linear":{let[t,r,n]=e.components;return{mode:dr[e.colorSpace]||e.colorSpace,r:t,g:r,b:n,alpha:e.alpha}}case"hsl":{let[t,r,n]=e.components,o=At[e.colorSpace].ranges[1]?.[1]??1,a=At[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hsl",h:t,s:r/o,l:n/a,alpha:e.alpha}}case"hwb":{let[t,r,n]=e.components,o=At[e.colorSpace].ranges[1]?.[1]??1,a=At[e.colorSpace].ranges[2]?.[1]??1;return{mode:"hwb",h:t,w:r/o,b:n/a,alpha:e.alpha}}case"lab":case"lab-d65":case"oklab":{let[t,r,n]=e.components;return{mode:e.colorSpace==="lab-d65"?"lab65":e.colorSpace,l:t,a:r,b:n,alpha:e.alpha}}case"lch":case"oklch":{let[t,r,n]=e.components;return{mode:e.colorSpace,l:t,c:r,h:n,alpha:e.alpha}}case"okhsv":{let[t,r,n]=e.components;return{mode:e.colorSpace,h:t,s:r,v:n,alpha:e.alpha}}case"xyz":case"xyz-d50":case"xyz-d65":{let[t,r,n]=e.components;return{mode:dr[e.colorSpace],x:t,y:r,z:n,alpha:e.alpha}}default:throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of ${Object.keys(dr).join(", ")}`)}}var At={"a98-rgb":{ranges:[[0,1],[0,1],[0,1]]},"display-p3":{ranges:[[0,1],[0,1],[0,1]]},hsl:{ranges:[[0,360],[0,100],[0,100]]},hwb:{ranges:[[0,360],[0,100],[0,100]]},lab:{ranges:[[0,100],[-125,125],[-125,125]]},"lab-d65":{ranges:[[0,100],[-125,125],[-125,125]]},lch:{ranges:[[0,100],[0,150],[0,360]]},oklab:{ranges:[[0,1],[-.4,.4],[-.4,.4]]},oklch:{ranges:[[0,1],[0,.4],[0,360]]},okhsv:{ranges:[[0,360],[0,1],[0,1]]},"prophoto-rgb":{ranges:[[0,1],[0,1],[0,1]]},rec2020:{ranges:[[0,1],[0,1],[0,1]]},srgb:{ranges:[[0,1],[0,1],[0,1]]},"srgb-linear":{ranges:[[0,1],[0,1],[0,1]]},"xyz-d50":{ranges:[[0,1],[0,1],[0,1]]},xyz:{ranges:[[0,1],[0,1],[0,1]]},"xyz-d65":{ranges:[[0,1],[0,1],[0,1]]}};function tc(e){let t="";for(let r of e.split("")){if(r==="."){t+="-";continue}let n=!0;if(n&&/\p{Uppercase_Letter}/u.test(r)){t+=`-${r.toLocaleLowerCase()}`,n=!1;continue}else n=!0;t+=r}return t}function Pi(e){return e==="-"||e==="^"||e==="$"||e==="+"||e==="."||e==="("||e===")"||e==="|"||e==="["||e==="]"||e==="{"||e==="}"||e==="*"||e==="?"||e==="\\"?"\\".concat(e):e}function eb(e){for(var t="",r=0;r<e.length;r++)t+=Pi(e[r]);return t}function rc(e,t){if(t===void 0&&(t=!0),Array.isArray(e)){var r=e.map(function(y){return"^".concat(rc(y,t),"$")});return"(?:".concat(r.join("|"),")")}var n="",o="",a=".";t===!0?(n="/",o="[/\\\\]",a="[^/\\\\]"):t&&(n=t,o=eb(n),o.length>1?(o="(?:".concat(o,")"),a="((?!".concat(o,").)")):a="[^".concat(o,"]"));for(var i=t?"".concat(o,"+?"):"",s=t?"".concat(o,"*?"):"",u=t?e.split(n):[e],l="",c=0;c<u.length;c++){var f=u[c],m=u[c+1],d="";if(!(!f&&c>0)){if(t&&(c===u.length-1?d=s:m!=="**"?d=i:d=""),t&&f==="**"){d&&(l+=c===0?"":c===u.length-1?"(?:".concat(i,"|$)"):i,l+="(?:".concat(a,"*?").concat(d,")*?"));continue}for(var g=0;g<f.length;g++){var p=f[g];p==="\\"?g<f.length-1&&(l+=Pi(f[g+1]),g++):p==="?"?l+=a:p==="*"?l+="".concat(a,"*?"):l+=Pi(p)}l+=d}}return l}function tb(e,t){if(typeof t!="string")throw new TypeError("Sample must be a string, but ".concat(typeof t," given"));return e.test(t)}function oc(e,t){if(typeof e!="string"&&!Array.isArray(e))throw new TypeError("The first argument must be a single pattern string or an array of patterns, but ".concat(typeof e," given"));if((typeof t=="string"||typeof t=="boolean")&&(t={separator:t}),arguments.length===2&&!(typeof t>"u"||typeof t=="object"&&t!==null&&!Array.isArray(t)))throw new TypeError("The second argument must be an options object or a string/boolean separator, but ".concat(typeof t," given"));if(t=t||{},t.separator==="\\")throw new Error("\\ is not a valid separator because it is used for escaping. Try setting the separator to `true` instead");var r=rc(e,t.separator),n=new RegExp("^".concat(r,"$"),t.flags),o=tb.bind(null,n);return o.options=t,o.pattern=e,o.regexp=n,o}function rb(e,{$type:t}){if(e){if(typeof e!="string"&&typeof e!="object"||Array.isArray(e))throw new Error(`transform(): expected string or Object of strings, received ${Array.isArray(e)?"Array":typeof e}`);switch(t){case"typography":if(typeof e!="object")throw new Error("transform(): typography tokens must be an object of keys");break}}}var RE=w(Li),BE=w(Pg),OE=w(Lg),PE=w(Ng),zE=w(Vg),_E=w(bn),IE=w(Hi),LE=w(Ni),HE=w(Jg),NE=w(n5),jE=w(u5),XE=w(ro),UE=w(Vi),VE=w(oo),qE=w(Rl),WE=w(A5),GE=w(qi),JE=w(E5),YE=w(k5),KE=w(Wl),ZE=w(Wi),QE=w(Gi),eF=w(Ji),tF=w(Yi),rF=w(Ki),oF=w(Mt),nF=w(z5),aF=w(Zi),iF=w(Qi),sF=w(j5);function ue(e){if(!e)throw new Error("Undefined token");return`var(${pr(e.id)})`}function hl({$type:e,localID:t}){if(e==="transition")return["duration","delay","timing-function"].map(r=>pr(`${t}-${r}`,{wrapVar:!0})).join(" ")}var ob=/(?:(\p{Uppercase_Letter}?[\p{Lowercase_Letter}\p{Number}]+|[\p{Uppercase_Letter}\p{Number}]+|[\u{80}-\u{10FFFF}\p{Number}]+)|.)/u;function pr(e,{prefix:t,wrapVar:r=!1}={}){if(typeof e!="string")throw new Error(`makeCSSVar() Expected string, received ${e}`);let n=e.split(ob).filter(Boolean).join("-");t&&!n.startsWith(`${t}-`)&&(n=`${t}-${n}`);let o=`--${n}`.toLocaleLowerCase();return r?`var(${o})`:o}function nb(e,{tokensSet:t,transformAlias:r=ue}){return e.aliasChain?.[0]?r(t[e.aliasChain[0]]):e.$value===!0?"1":"0"}function Mn(e,t){let{transformAlias:r=ue,tokensSet:n}=t;if(e.aliasChain?.[0])return r(n[e.aliasChain[0]]);let{colorSpace:o,components:a,alpha:i=1}=typeof e.$value=="string"?Z5(e.$value):e.$value,s=Q5({colorSpace:o,components:a,alpha:i});if(!s)throw new Error(`Can\u2019t convert color ${JSON.stringify(e.$value)} to Culori color`);let u=Yr;return t.color?.legacyHex&&(u=s.alpha!==1?W5:Kl),Ql(s)?u(s):ab({colorSpace:o,components:a,alpha:i},s,t.color?.depth)}var Fi={a98:w(Li),hsl:w(bn),hwb:w(Ni),lab:w(ro),lab65:w(Vi),lch:w(oo),lrgb:w(qi),oklab:w(Wi),oklch:w(Gi),okhsv:w(Wl),p3:w(Ji),prophoto:w(Yi),rec2020:w(Ki),rgb:w(Mt),xyz50:w(Zi),xyz65:w(Qi)},zi={24:Jr(4),30:Jr(4),36:Jr(5),48:Jr(6)};function ab(e,t,r=30){if(!(e.colorSpace in dr))throw new Error(`Invalid colorSpace "${e.colorSpace}". Expected one of: ${Object.keys(dr).join(", ")}`);let n=dr[e.colorSpace]||"oklab",o=n;o==="lab"||o==="lab65"?o="lch":o==="oklab"&&(o="oklch");let a=Fi[n](Ei("rgb",o)(t)),i=Fi[n](Ei("p3",o)(t)),s=Fi[n](Ei("rec2020",o)(t));if(typeof r=="number"){if(!zi[r])throw new Error(`Invalid bit depth: ${r}. Supported values: ${Object.keys(zi).join(", ")}`);a=Mi(a,r),i=Mi(i,r),s=Mi(s,r)}return{".":Yr(t),srgb:Yr(a),p3:Yr(i),rec2020:Yr(s)}}function Mi(e,t=30){if(t==="unlimited")return e;let r={...e};for(let[n,o]of Object.entries(e))typeof o!="number"||n==="mode"||(r[n]=zi[t](o));return r}function $t(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):e.$value.value===0?"0":`${e.$value.value}${e.$value.unit}`}function nc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):typeof e.$value=="string"?e.$value:"dashed"}function ib(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=e.partialAliasOf?.width?n(r[e.partialAliasOf.width]):$t({$value:e.$value.width},t),a=e.partialAliasOf?.color?n(r[e.partialAliasOf.color]):Mn({$value:e.$value.color},t),i=e.partialAliasOf?.style?n(r[e.partialAliasOf.style]):nc({$value:e.$value.style},t),s=u=>[o,i,typeof a=="string"?a:a[u]].join(" ");return typeof a=="string"||Ql(a.p3)?s("."):{".":s("."),srgb:s("srgb"),p3:s("p3"),rec2020:s("rec2020")}}function ac(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):`cubic-bezier(${e.$value.map((o,a)=>e.partialAliasOf?.[a]?n(r[e.partialAliasOf[a]]):o).join(", ")})`}function _i(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):`${e.$value.value}${e.$value.unit}`}var sb=/^[a-z-]+$/;function ic(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):e.$value.map(o=>sb.test(o)?o:`"${o}"`).join(", ")}function sc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):String(e.$value)}function ub(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=!1,a=[],i=[];for(let u=0;u<e.$value.length;u++){let{color:l,position:c}=e.$value[u],f=e.partialAliasOf?.[u]?.color?n(r[e.partialAliasOf[u].color]):Mn({$value:l},t);typeof f!="string"&&(o=!0),a.push(f),i.push(e.partialAliasOf?.[u]?.position?n(r[e.partialAliasOf[u].position]):`${100*c}%`)}function s(u,l="."){return`${typeof a[u]=="string"?a[u]:a[u][l]} ${i[u]}`}return o?{".":e.$value.map((u,l)=>s(l,".")).join(", "),srgb:e.$value.map((u,l)=>s(l,"srgb")).join(", "),p3:e.$value.map((u,l)=>s(l,"p3")).join(", "),rec2020:e.$value.map((u,l)=>s(l,"rec2020")).join(", ")}:e.$value.map((u,l)=>s(l,i[l])).join(", ")}function lb(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):`url("${e.$value}")`}function uc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):String(e.$value)}function cb(e,t){let{tokensSet:r,colorValue:n,partialAliasOf:o,transformAlias:a=ue}=t,i=o?.offsetX?a(r[o.offsetX]):$t({$value:e.offsetX},t),s=o?.offsetY?a(r[o.offsetY]):$t({$value:e.offsetY},t),u=o?.blur?a(r[o.blur]):$t({$value:e.blur},t),l=o?.spread?a(r[o.spread]):$t({$value:e.spread},t);return[e?.inset===!0?"inset":void 0,i,s,u,l,n].filter(Boolean).join(" ")}function fb(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=e.$value.map((s,u)=>e.partialAliasOf?.[u]?.color?n(r[e.partialAliasOf[u].color]):Mn({$value:s.color},t)),a=o.some(s=>typeof s=="object"),i=s=>e.$value.map((u,l)=>cb(u,{tokensSet:r,colorValue:typeof o[l]=="string"?o[l]:o[l][s],partialAliasOf:e.partialAliasOf?.[l],transformAlias:n})).join(", ");return a?{".":i("."),srgb:i("srgb"),p3:i("p3"),rec2020:i("rec2020")}:i(".")}function lc(e,t){let{tokensSet:r,transformAlias:n=ue}=t;return e.aliasChain?.[0]?n(r[e.aliasChain[0]]):String(e.$value)}function db(e,t){let{tokensSet:r,transformAlias:n=ue}=t;if(e.aliasChain?.[0])return n(r[e.aliasChain[0]]);let o=e.partialAliasOf?.duration?n(r[e.partialAliasOf.duration]):_i({$value:e.$value.duration},t),a=e.partialAliasOf?.delay?n(r[e.partialAliasOf.delay]):_i({$value:e.$value.delay},t),i=e.partialAliasOf?.timingFunction?n(r[e.partialAliasOf.timingFunction]):ac({$value:e.$value.timingFunction},t);return`${o} ${a} ${i}`}function mb(e,t){let{tokensSet:r,transformAlias:n=ue}=t,o={};for(let[a,i]of Object.entries(e.$value)){let s,u=e.aliasChain?.[0]??e.partialAliasOf?.[a];if(u){let l=r[u];s=n(l.$type==="typography"?{id:`${u}-${a}`}:l)}else switch(a){case"fontFamily":s=ic({$value:i},t);break;case"fontSize":case"letterSpacing":s=$t({$value:i},t);break;case"fontWeight":s=sc({$value:i},t);break;case"lineHeight":typeof i=="number"?s=uc({$value:i},t):s=$t({$value:i},t);break;default:s=lc({$value:i},t);break}o[tc(a)]=s}return o}function pb(e,{mode:t,...r}){let n=e.mode[t];if(!n)return;let o={id:e.id,$type:e.$type,...n};switch(o.$type){case"boolean":return nb(o,r);case"border":return ib(o,r);case"color":return Mn(o,r);case"cubicBezier":return ac(o,r);case"dimension":return $t(o,r);case"duration":return _i(o,r);case"fontFamily":return ic(o,r);case"fontWeight":return sc(o,r);case"gradient":return ub(o,r);case"link":return lb(o,r);case"number":return uc(o,r);case"shadow":return fb(o,r);case"string":return lc(o,r);case"strokeStyle":return nc(o,r);case"transition":return db(o,r);case"typography":return mb(o,r)}}var Ct="css",hb=`/* -------------------------------------------
|
|
27
27
|
* Autogenerated by \u26CB Terrazzo. DO NOT EDIT!
|
|
28
|
-
* ------------------------------------------- */`;function
|
|
28
|
+
* ------------------------------------------- */`;function gb(e){let t=[];for(let r of e){if(!r.selectors.length||!Object.keys(r.declarations).length)continue;let n=[],o=[];for(let a of r.selectors)(a.startsWith("@")?n:o).push(a);for(let a of n)t.push(gl({...r,selectors:[a]}));o.length&&t.push(gl({...r,selectors:o}))}return t.join(`
|
|
29
29
|
|
|
30
30
|
`)}function gl(e){let t=[],r=e.selectors.some(a=>a.startsWith("@")),n="";e.nestedQuery&&r?(t.push(`${n}${e.selectors.join(`,
|
|
31
31
|
${n}`)} {`),n+=" ",t.push(`${n}${e.nestedQuery} {`)):e.nestedQuery&&!r?(t.push(`${n}${e.nestedQuery} {`),n+=" ",t.push(`${n}${e.selectors.join(`,
|
|
32
32
|
${n}`)} {`)):t.push(`${n}${e.selectors.join(`,
|
|
33
33
|
${n}`)} {`),n+=" ",r&&(t.push(`${n}:root {`),n+=" ");let o=Object.entries(e.declarations);o.sort((a,i)=>a[0].localeCompare(i[0],"en-us",{numeric:!0}));for(let[a,i]of o)t.push(`${n}${a}: ${i.value};${i.description?` /* ${i.description} */`:""}`);for(;n!=="";)n=n.substring(0,n.length-2),t.push(`${n}}`);return t.join(`
|
|
34
|
-
`)}var
|
|
34
|
+
`)}var bb={bg:/(^bg-|-bg-)/,border:/(^border-|-border-)/,font:/(^font-|-font-)/,gap:/(^gap-|-gap-)/,m:/(^margin-|-margin-|)/,p:/(^padding-|-padding-|)/,shadow:/(^shadow-|-shadow-)/,text:/(^text-|-text-)/};function be(e,t,r){return`.${t}${r||""}-${tc(e.token.id).replace(bb[t],"")}`}function we(e){return{value:pr(e.localID??e.token.id,{wrapVar:!0})}}function yb(e,t){let r=[],n=Object.entries(e);n.sort((o,a)=>o[0].localeCompare(a[0]));for(let[o,a]of n){let i=oc(a),s=t.filter(u=>i(u.token.id));if(!s.length){console.warn(`[@terrazzo/plugin-css] utility group "${o}" matched 0 tokens: ${JSON.stringify(a)}`);break}switch(o){case"bg":for(let u of s){let l=be(u,"bg");switch(u.token.$type){case"color":r.push({selectors:[l],declarations:{"background-color":we(u)}});break;case"gradient":r.push({selectors:[l],declarations:{"background-image":{value:`linear-gradient(${pr(u.localID??u.token.id,{wrapVar:!0})})`}}})}}break;case"border":for(let u of s){let l={border:"border",color:"border-color",dimension:"border-width",strokeStyle:"border-style"}[u.token.$type];l&&r.push({selectors:[be(u,"border")],declarations:{[l]:we(u)}})}for(let u of s)for(let l of["top","right","bottom","left"]){let c={border:`border-${l}`,color:`border-${l}-color`,dimension:`border-${l}-width`,strokeStyle:`border-${l}-style`}[u.token.$type];c&&r.push({selectors:[be(u,"border",`-${l}`)],declarations:{[c]:we(u)}})}break;case"font":for(let u of s){let l=be(u,"font");if(u.token.$type==="typography"&&u.type==="MULTI_VALUE"){let c={};for(let f of Object.keys(u.value))c[f]={value:pr(`${u.localID??u.token.id}-${f}`,{wrapVar:!0})};r.push({selectors:[l],declarations:c})}else{let c={dimension:"font-size",fontFamily:"font-family",fontWeight:"font-weight"}[u.token.$type];c&&r.push({selectors:[l],declarations:{[c]:we(u)}})}}break;case"layout":{let u=s.filter(l=>l.token.$type==="dimension");for(let l of u)r.push({selectors:[be(l,"gap")],declarations:{gap:we(l)}});for(let l of u)r.push({selectors:[be(l,"gap","-col")],declarations:{"column-gap":we(l)}});for(let l of u)r.push({selectors:[be(l,"gap","-row")],declarations:{"row-gap":we(l)}});for(let l of["m","p"]){let c=l==="m"?"margin":"padding";for(let f of u)r.push({selectors:[be(f,l,"a")],declarations:{[c]:we(f)}});for(let f of u){let m=we(f);r.push({selectors:[be(f,l,"x")],declarations:{[`${c}-left`]:m,[`${c}-right`]:m}},{selectors:[be(f,l,"y")],declarations:{[`${c}-bottom`]:m,[`${c}-top`]:m}})}for(let f of["top","right","bottom","left"])for(let m of u)r.push({selectors:[be(m,l,f[0])],declarations:{[`${c}-${f}`]:we(m)}});for(let f of u){let m=we(f);r.push({selectors:[be(f,l,"s")],declarations:{[`${c}-inline-start`]:m}},{selectors:[be(f,l,"e")],declarations:{[`${c}-inline-end`]:m}})}}break}case"shadow":for(let u of s)u.token.$type==="shadow"&&r.push({selectors:[be(u,"shadow")],declarations:{"box-shadow":we(u)}});break;case"text":for(let u of s){let l=be(u,"text"),c=we(u);switch(u.token.$type){case"color":r.push({selectors:[l],declarations:{color:c}});break;case"gradient":r.push({selectors:[l],declarations:{background:{value:`-webkit-linear-gradient(${c.value})`},"-webkit-background-clip":{value:"text"},"-webkit-text-fill-color":{value:"transparent"}}});break}}break;default:console.warn(`[@terrazzo/plugin-css] unknown utility CSS group "${o}", ignoring`);break}}return r}var bl="@media (color-gamut: p3)",yl="@media (color-gamut: rec2020)";function vb({getTransforms:e,exclude:t,utility:r,modeSelectors:n,baseSelector:o,baseScheme:a}){let i=[],s=e({format:Ct,mode:"."});if(s.length){let u={selectors:[o],declarations:{}},l={selectors:[o],nestedQuery:bl,declarations:{}},c={selectors:[o],nestedQuery:yl,declarations:{}};i.push(u,l,c);let f=oc(t??[]);a&&(u.declarations["color-scheme"]={value:a});for(let m of s){if(f(m.token.id))continue;let d=m.localID??m.token.id,g=m.token.aliasedBy?.length?e({format:Ct,id:m.token.aliasedBy}):[];if(m.type==="SINGLE_VALUE")u.declarations[d]={value:m.value,description:m.token.$description};else if(m.value.srgb&&m.value.p3&&m.value.rec2020){if(u.declarations[d]={value:m.value.srgb,description:m.token.$description},m.value.p3!==m.value.srgb){l.declarations[d]={value:m.value.p3,description:m.token.$description},c.declarations[d]={value:m.value.rec2020,description:m.token.$description};for(let p of g)p.localID&&typeof p.value=="string"&&(l.declarations[p.localID]??={value:p.value,description:m.token.$description},c.declarations[p.localID]??={value:p.value,description:m.token.$description})}}else if(m.type==="MULTI_VALUE"){let p=hl({$type:m.token.$type,localID:d});p&&(u.declarations[m.localID??m.token.id]={value:p,description:m.token.$description});for(let[y,b]of Object.entries(m.value))u.declarations[y==="."?d:[d,y].join("-")]={value:b,description:m.token.$description}}}}for(let{selectors:u,tokens:l,mode:c,scheme:f}of n??[]){if(!u.length)continue;let m=e({format:Ct,id:l,mode:c});if(!m.length)continue;let d={selectors:u,declarations:{}},g={selectors:u,nestedQuery:bl,declarations:{}},p={selectors:u,nestedQuery:yl,declarations:{}},y={};i.push(d,g,p),f&&(d.declarations["color-scheme"]={value:f});for(let b of m){let D=b.localID??b.token.id,C=b.token.aliasedBy?.length?e({format:Ct,id:b.token.aliasedBy}):[];if(b.type==="SINGLE_VALUE")d.declarations[D]={value:b.value,description:b.token.$description};else if(b.value.srgb&&b.value.p3&&b.value.rec2020){if(d.declarations[D]={value:b.value.srgb,description:b.token.$description},b.value.p3!==b.value.srgb){g.declarations[D]={value:b.value.p3,description:b.token.$description},p.declarations[D]={value:b.value.rec2020,description:b.token.$description};for(let F of C)F.localID&&typeof F.value=="string"&&(g.declarations[F.localID]??={value:F.value,description:b.token.$description},p.declarations[F.localID]??={value:F.value,description:b.token.$description})}}else{let F=hl({$type:b.token.$type,localID:D});F&&(d.declarations[D]={value:F,description:b.token.$description});for(let[v,M]of Object.entries(b.value))d.declarations[`${D}-${v}`]={value:M,description:b.token.$description}}for(let F of C)F.localID&&typeof F.value=="string"&&(y[F.localID]={value:F.value,description:b.token.$description})}for(let[b,{value:D,description:C}]of Object.entries(y))d.declarations[b]??={value:D,description:C}}return r&&Object.keys(r).length&&i.push(...yb(r,e({format:Ct,mode:"."}))),gb(i)}function cc(e){let{exclude:t,variableName:r,modeSelectors:n,transform:o,utility:a,legacyHex:i,skipBuild:s,baseScheme:u}=e??{},l=e?.filename??e?.fileName??"index.css",c=e?.baseSelector??":root";function f(d){let g=r?.(d);if(g!==void 0){if(typeof g!="string")throw new Error(`variableName() must return a string; received ${g}`);return g}return pr(d.id)}let m=d=>`var(${f(d)})`;return{name:"@terrazzo/plugin-css",async transform({tokens:d,getTransforms:g,setTransform:p}){if(!g({format:Ct,id:"*",mode:"*"}).length)for(let[y,b]of Object.entries(d)){let D=f(b);for(let C of Object.keys(b.mode)){if(o){let v=o(b,C);if(v!=null){rb(v,{$type:b.$type}),p(y,{format:Ct,localID:D,value:v,mode:C});continue}}let F=pb(b,{mode:C,tokensSet:d,transformAlias:m,color:{legacyHex:i}});F!==void 0&&p(y,{format:Ct,localID:D,value:F,mode:C})}}},async build({getTransforms:d,outputFile:g}){if(s===!0)return;let p=[hb,""];p.push(vb({exclude:t,getTransforms:d,modeSelectors:n,utility:a,baseSelector:c,baseScheme:u}),`
|
|
35
35
|
`),g(l,p.join(`
|
|
36
|
-
`))}}}var
|
|
36
|
+
`))}}}var Db=/\d/,xb=["-","_","/","."];function Cb(e=""){if(!Db.test(e))return e!==e.toLowerCase()}function Ab(e,t){let r=t??xb,n=[];if(!e||typeof e!="string")return n;let o="",a,i;for(let s of e){let u=r.includes(s);if(u===!0){n.push(o),o="",a=void 0;continue}let l=Cb(s);if(i===!1){if(a===!1&&l===!0){n.push(o),o=s,a=l;continue}if(a===!0&&l===!1&&o.length>1){let c=o.at(-1);n.push(o.slice(0,Math.max(0,o.length-1))),o=c+s,a=l;continue}}o+=s,a=l,i=u}return n.push(o),n}function fc(e,t){return e?(Array.isArray(e)?e:Ab(e)).map(r=>r.toLowerCase()).join(t??"-"):""}function mc(e={}){return{name:"operations-transformer",transform({tokens:t,setTransform:r}){for(let[n,o]of Object.entries(t))o.$type==="color"&&o.originalValue?.$extensions?.alpha&&(dc(n,o,o.$value,o.originalValue?.$extensions?.alpha,r,"."),o.mode&&Object.entries(o.mode).forEach(([a,i])=>{i&&dc(n,o,i,o.originalValue?.$extensions?.alpha,r,a)}))}}}function dc(e,t,r,n,o,a){n&&o(e,{format:"css",value:`RGBA(var(--${fc(t.aliasOf)}), ${n[a]})`,mode:a})}var rs="@media (prefers-color-scheme: dark)";function Tn(e=":root"){return`${e}:not([data-theme='light'])`}function pc({scope:e}={}){let t=e??":root";return{filename:"tokens.css",legacyHex:!0,baseScheme:"light dark",...e?{baseSelector:t}:{},modeSelectors:[{mode:"dark",selectors:[rs,e?`${t}[data-theme='dark']`:"[data-theme='dark']"]}]}}function hc(e,{scope:t}={}){return e.replace(`${rs} {
|
|
37
37
|
:root {`,`${rs} {
|
|
38
|
-
${Tn(t)} {`)}var gc={color:{$type:"color",white:{$value:"#ffffff"},black:{$value:"#000000"}}};var bc={color:{$type:"color",red:{"0":{$value:"#000000"},"10":{$value:"#410001"},"20":{$value:"#690002"},"30":{$value:"#930005"},"40":{$value:"#be0c0e"},"50":{$value:"#e32e25"},"60":{$value:"#ff5545"},"70":{$value:"#ff8a7b"},"80":{$value:"#ffb4a9"},"90":{$value:"#ffdad5"},"100":{$value:"#ffffff"},"@":{$value:"{color.red.40}",$extensions:{mode:{dark:"{color.red.80}"}}}},"on-red":{$value:"{color.red.100}",$extensions:{mode:{dark:"{color.red.20}"}}},"red-container":{$value:"{color.red.90}",$extensions:{mode:{dark:"{color.red.30}"}}},"on-red-container":{$value:"{color.red.10}",$extensions:{mode:{dark:"{color.red.90}"}}},"inverse-red":{$value:"{color.red.80}",$extensions:{mode:{dark:"{color.red.40}"}}},blue:{"0":{$value:"#000000"},"10":{$value:"#001550"},"20":{$value:"#00277f"},"30":{$value:"#003ab2"},"40":{$value:"#2352d5"},"50":{$value:"#446def"},"60":{$value:"#6789ff"},"70":{$value:"#90a7ff"},"80":{$value:"#b6c4ff"},"90":{$value:"#dce1ff"},"100":{$value:"#ffffff"},"@":{$value:"{color.blue.40}",$extensions:{mode:{dark:"{color.blue.80}"}}}},"on-blue":{$value:"{color.blue.100}",$extensions:{mode:{dark:"{color.blue.20}"}}},"blue-container":{$value:"{color.blue.90}",$extensions:{mode:{dark:"{color.blue.30}"}}},"on-blue-container":{$value:"{color.blue.10}",$extensions:{mode:{dark:"{color.blue.90}"}}},"inverse-blue":{$value:"{color.blue.80}",$extensions:{mode:{dark:"{color.blue.40}"}}},green:{"0":{$value:"#000000"},"10":{$value:"#00210b"},"20":{$value:"#003917"},"30":{$value:"#005225"},"40":{$value:"#0f6d35"},"50":{$value:"#31874b"},"60":{$value:"#4da163"},"70":{$value:"#68bd7b"},"80":{$value:"#83d995"},"90":{$value:"#9ff6af"},"100":{$value:"#ffffff"},"@":{$value:"{color.green.40}",$extensions:{mode:{dark:"{color.green.80}"}}}},"on-green":{$value:"{color.green.100}",$extensions:{mode:{dark:"{color.green.20}"}}},"green-container":{$value:"{color.green.90}",$extensions:{mode:{dark:"{color.green.30}"}}},"on-green-container":{$value:"{color.green.10}",$extensions:{mode:{dark:"{color.green.90}"}}},"inverse-green":{$value:"{color.green.80}",$extensions:{mode:{dark:"{color.green.40}"}}},purple:{"0":{$value:"#000000"},"10":{$value:"#3f001c"},"20":{$value:"#650032"},"30":{$value:"#8e0048"},"40":{$value:"#ba0061"},"50":{$value:"#e6067a"},"60":{$value:"#ff4993"},"70":{$value:"#ff84ad"},"80":{$value:"#ffb1c7"},"90":{$value:"#ffd9e2"},"100":{$value:"#ffffff"},"@":{$value:"{color.purple.40}",$extensions:{mode:{dark:"{color.purple.80}"}}}},"on-purple":{$value:"{color.purple.100}",$extensions:{mode:{dark:"{color.purple.20}"}}},"purple-container":{$value:"{color.purple.90}",$extensions:{mode:{dark:"{color.purple.30}"}}},"on-purple-container":{$value:"{color.purple.10}",$extensions:{mode:{dark:"{color.purple.90}"}}},"inverse-purple":{$value:"{color.purple.80}",$extensions:{mode:{dark:"{color.purple.40}"}}},yellow:{"0":{$value:"#000000"},"10":{$value:"#241a00"},"20":{$value:"#3d2f00"},"30":{$value:"#574400"},"40":{$value:"#745b00"},"50":{$value:"#917400"},"60":{$value:"#b08d00"},"70":{$value:"#d0a600"},"80":{$value:"#f0c100"},"90":{$value:"#ffe089"},"100":{$value:"#ffffff"},"@":{$value:"{color.yellow.40}",$extensions:{mode:{dark:"{color.yellow.80}"}}}},"on-yellow":{$value:"{color.yellow.100}",$extensions:{mode:{dark:"{color.yellow.20}"}}},"yellow-container":{$value:"{color.yellow.90}",$extensions:{mode:{dark:"{color.yellow.30}"}}},"on-yellow-container":{$value:"{color.yellow.10}",$extensions:{mode:{dark:"{color.yellow.90}"}}},"inverse-yellow":{$value:"{color.yellow.80}",$extensions:{mode:{dark:"{color.yellow.40}"}}},orange:{"0":{$value:"#000000"},"10":{$value:"#341100"},"20":{$value:"#552100"},"30":{$value:"#783100"},"40":{$value:"#9e4300"},"50":{$value:"#c55500"},"60":{$value:"#ee6803"},"70":{$value:"#ff8d4c"},"80":{$value:"#ffb691"},"90":{$value:"#ffdbcb"},"100":{$value:"#ffffff"},"@":{$value:"{color.orange.40}",$extensions:{mode:{dark:"{color.orange.80}"}}}},"on-orange":{$value:"{color.orange.100}",$extensions:{mode:{dark:"{color.orange.20}"}}},"orange-container":{$value:"{color.orange.90}",$extensions:{mode:{dark:"{color.orange.30}"}}},"on-orange-container":{$value:"{color.orange.10}",$extensions:{mode:{dark:"{color.orange.90}"}}},"inverse-orange":{$value:"{color.orange.80}",$extensions:{mode:{dark:"{color.orange.40}"}}}}};var yc={"font-family-monospace":{$type:"fontFamily",$value:["Noto Sans Mono","monospace"],$description:"The font family used for code snippets and monospaced text."},"font-weight":{$type:"fontWeight",regular:{$value:"regular",$description:"Standard weight for regular text. 400 weight."},medium:{$value:"medium",$description:"Slightly heavier than regular weight. 500 weight."},"semi-bold":{$value:"semi-bold",$description:"Heavier than medium weight. 600 weight."},bold:{$value:"bold",$description:"Bold weight for emphasis. 700 weight."}}};var vc={spacing:{$type:"dimension",base:{$value:"1rem",$description:"Base spacing unit (1rem = 16px)."},"000":{$value:"0rem",$description:"No spacing (base \xD7 0)."},"025":{$value:"0.125rem",$description:"2px - Smallest increment (base \xD7 0.125)."},"050":{$value:"0.25rem",$description:"4px - Extra small spacing (base \xD7 0.25)."},"075":{$value:"0.375rem",$description:"6px - Extra small spacing (base \xD7 0.375)."},"100":{$value:"0.5rem",$description:"8px - Small spacing (base \xD7 0.5)."},"150":{$value:"0.75rem",$description:"12px - Small-medium spacing (base \xD7 0.75)."},"200":{$value:"1rem",$description:"16px - Base spacing unit (base \xD7 1)."},"250":{$value:"1.25rem",$description:"20px - Medium-small spacing (base \xD7 1.25)."},"300":{$value:"1.5rem",$description:"24px - Medium spacing (base \xD7 1.5)."},"400":{$value:"2rem",$description:"32px - Medium-large spacing (base \xD7 2)."},"500":{$value:"2.5rem",$description:"40px - Large spacing (base \xD7 2.5)."},"600":{$value:"3rem",$description:"48px - Extra large spacing (base \xD7 3)."},"800":{$value:"4rem",$description:"64px - Huge spacing (base \xD7 4)."},"1000":{$value:"5rem",$description:"80px - Massive spacing (base \xD7 5)."},"1200":{$value:"6rem",$description:"96px - Gigantic spacing (base \xD7 6)."},"2000":{$value:"10rem",$description:"160px - Maximum defined spacing (base \xD7 10)."}}};var Dc={container:{$type:"dimension",$comment:"Container widths are intentionally defined in 'px' instead of 'rem'.",sm:{$value:"320px",$description:"Small container width. Use for narrow layouts and small screens such as mobile devices."},md:{$value:"672px",$description:"Medium container width. Suitable for tablet layouts and compact desktop content areas."},lg:{$value:"1056px",$description:"Large container width. Intended for standard desktop layouts with typical content density."},xl:{$value:"1312px",$description:"Extra large container width. Use for wide desktop displays and content-heavy pages."},max:{$value:"1584px",$description:"Maximum container width. Use when constraining very wide layouts to maintain readable line lengths."}}};var xc={duration:{$type:"duration",short1:{$value:"50ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short2:{$value:"100ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short3:{$value:"150ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short4:{$value:"200ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},medium1:{$value:"250ms",$description:"These are used for medium duration transitions, like modal animations."},medium2:{$value:"300ms",$description:"These are used for medium duration transitions, like modal animations."},long1:{$value:"450ms",$description:"These durations are often paired with Emphasized easing."},long2:{$value:"500ms",$description:"These durations are often paired with Emphasized easing."}},easing:{$type:"cubicBezier",standard:{$value:[.2,0,0,1]},"standard-accelerate":{$value:[.3,0,1,1]},"standard-decelerate":{$value:[0,0,0,1]},emphasized:{$value:[.2,0,0,1],$description:"CSS approximation of the M3 emphasized curve. Pair with the long durations."},"emphasized-accelerate":{$value:[.3,0,.8,.15]},"emphasized-decelerate":{$value:[.05,.7,.1,1]},linear:{$value:[0,0,1,1]}}};var Cc={elevation:{$type:"shadow",$description:"M3 elevation levels as box shadows: a key shadow plus an ambient shadow.",level0:{$value:[{color:"#00000000",offsetX:"0px",offsetY:"0px",blur:"0px",spread:"0px"}]},level1:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"2px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"1px",blur:"3px",spread:"1px"}]},level2:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"2px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"2px",blur:"6px",spread:"2px"}]},level3:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"3px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"4px",blur:"8px",spread:"3px"}]},level4:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"2px",blur:"3px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"6px",blur:"10px",spread:"4px"}]},level5:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"4px",blur:"4px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"8px",blur:"12px",spread:"6px"}]}}};var Ac={state:{$type:"number","hover-opacity":{$value:.08,$description:"State layer opacity on hover."},"focus-opacity":{$value:.1,$description:"State layer opacity on keyboard focus."},"pressed-opacity":{$value:.1,$description:"State layer opacity while pressed."},"dragged-opacity":{$value:.16,$description:"State layer opacity while dragged."},"disabled-content-opacity":{$value:.38,$description:"Opacity of disabled text and icons."},"disabled-container-opacity":{$value:.12,$description:"Opacity of disabled container fills."}}};var $c={color:{$type:"color",success:{$value:"{color.green.40}",$extensions:{mode:{dark:"{color.green.80}"}}},onSuccess:{$value:"{color.green.100}",$extensions:{mode:{dark:"{color.green.20}"}}},successContainer:{$value:"{color.green.90}",$extensions:{mode:{dark:"{color.green.30}"}}},onSuccessContainer:{$value:"{color.green.10}",$extensions:{mode:{dark:"{color.green.90}"}}},inverseSuccess:{$value:"{color.green.80}",$extensions:{mode:{dark:"{color.green.40}"}}},warning:{$value:"{color.yellow.40}",$extensions:{mode:{dark:"{color.yellow.80}"}}},onWarning:{$value:"{color.yellow.100}",$extensions:{mode:{dark:"{color.yellow.20}"}}},warningContainer:{$value:"{color.yellow.90}",$extensions:{mode:{dark:"{color.yellow.30}"}}},onWarningContainer:{$value:"{color.yellow.10}",$extensions:{mode:{dark:"{color.yellow.90}"}}},inverseWarning:{$value:"{color.yellow.80}",$extensions:{mode:{dark:"{color.yellow.40}"}}},error:{$value:"{color.red.40}",$extensions:{mode:{dark:"{color.red.80}"}}},onError:{$value:"{color.red.100}",$extensions:{mode:{dark:"{color.red.20}"}}},errorContainer:{$value:"{color.red.90}",$extensions:{mode:{dark:"{color.red.30}"}}},onErrorContainer:{$value:"{color.red.10}",$extensions:{mode:{dark:"{color.red.90}"}}},inverseError:{$value:"{color.red.80}",$extensions:{mode:{dark:"{color.red.40}"}}}}};var Ec={typography:{"display-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"3.5625rem"},lineHeight:{$type:"dimension",$value:"4rem"},letterSpacing:{$type:"dimension",$value:"-0.25px"}},"display-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"3.5625rem"},lineHeight:{$type:"dimension",$value:"4rem"},letterSpacing:{$type:"dimension",$value:"-0.25px"}},"display-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2.8125rem"},lineHeight:{$type:"dimension",$value:"3.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2.8125rem"},lineHeight:{$type:"dimension",$value:"3.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2.25rem"},lineHeight:{$type:"dimension",$value:"2.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2.25rem"},lineHeight:{$type:"dimension",$value:"2.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2rem"},lineHeight:{$type:"dimension",$value:"2.5rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2rem"},lineHeight:{$type:"dimension",$value:"2.5rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.75rem"},lineHeight:{$type:"dimension",$value:"2.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.75rem"},lineHeight:{$type:"dimension",$value:"2.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.5rem"},lineHeight:{$type:"dimension",$value:"2rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.5rem"},lineHeight:{$type:"dimension",$value:"2rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.375rem"},lineHeight:{$type:"dimension",$value:"1.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.375rem"},lineHeight:{$type:"dimension",$value:"1.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.15000000596046448px"}},"title-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.15000000596046448px"}},"title-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"title-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.6875rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.6875rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"body-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"body-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"body-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"code-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"code-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"code-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"code-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"code-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"code-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}}}};var Fc={global:{badge:{color:{$type:"color",$value:"{color.error}"}},avatar:{"container-shape":{$value:"{shape-corner.full}"}}},"z-index":{$type:"number",badge:{$value:10},popover:{$value:1e3},"notification-manager":{$value:9e3}},"scrollbar-width":{$type:"dimension",$value:"8px"}};var Mc=[["primitive/colors/color.palette.json",gc],["primitive/colors/accents.json",bc],["primitive/typography/font-weights.json",yc],["primitive/spacing/spacing.json",vc],["primitive/spacing/container.json",Dc],["primitive/animation/motion.json",xc],["primitive/elevation/elevation.json",Cc],["primitive/state/state.json",Ac],["semantics/colors/color.status.json",$c],["semantics/typography/font.body.json",Ec],["semantics/components/components.json",Fc]];var Tc=new URL("file:///peacock/");async function wc(e,t={}){let r=new Wr({level:"error"}),n=T0({plugins:[cc(pc(t)),mc()]},{logger:r,cwd:Tc}),o=[...Mc,...e].map(([u,l])=>({filename:new URL(`tokens/${u}`,Tc),src:JSON.stringify(l)})),{tokens:a,sources:i}=await X0(o,{config:n,logger:r,skipLint:!0}),{outputFiles:s}=await p0(a,{sources:i,config:n,logger:r});return hc(s.find(u=>u.filename==="tokens.css").contents,t)}var Sc=[0,10,20,30,40,50,60,70,80,90,95,98,100],Rc=[0,4,6,10,12,17,20,22,30,40,50,60,70,80,87,90,92,94,95,96,98,99,100],Bc=["primary","secondary","tertiary","neutral","neutralVariant"],Oc=[{value:"classic",label:"Classic"},{value:"tonalSpot",label:"Tonal spot"},{value:"vibrant",label:"Vibrant"},{value:"expressive",label:"Expressive"},{value:"fidelity",label:"Fidelity"}],Pc={tonalSpot:mo,vibrant:Ot,expressive:Bt,fidelity:fo};function ao(e){return typeof e=="string"&&/^#?([0-9a-f]{6}|[0-9a-f]{3})$/i.test(e)}function kc(e){return B.fromInt(Pt(e))}function Ob(e){let t=N.fromInt(Pt(e));return{neutral:B.fromHueAndChroma(t.hue,t.chroma),neutralVariant:B.fromHueAndChroma(t.hue,t.chroma+4)}}function Pb(e){let t=gs(Pt(e)),r=Ee.of(t.palettes.primary.keyColor.argb);return{primary:r.a1,secondary:r.a2,tertiary:r.a3,neutral:r.n1,neutralVariant:r.n2}}function zb(e,t){let r=Pc[e],n=new r(N.fromInt(Pt(t)),!1,0);return{primary:n.primaryPalette,secondary:n.secondaryPalette,tertiary:n.tertiaryPalette,neutral:n.neutralPalette,neutralVariant:n.neutralVariantPalette}}function zc(e){let t=e.variant in Pc?zb(e.variant,e.primary):Pb(e.primary);return ao(e.secondary)&&(t.secondary=kc(e.secondary)),ao(e.tertiary)&&(t.tertiary=kc(e.tertiary)),ao(e.neutral)&&Object.assign(t,Ob(e.neutral)),t}function _c(e,t,r=[]){return[...new Set([...t,...r])].sort((o,a)=>o-a).map(o=>[o,Gt(e.tone(o))])}var br={TONAL_SPOT:2,VIBRANT:3,EXPRESSIVE:4,FIDELITY:5},ns=[{value:"standard",label:"Standard",level:0},{value:"medium",label:"Medium",level:.5},{value:"high",label:"High",level:1}],_b={classic:br.TONAL_SPOT,tonalSpot:br.TONAL_SPOT,vibrant:br.VIBRANT,expressive:br.EXPRESSIVE,fidelity:br.FIDELITY};function os(e){let t=e.charAt(0).toUpperCase()+e.slice(1);return[[e,e,40,80],[`on${t}`,e,100,20],[`${e}Container`,e,90,30],[`on${t}Container`,e,10,90],[`inverse${t}`,e,80,40],[`${e}Fixed`,e,90,90],[`${e}FixedDim`,e,80,80],[`on${t}Fixed`,e,10,10],[`on${t}FixedVariant`,e,30,30]]}var Ib=[...os("primary"),...os("secondary"),...os("tertiary"),["surfaceTint","primary",40,80],["background","neutral",99,10],["onBackground","neutral",10,90],["surface","neutral",99,10],["onSurface","neutral",10,90],["surfaceVariant","neutralVariant",90,30],["onSurfaceVariant","neutralVariant",30,80],["inverseSurface","neutral",20,90],["inverseOnSurface","neutral",95,20],["surfaceContainerHighest","neutral",90,22],["surfaceContainerHigh","neutral",92,17],["surfaceContainer","neutral",94,12],["surfaceContainerLow","neutral",96,10],["surfaceContainerLowest","neutral",100,4],["surfaceDim","neutral",87,6],["surfaceBright","neutral",98,24],["outline","neutralVariant",50,60],["outlineVariant","neutralVariant",80,30],["shadow","neutral",0,0],["scrim","neutral",0,0]];function wn(e,t,r,n){return new W({sourceColorArgb:Pt(t.primary),variant:_b[t.variant]??br.TONAL_SPOT,contrastLevel:n,isDark:r,primaryPalette:e.primary,secondaryPalette:e.secondary,tertiaryPalette:e.tertiary,neutralPalette:e.neutral,neutralVariantPalette:e.neutralVariant})}function Lb(e,t){let r=ns.find(o=>o.value===t.contrast)?.level??0;if(r===0)return(o,a,i)=>i;let n={light:[wn(e,t,!1,0),wn(e,t,!1,r)],dark:[wn(e,t,!0,0),wn(e,t,!0,r)]};return(o,a,i)=>{let s=h[o];if(!s)return i;let[u,l]=n[a?"dark":"light"],c=i+s.getTone(l)-s.getTone(u);return Math.min(100,Math.max(0,Math.round(c)))}}function Ic(e,t){let r=Lb(e,t),n=Object.fromEntries(Object.keys(e).map(a=>[a,new Set])),o={};for(let[a,i,s,u]of Ib){let l=r(a,!1,s),c=r(a,!0,u);n[i].add(l).add(c),o[a]={$value:`{color.${i}.${l}}`,$extensions:{mode:{dark:`{color.${i}.${c}}`}}}}return{roles:o,usedTones:n}}var Hb=["extra-small","small","medium","large","large-increased","extra-large","full"],kn=[{value:"sharp",label:"Sharp",corners:[0,0,0,0,0,0,0]},{value:"subtle",label:"Subtle",corners:[2,4,6,8,10,14,9999]},{value:"default",label:"Default",corners:[4,8,12,16,20,28,9999]},{value:"rounded",label:"Rounded",corners:[6,12,16,24,28,36,9999]}];function Lc(e){let t=kn.find(n=>n.value===e.shape)??kn.find(n=>n.value==="default"),r={$type:"dimension",none:{$value:"0px"}};return Hb.forEach((n,o)=>{r[n]=n==="full"?{$type:"string",$value:`${t.corners[o]}px`}:{$value:`${t.corners[o]}px`}}),{"shape-corner":r}}var Nb="400;500;600;700",io=[{value:"Noto Sans",label:"Noto Sans",google:"Noto Sans",fallback:["sans-serif"]},{value:"Roboto",label:"Roboto",google:"Roboto",fallback:["sans-serif"]},{value:"Inter",label:"Inter",google:"Inter",fallback:["sans-serif"]},{value:"Open Sans",label:"Open Sans",google:"Open Sans",fallback:["sans-serif"]},{value:"Lato",label:"Lato",google:"Lato",fallback:["sans-serif"]},{value:"Poppins",label:"Poppins",google:"Poppins",fallback:["sans-serif"]},{value:"Source Sans 3",label:"Source Sans 3",google:"Source Sans 3",fallback:["sans-serif"]},{value:"system-ui",label:"System UI",google:null,fallback:["-apple-system","Segoe UI","Roboto","sans-serif"]}];function as(e){return io.find(t=>t.value===e)??io[0]}function Hc(e){let t=as(e);return[t.value,...t.fallback]}function Nc(e){return{"font-family-brand":{$type:"fontFamily",$value:Hc(e.font?.brand),$description:"The font family used for brand headings and titles."},"font-family-sans":{$type:"fontFamily",$value:Hc(e.font?.plain),$description:"The primary font family used for body text and general content."}}}function is(e){let t=[...new Set([as(e.font?.brand),as(e.font?.plain)])].filter(r=>r.google).map(r=>`family=${r.google.replaceAll(" ","+")}:wght@${Nb}`);return t.length?`https://fonts.googleapis.com/css2?${t.join("&")}&display=swap`:null}var jb=Object.freeze(structuredClone(bs));function jc(e){if(!ao(e))return;let t=e.replace("#","").toLowerCase();return t.length===3&&(t=[...t].map(r=>r+r).join("")),`#${t}`}function so(e,t,r){return e.some(n=>n.value===t)?t:r}function Xb(e={}){let t=jb,r={primary:jc(e.primary)??t.primary,variant:so(Oc,e.variant,t.variant),contrast:so(ns,e.contrast,t.contrast),shape:so(kn,e.shape,t.shape),font:{brand:so(io,e.font?.brand,t.font.brand),plain:so(io,e.font?.plain,t.font.plain)}};for(let n of["secondary","tertiary","neutral"]){let o=jc(e[n]);o&&(r[n]=o)}return r}function Xc(e){let t=Xb(e),r=zc(t),{roles:n,usedTones:o}=Ic(r,t),a={$type:"color"},i={};for(let s of Bc){let u=s.startsWith("neutral")?Rc:Sc;i[s]=_c(r[s],u,o[s]),a[s]=Object.fromEntries(i[s].map(([l,c])=>[l,{$value:c}]))}a.neutral["@"]={$value:Gt(r.neutral.tone(50))},a.neutralVariant["@"]={$value:Gt(r.neutralVariant.tone(50))};for(let[s,u]of Object.entries(n))a[s]?a[s]["@"]=u:a[s]=u;return{config:t,palettes:i,documents:[["generated/color.theme.json",{color:a}],["generated/font-family.json",Nc(t)],["generated/shape.json",Lc(t)]]}}function Ub(e){let t=["primary","secondary","tertiary","neutral"].filter(o=>e[o]).map(o=>`${o} ${e[o]}`).join(", "),r=is(e),n=[`Peacock theme: ${t}`,`variant ${e.variant}, contrast ${e.contrast}, shape ${e.shape}`,`fonts: brand "${e.font.brand}", plain "${e.font.plain}"`];return r&&n.push(`Load the fonts with: <link rel="stylesheet" href="${r}">`),`/*
|
|
38
|
+
${Tn(t)} {`)}var gc={color:{$type:"color",white:{$value:"#ffffff"},black:{$value:"#000000"}}};var bc={color:{$type:"color",red:{"0":{$value:"#000000"},"10":{$value:"#410001"},"20":{$value:"#690002"},"30":{$value:"#930005"},"40":{$value:"#be0c0e"},"50":{$value:"#e32e25"},"60":{$value:"#ff5545"},"70":{$value:"#ff8a7b"},"80":{$value:"#ffb4a9"},"90":{$value:"#ffdad5"},"100":{$value:"#ffffff"},"@":{$value:"{color.red.40}",$extensions:{mode:{dark:"{color.red.80}"}}}},"on-red":{$value:"{color.red.100}",$extensions:{mode:{dark:"{color.red.20}"}}},"red-container":{$value:"{color.red.90}",$extensions:{mode:{dark:"{color.red.30}"}}},"on-red-container":{$value:"{color.red.10}",$extensions:{mode:{dark:"{color.red.90}"}}},"inverse-red":{$value:"{color.red.80}",$extensions:{mode:{dark:"{color.red.40}"}}},blue:{"0":{$value:"#000000"},"10":{$value:"#001550"},"20":{$value:"#00277f"},"30":{$value:"#003ab2"},"40":{$value:"#2352d5"},"50":{$value:"#446def"},"60":{$value:"#6789ff"},"70":{$value:"#90a7ff"},"80":{$value:"#b6c4ff"},"90":{$value:"#dce1ff"},"100":{$value:"#ffffff"},"@":{$value:"{color.blue.40}",$extensions:{mode:{dark:"{color.blue.80}"}}}},"on-blue":{$value:"{color.blue.100}",$extensions:{mode:{dark:"{color.blue.20}"}}},"blue-container":{$value:"{color.blue.90}",$extensions:{mode:{dark:"{color.blue.30}"}}},"on-blue-container":{$value:"{color.blue.10}",$extensions:{mode:{dark:"{color.blue.90}"}}},"inverse-blue":{$value:"{color.blue.80}",$extensions:{mode:{dark:"{color.blue.40}"}}},green:{"0":{$value:"#000000"},"10":{$value:"#00210b"},"20":{$value:"#003917"},"30":{$value:"#005225"},"40":{$value:"#0f6d35"},"50":{$value:"#31874b"},"60":{$value:"#4da163"},"70":{$value:"#68bd7b"},"80":{$value:"#83d995"},"90":{$value:"#9ff6af"},"100":{$value:"#ffffff"},"@":{$value:"{color.green.40}",$extensions:{mode:{dark:"{color.green.80}"}}}},"on-green":{$value:"{color.green.100}",$extensions:{mode:{dark:"{color.green.20}"}}},"green-container":{$value:"{color.green.90}",$extensions:{mode:{dark:"{color.green.30}"}}},"on-green-container":{$value:"{color.green.10}",$extensions:{mode:{dark:"{color.green.90}"}}},"inverse-green":{$value:"{color.green.80}",$extensions:{mode:{dark:"{color.green.40}"}}},purple:{"0":{$value:"#000000"},"10":{$value:"#3f001c"},"20":{$value:"#650032"},"30":{$value:"#8e0048"},"40":{$value:"#ba0061"},"50":{$value:"#e6067a"},"60":{$value:"#ff4993"},"70":{$value:"#ff84ad"},"80":{$value:"#ffb1c7"},"90":{$value:"#ffd9e2"},"100":{$value:"#ffffff"},"@":{$value:"{color.purple.40}",$extensions:{mode:{dark:"{color.purple.80}"}}}},"on-purple":{$value:"{color.purple.100}",$extensions:{mode:{dark:"{color.purple.20}"}}},"purple-container":{$value:"{color.purple.90}",$extensions:{mode:{dark:"{color.purple.30}"}}},"on-purple-container":{$value:"{color.purple.10}",$extensions:{mode:{dark:"{color.purple.90}"}}},"inverse-purple":{$value:"{color.purple.80}",$extensions:{mode:{dark:"{color.purple.40}"}}},yellow:{"0":{$value:"#000000"},"10":{$value:"#241a00"},"20":{$value:"#3d2f00"},"30":{$value:"#574400"},"40":{$value:"#745b00"},"50":{$value:"#917400"},"60":{$value:"#b08d00"},"70":{$value:"#d0a600"},"80":{$value:"#f0c100"},"90":{$value:"#ffe089"},"100":{$value:"#ffffff"},"@":{$value:"{color.yellow.40}",$extensions:{mode:{dark:"{color.yellow.80}"}}}},"on-yellow":{$value:"{color.yellow.100}",$extensions:{mode:{dark:"{color.yellow.20}"}}},"yellow-container":{$value:"{color.yellow.90}",$extensions:{mode:{dark:"{color.yellow.30}"}}},"on-yellow-container":{$value:"{color.yellow.10}",$extensions:{mode:{dark:"{color.yellow.90}"}}},"inverse-yellow":{$value:"{color.yellow.80}",$extensions:{mode:{dark:"{color.yellow.40}"}}},orange:{"0":{$value:"#000000"},"10":{$value:"#341100"},"20":{$value:"#552100"},"30":{$value:"#783100"},"40":{$value:"#9e4300"},"50":{$value:"#c55500"},"60":{$value:"#ee6803"},"70":{$value:"#ff8d4c"},"80":{$value:"#ffb691"},"90":{$value:"#ffdbcb"},"100":{$value:"#ffffff"},"@":{$value:"{color.orange.40}",$extensions:{mode:{dark:"{color.orange.80}"}}}},"on-orange":{$value:"{color.orange.100}",$extensions:{mode:{dark:"{color.orange.20}"}}},"orange-container":{$value:"{color.orange.90}",$extensions:{mode:{dark:"{color.orange.30}"}}},"on-orange-container":{$value:"{color.orange.10}",$extensions:{mode:{dark:"{color.orange.90}"}}},"inverse-orange":{$value:"{color.orange.80}",$extensions:{mode:{dark:"{color.orange.40}"}}}}};var yc={"font-family-monospace":{$type:"fontFamily",$value:["Noto Sans Mono","monospace"],$description:"The font family used for code snippets and monospaced text."},"font-weight":{$type:"fontWeight",regular:{$value:"regular",$description:"Standard weight for regular text. 400 weight."},medium:{$value:"medium",$description:"Slightly heavier than regular weight. 500 weight."},"semi-bold":{$value:"semi-bold",$description:"Heavier than medium weight. 600 weight."},bold:{$value:"bold",$description:"Bold weight for emphasis. 700 weight."}}};var vc={spacing:{$type:"dimension",base:{$value:"1rem",$description:"Base spacing unit (1rem = 16px)."},"000":{$value:"0rem",$description:"No spacing (base \xD7 0)."},"025":{$value:"0.125rem",$description:"2px - Smallest increment (base \xD7 0.125)."},"050":{$value:"0.25rem",$description:"4px - Extra small spacing (base \xD7 0.25)."},"075":{$value:"0.375rem",$description:"6px - Extra small spacing (base \xD7 0.375)."},"100":{$value:"0.5rem",$description:"8px - Small spacing (base \xD7 0.5)."},"150":{$value:"0.75rem",$description:"12px - Small-medium spacing (base \xD7 0.75)."},"200":{$value:"1rem",$description:"16px - Base spacing unit (base \xD7 1)."},"250":{$value:"1.25rem",$description:"20px - Medium-small spacing (base \xD7 1.25)."},"300":{$value:"1.5rem",$description:"24px - Medium spacing (base \xD7 1.5)."},"400":{$value:"2rem",$description:"32px - Medium-large spacing (base \xD7 2)."},"500":{$value:"2.5rem",$description:"40px - Large spacing (base \xD7 2.5)."},"600":{$value:"3rem",$description:"48px - Extra large spacing (base \xD7 3)."},"800":{$value:"4rem",$description:"64px - Huge spacing (base \xD7 4)."},"1000":{$value:"5rem",$description:"80px - Massive spacing (base \xD7 5)."},"1200":{$value:"6rem",$description:"96px - Gigantic spacing (base \xD7 6)."},"2000":{$value:"10rem",$description:"160px - Maximum defined spacing (base \xD7 10)."}}};var Dc={container:{$type:"dimension",$comment:"Container widths are intentionally defined in 'px' instead of 'rem'.",sm:{$value:"320px",$description:"Small container width. Use for narrow layouts and small screens such as mobile devices."},md:{$value:"672px",$description:"Medium container width. Suitable for tablet layouts and compact desktop content areas."},lg:{$value:"1056px",$description:"Large container width. Intended for standard desktop layouts with typical content density."},xl:{$value:"1312px",$description:"Extra large container width. Use for wide desktop displays and content-heavy pages."},max:{$value:"1584px",$description:"Maximum container width. Use when constraining very wide layouts to maintain readable line lengths."}}};var xc={duration:{$type:"duration",short1:{$value:"50ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short2:{$value:"100ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short3:{$value:"150ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},short4:{$value:"200ms",$description:"These are used for small utility-focused transitions. Like checkbox animations."},medium1:{$value:"250ms",$description:"These are used for medium duration transitions, like modal animations."},medium2:{$value:"300ms",$description:"These are used for medium duration transitions, like modal animations."},long1:{$value:"450ms",$description:"These durations are often paired with Emphasized easing."},long2:{$value:"500ms",$description:"These durations are often paired with Emphasized easing."}},easing:{$type:"cubicBezier",standard:{$value:[.2,0,0,1]},"standard-accelerate":{$value:[.3,0,1,1]},"standard-decelerate":{$value:[0,0,0,1]},emphasized:{$value:[.2,0,0,1],$description:"CSS approximation of the M3 emphasized curve. Pair with the long durations."},"emphasized-accelerate":{$value:[.3,0,.8,.15]},"emphasized-decelerate":{$value:[.05,.7,.1,1]},linear:{$value:[0,0,1,1]}}};var Cc={elevation:{$type:"shadow",$description:"M3 elevation levels as box shadows: a key shadow plus an ambient shadow.",level0:{$value:[{color:"#00000000",offsetX:"0px",offsetY:"0px",blur:"0px",spread:"0px"}]},level1:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"2px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"1px",blur:"3px",spread:"1px"}]},level2:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"2px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"2px",blur:"6px",spread:"2px"}]},level3:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"1px",blur:"3px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"4px",blur:"8px",spread:"3px"}]},level4:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"2px",blur:"3px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"6px",blur:"10px",spread:"4px"}]},level5:{$value:[{color:"#0000004d",offsetX:"0px",offsetY:"4px",blur:"4px",spread:"0px"},{color:"#00000026",offsetX:"0px",offsetY:"8px",blur:"12px",spread:"6px"}]}}};var Ac={state:{$type:"number","hover-opacity":{$value:.08,$description:"State layer opacity on hover."},"focus-opacity":{$value:.1,$description:"State layer opacity on keyboard focus."},"pressed-opacity":{$value:.1,$description:"State layer opacity while pressed."},"dragged-opacity":{$value:.16,$description:"State layer opacity while dragged."},"disabled-content-opacity":{$value:.38,$description:"Opacity of disabled text and icons."},"disabled-container-opacity":{$value:.12,$description:"Opacity of disabled container fills."}}};var $c={color:{$type:"color",success:{$value:"{color.green.40}",$extensions:{mode:{dark:"{color.green.80}"}}},onSuccess:{$value:"{color.green.100}",$extensions:{mode:{dark:"{color.green.20}"}}},successContainer:{$value:"{color.green.90}",$extensions:{mode:{dark:"{color.green.30}"}}},onSuccessContainer:{$value:"{color.green.10}",$extensions:{mode:{dark:"{color.green.90}"}}},inverseSuccess:{$value:"{color.green.80}",$extensions:{mode:{dark:"{color.green.40}"}}},warning:{$value:"{color.yellow.40}",$extensions:{mode:{dark:"{color.yellow.80}"}}},onWarning:{$value:"{color.yellow.100}",$extensions:{mode:{dark:"{color.yellow.20}"}}},warningContainer:{$value:"{color.yellow.90}",$extensions:{mode:{dark:"{color.yellow.30}"}}},onWarningContainer:{$value:"{color.yellow.10}",$extensions:{mode:{dark:"{color.yellow.90}"}}},inverseWarning:{$value:"{color.yellow.80}",$extensions:{mode:{dark:"{color.yellow.40}"}}},error:{$value:"{color.red.40}",$extensions:{mode:{dark:"{color.red.80}"}}},onError:{$value:"{color.red.100}",$extensions:{mode:{dark:"{color.red.20}"}}},errorContainer:{$value:"{color.red.90}",$extensions:{mode:{dark:"{color.red.30}"}}},onErrorContainer:{$value:"{color.red.10}",$extensions:{mode:{dark:"{color.red.90}"}}},inverseError:{$value:"{color.red.80}",$extensions:{mode:{dark:"{color.red.40}"}}}}};var Ec={color:{$type:"color",chart:{"1":{$value:"{color.primary.40}",$extensions:{mode:{dark:"{color.primary.80}"}}},"2":{$value:"{color.tertiary.50}",$extensions:{mode:{dark:"{color.tertiary.70}"}}},"3":{$value:"{color.blue.50}",$extensions:{mode:{dark:"{color.blue.70}"}}},"4":{$value:"{color.green.50}",$extensions:{mode:{dark:"{color.green.70}"}}},"5":{$value:"{color.orange.50}",$extensions:{mode:{dark:"{color.orange.70}"}}},"6":{$value:"{color.purple.50}",$extensions:{mode:{dark:"{color.purple.70}"}}},"7":{$value:"{color.red.50}",$extensions:{mode:{dark:"{color.red.70}"}}},"8":{$value:"{color.yellow.50}",$extensions:{mode:{dark:"{color.yellow.70}"}}}}}};var Fc={typography:{"display-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"3.5625rem"},lineHeight:{$type:"dimension",$value:"4rem"},letterSpacing:{$type:"dimension",$value:"-0.25px"}},"display-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"3.5625rem"},lineHeight:{$type:"dimension",$value:"4rem"},letterSpacing:{$type:"dimension",$value:"-0.25px"}},"display-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2.8125rem"},lineHeight:{$type:"dimension",$value:"3.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2.8125rem"},lineHeight:{$type:"dimension",$value:"3.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2.25rem"},lineHeight:{$type:"dimension",$value:"2.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"display-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2.25rem"},lineHeight:{$type:"dimension",$value:"2.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"2rem"},lineHeight:{$type:"dimension",$value:"2.5rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"2rem"},lineHeight:{$type:"dimension",$value:"2.5rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.75rem"},lineHeight:{$type:"dimension",$value:"2.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.75rem"},lineHeight:{$type:"dimension",$value:"2.25rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.5rem"},lineHeight:{$type:"dimension",$value:"2rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"headline-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.5rem"},lineHeight:{$type:"dimension",$value:"2rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1.375rem"},lineHeight:{$type:"dimension",$value:"1.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1.375rem"},lineHeight:{$type:"dimension",$value:"1.75rem"},letterSpacing:{$type:"dimension",$value:"0px"}},"title-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.15000000596046448px"}},"title-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.15000000596046448px"}},"title-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"title-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-brand}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.10000000149011612px"}},"label-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.6875rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"label-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.semi-bold}"},fontSize:{$type:"dimension",$value:"0.6875rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"body-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"body-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"body-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"body-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-sans}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"code-large":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"code-large-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"1rem"},lineHeight:{$type:"dimension",$value:"1.5rem"},letterSpacing:{$type:"dimension",$value:"0.5px"}},"code-medium":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"code-medium-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.875rem"},lineHeight:{$type:"dimension",$value:"1.25rem"},letterSpacing:{$type:"dimension",$value:"0.25px"}},"code-small":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.regular}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}},"code-small-emphasized":{fontFamily:{$type:"fontFamily",$value:"{font-family-monospace}"},fontWeight:{$type:"fontWeight",$value:"{font-weight.medium}"},fontSize:{$type:"dimension",$value:"0.75rem"},lineHeight:{$type:"dimension",$value:"1rem"},letterSpacing:{$type:"dimension",$value:"0.4000000059604645px"}}}};var Mc={global:{badge:{color:{$type:"color",$value:"{color.error}"}},avatar:{"container-shape":{$value:"{shape-corner.full}"}}},"z-index":{$type:"number",badge:{$value:10},popover:{$value:1e3},"notification-manager":{$value:9e3}},"scrollbar-width":{$type:"dimension",$value:"8px"}};var Tc=[["primitive/colors/color.palette.json",gc],["primitive/colors/accents.json",bc],["primitive/typography/font-weights.json",yc],["primitive/spacing/spacing.json",vc],["primitive/spacing/container.json",Dc],["primitive/animation/motion.json",xc],["primitive/elevation/elevation.json",Cc],["primitive/state/state.json",Ac],["semantics/colors/color.status.json",$c],["semantics/colors/color.chart.json",Ec],["semantics/typography/font.body.json",Fc],["semantics/components/components.json",Mc]];var kc=new URL("file:///peacock/");async function wc(e,t={}){let r=new Wr({level:"error"}),n=T0({plugins:[cc(pc(t)),mc()]},{logger:r,cwd:kc}),o=[...Tc,...e].map(([u,l])=>({filename:new URL(`tokens/${u}`,kc),src:JSON.stringify(l)})),{tokens:a,sources:i}=await X0(o,{config:n,logger:r,skipLint:!0}),{outputFiles:s}=await p0(a,{sources:i,config:n,logger:r});return hc(s.find(u=>u.filename==="tokens.css").contents,t)}var Rc=[0,10,20,30,40,50,60,70,80,90,95,98,100],Bc=[0,4,6,10,12,17,20,22,30,40,50,60,70,80,87,90,92,94,95,96,98,99,100],Oc=["primary","secondary","tertiary","neutral","neutralVariant"],Pc=[{value:"classic",label:"Classic"},{value:"tonalSpot",label:"Tonal spot"},{value:"vibrant",label:"Vibrant"},{value:"expressive",label:"Expressive"},{value:"fidelity",label:"Fidelity"}],zc={tonalSpot:mo,vibrant:Ot,expressive:Bt,fidelity:fo};function ao(e){return typeof e=="string"&&/^#?([0-9a-f]{6}|[0-9a-f]{3})$/i.test(e)}function Sc(e){return B.fromInt(Pt(e))}function zb(e){let t=N.fromInt(Pt(e));return{neutral:B.fromHueAndChroma(t.hue,t.chroma),neutralVariant:B.fromHueAndChroma(t.hue,t.chroma+4)}}function _b(e){let t=gs(Pt(e)),r=Ee.of(t.palettes.primary.keyColor.argb);return{primary:r.a1,secondary:r.a2,tertiary:r.a3,neutral:r.n1,neutralVariant:r.n2}}function Ib(e,t){let r=zc[e],n=new r(N.fromInt(Pt(t)),!1,0);return{primary:n.primaryPalette,secondary:n.secondaryPalette,tertiary:n.tertiaryPalette,neutral:n.neutralPalette,neutralVariant:n.neutralVariantPalette}}function _c(e){let t=e.variant in zc?Ib(e.variant,e.primary):_b(e.primary);return ao(e.secondary)&&(t.secondary=Sc(e.secondary)),ao(e.tertiary)&&(t.tertiary=Sc(e.tertiary)),ao(e.neutral)&&Object.assign(t,zb(e.neutral)),t}function Ic(e,t,r=[]){return[...new Set([...t,...r])].sort((o,a)=>o-a).map(o=>[o,Gt(e.tone(o))])}var br={TONAL_SPOT:2,VIBRANT:3,EXPRESSIVE:4,FIDELITY:5},ns=[{value:"standard",label:"Standard",level:0},{value:"medium",label:"Medium",level:.5},{value:"high",label:"High",level:1}],Lb={classic:br.TONAL_SPOT,tonalSpot:br.TONAL_SPOT,vibrant:br.VIBRANT,expressive:br.EXPRESSIVE,fidelity:br.FIDELITY};function os(e){let t=e.charAt(0).toUpperCase()+e.slice(1);return[[e,e,40,80],[`on${t}`,e,100,20],[`${e}Container`,e,90,30],[`on${t}Container`,e,10,90],[`inverse${t}`,e,80,40],[`${e}Fixed`,e,90,90],[`${e}FixedDim`,e,80,80],[`on${t}Fixed`,e,10,10],[`on${t}FixedVariant`,e,30,30]]}var Hb=[...os("primary"),...os("secondary"),...os("tertiary"),["surfaceTint","primary",40,80],["background","neutral",99,10],["onBackground","neutral",10,90],["surface","neutral",99,10],["onSurface","neutral",10,90],["surfaceVariant","neutralVariant",90,30],["onSurfaceVariant","neutralVariant",30,80],["inverseSurface","neutral",20,90],["inverseOnSurface","neutral",95,20],["surfaceContainerHighest","neutral",90,22],["surfaceContainerHigh","neutral",92,17],["surfaceContainer","neutral",94,12],["surfaceContainerLow","neutral",96,10],["surfaceContainerLowest","neutral",100,4],["surfaceDim","neutral",87,6],["surfaceBright","neutral",98,24],["outline","neutralVariant",50,60],["outlineVariant","neutralVariant",80,30],["shadow","neutral",0,0],["scrim","neutral",0,0]];function kn(e,t,r,n){return new W({sourceColorArgb:Pt(t.primary),variant:Lb[t.variant]??br.TONAL_SPOT,contrastLevel:n,isDark:r,primaryPalette:e.primary,secondaryPalette:e.secondary,tertiaryPalette:e.tertiary,neutralPalette:e.neutral,neutralVariantPalette:e.neutralVariant})}function Nb(e,t){let r=ns.find(o=>o.value===t.contrast)?.level??0;if(r===0)return(o,a,i)=>i;let n={light:[kn(e,t,!1,0),kn(e,t,!1,r)],dark:[kn(e,t,!0,0),kn(e,t,!0,r)]};return(o,a,i)=>{let s=h[o];if(!s)return i;let[u,l]=n[a?"dark":"light"],c=i+s.getTone(l)-s.getTone(u);return Math.min(100,Math.max(0,Math.round(c)))}}function Lc(e,t){let r=Nb(e,t),n=Object.fromEntries(Object.keys(e).map(a=>[a,new Set])),o={};for(let[a,i,s,u]of Hb){let l=r(a,!1,s),c=r(a,!0,u);n[i].add(l).add(c),o[a]={$value:`{color.${i}.${l}}`,$extensions:{mode:{dark:`{color.${i}.${c}}`}}}}return{roles:o,usedTones:n}}var jb=["extra-small","small","medium","large","large-increased","extra-large","full"],wn=[{value:"sharp",label:"Sharp",corners:[0,0,0,0,0,0,0]},{value:"subtle",label:"Subtle",corners:[2,4,6,8,10,14,9999]},{value:"default",label:"Default",corners:[4,8,12,16,20,28,9999]},{value:"rounded",label:"Rounded",corners:[6,12,16,24,28,36,9999]}];function Hc(e){let t=wn.find(n=>n.value===e.shape)??wn.find(n=>n.value==="default"),r={$type:"dimension",none:{$value:"0px"}};return jb.forEach((n,o)=>{r[n]=n==="full"?{$type:"string",$value:`${t.corners[o]}px`}:{$value:`${t.corners[o]}px`}}),{"shape-corner":r}}var Xb="400;500;600;700",io=[{value:"Noto Sans",label:"Noto Sans",google:"Noto Sans",fallback:["sans-serif"]},{value:"Roboto",label:"Roboto",google:"Roboto",fallback:["sans-serif"]},{value:"Inter",label:"Inter",google:"Inter",fallback:["sans-serif"]},{value:"Open Sans",label:"Open Sans",google:"Open Sans",fallback:["sans-serif"]},{value:"Lato",label:"Lato",google:"Lato",fallback:["sans-serif"]},{value:"Poppins",label:"Poppins",google:"Poppins",fallback:["sans-serif"]},{value:"Source Sans 3",label:"Source Sans 3",google:"Source Sans 3",fallback:["sans-serif"]},{value:"system-ui",label:"System UI",google:null,fallback:["-apple-system","Segoe UI","Roboto","sans-serif"]}];function as(e){return io.find(t=>t.value===e)??io[0]}function Nc(e){let t=as(e);return[t.value,...t.fallback]}function jc(e){return{"font-family-brand":{$type:"fontFamily",$value:Nc(e.font?.brand),$description:"The font family used for brand headings and titles."},"font-family-sans":{$type:"fontFamily",$value:Nc(e.font?.plain),$description:"The primary font family used for body text and general content."}}}function is(e){let t=[...new Set([as(e.font?.brand),as(e.font?.plain)])].filter(r=>r.google).map(r=>`family=${r.google.replaceAll(" ","+")}:wght@${Xb}`);return t.length?`https://fonts.googleapis.com/css2?${t.join("&")}&display=swap`:null}var Ub=Object.freeze(structuredClone(bs));function Xc(e){if(!ao(e))return;let t=e.replace("#","").toLowerCase();return t.length===3&&(t=[...t].map(r=>r+r).join("")),`#${t}`}function so(e,t,r){return e.some(n=>n.value===t)?t:r}function Vb(e={}){let t=Ub,r={primary:Xc(e.primary)??t.primary,variant:so(Pc,e.variant,t.variant),contrast:so(ns,e.contrast,t.contrast),shape:so(wn,e.shape,t.shape),font:{brand:so(io,e.font?.brand,t.font.brand),plain:so(io,e.font?.plain,t.font.plain)}};for(let n of["secondary","tertiary","neutral"]){let o=Xc(e[n]);o&&(r[n]=o)}return r}function Uc(e){let t=Vb(e),r=_c(t),{roles:n,usedTones:o}=Lc(r,t),a={$type:"color"},i={};for(let s of Oc){let u=s.startsWith("neutral")?Bc:Rc;i[s]=Ic(r[s],u,o[s]),a[s]=Object.fromEntries(i[s].map(([l,c])=>[l,{$value:c}]))}a.neutral["@"]={$value:Gt(r.neutral.tone(50))},a.neutralVariant["@"]={$value:Gt(r.neutralVariant.tone(50))};for(let[s,u]of Object.entries(n))a[s]?a[s]["@"]=u:a[s]=u;return{config:t,palettes:i,documents:[["generated/color.theme.json",{color:a}],["generated/font-family.json",jc(t)],["generated/shape.json",Hc(t)]]}}function qb(e){let t=["primary","secondary","tertiary","neutral"].filter(o=>e[o]).map(o=>`${o} ${e[o]}`).join(", "),r=is(e),n=[`Peacock theme: ${t}`,`variant ${e.variant}, contrast ${e.contrast}, shape ${e.shape}`,`fonts: brand "${e.font.brand}", plain "${e.font.plain}"`];return r&&n.push(`Load the fonts with: <link rel="stylesheet" href="${r}">`),`/*
|
|
39
39
|
${n.map(o=>` * ${o}`).join(`
|
|
40
40
|
`)}
|
|
41
41
|
*/
|
|
42
|
-
`}function
|
|
42
|
+
`}function nM(e){let{palettes:t}=Uc(e),r={};for(let[n,o]of Object.entries(t)){let a=`--color-${n.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`)}`;for(let[i,s]of o)r[`${a}-${i}`]=s}return r}function aM(e,t){return e.replace(/^:root \{/m,`${t} {`).replace(` ${Tn()} {`,` ${Tn(t)} {`).replace(/^\[data-theme='dark'\] \{/m,`${t}[data-theme='dark'] {`)}async function iM(e,t={}){return(await Vc(e,t)).css}async function Vc(e,t={}){let{config:r,documents:n,palettes:o}=Uc(e),a=qb(r)+await wc(n,t);return{config:r,css:a,fontsUrl:is(r),palettes:o}}async function sM(e,{root:t=document,scope:r,id:n="peacock-theme"}={}){let o=await Vc(e,{scope:r}),a=t instanceof Document?t.head:t,i=a.querySelector(`style#${n}`);i||(i=document.createElement("style"),i.id=n,a.append(i)),i.textContent=o.css;let s=a.querySelector(`link#${n}-fonts`);return o.fontsUrl?(s||(s=document.createElement("link"),s.id=`${n}-fonts`,s.rel="stylesheet",a.append(s)),s.href=o.fontsUrl):s?.remove(),o}export{ns as CONTRAST_LEVELS,io as FONT_OPTIONS,wn as SHAPE_PRESETS,Pc as VARIANTS,sM as applyTheme,iM as buildThemeCss,Vc as createTheme,Uc as createThemeTokens,Ub as defaultThemeConfig,is as googleFontsUrl,Vb as normalizeThemeConfig,nM as paletteVariables,aM as scopeThemeCss};
|
|
43
43
|
/*! Bundled license information:
|
|
44
44
|
|
|
45
45
|
@material/material-color-utilities/utils/math_utils.js:
|