valaxy 0.20.0 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,155 @@
1
+ import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
+ import{a as K,b as C,c as Q,d as l}from"./chunk-AUDFAOQV.mjs";var J=C((hx,Wr)=>{"use strict";l();var Ut=process||{},li=Ut.argv||[],qt=Ut.env||{},bu=!(qt.NO_COLOR||li.includes("--no-color"))&&(!!qt.FORCE_COLOR||li.includes("--color")||Ut.platform==="win32"||(Ut.stdout||{}).isTTY&&qt.TERM!=="dumb"||!!qt.CI),Ru=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+Cu(o,t,r,i)+t:e+o+t},Cu=(e,t,r,n)=>{let o="",i=0;do o+=e.substring(i,n)+r,i=n+t.length,n=e.indexOf(t,i);while(~n);return o+e.substring(i)},ci=(e=bu)=>{let t=e?Ru:()=>String;return{isColorSupported:e,reset:t("\x1B[0m","\x1B[0m"),bold:t("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"),dim:t("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"),italic:t("\x1B[3m","\x1B[23m"),underline:t("\x1B[4m","\x1B[24m"),inverse:t("\x1B[7m","\x1B[27m"),hidden:t("\x1B[8m","\x1B[28m"),strikethrough:t("\x1B[9m","\x1B[29m"),black:t("\x1B[30m","\x1B[39m"),red:t("\x1B[31m","\x1B[39m"),green:t("\x1B[32m","\x1B[39m"),yellow:t("\x1B[33m","\x1B[39m"),blue:t("\x1B[34m","\x1B[39m"),magenta:t("\x1B[35m","\x1B[39m"),cyan:t("\x1B[36m","\x1B[39m"),white:t("\x1B[37m","\x1B[39m"),gray:t("\x1B[90m","\x1B[39m"),bgBlack:t("\x1B[40m","\x1B[49m"),bgRed:t("\x1B[41m","\x1B[49m"),bgGreen:t("\x1B[42m","\x1B[49m"),bgYellow:t("\x1B[43m","\x1B[49m"),bgBlue:t("\x1B[44m","\x1B[49m"),bgMagenta:t("\x1B[45m","\x1B[49m"),bgCyan:t("\x1B[46m","\x1B[49m"),bgWhite:t("\x1B[47m","\x1B[49m"),blackBright:t("\x1B[90m","\x1B[39m"),redBright:t("\x1B[91m","\x1B[39m"),greenBright:t("\x1B[92m","\x1B[39m"),yellowBright:t("\x1B[93m","\x1B[39m"),blueBright:t("\x1B[94m","\x1B[39m"),magentaBright:t("\x1B[95m","\x1B[39m"),cyanBright:t("\x1B[96m","\x1B[39m"),whiteBright:t("\x1B[97m","\x1B[39m"),bgBlackBright:t("\x1B[100m","\x1B[49m"),bgRedBright:t("\x1B[101m","\x1B[49m"),bgGreenBright:t("\x1B[102m","\x1B[49m"),bgYellowBright:t("\x1B[103m","\x1B[49m"),bgBlueBright:t("\x1B[104m","\x1B[49m"),bgMagentaBright:t("\x1B[105m","\x1B[49m"),bgCyanBright:t("\x1B[106m","\x1B[49m"),bgWhiteBright:t("\x1B[107m","\x1B[49m")}};Wr.exports=ci();Wr.exports.createColors=ci});var ui=C(rt=>{"use strict";l();Object.defineProperty(rt,"__esModule",{value:!0});rt.splitWhen=rt.flatten=void 0;function Su(e){return e.reduce((t,r)=>[].concat(t,r),[])}rt.flatten=Su;function wu(e,t){let r=[[]],n=0;for(let o of e)t(o)?(n++,r[n]=[]):r[n].push(o);return r}rt.splitWhen=wu});var fi=C(Wt=>{"use strict";l();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.isEnoentCodeError=void 0;function Eu(e){return e.code==="ENOENT"}Wt.isEnoentCodeError=Eu});var pi=C(Gt=>{"use strict";l();Object.defineProperty(Gt,"__esModule",{value:!0});Gt.createDirentFromStats=void 0;var Gr=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function Au(e,t){return new Gr(e,t)}Gt.createDirentFromStats=Au});var hi=C(Y=>{"use strict";l();Object.defineProperty(Y,"__esModule",{value:!0});Y.convertPosixPathToPattern=Y.convertWindowsPathToPattern=Y.convertPathToPattern=Y.escapePosixPath=Y.escapeWindowsPath=Y.escape=Y.removeLeadingDotSegment=Y.makeAbsolute=Y.unixify=void 0;var ku=K("os"),Pu=K("path"),mi=ku.platform()==="win32",Ou=2,Tu=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,$u=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,Vu=/^\\\\([.?])/,Mu=/\\(?![!()+@[\]{}])/g;function Lu(e){return e.replace(/\\/g,"/")}Y.unixify=Lu;function Iu(e,t){return Pu.resolve(e,t)}Y.makeAbsolute=Iu;function Nu(e){if(e.charAt(0)==="."){let t=e.charAt(1);if(t==="/"||t==="\\")return e.slice(Ou)}return e}Y.removeLeadingDotSegment=Nu;Y.escape=mi?Kr:zr;function Kr(e){return e.replace($u,"\\$2")}Y.escapeWindowsPath=Kr;function zr(e){return e.replace(Tu,"\\$2")}Y.escapePosixPath=zr;Y.convertPathToPattern=mi?di:gi;function di(e){return Kr(e).replace(Vu,"//$1").replace(Mu,"/")}Y.convertWindowsPathToPattern=di;function gi(e){return zr(e)}Y.convertPosixPathToPattern=gi});var xi=C((Ex,yi)=>{"use strict";l();yi.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(r[2])return!0;t=t.slice(r.index+r[0].length)}return!1}});var bi=C((kx,_i)=>{"use strict";l();var Fu=xi(),vi={"{":"}","(":")","[":"]"},Du=function(e){if(e[0]==="!")return!0;for(var t=0,r=-2,n=-2,o=-2,i=-2,s=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||n!==-1&&e[t]==="["&&e[t+1]!=="]"&&(n<t&&(n=e.indexOf("]",t)),n>t&&(s===-1||s>n||(s=e.indexOf("\\",t),s===-1||s>n)))||o!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(o=e.indexOf("}",t),o>t&&(s=e.indexOf("\\",t),s===-1||s>o))||i!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(i=e.indexOf(")",t),i>t&&(s=e.indexOf("\\",t),s===-1||s>i))||r!==-1&&e[t]==="("&&e[t+1]!=="|"&&(r<t&&(r=e.indexOf("|",t)),r!==-1&&e[r+1]!==")"&&(i=e.indexOf(")",r),i>r&&(s=e.indexOf("\\",r),s===-1||s>i))))return!0;if(e[t]==="\\"){var a=e[t+1];t+=2;var c=vi[a];if(c){var f=e.indexOf(c,t);f!==-1&&(t=f+1)}if(e[t]==="!")return!0}else t++}return!1},Hu=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var r=e[t+1];t+=2;var n=vi[r];if(n){var o=e.indexOf(n,t);o!==-1&&(t=o+1)}if(e[t]==="!")return!0}else t++}return!1};_i.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(Fu(t))return!0;var n=Du;return r&&r.strict===!1&&(n=Hu),n(t)}});var Ci=C((Ox,Ri)=>{"use strict";l();var ju=bi(),Bu=K("path").posix.dirname,qu=K("os").platform()==="win32",Yr="/",Uu=/\\/g,Wu=/[\{\[].*[\}\]]$/,Gu=/(^|[^\\])([\{\[]|\([^\)]+$)/,Ku=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Ri.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&qu&&t.indexOf(Yr)<0&&(t=t.replace(Uu,Yr)),Wu.test(t)&&(t+=Yr),t+="a";do t=Bu(t);while(ju(t)||Gu.test(t));return t.replace(Ku,"$1")}});var Kt=C(ae=>{"use strict";l();ae.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;ae.find=(e,t)=>e.nodes.find(r=>r.type===t);ae.exceedsLimit=(e,t,r=1,n)=>n===!1||!ae.isInteger(e)||!ae.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;ae.escapeNode=(e,t=0,r)=>{let n=e.nodes[t];n&&(r&&n.type===r||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)};ae.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);ae.isInvalidBrace=e=>e.type!=="brace"?!1:e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges>>0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1;ae.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;ae.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);ae.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let i=n[o];if(Array.isArray(i)){r(i);continue}i!==void 0&&t.push(i)}return t};return r(e),t}});var zt=C((Mx,wi)=>{"use strict";l();var Si=Kt();wi.exports=(e,t={})=>{let r=(n,o={})=>{let i=t.escapeInvalid&&Si.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(i||s)&&Si.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let c of n.nodes)a+=r(c);return a};return r(e)}});var Ai=C((Ix,Ei)=>{"use strict";l();Ei.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var Ii=C((Fx,Li)=>{"use strict";l();var ki=Ai(),Ge=(e,t,r)=>{if(ki(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(ki(t)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let n={relaxZeros:!0,...r};typeof n.strictZeros=="boolean"&&(n.relaxZeros=n.strictZeros===!1);let o=String(n.relaxZeros),i=String(n.shorthand),s=String(n.capture),a=String(n.wrap),c=e+":"+t+"="+o+i+s+a;if(Ge.cache.hasOwnProperty(c))return Ge.cache[c].result;let f=Math.min(e,t),u=Math.max(e,t);if(Math.abs(f-u)===1){let _=e+"|"+t;return n.capture?`(${_})`:n.wrap===!1?_:`(?:${_})`}let m=Mi(e)||Mi(t),p={min:e,max:t,a:f,b:u},y=[],h=[];if(m&&(p.isPadded=m,p.maxLen=String(p.max).length),f<0){let _=u<0?Math.abs(u):1;h=Pi(_,Math.abs(f),p,n),f=p.a=0}return u>=0&&(y=Pi(f,u,p,n)),p.negatives=h,p.positives=y,p.result=zu(h,y,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&y.length+h.length>1&&(p.result=`(?:${p.result})`),Ge.cache[c]=p,p.result};function zu(e,t,r){let n=Xr(e,t,"-",!1,r)||[],o=Xr(t,e,"",!1,r)||[],i=Xr(e,t,"-?",!0,r)||[];return n.concat(i).concat(o).join("|")}function Yu(e,t){let r=1,n=1,o=Ti(e,r),i=new Set([t]);for(;e<=o&&o<=t;)i.add(o),r+=1,o=Ti(e,r);for(o=$i(t+1,n)-1;e<o&&o<=t;)i.add(o),n+=1,o=$i(t+1,n)-1;return i=[...i],i.sort(Ju),i}function Xu(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=Qu(e,t),o=n.length,i="",s=0;for(let a=0;a<o;a++){let[c,f]=n[a];c===f?i+=c:c!=="0"||f!=="9"?i+=Zu(c,f,r):s++}return s&&(i+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:i,count:[s],digits:o}}function Pi(e,t,r,n){let o=Yu(e,t),i=[],s=e,a;for(let c=0;c<o.length;c++){let f=o[c],u=Xu(String(s),String(f),n),m="";if(!r.isPadded&&a&&a.pattern===u.pattern){a.count.length>1&&a.count.pop(),a.count.push(u.count[0]),a.string=a.pattern+Vi(a.count),s=f+1;continue}r.isPadded&&(m=ef(f,r,n)),u.string=m+u.pattern+Vi(u.count),i.push(u),s=f+1,a=u}return i}function Xr(e,t,r,n,o){let i=[];for(let s of e){let{string:a}=s;!n&&!Oi(t,"string",a)&&i.push(r+a),n&&Oi(t,"string",a)&&i.push(r+a)}return i}function Qu(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function Ju(e,t){return e>t?1:t>e?-1:0}function Oi(e,t,r){return e.some(n=>n[t]===r)}function Ti(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function $i(e,t){return e-e%Math.pow(10,t)}function Vi(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function Zu(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function Mi(e){return/^-?(0+)\d/.test(e)}function ef(e,t,r){if(!t.isPadded)return e;let n=Math.abs(t.maxLen-String(e).length),o=r.relaxZeros!==!1;switch(n){case 0:return"";case 1:return o?"0?":"0";case 2:return o?"0{0,2}":"00";default:return o?`0{0,${n}}`:`0{${n}}`}}Ge.cache={};Ge.clearCache=()=>Ge.cache={};Li.exports=Ge});var Zr=C((Hx,qi)=>{"use strict";l();var tf=K("util"),Fi=Ii(),Ni=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),rf=e=>t=>e===!0?Number(t):String(t),Qr=e=>typeof e=="number"||typeof e=="string"&&e!=="",bt=e=>Number.isInteger(+e),Jr=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},nf=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,of=(e,t,r)=>{if(t>0){let n=e[0]==="-"?"-":"";n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,"0")}return r===!1?String(e):e},Xt=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},sf=(e,t,r)=>{e.negatives.sort((a,c)=>a<c?-1:a>c?1:0),e.positives.sort((a,c)=>a<c?-1:a>c?1:0);let n=t.capture?"":"?:",o="",i="",s;return e.positives.length&&(o=e.positives.map(a=>Xt(String(a),r)).join("|")),e.negatives.length&&(i=`-(${n}${e.negatives.map(a=>Xt(String(a),r)).join("|")})`),o&&i?s=`${o}|${i}`:s=o||i,t.wrap?`(${n}${s})`:s},Di=(e,t,r,n)=>{if(r)return Fi(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let i=String.fromCharCode(t);return`[${o}-${i}]`},Hi=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return Fi(e,t,r)},ji=(...e)=>new RangeError("Invalid range arguments: "+tf.inspect(...e)),Bi=(e,t,r)=>{if(r.strictRanges===!0)throw ji([e,t]);return[]},af=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},lf=(e,t,r=1,n={})=>{let o=Number(e),i=Number(t);if(!Number.isInteger(o)||!Number.isInteger(i)){if(n.strictRanges===!0)throw ji([e,t]);return[]}o===0&&(o=0),i===0&&(i=0);let s=o>i,a=String(e),c=String(t),f=String(r);r=Math.max(Math.abs(r),1);let u=Jr(a)||Jr(c)||Jr(f),m=u?Math.max(a.length,c.length,f.length):0,p=u===!1&&nf(e,t,n)===!1,y=n.transform||rf(p);if(n.toRegex&&r===1)return Di(Xt(e,m),Xt(t,m),!0,n);let h={negatives:[],positives:[]},_=$=>h[$<0?"negatives":"positives"].push(Math.abs($)),P=[],w=0;for(;s?o>=i:o<=i;)n.toRegex===!0&&r>1?_(o):P.push(of(y(o,w),m,p)),o=s?o-r:o+r,w++;return n.toRegex===!0?r>1?sf(h,n,m):Hi(P,null,{wrap:!1,...n}):P},cf=(e,t,r=1,n={})=>{if(!bt(e)&&e.length>1||!bt(t)&&t.length>1)return Bi(e,t,n);let o=n.transform||(p=>String.fromCharCode(p)),i=`${e}`.charCodeAt(0),s=`${t}`.charCodeAt(0),a=i>s,c=Math.min(i,s),f=Math.max(i,s);if(n.toRegex&&r===1)return Di(c,f,!1,n);let u=[],m=0;for(;a?i>=s:i<=s;)u.push(o(i,m)),i=a?i-r:i+r,m++;return n.toRegex===!0?Hi(u,null,{wrap:!1,options:n}):u},Yt=(e,t,r,n={})=>{if(t==null&&Qr(e))return[e];if(!Qr(e)||!Qr(t))return Bi(e,t,n);if(typeof r=="function")return Yt(e,t,1,{transform:r});if(Ni(r))return Yt(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,bt(r)?bt(e)&&bt(t)?lf(e,t,r,o):cf(e,t,Math.max(Math.abs(r),1),o):r!=null&&!Ni(r)?af(r,o):Yt(e,t,1,r)};qi.exports=Yt});var Gi=C((Bx,Wi)=>{"use strict";l();var uf=Zr(),Ui=Kt(),ff=(e,t={})=>{let r=(n,o={})=>{let i=Ui.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a=i===!0||s===!0,c=t.escapeInvalid===!0?"\\":"",f="";if(n.isOpen===!0)return c+n.value;if(n.isClose===!0)return console.log("node.isClose",c,n.value),c+n.value;if(n.type==="open")return a?c+n.value:"(";if(n.type==="close")return a?c+n.value:")";if(n.type==="comma")return n.prev.type==="comma"?"":a?n.value:"|";if(n.value)return n.value;if(n.nodes&&n.ranges>0){let u=Ui.reduce(n.nodes),m=uf(...u,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(m.length!==0)return u.length>1&&m.length>1?`(${m})`:m}if(n.nodes)for(let u of n.nodes)f+=r(u,n);return f};return r(e)};Wi.exports=ff});var Yi=C((Ux,zi)=>{"use strict";l();var pf=Zr(),Ki=zt(),nt=Kt(),Ke=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?nt.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let i of o)n.push(Ke(i,t,r));else for(let i of t)r===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?Ke(o,i,r):o+i);return nt.flatten(n)},mf=(e,t={})=>{let r=t.rangeLimit===void 0?1e3:t.rangeLimit,n=(o,i={})=>{o.queue=[];let s=i,a=i.queue;for(;s.type!=="brace"&&s.type!=="root"&&s.parent;)s=s.parent,a=s.queue;if(o.invalid||o.dollar){a.push(Ke(a.pop(),Ki(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(Ke(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let m=nt.reduce(o.nodes);if(nt.exceedsLimit(...m,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=pf(...m,t);p.length===0&&(p=Ki(o,t)),a.push(Ke(a.pop(),p)),o.nodes=[];return}let c=nt.encloseBrace(o),f=o.queue,u=o;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,f=u.queue;for(let m=0;m<o.nodes.length;m++){let p=o.nodes[m];if(p.type==="comma"&&o.type==="brace"){m===1&&f.push(""),f.push("");continue}if(p.type==="close"){a.push(Ke(a.pop(),f,c));continue}if(p.value&&p.type!=="open"){f.push(Ke(f.pop(),p.value));continue}p.nodes&&n(p,o)}return f};return nt.flatten(n(e))};zi.exports=mf});var Qi=C((Gx,Xi)=>{"use strict";l();Xi.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
3
+ `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var rs=C((zx,ts)=>{"use strict";l();var df=zt(),{MAX_LENGTH:Ji,CHAR_BACKSLASH:en,CHAR_BACKTICK:gf,CHAR_COMMA:hf,CHAR_DOT:yf,CHAR_LEFT_PARENTHESES:xf,CHAR_RIGHT_PARENTHESES:vf,CHAR_LEFT_CURLY_BRACE:_f,CHAR_RIGHT_CURLY_BRACE:bf,CHAR_LEFT_SQUARE_BRACKET:Zi,CHAR_RIGHT_SQUARE_BRACKET:es,CHAR_DOUBLE_QUOTE:Rf,CHAR_SINGLE_QUOTE:Cf,CHAR_NO_BREAK_SPACE:Sf,CHAR_ZERO_WIDTH_NOBREAK_SPACE:wf}=Qi(),Ef=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min(Ji,r.maxLength):Ji;if(e.length>n)throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${n})`);let o={type:"root",input:e,nodes:[]},i=[o],s=o,a=o,c=0,f=e.length,u=0,m=0,p,y=()=>e[u++],h=_=>{if(_.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&_.type==="text"){a.value+=_.value;return}return s.nodes.push(_),_.parent=s,_.prev=a,a=_,_};for(h({type:"bos"});u<f;)if(s=i[i.length-1],p=y(),!(p===wf||p===Sf)){if(p===en){h({type:"text",value:(t.keepEscaping?p:"")+y()});continue}if(p===es){h({type:"text",value:"\\"+p});continue}if(p===Zi){c++;let _;for(;u<f&&(_=y());){if(p+=_,_===Zi){c++;continue}if(_===en){p+=y();continue}if(_===es&&(c--,c===0))break}h({type:"text",value:p});continue}if(p===xf){s=h({type:"paren",nodes:[]}),i.push(s),h({type:"text",value:p});continue}if(p===vf){if(s.type!=="paren"){h({type:"text",value:p});continue}s=i.pop(),h({type:"text",value:p}),s=i[i.length-1];continue}if(p===Rf||p===Cf||p===gf){let _=p,P;for(t.keepQuotes!==!0&&(p="");u<f&&(P=y());){if(P===en){p+=P+y();continue}if(P===_){t.keepQuotes===!0&&(p+=P);break}p+=P}h({type:"text",value:p});continue}if(p===_f){m++;let P={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||s.dollar===!0,depth:m,commas:0,ranges:0,nodes:[]};s=h(P),i.push(s),h({type:"open",value:p});continue}if(p===bf){if(s.type!=="brace"){h({type:"text",value:p});continue}let _="close";s=i.pop(),s.close=!0,h({type:_,value:p}),m--,s=i[i.length-1];continue}if(p===hf&&m>0){if(s.ranges>0){s.ranges=0;let _=s.nodes.shift();s.nodes=[_,{type:"text",value:df(s)}]}h({type:"comma",value:p}),s.commas++;continue}if(p===yf&&m>0&&s.commas===0){let _=s.nodes;if(m===0||_.length===0){h({type:"text",value:p});continue}if(a.type==="dot"){if(s.range=[],a.value+=p,a.type="range",s.nodes.length!==3&&s.nodes.length!==5){s.invalid=!0,s.ranges=0,a.type="text";continue}s.ranges++,s.args=[];continue}if(a.type==="range"){_.pop();let P=_[_.length-1];P.value+=a.value+p,a=P,s.ranges--;continue}h({type:"dot",value:p});continue}h({type:"text",value:p})}do if(s=i.pop(),s.type!=="root"){s.nodes.forEach(w=>{w.nodes||(w.type==="open"&&(w.isOpen=!0),w.type==="close"&&(w.isClose=!0),w.nodes||(w.type="text"),w.invalid=!0)});let _=i[i.length-1],P=_.nodes.indexOf(s);_.nodes.splice(P,1,...s.nodes)}while(i.length>0);return h({type:"eos"}),o};ts.exports=Ef});var is=C((Xx,os)=>{"use strict";l();var ns=zt(),Af=Gi(),kf=Yi(),Pf=rs(),ie=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=ie.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(ie.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};ie.parse=(e,t={})=>Pf(e,t);ie.stringify=(e,t={})=>ns(typeof e=="string"?ie.parse(e,t):e,t);ie.compile=(e,t={})=>(typeof e=="string"&&(e=ie.parse(e,t)),Af(e,t));ie.expand=(e,t={})=>{typeof e=="string"&&(e=ie.parse(e,t));let r=kf(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};ie.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?ie.compile(e,t):ie.expand(e,t);os.exports=ie});var Rt=C((Jx,us)=>{"use strict";l();var Of=K("path"),ye="\\\\/",ss=`[^${ye}]`,we="\\.",Tf="\\+",$f="\\?",Qt="\\/",Vf="(?=.)",as="[^/]",tn=`(?:${Qt}|$)`,ls=`(?:^|${Qt})`,rn=`${we}{1,2}${tn}`,Mf=`(?!${we})`,Lf=`(?!${ls}${rn})`,If=`(?!${we}{0,1}${tn})`,Nf=`(?!${rn})`,Ff=`[^.${Qt}]`,Df=`${as}*?`,cs={DOT_LITERAL:we,PLUS_LITERAL:Tf,QMARK_LITERAL:$f,SLASH_LITERAL:Qt,ONE_CHAR:Vf,QMARK:as,END_ANCHOR:tn,DOTS_SLASH:rn,NO_DOT:Mf,NO_DOTS:Lf,NO_DOT_SLASH:If,NO_DOTS_SLASH:Nf,QMARK_NO_DOT:Ff,STAR:Df,START_ANCHOR:ls},Hf={...cs,SLASH_LITERAL:`[${ye}]`,QMARK:ss,STAR:`${ss}*?`,DOTS_SLASH:`${we}{1,2}(?:[${ye}]|$)`,NO_DOT:`(?!${we})`,NO_DOTS:`(?!(?:^|[${ye}])${we}{1,2}(?:[${ye}]|$))`,NO_DOT_SLASH:`(?!${we}{0,1}(?:[${ye}]|$))`,NO_DOTS_SLASH:`(?!${we}{1,2}(?:[${ye}]|$))`,QMARK_NO_DOT:`[^.${ye}]`,START_ANCHOR:`(?:^|[${ye}])`,END_ANCHOR:`(?:[${ye}]|$)`},jf={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};us.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:jf,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Of.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===!0?Hf:cs}}});var Ct=C(ne=>{"use strict";l();var Bf=K("path"),qf=process.platform==="win32",{REGEX_BACKSLASH:Uf,REGEX_REMOVE_BACKSLASH:Wf,REGEX_SPECIAL_CHARS:Gf,REGEX_SPECIAL_CHARS_GLOBAL:Kf}=Rt();ne.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);ne.hasRegexChars=e=>Gf.test(e);ne.isRegexChar=e=>e.length===1&&ne.hasRegexChars(e);ne.escapeRegex=e=>e.replace(Kf,"\\$1");ne.toPosixSlashes=e=>e.replace(Uf,"/");ne.removeBackslashes=e=>e.replace(Wf,t=>t==="\\"?"":t);ne.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};ne.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:qf===!0||Bf.sep==="\\";ne.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?ne.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};ne.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};ne.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",i=`${n}(?:${e})${o}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i}});var xs=C((rv,ys)=>{"use strict";l();var fs=Ct(),{CHAR_ASTERISK:nn,CHAR_AT:zf,CHAR_BACKWARD_SLASH:St,CHAR_COMMA:Yf,CHAR_DOT:on,CHAR_EXCLAMATION_MARK:sn,CHAR_FORWARD_SLASH:hs,CHAR_LEFT_CURLY_BRACE:an,CHAR_LEFT_PARENTHESES:ln,CHAR_LEFT_SQUARE_BRACKET:Xf,CHAR_PLUS:Qf,CHAR_QUESTION_MARK:ps,CHAR_RIGHT_CURLY_BRACE:Jf,CHAR_RIGHT_PARENTHESES:ms,CHAR_RIGHT_SQUARE_BRACKET:Zf}=Rt(),ds=e=>e===hs||e===St,gs=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},ep=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,i=[],s=[],a=[],c=e,f=-1,u=0,m=0,p=!1,y=!1,h=!1,_=!1,P=!1,w=!1,$=!1,E=!1,V=!1,A=!1,M=0,O,k,F={value:"",depth:0,isGlob:!1},W=()=>f>=n,b=()=>c.charCodeAt(f+1),q=()=>(O=k,c.charCodeAt(++f));for(;f<n;){k=q();let te;if(k===St){$=F.backslashes=!0,k=q(),k===an&&(w=!0);continue}if(w===!0||k===an){for(M++;W()!==!0&&(k=q());){if(k===St){$=F.backslashes=!0,q();continue}if(k===an){M++;continue}if(w!==!0&&k===on&&(k=q())===on){if(p=F.isBrace=!0,h=F.isGlob=!0,A=!0,o===!0)continue;break}if(w!==!0&&k===Yf){if(p=F.isBrace=!0,h=F.isGlob=!0,A=!0,o===!0)continue;break}if(k===Jf&&(M--,M===0)){w=!1,p=F.isBrace=!0,A=!0;break}}if(o===!0)continue;break}if(k===hs){if(i.push(f),s.push(F),F={value:"",depth:0,isGlob:!1},A===!0)continue;if(O===on&&f===u+1){u+=2;continue}m=f+1;continue}if(r.noext!==!0&&(k===Qf||k===zf||k===nn||k===ps||k===sn)===!0&&b()===ln){if(h=F.isGlob=!0,_=F.isExtglob=!0,A=!0,k===sn&&f===u&&(V=!0),o===!0){for(;W()!==!0&&(k=q());){if(k===St){$=F.backslashes=!0,k=q();continue}if(k===ms){h=F.isGlob=!0,A=!0;break}}continue}break}if(k===nn){if(O===nn&&(P=F.isGlobstar=!0),h=F.isGlob=!0,A=!0,o===!0)continue;break}if(k===ps){if(h=F.isGlob=!0,A=!0,o===!0)continue;break}if(k===Xf){for(;W()!==!0&&(te=q());){if(te===St){$=F.backslashes=!0,q();continue}if(te===Zf){y=F.isBracket=!0,h=F.isGlob=!0,A=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&k===sn&&f===u){E=F.negated=!0,u++;continue}if(r.noparen!==!0&&k===ln){if(h=F.isGlob=!0,o===!0){for(;W()!==!0&&(k=q());){if(k===ln){$=F.backslashes=!0,k=q();continue}if(k===ms){A=!0;break}}continue}break}if(h===!0){if(A=!0,o===!0)continue;break}}r.noext===!0&&(_=!1,h=!1);let H=c,ke="",x="";u>0&&(ke=c.slice(0,u),c=c.slice(u),m-=u),H&&h===!0&&m>0?(H=c.slice(0,m),x=c.slice(m)):h===!0?(H="",x=c):H=c,H&&H!==""&&H!=="/"&&H!==c&&ds(H.charCodeAt(H.length-1))&&(H=H.slice(0,-1)),r.unescape===!0&&(x&&(x=fs.removeBackslashes(x)),H&&$===!0&&(H=fs.removeBackslashes(H)));let v={prefix:ke,input:e,start:u,base:H,glob:x,isBrace:p,isBracket:y,isGlob:h,isExtglob:_,isGlobstar:P,negated:E,negatedExtglob:V};if(r.tokens===!0&&(v.maxDepth=0,ds(k)||s.push(F),v.tokens=s),r.parts===!0||r.tokens===!0){let te;for(let D=0;D<i.length;D++){let ge=te?te+1:u,he=i[D],oe=e.slice(ge,he);r.tokens&&(D===0&&u!==0?(s[D].isPrefix=!0,s[D].value=ke):s[D].value=oe,gs(s[D]),v.maxDepth+=s[D].depth),(D!==0||oe!=="")&&a.push(oe),te=he}if(te&&te+1<e.length){let D=e.slice(te+1);a.push(D),r.tokens&&(s[s.length-1].value=D,gs(s[s.length-1]),v.maxDepth+=s[s.length-1].depth)}v.slashes=i,v.parts=a}return v};ys.exports=ep});var bs=C((ov,_s)=>{"use strict";l();var Jt=Rt(),se=Ct(),{MAX_LENGTH:Zt,POSIX_REGEX_SOURCE:tp,REGEX_NON_SPECIAL_CHARS:rp,REGEX_SPECIAL_CHARS_BACKREF:np,REPLACEMENTS:vs}=Jt,op=(e,t)=>{if(typeof t.expandRange=="function")return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch{return e.map(o=>se.escapeRegex(o)).join("..")}return r},ot=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,cn=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=vs[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(Zt,r.maxLength):Zt,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);let i={type:"bos",value:"",output:r.prepend||""},s=[i],a=r.capture?"":"?:",c=se.isWindows(t),f=Jt.globChars(c),u=Jt.extglobChars(f),{DOT_LITERAL:m,PLUS_LITERAL:p,SLASH_LITERAL:y,ONE_CHAR:h,DOTS_SLASH:_,NO_DOT:P,NO_DOT_SLASH:w,NO_DOTS_SLASH:$,QMARK:E,QMARK_NO_DOT:V,STAR:A,START_ANCHOR:M}=f,O=S=>`(${a}(?:(?!${M}${S.dot?_:m}).)*?)`,k=r.dot?"":P,F=r.dot?E:V,W=r.bash===!0?O(r):A;r.capture&&(W=`(${W})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let b={input:e,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:s};e=se.removePrefix(e,b),o=e.length;let q=[],H=[],ke=[],x=i,v,te=()=>b.index===o-1,D=b.peek=(S=1)=>e[b.index+S],ge=b.advance=()=>e[++b.index]||"",he=()=>e.slice(b.index+1),oe=(S="",j=0)=>{b.consumed+=S,b.index+=j},Dt=S=>{b.output+=S.output!=null?S.output:S.value,oe(S.value)},xu=()=>{let S=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)ge(),b.start++,S++;return S%2===0?!1:(b.negated=!0,b.start++,!0)},Ht=S=>{b[S]++,ke.push(S)},We=S=>{b[S]--,ke.pop()},I=S=>{if(x.type==="globstar"){let j=b.braces>0&&(S.type==="comma"||S.type==="brace"),R=S.extglob===!0||q.length&&(S.type==="pipe"||S.type==="paren");S.type!=="slash"&&S.type!=="paren"&&!j&&!R&&(b.output=b.output.slice(0,-x.output.length),x.type="star",x.value="*",x.output=W,b.output+=x.output)}if(q.length&&S.type!=="paren"&&(q[q.length-1].inner+=S.value),(S.value||S.output)&&Dt(S),x&&x.type==="text"&&S.type==="text"){x.value+=S.value,x.output=(x.output||"")+S.value;return}S.prev=x,s.push(S),x=S},jt=(S,j)=>{let R={...u[j],conditions:1,inner:""};R.prev=x,R.parens=b.parens,R.output=b.output;let L=(r.capture?"(":"")+R.open;Ht("parens"),I({type:S,value:j,output:b.output?"":h}),I({type:"paren",extglob:!0,value:ge(),output:L}),q.push(R)},vu=S=>{let j=S.close+(r.capture?")":""),R;if(S.type==="negate"){let L=W;if(S.inner&&S.inner.length>1&&S.inner.includes("/")&&(L=O(r)),(L!==W||te()||/^\)+$/.test(he()))&&(j=S.close=`)$))${L}`),S.inner.includes("*")&&(R=he())&&/^\.[^\\/.]+$/.test(R)){let G=cn(R,{...t,fastpaths:!1}).output;j=S.close=`)${G})${L})`}S.prev.type==="bos"&&(b.negatedExtglob=!0)}I({type:"paren",extglob:!0,value:v,output:j}),We("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let S=!1,j=e.replace(np,(R,L,G,re,X,Ur)=>re==="\\"?(S=!0,R):re==="?"?L?L+re+(X?E.repeat(X.length):""):Ur===0?F+(X?E.repeat(X.length):""):E.repeat(G.length):re==="."?m.repeat(G.length):re==="*"?L?L+re+(X?W:""):W:L?R:`\\${R}`);return S===!0&&(r.unescape===!0?j=j.replace(/\\/g,""):j=j.replace(/\\+/g,R=>R.length%2===0?"\\\\":R?"\\":"")),j===e&&r.contains===!0?(b.output=e,b):(b.output=se.wrapOutput(j,b,t),b)}for(;!te();){if(v=ge(),v==="\0")continue;if(v==="\\"){let R=D();if(R==="/"&&r.bash!==!0||R==="."||R===";")continue;if(!R){v+="\\",I({type:"text",value:v});continue}let L=/^\\+/.exec(he()),G=0;if(L&&L[0].length>2&&(G=L[0].length,b.index+=G,G%2!==0&&(v+="\\")),r.unescape===!0?v=ge():v+=ge(),b.brackets===0){I({type:"text",value:v});continue}}if(b.brackets>0&&(v!=="]"||x.value==="["||x.value==="[^")){if(r.posix!==!1&&v===":"){let R=x.value.slice(1);if(R.includes("[")&&(x.posix=!0,R.includes(":"))){let L=x.value.lastIndexOf("["),G=x.value.slice(0,L),re=x.value.slice(L+2),X=tp[re];if(X){x.value=G+X,b.backtrack=!0,ge(),!i.output&&s.indexOf(x)===1&&(i.output=h);continue}}}(v==="["&&D()!==":"||v==="-"&&D()==="]")&&(v=`\\${v}`),v==="]"&&(x.value==="["||x.value==="[^")&&(v=`\\${v}`),r.posix===!0&&v==="!"&&x.value==="["&&(v="^"),x.value+=v,Dt({value:v});continue}if(b.quotes===1&&v!=='"'){v=se.escapeRegex(v),x.value+=v,Dt({value:v});continue}if(v==='"'){b.quotes=b.quotes===1?0:1,r.keepQuotes===!0&&I({type:"text",value:v});continue}if(v==="("){Ht("parens"),I({type:"paren",value:v});continue}if(v===")"){if(b.parens===0&&r.strictBrackets===!0)throw new SyntaxError(ot("opening","("));let R=q[q.length-1];if(R&&b.parens===R.parens+1){vu(q.pop());continue}I({type:"paren",value:v,output:b.parens?")":"\\)"}),We("parens");continue}if(v==="["){if(r.nobracket===!0||!he().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(ot("closing","]"));v=`\\${v}`}else Ht("brackets");I({type:"bracket",value:v});continue}if(v==="]"){if(r.nobracket===!0||x&&x.type==="bracket"&&x.value.length===1){I({type:"text",value:v,output:`\\${v}`});continue}if(b.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(ot("opening","["));I({type:"text",value:v,output:`\\${v}`});continue}We("brackets");let R=x.value.slice(1);if(x.posix!==!0&&R[0]==="^"&&!R.includes("/")&&(v=`/${v}`),x.value+=v,Dt({value:v}),r.literalBrackets===!1||se.hasRegexChars(R))continue;let L=se.escapeRegex(x.value);if(b.output=b.output.slice(0,-x.value.length),r.literalBrackets===!0){b.output+=L,x.value=L;continue}x.value=`(${a}${L}|${x.value})`,b.output+=x.value;continue}if(v==="{"&&r.nobrace!==!0){Ht("braces");let R={type:"brace",value:v,output:"(",outputIndex:b.output.length,tokensIndex:b.tokens.length};H.push(R),I(R);continue}if(v==="}"){let R=H[H.length-1];if(r.nobrace===!0||!R){I({type:"text",value:v,output:v});continue}let L=")";if(R.dots===!0){let G=s.slice(),re=[];for(let X=G.length-1;X>=0&&(s.pop(),G[X].type!=="brace");X--)G[X].type!=="dots"&&re.unshift(G[X].value);L=op(re,r),b.backtrack=!0}if(R.comma!==!0&&R.dots!==!0){let G=b.output.slice(0,R.outputIndex),re=b.tokens.slice(R.tokensIndex);R.value=R.output="\\{",v=L="\\}",b.output=G;for(let X of re)b.output+=X.output||X.value}I({type:"brace",value:v,output:L}),We("braces"),H.pop();continue}if(v==="|"){q.length>0&&q[q.length-1].conditions++,I({type:"text",value:v});continue}if(v===","){let R=v,L=H[H.length-1];L&&ke[ke.length-1]==="braces"&&(L.comma=!0,R="|"),I({type:"comma",value:v,output:R});continue}if(v==="/"){if(x.type==="dot"&&b.index===b.start+1){b.start=b.index+1,b.consumed="",b.output="",s.pop(),x=i;continue}I({type:"slash",value:v,output:y});continue}if(v==="."){if(b.braces>0&&x.type==="dot"){x.value==="."&&(x.output=m);let R=H[H.length-1];x.type="dots",x.output+=v,x.value+=v,R.dots=!0;continue}if(b.braces+b.parens===0&&x.type!=="bos"&&x.type!=="slash"){I({type:"text",value:v,output:m});continue}I({type:"dot",value:v,output:m});continue}if(v==="?"){if(!(x&&x.value==="(")&&r.noextglob!==!0&&D()==="("&&D(2)!=="?"){jt("qmark",v);continue}if(x&&x.type==="paren"){let L=D(),G=v;if(L==="<"&&!se.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(x.value==="("&&!/[!=<:]/.test(L)||L==="<"&&!/<([!=]|\w+>)/.test(he()))&&(G=`\\${v}`),I({type:"text",value:v,output:G});continue}if(r.dot!==!0&&(x.type==="slash"||x.type==="bos")){I({type:"qmark",value:v,output:V});continue}I({type:"qmark",value:v,output:E});continue}if(v==="!"){if(r.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){jt("negate",v);continue}if(r.nonegate!==!0&&b.index===0){xu();continue}}if(v==="+"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){jt("plus",v);continue}if(x&&x.value==="("||r.regex===!1){I({type:"plus",value:v,output:p});continue}if(x&&(x.type==="bracket"||x.type==="paren"||x.type==="brace")||b.parens>0){I({type:"plus",value:v});continue}I({type:"plus",value:p});continue}if(v==="@"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){I({type:"at",extglob:!0,value:v,output:""});continue}I({type:"text",value:v});continue}if(v!=="*"){(v==="$"||v==="^")&&(v=`\\${v}`);let R=rp.exec(he());R&&(v+=R[0],b.index+=R[0].length),I({type:"text",value:v});continue}if(x&&(x.type==="globstar"||x.star===!0)){x.type="star",x.star=!0,x.value+=v,x.output=W,b.backtrack=!0,b.globstar=!0,oe(v);continue}let S=he();if(r.noextglob!==!0&&/^\([^?]/.test(S)){jt("star",v);continue}if(x.type==="star"){if(r.noglobstar===!0){oe(v);continue}let R=x.prev,L=R.prev,G=R.type==="slash"||R.type==="bos",re=L&&(L.type==="star"||L.type==="globstar");if(r.bash===!0&&(!G||S[0]&&S[0]!=="/")){I({type:"star",value:v,output:""});continue}let X=b.braces>0&&(R.type==="comma"||R.type==="brace"),Ur=q.length&&(R.type==="pipe"||R.type==="paren");if(!G&&R.type!=="paren"&&!X&&!Ur){I({type:"star",value:v,output:""});continue}for(;S.slice(0,3)==="/**";){let Bt=e[b.index+4];if(Bt&&Bt!=="/")break;S=S.slice(3),oe("/**",3)}if(R.type==="bos"&&te()){x.type="globstar",x.value+=v,x.output=O(r),b.output=x.output,b.globstar=!0,oe(v);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&!re&&te()){b.output=b.output.slice(0,-(R.output+x.output).length),R.output=`(?:${R.output}`,x.type="globstar",x.output=O(r)+(r.strictSlashes?")":"|$)"),x.value+=v,b.globstar=!0,b.output+=R.output+x.output,oe(v);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&S[0]==="/"){let Bt=S[1]!==void 0?"|$":"";b.output=b.output.slice(0,-(R.output+x.output).length),R.output=`(?:${R.output}`,x.type="globstar",x.output=`${O(r)}${y}|${y}${Bt})`,x.value+=v,b.output+=R.output+x.output,b.globstar=!0,oe(v+ge()),I({type:"slash",value:"/",output:""});continue}if(R.type==="bos"&&S[0]==="/"){x.type="globstar",x.value+=v,x.output=`(?:^|${y}|${O(r)}${y})`,b.output=x.output,b.globstar=!0,oe(v+ge()),I({type:"slash",value:"/",output:""});continue}b.output=b.output.slice(0,-x.output.length),x.type="globstar",x.output=O(r),x.value+=v,b.output+=x.output,b.globstar=!0,oe(v);continue}let j={type:"star",value:v,output:W};if(r.bash===!0){j.output=".*?",(x.type==="bos"||x.type==="slash")&&(j.output=k+j.output),I(j);continue}if(x&&(x.type==="bracket"||x.type==="paren")&&r.regex===!0){j.output=v,I(j);continue}(b.index===b.start||x.type==="slash"||x.type==="dot")&&(x.type==="dot"?(b.output+=w,x.output+=w):r.dot===!0?(b.output+=$,x.output+=$):(b.output+=k,x.output+=k),D()!=="*"&&(b.output+=h,x.output+=h)),I(j)}for(;b.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(ot("closing","]"));b.output=se.escapeLast(b.output,"["),We("brackets")}for(;b.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(ot("closing",")"));b.output=se.escapeLast(b.output,"("),We("parens")}for(;b.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(ot("closing","}"));b.output=se.escapeLast(b.output,"{"),We("braces")}if(r.strictSlashes!==!0&&(x.type==="star"||x.type==="bracket")&&I({type:"maybe_slash",value:"",output:`${y}?`}),b.backtrack===!0){b.output="";for(let S of b.tokens)b.output+=S.output!=null?S.output:S.value,S.suffix&&(b.output+=S.suffix)}return b};cn.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(Zt,r.maxLength):Zt,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=vs[e]||e;let i=se.isWindows(t),{DOT_LITERAL:s,SLASH_LITERAL:a,ONE_CHAR:c,DOTS_SLASH:f,NO_DOT:u,NO_DOTS:m,NO_DOTS_SLASH:p,STAR:y,START_ANCHOR:h}=Jt.globChars(i),_=r.dot?m:u,P=r.dot?p:u,w=r.capture?"":"?:",$={negated:!1,prefix:""},E=r.bash===!0?".*?":y;r.capture&&(E=`(${E})`);let V=k=>k.noglobstar===!0?E:`(${w}(?:(?!${h}${k.dot?f:s}).)*?)`,A=k=>{switch(k){case"*":return`${_}${c}${E}`;case".*":return`${s}${c}${E}`;case"*.*":return`${_}${E}${s}${c}${E}`;case"*/*":return`${_}${E}${a}${c}${P}${E}`;case"**":return _+V(r);case"**/*":return`(?:${_}${V(r)}${a})?${P}${c}${E}`;case"**/*.*":return`(?:${_}${V(r)}${a})?${P}${E}${s}${c}${E}`;case"**/.*":return`(?:${_}${V(r)}${a})?${s}${c}${E}`;default:{let F=/^(.*?)\.(\w+)$/.exec(k);if(!F)return;let W=A(F[1]);return W?W+s+F[2]:void 0}}},M=se.removePrefix(e,$),O=A(M);return O&&r.strictSlashes!==!0&&(O+=`${a}?`),O};_s.exports=cn});var Cs=C((sv,Rs)=>{"use strict";l();var ip=K("path"),sp=xs(),un=bs(),fn=Ct(),ap=Rt(),lp=e=>e&&typeof e=="object"&&!Array.isArray(e),z=(e,t,r=!1)=>{if(Array.isArray(e)){let u=e.map(p=>z(p,t,r));return p=>{for(let y of u){let h=y(p);if(h)return h}return!1}}let n=lp(e)&&e.tokens&&e.input;if(e===""||typeof e!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");let o=t||{},i=fn.isWindows(t),s=n?z.compileRe(e,t):z.makeRe(e,t,!1,!0),a=s.state;delete s.state;let c=()=>!1;if(o.ignore){let u={...t,ignore:null,onMatch:null,onResult:null};c=z(o.ignore,u,r)}let f=(u,m=!1)=>{let{isMatch:p,match:y,output:h}=z.test(u,s,t,{glob:e,posix:i}),_={glob:e,state:a,regex:s,posix:i,input:u,output:h,match:y,isMatch:p};return typeof o.onResult=="function"&&o.onResult(_),p===!1?(_.isMatch=!1,m?_:!1):c(u)?(typeof o.onIgnore=="function"&&o.onIgnore(_),_.isMatch=!1,m?_:!1):(typeof o.onMatch=="function"&&o.onMatch(_),m?_:!0)};return r&&(f.state=a),f};z.test=(e,t,r,{glob:n,posix:o}={})=>{if(typeof e!="string")throw new TypeError("Expected input to be a string");if(e==="")return{isMatch:!1,output:""};let i=r||{},s=i.format||(o?fn.toPosixSlashes:null),a=e===n,c=a&&s?s(e):e;return a===!1&&(c=s?s(e):e,a=c===n),(a===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?a=z.matchBase(e,t,r,o):a=t.exec(c)),{isMatch:!!a,match:a,output:c}};z.matchBase=(e,t,r,n=fn.isWindows(r))=>(t instanceof RegExp?t:z.makeRe(t,r)).test(ip.basename(e));z.isMatch=(e,t,r)=>z(t,r)(e);z.parse=(e,t)=>Array.isArray(e)?e.map(r=>z.parse(r,t)):un(e,{...t,fastpaths:!1});z.scan=(e,t)=>sp(e,t);z.compileRe=(e,t,r=!1,n=!1)=>{if(r===!0)return e.output;let o=t||{},i=o.contains?"":"^",s=o.contains?"":"$",a=`${i}(?:${e.output})${s}`;e&&e.negated===!0&&(a=`^(?!${a}).*$`);let c=z.toRegex(a,t);return n===!0&&(c.state=e),c};z.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||typeof e!="string")throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]==="."||e[0]==="*")&&(o.output=un.fastpaths(e,t)),o.output||(o=un(e,t)),z.compileRe(o,t,r,n)};z.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(r){if(t&&t.debug===!0)throw r;return/$^/}};z.constants=ap;Rs.exports=z});var ws=C((lv,Ss)=>{"use strict";l();Ss.exports=Cs()});var Ts=C((uv,Os)=>{"use strict";l();var As=K("util"),ks=is(),xe=ws(),pn=Ct(),Es=e=>e===""||e==="./",Ps=e=>{let t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},B=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,i=new Set,s=0,a=u=>{i.add(u.output),r&&r.onResult&&r.onResult(u)};for(let u=0;u<t.length;u++){let m=xe(String(t[u]),{...r,onResult:a},!0),p=m.state.negated||m.state.negatedExtglob;p&&s++;for(let y of e){let h=m(y,!0);(p?!h.isMatch:h.isMatch)&&(p?n.add(h.output):(n.delete(h.output),o.add(h.output)))}}let f=(s===t.length?[...i]:[...o]).filter(u=>!n.has(u));if(r&&f.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${t.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?t.map(u=>u.replace(/\\/g,"")):t}return f};B.match=B;B.matcher=(e,t)=>xe(e,t);B.isMatch=(e,t,r)=>xe(t,r)(e);B.any=B.isMatch;B.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],i=a=>{r.onResult&&r.onResult(a),o.push(a.output)},s=new Set(B(e,t,{...r,onResult:i}));for(let a of o)s.has(a)||n.add(a);return[...n]};B.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${As.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>B.contains(e,n,r));if(typeof t=="string"){if(Es(e)||Es(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return B.isMatch(e,t,{...r,contains:!0})};B.matchKeys=(e,t,r)=>{if(!pn.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=B(Object.keys(e),t,r),o={};for(let i of n)o[i]=e[i];return o};B.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let i=xe(String(o),r);if(n.some(s=>i(s)))return!0}return!1};B.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let i=xe(String(o),r);if(!n.every(s=>i(s)))return!1}return!0};B.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${As.inspect(e)}"`);return[].concat(t).every(n=>xe(n,r)(e))};B.capture=(e,t,r)=>{let n=pn.isWindows(r),i=xe.makeRe(String(e),{...r,capture:!0}).exec(n?pn.toPosixSlashes(t):t);if(i)return i.slice(1).map(s=>s===void 0?"":s)};B.makeRe=(...e)=>xe.makeRe(...e);B.scan=(...e)=>xe.scan(...e);B.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of ks(String(n),t))r.push(xe.parse(o,t));return r};B.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!Ps(e)?[e]:ks(e,t)};B.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return B.braces(e,{...t,expand:!0})};B.hasBraces=Ps;Os.exports=B});var Ds=C(T=>{"use strict";l();Object.defineProperty(T,"__esModule",{value:!0});T.removeDuplicateSlashes=T.matchAny=T.convertPatternsToRe=T.makeRe=T.getPatternParts=T.expandBraceExpansion=T.expandPatternsWithBraceExpansion=T.isAffectDepthOfReadingPattern=T.endsWithSlashGlobStar=T.hasGlobStar=T.getBaseDirectory=T.isPatternRelatedToParentDirectory=T.getPatternsOutsideCurrentDirectory=T.getPatternsInsideCurrentDirectory=T.getPositivePatterns=T.getNegativePatterns=T.isPositivePattern=T.isNegativePattern=T.convertToNegativePattern=T.convertToPositivePattern=T.isDynamicPattern=T.isStaticPattern=void 0;var cp=K("path"),up=Ci(),mn=Ts(),$s="**",fp="\\",pp=/[*?]|^!/,mp=/\[[^[]*]/,dp=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,gp=/[!*+?@]\([^(]*\)/,hp=/,|\.\./,yp=/(?!^)\/{2,}/g;function Vs(e,t={}){return!Ms(e,t)}T.isStaticPattern=Vs;function Ms(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(fp)||pp.test(e)||mp.test(e)||dp.test(e)||t.extglob!==!1&&gp.test(e)||t.braceExpansion!==!1&&xp(e))}T.isDynamicPattern=Ms;function xp(e){let t=e.indexOf("{");if(t===-1)return!1;let r=e.indexOf("}",t+1);if(r===-1)return!1;let n=e.slice(t,r);return hp.test(n)}function vp(e){return er(e)?e.slice(1):e}T.convertToPositivePattern=vp;function _p(e){return"!"+e}T.convertToNegativePattern=_p;function er(e){return e.startsWith("!")&&e[1]!=="("}T.isNegativePattern=er;function Ls(e){return!er(e)}T.isPositivePattern=Ls;function bp(e){return e.filter(er)}T.getNegativePatterns=bp;function Rp(e){return e.filter(Ls)}T.getPositivePatterns=Rp;function Cp(e){return e.filter(t=>!dn(t))}T.getPatternsInsideCurrentDirectory=Cp;function Sp(e){return e.filter(dn)}T.getPatternsOutsideCurrentDirectory=Sp;function dn(e){return e.startsWith("..")||e.startsWith("./..")}T.isPatternRelatedToParentDirectory=dn;function wp(e){return up(e,{flipBackslashes:!1})}T.getBaseDirectory=wp;function Ep(e){return e.includes($s)}T.hasGlobStar=Ep;function Is(e){return e.endsWith("/"+$s)}T.endsWithSlashGlobStar=Is;function Ap(e){let t=cp.basename(e);return Is(e)||Vs(t)}T.isAffectDepthOfReadingPattern=Ap;function kp(e){return e.reduce((t,r)=>t.concat(Ns(r)),[])}T.expandPatternsWithBraceExpansion=kp;function Ns(e){let t=mn.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((r,n)=>r.length-n.length),t.filter(r=>r!=="")}T.expandBraceExpansion=Ns;function Pp(e,t){let{parts:r}=mn.scan(e,Object.assign(Object.assign({},t),{parts:!0}));return r.length===0&&(r=[e]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}T.getPatternParts=Pp;function Fs(e,t){return mn.makeRe(e,t)}T.makeRe=Fs;function Op(e,t){return e.map(r=>Fs(r,t))}T.convertPatternsToRe=Op;function Tp(e,t){return t.some(r=>r.test(e))}T.matchAny=Tp;function $p(e){return e.replace(yp,"/")}T.removeDuplicateSlashes=$p});var qs=C((dv,Bs)=>{"use strict";l();var Vp=K("stream"),Hs=Vp.PassThrough,Mp=Array.prototype.slice;Bs.exports=Lp;function Lp(){let e=[],t=Mp.call(arguments),r=!1,n=t[t.length-1];n&&!Array.isArray(n)&&n.pipe==null?t.pop():n={};let o=n.end!==!1,i=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);let s=Hs(n);function a(){for(let u=0,m=arguments.length;u<m;u++)e.push(js(arguments[u],n));return c(),this}function c(){if(r)return;r=!0;let u=e.shift();if(!u){process.nextTick(f);return}Array.isArray(u)||(u=[u]);let m=u.length+1;function p(){--m>0||(r=!1,c())}function y(h){function _(){h.removeListener("merge2UnpipeEnd",_),h.removeListener("end",_),i&&h.removeListener("error",P),p()}function P(w){s.emit("error",w)}if(h._readableState.endEmitted)return p();h.on("merge2UnpipeEnd",_),h.on("end",_),i&&h.on("error",P),h.pipe(s,{end:!1}),h.resume()}for(let h=0;h<u.length;h++)y(u[h]);p()}function f(){r=!1,s.emit("queueDrain"),o&&s.end()}return s.setMaxListeners(0),s.add=a,s.on("unpipe",function(u){u.emit("merge2UnpipeEnd")}),t.length&&a.apply(null,t),s}function js(e,t){if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)e[r]=js(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(Hs(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var Ws=C(tr=>{"use strict";l();Object.defineProperty(tr,"__esModule",{value:!0});tr.merge=void 0;var Ip=qs();function Np(e){let t=Ip(e);return e.forEach(r=>{r.once("error",n=>t.emit("error",n))}),t.once("close",()=>Us(e)),t.once("end",()=>Us(e)),t}tr.merge=Np;function Us(e){e.forEach(t=>t.emit("close"))}});var Gs=C(it=>{"use strict";l();Object.defineProperty(it,"__esModule",{value:!0});it.isEmpty=it.isString=void 0;function Fp(e){return typeof e=="string"}it.isString=Fp;function Dp(e){return e===""}it.isEmpty=Dp});var Ee=C(Z=>{"use strict";l();Object.defineProperty(Z,"__esModule",{value:!0});Z.string=Z.stream=Z.pattern=Z.path=Z.fs=Z.errno=Z.array=void 0;var Hp=ui();Z.array=Hp;var jp=fi();Z.errno=jp;var Bp=pi();Z.fs=Bp;var qp=hi();Z.path=qp;var Up=Ds();Z.pattern=Up;var Wp=Ws();Z.stream=Wp;var Gp=Gs();Z.string=Gp});var Xs=C(ee=>{"use strict";l();Object.defineProperty(ee,"__esModule",{value:!0});ee.convertPatternGroupToTask=ee.convertPatternGroupsToTasks=ee.groupPatternsByBaseDirectory=ee.getNegativePatternsAsPositive=ee.getPositivePatterns=ee.convertPatternsToTasks=ee.generate=void 0;var pe=Ee();function Kp(e,t){let r=Ks(e,t),n=Ks(t.ignore,t),o=zs(r),i=Ys(r,n),s=o.filter(u=>pe.pattern.isStaticPattern(u,t)),a=o.filter(u=>pe.pattern.isDynamicPattern(u,t)),c=gn(s,i,!1),f=gn(a,i,!0);return c.concat(f)}ee.generate=Kp;function Ks(e,t){let r=e;return t.braceExpansion&&(r=pe.pattern.expandPatternsWithBraceExpansion(r)),t.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>pe.pattern.removeDuplicateSlashes(n))}function gn(e,t,r){let n=[],o=pe.pattern.getPatternsOutsideCurrentDirectory(e),i=pe.pattern.getPatternsInsideCurrentDirectory(e),s=hn(o),a=hn(i);return n.push(...yn(s,t,r)),"."in a?n.push(xn(".",i,t,r)):n.push(...yn(a,t,r)),n}ee.convertPatternsToTasks=gn;function zs(e){return pe.pattern.getPositivePatterns(e)}ee.getPositivePatterns=zs;function Ys(e,t){return pe.pattern.getNegativePatterns(e).concat(t).map(pe.pattern.convertToPositivePattern)}ee.getNegativePatternsAsPositive=Ys;function hn(e){let t={};return e.reduce((r,n)=>{let o=pe.pattern.getBaseDirectory(n);return o in r?r[o].push(n):r[o]=[n],r},t)}ee.groupPatternsByBaseDirectory=hn;function yn(e,t,r){return Object.keys(e).map(n=>xn(n,e[n],t,r))}ee.convertPatternGroupsToTasks=yn;function xn(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(pe.pattern.convertToNegativePattern))}}ee.convertPatternGroupToTask=xn});var Js=C(rr=>{"use strict";l();Object.defineProperty(rr,"__esModule",{value:!0});rr.read=void 0;function zp(e,t,r){t.fs.lstat(e,(n,o)=>{if(n!==null){Qs(r,n);return}if(!o.isSymbolicLink()||!t.followSymbolicLink){vn(r,o);return}t.fs.stat(e,(i,s)=>{if(i!==null){if(t.throwErrorOnBrokenSymbolicLink){Qs(r,i);return}vn(r,o);return}t.markSymbolicLink&&(s.isSymbolicLink=()=>!0),vn(r,s)})})}rr.read=zp;function Qs(e,t){e(t)}function vn(e,t){e(null,t)}});var Zs=C(nr=>{"use strict";l();Object.defineProperty(nr,"__esModule",{value:!0});nr.read=void 0;function Yp(e,t){let r=t.fs.lstatSync(e);if(!r.isSymbolicLink()||!t.followSymbolicLink)return r;try{let n=t.fs.statSync(e);return t.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!t.throwErrorOnBrokenSymbolicLink)return r;throw n}}nr.read=Yp});var ea=C(Pe=>{"use strict";l();Object.defineProperty(Pe,"__esModule",{value:!0});Pe.createFileSystemAdapter=Pe.FILE_SYSTEM_ADAPTER=void 0;var or=K("fs");Pe.FILE_SYSTEM_ADAPTER={lstat:or.lstat,stat:or.stat,lstatSync:or.lstatSync,statSync:or.statSync};function Xp(e){return e===void 0?Pe.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Pe.FILE_SYSTEM_ADAPTER),e)}Pe.createFileSystemAdapter=Xp});var ta=C(bn=>{"use strict";l();Object.defineProperty(bn,"__esModule",{value:!0});var Qp=ea(),_n=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Qp.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(t,r){return t??r}};bn.default=_n});var ze=C(Oe=>{"use strict";l();Object.defineProperty(Oe,"__esModule",{value:!0});Oe.statSync=Oe.stat=Oe.Settings=void 0;var ra=Js(),Jp=Zs(),Rn=ta();Oe.Settings=Rn.default;function Zp(e,t,r){if(typeof t=="function"){ra.read(e,Cn(),t);return}ra.read(e,Cn(t),r)}Oe.stat=Zp;function em(e,t){let r=Cn(t);return Jp.read(e,r)}Oe.statSync=em;function Cn(e={}){return e instanceof Rn.default?e:new Rn.default(e)}});var ia=C((Mv,oa)=>{"use strict";l();var na;oa.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):e=>(na||(na=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))});var aa=C((Iv,sa)=>{"use strict";l();sa.exports=rm;var tm=ia();function rm(e,t){let r,n,o,i=!0;Array.isArray(e)?(r=[],n=e.length):(o=Object.keys(e),r={},n=o.length);function s(c){function f(){t&&t(c,r),t=null}i?tm(f):f()}function a(c,f,u){r[c]=u,(--n===0||f)&&s(f)}n?o?o.forEach(function(c){e[c](function(f,u){a(c,f,u)})}):e.forEach(function(c,f){c(function(u,m){a(f,u,m)})}):s(null),i=!1}});var Sn=C(sr=>{"use strict";l();Object.defineProperty(sr,"__esModule",{value:!0});sr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var ir=process.versions.node.split(".");if(ir[0]===void 0||ir[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var la=Number.parseInt(ir[0],10),nm=Number.parseInt(ir[1],10),ca=10,om=10,im=la>ca,sm=la===ca&&nm>=om;sr.IS_SUPPORT_READDIR_WITH_FILE_TYPES=im||sm});var ua=C(ar=>{"use strict";l();Object.defineProperty(ar,"__esModule",{value:!0});ar.createDirentFromStats=void 0;var wn=class{constructor(t,r){this.name=t,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function am(e,t){return new wn(e,t)}ar.createDirentFromStats=am});var En=C(lr=>{"use strict";l();Object.defineProperty(lr,"__esModule",{value:!0});lr.fs=void 0;var lm=ua();lr.fs=lm});var An=C(cr=>{"use strict";l();Object.defineProperty(cr,"__esModule",{value:!0});cr.joinPathSegments=void 0;function cm(e,t,r){return e.endsWith(r)?e+t:e+r+t}cr.joinPathSegments=cm});var ha=C(Te=>{"use strict";l();Object.defineProperty(Te,"__esModule",{value:!0});Te.readdir=Te.readdirWithFileTypes=Te.read=void 0;var um=ze(),fa=aa(),fm=Sn(),pa=En(),ma=An();function pm(e,t,r){if(!t.stats&&fm.IS_SUPPORT_READDIR_WITH_FILE_TYPES){da(e,t,r);return}ga(e,t,r)}Te.read=pm;function da(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,o)=>{if(n!==null){ur(r,n);return}let i=o.map(a=>({dirent:a,name:a.name,path:ma.joinPathSegments(e,a.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){kn(r,i);return}let s=i.map(a=>mm(a,t));fa(s,(a,c)=>{if(a!==null){ur(r,a);return}kn(r,c)})})}Te.readdirWithFileTypes=da;function mm(e,t){return r=>{if(!e.dirent.isSymbolicLink()){r(null,e);return}t.fs.stat(e.path,(n,o)=>{if(n!==null){if(t.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,e);return}e.dirent=pa.fs.createDirentFromStats(e.name,o),r(null,e)})}}function ga(e,t,r){t.fs.readdir(e,(n,o)=>{if(n!==null){ur(r,n);return}let i=o.map(s=>{let a=ma.joinPathSegments(e,s,t.pathSegmentSeparator);return c=>{um.stat(a,t.fsStatSettings,(f,u)=>{if(f!==null){c(f);return}let m={name:s,path:a,dirent:pa.fs.createDirentFromStats(s,u)};t.stats&&(m.stats=u),c(null,m)})}});fa(i,(s,a)=>{if(s!==null){ur(r,s);return}kn(r,a)})})}Te.readdir=ga;function ur(e,t){e(t)}function kn(e,t){e(null,t)}});var ba=C($e=>{"use strict";l();Object.defineProperty($e,"__esModule",{value:!0});$e.readdir=$e.readdirWithFileTypes=$e.read=void 0;var dm=ze(),gm=Sn(),ya=En(),xa=An();function hm(e,t){return!t.stats&&gm.IS_SUPPORT_READDIR_WITH_FILE_TYPES?va(e,t):_a(e,t)}$e.read=hm;function va(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let o={dirent:n,name:n.name,path:xa.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(o.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let i=t.fs.statSync(o.path);o.dirent=ya.fs.createDirentFromStats(o.name,i)}catch(i){if(t.throwErrorOnBrokenSymbolicLink)throw i}return o})}$e.readdirWithFileTypes=va;function _a(e,t){return t.fs.readdirSync(e).map(n=>{let o=xa.joinPathSegments(e,n,t.pathSegmentSeparator),i=dm.statSync(o,t.fsStatSettings),s={name:n,path:o,dirent:ya.fs.createDirentFromStats(n,i)};return t.stats&&(s.stats=i),s})}$e.readdir=_a});var Ra=C(Ve=>{"use strict";l();Object.defineProperty(Ve,"__esModule",{value:!0});Ve.createFileSystemAdapter=Ve.FILE_SYSTEM_ADAPTER=void 0;var st=K("fs");Ve.FILE_SYSTEM_ADAPTER={lstat:st.lstat,stat:st.stat,lstatSync:st.lstatSync,statSync:st.statSync,readdir:st.readdir,readdirSync:st.readdirSync};function ym(e){return e===void 0?Ve.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Ve.FILE_SYSTEM_ADAPTER),e)}Ve.createFileSystemAdapter=ym});var Ca=C(On=>{"use strict";l();Object.defineProperty(On,"__esModule",{value:!0});var xm=K("path"),vm=ze(),_m=Ra(),Pn=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=_m.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,xm.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new vm.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};On.default=Pn});var fr=C(Me=>{"use strict";l();Object.defineProperty(Me,"__esModule",{value:!0});Me.Settings=Me.scandirSync=Me.scandir=void 0;var Sa=ha(),bm=ba(),Tn=Ca();Me.Settings=Tn.default;function Rm(e,t,r){if(typeof t=="function"){Sa.read(e,$n(),t);return}Sa.read(e,$n(t),r)}Me.scandir=Rm;function Cm(e,t){let r=$n(t);return bm.read(e,r)}Me.scandirSync=Cm;function $n(e={}){return e instanceof Tn.default?e:new Tn.default(e)}});var Ea=C((r_,wa)=>{"use strict";l();function Sm(e){var t=new e,r=t;function n(){var i=t;return i.next?t=i.next:(t=new e,r=t),i.next=null,i}function o(i){r.next=i,r=i}return{get:n,release:o}}wa.exports=Sm});var ka=C((o_,Vn)=>{"use strict";l();var wm=Ea();function Aa(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=wm(Em),o=null,i=null,s=0,a=null,c={push:_,drain:le,saturated:le,pause:u,paused:!1,get concurrency(){return r},set concurrency(A){if(!(A>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=A,!c.paused)for(;o&&s<r;)s++,w()},running:f,resume:y,idle:h,length:m,getQueue:p,unshift:P,empty:le,kill:$,killAndDrain:E,error:V};return c;function f(){return s}function u(){c.paused=!0}function m(){for(var A=o,M=0;A;)A=A.next,M++;return M}function p(){for(var A=o,M=[];A;)M.push(A.value),A=A.next;return M}function y(){if(c.paused){if(c.paused=!1,o===null){s++,w();return}for(;o&&s<r;)s++,w()}}function h(){return s===0&&c.length()===0}function _(A,M){var O=n.get();O.context=e,O.release=w,O.value=A,O.callback=M||le,O.errorHandler=a,s>=r||c.paused?i?(i.next=O,i=O):(o=O,i=O,c.saturated()):(s++,t.call(e,O.value,O.worked))}function P(A,M){var O=n.get();O.context=e,O.release=w,O.value=A,O.callback=M||le,O.errorHandler=a,s>=r||c.paused?o?(O.next=o,o=O):(o=O,i=O,c.saturated()):(s++,t.call(e,O.value,O.worked))}function w(A){A&&n.release(A);var M=o;M&&s<=r?c.paused?s--:(i===o&&(i=null),o=M.next,M.next=null,t.call(e,M.value,M.worked),i===null&&c.empty()):--s===0&&c.drain()}function $(){o=null,i=null,c.drain=le}function E(){o=null,i=null,c.drain(),c.drain=le}function V(A){a=A}}function le(){}function Em(){this.value=null,this.callback=le,this.next=null,this.release=le,this.context=null,this.errorHandler=null;var e=this;this.worked=function(r,n){var o=e.callback,i=e.errorHandler,s=e.value;e.value=null,e.callback=le,e.errorHandler&&i(r,s),o.call(e.context,r,n),e.release(e)}}function Am(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(u,m){t.call(this,u).then(function(p){m(null,p)},m)}var o=Aa(e,n,r),i=o.push,s=o.unshift;return o.push=a,o.unshift=c,o.drained=f,o;function a(u){var m=new Promise(function(p,y){i(u,function(h,_){if(h){y(h);return}p(_)})});return m.catch(le),m}function c(u){var m=new Promise(function(p,y){s(u,function(h,_){if(h){y(h);return}p(_)})});return m.catch(le),m}function f(){if(o.idle())return new Promise(function(p){p()});var u=o.drain,m=new Promise(function(p){o.drain=function(){u(),p()}});return m}}Vn.exports=Aa;Vn.exports.promise=Am});var pr=C(ve=>{"use strict";l();Object.defineProperty(ve,"__esModule",{value:!0});ve.joinPathSegments=ve.replacePathSegmentSeparator=ve.isAppliedFilter=ve.isFatalError=void 0;function km(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}ve.isFatalError=km;function Pm(e,t){return e===null||e(t)}ve.isAppliedFilter=Pm;function Om(e,t){return e.split(/[/\\]/).join(t)}ve.replacePathSegmentSeparator=Om;function Tm(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}ve.joinPathSegments=Tm});var In=C(Ln=>{"use strict";l();Object.defineProperty(Ln,"__esModule",{value:!0});var $m=pr(),Mn=class{constructor(t,r){this._root=t,this._settings=r,this._root=$m.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};Ln.default=Mn});var Dn=C(Fn=>{"use strict";l();Object.defineProperty(Fn,"__esModule",{value:!0});var Vm=K("events"),Mm=fr(),Lm=ka(),mr=pr(),Im=In(),Nn=class extends Im.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=Mm.scandir,this._emitter=new Vm.EventEmitter,this._queue=Lm(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,r){let n={directory:t,base:r};this._queue.push(n,o=>{o!==null&&this._handleError(o)})}_worker(t,r){this._scandir(t.directory,this._settings.fsScandirSettings,(n,o)=>{if(n!==null){r(n,void 0);return}for(let i of o)this._handleEntry(i,t.base);r(null,void 0)})}_handleError(t){this._isDestroyed||!mr.isFatalError(this._settings,t)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",t))}_handleEntry(t,r){if(this._isDestroyed||this._isFatalError)return;let n=t.path;r!==void 0&&(t.path=mr.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),mr.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&mr.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};Fn.default=Nn});var Pa=C(jn=>{"use strict";l();Object.defineProperty(jn,"__esModule",{value:!0});var Nm=Dn(),Hn=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new Nm.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{Fm(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Dm(t,this._storage)}),this._reader.read()}};jn.default=Hn;function Fm(e,t){e(t)}function Dm(e,t){e(null,t)}});var Oa=C(qn=>{"use strict";l();Object.defineProperty(qn,"__esModule",{value:!0});var Hm=K("stream"),jm=Dn(),Bn=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new jm.default(this._root,this._settings),this._stream=new Hm.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(t=>{this._stream.emit("error",t)}),this._reader.onEntry(t=>{this._stream.push(t)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};qn.default=Bn});var Ta=C(Wn=>{"use strict";l();Object.defineProperty(Wn,"__esModule",{value:!0});var Bm=fr(),dr=pr(),qm=In(),Un=class extends qm.default{constructor(){super(...arguments),this._scandir=Bm.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(t,r){this._queue.add({directory:t,base:r})}_handleQueue(){for(let t of this._queue.values())this._handleDirectory(t.directory,t.base)}_handleDirectory(t,r){try{let n=this._scandir(t,this._settings.fsScandirSettings);for(let o of n)this._handleEntry(o,r)}catch(n){this._handleError(n)}}_handleError(t){if(dr.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let n=t.path;r!==void 0&&(t.path=dr.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),dr.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&dr.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};Wn.default=Un});var $a=C(Kn=>{"use strict";l();Object.defineProperty(Kn,"__esModule",{value:!0});var Um=Ta(),Gn=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new Um.default(this._root,this._settings)}read(){return this._reader.read()}};Kn.default=Gn});var Va=C(Yn=>{"use strict";l();Object.defineProperty(Yn,"__esModule",{value:!0});var Wm=K("path"),Gm=fr(),zn=class{constructor(t={}){this._options=t,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Wm.sep),this.fsScandirSettings=new Gm.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t??r}};Yn.default=zn});var hr=C(_e=>{"use strict";l();Object.defineProperty(_e,"__esModule",{value:!0});_e.Settings=_e.walkStream=_e.walkSync=_e.walk=void 0;var Ma=Pa(),Km=Oa(),zm=$a(),Xn=Va();_e.Settings=Xn.default;function Ym(e,t,r){if(typeof t=="function"){new Ma.default(e,gr()).read(t);return}new Ma.default(e,gr(t)).read(r)}_e.walk=Ym;function Xm(e,t){let r=gr(t);return new zm.default(e,r).read()}_e.walkSync=Xm;function Qm(e,t){let r=gr(t);return new Km.default(e,r).read()}_e.walkStream=Qm;function gr(e={}){return e instanceof Xn.default?e:new Xn.default(e)}});var yr=C(Jn=>{"use strict";l();Object.defineProperty(Jn,"__esModule",{value:!0});var Jm=K("path"),Zm=ze(),La=Ee(),Qn=class{constructor(t){this._settings=t,this._fsStatSettings=new Zm.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return Jm.resolve(this._settings.cwd,t)}_makeEntry(t,r){let n={name:r,path:r,dirent:La.fs.createDirentFromStats(r,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!La.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};Jn.default=Qn});var to=C(eo=>{"use strict";l();Object.defineProperty(eo,"__esModule",{value:!0});var ed=K("stream"),td=ze(),rd=hr(),nd=yr(),Zn=class extends nd.default{constructor(){super(...arguments),this._walkStream=rd.walkStream,this._stat=td.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let n=t.map(this._getFullEntryPath,this),o=new ed.PassThrough({objectMode:!0});o._write=(i,s,a)=>this._getEntry(n[i],t[i],r).then(c=>{c!==null&&r.entryFilter(c)&&o.push(c),i===n.length-1&&o.end(),a()}).catch(a);for(let i=0;i<n.length;i++)o.write(i);return o}_getEntry(t,r,n){return this._getStat(t).then(o=>this._makeEntry(o,r)).catch(o=>{if(n.errorFilter(o))return null;throw o})}_getStat(t){return new Promise((r,n)=>{this._stat(t,this._fsStatSettings,(o,i)=>o===null?r(i):n(o))})}};eo.default=Zn});var Ia=C(no=>{"use strict";l();Object.defineProperty(no,"__esModule",{value:!0});var od=hr(),id=yr(),sd=to(),ro=class extends id.default{constructor(){super(...arguments),this._walkAsync=od.walk,this._readerStream=new sd.default(this._settings)}dynamic(t,r){return new Promise((n,o)=>{this._walkAsync(t,r,(i,s)=>{i===null?n(s):o(i)})})}async static(t,r){let n=[],o=this._readerStream.static(t,r);return new Promise((i,s)=>{o.once("error",s),o.on("data",a=>n.push(a)),o.once("end",()=>i(n))})}};no.default=ro});var Na=C(io=>{"use strict";l();Object.defineProperty(io,"__esModule",{value:!0});var wt=Ee(),oo=class{constructor(t,r,n){this._patterns=t,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(let t of this._patterns){let r=this._getPatternSegments(t),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:t,segments:r,sections:n})}}_getPatternSegments(t){return wt.pattern.getPatternParts(t,this._micromatchOptions).map(n=>wt.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:wt.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(t){return wt.array.splitWhen(t,r=>r.dynamic&&wt.pattern.hasGlobStar(r.pattern))}};io.default=oo});var Fa=C(ao=>{"use strict";l();Object.defineProperty(ao,"__esModule",{value:!0});var ad=Na(),so=class extends ad.default{match(t){let r=t.split("/"),n=r.length,o=this._storage.filter(i=>!i.complete||i.segments.length>n);for(let i of o){let s=i.sections[0];if(!i.complete&&n>s.length||r.every((c,f)=>{let u=i.segments[f];return!!(u.dynamic&&u.patternRe.test(c)||!u.dynamic&&u.pattern===c)}))return!0}return!1}};ao.default=so});var Da=C(co=>{"use strict";l();Object.defineProperty(co,"__esModule",{value:!0});var xr=Ee(),ld=Fa(),lo=class{constructor(t,r){this._settings=t,this._micromatchOptions=r}getFilter(t,r,n){let o=this._getMatcher(r),i=this._getNegativePatternsRe(n);return s=>this._filter(t,s,o,i)}_getMatcher(t){return new ld.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(xr.pattern.isAffectDepthOfReadingPattern);return xr.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let i=xr.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(i,n)?!1:this._isSkippedByNegativePatterns(i,o)}_isSkippedByDeep(t,r){return this._settings.deep===1/0?!1:this._getEntryLevel(t,r)>=this._settings.deep}_getEntryLevel(t,r){let n=r.split("/").length;if(t==="")return n;let o=t.split("/").length;return n-o}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,r){return!this._settings.baseNameMatch&&!r.match(t)}_isSkippedByNegativePatterns(t,r){return!xr.pattern.matchAny(t,r)}};co.default=lo});var Ha=C(fo=>{"use strict";l();Object.defineProperty(fo,"__esModule",{value:!0});var Ye=Ee(),uo=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let n=Ye.pattern.convertPatternsToRe(t,this._micromatchOptions),o=Ye.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return i=>this._filter(i,n,o)}_filter(t,r,n){let o=Ye.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(o)||this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)||this._isSkippedByAbsoluteNegativePatterns(o,n))return!1;let i=t.dirent.isDirectory(),s=this._isMatchToPatterns(o,r,i)&&!this._isMatchToPatterns(o,n,i);return this._settings.unique&&s&&this._createIndexRecord(o),s}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,void 0)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(t,r){if(!this._settings.absolute)return!1;let n=Ye.path.makeAbsolute(this._settings.cwd,t);return Ye.pattern.matchAny(n,r)}_isMatchToPatterns(t,r,n){let o=Ye.pattern.matchAny(t,r);return!o&&n?Ye.pattern.matchAny(t+"/",r):o}};fo.default=uo});var ja=C(mo=>{"use strict";l();Object.defineProperty(mo,"__esModule",{value:!0});var cd=Ee(),po=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return cd.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};mo.default=po});var qa=C(ho=>{"use strict";l();Object.defineProperty(ho,"__esModule",{value:!0});var Ba=Ee(),go=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=Ba.path.makeAbsolute(this._settings.cwd,r),r=Ba.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};ho.default=go});var vr=C(xo=>{"use strict";l();Object.defineProperty(xo,"__esModule",{value:!0});var ud=K("path"),fd=Da(),pd=Ha(),md=ja(),dd=qa(),yo=class{constructor(t){this._settings=t,this.errorFilter=new md.default(this._settings),this.entryFilter=new pd.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new fd.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new dd.default(this._settings)}_getRootDirectory(t){return ud.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){let r=t.base==="."?"":t.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};xo.default=yo});var Ua=C(_o=>{"use strict";l();Object.defineProperty(_o,"__esModule",{value:!0});var gd=Ia(),hd=vr(),vo=class extends hd.default{constructor(){super(...arguments),this._reader=new gd.default(this._settings)}async read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t);return(await this.api(r,t,n)).map(i=>n.transform(i))}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};_o.default=vo});var Wa=C(Ro=>{"use strict";l();Object.defineProperty(Ro,"__esModule",{value:!0});var yd=K("stream"),xd=to(),vd=vr(),bo=class extends vd.default{constructor(){super(...arguments),this._reader=new xd.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new yd.Readable({objectMode:!0,read:()=>{}});return o.once("error",s=>i.emit("error",s)).on("data",s=>i.emit("data",n.transform(s))).once("end",()=>i.emit("end")),i.once("close",()=>o.destroy()),i}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};Ro.default=bo});var Ga=C(So=>{"use strict";l();Object.defineProperty(So,"__esModule",{value:!0});var _d=ze(),bd=hr(),Rd=yr(),Co=class extends Rd.default{constructor(){super(...arguments),this._walkSync=bd.walkSync,this._statSync=_d.statSync}dynamic(t,r){return this._walkSync(t,r)}static(t,r){let n=[];for(let o of t){let i=this._getFullEntryPath(o),s=this._getEntry(i,o,r);s===null||!r.entryFilter(s)||n.push(s)}return n}_getEntry(t,r,n){try{let o=this._getStat(t);return this._makeEntry(o,r)}catch(o){if(n.errorFilter(o))return null;throw o}}_getStat(t){return this._statSync(t,this._fsStatSettings)}};So.default=Co});var Ka=C(Eo=>{"use strict";l();Object.defineProperty(Eo,"__esModule",{value:!0});var Cd=Ga(),Sd=vr(),wo=class extends Sd.default{constructor(){super(...arguments),this._reader=new Cd.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t);return this.api(r,t,n).map(n.transform)}api(t,r,n){return r.dynamic?this._reader.dynamic(t,n):this._reader.static(r.patterns,n)}};Eo.default=wo});var za=C(lt=>{"use strict";l();Object.defineProperty(lt,"__esModule",{value:!0});lt.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var at=K("fs"),wd=K("os"),Ed=Math.max(wd.cpus().length,1);lt.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:at.lstat,lstatSync:at.lstatSync,stat:at.stat,statSync:at.statSync,readdir:at.readdir,readdirSync:at.readdirSync};var Ao=class{constructor(t={}){this._options=t,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,Ed),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(t,r){return t===void 0?r:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},lt.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};lt.default=Ao});var _r=C((eb,Xa)=>{"use strict";l();var Ya=Xs(),Ad=Ua(),kd=Wa(),Pd=Ka(),ko=za(),ce=Ee();async function Po(e,t){me(e);let r=Oo(e,Ad.default,t),n=await Promise.all(r);return ce.array.flatten(n)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(f,u){me(f);let m=Oo(f,Pd.default,u);return ce.array.flatten(m)}e.sync=t;function r(f,u){me(f);let m=Oo(f,kd.default,u);return ce.stream.merge(m)}e.stream=r;function n(f,u){me(f);let m=[].concat(f),p=new ko.default(u);return Ya.generate(m,p)}e.generateTasks=n;function o(f,u){me(f);let m=new ko.default(u);return ce.pattern.isDynamicPattern(f,m)}e.isDynamicPattern=o;function i(f){return me(f),ce.path.escape(f)}e.escapePath=i;function s(f){return me(f),ce.path.convertPathToPattern(f)}e.convertPathToPattern=s;let a;(function(f){function u(p){return me(p),ce.path.escapePosixPath(p)}f.escapePath=u;function m(p){return me(p),ce.path.convertPosixPathToPattern(p)}f.convertPathToPattern=m})(a=e.posix||(e.posix={}));let c;(function(f){function u(p){return me(p),ce.path.escapeWindowsPath(p)}f.escapePath=u;function m(p){return me(p),ce.path.convertWindowsPathToPattern(p)}f.convertPathToPattern=m})(c=e.win32||(e.win32={}))})(Po||(Po={}));function Oo(e,t,r){let n=[].concat(e),o=new ko.default(r),i=Ya.generate(n,o),s=new t(o);return i.map(s.read,s)}function me(e){if(![].concat(e).every(n=>ce.string.isString(n)&&!ce.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}Xa.exports=Po});l();import fx from"node:process";import px from"yargs";import{hideBin as mx}from"yargs/helpers";var tt="0.20.2";l();var fe=Q(J(),1),Vl=Q(_r(),1);import{dirname as hg,join as yg,resolve as Pr}from"node:path";import{readFile as xg}from"node:fs/promises";import Tt from"fs-extra";import vg from"gray-matter";import _g from"markdown-it";import{Feed as bg}from"feed";import Qe from"consola";l();import Qa from"fs-extra";l();import{spawn as Od}from"cross-spawn";function Et(e,t="updated"){return new Promise((r,n)=>{let o=["log"];t==="updated"&&o.push("-1"),o.push('--pretty="%ci"',e),t==="created"&&o.push("|","tail","-1");let i=Od("git",o),s="";i.stdout.on("data",a=>s+=String(a)),i.on("close",()=>{r(+new Date(s))}),i.on("error",()=>{r(0)})})}async function Ja(e){return await Et(e,"created")||(await Qa.stat(e)).ctime}async function Za(e){return await Et(e,"created")||(await Qa.stat(e)).mtime}l();import nl,{CORE_SCHEMA as Td}from"js-yaml";l();var el="<!-- more -->",ct=/^https?:/i,tl=/^pathname:\/\//,cb="/:all(.*)*",rl=new Set(["annotation","math","menclose","mfrac","mglyph","mi","mlabeledtr","mn","mo","mover","mpadded","mphantom","mroot","mrow","mspace","msqrt","mstyle","msub","msubsup","msup","mtable","mtd","mtext","mtr","munder","munderover","semantics"]),ut={css:{preprocessorOptions:{scss:{api:"modern-compiler"}}}};var Le={excerpt_separator:el,engines:{yaml:{parse:e=>nl.load(e,{schema:Td}),stringify:e=>nl.dump(e)}}};l();var Pl=Q(_r(),1),Ne=Q(J(),1);import{dirname as ug}from"node:path";import El from"node:process";import{resolve as Ot}from"pathe";import kl from"fs-extra";import fg from"debug";import{ensureSuffix as Al,uniq as pg}from"@antfu/utils";import Ol from"consola";l();l();import{resolvePath as $d}from"mlly";import{resolveGlobal as Vd}from"resolve-global";import ol from"consola";var To={};async function be(e,t=!1){try{return await $d(e,{url:import.meta.url})}catch(r){ol.log(r)}if(To.value)try{return Vd(e)}catch{}if(t)throw new Error(`Failed to resolve package ${e}`);ol.warn(`Failed to resolve package ${e}`)}l();function il(e){return ct.test(e)}function Md(e){return e.replace(/\\/g,"/")}function $o(e,t){return t.startsWith(e)?t:e+t}function U(e){return`/@fs${$o("/",Md(e))}`}function sl(e){return e.startsWith("/")||/^\.\.?[\/\\]/.test(e)}function al(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}l();l();import Ld from"node:process";import Id from"fs-extra";import{createJiti as Nd}from"jiti";import{resolve as Fd}from"pathe";import ll from"consola";var Dd=Nd(import.meta.url,{moduleCache:!1});async function Hd(e){let{name:t,cwd:r}=e,n=Fd(r,`${t}.config.ts`),o={};if(await Id.exists(n))try{o=await Dd.import(n,{default:!0})}catch{ll.error(`Failed to load config file: ${n}`)}else ll.debug(`Config file not found: ${n}`);return{config:o,configFile:n}}async function ft(e,t={}){let{config:r,configFile:n}=await Hd({name:e,cwd:t.cwd||Ld.cwd()}),o=r;return typeof r=="function"&&(o=await r(t.valaxyOptions||{})),{config:o,configFile:n}}l();var mt=Q(J(),1);import Ud from"node:process";import{createDefu as Wd}from"defu";import{mergeConfig as Gd}from"vite";import{isFunction as ul}from"@antfu/utils";import Kd from"consola";l();function Ie(){let e=performance.now();return()=>{let r=performance.now()-e;return r>1e3?`${(r/1e3).toFixed(2)}s`:`${r.toFixed(2)}ms`}}l();var pt=Q(J(),1);import{webcrypto as cl}from"node:crypto";import jd from"consola";import{options as Bd}from"floating-vue";var br={mode:"auto",url:"/",lang:"en",languages:["en","zh-CN"],timezone:"",title:"Valaxy Blog",description:"A blog generated by Valaxy.",subtitle:"Next Generation Static Blog Framework.",author:{avatar:"https://valaxy.site/valaxy-logo.png",email:"i@valaxy.site",link:"https://valaxy.site",name:"VALAXY Developer",status:{emoji:"\u{1F30C}",message:"The moonlight is beautiful."}},favicon:"/favicon.svg",feed:{name:"",favicon:"/favicon.svg"},social:[],lastUpdated:!0,license:{enabled:!0,language:"",type:"by-nc-sa"},sponsor:{enable:!0,description:"\u8FD9\u662F\u5173\u4E8E\u8D5E\u52A9\u7684\u4E00\u4E9B\u63CF\u8FF0",methods:[]},search:{enable:!1,type:"fuse"},fuse:{dataPath:"valaxy-fuse-list.json",options:{keys:[]}},comment:{enable:!1},frontmatter:{time_warning:180*24*60*60*1e3},cdn:{prefix:"https://unpkg.com/"},mediumZoom:{enable:!1,selector:"",options:{}},vanillaLazyload:{enable:!1,options:{}},floatingVue:Bd,statistics:{enable:!1,readTime:{speed:{cn:300,en:100}}},pageSize:7,encrypt:{enable:!1,algorithm:"AES-CBC",salt:cl.getRandomValues(new Uint8Array(16)),iv:cl.getRandomValues(new Uint8Array(16))},redirects:{useVueRouter:!0,rules:[]}};function qb(e){return e}async function qd(e){return ft("site",{cwd:e})}async function Rr(e){let t=Ie(),{config:r,configFile:n}=await qd(e),o=t();return r&&n&&jd.success(`Resolve ${(0,pt.cyan)("siteConfig")} from ${(0,pt.dim)(n)} ${(0,pt.yellow)(o)}`),{siteConfig:r,siteConfigFile:n}}var fl={siteConfig:br,theme:"yun",themeConfig:{pkg:{name:"",version:""}},build:{ssgForPagination:!1},deploy:{},runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}},modules:{rss:{enable:!0,fullText:!1}},features:{katex:!0},vite:{build:{rollupOptions:{external:[]}}},devtools:!0};function zd(e){return e}var eR=zd;async function At(e,t){return await ft("valaxy",{cwd:e,valaxyOptions:t})}var Xe=Wd((e,t,r)=>{if(ul(e[t])&&ul(r)&&(e[t]=function(...n){e[t].call(this,...n),r.call(this,...n)}),t==="vite")return e[t]=Gd(e[t],r),!0});async function pl(e){let t=e.userRoot||Ud.cwd(),r=Ie(),{config:n,configFile:o}=await At(t),i=r();o&&n&&Object.keys(n).length!==0&&Kd.success(`Resolve ${(0,mt.cyan)("userValaxyConfig")} from ${(0,mt.dim)(o)} ${(0,mt.yellow)(i)}`);let s=e.theme||n?.theme||"yun";return{config:n,configFile:o,theme:s}}l();import Yd from"node:path";import Xd from"fs-extra";function Qd(e){return e}var sR=Qd;async function ml(e,t){let r={};for(let n of e){let o=Yd.resolve(n.root,"valaxy.config.ts");if(!await Xd.exists(o))continue;let{config:i,configFile:s}=await At(n.root,t);i&&(n.configFile=s,r=Xe(i,r))}return r}l();var wr=Q(J(),1);import tg from"defu";l();var gl=Q(J(),1);import eg from"consola";l();import dl from"node:process";import Jd from"node:fs";import Zd from"node:path";function kt(){return dl.env.NODE_ENV==="production"}function Vo(e="development"){dl.env.NODE_ENV=e,Re.level=kt()?2:3}function dt(){return Vo("production")}function Cr(e){let t=Jd.existsSync(Zd.resolve(e,"pages"));return t||Re.error(`No pages directory found in ${e}`),t}var Re=eg.create({level:kt()?2:3}),Mo=`${(0,gl.magenta)("valaxy")}:`,gt={success:e=>Re.success(Mo,e),info:e=>Re.info(Mo,e),ready:e=>Re.ready(Mo,e)};async function Sr(e){return ft("theme",{cwd:e})}async function hl(e){let{config:t,configFile:r}=await Sr(e.userRoot);if(t&&r&&Re.info(`Resolve ${(0,wr.cyan)("themeConfig")} from ${(0,wr.dim)(r)}`),e?.themeRoot){let{config:n}=await Sr(e.themeRoot);t=tg(t||{},n)}return{themeConfig:t,themeConfigFile:r}}function rg(e){return e}var RR=rg;function wR(e){return e}l();var Ce=Q(J(),1);import Rl from"node:process";import{resolve as og}from"pathe";import vl from"fs-extra";import _l from"defu";import ig from"ora";l();import{dirname as yl}from"node:path";import{resolve as xl}from"pathe";import ng from"fs-extra";async function Er(e,t){if(!e)return"";if(sl(e))if(t){let r=ng.lstatSync(t).isFile();return xl(r?yl(t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return xl(yl(await be(`${e}/package.json`)||""))}async function Cl(e,t=Rl.cwd()){let r=ig(`Resolve ${(0,Ce.cyan)("addons")} from ${(0,Ce.dim)(t)}`).start(),n={},o=s=>{s&&(n[s.name]=_l(n[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){o(await bl(s,{cwd:t}));continue}typeof s=="object"&&o(_l(await bl(s.name,{cwd:t}),s||{}))}r.succeed();let i=Object.values(n).filter(s=>s.enable);return i.forEach((s,a)=>{console.log(` ${a===i.length-1?"\u2514\u2500":"\u251C\u2500"} ${(0,Ce.yellow)(s.name)} ${(0,Ce.blue)(`v${s.pkg?.version}`)}${s.global?(0,Ce.cyan)(" (global)"):""} ${(0,Ce.dim)(s.pkg.homepage||s.pkg.repository?.url||s.pkg.repository||"")}`)}),i}async function bl(e,t={}){let r=await sg(e,t.cwd||Rl.cwd()),n=og(r,"./package.json");if(!await vl.exists(n)){Re.error(`No addon named ${e} found`);return}let o=await vl.readJSON(n);return{enable:!0,name:o.name,global:!!o.global,root:r,options:{},props:{},pkg:o}}async function sg(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return await Er(r,t)}l();async function Sl(e,t){let r=e.startsWith("valaxy-theme")||e.startsWith(".")?e:`valaxy-theme-${e}`;return await Er(r,t)}l();import{writeFile as ag}from"node:fs/promises";import{ensureFile as lg}from"fs-extra";function Ar(e){return e==="/"?"/index":e.endsWith("/")?e.slice(0,-1):e}function kr(e){if(!e)return[];let t=[];for(let r of e)if(Array.isArray(r.from))for(let n of r.from)t.push({from:Ar(n),to:Ar(r.to)});else t.push({from:Ar(r.from),to:Ar(r.to)});return t}async function wl(e,t){await lg(t),await ag(t,`
4
+ <!DOCTYPE html>
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="UTF-8">
8
+ <meta http-equiv="refresh" content="0; url=${e}">
9
+ <link rel="canonical" href="${e}">
10
+ </head>
11
+ <script>
12
+ window.location.href = '${e}' + window.location.search + window.location.hash
13
+ </script>
14
+ </html>
15
+ `)}l();import{createDefu as cg}from"defu";var Pt=cg((e,t,r)=>{if(t&&e[t]&&Array.isArray(e[t])&&Array.isArray(r))return e[t]=r,!0});var mg=fg("valaxy:options");async function dg(e){let{config:t,themeRoot:r,theme:n}=e,o=t.siteConfig;o.url=Al("/",o.url||""),o.cdn.prefix=Al("/",o.cdn.prefix||"");let i=Ot(r,"package.json");try{t.themeConfig.pkg=await kl.readJson(i,"utf-8")}catch{console.error(`valaxy-theme-${n} doesn't have package.json`)}}async function Lo(e,t){let{clientRoot:r,themeRoot:n,userRoot:o}=e,i=await Cl(t.addons||[],e.userRoot),s=await ml(i,e);t=Xe(t,s);let a=Pt(t,fl);e.config={...a,runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}}},e.addons=i,i.forEach(m=>{e.config.runtimeConfig.addons[m.name]=m});let c=i.map(({root:m})=>m),f=i.map(({name:m})=>m);e.addonRoots=c,e.roots=pg([r,n,...c,o]);let u=e.config.vite?.build?.rollupOptions?.external||[];return e.config.vite.build.rollupOptions.external=u.filter(m=>!f.includes(m)),await dg(e),e}async function ue(e={userRoot:El.cwd()},t="dev"){let r=ug(await be("valaxy/package.json",!0)),n=Ot(r,"client"),o=Ot(e.userRoot||El.cwd());Ol.start(`Resolve ${(0,Ne.magenta)("valaxy")} config...`);let[i,s,a,c]=await Promise.all([pl(e),Rr(e.userRoot),Sr(e.userRoot),(0,Pl.default)(["**.md"],{cwd:Ot(o,"pages"),ignore:["**/node_modules"]})]),{config:f,configFile:u,theme:m}=i,p=await Sl(m,e.userRoot),{siteConfig:y,siteConfigFile:h}=s,{config:_,configFile:P}=a,w=kr(y.redirects?.rules);f=Pt({siteConfig:y},{themeConfig:_},f);let $={mode:t,pkgRoot:r,tempDir:Ot(o,".valaxy"),clientRoot:n,userRoot:o,themeRoot:p,addonRoots:[],roots:[],theme:m,config:{...f,runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}}},configFile:u||"",siteConfigFile:h||"",themeConfigFile:P||"",pages:c.sort(),addons:[],redirects:w,env:{id:"",links:[]}};mg($);let E=await Io($),V=Xe(f,E);return $=await Lo($,V),kl.ensureDirSync($.tempDir),$}async function Io(e){let t=Ie(),{config:r}=await At(e.themeRoot,e),n=t();return r&&Ol.success(`Resolve ${(0,Ne.cyan)("valaxy.config.ts")} from ${(0,Ne.blue)(`theme(${e.theme})`)} ${(0,Ne.yellow)(n)}`),r}l();function Fe(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}l();function Tl(e,t){t.forEach(r=>{r.setup?.(e)})}var Rg=_g({html:!0,breaks:!0,linkify:!0});async function $l(e){Qe.info(`${(0,fe.yellow)("RSS Generating ...")}`);let{config:t}=e,r=t.siteConfig;if(!r.url||r.url==="/"){Qe.error("You must set `url` (like `https://example.com`) in `site.config.ts` to generate rss.");return}let n=r.url,o=r.url.slice(0,-1),i={name:r.author?.name,email:r.author?.email,link:r.author?.link};Qe.info(`RSS Site Url: ${(0,fe.cyan)(n)}`);let s=r.license?.type==="zero"?"1.0":"4.0",a={atom:r.feed?.name?`${r.feed?.name}.atom`:"atom.xml",json:`${r.feed?.name||"feed"}.json`,rss:`${r.feed?.name||"feed"}.xml`},c={title:r.title||"Valaxy Blog",description:r.description,id:n||"valaxy",link:n,copyright:`CC ${r.license?.type?.toUpperCase()} ${s} ${new Date().getFullYear()} \xA9 ${r.author?.name}`,feedLinks:{}};Object.keys(a).forEach(w=>{c.feedLinks[w]=`${n}${a[w]}`});let f=await(0,Vl.default)(`${e.userRoot}/pages/posts/**/*.md`),u=e.config.siteConfig.lang||"en",m=[];for await(let w of f){let $=await xg(w,"utf-8"),{data:E,content:V,excerpt:A}=vg($,Le);if(E.password)continue;if(E.draft){Qe.warn(`Ignore draft post: ${(0,fe.dim)(w)}`);continue}if(E.hide)continue;let M=w;E.date||(E.date=await Ja(M)),r.lastUpdated&&(E.updated||(E.updated=await Za(M)));let O=e.config.modules.rss.fullText,k=O?V:A||V.slice(0,100),F=Rg.render(k).replace('src="/',`src="${o}/`);E.image?.startsWith("/")&&(E.image=o+E.image);let W=o+w.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,""),b=`<br/><p>${u==="zh-CN"?`\u8BBF\u95EE <a href="${W}" target="_blank">${W}</a> ${O?"\u67E5\u770B\u539F\u6587":"\u9605\u8BFB\u5168\u6587"}\u3002`:`Visit <a href="${W}" target="_blank">${W}</a> to ${O?"view original article":"read more"}.`}</p>`;m.push({title:"",...E,date:new Date(E.date),published:new Date(E.updated||E.date),content:F+b,author:[i],id:E.id?.toString()||"",link:W})}m.sort((w,$)=>+new Date($.published||$.date)-+new Date(w.published||w.date));let p=r.author?.avatar||"/favicon.svg";c.author=i,c.image=il(p)?r.author?.avatar:`${o}${$o("/",p)}`,c.favicon=`${o}${r.feed?.favicon||r.favicon}`;let y=new bg(c);m.forEach(w=>y.addItem(w)),await Tt.ensureDir(hg(`./dist/${a.atom}`));let h=Pr(e.userRoot,"./dist"),_=Pr(e.userRoot,"public");["rss","atom","json"].forEach(async w=>{let $="",E=`${h}/${a[w]}`;w==="rss"?$=y.rss2():w==="atom"?$=y.atom1():w==="json"&&($=y.json1()),Tt.writeFileSync(E,$,"utf-8"),Qe.success(`[${(0,fe.cyan)(w)}] dist: ${(0,fe.dim)(E)}`);let V=Pr(_,a[w]),A=yg("public",a[w]);Tt.writeFileSync(V,$,"utf-8"),Qe.success(`[${(0,fe.cyan)(w)}] public: ${(0,fe.dim)(E)}`);try{let M=Pr(e.userRoot,".gitignore"),O=await Tt.readFile(M,"utf-8"),k=A.replace(/\\/g,"/");O.includes(k)||(await Tt.appendFile(M,`
16
+ # valaxy rss
17
+ ${k}
18
+ `),Qe.success(`Add ${(0,fe.dim)(k)} to ${(0,fe.dim)(".gitignore")}`))}catch{}})}var Or={extendCli(e){e.command("rss [root]","generate rss feed",t=>Fe(t).strict().help(),async({root:t})=>{dt();let r=await ue({userRoot:t},"build");await $l(r)})},setup(e){e.hook("build:after",()=>{console.log(),$l(e.options)})}};l();var Ml=Q(_r(),1),He=Q(J(),1);import ht from"node:path";import De from"fs-extra";import yt from"consola";import Cg from"gray-matter";async function Sg(e){yt.start(`Generate List for Fuse Search by (${(0,He.cyan)("fuse.js")}) ...`);let t=await(0,Ml.default)(`${e.userRoot}/pages/posts/**/*.md`),r=[];for await(let n of t){let o=De.readFileSync(n,"utf-8"),{data:i,excerpt:s,content:a}=Cg(o,Le);if(i.draft){yt.warn(`Ignore draft post: ${(0,He.dim)(n)}`);continue}if(i.hide||i.password)continue;let c=e.config.siteConfig.fuse.options.keys||[],f=n.replace(`${e.userRoot}/pages`,""),u=n.endsWith("index.md")?f.replace(/\/index\.md$/,""):f.replace(/\.md$/,""),m={title:i.title||"",tags:(typeof i.tags=="string"?[i.tags]:i.tags)||[],categories:i.categories||[],author:e.config.siteConfig.author.name,excerpt:s||a.slice(0,100),link:encodeURI(u)};c.includes("content")&&(m.content=a||""),r.push(m)}return r}async function Ll(e){yt.info("Start generate fuse list...");let t=await Sg(e);await De.ensureDir("./dist");let r=ht.resolve(e.userRoot,"public"),n=ht.resolve(r,e.config.siteConfig.fuse.dataPath),o=ht.join("public",e.config.siteConfig.fuse.dataPath);await De.ensureFile(n),De.writeJSONSync(n,t),yt.success(`Generate fuse list in ${(0,He.dim)(r)}`);let i=ht.resolve(e.userRoot,"dist"),s=ht.resolve(i,e.config.siteConfig.fuse.dataPath);await De.ensureDir(i),De.writeJSONSync(s,t),yt.success(`Generate fuse list in ${(0,He.dim)(i)}`);try{let a=ht.resolve(e.userRoot,".gitignore"),c=await De.readFile(a,"utf-8"),f=o.replace(/\\/g,"/");c.includes(f)||(await De.appendFile(a,`
19
+ # valaxy fuse
20
+ ${f}
21
+ `),yt.success(`Add ${(0,He.dim)(f)} to ${(0,He.dim)(".gitignore")}`))}catch{}}function wg(e){e.command("fuse [root]","generate fuse list for search",t=>Fe(t).strict().help(),async({root:t})=>{dt();let r=await ue({userRoot:t},"build");await Ll(r)})}var Tr={extendCli(e){wg(e)},setup(e){e.hook("build:before",async()=>{await Ll(e.options)})}};l();l();var $r=Q(J(),1);import{join as Og,resolve as Fl}from"node:path";import{writeFile as Tg}from"node:fs/promises";import{render as $g}from"ejs";import{ensureSuffix as Vg}from"@antfu/utils";import{consola as No}from"consola";import{format as Mg}from"date-fns";l();import{access as Eg}from"node:fs/promises";async function Je(e){try{return await Eg(e),!0}catch{return!1}}l();import kg from"node:path";import{readFile as Pg}from"node:fs/promises";l();import Ag from"node:process";var $t=Ag.cwd(),Il=`---
22
+ layout: <%=layout%>
23
+ title: <%=title%>
24
+ date: <%=date%>
25
+ ---
26
+ `;async function Nl(e){let{clientRoot:t,themeRoot:r}=await ue({userRoot:$t}),n=[$t,r,t];for(let o of n){let i=kg.resolve(o,"scaffolds",`${e}.md`);if(await Je(i))return Pg(i,"utf-8")}return!1}async function Dl(e){let t=Fl($t,"pages"),{path:r,title:n}=e,o=r||Og("posts",n),i=0;for(;;){let s=Fl(t,o);if(i&&(s=`${s}-${i}`),s=Vg(".md",s),!await Je(s)){let a=await Lg(e);try{await Tg(s,a,"utf-8"),No.success(`[valaxy new]: successfully generated file ${(0,$r.magenta)(s)}`)}catch(c){console.log(c),No.error(`[valaxy new]: failed to write file ${s}`),No.warn(`You should run ${(0,$r.green)("valaxy new")} in your valaxy project root directory.`)}return s}i++}}async function Lg({date:e,title:t,layout:r="post"}){let n=await Nl(r);return n||(n=Il),$g(n,{title:t,layout:r,date:e?Mg(new Date,"yyyy-MM-dd HH:mm:ss"):""})}function Hl(e){e.command("new <title>","Draft a new post",t=>{t.usage("$0 <title> -p [path] -l [layout]").positional("title",{describe:"The title of the new post",required:!0}).option("path",{alias:"p",type:"string",describe:"the path to generate new post. Customize the path of post to generate"}).option("layout",{alias:"l",type:"string",default:"post"}).option("date",{alias:"d",type:"boolean",default:!0,describe:"Generate post with the current date"}).strict().help()},async({title:t,path:r,date:n,layout:o})=>{await Dl({title:t,date:n,layout:o,path:r})})}l();var _t=Q(J(),1);import ii from"node:path";import Qy from"node:process";import Ue from"consola";import{mergeConfig as au}from"vite";l();var Zc=Q(J(),1);import{join as Xc,resolve as Qc}from"node:path";import{mergeConfig as Jc,build as Dy}from"vite";import{build as Hy}from"vite-ssg/node";import jy from"vite-ssg-sitemap";import Dr from"fs-extra";import Hr from"consola";l();import Vy from"@vitejs/plugin-vue";import My from"vite-plugin-vue-layouts";import Ly from"unplugin-vue-components/vite";import Iy from"@intlify/unplugin-vue-i18n/vite";import Ny from"@unhead/addons/vite";import{resolve as Fy}from"pathe";import Yc from"consola";l();import{resolve as jg}from"node:path";import Bg from"fs-extra";import{createJiti as qg}from"jiti";import ql from"defu";import{presetAttributify as Ug,presetIcons as Wg,presetTypography as Gg,presetUno as Kg,transformerDirectives as zg,transformerVariantGroup as Yg}from"unocss";l();import{resolve as Ig}from"node:path";import Ng from"fs-extra";import{isObject as Fg}from"@antfu/utils";import{createJiti as Dg}from"jiti";var Hg=Dg(import.meta.url);function jl(e,t,r=""){return e={...e},Object.keys(t).forEach(n=>{Fg(e[n])?e[n]=jl(e[n],t[n],r?`${r}.${n}`:n):Array.isArray(e[n])?e[n]=[...e[n],...t[n]]:e[n]=t[n]}),e}async function Bl(e,t,r,n,o=!0){let i=n;for(let s of e){let a=Ig(s,"setup",t);if(Ng.existsSync(a)){let f=await(await Hg.import(a,{default:!0}))(r);f!==null&&(i=o?jl(i,f):f)}}return i}var Xg=qg(import.meta.url);async function Qg(e){let{config:t}=e,n=["animate-fade-in","m-auto","text-left","rotate-y-180",...["i-ri-clipboard-line","i-ri-archive-line","i-ri-folder-2-line","i-ri-price-tag-3-line","i-ri-cloud-line"],...e.config.unocss?.safelist??[]],o=t.siteConfig;if(t.markdown?.blocks){let s=t.markdown.blocks;Object.entries(s).forEach(([a,c])=>{c.icon&&n.push(c.icon)})}o.social?.length&&o.social.forEach(s=>n.push(s?.icon||""));let i=o.sponsor?.methods||[];return i.length&&i.forEach(s=>n.push(s?.icon||"")),n}async function Jg(e){let{config:t}=e;return{shortcuts:[["flex-center","flex items-center justify-center"],["inline-flex-center","inline-flex items-center justify-center"],["btn","px-4 py-1 rounded inline-block bg-$va-c-primary text-white cursor-pointer transition hover:bg-$va-c-primary-light disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50"],["icon-btn","inline-flex justify-center items-center cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-sky-600"],["va-card","shadow hover:shadow-lg bg-$va-c-bg-light"]],presets:[Kg(t.unocssPresets?.uno),Ug(t.unocssPresets?.attributify),Wg({scale:1.2,...t.unocssPresets?.icons}),Gg(t.unocssPresets?.typography)],rules:[["font-serif",{"font-family":"var(--va-font-serif)"}],["font-sans",{"font-family":"var(--va-font-sans)"}],["font-mono",{"font-family":"var(--va-font-mono)"}]],transformers:[zg(),Yg()],safelist:await Qg(e)}}async function Ul(e){let t=await import("unocss/vite").then(p=>p.default),{unocss:r}=e.config,n=await Jg(e),{themeRoot:o,clientRoot:i,roots:s}=e,a=["uno.config.ts","unocss.config.ts"],c=[];[o,i].forEach(p=>a.forEach(y=>c.push(jg(p,y))));let u={},m=[];for(let p of c)if(await Bg.exists(p)){let y=await Xg.import(p,{default:!0});u=ql(u,y),m.push(p)}return u=await Bl(s,"unocss.ts",{},u,!0),t({configDeps:m,configFile:!1,...ql(r||{},u,n)})}l();import{dirname as rh,join as Ho,resolve as Se}from"node:path";import{mergeConfig as nh,searchForWorkspaceRoot as jo}from"vite";import{uniq as Gl}from"@antfu/utils";l();import{join as Fo}from"node:path";import Do from"fs-extra";import{uniq as Zg}from"@antfu/utils";import{loadConfigFromFile as eh,mergeConfig as th}from"vite";async function Vr({userRoot:e,themeRoot:t},r){let n={mode:"development",command:r},o={},i=Zg([t,e]).map(s=>Fo(s,"vite.config.ts"));for await(let s of i){if(!Do.existsSync(s))continue;let a=await eh(n,s);a?.config&&(o=th(o,a.config))}return o}async function Wl({clientRoot:e,themeRoot:t,userRoot:r,config:n},o){let i=o,s="",a="";n.siteConfig.favicon&&(s+=`<link rel="icon" href="${n.siteConfig.favicon}">`);let c=[r,t];n.siteConfig.mode==="auto"&&(s+=`
27
+ <script>
28
+ ;(function () {
29
+ const prefersDark =
30
+ window.matchMedia &&
31
+ window.matchMedia('(prefers-color-scheme: dark)').matches
32
+ const setting = localStorage.getItem('vueuse-color-scheme') || 'auto'
33
+ if (setting === 'dark' || (prefersDark && setting !== 'light'))
34
+ document.documentElement.classList.toggle('dark', true)
35
+ })()
36
+ </script>
37
+ `,s+=`<style type="text/css">
38
+ :root { color-scheme: light dark; --va-c-bg: #fff; }
39
+ html.dark { --va-c-bg: #000; }
40
+ html { background-color: var(--va-c-bg); }
41
+ </style>`),n.siteConfig.lang&&(s+=`
42
+ <script>
43
+ const locale = localStorage.getItem('valaxy-locale') || '${n.siteConfig.lang}';
44
+ document.documentElement.setAttribute('lang', locale);
45
+ </script>
46
+ `);for(let f of c){let u=Fo(f,"index.html");if(!Do.existsSync(u))continue;let m=await Do.readFile(u,"utf-8");s+=`
47
+ ${(m.match(/<head>([\s\S]*?)<\/head>/im)?.[1]||"").trim()}`,a+=`
48
+ ${(m.match(/<body>([\s\S]*?)<\/body>/im)?.[1]||"").trim()}`}return i=i.replace("__ENTRY__",U(Fo(e,"main.ts"))).replace("<!-- head -->",s).replace("<!-- body -->",a),i}var oh=["@unhead/schema-org","@unhead/vue","@vueuse/integrations/useFuse","defu","katex","nprogress","unocss","vue","vue-router","vue-i18n","fuse.js","medium-zoom","vanilla-lazyload","@vue/devtools-api"],Kl=["@docsearch/css","@vueuse/core","@vueuse/shared","@unocss/reset","unocss","vue","vue-router","vue-demi","@vue/devtools-api","meting","valaxy","/@valaxyjs/config","/@valaxyjs/context","/@valaxyjs/addons","/@valaxyjs/locales","/@valaxyjs/styles"];function zl(e){let t=e.addons.map(r=>Object.keys(r.pkg.dependencies||{})).flat();return{name:"valaxy:site",enforce:"pre",async config(r){let n={root:e.clientRoot,cacheDir:Ho(e.userRoot,"node_modules/.vite"),publicDir:Ho(e.userRoot,"public"),define:Bo(e),resolve:{alias:await ih(e),dedupe:["vue"]},optimizeDeps:{entries:[Se(e.clientRoot,"main.ts")],include:Gl([...oh,...t]).filter(o=>!Kl.includes(o)),exclude:Kl},server:{fs:{allow:Gl([jo(e.clientRoot),jo(e.themeRoot),jo(e.userRoot),rh(await be("katex/package.json",!0))])}}};return To&&(n.cacheDir=Ho(e.pkgRoot,"node_modules/.vite"),n.resolve.alias.vue=`${be("vue/dist/vue.esm-browser.js",!0)}`),nh(r,n)},async transformIndexHtml(r){return r=await Wl(e,r),{html:r,tags:[]}}}}function Bo(e){return{__VUE_PROD_DEVTOOLS__:!1,__INTLIFY_PROD_DEVTOOLS__:!1}}async function ih(e){let t=[{find:"~/",replacement:`${U(e.userRoot)}/`},{find:"valaxy/client/",replacement:`${U(e.clientRoot)}/`},{find:"valaxy/package.json",replacement:U(Se(e.clientRoot,"../package.json"))},{find:/^valaxy$/,replacement:U(Se(e.clientRoot,"index.ts"))},{find:"@valaxyjs/client/",replacement:`${U(e.clientRoot)}/`},{find:"virtual:valaxy-theme",replacement:`${U(e.themeRoot)}/client/index.ts`},{find:`valaxy-theme-${e.theme}/client`,replacement:`${U(Se(e.themeRoot))}/client/index.ts`},{find:`valaxy-theme-${e.theme}/`,replacement:`${U(Se(e.themeRoot))}/`},{find:`valaxy-theme-${e.theme}`,replacement:`${U(Se(e.themeRoot))}/client/index.ts`}];return e.config.siteConfig.encrypt.enable&&t.push({find:/^vue$/,replacement:await be("vue/dist/vue.esm-bundler.js",!0)}),e.addons.forEach(r=>{t.push({find:`${r.name}/client/`,replacement:`${U(`${Se(r.root)}`)}/client/`}),t.push({find:`${r.name}/App.vue`,replacement:`${U(Se(r.root))}/App.vue`}),t.push({find:r.name,replacement:`${U(Se(r.root))}/client/index.ts`})}),t.push({find:/^valaxy-addon-(.*)$/,replacement:U(Se(e.clientRoot,"./addons/index.ts"))}),t}l();import{existsSync as sh}from"node:fs";import{join as ah,resolve as lh}from"node:path";import{slash as ch,uniq as uh}from"@antfu/utils";function Yl({clientRoot:e,themeRoot:t,userRoot:r}){let n=ch(lh(e,"setup"));return{name:"valaxy:setup",enforce:"pre",async transform(o,i){if(i.startsWith(n)){let s=i.slice(n.length+1).replace(/\?.*$/,""),a=[],c=[];return uh([t,r]).map(u=>ah(u,"setup",s)).forEach((u,m)=>{if(!sh(u))return;a.push(`import __n${m} from '${U(u)}'`);let p=`__n${m}`;/\binjection_return\b/g.test(o)&&(p=`injection_return = ${p}`),/\binjection_arg\b/g.test(o)?p+="(injection_arg)":p+="()",c.push(`// ${u}`,p)}),o=o.replace("/* __imports__ */",a.join(`
49
+ `)),o=o.replace("/* __injections__ */",c.join(`
50
+ `)),o}return null}}}l();import{objectEntries as fh}from"@antfu/utils";function Xl(e){let t=fh(Bo(e));return[{name:"valaxy:flags",enforce:"pre",transform(r,n){if(n.match(/\.vue($|\?)/)){let o=r;if(t.forEach(([i,s])=>{r=r.replace(new RegExp(i,"g"),s)}),o!==r)return r}}}]}l();import iy from"unplugin-vue-router/vite";import ri from"fs-extra";import{resolve as sy}from"pathe";import{convert as ay}from"html-to-text";import ly from"markdown-it";import cy from"gray-matter";l();import{existsSync as ph,readFileSync as mh}from"node:fs";function dh(e){let t=(e.match(/[\u4E00-\u9FA5]/g)||[]).length,r=(e.replace(/[\u4E00-\u9FA5]/g,"").match(/[a-zA-Z0-9_\u0392-\u03C9\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF\u3040-\u309F\uAC00-\uD7AF\u0400-\u04FF]+|[\u00E4\u00C4\u00E5\u00C5\u00F6\u00D6]+|\w+/g)||[]).length;return{cn:t,en:r}}function gh({cn:e,en:t},r){let n=e/(r.speed.cn||300)+t/(r.speed.en||100);return n<1?1:Math.ceil(n)}function hh({cn:e,en:t}){let r=e+t;return r<1e3?r.toString():`${Math.round(r/100)/10}k`}function yh(e,t){let r=dh(e);return{countData:r,wordCount:hh(r),readingTime:gh(r,t.readTime)}}function Ql({route:e,options:t}){let r=e.components.get("default")||"";if(ph(r)){let n=mh(r,"utf-8"),{wordCount:o,readingTime:i}=yh(n,{readTime:Object.assign({speed:{cn:300,en:100}},t.readTime)});e.meta.frontmatter&&(e.meta.frontmatter.wordCount||(e.meta.frontmatter.wordCount=o),e.meta.frontmatter.readingTime||(e.meta.frontmatter.readingTime=i))}}l();import iA from"markdown-it";l();l();import{webcrypto as Zl}from"node:crypto";l();var Jl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var xh=128,je,Be;function ec(e){!je||je.length<e?(je=Buffer.allocUnsafe(e*xh),Zl.getRandomValues(je),Be=0):Be+e>je.length&&(Zl.getRandomValues(je),Be=0),Be+=e}function vh(e){return ec(e-=0),je.subarray(Be-e,Be)}function _h(e,t,r){let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(i=t)=>{let s="";for(;;){let a=r(o),c=o;for(;c--;)if(s+=e[a[c]&n]||"",s.length===i)return s}}}function tc(e,t=21){return _h(e,t,vh)}function qo(e=21){ec(e-=0);let t="";for(let r=Be-e;r<Be;r++)t+=Jl[je[r]&63];return t}var ac=Q(J(),1);l();function rc(e=[]){return{name:"@shikijs/transformers:compact-line-options",line(t,r){let n=e.find(o=>o.line===r);return n?.classes&&this.addClassToHast(t,n.classes),t}}}function bh(e,t,r,n=!1){return{name:e,code(o){let i=o.children.filter(a=>a.type==="element"),s=[];i.forEach((a,c)=>{let f;for(let u of a.children){if(u.type!=="element")continue;let m=u.children[0];if(m.type!=="text")continue;let p=!1;m.value=m.value.replace(t,(...y)=>r.call(this,y,a,u,i,c)?(p=!0,""):y[0]),p&&!m.value.trim()&&(f=u)}if(f&&(a.children.splice(a.children.indexOf(f),1),a.children.length===0&&(s.push(a),n))){let u=o.children[o.children.indexOf(a)+1];u&&u.type==="text"&&u.value===`
51
+ `&&s.push(u)}});for(let a of s)o.children.splice(o.children.indexOf(a),1)}}}function Rh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Mr(e={},t="@shikijs/transformers:notation-map"){let{classMap:r={},classActivePre:n=void 0}=e;return bh(t,new RegExp(`\\s*(?://|/\\*|<!--|#|--|%{1,2}|;{1,2}|"|')\\s+\\[!code (${Object.keys(r).map(Rh).join("|")})(:\\d+)?\\]\\s*(?:\\*/|-->)?\\s*$`),function([o,i,s=":1"],a,c,f,u){let m=Number.parseInt(s.slice(1),10);return f.slice(u,u+m).forEach(p=>{this.addClassToHast(p,r[i])}),n&&this.addClassToHast(this.pre,n),!0})}function nc(e={}){let{classLineAdd:t="diff add",classLineRemove:r="diff remove",classActivePre:n="has-diff"}=e;return Mr({classMap:{"++":t,"--":r},classActivePre:n},"@shikijs/transformers:notation-diff")}function oc(e={}){let{classMap:t={error:["highlighted","error"],warning:["highlighted","warning"]},classActivePre:r="has-highlighted"}=e;return Mr({classMap:t,classActivePre:r},"@shikijs/transformers:notation-error-level")}function ic(e={}){let{classActiveLine:t="focused",classActivePre:r="has-focused"}=e;return Mr({classMap:{focus:t},classActivePre:r},"@shikijs/transformers:notation-focus")}function sc(e={}){let{classActiveLine:t="highlighted",classActivePre:r="has-highlighted"}=e;return Mr({classMap:{highlight:t,hl:t},classActivePre:r},"@shikijs/transformers:notation-highlight")}var xw=Symbol("highlighted-lines");import{addClassToHast as Ch,bundledLanguages as Sh,getHighlighter as wh,isSpecialLang as Eh}from"shiki";var Ah=tc("abcdefghijklmnopqrstuvwxyz",10);function kh(e){e=e.replace(/^(?:\[.*?\])?.*?([\d,-]+).*/,"$1").trim();let t=[];return e?(e.split(",").map(r=>r.split("-").map(n=>Number.parseInt(n,10))).forEach(([r,n])=>{r&&n?t.push(...Array.from({length:n-r+1},(o,i)=>r+i)):t.push(r)}),t.map(r=>({line:r,classes:["highlighted"]}))):[]}async function Uo(e,t,r=console){let{defaultHighlightLang:n="",codeTransformers:o=[]}=t,i=await wh({themes:typeof e=="object"&&"light"in e&&"dark"in e?[e.light,e.dark]:[e],langs:[...Object.keys(Sh),...t.languages||[]],langAlias:t.languageAlias});await t?.shikiSetup?.(i);let s=[nc(),ic({classActiveLine:"has-focus",classActivePre:"has-focused-lines"}),sc(),oc(),{name:"valaxy:add-class",pre(m){Ch(m,"vp-code")}},{name:"valaxy:clean-up",pre(m){delete m.properties.tabindex,delete m.properties.style}}],a=/-vue$/,c=/=(\d*)/,f=/:(no-)?line-numbers(=\d*)?$/,u=/\{\{.*?\}\}/g;return(m,p,y)=>{let h=a.test(p)?"":"v-pre";p=p.replace(c,"").replace(f,"").replace(a,"").toLowerCase()||n,p&&!i.getLoadedLanguages().includes(p)&&!Eh(p)&&(r.warn(ac.default.yellow(`
52
+ The language '${p}' is not loaded, falling back to '${n||"txt"}' for syntax highlighting.`)),p=n);let _=kh(y),P=new Map,w=V=>h?V:V.replace(u,A=>{let M=P.get(A);return M||(M=Ah(),P.set(A,M)),M}),$=V=>(P.forEach((A,M)=>{V=V.replaceAll(A,M)}),V);m=w(m).trimEnd();let E=i.codeToHtml(m,{lang:p,transformers:[...s,rc(_),{name:"valaxy:v-pre",pre(V){h&&(V.properties["v-pre"]="")}},{name:"valaxy:empty-line",code(V){V.children.forEach(A=>{A.type==="element"&&A.tagName==="span"&&Array.isArray(A.properties.class)&&A.properties.class.includes("line")&&A.children.length===0&&A.children.push({type:"element",tagName:"wbr",properties:{},children:[]})})}},...o],meta:{__raw:y},...typeof e=="object"&&"light"in e&&"dark"in e?{themes:e,defaultColor:!1}:{theme:e}});return $(E)}}l();import kc from"markdown-it-anchor";import Yh from"markdown-it-attrs";import{full as Xh}from"markdown-it-emoji";import Qh from"markdown-it-footnote";import Jh from"markdown-it-task-lists";import Zh from"markdown-it-image-figures";l();l();var Ph={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},Oh=/[&<>'"]/g,Ze=e=>e.replace(Oh,t=>Ph[t]);var Wo=(e,{shouldAllowHtml:t,shouldEscapeText:r})=>{let n=e.children??[],o=["text","emoji","code_inline"];return t&&o.push("html_inline"),n.filter(s=>o.includes(s.type)&&!s.meta?.isPermalinkSymbol).reduce((s,a)=>r&&(a.type==="code_inline"||a.type==="text")?`${s}${Ze(a.content)}`:`${s}${a.content}`,"").trim()},Lr=(e,{level:t,shouldAllowHtml:r,shouldAllowNested:n,shouldEscapeText:o,slugify:i,format:s})=>{let a=[],c=[],f=u=>{for(;c.length!==0&&u.level<=c[0].level;)c.shift();c.length===0?(a.push(u),c.push(u)):(c[0].children.push(u),c.unshift(u))};for(let u=0;u<e.length;u+=1){let m=e[u];if(m.type!=="heading_open"||m.level!==0&&!n)continue;let p=Number.parseInt(m.tag.slice(1),10);if(!t.includes(p))continue;let y=e[u+1];if(!y)continue;let h=Wo(y,{shouldAllowHtml:r,shouldEscapeText:o}),_=m.attrGet("id")??i(h);f({level:p,title:s?.(h)??h,slug:_,link:`#${_}`,children:[]})}return a},Th=/[\u0000-\u001f]/g,$h=/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g,Vh=/[\u0300-\u036F]/g,et=e=>e.normalize("NFKD").replace(Vh,"").replace(Th,"").replace($h,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/^(\d)/,"_$1").toLowerCase();var lc=(e,{level:t=[2,3],shouldAllowNested:r=!1,slugify:n=et,format:o}={})=>{let i=e.renderer.render.bind(e.renderer);e.renderer.render=(s,a,c)=>(c.headers=Lr(s,{level:t,shouldAllowHtml:!1,shouldAllowNested:r,shouldEscapeText:!1,slugify:n,format:o}),i(s,a,c))};l();var cc="script",uc="style",Vt="template",Mh=/^<script\s+.*?\bsetup\b.*?>$/is,Lh=({customBlocks:e})=>{let t=Array.from(new Set([cc,uc,...e])).join("|");return new RegExp(`^\\s*(?<content>(?<tagOpen><(?<type>${t})\\s?.*?>)(?<contentStripped>.*)(?<tagClose><\\/\\k<type>\\s*>))\\s*$`,"is")},fc=(e,{customBlocks:t=[]}={})=>{let r=Lh({customBlocks:t}),n=e.render.bind(e);e.render=(i,s={})=>{s.sfcBlocks={template:null,script:null,scriptSetup:null,scripts:[],styles:[],customBlocks:[]};let a=n(i,s);return s.sfcBlocks.template={type:Vt,content:`<${Vt}>${a}</${Vt}>`,contentStripped:a,tagOpen:`<${Vt}>`,tagClose:`</${Vt}>`},a};let o=e.renderer.rules.html_block;e.renderer.rules.html_block=(i,s,a,c,f)=>{if(!c.sfcBlocks)return o(i,s,a,c,f);let p=i[s].content.match(r);if(!p)return o(i,s,a,c,f);let y=p.groups;return y.type===cc?(c.sfcBlocks.scripts.push(y),Mh.test(y.tagOpen)?c.sfcBlocks.scriptSetup=y:c.sfcBlocks.script=y):y.type===uc?c.sfcBlocks.styles.push(y):c.sfcBlocks.customBlocks.push(y),""}};l();var pc=e=>{let t=e.renderer.render.bind(e.renderer);e.renderer.render=(r,n,o)=>{let i=r.findIndex(s=>s.tag==="h1");return o.title=i>-1?Wo(r[i+1],{shouldAllowHtml:!1,shouldEscapeText:!1}):"",t(r,n,o)}};l();var Ih=({listTag:e,listClass:t,itemClass:r,linkTag:n,linkClass:o})=>{let i=Ze(e),s=t?` class="${Ze(t)}"`:"",a="li",c=r?` class="${Ze(r)}"`:"",f=Ze(n),u=o?` class="${Ze(o)}"`:"",m=y=>n==="router-link"?` to="${y}"`:` href="${y}"`,p=y=>`<${i}${s}>${y.map(h=>`<${a}${c}><${f}${u}${m(h.link)}>${h.title}</${f}>${h.children.length>0?p(h.children):""}</${a}>`).join("")}</${i}>`;return p},Nh=({pattern:e,containerTag:t,containerClass:r})=>(n,o,i,s)=>{if(n.sCount[o]-n.blkIndent>=4)return!1;let a=n.bMarks[o]+n.tShift[o],c=n.eMarks[o],f=n.src.slice(a,c).split(" ")[0];if(!e.test(f))return!1;if(s)return!0;n.line=o+1;let u=n.push("toc_open",t,1);u.markup="",u.map=[o,n.line],r&&u.attrSet("class",r);let m=n.push("toc_body","",0);m.markup=f,m.map=[o,n.line],m.hidden=!0;let p=n.push("toc_close",t,-1);return p.markup="",m.map=[o,n.line],!0},mc=(e,{pattern:t=/^\[\[toc\]\]$/i,slugify:r=et,format:n,level:o=[2,3],shouldAllowNested:i=!1,containerTag:s="nav",containerClass:a="table-of-contents",listTag:c="ul",listClass:f="",itemClass:u="",linkTag:m="a",linkClass:p=""}={})=>{e.block.ruler.before("heading","toc",Nh({pattern:t,containerTag:s,containerClass:a}),{alt:["paragraph","reference","blockquote"]});let y=Ih({listTag:c,listClass:f,itemClass:u,linkTag:m,linkClass:p});e.renderer.rules.toc_body=h=>y(Lr(h,{level:o,shouldAllowHtml:!0,shouldAllowNested:i,shouldEscapeText:!0,slugify:r,format:n}))};import{cssI18nContainer as ey}from"css-i18n";l();import dc from"katex";function gc(e,t){let r=e.posMax,n=!0,o=!0,i=t>0?e.src.charCodeAt(t-1):-1,s=t+1<=r?e.src.charCodeAt(t+1):-1;return(i===32||i===9||s>=48&&s<=57)&&(o=!1),(s===32||s===9)&&(n=!1),{can_open:n,can_close:o}}function Fh(e,t){let r,n,o,i;if(e.src[e.pos]!=="$")return!1;if(o=gc(e,e.pos),!o.can_open)return t||(e.pending+="$"),e.pos+=1,!0;let s=e.pos+1;for(r=s;(r=e.src.indexOf("$",r))!==-1;){for(i=r-1;e.src[i]==="\\";)i-=1;if((r-i)%2===1)break;r+=1}return r===-1?(t||(e.pending+="$"),e.pos=s,!0):r-s===0?(t||(e.pending+="$$"),e.pos=s+1,!0):(o=gc(e,r),o.can_close?(t||(n=e.push("math_inline","math",0),n.markup="$",n.content=e.src.slice(s,r)),e.pos=r+1,!0):(t||(e.pending+="$"),e.pos=s,!0))}function Dh(e,t,r,n){let o,i,s,a,c=!1,f=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(f+2>u||e.src.slice(f,f+2)!=="$$")return!1;if(f+=2,o=e.src.slice(f,u),n)return!0;for(o.trim().slice(-2)==="$$"&&(o=o.trim().slice(0,-2),c=!0),s=t;!c&&(s++,!(s>=r||(f=e.bMarks[s]+e.tShift[s],u=e.eMarks[s],f<u&&e.tShift[s]<e.blkIndent)));)e.src.slice(f,u).trim().slice(-2)==="$$"&&(a=e.src.slice(0,u).lastIndexOf("$$"),i=e.src.slice(f,a),c=!0);e.line=s+1;let m=e.push("math_block","math",0);return m.block=!0,m.content=(o&&o.trim()?`${o}
53
+ `:"")+e.getLines(t+1,s,e.tShift[t],!0)+(i&&i.trim()?i:""),m.map=[t,e.line],m.markup="$$",!0}function Go(e,t){t=t||{};let r=function(s){t.displayMode=!1;try{return dc.renderToString(s,t)}catch(a){return t.throwOnError&&console.warn(a),s}},n=function(s,a){return r(s[a].content)},o=function(s){t.displayMode=!0;try{return`<p>${dc.renderToString(s,t)}</p>`}catch(a){return t.throwOnError&&console.warn(a),s}},i=function(s,a){return`${o(s[a].content)}
54
+ `};e.inline.ruler.after("escape","math_inline",Fh),e.block.ruler.after("blockquote","math_block",Dh,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=n,e.renderer.rules.math_block=i}l();import zo from"markdown-it-container";l();function hc(e){return e.trim().replace(/=(\d*)/,"").replace(/:(no-)?line-numbers({| |$|=\d*).*/,"").replace(/(-vue|{| ).*$/,"").replace(/^vue-html$/,"template").replace(/^ansi$/,"")}function Ko(e){return e.hasSingleTheme?"":" vp-adaptive-theme"}function yc(e,t=!1){return t?e.replace(/<!--[^]*?-->/g,"").match(/data-title="(.*?)"/)?.[1]||"":e.match(/\[(.*)\]/)?.[1]||hc(e)||"txt"}function Hh(e,t){let r=t.frontmatter?.codeHeightLimit||e?.siteConfig?.codeHeightLimit;return r===void 0||r<=0?"":`style="max-height: ${r}px;"`}function xc(e,t){let r=e.renderer.rules.fence;e.renderer.rules.fence=(...n)=>{let[o,i,s,a]=n,c=o[i];c.info=c.info.replace(/\[.*\]/,"");let f=hc(c.info),u=r(...n);return`
55
+ <div ${Hh(t,a)} class="language-${f}${Ko(t)}${/ active( |$)/.test(c.info)?" active":""}">
56
+ <button title="Copy Code" class="copy"></button><span class="lang">${f}</span>${u}<button class="collapse"></button>
57
+ </div>`}}function jh(e,{icon:t,color:r,text:n,langs:o}={}){return[zo,e,{render(i,s){let a=i[s],c=a.info.trim().slice(e.length).trim();if(a.nesting===1){if(e==="details")return`<details class="${e} custom-block">${`<summary>${c}</summary>`}
58
+ `;let f="";t&&(f=`<i class="icon ${t}" ${r?`style="color: ${r}"`:""}></i>`);let u=`<span lang="en">${c||n}</span>`;return o&&Object.keys(o).forEach(m=>{u+=`<span lang="${m}">${c||o[m]}</span>`}),`<div class="${e} custom-block"><p class="custom-block-title">${f}${u}</p>
59
+ `}else return e==="details"?`</details>
60
+ `:`</div>
61
+ `}}]}var vc={tip:{text:"TIP",langs:{"zh-CN":"\u63D0\u793A"}},warning:{text:"WARNING",langs:{"zh-CN":"\u6CE8\u610F"}},danger:{text:"DANGER",langs:{"zh-CN":"\u8B66\u544A"}},info:{text:"INFO",langs:{"zh-CN":"\u4FE1\u606F"}},details:{text:"Details",langs:{"zh-CN":"\u8BE6\u60C5"}}};function _c(e,t,r={}){Object.keys(vc).forEach(o=>{let i={...vc[o],...r[o]||{}};e.use(...jh(o,i))}),e.use(...Bh(t)),["zh-CN","en"].forEach(o=>{e.use(zo,o,{render:(i,s)=>i[s].nesting===1?`<div lang="${o}">
62
+ `:`</div>
63
+ `})})}function Bh(e){return[zo,"code-group",{render(t,r){if(t[r].nesting===1){let n=qo(5),o="",i='checked="checked"';for(let s=r+1;!(t[s].nesting===-1&&t[s].type==="container_code-group_close");++s){let a=t[s].type==="html_block";if(t[s].type==="fence"&&t[s].tag==="code"||a){let c=yc(a?t[s].content:t[s].info,a);if(c){let f=qo(7);o+=`<input type="radio" name="group-${n}" id="tab-${f}" ${i}><label for="tab-${f}">${c}</label>`,i&&!a&&(t[s].info+=" active"),i=""}}}return`<div class="vp-code-group${Ko(e)}"><div class="tabs">${o}</div><div class="blocks">
64
+ `}return`</div></div>
65
+ `}}]}l();var Yo=/{([\d,-]+)}/;function bc(e){let t=e.renderer.rules.fence;e.renderer.rules.fence=(...r)=>{let[n,o]=r,i=n[o],s=i.attrs&&i.attrs[0],a=null;if(!s){let c=i.info;if(!c||!Yo.test(c))return t(...r);let f=c.replace(Yo,"").trim();i.info=f,a=Yo.exec(c)[1]}return!a&&(a=s[0],!a||!/[\d,-]+/.test(a))?t(...r):(i.info+=` ${a}`,t(...r))}}l();import{URL as qh}from"node:url";var Uh=/(^|.*\/)index.md(#?.*)$/i;function Rc(e,t,r){e.renderer.rules.link_open=(i,s,a,c,f)=>{let u=i[s],m=u.attrIndex("href");if(m>=0){let p=u.attrs[m],y=p[1];ct.test(y)?(Object.entries(t).forEach(([_,P])=>{u.attrSet(_,P)}),p[1]=y.replace(tl,"")):!y.startsWith("#")&&!y.startsWith("mailto:")&&!/\.(?!html|md)\w+($|\?)/i.test(y)&&n(p,c),p[1]=p[1].replace(/\bimport\.meta/g,"import%2Emeta").replace(/\bprocess\.env/g,"process%2Eenv")}return f.renderToken(i,s,a)};function n(i,s){let a=i[1],c=a.match(Uh);if(c){let[,f,u]=c;a=f+u}else{let f=a.replace(/[?#].*$/,"");f.endsWith(".md")&&(f=f.replace(/\.md$/,s.cleanUrls==="disabled"?".html":"")),s.cleanUrls==="disabled"&&!f.endsWith(".html")&&!f.endsWith("/")&&(f+=".html");let u=new qh(a,"http://a.com");a=f+u.search+u.hash}!a.startsWith("/")&&!/^\.\//.test(a)&&(a=`./${a}`),o(a.replace(/\.html$/,""),s),a.startsWith("/")&&(a=`${r}${a}`.replace(/\/+/g,"/")),i[1]=decodeURI(a)}function o(i,s){(s.links||(s.links=[])).push(i)}}l();function Cc(e,t=!1){let r=e.renderer.rules.fence;e.renderer.rules.fence=(...n)=>{let o=r(...n),[i,s]=n,a=i[s].info;if(!t&&!/:line-numbers($| |=)/.test(a)||t&&/:no-line-numbers($| )/.test(a))return o;let c=1,f=a.match(/=(\d*)/);f&&f[1]&&(c=Number.parseInt(f[1]));let m=o.slice(o.indexOf("<code>"),o.indexOf("</code>")).split(`
66
+ `),y=`<div class="line-numbers-wrapper" aria-hidden="true">${[...Array(m.length)].map((_,P)=>`<span class="line-number">${P+c}</span><br>`).join("")}</div>`;return o.replace(/<\/div>$/,`${y}</div>`).replace(/"(language-[^"]*?)"/,'"$1 line-numbers-mode"')}}l();import Sc from"pathe";import Xo from"fs-extra";var Wh=/^(.+?(?:(?:\.([a-z0-9]+))?))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))? ?(?:\[(.+)\])?$/;function Gh(e){let[t="",r="",n="",o="",i="",s=""]=(Wh.exec(e)||[]).slice(1),a=s||t.split("/").pop()||"";return{filepath:t,extension:r,region:n,lines:o,lang:i,title:a}}function Kh(e){let t=e.split(`
67
+ `),r=t.reduce((n,o)=>{for(let i=0;i<o.length;i++)if(o[i]!==" "&&o[i]!==" ")return Math.min(i,n);return n},Number.POSITIVE_INFINITY);return r<Number.POSITIVE_INFINITY?t.map(n=>n.slice(r)).join(`
68
+ `):e}function wc(e,t,r,n=!1){let[o,i,s]=t.exec(e.trim())||[];return o&&i&&s===r&&i.match(n?/^[Ee]nd ?[rR]egion$/:/^[rR]egion$/)}function zh(e,t){let r=[/^\/\/ ?#?((?:end)?region) ([\w*-]+)$/,/^\/\* ?#((?:end)?region) ([\w*-]+) ?\*\/$/,/^#pragma ((?:end)?region) ([\w*-]+)$/,/^<!-- #?((?:end)?region) ([\w*-]+) -->$/,/^#((?:End )Region) ([\w*-]+)$/,/^::#((?:end)region) ([\w*-]+)$/,/^# ?((?:end)?region) ([\w*-]+)$/],n=null,o=-1;for(let[i,s]of e.entries())if(n===null){for(let a of r)if(wc(s,a,t)){o=i+1,n=a;break}}else if(wc(s,n,t,!0))return{start:o,end:i,regexp:n};return null}function Ec(e,t){let r=(o,i,s,a)=>{let f=o.bMarks[i]+o.tShift[i],u=o.eMarks[i];if(o.sCount[i]-o.blkIndent>=4)return!1;for(let k=0;k<3;++k)if(o.src.charCodeAt(f+k)!==60||f+k>=u)return!1;if(a)return!0;let m=f+3,p=o.skipSpacesBack(u,f),y=o.src.slice(m,p).trim().replace(/^@/,t).trim(),{filepath:h,extension:_,region:P,lines:w,lang:$,title:E}=Gh(y);o.line=i+1;let V=o.push("fence","code",0);V.info=`${$||_}${w?`{${w}}`:""}${E?`[${E}]`:""}`;let{realPath:A,path:M}=o.env,O=Sc.resolve(Sc.dirname(A??M),h);return V.src=[O,P.slice(1)],V.markup="```",V.map=[i,i+1],!0},n=e.renderer.rules.fence;e.renderer.rules.fence=(...o)=>{let[i,s,,{includes:a}]=o,c=i[s],[f,u]=c.src??[];if(!f)return n(...o);a&&a.push(f);let m=Xo.statSync(f).isFile();if(!Xo.existsSync(f)||!m)return c.content=m?`Code snippet path not found: ${f}`:"Invalid code snippet option",c.info="",n(...o);let p=Xo.readFileSync(f,"utf8");if(u){let y=p.split(/\r?\n/),h=zh(y,u);h&&(p=Kh(y.slice(h.start,h.end).filter(_=>!h.regexp.test(_.trim())).join(`
69
+ `)))}return c.content=p,n(...o)},e.block.ruler.before("fence","snippet",r)}l();function Ac(e){let t=e.renderer.rules.footnote_ref,r=e.renderer.rules.footnote_open,n=e.renderer.rules.footnote_close,o=e.renderer.rules.footnote_anchor;e.renderer.rules.footnote_ref=function(i,s,a,c,f){let u=t(i,s,a,c,f),m=u.match(/href="(.*?)"/)[0],p=u.match(/id="(.*?)"/)[0];return`<ValaxyFootnoteRef ${m} ${p}>${u}</ValaxyFootnoteRef>`},e.renderer.rules.footnote_open=function(i,s,a,c,f){let u=r(i,s,a,c,f);return`<ValaxyFootnoteItem ${u.match(/id="(.*?)"/)[0]}>${u}<ValaxyFootnoteContent>`},e.renderer.rules.footnote_close=function(i,s,a,c,f){return`</ValaxyFootnoteContent>${n(i,s,a,c,f)}</ValaxyFootnoteItem>`},e.renderer.rules.footnote_anchor=function(i,s,a,c,f){let u=o(i,s,a,c,f);return`<ValaxyFootnoteAnchor ${u.match(/href="(.*?)"/)[0]}>${u}</ValaxyFootnoteAnchor>`}}var Ir={light:"github-light",dark:"github-dark"};async function Mt(e,t,r="/"){let n=t?.config.markdown||{},o=n.theme??Ir,i=typeof o=="string"||"name"in o,s=t?.config.siteConfig||{};n.preConfig&&n.preConfig(e),e.use(bc).use(xc,{theme:o,siteConfig:s}).use(Ec,t?.userRoot).use(_c,{hasSingleTheme:i},{...n.blocks,...n?.container}).use(ey,{languages:t?.config.siteConfig.languages}).use(Rc,{target:"_blank",rel:"noreferrer",...n.externalLinks},r),e.use(Cc,n.lineNumbers),n.attrs?.disable||e.use(Yh,n.attrs),e.use(Xh).use(Qh).use(Ac),e.use(kc,{slugify:et,permalink:kc.permalink.linkInsideHeader({symbol:"&ZeroWidthSpace;",renderAttrs:(c,f)=>{let u=f.tokens.findIndex(p=>{let h=p.attrs?.find(_=>_[0]==="id");return h&&c===h[1]});return{"aria-label":`Permalink to "${f.tokens[u+1].content}"`}}}),...n.anchor}),e.use(lc,{slugify:et,...typeof n.headers=="boolean"?void 0:n.headers}).use(fc,{...n.sfc}).use(pc).use(mc,{...n.toc}),e.use(Go,n.katex);let a=t?.config.siteConfig.vanillaLazyload||{enable:!1};return e.use(Zh,{figcaption:!0,lazy:!0,async:!0,...a.enable?{lazy:!0,async:!0,classes:"lazy"}:{},...n.imageFigures}),e.use(Jh),n.config&&n.config(e),e}l();l();import oy from"unplugin-vue-markdown/vite";l();import ti from"pathe";import{slash as ry}from"@antfu/utils";l();l();import Qo from"node:process";var Jo=new Set;function Pc(e){if(Jo.size===0){let r=typeof Qo=="object"&&Qo.env.VITE_EXTRA_EXTENSIONS||Qo.env?.VITE_EXTRA_EXTENSIONS||"";`3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip${r&&typeof r=="string"?`,${r}`:""}`.split(",").forEach(n=>Jo.add(n))}let t=e.split(".").pop();return t==null||!Jo.has(t.toLowerCase())}l();import Zo from"node:path";import ty from"fs-extra";function ei(e,t,r){let n=/<!--\s*@include:\s*(.*?)\s*-->/g,o=/\{(\d*),(\d*)\}$/;return t.replace(n,(i,s)=>{if(!s.length)return i;let a=s.match(o);a&&(s=s.slice(0,-a[0].length));let c=s[0]==="@";try{let f=c?Zo.join(e,s.slice(s[1]==="/"?2:1)):Zo.join(Zo.dirname(r),s),u=ty.readFileSync(f,"utf-8");if(a){let[,m,p]=a;u=u.split(/\r?\n/).slice(m?Number.parseInt(m,10)-1:void 0,p?Number.parseInt(p,10):void 0).join(`
70
+ `)}return u=`<!-- @included: ${s} -->
71
+ ${u}`,ei(e,u,f)}catch{return i}})}var ny=/<!--\s*@included:\s*(.*?)\s*-->/g;function Oc(e){let t=e.userRoot;return(r,n)=>ei(t,r,n)}function Tc(e,t,r){let n=[],o=ti.dirname(t);return e=e.replace(ny,(i,s)=>{let c=s.startsWith("@")?ti.resolve(r.userRoot,s.slice(s[1]==="/"?2:1)):ti.join(o,s);return n.push(ry(c)),""}),{code:e,includes:n}}l();import*as $c from"js-base64";function Vc(e){return e=e.replace(/^````txt\n```mermaid/mg,"````txt\n\\`\\`\\`mermaid"),e=e.replace(/^```mermaid\s*?({.*?})?\n([\s\S]+?)\n```/mg,(t,r="",n="")=>(n=n.trim(),r=r.trim()||"{}",`<ValaxyMermaid :code="'${$c.encode(n,!0)}'" v-bind="${r}" />`)),e=e.replace(/^````txt\n\\`\\`\\`mermaid/mg,"````txt\n```mermaid"),e}async function Mc(e){let t=e?.config.markdown||{},r=t.theme??Ir,n=Oc(e);return oy({include:[/\.md$/],wrapperClasses:"",frontmatter:!0,exportFrontmatter:!1,frontmatterOptions:{grayMatterOptions:Le},escapeCodeTagInterpolation:!0,markdownItOptions:{quotes:`""''`,html:!0,xhtmlOut:!0,linkify:!0,highlight:await Uo(r,t),...t?.markdownItOptions},async markdownItSetup(o){o.linkify.set({fuzzyLink:!1}),await Mt(o,e),e?.config.markdown?.markdownItSetup?.(o);function i(s){s.core.ruler.push("valaxy_md_env",a=>{e.env=a.env})}o.use(i)},transforms:{before(o,i){return o=Vc(o),o=n(o,i),o}},...t})}function uy(e="",t="html",r){switch(t){case"ai":case"md":return e;case"html":return r.render(e);case"text":return ay(r.render(e));default:return e}}async function Lc(e){let{options:t}=e,{roots:r,config:n}=t,o=new ly({html:!0});return await Mt(o,t),iy({extensions:[".vue",".md"],routesFolder:r.map(i=>`${i}/pages`),dts:sy(t.tempDir,"typed-router.d.ts"),...n.router,async extendRoute(i){let s=JSON.parse(JSON.stringify(n.siteConfig.frontmatter))||{};if(i.meta&&i.meta.frontmatter){let{frontmatter:c,otherMeta:f}=i.meta;i.meta=f}i.addToMeta({frontmatter:s}),(i.fullPath==="/"||i.fullPath==="/page")&&i.addToMeta({layout:"home"}),["/posts","/posts/"].includes(i.fullPath)?i.addToMeta({layout:"posts"}):i.fullPath.startsWith("/posts/")&&i.children.length===0&&i.addToMeta({layout:"post"});let a=i.components.get("default")||"";if(a.endsWith(".md")){let c=ri.readFileSync(a,"utf-8"),{data:f,excerpt:u,content:m}=cy(c,Le),p=f,y=t.config.siteConfig.lastUpdated;if(delete p.password,p.gallery_password&&(delete p.gallery_password,delete p.photos),p.date||(p.date=ri.statSync(a).mtime),y&&(p.updated||(p.updated=ri.statSync(a).ctime)),p.from&&(Array.isArray(p.from)?p.from.forEach(_=>{t.redirects.push({from:_,to:i.fullPath})}):t.redirects.push({from:p.from,to:i.fullPath})),i.addToMeta({frontmatter:p,excerpt:u?uy(u,p.excerpt_type,o):""}),f.layout&&i.addToMeta({layout:f.layout}),i.meta.frontmatter?.updated||(i.meta.frontmatter.updated=i.meta.frontmatter.date),i.meta.frontmatter.tags){let _=i.meta.frontmatter.tags;typeof _=="string"&&(i.meta.frontmatter.tags=[_])}n.siteConfig.statistics.enable&&Ql({options:n.siteConfig.statistics,route:i});let h={route:i,data:f,excerpt:u,content:m,path:a};n.extendMd?.(h)}return await e.hooks.callHook("vue-router:extendRoute",i),n.router?.extendRoute?.(i)}})}l();var Fr=Q(J(),1);import{join as Lt,relative as wy,resolve as Ey}from"pathe";import It from"fs-extra";import Ay from"pascalcase";import Kc from"consola";l();import{LRUCache as by}from"lru-cache";import Ry from"debug";import Cy from"pathe";l();import xt from"pathe";import{slash as fy}from"@antfu/utils";import py from"fs-extra";function Ic(e){let t=xt.resolve(e.userRoot,"pages"),{ignoreDeadLinks:r}=e.config,n=e.config.vite?.publicDir||"public";return(o,i)=>{let{links:s=[]}=e.env,a=i,c=i,f=[],u=p=>{f.push({url:p,file:xt.relative(t,a)})};function m(p){return r?r===!0?!0:r==="localhostLinks"?p.replace(ct,"").startsWith("//localhost"):r.some(y=>typeof y=="string"?p===y:y instanceof RegExp?y.test(p):typeof y=="function"?y(p):!1):!1}if(s){let p=xt.dirname(c);for(let y of s){let{pathname:h}=new URL(y,"http://a.com");if(!Pc(h))continue;y=y.replace(/[?#].*$/,"").replace(/\.(html|md)$/,""),y.endsWith("/")&&(y+="index");let _=decodeURIComponent(fy(y.startsWith("/")?y.slice(1):xt.relative(t,xt.resolve(p,y)))).replace(/\/index$/,"");!e.pages.includes(_)&&!py.existsSync(xt.resolve(p,n,`${_}.html`))&&!m(y)&&u(y)}}return f}}l();function my(e){return["import { provide } from 'vue'","import { useRoute } from 'vue-router'",`
72
+ const data = ${al(e)}
73
+ const route = useRoute()`,`const $frontmatter = data.frontmatter || {}
74
+ route.meta.frontmatter = Object.assign(route.meta.frontmatter || {}, data.frontmatter || {})
75
+ provide('pageData', data)
76
+ provide('valaxy:frontmatter', $frontmatter)
77
+ `]}function Nc(e){return(t,r,n)=>{let o=my(n),i=e.mode==="dev",s=[...o,i?`
78
+ window.$pageData = data
79
+ window.$frontmatter = $frontmatter
80
+ `:"","globalThis.$frontmatter = $frontmatter"],a=t.indexOf("<script setup>");a!==-1?t=t.slice(0,a+14)+s.join(`
81
+ `)+t.slice(a+14):t=`<script setup>
82
+ ${s.join(`
83
+ `)}
84
+ </script>
85
+ ${t}`;let c=t.indexOf("<template>")+10,f=t.lastIndexOf("</template>"),u=t.slice(c,f).trim();return u.startsWith("<div>")&&u.endsWith("</div>")&&(u=u.slice(5,-6)),t=`${t.slice(0,c)}
86
+ ${Fc(u)}
87
+ ${t.slice(f)}`,t}}l();import dy from"pathe";function gy(e,t){if(!e||!e.length)return;let r=e.find(([n,o={}])=>n==="meta"&&o.name===t&&o.content);return r&&r[1].content}function hy(e){let{description:t,head:r}=e;return t!==void 0?t:r&&gy(r,"description")||""}async function Dc(e,t,r){let{frontmatter:n={}}=r.env,o=dy.relative(r.userRoot,t),i=JSON.parse(JSON.stringify(n)),s={title:i.title||r.env.title||"",titleTemplate:i.titleTemplate,description:hy(i),frontmatter:i,headers:r.env.headers||[],relativePath:o,path:t};return s.lastUpdated=await Et(t),s}l();function yy(e,t,r){if(typeof r!="number"||r<=0)return e;let n=t.config.siteConfig.codeHeightLimit;return e=e.replaceAll(/<div.+class="language-\w+">/g,o=>(n!==void 0&&n>0?o=o.replace(/\d+/,r.toString()):o=`${o.slice(0,5)}style="max-height: ${r}px;"${o.slice(5)}`,o)),e}function Hc(e){return t=>{let{frontmatter:r={}}=e.env;return yy(t,e,r.codeHeightLimit)}}l();l();import{webcrypto as ni}from"node:crypto";function xy(e){let t=new TextEncoder;return ni.subtle.importKey("raw",t.encode(e),"PBKDF2",!1,["deriveBits","deriveKey"])}function vy(e,t){return ni.subtle.deriveKey({name:"PBKDF2",salt:t,iterations:1e5,hash:"SHA-256"},e,{name:"AES-CBC",length:256},!0,["encrypt","decrypt"])}async function Nr(e,t){let{password:r,iv:n,salt:o}=t,i=await xy(r),s=await vy(i,o),a=new TextEncoder,c=await ni.subtle.encrypt({name:"AES-CBC",iv:n},s,a.encode(e));return String.fromCharCode(...new Uint8Array(c))}function jc(e){let{config:{siteConfig:{encrypt:t}}}=e;return async(r,n,o)=>{let{frontmatter:i={}}=o;if(t.enable){let s=/<!-- valaxy-encrypt-start:(?<password>\w+) -->(?<content>.*?)<!-- valaxy-encrypt-end -->/gs,a=/((<!-- valaxy-encrypt-start:\w+ -->)|(<!-- valaxy-encrypt-end -->))/g;if(i.password)r=r.replaceAll(a,"");else{let c=[];for(let u of r.matchAll(s))c.push(await Nr(u.groups.content,{password:u.groups.password,iv:t.iv,salt:t.salt}));let f=0;c.length&&(i.partiallyEncryptedContents=c,r=r.replaceAll(s,()=>`<ClientOnly><ValaxyDecrypt :encrypted-content="${`$frontmatter.partiallyEncryptedContents[${f++}]`}" /></ClientOnly>`))}if(i.password){let c=r.indexOf("<template>"),f=r.lastIndexOf("</template>"),u=r.slice(c+10,f),m=await Nr(u,{password:i.password,iv:t.iv,salt:t.salt});i.encryptedContent=m,i.encrypt=!0,delete i.password,r=r.replace(u,'<ClientOnly><ValaxyDecrypt :encrypted-content="$frontmatter.encryptedContent" /></ClientOnly>');let y=r.lastIndexOf("<script setup>"),h=r.lastIndexOf("</script>"),_=r.slice(y+14,h);r=r.replace(_,"")}if(i.gallery_password){let c=await Nr(JSON.stringify(i.photos),{password:i.gallery_password,iv:t.iv,salt:t.salt});i.encryptedPhotos=c,delete i.gallery_password,delete i.photos}}return r}}l();var vt=Q(J(),1);import _y from"consola";function Bc(e,t){return e.includes("{%")&&e.includes("%}")&&_y.error(`${`${t}
88
+ `} Please ${(0,vt.red)("remove")} ${(0,vt.cyan)("{% %}")}, because it conflicts with ${(0,vt.yellow)("markdown-it-attrs")}.`),e.replace("{%","{%"),e.replace("%}","%}"),e}l();function qc(e){let t=new Map;return e.replace(/<ValaxyFootnoteItem id="(.*?)">(.*?)<\/ValaxyFootnoteItem>/gs,(r,n,o)=>{let i=o.match(/<ValaxyFootnoteContent>(.*?)<\/ValaxyFootnoteContent>/s)[1].replace(/<ValaxyFootnoteAnchor(?:.*?)>(.*?)<\/ValaxyFootnoteAnchor>/gs,""),s=o.replace(/<ValaxyFootnoteContent>(.*?)<\/ValaxyFootnoteContent>/gs,(a,c)=>c).replace(/<ValaxyFootnoteAnchor(?:.*?)>(.*?)<\/ValaxyFootnoteAnchor>/gs,(a,c)=>c);return t.set(n,i),s}).replace(/<ValaxyFootnoteRef href="#(.*?)"(?:.*?)>(.*?)<\/ValaxyFootnoteRef>/gs,(r,n,o)=>`<ValaxyFootnoteTooltip>${o}<template #popper>${t.get(n)}</template></ValaxyFootnoteTooltip>`)}var Uc=Ry("valaxy:md"),Wc=new by({max:128});function Sy(){return["main-header","main-header-after","main-nav","main-content","main-content-after","main-nav-before","main-nav-after","comment","footer","aside","aside-custom"].map(r=>`<template #${r}><slot name="${r}" /></template>`).join("")}function Fc(e){let t="ValaxyMain";return`
89
+ <${t} :frontmatter="$frontmatter">
90
+ <template #main-content-md>${e}</template>
91
+ ${Sy()}
92
+ <slot />
93
+ </${t}>
94
+ `}async function Gc(e,t){e.pages=e.pages.map(c=>c.replace(/\.md$/,"").replace(/\/index$/,""));let r=Hc(e),n=Nc(e),o=jc(e),i=Ic(e),s=e.userRoot,a=e.mode==="build";return async(c,f)=>{let u=f,m=Cy.relative(s,u),p=i(c,f),y=JSON.stringify({code:c,id:f});if(a){let E=JSON.stringify({code:c,id:f}),V=Wc.get(E);if(V)return Uc(`[cache hit] ${m}`),V}let h=Date.now(),_=await Dc(c,f,e);c=Bc(c,f);let P=Tc(c,f,e),w=P.includes;c=P.code,c=r(c),c=await o(c,f,_),c=qc(c),c=n(c,f,_),Uc(`[render] ${u} in ${Date.now()-h}ms.`);let $={code:c,pageData:_,deadLinks:p,includes:w};return a&&Wc.set(y,$),$}}function ky(e){let t=e.redirects.map(r=>({path:r.from,redirect:r.to}));return e.config.runtimeConfig.redirects={useVueRouter:kt()?e.config.siteConfig.redirects.useVueRouter:!0,redirectRoutes:t},`export default ${JSON.stringify(JSON.stringify(e.config))}`}async function Py(e,t){let r=[];t.config.features?.katex&&(r.push(`import "${U(await be("katex/dist/katex.min.css",!0))}"`),r.push(`import "${U(Lt(t.clientRoot,"styles/third/katex.scss"))}"`));for(let n of e){let o=[];["css-vars","index"].forEach(s=>{o.push(Lt(n,"styles",`${s}.css`)),o.push(Lt(n,"styles",`${s}.scss`))});for(let s of o)It.existsSync(s)&&r.push(`import "${U(s)}"`)}return r.join(`
95
+ `)}function Oy(e){let t=['import { defu } from "defu"','const messages = { "zh-CN": {}, en: {} }'],r=["zh-CN","en"];return e.forEach((n,o)=>{r.forEach(i=>{let s=`${n}/locales/${i}.yml`;if(It.existsSync(s)&&It.readFileSync(s,"utf-8")){let a=i.replace("-","")+o;t.unshift(`import ${a} from "${U(s)}"`),t.push(`messages['${i}'] = defu(${a}, messages['${i}'])`)}})}),t.push("export default messages"),t.join(`
96
+ `)}function Ty(e){let t=e.addons.filter(i=>i.global).filter(i=>It.existsSync(Lt(i.root,"./App.vue"))),r=i=>`Addon${Ay(i)}App`,n=t.map(i=>`import ${r(i.name)} from "${i.name}/App.vue"`).join(`
97
+ `),o=t.map(i=>`{ component: ${r(i.name)}, props: ${JSON.stringify(i.props)} }`).join(",");return`${n}
98
+ export default [${o}]`}var $y='import { defineComponent } from "vue"; export default defineComponent({ render: () => null });';function oi(e){let t=Lt(e,"App.vue");return It.existsSync(t)?[`import AppVue from "${U(t)}"`,"export default AppVue"].join(`
99
+ `):$y}async function zc(e,t={}){let{config:r}=e,n="/@valaxy",o=e.roots,i=!1,s,a;return[{name:"valaxy:loader",enforce:"pre",async configResolved(c){a=c,s=await Gc(e,a)},configureServer(c){c.watcher.add([e.configFile,e.clientRoot,e.themeRoot,e.userRoot])},resolveId(c){return c.startsWith(n)?c:null},async load(c){if(c==="/@valaxyjs/config")return ky(e);if(c==="/@valaxyjs/context")return`export default ${JSON.stringify(JSON.stringify({userRoot:e.userRoot}))}`;if(c==="/@valaxyjs/styles")return await Py(o,e);if(c==="/@valaxyjs/locales")return Oy(o);if(c==="/@valaxyjs/addons")return Ty(e);if(c==="/@valaxyjs/AppVue")return oi(e.clientRoot);if(c==="/@valaxyjs/UserAppVue")return oi(e.userRoot);if(c==="/@valaxyjs/ThemeAppVue")return oi(e.themeRoot);if(c.startsWith(n))return{code:"",map:{mappings:""}}},async transform(c,f){if(f.endsWith(".md")){let{code:u,deadLinks:m,includes:p}=await s(c,f);return m.length&&(i=!0,Kc.error(`Dead links found in ${f}`),Kc.error(m)),p.length&&p.forEach(y=>{this.addWatchFile(y)}),u}},renderStart(){if(i&&!(r.ignoreDeadLinks||r.build.ignoreDeadLinks))throw new Error("One or more pages contain dead links.")},async handleHotUpdate(c){let{file:f,server:u,read:m}=c,p=h=>{t.onConfigReload?.(h,e.config),Object.assign(e.config,h),r=h;let _=["/@valaxyjs/config","/@valaxyjs/context"];return[...Array.from(_).map(w=>u.moduleGraph.getModuleById(w))].filter(w=>!!w)};if([e.configFile].includes(f)){let{config:h}=await ue({userRoot:e.userRoot});return p(h)}if(f===e.siteConfigFile){let{siteConfig:h}=await Rr(e.userRoot);return r.siteConfig=Pt(h,br),p(r)}if(f===e.themeConfigFile){let{themeConfig:h}=await hl(e),_=r.themeConfig.pkg;return h.pkg=_,r.themeConfig=h,p(r)}if(f===Ey(e.themeRoot,"valaxy.config.ts")){let h=await Io(e),_=Xe(e.config,h),{config:P}=await Lo(e,_);return p(P)}if(f.endsWith(".md")){let h=Ie(),_=await m(),{code:P,pageData:w}=await s(_,f),E={path:`/${wy(`${e.userRoot}/pages`,f)}`,pageData:w};u.hot.send({type:"custom",event:"valaxy:pageData",data:E}),gt.success(`${(0,Fr.yellow)("[HMR]")} ${f} ${(0,Fr.dim)(`updated in ${h()}`)}`),c.read=()=>P}}}]}async function Nt(e,t={}){let{options:r}=e,{roots:n,config:o}=r,i=await Mc(r),s=await zc(r,t),a=[i,zl(r),Yl(r),Vy({include:[/\.vue$/,/\.md$/],exclude:[],template:{compilerOptions:{isCustomElement:c=>{let f=rl.has(c);return o.vue?.isCustomElement?.forEach(u=>{f=f||u(c)}),f}}},...o.vue}),s,Ny(),await Lc(e),My({layoutsDirs:n.map(c=>`${c}/layouts`),...o.layouts}),Ly({extensions:["vue","md"],include:[/\.vue$/,/\.vue\?vue/,/\.md$/],exclude:[],allowOverrides:!0,dirs:n.map(c=>`${c}/components`).concat(["src/components","components"]),dts:Fy(r.tempDir,"components.d.ts"),...o.components}),await Ul(r),Iy({runtimeOnly:!0,compositionOnly:!0,include:n.map(c=>`${c}/locales/**`),jitCompilation:!1}),Xl(r)];if(o.visualizer)try{let c=(await import("rollup-plugin-visualizer")).visualizer;a.push(c({open:!0,gzipSize:!0,...o.visualizer}))}catch{console.error("Failed to load rollup-plugin-visualizer"),Yc.error("Please install `rollup-plugin-visualizer` to enable the feature"),console.log(),Yc.info("pnpm add -D rollup-plugin-visualizer"),console.log()}return a}async function eu(e,t=ut){let r=Jc(t,{...ut,plugins:await Nt(e)});await Dy(r)}async function tu(e,t={}){let{options:r}=e,n={...ut,plugins:await Nt(e),ssr:{noExternal:["workbox-window",/vue-i18n/,"@vue/devtools-api"]}};n.ssgOptions={script:"async",formatting:"minify",crittersOptions:{reduceInlineStyles:!1},onFinished(){jy({hostname:r.config.siteConfig.url})}},r.config.build.ssgForPagination&&(n.ssgOptions.includedRoutes=(i,s)=>{let a=i,c=i.filter(u=>u.startsWith("/posts/")),f=Math.ceil(c.length/r.config.siteConfig.pageSize);Hr.info(`Generate ${Zc.default.yellow(f)} pages for pagination.`);for(let u=1;u<=f;u++)a.push(`/page/${u}`);return r.config.vite?.ssgOptions?.includeAllRoutes?a:a.filter(u=>!u.split("/").some(m=>m.startsWith(":")))});let o=Jc(n,t);await Hy({},o)}async function ru(e){let{userRoot:t}=e,r=Qc(t,"dist/index.html");if(Dr.existsSync(r)){Hr.info("post process for ssg...");let n=await Dr.readFile(r,"utf-8"),o="</html>";if(!n.endsWith(o)){Hr.warn("fix incomplete index.html...");let i=n.lastIndexOf(o);await Dr.writeFile(r,n.slice(0,i+o.length),"utf-8")}}e.config.siteConfig.redirects?.useVueRouter||await By(e)}async function By(e){Hr.info("generate client redirects...");let t=Qc(e.userRoot,"dist"),n=kr(e.redirects).map(async o=>{let i=Xc(t,`${o.from}.html`),s=Xc(t,`${o.to}.html`);if(!await Dr.pathExists(s))throw new Error(`the route of '${o.to}' not exists`);await wl(o.to,i)});await Promise.all(n)}l();l();l();l();import nu from"node:process";import{createServer as qy,mergeConfig as Uy}from"vite";async function ou(e,t={},r={}){nu.env.EDITOR=nu.env.EDITOR||"code";let{options:n}=e,o=await Nt(e,r),i=n.mode==="dev"&&n.config.devtools,s=[...o];i&&s.push((await import("vite-plugin-vue-devtools")).default(),(await import("@valaxyjs/devtools")).default());let a=Uy(t,{plugins:s});return await qy(a)}l();l();import{createHooks as Wy}from"hookable";var Gy=["build:before","build:after"];function jr(e){let t=Wy();typeof e.config.hooks=="object"&&Object.keys(e.config.hooks).forEach(n=>{let o=n,i=e.config.hooks[o];typeof i=="function"&&(Gy.includes(o)?e.mode==="build"&&t.hook(o,i):t.hook(o,i))});let r={version:tt,hooks:t,hook:t.hook,options:e};return e.addons.forEach(n=>{typeof n.setup=="function"&&n.setup(r)}),r}l();var N=Q(J(),1);import*as iu from"node:readline";import Ky from"node:path";import zy from"node:os";import qe from"node:process";import Yy from"consola";import{mergeConfig as Xy}from"vite";var Br;function qr(e,t,r){let n=(0,N.blue)(`v${e.config.themeConfig?.pkg?.version}`)||"unknown";if(console.log(),console.log(` ${(0,N.bold)("\u{1F30C} Valaxy")} ${(0,N.blue)(`v${tt}`)}`),console.log(),console.log(`${(0,N.dim)(" \u{1FA90} theme ")} > ${e.theme?(0,N.green)(e.theme):(0,N.gray)("none")} (${n})`),console.log(` ${(0,N.dim)("\u{1F4C1}")} ${(0,N.dim)(Ky.resolve(e.userRoot))}`),t){console.log(),console.log(`${(0,N.dim)(" Preview ")} > ${(0,N.cyan)(`http://localhost:${(0,N.bold)(t)}/`)}`),r&&Object.values(zy.networkInterfaces()).forEach(f=>(f||[]).filter(u=>u.family==="IPv4"&&!u.address.includes("127.0.0.1")).forEach(({address:u})=>{console.log(`${(0,N.dim)(" Network ")} > ${(0,N.blue)(`http://${u}:${(0,N.bold)(t)}/`)}`)})),console.log();let o=`${(0,N.underline)("r")}${(0,N.dim)("estart")}`,i=`${(0,N.underline)("e")}${(0,N.dim)("dit")}`,s=`${(0,N.underline)("o")}${(0,N.dim)("pen")}`,a=`${(0,N.underline)("q")}${(0,N.dim)("r")}`,c=`${(0,N.dim)(" | ")}`;console.log(`${(0,N.dim)(" shortcuts ")} > ${o}${c}${s}${c}${a}${c}${i}`)}console.log()}async function Ft(e,t){Br&&(gt.info("close server..."),await Br.close());let{options:r}=e,n=Xy(await Vr(r,"serve"),t);try{Br=await ou(e,n,{async onConfigReload(o,i,s=!1){s&&(gt.info(`${(0,N.yellow)("force")} reload the server`),Ft(e,t));let a=!1;o.theme!==i.theme&&(a=!0),a&&Ft(e,t)}}),await Br.listen(),gt.ready("server ready")}catch(o){Yy.error(`failed to start server. error:
100
+ `),console.error(o),qe.exit(1)}}function su(e){qe.stdin.resume(),qe.stdin.setEncoding("utf8"),iu.emitKeypressEvents(qe.stdin),qe.stdin.isTTY&&qe.stdin.setRawMode(!0),qe.stdin.on("keypress",(t,r)=>{if(r.ctrl&&r.name==="c")qe.exit();else{let[n]=e.filter(o=>o.name===t);if(n)try{n.action()}catch(o){console.error(`Failed to execute shortcut ${n.fullName}`,o)}}})}async function si({ssg:e,root:t,output:r,log:n}){dt(),Cr(t)||Qy.exit(0);let o=ii.resolve(t),i=await ue({userRoot:o},"build");qr(i);let s=jr(i);Ue.start(`Run ${(0,_t.yellow)("options:resolved")} hooks`),await s.hooks.callHook("options:resolved");let a=[];i.config.siteConfig.search.type==="fuse"&&a.push(Tr),i.config.modules.rss.enable&&a.push(Or),Tl(s,a);let c=au(await Vr(i,"build"),i.config.vite||{}),f=au(c,{configFile:ii.resolve(i.clientRoot,"vite.config.ts"),build:{emptyOutDir:!0,outDir:ii.resolve(i.userRoot,r)},logLevel:n});Ue.start(`Run ${(0,_t.yellow)("config:init")} hooks`),await s.hooks.callHook("config:init"),Ue.start(`Run ${(0,_t.yellow)("build:before")} hooks`),await s.hooks.callHook("build:before"),Ue.box("\u{1F320} Start building...");try{if(e){Ue.info(`use ${(0,_t.yellow)("vite-ssg")} to do ssg build...`);try{await tu(s,f),await ru(i)}catch(u){Ue.error("[vite-ssg] An internal error occurred."),console.log(u)}}else Ue.info("use vite do spa build..."),await eu(s,f)}catch(u){console.log(u)}finally{Ue.start(`Run ${(0,_t.yellow)("build:after")} hooks`),await s.hooks.callHook("build:after")}}function lu(e){e.command("build [root]","build your blog to static content",t=>Fe(t).option("ssg",{alias:"s",type:"boolean",default:!1,describe:"static site generate"}).option("output",{alias:"o",type:"string",default:"dist",describe:"output dir"}).option("log",{default:"warn",type:"string",choices:["error","warn","info","silent"],describe:"log level"}).strict().help(),async({ssg:t,root:r,output:n,log:o})=>{await si({ssg:t,root:r,output:n,log:o})})}l();import ex from"node:path";import{exec as tx}from"node:child_process";import rx from"node:process";import nx from"node:os";import{mergeConfig as ox}from"vite";import ix from"qrcode";l();import Jy from"node:net";async function ai(e){return await Zy(e)?e:await ai(e+1)}function Zy(e){return new Promise(t=>{let r=Jy.createServer(n=>{n.write(`Echo server\r
101
+ `),n.pipe(n)});r.listen(e,"0.0.0.0"),r.on("error",()=>{t(!1)}),r.on("listening",()=>{r.close(),t(!0)})})}function cu(e){e.command("* [root]","Start a local server for Valaxy",t=>Fe(t).option("port",{alias:"p",type:"number",describe:"port"}).option("open",{alias:"o",default:!1,type:"boolean",describe:"open in browser"}).option("remote",{default:!0,type:"boolean",describe:"listen public host and enable remote control"}).option("log",{default:"info",type:"string",choices:["error","warn","info","silent"],describe:"log level"}).strict().help(),async({root:t,port:r,open:n,remote:o,log:i})=>{Vo(),Cr(t)||rx.exit(0);let s=r||await ai(4859),a=await ue({userRoot:t}),c=jr(a),f=ox({...ut,configFile:ex.resolve(a.clientRoot,"vite.config.ts"),server:{watch:{ignored:[`!${a.themeRoot}/**`,`${a.userRoot}/**.md`]},port:s,strictPort:!0,open:n,host:o?"0.0.0.0":"localhost"},logLevel:i},a.config.vite||{});await Ft(c,f),qr(a,s,o),su([{name:"r",fullName:"restart",action(){Ft(c,f)}},{name:"o",fullName:"open",async action(){let{default:m}=await import("open");m(`http://localhost:${s}`)}},{name:"q",fullName:"qr",action(){let p=`http://${Object.values(nx.networkInterfaces()).flat().filter(y=>y?.family==="IPv4"&&!y.address.includes("127.0.0.1"))[0]?.address||"localhost"}:${s}`;ix.toString(p,{type:"terminal"},(y,h)=>{if(y)throw y;console.log(h)})}},{name:"e",fullName:"edit",action(){tx(`code "${t}"`)}}])})}l();import uu from"node:path";import fu from"node:process";import pu from"fs-extra";import de from"consola";async function sx(){let e=uu.join(fu.cwd(),"dist"),t=uu.join(fu.cwd(),".valaxy");if(de.box("\u{1F9F9} Starting clean..."),await Je(e)){de.info("dist directory exists, removing...");try{await pu.rm(e,{recursive:!0,force:!0}),de.success("dist directory has been successfully removed.")}catch(r){de.error("Failed to remove dist directory."),de.error(r)}}else de.info("No dist directory found, nothing to clean.");if(await Je(t)){de.info(".valaxy cache directory exists, removing...");try{await pu.rm(t,{recursive:!0,force:!0}),de.success(".valaxy cache directory has been successfully removed.")}catch(r){de.error("Failed to remove .valaxy cache directory."),de.error(r)}}else de.info("No .valaxy cache directory found, nothing to clean.")}function mu(e){e.command("clean","Clean the dist folder and cache",()=>{},async()=>{await sx()})}l();import ax from"node:process";import{confirm as du,intro as lx,outro as gu,select as cx}from"@clack/prompts";function hu(e){e.command("deploy","deploy your blog to the cloud",async()=>{if(lx("Deploying Your Blog"),await du({message:"Do you want to build your blog before deploying?"})&&await si({ssg:!0,root:ax.cwd(),output:"dist",log:"info"}),await cx({message:"Where do you want to deploy?",options:[{label:"GitHub Pages",value:"gh-pages",hint:"You need install `gh-pages` dependencies."},{label:"Your Own Server",value:"server"}]})==="gh-pages"){let n=!1;try{await import("gh-pages"),n=!0}catch(o){console.error(o),await du({message:"Do you want to install `gh-pages` now?"})?(await import("@antfu/install-pkg").then(s=>s.installPackage("gh-pages",{dev:!0})),n=!0):gu("Please install `gh-pages` before deploying to GitHub Pages.")}if(n){let{publish:o}=await import("gh-pages");await o("dist",{branch:"gh-pages",message:"chore: deploy by valaxy"}),gu("Done!")}}})}l();import ux from"consola";function yu(e){e.command("debug","Debug your blog",async()=>{ux.info("\u63D0\u95EE\u524D\u8BF7\u643A\u5E26\u4EE5\u4E0B\u4FE1\u606F\uFF1A")})}var Ae=px(mx(fx.argv)).scriptName("valaxy").usage("$0 [args]").version(tt).showHelpOnFail(!1).alias("h","help").alias("v","version");cu(Ae);lu(Ae);Hl(Ae);mu(Ae);hu(Ae);yu(Ae);Ae.help();var dx=[Tr,Or];dx.forEach(e=>{e.extendCli?.(Ae)});function UO(){Ae.parse()}export{Et as a,el as b,ct as c,tl as d,cb as e,rl as f,ut as g,To as h,be as i,il as j,Md as k,$o as l,U as m,sl as n,al as o,Hd as p,ft as q,br as r,qb as s,qd as t,Rr as u,fl as v,zd as w,eR as x,At as y,Xe as z,pl as A,Qd as B,sR as C,ml as D,Sr as E,hl as F,rg as G,RR as H,wR as I,Lo as J,ue as K,Io as L,Vr as M,Wl as N,zc as O,Nt as P,eu as Q,tu as R,ru as S,By as T,ou as U,Ae as V,UO as W};
102
+ /*! Bundled license information:
103
+
104
+ is-extglob/index.js:
105
+ (*!
106
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
107
+ *
108
+ * Copyright (c) 2014-2016, Jon Schlinkert.
109
+ * Licensed under the MIT License.
110
+ *)
111
+
112
+ is-glob/index.js:
113
+ (*!
114
+ * is-glob <https://github.com/jonschlinkert/is-glob>
115
+ *
116
+ * Copyright (c) 2014-2017, Jon Schlinkert.
117
+ * Released under the MIT License.
118
+ *)
119
+
120
+ is-number/index.js:
121
+ (*!
122
+ * is-number <https://github.com/jonschlinkert/is-number>
123
+ *
124
+ * Copyright (c) 2014-present, Jon Schlinkert.
125
+ * Released under the MIT License.
126
+ *)
127
+
128
+ to-regex-range/index.js:
129
+ (*!
130
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
131
+ *
132
+ * Copyright (c) 2015-present, Jon Schlinkert.
133
+ * Released under the MIT License.
134
+ *)
135
+
136
+ fill-range/index.js:
137
+ (*!
138
+ * fill-range <https://github.com/jonschlinkert/fill-range>
139
+ *
140
+ * Copyright (c) 2014-present, Jon Schlinkert.
141
+ * Licensed under the MIT License.
142
+ *)
143
+
144
+ queue-microtask/index.js:
145
+ (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
146
+
147
+ run-parallel/index.js:
148
+ (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
149
+
150
+ @mdit-vue/shared/dist/index.mjs:
151
+ (* istanbul ignore if -- @preserve *)
152
+
153
+ @mdit-vue/plugin-sfc/dist/index.mjs:
154
+ (* istanbul ignore if -- @preserve *)
155
+ */
@@ -377,6 +377,8 @@ interface SiteConfig {
377
377
  /**
378
378
  * alternative languages
379
379
  * @description 可选语言
380
+ * @en If you want to disable multi-language support for your site, you can set this to only include one language (e.g. `['en']`)
381
+ * @zh 如果你想要禁言站点的多语言支持,可以将此项设置为仅包含一个语言 (例如 `['zh-CN']`)
380
382
  * @default ['en', 'zh-CN']
381
383
  * @see https://ogp.me/#optional
382
384
  */
@@ -686,6 +688,8 @@ interface ValaxyConfig<ThemeConfig = DefaultTheme.Config> {
686
688
  /**
687
689
  * The name of theme
688
690
  * @description 主题名称
691
+ * @see 主题橱窗 [Valaxy Themes Gallery](https://valaxy.site/themes/gallery)
692
+ * @see 如何编写主题? [How to write a theme? | Valaxy](https://valaxy.site/themes/write)
689
693
  */
690
694
  theme: string;
691
695
  /**
@@ -696,7 +700,8 @@ interface ValaxyConfig<ThemeConfig = DefaultTheme.Config> {
696
700
  pkg: Pkg;
697
701
  };
698
702
  /**
699
- * generated by runtime
703
+ * @en Generated in runtime, do not modify manually
704
+ * @zh 在运行时生成,请勿手动修改
700
705
  */
701
706
  runtimeConfig: RuntimeConfig;
702
707
  }
@@ -377,6 +377,8 @@ interface SiteConfig {
377
377
  /**
378
378
  * alternative languages
379
379
  * @description 可选语言
380
+ * @en If you want to disable multi-language support for your site, you can set this to only include one language (e.g. `['en']`)
381
+ * @zh 如果你想要禁言站点的多语言支持,可以将此项设置为仅包含一个语言 (例如 `['zh-CN']`)
380
382
  * @default ['en', 'zh-CN']
381
383
  * @see https://ogp.me/#optional
382
384
  */
@@ -686,6 +688,8 @@ interface ValaxyConfig<ThemeConfig = DefaultTheme.Config> {
686
688
  /**
687
689
  * The name of theme
688
690
  * @description 主题名称
691
+ * @see 主题橱窗 [Valaxy Themes Gallery](https://valaxy.site/themes/gallery)
692
+ * @see 如何编写主题? [How to write a theme? | Valaxy](https://valaxy.site/themes/write)
689
693
  */
690
694
  theme: string;
691
695
  /**
@@ -696,7 +700,8 @@ interface ValaxyConfig<ThemeConfig = DefaultTheme.Config> {
696
700
  pkg: Pkg;
697
701
  };
698
702
  /**
699
- * generated by runtime
703
+ * @en Generated in runtime, do not modify manually
704
+ * @zh 在运行时生成,请勿手动修改
700
705
  */
701
706
  runtimeConfig: RuntimeConfig;
702
707
  }