valaxy 0.17.5 → 0.18.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/client/components/ValaxyMd.vue +1 -4
  2. package/client/components/builtin/ValaxyMermaid.vue +86 -0
  3. package/client/components/internals/ShadowRoot.vue +24 -0
  4. package/client/composables/common.ts +4 -2
  5. package/client/composables/dark.ts +3 -2
  6. package/client/composables/post.ts +5 -6
  7. package/client/constants/index.ts +0 -0
  8. package/client/modules/mermaid.ts +26 -0
  9. package/client/setup/mermaid.ts +15 -0
  10. package/client/setups.ts +8 -0
  11. package/client/stores/index.ts +1 -0
  12. package/client/stores/router.ts +10 -0
  13. package/client/stores/site.ts +8 -6
  14. package/client/types/index.ts +3 -0
  15. package/client/utils/code.ts +24 -0
  16. package/client/utils/index.ts +1 -0
  17. package/client/utils/time.ts +0 -6
  18. package/dist/chunk-AQGELPBR.mjs +142 -0
  19. package/dist/chunk-GO3LEXT4.cjs +141 -0
  20. package/dist/{config-hM2lXH4J.d.cts → config-qoiMoYQY.d.cts} +0 -6
  21. package/dist/{config-hM2lXH4J.d.ts → config-qoiMoYQY.d.ts} +0 -6
  22. package/dist/node/cli/index.cjs +1 -1
  23. package/dist/node/cli/index.mjs +1 -1
  24. package/dist/node/index.cjs +1 -1
  25. package/dist/node/index.d.cts +50 -23
  26. package/dist/node/index.d.ts +50 -23
  27. package/dist/node/index.mjs +1 -1
  28. package/dist/types/index.cjs +1 -1
  29. package/dist/types/index.d.cts +2 -2
  30. package/dist/types/index.d.ts +2 -2
  31. package/dist/types/index.mjs +1 -1
  32. package/package.json +11 -9
  33. package/shims.d.ts +7 -1
  34. package/types/config.ts +0 -8
  35. package/types/data.ts +0 -1
  36. package/dist/chunk-CBD6N7G5.cjs +0 -145
  37. package/dist/chunk-YJCKNZWO.mjs +0 -146
  38. /package/dist/{chunk-R4WV6S3O.mjs → chunk-MJRGR35B.mjs} +0 -0
  39. /package/dist/{chunk-FNMRWIFM.cjs → chunk-RWOIGW5M.cjs} +0 -0
