@likec4/mcp 1.53.0 → 1.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import{parseArgs as e}from"node:util";const t=/\d/,n=[`-`,`_`,`/`,`.`];function r(e=``){if(!t.test(e))return e!==e.toLowerCase()}function i(e,t){let i=t??n,a=[];if(!e||typeof e!=`string`)return a;let o=``,s,c;for(let t of e){let e=i.includes(t);if(e===!0){a.push(o),o=``,s=void 0;continue}let n=r(t);if(c===!1){if(s===!1&&n===!0){a.push(o),o=t,s=n;continue}if(s===!0&&n===!1&&o.length>1){let e=o.at(-1);a.push(o.slice(0,Math.max(0,o.length-1))),o=e+t,s=n;continue}}o+=t,s=n,c=e}return a.push(o),a}function a(e){return e?e[0].toUpperCase()+e.slice(1):``}function o(e){return e?e[0].toLowerCase()+e.slice(1):``}function s(e,t){return e?(Array.isArray(e)?e:i(e)).map(e=>a(t?.normalize?e.toLowerCase():e)).join(``):``}function c(e,t){return o(s(e||``,t))}function l(e,t){return e?(Array.isArray(e)?e:i(e)).map(e=>e.toLowerCase()).join(t??`-`):``}function u(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function d(e,t=``){let n=[];for(let t of e)for(let[e,r]of t.entries())n[e]=Math.max(n[e]||0,r.length);return e.map(e=>e.map((e,r)=>t+e[r===0?`padStart`:`padEnd`](n[r])).join(` `)).join(`
2
- `)}function f(e){return typeof e==`function`?e():e}var p=class extends Error{code;constructor(e,t){super(e),this.name=`CLIError`,this.code=t}};function m(t=[],n={}){let r=new Set(n.boolean||[]),i=new Set(n.string||[]),a=n.alias||{},o=n.default||{},s=new Map,c=new Map;for(let[e,t]of Object.entries(a)){let n=t;for(let t of n)s.set(e,t),c.has(t)||c.set(t,[]),c.get(t).push(e),s.set(t,e),c.has(e)||c.set(e,[]),c.get(e).push(t)}let l={};function u(e){if(r.has(e))return`boolean`;let t=c.get(e)||[];for(let e of t)if(r.has(e))return`boolean`;return`string`}let d=new Set([...r,...i,...Object.keys(a),...Object.values(a).flat(),...Object.keys(o)]);for(let e of d)l[e]||(l[e]={type:u(e),default:o[e]});for(let[e,t]of s.entries())e.length===1&&l[t]&&!l[t].short&&(l[t].short=e);let f=[],p={};for(let e=0;e<t.length;e++){let n=t[e];if(n===`--`){f.push(...t.slice(e));break}if(n.startsWith(`--no-`)){let e=n.slice(5);p[e]=!0;continue}f.push(n)}let m;try{m=e({args:f,options:Object.keys(l).length>0?l:void 0,allowPositionals:!0,strict:!1})}catch{m={values:{},positionals:f}}let h={_:[]};h._=m.positionals;for(let[e,t]of Object.entries(m.values))h[e]=t;for(let[e]of Object.entries(p)){h[e]=!1;let t=s.get(e);t&&(h[t]=!1);let n=c.get(e);if(n)for(let e of n)h[e]=!1}for(let[e,t]of s.entries())h[e]!==void 0&&h[t]===void 0&&(h[t]=h[e]),h[t]!==void 0&&h[e]===void 0&&(h[e]=h[t]);return h}const h=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR===`1`||e.TERM===`dumb`||e.TEST||e.CI})(),g=(e,t=39)=>n=>h?n:`\u001B[${e}m${n}\u001B[${t}m`,_=g(1,22),v=g(36),y=g(90),b=g(4,24);function x(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=S(t);for(let e of r){if(e.type===`positional`)continue;e.type===`string`||e.type===`enum`?n.string.push(e.name):e.type===`boolean`&&n.boolean.push(e.name),e.default!==void 0&&(n.default[e.name]=e.default),e.alias&&(n.alias[e.name]=e.alias);let t=c(e.name),r=l(e.name);if(t!==e.name||r!==e.name){let i=u(n.alias[e.name]||[]);t!==e.name&&!i.includes(t)&&i.push(t),r!==e.name&&!i.includes(r)&&i.push(r),i.length>0&&(n.alias[e.name]=i)}}let i=m(e,n),[...a]=i._,o=new Proxy(i,{get(e,t){return e[t]??e[c(t)]??e[l(t)]}});for(let[,e]of r.entries())if(e.type===`positional`){let t=a.shift();if(t!==void 0)o[e.name]=t;else if(e.default===void 0&&e.required!==!1)throw new p(`Missing required positional argument: ${e.name.toUpperCase()}`,`EARG`);else o[e.name]=e.default}else if(e.type===`enum`){let t=o[e.name],n=e.options||[];if(t!==void 0&&n.length>0&&!n.includes(t))throw new p(`Invalid value for argument: ${v(`--${e.name}`)} (${v(t)}). Expected one of: ${n.map(e=>v(e)).join(`, `)}.`,`EARG`)}else if(e.required&&o[e.name]===void 0)throw new p(`Missing required argument: --${e.name}`,`EARG`);return o}function S(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:u(r.alias)});return t}function C(e){return e}async function w(e,t){let n=await f(e.args||{}),r=x(t.rawArgs,n),i={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e};typeof e.setup==`function`&&await e.setup(i);let a;try{let n=await f(e.subCommands);if(n&&Object.keys(n).length>0){let r=t.rawArgs.findIndex(e=>!e.startsWith(`-`)),i=t.rawArgs[r];if(i){if(!n[i])throw new p(`Unknown command ${v(i)}`,`E_UNKNOWN_COMMAND`);let e=await f(n[i]);e&&await w(e,{rawArgs:t.rawArgs.slice(r+1)})}else if(!e.run)throw new p(`No command specified.`,`E_NO_COMMAND`)}typeof e.run==`function`&&(a=await e.run(i))}finally{typeof e.cleanup==`function`&&await e.cleanup(i)}return{result:a}}async function T(e,t,n){let r=await f(e.subCommands);if(r&&Object.keys(r).length>0){let n=t.findIndex(e=>!e.startsWith(`-`)),i=t[n],a=await f(r[i]);if(a)return T(a,t.slice(n+1),e)}return[e,n]}async function E(e,t){try{console.log(await O(e,t)+`
3
- `)}catch(e){console.error(e)}}const D=/^no[-A-Z]/;async function O(e,t){let n=await f(e.meta||{}),r=S(await f(e.args||{})),i=await f(t?.meta||{}),a=`${i.name?`${i.name} `:``}`+(n.name||process.argv[1]),o=[],s=[],c=[],l=[];for(let e of r)if(e.type===`positional`){let t=e.name.toUpperCase(),n=e.required!==!1&&e.default===void 0,r=e.default?`="${e.default}"`:``;s.push([v(t+r),e.description||``,e.valueHint?`<${e.valueHint}>`:``]),l.push(n?`<${t}>`:`[${t}]`)}else{let t=e.required===!0&&e.default===void 0,n=[...(e.alias||[]).map(e=>`-${e}`),`--${e.name}`].join(`, `)+(e.type===`string`&&(e.valueHint||e.default)?`=${e.valueHint?`<${e.valueHint}>`:`"${e.default||``}"`}`:``)+(e.type===`enum`&&e.options?`=<${e.options.join(`|`)}>`:``);if(o.push([v(n+(t?` (required)`:``)),e.description||``]),e.type===`boolean`&&(e.default===!0||e.negativeDescription)&&!D.test(e.name)){let n=[...(e.alias||[]).map(e=>`--no-${e}`),`--no-${e.name}`].join(`, `);o.push([v(n+(t?` (required)`:``)),e.negativeDescription||``])}t&&l.push(n)}if(e.subCommands){let t=[],n=await f(e.subCommands);for(let[e,r]of Object.entries(n)){let n=await f((await f(r))?.meta);n?.hidden||(c.push([v(e),n?.description||``]),t.push(e))}l.push(t.join(`|`))}let u=[],p=n.version||i.version;u.push(y(`${n.description} (${a+(p?` v${p}`:``)})`),``);let m=o.length>0||s.length>0;return u.push(`${b(_(`USAGE`))} ${v(`${a}${m?` [OPTIONS]`:``} ${l.join(` `)}`)}`,``),s.length>0&&(u.push(b(_(`ARGUMENTS`)),``),u.push(d(s,` `)),u.push(``)),o.length>0&&(u.push(b(_(`OPTIONS`)),``),u.push(d(o,` `)),u.push(``)),c.length>0&&(u.push(b(_(`COMMANDS`)),``),u.push(d(c,` `)),u.push(``,`Use ${v(`${a} <command> --help`)} for more information about a command.`)),u.filter(e=>typeof e==`string`).join(`
4
- `)}async function k(e,t={}){let n=t.rawArgs||process.argv.slice(2),r=t.showUsage||E;try{if(n.includes(`--help`)||n.includes(`-h`))await r(...await T(e,n)),process.exit(0);else if(n.length===1&&n[0]===`--version`){let t=typeof e.meta==`function`?await e.meta():await e.meta;if(!t?.version)throw new p(`No version specified`,`E_NO_VERSION`);console.log(t.version)}else await w(e,{rawArgs:n})}catch(t){t instanceof p?(await r(...await T(e,n)),console.error(t.message)):console.error(t,`
5
- `),process.exit(1)}}export{k as n,C as t};
1
+ import{parseArgs as e}from"node:util";const t=/\d/,n=[`-`,`_`,`/`,`.`];function r(e=``){if(!t.test(e))return e!==e.toLowerCase()}function i(e,t){let i=t??n,a=[];if(!e||typeof e!=`string`)return a;let o=``,s,c;for(let t of e){let e=i.includes(t);if(e===!0){a.push(o),o=``,s=void 0;continue}let n=r(t);if(c===!1){if(s===!1&&n===!0){a.push(o),o=t,s=n;continue}if(s===!0&&n===!1&&o.length>1){let e=o.at(-1);a.push(o.slice(0,Math.max(0,o.length-1))),o=e+t,s=n;continue}}o+=t,s=n,c=e}return a.push(o),a}function a(e){return e?e[0].toUpperCase()+e.slice(1):``}function o(e){return e?e[0].toLowerCase()+e.slice(1):``}function s(e,t){return e?(Array.isArray(e)?e:i(e)).map(e=>a(t?.normalize?e.toLowerCase():e)).join(``):``}function c(e,t){return o(s(e||``,t))}function l(e,t){return e?(Array.isArray(e)?e:i(e)).map(e=>e.toLowerCase()).join(t??`-`):``}function u(e){return l(e||``,`_`)}function d(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function f(e,t=``){let n=[];for(let t of e)for(let[e,r]of t.entries())n[e]=Math.max(n[e]||0,r.length);return e.map(e=>e.map((e,r)=>t+e[r===0?`padStart`:`padEnd`](n[r])).join(` `)).join(`
2
+ `)}function p(e){return typeof e==`function`?e():e}var m=class extends Error{code;constructor(e,t){super(e),this.name=`CLIError`,this.code=t}};function h(t=[],n={}){let r=new Set(n.boolean||[]),i=new Set(n.string||[]),a=n.alias||{},o=n.default||{},s=new Map,c=new Map;for(let[e,t]of Object.entries(a)){let n=t;for(let t of n)s.set(e,t),c.has(t)||c.set(t,[]),c.get(t).push(e),s.set(t,e),c.has(e)||c.set(e,[]),c.get(e).push(t)}let l={};function u(e){if(r.has(e))return`boolean`;let t=c.get(e)||[];for(let e of t)if(r.has(e))return`boolean`;return`string`}function d(e){if(i.has(e))return!0;let t=c.get(e)||[];for(let e of t)if(i.has(e))return!0;return!1}let f=new Set([...r,...i,...Object.keys(a),...Object.values(a).flat(),...Object.keys(o)]);for(let e of f)l[e]||(l[e]={type:u(e),default:o[e]});for(let[e,t]of s.entries())e.length===1&&l[t]&&!l[t].short&&(l[t].short=e);let p=[],m={};for(let e=0;e<t.length;e++){let n=t[e];if(n===`--`){p.push(...t.slice(e));break}if(n.startsWith(`--no-`)){let e=n.slice(5);m[e]=!0;continue}p.push(n)}let h;try{h=e({args:p,options:Object.keys(l).length>0?l:void 0,allowPositionals:!0,strict:!1})}catch{h={values:{},positionals:p}}let g={_:[]};g._=h.positionals;for(let[e,t]of Object.entries(h.values)){let n=t;u(e)===`boolean`&&typeof t==`string`?n=t!==`false`:d(e)&&typeof t==`boolean`&&(n=``),g[e]=n}for(let[e]of Object.entries(m)){g[e]=!1;let t=s.get(e);t&&(g[t]=!1);let n=c.get(e);if(n)for(let e of n)g[e]=!1}for(let[e,t]of s.entries())g[e]!==void 0&&g[t]===void 0&&(g[t]=g[e]),g[t]!==void 0&&g[e]===void 0&&(g[e]=g[t]),g[e]!==g[t]&&o[t]===g[t]&&(g[t]=g[e]);return g}const g=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR===`1`||e.TERM===`dumb`||e.TEST||e.CI})(),_=(e,t=39)=>n=>g?n:`\u001B[${e}m${n}\u001B[${t}m`,v=_(1,22),y=_(36),b=_(90),x=_(4,24);function S(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=C(t);for(let e of r){if(e.type===`positional`)continue;e.type===`string`||e.type===`enum`?n.string.push(e.name):e.type===`boolean`&&n.boolean.push(e.name),e.default!==void 0&&(n.default[e.name]=e.default),e.alias&&(n.alias[e.name]=e.alias);let t=c(e.name),r=l(e.name);if(t!==e.name||r!==e.name){let i=d(n.alias[e.name]||[]);t!==e.name&&!i.includes(t)&&i.push(t),r!==e.name&&!i.includes(r)&&i.push(r),i.length>0&&(n.alias[e.name]=i)}}let i=h(e,n),[...a]=i._,o=new Proxy(i,{get(e,t){return e[t]??e[c(t)]??e[l(t)]}});for(let[,e]of r.entries())if(e.type===`positional`){let t=a.shift();if(t!==void 0)o[e.name]=t;else if(e.default===void 0&&e.required!==!1)throw new m(`Missing required positional argument: ${e.name.toUpperCase()}`,`EARG`);else o[e.name]=e.default}else if(e.type===`enum`){let t=o[e.name],n=e.options||[];if(t!==void 0&&n.length>0&&!n.includes(t))throw new m(`Invalid value for argument: ${y(`--${e.name}`)} (${y(t)}). Expected one of: ${n.map(e=>y(e)).join(`, `)}.`,`EARG`)}else if(e.required&&o[e.name]===void 0)throw new m(`Missing required argument: --${e.name}`,`EARG`);return o}function C(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:d(r.alias)});return t}async function w(e){return Promise.all(e.map(e=>p(e)))}function T(e){return e}async function E(e,t){let n=await p(e.args||{}),r=S(t.rawArgs,n),i={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},a=await w(e.plugins??[]),o,s;try{for(let e of a)await e.setup?.(i);typeof e.setup==`function`&&await e.setup(i);let r=await p(e.subCommands);if(r&&Object.keys(r).length>0){let i=k(t.rawArgs,n),a=t.rawArgs[i];if(a){let e=await O(r,a);if(!e)throw new m(`Unknown command ${y(a)}`,`E_UNKNOWN_COMMAND`);await E(e,{rawArgs:t.rawArgs.slice(i+1)})}else{let n=await p(e.default);if(n){if(e.run)throw new m(`Cannot specify both 'run' and 'default' on the same command.`,`E_DEFAULT_CONFLICT`);let i=await O(r,n);if(!i)throw new m(`Default sub command ${y(n)} not found in subCommands.`,`E_UNKNOWN_COMMAND`);await E(i,{rawArgs:t.rawArgs})}else if(!e.run)throw new m(`No command specified.`,`E_NO_COMMAND`)}}typeof e.run==`function`&&(o=await e.run(i))}catch(e){s=e}let c=[];if(typeof e.cleanup==`function`)try{await e.cleanup(i)}catch(e){c.push(e)}for(let e of[...a].reverse())try{await e.cleanup?.(i)}catch(e){c.push(e)}if(s)throw s;if(c.length===1)throw c[0];if(c.length>1)throw Error(`Multiple cleanup errors`,{cause:c});return{result:o}}async function D(e,t,n){let r=await p(e.subCommands);if(r&&Object.keys(r).length>0){let n=k(t,await p(e.args||{})),i=t[n],a=await O(r,i);if(a)return D(a,t.slice(n+1),e)}return[e,n]}async function O(e,t){if(t in e)return p(e[t]);for(let n of Object.values(e)){let e=await p(n),r=await p(e?.meta);if(r?.alias&&d(r.alias).includes(t))return e}}function k(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r===`--`)return-1;if(r.startsWith(`-`)){!r.includes(`=`)&&A(r,t)&&n++;continue}return n}return-1}function A(e,t){let n=e.replace(/^-{1,2}/,``),r=c(n);for(let[e,i]of Object.entries(t))if(!(i.type!==`string`&&i.type!==`enum`)&&(r===c(e)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function j(e,t){try{console.log(await N(e,t)+`
3
+ `)}catch(e){console.error(e)}}const M=/^no[-A-Z]/;async function N(e,t){let n=await p(e.meta||{}),r=C(await p(e.args||{})),i=await p(t?.meta||{}),a=`${i.name?`${i.name} `:``}`+(n.name||process.argv[1]),o=[],s=[],c=[],l=[];for(let e of r)if(e.type===`positional`){let t=e.name.toUpperCase(),n=e.required!==!1&&e.default===void 0;s.push([y(t+P(e)),F(e,n)]),l.push(n?`<${t}>`:`[${t}]`)}else{let t=e.required===!0&&e.default===void 0,n=[...(e.alias||[]).map(e=>`-${e}`),`--${e.name}`].join(`, `)+P(e);if(o.push([y(n),F(e,t)]),e.type===`boolean`&&(e.default===!0||e.negativeDescription)&&!M.test(e.name)){let n=[...(e.alias||[]).map(e=>`--no-${e}`),`--no-${e.name}`].join(`, `);o.push([y(n),[e.negativeDescription,t?b(`(Required)`):``].filter(Boolean).join(` `)])}t&&l.push(`--${e.name}`+P(e))}if(e.subCommands){let t=[],n=await p(e.subCommands);for(let[e,r]of Object.entries(n)){let n=await p((await p(r))?.meta);if(n?.hidden)continue;let i=d(n?.alias),a=[e,...i].join(`, `);c.push([y(a),n?.description||``]),t.push(e,...i)}l.push(t.join(`|`))}let u=[],m=n.version||i.version;u.push(b(`${n.description} (${a+(m?` v${m}`:``)})`),``);let h=o.length>0||s.length>0;return u.push(`${x(v(`USAGE`))} ${y(`${a}${h?` [OPTIONS]`:``} ${l.join(` `)}`)}`,``),s.length>0&&(u.push(x(v(`ARGUMENTS`)),``),u.push(f(s,` `)),u.push(``)),o.length>0&&(u.push(x(v(`OPTIONS`)),``),u.push(f(o,` `)),u.push(``)),c.length>0&&(u.push(x(v(`COMMANDS`)),``),u.push(f(c,` `)),u.push(``,`Use ${y(`${a} <command> --help`)} for more information about a command.`)),u.filter(e=>typeof e==`string`).join(`
4
+ `)}function P(e){let t=e.valueHint?`=<${e.valueHint}>`:``,n=t||`=<${u(e.name)}>`;return!e.type||e.type===`positional`||e.type===`boolean`?t:e.type===`enum`&&e.options?.length?`=<${e.options.join(`|`)}>`:n}function F(e,t){let n=t?b(`(Required)`):``,r=e.default===void 0?``:b(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(` `)}async function I(e,t={}){let n=t.rawArgs||process.argv.slice(2),r=t.showUsage||j;try{let t=await L(e);if(t.help.length>0&&n.some(e=>t.help.includes(e)))await r(...await D(e,n)),process.exit(0);else if(n.length===1&&t.version.includes(n[0])){let t=typeof e.meta==`function`?await e.meta():await e.meta;if(!t?.version)throw new m(`No version specified`,`E_NO_VERSION`);console.log(t.version)}else await E(e,{rawArgs:n})}catch(t){t instanceof m?(await r(...await D(e,n)),console.error(t.message)):console.error(t,`
5
+ `),process.exit(1)}}async function L(e){let t=await p(e.args||{}),n=new Set,r=new Set;for(let[e,i]of Object.entries(t)){n.add(e);for(let e of d(i.alias))r.add(e)}return{help:R(`help`,`h`,n,r),version:R(`version`,`v`,n,r)}}function R(e,t,n,r){return n.has(e)||r.has(e)?[]:n.has(t)||r.has(t)?[`--${e}`]:[`--${e}`,`-${t}`]}export{I as n,T as t};
@@ -1 +1 @@
1
- function e(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function t(n,r,i=`.`,a){if(!e(r))return t(n,{},i,a);let o=Object.assign({},r);for(let r in n){if(r===`__proto__`||r===`constructor`)continue;let s=n[r];s!=null&&(a&&a(o,r,s,i)||(Array.isArray(s)&&Array.isArray(o[r])?o[r]=[...s,...o[r]]:e(s)&&e(o[r])?o[r]=t(s,o[r],(i?`${i}.`:``)+r.toString(),a):o[r]=s))}return o}function n(e){return(...n)=>n.reduce((n,r)=>t(n,r,``,e),{})}const r=n();export{r as t};
1
+ function e(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function t(n,r,i=`.`,a){if(!e(r))return t(n,{},i,a);let o={...r};for(let r of Object.keys(n)){if(r===`__proto__`||r===`constructor`)continue;let s=n[r];s!=null&&(a&&a(o,r,s,i)||(Array.isArray(s)&&Array.isArray(o[r])?o[r]=[...s,...o[r]]:e(s)&&e(o[r])?o[r]=t(s,o[r],(i?`${i}.`:``)+r.toString(),a):o[r]=s))}return o}function n(e){return(...n)=>n.reduce((n,r)=>t(n,r,``,e),{})}const r=n();export{r as t};
@@ -1 +1 @@
1
- import{a as e,t}from"../rolldown-runtime.mjs";var n=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.normalizePath=t.convertSlashes=t.cleanPath=void 0;let n=e(`path`);function r(e){let t=(0,n.normalize)(e);return t.length>1&&t[t.length-1]===n.sep&&(t=t.substring(0,t.length-1)),t}t.cleanPath=r;let i=/[\\/]/g;function a(e,t){return e.replace(i,t)}t.convertSlashes=a;function o(e,t){let{resolvePaths:i,normalizePath:o,pathSeparator:s}=t,c=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return i&&(e=(0,n.resolve)(e)),(o||c)&&(e=r(e)),e===`.`?``:a(e[e.length-1]===s?e:e+s,s)}t.normalizePath=o})),r=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.build=t.joinDirectoryPath=t.joinPathWithBasePath=void 0;let r=e(`path`),i=n();function a(e,t){return t+e}t.joinPathWithBasePath=a;function o(e,t){return function(n,a){return a.startsWith(e)?a.replace(e,``)+n:(0,i.convertSlashes)((0,r.relative)(e,a),t.pathSeparator)+t.pathSeparator+n}}function s(e){return e}function c(e,t,n){return t+e+n}t.joinDirectoryPath=c;function l(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?o(e,t):r?a:s}t.build=l})),i=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;function t(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function n(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}let r=(e,t)=>{t.push(e||`.`)},i=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},a=()=>{};function o(e,o){let{includeDirs:s,filters:c,relativePaths:l}=o;return s?l?c&&c.length?n(e):t(e):c&&c.length?i:r:a}e.build=o})),a=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let t=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},n=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},r=(e,t,n,r)=>{n.files++},i=(e,t)=>{t.push(e)},a=()=>{};function o(e){let{excludeFiles:o,filters:s,onlyCounts:c}=e;return o?a:s&&s.length?c?t:n:c?r:i}e.build=o})),o=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let t=e=>e,n=()=>[``].slice(0,0);function r(e){return e.group?n:t}e.build=r})),s=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let t=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},n=()=>{};function r(e){return e.group?t:n}e.build=r})),c=t((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.build=void 0;let r=n(e(`fs`)),i=function(e,t,n){let{queue:i,options:{suppressErrors:a}}=t;i.enqueue(),r.default.stat(e,(r,o)=>{if(r){i.dequeue(a?null:r,t);return}n(o,e),i.dequeue(null,t)})},a=function(e,t,n){let{queue:i,options:{suppressErrors:a}}=t;i.enqueue(),r.default.realpath(e,(e,o)=>{if(e){i.dequeue(a?null:e,t);return}r.default.lstat(o,(e,r)=>{n(r,o),i.dequeue(null,t)})})},o=function(e,t,n){try{n(r.default.statSync(e),e)}catch(e){if(!t.options.suppressErrors)throw e}},s=function(e,t,n){try{let t=r.default.realpathSync(e);n(r.default.lstatSync(t),t)}catch(e){if(!t.options.suppressErrors)throw e}};function c(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:e.useRealPaths?t?s:a:t?o:i}t.build=c})),l=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let t=e=>e.counts,n=e=>e.groups,r=e=>e.paths,i=e=>e.paths.slice(0,e.options.maxFiles),a=(e,t,n)=>(l(t,n,e.counts,e.options.suppressErrors),null),o=(e,t,n)=>(l(t,n,e.paths,e.options.suppressErrors),null),s=(e,t,n)=>(l(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),c=(e,t,n)=>(l(t,n,e.groups,e.options.suppressErrors),null);function l(e,t,n,r){t(e&&!r?e:null,n)}function u(e,l){let{onlyCounts:u,group:d,maxFiles:f}=e;return u?l?t:a:d?l?n:c:f?l?i:s:l?r:o}e.build=u})),u=t((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.build=void 0;let r=n(e(`fs`)),i={withFileTypes:!0},a=(e,t,n,a)=>{if(e.queue.enqueue(),n<0){e.queue.dequeue(null,e);return}e.counts.directories++,r.default.readdir(t||`.`,i,function(r,i=[]){a(i,t,n),e.queue.dequeue(e.options.suppressErrors?null:r,e)})},o=(e,t,n,a)=>{if(n<0)return;e.counts.directories++;let o=[];try{o=r.default.readdirSync(t||`.`,i)}catch(t){if(!e.options.suppressErrors)throw t}a(o,t,n)};function s(e){return e?o:a}t.build=s})),d=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Queue=void 0,e.Queue=class{onQueueEmpty;count=0;constructor(e){this.onQueueEmpty=e}enqueue(){this.count++}dequeue(e,t){(--this.count===0||e)&&this.onQueueEmpty(e,t)}}})),f=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Counter=void 0,e.Counter=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}}})),p=t((t=>{var p=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),m=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),h=t&&t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!==`default`&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return m(t,e),t};Object.defineProperty(t,`__esModule`,{value:!0}),t.Walker=void 0;let g=e(`path`),_=n(),v=h(r()),y=h(i()),b=h(a()),x=h(o()),S=h(s()),C=h(c()),w=h(l()),T=h(u()),E=d(),D=f();t.Walker=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=w.build(t,this.isSynchronous),this.state={paths:[``].slice(0,0),groups:[],counts:new D.Counter,options:t,queue:new E.Queue((e,t)=>this.callbackInvoker(t,e,n))},this.root=(0,_.normalizePath)(e,this.state.options),this.joinPath=v.build(this.root,t),this.pushDirectory=y.build(this.root,t),this.pushFile=b.build(t),this.getArray=x.build(t),this.groupFiles=S.build(t),this.resolveSymlink=C.build(t,this.isSynchronous),this.walkDirectory=T.build(this.isSynchronous)}start(){return this.walkDirectory(this.state,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:s,maxFiles:c,signal:l}}=this.state;if(l&&l.aborted||c&&r.length>c)return;this.pushDirectory(t,r,i);let u=this.getArray(this.state.paths);for(let r=0;r<e.length;++r){let c=e[r];if(c.isFile()||c.isSymbolicLink()&&!a&&!o){let e=this.joinPath(c.name,t);this.pushFile(e,u,this.state.counts,i)}else if(c.isDirectory()){let e=v.joinDirectoryPath(c.name,t,this.state.options.pathSeparator);if(s&&s(c.name,e))continue;this.walkDirectory(this.state,e,n-1,this.walk)}else if(c.isSymbolicLink()&&this.resolveSymlink){let e=v.joinPathWithBasePath(c.name,t);this.resolveSymlink(e,this.state,(e,t)=>{if(e.isDirectory()){if(t=(0,_.normalizePath)(t,this.state.options),s&&s(c.name,t))return;this.walkDirectory(this.state,t,n-1,this.walk)}else{let e=(0,g.basename)(t),n=(0,_.normalizePath)((0,g.dirname)(t),this.state.options);t=this.joinPath(e,n),this.pushFile(t,u,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,u)}}})),m=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.callback=e.promise=void 0;let t=p();function n(e,t){return new Promise((n,i)=>{r(e,t,(e,t)=>{if(e)return i(e);n(t)})})}e.promise=n;function r(e,n,r){new t.Walker(e,n,r).start()}e.callback=r})),h=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.sync=void 0;let t=p();function n(e,n){return new t.Walker(e,n).start()}e.sync=n})),g=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.APIBuilder=void 0;let t=m(),n=h();e.APIBuilder=class{root;options;constructor(e,t){this.root=e,this.options=t}withPromise(){return(0,t.promise)(this.root,this.options)}withCallback(e){(0,t.callback)(this.root,this.options,e)}sync(){return(0,n.sync)(this.root,this.options)}}})),_=t(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{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`},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:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},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,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?c:s}}})),v=t((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=_();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),y=t(((e,t)=>{let n=v(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:y}=_(),b=e=>e===l||e===a,x=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let _=t||{},v=e.length-1,S=_.parts===!0||_.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,A=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,L=!1,R=!1,z=!1,B=0,V,H,U={value:``,depth:0,isGlob:!1},W=()=>D>=v,G=()=>E.charCodeAt(D+1),K=()=>(V=H,E.charCodeAt(++D));for(;D<v;){H=K();let e;if(H===a){I=U.backslashes=!0,H=K(),H===u&&(F=!0);continue}if(F===!0||H===u){for(B++;W()!==!0&&(H=K());){if(H===a){I=U.backslashes=!0,K();continue}if(H===u){B++;continue}if(F!==!0&&H===s&&(H=K())===s){if(A=U.isBrace=!0,M=U.isGlob=!0,z=!0,S===!0)continue;break}if(F!==!0&&H===o){if(A=U.isBrace=!0,M=U.isGlob=!0,z=!0,S===!0)continue;break}if(H===h&&(B--,B===0)){F=!1,A=U.isBrace=!0,z=!0;break}}if(S===!0)continue;break}if(H===l){if(C.push(D),w.push(U),U={value:``,depth:0,isGlob:!1},z===!0)continue;if(V===s&&D===O+1){O+=2;continue}k=D+1;continue}if(_.noext!==!0&&(H===p||H===i||H===r||H===m||H===c)&&G()===d){if(M=U.isGlob=!0,N=U.isExtglob=!0,z=!0,H===c&&D===O&&(R=!0),S===!0){for(;W()!==!0&&(H=K());){if(H===a){I=U.backslashes=!0,H=K();continue}if(H===g){M=U.isGlob=!0,z=!0;break}}continue}break}if(H===r){if(V===r&&(P=U.isGlobstar=!0),M=U.isGlob=!0,z=!0,S===!0)continue;break}if(H===m){if(M=U.isGlob=!0,z=!0,S===!0)continue;break}if(H===f){for(;W()!==!0&&(e=K());){if(e===a){I=U.backslashes=!0,K();continue}if(e===y){j=U.isBracket=!0,M=U.isGlob=!0,z=!0;break}}if(S===!0)continue;break}if(_.nonegate!==!0&&H===c&&D===O){L=U.negated=!0,O++;continue}if(_.noparen!==!0&&H===d){if(M=U.isGlob=!0,S===!0){for(;W()!==!0&&(H=K());){if(H===d){I=U.backslashes=!0,H=K();continue}if(H===g){z=!0;break}}continue}break}if(M===!0){if(z=!0,S===!0)continue;break}}_.noext===!0&&(N=!1,M=!1);let q=E,J=``,Y=``;O>0&&(J=E.slice(0,O),E=E.slice(O),k-=O),q&&M===!0&&k>0?(q=E.slice(0,k),Y=E.slice(k)):M===!0?(q=``,Y=E):q=E,q&&q!==``&&q!==`/`&&q!==E&&b(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),_.unescape===!0&&(Y&&=n.removeBackslashes(Y),q&&I===!0&&(q=n.removeBackslashes(q)));let X={prefix:J,input:e,start:O,base:q,glob:Y,isBrace:A,isBracket:j,isGlob:M,isExtglob:N,isGlobstar:P,negated:L,negatedExtglob:R};if(_.tokens===!0&&(X.maxDepth=0,b(H)||w.push(U),X.tokens=w),_.parts===!0||_.tokens===!0){let t;for(let n=0;n<C.length;n++){let r=t?t+1:O,i=C[n],a=e.slice(r,i);_.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=J):w[n].value=a,x(w[n]),X.maxDepth+=w[n].depth),(n!==0||a!==``)&&T.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);T.push(n),_.tokens&&(w[w.length-1].value=n,x(w[w.length-1]),X.maxDepth+=w[w.length-1].depth)}X.slashes=C,X.parts=T}return X}})),b=t(((e,t)=>{let n=_(),r=v(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let f={...t},p=typeof f.maxLength==`number`?Math.min(i,f.maxLength):i,m=e.length;if(m>p)throw SyntaxError(`Input length: ${m}, exceeds maximum allowed length: ${p}`);let h={type:`bos`,value:``,output:f.prepend||``},g=[h],_=f.capture?``:`?:`,v=n.globChars(f.windows),y=n.extglobChars(v),{DOT_LITERAL:b,PLUS_LITERAL:x,SLASH_LITERAL:S,ONE_CHAR:C,DOTS_SLASH:w,NO_DOT:T,NO_DOT_SLASH:E,NO_DOTS_SLASH:D,QMARK:O,QMARK_NO_DOT:k,STAR:A,START_ANCHOR:j}=v,M=e=>`(${_}(?:(?!${j}${e.dot?w:b}).)*?)`,N=f.dot?``:T,P=f.dot?O:k,F=f.bash===!0?M(f):A;f.capture&&(F=`(${F})`),typeof f.noext==`boolean`&&(f.noextglob=f.noext);let I={input:e,index:-1,start:0,dot:f.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};e=r.removePrefix(e,I),m=e.length;let L=[],R=[],z=[],B=h,V,H=()=>I.index===m-1,U=I.peek=(t=1)=>e[I.index+t],W=I.advance=()=>e[++I.index]||``,G=()=>e.slice(I.index+1),K=(e=``,t=0)=>{I.consumed+=e,I.index+=t},q=e=>{I.output+=e.output==null?e.value:e.output,K(e.value)},J=()=>{let e=1;for(;U()===`!`&&(U(2)!==`(`||U(3)===`?`);)W(),I.start++,e++;return e%2==0?!1:(I.negated=!0,I.start++,!0)},Y=e=>{I[e]++,z.push(e)},X=e=>{I[e]--,z.pop()},Z=e=>{if(B.type===`globstar`){let t=I.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||L.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(I.output=I.output.slice(0,-B.output.length),B.type=`star`,B.value=`*`,B.output=F,I.output+=B.output)}if(L.length&&e.type!==`paren`&&(L[L.length-1].inner+=e.value),(e.value||e.output)&&q(e),B&&B.type===`text`&&e.type===`text`){B.output=(B.output||B.value)+e.value,B.value+=e.value;return}e.prev=B,g.push(e),B=e},Q=(e,t)=>{let n={...y[t],conditions:1,inner:``};n.prev=B,n.parens=I.parens,n.output=I.output;let r=(f.capture?`(`:``)+n.open;Y(`parens`),Z({type:e,value:t,output:I.output?``:C}),Z({type:`paren`,extglob:!0,value:W(),output:r}),L.push(n)},$=e=>{let n=e.close+(f.capture?`)`:``),r;if(e.type===`negate`){let i=F;e.inner&&e.inner.length>1&&e.inner.includes(`/`)&&(i=M(f)),(i!==F||H()||/^\)+$/.test(G()))&&(n=e.close=`)$))${i}`),e.inner.includes(`*`)&&(r=G())&&/^\.[^\\/.]+$/.test(r)&&(n=e.close=`)${d(r,{...t,fastpaths:!1}).output})${i})`),e.prev.type===`bos`&&(I.negatedExtglob=!0)}Z({type:`paren`,extglob:!0,value:V,output:n}),X(`parens`)};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?O.repeat(a.length):``):o===0?P+(a?O.repeat(a.length):``):O.repeat(r.length):i===`.`?b.repeat(r.length):i===`*`?t?t+i+(a?F:``):F:t?e:`\\${e}`);return n===!0&&(i=f.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&f.contains===!0?(I.output=e,I):(I.output=r.wrapOutput(i,I,t),I)}for(;!H();){if(V=W(),V===`\0`)continue;if(V===`\\`){let e=U();if(e===`/`&&f.bash!==!0||e===`.`||e===`;`)continue;if(!e){V+=`\\`,Z({type:`text`,value:V});continue}let t=/^\\+/.exec(G()),n=0;if(t&&t[0].length>2&&(n=t[0].length,I.index+=n,n%2!=0&&(V+=`\\`)),f.unescape===!0?V=W():V+=W(),I.brackets===0){Z({type:`text`,value:V});continue}}if(I.brackets>0&&(V!==`]`||B.value===`[`||B.value===`[^`)){if(f.posix!==!1&&V===`:`){let e=B.value.slice(1);if(e.includes(`[`)&&(B.posix=!0,e.includes(`:`))){let e=B.value.lastIndexOf(`[`),t=B.value.slice(0,e),n=a[B.value.slice(e+2)];if(n){B.value=t+n,I.backtrack=!0,W(),!h.output&&g.indexOf(B)===1&&(h.output=C);continue}}}(V===`[`&&U()!==`:`||V===`-`&&U()===`]`)&&(V=`\\${V}`),V===`]`&&(B.value===`[`||B.value===`[^`)&&(V=`\\${V}`),f.posix===!0&&V===`!`&&B.value===`[`&&(V=`^`),B.value+=V,q({value:V});continue}if(I.quotes===1&&V!==`"`){V=r.escapeRegex(V),B.value+=V,q({value:V});continue}if(V===`"`){I.quotes=I.quotes===1?0:1,f.keepQuotes===!0&&Z({type:`text`,value:V});continue}if(V===`(`){Y(`parens`),Z({type:`paren`,value:V});continue}if(V===`)`){if(I.parens===0&&f.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=L[L.length-1];if(e&&I.parens===e.parens+1){$(L.pop());continue}Z({type:`paren`,value:V,output:I.parens?`)`:`\\)`}),X(`parens`);continue}if(V===`[`){if(f.nobracket===!0||!G().includes(`]`)){if(f.nobracket!==!0&&f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));V=`\\${V}`}else Y(`brackets`);Z({type:`bracket`,value:V});continue}if(V===`]`){if(f.nobracket===!0||B&&B.type===`bracket`&&B.value.length===1){Z({type:`text`,value:V,output:`\\${V}`});continue}if(I.brackets===0){if(f.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));Z({type:`text`,value:V,output:`\\${V}`});continue}X(`brackets`);let e=B.value.slice(1);if(B.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(V=`/${V}`),B.value+=V,q({value:V}),f.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(B.value);if(I.output=I.output.slice(0,-B.value.length),f.literalBrackets===!0){I.output+=t,B.value=t;continue}B.value=`(${_}${t}|${B.value})`,I.output+=B.value;continue}if(V===`{`&&f.nobrace!==!0){Y(`braces`);let e={type:`brace`,value:V,output:`(`,outputIndex:I.output.length,tokensIndex:I.tokens.length};R.push(e),Z(e);continue}if(V===`}`){let e=R[R.length-1];if(f.nobrace===!0||!e){Z({type:`text`,value:V,output:V});continue}let t=`)`;if(e.dots===!0){let e=g.slice(),n=[];for(let t=e.length-1;t>=0&&(g.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,f),I.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=I.output.slice(0,e.outputIndex),r=I.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,V=t=`\\}`,I.output=n;for(let e of r)I.output+=e.output||e.value}Z({type:`brace`,value:V,output:t}),X(`braces`),R.pop();continue}if(V===`|`){L.length>0&&L[L.length-1].conditions++,Z({type:`text`,value:V});continue}if(V===`,`){let e=V,t=R[R.length-1];t&&z[z.length-1]===`braces`&&(t.comma=!0,e=`|`),Z({type:`comma`,value:V,output:e});continue}if(V===`/`){if(B.type===`dot`&&I.index===I.start+1){I.start=I.index+1,I.consumed=``,I.output=``,g.pop(),B=h;continue}Z({type:`slash`,value:V,output:S});continue}if(V===`.`){if(I.braces>0&&B.type===`dot`){B.value===`.`&&(B.output=b);let e=R[R.length-1];B.type=`dots`,B.output+=V,B.value+=V,e.dots=!0;continue}if(I.braces+I.parens===0&&B.type!==`bos`&&B.type!==`slash`){Z({type:`text`,value:V,output:b});continue}Z({type:`dot`,value:V,output:b});continue}if(V===`?`){if(!(B&&B.value===`(`)&&f.noextglob!==!0&&U()===`(`&&U(2)!==`?`){Q(`qmark`,V);continue}if(B&&B.type===`paren`){let e=U(),t=V;(B.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(G()))&&(t=`\\${V}`),Z({type:`text`,value:V,output:t});continue}if(f.dot!==!0&&(B.type===`slash`||B.type===`bos`)){Z({type:`qmark`,value:V,output:k});continue}Z({type:`qmark`,value:V,output:O});continue}if(V===`!`){if(f.noextglob!==!0&&U()===`(`&&(U(2)!==`?`||!/[!=<:]/.test(U(3)))){Q(`negate`,V);continue}if(f.nonegate!==!0&&I.index===0){J();continue}}if(V===`+`){if(f.noextglob!==!0&&U()===`(`&&U(2)!==`?`){Q(`plus`,V);continue}if(B&&B.value===`(`||f.regex===!1){Z({type:`plus`,value:V,output:x});continue}if(B&&(B.type===`bracket`||B.type===`paren`||B.type===`brace`)||I.parens>0){Z({type:`plus`,value:V});continue}Z({type:`plus`,value:x});continue}if(V===`@`){if(f.noextglob!==!0&&U()===`(`&&U(2)!==`?`){Z({type:`at`,extglob:!0,value:V,output:``});continue}Z({type:`text`,value:V});continue}if(V!==`*`){(V===`$`||V===`^`)&&(V=`\\${V}`);let e=o.exec(G());e&&(V+=e[0],I.index+=e[0].length),Z({type:`text`,value:V});continue}if(B&&(B.type===`globstar`||B.star===!0)){B.type=`star`,B.star=!0,B.value+=V,B.output=F,I.backtrack=!0,I.globstar=!0,K(V);continue}let t=G();if(f.noextglob!==!0&&/^\([^?]/.test(t)){Q(`star`,V);continue}if(B.type===`star`){if(f.noglobstar===!0){K(V);continue}let n=B.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(f.bash===!0&&(!i||t[0]&&t[0]!==`/`)){Z({type:`star`,value:V,output:``});continue}let o=I.braces>0&&(n.type===`comma`||n.type===`brace`),s=L.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){Z({type:`star`,value:V,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[I.index+4];if(n&&n!==`/`)break;t=t.slice(3),K(`/**`,3)}if(n.type===`bos`&&H()){B.type=`globstar`,B.value+=V,B.output=M(f),I.output=B.output,I.globstar=!0,K(V);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&H()){I.output=I.output.slice(0,-(n.output+B.output).length),n.output=`(?:${n.output}`,B.type=`globstar`,B.output=M(f)+(f.strictSlashes?`)`:`|$)`),B.value+=V,I.globstar=!0,I.output+=n.output+B.output,K(V);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;I.output=I.output.slice(0,-(n.output+B.output).length),n.output=`(?:${n.output}`,B.type=`globstar`,B.output=`${M(f)}${S}|${S}${e})`,B.value+=V,I.output+=n.output+B.output,I.globstar=!0,K(V+W()),Z({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){B.type=`globstar`,B.value+=V,B.output=`(?:^|${S}|${M(f)}${S})`,I.output=B.output,I.globstar=!0,K(V+W()),Z({type:`slash`,value:`/`,output:``});continue}I.output=I.output.slice(0,-B.output.length),B.type=`globstar`,B.output=M(f),B.value+=V,I.output+=B.output,I.globstar=!0,K(V);continue}let n={type:`star`,value:V,output:F};if(f.bash===!0){n.output=`.*?`,(B.type===`bos`||B.type===`slash`)&&(n.output=N+n.output),Z(n);continue}if(B&&(B.type===`bracket`||B.type===`paren`)&&f.regex===!0){n.output=V,Z(n);continue}(I.index===I.start||B.type===`slash`||B.type===`dot`)&&(B.type===`dot`?(I.output+=E,B.output+=E):f.dot===!0?(I.output+=D,B.output+=D):(I.output+=N,B.output+=N),U()!==`*`&&(I.output+=C,B.output+=C)),Z(n)}for(;I.brackets>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));I.output=r.escapeLast(I.output,`[`),X(`brackets`)}for(;I.parens>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));I.output=r.escapeLast(I.output,`(`),X(`parens`)}for(;I.braces>0;){if(f.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));I.output=r.escapeLast(I.output,`{`),X(`braces`)}if(f.strictSlashes!==!0&&(B.type===`star`||B.type===`bracket`)&&Z({type:`maybe_slash`,value:``,output:`${S}?`}),I.backtrack===!0){I.output=``;for(let e of I.tokens)I.output+=e.output==null?e.value:e.output,e.suffix&&(I.output+=e.suffix)}return I};d.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=n.globChars(a.windows),v=a.dot?m:p,y=a.dot?h:p,b=a.capture?``:`?:`,x={negated:!1,prefix:``},S=a.bash===!0?`.*?`:g;a.capture&&(S=`(${S})`);let C=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,w=e=>{switch(e){case`*`:return`${v}${d}${S}`;case`.*`:return`${l}${d}${S}`;case`*.*`:return`${v}${S}${l}${d}${S}`;case`*/*`:return`${v}${S}${u}${d}${y}${S}`;case`**`:return v+C(a);case`**/*`:return`(?:${v}${C(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${C(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${C(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=w(t[1]);return n?n+l+t[2]:void 0}}},T=w(r.removePrefix(e,x));return T&&a.strictSlashes!==!0&&(T+=`${u}?`),T},t.exports=d})),x=t(((e,t)=>{let n=y(),r=b(),i=v(),a=_(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),S=t(((e,t)=>{let n=x(),r=v();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i})),C=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.Builder=void 0;let n=e(`path`),r=g();var i=null;try{e.resolve(`picomatch`),i=S()}catch{}t.Builder=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:n.sep,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new r.APIBuilder(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new r.APIBuilder(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||i;if(!n)throw Error(`Please specify a glob function to use glob matching.`);var r=this.globCache[e.join(`\0`)];return r||(r=n(e,...t),this.globCache[e.join(`\0`)]=r),this.options.filters.push(e=>r(e)),this}}})),w=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),T=t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.fdir=void 0;let r=C();Object.defineProperty(e,`fdir`,{enumerable:!0,get:function(){return r.Builder}}),n(w(),e)}));export{S as n,T as t};
1
+ import{a as e,t}from"../rolldown-runtime.mjs";var n=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.normalizePath=t.convertSlashes=t.cleanPath=void 0;let n=e(`path`);function r(e){let t=(0,n.normalize)(e);return t.length>1&&t[t.length-1]===n.sep&&(t=t.substring(0,t.length-1)),t}t.cleanPath=r;let i=/[\\/]/g;function a(e,t){return e.replace(i,t)}t.convertSlashes=a;function o(e,t){let{resolvePaths:i,normalizePath:o,pathSeparator:s}=t,c=process.platform===`win32`&&e.includes(`/`)||e.startsWith(`.`);return i&&(e=(0,n.resolve)(e)),(o||c)&&(e=r(e)),e===`.`?``:a(e[e.length-1]===s?e:e+s,s)}t.normalizePath=o})),r=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.build=t.joinDirectoryPath=t.joinPathWithBasePath=void 0;let r=e(`path`),i=n();function a(e,t){return t+e}t.joinPathWithBasePath=a;function o(e,t){return function(n,a){return a.startsWith(e)?a.replace(e,``)+n:(0,i.convertSlashes)((0,r.relative)(e,a),t.pathSeparator)+t.pathSeparator+n}}function s(e){return e}function c(e,t,n){return t+e+n}t.joinDirectoryPath=c;function l(e,t){let{relativePaths:n,includeBasePath:r}=t;return n&&e?o(e,t):r?a:s}t.build=l})),i=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;function t(e){return function(t,n){n.push(t.substring(e.length)||`.`)}}function n(e){return function(t,n,r){let i=t.substring(e.length)||`.`;r.every(e=>e(i,!0))&&n.push(i)}}let r=(e,t)=>{t.push(e||`.`)},i=(e,t,n)=>{let r=e||`.`;n.every(e=>e(r,!0))&&t.push(r)},a=()=>{};function o(e,o){let{includeDirs:s,filters:c,relativePaths:l}=o;return s?l?c&&c.length?n(e):t(e):c&&c.length?i:r:a}e.build=o})),a=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let t=(e,t,n,r)=>{r.every(t=>t(e,!1))&&n.files++},n=(e,t,n,r)=>{r.every(t=>t(e,!1))&&t.push(e)},r=(e,t,n,r)=>{n.files++},i=(e,t)=>{t.push(e)},a=()=>{};function o(e){let{excludeFiles:o,filters:s,onlyCounts:c}=e;return o?a:s&&s.length?c?t:n:c?r:i}e.build=o})),o=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let t=e=>e,n=()=>[``].slice(0,0);function r(e){return e.group?n:t}e.build=r})),s=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let t=(e,t,n)=>{e.push({directory:t,files:n,dir:t})},n=()=>{};function r(e){return e.group?t:n}e.build=r})),c=t((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.build=void 0;let r=n(e(`fs`)),i=function(e,t,n){let{queue:i,options:{suppressErrors:a}}=t;i.enqueue(),r.default.stat(e,(r,o)=>{if(r){i.dequeue(a?null:r,t);return}n(o,e),i.dequeue(null,t)})},a=function(e,t,n){let{queue:i,options:{suppressErrors:a}}=t;i.enqueue(),r.default.realpath(e,(e,o)=>{if(e){i.dequeue(a?null:e,t);return}r.default.lstat(o,(e,r)=>{n(r,o),i.dequeue(null,t)})})},o=function(e,t,n){try{n(r.default.statSync(e),e)}catch(e){if(!t.options.suppressErrors)throw e}},s=function(e,t,n){try{let t=r.default.realpathSync(e);n(r.default.lstatSync(t),t)}catch(e){if(!t.options.suppressErrors)throw e}};function c(e,t){return!e.resolveSymlinks||e.excludeSymlinks?null:e.useRealPaths?t?s:a:t?o:i}t.build=c})),l=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.build=void 0;let t=e=>e.counts,n=e=>e.groups,r=e=>e.paths,i=e=>e.paths.slice(0,e.options.maxFiles),a=(e,t,n)=>(l(t,n,e.counts,e.options.suppressErrors),null),o=(e,t,n)=>(l(t,n,e.paths,e.options.suppressErrors),null),s=(e,t,n)=>(l(t,n,e.paths.slice(0,e.options.maxFiles),e.options.suppressErrors),null),c=(e,t,n)=>(l(t,n,e.groups,e.options.suppressErrors),null);function l(e,t,n,r){t(e&&!r?e:null,n)}function u(e,l){let{onlyCounts:u,group:d,maxFiles:f}=e;return u?l?t:a:d?l?n:c:f?l?i:s:l?r:o}e.build=u})),u=t((t=>{var n=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,`__esModule`,{value:!0}),t.build=void 0;let r=n(e(`fs`)),i={withFileTypes:!0},a=(e,t,n,a)=>{if(e.queue.enqueue(),n<0){e.queue.dequeue(null,e);return}e.counts.directories++,r.default.readdir(t||`.`,i,function(r,i=[]){a(i,t,n),e.queue.dequeue(e.options.suppressErrors?null:r,e)})},o=(e,t,n,a)=>{if(n<0)return;e.counts.directories++;let o=[];try{o=r.default.readdirSync(t||`.`,i)}catch(t){if(!e.options.suppressErrors)throw t}a(o,t,n)};function s(e){return e?o:a}t.build=s})),d=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Queue=void 0,e.Queue=class{onQueueEmpty;count=0;constructor(e){this.onQueueEmpty=e}enqueue(){this.count++}dequeue(e,t){(--this.count===0||e)&&this.onQueueEmpty(e,t)}}})),f=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Counter=void 0,e.Counter=class{_files=0;_directories=0;set files(e){this._files=e}get files(){return this._files}set directories(e){this._directories=e}get directories(){return this._directories}get dirs(){return this._directories}}})),p=t((t=>{var p=t&&t.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),m=t&&t.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),h=t&&t.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!==`default`&&Object.prototype.hasOwnProperty.call(e,n)&&p(t,e,n);return m(t,e),t};Object.defineProperty(t,`__esModule`,{value:!0}),t.Walker=void 0;let g=e(`path`),_=n(),v=h(r()),y=h(i()),b=h(a()),x=h(o()),S=h(s()),C=h(c()),w=h(l()),T=h(u()),E=d(),D=f();t.Walker=class{root;isSynchronous;state;joinPath;pushDirectory;pushFile;getArray;groupFiles;resolveSymlink;walkDirectory;callbackInvoker;constructor(e,t,n){this.isSynchronous=!n,this.callbackInvoker=w.build(t,this.isSynchronous),this.state={paths:[``].slice(0,0),groups:[],counts:new D.Counter,options:t,queue:new E.Queue((e,t)=>this.callbackInvoker(t,e,n))},this.root=(0,_.normalizePath)(e,this.state.options),this.joinPath=v.build(this.root,t),this.pushDirectory=y.build(this.root,t),this.pushFile=b.build(t),this.getArray=x.build(t),this.groupFiles=S.build(t),this.resolveSymlink=C.build(t,this.isSynchronous),this.walkDirectory=T.build(this.isSynchronous)}start(){return this.walkDirectory(this.state,this.root,this.state.options.maxDepth,this.walk),this.isSynchronous?this.callbackInvoker(this.state,null):null}walk=(e,t,n)=>{let{paths:r,options:{filters:i,resolveSymlinks:a,excludeSymlinks:o,exclude:s,maxFiles:c,signal:l}}=this.state;if(l&&l.aborted||c&&r.length>c)return;this.pushDirectory(t,r,i);let u=this.getArray(this.state.paths);for(let r=0;r<e.length;++r){let c=e[r];if(c.isFile()||c.isSymbolicLink()&&!a&&!o){let e=this.joinPath(c.name,t);this.pushFile(e,u,this.state.counts,i)}else if(c.isDirectory()){let e=v.joinDirectoryPath(c.name,t,this.state.options.pathSeparator);if(s&&s(c.name,e))continue;this.walkDirectory(this.state,e,n-1,this.walk)}else if(c.isSymbolicLink()&&this.resolveSymlink){let e=v.joinPathWithBasePath(c.name,t);this.resolveSymlink(e,this.state,(e,t)=>{if(e.isDirectory()){if(t=(0,_.normalizePath)(t,this.state.options),s&&s(c.name,t))return;this.walkDirectory(this.state,t,n-1,this.walk)}else{let e=(0,g.basename)(t),n=(0,_.normalizePath)((0,g.dirname)(t),this.state.options);t=this.joinPath(e,n),this.pushFile(t,u,this.state.counts,i)}})}}this.groupFiles(this.state.groups,t,u)}}})),m=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.callback=e.promise=void 0;let t=p();function n(e,t){return new Promise((n,i)=>{r(e,t,(e,t)=>{if(e)return i(e);n(t)})})}e.promise=n;function r(e,n,r){new t.Walker(e,n,r).start()}e.callback=r})),h=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.sync=void 0;let t=p();function n(e,n){return new t.Walker(e,n).start()}e.sync=n})),g=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.APIBuilder=void 0;let t=m(),n=h();e.APIBuilder=class{root;options;constructor(e,t){this.root=e,this.options=t}withPromise(){return(0,t.promise)(this.root,this.options)}withCallback(e){(0,t.callback)(this.root,this.options,e)}sync(){return(0,n.sync)(this.root,this.options)}}})),_=t(((e,t)=>{let n=`[^\\\\/]`,r=`[^/]`,i=`(?:\\/|$)`,a=`(?:^|\\/)`,o=`\\.{1,2}${i}`,s={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:r,END_ANCHOR:i,DOTS_SLASH:o,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${a}${o})`,NO_DOT_SLASH:`(?!\\.{0,1}${i})`,NO_DOTS_SLASH:`(?!${o})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${r}*?`,START_ANCHOR:a,SEP:`/`},c={...s,SLASH_LITERAL:`[\\\\/]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`\\.{1,2}(?:[\\\\/]|$)`,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))`,NO_DOT_SLASH:`(?!\\.{0,1}(?:[\\\\/]|$))`,NO_DOTS_SLASH:`(?!\\.{1,2}(?:[\\\\/]|$))`,QMARK_NO_DOT:`[^.\\\\/]`,START_ANCHOR:`(?:^|[\\\\/])`,END_ANCHOR:`(?:[\\\\/]|$)`,SEP:`\\`};t.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:{__proto__:null,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`},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:{__proto__:null,"***":`*`,"**/**":`**`,"**/**/**":`**`},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,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?c:s}}})),v=t((e=>{let{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=_();e.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),e.hasRegexChars=e=>r.test(e),e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,`\\$1`),e.toPosixSlashes=e=>e.replace(t,`/`),e.isWindows=()=>{if(typeof navigator<`u`&&navigator.platform){let e=navigator.platform.toLowerCase();return e===`win32`||e===`windows`}return typeof process<`u`&&process.platform?process.platform===`win32`:!1},e.removeBackslashes=e=>e.replace(n,e=>e===`\\`?``:e),e.escapeLast=(t,n,r)=>{let i=t.lastIndexOf(n,r);return i===-1?t:t[i-1]===`\\`?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},e.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r},e.basename=(e,{windows:t}={})=>{let n=e.split(t?/[\\/]/:`/`),r=n[n.length-1];return r===``?n[n.length-2]:r}})),y=t(((e,t)=>{let n=v(),{CHAR_ASTERISK:r,CHAR_AT:i,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:c,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_LEFT_PARENTHESES:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_PLUS:p,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:h,CHAR_RIGHT_PARENTHESES:g,CHAR_RIGHT_SQUARE_BRACKET:y}=_(),b=e=>e===l||e===a,x=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let _=t||{},v=e.length-1,S=_.parts===!0||_.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,A=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,L=!1,R=!1,z=!1,B=0,V,H,U={value:``,depth:0,isGlob:!1},W=()=>D>=v,G=()=>E.charCodeAt(D+1),K=()=>(V=H,E.charCodeAt(++D));for(;D<v;){H=K();let e;if(H===a){I=U.backslashes=!0,H=K(),H===u&&(F=!0);continue}if(F===!0||H===u){for(B++;W()!==!0&&(H=K());){if(H===a){I=U.backslashes=!0,K();continue}if(H===u){B++;continue}if(F!==!0&&H===s&&(H=K())===s){if(A=U.isBrace=!0,M=U.isGlob=!0,z=!0,S===!0)continue;break}if(F!==!0&&H===o){if(A=U.isBrace=!0,M=U.isGlob=!0,z=!0,S===!0)continue;break}if(H===h&&(B--,B===0)){F=!1,A=U.isBrace=!0,z=!0;break}}if(S===!0)continue;break}if(H===l){if(C.push(D),w.push(U),U={value:``,depth:0,isGlob:!1},z===!0)continue;if(V===s&&D===O+1){O+=2;continue}k=D+1;continue}if(_.noext!==!0&&(H===p||H===i||H===r||H===m||H===c)&&G()===d){if(M=U.isGlob=!0,N=U.isExtglob=!0,z=!0,H===c&&D===O&&(R=!0),S===!0){for(;W()!==!0&&(H=K());){if(H===a){I=U.backslashes=!0,H=K();continue}if(H===g){M=U.isGlob=!0,z=!0;break}}continue}break}if(H===r){if(V===r&&(P=U.isGlobstar=!0),M=U.isGlob=!0,z=!0,S===!0)continue;break}if(H===m){if(M=U.isGlob=!0,z=!0,S===!0)continue;break}if(H===f){for(;W()!==!0&&(e=K());){if(e===a){I=U.backslashes=!0,K();continue}if(e===y){j=U.isBracket=!0,M=U.isGlob=!0,z=!0;break}}if(S===!0)continue;break}if(_.nonegate!==!0&&H===c&&D===O){L=U.negated=!0,O++;continue}if(_.noparen!==!0&&H===d){if(M=U.isGlob=!0,S===!0){for(;W()!==!0&&(H=K());){if(H===d){I=U.backslashes=!0,H=K();continue}if(H===g){z=!0;break}}continue}break}if(M===!0){if(z=!0,S===!0)continue;break}}_.noext===!0&&(N=!1,M=!1);let q=E,J=``,Y=``;O>0&&(J=E.slice(0,O),E=E.slice(O),k-=O),q&&M===!0&&k>0?(q=E.slice(0,k),Y=E.slice(k)):M===!0?(q=``,Y=E):q=E,q&&q!==``&&q!==`/`&&q!==E&&b(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),_.unescape===!0&&(Y&&=n.removeBackslashes(Y),q&&I===!0&&(q=n.removeBackslashes(q)));let X={prefix:J,input:e,start:O,base:q,glob:Y,isBrace:A,isBracket:j,isGlob:M,isExtglob:N,isGlobstar:P,negated:L,negatedExtglob:R};if(_.tokens===!0&&(X.maxDepth=0,b(H)||w.push(U),X.tokens=w),_.parts===!0||_.tokens===!0){let t;for(let n=0;n<C.length;n++){let r=t?t+1:O,i=C[n],a=e.slice(r,i);_.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=J):w[n].value=a,x(w[n]),X.maxDepth+=w[n].depth),(n!==0||a!==``)&&T.push(a),t=i}if(t&&t+1<e.length){let n=e.slice(t+1);T.push(n),_.tokens&&(w[w.length-1].value=n,x(w[w.length-1]),X.maxDepth+=w[w.length-1].depth)}X.slashes=C,X.parts=T}return X}})),b=t(((e,t)=>{let n=_(),r=v(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:c}=n,l=(e,t)=>{if(typeof t.expandRange==`function`)return t.expandRange(...e,t);e.sort();let n=`[${e.join(`-`)}]`;try{new RegExp(n)}catch{return e.map(e=>r.escapeRegex(e)).join(`..`)}return n},u=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,d=e=>{let t=[],n=0,r=0,i=0,a=``,o=!1;for(let s of e){if(o===!0){a+=s,o=!1;continue}if(s===`\\`){a+=s,o=!0;continue}if(s===`"`){i=i===1?0:1,a+=s;continue}if(i===0){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(n===0){if(s===`(`)r++;else if(s===`)`&&r>0)r--;else if(s===`|`&&r===0){t.push(a),a=``;continue}}}a+=s}return t.push(a),t},f=e=>{let t=!1;for(let n of e){if(t===!0){t=!1;continue}if(n===`\\`){t=!0;continue}if(/[?*+@!()[\]{}]/.test(n))return!1}return!0},p=e=>{let t=e.trim(),n=!0;for(;n===!0;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if(f(t))return t.replace(/\\(.)/g,`$1`)},m=e=>{let t=e.map(p).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let r=t[e],i=t[n],a=r[0];if(!(!a||r!==a.repeat(r.length)||i!==a.repeat(i.length))&&(r===i||r.startsWith(i)||i.startsWith(r)))return!0}return!1},h=(e,t=!0)=>{if(e[0]!==`+`&&e[0]!==`*`||e[1]!==`(`)return;let n=0,r=0,i=0,a=!1;for(let o=1;o<e.length;o++){let s=e[o];if(a===!0){a=!1;continue}if(s===`\\`){a=!0;continue}if(s===`"`){i=i===1?0:1;continue}if(i!==1){if(s===`[`){n++;continue}if(s===`]`&&n>0){n--;continue}if(!(n>0)){if(s===`(`){r++;continue}if(s===`)`&&(r--,r===0))return t===!0&&o!==e.length-1?void 0:{type:e[0],body:e.slice(2,o),end:o}}}}},g=e=>{let t=0,n=[];for(;t<e.length;){let r=h(e.slice(t),!1);if(!r||r.type!==`*`)return;let i=d(r.body).map(e=>e.trim());if(i.length!==1)return;let a=p(i[0]);if(!a||a.length!==1)return;n.push(a),t+=r.end+1}if(!(n.length<1))return`${n.length===1?r.escapeRegex(n[0]):`[${n.map(e=>r.escapeRegex(e)).join(``)}]`}*`},y=e=>{let t=0,n=e.trim(),r=h(n);for(;r;)t++,n=r.body.trim(),r=h(n);return t},b=(e,t)=>{if(t.maxExtglobRecursion===!1)return{risky:!1};let r=typeof t.maxExtglobRecursion==`number`?t.maxExtglobRecursion:n.DEFAULT_MAX_EXTGLOB_RECURSION,i=d(e).map(e=>e.trim());if(i.length>1&&(i.some(e=>e===``)||i.some(e=>/^[*?]+$/.test(e))||m(i)))return{risky:!0};for(let e of i){let t=g(e);if(t)return{risky:!0,safeOutput:t};if(y(e)>r)return{risky:!0}}return{risky:!1}},x=(e,t)=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);e=c[e]||e;let d={...t},f=typeof d.maxLength==`number`?Math.min(i,d.maxLength):i,p=e.length;if(p>f)throw SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${f}`);let m={type:`bos`,value:``,output:d.prepend||``},h=[m],g=d.capture?``:`?:`,_=n.globChars(d.windows),v=n.extglobChars(_),{DOT_LITERAL:y,PLUS_LITERAL:S,SLASH_LITERAL:C,ONE_CHAR:w,DOTS_SLASH:T,NO_DOT:E,NO_DOT_SLASH:D,NO_DOTS_SLASH:O,QMARK:k,QMARK_NO_DOT:A,STAR:j,START_ANCHOR:M}=_,N=e=>`(${g}(?:(?!${M}${e.dot?T:y}).)*?)`,P=d.dot?``:E,F=d.dot?k:A,I=d.bash===!0?N(d):j;d.capture&&(I=`(${I})`),typeof d.noext==`boolean`&&(d.noextglob=d.noext);let L={input:e,index:-1,start:0,dot:d.dot===!0,consumed:``,output:``,prefix:``,backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:h};e=r.removePrefix(e,L),p=e.length;let R=[],z=[],B=[],V=m,H,U=()=>L.index===p-1,W=L.peek=(t=1)=>e[L.index+t],G=L.advance=()=>e[++L.index]||``,K=()=>e.slice(L.index+1),q=(e=``,t=0)=>{L.consumed+=e,L.index+=t},J=e=>{L.output+=e.output==null?e.value:e.output,q(e.value)},Y=()=>{let e=1;for(;W()===`!`&&(W(2)!==`(`||W(3)===`?`);)G(),L.start++,e++;return e%2==0?!1:(L.negated=!0,L.start++,!0)},X=e=>{L[e]++,B.push(e)},Z=e=>{L[e]--,B.pop()},Q=e=>{if(V.type===`globstar`){let t=L.braces>0&&(e.type===`comma`||e.type===`brace`),n=e.extglob===!0||R.length&&(e.type===`pipe`||e.type===`paren`);e.type!==`slash`&&e.type!==`paren`&&!t&&!n&&(L.output=L.output.slice(0,-V.output.length),V.type=`star`,V.value=`*`,V.output=I,L.output+=V.output)}if(R.length&&e.type!==`paren`&&(R[R.length-1].inner+=e.value),(e.value||e.output)&&J(e),V&&V.type===`text`&&e.type===`text`){V.output=(V.output||V.value)+e.value,V.value+=e.value;return}e.prev=V,h.push(e),V=e},$=(e,t)=>{let n={...v[t],conditions:1,inner:``};n.prev=V,n.parens=L.parens,n.output=L.output,n.startIndex=L.index,n.tokensIndex=h.length;let r=(d.capture?`(`:``)+n.open;X(`parens`),Q({type:e,value:t,output:L.output?``:w}),Q({type:`paren`,extglob:!0,value:G(),output:r}),R.push(n)},ee=n=>{let i=e.slice(n.startIndex,L.index+1),a=b(e.slice(n.startIndex+2,L.index),d);if((n.type===`plus`||n.type===`star`)&&a.risky){let e=a.safeOutput?(n.output?``:w)+(d.capture?`(${a.safeOutput})`:a.safeOutput):void 0,t=h[n.tokensIndex];t.type=`text`,t.value=i,t.output=e||r.escapeRegex(i);for(let e=n.tokensIndex+1;e<h.length;e++)h[e].value=``,h[e].output=``,delete h[e].suffix;L.output=n.output+t.output,L.backtrack=!0,Q({type:`paren`,extglob:!0,value:H,output:``}),Z(`parens`);return}let o=n.close+(d.capture?`)`:``),s;if(n.type===`negate`){let e=I;n.inner&&n.inner.length>1&&n.inner.includes(`/`)&&(e=N(d)),(e!==I||U()||/^\)+$/.test(K()))&&(o=n.close=`)$))${e}`),n.inner.includes(`*`)&&(s=K())&&/^\.[^\\/.]+$/.test(s)&&(o=n.close=`)${x(s,{...t,fastpaths:!1}).output})${e})`),n.prev.type===`bos`&&(L.negatedExtglob=!0)}Q({type:`paren`,extglob:!0,value:H,output:o}),Z(`parens`)};if(d.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(e)){let n=!1,i=e.replace(s,(e,t,r,i,a,o)=>i===`\\`?(n=!0,e):i===`?`?t?t+i+(a?k.repeat(a.length):``):o===0?F+(a?k.repeat(a.length):``):k.repeat(r.length):i===`.`?y.repeat(r.length):i===`*`?t?t+i+(a?I:``):I:t?e:`\\${e}`);return n===!0&&(i=d.unescape===!0?i.replace(/\\/g,``):i.replace(/\\+/g,e=>e.length%2==0?`\\\\`:e?`\\`:``)),i===e&&d.contains===!0?(L.output=e,L):(L.output=r.wrapOutput(i,L,t),L)}for(;!U();){if(H=G(),H===`\0`)continue;if(H===`\\`){let e=W();if(e===`/`&&d.bash!==!0||e===`.`||e===`;`)continue;if(!e){H+=`\\`,Q({type:`text`,value:H});continue}let t=/^\\+/.exec(K()),n=0;if(t&&t[0].length>2&&(n=t[0].length,L.index+=n,n%2!=0&&(H+=`\\`)),d.unescape===!0?H=G():H+=G(),L.brackets===0){Q({type:`text`,value:H});continue}}if(L.brackets>0&&(H!==`]`||V.value===`[`||V.value===`[^`)){if(d.posix!==!1&&H===`:`){let e=V.value.slice(1);if(e.includes(`[`)&&(V.posix=!0,e.includes(`:`))){let e=V.value.lastIndexOf(`[`),t=V.value.slice(0,e),n=a[V.value.slice(e+2)];if(n){V.value=t+n,L.backtrack=!0,G(),!m.output&&h.indexOf(V)===1&&(m.output=w);continue}}}(H===`[`&&W()!==`:`||H===`-`&&W()===`]`)&&(H=`\\${H}`),H===`]`&&(V.value===`[`||V.value===`[^`)&&(H=`\\${H}`),d.posix===!0&&H===`!`&&V.value===`[`&&(H=`^`),V.value+=H,J({value:H});continue}if(L.quotes===1&&H!==`"`){H=r.escapeRegex(H),V.value+=H,J({value:H});continue}if(H===`"`){L.quotes=L.quotes===1?0:1,d.keepQuotes===!0&&Q({type:`text`,value:H});continue}if(H===`(`){X(`parens`),Q({type:`paren`,value:H});continue}if(H===`)`){if(L.parens===0&&d.strictBrackets===!0)throw SyntaxError(u(`opening`,`(`));let e=R[R.length-1];if(e&&L.parens===e.parens+1){ee(R.pop());continue}Q({type:`paren`,value:H,output:L.parens?`)`:`\\)`}),Z(`parens`);continue}if(H===`[`){if(d.nobracket===!0||!K().includes(`]`)){if(d.nobracket!==!0&&d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));H=`\\${H}`}else X(`brackets`);Q({type:`bracket`,value:H});continue}if(H===`]`){if(d.nobracket===!0||V&&V.type===`bracket`&&V.value.length===1){Q({type:`text`,value:H,output:`\\${H}`});continue}if(L.brackets===0){if(d.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));Q({type:`text`,value:H,output:`\\${H}`});continue}Z(`brackets`);let e=V.value.slice(1);if(V.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(H=`/${H}`),V.value+=H,J({value:H}),d.literalBrackets===!1||r.hasRegexChars(e))continue;let t=r.escapeRegex(V.value);if(L.output=L.output.slice(0,-V.value.length),d.literalBrackets===!0){L.output+=t,V.value=t;continue}V.value=`(${g}${t}|${V.value})`,L.output+=V.value;continue}if(H===`{`&&d.nobrace!==!0){X(`braces`);let e={type:`brace`,value:H,output:`(`,outputIndex:L.output.length,tokensIndex:L.tokens.length};z.push(e),Q(e);continue}if(H===`}`){let e=z[z.length-1];if(d.nobrace===!0||!e){Q({type:`text`,value:H,output:H});continue}let t=`)`;if(e.dots===!0){let e=h.slice(),n=[];for(let t=e.length-1;t>=0&&(h.pop(),e[t].type!==`brace`);t--)e[t].type!==`dots`&&n.unshift(e[t].value);t=l(n,d),L.backtrack=!0}if(e.comma!==!0&&e.dots!==!0){let n=L.output.slice(0,e.outputIndex),r=L.tokens.slice(e.tokensIndex);e.value=e.output=`\\{`,H=t=`\\}`,L.output=n;for(let e of r)L.output+=e.output||e.value}Q({type:`brace`,value:H,output:t}),Z(`braces`),z.pop();continue}if(H===`|`){R.length>0&&R[R.length-1].conditions++,Q({type:`text`,value:H});continue}if(H===`,`){let e=H,t=z[z.length-1];t&&B[B.length-1]===`braces`&&(t.comma=!0,e=`|`),Q({type:`comma`,value:H,output:e});continue}if(H===`/`){if(V.type===`dot`&&L.index===L.start+1){L.start=L.index+1,L.consumed=``,L.output=``,h.pop(),V=m;continue}Q({type:`slash`,value:H,output:C});continue}if(H===`.`){if(L.braces>0&&V.type===`dot`){V.value===`.`&&(V.output=y);let e=z[z.length-1];V.type=`dots`,V.output+=H,V.value+=H,e.dots=!0;continue}if(L.braces+L.parens===0&&V.type!==`bos`&&V.type!==`slash`){Q({type:`text`,value:H,output:y});continue}Q({type:`dot`,value:H,output:y});continue}if(H===`?`){if(!(V&&V.value===`(`)&&d.noextglob!==!0&&W()===`(`&&W(2)!==`?`){$(`qmark`,H);continue}if(V&&V.type===`paren`){let e=W(),t=H;(V.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(K()))&&(t=`\\${H}`),Q({type:`text`,value:H,output:t});continue}if(d.dot!==!0&&(V.type===`slash`||V.type===`bos`)){Q({type:`qmark`,value:H,output:A});continue}Q({type:`qmark`,value:H,output:k});continue}if(H===`!`){if(d.noextglob!==!0&&W()===`(`&&(W(2)!==`?`||!/[!=<:]/.test(W(3)))){$(`negate`,H);continue}if(d.nonegate!==!0&&L.index===0){Y();continue}}if(H===`+`){if(d.noextglob!==!0&&W()===`(`&&W(2)!==`?`){$(`plus`,H);continue}if(V&&V.value===`(`||d.regex===!1){Q({type:`plus`,value:H,output:S});continue}if(V&&(V.type===`bracket`||V.type===`paren`||V.type===`brace`)||L.parens>0){Q({type:`plus`,value:H});continue}Q({type:`plus`,value:S});continue}if(H===`@`){if(d.noextglob!==!0&&W()===`(`&&W(2)!==`?`){Q({type:`at`,extglob:!0,value:H,output:``});continue}Q({type:`text`,value:H});continue}if(H!==`*`){(H===`$`||H===`^`)&&(H=`\\${H}`);let e=o.exec(K());e&&(H+=e[0],L.index+=e[0].length),Q({type:`text`,value:H});continue}if(V&&(V.type===`globstar`||V.star===!0)){V.type=`star`,V.star=!0,V.value+=H,V.output=I,L.backtrack=!0,L.globstar=!0,q(H);continue}let t=K();if(d.noextglob!==!0&&/^\([^?]/.test(t)){$(`star`,H);continue}if(V.type===`star`){if(d.noglobstar===!0){q(H);continue}let n=V.prev,r=n.prev,i=n.type===`slash`||n.type===`bos`,a=r&&(r.type===`star`||r.type===`globstar`);if(d.bash===!0&&(!i||t[0]&&t[0]!==`/`)){Q({type:`star`,value:H,output:``});continue}let o=L.braces>0&&(n.type===`comma`||n.type===`brace`),s=R.length&&(n.type===`pipe`||n.type===`paren`);if(!i&&n.type!==`paren`&&!o&&!s){Q({type:`star`,value:H,output:``});continue}for(;t.slice(0,3)===`/**`;){let n=e[L.index+4];if(n&&n!==`/`)break;t=t.slice(3),q(`/**`,3)}if(n.type===`bos`&&U()){V.type=`globstar`,V.value+=H,V.output=N(d),L.output=V.output,L.globstar=!0,q(H);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&U()){L.output=L.output.slice(0,-(n.output+V.output).length),n.output=`(?:${n.output}`,V.type=`globstar`,V.output=N(d)+(d.strictSlashes?`)`:`|$)`),V.value+=H,L.globstar=!0,L.output+=n.output+V.output,q(H);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&t[0]===`/`){let e=t[1]===void 0?``:`|$`;L.output=L.output.slice(0,-(n.output+V.output).length),n.output=`(?:${n.output}`,V.type=`globstar`,V.output=`${N(d)}${C}|${C}${e})`,V.value+=H,L.output+=n.output+V.output,L.globstar=!0,q(H+G()),Q({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){V.type=`globstar`,V.value+=H,V.output=`(?:^|${C}|${N(d)}${C})`,L.output=V.output,L.globstar=!0,q(H+G()),Q({type:`slash`,value:`/`,output:``});continue}L.output=L.output.slice(0,-V.output.length),V.type=`globstar`,V.output=N(d),V.value+=H,L.output+=V.output,L.globstar=!0,q(H);continue}let n={type:`star`,value:H,output:I};if(d.bash===!0){n.output=`.*?`,(V.type===`bos`||V.type===`slash`)&&(n.output=P+n.output),Q(n);continue}if(V&&(V.type===`bracket`||V.type===`paren`)&&d.regex===!0){n.output=H,Q(n);continue}(L.index===L.start||V.type===`slash`||V.type===`dot`)&&(V.type===`dot`?(L.output+=D,V.output+=D):d.dot===!0?(L.output+=O,V.output+=O):(L.output+=P,V.output+=P),W()!==`*`&&(L.output+=w,V.output+=w)),Q(n)}for(;L.brackets>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));L.output=r.escapeLast(L.output,`[`),Z(`brackets`)}for(;L.parens>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));L.output=r.escapeLast(L.output,`(`),Z(`parens`)}for(;L.braces>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));L.output=r.escapeLast(L.output,`{`),Z(`braces`)}if(d.strictSlashes!==!0&&(V.type===`star`||V.type===`bracket`)&&Q({type:`maybe_slash`,value:``,output:`${C}?`}),L.backtrack===!0){L.output=``;for(let e of L.tokens)L.output+=e.output==null?e.value:e.output,e.suffix&&(L.output+=e.suffix)}return L};x.fastpaths=(e,t)=>{let a={...t},o=typeof a.maxLength==`number`?Math.min(i,a.maxLength):i,s=e.length;if(s>o)throw SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${o}`);e=c[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:f,NO_DOT:p,NO_DOTS:m,NO_DOTS_SLASH:h,STAR:g,START_ANCHOR:_}=n.globChars(a.windows),v=a.dot?m:p,y=a.dot?h:p,b=a.capture?``:`?:`,x={negated:!1,prefix:``},S=a.bash===!0?`.*?`:g;a.capture&&(S=`(${S})`);let C=e=>e.noglobstar===!0?S:`(${b}(?:(?!${_}${e.dot?f:l}).)*?)`,w=e=>{switch(e){case`*`:return`${v}${d}${S}`;case`.*`:return`${l}${d}${S}`;case`*.*`:return`${v}${S}${l}${d}${S}`;case`*/*`:return`${v}${S}${u}${d}${y}${S}`;case`**`:return v+C(a);case`**/*`:return`(?:${v}${C(a)}${u})?${y}${d}${S}`;case`**/*.*`:return`(?:${v}${C(a)}${u})?${y}${S}${l}${d}${S}`;case`**/.*`:return`(?:${v}${C(a)}${u})?${l}${d}${S}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=w(t[1]);return n?n+l+t[2]:void 0}}},T=w(r.removePrefix(e,x));return T&&a.strictSlashes!==!0&&(T+=`${u}?`),T},t.exports=x})),x=t(((e,t)=>{let n=y(),r=b(),i=v(),a=_(),o=e=>e&&typeof e==`object`&&!Array.isArray(e),s=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>s(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=o(e)&&e.tokens&&e.input;if(e===``||typeof e!=`string`&&!r)throw TypeError(`Expected pattern to be a non-empty string`);let i=t||{},a=i.windows,c=r?s.compileRe(e,t):s.makeRe(e,t,!1,!0),l=c.state;delete c.state;let u=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=s(i.ignore,e,n)}let d=(n,r=!1)=>{let{isMatch:o,match:d,output:f}=s.test(n,c,t,{glob:e,posix:a}),p={glob:e,state:l,regex:c,posix:a,input:n,output:f,match:d,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):u(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),r?p:!0)};return n&&(d.state=l),d};s.test=(e,t,n,{glob:r,posix:a}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let o=n||{},c=o.format||(a?i.toPosixSlashes:null),l=e===r,u=l&&c?c(e):e;return l===!1&&(u=c?c(e):e,l=u===r),(l===!1||o.capture===!0)&&(l=o.matchBase===!0||o.basename===!0?s.matchBase(e,t,n,a):t.exec(u)),{isMatch:!!l,match:l,output:u}},s.matchBase=(e,t,n)=>(t instanceof RegExp?t:s.makeRe(t,n)).test(i.basename(e)),s.isMatch=(e,t,n)=>s(t,n)(e),s.parse=(e,t)=>Array.isArray(e)?e.map(e=>s.parse(e,t)):r(e,{...t,fastpaths:!1}),s.scan=(e,t)=>n(e,t),s.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,c=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(c=`^(?!${c}).*$`);let l=s.toRegex(c,t);return r===!0&&(l.state=e),l},s.makeRe=(e,t={},n=!1,i=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let a={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(a.output=r.fastpaths(e,t)),a.output||(a=r(e,t)),s.compileRe(a,t,n,i)},s.toRegex=(e,t)=>{try{let n=t||{};return new RegExp(e,n.flags||(n.nocase?`i`:``))}catch(e){if(t&&t.debug===!0)throw e;return/$^/}},s.constants=a,t.exports=s})),S=t(((e,t)=>{let n=x(),r=v();function i(e,t,i=!1){return t&&(t.windows===null||t.windows===void 0)&&(t={...t,windows:r.isWindows()}),n(e,t,i)}Object.assign(i,n),t.exports=i})),C=t((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.Builder=void 0;let n=e(`path`),r=g();var i=null;try{e.resolve(`picomatch`),i=S()}catch{}t.Builder=class{globCache={};options={maxDepth:1/0,suppressErrors:!0,pathSeparator:n.sep,filters:[]};globFunction;constructor(e){this.options={...this.options,...e},this.globFunction=this.options.globFunction}group(){return this.options.group=!0,this}withPathSeparator(e){return this.options.pathSeparator=e,this}withBasePath(){return this.options.includeBasePath=!0,this}withRelativePaths(){return this.options.relativePaths=!0,this}withDirs(){return this.options.includeDirs=!0,this}withMaxDepth(e){return this.options.maxDepth=e,this}withMaxFiles(e){return this.options.maxFiles=e,this}withFullPaths(){return this.options.resolvePaths=!0,this.options.includeBasePath=!0,this}withErrors(){return this.options.suppressErrors=!1,this}withSymlinks({resolvePaths:e=!0}={}){return this.options.resolveSymlinks=!0,this.options.useRealPaths=e,this.withFullPaths()}withAbortSignal(e){return this.options.signal=e,this}normalize(){return this.options.normalizePath=!0,this}filter(e){return this.options.filters.push(e),this}onlyDirs(){return this.options.excludeFiles=!0,this.options.includeDirs=!0,this}exclude(e){return this.options.exclude=e,this}onlyCounts(){return this.options.onlyCounts=!0,this}crawl(e){return new r.APIBuilder(e||`.`,this.options)}withGlobFunction(e){return this.globFunction=e,this}crawlWithOptions(e,t){return this.options={...this.options,...t},new r.APIBuilder(e||`.`,this.options)}glob(...e){return this.globFunction?this.globWithOptions(e):this.globWithOptions(e,{dot:!0})}globWithOptions(e,...t){let n=this.globFunction||i;if(!n)throw Error(`Please specify a glob function to use glob matching.`);var r=this.globCache[e.join(`\0`)];return r||(r=n(e,...t),this.globCache[e.join(`\0`)]=r),this.options.filters.push(e=>r(e)),this}}})),w=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0})})),T=t((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.fdir=void 0;let r=C();Object.defineProperty(e,`fdir`,{enumerable:!0,get:function(){return r.Builder}}),n(w(),e)}));export{S as n,T as t};