shweet 0.0.36 → 0.0.38
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/LICENSE +21 -0
- package/dist/index.d.ts +65 -5
- package/dist/index.js +8 -7
- package/package.json +18 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 MARKjotep
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { Mapped } from '@ohmyqt/u';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Value-level number guard matching the migrated source's original behavior.
|
|
5
3
|
* Unlike the utility package's strict `isNumber`, `NaN` is still a number here, which keeps
|
|
@@ -24,6 +22,62 @@ declare namespace guards {
|
|
|
24
22
|
};
|
|
25
23
|
}
|
|
26
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Enhanced Map data structure offering deep merging, transformation,
|
|
27
|
+
* filtering, and safe path access.
|
|
28
|
+
*
|
|
29
|
+
* @template K - Key type (default: string)
|
|
30
|
+
* @template V - Value type (default: any)
|
|
31
|
+
*/
|
|
32
|
+
declare class Mapped<K = string, V = any> extends Map<K, V> {
|
|
33
|
+
constructor(entries?: readonly (readonly [K, V])[] | Record<string, V> | null);
|
|
34
|
+
/**
|
|
35
|
+
* Merges a key-value Record object into this map.
|
|
36
|
+
*/
|
|
37
|
+
mergeObject(obj?: Record<string, any> | null): this;
|
|
38
|
+
/**
|
|
39
|
+
* Merges another Map or Mapper instance into this map.
|
|
40
|
+
*/
|
|
41
|
+
mergeMap(sourceMap: Map<K, V>): this;
|
|
42
|
+
/**
|
|
43
|
+
* Merges properties of an object directly into a target key's stored object.
|
|
44
|
+
*/
|
|
45
|
+
assign<T extends Record<string, any>>(key: K, obj: T): this;
|
|
46
|
+
/**
|
|
47
|
+
* Returns true if the specified key is missing from the map.
|
|
48
|
+
*/
|
|
49
|
+
lacks(key: K): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves a key's value if present; otherwise sets and returns the default fallback value.
|
|
52
|
+
*/
|
|
53
|
+
init(key: K, defaultValue: V): V;
|
|
54
|
+
/**
|
|
55
|
+
* Maps entries into a new Mapper instance using a transformation function.
|
|
56
|
+
* @example const doubled = map.mapValues((val) => val * 2);
|
|
57
|
+
*/
|
|
58
|
+
mapValues<R>(fn: (value: V, key: K, map: this) => R): Mapped<K, R>;
|
|
59
|
+
/**
|
|
60
|
+
* Filters entries into a new Mapper instance based on a predicate function.
|
|
61
|
+
* @example const active = map.filter((val) => val.isActive);
|
|
62
|
+
*/
|
|
63
|
+
filter(predicate: (value: V, key: K, map: this) => boolean): Mapped<K, V>;
|
|
64
|
+
/**
|
|
65
|
+
* Converts the Mapper instance into a plain JavaScript Object.
|
|
66
|
+
* @example const obj = map.toObject();
|
|
67
|
+
*/
|
|
68
|
+
toObject(): Record<string, V>;
|
|
69
|
+
/**
|
|
70
|
+
* Converts the Mapper to a JSON string representation.
|
|
71
|
+
*/
|
|
72
|
+
toJson(): string;
|
|
73
|
+
/**
|
|
74
|
+
* Static helper: Constructs a Mapper from an array of objects grouped by a target property.
|
|
75
|
+
* Named `fromGroup` to avoid static interface collision with native `Map.groupBy`.
|
|
76
|
+
* @example const grouped = Mapper.fromGroup(users, "role");
|
|
77
|
+
*/
|
|
78
|
+
static fromGroup<T extends Record<string, any>, K extends keyof T>(array: T[], key: K): Mapped<T[K], T[]>;
|
|
79
|
+
}
|
|
80
|
+
|
|
27
81
|
type ObjectChanges = {
|
|
28
82
|
added: Record<string, unknown>;
|
|
29
83
|
removed: Record<string, unknown>;
|
|
@@ -677,10 +731,9 @@ declare class Proc {
|
|
|
677
731
|
private addPrefixToAnimation;
|
|
678
732
|
private saveAnim;
|
|
679
733
|
private processDeclaration;
|
|
680
|
-
set(name: string, css: CSSinR, data:
|
|
734
|
+
set(name: string, css: CSSinR, data: Mapped<string, Mapped<string, media | support[]>>): void;
|
|
681
735
|
}
|
|
682
736
|
|
|
683
|
-
type CMapper = Mapped<string, Mapped<string, media | support[]>>;
|
|
684
737
|
declare class Base<T = Record<string, any>> {
|
|
685
738
|
PRE: string;
|
|
686
739
|
EXPORT?: boolean | undefined;
|
|
@@ -692,7 +745,7 @@ declare class Base<T = Record<string, any>> {
|
|
|
692
745
|
PREFIX: string;
|
|
693
746
|
ARR: Mapped<string, Set<string>>;
|
|
694
747
|
CID: Mapped<string, string>;
|
|
695
|
-
DATA:
|
|
748
|
+
DATA: Mapped<string, Mapped<string, media | support[]>>;
|
|
696
749
|
ANIM: Mapped<string, Set<string>>;
|
|
697
750
|
IMPORTED: Base[];
|
|
698
751
|
constructor(PRE?: string, prefix?: string, EXPORT?: boolean | undefined, UNIT?: string | undefined,
|
|
@@ -766,6 +819,13 @@ interface CompileDiagnostic {
|
|
|
766
819
|
}
|
|
767
820
|
type DiagnosticHandler = (diagnostic: CompileDiagnostic) => void;
|
|
768
821
|
interface SaveOptions {
|
|
822
|
+
/**
|
|
823
|
+
* Directory for the compiled CSS. Pass `"parent"` to write beside the folder
|
|
824
|
+
* that contains the source module (`dirname(dirname(__filename))`); the
|
|
825
|
+
* export map then defaults to the source folder unless `mapDir` is set.
|
|
826
|
+
* Every other value is used literally, including a real folder named
|
|
827
|
+
* `"parent"`. The parent form throws at the filesystem root.
|
|
828
|
+
*/
|
|
769
829
|
dir?: string | string[];
|
|
770
830
|
mapDir?: string | string[];
|
|
771
831
|
mapName?: string;
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
3
|
-
`)??[])[e]||"").match(/at\s+([^(]+)\s*\(/);return(t?t[1].split(".").pop()?.trim():"?")??"?"}class He{name;constructor(e){this.name=e}log=(...e)=>{let t=me(3);console.log(`[${this.name}.${t}]`,...e)};set i(e){let t=me(3);console.log(`[${this.name}.${t}]`,...I(e))}}class ge{static logger=(e)=>new He(T(e)?e:e.constructor.name);static set f(e){let t=me();console.log(`[${t}]`,...I(e))}static set i(e){console.info(...I(e))}static set e(e){console.error(...I(e))}static set w(e){console.warn(...I(e))}static set d(e){let t=new Date().toLocaleTimeString();console.log(...I(e),`@ ${t}`)}static get d(){let e=new Date().toLocaleTimeString();console.log(`@ ${e}`);return}}var Ke=(e)=>JSON.stringify(e),Ue=(e)=>{if(!e||typeof e!=="string")return null;try{return JSON.parse(e)}catch{return null}};class w extends Map{constructor(e){if(e&&!Array.isArray(e)&&typeof e==="object"){super();this.mergeObject(e)}else super(e)}mergeObject(e){if(e&&E(e))Object.entries(e).forEach(([t,r])=>{this.set(t,r)});return this}mergeMap(e){if(!(e instanceof Map))return this;return e.forEach((t,r)=>{let n=this.get(r);if(t instanceof w)if(n instanceof w)n.mergeMap(t);else this.set(r,t);else if(C(t)){let i=C(n)?n:[];this.set(r,[...i,...t])}else if(E(t))this.assign(r,t);else this.set(r,t)}),this}assign(e,t){let r=this.get(e),n=E(r)?r:{};return this.set(e,{...n,...t}),this}lacks(e){return!this.has(e)}init(e,t){if(this.has(e))return this.get(e);return this.set(e,t),t}mapValues(e){let t=new w;return this.forEach((r,n)=>{t.set(n,e(r,n,this))}),t}filter(e){let t=new w;return this.forEach((r,n)=>{if(e(r,n,this))t.set(n,r)}),t}toObject(){let e={};return this.forEach((t,r)=>{let n=String(r);if(t instanceof w)e[n]=t.toObject();else e[n]=t}),e}toJson(){return JSON.stringify(this.toObject())}static fromGroup(e,t){let r=new w;if(!Array.isArray(e))return r;return e.forEach((n)=>{let i=n[t];r.init(i,[]).push(n)}),r}}var J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Q=(e)=>{if(!e)return"";return e.replace(/-([a-z])/g,(t,r)=>r.toUpperCase())},L=(e)=>{if(!e)return"";let t=e;if(t.startsWith("webkit"))t="-"+t;return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()};var ze=()=>{let e=Math.floor(Math.random()*J.length);return J[e]},We=(e)=>{let t=J+"0123456789",r="";for(let n=0;n<e;n++){let i=n===0?J:t;r+=i.charAt(Math.floor(Math.random()*i.length))}return r};var ee=(e,t,r)=>{if(!e.has(t))e.set(t,{});Object.assign(e.get(t),r)},Se=(e,t)=>{let r={added:{},removed:{},modified:{}},n=e,i=t;for(let s of Object.keys(i)){let a=n[s],o=i[s];if(!Object.hasOwn(n,s))r.added[s]=o;else if(C(a)&&C(o)){if(JSON.stringify(a)!==JSON.stringify(o))r.modified[s]={old:a,new:o}}else if(E(a)&&E(o)&&!D(a)&&!D(o)){let p=Se(a,o);if(ye(p))r.modified[s]={old:a,new:o}}else if(a!==o)r.modified[s]={old:a,new:o}}for(let s of Object.keys(n))if(!Object.hasOwn(i,s))r.removed[s]=n[s];return r},ye=(e)=>Object.values(e).some((t)=>Object.keys(t).length>0);import{existsSync as qe,mkdirSync as Yt,writeFileSync as Gt}from"fs";var be=(e)=>{if(qe(e))return!0;return Yt(e,{recursive:!0}),!0},Ce=(e,t="")=>{if(qe(e))return!0;return Gt(e,t,{flag:"wx"}),!0};function Ye(e,t){let r=t.name;t.addInitializer(function(){Object.defineProperty(this,r,{configurable:!0,enumerable:!1,get(){let n=e.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:n}),n}})})}class Ge{static arr(e){return e?C(e)?e:[e]:[]}static num(e,t=0){let r=parseFloat(String(e));return Number.isNaN(r)?t:r}static str(e){return String(e)}static arr2obj(e,t=!1){return e.reduce((r,n,i)=>{if(t)r[String(n)]=i;else r[i]=n;return r},{})}}class Xe{val;constructor(e){this.val=e}get px(){return`${this.val}px`}get rem(){return`${this.val}rem`}get pr(){return`${this.val}%`}}class we{static rand(e=6,t){if(t)return Math.floor(Math.random()*(t-e+1)+e);return Math.floor(Math.random()*e)}static fill(e,t=null){return Array(e).fill(t)}static new({dom:e,id:t,inner:r}){let n=document.createElement(e);if(t)n.id=t;if(r)n.innerHTML=r;return n}static randFrom(e){if(C(e))return e[this.rand(0,e.length-1)];let t=Object.keys(e);return t[this.rand(0,t.length-1)]}static randArray(e=[],t=1,r=!1){let n=[],i=r?new Set:null;while((r?i.size:n.length)<t){let s=e[we.rand(0,e.length-1)];if(r)i.add(s);else n.push(s)}return r?[...i]:n}static randomAZ=ze;static makeID=We;static class(e,...t){let r=t.filter(Boolean);if(e?.class)r.push(...C(e.class)?e.class:[e.class]);if(r.length)e.class=r}static get O(){return{vals:Object.values,keys:Object.keys,items:Object.entries,has:(e,t)=>Object.hasOwn(e,t),ass:Object.assign,len:(e={})=>Object.keys(e).length}}static get is(){return de}static get return(){return Ge}static isHREF(e,t){return e===t?!0:e.startsWith(t)&&t!=="/"?!0:!1}static sleep=(e=1000)=>new Promise((t)=>setTimeout(t,e));static get screen(){let{innerWidth:e}=window,t={xs:e<=480,sm:e>=480,smd:e>=624,md:e>=768,lg:e>=1024,xl:e>=1280,xxl:e>=1536},r=Object.entries(t).reverse();for(let[n,i]of r)if(i)return n;return}bytes(e){if(e===0)return"0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,n)).toFixed(2))} ${r[n]}`}static format(e){return new Xe(e)}static compareObjects=Se;static isObjectUdpated=ye}function l(e){return function(...t){return{[e]:t}}}class Ze{static attr(e){let[t,r]=Object.entries(e)[0];return l(`[${t}="${r}"]`)}static after(e=""){return l("::after"+e)}static before(e=""){return l("::before"+e)}static backdrop(e=""){return l("::backdrop"+e)}static cue(e=""){return l("::cue"+e)}static cueRegion(e=""){return l("::cue-region"+e)}static firstLetter(e=""){return l("::first-letter"+e)}static firstLine(e=""){return l("::first-line"+e)}static marker(e=""){return l("::marker"+e)}static part(e=""){return l("::part"+e)}static placeholder(e=""){return l("::placeholder"+e)}static selection(e=""){return l("::selection"+e)}static slotted(e=""){return l("::slotted"+e)}static spellingError(e=""){return l("::spelling-error"+e)}static targetText(e=""){return l("::target-text"+e)}static viewTransition(e=""){return l("::view-transition"+e)}static viewTransitionGroup(e=""){return l("::view-transition-group"+e)}static viewTransitionImagePair(e=""){return l("::view-transition-image-pair"+e)}static viewTransitionNew(e=""){return l("::view-transition-new"+e)}static viewTransitionOld(e=""){return l("::view-transition-old"+e)}static scrollbar(e=""){return l("::-webkit-scrollbar"+e)}static scrollbarThumb(e=""){return l("::-webkit-scrollbar-thumb"+e)}static scrollbarTrack(e=""){return l("::-webkit-scrollbar-track"+e)}static scrollbarCorner(e=""){return l("::-webkit-scrollbar-corner"+e)}static active(e=""){return l(":active"+e)}static anyLink(e=""){return l(":any-link"+e)}static autofill(e=""){return l(":autofill"+e)}static blank(e=""){return l(":blank"+e)}static checked(e=""){return l(":checked"+e)}static current(e=""){return l(":current"+e)}static default(e=""){return l(":default"+e)}static defined(e=""){return l(":defined"+e)}static disabled(e=""){return l(":disabled"+e)}static empty(e=""){return l(":empty"+e)}static enabled(e=""){return l(":enabled"+e)}static first(e=""){return l(":first"+e)}static firstChild(e=""){return l(":first-child"+e)}static firstOfType(e=""){return l(":first-of-type"+e)}static fullscreen(e=""){return l(":fullscreen"+e)}static future(e=""){return l(":future"+e)}static focus(e=""){return l(":focus"+e)}static focusVisible(e=""){return l(":focus-visible"+e)}static focusWithin(e=""){return l(":focus-within"+e)}static host(e=""){return l(":host"+e)}static hover(e=""){return l(":hover"+e)}static indeterminate(e=""){return l(":indeterminate"+e)}static inRange(e=""){return l(":in-range"+e)}static invalid(e=""){return l(":invalid"+e)}static lastChild(e=""){return l(":last-child"+e)}static lastOfType(e=""){return l(":last-of-type"+e)}static left(e=""){return l(":left"+e)}static link(e=""){return l(":link"+e)}static localLink(e=""){return l(":local-link"+e)}static modal(e=""){return l(":modal"+e)}static onlyChild(e=""){return l(":only-child"+e)}static onlyOfType(e=""){return l(":only-of-type"+e)}static optional(e=""){return l(":optional"+e)}static outOfRange(e=""){return l(":out-of-range"+e)}static past(e=""){return l(":past"+e)}static pictureInPicture(e=""){return l(":picture-in-picture"+e)}static placeholderShown(e=""){return l(":placeholder-shown"+e)}static paused(e=""){return l(":paused"+e)}static playing(e=""){return l(":playing"+e)}static readOnly(e=""){return l(":read-only"+e)}static readWrite(e=""){return l(":read-write"+e)}static required(e=""){return l(":required"+e)}static right(e=""){return l(":right"+e)}static root(e=""){return l(":root"+e)}static scope(e=""){return l(":scope"+e)}static target(e=""){return l(":target"+e)}static targetWithin(e=""){return l(":target-within"+e)}static userInvalid(e=""){return l(":user-invalid"+e)}static valid(e=""){return l(":valid"+e)}static visited(e=""){return l(":visited"+e)}static dir(e){return l(`:dir(${e})`)}static has(e){return l(`:has(${e})`)}static host_(e){return l(`:host(${e})`)}static hostContext(e){return l(`:host-context(${e})`)}static is(e){return l(`:is(${e})`)}static lang(e){return l(`:lang(${e})`)}static not(e){return l(`:not(${e})`)}static nthChild(e){return l(`:nth-child(${e})`)}static nthCol(e){return l(`:nth-col(${e})`)}static nthLastChild(e){return l(`:nth-last-child(${e})`)}static nthLastCol(e){return l(`:nth-last-col(${e})`)}static nthLastOfType(e){return l(`:nth-last-of-type(${e})`)}static nthOfType(e){return l(`:nth-of-type(${e})`)}static state(e){return l(`:state(${e})`)}static where(e){return l(`:where(${e})`)}static webkit(e){return l(`::-webkit-${e}`)}static and(e){return l(", "+e)}static child(e){return l(" > "+e)}static desc(e){return l(" "+e)}static next(e){return l(" + "+e)}static general(e){return l(" ~ "+e)}static withClass(e){if(!e.startsWith("."))throw Error("should start with . or # - class / id");return l(e)}}var Ve={xs:"480px",sm:"480px",smd:"624px",md:"768px",lg:"1024px",xl:"1280px",xxl:"1536px"};class x{static default="xs";static prop=Object.entries(Ve).reduce((e,[t,r],n)=>(e[t]=`(${n==0?"max-width":"min-width"}: ${r})`,e),{});static extra={no_hover:"(pointer: coarse)",mobile:"(pointer: coarse)",print:"print",screen:"screen",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)"};constructor(e,t={}){let r=x.default,n={};if(e!==void 0)H(n,r,e,r);Object.entries(t).forEach(([i,s])=>{H(n,i,s,r)}),Object.assign(this,n)}static get breakpoints(){return Ue(Ke(Ve))??Ve}}var H=(e,t,r,n)=>{if(r!==void 0)if(r instanceof x)Object.entries(r).forEach(([i,s])=>{if(n!==t)if(t!==i)if(n===i)H(e,t,s,n);else H(e,`${t}-${i}`,s,n);else H(e,i,s,n);else H(e,i,s,n)});else e[t]=r};function j(e,t){if(t)return new x(e,t);if(typeof e==="object")return new x(void 0,e);return new x(e,{})}function Xt(e){if(this._prefix)return j({[this._prefix]:e});else return j({xs:e})}function v(e){return new this.constructor({prefix:e,values:this._values,data:this.data})}class te{_prefix;data;_values;constructor({prefix:e,data:t,values:r}={}){this._prefix=e,this._values=r??{},Object.entries(this._values).forEach(([n,i])=>{if(!this._values[n])this._values[n]=j({});Object.assign(this._values[n],i)}),this.data=t??{}}get XS(){return v.call(this,"xs")}get SM(){return v.call(this,"sm")}get SMD(){return v.call(this,"smd")}get MD(){return v.call(this,"md")}get LG(){return v.call(this,"lg")}get XL(){return v.call(this,"xl")}get XXL(){return v.call(this,"xxl")}get NO_HOVER(){return v.call(this,"no_hover")}get MOBILE(){return v.call(this,"mobile")}get PRINT(){return v.call(this,"print")}get SCREEN(){return v.call(this,"screen")}get DARK(){return v.call(this,"dark")}set _value(e){Object.entries(e).forEach(([t,r])=>{if(!this._values[t])this._values[t]=j({});Object.assign(this._values[t],Xt.call(this,r))})}get _value(){return this._values}}class R{k="";fallback;var="";value;constructor(e={},t){if(Object.keys(e).length){let[r,n]=Object.entries(e)[0];this.k=r,this.var="--"+L(r),this.value=n instanceof x?n:j(n,{}),this.fallback=t}else this.value=j({})}__(e){if(e)this.fallback=e;let t=this.fallback;if(t)return`var(${this.var}, ${u(t)})`;else return`var(${this.var})`}new(e,t){return new R({[this.k]:e instanceof x?e:u(e)},t)}}var Zt=(e,t)=>new R(e,t),Jt=(e)=>{let t={};for(let r in e)t[r]=new R({[r]:e[r]});return t};var u=(e,t={unit:"rem"})=>{let{rem:r,second:n,quote:i,degree:s,percent:a,delimeter:o,unit:p,delimeter_arr:g}=t;if(he(e)||D(e)||!i&&e==="")return"";let S=C(e)?e:[e];if(!S.length)return"";return S.filter((c)=>N(c)).map((c)=>{if(C(c))return o=g||", ",u(c,{...t,delimeter:" "});if(c instanceof R)return c.__();if(i)c=String(c);if(ce(c))if(r)return`${c}${p?p:"rem"}`;else if(s)return`${c}deg`;else if(a)return`${c}%`;else if(n)return`${c}s`;else return String(c);if(T(c))if(c.includes("("))return c;else if(i)return`'${c}'`;else return c;return""}).filter((c)=>N(c)&&c!=="").join(o||" ")};class Je{static minmax(e,t){return`minmax(${u([e,t],{rem:!0,delimeter:", "})})`}static fitContent(e){return`fit-content(${u([e],{rem:!0})})`}static repeat(e,...t){return`repeat(${u([e,u([t],{rem:!0})],{delimeter:", "})})`}}class Qe extends Je{static attr(e,t,r){return`attr(${u([e,t,r])})`}static blur(e){return`blur(${u([e],{rem:!0})})`}static brightness(e){return`brightness(${u([e])})`}static calc(...e){return`calc(${u(e,{rem:!0})})`}static circle(e,t){return`circle(${u([e,t],{rem:!0})})`}static clamp(e,t,r){return`clamp(${u([e,t,r],{rem:!0,delimeter:", "})})`}static colorMix(e,t,r){return`color-mix(${u([e,u(C(t)?t:[t]),u(C(r)?r:[r])],{delimeter:", "})})`}static conicGradient(...e){return`conic-gradient(${u(e,{delimeter:", "})})`}static contrast(e){return`contrast(${u([e])})`}static cubicBezier(e,t,r,n){return`cubic-bezier(${u([e,t,r,n],{delimeter:", "})})`}static dropShadow(...e){return`drop-shadow(${u(e,{rem:!0})})`}static grayscale(e){return`grayscale(${u([e])})`}static hsl(e,t,r){return`hsl(${u([e,t,r])})`}static hsla(e,t,r,n){return`hsl(${u([e,t,r,n?["/",n]:n])})`}static hueRotate(e){return`hue-rotate(${u([e],{degree:!0})})`}static inset(...e){return`inset(${u(e,{rem:!0})})`}static invert(e){return`invert(${u([e])})`}static linearGradient(...e){return`linear-gradient(${u(e,{delimeter:", "})})`}static matrix(e,t,r,n,i,s){return`matrix(${u([e,t,r,n,i,s],{delimeter:", "})})`}static matrix3d(e,t,r,n){return`matrix3d(${u([e,t,r,n],{delimeter:", "})})`}static max(...e){return`max(${u(e,{rem:!0,delimeter:", "})})`}static min(...e){return`min(${u(e,{rem:!0,delimeter:", "})})`}static opacity(e){return`opacity(${u([e])})`}static path(e){return`path(${u([e],{quote:!0})})`}static clipPath(e,t){return`path(${u([e,u([t],{quote:!0})],{delimeter:", "})})`}static perspective(e){return`perspective(${u([e])})`}static polygon(...e){return`polygon(${u(e,{percent:!0,delimeter:", "})})`}static ray(...e){return`ray(${u(e,{degree:!0})})`}static radialGradient(...e){return`radial-gradient(${u(e,{delimeter_arr:", ",percent:!0,delimeter:", "})})`}static repeatingConicGradient(...e){return`repeating-conic-gradient(${u(e,{degree:!0,delimeter:", "})})`}static repeatingLinearGradient(...e){return`repeating-linear-gradient(${u(e,{degree:!0,delimeter:", "})})`}static repeatingRadialGradient(...e){return`repeating-radial-gradient(${u(e,{degree:!0,delimeter:", "})})`}static rgb(e,t,r){return`rgb(${u([e,t,r])})`}static rgba(e,t,r,n){return`rgba(${u([e,t,r,n?["/",n]:void 0],{delimeter_arr:" "})})`}static rotate(e){return`rotate(${u([e],{degree:!0})})`}static rotate3d(e,t,r,n){return`rotate3d(${u([u([e,t,r],{delimeter:", "}),n],{degree:!0,delimeter:", "})})`}static rotateX(e){return`rotateX(${u([e],{degree:!0})})`}static rotateY(e){return`rotateY(${u([e],{degree:!0})})`}static rotateZ(e){return`rotateZ(${u([e],{degree:!0})})`}static saturate(...e){return`saturate(${u(e)})`}static scale(e,t){return`scale(${u([e,t],{delimeter:", "})})`}static scale3d(e,t,r){return`scale3d(${u([e,t,r],{delimeter:", "})})`}static scaleX(e){return`scaleX(${u([e])})`}static scaleY(e){return`scaleY(${u([e])})`}static scaleZ(e){return`scaleZ(${u([e])})`}static sepia(e){return`sepia(${u([e])})`}static skew(...e){return`skew(${u(e,{degree:!0,delimeter:", "})})`}static skewX(e){return`skewX(${u([e],{degree:!0})})`}static skewY(e){return`skewY(${u([e],{degree:!0})})`}static steps(e,t){return`steps(${u([e,t],{delimeter:", "})})`}static translate(...e){return`translate(${u(e,{rem:!0,delimeter:", "})})`}static translate3d(...e){return`translate3d(${u(e,{rem:!0,delimeter:", "})})`}static translateX(e){return`translateX(${u([e],{rem:!0})})`}static translateY(e){return`translateY(${u([e],{rem:!0})})`}static translateZ(...e){return`translateZ(${u(e,{rem:!0,delimeter:", "})})`}static url(e){return`url(${u([e],{quote:!0})})`}static format(e){return`format(${u([e],{quote:!0})})`}static var(e,t=""){e="--"+L(e);let r=t?", "+u([t],{rem:!0,delimeter:", "}):"";return`var(${u([e],{rem:!0})}${r})`}}var Qt={important:" !important",visible:"visible",hidden:"hidden",auto:"auto",none:"none",clip:"clip",scroll:"scroll",initial:"initial",inherit:"inherit",flex:"flex",center:"center",flex_start:"flex-start",flex_end:"flex-end",space_evenly:"space-evenly",stretch:"stretch",wrap:"wrap",column:"column",column_reverse:"column-reverse",row:"row",row_reverse:"row-reverse",space_between:"space-between",space_around:"space-around",pr100:"100%",pr50:"50%",i100vh:"100vh",i100vw:"100vw",block:"block",sticky:"sticky",fixed:"fixed",absolute:"absolute",relative:"relative",pointer:"pointer",grabbing:"grabbing",checkbox:"checkbox",solid:"solid",inset:"inset",bold:"bold",currentColor:"currentColor",forwards:"forwards",text:"text",norepeat:"no-repeat",nowrap:"nowrap",difference:"difference",preserve3d:"preserve-3d"};class re{value;__;constructor(e){if(this.value=new w,T(e))this.value.set(e,[]);else Object.entries(e).forEach(([t,r])=>{this.value.set(`${t}:${r}`,[])});this.__=(...t)=>(this.value.forEach((r)=>{r.push(...t)}),this)}}function er(e){return new re(e).__}var k=(e)=>{if(Le(e))return k(e());if(e instanceof x)return e;if(e instanceof R)return j(e.__(),{});return j(e,{})},ie=(e)=>e==='"'||e==="'",Me="([{",Re=")]}",tt=(e,t)=>{let r=[],n=0,i=null,s=0;for(let a=0;a<e.length;a++){let o=e[a];if(i){if(o==="\\")a++;else if(o===i)i=null;continue}if(o==="\\")a++;else if(ie(o))i=o;else if(Me.includes(o))s++;else if(Re.includes(o)){if(s>0)s--}else if(o===t&&s===0)r.push(e.slice(n,a)),n=a+1}return r.push(e.slice(n)),r},tr=(e,t)=>{let r=null,n=0;for(let i=0;i<e.length;i++){let s=e[i];if(r){if(s==="\\")i++;else if(s===r)r=null;continue}if(s==="\\")i++;else if(ie(s))r=s;else if(Me.includes(s))n++;else if(Re.includes(s)){if(n>0)n--}else if(s===t&&n===0)return i}return-1},ve=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,rr=(e)=>{if(!ve.test(e))return;let t=Number(e);return Number.isFinite(t)?t:void 0};function rt(e){let t={};return tt(e,";").forEach((r)=>{let n=r.trim();if(n==="")return;let i=tr(n,":");if(i===-1)return;let s=n.slice(0,i).trim();if(s==="")return;let a=n.slice(i+1).trim(),o=s.startsWith("--"),p=o?s:Q(s);if(o){t[p]=a;return}let g=rr(a);t[p]=g===void 0?a:g}),t}var nt=new Set(["initial","inherit","unset","revert","revert-layer"]),nr=new Set(["linear","ease","ease-in","ease-out","ease-in-out","step-start","step-end"]),ir=new Set(["cubic-bezier","steps","linear"]),sr=new Set(["normal","reverse","alternate","alternate-reverse"]),ar=new Set(["forwards","backwards","both"]),or=new Set(["running","paused"]),it=/^-{0,2}[A-Za-z_][A-Za-z0-9_-]*$/,st=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:s|ms)$/i,Ae=(e)=>e.length>=2&&ie(e[0])&&e[e.length-1]===e[0],at=(e)=>{let t=[],r=-1,n=null,i=0;for(let s=0;s<e.length;s++){let a=e[s];if(n){if(a==="\\")s++;else if(a===n)n=null;continue}if(a==="\\"){if(r===-1)r=s;s++;continue}if(ie(a)){if(r===-1)r=s;n=a;continue}if(Me.includes(a)){if(r===-1)r=s;i++;continue}if(Re.includes(a)){if(r===-1)r=s;if(i>0)i--;continue}if(i===0&&/\s/.test(a)){if(r!==-1)t.push(e.slice(r,s)),r=-1;continue}if(r===-1)r=s}if(r!==-1)t.push(e.slice(r));return t},lr=(e)=>{if(Ae(e))return"name";let t=e.match(/^([A-Za-z][A-Za-z0-9-]*)\(/);if(t){if(e.endsWith(")")&&ir.has(t[1].toLowerCase()))return"skip";return"abort"}if(st.test(e)||ve.test(e))return"skip";if(e.toLowerCase()==="!important")return"skip";if(!it.test(e))return"abort";let r=e.toLowerCase();if(nt.has(r)||nr.has(r)||sr.has(r)||ar.has(r)||or.has(r)||r==="infinite"||r==="none")return"skip";return"name"},xe=(e,t)=>{if(Ae(e)){let r=e.slice(1,-1);if(r==="")return;let n=e[0];return{text:`${n}${t}${r}${n}`,name:r}}return{text:`${t}${e}`,name:e}},ur=(e,t)=>{let r=at(e),n=-1,i="";for(let o=0;o<r.length;o++){let p=r[o],g=p.toLowerCase(),S=lr(p);if(S==="abort")return{value:e,names:[]};if(g==="!important"&&o!==r.length-1)return{value:e,names:[]};if(S==="skip")continue;if(n!==-1)return{value:e,names:[]};n=o,i=p}if(n===-1)return{value:e,names:[]};let s=xe(i,t);if(!s)return{value:e,names:[]};let a=[...r];return a[n]=s.text,{value:a.join(" "),names:[s.name]}},cr=(e,t)=>{let r=at(e.trim()),n=r.length>1&&r[r.length-1].toLowerCase()==="!important"?r.pop():void 0;if(r.length!==1)return{value:e,names:[]};let i=r[0];if(Ae(i)){let a=xe(i,t);if(!a)return{value:e,names:[]};return{value:[a.text,n].filter(Boolean).join(" "),names:[a.name]}}if(i.includes("("))return{value:e,names:[]};if(st.test(i)||ve.test(i))return{value:e,names:[]};if(!it.test(i))return{value:e,names:[]};let s=i.toLowerCase();if(nt.has(s)||s==="none")return{value:e,names:[]};return{value:[xe(i,t).text,n].filter(Boolean).join(" "),names:[i]}},et=(e,t,r)=>{let n=tt(e,",");if(n.some((o)=>o.trim()===""))return{value:e,names:[]};let i=[],s=!1,a=n.map((o)=>{let p=r(o,t);if(i.push(...p.names),p.value!==o)s=!0;return p.value});return{value:s?a.map((o)=>o.trim()).join(", "):e,names:i}},ot=(e,t,r="animation")=>{if(r==="animationName")return et(e,t,cr);return et(e,t,ur)},lt=(e)=>{e.value.forEach((t,r)=>{e.value.set(r,t.map((n)=>{let i={};return Object.entries(n).forEach(([s,a])=>{if(N(a))i[s]=k(a)}),i}))})},ne=(e,t=[])=>{if(C(e))return ne(e[0]);if(e instanceof R)return ne(Object.values(e.value));return[String(e)]};function fr(e){let t=[],r=0,n=0,i=null;for(let s=0;s<e.length;s++){let a=e[s];if(a==="\\"){s++;continue}if(i){if(a===i)i=null;continue}if(a==='"'||a==="'")i=a;else if(a==="("||a==="[")n++;else if(a===")"||a==="]"){if(n>0)n--}else if(a===","&&n===0)t.push(e.slice(r,s)),r=s+1}return t.push(e.slice(r)),t}class Ne{base;constructor(e){this.base=e}prefixAnimationValues(e,t,r){if(!["animation","animationName"].includes(t))return r;let i=Object.assign(new x,r);return Object.entries(i).forEach(([s,a])=>{i[s]=this.addPrefixToAnimation(e,t,a)}),i}addPrefixToAnimation(e,t,r){if(r instanceof R)this.saveAnim(e,r);else if(C(r))return[this.addPrefixToAnimation(e,t,r[0]),...r.slice(1)];else if(T(r)){let n=ot(r,this.base.PREFIX,t);return n.names.forEach((i)=>{let s=`${this.base.PREFIX}${i}`;this.base.ANIM.init(s,new Set).add(e)}),n.value}return r}saveAnim(e,t){ne(t).forEach((r)=>{this.base.ANIM.init(`${this.base.PREFIX}${r}`,new Set).add(e)})}processDeclaration(e,t,r,n,i){if(r instanceof R)this.saveAnim(e,r),ee(n,t,this.prefixAnimationValues(e,r.var,k(r)));else if(t.startsWith(":")||t.startsWith(",")||t.startsWith("[")){if(t.startsWith("::before")||t.startsWith("::after"));this.set(e+t,r,i)}else if(t.startsWith(" ")){let s=t.match(/^\s*(?:[>+~]\s*)?/)?.[0]??"",a=fr(t.slice(s.length)).map((o)=>`${e}${s}${o.trim()}`).join(", ");this.set(a,r,i)}else if(pe(t))this.set(e+t,r,i);else n.set(t,this.prefixAnimationValues(e,t,k(r)))}set(e,t,r){if(!E(t)&&!D(t)&&!T(t))return;let n=new w;if(t instanceof R)this.saveAnim(e,t),ee(n,t.var,this.prefixAnimationValues(e,t.var,k(t.value)));else if(t instanceof te)Object.entries(t._value).forEach(([s,a])=>{if(N(a))n.set(s,this.prefixAnimationValues(e,s,k(a)))});else if(t instanceof re)lt(t),n.init("supports",[]).push(t);else if(C(t))t.forEach((s)=>{this.set(e,s,r)});else if(T(t)){let s=rt(t);this.set(e,s,r)}else Object.entries(t).forEach(([s,a])=>{if(a instanceof R){this.saveAnim(e,a),ee(n,a.var,this.prefixAnimationValues(e,a.var,k(a.value)));return}return this.processDeclaration(e,s,a,n,r)});let i=r.init(e,new w);n.forEach((s,a)=>{if(a==="supports"&&C(s))r.init(e,new w).init(a,[]).push(...s);else i.set(a,s)})}}class B{PRE;EXPORT;UNIT;SOURCE;PS;PREFIX;ARR=new w;CID=new w;DATA=new w;ANIM=new w;IMPORTED=[];constructor(e="",t="",r,n,i=""){this.PRE=e;this.EXPORT=r;this.UNIT=n;this.SOURCE=i;this.PREFIX=t?t+"_":t,this.PS=new Ne(this)}get(e,t,r){let n=e.PRE+t;if(e.DATA.has(n))return n;else if(t in e)return e[t];else return e.PRE+t}set(e,t,r){return!1}get css(){return new Proxy(this,this)}load(e){return this.IMPORTED.push(e),this}__(e){Object.entries(e).forEach(([t,r])=>{this.set(this,t,r)})}}var ut=new Set(["transitionDuration","transitionDelay","animationDelay","animationDuration"]),pr=new Set([...ut,"zIndex","opacity","aspectRatio","order","flexShrink","flexGrow","flex","fillOpacity","lineClamp","order","scale","webkitLineClamp","lineHeight","fontWeight","orphans","widows","tabSize","zoom","borderImageOutset","borderImageSlice","borderImageWidth","animationIterationCount","columnCount","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd"]),dr=new Set(["content"]),mr=new Set(["transitionProperty"]),K=(e,t,r="rem")=>{let n=Q(e),i=u(t,{rem:!pr.has(n),second:ut.has(n),quote:dr.has(e),delimeter:mr.has(e)?", ":" ",unit:r});return`${L(e)}: ${i};`};class O extends B{set(e,t,r){let n=e.PRE+t;return e.PS.set(n,r,e.DATA),!0}}class P extends B{webkit;constructor(e="",t=!0,r,n=""){super("",e,!1,r,n);this.webkit=t}set(e,t,r){let n=e.PREFIX+t,i=C(r)?r:[r],s=new w;if(i.forEach((a)=>{Object.entries(a).forEach(([o,p])=>{let g=fe(o)?`${o}%`:o;e.PS.set(g,p,s)})}),e.ANIM.init(n,new Set),e.DATA.set(`@keyframes ${n}`,s),this.webkit)e.DATA.set(`@-webkit-keyframes ${n}`,s);return!0}}class _ extends B{constructor(e="",t=""){super("@",e,void 0,void 0,t)}set(e,t,r){return e.ARR.init(e.PRE+t,new Set).add(r),e}}class F extends B{constructor(e="",t=""){super("@font-face",e,void 0,void 0,t);this.ARR.set(this.PRE,new Set)}set(e,t,r){let n=Object.entries({fontFamily:u([t],{quote:!0}),...r}).map(([i,s])=>K(i,s,this.UNIT));return e.ARR.get(e.PRE)?.add(n.join(`
|
|
4
|
-
`)),!0}}var
|
|
2
|
+
var Ht=Object.create;var oe=Object.defineProperty;var Kt=Object.getOwnPropertyDescriptor;var Ee=(e,t)=>(Object.defineProperty(e,"name",{value:t,enumerable:!1,configurable:!0}),e),Ut=(e)=>e;function zt(e,t){this[e]=Ut.bind(null,t)}var Wt=(e,t)=>{for(var r in t)oe(e,r,{get:t[r],enumerable:!0,configurable:!0,set:zt.bind(t,r)})};var _e=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Y=(e)=>{throw TypeError(e)},qt=(e,t,r)=>(t in e)?oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ue=(e,t,r)=>t.has(e)||Y("Cannot "+r),Yt=(e,t)=>Object(t)!==t?Y('Cannot use the "in" operator on this value'):e.has(t),De=(e,t,r)=>(ue(e,t,"read from private field"),r?r.call(e):t.get(e));var Be=(e,t,r,n)=>(ue(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Gt=(e,t,r)=>(ue(e,t,"access private method"),r),Pe=(e)=>[,,,Ht(e?.[_e("metadata")]??null)],Ie=["class","method","getter","setter","accessor","field","value","get","set"],q=(e)=>e!==void 0&&typeof e!=="function"?Y("Function expected"):e,Xt=(e,t,r,n,i)=>({kind:Ie[e],name:t,metadata:n,addInitializer:(s)=>r._?Y("Already initialized"):i.push(q(s||null))}),le=(e,t)=>qt(t,_e("metadata"),e[3]),Fe=(e,t,r,n)=>{for(var i=0,s=e[t>>1],a=s&&s.length;i<a;i++)t&1?s[i].call(r):n=s[i].call(r,n);return n},Le=(e,t,r,n,i,s)=>{var a,o,f,h,S,l=t&7,p=!!(t&8),m=!!(t&16),d=l>3?e.length+1:l?p?1:2:0,g=Ie[l+5],y=l>3&&(e[d-1]=[]),C=e[d]||(e[d]=[]),M=l&&(!m&&!p&&(i=i.prototype),l<5&&(l>3||!m)&&Kt(l<4?i:{get[r](){return De(this,s)},set[r](V){Be(this,s,V)}},r));l?m&&l<4&&Ee(s,(l>2?"set ":l>1?"get ":"")+r):Ee(i,r);for(var v=n.length-1;v>=0;v--){if(h=Xt(l,r,f={},e[3],C),l){if(h.static=p,h.private=m,S=h.access={has:m?(V)=>Yt(i,V):(V)=>(r in V)},l^3)S.get=m?(V)=>(l^1?De:Gt)(V,i,l^4?s:M.get):(V)=>V[r];if(l>2)S.set=m?(V,A)=>Be(V,i,A,l^4?s:M.set):(V,A)=>V[r]=A}if(o=(0,n[v])(l?l<4?m?s:M[g]:l>4?void 0:{get:M.get,set:M.set}:i,h),f._=1,l^4||o===void 0)q(o)&&(l>4?y.unshift(o):l?m?s=o:M[g]=o:i=o);else if(typeof o!=="object"||o===null)Y("Object expected");else q(a=o.get)&&(M.get=a),q(a=o.set)&&(M.set=a),q(a=o.init)&&y.unshift(a)}return l||le(e,i),M&&oe(i,r,M),m?l^4?s:M:i};var pe={};Wt(pe,{isClassOrId:()=>de,isNumber:()=>ce,isNumeric:()=>fe});var ce=(e)=>typeof e==="number",fe=(e)=>{let t=String(e);return!Number.isNaN(parseFloat(t))&&Number.isFinite(Number(e))},de=(e)=>e.startsWith(".")||e.startsWith("#");var O=(e)=>typeof e==="string";var He=(e)=>typeof e==="function";var b=(e)=>Array.isArray(e);var E=(e)=>Zt(e)&&typeof e==="object";var B=(e)=>e===null,ge=(e)=>e===void 0,j=(e)=>!ge(e);var Zt=(e)=>e!==null;var L=(e)=>b(e)?e:[e];function me(e=3){let t=((Error().stack?.split(`
|
|
3
|
+
`)??[])[e]||"").match(/at\s+([^(]+)\s*\(/);return(t?t[1].split(".").pop()?.trim():"?")??"?"}class Ke{name;constructor(e){this.name=e}log=(...e)=>{let t=me(3);console.log(`[${this.name}.${t}]`,...e)};set i(e){let t=me(3);console.log(`[${this.name}.${t}]`,...L(e))}}class he{static logger=(e)=>new Ke(O(e)?e:e.constructor.name);static set f(e){let t=me();console.log(`[${t}]`,...L(e))}static set i(e){console.info(...L(e))}static set e(e){console.error(...L(e))}static set w(e){console.warn(...L(e))}static set d(e){let t=new Date().toLocaleTimeString();console.log(...L(e),`@ ${t}`)}static get d(){let e=new Date().toLocaleTimeString();console.log(`@ ${e}`);return}}var Ue=(e)=>JSON.stringify(e),ze=(e)=>{if(!e||typeof e!=="string")return null;try{return JSON.parse(e)}catch{return null}};class w extends Map{constructor(e){if(e&&!Array.isArray(e)&&typeof e==="object"){super();this.mergeObject(e)}else super(e)}mergeObject(e){if(e&&E(e))Object.entries(e).forEach(([t,r])=>{this.set(t,r)});return this}mergeMap(e){if(!(e instanceof Map))return this;return e.forEach((t,r)=>{let n=this.get(r);if(t instanceof w)if(n instanceof w)n.mergeMap(t);else this.set(r,t);else if(b(t)){let i=b(n)?n:[];this.set(r,[...i,...t])}else if(E(t))this.assign(r,t);else this.set(r,t)}),this}assign(e,t){let r=this.get(e),n=E(r)?r:{};return this.set(e,{...n,...t}),this}lacks(e){return!this.has(e)}init(e,t){if(this.has(e))return this.get(e);return this.set(e,t),t}mapValues(e){let t=new w;return this.forEach((r,n)=>{t.set(n,e(r,n,this))}),t}filter(e){let t=new w;return this.forEach((r,n)=>{if(e(r,n,this))t.set(n,r)}),t}toObject(){let e={};return this.forEach((t,r)=>{let n=String(r);if(t instanceof w)e[n]=t.toObject();else e[n]=t}),e}toJson(){return JSON.stringify(this.toObject())}static fromGroup(e,t){let r=new w;if(!Array.isArray(e))return r;return e.forEach((n)=>{let i=n[t];r.init(i,[]).push(n)}),r}}var Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",H=(e)=>{if(!e)return"";return e.replace(/-([a-z])/g,(t,r)=>r.toUpperCase())},K=(e)=>{if(!e)return"";let t=e;if(t.startsWith("webkit"))t="-"+t;return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()};var We=()=>{let e=Math.floor(Math.random()*Q.length);return Q[e]},qe=(e)=>{let t=Q+"0123456789",r="";for(let n=0;n<e;n++){let i=n===0?Q:t;r+=i.charAt(Math.floor(Math.random()*i.length))}return r};var ee=(e,t,r)=>{if(!e.has(t))e.set(t,{});Object.assign(e.get(t),r)},Se=(e,t)=>{let r={added:{},removed:{},modified:{}},n=e,i=t;for(let s of Object.keys(i)){let a=n[s],o=i[s];if(!Object.hasOwn(n,s))r.added[s]=o;else if(b(a)&&b(o)){if(JSON.stringify(a)!==JSON.stringify(o))r.modified[s]={old:a,new:o}}else if(E(a)&&E(o)&&!B(a)&&!B(o)){let f=Se(a,o);if(ye(f))r.modified[s]={old:a,new:o}}else if(a!==o)r.modified[s]={old:a,new:o}}for(let s of Object.keys(n))if(!Object.hasOwn(i,s))r.removed[s]=n[s];return r},ye=(e)=>Object.values(e).some((t)=>Object.keys(t).length>0);import{existsSync as Ye,mkdirSync as Jt,writeFileSync as Qt}from"fs";var be=(e)=>{if(Ye(e))return!0;return Jt(e,{recursive:!0}),!0},we=(e,t="")=>{if(Ye(e))return!0;return Qt(e,t,{flag:"wx"}),!0};function Ge(e,t){let r=t.name;t.addInitializer(function(){Object.defineProperty(this,r,{configurable:!0,enumerable:!1,get(){let n=e.bind(this);return Object.defineProperty(this,r,{configurable:!0,writable:!0,value:n}),n}})})}class Xe{static arr(e){return e?b(e)?e:[e]:[]}static num(e,t=0){let r=parseFloat(String(e));return Number.isNaN(r)?t:r}static str(e){return String(e)}static arr2obj(e,t=!1){return e.reduce((r,n,i)=>{if(t)r[String(n)]=i;else r[i]=n;return r},{})}}class Ze{val;constructor(e){this.val=e}get px(){return`${this.val}px`}get rem(){return`${this.val}rem`}get pr(){return`${this.val}%`}}class Ce{static rand(e=6,t){if(t)return Math.floor(Math.random()*(t-e+1)+e);return Math.floor(Math.random()*e)}static fill(e,t=null){return Array(e).fill(t)}static new({dom:e,id:t,inner:r}){let n=document.createElement(e);if(t)n.id=t;if(r)n.innerHTML=r;return n}static randFrom(e){if(b(e))return e[this.rand(0,e.length-1)];let t=Object.keys(e);return t[this.rand(0,t.length-1)]}static randArray(e=[],t=1,r=!1){let n=[],i=r?new Set:null;while((r?i.size:n.length)<t){let s=e[Ce.rand(0,e.length-1)];if(r)i.add(s);else n.push(s)}return r?[...i]:n}static randomAZ=We;static makeID=qe;static class(e,...t){let r=t.filter(Boolean);if(e?.class)r.push(...b(e.class)?e.class:[e.class]);if(r.length)e.class=r}static get O(){return{vals:Object.values,keys:Object.keys,items:Object.entries,has:(e,t)=>Object.hasOwn(e,t),ass:Object.assign,len:(e={})=>Object.keys(e).length}}static get is(){return pe}static get return(){return Xe}static isHREF(e,t){return e===t?!0:e.startsWith(t)&&t!=="/"?!0:!1}static sleep=(e=1000)=>new Promise((t)=>setTimeout(t,e));static get screen(){let{innerWidth:e}=window,t={xs:e<=480,sm:e>=480,smd:e>=624,md:e>=768,lg:e>=1024,xl:e>=1280,xxl:e>=1536},r=Object.entries(t).reverse();for(let[n,i]of r)if(i)return n;return}bytes(e){if(e===0)return"0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,n)).toFixed(2))} ${r[n]}`}static format(e){return new Ze(e)}static compareObjects=Se;static isObjectUdpated=ye}function u(e){return function(...t){return{[e]:t}}}class Je{static attr(e){let[t,r]=Object.entries(e)[0];return u(`[${t}="${r}"]`)}static after(e=""){return u("::after"+e)}static before(e=""){return u("::before"+e)}static backdrop(e=""){return u("::backdrop"+e)}static cue(e=""){return u("::cue"+e)}static cueRegion(e=""){return u("::cue-region"+e)}static firstLetter(e=""){return u("::first-letter"+e)}static firstLine(e=""){return u("::first-line"+e)}static marker(e=""){return u("::marker"+e)}static part(e=""){return u("::part"+e)}static placeholder(e=""){return u("::placeholder"+e)}static selection(e=""){return u("::selection"+e)}static slotted(e=""){return u("::slotted"+e)}static spellingError(e=""){return u("::spelling-error"+e)}static targetText(e=""){return u("::target-text"+e)}static viewTransition(e=""){return u("::view-transition"+e)}static viewTransitionGroup(e=""){return u("::view-transition-group"+e)}static viewTransitionImagePair(e=""){return u("::view-transition-image-pair"+e)}static viewTransitionNew(e=""){return u("::view-transition-new"+e)}static viewTransitionOld(e=""){return u("::view-transition-old"+e)}static scrollbar(e=""){return u("::-webkit-scrollbar"+e)}static scrollbarThumb(e=""){return u("::-webkit-scrollbar-thumb"+e)}static scrollbarTrack(e=""){return u("::-webkit-scrollbar-track"+e)}static scrollbarCorner(e=""){return u("::-webkit-scrollbar-corner"+e)}static active(e=""){return u(":active"+e)}static anyLink(e=""){return u(":any-link"+e)}static autofill(e=""){return u(":autofill"+e)}static blank(e=""){return u(":blank"+e)}static checked(e=""){return u(":checked"+e)}static current(e=""){return u(":current"+e)}static default(e=""){return u(":default"+e)}static defined(e=""){return u(":defined"+e)}static disabled(e=""){return u(":disabled"+e)}static empty(e=""){return u(":empty"+e)}static enabled(e=""){return u(":enabled"+e)}static first(e=""){return u(":first"+e)}static firstChild(e=""){return u(":first-child"+e)}static firstOfType(e=""){return u(":first-of-type"+e)}static fullscreen(e=""){return u(":fullscreen"+e)}static future(e=""){return u(":future"+e)}static focus(e=""){return u(":focus"+e)}static focusVisible(e=""){return u(":focus-visible"+e)}static focusWithin(e=""){return u(":focus-within"+e)}static host(e=""){return u(":host"+e)}static hover(e=""){return u(":hover"+e)}static indeterminate(e=""){return u(":indeterminate"+e)}static inRange(e=""){return u(":in-range"+e)}static invalid(e=""){return u(":invalid"+e)}static lastChild(e=""){return u(":last-child"+e)}static lastOfType(e=""){return u(":last-of-type"+e)}static left(e=""){return u(":left"+e)}static link(e=""){return u(":link"+e)}static localLink(e=""){return u(":local-link"+e)}static modal(e=""){return u(":modal"+e)}static onlyChild(e=""){return u(":only-child"+e)}static onlyOfType(e=""){return u(":only-of-type"+e)}static optional(e=""){return u(":optional"+e)}static outOfRange(e=""){return u(":out-of-range"+e)}static past(e=""){return u(":past"+e)}static pictureInPicture(e=""){return u(":picture-in-picture"+e)}static placeholderShown(e=""){return u(":placeholder-shown"+e)}static paused(e=""){return u(":paused"+e)}static playing(e=""){return u(":playing"+e)}static readOnly(e=""){return u(":read-only"+e)}static readWrite(e=""){return u(":read-write"+e)}static required(e=""){return u(":required"+e)}static right(e=""){return u(":right"+e)}static root(e=""){return u(":root"+e)}static scope(e=""){return u(":scope"+e)}static target(e=""){return u(":target"+e)}static targetWithin(e=""){return u(":target-within"+e)}static userInvalid(e=""){return u(":user-invalid"+e)}static valid(e=""){return u(":valid"+e)}static visited(e=""){return u(":visited"+e)}static dir(e){return u(`:dir(${e})`)}static has(e){return u(`:has(${e})`)}static host_(e){return u(`:host(${e})`)}static hostContext(e){return u(`:host-context(${e})`)}static is(e){return u(`:is(${e})`)}static lang(e){return u(`:lang(${e})`)}static not(e){return u(`:not(${e})`)}static nthChild(e){return u(`:nth-child(${e})`)}static nthCol(e){return u(`:nth-col(${e})`)}static nthLastChild(e){return u(`:nth-last-child(${e})`)}static nthLastCol(e){return u(`:nth-last-col(${e})`)}static nthLastOfType(e){return u(`:nth-last-of-type(${e})`)}static nthOfType(e){return u(`:nth-of-type(${e})`)}static state(e){return u(`:state(${e})`)}static where(e){return u(`:where(${e})`)}static webkit(e){return u(`::-webkit-${e}`)}static and(e){return u(", "+e)}static child(e){return u(" > "+e)}static desc(e){return u(" "+e)}static next(e){return u(" + "+e)}static general(e){return u(" ~ "+e)}static withClass(e){if(!e.startsWith("."))throw Error("should start with . or # - class / id");return u(e)}}var xe={xs:"480px",sm:"480px",smd:"624px",md:"768px",lg:"1024px",xl:"1280px",xxl:"1536px"};class x{static default="xs";static prop=Object.entries(xe).reduce((e,[t,r],n)=>(e[t]=`(${n==0?"max-width":"min-width"}: ${r})`,e),{});static extra={no_hover:"(pointer: coarse)",mobile:"(pointer: coarse)",print:"print",screen:"screen",dark:"(prefers-color-scheme: dark)",light:"(prefers-color-scheme: light)"};constructor(e,t={}){let r=x.default,n={};if(e!==void 0)U(n,r,e,r);Object.entries(t).forEach(([i,s])=>{U(n,i,s,r)}),Object.assign(this,n)}static get breakpoints(){return ze(Ue(xe))??xe}}var U=(e,t,r,n)=>{if(r!==void 0)if(r instanceof x)Object.entries(r).forEach(([i,s])=>{if(n!==t)if(t!==i)if(n===i)U(e,t,s,n);else U(e,`${t}-${i}`,s,n);else U(e,i,s,n);else U(e,i,s,n)});else e[t]=r};function T(e,t){if(t)return new x(e,t);if(typeof e==="object")return new x(void 0,e);return new x(e,{})}function er(e){if(this._prefix)return T({[this._prefix]:e});else return T({xs:e})}function R(e){return new this.constructor({prefix:e,values:this._values,data:this.data})}class te{_prefix;data;_values;constructor({prefix:e,data:t,values:r}={}){this._prefix=e,this._values=r??{},Object.entries(this._values).forEach(([n,i])=>{if(!this._values[n])this._values[n]=T({});Object.assign(this._values[n],i)}),this.data=t??{}}get XS(){return R.call(this,"xs")}get SM(){return R.call(this,"sm")}get SMD(){return R.call(this,"smd")}get MD(){return R.call(this,"md")}get LG(){return R.call(this,"lg")}get XL(){return R.call(this,"xl")}get XXL(){return R.call(this,"xxl")}get NO_HOVER(){return R.call(this,"no_hover")}get MOBILE(){return R.call(this,"mobile")}get PRINT(){return R.call(this,"print")}get SCREEN(){return R.call(this,"screen")}get DARK(){return R.call(this,"dark")}set _value(e){Object.entries(e).forEach(([t,r])=>{if(!this._values[t])this._values[t]=T({});Object.assign(this._values[t],er.call(this,r))})}get _value(){return this._values}}class N{k="";fallback;var="";value;constructor(e={},t){if(Object.keys(e).length){let[r,n]=Object.entries(e)[0];this.k=r,this.var="--"+K(r),this.value=n instanceof x?n:T(n,{}),this.fallback=t}else this.value=T({})}__(e){if(e)this.fallback=e;let t=this.fallback;if(t)return`var(${this.var}, ${c(t)})`;else return`var(${this.var})`}new(e,t){return new N({[this.k]:e instanceof x?e:c(e)},t)}}var tr=(e,t)=>new N(e,t),rr=(e)=>{let t={};for(let r in e)t[r]=new N({[r]:e[r]});return t};var c=(e,t={unit:"rem"})=>{let{rem:r,second:n,quote:i,degree:s,percent:a,delimeter:o,unit:f,delimeter_arr:h}=t;if(ge(e)||B(e)||!i&&e==="")return"";let S=b(e)?e:[e];if(!S.length)return"";return S.filter((l)=>j(l)).map((l)=>{if(b(l))return o=h||", ",c(l,{...t,delimeter:" "});if(l instanceof N)return l.__();if(i)l=String(l);if(ce(l))if(r)return`${l}${f?f:"rem"}`;else if(s)return`${l}deg`;else if(a)return`${l}%`;else if(n)return`${l}s`;else return String(l);if(O(l))if(l.includes("("))return l;else if(i)return`'${l}'`;else return l;return""}).filter((l)=>j(l)&&l!=="").join(o||" ")};class Qe{static minmax(e,t){return`minmax(${c([e,t],{rem:!0,delimeter:", "})})`}static fitContent(e){return`fit-content(${c([e],{rem:!0})})`}static repeat(e,...t){return`repeat(${c([e,c([t],{rem:!0})],{delimeter:", "})})`}}class et extends Qe{static attr(e,t,r){return`attr(${c([e,t,r])})`}static blur(e){return`blur(${c([e],{rem:!0})})`}static brightness(e){return`brightness(${c([e])})`}static calc(...e){return`calc(${c(e,{rem:!0})})`}static circle(e,t){return`circle(${c([e,t],{rem:!0})})`}static clamp(e,t,r){return`clamp(${c([e,t,r],{rem:!0,delimeter:", "})})`}static colorMix(e,t,r){return`color-mix(${c([e,c(b(t)?t:[t]),c(b(r)?r:[r])],{delimeter:", "})})`}static conicGradient(...e){return`conic-gradient(${c(e,{delimeter:", "})})`}static contrast(e){return`contrast(${c([e])})`}static cubicBezier(e,t,r,n){return`cubic-bezier(${c([e,t,r,n],{delimeter:", "})})`}static dropShadow(...e){return`drop-shadow(${c(e,{rem:!0})})`}static grayscale(e){return`grayscale(${c([e])})`}static hsl(e,t,r){return`hsl(${c([e,t,r])})`}static hsla(e,t,r,n){return`hsl(${c([e,t,r,n?["/",n]:n])})`}static hueRotate(e){return`hue-rotate(${c([e],{degree:!0})})`}static inset(...e){return`inset(${c(e,{rem:!0})})`}static invert(e){return`invert(${c([e])})`}static linearGradient(...e){return`linear-gradient(${c(e,{delimeter:", "})})`}static matrix(e,t,r,n,i,s){return`matrix(${c([e,t,r,n,i,s],{delimeter:", "})})`}static matrix3d(e,t,r,n){return`matrix3d(${c([e,t,r,n],{delimeter:", "})})`}static max(...e){return`max(${c(e,{rem:!0,delimeter:", "})})`}static min(...e){return`min(${c(e,{rem:!0,delimeter:", "})})`}static opacity(e){return`opacity(${c([e])})`}static path(e){return`path(${c([e],{quote:!0})})`}static clipPath(e,t){return`path(${c([e,c([t],{quote:!0})],{delimeter:", "})})`}static perspective(e){return`perspective(${c([e])})`}static polygon(...e){return`polygon(${c(e,{percent:!0,delimeter:", "})})`}static ray(...e){return`ray(${c(e,{degree:!0})})`}static radialGradient(...e){return`radial-gradient(${c(e,{delimeter_arr:", ",percent:!0,delimeter:", "})})`}static repeatingConicGradient(...e){return`repeating-conic-gradient(${c(e,{degree:!0,delimeter:", "})})`}static repeatingLinearGradient(...e){return`repeating-linear-gradient(${c(e,{degree:!0,delimeter:", "})})`}static repeatingRadialGradient(...e){return`repeating-radial-gradient(${c(e,{degree:!0,delimeter:", "})})`}static rgb(e,t,r){return`rgb(${c([e,t,r])})`}static rgba(e,t,r,n){return`rgba(${c([e,t,r,n?["/",n]:void 0],{delimeter_arr:" "})})`}static rotate(e){return`rotate(${c([e],{degree:!0})})`}static rotate3d(e,t,r,n){return`rotate3d(${c([c([e,t,r],{delimeter:", "}),n],{degree:!0,delimeter:", "})})`}static rotateX(e){return`rotateX(${c([e],{degree:!0})})`}static rotateY(e){return`rotateY(${c([e],{degree:!0})})`}static rotateZ(e){return`rotateZ(${c([e],{degree:!0})})`}static saturate(...e){return`saturate(${c(e)})`}static scale(e,t){return`scale(${c([e,t],{delimeter:", "})})`}static scale3d(e,t,r){return`scale3d(${c([e,t,r],{delimeter:", "})})`}static scaleX(e){return`scaleX(${c([e])})`}static scaleY(e){return`scaleY(${c([e])})`}static scaleZ(e){return`scaleZ(${c([e])})`}static sepia(e){return`sepia(${c([e])})`}static skew(...e){return`skew(${c(e,{degree:!0,delimeter:", "})})`}static skewX(e){return`skewX(${c([e],{degree:!0})})`}static skewY(e){return`skewY(${c([e],{degree:!0})})`}static steps(e,t){return`steps(${c([e,t],{delimeter:", "})})`}static translate(...e){return`translate(${c(e,{rem:!0,delimeter:", "})})`}static translate3d(...e){return`translate3d(${c(e,{rem:!0,delimeter:", "})})`}static translateX(e){return`translateX(${c([e],{rem:!0})})`}static translateY(e){return`translateY(${c([e],{rem:!0})})`}static translateZ(...e){return`translateZ(${c(e,{rem:!0,delimeter:", "})})`}static url(e){return`url(${c([e],{quote:!0})})`}static format(e){return`format(${c([e],{quote:!0})})`}static var(e,t=""){e="--"+K(e);let r=t?", "+c([t],{rem:!0,delimeter:", "}):"";return`var(${c([e],{rem:!0})}${r})`}}var nr={important:" !important",visible:"visible",hidden:"hidden",auto:"auto",none:"none",clip:"clip",scroll:"scroll",initial:"initial",inherit:"inherit",flex:"flex",center:"center",flex_start:"flex-start",flex_end:"flex-end",space_evenly:"space-evenly",stretch:"stretch",wrap:"wrap",column:"column",column_reverse:"column-reverse",row:"row",row_reverse:"row-reverse",space_between:"space-between",space_around:"space-around",pr100:"100%",pr50:"50%",i100vh:"100vh",i100vw:"100vw",block:"block",sticky:"sticky",fixed:"fixed",absolute:"absolute",relative:"relative",pointer:"pointer",grabbing:"grabbing",checkbox:"checkbox",solid:"solid",inset:"inset",bold:"bold",currentColor:"currentColor",forwards:"forwards",text:"text",norepeat:"no-repeat",nowrap:"nowrap",difference:"difference",preserve3d:"preserve-3d"};class re{value;__;constructor(e){if(this.value=new w,O(e))this.value.set(e,[]);else Object.entries(e).forEach(([t,r])=>{this.value.set(`${t}:${r}`,[])});this.__=(...t)=>(this.value.forEach((r)=>{r.push(...t)}),this)}}function ir(e){return new re(e).__}var D=(e)=>{if(He(e))return D(e());if(e instanceof x)return e;if(e instanceof N)return T(e.__(),{});return T(e,{})},ie=(e)=>e==='"'||e==="'",Me="([{",ve=")]}",rt=(e,t)=>{let r=[],n=0,i=null,s=0;for(let a=0;a<e.length;a++){let o=e[a];if(i){if(o==="\\")a++;else if(o===i)i=null;continue}if(o==="\\")a++;else if(ie(o))i=o;else if(Me.includes(o))s++;else if(ve.includes(o)){if(s>0)s--}else if(o===t&&s===0)r.push(e.slice(n,a)),n=a+1}return r.push(e.slice(n)),r},sr=(e,t)=>{let r=null,n=0;for(let i=0;i<e.length;i++){let s=e[i];if(r){if(s==="\\")i++;else if(s===r)r=null;continue}if(s==="\\")i++;else if(ie(s))r=s;else if(Me.includes(s))n++;else if(ve.includes(s)){if(n>0)n--}else if(s===t&&n===0)return i}return-1},Ne=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,ar=(e)=>{if(!Ne.test(e))return;let t=Number(e);return Number.isFinite(t)?t:void 0};function nt(e){let t={};return rt(e,";").forEach((r)=>{let n=r.trim();if(n==="")return;let i=sr(n,":");if(i===-1)return;let s=n.slice(0,i).trim();if(s==="")return;let a=n.slice(i+1).trim(),o=s.startsWith("--"),f=o?s:H(s);if(o){t[f]=a;return}let h=ar(a);t[f]=h===void 0?a:h}),t}var it=new Set(["initial","inherit","unset","revert","revert-layer"]),or=new Set(["linear","ease","ease-in","ease-out","ease-in-out","step-start","step-end"]),ur=new Set(["cubic-bezier","steps","linear"]),lr=new Set(["normal","reverse","alternate","alternate-reverse"]),cr=new Set(["forwards","backwards","both"]),fr=new Set(["running","paused"]),st=/^-{0,2}[A-Za-z_][A-Za-z0-9_-]*$/,at=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:s|ms)$/i,Re=(e)=>e.length>=2&&ie(e[0])&&e[e.length-1]===e[0],ot=(e)=>{let t=[],r=-1,n=null,i=0;for(let s=0;s<e.length;s++){let a=e[s];if(n){if(a==="\\")s++;else if(a===n)n=null;continue}if(a==="\\"){if(r===-1)r=s;s++;continue}if(ie(a)){if(r===-1)r=s;n=a;continue}if(Me.includes(a)){if(r===-1)r=s;i++;continue}if(ve.includes(a)){if(r===-1)r=s;if(i>0)i--;continue}if(i===0&&/\s/.test(a)){if(r!==-1)t.push(e.slice(r,s)),r=-1;continue}if(r===-1)r=s}if(r!==-1)t.push(e.slice(r));return t},dr=(e)=>{if(Re(e))return"name";let t=e.match(/^([A-Za-z][A-Za-z0-9-]*)\(/);if(t){if(e.endsWith(")")&&ur.has(t[1].toLowerCase()))return"skip";return"abort"}if(at.test(e)||Ne.test(e))return"skip";if(e.toLowerCase()==="!important")return"skip";if(!st.test(e))return"abort";let r=e.toLowerCase();if(it.has(r)||or.has(r)||lr.has(r)||cr.has(r)||fr.has(r)||r==="infinite"||r==="none")return"skip";return"name"},Ve=(e,t)=>{if(Re(e)){let r=e.slice(1,-1);if(r==="")return;let n=e[0];return{text:`${n}${t}${r}${n}`,name:r}}return{text:`${t}${e}`,name:e}},pr=(e,t)=>{let r=ot(e),n=-1,i="";for(let o=0;o<r.length;o++){let f=r[o],h=f.toLowerCase(),S=dr(f);if(S==="abort")return{value:e,names:[]};if(h==="!important"&&o!==r.length-1)return{value:e,names:[]};if(S==="skip")continue;if(n!==-1)return{value:e,names:[]};n=o,i=f}if(n===-1)return{value:e,names:[]};let s=Ve(i,t);if(!s)return{value:e,names:[]};let a=[...r];return a[n]=s.text,{value:a.join(" "),names:[s.name]}},mr=(e,t)=>{let r=ot(e.trim()),n=r.length>1&&r[r.length-1].toLowerCase()==="!important"?r.pop():void 0;if(r.length!==1)return{value:e,names:[]};let i=r[0];if(Re(i)){let a=Ve(i,t);if(!a)return{value:e,names:[]};return{value:[a.text,n].filter(Boolean).join(" "),names:[a.name]}}if(i.includes("("))return{value:e,names:[]};if(at.test(i)||Ne.test(i))return{value:e,names:[]};if(!st.test(i))return{value:e,names:[]};let s=i.toLowerCase();if(it.has(s)||s==="none")return{value:e,names:[]};return{value:[Ve(i,t).text,n].filter(Boolean).join(" "),names:[i]}},tt=(e,t,r)=>{let n=rt(e,",");if(n.some((o)=>o.trim()===""))return{value:e,names:[]};let i=[],s=!1,a=n.map((o)=>{let f=r(o,t);if(i.push(...f.names),f.value!==o)s=!0;return f.value});return{value:s?a.map((o)=>o.trim()).join(", "):e,names:i}},ut=(e,t,r="animation")=>{if(r==="animationName")return tt(e,t,mr);return tt(e,t,pr)},lt=(e)=>{e.value.forEach((t,r)=>{e.value.set(r,t.map((n)=>{let i={};return Object.entries(n).forEach(([s,a])=>{if(j(a))i[s]=D(a)}),i}))})},ne=(e,t=[])=>{if(b(e))return ne(e[0]);if(e instanceof N)return ne(Object.values(e.value));return[String(e)]};function $e(e){let t=[],r=0,n=0,i=null;for(let s=0;s<e.length;s++){let a=e[s];if(a==="\\"){s++;continue}if(i){if(a===i)i=null;continue}if(a==="/"&&e[s+1]==="*"){let o=e.indexOf("*/",s+2);s=o===-1?e.length:o+1;continue}if(a==='"'||a==="'")i=a;else if(a==="("||a==="[")n++;else if(a===")"||a==="]"){if(n>0)n--}else if(a===","&&n===0)t.push(e.slice(r,s)),r=s+1}return t.push(e.slice(r)),t}function ct(e,t){let r=$e(e);if(r.length<=1)return e+t;return r.map((n)=>`${n.trim()}${t}`).join(", ")}function gr(e,t,r){let n=$e(e);if(n.length<=1)return r.map((i)=>`${e}${t}${i.trim()}`).join(", ");return n.flatMap((i)=>r.map((s)=>`${i.trim()}${t}${s.trim()}`)).join(", ")}class Ae{base;constructor(e){this.base=e}prefixAnimationValues(e,t,r){let n=H(t);if(!(n==="animation"||n==="animationName"))return r;let s=Object.assign(new x,r);return Object.entries(s).forEach(([a,o])=>{s[a]=this.addPrefixToAnimation(e,n,o)}),s}addPrefixToAnimation(e,t,r){if(r instanceof N)this.saveAnim(e,r);else if(b(r))return r.map((n)=>this.addPrefixToAnimation(e,t,n));else if(O(r)){let n=ut(r,this.base.PREFIX,t);return n.names.forEach((i)=>{let s=`${this.base.PREFIX}${i}`;this.base.ANIM.init(s,new Set).add(e)}),n.value}return r}saveAnim(e,t){ne(t).forEach((r)=>{this.base.ANIM.init(`${this.base.PREFIX}${r}`,new Set).add(e)})}processDeclaration(e,t,r,n,i){if(r instanceof N)this.saveAnim(e,r),ee(n,t,this.prefixAnimationValues(e,r.var,D(r)));else if(t.startsWith(","))this.set(e+t,r,i);else if(t.startsWith(":")||t.startsWith("["))this.set(ct(e,t),r,i);else if(t.startsWith(" ")){let s=t.match(/^\s*(?:[>+~]\s*)?/)?.[0]??"";this.set(gr(e,s,$e(t.slice(s.length))),r,i)}else if(de(t))this.set(ct(e,t),r,i);else n.set(t,this.prefixAnimationValues(e,t,D(r)))}set(e,t,r){if(!E(t)&&!B(t)&&!O(t))return;let n=new w;if(t instanceof N)this.saveAnim(e,t),ee(n,t.var,this.prefixAnimationValues(e,t.var,D(t.value)));else if(t instanceof te)Object.entries(t._value).forEach(([s,a])=>{if(j(a))n.set(s,this.prefixAnimationValues(e,s,D(a)))});else if(t instanceof re)lt(t),n.init("supports",[]).push(t);else if(b(t))t.forEach((s)=>{this.set(e,s,r)});else if(O(t)){let s=nt(t);this.set(e,s,r)}else Object.entries(t).forEach(([s,a])=>{if(a instanceof N){this.saveAnim(e,a),ee(n,a.var,this.prefixAnimationValues(e,a.var,D(a.value)));return}return this.processDeclaration(e,s,a,n,r)});let i=r.init(e,new w);n.forEach((s,a)=>{if(a==="supports"&&b(s))r.init(e,new w).init(a,[]).push(...s);else i.set(a,s)})}}class _{PRE;EXPORT;UNIT;SOURCE;PS;PREFIX;ARR=new w;CID=new w;DATA=new w;ANIM=new w;IMPORTED=[];constructor(e="",t="",r,n,i=""){this.PRE=e;this.EXPORT=r;this.UNIT=n;this.SOURCE=i;this.PREFIX=t?t+"_":t,this.PS=new Ae(this)}get(e,t,r){let n=e.PRE+t;if(e.DATA.has(n))return n;else if(t in e)return e[t];else return e.PRE+t}set(e,t,r){return!1}get css(){return new Proxy(this,this)}load(e){return this.IMPORTED.push(e),this}__(e){Object.entries(e).forEach(([t,r])=>{this.set(this,t,r)})}}var ft=new Set(["transitionDuration","transitionDelay","animationDelay","animationDuration"]),hr=new Set([...ft,"zIndex","opacity","aspectRatio","order","flexShrink","flexGrow","flex","fillOpacity","lineClamp","order","scale","webkitLineClamp","lineHeight","fontWeight","orphans","widows","tabSize","zoom","borderImageOutset","borderImageSlice","borderImageWidth","animationIterationCount","columnCount","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd"]),Sr=new Set(["content"]),yr=new Set(["transitionProperty","animation","animationName"]),z=(e,t,r="rem")=>{let n=H(e),i=c(t,{rem:!hr.has(n),second:ft.has(n),quote:Sr.has(n),delimeter:yr.has(n)?", ":" ",unit:r});return`${K(e)}: ${i};`};class k extends _{set(e,t,r){let n=e.PRE+t;return e.PS.set(n,r,e.DATA),!0}}class P extends _{webkit;constructor(e="",t=!0,r,n=""){super("",e,!1,r,n);this.webkit=t}set(e,t,r){let n=e.PREFIX+t,i=b(r)?r:[r],s=new w;if(i.forEach((a)=>{Object.entries(a).forEach(([o,f])=>{let h=fe(o)?`${o}%`:o;e.PS.set(h,f,s)})}),e.ANIM.init(n,new Set),e.DATA.set(`@keyframes ${n}`,s),this.webkit)e.DATA.set(`@-webkit-keyframes ${n}`,s);return!0}}class I extends _{constructor(e="",t=""){super("@",e,void 0,void 0,t)}set(e,t,r){return e.ARR.init(e.PRE+t,new Set).add(r),e}}class F extends _{constructor(e="",t=""){super("@font-face",e,void 0,void 0,t);this.ARR.set(this.PRE,new Set)}set(e,t,r){let n=Object.entries({fontFamily:c([t],{quote:!0}),...r}).map(([i,s])=>z(i,s,this.UNIT));return e.ARR.get(e.PRE)?.add(n.join(`
|
|
4
|
+
`)),!0}}var dt=(e,t=!1,r,n,i="")=>({d:new k("",e,r,n,i),i:new k("#",e,r,n,i),c:new k(".",e,r,n,i),kf:new P(e,t,n,i),at:new I("",i),font:new F("",i)}),br=(e)=>{let t=new Set;return e.filter((r)=>{if(t.has(r))return!1;return t.add(r),!0})},pt=(e,t,r)=>(br(t).forEach((n)=>{r.add(n.path),n.imported.forEach((i)=>{r.add(i)}),Object.keys(e).forEach((i)=>{e[i].load(n[i])})}),e),mt=(e)=>{let t={};return Object.keys(e).forEach((r)=>{t[r]=e[r].css}),t};import{writeFileSync as Kr}from"fs";import{dirname as Dt}from"path";var G=(e,t)=>`${e} {
|
|
5
5
|
${t.join(`
|
|
6
6
|
`)}
|
|
7
|
-
}`,
|
|
8
|
-
`));else{let S=i.split("-").map((
|
|
7
|
+
}`,wr=(e)=>[...e].join(", "),Cr=(e)=>e.some((t)=>t.startsWith("animation")||t.startsWith("transition")),gt=(e,t)=>G(wr(e),t),ht=(e,t,r)=>{let n=new Set;return e.atRules.forEach((i)=>{n.add(i)}),Object.entries(e.groupedRulesByMedia).forEach(([i,s])=>{let a=[],o=[];if(s.forEach(({selectors:S,declarations:l})=>{let p=gt(S,l);if(Cr(l))o.push(p);else a.push(p)}),o.length)a.unshift(...o);let f=e.keyframeBlocksByMedia[i];if(f)Object.entries(f).forEach(([S,l])=>{a.push(G(S,l))});let h=e.groupedSupportsByMedia[i];if(h)Object.entries(h).forEach(([S,l])=>{let p=l.map(({selectors:m,declarations:d})=>gt(m,d));a.push(G(S,p))});if(a.length)if(i===r)n.add(`/* -------------- ${i} ( default ) */`),n.add(a.join(`
|
|
8
|
+
`));else{let S=i.split("-").map((l)=>t[l]).join(" and ");if(S)n.add(`/* -------------- ${i} */`),n.add(`@media ${S} {
|
|
9
9
|
${a.join(`
|
|
10
10
|
`)}
|
|
11
11
|
}`)}}),[...n].join(`
|
|
12
|
-
`)};var
|
|
12
|
+
`)};var bt=(e,t,r,n)=>{let i={code:r.code,severity:r.severity,message:r.message,sourcePath:t.SOURCE||e.sourcePath||""};if(r.rule!==void 0)i.rule=r.rule;if(r.selector!==void 0)i.selector=r.selector;let s=e.onDiagnostic;if(typeof s==="function"){try{s(i)}catch{}return}n?.()},X=()=>({visited:new Set,active:new Set,stack:[]}),Z=(e,t,r,n)=>{if(r.active.has(t)){let s=[...r.stack,t].map((o)=>o.SOURCE||e.sourcePath||"").join(" -> "),a=n.get(t);if(a===void 0)a=new Set,n.set(t,a);if(!a.has(s))a.add(s),bt(e,t,{code:"import.cycle",severity:"warning",message:`Circular import detected: ${s}`});return!1}if(r.visited.has(t))return!1;return r.visited.add(t),r.active.add(t),r.stack.push(t),!0},J=(e,t)=>{t.stack.pop(),t.active.delete(e)},xr=(e,t)=>Array.from(e.matchAll(t),(r)=>r[1]).filter((r)=>r!==void 0),Vr=(e)=>/[a-zA-Z0-9_-]/.test(e)||e.charCodeAt(0)>=128,Mr=(e,t)=>{let r=t,n="",i="";while(r<e.length){let s=e[r];if(s==="\\"){if(n+=s,r+=1,r>=e.length)break;let a=e[r];if(/[0-9a-fA-F]/.test(a)){let o="";while(r<e.length&&o.length<6&&/[0-9a-fA-F]/.test(e[r]))o+=e[r],r+=1;if(n+=o,r<e.length&&/\s/.test(e[r]))n+=e[r],r+=1;let f=parseInt(o,16);i+=f===0||f>1114111?"\uFFFD":String.fromCodePoint(f)}else n+=a,i+=a,r+=1;continue}if(!Vr(s))break;n+=s,i+=s,r+=1}return{token:{raw:n,decoded:i},end:r}},vr=(e)=>{let t=[],r=[],n=0,i,s=0;while(n<e.length){let a=e[n];if(a==="\\"){n+=2;continue}if(i!==void 0){if(a===i)i=void 0;n+=1;continue}if(a==='"'||a==="'"){i=a,n+=1;continue}if(a==="/"&&e[n+1]==="*"){let o=e.indexOf("*/",n+2);n=o===-1?e.length:o+2;continue}if(a==="["){s+=1,n+=1;continue}if(a==="]"){s=Math.max(0,s-1),n+=1;continue}if(s===0&&(a==="."||a==="#")&&Ct(e,n+1)){let{token:o,end:f}=Mr(e,n+1);(a==="."?t:r).push(o),n=f;continue}n+=1}return{classes:t,ids:r}},Nr=(e)=>{let t=e.split(""),r=0,n,i=0;while(r<e.length){let s=e[r];if(s==="\\"){r+=2;continue}if(n!==void 0){if(t[r]=" ",s===n)n=void 0;r+=1;continue}if(s==='"'||s==="'"){t[r]=" ",n=s,r+=1;continue}if(s==="/"&&e[r+1]==="*"){let a=e.indexOf("*/",r+2),o=a===-1?e.length:a+2;for(let f=r;f<o;f+=1)t[f]=" ";r=o;continue}if(s==="["){i+=1,t[r]=" ",r+=1;continue}if(s==="]"){i=Math.max(0,i-1),t[r]=" ",r+=1;continue}if(i>0)t[r]=" ";r+=1}return t.join("")},Rr=/^[\p{ID_Start}_$][\p{ID_Continue}$]*$/u,$r=/[^\p{ID_Continue}$]/gu,Ar=(e)=>{let t=e.replaceAll("-","_").replace($r,"_");if(t==="")return"_";if(!Rr.test(t))t=`_${t}`;return t},wt=(e,t,r,n,i=!0)=>{let s=/\b([a-zA-Z][a-zA-Z0-9]*)\b(?![^{}]*})/g,{classes:a,ids:o}=vr(t),f=[...new Set(a.map((h)=>h.decoded)),...new Set(o.map((h)=>h.decoded))];if(i&&j(n)&&n){let h=(S)=>{let l=new Set;S.forEach(({raw:p,decoded:m})=>{if(l.has(p))return;l.add(p),e.cid.init(Ar(m),new Set).add(r+p)})};h(a),h(o)}return f.push(...new Set(xr(Nr(t),s))),f.some((h)=>e.shaker.includes(h)||e.include.includes(h))},Ct=(e,t)=>{let r=e[t];if(r===void 0)return!1;if(r==="\\")return!0;if(/[a-zA-Z_-]/.test(r))return!0;return r.charCodeAt(0)>=128},jr=(e,t)=>{if(!t)return e;let r="",n=0,i,s=0;while(n<e.length){let a=e[n];if(a==="\\"){if(r+=a,n+1<e.length)r+=e[n+1];n+=2;continue}if(i!==void 0){if(r+=a,a===i)i=void 0;n+=1;continue}if(a==='"'||a==="'"){i=a,r+=a,n+=1;continue}if(a==="/"&&e[n+1]==="*"){let o=e.indexOf("*/",n+2),f=o===-1?e.length:o+2;r+=e.slice(n,f),n=f;continue}if(a==="[")s+=1;if(a==="]")s=Math.max(0,s-1);if(s===0&&(a==="."||a==="#")&&Ct(e,n+1)){r+=a+t,n+=1;continue}r+=a,n+=1}return r},Tr=(e,t,r)=>!(e.shaker.length>0&&(t.startsWith(".")||t.startsWith("#")))||r,St=(e,t,r)=>{(e[t]??=[]).push(r)},xt=(e,t,r,n,i,s)=>{if(!Z(t,e,i,s))return;e.DATA.forEach((a,o)=>{let f=jr(o,e.PREFIX),h=wt(t,o,e.PREFIX,t.exportMap);if(!Tr(t,f,h))return;let S=new w,l=new w;a.forEach((p,m)=>{if(m==="supports"){if(b(p))p.forEach((d)=>{d.value.forEach((g,y)=>{let C=l.init(y,new w);g.forEach((M)=>{Object.entries(M).forEach(([v,V])=>{Object.entries(V).forEach(([A,Lt])=>{C.init(A,[]).push(z(v,Lt,e.UNIT))})})})})})}else Object.entries(p).forEach(([d,g])=>{S.init(d,[]).push(z(m,g,e.UNIT))})}),S.forEach((p,m)=>{St(r,m,{selector:f,declarations:p})}),l.forEach((p,m)=>{let d=n[m]??={};p.forEach((g,y)=>{St(d,y,{selector:f,declarations:g})})})}),e.IMPORTED.forEach((a)=>{if(a instanceof k)xt(a,t,r,n,i,s)}),J(e,i)},kr=(e,t)=>{t.forEach((r,n)=>{r.forEach((i)=>{e.init(n,new Set).add(i)})})},Vt=(e,t,r,n,i)=>{if(!Z(t,e,n,i))return;kr(r,e.ANIM),e.IMPORTED.forEach((s)=>{if(s instanceof k)Vt(s,t,r,n,i)}),J(e,n)},Mt=(e,t,r,n,i,s)=>{if(!Z(t,e,i,s))return;let a=(f,h,S)=>{let l=r[f]??={};(l[h]??=[]).push(S)},o=(f)=>{if(!t.shaker.length)return!0;let h=n.get(f);return h!==void 0&&[...h].some((S)=>wt(t,S,"",!1,!1))};e.DATA.forEach((f,h)=>{let S=h.split(" ")[1],l=o(S);f.forEach((p,m)=>{if(!(p instanceof w))return;let d={};p.forEach((g,y)=>{if(y==="supports"||b(g)){bt(t,e,{code:"keyframes.supports-unsupported",severity:"error",message:"@supports is not supported in @keyframes",rule:h,selector:m},()=>{he.e=["@supports not supported in @keyframes",{error:"support in keyframes"}]});return}if(!l)return;Object.entries(g).forEach(([C,M])=>{(d[C]??=[]).push(z(y,M,e.UNIT))})}),Object.entries(d).forEach(([g,y])=>{a(g,h,G(m,y))})})}),e.IMPORTED.forEach((f)=>{if(f instanceof P)Mt(f,t,r,n,i,s)}),J(e,i)},vt=(e,t,r,n,i)=>{if(!Z(r,e,n,i))return;for(let[s,a]of e.ARR)a.forEach((o)=>{let f=o.includes("(")?o:`"${o}"`;t.add(`${s} ${f.trim()};`)});e.IMPORTED.forEach((s)=>{if(s instanceof I)vt(s,t,r,n,i)}),J(e,n)},yt="@font-face",Nt=(e,t,r,n,i)=>{if(!Z(r,e,n,i))return;(e.ARR.get(yt)??new Set).forEach((a)=>{t.add(`${yt} {
|
|
13
13
|
${a}
|
|
14
|
-
}`)}),e.IMPORTED.forEach((a)=>{if(a instanceof F)
|
|
14
|
+
}`)}),e.IMPORTED.forEach((a)=>{if(a instanceof F)Nt(a,t,r,n,i)}),J(e,n)},Rt=(e,t)=>{let r={},n={},i={},s=new w,a=new Set,o=t,f=X(),h=X(),S=X(),l=X(),p=X(),m=new Map,d=Object.values(e);for(let g of d)if(g instanceof k)Vt(g,o,s,f,m);for(let g of d)if(g instanceof k)xt(g,o,r,n,h,m);else if(g instanceof P)Mt(g,o,i,s,S,m);else if(g instanceof I)vt(g,a,o,l,m);else if(g instanceof F)Nt(g,a,o,p,m);return{styleRulesByMedia:r,supportsRulesByCondition:n,keyframeBlocksByMedia:i,atRules:a}};var Or=(e,t)=>{if(e.length!==t.length)return!1;return e.every((r,n)=>r===t[n])},$t=(e)=>{let t=[];for(let r of e){let n=t[t.length-1];if(n&&Or(n.declarations,r.declarations))n.selectors.add(r.selector);else t.push({selectors:new Set([r.selector]),declarations:[...r.declarations]})}return t},At=(e,t)=>{let r={};return t.forEach((n)=>{r[n]??=[]}),Object.entries(e).forEach(([n,i])=>{(r[n]??=[]).push(...$t(i))}),r},jt=(e)=>{let t={};return Object.entries(e).forEach(([r,n])=>{let i=`@supports(${r})`;Object.entries(n).forEach(([s,a])=>{let o=t[s]??={};(o[i]??=[]).push(...$t(a))})}),t};class je{shweet;shaker;include;CID=new w;css="";onDiagnostic;constructor(e,t=[],r=[],n){this.shweet=e;this.shaker=t;this.include=r;this.onDiagnostic=n??e.onDiagnostic}load(e,t={}){let r=x.default;this.CID.clear();let n={...x.prop,...x.extra,...t},i=Rt(this.shweet,{shaker:this.shaker,include:this.include,exportMap:e,cid:this.CID,sourcePath:this.shweet.path,onDiagnostic:this.onDiagnostic}),s=At(i.styleRulesByMedia,Object.keys(n)),a=jt(i.supportsRulesByCondition);return this.css=ht({groupedRulesByMedia:s,groupedSupportsByMedia:a,keyframeBlocksByMedia:i.keyframeBlocksByMedia,atRules:i.atRules},n,r),this}}import{writeFileSync as Er}from"fs";var Dr=new Set("arguments await break case catch class const continue debugger default delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield".split(" ")),Br=/^[$_\p{ID_Start}][$\u200c\u200d_\p{ID_Continue}]*$/u,Te=(e)=>Br.test(e)&&!Dr.has(e),_r=(e)=>{let t=[...e.entries()].map(([s,a])=>{let o=[...a].join(" ");return{key:s,value:o,rendered:`${s}="${o}"`}}).sort((s,a)=>s.rendered.localeCompare(a.rendered,void 0,{numeric:!0}));if(t.length===0)return"export {}";if(t.every((s)=>Te(s.key)))return`export const ${t.map((s)=>s.rendered).join()};`;let r=new Set(t.map((s)=>s.key).filter((s)=>Te(s))),n=1,i=()=>{let s;do s=`_x${n}`,n+=1;while(r.has(s));return r.add(s),s};return t.map((s)=>{if(Te(s.key))return`export const ${s.rendered};`;let a=i();return`const ${a}=${JSON.stringify(s.value)}; export { ${a} as ${JSON.stringify(s.key)} };`}).join(`
|
|
15
|
+
`)},Tt=(e,t)=>{Er(e,_r(t))};var ke=(e)=>e!==void 0&&/\s/.test(e),W=(e)=>e!==void 0&&(/[a-zA-Z0-9_-]/.test(e)||e.charCodeAt(0)>=128),Oe=(e)=>e!==void 0&&e>="0"&&e<="9",Pr=(e)=>e!==void 0&&(/[a-zA-Z_-]/.test(e)||e.charCodeAt(0)>=128),kt=(e,t)=>{let r=t;while(r<e.length){let n=e[r];if(n==="\\"){r+=Math.min(2,e.length-r);continue}if(!W(n))break;r+=1}return r},Ot=new Set(["{","}",";",",",">","~"]),Ir=/^(?:calc|min|max|clamp|hypot|round|mod|rem|abs|sign|sqrt|pow|log|exp|sin|cos|tan|asin|acos|atan|atan2)\(/i,Fr=/^url\(/i,Lr=(e,t)=>{if(e===void 0||t===void 0)return!1;if(W(e)&&W(t))return!0;if(Oe(e)&&t===".")return!0;if(e==="."&&Oe(t))return!0;if(e==="#"&&W(t))return!0;if(e==="@"&&W(t))return!0;if(W(e)&&t==="(")return!0;if(Oe(e)&&t==="%")return!0;if(e==="/"&&t==="*")return!0;return!1},Hr=(e,t,r)=>{if(r&&(e==="+"||e==="-"))return!1;if(r&&(t==="+"||t==="-"))return!1;if(t===":")return!1;if(e===":")return!0;if(t==="+")return!0;if(e==="+")return!0;return Ot.has(e)||Ot.has(t)},Et=(e)=>{let t="",r=0,n=!1,i=!1,s=0,a=[],o=0,f=(p)=>{if(!n)return;if(n=!1,t.length===0)return;let m=t[t.length-1];if(!Hr(m,p,o>0))t+=" "},h=(p)=>{let m=e[p],d=p+1;while(d<e.length){let g=e[d];if(g==="\\"){d+=Math.min(2,e.length-d);continue}if(d+=1,g===m)break}return t+=e.slice(p,d),d},S=(p,m)=>{let d=m+1,g=1,y;while(d<e.length){let C=e[d];if(y!==void 0){if(C==="\\"){d+=Math.min(2,e.length-d);continue}if(d+=1,C===y)y=void 0;continue}if(C==="\\"){d+=Math.min(2,e.length-d);continue}if(C==='"'||C==="'"){y=C,d+=1;continue}if(C==="(")g+=1;else if(C===")"){if(g-=1,d+=1,g===0)break;continue}d+=1}return t+=e.slice(p,d),d},l=(p,m)=>{let d=p,g=0;while(d<e.length){let y=e[d];if(y==="\\"){d+=Math.min(2,e.length-d);continue}if(y==='"'||y==="'"){let C=y;d+=1;while(d<e.length){let M=e[d];if(M==="\\"){d+=Math.min(2,e.length-d);continue}if(d+=1,M===C)break}continue}if(y==="/"&&e[d+1]==="*"){let C=e.indexOf("*/",d+2);d=C===-1?e.length:C+2;continue}if(g===0){if(y===";"||y==="}")break;if(m&&y===")")break}if(y==="("||y==="["||y==="{")g+=1;else if(y===")"||y==="]"||y==="}")g=Math.max(0,g-1);d+=1}return d};while(r<e.length){let p=e[r];if(ke(p)){n=!0,r+=1;continue}if(p==="/"&&e[r+1]==="*"){let m=e.indexOf("*/",r+2),d=m===-1?e.length:m+2,g=e.slice(r,d);if(/^\/\*[!#@]/.test(g))f("/"),t+=g;else if(!n){let C=e[d];if(C!==void 0&&!ke(C)&&Lr(t[t.length-1],C))n=!0}r=d;continue}if(p==='"'||p==="'"){f(p),r=h(r),i=!1;continue}if(p==="-"&&e[r+1]==="-"&&s===0&&(i||t.endsWith("("))){let m=kt(e,r),d=m;while(ke(e[d]))d+=1;if(e[d]===":"){let g=l(d+1,!i);n=!1,t+=e.slice(r,m)+":",t+=e.slice(d+1,g),r=g,i=!1;continue}}if(Pr(p)){let m=kt(e,r),d=e.slice(r,m),g=e[m]==="(";if(g&&Fr.test(d+"(")){f(d[0]),r=S(r,m),i=!1;continue}if(g&&Ir.test(d+"(")){f("("),t+=d+"(",a.push(!0),o+=1,r=m+1,i=!1;continue}f(d[0]),t+=d,r=m,i=!1;continue}if(p==="{"){f(p),t+=p,i=!0,r+=1;continue}if(p==="}"){f(p),t+=p,i=!1,r+=1;continue}if(p===";"){f(p),t+=p,i=!0,r+=1;continue}if(p==="("){f(p),t+=p,a.push(!1),r+=1,i=!1;continue}if(p===")"){if(f(p),t+=p,a.pop())o-=1;r+=1,i=!1;continue}if(p==="[")s+=1;else if(p==="]")s=Math.max(0,s-1);f(p),t+=p,r+=1,i=!1}return t.trimEnd()};var Ur=(e)=>{let t=Dt(e),r=Dt(t);if(r===t)throw Error(`save(): dir: "parent" cannot resolve for "${e}" because "${t}" is the filesystem root; pass an explicit dir instead.`);return{moduleDirectory:t,parentDirectory:r}},Bt=(e,t,r,n={})=>{let{dir:i,mapDir:s=[],mapName:a="index",minify:o=!0,shaker:f=[],include:h=[],name:S}=n,l=i==="parent"?Ur(e.path):void 0,p=l&&n.mapDir===void 0?[l.moduleDirectory]:s,m=j(r)?r:!!p,d=S??e.name,g=new je(e,f,h,e.onDiagnostic).load(m,t),y=b(i)?i:[l?l.parentDirectory:i],C=o?Et(g.css):g.css;y.forEach((v)=>{if(!v)return;let V=v.endsWith("/")?"":"/",A=`${v}${V}${d}.css`;be(v+V),we(A),Kr(A,C||"/* --------------*/")});let M=b(p)?p:[p];for(let v of M){if(!v)continue;let V=v.endsWith("/")?"":"/",A=`${v}${V}${a}.js`;be(v+V),we(A),Tt(A,g.CID)}return e};var se,_t;class Pt{static{se=Pe(void 0);Le(se,1,"med",_t,this);le(se,this)}path=(Fe(se,5,this),void 0);name;prefix;exportMap;onDiagnostic;mediaFeatures;_imported=new Set;save;constructor({__filename:e,name:t,prefix:r,shweets:n=[],exportMap:i,webkitKeyframes:s,mediaFeature:a={},unit:o="rem",onDiagnostic:f}){this.path=e,this.name=t||It(e),this.prefix=r??"",this.exportMap=i,this.onDiagnostic=f;let h=b(n)?n:[n];this.mediaFeatures=a;let S=dt(this.prefix,s,i,o,this.path);pt(S,h,this._imported),Object.assign(this,mt(S));let l=this;Object.assign(this,{get shweet(){return l}}),this.save=(p={})=>(Bt(this,this.mediaFeatures,i,p),this)}get imported(){return[...this._imported]}[(_t=[Ge],"med")](e,t){if(t)return new x(e,t);if(typeof e==="object")return new x(void 0,e);return new x(e,{})}}function It(e){return e.split("/").slice(-1)[0].split(".")[0]}var zr=(e,t)=>{for(let[r,[n,i]]of Object.entries(t)){e[r]=n;for(let[s,a]of Object.entries(i)){let o=s.startsWith("$")?s.slice(1):`${r}_${s}`;e[o]=a}}},Ft=(e,t,r)=>{for(let[n,i]of Object.entries(t)){let s=Array.isArray(i)?i:[i],a=[];for(let f of s)if(f instanceof ae)f.$(n,e);else a.push(f);let o=r?`${r}_${n}`:n;e[o]=a}};class ae{__;merge;constructor(e,t=!1){this.__=e;this.merge=t}$(e,t){Ft(t,this.__,this.merge?e:void 0)}}var Wr=(e)=>new ae(e),qr=(e)=>new ae(e,!0);export{te as Medyas,Pt as Shweet,c as Value,tr as Var,rr as Vars,Ft as X,Wr as XX,qr as XY,zr as Z,Ce as __,et as f,It as fileName,T as med,x as media,Je as ps,ir as supports,nr as v};
|
package/package.json
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shweet",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.38",
|
|
4
4
|
"description": "TypeScript-first CSS authoring: Proxy-based class, id, and selector declarations compiled to CSS with prefixing, media/supports conditions, keyframes, export maps, and optional minification.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"default": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./dist/*": "./dist/*",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
7
16
|
"files": [
|
|
8
17
|
"dist"
|
|
9
18
|
],
|
|
@@ -17,7 +26,14 @@
|
|
|
17
26
|
},
|
|
18
27
|
"keywords": [
|
|
19
28
|
"css",
|
|
20
|
-
"ts"
|
|
29
|
+
"css-in-ts",
|
|
30
|
+
"typescript",
|
|
31
|
+
"ts",
|
|
32
|
+
"compiler",
|
|
33
|
+
"styling",
|
|
34
|
+
"proxy",
|
|
35
|
+
"media-queries",
|
|
36
|
+
"keyframes"
|
|
21
37
|
],
|
|
22
38
|
"author": "MARKjotep",
|
|
23
39
|
"license": "MIT",
|