vite-plugin-vue-devtools 7.3.3 → 7.3.5
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/client/assets/index-C5GCauCt.js +1103 -0
- package/client/assets/index-QwqGIFaZ.css +1 -0
- package/client/assets/{vue-CCacahFR-CRnm5w84.js → vue-BCzIWH65-DukWwgKw.js} +1 -1
- package/client/assets/{vue-CpF6k_42.js → vue-DA5lFhGO.js} +1 -1
- package/client/assets/{vue-html-aHkQr8H2.js → vue-html-CamDJK1H.js} +1 -1
- package/client/assets/{vue-html-Cae35ipv-514FnJ3-.js → vue-html-HEv8aJvH-B0ZFpWlD.js} +1 -1
- package/client/index.html +2 -2
- package/package.json +5 -5
- package/src/overlay/devtools-overlay.mjs +3 -3
- package/client/assets/index-CiJaa0rZ.css +0 -1
- package/client/assets/index-DKCnzSWR.js +0 -1103
- package/client/assets/unocss-runtime-C5Zd39fg.js +0 -2
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const Fe=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,ze=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,De=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function Ve(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){Ue(e);return}return t}function Ue(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function Be(e,t={}){if(typeof e!="string")return e;const r=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return r.slice(1,-1);if(r.length<=9){const s=r.toLowerCase();if(s==="true")return!0;if(s==="false")return!1;if(s==="undefined")return;if(s==="null")return null;if(s==="nan")return Number.NaN;if(s==="infinity")return Number.POSITIVE_INFINITY;if(s==="-infinity")return Number.NEGATIVE_INFINITY}if(!De.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(Fe.test(e)||ze.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,Ve)}return JSON.parse(e)}catch(s){if(t.strict)throw s;return e}}const qe=/#/g,He=/&/g,Ge=/\//g,We=/=/g,re=/\+/g,Je=/%5e/gi,Qe=/%60/gi,Ke=/%7c/gi,Ye=/%20/gi;function Xe(e){return encodeURI(""+e).replace(Ke,"|")}function Z(e){return Xe(typeof e=="string"?e:JSON.stringify(e)).replace(re,"%2B").replace(Ye,"+").replace(qe,"%23").replace(He,"%26").replace(Qe,"`").replace(Je,"^").replace(Ge,"%2F")}function J(e){return Z(e).replace(We,"%3D")}function ve(e=""){try{return decodeURIComponent(""+e)}catch{return""+e}}function Ze(e){return ve(e.replace(re," "))}function et(e){return ve(e.replace(re," "))}function tt(e=""){const t={};e[0]==="?"&&(e=e.slice(1));for(const r of e.split("&")){const s=r.match(/([^=]+)=?(.*)/)||[];if(s.length<2)continue;const n=Ze(s[1]);if(n==="__proto__"||n==="constructor")continue;const i=et(s[2]||"");t[n]===void 0?t[n]=i:Array.isArray(t[n])?t[n].push(i):t[n]=[t[n],i]}return t}function rt(e,t){return(typeof t=="number"||typeof t=="boolean")&&(t=String(t)),t?Array.isArray(t)?t.map(r=>`${J(e)}=${Z(r)}`).join("&"):`${J(e)}=${Z(t)}`:J(e)}function nt(e){return Object.keys(e).filter(t=>e[t]!==void 0).map(t=>rt(t,e[t])).filter(Boolean).join("&")}const st=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,ot=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,it=/^([/\\]\s*){2,}[^/\\]/,at=/\/$|\/\?|\/#/,ct=/^\.?\//;function _e(e,t={}){return typeof t=="boolean"&&(t={acceptRelative:t}),t.strict?st.test(e):ot.test(e)||(t.acceptRelative?it.test(e):!1)}function ee(e="",t){return t?at.test(e):e.endsWith("/")}function lt(e="",t){if(!t)return(ee(e)?e.slice(0,-1):e)||"/";if(!ee(e,!0))return e||"/";let r=e,s="";const n=e.indexOf("#");n>=0&&(r=e.slice(0,n),s=e.slice(n));const[i,...c]=r.split("?");return((i.endsWith("/")?i.slice(0,-1):i)||"/")+(c.length>0?`?${c.join("?")}`:"")+s}function ft(e="",t){if(!t)return e.endsWith("/")?e:e+"/";if(ee(e,!0))return e||"/";let r=e,s="";const n=e.indexOf("#");if(n>=0&&(r=e.slice(0,n),s=e.slice(n),!r))return s;const[i,...c]=r.split("?");return i+"/"+(c.length>0?`?${c.join("?")}`:"")+s}function ut(e,t){if(pt(t)||_e(e))return e;const r=lt(t);return e.startsWith(r)?e:mt(r,e)}function ht(e,t){const r=Ee(e),s={...tt(r.search),...t};return r.search=nt(s),gt(r)}function pt(e){return!e||e==="/"}function dt(e){return e&&e!=="/"}function mt(e,...t){let r=e||"";for(const s of t.filter(n=>dt(n)))if(r){const n=s.replace(ct,"");r=ft(r)+n}else r=s;return r}const $e=Symbol.for("ufo:protocolRelative");function Ee(e="",t){const r=e.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(r){const[,u,g=""]=r;return{protocol:u.toLowerCase(),pathname:g,href:u+g,auth:"",host:"",search:"",hash:""}}if(!_e(e,{acceptRelative:!0}))return t?Ee(t+e):oe(e);const[,s="",n,i=""]=e.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[],[,c="",a=""]=i.match(/([^#/?]*)(.*)?/)||[],{pathname:l,search:f,hash:o}=oe(a.replace(/\/(?=[A-Za-z]:)/,""));return{protocol:s.toLowerCase(),auth:n?n.slice(0,Math.max(0,n.length-1)):"",host:c,pathname:l,search:f,hash:o,[$e]:!s}}function oe(e=""){const[t="",r="",s=""]=(e.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:t,search:r,hash:s}}function gt(e){const t=e.pathname||"",r=e.search?(e.search.startsWith("?")?"":"?")+e.search:"",s=e.hash||"",n=e.auth?e.auth+"@":"",i=e.host||"";return(e.protocol||e[$e]?(e.protocol||"")+"//":"")+n+i+t+r+s}class yt extends Error{constructor(t,r){super(t,r),this.name="FetchError",r?.cause&&!this.cause&&(this.cause=r.cause)}}function wt(e){const t=e.error?.message||e.error?.toString()||"",r=e.request?.method||e.options?.method||"GET",s=e.request?.url||String(e.request)||"/",n=`[${r}] ${JSON.stringify(s)}`,i=e.response?`${e.response.status} ${e.response.statusText}`:"<no response>",c=`${n}: ${i}${t?` ${t}`:""}`,a=new yt(c,e.error?{cause:e.error}:void 0);for(const l of["request","options","response"])Object.defineProperty(a,l,{get(){return e[l]}});for(const[l,f]of[["data","_data"],["status","status"],["statusCode","status"],["statusText","statusText"],["statusMessage","statusText"]])Object.defineProperty(a,l,{get(){return e.response&&e.response[f]}});return a}const bt=new Set(Object.freeze(["PATCH","POST","PUT","DELETE"]));function ie(e="GET"){return bt.has(e.toUpperCase())}function St(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}const vt=new Set(["image/svg","application/xml","application/xhtml","application/html"]),_t=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function $t(e=""){if(!e)return"json";const t=e.split(";").shift()||"";return _t.test(t)?"json":vt.has(t)||t.startsWith("text/")?"text":"blob"}function Et(e,t,r=globalThis.Headers){const s={...t,...e};if(t?.params&&e?.params&&(s.params={...t?.params,...e?.params}),t?.query&&e?.query&&(s.query={...t?.query,...e?.query}),t?.headers&&e?.headers){s.headers=new r(t?.headers||{});for(const[n,i]of new r(e?.headers||{}))s.headers.set(n,i)}return s}const At=new Set([408,409,425,429,500,502,503,504]),xt=new Set([101,204,205,304]);function Ae(e={}){const{fetch:t=globalThis.fetch,Headers:r=globalThis.Headers,AbortController:s=globalThis.AbortController}=e;async function n(a){const l=a.error&&a.error.name==="AbortError"&&!a.options.timeout||!1;if(a.options.retry!==!1&&!l){let o;typeof a.options.retry=="number"?o=a.options.retry:o=ie(a.options.method)?0:1;const u=a.response&&a.response.status||500;if(o>0&&(Array.isArray(a.options.retryStatusCodes)?a.options.retryStatusCodes.includes(u):At.has(u))){const g=a.options.retryDelay||0;return g>0&&await new Promise(m=>setTimeout(m,g)),i(a.request,{...a.options,retry:o-1})}}const f=wt(a);throw Error.captureStackTrace&&Error.captureStackTrace(f,i),f}const i=async function(l,f={}){const o={request:l,options:Et(f,e.defaults,r),response:void 0,error:void 0};o.options.method=o.options.method?.toUpperCase(),o.options.onRequest&&await o.options.onRequest(o),typeof o.request=="string"&&(o.options.baseURL&&(o.request=ut(o.request,o.options.baseURL)),(o.options.query||o.options.params)&&(o.request=ht(o.request,{...o.options.params,...o.options.query}))),o.options.body&&ie(o.options.method)&&(St(o.options.body)?(o.options.body=typeof o.options.body=="string"?o.options.body:JSON.stringify(o.options.body),o.options.headers=new r(o.options.headers||{}),o.options.headers.has("content-type")||o.options.headers.set("content-type","application/json"),o.options.headers.has("accept")||o.options.headers.set("accept","application/json")):("pipeTo"in o.options.body&&typeof o.options.body.pipeTo=="function"||typeof o.options.body.pipe=="function")&&("duplex"in o.options||(o.options.duplex="half")));let u;if(!o.options.signal&&o.options.timeout){const m=new s;u=setTimeout(()=>m.abort(),o.options.timeout),o.options.signal=m.signal}try{o.response=await t(o.request,o.options)}catch(m){return o.error=m,o.options.onRequestError&&await o.options.onRequestError(o),await n(o)}finally{u&&clearTimeout(u)}if(o.response.body&&!xt.has(o.response.status)&&o.options.method!=="HEAD"){const m=(o.options.parseResponse?"json":o.options.responseType)||$t(o.response.headers.get("content-type")||"");switch(m){case"json":{const $=await o.response.text(),b=o.options.parseResponse||Be;o.response._data=b($);break}case"stream":{o.response._data=o.response.body;break}default:o.response._data=await o.response[m]()}}return o.options.onResponse&&await o.options.onResponse(o),!o.options.ignoreResponseError&&o.response.status>=400&&o.response.status<600?(o.options.onResponseError&&await o.options.onResponseError(o),await n(o)):o.response},c=async function(l,f){return(await i(l,f))._data};return c.raw=i,c.native=(...a)=>t(...a),c.create=(a={})=>Ae({...e,defaults:{...e.defaults,...a}}),c}const ne=function(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}(),Ct=ne.fetch||(()=>Promise.reject(new Error("[ofetch] global.fetch is not supported!"))),Ot=ne.Headers,jt=ne.AbortController,Rt=Ae({fetch:Ct,Headers:Ot,AbortController:jt}),Tt=Rt;function Mt(e){const t=e.length;let r=-1,s,n="";const i=e.charCodeAt(0);for(;++r<t;){if(s=e.charCodeAt(r),s===0){n+="�";continue}if(s===37){n+="\\%";continue}if(s===44){n+="\\,";continue}if(s>=1&&s<=31||s===127||r===0&&s>=48&&s<=57||r===1&&s>=48&&s<=57&&i===45){n+=`\\${s.toString(16)} `;continue}if(r===0&&t===1&&s===45){n+=`\\${e.charAt(r)}`;continue}if(s>=128||s===45||s===95||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){n+=e.charAt(r);continue}n+=`\\${e.charAt(r)}`}return n}const Q=Mt;function T(e=[]){return Array.isArray(e)?e:[e]}function G(e){return Array.from(new Set(e))}function Pt(e,t){return e.reduce((r,s)=>(r.findIndex(i=>t(s,i))===-1&&r.push(s),r),[])}function j(e){return typeof e=="string"}function V(e){return j(e)?e:(Array.isArray(e)?e:Object.entries(e)).filter(t=>t[1]!=null)}function kt(e){return Array.isArray(e)?e.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?e.map(t=>V(t)):[e]:[V(e)]}function Lt(e){return e.filter(([t,r],s)=>{if(t.startsWith("$$"))return!1;for(let n=s-1;n>=0;n--)if(e[n][0]===t&&e[n][1]===r)return!1;return!0})}function K(e){return e==null?"":Lt(e).map(([t,r])=>r!=null?`${t}:${r};`:void 0).filter(Boolean).join("")}function U(e){return e&&typeof e=="object"&&!Array.isArray(e)}function xe(e,t,r=!1){const s=e,n=t;if(Array.isArray(n))return r&&Array.isArray(n)?[...s,...n]:[...n];const i={...s};return U(s)&&U(n)&&Object.keys(n).forEach(c=>{U(s[c])&&U(n[c])||Array.isArray(s[c])&&Array.isArray(n[c])?i[c]=xe(s[c],n[c],r):Object.assign(i,{[c]:n[c]})}),i}function q(e){let t,r,s;if(Array.isArray(e)){for(r=Array(t=e.length);t--;)r[t]=(s=e[t])&&typeof s=="object"?q(s):s;return r}if(Object.prototype.toString.call(e)==="[object Object]"){r={};for(t in e)t==="__proto__"?Object.defineProperty(r,t,{value:q(e[t]),configurable:!0,enumerable:!0,writable:!0}):r[t]=(s=e[t])&&typeof s=="object"?q(s):s;return r}return e}function Nt(e){return j(e[0])}function It(e){return j(e[0])}function Ft(e){return typeof e=="function"?{match:e}:e}function ae(e){return e.length===3}function ce(e){return e!=null}function zt(){}var Dt=Object.defineProperty,Vt=(e,t,r)=>t in e?Dt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ut=(e,t,r)=>(Vt(e,t+"",r),r);class Bt{constructor(){Ut(this,"_map",new Map)}get(t,r){const s=this._map.get(t);if(s)return s.get(r)}getFallback(t,r,s){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.has(r)||n.set(r,s),n.get(r)}set(t,r,s){let n=this._map.get(t);return n||(n=new Map,this._map.set(t,n)),n.set(r,s),this}has(t,r){return this._map.get(t)?.has(r)}delete(t,r){return this._map.get(t)?.delete(r)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([r,s])=>Array.from(s.entries()).map(([n,i])=>t(i,r,n)))}}class qt extends Map{getFallback(t,r){const s=this.get(t);return s===void 0?(this.set(t,r),r):s}map(t){const r=[];return this.forEach((s,n)=>{r.push(t(s,n))}),r}flatMap(t){const r=[];return this.forEach((s,n)=>{r.push(...t(s,n))}),r}}var Ht=Object.defineProperty,Gt=(e,t,r)=>t in e?Ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Wt=(e,t,r)=>(Gt(e,t+"",r),r);class Ce extends Set{constructor(t){super(t),Wt(this,"_map"),this._map??(this._map=new Map)}add(t){return this._map??(this._map=new Map),this._map.set(t,(this._map.get(t)??0)+1),super.add(t)}delete(t){return this._map.delete(t),super.delete(t)}clear(){this._map.clear(),super.clear()}getCount(t){return this._map.get(t)??0}setCount(t,r){return this._map.set(t,r),super.add(t)}}function Y(e){return e instanceof Ce}const B={};function Jt(e=["-",":"]){const t=e.join("|");return B[t]||(B[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),B[t].lastIndex=0,B[t]}function Qt(e,t=["-",":"],r=5){const s=Jt(t);let n,i=e.toString();const c=new Set,a=new Map;do n=!1,i=i.replace(s,(f,o,u,g,m)=>{if(!t.includes(u))return f;n=!0,c.add(o+u);const $=m+o.length+u.length+1,b={length:f.length,items:[]};a.set(m,b);for(const p of[...g.matchAll(/\S+/g)]){const C=$+p.index;let y=a.get(C)?.items;y?a.delete(C):y=[{offset:C,length:p[0].length,className:p[0]}];for(const d of y)d.className=d.className==="~"?o:d.className.replace(/^(!?)(.*)/,`$1${o}${u}$2`),b.items.push(d)}return"$".repeat(f.length)}),r-=1;while(n&&r);let l;if(typeof e=="string"){l="";let f=0;for(const[o,u]of a)l+=e.slice(f,o),l+=u.items.map(g=>g.className).join(" "),f=o+u.length;l+=e.slice(f)}else{l=e;for(const[f,o]of a)l.overwrite(f,f+o.length,o.items.map(u=>u.className).join(" "))}return{prefixes:Array.from(c),hasChanged:n,groupsByOffset:a,get expanded(){return l.toString()}}}function Kt(e,t=["-",":"],r=5){const s=Qt(e,t,r);return typeof e=="string"?s.expanded:e}const le=new Set;function Oe(e){le.has(e)||(console.warn("[unocss]",e),le.add(e))}const Yt=/[\\:]?[\s'"`;{}]+/g;function Xt(e){return e.split(Yt)}const Zt={name:"@unocss/core/extractor-split",order:0,extract({code:e}){return Xt(e)}};function er(){return{events:{},emit(e,...t){(this.events[e]||[]).forEach(r=>r(...t))},on(e,t){return(this.events[e]=this.events[e]||[]).push(t),()=>this.events[e]=(this.events[e]||[]).filter(r=>r!==t)}}}const H="default",te="preflights",tr="shortcuts",rr="imports",nr={[rr]:-200,[te]:-100,[tr]:-10,[H]:0};function je(e){return T(e).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}const fe="_uno_resolved";function sr(e){let t=typeof e=="function"?e():e;if(fe in t)return t;t={...t},Object.defineProperty(t,fe,{value:!0,enumerable:!1});const r=t.shortcuts?je(t.shortcuts):void 0;if(t.shortcuts=r,t.prefix||t.layer){const s=n=>{n[2]||(n[2]={});const i=n[2];i.prefix==null&&t.prefix&&(i.prefix=T(t.prefix)),i.layer==null&&t.layer&&(i.layer=t.layer)};r?.forEach(s),t.rules?.forEach(s)}return t}function Re(e){const t=sr(e);if(!t.presets)return[t];const r=(t.presets||[]).flatMap(T).flatMap(Re);return[t,...r]}function ue(e={},t={}){const r=Object.assign({},t,e),s=Pt((r.presets||[]).flatMap(T).flatMap(Re),(h,w)=>h.name===w.name),n=[...s.filter(h=>h.enforce==="pre"),...s.filter(h=>!h.enforce),...s.filter(h=>h.enforce==="post")],i=[...n,r],c=[...i].reverse(),a=Object.assign({},nr,...i.map(h=>h.layers));function l(h){return G(i.flatMap(w=>T(w[h]||[])))}const f=l("extractors");let o=c.find(h=>h.extractorDefault!==void 0)?.extractorDefault;o===void 0&&(o=Zt),o&&!f.includes(o)&&f.unshift(o),f.sort((h,w)=>(h.order||0)-(w.order||0));const u=l("rules"),g={},m=u.length,$=u.map((h,w)=>{if(Nt(h)){T(h[2]?.prefix||"").forEach(A=>{g[A+h[0]]=[w,h[1],h[2],h]});return}return[w,...h]}).filter(Boolean).reverse();let b=or(i.map(h=>h.theme));const p=l("extendTheme");for(const h of p)b=h(b)||b;const C={templates:G(i.flatMap(h=>T(h.autocomplete?.templates))),extractors:i.flatMap(h=>T(h.autocomplete?.extractors)).sort((h,w)=>(h.order||0)-(w.order||0)),shorthands:ir(i.map(h=>h.autocomplete?.shorthands||{}))};let y=l("separators");y.length||(y=[":","-"]);const d={mergeSelectors:!0,warn:!0,sortLayers:h=>h,...r,blocklist:l("blocklist"),presets:n,envMode:r.envMode||"build",shortcutsLayer:r.shortcutsLayer||"shortcuts",layers:a,theme:b,rulesSize:m,rulesDynamic:$,rulesStaticMap:g,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:C,variants:l("variants").map(Ft).sort((h,w)=>(h.order||0)-(w.order||0)),shortcuts:je(l("shortcuts")).reverse(),extractors:f,safelist:l("safelist"),separators:y,details:r.details??r.envMode==="dev"};for(const h of i)h?.configResolved?.(d);return d}function or(e){return e.map(t=>t?q(t):{}).reduce((t,r)=>xe(t,r),{})}function ir(e){return e.reduce((t,r)=>{const s={};for(const n in r){const i=r[n];Array.isArray(i)?s[n]=`(${i.join("|")})`:s[n]=i}return{...t,...s}},{})}const ar="0.61.0";var cr=Object.defineProperty,lr=(e,t,r)=>t in e?cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=(e,t,r)=>(lr(e,typeof t!="symbol"?t+"":t,r),r);const D={shortcutsNoMerge:"$$symbol-shortcut-no-merge",variants:"$$symbol-variants",parent:"$$symbol-parent",selector:"$$symbol-selector"};class fr{constructor(t={},r={}){this.userConfig=t,this.defaults=r,z(this,"version",ar),z(this,"_cache",new Map),z(this,"config"),z(this,"blocked",new Set),z(this,"parentOrders",new Map),z(this,"events",er()),this.config=ue(t,r),this.events.emit("config",this.config)}setConfig(t,r){t&&(r&&(this.defaults=r),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=ue(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,r,s=new Set){const n={original:t,code:t,id:r,extracted:s,envMode:this.config.envMode};for(const i of this.config.extractors){const c=await i.extract?.(n);if(c)if(Y(c)&&Y(s))for(const a of c)s.setCount(a,s.getCount(a)+c.getCount(a));else for(const a of c)s.add(a)}return s}makeContext(t,r){const s={rawSelector:t,currentSelector:r[1],theme:this.config.theme,generator:this,symbols:D,variantHandlers:r[2],constructCSS:(...n)=>this.constructCustomCSS(s,...n),variantMatch:r};return s}async parseToken(t,r){if(this.blocked.has(t))return;const s=`${t}${r?` ${r}`:""}`;if(this._cache.has(s))return this._cache.get(s);let n=t;for(const f of this.config.preprocess)n=f(t);if(this.isBlocked(n)){this.blocked.add(t),this._cache.set(s,null);return}const i=await this.matchVariants(t,n);if(!i||this.isBlocked(i[1])){this.blocked.add(t),this._cache.set(s,null);return}const c=this.makeContext(t,[r||i[0],i[1],i[2],i[3]]);this.config.details&&(c.variants=[...i[3]]);const a=await this.expandShortcut(c.currentSelector,c),l=a?await this.stringifyShortcuts(c.variantMatch,c,a[0],a[1]):(await this.parseUtil(c.variantMatch,c))?.map(f=>this.stringifyUtil(f,c)).filter(ce);if(l?.length)return this._cache.set(s,l),l;this._cache.set(s,null)}async generate(t,r={}){const{id:s,scope:n,preflights:i=!0,safelist:c=!0,minify:a=!1,extendedInfo:l=!1}=r,f=this.config.outputToCssLayers,o=j(t)?await this.applyExtractors(t,s,l?new Ce:new Set):Array.isArray(t)?new Set(t):t;if(c){const w={generator:this,theme:this.config.theme};this.config.safelist.flatMap(_=>typeof _=="function"?_(w):_).forEach(_=>{o.has(_)||o.add(_)})}const u=a?"":`
|
|
2
|
-
`,g=new Set([H]),m=l?new Map:new Set,$=new Map;let b={};const p=Array.from(o).map(async w=>{if(m.has(w))return;const _=await this.parseToken(w);if(_!=null){m instanceof Map?m.set(w,{data:_,count:Y(o)?o.getCount(w):-1}):m.add(w);for(const A of _){const x=A[3]||"",O=A[4]?.layer;$.has(x)||$.set(x,[]),$.get(x).push(A),O&&g.add(O)}}});await Promise.all(p),await(async()=>{if(!i)return;const w={generator:this,theme:this.config.theme},_=new Set([]);this.config.preflights.forEach(({layer:A=te})=>{g.add(A),_.add(A)}),b=Object.fromEntries(await Promise.all(Array.from(_).map(async A=>{const O=(await Promise.all(this.config.preflights.filter(P=>(P.layer||te)===A).map(async P=>await P.getCSS(w)))).filter(Boolean).join(u);return[A,O]})))})();const C=this.config.sortLayers(Array.from(g).sort((w,_)=>(this.config.layers[w]??0)-(this.config.layers[_]??0)||w.localeCompare(_))),y={},d=(w=H)=>{if(y[w])return y[w];let _=Array.from($).sort((x,O)=>(this.parentOrders.get(x[0])??0)-(this.parentOrders.get(O[0])??0)||x[0]?.localeCompare(O[0]||"")||0).map(([x,O])=>{const P=O.length,L=O.filter(S=>(S[4]?.layer||H)===w).sort((S,E)=>S[0]-E[0]||(S[4]?.sort||0)-(E[4]?.sort||0)||S[5]?.currentSelector?.localeCompare(E[5]?.currentSelector??"")||S[1]?.localeCompare(E[1]||"")||S[2]?.localeCompare(E[2]||"")||0).map(([,S,E,,R,,M])=>[[[(S&&pr(S,n))??"",R?.sort??0]],E,!!(M??R?.noMerge)]);if(!L.length)return;const N=L.reverse().map(([S,E,R],M)=>{if(!R&&this.config.mergeSelectors)for(let F=M+1;F<P;F++){const k=L[F];if(k&&!k[2]&&(S&&k[0]||S==null&&k[0]==null)&&k[1]===E)return S&&k[0]&&k[0].push(...S),null}const I=S?G(S.sort((F,k)=>F[1]-k[1]||F[0]?.localeCompare(k[0]||"")||0).map(F=>F[0]).filter(Boolean)):[];return I.length?`${I.join(`,${u}`)}{${E}}`:E}).filter(Boolean).reverse().join(u);if(!x)return N;const v=x.split(" $$ ");return`${v.join("{")}{${u}${N}${u}${"}".repeat(v.length)}`}).filter(Boolean).join(u);if(i&&(_=[b[w],_].filter(Boolean).join(u)),f&&_){let x=typeof f=="object"?f.cssLayerName?.(w):void 0;x!==null&&(x||(x=w),_=`@layer ${x}{${u}${_}${u}}`)}const A=a?"":`/* layer: ${w} */${u}`;return y[w]=_?A+_:""},h=(w=C,_)=>w.filter(A=>!_?.includes(A)).map(A=>d(A)||"").filter(Boolean).join(u);return{get css(){return h()},layers:C,matched:m,getLayers:h,getLayer:d}}async matchVariants(t,r){const s=new Set,n=[];let i=r||t,c=!0;const a={rawSelector:t,theme:this.config.theme,generator:this};for(;c;){c=!1;for(const l of this.config.variants){if(!l.multiPass&&s.has(l))continue;let f=await l.match(i,a);if(f){if(j(f)){if(f===i)continue;f={matcher:f}}i=f.matcher??i,n.unshift(f),s.add(l),c=!0;break}}if(!c)break;if(n.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,i,n,s]}applyVariants(t,r=t[4],s=t[1]){const i=r.slice().sort((f,o)=>(f.order||0)-(o.order||0)).reduceRight((f,o)=>u=>{const g=o.body?.(u.entries)||u.entries,m=Array.isArray(o.parent)?o.parent:[o.parent,void 0];return(o.handle??mr)({...u,entries:g,selector:o.selector?.(u.selector,g)||u.selector,parent:m[0]||u.parent,parentOrder:m[1]||u.parentOrder,layer:o.layer||u.layer,sort:o.sort||u.sort},f)},f=>f)({prefix:"",selector:dr(s),pseudo:"",entries:t[2]}),{parent:c,parentOrder:a}=i;c!=null&&a!=null&&this.parentOrders.set(c,a);const l={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:c,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(const f of this.config.postprocess)f(l);return l}constructCustomCSS(t,r,s){const n=V(r);if(j(n))return n;const{selector:i,entries:c,parent:a}=this.applyVariants([0,s||t.rawSelector,n,void 0,t.variantHandlers]),l=`${i}{${K(c)}}`;return a?`${a}{${l}}`:l}async parseUtil(t,r,s=!1,n){const[i,c,a]=j(t)?await this.matchVariants(t):t;this.config.details&&(r.rules=r.rules??[]);const l=this.config.rulesStaticMap[c];if(l&&l[1]&&(s||!l[2]?.internal)){this.config.details&&r.rules.push(l[3]);const o=l[0],u=V(l[1]),g=l[2];return j(u)?[[o,u,g]]:[[o,i,u,g,a]]}r.variantHandlers=a;const{rulesDynamic:f}=this.config;for(const[o,u,g,m]of f){if(m?.internal&&!s)continue;let $=c;if(m?.prefix){const y=T(m.prefix);if(n){const d=T(n);if(!y.some(h=>d.includes(h)))continue}else{const d=y.find(h=>c.startsWith(h));if(d==null)continue;$=c.slice(d.length)}}const b=$.match(u);if(!b)continue;let p=await g(b,r);if(!p)continue;if(this.config.details&&r.rules.push([u,g,m]),typeof p!="string")if(Symbol.asyncIterator in p){const y=[];for await(const d of p)d&&y.push(d);p=y}else Symbol.iterator in p&&!Array.isArray(p)&&(p=Array.from(p).filter(ce));const C=kt(p).filter(y=>y.length);if(C.length)return C.map(y=>{if(j(y))return[o,y,m];let d=a;for(const h of y)h[0]===D.variants?d=[...T(h[1]),...d]:h[0]===D.parent?d=[{parent:h[1]},...d]:h[0]===D.selector&&(d=[{selector:h[1]},...d]);return[o,i,y,m,d]})}}stringifyUtil(t,r){if(!t)return;if(ae(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?r:void 0,void 0];const{selector:s,entries:n,parent:i,layer:c,sort:a,noMerge:l}=this.applyVariants(t),f=K(n);if(!f)return;const{layer:o,sort:u,...g}=t[3]??{},m={...g,layer:c??o,sort:a??u};return[t[0],s,f,i,m,this.config.details?r:void 0,l]}async expandShortcut(t,r,s=5){if(s===0)return;const n=this.config.details?a=>{r.shortcuts=r.shortcuts??[],r.shortcuts.push(a)}:zt;let i,c;for(const a of this.config.shortcuts){let l=t;if(a[2]?.prefix){const o=T(a[2].prefix).find(u=>t.startsWith(u));if(o==null)continue;l=t.slice(o.length)}if(It(a)){if(a[0]===l){i=i||a[2],c=a[1],n(a);break}}else{const f=l.match(a[0]);if(f&&(c=a[1](f,r)),c){i=i||a[2],n(a);break}}}if(j(c)&&(c=Kt(c.trim()).split(/\s+/g)),!c){const[a,l]=j(t)?await this.matchVariants(t):t;if(a!==l){const f=await this.expandShortcut(l,r,s-1);f&&(c=f[0].map(o=>j(o)?a.replace(l,o):o))}}if(c)return[(await Promise.all(c.map(async a=>(j(a)?(await this.expandShortcut(a,r,s-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(t,r,s,n={layer:this.config.shortcutsLayer}){const i=new qt,c=(await Promise.all(G(s).map(async o=>{const u=j(o)?await this.parseUtil(o,r,!0,n.prefix):[[Number.POSITIVE_INFINITY,"{inline}",V(o),void 0,[]]];return!u&&this.config.warn&&Oe(`unmatched utility "${o}" in shortcut "${t[1]}"`),u||[]}))).flat(1).filter(Boolean).sort((o,u)=>o[0]-u[0]),[a,,l]=t,f=[];for(const o of c){if(ae(o)){f.push([o[0],void 0,o[1],void 0,o[2],r,void 0]);continue}const{selector:u,entries:g,parent:m,sort:$,noMerge:b,layer:p}=this.applyVariants(o,[...o[4],...l],a);i.getFallback(p??n.layer,new Bt).getFallback(u,m,[[],o[0]])[0].push([g,!!(b??o[3]?.noMerge),$??0])}return f.concat(i.flatMap((o,u)=>o.map(([g,m],$,b)=>{const p=(y,d,h)=>{const w=Math.max(...h.map(A=>A[1])),_=h.map(A=>A[0]);return(y?[_.flat(1)]:_).map(A=>{const x=K(A);if(x)return[m,$,x,b,{...n,noMerge:d,sort:w,layer:u},r,void 0]})};return[[g.filter(([,y])=>y).map(([y,,d])=>[y,d]),!0],[g.filter(([,y])=>!y).map(([y,,d])=>[y,d]),!1]].map(([y,d])=>[...p(!1,d,y.filter(([h])=>h.some(w=>w[0]===D.shortcutsNoMerge))),...p(!0,d,y.filter(([h])=>h.every(w=>w[0]!==D.shortcutsNoMerge)))])}).flat(2).filter(Boolean)))}isBlocked(t){return!t||this.config.blocklist.map(r=>Array.isArray(r)?r[0]:r).some(r=>typeof r=="function"?r(t):j(r)?r===t:r.test(t))}getBlocked(t){const r=this.config.blocklist.find(s=>{const n=Array.isArray(s)?s[0]:s;return typeof n=="function"?n(t):j(n)?n===t:n.test(t)});return r?Array.isArray(r)?r:[r,void 0]:void 0}}function ur(e,t){return new fr(e,t)}const Te=/\s\$\$\s+/g;function hr(e){return Te.test(e)}function pr(e,t){return hr(e)?e.replace(Te,t?` ${t} `:" "):t?`${t} ${e}`:e}const he=/^\[(.+?)(~?=)"(.*)"\]$/;function dr(e){return he.test(e)?e.replace(he,(t,r,s,n)=>`[${Q(r)}${s}"${Q(n)}"]`):`.${Q(e)}`}function mr(e,t){return t(e)}var pe={};const gr=Object.freeze({left:0,top:0,width:16,height:16}),W=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Me=Object.freeze({...gr,...W}),yr=Object.freeze({...Me,body:"",hidden:!1}),wr=Object.freeze({width:null,height:null}),Pe=Object.freeze({...wr,...W});function br(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const s=((e.rotate||0)+(t.rotate||0))%4;return s&&(r.rotate=s),r}function de(e,t){const r=br(e,t);for(const s in yr)s in W?s in e&&!(s in r)&&(r[s]=W[s]):s in t?r[s]=t[s]:s in e&&(r[s]=e[s]);return r}function Sr(e,t){const r=e.icons,s=e.aliases||Object.create(null),n=Object.create(null);function i(c){if(r[c])return n[c]=[];if(!(c in n)){n[c]=null;const a=s[c]&&s[c].parent,l=a&&i(a);l&&(n[c]=[a].concat(l))}return n[c]}return(t||Object.keys(r).concat(Object.keys(s))).forEach(i),n}function me(e,t,r){const s=e.icons,n=e.aliases||Object.create(null);let i={};function c(a){i=de(s[a]||n[a],i)}return c(t),r.forEach(c),de(e,i)}function vr(e,t){if(e.icons[t])return me(e,t,[]);const r=Sr(e,[t])[t];return r?me(e,t,r):null}const _r=/(-?[0-9.]*[0-9]+[0-9.]*)/g,$r=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ge(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const s=e.split(_r);if(s===null||!s.length)return e;const n=[];let i=s.shift(),c=$r.test(i);for(;;){if(c){const a=parseFloat(i);isNaN(a)?n.push(i):n.push(Math.ceil(a*t*r)/r)}else n.push(i);if(i=s.shift(),i===void 0)return n.join("");c=!c}}function Er(e,t="defs"){let r="";const s=e.indexOf("<"+t);for(;s>=0;){const n=e.indexOf(">",s),i=e.indexOf("</"+t);if(n===-1||i===-1)break;const c=e.indexOf(">",i);if(c===-1)break;r+=e.slice(n+1,i).trim(),e=e.slice(0,s).trim()+e.slice(c+1)}return{defs:r,content:e}}function Ar(e,t){return e?"<defs>"+e+"</defs>"+t:t}function xr(e,t,r){const s=Er(e);return Ar(s.defs,t+s.content+r)}const se=e=>e==="unset"||e==="undefined"||e==="none";function Cr(e,t){const r={...Me,...e},s={...Pe,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let i=r.body;[r,s].forEach(b=>{const p=[],C=b.hFlip,y=b.vFlip;let d=b.rotate;C?y?d+=2:(p.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),p.push("scale(-1 1)"),n.top=n.left=0):y&&(p.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),p.push("scale(1 -1)"),n.top=n.left=0);let h;switch(d<0&&(d-=Math.floor(d/4)*4),d=d%4,d){case 1:h=n.height/2+n.top,p.unshift("rotate(90 "+h.toString()+" "+h.toString()+")");break;case 2:p.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:h=n.width/2+n.left,p.unshift("rotate(-90 "+h.toString()+" "+h.toString()+")");break}d%2===1&&(n.left!==n.top&&(h=n.left,n.left=n.top,n.top=h),n.width!==n.height&&(h=n.width,n.width=n.height,n.height=h)),p.length&&(i=xr(i,'<g transform="'+p.join(" ")+'">',"</g>"))});const c=s.width,a=s.height,l=n.width,f=n.height;let o,u;c===null?(u=a===null?"1em":a==="auto"?f:a,o=ge(u,l/f)):(o=c==="auto"?l:c,u=a===null?ge(o,f/l):a==="auto"?f:a);const g={},m=(b,p)=>{se(p)||(g[b]=p.toString())};m("width",o),m("height",u);const $=[n.left,n.top,l,f];return g.viewBox=$.join(" "),{attributes:g,viewBox:$,body:i}}function Or(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function jr(e){let t=e.startsWith("<svg>")?e.replace("<svg>","<svg >"):e;return!t.includes(" xmlns:xlink=")&&t.includes(" xlink:")&&(t=t.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),t.includes(" xmlns=")||(t=t.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),Or(t)}function Rr(e){return e.replace(/(['"])\s*\n\s*([^>\\/\s])/g,"$1 $2").replace(/(["';{}><])\s*\n\s*/g,"$1").replace(/\s*\n\s*/g," ").replace(/\s+"/g,'"').replace(/="\s+/g,'="').replace(/(\s)+\/>/g,"/>").trim()}const Tr=/\swidth\s*=\s*["']([\w.]+)["']/,Mr=/\sheight\s*=\s*["']([\w.]+)["']/,X=/<svg\s+/;function Pr(e,t,r){const s=e.slice(0,e.indexOf(">")),n=(i,c)=>{const a=c.exec(s),l=a!=null,f=t[i];return!f&&!se(f)&&(typeof r=="number"?r>0&&(t[i]=`${r}em`):a&&(t[i]=a[1])),l};return[n("width",Tr),n("height",Mr)]}async function ke(e,t,r,s,n,i){const{scale:c,addXmlNs:a=!1}=s??{},{additionalProps:l={},iconCustomizer:f}=s?.customizations??{},o=await n?.()??{};await f?.(t,r,o),Object.keys(l).forEach(b=>{const p=l[b];p!=null&&(o[b]=p)}),i?.(o);const[u,g]=Pr(e,o,c);a&&(!e.includes("xmlns=")&&!o.xmlns&&(o.xmlns="http://www.w3.org/2000/svg"),!e.includes("xmlns:xlink=")&&e.includes("xlink:")&&!o["xmlns:xlink"]&&(o["xmlns:xlink"]="http://www.w3.org/1999/xlink"));const m=Object.keys(o).map(b=>b==="width"&&u||b==="height"&&g?null:`${b}="${o[b]}"`).filter(b=>b!=null);if(m.length&&(e=e.replace(X,`<svg ${m.join(" ")} `)),s){const{defaultStyle:b,defaultClass:p}=s;p&&!e.includes("class=")&&(e=e.replace(X,`<svg class="${p}" `)),b&&!e.includes("style=")&&(e=e.replace(X,`<svg style="${b}" `))}const $=s?.usedProps;return $&&(Object.keys(l).forEach(b=>{const p=o[b];p!=null&&($[b]=p)}),typeof o.width<"u"&&o.width!==null&&($.width=o.width),typeof o.height<"u"&&o.height!==null&&($.height=o.height)),e}async function ye(e,t,r,s){let n;try{if(typeof e=="function")n=await e(r);else{const i=e[r];n=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${r}" in "${t}":`,i);return}if(n){const i=n.indexOf("<svg");i>0&&(n=n.slice(i));const{transform:c}=s?.customizations??{};return n=typeof c=="function"?await c(n,t,r):n,n.startsWith("<svg")?await ke(s?.customizations?.trimCustomSvg===!0?Rr(n):n,t,r,s,void 0):(console.warn(`Custom icon "${r}" in "${t}" is not a valid SVG`),n)}}async function Le(e,t,r,s){let n;const{customize:i}=s?.customizations??{};for(const c of r)if(n=vr(e,c),n){let a={...Pe};typeof i=="function"&&(a=i(a));const{attributes:{width:l,height:f,...o},body:u}=Cr(n,a),g=s?.scale;return await ke(`<svg >${u}</svg>`,t,c,s,()=>({...o}),m=>{const $=(b,p)=>{const C=m[b];let y;if(!se(C)){if(C)return;typeof g=="number"?g&&(y=`${g}em`):y=p}y?m[b]=y:delete m[b]};$("width",l),$("height",f)})}}const Ne=async(e,t,r)=>{const s=r?.customCollections?.[e];if(s)if(typeof s=="function"){let n;try{n=await s(t)}catch(i){console.warn(`Failed to load custom icon "${t}" in "${e}":`,i);return}if(n){if(typeof n=="string")return await ye(()=>n,e,t,r);if("icons"in n){const i=[t,t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),t.replace(/([a-z])(\d+)/g,"$1-$2")];return await Le(n,e,i,r)}}}else return await ye(s,e,t,r)};function kr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lr=["academicons","akar-icons","ant-design","arcticons","basil","bi","bitcoin-icons","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","cbi","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","covid","cryptocurrency-color","cryptocurrency","dashicons","devicon-line","devicon-original","devicon-plain","devicon","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","f7","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","flowbite","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gravity-ui","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","hugeicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","lets-icons","line-md","logos","ls","lucide","mage","majesticons","maki","map","marketeq","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","oui","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline-emojis","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","token-branded","token","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","unjs","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"];const Nr=kr(Lr),Ir=3;function Fr(e){return(t={})=>{const{scale:r=1,mode:s="auto",prefix:n="i-",warn:i=!1,collections:c,extraProperties:a={},customizations:l={},autoInstall:f=!1,collectionsNodeResolvePath:o,layer:u="icons",unit:g,processor:m}=t,$=zr(),b={addXmlNs:!0,scale:r,customCollections:c,autoInstall:f,cwd:o,warn:void 0,customizations:{...l,additionalProps:{...a},trimCustomSvg:!0,async iconCustomizer(C,y,d){await l.iconCustomizer?.(C,y,d),g&&(d.width||(d.width=`${r}${g}`),d.height||(d.height=`${r}${g}`))}}};let p;return{name:"@unocss/preset-icons",enforce:"pre",options:t,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async C=>{let[y,d,h=s]=C,w="",_="",A;p=p||await e(t);const x={};if(d.includes(":"))[w,_]=d.split(":"),A=await p(w,_,{...b,usedProps:x});else{const L=d.split(/-/g);for(let N=Ir;N>=1&&(w=L.slice(0,N).join("-"),_=L.slice(N).join("-"),A=await p(w,_,{...b,usedProps:x}),!A);N--);}if(!A){i&&!$.isESLint&&Oe(`failed to load icon "${y}"`);return}let O;const P=`url("data:image/svg+xml;utf8,${jr(A)}")`;return h==="auto"&&(h=A.includes("currentColor")?"mask":"bg"),h==="mask"?O={"--un-icon":P,"-webkit-mask":"var(--un-icon) no-repeat",mask:"var(--un-icon) no-repeat","-webkit-mask-size":"100% 100%","mask-size":"100% 100%","background-color":"currentColor",color:"inherit",...x}:O={background:`${P} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...x},m?.(O,{collection:w,icon:_,svg:A,mode:h}),O},{layer:u,prefix:n}]]}}}function Ie(e,t){const r=new Map;function s(n){if(Nr.includes(n))return r.has(n)||r.set(n,e(`${t}@iconify-json/${n}/icons.json`)),r.get(n)}return async(n,i,c)=>{let a=await Ne(n,i,c);if(a)return a;const l=await s(n);if(l){const f=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];a=await Le(l,n,f,c)}return a}}function zr(){const e=typeof process<"u"&&process.stdout&&!process.versions.deno,t=e&&!!pe.VSCODE_CWD,r=e&&!!pe.ESLINT;return{isNode:e,isVSCode:t,isESLint:r}}function Dr(e){return Ie(Tt,e)}const Vr=Fr(async e=>{const t=e?.customFetch,r=e?.cdn;return t&&r?Ie(t,r):r?Dr(r):Ne});function Ur(e){return e.replace(/-(\w)/g,(t,r)=>r?r.toUpperCase():"")}function we(e){return e.charAt(0).toUpperCase()+e.slice(1)}function be(e){return e.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var Se=["Webkit","Moz","ms"];function Br(e){const t={};function r(s){const n=t[s];if(n)return n;let i=Ur(s);if(i!=="filter"&&i in e)return t[s]=be(i);i=we(i);for(let c=0;c<Se.length;c++){const a=`${Se[c]}${i}`;if(a in e)return t[s]=be(we(a))}return s}return({entries:s})=>s.forEach(n=>{n[0].startsWith("--")||(n[0]=r(n[0]))})}function qr(e){return e.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function Hr(e={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}const t=window,r=window.document,s=()=>r.documentElement,n=t.__unocss||{},i=Object.assign({},e,n.runtime),c=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(c.postprocess=T(c.postprocess)).unshift(Br(r.createElement("div").style)),i.configResolved?.(n,c);const l=ur(n,c),f=v=>i.inject?i.inject(v):s().prepend(v),o=()=>i.rootElement?i.rootElement():r.body,u=new Map;let g=!0,m=new Set,$,b,p=[];const C=()=>new Promise(v=>{p.push(v),b!=null&&clearTimeout(b),b=setTimeout(()=>h().then(()=>{const S=p;p=[],S.forEach(E=>E())}),0)});function y(v){if(v.nodeType!==1)return;const S=v;S.hasAttribute(a)&&S.removeAttribute(a),S.querySelectorAll(`[${a}]`).forEach(E=>{E.removeAttribute(a)})}function d(v,S){let E=u.get(v);if(!E)if(E=r.createElement("style"),E.setAttribute("data-unocss-runtime-layer",v),u.set(v,E),S==null)f(E);else{const R=d(S),M=R.parentNode;M?M.insertBefore(E,R.nextSibling):f(E)}return E}async function h(){const v=await l.generate(m);return v.layers.reduce((S,E)=>(d(E,S).innerHTML=v.getLayer(E)??"",E),void 0),m=v.matched,{...v,getStyleElement:S=>u.get(S),getStyleElements:()=>u}}async function w(v){const S=m.size;await l.applyExtractors(v,void 0,m),S!==m.size&&await C()}async function _(v=o()){const S=v&&v.outerHTML;S&&(await w(`${S} ${qr(S)}`),y(s()),y(v))}const A=new MutationObserver(v=>{g||v.forEach(async S=>{if(S.target.nodeType!==1)return;const E=S.target;for(const R of u)if(E===R[1])return;if(S.type==="childList")S.addedNodes.forEach(async R=>{if(R.nodeType!==1)return;const M=R;$&&!$(M)||(await w(M.outerHTML),y(M))});else{if($&&!$(E))return;if(S.attributeName!==a){const R=Array.from(E.attributes).map(I=>I.value?`${I.name}="${I.value}"`:I.name).join(" "),M=`<${E.tagName.toLowerCase()} ${R}>`;await w(M)}E.hasAttribute(a)&&E.removeAttribute(a)}})});let x=!1;function O(){if(x)return;const v=i.observer?.target?i.observer.target():o();v&&(A.observe(v,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),x=!0)}function P(){i.bypassDefined&&Gr(l.blocked),_(),O()}function L(){r.readyState==="loading"?t.addEventListener("DOMContentLoaded",P):P()}const N=t.__unocss_runtime=t.__unocss_runtime={version:l.version,uno:l,async extract(v){j(v)||(v.forEach(S=>m.add(S)),v=""),await w(v)},extractAll:_,inspect(v){$=v},toggleObserver(v){v===void 0?g=!g:g=!!v,!x&&!g&&L()},update:h,presets:t.__unocss_runtime?.presets??{}};i.ready?.(N)!==!1&&(g=!1,L())}function Gr(e=new Set){for(let t=0;t<document.styleSheets.length;t++){const r=document.styleSheets[t];let s;try{if(s=r.cssRules||r.rules,!s)continue;Array.from(s).flatMap(n=>n.selectorText?.split(/,/g)||[]).forEach(n=>{n&&(n=n.trim(),n.startsWith(".")&&(n=n.slice(1)),e.add(n))})}catch{continue}}return e}Hr({defaults:{presets:[Vr({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
|