effcss 1.3.5 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -19
- package/dist/build/define-provider.min.js +2 -2
- package/dist/constants.js +1 -0
- package/dist/index.js +1 -1
- package/dist/types/src/_provider/manage.d.ts +1 -1
- package/dist/types/src/_provider/process.d.ts +4 -6
- package/dist/types/src/constants.d.ts +85 -0
- package/dist/types/src/index.d.ts +10 -16
- package/dist/types/src/types.d.ts +182 -154
- package/dist/types/src/utils/browser.d.ts +123 -0
- package/dist/types/src/utils/common.d.ts +74 -0
- package/dist/utils/browser.js +1 -0
- package/dist/utils/common.js +1 -0
- package/package.json +12 -18
- package/dist/build/define-provider-with-configs.min.js +0 -7
- package/dist/configs/basic.js +0 -1
- package/dist/configs/ext.js +0 -1
- package/dist/css/dict.js +0 -1
- package/dist/css/functions.js +0 -1
- package/dist/types/build/defineProviderWithConfigs.d.ts +0 -1
- package/dist/types/src/_provider/constants.d.ts +0 -6
- package/dist/types/src/configs/basic/Agent.d.ts +0 -3
- package/dist/types/src/configs/basic/AgentColor.d.ts +0 -3
- package/dist/types/src/configs/basic/Animation.d.ts +0 -3
- package/dist/types/src/configs/basic/Background.d.ts +0 -3
- package/dist/types/src/configs/basic/Border.d.ts +0 -3
- package/dist/types/src/configs/basic/BorderExt.d.ts +0 -3
- package/dist/types/src/configs/basic/Box.d.ts +0 -3
- package/dist/types/src/configs/basic/Color.d.ts +0 -3
- package/dist/types/src/configs/basic/Column.d.ts +0 -3
- package/dist/types/src/configs/basic/FlexContainer.d.ts +0 -3
- package/dist/types/src/configs/basic/FlexItem.d.ts +0 -3
- package/dist/types/src/configs/basic/Font.d.ts +0 -3
- package/dist/types/src/configs/basic/GridContainer.d.ts +0 -3
- package/dist/types/src/configs/basic/GridItem.d.ts +0 -3
- package/dist/types/src/configs/basic/Indent.d.ts +0 -3
- package/dist/types/src/configs/basic/Inset.d.ts +0 -3
- package/dist/types/src/configs/basic/Mask.d.ts +0 -3
- package/dist/types/src/configs/basic/Object.d.ts +0 -3
- package/dist/types/src/configs/basic/Outline.d.ts +0 -3
- package/dist/types/src/configs/basic/Scroll.d.ts +0 -3
- package/dist/types/src/configs/basic/ScrollExt.d.ts +0 -3
- package/dist/types/src/configs/basic/Size.d.ts +0 -3
- package/dist/types/src/configs/basic/SizeExt.d.ts +0 -3
- package/dist/types/src/configs/basic/Text.d.ts +0 -3
- package/dist/types/src/configs/basic/Transform.d.ts +0 -3
- package/dist/types/src/configs/basic/Transition.d.ts +0 -3
- package/dist/types/src/configs/basic/User.d.ts +0 -3
- package/dist/types/src/configs/basic/View.d.ts +0 -3
- package/dist/types/src/configs/basic.d.ts +0 -112
- package/dist/types/src/configs/ext/Keyframes.d.ts +0 -6
- package/dist/types/src/configs/ext/Reset.d.ts +0 -3
- package/dist/types/src/configs/ext.d.ts +0 -8
- package/dist/types/src/css/dict.d.ts +0 -4
- package/dist/types/src/css/functions.d.ts +0 -443
- package/dist/types/src/utils.d.ts +0 -195
- package/dist/utils.js +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://effcss.surge.sh">
|
|
3
|
-
<img alt="effcss" src="
|
|
3
|
+
<img alt="effcss" src="/logo.svg" height="256px" />
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
@@ -41,7 +41,7 @@ Effcss is a self-confident CSS-in-JS library based only on the browser APIs.
|
|
|
41
41
|
- framework agnostic
|
|
42
42
|
- runtime stylesheets generation
|
|
43
43
|
- built-in BEM support
|
|
44
|
-
-
|
|
44
|
+
- customizable
|
|
45
45
|
|
|
46
46
|
## Installation
|
|
47
47
|
|
|
@@ -66,17 +66,17 @@ First you need to connect the `<style-provider>`. One script is all it takes:
|
|
|
66
66
|
<script src="https://unpkg.com/effcss/dist/build/define-provider.min.js" crossorigin="anonymous"></script>
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
Then you only need to create the necessary styles before rendering. The easiest way to do this is via the `
|
|
69
|
+
Then you only need to create the necessary styles before rendering. The easiest way to do this is via the `createDispatcher`:
|
|
70
70
|
|
|
71
71
|
**main.js**
|
|
72
72
|
|
|
73
73
|
```jsx
|
|
74
|
-
import {
|
|
74
|
+
import { createDispatcher } from "effcss/utils/browser";
|
|
75
75
|
|
|
76
|
-
const styleDispatcher =
|
|
76
|
+
const styleDispatcher = createDispatcher();
|
|
77
77
|
|
|
78
78
|
const root = createRoot(document.getElementById('root'));
|
|
79
|
-
root.render(<App
|
|
79
|
+
root.render(<App css={styleDispatcher}/>);
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
**App.js**
|
|
@@ -86,44 +86,51 @@ import { useRef } from 'react'
|
|
|
86
86
|
|
|
87
87
|
const cardStyle = {
|
|
88
88
|
c: {
|
|
89
|
+
// block
|
|
89
90
|
_: {
|
|
90
91
|
$dis: 'flex',
|
|
91
92
|
$jc: 'center'
|
|
92
93
|
},
|
|
94
|
+
// element
|
|
93
95
|
__logo: {
|
|
94
96
|
$p: '2em'
|
|
95
97
|
},
|
|
98
|
+
// boolean element modifier
|
|
96
99
|
__logo_c_: {
|
|
97
100
|
$c: '#888'
|
|
101
|
+
},
|
|
102
|
+
// element modifier with value
|
|
103
|
+
__logo_sz_lg: {
|
|
104
|
+
$w: '5rem'
|
|
98
105
|
}
|
|
99
106
|
}
|
|
100
107
|
};
|
|
101
108
|
|
|
102
109
|
export const App = (props) => {
|
|
103
|
-
const {
|
|
110
|
+
const { css } = props;
|
|
104
111
|
|
|
105
|
-
const
|
|
112
|
+
const attrsRef = useRef();
|
|
106
113
|
if (!stylesRef.current) {
|
|
107
|
-
const
|
|
108
|
-
|
|
114
|
+
const resolve = css.use(cardStyle);
|
|
115
|
+
attrsRef.current = {
|
|
109
116
|
// just block selector
|
|
110
|
-
block:
|
|
111
|
-
// element selector
|
|
112
|
-
logo: bem('logo')(),
|
|
117
|
+
block: resolve()(),
|
|
113
118
|
// element with modifiers
|
|
114
|
-
|
|
119
|
+
logoMod: resolve('logo')({
|
|
120
|
+
c: '',
|
|
121
|
+
sz: 'lg'
|
|
122
|
+
}),
|
|
115
123
|
};
|
|
116
124
|
}
|
|
117
|
-
const styles =
|
|
125
|
+
const styles = attrsRef.current;
|
|
118
126
|
|
|
119
127
|
// apply attributes to appropriate nodes
|
|
120
128
|
return <div {...styles.block}>
|
|
121
|
-
<div {...styles.
|
|
129
|
+
<div {...styles.logoMod}>
|
|
122
130
|
...
|
|
123
131
|
</div>
|
|
124
|
-
</div
|
|
125
|
-
|
|
132
|
+
</div>;
|
|
126
133
|
}
|
|
127
134
|
```
|
|
128
135
|
|
|
129
|
-
That's all. No
|
|
136
|
+
That's all. No plugins are needed.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Effcss
|
|
2
|
+
* Effcss v2.0.0
|
|
3
3
|
* {@link https://gitverse.ru/msabitov/effcss}
|
|
4
4
|
* Copyright (c) Marat Sabitov
|
|
5
5
|
* @license Apache 2.0
|
|
6
6
|
*/
|
|
7
|
-
"function"==typeof SuppressedError&&SuppressedError;const e=(...e)=>e.join(","),t="-",s=" ",i="-x",r="-y",n="down",o="horizontal",l="vertical",a="text",c=a+t,p="font-",h="column",m=h+t,d="max-",b="min-",f="content",u=f+"s",_="-items",g="self",v="inline",y="block",x="size",w="-radius",S="direction",$="outline",j="style",k=t+j,O="end",z=t+O,q="start",A=t+q,E="center",N="word",V="line",R="break",W=R+t,I="wrap",K="no"+I,C="rule",P="object",T="top",L=t+T,M="left",B=t+M,G="bottom",H=t+G,J="right",Z=t+J,D="width",F=t+D,Q="color",U=t+Q,X="overflow",Y="align",ee="type",te="transform",se="all",ie="height",re="normal",ne="opacity",oe="visibility",le="scale",ae="box",ce=t+ae,pe="border",he="position",me="none",de="auto",be="fill",fe="stroke",ue="reverse",_e="space",ge="fixed",ve="origin",ye="alpha",xe="luminance",we="clip",Se="zoom",$e="scroll",je="padding",ke="margin",Oe="both",ze="mode",qe="repeat",Ae="light",Ee="linear",Ne="hidden",Ve="shadow",Re="behavior",We="orientation",Ie="name",Ke="after",Ce="before",Pe="image",Te="list"+k,Le=Te+t+ee,Me=Te+t+he,Be=Te+t+Pe,Ge=Q+"-scheme",He=pe+H,Je=pe+B,Ze=pe+Z,De=pe+L,Fe=pe+t+y,Qe=pe+t+v,Ue=Fe+A,Xe=Fe+z,Ye=Qe+A,et=Qe+z,tt=pe+F,st=He+F,it=Je+F,rt=Ze+F,nt=De+F,ot=Fe+F,lt=Qe+F,at=Ue+F,ct=Xe+F,pt=Ye+F,ht=et+F,mt=pe+w,dt=He+B+w,bt=He+Z+w,ft=De+B+w,ut=De+Z+w,_t=pe+A+z+w,gt=pe+A+A+w,vt=pe+z+z+w,yt=pe+z+A+w,xt=pe+U,wt=Je+U,St=Ze+U,$t=De+U,jt=He+U,kt=Fe+U,Ot=Qe+U,zt=Ue+U,qt=Xe+U,At=Ye+U,Et=et+U,Nt=pe+k,Vt=Je+k,Rt=Ze+k,Wt=De+k,It=He+k,Kt=Fe+k,Ct=Qe+k,Pt=Ue+k,Tt=Xe+k,Lt=Ye+k,Mt=et+k,Bt=$+U,Gt=$+F,Ht=$+k,Jt=$+t+"offset",Zt=X+i,Dt=X+r,Ft=P+t+"fit",Qt=P+t+he,Ut=le+t+n,Xt=ae+t+Ve,Yt=je+ce,es=pe+ce,ts=f+ce,ss=be+ce,is=fe+ce,rs="view"+ce,ns="no-"+we,os=qe+i,ls=qe+r,as="no-"+qe,cs=je+B,ps=je+L,hs=je+Z,ms=je+H,ds=ke+B,bs=ke+L,fs=ke+Z,us=ke+H,_s="grid",gs="row",vs="gap",ys="justify",xs="flex",ws=xs+t,Ss="place"+_,$s=v+t+xs,js=ws+"basis",ks=ws+"grow",Os=ws+"shrink",zs=ws+S,qs=ws+I,As=ys+t+f,Es=ys+_,Ns=Y+_,Vs=Y+t+f,Rs=Y+t+g,Ws=_s+t+"template",Is=Ws+t+gs+"s",Ks=Ws+t+h+"s",Cs=gs+t+vs,Ps=m+vs,Ts=ys+t+g,Ls=_s+t+gs,Ms=Ls+z,Bs=Ls+A,Gs=_s+t+h,Hs=Gs+z,Js=Gs+A,Zs=m+"count",Ds=m+be,Fs=m+C,Qs=Fs+U,Us=Fs+k,Xs=Fs+F,Ys=m+"span",ei=h+F,ti=gs+t+ue,si=m+ue,ii=I+t+ue,ri=xs+z,ni=xs+A,oi=_e+"-between",li=_e+"-around",ai=_e+"-evenly",ci=v+t+_s,pi="mask-",hi=pi+we,mi=pi+"composite",di=pi+ze,bi=pi+ve,fi=pi+he,ui=pi+qe,_i=pi+x,gi=pi+ee,vi="timing-function",yi="delay",xi="duration",wi="animation",Si=wi+t,$i=Si+Ie,ji=Si+vi,ki=Si+S,Oi=Si+"iteration-count",zi=Si+xi,qi=Si+yi,Ai=Si+"play-state",Ei=Si+be+t+ze,Ni="transition",Vi=Ni+t,Ri=Vi+Re,Wi=Vi+"property",Ii=Vi+vi,Ki=Vi+xi,Ci=Vi+yi,Pi="alternate",Ti=Pi+t+ue,Li="-out",Mi="ease",Bi=Mi+"-in",Gi=Bi+Li,Hi=Mi+Li,Ji="step",Zi=Ji+A,Di=Ji+z,Fi="translate",Qi="rotate",Ui="perspective",Xi=Ui+t+ve,Yi=M+s+T,er=J+s+T,tr=M+s+G,sr=J+s+G,ir="inset",rr=ir+t,nr=te+ce,or=te+t+ve,lr=te+k,ar=rr+y,cr=ar+z,pr=ar+A,hr=rr+v,mr=hr+z,dr=hr+A,br="fit-"+f,fr=b+f,ur=d+f,_r=ae+"-sizing",gr=d+D,vr=b+D,yr=d+ie,xr=b+ie,wr=y+t+x,Sr=d+wr,$r=b+wr,jr=v+t+x,kr=d+jr,Or=b+jr,zr=$e+t+Re,qr=$e+t+ke,Ar=qr+L,Er=qr+H,Nr=qr+B,Vr=qr+Z,Rr=qr+t+y,Wr=Rr+z,Ir=Rr+A,Kr=qr+t+v,Cr=Kr+z,Pr=Kr+A,Tr=$e+t+je,Lr=Tr+L,Mr=Tr+H,Br=Tr+B,Gr=Tr+Z,Hr=Tr+t+y,Jr=Hr+z,Zr=Hr+A,Dr=Tr+t+v,Fr=Dr+z,Qr=Dr+A,Ur=$e+t+"snap",Xr=Ur+t+Y,Yr=Ur+t+"stop",en=Ur+t+ee,tn="over"+zr,sn=" mandatory",rn="x"+sn,nn="y"+sn,on=y+sn,ln=v+sn,an=Oe+sn,cn=" proximity",pn="x"+cn,hn="y"+cn,mn=y+cn,dn=v+cn,bn=Oe+cn,fn=c+"decoration",un=fn+t+Q,_n=fn+t+"thickness",gn=fn+t+j,vn=fn+t+V,yn="white-"+_e,xn=c+te,wn=c+Y,Sn=l+t+Y,$n=c+X,jn=c+We,kn=c+"rendering",On=c+Ve,zn=c+"emphasis",qn=zn+U,An=zn+t+he,En=zn+k,Nn=c+I,Vn=Nn+t+ze,Rn=Nn+k,Wn=N+t+R,In=p+x,Kn=p+"weight",Cn=p+"family",Pn=p+j,Tn=p+"synthesis",Ln=p+"variant",Mn=Ln+t+Pi+"s",Bn=Ln+"-caps",Gn=Ln+"-numeric",Hn=Ln+t+he,Jn=Ln+"-east-asian",Zn=Ln+"-ligatures",Dn=Ln+"-settings",Fn="writing-"+ze,Qn=V+t+ie,Un=V+t+R,Xn=V+"-through",Yn="over"+V,eo="under"+V,to="pre",so=to+t+V,io=to+t+I,ro=W+_e+"s",no=W+se,oo=W+N,lo=W+Ke,ao=W+Ce,co=o+"-tb",po=l+"-lr",ho=l+"-rl",mo="keep-"+se,bo="pointer",fo="pan",uo=fo+i,_o=fo+B,go=fo+Z,vo=fo+r,yo=fo+t+n,xo="pinch-"+Se,wo=l+t+a,So="grab",$o=So+"bing",jo="resize",ko="col-"+jo,Oo="row-"+jo,zo="n-"+jo,qo="e-"+jo,Ao="s-"+jo,Eo="w-"+jo,No="ne-"+jo,Vo="ew-"+jo,Ro="nw-"+jo,Wo="se-"+jo,Io="sw-"+jo,Ko="ns-"+jo,Co="nesw-"+jo,Po="nwse-"+jo,To=Se+t+"in",Lo=Se+t+"out",Mo=bo+"-events",Bo=$e+t+he,Go="caret"+U,Ho="accent"+U,Jo="filter",Zo="backdrop-"+Jo,Do="background",Fo=Do+t,Qo=Fo+Pe,Uo=Fo+Q,Xo=Fo+we,Yo=Fo+ve,el=Fo+he,tl=el+i,sl=el+r,il=Fo+qe,rl=Fo+x,nl=Fo+"blend-"+ze,ol=Fo+"attachment",ll="gradient",al=Ee+t+ll,cl="radial-"+ll,pl="conic-"+ll,hl=f+t+oe,ml=fe+F,dl=fe+t+ne,bl=be+t+C,fl=be+t+ne,ul=Q+"-dodge",_l=Q+"-burn",gl="hard-"+Ae,vl="soft-"+Ae,yl=Q+"-mix",xl="revert",wl=xl+"-layer",Sl="container",$l=Sl+t+ee,jl=Sl+t+Ie,kl=":first-",Ol=":last-",zl=":only-",ql="child",Al="of-type",El=":nth-child",Nl="prefers-",Vl=Nl+Ge,Rl="@media",Wl=Q+"-gamut",Il=Nl+"contrast",Kl="scripting",Cl="::"+Ke,Pl="::"+Ce,Tl={0:0,"1/4":25,"1/2":50,"3/4":75,1:100},Ll={0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},Ml=[0,1,2,3,4,5,6,7,8,9,10,11,12].reduce(((e,t)=>(e[t]=t,e)),{}),Bl={lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},hue:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},chr:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},alp:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},cu:{c:"currentColor",t:"transparent"},rem:{def:16},ff:{def:"Roboto, sans-serif",b:"Georgia, serif"},fwg:{xs:100,s:200,m:400,l:600,xl:700},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},coef:Ml,rat:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778},sp:{"3xs":.125,"2xs":.25,xs:.5,s:.75,m:1,l:1.25,xl:1.5,"2xl":2,"3xl":4},sz:{"3xs":1,"2xs":1.5,xs:2,s:5,m:10,l:15,xl:20,"2xl":25,"3xl":30},szu:{a:"auto",no:0,min:fr,max:ur,fit:br},bp:{xs:30,sm:40,md:48,lg:64,xl:80},cbp:{xs:10,sm:20,md:30,lg:40,xl:48},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},vw:Tl,vh:Tl,vmin:Tl,vmax:Tl,cqw:Tl,cqh:Tl,cqb:Tl,cqi:Tl,cqmin:Tl,cqmax:Tl,perc:Ll,rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},sc:{xs:.5,s:.67,m:1,l:1.5,xl:2},tr:{xs:.25,s:.5,m:1,l:1.5,xl:2},sk:{xs:-15,s:-10,m:0,l:10,xl:15},rot:{xs:-180,s:-90,m:0,l:90,xl:180},zm:{s:.8,m:1,l:1.2},pers:{s:"100px",m:"200px"},fsz:{xs:.25,s:.5,m:1,l:1.5,xl:2},lh:{xs:1,s:1.25,m:1.5,l:1.75,xl:2},lsp:{no:0,s:.05,m:.1,l:.2},zi:{1:1,2:2,3:3,4:4,5:5},ic:{inf:"infinite",1:1,2:2},ins:Ll,uni:{ini:"initial",inh:"inherit",u:"unset",r:xl,rl:wl},ali:{s:q,e:O,c:E,st:"stretch",sb:oi,sa:li,se:ai,b:"baseline",fs:ni,fe:ri,no:me},dis:{g:_s,ig:ci,f:xs,if:$s,b:y,i:v},ca:Ml,co:Ml,ra:Ml,ro:Ml,fd:{r:gs,rr:ti,c:h,cr:si},fb:Ll,fo:Ml,fg:Ml,fs:Ml,fw:{w:I,nw:K,wr:ii},rep:{rx:os,ry:ls,r:qe,s:_e,ro:"round",nr:as},ttf:{l:Ee,e:Mi,ei:Bi,eo:Hi,eio:Gi,ss:Zi,se:Di},ws:{n:re,nw:K,p:to,pl:so,pw:io,bs:ro},wb:{n:re,ba:no,ka:mo,bw:oo},wm:{htb:co,vlr:po,vrl:ho},hyp:{no:me,m:"manual",a:de},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:Xn,o:Yn,u:eo},tor:{m:"mixed",u:"upright",sr:"sideways-right",s:"sideways",ugo:"use-glyph-"+We},ta:{l:M,c:E,j:ys,r:J,s:q,e:O},tp:{all:se,col:e(Q,Uo,xt,un),icon:e(be,fe),flt:e(Jo,Zo),ind:e(je,ke),sz:e(D,gr,vr,ie,yr,xr),esz:e($r,wr,Sr,Or,jr,kr),o:ne,b:pe,f:xs,g:_s,pos:e(he,M,T,G,J),tf:e(te,Fi,le,Qi,"skew",Ui)},lb:{a:de,any:"anywhere",n:re,l:"loose",s:"strict"},ov:{h:Ne,s:$e,a:de,c:we,e:"ellipsis"},v:{h:Ne,v:"visible",c:"collapse",a:de},wc:{a:de,sp:Bo,c:u,tf:te,o:ne,i:ir,tfi:te+","+ir},afm:{no:me,f:"forwards",b:"backwards",both:Oe},adir:{r:ue,a:Pi,ar:Ti},aps:{r:"running",p:"paused"},tb:{ad:"allow-discrete",n:re},app:{n:me,a:de},pe:{a:de,no:me,all:se,f:be,s:fe},cur:{h:"help",a:de,p:bo,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:a,vt:wo,cp:"copy",m:"move",g:So,gng:$o,cr:ko,rr:Oo,nr:zo,er:qo,sr:Ao,wr:Eo,ner:No,ewr:Vo,nwr:Ro,ser:Wo,swr:Io,nsr:Ko,neswr:Co,nwser:Po,zi:To,zo:Lo},res:{n:me,v:l,h:o,b:Oe},toa:{a:de,no:me,px:uo,pl:_o,pr:go,py:vo,pu:"pan-up",pd:yo,pz:xo,m:"manipulation"},us:{n:me,t:a,all:se,a:de},sb:{a:de,s:"smooth"},sss:{n:re,a:"always"},sst:{n:me,x:"x",y:"y",b:y,i:v,both:Oe,xm:rn,ym:nn,bm:on,im:ln,bothm:an,xp:pn,yp:hn,bp:mn,ip:dn,bothp:bn},fst:{i:"italic",n:re,o:"oblique"},pos:{r:"relative",a:"absolute",f:ge,s:"static"},posv:{b:G,t:T,c:E,l:M,r:J,lt:Yi,rt:er,lb:tr,rb:sr},csz:{cv:"cover",cn:"contain",a:de,f:be,sd:Ut},cf:{a:de,b:"balance"},cs:{no:me,all:se},box:{c:ts,p:Yt,b:es,f:ss,s:is,v:rs,nc:ns,t:a},mcm:{a:"add",s:"subtract",i:"intersect",e:"exclude"},mtp:{a:ye,l:xe},mm:{a:ye,l:xe,m:"match-source"},bgbm:{n:re,m:"multiply",scr:"screen",o:"overlay",d:"darken",l:Ae+"en",dif:"difference",exc:"exclusion",h:"hue",sat:"saturation",c:Q,lum:"luminosity",cd:ul,cb:_l,hl:gl,sl:vl},bga:{s:$e,f:ge,l:"local"},ls:{no:me,dt:"dotted",i:ir,h:Ne,ds:"dashed",s:"solid",db:"double",o:"outset",r:"ridge",g:"groove"},cnt:{n:re,s:x,is:jr}},Gl={a:wi,an:$i,adur:zi,adel:qi,aps:Ai,afm:Ei,adir:ki,aic:Oi,atf:ji,trn:Ni,tdur:Ki,tdel:Ci,tb:Ri,tp:Wi,ttf:Ii,ba:lo,bb:ao,bor:pe,bw:tt,br:mt,bs:Nt,bls:Vt,brs:Rt,bts:Wt,bbs:It,bbls:Kt,bis:Ct,bbss:Pt,bbes:Tt,biss:Lt,bies:Mt,brw:rt,blw:it,btw:nt,bbw:st,btlr:ft,btrr:ut,bbrr:bt,bblr:dt,biw:lt,bblw:ot,bbew:ct,bbsw:at,bisw:pt,biew:ht,besr:yt,beer:vt,bssr:gt,bser:_t,bc:xt,blc:wt,brc:St,btc:$t,bbc:jt,bblc:kt,bic:Ot,bbsc:zt,bbec:qt,bisc:At,biec:Et,bg:Do,bgi:Qo,bgc:Uo,c:Q,cmix:yl,csh:Ge,acc:Ho,ctc:Go,st:fe,stw:ml,sto:dl,fi:be,fir:bl,fio:fl,flt:Jo,bf:Zo,g:_s,f:xs,dis:"display",jc:As,ji:Es,ai:Ns,pi:Ss,ac:Vs,gt:Ws,gtr:Is,gtc:Ks,gp:vs,rg:Cs,cg:Ps,as:Rs,js:Ts,gr:Ls,gre:Ms,grs:Bs,gc:Gs,gce:Hs,gcs:Js,fd:zs,fw:qs,fs:Os,fg:ks,fb:js,ord:"order",dir:S,m:ke,ml:ds,mr:fs,mt:bs,mb:us,p:je,pl:cs,pr:hs,pt:ps,pb:ms,oc:Bt,ow:Gt,os:Ht,oo:Jt,l:M,r:J,t:T,b:G,ins:ir,ib:ar,ibe:cr,ibs:pr,ii:hr,iie:mr,iis:dr,wc:"will-change",app:"appearance",pe:Mo,cur:"cursor",toa:"touch-action",us:"user-select",res:jo,lis:Te,lisp:Me,lisi:Be,list:Le,sb:zr,ssa:Xr,sss:Yr,sst:en,sm:qr,sml:Nr,smr:Vr,smt:Ar,smb:Er,sp:Tr,spl:Br,spr:Gr,spt:Lr,spb:Mr,smbl:Rr,smbe:Wr,smbs:Ir,smi:Kr,smie:Cr,smis:Pr,spbl:Hr,spbe:Jr,spbs:Zr,spi:Dr,spie:Fr,spis:Qr,osb:tn,ar:"aspect-ratio",w:D,maxw:gr,minw:vr,h:ie,minh:xr,maxh:yr,bl:wr,maxb:Sr,minb:$r,i:jr,mini:Or,maxi:kr,per:Ui,pero:Xi,rot:Qi,sc:le,tf:te,tfb:nr,tfo:or,tfs:lr,tr:Fi,z:Se,lts:"letter-spacing",lh:Qn,lb:Un,fst:Pn,ff:Cn,fwg:Kn,fsz:In,fsn:Tn,fv:Ln,fva:Mn,fvc:Bn,fvea:Jn,fvl:Zn,fvn:Gn,fvs:Dn,fvp:Hn,tt:xn,td:fn,tdt:_n,tds:gn,tdl:vn,ta:wn,to:$n,trg:kn,ts:On,te:zn,tep:An,tec:qn,tes:En,tw:Nn,twm:Vn,tws:Rn,va:Sn,ws:yn,tor:jn,wb:Wn,wm:Fn,hyp:"hyphens",bsz:_r,bsh:Xt,pos:he,cf:Ds,crs:Us,crc:Qs,crw:Xs,cs:Ys,cw:ei,cc:Zs,bgcl:Xo,bgp:el,bgpx:tl,bgpy:sl,bgbm:nl,bgo:Yo,bgr:il,bga:ol,bgsz:rl,mcl:hi,mcm:mi,mm:di,mo:bi,mp:fi,mre:ui,msz:_i,mtp:gi,obf:Ft,obp:Qt,con:f,ov:X,ovx:Zt,ovy:Dt,v:oe,cv:hl,o:ne,zi:"z-index",zm:Se,lgr:al,rgr:cl,cgr:pl,inf:"infinite",cnt:$l,cnn:jl,r_:":root",u_:"*",h_:":hover",f_:":focus",fv_:":focus-visible",a_:":active",v_:":visited",val_:":valid",inv_:":invalid",e_:":empty",d_:":disabled",rq_:":required",o_:":optional",m_:":modal",l_:":link",fc_:kl+ql,lc_:Ol+ql,oc_:zl+ql,odd_:El+"(odd)",even_:El+"(even)",ft_:kl+Al,lt_:Ol+Al,ot_:zl+Al,bef_:Pl,aft_:Cl,bd_:"::backdrop",ba_:`&${Pl},&${Cl}`,pl_:":placeholder",light_:Rl+`(${Vl}: light)`,dark_:Rl+`(${Vl}: dark)`,red_m_:Rl+"(prefers-reduced-motion: reduce)",ori_l_:Rl+`(${We}: landscape)`,ori_p_:Rl+`(${We}: portrait)`,gam_srgb_:Rl+`(${Wl}: srgb)`,gam_p3_:Rl+`(${Wl}: p3)`,gam_rec_:Rl+`(${Wl}: rec2020)`,con_no_:Rl+`(${Il}: no-preference)`,con_m_:Rl+`(${Il}: more)`,con_l_:Rl+`(${Il}: less)`,con_c_:Rl+`(${Il}: custom)`,scr_no_:Rl+`(${Kl}: none)`,scr_ini_:Rl+`(${Kl}: initial-only)`,scr_en_:Rl+`(${Kl}: enabled)`},Hl={light:{lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9}},dark:{lig:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}},root:Bl},Jl="{1}rem",Zl="{1}deg",Dl="calc(100% * {1})",Fl="span {1}",Ql={cqw:"{1}cqw",cqh:"{1}cqh",cqb:"{1}cqb",cqi:"{1}cqi",cqmin:"{1}cqmin",cqmax:"{1}cqmax",vw:"{1}vw",vh:"{1}vh",vmin:"{1}vmin",vmax:"{1}vmax",fb:Dl,ra:Fl,ca:Fl,ins:Dl,sz:Jl,sp:Jl,rad:Jl,th:Jl,bp:Jl,cbp:Jl,fsz:Jl,lsp:Jl,tr:Jl,sk:Zl,rot:Zl,perc:Dl,time:"{1}ms",rem:"{1}px"},Ul=e=>`{${e}}`,Xl=Object.assign.bind(Object),Yl=(e,t)=>`${e}:${t};`,ea=(e,t)=>["@property",e,Ul(Yl("syntax",t.syn||'"*"')+Yl("inherits",t.inh||!1)+(t.ini?Yl("initial-value",t.ini):""))].join(" "),ta=e=>`var(${e})`,sa=({l:e,c:t,h:s,a:i=1})=>`oklch(${e} ${t} ${s} / ${i})`,ia=["l","c","h","a"],ra=e=>Object.entries(e).reduce(((e,[t,s])=>(void 0!==s&&e.push(t+(s?"-"+s:"")),e)),[]).join(" "),na=(e,t)=>Object.defineProperties({[e]:t},{k:{value:e},v:{value:t}}),oa={selector:({b:e,e:t,m:s,mv:i,s:r})=>`.${e}${(t?"__"+t:"")+(s?"_"+s:"")+(s&&i?"_"+i:"")+(r?":"+r:"")}`,attr:e=>t=>s=>{let i=s||"";"object"==typeof i&&(i=ra(i));const r=e+(t?"__"+t:"");return i=r+(i?" "+(null==i?void 0:i.split(" ").map((e=>r+"_"+e.split("-").join("_"))).join(" ")):""),na("class",i)}},la={selector:({b:e,e:t,m:s,mv:i,s:r})=>`[data-${e}${t?"-"+t:""}${s||r?'~="'+(s||"")+(i?"-"+i:"")+(r?":"+r:"")+'"':""}]`,attr:e=>t=>s=>{const i=`data-${e}${t?"-"+t:""}`;let r=s||"";return"object"==typeof r&&(r=ra(r)),na(i,r)}};class aa{constructor(e){var t,s;this.baseStyles="",this._prefix="eff",this._mode="a",this._initkey="init",this._params=Hl,this._compKeys={},this._compValues={},this.parseSelector=e=>{let t,s,i,r,n;return[t,n]=e.split(":"),t.startsWith("__")?[s,i,r]=t.slice(2).split("_"):[s,i,r]=t.split("_"),{e:s,m:i,mv:r,s:n}},this.expandSelector=(e,t)=>{const{e:s,m:i,mv:r,s:n}=this.parseSelector(t),o=n&&this._getStateSelector(n),l=this.bem.selector({b:e,e:s,m:i,mv:r,s:n});let a="";return(null==o?void 0:o.startsWith("@"))?a=o+"{"+l:(null==o?void 0:o.startsWith(":"))&&(a=l+"{&"+o),[this.bem.selector({b:e,e:s,m:i,mv:r}),a]},this._prepareVarName=(...e)=>["-",this._prefix,...e].join("-"),this._prepareKeyframesName=(...e)=>[this._prefix,...e].join("-"),this.compile=(e,t)=>{const{_:s,kf:i,k:r={},v:n={},c:o}=t,l=this.bem.selector.bind(this),a=this.parseSelector;let c=Xl({},o),p=Xl({},r),h=Xl({_:{}},n),m="";if(s)for(let t in s){const i=s[t];if("c"===i.typ){const s={};ia.forEach((r=>{const n=t+r,o=this._prepareVarName(e,n);s[r]=o,p["_"+n]=s[r],m+=ea(o,i)})),h._[t]=sa({l:ta(s.l),c:ta(s.c),h:ta(s.h),a:ta(s.a)}),i.all&&(c["_"+t+"l"]=`&lig=>${this._prepareVarName(e,t+"l")}:{1}`,c["_"+t+"c"]=`&chr=>${this._prepareVarName(e,t+"c")}:{1}`,c["_"+t+"h"]=`&hue=>${this._prepareVarName(e,t+"h")}:{1}`,c["_"+t+"a"]=`&alp=>${this._prepareVarName(e,t+"a")}:{1}`)}else{const s=this._prepareVarName(e,t);p["_"+t]=s,h._[t]=ta(s),m+=ea(s,i)}}const d=e=>p[e]||this._compKeys[e]||Gl[e],b=e=>h[e]||this._compValues[e]||this._params.root[e],f=e=>e.replaceAll(/\{(.+?)\}/g,((e,t)=>{const[s,i]=t.split(".");if(i){const e=b(s);return""+((null==e?void 0:e[i])||(null==e?void 0:e.def)||"")}return""+(d(s)||"")})),u=e=>{const t=e.split("?");let s;for(let e in t){const i=t[e],[r,n]=i.split("=>"),o=r.match(/(\w+)(\[[\w,]+\])?/);if(!o)continue;const[l,a,c]=o,p=b(a);if(!p)continue;s=p;let h=Object.entries(s);const m=null==c?void 0:c.slice(1,-1).split(",");if(m){const e=new Set(m);h=h.filter((([t,s])=>e.has(t)))}if(n){let[e,t]=n.split("|");void 0===t&&(t=e,e=""),h=h.map((([s,i])=>[e.replace("{0}",s)||s,f(t.replaceAll("{1}",""+i))]))}(m||n)&&(s=Object.fromEntries(h));break}return s};function _(t,s,i){var r,n,o,c;let p=""+t;if((null===(r=null==t?void 0:t.startsWith)||void 0===r?void 0:r.call(t,"$"))&&(p=d(t.slice(1)),!p))return"";if(Array.isArray(s))return _(p,Object.assign({},...s.map((e=>"string"==typeof e?u(e):e))),i);if(null==s)return"";if("object"==typeof s){const t=!i||(null===(n=i.startsWith)||void 0===n?void 0:n.call(i,"@"))||p.startsWith("&")||p.startsWith("@")?"":"&";if(p.startsWith("_")){const{e:i,m:r,mv:n}=a(p);return r&&"string"!=typeof n?Object.entries(s).reduce(((s,[n,o])=>{let a;return a="object"==typeof o?Object.entries(o).reduce(((e,t)=>e+_(...t,p)),""):o+";",s+t+l({b:e,e:i,m:r,mv:n})+Ul(a)}),""):t+l({b:e,e:i,m:r,mv:n})+Ul(Object.entries(s).reduce(((e,t)=>e+_(...t,p)),""))}return t+p+Ul(Object.entries(s).reduce(((e,t)=>e+_(...t,p)),""))}{let e=""+s;return(null===(o=null==e?void 0:e.startsWith)||void 0===o?void 0:o.call(e,"&"))?_(p,u(e.slice(1)),i):(null===(c=null==e?void 0:e.includes)||void 0===c?void 0:c.call(e,"{"))?_(p,f(e),i):Yl(p.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e)}}let g="";if(i)for(let t in i){const s=i[t],r=this._prepareKeyframesName(e,t);p["kf_"+t]=r,g+=`@keyframes ${r} `+Ul(Object.entries(s).reduce(((e,[t,s])=>e+t+(String(+t)===t?"%":"")+Ul(Object.entries(s).reduce(((e,t)=>e+_(...t)),""))),""))}return m+g+Object.entries(c).reduce(((e,t)=>e+_(...t)),"")};const{mode:i="a",prefix:r="eff",initkey:n="init",params:o,units:l}=e;this._prefix=r,this._initkey=n,this.bem="c"===i?oa:la;const{values:a,keys:c}=(({params:e,units:t})=>{let s=Hl,i=Object.assign(Object.assign({},Ql),t||{});if(e)for(const t in e)s[t]=Xl(s[t]||{},e[t]);for(const e in i)s.root[e]=s.root[e]&&Object.fromEntries(Object.entries(s.root[e]).map((([t,s])=>[t,i[e].replace("{1}",""+s)])));const r={};return s.root.bp&&Object.entries(s.root.bp||{}).forEach((([e,t])=>{r[`min_${e}_`]=`@media (min-width:${t})`,r[`max_${e}_`]=`@media (max-width:${t})`})),s.root.cbp&&Object.entries(s.root.bp||{}).forEach((([e,t])=>{r[`cmin_${e}_`]=`@container (min-width:${t})`,r[`cmax_${e}_`]=`@container (max-width:${t})`})),{values:s,keys:r}})({params:o,units:l});if(this._params=a,this._compKeys=c,this._initkey){const e=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(s[i[r]]=e[i[r]])}return s}(this._params,["root"]),i=Object.entries(e),r={_mode:{root:{}}},n={};i.forEach((([e,t])=>{r._mode[e]||(r._mode[e]={}),Object.entries(t).forEach((([t,s])=>{Object.entries(s).forEach((([s,i])=>{const o=this._prepareVarName(t,s);r._mode[e][o]=i,r._mode.root[o]||(r._mode.root[o]=i,n[t]||(n[t]={}),n[t][s]=`var(${o})`)}))}))})),this._compValues=n,this.baseStyles=this.compile(this._initkey,{c:Object.assign(Object.assign(Object.assign(Object.assign({},r),{$r_:Object.assign(Object.assign({},r._mode.root),{$c:"{uni.inh}",$fsz:"{rem.def}",$ff:"{ff.def}",$u_:{$c:"{uni.inh}",$fsz:"{rem.def}",$ff:"{ff.def}"}})}),(null===(t=r._mode)||void 0===t?void 0:t.dark)?{$dark_:{$r_:r._mode.dark}}:{}),(null===(s=r._mode)||void 0===s?void 0:s.light)?{$light_:{$r_:r._mode.light}}:{})})}}_getStateSelector(e){const t=e+"_";return this._compKeys[t]||Gl[t]||e}}class ca{constructor(e){if(this._stylesheets={},this._rules={},this._expandedSelectors={},this._styleSheetsArray=[],this._listeners=[],this.get=e=>this._stylesheets[e],this.getAll=()=>this._stylesheets,this.add=(e,t)=>{if(!this._stylesheets[e])return this._stylesheets[e]=t,this._styleSheetsArray.push(t),this.cacheRules(e,t),this.notify(),!0},this.remove=e=>{const t=this.get(e);if(!t)return;const s=this._styleSheetsArray.findIndex((e=>e===t));return s>-1&&(this._styleSheetsArray.splice(s,1),delete this._stylesheets[e],delete this._rules[e],delete this._expandedSelectors[e]),this.notify(),!0},this.pack=(e,t)=>{const s=new CSSStyleSheet;if(s.replaceSync(t),s.cssRules.length)return this.add(e,s);console.log(`StyleSheet '${e}' is empty`)},this.cacheRules=(e,t)=>{[...t.cssRules].forEach((t=>{const s=t.cssText.split(" {")[0];s&&(this._rules[e]||(this._rules[e]={}),this._rules[e][s]=t)})),this._expandedSelectors[e]=new Set},this.getExpandedSelectors=e=>this._expandedSelectors[e],this.expandRule=(e,t,s)=>{const i=this._rules[e];if(!i)return void console.log(`No stylesheet with key '${e}'`);const r=i[t];if(!r)return void console.log(`No rule with selector '${t}' in the '${e}' stylesheet`);const[n,o]=r.cssText.split("{"),l=r.parentStyleSheet;if(l){const t=l.cssRules,r=l.insertRule(s+"{"+o+"}".repeat([...s.matchAll(/{/g)].length),t.length);return i[s]=t[r],this._expandedSelectors[e].add(s),!0}},this.apply=e=>{e.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=e=>{this._listeners.push(new WeakRef(e)),this.apply(e)},this.unregisterNode=e=>{const t=this._listeners.findIndex((t=>t.deref()===e));t>=0&&this._listeners.splice(t,1)},this.notify=()=>{this._listeners=this._listeners.reduce(((e,t)=>{const s=t.deref();return s&&(this.apply(s),e.push(t)),e}),[])},e)for(let t in e)this.pack(t,e[t])}removeAll(){return this._styleSheetsArray.splice(0),this._stylesheets={},this._rules={},this._expandedSelectors={},this.notify(),!0}}const pa="style-provider";customElements.define(pa,class extends HTMLElement{get settingsId(){return this.getAttribute("settingsid")||"effcss"}get prefix(){return this.getAttribute("prefix")||"eff"}get mode(){return this.getAttribute("mode")}get isolated(){return this.getAttribute("isolated")}get initkey(){var e;return null!==(e=this.getAttribute("initkey"))&&void 0!==e?e:"init"}constructor(){super(),this._sources=new Map,this.getSettings=()=>{var e;const t=null===(e=null===document||void 0===document?void 0:document.getElementById(this.settingsId))||void 0===e?void 0:e.textContent;return t?JSON.parse(t):{}},this.compileStyleSheet=(e,t)=>{var s,i;const r=null===(s=this.processor)||void 0===s?void 0:s.compile(e,t);if(r&&(null===(i=this.manager)||void 0===i?void 0:i.pack(e,r)))return this._sources.set(t,e),!0},this.useStyleSheet=e=>{var t;let s=this._sources.get(e);return s||(s=this.prefix+this._sources.size.toString(36),this.compileStyleSheet(s,e)),null===(t=this.processor)||void 0===t?void 0:t.bem.attr(s)},this.expandStyleSheet=(e,t)=>{var s;const i=null===(s=this.manager)||void 0===s?void 0:s.getExpandedSelectors(e);if(this.processor&&i){const s=new Set(t).difference(i);let r=s.size;if(r&&this.processor.expandSelector){const t=this.processor.expandSelector;return s.keys().forEach((s=>{const[i,n]=t(e,s);n?this.manager.expandRule(e,i,n):r--})),r}}},this.processStyles=(e,t)=>{if(e)for(let t in e){const s=e[t];this.compileStyleSheet(t,s)}if(t)for(let e in t){const s=t[e];this.expandStyleSheet(e,s)}return!0},this.resolveStyleSheet=e=>this.processor.bem.attr(e)}connectedCallback(){const e=this.getSettings(),{params:t,styles:s,ext:i,units:r}=e,n=this.initkey;this.processor=function(e){return new aa(e)}({prefix:this.prefix,mode:this.mode,initkey:n,params:t,units:r}),this.manager=function(e){return new ca(e)}(n?{[n]:`${pa} {display: contents;}`+this.processor.baseStyles}:{}),this.processStyles(s,i),null===this.isolated&&this.manager.registerNode(document)}});
|
|
7
|
+
const t=Object.entries,e=(e,s,i)=>t(e).reduce(s,i),s=t=>"object"==typeof t,i=t=>`{${t}}`,r=Object.assign.bind(Object),n=(t,e)=>`${t}:${e};`,o=(t,e)=>["@property",t,i(n("syntax",e.syn||'"*"')+n("inherits",e.inh||!1)+(e.ini?n("initial-value",e.ini):""))].join(" "),l=t=>`var(${t})`,a=({l:t,c:e,h:s,a:i=1})=>`oklch(${t} ${e} ${s} / ${i})`,c=["l","c","h","a"];class h{constructor(h){this._outerKeys={},this._outerSets={},this._parseSelector=t=>{let e,s,i,r,n;return[e,n]=t.split(":"),e.startsWith("__")?[s,i,r]=e.slice(2).split("_"):[s,i,r]=e.split("_"),{e:s,m:i,mv:r,s:n}},this._prepareVarName=(...t)=>this._resolver.varName(...t),this._prepareKeyframesName=(...t)=>this._resolver.kfName(...t),this.compile=(h,p)=>{const{_:f,kf:m,k:b={},v:d={},c:u}=p,g=this._resolver.selector.bind(this),_=this._parseSelector;let y=r({},u),v=r({},b),$=r({_:{}},d),x="";if(f)for(let t in f){const e=f[t];if("c"===e.typ){const s={};c.forEach((i=>{const r=t+i,n=this._prepareVarName(h,r);s[i]=n,v["_"+r]=s[i],x+=o(n,e)})),$._[t]=a({l:l(s.l),c:l(s.c),h:l(s.h),a:l(s.a)}),e.all&&(y["_"+t+"l"]=`&lig=>${this._prepareVarName(h,t+"l")}:{1}`,y["_"+t+"c"]=`&chr=>${this._prepareVarName(h,t+"c")}:{1}`,y["_"+t+"h"]=`&hue=>${this._prepareVarName(h,t+"h")}:{1}`,y["_"+t+"a"]=`&alp=>${this._prepareVarName(h,t+"a")}:{1}`)}else{const s=this._prepareVarName(h,t);v["_"+t]=s,$._[t]=l(s),x+=o(s,e)}}const w=t=>v[t]||this._outerKeys[t],j=t=>{var e;return $[t]||this._outerSets[t]||(null===(e=this._outerSets)||void 0===e?void 0:e.root[t])},k=t=>t.replaceAll(/\{(.+?)\}/g,((t,e)=>{const[s,i]=e.split(".");if(i){const t=j(s);return""+((null==t?void 0:t[i])||(null==t?void 0:t.def)||"")}return""+(w(s)||"")})),S=e=>{const s=e.split("?");let i;for(let e in s){const r=s[e],[n,o]=r.split("=>"),l=n.match(/(\w+)(\[[\w,]+\])?/);if(!l)continue;const[a,c,h]=l,p=j(c);if(!p)continue;i=p;let f=t(i);const m=null==h?void 0:h.slice(1,-1).split(",");if(m){const t=new Set(m);f=f.filter((([e,s])=>t.has(e)))}if(o){let[t,e]=o.split("|");void 0===e&&(e=t,t=""),f=f.map((([s,i])=>[t.replace("{0}",s)||s,k(e.replaceAll("{1}",""+i))]))}(m||o)&&(i=Object.fromEntries(f));break}return i};function O(t,r,o){var l,a,c,p;let f=""+t;if((null===(l=null==t?void 0:t.startsWith)||void 0===l?void 0:l.call(t,"$"))&&(f=""+w(t.slice(1)),!f))return"";if(Array.isArray(r))return O(f,Object.assign({},...r.map((t=>"string"==typeof t?S(t):t))),o);if(null==r)return"";if(s(r)){const t=!o||(null===(a=o.startsWith)||void 0===a?void 0:a.call(o,"@"))||f.startsWith("&")||f.startsWith("@")?"":"&";if(f.startsWith("_")){const{e:n,m:o,mv:l}=_(f);return o&&"string"!=typeof l?e(r,((r,[l,a])=>{let c;return c=s(a)?e(a,((t,e)=>t+O(...e,f)),""):a+";",r+t+g({b:h,e:n,m:o,mv:l})+i(c)}),""):t+g({b:h,e:n,m:o,mv:l})+i(e(r,((t,e)=>t+O(...e,f)),""))}return t+f+i(e(r,((t,e)=>t+O(...e,f)),""))}{let t=""+r;return(null===(c=null==t?void 0:t.startsWith)||void 0===c?void 0:c.call(t,"&"))?O(f,S(t.slice(1)),o):(null===(p=null==t?void 0:t.includes)||void 0===p?void 0:p.call(t,"{"))?O(f,k(t),o):n(f.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())),t)}}let z="";if(m)for(let t in m){const s=m[t],r=this._prepareKeyframesName(h,t);v["kf_"+t]=r,z+=`@keyframes ${r} `+i(e(s,((t,[s,r])=>t+s+(String(+s)===s?"%":"")+i(e(r,((t,e)=>t+O(...e)),""))),""))}return x+z+e(y,((t,e)=>t+O(...e)),"")};const{sets:p,keys:f,resolver:m}=h;this._resolver=m,f&&(this._outerKeys=f),p&&(this._outerSets=p)}}class p{constructor(){this._stylesheets={},this._rules={},this._styleSheetsArray=[],this._listeners=[],this.get=t=>this._stylesheets[t],this.has=t=>!!t&&!!this.get(t),this.getAll=()=>this._stylesheets,this.add=(t,e)=>{if(!this._stylesheets[t])return this._stylesheets[t]=e,this._styleSheetsArray.push(e),this.notify(),!0},this.on=t=>{if(!t)return;const e=this._stylesheets[t];if(!e)return;return-1===this._styleSheetsArray.findIndex((t=>t===e))?(this._styleSheetsArray.push(e),this.notify(),!0):void 0},this.off=t=>{if(!t)return;const e=this._stylesheets[t];if(!e)return;const s=this._styleSheetsArray.findIndex((t=>t===e));return-1!==s?(this._styleSheetsArray.splice(s,1),this.notify(),!0):void 0},this.remove=t=>{const e=this.get(t);if(!e)return;const s=this._styleSheetsArray.findIndex((t=>t===e));return s>-1&&(this._styleSheetsArray.splice(s,1),delete this._stylesheets[t],delete this._rules[t]),this.notify(),!0},this.pack=(t,e,s)=>{const i=new CSSStyleSheet;if(i.replaceSync(e),i.cssRules.length)return this.add(t,i);console.log(`StyleSheet '${t}' is empty`)},this.apply=t=>{t.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=t=>{this._listeners.push(new WeakRef(t)),this.apply(t)},this.unregisterNode=t=>{const e=this._listeners.findIndex((e=>e.deref()===t));e>=0&&this._listeners.splice(e,1)},this.notify=()=>{this._listeners=this._listeners.reduce(((t,e)=>{const s=e.deref();return s&&(this.apply(s),t.push(e)),t}),[])}}removeAll(){return this._styleSheetsArray.splice(0),this._stylesheets={},this._rules={},this.notify(),!0}}const f=(...t)=>t.join(","),m="rem",b="-",d=" ",u="-x",g="-y",_="down",y="horizontal",v="vertical",$="text",x=$+b,w="font",j=w+b,k="column",S=k+b,O="max-",z="min-",A="content",N=A+"s",C="-items",E="self",K="inline",W="block",V="size",P="-radius",q="direction",I="outline",M="style",R=b+M,T="end",B=b+T,J="start",L=b+J,G="center",H="word",Z="line",D="break",F=D+b,Q="wrap",U="no"+Q,X="rule",Y="object",tt="top",et=b+tt,st="left",it=b+st,rt="bottom",nt=b+rt,ot="right",lt=b+ot,at="width",ct=b+at,ht="color",pt=b+ht,ft="overflow",mt="align",bt="type",dt="transform",ut="all",gt="height",_t="normal",yt="opacity",vt="visibility",$t="scale",xt="box",wt=b+xt,jt="border",kt="position",St="none",Ot="auto",zt="fill",At="stroke",Nt="reverse",Ct="space",Et="fixed",Kt="origin",Wt="alpha",Vt="luminance",Pt="clip",qt="zoom",It="scroll",Mt="padding",Rt="margin",Tt="both",Bt="mode",Jt="repeat",Lt="light",Gt="linear",Ht="hidden",Zt="shadow",Dt="behavior",Ft="orientation",Qt="name",Ut="after",Xt="before",Yt="image",te="list"+R,ee=te+b+bt,se=te+b+kt,ie=te+b+Yt,re=ht+"-scheme",ne=jt+nt,oe=jt+it,le=jt+lt,ae=jt+et,ce=jt+b+W,he=jt+b+K,pe=ce+L,fe=ce+B,me=he+L,be=he+B,de=jt+ct,ue=ne+ct,ge=oe+ct,_e=le+ct,ye=ae+ct,ve=ce+ct,$e=he+ct,xe=pe+ct,we=fe+ct,je=me+ct,ke=be+ct,Se=jt+P,Oe=ne+it+P,ze=ne+lt+P,Ae=ae+it+P,Ne=ae+lt+P,Ce=jt+L+B+P,Ee=jt+L+L+P,Ke=jt+B+B+P,We=jt+B+L+P,Ve=jt+pt,Pe=oe+pt,qe=le+pt,Ie=ae+pt,Me=ne+pt,Re=ce+pt,Te=he+pt,Be=pe+pt,Je=fe+pt,Le=me+pt,Ge=be+pt,He=jt+R,Ze=oe+R,De=le+R,Fe=ae+R,Qe=ne+R,Ue=ce+R,Xe=he+R,Ye=pe+R,ts=fe+R,es=me+R,ss=be+R,is=I+pt,rs=I+ct,ns=I+R,os=I+b+"offset",ls=ft+u,as=ft+g,cs=Y+b+"fit",hs=Y+b+kt,ps=$t+b+_,fs=xt+b+Zt,ms=Mt+wt,bs=jt+wt,ds=A+wt,us=zt+wt,gs=At+wt,_s="view"+wt,ys="no-"+Pt,vs=Jt+u,$s=Jt+g,xs="no-"+Jt,ws=Mt+it,js=Mt+et,ks=Mt+lt,Ss=Mt+nt,Os=Rt+it,zs=Rt+et,As=Rt+lt,Ns=Rt+nt,Cs="grid",Es="row",Ks="gap",Ws="justify",Vs="flex",Ps=Vs+b,qs="place"+C,Is=K+b+Vs,Ms=Ps+"basis",Rs=Ps+"grow",Ts=Ps+"shrink",Bs=Ps+q,Js=Ps+Q,Ls=Ws+b+A,Gs=Ws+C,Hs=mt+C,Zs=mt+b+A,Ds=mt+b+E,Fs=Cs+b+"template",Qs=Fs+b+Es+"s",Us=Fs+b+k+"s",Xs=Es+b+Ks,Ys=S+Ks,ti=Ws+b+E,ei=Cs+b+Es,si=ei+B,ii=ei+L,ri=Cs+b+k,ni=ri+B,oi=ri+L,li=S+"count",ai=S+zt,ci=S+X,hi=ci+pt,pi=ci+R,fi=ci+ct,mi=S+"span",bi=k+ct,di=Es+b+Nt,ui=S+Nt,gi=Q+b+Nt,_i=Vs+B,yi=Vs+L,vi=Ct+"-between",$i=Ct+"-around",xi=Ct+"-evenly",wi=K+b+Cs,ji="mask-",ki=ji+Pt,Si=ji+"composite",Oi=ji+Bt,zi=ji+Kt,Ai=ji+kt,Ni=ji+Jt,Ci=ji+V,Ei=ji+bt,Ki="timing-function",Wi="delay",Vi="duration",Pi="animation",qi=Pi+b,Ii=qi+Qt,Mi=qi+Ki,Ri=qi+q,Ti=qi+"iteration-count",Bi=qi+Vi,Ji=qi+Wi,Li=qi+"play-state",Gi=qi+zt+b+Bt,Hi="transition",Zi=Hi+b,Di=Zi+Dt,Fi=Zi+"property",Qi=Zi+Ki,Ui=Zi+Vi,Xi=Zi+Wi,Yi="alternate",tr=Yi+b+Nt,er="-out",sr="ease",ir=sr+"-in",rr=ir+er,nr=sr+er,or="step",lr=or+L,ar=or+B,cr="translate",hr="rotate",pr="perspective",fr=pr+b+Kt,mr=st+d+tt,br=ot+d+tt,dr=st+d+rt,ur=ot+d+rt,gr="inset",_r=gr+b,yr=dt+wt,vr=dt+b+Kt,$r=dt+R,xr=_r+W,wr=xr+B,jr=xr+L,kr=_r+K,Sr=kr+B,Or=kr+L,zr="fit-"+A,Ar=z+A,Nr=O+A,Cr=xt+"-sizing",Er=O+at,Kr=z+at,Wr=O+gt,Vr=z+gt,Pr=W+b+V,qr=O+Pr,Ir=z+Pr,Mr=K+b+V,Rr=O+Mr,Tr=z+Mr,Br=It+b+Dt,Jr=It+b+Rt,Lr=Jr+et,Gr=Jr+nt,Hr=Jr+it,Zr=Jr+lt,Dr=Jr+b+W,Fr=Dr+B,Qr=Dr+L,Ur=Jr+b+K,Xr=Ur+B,Yr=Ur+L,tn=It+b+Mt,en=tn+et,sn=tn+nt,rn=tn+it,nn=tn+lt,on=tn+b+W,ln=on+B,an=on+L,cn=tn+b+K,hn=cn+B,pn=cn+L,fn=It+b+"snap",mn=fn+b+mt,bn=fn+b+"stop",dn=fn+b+bt,un="over"+Br,gn=" mandatory",_n="x"+gn,yn="y"+gn,vn=W+gn,$n=K+gn,xn=Tt+gn,wn=" proximity",jn="x"+wn,kn="y"+wn,Sn=W+wn,On=K+wn,zn=Tt+wn,An=x+"decoration",Nn=An+b+ht,Cn=An+b+"thickness",En=An+b+M,Kn=An+b+Z,Wn="white-"+Ct,Vn=x+dt,Pn=x+mt,qn=v+b+mt,In=x+ft,Mn=x+Ft,Rn=x+"rendering",Tn=x+Zt,Bn=x+"emphasis",Jn=Bn+pt,Ln=Bn+b+kt,Gn=Bn+R,Hn=x+Q,Zn=Hn+b+Bt,Dn=Hn+R,Fn=H+b+D,Qn=j+V,Un=j+"weight",Xn=j+"family",Yn=j+M,to=j+"synthesis",eo=j+"variant",so=eo+b+Yi+"s",io=eo+"-caps",ro=eo+"-numeric",no=eo+b+kt,oo=eo+"-east-asian",lo=eo+"-ligatures",ao=eo+"-settings",co="writing-"+Bt,ho=Z+b+gt,po=Z+b+D,fo=Z+"-through",mo="over"+Z,bo="under"+Z,uo="pre",go=uo+b+Z,_o=uo+b+Q,yo=F+Ct+"s",vo=F+ut,$o=F+H,xo=F+Ut,wo=F+Xt,jo=y+"-tb",ko=v+"-lr",So=v+"-rl",Oo="keep-"+ut,zo="pointer",Ao="pan",No=Ao+u,Co=Ao+it,Eo=Ao+lt,Ko=Ao+g,Wo=Ao+b+_,Vo="pinch-"+qt,Po=v+b+$,qo="grab",Io=qo+"bing",Mo="resize",Ro="col-"+Mo,To="row-"+Mo,Bo="n-"+Mo,Jo="e-"+Mo,Lo="s-"+Mo,Go="w-"+Mo,Ho="ne-"+Mo,Zo="ew-"+Mo,Do="nw-"+Mo,Fo="se-"+Mo,Qo="sw-"+Mo,Uo="ns-"+Mo,Xo="nesw-"+Mo,Yo="nwse-"+Mo,tl=qt+b+"in",el=qt+b+"out",sl=zo+"-events",il=It+b+kt,rl="caret"+pt,nl="accent"+pt,ol="filter",ll="backdrop-"+ol,al="background",cl=al+b,hl=cl+Yt,pl=cl+ht,fl=cl+Pt,ml=cl+Kt,bl=cl+kt,dl=bl+u,ul=bl+g,gl=cl+Jt,_l=cl+V,yl=cl+"blend-"+Bt,vl=cl+"attachment",$l="gradient",xl=Gt+b+$l,wl="radial-"+$l,jl="conic-"+$l,kl=A+b+vt,Sl=At+ct,Ol=At+b+yt,zl=zt+b+X,Al=zt+b+yt,Nl=ht+"-dodge",Cl=ht+"-burn",El="hard-"+Lt,Kl="soft-"+Lt,Wl=ht+"-mix",Vl="revert",Pl=Vl+"-layer",ql="container",Il=ql+b+bt,Ml=ql+b+Qt,Rl=":first-",Tl=":last-",Bl=":only-",Jl="child",Ll="of-type",Gl=":nth-child",Hl="prefers-",Zl=Hl+re,Dl="@media",Fl=ht+"-gamut",Ql=Hl+"contrast",Ul="scripting",Xl="::"+Ut,Yl="::"+Xt,ta="sideways",ea=ta+lt,sa={0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},ia=[...Array(12).keys()].reduce(((t,e)=>(t[e]=e,t)),{}),ra={u:{ini:"initial",inh:"inherit",u:"unset",r:Vl,rl:Pl},rep:{rx:vs,ry:$s,r:Jt,s:Ct,ro:"round",nr:xs},lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},hue:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},chr:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},alp:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},cu:{c:"currentColor",t:"transparent"},ff:{def:"Roboto, sans-serif",h:"Georgia, serif"},fwg:{xs:100,s:200,m:400,l:600,xl:700},fsz:{xs:.25,s:.5,m:1,l:1.5,xl:2},fst:{i:"italic",n:_t,o:"oblique"},lsp:{no:0,s:.05,m:.1,l:.2},ws:{n:_t,nw:U,p:uo,pl:go,pw:_o,bs:yo},wb:{n:_t,ba:vo,ka:Oo,bw:$o},wm:{htb:jo,vlr:ko,vrl:So},hyp:{no:St,m:"manual",a:Ot},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:fo,o:mo,u:bo},tor:{m:"mixed",u:"upright",sr:ea,s:ta,ugo:"use-glyph-"+Ft},ta:{l:st,c:G,j:Ws,r:ot,s:J,e:T},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},fr:sa,coef:ia,rat:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778},zi:{min:-1,1:1,2:2,3:3,4:4,5:5,max:10},sp:{"3xs":.125,"2xs":.25,xs:.5,s:.75,m:1,l:1.25,xl:1.5,"2xl":2,"3xl":4},sz:{"3xs":1,"2xs":1.5,xs:2,s:5,m:10,l:15,xl:20,"2xl":25,"3xl":30},usz:{a:"auto",no:0,min:Ar,max:Nr,fit:zr},rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},csz:{cv:"cover",cn:"contain",a:Ot,f:zt,sd:ps},box:{c:ds,p:ms,b:bs,f:us,s:gs,v:_s,nc:ys,t:$},sc:{xs:.5,s:.67,m:1,l:1.5,xl:2},tr:{xs:.25,s:.5,m:1,l:1.5,xl:2},sk:{xs:-15,s:-10,m:0,l:10,xl:15},rot:{xs:-180,s:-90,m:0,l:90,xl:180},z:{s:.8,m:1,l:1.2},pers:{s:10,m:15,l:20},ali:{s:J,e:T,c:G,st:"stretch",sb:vi,sa:$i,se:xi,b:"baseline",fs:yi,fe:_i,no:St},dis:{g:Cs,ig:wi,f:Vs,if:Is,b:W,i:K},ca:ia,co:ia,ra:ia,ro:ia,fd:{r:Es,rr:di,c:k,cr:ui},fb:sa,fo:ia,fg:ia,fs:ia,fw:{w:Q,nw:U,wr:gi},lh:{xs:1,s:1.25,m:1.5,l:1.75,xl:2},lb:{a:Ot,any:"anywhere",n:_t,l:"loose",s:"strict"},ls:{no:St,dt:"dotted",i:gr,h:Ht,ds:"dashed",s:"solid",db:"double",o:"outset",r:"ridge",g:"groove"},ov:{h:Ht,s:It,a:Ot,c:Pt,e:"ellipsis"},v:{h:Ht,v:"visible",c:"collapse",a:Ot},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},ttf:{l:Gt,e:sr,ei:ir,eo:nr,eio:rr,ss:lr,se:ar},tp:{col:f(ht,pl,Ve,Nn),icon:f(zt,At),flt:f(ol,ll),ind:f(Mt,Rt),sz:f(at,Er,Kr,gt,Wr,Vr),esz:f(Ir,Pr,qr,Tr,Mr,Rr),o:yt,b:jt,f:Vs,g:Cs,pos:f(kt,st,tt,rt,ot),tf:f(dt,cr,$t,hr,"skew",pr)},tb:{ad:"allow-discrete",n:_t},aic:{inf:"infinite",1:1,2:2,3:3,4:4,5:5},wc:{a:Ot,sp:il,c:N,tf:dt,o:yt,i:gr,tfi:f(dt,gr)},afm:{no:St,f:"forwards",b:"backwards",both:Tt},adir:{r:Nt,a:Yi,ar:tr},aps:{r:"running",p:"paused"},pe:{a:Ot,no:St,all:ut,f:zt,s:At},cur:{h:"help",a:Ot,p:zo,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:$,vt:Po,cp:"copy",m:"move",g:qo,gng:Io,cr:Ro,rr:To,nr:Bo,er:Jo,sr:Lo,wr:Go,ner:Ho,ewr:Zo,nwr:Do,ser:Fo,swr:Qo,nsr:Uo,neswr:Xo,nwser:Yo,zi:tl,zo:el},res:{n:St,v:v,h:y,b:Tt},toa:{a:Ot,no:St,px:No,pl:Co,pr:Eo,py:Ko,pu:"pan-up",pd:Wo,pz:Vo,m:"manipulation"},us:{n:St,t:$,all:ut,a:Ot},sb:{a:Ot,s:"smooth"},sss:{n:_t,a:"always"},sst:{n:St,x:"x",y:"y",b:W,i:K,both:Tt,xm:_n,ym:yn,bm:vn,im:$n,bothm:xn,xp:jn,yp:kn,bp:Sn,ip:On,bothp:zn},pos:{r:"relative",a:"absolute",f:Et,s:"static"},posv:{b:rt,t:tt,c:G,l:st,r:ot,lt:mr,rt:br,lb:dr,rb:ur},cf:{a:Ot,b:"balance"},cs:{no:St,all:ut},mc:{a:"add",s:"subtract",i:"intersect",e:"exclude"},mt:{a:Wt,l:Vt},mm:{a:Wt,l:Vt,m:"match-source"},bgbm:{n:_t,m:"multiply",scr:"screen",o:"overlay",d:"darken",l:Lt+"en",dif:"difference",exc:"exclusion",h:"hue",sat:"saturation",c:ht,lum:"luminosity",cd:Nl,cb:Cl,hl:El,sl:Kl},bga:{s:It,f:Et,l:"local"},cnt:{n:_t,s:V,is:Mr}},na={a:Pi,an:Ii,adur:Bi,adel:Ji,aps:Li,afm:Gi,adir:Ri,aic:Ti,atf:Mi,tn:Hi,tdur:Ui,tdel:Xi,tb:Di,tp:Fi,ttf:Qi,ba:xo,bb:wo,bor:jt,bw:de,br:Se,bs:He,bls:Ze,brs:De,bts:Fe,bbs:Qe,bbls:Ue,bis:Xe,bbss:Ye,bbes:ts,biss:es,bies:ss,brw:_e,blw:ge,btw:ye,bbw:ue,btlr:Ae,btrr:Ne,bbrr:ze,bblr:Oe,biw:$e,bblw:ve,bbew:we,bbsw:xe,bisw:je,biew:ke,besr:We,beer:Ke,bssr:Ee,bser:Ce,bc:Ve,blc:Pe,brc:qe,btc:Ie,bbc:Me,bblc:Re,bic:Te,bbsc:Be,bbec:Je,bisc:Le,biec:Ge,bg:al,bgi:hl,bgc:pl,c:ht,cmix:Wl,csh:re,acc:nl,ctc:rl,st:At,stw:Sl,sto:Ol,fi:zt,fir:zl,fio:Al,flt:ol,bf:ll,dis:"display",g:Cs,jc:Ls,ji:Gs,ai:Hs,pi:qs,ac:Zs,gt:Fs,gtr:Qs,gtc:Us,gp:Ks,rg:Xs,cg:Ys,as:Ds,js:ti,gr:ei,gre:si,grs:ii,gc:ri,gce:ni,gcs:oi,fx:Vs,fxd:Bs,fxw:Js,fxs:Ts,fxg:Rs,fxb:Ms,ord:"order",dir:q,m:Rt,ml:Os,mr:As,mt:zs,mb:Ns,p:Mt,pl:ws,pr:ks,pt:js,pb:Ss,out:I,oc:is,ow:rs,os:ns,oo:os,l:st,r:ot,t:tt,b:rt,ins:gr,ib:xr,ibe:wr,ibs:jr,ii:kr,iie:Sr,iis:Or,wc:"will-change",app:"appearance",pe:sl,cur:"cursor",toa:"touch-action",us:"user-select",res:Mo,lis:te,lisp:se,lisi:ie,list:ee,sb:Br,ssa:mn,sss:bn,sst:dn,sm:Jr,sml:Hr,smr:Zr,smt:Lr,smb:Gr,sp:tn,spl:rn,spr:nn,spt:en,spb:sn,smbl:Dr,smbe:Fr,smbs:Qr,smi:Ur,smie:Xr,smis:Yr,spbl:on,spbe:ln,spbs:an,spi:cn,spie:hn,spis:pn,osb:un,ar:"aspect-ratio",w:at,maxw:Er,minw:Kr,h:gt,minh:Vr,maxh:Wr,bl:Pr,maxb:qr,minb:Ir,i:Mr,mini:Tr,maxi:Rr,per:pr,pero:fr,rot:hr,sc:$t,tf:dt,tfb:yr,tfo:vr,tfs:$r,tr:cr,z:qt,lts:"letter-spacing",lh:ho,lb:po,f:w,fst:Yn,ff:Xn,fwg:Un,fsz:Qn,fsn:to,fv:eo,fva:so,fvc:io,fvea:oo,fvl:lo,fvn:ro,fvs:ao,fvp:no,tt:Vn,td:An,tdt:Cn,tds:En,tdl:Kn,ta:Pn,to:In,trg:Rn,ts:Tn,te:Bn,tep:Ln,tec:Jn,tes:Gn,tw:Hn,twm:Zn,tws:Dn,va:qn,ws:Wn,tor:Mn,wb:Fn,wm:co,hyp:"hyphens",bsz:Cr,bsh:fs,pos:kt,cf:ai,crs:pi,crc:hi,crw:fi,cs:mi,cw:bi,cc:li,bgcl:fl,bgp:bl,bgpx:dl,bgpy:ul,bgbm:yl,bgo:ml,bgr:gl,bga:vl,bgsz:_l,mcl:ki,mcm:Si,mm:Oi,mo:zi,mp:Ai,mre:Ni,msz:Ci,mtp:Ei,obf:cs,obp:hs,con:A,ov:ft,ovx:ls,ovy:as,v:vt,cv:kl,o:yt,zi:"z-index",lgr:xl,rgr:wl,cgr:jl,inf:"infinite",cnt:Il,cnn:Ml,$:":root",$u:"*",$h:":hover",$f:":focus",$fv:":focus-visible",$a:":active",$v:":visited",$val:":valid",$inv:":invalid",$e:":empty",$d:":disabled",$r:":required",$o:":optional",$m:":modal",$l:":link",$fc:Rl+Jl,$lc:Tl+Jl,$oc:Bl+Jl,$1:Gl+"(odd)",$2:Gl+"(even)",$ft:Rl+Ll,$lt:Tl+Ll,$ot:Bl+Ll,$bef:Yl,$aft:Xl,$bd:"::backdrop",$ba:`&${Yl},&${Xl}`,$pl:":placeholder",$light:Dl+`(${Zl}: light)`,$dark:Dl+`(${Zl}: dark)`,$red_m:Dl+"(prefers-reduced-motion: reduce)",$ori_l:Dl+`(${Ft}: landscape)`,$ori_p:Dl+`(${Ft}: portrait)`,$gam_srgb:Dl+`(${Fl}: srgb)`,$gam_p3:Dl+`(${Fl}: p3)`,$gam_rec:Dl+`(${Fl}: rec2020)`,$con_no:Dl+`(${Ql}: no-preference)`,$con_m:Dl+`(${Ql}: more)`,$con_l:Dl+`(${Ql}: less)`,$con_c:Dl+`(${Ql}: custom)`,$scr_no:Dl+`(${Ul}: none)`,$scr_ini:Dl+`(${Ul}: initial-only)`,$scr_en:Dl+`(${Ul}: enabled)`},oa={xs:30+m,sm:40+m,md:48+m,lg:64+m,xl:80+m},la={xs:10+m,sm:20+m,md:30+m,lg:40+m,xl:48+m},aa={$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}",$$u:{$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}"}},ca={light:{lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9}},dark:{lig:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},ha="{1}rem",pa="{1}deg",fa="span {1}",ma={fb:"calc(100% * {1})",ra:fa,ca:fa,sz:ha,sp:ha,rad:ha,th:ha,bp:ha,cbp:ha,fsz:ha,lsp:ha,tr:ha,pers:ha,sk:pa,rot:pa,time:"{1}ms"},ba="style-provider",da=t=>"object"==typeof t;class ua{constructor(t){this._counter=0,this._keys=new Set,this._configs=new Map,this.use=(t,e)=>{const s=this._configs.get(t);if(s)return s;const i=e||this._prefix+this._counter.toString(36);return this._keys.add(i),this._configs.set(t,i),this._counter++,i},this.getKey=t=>this._configs.get(t),this.getKeys=()=>[...this._keys],this.getConfigs=()=>Object.fromEntries(this._configs.entries().map((([t,e])=>[e,t]))),this._prefix=(null==t?void 0:t.prefix)||"eff",t.initContent&&Object.entries(t.initContent).forEach((([t,e])=>this.use(e,t))),t.hydrate&&(this._counter=0)}}const ga=globalThis.document,_a=t=>"application/json"===(null==t?void 0:t.getAttribute("type"));!function(t={}){const{name:e=ba,styles:s={},settings:i={}}=t,r=globalThis.customElements;!(null==r?void 0:r.get(e))&&r.define(e,class extends HTMLElement{get prefix(){return this.getAttribute("prefix")||"eff"}get mode(){return this.getAttribute("mode")||"a"}get isolated(){return null!==this.getAttribute("isolated")}get hydrate(){return null!==this.getAttribute("hydrate")}get _settingsSelector(){return"#"+(this.getAttribute("settingsid")||"effcss")}get _initSelector(){return"."+(this.getAttribute("initcls")||"effcss_init")}get settingsContent(){const t=null==ga?void 0:ga.querySelector(this._settingsSelector);let e;return e=_a(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):t?null==t?void 0:t.effcss:i,e||{}}get initContent(){const t=ga.querySelectorAll(this._initSelector);let e=s||{};return t.forEach((t=>{let s;s=_a(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):null==t?void 0:t.effcss,e=Object.assign(Object.assign({},e),s||{})})),e}constructor(){super(),this._setState=()=>{const{units:t,keys:s,sets:i,mediaBP:r=oa,containerBP:n=la,rootStyle:o=aa,themes:l=ca}=this.settingsContent,a=Object.assign(Object.assign({},ma),t||{}),c=Object.assign(Object.assign({},na),s||{}),h=Object.assign({},ra);i&&Object.entries(i).forEach((([t,e])=>h[t]=Object.assign({},e)));const p=Object.entries(l);if(a)for(const t in a)h[t]=h[t]&&Object.fromEntries(Object.entries(h[t]).map((([e,s])=>[e,a[t].replace("{1}",""+s)])));r&&Object.entries(r).forEach((([t,e])=>{c[`min_${t}_`]=`@media (min-width:${e})`,c[`max_${t}_`]=`@media (max-width:${e})`})),n&&Object.entries(n).forEach((([t,e])=>{c[`cmin_${t}_`]=`@container (min-width:${e})`,c[`cmax_${t}_`]=`@container (max-width:${e})`}));const f={},m={};l&&h&&p.forEach((([t,e])=>{const s={};Object.entries(e).forEach((([t,e])=>{Object.entries(e).forEach((([e,i])=>{const r=this._resolver.varName(t,e);a[t]?s[r]=a[t].replace("{1}",""+i):s[r]=i,f[r]||(f[r]=h[t][e],h[t][e]=`var(${r})`)}))})),m[t]=s})),this._dict={sets:h,keys:c},this._mainConfig={c:Object.assign(Object.assign({[e]:{display:"contents"},_theme:m,$$:Object.assign(f,o)},(null==m?void 0:m.dark)?{$dark_:{$$:m.dark}}:{}),(null==m?void 0:m.light)?{$light_:{$$:m.light}}:{})}},this.use=(t,e)=>{let s=this._collector.use(t,e);return this._manager&&!this._manager.has(e)&&this._manager.pack(s,this.css(t,s)),this.resolve(s)},this.usePublic=t=>Object.fromEntries(Object.entries(t).map((([t,e])=>[t,this.use(e,t)]))),this.usePrivate=t=>t.map((t=>this.use(t))),this.css=(t,e)=>{var s;return null===(s=this._processor)||void 0===s?void 0:s.compile(e,t)},this.on=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),e?this._manager.on(e):void 0},this.off=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),e?this._manager.off(e):void 0},this.get=(t=this._mainConfig)=>{let e;return e="object"==typeof t?this._collector.getKey(t):t,this._manager.get(e)},this.getMany=(t=this._collector.getKeys())=>t.map((t=>this.get(t))),this.resolve=t=>this._resolver.attr(t||this._collector.getKey(this._mainConfig))}connectedCallback(){this._resolver=(t=>{const{mode:e}=t,s=t=>Object.entries(t).reduce(((t,[e,s])=>(void 0!==s&&t.push(e+(s?"-"+s:"")),t)),[]).join(" "),i=(t,e)=>Object.defineProperties({[t]:e},{k:{value:t},v:{value:e}}),r=(...t)=>"--"+t.join("-"),n=(...t)=>t.join("-");return"c"===e?{selector:({b:t,e:e,m:s,mv:i})=>`.${t}${(e?"__"+e:"")+(s?"_"+s:"")+(s&&i?"_"+i:"")}`,attr:t=>e=>r=>{let n=r||"";da(n)&&(n=s(n));const o=t+(e?"__"+e:"");return n=o+(n?" "+(null==n?void 0:n.split(" ").map((t=>o+"_"+t.split("-").join("_"))).join(" ")):""),i("class",n)},varName:r,kfName:n}:{selector:({b:t,e:e,m:s,mv:i})=>`[data-${t}${e?"-"+e:""}${s?'~="'+(s||"")+(i?"-"+i:"")+'"':""}]`,attr:t=>e=>r=>{const n=`data-${t}${e?"-"+e:""}`;let o=r||"";return da(o)&&(o=s(o)),i(n,o)},varName:r,kfName:n}})({mode:this.mode}),this._setState();const t=this.initContent,e=this.prefix;var s;this._collector=(s={hydrate:this.hydrate,prefix:e,initContent:t},new ua(s)),this._processor=function(t){return new h(t)}({sets:this._dict.sets,keys:this._dict.keys,resolver:this._resolver}),this._manager=new p,this.use(this._mainConfig),this.usePublic(t),ga&&!this.isolated&&this._manager.registerNode(ga)}})}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const s=(...s)=>s.join(","),e="rem",t="-",r=" ",i="-x",a="-y",l="down",o="horizontal",n="vertical",c="text",b=c+t,p="font",m=p+t,f="column",d=f+t,g="max-",x="min-",u="content",h=u+"s",w="-items",$="self",v="inline",y="block",z="size",k="-radius",_="direction",j="outline",q="style",A=t+q,C="end",G=t+C,R="start",B=t+R,D="center",E="word",F="line",H="break",I=H+t,J="wrap",K="no"+J,L="rule",M="object",N="top",O=t+N,P="left",Q=t+P,S="bottom",T=t+S,U="right",V=t+U,W="width",X=t+W,Y="color",Z=t+Y,ss="overflow",es="align",ts="type",rs="transform",is="all",as="height",ls="normal",os="opacity",ns="visibility",cs="scale",bs="box",ps=t+bs,ms="border",fs="position",ds="none",gs="auto",xs="fill",us="stroke",hs="reverse",ws="space",$s="fixed",vs="origin",ys="alpha",zs="luminance",ks="clip",_s="zoom",js="scroll",qs="padding",As="margin",Cs="both",Gs="mode",Rs="repeat",Bs="light",Ds="linear",Es="hidden",Fs="shadow",Hs="behavior",Is="orientation",Js="name",Ks="after",Ls="before",Ms="image",Ns="list"+A,Os=Ns+t+ts,Ps=Ns+t+fs,Qs=Ns+t+Ms,Ss=Y+"-scheme",Ts=ms+T,Us=ms+Q,Vs=ms+V,Ws=ms+O,Xs=ms+t+y,Ys=ms+t+v,Zs=Xs+B,se=Xs+G,ee=Ys+B,te=Ys+G,re=ms+X,ie=Ts+X,ae=Us+X,le=Vs+X,oe=Ws+X,ne=Xs+X,ce=Ys+X,be=Zs+X,pe=se+X,me=ee+X,fe=te+X,de=ms+k,ge=Ts+Q+k,xe=Ts+V+k,ue=Ws+Q+k,he=Ws+V+k,we=ms+B+G+k,$e=ms+B+B+k,ve=ms+G+G+k,ye=ms+G+B+k,ze=ms+Z,ke=Us+Z,_e=Vs+Z,je=Ws+Z,qe=Ts+Z,Ae=Xs+Z,Ce=Ys+Z,Ge=Zs+Z,Re=se+Z,Be=ee+Z,De=te+Z,Ee=ms+A,Fe=Us+A,He=Vs+A,Ie=Ws+A,Je=Ts+A,Ke=Xs+A,Le=Ys+A,Me=Zs+A,Ne=se+A,Oe=ee+A,Pe=te+A,Qe=j+Z,Se=j+X,Te=j+A,Ue=j+t+"offset",Ve=ss+i,We=ss+a,Xe=M+t+"fit",Ye=M+t+fs,Ze=cs+t+l,st=bs+t+Fs,et=qs+ps,tt=ms+ps,rt=u+ps,it=xs+ps,at=us+ps,lt="view"+ps,ot="no-"+ks,nt=Rs+i,ct=Rs+a,bt="no-"+Rs,pt=qs+Q,mt=qs+O,ft=qs+V,dt=qs+T,gt=As+Q,xt=As+O,ut=As+V,ht=As+T,wt="grid",$t="row",vt="gap",yt="justify",zt="flex",kt=zt+t,_t="place"+w,jt=v+t+zt,qt=kt+"basis",At=kt+"grow",Ct=kt+"shrink",Gt=kt+_,Rt=kt+J,Bt=yt+t+u,Dt=yt+w,Et=es+w,Ft=es+t+u,Ht=es+t+$,It=wt+t+"template",Jt=It+t+$t+"s",Kt=It+t+f+"s",Lt=$t+t+vt,Mt=d+vt,Nt=yt+t+$,Ot=wt+t+$t,Pt=Ot+G,Qt=Ot+B,St=wt+t+f,Tt=St+G,Ut=St+B,Vt=d+"count",Wt=d+xs,Xt=d+L,Yt=Xt+Z,Zt=Xt+A,sr=Xt+X,er=d+"span",tr=f+X,rr=$t+t+hs,ir=d+hs,ar=J+t+hs,lr=zt+G,or=zt+B,nr=ws+"-between",cr=ws+"-around",br=ws+"-evenly",pr=v+t+wt,mr="mask-",fr=mr+ks,dr=mr+"composite",gr=mr+Gs,xr=mr+vs,ur=mr+fs,hr=mr+Rs,wr=mr+z,$r=mr+ts,vr="timing-function",yr="delay",zr="duration",kr="animation",_r=kr+t,jr=_r+Js,qr=_r+vr,Ar=_r+_,Cr=_r+"iteration-count",Gr=_r+zr,Rr=_r+yr,Br=_r+"play-state",Dr=_r+xs+t+Gs,Er="transition",Fr=Er+t,Hr=Fr+Hs,Ir=Fr+"property",Jr=Fr+vr,Kr=Fr+zr,Lr=Fr+yr,Mr="alternate",Nr=Mr+t+hs,Or="-out",Pr="ease",Qr=Pr+"-in",Sr=Qr+Or,Tr=Pr+Or,Ur="step",Vr=Ur+B,Wr=Ur+G,Xr="translate",Yr="rotate",Zr="perspective",si=Zr+t+vs,ei=P+r+N,ti=U+r+N,ri=P+r+S,ii=U+r+S,ai="inset",li=ai+t,oi=rs+ps,ni=rs+t+vs,ci=rs+A,bi=li+y,pi=bi+G,mi=bi+B,fi=li+v,di=fi+G,gi=fi+B,xi="fit-"+u,ui=x+u,hi=g+u,wi=bs+"-sizing",$i=g+W,vi=x+W,yi=g+as,zi=x+as,ki=y+t+z,_i=g+ki,ji=x+ki,qi=v+t+z,Ai=g+qi,Ci=x+qi,Gi=js+t+Hs,Ri=js+t+As,Bi=Ri+O,Di=Ri+T,Ei=Ri+Q,Fi=Ri+V,Hi=Ri+t+y,Ii=Hi+G,Ji=Hi+B,Ki=Ri+t+v,Li=Ki+G,Mi=Ki+B,Ni=js+t+qs,Oi=Ni+O,Pi=Ni+T,Qi=Ni+Q,Si=Ni+V,Ti=Ni+t+y,Ui=Ti+G,Vi=Ti+B,Wi=Ni+t+v,Xi=Wi+G,Yi=Wi+B,Zi=js+t+"snap",sa=Zi+t+es,ea=Zi+t+"stop",ta=Zi+t+ts,ra="over"+Gi,ia=" mandatory",aa="x"+ia,la="y"+ia,oa=y+ia,na=v+ia,ca=Cs+ia,ba=" proximity",pa="x"+ba,ma="y"+ba,fa=y+ba,da=v+ba,ga=Cs+ba,xa=b+"decoration",ua=xa+t+Y,ha=xa+t+"thickness",wa=xa+t+q,$a=xa+t+F,va="white-"+ws,ya=b+rs,za=b+es,ka=n+t+es,_a=b+ss,ja=b+Is,qa=b+"rendering",Aa=b+Fs,Ca=b+"emphasis",Ga=Ca+Z,Ra=Ca+t+fs,Ba=Ca+A,Da=b+J,Ea=Da+t+Gs,Fa=Da+A,Ha=E+t+H,Ia=m+z,Ja=m+"weight",Ka=m+"family",La=m+q,Ma=m+"synthesis",Na=m+"variant",Oa=Na+t+Mr+"s",Pa=Na+"-caps",Qa=Na+"-numeric",Sa=Na+t+fs,Ta=Na+"-east-asian",Ua=Na+"-ligatures",Va=Na+"-settings",Wa="writing-"+Gs,Xa=F+t+as,Ya=F+t+H,Za=F+"-through",sl="over"+F,el="under"+F,tl="pre",rl=tl+t+F,il=tl+t+J,al=I+ws+"s",ll=I+is,ol=I+E,nl=I+Ks,cl=I+Ls,bl=o+"-tb",pl=n+"-lr",ml=n+"-rl",fl="keep-"+is,dl="pointer",gl="pan",xl=gl+i,ul=gl+Q,hl=gl+V,wl=gl+a,$l=gl+t+l,vl="pinch-"+_s,yl=n+t+c,zl="grab",kl=zl+"bing",_l="resize",jl="col-"+_l,ql="row-"+_l,Al="n-"+_l,Cl="e-"+_l,Gl="s-"+_l,Rl="w-"+_l,Bl="ne-"+_l,Dl="ew-"+_l,El="nw-"+_l,Fl="se-"+_l,Hl="sw-"+_l,Il="ns-"+_l,Jl="nesw-"+_l,Kl="nwse-"+_l,Ll=_s+t+"in",Ml=_s+t+"out",Nl=dl+"-events",Ol=js+t+fs,Pl="caret"+Z,Ql="accent"+Z,Sl="filter",Tl="backdrop-"+Sl,Ul="background",Vl=Ul+t,Wl=Vl+Ms,Xl=Vl+Y,Yl=Vl+ks,Zl=Vl+vs,so=Vl+fs,eo=so+i,to=so+a,ro=Vl+Rs,io=Vl+z,ao=Vl+"blend-"+Gs,lo=Vl+"attachment",oo="gradient",no=Ds+t+oo,co="radial-"+oo,bo="conic-"+oo,po=u+t+ns,mo=us+X,fo=us+t+os,go=xs+t+L,xo=xs+t+os,uo=Y+"-dodge",ho=Y+"-burn",wo="hard-"+Bs,$o="soft-"+Bs,vo=Y+"-mix",yo="revert",zo=yo+"-layer",ko="container",_o=ko+t+ts,jo=ko+t+Js,qo=":first-",Ao=":last-",Co=":only-",Go="child",Ro="of-type",Bo=":nth-child",Do="prefers-",Eo=Do+Ss,Fo="@media",Ho=Y+"-gamut",Io=Do+"contrast",Jo="scripting",Ko="::"+Ks,Lo="::"+Ls,Mo="sideways",No=Mo+V,Oo={0:0,"1/12":"0.0833","1/10":"0.1","1/6":"0.1667","1/5":"0.2","1/4":"0.25","3/10":"0.3","1/3":"0.3333","2/5":"0.4","5/12":"0.4167","1/2":"0.5","7/12":"0.5833","3/5":"0.6","2/3":"0.6667","7/10":"0.7","3/4":"0.75","4/5":"0.8","5/6":"0.8333","9/10":"0.9","11/12":"0.9167",1:"1"},Po=[...Array(12).keys()].reduce(((s,e)=>(s[e]=e,s)),{}),Qo={u:{ini:"initial",inh:"inherit",u:"unset",r:yo,rl:zo},rep:{rx:nt,ry:ct,r:Rs,s:ws,ro:"round",nr:bt},lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9},hue:{def:261.35,b:261.35,i:194.77,e:29.23,w:70.66,s:142.49},chr:{def:.03,xs:.03,s:.06,m:.1,l:.15,xl:.25},alp:{def:1,min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},cu:{c:"currentColor",t:"transparent"},ff:{def:"Roboto, sans-serif",h:"Georgia, serif"},fwg:{xs:100,s:200,m:400,l:600,xl:700},fsz:{xs:.25,s:.5,m:1,l:1.5,xl:2},fst:{i:"italic",n:ls,o:"oblique"},lsp:{no:0,s:.05,m:.1,l:.2},ws:{n:ls,nw:K,p:tl,pl:rl,pw:il,bs:al},wb:{n:ls,ba:ll,ka:fl,bw:ol},wm:{htb:bl,vlr:pl,vrl:ml},hyp:{no:ds,m:"manual",a:gs},tt:{l:"lowercase",u:"uppercase",c:"capitalize"},td:{lt:Za,o:sl,u:el},tor:{m:"mixed",u:"upright",sr:No,s:Mo,ugo:"use-glyph-"+Is},ta:{l:P,c:D,j:yt,r:U,s:R,e:C},time:{def:300,xs:100,s:200,m:300,l:450,xl:600,no:0,min:50,max:750},fr:Oo,coef:Po,rat:{1:1,"2/1":2,"1/2":.5,"4/3":1.3333,"3/4":.75,"9/16":.5625,"16/9":1.7778},zi:{min:-1,1:1,2:2,3:3,4:4,5:5,max:10},sp:{"3xs":.125,"2xs":.25,xs:.5,s:.75,m:1,l:1.25,xl:1.5,"2xl":2,"3xl":4},sz:{"3xs":1,"2xs":1.5,xs:2,s:5,m:10,l:15,xl:20,"2xl":25,"3xl":30},usz:{a:"auto",no:0,min:ui,max:hi,fit:xi},rad:{s:.5,m:1,l:2},th:{s:.1,m:.25,l:.5},csz:{cv:"cover",cn:"contain",a:gs,f:xs,sd:Ze},box:{c:rt,p:et,b:tt,f:it,s:at,v:lt,nc:ot,t:c},sc:{xs:.5,s:.67,m:1,l:1.5,xl:2},tr:{xs:.25,s:.5,m:1,l:1.5,xl:2},sk:{xs:-15,s:-10,m:0,l:10,xl:15},rot:{xs:-180,s:-90,m:0,l:90,xl:180},z:{s:.8,m:1,l:1.2},pers:{s:10,m:15,l:20},ali:{s:R,e:C,c:D,st:"stretch",sb:nr,sa:cr,se:br,b:"baseline",fs:or,fe:lr,no:ds},dis:{g:wt,ig:pr,f:zt,if:jt,b:y,i:v},ca:Po,co:Po,ra:Po,ro:Po,fd:{r:$t,rr:rr,c:f,cr:ir},fb:Oo,fo:Po,fg:Po,fs:Po,fw:{w:J,nw:K,wr:ar},lh:{xs:1,s:1.25,m:1.5,l:1.75,xl:2},lb:{a:gs,any:"anywhere",n:ls,l:"loose",s:"strict"},ls:{no:ds,dt:"dotted",i:ai,h:Es,ds:"dashed",s:"solid",db:"double",o:"outset",r:"ridge",g:"groove"},ov:{h:Es,s:js,a:gs,c:ks,e:"ellipsis"},v:{h:Es,v:"visible",c:"collapse",a:gs},o:{min:0,xs:.1,s:.25,m:.5,l:.75,xl:.9,max:1},ttf:{l:Ds,e:Pr,ei:Qr,eo:Tr,eio:Sr,ss:Vr,se:Wr},tp:{col:s(Y,Xl,ze,ua),icon:s(xs,us),flt:s(Sl,Tl),ind:s(qs,As),sz:s(W,$i,vi,as,yi,zi),esz:s(ji,ki,_i,Ci,qi,Ai),o:os,b:ms,f:zt,g:wt,pos:s(fs,P,N,S,U),tf:s(rs,Xr,cs,Yr,"skew",Zr)},tb:{ad:"allow-discrete",n:ls},aic:{inf:"infinite",1:1,2:2,3:3,4:4,5:5},wc:{a:gs,sp:Ol,c:h,tf:rs,o:os,i:ai,tfi:s(rs,ai)},afm:{no:ds,f:"forwards",b:"backwards",both:Cs},adir:{r:hs,a:Mr,ar:Nr},aps:{r:"running",p:"paused"},pe:{a:gs,no:ds,all:is,f:xs,s:us},cur:{h:"help",a:gs,p:dl,cm:"context-menu",pr:"progress",w:"wait",cell:"cell",crh:"crosshair",t:c,vt:yl,cp:"copy",m:"move",g:zl,gng:kl,cr:jl,rr:ql,nr:Al,er:Cl,sr:Gl,wr:Rl,ner:Bl,ewr:Dl,nwr:El,ser:Fl,swr:Hl,nsr:Il,neswr:Jl,nwser:Kl,zi:Ll,zo:Ml},res:{n:ds,v:n,h:o,b:Cs},toa:{a:gs,no:ds,px:xl,pl:ul,pr:hl,py:wl,pu:"pan-up",pd:$l,pz:vl,m:"manipulation"},us:{n:ds,t:c,all:is,a:gs},sb:{a:gs,s:"smooth"},sss:{n:ls,a:"always"},sst:{n:ds,x:"x",y:"y",b:y,i:v,both:Cs,xm:aa,ym:la,bm:oa,im:na,bothm:ca,xp:pa,yp:ma,bp:fa,ip:da,bothp:ga},pos:{r:"relative",a:"absolute",f:$s,s:"static"},posv:{b:S,t:N,c:D,l:P,r:U,lt:ei,rt:ti,lb:ri,rb:ii},cf:{a:gs,b:"balance"},cs:{no:ds,all:is},mc:{a:"add",s:"subtract",i:"intersect",e:"exclude"},mt:{a:ys,l:zs},mm:{a:ys,l:zs,m:"match-source"},bgbm:{n:ls,m:"multiply",scr:"screen",o:"overlay",d:"darken",l:Bs+"en",dif:"difference",exc:"exclusion",h:"hue",sat:"saturation",c:Y,lum:"luminosity",cd:uo,cb:ho,hl:wo,sl:$o},bga:{s:js,f:$s,l:"local"},cnt:{n:ls,s:z,is:qi}},So={a:kr,an:jr,adur:Gr,adel:Rr,aps:Br,afm:Dr,adir:Ar,aic:Cr,atf:qr,tn:Er,tdur:Kr,tdel:Lr,tb:Hr,tp:Ir,ttf:Jr,ba:nl,bb:cl,bor:ms,bw:re,br:de,bs:Ee,bls:Fe,brs:He,bts:Ie,bbs:Je,bbls:Ke,bis:Le,bbss:Me,bbes:Ne,biss:Oe,bies:Pe,brw:le,blw:ae,btw:oe,bbw:ie,btlr:ue,btrr:he,bbrr:xe,bblr:ge,biw:ce,bblw:ne,bbew:pe,bbsw:be,bisw:me,biew:fe,besr:ye,beer:ve,bssr:$e,bser:we,bc:ze,blc:ke,brc:_e,btc:je,bbc:qe,bblc:Ae,bic:Ce,bbsc:Ge,bbec:Re,bisc:Be,biec:De,bg:Ul,bgi:Wl,bgc:Xl,c:Y,cmix:vo,csh:Ss,acc:Ql,ctc:Pl,st:us,stw:mo,sto:fo,fi:xs,fir:go,fio:xo,flt:Sl,bf:Tl,dis:"display",g:wt,jc:Bt,ji:Dt,ai:Et,pi:_t,ac:Ft,gt:It,gtr:Jt,gtc:Kt,gp:vt,rg:Lt,cg:Mt,as:Ht,js:Nt,gr:Ot,gre:Pt,grs:Qt,gc:St,gce:Tt,gcs:Ut,fx:zt,fxd:Gt,fxw:Rt,fxs:Ct,fxg:At,fxb:qt,ord:"order",dir:_,m:As,ml:gt,mr:ut,mt:xt,mb:ht,p:qs,pl:pt,pr:ft,pt:mt,pb:dt,out:j,oc:Qe,ow:Se,os:Te,oo:Ue,l:P,r:U,t:N,b:S,ins:ai,ib:bi,ibe:pi,ibs:mi,ii:fi,iie:di,iis:gi,wc:"will-change",app:"appearance",pe:Nl,cur:"cursor",toa:"touch-action",us:"user-select",res:_l,lis:Ns,lisp:Ps,lisi:Qs,list:Os,sb:Gi,ssa:sa,sss:ea,sst:ta,sm:Ri,sml:Ei,smr:Fi,smt:Bi,smb:Di,sp:Ni,spl:Qi,spr:Si,spt:Oi,spb:Pi,smbl:Hi,smbe:Ii,smbs:Ji,smi:Ki,smie:Li,smis:Mi,spbl:Ti,spbe:Ui,spbs:Vi,spi:Wi,spie:Xi,spis:Yi,osb:ra,ar:"aspect-ratio",w:W,maxw:$i,minw:vi,h:as,minh:zi,maxh:yi,bl:ki,maxb:_i,minb:ji,i:qi,mini:Ci,maxi:Ai,per:Zr,pero:si,rot:Yr,sc:cs,tf:rs,tfb:oi,tfo:ni,tfs:ci,tr:Xr,z:_s,lts:"letter-spacing",lh:Xa,lb:Ya,f:p,fst:La,ff:Ka,fwg:Ja,fsz:Ia,fsn:Ma,fv:Na,fva:Oa,fvc:Pa,fvea:Ta,fvl:Ua,fvn:Qa,fvs:Va,fvp:Sa,tt:ya,td:xa,tdt:ha,tds:wa,tdl:$a,ta:za,to:_a,trg:qa,ts:Aa,te:Ca,tep:Ra,tec:Ga,tes:Ba,tw:Da,twm:Ea,tws:Fa,va:ka,ws:va,tor:ja,wb:Ha,wm:Wa,hyp:"hyphens",bsz:wi,bsh:st,pos:fs,cf:Wt,crs:Zt,crc:Yt,crw:sr,cs:er,cw:tr,cc:Vt,bgcl:Yl,bgp:so,bgpx:eo,bgpy:to,bgbm:ao,bgo:Zl,bgr:ro,bga:lo,bgsz:io,mcl:fr,mcm:dr,mm:gr,mo:xr,mp:ur,mre:hr,msz:wr,mtp:$r,obf:Xe,obp:Ye,con:u,ov:ss,ovx:Ve,ovy:We,v:ns,cv:po,o:os,zi:"z-index",lgr:no,rgr:co,cgr:bo,inf:"infinite",cnt:_o,cnn:jo,$:":root",$u:"*",$h:":hover",$f:":focus",$fv:":focus-visible",$a:":active",$v:":visited",$val:":valid",$inv:":invalid",$e:":empty",$d:":disabled",$r:":required",$o:":optional",$m:":modal",$l:":link",$fc:qo+Go,$lc:Ao+Go,$oc:Co+Go,$1:Bo+"(odd)",$2:Bo+"(even)",$ft:qo+Ro,$lt:Ao+Ro,$ot:Co+Ro,$bef:Lo,$aft:Ko,$bd:"::backdrop",$ba:`&${Lo},&${Ko}`,$pl:":placeholder",$light:Fo+`(${Eo}: light)`,$dark:Fo+`(${Eo}: dark)`,$red_m:Fo+"(prefers-reduced-motion: reduce)",$ori_l:Fo+`(${Is}: landscape)`,$ori_p:Fo+`(${Is}: portrait)`,$gam_srgb:Fo+`(${Ho}: srgb)`,$gam_p3:Fo+`(${Ho}: p3)`,$gam_rec:Fo+`(${Ho}: rec2020)`,$con_no:Fo+`(${Io}: no-preference)`,$con_m:Fo+`(${Io}: more)`,$con_l:Fo+`(${Io}: less)`,$con_c:Fo+`(${Io}: custom)`,$scr_no:Fo+`(${Jo}: none)`,$scr_ini:Fo+`(${Jo}: initial-only)`,$scr_en:Fo+`(${Jo}: enabled)`},To={xs:30+e,sm:40+e,md:48+e,lg:64+e,xl:80+e},Uo={xs:10+e,sm:20+e,md:30+e,lg:40+e,xl:48+e},Vo={$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}",$$u:{$c:"{u.inh}",$fsz:"16px",$ff:"{ff.def}"}},Wo={light:{lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9}},dark:{lig:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}}},Xo="{1}rem",Yo="{1}deg",Zo="span {1}",sn={fb:"calc(100% * {1})",ra:Zo,ca:Zo,sz:Xo,sp:Xo,rad:Xo,th:Xo,bp:Xo,cbp:Xo,fsz:Xo,lsp:Xo,tr:Xo,pers:Xo,sk:Yo,rot:Yo,time:"{1}ms"},en="eff",tn="effcss",rn="effcss_init",an="style-provider";export{en as PREFIX,an as PROVIDER_TAG_NAME,tn as SETTINGS_SCRIPT_ID,rn as STYLES_SCRIPT_CLS,Uo as containerBP,So as keys,To as mediaBP,Vo as rootStyle,Qo as sets,Wo as themes,sn as units};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{values as e,keys as t}from"./css/dict.js";import{COMPONENT_NAME as s,SETTINGS_ID as i,PREFIX as r}from"./utils.js";import"./css/functions.js";"function"==typeof SuppressedError&&SuppressedError;const n={light:{lig:{def:.75,c:.05,s:.65,m:.75,l:.85,n:.9}},dark:{lig:{def:.4,n:.25,s:.3,m:.4,l:.5,c:.95}},root:e},o="{1}rem",l="{1}deg",c="calc(100% * {1})",a="span {1}",h={cqw:"{1}cqw",cqh:"{1}cqh",cqb:"{1}cqb",cqi:"{1}cqi",cqmin:"{1}cqmin",cqmax:"{1}cqmax",vw:"{1}vw",vh:"{1}vh",vmin:"{1}vmin",vmax:"{1}vmax",fb:c,ra:a,ca:a,ins:c,sz:o,sp:o,rad:o,th:o,bp:o,cbp:o,fsz:o,lsp:o,tr:o,sk:l,rot:l,perc:c,time:"{1}ms",rem:"{1}px"},p=e=>`{${e}}`,d=Object.assign.bind(Object),u=(e,t)=>`${e}:${t};`,m=(e,t)=>["@property",e,p(u("syntax",t.syn||'"*"')+u("inherits",t.inh||!1)+(t.ini?u("initial-value",t.ini):""))].join(" "),f=e=>`var(${e})`,_=({l:e,c:t,h:s,a:i=1})=>`oklch(${e} ${t} ${s} / ${i})`,y=["l","c","h","a"],v=e=>Object.entries(e).reduce(((e,[t,s])=>(void 0!==s&&e.push(t+(s?"-"+s:"")),e)),[]).join(" "),b=(e,t)=>Object.defineProperties({[e]:t},{k:{value:e},v:{value:t}}),g={selector:({b:e,e:t,m:s,mv:i,s:r})=>`.${e}${(t?"__"+t:"")+(s?"_"+s:"")+(s&&i?"_"+i:"")+(r?":"+r:"")}`,attr:e=>t=>s=>{let i=s||"";"object"==typeof i&&(i=v(i));const r=e+(t?"__"+t:"");return i=r+(i?" "+(null==i?void 0:i.split(" ").map((e=>r+"_"+e.split("-").join("_"))).join(" ")):""),b("class",i)}},S={selector:({b:e,e:t,m:s,mv:i,s:r})=>`[data-${e}${t?"-"+t:""}${s||r?'~="'+(s||"")+(i?"-"+i:"")+(r?":"+r:"")+'"':""}]`,attr:e=>t=>s=>{const i=`data-${e}${t?"-"+t:""}`;let r=s||"";return"object"==typeof r&&(r=v(r)),b(i,r)}};class ${constructor(e){var s,i;this.baseStyles="",this._prefix="eff",this._mode="a",this._initkey="init",this._params=n,this._compKeys={},this._compValues={},this.parseSelector=e=>{let t,s,i,r,n;return[t,n]=e.split(":"),t.startsWith("__")?[s,i,r]=t.slice(2).split("_"):[s,i,r]=t.split("_"),{e:s,m:i,mv:r,s:n}},this.expandSelector=(e,t)=>{const{e:s,m:i,mv:r,s:n}=this.parseSelector(t),o=n&&this._getStateSelector(n),l=this.bem.selector({b:e,e:s,m:i,mv:r,s:n});let c="";return(null==o?void 0:o.startsWith("@"))?c=o+"{"+l:(null==o?void 0:o.startsWith(":"))&&(c=l+"{&"+o),[this.bem.selector({b:e,e:s,m:i,mv:r}),c]},this._prepareVarName=(...e)=>["-",this._prefix,...e].join("-"),this._prepareKeyframesName=(...e)=>[this._prefix,...e].join("-"),this.compile=(e,s)=>{const{_:i,kf:r,k:n={},v:o={},c:l}=s,c=this.bem.selector.bind(this),a=this.parseSelector;let h=d({},l),v=d({},n),b=d({_:{}},o),g="";if(i)for(let t in i){const s=i[t];if("c"===s.typ){const i={};y.forEach((r=>{const n=t+r,o=this._prepareVarName(e,n);i[r]=o,v["_"+n]=i[r],g+=m(o,s)})),b._[t]=_({l:f(i.l),c:f(i.c),h:f(i.h),a:f(i.a)}),s.all&&(h["_"+t+"l"]=`&lig=>${this._prepareVarName(e,t+"l")}:{1}`,h["_"+t+"c"]=`&chr=>${this._prepareVarName(e,t+"c")}:{1}`,h["_"+t+"h"]=`&hue=>${this._prepareVarName(e,t+"h")}:{1}`,h["_"+t+"a"]=`&alp=>${this._prepareVarName(e,t+"a")}:{1}`)}else{const i=this._prepareVarName(e,t);v["_"+t]=i,b._[t]=f(i),g+=m(i,s)}}const S=e=>v[e]||this._compKeys[e]||t[e],$=e=>b[e]||this._compValues[e]||this._params.root[e],j=e=>e.replaceAll(/\{(.+?)\}/g,((e,t)=>{const[s,i]=t.split(".");if(i){const e=$(s);return""+((null==e?void 0:e[i])||(null==e?void 0:e.def)||"")}return""+(S(s)||"")})),x=e=>{const t=e.split("?");let s;for(let e in t){const i=t[e],[r,n]=i.split("=>"),o=r.match(/(\w+)(\[[\w,]+\])?/);if(!o)continue;const[l,c,a]=o,h=$(c);if(!h)continue;s=h;let p=Object.entries(s);const d=null==a?void 0:a.slice(1,-1).split(",");if(d){const e=new Set(d);p=p.filter((([t,s])=>e.has(t)))}if(n){let[e,t]=n.split("|");void 0===t&&(t=e,e=""),p=p.map((([s,i])=>[e.replace("{0}",s)||s,j(t.replaceAll("{1}",""+i))]))}(d||n)&&(s=Object.fromEntries(p));break}return s};function O(t,s,i){var r,n,o,l;let h=""+t;if((null===(r=null==t?void 0:t.startsWith)||void 0===r?void 0:r.call(t,"$"))&&(h=S(t.slice(1)),!h))return"";if(Array.isArray(s))return O(h,Object.assign({},...s.map((e=>"string"==typeof e?x(e):e))),i);if(null==s)return"";if("object"==typeof s){const t=!i||(null===(n=i.startsWith)||void 0===n?void 0:n.call(i,"@"))||h.startsWith("&")||h.startsWith("@")?"":"&";if(h.startsWith("_")){const{e:i,m:r,mv:n}=a(h);return r&&"string"!=typeof n?Object.entries(s).reduce(((s,[n,o])=>{let l;return l="object"==typeof o?Object.entries(o).reduce(((e,t)=>e+O(...t,h)),""):o+";",s+t+c({b:e,e:i,m:r,mv:n})+p(l)}),""):t+c({b:e,e:i,m:r,mv:n})+p(Object.entries(s).reduce(((e,t)=>e+O(...t,h)),""))}return t+h+p(Object.entries(s).reduce(((e,t)=>e+O(...t,h)),""))}{let e=""+s;return(null===(o=null==e?void 0:e.startsWith)||void 0===o?void 0:o.call(e,"&"))?O(h,x(e.slice(1)),i):(null===(l=null==e?void 0:e.includes)||void 0===l?void 0:l.call(e,"{"))?O(h,j(e),i):u(h.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),e)}}let k="";if(r)for(let t in r){const s=r[t],i=this._prepareKeyframesName(e,t);v["kf_"+t]=i,k+=`@keyframes ${i} `+p(Object.entries(s).reduce(((e,[t,s])=>e+t+(String(+t)===t?"%":"")+p(Object.entries(s).reduce(((e,t)=>e+O(...t)),""))),""))}return g+k+Object.entries(h).reduce(((e,t)=>e+O(...t)),"")};const{mode:r="a",prefix:o="eff",initkey:l="init",params:c,units:a}=e;this._prefix=o,this._initkey=l,this.bem="c"===r?g:S;const{values:v,keys:b}=(({params:e,units:t})=>{let s=n,i=Object.assign(Object.assign({},h),t||{});if(e)for(const t in e)s[t]=d(s[t]||{},e[t]);for(const e in i)s.root[e]=s.root[e]&&Object.fromEntries(Object.entries(s.root[e]).map((([t,s])=>[t,i[e].replace("{1}",""+s)])));const r={};return s.root.bp&&Object.entries(s.root.bp||{}).forEach((([e,t])=>{r[`min_${e}_`]=`@media (min-width:${t})`,r[`max_${e}_`]=`@media (max-width:${t})`})),s.root.cbp&&Object.entries(s.root.bp||{}).forEach((([e,t])=>{r[`cmin_${e}_`]=`@container (min-width:${t})`,r[`cmax_${e}_`]=`@container (max-width:${t})`})),{values:s,keys:r}})({params:c,units:a});if(this._params=v,this._compKeys=b,this._initkey){const e=function(e,t){var s={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(s[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(s[i[r]]=e[i[r]])}return s}(this._params,["root"]),t=Object.entries(e),r={_mode:{root:{}}},n={};t.forEach((([e,t])=>{r._mode[e]||(r._mode[e]={}),Object.entries(t).forEach((([t,s])=>{Object.entries(s).forEach((([s,i])=>{const o=this._prepareVarName(t,s);r._mode[e][o]=i,r._mode.root[o]||(r._mode.root[o]=i,n[t]||(n[t]={}),n[t][s]=`var(${o})`)}))}))})),this._compValues=n,this.baseStyles=this.compile(this._initkey,{c:Object.assign(Object.assign(Object.assign(Object.assign({},r),{$r_:Object.assign(Object.assign({},r._mode.root),{$c:"{uni.inh}",$fsz:"{rem.def}",$ff:"{ff.def}",$u_:{$c:"{uni.inh}",$fsz:"{rem.def}",$ff:"{ff.def}"}})}),(null===(s=r._mode)||void 0===s?void 0:s.dark)?{$dark_:{$r_:r._mode.dark}}:{}),(null===(i=r._mode)||void 0===i?void 0:i.light)?{$light_:{$r_:r._mode.light}}:{})})}}_getStateSelector(e){const s=e+"_";return this._compKeys[s]||t[s]||e}}function j(e){return new $(e)}class x{constructor(e){if(this._stylesheets={},this._rules={},this._expandedSelectors={},this._styleSheetsArray=[],this._listeners=[],this.get=e=>this._stylesheets[e],this.getAll=()=>this._stylesheets,this.add=(e,t)=>{if(!this._stylesheets[e])return this._stylesheets[e]=t,this._styleSheetsArray.push(t),this.cacheRules(e,t),this.notify(),!0},this.remove=e=>{const t=this.get(e);if(!t)return;const s=this._styleSheetsArray.findIndex((e=>e===t));return s>-1&&(this._styleSheetsArray.splice(s,1),delete this._stylesheets[e],delete this._rules[e],delete this._expandedSelectors[e]),this.notify(),!0},this.pack=(e,t)=>{const s=new CSSStyleSheet;if(s.replaceSync(t),s.cssRules.length)return this.add(e,s);console.log(`StyleSheet '${e}' is empty`)},this.cacheRules=(e,t)=>{[...t.cssRules].forEach((t=>{const s=t.cssText.split(" {")[0];s&&(this._rules[e]||(this._rules[e]={}),this._rules[e][s]=t)})),this._expandedSelectors[e]=new Set},this.getExpandedSelectors=e=>this._expandedSelectors[e],this.expandRule=(e,t,s)=>{const i=this._rules[e];if(!i)return void console.log(`No stylesheet with key '${e}'`);const r=i[t];if(!r)return void console.log(`No rule with selector '${t}' in the '${e}' stylesheet`);const[n,o]=r.cssText.split("{"),l=r.parentStyleSheet;if(l){const t=l.cssRules,r=l.insertRule(s+"{"+o+"}".repeat([...s.matchAll(/{/g)].length),t.length);return i[s]=t[r],this._expandedSelectors[e].add(s),!0}},this.apply=e=>{e.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=e=>{this._listeners.push(new WeakRef(e)),this.apply(e)},this.unregisterNode=e=>{const t=this._listeners.findIndex((t=>t.deref()===e));t>=0&&this._listeners.splice(t,1)},this.notify=()=>{this._listeners=this._listeners.reduce(((e,t)=>{const s=t.deref();return s&&(this.apply(s),e.push(t)),e}),[])},e)for(let t in e)this.pack(t,e[t])}removeAll(){return this._styleSheetsArray.splice(0),this._stylesheets={},this._rules={},this._expandedSelectors={},this.notify(),!0}}function O(e){return new x(e)}const k=j,w=O;function A(e){customElements.define((null==e?void 0:e.name)||s,class extends HTMLElement{get settingsId(){return this.getAttribute("settingsid")||i}get prefix(){return this.getAttribute("prefix")||r}get mode(){return this.getAttribute("mode")}get isolated(){return this.getAttribute("isolated")}get initkey(){var e;return null!==(e=this.getAttribute("initkey"))&&void 0!==e?e:"init"}constructor(){super(),this._sources=new Map,this.getSettings=()=>{var t;const s=null===(t=null===document||void 0===document?void 0:document.getElementById(this.settingsId))||void 0===t?void 0:t.textContent;return s?JSON.parse(s):(null==e?void 0:e.config)||{}},this.compileStyleSheet=(e,t)=>{var s,i;const r=null===(s=this.processor)||void 0===s?void 0:s.compile(e,t);if(r&&(null===(i=this.manager)||void 0===i?void 0:i.pack(e,r)))return this._sources.set(t,e),!0},this.useStyleSheet=e=>{var t;let s=this._sources.get(e);return s||(s=this.prefix+this._sources.size.toString(36),this.compileStyleSheet(s,e)),null===(t=this.processor)||void 0===t?void 0:t.bem.attr(s)},this.expandStyleSheet=(e,t)=>{var s;const i=null===(s=this.manager)||void 0===s?void 0:s.getExpandedSelectors(e);if(this.processor&&i){const s=new Set(t).difference(i);let r=s.size;if(r&&this.processor.expandSelector){const t=this.processor.expandSelector;return s.keys().forEach((s=>{const[i,n]=t(e,s);n?this.manager.expandRule(e,i,n):r--})),r}}},this.processStyles=(e,t)=>{if(e)for(let t in e){const s=e[t];this.compileStyleSheet(t,s)}if(t)for(let e in t){const s=t[e];this.expandStyleSheet(e,s)}return!0},this.resolveStyleSheet=e=>this.processor.bem.attr(e)}connectedCallback(){const e=this.getSettings(),{params:t,styles:i,ext:r,units:n}=e,o=this.initkey;this.processor=j({prefix:this.prefix,mode:this.mode,initkey:o,params:t,units:n}),this.manager=O(o?{[o]:`${s} {display: contents;}`+this.processor.baseStyles}:{}),this.processStyles(i,r),null===this.isolated&&this.manager.registerNode(document)}})}export{w as createStyleManager,k as createStyleProcessor,A as defineStyleProvider};
|
|
1
|
+
import{PREFIX as t,SETTINGS_SCRIPT_ID as e,STYLES_SCRIPT_CLS as s,units as i,keys as r,sets as n,PROVIDER_TAG_NAME as l,mediaBP as o,containerBP as h,rootStyle as a,themes as c}from"./constants.js";import{createResolver as u,createCollector as _}from"./utils/common.js";const d=Object.entries,p=(t,e,s)=>d(t).reduce(e,s),f=t=>"object"==typeof t,y=t=>`{${t}}`,g=Object.assign.bind(Object),m=(t,e)=>`${t}:${e};`,v=(t,e)=>["@property",t,y(m("syntax",e.syn||'"*"')+m("inherits",e.inh||!1)+(e.ini?m("initial-value",e.ini):""))].join(" "),b=t=>`var(${t})`,S=({l:t,c:e,h:s,a:i=1})=>`oklch(${t} ${e} ${s} / ${i})`,j=["l","c","h","a"];class ${constructor(t){this._outerKeys={},this._outerSets={},this._parseSelector=t=>{let e,s,i,r,n;return[e,n]=t.split(":"),e.startsWith("__")?[s,i,r]=e.slice(2).split("_"):[s,i,r]=e.split("_"),{e:s,m:i,mv:r,s:n}},this._prepareVarName=(...t)=>this._resolver.varName(...t),this._prepareKeyframesName=(...t)=>this._resolver.kfName(...t),this.compile=(t,e)=>{const{_:s,kf:i,k:r={},v:n={},c:l}=e,o=this._resolver.selector.bind(this),h=this._parseSelector;let a=g({},l),c=g({},r),u=g({_:{}},n),_="";if(s)for(let e in s){const i=s[e];if("c"===i.typ){const s={};j.forEach((r=>{const n=e+r,l=this._prepareVarName(t,n);s[r]=l,c["_"+n]=s[r],_+=v(l,i)})),u._[e]=S({l:b(s.l),c:b(s.c),h:b(s.h),a:b(s.a)}),i.all&&(a["_"+e+"l"]=`&lig=>${this._prepareVarName(t,e+"l")}:{1}`,a["_"+e+"c"]=`&chr=>${this._prepareVarName(t,e+"c")}:{1}`,a["_"+e+"h"]=`&hue=>${this._prepareVarName(t,e+"h")}:{1}`,a["_"+e+"a"]=`&alp=>${this._prepareVarName(t,e+"a")}:{1}`)}else{const s=this._prepareVarName(t,e);c["_"+e]=s,u._[e]=b(s),_+=v(s,i)}}const $=t=>c[t]||this._outerKeys[t],O=t=>{var e;return u[t]||this._outerSets[t]||(null===(e=this._outerSets)||void 0===e?void 0:e.root[t])},A=t=>t.replaceAll(/\{(.+?)\}/g,((t,e)=>{const[s,i]=e.split(".");if(i){const t=O(s);return""+((null==t?void 0:t[i])||(null==t?void 0:t.def)||"")}return""+($(s)||"")})),k=t=>{const e=t.split("?");let s;for(let t in e){const i=e[t],[r,n]=i.split("=>"),l=r.match(/(\w+)(\[[\w,]+\])?/);if(!l)continue;const[o,h,a]=l,c=O(h);if(!c)continue;s=c;let u=d(s);const _=null==a?void 0:a.slice(1,-1).split(",");if(_){const t=new Set(_);u=u.filter((([e,s])=>t.has(e)))}if(n){let[t,e]=n.split("|");void 0===e&&(e=t,t=""),u=u.map((([s,i])=>[t.replace("{0}",s)||s,A(e.replaceAll("{1}",""+i))]))}(_||n)&&(s=Object.fromEntries(u));break}return s};function x(e,s,i){var r,n,l,a;let c=""+e;if((null===(r=null==e?void 0:e.startsWith)||void 0===r?void 0:r.call(e,"$"))&&(c=""+$(e.slice(1)),!c))return"";if(Array.isArray(s))return x(c,Object.assign({},...s.map((t=>"string"==typeof t?k(t):t))),i);if(null==s)return"";if(f(s)){const e=!i||(null===(n=i.startsWith)||void 0===n?void 0:n.call(i,"@"))||c.startsWith("&")||c.startsWith("@")?"":"&";if(c.startsWith("_")){const{e:i,m:r,mv:n}=h(c);return r&&"string"!=typeof n?p(s,((s,[n,l])=>{let h;return h=f(l)?p(l,((t,e)=>t+x(...e,c)),""):l+";",s+e+o({b:t,e:i,m:r,mv:n})+y(h)}),""):e+o({b:t,e:i,m:r,mv:n})+y(p(s,((t,e)=>t+x(...e,c)),""))}return e+c+y(p(s,((t,e)=>t+x(...e,c)),""))}{let t=""+s;return(null===(l=null==t?void 0:t.startsWith)||void 0===l?void 0:l.call(t,"&"))?x(c,k(t.slice(1)),i):(null===(a=null==t?void 0:t.includes)||void 0===a?void 0:a.call(t,"{"))?x(c,A(t),i):m(c.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase())),t)}}let N="";if(i)for(let e in i){const s=i[e],r=this._prepareKeyframesName(t,e);c["kf_"+e]=r,N+=`@keyframes ${r} `+y(p(s,((t,[e,s])=>t+e+(String(+e)===e?"%":"")+y(p(s,((t,e)=>t+x(...e)),""))),""))}return _+N+p(a,((t,e)=>t+x(...e)),"")};const{sets:e,keys:s,resolver:i}=t;this._resolver=i,s&&(this._outerKeys=s),e&&(this._outerSets=e)}}class O{constructor(){this._stylesheets={},this._rules={},this._styleSheetsArray=[],this._listeners=[],this.get=t=>this._stylesheets[t],this.has=t=>!!t&&!!this.get(t),this.getAll=()=>this._stylesheets,this.add=(t,e)=>{if(!this._stylesheets[t])return this._stylesheets[t]=e,this._styleSheetsArray.push(e),this.notify(),!0},this.on=t=>{if(!t)return;const e=this._stylesheets[t];if(!e)return;return-1===this._styleSheetsArray.findIndex((t=>t===e))?(this._styleSheetsArray.push(e),this.notify(),!0):void 0},this.off=t=>{if(!t)return;const e=this._stylesheets[t];if(!e)return;const s=this._styleSheetsArray.findIndex((t=>t===e));return-1!==s?(this._styleSheetsArray.splice(s,1),this.notify(),!0):void 0},this.remove=t=>{const e=this.get(t);if(!e)return;const s=this._styleSheetsArray.findIndex((t=>t===e));return s>-1&&(this._styleSheetsArray.splice(s,1),delete this._stylesheets[t],delete this._rules[t]),this.notify(),!0},this.pack=(t,e,s)=>{const i=new CSSStyleSheet;if(i.replaceSync(e),i.cssRules.length)return this.add(t,i);console.log(`StyleSheet '${t}' is empty`)},this.apply=t=>{t.adoptedStyleSheets=this._styleSheetsArray},this.registerNode=t=>{this._listeners.push(new WeakRef(t)),this.apply(t)},this.unregisterNode=t=>{const e=this._listeners.findIndex((e=>e.deref()===t));e>=0&&this._listeners.splice(e,1)},this.notify=()=>{this._listeners=this._listeners.reduce(((t,e)=>{const s=e.deref();return s&&(this.apply(s),t.push(e)),t}),[])}}removeAll(){return this._styleSheetsArray.splice(0),this._stylesheets={},this._rules={},this.notify(),!0}}const A=globalThis.document,k=t=>"application/json"===(null==t?void 0:t.getAttribute("type"));function x(d={}){const{name:p=l,styles:f={},settings:y={}}=d,g=globalThis.customElements;return!(null==g?void 0:g.get(p))&&(g.define(p,class extends HTMLElement{get prefix(){return this.getAttribute("prefix")||t}get mode(){return this.getAttribute("mode")||"a"}get isolated(){return null!==this.getAttribute("isolated")}get hydrate(){return null!==this.getAttribute("hydrate")}get _settingsSelector(){return"#"+(this.getAttribute("settingsid")||e)}get _initSelector(){return"."+(this.getAttribute("initcls")||s)}get settingsContent(){const t=null==A?void 0:A.querySelector(this._settingsSelector);let e;return e=k(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):t?null==t?void 0:t.effcss:y,e||{}}get initContent(){const t=A.querySelectorAll(this._initSelector);let e=f||{};return t.forEach((t=>{let s;s=k(t)?(null==t?void 0:t.textContent)&&JSON.parse(null==t?void 0:t.textContent):null==t?void 0:t.effcss,e=Object.assign(Object.assign({},e),s||{})})),e}constructor(){super(),this._setState=()=>{const{units:t,keys:e,sets:s,mediaBP:l=o,containerBP:u=h,rootStyle:_=a,themes:d=c}=this.settingsContent,f=Object.assign(Object.assign({},i),t||{}),y=Object.assign(Object.assign({},r),e||{}),g=Object.assign({},n);s&&Object.entries(s).forEach((([t,e])=>g[t]=Object.assign({},e)));const m=Object.entries(d);if(f)for(const t in f)g[t]=g[t]&&Object.fromEntries(Object.entries(g[t]).map((([e,s])=>[e,f[t].replace("{1}",""+s)])));l&&Object.entries(l).forEach((([t,e])=>{y[`min_${t}_`]=`@media (min-width:${e})`,y[`max_${t}_`]=`@media (max-width:${e})`})),u&&Object.entries(u).forEach((([t,e])=>{y[`cmin_${t}_`]=`@container (min-width:${e})`,y[`cmax_${t}_`]=`@container (max-width:${e})`}));const v={},b={};d&&g&&m.forEach((([t,e])=>{const s={};Object.entries(e).forEach((([t,e])=>{Object.entries(e).forEach((([e,i])=>{const r=this._resolver.varName(t,e);f[t]?s[r]=f[t].replace("{1}",""+i):s[r]=i,v[r]||(v[r]=g[t][e],g[t][e]=`var(${r})`)}))})),b[t]=s})),this._dict={sets:g,keys:y},this._mainConfig={c:Object.assign(Object.assign({[p]:{display:"contents"},_theme:b,$$:Object.assign(v,_)},(null==b?void 0:b.dark)?{$dark_:{$$:b.dark}}:{}),(null==b?void 0:b.light)?{$light_:{$$:b.light}}:{})}},this.use=(t,e)=>{let s=this._collector.use(t,e);return this._manager&&!this._manager.has(e)&&this._manager.pack(s,this.css(t,s)),this.resolve(s)},this.usePublic=t=>Object.fromEntries(Object.entries(t).map((([t,e])=>[t,this.use(e,t)]))),this.usePrivate=t=>t.map((t=>this.use(t))),this.css=(t,e)=>{var s;return null===(s=this._processor)||void 0===s?void 0:s.compile(e,t)},this.on=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),e?this._manager.on(e):void 0},this.off=t=>{let e;return e="string"==typeof t?t:this._collector.getKey(t),e?this._manager.off(e):void 0},this.get=(t=this._mainConfig)=>{let e;return e="object"==typeof t?this._collector.getKey(t):t,this._manager.get(e)},this.getMany=(t=this._collector.getKeys())=>t.map((t=>this.get(t))),this.resolve=t=>this._resolver.attr(t||this._collector.getKey(this._mainConfig))}connectedCallback(){this._resolver=u({mode:this.mode}),this._setState();const t=this.initContent,e=this.prefix;var s;this._collector=_({hydrate:this.hydrate,prefix:e,initContent:t}),this._processor=(s={sets:this._dict.sets,keys:this._dict.keys,resolver:this._resolver},new $(s)),this._manager=new O,this.use(this._mainConfig),this.usePublic(t),A&&!this.isolated&&this._manager.registerNode(A)}}),!0)}export{x as defineProvider};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { IStyleProcessor,
|
|
1
|
+
import { IStyleProcessor, IStyleResolver } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Processor constructor params
|
|
4
4
|
* @private
|
|
5
5
|
*/
|
|
6
6
|
interface IConstructorParams {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
params?: IStyleConfig['params'];
|
|
11
|
-
units?: IStyleConfig['units'];
|
|
7
|
+
sets?: Record<string, Record<string, string | number>>;
|
|
8
|
+
keys?: Record<string, string | number>;
|
|
9
|
+
resolver: IStyleResolver;
|
|
12
10
|
}
|
|
13
11
|
/**
|
|
14
12
|
* Put value in curly braces
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export declare const sets: Record<string, Record<string, string | number>>;
|
|
2
|
+
export declare const keys: Record<string, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Media breakpoints
|
|
5
|
+
*/
|
|
6
|
+
export declare const mediaBP: {
|
|
7
|
+
xs: string;
|
|
8
|
+
sm: string;
|
|
9
|
+
md: string;
|
|
10
|
+
lg: string;
|
|
11
|
+
xl: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Container breakpoints
|
|
15
|
+
*/
|
|
16
|
+
export declare const containerBP: {
|
|
17
|
+
xs: string;
|
|
18
|
+
sm: string;
|
|
19
|
+
md: string;
|
|
20
|
+
lg: string;
|
|
21
|
+
xl: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Default root styles
|
|
25
|
+
*/
|
|
26
|
+
export declare const rootStyle: {
|
|
27
|
+
$c: string;
|
|
28
|
+
$fsz: string;
|
|
29
|
+
$ff: string;
|
|
30
|
+
$$u: {
|
|
31
|
+
$c: string;
|
|
32
|
+
$fsz: string;
|
|
33
|
+
$ff: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Default style params
|
|
38
|
+
*/
|
|
39
|
+
export declare const themes: {
|
|
40
|
+
/**
|
|
41
|
+
* Light mode
|
|
42
|
+
*/
|
|
43
|
+
light: {
|
|
44
|
+
lig: {
|
|
45
|
+
def: number;
|
|
46
|
+
c: number;
|
|
47
|
+
s: number;
|
|
48
|
+
m: number;
|
|
49
|
+
l: number;
|
|
50
|
+
n: number;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Dark mode
|
|
55
|
+
*/
|
|
56
|
+
dark: {
|
|
57
|
+
lig: {
|
|
58
|
+
def: number;
|
|
59
|
+
n: number;
|
|
60
|
+
s: number;
|
|
61
|
+
m: number;
|
|
62
|
+
l: number;
|
|
63
|
+
c: number;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export declare const units: Record<string, string>;
|
|
68
|
+
/**
|
|
69
|
+
* Prefix which will be used for private stylesheets
|
|
70
|
+
*/
|
|
71
|
+
export declare const PREFIX = "eff";
|
|
72
|
+
/**
|
|
73
|
+
* Id for special script element,
|
|
74
|
+
* which contains provider settings
|
|
75
|
+
*/
|
|
76
|
+
export declare const SETTINGS_SCRIPT_ID = "effcss";
|
|
77
|
+
/**
|
|
78
|
+
* ClassName for special script elements,
|
|
79
|
+
* which contain initial stylesheet configs
|
|
80
|
+
*/
|
|
81
|
+
export declare const STYLES_SCRIPT_CLS = "effcss_init";
|
|
82
|
+
/**
|
|
83
|
+
* Name of the custom style provider element
|
|
84
|
+
*/
|
|
85
|
+
export declare const PROVIDER_TAG_NAME = "style-provider";
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createProcessor } from './_provider/process';
|
|
3
|
-
import { createManager } from './_provider/manage';
|
|
1
|
+
import { TProviderSettings, TProviderInitContent } from './types';
|
|
4
2
|
/**
|
|
5
|
-
*
|
|
3
|
+
* Define style provider custom element
|
|
6
4
|
*/
|
|
7
|
-
export declare
|
|
8
|
-
/**
|
|
9
|
-
* Create {@link IStyleManager | style manager}
|
|
10
|
-
*/
|
|
11
|
-
export declare const createStyleManager: typeof createManager;
|
|
12
|
-
/**
|
|
13
|
-
* Define style provider as custom element
|
|
14
|
-
*/
|
|
15
|
-
export declare function defineStyleProvider(props?: {
|
|
5
|
+
export declare function defineProvider(props?: {
|
|
16
6
|
/**
|
|
17
7
|
* Element name
|
|
18
8
|
* @defaultValue style-provider
|
|
19
9
|
*/
|
|
20
10
|
name?: string;
|
|
21
11
|
/**
|
|
22
|
-
*
|
|
12
|
+
* Initial styles
|
|
13
|
+
*/
|
|
14
|
+
styles?: TProviderInitContent;
|
|
15
|
+
/**
|
|
16
|
+
* Provider config
|
|
23
17
|
* @description
|
|
24
18
|
* Will be used for initial stylesheets generation
|
|
25
19
|
*/
|
|
26
|
-
|
|
27
|
-
}):
|
|
20
|
+
settings?: TProviderSettings;
|
|
21
|
+
}): boolean;
|