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