@unocss/runtime 0.53.5 → 0.54.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/attributify.global.js +10 -3
- package/core.global.js +9 -2
- package/full.global.js +10 -3
- package/mini.global.js +10 -3
- package/package.json +4 -4
- package/uno.global.js +10 -3
package/core.global.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
"use strict";(()=>{function
|
|
2
|
-
|
|
1
|
+
"use strict";(()=>{function Vt(i){let t=i.length,e=-1,n,r="",s=i.charCodeAt(0);for(;++e<t;){if(n=i.charCodeAt(e),n===0){r+="\uFFFD";continue}if(n===44){r+="\\,";continue}if(n>=1&&n<=31||n===127||e===0&&n>=48&&n<=57||e===1&&n>=48&&n<=57&&s===45){r+=`\\${n.toString(16)} `;continue}if(e===0&&t===1&&n===45){r+=`\\${i.charAt(e)}`;continue}if(n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122){r+=i.charAt(e);continue}r+=`\\${i.charAt(e)}`}return r}var G=Vt;function A(i=[]){return Array.isArray(i)?i:[i]}function j(i){return Array.from(new Set(i))}function E(i){return typeof i=="string"}function P(i){return E(i)?i:(Array.isArray(i)?i:Object.entries(i)).filter(t=>t[1]!=null)}function ct(i){return Array.isArray(i)?i.find(t=>!Array.isArray(t)||Array.isArray(t[0]))?i.map(t=>P(t)):[i]:[P(i)]}function Pt(i){return i.filter(([t,e],n)=>{if(t.startsWith("$$"))return!1;for(let r=n-1;r>=0;r--)if(i[r][0]===t&&i[r][1]===e)return!1;return!0})}function F(i){return i==null?"":Pt(i).map(([t,e])=>e!=null?`${t}:${e};`:void 0).filter(Boolean).join("")}function K(i){return i&&typeof i=="object"&&!Array.isArray(i)}function tt(i,t,e=!1){let n=i,r=t;if(Array.isArray(r))return e&&Array.isArray(r)?[...n,...r]:[...r];let s={...n};return K(n)&&K(r)&&Object.keys(r).forEach(o=>{K(n[o])&&K(r[o])||Array.isArray(n[o])&&Array.isArray(r[o])?s[o]=tt(n[o],r[o],e):Object.assign(s,{[o]:r[o]})}),s}function I(i){let t,e,n;if(Array.isArray(i)){for(e=Array(t=i.length);t--;)e[t]=(n=i[t])&&typeof n=="object"?I(n):n;return e}if(Object.prototype.toString.call(i)==="[object Object]"){e={};for(t in i)t==="__proto__"?Object.defineProperty(e,t,{value:I(i[t]),configurable:!0,enumerable:!0,writable:!0}):e[t]=(n=i[t])&&typeof n=="object"?I(n):n;return e}return i}function ut(i){return E(i[0])}function ht(i){return E(i[0])}var et="$$shortcut-no-merge";function ft(i){return typeof i=="function"?{match:i}:i}function nt(i){return i.length===3}function dt(i){return i!=null}function gt(){}var q=class{_map=new Map;get(t,e){let n=this._map.get(t);if(n)return n.get(e)}getFallback(t,e,n){let r=this._map.get(t);return r||(r=new Map,this._map.set(t,r)),r.has(e)||r.set(e,n),r.get(e)}set(t,e,n){let r=this._map.get(t);return r||(r=new Map,this._map.set(t,r)),r.set(e,n),this}has(t,e){return this._map.get(t)?.has(e)}delete(t,e){return this._map.get(t)?.delete(e)||!1}deleteTop(t){return this._map.delete(t)}map(t){return Array.from(this._map.entries()).flatMap(([e,n])=>Array.from(n.entries()).map(([r,s])=>t(s,e,r)))}};var Dt=",".charCodeAt(0),It=";".charCodeAt(0),pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mt=new Uint8Array(64),Nt=new Uint8Array(128);for(let i=0;i<pt.length;i++){let t=pt.charCodeAt(i);mt[i]=t,Nt[t]=i}var rt=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(i){return Buffer.from(i.buffer,i.byteOffset,i.byteLength).toString()}}:{decode(i){let t="";for(let e=0;e<i.length;e++)t+=String.fromCharCode(i[e]);return t}};function xt(i){let t=new Int32Array(5),e=1024*16,n=e-36,r=new Uint8Array(e),s=r.subarray(0,n),o=0,a="";for(let l=0;l<i.length;l++){let c=i[l];if(l>0&&(o===e&&(a+=rt.decode(r),o=0),r[o++]=It),c.length!==0){t[0]=0;for(let u=0;u<c.length;u++){let f=c[u];o>n&&(a+=rt.decode(s),r.copyWithin(0,n,o),o-=n),u>0&&(r[o++]=Dt),o=N(r,o,t,f,0),f.length!==1&&(o=N(r,o,t,f,1),o=N(r,o,t,f,2),o=N(r,o,t,f,3),f.length!==4&&(o=N(r,o,t,f,4)))}}}return a+rt.decode(r.subarray(0,o))}function N(i,t,e,n,r){let s=n[r],o=s-e[r];e[r]=s,o=o<0?-o<<1|1:o<<1;do{let a=o&31;o>>>=5,o>0&&(a|=32),i[t++]=mt[a]}while(o>0);return t}var z=class i{constructor(t){this.bits=t instanceof i?t.bits.slice():[]}add(t){this.bits[t>>5]|=1<<(t&31)}has(t){return!!(this.bits[t>>5]&1<<(t&31))}},W=class i{constructor(t,e,n){this.start=t,this.end=e,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(t){this.outro+=t}appendRight(t){this.intro=this.intro+t}clone(){let t=new i(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let e=this;for(;e;)t(e),e=e.next}eachPrevious(t){let e=this;for(;e;)t(e),e=e.previous}edit(t,e,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=e,this.edited=!0,this}prependLeft(t){this.outro=t+this.outro}prependRight(t){this.intro=t+this.intro}split(t){let e=t-this.start,n=this.original.slice(0,e),r=this.original.slice(e);this.original=n;let s=new i(t,this.end,r);return s.outro=this.outro,this.outro="",this.end=t,this.edited?(s.edit("",!1),this.content=""):this.content=n,s.next=this.next,s.next&&(s.next.previous=s),s.previous=this,this.next=s,s}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let e=this.content.replace(t,"");if(e.length)return e!==this.content&&this.split(this.start+e.length).edit("",void 0,!0),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(t,""),this.intro.length)return!0}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let e=this.content.replace(t,"");if(e.length)return e!==this.content&&(this.split(this.end-e.length),this.edit("",void 0,!0)),!0;if(this.edit("",void 0,!0),this.outro=this.outro.replace(t,""),this.outro.length)return!0}};function Ht(){return typeof window<"u"&&typeof window.btoa=="function"?i=>window.btoa(unescape(encodeURIComponent(i))):typeof Buffer=="function"?i=>Buffer.from(i,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var Bt=Ht(),it=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=xt(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Bt(this.toString())}};function Gt(i){let t=i.split(`
|
|
2
|
+
`),e=t.filter(s=>/^\t+/.test(s)),n=t.filter(s=>/^ {2,}/.test(s));if(e.length===0&&n.length===0)return null;if(e.length>=n.length)return" ";let r=n.reduce((s,o)=>{let a=/^ +/.exec(o)[0].length;return Math.min(a,s)},1/0);return new Array(r+1).join(" ")}function Kt(i,t){let e=i.split(/[/\\]/),n=t.split(/[/\\]/);for(e.pop();e[0]===n[0];)e.shift(),n.shift();if(e.length){let r=e.length;for(;r--;)e[r]=".."}return e.concat(n).join("/")}var Ft=Object.prototype.toString;function qt(i){return Ft.call(i)==="[object Object]"}function yt(i){let t=i.split(`
|
|
3
|
+
`),e=[];for(let n=0,r=0;n<t.length;n++)e.push(r),r+=t[n].length+1;return function(r){let s=0,o=e.length;for(;s<o;){let c=s+o>>1;r<e[c]?o=c:s=c+1}let a=s-1,l=r-e[a];return{line:a,column:l}}}var st=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(t,e,n,r){if(e.length){let s=[this.generatedCodeColumn,t,n.line,n.column];r>=0&&s.push(r),this.rawSegments.push(s)}else this.pending&&this.rawSegments.push(this.pending);this.advance(e),this.pending=null}addUneditedChunk(t,e,n,r,s){let o=e.start,a=!0;for(;o<e.end;)(this.hires||a||s.has(o))&&this.rawSegments.push([this.generatedCodeColumn,t,r.line,r.column]),n[o]===`
|
|
4
|
+
`?(r.line+=1,r.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,a=!0):(r.column+=1,this.generatedCodeColumn+=1,a=!1),o+=1;this.pending=null}advance(t){if(!t)return;let e=t.split(`
|
|
5
|
+
`);if(e.length>1){for(let n=0;n<e.length-1;n++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=e[e.length-1].length}},H=`
|
|
6
|
+
`,D={insertLeft:!1,insertRight:!1,storeName:!1},Y=class i{constructor(t,e={}){let n=new W(0,t.length,t);Object.defineProperties(this,{original:{writable:!0,value:t},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:e.filename},indentExclusionRanges:{writable:!0,value:e.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new z},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:e.ignoreList}}),this.byStart[0]=n,this.byEnd[t.length]=n}addSourcemapLocation(t){this.sourcemapLocations.add(t)}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,e){if(typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byEnd[t];return n?n.appendLeft(e):this.intro+=e,this}appendRight(t,e){if(typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byStart[t];return n?n.appendRight(e):this.outro+=e,this}clone(){let t=new i(this.original,{filename:this.filename}),e=this.firstChunk,n=t.firstChunk=t.lastSearchedChunk=e.clone();for(;e;){t.byStart[n.start]=n,t.byEnd[n.end]=n;let r=e.next,s=r&&r.clone();s&&(n.next=s,s.previous=n,n=s),e=r}return t.lastChunk=n,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new z(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let e=0,n=Object.keys(this.storedNames),r=new st(t.hires),s=yt(this.original);return this.intro&&r.advance(this.intro),this.firstChunk.eachNext(o=>{let a=s(o.start);o.intro.length&&r.advance(o.intro),o.edited?r.addEdit(e,o.content,a,o.storeName?n.indexOf(o.original):-1):r.addUneditedChunk(e,o,this.original,a,this.sourcemapLocations),o.outro.length&&r.advance(o.outro)}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?Kt(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:n,mappings:r.raw,x_google_ignoreList:this.ignoreList?[e]:void 0}}generateMap(t){return new it(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=Gt(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,e){let n=/^[^\r\n]/gm;if(qt(t)&&(e=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;e=e||{};let r={};e.exclude&&(typeof e.exclude[0]=="number"?[e.exclude]:e.exclude).forEach(u=>{for(let f=u[0];f<u[1];f+=1)r[f]=!0});let s=e.indentStart!==!1,o=c=>s?`${t}${c}`:(s=!0,c);this.intro=this.intro.replace(n,o);let a=0,l=this.firstChunk;for(;l;){let c=l.end;if(l.edited)r[a]||(l.content=l.content.replace(n,o),l.content.length&&(s=l.content[l.content.length-1]===`
|
|
7
|
+
`));else for(a=l.start;a<c;){if(!r[a]){let u=this.original[a];u===`
|
|
8
|
+
`?s=!0:u!=="\r"&&s&&(s=!1,a===l.start||(this._splitChunk(l,a),l=l.next),l.prependRight(t))}a+=1}a=l.end,l=l.next}return this.outro=this.outro.replace(n,o),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,e){return D.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),D.insertLeft=!0),this.appendLeft(t,e)}insertRight(t,e){return D.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),D.insertRight=!0),this.prependRight(t,e)}move(t,e,n){if(n>=t&&n<=e)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(e),this._split(n);let r=this.byStart[t],s=this.byEnd[e],o=r.previous,a=s.next,l=this.byStart[n];if(!l&&s===this.lastChunk)return this;let c=l?l.previous:this.lastChunk;return o&&(o.next=a),a&&(a.previous=o),c&&(c.next=r),l&&(l.previous=s),r.previous||(this.firstChunk=s.next),s.next||(this.lastChunk=r.previous,this.lastChunk.next=null),r.previous=c,s.next=l||null,c||(this.firstChunk=r),l||(this.lastChunk=s),this}overwrite(t,e,n,r){return r=r||{},this.update(t,e,n,{...r,overwrite:!r.contentOnly})}update(t,e,n,r){if(typeof n!="string")throw new TypeError("replacement content must be a string");for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length;if(e>this.original.length)throw new Error("end is out of bounds");if(t===e)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(e),r===!0&&(D.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),D.storeName=!0),r={storeName:!0});let s=r!==void 0?r.storeName:!1,o=r!==void 0?r.overwrite:!1;if(s){let c=this.original.slice(t,e);Object.defineProperty(this.storedNames,c,{writable:!0,value:!0,enumerable:!0})}let a=this.byStart[t],l=this.byEnd[e];if(a){let c=a;for(;c!==l;){if(c.next!==this.byStart[c.end])throw new Error("Cannot overwrite across a split point");c=c.next,c.edit("",!1)}a.edit(n,s,!o)}else{let c=new W(t,e,"").edit(n,s);l.next=c,c.previous=l}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,e){if(typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byEnd[t];return n?n.prependLeft(e):this.intro=e+this.intro,this}prependRight(t,e){if(typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byStart[t];return n?n.prependRight(e):this.outro=e+this.outro,this}remove(t,e){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length;if(t===e)return this;if(t<0||e>this.original.length)throw new Error("Character is out of bounds");if(t>e)throw new Error("end must be greater than start");this._split(t),this._split(e);let n=this.byStart[t];for(;n;)n.intro="",n.outro="",n.edit(""),n=e>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(H);if(t!==-1)return this.outro.substr(t+1);let e=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(t=n.outro.lastIndexOf(H),t!==-1)return n.outro.substr(t+1)+e;e=n.outro+e}if(n.content.length>0){if(t=n.content.lastIndexOf(H),t!==-1)return n.content.substr(t+1)+e;e=n.content+e}if(n.intro.length>0){if(t=n.intro.lastIndexOf(H),t!==-1)return n.intro.substr(t+1)+e;e=n.intro+e}}while(n=n.previous);return t=this.intro.lastIndexOf(H),t!==-1?this.intro.substr(t+1)+e:this.intro+e}slice(t=0,e=this.original.length){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length;let n="",r=this.firstChunk;for(;r&&(r.start>t||r.end<=t);){if(r.start<e&&r.end>=e)return n;r=r.next}if(r&&r.edited&&r.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);let s=r;for(;r;){r.intro&&(s!==r||r.start===t)&&(n+=r.intro);let o=r.start<e&&r.end>=e;if(o&&r.edited&&r.end!==e)throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);let a=s===r?t-r.start:0,l=o?r.content.length+e-r.end:r.content.length;if(n+=r.content.slice(a,l),r.outro&&(!o||r.end===e)&&(n+=r.outro),o)break;r=r.next}return n}snip(t,e){let n=this.clone();return n.remove(0,t),n.remove(e,n.original.length),n}_split(t){if(this.byStart[t]||this.byEnd[t])return;let e=this.lastSearchedChunk,n=t>e.end;for(;e;){if(e.contains(t))return this._splitChunk(e,t);e=n?this.byStart[e.end]:this.byEnd[e.start]}}_splitChunk(t,e){if(t.edited&&t.content.length){let r=yt(this.original)(e);throw new Error(`Cannot split a chunk that has already been edited (${r.line}:${r.column} \u2013 "${t.original}")`)}let n=t.split(e);return this.byEnd[e]=t,this.byStart[e]=n,this.byEnd[n.end]=n,t===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=t,!0}toString(){let t=this.intro,e=this.firstChunk;for(;e;)t+=e.toString(),e=e.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return!1;while(t=t.next);return!0}length(){let t=this.firstChunk,e=0;do e+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return e}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){let e=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;let n=this.lastChunk;do{let r=n.end,s=n.trimEnd(e);if(n.end!==r&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.previous}while(n);return!1}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){let e=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;let n=this.firstChunk;do{let r=n.end,s=n.trimStart(e);if(n.end!==r&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.next}while(n);return!1}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,e){function n(s,o){return typeof e=="string"?e.replace(/\$(\$|&|\d+)/g,(a,l)=>l==="$"?"$":l==="&"?s[0]:+l<s.length?s[+l]:`$${l}`):e(...s,s.index,o,s.groups)}function r(s,o){let a,l=[];for(;a=s.exec(o);)l.push(a);return l}if(t.global)r(t,this.original).forEach(o=>{o.index!=null&&this.overwrite(o.index,o.index+o[0].length,n(o,this.original))});else{let s=this.original.match(t);s&&s.index!=null&&this.overwrite(s.index,s.index+s[0].length,n(s,this.original))}return this}_replaceString(t,e){let{original:n}=this,r=n.indexOf(t);return r!==-1&&this.overwrite(r,r+t.length,e),this}replace(t,e){return typeof t=="string"?this._replaceString(t,e):this._replaceRegexp(t,e)}_replaceAllString(t,e){let{original:n}=this,r=t.length;for(let s=n.indexOf(t);s!==-1;s=n.indexOf(t,s+r))this.overwrite(s,s+r,e);return this}replaceAll(t,e){if(typeof t=="string")return this._replaceAllString(t,e);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,e)}};var J={};function zt(i=["-",":"]){let t=i.join("|");return J[t]||(J[t]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${t})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),J[t].lastIndex=0,J[t]}function Wt(i,t=["-",":"],e=5){let n=zt(t),r,s=i.toString(),o=new Set,a=new Map;do r=!1,s=s.replace(n,(c,u,f,y,w)=>{if(!t.includes(f))return c;r=!0,o.add(u+f);let T=w+u.length+f.length+1,v={length:c.length,items:[]};a.set(w,v);for(let S of[...y.matchAll(/\S+/g)]){let C=T+S.index,b=a.get(C)?.items;b?a.delete(C):b=[{offset:C,length:S[0].length,className:S[0]}];for(let g of b)g.className=g.className==="~"?u:g.className.replace(/^(!?)(.*)/,`$1${u}${f}$2`),v.items.push(g)}return"$".repeat(c.length)}),e-=1;while(r&&e);let l=typeof i=="string"?new Y(i):i;for(let[c,u]of a)l.overwrite(c,c+u.length,u.items.map(f=>f.className).join(" "));return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:a,get expanded(){return l.toString()}}}function St(i,t=["-",":"],e=5){let n=Wt(i,t,e);return typeof i=="string"?n.expanded:i}var bt=new Set;function wt(i){bt.has(i)||(console.warn("[unocss]",i),bt.add(i))}var Ct=/[\\:]?[\s'"`;{}]+/g;function Yt(i){return[...new Set(i.split(Ct))]}var Z={name:"@unocss/core/extractor-split",order:0,extract({code:i}){return Yt(i)}};function Et(){return{events:{},emit(i,...t){(this.events[i]||[]).forEach(e=>e(...t))},on(i,t){return(this.events[i]=this.events[i]||[]).push(t),()=>this.events[i]=(this.events[i]||[]).filter(e=>e!==t)}}}var Q="default",X="preflights",Jt="shortcuts",vt={[X]:-100,[Jt]:-10,[Q]:0};function Tt(i){return A(i).flatMap(t=>Array.isArray(t)?[t]:Object.entries(t))}var Rt="_uno_resolved";function Zt(i){if(Rt in i)return i;i={...i},Object.defineProperty(i,Rt,{value:!0,enumerable:!1});let t=i.shortcuts?Tt(i.shortcuts):void 0;if(i.shortcuts=t,i.prefix||i.layer){let e=n=>{n[2]||(n[2]={});let r=n[2];r.prefix==null&&i.prefix&&(r.prefix=A(i.prefix)),r.layer==null&&i.layer&&(r.layer=i.layer)};t?.forEach(e),i.rules?.forEach(e)}return i}function At(i){let t=Zt(i);if(!t.presets)return[t];let e=(t.presets||[]).flatMap(A).flatMap(At);return[t,...e]}function ot(i={},t={}){let e=Object.assign({},t,i),n=j((e.presets||[]).flatMap(A).flatMap(At)),r=[...n.filter(h=>h.enforce==="pre"),...n.filter(h=>!h.enforce),...n.filter(h=>h.enforce==="post")],s=[...r,e],o=[...s].reverse(),a=Object.assign({},vt,...s.map(h=>h.layers));function l(h){return j(s.flatMap(x=>A(x[h]||[])))}let c=l("extractors"),u=o.find(h=>h.extractorDefault!==void 0)?.extractorDefault;u===void 0&&(u=Z),u&&!c.includes(u)&&c.unshift(u),c.sort((h,x)=>(h.order||0)-(x.order||0));let f=l("rules"),y={},w=f.length,T=f.map((h,x)=>{if(ut(h)){A(h[2]?.prefix||"").forEach(_=>{y[_+h[0]]=[x,h[1],h[2],h]});return}return[x,...h]}).filter(Boolean).reverse(),v=Qt(s.map(h=>h.theme)),S=l("extendTheme");for(let h of S)v=h(v)||v;let C={templates:j(s.flatMap(h=>A(h.autocomplete?.templates))),extractors:s.flatMap(h=>A(h.autocomplete?.extractors)).sort((h,x)=>(h.order||0)-(x.order||0))},b=l("separators");b.length||(b=[":","-"]);let g={mergeSelectors:!0,warn:!0,blocklist:[],sortLayers:h=>h,...e,presets:r,envMode:e.envMode||"build",shortcutsLayer:e.shortcutsLayer||"shortcuts",layers:a,theme:v,rulesSize:w,rulesDynamic:T,rulesStaticMap:y,preprocess:l("preprocess"),postprocess:l("postprocess"),preflights:l("preflights"),autocomplete:C,variants:l("variants").map(ft).sort((h,x)=>(h.order||0)-(x.order||0)),shortcuts:Tt(l("shortcuts")).reverse(),extractors:c,safelist:l("safelist"),separators:b};for(let h of s)h?.configResolved?.(g);return g}function Qt(i){return i.map(t=>t?I(t):{}).reduce((t,e)=>tt(t,e),{})}var _t="0.54.0";var at=class{constructor(t={},e={}){this.userConfig=t;this.defaults=e;this.config=ot(t,e),this.events.emit("config",this.config)}version=_t;_cache=new Map;config;blocked=new Set;parentOrders=new Map;events=Et();setConfig(t,e){t&&(e&&(this.defaults=e),this.userConfig=t,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=ot(t,this.defaults),this.events.emit("config",this.config))}async applyExtractors(t,e,n=new Set){let r={original:t,code:t,id:e,extracted:n};for(let s of this.config.extractors){let o=await s.extract?.(r);if(o)for(let a of o)n.add(a)}return n}makeContext(t,e){let n={rawSelector:t,currentSelector:e[1],theme:this.config.theme,generator:this,variantHandlers:e[2],constructCSS:(...r)=>this.constructCustomCSS(n,...r),variantMatch:e};return n}async parseToken(t,e){if(this.blocked.has(t))return;let n=`${t}${e?` ${e}`:""}`;if(this._cache.has(n))return this._cache.get(n);let r=t;for(let c of this.config.preprocess)r=c(t);if(this.isBlocked(r)){this.blocked.add(t),this._cache.set(n,null);return}let s=await this.matchVariants(t,r);if(!s||this.isBlocked(s[1])){this.blocked.add(t),this._cache.set(n,null);return}let o=this.makeContext(t,[e||s[0],s[1],s[2],s[3]]);this.config.details&&(o.variants=[...s[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(c=>this.stringifyUtil(c,o)).filter(dt);if(l?.length)return this._cache.set(n,l),l;this._cache.set(n,null)}async generate(t,e={}){let{id:n,scope:r,preflights:s=!0,safelist:o=!0,minify:a=!1}=e,l=E(t)?await this.applyExtractors(t,n):Array.isArray(t)?new Set(t):t;o&&this.config.safelist.forEach(g=>l.add(g));let c=a?"":`
|
|
9
|
+
`,u=new Set([Q]),f=new Set,y=new Map,w={},T=Array.from(l).map(async g=>{if(f.has(g))return;let h=await this.parseToken(g);if(h!=null){f.add(g);for(let x of h){let R=x[3]||"",_=x[4]?.layer;y.has(R)||y.set(R,[]),y.get(R).push(x),_&&u.add(_)}}});await Promise.all(T),await(async()=>{if(!s)return;let g={generator:this,theme:this.config.theme},h=new Set([]);this.config.preflights.forEach(({layer:x=X})=>{u.add(x),h.add(x)}),w=Object.fromEntries(await Promise.all(Array.from(h).map(async x=>{let _=(await Promise.all(this.config.preflights.filter(k=>(k.layer||X)===x).map(async k=>await k.getCSS(g)))).filter(Boolean).join(c);return[x,_]})))})();let v=this.config.sortLayers(Array.from(u).sort((g,h)=>(this.config.layers[g]??0)-(this.config.layers[h]??0)||g.localeCompare(h))),S={},C=g=>{if(S[g])return S[g];let h=Array.from(y).sort((R,_)=>(this.parentOrders.get(R[0])??0)-(this.parentOrders.get(_[0])??0)||R[0]?.localeCompare(_[0]||"")||0).map(([R,_])=>{let k=_.length,V=_.filter(d=>(d[4]?.layer||Q)===g).sort((d,m)=>d[0]-m[0]||(d[4]?.sort||0)-(m[4]?.sort||0)||d[5]?.currentSelector?.localeCompare(m[5]?.currentSelector??"")||d[1]?.localeCompare(m[1]||"")||d[2]?.localeCompare(m[2]||"")||0).map(([,d,m,,L,,U])=>[[[(d&&ne(d,r))??"",L?.sort??0]],m,!!(U??L?.noMerge)]);if(!V.length)return;let B=V.reverse().map(([d,m,L],U)=>{if(!L&&this.config.mergeSelectors)for(let $=U+1;$<k;$++){let O=V[$];if(O&&!O[2]&&(d&&O[0]||d==null&&O[0]==null)&&O[1]===m)return d&&O[0]&&O[0].push(...d),null}let M=d?j(d.sort(($,O)=>$[1]-O[1]||$[0]?.localeCompare(O[0]||"")||0).map($=>$[0]).filter(Boolean)):[];return M.length?`${M.join(`,${c}`)}{${m}}`:m}).filter(Boolean).reverse().join(c);if(!R)return B;let p=R.split(" $$ ");return`${p.join("{")}{${c}${B}${c}}${p.map(d=>"").join("}")}`}).filter(Boolean).join(c);s&&(h=[w[g],h].filter(Boolean).join(c));let x=a?"":`/* layer: ${g} */${c}`;return S[g]=h?x+h:""},b=(g=v,h)=>g.filter(x=>!h?.includes(x)).map(x=>C(x)||"").filter(Boolean).join(c);return{get css(){return b()},layers:v,matched:f,getLayers:b,getLayer:C}}async matchVariants(t,e){let n=new Set,r=[],s=e||t,o=!1,a={rawSelector:t,theme:this.config.theme,generator:this};for(;;){o=!1;for(let l of this.config.variants){if(!l.multiPass&&n.has(l))continue;let c=await l.match(s,a);if(c){if(E(c)){if(c===s)continue;c={matcher:c}}s=c.matcher,r.unshift(c),n.add(l),o=!0;break}}if(!o)break;if(r.length>500)throw new Error(`Too many variants applied to "${t}"`)}return[t,s,r,n]}applyVariants(t,e=t[4],n=t[1]){let s=e.slice().sort((c,u)=>(c.order||0)-(u.order||0)).reduceRight((c,u)=>f=>{let y=u.body?.(f.entries)||f.entries,w=Array.isArray(u.parent)?u.parent:[u.parent,void 0];return(u.handle??ie)({...f,entries:y,selector:u.selector?.(f.selector,y)||f.selector,parent:w[0]||f.parent,parentOrder:w[1]||f.parentOrder,layer:u.layer||f.layer,sort:u.sort||f.sort},c)},c=>c)({prefix:"",selector:re(n),pseudo:"",entries:t[2]}),{parent:o,parentOrder:a}=s;o!=null&&a!=null&&this.parentOrders.set(o,a);let l={selector:[s.prefix,s.selector,s.pseudo].join(""),entries:s.entries,parent:o,layer:s.layer,sort:s.sort,noMerge:s.noMerge};for(let c of this.config.postprocess)c(l);return l}constructCustomCSS(t,e,n){let r=P(e);if(E(r))return r;let{selector:s,entries:o,parent:a}=this.applyVariants([0,n||t.rawSelector,r,void 0,t.variantHandlers]),l=`${s}{${F(o)}}`;return a?`${a}{${l}}`:l}async parseUtil(t,e,n=!1,r){let[s,o,a]=E(t)?await this.matchVariants(t):t;this.config.details&&(e.rules=e.rules??[]);let l=this.config.rulesStaticMap[o];if(l&&l[1]&&(n||!l[2]?.internal)){this.config.details&&e.rules.push(l[3]);let u=l[0],f=P(l[1]),y=l[2];return E(f)?[[u,f,y]]:[[u,s,f,y,a]]}e.variantHandlers=a;let{rulesDynamic:c}=this.config;for(let[u,f,y,w]of c){if(w?.internal&&!n)continue;let T=o;if(w?.prefix){let b=A(w.prefix);if(r){let g=A(r);if(!b.some(h=>g.includes(h)))continue}else{let g=b.find(h=>o.startsWith(h));if(g==null)continue;T=o.slice(g.length)}}let v=T.match(f);if(!v)continue;let S=await y(v,e);if(!S)continue;this.config.details&&e.rules.push([f,y,w]);let C=ct(S).filter(b=>b.length);if(C.length)return C.map(b=>E(b)?[u,b,w]:[u,s,b,w,a])}}stringifyUtil(t,e){if(!t)return;if(nt(t))return[t[0],void 0,t[1],void 0,t[2],this.config.details?e:void 0,void 0];let{selector:n,entries:r,parent:s,layer:o,sort:a,noMerge:l}=this.applyVariants(t),c=F(r);if(!c)return;let{layer:u,sort:f,...y}=t[3]??{},w={...y,layer:o??u,sort:a??f};return[t[0],n,c,s,w,this.config.details?e:void 0,l]}async expandShortcut(t,e,n=5){if(n===0)return;let r=this.config.details?a=>{e.shortcuts=e.shortcuts??[],e.shortcuts.push(a)}:gt,s,o;for(let a of this.config.shortcuts){let l=t;if(a[2]?.prefix){let u=A(a[2].prefix).find(f=>t.startsWith(f));if(u==null)continue;l=t.slice(u.length)}if(ht(a)){if(a[0]===l){s=s||a[2],o=a[1],r(a);break}}else{let c=l.match(a[0]);if(c&&(o=a[1](c,e)),o){s=s||a[2],r(a);break}}}if(E(o)&&(o=St(o.trim()).split(/\s+/g)),!o){let[a,l]=E(t)?await this.matchVariants(t):t;if(a!==l){let c=await this.expandShortcut(l,e,n-1);c&&(o=c[0].map(u=>E(u)?a.replace(l,u):u))}}if(o)return[(await Promise.all(o.map(async a=>(E(a)?(await this.expandShortcut(a,e,n-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),s]}async stringifyShortcuts(t,e,n,r={layer:this.config.shortcutsLayer}){let s=new q,o=(await Promise.all(j(n).map(async u=>{let f=E(u)?await this.parseUtil(u,e,!0,r.prefix):[[Number.POSITIVE_INFINITY,"{inline}",P(u),void 0,[]]];return f||wt(`unmatched utility "${u}" in shortcut "${t[1]}"`),f||[]}))).flat(1).filter(Boolean).sort((u,f)=>u[0]-f[0]),[a,,l]=t,c=[];for(let u of o){if(nt(u)){c.push([u[0],void 0,u[1],void 0,u[2],e,void 0]);continue}let{selector:f,entries:y,parent:w,sort:T,noMerge:v}=this.applyVariants(u,[...u[4],...l],a);s.getFallback(f,w,[[],u[0]])[0].push([y,!!(v??u[3]?.noMerge),T??0])}return c.concat(s.map(([u,f],y,w)=>{let T=(S,C,b)=>{let g=Math.max(...b.map(x=>x[1])),h=b.map(x=>x[0]);return(S?[h.flat(1)]:h).map(x=>{let R=F(x);if(R)return[f,y,R,w,{...r,noMerge:C,sort:g},e,void 0]})};return[[u.filter(([,S])=>S).map(([S,,C])=>[S,C]),!0],[u.filter(([,S])=>!S).map(([S,,C])=>[S,C]),!1]].map(([S,C])=>[...T(!1,C,S.filter(([b])=>b.some(g=>g[0]===et))),...T(!0,C,S.filter(([b])=>b.every(g=>g[0]!==et)))])}).flat(2).filter(Boolean))}isBlocked(t){return!t||this.config.blocklist.some(e=>E(e)?e===t:e.test(t))}};function Ut(i,t){return new at(i,t)}var te=/\s\$\$\s+/g;function ee(i){return i.match(/\s\$\$\s/)}function ne(i,t){return ee(i)?i.replace(te,t?` ${t} `:" "):t?`${t} ${i}`:i}var Lt=/^\[(.+?)(~?=)"(.*)"\]$/;function re(i){return Lt.test(i)?i.replace(Lt,(t,e,n,r)=>`[${G(e)}${n}"${G(r)}"]`):`.${G(i)}`}function ie(i,t){return t(i)}function se(i){return i.replace(/-(\w)/g,(t,e)=>e?e.toUpperCase():"")}function Ot(i){return i.charAt(0).toUpperCase()+i.slice(1)}function kt(i){return i.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var Mt=["Webkit","Moz","ms"];function $t(i){let t={};function e(n){let r=t[n];if(r)return r;let s=se(n);if(s!=="filter"&&s in i)return t[n]=kt(s);s=Ot(s);for(let o=0;o<Mt.length;o++){let a=`${Mt[o]}${s}`;if(a in i)return t[n]=kt(Ot(a))}return n}return({entries:n})=>n.forEach(r=>{r[0].startsWith("--")||(r[0]=e(r[0]))})}function jt(i){return i.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function lt(i={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}let t=window,e=window.document,n=()=>e.documentElement,r=t.__unocss||{},s=Object.assign({},i,r.runtime),o=s.defaults||{},a=s.cloakAttribute??"un-cloak";s.autoPrefix&&(o.postprocess=A(o.postprocess)).unshift($t(e.createElement("div").style)),s.configResolved?.(r,o);let l=Ut(r,o),c=new Map,u=!0,f=new Set,y,w,T=[],v=()=>new Promise(p=>{T.push(p),w!=null&&clearTimeout(w),w=setTimeout(()=>b().then(()=>{let d=T;T=[],d.forEach(m=>m())}),0)});function S(p){if(p.nodeType!==1)return;let d=p;d.hasAttribute(a)&&d.removeAttribute(a),d.querySelectorAll(`[${a}]`).forEach(m=>{m.removeAttribute(a)})}function C(p,d){let m=c.get(p);if(!m)if(m=e.createElement("style"),m.setAttribute("data-unocss-runtime-layer",p),c.set(p,m),d==null)n().prepend(m);else{let L=C(d),U=L.parentNode;U?U.insertBefore(m,L.nextSibling):n().prepend(m)}return m}async function b(){let p=await l.generate(f);return p.layers.reduce((d,m)=>(C(m,d).innerHTML=p.getLayer(m)??"",m),void 0),f=p.matched,{...p,getStyleElement:d=>c.get(d),getStyleElements:()=>c}}async function g(p){let d=f.size;await l.applyExtractors(p,void 0,f),d!==f.size&&await v()}async function h(){let p=e.body,d=p&&p.outerHTML;d&&(await g(`${d} ${jt(d)}`),S(n()),S(p))}let x=new MutationObserver(p=>{u||p.forEach(async d=>{if(d.target.nodeType!==1)return;let m=d.target;for(let L of c)if(m===L[1])return;if(d.type==="childList")d.addedNodes.forEach(async L=>{if(L.nodeType!==1)return;let U=L;y&&!y(U)||(await g(U.outerHTML),S(U))});else{if(y&&!y(m))return;if(d.attributeName!==a){let L=Array.from(m.attributes).map(M=>M.value?`${M.name}="${M.value}"`:M.name).join(" "),U=`<${m.tagName.toLowerCase()} ${L}>`;await g(U)}m.hasAttribute(a)&&m.removeAttribute(a)}})}),R=!1;function _(){if(R)return;let p=n()||e.body;p&&(x.observe(p,{childList:!0,subtree:!0,attributes:!0}),R=!0)}function k(){s.bypassDefined&&oe(l.blocked),h(),_()}function V(){e.readyState==="loading"?t.addEventListener("DOMContentLoaded",k):k()}let B=t.__unocss_runtime=t.__unocss_runtime={version:l.version,uno:l,async extract(p){E(p)||(p.forEach(d=>f.add(d)),p=""),await g(p)},extractAll:h,inspect(p){y=p},toggleObserver(p){p===void 0?u=!u:u=!!p,!R&&!u&&V()},update:b};s.ready?.(B)!==!1&&(u=!1,V())}function oe(i=new Set){for(let t=0;t<document.styleSheets.length;t++){let e=document.styleSheets[t],n;try{if(n=e.cssRules||e.rules,!n)continue;Array.from(n).flatMap(r=>r.selectorText?.split(/,/g)||[]).forEach(r=>{r&&(r=r.trim(),r.startsWith(".")&&(r=r.slice(1)),i.add(r))})}catch{continue}}return i}lt();})();
|