@@ -1,146 +0,0 @@
1
- import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{a as G,b as S,c as J,d as l}from"./chunk-R4WV6S3O.mjs";var pe=S((_1,hn)=>{"use strict";l();var Bf=G("tty"),Uf=!("NO_COLOR"in process.env||process.argv.includes("--no-color"))&&("FORCE_COLOR"in process.env||process.argv.includes("--color")||process.platform==="win32"||Bf.isatty(1)&&process.env.TERM!=="dumb"||"CI"in process.env),X=(e,t,r=e)=>n=>{let o=""+n,i=o.indexOf(t,e.length);return~i?e+ji(o,t,r,i)+t:e+o+t},ji=(e,t,r,n)=>{let o=e.substring(0,n)+r,i=e.substring(n+t.length),s=i.indexOf(t);return~s?o+ji(i,t,r,s):o+i},qi=(e=Uf)=>({isColorSupported:e,reset:e?t=>`\x1B[0m${t}\x1B[0m`:String,bold:e?X("\x1B[1m","\x1B[22m","\x1B[22m\x1B[1m"):String,dim:e?X("\x1B[2m","\x1B[22m","\x1B[22m\x1B[2m"):String,italic:e?X("\x1B[3m","\x1B[23m"):String,underline:e?X("\x1B[4m","\x1B[24m"):String,inverse:e?X("\x1B[7m","\x1B[27m"):String,hidden:e?X("\x1B[8m","\x1B[28m"):String,strikethrough:e?X("\x1B[9m","\x1B[29m"):String,black:e?X("\x1B[30m","\x1B[39m"):String,red:e?X("\x1B[31m","\x1B[39m"):String,green:e?X("\x1B[32m","\x1B[39m"):String,yellow:e?X("\x1B[33m","\x1B[39m"):String,blue:e?X("\x1B[34m","\x1B[39m"):String,magenta:e?X("\x1B[35m","\x1B[39m"):String,cyan:e?X("\x1B[36m","\x1B[39m"):String,white:e?X("\x1B[37m","\x1B[39m"):String,gray:e?X("\x1B[90m","\x1B[39m"):String,bgBlack:e?X("\x1B[40m","\x1B[49m"):String,bgRed:e?X("\x1B[41m","\x1B[49m"):String,bgGreen:e?X("\x1B[42m","\x1B[49m"):String,bgYellow:e?X("\x1B[43m","\x1B[49m"):String,bgBlue:e?X("\x1B[44m","\x1B[49m"):String,bgMagenta:e?X("\x1B[45m","\x1B[49m"):String,bgCyan:e?X("\x1B[46m","\x1B[49m"):String,bgWhite:e?X("\x1B[47m","\x1B[49m"):String});hn.exports=qi();hn.exports.createColors=qi});var Bi=S(yt=>{"use strict";l();Object.defineProperty(yt,"__esModule",{value:!0});yt.splitWhen=yt.flatten=void 0;function Gf(e){return e.reduce((t,r)=>[].concat(t,r),[])}yt.flatten=Gf;function Wf(e,t){let r=[[]],n=0;for(let o of e)t(o)?(n++,r[n]=[]):r[n].push(o);return r}yt.splitWhen=Wf});var Ui=S(cr=>{"use strict";l();Object.defineProperty(cr,"__esModule",{value:!0});cr.isEnoentCodeError=void 0;function zf(e){return e.code==="ENOENT"}cr.isEnoentCodeError=zf});var Gi=S(lr=>{"use strict";l();Object.defineProperty(lr,"__esModule",{value:!0});lr.createDirentFromStats=void 0;var yn=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 Kf(e,t){return new yn(e,t)}lr.createDirentFromStats=Kf});var Yi=S(ne=>{"use strict";l();Object.defineProperty(ne,"__esModule",{value:!0});ne.convertPosixPathToPattern=ne.convertWindowsPathToPattern=ne.convertPathToPattern=ne.escapePosixPath=ne.escapeWindowsPath=ne.escape=ne.removeLeadingDotSegment=ne.makeAbsolute=ne.unixify=void 0;var Yf=G("os"),Xf=G("path"),Wi=Yf.platform()==="win32",Qf=2,Zf=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,Jf=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,ep=/^\\\\([.?])/,tp=/\\(?![!()+@[\]{}])/g;function rp(e){return e.replace(/\\/g,"/")}ne.unixify=rp;function np(e,t){return Xf.resolve(e,t)}ne.makeAbsolute=np;function op(e){if(e.charAt(0)==="."){let t=e.charAt(1);if(t==="/"||t==="\\")return e.slice(Qf)}return e}ne.removeLeadingDotSegment=op;ne.escape=Wi?vn:_n;function vn(e){return e.replace(Jf,"\\$2")}ne.escapeWindowsPath=vn;function _n(e){return e.replace(Zf,"\\$2")}ne.escapePosixPath=_n;ne.convertPathToPattern=Wi?zi:Ki;function zi(e){return vn(e).replace(ep,"//$1").replace(tp,"/")}ne.convertWindowsPathToPattern=zi;function Ki(e){return _n(e)}ne.convertPosixPathToPattern=Ki});var Qi=S((P1,Xi)=>{"use strict";l();Xi.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 es=S((T1,Ji)=>{"use strict";l();var ip=Qi(),Zi={"{":"}","(":")","[":"]"},sp=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 u=Zi[a];if(u){var f=e.indexOf(u,t);f!==-1&&(t=f+1)}if(e[t]==="!")return!0}else t++}return!1},ap=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=Zi[r];if(n){var o=e.indexOf(n,t);o!==-1&&(t=o+1)}if(e[t]==="!")return!0}else t++}return!1};Ji.exports=function(t,r){if(typeof t!="string"||t==="")return!1;if(ip(t))return!0;var n=sp;return r&&r.strict===!1&&(n=ap),n(t)}});var rs=S((F1,ts)=>{"use strict";l();var cp=es(),lp=G("path").posix.dirname,up=G("os").platform()==="win32",xn="/",fp=/\\/g,pp=/[\{\[].*[\}\]]$/,dp=/(^|[^\\])([\{\[]|\([^\)]+$)/,mp=/\\([\!\*\?\|\[\]\(\)\{\}])/g;ts.exports=function(t,r){var n=Object.assign({flipBackslashes:!0},r);n.flipBackslashes&&up&&t.indexOf(xn)<0&&(t=t.replace(fp,xn)),pp.test(t)&&(t+=xn),t+="a";do t=lp(t);while(cp(t)||dp.test(t));return t.replace(mp,"$1")}});var ur=S(be=>{"use strict";l();be.isInteger=e=>typeof e=="number"?Number.isInteger(e):typeof e=="string"&&e.trim()!==""?Number.isInteger(Number(e)):!1;be.find=(e,t)=>e.nodes.find(r=>r.type===t);be.exceedsLimit=(e,t,r=1,n)=>n===!1||!be.isInteger(e)||!be.isInteger(t)?!1:(Number(t)-Number(e))/Number(r)>=n;be.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)};be.encloseBrace=e=>e.type!=="brace"||e.commas>>0+e.ranges>>0?!1:(e.invalid=!0,!0);be.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;be.isOpenOrClose=e=>e.type==="open"||e.type==="close"?!0:e.open===!0||e.close===!0;be.reduce=e=>e.reduce((t,r)=>(r.type==="text"&&t.push(r.value),r.type==="range"&&(r.type="text"),t),[]);be.flatten=(...e)=>{let t=[],r=n=>{for(let o=0;o<n.length;o++){let i=n[o];Array.isArray(i)?r(i,t):i!==void 0&&t.push(i)}return t};return r(e),t}});var fr=S((N1,os)=>{"use strict";l();var ns=ur();os.exports=(e,t={})=>{let r=(n,o={})=>{let i=t.escapeInvalid&&ns.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a="";if(n.value)return(i||s)&&ns.isOpenOrClose(n)?"\\"+n.value:n.value;if(n.value)return n.value;if(n.nodes)for(let u of n.nodes)a+=r(u);return a};return r(e)}});var ss=S((V1,is)=>{"use strict";l();is.exports=function(e){return typeof e=="number"?e-e===0:typeof e=="string"&&e.trim()!==""?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}});var gs=S((j1,ms)=>{"use strict";l();var as=ss(),ot=(e,t,r)=>{if(as(e)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(t===void 0||e===t)return String(e);if(as(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),u=e+":"+t+"="+o+i+s+a;if(ot.cache.hasOwnProperty(u))return ot.cache[u].result;let f=Math.min(e,t),c=Math.max(e,t);if(Math.abs(f-c)===1){let C=e+"|"+t;return n.capture?`(${C})`:n.wrap===!1?C:`(?:${C})`}let d=ds(e)||ds(t),p={min:e,max:t,a:f,b:c},_=[],x=[];if(d&&(p.isPadded=d,p.maxLen=String(p.max).length),f<0){let C=c<0?Math.abs(c):1;x=cs(C,Math.abs(f),p,n),f=p.a=0}return c>=0&&(_=cs(f,c,p,n)),p.negatives=x,p.positives=_,p.result=gp(x,_,n),n.capture===!0?p.result=`(${p.result})`:n.wrap!==!1&&_.length+x.length>1&&(p.result=`(?:${p.result})`),ot.cache[u]=p,p.result};function gp(e,t,r){let n=Cn(e,t,"-",!1,r)||[],o=Cn(t,e,"",!1,r)||[],i=Cn(e,t,"-?",!0,r)||[];return n.concat(i).concat(o).join("|")}function hp(e,t){let r=1,n=1,o=us(e,r),i=new Set([t]);for(;e<=o&&o<=t;)i.add(o),r+=1,o=us(e,r);for(o=fs(t+1,n)-1;e<o&&o<=t;)i.add(o),n+=1,o=fs(t+1,n)-1;return i=[...i],i.sort(_p),i}function yp(e,t,r){if(e===t)return{pattern:e,count:[],digits:0};let n=vp(e,t),o=n.length,i="",s=0;for(let a=0;a<o;a++){let[u,f]=n[a];u===f?i+=u:u!=="0"||f!=="9"?i+=xp(u,f,r):s++}return s&&(i+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:i,count:[s],digits:o}}function cs(e,t,r,n){let o=hp(e,t),i=[],s=e,a;for(let u=0;u<o.length;u++){let f=o[u],c=yp(String(s),String(f),n),d="";if(!r.isPadded&&a&&a.pattern===c.pattern){a.count.length>1&&a.count.pop(),a.count.push(c.count[0]),a.string=a.pattern+ps(a.count),s=f+1;continue}r.isPadded&&(d=Cp(f,r,n)),c.string=d+c.pattern+ps(c.count),i.push(c),s=f+1,a=c}return i}function Cn(e,t,r,n,o){let i=[];for(let s of e){let{string:a}=s;!n&&!ls(t,"string",a)&&i.push(r+a),n&&ls(t,"string",a)&&i.push(r+a)}return i}function vp(e,t){let r=[];for(let n=0;n<e.length;n++)r.push([e[n],t[n]]);return r}function _p(e,t){return e>t?1:t>e?-1:0}function ls(e,t,r){return e.some(n=>n[t]===r)}function us(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function fs(e,t){return e-e%Math.pow(10,t)}function ps(e){let[t=0,r=""]=e;return r||t>1?`{${t+(r?","+r:"")}}`:""}function xp(e,t,r){return`[${e}${t-e===1?"":"-"}${t}]`}function ds(e){return/^-?(0+)\d/.test(e)}function Cp(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}}`}}ot.cache={};ot.clearCache=()=>ot.cache={};ms.exports=ot});var Rn=S((B1,Ss)=>{"use strict";l();var bp=G("util"),vs=gs(),hs=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Sp=e=>t=>e===!0?Number(t):String(t),bn=e=>typeof e=="number"||typeof e=="string"&&e!=="",Dt=e=>Number.isInteger(+e),Sn=e=>{let t=`${e}`,r=-1;if(t[0]==="-"&&(t=t.slice(1)),t==="0")return!1;for(;t[++r]==="0";);return r>0},Rp=(e,t,r)=>typeof e=="string"||typeof t=="string"?!0:r.stringify===!0,wp=(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},ys=(e,t)=>{let r=e[0]==="-"?"-":"";for(r&&(e=e.slice(1),t--);e.length<t;)e="0"+e;return r?"-"+e:e},Ep=(e,t)=>{e.negatives.sort((s,a)=>s<a?-1:s>a?1:0),e.positives.sort((s,a)=>s<a?-1:s>a?1:0);let r=t.capture?"":"?:",n="",o="",i;return e.positives.length&&(n=e.positives.join("|")),e.negatives.length&&(o=`-(${r}${e.negatives.join("|")})`),n&&o?i=`${n}|${o}`:i=n||o,t.wrap?`(${r}${i})`:i},_s=(e,t,r,n)=>{if(r)return vs(e,t,{wrap:!1,...n});let o=String.fromCharCode(e);if(e===t)return o;let i=String.fromCharCode(t);return`[${o}-${i}]`},xs=(e,t,r)=>{if(Array.isArray(e)){let n=r.wrap===!0,o=r.capture?"":"?:";return n?`(${o}${e.join("|")})`:e.join("|")}return vs(e,t,r)},Cs=(...e)=>new RangeError("Invalid range arguments: "+bp.inspect(...e)),bs=(e,t,r)=>{if(r.strictRanges===!0)throw Cs([e,t]);return[]},Ap=(e,t)=>{if(t.strictRanges===!0)throw new TypeError(`Expected step "${e}" to be a number`);return[]},kp=(e,t,r=1,n={})=>{let o=Number(e),i=Number(t);if(!Number.isInteger(o)||!Number.isInteger(i)){if(n.strictRanges===!0)throw Cs([e,t]);return[]}o===0&&(o=0),i===0&&(i=0);let s=o>i,a=String(e),u=String(t),f=String(r);r=Math.max(Math.abs(r),1);let c=Sn(a)||Sn(u)||Sn(f),d=c?Math.max(a.length,u.length,f.length):0,p=c===!1&&Rp(e,t,n)===!1,_=n.transform||Sp(p);if(n.toRegex&&r===1)return _s(ys(e,d),ys(t,d),!0,n);let x={negatives:[],positives:[]},C=k=>x[k<0?"negatives":"positives"].push(Math.abs(k)),b=[],A=0;for(;s?o>=i:o<=i;)n.toRegex===!0&&r>1?C(o):b.push(wp(_(o,A),d,p)),o=s?o-r:o+r,A++;return n.toRegex===!0?r>1?Ep(x,n):xs(b,null,{wrap:!1,...n}):b},Pp=(e,t,r=1,n={})=>{if(!Dt(e)&&e.length>1||!Dt(t)&&t.length>1)return bs(e,t,n);let o=n.transform||(p=>String.fromCharCode(p)),i=`${e}`.charCodeAt(0),s=`${t}`.charCodeAt(0),a=i>s,u=Math.min(i,s),f=Math.max(i,s);if(n.toRegex&&r===1)return _s(u,f,!1,n);let c=[],d=0;for(;a?i>=s:i<=s;)c.push(o(i,d)),i=a?i-r:i+r,d++;return n.toRegex===!0?xs(c,null,{wrap:!1,options:n}):c},pr=(e,t,r,n={})=>{if(t==null&&bn(e))return[e];if(!bn(e)||!bn(t))return bs(e,t,n);if(typeof r=="function")return pr(e,t,1,{transform:r});if(hs(r))return pr(e,t,0,r);let o={...n};return o.capture===!0&&(o.wrap=!0),r=r||o.step||1,Dt(r)?Dt(e)&&Dt(t)?kp(e,t,r,o):Pp(e,t,Math.max(Math.abs(r),1),o):r!=null&&!hs(r)?Ap(r,o):pr(e,t,1,r)};Ss.exports=pr});var Es=S((G1,ws)=>{"use strict";l();var Op=Rn(),Rs=ur(),Tp=(e,t={})=>{let r=(n,o={})=>{let i=Rs.isInvalidBrace(o),s=n.invalid===!0&&t.escapeInvalid===!0,a=i===!0||s===!0,u=t.escapeInvalid===!0?"\\":"",f="";if(n.isOpen===!0||n.isClose===!0)return u+n.value;if(n.type==="open")return a?u+n.value:"(";if(n.type==="close")return a?u+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 c=Rs.reduce(n.nodes),d=Op(...c,{...t,wrap:!1,toRegex:!0});if(d.length!==0)return c.length>1&&d.length>1?`(${d})`:d}if(n.nodes)for(let c of n.nodes)f+=r(c,n);return f};return r(e)};ws.exports=Tp});var Ps=S((z1,ks)=>{"use strict";l();var $p=Rn(),As=fr(),vt=ur(),it=(e="",t="",r=!1)=>{let n=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return r?vt.flatten(t).map(o=>`{${o}}`):t;for(let o of e)if(Array.isArray(o))for(let i of o)n.push(it(i,t,r));else for(let i of t)r===!0&&typeof i=="string"&&(i=`{${i}}`),n.push(Array.isArray(i)?it(o,i,r):o+i);return vt.flatten(n)},Fp=(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(it(a.pop(),As(o,t)));return}if(o.type==="brace"&&o.invalid!==!0&&o.nodes.length===2){a.push(it(a.pop(),["{}"]));return}if(o.nodes&&o.ranges>0){let d=vt.reduce(o.nodes);if(vt.exceedsLimit(...d,t.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let p=$p(...d,t);p.length===0&&(p=As(o,t)),a.push(it(a.pop(),p)),o.nodes=[];return}let u=vt.encloseBrace(o),f=o.queue,c=o;for(;c.type!=="brace"&&c.type!=="root"&&c.parent;)c=c.parent,f=c.queue;for(let d=0;d<o.nodes.length;d++){let p=o.nodes[d];if(p.type==="comma"&&o.type==="brace"){d===1&&f.push(""),f.push("");continue}if(p.type==="close"){a.push(it(a.pop(),f,u));continue}if(p.value&&p.type!=="open"){f.push(it(f.pop(),p.value));continue}p.nodes&&n(p,o)}return f};return vt.flatten(n(e))};ks.exports=Fp});var Ts=S((Y1,Os)=>{"use strict";l();Os.exports={MAX_LENGTH:1024*64,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 Ls=S((Q1,Ms)=>{"use strict";l();var Ip=fr(),{MAX_LENGTH:$s,CHAR_BACKSLASH:wn,CHAR_BACKTICK:Mp,CHAR_COMMA:Lp,CHAR_DOT:Np,CHAR_LEFT_PARENTHESES:Dp,CHAR_RIGHT_PARENTHESES:Vp,CHAR_LEFT_CURLY_BRACE:Hp,CHAR_RIGHT_CURLY_BRACE:jp,CHAR_LEFT_SQUARE_BRACKET:Fs,CHAR_RIGHT_SQUARE_BRACKET:Is,CHAR_DOUBLE_QUOTE:qp,CHAR_SINGLE_QUOTE:Bp,CHAR_NO_BREAK_SPACE:Up,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Gp}=Ts(),Wp=(e,t={})=>{if(typeof e!="string")throw new TypeError("Expected a string");let r=t||{},n=typeof r.maxLength=="number"?Math.min($s,r.maxLength):$s;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,u=0,f=e.length,c=0,d=0,p,_={},x=()=>e[c++],C=b=>{if(b.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&b.type==="text"){a.value+=b.value;return}return s.nodes.push(b),b.parent=s,b.prev=a,a=b,b};for(C({type:"bos"});c<f;)if(s=i[i.length-1],p=x(),!(p===Gp||p===Up)){if(p===wn){C({type:"text",value:(t.keepEscaping?p:"")+x()});continue}if(p===Is){C({type:"text",value:"\\"+p});continue}if(p===Fs){u++;let b=!0,A;for(;c<f&&(A=x());){if(p+=A,A===Fs){u++;continue}if(A===wn){p+=x();continue}if(A===Is&&(u--,u===0))break}C({type:"text",value:p});continue}if(p===Dp){s=C({type:"paren",nodes:[]}),i.push(s),C({type:"text",value:p});continue}if(p===Vp){if(s.type!=="paren"){C({type:"text",value:p});continue}s=i.pop(),C({type:"text",value:p}),s=i[i.length-1];continue}if(p===qp||p===Bp||p===Mp){let b=p,A;for(t.keepQuotes!==!0&&(p="");c<f&&(A=x());){if(A===wn){p+=A+x();continue}if(A===b){t.keepQuotes===!0&&(p+=A);break}p+=A}C({type:"text",value:p});continue}if(p===Hp){d++;let A={type:"brace",open:!0,close:!1,dollar:a.value&&a.value.slice(-1)==="$"||s.dollar===!0,depth:d,commas:0,ranges:0,nodes:[]};s=C(A),i.push(s),C({type:"open",value:p});continue}if(p===jp){if(s.type!=="brace"){C({type:"text",value:p});continue}let b="close";s=i.pop(),s.close=!0,C({type:b,value:p}),d--,s=i[i.length-1];continue}if(p===Lp&&d>0){if(s.ranges>0){s.ranges=0;let b=s.nodes.shift();s.nodes=[b,{type:"text",value:Ip(s)}]}C({type:"comma",value:p}),s.commas++;continue}if(p===Np&&d>0&&s.commas===0){let b=s.nodes;if(d===0||b.length===0){C({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"){b.pop();let A=b[b.length-1];A.value+=a.value+p,a=A,s.ranges--;continue}C({type:"dot",value:p});continue}C({type:"text",value:p})}do if(s=i.pop(),s.type!=="root"){s.nodes.forEach(k=>{k.nodes||(k.type==="open"&&(k.isOpen=!0),k.type==="close"&&(k.isClose=!0),k.nodes||(k.type="text"),k.invalid=!0)});let b=i[i.length-1],A=b.nodes.indexOf(s);b.nodes.splice(A,1,...s.nodes)}while(i.length>0);return C({type:"eos"}),o};Ms.exports=Wp});var Vs=S((J1,Ds)=>{"use strict";l();var Ns=fr(),zp=Es(),Kp=Ps(),Yp=Ls(),_e=(e,t={})=>{let r=[];if(Array.isArray(e))for(let n of e){let o=_e.create(n,t);Array.isArray(o)?r.push(...o):r.push(o)}else r=[].concat(_e.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(r=[...new Set(r)]),r};_e.parse=(e,t={})=>Yp(e,t);_e.stringify=(e,t={})=>Ns(typeof e=="string"?_e.parse(e,t):e,t);_e.compile=(e,t={})=>(typeof e=="string"&&(e=_e.parse(e,t)),zp(e,t));_e.expand=(e,t={})=>{typeof e=="string"&&(e=_e.parse(e,t));let r=Kp(e,t);return t.noempty===!0&&(r=r.filter(Boolean)),t.nodupes===!0&&(r=[...new Set(r)]),r};_e.create=(e,t={})=>e===""||e.length<3?[e]:t.expand!==!0?_e.compile(e,t):_e.expand(e,t);Ds.exports=_e});var Vt=S((tC,Us)=>{"use strict";l();var Xp=G("path"),Oe="\\\\/",Hs=`[^${Oe}]`,De="\\.",Qp="\\+",Zp="\\?",dr="\\/",Jp="(?=.)",js="[^/]",En=`(?:${dr}|$)`,qs=`(?:^|${dr})`,An=`${De}{1,2}${En}`,ed=`(?!${De})`,td=`(?!${qs}${An})`,rd=`(?!${De}{0,1}${En})`,nd=`(?!${An})`,od=`[^.${dr}]`,id=`${js}*?`,Bs={DOT_LITERAL:De,PLUS_LITERAL:Qp,QMARK_LITERAL:Zp,SLASH_LITERAL:dr,ONE_CHAR:Jp,QMARK:js,END_ANCHOR:En,DOTS_SLASH:An,NO_DOT:ed,NO_DOTS:td,NO_DOT_SLASH:rd,NO_DOTS_SLASH:nd,QMARK_NO_DOT:od,STAR:id,START_ANCHOR:qs},sd={...Bs,SLASH_LITERAL:`[${Oe}]`,QMARK:Hs,STAR:`${Hs}*?`,DOTS_SLASH:`${De}{1,2}(?:[${Oe}]|$)`,NO_DOT:`(?!${De})`,NO_DOTS:`(?!(?:^|[${Oe}])${De}{1,2}(?:[${Oe}]|$))`,NO_DOT_SLASH:`(?!${De}{0,1}(?:[${Oe}]|$))`,NO_DOTS_SLASH:`(?!${De}{1,2}(?:[${Oe}]|$))`,QMARK_NO_DOT:`[^.${Oe}]`,START_ANCHOR:`(?:^|[${Oe}])`,END_ANCHOR:`(?:[${Oe}]|$)`},ad={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:ad,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:Xp.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?sd:Bs}}});var Ht=S(ve=>{"use strict";l();var cd=G("path"),ld=process.platform==="win32",{REGEX_BACKSLASH:ud,REGEX_REMOVE_BACKSLASH:fd,REGEX_SPECIAL_CHARS:pd,REGEX_SPECIAL_CHARS_GLOBAL:dd}=Vt();ve.isObject=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);ve.hasRegexChars=e=>pd.test(e);ve.isRegexChar=e=>e.length===1&&ve.hasRegexChars(e);ve.escapeRegex=e=>e.replace(dd,"\\$1");ve.toPosixSlashes=e=>e.replace(ud,"/");ve.removeBackslashes=e=>e.replace(fd,t=>t==="\\"?"":t);ve.supportsLookbehinds=()=>{let e=process.version.slice(1).split(".").map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10};ve.isWindows=e=>e&&typeof e.windows=="boolean"?e.windows:ld===!0||cd.sep==="\\";ve.escapeLast=(e,t,r)=>{let n=e.lastIndexOf(t,r);return n===-1?e:e[n-1]==="\\"?ve.escapeLast(e,t,n-1):`${e.slice(0,n)}\\${e.slice(n)}`};ve.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r};ve.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",o=r.contains?"":"$",i=`${n}(?:${e})${o}`;return t.negated===!0&&(i=`(?:^(?!${i}).*$)`),i}});var Zs=S((iC,Qs)=>{"use strict";l();var Gs=Ht(),{CHAR_ASTERISK:kn,CHAR_AT:md,CHAR_BACKWARD_SLASH:jt,CHAR_COMMA:gd,CHAR_DOT:Pn,CHAR_EXCLAMATION_MARK:On,CHAR_FORWARD_SLASH:Xs,CHAR_LEFT_CURLY_BRACE:Tn,CHAR_LEFT_PARENTHESES:$n,CHAR_LEFT_SQUARE_BRACKET:hd,CHAR_PLUS:yd,CHAR_QUESTION_MARK:Ws,CHAR_RIGHT_CURLY_BRACE:vd,CHAR_RIGHT_PARENTHESES:zs,CHAR_RIGHT_SQUARE_BRACKET:_d}=Vt(),Ks=e=>e===Xs||e===jt,Ys=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)},xd=(e,t)=>{let r=t||{},n=e.length-1,o=r.parts===!0||r.scanToEnd===!0,i=[],s=[],a=[],u=e,f=-1,c=0,d=0,p=!1,_=!1,x=!1,C=!1,b=!1,A=!1,k=!1,I=!1,U=!1,w=!1,M=0,R,P,$={value:"",depth:0,isGlob:!1},K=()=>f>=n,h=()=>u.charCodeAt(f+1),T=()=>(R=P,u.charCodeAt(++f));for(;f<n;){P=T();let q;if(P===jt){k=$.backslashes=!0,P=T(),P===Tn&&(A=!0);continue}if(A===!0||P===Tn){for(M++;K()!==!0&&(P=T());){if(P===jt){k=$.backslashes=!0,T();continue}if(P===Tn){M++;continue}if(A!==!0&&P===Pn&&(P=T())===Pn){if(p=$.isBrace=!0,x=$.isGlob=!0,w=!0,o===!0)continue;break}if(A!==!0&&P===gd){if(p=$.isBrace=!0,x=$.isGlob=!0,w=!0,o===!0)continue;break}if(P===vd&&(M--,M===0)){A=!1,p=$.isBrace=!0,w=!0;break}}if(o===!0)continue;break}if(P===Xs){if(i.push(f),s.push($),$={value:"",depth:0,isGlob:!1},w===!0)continue;if(R===Pn&&f===c+1){c+=2;continue}d=f+1;continue}if(r.noext!==!0&&(P===yd||P===md||P===kn||P===Ws||P===On)===!0&&h()===$n){if(x=$.isGlob=!0,C=$.isExtglob=!0,w=!0,P===On&&f===c&&(U=!0),o===!0){for(;K()!==!0&&(P=T());){if(P===jt){k=$.backslashes=!0,P=T();continue}if(P===zs){x=$.isGlob=!0,w=!0;break}}continue}break}if(P===kn){if(R===kn&&(b=$.isGlobstar=!0),x=$.isGlob=!0,w=!0,o===!0)continue;break}if(P===Ws){if(x=$.isGlob=!0,w=!0,o===!0)continue;break}if(P===hd){for(;K()!==!0&&(q=T());){if(q===jt){k=$.backslashes=!0,T();continue}if(q===_d){_=$.isBracket=!0,x=$.isGlob=!0,w=!0;break}}if(o===!0)continue;break}if(r.nonegate!==!0&&P===On&&f===c){I=$.negated=!0,c++;continue}if(r.noparen!==!0&&P===$n){if(x=$.isGlob=!0,o===!0){for(;K()!==!0&&(P=T());){if(P===$n){k=$.backslashes=!0,P=T();continue}if(P===zs){w=!0;break}}continue}break}if(x===!0){if(w=!0,o===!0)continue;break}}r.noext===!0&&(C=!1,x=!1);let L=u,V="",y="";c>0&&(V=u.slice(0,c),u=u.slice(c),d-=c),L&&x===!0&&d>0?(L=u.slice(0,d),y=u.slice(d)):x===!0?(L="",y=u):L=u,L&&L!==""&&L!=="/"&&L!==u&&Ks(L.charCodeAt(L.length-1))&&(L=L.slice(0,-1)),r.unescape===!0&&(y&&(y=Gs.removeBackslashes(y)),L&&k===!0&&(L=Gs.removeBackslashes(L)));let v={prefix:V,input:e,start:c,base:L,glob:y,isBrace:p,isBracket:_,isGlob:x,isExtglob:C,isGlobstar:b,negated:I,negatedExtglob:U};if(r.tokens===!0&&(v.maxDepth=0,Ks(P)||s.push($),v.tokens=s),r.parts===!0||r.tokens===!0){let q;for(let F=0;F<i.length;F++){let N=q?q+1:c,W=i[F],j=e.slice(N,W);r.tokens&&(F===0&&c!==0?(s[F].isPrefix=!0,s[F].value=V):s[F].value=j,Ys(s[F]),v.maxDepth+=s[F].depth),(F!==0||j!=="")&&a.push(j),q=W}if(q&&q+1<e.length){let F=e.slice(q+1);a.push(F),r.tokens&&(s[s.length-1].value=F,Ys(s[s.length-1]),v.maxDepth+=s[s.length-1].depth)}v.slashes=i,v.parts=a}return v};Qs.exports=xd});var ta=S((aC,ea)=>{"use strict";l();var mr=Vt(),xe=Ht(),{MAX_LENGTH:gr,POSIX_REGEX_SOURCE:Cd,REGEX_NON_SPECIAL_CHARS:bd,REGEX_SPECIAL_CHARS_BACKREF:Sd,REPLACEMENTS:Js}=mr,Rd=(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=>xe.escapeRegex(o)).join("..")}return r},_t=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,Fn=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");e=Js[e]||e;let r={...t},n=typeof r.maxLength=="number"?Math.min(gr,r.maxLength):gr,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?"":"?:",u=xe.isWindows(t),f=mr.globChars(u),c=mr.extglobChars(f),{DOT_LITERAL:d,PLUS_LITERAL:p,SLASH_LITERAL:_,ONE_CHAR:x,DOTS_SLASH:C,NO_DOT:b,NO_DOT_SLASH:A,NO_DOTS_SLASH:k,QMARK:I,QMARK_NO_DOT:U,STAR:w,START_ANCHOR:M}=f,R=O=>`(${a}(?:(?!${M}${O.dot?C:d}).)*?)`,P=r.dot?"":b,$=r.dot?I:U,K=r.bash===!0?R(r):w;r.capture&&(K=`(${K})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let h={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=xe.removePrefix(e,h),o=e.length;let T=[],L=[],V=[],y=i,v,q=()=>h.index===o-1,F=h.peek=(O=1)=>e[h.index+O],N=h.advance=()=>e[++h.index]||"",W=()=>e.slice(h.index+1),j=(O="",Y=0)=>{h.consumed+=O,h.index+=Y},ie=O=>{h.output+=O.output!=null?O.output:O.value,j(O.value)},te=()=>{let O=1;for(;F()==="!"&&(F(2)!=="("||F(3)==="?");)N(),h.start++,O++;return O%2===0?!1:(h.negated=!0,h.start++,!0)},Ne=O=>{h[O]++,V.push(O)},fe=O=>{h[O]--,V.pop()},H=O=>{if(y.type==="globstar"){let Y=h.braces>0&&(O.type==="comma"||O.type==="brace"),E=O.extglob===!0||T.length&&(O.type==="pipe"||O.type==="paren");O.type!=="slash"&&O.type!=="paren"&&!Y&&!E&&(h.output=h.output.slice(0,-y.output.length),y.type="star",y.value="*",y.output=K,h.output+=y.output)}if(T.length&&O.type!=="paren"&&(T[T.length-1].inner+=O.value),(O.value||O.output)&&ie(O),y&&y.type==="text"&&O.type==="text"){y.value+=O.value,y.output=(y.output||"")+O.value;return}O.prev=y,s.push(O),y=O},ye=(O,Y)=>{let E={...c[Y],conditions:1,inner:""};E.prev=y,E.parens=h.parens,E.output=h.output;let B=(r.capture?"(":"")+E.open;Ne("parens"),H({type:O,value:Y,output:h.output?"":x}),H({type:"paren",extglob:!0,value:N(),output:B}),T.push(E)},gt=O=>{let Y=O.close+(r.capture?")":""),E;if(O.type==="negate"){let B=K;if(O.inner&&O.inner.length>1&&O.inner.includes("/")&&(B=R(r)),(B!==K||q()||/^\)+$/.test(W()))&&(Y=O.close=`)$))${B}`),O.inner.includes("*")&&(E=W())&&/^\.[^\\/.]+$/.test(E)){let Z=Fn(E,{...t,fastpaths:!1}).output;Y=O.close=`)${Z})${B})`}O.prev.type==="bos"&&(h.negatedExtglob=!0)}H({type:"paren",extglob:!0,value:v,output:Y}),fe("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let O=!1,Y=e.replace(Sd,(E,B,Z,he,se,gn)=>he==="\\"?(O=!0,E):he==="?"?B?B+he+(se?I.repeat(se.length):""):gn===0?$+(se?I.repeat(se.length):""):I.repeat(Z.length):he==="."?d.repeat(Z.length):he==="*"?B?B+he+(se?K:""):K:B?E:`\\${E}`);return O===!0&&(r.unescape===!0?Y=Y.replace(/\\/g,""):Y=Y.replace(/\\+/g,E=>E.length%2===0?"\\\\":E?"\\":"")),Y===e&&r.contains===!0?(h.output=e,h):(h.output=xe.wrapOutput(Y,h,t),h)}for(;!q();){if(v=N(),v==="\0")continue;if(v==="\\"){let E=F();if(E==="/"&&r.bash!==!0||E==="."||E===";")continue;if(!E){v+="\\",H({type:"text",value:v});continue}let B=/^\\+/.exec(W()),Z=0;if(B&&B[0].length>2&&(Z=B[0].length,h.index+=Z,Z%2!==0&&(v+="\\")),r.unescape===!0?v=N():v+=N(),h.brackets===0){H({type:"text",value:v});continue}}if(h.brackets>0&&(v!=="]"||y.value==="["||y.value==="[^")){if(r.posix!==!1&&v===":"){let E=y.value.slice(1);if(E.includes("[")&&(y.posix=!0,E.includes(":"))){let B=y.value.lastIndexOf("["),Z=y.value.slice(0,B),he=y.value.slice(B+2),se=Cd[he];if(se){y.value=Z+se,h.backtrack=!0,N(),!i.output&&s.indexOf(y)===1&&(i.output=x);continue}}}(v==="["&&F()!==":"||v==="-"&&F()==="]")&&(v=`\\${v}`),v==="]"&&(y.value==="["||y.value==="[^")&&(v=`\\${v}`),r.posix===!0&&v==="!"&&y.value==="["&&(v="^"),y.value+=v,ie({value:v});continue}if(h.quotes===1&&v!=='"'){v=xe.escapeRegex(v),y.value+=v,ie({value:v});continue}if(v==='"'){h.quotes=h.quotes===1?0:1,r.keepQuotes===!0&&H({type:"text",value:v});continue}if(v==="("){Ne("parens"),H({type:"paren",value:v});continue}if(v===")"){if(h.parens===0&&r.strictBrackets===!0)throw new SyntaxError(_t("opening","("));let E=T[T.length-1];if(E&&h.parens===E.parens+1){gt(T.pop());continue}H({type:"paren",value:v,output:h.parens?")":"\\)"}),fe("parens");continue}if(v==="["){if(r.nobracket===!0||!W().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(_t("closing","]"));v=`\\${v}`}else Ne("brackets");H({type:"bracket",value:v});continue}if(v==="]"){if(r.nobracket===!0||y&&y.type==="bracket"&&y.value.length===1){H({type:"text",value:v,output:`\\${v}`});continue}if(h.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(_t("opening","["));H({type:"text",value:v,output:`\\${v}`});continue}fe("brackets");let E=y.value.slice(1);if(y.posix!==!0&&E[0]==="^"&&!E.includes("/")&&(v=`/${v}`),y.value+=v,ie({value:v}),r.literalBrackets===!1||xe.hasRegexChars(E))continue;let B=xe.escapeRegex(y.value);if(h.output=h.output.slice(0,-y.value.length),r.literalBrackets===!0){h.output+=B,y.value=B;continue}y.value=`(${a}${B}|${y.value})`,h.output+=y.value;continue}if(v==="{"&&r.nobrace!==!0){Ne("braces");let E={type:"brace",value:v,output:"(",outputIndex:h.output.length,tokensIndex:h.tokens.length};L.push(E),H(E);continue}if(v==="}"){let E=L[L.length-1];if(r.nobrace===!0||!E){H({type:"text",value:v,output:v});continue}let B=")";if(E.dots===!0){let Z=s.slice(),he=[];for(let se=Z.length-1;se>=0&&(s.pop(),Z[se].type!=="brace");se--)Z[se].type!=="dots"&&he.unshift(Z[se].value);B=Rd(he,r),h.backtrack=!0}if(E.comma!==!0&&E.dots!==!0){let Z=h.output.slice(0,E.outputIndex),he=h.tokens.slice(E.tokensIndex);E.value=E.output="\\{",v=B="\\}",h.output=Z;for(let se of he)h.output+=se.output||se.value}H({type:"brace",value:v,output:B}),fe("braces"),L.pop();continue}if(v==="|"){T.length>0&&T[T.length-1].conditions++,H({type:"text",value:v});continue}if(v===","){let E=v,B=L[L.length-1];B&&V[V.length-1]==="braces"&&(B.comma=!0,E="|"),H({type:"comma",value:v,output:E});continue}if(v==="/"){if(y.type==="dot"&&h.index===h.start+1){h.start=h.index+1,h.consumed="",h.output="",s.pop(),y=i;continue}H({type:"slash",value:v,output:_});continue}if(v==="."){if(h.braces>0&&y.type==="dot"){y.value==="."&&(y.output=d);let E=L[L.length-1];y.type="dots",y.output+=v,y.value+=v,E.dots=!0;continue}if(h.braces+h.parens===0&&y.type!=="bos"&&y.type!=="slash"){H({type:"text",value:v,output:d});continue}H({type:"dot",value:v,output:d});continue}if(v==="?"){if(!(y&&y.value==="(")&&r.noextglob!==!0&&F()==="("&&F(2)!=="?"){ye("qmark",v);continue}if(y&&y.type==="paren"){let B=F(),Z=v;if(B==="<"&&!xe.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(y.value==="("&&!/[!=<:]/.test(B)||B==="<"&&!/<([!=]|\w+>)/.test(W()))&&(Z=`\\${v}`),H({type:"text",value:v,output:Z});continue}if(r.dot!==!0&&(y.type==="slash"||y.type==="bos")){H({type:"qmark",value:v,output:U});continue}H({type:"qmark",value:v,output:I});continue}if(v==="!"){if(r.noextglob!==!0&&F()==="("&&(F(2)!=="?"||!/[!=<:]/.test(F(3)))){ye("negate",v);continue}if(r.nonegate!==!0&&h.index===0){te();continue}}if(v==="+"){if(r.noextglob!==!0&&F()==="("&&F(2)!=="?"){ye("plus",v);continue}if(y&&y.value==="("||r.regex===!1){H({type:"plus",value:v,output:p});continue}if(y&&(y.type==="bracket"||y.type==="paren"||y.type==="brace")||h.parens>0){H({type:"plus",value:v});continue}H({type:"plus",value:p});continue}if(v==="@"){if(r.noextglob!==!0&&F()==="("&&F(2)!=="?"){H({type:"at",extglob:!0,value:v,output:""});continue}H({type:"text",value:v});continue}if(v!=="*"){(v==="$"||v==="^")&&(v=`\\${v}`);let E=bd.exec(W());E&&(v+=E[0],h.index+=E[0].length),H({type:"text",value:v});continue}if(y&&(y.type==="globstar"||y.star===!0)){y.type="star",y.star=!0,y.value+=v,y.output=K,h.backtrack=!0,h.globstar=!0,j(v);continue}let O=W();if(r.noextglob!==!0&&/^\([^?]/.test(O)){ye("star",v);continue}if(y.type==="star"){if(r.noglobstar===!0){j(v);continue}let E=y.prev,B=E.prev,Z=E.type==="slash"||E.type==="bos",he=B&&(B.type==="star"||B.type==="globstar");if(r.bash===!0&&(!Z||O[0]&&O[0]!=="/")){H({type:"star",value:v,output:""});continue}let se=h.braces>0&&(E.type==="comma"||E.type==="brace"),gn=T.length&&(E.type==="pipe"||E.type==="paren");if(!Z&&E.type!=="paren"&&!se&&!gn){H({type:"star",value:v,output:""});continue}for(;O.slice(0,3)==="/**";){let ar=e[h.index+4];if(ar&&ar!=="/")break;O=O.slice(3),j("/**",3)}if(E.type==="bos"&&q()){y.type="globstar",y.value+=v,y.output=R(r),h.output=y.output,h.globstar=!0,j(v);continue}if(E.type==="slash"&&E.prev.type!=="bos"&&!he&&q()){h.output=h.output.slice(0,-(E.output+y.output).length),E.output=`(?:${E.output}`,y.type="globstar",y.output=R(r)+(r.strictSlashes?")":"|$)"),y.value+=v,h.globstar=!0,h.output+=E.output+y.output,j(v);continue}if(E.type==="slash"&&E.prev.type!=="bos"&&O[0]==="/"){let ar=O[1]!==void 0?"|$":"";h.output=h.output.slice(0,-(E.output+y.output).length),E.output=`(?:${E.output}`,y.type="globstar",y.output=`${R(r)}${_}|${_}${ar})`,y.value+=v,h.output+=E.output+y.output,h.globstar=!0,j(v+N()),H({type:"slash",value:"/",output:""});continue}if(E.type==="bos"&&O[0]==="/"){y.type="globstar",y.value+=v,y.output=`(?:^|${_}|${R(r)}${_})`,h.output=y.output,h.globstar=!0,j(v+N()),H({type:"slash",value:"/",output:""});continue}h.output=h.output.slice(0,-y.output.length),y.type="globstar",y.output=R(r),y.value+=v,h.output+=y.output,h.globstar=!0,j(v);continue}let Y={type:"star",value:v,output:K};if(r.bash===!0){Y.output=".*?",(y.type==="bos"||y.type==="slash")&&(Y.output=P+Y.output),H(Y);continue}if(y&&(y.type==="bracket"||y.type==="paren")&&r.regex===!0){Y.output=v,H(Y);continue}(h.index===h.start||y.type==="slash"||y.type==="dot")&&(y.type==="dot"?(h.output+=A,y.output+=A):r.dot===!0?(h.output+=k,y.output+=k):(h.output+=P,y.output+=P),F()!=="*"&&(h.output+=x,y.output+=x)),H(Y)}for(;h.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(_t("closing","]"));h.output=xe.escapeLast(h.output,"["),fe("brackets")}for(;h.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(_t("closing",")"));h.output=xe.escapeLast(h.output,"("),fe("parens")}for(;h.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(_t("closing","}"));h.output=xe.escapeLast(h.output,"{"),fe("braces")}if(r.strictSlashes!==!0&&(y.type==="star"||y.type==="bracket")&&H({type:"maybe_slash",value:"",output:`${_}?`}),h.backtrack===!0){h.output="";for(let O of h.tokens)h.output+=O.output!=null?O.output:O.value,O.suffix&&(h.output+=O.suffix)}return h};Fn.fastpaths=(e,t)=>{let r={...t},n=typeof r.maxLength=="number"?Math.min(gr,r.maxLength):gr,o=e.length;if(o>n)throw new SyntaxError(`Input length: ${o}, exceeds maximum allowed length: ${n}`);e=Js[e]||e;let i=xe.isWindows(t),{DOT_LITERAL:s,SLASH_LITERAL:a,ONE_CHAR:u,DOTS_SLASH:f,NO_DOT:c,NO_DOTS:d,NO_DOTS_SLASH:p,STAR:_,START_ANCHOR:x}=mr.globChars(i),C=r.dot?d:c,b=r.dot?p:c,A=r.capture?"":"?:",k={negated:!1,prefix:""},I=r.bash===!0?".*?":_;r.capture&&(I=`(${I})`);let U=P=>P.noglobstar===!0?I:`(${A}(?:(?!${x}${P.dot?f:s}).)*?)`,w=P=>{switch(P){case"*":return`${C}${u}${I}`;case".*":return`${s}${u}${I}`;case"*.*":return`${C}${I}${s}${u}${I}`;case"*/*":return`${C}${I}${a}${u}${b}${I}`;case"**":return C+U(r);case"**/*":return`(?:${C}${U(r)}${a})?${b}${u}${I}`;case"**/*.*":return`(?:${C}${U(r)}${a})?${b}${I}${s}${u}${I}`;case"**/.*":return`(?:${C}${U(r)}${a})?${s}${u}${I}`;default:{let $=/^(.*?)\.(\w+)$/.exec(P);if(!$)return;let K=w($[1]);return K?K+s+$[2]:void 0}}},M=xe.removePrefix(e,k),R=w(M);return R&&r.strictSlashes!==!0&&(R+=`${a}?`),R};ea.exports=Fn});var na=S((lC,ra)=>{"use strict";l();var wd=G("path"),Ed=Zs(),In=ta(),Mn=Ht(),Ad=Vt(),kd=e=>e&&typeof e=="object"&&!Array.isArray(e),re=(e,t,r=!1)=>{if(Array.isArray(e)){let c=e.map(p=>re(p,t,r));return p=>{for(let _ of c){let x=_(p);if(x)return x}return!1}}let n=kd(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=Mn.isWindows(t),s=n?re.compileRe(e,t):re.makeRe(e,t,!1,!0),a=s.state;delete s.state;let u=()=>!1;if(o.ignore){let c={...t,ignore:null,onMatch:null,onResult:null};u=re(o.ignore,c,r)}let f=(c,d=!1)=>{let{isMatch:p,match:_,output:x}=re.test(c,s,t,{glob:e,posix:i}),C={glob:e,state:a,regex:s,posix:i,input:c,output:x,match:_,isMatch:p};return typeof o.onResult=="function"&&o.onResult(C),p===!1?(C.isMatch=!1,d?C:!1):u(c)?(typeof o.onIgnore=="function"&&o.onIgnore(C),C.isMatch=!1,d?C:!1):(typeof o.onMatch=="function"&&o.onMatch(C),d?C:!0)};return r&&(f.state=a),f};re.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?Mn.toPosixSlashes:null),a=e===n,u=a&&s?s(e):e;return a===!1&&(u=s?s(e):e,a=u===n),(a===!1||i.capture===!0)&&(i.matchBase===!0||i.basename===!0?a=re.matchBase(e,t,r,o):a=t.exec(u)),{isMatch:!!a,match:a,output:u}};re.matchBase=(e,t,r,n=Mn.isWindows(r))=>(t instanceof RegExp?t:re.makeRe(t,r)).test(wd.basename(e));re.isMatch=(e,t,r)=>re(t,r)(e);re.parse=(e,t)=>Array.isArray(e)?e.map(r=>re.parse(r,t)):In(e,{...t,fastpaths:!1});re.scan=(e,t)=>Ed(e,t);re.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 u=re.toRegex(a,t);return n===!0&&(u.state=e),u};re.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=In.fastpaths(e,t)),o.output||(o=In(e,t)),re.compileRe(o,t,r,n)};re.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/$^/}};re.constants=Ad;ra.exports=re});var ia=S((fC,oa)=>{"use strict";l();oa.exports=na()});var ua=S((dC,la)=>{"use strict";l();var aa=G("util"),ca=Vs(),Te=ia(),Ln=Ht(),sa=e=>e===""||e==="./",Q=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,i=new Set,s=0,a=c=>{i.add(c.output),r&&r.onResult&&r.onResult(c)};for(let c=0;c<t.length;c++){let d=Te(String(t[c]),{...r,onResult:a},!0),p=d.state.negated||d.state.negatedExtglob;p&&s++;for(let _ of e){let x=d(_,!0);(p?!x.isMatch:x.isMatch)&&(p?n.add(x.output):(n.delete(x.output),o.add(x.output)))}}let f=(s===t.length?[...i]:[...o]).filter(c=>!n.has(c));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(c=>c.replace(/\\/g,"")):t}return f};Q.match=Q;Q.matcher=(e,t)=>Te(e,t);Q.isMatch=(e,t,r)=>Te(t,r)(e);Q.any=Q.isMatch;Q.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(Q(e,t,{...r,onResult:i}));for(let a of o)s.has(a)||n.add(a);return[...n]};Q.contains=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${aa.inspect(e)}"`);if(Array.isArray(t))return t.some(n=>Q.contains(e,n,r));if(typeof t=="string"){if(sa(e)||sa(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return Q.isMatch(e,t,{...r,contains:!0})};Q.matchKeys=(e,t,r)=>{if(!Ln.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=Q(Object.keys(e),t,r),o={};for(let i of n)o[i]=e[i];return o};Q.some=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let i=Te(String(o),r);if(n.some(s=>i(s)))return!0}return!1};Q.every=(e,t,r)=>{let n=[].concat(e);for(let o of[].concat(t)){let i=Te(String(o),r);if(!n.every(s=>i(s)))return!1}return!0};Q.all=(e,t,r)=>{if(typeof e!="string")throw new TypeError(`Expected a string: "${aa.inspect(e)}"`);return[].concat(t).every(n=>Te(n,r)(e))};Q.capture=(e,t,r)=>{let n=Ln.isWindows(r),i=Te.makeRe(String(e),{...r,capture:!0}).exec(n?Ln.toPosixSlashes(t):t);if(i)return i.slice(1).map(s=>s===void 0?"":s)};Q.makeRe=(...e)=>Te.makeRe(...e);Q.scan=(...e)=>Te.scan(...e);Q.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let o of ca(String(n),t))r.push(Te.parse(o,t));return r};Q.braces=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return t&&t.nobrace===!0||!/\{.*\}/.test(e)?[e]:ca(e,t)};Q.braceExpand=(e,t)=>{if(typeof e!="string")throw new TypeError("Expected a string");return Q.braces(e,{...t,expand:!0})};la.exports=Q});var va=S(D=>{"use strict";l();Object.defineProperty(D,"__esModule",{value:!0});D.removeDuplicateSlashes=D.matchAny=D.convertPatternsToRe=D.makeRe=D.getPatternParts=D.expandBraceExpansion=D.expandPatternsWithBraceExpansion=D.isAffectDepthOfReadingPattern=D.endsWithSlashGlobStar=D.hasGlobStar=D.getBaseDirectory=D.isPatternRelatedToParentDirectory=D.getPatternsOutsideCurrentDirectory=D.getPatternsInsideCurrentDirectory=D.getPositivePatterns=D.getNegativePatterns=D.isPositivePattern=D.isNegativePattern=D.convertToNegativePattern=D.convertToPositivePattern=D.isDynamicPattern=D.isStaticPattern=void 0;var Pd=G("path"),Od=rs(),Nn=ua(),fa="**",Td="\\",$d=/[*?]|^!/,Fd=/\[[^[]*]/,Id=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,Md=/[!*+?@]\([^(]*\)/,Ld=/,|\.\./,Nd=/(?!^)\/{2,}/g;function pa(e,t={}){return!da(e,t)}D.isStaticPattern=pa;function da(e,t={}){return e===""?!1:!!(t.caseSensitiveMatch===!1||e.includes(Td)||$d.test(e)||Fd.test(e)||Id.test(e)||t.extglob!==!1&&Md.test(e)||t.braceExpansion!==!1&&Dd(e))}D.isDynamicPattern=da;function Dd(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 Ld.test(n)}function Vd(e){return hr(e)?e.slice(1):e}D.convertToPositivePattern=Vd;function Hd(e){return"!"+e}D.convertToNegativePattern=Hd;function hr(e){return e.startsWith("!")&&e[1]!=="("}D.isNegativePattern=hr;function ma(e){return!hr(e)}D.isPositivePattern=ma;function jd(e){return e.filter(hr)}D.getNegativePatterns=jd;function qd(e){return e.filter(ma)}D.getPositivePatterns=qd;function Bd(e){return e.filter(t=>!Dn(t))}D.getPatternsInsideCurrentDirectory=Bd;function Ud(e){return e.filter(Dn)}D.getPatternsOutsideCurrentDirectory=Ud;function Dn(e){return e.startsWith("..")||e.startsWith("./..")}D.isPatternRelatedToParentDirectory=Dn;function Gd(e){return Od(e,{flipBackslashes:!1})}D.getBaseDirectory=Gd;function Wd(e){return e.includes(fa)}D.hasGlobStar=Wd;function ga(e){return e.endsWith("/"+fa)}D.endsWithSlashGlobStar=ga;function zd(e){let t=Pd.basename(e);return ga(e)||pa(t)}D.isAffectDepthOfReadingPattern=zd;function Kd(e){return e.reduce((t,r)=>t.concat(ha(r)),[])}D.expandPatternsWithBraceExpansion=Kd;function ha(e){let t=Nn.braces(e,{expand:!0,nodupes:!0,keepEscaping:!0});return t.sort((r,n)=>r.length-n.length),t.filter(r=>r!=="")}D.expandBraceExpansion=ha;function Yd(e,t){let{parts:r}=Nn.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}D.getPatternParts=Yd;function ya(e,t){return Nn.makeRe(e,t)}D.makeRe=ya;function Xd(e,t){return e.map(r=>ya(r,t))}D.convertPatternsToRe=Xd;function Qd(e,t){return t.some(r=>r.test(e))}D.matchAny=Qd;function Zd(e){return e.replace(Nd,"/")}D.removeDuplicateSlashes=Zd});var ba=S((yC,Ca)=>{"use strict";l();var Jd=G("stream"),_a=Jd.PassThrough,em=Array.prototype.slice;Ca.exports=tm;function tm(){let e=[],t=em.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=_a(n);function a(){for(let c=0,d=arguments.length;c<d;c++)e.push(xa(arguments[c],n));return u(),this}function u(){if(r)return;r=!0;let c=e.shift();if(!c){process.nextTick(f);return}Array.isArray(c)||(c=[c]);let d=c.length+1;function p(){--d>0||(r=!1,u())}function _(x){function C(){x.removeListener("merge2UnpipeEnd",C),x.removeListener("end",C),i&&x.removeListener("error",b),p()}function b(A){s.emit("error",A)}if(x._readableState.endEmitted)return p();x.on("merge2UnpipeEnd",C),x.on("end",C),i&&x.on("error",b),x.pipe(s,{end:!1}),x.resume()}for(let x=0;x<c.length;x++)_(c[x]);p()}function f(){r=!1,s.emit("queueDrain"),o&&s.end()}return s.setMaxListeners(0),s.add=a,s.on("unpipe",function(c){c.emit("merge2UnpipeEnd")}),t.length&&a.apply(null,t),s}function xa(e,t){if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)e[r]=xa(e[r],t);else{if(!e._readableState&&e.pipe&&(e=e.pipe(_a(t))),!e._readableState||!e.pause||!e.pipe)throw new Error("Only readable stream can be merged.");e.pause()}return e}});var Ra=S(yr=>{"use strict";l();Object.defineProperty(yr,"__esModule",{value:!0});yr.merge=void 0;var rm=ba();function nm(e){let t=rm(e);return e.forEach(r=>{r.once("error",n=>t.emit("error",n))}),t.once("close",()=>Sa(e)),t.once("end",()=>Sa(e)),t}yr.merge=nm;function Sa(e){e.forEach(t=>t.emit("close"))}});var wa=S(xt=>{"use strict";l();Object.defineProperty(xt,"__esModule",{value:!0});xt.isEmpty=xt.isString=void 0;function om(e){return typeof e=="string"}xt.isString=om;function im(e){return e===""}xt.isEmpty=im});var Ve=S(de=>{"use strict";l();Object.defineProperty(de,"__esModule",{value:!0});de.string=de.stream=de.pattern=de.path=de.fs=de.errno=de.array=void 0;var sm=Bi();de.array=sm;var am=Ui();de.errno=am;var cm=Gi();de.fs=cm;var lm=Yi();de.path=lm;var um=va();de.pattern=um;var fm=Ra();de.stream=fm;var pm=wa();de.string=pm});var Pa=S(me=>{"use strict";l();Object.defineProperty(me,"__esModule",{value:!0});me.convertPatternGroupToTask=me.convertPatternGroupsToTasks=me.groupPatternsByBaseDirectory=me.getNegativePatternsAsPositive=me.getPositivePatterns=me.convertPatternsToTasks=me.generate=void 0;var ke=Ve();function dm(e,t){let r=Ea(e,t),n=Ea(t.ignore,t),o=Aa(r),i=ka(r,n),s=o.filter(c=>ke.pattern.isStaticPattern(c,t)),a=o.filter(c=>ke.pattern.isDynamicPattern(c,t)),u=Vn(s,i,!1),f=Vn(a,i,!0);return u.concat(f)}me.generate=dm;function Ea(e,t){let r=e;return t.braceExpansion&&(r=ke.pattern.expandPatternsWithBraceExpansion(r)),t.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>ke.pattern.removeDuplicateSlashes(n))}function Vn(e,t,r){let n=[],o=ke.pattern.getPatternsOutsideCurrentDirectory(e),i=ke.pattern.getPatternsInsideCurrentDirectory(e),s=Hn(o),a=Hn(i);return n.push(...jn(s,t,r)),"."in a?n.push(qn(".",i,t,r)):n.push(...jn(a,t,r)),n}me.convertPatternsToTasks=Vn;function Aa(e){return ke.pattern.getPositivePatterns(e)}me.getPositivePatterns=Aa;function ka(e,t){return ke.pattern.getNegativePatterns(e).concat(t).map(ke.pattern.convertToPositivePattern)}me.getNegativePatternsAsPositive=ka;function Hn(e){let t={};return e.reduce((r,n)=>{let o=ke.pattern.getBaseDirectory(n);return o in r?r[o].push(n):r[o]=[n],r},t)}me.groupPatternsByBaseDirectory=Hn;function jn(e,t,r){return Object.keys(e).map(n=>qn(n,e[n],t,r))}me.convertPatternGroupsToTasks=jn;function qn(e,t,r,n){return{dynamic:n,positive:t,negative:r,base:e,patterns:[].concat(t,r.map(ke.pattern.convertToNegativePattern))}}me.convertPatternGroupToTask=qn});var Ta=S(vr=>{"use strict";l();Object.defineProperty(vr,"__esModule",{value:!0});vr.read=void 0;function mm(e,t,r){t.fs.lstat(e,(n,o)=>{if(n!==null){Oa(r,n);return}if(!o.isSymbolicLink()||!t.followSymbolicLink){Bn(r,o);return}t.fs.stat(e,(i,s)=>{if(i!==null){if(t.throwErrorOnBrokenSymbolicLink){Oa(r,i);return}Bn(r,o);return}t.markSymbolicLink&&(s.isSymbolicLink=()=>!0),Bn(r,s)})})}vr.read=mm;function Oa(e,t){e(t)}function Bn(e,t){e(null,t)}});var $a=S(_r=>{"use strict";l();Object.defineProperty(_r,"__esModule",{value:!0});_r.read=void 0;function gm(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}}_r.read=gm});var Fa=S(Be=>{"use strict";l();Object.defineProperty(Be,"__esModule",{value:!0});Be.createFileSystemAdapter=Be.FILE_SYSTEM_ADAPTER=void 0;var xr=G("fs");Be.FILE_SYSTEM_ADAPTER={lstat:xr.lstat,stat:xr.stat,lstatSync:xr.lstatSync,statSync:xr.statSync};function hm(e){return e===void 0?Be.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Be.FILE_SYSTEM_ADAPTER),e)}Be.createFileSystemAdapter=hm});var Ia=S(Gn=>{"use strict";l();Object.defineProperty(Gn,"__esModule",{value:!0});var ym=Fa(),Un=class{constructor(t={}){this._options=t,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=ym.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}};Gn.default=Un});var st=S(Ue=>{"use strict";l();Object.defineProperty(Ue,"__esModule",{value:!0});Ue.statSync=Ue.stat=Ue.Settings=void 0;var Ma=Ta(),vm=$a(),Wn=Ia();Ue.Settings=Wn.default;function _m(e,t,r){if(typeof t=="function"){Ma.read(e,zn(),t);return}Ma.read(e,zn(t),r)}Ue.stat=_m;function xm(e,t){let r=zn(t);return vm.read(e,r)}Ue.statSync=xm;function zn(e={}){return e instanceof Wn.default?e:new Wn.default(e)}});var Da=S((NC,Na)=>{"use strict";l();var La;Na.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):e=>(La||(La=Promise.resolve())).then(e).catch(t=>setTimeout(()=>{throw t},0))});var Ha=S((VC,Va)=>{"use strict";l();Va.exports=bm;var Cm=Da();function bm(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(u){function f(){t&&t(u,r),t=null}i?Cm(f):f()}function a(u,f,c){r[u]=c,(--n===0||f)&&s(f)}n?o?o.forEach(function(u){e[u](function(f,c){a(u,f,c)})}):e.forEach(function(u,f){u(function(c,d){a(f,c,d)})}):s(null),i=!1}});var Kn=S(br=>{"use strict";l();Object.defineProperty(br,"__esModule",{value:!0});br.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var Cr=process.versions.node.split(".");if(Cr[0]===void 0||Cr[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var ja=Number.parseInt(Cr[0],10),Sm=Number.parseInt(Cr[1],10),qa=10,Rm=10,wm=ja>qa,Em=ja===qa&&Sm>=Rm;br.IS_SUPPORT_READDIR_WITH_FILE_TYPES=wm||Em});var Ba=S(Sr=>{"use strict";l();Object.defineProperty(Sr,"__esModule",{value:!0});Sr.createDirentFromStats=void 0;var Yn=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 Yn(e,t)}Sr.createDirentFromStats=Am});var Xn=S(Rr=>{"use strict";l();Object.defineProperty(Rr,"__esModule",{value:!0});Rr.fs=void 0;var km=Ba();Rr.fs=km});var Qn=S(wr=>{"use strict";l();Object.defineProperty(wr,"__esModule",{value:!0});wr.joinPathSegments=void 0;function Pm(e,t,r){return e.endsWith(r)?e+t:e+r+t}wr.joinPathSegments=Pm});var Ya=S(Ge=>{"use strict";l();Object.defineProperty(Ge,"__esModule",{value:!0});Ge.readdir=Ge.readdirWithFileTypes=Ge.read=void 0;var Om=st(),Ua=Ha(),Tm=Kn(),Ga=Xn(),Wa=Qn();function $m(e,t,r){if(!t.stats&&Tm.IS_SUPPORT_READDIR_WITH_FILE_TYPES){za(e,t,r);return}Ka(e,t,r)}Ge.read=$m;function za(e,t,r){t.fs.readdir(e,{withFileTypes:!0},(n,o)=>{if(n!==null){Er(r,n);return}let i=o.map(a=>({dirent:a,name:a.name,path:Wa.joinPathSegments(e,a.name,t.pathSegmentSeparator)}));if(!t.followSymbolicLinks){Zn(r,i);return}let s=i.map(a=>Fm(a,t));Ua(s,(a,u)=>{if(a!==null){Er(r,a);return}Zn(r,u)})})}Ge.readdirWithFileTypes=za;function Fm(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=Ga.fs.createDirentFromStats(e.name,o),r(null,e)})}}function Ka(e,t,r){t.fs.readdir(e,(n,o)=>{if(n!==null){Er(r,n);return}let i=o.map(s=>{let a=Wa.joinPathSegments(e,s,t.pathSegmentSeparator);return u=>{Om.stat(a,t.fsStatSettings,(f,c)=>{if(f!==null){u(f);return}let d={name:s,path:a,dirent:Ga.fs.createDirentFromStats(s,c)};t.stats&&(d.stats=c),u(null,d)})}});Ua(i,(s,a)=>{if(s!==null){Er(r,s);return}Zn(r,a)})})}Ge.readdir=Ka;function Er(e,t){e(t)}function Zn(e,t){e(null,t)}});var ec=S(We=>{"use strict";l();Object.defineProperty(We,"__esModule",{value:!0});We.readdir=We.readdirWithFileTypes=We.read=void 0;var Im=st(),Mm=Kn(),Xa=Xn(),Qa=Qn();function Lm(e,t){return!t.stats&&Mm.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Za(e,t):Ja(e,t)}We.read=Lm;function Za(e,t){return t.fs.readdirSync(e,{withFileTypes:!0}).map(n=>{let o={dirent:n,name:n.name,path:Qa.joinPathSegments(e,n.name,t.pathSegmentSeparator)};if(o.dirent.isSymbolicLink()&&t.followSymbolicLinks)try{let i=t.fs.statSync(o.path);o.dirent=Xa.fs.createDirentFromStats(o.name,i)}catch(i){if(t.throwErrorOnBrokenSymbolicLink)throw i}return o})}We.readdirWithFileTypes=Za;function Ja(e,t){return t.fs.readdirSync(e).map(n=>{let o=Qa.joinPathSegments(e,n,t.pathSegmentSeparator),i=Im.statSync(o,t.fsStatSettings),s={name:n,path:o,dirent:Xa.fs.createDirentFromStats(n,i)};return t.stats&&(s.stats=i),s})}We.readdir=Ja});var tc=S(ze=>{"use strict";l();Object.defineProperty(ze,"__esModule",{value:!0});ze.createFileSystemAdapter=ze.FILE_SYSTEM_ADAPTER=void 0;var Ct=G("fs");ze.FILE_SYSTEM_ADAPTER={lstat:Ct.lstat,stat:Ct.stat,lstatSync:Ct.lstatSync,statSync:Ct.statSync,readdir:Ct.readdir,readdirSync:Ct.readdirSync};function Nm(e){return e===void 0?ze.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},ze.FILE_SYSTEM_ADAPTER),e)}ze.createFileSystemAdapter=Nm});var rc=S(eo=>{"use strict";l();Object.defineProperty(eo,"__esModule",{value:!0});var Dm=G("path"),Vm=st(),Hm=tc(),Jn=class{constructor(t={}){this._options=t,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Hm.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Dm.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}};eo.default=Jn});var Ar=S(Ke=>{"use strict";l();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.Settings=Ke.scandirSync=Ke.scandir=void 0;var nc=Ya(),jm=ec(),to=rc();Ke.Settings=to.default;function qm(e,t,r){if(typeof t=="function"){nc.read(e,ro(),t);return}nc.read(e,ro(t),r)}Ke.scandir=qm;function Bm(e,t){let r=ro(t);return jm.read(e,r)}Ke.scandirSync=Bm;function ro(e={}){return e instanceof to.default?e:new to.default(e)}});var ic=S((ib,oc)=>{"use strict";l();function Um(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}}oc.exports=Um});var ac=S((ab,no)=>{"use strict";l();var Gm=ic();function sc(e,t,r){if(typeof e=="function"&&(r=t,t=e,e=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var n=Gm(Wm),o=null,i=null,s=0,a=null,u={push:C,drain:Se,saturated:Se,pause:c,paused:!1,concurrency:r,running:f,resume:_,idle:x,length:d,getQueue:p,unshift:b,empty:Se,kill:k,killAndDrain:I,error:U};return u;function f(){return s}function c(){u.paused=!0}function d(){for(var w=o,M=0;w;)w=w.next,M++;return M}function p(){for(var w=o,M=[];w;)M.push(w.value),w=w.next;return M}function _(){if(u.paused){u.paused=!1;for(var w=0;w<u.concurrency;w++)s++,A()}}function x(){return s===0&&u.length()===0}function C(w,M){var R=n.get();R.context=e,R.release=A,R.value=w,R.callback=M||Se,R.errorHandler=a,s===u.concurrency||u.paused?i?(i.next=R,i=R):(o=R,i=R,u.saturated()):(s++,t.call(e,R.value,R.worked))}function b(w,M){var R=n.get();R.context=e,R.release=A,R.value=w,R.callback=M||Se,R.errorHandler=a,s===u.concurrency||u.paused?o?(R.next=o,o=R):(o=R,i=R,u.saturated()):(s++,t.call(e,R.value,R.worked))}function A(w){w&&n.release(w);var M=o;M?u.paused?s--:(i===o&&(i=null),o=M.next,M.next=null,t.call(e,M.value,M.worked),i===null&&u.empty()):--s===0&&u.drain()}function k(){o=null,i=null,u.drain=Se}function I(){o=null,i=null,u.drain(),u.drain=Se}function U(w){a=w}}function Se(){}function Wm(){this.value=null,this.callback=Se,this.next=null,this.release=Se,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=Se,e.errorHandler&&i(r,s),o.call(e.context,r,n),e.release(e)}}function zm(e,t,r){typeof e=="function"&&(r=t,t=e,e=null);function n(c,d){t.call(this,c).then(function(p){d(null,p)},d)}var o=sc(e,n,r),i=o.push,s=o.unshift;return o.push=a,o.unshift=u,o.drained=f,o;function a(c){var d=new Promise(function(p,_){i(c,function(x,C){if(x){_(x);return}p(C)})});return d.catch(Se),d}function u(c){var d=new Promise(function(p,_){s(c,function(x,C){if(x){_(x);return}p(C)})});return d.catch(Se),d}function f(){if(o.idle())return new Promise(function(p){p()});var c=o.drain,d=new Promise(function(p){o.drain=function(){c(),p()}});return d}}no.exports=sc;no.exports.promise=zm});var kr=S($e=>{"use strict";l();Object.defineProperty($e,"__esModule",{value:!0});$e.joinPathSegments=$e.replacePathSegmentSeparator=$e.isAppliedFilter=$e.isFatalError=void 0;function Km(e,t){return e.errorFilter===null?!0:!e.errorFilter(t)}$e.isFatalError=Km;function Ym(e,t){return e===null||e(t)}$e.isAppliedFilter=Ym;function Xm(e,t){return e.split(/[/\\]/).join(t)}$e.replacePathSegmentSeparator=Xm;function Qm(e,t,r){return e===""?t:e.endsWith(r)?e+t:e+r+t}$e.joinPathSegments=Qm});var so=S(io=>{"use strict";l();Object.defineProperty(io,"__esModule",{value:!0});var Zm=kr(),oo=class{constructor(t,r){this._root=t,this._settings=r,this._root=Zm.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}};io.default=oo});var lo=S(co=>{"use strict";l();Object.defineProperty(co,"__esModule",{value:!0});var Jm=G("events"),eg=Ar(),tg=ac(),Pr=kr(),rg=so(),ao=class extends rg.default{constructor(t,r){super(t,r),this._settings=r,this._scandir=eg.scandir,this._emitter=new Jm.EventEmitter,this._queue=tg(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||!Pr.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=Pr.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),Pr.isAppliedFilter(this._settings.entryFilter,t)&&this._emitEntry(t),t.dirent.isDirectory()&&Pr.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_emitEntry(t){this._emitter.emit("entry",t)}};co.default=ao});var cc=S(fo=>{"use strict";l();Object.defineProperty(fo,"__esModule",{value:!0});var ng=lo(),uo=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new ng.default(this._root,this._settings),this._storage=[]}read(t){this._reader.onError(r=>{og(t,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{ig(t,this._storage)}),this._reader.read()}};fo.default=uo;function og(e,t){e(t)}function ig(e,t){e(null,t)}});var lc=S(mo=>{"use strict";l();Object.defineProperty(mo,"__esModule",{value:!0});var sg=G("stream"),ag=lo(),po=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new ag.default(this._root,this._settings),this._stream=new sg.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}};mo.default=po});var uc=S(ho=>{"use strict";l();Object.defineProperty(ho,"__esModule",{value:!0});var cg=Ar(),Or=kr(),lg=so(),go=class extends lg.default{constructor(){super(...arguments),this._scandir=cg.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(Or.isFatalError(this._settings,t))throw t}_handleEntry(t,r){let n=t.path;r!==void 0&&(t.path=Or.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)),Or.isAppliedFilter(this._settings.entryFilter,t)&&this._pushToStorage(t),t.dirent.isDirectory()&&Or.isAppliedFilter(this._settings.deepFilter,t)&&this._pushToQueue(n,r===void 0?void 0:t.path)}_pushToStorage(t){this._storage.push(t)}};ho.default=go});var fc=S(vo=>{"use strict";l();Object.defineProperty(vo,"__esModule",{value:!0});var ug=uc(),yo=class{constructor(t,r){this._root=t,this._settings=r,this._reader=new ug.default(this._root,this._settings)}read(){return this._reader.read()}};vo.default=yo});var pc=S(xo=>{"use strict";l();Object.defineProperty(xo,"__esModule",{value:!0});var fg=G("path"),pg=Ar(),_o=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,fg.sep),this.fsScandirSettings=new pg.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}};xo.default=_o});var $r=S(Fe=>{"use strict";l();Object.defineProperty(Fe,"__esModule",{value:!0});Fe.Settings=Fe.walkStream=Fe.walkSync=Fe.walk=void 0;var dc=cc(),dg=lc(),mg=fc(),Co=pc();Fe.Settings=Co.default;function gg(e,t,r){if(typeof t=="function"){new dc.default(e,Tr()).read(t);return}new dc.default(e,Tr(t)).read(r)}Fe.walk=gg;function hg(e,t){let r=Tr(t);return new mg.default(e,r).read()}Fe.walkSync=hg;function yg(e,t){let r=Tr(t);return new dg.default(e,r).read()}Fe.walkStream=yg;function Tr(e={}){return e instanceof Co.default?e:new Co.default(e)}});var Fr=S(So=>{"use strict";l();Object.defineProperty(So,"__esModule",{value:!0});var vg=G("path"),_g=st(),mc=Ve(),bo=class{constructor(t){this._settings=t,this._fsStatSettings=new _g.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return vg.resolve(this._settings.cwd,t)}_makeEntry(t,r){let n={name:r,path:r,dirent:mc.fs.createDirentFromStats(r,t)};return this._settings.stats&&(n.stats=t),n}_isFatalError(t){return!mc.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}};So.default=bo});var Eo=S(wo=>{"use strict";l();Object.defineProperty(wo,"__esModule",{value:!0});var xg=G("stream"),Cg=st(),bg=$r(),Sg=Fr(),Ro=class extends Sg.default{constructor(){super(...arguments),this._walkStream=bg.walkStream,this._stat=Cg.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){let n=t.map(this._getFullEntryPath,this),o=new xg.PassThrough({objectMode:!0});o._write=(i,s,a)=>this._getEntry(n[i],t[i],r).then(u=>{u!==null&&r.entryFilter(u)&&o.push(u),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))})}};wo.default=Ro});var gc=S(ko=>{"use strict";l();Object.defineProperty(ko,"__esModule",{value:!0});var Rg=$r(),wg=Fr(),Eg=Eo(),Ao=class extends wg.default{constructor(){super(...arguments),this._walkAsync=Rg.walk,this._readerStream=new Eg.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))})}};ko.default=Ao});var hc=S(Oo=>{"use strict";l();Object.defineProperty(Oo,"__esModule",{value:!0});var qt=Ve(),Po=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 qt.pattern.getPatternParts(t,this._micromatchOptions).map(n=>qt.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:qt.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(t){return qt.array.splitWhen(t,r=>r.dynamic&&qt.pattern.hasGlobStar(r.pattern))}};Oo.default=Po});var yc=S($o=>{"use strict";l();Object.defineProperty($o,"__esModule",{value:!0});var Ag=hc(),To=class extends Ag.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((u,f)=>{let c=i.segments[f];return!!(c.dynamic&&c.patternRe.test(u)||!c.dynamic&&c.pattern===u)}))return!0}return!1}};$o.default=To});var vc=S(Io=>{"use strict";l();Object.defineProperty(Io,"__esModule",{value:!0});var Ir=Ve(),kg=yc(),Fo=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 kg.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){let r=t.filter(Ir.pattern.isAffectDepthOfReadingPattern);return Ir.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,o){if(this._isSkippedByDeep(t,r.path)||this._isSkippedSymbolicLink(r))return!1;let i=Ir.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!Ir.pattern.matchAny(t,r)}};Io.default=Fo});var _c=S(Lo=>{"use strict";l();Object.defineProperty(Lo,"__esModule",{value:!0});var at=Ve(),Mo=class{constructor(t,r){this._settings=t,this._micromatchOptions=r,this.index=new Map}getFilter(t,r){let n=at.pattern.convertPatternsToRe(t,this._micromatchOptions),o=at.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return i=>this._filter(i,n,o)}_filter(t,r,n){let o=at.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=at.path.makeAbsolute(this._settings.cwd,t);return at.pattern.matchAny(n,r)}_isMatchToPatterns(t,r,n){let o=at.pattern.matchAny(t,r);return!o&&n?at.pattern.matchAny(t+"/",r):o}};Lo.default=Mo});var xc=S(Do=>{"use strict";l();Object.defineProperty(Do,"__esModule",{value:!0});var Pg=Ve(),No=class{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return Pg.errno.isEnoentCodeError(t)||this._settings.suppressErrors}};Do.default=No});var bc=S(Ho=>{"use strict";l();Object.defineProperty(Ho,"__esModule",{value:!0});var Cc=Ve(),Vo=class{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;return this._settings.absolute&&(r=Cc.path.makeAbsolute(this._settings.cwd,r),r=Cc.path.unixify(r)),this._settings.markDirectories&&t.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},t),{path:r}):r}};Ho.default=Vo});var Mr=S(qo=>{"use strict";l();Object.defineProperty(qo,"__esModule",{value:!0});var Og=G("path"),Tg=vc(),$g=_c(),Fg=xc(),Ig=bc(),jo=class{constructor(t){this._settings=t,this.errorFilter=new Fg.default(this._settings),this.entryFilter=new $g.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new Tg.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new Ig.default(this._settings)}_getRootDirectory(t){return Og.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}}};qo.default=jo});var Sc=S(Uo=>{"use strict";l();Object.defineProperty(Uo,"__esModule",{value:!0});var Mg=gc(),Lg=Mr(),Bo=class extends Lg.default{constructor(){super(...arguments),this._reader=new Mg.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)}};Uo.default=Bo});var Rc=S(Wo=>{"use strict";l();Object.defineProperty(Wo,"__esModule",{value:!0});var Ng=G("stream"),Dg=Eo(),Vg=Mr(),Go=class extends Vg.default{constructor(){super(...arguments),this._reader=new Dg.default(this._settings)}read(t){let r=this._getRootDirectory(t),n=this._getReaderOptions(t),o=this.api(r,t,n),i=new Ng.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)}};Wo.default=Go});var wc=S(Ko=>{"use strict";l();Object.defineProperty(Ko,"__esModule",{value:!0});var Hg=st(),jg=$r(),qg=Fr(),zo=class extends qg.default{constructor(){super(...arguments),this._walkSync=jg.walkSync,this._statSync=Hg.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)}};Ko.default=zo});var Ec=S(Xo=>{"use strict";l();Object.defineProperty(Xo,"__esModule",{value:!0});var Bg=wc(),Ug=Mr(),Yo=class extends Ug.default{constructor(){super(...arguments),this._reader=new Bg.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)}};Xo.default=Yo});var Ac=S(St=>{"use strict";l();Object.defineProperty(St,"__esModule",{value:!0});St.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var bt=G("fs"),Gg=G("os"),Wg=Math.max(Gg.cpus().length,1);St.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:bt.lstat,lstatSync:bt.lstatSync,stat:bt.stat,statSync:bt.statSync,readdir:bt.readdir,readdirSync:bt.readdirSync};var Qo=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,Wg),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({},St.DEFAULT_FILE_SYSTEM_ADAPTER),t)}};St.default=Qo});var Lr=S((nS,Pc)=>{"use strict";l();var kc=Pa(),zg=Sc(),Kg=Rc(),Yg=Ec(),Zo=Ac(),Re=Ve();async function Jo(e,t){Pe(e);let r=ei(e,zg.default,t),n=await Promise.all(r);return Re.array.flatten(n)}(function(e){e.glob=e,e.globSync=t,e.globStream=r,e.async=e;function t(f,c){Pe(f);let d=ei(f,Yg.default,c);return Re.array.flatten(d)}e.sync=t;function r(f,c){Pe(f);let d=ei(f,Kg.default,c);return Re.stream.merge(d)}e.stream=r;function n(f,c){Pe(f);let d=[].concat(f),p=new Zo.default(c);return kc.generate(d,p)}e.generateTasks=n;function o(f,c){Pe(f);let d=new Zo.default(c);return Re.pattern.isDynamicPattern(f,d)}e.isDynamicPattern=o;function i(f){return Pe(f),Re.path.escape(f)}e.escapePath=i;function s(f){return Pe(f),Re.path.convertPathToPattern(f)}e.convertPathToPattern=s;let a;(function(f){function c(p){return Pe(p),Re.path.escapePosixPath(p)}f.escapePath=c;function d(p){return Pe(p),Re.path.convertPosixPathToPattern(p)}f.convertPathToPattern=d})(a=e.posix||(e.posix={}));let u;(function(f){function c(p){return Pe(p),Re.path.escapeWindowsPath(p)}f.escapePath=c;function d(p){return Pe(p),Re.path.convertWindowsPathToPattern(p)}f.convertPathToPattern=d})(u=e.win32||(e.win32={}))})(Jo||(Jo={}));function ei(e,t,r){let n=[].concat(e),o=new Zo.default(r),i=kc.generate(n,o),s=new t(o);return i.map(s.read,s)}function Pe(e){if(![].concat(e).every(n=>Re.string.isString(n)&&!Re.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}Pc.exports=Jo});var Tc=S((iS,Oc)=>{"use strict";l();var Rt=1e3,wt=Rt*60,Et=wt*60,ct=Et*24,Xg=ct*7,Qg=ct*365.25;Oc.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Zg(e);if(r==="number"&&isFinite(e))return t.long?eh(e):Jg(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Zg(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Qg;case"weeks":case"week":case"w":return r*Xg;case"days":case"day":case"d":return r*ct;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Et;case"minutes":case"minute":case"mins":case"min":case"m":return r*wt;case"seconds":case"second":case"secs":case"sec":case"s":return r*Rt;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Jg(e){var t=Math.abs(e);return t>=ct?Math.round(e/ct)+"d":t>=Et?Math.round(e/Et)+"h":t>=wt?Math.round(e/wt)+"m":t>=Rt?Math.round(e/Rt)+"s":e+"ms"}function eh(e){var t=Math.abs(e);return t>=ct?Nr(e,t,ct,"day"):t>=Et?Nr(e,t,Et,"hour"):t>=wt?Nr(e,t,wt,"minute"):t>=Rt?Nr(e,t,Rt,"second"):e+" ms"}function Nr(e,t,r,n){var o=t>=r*1.5;return Math.round(e/r)+" "+n+(o?"s":"")}});var ti=S((aS,$c)=>{"use strict";l();function th(e){r.debug=r,r.default=r,r.coerce=u,r.disable=i,r.enable=o,r.enabled=s,r.humanize=Tc(),r.destroy=f,Object.keys(e).forEach(c=>{r[c]=e[c]}),r.names=[],r.skips=[],r.formatters={};function t(c){let d=0;for(let p=0;p<c.length;p++)d=(d<<5)-d+c.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(c){let d,p=null,_,x;function C(...b){if(!C.enabled)return;let A=C,k=Number(new Date),I=k-(d||k);A.diff=I,A.prev=d,A.curr=k,d=k,b[0]=r.coerce(b[0]),typeof b[0]!="string"&&b.unshift("%O");let U=0;b[0]=b[0].replace(/%([a-zA-Z%])/g,(M,R)=>{if(M==="%%")return"%";U++;let P=r.formatters[R];if(typeof P=="function"){let $=b[U];M=P.call(A,$),b.splice(U,1),U--}return M}),r.formatArgs.call(A,b),(A.log||r.log).apply(A,b)}return C.namespace=c,C.useColors=r.useColors(),C.color=r.selectColor(c),C.extend=n,C.destroy=r.destroy,Object.defineProperty(C,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(_!==r.namespaces&&(_=r.namespaces,x=r.enabled(c)),x),set:b=>{p=b}}),typeof r.init=="function"&&r.init(C),C}function n(c,d){let p=r(this.namespace+(typeof d>"u"?":":d)+c);return p.log=this.log,p}function o(c){r.save(c),r.namespaces=c,r.names=[],r.skips=[];let d,p=(typeof c=="string"?c:"").split(/[\s,]+/),_=p.length;for(d=0;d<_;d++)p[d]&&(c=p[d].replace(/\*/g,".*?"),c[0]==="-"?r.skips.push(new RegExp("^"+c.slice(1)+"$")):r.names.push(new RegExp("^"+c+"$")))}function i(){let c=[...r.names.map(a),...r.skips.map(a).map(d=>"-"+d)].join(",");return r.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let d,p;for(d=0,p=r.skips.length;d<p;d++)if(r.skips[d].test(c))return!1;for(d=0,p=r.names.length;d<p;d++)if(r.names[d].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function u(c){return c instanceof Error?c.stack||c.message:c}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}$c.exports=th});var Fc=S((Ce,Dr)=>{"use strict";l();Ce.formatArgs=nh;Ce.save=oh;Ce.load=ih;Ce.useColors=rh;Ce.storage=sh();Ce.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ce.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function rh(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function nh(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+Dr.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),e.splice(n,0,t)}Ce.log=console.debug||console.log||(()=>{});function oh(e){try{e?Ce.storage.setItem("debug",e):Ce.storage.removeItem("debug")}catch{}}function ih(){let e;try{e=Ce.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function sh(){try{return localStorage}catch{}}Dr.exports=ti()(Ce);var{formatters:ah}=Dr.exports;ah.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Mc=S((uS,Ic)=>{"use strict";l();Ic.exports=(e,t=process.argv)=>{let r=e.startsWith("-")?"":e.length===1?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return n!==-1&&(o===-1||n<o)}});var Dc=S((pS,Nc)=>{"use strict";l();var ch=G("os"),Lc=G("tty"),we=Mc(),{env:le}=process,Vr;we("no-color")||we("no-colors")||we("color=false")||we("color=never")?Vr=0:(we("color")||we("colors")||we("color=true")||we("color=always"))&&(Vr=1);function lh(){if("FORCE_COLOR"in le)return le.FORCE_COLOR==="true"?1:le.FORCE_COLOR==="false"?0:le.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(le.FORCE_COLOR,10),3)}function uh(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function fh(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let n=lh();n!==void 0&&(Vr=n);let o=r?Vr:n;if(o===0)return 0;if(r){if(we("color=16m")||we("color=full")||we("color=truecolor"))return 3;if(we("color=256"))return 2}if(e&&!t&&o===void 0)return 0;let i=o||0;if(le.TERM==="dumb")return i;if(process.platform==="win32"){let s=ch.release().split(".");return Number(s[0])>=10&&Number(s[2])>=10586?Number(s[2])>=14931?3:2:1}if("CI"in le)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(s=>s in le)||le.CI_NAME==="codeship"?1:i;if("TEAMCITY_VERSION"in le)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(le.TEAMCITY_VERSION)?1:0;if(le.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in le){let s=Number.parseInt((le.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(le.TERM_PROGRAM){case"iTerm.app":return s>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(le.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(le.TERM)||"COLORTERM"in le?1:i}function ri(e,t={}){let r=fh(e,{streamIsTTY:e&&e.isTTY,...t});return uh(r)}Nc.exports={supportsColor:ri,stdout:ri({isTTY:Lc.isatty(1)}),stderr:ri({isTTY:Lc.isatty(2)})}});var Hc=S((ue,jr)=>{"use strict";l();var ph=G("tty"),Hr=G("util");ue.init=_h;ue.log=hh;ue.formatArgs=mh;ue.save=yh;ue.load=vh;ue.useColors=dh;ue.destroy=Hr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ue.colors=[6,2,3,4,5,1];try{let e=Dc();e&&(e.stderr||e).level>=2&&(ue.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ue.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),n=process.env[t];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),e[r]=n,e},{});function dh(){return"colors"in ue.inspectOpts?!!ue.inspectOpts.colors:ph.isatty(process.stderr.fd)}function mh(e){let{namespace:t,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
4
- `).join(`
5
- `+i),e.push(o+"m+"+jr.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=gh()+t+" "+e[0]}function gh(){return ue.inspectOpts.hideDate?"":new Date().toISOString()+" "}function hh(...e){return process.stderr.write(Hr.format(...e)+`
6
- `)}function yh(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function vh(){return process.env.DEBUG}function _h(e){e.inspectOpts={};let t=Object.keys(ue.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=ue.inspectOpts[t[r]]}jr.exports=ti()(ue);var{formatters:Vc}=jr.exports;Vc.o=function(e){return this.inspectOpts.colors=this.useColors,Hr.inspect(e,this.inspectOpts).split(`
7
- `).map(t=>t.trim()).join(" ")};Vc.O=function(e){return this.inspectOpts.colors=this.useColors,Hr.inspect(e,this.inspectOpts)}});var oi=S((gS,ni)=>{"use strict";l();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ni.exports=Fc():ni.exports=Hc()});var Gc=S((xS,Uc)=>{"use strict";l();var{hasOwnProperty:ii}=Object.prototype,si=(e,t={})=>{typeof t=="string"&&(t={section:t}),t.align=t.align===!0,t.newline=t.newline===!0,t.sort=t.sort===!0,t.whitespace=t.whitespace===!0||t.align===!0,t.platform=t.platform||typeof process<"u"&&process.platform,t.bracketedArray=t.bracketedArray!==!1;let r=t.platform==="win32"?`\r
8
- `:`
9
- `,n=t.whitespace?" = ":"=",o=[],i=t.sort?Object.keys(e).sort():Object.keys(e),s=0;t.align&&(s=He(i.filter(f=>e[f]===null||Array.isArray(e[f])||typeof e[f]!="object").map(f=>Array.isArray(e[f])?`${f}[]`:f).concat([""]).reduce((f,c)=>He(f).length>=He(c).length?f:c)).length);let a="",u=t.bracketedArray?"[]":"";for(let f of i){let c=e[f];if(c&&Array.isArray(c))for(let d of c)a+=He(`${f}${u}`).padEnd(s," ")+n+He(d)+r;else c&&typeof c=="object"?o.push(f):a+=He(f).padEnd(s," ")+n+He(c)+r}t.section&&a.length&&(a="["+He(t.section)+"]"+(t.newline?r+r:r)+a);for(let f of o){let c=qc(f,".").join("\\."),d=(t.section?t.section+".":"")+c,p=si(e[f],{...t,section:d});a.length&&p.length&&(a+=r),a+=p}return a};function qc(e,t){var r=0,n=0,o=0,i=[];do if(o=e.indexOf(t,r),o!==-1){if(r=o+t.length,o>0&&e[o-1]==="\\")continue;i.push(e.slice(n,o)),n=o+t.length}while(o!==-1);return i.push(e.slice(n)),i}var jc=(e,t={})=>{t.bracketedArray=t.bracketedArray!==!1;let r=Object.create(null),n=r,o=null,i=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,s=e.split(/[\r\n]+/g),a={};for(let f of s){if(!f||f.match(/^\s*[;#]/)||f.match(/^\s*$/))continue;let c=f.match(i);if(!c)continue;if(c[1]!==void 0){if(o=qr(c[1]),o==="__proto__"){n=Object.create(null);continue}n=r[o]=r[o]||Object.create(null);continue}let d=qr(c[2]),p;t.bracketedArray?p=d.length>2&&d.slice(-2)==="[]":(a[d]=(a?.[d]||0)+1,p=a[d]>1);let _=p?d.slice(0,-2):d;if(_==="__proto__")continue;let x=c[3]?qr(c[4]):!0,C=x==="true"||x==="false"||x==="null"?JSON.parse(x):x;p&&(ii.call(n,_)?Array.isArray(n[_])||(n[_]=[n[_]]):n[_]=[]),Array.isArray(n[_])?n[_].push(C):n[_]=C}let u=[];for(let f of Object.keys(r)){if(!ii.call(r,f)||typeof r[f]!="object"||Array.isArray(r[f]))continue;let c=qc(f,".");n=r;let d=c.pop(),p=d.replace(/\\\./g,".");for(let _ of c)_!=="__proto__"&&((!ii.call(n,_)||typeof n[_]!="object")&&(n[_]=Object.create(null)),n=n[_]);n===r&&p===d||(n[p]=r[f],u.push(f))}for(let f of u)delete r[f];return r},Bc=e=>e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"),He=e=>typeof e!="string"||e.match(/[=\r\n]/)||e.match(/^\[/)||e.length>1&&Bc(e)||e!==e.trim()?JSON.stringify(e):e.split(";").join("\\;").split("#").join("\\#"),qr=(e,t)=>{if(e=(e||"").trim(),Bc(e)){e.charAt(0)==="'"&&(e=e.slice(1,-1));try{e=JSON.parse(e)}catch{}}else{let r=!1,n="";for(let o=0,i=e.length;o<i;o++){let s=e.charAt(o);if(r)"\\;#".indexOf(s)!==-1?n+=s:n+="\\"+s,r=!1;else{if(";#".indexOf(s)!==-1)break;s==="\\"?r=!0:n+=s}}return r&&(n+="\\"),n.trim()}return e};Uc.exports={parse:jc,decode:jc,stringify:si,encode:si,safe:He,unsafe:qr}});var li=S((kS,Xc)=>{"use strict";l();var Eh=G("os");Xc.exports=Eh.homedir||function(){var t=process.env.HOME,r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE+process.env.HOMEPATH||t||null:process.platform==="darwin"?t||(r?"/Users/"+r:null):process.platform==="linux"?t||(process.getuid()===0?"/root":r?"/home/"+r:null):t||null}});var ui=S((OS,Qc)=>{"use strict";l();Qc.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(r,n){return n};var t=new Error().stack;return Error.prepareStackTrace=e,t[2].getFileName()}});var Zc=S(($S,Wt)=>{"use strict";l();var Ah=process.platform==="win32",kh=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,fi={};function Ph(e){return kh.exec(e).slice(1)}fi.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Ph(e);if(!t||t.length!==5)throw new TypeError("Invalid path '"+e+"'");return{root:t[1],dir:t[0]===t[1]?t[0]:t[0].slice(0,-1),base:t[2],ext:t[4],name:t[3]}};var Oh=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,pi={};function Th(e){return Oh.exec(e).slice(1)}pi.parse=function(e){if(typeof e!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=Th(e);if(!t||t.length!==5)throw new TypeError("Invalid path '"+e+"'");return{root:t[1],dir:t[0].slice(0,-1),base:t[2],ext:t[4],name:t[3]}};Ah?Wt.exports=fi.parse:Wt.exports=pi.parse;Wt.exports.posix=pi.parse;Wt.exports.win32=fi.parse});var di=S((IS,rl)=>{"use strict";l();var tl=G("path"),Jc=tl.parse||Zc(),el=function(t,r){var n="/";/^([A-Za-z]:)/.test(t)?n="":/^\\\\/.test(t)&&(n="\\\\");for(var o=[t],i=Jc(t);i.dir!==o[o.length-1];)o.push(i.dir),i=Jc(i.dir);return o.reduce(function(s,a){return s.concat(r.map(function(u){return tl.resolve(n,a,u)}))},[])};rl.exports=function(t,r,n){var o=r&&r.moduleDirectory?[].concat(r.moduleDirectory):["node_modules"];if(r&&typeof r.paths=="function")return r.paths(n,t,function(){return el(t,o)},r);var i=el(t,o);return r&&r.paths?i.concat(r.paths):i}});var mi=S((LS,nl)=>{"use strict";l();nl.exports=function(e,t){return t||{}}});var sl=S((DS,il)=>{"use strict";l();var $h="Function.prototype.bind called on incompatible ",Fh=Object.prototype.toString,Ih=Math.max,Mh="[object Function]",ol=function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},Lh=function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},Nh=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};il.exports=function(t){var r=this;if(typeof r!="function"||Fh.apply(r)!==Mh)throw new TypeError($h+r);for(var n=Lh(arguments,1),o,i=function(){if(this instanceof o){var c=r.apply(this,ol(n,arguments));return Object(c)===c?c:this}return r.apply(t,ol(n,arguments))},s=Ih(0,r.length-n.length),a=[],u=0;u<s;u++)a[u]="$"+u;if(o=Function("binder","return function ("+Nh(a,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var f=function(){};f.prototype=r.prototype,o.prototype=new f,f.prototype=null}return o}});var cl=S((HS,al)=>{"use strict";l();var Dh=sl();al.exports=Function.prototype.bind||Dh});var ul=S((qS,ll)=>{"use strict";l();var Vh=Function.prototype.call,Hh=Object.prototype.hasOwnProperty,jh=cl();ll.exports=jh.call(Vh,Hh)});var fl=S((US,qh)=>{qh.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var zt=S((GS,ml)=>{"use strict";l();var Bh=ul();function Uh(e,t){for(var r=e.split("."),n=t.split(" "),o=n.length>1?n[0]:"=",i=(n.length>1?n[1]:n[0]).split("."),s=0;s<3;++s){var a=parseInt(r[s]||0,10),u=parseInt(i[s]||0,10);if(a!==u)return o==="<"?a<u:o===">="?a>=u:!1}return o===">="}function pl(e,t){var r=t.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n<r.length;++n)if(!Uh(e,r[n]))return!1;return!0}function Gh(e,t){if(typeof t=="boolean")return t;var r=typeof e>"u"?process.versions&&process.versions.node:e;if(typeof r!="string")throw new TypeError(typeof e>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(t&&typeof t=="object"){for(var n=0;n<t.length;++n)if(pl(r,t[n]))return!0;return!1}return pl(r,t)}var dl=fl();ml.exports=function(t,r){return Bh(dl,t)&&Gh(r,dl[t])}});var yl=S((zS,hl)=>{"use strict";l();var lt=G("fs"),Wh=li(),oe=G("path"),zh=ui(),Kh=di(),Yh=mi(),Xh=zt(),Qh=process.platform!=="win32"&&lt.realpath&&typeof lt.realpath.native=="function"?lt.realpath.native:lt.realpath,gl=Wh(),Zh=function(){return[oe.join(gl,".node_modules"),oe.join(gl,".node_libraries")]},Jh=function(t,r){lt.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},ey=function(t,r){lt.stat(t,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},ty=function(t,r){Qh(t,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?t:o)})},Kt=function(t,r,n,o){n&&n.preserveSymlinks===!1?t(r,o):o(null,r)},ry=function(t,r,n){t(r,function(o,i){if(o)n(o);else try{var s=JSON.parse(i);n(null,s)}catch{n(null)}})},ny=function(t,r,n){for(var o=Kh(r,n,t),i=0;i<o.length;i++)o[i]=oe.join(o[i],t);return o};hl.exports=function(t,r,n){var o=n,i=r;if(typeof r=="function"&&(o=i,i={}),typeof t!="string"){var s=new TypeError("Path must be a string.");return process.nextTick(function(){o(s)})}i=Yh(t,i);var a=i.isFile||Jh,u=i.isDirectory||ey,f=i.readFile||lt.readFile,c=i.realpath||ty,d=i.readPackage||ry;if(i.readFile&&i.readPackage){var p=new TypeError("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(p)})}var _=i.packageIterator,x=i.extensions||[".js"],C=i.includeCoreModules!==!1,b=i.basedir||oe.dirname(zh()),A=i.filename||b;i.paths=i.paths||Zh();var k=oe.resolve(b);Kt(c,k,i,function(h,T){h?o(h):U(T)});var I;function U(h){if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t))I=oe.resolve(h,t),(t==="."||t===".."||t.slice(-1)==="/")&&(I+="/"),/\/$/.test(t)&&I===h?P(I,i.package,w):M(I,i.package,w);else{if(C&&Xh(t))return o(null,t);K(t,h,function(T,L,V){if(T)o(T);else{if(L)return Kt(c,L,i,function(v,q){v?o(v):o(null,q,V)});var y=new Error("Cannot find module '"+t+"' from '"+A+"'");y.code="MODULE_NOT_FOUND",o(y)}})}}function w(h,T,L){h?o(h):T?o(null,T,L):P(I,function(V,y,v){if(V)o(V);else if(y)Kt(c,y,i,function(F,N){F?o(F):o(null,N,v)});else{var q=new Error("Cannot find module '"+t+"' from '"+A+"'");q.code="MODULE_NOT_FOUND",o(q)}})}function M(h,T,L){var V=T,y=L;typeof V=="function"&&(y=V,V=void 0);var v=[""].concat(x);q(v,h,V);function q(F,N,W){if(F.length===0)return y(null,void 0,W);var j=N+F[0],ie=W;ie?te(null,ie):R(oe.dirname(j),te);function te(fe,H,ye){if(ie=H,fe)return y(fe);if(ye&&ie&&i.pathFilter){var gt=oe.relative(ye,j),O=gt.slice(0,gt.length-F[0].length),Y=i.pathFilter(ie,N,O);if(Y)return q([""].concat(x.slice()),oe.resolve(ye,Y),ie)}a(j,Ne)}function Ne(fe,H){if(fe)return y(fe);if(H)return y(null,j,ie);q(F.slice(1),N,ie)}}}function R(h,T){if(h===""||h==="/"||process.platform==="win32"&&/^\w:[/\\]*$/.test(h)||/[/\\]node_modules[/\\]*$/.test(h))return T(null);Kt(c,h,i,function(L,V){if(L)return R(oe.dirname(h),T);var y=oe.join(V,"package.json");a(y,function(v,q){if(!q)return R(oe.dirname(h),T);d(f,y,function(F,N){F&&T(F);var W=N;W&&i.packageFilter&&(W=i.packageFilter(W,y)),T(null,W,h)})})})}function P(h,T,L){var V=L,y=T;typeof y=="function"&&(V=y,y=i.package),Kt(c,h,i,function(v,q){if(v)return V(v);var F=oe.join(q,"package.json");a(F,function(N,W){if(N)return V(N);if(!W)return M(oe.join(h,"index"),y,V);d(f,F,function(j,ie){if(j)return V(j);var te=ie;if(te&&i.packageFilter&&(te=i.packageFilter(te,F)),te&&te.main){if(typeof te.main!="string"){var Ne=new TypeError("package \u201C"+te.name+"\u201D `main` must be a string");return Ne.code="INVALID_PACKAGE_MAIN",V(Ne)}(te.main==="."||te.main==="./")&&(te.main="index"),M(oe.resolve(h,te.main),te,function(fe,H,ye){if(fe)return V(fe);if(H)return V(null,H,ye);if(!ye)return M(oe.join(h,"index"),ye,V);var gt=oe.resolve(h,ye.main);P(gt,ye,function(O,Y,E){if(O)return V(O);if(Y)return V(null,Y,E);M(oe.join(h,"index"),E,V)})});return}M(oe.join(h,"/index"),te,V)})})})}function $(h,T){if(T.length===0)return h(null,void 0);var L=T[0];u(oe.dirname(L),V);function V(q,F){if(q)return h(q);if(!F)return $(h,T.slice(1));M(L,i.package,y)}function y(q,F,N){if(q)return h(q);if(F)return h(null,F,N);P(L,i.package,v)}function v(q,F,N){if(q)return h(q);if(F)return h(null,F,N);$(h,T.slice(1))}}function K(h,T,L){var V=function(){return ny(h,T,i)};$(L,_?_(h,T,V,i):V())}}});var vl=S((YS,oy)=>{oy.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],smalloc:">= 0.11.5 && < 3",_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var bl=S((XS,Cl)=>{"use strict";l();var iy=zt(),_l=vl(),xl={};for(Ur in _l)Object.prototype.hasOwnProperty.call(_l,Ur)&&(xl[Ur]=iy(Ur));var Ur;Cl.exports=xl});var Rl=S((ZS,Sl)=>{"use strict";l();var sy=zt();Sl.exports=function(t){return sy(t)}});var Al=S((eR,El)=>{"use strict";l();var ay=zt(),ut=G("fs"),ge=G("path"),cy=li(),ly=ui(),uy=di(),fy=mi(),py=process.platform!=="win32"&&ut.realpathSync&&typeof ut.realpathSync.native=="function"?ut.realpathSync.native:ut.realpathSync,wl=cy(),dy=function(){return[ge.join(wl,".node_modules"),ge.join(wl,".node_libraries")]},my=function(t){try{var r=ut.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},gy=function(t){try{var r=ut.statSync(t,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},hy=function(t){try{return py(t)}catch(r){if(r.code!=="ENOENT")throw r}return t},Yt=function(t,r,n){return n&&n.preserveSymlinks===!1?t(r):r},yy=function(t,r){var n=t(r);try{var o=JSON.parse(n);return o}catch{}},vy=function(t,r,n){for(var o=uy(r,n,t),i=0;i<o.length;i++)o[i]=ge.join(o[i],t);return o};El.exports=function(t,r){if(typeof t!="string")throw new TypeError("Path must be a string.");var n=fy(t,r),o=n.isFile||my,i=n.readFileSync||ut.readFileSync,s=n.isDirectory||gy,a=n.realpathSync||hy,u=n.readPackageSync||yy;if(n.readFileSync&&n.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var f=n.packageIterator,c=n.extensions||[".js"],d=n.includeCoreModules!==!1,p=n.basedir||ge.dirname(ly()),_=n.filename||p;n.paths=n.paths||dy();var x=Yt(a,ge.resolve(p),n);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)){var C=ge.resolve(x,t);(t==="."||t===".."||t.slice(-1)==="/")&&(C+="/");var b=I(C)||w(C);if(b)return Yt(a,b,n)}else{if(d&&ay(t))return t;var A=M(t,x);if(A)return Yt(a,A,n)}var k=new Error("Cannot find module '"+t+"' from '"+_+"'");throw k.code="MODULE_NOT_FOUND",k;function I(R){var P=U(ge.dirname(R));if(P&&P.dir&&P.pkg&&n.pathFilter){var $=ge.relative(P.dir,R),K=n.pathFilter(P.pkg,R,$);K&&(R=ge.resolve(P.dir,K))}if(o(R))return R;for(var h=0;h<c.length;h++){var T=R+c[h];if(o(T))return T}}function U(R){if(!(R===""||R==="/")&&!(process.platform==="win32"&&/^\w:[/\\]*$/.test(R))&&!/[/\\]node_modules[/\\]*$/.test(R)){var P=ge.join(Yt(a,R,n),"package.json");if(!o(P))return U(ge.dirname(R));var $=u(i,P);return $&&n.packageFilter&&($=n.packageFilter($,R)),{pkg:$,dir:R}}}function w(R){var P=ge.join(Yt(a,R,n),"/package.json");if(o(P)){try{var $=u(i,P)}catch{}if($&&n.packageFilter&&($=n.packageFilter($,R)),$&&$.main){if(typeof $.main!="string"){var K=new TypeError("package \u201C"+$.name+"\u201D `main` must be a string");throw K.code="INVALID_PACKAGE_MAIN",K}($.main==="."||$.main==="./")&&($.main="index");try{var h=I(ge.resolve(R,$.main));if(h)return h;var T=w(ge.resolve(R,$.main));if(T)return T}catch{}}}return I(ge.join(R,"/index"))}function M(R,P){for(var $=function(){return vy(R,P,n)},K=f?f(R,P,$,n):$(),h=0;h<K.length;h++){var T=K[h];if(s(ge.dirname(T))){var L=I(T);if(L)return L;var V=w(T);if(V)return V}}}}});var Pl=S((rR,kl)=>{"use strict";l();var Gr=yl();Gr.core=bl();Gr.isCore=Rl();Gr.sync=Al();kl.exports=Gr});l();import m1 from"node:process";import g1 from"yargs";import{hideBin as h1}from"yargs/helpers";var ht="0.17.5";l();var Ae=J(pe(),1),pu=J(Lr(),1);import{dirname as Yy,join as Xy,resolve as en}from"node:path";import{readFile as Qy}from"node:fs/promises";import Jt from"fs-extra";import Zy from"gray-matter";import Jy from"markdown-it";import{Feed as ev}from"feed";import pt from"consola";l();var nu=J(oi(),1),ou=J(Lr(),1),Qe=J(pe(),1);import{dirname as Uy}from"node:path";import eu from"node:process";import{resolve as Zt}from"pathe";import ru from"fs-extra";import{ensureSuffix as tu,uniq as Gy}from"@antfu/utils";import iu from"defu";import su from"consola";l();l();import{spawn as xh}from"cross-spawn";function Bt(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=xh("git",o),s="";i.stdout.on("data",a=>s+=String(a)),i.on("close",()=>{r(+new Date(s))}),i.on("error",()=>{r(0)})})}l();import{join as Ol}from"node:path";import _y from"is-installed-globally";l();var zc=J(Gc(),1);import ae from"node:process";import ce from"node:path";import ai from"node:os";import Br from"node:fs";var Gt=ae.platform==="win32",Wc=e=>{try{return zc.default.parse(Br.readFileSync(e,"utf8")).prefix}catch{}},Ch=()=>Object.keys(ae.env).reduce((e,t)=>/^npm_config_prefix$/i.test(t)?ae.env[t]:e,void 0),bh=()=>{if(Gt&&ae.env.APPDATA)return ce.join(ae.env.APPDATA,"/npm/etc/npmrc");if(ae.execPath.includes("/Cellar/node")){let e=ae.execPath.slice(0,ae.execPath.indexOf("/Cellar/node"));return ce.join(e,"/lib/node_modules/npm/npmrc")}if(ae.execPath.endsWith("/bin/node")){let e=ce.dirname(ce.dirname(ae.execPath));return ce.join(e,"/etc/npmrc")}},Sh=()=>{if(Gt){let{APPDATA:e}=ae.env;return e?ce.join(e,"npm"):ce.dirname(ae.execPath)}return ce.dirname(ce.dirname(ae.execPath))},Rh=()=>{let e=Ch();if(e)return e;let t=Wc(ce.join(ai.homedir(),".npmrc"));if(t)return t;if(ae.env.PREFIX)return ae.env.PREFIX;let r=Wc(bh());return r||Sh()},Ut=ce.resolve(Rh()),Kc=()=>{if(Gt&&ae.env.LOCALAPPDATA){let e=ce.join(ae.env.LOCALAPPDATA,"Yarn");if(Br.existsSync(e))return e}return!1},wh=()=>{if(ae.env.PREFIX)return ae.env.PREFIX;let e=Kc();if(e)return e;let t=ce.join(ai.homedir(),".config/yarn");if(Br.existsSync(t))return t;let r=ce.join(ai.homedir(),".yarn-config");return Br.existsSync(r)?r:Ut},Ie={};Ie.npm={};Ie.npm.prefix=Ut;Ie.npm.packages=ce.join(Ut,Gt?"node_modules":"lib/node_modules");Ie.npm.binaries=Gt?Ut:ce.join(Ut,"bin");var Yc=ce.resolve(wh());Ie.yarn={};Ie.yarn.prefix=Yc;Ie.yarn.packages=ce.join(Yc,Kc()?"Data/global/node_modules":"global/node_modules");Ie.yarn.binaries=ce.join(Ie.yarn.packages,".bin");var ci=Ie;var $l=J(Pl(),1);import Tl from"consola";function Me(e,t=!1,r={preserveSymlinks:!1}){try{return(0,$l.sync)(e,r)}catch(n){Tl.log(n)}if(_y){try{return G.resolve(Ol(ci.yarn.packages,e))}catch{}try{return G.resolve(Ol(ci.npm.packages,e))}catch{}}if(t)throw new Error(`Failed to resolve package ${e}`);Tl.error(`Failed to resolve package ${e}`)}l();l();var Wr="<!-- more -->",At=/^https?:/i,Fl=/^pathname:\/\//;function Il(e){return At.test(e)}function gi(e){return e.replace(/\\/g,"/")}function hi(e,t){return t.startsWith(e)?t:e+t}function ee(e){return`/@fs${hi("/",gi(e))}`}function Ml(e){return e.startsWith("/")||/^\.\.?[\/\\]/.test(e)}function Ll(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}l();l();import xy from"node:process";import{fileURLToPath as Cy}from"node:url";import by from"jiti";import{resolve as Sy}from"pathe";function Ry(e){let{name:t,cwd:r}=e,n=Sy(r,`${t}.config.ts`),o={};try{o=by(Cy(import.meta.url),{interopDefault:!0,requireCache:!1,esmResolve:!0})(n)}catch{}return{config:o,configFile:n}}async function kt(e,t={}){let{config:r,configFile:n}=Ry({name:e,cwd:t.cwd||xy.cwd()}),o=r;return typeof r=="function"&&(o=await r(t.valaxyOptions||{})),{config:o,configFile:n}}l();var Ot=J(pe(),1);import Ay from"node:process";import{createDefu as ky}from"defu";import{mergeConfig as Py}from"vite";import{isFunction as Dl}from"@antfu/utils";import Oy from"consola";l();function Ye(){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=J(pe(),1);import{webcrypto as Nl}from"node:crypto";import wy from"consola";var zr={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:{}},statistics:{enable:!1,readTime:{speed:{cn:300,en:100}}},pageSize:7,encrypt:{enable:!1,algorithm:"AES-CBC",salt:Nl.getRandomValues(new Uint8Array(16)),iv:Nl.getRandomValues(new Uint8Array(16))},redirects:{useVueRouter:!0,rules:[]}};function FR(e){return e}async function Ey(e){return kt("site",{cwd:e})}async function Kr(e){let t=Ye(),{config:r,configFile:n}=await Ey(e),o=t();return r&&n&&wy.success(`Resolve ${(0,Pt.cyan)("siteConfig")} from ${(0,Pt.dim)(n)} ${(0,Pt.yellow)(o)}`),{siteConfig:r,siteConfigFile:n}}var Vl={ignoreDeadLinks:!0,siteConfig:zr,theme:"yun",themeConfig:{pkg:{name:"",version:""}},runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}},modules:{rss:{enable:!0}},features:{katex:!0},vite:{build:{rollupOptions:{external:[]}}},devtools:!0};function Ty(e){return e}var UR=Ty;async function Xt(e,t){return await kt("valaxy",{cwd:e,valaxyOptions:t})}var ft=ky((e,t,r)=>{if(Dl(e[t])&&Dl(r)&&(e[t]=function(...n){e[t].call(this,...n),r.call(this,...n)}),t==="vite")return e[t]=Py(e[t],r),!0});async function Hl(e){let t=e.userRoot||Ay.cwd(),r=Ye(),{config:n,configFile:o}=await Xt(t),i=r();n&&o&&Oy.success(`Resolve ${(0,Ot.cyan)("userValaxyConfig")} from ${(0,Ot.dim)(o)} ${(0,Ot.yellow)(i)}`);let s=e.theme||n?.theme||"yun";return{config:n,configFile:o,theme:s}}l();import $y from"node:path";import Fy from"fs-extra";function Iy(e){return e}var XR=Iy;async function jl(e,t){let r={};for(let n of e){if(!Fy.existsSync($y.resolve(n.root,"valaxy.config.ts")))continue;let{config:o,configFile:i}=await Xt(n.root,t);o&&(n.configFile=i,r=ft(o,r))}return r}l();var Xr=J(pe(),1);import Ly from"defu";l();var Bl=J(pe(),1);import My from"consola";l();import ql from"node:process";function Qt(){return ql.env.NODE_ENV==="production"}function yi(e="development"){ql.env.NODE_ENV=e,Le.level=Qt()?2:3}function Tt(){return yi("production")}var Le=My.create({level:Qt()?2:3}),vi=`${(0,Bl.magenta)("valaxy")}:`,$t={success:e=>Le.success(vi,e),info:e=>Le.info(vi,e),ready:e=>Le.ready(vi,e)};async function Yr(e){return kt("theme",{cwd:e})}async function Ul(e){let{config:t,configFile:r}=await Yr(e.userRoot);if(t&&r&&Le.info(`Resolve ${(0,Xr.cyan)("themeConfig")} from ${(0,Xr.dim)(r)}`),e?.themeRoot){let{config:n}=await Yr(e.themeRoot);t=Ly(t||{},n)}return{themeConfig:t,themeConfigFile:r}}function Ny(e){return e}var uw=Ny;function dw(e){return e}l();var Xe=J(pe(),1);import Xl from"node:process";import{resolve as Vy}from"pathe";import zl from"fs-extra";import Kl from"defu";import Hy from"ora";l();import{dirname as Gl}from"node:path";import{resolve as Wl}from"pathe";import Dy from"fs-extra";function Qr(e,t){if(!e)return"";if(Ml(e))if(t){let r=Dy.lstatSync(t).isFile();return Wl(r?Gl(t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return Wl(Gl(Me(`${e}/package.json`)||""))}async function Ql(e,t=Xl.cwd()){let r=Hy(`Resolve ${(0,Xe.cyan)("addons")} from ${(0,Xe.dim)(t)}`).start(),n={},o=s=>{s&&(n[s.name]=Kl(n[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){o(await Yl(s,{cwd:t}));continue}typeof s=="object"&&o(Kl(await Yl(s.name,{cwd:t}),s||{}))}r.succeed();let i=Object.values(n).filter(s=>s.enable);return i.forEach((s,a)=>{Le.log(` ${a===i.length-1?"\u2514\u2500":"\u251C\u2500"} ${(0,Xe.yellow)(s.name)}${s.global?(0,Xe.cyan)(" (global)"):""} ${(0,Xe.dim)(s.pkg.homepage||s.pkg.repository?.url||s.pkg.repository)}`)}),i}async function Yl(e,t={}){let r=jy(e,t.cwd||Xl.cwd()),n=Vy(r,"./package.json");if(!zl.existsSync(n)){Le.error(`No addon named ${e} found`);return}let o=await zl.readJSON(n);return{enable:!0,name:o.name,global:!!o.global,root:r,options:{},props:{},pkg:o}}function jy(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return Qr(r,t)}l();function Zl(e,t){let r=e.startsWith("valaxy-theme")||e.startsWith(".")?e:`valaxy-theme-${e}`;return Qr(r,t)}l();import{writeFile as qy}from"node:fs/promises";import{ensureFile as By}from"fs-extra";function Zr(e){return e==="/"?"/index":e.endsWith("/")?e.slice(0,-1):e}function Jr(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:Zr(n),to:Zr(r.to)});else t.push({from:Zr(r.from),to:Zr(r.to)});return t}async function Jl(e,t){await By(t),await qy(t,`
10
- <!DOCTYPE html>
11
- <html lang="en">
12
- <head>
13
- <meta charset="UTF-8">
14
- <meta http-equiv="refresh" content="0; url=${e}">
15
- <link rel="canonical" href="${e}">
16
- </head>
17
- <script>
18
- window.location.href = '${e}' + window.location.search + window.location.hash
19
- </script>
20
- </html>
21
- `)}var Wy=(0,nu.default)("valaxy:options");async function zy(e){let{config:t,themeRoot:r,theme:n}=e,o=t.siteConfig;o.url=tu("/",o.url||""),o.cdn.prefix=tu("/",o.cdn.prefix||"");let i=Zt(r,"package.json");try{t.themeConfig.pkg=await ru.readJson(i,"utf-8")}catch{console.error(`valaxy-theme-${n} doesn't have package.json`)}}async function _i(e,t){let{clientRoot:r,themeRoot:n,userRoot:o}=e,i=await Ql(t.addons||[],e.userRoot),s=await jl(i,e);t=ft(t,s);let a=iu(t,Vl);e.config={...a,runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}}},e.addons=i,i.forEach(d=>{e.config.runtimeConfig.addons[d.name]=d});let u=i.map(({root:d})=>d),f=i.map(({name:d})=>d);e.addonRoots=u,e.roots=Gy([r,n,...u,o]);let c=e.config.vite?.build?.rollupOptions?.external||[];return e.config.vite.build.rollupOptions.external=c.filter(d=>!f.includes(d)),await zy(e),e}async function Ee(e={userRoot:eu.cwd()},t="dev"){let r=Uy(Me("valaxy/package.json",!0)),n=Zt(r,"client"),o=Zt(e.userRoot||eu.cwd());su.start(`Resolve ${(0,Qe.magenta)("valaxy")} config...`);let[i,s,a,u]=await Promise.all([Hl(e),Kr(e.userRoot),Yr(e.userRoot),(0,ou.default)(["**.md"],{cwd:Zt(o,"pages"),ignore:["**/node_modules"]})]),{config:f,configFile:c,theme:d}=i,p=Zl(d,e.userRoot),{siteConfig:_,siteConfigFile:x}=s,{config:C,configFile:b}=a,A=Jr(_.redirects?.rules);f=iu({siteConfig:_},{themeConfig:C},f);let k={mode:t,pkgRoot:r,tempDir:Zt(o,".valaxy"),clientRoot:n,userRoot:o,themeRoot:p,addonRoots:[],roots:[],theme:d,config:{...f,runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}}},configFile:c||"",siteConfigFile:x||"",themeConfigFile:b||"",pages:u.sort(),addons:[],redirects:A};Wy(k);let I=await xi(k),U=ft(f,I);return k=await _i(k,U),ru.ensureDirSync(k.tempDir),k}async function xi(e){let t=Ye(),{config:r}=await Xt(e.themeRoot,e),n=t();return r&&su.success(`Resolve ${(0,Qe.cyan)("valaxy.config.ts")} from ${(0,Qe.blue)(`theme(${e.theme})`)} ${(0,Qe.yellow)(n)}`),r}l();import au from"fs-extra";async function cu(e){return await Bt(e,"created")||(await au.stat(e)).ctime}async function lu(e){return await Bt(e,"created")||(await au.stat(e)).mtime}l();function Ze(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}l();function uu(e,t){t.forEach(r=>{r.setup?.(e)})}var tv=Jy({html:!0,breaks:!0,linkify:!0});async function fu(e){pt.info(`${(0,Ae.yellow)("RSS Generating ...")}`);let{config:t}=e,r=t.siteConfig;if(!r.url||r.url==="/"){pt.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};pt.info(`RSS Site Url: ${(0,Ae.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`},u={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(b=>{u.feedLinks[b]=`${n}${a[b]}`});let f=await(0,pu.default)(`${e.userRoot}/pages/posts/**/*.md`),c=[];for await(let b of f){let A=await Qy(b,"utf-8"),{data:k,content:I,excerpt:U}=Zy(A,{excerpt_separator:Wr});if(k.password)continue;if(k.draft){pt.warn(`Ignore draft post: ${(0,Ae.dim)(b)}`);continue}if(k.hide)continue;let w=b;k.date||(k.date=await cu(w)),r.lastUpdated&&(k.updated||(k.updated=await lu(w)));let M=tv.render(U||I.slice(0,100)).replace('src="/',`src="${o}/`);k.image?.startsWith("/")&&(k.image=o+k.image),c.push({title:"",...k,id:(k.id||"").toString(),date:new Date(k.date),published:new Date(k.updated||k.date),content:M,author:[i],link:o+b.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,"")})}c.sort((b,A)=>+new Date(A.published||A.date)-+new Date(b.published||b.date));let d=r.author?.avatar||"/favicon.svg";u.author=i,u.image=Il(d)?r.author?.avatar:`${o}${hi("/",d)}`,u.favicon=`${o}${r.feed?.favicon||r.favicon}`;let p=new ev(u);c.forEach(b=>p.addItem(b)),await Jt.ensureDir(Yy(`./dist/${a.atom}`));let _=en(e.userRoot,"./dist"),x=en(e.userRoot,"public");["rss","atom","json"].forEach(async b=>{let A="",k=`${_}/${a[b]}`;b==="rss"?A=p.rss2():b==="atom"?A=p.atom1():b==="json"&&(A=p.json1()),Jt.writeFileSync(k,A,"utf-8"),pt.success(`[${(0,Ae.cyan)(b)}] dist: ${(0,Ae.dim)(k)}`);let I=en(x,a[b]),U=Xy("public",a[b]);Jt.writeFileSync(I,A,"utf-8"),pt.success(`[${(0,Ae.cyan)(b)}] public: ${(0,Ae.dim)(k)}`);try{let w=en(e.userRoot,".gitignore"),M=await Jt.readFile(w,"utf-8"),R=U.replace(/\\/g,"/");M.includes(R)||(await Jt.appendFile(w,`
22
- # valaxy rss
23
- ${R}
24
- `),pt.success(`Add ${(0,Ae.dim)(R)} to ${(0,Ae.dim)(".gitignore")}`))}catch{}})}var tn={extendCli(e){e.command("rss [root]","generate rss feed",t=>Ze(t).strict().help(),async({root:t})=>{Tt();let r=await Ee({userRoot:t},"build");await fu(r)})},setup(e){e.hook("build:after",()=>{console.log(),fu(e.options)})}};l();var du=J(Lr(),1),et=J(pe(),1);import Ft from"node:path";import Je from"fs-extra";import It from"consola";import rv from"gray-matter";async function mu(e){It.start(`Generate List for Fuse Search by (${(0,et.cyan)("fuse.js")}) ...`);let t=await(0,du.default)(`${e.userRoot}/pages/posts/**/*.md`),r=[];for await(let n of t){let o=Je.readFileSync(n,"utf-8"),{data:i,excerpt:s,content:a}=rv(o,{excerpt_separator:"<!-- more -->"});if(i.draft){It.warn(`Ignore draft post: ${(0,et.dim)(n)}`);continue}if(i.hide||i.password)continue;let u=e.config.siteConfig.fuse.options.keys||[],f={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(n.replace(`${e.userRoot}/pages`,"").replace(/\.md$/,""))};u.includes("content")&&(f.content=a||""),r.push(f)}return r}function nv(e){e.command("fuse [root]","generate fuse list for search",t=>Ze(t).strict().help(),async({root:t})=>{It.info("Please generate it before build."),Tt();let r=await Ee({userRoot:t},"build"),n=await mu(r);await Je.ensureDir("./dist");let o=Ft.resolve(r.userRoot,"public"),i=Ft.resolve(o,r.config.siteConfig.fuse.dataPath),s=Ft.join("public",r.config.siteConfig.fuse.dataPath);await Je.ensureFile(i),Je.writeJSONSync(i,n),It.success(`Generate fuse list in ${(0,et.dim)(o)}`);let a=Ft.resolve(r.userRoot,"dist"),u=Ft.resolve(a,r.config.siteConfig.fuse.dataPath);await Je.ensureDir(a),Je.writeJSONSync(u,n),It.success(`Generate fuse list in ${(0,et.dim)(a)}`);try{let f=Ft.resolve(r.userRoot,".gitignore"),c=await Je.readFile(f,"utf-8"),d=s.replace(/\\/g,"/");c.includes(d)||(await Je.appendFile(f,`
25
- # valaxy fuse
26
- ${d}
27
- `),It.success(`Add ${(0,et.dim)(d)} to ${(0,et.dim)(".gitignore")}`))}catch{}})}var gu={extendCli(e){nv(e)},setup(e){e.hook("build:before",()=>{mu(e.options)})}};l();l();var nn=J(pe(),1);import{join as cv,resolve as vu}from"node:path";import{writeFile as lv}from"node:fs/promises";import{render as uv}from"ejs";import fv from"dayjs";import{ensureSuffix as pv}from"@antfu/utils";import{consola as Ci}from"consola";l();import{access as ov}from"node:fs/promises";async function rn(e){try{return await ov(e),!0}catch{return!1}}l();import sv from"node:path";import{readFile as av}from"node:fs/promises";l();import iv from"node:process";var er=iv.cwd(),hu=`---
28
- layout: <%=layout%>
29
- title: <%=title%>
30
- date: <%=date%>
31
- ---
32
- `;async function yu(e){let{clientRoot:t,themeRoot:r}=await Ee({userRoot:er}),n=[er,r,t];for(let o of n){let i=sv.resolve(o,"scaffolds",`${e}.md`);if(await rn(i))return av(i,"utf-8")}return!1}async function _u(e){let t=vu(er,"pages"),{path:r,title:n}=e,o=r||cv("posts",n),i=0;for(;;){let s=vu(t,o);if(i&&(s=`${s}-${i}`),s=pv(".md",s),!await rn(s)){let a=await dv(e);try{await lv(s,a,"utf-8"),Ci.success(`[valaxy new]: successfully generated file ${(0,nn.magenta)(s)}`)}catch(u){console.log(u),Ci.error(`[valaxy new]: failed to write file ${s}`),Ci.warn(`You should run ${(0,nn.green)("valaxy new")} in your valaxy project root directory.`)}return s}i++}}async function dv({date:e,title:t,layout:r="post"}){let n=await yu(r);return n||(n=hu),uv(n,{title:t,layout:r,date:e?fv().format("YYYY-MM-DD HH:mm:ss"):""})}function xu(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 _u({title:t,date:n,layout:o,path:r})})}l();var Df=J(pe(),1);import Lf from"node:path";import Vi from"consola";import{mergeConfig as Nf}from"vite";l();import{join as Ef,resolve as Af}from"node:path";import{mergeConfig as kf,build as Kx}from"vite";import{build as Yx}from"vite-ssg/node";import Xx from"vite-ssg-sitemap";import fn from"fs-extra";import Di from"consola";l();import{splitVendorChunkPlugin as Hx}from"vite";import jx from"markdown-it";import qx from"@vitejs/plugin-vue";import Bx from"vite-plugin-vue-layouts";import Ux from"unplugin-vue-components/vite";import Gx from"@intlify/unplugin-vue-i18n/vite";import Wx from"@unhead/addons/vite";import{resolve as zx}from"pathe";l();import v_ from"markdown-it";import ef from"markdown-it-anchor";import __ from"markdown-it-attrs";import{full as x_}from"markdown-it-emoji";import C_ from"markdown-it-task-lists";l();var Cu=new Set([!0,!1,"alt","title"]);function bu(e,t){return(Array.isArray(e)?e:[]).filter(([r])=>r!==t)}function Su(e,t){e&&e.attrs&&(e.attrs=bu(e.attrs,t))}function mv(e,t){if(!Cu.has(e))throw new TypeError(`figcaption must be one of: ${[...Cu]}.`);if(e==="alt")return t.content;let r=t.attrs.find(([n])=>n==="title");return Array.isArray(r)&&r[1]?(Su(t,"title"),r[1]):void 0}function Ru(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(r){let n=1;for(let o=1,i=r.tokens.length;o<i-1;++o){let s=r.tokens[o];if(s.type!=="inline"||!s.children||s.children.length!==1&&s.children.length!==3||s.children.length===1&&s.children[0].type!=="image")continue;if(s.children.length===3){let[f,c,d]=s.children;if(f.type!=="link_open"||c.type!=="image"||d.type!=="link_close")continue}if(o!==0&&r.tokens[o-1].type!=="paragraph_open"||o!==i-1&&r.tokens[o+1].type!=="paragraph_close")continue;let a=r.tokens[o-1],u;if(a.type="figure_open",a.tag="figure",r.tokens[o+1].type="figure_close",r.tokens[o+1].tag="figure",t.dataType&&r.tokens[o-1].attrPush(["data-type","image"]),t.link&&s.children.length===1){[u]=s.children;let f=new r.Token("link_open","a",1);f.attrPush(["href",u.attrGet("src")]),s.children.unshift(f),s.children.push(new r.Token("link_close","a",-1))}if(u=s.children.length===1?s.children[0]:s.children[1],t.figcaption){let f=mv(t.figcaption,u);if(f){let[c]=e.parseInline(f,r.env);s.children.push(new r.Token("figcaption_open","figcaption",1)),s.children.push(...c.children),s.children.push(new r.Token("figcaption_close","figcaption",-1)),u.attrs&&(u.attrs=bu(u.attrs,"title"))}}if(t.copyAttrs&&u.attrs){let f=t.copyAttrs===!0?"":t.copyAttrs;a.attrs=u.attrs.filter(([c])=>c.match(f)).map(c=>Array.from(c))}if(t.tabindex&&(r.tokens[o-1].attrPush(["tabindex",n]),n++),t.lazy&&(u.attrs.some(([f])=>f==="loading")||u.attrs.push(["loading","lazy"])),t.async&&(u.attrs.some(([f])=>f==="decoding")||u.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let f=!1;for(let c=0,d=u.attrs.length;c<d&&!f;c++){let p=u.attrs[c];p[0]==="class"&&(p[1]=`${p[1]} ${t.classes}`,f=!0)}f||u.attrs.push(["class",t.classes])}if(t.removeSrc){let f=u.attrs.find(([c])=>c==="src");u.attrs.push(["data-src",f[1]]),Su(u,"src")}}})}l();import gv from"markdown-it/lib/common/html_blocks.mjs";var hv="[a-zA-Z_:@][a-zA-Z0-9:._-]*",yv="[^\"'=<>`\\x00-\\x20]+",vv="'[^']*'",_v='"[^"]*"',xv="(?:"+yv+"|"+vv+"|"+_v+")",bi="(?:\\s+"+hv+"(?:\\s*=\\s*"+xv+")?)",wu="<[A-Za-z][A-Za-z0-9\\-]*"+bi+"*\\s*\\/?>",Eu="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Cv="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",bv="<[?][\\s\\S]*?[?]>",Sv="<![A-Z]+\\s+[^>]*>",Rv="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",wv=new RegExp("^(?:"+wu+"|"+Eu+"|"+Cv+"|"+bv+"|"+Sv+"|"+Rv+")"),Ev=new RegExp("^(?:"+wu+"|"+Eu+")"),Av=new RegExp("^<[A-Za-z][A-Za-z0-9\\-]*"+bi+"*\\s*\\/>"),kv=new RegExp("^<([A-Za-z][A-Za-z0-9\\-]*)"+bi+"*\\s*>.*<\\/\\1\\s*>"),Pv=gv,Ov=["a","abbr","acronym","audio","b","bdi","bdo","big","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","label","map","mark","meter","noscript","object","output","picture","progress","q","ruby","s","samp","script","select","slot","small","span","strong","sub","sup","svg","template","textarea","time","u","tt","var","video","wbr"],Tv=["template","component","transition","transition-group","keep-alive","slot","teleport"],$v=({blockTags:e,inlineTags:t})=>{let r=[...e,...Pv],n=[...t,...Ov.filter(i=>!Tv.includes(i))];return[[/^<(script|pre|style)(?=(\s|>|$))/i,/<\/(script|pre|style)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+r.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp("^</?(?!("+n.join("|")+")(?![\\w-]))[A-Za-z][A-Za-z0-9\\-]*(?=(\\s|/?>|$))"),/^$/,!0],[new RegExp(Ev.source+"\\s*$"),/^$/,!1]]},Fv=e=>{let t=$v(e);return(r,n,o,i)=>{let s,a,u,f=r.bMarks[n]+r.tShift[n],c=r.eMarks[n];if(r.sCount[n]-r.blkIndent>=4||!r.md.options.html||r.src.charCodeAt(f)!==60)return!1;for(u=r.src.slice(f,c),s=0;s<t.length&&!t[s][0].test(u);s++);if(s===t.length)return!1;if(i)return t[s][2];if(s===6){let p=u.match(Av)??u.match(kv);if(p){r.line=n+1;let _=r.push("html_inline","",0);return _.content=p[0],_.map=[n,r.line],_=r.push("inline","",0),_.content=u.slice(p[0].length),_.map=[n,r.line],_.children=[],!0}}if(a=n+1,!t[s][1].test(u)){for(;a<o&&!(r.sCount[a]<r.blkIndent);a++)if(f=r.bMarks[a]+r.tShift[a],c=r.eMarks[a],u=r.src.slice(f,c),t[s][1].test(u)){u.length!==0&&a++;break}}r.line=a;let d=r.push("html_block","",0);return d.map=[n,a],d.content=r.getLines(n,a,r.blkIndent,!0),!0}},Iv=e=>{let t=e|32;return t>=97&&t<=122},Mv=(e,t)=>{let{pos:r}=e;if(!e.md.options.html)return!1;let n=e.posMax;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;let o=e.src.charCodeAt(r+1);if(o!==33&&o!==63&&o!==47&&!Iv(o))return!1;let i=e.src.slice(r).match(wv);if(!i)return!1;if(!t){let s=e.push("html_inline","",0);s.content=e.src.slice(r,r+i[0].length)}return e.pos+=i[0].length,!0},Au=(e,{blockTags:t=[],inlineTags:r=[]}={})=>{let n=Fv({blockTags:t,inlineTags:r});e.block.ruler.at("html_block",n,{alt:["paragraph","reference","blockquote"]}),e.inline.ruler.at("html_inline",Mv)};l();import Lv from"gray-matter";var ku=(e,{grayMatterOptions:t,renderExcerpt:r=!0}={})=>{let n=e.render.bind(e);e.render=(o,i={})=>{let{data:s,content:a,excerpt:u=""}=Lv(o,t);return i.content=a,i.frontmatter={...i.frontmatter,...s},i.excerpt=r&&u?n(u,{...i}):u,n(a,i)}};l();l();var Nv={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},Dv=/[&<>'"]/g,dt=e=>e.replace(Dv,t=>Nv[t]);var tr=(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}${dt(a.content)}`:`${s}${a.content}`,"").trim()},on=(e,{level:t,shouldAllowHtml:r,shouldAllowNested:n,shouldEscapeText:o,slugify:i,format:s})=>{let a=[],u=[],f=c=>{for(;u.length!==0&&c.level<=u[0].level;)u.shift();u.length===0?(a.push(c),u.push(c)):(u[0].children.push(c),u.unshift(c))};for(let c=0;c<e.length;c+=1){let d=e[c];if(d?.type!=="heading_open"||d?.level!==0&&!n)continue;let p=Number.parseInt(d.tag.slice(1),10);if(!t.includes(p))continue;let _=e[c+1];if(!_)continue;let x=tr(_,{shouldAllowHtml:r,shouldEscapeText:o}),C=d.attrGet("id")??i(x);f({level:p,title:s?.(x)??x,slug:C,link:`#${C}`,children:[]})}return a},Vv=/[\u0000-\u001f]/g,Hv=/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g,jv=/[\u0300-\u036F]/g,mt=e=>e.normalize("NFKD").replace(jv,"").replace(Vv,"").replace(Hv,"-").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"").replace(/^(\d)/,"_$1").toLowerCase();var Pu=(e,{level:t=[2,3],shouldAllowNested:r=!1,slugify:n=mt,format:o}={})=>{let i=e.renderer.render.bind(e.renderer);e.renderer.render=(s,a,u)=>(u.headers=on(s,{level:t,shouldAllowHtml:!1,shouldAllowNested:r,shouldEscapeText:!1,slugify:n,format:o}),i(s,a,u))};l();var Ou="script",Tu="style",rr="template",qv=/^<script\s+.*?\bsetup\b.*?>$/is,Bv=({customBlocks:e})=>{let t=Array.from(new Set([Ou,Tu,...e])).join("|");return new RegExp(`^\\s*(?<content>(?<tagOpen><(?<type>${t})\\s?.*?>)(?<contentStripped>.*)(?<tagClose><\\/\\k<type>\\s*>))\\s*$`,"is")},$u=(e,{customBlocks:t=[]}={})=>{let r=Bv({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:rr,content:`<${rr}>${a}</${rr}>`,contentStripped:a,tagOpen:`<${rr}>`,tagClose:`</${rr}>`},a};let o=e.renderer.rules.html_block;e.renderer.rules.html_block=(i,s,a,u,f)=>{if(!u.sfcBlocks)return o(i,s,a,u,f);let p=i[s].content.match(r);if(!p)return o(i,s,a,u,f);let _=p.groups;return _.type===Ou?(u.sfcBlocks.scripts.push(_),qv.test(_.tagOpen)?u.sfcBlocks.scriptSetup=_:u.sfcBlocks.script=_):_.type===Tu?u.sfcBlocks.styles.push(_):u.sfcBlocks.customBlocks.push(_),""}};l();var Fu=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?tr(r[i+1],{shouldAllowHtml:!1,shouldEscapeText:!1}):"",t(r,n,o)}};l();var Uv=({listTag:e,listClass:t,itemClass:r,linkTag:n,linkClass:o})=>{let i=dt(e),s=t?` class="${dt(t)}"`:"",a="li",u=r?` class="${dt(r)}"`:"",f=dt(n),c=o?` class="${dt(o)}"`:"",d=_=>n==="router-link"?` to="${_}"`:` href="${_}"`,p=_=>`<${i}${s}>${_.map(x=>`<${a}${u}><${f}${c}${d(x.link)}>${x.title}</${f}>${x.children.length>0?p(x.children):""}</${a}>`).join("")}</${i}>`;return p},Gv=({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],u=n.eMarks[o],f=n.src.slice(a,u).split(" ")[0];if(!e.test(f))return!1;if(s)return!0;n.line=o+1;let c=n.push("toc_open",t,1);c.markup="",c.map=[o,n.line],r&&c.attrSet("class",r);let d=n.push("toc_body","",0);d.markup=f,d.map=[o,n.line],d.hidden=!0;let p=n.push("toc_close",t,-1);return p.markup="",d.map=[o,n.line],!0},Iu=(e,{pattern:t=/^\[\[toc\]\]$/i,slugify:r=mt,format:n,level:o=[2,3],shouldAllowNested:i=!1,containerTag:s="nav",containerClass:a="table-of-contents",listTag:u="ul",listClass:f="",itemClass:c="",linkTag:d="a",linkClass:p=""}={})=>{e.block.ruler.before("heading","toc",Gv({pattern:t,containerTag:s,containerClass:a}),{alt:["paragraph","reference","blockquote"]});let _=Uv({listTag:u,listClass:f,itemClass:c,linkTag:d,linkClass:p});e.renderer.rules.toc_body=x=>_(on(x,{level:o,shouldAllowHtml:!0,shouldAllowNested:i,shouldEscapeText:!0,slugify:r,format:n}))};import{cssI18nContainer as b_}from"css-i18n";l();import Mu from"katex";function Lu(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 Wv(e,t){let r,n,o,i;if(e.src[e.pos]!=="$")return!1;if(o=Lu(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=Lu(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 zv(e,t,r,n){let o,i,s,a,u=!1,f=e.bMarks[t]+e.tShift[t],c=e.eMarks[t];if(f+2>c||e.src.slice(f,f+2)!=="$$")return!1;if(f+=2,o=e.src.slice(f,c),n)return!0;for(o.trim().slice(-2)==="$$"&&(o=o.trim().slice(0,-2),u=!0),s=t;!u&&(s++,!(s>=r||(f=e.bMarks[s]+e.tShift[s],c=e.eMarks[s],f<c&&e.tShift[s]<e.blkIndent)));)e.src.slice(f,c).trim().slice(-2)==="$$"&&(a=e.src.slice(0,c).lastIndexOf("$$"),i=e.src.slice(f,a),u=!0);e.line=s+1;let d=e.push("math_block","math",0);return d.block=!0,d.content=(o&&o.trim()?`${o}
33
- `:"")+e.getLines(t+1,s,e.tShift[t],!0)+(i&&i.trim()?i:""),d.map=[t,e.line],d.markup="$$",!0}function Si(e,t){t=t||{};let r=function(s){t.displayMode=!1;try{return Mu.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>${Mu.renderToString(s,t)}</p>`}catch(a){return t.throwOnError&&console.warn(a),s}},i=function(s,a){return`${o(s[a].content)}
34
- `};e.inline.ruler.after("escape","math_inline",Wv),e.block.ruler.after("blockquote","math_block",zv,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=n,e.renderer.rules.math_block=i}l();import sn from"markdown-it-container";l();import Du from"crypto";l();var Nu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var Kv=128,tt,rt,Vu=e=>{!tt||tt.length<e?(tt=Buffer.allocUnsafe(e*Kv),Du.randomFillSync(tt),rt=0):rt+e>tt.length&&(Du.randomFillSync(tt),rt=0),rt+=e},Yv=e=>(Vu(e-=0),tt.subarray(rt-e,rt)),Xv=(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),u=o;for(;u--;)if(s+=e[a[u]&n]||"",s.length===i)return s}}},Hu=(e,t=21)=>Xv(e,t,Yv),Ri=(e=21)=>{Vu(e-=0);let t="";for(let r=rt-e;r<rt;r++)t+=Nu[tt[r]&63];return t};l();function ju(e){return e.trim().replace(/=(\d*)/,"").replace(/:(no-)?line-numbers({| |$|=\d*).*/,"").replace(/(-vue|{| ).*$/,"").replace(/^vue-html$/,"template").replace(/^ansi$/,"")}function wi(e){let{theme:t}=e,r=typeof t=="string"||"name"in t,n="";if(r){n=" va-adaptive-theme";let o=typeof t=="string"?t:t.name;n=o.includes("dark")||o.includes("night")?" dark":" light"}return n}function qu(e,t=!1){return t?e.replace(/<!--[^]*?-->/g,"").match(/data-title="(.*?)"/)?.[1]||"":e.match(/\[(.*)\]/)?.[1]||ju(e)||"txt"}function Qv(e){let t=e?.siteConfig?.codeHeightLimit;return t===void 0||t<=0?"":`style="max-height: ${t}px;"`}function Bu(e,t){let r=e.renderer.rules.fence;e.renderer.rules.fence=(...n)=>{let[o,i]=n,s=o[i];s.info=s.info.replace(/\[.*\]/,"");let a=ju(s.info),u=r(...n);return`
35
- <div ${Qv(t)} class="language-${a}${wi(t)}${/ active( |$)/.test(s.info)?" active":""}">
36
- <button title="Copy Code" class="copy"></button><span class="lang">${a}</span>${u}<button class="collapse"></button>
37
- </div>`}}function Zv(e,{icon:t,color:r,text:n,langs:o}={}){return[sn,e,{render(i,s){let a=i[s],u=a.info.trim().slice(e.length).trim();if(a.nesting===1){if(e==="details")return`<details class="${e} custom-block">${`<summary>${u}</summary>`}
38
- `;let f="";t&&(f=`<i class="icon ${t}" ${r?`style="color: ${r}"`:""}></i>`);let c=`<span lang="en">${u||n}</span>`;return o&&Object.keys(o).forEach(d=>{c+=`<span lang="${d}">${u||o[d]}</span>`}),`<div class="${e} custom-block"><p class="custom-block-title">${f}${c}</p>
39
- `}else return e==="details"?`</details>
40
- `:`</div>
41
- `}}]}var Uu={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 Gu(e,t={}){Object.keys(Uu).forEach(n=>{let o={...Uu[n],...t[n]||{}};e.use(...Zv(n,o))}),e.use(...Jv(t)),e.use(sn,"v-pre",{render:(n,o)=>n[o].nesting===1?`<div v-pre>
42
- `:`</div>
43
- `}),["zh-CN","en"].forEach(n=>{e.use(sn,n,{render:(o,i)=>o[i].nesting===1?`<div lang="${n}">
44
- `:`</div>
45
- `})})}function Jv(e){return[sn,"code-group",{render(t,r){if(t[r].nesting===1){let n=Ri(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 u=qu(a?t[s].content:t[s].info,a);if(u){let f=Ri(7);o+=`<input type="radio" name="group-${n}" id="tab-${f}" ${i}><label for="tab-${f}">${u}</label>`,i&&!a&&(t[s].info+=" active"),i=""}}}return`<div class="vp-code-group${wi({theme:e.theme})}"><div class="tabs">${o}</div><div class="blocks">
46
- `}return`</div></div>
47
- `}}]}l();var Wu=J(pe(),1);import{transformerCompactLineOptions as e_,transformerNotationDiff as t_,transformerNotationErrorLevel as r_,transformerNotationFocus as n_,transformerNotationHighlight as o_}from"shikiji-transformers";import{addClassToHast as i_,bundledLanguages as s_,getHighlighter as a_,isPlaintext as c_,isSpecialLang as l_}from"shikiji";var u_=Hu("abcdefghijklmnopqrstuvwxyz",10);function f_(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 zu(e,t,r=console){let{defaultHighlightLang:n="",codeTransformers:o=[]}=t,i=await a_({themes:typeof e=="string"||"name"in e?[e]:[e.light,e.dark],langs:[...Object.keys(s_),...t.languages||[]],langAlias:t.languageAlias});await t?.shikijiSetup?.(i);let s=[t_(),n_({classActiveLine:"has-focus",classActivePre:"has-focused-lines"}),o_(),r_(),{name:"valaxy:add-class",pre(d){i_(d,"vp-code")}},{name:"valaxy:clean-up",pre(d){delete d.properties.tabindex,delete d.properties.style}}],a=/-vue$/,u=/=(\d*)/,f=/:(no-)?line-numbers(=\d*)?$/,c=/\{\{.*?\}\}/g;return(d,p,_)=>{let x=a.test(p)?"":"v-pre";p=p.replace(u,"").replace(f,"").replace(a,"").toLowerCase()||n,p&&!i.getLoadedLanguages().includes(p)&&!c_(p)&&!l_(p)&&(r.warn(Wu.default.yellow(`
48
- The language '${p}' is not loaded, falling back to '${n||"txt"}' for syntax highlighting.`)),p=n);let C=f_(_),b=new Map,A=w=>x?w:w.replace(c,M=>{let R=b.get(M);return R||(R=u_(),b.set(M,R)),R}),k=w=>(b.forEach((M,R)=>{w=w.replaceAll(M,R)}),w),I=w=>w.replace(/(<span class="line highlighted">)(<\/span>)/g,"$1<wbr>$2");d=A(d).trimEnd();let U=i.codeToHtml(d,{lang:p,transformers:[...s,e_(C),{name:"valaxy:v-pre",pre(w){x&&(w.properties["v-pre"]="")}},...o],meta:{__raw:_},...typeof e=="string"||"name"in e?{theme:e}:{themes:e,defaultColor:!1}});return I(k(U))}}l();var Ei=/{([\d,-]+)}/;function Ku(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 u=i.info;if(!u||!Ei.test(u))return t(...r);let f=u.replace(Ei,"").trim();i.info=f,a=Ei.exec(u)[1]}return!a&&(a=s[0],!a||!/[\d,-]+/.test(a))?t(...r):(i.info+=` ${a}`,t(...r))}}l();import{URL as p_}from"node:url";var d_=/(^|.*\/)index.md(#?.*)$/i;function Yu(e,t,r){e.renderer.rules.link_open=(i,s,a,u,f)=>{let c=i[s],d=c.attrIndex("href");if(d>=0){let p=c.attrs[d],_=p[1];At.test(_)?(Object.entries(t).forEach(([C,b])=>{c.attrSet(C,b)}),p[1]=_.replace(Fl,"")):!_.startsWith("#")&&!_.startsWith("mailto:")&&!/\.(?!html|md)\w+($|\?)/i.test(_)&&n(p,u),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],u=a.match(d_);if(u){let[,f,c]=u;a=f+c}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 c=new p_(a,"http://a.com");a=f+c.search+c.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 Xu(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 u=1,f=a.match(/=(\d*)/);f&&f[1]&&(u=Number.parseInt(f[1]));let d=o.slice(o.indexOf("<code>"),o.indexOf("</code>")).split(`
49
- `),_=`<div class="line-numbers-wrapper" aria-hidden="true">${[...Array(d.length)].map((C,b)=>`<span class="line-number">${b+u}</span><br>`).join("")}</div>`;return o.replace(/<\/div>$/,`${_}</div>`).replace(/"(language-[^"]*?)"/,'"$1 line-numbers-mode"')}}l();import Qu from"node:path";import Ai from"fs-extra";var m_=/^(.+?(?:(?:\.([a-z0-9]+))?))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))? ?(?:\[(.+)\])?$/;function g_(e){let[t="",r="",n="",o="",i="",s=""]=(m_.exec(e)||[]).slice(1),a=s||t.split("/").pop()||"";return{filepath:t,extension:r,region:n,lines:o,lang:i,title:a}}function h_(e){let t=e.split(`
50
- `),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(`
51
- `):e}function Zu(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 y_(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(Zu(s,a,t)){o=i+1,n=a;break}}else if(Zu(s,n,t,!0))return{start:o,end:i,regexp:n};return null}function Ju(e,t){let r=(o,i,s,a)=>{let f=o.bMarks[i]+o.tShift[i],c=o.eMarks[i];if(o.sCount[i]-o.blkIndent>=4)return!1;for(let P=0;P<3;++P)if(o.src.charCodeAt(f+P)!==60||f+P>=c)return!1;if(a)return!0;let d=f+3,p=o.skipSpacesBack(c,f),_=o.src.slice(d,p).trim().replace(/^@/,t).trim(),{filepath:x,extension:C,region:b,lines:A,lang:k,title:I}=g_(_);o.line=i+1;let U=o.push("fence","code",0);U.info=`${k||C}${A?`{${A}}`:""}${I?`[${I}]`:""}`;let{realPath:w,path:M}=o.env,R=Qu.resolve(Qu.dirname(w??M),x);return U.src=[R,b.slice(1)],U.markup="```",U.map=[i,i+1],!0},n=e.renderer.rules.fence;e.renderer.rules.fence=(...o)=>{let[i,s,,{includes:a}]=o,u=i[s],[f,c]=u.src??[];if(!f)return n(...o);a&&a.push(f);let d=Ai.statSync(f).isFile();if(!Ai.existsSync(f)||!d)return u.content=d?`Code snippet path not found: ${f}`:"Invalid code snippet option",u.info="",n(...o);let p=Ai.readFileSync(f,"utf8");if(c){let _=p.split(/\r?\n/),x=y_(_,c);x&&(p=h_(_.slice(x.start,x.end).filter(C=>!x.regexp.test(C.trim())).join(`
52
- `)))}return u.content=p,n(...o)},e.block.ruler.before("fence","snippet",r)}l();var tf={light:"github-light",dark:"github-dark"};async function ki(e,t,r=!1,n="/"){let o=t?.config.markdown||{},i=o.theme??tf,s=t?.config.siteConfig||{};o.preConfig&&o.preConfig(e),e.use(Au,{...o.component}),e.use(Ku).use(Bu,{theme:i,siteConfig:s}).use(Ju,t?.userRoot).use(Gu,{...o.blocks,theme:i}).use(b_,{languages:t?.config.siteConfig.languages}).use(Yu,{target:"_blank",rel:"noreferrer",...o.externalLinks},n),e.use(Xu,o.lineNumbers),o.attrs?.disable||e.use(__,o.attrs),e.use(x_),r||e.use(ef,{slugify:mt,permalink:ef.permalink.linkInsideHeader({symbol:"&ZeroWidthSpace;",renderAttrs:(u,f)=>{let c=f.tokens.findIndex(p=>{let x=p.attrs?.find(C=>C[0]==="id");return x&&u===x[1]});return{"aria-label":`Permalink to "${f.tokens[c+1].content}"`}}}),...o.anchor}),e.use(ku,{...o.frontmatter}).use(Pu,{slugify:mt,...o.headers}).use($u,{...o.sfc}).use(Fu).use(Iu,{...o.toc}),e.use(Si,o.katex);let a=t?.config.siteConfig.vanillaLazyload||{enable:!1};return e.use(Ru,{figcaption:!0,lazy:!0,async:!0,...a.enable?{lazy:!0,async:!0,classes:"lazy"}:{},...o.imageFigures}),e.use(C_),o.config&&o.config(e),e}async function rf(e){let t=e?.config.markdown||{},r=t.theme??tf,n=v_({html:!0,linkify:!0,highlight:await zu(r,t),...t.options});return n.linkify.set({fuzzyLink:!1}),await ki(n,e),n}l();import{resolve as k_}from"node:path";import{existsSync as P_}from"node:fs";import{fileURLToPath as O_}from"node:url";import T_ from"jiti";import sf from"defu";import{presetAttributify as $_,presetIcons as F_,presetTypography as I_,presetUno as M_,transformerDirectives as L_,transformerVariantGroup as N_}from"unocss";l();import{resolve as S_}from"node:path";import{fileURLToPath as R_}from"node:url";import w_ from"fs-extra";import{isObject as E_}from"@antfu/utils";import A_ from"jiti";function nf(e,t,r=""){return e={...e},Object.keys(t).forEach(n=>{E_(e[n])?e[n]=nf(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 of(e,t,r,n,o=!0){let i=n;for(let s of e){let a=S_(s,"setup",t);if(w_.existsSync(a)){let{default:u}=A_(R_(import.meta.url),{esmResolve:!0})(a),f=await u(r);f!==null&&(i=o?nf(i,f):f)}}return i}async function D_(e){let{config:t}=e,r=["i-ri-clipboard-line","i-ri-archive-line","i-ri-folder-2-line","i-ri-price-tag-3-line","i-ri-cloud-line"].concat(e.config.unocss?.safelist||[]),n="animate-fade-in m-auto text-left".split(" ").concat(["rotate-y-180"]).concat(r),o=t.siteConfig;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 V_(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:[M_(t.unocssPresets?.uno),$_(t.unocssPresets?.attributify),F_({scale:1.2,...t.unocssPresets?.icons}),I_(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:[L_(),N_()],safelist:await D_(e)}}async function af(e){let t=await import("unocss/vite").then(p=>p.default),{unocss:r}=e.config,n=await V_(e),{themeRoot:o,clientRoot:i,roots:s}=e,a=["uno.config.ts","unocss.config.ts"],u=[];[o,i].forEach(p=>a.forEach(_=>u.push(k_(p,_))));let c={},d=[];return u.forEach(p=>{if(P_(p)){let _=T_(O_(import.meta.url),{esmResolve:!0})(p);"default"in _&&(_=_.default),c=sf(c,_),d.push(p)}}),c=await of(s,"unocss.ts",{},c,!0),t({configDeps:d,configFile:!1,...sf(r||{},c,n)})}l();import{dirname as B_,join as lf,resolve as je}from"node:path";import{mergeConfig as U_,searchForWorkspaceRoot as Ti}from"vite";import G_ from"is-installed-globally";import{uniq as uf}from"@antfu/utils";l();import{join as Pi}from"node:path";import Oi from"fs-extra";import{uniq as H_}from"@antfu/utils";import{loadConfigFromFile as j_,mergeConfig as q_}from"vite";async function an({userRoot:e,themeRoot:t},r){let n={mode:"development",command:r},o={},i=H_([t,e]).map(s=>Pi(s,"vite.config.ts"));for await(let s of i){if(!Oi.existsSync(s))continue;let a=await j_(n,s);a?.config&&(o=q_(o,a.config))}return o}async function cf({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 u=[r,t];n.siteConfig.mode==="auto"&&(s+=`
53
- <script>
54
- const prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
55
- const colorSchemeSetting = localStorage.getItem('vueuse-color-scheme') || 'auto';
56
- if (colorSchemeSetting === 'dark' || (prefersDark && colorSchemeSetting !== 'light')) {
57
- document.documentElement.classList.toggle('dark', true);
58
- }
59
- </script>
60
- `),n.siteConfig.lang&&(s+=`
61
- <script>
62
- const locale = localStorage.getItem('valaxy-locale') || '${n.siteConfig.lang}';
63
- document.documentElement.setAttribute('lang', locale);
64
- </script>
65
- `);for(let f of u){let c=Pi(f,"index.html");if(!Oi.existsSync(c))continue;let d=await Oi.readFile(c,"utf-8");s+=`
66
- ${(d.match(/<head>([\s\S]*?)<\/head>/im)?.[1]||"").trim()}`,a+=`
67
- ${(d.match(/<body>([\s\S]*?)<\/body>/im)?.[1]||"").trim()}`}return i=i.replace("__ENTRY__",ee(Pi(e,"main.ts"))).replace("<!-- head -->",s).replace("<!-- body -->",a),i}var W_=["@unhead/schema-org","@unhead/vue","@vueuse/integrations/useFuse","body-scroll-lock","defu","dayjs","dayjs/locale/zh-cn","dayjs/plugin/relativeTime","dayjs/plugin/timezone","dayjs/plugin/utc","katex","nprogress","unocss","vue","vue-router","vue-i18n","fuse.js","medium-zoom","vanilla-lazyload","@vue/devtools-api"],ff=["@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 pf(e){let t=Object.keys(e.config.themeConfig.pkg.dependencies||{}),r=e.addons.map(n=>Object.keys(n.pkg.dependencies||{})).flat();return{name:"valaxy:site",enforce:"pre",config(n){let o={root:e.clientRoot,publicDir:lf(e.userRoot,"public"),define:$i(e),resolve:{alias:z_(e),dedupe:["vue"]},optimizeDeps:{entries:[je(e.clientRoot,"main.ts")],include:uf([...W_,...t,...r]).filter(i=>!ff.includes(i)),exclude:ff},server:{fs:{allow:uf([Ti(e.clientRoot),Ti(e.themeRoot),Ti(e.userRoot),B_(Me("katex/package.json",!0))])}}};return G_&&(o.cacheDir=lf(e.pkgRoot,"node_modules/.vite"),o.resolve.alias.vue=`${Me("vue/dist/vue.esm-browser.js",!0)}`),U_(n,o)},async transformIndexHtml(n){return n=await cf(e,n),{html:n,tags:[]}}}}function $i(e){return{__VUE_PROD_DEVTOOLS__:!1,__INTLIFY_PROD_DEVTOOLS__:!1}}function z_(e){let t=[{find:"~/",replacement:`${ee(e.userRoot)}/`},{find:"valaxy/client/",replacement:`${ee(e.clientRoot)}/`},{find:"valaxy/package.json",replacement:ee(je(e.clientRoot,"../package.json"))},{find:/^valaxy$/,replacement:ee(je(e.clientRoot,"index.ts"))},{find:"@valaxyjs/client/",replacement:`${ee(e.clientRoot)}/`},{find:`valaxy-theme-${e.theme}/`,replacement:`${ee(je(e.themeRoot))}/`},{find:`valaxy-theme-${e.theme}`,replacement:`${ee(je(e.themeRoot))}/client/index.ts`}];return e.config.siteConfig.encrypt.enable&&t.push({find:/^vue$/,replacement:Me("vue/dist/vue.esm-bundler.js",!0)}),e.addons.forEach(r=>{t.push({find:`${r.name}/client/`,replacement:`${ee(`${je(r.root)}`)}/client/`}),t.push({find:`${r.name}/App.vue`,replacement:`${ee(je(r.root))}/App.vue`}),t.push({find:r.name,replacement:`${ee(je(r.root))}/client/index.ts`})}),t.push({find:/^valaxy-addon-(.*)$/,replacement:ee(je(e.clientRoot,"./addons/index.ts"))}),t}l();import{existsSync as K_}from"node:fs";import{join as Y_,resolve as X_}from"node:path";import{slash as Q_,uniq as Z_}from"@antfu/utils";function df({clientRoot:e,themeRoot:t,userRoot:r}){let n=Q_(X_(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=[],u=[];return Z_([t,r]).map(c=>Y_(c,"setup",s)).forEach((c,d)=>{if(!K_(c))return;a.push(`import __n${d} from '${ee(c)}'`);let p=`__n${d}`;/\binjection_return\b/g.test(o)&&(p=`injection_return = ${p}`),/\binjection_arg\b/g.test(o)?p+="(injection_arg)":p+="()",u.push(`// ${c}`,p)}),o=o.replace("/* __imports__ */",a.join(`
68
- `)),o=o.replace("/* __injections__ */",u.join(`
69
- `)),o}return null}}}l();import{objectEntries as J_}from"@antfu/utils";function mf(e){let t=J_($i(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 sx from"unplugin-vue-router/vite";import Fi from"fs-extra";import{resolve as ax}from"pathe";import cx from"gray-matter";import{isDate as hf}from"@antfu/utils";import{convert as lx}from"html-to-text";l();import{existsSync as ex,readFileSync as tx}from"node:fs";function rx(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 nx({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 ox({cn:e,en:t}){let r=e+t;return r<1e3?r:`${Math.round(r/100)/10}k`}function ix(e,t){let r=rx(e);return{countData:r,wordCount:ox(r),readingTime:nx(r,t.readTime)}}function gf({route:e,options:t}){let r=e.components.get("default")||"";if(ex(r)){let n=tx(r,"utf-8"),{wordCount:o,readingTime:i}=ix(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))}}function ux(e="",t="html"){switch(t){case"ai":case"md":return e;case"html":return cn.render(e);case"text":return lx(cn.render(e));default:return e}}function yf(e){let{roots:t,config:r}=e;return sx({extensions:[".vue",".md"],routesFolder:t.map(n=>`${n}/pages`),dts:ax(e.tempDir,"typed-router.d.ts"),...r.router,async extendRoute(n){let o=JSON.parse(JSON.stringify(r.siteConfig.frontmatter))||{};if(n.meta&&n.meta.frontmatter){let{frontmatter:s,otherMeta:a}=n.meta;n.meta=a}n.addToMeta({frontmatter:o}),(n.fullPath==="/"||n.fullPath==="/page")&&n.addToMeta({layout:"home"});let i=n.components.get("default")||"";if(n.fullPath.startsWith("/posts/")&&n.addToMeta({layout:"post"}),i.endsWith(".md")){let s=Fi.readFileSync(i,"utf-8"),{data:a,excerpt:u,content:f}=cx(s,{excerpt_separator:Wr}),c=a,d=e.config.siteConfig.lastUpdated;if(delete c.password,c.gallery_password&&(delete c.gallery_password,delete c.photos),c.date||(c.date=Fi.statSync(i).mtime),d&&(c.updated||(c.updated=Fi.statSync(i).ctime)),hf(c.date)||(c.date=new Date(c.date)),hf(c.updated)||(c.updated=new Date(c.updated)),c.from&&(Array.isArray(c.from)?c.from.forEach(_=>{e.redirects.push({from:_,to:n.fullPath})}):e.redirects.push({from:c.from,to:n.fullPath})),n.addToMeta({frontmatter:c,excerpt:u?ux(u,c.excerpt_type):""}),a.layout&&n.addToMeta({layout:a.layout}),n.meta.frontmatter?.updated||(n.meta.frontmatter.updated=n.meta.frontmatter.date),n.meta.frontmatter.tags){let _=n.meta.frontmatter.tags;typeof _=="string"&&(n.meta.frontmatter.tags=[_])}r.siteConfig.statistics.enable&&gf({options:r.siteConfig.statistics,route:n});let p={route:n,data:a,excerpt:u,content:f,path:i};r.extendMd?.(p)}return r.router?.extendRoute?.(n)}})}l();var un=J(pe(),1);import{join as Nt,relative as Tx,resolve as $x}from"pathe";import nr from"fs-extra";import{defu as Fx}from"defu";import Ix from"pascalcase";l();var Mt=J(pe(),1),Cf=J(oi(),1);import Ni from"fs-extra";import{LRUCache as gx}from"lru-cache";import qe from"pathe";l();import{webcrypto as Ii}from"node:crypto";function fx(e){let t=new TextEncoder;return Ii.subtle.importKey("raw",t.encode(e),"PBKDF2",!1,["deriveBits","deriveKey"])}function px(e,t){return Ii.subtle.deriveKey({name:"PBKDF2",salt:t,iterations:1e5,hash:"SHA-256"},e,{name:"AES-CBC",length:256},!0,["encrypt","decrypt"])}async function ln(e,t){let{password:r,iv:n,salt:o}=t,i=await fx(r),s=await px(i,o),a=new TextEncoder,u=await Ii.subtle.encrypt({name:"AES-CBC",iv:n},s,a.encode(e));return String.fromCharCode(...new Uint8Array(u))}l();import Mi from"node:path";import dx from"fs-extra";import{slash as mx}from"@antfu/utils";function Li(e,t,r,n){let o=/<!--\s*@include:\s*(.*?)\s*-->/g,i=/\{(\d*),(\d*)\}$/;return t.replace(o,(s,a)=>{if(!a.length)return s;let u=a.match(i);u&&(a=a.slice(0,-u[0].length));let f=a[0]==="@";try{let c=f?Mi.join(e,a.slice(a[1]==="/"?2:1)):Mi.join(Mi.dirname(r),a),d=dx.readFileSync(c,"utf-8");if(u){let[,p,_]=u;d=d.split(/\r?\n/).slice(p?Number.parseInt(p,10)-1:void 0,_?Number.parseInt(_,10):void 0).join(`
70
- `)}return n.push(mx(c)),Li(e,d,c,n)}catch{return s}})}var hx="<wbr>",vf=(0,Cf.default)("vitepress:md"),_f=new gx({max:1024}),yx=/<!--\s*@include:\s*(.*?)\s*-->/g;function vx(e={},t){let r=["process.env"];return t&&r.push("import.meta",...Object.keys(e)),new RegExp(`\\b(${r.map(n=>n.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")).join("|")})`,"g")}function _x(e,t,r){return e=e.replace(/<a (.*?)>(.*?)<\/a>/g,"<AppLink $1>$2</AppLink>"),e.replace(t,n=>`${n[0]}${r}${n.slice(1)}`)}function xx(e,t,r){if(typeof t.title=="string"){let n=e.parseInline(t.title,{})[0];if(n)return tr(n,{shouldAllowHtml:!1,shouldEscapeText:!1})}return r}function Cx(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 bx(e){let{description:t,head:r}=e;return t!==void 0?t:r&&Cx(r,"description")||""}function Sx(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}async function bf(e,t,r,n,o=!1,i=!1,s="with-subfolders"){let a=await rf(e);r=r.map(f=>f.replace(/\.md$/,"").replace(/\/index$/,""));let u=vx(n,o);return async(f,c,d)=>{let p=c,_=qe.dirname(c),x=qe.relative(t,c),C=JSON.stringify({src:f,file:p}),b=_f.get(C);if(b)return vf(`[cache hit] ${x}`),b;let A=Date.now(),k=[];f=Li(t,f,p,k),f=f.replace(yx,(N,W)=>{try{let j=qe.join(_,W),ie=Ni.readFileSync(j,"utf-8");return k.push(j),ie}catch{return N}});let I={path:c,relativePath:x,cleanUrls:s,realPath:p},U=a.render(f,I),{frontmatter:w={},headers:M=[],links:R=[],sfcBlocks:P,title:$=""}=I,K=[],h=N=>{console.warn(Mt.default.yellow(`
71
- (!) Found dead link ${Mt.default.cyan(N)} in file ${Mt.default.white(Mt.default.dim(c))}
72
- If it is intended, you can use:
73
- ${Mt.default.cyan(`<a href="${N}" target="_blank" rel="noreferrer">${N}</a>`)}`)),K.push(N)};if(R){let N=qe.dirname(c);for(let W of R){if(/\.(?!html|md)\w+($|\?)/i.test(W))continue;if(W.replace(At,"").startsWith("//localhost:")){h(W);continue}W=W.replace(/[?#].*$/,"").replace(/\.(html|md)$/,"");let j=decodeURIComponent(gi(W.startsWith("/")?W.slice(1):qe.relative(t,qe.resolve(N,W)))).replace(/\/index$/,"");(j.endsWith("/")?r.includes(j.slice(0,-1)):r.includes(j)||Ni.existsSync(qe.resolve(N,d,`${j}.html`))||Ni.existsSync(qe.resolve(N,d,`${j}/index.html`)))||h(W)}}let T={title:xx(a,w,$),titleTemplate:w.titleTemplate,description:bx(w),frontmatter:w,headers:M,relativePath:x,path:qe.join(t,x)};i&&(T.lastUpdated=await Bt(c));let L="ValaxyMain";function V(){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(j=>`<template #${j}><slot name="${j}" /></template>`).join("")}let y=_x(U,u,hx);y=Sx(y,e,w.codeHeightLimit);let{config:{siteConfig:{encrypt:v}}}=e;if(v.enable){let N=/<!-- valaxy-encrypt-start:(?<password>\w+) -->(?<content>.*?)<!-- valaxy-encrypt-end -->/gs,W=/((<!-- valaxy-encrypt-start:\w+ -->)|(<!-- valaxy-encrypt-end -->))/g;if(w.password)y=y.replaceAll(W,"");else{let j=[];for(let te of y.matchAll(N))j.push(await ln(te.groups.content,{password:te.groups.password,iv:v.iv,salt:v.salt}));w.partiallyEncryptedContents=j.length?j:void 0;let ie=0;y=y.replaceAll(N,()=>`<ValaxyDecrypt :encrypted-content="frontmatter.partiallyEncryptedContents[${ie++}]" />`)}if(w.password){let j=await ln(y,{password:w.password,iv:v.iv,salt:v.salt});y="",w.encryptedContent=j,w.encrypt=!0,delete w.password}if(w.gallery_password){let j=await ln(JSON.stringify(w.photos),{password:w.gallery_password,iv:v.iv,salt:v.salt});w.encryptedPhotos=j,delete w.gallery_password,delete w.photos}}let q=[...Px(P?.scripts.map(N=>N.content)??[],T,u),`<template><${L} :frontmatter="frontmatter" :data="data">`,`<template #main-content-md>${y}</template>`,V(),"<slot />",`</${L}></template>`,...P?.styles.map(N=>N.content)??[],...P?.customBlocks.map(N=>N.content)??[]].join(`
74
- `);vf(`[render] ${c} in ${Date.now()-A}ms.`);let F={vueSrc:q,pageData:T,deadLinks:K,includes:k};return _f.set(f,F),F}}var xf=/<\/script>/,Rx=/<\s*script[^>]*\blang=['"]ts['"][^>]*/,wx=/<\s*script[^>]*\bsetup\b[^>]*/,Ex=/<\s*script[^>]*\bclient\b[^>]*/,Ax=/((?:^|\n|;)\s*)export(\s*)default/,kx=/((?:^|\n|;)\s*)export(.+)as(\s*)default/;function Px(e,t,r){let n=e.findIndex(s=>xf.test(s)&&!wx.test(s)&&!Ex.test(s)),o=e.findIndex(s=>Rx.test(s))>-1,i=`
75
- import { provide } from 'vue'
76
- import { useRoute } from 'vue-router'
77
- export const data = ${Ll(t)}
78
- export default {
79
- name:'${t.relativePath}',
80
- data() {
81
- return { data, frontmatter: data.frontmatter, $frontmatter: data.frontmatter }
82
- },
83
- setup() {
84
- const route = useRoute()
85
- route.meta.frontmatter = Object.assign(route.meta.frontmatter || {}, data.frontmatter || {})
86
- provide('pageData', data)
87
- }
88
- }`;if(n>-1){let s=e[n],a=Ax.test(s)||kx.test(s);e[n]=s.replace(xf,`${a?"":`
89
- ${i}`}</script>`)}else e.unshift(`<script ${o?'lang="ts"':""}>
90
- ${i}</script>`);return e}l();var Lt=J(pe(),1);import Ox from"consola";function Sf(e,t){e.includes("{%")&&e.includes("%}")&&Ox.error(`${`${t}
91
- `} Please ${(0,Lt.red)("remove")} ${(0,Lt.cyan)("{% %}")}, because it conflicts with ${(0,Lt.yellow)("markdown-it-attrs")}.`)}function Mx(e){let t=e.redirects.map(r=>({path:r.from,redirect:r.to}));return e.config.runtimeConfig.redirects={useVueRouter:Qt()?e.config.siteConfig.redirects.useVueRouter:!0,redirectRoutes:t},`export default ${JSON.stringify(JSON.stringify(e.config))}`}function Lx(e,t){let r=[];t.config.features?.katex&&(r.push(`import "${ee(Me("katex/dist/katex.min.css",!0))}"`),r.push(`import "${ee(Nt(t.clientRoot,"styles/third/katex.scss"))}"`));for(let n of e){let o=[];["index","css-vars"].forEach(s=>{o.push(Nt(n,"styles",`${s}.css`)),o.push(Nt(n,"styles",`${s}.scss`))});for(let s of o)nr.existsSync(s)&&r.push(`import "${ee(s)}"`)}return r.join(`
92
- `)}function Nx(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(nr.existsSync(s)&&nr.readFileSync(s,"utf-8")){let a=i.replace("-","")+o;t.unshift(`import ${a} from "${ee(s)}"`),t.push(`messages['${i}'] = defu(${a}, messages['${i}'])`)}})}),t.push("export default messages"),t.join(`
93
- `)}function Dx(e){let t=e.addons.filter(i=>i.global).filter(i=>nr.existsSync(Nt(i.root,"./App.vue"))),r=i=>`Addon${Ix(i)}App`,n=t.map(i=>`import ${r(i.name)} from "${i.name}/App.vue"`).join(`
94
- `),o=t.map(i=>`{ component: ${r(i.name)}, props: ${JSON.stringify(i.props)} }`).join(",");return`${n}
95
- export default [${o}]`}var Vx='import { defineComponent } from "vue"; export default defineComponent({ render: () => null });';function Rf(e){let t=Nt(e,"App.vue");return nr.existsSync(t)?[`import AppVue from "${ee(t)}"`,"export default AppVue"].join(`
96
- `):Vx}function wf(e,t={}){let{config:r}=e,n="/@valaxy",o=e.roots,i,s=!1,a;return{name:"valaxy:loader",enforce:"pre",async configResolved(u){a=u,i=await bf(e,e.userRoot,e.pages,a.define,a.command==="build",e.config.siteConfig.lastUpdated)},configureServer(u){u.watcher.add([e.configFile,e.clientRoot,e.themeRoot,e.userRoot])},resolveId(u){return u.startsWith(n)?u:null},load(u){if(u==="/@valaxyjs/config")return Mx(e);if(u==="/@valaxyjs/context")return`export default ${JSON.stringify(JSON.stringify({userRoot:e.userRoot}))}`;if(u==="/@valaxyjs/styles")return Lx(o,e);if(u==="/@valaxyjs/locales")return Nx(o);if(u==="/@valaxyjs/addons")return Dx(e);if(u==="/@valaxyjs/UserAppVue")return Rf(e.userRoot);if(u==="/@valaxyjs/ThemeAppVue")return Rf(e.themeRoot);if(u.startsWith(n))return{code:"",map:{mappings:""}}},async transform(u,f){if(f.endsWith(".md")){Sf(u,f),u.replace("{%","{%"),u.replace("%}","%}");let{vueSrc:c,deadLinks:d,includes:p}=await i(u,f,a.publicDir);return d.length&&(s=!0),p.length&&p.forEach(_=>{this.addWatchFile(_)}),c}},renderStart(){if(s&&!r.ignoreDeadLinks)throw new Error("One or more pages contain dead links.")},async handleHotUpdate(u){let f=Ye(),{file:c,server:d,read:p}=u,_=C=>{t.onConfigReload?.(C,e.config),Object.assign(e.config,C),r=C;let b=["/@valaxyjs/config","/@valaxyjs/context"];return[...Array.from(b).map(k=>d.moduleGraph.getModuleById(k))].filter(k=>!!k)};if([e.configFile].includes(c)){let{config:C}=await Ee({userRoot:e.userRoot});return _(C)}if(c===e.siteConfigFile){let{siteConfig:C}=await Kr(e.userRoot);return r.siteConfig=Fx(C,zr),_(r)}if(c===e.themeConfigFile){let{themeConfig:C}=await Ul(e),b=r.themeConfig.pkg;return C.pkg=b,r.themeConfig=C,_(r)}if(c===$x(e.themeRoot,"valaxy.config.ts")){let C=await xi(e),b=ft(e.config,C),{config:A}=await _i(e,b);return _(A)}if(c.endsWith(".md")){let C=await p(),{pageData:b,vueSrc:A}=await i(C,c,Nt(e.userRoot,"public")),k=`/${Tx(`${e.userRoot}/pages`,c)}`,I={path:k,pageData:b};d.ws.send({type:"custom",event:"valaxy:pageData",data:I}),u.read=()=>A,$t.success(`${(0,un.yellow)("[HMR]")} ${k} ${(0,un.dim)(`updated in ${f()}`)}`)}}}}var cn=new jx({html:!0});async function or(e,t={}){let{roots:r,config:n}=e;await ki(cn,e,!0);let o=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","meting-js"]);return[wf(e,t),pf(e),df(e),qx({include:[/\.vue$/,/\.md$/],template:{compilerOptions:{isCustomElement:i=>o.has(i)},...n.vue?.template},...n.vue}),Wx(),yf(e),Bx({layoutsDirs:r.map(i=>`${i}/layouts`),...n.layouts}),Ux({extensions:["vue","md"],include:[/\.vue$/,/\.vue\?vue/,/\.md$/],exclude:[],allowOverrides:!0,dirs:r.map(i=>`${i}/components`).concat(["src/components","components"]),dts:zx(e.tempDir,"components.d.ts"),...n.components}),await af(e),Gx({runtimeOnly:!0,compositionOnly:!0,include:r.map(i=>`${i}/locales/**`)}),Hx(),mf(e)]}async function Pf(e,t={}){let r=kf(t,{plugins:await or(e)});await Kx(r)}async function Of(e,t={}){let r={plugins:await or(e),ssr:{noExternal:["workbox-window",/vue-i18n/,"@vue/devtools-api"]}};r.ssgOptions={script:"async",formatting:"minify",crittersOptions:{reduceInlineStyles:!1},onFinished(){Xx({hostname:e.config.siteConfig.url})}};let n=kf(r,t);await Yx({},n)}async function Tf(e){let{userRoot:t}=e,r=Af(t,"dist/index.html");if(fn.existsSync(r)){Di.info("post process for ssg...");let n=await fn.readFile(r,"utf-8"),o="</html>";if(!n.endsWith(o)){Di.warn("fix incomplete index.html...");let i=n.lastIndexOf(o);await fn.writeFile(r,n.slice(0,i+o.length),"utf-8")}}e.config.siteConfig.redirects?.useVueRouter||await Qx(e)}async function Qx(e){Di.info("generate client redirects...");let t=Af(e.userRoot,"dist"),n=Jr(e.redirects).map(async o=>{let i=Ef(t,`${o.from}.html`),s=Ef(t,`${o.to}.html`);if(!await fn.pathExists(s))throw new Error(`the route of '${o.to}' not exists`);await Jl(o.to,i)});await Promise.all(n)}l();l();l();import $f from"node:process";import{createServer as Zx,mergeConfig as Jx}from"vite";async function Ff(e,t={},r={}){$f.env.EDITOR=$f.env.EDITOR||"code";let n=await or(e,r),o=e.mode==="dev"&&e.config.devtools,i=Jx(t,{plugins:[...n,o&&(await import("vite-plugin-vue-devtools")).default]});return await Zx(i)}l();l();import{createHooks as e1}from"hookable";var t1=["build:before","build:after"];function pn(e){let t=e1();typeof e.config.hooks=="object"&&Object.keys(e.config.hooks).forEach(n=>{let o=n,i=e.config.hooks[o];typeof i=="function"&&(t1.includes(o)?e.mode==="build"&&t.hook(o,i):t.hook(o,i))});let r={version:ht,hooks:t,hook:t.hook,options:e};return e.addons.forEach(n=>{typeof n.setup=="function"&&n.setup(r)}),r}l();var z=J(pe(),1);import*as If from"node:readline";import r1 from"node:path";import n1 from"node:os";import nt from"node:process";import o1 from"consola";import{mergeConfig as i1}from"vite";var dn;function mn(e,t,r){if(console.log(),console.log(` ${(0,z.bold)("\u{1F30C} Valaxy")} ${(0,z.blue)(`v${ht}`)}`),console.log(),console.log(`${(0,z.dim)(" \u{1FA90} theme ")} > ${e.theme?(0,z.green)(e.theme):(0,z.gray)("none")}`),console.log(` ${(0,z.dim)("\u{1F4C1}")} ${(0,z.dim)(r1.resolve(e.userRoot))}`),t){console.log(),console.log(`${(0,z.dim)(" Preview ")} > ${(0,z.cyan)(`http://localhost:${(0,z.bold)(t)}/`)}`),r&&Object.values(n1.networkInterfaces()).forEach(u=>(u||[]).filter(f=>f.family==="IPv4"&&!f.address.includes("127.0.0.1")).forEach(({address:f})=>{console.log(`${(0,z.dim)(" Network ")} > ${(0,z.blue)(`http://${f}:${(0,z.bold)(t)}/`)}`)})),console.log();let n=`${(0,z.underline)("r")}${(0,z.dim)("estart")}`,o=`${(0,z.underline)("e")}${(0,z.dim)("dit")}`,i=`${(0,z.underline)("o")}${(0,z.dim)("pen")}`,s=`${(0,z.underline)("q")}${(0,z.dim)("r")}`,a=`${(0,z.dim)(" | ")}`;console.log(`${(0,z.dim)(" shortcuts ")} > ${n}${a}${i}${a}${s}${a}${o}`)}console.log()}async function ir(e,t){dn&&($t.info("close server..."),await dn.close());let r=i1(await an(e,"serve"),t);try{dn=await Ff(e,r,{async onConfigReload(n,o,i=!1){i&&($t.info(`${(0,z.yellow)("force")} reload the server`),ir(e,t));let s=!1;n.theme!==o.theme&&(s=!0),s&&ir(e,t)}}),await dn.listen(),$t.ready("server ready")}catch(n){o1.error(`failed to start server. error:
97
- `),console.error(n),nt.exit(1)}}function Mf(e){nt.stdin.resume(),nt.stdin.setEncoding("utf8"),If.emitKeypressEvents(nt.stdin),nt.stdin.isTTY&&nt.stdin.setRawMode(!0),nt.stdin.on("keypress",(t,r)=>{if(r.ctrl&&r.name==="c")nt.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)}}})}function Vf(e){e.command("build [root]","build your blog to static content",t=>Ze(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})=>{Tt();let i=await Ee({userRoot:r},"build");mn(i);let s=pn(i);await s.hooks.callHook("options:resolved");let a=[];i.config.modules.rss.enable&&a.push(tn),uu(s,a);let u=Nf(await an(i,"build"),i.config.vite||{}),f=Nf(u,{configFile:Lf.resolve(i.clientRoot,"vite.config.ts"),build:{emptyOutDir:!0,outDir:Lf.resolve(i.userRoot,n)},logLevel:o});await s.hooks.callHook("config:init"),await s.hooks.callHook("build:before");try{if(t){Vi.info(`use ${(0,Df.yellow)("vite-ssg")} to do ssg build...`);try{await Of(i,f),await Tf(i)}catch(c){Vi.error("[vite-ssg] An internal error occurred."),console.log(c)}}else Vi.info("use vite do spa build..."),await Pf(i,f)}catch(c){console.log(c)}finally{await s.hooks.callHook("build:after")}})}l();import Hf from"node:path";import{exec as c1}from"node:child_process";import l1 from"node:process";import u1 from"node:os";import f1 from"fs-extra";import{mergeConfig as p1}from"vite";import d1 from"qrcode";l();import s1 from"node:net";async function Hi(e){return await a1(e)?e:await Hi(e+1)}function a1(e){return new Promise(t=>{let r=s1.createServer(n=>{n.write(`Echo server\r
98
- `),n.pipe(n)});r.listen(e,"0.0.0.0"),r.on("error",()=>{t(!1)}),r.on("listening",()=>{r.close(),t(!0)})})}function jf(e){e.command("* [root]","Start a local server for Valaxy",t=>Ze(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})=>{yi(),f1.existsSync(Hf.resolve(t,"pages"))||l1.exit(0);let s=r||await Hi(4859),a=await Ee({userRoot:t});pn(a);let u=p1({configFile:Hf.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 ir(a,u),mn(a,s,o),Mf([{name:"r",fullName:"restart",action(){ir(a,u)}},{name:"o",fullName:"open",async action(){let{default:c}=await import("open");c(`http://localhost:${s}`)}},{name:"q",fullName:"qr",action(){let d=`http://${Object.values(u1.networkInterfaces()).flat().filter(p=>p?.family==="IPv4"&&!p.address.includes("127.0.0.1"))[0]?.address||"localhost"}:${s}`;d1.toString(d,{type:"terminal"},(p,_)=>{if(p)throw p;console.log(_)})}},{name:"e",fullName:"edit",action(){c1(`code "${t}"`)}}])})}var sr=g1(h1(m1.argv)).scriptName("valaxy").usage("$0 [args]").version(ht).showHelpOnFail(!1).alias("h","help").alias("v","version");jf(sr);Vf(sr);xu(sr);var y1=[tn,gu];y1.forEach(e=>{e.extendCli?.(sr)});function dT(){sr.help().parse()}export{Bt as a,Me as b,Il as c,gi as d,hi as e,ee as f,Ml as g,Ll as h,Ry as i,kt as j,zr as k,FR as l,Ey as m,Kr as n,Vl as o,Ty as p,UR as q,Xt as r,ft as s,Hl as t,Iy as u,XR as v,jl as w,Yr as x,Ul as y,Ny as z,uw as A,dw as B,_i as C,Ee as D,xi as E,an as F,cf as G,Pf as H,Of as I,Tf as J,Qx as K,Ff as L,sr as M,dT as N};
99
- /*! Bundled license information:
100
-
101
- is-extglob/index.js:
102
- (*!
103
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
104
- *
105
- * Copyright (c) 2014-2016, Jon Schlinkert.
106
- * Licensed under the MIT License.
107
- *)
108
-
109
- is-glob/index.js:
110
- (*!
111
- * is-glob <https://github.com/jonschlinkert/is-glob>
112
- *
113
- * Copyright (c) 2014-2017, Jon Schlinkert.
114
- * Released under the MIT License.
115
- *)
116
-
117
- is-number/index.js:
118
- (*!
119
- * is-number <https://github.com/jonschlinkert/is-number>
120
- *
121
- * Copyright (c) 2014-present, Jon Schlinkert.
122
- * Released under the MIT License.
123
- *)
124
-
125
- to-regex-range/index.js:
126
- (*!
127
- * to-regex-range <https://github.com/micromatch/to-regex-range>
128
- *
129
- * Copyright (c) 2015-present, Jon Schlinkert.
130
- * Released under the MIT License.
131
- *)
132
-
133
- fill-range/index.js:
134
- (*!
135
- * fill-range <https://github.com/jonschlinkert/fill-range>
136
- *
137
- * Copyright (c) 2014-present, Jon Schlinkert.
138
- * Licensed under the MIT License.
139
- *)
140
-
141
- queue-microtask/index.js:
142
- (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
143
-
144
- run-parallel/index.js:
145
- (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
146
- */