transform-to-unocss-core 0.0.45 → 0.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";var D=Object.defineProperty;var Yt=Object.getOwnPropertyDescriptor;var kt=Object.getOwnPropertyNames;var tr=Object.prototype.hasOwnProperty;var rr=(t,e)=>{for(var r in e)D(t,r,{get:e[r],enumerable:!0})},nr=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of kt(e))!tr.call(t,i)&&i!==r&&D(t,i,{get:()=>e[i],enumerable:!(n=Yt(e,i))||n.enumerable});return t};var er=t=>nr(D({},"__esModule",{value:!0}),t);var _r={};rr(_r,{browserReg:()=>T,commaReplacer:()=>x,cssMathFnRE:()=>q,diffTemplateStyle:()=>sr,flag:()=>ir,getFirstName:()=>$,getGradient:()=>k,getHundred:()=>I,getLastName:()=>h,getStyleScoped:()=>mr,getVal:()=>m,isCalc:()=>v,isColor:()=>lr,isCubicBezier:()=>F,isEmptyStyle:()=>ar,isHex:()=>_,isHsl:()=>V,isNot:()=>or,isPercent:()=>L,isRgb:()=>g,isSize:()=>Q,isUrl:()=>C,isVar:()=>w,joinEmpty:()=>J,joinWithLine:()=>R,joinWithUnderLine:()=>b,linearGradientReg:()=>N,linearGradientReg1:()=>X,numberWithUnitRE:()=>st,otherGradientReg:()=>Y,positionMap:()=>at,toUnocss:()=>z,toUnocssClass:()=>Xt,transformImportant:()=>s,transformStyleToUnocss:()=>O,transformStyleToUnocssPre:()=>K,trim:()=>Z});module.exports=er(_r);var ir=".__unocss_transfer__",q=/^(?:calc|clamp|min|max)\s*\(.*\)/,st=/^-?[0-9.]+(px|rem|em|%|vw|vh|vmin|vmax|deg)$/;function or(t){return/\[&:not\(/.test(t)}function v(t){return q.test(t)}function $(t){return t.split("-")[0]}function h(t){let e=t.split("-");return e[e.length-1]}function C(t){return t.startsWith("url(")}function L(t){return t.endsWith("%")&&!t.includes(" ")}function _(t){return/^#[0-9A-F]{2,}$/i.test(t)}function g(t){return t.startsWith("rgb")}function V(t){return t.startsWith("hsl")}function F(t){return t.startsWith("cubic-bezier")}function m(t,e,r,n=""){return v(t)||C(t)||_(t)||g(t)||V(t)||L(t)||w(t)||F(t)?r?`-[${n}${Z(t,"all").replace(/['"]/g,"")}]`:`="[${n}${Z(t,"all").replace(/['"]/g,"")}]"`:n?`-[${n}${e?e(t):t}]`:`-${e?e(t):t}`}function I(t){return typeof t=="string"&&t.endsWith("%")?t.slice(0,-1):+t*100}function R(t){return t.replace(/\s+/," ").split(" ").join("-")}function b(t){return t.replace(/\s+/," ").split(" ").join("_")}var at=["top","right","bottom","left","center"];function Z(t,e="around"){return e==="pre"?t.replace(/(^\s*)/g,""):e==="post"?t.replace(/(\s*$)/g,""):e==="all"?t.replace(/\s+/g,""):e==="around"?t.replace(/(^\s*)|(\s*$)/g,""):t}function s(t){return t=t.replace(/\s+/," ").replace(/\s*,\s*/g,",").replace(/\s*\/\s*/,"/"),/rgb/.test(t)&&(t=t.replace(/rgba?\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((i,o)=>i.endsWith(",")?i:i+(n.length-1===o?"":",")).join(""))})),/hsl/.test(t)&&(t=t.replace(/hsla?\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((i,o)=>i.endsWith(",")?i:i+(n.length-1===o?"":",")).join(""))})),/var\([^)]+\)/.test(t)&&(t=t.replace(/var\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((i,o)=>i.endsWith(",")?i:i+(n.length-1===o?"":",")).join(""))})),t.endsWith("!important")?[t.replace(/\s*!important/,"").trim(),"!"]:[t.trim(),""]}function sr(t,e){let r=t.match(/<style scoped>.*<\/style>/s),n=e.match(/<style scoped>.*<\/style>/s);return r[0]===n[0]}function ar(t){return/<style scoped>\s*<\/style>/.test(t)}function mr(t){let e=t.match(/<style scoped>(.*)<\/style>/s);return e?e[1]:""}function J(t){return t.replace(/\(\s*/g,"(").replace(/\s*\)/g,")").replace(/\s*,\s*/g,",")}function w(t){return t.startsWith("var(--")}function Q(t){return q.test(t)||st.test(t)||at.includes(t)}function lr(t){return _(t)||g(t)||V(t)}var T=/-webkit-|-moz-|-ms-|-o-/g,N=/linear-gradient\(\s*to([\w\s]+),?([\-\w()#%\s.]+)?,([\-\w()#%\s.]+)?,?([\-\w#%\s.]+)?\)$/,X=/linear-gradient\(\s*([^,]*),?([\-\w()#%\s.]+)?,([\-\w()#%\s.]+)?,?([\-\w#%\s.]+)?\)$/,Y=/(radial|conic)-gradient\(([\-\w()#%\s.]+)?,([\-\w()#%\s.]+)?,?([\-\w#%\s.]+)?\)$/,x="__comma__";function k(t){return t.startsWith("linear-gradient")?"linear":t.startsWith("radial-gradient")?"radial":t.startsWith("conic-gradient")?"conic":""}function mt(t,e){let[r,n]=s(e);return`${h(t)}-${h(r)}${n}`}function lt(t,e){let[r,n]=s(e);if(t==="animation-delay")return`animate-delay${m(r)}${n}`;if(t==="animation-duration")return`animate-duration${m(r)}${n}`;if(t==="animation-name")return`animate-[${r}]${n}`;if(t==="animation-timing-function")return`animate-ease-[${r}]${n}`;if(t==="animation-iteration-count")return`animate-count${m(r)}${n}`;if(t==="animation-direction")return`animate-direction-${r}${n}`;if(t==="animation-fill-mode")return`animate-fill-${r}${n}`;let i={running:"running",paused:"paused"};if(t==="animation-play-state")return r in i?`animate-${i[r]}${n}`:`animate-[${r}]${n}`;if(t==="animation"){let o=r.split(" "),a=[],l=0;for(let u=0;u<o.length;u++){let p=o[u];/^\d+(?:\.\d+)?s?$/.test(p)?(l===0?a.push(`animate-duration${m(p)}`):l===1?a.push(`animate-delay${m(p)}`):a.push(`animate-[${p}]`),l++):/^(?:linear|ease|ease-in|ease-out|ease-in-out|step-start|step-end)$/.test(p)?a.push(`animate-ease-[${p}]`):p.startsWith("cubic-bezier")||p.startsWith("steps")?a.push(`animate-ease-[${p}]`):["alternate","alternate-reverse","normal","reverse"].includes(p)?a.push(`animate-direction-${p}`):["forwards","backwards","both","none"].includes(p)?a.push(`animate-fill-${p}`):i[p]?a.push(`animate-${i[p]}`):p==="infinite"||/^\d+$/.test(p)?a.push(`animate-count${m(p)}`):p!=="normal"?a.push(`animate-[${p}]`):a.push(`animate-[${p}]`)}return a.length>0?a.join(" ")+n:""}return`animate-[${r}]${n}`}function pt(t,e){let[r,n]=s(e);return r==="auto"?`${$(t)}-${r}${n}`:`${$(t)}="[${r}]${n}"`}var pr=["box-shadow","drop-shadow"];function P(t,e){let[r,n]=s(e);if(t.startsWith("box-decoration"))return`box-decoration-${r}${n}`;if(t==="box-sizing")return`box-${$(r)}${n}`;if(pr.includes(t))return`shadow="[${r.split(" ").join("_")}]${n}"`}var cr=["contrast","brightness","saturate"],fr=["grayscale","invert","sepia"];function A(t,e){let[r,n]=s(e),[i,o,a]=r.match(/([\w-]+)\((.*)\)/);return cr.includes(o)?`${o}-${I(a)}${n}`:o==="drop-shadow"?`drop-${P(o,a)}${n}`:fr.includes(o)?`${o}-${a.endsWith("%")?a.slice(0,-1):I(a)}${n}`:o==="hue-rotate"?`${o}-${a.slice(0,-3)}${n}`:`${o}-${a}${n}`}function ct(t,e){let[r,n]=s(e);return`backdrop-${A(t,r)}${n}`}var ur=["background-color","background-attachment","background-position"];function rt(t,e){let[r,n]=s(e);if(t==="background-size")return`bg${m(r,/\d/.test(r)?dr:U,!1,"length:")}${n}`;if(ur.includes(t))return`bg${m(r,U)}${n}`;if(["background","background-image"].includes(t)){if(Q(r))return`bg${m(r,U,!1,"position:")}${n}`;let i=r.replace(/rgba?\([^)]+\)/g,"temp");if(/\)\s*,/.test(i))return`bg="[${hr(r)}]"`;if(r.startsWith("linear-gradient")){let l=r.replace(/rgba?\(([^)]+)\)/g,(c,f)=>c.replace(f,f.replace(/\s*,\s*/g,x))),u=l.match(N);if(u){let[c,f,d,M]=u.slice(1);return c=c.split(" ").map(S=>S[0]).join(""),c?`bg-gradient-to-${c}${tt(f,d,M)}`:tt(f,d,M)}let p=l.match(X);return p?`bg-gradient-linear bg-gradient-[${p[1]},${p[2].replace(/\s+/,"_").replaceAll(x,",")},${p[3].replace(/\s+/,"_").replaceAll(x,",")}]`:void 0}else if(/^(?:radial|conic)-gradient/.test(r)){let u=r.replace(/rgba?\(([^)]+)\)/g,(M,S)=>M.replace(S,S.replace(/\s*,\s*/g,x))).match(Y);if(!u)return;let p=u[1],[c,f,d]=u.slice(2);return`bg-gradient-${p}${tt(c,f,d)}`}let o=r.match(/^rgba?\([^)]+\)$/);if(o){let l=o[0];return`bg="${r.replace(l,`[${l}]`)}${n}"`}let a=r.match(/^url\(["'\s.\-\w/@]*\)$/);if(a)return`bg="${r.replace(a[0],`[${a[0].replace(/['"]/g,"")}]${n}`)}"`;if(r.includes(" ")){let l=r.split(" ").map(c=>rt(t,`${c}${n?" !important":""}`)).join(" "),u=/bg-\[position:([^\]]*)\]/g,p=l.match(u);if(p&&p.length>1){let c=`bg-[position:${p.map(f=>f.replace(u,"$1")).join("_")}]`;l=`${l.replace(u,"").replace(/\s+/g," ").split(" ").filter(Boolean).concat([c]).join(" ")}`}return l}return`bg${m(r,U)}${n}`}return t==="background-blend-mode"?`bg-blend-${r}${n}`:`${$r(t,r)}-${gr(r)}${n}`}function $r(t,e){return e.endsWith("repeat")?"bg":t.replace("background","bg")}function gr(t){return/border|content|padding-box/.test(t)?t.replace("-box",""):t.startsWith("repeat-")?t.replace("repeat-",""):U(t)}function U(t){return t.replace(/\s+/," ").replace(" ","-")}function dr(t){return t.replace(/\s+/," ").replace(" ","_")}function tt(t,e,r){let n="";if(e&&!r&&(r=e,e=""),t){t=t.replaceAll(x,",");let[i,o]=t.split(" ");o?n+=` from="${g(i)?`[${i}]`:i} ${o}"`:i&&(n+=` from="${g(i)?`[${i}]`:i}"`)}if(e){e=e.replaceAll(x,",");let[i,o]=e.split(" ");o?n+=` via="${g(i)?`[${i}]`:i} ${o}"`:i&&(n+=` via="${g(i)?`[${i}]`:i}"`)}if(r){r=r.replaceAll(x,",");let[i,o]=r.split(" ");o?n+=` to="${g(i)?`[${i}]`:i} ${o}"`:i&&(n+=` to="${g(i)?`[${i}]`:i}"`)}return n}var ft="__transform_to_unocss__";function hr(t){let e={},r=0;return t=t.replace(/(rgba?|hsla?|lab|lch|hwb|color)\(\)*\)/,n=>(e[r++]=n,`${ft}${r}}`)),t=t.split(/\)\s*,/).map(n=>`${n.replace(/\s*,\s*/g,",").replace(/\s+/g,"_")}`).join("),"),Object.keys(e).forEach(n=>{t=t.replace(`${ft}${n}}`,e[n])}),t}var ut=["border-top","border-right","border-bottom","border-left"];function $t(t,e){let[r,n]=s(e);if(t==="border-spacing")return`${t}="[${b(r)}]${n}"`;if(t==="border-color"){if(r.includes(" ")){let i=r.split(" ").length,o=r.split(" ").map(c=>_(c)||g(c)||V(c)?`-[${c}]`:`-${c}`),[a,l,u,p]=o;switch(i){case 2:return`border-y${a}${n} border-x${l}${n}`;case 3:return`border-t${a}${n} border-b${u}${n} border-x${l}${n}`;case 4:return`border-t${a}${n} border-b${u}${n} border-r${l}${n} border-l${p}${n}`}}return`border${m(r)}${n}`}return t==="border-radius"?v(r)||!r.includes(" ")?`border-rd${m(r)}${n}`:`border-rd="[${b(r)}]${n}"`:ut.some(i=>t.startsWith(i))?r.split(" ").map(i=>`border-${t.split("-")[1][0]}${m(i)}${n}`).join(" "):t==="border-inline-end-width"?`border-e${m(r)}${n}`:t==="border-inline-start-width"?`border-s${m(r)}${n}`:t.startsWith("border-image")?"":t==="border-width"&&r.includes(" ")?r.split(" ").map((i,o)=>`border-${ut[o].split("-")[1][0]}${m(i)}${n}`).join(" "):/^\d[%|(px)rem]$/.test(r)||t==="border-collapse"?`border-${r}${n}`:t==="border-width"||t==="border-style"?`border${m(r)}${n}`:t==="border-color"?r==="currentColor"?`border-current${n}`:`border${m(r)}${n}`:r.split(" ").map(i=>r==="currentColor"?`border-current${n}`:`border${m(i)}${n}`).join(" ")}function gt(t,e){let[r,n]=s(e);return`text${m(r)}${n}`}function dt(t,e){let[r,n]=s(e);return t==="column-gap"?`gap-x-${r}${n}`:`${t}-${r}${n}`}function ht(t,e){let[r,n]=s(e);return r==='" "'||r==="' '"?`content-['_']${n}`:`content-[${r.replace(/"/g,"'")}]${n}`}function bt(t,e){let[r,n]=s(e);return`${t}${m(r)}${n}`}function E(t,e){let[r,n]=s(e);return r==="none"?`hidden${n}`:r==="hidden"?`invisible${n}`:`${r}${n}`}var br={show:"visible",hide:"hidden"};function xt(t,e){var i;let[r,n]=s(e);return`table-empty-cells-${(i=br[r])!=null?i:r}${n}`}var xr=["flex-basis","flex-grow","flex-shrink"];function wt(t,e){let[r,n]=s(e);if(xr.includes(t))return`${h(t)}${m(r)}${n}`;if(r==="1")return`flex-1${n}`;let i=r[0];return t==="flex"&&(i==="0"||i==="1")?`flex="[${b(r)}]${n}"`:`${$(t)}-${r.replace("column","col")}${n}`}function W(t,e){let[r,n]=s(e);return`${t}-${r}${n}`}function jt(t,e){let[r,n]=s(e);if(t==="font-size")return`text-${r}${n}`;if(t==="font-weight")return`font-${r}${n}`;if(t==="font-family"){let i=r.match(/ui-(\w{0,4})/);if(!i)return`font-[${b(e)}]${n}`;let[o,a]=i;return`font-${a}${n}`}return t==="font-style"?r==="normal"?`font-not-italic${n}`:`font-${r}${n}`:t==="font-variant-numeric"?r==="normal"?`normal-nums${n}`:`${r}${n}`:`font="${wr(r)}${n}"`}function wr(t){return t.split(" ").map(e=>/^\d/.test(e)?`text-${e}`:e).join(" ")}function It(t,e){let[r,n]=s(e);if(t.startsWith("grid-template")){let o=r.match(/repeat\s*\(\s*(\d+)/);return o?`grid-${h(t)==="rows"?"rows":"cols"}-${o[1]}${n}`:`grid-${h(t)==="rows"?"rows":"cols"}-${r.includes(" ")?`[${b(r)}]`:r}${n}`}if(t==="grid-auto-flow")return`grid-flow-${R(r).replace("column","col")}${n}`;if(t.startsWith("grid-auto")){let o=r.match(/minmax\s*\(\s*0\s*,\s*1fr/);return`auto-${h(t)==="rows"?"rows":"cols"}-${o?"fr":$(r)}${n}`}let i=r.match(/span\s+(\d)/);return i?`${t.slice(5).replace("column","col")}-span-${i[1]}${n}`:r==="1/-1"?`${t.slice(5).replace("column","col")}-span-full${n}`:`${t.slice(5).replace("column","col")}-${r}${n}`}function Rt(t,e){let[r,n]=s(e);if(t==="inset-inline-start")return`start${m(r)}${n}`;if(t==="inset-inline-end")return`end${m(r)}${n}`}function Wt(t,e){let[r,n]=s(e);return e==="isolate"?`${r}${n}`:`${t}-${r}${n}`}function vt(t,e){let[r,n]=s(e);return t==="justify-content"?`justify-${h(r)}${n}`:`${t}-${h(r)}${n}`}function _t(t,e){let[r,n]=s(e);return`tracking-${r}${n}`}var Vt={1:"none",1.25:"tight",1.375:"snug",1.5:"normal",1.625:"relaxed",2:"loose"};function yt(t,e){let[r,n]=s(e);return r in Vt?`lh-${Vt[r]}${n}`:`lh${m(r,i=>/\d$/.test(i)?`[${i}]`:i)}${n}`}function j(t,e){let[r,n]=s(e);return`${$(t)}${m(r)}${n}`}var jr={"margin-left":"ml","margin-right":"mr","margin-top":"mt","margin-bottom":"mb","margin-inline-start":"ms","margin-inline-end":"me","padding-left":"pl","padding-right":"pr","padding-top":"pt","padding-bottom":"pb","padding-inline-start":"ps","padding-inline-end":"pe"};function nt(t,e){let[r,n]=s(e),i=jr[t];if(i)return`${i}${m(r)}${n}`;let o=r.split(" "),a=o.length;return a===1?`${t[0]}${m(o[0])}${n}`:a===2?`${t[0]}x${m(o[1])}${n} ${t[0]}y${m(o[0])}${n}`:a===3?`${t[0]}x${m(o[1])}${n} ${t[0]}t${m(o[0])}${n} ${t[0]}b${m(o[2])}${n}`:`${t[0]}t${m(o[0])}${n} ${t[0]}b${m(o[2])}${n} ${t[0]}l${m(o[3])}${n} ${t[0]}r${m(o[1])}${n}`}function Tt(t,e){let[r,n]=s(e);if(["mask-clip","mask-origin","mask-type"].includes(t))return`${n}${t}-${$(r)}`;if(["mask-mode","mask-composite"].includes(t))return`${n}${$(t)}-${$(r)}`;if(["mask-position","mask-size"].includes(t))return v(r)||C(r)||_(r)||g(r)||V(r)||L(r)||w(r)||F(r)?`${n}${t}${m(r)}`:`${n}${$(t)}-${R(r)}`;if(t==="mask-repeat")return`${n}${t}-${r}`;if(t==="mask-image"){let i=k(r);if(i){let a=r.replace(/rgba?\(([^)]+)\)/g,(f,d)=>f.replace(d,d.replace(/\s*,\s*/g,x))).match(N);if(!a)return;let[l,u,p,c]=a.slice(1);return l=l.split(" ").map(f=>f[0]).join(""),l?`${Lt(`mask-${l}`,u,p,c).trim()}`:Lt(`mask-${i}`,u,p,c).trim()}return`${n}mask${m(r)}`}return`${n}${t}${m(r)}`}function Lt(t,e,r,n){let i="";if(r&&!n&&(n=r,r=""),e){e=e.replaceAll(x,",");let[o,a]=e.split(" ");a?i+=` ${t}-from="${g(o)?`[${o}]`:o} ${a}"`:o&&(i+=` ${t}-from-${g(o)?`[${o}]`:o}`)}if(r){r=r.replaceAll(x,",");let[o,a]=r.split(" ");a?i+=` ${t}-via="${g(o)?`[${o}]`:o} ${a}"`:o&&(i+=` ${t}-via${g(o)?`[${o}]`:o}`)}if(n){n=n.replaceAll(x,",");let[o,a]=n.split(" ");a?i+=` ${t}-to="${g(o)?`[${o}]`:o} ${a}"`:o&&(i+=` ${t}-to-${g(o)?`[${o}]`:o}`)}return i}function et(t,e){let[r,n]=s(e),i=t.split("-"),o=v(r)||w(r)?m(r):m($(r));return`${i[0]}-${i[1][0]}${o}${n}`}function Nt(t,e){let[r,n]=s(e);return`mix-blend-${r}${n}`}function Ut(t,e){let[r,n]=s(e);return t==="object-position"?`${$(t)}-${R(r)}${n}`:`${$(t)}-${r}${n}`}function zt(t,e){let[r,n]=s(e);return L(e)?`op-${r.replace("%","")}${n}`:`op-${+r*100}${n}`}function Mt(t,e){let[r,n]=s(e);return t==="outline-offset"?`${t}-${r}${n}`:`${$(t)}-${r}${n}`}function G(t,e){let[r,n]=s(e);return t.startsWith("word-spacing")?`word-spacing${m(e)}${n}`:r==="keep-all"?`break-keep${n}`:r==="break-word"?`break-words${n}`:`break-${h(r)}${n}`}function St(t,e){let[r,n]=s(e);return t==="overflow-wrap"?G(t,e):`${t}-${r}${n}`}function Ct(t,e){let[r,n]=s(e),[i,o,a]=t.split("-");return a?`${i}-${a}-${r}${n}`:`${i}-${r}${n}`}function Ft(t,e){let[r,n]=s(e);return`${t}-${h(r)}${n}`}var Ir={vertical:"y",horizontal:"x"};function Pt(t,e){let[r,n]=s(e);return r==="both"?`${t}${n}`:`${t}-${Ir[r]||r}${n}`}function At(t,e){let[r,n]=s(e);return r.includes(" ")?`rotate-[${b(r)}]${n}`:`rotate${m(r)}${n}`}function Et(t,e){let[r,n]=s(e);return`gap-y-${r}${n}`}function Gt(t,e){let[r,n]=s(e);if(t.startsWith("scroll-snap"))return`snap-${r}${n}`;if(t==="scroll-behavior")return`scroll-${r}${n}`;let[i,o,a,l]=t.match(/scroll-(margin|padding)-?(\w+)?-?(\w+)?/);return a==="inline"&&l?`scroll-${o[0]}${l[0]}${m(r)}${n}`:a?`scroll-${o[0]}${a[0]}${m(r)}${n}`:`scroll-${o[0]}-${r}${n}`}function B(t,e){let[r,n]=s(e);return r.startsWith("-")?`-${t[0]}${m(r.slice(1),$)}${n}`:`${t[0]}${m(r,$)}${n}`}function Bt(t,e){let[r,n]=s(e);return t==="text-decoration-line"?r==="none"?`no-underline${n}`:`${r}${n}`:t==="text-transform"?r==="none"?`normal-case${n}`:`${r}${n}`:t.startsWith("text-decoration")||t==="text-indent"?`${t.split("-")[1]}${m(r)}${n}`:t==="text-underline-offset"?`underline-offset-${r}${n}`:`text-${r}${n}`}function y(t,e){let[r,n]=s(e);return`${t}${m(r)}${n}`}function Ht(t,e){let[r,n]=s(e);return t==="transform-origin"?`origin-${/\d/.test(r)&&r.includes(" ")?`[${b(r)}]`:R(r)}${n}`:t==="transform-style"?`transform-${r}${n}`:e==="none"?`${t}-none${n}`:J(r).split(" ").map(i=>{let o=i.match(/([a-z]+)(3d)?([A-Z])?\((.*)\)/);if(!o)return;let[a,l,u,p,c]=o;if(p){let f=c.replace(/,(?![^()]*\))/g," ").split(" ");return f.length>1?`${l}-${p.toLowerCase()}="${f.map(d=>w(d)?`[${d}]`:l==="scale"?I(d):H(d)).join(" ")}${n}"`:`${l}="${p.toLowerCase()}-${w(f[0])?`[${f[0]}]`:l==="scale"?I(f[0]):H(f[0])}${n}"`}else{let f=c.replace(/,(?![^()]*\))/g," ").split(" ");return f.length>1?l==="translate"?`${l}="[${f.join(",")}]"`:`${l}="${f.map(d=>w(d)?`[${d}]`:l==="scale"?I(d):H(d)).join(" ")}${n}"`:`${l}="${w(f[0])?`[${f[0]}]`:l==="scale"?I(f[0]):H(f[0])}${n}"`}}).filter(Boolean).join(" ")}function H(t){return t.endsWith("deg")?t.slice(0,-3):t}var Rr=["transition-delay","transition-duration"];function Kt(t,e){let[r,n]=s(e);if(t==="transition-timing-function")return r==="linear"?`ease-${r}${n}`:`ease="[${r}]${n}"`;if(t==="transition")return`transition="${Wr(r,n)}"`;if(t==="transition-property")return r.includes("color")?`transition-color${n}`:r==="box-shadow"?`transition-shadow${n}`:`transition-${r}${n}`;if(Rr.includes(t))return`${t.split("-")[1]}-${r.slice(0,-2)}${n}`}function Wr(t,e){let r=!1;return t.split(" ").map(n=>/^\d/.test(n)||/^\.\d/.test(n)?r?`delay${m(n,void 0,!0)}${e}`:(r=!0,`duration${m(n,void 0,!0)}${e}`):n==="background-color"?"colors":n).join(" ")}function Ot(t,e){let[r,n]=s(e);return`${h(t)}-${r}${n}`}function Dt(t,e){let[r,n]=s(e);return`v-${r}${n}`}function Zt(t,e){let[r,n]=s(e);return`whitespace-${r}${n}`}function qt(t,e){let[r,n]=s(e);return`${t}-${$(r)}${n}`}function Jt(t,e){let[r,n]=s(e);return e==="horizontal-tb"?`write-normal${n}`:`write-${r.replace("-rl","-right").replace("-lr","-left")}${n}`}var it={animation:lt,aspect:pt,backface:j,caption:j,column:dt,columns:W,break:W,empty:xt,box:P,writing:Jt,display:E,float:W,clear:W,isolation:Wt,object:Ut,overflow:St,overscroll:Ct,position:E,top:y,left:y,right:y,bottom:y,visibility:E,z:B,flex:wt,order:W,grid:It,gap:y,justify:vt,align:mt,place:Ft,padding:nt,perspective:W,margin:nt,width:B,min:et,max:et,height:B,font:jt,letter:_t,line:yt,list:j,text:Bt,mask:Tt,hyphens:y,vertical:Dt,white:Zt,word:G,content:ht,background:rt,rotate:At,border:$t,outline:Mt,opacity:zt,mix:Nt,filter:A,backdrop:ct,table:j,transition:Kt,transform:Ht,accent:j,appearance:j,cursor:bt,caret:j,pointer:W,resize:Pt,scroll:Gt,inset:Rt,touch:j,user:Ot,will:qt,fill:W,stroke:j,color:gt,row:Et},vr=/([\w-]+)\s*:\s*([^;]+)/;function z(t,e=!1){var u;t=t.replace(T,"");let r=t.match(vr);if(!r)return;let[n,i,o]=r,a=$(i),l=(u=it[a])==null?void 0:u.call(it,i,o);return l&&e?l.replace(/-([0-9.]+)px/,(p,c)=>`-${+c/4}`).replace(/\[[^\]]+\]/g,p=>p.replace(/([0-9.]+)px/g,(c,f)=>`${+f/16}rem`)):l}function ot(t){return e=>{let r=t.anyMatch||[],n=t.priority||[],i=null;if(r.length>0&&(i=r.find(c=>e[c.key]&&(c.pattern instanceof RegExp?c.pattern.test(e[c.key]):e[c.key]===c.pattern)),!i))return{transformedResult:"",deleteKeys:[]};let o="";if(r.length>0&&n.length>0)for(let c of n){let f=r.find(d=>d.key===c);if(f&&e[c]&&(f.pattern instanceof RegExp?f.pattern.test(e[c]):e[c]===f.pattern)){o=e[c];break}}let a={...t.allMatch},l=Object.keys(a);for(let c of l){let f=a[c];if(!(f instanceof RegExp?f.test(e[c]):e[c]===f))return{transformedResult:"",deleteKeys:[]}}let u=[...l,...r.map(c=>c.key)];return{transformedResult:typeof t.outputTemplate=="function"?t.outputTemplate(o):t.outputTemplate.replace("${value}",o),deleteKeys:u}}}var Qt={"line-clamp-${number}":ot({allMatch:{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical"},anyMatch:[{key:"-webkit-line-clamp",pattern:/\d/},{key:"line-clamp",pattern:/\d/}],priority:["line-clamp","-webkit-line-clamp"],outputTemplate:t=>`line-clamp-${t}`}),"line-clamp-${prop}":ot({allMatch:{overflow:"visible",display:"block","-webkit-box-orient":"horizontal"},anyMatch:[{key:"-webkit-line-clamp",pattern:/inherit|initial|revert|unset/},{key:"line-clamp",pattern:/inherit|initial|revert|unset/}],priority:["line-clamp","-webkit-line-clamp"],outputTemplate:t=>`line-clamp-${t}`}),truncate:ot({allMatch:{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},outputTemplate:()=>"truncate"})};function K(t){let e=[],r=t.split(";").reduce((n,i)=>{let[o,a]=i.split(":");return o.trim()&&a.trim()&&(n[o.trim()]=a.trim()),n},{});for(let n in Qt){let{transformedResult:i,deleteKeys:o}=Qt[n](r);i&&o.length&&(e.push(i),o.forEach(a=>{delete r[a]}))}return{transformedResult:e.join(" "),newStyle:Object.entries(r).map(([n,i])=>`${n}: ${i}`).join("; ")}}function O(t,e){let r=[],n=new Set,{newStyle:i,transformedResult:o}=K(t);return o?[[o,i.split(";").filter(Boolean).reduce((a,l)=>{let u=l.replaceAll(T,"").trim();if(n.has(u))return a;n.add(u);let p=z(l,e)||"";return p||r.push(l),a+=`${p} `},"").trim().replace(/\s+/g," ")].filter(Boolean).join(" "),r]:[t.split(";").filter(Boolean).reduce((a,l)=>{let u=l.replaceAll(T,"").trim();if(n.has(u))return a;n.add(u);let p=z(l,e)||"";return p||r.push(l),a+=`${p} `},"").trim().replace(/\s+/g," "),r]}function Xt(t,e=!1){let[r,n]=O(t,e);return[r?r.replace(/([^\s=]+)="([^"]+)"/g,(i,o,a)=>a.split(" ").map(l=>`${o}-${l}`).join(" ")):"",n]}0&&(module.exports={browserReg,commaReplacer,cssMathFnRE,diffTemplateStyle,flag,getFirstName,getGradient,getHundred,getLastName,getStyleScoped,getVal,isCalc,isColor,isCubicBezier,isEmptyStyle,isHex,isHsl,isNot,isPercent,isRgb,isSize,isUrl,isVar,joinEmpty,joinWithLine,joinWithUnderLine,linearGradientReg,linearGradientReg1,numberWithUnitRE,otherGradientReg,positionMap,toUnocss,toUnocssClass,transformImportant,transformStyleToUnocss,transformStyleToUnocssPre,trim});
package/dist/index.d.ts CHANGED
@@ -44,5 +44,10 @@ declare function isVar(s: string): boolean;
44
44
  declare function isSize(s: string): boolean;
45
45
  declare function isColor(s: string): boolean;
46
46
  declare const browserReg: RegExp;
47
+ declare const linearGradientReg: RegExp;
48
+ declare const linearGradientReg1: RegExp;
49
+ declare const otherGradientReg: RegExp;
50
+ declare const commaReplacer = "__comma__";
51
+ declare function getGradient(s: string): "" | "linear" | "radial" | "conic";
47
52
 
48
- export { TrimType, browserReg, cssMathFnRE, diffTemplateStyle, flag, getFirstName, getHundred, getLastName, getStyleScoped, getVal, isCalc, isColor, isCubicBezier, isEmptyStyle, isHex, isHsl, isNot, isPercent, isRgb, isSize, isUrl, isVar, joinEmpty, joinWithLine, joinWithUnderLine, numberWithUnitRE, positionMap, toUnocss, toUnocssClass, transformImportant, transformStyleToUnocss, transformStyleToUnocssPre, trim };
53
+ export { TrimType, browserReg, commaReplacer, cssMathFnRE, diffTemplateStyle, flag, getFirstName, getGradient, getHundred, getLastName, getStyleScoped, getVal, isCalc, isColor, isCubicBezier, isEmptyStyle, isHex, isHsl, isNot, isPercent, isRgb, isSize, isUrl, isVar, joinEmpty, joinWithLine, joinWithUnderLine, linearGradientReg, linearGradientReg1, numberWithUnitRE, otherGradientReg, positionMap, toUnocss, toUnocssClass, transformImportant, transformStyleToUnocss, transformStyleToUnocssPre, trim };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var H=Object.defineProperty;var Dt=Object.getOwnPropertyDescriptor;var Zt=Object.getOwnPropertyNames;var qt=Object.prototype.hasOwnProperty;var Jt=(t,e)=>{for(var r in e)H(t,r,{get:e[r],enumerable:!0})},Qt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Zt(e))!qt.call(t,o)&&o!==r&&H(t,o,{get:()=>e[o],enumerable:!(n=Dt(e,o))||n.enumerable});return t};var Xt=t=>Qt(H({},"__esModule",{value:!0}),t);var Wr={};Jt(Wr,{browserReg:()=>y,cssMathFnRE:()=>O,diffTemplateStyle:()=>tr,flag:()=>Yt,getFirstName:()=>$,getHundred:()=>w,getLastName:()=>g,getStyleScoped:()=>nr,getVal:()=>a,isCalc:()=>R,isColor:()=>er,isCubicBezier:()=>nt,isEmptyStyle:()=>rr,isHex:()=>V,isHsl:()=>T,isNot:()=>kt,isPercent:()=>S,isRgb:()=>b,isSize:()=>Z,isUrl:()=>rt,isVar:()=>j,joinEmpty:()=>D,joinWithLine:()=>W,joinWithUnderLine:()=>h,numberWithUnitRE:()=>tt,positionMap:()=>et,toUnocss:()=>N,toUnocssClass:()=>Ot,transformImportant:()=>i,transformStyleToUnocss:()=>K,transformStyleToUnocssPre:()=>B,trim:()=>G});module.exports=Xt(Wr);var Yt=".__unocss_transfer__",O=/^(?:calc|clamp|min|max)\s*\(.*\)/,tt=/^-?[0-9.]+(px|rem|em|%|vw|vh|vmin|vmax|deg)$/;function kt(t){return/\[&:not\(/.test(t)}function R(t){return O.test(t)}function $(t){return t.split("-")[0]}function g(t){let e=t.split("-");return e[e.length-1]}function rt(t){return t.startsWith("url(")}function S(t){return t.endsWith("%")&&!t.includes(" ")}function V(t){return/^#[0-9A-F]{2,}$/i.test(t)}function b(t){return t.startsWith("rgb")}function T(t){return t.startsWith("hsl")}function nt(t){return t.startsWith("cubic-bezier")}function a(t,e,r,n=""){return R(t)||rt(t)||V(t)||b(t)||T(t)||S(t)||j(t)||nt(t)?r?`-[${n}${G(t,"all").replace(/['"]/g,"")}]`:`="[${n}${G(t,"all").replace(/['"]/g,"")}]"`:n?`-[${n}${e?e(t):t}]`:`-${e?e(t):t}`}function w(t){return typeof t=="string"&&t.endsWith("%")?t.slice(0,-1):+t*100}function W(t){return t.replace(/\s+/," ").split(" ").join("-")}function h(t){return t.replace(/\s+/," ").split(" ").join("_")}var et=["top","right","bottom","left","center"];function G(t,e="around"){return e==="pre"?t.replace(/(^\s*)/g,""):e==="post"?t.replace(/(\s*$)/g,""):e==="all"?t.replace(/\s+/g,""):e==="around"?t.replace(/(^\s*)|(\s*$)/g,""):t}function i(t){return t=t.replace(/\s+/," ").replace(/\s*,\s*/g,",").replace(/\s*\/\s*/,"/"),/rgb/.test(t)&&(t=t.replace(/rgba?\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((o,s)=>o.endsWith(",")?o:o+(n.length-1===s?"":",")).join(""))})),/hsl/.test(t)&&(t=t.replace(/hsla?\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((o,s)=>o.endsWith(",")?o:o+(n.length-1===s?"":",")).join(""))})),/var\([^)]+\)/.test(t)&&(t=t.replace(/var\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((o,s)=>o.endsWith(",")?o:o+(n.length-1===s?"":",")).join(""))})),t.endsWith("!important")?[t.replace(/\s*!important/,"").trim(),"!"]:[t.trim(),""]}function tr(t,e){let r=t.match(/<style scoped>.*<\/style>/s),n=e.match(/<style scoped>.*<\/style>/s);return r[0]===n[0]}function rr(t){return/<style scoped>\s*<\/style>/.test(t)}function nr(t){let e=t.match(/<style scoped>(.*)<\/style>/s);return e?e[1]:""}function D(t){return t.replace(/\(\s*/g,"(").replace(/\s*\)/g,")").replace(/\s*,\s*/g,",")}function j(t){return t.startsWith("var(--")}function Z(t){return O.test(t)||tt.test(t)||et.includes(t)}function er(t){return V(t)||b(t)||T(t)}var y=/-webkit-|-moz-|-ms-|-o-/g;function ot(t,e){let[r,n]=i(e);return`${g(t)}-${g(r)}${n}`}function it(t,e){let[r,n]=i(e);if(t==="animation-delay")return`animate-delay${a(r)}${n}`;if(t==="animation-duration")return`animate-duration${a(r)}${n}`;if(t==="animation-name")return`animate-[${r}]${n}`;if(t==="animation-timing-function")return`animate-ease-[${r}]${n}`;if(t==="animation-iteration-count")return`animate-count${a(r)}${n}`;if(t==="animation-direction")return`animate-direction-${r}${n}`;if(t==="animation-fill-mode")return`animate-fill-${r}${n}`;let o={running:"running",paused:"paused"};if(t==="animation-play-state")return r in o?`animate-${o[r]}${n}`:`animate-[${r}]${n}`;if(t==="animation"){let s=r.split(" "),m=[],p=0;for(let u=0;u<s.length;u++){let l=s[u];/^\d+(?:\.\d+)?s?$/.test(l)?(p===0?m.push(`animate-duration${a(l)}`):p===1?m.push(`animate-delay${a(l)}`):m.push(`animate-[${l}]`),p++):/^(?:linear|ease|ease-in|ease-out|ease-in-out|step-start|step-end)$/.test(l)?m.push(`animate-ease-[${l}]`):l.startsWith("cubic-bezier")||l.startsWith("steps")?m.push(`animate-ease-[${l}]`):["alternate","alternate-reverse","normal","reverse"].includes(l)?m.push(`animate-direction-${l}`):["forwards","backwards","both","none"].includes(l)?m.push(`animate-fill-${l}`):o[l]?m.push(`animate-${o[l]}`):l==="infinite"||/^\d+$/.test(l)?m.push(`animate-count${a(l)}`):l!=="normal"?m.push(`animate-[${l}]`):m.push(`animate-[${l}]`)}return m.length>0?m.join(" ")+n:""}return`animate-[${r}]${n}`}function st(t,e){let[r,n]=i(e);return r==="auto"?`${$(t)}-${r}`:`${$(t)}="[${r}]${n}"`}var or=["box-shadow","drop-shadow"];function z(t,e){let[r,n]=i(e);if(t.startsWith("box-decoration"))return`box-decoration-${r}${n}`;if(t==="box-sizing")return`box-${$(r)}${n}`;if(or.includes(t))return`shadow="[${r.split(" ").join("_")}]${n}"`}var ir=["contrast","brightness","saturate"],sr=["grayscale","invert","sepia"];function F(t,e){let[r,n]=i(e),[o,s,m]=r.match(/([\w-]+)\((.*)\)/);return ir.includes(s)?`${s}-${w(m)}${n}`:s==="drop-shadow"?`drop-${z(s,m)}${n}`:sr.includes(s)?`${s}-${m.endsWith("%")?m.slice(0,-1):w(m)}${n}`:s==="hue-rotate"?`${s}-${m.slice(0,-3)}${n}`:`${s}-${m}${n}`}function at(t,e){let[r,n]=i(e);return`backdrop-${F(t,r)}${n}`}var ar=["background-color","background-attachment","background-position"],mr=/linear-gradient\(\s*to([\w\s]+),?([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,pr=/linear-gradient\(\s*([^,]*),?([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,lr=/(radial|conic)-gradient\(([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,v="__comma__";function J(t,e){let[r,n]=i(e);if(t==="background-size")return`bg${a(r,/\d/.test(r)?ur:L,!1,"length:")}${n}`;if(ar.includes(t))return`bg${a(r,L)}${n}`;if(["background","background-image"].includes(t)){if(Z(r))return`bg${a(r,L,!1,"position:")}${n}`;let o=r.replace(/rgba?\([^)]+\)/g,"temp");if(/\)\s*,/.test(o))return`bg="[${$r(r)}]"`;if(r.startsWith("linear-gradient")){let p=r.replace(/rgba?\(([^)]+)\)/g,(c,f)=>c.replace(f,f.replace(/\s*,\s*/g,v))),u=p.match(mr);if(u){let[c,f,d,U]=u.slice(1);return c=c.split(" ").map(M=>M[0]).join(""),c?`bg-gradient-to-${c}${q(f,d,U)}`:q(f,d,U)}let l=p.match(pr);return l?`bg-gradient-linear bg-gradient-[${l[1]},${l[2].replace(/\s+/,"_").replaceAll(v,",")},${l[3].replace(/\s+/,"_").replaceAll(v,",")}]`:void 0}else if(/^(?:radial|conic)-gradient/.test(r)){let u=r.replace(/rgba?\(([^)]+)\)/g,(U,M)=>U.replace(M,M.replace(/\s*,\s*/g,v))).match(lr);if(!u)return;let l=u[1],[c,f,d]=u.slice(2);return`bg-gradient-${l}${q(c,f,d)}`}let s=r.match(/^rgba?\([^)]+\)$/);if(s){let p=s[0];return`bg="${r.replace(p,`[${p}]`)}${n}"`}let m=r.match(/^url\(["'\s.\-\w/@]*\)$/);if(m)return`bg="${r.replace(m[0],`[${m[0].replace(/['"]/g,"")}]${n}`)}"`;if(r.includes(" ")){let p=r.split(" ").map(c=>J(t,`${c}${n?" !important":""}`)).join(" "),u=/bg-\[position:([^\]]*)\]/g,l=p.match(u);if(l&&l.length>1){let c=`bg-[position:${l.map(f=>f.replace(u,"$1")).join("_")}]`;p=`${p.replace(u,"").replace(/\s+/g," ").split(" ").filter(Boolean).concat([c]).join(" ")}`}return p}return`bg${a(r,L)}${n}`}return t==="background-blend-mode"?`bg-blend-${r}${n}`:`${cr(t,r)}-${fr(r)}${n}`}function cr(t,e){return e.endsWith("repeat")?"bg":t.replace("background","bg")}function fr(t){return/border|content|padding-box/.test(t)?t.replace("-box",""):t.startsWith("repeat-")?t.replace("repeat-",""):L(t)}function L(t){return t.replace(/\s+/," ").replace(" ","-")}function ur(t){return t.replace(/\s+/," ").replace(" ","_")}function q(t,e,r){let n="";if(e&&!r&&(r=e,e=""),t){t=t.replaceAll(v,",");let[o,s]=t.split(" ");s?n+=` from="${b(o)?`[${o}]`:o} ${s}"`:o&&(n+=` from="${b(o)?`[${o}]`:o}"`)}if(e){e=e.replaceAll(v,",");let[o,s]=e.split(" ");s?n+=` via="${b(o)?`[${o}]`:o} ${s}"`:o&&(n+=` via="${b(o)?`[${o}]`:o}"`)}if(r){r=r.replaceAll(v,",");let[o,s]=r.split(" ");s?n+=` to="${b(o)?`[${o}]`:o} ${s}"`:o&&(n+=` to="${b(o)?`[${o}]`:o}"`)}return n}var mt="__transform_to_unocss__";function $r(t){let e={},r=0;return t=t.replace(/(rgba?|hsla?|lab|lch|hwb|color)\(\)*\)/,n=>(e[r++]=n,`${mt}${r}}`)),t=t.split(/\)\s*,/).map(n=>`${n.replace(/\s*,\s*/g,",").replace(/\s+/g,"_")}`).join("),"),Object.keys(e).forEach(n=>{t=t.replace(`${mt}${n}}`,e[n])}),t}var pt=["border-top","border-right","border-bottom","border-left"];function lt(t,e){let[r,n]=i(e);if(t==="border-spacing")return`${t}="[${h(r)}]${n}"`;if(t==="border-color"){if(r.includes(" ")){let o=r.split(" ").length,s=r.split(" ").map(c=>V(c)||b(c)||T(c)?`-[${c}]`:`-${c}`),[m,p,u,l]=s;switch(o){case 2:return`border-y${m}${n} border-x${p}${n}`;case 3:return`border-t${m}${n} border-b${u}${n} border-x${p}${n}`;case 4:return`border-t${m}${n} border-b${u}${n} border-r${p}${n} border-l${l}${n}`}}return`border${a(r)}${n}`}return t==="border-radius"?R(r)||!r.includes(" ")?`border-rd${a(r)}${n}`:`border-rd="[${h(r)}]${n}"`:pt.some(o=>t.startsWith(o))?r.split(" ").map(o=>`border-${t.split("-")[1][0]}${a(o)}${n}`).join(" "):t==="border-inline-end-width"?`border-e${a(r)}${n}`:t==="border-inline-start-width"?`border-s${a(r)}${n}`:t.startsWith("border-image")?"":t==="border-width"&&r.includes(" ")?r.split(" ").map((o,s)=>`border-${pt[s].split("-")[1][0]}${a(o)}${n}`).join(" "):/^\d[%|(px)rem]$/.test(r)||t==="border-collapse"?`border-${r}${n}`:t==="border-width"||t==="border-style"?`border${a(r)}${n}`:t==="border-color"?r==="currentColor"?`border-current${n}`:`border${a(r)}${n}`:r.split(" ").map(o=>r==="currentColor"?`border-current${n}`:`border${a(o)}${n}`).join(" ")}function ct(t,e){let[r,n]=i(e);return`text${a(r)}${n}`}function ft(t,e){let[r,n]=i(e);return t==="column-gap"?`gap-x-${r}${n}`:`${t}-${r}${n}`}function ut(t,e){let[r,n]=i(e);return r==='" "'||r==="' '"?`content-['_']${n}`:`content-[${r.replace(/"/g,"'")}]${n}`}function $t(t,e){let[r,n]=i(e);return`${t}${a(r)}${n}`}function C(t,e){let[r,n]=i(e);return r==="none"?`hidden${n}`:r==="hidden"?`invisible${n}`:`${r}${n}`}var gr={show:"visible",hide:"hidden"};function gt(t,e){var o;let[r,n]=i(e);return`table-empty-cells-${(o=gr[r])!=null?o:r}${n}`}var dr=["flex-basis","flex-grow","flex-shrink"];function dt(t,e){let[r,n]=i(e);if(dr.includes(t))return`${g(t)}${a(r)}${n}`;if(r==="1")return`flex-1${n}`;let o=r[0];return t==="flex"&&(o==="0"||o==="1")?`flex="[${h(r)}]${n}"`:`${$(t)}-${r.replace("column","col")}${n}`}function I(t,e){let[r,n]=i(e);return`${t}-${r}${n}`}function ht(t,e){let[r,n]=i(e);if(t==="font-size")return`text-${r}${n}`;if(t==="font-weight")return`font-${r}${n}`;if(t==="font-family"){let o=r.match(/ui-(\w{0,4})/);if(!o)return`font-[${h(e)}]${n}`;let[s,m]=o;return`font-${m}${n}`}return t==="font-style"?r==="normal"?`font-not-italic${n}`:`font-${r}${n}`:t==="font-variant-numeric"?r==="normal"?`normal-nums${n}`:`${r}${n}`:`font="${hr(r)}${n}"`}function hr(t){return t.split(" ").map(e=>/^\d/.test(e)?`text-${e}`:e).join(" ")}function bt(t,e){let[r,n]=i(e);if(t.startsWith("grid-template")){let s=r.match(/repeat\s*\(\s*(\d+)/);return s?`grid-${g(t)==="rows"?"rows":"cols"}-${s[1]}${n}`:`grid-${g(t)==="rows"?"rows":"cols"}-${r.includes(" ")?`[${h(r)}]`:r}${n}`}if(t==="grid-auto-flow")return`grid-flow-${W(r).replace("column","col")}${n}`;if(t.startsWith("grid-auto")){let s=r.match(/minmax\s*\(\s*0\s*,\s*1fr/);return`auto-${g(t)==="rows"?"rows":"cols"}-${s?"fr":$(r)}${n}`}let o=r.match(/span\s+(\d)/);return o?`${t.slice(5).replace("column","col")}-span-${o[1]}${n}`:r==="1/-1"?`${t.slice(5).replace("column","col")}-span-full${n}`:`${t.slice(5).replace("column","col")}-${r}${n}`}function xt(t,e){let[r,n]=i(e);if(t==="inset-inline-start")return`start${a(r)}${n}`;if(t==="inset-inline-end")return`end${a(r)}${n}`}function wt(t,e){let[r,n]=i(e);return e==="isolate"?`${r}${n}`:`${t}-${r}${n}`}function jt(t,e){let[r,n]=i(e);return t==="justify-content"?`justify-${g(r)}${n}`:`${t}-${g(r)}${n}`}function It(t,e){let[r,n]=i(e);return`tracking-${r}${n}`}var Wt={1:"none",1.25:"tight",1.375:"snug",1.5:"normal",1.625:"relaxed",2:"loose"};function vt(t,e){let[r,n]=i(e);return r in Wt?`lh-${Wt[r]}${n}`:`lh${a(r,o=>/\d$/.test(o)?`[${o}]`:o)}${n}`}function x(t,e){let[r,n]=i(e);return`${$(t)}${a(r)}${n}`}var br={"margin-left":"ml","margin-right":"mr","margin-top":"mt","margin-bottom":"mb","margin-inline-start":"ms","margin-inline-end":"me","padding-left":"pl","padding-right":"pr","padding-top":"pt","padding-bottom":"pb","padding-inline-start":"ps","padding-inline-end":"pe"};function Q(t,e){let[r,n]=i(e),o=br[t];if(o)return`${o}${a(r)}${n}`;let s=r.split(" "),m=s.length;return m===1?`${t[0]}${a(s[0])}${n}`:m===2?`${t[0]}x${a(s[1])}${n} ${t[0]}y${a(s[0])}${n}`:m===3?`${t[0]}x${a(s[1])}${n} ${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n}`:`${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n} ${t[0]}l${a(s[3])}${n} ${t[0]}r${a(s[1])}${n}`}function X(t,e){let[r,n]=i(e),o=t.split("-"),s=R(r)||j(r)?a(r):a($(r));return`${o[0]}-${o[1][0]}${s}${n}`}function Rt(t,e){let[r,n]=i(e);return`mix-blend-${r}${n}`}function yt(t,e){let[r,n]=i(e);return t==="object-position"?`${$(t)}-${W(r)}${n}`:`${$(t)}-${r}${n}`}function _t(t,e){let[r,n]=i(e);return S(e)?`op-${r.replace("%","")}${n}`:`op-${+r*100}${n}`}function Vt(t,e){let[r,n]=i(e);return t==="outline-offset"?`${t}-${r}${n}`:`${$(t)}-${r}${n}`}function A(t,e){let[r,n]=i(e);return t.startsWith("word-spacing")?`word-spacing${a(e)}`:r==="keep-all"?`break-keep${n}`:r==="break-word"?`break-words${n}`:`break-${g(r)}${n}`}function Tt(t,e){let[r,n]=i(e);return t==="overflow-wrap"?A(t,e):`${t}-${r}${n}`}function Lt(t,e){let[r,n]=i(e),[o,s,m]=t.split("-");return m?`${o}-${m}-${r}${n}`:`${o}-${r}${n}`}function Nt(t,e){let[r,n]=i(e);return`${t}-${g(r)}${n}`}var xr={vertical:"y",horizontal:"x"};function Ut(t,e){let[r,n]=i(e);return r==="both"?`${t}${n}`:`${t}-${xr[r]||r}${n}`}function Mt(t,e){let[r,n]=i(e);return r.includes(" ")?`rotate-[${h(r)}]${n}`:`rotate${a(r)}${n}`}function St(t,e){let[r,n]=i(e);return`gap-y-${r}${n}`}function zt(t,e){let[r,n]=i(e);if(t.startsWith("scroll-snap"))return`snap-${r}${n}`;if(t==="scroll-behavior")return`scroll-${r}${n}`;let[o,s,m,p]=t.match(/scroll-(margin|padding)-?(\w+)?-?(\w+)?/);return m==="inline"&&p?`scroll-${s[0]}${p[0]}-${r}${n}`:m?`scroll-${s[0]}${m[0]}-${r}${n}`:`scroll-${s[0]}-${r}${n}`}function P(t,e){let[r,n]=i(e);return r.startsWith("-")?`-${t[0]}${a(r.slice(1),$)}${n}`:`${t[0]}${a(r,$)}${n}`}function Ft(t,e){let[r,n]=i(e);return t==="text-decoration-line"?r==="none"?`no-underline${n}`:`${r}${n}`:t==="text-transform"?r==="none"?`normal-case${n}`:`${r}${n}`:t.startsWith("text-decoration")||t==="text-indent"?`${t.split("-")[1]}${a(r)}${n}`:t==="text-underline-offset"?`underline-offset-${r}${n}`:`text-${r}${n}`}function _(t,e){let[r,n]=i(e);return`${t}${a(r)}${n}`}function Ct(t,e){let[r,n]=i(e);return t==="transform-origin"?`origin-${/\d/.test(r)&&r.includes(" ")?`[${h(r)}]`:W(r)}${n}`:t==="transform-style"?`transform-${r}`:e==="none"?`${t}-none`:D(r).split(" ").map(o=>{let s=o.match(/([a-z]+)(3d)?([A-Z])?\((.*)\)/);if(!s)return;let[m,p,u,l,c]=s;if(l){let f=c.replace(/,(?![^()]*\))/g," ").split(" ");return f.length>1?`${p}-${l.toLowerCase()}="${f.map(d=>j(d)?`[${d}]`:p==="scale"?w(d):E(d)).join(" ")}${n}"`:`${p}="${l.toLowerCase()}-${j(f[0])?`[${f[0]}]`:p==="scale"?w(f[0]):E(f[0])}${n}"`}else{let f=c.replace(/,(?![^()]*\))/g," ").split(" ");return f.length>1?p==="translate"?`${p}="[${f.join(",")}]"`:`${p}="${f.map(d=>j(d)?`[${d}]`:p==="scale"?w(d):E(d)).join(" ")}${n}"`:`${p}="${j(f[0])?`[${f[0]}]`:p==="scale"?w(f[0]):E(f[0])}${n}"`}}).filter(Boolean).join(" ")}function E(t){return t.endsWith("deg")?t.slice(0,-3):t}var wr=["transition-delay","transition-duration"];function At(t,e){let[r,n]=i(e);if(t==="transition-timing-function")return r==="linear"?`ease-${r}${n}`:`ease="[${r}]${n}"`;if(t==="transition")return`transition="${jr(r,n)}"`;if(t==="transition-property")return r.includes("color")?`transition-color${n}`:r==="box-shadow"?`transition-shadow${n}`:`transition-${r}${n}`;if(wr.includes(t))return`${t.split("-")[1]}-${r.slice(0,-2)}`}function jr(t,e){let r=!1;return t.split(" ").map(n=>/^\d/.test(n)||/^\.\d/.test(n)?r?`delay${a(n,void 0,!0)}${e}`:(r=!0,`duration${a(n,void 0,!0)}${e}`):n==="background-color"?"colors":n).join(" ")}function Pt(t,e){let[r,n]=i(e);return`${g(t)}-${r}${n}`}function Et(t,e){let[r,n]=i(e);return`v-${r}${n}`}function Bt(t,e){let[r,n]=i(e);return`whitespace-${r}${n}`}function Kt(t,e){let[r,n]=i(e);return`${t}-${$(r)}${n}`}function Ht(t,e){return e==="horizontal-tb"?"write-normal":`write-${e.replace("-rl","-right").replace("-lr","-left")}`}var Y={animation:it,aspect:st,backface:x,caption:x,column:ft,columns:I,break:I,empty:gt,box:z,writing:Ht,display:C,float:I,clear:I,isolation:wt,object:yt,overflow:Tt,overscroll:Lt,position:C,top:_,left:_,right:_,bottom:_,visibility:C,z:P,flex:dt,order:I,grid:bt,gap:_,justify:jt,align:ot,place:Nt,padding:Q,perspective:I,margin:Q,width:P,min:X,max:X,height:P,font:ht,letter:It,line:vt,list:x,text:Ft,vertical:Et,white:Bt,word:A,content:ut,background:J,rotate:Mt,border:lt,outline:Vt,opacity:_t,mix:Rt,filter:F,backdrop:at,table:x,transition:At,transform:Ct,accent:x,appearance:x,cursor:$t,caret:x,pointer:I,resize:Ut,scroll:zt,inset:xt,touch:x,user:Pt,will:Kt,fill:I,stroke:x,color:ct,row:St},Ir=/([\w-]+)\s*:\s*([^;]+)/;function N(t,e=!1){var u;t=t.replace(y,"");let r=t.match(Ir);if(!r)return;let[n,o,s]=r,m=$(o),p=(u=Y[m])==null?void 0:u.call(Y,o,s);return p&&e?p.replace(/-([0-9.]+)px/,(l,c)=>`-${+c/4}`).replace(/\[[^\]]+\]/g,l=>l.replace(/([0-9.]+)px/g,(c,f)=>`${+f/16}rem`)):p}function k(t){return e=>{let r=t.anyMatch||[],n=t.priority||[],o=null;if(r.length>0&&(o=r.find(c=>e[c.key]&&(c.pattern instanceof RegExp?c.pattern.test(e[c.key]):e[c.key]===c.pattern)),!o))return{transformedResult:"",deleteKeys:[]};let s="";if(r.length>0&&n.length>0)for(let c of n){let f=r.find(d=>d.key===c);if(f&&e[c]&&(f.pattern instanceof RegExp?f.pattern.test(e[c]):e[c]===f.pattern)){s=e[c];break}}let m={...t.allMatch},p=Object.keys(m);for(let c of p){let f=m[c];if(!(f instanceof RegExp?f.test(e[c]):e[c]===f))return{transformedResult:"",deleteKeys:[]}}let u=[...p,...r.map(c=>c.key)];return{transformedResult:typeof t.outputTemplate=="function"?t.outputTemplate(s):t.outputTemplate.replace("${value}",s),deleteKeys:u}}}var Gt={"line-clamp-${number}":k({allMatch:{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical"},anyMatch:[{key:"-webkit-line-clamp",pattern:/\d/},{key:"line-clamp",pattern:/\d/}],priority:["line-clamp","-webkit-line-clamp"],outputTemplate:t=>`line-clamp-${t}`}),"line-clamp-${prop}":k({allMatch:{overflow:"visible",display:"block","-webkit-box-orient":"horizontal"},anyMatch:[{key:"-webkit-line-clamp",pattern:/inherit|initial|revert|unset/},{key:"line-clamp",pattern:/inherit|initial|revert|unset/}],priority:["line-clamp","-webkit-line-clamp"],outputTemplate:t=>`line-clamp-${t}`}),truncate:k({allMatch:{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},outputTemplate:()=>"truncate"})};function B(t){let e=[],r=t.split(";").reduce((n,o)=>{let[s,m]=o.split(":");return s.trim()&&m.trim()&&(n[s.trim()]=m.trim()),n},{});for(let n in Gt){let{transformedResult:o,deleteKeys:s}=Gt[n](r);o&&s.length&&(e.push(o),s.forEach(m=>{delete r[m]}))}return{transformedResult:e.join(" "),newStyle:Object.entries(r).map(([n,o])=>`${n}: ${o}`).join("; ")}}function K(t,e){let r=[],n=new Set,{newStyle:o,transformedResult:s}=B(t);return s?[[s,o.split(";").filter(Boolean).reduce((m,p)=>{let u=p.replaceAll(y,"").trim();if(n.has(u))return m;n.add(u);let l=N(p,e)||"";return l||r.push(p),m+=`${l} `},"").trim().replace(/\s+/g," ")].filter(Boolean).join(" "),r]:[t.split(";").filter(Boolean).reduce((m,p)=>{let u=p.replaceAll(y,"").trim();if(n.has(u))return m;n.add(u);let l=N(p,e)||"";return l||r.push(p),m+=`${l} `},"").trim().replace(/\s+/g," "),r]}function Ot(t,e=!1){let[r,n]=K(t,e);return[r?r.replace(/([^\s=]+)="([^"]+)"/g,(o,s,m)=>m.split(" ").map(p=>`${s}-${p}`).join(" ")):"",n]}0&&(module.exports={browserReg,cssMathFnRE,diffTemplateStyle,flag,getFirstName,getHundred,getLastName,getStyleScoped,getVal,isCalc,isColor,isCubicBezier,isEmptyStyle,isHex,isHsl,isNot,isPercent,isRgb,isSize,isUrl,isVar,joinEmpty,joinWithLine,joinWithUnderLine,numberWithUnitRE,positionMap,toUnocss,toUnocssClass,transformImportant,transformStyleToUnocss,transformStyleToUnocssPre,trim});
1
+ var ur=".__unocss_transfer__",k=/^(?:calc|clamp|min|max)\s*\(.*\)/,qt=/^-?[0-9.]+(px|rem|em|%|vw|vh|vmin|vmax|deg)$/;function $r(t){return/\[&:not\(/.test(t)}function v(t){return k.test(t)}function $(t){return t.split("-")[0]}function h(t){let e=t.split("-");return e[e.length-1]}function B(t){return t.startsWith("url(")}function L(t){return t.endsWith("%")&&!t.includes(" ")}function V(t){return/^#[0-9A-F]{2,}$/i.test(t)}function d(t){return t.startsWith("rgb")}function y(t){return t.startsWith("hsl")}function H(t){return t.startsWith("cubic-bezier")}function m(t,e,r,n=""){return v(t)||B(t)||V(t)||d(t)||y(t)||L(t)||w(t)||H(t)?r?`-[${n}${Y(t,"all").replace(/['"]/g,"")}]`:`="[${n}${Y(t,"all").replace(/['"]/g,"")}]"`:n?`-[${n}${e?e(t):t}]`:`-${e?e(t):t}`}function R(t){return typeof t=="string"&&t.endsWith("%")?t.slice(0,-1):+t*100}function W(t){return t.replace(/\s+/," ").split(" ").join("-")}function b(t){return t.replace(/\s+/," ").split(" ").join("_")}var Jt=["top","right","bottom","left","center"];function Y(t,e="around"){return e==="pre"?t.replace(/(^\s*)/g,""):e==="post"?t.replace(/(\s*$)/g,""):e==="all"?t.replace(/\s+/g,""):e==="around"?t.replace(/(^\s*)|(\s*$)/g,""):t}function s(t){return t=t.replace(/\s+/," ").replace(/\s*,\s*/g,",").replace(/\s*\/\s*/,"/"),/rgb/.test(t)&&(t=t.replace(/rgba?\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((i,o)=>i.endsWith(",")?i:i+(n.length-1===o?"":",")).join(""))})),/hsl/.test(t)&&(t=t.replace(/hsla?\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((i,o)=>i.endsWith(",")?i:i+(n.length-1===o?"":",")).join(""))})),/var\([^)]+\)/.test(t)&&(t=t.replace(/var\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((i,o)=>i.endsWith(",")?i:i+(n.length-1===o?"":",")).join(""))})),t.endsWith("!important")?[t.replace(/\s*!important/,"").trim(),"!"]:[t.trim(),""]}function gr(t,e){let r=t.match(/<style scoped>.*<\/style>/s),n=e.match(/<style scoped>.*<\/style>/s);return r[0]===n[0]}function dr(t){return/<style scoped>\s*<\/style>/.test(t)}function hr(t){let e=t.match(/<style scoped>(.*)<\/style>/s);return e?e[1]:""}function tt(t){return t.replace(/\(\s*/g,"(").replace(/\s*\)/g,")").replace(/\s*,\s*/g,",")}function w(t){return t.startsWith("var(--")}function rt(t){return k.test(t)||qt.test(t)||Jt.includes(t)}function br(t){return V(t)||d(t)||y(t)}var T=/-webkit-|-moz-|-ms-|-o-/g,M=/linear-gradient\(\s*to([\w\s]+),?([\-\w()#%\s.]+)?,([\-\w()#%\s.]+)?,?([\-\w#%\s.]+)?\)$/,nt=/linear-gradient\(\s*([^,]*),?([\-\w()#%\s.]+)?,([\-\w()#%\s.]+)?,?([\-\w#%\s.]+)?\)$/,et=/(radial|conic)-gradient\(([\-\w()#%\s.]+)?,([\-\w()#%\s.]+)?,?([\-\w#%\s.]+)?\)$/,x="__comma__";function it(t){return t.startsWith("linear-gradient")?"linear":t.startsWith("radial-gradient")?"radial":t.startsWith("conic-gradient")?"conic":""}function ot(t,e){let[r,n]=s(e);return`${h(t)}-${h(r)}${n}`}function st(t,e){let[r,n]=s(e);if(t==="animation-delay")return`animate-delay${m(r)}${n}`;if(t==="animation-duration")return`animate-duration${m(r)}${n}`;if(t==="animation-name")return`animate-[${r}]${n}`;if(t==="animation-timing-function")return`animate-ease-[${r}]${n}`;if(t==="animation-iteration-count")return`animate-count${m(r)}${n}`;if(t==="animation-direction")return`animate-direction-${r}${n}`;if(t==="animation-fill-mode")return`animate-fill-${r}${n}`;let i={running:"running",paused:"paused"};if(t==="animation-play-state")return r in i?`animate-${i[r]}${n}`:`animate-[${r}]${n}`;if(t==="animation"){let o=r.split(" "),a=[],l=0;for(let u=0;u<o.length;u++){let p=o[u];/^\d+(?:\.\d+)?s?$/.test(p)?(l===0?a.push(`animate-duration${m(p)}`):l===1?a.push(`animate-delay${m(p)}`):a.push(`animate-[${p}]`),l++):/^(?:linear|ease|ease-in|ease-out|ease-in-out|step-start|step-end)$/.test(p)?a.push(`animate-ease-[${p}]`):p.startsWith("cubic-bezier")||p.startsWith("steps")?a.push(`animate-ease-[${p}]`):["alternate","alternate-reverse","normal","reverse"].includes(p)?a.push(`animate-direction-${p}`):["forwards","backwards","both","none"].includes(p)?a.push(`animate-fill-${p}`):i[p]?a.push(`animate-${i[p]}`):p==="infinite"||/^\d+$/.test(p)?a.push(`animate-count${m(p)}`):p!=="normal"?a.push(`animate-[${p}]`):a.push(`animate-[${p}]`)}return a.length>0?a.join(" ")+n:""}return`animate-[${r}]${n}`}function at(t,e){let[r,n]=s(e);return r==="auto"?`${$(t)}-${r}${n}`:`${$(t)}="[${r}]${n}"`}var Qt=["box-shadow","drop-shadow"];function S(t,e){let[r,n]=s(e);if(t.startsWith("box-decoration"))return`box-decoration-${r}${n}`;if(t==="box-sizing")return`box-${$(r)}${n}`;if(Qt.includes(t))return`shadow="[${r.split(" ").join("_")}]${n}"`}var Xt=["contrast","brightness","saturate"],Yt=["grayscale","invert","sepia"];function C(t,e){let[r,n]=s(e),[i,o,a]=r.match(/([\w-]+)\((.*)\)/);return Xt.includes(o)?`${o}-${R(a)}${n}`:o==="drop-shadow"?`drop-${S(o,a)}${n}`:Yt.includes(o)?`${o}-${a.endsWith("%")?a.slice(0,-1):R(a)}${n}`:o==="hue-rotate"?`${o}-${a.slice(0,-3)}${n}`:`${o}-${a}${n}`}function mt(t,e){let[r,n]=s(e);return`backdrop-${C(t,r)}${n}`}var kt=["background-color","background-attachment","background-position"];function O(t,e){let[r,n]=s(e);if(t==="background-size")return`bg${m(r,/\d/.test(r)?nr:N,!1,"length:")}${n}`;if(kt.includes(t))return`bg${m(r,N)}${n}`;if(["background","background-image"].includes(t)){if(rt(r))return`bg${m(r,N,!1,"position:")}${n}`;let i=r.replace(/rgba?\([^)]+\)/g,"temp");if(/\)\s*,/.test(i))return`bg="[${er(r)}]"`;if(r.startsWith("linear-gradient")){let l=r.replace(/rgba?\(([^)]+)\)/g,(c,f)=>c.replace(f,f.replace(/\s*,\s*/g,x))),u=l.match(M);if(u){let[c,f,g,U]=u.slice(1);return c=c.split(" ").map(z=>z[0]).join(""),c?`bg-gradient-to-${c}${K(f,g,U)}`:K(f,g,U)}let p=l.match(nt);return p?`bg-gradient-linear bg-gradient-[${p[1]},${p[2].replace(/\s+/,"_").replaceAll(x,",")},${p[3].replace(/\s+/,"_").replaceAll(x,",")}]`:void 0}else if(/^(?:radial|conic)-gradient/.test(r)){let u=r.replace(/rgba?\(([^)]+)\)/g,(U,z)=>U.replace(z,z.replace(/\s*,\s*/g,x))).match(et);if(!u)return;let p=u[1],[c,f,g]=u.slice(2);return`bg-gradient-${p}${K(c,f,g)}`}let o=r.match(/^rgba?\([^)]+\)$/);if(o){let l=o[0];return`bg="${r.replace(l,`[${l}]`)}${n}"`}let a=r.match(/^url\(["'\s.\-\w/@]*\)$/);if(a)return`bg="${r.replace(a[0],`[${a[0].replace(/['"]/g,"")}]${n}`)}"`;if(r.includes(" ")){let l=r.split(" ").map(c=>O(t,`${c}${n?" !important":""}`)).join(" "),u=/bg-\[position:([^\]]*)\]/g,p=l.match(u);if(p&&p.length>1){let c=`bg-[position:${p.map(f=>f.replace(u,"$1")).join("_")}]`;l=`${l.replace(u,"").replace(/\s+/g," ").split(" ").filter(Boolean).concat([c]).join(" ")}`}return l}return`bg${m(r,N)}${n}`}return t==="background-blend-mode"?`bg-blend-${r}${n}`:`${tr(t,r)}-${rr(r)}${n}`}function tr(t,e){return e.endsWith("repeat")?"bg":t.replace("background","bg")}function rr(t){return/border|content|padding-box/.test(t)?t.replace("-box",""):t.startsWith("repeat-")?t.replace("repeat-",""):N(t)}function N(t){return t.replace(/\s+/," ").replace(" ","-")}function nr(t){return t.replace(/\s+/," ").replace(" ","_")}function K(t,e,r){let n="";if(e&&!r&&(r=e,e=""),t){t=t.replaceAll(x,",");let[i,o]=t.split(" ");o?n+=` from="${d(i)?`[${i}]`:i} ${o}"`:i&&(n+=` from="${d(i)?`[${i}]`:i}"`)}if(e){e=e.replaceAll(x,",");let[i,o]=e.split(" ");o?n+=` via="${d(i)?`[${i}]`:i} ${o}"`:i&&(n+=` via="${d(i)?`[${i}]`:i}"`)}if(r){r=r.replaceAll(x,",");let[i,o]=r.split(" ");o?n+=` to="${d(i)?`[${i}]`:i} ${o}"`:i&&(n+=` to="${d(i)?`[${i}]`:i}"`)}return n}var lt="__transform_to_unocss__";function er(t){let e={},r=0;return t=t.replace(/(rgba?|hsla?|lab|lch|hwb|color)\(\)*\)/,n=>(e[r++]=n,`${lt}${r}}`)),t=t.split(/\)\s*,/).map(n=>`${n.replace(/\s*,\s*/g,",").replace(/\s+/g,"_")}`).join("),"),Object.keys(e).forEach(n=>{t=t.replace(`${lt}${n}}`,e[n])}),t}var pt=["border-top","border-right","border-bottom","border-left"];function ct(t,e){let[r,n]=s(e);if(t==="border-spacing")return`${t}="[${b(r)}]${n}"`;if(t==="border-color"){if(r.includes(" ")){let i=r.split(" ").length,o=r.split(" ").map(c=>V(c)||d(c)||y(c)?`-[${c}]`:`-${c}`),[a,l,u,p]=o;switch(i){case 2:return`border-y${a}${n} border-x${l}${n}`;case 3:return`border-t${a}${n} border-b${u}${n} border-x${l}${n}`;case 4:return`border-t${a}${n} border-b${u}${n} border-r${l}${n} border-l${p}${n}`}}return`border${m(r)}${n}`}return t==="border-radius"?v(r)||!r.includes(" ")?`border-rd${m(r)}${n}`:`border-rd="[${b(r)}]${n}"`:pt.some(i=>t.startsWith(i))?r.split(" ").map(i=>`border-${t.split("-")[1][0]}${m(i)}${n}`).join(" "):t==="border-inline-end-width"?`border-e${m(r)}${n}`:t==="border-inline-start-width"?`border-s${m(r)}${n}`:t.startsWith("border-image")?"":t==="border-width"&&r.includes(" ")?r.split(" ").map((i,o)=>`border-${pt[o].split("-")[1][0]}${m(i)}${n}`).join(" "):/^\d[%|(px)rem]$/.test(r)||t==="border-collapse"?`border-${r}${n}`:t==="border-width"||t==="border-style"?`border${m(r)}${n}`:t==="border-color"?r==="currentColor"?`border-current${n}`:`border${m(r)}${n}`:r.split(" ").map(i=>r==="currentColor"?`border-current${n}`:`border${m(i)}${n}`).join(" ")}function ft(t,e){let[r,n]=s(e);return`text${m(r)}${n}`}function ut(t,e){let[r,n]=s(e);return t==="column-gap"?`gap-x-${r}${n}`:`${t}-${r}${n}`}function $t(t,e){let[r,n]=s(e);return r==='" "'||r==="' '"?`content-['_']${n}`:`content-[${r.replace(/"/g,"'")}]${n}`}function gt(t,e){let[r,n]=s(e);return`${t}${m(r)}${n}`}function F(t,e){let[r,n]=s(e);return r==="none"?`hidden${n}`:r==="hidden"?`invisible${n}`:`${r}${n}`}var ir={show:"visible",hide:"hidden"};function dt(t,e){var i;let[r,n]=s(e);return`table-empty-cells-${(i=ir[r])!=null?i:r}${n}`}var or=["flex-basis","flex-grow","flex-shrink"];function ht(t,e){let[r,n]=s(e);if(or.includes(t))return`${h(t)}${m(r)}${n}`;if(r==="1")return`flex-1${n}`;let i=r[0];return t==="flex"&&(i==="0"||i==="1")?`flex="[${b(r)}]${n}"`:`${$(t)}-${r.replace("column","col")}${n}`}function I(t,e){let[r,n]=s(e);return`${t}-${r}${n}`}function bt(t,e){let[r,n]=s(e);if(t==="font-size")return`text-${r}${n}`;if(t==="font-weight")return`font-${r}${n}`;if(t==="font-family"){let i=r.match(/ui-(\w{0,4})/);if(!i)return`font-[${b(e)}]${n}`;let[o,a]=i;return`font-${a}${n}`}return t==="font-style"?r==="normal"?`font-not-italic${n}`:`font-${r}${n}`:t==="font-variant-numeric"?r==="normal"?`normal-nums${n}`:`${r}${n}`:`font="${sr(r)}${n}"`}function sr(t){return t.split(" ").map(e=>/^\d/.test(e)?`text-${e}`:e).join(" ")}function xt(t,e){let[r,n]=s(e);if(t.startsWith("grid-template")){let o=r.match(/repeat\s*\(\s*(\d+)/);return o?`grid-${h(t)==="rows"?"rows":"cols"}-${o[1]}${n}`:`grid-${h(t)==="rows"?"rows":"cols"}-${r.includes(" ")?`[${b(r)}]`:r}${n}`}if(t==="grid-auto-flow")return`grid-flow-${W(r).replace("column","col")}${n}`;if(t.startsWith("grid-auto")){let o=r.match(/minmax\s*\(\s*0\s*,\s*1fr/);return`auto-${h(t)==="rows"?"rows":"cols"}-${o?"fr":$(r)}${n}`}let i=r.match(/span\s+(\d)/);return i?`${t.slice(5).replace("column","col")}-span-${i[1]}${n}`:r==="1/-1"?`${t.slice(5).replace("column","col")}-span-full${n}`:`${t.slice(5).replace("column","col")}-${r}${n}`}function wt(t,e){let[r,n]=s(e);if(t==="inset-inline-start")return`start${m(r)}${n}`;if(t==="inset-inline-end")return`end${m(r)}${n}`}function jt(t,e){let[r,n]=s(e);return e==="isolate"?`${r}${n}`:`${t}-${r}${n}`}function It(t,e){let[r,n]=s(e);return t==="justify-content"?`justify-${h(r)}${n}`:`${t}-${h(r)}${n}`}function Rt(t,e){let[r,n]=s(e);return`tracking-${r}${n}`}var Wt={1:"none",1.25:"tight",1.375:"snug",1.5:"normal",1.625:"relaxed",2:"loose"};function vt(t,e){let[r,n]=s(e);return r in Wt?`lh-${Wt[r]}${n}`:`lh${m(r,i=>/\d$/.test(i)?`[${i}]`:i)}${n}`}function j(t,e){let[r,n]=s(e);return`${$(t)}${m(r)}${n}`}var ar={"margin-left":"ml","margin-right":"mr","margin-top":"mt","margin-bottom":"mb","margin-inline-start":"ms","margin-inline-end":"me","padding-left":"pl","padding-right":"pr","padding-top":"pt","padding-bottom":"pb","padding-inline-start":"ps","padding-inline-end":"pe"};function D(t,e){let[r,n]=s(e),i=ar[t];if(i)return`${i}${m(r)}${n}`;let o=r.split(" "),a=o.length;return a===1?`${t[0]}${m(o[0])}${n}`:a===2?`${t[0]}x${m(o[1])}${n} ${t[0]}y${m(o[0])}${n}`:a===3?`${t[0]}x${m(o[1])}${n} ${t[0]}t${m(o[0])}${n} ${t[0]}b${m(o[2])}${n}`:`${t[0]}t${m(o[0])}${n} ${t[0]}b${m(o[2])}${n} ${t[0]}l${m(o[3])}${n} ${t[0]}r${m(o[1])}${n}`}function Vt(t,e){let[r,n]=s(e);if(["mask-clip","mask-origin","mask-type"].includes(t))return`${n}${t}-${$(r)}`;if(["mask-mode","mask-composite"].includes(t))return`${n}${$(t)}-${$(r)}`;if(["mask-position","mask-size"].includes(t))return v(r)||B(r)||V(r)||d(r)||y(r)||L(r)||w(r)||H(r)?`${n}${t}${m(r)}`:`${n}${$(t)}-${W(r)}`;if(t==="mask-repeat")return`${n}${t}-${r}`;if(t==="mask-image"){let i=it(r);if(i){let a=r.replace(/rgba?\(([^)]+)\)/g,(f,g)=>f.replace(g,g.replace(/\s*,\s*/g,x))).match(M);if(!a)return;let[l,u,p,c]=a.slice(1);return l=l.split(" ").map(f=>f[0]).join(""),l?`${_t(`mask-${l}`,u,p,c).trim()}`:_t(`mask-${i}`,u,p,c).trim()}return`${n}mask${m(r)}`}return`${n}${t}${m(r)}`}function _t(t,e,r,n){let i="";if(r&&!n&&(n=r,r=""),e){e=e.replaceAll(x,",");let[o,a]=e.split(" ");a?i+=` ${t}-from="${d(o)?`[${o}]`:o} ${a}"`:o&&(i+=` ${t}-from-${d(o)?`[${o}]`:o}`)}if(r){r=r.replaceAll(x,",");let[o,a]=r.split(" ");a?i+=` ${t}-via="${d(o)?`[${o}]`:o} ${a}"`:o&&(i+=` ${t}-via${d(o)?`[${o}]`:o}`)}if(n){n=n.replaceAll(x,",");let[o,a]=n.split(" ");a?i+=` ${t}-to="${d(o)?`[${o}]`:o} ${a}"`:o&&(i+=` ${t}-to-${d(o)?`[${o}]`:o}`)}return i}function Z(t,e){let[r,n]=s(e),i=t.split("-"),o=v(r)||w(r)?m(r):m($(r));return`${i[0]}-${i[1][0]}${o}${n}`}function yt(t,e){let[r,n]=s(e);return`mix-blend-${r}${n}`}function Lt(t,e){let[r,n]=s(e);return t==="object-position"?`${$(t)}-${W(r)}${n}`:`${$(t)}-${r}${n}`}function Tt(t,e){let[r,n]=s(e);return L(e)?`op-${r.replace("%","")}${n}`:`op-${+r*100}${n}`}function Nt(t,e){let[r,n]=s(e);return t==="outline-offset"?`${t}-${r}${n}`:`${$(t)}-${r}${n}`}function P(t,e){let[r,n]=s(e);return t.startsWith("word-spacing")?`word-spacing${m(e)}${n}`:r==="keep-all"?`break-keep${n}`:r==="break-word"?`break-words${n}`:`break-${h(r)}${n}`}function Ut(t,e){let[r,n]=s(e);return t==="overflow-wrap"?P(t,e):`${t}-${r}${n}`}function zt(t,e){let[r,n]=s(e),[i,o,a]=t.split("-");return a?`${i}-${a}-${r}${n}`:`${i}-${r}${n}`}function Mt(t,e){let[r,n]=s(e);return`${t}-${h(r)}${n}`}var mr={vertical:"y",horizontal:"x"};function St(t,e){let[r,n]=s(e);return r==="both"?`${t}${n}`:`${t}-${mr[r]||r}${n}`}function Ct(t,e){let[r,n]=s(e);return r.includes(" ")?`rotate-[${b(r)}]${n}`:`rotate${m(r)}${n}`}function Ft(t,e){let[r,n]=s(e);return`gap-y-${r}${n}`}function Pt(t,e){let[r,n]=s(e);if(t.startsWith("scroll-snap"))return`snap-${r}${n}`;if(t==="scroll-behavior")return`scroll-${r}${n}`;let[i,o,a,l]=t.match(/scroll-(margin|padding)-?(\w+)?-?(\w+)?/);return a==="inline"&&l?`scroll-${o[0]}${l[0]}${m(r)}${n}`:a?`scroll-${o[0]}${a[0]}${m(r)}${n}`:`scroll-${o[0]}-${r}${n}`}function A(t,e){let[r,n]=s(e);return r.startsWith("-")?`-${t[0]}${m(r.slice(1),$)}${n}`:`${t[0]}${m(r,$)}${n}`}function At(t,e){let[r,n]=s(e);return t==="text-decoration-line"?r==="none"?`no-underline${n}`:`${r}${n}`:t==="text-transform"?r==="none"?`normal-case${n}`:`${r}${n}`:t.startsWith("text-decoration")||t==="text-indent"?`${t.split("-")[1]}${m(r)}${n}`:t==="text-underline-offset"?`underline-offset-${r}${n}`:`text-${r}${n}`}function _(t,e){let[r,n]=s(e);return`${t}${m(r)}${n}`}function Et(t,e){let[r,n]=s(e);return t==="transform-origin"?`origin-${/\d/.test(r)&&r.includes(" ")?`[${b(r)}]`:W(r)}${n}`:t==="transform-style"?`transform-${r}${n}`:e==="none"?`${t}-none${n}`:tt(r).split(" ").map(i=>{let o=i.match(/([a-z]+)(3d)?([A-Z])?\((.*)\)/);if(!o)return;let[a,l,u,p,c]=o;if(p){let f=c.replace(/,(?![^()]*\))/g," ").split(" ");return f.length>1?`${l}-${p.toLowerCase()}="${f.map(g=>w(g)?`[${g}]`:l==="scale"?R(g):E(g)).join(" ")}${n}"`:`${l}="${p.toLowerCase()}-${w(f[0])?`[${f[0]}]`:l==="scale"?R(f[0]):E(f[0])}${n}"`}else{let f=c.replace(/,(?![^()]*\))/g," ").split(" ");return f.length>1?l==="translate"?`${l}="[${f.join(",")}]"`:`${l}="${f.map(g=>w(g)?`[${g}]`:l==="scale"?R(g):E(g)).join(" ")}${n}"`:`${l}="${w(f[0])?`[${f[0]}]`:l==="scale"?R(f[0]):E(f[0])}${n}"`}}).filter(Boolean).join(" ")}function E(t){return t.endsWith("deg")?t.slice(0,-3):t}var lr=["transition-delay","transition-duration"];function Gt(t,e){let[r,n]=s(e);if(t==="transition-timing-function")return r==="linear"?`ease-${r}${n}`:`ease="[${r}]${n}"`;if(t==="transition")return`transition="${pr(r,n)}"`;if(t==="transition-property")return r.includes("color")?`transition-color${n}`:r==="box-shadow"?`transition-shadow${n}`:`transition-${r}${n}`;if(lr.includes(t))return`${t.split("-")[1]}-${r.slice(0,-2)}${n}`}function pr(t,e){let r=!1;return t.split(" ").map(n=>/^\d/.test(n)||/^\.\d/.test(n)?r?`delay${m(n,void 0,!0)}${e}`:(r=!0,`duration${m(n,void 0,!0)}${e}`):n==="background-color"?"colors":n).join(" ")}function Bt(t,e){let[r,n]=s(e);return`${h(t)}-${r}${n}`}function Ht(t,e){let[r,n]=s(e);return`v-${r}${n}`}function Kt(t,e){let[r,n]=s(e);return`whitespace-${r}${n}`}function Ot(t,e){let[r,n]=s(e);return`${t}-${$(r)}${n}`}function Dt(t,e){let[r,n]=s(e);return e==="horizontal-tb"?`write-normal${n}`:`write-${r.replace("-rl","-right").replace("-lr","-left")}${n}`}var q={animation:st,aspect:at,backface:j,caption:j,column:ut,columns:I,break:I,empty:dt,box:S,writing:Dt,display:F,float:I,clear:I,isolation:jt,object:Lt,overflow:Ut,overscroll:zt,position:F,top:_,left:_,right:_,bottom:_,visibility:F,z:A,flex:ht,order:I,grid:xt,gap:_,justify:It,align:ot,place:Mt,padding:D,perspective:I,margin:D,width:A,min:Z,max:Z,height:A,font:bt,letter:Rt,line:vt,list:j,text:At,mask:Vt,hyphens:_,vertical:Ht,white:Kt,word:P,content:$t,background:O,rotate:Ct,border:ct,outline:Nt,opacity:Tt,mix:yt,filter:C,backdrop:mt,table:j,transition:Gt,transform:Et,accent:j,appearance:j,cursor:gt,caret:j,pointer:I,resize:St,scroll:Pt,inset:wt,touch:j,user:Bt,will:Ot,fill:I,stroke:j,color:ft,row:Ft},cr=/([\w-]+)\s*:\s*([^;]+)/;function G(t,e=!1){var u;t=t.replace(T,"");let r=t.match(cr);if(!r)return;let[n,i,o]=r,a=$(i),l=(u=q[a])==null?void 0:u.call(q,i,o);return l&&e?l.replace(/-([0-9.]+)px/,(p,c)=>`-${+c/4}`).replace(/\[[^\]]+\]/g,p=>p.replace(/([0-9.]+)px/g,(c,f)=>`${+f/16}rem`)):l}function J(t){return e=>{let r=t.anyMatch||[],n=t.priority||[],i=null;if(r.length>0&&(i=r.find(c=>e[c.key]&&(c.pattern instanceof RegExp?c.pattern.test(e[c.key]):e[c.key]===c.pattern)),!i))return{transformedResult:"",deleteKeys:[]};let o="";if(r.length>0&&n.length>0)for(let c of n){let f=r.find(g=>g.key===c);if(f&&e[c]&&(f.pattern instanceof RegExp?f.pattern.test(e[c]):e[c]===f.pattern)){o=e[c];break}}let a={...t.allMatch},l=Object.keys(a);for(let c of l){let f=a[c];if(!(f instanceof RegExp?f.test(e[c]):e[c]===f))return{transformedResult:"",deleteKeys:[]}}let u=[...l,...r.map(c=>c.key)];return{transformedResult:typeof t.outputTemplate=="function"?t.outputTemplate(o):t.outputTemplate.replace("${value}",o),deleteKeys:u}}}var Zt={"line-clamp-${number}":J({allMatch:{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical"},anyMatch:[{key:"-webkit-line-clamp",pattern:/\d/},{key:"line-clamp",pattern:/\d/}],priority:["line-clamp","-webkit-line-clamp"],outputTemplate:t=>`line-clamp-${t}`}),"line-clamp-${prop}":J({allMatch:{overflow:"visible",display:"block","-webkit-box-orient":"horizontal"},anyMatch:[{key:"-webkit-line-clamp",pattern:/inherit|initial|revert|unset/},{key:"line-clamp",pattern:/inherit|initial|revert|unset/}],priority:["line-clamp","-webkit-line-clamp"],outputTemplate:t=>`line-clamp-${t}`}),truncate:J({allMatch:{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},outputTemplate:()=>"truncate"})};function Q(t){let e=[],r=t.split(";").reduce((n,i)=>{let[o,a]=i.split(":");return o.trim()&&a.trim()&&(n[o.trim()]=a.trim()),n},{});for(let n in Zt){let{transformedResult:i,deleteKeys:o}=Zt[n](r);i&&o.length&&(e.push(i),o.forEach(a=>{delete r[a]}))}return{transformedResult:e.join(" "),newStyle:Object.entries(r).map(([n,i])=>`${n}: ${i}`).join("; ")}}function X(t,e){let r=[],n=new Set,{newStyle:i,transformedResult:o}=Q(t);return o?[[o,i.split(";").filter(Boolean).reduce((a,l)=>{let u=l.replaceAll(T,"").trim();if(n.has(u))return a;n.add(u);let p=G(l,e)||"";return p||r.push(l),a+=`${p} `},"").trim().replace(/\s+/g," ")].filter(Boolean).join(" "),r]:[t.split(";").filter(Boolean).reduce((a,l)=>{let u=l.replaceAll(T,"").trim();if(n.has(u))return a;n.add(u);let p=G(l,e)||"";return p||r.push(l),a+=`${p} `},"").trim().replace(/\s+/g," "),r]}function fr(t,e=!1){let[r,n]=X(t,e);return[r?r.replace(/([^\s=]+)="([^"]+)"/g,(i,o,a)=>a.split(" ").map(l=>`${o}-${l}`).join(" ")):"",n]}export{T as browserReg,x as commaReplacer,k as cssMathFnRE,gr as diffTemplateStyle,ur as flag,$ as getFirstName,it as getGradient,R as getHundred,h as getLastName,hr as getStyleScoped,m as getVal,v as isCalc,br as isColor,H as isCubicBezier,dr as isEmptyStyle,V as isHex,y as isHsl,$r as isNot,L as isPercent,d as isRgb,rt as isSize,B as isUrl,w as isVar,tt as joinEmpty,W as joinWithLine,b as joinWithUnderLine,M as linearGradientReg,nt as linearGradientReg1,qt as numberWithUnitRE,et as otherGradientReg,Jt as positionMap,G as toUnocss,fr as toUnocssClass,s as transformImportant,X as transformStyleToUnocss,Q as transformStyleToUnocssPre,Y as trim};
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "transform-to-unocss-core",
3
- "version": "0.0.45",
3
+ "type": "module",
4
+ "version": "0.0.47",
4
5
  "description": "",
5
6
  "author": "Simon He",
6
7
  "license": "MIT",
@@ -15,13 +16,12 @@
15
16
  "sideEffects": false,
16
17
  "exports": {
17
18
  ".": {
18
- "types": "./dist/index.d.ts",
19
- "import": "./dist/index.mjs",
20
- "require": "./dist/index.js"
19
+ "import": "./dist/index.js",
20
+ "require": "./dist/index.cjs"
21
21
  }
22
22
  },
23
23
  "main": "./dist/index.js",
24
- "module": "./dist/index.mjs",
24
+ "module": "./dist/index.js",
25
25
  "types": "./dist/index.d.ts",
26
26
  "typesVersions": {
27
27
  "*": {
@@ -50,10 +50,10 @@
50
50
  "typecheck": "tsc --noEmit"
51
51
  },
52
52
  "devDependencies": {
53
- "@antfu/eslint-config": "^3.16.0",
53
+ "@antfu/eslint-config": "^4.12.0",
54
54
  "@types/node": "^18.19.86",
55
55
  "bumpp": "^8.2.1",
56
- "eslint": "^8.57.1",
56
+ "eslint": "^9.25.1",
57
57
  "esno": "^0.16.3",
58
58
  "picocolors": "^1.1.1",
59
59
  "prettier": "^2.8.8",
package/dist/index.mjs DELETED
@@ -1 +0,0 @@
1
- var lr=".__unocss_transfer__",Q=/^(?:calc|clamp|min|max)\s*\(.*\)/,Et=/^-?[0-9.]+(px|rem|em|%|vw|vh|vmin|vmax|deg)$/;function cr(t){return/\[&:not\(/.test(t)}function y(t){return Q.test(t)}function $(t){return t.split("-")[0]}function g(t){let e=t.split("-");return e[e.length-1]}function Bt(t){return t.startsWith("url(")}function E(t){return t.endsWith("%")&&!t.includes(" ")}function N(t){return/^#[0-9A-F]{2,}$/i.test(t)}function b(t){return t.startsWith("rgb")}function U(t){return t.startsWith("hsl")}function Kt(t){return t.startsWith("cubic-bezier")}function a(t,e,r,n=""){return y(t)||Bt(t)||N(t)||b(t)||U(t)||E(t)||I(t)||Kt(t)?r?`-[${n}${J(t,"all").replace(/['"]/g,"")}]`:`="[${n}${J(t,"all").replace(/['"]/g,"")}]"`:n?`-[${n}${e?e(t):t}]`:`-${e?e(t):t}`}function j(t){return typeof t=="string"&&t.endsWith("%")?t.slice(0,-1):+t*100}function v(t){return t.replace(/\s+/," ").split(" ").join("-")}function h(t){return t.replace(/\s+/," ").split(" ").join("_")}var Ht=["top","right","bottom","left","center"];function J(t,e="around"){return e==="pre"?t.replace(/(^\s*)/g,""):e==="post"?t.replace(/(\s*$)/g,""):e==="all"?t.replace(/\s+/g,""):e==="around"?t.replace(/(^\s*)|(\s*$)/g,""):t}function i(t){return t=t.replace(/\s+/," ").replace(/\s*,\s*/g,",").replace(/\s*\/\s*/,"/"),/rgb/.test(t)&&(t=t.replace(/rgba?\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((o,s)=>o.endsWith(",")?o:o+(n.length-1===s?"":",")).join(""))})),/hsl/.test(t)&&(t=t.replace(/hsla?\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((o,s)=>o.endsWith(",")?o:o+(n.length-1===s?"":",")).join(""))})),/var\([^)]+\)/.test(t)&&(t=t.replace(/var\(([^)]+)\)/g,(e,r)=>{let n=r.trim().split(" ");return e.replace(r,n.map((o,s)=>o.endsWith(",")?o:o+(n.length-1===s?"":",")).join(""))})),t.endsWith("!important")?[t.replace(/\s*!important/,"").trim(),"!"]:[t.trim(),""]}function fr(t,e){let r=t.match(/<style scoped>.*<\/style>/s),n=e.match(/<style scoped>.*<\/style>/s);return r[0]===n[0]}function ur(t){return/<style scoped>\s*<\/style>/.test(t)}function $r(t){let e=t.match(/<style scoped>(.*)<\/style>/s);return e?e[1]:""}function X(t){return t.replace(/\(\s*/g,"(").replace(/\s*\)/g,")").replace(/\s*,\s*/g,",")}function I(t){return t.startsWith("var(--")}function Y(t){return Q.test(t)||Et.test(t)||Ht.includes(t)}function gr(t){return N(t)||b(t)||U(t)}var _=/-webkit-|-moz-|-ms-|-o-/g;function k(t,e){let[r,n]=i(e);return`${g(t)}-${g(r)}${n}`}function tt(t,e){let[r,n]=i(e);if(t==="animation-delay")return`animate-delay${a(r)}${n}`;if(t==="animation-duration")return`animate-duration${a(r)}${n}`;if(t==="animation-name")return`animate-[${r}]${n}`;if(t==="animation-timing-function")return`animate-ease-[${r}]${n}`;if(t==="animation-iteration-count")return`animate-count${a(r)}${n}`;if(t==="animation-direction")return`animate-direction-${r}${n}`;if(t==="animation-fill-mode")return`animate-fill-${r}${n}`;let o={running:"running",paused:"paused"};if(t==="animation-play-state")return r in o?`animate-${o[r]}${n}`:`animate-[${r}]${n}`;if(t==="animation"){let s=r.split(" "),m=[],p=0;for(let u=0;u<s.length;u++){let l=s[u];/^\d+(?:\.\d+)?s?$/.test(l)?(p===0?m.push(`animate-duration${a(l)}`):p===1?m.push(`animate-delay${a(l)}`):m.push(`animate-[${l}]`),p++):/^(?:linear|ease|ease-in|ease-out|ease-in-out|step-start|step-end)$/.test(l)?m.push(`animate-ease-[${l}]`):l.startsWith("cubic-bezier")||l.startsWith("steps")?m.push(`animate-ease-[${l}]`):["alternate","alternate-reverse","normal","reverse"].includes(l)?m.push(`animate-direction-${l}`):["forwards","backwards","both","none"].includes(l)?m.push(`animate-fill-${l}`):o[l]?m.push(`animate-${o[l]}`):l==="infinite"||/^\d+$/.test(l)?m.push(`animate-count${a(l)}`):l!=="normal"?m.push(`animate-[${l}]`):m.push(`animate-[${l}]`)}return m.length>0?m.join(" ")+n:""}return`animate-[${r}]${n}`}function rt(t,e){let[r,n]=i(e);return r==="auto"?`${$(t)}-${r}`:`${$(t)}="[${r}]${n}"`}var Gt=["box-shadow","drop-shadow"];function M(t,e){let[r,n]=i(e);if(t.startsWith("box-decoration"))return`box-decoration-${r}${n}`;if(t==="box-sizing")return`box-${$(r)}${n}`;if(Gt.includes(t))return`shadow="[${r.split(" ").join("_")}]${n}"`}var Ot=["contrast","brightness","saturate"],Dt=["grayscale","invert","sepia"];function S(t,e){let[r,n]=i(e),[o,s,m]=r.match(/([\w-]+)\((.*)\)/);return Ot.includes(s)?`${s}-${j(m)}${n}`:s==="drop-shadow"?`drop-${M(s,m)}${n}`:Dt.includes(s)?`${s}-${m.endsWith("%")?m.slice(0,-1):j(m)}${n}`:s==="hue-rotate"?`${s}-${m.slice(0,-3)}${n}`:`${s}-${m}${n}`}function nt(t,e){let[r,n]=i(e);return`backdrop-${S(t,r)}${n}`}var Zt=["background-color","background-attachment","background-position"],qt=/linear-gradient\(\s*to([\w\s]+),?([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,Jt=/linear-gradient\(\s*([^,]*),?([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,Qt=/(radial|conic)-gradient\(([\w()#%\s.]+)?,([\w()#%\s.]+)?,?([\w#%\s.]+)?\)$/,W="__comma__";function K(t,e){let[r,n]=i(e);if(t==="background-size")return`bg${a(r,/\d/.test(r)?kt:V,!1,"length:")}${n}`;if(Zt.includes(t))return`bg${a(r,V)}${n}`;if(["background","background-image"].includes(t)){if(Y(r))return`bg${a(r,V,!1,"position:")}${n}`;let o=r.replace(/rgba?\([^)]+\)/g,"temp");if(/\)\s*,/.test(o))return`bg="[${tr(r)}]"`;if(r.startsWith("linear-gradient")){let p=r.replace(/rgba?\(([^)]+)\)/g,(c,f)=>c.replace(f,f.replace(/\s*,\s*/g,W))),u=p.match(qt);if(u){let[c,f,d,T]=u.slice(1);return c=c.split(" ").map(L=>L[0]).join(""),c?`bg-gradient-to-${c}${B(f,d,T)}`:B(f,d,T)}let l=p.match(Jt);return l?`bg-gradient-linear bg-gradient-[${l[1]},${l[2].replace(/\s+/,"_").replaceAll(W,",")},${l[3].replace(/\s+/,"_").replaceAll(W,",")}]`:void 0}else if(/^(?:radial|conic)-gradient/.test(r)){let u=r.replace(/rgba?\(([^)]+)\)/g,(T,L)=>T.replace(L,L.replace(/\s*,\s*/g,W))).match(Qt);if(!u)return;let l=u[1],[c,f,d]=u.slice(2);return`bg-gradient-${l}${B(c,f,d)}`}let s=r.match(/^rgba?\([^)]+\)$/);if(s){let p=s[0];return`bg="${r.replace(p,`[${p}]`)}${n}"`}let m=r.match(/^url\(["'\s.\-\w/@]*\)$/);if(m)return`bg="${r.replace(m[0],`[${m[0].replace(/['"]/g,"")}]${n}`)}"`;if(r.includes(" ")){let p=r.split(" ").map(c=>K(t,`${c}${n?" !important":""}`)).join(" "),u=/bg-\[position:([^\]]*)\]/g,l=p.match(u);if(l&&l.length>1){let c=`bg-[position:${l.map(f=>f.replace(u,"$1")).join("_")}]`;p=`${p.replace(u,"").replace(/\s+/g," ").split(" ").filter(Boolean).concat([c]).join(" ")}`}return p}return`bg${a(r,V)}${n}`}return t==="background-blend-mode"?`bg-blend-${r}${n}`:`${Xt(t,r)}-${Yt(r)}${n}`}function Xt(t,e){return e.endsWith("repeat")?"bg":t.replace("background","bg")}function Yt(t){return/border|content|padding-box/.test(t)?t.replace("-box",""):t.startsWith("repeat-")?t.replace("repeat-",""):V(t)}function V(t){return t.replace(/\s+/," ").replace(" ","-")}function kt(t){return t.replace(/\s+/," ").replace(" ","_")}function B(t,e,r){let n="";if(e&&!r&&(r=e,e=""),t){t=t.replaceAll(W,",");let[o,s]=t.split(" ");s?n+=` from="${b(o)?`[${o}]`:o} ${s}"`:o&&(n+=` from="${b(o)?`[${o}]`:o}"`)}if(e){e=e.replaceAll(W,",");let[o,s]=e.split(" ");s?n+=` via="${b(o)?`[${o}]`:o} ${s}"`:o&&(n+=` via="${b(o)?`[${o}]`:o}"`)}if(r){r=r.replaceAll(W,",");let[o,s]=r.split(" ");s?n+=` to="${b(o)?`[${o}]`:o} ${s}"`:o&&(n+=` to="${b(o)?`[${o}]`:o}"`)}return n}var et="__transform_to_unocss__";function tr(t){let e={},r=0;return t=t.replace(/(rgba?|hsla?|lab|lch|hwb|color)\(\)*\)/,n=>(e[r++]=n,`${et}${r}}`)),t=t.split(/\)\s*,/).map(n=>`${n.replace(/\s*,\s*/g,",").replace(/\s+/g,"_")}`).join("),"),Object.keys(e).forEach(n=>{t=t.replace(`${et}${n}}`,e[n])}),t}var ot=["border-top","border-right","border-bottom","border-left"];function it(t,e){let[r,n]=i(e);if(t==="border-spacing")return`${t}="[${h(r)}]${n}"`;if(t==="border-color"){if(r.includes(" ")){let o=r.split(" ").length,s=r.split(" ").map(c=>N(c)||b(c)||U(c)?`-[${c}]`:`-${c}`),[m,p,u,l]=s;switch(o){case 2:return`border-y${m}${n} border-x${p}${n}`;case 3:return`border-t${m}${n} border-b${u}${n} border-x${p}${n}`;case 4:return`border-t${m}${n} border-b${u}${n} border-r${p}${n} border-l${l}${n}`}}return`border${a(r)}${n}`}return t==="border-radius"?y(r)||!r.includes(" ")?`border-rd${a(r)}${n}`:`border-rd="[${h(r)}]${n}"`:ot.some(o=>t.startsWith(o))?r.split(" ").map(o=>`border-${t.split("-")[1][0]}${a(o)}${n}`).join(" "):t==="border-inline-end-width"?`border-e${a(r)}${n}`:t==="border-inline-start-width"?`border-s${a(r)}${n}`:t.startsWith("border-image")?"":t==="border-width"&&r.includes(" ")?r.split(" ").map((o,s)=>`border-${ot[s].split("-")[1][0]}${a(o)}${n}`).join(" "):/^\d[%|(px)rem]$/.test(r)||t==="border-collapse"?`border-${r}${n}`:t==="border-width"||t==="border-style"?`border${a(r)}${n}`:t==="border-color"?r==="currentColor"?`border-current${n}`:`border${a(r)}${n}`:r.split(" ").map(o=>r==="currentColor"?`border-current${n}`:`border${a(o)}${n}`).join(" ")}function st(t,e){let[r,n]=i(e);return`text${a(r)}${n}`}function at(t,e){let[r,n]=i(e);return t==="column-gap"?`gap-x-${r}${n}`:`${t}-${r}${n}`}function mt(t,e){let[r,n]=i(e);return r==='" "'||r==="' '"?`content-['_']${n}`:`content-[${r.replace(/"/g,"'")}]${n}`}function pt(t,e){let[r,n]=i(e);return`${t}${a(r)}${n}`}function z(t,e){let[r,n]=i(e);return r==="none"?`hidden${n}`:r==="hidden"?`invisible${n}`:`${r}${n}`}var rr={show:"visible",hide:"hidden"};function lt(t,e){var o;let[r,n]=i(e);return`table-empty-cells-${(o=rr[r])!=null?o:r}${n}`}var nr=["flex-basis","flex-grow","flex-shrink"];function ct(t,e){let[r,n]=i(e);if(nr.includes(t))return`${g(t)}${a(r)}${n}`;if(r==="1")return`flex-1${n}`;let o=r[0];return t==="flex"&&(o==="0"||o==="1")?`flex="[${h(r)}]${n}"`:`${$(t)}-${r.replace("column","col")}${n}`}function w(t,e){let[r,n]=i(e);return`${t}-${r}${n}`}function ft(t,e){let[r,n]=i(e);if(t==="font-size")return`text-${r}${n}`;if(t==="font-weight")return`font-${r}${n}`;if(t==="font-family"){let o=r.match(/ui-(\w{0,4})/);if(!o)return`font-[${h(e)}]${n}`;let[s,m]=o;return`font-${m}${n}`}return t==="font-style"?r==="normal"?`font-not-italic${n}`:`font-${r}${n}`:t==="font-variant-numeric"?r==="normal"?`normal-nums${n}`:`${r}${n}`:`font="${er(r)}${n}"`}function er(t){return t.split(" ").map(e=>/^\d/.test(e)?`text-${e}`:e).join(" ")}function ut(t,e){let[r,n]=i(e);if(t.startsWith("grid-template")){let s=r.match(/repeat\s*\(\s*(\d+)/);return s?`grid-${g(t)==="rows"?"rows":"cols"}-${s[1]}${n}`:`grid-${g(t)==="rows"?"rows":"cols"}-${r.includes(" ")?`[${h(r)}]`:r}${n}`}if(t==="grid-auto-flow")return`grid-flow-${v(r).replace("column","col")}${n}`;if(t.startsWith("grid-auto")){let s=r.match(/minmax\s*\(\s*0\s*,\s*1fr/);return`auto-${g(t)==="rows"?"rows":"cols"}-${s?"fr":$(r)}${n}`}let o=r.match(/span\s+(\d)/);return o?`${t.slice(5).replace("column","col")}-span-${o[1]}${n}`:r==="1/-1"?`${t.slice(5).replace("column","col")}-span-full${n}`:`${t.slice(5).replace("column","col")}-${r}${n}`}function $t(t,e){let[r,n]=i(e);if(t==="inset-inline-start")return`start${a(r)}${n}`;if(t==="inset-inline-end")return`end${a(r)}${n}`}function gt(t,e){let[r,n]=i(e);return e==="isolate"?`${r}${n}`:`${t}-${r}${n}`}function dt(t,e){let[r,n]=i(e);return t==="justify-content"?`justify-${g(r)}${n}`:`${t}-${g(r)}${n}`}function ht(t,e){let[r,n]=i(e);return`tracking-${r}${n}`}var bt={1:"none",1.25:"tight",1.375:"snug",1.5:"normal",1.625:"relaxed",2:"loose"};function xt(t,e){let[r,n]=i(e);return r in bt?`lh-${bt[r]}${n}`:`lh${a(r,o=>/\d$/.test(o)?`[${o}]`:o)}${n}`}function x(t,e){let[r,n]=i(e);return`${$(t)}${a(r)}${n}`}var or={"margin-left":"ml","margin-right":"mr","margin-top":"mt","margin-bottom":"mb","margin-inline-start":"ms","margin-inline-end":"me","padding-left":"pl","padding-right":"pr","padding-top":"pt","padding-bottom":"pb","padding-inline-start":"ps","padding-inline-end":"pe"};function H(t,e){let[r,n]=i(e),o=or[t];if(o)return`${o}${a(r)}${n}`;let s=r.split(" "),m=s.length;return m===1?`${t[0]}${a(s[0])}${n}`:m===2?`${t[0]}x${a(s[1])}${n} ${t[0]}y${a(s[0])}${n}`:m===3?`${t[0]}x${a(s[1])}${n} ${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n}`:`${t[0]}t${a(s[0])}${n} ${t[0]}b${a(s[2])}${n} ${t[0]}l${a(s[3])}${n} ${t[0]}r${a(s[1])}${n}`}function G(t,e){let[r,n]=i(e),o=t.split("-"),s=y(r)||I(r)?a(r):a($(r));return`${o[0]}-${o[1][0]}${s}${n}`}function wt(t,e){let[r,n]=i(e);return`mix-blend-${r}${n}`}function jt(t,e){let[r,n]=i(e);return t==="object-position"?`${$(t)}-${v(r)}${n}`:`${$(t)}-${r}${n}`}function It(t,e){let[r,n]=i(e);return E(e)?`op-${r.replace("%","")}${n}`:`op-${+r*100}${n}`}function Wt(t,e){let[r,n]=i(e);return t==="outline-offset"?`${t}-${r}${n}`:`${$(t)}-${r}${n}`}function F(t,e){let[r,n]=i(e);return t.startsWith("word-spacing")?`word-spacing${a(e)}`:r==="keep-all"?`break-keep${n}`:r==="break-word"?`break-words${n}`:`break-${g(r)}${n}`}function vt(t,e){let[r,n]=i(e);return t==="overflow-wrap"?F(t,e):`${t}-${r}${n}`}function Rt(t,e){let[r,n]=i(e),[o,s,m]=t.split("-");return m?`${o}-${m}-${r}${n}`:`${o}-${r}${n}`}function yt(t,e){let[r,n]=i(e);return`${t}-${g(r)}${n}`}var ir={vertical:"y",horizontal:"x"};function _t(t,e){let[r,n]=i(e);return r==="both"?`${t}${n}`:`${t}-${ir[r]||r}${n}`}function Vt(t,e){let[r,n]=i(e);return r.includes(" ")?`rotate-[${h(r)}]${n}`:`rotate${a(r)}${n}`}function Tt(t,e){let[r,n]=i(e);return`gap-y-${r}${n}`}function Lt(t,e){let[r,n]=i(e);if(t.startsWith("scroll-snap"))return`snap-${r}${n}`;if(t==="scroll-behavior")return`scroll-${r}${n}`;let[o,s,m,p]=t.match(/scroll-(margin|padding)-?(\w+)?-?(\w+)?/);return m==="inline"&&p?`scroll-${s[0]}${p[0]}-${r}${n}`:m?`scroll-${s[0]}${m[0]}-${r}${n}`:`scroll-${s[0]}-${r}${n}`}function C(t,e){let[r,n]=i(e);return r.startsWith("-")?`-${t[0]}${a(r.slice(1),$)}${n}`:`${t[0]}${a(r,$)}${n}`}function Nt(t,e){let[r,n]=i(e);return t==="text-decoration-line"?r==="none"?`no-underline${n}`:`${r}${n}`:t==="text-transform"?r==="none"?`normal-case${n}`:`${r}${n}`:t.startsWith("text-decoration")||t==="text-indent"?`${t.split("-")[1]}${a(r)}${n}`:t==="text-underline-offset"?`underline-offset-${r}${n}`:`text-${r}${n}`}function R(t,e){let[r,n]=i(e);return`${t}${a(r)}${n}`}function Ut(t,e){let[r,n]=i(e);return t==="transform-origin"?`origin-${/\d/.test(r)&&r.includes(" ")?`[${h(r)}]`:v(r)}${n}`:t==="transform-style"?`transform-${r}`:e==="none"?`${t}-none`:X(r).split(" ").map(o=>{let s=o.match(/([a-z]+)(3d)?([A-Z])?\((.*)\)/);if(!s)return;let[m,p,u,l,c]=s;if(l){let f=c.replace(/,(?![^()]*\))/g," ").split(" ");return f.length>1?`${p}-${l.toLowerCase()}="${f.map(d=>I(d)?`[${d}]`:p==="scale"?j(d):A(d)).join(" ")}${n}"`:`${p}="${l.toLowerCase()}-${I(f[0])?`[${f[0]}]`:p==="scale"?j(f[0]):A(f[0])}${n}"`}else{let f=c.replace(/,(?![^()]*\))/g," ").split(" ");return f.length>1?p==="translate"?`${p}="[${f.join(",")}]"`:`${p}="${f.map(d=>I(d)?`[${d}]`:p==="scale"?j(d):A(d)).join(" ")}${n}"`:`${p}="${I(f[0])?`[${f[0]}]`:p==="scale"?j(f[0]):A(f[0])}${n}"`}}).filter(Boolean).join(" ")}function A(t){return t.endsWith("deg")?t.slice(0,-3):t}var sr=["transition-delay","transition-duration"];function Mt(t,e){let[r,n]=i(e);if(t==="transition-timing-function")return r==="linear"?`ease-${r}${n}`:`ease="[${r}]${n}"`;if(t==="transition")return`transition="${ar(r,n)}"`;if(t==="transition-property")return r.includes("color")?`transition-color${n}`:r==="box-shadow"?`transition-shadow${n}`:`transition-${r}${n}`;if(sr.includes(t))return`${t.split("-")[1]}-${r.slice(0,-2)}`}function ar(t,e){let r=!1;return t.split(" ").map(n=>/^\d/.test(n)||/^\.\d/.test(n)?r?`delay${a(n,void 0,!0)}${e}`:(r=!0,`duration${a(n,void 0,!0)}${e}`):n==="background-color"?"colors":n).join(" ")}function St(t,e){let[r,n]=i(e);return`${g(t)}-${r}${n}`}function zt(t,e){let[r,n]=i(e);return`v-${r}${n}`}function Ft(t,e){let[r,n]=i(e);return`whitespace-${r}${n}`}function Ct(t,e){let[r,n]=i(e);return`${t}-${$(r)}${n}`}function At(t,e){return e==="horizontal-tb"?"write-normal":`write-${e.replace("-rl","-right").replace("-lr","-left")}`}var O={animation:tt,aspect:rt,backface:x,caption:x,column:at,columns:w,break:w,empty:lt,box:M,writing:At,display:z,float:w,clear:w,isolation:gt,object:jt,overflow:vt,overscroll:Rt,position:z,top:R,left:R,right:R,bottom:R,visibility:z,z:C,flex:ct,order:w,grid:ut,gap:R,justify:dt,align:k,place:yt,padding:H,perspective:w,margin:H,width:C,min:G,max:G,height:C,font:ft,letter:ht,line:xt,list:x,text:Nt,vertical:zt,white:Ft,word:F,content:mt,background:K,rotate:Vt,border:it,outline:Wt,opacity:It,mix:wt,filter:S,backdrop:nt,table:x,transition:Mt,transform:Ut,accent:x,appearance:x,cursor:pt,caret:x,pointer:w,resize:_t,scroll:Lt,inset:$t,touch:x,user:St,will:Ct,fill:w,stroke:x,color:st,row:Tt},mr=/([\w-]+)\s*:\s*([^;]+)/;function P(t,e=!1){var u;t=t.replace(_,"");let r=t.match(mr);if(!r)return;let[n,o,s]=r,m=$(o),p=(u=O[m])==null?void 0:u.call(O,o,s);return p&&e?p.replace(/-([0-9.]+)px/,(l,c)=>`-${+c/4}`).replace(/\[[^\]]+\]/g,l=>l.replace(/([0-9.]+)px/g,(c,f)=>`${+f/16}rem`)):p}function D(t){return e=>{let r=t.anyMatch||[],n=t.priority||[],o=null;if(r.length>0&&(o=r.find(c=>e[c.key]&&(c.pattern instanceof RegExp?c.pattern.test(e[c.key]):e[c.key]===c.pattern)),!o))return{transformedResult:"",deleteKeys:[]};let s="";if(r.length>0&&n.length>0)for(let c of n){let f=r.find(d=>d.key===c);if(f&&e[c]&&(f.pattern instanceof RegExp?f.pattern.test(e[c]):e[c]===f.pattern)){s=e[c];break}}let m={...t.allMatch},p=Object.keys(m);for(let c of p){let f=m[c];if(!(f instanceof RegExp?f.test(e[c]):e[c]===f))return{transformedResult:"",deleteKeys:[]}}let u=[...p,...r.map(c=>c.key)];return{transformedResult:typeof t.outputTemplate=="function"?t.outputTemplate(s):t.outputTemplate.replace("${value}",s),deleteKeys:u}}}var Pt={"line-clamp-${number}":D({allMatch:{overflow:"hidden",display:"-webkit-box","-webkit-box-orient":"vertical"},anyMatch:[{key:"-webkit-line-clamp",pattern:/\d/},{key:"line-clamp",pattern:/\d/}],priority:["line-clamp","-webkit-line-clamp"],outputTemplate:t=>`line-clamp-${t}`}),"line-clamp-${prop}":D({allMatch:{overflow:"visible",display:"block","-webkit-box-orient":"horizontal"},anyMatch:[{key:"-webkit-line-clamp",pattern:/inherit|initial|revert|unset/},{key:"line-clamp",pattern:/inherit|initial|revert|unset/}],priority:["line-clamp","-webkit-line-clamp"],outputTemplate:t=>`line-clamp-${t}`}),truncate:D({allMatch:{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},outputTemplate:()=>"truncate"})};function Z(t){let e=[],r=t.split(";").reduce((n,o)=>{let[s,m]=o.split(":");return s.trim()&&m.trim()&&(n[s.trim()]=m.trim()),n},{});for(let n in Pt){let{transformedResult:o,deleteKeys:s}=Pt[n](r);o&&s.length&&(e.push(o),s.forEach(m=>{delete r[m]}))}return{transformedResult:e.join(" "),newStyle:Object.entries(r).map(([n,o])=>`${n}: ${o}`).join("; ")}}function q(t,e){let r=[],n=new Set,{newStyle:o,transformedResult:s}=Z(t);return s?[[s,o.split(";").filter(Boolean).reduce((m,p)=>{let u=p.replaceAll(_,"").trim();if(n.has(u))return m;n.add(u);let l=P(p,e)||"";return l||r.push(p),m+=`${l} `},"").trim().replace(/\s+/g," ")].filter(Boolean).join(" "),r]:[t.split(";").filter(Boolean).reduce((m,p)=>{let u=p.replaceAll(_,"").trim();if(n.has(u))return m;n.add(u);let l=P(p,e)||"";return l||r.push(p),m+=`${l} `},"").trim().replace(/\s+/g," "),r]}function pr(t,e=!1){let[r,n]=q(t,e);return[r?r.replace(/([^\s=]+)="([^"]+)"/g,(o,s,m)=>m.split(" ").map(p=>`${s}-${p}`).join(" ")):"",n]}export{_ as browserReg,Q as cssMathFnRE,fr as diffTemplateStyle,lr as flag,$ as getFirstName,j as getHundred,g as getLastName,$r as getStyleScoped,a as getVal,y as isCalc,gr as isColor,Kt as isCubicBezier,ur as isEmptyStyle,N as isHex,U as isHsl,cr as isNot,E as isPercent,b as isRgb,Y as isSize,Bt as isUrl,I as isVar,X as joinEmpty,v as joinWithLine,h as joinWithUnderLine,Et as numberWithUnitRE,Ht as positionMap,P as toUnocss,pr as toUnocssClass,i as transformImportant,q as transformStyleToUnocss,Z as transformStyleToUnocssPre,J as trim};