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