@unocss/runtime 0.60.3 → 0.61.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core.global.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";(()=>{function Ve(r){let e=r.length,t=-1,n,s="",i=r.charCodeAt(0);for(;++t<e;){if(n=r.charCodeAt(t),n===0){s+="\uFFFD";continue}if(n===37){s+="\\%";continue}if(n===44){s+="\\,";continue}if(n>=1&&n<=31||n===127||t===0&&n>=48&&n<=57||t===1&&n>=48&&n<=57&&i===45){s+=`\\${n.toString(16)} `;continue}if(t===0&&e===1&&n===45){s+=`\\${r.charAt(t)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(t);continue}s+=`\\${r.charAt(t)}`}return s}var I=Ve;function U(r=[]){return Array.isArray(r)?r:[r]}function D(r){return Array.from(new Set(r))}function ie(r,e){return r.reduce((t,n)=>(t.findIndex(i=>e(n,i))===-1&&t.push(n),t),[])}function M(r){return typeof r=="string"}function K(r){return M(r)?r:(Array.isArray(r)?r:Object.entries(r)).filter(e=>e[1]!=null)}function oe(r){return Array.isArray(r)?r.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?r.map(e=>K(e)):[r]:[K(r)]}function _e(r){return r.filter(([e,t],n)=>{if(e.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(r[s][0]===e&&r[s][1]===t)return!1;return!0})}function z(r){return r==null?"":_e(r).map(([e,t])=>t!=null?`${e}:${t};`:void 0).filter(Boolean).join("")}function N(r){return r&&typeof r=="object"&&!Array.isArray(r)}function X(r,e,t=!1){let n=r,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...n,...s]:[...s];let i={...n};return N(n)&&N(s)&&Object.keys(s).forEach(o=>{N(n[o])&&N(s[o])||Array.isArray(n[o])&&Array.isArray(s[o])?i[o]=X(n[o],s[o],t):Object.assign(i,{[o]:s[o]})}),i}function F(r){let e,t,n;if(Array.isArray(r)){for(t=Array(e=r.length);e--;)t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}if(Object.prototype.toString.call(r)==="[object Object]"){t={};for(e in r)e==="__proto__"?Object.defineProperty(t,e,{value:F(r[e]),configurable:!0,enumerable:!0,writable:!0}):t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}return r}function ae(r){return M(r[0])}function ce(r){return M(r[0])}var ee="$$shortcut-no-merge";function le(r){return typeof r=="function"?{match:r}:r}function te(r){return r.length===3}function ue(r){return r!=null}function fe(){}var W=class{_map=new Map;get(e,t){let n=this._map.get(e);if(n)return n.get(t)}getFallback(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(t)||s.set(t,n),s.get(t)}set(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.set(t,n),this}has(e,t){return this._map.get(e)?.has(t)}delete(e,t){return this._map.get(e)?.delete(t)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([t,n])=>Array.from(n.entries()).map(([s,i])=>e(i,t,s)))}},Y=class extends Map{getFallback(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}map(e){let t=[];return this.forEach((n,s)=>{t.push(e(n,s))}),t}flatMap(e){let t=[];return this.forEach((n,s)=>{t.push(...e(n,s))}),t}};var G=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,t){return this._map.set(e,t),super.add(e)}};function q(r){return r instanceof G}var Z={};function $e(r=["-",":"]){let e=r.join("|");return Z[e]||(Z[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),Z[e].lastIndex=0,Z[e]}function Pe(r,e=["-",":"],t=5){let n=$e(e),s,i=r.toString(),o=new Set,a=new Map;do s=!1,i=i.replace(n,(p,c,u,x,S)=>{if(!e.includes(u))return p;s=!0,o.add(c+u);let R=S+c.length+u.length+1,v={length:p.length,items:[]};a.set(S,v);for(let A of[...x.matchAll(/\S+/g)]){let w=R+A.index,m=a.get(w)?.items;m?a.delete(w):m=[{offset:w,length:A[0].length,className:A[0]}];for(let T of m)T.className=T.className==="~"?c:T.className.replace(/^(!?)(.*)/,`$1${c}${u}$2`),v.items.push(T)}return"$".repeat(p.length)}),t-=1;while(s&&t);let l;if(typeof r=="string"){l="";let p=0;for(let[c,u]of a)l+=r.slice(p,c),l+=u.items.map(x=>x.className).join(" "),p=c+u.length;l+=r.slice(p)}else{l=r;for(let[p,c]of a)l.overwrite(p,p+c.length,c.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(o),hasChanged:s,groupsByOffset:a,get expanded(){return l.toString()}}}function pe(r,e=["-",":"],t=5){let n=Pe(r,e,t);return typeof r=="string"?n.expanded:r}var de=new Set;function ge(r){de.has(r)||(console.warn("[unocss]",r),de.add(r))}var he=/[\\:]?[\s'"`;{}]+/g;function Oe(r){return r.split(he)}var J={name:"@unocss/core/extractor-split",order:0,extract({code:r}){return Oe(r)}};function me(){return{events:{},emit(r,...e){(this.events[r]||[]).forEach(t=>t(...e))},on(r,e){return(this.events[r]=this.events[r]||[]).push(e),()=>this.events[r]=(this.events[r]||[]).filter(t=>t!==e)}}}var H="default",Q="preflights",je="shortcuts",Le="imports",ye={[Le]:-200,[Q]:-100,[je]:-10,[H]:0};function Se(r){return U(r).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var xe="_uno_resolved";function ke(r){let e=typeof r=="function"?r():r;if(xe in e)return e;e={...e},Object.defineProperty(e,xe,{value:!0,enumerable:!1});let t=e.shortcuts?Se(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let n=s=>{s[2]||(s[2]={});let i=s[2];i.prefix==null&&e.prefix&&(i.prefix=U(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};t?.forEach(n),e.rules?.forEach(n)}return e}function be(r){let e=ke(r);if(!e.presets)return[e];let t=(e.presets||[]).flatMap(U).flatMap(be);return[e,...t]}function re(r={},e={}){let t=Object.assign({},e,r),n=ie((t.presets||[]).flatMap(U).flatMap(be),(f,d)=>f.name===d.name),s=[...n.filter(f=>f.enforce==="pre"),...n.filter(f=>!f.enforce),...n.filter(f=>f.enforce==="post")],i=[...s,t],o=[...i].reverse(),a=Object.assign({},ye,...i.map(f=>f.layers));function l(f){return D(i.flatMap(d=>U(d[f]||[])))}let p=l("extractors"),c=o.find(f=>f.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=J),c&&!p.includes(c)&&p.unshift(c),p.sort((f,d)=>(f.order||0)-(d.order||0));let u=l("rules"),x={},S=u.length,R=u.map((f,d)=>{if(ae(f)){U(f[2]?.prefix||"").forEach(C=>{x[C+f[0]]=[d,f[1],f[2],f]});return}return[d,...f]}).filter(Boolean).reverse(),v=De(i.map(f=>f.theme)),A=l("extendTheme");for(let f of A)v=f(v)||v;let w={templates:D(i.flatMap(f=>U(f.autocomplete?.templates))),extractors:i.flatMap(f=>U(f.autocomplete?.extractors)).sort((f,d)=>(f.order||0)-(d.order||0)),shorthands:Ke(i.map(f=>f.autocomplete?.shorthands||{}))},m=l("separators");m.length||(m=[":","-"]);let T={mergeSelectors:!0,warn:!0,sortLayers:f=>f,...t,blocklist:l("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:a,theme:v,rulesSize:S,rulesDynamic:R,rulesStaticMap:x,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:w,variants:l("variants").map(le).sort((f,d)=>(f.order||0)-(d.order||0)),shortcuts:Se(l("shortcuts")).reverse(),extractors:p,safelist:l("safelist"),separators:m,details:t.details??t.envMode==="dev"};for(let f of i)f?.configResolved?.(T);return T}function De(r){return r.map(e=>e?F(e):{}).reduce((e,t)=>X(e,t),{})}function Ke(r){return r.reduce((e,t)=>{let n={};for(let s in t){let i=t[s];Array.isArray(i)?n[s]=`(${i.join("|")})`:n[s]=i}return{...e,...n}},{})}var Te="0.60.3";var ne=class{constructor(e={},t={}){this.userConfig=e;this.defaults=t;this.config=re(e,t),this.events.emit("config",this.config)}version=Te;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=me();setConfig(e,t){e&&(t&&(this.defaults=t),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=re(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,t,n=new Set){let s={original:e,code:e,id:t,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let o=await i.extract?.(s);if(o)if(q(o)&&q(n))for(let a of o)n.setCount(a,n.getCount(a)+o.getCount(a));else for(let a of o)n.add(a)}return n}makeContext(e,t){let n={rawSelector:e,currentSelector:t[1],theme:this.config.theme,generator:this,variantHandlers:t[2],constructCSS:(...s)=>this.constructCustomCSS(n,...s),variantMatch:t};return n}async parseToken(e,t){if(this.blocked.has(e))return;let n=`${e}${t?` ${t}`:""}`;if(this._cache.has(n))return this._cache.get(n);let s=e;for(let p of this.config.preprocess)s=p(e);if(this.isBlocked(s)){this.blocked.add(e),this._cache.set(n,null);return}let i=await this.matchVariants(e,s);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(n,null);return}let o=this.makeContext(e,[t||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);let a=await this.expandShortcut(o.currentSelector,o),l=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(p=>this.stringifyUtil(p,o)).filter(ue);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(e,t={}){let{id:n,scope:s,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:l=!1}=t,p=this.config.outputToCssLayers,c=M(e)?await this.applyExtractors(e,n,l?new G:new Set):Array.isArray(e)?new Set(e):e;if(o){let d={generator:this,theme:this.config.theme};this.config.safelist.flatMap(b=>typeof b=="function"?b(d):b).forEach(b=>{c.has(b)||c.add(b)})}let u=a?"":`
2
- `,x=new Set([H]),S=l?new Map:new Set,R=new Map,v={},A=Array.from(c).map(async d=>{if(S.has(d))return;let b=await this.parseToken(d);if(b!=null){S instanceof Map?S.set(d,{data:b,count:q(c)?c.getCount(d):-1}):S.add(d);for(let C of b){let E=C[3]||"",_=C[4]?.layer;R.has(E)||R.set(E,[]),R.get(E).push(C),_&&x.add(_)}}});await Promise.all(A),await(async()=>{if(!i)return;let d={generator:this,theme:this.config.theme},b=new Set([]);this.config.preflights.forEach(({layer:C=Q})=>{x.add(C),b.add(C)}),v=Object.fromEntries(await Promise.all(Array.from(b).map(async C=>{let _=(await Promise.all(this.config.preflights.filter(O=>(O.layer||Q)===C).map(async O=>await O.getCSS(d)))).filter(Boolean).join(u);return[C,_]})))})();let w=this.config.sortLayers(Array.from(x).sort((d,b)=>(this.config.layers[d]??0)-(this.config.layers[b]??0)||d.localeCompare(b))),m={},T=(d=H)=>{if(m[d])return m[d];let b=Array.from(R).sort((E,_)=>(this.parentOrders.get(E[0])??0)-(this.parentOrders.get(_[0])??0)||E[0]?.localeCompare(_[0]||"")||0).map(([E,_])=>{let O=_.length,k=_.filter(g=>(g[4]?.layer||H)===d).sort((g,y)=>g[0]-y[0]||(g[4]?.sort||0)-(y[4]?.sort||0)||g[5]?.currentSelector?.localeCompare(y[5]?.currentSelector??"")||g[1]?.localeCompare(y[1]||"")||g[2]?.localeCompare(y[2]||"")||0).map(([,g,y,,V,,$])=>[[[(g&&He(g,s))??"",V?.sort??0]],y,!!($??V?.noMerge)]);if(!k.length)return;let B=k.reverse().map(([g,y,V],$)=>{if(!V&&this.config.mergeSelectors)for(let L=$+1;L<O;L++){let P=k[L];if(P&&!P[2]&&(g&&P[0]||g==null&&P[0]==null)&&P[1]===y)return g&&P[0]&&P[0].push(...g),null}let j=g?D(g.sort((L,P)=>L[1]-P[1]||L[0]?.localeCompare(P[0]||"")||0).map(L=>L[0]).filter(Boolean)):[];return j.length?`${j.join(`,${u}`)}{${y}}`:y}).filter(Boolean).reverse().join(u);if(!E)return B;let h=E.split(" $$ ");return`${h.join("{")}{${u}${B}${u}${"}".repeat(h.length)}`}).filter(Boolean).join(u);if(i&&(b=[v[d],b].filter(Boolean).join(u)),p&&b){let E=typeof p=="object"?p.cssLayerName?.(d):void 0;E!==null&&(E||(E=d),b=`@layer ${E}{${u}${b}${u}}`)}let C=a?"":`/* layer: ${d} */${u}`;return m[d]=b?C+b:""},f=(d=w,b)=>d.filter(C=>!b?.includes(C)).map(C=>T(C)||"").filter(Boolean).join(u);return{get css(){return f()},layers:w,matched:S,getLayers:f,getLayer:T}}async matchVariants(e,t){let n=new Set,s=[],i=t||e,o=!0,a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(let l of this.config.variants){if(!l.multiPass&&n.has(l))continue;let p=await l.match(i,a);if(p){if(M(p)){if(p===i)continue;p={matcher:p}}i=p.matcher,s.unshift(p),n.add(l),o=!0;break}}if(!o)break;if(s.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,s,n]}applyVariants(e,t=e[4],n=e[1]){let i=t.slice().sort((p,c)=>(p.order||0)-(c.order||0)).reduceRight((p,c)=>u=>{let x=c.body?.(u.entries)||u.entries,S=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??Ie)({...u,entries:x,selector:c.selector?.(u.selector,x)||u.selector,parent:S[0]||u.parent,parentOrder:S[1]||u.parentOrder,layer:c.layer||u.layer,sort:c.sort||u.sort},p)},p=>p)({prefix:"",selector:Be(n),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);let l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let p of this.config.postprocess)p(l);return l}constructCustomCSS(e,t,n){let s=K(t);if(M(s))return s;let{selector:i,entries:o,parent:a}=this.applyVariants([0,n||e.rawSelector,s,void 0,e.variantHandlers]),l=`${i}{${z(o)}}`;return a?`${a}{${l}}`:l}async parseUtil(e,t,n=!1,s){let[i,o,a]=M(e)?await this.matchVariants(e):e;this.config.details&&(t.rules=t.rules??[]);let l=this.config.rulesStaticMap[o];if(l&&l[1]&&(n||!l[2]?.internal)){this.config.details&&t.rules.push(l[3]);let c=l[0],u=K(l[1]),x=l[2];return M(u)?[[c,u,x]]:[[c,i,u,x,a]]}t.variantHandlers=a;let{rulesDynamic:p}=this.config;for(let[c,u,x,S]of p){if(S?.internal&&!n)continue;let R=o;if(S?.prefix){let m=U(S.prefix);if(s){let T=U(s);if(!m.some(f=>T.includes(f)))continue}else{let T=m.find(f=>o.startsWith(f));if(T==null)continue;R=o.slice(T.length)}}let v=R.match(u);if(!v)continue;let A=await x(v,t);if(!A)continue;this.config.details&&t.rules.push([u,x,S]);let w=oe(A).filter(m=>m.length);if(w.length)return w.map(m=>M(m)?[c,m,S]:[c,i,m,S,a])}}stringifyUtil(e,t){if(!e)return;if(te(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?t:void 0,void 0];let{selector:n,entries:s,parent:i,layer:o,sort:a,noMerge:l}=this.applyVariants(e),p=z(s);if(!p)return;let{layer:c,sort:u,...x}=e[3]??{},S={...x,layer:o??c,sort:a??u};return[e[0],n,p,i,S,this.config.details?t:void 0,l]}async expandShortcut(e,t,n=5){if(n===0)return;let s=this.config.details?a=>{t.shortcuts=t.shortcuts??[],t.shortcuts.push(a)}:fe,i,o;for(let a of this.config.shortcuts){let l=e;if(a[2]?.prefix){let c=U(a[2].prefix).find(u=>e.startsWith(u));if(c==null)continue;l=e.slice(c.length)}if(ce(a)){if(a[0]===l){i=i||a[2],o=a[1],s(a);break}}else{let p=l.match(a[0]);if(p&&(o=a[1](p,t)),o){i=i||a[2],s(a);break}}}if(M(o)&&(o=pe(o.trim()).split(/\s+/g)),!o){let[a,l]=M(e)?await this.matchVariants(e):e;if(a!==l){let p=await this.expandShortcut(l,t,n-1);p&&(o=p[0].map(c=>M(c)?a.replace(l,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(M(a)?(await this.expandShortcut(a,t,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,t,n,s={layer:this.config.shortcutsLayer}){let i=new Y,o=(await Promise.all(D(n).map(async c=>{let u=M(c)?await this.parseUtil(c,t,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",K(c),void 0,[]]];return!u&&this.config.warn&&ge(`unmatched utility "${c}" in shortcut "${e[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((c,u)=>c[0]-u[0]),[a,,l]=e,p=[];for(let c of o){if(te(c)){p.push([c[0],void 0,c[1],void 0,c[2],t,void 0]);continue}let{selector:u,entries:x,parent:S,sort:R,noMerge:v,layer:A}=this.applyVariants(c,[...c[4],...l],a);i.getFallback(A??s.layer,new W).getFallback(u,S,[[],c[0]])[0].push([x,!!(v??c[3]?.noMerge),R??0])}return p.concat(i.flatMap((c,u)=>c.map(([x,S],R,v)=>{let A=(m,T,f)=>{let d=Math.max(...f.map(C=>C[1])),b=f.map(C=>C[0]);return(m?[b.flat(1)]:b).map(C=>{let E=z(C);if(E)return[S,R,E,v,{...s,noMerge:T,sort:d,layer:u},t,void 0]})};return[[x.filter(([,m])=>m).map(([m,,T])=>[m,T]),!0],[x.filter(([,m])=>!m).map(([m,,T])=>[m,T]),!1]].map(([m,T])=>[...A(!1,T,m.filter(([f])=>f.some(d=>d[0]===ee))),...A(!0,T,m.filter(([f])=>f.every(d=>d[0]!==ee)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(t=>Array.isArray(t)?t[0]:t).some(t=>typeof t=="function"?t(e):M(t)?t===e:t.test(e))}getBlocked(e){let t=this.config.blocklist.find(n=>{let s=Array.isArray(n)?n[0]:n;return typeof s=="function"?s(e):M(s)?s===e:s.test(e)});return t?Array.isArray(t)?t:[t,void 0]:void 0}};function Ee(r,e){return new ne(r,e)}var Re=/\s\$\$\s+/g;function Ge(r){return Re.test(r)}function He(r,e){return Ge(r)?r.replace(Re,e?` ${e} `:" "):e?`${e} ${r}`:r}var Ce=/^\[(.+?)(~?=)"(.*)"\]$/;function Be(r){return Ce.test(r)?r.replace(Ce,(e,t,n,s)=>`[${I(t)}${n}"${I(s)}"]`):`.${I(r)}`}function Ie(r,e){return e(r)}function Ne(r){return r.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"")}function ve(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Me(r){return r.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var Ae=["Webkit","Moz","ms"];function we(r){let e={};function t(n){let s=e[n];if(s)return s;let i=Ne(n);if(i!=="filter"&&i in r)return e[n]=Me(i);i=ve(i);for(let o=0;o<Ae.length;o++){let a=`${Ae[o]}${i}`;if(a in r)return e[n]=Me(ve(a))}return n}return({entries:n})=>n.forEach(s=>{s[0].startsWith("--")||(s[0]=t(s[0]))})}function Ue(r){return r.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")}function se(r={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let e=window,t=window.document,n=()=>t.documentElement,s=e.__unocss||{},i=Object.assign({},r,s.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=U(o.postprocess)).unshift(we(t.createElement("div").style)),i.configResolved?.(s,o);let l=Ee(s,o),p=h=>i.inject?i.inject(h):n().prepend(h),c=()=>i.rootElement?i.rootElement():t.body,u=new Map,x=!0,S=new Set,R,v,A=[],w=()=>new Promise(h=>{A.push(h),v!=null&&clearTimeout(v),v=setTimeout(()=>f().then(()=>{let g=A;A=[],g.forEach(y=>y())}),0)});function m(h){if(h.nodeType!==1)return;let g=h;g.hasAttribute(a)&&g.removeAttribute(a),g.querySelectorAll(`[${a}]`).forEach(y=>{y.removeAttribute(a)})}function T(h,g){let y=u.get(h);if(!y)if(y=t.createElement("style"),y.setAttribute("data-unocss-runtime-layer",h),u.set(h,y),g==null)p(y);else{let V=T(g),$=V.parentNode;$?$.insertBefore(y,V.nextSibling):p(y)}return y}async function f(){let h=await l.generate(S);return h.layers.reduce((g,y)=>(T(y,g).innerHTML=h.getLayer(y)??"",y),void 0),S=h.matched,{...h,getStyleElement:g=>u.get(g),getStyleElements:()=>u}}async function d(h){let g=S.size;await l.applyExtractors(h,void 0,S),g!==S.size&&await w()}async function b(h=c()){let g=h&&h.outerHTML;g&&(await d(`${g} ${Ue(g)}`),m(n()),m(h))}let C=new MutationObserver(h=>{x||h.forEach(async g=>{if(g.target.nodeType!==1)return;let y=g.target;for(let V of u)if(y===V[1])return;if(g.type==="childList")g.addedNodes.forEach(async V=>{if(V.nodeType!==1)return;let $=V;R&&!R($)||(await d($.outerHTML),m($))});else{if(R&&!R(y))return;if(g.attributeName!==a){let V=Array.from(y.attributes).map(j=>j.value?`${j.name}="${j.value}"`:j.name).join(" "),$=`<${y.tagName.toLowerCase()} ${V}>`;await d($)}y.hasAttribute(a)&&y.removeAttribute(a)}})}),E=!1;function _(){if(E)return;let h=i.observer?.target?i.observer.target():c();h&&(C.observe(h,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),E=!0)}function O(){i.bypassDefined&&ze(l.blocked),b(),_()}function k(){t.readyState==="loading"?e.addEventListener("DOMContentLoaded",O):O()}let B=e.__unocss_runtime=e.__unocss_runtime={version:l.version,uno:l,async extract(h){M(h)||(h.forEach(g=>S.add(g)),h=""),await d(h)},extractAll:b,inspect(h){R=h},toggleObserver(h){h===void 0?x=!x:x=!!h,!E&&!x&&k()},update:f,presets:e.__unocss_runtime?.presets??{}};i.ready?.(B)!==!1&&(x=!1,k())}function ze(r=new Set){for(let e=0;e<document.styleSheets.length;e++){let t=document.styleSheets[e],n;try{if(n=t.cssRules||t.rules,!n)continue;Array.from(n).flatMap(s=>s.selectorText?.split(/,/g)||[]).forEach(s=>{s&&(s=s.trim(),s.startsWith(".")&&(s=s.slice(1)),r.add(s))})}catch{continue}}return r}se();})();
1
+ "use strict";(()=>{function Ve(r){let e=r.length,t=-1,n,s="",i=r.charCodeAt(0);for(;++t<e;){if(n=r.charCodeAt(t),n===0){s+="\uFFFD";continue}if(n===37){s+="\\%";continue}if(n===44){s+="\\,";continue}if(n>=1&&n<=31||n===127||t===0&&n>=48&&n<=57||t===1&&n>=48&&n<=57&&i===45){s+=`\\${n.toString(16)} `;continue}if(t===0&&e===1&&n===45){s+=`\\${r.charAt(t)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){s+=r.charAt(t);continue}s+=`\\${r.charAt(t)}`}return s}var N=Ve;function w(r=[]){return Array.isArray(r)?r:[r]}function D(r){return Array.from(new Set(r))}function oe(r,e){return r.reduce((t,n)=>(t.findIndex(i=>e(n,i))===-1&&t.push(n),t),[])}function M(r){return typeof r=="string"}function K(r){return M(r)?r:(Array.isArray(r)?r:Object.entries(r)).filter(e=>e[1]!=null)}function ae(r){return Array.isArray(r)?r.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?r.map(e=>K(e)):[r]:[K(r)]}function $e(r){return r.filter(([e,t],n)=>{if(e.startsWith("$$"))return!1;for(let s=n-1;s>=0;s--)if(r[s][0]===e&&r[s][1]===t)return!1;return!0})}function W(r){return r==null?"":$e(r).map(([e,t])=>t!=null?`${e}:${t};`:void 0).filter(Boolean).join("")}function z(r){return r&&typeof r=="object"&&!Array.isArray(r)}function ee(r,e,t=!1){let n=r,s=e;if(Array.isArray(s))return t&&Array.isArray(s)?[...n,...s]:[...s];let i={...n};return z(n)&&z(s)&&Object.keys(s).forEach(o=>{z(n[o])&&z(s[o])||Array.isArray(n[o])&&Array.isArray(s[o])?i[o]=ee(n[o],s[o],t):Object.assign(i,{[o]:s[o]})}),i}function F(r){let e,t,n;if(Array.isArray(r)){for(t=Array(e=r.length);e--;)t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}if(Object.prototype.toString.call(r)==="[object Object]"){t={};for(e in r)e==="__proto__"?Object.defineProperty(t,e,{value:F(r[e]),configurable:!0,enumerable:!0,writable:!0}):t[e]=(n=r[e])&&typeof n=="object"?F(n):n;return t}return r}function ce(r){return M(r[0])}function le(r){return M(r[0])}function ue(r){return typeof r=="function"?{match:r}:r}function te(r){return r.length===3}function re(r){return r!=null}function fe(){}var Y=class{_map=new Map;get(e,t){let n=this._map.get(e);if(n)return n.get(t)}getFallback(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.has(t)||s.set(t,n),s.get(t)}set(e,t,n){let s=this._map.get(e);return s||(s=new Map,this._map.set(e,s)),s.set(t,n),this}has(e,t){return this._map.get(e)?.has(t)}delete(e,t){return this._map.get(e)?.delete(t)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([t,n])=>Array.from(n.entries()).map(([s,i])=>e(i,t,s)))}},q=class extends Map{getFallback(e,t){let n=this.get(e);return n===void 0?(this.set(e,t),t):n}map(e){let t=[];return this.forEach((n,s)=>{t.push(e(n,s))}),t}flatMap(e){let t=[];return this.forEach((n,s)=>{t.push(...e(n,s))}),t}};var G=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,t){return this._map.set(e,t),super.add(e)}};function Z(r){return r instanceof G}var J={};function Pe(r=["-",":"]){let e=r.join("|");return J[e]||(J[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),J[e].lastIndex=0,J[e]}function je(r,e=["-",":"],t=5){let n=Pe(e),s,i=r.toString(),o=new Set,a=new Map;do s=!1,i=i.replace(n,(p,c,f,x,b)=>{if(!e.includes(f))return p;s=!0,o.add(c+f);let v=b+c.length+f.length+1,A={length:p.length,items:[]};a.set(b,A);for(let T of[...x.matchAll(/\S+/g)]){let U=v+T.index,g=a.get(U)?.items;g?a.delete(U):g=[{offset:U,length:T[0].length,className:T[0]}];for(let y of g)y.className=y.className==="~"?c:y.className.replace(/^(!?)(.*)/,`$1${c}${f}$2`),A.items.push(y)}return"$".repeat(p.length)}),t-=1;while(s&&t);let u;if(typeof r=="string"){u="";let p=0;for(let[c,f]of a)u+=r.slice(p,c),u+=f.items.map(x=>x.className).join(" "),p=c+f.length;u+=r.slice(p)}else{u=r;for(let[p,c]of a)u.overwrite(p,p+c.length,c.items.map(f=>f.className).join(" "))}return{prefixes:Array.from(o),hasChanged:s,groupsByOffset:a,get expanded(){return u.toString()}}}function pe(r,e=["-",":"],t=5){let n=je(r,e,t);return typeof r=="string"?n.expanded:r}var de=new Set;function me(r){de.has(r)||(console.warn("[unocss]",r),de.add(r))}var ge=/[\\:]?[\s'"`;{}]+/g;function _e(r){return r.split(ge)}var Q={name:"@unocss/core/extractor-split",order:0,extract({code:r}){return _e(r)}};function he(){return{events:{},emit(r,...e){(this.events[r]||[]).forEach(t=>t(...e))},on(r,e){return(this.events[r]=this.events[r]||[]).push(e),()=>this.events[r]=(this.events[r]||[]).filter(t=>t!==e)}}}var H="default",X="preflights",Oe="shortcuts",ke="imports",ye={[ke]:-200,[X]:-100,[Oe]:-10,[H]:0};function xe(r){return w(r).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}var Se="_uno_resolved";function Le(r){let e=typeof r=="function"?r():r;if(Se in e)return e;e={...e},Object.defineProperty(e,Se,{value:!0,enumerable:!1});let t=e.shortcuts?xe(e.shortcuts):void 0;if(e.shortcuts=t,e.prefix||e.layer){let n=s=>{s[2]||(s[2]={});let i=s[2];i.prefix==null&&e.prefix&&(i.prefix=w(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};t?.forEach(n),e.rules?.forEach(n)}return e}function be(r){let e=Le(r);if(!e.presets)return[e];let t=(e.presets||[]).flatMap(w).flatMap(be);return[e,...t]}function ne(r={},e={}){let t=Object.assign({},e,r),n=oe((t.presets||[]).flatMap(w).flatMap(be),(l,d)=>l.name===d.name),s=[...n.filter(l=>l.enforce==="pre"),...n.filter(l=>!l.enforce),...n.filter(l=>l.enforce==="post")],i=[...s,t],o=[...i].reverse(),a=Object.assign({},ye,...i.map(l=>l.layers));function u(l){return D(i.flatMap(d=>w(d[l]||[])))}let p=u("extractors"),c=o.find(l=>l.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=Q),c&&!p.includes(c)&&p.unshift(c),p.sort((l,d)=>(l.order||0)-(d.order||0));let f=u("rules"),x={},b=f.length,v=f.map((l,d)=>{if(ce(l)){w(l[2]?.prefix||"").forEach(E=>{x[E+l[0]]=[d,l[1],l[2],l]});return}return[d,...l]}).filter(Boolean).reverse(),A=De(i.map(l=>l.theme)),T=u("extendTheme");for(let l of T)A=l(A)||A;let U={templates:D(i.flatMap(l=>w(l.autocomplete?.templates))),extractors:i.flatMap(l=>w(l.autocomplete?.extractors)).sort((l,d)=>(l.order||0)-(d.order||0)),shorthands:Ke(i.map(l=>l.autocomplete?.shorthands||{}))},g=u("separators");g.length||(g=[":","-"]);let y={mergeSelectors:!0,warn:!0,sortLayers:l=>l,...t,blocklist:u("blocklist"),presets:s,envMode:t.envMode||"build",shortcutsLayer:t.shortcutsLayer||"shortcuts",layers:a,theme:A,rulesSize:b,rulesDynamic:v,rulesStaticMap:x,preprocess:u("preprocess"),postprocess:u("postprocess"),preflights:u("preflights"),autocomplete:U,variants:u("variants").map(ue).sort((l,d)=>(l.order||0)-(d.order||0)),shortcuts:xe(u("shortcuts")).reverse(),extractors:p,safelist:u("safelist"),separators:g,details:t.details??t.envMode==="dev"};for(let l of i)l?.configResolved?.(y);return y}function De(r){return r.map(e=>e?F(e):{}).reduce((e,t)=>ee(e,t),{})}function Ke(r){return r.reduce((e,t)=>{let n={};for(let s in t){let i=t[s];Array.isArray(i)?n[s]=`(${i.join("|")})`:n[s]=i}return{...e,...n}},{})}var Ce="0.61.0";var I={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector"},se=class{constructor(e={},t={}){this.userConfig=e;this.defaults=t;this.config=ne(e,t),this.events.emit("config",this.config)}version=Ce;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=he();setConfig(e,t){e&&(t&&(this.defaults=t),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=ne(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,t,n=new Set){let s={original:e,code:e,id:t,extracted:n,envMode:this.config.envMode};for(let i of this.config.extractors){let o=await i.extract?.(s);if(o)if(Z(o)&&Z(n))for(let a of o)n.setCount(a,n.getCount(a)+o.getCount(a));else for(let a of o)n.add(a)}return n}makeContext(e,t){let n={rawSelector:e,currentSelector:t[1],theme:this.config.theme,generator:this,symbols:I,variantHandlers:t[2],constructCSS:(...s)=>this.constructCustomCSS(n,...s),variantMatch:t};return n}async parseToken(e,t){if(this.blocked.has(e))return;let n=`${e}${t?` ${t}`:""}`;if(this._cache.has(n))return this._cache.get(n);let s=e;for(let p of this.config.preprocess)s=p(e);if(this.isBlocked(s)){this.blocked.add(e),this._cache.set(n,null);return}let i=await this.matchVariants(e,s);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(n,null);return}let o=this.makeContext(e,[t||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);let a=await this.expandShortcut(o.currentSelector,o),u=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(p=>this.stringifyUtil(p,o)).filter(re);if(u?.length)return this._cache.set(n,u),u;this._cache.set(n,null)}async generate(e,t={}){let{id:n,scope:s,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:u=!1}=t,p=this.config.outputToCssLayers,c=M(e)?await this.applyExtractors(e,n,u?new G:new Set):Array.isArray(e)?new Set(e):e;if(o){let d={generator:this,theme:this.config.theme};this.config.safelist.flatMap(C=>typeof C=="function"?C(d):C).forEach(C=>{c.has(C)||c.add(C)})}let f=a?"":`
2
+ `,x=new Set([H]),b=u?new Map:new Set,v=new Map,A={},T=Array.from(c).map(async d=>{if(b.has(d))return;let C=await this.parseToken(d);if(C!=null){b instanceof Map?b.set(d,{data:C,count:Z(c)?c.getCount(d):-1}):b.add(d);for(let E of C){let R=E[3]||"",$=E[4]?.layer;v.has(R)||v.set(R,[]),v.get(R).push(E),$&&x.add($)}}});await Promise.all(T),await(async()=>{if(!i)return;let d={generator:this,theme:this.config.theme},C=new Set([]);this.config.preflights.forEach(({layer:E=X})=>{x.add(E),C.add(E)}),A=Object.fromEntries(await Promise.all(Array.from(C).map(async E=>{let $=(await Promise.all(this.config.preflights.filter(_=>(_.layer||X)===E).map(async _=>await _.getCSS(d)))).filter(Boolean).join(f);return[E,$]})))})();let U=this.config.sortLayers(Array.from(x).sort((d,C)=>(this.config.layers[d]??0)-(this.config.layers[C]??0)||d.localeCompare(C))),g={},y=(d=H)=>{if(g[d])return g[d];let C=Array.from(v).sort((R,$)=>(this.parentOrders.get(R[0])??0)-(this.parentOrders.get($[0])??0)||R[0]?.localeCompare($[0]||"")||0).map(([R,$])=>{let _=$.length,L=$.filter(m=>(m[4]?.layer||H)===d).sort((m,S)=>m[0]-S[0]||(m[4]?.sort||0)-(S[4]?.sort||0)||m[5]?.currentSelector?.localeCompare(S[5]?.currentSelector??"")||m[1]?.localeCompare(S[1]||"")||m[2]?.localeCompare(S[2]||"")||0).map(([,m,S,,V,,P])=>[[[(m&&Ge(m,s))??"",V?.sort??0]],S,!!(P??V?.noMerge)]);if(!L.length)return;let B=L.reverse().map(([m,S,V],P)=>{if(!V&&this.config.mergeSelectors)for(let k=P+1;k<_;k++){let j=L[k];if(j&&!j[2]&&(m&&j[0]||m==null&&j[0]==null)&&j[1]===S)return m&&j[0]&&j[0].push(...m),null}let O=m?D(m.sort((k,j)=>k[1]-j[1]||k[0]?.localeCompare(j[0]||"")||0).map(k=>k[0]).filter(Boolean)):[];return O.length?`${O.join(`,${f}`)}{${S}}`:S}).filter(Boolean).reverse().join(f);if(!R)return B;let h=R.split(" $$ ");return`${h.join("{")}{${f}${B}${f}${"}".repeat(h.length)}`}).filter(Boolean).join(f);if(i&&(C=[A[d],C].filter(Boolean).join(f)),p&&C){let R=typeof p=="object"?p.cssLayerName?.(d):void 0;R!==null&&(R||(R=d),C=`@layer ${R}{${f}${C}${f}}`)}let E=a?"":`/* layer: ${d} */${f}`;return g[d]=C?E+C:""},l=(d=U,C)=>d.filter(E=>!C?.includes(E)).map(E=>y(E)||"").filter(Boolean).join(f);return{get css(){return l()},layers:U,matched:b,getLayers:l,getLayer:y}}async matchVariants(e,t){let n=new Set,s=[],i=t||e,o=!0,a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(let u of this.config.variants){if(!u.multiPass&&n.has(u))continue;let p=await u.match(i,a);if(p){if(M(p)){if(p===i)continue;p={matcher:p}}i=p.matcher??i,s.unshift(p),n.add(u),o=!0;break}}if(!o)break;if(s.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,s,n]}applyVariants(e,t=e[4],n=e[1]){let i=t.slice().sort((p,c)=>(p.order||0)-(c.order||0)).reduceRight((p,c)=>f=>{let x=c.body?.(f.entries)||f.entries,b=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??Be)({...f,entries:x,selector:c.selector?.(f.selector,x)||f.selector,parent:b[0]||f.parent,parentOrder:b[1]||f.parentOrder,layer:c.layer||f.layer,sort:c.sort||f.sort},p)},p=>p)({prefix:"",selector:He(n),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);let u={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(let p of this.config.postprocess)p(u);return u}constructCustomCSS(e,t,n){let s=K(t);if(M(s))return s;let{selector:i,entries:o,parent:a}=this.applyVariants([0,n||e.rawSelector,s,void 0,e.variantHandlers]),u=`${i}{${W(o)}}`;return a?`${a}{${u}}`:u}async parseUtil(e,t,n=!1,s){let[i,o,a]=M(e)?await this.matchVariants(e):e;this.config.details&&(t.rules=t.rules??[]);let u=this.config.rulesStaticMap[o];if(u&&u[1]&&(n||!u[2]?.internal)){this.config.details&&t.rules.push(u[3]);let c=u[0],f=K(u[1]),x=u[2];return M(f)?[[c,f,x]]:[[c,i,f,x,a]]}t.variantHandlers=a;let{rulesDynamic:p}=this.config;for(let[c,f,x,b]of p){if(b?.internal&&!n)continue;let v=o;if(b?.prefix){let g=w(b.prefix);if(s){let y=w(s);if(!g.some(l=>y.includes(l)))continue}else{let y=g.find(l=>o.startsWith(l));if(y==null)continue;v=o.slice(y.length)}}let A=v.match(f);if(!A)continue;let T=await x(A,t);if(!T)continue;if(this.config.details&&t.rules.push([f,x,b]),typeof T!="string")if(Symbol.asyncIterator in T){let g=[];for await(let y of T)y&&g.push(y);T=g}else Symbol.iterator in T&&!Array.isArray(T)&&(T=Array.from(T).filter(re));let U=ae(T).filter(g=>g.length);if(U.length)return U.map(g=>{if(M(g))return[c,g,b];let y=a;for(let l of g)l[0]===I.variants?y=[...w(l[1]),...y]:l[0]===I.parent?y=[{parent:l[1]},...y]:l[0]===I.selector&&(y=[{selector:l[1]},...y]);return[c,i,g,b,y]})}}stringifyUtil(e,t){if(!e)return;if(te(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?t:void 0,void 0];let{selector:n,entries:s,parent:i,layer:o,sort:a,noMerge:u}=this.applyVariants(e),p=W(s);if(!p)return;let{layer:c,sort:f,...x}=e[3]??{},b={...x,layer:o??c,sort:a??f};return[e[0],n,p,i,b,this.config.details?t:void 0,u]}async expandShortcut(e,t,n=5){if(n===0)return;let s=this.config.details?a=>{t.shortcuts=t.shortcuts??[],t.shortcuts.push(a)}:fe,i,o;for(let a of this.config.shortcuts){let u=e;if(a[2]?.prefix){let c=w(a[2].prefix).find(f=>e.startsWith(f));if(c==null)continue;u=e.slice(c.length)}if(le(a)){if(a[0]===u){i=i||a[2],o=a[1],s(a);break}}else{let p=u.match(a[0]);if(p&&(o=a[1](p,t)),o){i=i||a[2],s(a);break}}}if(M(o)&&(o=pe(o.trim()).split(/\s+/g)),!o){let[a,u]=M(e)?await this.matchVariants(e):e;if(a!==u){let p=await this.expandShortcut(u,t,n-1);p&&(o=p[0].map(c=>M(c)?a.replace(u,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(M(a)?(await this.expandShortcut(a,t,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,t,n,s={layer:this.config.shortcutsLayer}){let i=new q,o=(await Promise.all(D(n).map(async c=>{let f=M(c)?await this.parseUtil(c,t,!0,s.prefix):[[Number.POSITIVE_INFINITY,"{inline}",K(c),void 0,[]]];return!f&&this.config.warn&&me(`unmatched utility "${c}" in shortcut "${e[1]}"`),f||[]}))).flat(1).filter(Boolean).sort((c,f)=>c[0]-f[0]),[a,,u]=e,p=[];for(let c of o){if(te(c)){p.push([c[0],void 0,c[1],void 0,c[2],t,void 0]);continue}let{selector:f,entries:x,parent:b,sort:v,noMerge:A,layer:T}=this.applyVariants(c,[...c[4],...u],a);i.getFallback(T??s.layer,new Y).getFallback(f,b,[[],c[0]])[0].push([x,!!(A??c[3]?.noMerge),v??0])}return p.concat(i.flatMap((c,f)=>c.map(([x,b],v,A)=>{let T=(g,y,l)=>{let d=Math.max(...l.map(E=>E[1])),C=l.map(E=>E[0]);return(g?[C.flat(1)]:C).map(E=>{let R=W(E);if(R)return[b,v,R,A,{...s,noMerge:y,sort:d,layer:f},t,void 0]})};return[[x.filter(([,g])=>g).map(([g,,y])=>[g,y]),!0],[x.filter(([,g])=>!g).map(([g,,y])=>[g,y]),!1]].map(([g,y])=>[...T(!1,y,g.filter(([l])=>l.some(d=>d[0]===I.shortcutsNoMerge))),...T(!0,y,g.filter(([l])=>l.every(d=>d[0]!==I.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(e){return!e||this.config.blocklist.map(t=>Array.isArray(t)?t[0]:t).some(t=>typeof t=="function"?t(e):M(t)?t===e:t.test(e))}getBlocked(e){let t=this.config.blocklist.find(n=>{let s=Array.isArray(n)?n[0]:n;return typeof s=="function"?s(e):M(s)?s===e:s.test(e)});return t?Array.isArray(t)?t:[t,void 0]:void 0}};function Ee(r,e){return new se(r,e)}var Re=/\s\$\$\s+/g;function Fe(r){return Re.test(r)}function Ge(r,e){return Fe(r)?r.replace(Re,e?` ${e} `:" "):e?`${e} ${r}`:r}var Te=/^\[(.+?)(~?=)"(.*)"\]$/;function He(r){return Te.test(r)?r.replace(Te,(e,t,n,s)=>`[${N(t)}${n}"${N(s)}"]`):`.${N(r)}`}function Be(r,e){return e(r)}function Ne(r){return r.replace(/-(\w)/g,(e,t)=>t?t.toUpperCase():"")}function ve(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Ae(r){return r.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var Me=["Webkit","Moz","ms"];function we(r){let e={};function t(n){let s=e[n];if(s)return s;let i=Ne(n);if(i!=="filter"&&i in r)return e[n]=Ae(i);i=ve(i);for(let o=0;o<Me.length;o++){let a=`${Me[o]}${i}`;if(a in r)return e[n]=Ae(ve(a))}return n}return({entries:n})=>n.forEach(s=>{s[0].startsWith("--")||(s[0]=t(s[0]))})}function Ue(r){return r.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<")}function ie(r={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let e=window,t=window.document,n=()=>t.documentElement,s=e.__unocss||{},i=Object.assign({},r,s.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=w(o.postprocess)).unshift(we(t.createElement("div").style)),i.configResolved?.(s,o);let u=Ee(s,o),p=h=>i.inject?i.inject(h):n().prepend(h),c=()=>i.rootElement?i.rootElement():t.body,f=new Map,x=!0,b=new Set,v,A,T=[],U=()=>new Promise(h=>{T.push(h),A!=null&&clearTimeout(A),A=setTimeout(()=>l().then(()=>{let m=T;T=[],m.forEach(S=>S())}),0)});function g(h){if(h.nodeType!==1)return;let m=h;m.hasAttribute(a)&&m.removeAttribute(a),m.querySelectorAll(`[${a}]`).forEach(S=>{S.removeAttribute(a)})}function y(h,m){let S=f.get(h);if(!S)if(S=t.createElement("style"),S.setAttribute("data-unocss-runtime-layer",h),f.set(h,S),m==null)p(S);else{let V=y(m),P=V.parentNode;P?P.insertBefore(S,V.nextSibling):p(S)}return S}async function l(){let h=await u.generate(b);return h.layers.reduce((m,S)=>(y(S,m).innerHTML=h.getLayer(S)??"",S),void 0),b=h.matched,{...h,getStyleElement:m=>f.get(m),getStyleElements:()=>f}}async function d(h){let m=b.size;await u.applyExtractors(h,void 0,b),m!==b.size&&await U()}async function C(h=c()){let m=h&&h.outerHTML;m&&(await d(`${m} ${Ue(m)}`),g(n()),g(h))}let E=new MutationObserver(h=>{x||h.forEach(async m=>{if(m.target.nodeType!==1)return;let S=m.target;for(let V of f)if(S===V[1])return;if(m.type==="childList")m.addedNodes.forEach(async V=>{if(V.nodeType!==1)return;let P=V;v&&!v(P)||(await d(P.outerHTML),g(P))});else{if(v&&!v(S))return;if(m.attributeName!==a){let V=Array.from(S.attributes).map(O=>O.value?`${O.name}="${O.value}"`:O.name).join(" "),P=`<${S.tagName.toLowerCase()} ${V}>`;await d(P)}S.hasAttribute(a)&&S.removeAttribute(a)}})}),R=!1;function $(){if(R)return;let h=i.observer?.target?i.observer.target():c();h&&(E.observe(h,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),R=!0)}function _(){i.bypassDefined&&ze(u.blocked),C(),$()}function L(){t.readyState==="loading"?e.addEventListener("DOMContentLoaded",_):_()}let B=e.__unocss_runtime=e.__unocss_runtime={version:u.version,uno:u,async extract(h){M(h)||(h.forEach(m=>b.add(m)),h=""),await d(h)},extractAll:C,inspect(h){v=h},toggleObserver(h){h===void 0?x=!x:x=!!h,!R&&!x&&L()},update:l,presets:e.__unocss_runtime?.presets??{}};i.ready?.(B)!==!1&&(x=!1,L())}function ze(r=new Set){for(let e=0;e<document.styleSheets.length;e++){let t=document.styleSheets[e],n;try{if(n=t.cssRules||t.rules,!n)continue;Array.from(n).flatMap(s=>s.selectorText?.split(/,/g)||[]).forEach(s=>{s&&(s=s.trim(),s.startsWith(".")&&(s=s.slice(1)),r.add(s))})}catch{continue}}return r}ie();})();