@unocss/runtime 0.65.4 → 65.4.2

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/mini.global.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";(()=>{var Ri=Object.defineProperty;var Ti=(t,e)=>{for(var r in e)Ri(t,r,{get:e[r],enumerable:!0})};var be="default",Ue="preflights",Ei="shortcuts",ji="imports",Zt={[ji]:-200,[Ue]:-100,[Ei]:-10,[be]:0};var _e=/[\\:]?[\s'"`;{}]+/g;function Ai(t){return t.split(_e)}var Ie={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ai(t)}};function j(t=[]){return Array.isArray(t)?t:[t]}function B(t){return Array.from(new Set(t))}function dt(t,e){return t.reduce((r,n)=>(r.findIndex(i=>e(n,i))===-1&&r.push(n),r),[])}function M(t){return typeof t=="string"}var xe=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,r){return this._map.set(e,r),super.add(e)}};function We(t){return t instanceof xe}function Q(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function oe(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var De=oe;var Oi=/^\[(.+?)~?="(.*)"\]$/;var Pi=/[\w\u00A0-\uFFFF%-?]/;function Jt(t){return t.match(Oi)}function ye(t=""){return Pi.test(t)}function Qt(t){return typeof t=="function"?{match:t}:t}function ht(t){return t.length===3}function Ne(t){return t!=null}function er(){}var Be=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.has(r)||o.set(r,n),o.get(r)}set(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.set(r,n),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>e(i,r,o)))}},Ke=class extends Map{getFallback(e,r){let n=this.get(e);return n===void 0?(this.set(e,r),r):n}map(e){let r=[];return this.forEach((n,o)=>{r.push(e(n,o))}),r}flatMap(e){let r=[];return this.forEach((n,o)=>{r.push(...e(n,o))}),r}};function ae(t){return M(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function tr(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>ae(e)):[t]:[ae(t)]}function Vi(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}function le(t){return t==null?"":Vi(t).map(([e,r])=>r!=null&&typeof r!="function"?`${e}:${r};`:void 0).filter(Boolean).join("")}function Ge(t){return t&&typeof t=="object"&&!Array.isArray(t)}function mt(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return Ge(n)&&Ge(o)&&Object.keys(o).forEach(s=>{Ge(n[s])&&Ge(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=mt(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function we(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?we(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:we(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?we(n):n;return r}return t}function rr(t){return M(t[0])}function nr(t){return M(t[0])}var He={};function Mi(t=["-",":"]){let e=t.join("|");return He[e]||(He[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),He[e].lastIndex=0,He[e]}function zi(t,e=["-",":"],r=5){let n=Mi(e),o,i=t.toString(),s=new Set,l=new Map;do o=!1,i=i.replace(n,(c,f,p,d,h)=>{if(!e.includes(p))return c;o=!0,s.add(f+p);let m=h+f.length+p.length+1,x={length:c.length,items:[]};l.set(h,x);for(let w of[...d.matchAll(/\S+/g)]){let R=m+w.index,y=l.get(R)?.items;y?l.delete(R):y=[{offset:R,length:w[0].length,className:w[0]}];for(let S of y)S.className=S.className==="~"?f:S.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),x.items.push(S)}return"$".repeat(c.length)}),r-=1;while(o&&r);let a;if(typeof t=="string"){a="";let c=0;for(let[f,p]of l)a+=t.slice(c,f),a+=p.items.map(d=>d.className).join(" "),c=f+p.length;a+=t.slice(c)}else{a=t;for(let[c,f]of l)a.overwrite(c,c+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:l,get expanded(){return a.toString()}}}function or(t,e=["-",":"],r=5){let n=zi(t,e,r);return typeof t=="string"?n.expanded:t}var ir=new Set;function sr(t){ir.has(t)||(console.warn("[unocss]",t),ir.add(t))}function cr(t){return j(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var ar="_uno_resolved";async function Li(t){let e=typeof t=="function"?await t():await t;if(ar in e)return e;e={...e},Object.defineProperty(e,ar,{value:!0,enumerable:!1});let r=e.shortcuts?cr(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=j(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function ur(t){let e=await Li(t);if(!e.presets)return[e];let r=(await Promise.all((e.presets||[]).flatMap(j).flatMap(ur))).flat();return[e,...r]}function Fi(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[],s=[];for(let a of t){if(a.pipeline===!1){n=!0;break}else a.pipeline?.include&&e.push(a.pipeline.include),a.pipeline?.exclude&&r.push(a.pipeline.exclude);a.filesystem&&o.push(a.filesystem),a.inline&&i.push(a.inline),a.plain&&s.push(a.plain)}let l={pipeline:n?!1:{include:B(lr(...e)),exclude:B(lr(...r))}};return o.length&&(l.filesystem=B(o.flat())),i.length&&(l.inline=B(i.flat())),s.length&&(l.plain=B(s.flat())),l}async function gt(t={},e={}){let r=Object.assign({},e,t),n=dt((await Promise.all((r.presets||[]).flatMap(j).flatMap(ur))).flat(),(b,g)=>b.name===g.name),o=[...n.filter(b=>b.enforce==="pre"),...n.filter(b=>!b.enforce),...n.filter(b=>b.enforce==="post")],i=[...o,r],s=[...i].reverse(),l=Object.assign({},Zt,...i.map(b=>b.layers));function a(b){return B(i.flatMap(g=>j(g[b]||[])))}let c=a("extractors"),f=s.find(b=>b.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=Ie),f&&!c.includes(f)&&c.unshift(f),c.sort((b,g)=>(b.order||0)-(g.order||0));let p=a("rules"),d={},h=p.length,m=p.filter(b=>rr(b)?(j(b[2]?.prefix||"").forEach($=>{d[$+b[0]]=b}),!1):!0).reverse(),x=Ui(i.map(b=>b.theme)),w=a("extendTheme");for(let b of w)x=b(x)||x;let R={templates:B(i.flatMap(b=>j(b.autocomplete?.templates))),extractors:i.flatMap(b=>j(b.autocomplete?.extractors)).sort((b,g)=>(b.order||0)-(g.order||0)),shorthands:_i(i.map(b=>b.autocomplete?.shorthands||{}))},y=a("separators");y.length||(y=[":","-"]);let S=a("content"),V=Fi(S),k={mergeSelectors:!0,warn:!0,sortLayers:b=>b,...r,blocklist:a("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:l,theme:x,rules:p,rulesSize:h,rulesDynamic:m,rulesStaticMap:d,preprocess:a("preprocess"),postprocess:a("postprocess"),preflights:a("preflights"),autocomplete:R,variants:a("variants").map(Qt).sort((b,g)=>(b.order||0)-(g.order||0)),shortcuts:cr(a("shortcuts")).reverse(),extractors:c,safelist:a("safelist"),separators:y,details:r.details??r.envMode==="dev",content:V,transformers:dt(a("transformers"),(b,g)=>b.name===g.name)};for(let b of i)b?.configResolved?.(k);return k}function Ui(t){return t.map(e=>e?we(e):{}).reduce((e,r)=>mt(e,r),{})}function _i(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function lr(...t){return t.flatMap(Ii)}function Ii(t){return Array.isArray(t)?t:t?[t]:[]}var fr="0.65.4";function pr(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}}}var ee={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},bt=class t{constructor(e={},r={}){this.userConfig=e;this.defaults=r}version=fr;events=pr();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;static async create(e={},r={}){let n=new t(e,r);return n.config=await gt(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await gt(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(We(s)&&We(n))for(let l of s)n.setCount(l,n.getCount(l)+s.getCount(l));else for(let l of s)n.add(l)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:ee,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(e,r){if(this.blocked.has(e))return;let n=`${e}${r?` ${r}`:""}`;if(this.cache.has(n))return this.cache.get(n);let o=e;for(let a of this.config.preprocess)o=a(e);if(this.isBlocked(o)){this.blocked.add(e),this.cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(a=>!a||this.isBlocked(a[1]))){this.blocked.add(e),this.cache.set(n,null);return}let s=async a=>{let c=this.makeContext(e,[r||a[0],a[1],a[2],a[3]]);this.config.details&&(c.variants=[...a[3]]);let f=await this.expandShortcut(c.currentSelector,c);return f?await this.stringifyShortcuts(c.variantMatch,c,f[0],f[1]):(await this.parseUtil(c.variantMatch,c))?.map(d=>this.stringifyUtil(d,c)).filter(Ne)},l=(await Promise.all(i.map(a=>s(a)))).flat().filter(a=>!!a);if(l?.length)return this.cache.set(n,l),l;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:l=!1,extendedInfo:a=!1}=r,c=M(e)?await this.applyExtractors(e,n,a?new xe:new Set):Array.isArray(e)?new Set(e):e;if(s){let g={generator:this,theme:this.config.theme};this.config.safelist.flatMap($=>typeof $=="function"?$(g):$).forEach($=>{c.has($)||c.add($)})}let f=l?"":`
2
- `,p=new Set([be]),d=a?new Map:new Set,h=new Map,m={},x=Array.from(c).map(async g=>{if(d.has(g))return;let $=await this.parseToken(g);if($!=null){d instanceof Map?d.set(g,{data:$,count:We(c)?c.getCount(g):-1}):d.add(g);for(let C of $){let _=C[3]||"",I=C[4]?.layer;h.has(_)||h.set(_,[]),h.get(_).push(C),I&&p.add(I)}}});await Promise.all(x),await(async()=>{if(!i)return;let g={generator:this,theme:this.config.theme},$=new Set([]);this.config.preflights.forEach(({layer:C=Ue})=>{p.add(C),$.add(C)}),m=Object.fromEntries(await Promise.all(Array.from($).map(async C=>{let I=(await Promise.all(this.config.preflights.filter(H=>(H.layer||Ue)===C).map(async H=>await H.getCSS(g)))).filter(Boolean).join(f);return[C,I]})))})();let w=this.config.sortLayers(Array.from(p).sort((g,$)=>(this.config.layers[g]??0)-(this.config.layers[$]??0)||g.localeCompare($))),R={},y=this.config.outputToCssLayers,S=g=>{let $=g;return typeof y=="object"&&($=y.cssLayerName?.(g)),$===null?null:$??g},V=(g=be)=>{if(R[g])return R[g];let $=Array.from(h).sort((I,H)=>(this.parentOrders.get(I[0])??0)-(this.parentOrders.get(H[0])??0)||I[0]?.localeCompare(H[0]||"")||0).map(([I,H])=>{let v=H.length,E=H.filter(T=>(T[4]?.layer||be)===g).sort((T,F)=>T[0]-F[0]||(T[4]?.sort||0)-(F[4]?.sort||0)||T[5]?.currentSelector?.localeCompare(F[5]?.currentSelector??"")||T[1]?.localeCompare(F[1]||"")||T[2]?.localeCompare(F[2]||"")||0).map(([,T,F,,Fe,,ft])=>[[[(T&&Ni(T,o))??"",Fe?.sort??0]],F,!!(ft??Fe?.noMerge)]);if(!E.length)return;let O=E.reverse().map(([T,F,Fe],ft)=>{if(!Fe&&this.config.mergeSelectors)for(let J=ft+1;J<v;J++){let Y=E[J];if(Y&&!Y[2]&&(T&&Y[0]||T==null&&Y[0]==null)&&Y[1]===F)return T&&Y[0]&&Y[0].push(...T),null}let pt=T?B(T.sort((J,Y)=>J[1]-Y[1]||J[0]?.localeCompare(Y[0]||"")||0).map(J=>J[0]).filter(Boolean)):[];return pt.length?`${pt.join(`,${f}`)}{${F}}`:F}).filter(Boolean).reverse().join(f);if(!I)return O;let z=I.split(" $$ ");return`${z.join("{")}{${f}${O}${f}${"}".repeat(z.length)}`}).filter(Boolean).join(f);i&&($=[m[g],$].filter(Boolean).join(f));let C;y&&$&&(C=S(g),C!==null&&($=`@layer ${C}{${f}${$}${f}}`));let _=l?"":`/* layer: ${g}${C&&C!==g?`, alias: ${C}`:""} */${f}`;return R[g]=$?_+$:""},k=(g=w,$)=>{let C=g.filter(_=>!$?.includes(_));return[y&&C.length>0?`@layer ${C.map(S).filter(Ne).join(", ")};`:void 0,...C.map(_=>V(_)||"")].filter(Boolean).join(f)};return{get css(){return k()},layers:w,matched:d,getLayers:k,getLayer:V,setLayer:async(g,$)=>{let C=await $(V(g));return R[g]=C,C}}}async matchVariants(e,r){let n={rawSelector:e,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,l,a]=i;for(;s;){s=!1;let c=i[1];for(let f of this.config.variants){if(!f.multiPass&&a.has(f))continue;let p=await f.match(c,n);if(p){if(M(p)){if(p===c)continue;p={matcher:p}}if(Array.isArray(p)){if(!p.length)continue;if(p.length===1)p=p[0];else{if(f.multiPass)throw new Error("multiPass can not be used together with array return variants");let d=p.map(h=>{let m=h.matcher??c,x=[h,...l],w=new Set(a);return w.add(f),[i[0],m,x,w]});return(await Promise.all(d.map(h=>o(h)))).flat()}}i[1]=p.matcher??c,l.unshift(p),a.add(f),s=!0;break}}if(!s)break;if(l.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[i]};return await o([e,r||e,[],new Set])}applyVariants(e,r=e[4],n=e[1]){let i=r.slice().sort((c,f)=>(c.order||0)-(f.order||0)).reduceRight((c,f)=>p=>{let d=f.body?.(p.entries)||p.entries,h=Array.isArray(f.parent)?f.parent:[f.parent,void 0];return(f.handle??Ki)({...p,entries:d,selector:f.selector?.(p.selector,d)||p.selector,parent:h[0]||p.parent,parentOrder:h[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},c)},c=>c)({prefix:"",selector:Bi(n),pseudo:"",entries:e[2]}),{parent:s,parentOrder:l}=i;s!=null&&l!=null&&this.parentOrders.set(s,l);let a={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let c of this.config.postprocess)c(a);return a}constructCustomCSS(e,r,n){let o=ae(r);if(M(o))return o;let{selector:i,entries:s,parent:l}=this.applyVariants([0,n||e.rawSelector,o,void 0,e.variantHandlers]),a=`${i}{${le(s)}}`;return l?`${l}{${a}}`:a}async parseUtil(e,r,n=!1,o){let i=M(e)?await this.matchVariants(e):[e],s=async([a,c,f])=>{this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[c];if(p&&p[1]&&(n||!p[2]?.internal)){r.generator.activatedRules.add(p),this.config.details&&r.rules.push(p);let h=this.config.rules.indexOf(p),m=ae(p[1]),x=p[2];return M(m)?[[h,m,x]]:[[h,a,m,x,f]]}r.variantHandlers=f;let{rulesDynamic:d}=this.config;for(let h of d){let[m,x,w]=h;if(w?.internal&&!n)continue;let R=c;if(w?.prefix){let k=j(w.prefix);if(o){let b=j(o);if(!k.some(g=>b.includes(g)))continue}else{let b=k.find(g=>c.startsWith(g));if(b==null)continue;R=c.slice(b.length)}}let y=R.match(m);if(!y)continue;let S=await x(y,r);if(!S)continue;if(r.generator.activatedRules.add(h),this.config.details&&r.rules.push(h),typeof S!="string")if(Symbol.asyncIterator in S){let k=[];for await(let b of S)b&&k.push(b);S=k}else Symbol.iterator in S&&!Array.isArray(S)&&(S=Array.from(S).filter(Ne));let V=tr(S).filter(k=>k.length);if(V.length){let k=this.config.rules.indexOf(h);return V.map(b=>{if(M(b))return[k,b,w];let g=f,$=w;for(let C of b)C[0]===ee.variants?g=[...j(C[1]),...g]:C[0]===ee.parent?g=[{parent:C[1]},...g]:C[0]===ee.selector?g=[{selector:C[1]},...g]:C[0]===ee.layer?g=[{layer:C[1]},...g]:C[0]===ee.sort&&($={...$,sort:C[1]});return[k,a,b,$,g]})}}},l=(await Promise.all(i.map(a=>s(a)))).flat().filter(a=>!!a);if(l.length)return l}stringifyUtil(e,r){if(!e)return;if(ht(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:l,noMerge:a}=this.applyVariants(e),c=le(o);if(!c)return;let{layer:f,sort:p,...d}=e[3]??{},h={...d,layer:s??f,sort:l??p};return[e[0],n,c,i,h,this.config.details?r:void 0,a]}async expandShortcut(e,r,n=5){if(n===0)return;let o=this.config.details?c=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(c)}:er,i,s,l,a;for(let c of this.config.shortcuts){let f=e;if(c[2]?.prefix){let d=j(c[2].prefix).find(h=>e.startsWith(h));if(d==null)continue;f=e.slice(d.length)}if(nr(c)){if(c[0]===f){i=i||c[2],s=c[1],o(c);break}}else{let p=f.match(c[0]);if(p&&(s=c[1](p,r)),s){i=i||c[2],o(c);break}}}if(s&&(l=B(j(s).filter(M).map(c=>or(c.trim()).split(/\s+/g)).flat()),a=j(s).filter(c=>!M(c)).map(c=>({handles:[],value:c}))),!s){let c=M(e)?await this.matchVariants(e):[e];for(let f of c){let[p,d,h]=f;if(p!==d){let m=await this.expandShortcut(d,r,n-1);m&&(l=m[0].filter(M).map(x=>p.replace(d,x)),a=m[0].filter(x=>!M(x)).map(x=>({handles:[...x.handles,...h],value:x.value})))}}}if(!(!l?.length&&!a?.length))return[[await Promise.all(j(l).map(async c=>(await this.expandShortcut(c,r,n-1))?.[0]||[c])),a].flat(2).filter(c=>!!c),i]}async stringifyShortcuts(e,r,n,o={layer:this.config.shortcutsLayer}){let i=new Ke,s=(await Promise.all(B(n).map(async f=>{let p=M(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",ae(f.value),void 0,f.handles]];return!p&&this.config.warn&&sr(`unmatched utility "${f}" in shortcut "${e[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[l,,a]=e,c=[];for(let f of s){if(ht(f)){c.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:d,parent:h,sort:m,noMerge:x,layer:w}=this.applyVariants(f,[...f[4],...a],l);i.getFallback(w??o.layer,new Be).getFallback(p,h,[[],f[0]])[0].push([d,!!(x??f[3]?.noMerge),m??0])}return c.concat(i.flatMap((f,p)=>f.map(([d,h],m,x)=>{let w=(y,S,V)=>{let k=Math.max(...V.map(g=>g[1])),b=V.map(g=>g[0]);return(y?[b.flat(1)]:b).map(g=>{let $=le(g);if($)return[h,m,$,x,{...o,noMerge:S,sort:k,layer:p},r,void 0]})};return[[d.filter(([,y])=>y).map(([y,,S])=>[y,S]),!0],[d.filter(([,y])=>!y).map(([y,,S])=>[y,S]),!1]].map(([y,S])=>[...w(!1,S,y.filter(([V])=>V.some(k=>k[0]===ee.shortcutsNoMerge))),...w(!0,S,y.filter(([V])=>V.every(k=>k[0]!==ee.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(e):M(r)?r===e:r.test(e))}getBlocked(e){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(e):M(o)?o===e:o.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function hr(t,e){return await bt.create(t,e)}var mr=/\s\$\$\s+/g;function Di(t){return mr.test(t)}function Ni(t,e){return Di(t)?t.replace(mr,e?` ${e} `:" "):e?`${e} ${t}`:t}var dr=/^\[(.+?)(~?=)"(.*)"\]$/;function Bi(t){return dr.test(t)?t.replace(dr,(e,r,n,o)=>`[${De(r)}${n}"${De(o)}"]`):`.${De(t)}`}function Ki(t,e){return e(t)}var xt=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function gr(t={}){let e=t.prefix??"un-",r=t.prefixedOnly??!1,n=t.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:s}){let l=Jt(i);if(!l)return;let a=l[1];if(a.startsWith(e))a=a.slice(e.length);else if(r)return;let c=l[2],[,f="",p=c]=c.match(xt)||[];if(p==="~"||n&&p==="true"||!p)return`${f}${a}`;if(o==null){let d=s?.config?.separators?.join("|");d?o=new RegExp(`^(.*\\](?:${d}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,d,h]=c.match(o)||[];if(h)return`${d}${f}${a}-${h}`}if(f&&p.match(/^[\d.]+$/)){let d=f.split(/([^:]*:)/g).filter(Boolean),h=d.pop()+p,m=d.join("");return[{matcher:`${f}${a}-${p}`},{matcher:`${m}${a}-${h}`}]}return`${f}${a}-${p}`}}}var Gi=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,Hi=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,br=/[\s'"`;>]+/;function xr(t){return{name:"attributify",extract:({content:e,cursor:r})=>{let n=e.matchAll(Gi),o,i=0;for(let y of n){let[,S,V]=y,k=y.index+S.length;if(r>k&&r<=k+V.length){i=k,o=V;break}}if(!o)return null;let s=o.matchAll(Hi),l=0,a,c;for(let y of s){let[S,V,k]=y,b=i+y.index;if(r>b&&r<=b+S.length){l=b,a=V,c=k?.slice(1);break}}if(!a||a==="class"||a==="className"||a===":class")return null;let f=!!t?.prefix&&a.startsWith(t.prefix);if(t?.prefixedOnly&&!f)return null;let p=f?a.slice(t.prefix.length):a;if(c===void 0)return{extracted:p,resolveReplacement(y){let S=f?t.prefix.length:0;return{start:l+S,end:l+a.length,replacement:y}}};let d=l+a.length+2,h=br.exec(c),m=0,x;for(;h;){let[y]=h;if(r>d+m&&r<=d+m+h.index){x=c.slice(m,m+h.index);break}m+=h.index+y.length,h=br.exec(c.slice(m))}x===void 0&&(x=c.slice(m));let[,w="",R]=x.match(xt)||[];return{extracted:`${w}${p}-${R}`,transformSuggestions(y){return y.filter(S=>S.startsWith(`${w}${p}-`)).map(S=>w+S.slice(w.length+p.length+1))},resolveReplacement(y){return{start:m+d,end:m+d+x.length,replacement:w+y.slice(w.length+p.length+1)}}}}}}var qi=["v-bind:",":"],yr=/[\s'"`;]+/g,yt=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,Yi=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,wt=["placeholder","fill","opacity","stroke-opacity"];function wr(t){let e=t?.ignoreAttributes??wt,r=t?.nonValuedAttribute??!0,n=t?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(yt)).flatMap(i=>Array.from((i[1]||"").matchAll(Yi))).flatMap(([,i,...s])=>{let l=s.filter(Boolean).join("");if(e.includes(i))return[];for(let a of qi)if(i.startsWith(a)){i=i.slice(a.length);break}if(!l){if(ye(i)&&r!==!1){let a=[`[${i}=""]`];return n&&a.push(`[${i}="true"]`),a}return[]}return["class","className"].includes(i)?l.split(yr).filter(ye):yt.test(l)?(yt.lastIndex=0,this.extract({code:l})):t?.prefixedOnly&&t.prefix&&!i.startsWith(t.prefix)?[]:l.split(yr).filter(a=>!!a&&a!==":").map(a=>`[${i}~="${a}"]`)})}}}var Xi=(t={})=>{t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??wt;let e=[gr(t)],r=[wr(t)],n=[xr(t)];return{name:"@unocss/preset-attributify",enforce:"post",variants:e,extractors:r,options:t,autocomplete:{extractors:n},extractorDefault:t.strict?!1:void 0}},$r=Xi;function Zi(t){let e,r,n=2166136261;for(e=0,r=t.length;e<r;e++)n^=t.charCodeAt(e),n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24);return`00000${(n>>>0).toString(36)}`.slice(-6)}function Sr(t,e,r,n){for(let o of Array.from(t.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${Zi(i)}`;e.set(s,i),t=t.replace(i,s)}return t}function vr(t,e){for(let[r,n]of e.entries())t=t.replaceAll(r,n);return t}var Ji=/\/\/#\s*sourceMappingURL=.*\n?/g;function Cr(t){return t.includes("sourceMappingURL=")?t.replace(Ji,""):t}var Qi=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,es=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,ts=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function rs(t){let e=[];for(let o of t.matchAll(es))o.index!==0&&!/^[\s'"`]/.test(t[o.index-1]??"")||e.push(o[0]);for(let o of t.matchAll(Qi))e.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return t=Sr(t,r,/-\[(?!&.+?;)[^\]]*\]/g,n),t&&t.split(_e).forEach(o=>{o.includes(n)&&(o=vr(o,r)),ye(o)&&!ts.test(o)&&e.push(o)}),e}function kr(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:t}){return rs(Cr(t))}}}function Rr(t){if(t.preflight)return[{layer:"preflights",getCSS({theme:e,generator:r}){if(e.preflightBase){let n=Object.entries(e.preflightBase);if(t.preflight==="on-demand"){let o=new Set(Array.from(r.activatedRules).map(i=>i[2]?.custom?.preflightKeys).filter(Boolean).flat());n=n.filter(([i])=>o.has(i))}if(n.length>0){let o=le(n);return t.variablePrefix!=="un-"&&(o=o.replace(/--un-/g,`--${t.variablePrefix}`)),j(e.preflightRoot??["*,::before,::after","::backdrop"]).map(s=>`${s}{${o}}`).join("")}}}}]}function ce(t,e,r){if(t==="")return;let n=t.length,o=0,i=!1,s=0;for(let l=0;l<n;l++)switch(t[l]){case e:i||(i=!0,s=l),o++;break;case r:if(--o,o<0)return;if(o===0)return[t.slice(s,l+1),t.slice(l+1),t.slice(0,s)];break}}function ue(t,e,r,n){if(t===""||(M(n)&&(n=[n]),n.length===0))return;let o=t.length,i=0;for(let s=0;s<o;s++)switch(t[s]){case e:i++;break;case r:if(--i<0)return;break;default:for(let l of n){let a=l.length;if(a&&l===t.slice(s,s+a)&&i===0)return s===0||s===o-a?void 0:[t.slice(0,s),t.slice(s+a)]}}return[t,""]}function fe(t,e,r){r=r??10;let n=[],o=0;for(;t!=="";){if(++o>r)return;let i=ue(t,"(",")",e);if(!i)return;let[s,l]=i;n.push(s),t=l}if(n.length>0)return n}var $t=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],Tr=["%alpha","<alpha-value>"],ns=new RegExp(Tr.map(t=>Q(t)).join("|"));function te(t=""){let e=os(t);if(e==null||e===!1)return;let{type:r,components:n,alpha:o}=e,i=r.toLowerCase();if(n.length!==0&&!($t.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function $e(t){let e=t.alpha??1;return typeof e=="string"&&Tr.includes(e)?1:e}function W(t,e){if(typeof t=="string")return t.replace(ns,`${e??1}`);let{components:r}=t,{alpha:n,type:o}=t;return n=e??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,$t.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function os(t){if(!t)return;let e=is(t);if(e!=null||(e=ss(t),e!=null)||(e=as(t),e!=null)||(e=cs(t),e!=null)||(e=us(t),e!=null))return e}function is(t){let[,e]=t.match(/^#([\da-f]+)$/i)||[];if(e)switch(e.length){case 3:case 4:let r=Array.from(e,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return{type:"rgb",components:r.slice(0,3),alpha:e.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(e,16);return{type:"rgb",components:e.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:e.length===6?void 0:Math.round((n&255)/255*100)/100}}}function ss(t){let e={rebeccapurple:[102,51,153,1]}[t];if(e!=null)return{type:"rgb",components:e.slice(0,3),alpha:e[3]}}function as(t){let e=t.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!e)return;let[,r,n]=e,o=fe(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var ls=new RegExp(`^(${$t.join("|")})\\((.+)\\)$`,"i");function cs(t){let e=t.match(ls);if(!e)return;let[,r,n]=e,o=Er(`${r} ${n}`);if(o){let{alpha:i,components:[s,...l]}=o;return{type:s,components:l,alpha:i}}}function us(t){let e=t.match(/^color\((.+)\)$/);if(!e)return;let r=Er(e[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function Er(t){let e=fe(t," ");if(!e)return;let r=e.length;if(e[r-2]==="/")return{components:e.slice(0,r-2),alpha:e[r-1]};if(e[r-2]!=null&&(e[r-2].endsWith("/")||e[r-1].startsWith("/"))){let i=e.splice(r-2);e.push(i.join(" ")),--r}let n=fe(e[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:e};let o=n.pop();return e[r-1]=n.join("/"),{components:e,alpha:o}}function jr(t){let e=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=t[i](n);if(s!=null)return s}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(t))Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get(){return r(this,n)}});return e}var Ar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vr=new Uint8Array(64),fs=new Uint8Array(128);for(let t=0;t<Ar.length;t++){let e=Ar.charCodeAt(t);Vr[t]=e,fs[e]=t}function Se(t,e,r){let n=e-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),t.write(Vr[o])}while(n>0);return e}var Or=1024*16,Pr=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}},St=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Or)}write(e){let{buffer:r}=this;r[this.pos++]=e,this.pos===Or&&(this.out+=Pr.decode(r),this.pos=0)}flush(){let{buffer:e,out:r,pos:n}=this;return n>0?r+Pr.decode(e.subarray(0,n)):r}};function Mr(t){let e=new St,r=0,n=0,o=0,i=0;for(let s=0;s<t.length;s++){let l=t[s];if(s>0&&e.write(59),l.length===0)continue;let a=0;for(let c=0;c<l.length;c++){let f=l[c];c>0&&e.write(44),a=Se(e,f[0],a),f.length!==1&&(r=Se(e,f[1],r),n=Se(e,f[2],n),o=Se(e,f[3],o),f.length!==4&&(i=Se(e,f[4],i)))}}return e.flush()}var qe=class t{constructor(e){this.bits=e instanceof t?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},Ye=class t{constructor(e,r,n){this.start=e,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new t(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let r=e-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new t(e,this.end,o);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.content.replace(e,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};function ps(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var ds=ps(),vt=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Mr(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+ds(this.toString())}};function hs(t){let e=t.split(`
1
+ "use strict";(()=>{var Ri=Object.defineProperty;var Ti=(t,e)=>{for(var r in e)Ri(t,r,{get:e[r],enumerable:!0})};var be="default",Ue="preflights",Ei="shortcuts",ji="imports",Zt={[ji]:-200,[Ue]:-100,[Ei]:-10,[be]:0};var _e=/[\\:]?[\s'"`;{}]+/g;function Ai(t){return t.split(_e)}var Ie={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ai(t)}};function j(t=[]){return Array.isArray(t)?t:[t]}function B(t){return Array.from(new Set(t))}function dt(t,e){return t.reduce((r,n)=>(r.findIndex(i=>e(n,i))===-1&&r.push(n),r),[])}function M(t){return typeof t=="string"}var xe=class extends Set{_map;constructor(e){super(e),this._map??=new Map}add(e){return this._map??=new Map,this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,r){return this._map.set(e,r),super.add(e)}};function We(t){return t instanceof xe}function Q(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function oe(t){let e=t.length,r=-1,n,o="",i=t.charCodeAt(0);for(;++r<e;){if(n=t.charCodeAt(r),n===0){o+="\uFFFD";continue}if(n===37){o+="\\%";continue}if(n===44){o+="\\,";continue}if(n>=1&&n<=31||n===127||r===0&&n>=48&&n<=57||r===1&&n>=48&&n<=57&&i===45){o+=`\\${n.toString(16)} `;continue}if(r===0&&e===1&&n===45){o+=`\\${t.charAt(r)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}var De=oe;function Jt(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(r=>r(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(r=>r!==e)}}}var Oi=/^\[(.+?)~?="(.*)"\]$/;var Pi=/[\w\u00A0-\uFFFF%-?]/;function Qt(t){return t.match(Oi)}function ye(t=""){return Pi.test(t)}function er(t){return typeof t=="function"?{match:t}:t}function ht(t){return t.length===3}function Ne(t){return t!=null}function tr(){}var Be=class{_map=new Map;get(e,r){let n=this._map.get(e);if(n)return n.get(r)}getFallback(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.has(r)||o.set(r,n),o.get(r)}set(e,r,n){let o=this._map.get(e);return o||(o=new Map,this._map.set(e,o)),o.set(r,n),this}has(e,r){return this._map.get(e)?.has(r)}delete(e,r){return this._map.get(e)?.delete(r)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([r,n])=>Array.from(n.entries()).map(([o,i])=>e(i,r,o)))}},Ke=class extends Map{getFallback(e,r){let n=this.get(e);return n===void 0?(this.set(e,r),r):n}map(e){let r=[];return this.forEach((n,o)=>{r.push(e(n,o))}),r}flatMap(e){let r=[];return this.forEach((n,o)=>{r.push(...e(n,o))}),r}};function ae(t){return M(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function rr(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>ae(e)):[t]:[ae(t)]}function Vi(t){return t.filter(([e,r],n)=>{if(e.startsWith("$$"))return!1;for(let o=n-1;o>=0;o--)if(t[o][0]===e&&t[o][1]===r)return!1;return!0})}function le(t){return t==null?"":Vi(t).map(([e,r])=>r!=null&&typeof r!="function"?`${e}:${r};`:void 0).filter(Boolean).join("")}function Ge(t){return t&&typeof t=="object"&&!Array.isArray(t)}function mt(t,e,r=!1){let n=t,o=e;if(Array.isArray(o))return r&&Array.isArray(o)?[...n,...o]:[...o];let i={...n};return Ge(n)&&Ge(o)&&Object.keys(o).forEach(s=>{Ge(n[s])&&Ge(o[s])||Array.isArray(n[s])&&Array.isArray(o[s])?i[s]=mt(n[s],o[s],r):Object.assign(i,{[s]:o[s]})}),i}function we(t){let e,r,n;if(Array.isArray(t)){for(r=Array.from({length:e=t.length});e--;)r[e]=(n=t[e])&&typeof n=="object"?we(n):n;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:we(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(n=t[e])&&typeof n=="object"?we(n):n;return r}return t}function nr(t){return M(t[0])}function or(t){return M(t[0])}var He={};function Mi(t=["-",":"]){let e=t.join("|");return He[e]||(He[e]=new RegExp(`((?:[!@<~\\w+:_-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),He[e].lastIndex=0,He[e]}function zi(t,e=["-",":"],r=5){let n=Mi(e),o,i=t.toString(),s=new Set,l=new Map;do o=!1,i=i.replace(n,(c,f,p,d,h)=>{if(!e.includes(p))return c;o=!0,s.add(f+p);let m=h+f.length+p.length+1,x={length:c.length,items:[]};l.set(h,x);for(let w of[...d.matchAll(/\S+/g)]){let R=m+w.index,y=l.get(R)?.items;y?l.delete(R):y=[{offset:R,length:w[0].length,className:w[0]}];for(let S of y)S.className=S.className==="~"?f:S.className.replace(/^(!?)(.*)/,`$1${f}${p}$2`),x.items.push(S)}return"$".repeat(c.length)}),r-=1;while(o&&r);let a;if(typeof t=="string"){a="";let c=0;for(let[f,p]of l)a+=t.slice(c,f),a+=p.items.map(d=>d.className).join(" "),c=f+p.length;a+=t.slice(c)}else{a=t;for(let[c,f]of l)a.overwrite(c,c+f.length,f.items.map(p=>p.className).join(" "))}return{prefixes:Array.from(s),hasChanged:o,groupsByOffset:l,get expanded(){return a.toString()}}}function ir(t,e=["-",":"],r=5){let n=zi(t,e,r);return typeof t=="string"?n.expanded:t}var sr=new Set;function ar(t){sr.has(t)||(console.warn("[unocss]",t),sr.add(t))}function ur(t){return j(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var lr="_uno_resolved";async function Li(t){let e=typeof t=="function"?await t():await t;if(lr in e)return e;e={...e},Object.defineProperty(e,lr,{value:!0,enumerable:!1});let r=e.shortcuts?ur(e.shortcuts):void 0;if(e.shortcuts=r,e.prefix||e.layer){let n=o=>{o[2]||(o[2]={});let i=o[2];i.prefix==null&&e.prefix&&(i.prefix=j(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};r?.forEach(n),e.rules?.forEach(n)}return e}async function fr(t){let e=await Li(t);if(!e.presets)return[e];let r=(await Promise.all((e.presets||[]).flatMap(j).flatMap(fr))).flat();return[e,...r]}function Fi(t){if(t.length===0)return{};let e=[],r=[],n=!1,o=[],i=[],s=[];for(let a of t){if(a.pipeline===!1){n=!0;break}else a.pipeline?.include&&e.push(a.pipeline.include),a.pipeline?.exclude&&r.push(a.pipeline.exclude);a.filesystem&&o.push(a.filesystem),a.inline&&i.push(a.inline),a.plain&&s.push(a.plain)}let l={pipeline:n?!1:{include:B(cr(...e)),exclude:B(cr(...r))}};return o.length&&(l.filesystem=B(o.flat())),i.length&&(l.inline=B(i.flat())),s.length&&(l.plain=B(s.flat())),l}async function gt(t={},e={}){let r=Object.assign({},e,t),n=dt((await Promise.all((r.presets||[]).flatMap(j).flatMap(fr))).flat(),(b,g)=>b.name===g.name),o=[...n.filter(b=>b.enforce==="pre"),...n.filter(b=>!b.enforce),...n.filter(b=>b.enforce==="post")],i=[...o,r],s=[...i].reverse(),l=Object.assign({},Zt,...i.map(b=>b.layers));function a(b){return B(i.flatMap(g=>j(g[b]||[])))}let c=a("extractors"),f=s.find(b=>b.extractorDefault!==void 0)?.extractorDefault;f===void 0&&(f=Ie),f&&!c.includes(f)&&c.unshift(f),c.sort((b,g)=>(b.order||0)-(g.order||0));let p=a("rules"),d={},h=p.length,m=p.filter(b=>nr(b)?(j(b[2]?.prefix||"").forEach($=>{d[$+b[0]]=b}),!1):!0).reverse(),x=Ui(i.map(b=>b.theme)),w=a("extendTheme");for(let b of w)x=b(x)||x;let R={templates:B(i.flatMap(b=>j(b.autocomplete?.templates))),extractors:i.flatMap(b=>j(b.autocomplete?.extractors)).sort((b,g)=>(b.order||0)-(g.order||0)),shorthands:_i(i.map(b=>b.autocomplete?.shorthands||{}))},y=a("separators");y.length||(y=[":","-"]);let S=a("content"),V=Fi(S),k={mergeSelectors:!0,warn:!0,sortLayers:b=>b,...r,blocklist:a("blocklist"),presets:o,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:l,theme:x,rules:p,rulesSize:h,rulesDynamic:m,rulesStaticMap:d,preprocess:a("preprocess"),postprocess:a("postprocess"),preflights:a("preflights"),autocomplete:R,variants:a("variants").map(er).sort((b,g)=>(b.order||0)-(g.order||0)),shortcuts:ur(a("shortcuts")).reverse(),extractors:c,safelist:a("safelist"),separators:y,details:r.details??r.envMode==="dev",content:V,transformers:dt(a("transformers"),(b,g)=>b.name===g.name)};for(let b of i)b?.configResolved?.(k);return k}function Ui(t){return t.map(e=>e?we(e):{}).reduce((e,r)=>mt(e,r),{})}function _i(t){return t.reduce((e,r)=>{let n={};for(let o in r){let i=r[o];Array.isArray(i)?n[o]=`(${i.join("|")})`:n[o]=i}return{...e,...n}},{})}function cr(...t){return t.flatMap(Ii)}function Ii(t){return Array.isArray(t)?t:t?[t]:[]}var pr="65.4.2";var ee={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector",layer:"$$symbol-layer",sort:"$$symbol-sort"},bt=class t{constructor(e={},r={}){this.userConfig=e;this.defaults=r}version=pr;events=Jt();config=void 0;cache=new Map;blocked=new Set;parentOrders=new Map;activatedRules=new Set;static async create(e={},r={}){let n=new t(e,r);return n.config=await gt(n.userConfig,n.defaults),n.events.emit("config",n.config),n}async setConfig(e,r){e&&(r&&(this.defaults=r),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this.activatedRules.clear(),this.cache.clear(),this.config=await gt(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,r,n=new Set){let o={original:e,code:e,id:r,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let s=await i.extract?.(o);if(s)if(We(s)&&We(n))for(let l of s)n.setCount(l,n.getCount(l)+s.getCount(l));else for(let l of s)n.add(l)}return n}makeContext(e,r){let n={rawSelector:e,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:ee,variantHandlers:r[2],constructCSS:(...o)=>this.constructCustomCSS(n,...o),variantMatch:r};return n}async parseToken(e,r){if(this.blocked.has(e))return;let n=`${e}${r?` ${r}`:""}`;if(this.cache.has(n))return this.cache.get(n);let o=e;for(let a of this.config.preprocess)o=a(e);if(this.isBlocked(o)){this.blocked.add(e),this.cache.set(n,null);return}let i=await this.matchVariants(e,o);if(i.every(a=>!a||this.isBlocked(a[1]))){this.blocked.add(e),this.cache.set(n,null);return}let s=async a=>{let c=this.makeContext(e,[r||a[0],a[1],a[2],a[3]]);this.config.details&&(c.variants=[...a[3]]);let f=await this.expandShortcut(c.currentSelector,c);return f?await this.stringifyShortcuts(c.variantMatch,c,f[0],f[1]):(await this.parseUtil(c.variantMatch,c))?.map(d=>this.stringifyUtil(d,c)).filter(Ne)},l=(await Promise.all(i.map(a=>s(a)))).flat().filter(a=>!!a);if(l?.length)return this.cache.set(n,l),l;this.cache.set(n,null)}async generate(e,r={}){let{id:n,scope:o,preflights:i=!0,safelist:s=!0,minify:l=!1,extendedInfo:a=!1}=r,c=M(e)?await this.applyExtractors(e,n,a?new xe:new Set):Array.isArray(e)?new Set(e):e;if(s){let g={generator:this,theme:this.config.theme};this.config.safelist.flatMap($=>typeof $=="function"?$(g):$).forEach($=>{c.has($)||c.add($)})}let f=l?"":`
2
+ `,p=new Set([be]),d=a?new Map:new Set,h=new Map,m={},x=Array.from(c).map(async g=>{if(d.has(g))return;let $=await this.parseToken(g);if($!=null){d instanceof Map?d.set(g,{data:$,count:We(c)?c.getCount(g):-1}):d.add(g);for(let C of $){let _=C[3]||"",I=C[4]?.layer;h.has(_)||h.set(_,[]),h.get(_).push(C),I&&p.add(I)}}});await Promise.all(x),await(async()=>{if(!i)return;let g={generator:this,theme:this.config.theme},$=new Set([]);this.config.preflights.forEach(({layer:C=Ue})=>{p.add(C),$.add(C)}),m=Object.fromEntries(await Promise.all(Array.from($).map(async C=>{let I=(await Promise.all(this.config.preflights.filter(H=>(H.layer||Ue)===C).map(async H=>await H.getCSS(g)))).filter(Boolean).join(f);return[C,I]})))})();let w=this.config.sortLayers(Array.from(p).sort((g,$)=>(this.config.layers[g]??0)-(this.config.layers[$]??0)||g.localeCompare($))),R={},y=this.config.outputToCssLayers,S=g=>{let $=g;return typeof y=="object"&&($=y.cssLayerName?.(g)),$===null?null:$??g},V=(g=be)=>{if(R[g])return R[g];let $=Array.from(h).sort((I,H)=>(this.parentOrders.get(I[0])??0)-(this.parentOrders.get(H[0])??0)||I[0]?.localeCompare(H[0]||"")||0).map(([I,H])=>{let v=H.length,E=H.filter(T=>(T[4]?.layer||be)===g).sort((T,F)=>T[0]-F[0]||(T[4]?.sort||0)-(F[4]?.sort||0)||T[5]?.currentSelector?.localeCompare(F[5]?.currentSelector??"")||T[1]?.localeCompare(F[1]||"")||T[2]?.localeCompare(F[2]||"")||0).map(([,T,F,,Fe,,ft])=>[[[(T&&Ni(T,o))??"",Fe?.sort??0]],F,!!(ft??Fe?.noMerge)]);if(!E.length)return;let O=E.reverse().map(([T,F,Fe],ft)=>{if(!Fe&&this.config.mergeSelectors)for(let J=ft+1;J<v;J++){let Y=E[J];if(Y&&!Y[2]&&(T&&Y[0]||T==null&&Y[0]==null)&&Y[1]===F)return T&&Y[0]&&Y[0].push(...T),null}let pt=T?B(T.sort((J,Y)=>J[1]-Y[1]||J[0]?.localeCompare(Y[0]||"")||0).map(J=>J[0]).filter(Boolean)):[];return pt.length?`${pt.join(`,${f}`)}{${F}}`:F}).filter(Boolean).reverse().join(f);if(!I)return O;let z=I.split(" $$ ");return`${z.join("{")}{${f}${O}${f}${"}".repeat(z.length)}`}).filter(Boolean).join(f);i&&($=[m[g],$].filter(Boolean).join(f));let C;y&&$&&(C=S(g),C!==null&&($=`@layer ${C}{${f}${$}${f}}`));let _=l?"":`/* layer: ${g}${C&&C!==g?`, alias: ${C}`:""} */${f}`;return R[g]=$?_+$:""},k=(g=w,$)=>{let C=g.filter(_=>!$?.includes(_));return[y&&C.length>0?`@layer ${C.map(S).filter(Ne).join(", ")};`:void 0,...C.map(_=>V(_)||"")].filter(Boolean).join(f)};return{get css(){return k()},layers:w,matched:d,getLayers:k,getLayer:V,setLayer:async(g,$)=>{let C=await $(V(g));return R[g]=C,C}}}async matchVariants(e,r){let n={rawSelector:e,theme:this.config.theme,generator:this},o=async i=>{let s=!0,[,,l,a]=i;for(;s;){s=!1;let c=i[1];for(let f of this.config.variants){if(!f.multiPass&&a.has(f))continue;let p=await f.match(c,n);if(p){if(M(p)){if(p===c)continue;p={matcher:p}}if(Array.isArray(p)){if(!p.length)continue;if(p.length===1)p=p[0];else{if(f.multiPass)throw new Error("multiPass can not be used together with array return variants");let d=p.map(h=>{let m=h.matcher??c,x=[h,...l],w=new Set(a);return w.add(f),[i[0],m,x,w]});return(await Promise.all(d.map(h=>o(h)))).flat()}}i[1]=p.matcher??c,l.unshift(p),a.add(f),s=!0;break}}if(!s)break;if(l.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[i]};return await o([e,r||e,[],new Set])}applyVariants(e,r=e[4],n=e[1]){let i=r.slice().sort((c,f)=>(c.order||0)-(f.order||0)).reduceRight((c,f)=>p=>{let d=f.body?.(p.entries)||p.entries,h=Array.isArray(f.parent)?f.parent:[f.parent,void 0];return(f.handle??Ki)({...p,entries:d,selector:f.selector?.(p.selector,d)||p.selector,parent:h[0]||p.parent,parentOrder:h[1]||p.parentOrder,layer:f.layer||p.layer,sort:f.sort||p.sort},c)},c=>c)({prefix:"",selector:Bi(n),pseudo:"",entries:e[2]}),{parent:s,parentOrder:l}=i;s!=null&&l!=null&&this.parentOrders.set(s,l);let a={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:s,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let c of this.config.postprocess)c(a);return a}constructCustomCSS(e,r,n){let o=ae(r);if(M(o))return o;let{selector:i,entries:s,parent:l}=this.applyVariants([0,n||e.rawSelector,o,void 0,e.variantHandlers]),a=`${i}{${le(s)}}`;return l?`${l}{${a}}`:a}async parseUtil(e,r,n=!1,o){let i=M(e)?await this.matchVariants(e):[e],s=async([a,c,f])=>{this.config.details&&(r.rules=r.rules??[]);let p=this.config.rulesStaticMap[c];if(p&&p[1]&&(n||!p[2]?.internal)){r.generator.activatedRules.add(p),this.config.details&&r.rules.push(p);let h=this.config.rules.indexOf(p),m=ae(p[1]),x=p[2];return M(m)?[[h,m,x]]:[[h,a,m,x,f]]}r.variantHandlers=f;let{rulesDynamic:d}=this.config;for(let h of d){let[m,x,w]=h;if(w?.internal&&!n)continue;let R=c;if(w?.prefix){let k=j(w.prefix);if(o){let b=j(o);if(!k.some(g=>b.includes(g)))continue}else{let b=k.find(g=>c.startsWith(g));if(b==null)continue;R=c.slice(b.length)}}let y=R.match(m);if(!y)continue;let S=await x(y,r);if(!S)continue;if(r.generator.activatedRules.add(h),this.config.details&&r.rules.push(h),typeof S!="string")if(Symbol.asyncIterator in S){let k=[];for await(let b of S)b&&k.push(b);S=k}else Symbol.iterator in S&&!Array.isArray(S)&&(S=Array.from(S).filter(Ne));let V=rr(S).filter(k=>k.length);if(V.length){let k=this.config.rules.indexOf(h);return V.map(b=>{if(M(b))return[k,b,w];let g=f,$=w;for(let C of b)C[0]===ee.variants?g=[...j(C[1]),...g]:C[0]===ee.parent?g=[{parent:C[1]},...g]:C[0]===ee.selector?g=[{selector:C[1]},...g]:C[0]===ee.layer?g=[{layer:C[1]},...g]:C[0]===ee.sort&&($={...$,sort:C[1]});return[k,a,b,$,g]})}}},l=(await Promise.all(i.map(a=>s(a)))).flat().filter(a=>!!a);if(l.length)return l}stringifyUtil(e,r){if(!e)return;if(ht(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?r:void 0,void 0];let{selector:n,entries:o,parent:i,layer:s,sort:l,noMerge:a}=this.applyVariants(e),c=le(o);if(!c)return;let{layer:f,sort:p,...d}=e[3]??{},h={...d,layer:s??f,sort:l??p};return[e[0],n,c,i,h,this.config.details?r:void 0,a]}async expandShortcut(e,r,n=5){if(n===0)return;let o=this.config.details?c=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(c)}:tr,i,s,l,a;for(let c of this.config.shortcuts){let f=e;if(c[2]?.prefix){let d=j(c[2].prefix).find(h=>e.startsWith(h));if(d==null)continue;f=e.slice(d.length)}if(or(c)){if(c[0]===f){i=i||c[2],s=c[1],o(c);break}}else{let p=f.match(c[0]);if(p&&(s=c[1](p,r)),s){i=i||c[2],o(c);break}}}if(s&&(l=B(j(s).filter(M).map(c=>ir(c.trim()).split(/\s+/g)).flat()),a=j(s).filter(c=>!M(c)).map(c=>({handles:[],value:c}))),!s){let c=M(e)?await this.matchVariants(e):[e];for(let f of c){let[p,d,h]=f;if(p!==d){let m=await this.expandShortcut(d,r,n-1);m&&(l=m[0].filter(M).map(x=>p.replace(d,x)),a=m[0].filter(x=>!M(x)).map(x=>({handles:[...x.handles,...h],value:x.value})))}}}if(!(!l?.length&&!a?.length))return[[await Promise.all(j(l).map(async c=>(await this.expandShortcut(c,r,n-1))?.[0]||[c])),a].flat(2).filter(c=>!!c),i]}async stringifyShortcuts(e,r,n,o={layer:this.config.shortcutsLayer}){let i=new Ke,s=(await Promise.all(B(n).map(async f=>{let p=M(f)?await this.parseUtil(f,r,!0,o.prefix):[[Number.POSITIVE_INFINITY,"{inline}",ae(f.value),void 0,f.handles]];return!p&&this.config.warn&&ar(`unmatched utility "${f}" in shortcut "${e[1]}"`),p||[]}))).flat(1).filter(Boolean).sort((f,p)=>f[0]-p[0]),[l,,a]=e,c=[];for(let f of s){if(ht(f)){c.push([f[0],void 0,f[1],void 0,f[2],r,void 0]);continue}let{selector:p,entries:d,parent:h,sort:m,noMerge:x,layer:w}=this.applyVariants(f,[...f[4],...a],l);i.getFallback(w??o.layer,new Be).getFallback(p,h,[[],f[0]])[0].push([d,!!(x??f[3]?.noMerge),m??0])}return c.concat(i.flatMap((f,p)=>f.map(([d,h],m,x)=>{let w=(y,S,V)=>{let k=Math.max(...V.map(g=>g[1])),b=V.map(g=>g[0]);return(y?[b.flat(1)]:b).map(g=>{let $=le(g);if($)return[h,m,$,x,{...o,noMerge:S,sort:k,layer:p},r,void 0]})};return[[d.filter(([,y])=>y).map(([y,,S])=>[y,S]),!0],[d.filter(([,y])=>!y).map(([y,,S])=>[y,S]),!1]].map(([y,S])=>[...w(!1,S,y.filter(([V])=>V.some(k=>k[0]===ee.shortcutsNoMerge))),...w(!0,S,y.filter(([V])=>V.every(k=>k[0]!==ee.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(e):M(r)?r===e:r.test(e))}getBlocked(e){let r=this.config.blocklist.find(n=>{let o=Array.isArray(n)?n[0]:n;return typeof o=="function"?o(e):M(o)?o===e:o.test(e)});return r?Array.isArray(r)?r:[r,void 0]:void 0}};async function hr(t,e){return await bt.create(t,e)}var mr=/\s\$\$\s+/g;function Di(t){return mr.test(t)}function Ni(t,e){return Di(t)?t.replace(mr,e?` ${e} `:" "):e?`${e} ${t}`:t}var dr=/^\[(.+?)(~?=)"(.*)"\]$/;function Bi(t){return dr.test(t)?t.replace(dr,(e,r,n,o)=>`[${De(r)}${n}"${De(o)}"]`):`.${De(t)}`}function Ki(t,e){return e(t)}var xt=/^(?!.*\[[^:]+:.+\]$)((?:.+:)?!?)(.*)$/;function gr(t={}){let e=t.prefix??"un-",r=t.prefixedOnly??!1,n=t.trueToNonValued??!1,o;return{name:"attributify",match(i,{generator:s}){let l=Qt(i);if(!l)return;let a=l[1];if(a.startsWith(e))a=a.slice(e.length);else if(r)return;let c=l[2],[,f="",p=c]=c.match(xt)||[];if(p==="~"||n&&p==="true"||!p)return`${f}${a}`;if(o==null){let d=s?.config?.separators?.join("|");d?o=new RegExp(`^(.*\\](?:${d}))(\\[[^\\]]+?\\])$`):o=!1}if(o){let[,d,h]=c.match(o)||[];if(h)return`${d}${f}${a}-${h}`}if(f&&p.match(/^[\d.]+$/)){let d=f.split(/([^:]*:)/g).filter(Boolean),h=d.pop()+p,m=d.join("");return[{matcher:`${f}${a}-${p}`},{matcher:`${m}${a}-${h}`}]}return`${f}${a}-${p}`}}}var Gi=/(<\w[\w:.$-]*\s)((?:'[^>']*'|"[^>"]*"|`[^>`]*`|\{[^>}]*\}|[^>]*?)*)/g,Hi=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF-:%]+)(?:=("[^"]*|'[^']*))?/g,br=/[\s'"`;>]+/;function xr(t){return{name:"attributify",extract:({content:e,cursor:r})=>{let n=e.matchAll(Gi),o,i=0;for(let y of n){let[,S,V]=y,k=y.index+S.length;if(r>k&&r<=k+V.length){i=k,o=V;break}}if(!o)return null;let s=o.matchAll(Hi),l=0,a,c;for(let y of s){let[S,V,k]=y,b=i+y.index;if(r>b&&r<=b+S.length){l=b,a=V,c=k?.slice(1);break}}if(!a||a==="class"||a==="className"||a===":class")return null;let f=!!t?.prefix&&a.startsWith(t.prefix);if(t?.prefixedOnly&&!f)return null;let p=f?a.slice(t.prefix.length):a;if(c===void 0)return{extracted:p,resolveReplacement(y){let S=f?t.prefix.length:0;return{start:l+S,end:l+a.length,replacement:y}}};let d=l+a.length+2,h=br.exec(c),m=0,x;for(;h;){let[y]=h;if(r>d+m&&r<=d+m+h.index){x=c.slice(m,m+h.index);break}m+=h.index+y.length,h=br.exec(c.slice(m))}x===void 0&&(x=c.slice(m));let[,w="",R]=x.match(xt)||[];return{extracted:`${w}${p}-${R}`,transformSuggestions(y){return y.filter(S=>S.startsWith(`${w}${p}-`)).map(S=>w+S.slice(w.length+p.length+1))},resolveReplacement(y){return{start:m+d,end:m+d+x.length,replacement:w+y.slice(w.length+p.length+1)}}}}}}var qi=["v-bind:",":"],yr=/[\s'"`;]+/g,yt=/<[^>\s]*\s((?:'[^']*'|"[^"]*"|`[^`]*`|\{[^}]*\}|=>|[^>]*?)*)/g,Yi=/(\?|(?!\d|-{2}|-\d)[\w\u00A0-\uFFFF:!%.~<-]+)=?(?:"([^"]*)"|'([^']*)'|\{([^}]*)\})?/g,wt=["placeholder","fill","opacity","stroke-opacity"];function wr(t){let e=t?.ignoreAttributes??wt,r=t?.nonValuedAttribute??!0,n=t?.trueToNonValued??!1;return{name:"@unocss/preset-attributify/extractor",extract({code:o}){return Array.from(o.matchAll(yt)).flatMap(i=>Array.from((i[1]||"").matchAll(Yi))).flatMap(([,i,...s])=>{let l=s.filter(Boolean).join("");if(e.includes(i))return[];for(let a of qi)if(i.startsWith(a)){i=i.slice(a.length);break}if(!l){if(ye(i)&&r!==!1){let a=[`[${i}=""]`];return n&&a.push(`[${i}="true"]`),a}return[]}return["class","className"].includes(i)?l.split(yr).filter(ye):yt.test(l)?(yt.lastIndex=0,this.extract({code:l})):t?.prefixedOnly&&t.prefix&&!i.startsWith(t.prefix)?[]:l.split(yr).filter(a=>!!a&&a!==":").map(a=>`[${i}~="${a}"]`)})}}}var Xi=(t={})=>{t.strict=t.strict??!1,t.prefix=t.prefix??"un-",t.prefixedOnly=t.prefixedOnly??!1,t.nonValuedAttribute=t.nonValuedAttribute??!0,t.ignoreAttributes=t.ignoreAttributes??wt;let e=[gr(t)],r=[wr(t)],n=[xr(t)];return{name:"@unocss/preset-attributify",enforce:"post",variants:e,extractors:r,options:t,autocomplete:{extractors:n},extractorDefault:t.strict?!1:void 0}},$r=Xi;function Zi(t){let e,r,n=2166136261;for(e=0,r=t.length;e<r;e++)n^=t.charCodeAt(e),n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24);return`00000${(n>>>0).toString(36)}`.slice(-6)}function Sr(t,e,r,n){for(let o of Array.from(t.matchAll(r)))if(o!=null){let i=o[0],s=`${n}${Zi(i)}`;e.set(s,i),t=t.replace(i,s)}return t}function vr(t,e){for(let[r,n]of e.entries())t=t.replaceAll(r,n);return t}var Ji=/\/\/#\s*sourceMappingURL=.*\n?/g;function Cr(t){return t.includes("sourceMappingURL=")?t.replace(Ji,""):t}var Qi=/(?:[\w&:[\]-]|\[\S{1,64}=\S{1,64}\]){1,64}\[\\?['"]?\S{1,64}?['"]\]\]?[\w:-]{0,64}/g,es=/\[(\\\W|[\w-]){1,64}:[^\s:]{0,64}?("\S{1,64}?"|'\S{1,64}?'|`\S{1,64}?`|[^\s:]{1,64}?)[^\s:]{0,64}?\)?\]/g,ts=/^\[(?:\\\W|[\w-]){1,64}:['"]?\S{1,64}?['"]?\]$/;function rs(t){let e=[];for(let o of t.matchAll(es))o.index!==0&&!/^[\s'"`]/.test(t[o.index-1]??"")||e.push(o[0]);for(let o of t.matchAll(Qi))e.push(o[0]);let r=new Map,n="@unocss-skip-arbitrary-brackets";return t=Sr(t,r,/-\[(?!&.+?;)[^\]]*\]/g,n),t&&t.split(_e).forEach(o=>{o.includes(n)&&(o=vr(o,r)),ye(o)&&!ts.test(o)&&e.push(o)}),e}function kr(){return{name:"@unocss/extractor-arbitrary-variants",order:0,extract({code:t}){return rs(Cr(t))}}}function Rr(t){if(t.preflight)return[{layer:"preflights",getCSS({theme:e,generator:r}){if(e.preflightBase){let n=Object.entries(e.preflightBase);if(t.preflight==="on-demand"){let o=new Set(Array.from(r.activatedRules).map(i=>i[2]?.custom?.preflightKeys).filter(Boolean).flat());n=n.filter(([i])=>o.has(i))}if(n.length>0){let o=le(n);return t.variablePrefix!=="un-"&&(o=o.replace(/--un-/g,`--${t.variablePrefix}`)),j(e.preflightRoot??["*,::before,::after","::backdrop"]).map(s=>`${s}{${o}}`).join("")}}}}]}function ce(t,e,r){if(t==="")return;let n=t.length,o=0,i=!1,s=0;for(let l=0;l<n;l++)switch(t[l]){case e:i||(i=!0,s=l),o++;break;case r:if(--o,o<0)return;if(o===0)return[t.slice(s,l+1),t.slice(l+1),t.slice(0,s)];break}}function ue(t,e,r,n){if(t===""||(M(n)&&(n=[n]),n.length===0))return;let o=t.length,i=0;for(let s=0;s<o;s++)switch(t[s]){case e:i++;break;case r:if(--i<0)return;break;default:for(let l of n){let a=l.length;if(a&&l===t.slice(s,s+a)&&i===0)return s===0||s===o-a?void 0:[t.slice(0,s),t.slice(s+a)]}}return[t,""]}function fe(t,e,r){r=r??10;let n=[],o=0;for(;t!=="";){if(++o>r)return;let i=ue(t,"(",")",e);if(!i)return;let[s,l]=i;n.push(s),t=l}if(n.length>0)return n}var $t=["hsl","hsla","hwb","lab","lch","oklab","oklch","rgb","rgba"],Tr=["%alpha","<alpha-value>"],ns=new RegExp(Tr.map(t=>Q(t)).join("|"));function te(t=""){let e=os(t);if(e==null||e===!1)return;let{type:r,components:n,alpha:o}=e,i=r.toLowerCase();if(n.length!==0&&!($t.includes(i)&&![1,3].includes(n.length)))return{type:i,components:n.map(s=>typeof s=="string"?s.trim():s),alpha:typeof o=="string"?o.trim():o}}function $e(t){let e=t.alpha??1;return typeof e=="string"&&Tr.includes(e)?1:e}function W(t,e){if(typeof t=="string")return t.replace(ns,`${e??1}`);let{components:r}=t,{alpha:n,type:o}=t;return n=e??n,o=o.toLowerCase(),["hsla","rgba"].includes(o)?`${o}(${r.join(", ")}${n==null?"":`, ${n}`})`:(n=n==null?"":` / ${n}`,$t.includes(o)?`${o}(${r.join(" ")}${n})`:`color(${o} ${r.join(" ")}${n})`)}function os(t){if(!t)return;let e=is(t);if(e!=null||(e=ss(t),e!=null)||(e=as(t),e!=null)||(e=cs(t),e!=null)||(e=us(t),e!=null))return e}function is(t){let[,e]=t.match(/^#([\da-f]+)$/i)||[];if(e)switch(e.length){case 3:case 4:let r=Array.from(e,o=>Number.parseInt(o,16)).map(o=>o<<4|o);return{type:"rgb",components:r.slice(0,3),alpha:e.length===3?void 0:Math.round(r[3]/255*100)/100};case 6:case 8:let n=Number.parseInt(e,16);return{type:"rgb",components:e.length===6?[n>>16&255,n>>8&255,n&255]:[n>>24&255,n>>16&255,n>>8&255],alpha:e.length===6?void 0:Math.round((n&255)/255*100)/100}}}function ss(t){let e={rebeccapurple:[102,51,153,1]}[t];if(e!=null)return{type:"rgb",components:e.slice(0,3),alpha:e[3]}}function as(t){let e=t.match(/^(rgb|rgba|hsl|hsla)\((.+)\)$/i);if(!e)return;let[,r,n]=e,o=fe(n,",",5);if(o){if([3,4].includes(o.length))return{type:r,components:o.slice(0,3),alpha:o[3]};if(o.length!==1)return!1}}var ls=new RegExp(`^(${$t.join("|")})\\((.+)\\)$`,"i");function cs(t){let e=t.match(ls);if(!e)return;let[,r,n]=e,o=Er(`${r} ${n}`);if(o){let{alpha:i,components:[s,...l]}=o;return{type:s,components:l,alpha:i}}}function us(t){let e=t.match(/^color\((.+)\)$/);if(!e)return;let r=Er(e[1]);if(r){let{alpha:n,components:[o,...i]}=r;return{type:o,components:i,alpha:n}}}function Er(t){let e=fe(t," ");if(!e)return;let r=e.length;if(e[r-2]==="/")return{components:e.slice(0,r-2),alpha:e[r-1]};if(e[r-2]!=null&&(e[r-2].endsWith("/")||e[r-1].startsWith("/"))){let i=e.splice(r-2);e.push(i.join(" ")),--r}let n=fe(e[r-1],"/",2);if(!n)return;if(n.length===1||n[n.length-1]==="")return{components:e};let o=n.pop();return e[r-1]=n.join("/"),{components:e,alpha:o}}function jr(t){let e=function(n){let o=this.__options?.sequence||[];this.__options.sequence=[];for(let i of o){let s=t[i](n);if(s!=null)return s}};function r(n,o){return n.__options||(n.__options={sequence:[]}),n.__options.sequence.push(o),n}for(let n of Object.keys(t))Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get(){return r(this,n)}});return e}var Ar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vr=new Uint8Array(64),fs=new Uint8Array(128);for(let t=0;t<Ar.length;t++){let e=Ar.charCodeAt(t);Vr[t]=e,fs[e]=t}function Se(t,e,r){let n=e-r;n=n<0?-n<<1|1:n<<1;do{let o=n&31;n>>>=5,n>0&&(o|=32),t.write(Vr[o])}while(n>0);return e}var Or=1024*16,Pr=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(t){return Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}}:{decode(t){let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e}},St=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(Or)}write(e){let{buffer:r}=this;r[this.pos++]=e,this.pos===Or&&(this.out+=Pr.decode(r),this.pos=0)}flush(){let{buffer:e,out:r,pos:n}=this;return n>0?r+Pr.decode(e.subarray(0,n)):r}};function Mr(t){let e=new St,r=0,n=0,o=0,i=0;for(let s=0;s<t.length;s++){let l=t[s];if(s>0&&e.write(59),l.length===0)continue;let a=0;for(let c=0;c<l.length;c++){let f=l[c];c>0&&e.write(44),a=Se(e,f[0],a),f.length!==1&&(r=Se(e,f[1],r),n=Se(e,f[2],n),o=Se(e,f[3],o),f.length!==4&&(i=Se(e,f[4],i)))}}return e.flush()}var qe=class t{constructor(e){this.bits=e instanceof t?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}},Ye=class t{constructor(e,r,n){this.start=e,this.end=r,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){let e=new t(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){let r=e-this.start,n=this.original.slice(0,r),o=this.original.slice(r);this.original=n;let i=new t(e,this.end,o);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=n,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let r=this.content.replace(e,"");if(r.length){if(r!==this.content){let n=this.split(this.end-r.length);this.edited&&n.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}};function ps(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var ds=ps(),vt=class{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Mr(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList),typeof e.debugId<"u"&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+ds(this.toString())}};function hs(t){let e=t.split(`
3
3
  `),r=e.filter(i=>/^\t+/.test(i)),n=e.filter(i=>/^ {2,}/.test(i));if(r.length===0&&n.length===0)return null;if(r.length>=n.length)return" ";let o=n.reduce((i,s)=>{let l=/^ +/.exec(s)[0].length;return Math.min(l,i)},1/0);return new Array(o+1).join(" ")}function ms(t,e){let r=t.split(/[/\\]/),n=e.split(/[/\\]/);for(r.pop();r[0]===n[0];)r.shift(),n.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(n).join("/")}var gs=Object.prototype.toString;function bs(t){return gs.call(t)==="[object Object]"}function zr(t){let e=t.split(`
4
4
  `),r=[];for(let n=0,o=0;n<e.length;n++)r.push(o),o+=e[n].length+1;return function(o){let i=0,s=r.length;for(;i<s;){let c=i+s>>1;o<r[c]?s=c:i=c+1}let l=i-1,a=o-r[l];return{line:l,column:a}}}var xs=/\w/,Ct=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,n,o){if(r.length){let i=r.length-1,s=r.indexOf(`
5
5
  `,0),l=-1;for(;s>=0&&i>s;){let c=[this.generatedCodeColumn,e,n.line,n.column];o>=0&&c.push(o),this.rawSegments.push(c),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=s,s=r.indexOf(`
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@unocss/runtime",
3
3
  "type": "module",
4
- "version": "0.65.4",
4
+ "version": "65.4.2",
5
5
  "description": "CSS-in-JS Runtime for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/antfu",
9
- "homepage": "https://github.com/unocss/unocss/tree/main/packages/runtime#readme",
9
+ "homepage": "https://unocss.dev",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "https://github.com/unocss/unocss",
13
- "directory": "packages/runtime"
13
+ "directory": "packages-integrations/runtime"
14
14
  },
15
15
  "bugs": {
16
16
  "url": "https://github.com/unocss/unocss/issues"
@@ -35,9 +35,9 @@
35
35
  "dist"
36
36
  ],
37
37
  "dependencies": {
38
- "@unocss/core": "0.65.4",
39
- "@unocss/preset-attributify": "0.65.4",
40
- "@unocss/preset-uno": "0.65.4"
38
+ "@unocss/core": "65.4.2",
39
+ "@unocss/preset-attributify": "65.4.2",
40
+ "@unocss/preset-uno": "65.4.2"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "pnpm run build:node && pnpm run build:cdn && pnpm run build:presets",