@liftkit-vue/core 0.2.1 → 0.2.3
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/README.md +6 -2
- package/dist/core.css +2 -1
- package/dist/index.cjs +2 -273
- package/dist/index.mjs +5310 -5501
- package/package.json +15 -15
- package/src/css/liftkit-tokens.css +10 -10
- package/LICENSE +0 -21
package/dist/index.cjs
CHANGED
|
@@ -1,273 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/function ne(t){return t<0?-1:t===0?0:1}function Se(t,e,n){return(1-n)*t+n*e}function Wt(t,e,n){return n<t?t:n>e?e:n}function We(t,e,n){return n<t?t:n>e?e:n}function lt(t){return t=t%360,t<0&&(t=t+360),t}function Gt(t,e){return lt(e-t)<=180?1:-1}function Yt(t,e){return 180-Math.abs(Math.abs(t-e)-180)}function rt(t,e){const n=t[0]*e[0][0]+t[1]*e[0][1]+t[2]*e[0][2],a=t[0]*e[1][0]+t[1]*e[1][1]+t[2]*e[1][2],o=t[0]*e[2][0]+t[1]*e[2][1]+t[2]*e[2][2];return[n,a,o]}/**
|
|
17
|
-
* @license
|
|
18
|
-
* Copyright 2021 Google LLC
|
|
19
|
-
*
|
|
20
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21
|
-
* you may not use this file except in compliance with the License.
|
|
22
|
-
* You may obtain a copy of the License at
|
|
23
|
-
*
|
|
24
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
-
*
|
|
26
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
27
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
28
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
|
-
* See the License for the specific language governing permissions and
|
|
30
|
-
* limitations under the License.
|
|
31
|
-
*/const Jt=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],Kt=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],Xt=[95.047,100,108.883];function ut(t,e,n){return(255<<24|(t&255)<<16|(e&255)<<8|n&255)>>>0}function Pt(t){const e=Ie(t[0]),n=Ie(t[1]),a=Ie(t[2]);return ut(e,n,a)}function xt(t){return t>>16&255}function _t(t){return t>>8&255}function Et(t){return t&255}function Zt(t,e,n){const a=Kt,o=a[0][0]*t+a[0][1]*e+a[0][2]*n,s=a[1][0]*t+a[1][1]*e+a[1][2]*n,i=a[2][0]*t+a[2][1]*e+a[2][2]*n,c=Ie(o),l=Ie(s),d=Ie(i);return ut(c,l,d)}function Qt(t){const e=Ee(xt(t)),n=Ee(_t(t)),a=Ee(Et(t));return rt([e,n,a],Jt)}function en(t){const e=ye(t),n=Ie(e);return ut(n,n,n)}function at(t){const e=Qt(t)[1];return 116*Tt(e/100)-16}function ye(t){return 100*nn((t+16)/116)}function ot(t){return Tt(t/100)*116-16}function Ee(t){const e=t/255;return e<=.040449936?e/12.92*100:Math.pow((e+.055)/1.055,2.4)*100}function Ie(t){const e=t/100;let n=0;return e<=.0031308?n=e*12.92:n=1.055*Math.pow(e,1/2.4)-.055,Wt(0,255,Math.round(n*255))}function tn(){return Xt}function Tt(t){const e=.008856451679035631,n=24389/27;return t>e?Math.pow(t,1/3):(n*t+16)/116}function nn(t){const e=.008856451679035631,n=24389/27,a=t*t*t;return a>e?a:(116*t-16)/n}/**
|
|
32
|
-
* @license
|
|
33
|
-
* Copyright 2021 Google LLC
|
|
34
|
-
*
|
|
35
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
36
|
-
* you may not use this file except in compliance with the License.
|
|
37
|
-
* You may obtain a copy of the License at
|
|
38
|
-
*
|
|
39
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
-
*
|
|
41
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
42
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
43
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44
|
-
* See the License for the specific language governing permissions and
|
|
45
|
-
* limitations under the License.
|
|
46
|
-
*/class de{static make(e=tn(),n=200/Math.PI*ye(50)/100,a=50,o=2,s=!1){const i=e,c=i[0]*.401288+i[1]*.650173+i[2]*-.051461,l=i[0]*-.250268+i[1]*1.204414+i[2]*.045854,d=i[0]*-.002079+i[1]*.048952+i[2]*.953127,u=.8+o/10,h=u>=.9?Se(.59,.69,(u-.9)*10):Se(.525,.59,(u-.8)*10);let w=s?1:u*(1-1/3.6*Math.exp((-n-42)/92));w=w>1?1:w<0?0:w;const k=u,g=[w*(100/c)+1-w,w*(100/l)+1-w,w*(100/d)+1-w],p=1/(5*n+1),b=p*p*p*p,m=1-b,v=b*n+.1*m*m*Math.cbrt(5*n),P=ye(a)/e[1],f=1.48+Math.sqrt(P),x=.725/Math.pow(P,.2),L=x,M=[Math.pow(v*g[0]*c/100,.42),Math.pow(v*g[1]*l/100,.42),Math.pow(v*g[2]*d/100,.42)],B=[400*M[0]/(M[0]+27.13),400*M[1]/(M[1]+27.13),400*M[2]/(M[2]+27.13)],T=(2*B[0]+B[1]+.05*B[2])*x;return new de(P,T,x,L,h,k,g,v,Math.pow(v,.25),f)}constructor(e,n,a,o,s,i,c,l,d,u){this.n=e,this.aw=n,this.nbb=a,this.ncb=o,this.c=s,this.nc=i,this.rgbD=c,this.fl=l,this.fLRoot=d,this.z=u}}de.DEFAULT=de.make();/**
|
|
47
|
-
* @license
|
|
48
|
-
* Copyright 2021 Google LLC
|
|
49
|
-
*
|
|
50
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
51
|
-
* you may not use this file except in compliance with the License.
|
|
52
|
-
* You may obtain a copy of the License at
|
|
53
|
-
*
|
|
54
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
55
|
-
*
|
|
56
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
57
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
58
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
59
|
-
* See the License for the specific language governing permissions and
|
|
60
|
-
* limitations under the License.
|
|
61
|
-
*/class J{constructor(e,n,a,o,s,i,c,l,d){this.hue=e,this.chroma=n,this.j=a,this.q=o,this.m=s,this.s=i,this.jstar=c,this.astar=l,this.bstar=d}distance(e){const n=this.jstar-e.jstar,a=this.astar-e.astar,o=this.bstar-e.bstar,s=Math.sqrt(n*n+a*a+o*o);return 1.41*Math.pow(s,.63)}static fromInt(e){return J.fromIntInViewingConditions(e,de.DEFAULT)}static fromIntInViewingConditions(e,n){const a=(e&16711680)>>16,o=(e&65280)>>8,s=e&255,i=Ee(a),c=Ee(o),l=Ee(s),d=.41233895*i+.35762064*c+.18051042*l,u=.2126*i+.7152*c+.0722*l,h=.01932141*i+.11916382*c+.95034478*l,w=.401288*d+.650173*u-.051461*h,k=-.250268*d+1.204414*u+.045854*h,g=-.002079*d+.048952*u+.953127*h,p=n.rgbD[0]*w,b=n.rgbD[1]*k,m=n.rgbD[2]*g,v=Math.pow(n.fl*Math.abs(p)/100,.42),P=Math.pow(n.fl*Math.abs(b)/100,.42),f=Math.pow(n.fl*Math.abs(m)/100,.42),x=ne(p)*400*v/(v+27.13),L=ne(b)*400*P/(P+27.13),M=ne(m)*400*f/(f+27.13),B=(11*x+-12*L+M)/11,T=(x+L-2*M)/9,$=(20*x+20*L+21*M)/20,N=(40*x+20*L+M)/20,H=Math.atan2(T,B)*180/Math.PI,R=H<0?H+360:H>=360?H-360:H,ie=R*Math.PI/180,se=N*n.nbb,ce=100*Math.pow(se/n.aw,n.c*n.z),ke=4/n.c*Math.sqrt(ce/100)*(n.aw+4)*n.fLRoot,be=R<20.14?R+360:R,Me=.25*(Math.cos(be*Math.PI/180+2)+3.8),xe=5e4/13*Me*n.nc*n.ncb*Math.sqrt(B*B+T*T)/($+.305),Be=Math.pow(xe,.9)*Math.pow(1.64-Math.pow(.29,n.n),.73),Re=Be*Math.sqrt(ce/100),ze=Re*n.fLRoot,je=50*Math.sqrt(Be*n.c/(n.aw+4)),et=(1+100*.007)*ce/(1+.007*ce),He=1/.0228*Math.log(1+.0228*ze),qt=He*Math.cos(ie),Ut=He*Math.sin(ie);return new J(R,Re,ce,ke,ze,je,et,qt,Ut)}static fromJch(e,n,a){return J.fromJchInViewingConditions(e,n,a,de.DEFAULT)}static fromJchInViewingConditions(e,n,a,o){const s=4/o.c*Math.sqrt(e/100)*(o.aw+4)*o.fLRoot,i=n*o.fLRoot,c=n/Math.sqrt(e/100),l=50*Math.sqrt(c*o.c/(o.aw+4)),d=a*Math.PI/180,u=(1+100*.007)*e/(1+.007*e),h=1/.0228*Math.log(1+.0228*i),w=h*Math.cos(d),k=h*Math.sin(d);return new J(a,n,e,s,i,l,u,w,k)}static fromUcs(e,n,a){return J.fromUcsInViewingConditions(e,n,a,de.DEFAULT)}static fromUcsInViewingConditions(e,n,a,o){const s=n,i=a,c=Math.sqrt(s*s+i*i),d=(Math.exp(c*.0228)-1)/.0228/o.fLRoot;let u=Math.atan2(i,s)*(180/Math.PI);u<0&&(u+=360);const h=e/(1-(e-100)*.007);return J.fromJchInViewingConditions(h,d,u,o)}toInt(){return this.viewed(de.DEFAULT)}viewed(e){const n=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),a=Math.pow(n/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,s=.25*(Math.cos(o+2)+3.8),i=e.aw*Math.pow(this.j/100,1/e.c/e.z),c=s*(5e4/13)*e.nc*e.ncb,l=i/e.nbb,d=Math.sin(o),u=Math.cos(o),h=23*(l+.305)*a/(23*c+11*a*u+108*a*d),w=h*u,k=h*d,g=(460*l+451*w+288*k)/1403,p=(460*l-891*w-261*k)/1403,b=(460*l-220*w-6300*k)/1403,m=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),v=ne(g)*(100/e.fl)*Math.pow(m,1/.42),P=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),f=ne(p)*(100/e.fl)*Math.pow(P,1/.42),x=Math.max(0,27.13*Math.abs(b)/(400-Math.abs(b))),L=ne(b)*(100/e.fl)*Math.pow(x,1/.42),M=v/e.rgbD[0],B=f/e.rgbD[1],T=L/e.rgbD[2],$=1.86206786*M-1.01125463*B+.14918677*T,N=.38752654*M+.62144744*B-.00897398*T,A=-.0158415*M-.03412294*B+1.04996444*T;return Zt($,N,A)}static fromXyzInViewingConditions(e,n,a,o){const s=.401288*e+.650173*n-.051461*a,i=-.250268*e+1.204414*n+.045854*a,c=-.002079*e+.048952*n+.953127*a,l=o.rgbD[0]*s,d=o.rgbD[1]*i,u=o.rgbD[2]*c,h=Math.pow(o.fl*Math.abs(l)/100,.42),w=Math.pow(o.fl*Math.abs(d)/100,.42),k=Math.pow(o.fl*Math.abs(u)/100,.42),g=ne(l)*400*h/(h+27.13),p=ne(d)*400*w/(w+27.13),b=ne(u)*400*k/(k+27.13),m=(11*g+-12*p+b)/11,v=(g+p-2*b)/9,P=(20*g+20*p+21*b)/20,f=(40*g+20*p+b)/20,L=Math.atan2(v,m)*180/Math.PI,M=L<0?L+360:L>=360?L-360:L,B=M*Math.PI/180,T=f*o.nbb,$=100*Math.pow(T/o.aw,o.c*o.z),N=4/o.c*Math.sqrt($/100)*(o.aw+4)*o.fLRoot,A=M<20.14?M+360:M,H=1/4*(Math.cos(A*Math.PI/180+2)+3.8),ie=5e4/13*H*o.nc*o.ncb*Math.sqrt(m*m+v*v)/(P+.305),se=Math.pow(ie,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),ce=se*Math.sqrt($/100),ke=ce*o.fLRoot,be=50*Math.sqrt(se*o.c/(o.aw+4)),Me=(1+100*.007)*$/(1+.007*$),Ce=Math.log(1+.0228*ke)/.0228,xe=Ce*Math.cos(B),Be=Ce*Math.sin(B);return new J(M,ce,$,N,ke,be,Me,xe,Be)}xyzInViewingConditions(e){const n=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),a=Math.pow(n/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,s=.25*(Math.cos(o+2)+3.8),i=e.aw*Math.pow(this.j/100,1/e.c/e.z),c=s*(5e4/13)*e.nc*e.ncb,l=i/e.nbb,d=Math.sin(o),u=Math.cos(o),h=23*(l+.305)*a/(23*c+11*a*u+108*a*d),w=h*u,k=h*d,g=(460*l+451*w+288*k)/1403,p=(460*l-891*w-261*k)/1403,b=(460*l-220*w-6300*k)/1403,m=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),v=ne(g)*(100/e.fl)*Math.pow(m,1/.42),P=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),f=ne(p)*(100/e.fl)*Math.pow(P,1/.42),x=Math.max(0,27.13*Math.abs(b)/(400-Math.abs(b))),L=ne(b)*(100/e.fl)*Math.pow(x,1/.42),M=v/e.rgbD[0],B=f/e.rgbD[1],T=L/e.rgbD[2],$=1.86206786*M-1.01125463*B+.14918677*T,N=.38752654*M+.62144744*B-.00897398*T,A=-.0158415*M-.03412294*B+1.04996444*T;return[$,N,A]}}/**
|
|
62
|
-
* @license
|
|
63
|
-
* Copyright 2021 Google LLC
|
|
64
|
-
*
|
|
65
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
66
|
-
* you may not use this file except in compliance with the License.
|
|
67
|
-
* You may obtain a copy of the License at
|
|
68
|
-
*
|
|
69
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
70
|
-
*
|
|
71
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
72
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
73
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
74
|
-
* See the License for the specific language governing permissions and
|
|
75
|
-
* limitations under the License.
|
|
76
|
-
*/class _{static sanitizeRadians(e){return(e+Math.PI*8)%(Math.PI*2)}static trueDelinearized(e){const n=e/100;let a=0;return n<=.0031308?a=n*12.92:a=1.055*Math.pow(n,1/2.4)-.055,a*255}static chromaticAdaptation(e){const n=Math.pow(Math.abs(e),.42);return ne(e)*400*n/(n+27.13)}static hueOf(e){const n=rt(e,_.SCALED_DISCOUNT_FROM_LINRGB),a=_.chromaticAdaptation(n[0]),o=_.chromaticAdaptation(n[1]),s=_.chromaticAdaptation(n[2]),i=(11*a+-12*o+s)/11,c=(a+o-2*s)/9;return Math.atan2(c,i)}static areInCyclicOrder(e,n,a){const o=_.sanitizeRadians(n-e),s=_.sanitizeRadians(a-e);return o<s}static intercept(e,n,a){return(n-e)/(a-e)}static lerpPoint(e,n,a){return[e[0]+(a[0]-e[0])*n,e[1]+(a[1]-e[1])*n,e[2]+(a[2]-e[2])*n]}static setCoordinate(e,n,a,o){const s=_.intercept(e[o],n,a[o]);return _.lerpPoint(e,s,a)}static isBounded(e){return 0<=e&&e<=100}static nthVertex(e,n){const a=_.Y_FROM_LINRGB[0],o=_.Y_FROM_LINRGB[1],s=_.Y_FROM_LINRGB[2],i=n%4<=1?0:100,c=n%2===0?0:100;if(n<4){const l=i,d=c,u=(e-l*o-d*s)/a;return _.isBounded(u)?[u,l,d]:[-1,-1,-1]}else if(n<8){const l=i,d=c,u=(e-d*a-l*s)/o;return _.isBounded(u)?[d,u,l]:[-1,-1,-1]}else{const l=i,d=c,u=(e-l*a-d*o)/s;return _.isBounded(u)?[l,d,u]:[-1,-1,-1]}}static bisectToSegment(e,n){let a=[-1,-1,-1],o=a,s=0,i=0,c=!1,l=!0;for(let d=0;d<12;d++){const u=_.nthVertex(e,d);if(u[0]<0)continue;const h=_.hueOf(u);if(!c){a=u,o=u,s=h,i=h,c=!0;continue}(l||_.areInCyclicOrder(s,h,i))&&(l=!1,_.areInCyclicOrder(s,n,h)?(o=u,i=h):(a=u,s=h))}return[a,o]}static midpoint(e,n){return[(e[0]+n[0])/2,(e[1]+n[1])/2,(e[2]+n[2])/2]}static criticalPlaneBelow(e){return Math.floor(e-.5)}static criticalPlaneAbove(e){return Math.ceil(e-.5)}static bisectToLimit(e,n){const a=_.bisectToSegment(e,n);let o=a[0],s=_.hueOf(o),i=a[1];for(let c=0;c<3;c++)if(o[c]!==i[c]){let l=-1,d=255;o[c]<i[c]?(l=_.criticalPlaneBelow(_.trueDelinearized(o[c])),d=_.criticalPlaneAbove(_.trueDelinearized(i[c]))):(l=_.criticalPlaneAbove(_.trueDelinearized(o[c])),d=_.criticalPlaneBelow(_.trueDelinearized(i[c])));for(let u=0;u<8&&!(Math.abs(d-l)<=1);u++){const h=Math.floor((l+d)/2),w=_.CRITICAL_PLANES[h],k=_.setCoordinate(o,w,i,c),g=_.hueOf(k);_.areInCyclicOrder(s,n,g)?(i=k,d=h):(o=k,s=g,l=h)}}return _.midpoint(o,i)}static inverseChromaticAdaptation(e){const n=Math.abs(e),a=Math.max(0,27.13*n/(400-n));return ne(e)*Math.pow(a,1/.42)}static findResultByJ(e,n,a){let o=Math.sqrt(a)*11;const s=de.DEFAULT,i=1/Math.pow(1.64-Math.pow(.29,s.n),.73),l=.25*(Math.cos(e+2)+3.8)*(5e4/13)*s.nc*s.ncb,d=Math.sin(e),u=Math.cos(e);for(let h=0;h<5;h++){const w=o/100,k=n===0||o===0?0:n/Math.sqrt(w),g=Math.pow(k*i,1/.9),b=s.aw*Math.pow(w,1/s.c/s.z)/s.nbb,m=23*(b+.305)*g/(23*l+11*g*u+108*g*d),v=m*u,P=m*d,f=(460*b+451*v+288*P)/1403,x=(460*b-891*v-261*P)/1403,L=(460*b-220*v-6300*P)/1403,M=_.inverseChromaticAdaptation(f),B=_.inverseChromaticAdaptation(x),T=_.inverseChromaticAdaptation(L),$=rt([M,B,T],_.LINRGB_FROM_SCALED_DISCOUNT);if($[0]<0||$[1]<0||$[2]<0)return 0;const N=_.Y_FROM_LINRGB[0],A=_.Y_FROM_LINRGB[1],H=_.Y_FROM_LINRGB[2],R=N*$[0]+A*$[1]+H*$[2];if(R<=0)return 0;if(h===4||Math.abs(R-a)<.002)return $[0]>100.01||$[1]>100.01||$[2]>100.01?0:Pt($);o=o-(R-a)*o/(2*R)}return 0}static solveToInt(e,n,a){if(n<1e-4||a<1e-4||a>99.9999)return en(a);e=lt(e);const o=e/180*Math.PI,s=ye(a),i=_.findResultByJ(o,n,s);if(i!==0)return i;const c=_.bisectToLimit(s,o);return Pt(c)}static solveToCam(e,n,a){return J.fromInt(_.solveToInt(e,n,a))}}_.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];_.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];_.Y_FROM_LINRGB=[.2126,.7152,.0722];_.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];/**
|
|
77
|
-
* @license
|
|
78
|
-
* Copyright 2021 Google LLC
|
|
79
|
-
*
|
|
80
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
81
|
-
* you may not use this file except in compliance with the License.
|
|
82
|
-
* You may obtain a copy of the License at
|
|
83
|
-
*
|
|
84
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
85
|
-
*
|
|
86
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
87
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
88
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
89
|
-
* See the License for the specific language governing permissions and
|
|
90
|
-
* limitations under the License.
|
|
91
|
-
*/class q{static from(e,n,a){return new q(_.solveToInt(e,n,a))}static fromInt(e){return new q(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(_.solveToInt(e,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(_.solveToInt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(_.solveToInt(this.internalHue,this.internalChroma,e))}constructor(e){this.argb=e;const n=J.fromInt(e);this.internalHue=n.hue,this.internalChroma=n.chroma,this.internalTone=at(e),this.argb=e}setInternalState(e){const n=J.fromInt(e);this.internalHue=n.hue,this.internalChroma=n.chroma,this.internalTone=at(e),this.argb=e}inViewingConditions(e){const a=J.fromInt(this.toInt()).xyzInViewingConditions(e),o=J.fromXyzInViewingConditions(a[0],a[1],a[2],de.make());return q.from(o.hue,o.chroma,ot(a[1]))}}/**
|
|
92
|
-
* @license
|
|
93
|
-
* Copyright 2021 Google LLC
|
|
94
|
-
*
|
|
95
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
96
|
-
* you may not use this file except in compliance with the License.
|
|
97
|
-
* You may obtain a copy of the License at
|
|
98
|
-
*
|
|
99
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
100
|
-
*
|
|
101
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
102
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
103
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
104
|
-
* See the License for the specific language governing permissions and
|
|
105
|
-
* limitations under the License.
|
|
106
|
-
*/class dt{static harmonize(e,n){const a=q.fromInt(e),o=q.fromInt(n),s=Yt(a.hue,o.hue),i=Math.min(s*.5,15),c=lt(a.hue+i*Gt(a.hue,o.hue));return q.from(c,a.chroma,a.tone).toInt()}static hctHue(e,n,a){const o=dt.cam16Ucs(e,n,a),s=J.fromInt(o),i=J.fromInt(e);return q.from(s.hue,i.chroma,at(e)).toInt()}static cam16Ucs(e,n,a){const o=J.fromInt(e),s=J.fromInt(n),i=o.jstar,c=o.astar,l=o.bstar,d=s.jstar,u=s.astar,h=s.bstar,w=i+(d-i)*a,k=c+(u-c)*a,g=l+(h-l)*a;return J.fromUcs(w,k,g).toInt()}}/**
|
|
107
|
-
* @license
|
|
108
|
-
* Copyright 2022 Google LLC
|
|
109
|
-
*
|
|
110
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111
|
-
* you may not use this file except in compliance with the License.
|
|
112
|
-
* You may obtain a copy of the License at
|
|
113
|
-
*
|
|
114
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
115
|
-
*
|
|
116
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
117
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
118
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
119
|
-
* See the License for the specific language governing permissions and
|
|
120
|
-
* limitations under the License.
|
|
121
|
-
*/class G{static ratioOfTones(e,n){return e=We(0,100,e),n=We(0,100,n),G.ratioOfYs(ye(e),ye(n))}static ratioOfYs(e,n){const a=e>n?e:n,o=a===n?e:n;return(a+5)/(o+5)}static lighter(e,n){if(e<0||e>100)return-1;const a=ye(e),o=n*(a+5)-5,s=G.ratioOfYs(o,a),i=Math.abs(s-n);if(s<n&&i>.04)return-1;const c=ot(o)+.4;return c<0||c>100?-1:c}static darker(e,n){if(e<0||e>100)return-1;const a=ye(e),o=(a+5)/n-5,s=G.ratioOfYs(a,o),i=Math.abs(s-n);if(s<n&&i>.04)return-1;const c=ot(o)-.4;return c<0||c>100?-1:c}static lighterUnsafe(e,n){const a=G.lighter(e,n);return a<0?100:a}static darkerUnsafe(e,n){const a=G.darker(e,n);return a<0?0:a}}/**
|
|
122
|
-
* @license
|
|
123
|
-
* Copyright 2023 Google LLC
|
|
124
|
-
*
|
|
125
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
126
|
-
* you may not use this file except in compliance with the License.
|
|
127
|
-
* You may obtain a copy of the License at
|
|
128
|
-
*
|
|
129
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
130
|
-
*
|
|
131
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
132
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
133
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
134
|
-
* See the License for the specific language governing permissions and
|
|
135
|
-
* limitations under the License.
|
|
136
|
-
*/class mt{static isDisliked(e){const n=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,a=Math.round(e.chroma)>16,o=Math.round(e.tone)<65;return n&&a&&o}static fixIfDisliked(e){return mt.isDisliked(e)?q.from(e.hue,e.chroma,70):e}}/**
|
|
137
|
-
* @license
|
|
138
|
-
* Copyright 2022 Google LLC
|
|
139
|
-
*
|
|
140
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
141
|
-
* you may not use this file except in compliance with the License.
|
|
142
|
-
* You may obtain a copy of the License at
|
|
143
|
-
*
|
|
144
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
145
|
-
*
|
|
146
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
147
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
148
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
149
|
-
* See the License for the specific language governing permissions and
|
|
150
|
-
* limitations under the License.
|
|
151
|
-
*/class I{static fromPalette(e){return new I(e.name??"",e.palette,e.tone,e.isBackground??!1,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)}constructor(e,n,a,o,s,i,c,l){if(this.name=e,this.palette=n,this.tone=a,this.isBackground=o,this.background=s,this.secondBackground=i,this.contrastCurve=c,this.toneDeltaPair=l,this.hctCache=new Map,!s&&i)throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!s&&c)throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(s&&!c)throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(e){return this.getHct(e).toInt()}getHct(e){const n=this.hctCache.get(e);if(n!=null)return n;const a=this.getTone(e),o=this.palette(e).getHct(a);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,o),o}getTone(e){const n=e.contrastLevel<0;if(this.toneDeltaPair){const a=this.toneDeltaPair(e),o=a.roleA,s=a.roleB,i=a.delta,c=a.polarity,l=a.stayTogether,u=this.background(e).getTone(e),h=c==="nearer"||c==="lighter"&&!e.isDark||c==="darker"&&e.isDark,w=h?o:s,k=h?s:o,g=this.name===w.name,p=e.isDark?1:-1,b=w.contrastCurve.get(e.contrastLevel),m=k.contrastCurve.get(e.contrastLevel),v=w.tone(e);let P=G.ratioOfTones(u,v)>=b?v:I.foregroundTone(u,b);const f=k.tone(e);let x=G.ratioOfTones(u,f)>=m?f:I.foregroundTone(u,m);return n&&(P=I.foregroundTone(u,b),x=I.foregroundTone(u,m)),(x-P)*p>=i||(x=We(0,100,P+i*p),(x-P)*p>=i||(P=We(0,100,x-i*p))),50<=P&&P<60?p>0?(P=60,x=Math.max(x,P+i*p)):(P=49,x=Math.min(x,P+i*p)):50<=x&&x<60&&(l?p>0?(P=60,x=Math.max(x,P+i*p)):(P=49,x=Math.min(x,P+i*p)):p>0?x=60:x=49),g?P:x}else{let a=this.tone(e);if(this.background==null)return a;const o=this.background(e).getTone(e),s=this.contrastCurve.get(e.contrastLevel);if(G.ratioOfTones(o,a)>=s||(a=I.foregroundTone(o,s)),n&&(a=I.foregroundTone(o,s)),this.isBackground&&50<=a&&a<60&&(G.ratioOfTones(49,o)>=s?a=49:a=60),this.secondBackground){const[i,c]=[this.background,this.secondBackground],[l,d]=[i(e).getTone(e),c(e).getTone(e)],[u,h]=[Math.max(l,d),Math.min(l,d)];if(G.ratioOfTones(u,a)>=s&&G.ratioOfTones(h,a)>=s)return a;const w=G.lighter(u,s),k=G.darker(h,s),g=[];return w!==-1&&g.push(w),k!==-1&&g.push(k),I.tonePrefersLightForeground(l)||I.tonePrefersLightForeground(d)?w<0?100:w:g.length===1?g[0]:k<0?0:k}return a}}static foregroundTone(e,n){const a=G.lighterUnsafe(e,n),o=G.darkerUnsafe(e,n),s=G.ratioOfTones(a,e),i=G.ratioOfTones(o,e);if(I.tonePrefersLightForeground(e)){const l=Math.abs(s-i)<.1&&s<n&&i<n;return s>=n||s>=i||l?a:o}else return i>=n||i>=s?o:a}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(e){return I.tonePrefersLightForeground(e)&&!I.toneAllowsLightForeground(e)?49:e}}/**
|
|
152
|
-
* @license
|
|
153
|
-
* Copyright 2021 Google LLC
|
|
154
|
-
*
|
|
155
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
156
|
-
* you may not use this file except in compliance with the License.
|
|
157
|
-
* You may obtain a copy of the License at
|
|
158
|
-
*
|
|
159
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
160
|
-
*
|
|
161
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
162
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
163
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
164
|
-
* See the License for the specific language governing permissions and
|
|
165
|
-
* limitations under the License.
|
|
166
|
-
*/class Z{static fromInt(e){const n=q.fromInt(e);return Z.fromHct(n)}static fromHct(e){return new Z(e.hue,e.chroma,e)}static fromHueAndChroma(e,n){const a=new rn(e,n).create();return new Z(e,n,a)}constructor(e,n,a){this.hue=e,this.chroma=n,this.keyColor=a,this.cache=new Map}tone(e){let n=this.cache.get(e);return n===void 0&&(n=q.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,n)),n}getHct(e){return q.fromInt(this.tone(e))}}class rn{constructor(e,n){this.hue=e,this.requestedChroma=n,this.chromaCache=new Map,this.maxChromaValue=200}create(){let o=0,s=100;for(;o<s;){const i=Math.floor((o+s)/2),c=this.maxChroma(i)<this.maxChroma(i+1);if(this.maxChroma(i)>=this.requestedChroma-.01)if(Math.abs(o-50)<Math.abs(s-50))s=i;else{if(o===i)return q.from(this.hue,this.requestedChroma,o);o=i}else c?o=i+1:s=i}return q.from(this.hue,this.requestedChroma,o)}maxChroma(e){if(this.chromaCache.has(e))return this.chromaCache.get(e);const n=q.from(this.hue,this.maxChromaValue,e).chroma;return this.chromaCache.set(e,n),n}}/**
|
|
167
|
-
* @license
|
|
168
|
-
* Copyright 2023 Google LLC
|
|
169
|
-
*
|
|
170
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
171
|
-
* you may not use this file except in compliance with the License.
|
|
172
|
-
* You may obtain a copy of the License at
|
|
173
|
-
*
|
|
174
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
175
|
-
*
|
|
176
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
177
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
178
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
179
|
-
* See the License for the specific language governing permissions and
|
|
180
|
-
* limitations under the License.
|
|
181
|
-
*/class V{constructor(e,n,a,o){this.low=e,this.normal=n,this.medium=a,this.high=o}get(e){return e<=-1?this.low:e<0?Se(this.low,this.normal,(e- -1)/1):e<.5?Se(this.normal,this.medium,(e-0)/.5):e<1?Se(this.medium,this.high,(e-.5)/.5):this.high}}/**
|
|
182
|
-
* @license
|
|
183
|
-
* Copyright 2023 Google LLC
|
|
184
|
-
*
|
|
185
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
186
|
-
* you may not use this file except in compliance with the License.
|
|
187
|
-
* You may obtain a copy of the License at
|
|
188
|
-
*
|
|
189
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
190
|
-
*
|
|
191
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
192
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
193
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
194
|
-
* See the License for the specific language governing permissions and
|
|
195
|
-
* limitations under the License.
|
|
196
|
-
*/class ae{constructor(e,n,a,o,s){this.roleA=e,this.roleB=n,this.delta=a,this.polarity=o,this.stayTogether=s}}/**
|
|
197
|
-
* @license
|
|
198
|
-
* Copyright 2022 Google LLC
|
|
199
|
-
*
|
|
200
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
201
|
-
* you may not use this file except in compliance with the License.
|
|
202
|
-
* You may obtain a copy of the License at
|
|
203
|
-
*
|
|
204
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
205
|
-
*
|
|
206
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
207
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
208
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
209
|
-
* See the License for the specific language governing permissions and
|
|
210
|
-
* limitations under the License.
|
|
211
|
-
*/var Ne;(function(t){t[t.MONOCHROME=0]="MONOCHROME",t[t.NEUTRAL=1]="NEUTRAL",t[t.TONAL_SPOT=2]="TONAL_SPOT",t[t.VIBRANT=3]="VIBRANT",t[t.EXPRESSIVE=4]="EXPRESSIVE",t[t.FIDELITY=5]="FIDELITY",t[t.CONTENT=6]="CONTENT",t[t.RAINBOW=7]="RAINBOW",t[t.FRUIT_SALAD=8]="FRUIT_SALAD"})(Ne||(Ne={}));/**
|
|
212
|
-
* @license
|
|
213
|
-
* Copyright 2022 Google LLC
|
|
214
|
-
*
|
|
215
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
216
|
-
* you may not use this file except in compliance with the License.
|
|
217
|
-
* You may obtain a copy of the License at
|
|
218
|
-
*
|
|
219
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
220
|
-
*
|
|
221
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
222
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
223
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
224
|
-
* See the License for the specific language governing permissions and
|
|
225
|
-
* limitations under the License.
|
|
226
|
-
*/function Te(t){return t.variant===Ne.FIDELITY||t.variant===Ne.CONTENT}function z(t){return t.variant===Ne.MONOCHROME}function an(t,e,n,a){let o=n,s=q.from(t,e,n);if(s.chroma<e){let i=s.chroma;for(;s.chroma<e;){o+=a?-1:1;const c=q.from(t,e,o);if(i>c.chroma||Math.abs(c.chroma-e)<.4)break;const l=Math.abs(c.chroma-e),d=Math.abs(s.chroma-e);l<d&&(s=c),i=Math.max(i,c.chroma)}}return o}class C{static highestSurface(e){return e.isDark?C.surfaceBright:C.surfaceDim}}C.contentAccentToneDelta=15;C.primaryPaletteKeyColor=I.fromPalette({name:"primary_palette_key_color",palette:t=>t.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone});C.secondaryPaletteKeyColor=I.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone});C.tertiaryPaletteKeyColor=I.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone});C.neutralPaletteKeyColor=I.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone});C.neutralVariantPaletteKeyColor=I.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone});C.background=I.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:!0});C.onBackground=I.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>C.background,contrastCurve:new V(3,3,4.5,7)});C.surface=I.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:!0});C.surfaceDim=I.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new V(87,87,80,75).get(t.contrastLevel),isBackground:!0});C.surfaceBright=I.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new V(24,24,29,34).get(t.contrastLevel):98,isBackground:!0});C.surfaceContainerLowest=I.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new V(4,4,2,0).get(t.contrastLevel):100,isBackground:!0});C.surfaceContainerLow=I.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new V(10,10,11,12).get(t.contrastLevel):new V(96,96,96,95).get(t.contrastLevel),isBackground:!0});C.surfaceContainer=I.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new V(12,12,16,20).get(t.contrastLevel):new V(94,94,92,90).get(t.contrastLevel),isBackground:!0});C.surfaceContainerHigh=I.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new V(17,17,21,25).get(t.contrastLevel):new V(92,92,88,85).get(t.contrastLevel),isBackground:!0});C.surfaceContainerHighest=I.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new V(22,22,26,30).get(t.contrastLevel):new V(90,90,84,80).get(t.contrastLevel),isBackground:!0});C.onSurface=I.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>C.highestSurface(t),contrastCurve:new V(4.5,7,11,21)});C.surfaceVariant=I.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:!0});C.onSurfaceVariant=I.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>C.highestSurface(t),contrastCurve:new V(3,4.5,7,11)});C.inverseSurface=I.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20});C.inverseOnSurface=I.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>C.inverseSurface,contrastCurve:new V(4.5,7,11,21)});C.outline=I.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>C.highestSurface(t),contrastCurve:new V(1.5,3,4.5,7)});C.outlineVariant=I.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5)});C.shadow=I.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0});C.scrim=I.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0});C.surfaceTint=I.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:!0});C.primary=I.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>z(t)?t.isDark?100:0:t.isDark?80:40,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(3,4.5,7,7),toneDeltaPair:t=>new ae(C.primaryContainer,C.primary,10,"nearer",!1)});C.onPrimary=I.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>z(t)?t.isDark?10:90:t.isDark?20:100,background:t=>C.primary,contrastCurve:new V(4.5,7,11,21)});C.primaryContainer=I.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>Te(t)?t.sourceColorHct.tone:z(t)?t.isDark?85:25:t.isDark?30:90,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5),toneDeltaPair:t=>new ae(C.primaryContainer,C.primary,10,"nearer",!1)});C.onPrimaryContainer=I.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>Te(t)?I.foregroundTone(C.primaryContainer.tone(t),4.5):z(t)?t.isDark?0:100:t.isDark?90:30,background:t=>C.primaryContainer,contrastCurve:new V(3,4.5,7,11)});C.inversePrimary=I.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>C.inverseSurface,contrastCurve:new V(3,4.5,7,7)});C.secondary=I.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(3,4.5,7,7),toneDeltaPair:t=>new ae(C.secondaryContainer,C.secondary,10,"nearer",!1)});C.onSecondary=I.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>z(t)?t.isDark?10:100:t.isDark?20:100,background:t=>C.secondary,contrastCurve:new V(4.5,7,11,21)});C.secondaryContainer=I.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{const e=t.isDark?30:90;return z(t)?t.isDark?30:85:Te(t)?an(t.secondaryPalette.hue,t.secondaryPalette.chroma,e,!t.isDark):e},isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5),toneDeltaPair:t=>new ae(C.secondaryContainer,C.secondary,10,"nearer",!1)});C.onSecondaryContainer=I.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>z(t)?t.isDark?90:10:Te(t)?I.foregroundTone(C.secondaryContainer.tone(t),4.5):t.isDark?90:30,background:t=>C.secondaryContainer,contrastCurve:new V(3,4.5,7,11)});C.tertiary=I.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>z(t)?t.isDark?90:25:t.isDark?80:40,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(3,4.5,7,7),toneDeltaPair:t=>new ae(C.tertiaryContainer,C.tertiary,10,"nearer",!1)});C.onTertiary=I.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>z(t)?t.isDark?10:90:t.isDark?20:100,background:t=>C.tertiary,contrastCurve:new V(4.5,7,11,21)});C.tertiaryContainer=I.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(z(t))return t.isDark?60:49;if(!Te(t))return t.isDark?30:90;const e=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return mt.fixIfDisliked(e).tone},isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5),toneDeltaPair:t=>new ae(C.tertiaryContainer,C.tertiary,10,"nearer",!1)});C.onTertiaryContainer=I.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>z(t)?t.isDark?0:100:Te(t)?I.foregroundTone(C.tertiaryContainer.tone(t),4.5):t.isDark?90:30,background:t=>C.tertiaryContainer,contrastCurve:new V(3,4.5,7,11)});C.error=I.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(3,4.5,7,7),toneDeltaPair:t=>new ae(C.errorContainer,C.error,10,"nearer",!1)});C.onError=I.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>C.error,contrastCurve:new V(4.5,7,11,21)});C.errorContainer=I.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5),toneDeltaPair:t=>new ae(C.errorContainer,C.error,10,"nearer",!1)});C.onErrorContainer=I.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>z(t)?t.isDark?90:10:t.isDark?90:30,background:t=>C.errorContainer,contrastCurve:new V(3,4.5,7,11)});C.primaryFixed=I.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>z(t)?40:90,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5),toneDeltaPair:t=>new ae(C.primaryFixed,C.primaryFixedDim,10,"lighter",!0)});C.primaryFixedDim=I.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>z(t)?30:80,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5),toneDeltaPair:t=>new ae(C.primaryFixed,C.primaryFixedDim,10,"lighter",!0)});C.onPrimaryFixed=I.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>z(t)?100:10,background:t=>C.primaryFixedDim,secondBackground:t=>C.primaryFixed,contrastCurve:new V(4.5,7,11,21)});C.onPrimaryFixedVariant=I.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>z(t)?90:30,background:t=>C.primaryFixedDim,secondBackground:t=>C.primaryFixed,contrastCurve:new V(3,4.5,7,11)});C.secondaryFixed=I.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>z(t)?80:90,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5),toneDeltaPair:t=>new ae(C.secondaryFixed,C.secondaryFixedDim,10,"lighter",!0)});C.secondaryFixedDim=I.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>z(t)?70:80,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5),toneDeltaPair:t=>new ae(C.secondaryFixed,C.secondaryFixedDim,10,"lighter",!0)});C.onSecondaryFixed=I.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>C.secondaryFixedDim,secondBackground:t=>C.secondaryFixed,contrastCurve:new V(4.5,7,11,21)});C.onSecondaryFixedVariant=I.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>z(t)?25:30,background:t=>C.secondaryFixedDim,secondBackground:t=>C.secondaryFixed,contrastCurve:new V(3,4.5,7,11)});C.tertiaryFixed=I.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>z(t)?40:90,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5),toneDeltaPair:t=>new ae(C.tertiaryFixed,C.tertiaryFixedDim,10,"lighter",!0)});C.tertiaryFixedDim=I.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>z(t)?30:80,isBackground:!0,background:t=>C.highestSurface(t),contrastCurve:new V(1,1,3,4.5),toneDeltaPair:t=>new ae(C.tertiaryFixed,C.tertiaryFixedDim,10,"lighter",!0)});C.onTertiaryFixed=I.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>z(t)?100:10,background:t=>C.tertiaryFixedDim,secondBackground:t=>C.tertiaryFixed,contrastCurve:new V(4.5,7,11,21)});C.onTertiaryFixedVariant=I.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>z(t)?90:30,background:t=>C.tertiaryFixedDim,secondBackground:t=>C.tertiaryFixed,contrastCurve:new V(3,4.5,7,11)});/**
|
|
227
|
-
* @license
|
|
228
|
-
* Copyright 2021 Google LLC
|
|
229
|
-
*
|
|
230
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
231
|
-
* you may not use this file except in compliance with the License.
|
|
232
|
-
* You may obtain a copy of the License at
|
|
233
|
-
*
|
|
234
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
235
|
-
*
|
|
236
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
237
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
238
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
239
|
-
* See the License for the specific language governing permissions and
|
|
240
|
-
* limitations under the License.
|
|
241
|
-
*/class le{static of(e){return new le(e,!1)}static contentOf(e){return new le(e,!0)}static fromColors(e){return le.createPaletteFromColors(!1,e)}static contentFromColors(e){return le.createPaletteFromColors(!0,e)}static createPaletteFromColors(e,n){const a=new le(n.primary,e);if(n.secondary){const o=new le(n.secondary,e);a.a2=o.a1}if(n.tertiary){const o=new le(n.tertiary,e);a.a3=o.a1}if(n.error){const o=new le(n.error,e);a.error=o.a1}if(n.neutral){const o=new le(n.neutral,e);a.n1=o.n1}if(n.neutralVariant){const o=new le(n.neutralVariant,e);a.n2=o.n2}return a}constructor(e,n){const a=q.fromInt(e),o=a.hue,s=a.chroma;n?(this.a1=Z.fromHueAndChroma(o,s),this.a2=Z.fromHueAndChroma(o,s/3),this.a3=Z.fromHueAndChroma(o+60,s/2),this.n1=Z.fromHueAndChroma(o,Math.min(s/12,4)),this.n2=Z.fromHueAndChroma(o,Math.min(s/6,8))):(this.a1=Z.fromHueAndChroma(o,Math.max(48,s)),this.a2=Z.fromHueAndChroma(o,16),this.a3=Z.fromHueAndChroma(o+60,24),this.n1=Z.fromHueAndChroma(o,4),this.n2=Z.fromHueAndChroma(o,8)),this.error=Z.fromHueAndChroma(25,84)}}/**
|
|
242
|
-
* @license
|
|
243
|
-
* Copyright 2021 Google LLC
|
|
244
|
-
*
|
|
245
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
246
|
-
* you may not use this file except in compliance with the License.
|
|
247
|
-
* You may obtain a copy of the License at
|
|
248
|
-
*
|
|
249
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
250
|
-
*
|
|
251
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
252
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
253
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
254
|
-
* See the License for the specific language governing permissions and
|
|
255
|
-
* limitations under the License.
|
|
256
|
-
*/function Lt(t){const e=xt(t),n=_t(t),a=Et(t),o=[e.toString(16),n.toString(16),a.toString(16)];for(const[s,i]of o.entries())i.length===1&&(o[s]="0"+i);return"#"+o.join("")}function tt(t){t=t.replace("#","");const e=t.length===3,n=t.length===6,a=t.length===8;if(!e&&!n&&!a)throw new Error("unexpected hex "+t);let o=0,s=0,i=0;return e?(o=he(t.slice(0,1).repeat(2)),s=he(t.slice(1,2).repeat(2)),i=he(t.slice(2,3).repeat(2))):n?(o=he(t.slice(0,2)),s=he(t.slice(2,4)),i=he(t.slice(4,6))):a&&(o=he(t.slice(2,4)),s=he(t.slice(4,6)),i=he(t.slice(6,8))),(255<<24|(o&255)<<16|(s&255)<<8|i&255)>>>0}function he(t){return parseInt(t,16)}/**
|
|
257
|
-
* @license
|
|
258
|
-
* Copyright 2021 Google LLC
|
|
259
|
-
*
|
|
260
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
261
|
-
* you may not use this file except in compliance with the License.
|
|
262
|
-
* You may obtain a copy of the License at
|
|
263
|
-
*
|
|
264
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
265
|
-
*
|
|
266
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
267
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
268
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
269
|
-
* See the License for the specific language governing permissions and
|
|
270
|
-
* limitations under the License.
|
|
271
|
-
*/function on(t,e){let n=e.value;const a=n,o=t;n=dt.harmonize(a,o);const i=le.of(n).a1;return{color:e,value:n,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)}}}function re(t){return t<0?-1:t===0?0:1}function $e(t,e,n){return(1-n)*t+n*e}function sn(t,e,n){return n<t?t:n>e?e:n}function Ge(t,e,n){return n<t?t:n>e?e:n}function Mt(t){return t=t%360,t<0&&(t=t+360),t}function ht(t){return t=t%360,t<0&&(t=t+360),t}function cn(t,e){return ht(e-t)<=180?1:-1}function Vt(t,e){return 180-Math.abs(Math.abs(t-e)-180)}function st(t,e){const n=t[0]*e[0][0]+t[1]*e[0][1]+t[2]*e[0][2],a=t[0]*e[1][0]+t[1]*e[1][1]+t[2]*e[1][2],o=t[0]*e[2][0]+t[1]*e[2][1]+t[2]*e[2][2];return[n,a,o]}const St=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],ln=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],ft=[95.047,100,108.883];function Ye(t,e,n){return(255<<24|(t&255)<<16|(e&255)<<8|n&255)>>>0}function Bt(t){const e=De(t[0]),n=De(t[1]),a=De(t[2]);return Ye(e,n,a)}function un(t){return t>>24&255}function Je(t){return t>>16&255}function Ke(t){return t>>8&255}function Xe(t){return t&255}function $t(t,e,n){const a=ln,o=a[0][0]*t+a[0][1]*e+a[0][2]*n,s=a[1][0]*t+a[1][1]*e+a[1][2]*n,i=a[2][0]*t+a[2][1]*e+a[2][2]*n,c=De(o),l=De(s),d=De(i);return Ye(c,l,d)}function dn(t){const e=ge(Je(t)),n=ge(Ke(t)),a=ge(Xe(t));return st([e,n,a],St)}function mn(t,e,n){const a=ft,o=(t+16)/116,s=e/500+o,i=o-n/200,c=Ue(s),l=Ue(o),d=Ue(i),u=c*a[0],h=l*a[1],w=d*a[2];return $t(u,h,w)}function hn(t){const e=ge(Je(t)),n=ge(Ke(t)),a=ge(Xe(t)),o=St,s=o[0][0]*e+o[0][1]*n+o[0][2]*a,i=o[1][0]*e+o[1][1]*n+o[1][2]*a,c=o[2][0]*e+o[2][1]*n+o[2][2]*a,l=ft,d=s/l[0],u=i/l[1],h=c/l[2],w=Ae(d),k=Ae(u),g=Ae(h),p=116*k-16,b=500*(w-k),m=200*(k-g);return[p,b,m]}function fn(t){const e=ve(t),n=De(e);return Ye(n,n,n)}function it(t){const e=dn(t)[1];return 116*Ae(e/100)-16}function ve(t){return 100*Ue((t+16)/116)}function ct(t){return Ae(t/100)*116-16}function ge(t){const e=t/255;return e<=.040449936?e/12.92*100:Math.pow((e+.055)/1.055,2.4)*100}function De(t){const e=t/100;let n=0;return e<=.0031308?n=e*12.92:n=1.055*Math.pow(e,1/2.4)-.055,sn(0,255,Math.round(n*255))}function pn(){return ft}function Ae(t){const e=.008856451679035631,n=24389/27;return t>e?Math.pow(t,1/3):(n*t+16)/116}function Ue(t){const e=.008856451679035631,n=24389/27,a=t*t*t;return a>e?a:(116*t-16)/n}class me{static make(e=pn(),n=200/Math.PI*ve(50)/100,a=50,o=2,s=!1){const i=e,c=i[0]*.401288+i[1]*.650173+i[2]*-.051461,l=i[0]*-.250268+i[1]*1.204414+i[2]*.045854,d=i[0]*-.002079+i[1]*.048952+i[2]*.953127,u=.8+o/10,h=u>=.9?$e(.59,.69,(u-.9)*10):$e(.525,.59,(u-.8)*10);let w=s?1:u*(1-1/3.6*Math.exp((-n-42)/92));w=w>1?1:w<0?0:w;const k=u,g=[w*(100/c)+1-w,w*(100/l)+1-w,w*(100/d)+1-w],p=1/(5*n+1),b=p*p*p*p,m=1-b,v=b*n+.1*m*m*Math.cbrt(5*n),P=ve(a)/e[1],f=1.48+Math.sqrt(P),x=.725/Math.pow(P,.2),L=x,M=[Math.pow(v*g[0]*c/100,.42),Math.pow(v*g[1]*l/100,.42),Math.pow(v*g[2]*d/100,.42)],B=[400*M[0]/(M[0]+27.13),400*M[1]/(M[1]+27.13),400*M[2]/(M[2]+27.13)],T=(2*B[0]+B[1]+.05*B[2])*x;return new me(P,T,x,L,h,k,g,v,Math.pow(v,.25),f)}constructor(e,n,a,o,s,i,c,l,d,u){this.n=e,this.aw=n,this.nbb=a,this.ncb=o,this.c=s,this.nc=i,this.rgbD=c,this.fl=l,this.fLRoot=d,this.z=u}}me.DEFAULT=me.make();class K{constructor(e,n,a,o,s,i,c,l,d){this.hue=e,this.chroma=n,this.j=a,this.q=o,this.m=s,this.s=i,this.jstar=c,this.astar=l,this.bstar=d}distance(e){const n=this.jstar-e.jstar,a=this.astar-e.astar,o=this.bstar-e.bstar,s=Math.sqrt(n*n+a*a+o*o);return 1.41*Math.pow(s,.63)}static fromInt(e){return K.fromIntInViewingConditions(e,me.DEFAULT)}static fromIntInViewingConditions(e,n){const a=(e&16711680)>>16,o=(e&65280)>>8,s=e&255,i=ge(a),c=ge(o),l=ge(s),d=.41233895*i+.35762064*c+.18051042*l,u=.2126*i+.7152*c+.0722*l,h=.01932141*i+.11916382*c+.95034478*l,w=.401288*d+.650173*u-.051461*h,k=-.250268*d+1.204414*u+.045854*h,g=-.002079*d+.048952*u+.953127*h,p=n.rgbD[0]*w,b=n.rgbD[1]*k,m=n.rgbD[2]*g,v=Math.pow(n.fl*Math.abs(p)/100,.42),P=Math.pow(n.fl*Math.abs(b)/100,.42),f=Math.pow(n.fl*Math.abs(m)/100,.42),x=re(p)*400*v/(v+27.13),L=re(b)*400*P/(P+27.13),M=re(m)*400*f/(f+27.13),B=(11*x+-12*L+M)/11,T=(x+L-2*M)/9,$=(20*x+20*L+21*M)/20,N=(40*x+20*L+M)/20,A=Math.atan2(T,B)*180/Math.PI,H=A<0?A+360:A>=360?A-360:A,R=H*Math.PI/180,ie=N*n.nbb,se=100*Math.pow(ie/n.aw,n.c*n.z),ce=4/n.c*Math.sqrt(se/100)*(n.aw+4)*n.fLRoot,ke=H<20.14?H+360:H,be=.25*(Math.cos(ke*Math.PI/180+2)+3.8),Me=5e4/13*be*n.nc*n.ncb*Math.sqrt(B*B+T*T)/($+.305),Ce=Math.pow(Me,.9)*Math.pow(1.64-Math.pow(.29,n.n),.73),xe=Ce*Math.sqrt(se/100),Be=xe*n.fLRoot,Re=50*Math.sqrt(Ce*n.c/(n.aw+4)),ze=(1+100*.007)*se/(1+.007*se),je=1/.0228*Math.log(1+.0228*Be),et=je*Math.cos(R),He=je*Math.sin(R);return new K(H,xe,se,ce,Be,Re,ze,et,He)}static fromJch(e,n,a){return K.fromJchInViewingConditions(e,n,a,me.DEFAULT)}static fromJchInViewingConditions(e,n,a,o){const s=4/o.c*Math.sqrt(e/100)*(o.aw+4)*o.fLRoot,i=n*o.fLRoot,c=n/Math.sqrt(e/100),l=50*Math.sqrt(c*o.c/(o.aw+4)),d=a*Math.PI/180,u=(1+100*.007)*e/(1+.007*e),h=1/.0228*Math.log(1+.0228*i),w=h*Math.cos(d),k=h*Math.sin(d);return new K(a,n,e,s,i,l,u,w,k)}static fromUcs(e,n,a){return K.fromUcsInViewingConditions(e,n,a,me.DEFAULT)}static fromUcsInViewingConditions(e,n,a,o){const s=n,i=a,c=Math.sqrt(s*s+i*i),l=(Math.exp(c*.0228)-1)/.0228/o.fLRoot;let d=Math.atan2(i,s)*(180/Math.PI);d<0&&(d+=360);const u=e/(1-(e-100)*.007);return K.fromJchInViewingConditions(u,l,d,o)}toInt(){return this.viewed(me.DEFAULT)}viewed(e){const n=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),a=Math.pow(n/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,s=.25*(Math.cos(o+2)+3.8),i=e.aw*Math.pow(this.j/100,1/e.c/e.z),c=s*(5e4/13)*e.nc*e.ncb,l=i/e.nbb,d=Math.sin(o),u=Math.cos(o),h=23*(l+.305)*a/(23*c+11*a*u+108*a*d),w=h*u,k=h*d,g=(460*l+451*w+288*k)/1403,p=(460*l-891*w-261*k)/1403,b=(460*l-220*w-6300*k)/1403,m=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),v=re(g)*(100/e.fl)*Math.pow(m,1/.42),P=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),f=re(p)*(100/e.fl)*Math.pow(P,1/.42),x=Math.max(0,27.13*Math.abs(b)/(400-Math.abs(b))),L=re(b)*(100/e.fl)*Math.pow(x,1/.42),M=v/e.rgbD[0],B=f/e.rgbD[1],T=L/e.rgbD[2],$=1.86206786*M-1.01125463*B+.14918677*T,N=.38752654*M+.62144744*B-.00897398*T,A=-.0158415*M-.03412294*B+1.04996444*T;return $t($,N,A)}static fromXyzInViewingConditions(e,n,a,o){const s=.401288*e+.650173*n-.051461*a,i=-.250268*e+1.204414*n+.045854*a,c=-.002079*e+.048952*n+.953127*a,l=o.rgbD[0]*s,d=o.rgbD[1]*i,u=o.rgbD[2]*c,h=Math.pow(o.fl*Math.abs(l)/100,.42),w=Math.pow(o.fl*Math.abs(d)/100,.42),k=Math.pow(o.fl*Math.abs(u)/100,.42),g=re(l)*400*h/(h+27.13),p=re(d)*400*w/(w+27.13),b=re(u)*400*k/(k+27.13),m=(11*g+-12*p+b)/11,v=(g+p-2*b)/9,P=(20*g+20*p+21*b)/20,f=(40*g+20*p+b)/20,x=Math.atan2(v,m)*180/Math.PI,L=x<0?x+360:x>=360?x-360:x,M=L*Math.PI/180,B=f*o.nbb,T=100*Math.pow(B/o.aw,o.c*o.z),$=4/o.c*Math.sqrt(T/100)*(o.aw+4)*o.fLRoot,N=L<20.14?L+360:L,A=1/4*(Math.cos(N*Math.PI/180+2)+3.8),H=5e4/13*A*o.nc*o.ncb*Math.sqrt(m*m+v*v)/(P+.305),R=Math.pow(H,.9)*Math.pow(1.64-Math.pow(.29,o.n),.73),ie=R*Math.sqrt(T/100),se=ie*o.fLRoot,ce=50*Math.sqrt(R*o.c/(o.aw+4)),ke=(1+100*.007)*T/(1+.007*T),be=Math.log(1+.0228*se)/.0228,Me=be*Math.cos(M),Ce=be*Math.sin(M);return new K(L,ie,T,$,se,ce,ke,Me,Ce)}xyzInViewingConditions(e){const n=this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100),a=Math.pow(n/Math.pow(1.64-Math.pow(.29,e.n),.73),1/.9),o=this.hue*Math.PI/180,s=.25*(Math.cos(o+2)+3.8),i=e.aw*Math.pow(this.j/100,1/e.c/e.z),c=s*(5e4/13)*e.nc*e.ncb,l=i/e.nbb,d=Math.sin(o),u=Math.cos(o),h=23*(l+.305)*a/(23*c+11*a*u+108*a*d),w=h*u,k=h*d,g=(460*l+451*w+288*k)/1403,p=(460*l-891*w-261*k)/1403,b=(460*l-220*w-6300*k)/1403,m=Math.max(0,27.13*Math.abs(g)/(400-Math.abs(g))),v=re(g)*(100/e.fl)*Math.pow(m,1/.42),P=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),f=re(p)*(100/e.fl)*Math.pow(P,1/.42),x=Math.max(0,27.13*Math.abs(b)/(400-Math.abs(b))),L=re(b)*(100/e.fl)*Math.pow(x,1/.42),M=v/e.rgbD[0],B=f/e.rgbD[1],T=L/e.rgbD[2],$=1.86206786*M-1.01125463*B+.14918677*T,N=.38752654*M+.62144744*B-.00897398*T,A=-.0158415*M-.03412294*B+1.04996444*T;return[$,N,A]}}class E{static sanitizeRadians(e){return(e+Math.PI*8)%(Math.PI*2)}static trueDelinearized(e){const n=e/100;let a=0;return n<=.0031308?a=n*12.92:a=1.055*Math.pow(n,1/2.4)-.055,a*255}static chromaticAdaptation(e){const n=Math.pow(Math.abs(e),.42);return re(e)*400*n/(n+27.13)}static hueOf(e){const n=st(e,E.SCALED_DISCOUNT_FROM_LINRGB),a=E.chromaticAdaptation(n[0]),o=E.chromaticAdaptation(n[1]),s=E.chromaticAdaptation(n[2]),i=(11*a+-12*o+s)/11,c=(a+o-2*s)/9;return Math.atan2(c,i)}static areInCyclicOrder(e,n,a){const o=E.sanitizeRadians(n-e),s=E.sanitizeRadians(a-e);return o<s}static intercept(e,n,a){return(n-e)/(a-e)}static lerpPoint(e,n,a){return[e[0]+(a[0]-e[0])*n,e[1]+(a[1]-e[1])*n,e[2]+(a[2]-e[2])*n]}static setCoordinate(e,n,a,o){const s=E.intercept(e[o],n,a[o]);return E.lerpPoint(e,s,a)}static isBounded(e){return 0<=e&&e<=100}static nthVertex(e,n){const a=E.Y_FROM_LINRGB[0],o=E.Y_FROM_LINRGB[1],s=E.Y_FROM_LINRGB[2],i=n%4<=1?0:100,c=n%2===0?0:100;if(n<4){const l=i,d=c,u=(e-l*o-d*s)/a;return E.isBounded(u)?[u,l,d]:[-1,-1,-1]}else if(n<8){const l=i,d=c,u=(e-d*a-l*s)/o;return E.isBounded(u)?[d,u,l]:[-1,-1,-1]}else{const l=i,d=c,u=(e-l*a-d*o)/s;return E.isBounded(u)?[l,d,u]:[-1,-1,-1]}}static bisectToSegment(e,n){let a=[-1,-1,-1],o=a,s=0,i=0,c=!1,l=!0;for(let d=0;d<12;d++){const u=E.nthVertex(e,d);if(u[0]<0)continue;const h=E.hueOf(u);if(!c){a=u,o=u,s=h,i=h,c=!0;continue}(l||E.areInCyclicOrder(s,h,i))&&(l=!1,E.areInCyclicOrder(s,n,h)?(o=u,i=h):(a=u,s=h))}return[a,o]}static midpoint(e,n){return[(e[0]+n[0])/2,(e[1]+n[1])/2,(e[2]+n[2])/2]}static criticalPlaneBelow(e){return Math.floor(e-.5)}static criticalPlaneAbove(e){return Math.ceil(e-.5)}static bisectToLimit(e,n){const a=E.bisectToSegment(e,n);let o=a[0],s=E.hueOf(o),i=a[1];for(let c=0;c<3;c++)if(o[c]!==i[c]){let l=-1,d=255;o[c]<i[c]?(l=E.criticalPlaneBelow(E.trueDelinearized(o[c])),d=E.criticalPlaneAbove(E.trueDelinearized(i[c]))):(l=E.criticalPlaneAbove(E.trueDelinearized(o[c])),d=E.criticalPlaneBelow(E.trueDelinearized(i[c])));for(let u=0;u<8&&!(Math.abs(d-l)<=1);u++){const h=Math.floor((l+d)/2),w=E.CRITICAL_PLANES[h],k=E.setCoordinate(o,w,i,c),g=E.hueOf(k);E.areInCyclicOrder(s,n,g)?(i=k,d=h):(o=k,s=g,l=h)}}return E.midpoint(o,i)}static inverseChromaticAdaptation(e){const n=Math.abs(e),a=Math.max(0,27.13*n/(400-n));return re(e)*Math.pow(a,1/.42)}static findResultByJ(e,n,a){let o=Math.sqrt(a)*11;const s=me.DEFAULT,i=1/Math.pow(1.64-Math.pow(.29,s.n),.73),c=.25*(Math.cos(e+2)+3.8)*(5e4/13)*s.nc*s.ncb,l=Math.sin(e),d=Math.cos(e);for(let u=0;u<5;u++){const h=o/100,w=n===0||o===0?0:n/Math.sqrt(h),k=Math.pow(w*i,1/.9),g=s.aw*Math.pow(h,1/s.c/s.z)/s.nbb,p=23*(g+.305)*k/(23*c+11*k*d+108*k*l),b=p*d,m=p*l,v=(460*g+451*b+288*m)/1403,P=(460*g-891*b-261*m)/1403,f=(460*g-220*b-6300*m)/1403,x=E.inverseChromaticAdaptation(v),L=E.inverseChromaticAdaptation(P),M=E.inverseChromaticAdaptation(f),B=st([x,L,M],E.LINRGB_FROM_SCALED_DISCOUNT);if(B[0]<0||B[1]<0||B[2]<0)return 0;const T=E.Y_FROM_LINRGB[0],$=E.Y_FROM_LINRGB[1],N=E.Y_FROM_LINRGB[2],A=T*B[0]+$*B[1]+N*B[2];if(A<=0)return 0;if(u===4||Math.abs(A-a)<.002)return B[0]>100.01||B[1]>100.01||B[2]>100.01?0:Bt(B);o=o-(A-a)*o/(2*A)}return 0}static solveToInt(e,n,a){if(n<1e-4||a<1e-4||a>99.9999)return fn(a);e=ht(e);const o=e/180*Math.PI,s=ve(a),i=E.findResultByJ(o,n,s);if(i!==0)return i;const c=E.bisectToLimit(s,o);return Bt(c)}static solveToCam(e,n,a){return K.fromInt(E.solveToInt(e,n,a))}}E.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]];E.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]];E.Y_FROM_LINRGB=[.2126,.7152,.0722];E.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];class U{static from(e,n,a){return new U(E.solveToInt(e,n,a))}static fromInt(e){return new U(e)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(E.solveToInt(e,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(E.solveToInt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(E.solveToInt(this.internalHue,this.internalChroma,e))}constructor(e){this.argb=e;const n=K.fromInt(e);this.internalHue=n.hue,this.internalChroma=n.chroma,this.internalTone=it(e),this.argb=e}setInternalState(e){const n=K.fromInt(e);this.internalHue=n.hue,this.internalChroma=n.chroma,this.internalTone=it(e),this.argb=e}inViewingConditions(e){const n=K.fromInt(this.toInt()).xyzInViewingConditions(e),a=K.fromXyzInViewingConditions(n[0],n[1],n[2],me.make());return U.from(a.hue,a.chroma,ct(n[1]))}}class pt{static harmonize(e,n){const a=U.fromInt(e),o=U.fromInt(n),s=Vt(a.hue,o.hue),i=Math.min(s*.5,15),c=ht(a.hue+i*cn(a.hue,o.hue));return U.from(c,a.chroma,a.tone).toInt()}static hctHue(e,n,a){const o=pt.cam16Ucs(e,n,a),s=K.fromInt(o),i=K.fromInt(e);return U.from(s.hue,i.chroma,it(e)).toInt()}static cam16Ucs(e,n,a){const o=K.fromInt(e),s=K.fromInt(n),i=o.jstar,c=o.astar,l=o.bstar,d=s.jstar,u=s.astar,h=s.bstar,w=i+(d-i)*a,k=c+(u-c)*a,g=l+(h-l)*a;return K.fromUcs(w,k,g).toInt()}}class Y{static ratioOfTones(e,n){return e=Ge(0,100,e),n=Ge(0,100,n),Y.ratioOfYs(ve(e),ve(n))}static ratioOfYs(e,n){const a=e>n?e:n,o=a===n?e:n;return(a+5)/(o+5)}static lighter(e,n){if(e<0||e>100)return-1;const a=ve(e),o=n*(a+5)-5,s=Y.ratioOfYs(o,a),i=Math.abs(s-n);if(s<n&&i>.04)return-1;const c=ct(o)+.4;return c<0||c>100?-1:c}static darker(e,n){if(e<0||e>100)return-1;const a=ve(e),o=(a+5)/n-5,s=Y.ratioOfYs(a,o),i=Math.abs(s-n);if(s<n&&i>.04)return-1;const c=ct(o)-.4;return c<0||c>100?-1:c}static lighterUnsafe(e,n){const a=Y.lighter(e,n);return a<0?100:a}static darkerUnsafe(e,n){const a=Y.darker(e,n);return a<0?0:a}}class gt{static isDisliked(e){const n=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,a=Math.round(e.chroma)>16,o=Math.round(e.tone)<65;return n&&a&&o}static fixIfDisliked(e){return gt.isDisliked(e)?U.from(e.hue,e.chroma,70):e}}class D{static fromPalette(e){return new D(e.name??"",e.palette,e.tone,e.isBackground??!1,e.background,e.secondBackground,e.contrastCurve,e.toneDeltaPair)}constructor(e,n,a,o,s,i,c,l){if(this.name=e,this.palette=n,this.tone=a,this.isBackground=o,this.background=s,this.secondBackground=i,this.contrastCurve=c,this.toneDeltaPair=l,this.hctCache=new Map,!s&&i)throw new Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!s&&c)throw new Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(s&&!c)throw new Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(e){return this.getHct(e).toInt()}getHct(e){const n=this.hctCache.get(e);if(n!=null)return n;const a=this.getTone(e),o=this.palette(e).getHct(a);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,o),o}getTone(e){const n=e.contrastLevel<0;if(this.toneDeltaPair){const a=this.toneDeltaPair(e),o=a.roleA,s=a.roleB,i=a.delta,c=a.polarity,l=a.stayTogether,d=this.background(e).getTone(e),u=c==="nearer"||c==="lighter"&&!e.isDark||c==="darker"&&e.isDark,h=u?o:s,w=u?s:o,k=this.name===h.name,g=e.isDark?1:-1,p=h.contrastCurve.get(e.contrastLevel),b=w.contrastCurve.get(e.contrastLevel),m=h.tone(e);let v=Y.ratioOfTones(d,m)>=p?m:D.foregroundTone(d,p);const P=w.tone(e);let f=Y.ratioOfTones(d,P)>=b?P:D.foregroundTone(d,b);return n&&(v=D.foregroundTone(d,p),f=D.foregroundTone(d,b)),(f-v)*g>=i||(f=Ge(0,100,v+i*g),(f-v)*g>=i||(v=Ge(0,100,f-i*g))),50<=v&&v<60?g>0?(v=60,f=Math.max(f,v+i*g)):(v=49,f=Math.min(f,v+i*g)):50<=f&&f<60&&(l?g>0?(v=60,f=Math.max(f,v+i*g)):(v=49,f=Math.min(f,v+i*g)):g>0?f=60:f=49),k?v:f}else{let a=this.tone(e);if(this.background==null)return a;const o=this.background(e).getTone(e),s=this.contrastCurve.get(e.contrastLevel);if(Y.ratioOfTones(o,a)>=s||(a=D.foregroundTone(o,s)),n&&(a=D.foregroundTone(o,s)),this.isBackground&&50<=a&&a<60&&(Y.ratioOfTones(49,o)>=s?a=49:a=60),this.secondBackground){const[i,c]=[this.background,this.secondBackground],[l,d]=[i(e).getTone(e),c(e).getTone(e)],[u,h]=[Math.max(l,d),Math.min(l,d)];if(Y.ratioOfTones(u,a)>=s&&Y.ratioOfTones(h,a)>=s)return a;const w=Y.lighter(u,s),k=Y.darker(h,s),g=[];return w!==-1&&g.push(w),k!==-1&&g.push(k),D.tonePrefersLightForeground(l)||D.tonePrefersLightForeground(d)?w<0?100:w:g.length===1?g[0]:k<0?0:k}return a}}static foregroundTone(e,n){const a=Y.lighterUnsafe(e,n),o=Y.darkerUnsafe(e,n),s=Y.ratioOfTones(a,e),i=Y.ratioOfTones(o,e);if(D.tonePrefersLightForeground(e)){const c=Math.abs(s-i)<.1&&s<n&&i<n;return s>=n||s>=i||c?a:o}else return i>=n||i>=s?o:a}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(e){return D.tonePrefersLightForeground(e)&&!D.toneAllowsLightForeground(e)?49:e}}class ee{static fromInt(e){const n=U.fromInt(e);return ee.fromHct(n)}static fromHct(e){return new ee(e.hue,e.chroma,e)}static fromHueAndChroma(e,n){const a=new gn(e,n).create();return new ee(e,n,a)}constructor(e,n,a){this.hue=e,this.chroma=n,this.keyColor=a,this.cache=new Map}tone(e){let n=this.cache.get(e);return n===void 0&&(n=U.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,n)),n}getHct(e){return U.fromInt(this.tone(e))}}class gn{constructor(e,n){this.hue=e,this.requestedChroma=n,this.chromaCache=new Map,this.maxChromaValue=200}create(){let e=0,n=100;for(;e<n;){const a=Math.floor((e+n)/2),o=this.maxChroma(a)<this.maxChroma(a+1);if(this.maxChroma(a)>=this.requestedChroma-.01)if(Math.abs(e-50)<Math.abs(n-50))n=a;else{if(e===a)return U.from(this.hue,this.requestedChroma,e);e=a}else o?e=a+1:n=a}return U.from(this.hue,this.requestedChroma,e)}maxChroma(e){if(this.chromaCache.has(e))return this.chromaCache.get(e);const n=U.from(this.hue,this.maxChromaValue,e).chroma;return this.chromaCache.set(e,n),n}}class S{constructor(e,n,a,o){this.low=e,this.normal=n,this.medium=a,this.high=o}get(e){return e<=-1?this.low:e<0?$e(this.low,this.normal,(e- -1)/1):e<.5?$e(this.normal,this.medium,(e-0)/.5):e<1?$e(this.medium,this.high,(e-.5)/.5):this.high}}class oe{constructor(e,n,a,o,s){this.roleA=e,this.roleB=n,this.delta=a,this.polarity=o,this.stayTogether=s}}var Fe;(function(t){t[t.MONOCHROME=0]="MONOCHROME",t[t.NEUTRAL=1]="NEUTRAL",t[t.TONAL_SPOT=2]="TONAL_SPOT",t[t.VIBRANT=3]="VIBRANT",t[t.EXPRESSIVE=4]="EXPRESSIVE",t[t.FIDELITY=5]="FIDELITY",t[t.CONTENT=6]="CONTENT",t[t.RAINBOW=7]="RAINBOW",t[t.FRUIT_SALAD=8]="FRUIT_SALAD"})(Fe||(Fe={}));function Le(t){return t.variant===Fe.FIDELITY||t.variant===Fe.CONTENT}function j(t){return t.variant===Fe.MONOCHROME}function kn(t,e,n,a){let o=n,s=U.from(t,e,n);if(s.chroma<e){let i=s.chroma;for(;s.chroma<e;){o+=a?-1:1;const c=U.from(t,e,o);if(i>c.chroma||Math.abs(c.chroma-e)<.4)break;const l=Math.abs(c.chroma-e),d=Math.abs(s.chroma-e);l<d&&(s=c),i=Math.max(i,c.chroma)}}return o}class y{static highestSurface(e){return e.isDark?y.surfaceBright:y.surfaceDim}}y.contentAccentToneDelta=15;y.primaryPaletteKeyColor=D.fromPalette({name:"primary_palette_key_color",palette:t=>t.primaryPalette,tone:t=>t.primaryPalette.keyColor.tone});y.secondaryPaletteKeyColor=D.fromPalette({name:"secondary_palette_key_color",palette:t=>t.secondaryPalette,tone:t=>t.secondaryPalette.keyColor.tone});y.tertiaryPaletteKeyColor=D.fromPalette({name:"tertiary_palette_key_color",palette:t=>t.tertiaryPalette,tone:t=>t.tertiaryPalette.keyColor.tone});y.neutralPaletteKeyColor=D.fromPalette({name:"neutral_palette_key_color",palette:t=>t.neutralPalette,tone:t=>t.neutralPalette.keyColor.tone});y.neutralVariantPaletteKeyColor=D.fromPalette({name:"neutral_variant_palette_key_color",palette:t=>t.neutralVariantPalette,tone:t=>t.neutralVariantPalette.keyColor.tone});y.background=D.fromPalette({name:"background",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:!0});y.onBackground=D.fromPalette({name:"on_background",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>y.background,contrastCurve:new S(3,3,4.5,7)});y.surface=D.fromPalette({name:"surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:98,isBackground:!0});y.surfaceDim=D.fromPalette({name:"surface_dim",palette:t=>t.neutralPalette,tone:t=>t.isDark?6:new S(87,87,80,75).get(t.contrastLevel),isBackground:!0});y.surfaceBright=D.fromPalette({name:"surface_bright",palette:t=>t.neutralPalette,tone:t=>t.isDark?new S(24,24,29,34).get(t.contrastLevel):98,isBackground:!0});y.surfaceContainerLowest=D.fromPalette({name:"surface_container_lowest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new S(4,4,2,0).get(t.contrastLevel):100,isBackground:!0});y.surfaceContainerLow=D.fromPalette({name:"surface_container_low",palette:t=>t.neutralPalette,tone:t=>t.isDark?new S(10,10,11,12).get(t.contrastLevel):new S(96,96,96,95).get(t.contrastLevel),isBackground:!0});y.surfaceContainer=D.fromPalette({name:"surface_container",palette:t=>t.neutralPalette,tone:t=>t.isDark?new S(12,12,16,20).get(t.contrastLevel):new S(94,94,92,90).get(t.contrastLevel),isBackground:!0});y.surfaceContainerHigh=D.fromPalette({name:"surface_container_high",palette:t=>t.neutralPalette,tone:t=>t.isDark?new S(17,17,21,25).get(t.contrastLevel):new S(92,92,88,85).get(t.contrastLevel),isBackground:!0});y.surfaceContainerHighest=D.fromPalette({name:"surface_container_highest",palette:t=>t.neutralPalette,tone:t=>t.isDark?new S(22,22,26,30).get(t.contrastLevel):new S(90,90,84,80).get(t.contrastLevel),isBackground:!0});y.onSurface=D.fromPalette({name:"on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:10,background:t=>y.highestSurface(t),contrastCurve:new S(4.5,7,11,21)});y.surfaceVariant=D.fromPalette({name:"surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:90,isBackground:!0});y.onSurfaceVariant=D.fromPalette({name:"on_surface_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?80:30,background:t=>y.highestSurface(t),contrastCurve:new S(3,4.5,7,11)});y.inverseSurface=D.fromPalette({name:"inverse_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?90:20});y.inverseOnSurface=D.fromPalette({name:"inverse_on_surface",palette:t=>t.neutralPalette,tone:t=>t.isDark?20:95,background:t=>y.inverseSurface,contrastCurve:new S(4.5,7,11,21)});y.outline=D.fromPalette({name:"outline",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?60:50,background:t=>y.highestSurface(t),contrastCurve:new S(1.5,3,4.5,7)});y.outlineVariant=D.fromPalette({name:"outline_variant",palette:t=>t.neutralVariantPalette,tone:t=>t.isDark?30:80,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5)});y.shadow=D.fromPalette({name:"shadow",palette:t=>t.neutralPalette,tone:t=>0});y.scrim=D.fromPalette({name:"scrim",palette:t=>t.neutralPalette,tone:t=>0});y.surfaceTint=D.fromPalette({name:"surface_tint",palette:t=>t.primaryPalette,tone:t=>t.isDark?80:40,isBackground:!0});y.primary=D.fromPalette({name:"primary",palette:t=>t.primaryPalette,tone:t=>j(t)?t.isDark?100:0:t.isDark?80:40,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(3,4.5,7,7),toneDeltaPair:t=>new oe(y.primaryContainer,y.primary,10,"nearer",!1)});y.onPrimary=D.fromPalette({name:"on_primary",palette:t=>t.primaryPalette,tone:t=>j(t)?t.isDark?10:90:t.isDark?20:100,background:t=>y.primary,contrastCurve:new S(4.5,7,11,21)});y.primaryContainer=D.fromPalette({name:"primary_container",palette:t=>t.primaryPalette,tone:t=>Le(t)?t.sourceColorHct.tone:j(t)?t.isDark?85:25:t.isDark?30:90,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5),toneDeltaPair:t=>new oe(y.primaryContainer,y.primary,10,"nearer",!1)});y.onPrimaryContainer=D.fromPalette({name:"on_primary_container",palette:t=>t.primaryPalette,tone:t=>Le(t)?D.foregroundTone(y.primaryContainer.tone(t),4.5):j(t)?t.isDark?0:100:t.isDark?90:30,background:t=>y.primaryContainer,contrastCurve:new S(3,4.5,7,11)});y.inversePrimary=D.fromPalette({name:"inverse_primary",palette:t=>t.primaryPalette,tone:t=>t.isDark?40:80,background:t=>y.inverseSurface,contrastCurve:new S(3,4.5,7,7)});y.secondary=D.fromPalette({name:"secondary",palette:t=>t.secondaryPalette,tone:t=>t.isDark?80:40,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(3,4.5,7,7),toneDeltaPair:t=>new oe(y.secondaryContainer,y.secondary,10,"nearer",!1)});y.onSecondary=D.fromPalette({name:"on_secondary",palette:t=>t.secondaryPalette,tone:t=>j(t)?t.isDark?10:100:t.isDark?20:100,background:t=>y.secondary,contrastCurve:new S(4.5,7,11,21)});y.secondaryContainer=D.fromPalette({name:"secondary_container",palette:t=>t.secondaryPalette,tone:t=>{const e=t.isDark?30:90;return j(t)?t.isDark?30:85:Le(t)?kn(t.secondaryPalette.hue,t.secondaryPalette.chroma,e,!t.isDark):e},isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5),toneDeltaPair:t=>new oe(y.secondaryContainer,y.secondary,10,"nearer",!1)});y.onSecondaryContainer=D.fromPalette({name:"on_secondary_container",palette:t=>t.secondaryPalette,tone:t=>j(t)?t.isDark?90:10:Le(t)?D.foregroundTone(y.secondaryContainer.tone(t),4.5):t.isDark?90:30,background:t=>y.secondaryContainer,contrastCurve:new S(3,4.5,7,11)});y.tertiary=D.fromPalette({name:"tertiary",palette:t=>t.tertiaryPalette,tone:t=>j(t)?t.isDark?90:25:t.isDark?80:40,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(3,4.5,7,7),toneDeltaPair:t=>new oe(y.tertiaryContainer,y.tertiary,10,"nearer",!1)});y.onTertiary=D.fromPalette({name:"on_tertiary",palette:t=>t.tertiaryPalette,tone:t=>j(t)?t.isDark?10:90:t.isDark?20:100,background:t=>y.tertiary,contrastCurve:new S(4.5,7,11,21)});y.tertiaryContainer=D.fromPalette({name:"tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>{if(j(t))return t.isDark?60:49;if(!Le(t))return t.isDark?30:90;const e=t.tertiaryPalette.getHct(t.sourceColorHct.tone);return gt.fixIfDisliked(e).tone},isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5),toneDeltaPair:t=>new oe(y.tertiaryContainer,y.tertiary,10,"nearer",!1)});y.onTertiaryContainer=D.fromPalette({name:"on_tertiary_container",palette:t=>t.tertiaryPalette,tone:t=>j(t)?t.isDark?0:100:Le(t)?D.foregroundTone(y.tertiaryContainer.tone(t),4.5):t.isDark?90:30,background:t=>y.tertiaryContainer,contrastCurve:new S(3,4.5,7,11)});y.error=D.fromPalette({name:"error",palette:t=>t.errorPalette,tone:t=>t.isDark?80:40,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(3,4.5,7,7),toneDeltaPair:t=>new oe(y.errorContainer,y.error,10,"nearer",!1)});y.onError=D.fromPalette({name:"on_error",palette:t=>t.errorPalette,tone:t=>t.isDark?20:100,background:t=>y.error,contrastCurve:new S(4.5,7,11,21)});y.errorContainer=D.fromPalette({name:"error_container",palette:t=>t.errorPalette,tone:t=>t.isDark?30:90,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5),toneDeltaPair:t=>new oe(y.errorContainer,y.error,10,"nearer",!1)});y.onErrorContainer=D.fromPalette({name:"on_error_container",palette:t=>t.errorPalette,tone:t=>j(t)?t.isDark?90:10:t.isDark?90:30,background:t=>y.errorContainer,contrastCurve:new S(3,4.5,7,11)});y.primaryFixed=D.fromPalette({name:"primary_fixed",palette:t=>t.primaryPalette,tone:t=>j(t)?40:90,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5),toneDeltaPair:t=>new oe(y.primaryFixed,y.primaryFixedDim,10,"lighter",!0)});y.primaryFixedDim=D.fromPalette({name:"primary_fixed_dim",palette:t=>t.primaryPalette,tone:t=>j(t)?30:80,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5),toneDeltaPair:t=>new oe(y.primaryFixed,y.primaryFixedDim,10,"lighter",!0)});y.onPrimaryFixed=D.fromPalette({name:"on_primary_fixed",palette:t=>t.primaryPalette,tone:t=>j(t)?100:10,background:t=>y.primaryFixedDim,secondBackground:t=>y.primaryFixed,contrastCurve:new S(4.5,7,11,21)});y.onPrimaryFixedVariant=D.fromPalette({name:"on_primary_fixed_variant",palette:t=>t.primaryPalette,tone:t=>j(t)?90:30,background:t=>y.primaryFixedDim,secondBackground:t=>y.primaryFixed,contrastCurve:new S(3,4.5,7,11)});y.secondaryFixed=D.fromPalette({name:"secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>j(t)?80:90,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5),toneDeltaPair:t=>new oe(y.secondaryFixed,y.secondaryFixedDim,10,"lighter",!0)});y.secondaryFixedDim=D.fromPalette({name:"secondary_fixed_dim",palette:t=>t.secondaryPalette,tone:t=>j(t)?70:80,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5),toneDeltaPair:t=>new oe(y.secondaryFixed,y.secondaryFixedDim,10,"lighter",!0)});y.onSecondaryFixed=D.fromPalette({name:"on_secondary_fixed",palette:t=>t.secondaryPalette,tone:t=>10,background:t=>y.secondaryFixedDim,secondBackground:t=>y.secondaryFixed,contrastCurve:new S(4.5,7,11,21)});y.onSecondaryFixedVariant=D.fromPalette({name:"on_secondary_fixed_variant",palette:t=>t.secondaryPalette,tone:t=>j(t)?25:30,background:t=>y.secondaryFixedDim,secondBackground:t=>y.secondaryFixed,contrastCurve:new S(3,4.5,7,11)});y.tertiaryFixed=D.fromPalette({name:"tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>j(t)?40:90,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5),toneDeltaPair:t=>new oe(y.tertiaryFixed,y.tertiaryFixedDim,10,"lighter",!0)});y.tertiaryFixedDim=D.fromPalette({name:"tertiary_fixed_dim",palette:t=>t.tertiaryPalette,tone:t=>j(t)?30:80,isBackground:!0,background:t=>y.highestSurface(t),contrastCurve:new S(1,1,3,4.5),toneDeltaPair:t=>new oe(y.tertiaryFixed,y.tertiaryFixedDim,10,"lighter",!0)});y.onTertiaryFixed=D.fromPalette({name:"on_tertiary_fixed",palette:t=>t.tertiaryPalette,tone:t=>j(t)?100:10,background:t=>y.tertiaryFixedDim,secondBackground:t=>y.tertiaryFixed,contrastCurve:new S(4.5,7,11,21)});y.onTertiaryFixedVariant=D.fromPalette({name:"on_tertiary_fixed_variant",palette:t=>t.tertiaryPalette,tone:t=>j(t)?90:30,background:t=>y.tertiaryFixedDim,secondBackground:t=>y.tertiaryFixed,contrastCurve:new S(3,4.5,7,11)});class X{static of(e){return new X(e,!1)}static contentOf(e){return new X(e,!0)}static fromColors(e){return X.createPaletteFromColors(!1,e)}static contentFromColors(e){return X.createPaletteFromColors(!0,e)}static createPaletteFromColors(e,n){const a=new X(n.primary,e);if(n.secondary){const o=new X(n.secondary,e);a.a2=o.a1}if(n.tertiary){const o=new X(n.tertiary,e);a.a3=o.a1}if(n.error){const o=new X(n.error,e);a.error=o.a1}if(n.neutral){const o=new X(n.neutral,e);a.n1=o.n1}if(n.neutralVariant){const o=new X(n.neutralVariant,e);a.n2=o.n2}return a}constructor(e,n){const a=U.fromInt(e),o=a.hue,s=a.chroma;n?(this.a1=ee.fromHueAndChroma(o,s),this.a2=ee.fromHueAndChroma(o,s/3),this.a3=ee.fromHueAndChroma(o+60,s/2),this.n1=ee.fromHueAndChroma(o,Math.min(s/12,4)),this.n2=ee.fromHueAndChroma(o,Math.min(s/6,8))):(this.a1=ee.fromHueAndChroma(o,Math.max(48,s)),this.a2=ee.fromHueAndChroma(o,16),this.a3=ee.fromHueAndChroma(o+60,24),this.n1=ee.fromHueAndChroma(o,4),this.n2=ee.fromHueAndChroma(o,8)),this.error=ee.fromHueAndChroma(25,84)}}class bn{fromInt(e){return hn(e)}toInt(e){return mn(e[0],e[1],e[2])}distance(e,n){const a=e[0]-n[0],o=e[1]-n[1],s=e[2]-n[2];return a*a+o*o+s*s}}const Cn=10,yn=3;class vn{static quantize(e,n,a){const o=new Map,s=new Array,i=new Array,c=new bn;let l=0;for(let v=0;v<e.length;v++){const P=e[v],f=o.get(P);f===void 0?(l++,s.push(c.fromInt(P)),i.push(P),o.set(P,1)):o.set(P,f+1)}const d=new Array;for(let v=0;v<l;v++){const P=i[v],f=o.get(P);f!==void 0&&(d[v]=f)}let u=Math.min(a,l);n.length>0&&(u=Math.min(u,n.length));const h=new Array;for(let v=0;v<n.length;v++)h.push(c.fromInt(n[v]));const w=u-h.length;if(n.length===0&&w>0)for(let v=0;v<w;v++){const P=Math.random()*100,f=Math.random()*201+-100,x=Math.random()*201+-100;h.push(new Array(P,f,x))}const k=new Array;for(let v=0;v<l;v++)k.push(Math.floor(Math.random()*u));const g=new Array;for(let v=0;v<u;v++){g.push(new Array);for(let P=0;P<u;P++)g[v].push(0)}const p=new Array;for(let v=0;v<u;v++){p.push(new Array);for(let P=0;P<u;P++)p[v].push(new wn)}const b=new Array;for(let v=0;v<u;v++)b.push(0);for(let v=0;v<Cn;v++){for(let M=0;M<u;M++){for(let B=M+1;B<u;B++){const T=c.distance(h[M],h[B]);p[B][M].distance=T,p[B][M].index=M,p[M][B].distance=T,p[M][B].index=B}p[M].sort();for(let B=0;B<u;B++)g[M][B]=p[M][B].index}let P=0;for(let M=0;M<l;M++){const B=s[M],T=k[M],$=h[T],N=c.distance(B,$);let A=N,H=-1;for(let R=0;R<u;R++){if(p[T][R].distance>=4*N)continue;const ie=c.distance(B,h[R]);ie<A&&(A=ie,H=R)}H!==-1&&Math.abs(Math.sqrt(A)-Math.sqrt(N))>yn&&(P++,k[M]=H)}if(P===0&&v!==0)break;const f=new Array(u).fill(0),x=new Array(u).fill(0),L=new Array(u).fill(0);for(let M=0;M<u;M++)b[M]=0;for(let M=0;M<l;M++){const B=k[M],T=s[M],$=d[M];b[B]+=$,f[B]+=T[0]*$,x[B]+=T[1]*$,L[B]+=T[2]*$}for(let M=0;M<u;M++){const B=b[M];if(B===0){h[M]=[0,0,0];continue}const T=f[M]/B,$=x[M]/B,N=L[M]/B;h[M]=[T,$,N]}}const m=new Map;for(let v=0;v<u;v++){const P=b[v];if(P===0)continue;const f=c.toInt(h[v]);m.has(f)||m.set(f,P)}return m}}class wn{constructor(){this.distance=-1,this.index=-1}}class Pn{static quantize(e){const n=new Map;for(let a=0;a<e.length;a++){const o=e[a];un(o)<255||n.set(o,(n.get(o)??0)+1)}return n}}const qe=5,ue=33,Ve=35937,Q={RED:"red",GREEN:"green",BLUE:"blue"};class Mn{constructor(e=[],n=[],a=[],o=[],s=[],i=[]){this.weights=e,this.momentsR=n,this.momentsG=a,this.momentsB=o,this.moments=s,this.cubes=i}quantize(e,n){this.constructHistogram(e),this.computeMoments();const a=this.createBoxes(n);return this.createResult(a.resultCount)}constructHistogram(e){this.weights=Array.from({length:Ve}).fill(0),this.momentsR=Array.from({length:Ve}).fill(0),this.momentsG=Array.from({length:Ve}).fill(0),this.momentsB=Array.from({length:Ve}).fill(0),this.moments=Array.from({length:Ve}).fill(0);const n=Pn.quantize(e);for(const[a,o]of n.entries()){const s=Je(a),i=Ke(a),c=Xe(a),l=8-qe,d=(s>>l)+1,u=(i>>l)+1,h=(c>>l)+1,w=this.getIndex(d,u,h);this.weights[w]=(this.weights[w]??0)+o,this.momentsR[w]+=o*s,this.momentsG[w]+=o*i,this.momentsB[w]+=o*c,this.moments[w]+=o*(s*s+i*i+c*c)}}computeMoments(){for(let e=1;e<ue;e++){const n=Array.from({length:ue}).fill(0),a=Array.from({length:ue}).fill(0),o=Array.from({length:ue}).fill(0),s=Array.from({length:ue}).fill(0),i=Array.from({length:ue}).fill(0);for(let c=1;c<ue;c++){let l=0,d=0,u=0,h=0,w=0;for(let k=1;k<ue;k++){const g=this.getIndex(e,c,k);l+=this.weights[g],d+=this.momentsR[g],u+=this.momentsG[g],h+=this.momentsB[g],w+=this.moments[g],n[k]+=l,a[k]+=d,o[k]+=u,s[k]+=h,i[k]+=w;const p=this.getIndex(e-1,c,k);this.weights[g]=this.weights[p]+n[k],this.momentsR[g]=this.momentsR[p]+a[k],this.momentsG[g]=this.momentsG[p]+o[k],this.momentsB[g]=this.momentsB[p]+s[k],this.moments[g]=this.moments[p]+i[k]}}}}createBoxes(e){this.cubes=Array.from({length:e}).fill(0).map(()=>new Bn);const n=Array.from({length:e}).fill(0);this.cubes[0].r0=0,this.cubes[0].g0=0,this.cubes[0].b0=0,this.cubes[0].r1=ue-1,this.cubes[0].g1=ue-1,this.cubes[0].b1=ue-1;let a=e,o=0;for(let s=1;s<e;s++){this.cut(this.cubes[o],this.cubes[s])?(n[o]=this.cubes[o].vol>1?this.variance(this.cubes[o]):0,n[s]=this.cubes[s].vol>1?this.variance(this.cubes[s]):0):(n[o]=0,s--),o=0;let i=n[0];for(let c=1;c<=s;c++)n[c]>i&&(i=n[c],o=c);if(i<=0){a=s+1;break}}return new In(e,a)}createResult(e){const n=[];for(let a=0;a<e;++a){const o=this.cubes[a],s=this.volume(o,this.weights);if(s>0){const i=Math.round(this.volume(o,this.momentsR)/s),c=Math.round(this.volume(o,this.momentsG)/s),l=Math.round(this.volume(o,this.momentsB)/s),d=255<<24|(i&255)<<16|(c&255)<<8|l&255;n.push(d)}}return n}variance(e){const n=this.volume(e,this.momentsR),a=this.volume(e,this.momentsG),o=this.volume(e,this.momentsB),s=this.moments[this.getIndex(e.r1,e.g1,e.b1)]-this.moments[this.getIndex(e.r1,e.g1,e.b0)]-this.moments[this.getIndex(e.r1,e.g0,e.b1)]+this.moments[this.getIndex(e.r1,e.g0,e.b0)]-this.moments[this.getIndex(e.r0,e.g1,e.b1)]+this.moments[this.getIndex(e.r0,e.g1,e.b0)]+this.moments[this.getIndex(e.r0,e.g0,e.b1)]-this.moments[this.getIndex(e.r0,e.g0,e.b0)],i=n*n+a*a+o*o,c=this.volume(e,this.weights);return s-i/c}cut(e,n){const a=this.volume(e,this.momentsR),o=this.volume(e,this.momentsG),s=this.volume(e,this.momentsB),i=this.volume(e,this.weights),c=this.maximize(e,Q.RED,e.r0+1,e.r1,a,o,s,i),l=this.maximize(e,Q.GREEN,e.g0+1,e.g1,a,o,s,i),d=this.maximize(e,Q.BLUE,e.b0+1,e.b1,a,o,s,i);let u;const h=c.maximum,w=l.maximum,k=d.maximum;if(h>=w&&h>=k){if(c.cutLocation<0)return!1;u=Q.RED}else w>=h&&w>=k?u=Q.GREEN:u=Q.BLUE;switch(n.r1=e.r1,n.g1=e.g1,n.b1=e.b1,u){case Q.RED:e.r1=c.cutLocation,n.r0=e.r1,n.g0=e.g0,n.b0=e.b0;break;case Q.GREEN:e.g1=l.cutLocation,n.r0=e.r0,n.g0=e.g1,n.b0=e.b0;break;case Q.BLUE:e.b1=d.cutLocation,n.r0=e.r0,n.g0=e.g0,n.b0=e.b1;break;default:throw new Error("unexpected direction "+u)}return e.vol=(e.r1-e.r0)*(e.g1-e.g0)*(e.b1-e.b0),n.vol=(n.r1-n.r0)*(n.g1-n.g0)*(n.b1-n.b0),!0}maximize(e,n,a,o,s,i,c,l){const d=this.bottom(e,n,this.momentsR),u=this.bottom(e,n,this.momentsG),h=this.bottom(e,n,this.momentsB),w=this.bottom(e,n,this.weights);let k=0,g=-1,p=0,b=0,m=0,v=0;for(let P=a;P<o;P++){if(p=d+this.top(e,n,P,this.momentsR),b=u+this.top(e,n,P,this.momentsG),m=h+this.top(e,n,P,this.momentsB),v=w+this.top(e,n,P,this.weights),v===0)continue;let f=(p*p+b*b+m*m)*1,x=v*1,L=f/x;p=s-p,b=i-b,m=c-m,v=l-v,v!==0&&(f=(p*p+b*b+m*m)*1,x=v*1,L+=f/x,L>k&&(k=L,g=P))}return new Dn(g,k)}volume(e,n){return n[this.getIndex(e.r1,e.g1,e.b1)]-n[this.getIndex(e.r1,e.g1,e.b0)]-n[this.getIndex(e.r1,e.g0,e.b1)]+n[this.getIndex(e.r1,e.g0,e.b0)]-n[this.getIndex(e.r0,e.g1,e.b1)]+n[this.getIndex(e.r0,e.g1,e.b0)]+n[this.getIndex(e.r0,e.g0,e.b1)]-n[this.getIndex(e.r0,e.g0,e.b0)]}bottom(e,n,a){switch(n){case Q.RED:return-a[this.getIndex(e.r0,e.g1,e.b1)]+a[this.getIndex(e.r0,e.g1,e.b0)]+a[this.getIndex(e.r0,e.g0,e.b1)]-a[this.getIndex(e.r0,e.g0,e.b0)];case Q.GREEN:return-a[this.getIndex(e.r1,e.g0,e.b1)]+a[this.getIndex(e.r1,e.g0,e.b0)]+a[this.getIndex(e.r0,e.g0,e.b1)]-a[this.getIndex(e.r0,e.g0,e.b0)];case Q.BLUE:return-a[this.getIndex(e.r1,e.g1,e.b0)]+a[this.getIndex(e.r1,e.g0,e.b0)]+a[this.getIndex(e.r0,e.g1,e.b0)]-a[this.getIndex(e.r0,e.g0,e.b0)];default:throw new Error("unexpected direction $direction")}}top(e,n,a,o){switch(n){case Q.RED:return o[this.getIndex(a,e.g1,e.b1)]-o[this.getIndex(a,e.g1,e.b0)]-o[this.getIndex(a,e.g0,e.b1)]+o[this.getIndex(a,e.g0,e.b0)];case Q.GREEN:return o[this.getIndex(e.r1,a,e.b1)]-o[this.getIndex(e.r1,a,e.b0)]-o[this.getIndex(e.r0,a,e.b1)]+o[this.getIndex(e.r0,a,e.b0)];case Q.BLUE:return o[this.getIndex(e.r1,e.g1,a)]-o[this.getIndex(e.r1,e.g0,a)]-o[this.getIndex(e.r0,e.g1,a)]+o[this.getIndex(e.r0,e.g0,a)];default:throw new Error("unexpected direction $direction")}}getIndex(e,n,a){return(e<<qe*2)+(e<<qe+1)+e+(n<<qe)+n+a}}class Bn{constructor(e=0,n=0,a=0,o=0,s=0,i=0,c=0){this.r0=e,this.r1=n,this.g0=a,this.g1=o,this.b0=s,this.b1=i,this.vol=c}}class In{constructor(e,n){this.requestedCount=e,this.resultCount=n}}class Dn{constructor(e,n){this.cutLocation=e,this.maximum=n}}class xn{static quantize(e,n){const a=new Mn().quantize(e,n);return vn.quantize(e,a,n)}}class pe{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(e){return pe.lightFromCorePalette(X.of(e))}static dark(e){return pe.darkFromCorePalette(X.of(e))}static lightContent(e){return pe.lightFromCorePalette(X.contentOf(e))}static darkContent(e){return pe.darkFromCorePalette(X.contentOf(e))}static lightFromCorePalette(e){return new pe({primary:e.a1.tone(40),onPrimary:e.a1.tone(100),primaryContainer:e.a1.tone(90),onPrimaryContainer:e.a1.tone(10),secondary:e.a2.tone(40),onSecondary:e.a2.tone(100),secondaryContainer:e.a2.tone(90),onSecondaryContainer:e.a2.tone(10),tertiary:e.a3.tone(40),onTertiary:e.a3.tone(100),tertiaryContainer:e.a3.tone(90),onTertiaryContainer:e.a3.tone(10),error:e.error.tone(40),onError:e.error.tone(100),errorContainer:e.error.tone(90),onErrorContainer:e.error.tone(10),background:e.n1.tone(99),onBackground:e.n1.tone(10),surface:e.n1.tone(99),onSurface:e.n1.tone(10),surfaceVariant:e.n2.tone(90),onSurfaceVariant:e.n2.tone(30),outline:e.n2.tone(50),outlineVariant:e.n2.tone(80),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(20),inverseOnSurface:e.n1.tone(95),inversePrimary:e.a1.tone(80)})}static darkFromCorePalette(e){return new pe({primary:e.a1.tone(80),onPrimary:e.a1.tone(20),primaryContainer:e.a1.tone(30),onPrimaryContainer:e.a1.tone(90),secondary:e.a2.tone(80),onSecondary:e.a2.tone(20),secondaryContainer:e.a2.tone(30),onSecondaryContainer:e.a2.tone(90),tertiary:e.a3.tone(80),onTertiary:e.a3.tone(20),tertiaryContainer:e.a3.tone(30),onTertiaryContainer:e.a3.tone(90),error:e.error.tone(80),onError:e.error.tone(20),errorContainer:e.error.tone(30),onErrorContainer:e.error.tone(80),background:e.n1.tone(10),onBackground:e.n1.tone(90),surface:e.n1.tone(10),onSurface:e.n1.tone(90),surfaceVariant:e.n2.tone(30),onSurfaceVariant:e.n2.tone(80),outline:e.n2.tone(60),outlineVariant:e.n2.tone(30),shadow:e.n1.tone(0),scrim:e.n1.tone(0),inverseSurface:e.n1.tone(90),inverseOnSurface:e.n1.tone(20),inversePrimary:e.a1.tone(40)})}constructor(e){this.props=e}toJSON(){return{...this.props}}}const _n={desired:4,fallbackColorARGB:4282549748,filter:!0};function En(t,e){return t.score>e.score?-1:t.score<e.score?1:0}class te{constructor(){}static score(e,n){const{desired:a,fallbackColorARGB:o,filter:s}={..._n,...n},i=[],c=new Array(360).fill(0);let l=0;for(const[k,g]of e.entries()){const p=U.fromInt(k);i.push(p);const b=Math.floor(p.hue);c[b]+=g,l+=g}const d=new Array(360).fill(0);for(let k=0;k<360;k++){const g=c[k]/l;for(let p=k-14;p<k+16;p++){const b=Mt(p);d[b]+=g}}const u=new Array;for(const k of i){const g=Mt(Math.round(k.hue)),p=d[g];if(s&&(k.chroma<te.CUTOFF_CHROMA||p<=te.CUTOFF_EXCITED_PROPORTION))continue;const b=p*100*te.WEIGHT_PROPORTION,m=k.chroma<te.TARGET_CHROMA?te.WEIGHT_CHROMA_BELOW:te.WEIGHT_CHROMA_ABOVE,v=(k.chroma-te.TARGET_CHROMA)*m,P=b+v;u.push({hct:k,score:P})}u.sort(En);const h=[];for(let k=90;k>=15;k--){h.length=0;for(const{hct:g}of u)if(h.find(p=>Vt(g.hue,p.hue)<k)||h.push(g),h.length>=a)break;if(h.length>=a)break}const w=[];h.length===0&&w.push(o);for(const k of h)w.push(k.toInt());return w}}te.TARGET_CHROMA=48;te.WEIGHT_PROPORTION=.7;te.WEIGHT_CHROMA_ABOVE=.3;te.WEIGHT_CHROMA_BELOW=.1;te.CUTOFF_CHROMA=5;te.CUTOFF_EXCITED_PROPORTION=.01;function F(t){const e=Je(t),n=Ke(t),a=Xe(t),o=[e.toString(16),n.toString(16),a.toString(16)];for(const[s,i]of o.entries())i.length===1&&(o[s]="0"+i);return"#"+o.join("")}function Tn(t){t=t.replace("#","");const e=t.length===3,n=t.length===6,a=t.length===8;if(!e&&!n&&!a)throw new Error("unexpected hex "+t);let o=0,s=0,i=0;return e?(o=fe(t.slice(0,1).repeat(2)),s=fe(t.slice(1,2).repeat(2)),i=fe(t.slice(2,3).repeat(2))):n?(o=fe(t.slice(0,2)),s=fe(t.slice(2,4)),i=fe(t.slice(4,6))):a&&(o=fe(t.slice(2,4)),s=fe(t.slice(4,6)),i=fe(t.slice(6,8))),(255<<24|(o&255)<<16|(s&255)<<8|i&255)>>>0}function fe(t){return parseInt(t,16)}async function Ln(t){const e=await new Promise((o,s)=>{const i=document.createElement("canvas"),c=i.getContext("2d");if(!c){s(new Error("Could not get canvas context"));return}const l=()=>{i.width=t.width,i.height=t.height,c.drawImage(t,0,0);let u=[0,0,t.width,t.height];const h=t.dataset.area;h&&/^\d+(\s*,\s*\d+){3}$/.test(h)&&(u=h.split(/\s*,\s*/).map(b=>parseInt(b,10)));const[w,k,g,p]=u;o(c.getImageData(w,k,g,p).data)},d=()=>{s(new Error("Image load failed"))};t.complete?l():(t.onload=l,t.onerror=d)}),n=[];for(let o=0;o<e.length;o+=4){const s=e[o],i=e[o+1],c=e[o+2];if(e[o+3]<255)continue;const l=Ye(s,i,c);n.push(l)}const a=xn.quantize(n,128);return te.score(a)[0]}function At(t,e=[]){const n=X.of(t);return{source:t,schemes:{light:pe.light(t),dark:pe.dark(t)},palettes:{primary:n.a1,secondary:n.a2,tertiary:n.a3,neutral:n.n1,neutralVariant:n.n2,error:n.error},customColors:e.map(a=>Vn(t,a))}}async function It(t,e=[]){const n=await Ln(t);return At(n,e)}function Vn(t,e){let n=e.value;const a=n,o=t;e.blend&&(n=pt.harmonize(a,o));const s=X.of(n).a1;return{color:e,value:n,light:{color:s.tone(40),onColor:s.tone(100),colorContainer:s.tone(90),onColorContainer:s.tone(10)},dark:{color:s.tone(80),onColor:s.tone(20),colorContainer:s.tone(30),onColorContainer:s.tone(90)}}}function nt(t){let e=JSON.parse(JSON.stringify(t.schemes));for(let n in e)for(let a in e[n])e[n][a]=F(e[n][a]);return e.dark.surfaceDim=F(t.palettes.neutral.tone(6)),e.dark.surface=F(t.palettes.neutral.tone(6)),e.dark.surfaceBright=F(t.palettes.neutral.tone(24)),e.dark.surfaceContainerLowest=F(t.palettes.neutral.tone(4)),e.dark.surfaceContainerLow=F(t.palettes.neutral.tone(10)),e.dark.surfaceContainer=F(t.palettes.neutral.tone(12)),e.dark.surfaceContainerHigh=F(t.palettes.neutral.tone(17)),e.dark.surfaceContainerHighest=F(t.palettes.neutral.tone(22)),e.dark.onSurface=F(t.palettes.neutral.tone(90)),e.dark.onSurfaceVariant=F(t.palettes.neutralVariant.tone(80)),e.dark.outline=F(t.palettes.neutralVariant.tone(60)),e.dark.outlineVariant=F(t.palettes.neutralVariant.tone(30)),e.light.surfaceDim=F(t.palettes.neutral.tone(87)),e.light.surface=F(t.palettes.neutral.tone(98)),e.light.surfaceBright=F(t.palettes.neutral.tone(98)),e.light.surfaceContainerLowest=F(t.palettes.neutral.tone(100)),e.light.surfaceContainerLow=F(t.palettes.neutral.tone(96)),e.light.surfaceContainer=F(t.palettes.neutral.tone(94)),e.light.surfaceContainerHigh=F(t.palettes.neutral.tone(92)),e.light.surfaceContainerHighest=F(t.palettes.neutral.tone(90)),e.light.onSurface=F(t.palettes.neutral.tone(10)),e.light.onSurfaceVariant=F(t.palettes.neutralVariant.tone(30)),e.light.outline=F(t.palettes.neutralVariant.tone(50)),e.light.outlineVariant=F(t.palettes.neutralVariant.tone(80)),e}async function Sn(t){const e=t,n={light:{},dark:{}};try{if(typeof e=="string"&&/^\#[0-9a-f]+$/i.test(e)){let i=At(Tn(e));return nt(i)}if(e.src){let i=await It(e);return nt(i)}let a=new Blob;if(typeof e=="string"&&(a=await fetch(e).then(i=>i.blob())),e.size&&(a=e),e.files&&e.files[0]&&(a=e.files[0]),e.target&&e.target.files&&e.target.files[0]&&(a=e.target.files[0]),!a.size)return n;let o=new Image(64);o.src=URL.createObjectURL(a);let s=await It(o);return nt(s)}catch{return n}}globalThis.materialDynamicColors=Sn;const $n=globalThis.materialDynamicColors,kt=Symbol("liftkit-theme"),Nt={primary:"#004ee7",onPrimary:"#ffffff",primaryContainer:"#dce1ff",onPrimaryContainer:"#001550",secondary:"#595d72",onSecondary:"#ffffff",secondaryContainer:"#dee1f9",onSecondaryContainer:"#161b2c",tertiary:"#75546f",onTertiary:"#ffffff",tertiaryContainer:"#ffd7f5",onTertiaryContainer:"#2c122a",error:"#ba1a1a",onError:"#ffffff",errorContainer:"#ffdad6",onErrorContainer:"#410002",background:"#fefbff",onBackground:"#1b1b1f",surface:"#fbf8fd",onSurface:"#1b1b1f",surfaceVariant:"#e2e1ec",onSurfaceVariant:"#45464f",outline:"#767680",outlineVariant:"#c6c5d0",shadow:"#000000",scrim:"#000000",inverseSurface:"#303034",inverseOnSurface:"#f2f0f4",inversePrimary:"#b6c4ff",surfaceDim:"#dbd9de",surfaceBright:"#fbf8fd",surfaceContainerLowest:"#ffffff",surfaceContainerLow:"#f5f3f7",surfaceContainer:"#efedf1",surfaceContainerHigh:"#eae7ec",surfaceContainerHighest:"#e4e1e6",warning:"#e3aa00",onWarning:"#281b00",warningContainer:"#ffdfa0",onWarningContainer:"#261a00",success:"#41ca82",onSuccess:"#002311",successContainer:"#77fbae",onSuccessContainer:"#002110",info:"#9bb0ff",onInfo:"#001754",infoContainer:"#dce1ff",onInfoContainer:"#001550"},An={...Nt},Nn={primary:"#035eff",secondary:"#badcff",tertiary:"#00ddfe",neutral:"#000000",neutralvariant:"#3f4f5b",error:"#dd305c",warning:"#feb600",success:"#0cfecd",info:"#175bfc"};function O(t){return t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():""}class Fn{constructor(e,n){const a=Z.fromHueAndChroma(e,n);for(let o=1;o<=99;o++)this[`_${o}`]=Lt(a.tone(o))}}function Ft(t){const e=r.ref({light:{...Nt},dark:{...An}}),n=r.ref({...Nn,...t}),a=r.ref("auto"),o=r.ref("light");function s(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function i(){o.value=a.value==="auto"?s():a.value}function c(g){a.value=g,i()}let l=null;function d(){a.value==="auto"&&i()}async function u(g){const p={...e.value.light},b={...e.value.dark};Object.keys(g).forEach(m=>{const v=tt(g[m]),P=q.fromInt(v),f=new Fn(P.hue,P.chroma);switch(m){case"neutral":Object.assign(p,{background:f._99,onBackground:f._10,surfaceDim:f._87,surface:f._98,surfaceBright:f._98,surfaceContainerLowest:"white",surfaceContainerLow:f._96,surfaceContainer:f._94,surfaceContainerHigh:f._92,surfaceContainerHighest:f._90,onSurface:f._10,inverseSurface:f._20,inverseOnSurface:f._95}),Object.assign(b,{background:f._10,onBackground:f._85,surfaceContainerLowest:f._4,surfaceDim:f._6,surface:f._6,surfaceContainerLow:f._10,surfaceContainer:f._12,surfaceContainerHigh:f._17,surfaceContainerHighest:f._22,surfaceBright:f._24,onSurface:f._90,inverseSurface:f._98,inverseOnSurface:f._10});break;case"neutralvariant":Object.assign(p,{surfaceVariant:f._80,onSurfaceVariant:f._40,outline:f._60,outlineVariant:f._90}),Object.assign(b,{surfaceVariant:f._20,onSurfaceVariant:f._60,outline:f._50,outlineVariant:f._30});break;case"primary":Object.assign(p,{[m]:f._40,[`on${O(m)}`]:f._98,[`${m}Container`]:f._90,[`on${O(m)}Container`]:f._10,[`${m}Fixed`]:f._90,[`${m}FixedDim`]:f._80,[`on${O(m)}Fixed`]:f._10,[`on${O(m)}FixedVariant`]:f._30,inversePrimary:f._80}),Object.assign(b,{[m]:f._80,[`on${O(m)}`]:f._20,[`${m}Container`]:f._30,[`on${O(m)}Container`]:f._90,[`${m}Fixed`]:f._90,[`${m}FixedDim`]:f._80,[`on${O(m)}Fixed`]:f._10,[`on${O(m)}FixedVariant`]:f._30,inversePrimary:f._80});break;case"secondary":case"tertiary":Object.assign(p,{[m]:f._40,[`on${O(m)}`]:f._98,[`${m}Container`]:f._90,[`on${O(m)}Container`]:f._10,[`${m}Fixed`]:f._90,[`${m}FixedDim`]:f._80,[`on${O(m)}Fixed`]:f._10,[`on${O(m)}FixedVariant`]:f._30}),Object.assign(b,{[m]:f._80,[`on${O(m)}`]:f._20,[`${m}Container`]:f._30,[`on${O(m)}Container`]:f._90,[`${m}Fixed`]:f._90,[`${m}FixedDim`]:f._80,[`on${O(m)}Fixed`]:f._10,[`on${O(m)}FixedVariant`]:f._30}),Object.assign(p,{[m]:f._40,[`on${O(m)}`]:f._98,[`${m}Container`]:f._90,[`on${O(m)}Container`]:f._10}),Object.assign(b,{[m]:f._80,[`on${O(m)}`]:f._20,[`${m}Container`]:f._30,[`on${O(m)}Container`]:f._90});break;default:Object.assign(p,{[m]:f._40,[`on${O(m)}`]:f._98,[`${m}Container`]:f._90,[`on${O(m)}Container`]:f._10}),Object.assign(b,{[m]:f._80,[`on${O(m)}`]:f._20,[`${m}Container`]:f._30,[`on${O(m)}Container`]:f._90})}}),e.value={light:p,dark:b}}async function h(g){const p={};try{const b=await $n(g);p.primary=b.light.primary,p.secondary=b.light.secondary,p.tertiary=b.light.tertiary,p.neutral=b.light.surfaceContainer;const m={info:{color:"#175bfc",name:"info"},warning:{color:"#ffbf00",name:"warning"},success:{color:"#42cb83",name:"success"}};Object.keys(m).forEach(v=>{const P=tt(g),f={value:tt(m[v].color),blend:!0,name:m[v].name},x=on(P,f),L=Lt(x.value);p[v]=L}),n.value={...n.value,...p}}catch(b){console.error(b)}}function w(){if(typeof document>"u")return;const g=document.documentElement;Object.keys(e.value.light).forEach(p=>{g.style.setProperty(`--light__${p.toLowerCase()}_lkv`,e.value.light[p])}),Object.keys(e.value.dark).forEach(p=>{g.style.setProperty(`--dark__${p.toLowerCase()}_lkv`,e.value.dark[p])}),o.value==="dark"&&Object.keys(e.value.dark).forEach(p=>{g.style.setProperty(`--light__${p.toLowerCase()}_lkv`,e.value.dark[p])})}r.watch([e,o],w,{deep:!0}),r.onMounted(()=>{typeof window<"u"&&(l=window.matchMedia("(prefers-color-scheme: dark)"),l.addEventListener("change",d),i()),u(n.value)}),r.onUnmounted(()=>{l&&(l.removeEventListener("change",d),l=null)}),r.watch(n,g=>{u(g)},{deep:!0});const k={theme:e,updateTheme:u,updateThemeFromMaster:h,palette:n,colorMode:o,colorModePreference:a,setColorMode:c};return r.provide(kt,k),k}function Ot(){const t=r.inject(kt);if(!t)throw new Error("useTheme() must be used inside a component wrapped with provideTheme()");return t}const bt=Symbol("liftkit-dropdown");let _e=null;function On(t){_e&&_e!==t&&_e.close(),_e=t}function Dt(t){_e===t&&(_e=null)}function Rt(){const t=r.ref(!1),e=r.ref(null),n=r.ref(null);let a=null;function o(d){t.value=d,d&&a?On(a):!d&&a&&Dt(a)}function s(){o(!t.value)}function i(d){n.value&&!n.value.contains(d.target)&&e.value&&!e.value.contains(d.target)&&o(!1)}function c(d){var u;d.key==="Escape"&&t.value&&(o(!1),(u=e.value)==null||u.focus())}r.onMounted(()=>{a={close:()=>o(!1)},document.addEventListener("mousedown",i),document.addEventListener("keydown",c)}),r.onBeforeUnmount(()=>{a&&Dt(a),document.removeEventListener("mousedown",i),document.removeEventListener("keydown",c)});const l={open:t,setOpen:o,toggle:s,triggerRef:e,contentRef:n};return r.provide(bt,l),l}function Ct(){const t=r.inject(bt);if(!t)throw new Error("useDropdown() must be used inside a Dropdown component");return t}const zt=["primary","onprimary","primarycontainer","onprimarycontainer","secondary","onsecondary","secondarycontainer","onsecondarycontainer","tertiary","ontertiary","tertiarycontainer","ontertiarycontainer","error","onerror","errorcontainer","onerrorcontainer","background","onbackground","surface","onsurface","surfacevariant","onsurfacevariant","shadow","inversesurface","scrim","inverseonsurface","inverseprimary","success","onsuccess","successcontainer","onsuccesscontainer","warning","onwarning","warningcontainer","onwarningcontainer","info","oninfo","infocontainer","oninfocontainer","primaryfixed","onprimaryfixed","primaryfixeddim","onprimaryfixedvariant","secondaryfixed","onsecondaryfixed","secondaryfixeddim","onsecondaryfixedvariant","tertiaryfixed","ontertiaryfixed","tertiaryfixeddim","ontertiaryfixedvariant","surfacedim","surfacebright","surfacecontainerlowest","surfacecontainerlow","surfacecontainer","surfacecontainerhigh","surfacecontainerhighest","outline","outlinevariant"],Rn=["primary","secondary","tertiary","error","warning","info","success","primarycontainer","secondarycontainer","tertiarycontainer","errorcontainer","warningcontainer","infocontainer","successcontainer","surface","surfacecontainerlowest","surfacecontainerlow","surfacecontainerhigh","surfacecontainerhighest","surfacevariant","inversesurface","background"],zn=["primary","primarycontainer","secondary","secondarycontainer","tertiary","tertiarycontainer","error","errorcontainer","success","successcontainer","warning","warningcontainer","info","infocontainer","background","surface","surfacevariant","surfacecontainerlowest","surfacecontainerlow","surfacecontainer","surfacecontainerhigh","surfacecontainerhighest","inversesurface","primaryfixed","secondaryfixed","tertiaryfixed"];function jn(){return zt.filter(t=>!zn.includes(t))}function we(t){const e=t.startsWith("on")||t.startsWith("inverseon"),n=t.startsWith("on"),a=t.endsWith("fixed"),o=t.endsWith("dim"),s=t.endsWith("variant");function i(l){switch(a){case!0:switch(n){case!0:return l.slice(2);case!1:return`on${l}`}case!1:switch(o){case!0:return`on${l.slice(0,-3)}variant`;case!1:switch(s){case!0:return`on${l.slice(0,-8)}fixed`;case!1:return`on${l}`}}}}var c;switch(e){case!1:switch(t){case"surfacecontainerlowest":case"surfacecontainerlow":case"surfacecontainer":case"surfacecontainerhigh":case"surfacecontainerhighest":case"surfacedim":case"surfacebright":c="onsurface";break;case"inversesurface":c="inverseonsurface";break;case"inverseprimary":c="onprimarycontainer";break;case"shadow":case"scrim":c="white";break;case"primaryfixeddim":case"secondaryfixeddim":case"tertiaryfixeddim":case"onprimaryfixed":case"onsecondaryfixed":case"ontertiaryfixed":case"onprimaryfixedvariant":case"onsecondaryfixedvariant":case"ontertiaryfixedvariant":c=i(t);break;case"outline":case"outlinevariant":c="onsurfacevariant";break;default:c=`on${t}`;break}break;default:switch(t){case"inverseonsurface":c="inversesurface";break;default:c=t.slice(2)}}return c}function W(t,e){const n={};return Object.entries(t).forEach(([a,o])=>{if(o==null||typeof o=="function"||typeof o=="object")return;const s=a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();n[`data-lk-${e}-${s}`]=String(o)}),n}const Hn=r.defineComponent({__name:"LkTheme",props:{sourceColor:{default:void 0},colorMode:{default:"auto"},palette:{default:void 0}},setup(t,{expose:e}){const n=t,a=r.computed(()=>{const s={};return n.palette&&Object.assign(s,n.palette),s}),o=Ft(a.value);return o.setColorMode(n.colorMode),n.sourceColor&&o.updateThemeFromMaster(n.sourceColor),e({theme:o}),(s,i)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({class:"lk-theme"},s.$attrs),[r.renderSlot(s.$slots,"default")],16))}}),qn={key:0,class:"position-fixed",style:{zIndex:1e3}},Un={key:0,class:"lk-theme-drawer"},Wn={class:"lk-theme-drawer-card shadow-lg mb-2xl"},Gn={class:"lk-theme-drawer-scroll"},Yn={class:"lk-column",style:{gap:"var(--lk-size-md)"}},Jn={class:"lk-row",style:{"align-items":"center","justify-content":"space-between"}},Kn={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",style:{display:"block"}},Xn={class:"lk-theme-code-block position-relative"},Zn={style:{"font-size":"0.618em",overflow:"auto"}},Qn={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",style:{display:"block"}},er={class:"caption color-onsurfacevariant mb-xs"},tr={class:"lk-row",style:{gap:"var(--lk-size-xs)"}},nr=["onClick"],rr={class:"lk-row",style:{"align-items":"start",gap:"var(--lk-size-md)"}},ar=["name","value","onInput"],or={class:"lk-column"},sr=["for"],ir={class:"caption color-onsurfacevariant mb-xs"},cr=["name","value","onInput"],lr={class:"lk-column"},ur=["for"],dr={class:"caption color-onsurfacevariant mb-xs"},mr=["name","value","onInput"],hr={class:"lk-column"},fr=["for"],pr={class:"caption color-onsurfacevariant mb-xs"},gr=r.defineComponent({__name:"LkThemeController",setup(t){const{palette:e,updateTheme:n,updateThemeFromMaster:a,colorMode:o,colorModePreference:s,setColorMode:i}=Ot(),c=["primary","secondary","tertiary"],l=["error","warning","success","info"],d=["neutral","neutralvariant"];r.computed(()=>Object.keys(e.value).map(p=>({key:p,value:e.value[p]})));const u=r.ref(!1);function h(p,b){p==="master"?a(b):e.value={...e.value,[p]:b}}function w(p){i(p)}async function k(){try{const p=`const palette = ${JSON.stringify(e.value,null,2)}
|
|
272
|
-
const colorMode = '${o.value}'`;await navigator.clipboard.writeText(p),alert("Code copied")}catch(p){console.error("Failed to copy palette:",p)}}function g(p){return{primary:"Main brand color, used for most UI elements.",secondary:"Desaturated variant of primary.",tertiary:"Your accent color. Defaults to complementary hue to primary.",error:"A pink or red, indicating problems.",warning:"An orange or yellow, indicating caution.",success:"A green, indicating success.",info:"A blue, indicating neutral information.",neutral:"Backgrounds, surfaces, outlines, and default text color",neutralvariant:"Surface variant, outline variant, and text color variant"}[p]||""}return(p,b)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[u.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",qn,[r.createElementVNode("button",{class:"lk-theme-controller-trigger shadow-xl",style:{position:"fixed",zIndex:1e3,top:"var(--lk-size-xs)",left:"var(--lk-size-xs)"},onClick:b[0]||(b[0]=m=>u.value=!0)},[...b[3]||(b[3]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"2 2 20 20",fill:"currentColor"},[r.createElementVNode("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10a2.5 2.5 0 0 0 2.5-2.5c0-.61-.23-1.21-.64-1.67a.528.528 0 0 1-.13-.33c0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9m-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"})],-1)])])])),(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[u.value?(r.openBlock(),r.createElementBlock("div",Un,[r.createElementVNode("div",Wn,[r.createElementVNode("div",Gn,[r.createElementVNode("div",Yn,[r.createElementVNode("div",Jn,[b[5]||(b[5]=r.createElementVNode("h2",{class:"body-bold"},"Theme Controller",-1)),r.createElementVNode("button",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:"#e8e0e5",border:"none",borderRadius:"50%",width:"36px",height:"36px",cursor:"pointer",padding:"0"},onClick:b[1]||(b[1]=m=>u.value=!1),"aria-label":"Close"},[(r.openBlock(),r.createElementBlock("svg",Kn,[...b[4]||(b[4]=[r.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:"#1b1b1f"},null,-1)])]))])]),r.createElementVNode("div",null,[b[7]||(b[7]=r.createElementVNode("h2",{class:"label mb-xs"},"Config",-1)),b[8]||(b[8]=r.createElementVNode("p",{class:"caption color-onsurfacevariant mb-xs"}," Copy and paste this snippet into your theme config to update your project to match the current configuration. ",-1)),r.createElementVNode("div",Xn,[r.createElementVNode("pre",Zn,"const palette = "+r.toDisplayString(JSON.stringify(r.unref(e),null,2))+`
|
|
273
|
-
const colorMode = '`+r.toDisplayString(r.unref(o))+"'",1),r.createElementVNode("button",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",background:"#e8e0e5",border:"none",borderRadius:"50%",width:"36px",height:"36px",cursor:"pointer",padding:"0",position:"absolute",top:"1em",right:"1em"},onClick:k},[(r.openBlock(),r.createElementBlock("svg",Qn,[...b[6]||(b[6]=[r.createElementVNode("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z",fill:"#1b1b1f"},null,-1)])]))])])]),r.createElementVNode("div",null,[b[9]||(b[9]=r.createElementVNode("h2",{class:"capline mb-lg color-onsurfacevariant"},"Mode",-1)),r.createElementVNode("p",er," Current: "+r.toDisplayString(r.unref(o))+" "+r.toDisplayString(r.unref(s)==="auto"?"(auto)":""),1),r.createElementVNode("div",tr,[(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(["auto","light","dark"],m=>r.createElementVNode("button",{key:m,class:r.normalizeClass(["lk-mode-button",{active:r.unref(s)===m}]),onClick:v=>w(m)},r.toDisplayString(m),11,nr)),64))])]),r.createElementVNode("div",null,[b[11]||(b[11]=r.createElementVNode("h2",{class:"capline mb-lg color-onsurfacevariant"},"Globals",-1)),r.createElementVNode("div",rr,[r.createElementVNode("input",{type:"color",name:"master",class:"lk-color-input",onInput:b[2]||(b[2]=m=>h("master",m.target.value))},null,32),b[10]||(b[10]=r.createElementVNode("div",{class:"lk-column"},[r.createElementVNode("label",{class:"label mb-xs",for:"master"},"master"),r.createElementVNode("p",{class:"caption color-onsurfacevariant mb-xs"},[r.createTextVNode(" The seed color. "),r.createElementVNode("strong",{class:"color-error"},"If you edit this, all other color tokens will reset.")])],-1))])]),r.createElementVNode("div",null,[b[12]||(b[12]=r.createElementVNode("h2",{class:"capline mb-lg color-onsurfacevariant"},"Brand",-1)),(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(c,m=>r.createElementVNode("div",{key:m,class:"lk-row mb-sm",style:{"align-items":"start",gap:"var(--lk-size-md)"}},[r.createElementVNode("input",{type:"color",name:m,value:r.unref(e)[m],class:"lk-color-input",onInput:v=>h(m,v.target.value)},null,40,ar),r.createElementVNode("div",or,[r.createElementVNode("label",{class:"caption-bold mono mb-2xs",for:m},r.toDisplayString(m),9,sr),r.createElementVNode("p",ir,r.toDisplayString(g(m)),1)])])),64))]),r.createElementVNode("div",null,[b[13]||(b[13]=r.createElementVNode("h2",{class:"capline color-onsurfacevariant mb-lg"},"Semantic",-1)),(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(l,m=>r.createElementVNode("div",{key:m,class:"lk-row mb-sm",style:{"align-items":"start",gap:"var(--lk-size-md)"}},[r.createElementVNode("input",{type:"color",name:m,value:r.unref(e)[m],class:"lk-color-input",onInput:v=>h(m,v.target.value)},null,40,cr),r.createElementVNode("div",lr,[r.createElementVNode("label",{class:"caption-bold mono mb-2xs",for:m},r.toDisplayString(m),9,ur),r.createElementVNode("p",dr,r.toDisplayString(g(m)),1)])])),64))]),r.createElementVNode("div",null,[b[14]||(b[14]=r.createElementVNode("h2",{class:"capline color-onsurfacevariant mb-lg"},"Layout",-1)),(r.openBlock(),r.createElementBlock(r.Fragment,null,r.renderList(d,m=>r.createElementVNode("div",{key:m,class:"lk-row mb-sm",style:{"align-items":"start",gap:"var(--lk-size-md)"}},[r.createElementVNode("input",{type:"color",name:m,value:r.unref(e)[m],class:"lk-color-input",onInput:v=>h(m,v.target.value)},null,40,mr),r.createElementVNode("div",hr,[r.createElementVNode("label",{class:"caption-bold mono mb-xs",for:m},r.toDisplayString(m),9,fr),r.createElementVNode("p",pr,r.toDisplayString(g(m)),1)])])),64))])])])])])):r.createCommentVNode("",!0)]))],64))}}),yt=(t,e)=>{const n=t.__vccOpts||t;for(const[a,o]of e)n[a]=o;return n},kr=yt(gr,[["__scopeId","data-v-186889e9"]]),br=r.defineComponent({inheritAttrs:!1,__name:"LkContainer",props:{maxWidth:{default:"md"}},setup(t){const e=t,n=r.computed(()=>W({maxWidth:e.maxWidth},"container"));return(a,o)=>(r.openBlock(),r.createElementBlock("div",r.normalizeProps(r.guardReactiveProps({...a.$attrs,...n.value})),[r.renderSlot(a.$slots,"default")],16))}}),Cr=r.defineComponent({inheritAttrs:!1,__name:"LkColumn",props:{alignItems:{default:"stretch"},justifyContent:{default:"start"},gap:{},wrapChildren:{type:Boolean},defaultChildBehavior:{}},setup(t){const e=t,n=r.computed(()=>W({alignItems:e.alignItems,justifyContent:e.justifyContent,gap:e.gap,wrapChildren:e.wrapChildren,defaultChildBehavior:e.defaultChildBehavior},"column"));return(a,o)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({...a.$attrs,...n.value},{"data-lk-component":"column"}),[r.renderSlot(a.$slots,"default")],16))}}),vt=r.defineComponent({inheritAttrs:!1,__name:"LkRow",props:{alignItems:{default:"start"},justifyContent:{default:"start"},gap:{},wrapChildren:{type:Boolean},defaultChildBehavior:{}},setup(t){const e=t,n=r.computed(()=>W({alignItems:e.alignItems,justifyContent:e.justifyContent,gap:e.gap,wrapChildren:e.wrapChildren,defaultChildBehavior:e.defaultChildBehavior},"row"));return(a,o)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({...a.$attrs,...n.value},{"data-lk-component":"row"}),[r.renderSlot(a.$slots,"default")],16))}}),yr={"data-lk-component":"section"},vr=r.defineComponent({inheritAttrs:!1,__name:"LkSection",props:{padding:{},px:{},py:{},pt:{},pb:{},pl:{},pr:{}},setup(t){const e=t,n=r.computed(()=>W({padding:e.padding,px:e.px,py:e.py,pt:e.pt,pb:e.pb,pl:e.pl,pr:e.pr},"section"));return(a,o)=>(r.openBlock(),r.createElementBlock("section",r.normalizeProps(r.guardReactiveProps({...a.$attrs,...n.value})),[r.createElementVNode("div",yr,[r.renderSlot(a.$slots,"default")])],16))}}),wr=r.defineComponent({inheritAttrs:!1,__name:"LkGrid",props:{columns:{default:2},gap:{default:"md"},autoResponsive:{type:Boolean,default:!1},class:{}},setup(t){const e=t,n=r.useSlots(),a=r.computed(()=>W({autoResponsive:e.autoResponsive,gap:e.gap},"grid")),o=r.computed(()=>e.class?{}:{gridTemplateColumns:`repeat(${e.columns}, 1fr)`}),s=r.computed(()=>!!n.default),i=r.computed(()=>s.value?0:e.class?e.columns:e.columns*2);return(c,l)=>{const d=r.resolveComponent("LkPlaceholderBlock");return r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"grid"},{...c.$attrs,...a.value},{class:e.class,style:o.value}),[r.renderSlot(c.$slots,"default"),s.value?r.createCommentVNode("",!0):(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(i.value,u=>(r.openBlock(),r.createBlock(d,{key:u}))),128))],16)}}}),Pr={"data-lk-component":"placeholder-block"},Mr=r.defineComponent({inheritAttrs:!1,__name:"LkPlaceholderBlock",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",Pr))}}),Br=r.defineComponent({inheritAttrs:!1,__name:"LkHeading",props:{tag:{default:"h2"},fontClass:{default:"display2-bold"},fontColor:{},class:{}},setup(t){const e=t,n=r.computed(()=>W({},"heading")),a=r.computed(()=>{const o=[];return e.fontClass&&o.push(e.fontClass),e.fontColor&&o.push(`color-${e.fontColor}`),e.class&&o.push(e.class),o.join(" ")});return(o,s)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.tag),r.mergeProps({"data-lk-component":"heading",class:a.value},{...o.$attrs,...n.value}),{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3},16,["class"]))}}),wt=r.defineComponent({inheritAttrs:!1,__name:"LkText",props:{tag:{default:"div"},fontClass:{},color:{},class:{}},setup(t){const e=t,n=r.computed(()=>{const a=[];return e.fontClass&&a.push(e.fontClass),e.color&&a.push(`color-${e.color}`),e.class&&a.push(e.class),a.join(" ")});return(a,o)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.tag),r.mergeProps({"data-lk-component":"text",class:n.value},a.$attrs),{default:r.withCtx(()=>[r.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),Ir=["data-lk-badge-scale","data-lk-badge-color"],Dr={"data-lk-component":"slot","data-lk-slot":"icon"},xr={"data-lk-icon-element":"wrapper"},_r=r.defineComponent({inheritAttrs:!1,__name:"LkBadge",props:{icon:{default:"roller-coaster"},color:{default:"surface"},scale:{default:"md"},iconStrokeWidth:{default:0},scrim:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>we(e.color)),a=r.computed(()=>{switch(e.scale){case"lg":return 1;case"md":default:return 1.5}}),o=r.computed(()=>e.iconStrokeWidth||a.value);return(s,i)=>{const c=r.resolveComponent("LkIcon");return r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"badge","data-lk-badge-scale":e.scale,"data-lk-badge-color":`lk-${e.color}`},s.$attrs),[r.createElementVNode("div",Dr,[r.createElementVNode("div",xr,[r.createVNode(c,{name:e.icon,color:n.value,"stroke-width":o.value},null,8,["name","color","stroke-width"])])]),e.scrim?(r.openBlock(),r.createElementBlock("div",{key:0,"data-lk-component":"badge-scrim",class:r.normalizeClass(`bg-${n.value}`)},null,2)):r.createCommentVNode("",!0)],16,Ir)}}}),Er=["data-lk-icon-offset","data-lk-icon-font-class"],Tr=["stroke","stroke-width"],Pe=r.defineComponent({inheritAttrs:!1,__name:"LkIcon",props:{name:{default:"roller-coaster"},fontClass:{},color:{default:"onsurface"},display:{},strokeWidth:{default:2},opticShift:{type:Boolean,default:!1}},setup(t){const e=t;return r.computed(()=>({width:"1em",height:"1em",color:`var(--lk-${e.color})`,strokeWidth:e.strokeWidth})),(n,a)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"icon","data-lk-icon-offset":e.opticShift,"data-lk-icon-font-class":e.fontClass},n.$attrs),[r.renderSlot(n.$slots,"default",{},()=>[(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",stroke:`var(--lk-${e.color})`,"stroke-width":e.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,Tr))])],16,Er))}}),Lr=["src","alt"],Vr=r.defineComponent({inheritAttrs:!1,__name:"LkImage",props:{aspect:{default:"auto"},borderRadius:{},objectFit:{default:"fill"},width:{default:"auto"},height:{default:"auto"},src:{},alt:{default:""}},setup(t){const e=t,n=r.computed(()=>W({aspect:e.aspect,borderRadius:e.borderRadius,objectFit:e.objectFit,width:e.width,height:e.height},"image"));return(a,o)=>(r.openBlock(),r.createElementBlock("img",r.mergeProps({"data-lk-component":"image"},{...a.$attrs,...n.value},{src:e.src,alt:e.alt}),null,16,Lr))}}),Sr=r.defineComponent({inheritAttrs:!1,__name:"LkSticker",props:{fontClass:{default:"label"},bgColor:{default:"primarycontainer"},class:{}},setup(t){const e=t,n=r.computed(()=>we(e.bgColor)),a=r.computed(()=>{const o=[`bg-${e.bgColor}`,`color-${n.value}`];return e.class&&o.push(e.class),o.join(" ")});return(o,s)=>{const i=r.resolveComponent("LkText");return r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"sticker",class:a.value},o.$attrs),[r.createVNode(i,{"font-class":e.fontClass},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default",{},()=>[s[0]||(s[0]=r.createTextVNode("Sticker",-1))])]),_:3},8,["font-class"])],16)}}}),Oe=r.defineComponent({inheritAttrs:!1,__name:"LkStateLayer",props:{bgColor:{default:"currentColor"},forcedState:{}},setup(t){const e=t,n=r.computed(()=>e.bgColor!=="currentColor"?`bg-${e.bgColor}`:""),a=r.computed(()=>e.bgColor==="currentColor"?{backgroundColor:"currentColor"}:{});return(o,s)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"state-layer",class:n.value,style:a.value},e.forcedState?{"data-lk-forced-state":e.forcedState}:{}),null,16))}}),$r=["data-lk-material-type"],Ar={key:0},Nr={key:1},Fr=r.defineComponent({inheritAttrs:!1,__name:"LkMaterialLayer",props:{zIndex:{default:0},type:{},materialProps:{}},setup(t){const e=t;r.computed(()=>e.materialProps&&e.type?W(e.materialProps,e.type):{});const n=r.computed(()=>e.materialProps),a=r.computed(()=>{var u,h;return{opacity:((u=n.value)==null?void 0:u.tintOpacity)||.2,backgroundColor:`var(--lk-${((h=n.value)==null?void 0:h.tint)||"transparent"})`}}),o=r.computed(()=>{var h;return{"--blur-thick":"var(--lk-size-lg)","--blur-normal":"var(--lk-size-md)","--blur-thin":"var(--lk-size-xs)",zIndex:1,isolation:"isolate",backdropFilter:`blur(var(--blur-${((h=n.value)==null?void 0:h.thickness)||"normal"}))`}}),s=r.computed(()=>{var u;return{background:((u=n.value)==null?void 0:u.lightExpression)||"none",mixBlendMode:"soft-light",opacity:1}}),i=r.computed(()=>{var h;switch(((h=n.value)==null?void 0:h.thickness)||"normal"){case"thick":return .8;case"normal":return .6;case"thin":return .4;default:return .6}}),c=r.computed(()=>({backgroundColor:"var(--lk-surface)",opacity:i.value})),l=r.computed(()=>e.materialProps),d=r.computed(()=>{var u;return{backgroundColor:(u=l.value)!=null&&u.bgColor?`var(--lk-${l.value.bgColor})`:"var(--lk-surface)"}});return(u,h)=>{var w,k;return r.openBlock(),r.createElementBlock("div",{"data-lk-component":"material-layer","data-lk-material-type":e.type,style:r.normalizeStyle({zIndex:e.zIndex})},[e.type==="glass"?(r.openBlock(),r.createElementBlock("div",Ar,[r.createElementVNode("div",{"data-lk-material-sublayer":"texture",style:r.normalizeStyle(o.value)},[(w=n.value)!=null&&w.tint?(r.openBlock(),r.createElementBlock("div",{key:0,"data-lk-material-sublayer":"tint",style:r.normalizeStyle(a.value)},[(k=n.value)!=null&&k.light?(r.openBlock(),r.createElementBlock("div",{key:0,"data-lk-material-sublayer":"light",style:r.normalizeStyle(s.value)},null,4)):r.createCommentVNode("",!0)],4)):r.createCommentVNode("",!0)],4),r.createElementVNode("div",{"data-lk-material-sublayer":"base-glass-fill",style:r.normalizeStyle(c.value)},null,4)])):r.createCommentVNode("",!0),e.type==="flat"?(r.openBlock(),r.createElementBlock("div",Nr,[r.createElementVNode("div",{"data-lk-material-sublayer":"bgColor",style:r.normalizeStyle(d.value)},null,4)])):r.createCommentVNode("",!0)],12,$r)}}}),Or=yt(Fr,[["__scopeId","data-v-909bf003"]]),Rr=["data-lk-card-optical-correction"],zr={"data-lk-component":"slot","data-lk-slot":"children"},jr=["data-lk-material-bg-color"],Ze=r.defineComponent({inheritAttrs:!1,__name:"LkCard",props:{scaleFactor:{default:"body"},variant:{default:"fill"},material:{default:"flat"},materialProps:{default:()=>({})},opticalCorrection:{default:"none"},isClickable:{type:Boolean,default:!1},bgColor:{},isScrollable:{type:Boolean,default:!1}},setup(t){const e=t,n=r.useAttrs(),a=r.computed(()=>W({scaleFactor:e.scaleFactor,variant:e.variant,material:e.material},"card")),o=r.computed(()=>{const i=[];return e.isClickable&&i.push("clickable"),i.join(" ")}),s=r.computed(()=>e.variant==="fill"?e.bgColor:"transparent");return(i,c)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"card",class:o.value},{...a.value,...r.unref(n)}),[r.createElementVNode("div",{"data-lk-card-element":"padding-box",class:r.normalizeClass(t.isScrollable?"overflow-auto":""),"data-lk-card-optical-correction":t.opticalCorrection},[r.createElementVNode("div",zr,[r.renderSlot(i.$slots,"default")])],10,Rr),t.material==="glass"?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,"data-lk-component":"material-layer","data-lk-material-layer-type":"glass"},r.unref(W)(t.materialProps,"material")),null,16)):r.createCommentVNode("",!0),t.material==="flat"?(r.openBlock(),r.createElementBlock("div",{key:1,"data-lk-component":"material-layer","data-lk-material-layer-type":"flat","data-lk-material-bg-color":s.value},null,8,jr)):r.createCommentVNode("",!0)],16))}}),Hr=r.defineComponent({__name:"LkDropdown",setup(t){const{open:e,toggle:n,setOpen:a}=Rt();return(o,s)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"dropdown"},o.$attrs),[r.renderSlot(o.$slots,"default",{isOpen:r.unref(e),toggle:r.unref(n),close:()=>r.unref(a)(!1)})],16))}}),qr=["aria-expanded"],Ur=r.defineComponent({__name:"LkDropdownTrigger",setup(t){const{open:e,toggle:n,triggerRef:a}=Ct(),o=r.ref(null);r.onMounted(()=>{if(o.value){const i=o.value.firstElementChild;i?a.value=i:a.value=o.value}}),r.onBeforeUnmount(()=>{a.value=null});function s(){n()}return(i,c)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"localRef",ref:o,"data-lk-component":"dropdown-trigger","aria-expanded":r.unref(e),"aria-haspopup":"menu",onClick:s},[r.renderSlot(i.$slots,"default")],8,qr))}}),Wr=["data-isactive","data-lk-dropdown-trigger-quadrant"],Gr=r.defineComponent({__name:"LkDropdownMenu",props:{scaleFactor:{default:"body"}},setup(t){const{open:e,triggerRef:n,contentRef:a}=Ct(),o=r.ref(null),s=r.ref({}),i=r.ref("bottom-left");function c(){if(!n.value)return;const l=n.value.getBoundingClientRect(),d=window.innerWidth,u=window.innerHeight,h=l.top<u/2,w=l.left<d/2;switch(h?i.value=w?"bottom-left":"bottom-right":i.value=w?"top-left":"top-right",i.value){case"top-left":s.value={top:`${l.top+window.scrollY}px`,left:`${l.left+window.scrollX}px`};break;case"top-right":s.value={top:`${l.top+window.scrollY}px`,left:`${l.right+window.scrollX}px`};break;case"bottom-right":s.value={top:`${l.bottom+window.scrollY}px`,left:`${l.right+window.scrollX}px`};break;case"bottom-left":default:s.value={top:`${l.bottom+window.scrollY}px`,left:`${l.left+window.scrollX}px`};break}}return r.watch(e,l=>{l&&c()}),r.onMounted(()=>{o.value&&(a.value=o.value)}),r.onBeforeUnmount(()=>{a.value=null}),(l,d)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.unref(e)&&r.unref(n)?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"localContentRef",ref:o,style:r.normalizeStyle(s.value),role:"menu","data-lk-component":"dropdown-menu","data-isactive":r.unref(e),"data-lk-dropdown-trigger-quadrant":i.value},[r.createVNode(Ze,{class:"shadow-xl","scale-factor":t.scaleFactor},{default:r.withCtx(()=>[r.createElementVNode("div",{"data-lk-component":"column","data-lk-column-gap":"none",class:r.normalizeClass(t.scaleFactor)},[r.renderSlot(l.$slots,"default")],2)]),_:3},8,["scale-factor"])],12,Wr)):r.createCommentVNode("",!0)]))}}),Yr=["name","value"],Jr=["value"],Qe=Symbol("liftkit-select"),Kr=r.defineComponent({__name:"LkSelect",props:{modelValue:{default:""},options:{default:()=>[]},name:{},label:{},labelPosition:{default:"default"},helpText:{},placeholderText:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,a=e,o=r.ref(!1),s=r.ref(null),i=r.ref(null),c=r.ref(null),l=r.ref(n.modelValue);r.watch(()=>n.modelValue,m=>{l.value=m??""});function d(m){o.value=m}function u(){d(!o.value)}function h(m){l.value=m,a("update:modelValue",m),d(!1)}let w=null;r.watch(o,m=>{m&&(w={close:()=>d(!1)},window.dispatchEvent(new CustomEvent("lk-select-opened",{detail:w})))});function k(m){w&&m.detail!==w&&o.value&&d(!1)}function g(m){i.value&&!i.value.contains(m.target)&&s.value&&!s.value.contains(m.target)&&d(!1)}function p(m){var v;m.key==="Escape"&&o.value&&(d(!1),(v=s.value)==null||v.focus())}r.onMounted(()=>{document.addEventListener("mousedown",g),document.addEventListener("keydown",p),window.addEventListener("lk-select-opened",k)}),r.onBeforeUnmount(()=>{document.removeEventListener("mousedown",g),document.removeEventListener("keydown",p),window.removeEventListener("lk-select-opened",k)});const b=r.computed(()=>n.options);return r.provide(Qe,{open:o,setOpen:d,toggle:u,triggerRef:s,contentRef:i,selectedValue:l,setSelectedValue:h,options:b,name:n.name}),(m,v)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"select"},m.$attrs),[r.createElementVNode("select",{ref_key:"hiddenSelectRef",ref:c,name:t.name,value:l.value,tabindex:"-1","aria-hidden":"true",style:{position:"absolute",left:"-9999px",width:"1px",height:"1px",opacity:"0","pointer-events":"none"}},[v[0]||(v[0]=r.createElementVNode("option",{value:"",disabled:""},null,-1)),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.options,P=>(r.openBlock(),r.createElementBlock("option",{key:P.value,value:P.value},r.toDisplayString(P.label),9,Jr))),128))],8,Yr),r.renderSlot(m.$slots,"default",{isOpen:o.value,toggle:u,selectedValue:l.value,setSelectedValue:h})],16))}}),Xr=["aria-expanded"],Zr=r.defineComponent({__name:"LkSelectTrigger",setup(t){const e=r.inject(Qe);if(!e)throw new Error("LkSelectTrigger must be used inside an LkSelect component");const{open:n,toggle:a,triggerRef:o}=e,s=r.ref(null);r.onMounted(()=>{if(s.value){const c=s.value.firstElementChild;c?o.value=c:o.value=s.value}}),r.onBeforeUnmount(()=>{o.value=null});function i(){a()}return(c,l)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"localRef",ref:s,"data-lk-component":"select-trigger","aria-expanded":r.unref(n),"aria-haspopup":"menu",onClick:i},[r.renderSlot(c.$slots,"default")],8,Xr))}}),Qr=["data-isactive"],ea=r.defineComponent({__name:"LkSelectMenu",props:{scaleFactor:{default:"body"}},setup(t){const e=r.inject(Qe);if(!e)throw new Error("LkSelectMenu must be used inside an LkSelect component");const{open:n,triggerRef:a,contentRef:o}=e,s=r.ref(null),i=r.ref({});function c(){if(!a.value)return;const l=a.value.getBoundingClientRect();i.value={top:`${l.bottom+window.scrollY}px`,left:`${l.left+window.scrollX}px`}}return r.watch(n,l=>{l&&c()}),r.onMounted(()=>{s.value&&(o.value=s.value)}),r.onBeforeUnmount(()=>{o.value=null}),(l,d)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.unref(n)&&r.unref(a)?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"localContentRef",ref:s,style:r.normalizeStyle(i.value),role:"menu","data-lk-component":"select-menu","data-isactive":r.unref(n)},[r.createVNode(Ze,{class:"shadow-xl","scale-factor":t.scaleFactor},{default:r.withCtx(()=>[r.createElementVNode("div",{"data-lk-component":"column","data-lk-column-gap":"none",class:r.normalizeClass(t.scaleFactor)},[r.renderSlot(l.$slots,"default")],2)]),_:3},8,["scale-factor"])],12,Qr)):r.createCommentVNode("",!0)]))}}),ta=["data-selected"],na={"data-lk-menu-item-element":"content-wrap"},ra=["data-lk-state-layer-forced-state"],aa=r.defineComponent({__name:"LkSelectOption",props:{value:{}},setup(t){const e=t,n=r.inject(Qe);if(!n)throw new Error("LkSelectOption must be used inside an LkSelect component");const{selectedValue:a,setSelectedValue:o}=n,s=r.computed(()=>a.value===e.value);function i(){o(e.value)}function c(l){(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),i())}return(l,d)=>(r.openBlock(),r.createElementBlock("div",{role:"menuitem","data-lk-component":"menu-item",tabindex:0,"data-selected":s.value,style:r.normalizeStyle({cursor:"pointer",fontWeight:s.value?"bold":"normal"}),class:"select-option",onClick:i,onKeydown:c},[r.renderSlot(l.$slots,"startIcon"),r.createElementVNode("p",na,[r.renderSlot(l.$slots,"default")]),r.renderSlot(l.$slots,"endIcon"),r.createElementVNode("div",{"data-lk-component":"state-layer","data-lk-state-layer-forced-state":s.value?"active":void 0},null,8,ra)],44,ta))}}),oa={"data-lk-component":"row","data-lk-row-align-items":"center"},sa={key:0,"data-lk-slot":"snackbar-icon"},ia={"data-lk-slot":"snackbar-text"},ca={"data-lk-component":"row"},la={key:0,"data-lk-slot":"snackbar-actions"},ua={key:1,"data-lk-slot":"snackbar-icon-actions"},da=r.defineComponent({inheritAttrs:!1,__name:"LkSnackbar",props:{globalColor:{},message:{default:"Notification text goes here."},modelValue:{type:Boolean,default:!0},autoDismiss:{default:0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,a=e,o=r.useAttrs(),s=r.ref(n.modelValue);let i=null;r.watch(()=>n.modelValue,h=>{s.value=h,h&&n.autoDismiss>0&&c()});function c(){l(),n.autoDismiss>0&&(i=setTimeout(()=>{s.value=!1,a("update:modelValue",!1)},n.autoDismiss))}function l(){i&&(clearTimeout(i),i=null)}r.onMounted(()=>{s.value&&n.autoDismiss>0&&c()}),r.onUnmounted(()=>{l()});const d=r.computed(()=>W({globalColor:n.globalColor,message:n.message},"snackbar")),u=r.computed(()=>{if(n.globalColor)return we(n.globalColor)});return(h,w)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[s.value?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,"data-lk-component":"snackbar"},{...d.value,...r.unref(o)}),[r.createVNode(Ze,{"scale-factor":h.$slots.icon?"subheading":"body","bg-color":t.globalColor,"optical-correction":h.$slots.icon?"none":"y",class:"shadow-sm"},{default:r.withCtx(()=>[r.createElementVNode("div",oa,[h.$slots.icon?(r.openBlock(),r.createElementBlock("div",sa,[r.renderSlot(h.$slots,"icon",{onColor:u.value})])):r.createCommentVNode("",!0),r.createElementVNode("div",ia,[r.renderSlot(h.$slots,"default",{onColor:u.value,globalColor:t.globalColor},()=>[r.createElementVNode("p",null,r.toDisplayString(t.message),1)])]),r.createElementVNode("div",ca,[h.$slots.action?(r.openBlock(),r.createElementBlock("div",la,[r.renderSlot(h.$slots,"action",{onColor:u.value,globalColor:t.globalColor})])):r.createCommentVNode("",!0),h.$slots.iconAction?(r.openBlock(),r.createElementBlock("div",ua,[r.renderSlot(h.$slots,"iconAction",{onColor:u.value,globalColor:t.globalColor})])):r.createCommentVNode("",!0)])])]),_:3},8,["scale-factor","bg-color","optical-correction"])],16)):r.createCommentVNode("",!0)]))}}),ma={class:"navbar-desktop"},ha={"data-lk-component":"row","data-lk-row-align-items":"center","data-lk-row-gap":"sm"},fa=["href"],pa=["alt","src"],ga={"data-lk-component":"row"},ka={"data-lk-component":"row","data-lk-slot":"nav-buttons"},ba={"data-lk-component":"row","data-lk-slot":"nav-dropdowns"},Ca={"data-lk-component":"row","data-lk-navbar-el":"nav-menu-end"},ya={"data-lk-slot":"nav-icon-buttons"},va={"data-lk-slot":"nav-cta-buttons"},wa={"data-lk-navbar-el":"nav-menu"},Pa=["aria-expanded"],Ma=["href"],Ba=["alt","src"],Ia={"data-lk-component":"column"},Da={"data-lk-component":"column"},xa={"data-lk-component":"column",class:"flex-h gap-sm"},_a={key:0,"data-lk-component":"material-layer","data-lk-material-layer-type":"glass"},Ea=r.defineComponent({inheritAttrs:!1,__name:"LkNavbar",props:{material:{default:"flat"},homeHref:{default:"/"},logoSrc:{default:"/logotype.svg"},logoAlt:{default:""}},setup(t){const e=t,n=r.useAttrs(),a=r.ref(!1);function o(){a.value=!a.value}const s=r.computed(()=>W({material:e.material},"navbar"));return(i,c)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"navbar"},{...s.value,...r.unref(n)}),[r.createElementVNode("div",ma,[r.createElementVNode("div",ha,[r.renderSlot(i.$slots,"brand",{},()=>[r.createElementVNode("a",{href:t.homeHref},[r.createElementVNode("img",{alt:t.logoAlt,src:t.logoSrc,"data-lk-component":"image","data-lk-image-height":"md"},null,8,pa)],8,fa)])]),r.createElementVNode("div",ga,[r.createElementVNode("div",ka,[r.renderSlot(i.$slots,"navButtons")]),r.createElementVNode("div",ba,[r.renderSlot(i.$slots,"navDropdowns")])]),r.createElementVNode("div",Ca,[r.createElementVNode("div",ya,[r.renderSlot(i.$slots,"iconButtons")]),r.createElementVNode("div",va,[r.renderSlot(i.$slots,"ctaButtons")])])]),r.createElementVNode("div",wa,[r.createElementVNode("div",{"data-lk-component":"column","data-lk-column-align-items":"start",class:r.normalizeClass(["navbar-mobile",{active:a.value}])},[r.createElementVNode("button",{class:"navbar-menu-toggle",type:"button","aria-label":"Toggle menu","aria-expanded":a.value,onClick:o},[r.renderSlot(i.$slots,"menuIcon",{},()=>[c[0]||(c[0]=r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[r.createElementVNode("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),r.createElementVNode("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),r.createElementVNode("line",{x1:"3",y1:"18",x2:"21",y2:"18"})],-1))])],8,Pa),r.renderSlot(i.$slots,"mobileBrand",{},()=>[r.createElementVNode("a",{href:t.homeHref},[r.createElementVNode("img",{alt:t.logoAlt,src:t.logoSrc,"data-lk-component":"image","data-lk-image-width":"md","data-lk-image-height":"md"},null,8,Ba)],8,Ma)]),r.withDirectives(r.createElementVNode("div",Ia,[r.renderSlot(i.$slots,"navButtons")],512),[[r.vShow,a.value]]),r.withDirectives(r.createElementVNode("div",Da,[r.renderSlot(i.$slots,"navDropdowns")],512),[[r.vShow,a.value]]),r.withDirectives(r.createElementVNode("div",null,[r.renderSlot(i.$slots,"iconButtons")],512),[[r.vShow,a.value]]),r.withDirectives(r.createElementVNode("div",xa,[r.renderSlot(i.$slots,"ctaButtons")],512),[[r.vShow,a.value]])],2)]),t.material==="glass"?(r.openBlock(),r.createElementBlock("div",_a)):r.createCommentVNode("",!0)],16))}}),Ta={"data-lk-button-content-wrap":"true"},La={key:0,"data-lk-icon-position":"start"},Va={"data-lk-button-child":"button-text"},Sa={key:1,"data-lk-icon-position":"end"},$a=r.defineComponent({inheritAttrs:!1,__name:"LkButton",props:{label:{default:"Button"},variant:{default:"fill"},color:{default:"primary"},size:{default:"md"},material:{},startIcon:{},endIcon:{},opticIconShift:{type:Boolean,default:!0},modifiers:{},stateLayerOverride:{}},setup(t){const e=t,n=r.computed(()=>W({variant:e.variant,color:e.color,size:e.size,startIcon:e.startIcon,endIcon:e.endIcon,opticIconShift:e.opticIconShift},"button")),a=r.computed(()=>we(e.color)),o=r.computed(()=>{let c="";switch(e.variant){case"fill":c=`bg-${e.color} color-${a.value}`;break;case"outline":case"text":c=`color-${e.color}`;break;default:c=`bg-${e.color} color-${a.value}`;break}return e.modifiers&&(c+=` ${e.modifiers}`),c}),s=r.computed(()=>e.stateLayerOverride?e.stateLayerOverride:{bgColor:e.variant==="fill"?a.value:e.color}),i=r.computed(()=>e.variant==="fill"?a.value:e.color);return(c,l)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({...c.$attrs,...n.value},{type:"button","data-lk-component":"button",class:`${o.value} ${t.modifiers||""}`}),[r.createElementVNode("div",Ta,[t.startIcon?(r.openBlock(),r.createElementBlock("div",La,[r.createVNode(Pe,{name:t.startIcon,color:i.value,"data-lk-icon-position":"start"},null,8,["name","color"])])):r.createCommentVNode("",!0),r.createElementVNode("span",Va,r.toDisplayString(t.label??"Button"),1),t.endIcon?(r.openBlock(),r.createElementBlock("div",Sa,[r.createVNode(Pe,{name:t.endIcon,color:i.value,"data-lk-icon-position":"end"},null,8,["name","color"])])):r.createCommentVNode("",!0)]),r.createVNode(Oe,r.normalizeProps(r.guardReactiveProps(s.value)),null,16)],16))}}),Aa=r.defineComponent({inheritAttrs:!1,__name:"LkIconButton",props:{icon:{default:"roller-coaster"},variant:{default:"fill"},color:{default:"primary"},size:{default:"md"},fontClass:{default:"body"}},setup(t){const e=t,n=r.computed(()=>W({variant:e.variant,color:e.color,size:e.size},"icon-button")),a=r.computed(()=>we(e.color)),o=r.computed(()=>{switch(e.fontClass){case"display1":case"display2":case"title1":return 1.5;case"subheading":case"label":case"caption":case"capline":return 2;default:return 1.75}}),s=r.computed(()=>{switch(e.variant){case"outline":case"text":return e.color;case"fill":return a.value;default:return a.value}});return(i,c)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({"data-lk-component":"icon-button",type:"button"},{...i.$attrs,...n.value},{class:`${t.fontClass}`}),[r.createElementVNode("div",null,[r.createVNode(Pe,{name:t.icon,color:s.value,"stroke-width":o.value},null,8,["name","color","stroke-width"])]),r.createVNode(Oe,{"bg-color":s.value},null,8,["bg-color"])],16))}}),Na=["title"],Fa={"data-lk-menu-item-element":"content-wrap"},Oa=r.defineComponent({inheritAttrs:!1,__name:"LkMenuItem",props:{startIcon:{},endIcon:{},fontClass:{default:"body"},title:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"menu-item",title:t.title},e.$attrs),[t.startIcon?(r.openBlock(),r.createBlock(Pe,r.mergeProps({key:0},t.startIcon,{"data-lk-icon-position":"start"}),null,16)):r.createCommentVNode("",!0),r.createElementVNode("p",Fa,[r.renderSlot(e.$slots,"default")]),t.endIcon?(r.openBlock(),r.createBlock(Pe,r.mergeProps({key:1},t.endIcon,{"data-lk-icon-position":"end"}),null,16)):r.createCommentVNode("",!0),r.createVNode(Oe)],16,Na))}}),Ra=["data-lk-switch-state"],za=["data-lk-switch-state"],ja=r.defineComponent({inheritAttrs:!1,__name:"LkSwitch",props:{modelValue:{type:Boolean,default:!1},offColor:{default:"surfacevariant"},onColor:{default:"primary"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,a=e,o=r.computed(()=>we(n.offColor)),s=r.computed(()=>we(n.onColor));function i(){a("update:modelValue",!n.modelValue)}const c=r.computed(()=>n.modelValue?"on":"off"),l=r.computed(()=>({"--switch-off-color":`var(--lk-${n.offColor})`,"--switch-on-color":`var(--lk-${n.onColor})`,"--switch-thumb-off-color":`var(--lk-${o.value})`,"--switch-thumb-on-color":`var(--lk-${s.value})`}));return(d,u)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"switch"},{...d.$attrs,style:l.value},{"data-lk-switch-state":c.value,onClick:i}),[r.createElementVNode("div",{"data-lk-component":"switch-thumb","data-lk-switch-state":c.value},null,8,za)],16,Ra))}}),Ha=yt(ja,[["__scopeId","data-v-9150e6cf"]]),qa=["for"],Ua=["data-lk-input-help-text","data-help-text"],Wa=["for"],Ga=["name","id","placeholder","value"],Ya=r.defineComponent({inheritAttrs:!1,__name:"LkTextInput",props:{modelValue:{default:""},labelPosition:{default:"default"},helpText:{},placeholder:{default:"Placeholder"},name:{default:"Label"},endIcon:{default:"search"},labelBackgroundColor:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,a=e,o=r.computed(()=>W({labelPosition:n.labelPosition},"text-input"));function s(c){const l=c.target;a("update:modelValue",l.value)}const i=r.computed(()=>{let c="body";return n.labelBackgroundColor&&(c+=` bg-${n.labelBackgroundColor}`),n.modelValue&&(c+=" on-field-with-value-set"),c});return(c,l)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"text-input"},{...c.$attrs,...o.value}),[t.labelPosition==="default"?(r.openBlock(),r.createElementBlock("label",{key:0,for:t.name,class:"label"},r.toDisplayString(t.name),9,qa)):r.createCommentVNode("",!0),r.createElementVNode("div",{"data-lk-text-input-el":"input-wrap","data-lk-input-help-text":t.helpText?"true":"false","data-help-text":t.helpText},[t.labelPosition==="on-input"?(r.openBlock(),r.createElementBlock("label",{key:0,for:t.name,class:r.normalizeClass(i.value)},r.toDisplayString(t.name),11,Wa)):r.createCommentVNode("",!0),r.createElementVNode("input",{type:"text",name:t.name,id:t.name,placeholder:t.labelPosition!=="on-input"?t.placeholder:"",value:t.modelValue,onInput:s},null,40,Ga),r.createVNode(Oe),r.createVNode(Pe,{name:t.endIcon},null,8,["name"])],8,Ua),t.helpText?(r.openBlock(),r.createBlock(vt,{key:1,"align-items":"center"},{default:r.withCtx(()=>[r.createVNode(Pe,{name:"info","font-class":"capline",color:"outline","optic-shift":!0}),r.createVNode(wt,{color:"outline","font-class":"caption",class:"m-left-2xs"},{default:r.withCtx(()=>[...l[0]||(l[0]=[r.createTextVNode(" Help text goes here ",-1)])]),_:1})]),_:1})):r.createCommentVNode("",!0)],16))}}),Ja={"data-lk-slot":"child"},jt=r.defineComponent({inheritAttrs:!1,__name:"LkTabLink",props:{selected:{type:Boolean,default:!1},fontClass:{default:"body"},indicatorClass:{default:"lk-indicator"}},setup(t){const e=t,n=r.computed(()=>W({selected:e.selected,fontClass:e.fontClass,indicatorClass:e.indicatorClass},"tab-link")),a=r.computed(()=>e.selected?{fontWeight:700}:{});return(o,s)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"tab-link"},{...o.$attrs,...n.value}),[r.createElementVNode("div",Ja,[r.createVNode(wt,{"font-class":t.fontClass,style:r.normalizeStyle(a.value)},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3},8,["font-class","style"])]),r.createElementVNode("div",{class:r.normalizeClass(t.indicatorClass)},null,2)],16))}}),Ht=r.defineComponent({inheritAttrs:!1,__name:"LkTabMenu",props:{tabLinks:{default:()=>["Tab Link 1","Tab Link 2","Tab Link 3"]},alignItems:{},justifyContent:{},activeTab:{default:0}},emits:["update:activeTab"],setup(t,{emit:e}){const n=t,a=e,o=r.computed(()=>W({alignItems:n.alignItems,justifyContent:n.justifyContent,activeTab:n.activeTab},"tab-menu"));function s(i){a("update:activeTab",i)}return(i,c)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"tab-menu"},{...i.$attrs,...o.value}),[r.createVNode(vt,{"align-items":t.alignItems,"justify-content":t.justifyContent},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.tabLinks,(l,d)=>(r.openBlock(),r.createBlock(jt,{key:d,selected:d===t.activeTab,onClick:u=>s(d)},{default:r.withCtx(()=>[r.createElementVNode("div",null,r.toDisplayString(l??"Tab Link"),1)]),_:2},1032,["selected","onClick"]))),128))]),_:1},8,["align-items","justify-content"])],16))}}),Ka=["data-lk-tabs-content-scrollable"],Xa=["data-lk-tabs-content-scrollable"],Za=r.defineComponent({inheritAttrs:!1,__name:"LkTabs",props:{tabLinks:{},scrollableContent:{type:Boolean,default:!1},defaultTab:{default:0}},emits:["activeTabChange"],setup(t,{emit:e}){const n=t,a=e,o=r.ref(n.defaultTab);function s(c){o.value=c}r.watch(o,c=>{a("activeTabChange",c)}),r.provide("lk-tabs",{activeTab:o,setActiveTab:s});const i=r.computed(()=>W({activeTab:o.value},"tabs"));return(c,l)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"tabs","data-lk-tabs-content-scrollable":t.scrollableContent||void 0},{...c.$attrs,...i.value}),[r.createVNode(Ht,{"tab-links":t.tabLinks,"justify-content":"start","align-items":"stretch","active-tab":o.value,"onUpdate:activeTab":s},null,8,["tab-links","active-tab"]),r.createElementVNode("div",{"data-lk-tabs-el":"tab-content","data-lk-tabs-content-scrollable":t.scrollableContent||void 0},[r.renderSlot(c.$slots,"default",{activeTab:o.value})],8,Xa)],16,Ka))}}),Qa=r.defineComponent({inheritAttrs:!1,__name:"LkTabContent",props:{index:{}},setup(t){const e=t,n=r.inject("lk-tabs",null),a=r.computed(()=>n?n.activeTab.value===e.index:!0);return(o,s)=>r.withDirectives((r.openBlock(),r.createElementBlock("div",r.mergeProps({"data-lk-component":"tab-content"},o.$attrs),[r.renderSlot(o.$slots,"default")],16)),[[r.vShow,a.value]])}});exports.DROPDOWN_INJECTION_KEY=bt;exports.LkBadge=_r;exports.LkButton=$a;exports.LkCard=Ze;exports.LkColors=zt;exports.LkColorsWithOnTokens=Rn;exports.LkColumn=Cr;exports.LkContainer=br;exports.LkDropdown=Hr;exports.LkDropdownMenu=Gr;exports.LkDropdownTrigger=Ur;exports.LkGrid=wr;exports.LkHeading=Br;exports.LkIcon=Pe;exports.LkIconButton=Aa;exports.LkImage=Vr;exports.LkMaterialLayer=Or;exports.LkMenuItem=Oa;exports.LkNavbar=Ea;exports.LkPlaceholderBlock=Mr;exports.LkRow=vt;exports.LkSection=vr;exports.LkSelect=Kr;exports.LkSelectMenu=ea;exports.LkSelectOption=aa;exports.LkSelectTrigger=Zr;exports.LkSnackbar=da;exports.LkStateLayer=Oe;exports.LkSticker=Sr;exports.LkSwitch=Ha;exports.LkTabContent=Qa;exports.LkTabLink=jt;exports.LkTabMenu=Ht;exports.LkTabs=Za;exports.LkText=wt;exports.LkTextInput=Ya;exports.LkTheme=Hn;exports.LkThemeController=kr;exports.THEME_INJECTION_KEY=kt;exports.getColorsWithoutOnTokens=jn;exports.getOnToken=we;exports.propsToDataAttrs=W;exports.provideDropdown=Rt;exports.provideTheme=Ft;exports.useDropdown=Ct;exports.useTheme=Ot;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require(`vue`);function t(e){return e<0?-1:e===0?0:1}function n(e,t,n){return(1-n)*e+n*t}function r(e,t,n){return n<e?e:n>t?t:n}function i(e,t,n){return n<e?e:n>t?t:n}function a(e){return e%=360,e<0&&(e+=360),e}function o(e){return e%=360,e<0&&(e+=360),e}function s(e,t){return o(t-e)<=180?1:-1}function c(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function l(e,t){return[e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2]]}var u=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],d=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],f=[95.047,100,108.883];function p(e,t,n){return(255<<24|(e&255)<<16|(t&255)<<8|n&255)>>>0}function m(e){return p(T(e[0]),T(e[1]),T(e[2]))}function h(e){return e>>16&255}function g(e){return e>>8&255}function _(e){return e&255}function v(e,t,n){let r=d,i=r[0][0]*e+r[0][1]*t+r[0][2]*n,a=r[1][0]*e+r[1][1]*t+r[1][2]*n,o=r[2][0]*e+r[2][1]*t+r[2][2]*n;return p(T(i),T(a),T(o))}function y(e){return l([w(h(e)),w(g(e)),w(_(e))],u)}function b(e){let t=T(S(e));return p(t,t,t)}function x(e){let t=y(e)[1];return 116*E(t/100)-16}function S(e){return 100*D((e+16)/116)}function C(e){return E(e/100)*116-16}function w(e){let t=e/255;return t<=.040449936?t/12.92*100:((t+.055)/1.055)**2.4*100}function T(e){let t=e/100,n=0;return n=t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055,r(0,255,Math.round(n*255))}function ee(){return f}function E(e){return e>.008856451679035631?e**(1/3):(903.2962962962963*e+16)/116}function D(e){let t=e*e*e;return t>.008856451679035631?t:(116*e-16)/903.2962962962963}var O=class e{static make(t=ee(),r=200/Math.PI*S(50)/100,i=50,a=2,o=!1){let s=t,c=s[0]*.401288+s[1]*.650173+s[2]*-.051461,l=s[0]*-.250268+s[1]*1.204414+s[2]*.045854,u=s[0]*-.002079+s[1]*.048952+s[2]*.953127,d=.8+a/10,f=d>=.9?n(.59,.69,(d-.9)*10):n(.525,.59,(d-.8)*10),p=o?1:d*(1-1/3.6*Math.exp((-r-42)/92));p=p>1?1:p<0?0:p;let m=d,h=[100/c*p+1-p,100/l*p+1-p,100/u*p+1-p],g=1/(5*r+1),_=g*g*g*g,v=1-_,y=_*r+.1*v*v*Math.cbrt(5*r),b=S(i)/t[1],x=1.48+Math.sqrt(b),C=.725/b**.2,w=C,T=[(y*h[0]*c/100)**.42,(y*h[1]*l/100)**.42,(y*h[2]*u/100)**.42],E=[400*T[0]/(T[0]+27.13),400*T[1]/(T[1]+27.13),400*T[2]/(T[2]+27.13)];return new e(b,(2*E[0]+E[1]+.05*E[2])*C,C,w,f,m,h,y,y**.25,x)}constructor(e,t,n,r,i,a,o,s,c,l){this.n=e,this.aw=t,this.nbb=n,this.ncb=r,this.c=i,this.nc=a,this.rgbD=o,this.fl=s,this.fLRoot=c,this.z=l}};O.DEFAULT=O.make();var k=class e{constructor(e,t,n,r,i,a,o,s,c){this.hue=e,this.chroma=t,this.j=n,this.q=r,this.m=i,this.s=a,this.jstar=o,this.astar=s,this.bstar=c}distance(e){let t=this.jstar-e.jstar,n=this.astar-e.astar,r=this.bstar-e.bstar;return 1.41*Math.sqrt(t*t+n*n+r*r)**.63}static fromInt(t){return e.fromIntInViewingConditions(t,O.DEFAULT)}static fromIntInViewingConditions(n,r){let i=(n&16711680)>>16,a=(n&65280)>>8,o=n&255,s=w(i),c=w(a),l=w(o),u=.41233895*s+.35762064*c+.18051042*l,d=.2126*s+.7152*c+.0722*l,f=.01932141*s+.11916382*c+.95034478*l,p=.401288*u+.650173*d-.051461*f,m=-.250268*u+1.204414*d+.045854*f,h=-.002079*u+.048952*d+.953127*f,g=r.rgbD[0]*p,_=r.rgbD[1]*m,v=r.rgbD[2]*h,y=(r.fl*Math.abs(g)/100)**.42,b=(r.fl*Math.abs(_)/100)**.42,x=(r.fl*Math.abs(v)/100)**.42,S=t(g)*400*y/(y+27.13),C=t(_)*400*b/(b+27.13),T=t(v)*400*x/(x+27.13),ee=(11*S+-12*C+T)/11,E=(S+C-2*T)/9,D=(20*S+20*C+21*T)/20,O=(40*S+20*C+T)/20,k=Math.atan2(E,ee)*180/Math.PI,A=k<0?k+360:k>=360?k-360:k,j=A*Math.PI/180,te=100*(O*r.nbb/r.aw)**+(r.c*r.z),M=4/r.c*Math.sqrt(te/100)*(r.aw+4)*r.fLRoot,ne=A<20.14?A+360:A,N=(5e4/13*(.25*(Math.cos(ne*Math.PI/180+2)+3.8))*r.nc*r.ncb*Math.sqrt(ee*ee+E*E)/(D+.305))**.9*(1.64-.29**r.n)**.73,P=N*Math.sqrt(te/100),re=P*r.fLRoot,F=50*Math.sqrt(N*r.c/(r.aw+4)),I=1.7000000000000002*te/(1+.007*te),ie=1/.0228*Math.log(1+.0228*re);return new e(A,P,te,M,re,F,I,ie*Math.cos(j),ie*Math.sin(j))}static fromJch(t,n,r){return e.fromJchInViewingConditions(t,n,r,O.DEFAULT)}static fromJchInViewingConditions(t,n,r,i){let a=4/i.c*Math.sqrt(t/100)*(i.aw+4)*i.fLRoot,o=n*i.fLRoot,s=n/Math.sqrt(t/100),c=50*Math.sqrt(s*i.c/(i.aw+4)),l=r*Math.PI/180,u=1.7000000000000002*t/(1+.007*t),d=1/.0228*Math.log(1+.0228*o);return new e(r,n,t,a,o,c,u,d*Math.cos(l),d*Math.sin(l))}static fromUcs(t,n,r){return e.fromUcsInViewingConditions(t,n,r,O.DEFAULT)}static fromUcsInViewingConditions(t,n,r,i){let a=n,o=r,s=Math.sqrt(a*a+o*o),c=(Math.exp(s*.0228)-1)/.0228/i.fLRoot,l=180/Math.PI*Math.atan2(o,a);l<0&&(l+=360);let u=t/(1-(t-100)*.007);return e.fromJchInViewingConditions(u,c,l,i)}toInt(){return this.viewed(O.DEFAULT)}viewed(e){let n=((this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100))/(1.64-.29**e.n)**.73)**(1/.9),r=this.hue*Math.PI/180,i=.25*(Math.cos(r+2)+3.8),a=e.aw*(this.j/100)**(1/e.c/e.z),o=5e4/13*i*e.nc*e.ncb,s=a/e.nbb,c=Math.sin(r),l=Math.cos(r),u=23*(s+.305)*n/(23*o+11*n*l+108*n*c),d=u*l,f=u*c,p=(460*s+451*d+288*f)/1403,m=(460*s-891*d-261*f)/1403,h=(460*s-220*d-6300*f)/1403,g=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),_=t(p)*(100/e.fl)*g**(1/.42),y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),b=t(m)*(100/e.fl)*y**(1/.42),x=Math.max(0,27.13*Math.abs(h)/(400-Math.abs(h))),S=t(h)*(100/e.fl)*x**(1/.42),C=_/e.rgbD[0],w=b/e.rgbD[1],T=S/e.rgbD[2];return v(1.86206786*C-1.01125463*w+.14918677*T,.38752654*C+.62144744*w-.00897398*T,-.0158415*C-.03412294*w+1.04996444*T)}static fromXyzInViewingConditions(n,r,i,a){let o=.401288*n+.650173*r-.051461*i,s=-.250268*n+1.204414*r+.045854*i,c=-.002079*n+.048952*r+.953127*i,l=a.rgbD[0]*o,u=a.rgbD[1]*s,d=a.rgbD[2]*c,f=(a.fl*Math.abs(l)/100)**.42,p=(a.fl*Math.abs(u)/100)**.42,m=(a.fl*Math.abs(d)/100)**.42,h=t(l)*400*f/(f+27.13),g=t(u)*400*p/(p+27.13),_=t(d)*400*m/(m+27.13),v=(11*h+-12*g+_)/11,y=(h+g-2*_)/9,b=(20*h+20*g+21*_)/20,x=(40*h+20*g+_)/20,S=Math.atan2(y,v)*180/Math.PI,C=S<0?S+360:S>=360?S-360:S,w=C*Math.PI/180,T=100*(x*a.nbb/a.aw)**+(a.c*a.z),ee=4/a.c*Math.sqrt(T/100)*(a.aw+4)*a.fLRoot,E=C<20.14?C+360:C,D=(5e4/13*(1/4*(Math.cos(E*Math.PI/180+2)+3.8))*a.nc*a.ncb*Math.sqrt(v*v+y*y)/(b+.305))**.9*(1.64-.29**a.n)**.73,O=D*Math.sqrt(T/100),k=O*a.fLRoot,A=50*Math.sqrt(D*a.c/(a.aw+4)),j=1.7000000000000002*T/(1+.007*T),te=Math.log(1+.0228*k)/.0228;return new e(C,O,T,ee,k,A,j,te*Math.cos(w),te*Math.sin(w))}xyzInViewingConditions(e){let n=((this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100))/(1.64-.29**e.n)**.73)**(1/.9),r=this.hue*Math.PI/180,i=.25*(Math.cos(r+2)+3.8),a=e.aw*(this.j/100)**(1/e.c/e.z),o=5e4/13*i*e.nc*e.ncb,s=a/e.nbb,c=Math.sin(r),l=Math.cos(r),u=23*(s+.305)*n/(23*o+11*n*l+108*n*c),d=u*l,f=u*c,p=(460*s+451*d+288*f)/1403,m=(460*s-891*d-261*f)/1403,h=(460*s-220*d-6300*f)/1403,g=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),_=t(p)*(100/e.fl)*g**(1/.42),v=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),y=t(m)*(100/e.fl)*v**(1/.42),b=Math.max(0,27.13*Math.abs(h)/(400-Math.abs(h))),x=t(h)*(100/e.fl)*b**(1/.42),S=_/e.rgbD[0],C=y/e.rgbD[1],w=x/e.rgbD[2];return[1.86206786*S-1.01125463*C+.14918677*w,.38752654*S+.62144744*C-.00897398*w,-.0158415*S-.03412294*C+1.04996444*w]}},A=class e{static sanitizeRadians(e){return(e+Math.PI*8)%(Math.PI*2)}static trueDelinearized(e){let t=e/100,n=0;return n=t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055,n*255}static chromaticAdaptation(e){let n=Math.abs(e)**.42;return t(e)*400*n/(n+27.13)}static hueOf(t){let n=l(t,e.SCALED_DISCOUNT_FROM_LINRGB),r=e.chromaticAdaptation(n[0]),i=e.chromaticAdaptation(n[1]),a=e.chromaticAdaptation(n[2]),o=(11*r+-12*i+a)/11,s=(r+i-2*a)/9;return Math.atan2(s,o)}static areInCyclicOrder(t,n,r){return e.sanitizeRadians(n-t)<e.sanitizeRadians(r-t)}static intercept(e,t,n){return(t-e)/(n-e)}static lerpPoint(e,t,n){return[e[0]+(n[0]-e[0])*t,e[1]+(n[1]-e[1])*t,e[2]+(n[2]-e[2])*t]}static setCoordinate(t,n,r,i){let a=e.intercept(t[i],n,r[i]);return e.lerpPoint(t,a,r)}static isBounded(e){return 0<=e&&e<=100}static nthVertex(t,n){let r=e.Y_FROM_LINRGB[0],i=e.Y_FROM_LINRGB[1],a=e.Y_FROM_LINRGB[2],o=n%4<=1?0:100,s=n%2==0?0:100;if(n<4){let n=o,c=s,l=(t-n*i-c*a)/r;return e.isBounded(l)?[l,n,c]:[-1,-1,-1]}else if(n<8){let n=o,c=s,l=(t-c*r-n*a)/i;return e.isBounded(l)?[c,l,n]:[-1,-1,-1]}else{let n=o,c=s,l=(t-n*r-c*i)/a;return e.isBounded(l)?[n,c,l]:[-1,-1,-1]}}static bisectToSegment(t,n){let r=[-1,-1,-1],i=r,a=0,o=0,s=!1,c=!0;for(let l=0;l<12;l++){let u=e.nthVertex(t,l);if(u[0]<0)continue;let d=e.hueOf(u);if(!s){r=u,i=u,a=d,o=d,s=!0;continue}(c||e.areInCyclicOrder(a,d,o))&&(c=!1,e.areInCyclicOrder(a,n,d)?(i=u,o=d):(r=u,a=d))}return[r,i]}static midpoint(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2,(e[2]+t[2])/2]}static criticalPlaneBelow(e){return Math.floor(e-.5)}static criticalPlaneAbove(e){return Math.ceil(e-.5)}static bisectToLimit(t,n){let r=e.bisectToSegment(t,n),i=r[0],a=e.hueOf(i),o=r[1];for(let t=0;t<3;t++)if(i[t]!==o[t]){let r=-1,s=255;i[t]<o[t]?(r=e.criticalPlaneBelow(e.trueDelinearized(i[t])),s=e.criticalPlaneAbove(e.trueDelinearized(o[t]))):(r=e.criticalPlaneAbove(e.trueDelinearized(i[t])),s=e.criticalPlaneBelow(e.trueDelinearized(o[t])));for(let c=0;c<8&&!(Math.abs(s-r)<=1);c++){let c=Math.floor((r+s)/2),l=e.CRITICAL_PLANES[c],u=e.setCoordinate(i,l,o,t),d=e.hueOf(u);e.areInCyclicOrder(a,n,d)?(o=u,s=c):(i=u,a=d,r=c)}}return e.midpoint(i,o)}static inverseChromaticAdaptation(e){let n=Math.abs(e),r=Math.max(0,27.13*n/(400-n));return t(e)*r**(1/.42)}static findResultByJ(t,n,r){let i=Math.sqrt(r)*11,a=O.DEFAULT,o=1/(1.64-.29**a.n)**.73,s=.25*(Math.cos(t+2)+3.8)*(5e4/13)*a.nc*a.ncb,c=Math.sin(t),u=Math.cos(t);for(let t=0;t<5;t++){let d=i/100,f=((n===0||i===0?0:n/Math.sqrt(d))*o)**(1/.9),p=a.aw*d**(1/a.c/a.z)/a.nbb,h=23*(p+.305)*f/(23*s+11*f*u+108*f*c),g=h*u,_=h*c,v=(460*p+451*g+288*_)/1403,y=(460*p-891*g-261*_)/1403,b=(460*p-220*g-6300*_)/1403,x=l([e.inverseChromaticAdaptation(v),e.inverseChromaticAdaptation(y),e.inverseChromaticAdaptation(b)],e.LINRGB_FROM_SCALED_DISCOUNT);if(x[0]<0||x[1]<0||x[2]<0)return 0;let S=e.Y_FROM_LINRGB[0],C=e.Y_FROM_LINRGB[1],w=e.Y_FROM_LINRGB[2],T=S*x[0]+C*x[1]+w*x[2];if(T<=0)return 0;if(t===4||Math.abs(T-r)<.002)return x[0]>100.01||x[1]>100.01||x[2]>100.01?0:m(x);i-=(T-r)*i/(2*T)}return 0}static solveToInt(t,n,r){if(n<1e-4||r<1e-4||r>99.9999)return b(r);t=o(t);let i=t/180*Math.PI,a=S(r),s=e.findResultByJ(i,n,a);return s===0?m(e.bisectToLimit(a,i)):s}static solveToCam(t,n,r){return k.fromInt(e.solveToInt(t,n,r))}};A.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]],A.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]],A.Y_FROM_LINRGB=[.2126,.7152,.0722],A.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 j=class e{static from(t,n,r){return new e(A.solveToInt(t,n,r))}static fromInt(t){return new e(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(A.solveToInt(e,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(A.solveToInt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(A.solveToInt(this.internalHue,this.internalChroma,e))}constructor(e){this.argb=e;let t=k.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=x(e),this.argb=e}setInternalState(e){let t=k.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=x(e),this.argb=e}inViewingConditions(t){let n=k.fromInt(this.toInt()).xyzInViewingConditions(t),r=k.fromXyzInViewingConditions(n[0],n[1],n[2],O.make());return e.from(r.hue,r.chroma,C(n[1]))}},te=class e{static harmonize(e,t){let n=j.fromInt(e),r=j.fromInt(t),i=c(n.hue,r.hue),a=Math.min(i*.5,15),l=o(n.hue+a*s(n.hue,r.hue));return j.from(l,n.chroma,n.tone).toInt()}static hctHue(t,n,r){let i=e.cam16Ucs(t,n,r),a=k.fromInt(i),o=k.fromInt(t);return j.from(a.hue,o.chroma,x(t)).toInt()}static cam16Ucs(e,t,n){let r=k.fromInt(e),i=k.fromInt(t),a=r.jstar,o=r.astar,s=r.bstar,c=i.jstar,l=i.astar,u=i.bstar,d=a+(c-a)*n,f=o+(l-o)*n,p=s+(u-s)*n;return k.fromUcs(d,f,p).toInt()}},M=class e{static ratioOfTones(t,n){return t=i(0,100,t),n=i(0,100,n),e.ratioOfYs(S(t),S(n))}static ratioOfYs(e,t){let n=e>t?e:t,r=n===t?e:t;return(n+5)/(r+5)}static lighter(t,n){if(t<0||t>100)return-1;let r=S(t),i=n*(r+5)-5,a=e.ratioOfYs(i,r),o=Math.abs(a-n);if(a<n&&o>.04)return-1;let s=C(i)+.4;return s<0||s>100?-1:s}static darker(t,n){if(t<0||t>100)return-1;let r=S(t),i=(r+5)/n-5,a=e.ratioOfYs(r,i),o=Math.abs(a-n);if(a<n&&o>.04)return-1;let s=C(i)-.4;return s<0||s>100?-1:s}static lighterUnsafe(t,n){let r=e.lighter(t,n);return r<0?100:r}static darkerUnsafe(t,n){let r=e.darker(t,n);return r<0?0:r}},ne=class e{static isDisliked(e){let t=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,n=Math.round(e.chroma)>16,r=Math.round(e.tone)<65;return t&&n&&r}static fixIfDisliked(t){return e.isDisliked(t)?j.from(t.hue,t.chroma,70):t}},N=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(e,t,n,r,i,a,o,s){if(this.name=e,this.palette=t,this.tone=n,this.isBackground=r,this.background=i,this.secondBackground=a,this.contrastCurve=o,this.toneDeltaPair=s,this.hctCache=new Map,!i&&a)throw Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!i&&o)throw Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(i&&!o)throw Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(e){return this.getHct(e).toInt()}getHct(e){let t=this.hctCache.get(e);if(t!=null)return t;let n=this.getTone(e),r=this.palette(e).getHct(n);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,r),r}getTone(t){let n=t.contrastLevel<0;if(this.toneDeltaPair){let r=this.toneDeltaPair(t),a=r.roleA,o=r.roleB,s=r.delta,c=r.polarity,l=r.stayTogether,u=this.background(t).getTone(t),d=c===`nearer`||c===`lighter`&&!t.isDark||c===`darker`&&t.isDark,f=d?a:o,p=d?o:a,m=this.name===f.name,h=t.isDark?1:-1,g=f.contrastCurve.get(t.contrastLevel),_=p.contrastCurve.get(t.contrastLevel),v=f.tone(t),y=M.ratioOfTones(u,v)>=g?v:e.foregroundTone(u,g),b=p.tone(t),x=M.ratioOfTones(u,b)>=_?b:e.foregroundTone(u,_);return n&&(y=e.foregroundTone(u,g),x=e.foregroundTone(u,_)),(x-y)*h>=s||(x=i(0,100,y+s*h),(x-y)*h>=s||(y=i(0,100,x-s*h))),50<=y&&y<60?h>0?(y=60,x=Math.max(x,y+s*h)):(y=49,x=Math.min(x,y+s*h)):50<=x&&x<60&&(l?h>0?(y=60,x=Math.max(x,y+s*h)):(y=49,x=Math.min(x,y+s*h)):x=h>0?60:49),m?y:x}else{let r=this.tone(t);if(this.background==null)return r;let i=this.background(t).getTone(t),a=this.contrastCurve.get(t.contrastLevel);if(M.ratioOfTones(i,r)>=a||(r=e.foregroundTone(i,a)),n&&(r=e.foregroundTone(i,a)),this.isBackground&&50<=r&&r<60&&(r=M.ratioOfTones(49,i)>=a?49:60),this.secondBackground){let[n,i]=[this.background,this.secondBackground],[o,s]=[n(t).getTone(t),i(t).getTone(t)],[c,l]=[Math.max(o,s),Math.min(o,s)];if(M.ratioOfTones(c,r)>=a&&M.ratioOfTones(l,r)>=a)return r;let u=M.lighter(c,a),d=M.darker(l,a),f=[];return u!==-1&&f.push(u),d!==-1&&f.push(d),e.tonePrefersLightForeground(o)||e.tonePrefersLightForeground(s)?u<0?100:u:f.length===1?f[0]:d<0?0:d}return r}}static foregroundTone(t,n){let r=M.lighterUnsafe(t,n),i=M.darkerUnsafe(t,n),a=M.ratioOfTones(r,t),o=M.ratioOfTones(i,t);if(e.tonePrefersLightForeground(t)){let e=Math.abs(a-o)<.1&&a<n&&o<n;return a>=n||a>=o||e?r:i}else return o>=n||o>=a?i:r}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(t){return e.tonePrefersLightForeground(t)&&!e.toneAllowsLightForeground(t)?49:t}},P=class e{static fromInt(t){let n=j.fromInt(t);return e.fromHct(n)}static fromHct(t){return new e(t.hue,t.chroma,t)}static fromHueAndChroma(t,n){return new e(t,n,new re(t,n).create())}constructor(e,t,n){this.hue=e,this.chroma=t,this.keyColor=n,this.cache=new Map}tone(e){let t=this.cache.get(e);return t===void 0&&(t=j.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,t)),t}getHct(e){return j.fromInt(this.tone(e))}},re=class{constructor(e,t){this.hue=e,this.requestedChroma=t,this.chromaCache=new Map,this.maxChromaValue=200}create(){let e=0,t=100;for(;e<t;){let n=Math.floor((e+t)/2),r=this.maxChroma(n)<this.maxChroma(n+1);if(this.maxChroma(n)>=this.requestedChroma-.01)if(Math.abs(e-50)<Math.abs(t-50))t=n;else{if(e===n)return j.from(this.hue,this.requestedChroma,e);e=n}else r?e=n+1:t=n}return j.from(this.hue,this.requestedChroma,e)}maxChroma(e){if(this.chromaCache.has(e))return this.chromaCache.get(e);let t=j.from(this.hue,this.maxChromaValue,e).chroma;return this.chromaCache.set(e,t),t}},F=class{constructor(e,t,n,r){this.low=e,this.normal=t,this.medium=n,this.high=r}get(e){return e<=-1?this.low:e<0?n(this.low,this.normal,(e- -1)/1):e<.5?n(this.normal,this.medium,(e-0)/.5):e<1?n(this.medium,this.high,(e-.5)/.5):this.high}},I=class{constructor(e,t,n,r,i){this.roleA=e,this.roleB=t,this.delta=n,this.polarity=r,this.stayTogether=i}},ie;(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`})(ie||={});function ae(e){return e.variant===ie.FIDELITY||e.variant===ie.CONTENT}function L(e){return e.variant===ie.MONOCHROME}function oe(e,t,n,r){let i=n,a=j.from(e,t,n);if(a.chroma<t){let n=a.chroma;for(;a.chroma<t;){i+=r?-1:1;let o=j.from(e,t,i);if(n>o.chroma||Math.abs(o.chroma-t)<.4)break;Math.abs(o.chroma-t)<Math.abs(a.chroma-t)&&(a=o),n=Math.max(n,o.chroma)}}return i}var R=class e{static highestSurface(t){return t.isDark?e.surfaceBright:e.surfaceDim}};R.contentAccentToneDelta=15,R.primaryPaletteKeyColor=N.fromPalette({name:`primary_palette_key_color`,palette:e=>e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone}),R.secondaryPaletteKeyColor=N.fromPalette({name:`secondary_palette_key_color`,palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone}),R.tertiaryPaletteKeyColor=N.fromPalette({name:`tertiary_palette_key_color`,palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone}),R.neutralPaletteKeyColor=N.fromPalette({name:`neutral_palette_key_color`,palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone}),R.neutralVariantPaletteKeyColor=N.fromPalette({name:`neutral_variant_palette_key_color`,palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone}),R.background=N.fromPalette({name:`background`,palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),R.onBackground=N.fromPalette({name:`on_background`,palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>R.background,contrastCurve:new F(3,3,4.5,7)}),R.surface=N.fromPalette({name:`surface`,palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),R.surfaceDim=N.fromPalette({name:`surface_dim`,palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new F(87,87,80,75).get(e.contrastLevel),isBackground:!0}),R.surfaceBright=N.fromPalette({name:`surface_bright`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new F(24,24,29,34).get(e.contrastLevel):98,isBackground:!0}),R.surfaceContainerLowest=N.fromPalette({name:`surface_container_lowest`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new F(4,4,2,0).get(e.contrastLevel):100,isBackground:!0}),R.surfaceContainerLow=N.fromPalette({name:`surface_container_low`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new F(10,10,11,12).get(e.contrastLevel):new F(96,96,96,95).get(e.contrastLevel),isBackground:!0}),R.surfaceContainer=N.fromPalette({name:`surface_container`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new F(12,12,16,20).get(e.contrastLevel):new F(94,94,92,90).get(e.contrastLevel),isBackground:!0}),R.surfaceContainerHigh=N.fromPalette({name:`surface_container_high`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new F(17,17,21,25).get(e.contrastLevel):new F(92,92,88,85).get(e.contrastLevel),isBackground:!0}),R.surfaceContainerHighest=N.fromPalette({name:`surface_container_highest`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new F(22,22,26,30).get(e.contrastLevel):new F(90,90,84,80).get(e.contrastLevel),isBackground:!0}),R.onSurface=N.fromPalette({name:`on_surface`,palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>R.highestSurface(e),contrastCurve:new F(4.5,7,11,21)}),R.surfaceVariant=N.fromPalette({name:`surface_variant`,palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0}),R.onSurfaceVariant=N.fromPalette({name:`on_surface_variant`,palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>R.highestSurface(e),contrastCurve:new F(3,4.5,7,11)}),R.inverseSurface=N.fromPalette({name:`inverse_surface`,palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20}),R.inverseOnSurface=N.fromPalette({name:`inverse_on_surface`,palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>R.inverseSurface,contrastCurve:new F(4.5,7,11,21)}),R.outline=N.fromPalette({name:`outline`,palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>R.highestSurface(e),contrastCurve:new F(1.5,3,4.5,7)}),R.outlineVariant=N.fromPalette({name:`outline_variant`,palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5)}),R.shadow=N.fromPalette({name:`shadow`,palette:e=>e.neutralPalette,tone:e=>0}),R.scrim=N.fromPalette({name:`scrim`,palette:e=>e.neutralPalette,tone:e=>0}),R.surfaceTint=N.fromPalette({name:`surface_tint`,palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0}),R.primary=N.fromPalette({name:`primary`,palette:e=>e.primaryPalette,tone:e=>L(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(3,4.5,7,7),toneDeltaPair:e=>new I(R.primaryContainer,R.primary,10,`nearer`,!1)}),R.onPrimary=N.fromPalette({name:`on_primary`,palette:e=>e.primaryPalette,tone:e=>L(e)?e.isDark?10:90:e.isDark?20:100,background:e=>R.primary,contrastCurve:new F(4.5,7,11,21)}),R.primaryContainer=N.fromPalette({name:`primary_container`,palette:e=>e.primaryPalette,tone:e=>ae(e)?e.sourceColorHct.tone:L(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5),toneDeltaPair:e=>new I(R.primaryContainer,R.primary,10,`nearer`,!1)}),R.onPrimaryContainer=N.fromPalette({name:`on_primary_container`,palette:e=>e.primaryPalette,tone:e=>ae(e)?N.foregroundTone(R.primaryContainer.tone(e),4.5):L(e)?e.isDark?0:100:e.isDark?90:30,background:e=>R.primaryContainer,contrastCurve:new F(3,4.5,7,11)}),R.inversePrimary=N.fromPalette({name:`inverse_primary`,palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>R.inverseSurface,contrastCurve:new F(3,4.5,7,7)}),R.secondary=N.fromPalette({name:`secondary`,palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(3,4.5,7,7),toneDeltaPair:e=>new I(R.secondaryContainer,R.secondary,10,`nearer`,!1)}),R.onSecondary=N.fromPalette({name:`on_secondary`,palette:e=>e.secondaryPalette,tone:e=>L(e)?e.isDark?10:100:e.isDark?20:100,background:e=>R.secondary,contrastCurve:new F(4.5,7,11,21)}),R.secondaryContainer=N.fromPalette({name:`secondary_container`,palette:e=>e.secondaryPalette,tone:e=>{let t=e.isDark?30:90;return L(e)?e.isDark?30:85:ae(e)?oe(e.secondaryPalette.hue,e.secondaryPalette.chroma,t,!e.isDark):t},isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5),toneDeltaPair:e=>new I(R.secondaryContainer,R.secondary,10,`nearer`,!1)}),R.onSecondaryContainer=N.fromPalette({name:`on_secondary_container`,palette:e=>e.secondaryPalette,tone:e=>L(e)?e.isDark?90:10:ae(e)?N.foregroundTone(R.secondaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>R.secondaryContainer,contrastCurve:new F(3,4.5,7,11)}),R.tertiary=N.fromPalette({name:`tertiary`,palette:e=>e.tertiaryPalette,tone:e=>L(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(3,4.5,7,7),toneDeltaPair:e=>new I(R.tertiaryContainer,R.tertiary,10,`nearer`,!1)}),R.onTertiary=N.fromPalette({name:`on_tertiary`,palette:e=>e.tertiaryPalette,tone:e=>L(e)?e.isDark?10:90:e.isDark?20:100,background:e=>R.tertiary,contrastCurve:new F(4.5,7,11,21)}),R.tertiaryContainer=N.fromPalette({name:`tertiary_container`,palette:e=>e.tertiaryPalette,tone:e=>{if(L(e))return e.isDark?60:49;if(!ae(e))return e.isDark?30:90;let t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return ne.fixIfDisliked(t).tone},isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5),toneDeltaPair:e=>new I(R.tertiaryContainer,R.tertiary,10,`nearer`,!1)}),R.onTertiaryContainer=N.fromPalette({name:`on_tertiary_container`,palette:e=>e.tertiaryPalette,tone:e=>L(e)?e.isDark?0:100:ae(e)?N.foregroundTone(R.tertiaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>R.tertiaryContainer,contrastCurve:new F(3,4.5,7,11)}),R.error=N.fromPalette({name:`error`,palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(3,4.5,7,7),toneDeltaPair:e=>new I(R.errorContainer,R.error,10,`nearer`,!1)}),R.onError=N.fromPalette({name:`on_error`,palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>R.error,contrastCurve:new F(4.5,7,11,21)}),R.errorContainer=N.fromPalette({name:`error_container`,palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5),toneDeltaPair:e=>new I(R.errorContainer,R.error,10,`nearer`,!1)}),R.onErrorContainer=N.fromPalette({name:`on_error_container`,palette:e=>e.errorPalette,tone:e=>L(e)?e.isDark?90:10:e.isDark?90:30,background:e=>R.errorContainer,contrastCurve:new F(3,4.5,7,11)}),R.primaryFixed=N.fromPalette({name:`primary_fixed`,palette:e=>e.primaryPalette,tone:e=>L(e)?40:90,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5),toneDeltaPair:e=>new I(R.primaryFixed,R.primaryFixedDim,10,`lighter`,!0)}),R.primaryFixedDim=N.fromPalette({name:`primary_fixed_dim`,palette:e=>e.primaryPalette,tone:e=>L(e)?30:80,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5),toneDeltaPair:e=>new I(R.primaryFixed,R.primaryFixedDim,10,`lighter`,!0)}),R.onPrimaryFixed=N.fromPalette({name:`on_primary_fixed`,palette:e=>e.primaryPalette,tone:e=>L(e)?100:10,background:e=>R.primaryFixedDim,secondBackground:e=>R.primaryFixed,contrastCurve:new F(4.5,7,11,21)}),R.onPrimaryFixedVariant=N.fromPalette({name:`on_primary_fixed_variant`,palette:e=>e.primaryPalette,tone:e=>L(e)?90:30,background:e=>R.primaryFixedDim,secondBackground:e=>R.primaryFixed,contrastCurve:new F(3,4.5,7,11)}),R.secondaryFixed=N.fromPalette({name:`secondary_fixed`,palette:e=>e.secondaryPalette,tone:e=>L(e)?80:90,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5),toneDeltaPair:e=>new I(R.secondaryFixed,R.secondaryFixedDim,10,`lighter`,!0)}),R.secondaryFixedDim=N.fromPalette({name:`secondary_fixed_dim`,palette:e=>e.secondaryPalette,tone:e=>L(e)?70:80,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5),toneDeltaPair:e=>new I(R.secondaryFixed,R.secondaryFixedDim,10,`lighter`,!0)}),R.onSecondaryFixed=N.fromPalette({name:`on_secondary_fixed`,palette:e=>e.secondaryPalette,tone:e=>10,background:e=>R.secondaryFixedDim,secondBackground:e=>R.secondaryFixed,contrastCurve:new F(4.5,7,11,21)}),R.onSecondaryFixedVariant=N.fromPalette({name:`on_secondary_fixed_variant`,palette:e=>e.secondaryPalette,tone:e=>L(e)?25:30,background:e=>R.secondaryFixedDim,secondBackground:e=>R.secondaryFixed,contrastCurve:new F(3,4.5,7,11)}),R.tertiaryFixed=N.fromPalette({name:`tertiary_fixed`,palette:e=>e.tertiaryPalette,tone:e=>L(e)?40:90,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5),toneDeltaPair:e=>new I(R.tertiaryFixed,R.tertiaryFixedDim,10,`lighter`,!0)}),R.tertiaryFixedDim=N.fromPalette({name:`tertiary_fixed_dim`,palette:e=>e.tertiaryPalette,tone:e=>L(e)?30:80,isBackground:!0,background:e=>R.highestSurface(e),contrastCurve:new F(1,1,3,4.5),toneDeltaPair:e=>new I(R.tertiaryFixed,R.tertiaryFixedDim,10,`lighter`,!0)}),R.onTertiaryFixed=N.fromPalette({name:`on_tertiary_fixed`,palette:e=>e.tertiaryPalette,tone:e=>L(e)?100:10,background:e=>R.tertiaryFixedDim,secondBackground:e=>R.tertiaryFixed,contrastCurve:new F(4.5,7,11,21)}),R.onTertiaryFixedVariant=N.fromPalette({name:`on_tertiary_fixed_variant`,palette:e=>e.tertiaryPalette,tone:e=>L(e)?90:30,background:e=>R.tertiaryFixedDim,secondBackground:e=>R.tertiaryFixed,contrastCurve:new F(3,4.5,7,11)});var se=class{constructor(e){this.sourceColorArgb=e.sourceColorArgb,this.variant=e.variant,this.contrastLevel=e.contrastLevel,this.isDark=e.isDark,this.sourceColorHct=j.fromInt(e.sourceColorArgb),this.primaryPalette=e.primaryPalette,this.secondaryPalette=e.secondaryPalette,this.tertiaryPalette=e.tertiaryPalette,this.neutralPalette=e.neutralPalette,this.neutralVariantPalette=e.neutralVariantPalette,this.errorPalette=P.fromHueAndChroma(25,84)}static getRotatedHue(e,t,n){let r=e.hue;if(t.length!==n.length)throw Error(`mismatch between hue length ${t.length} & rotations ${n.length}`);if(n.length===1)return o(e.hue+n[0]);let i=t.length;for(let e=0;e<=i-2;e++){let i=t[e],a=t[e+1];if(i<r&&r<a)return o(r+n[e])}return r}getArgb(e){return e.getArgb(this)}getHct(e){return e.getHct(this)}get primaryPaletteKeyColor(){return this.getArgb(R.primaryPaletteKeyColor)}get secondaryPaletteKeyColor(){return this.getArgb(R.secondaryPaletteKeyColor)}get tertiaryPaletteKeyColor(){return this.getArgb(R.tertiaryPaletteKeyColor)}get neutralPaletteKeyColor(){return this.getArgb(R.neutralPaletteKeyColor)}get neutralVariantPaletteKeyColor(){return this.getArgb(R.neutralVariantPaletteKeyColor)}get background(){return this.getArgb(R.background)}get onBackground(){return this.getArgb(R.onBackground)}get surface(){return this.getArgb(R.surface)}get surfaceDim(){return this.getArgb(R.surfaceDim)}get surfaceBright(){return this.getArgb(R.surfaceBright)}get surfaceContainerLowest(){return this.getArgb(R.surfaceContainerLowest)}get surfaceContainerLow(){return this.getArgb(R.surfaceContainerLow)}get surfaceContainer(){return this.getArgb(R.surfaceContainer)}get surfaceContainerHigh(){return this.getArgb(R.surfaceContainerHigh)}get surfaceContainerHighest(){return this.getArgb(R.surfaceContainerHighest)}get onSurface(){return this.getArgb(R.onSurface)}get surfaceVariant(){return this.getArgb(R.surfaceVariant)}get onSurfaceVariant(){return this.getArgb(R.onSurfaceVariant)}get inverseSurface(){return this.getArgb(R.inverseSurface)}get inverseOnSurface(){return this.getArgb(R.inverseOnSurface)}get outline(){return this.getArgb(R.outline)}get outlineVariant(){return this.getArgb(R.outlineVariant)}get shadow(){return this.getArgb(R.shadow)}get scrim(){return this.getArgb(R.scrim)}get surfaceTint(){return this.getArgb(R.surfaceTint)}get primary(){return this.getArgb(R.primary)}get onPrimary(){return this.getArgb(R.onPrimary)}get primaryContainer(){return this.getArgb(R.primaryContainer)}get onPrimaryContainer(){return this.getArgb(R.onPrimaryContainer)}get inversePrimary(){return this.getArgb(R.inversePrimary)}get secondary(){return this.getArgb(R.secondary)}get onSecondary(){return this.getArgb(R.onSecondary)}get secondaryContainer(){return this.getArgb(R.secondaryContainer)}get onSecondaryContainer(){return this.getArgb(R.onSecondaryContainer)}get tertiary(){return this.getArgb(R.tertiary)}get onTertiary(){return this.getArgb(R.onTertiary)}get tertiaryContainer(){return this.getArgb(R.tertiaryContainer)}get onTertiaryContainer(){return this.getArgb(R.onTertiaryContainer)}get error(){return this.getArgb(R.error)}get onError(){return this.getArgb(R.onError)}get errorContainer(){return this.getArgb(R.errorContainer)}get onErrorContainer(){return this.getArgb(R.onErrorContainer)}get primaryFixed(){return this.getArgb(R.primaryFixed)}get primaryFixedDim(){return this.getArgb(R.primaryFixedDim)}get onPrimaryFixed(){return this.getArgb(R.onPrimaryFixed)}get onPrimaryFixedVariant(){return this.getArgb(R.onPrimaryFixedVariant)}get secondaryFixed(){return this.getArgb(R.secondaryFixed)}get secondaryFixedDim(){return this.getArgb(R.secondaryFixedDim)}get onSecondaryFixed(){return this.getArgb(R.onSecondaryFixed)}get onSecondaryFixedVariant(){return this.getArgb(R.onSecondaryFixedVariant)}get tertiaryFixed(){return this.getArgb(R.tertiaryFixed)}get tertiaryFixedDim(){return this.getArgb(R.tertiaryFixedDim)}get onTertiaryFixed(){return this.getArgb(R.onTertiaryFixed)}get onTertiaryFixedVariant(){return this.getArgb(R.onTertiaryFixedVariant)}},ce=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,n){let r=new e(n.primary,t);return n.secondary&&(r.a2=new e(n.secondary,t).a1),n.tertiary&&(r.a3=new e(n.tertiary,t).a1),n.error&&(r.error=new e(n.error,t).a1),n.neutral&&(r.n1=new e(n.neutral,t).n1),n.neutralVariant&&(r.n2=new e(n.neutralVariant,t).n2),r}constructor(e,t){let n=j.fromInt(e),r=n.hue,i=n.chroma;t?(this.a1=P.fromHueAndChroma(r,i),this.a2=P.fromHueAndChroma(r,i/3),this.a3=P.fromHueAndChroma(r+60,i/2),this.n1=P.fromHueAndChroma(r,Math.min(i/12,4)),this.n2=P.fromHueAndChroma(r,Math.min(i/6,8))):(this.a1=P.fromHueAndChroma(r,Math.max(48,i)),this.a2=P.fromHueAndChroma(r,16),this.a3=P.fromHueAndChroma(r+60,24),this.n1=P.fromHueAndChroma(r,4),this.n2=P.fromHueAndChroma(r,8)),this.error=P.fromHueAndChroma(25,84)}},le=class e extends se{constructor(t,n,r){super({sourceColorArgb:t.toInt(),variant:ie.EXPRESSIVE,contrastLevel:r,isDark:n,primaryPalette:P.fromHueAndChroma(o(t.hue+240),40),secondaryPalette:P.fromHueAndChroma(se.getRotatedHue(t,e.hues,e.secondaryRotations),24),tertiaryPalette:P.fromHueAndChroma(se.getRotatedHue(t,e.hues,e.tertiaryRotations),32),neutralPalette:P.fromHueAndChroma(t.hue+15,8),neutralVariantPalette:P.fromHueAndChroma(t.hue+15,12)})}};le.hues=[0,21,51,121,151,191,271,321,360],le.secondaryRotations=[45,95,45,20,45,90,45,45,45],le.tertiaryRotations=[120,120,20,45,20,15,20,120,120];var ue=class e extends se{constructor(t,n,r){super({sourceColorArgb:t.toInt(),variant:ie.VIBRANT,contrastLevel:r,isDark:n,primaryPalette:P.fromHueAndChroma(t.hue,200),secondaryPalette:P.fromHueAndChroma(se.getRotatedHue(t,e.hues,e.secondaryRotations),24),tertiaryPalette:P.fromHueAndChroma(se.getRotatedHue(t,e.hues,e.tertiaryRotations),32),neutralPalette:P.fromHueAndChroma(t.hue,10),neutralVariantPalette:P.fromHueAndChroma(t.hue,12)})}};ue.hues=[0,41,61,101,131,181,251,301,360],ue.secondaryRotations=[18,15,10,12,15,18,15,12,12],ue.tertiaryRotations=[35,30,20,25,30,35,30,25,25];var de={desired:4,fallbackColorARGB:4282549748,filter:!0};function fe(e,t){return e.score>t.score?-1:+(e.score<t.score)}var pe=class e{constructor(){}static score(t,n){let{desired:r,fallbackColorARGB:i,filter:o}={...de,...n},s=[],l=Array(360).fill(0),u=0;for(let[e,n]of t.entries()){let t=j.fromInt(e);s.push(t);let r=Math.floor(t.hue);l[r]+=n,u+=n}let d=Array(360).fill(0);for(let e=0;e<360;e++){let t=l[e]/u;for(let n=e-14;n<e+16;n++){let e=a(n);d[e]+=t}}let f=[];for(let t of s){let n=d[a(Math.round(t.hue))];if(o&&(t.chroma<e.CUTOFF_CHROMA||n<=e.CUTOFF_EXCITED_PROPORTION))continue;let r=n*100*e.WEIGHT_PROPORTION,i=t.chroma<e.TARGET_CHROMA?e.WEIGHT_CHROMA_BELOW:e.WEIGHT_CHROMA_ABOVE,s=r+(t.chroma-e.TARGET_CHROMA)*i;f.push({hct:t,score:s})}f.sort(fe);let p=[];for(let e=90;e>=15;e--){p.length=0;for(let{hct:t}of f)if(p.find(n=>c(t.hue,n.hue)<e)||p.push(t),p.length>=r)break;if(p.length>=r)break}let m=[];p.length===0&&m.push(i);for(let e of p)m.push(e.toInt());return m}};pe.TARGET_CHROMA=48,pe.WEIGHT_PROPORTION=.7,pe.WEIGHT_CHROMA_ABOVE=.3,pe.WEIGHT_CHROMA_BELOW=.1,pe.CUTOFF_CHROMA=5,pe.CUTOFF_EXCITED_PROPORTION=.01;function me(e){let t=h(e),n=g(e),r=_(e),i=[t.toString(16),n.toString(16),r.toString(16)];for(let[e,t]of i.entries())t.length===1&&(i[e]=`0`+t);return`#`+i.join(``)}function he(e){e=e.replace(`#`,``);let t=e.length===3,n=e.length===6,r=e.length===8;if(!t&&!n&&!r)throw Error(`unexpected hex `+e);let i=0,a=0,o=0;return t?(i=ge(e.slice(0,1).repeat(2)),a=ge(e.slice(1,2).repeat(2)),o=ge(e.slice(2,3).repeat(2))):n?(i=ge(e.slice(0,2)),a=ge(e.slice(2,4)),o=ge(e.slice(4,6))):r&&(i=ge(e.slice(2,4)),a=ge(e.slice(4,6)),o=ge(e.slice(6,8))),(255<<24|(i&255)<<16|(a&255)<<8|o&255)>>>0}function ge(e){return parseInt(e,16)}function _e(e,t){let n=t.value,r=n,i=e;t.blend&&(n=te.harmonize(r,i));let a=ce.of(n).a1;return{color:t,value:n,light:{color:a.tone(40),onColor:a.tone(100),colorContainer:a.tone(90),onColorContainer:a.tone(10)},dark:{color:a.tone(80),onColor:a.tone(20),colorContainer:a.tone(30),onColorContainer:a.tone(90)}}}function z(e){return e<0?-1:e===0?0:1}function ve(e,t,n){return(1-n)*e+n*t}function ye(e,t,n){return n<e?e:n>t?t:n}function be(e,t,n){return n<e?e:n>t?t:n}function xe(e){return e%=360,e<0&&(e+=360),e}function Se(e){return e%=360,e<0&&(e+=360),e}function Ce(e,t){return Se(t-e)<=180?1:-1}function we(e,t){return 180-Math.abs(Math.abs(e-t)-180)}function Te(e,t){return[e[0]*t[0][0]+e[1]*t[0][1]+e[2]*t[0][2],e[0]*t[1][0]+e[1]*t[1][1]+e[2]*t[1][2],e[0]*t[2][0]+e[1]*t[2][1]+e[2]*t[2][2]]}var Ee=[[.41233895,.35762064,.18051042],[.2126,.7152,.0722],[.01932141,.11916382,.95034478]],De=[[3.2413774792388685,-1.5376652402851851,-.49885366846268053],[-.9691452513005321,1.8758853451067872,.04156585616912061],[.05562093689691305,-.20395524564742123,1.0571799111220335]],Oe=[95.047,100,108.883];function ke(e,t,n){return(255<<24|(e&255)<<16|(t&255)<<8|n&255)>>>0}function Ae(e){return ke(We(e[0]),We(e[1]),We(e[2]))}function je(e){return e>>24&255}function Me(e){return e>>16&255}function Ne(e){return e>>8&255}function Pe(e){return e&255}function Fe(e,t,n){let r=De,i=r[0][0]*e+r[0][1]*t+r[0][2]*n,a=r[1][0]*e+r[1][1]*t+r[1][2]*n,o=r[2][0]*e+r[2][1]*t+r[2][2]*n;return ke(We(i),We(a),We(o))}function Ie(e){return Te([Ue(Me(e)),Ue(Ne(e)),Ue(Pe(e))],Ee)}function Le(e,t,n){let r=Oe,i=(e+16)/116,a=t/500+i,o=i-n/200,s=qe(a),c=qe(i),l=qe(o);return Fe(s*r[0],c*r[1],l*r[2])}function Re(e){let t=Ue(Me(e)),n=Ue(Ne(e)),r=Ue(Pe(e)),i=Ee,a=i[0][0]*t+i[0][1]*n+i[0][2]*r,o=i[1][0]*t+i[1][1]*n+i[1][2]*r,s=i[2][0]*t+i[2][1]*n+i[2][2]*r,c=Oe,l=a/c[0],u=o/c[1],d=s/c[2],f=Ke(l),p=Ke(u),m=Ke(d);return[116*p-16,500*(f-p),200*(p-m)]}function ze(e){let t=We(Ve(e));return ke(t,t,t)}function Be(e){let t=Ie(e)[1];return 116*Ke(t/100)-16}function Ve(e){return 100*qe((e+16)/116)}function He(e){return Ke(e/100)*116-16}function Ue(e){let t=e/255;return t<=.040449936?t/12.92*100:((t+.055)/1.055)**2.4*100}function We(e){let t=e/100,n=0;return n=t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055,ye(0,255,Math.round(n*255))}function Ge(){return Oe}function Ke(e){return e>.008856451679035631?e**(1/3):(24389/27*e+16)/116}function qe(e){let t=e*e*e;return t>.008856451679035631?t:(116*e-16)/903.2962962962963}var Je=class e{static make(t=Ge(),n=200/Math.PI*Ve(50)/100,r=50,i=2,a=!1){let o=t,s=o[0]*.401288+o[1]*.650173+o[2]*-.051461,c=o[0]*-.250268+o[1]*1.204414+o[2]*.045854,l=o[0]*-.002079+o[1]*.048952+o[2]*.953127,u=.8+i/10,d=u>=.9?ve(.59,.69,(u-.9)*10):ve(.525,.59,(u-.8)*10),f=a?1:u*(1-1/3.6*Math.exp((-n-42)/92));f=f>1?1:f<0?0:f;let p=u,m=[100/s*f+1-f,100/c*f+1-f,100/l*f+1-f],h=1/(5*n+1),g=h*h*h*h,_=1-g,v=g*n+.1*_*_*Math.cbrt(5*n),y=Ve(r)/t[1],b=1.48+Math.sqrt(y),x=.725/y**.2,S=x,C=[(v*m[0]*s/100)**.42,(v*m[1]*c/100)**.42,(v*m[2]*l/100)**.42],w=[400*C[0]/(C[0]+27.13),400*C[1]/(C[1]+27.13),400*C[2]/(C[2]+27.13)];return new e(y,(2*w[0]+w[1]+.05*w[2])*x,x,S,d,p,m,v,v**.25,b)}constructor(e,t,n,r,i,a,o,s,c,l){this.n=e,this.aw=t,this.nbb=n,this.ncb=r,this.c=i,this.nc=a,this.rgbD=o,this.fl=s,this.fLRoot=c,this.z=l}};Je.DEFAULT=Je.make();var B=class e{constructor(e,t,n,r,i,a,o,s,c){this.hue=e,this.chroma=t,this.j=n,this.q=r,this.m=i,this.s=a,this.jstar=o,this.astar=s,this.bstar=c}distance(e){let t=this.jstar-e.jstar,n=this.astar-e.astar,r=this.bstar-e.bstar;return 1.41*Math.sqrt(t*t+n*n+r*r)**.63}static fromInt(t){return e.fromIntInViewingConditions(t,Je.DEFAULT)}static fromIntInViewingConditions(t,n){let r=(t&16711680)>>16,i=(t&65280)>>8,a=t&255,o=Ue(r),s=Ue(i),c=Ue(a),l=.41233895*o+.35762064*s+.18051042*c,u=.2126*o+.7152*s+.0722*c,d=.01932141*o+.11916382*s+.95034478*c,f=.401288*l+.650173*u-.051461*d,p=-.250268*l+1.204414*u+.045854*d,m=-.002079*l+.048952*u+.953127*d,h=n.rgbD[0]*f,g=n.rgbD[1]*p,_=n.rgbD[2]*m,v=(n.fl*Math.abs(h)/100)**.42,y=(n.fl*Math.abs(g)/100)**.42,b=(n.fl*Math.abs(_)/100)**.42,x=z(h)*400*v/(v+27.13),S=z(g)*400*y/(y+27.13),C=z(_)*400*b/(b+27.13),w=(11*x+-12*S+C)/11,T=(x+S-2*C)/9,ee=(20*x+20*S+21*C)/20,E=(40*x+20*S+C)/20,D=Math.atan2(T,w)*180/Math.PI,O=D<0?D+360:D>=360?D-360:D,k=O*Math.PI/180,A=100*(E*n.nbb/n.aw)**+(n.c*n.z),j=4/n.c*Math.sqrt(A/100)*(n.aw+4)*n.fLRoot,te=O<20.14?O+360:O,M=(5e4/13*(.25*(Math.cos(te*Math.PI/180+2)+3.8))*n.nc*n.ncb*Math.sqrt(w*w+T*T)/(ee+.305))**.9*(1.64-.29**n.n)**.73,ne=M*Math.sqrt(A/100),N=ne*n.fLRoot,P=50*Math.sqrt(M*n.c/(n.aw+4)),re=1.7000000000000002*A/(1+.007*A),F=1/.0228*Math.log(1+.0228*N);return new e(O,ne,A,j,N,P,re,F*Math.cos(k),F*Math.sin(k))}static fromJch(t,n,r){return e.fromJchInViewingConditions(t,n,r,Je.DEFAULT)}static fromJchInViewingConditions(t,n,r,i){let a=4/i.c*Math.sqrt(t/100)*(i.aw+4)*i.fLRoot,o=n*i.fLRoot,s=n/Math.sqrt(t/100),c=50*Math.sqrt(s*i.c/(i.aw+4)),l=r*Math.PI/180,u=1.7000000000000002*t/(1+.007*t),d=1/.0228*Math.log(1+.0228*o);return new e(r,n,t,a,o,c,u,d*Math.cos(l),d*Math.sin(l))}static fromUcs(t,n,r){return e.fromUcsInViewingConditions(t,n,r,Je.DEFAULT)}static fromUcsInViewingConditions(t,n,r,i){let a=n,o=r,s=Math.sqrt(a*a+o*o),c=(Math.exp(s*.0228)-1)/.0228/i.fLRoot,l=180/Math.PI*Math.atan2(o,a);l<0&&(l+=360);let u=t/(1-(t-100)*.007);return e.fromJchInViewingConditions(u,c,l,i)}toInt(){return this.viewed(Je.DEFAULT)}viewed(e){let t=((this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100))/(1.64-.29**e.n)**.73)**(1/.9),n=this.hue*Math.PI/180,r=.25*(Math.cos(n+2)+3.8),i=e.aw*(this.j/100)**(1/e.c/e.z),a=5e4/13*r*e.nc*e.ncb,o=i/e.nbb,s=Math.sin(n),c=Math.cos(n),l=23*(o+.305)*t/(23*a+11*t*c+108*t*s),u=l*c,d=l*s,f=(460*o+451*u+288*d)/1403,p=(460*o-891*u-261*d)/1403,m=(460*o-220*u-6300*d)/1403,h=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),g=z(f)*(100/e.fl)*h**(1/.42),_=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),v=z(p)*(100/e.fl)*_**(1/.42),y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),b=z(m)*(100/e.fl)*y**(1/.42),x=g/e.rgbD[0],S=v/e.rgbD[1],C=b/e.rgbD[2];return Fe(1.86206786*x-1.01125463*S+.14918677*C,.38752654*x+.62144744*S-.00897398*C,-.0158415*x-.03412294*S+1.04996444*C)}static fromXyzInViewingConditions(t,n,r,i){let a=.401288*t+.650173*n-.051461*r,o=-.250268*t+1.204414*n+.045854*r,s=-.002079*t+.048952*n+.953127*r,c=i.rgbD[0]*a,l=i.rgbD[1]*o,u=i.rgbD[2]*s,d=(i.fl*Math.abs(c)/100)**.42,f=(i.fl*Math.abs(l)/100)**.42,p=(i.fl*Math.abs(u)/100)**.42,m=z(c)*400*d/(d+27.13),h=z(l)*400*f/(f+27.13),g=z(u)*400*p/(p+27.13),_=(11*m+-12*h+g)/11,v=(m+h-2*g)/9,y=(20*m+20*h+21*g)/20,b=(40*m+20*h+g)/20,x=Math.atan2(v,_)*180/Math.PI,S=x<0?x+360:x>=360?x-360:x,C=S*Math.PI/180,w=100*(b*i.nbb/i.aw)**+(i.c*i.z),T=4/i.c*Math.sqrt(w/100)*(i.aw+4)*i.fLRoot,ee=S<20.14?S+360:S,E=(5e4/13*(1/4*(Math.cos(ee*Math.PI/180+2)+3.8))*i.nc*i.ncb*Math.sqrt(_*_+v*v)/(y+.305))**.9*(1.64-.29**i.n)**.73,D=E*Math.sqrt(w/100),O=D*i.fLRoot,k=50*Math.sqrt(E*i.c/(i.aw+4)),A=1.7000000000000002*w/(1+.007*w),j=Math.log(1+.0228*O)/.0228;return new e(S,D,w,T,O,k,A,j*Math.cos(C),j*Math.sin(C))}xyzInViewingConditions(e){let t=((this.chroma===0||this.j===0?0:this.chroma/Math.sqrt(this.j/100))/(1.64-.29**e.n)**.73)**(1/.9),n=this.hue*Math.PI/180,r=.25*(Math.cos(n+2)+3.8),i=e.aw*(this.j/100)**(1/e.c/e.z),a=5e4/13*r*e.nc*e.ncb,o=i/e.nbb,s=Math.sin(n),c=Math.cos(n),l=23*(o+.305)*t/(23*a+11*t*c+108*t*s),u=l*c,d=l*s,f=(460*o+451*u+288*d)/1403,p=(460*o-891*u-261*d)/1403,m=(460*o-220*u-6300*d)/1403,h=Math.max(0,27.13*Math.abs(f)/(400-Math.abs(f))),g=z(f)*(100/e.fl)*h**(1/.42),_=Math.max(0,27.13*Math.abs(p)/(400-Math.abs(p))),v=z(p)*(100/e.fl)*_**(1/.42),y=Math.max(0,27.13*Math.abs(m)/(400-Math.abs(m))),b=z(m)*(100/e.fl)*y**(1/.42),x=g/e.rgbD[0],S=v/e.rgbD[1],C=b/e.rgbD[2];return[1.86206786*x-1.01125463*S+.14918677*C,.38752654*x+.62144744*S-.00897398*C,-.0158415*x-.03412294*S+1.04996444*C]}},Ye=class e{static sanitizeRadians(e){return(e+Math.PI*8)%(Math.PI*2)}static trueDelinearized(e){let t=e/100,n=0;return n=t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055,n*255}static chromaticAdaptation(e){let t=Math.abs(e)**.42;return z(e)*400*t/(t+27.13)}static hueOf(t){let n=Te(t,e.SCALED_DISCOUNT_FROM_LINRGB),r=e.chromaticAdaptation(n[0]),i=e.chromaticAdaptation(n[1]),a=e.chromaticAdaptation(n[2]),o=(11*r+-12*i+a)/11,s=(r+i-2*a)/9;return Math.atan2(s,o)}static areInCyclicOrder(t,n,r){return e.sanitizeRadians(n-t)<e.sanitizeRadians(r-t)}static intercept(e,t,n){return(t-e)/(n-e)}static lerpPoint(e,t,n){return[e[0]+(n[0]-e[0])*t,e[1]+(n[1]-e[1])*t,e[2]+(n[2]-e[2])*t]}static setCoordinate(t,n,r,i){let a=e.intercept(t[i],n,r[i]);return e.lerpPoint(t,a,r)}static isBounded(e){return 0<=e&&e<=100}static nthVertex(t,n){let r=e.Y_FROM_LINRGB[0],i=e.Y_FROM_LINRGB[1],a=e.Y_FROM_LINRGB[2],o=n%4<=1?0:100,s=n%2==0?0:100;if(n<4){let n=o,c=s,l=(t-n*i-c*a)/r;return e.isBounded(l)?[l,n,c]:[-1,-1,-1]}else if(n<8){let n=o,c=s,l=(t-c*r-n*a)/i;return e.isBounded(l)?[c,l,n]:[-1,-1,-1]}else{let n=o,c=s,l=(t-n*r-c*i)/a;return e.isBounded(l)?[n,c,l]:[-1,-1,-1]}}static bisectToSegment(t,n){let r=[-1,-1,-1],i=r,a=0,o=0,s=!1,c=!0;for(let l=0;l<12;l++){let u=e.nthVertex(t,l);if(u[0]<0)continue;let d=e.hueOf(u);if(!s){r=u,i=u,a=d,o=d,s=!0;continue}(c||e.areInCyclicOrder(a,d,o))&&(c=!1,e.areInCyclicOrder(a,n,d)?(i=u,o=d):(r=u,a=d))}return[r,i]}static midpoint(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2,(e[2]+t[2])/2]}static criticalPlaneBelow(e){return Math.floor(e-.5)}static criticalPlaneAbove(e){return Math.ceil(e-.5)}static bisectToLimit(t,n){let r=e.bisectToSegment(t,n),i=r[0],a=e.hueOf(i),o=r[1];for(let t=0;t<3;t++)if(i[t]!==o[t]){let r=-1,s=255;i[t]<o[t]?(r=e.criticalPlaneBelow(e.trueDelinearized(i[t])),s=e.criticalPlaneAbove(e.trueDelinearized(o[t]))):(r=e.criticalPlaneAbove(e.trueDelinearized(i[t])),s=e.criticalPlaneBelow(e.trueDelinearized(o[t])));for(let c=0;c<8&&!(Math.abs(s-r)<=1);c++){let c=Math.floor((r+s)/2),l=e.CRITICAL_PLANES[c],u=e.setCoordinate(i,l,o,t),d=e.hueOf(u);e.areInCyclicOrder(a,n,d)?(o=u,s=c):(i=u,a=d,r=c)}}return e.midpoint(i,o)}static inverseChromaticAdaptation(e){let t=Math.abs(e),n=Math.max(0,27.13*t/(400-t));return z(e)*n**(1/.42)}static findResultByJ(t,n,r){let i=Math.sqrt(r)*11,a=Je.DEFAULT,o=1/(1.64-.29**a.n)**.73,s=.25*(Math.cos(t+2)+3.8)*(5e4/13)*a.nc*a.ncb,c=Math.sin(t),l=Math.cos(t);for(let t=0;t<5;t++){let u=i/100,d=((n===0||i===0?0:n/Math.sqrt(u))*o)**(1/.9),f=a.aw*u**(1/a.c/a.z)/a.nbb,p=23*(f+.305)*d/(23*s+11*d*l+108*d*c),m=p*l,h=p*c,g=(460*f+451*m+288*h)/1403,_=(460*f-891*m-261*h)/1403,v=(460*f-220*m-6300*h)/1403,y=Te([e.inverseChromaticAdaptation(g),e.inverseChromaticAdaptation(_),e.inverseChromaticAdaptation(v)],e.LINRGB_FROM_SCALED_DISCOUNT);if(y[0]<0||y[1]<0||y[2]<0)return 0;let b=e.Y_FROM_LINRGB[0],x=e.Y_FROM_LINRGB[1],S=e.Y_FROM_LINRGB[2],C=b*y[0]+x*y[1]+S*y[2];if(C<=0)return 0;if(t===4||Math.abs(C-r)<.002)return y[0]>100.01||y[1]>100.01||y[2]>100.01?0:Ae(y);i-=(C-r)*i/(2*C)}return 0}static solveToInt(t,n,r){if(n<1e-4||r<1e-4||r>99.9999)return ze(r);t=Se(t);let i=t/180*Math.PI,a=Ve(r),o=e.findResultByJ(i,n,a);return o===0?Ae(e.bisectToLimit(a,i)):o}static solveToCam(t,n,r){return B.fromInt(e.solveToInt(t,n,r))}};Ye.SCALED_DISCOUNT_FROM_LINRGB=[[.001200833568784504,.002389694492170889,.0002795742885861124],[.0005891086651375999,.0029785502573438758,.0003270666104008398],[.00010146692491640572,.0005364214359186694,.0032979401770712076]],Ye.LINRGB_FROM_SCALED_DISCOUNT=[[1373.2198709594231,-1100.4251190754821,-7.278681089101213],[-271.815969077903,559.6580465940733,-32.46047482791194],[1.9622899599665666,-57.173814538844006,308.7233197812385]],Ye.Y_FROM_LINRGB=[.2126,.7152,.0722],Ye.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 V=class e{static from(t,n,r){return new e(Ye.solveToInt(t,n,r))}static fromInt(t){return new e(t)}toInt(){return this.argb}get hue(){return this.internalHue}set hue(e){this.setInternalState(Ye.solveToInt(e,this.internalChroma,this.internalTone))}get chroma(){return this.internalChroma}set chroma(e){this.setInternalState(Ye.solveToInt(this.internalHue,e,this.internalTone))}get tone(){return this.internalTone}set tone(e){this.setInternalState(Ye.solveToInt(this.internalHue,this.internalChroma,e))}constructor(e){this.argb=e;let t=B.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=Be(e),this.argb=e}setInternalState(e){let t=B.fromInt(e);this.internalHue=t.hue,this.internalChroma=t.chroma,this.internalTone=Be(e),this.argb=e}inViewingConditions(t){let n=B.fromInt(this.toInt()).xyzInViewingConditions(t),r=B.fromXyzInViewingConditions(n[0],n[1],n[2],Je.make());return e.from(r.hue,r.chroma,He(n[1]))}},Xe=class e{static harmonize(e,t){let n=V.fromInt(e),r=V.fromInt(t),i=we(n.hue,r.hue),a=Math.min(i*.5,15),o=Se(n.hue+a*Ce(n.hue,r.hue));return V.from(o,n.chroma,n.tone).toInt()}static hctHue(t,n,r){let i=e.cam16Ucs(t,n,r),a=B.fromInt(i),o=B.fromInt(t);return V.from(a.hue,o.chroma,Be(t)).toInt()}static cam16Ucs(e,t,n){let r=B.fromInt(e),i=B.fromInt(t),a=r.jstar,o=r.astar,s=r.bstar,c=i.jstar,l=i.astar,u=i.bstar,d=a+(c-a)*n,f=o+(l-o)*n,p=s+(u-s)*n;return B.fromUcs(d,f,p).toInt()}},H=class e{static ratioOfTones(t,n){return t=be(0,100,t),n=be(0,100,n),e.ratioOfYs(Ve(t),Ve(n))}static ratioOfYs(e,t){let n=e>t?e:t,r=n===t?e:t;return(n+5)/(r+5)}static lighter(t,n){if(t<0||t>100)return-1;let r=Ve(t),i=n*(r+5)-5,a=e.ratioOfYs(i,r),o=Math.abs(a-n);if(a<n&&o>.04)return-1;let s=He(i)+.4;return s<0||s>100?-1:s}static darker(t,n){if(t<0||t>100)return-1;let r=Ve(t),i=(r+5)/n-5,a=e.ratioOfYs(r,i),o=Math.abs(a-n);if(a<n&&o>.04)return-1;let s=He(i)-.4;return s<0||s>100?-1:s}static lighterUnsafe(t,n){let r=e.lighter(t,n);return r<0?100:r}static darkerUnsafe(t,n){let r=e.darker(t,n);return r<0?0:r}},Ze=class e{static isDisliked(e){let t=Math.round(e.hue)>=90&&Math.round(e.hue)<=111,n=Math.round(e.chroma)>16,r=Math.round(e.tone)<65;return t&&n&&r}static fixIfDisliked(t){return e.isDisliked(t)?V.from(t.hue,t.chroma,70):t}},U=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(e,t,n,r,i,a,o,s){if(this.name=e,this.palette=t,this.tone=n,this.isBackground=r,this.background=i,this.secondBackground=a,this.contrastCurve=o,this.toneDeltaPair=s,this.hctCache=new Map,!i&&a)throw Error(`Color ${e} has secondBackgrounddefined, but background is not defined.`);if(!i&&o)throw Error(`Color ${e} has contrastCurvedefined, but background is not defined.`);if(i&&!o)throw Error(`Color ${e} has backgrounddefined, but contrastCurve is not defined.`)}getArgb(e){return this.getHct(e).toInt()}getHct(e){let t=this.hctCache.get(e);if(t!=null)return t;let n=this.getTone(e),r=this.palette(e).getHct(n);return this.hctCache.size>4&&this.hctCache.clear(),this.hctCache.set(e,r),r}getTone(t){let n=t.contrastLevel<0;if(this.toneDeltaPair){let r=this.toneDeltaPair(t),i=r.roleA,a=r.roleB,o=r.delta,s=r.polarity,c=r.stayTogether,l=this.background(t).getTone(t),u=s===`nearer`||s===`lighter`&&!t.isDark||s===`darker`&&t.isDark,d=u?i:a,f=u?a:i,p=this.name===d.name,m=t.isDark?1:-1,h=d.contrastCurve.get(t.contrastLevel),g=f.contrastCurve.get(t.contrastLevel),_=d.tone(t),v=H.ratioOfTones(l,_)>=h?_:e.foregroundTone(l,h),y=f.tone(t),b=H.ratioOfTones(l,y)>=g?y:e.foregroundTone(l,g);return n&&(v=e.foregroundTone(l,h),b=e.foregroundTone(l,g)),(b-v)*m>=o||(b=be(0,100,v+o*m),(b-v)*m>=o||(v=be(0,100,b-o*m))),50<=v&&v<60?m>0?(v=60,b=Math.max(b,v+o*m)):(v=49,b=Math.min(b,v+o*m)):50<=b&&b<60&&(c?m>0?(v=60,b=Math.max(b,v+o*m)):(v=49,b=Math.min(b,v+o*m)):b=m>0?60:49),p?v:b}else{let r=this.tone(t);if(this.background==null)return r;let i=this.background(t).getTone(t),a=this.contrastCurve.get(t.contrastLevel);if(H.ratioOfTones(i,r)>=a||(r=e.foregroundTone(i,a)),n&&(r=e.foregroundTone(i,a)),this.isBackground&&50<=r&&r<60&&(r=H.ratioOfTones(49,i)>=a?49:60),this.secondBackground){let[n,i]=[this.background,this.secondBackground],[o,s]=[n(t).getTone(t),i(t).getTone(t)],[c,l]=[Math.max(o,s),Math.min(o,s)];if(H.ratioOfTones(c,r)>=a&&H.ratioOfTones(l,r)>=a)return r;let u=H.lighter(c,a),d=H.darker(l,a),f=[];return u!==-1&&f.push(u),d!==-1&&f.push(d),e.tonePrefersLightForeground(o)||e.tonePrefersLightForeground(s)?u<0?100:u:f.length===1?f[0]:d<0?0:d}return r}}static foregroundTone(t,n){let r=H.lighterUnsafe(t,n),i=H.darkerUnsafe(t,n),a=H.ratioOfTones(r,t),o=H.ratioOfTones(i,t);if(e.tonePrefersLightForeground(t)){let e=Math.abs(a-o)<.1&&a<n&&o<n;return a>=n||a>=o||e?r:i}else return o>=n||o>=a?i:r}static tonePrefersLightForeground(e){return Math.round(e)<60}static toneAllowsLightForeground(e){return Math.round(e)<=49}static enableLightForeground(t){return e.tonePrefersLightForeground(t)&&!e.toneAllowsLightForeground(t)?49:t}},W=class e{static fromInt(t){let n=V.fromInt(t);return e.fromHct(n)}static fromHct(t){return new e(t.hue,t.chroma,t)}static fromHueAndChroma(t,n){return new e(t,n,new Qe(t,n).create())}constructor(e,t,n){this.hue=e,this.chroma=t,this.keyColor=n,this.cache=new Map}tone(e){let t=this.cache.get(e);return t===void 0&&(t=V.from(this.hue,this.chroma,e).toInt(),this.cache.set(e,t)),t}getHct(e){return V.fromInt(this.tone(e))}},Qe=class{constructor(e,t){this.hue=e,this.requestedChroma=t,this.chromaCache=new Map,this.maxChromaValue=200}create(){let e=0,t=100;for(;e<t;){let n=Math.floor((e+t)/2),r=this.maxChroma(n)<this.maxChroma(n+1);if(this.maxChroma(n)>=this.requestedChroma-.01)if(Math.abs(e-50)<Math.abs(t-50))t=n;else{if(e===n)return V.from(this.hue,this.requestedChroma,e);e=n}else r?e=n+1:t=n}return V.from(this.hue,this.requestedChroma,e)}maxChroma(e){if(this.chromaCache.has(e))return this.chromaCache.get(e);let t=V.from(this.hue,this.maxChromaValue,e).chroma;return this.chromaCache.set(e,t),t}},G=class{constructor(e,t,n,r){this.low=e,this.normal=t,this.medium=n,this.high=r}get(e){return e<=-1?this.low:e<0?ve(this.low,this.normal,(e- -1)/1):e<.5?ve(this.normal,this.medium,(e-0)/.5):e<1?ve(this.medium,this.high,(e-.5)/.5):this.high}},K=class{constructor(e,t,n,r,i){this.roleA=e,this.roleB=t,this.delta=n,this.polarity=r,this.stayTogether=i}},$e;(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`})($e||={});function et(e){return e.variant===$e.FIDELITY||e.variant===$e.CONTENT}function q(e){return e.variant===$e.MONOCHROME}function tt(e,t,n,r){let i=n,a=V.from(e,t,n);if(a.chroma<t){let n=a.chroma;for(;a.chroma<t;){i+=r?-1:1;let o=V.from(e,t,i);if(n>o.chroma||Math.abs(o.chroma-t)<.4)break;Math.abs(o.chroma-t)<Math.abs(a.chroma-t)&&(a=o),n=Math.max(n,o.chroma)}}return i}var J=class e{static highestSurface(t){return t.isDark?e.surfaceBright:e.surfaceDim}};J.contentAccentToneDelta=15,J.primaryPaletteKeyColor=U.fromPalette({name:`primary_palette_key_color`,palette:e=>e.primaryPalette,tone:e=>e.primaryPalette.keyColor.tone}),J.secondaryPaletteKeyColor=U.fromPalette({name:`secondary_palette_key_color`,palette:e=>e.secondaryPalette,tone:e=>e.secondaryPalette.keyColor.tone}),J.tertiaryPaletteKeyColor=U.fromPalette({name:`tertiary_palette_key_color`,palette:e=>e.tertiaryPalette,tone:e=>e.tertiaryPalette.keyColor.tone}),J.neutralPaletteKeyColor=U.fromPalette({name:`neutral_palette_key_color`,palette:e=>e.neutralPalette,tone:e=>e.neutralPalette.keyColor.tone}),J.neutralVariantPaletteKeyColor=U.fromPalette({name:`neutral_variant_palette_key_color`,palette:e=>e.neutralVariantPalette,tone:e=>e.neutralVariantPalette.keyColor.tone}),J.background=U.fromPalette({name:`background`,palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),J.onBackground=U.fromPalette({name:`on_background`,palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>J.background,contrastCurve:new G(3,3,4.5,7)}),J.surface=U.fromPalette({name:`surface`,palette:e=>e.neutralPalette,tone:e=>e.isDark?6:98,isBackground:!0}),J.surfaceDim=U.fromPalette({name:`surface_dim`,palette:e=>e.neutralPalette,tone:e=>e.isDark?6:new G(87,87,80,75).get(e.contrastLevel),isBackground:!0}),J.surfaceBright=U.fromPalette({name:`surface_bright`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new G(24,24,29,34).get(e.contrastLevel):98,isBackground:!0}),J.surfaceContainerLowest=U.fromPalette({name:`surface_container_lowest`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new G(4,4,2,0).get(e.contrastLevel):100,isBackground:!0}),J.surfaceContainerLow=U.fromPalette({name:`surface_container_low`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new G(10,10,11,12).get(e.contrastLevel):new G(96,96,96,95).get(e.contrastLevel),isBackground:!0}),J.surfaceContainer=U.fromPalette({name:`surface_container`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new G(12,12,16,20).get(e.contrastLevel):new G(94,94,92,90).get(e.contrastLevel),isBackground:!0}),J.surfaceContainerHigh=U.fromPalette({name:`surface_container_high`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new G(17,17,21,25).get(e.contrastLevel):new G(92,92,88,85).get(e.contrastLevel),isBackground:!0}),J.surfaceContainerHighest=U.fromPalette({name:`surface_container_highest`,palette:e=>e.neutralPalette,tone:e=>e.isDark?new G(22,22,26,30).get(e.contrastLevel):new G(90,90,84,80).get(e.contrastLevel),isBackground:!0}),J.onSurface=U.fromPalette({name:`on_surface`,palette:e=>e.neutralPalette,tone:e=>e.isDark?90:10,background:e=>J.highestSurface(e),contrastCurve:new G(4.5,7,11,21)}),J.surfaceVariant=U.fromPalette({name:`surface_variant`,palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:90,isBackground:!0}),J.onSurfaceVariant=U.fromPalette({name:`on_surface_variant`,palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?80:30,background:e=>J.highestSurface(e),contrastCurve:new G(3,4.5,7,11)}),J.inverseSurface=U.fromPalette({name:`inverse_surface`,palette:e=>e.neutralPalette,tone:e=>e.isDark?90:20}),J.inverseOnSurface=U.fromPalette({name:`inverse_on_surface`,palette:e=>e.neutralPalette,tone:e=>e.isDark?20:95,background:e=>J.inverseSurface,contrastCurve:new G(4.5,7,11,21)}),J.outline=U.fromPalette({name:`outline`,palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?60:50,background:e=>J.highestSurface(e),contrastCurve:new G(1.5,3,4.5,7)}),J.outlineVariant=U.fromPalette({name:`outline_variant`,palette:e=>e.neutralVariantPalette,tone:e=>e.isDark?30:80,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5)}),J.shadow=U.fromPalette({name:`shadow`,palette:e=>e.neutralPalette,tone:e=>0}),J.scrim=U.fromPalette({name:`scrim`,palette:e=>e.neutralPalette,tone:e=>0}),J.surfaceTint=U.fromPalette({name:`surface_tint`,palette:e=>e.primaryPalette,tone:e=>e.isDark?80:40,isBackground:!0}),J.primary=U.fromPalette({name:`primary`,palette:e=>e.primaryPalette,tone:e=>q(e)?e.isDark?100:0:e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(3,4.5,7,7),toneDeltaPair:e=>new K(J.primaryContainer,J.primary,10,`nearer`,!1)}),J.onPrimary=U.fromPalette({name:`on_primary`,palette:e=>e.primaryPalette,tone:e=>q(e)?e.isDark?10:90:e.isDark?20:100,background:e=>J.primary,contrastCurve:new G(4.5,7,11,21)}),J.primaryContainer=U.fromPalette({name:`primary_container`,palette:e=>e.primaryPalette,tone:e=>et(e)?e.sourceColorHct.tone:q(e)?e.isDark?85:25:e.isDark?30:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5),toneDeltaPair:e=>new K(J.primaryContainer,J.primary,10,`nearer`,!1)}),J.onPrimaryContainer=U.fromPalette({name:`on_primary_container`,palette:e=>e.primaryPalette,tone:e=>et(e)?U.foregroundTone(J.primaryContainer.tone(e),4.5):q(e)?e.isDark?0:100:e.isDark?90:30,background:e=>J.primaryContainer,contrastCurve:new G(3,4.5,7,11)}),J.inversePrimary=U.fromPalette({name:`inverse_primary`,palette:e=>e.primaryPalette,tone:e=>e.isDark?40:80,background:e=>J.inverseSurface,contrastCurve:new G(3,4.5,7,7)}),J.secondary=U.fromPalette({name:`secondary`,palette:e=>e.secondaryPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(3,4.5,7,7),toneDeltaPair:e=>new K(J.secondaryContainer,J.secondary,10,`nearer`,!1)}),J.onSecondary=U.fromPalette({name:`on_secondary`,palette:e=>e.secondaryPalette,tone:e=>q(e)?e.isDark?10:100:e.isDark?20:100,background:e=>J.secondary,contrastCurve:new G(4.5,7,11,21)}),J.secondaryContainer=U.fromPalette({name:`secondary_container`,palette:e=>e.secondaryPalette,tone:e=>{let t=e.isDark?30:90;return q(e)?e.isDark?30:85:et(e)?tt(e.secondaryPalette.hue,e.secondaryPalette.chroma,t,!e.isDark):t},isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5),toneDeltaPair:e=>new K(J.secondaryContainer,J.secondary,10,`nearer`,!1)}),J.onSecondaryContainer=U.fromPalette({name:`on_secondary_container`,palette:e=>e.secondaryPalette,tone:e=>q(e)?e.isDark?90:10:et(e)?U.foregroundTone(J.secondaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>J.secondaryContainer,contrastCurve:new G(3,4.5,7,11)}),J.tertiary=U.fromPalette({name:`tertiary`,palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?90:25:e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(3,4.5,7,7),toneDeltaPair:e=>new K(J.tertiaryContainer,J.tertiary,10,`nearer`,!1)}),J.onTertiary=U.fromPalette({name:`on_tertiary`,palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?10:90:e.isDark?20:100,background:e=>J.tertiary,contrastCurve:new G(4.5,7,11,21)}),J.tertiaryContainer=U.fromPalette({name:`tertiary_container`,palette:e=>e.tertiaryPalette,tone:e=>{if(q(e))return e.isDark?60:49;if(!et(e))return e.isDark?30:90;let t=e.tertiaryPalette.getHct(e.sourceColorHct.tone);return Ze.fixIfDisliked(t).tone},isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5),toneDeltaPair:e=>new K(J.tertiaryContainer,J.tertiary,10,`nearer`,!1)}),J.onTertiaryContainer=U.fromPalette({name:`on_tertiary_container`,palette:e=>e.tertiaryPalette,tone:e=>q(e)?e.isDark?0:100:et(e)?U.foregroundTone(J.tertiaryContainer.tone(e),4.5):e.isDark?90:30,background:e=>J.tertiaryContainer,contrastCurve:new G(3,4.5,7,11)}),J.error=U.fromPalette({name:`error`,palette:e=>e.errorPalette,tone:e=>e.isDark?80:40,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(3,4.5,7,7),toneDeltaPair:e=>new K(J.errorContainer,J.error,10,`nearer`,!1)}),J.onError=U.fromPalette({name:`on_error`,palette:e=>e.errorPalette,tone:e=>e.isDark?20:100,background:e=>J.error,contrastCurve:new G(4.5,7,11,21)}),J.errorContainer=U.fromPalette({name:`error_container`,palette:e=>e.errorPalette,tone:e=>e.isDark?30:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5),toneDeltaPair:e=>new K(J.errorContainer,J.error,10,`nearer`,!1)}),J.onErrorContainer=U.fromPalette({name:`on_error_container`,palette:e=>e.errorPalette,tone:e=>q(e)?e.isDark?90:10:e.isDark?90:30,background:e=>J.errorContainer,contrastCurve:new G(3,4.5,7,11)}),J.primaryFixed=U.fromPalette({name:`primary_fixed`,palette:e=>e.primaryPalette,tone:e=>q(e)?40:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5),toneDeltaPair:e=>new K(J.primaryFixed,J.primaryFixedDim,10,`lighter`,!0)}),J.primaryFixedDim=U.fromPalette({name:`primary_fixed_dim`,palette:e=>e.primaryPalette,tone:e=>q(e)?30:80,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5),toneDeltaPair:e=>new K(J.primaryFixed,J.primaryFixedDim,10,`lighter`,!0)}),J.onPrimaryFixed=U.fromPalette({name:`on_primary_fixed`,palette:e=>e.primaryPalette,tone:e=>q(e)?100:10,background:e=>J.primaryFixedDim,secondBackground:e=>J.primaryFixed,contrastCurve:new G(4.5,7,11,21)}),J.onPrimaryFixedVariant=U.fromPalette({name:`on_primary_fixed_variant`,palette:e=>e.primaryPalette,tone:e=>q(e)?90:30,background:e=>J.primaryFixedDim,secondBackground:e=>J.primaryFixed,contrastCurve:new G(3,4.5,7,11)}),J.secondaryFixed=U.fromPalette({name:`secondary_fixed`,palette:e=>e.secondaryPalette,tone:e=>q(e)?80:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5),toneDeltaPair:e=>new K(J.secondaryFixed,J.secondaryFixedDim,10,`lighter`,!0)}),J.secondaryFixedDim=U.fromPalette({name:`secondary_fixed_dim`,palette:e=>e.secondaryPalette,tone:e=>q(e)?70:80,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5),toneDeltaPair:e=>new K(J.secondaryFixed,J.secondaryFixedDim,10,`lighter`,!0)}),J.onSecondaryFixed=U.fromPalette({name:`on_secondary_fixed`,palette:e=>e.secondaryPalette,tone:e=>10,background:e=>J.secondaryFixedDim,secondBackground:e=>J.secondaryFixed,contrastCurve:new G(4.5,7,11,21)}),J.onSecondaryFixedVariant=U.fromPalette({name:`on_secondary_fixed_variant`,palette:e=>e.secondaryPalette,tone:e=>q(e)?25:30,background:e=>J.secondaryFixedDim,secondBackground:e=>J.secondaryFixed,contrastCurve:new G(3,4.5,7,11)}),J.tertiaryFixed=U.fromPalette({name:`tertiary_fixed`,palette:e=>e.tertiaryPalette,tone:e=>q(e)?40:90,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5),toneDeltaPair:e=>new K(J.tertiaryFixed,J.tertiaryFixedDim,10,`lighter`,!0)}),J.tertiaryFixedDim=U.fromPalette({name:`tertiary_fixed_dim`,palette:e=>e.tertiaryPalette,tone:e=>q(e)?30:80,isBackground:!0,background:e=>J.highestSurface(e),contrastCurve:new G(1,1,3,4.5),toneDeltaPair:e=>new K(J.tertiaryFixed,J.tertiaryFixedDim,10,`lighter`,!0)}),J.onTertiaryFixed=U.fromPalette({name:`on_tertiary_fixed`,palette:e=>e.tertiaryPalette,tone:e=>q(e)?100:10,background:e=>J.tertiaryFixedDim,secondBackground:e=>J.tertiaryFixed,contrastCurve:new G(4.5,7,11,21)}),J.onTertiaryFixedVariant=U.fromPalette({name:`on_tertiary_fixed_variant`,palette:e=>e.tertiaryPalette,tone:e=>q(e)?90:30,background:e=>J.tertiaryFixedDim,secondBackground:e=>J.tertiaryFixed,contrastCurve:new G(3,4.5,7,11)});var nt=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,n){let r=new e(n.primary,t);return n.secondary&&(r.a2=new e(n.secondary,t).a1),n.tertiary&&(r.a3=new e(n.tertiary,t).a1),n.error&&(r.error=new e(n.error,t).a1),n.neutral&&(r.n1=new e(n.neutral,t).n1),n.neutralVariant&&(r.n2=new e(n.neutralVariant,t).n2),r}constructor(e,t){let n=V.fromInt(e),r=n.hue,i=n.chroma;t?(this.a1=W.fromHueAndChroma(r,i),this.a2=W.fromHueAndChroma(r,i/3),this.a3=W.fromHueAndChroma(r+60,i/2),this.n1=W.fromHueAndChroma(r,Math.min(i/12,4)),this.n2=W.fromHueAndChroma(r,Math.min(i/6,8))):(this.a1=W.fromHueAndChroma(r,Math.max(48,i)),this.a2=W.fromHueAndChroma(r,16),this.a3=W.fromHueAndChroma(r+60,24),this.n1=W.fromHueAndChroma(r,4),this.n2=W.fromHueAndChroma(r,8)),this.error=W.fromHueAndChroma(25,84)}},rt=class{fromInt(e){return Re(e)}toInt(e){return Le(e[0],e[1],e[2])}distance(e,t){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}},it=10,at=3,ot=class{static quantize(e,t,n){let r=new Map,i=[],a=[],o=new rt,s=0;for(let t=0;t<e.length;t++){let n=e[t],c=r.get(n);c===void 0?(s++,i.push(o.fromInt(n)),a.push(n),r.set(n,1)):r.set(n,c+1)}let c=[];for(let e=0;e<s;e++){let t=a[e],n=r.get(t);n!==void 0&&(c[e]=n)}let l=Math.min(n,s);t.length>0&&(l=Math.min(l,t.length));let u=[];for(let e=0;e<t.length;e++)u.push(o.fromInt(t[e]));let d=l-u.length;if(t.length===0&&d>0)for(let e=0;e<d;e++){let e=Math.random()*100,t=Math.random()*201+-100,n=Math.random()*201+-100;u.push([e,t,n])}let f=[];for(let e=0;e<s;e++)f.push(Math.floor(Math.random()*l));let p=[];for(let e=0;e<l;e++){p.push([]);for(let t=0;t<l;t++)p[e].push(0)}let m=[];for(let e=0;e<l;e++){m.push([]);for(let t=0;t<l;t++)m[e].push(new st)}let h=[];for(let e=0;e<l;e++)h.push(0);for(let e=0;e<it;e++){for(let e=0;e<l;e++){for(let t=e+1;t<l;t++){let n=o.distance(u[e],u[t]);m[t][e].distance=n,m[t][e].index=e,m[e][t].distance=n,m[e][t].index=t}m[e].sort();for(let t=0;t<l;t++)p[e][t]=m[e][t].index}let t=0;for(let e=0;e<s;e++){let n=i[e],r=f[e],a=u[r],s=o.distance(n,a),c=s,d=-1;for(let e=0;e<l;e++){if(m[r][e].distance>=4*s)continue;let t=o.distance(n,u[e]);t<c&&(c=t,d=e)}d!==-1&&Math.abs(Math.sqrt(c)-Math.sqrt(s))>at&&(t++,f[e]=d)}if(t===0&&e!==0)break;let n=Array(l).fill(0),r=Array(l).fill(0),a=Array(l).fill(0);for(let e=0;e<l;e++)h[e]=0;for(let e=0;e<s;e++){let t=f[e],o=i[e],s=c[e];h[t]+=s,n[t]+=o[0]*s,r[t]+=o[1]*s,a[t]+=o[2]*s}for(let e=0;e<l;e++){let t=h[e];if(t===0){u[e]=[0,0,0];continue}u[e]=[n[e]/t,r[e]/t,a[e]/t]}}let g=new Map;for(let e=0;e<l;e++){let t=h[e];if(t===0)continue;let n=o.toInt(u[e]);g.has(n)||g.set(n,t)}return g}},st=class{constructor(){this.distance=-1,this.index=-1}},ct=class{static quantize(e){let t=new Map;for(let n=0;n<e.length;n++){let r=e[n];je(r)<255||t.set(r,(t.get(r)??0)+1)}return t}},lt=5,Y=33,ut=35937,X={RED:`red`,GREEN:`green`,BLUE:`blue`},dt=class{constructor(e=[],t=[],n=[],r=[],i=[],a=[]){this.weights=e,this.momentsR=t,this.momentsG=n,this.momentsB=r,this.moments=i,this.cubes=a}quantize(e,t){this.constructHistogram(e),this.computeMoments();let n=this.createBoxes(t);return this.createResult(n.resultCount)}constructHistogram(e){this.weights=Array.from({length:ut}).fill(0),this.momentsR=Array.from({length:ut}).fill(0),this.momentsG=Array.from({length:ut}).fill(0),this.momentsB=Array.from({length:ut}).fill(0),this.moments=Array.from({length:ut}).fill(0);let t=ct.quantize(e);for(let[e,n]of t.entries()){let t=Me(e),r=Ne(e),i=Pe(e),a=8-lt,o=(t>>a)+1,s=(r>>a)+1,c=(i>>a)+1,l=this.getIndex(o,s,c);this.weights[l]=(this.weights[l]??0)+n,this.momentsR[l]+=n*t,this.momentsG[l]+=n*r,this.momentsB[l]+=n*i,this.moments[l]+=n*(t*t+r*r+i*i)}}computeMoments(){for(let e=1;e<Y;e++){let t=Array.from({length:Y}).fill(0),n=Array.from({length:Y}).fill(0),r=Array.from({length:Y}).fill(0),i=Array.from({length:Y}).fill(0),a=Array.from({length:Y}).fill(0);for(let o=1;o<Y;o++){let s=0,c=0,l=0,u=0,d=0;for(let f=1;f<Y;f++){let p=this.getIndex(e,o,f);s+=this.weights[p],c+=this.momentsR[p],l+=this.momentsG[p],u+=this.momentsB[p],d+=this.moments[p],t[f]+=s,n[f]+=c,r[f]+=l,i[f]+=u,a[f]+=d;let m=this.getIndex(e-1,o,f);this.weights[p]=this.weights[m]+t[f],this.momentsR[p]=this.momentsR[m]+n[f],this.momentsG[p]=this.momentsG[m]+r[f],this.momentsB[p]=this.momentsB[m]+i[f],this.moments[p]=this.moments[m]+a[f]}}}}createBoxes(e){this.cubes=Array.from({length:e}).fill(0).map(()=>new ft);let t=Array.from({length:e}).fill(0);this.cubes[0].r0=0,this.cubes[0].g0=0,this.cubes[0].b0=0,this.cubes[0].r1=Y-1,this.cubes[0].g1=Y-1,this.cubes[0].b1=Y-1;let n=e,r=0;for(let i=1;i<e;i++){this.cut(this.cubes[r],this.cubes[i])?(t[r]=this.cubes[r].vol>1?this.variance(this.cubes[r]):0,t[i]=this.cubes[i].vol>1?this.variance(this.cubes[i]):0):(t[r]=0,i--),r=0;let e=t[0];for(let n=1;n<=i;n++)t[n]>e&&(e=t[n],r=n);if(e<=0){n=i+1;break}}return new pt(e,n)}createResult(e){let t=[];for(let n=0;n<e;++n){let e=this.cubes[n],r=this.volume(e,this.weights);if(r>0){let n=Math.round(this.volume(e,this.momentsR)/r),i=Math.round(this.volume(e,this.momentsG)/r),a=Math.round(this.volume(e,this.momentsB)/r),o=255<<24|(n&255)<<16|(i&255)<<8|a&255;t.push(o)}}return t}variance(e){let t=this.volume(e,this.momentsR),n=this.volume(e,this.momentsG),r=this.volume(e,this.momentsB);return this.moments[this.getIndex(e.r1,e.g1,e.b1)]-this.moments[this.getIndex(e.r1,e.g1,e.b0)]-this.moments[this.getIndex(e.r1,e.g0,e.b1)]+this.moments[this.getIndex(e.r1,e.g0,e.b0)]-this.moments[this.getIndex(e.r0,e.g1,e.b1)]+this.moments[this.getIndex(e.r0,e.g1,e.b0)]+this.moments[this.getIndex(e.r0,e.g0,e.b1)]-this.moments[this.getIndex(e.r0,e.g0,e.b0)]-(t*t+n*n+r*r)/this.volume(e,this.weights)}cut(e,t){let n=this.volume(e,this.momentsR),r=this.volume(e,this.momentsG),i=this.volume(e,this.momentsB),a=this.volume(e,this.weights),o=this.maximize(e,X.RED,e.r0+1,e.r1,n,r,i,a),s=this.maximize(e,X.GREEN,e.g0+1,e.g1,n,r,i,a),c=this.maximize(e,X.BLUE,e.b0+1,e.b1,n,r,i,a),l,u=o.maximum,d=s.maximum,f=c.maximum;if(u>=d&&u>=f){if(o.cutLocation<0)return!1;l=X.RED}else l=d>=u&&d>=f?X.GREEN:X.BLUE;switch(t.r1=e.r1,t.g1=e.g1,t.b1=e.b1,l){case X.RED:e.r1=o.cutLocation,t.r0=e.r1,t.g0=e.g0,t.b0=e.b0;break;case X.GREEN:e.g1=s.cutLocation,t.r0=e.r0,t.g0=e.g1,t.b0=e.b0;break;case X.BLUE:e.b1=c.cutLocation,t.r0=e.r0,t.g0=e.g0,t.b0=e.b1;break;default:throw Error(`unexpected direction `+l)}return e.vol=(e.r1-e.r0)*(e.g1-e.g0)*(e.b1-e.b0),t.vol=(t.r1-t.r0)*(t.g1-t.g0)*(t.b1-t.b0),!0}maximize(e,t,n,r,i,a,o,s){let c=this.bottom(e,t,this.momentsR),l=this.bottom(e,t,this.momentsG),u=this.bottom(e,t,this.momentsB),d=this.bottom(e,t,this.weights),f=0,p=-1,m=0,h=0,g=0,_=0;for(let v=n;v<r;v++){if(m=c+this.top(e,t,v,this.momentsR),h=l+this.top(e,t,v,this.momentsG),g=u+this.top(e,t,v,this.momentsB),_=d+this.top(e,t,v,this.weights),_===0)continue;let n=(m*m+h*h+g*g)*1,r=_*1,y=n/r;m=i-m,h=a-h,g=o-g,_=s-_,_!==0&&(n=(m*m+h*h+g*g)*1,r=_*1,y+=n/r,y>f&&(f=y,p=v))}return new mt(p,f)}volume(e,t){return t[this.getIndex(e.r1,e.g1,e.b1)]-t[this.getIndex(e.r1,e.g1,e.b0)]-t[this.getIndex(e.r1,e.g0,e.b1)]+t[this.getIndex(e.r1,e.g0,e.b0)]-t[this.getIndex(e.r0,e.g1,e.b1)]+t[this.getIndex(e.r0,e.g1,e.b0)]+t[this.getIndex(e.r0,e.g0,e.b1)]-t[this.getIndex(e.r0,e.g0,e.b0)]}bottom(e,t,n){switch(t){case X.RED:return-n[this.getIndex(e.r0,e.g1,e.b1)]+n[this.getIndex(e.r0,e.g1,e.b0)]+n[this.getIndex(e.r0,e.g0,e.b1)]-n[this.getIndex(e.r0,e.g0,e.b0)];case X.GREEN:return-n[this.getIndex(e.r1,e.g0,e.b1)]+n[this.getIndex(e.r1,e.g0,e.b0)]+n[this.getIndex(e.r0,e.g0,e.b1)]-n[this.getIndex(e.r0,e.g0,e.b0)];case X.BLUE:return-n[this.getIndex(e.r1,e.g1,e.b0)]+n[this.getIndex(e.r1,e.g0,e.b0)]+n[this.getIndex(e.r0,e.g1,e.b0)]-n[this.getIndex(e.r0,e.g0,e.b0)];default:throw Error(`unexpected direction $direction`)}}top(e,t,n,r){switch(t){case X.RED:return r[this.getIndex(n,e.g1,e.b1)]-r[this.getIndex(n,e.g1,e.b0)]-r[this.getIndex(n,e.g0,e.b1)]+r[this.getIndex(n,e.g0,e.b0)];case X.GREEN:return r[this.getIndex(e.r1,n,e.b1)]-r[this.getIndex(e.r1,n,e.b0)]-r[this.getIndex(e.r0,n,e.b1)]+r[this.getIndex(e.r0,n,e.b0)];case X.BLUE:return r[this.getIndex(e.r1,e.g1,n)]-r[this.getIndex(e.r1,e.g0,n)]-r[this.getIndex(e.r0,e.g1,n)]+r[this.getIndex(e.r0,e.g0,n)];default:throw Error(`unexpected direction $direction`)}}getIndex(e,t,n){return(e<<lt*2)+(e<<lt+1)+e+(t<<lt)+t+n}},ft=class{constructor(e=0,t=0,n=0,r=0,i=0,a=0,o=0){this.r0=e,this.r1=t,this.g0=n,this.g1=r,this.b0=i,this.b1=a,this.vol=o}},pt=class{constructor(e,t){this.requestedCount=e,this.resultCount=t}},mt=class{constructor(e,t){this.cutLocation=e,this.maximum=t}},ht=class{static quantize(e,t){let n=new dt().quantize(e,t);return ot.quantize(e,n,t)}},gt=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(nt.of(t))}static dark(t){return e.darkFromCorePalette(nt.of(t))}static lightContent(t){return e.lightFromCorePalette(nt.contentOf(t))}static darkContent(t){return e.darkFromCorePalette(nt.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(e){this.props=e}toJSON(){return{...this.props}}},_t={desired:4,fallbackColorARGB:4282549748,filter:!0};function vt(e,t){return e.score>t.score?-1:+(e.score<t.score)}var yt=class e{constructor(){}static score(t,n){let{desired:r,fallbackColorARGB:i,filter:a}={..._t,...n},o=[],s=Array(360).fill(0),c=0;for(let[e,n]of t.entries()){let t=V.fromInt(e);o.push(t);let r=Math.floor(t.hue);s[r]+=n,c+=n}let l=Array(360).fill(0);for(let e=0;e<360;e++){let t=s[e]/c;for(let n=e-14;n<e+16;n++){let e=xe(n);l[e]+=t}}let u=[];for(let t of o){let n=l[xe(Math.round(t.hue))];if(a&&(t.chroma<e.CUTOFF_CHROMA||n<=e.CUTOFF_EXCITED_PROPORTION))continue;let r=n*100*e.WEIGHT_PROPORTION,i=t.chroma<e.TARGET_CHROMA?e.WEIGHT_CHROMA_BELOW:e.WEIGHT_CHROMA_ABOVE,o=r+(t.chroma-e.TARGET_CHROMA)*i;u.push({hct:t,score:o})}u.sort(vt);let d=[];for(let e=90;e>=15;e--){d.length=0;for(let{hct:t}of u)if(d.find(n=>we(t.hue,n.hue)<e)||d.push(t),d.length>=r)break;if(d.length>=r)break}let f=[];d.length===0&&f.push(i);for(let e of d)f.push(e.toInt());return f}};yt.TARGET_CHROMA=48,yt.WEIGHT_PROPORTION=.7,yt.WEIGHT_CHROMA_ABOVE=.3,yt.WEIGHT_CHROMA_BELOW=.1,yt.CUTOFF_CHROMA=5,yt.CUTOFF_EXCITED_PROPORTION=.01;function Z(e){let t=Me(e),n=Ne(e),r=Pe(e),i=[t.toString(16),n.toString(16),r.toString(16)];for(let[e,t]of i.entries())t.length===1&&(i[e]=`0`+t);return`#`+i.join(``)}function bt(e){e=e.replace(`#`,``);let t=e.length===3,n=e.length===6,r=e.length===8;if(!t&&!n&&!r)throw Error(`unexpected hex `+e);let i=0,a=0,o=0;return t?(i=xt(e.slice(0,1).repeat(2)),a=xt(e.slice(1,2).repeat(2)),o=xt(e.slice(2,3).repeat(2))):n?(i=xt(e.slice(0,2)),a=xt(e.slice(2,4)),o=xt(e.slice(4,6))):r&&(i=xt(e.slice(2,4)),a=xt(e.slice(4,6)),o=xt(e.slice(6,8))),(255<<24|(i&255)<<16|(a&255)<<8|o&255)>>>0}function xt(e){return parseInt(e,16)}async function St(e){let t=await new Promise((t,n)=>{let r=document.createElement(`canvas`),i=r.getContext(`2d`);if(!i){n(Error(`Could not get canvas context`));return}let a=()=>{r.width=e.width,r.height=e.height,i.drawImage(e,0,0);let n=[0,0,e.width,e.height],a=e.dataset.area;a&&/^\d+(\s*,\s*\d+){3}$/.test(a)&&(n=a.split(/\s*,\s*/).map(e=>parseInt(e,10)));let[o,s,c,l]=n;t(i.getImageData(o,s,c,l).data)};e.complete?a():(e.onload=a,e.onerror=()=>{n(Error(`Image load failed`))})}),n=[];for(let e=0;e<t.length;e+=4){let r=t[e],i=t[e+1],a=t[e+2];if(t[e+3]<255)continue;let o=ke(r,i,a);n.push(o)}let r=ht.quantize(n,128);return yt.score(r)[0]}function Ct(e,t=[]){let n=nt.of(e);return{source:e,schemes:{light:gt.light(e),dark:gt.dark(e)},palettes:{primary:n.a1,secondary:n.a2,tertiary:n.a3,neutral:n.n1,neutralVariant:n.n2,error:n.error},customColors:t.map(t=>Tt(e,t))}}async function wt(e,t=[]){return Ct(await St(e),t)}function Tt(e,t){let n=t.value,r=n,i=e;t.blend&&(n=Xe.harmonize(r,i));let a=nt.of(n).a1;return{color:t,value:n,light:{color:a.tone(40),onColor:a.tone(100),colorContainer:a.tone(90),onColorContainer:a.tone(10)},dark:{color:a.tone(80),onColor:a.tone(20),colorContainer:a.tone(30),onColorContainer:a.tone(90)}}}function Et(e){let t=JSON.parse(JSON.stringify(e.schemes));for(let e in t)for(let n in t[e])t[e][n]=Z(t[e][n]);return t.dark.surfaceDim=Z(e.palettes.neutral.tone(6)),t.dark.surface=Z(e.palettes.neutral.tone(6)),t.dark.surfaceBright=Z(e.palettes.neutral.tone(24)),t.dark.surfaceContainerLowest=Z(e.palettes.neutral.tone(4)),t.dark.surfaceContainerLow=Z(e.palettes.neutral.tone(10)),t.dark.surfaceContainer=Z(e.palettes.neutral.tone(12)),t.dark.surfaceContainerHigh=Z(e.palettes.neutral.tone(17)),t.dark.surfaceContainerHighest=Z(e.palettes.neutral.tone(22)),t.dark.onSurface=Z(e.palettes.neutral.tone(90)),t.dark.onSurfaceVariant=Z(e.palettes.neutralVariant.tone(80)),t.dark.outline=Z(e.palettes.neutralVariant.tone(60)),t.dark.outlineVariant=Z(e.palettes.neutralVariant.tone(30)),t.light.surfaceDim=Z(e.palettes.neutral.tone(87)),t.light.surface=Z(e.palettes.neutral.tone(98)),t.light.surfaceBright=Z(e.palettes.neutral.tone(98)),t.light.surfaceContainerLowest=Z(e.palettes.neutral.tone(100)),t.light.surfaceContainerLow=Z(e.palettes.neutral.tone(96)),t.light.surfaceContainer=Z(e.palettes.neutral.tone(94)),t.light.surfaceContainerHigh=Z(e.palettes.neutral.tone(92)),t.light.surfaceContainerHighest=Z(e.palettes.neutral.tone(90)),t.light.onSurface=Z(e.palettes.neutral.tone(10)),t.light.onSurfaceVariant=Z(e.palettes.neutralVariant.tone(30)),t.light.outline=Z(e.palettes.neutralVariant.tone(50)),t.light.outlineVariant=Z(e.palettes.neutralVariant.tone(80)),t}async function Dt(e){let t=e,n={light:{},dark:{}};try{if(typeof t==`string`&&/^\#[0-9a-f]+$/i.test(t))return Et(Ct(bt(t)));if(t.src)return Et(await wt(t));let e=new Blob;if(typeof t==`string`&&(e=await fetch(t).then(e=>e.blob())),t.size&&(e=t),t.files&&t.files[0]&&(e=t.files[0]),t.target&&t.target.files&&t.target.files[0]&&(e=t.target.files[0]),!e.size)return n;let r=new Image(64);return r.src=URL.createObjectURL(e),Et(await wt(r))}catch{return n}}globalThis.materialDynamicColors=Dt;var Ot=globalThis.materialDynamicColors,kt=Symbol(`liftkit-theme`),At={primary:`#004ee7`,onPrimary:`#ffffff`,primaryContainer:`#dce1ff`,onPrimaryContainer:`#001550`,secondary:`#595d72`,onSecondary:`#ffffff`,secondaryContainer:`#dee1f9`,onSecondaryContainer:`#161b2c`,tertiary:`#75546f`,onTertiary:`#ffffff`,tertiaryContainer:`#ffd7f5`,onTertiaryContainer:`#2c122a`,error:`#ba1a1a`,onError:`#ffffff`,errorContainer:`#ffdad6`,onErrorContainer:`#410002`,background:`#fefbff`,onBackground:`#1b1b1f`,surface:`#fbf8fd`,onSurface:`#1b1b1f`,surfaceVariant:`#e2e1ec`,onSurfaceVariant:`#45464f`,outline:`#767680`,outlineVariant:`#c6c5d0`,shadow:`#000000`,scrim:`#000000`,inverseSurface:`#303034`,inverseOnSurface:`#f2f0f4`,inversePrimary:`#b6c4ff`,surfaceDim:`#dbd9de`,surfaceBright:`#fbf8fd`,surfaceContainerLowest:`#ffffff`,surfaceContainerLow:`#f5f3f7`,surfaceContainer:`#efedf1`,surfaceContainerHigh:`#eae7ec`,surfaceContainerHighest:`#e4e1e6`,warning:`#e3aa00`,onWarning:`#281b00`,warningContainer:`#ffdfa0`,onWarningContainer:`#261a00`,success:`#41ca82`,onSuccess:`#002311`,successContainer:`#77fbae`,onSuccessContainer:`#002110`,info:`#9bb0ff`,onInfo:`#001754`,infoContainer:`#dce1ff`,onInfoContainer:`#001550`},jt={...At},Mt={primary:`#035eff`,secondary:`#badcff`,tertiary:`#00ddfe`,neutral:`#000000`,neutralvariant:`#3f4f5b`,error:`#dd305c`,warning:`#feb600`,success:`#0cfecd`,info:`#175bfc`};function Q(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():``}var Nt=class{constructor(e,t){let n=P.fromHueAndChroma(e,t);for(let e=1;e<=99;e++)this[`_${e}`]=me(n.tone(e))}};function Pt(t){let n=(0,e.ref)({light:{...At},dark:{...jt}}),r=(0,e.ref)({...Mt,...t}),i=(0,e.ref)(`auto`),a=(0,e.ref)(`light`);function o(){return typeof window>`u`?`light`:window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function s(){a.value=i.value===`auto`?o():i.value}function c(e){i.value=e,s()}let l=null;function u(){i.value===`auto`&&s()}async function d(e){let t={...n.value.light},r={...n.value.dark};Object.keys(e).forEach(n=>{let i=he(e[n]),a=j.fromInt(i),o=new Nt(a.hue,a.chroma);switch(n){case`neutral`:Object.assign(t,{background:o._99,onBackground:o._10,surfaceDim:o._87,surface:o._98,surfaceBright:o._98,surfaceContainerLowest:`white`,surfaceContainerLow:o._96,surfaceContainer:o._94,surfaceContainerHigh:o._92,surfaceContainerHighest:o._90,onSurface:o._10,inverseSurface:o._20,inverseOnSurface:o._95}),Object.assign(r,{background:o._10,onBackground:o._85,surfaceContainerLowest:o._4,surfaceDim:o._6,surface:o._6,surfaceContainerLow:o._10,surfaceContainer:o._12,surfaceContainerHigh:o._17,surfaceContainerHighest:o._22,surfaceBright:o._24,onSurface:o._90,inverseSurface:o._98,inverseOnSurface:o._10});break;case`neutralvariant`:Object.assign(t,{surfaceVariant:o._80,onSurfaceVariant:o._40,outline:o._60,outlineVariant:o._90}),Object.assign(r,{surfaceVariant:o._20,onSurfaceVariant:o._60,outline:o._50,outlineVariant:o._30});break;case`primary`:Object.assign(t,{[n]:o._40,[`on${Q(n)}`]:o._98,[`${n}Container`]:o._90,[`on${Q(n)}Container`]:o._10,[`${n}Fixed`]:o._90,[`${n}FixedDim`]:o._80,[`on${Q(n)}Fixed`]:o._10,[`on${Q(n)}FixedVariant`]:o._30,inversePrimary:o._80}),Object.assign(r,{[n]:o._80,[`on${Q(n)}`]:o._20,[`${n}Container`]:o._30,[`on${Q(n)}Container`]:o._90,[`${n}Fixed`]:o._90,[`${n}FixedDim`]:o._80,[`on${Q(n)}Fixed`]:o._10,[`on${Q(n)}FixedVariant`]:o._30,inversePrimary:o._80});break;case`secondary`:case`tertiary`:Object.assign(t,{[n]:o._40,[`on${Q(n)}`]:o._98,[`${n}Container`]:o._90,[`on${Q(n)}Container`]:o._10,[`${n}Fixed`]:o._90,[`${n}FixedDim`]:o._80,[`on${Q(n)}Fixed`]:o._10,[`on${Q(n)}FixedVariant`]:o._30}),Object.assign(r,{[n]:o._80,[`on${Q(n)}`]:o._20,[`${n}Container`]:o._30,[`on${Q(n)}Container`]:o._90,[`${n}Fixed`]:o._90,[`${n}FixedDim`]:o._80,[`on${Q(n)}Fixed`]:o._10,[`on${Q(n)}FixedVariant`]:o._30}),Object.assign(t,{[n]:o._40,[`on${Q(n)}`]:o._98,[`${n}Container`]:o._90,[`on${Q(n)}Container`]:o._10}),Object.assign(r,{[n]:o._80,[`on${Q(n)}`]:o._20,[`${n}Container`]:o._30,[`on${Q(n)}Container`]:o._90});break;default:Object.assign(t,{[n]:o._40,[`on${Q(n)}`]:o._98,[`${n}Container`]:o._90,[`on${Q(n)}Container`]:o._10}),Object.assign(r,{[n]:o._80,[`on${Q(n)}`]:o._20,[`${n}Container`]:o._30,[`on${Q(n)}Container`]:o._90})}}),n.value={light:t,dark:r}}async function f(e){let t={};try{let n=await Ot(e);t.primary=n.light.primary,t.secondary=n.light.secondary,t.tertiary=n.light.tertiary,t.neutral=n.light.surfaceContainer;let i={info:{color:`#175bfc`,name:`info`},warning:{color:`#ffbf00`,name:`warning`},success:{color:`#42cb83`,name:`success`}};Object.keys(i).forEach(n=>{t[n]=me(_e(he(e),{value:he(i[n].color),blend:!0,name:i[n].name}).value)}),r.value={...r.value,...t}}catch(e){console.error(e)}}function p(){if(typeof document>`u`)return;let e=document.documentElement;Object.keys(n.value.light).forEach(t=>{e.style.setProperty(`--light__${t.toLowerCase()}_lkv`,n.value.light[t])}),Object.keys(n.value.dark).forEach(t=>{e.style.setProperty(`--dark__${t.toLowerCase()}_lkv`,n.value.dark[t])}),a.value===`dark`&&Object.keys(n.value.dark).forEach(t=>{e.style.setProperty(`--light__${t.toLowerCase()}_lkv`,n.value.dark[t])})}(0,e.watch)([n,a],p,{deep:!0}),(0,e.onMounted)(()=>{typeof window<`u`&&(l=window.matchMedia(`(prefers-color-scheme: dark)`),l.addEventListener(`change`,u),s()),d(r.value)}),(0,e.onUnmounted)(()=>{l&&=(l.removeEventListener(`change`,u),null)}),(0,e.watch)(r,e=>{d(e)},{deep:!0});let m={theme:n,updateTheme:d,updateThemeFromMaster:f,palette:r,colorMode:a,colorModePreference:i,setColorMode:c};return(0,e.provide)(kt,m),m}function Ft(){let t=(0,e.inject)(kt);if(!t)throw Error(`useTheme() must be used inside a component wrapped with provideTheme()`);return t}var It=Symbol(`liftkit-dropdown`),Lt=null;function Rt(e){Lt&&Lt!==e&&Lt.close(),Lt=e}function zt(e){Lt===e&&(Lt=null)}function Bt(){let t=(0,e.ref)(!1),n=(0,e.ref)(null),r=(0,e.ref)(null),i=null;function a(e){t.value=e,e&&i?Rt(i):!e&&i&&zt(i)}function o(){a(!t.value)}function s(e){r.value&&!r.value.contains(e.target)&&n.value&&!n.value.contains(e.target)&&a(!1)}function c(e){e.key===`Escape`&&t.value&&(a(!1),n.value?.focus())}(0,e.onMounted)(()=>{i={close:()=>a(!1)},document.addEventListener(`mousedown`,s),document.addEventListener(`keydown`,c)}),(0,e.onBeforeUnmount)(()=>{i&&zt(i),document.removeEventListener(`mousedown`,s),document.removeEventListener(`keydown`,c)});let l={open:t,setOpen:a,toggle:o,triggerRef:n,contentRef:r};return(0,e.provide)(It,l),l}function Vt(){let t=(0,e.inject)(It);if(!t)throw Error(`useDropdown() must be used inside a Dropdown component`);return t}var Ht=`primary.onprimary.primarycontainer.onprimarycontainer.secondary.onsecondary.secondarycontainer.onsecondarycontainer.tertiary.ontertiary.tertiarycontainer.ontertiarycontainer.error.onerror.errorcontainer.onerrorcontainer.background.onbackground.surface.onsurface.surfacevariant.onsurfacevariant.shadow.inversesurface.scrim.inverseonsurface.inverseprimary.success.onsuccess.successcontainer.onsuccesscontainer.warning.onwarning.warningcontainer.onwarningcontainer.info.oninfo.infocontainer.oninfocontainer.primaryfixed.onprimaryfixed.primaryfixeddim.onprimaryfixedvariant.secondaryfixed.onsecondaryfixed.secondaryfixeddim.onsecondaryfixedvariant.tertiaryfixed.ontertiaryfixed.tertiaryfixeddim.ontertiaryfixedvariant.surfacedim.surfacebright.surfacecontainerlowest.surfacecontainerlow.surfacecontainer.surfacecontainerhigh.surfacecontainerhighest.outline.outlinevariant`.split(`.`),Ut=[`primary`,`secondary`,`tertiary`,`error`,`warning`,`info`,`success`,`primarycontainer`,`secondarycontainer`,`tertiarycontainer`,`errorcontainer`,`warningcontainer`,`infocontainer`,`successcontainer`,`surface`,`surfacecontainerlowest`,`surfacecontainerlow`,`surfacecontainerhigh`,`surfacecontainerhighest`,`surfacevariant`,`inversesurface`,`background`],Wt=`primary.primarycontainer.secondary.secondarycontainer.tertiary.tertiarycontainer.error.errorcontainer.success.successcontainer.warning.warningcontainer.info.infocontainer.background.surface.surfacevariant.surfacecontainerlowest.surfacecontainerlow.surfacecontainer.surfacecontainerhigh.surfacecontainerhighest.inversesurface.primaryfixed.secondaryfixed.tertiaryfixed`.split(`.`);function Gt(){return Ht.filter(e=>!Wt.includes(e))}function Kt(e){let t=e.startsWith(`on`)||e.startsWith(`inverseon`),n=e.startsWith(`on`),r=e.endsWith(`fixed`),i=e.endsWith(`dim`),a=e.endsWith(`variant`);function o(e){switch(r){case!0:switch(n){case!0:return e.slice(2);case!1:return`on${e}`}case!1:switch(i){case!0:return`on${e.slice(0,-3)}variant`;case!1:switch(a){case!0:return`on${e.slice(0,-8)}fixed`;case!1:return`on${e}`}}}}var s;switch(t){case!1:switch(e){case`surfacecontainerlowest`:case`surfacecontainerlow`:case`surfacecontainer`:case`surfacecontainerhigh`:case`surfacecontainerhighest`:case`surfacedim`:case`surfacebright`:s=`onsurface`;break;case`inversesurface`:s=`inverseonsurface`;break;case`inverseprimary`:s=`onprimarycontainer`;break;case`shadow`:case`scrim`:s=`white`;break;case`primaryfixeddim`:case`secondaryfixeddim`:case`tertiaryfixeddim`:case`onprimaryfixed`:case`onsecondaryfixed`:case`ontertiaryfixed`:case`onprimaryfixedvariant`:case`onsecondaryfixedvariant`:case`ontertiaryfixedvariant`:s=o(e);break;case`outline`:case`outlinevariant`:s=`onsurfacevariant`;break;default:s=`on${e}`;break}break;default:switch(e){case`inverseonsurface`:s=`inversesurface`;break;default:s=e.slice(2)}}return s}function $(e,t){let n={};return Object.entries(e).forEach(([e,r])=>{if(r==null||typeof r==`function`||typeof r==`object`)return;let i=e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase();n[`data-lk-${t}-${i}`]=String(r)}),n}var qt=(0,e.defineComponent)({__name:`LkTheme`,props:{sourceColor:{default:void 0},colorMode:{default:`auto`},palette:{default:void 0}},setup(t,{expose:n}){let r=t,i=Pt((0,e.computed)(()=>{let e={};return r.palette&&Object.assign(e,r.palette),e}).value);return i.setColorMode(r.colorMode),r.sourceColor&&i.updateThemeFromMaster(r.sourceColor),n({theme:i}),(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({class:`lk-theme`},t.$attrs),[(0,e.renderSlot)(t.$slots,`default`)],16))}}),Jt={key:0,class:`position-fixed`,style:{zIndex:1e3}},Yt={key:0,class:`lk-theme-drawer`},Xt={class:`lk-theme-drawer-card shadow-lg mb-2xl`},Zt={class:`lk-theme-drawer-scroll`},Qt={class:`lk-column`,style:{gap:`var(--lk-size-md)`}},$t={class:`lk-row`,style:{"align-items":`center`,"justify-content":`space-between`}},en={xmlns:`http://www.w3.org/2000/svg`,width:`20`,height:`20`,viewBox:`0 0 24 24`,style:{display:`block`}},tn={class:`lk-theme-code-block position-relative`},nn={style:{"font-size":`0.618em`,overflow:`auto`}},rn={xmlns:`http://www.w3.org/2000/svg`,width:`20`,height:`20`,viewBox:`0 0 24 24`,style:{display:`block`}},an={class:`caption color-onsurfacevariant mb-xs`},on={class:`lk-row`,style:{gap:`var(--lk-size-xs)`}},sn=[`onClick`],cn={class:`lk-row`,style:{"align-items":`start`,gap:`var(--lk-size-md)`}},ln=[`name`,`value`,`onInput`],un={class:`lk-column`},dn=[`for`],fn={class:`caption color-onsurfacevariant mb-xs`},pn=[`name`,`value`,`onInput`],mn={class:`lk-column`},hn=[`for`],gn={class:`caption color-onsurfacevariant mb-xs`},_n=[`name`,`value`,`onInput`],vn={class:`lk-column`},yn=[`for`],bn={class:`caption color-onsurfacevariant mb-xs`},xn=(0,e.defineComponent)({__name:`LkThemeController`,setup(t){let{palette:n,updateTheme:r,updateThemeFromMaster:i,colorMode:a,colorModePreference:o,setColorMode:s}=Ft(),c=[`primary`,`secondary`,`tertiary`],l=[`error`,`warning`,`success`,`info`],u=[`neutral`,`neutralvariant`];(0,e.computed)(()=>Object.keys(n.value).map(e=>({key:e,value:n.value[e]})));let d=(0,e.ref)(!1);function f(e,t){e===`master`?i(t):n.value={...n.value,[e]:t}}function p(e){s(e)}async function m(){try{let e=`const palette = ${JSON.stringify(n.value,null,2)}\nconst colorMode = '${a.value}'`;await navigator.clipboard.writeText(e),alert(`Code copied`)}catch(e){console.error(`Failed to copy palette:`,e)}}function h(e){return{primary:`Main brand color, used for most UI elements.`,secondary:`Desaturated variant of primary.`,tertiary:`Your accent color. Defaults to complementary hue to primary.`,error:`A pink or red, indicating problems.`,warning:`An orange or yellow, indicating caution.`,success:`A green, indicating success.`,info:`A blue, indicating neutral information.`,neutral:`Backgrounds, surfaces, outlines, and default text color`,neutralvariant:`Surface variant, outline variant, and text color variant`}[e]||``}return(t,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,[d.value?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Jt,[(0,e.createElementVNode)(`button`,{class:`lk-theme-controller-trigger shadow-xl`,style:{position:`fixed`,zIndex:1e3,top:`var(--lk-size-xs)`,left:`var(--lk-size-xs)`},onClick:r[0]||=e=>d.value=!0},[...r[3]||=[(0,e.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`36`,height:`36`,viewBox:`2 2 20 20`,fill:`currentColor`},[(0,e.createElementVNode)(`path`,{d:`M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10a2.5 2.5 0 0 0 2.5-2.5c0-.61-.23-1.21-.64-1.67a.528.528 0 0 1-.13-.33c0-.28.22-.5.5-.5H16c3.31 0 6-2.69 6-6 0-4.96-4.49-9-10-9m-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3`})],-1)]])])),((0,e.openBlock)(),(0,e.createBlock)(e.Teleport,{to:`body`},[d.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Yt,[(0,e.createElementVNode)(`div`,Xt,[(0,e.createElementVNode)(`div`,Zt,[(0,e.createElementVNode)(`div`,Qt,[(0,e.createElementVNode)(`div`,$t,[r[5]||=(0,e.createElementVNode)(`h2`,{class:`body-bold`},`Theme Controller`,-1),(0,e.createElementVNode)(`button`,{style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,background:`#e8e0e5`,border:`none`,borderRadius:`50%`,width:`36px`,height:`36px`,cursor:`pointer`,padding:`0`},onClick:r[1]||=e=>d.value=!1,"aria-label":`Close`},[((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,en,[...r[4]||=[(0,e.createElementVNode)(`path`,{d:`M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z`,fill:`#1b1b1f`},null,-1)]]))])]),(0,e.createElementVNode)(`div`,null,[r[7]||=(0,e.createElementVNode)(`h2`,{class:`label mb-xs`},`Config`,-1),r[8]||=(0,e.createElementVNode)(`p`,{class:`caption color-onsurfacevariant mb-xs`},` Copy and paste this snippet into your theme config to update your project to match the current configuration. `,-1),(0,e.createElementVNode)(`div`,tn,[(0,e.createElementVNode)(`pre`,nn,`const palette = `+(0,e.toDisplayString)(JSON.stringify((0,e.unref)(n),null,2))+`
|
|
2
|
+
const colorMode = '`+(0,e.toDisplayString)((0,e.unref)(a))+`'`,1),(0,e.createElementVNode)(`button`,{style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,background:`#e8e0e5`,border:`none`,borderRadius:`50%`,width:`36px`,height:`36px`,cursor:`pointer`,padding:`0`,position:`absolute`,top:`1em`,right:`1em`},onClick:m},[((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,rn,[...r[6]||=[(0,e.createElementVNode)(`path`,{d:`M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z`,fill:`#1b1b1f`},null,-1)]]))])])]),(0,e.createElementVNode)(`div`,null,[r[9]||=(0,e.createElementVNode)(`h2`,{class:`capline mb-lg color-onsurfacevariant`},`Mode`,-1),(0,e.createElementVNode)(`p`,an,` Current: `+(0,e.toDisplayString)((0,e.unref)(a))+` `+(0,e.toDisplayString)((0,e.unref)(o)===`auto`?`(auto)`:``),1),(0,e.createElementVNode)(`div`,on,[((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)([`auto`,`light`,`dark`],t=>(0,e.createElementVNode)(`button`,{key:t,class:(0,e.normalizeClass)([`lk-mode-button`,{active:(0,e.unref)(o)===t}]),onClick:e=>p(t)},(0,e.toDisplayString)(t),11,sn)),64))])]),(0,e.createElementVNode)(`div`,null,[r[11]||=(0,e.createElementVNode)(`h2`,{class:`capline mb-lg color-onsurfacevariant`},`Globals`,-1),(0,e.createElementVNode)(`div`,cn,[(0,e.createElementVNode)(`input`,{type:`color`,name:`master`,class:`lk-color-input`,onInput:r[2]||=e=>f(`master`,e.target.value)},null,32),r[10]||=(0,e.createElementVNode)(`div`,{class:`lk-column`},[(0,e.createElementVNode)(`label`,{class:`label mb-xs`,for:`master`},`master`),(0,e.createElementVNode)(`p`,{class:`caption color-onsurfacevariant mb-xs`},[(0,e.createTextVNode)(` The seed color. `),(0,e.createElementVNode)(`strong`,{class:`color-error`},`If you edit this, all other color tokens will reset.`)])],-1)])]),(0,e.createElementVNode)(`div`,null,[r[12]||=(0,e.createElementVNode)(`h2`,{class:`capline mb-lg color-onsurfacevariant`},`Brand`,-1),((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(c,t=>(0,e.createElementVNode)(`div`,{key:t,class:`lk-row mb-sm`,style:{"align-items":`start`,gap:`var(--lk-size-md)`}},[(0,e.createElementVNode)(`input`,{type:`color`,name:t,value:(0,e.unref)(n)[t],class:`lk-color-input`,onInput:e=>f(t,e.target.value)},null,40,ln),(0,e.createElementVNode)(`div`,un,[(0,e.createElementVNode)(`label`,{class:`caption-bold mono mb-2xs`,for:t},(0,e.toDisplayString)(t),9,dn),(0,e.createElementVNode)(`p`,fn,(0,e.toDisplayString)(h(t)),1)])])),64))]),(0,e.createElementVNode)(`div`,null,[r[13]||=(0,e.createElementVNode)(`h2`,{class:`capline color-onsurfacevariant mb-lg`},`Semantic`,-1),((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(l,t=>(0,e.createElementVNode)(`div`,{key:t,class:`lk-row mb-sm`,style:{"align-items":`start`,gap:`var(--lk-size-md)`}},[(0,e.createElementVNode)(`input`,{type:`color`,name:t,value:(0,e.unref)(n)[t],class:`lk-color-input`,onInput:e=>f(t,e.target.value)},null,40,pn),(0,e.createElementVNode)(`div`,mn,[(0,e.createElementVNode)(`label`,{class:`caption-bold mono mb-2xs`,for:t},(0,e.toDisplayString)(t),9,hn),(0,e.createElementVNode)(`p`,gn,(0,e.toDisplayString)(h(t)),1)])])),64))]),(0,e.createElementVNode)(`div`,null,[r[14]||=(0,e.createElementVNode)(`h2`,{class:`capline color-onsurfacevariant mb-lg`},`Layout`,-1),((0,e.openBlock)(),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(u,t=>(0,e.createElementVNode)(`div`,{key:t,class:`lk-row mb-sm`,style:{"align-items":`start`,gap:`var(--lk-size-md)`}},[(0,e.createElementVNode)(`input`,{type:`color`,name:t,value:(0,e.unref)(n)[t],class:`lk-color-input`,onInput:e=>f(t,e.target.value)},null,40,_n),(0,e.createElementVNode)(`div`,vn,[(0,e.createElementVNode)(`label`,{class:`caption-bold mono mb-xs`,for:t},(0,e.toDisplayString)(t),9,yn),(0,e.createElementVNode)(`p`,bn,(0,e.toDisplayString)(h(t)),1)])])),64))])])])])])):(0,e.createCommentVNode)(``,!0)]))],64))}}),Sn=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Cn=Sn(xn,[[`__scopeId`,`data-v-186889e9`]]),wn=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkContainer`,props:{maxWidth:{default:`md`}},setup(t){let n=t,r=(0,e.computed)(()=>$({maxWidth:n.maxWidth},`container`));return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.normalizeProps)((0,e.guardReactiveProps)({...t.$attrs,...r.value})),[(0,e.renderSlot)(t.$slots,`default`)],16))}}),Tn=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkColumn`,props:{alignItems:{default:`stretch`},justifyContent:{default:`start`},gap:{},wrapChildren:{type:Boolean},defaultChildBehavior:{}},setup(t){let n=t,r=(0,e.computed)(()=>$({alignItems:n.alignItems,justifyContent:n.justifyContent,gap:n.gap,wrapChildren:n.wrapChildren,defaultChildBehavior:n.defaultChildBehavior},`column`));return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({...t.$attrs,...r.value},{"data-lk-component":`column`}),[(0,e.renderSlot)(t.$slots,`default`)],16))}}),En=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkRow`,props:{alignItems:{default:`start`},justifyContent:{default:`start`},gap:{},wrapChildren:{type:Boolean},defaultChildBehavior:{}},setup(t){let n=t,r=(0,e.computed)(()=>$({alignItems:n.alignItems,justifyContent:n.justifyContent,gap:n.gap,wrapChildren:n.wrapChildren,defaultChildBehavior:n.defaultChildBehavior},`row`));return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({...t.$attrs,...r.value},{"data-lk-component":`row`}),[(0,e.renderSlot)(t.$slots,`default`)],16))}}),Dn={"data-lk-component":`section`},On=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkSection`,props:{padding:{},px:{},py:{},pt:{},pb:{},pl:{},pr:{}},setup(t){let n=t,r=(0,e.computed)(()=>$({padding:n.padding,px:n.px,py:n.py,pt:n.pt,pb:n.pb,pl:n.pl,pr:n.pr},`section`));return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`section`,(0,e.normalizeProps)((0,e.guardReactiveProps)({...t.$attrs,...r.value})),[(0,e.createElementVNode)(`div`,Dn,[(0,e.renderSlot)(t.$slots,`default`)])],16))}}),kn=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkGrid`,props:{columns:{default:2},gap:{default:`md`},autoResponsive:{type:Boolean,default:!1},class:{}},setup(t){let n=t,r=(0,e.useSlots)(),i=(0,e.computed)(()=>$({autoResponsive:n.autoResponsive,gap:n.gap},`grid`)),a=(0,e.computed)(()=>n.class?{}:{gridTemplateColumns:`repeat(${n.columns}, 1fr)`}),o=(0,e.computed)(()=>!!r.default),s=(0,e.computed)(()=>o.value?0:n.class?n.columns:n.columns*2);return(t,r)=>{let c=(0,e.resolveComponent)(`LkPlaceholderBlock`);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`grid`},{...t.$attrs,...i.value},{class:n.class,style:a.value}),[(0,e.renderSlot)(t.$slots,`default`),o.value?(0,e.createCommentVNode)(``,!0):((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,{key:0},(0,e.renderList)(s.value,t=>((0,e.openBlock)(),(0,e.createBlock)(c,{key:t}))),128))],16)}}}),An={"data-lk-component":`placeholder-block`},jn=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkPlaceholderBlock`,setup(t){return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,An))}}),Mn=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkHeading`,props:{tag:{default:`h2`},fontClass:{default:`display2-bold`},fontColor:{},class:{}},setup(t){let n=t,r=(0,e.computed)(()=>$({},`heading`)),i=(0,e.computed)(()=>{let e=[];return n.fontClass&&e.push(n.fontClass),n.fontColor&&e.push(`color-${n.fontColor}`),n.class&&e.push(n.class),e.join(` `)});return(t,a)=>((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(n.tag),(0,e.mergeProps)({"data-lk-component":`heading`,class:i.value},{...t.$attrs,...r.value}),{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(t.$slots,`default`)]),_:3},16,[`class`]))}}),Nn=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkText`,props:{tag:{default:`div`},fontClass:{},color:{},class:{}},setup(t){let n=t,r=(0,e.computed)(()=>{let e=[];return n.fontClass&&e.push(n.fontClass),n.color&&e.push(`color-${n.color}`),n.class&&e.push(n.class),e.join(` `)});return(t,i)=>((0,e.openBlock)(),(0,e.createBlock)((0,e.resolveDynamicComponent)(n.tag),(0,e.mergeProps)({"data-lk-component":`text`,class:r.value},t.$attrs),{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(t.$slots,`default`)]),_:3},16,[`class`]))}}),Pn=[`data-lk-badge-scale`,`data-lk-badge-color`],Fn={"data-lk-component":`slot`,"data-lk-slot":`icon`},In={"data-lk-icon-element":`wrapper`},Ln=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkBadge`,props:{icon:{default:`roller-coaster`},color:{default:`surface`},scale:{default:`md`},iconStrokeWidth:{default:0},scrim:{type:Boolean,default:!1}},setup(t){let n=t,r=(0,e.computed)(()=>Kt(n.color)),i=(0,e.computed)(()=>{switch(n.scale){case`lg`:return 1;default:return 1.5}}),a=(0,e.computed)(()=>n.iconStrokeWidth||i.value);return(t,i)=>{let o=(0,e.resolveComponent)(`LkIcon`);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`badge`,"data-lk-badge-scale":n.scale,"data-lk-badge-color":`lk-${n.color}`},t.$attrs),[(0,e.createElementVNode)(`div`,Fn,[(0,e.createElementVNode)(`div`,In,[(0,e.createVNode)(o,{name:n.icon,color:r.value,"stroke-width":a.value},null,8,[`name`,`color`,`stroke-width`])])]),n.scrim?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,"data-lk-component":`badge-scrim`,class:(0,e.normalizeClass)(`bg-${r.value}`)},null,2)):(0,e.createCommentVNode)(``,!0)],16,Pn)}}}),Rn=[`data-lk-icon-offset`,`data-lk-icon-font-class`],zn=[`stroke`,`stroke-width`],Bn=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkIcon`,props:{name:{default:`roller-coaster`},fontClass:{},color:{default:`onsurface`},display:{},strokeWidth:{default:2},opticShift:{type:Boolean,default:!1}},setup(t){let n=t;return(0,e.computed)(()=>({width:`1em`,height:`1em`,color:`var(--lk-${n.color})`,strokeWidth:n.strokeWidth})),(t,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`icon`,"data-lk-icon-offset":n.opticShift,"data-lk-icon-font-class":n.fontClass},t.$attrs),[(0,e.renderSlot)(t.$slots,`default`,{},()=>[((0,e.openBlock)(),(0,e.createElementBlock)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`var(--lk-${n.color})`,"stroke-width":n.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,8,zn))])],16,Rn))}}),Vn=[`src`,`alt`],Hn=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkImage`,props:{aspect:{default:`auto`},borderRadius:{},objectFit:{default:`fill`},width:{default:`auto`},height:{default:`auto`},src:{},alt:{default:``}},setup(t){let n=t,r=(0,e.computed)(()=>$({aspect:n.aspect,borderRadius:n.borderRadius,objectFit:n.objectFit,width:n.width,height:n.height},`image`));return(t,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`img`,(0,e.mergeProps)({"data-lk-component":`image`},{...t.$attrs,...r.value},{src:n.src,alt:n.alt}),null,16,Vn))}}),Un=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkSticker`,props:{fontClass:{default:`label`},bgColor:{default:`primarycontainer`},class:{}},setup(t){let n=t,r=(0,e.computed)(()=>Kt(n.bgColor)),i=(0,e.computed)(()=>{let e=[`bg-${n.bgColor}`,`color-${r.value}`];return n.class&&e.push(n.class),e.join(` `)});return(t,r)=>{let a=(0,e.resolveComponent)(`LkText`);return(0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`sticker`,class:i.value},t.$attrs),[(0,e.createVNode)(a,{"font-class":n.fontClass},{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(t.$slots,`default`,{},()=>[r[0]||=(0,e.createTextVNode)(`Sticker`,-1)])]),_:3},8,[`font-class`])],16)}}}),Wn=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkStateLayer`,props:{bgColor:{default:`currentColor`},forcedState:{}},setup(t){let n=t,r=(0,e.computed)(()=>n.bgColor===`currentColor`?``:`bg-${n.bgColor}`),i=(0,e.computed)(()=>n.bgColor===`currentColor`?{backgroundColor:`currentColor`}:{});return(t,a)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`state-layer`,class:r.value,style:i.value},n.forcedState?{"data-lk-forced-state":n.forcedState}:{}),null,16))}}),Gn=[`data-lk-material-type`],Kn={key:0},qn={key:1},Jn=Sn((0,e.defineComponent)({inheritAttrs:!1,__name:`LkMaterialLayer`,props:{zIndex:{default:0},type:{},materialProps:{}},setup(t){let n=t;(0,e.computed)(()=>n.materialProps&&n.type?$(n.materialProps,n.type):{});let r=(0,e.computed)(()=>n.materialProps),i=(0,e.computed)(()=>({opacity:r.value?.tintOpacity||.2,backgroundColor:`var(--lk-${r.value?.tint||`transparent`})`})),a=(0,e.computed)(()=>({"--blur-thick":`var(--lk-size-lg)`,"--blur-normal":`var(--lk-size-md)`,"--blur-thin":`var(--lk-size-xs)`,zIndex:1,isolation:`isolate`,backdropFilter:`blur(var(--blur-${r.value?.thickness||`normal`}))`})),o=(0,e.computed)(()=>({background:r.value?.lightExpression||`none`,mixBlendMode:`soft-light`,opacity:1})),s=(0,e.computed)(()=>{switch(r.value?.thickness||`normal`){case`thick`:return .8;case`normal`:return .6;case`thin`:return .4;default:return .6}}),c=(0,e.computed)(()=>({backgroundColor:`var(--lk-surface)`,opacity:s.value})),l=(0,e.computed)(()=>n.materialProps),u=(0,e.computed)(()=>({backgroundColor:l.value?.bgColor?`var(--lk-${l.value.bgColor})`:`var(--lk-surface)`}));return(t,s)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{"data-lk-component":`material-layer`,"data-lk-material-type":n.type,style:(0,e.normalizeStyle)({zIndex:n.zIndex})},[n.type===`glass`?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Kn,[(0,e.createElementVNode)(`div`,{"data-lk-material-sublayer":`texture`,style:(0,e.normalizeStyle)(a.value)},[r.value?.tint?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,"data-lk-material-sublayer":`tint`,style:(0,e.normalizeStyle)(i.value)},[r.value?.light?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,"data-lk-material-sublayer":`light`,style:(0,e.normalizeStyle)(o.value)},null,4)):(0,e.createCommentVNode)(``,!0)],4)):(0,e.createCommentVNode)(``,!0)],4),(0,e.createElementVNode)(`div`,{"data-lk-material-sublayer":`base-glass-fill`,style:(0,e.normalizeStyle)(c.value)},null,4)])):(0,e.createCommentVNode)(``,!0),n.type===`flat`?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,qn,[(0,e.createElementVNode)(`div`,{"data-lk-material-sublayer":`bgColor`,style:(0,e.normalizeStyle)(u.value)},null,4)])):(0,e.createCommentVNode)(``,!0)],12,Gn))}}),[[`__scopeId`,`data-v-909bf003`]]),Yn=[`data-lk-card-optical-correction`],Xn={"data-lk-component":`slot`,"data-lk-slot":`children`},Zn=[`data-lk-material-bg-color`],Qn=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkCard`,props:{scaleFactor:{default:`body`},variant:{default:`fill`},material:{default:`flat`},materialProps:{default:()=>({})},opticalCorrection:{default:`none`},isClickable:{type:Boolean,default:!1},bgColor:{},isScrollable:{type:Boolean,default:!1}},setup(t){let n=t,r=(0,e.useAttrs)(),i=(0,e.computed)(()=>$({scaleFactor:n.scaleFactor,variant:n.variant,material:n.material},`card`)),a=(0,e.computed)(()=>{let e=[];return n.isClickable&&e.push(`clickable`),e.join(` `)}),o=(0,e.computed)(()=>n.variant===`fill`?n.bgColor:`transparent`);return(n,s)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`card`,class:a.value},{...i.value,...(0,e.unref)(r)}),[(0,e.createElementVNode)(`div`,{"data-lk-card-element":`padding-box`,class:(0,e.normalizeClass)(t.isScrollable?`overflow-auto`:``),"data-lk-card-optical-correction":t.opticalCorrection},[(0,e.createElementVNode)(`div`,Xn,[(0,e.renderSlot)(n.$slots,`default`)])],10,Yn),t.material===`glass`?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({key:0,"data-lk-component":`material-layer`,"data-lk-material-layer-type":`glass`},(0,e.unref)($)(t.materialProps,`material`)),null,16)):(0,e.createCommentVNode)(``,!0),t.material===`flat`?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:1,"data-lk-component":`material-layer`,"data-lk-material-layer-type":`flat`,"data-lk-material-bg-color":o.value},null,8,Zn)):(0,e.createCommentVNode)(``,!0)],16))}}),$n=(0,e.defineComponent)({__name:`LkDropdown`,setup(t){let{open:n,toggle:r,setOpen:i}=Bt();return(t,a)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`dropdown`},t.$attrs),[(0,e.renderSlot)(t.$slots,`default`,{isOpen:(0,e.unref)(n),toggle:(0,e.unref)(r),close:()=>(0,e.unref)(i)(!1)})],16))}}),er=[`aria-expanded`],tr=(0,e.defineComponent)({__name:`LkDropdownTrigger`,setup(t){let{open:n,toggle:r,triggerRef:i}=Vt(),a=(0,e.ref)(null);(0,e.onMounted)(()=>{if(a.value){let e=a.value.firstElementChild;e?i.value=e:i.value=a.value}}),(0,e.onBeforeUnmount)(()=>{i.value=null});function o(){r()}return(t,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{ref_key:`localRef`,ref:a,"data-lk-component":`dropdown-trigger`,"aria-expanded":(0,e.unref)(n),"aria-haspopup":`menu`,onClick:o},[(0,e.renderSlot)(t.$slots,`default`)],8,er))}}),nr=[`data-isactive`,`data-lk-dropdown-trigger-quadrant`],rr=(0,e.defineComponent)({__name:`LkDropdownMenu`,props:{scaleFactor:{default:`body`}},setup(t){let{open:n,triggerRef:r,contentRef:i}=Vt(),a=(0,e.ref)(null),o=(0,e.ref)({}),s=(0,e.ref)(`bottom-left`);function c(){if(!r.value)return;let e=r.value.getBoundingClientRect(),t=window.innerWidth,n=window.innerHeight,i=e.top<n/2,a=e.left<t/2;switch(i?s.value=a?`bottom-left`:`bottom-right`:s.value=a?`top-left`:`top-right`,s.value){case`top-left`:o.value={top:`${e.top+window.scrollY}px`,left:`${e.left+window.scrollX}px`};break;case`top-right`:o.value={top:`${e.top+window.scrollY}px`,left:`${e.right+window.scrollX}px`};break;case`bottom-right`:o.value={top:`${e.bottom+window.scrollY}px`,left:`${e.right+window.scrollX}px`};break;default:o.value={top:`${e.bottom+window.scrollY}px`,left:`${e.left+window.scrollX}px`};break}}return(0,e.watch)(n,e=>{e&&c()}),(0,e.onMounted)(()=>{a.value&&(i.value=a.value)}),(0,e.onBeforeUnmount)(()=>{i.value=null}),(i,c)=>((0,e.openBlock)(),(0,e.createBlock)(e.Teleport,{to:`body`},[(0,e.unref)(n)&&(0,e.unref)(r)?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,ref_key:`localContentRef`,ref:a,style:(0,e.normalizeStyle)(o.value),role:`menu`,"data-lk-component":`dropdown-menu`,"data-isactive":(0,e.unref)(n),"data-lk-dropdown-trigger-quadrant":s.value},[(0,e.createVNode)(Qn,{class:`shadow-xl`,"scale-factor":t.scaleFactor},{default:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,{"data-lk-component":`column`,"data-lk-column-gap":`none`,class:(0,e.normalizeClass)(t.scaleFactor)},[(0,e.renderSlot)(i.$slots,`default`)],2)]),_:3},8,[`scale-factor`])],12,nr)):(0,e.createCommentVNode)(``,!0)]))}}),ir=[`name`,`value`],ar=[`value`],or=Symbol(`liftkit-select`),sr=(0,e.defineComponent)({__name:`LkSelect`,props:{modelValue:{default:``},options:{default:()=>[]},name:{},label:{},labelPosition:{default:`default`},helpText:{},placeholderText:{}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=t,i=n,a=(0,e.ref)(!1),o=(0,e.ref)(null),s=(0,e.ref)(null),c=(0,e.ref)(null),l=(0,e.ref)(r.modelValue);(0,e.watch)(()=>r.modelValue,e=>{l.value=e??``});function u(e){a.value=e}function d(){u(!a.value)}function f(e){l.value=e,i(`update:modelValue`,e),u(!1)}let p=null;(0,e.watch)(a,e=>{e&&(p={close:()=>u(!1)},window.dispatchEvent(new CustomEvent(`lk-select-opened`,{detail:p})))});function m(e){p&&e.detail!==p&&a.value&&u(!1)}function h(e){s.value&&!s.value.contains(e.target)&&o.value&&!o.value.contains(e.target)&&u(!1)}function g(e){e.key===`Escape`&&a.value&&(u(!1),o.value?.focus())}return(0,e.onMounted)(()=>{document.addEventListener(`mousedown`,h),document.addEventListener(`keydown`,g),window.addEventListener(`lk-select-opened`,m)}),(0,e.onBeforeUnmount)(()=>{document.removeEventListener(`mousedown`,h),document.removeEventListener(`keydown`,g),window.removeEventListener(`lk-select-opened`,m)}),(0,e.provide)(or,{open:a,setOpen:u,toggle:d,triggerRef:o,contentRef:s,selectedValue:l,setSelectedValue:f,options:(0,e.computed)(()=>r.options),name:r.name}),(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`select`},n.$attrs),[(0,e.createElementVNode)(`select`,{ref_key:`hiddenSelectRef`,ref:c,name:t.name,value:l.value,tabindex:`-1`,"aria-hidden":`true`,style:{position:`absolute`,left:`-9999px`,width:`1px`,height:`1px`,opacity:`0`,"pointer-events":`none`}},[r[0]||=(0,e.createElementVNode)(`option`,{value:``,disabled:``},null,-1),((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.options,t=>((0,e.openBlock)(),(0,e.createElementBlock)(`option`,{key:t.value,value:t.value},(0,e.toDisplayString)(t.label),9,ar))),128))],8,ir),(0,e.renderSlot)(n.$slots,`default`,{isOpen:a.value,toggle:d,selectedValue:l.value,setSelectedValue:f})],16))}}),cr=[`aria-expanded`],lr=(0,e.defineComponent)({__name:`LkSelectTrigger`,setup(t){let n=(0,e.inject)(or);if(!n)throw Error(`LkSelectTrigger must be used inside an LkSelect component`);let{open:r,toggle:i,triggerRef:a}=n,o=(0,e.ref)(null);(0,e.onMounted)(()=>{if(o.value){let e=o.value.firstElementChild;e?a.value=e:a.value=o.value}}),(0,e.onBeforeUnmount)(()=>{a.value=null});function s(){i()}return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{ref_key:`localRef`,ref:o,"data-lk-component":`select-trigger`,"aria-expanded":(0,e.unref)(r),"aria-haspopup":`menu`,onClick:s},[(0,e.renderSlot)(t.$slots,`default`)],8,cr))}}),ur=[`data-isactive`],dr=(0,e.defineComponent)({__name:`LkSelectMenu`,props:{scaleFactor:{default:`body`}},setup(t){let n=(0,e.inject)(or);if(!n)throw Error(`LkSelectMenu must be used inside an LkSelect component`);let{open:r,triggerRef:i,contentRef:a}=n,o=(0,e.ref)(null),s=(0,e.ref)({});function c(){if(!i.value)return;let e=i.value.getBoundingClientRect();s.value={top:`${e.bottom+window.scrollY}px`,left:`${e.left+window.scrollX}px`}}return(0,e.watch)(r,e=>{e&&c()}),(0,e.onMounted)(()=>{o.value&&(a.value=o.value)}),(0,e.onBeforeUnmount)(()=>{a.value=null}),(n,a)=>((0,e.openBlock)(),(0,e.createBlock)(e.Teleport,{to:`body`},[(0,e.unref)(r)&&(0,e.unref)(i)?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{key:0,ref_key:`localContentRef`,ref:o,style:(0,e.normalizeStyle)(s.value),role:`menu`,"data-lk-component":`select-menu`,"data-isactive":(0,e.unref)(r)},[(0,e.createVNode)(Qn,{class:`shadow-xl`,"scale-factor":t.scaleFactor},{default:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,{"data-lk-component":`column`,"data-lk-column-gap":`none`,class:(0,e.normalizeClass)(t.scaleFactor)},[(0,e.renderSlot)(n.$slots,`default`)],2)]),_:3},8,[`scale-factor`])],12,ur)):(0,e.createCommentVNode)(``,!0)]))}}),fr=[`data-selected`],pr={"data-lk-menu-item-element":`content-wrap`},mr=[`data-lk-state-layer-forced-state`],hr=(0,e.defineComponent)({__name:`LkSelectOption`,props:{value:{}},setup(t){let n=t,r=(0,e.inject)(or);if(!r)throw Error(`LkSelectOption must be used inside an LkSelect component`);let{selectedValue:i,setSelectedValue:a}=r,o=(0,e.computed)(()=>i.value===n.value);function s(){a(n.value)}function c(e){(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s())}return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,{role:`menuitem`,"data-lk-component":`menu-item`,tabindex:0,"data-selected":o.value,style:(0,e.normalizeStyle)({cursor:`pointer`,fontWeight:o.value?`bold`:`normal`}),class:`select-option`,onClick:s,onKeydown:c},[(0,e.renderSlot)(t.$slots,`startIcon`),(0,e.createElementVNode)(`p`,pr,[(0,e.renderSlot)(t.$slots,`default`)]),(0,e.renderSlot)(t.$slots,`endIcon`),(0,e.createElementVNode)(`div`,{"data-lk-component":`state-layer`,"data-lk-state-layer-forced-state":o.value?`active`:void 0},null,8,mr)],44,fr))}}),gr={"data-lk-component":`row`,"data-lk-row-align-items":`center`},_r={key:0,"data-lk-slot":`snackbar-icon`},vr={"data-lk-slot":`snackbar-text`},yr={"data-lk-component":`row`},br={key:0,"data-lk-slot":`snackbar-actions`},xr={key:1,"data-lk-slot":`snackbar-icon-actions`},Sr=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkSnackbar`,props:{globalColor:{},message:{default:`Notification text goes here.`},modelValue:{type:Boolean,default:!0},autoDismiss:{default:0}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=t,i=n,a=(0,e.useAttrs)(),o=(0,e.ref)(r.modelValue),s=null;(0,e.watch)(()=>r.modelValue,e=>{o.value=e,e&&r.autoDismiss>0&&c()});function c(){l(),r.autoDismiss>0&&(s=setTimeout(()=>{o.value=!1,i(`update:modelValue`,!1)},r.autoDismiss))}function l(){s&&=(clearTimeout(s),null)}(0,e.onMounted)(()=>{o.value&&r.autoDismiss>0&&c()}),(0,e.onUnmounted)(()=>{l()});let u=(0,e.computed)(()=>$({globalColor:r.globalColor,message:r.message},`snackbar`)),d=(0,e.computed)(()=>{if(r.globalColor)return Kt(r.globalColor)});return(n,r)=>((0,e.openBlock)(),(0,e.createBlock)(e.Teleport,{to:`body`},[o.value?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({key:0,"data-lk-component":`snackbar`},{...u.value,...(0,e.unref)(a)}),[(0,e.createVNode)(Qn,{"scale-factor":n.$slots.icon?`subheading`:`body`,"bg-color":t.globalColor,"optical-correction":n.$slots.icon?`none`:`y`,class:`shadow-sm`},{default:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,gr,[n.$slots.icon?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,_r,[(0,e.renderSlot)(n.$slots,`icon`,{onColor:d.value})])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,vr,[(0,e.renderSlot)(n.$slots,`default`,{onColor:d.value,globalColor:t.globalColor},()=>[(0,e.createElementVNode)(`p`,null,(0,e.toDisplayString)(t.message),1)])]),(0,e.createElementVNode)(`div`,yr,[n.$slots.action?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,br,[(0,e.renderSlot)(n.$slots,`action`,{onColor:d.value,globalColor:t.globalColor})])):(0,e.createCommentVNode)(``,!0),n.$slots.iconAction?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,xr,[(0,e.renderSlot)(n.$slots,`iconAction`,{onColor:d.value,globalColor:t.globalColor})])):(0,e.createCommentVNode)(``,!0)])])]),_:3},8,[`scale-factor`,`bg-color`,`optical-correction`])],16)):(0,e.createCommentVNode)(``,!0)]))}}),Cr={class:`navbar-desktop`},wr={"data-lk-component":`row`,"data-lk-row-align-items":`center`,"data-lk-row-gap":`sm`},Tr=[`href`],Er=[`alt`,`src`],Dr={"data-lk-component":`row`},Or={"data-lk-component":`row`,"data-lk-slot":`nav-buttons`},kr={"data-lk-component":`row`,"data-lk-slot":`nav-dropdowns`},Ar={"data-lk-component":`row`,"data-lk-navbar-el":`nav-menu-end`},jr={"data-lk-slot":`nav-icon-buttons`},Mr={"data-lk-slot":`nav-cta-buttons`},Nr={"data-lk-navbar-el":`nav-menu`},Pr=[`aria-expanded`],Fr=[`href`],Ir=[`alt`,`src`],Lr={"data-lk-component":`column`},Rr={"data-lk-component":`column`},zr={"data-lk-component":`column`,class:`flex-h gap-sm`},Br={key:0,"data-lk-component":`material-layer`,"data-lk-material-layer-type":`glass`},Vr=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkNavbar`,props:{material:{default:`flat`},homeHref:{default:`/`},logoSrc:{default:`/logotype.svg`},logoAlt:{default:``}},setup(t){let n=t,r=(0,e.useAttrs)(),i=(0,e.ref)(!1);function a(){i.value=!i.value}let o=(0,e.computed)(()=>$({material:n.material},`navbar`));return(n,s)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`navbar`},{...o.value,...(0,e.unref)(r)}),[(0,e.createElementVNode)(`div`,Cr,[(0,e.createElementVNode)(`div`,wr,[(0,e.renderSlot)(n.$slots,`brand`,{},()=>[(0,e.createElementVNode)(`a`,{href:t.homeHref},[(0,e.createElementVNode)(`img`,{alt:t.logoAlt,src:t.logoSrc,"data-lk-component":`image`,"data-lk-image-height":`md`},null,8,Er)],8,Tr)])]),(0,e.createElementVNode)(`div`,Dr,[(0,e.createElementVNode)(`div`,Or,[(0,e.renderSlot)(n.$slots,`navButtons`)]),(0,e.createElementVNode)(`div`,kr,[(0,e.renderSlot)(n.$slots,`navDropdowns`)])]),(0,e.createElementVNode)(`div`,Ar,[(0,e.createElementVNode)(`div`,jr,[(0,e.renderSlot)(n.$slots,`iconButtons`)]),(0,e.createElementVNode)(`div`,Mr,[(0,e.renderSlot)(n.$slots,`ctaButtons`)])])]),(0,e.createElementVNode)(`div`,Nr,[(0,e.createElementVNode)(`div`,{"data-lk-component":`column`,"data-lk-column-align-items":`start`,class:(0,e.normalizeClass)([`navbar-mobile`,{active:i.value}])},[(0,e.createElementVNode)(`button`,{class:`navbar-menu-toggle`,type:`button`,"aria-label":`Toggle menu`,"aria-expanded":i.value,onClick:a},[(0,e.renderSlot)(n.$slots,`menuIcon`,{},()=>[s[0]||=(0,e.createElementVNode)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[(0,e.createElementVNode)(`line`,{x1:`3`,y1:`6`,x2:`21`,y2:`6`}),(0,e.createElementVNode)(`line`,{x1:`3`,y1:`12`,x2:`21`,y2:`12`}),(0,e.createElementVNode)(`line`,{x1:`3`,y1:`18`,x2:`21`,y2:`18`})],-1)])],8,Pr),(0,e.renderSlot)(n.$slots,`mobileBrand`,{},()=>[(0,e.createElementVNode)(`a`,{href:t.homeHref},[(0,e.createElementVNode)(`img`,{alt:t.logoAlt,src:t.logoSrc,"data-lk-component":`image`,"data-lk-image-width":`md`,"data-lk-image-height":`md`},null,8,Ir)],8,Fr)]),(0,e.withDirectives)((0,e.createElementVNode)(`div`,Lr,[(0,e.renderSlot)(n.$slots,`navButtons`)],512),[[e.vShow,i.value]]),(0,e.withDirectives)((0,e.createElementVNode)(`div`,Rr,[(0,e.renderSlot)(n.$slots,`navDropdowns`)],512),[[e.vShow,i.value]]),(0,e.withDirectives)((0,e.createElementVNode)(`div`,null,[(0,e.renderSlot)(n.$slots,`iconButtons`)],512),[[e.vShow,i.value]]),(0,e.withDirectives)((0,e.createElementVNode)(`div`,zr,[(0,e.renderSlot)(n.$slots,`ctaButtons`)],512),[[e.vShow,i.value]])],2)]),t.material===`glass`?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Br)):(0,e.createCommentVNode)(``,!0)],16))}}),Hr={"data-lk-button-content-wrap":`true`},Ur={key:0,"data-lk-icon-position":`start`},Wr={"data-lk-button-child":`button-text`},Gr={key:1,"data-lk-icon-position":`end`},Kr=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkButton`,props:{label:{default:`Button`},variant:{default:`fill`},color:{default:`primary`},size:{default:`md`},material:{},startIcon:{},endIcon:{},opticIconShift:{type:Boolean,default:!0},modifiers:{},stateLayerOverride:{}},setup(t){let n=t,r=(0,e.computed)(()=>$({variant:n.variant,color:n.color,size:n.size,startIcon:n.startIcon,endIcon:n.endIcon,opticIconShift:n.opticIconShift},`button`)),i=(0,e.computed)(()=>Kt(n.color)),a=(0,e.computed)(()=>{let e=``;switch(n.variant){case`fill`:e=`bg-${n.color} color-${i.value}`;break;case`outline`:case`text`:e=`color-${n.color}`;break;default:e=`bg-${n.color} color-${i.value}`;break}return n.modifiers&&(e+=` ${n.modifiers}`),e}),o=(0,e.computed)(()=>n.stateLayerOverride?n.stateLayerOverride:{bgColor:n.variant===`fill`?i.value:n.color}),s=(0,e.computed)(()=>n.variant===`fill`?i.value:n.color);return(n,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,(0,e.mergeProps)({...n.$attrs,...r.value},{type:`button`,"data-lk-component":`button`,class:`${a.value} ${t.modifiers||``}`}),[(0,e.createElementVNode)(`div`,Hr,[t.startIcon?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Ur,[(0,e.createVNode)(Bn,{name:t.startIcon,color:s.value,"data-lk-icon-position":`start`},null,8,[`name`,`color`])])):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`span`,Wr,(0,e.toDisplayString)(t.label??`Button`),1),t.endIcon?((0,e.openBlock)(),(0,e.createElementBlock)(`div`,Gr,[(0,e.createVNode)(Bn,{name:t.endIcon,color:s.value,"data-lk-icon-position":`end`},null,8,[`name`,`color`])])):(0,e.createCommentVNode)(``,!0)]),(0,e.createVNode)(Wn,(0,e.normalizeProps)((0,e.guardReactiveProps)(o.value)),null,16)],16))}}),qr=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkIconButton`,props:{icon:{default:`roller-coaster`},variant:{default:`fill`},color:{default:`primary`},size:{default:`md`},fontClass:{default:`body`}},setup(t){let n=t,r=(0,e.computed)(()=>$({variant:n.variant,color:n.color,size:n.size},`icon-button`)),i=(0,e.computed)(()=>Kt(n.color)),a=(0,e.computed)(()=>{switch(n.fontClass){case`display1`:case`display2`:case`title1`:return 1.5;case`subheading`:case`label`:case`caption`:case`capline`:return 2;default:return 1.75}}),o=(0,e.computed)(()=>{switch(n.variant){case`outline`:case`text`:return n.color;case`fill`:return i.value;default:return i.value}});return(n,i)=>((0,e.openBlock)(),(0,e.createElementBlock)(`button`,(0,e.mergeProps)({"data-lk-component":`icon-button`,type:`button`},{...n.$attrs,...r.value},{class:`${t.fontClass}`}),[(0,e.createElementVNode)(`div`,null,[(0,e.createVNode)(Bn,{name:t.icon,color:o.value,"stroke-width":a.value},null,8,[`name`,`color`,`stroke-width`])]),(0,e.createVNode)(Wn,{"bg-color":o.value},null,8,[`bg-color`])],16))}}),Jr=[`title`],Yr={"data-lk-menu-item-element":`content-wrap`},Xr=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkMenuItem`,props:{startIcon:{},endIcon:{},fontClass:{default:`body`},title:{}},setup(t){return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`menu-item`,title:t.title},n.$attrs),[t.startIcon?((0,e.openBlock)(),(0,e.createBlock)(Bn,(0,e.mergeProps)({key:0},t.startIcon,{"data-lk-icon-position":`start`}),null,16)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`p`,Yr,[(0,e.renderSlot)(n.$slots,`default`)]),t.endIcon?((0,e.openBlock)(),(0,e.createBlock)(Bn,(0,e.mergeProps)({key:1},t.endIcon,{"data-lk-icon-position":`end`}),null,16)):(0,e.createCommentVNode)(``,!0),(0,e.createVNode)(Wn)],16,Jr))}}),Zr=[`data-lk-switch-state`],Qr=[`data-lk-switch-state`],$r=Sn((0,e.defineComponent)({inheritAttrs:!1,__name:`LkSwitch`,props:{modelValue:{type:Boolean,default:!1},offColor:{default:`surfacevariant`},onColor:{default:`primary`}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=t,i=n,a=(0,e.computed)(()=>Kt(r.offColor)),o=(0,e.computed)(()=>Kt(r.onColor));function s(){i(`update:modelValue`,!r.modelValue)}let c=(0,e.computed)(()=>r.modelValue?`on`:`off`),l=(0,e.computed)(()=>({"--switch-off-color":`var(--lk-${r.offColor})`,"--switch-on-color":`var(--lk-${r.onColor})`,"--switch-thumb-off-color":`var(--lk-${a.value})`,"--switch-thumb-on-color":`var(--lk-${o.value})`}));return(t,n)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`switch`},{...t.$attrs,style:l.value},{"data-lk-switch-state":c.value,onClick:s}),[(0,e.createElementVNode)(`div`,{"data-lk-component":`switch-thumb`,"data-lk-switch-state":c.value},null,8,Qr)],16,Zr))}}),[[`__scopeId`,`data-v-9150e6cf`]]),ei=[`for`],ti=[`data-lk-input-help-text`,`data-help-text`],ni=[`for`],ri=[`name`,`id`,`placeholder`,`value`],ii=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkTextInput`,props:{modelValue:{default:``},labelPosition:{default:`default`},helpText:{},placeholder:{default:`Placeholder`},name:{default:`Label`},endIcon:{default:`search`},labelBackgroundColor:{}},emits:[`update:modelValue`],setup(t,{emit:n}){let r=t,i=n,a=(0,e.computed)(()=>$({labelPosition:r.labelPosition},`text-input`));function o(e){let t=e.target;i(`update:modelValue`,t.value)}let s=(0,e.computed)(()=>{let e=`body`;return r.labelBackgroundColor&&(e+=` bg-${r.labelBackgroundColor}`),r.modelValue&&(e+=` on-field-with-value-set`),e});return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`text-input`},{...n.$attrs,...a.value}),[t.labelPosition===`default`?((0,e.openBlock)(),(0,e.createElementBlock)(`label`,{key:0,for:t.name,class:`label`},(0,e.toDisplayString)(t.name),9,ei)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`div`,{"data-lk-text-input-el":`input-wrap`,"data-lk-input-help-text":t.helpText?`true`:`false`,"data-help-text":t.helpText},[t.labelPosition===`on-input`?((0,e.openBlock)(),(0,e.createElementBlock)(`label`,{key:0,for:t.name,class:(0,e.normalizeClass)(s.value)},(0,e.toDisplayString)(t.name),11,ni)):(0,e.createCommentVNode)(``,!0),(0,e.createElementVNode)(`input`,{type:`text`,name:t.name,id:t.name,placeholder:t.labelPosition===`on-input`?``:t.placeholder,value:t.modelValue,onInput:o},null,40,ri),(0,e.createVNode)(Wn),(0,e.createVNode)(Bn,{name:t.endIcon},null,8,[`name`])],8,ti),t.helpText?((0,e.openBlock)(),(0,e.createBlock)(En,{key:1,"align-items":`center`},{default:(0,e.withCtx)(()=>[(0,e.createVNode)(Bn,{name:`info`,"font-class":`capline`,color:`outline`,"optic-shift":!0}),(0,e.createVNode)(Nn,{color:`outline`,"font-class":`caption`,class:`m-left-2xs`},{default:(0,e.withCtx)(()=>[...r[0]||=[(0,e.createTextVNode)(` Help text goes here `,-1)]]),_:1})]),_:1})):(0,e.createCommentVNode)(``,!0)],16))}}),ai={"data-lk-slot":`child`},oi=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkTabLink`,props:{selected:{type:Boolean,default:!1},fontClass:{default:`body`},indicatorClass:{default:`lk-indicator`}},setup(t){let n=t,r=(0,e.computed)(()=>$({selected:n.selected,fontClass:n.fontClass,indicatorClass:n.indicatorClass},`tab-link`)),i=(0,e.computed)(()=>n.selected?{fontWeight:700}:{});return(n,a)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`tab-link`},{...n.$attrs,...r.value}),[(0,e.createElementVNode)(`div`,ai,[(0,e.createVNode)(Nn,{"font-class":t.fontClass,style:(0,e.normalizeStyle)(i.value)},{default:(0,e.withCtx)(()=>[(0,e.renderSlot)(n.$slots,`default`)]),_:3},8,[`font-class`,`style`])]),(0,e.createElementVNode)(`div`,{class:(0,e.normalizeClass)(t.indicatorClass)},null,2)],16))}}),si=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkTabMenu`,props:{tabLinks:{default:()=>[`Tab Link 1`,`Tab Link 2`,`Tab Link 3`]},alignItems:{},justifyContent:{},activeTab:{default:0}},emits:[`update:activeTab`],setup(t,{emit:n}){let r=t,i=n,a=(0,e.computed)(()=>$({alignItems:r.alignItems,justifyContent:r.justifyContent,activeTab:r.activeTab},`tab-menu`));function o(e){i(`update:activeTab`,e)}return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`tab-menu`},{...n.$attrs,...a.value}),[(0,e.createVNode)(En,{"align-items":t.alignItems,"justify-content":t.justifyContent},{default:(0,e.withCtx)(()=>[((0,e.openBlock)(!0),(0,e.createElementBlock)(e.Fragment,null,(0,e.renderList)(t.tabLinks,(n,r)=>((0,e.openBlock)(),(0,e.createBlock)(oi,{key:r,selected:r===t.activeTab,onClick:e=>o(r)},{default:(0,e.withCtx)(()=>[(0,e.createElementVNode)(`div`,null,(0,e.toDisplayString)(n??`Tab Link`),1)]),_:2},1032,[`selected`,`onClick`]))),128))]),_:1},8,[`align-items`,`justify-content`])],16))}}),ci=[`data-lk-tabs-content-scrollable`],li=[`data-lk-tabs-content-scrollable`],ui=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkTabs`,props:{tabLinks:{},scrollableContent:{type:Boolean,default:!1},defaultTab:{default:0}},emits:[`activeTabChange`],setup(t,{emit:n}){let r=t,i=n,a=(0,e.ref)(r.defaultTab);function o(e){a.value=e}(0,e.watch)(a,e=>{i(`activeTabChange`,e)}),(0,e.provide)(`lk-tabs`,{activeTab:a,setActiveTab:o});let s=(0,e.computed)(()=>$({activeTab:a.value},`tabs`));return(n,r)=>((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`tabs`,"data-lk-tabs-content-scrollable":t.scrollableContent||void 0},{...n.$attrs,...s.value}),[(0,e.createVNode)(si,{"tab-links":t.tabLinks,"justify-content":`start`,"align-items":`stretch`,"active-tab":a.value,"onUpdate:activeTab":o},null,8,[`tab-links`,`active-tab`]),(0,e.createElementVNode)(`div`,{"data-lk-tabs-el":`tab-content`,"data-lk-tabs-content-scrollable":t.scrollableContent||void 0},[(0,e.renderSlot)(n.$slots,`default`,{activeTab:a.value})],8,li)],16,ci))}}),di=(0,e.defineComponent)({inheritAttrs:!1,__name:`LkTabContent`,props:{index:{}},setup(t){let n=t,r=(0,e.inject)(`lk-tabs`,null),i=(0,e.computed)(()=>r?r.activeTab.value===n.index:!0);return(t,n)=>(0,e.withDirectives)(((0,e.openBlock)(),(0,e.createElementBlock)(`div`,(0,e.mergeProps)({"data-lk-component":`tab-content`},t.$attrs),[(0,e.renderSlot)(t.$slots,`default`)],16)),[[e.vShow,i.value]])}});exports.DROPDOWN_INJECTION_KEY=It,exports.LkBadge=Ln,exports.LkButton=Kr,exports.LkCard=Qn,exports.LkColors=Ht,exports.LkColorsWithOnTokens=Ut,exports.LkColumn=Tn,exports.LkContainer=wn,exports.LkDropdown=$n,exports.LkDropdownMenu=rr,exports.LkDropdownTrigger=tr,exports.LkGrid=kn,exports.LkHeading=Mn,exports.LkIcon=Bn,exports.LkIconButton=qr,exports.LkImage=Hn,exports.LkMaterialLayer=Jn,exports.LkMenuItem=Xr,exports.LkNavbar=Vr,exports.LkPlaceholderBlock=jn,exports.LkRow=En,exports.LkSection=On,exports.LkSelect=sr,exports.LkSelectMenu=dr,exports.LkSelectOption=hr,exports.LkSelectTrigger=lr,exports.LkSnackbar=Sr,exports.LkStateLayer=Wn,exports.LkSticker=Un,exports.LkSwitch=$r,exports.LkTabContent=di,exports.LkTabLink=oi,exports.LkTabMenu=si,exports.LkTabs=ui,exports.LkText=Nn,exports.LkTextInput=ii,exports.LkTheme=qt,exports.LkThemeController=Cn,exports.THEME_INJECTION_KEY=kt,exports.getColorsWithoutOnTokens=Gt,exports.getOnToken=Kt,exports.propsToDataAttrs=$,exports.provideDropdown=Bt,exports.provideTheme=Pt,exports.useDropdown=Vt,exports.useTheme=Ft;
|