@mintlify/cli 4.1.68 → 4.1.69

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.
@@ -4,6 +4,6 @@ import { dirname as __mintDirname } from 'node:path';
4
4
  const require = __mintCreateRequire(import.meta.url);
5
5
  const __filename = __mintFileURLToPath(import.meta.url);
6
6
  const __dirname = __mintDirname(__filename);
7
- import{f as e,g as t,i as n,l as r,n as i,o as a,t as o,u as s,y as c}from"./esm-BtDK7B-d.js";import{n as l,t as u}from"./agent-Da2kI1tZ.js";import{a as d,i as f,n as p,o as m,r as h,s as g}from"./multi-repo-config-BdcKgu6I.js";import{link as _,mkdir as v,readFile as y,readdir as b,rename as x,rm as S,writeFile as C}from"node:fs/promises";import w from"node:path";import{execFile as T}from"node:child_process";import{randomUUID as E}from"node:crypto";import{promisify as D}from"node:util";function O(e,t){let n=t!==!1;return/^(y|yes)/i.test(e)?n=!0:/^(n|no)/i.test(e)&&(n=!1),n}function k(e){return e?`Yes`:`No`}var A=n((n,i)=>{let{transformer:o=k}=n,[l,u]=e(`idle`),[d,f]=e(``),p=s(n.theme),m=r({status:l,theme:p});a((e,r)=>{if(l===`idle`){if(t(e)){let e=O(d,n.default);f(o(e)),u(`done`),i(e)}else if(c(e)){let e=k(!O(d,n.default));r.clearLine(0),r.write(e),f(e)}else f(r.line)}});let h=d,g=``;return l===`done`?h=p.style.answer(d):g=` ${p.style.defaultAnswer(n.default===!1?`y/N`:`Y/n`)}`,`${m} ${p.style.message(n.message,l)}${g} ${h}`}),j=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const M={text:(e,t)=>i({message:e,default:t}),confirm:(e,t)=>A({message:e,default:t}),folder:(e,t)=>o({message:e+` (type a path to see matching folders)`,source:e=>j(void 0,void 0,void 0,function*(){let n=d(e?.trim()||t,process.cwd()),r=w.dirname(n),i=w.basename(n),a=(yield b(r,{withFileTypes:!0}).catch(()=>[])).filter(e=>e.isDirectory()&&e.name.startsWith(i)).slice(0,30).map(e=>w.join(r,e.name));return(e?.endsWith(`/`)||e?.endsWith(w.sep))&&a.push(...(yield b(n,{withFileTypes:!0}).catch(()=>[])).filter(e=>e.isDirectory()).slice(0,30).map(e=>w.join(n,e.name))),[.../* @__PURE__ */ new Set([n,...a])].map(e=>({name:e,value:e}))}),validate:e=>j(void 0,void 0,void 0,function*(){return(yield f(w.join(e,`docs.json`)))||`Select a folder containing docs.json.`})})};function N(e){return j(this,void 0,void 0,function*(){try{let{stdout:t}=yield D(T)(`git`,[`-C`,e,`config`,`--get`,`remote.origin.url`],{timeout:2e3}),n=t.trim().replace(/\.git$/,``).match(/[:/]([^/:]+\/[^/]+)$/);if(n?.[1])return n[1]}catch{}return`local/${w.basename(e)}`})}function P(e){return Array.isArray(e)?e.flatMap(P):e&&typeof e==`object`?Object.entries(e).flatMap(([e,t])=>e===`sourceRef`&&typeof t==`string`?[t]:P(t)):[]}function F(e,t){return j(this,arguments,void 0,function*(e,t,n=M){let r=(yield f(e))?yield y(e,`utf8`):void 0,i;if(r)try{i=yield m(e)}catch{console.log(`The existing config is invalid. It will remain unchanged unless you confirm a valid replacement.`)}console.log(`Choose the base repo, then secondary repos and their URL mounts. The base supplies theme and global styles.`);let a=i?.sources.find(e=>e.base),o=yield n.folder(`Base repository folder`,a?d(a.directory,w.dirname(e)):t),s=[{repo:yield n.text(`Base repository identifier (owner/repo)`,a?.repo??(yield N(o))),directory:w.relative(w.dirname(e),o)||`.`,mountPath:``,base:!0}],c=JSON.parse(yield y(w.join(o,`docs.json`),`utf8`)),l=[...new Set(P(c))],u=i?.sources.filter(e=>!e.base)??[],p=0;for(;yield n.confirm(p===0?`Add a secondary repository?`:`Add another secondary repository?`,p<u.length||l.some(e=>!s.some(t=>t.repo===e)));){let t=u[p++],r=yield n.folder(`Secondary repository folder`,t?d(t.directory,w.dirname(e)):w.dirname(o)),i=t?.repo??l.find(e=>!s.some(t=>t.repo===e))??(yield N(r)),a=yield n.text(`Repository identifier (match navigation sourceRef when present)`,i),c=(yield n.text(`URL mount path (for example api serves /api)`,t?.mountPath??w.basename(r))).replace(/^\/+|\/+$/g,``);s.push({repo:a,directory:w.relative(w.dirname(e),r)||`.`,mountPath:c})}let h={sources:s};yield g(h,e),console.log(`
7
+ import{f as e,g as t,i as n,l as r,n as i,o as a,t as o,u as s,y as c}from"./esm-BtDK7B-d.js";import{n as l,t as u}from"./agent-Da2kI1tZ.js";import{a as d,i as f,n as p,o as m,r as h,s as g}from"./multi-repo-config-DSgBwhUJ.js";import{link as _,mkdir as v,readFile as y,readdir as b,rename as x,rm as S,writeFile as C}from"node:fs/promises";import w from"node:path";import{execFile as T}from"node:child_process";import{randomUUID as E}from"node:crypto";import{promisify as D}from"node:util";function O(e,t){let n=t!==!1;return/^(y|yes)/i.test(e)?n=!0:/^(n|no)/i.test(e)&&(n=!1),n}function k(e){return e?`Yes`:`No`}var A=n((n,i)=>{let{transformer:o=k}=n,[l,u]=e(`idle`),[d,f]=e(``),p=s(n.theme),m=r({status:l,theme:p});a((e,r)=>{if(l===`idle`){if(t(e)){let e=O(d,n.default);f(o(e)),u(`done`),i(e)}else if(c(e)){let e=k(!O(d,n.default));r.clearLine(0),r.write(e),f(e)}else f(r.line)}});let h=d,g=``;return l===`done`?h=p.style.answer(d):g=` ${p.style.defaultAnswer(n.default===!1?`y/N`:`Y/n`)}`,`${m} ${p.style.message(n.message,l)}${g} ${h}`}),j=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const M={text:(e,t)=>i({message:e,default:t}),confirm:(e,t)=>A({message:e,default:t}),folder:(e,t)=>o({message:e+` (type a path to see matching folders)`,source:e=>j(void 0,void 0,void 0,function*(){let n=d(e?.trim()||t,process.cwd()),r=w.dirname(n),i=w.basename(n),a=(yield b(r,{withFileTypes:!0}).catch(()=>[])).filter(e=>e.isDirectory()&&e.name.startsWith(i)).slice(0,30).map(e=>w.join(r,e.name));return(e?.endsWith(`/`)||e?.endsWith(w.sep))&&a.push(...(yield b(n,{withFileTypes:!0}).catch(()=>[])).filter(e=>e.isDirectory()).slice(0,30).map(e=>w.join(n,e.name))),[.../* @__PURE__ */ new Set([n,...a])].map(e=>({name:e,value:e}))}),validate:e=>j(void 0,void 0,void 0,function*(){return(yield f(w.join(e,`docs.json`)))||`Select a folder containing docs.json.`})})};function N(e){return j(this,void 0,void 0,function*(){try{let{stdout:t}=yield D(T)(`git`,[`-C`,e,`config`,`--get`,`remote.origin.url`],{timeout:2e3}),n=t.trim().replace(/\.git$/,``).match(/[:/]([^/:]+\/[^/]+)$/);if(n?.[1])return n[1]}catch{}return`local/${w.basename(e)}`})}function P(e){return Array.isArray(e)?e.flatMap(P):e&&typeof e==`object`?Object.entries(e).flatMap(([e,t])=>e===`sourceRef`&&typeof t==`string`?[t]:P(t)):[]}function F(e,t){return j(this,arguments,void 0,function*(e,t,n=M){let r=(yield f(e))?yield y(e,`utf8`):void 0,i;if(r)try{i=yield m(e)}catch{console.log(`The existing config is invalid. It will remain unchanged unless you confirm a valid replacement.`)}console.log(`Choose the base repo, then secondary repos and their URL mounts. The base supplies theme and global styles.`);let a=i?.sources.find(e=>e.base),o=yield n.folder(`Base repository folder`,a?d(a.directory,w.dirname(e)):t),s=[{repo:yield n.text(`Base repository identifier (owner/repo)`,a?.repo??(yield N(o))),directory:w.relative(w.dirname(e),o)||`.`,mountPath:``,base:!0}],c=JSON.parse(yield y(w.join(o,`docs.json`),`utf8`)),l=[...new Set(P(c))],u=i?.sources.filter(e=>!e.base)??[],p=0;for(;yield n.confirm(p===0?`Add a secondary repository?`:`Add another secondary repository?`,p<u.length||l.some(e=>!s.some(t=>t.repo===e)));){let t=u[p++],r=yield n.folder(`Secondary repository folder`,t?d(t.directory,w.dirname(e)):w.dirname(o)),i=t?.repo??l.find(e=>!s.some(t=>t.repo===e))??(yield N(r)),a=yield n.text(`Repository identifier (match navigation sourceRef when present)`,i),c=(yield n.text(`URL mount path (for example api serves /api)`,t?.mountPath??w.basename(r))).replace(/^\/+|\/+$/g,``);s.push({repo:a,directory:w.relative(w.dirname(e),r)||`.`,mountPath:c})}let h={sources:s};yield g(h,e),console.log(`
8
8
  Workspace mapping:`);for(let t of s)console.log(` ${t.repo}${t.base?` (base)`:``}: ${d(t.directory,w.dirname(e))} → /${t.mountPath}`);if(!(yield n.confirm(`Save ${e} and start preview?`,!0)))throw Error(`Setup cancelled. No config was changed.`);if(yield v(w.dirname(e),{recursive:!0}),((yield f(e))?yield y(e,`utf8`):void 0)!==r)throw Error(`The config changed during setup. Nothing was overwritten; run --setup again.`);let b=`${e}.${E()}.tmp`;try{yield C(b,JSON.stringify(h,null,2)+`
9
9
  `,{flag:`wx`}),r===void 0?yield _(b,e):yield x(b,e)}finally{yield S(b,{force:!0})}return e})}function I(e,t){return j(this,void 0,void 0,function*(){var n;let r=(yield h(e.cwd,e.workspace))??w.join(e.cwd,p);if((yield f(r))&&!e.setup)return yield g(yield m(r),r),r;let i=t||process.stdin.isTTY&&process.stdout.isTTY&&!u()&&!l();if(e.nonInteractive||!i)throw Error(`${e.setup?`--setup requires an interactive human terminal.`:`No local multi-repo config found at ${r}.`} Create or update ${r}, then run mint dev --multi-repo --workspace "${r}" --non-interactive. Run mint dev --multi-repo --help for the complete example and field explanations.`);let a=yield F(r,e.cwd,t);return(n=e.onSaved)==null||n.call(e,a),a})}export{F as configureWorkspace,I as resolveWorkspace};
package/dist/start.js CHANGED
@@ -5,4 +5,4 @@ import { dirname as __mintDirname } from 'node:path';
5
5
  const require = __mintCreateRequire(import.meta.url);
6
6
  const __filename = __mintFileURLToPath(import.meta.url);
7
7
  const __dirname = __mintDirname(__filename);
8
- import{r as e}from"./client-DXQ6Tgw0.js";var t=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function n(e,n=e=>process.exit(e)){let r;return i=>(r??=t(this,void 0,void 0,function*(){try{yield e()}catch(e){return console.error(`Preview cleanup failed:`,e),n(1)}return n(i)}),r)}var r=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const i=process.env.MINTLIFY_PACKAGE_NAME??`mint`;let a;function o(){return r(this,void 0,void 0,function*(){let e=a;a=void 0,yield e?.()})}function s(){return r(this,void 0,void 0,function*(){let e=process.argv.slice(2);if(e.some(e=>[`--multi-repo`,`--workspace`,`--setup`,`--non-interactive`].includes(e.split(`=`)[0]??``))){let{isMultiRepoDev:t,runMultiRepoDev:n}=yield import(`./multi-repo-command-BFAjQr5B.js`);if(t(e)){yield n(e,i,e=>{a=e},()=>c(0));return}}let{cli:t}=yield import(`./cli-DOIQ820A.js`);yield t({packageName:i})})}s().catch(e=>r(void 0,void 0,void 0,function*(){console.error(e instanceof Error?e.message:e),yield c(1)}));const c=n(()=>r(void 0,void 0,void 0,function*(){try{yield o()}finally{yield e()}}));process.once(`beforeExit`,()=>r(void 0,void 0,void 0,function*(){try{yield o(),yield e()}catch{}})),process.on(`SIGINT`,()=>{c(130)}),process.on(`SIGTERM`,()=>{c(143)});export{};
8
+ import{r as e}from"./client-DXQ6Tgw0.js";var t=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};function n(e,n=e=>process.exit(e)){let r;return i=>(r??=t(this,void 0,void 0,function*(){try{yield e()}catch(e){return console.error(`Preview cleanup failed:`,e),n(1)}return n(i)}),r)}var r=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const i=process.env.MINTLIFY_PACKAGE_NAME??`mint`;let a;function o(){return r(this,void 0,void 0,function*(){let e=a;a=void 0,yield e?.()})}function s(){return r(this,void 0,void 0,function*(){let e=process.argv.slice(2);if(e.some(e=>[`--multi-repo`,`--workspace`,`--setup`,`--non-interactive`].includes(e.split(`=`)[0]??``))){let{isMultiRepoDev:t,runMultiRepoDev:n}=yield import(`./multi-repo-command-CWv73kzj.js`);if(t(e)){yield n(e,i,e=>{a=e},()=>c(0));return}}let{cli:t}=yield import(`./cli-DffIfnA4.js`);yield t({packageName:i})})}s().catch(e=>r(void 0,void 0,void 0,function*(){console.error(e instanceof Error?e.message:e),yield c(1)}));const c=n(()=>r(void 0,void 0,void 0,function*(){try{yield o()}finally{yield e()}}));process.once(`beforeExit`,()=>r(void 0,void 0,void 0,function*(){try{yield o(),yield e()}catch{}})),process.on(`SIGINT`,()=>{c(130)}),process.on(`SIGTERM`,()=>{c(143)});export{};
@@ -0,0 +1,63 @@
1
+ import { createRequire as __mintCreateRequire } from 'node:module';
2
+ import { fileURLToPath as __mintFileURLToPath } from 'node:url';
3
+ import { dirname as __mintDirname } from 'node:path';
4
+ const require = __mintCreateRequire(import.meta.url);
5
+ const __filename = __mintFileURLToPath(import.meta.url);
6
+ const __dirname = __mintDirname(__filename);
7
+ import{i as e,o as t,t as n}from"./rolldown-runtime-CEAe2Uac.js";import{$ as r,B as i,G as a,H as o,I as s,J as c,K as l,L as u,Q as d,R as f,U as p,V as m,W as h,X as g,Y as _,Z as v,at as y,ct as b,et as x,nt as S,ot as C,q as w,rt as T,st as E,tt as D,z as O}from"./micromark-extension-mdxjs-BEBdzW1n.js";import k from"path";import{lstat as A,readFile as ee,readdir as j,realpath as M,stat as N}from"fs/promises";var P=/* @__PURE__ */ n((e=>{e.fromCallback=function(e){return Object.defineProperty(function(...t){if(typeof t[t.length-1]==`function`)e.apply(this,t);else return new Promise((n,r)=>{e.call(this,...t,(e,t)=>e==null?n(t):r(e))})},"name",{value:e.name})},e.fromPromise=function(e){return Object.defineProperty(function(...t){let n=t[t.length-1];if(typeof n!=`function`)return e.apply(this,t);e.apply(this,t.slice(0,-1)).then(e=>n(null,e),n)},"name",{value:e.name})}})),F=/* @__PURE__ */ n(((t,n)=>{var r=e(`constants`),i=process.cwd,a=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return a||=i.call(process),a};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var s=process.chdir;process.chdir=function(e){a=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}n.exports=c;function c(e){r.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||n(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),o===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){c&&(c.code===`EACCES`||c.code===`EPERM`)&&Date.now()-a<6e4?(setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10)):i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,n,i){e.open(t,r.O_WRONLY|r.O_SYMLINK,n,function(t,r){t?i&&i(t):e.fchmod(r,n,function(t){e.close(r,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,n){var i=e.openSync(t,r.O_WRONLY|r.O_SYMLINK,n),a=!0,o;try{o=e.fchmodSync(i,n),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function n(e){r.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,n,i,a){e.open(t,r.O_SYMLINK,function(t,r){t?a&&a(t):e.futimes(r,n,i,function(t){e.close(r,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,n,i){var a=e.openSync(t,r.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,n,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function a(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!(e&&e.code!==`ENOSYS`&&(process.getuid&&process.getuid()===0||e.code!==`EINVAL`&&e.code!==`EPERM`))}}})),I=/* @__PURE__ */ n(((t,n)=>{var r=e(`stream`).Stream;n.exports=i;function i(e){return{ReadStream:t,WriteStream:n};function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this);var a=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=65536,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}this.fd===null?e.open(this.path,this.flags,this.mode,function(e,t){e?(a.emit(`error`,e),a.readable=!1):(a.fd=t,a.emit(`open`,t),a._read())}):process.nextTick(function(){a._read()})}function n(t,i){if(!(this instanceof n))return new n(t,i);r.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw Error(`start must be >= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),L=/* @__PURE__ */ n(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),R=/* @__PURE__ */ n(((t,n)=>{var r=e(`fs`),i=F(),a=I(),o=L(),s=e(`util`),c,l;
8
+ /* istanbul ignore else - node 0.x polyfill */
9
+ typeof Symbol==`function`&&typeof Symbol.for==`function`?(c=Symbol.for(`graceful-fs.queue`),l=Symbol.for(`graceful-fs.previous`)):(c=`___graceful-fs.queue`,l=`___graceful-fs.previous`);function u(){}function d(e,t){Object.defineProperty(e,c,{get:function(){return t}})}var f=u;s.debuglog?f=s.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(f=function(){var e=s.format.apply(s,arguments);e=`GFS4: `+e.split(/\n/).join(`
10
+ GFS4: `),console.error(e)}),r[c]||(d(r,global[c]||[]),r.close=(function(e){function t(t,n){return e.call(r,t,function(e){e||g(),typeof n==`function`&&n.apply(this,arguments)})}return Object.defineProperty(t,l,{value:e}),t})(r.close),r.closeSync=(function(e){function t(t){e.apply(r,arguments),g()}return Object.defineProperty(t,l,{value:e}),t})(r.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){f(r[c]),e(`assert`).equal(r[c].length,0)})),global[c]||d(global,r[c]),n.exports=p(o(r)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!r.__patched&&(n.exports=p(r),r.__patched=!0);function p(e){i(e),e.gracefulify=p,e.createReadStream=T,e.createWriteStream=E;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?m([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=o;function o(e,t,n,i){return typeof n==`function`&&(i=n,n=null),a(e,t,n,i);function a(e,t,n,i,o){return r(e,t,n,function(r){r&&(r.code===`EMFILE`||r.code===`ENFILE`)?m([a,[e,t,n,i],r,o||Date.now(),Date.now()]):typeof i==`function`&&i.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var f=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=f.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?m([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=a(e);x=g.ReadStream,C=g.WriteStream}var _=e.ReadStream;_&&(x.prototype=Object.create(_.prototype),x.prototype.open=S);var v=e.WriteStream;v&&(C.prototype=Object.create(v.prototype),C.prototype.open=w),Object.defineProperty(e,"ReadStream",{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return C},set:function(e){C=e},enumerable:!0,configurable:!0});var y=x;Object.defineProperty(e,"FileReadStream",{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var b=C;Object.defineProperty(e,"FileWriteStream",{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0});function x(e,t){return this instanceof x?(_.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function S(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function C(e,t){return this instanceof C?(v.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}function w(){var e=this;O(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function T(t,n){return new e.ReadStream(t,n)}function E(t,n){return new e.WriteStream(t,n)}var D=e.open;e.open=O;function O(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return D(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function m(e){f(`ENQUEUE`,e[0].name,e[1]),r[c].push(e),_()}var h;function g(){for(var e=Date.now(),t=0;t<r[c].length;++t)r[c][t].length>2&&(r[c][t][3]=e,r[c][t][4]=e);_()}function _(){if(clearTimeout(h),h=void 0,r[c].length!==0){var e=r[c].shift(),t=e[0],n=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)f(`RETRY`,t.name,n),t.apply(null,n);else if(Date.now()-a>=6e4){f(`TIMEOUT`,t.name,n);var s=n.pop();typeof s==`function`&&s.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(f(`RETRY`,t.name,n),t.apply(null,n.concat([a]))):r[c].push(e)}h===void 0&&(h=setTimeout(_,0))}}})),z=/* @__PURE__ */ n(((e,t)=>{function n(e,{EOL:t=`
11
+ `,finalEOL:n=!0,replacer:r=null,spaces:i}={}){let a=n?t:``;return JSON.stringify(e,r,i).replace(/\n/g,t)+a}function r(e){return Buffer.isBuffer(e)&&(e=e.toString(`utf8`)),e.replace(/^\uFEFF/,``)}t.exports={stringify:n,stripBom:r}})),B=/* @__PURE__ */ n(((t,n)=>{let r;try{r=R()}catch{r=e(`fs`)}let i=P(),{stringify:a,stripBom:o}=z();async function s(e,t={}){typeof t==`string`&&(t={encoding:t});let n=t.fs||r,a=`throws`in t?t.throws:!0,s=await i.fromCallback(n.readFile)(e,t);s=o(s);let c;try{c=JSON.parse(s,t?t.reviver:null)}catch(t){if(a)throw t.message=`${e}: ${t.message}`,t;return null}return c}let c=i.fromPromise(s);function l(e,t={}){typeof t==`string`&&(t={encoding:t});let n=t.fs||r,i=`throws`in t?t.throws:!0;try{let r=n.readFileSync(e,t);return r=o(r),JSON.parse(r,t.reviver)}catch(t){if(i)throw t.message=`${e}: ${t.message}`,t;return null}}async function u(e,t,n={}){let o=n.fs||r,s=a(t,n);await i.fromCallback(o.writeFile)(e,s,n)}let d=i.fromPromise(u);function f(e,t,n={}){let i=n.fs||r,o=a(t,n);return i.writeFileSync(e,o,n)}n.exports={readFile:c,readFileSync:l,writeFile:d,writeFileSync:f}}));const V=[`all`,`topLevel`,`topLevelOneOfs`,`none`],H=[`bash`,`python`,`javascript`,`php`,`go`,`java`,`ruby`],te=[`auto`,`dark`],U=[`woff`,`woff2`],W=[`x`,`website`,`facebook`,`youtube`,`discord`,`slack`,`github`,`linkedin`,`instagram`,`hacker-news`,`medium`,`telegram`,`twitter`,`x-twitter`,`earth-americas`,`bluesky`,`threads`,`reddit`,`podcast`],G=/* @__PURE__ */ `419.AD.AE.AF.AG.AI.AL.AM.AO.AQ.AR.AS.AT.AU.AW.AX.AZ.BA.BB.BD.BE.BF.BG.BH.BI.BJ.BL.BM.BN.BO.BQ.BR.BS.BT.BV.BW.BY.BZ.CA.CC.CD.CF.CG.CH.CI.CK.CL.CM.CN.CO.CR.CU.CV.CW.CX.CY.CZ.DE.DJ.DK.DM.DO.DZ.EC.EE.EG.EH.ER.ES.ET.FI.FJ.FK.FM.FO.FR.GA.GB.GD.GE.GF.GG.GH.GI.GL.GM.GN.GP.GQ.GR.GS.GT.GU.GW.GY.HK.HM.HN.HR.HT.HU.ID.IE.IL.IM.IN.IO.IQ.IR.IS.IT.JE.JM.JO.JP.KE.KG.KH.KI.KM.KN.KP.KR.KW.KY.KZ.LA.LB.LC.LI.LK.LR.LS.LT.LU.LV.LY.MA.MC.MD.ME.MF.MG.MH.MK.ML.MM.MN.MO.MP.MQ.MR.MS.MT.MU.MV.MW.MX.MY.MZ.NA.NC.NE.NF.NG.NI.NL.NO.NP.NR.NU.NZ.OM.PA.PE.PF.PG.PH.PK.PL.PM.PN.PR.PS.PT.PW.PY.QA.RE.RO.RS.RU.RW.SA.SB.SC.SD.SE.SG.SH.SI.SJ.SK.SL.SM.SN.SO.SR.SS.ST.SV.SX.SY.SZ.TC.TD.TF.TG.TH.TJ.TK.TL.TM.TN.TO.TR.TT.TV.TW.TZ.UA.UG.UM.US.UY.UZ.VA.VC.VE.VG.VI.VN.VU.WF.WS.YE.YT.ZA.ZM.ZW`.split(`.`),K=/* @__PURE__ */ `en.cn.zh.zh-Hans.zh-Hant.zh-CN.zh-TW.es.fr.fr-CA.fr-ca.ja.jp.ja-jp.ja-JP.pt.pt-BR.de.ko.it.ru.ro.cs.id.ar.tr.hi.sv.no.nb.da.lv.nl.uk.vi.pl.uz.he.ca.fi.hu.am.bho.bn.fil.gu.ha.kn.ml.mr.sw.ta.te.th`.split(`.`),q={en:`English`,cn:`Chinese`,zh:`Chinese`,"zh-Hans":`Simplified Chinese`,"zh-Hant":`Traditional Chinese`,"zh-CN":`Simplified Chinese`,"zh-TW":`Traditional Chinese`,es:`Spanish`,fr:`French`,"fr-CA":`Canadian French`,"fr-ca":`Canadian French`,ja:`Japanese`,jp:`Japanese`,"ja-jp":`Japanese`,"ja-JP":`Japanese`,pt:`Portuguese`,"pt-BR":`Brazilian Portuguese`,de:`German`,ko:`Korean`,it:`Italian`,ru:`Russian`,ro:`Romanian`,cs:`Czech`,id:`Indonesian`,ar:`Arabic`,tr:`Turkish`,hi:`Hindi`,sv:`Swedish`,no:`Norwegian`,nb:`Norwegian Bokmål`,da:`Danish`,lv:`Latvian`,nl:`Dutch`,uk:`Ukrainian`,vi:`Vietnamese`,pl:`Polish`,uz:`Uzbek`,he:`Hebrew`,ca:`Catalan`,fi:`Finnish`,hu:`Hungarian`,am:`Amharic`,bho:`Bhojpuri`,bn:`Bengali`,fil:`Filipino`,gu:`Gujarati`,ha:`Hausa`,kn:`Kannada`,ml:`Malayalam`,mr:`Marathi`,sw:`Swahili`,ta:`Tamil`,te:`Telugu`,th:`Thai`},ne={en:`🇺🇸`,cn:`🇨🇳`,zh:`🇨🇳`,"zh-Hans":`🇨🇳`,"zh-Hant":`🇹🇼`,"zh-CN":`🇨🇳`,"zh-TW":`🇹🇼`,es:`🇪🇸`,fr:`🇫🇷`,"fr-CA":`🇨🇦`,"fr-ca":`🇨🇦`,ja:`🇯🇵`,jp:`🇯🇵`,"ja-jp":`🇯🇵`,"ja-JP":`🇯🇵`,pt:`🇧🇷`,"pt-BR":`🇧🇷`,de:`🇩🇪`,ko:`🇰🇷`,it:`🇮🇹`,ru:`🇷🇺`,ro:`🇷🇴`,cs:`🇨🇿`,id:`🇮🇩`,ar:`🇸🇦`,tr:`🇹🇷`,hi:`🇮🇳`,sv:`🇸🇪`,no:`🇳🇴`,nb:`🇳🇴`,da:`🇩🇰`,lv:`🇱🇻`,nl:`🇳🇱`,uk:`🇺🇦`,vi:`🇻🇳`,pl:`🇵🇱`,uz:`🇺🇿`,he:`🇮🇱`,ca:`🇪🇸`,fi:`🇫🇮`,hu:`🇭🇺`,am:`🇪🇹`,bho:`🇮🇳`,bn:`🇧🇩`,fil:`🇵🇭`,gu:`🇮🇳`,ha:`🇳🇬`,kn:`🇮🇳`,ml:`🇮🇳`,mr:`🇮🇳`,sw:`🇹🇿`,ta:`🇮🇳`,te:`🇮🇳`,th:`🇹🇭`},re=/* @__PURE__ */ `en.zh.es.fr.ja.pt.de.ko.it.ru.ro.cs.id.ar.tr.hi.sv.no.nb.da.lv.nl.uk.vi.pl.uz.he.ca.fi.hu.am.bho.bn.fil.gu.ha.kn.ml.mr.sw.ta.te.th`.split(`.`),ie=new Set(K),J=new Set(re),ae=new Set(G),oe=e=>ie.has(e),se=e=>J.has(e),ce=e=>{let[t,n,...r]=e.split(`-`),i=n?.toUpperCase();return t&&se(t)&&i&&ae.has(i)&&!r.length?`${t}-${i}`:oe(e)?e:void 0};[...K],Object.values(q),Object.values(ne);const le=[`venus`,`quill`,`prism`],ue=[`typedoc`,`docfx`,`javadoc`,`sphinx`,`phpdoc`,`go`],de=[`package`,`class`,`interface`,`enum`,`function`,`type`,`variable`,`method`,`property`],fe=[`topnav`,`sidenav`,`solidSidenav`],pe=[`default`,`sharp`],me=x({launchUrl:S().url(`Must be a valid URL`)}),he=x({apiKey:S()}),ge=x({publicApiKey:S()}),_e=x({siteId:S()}),ve=x({measurementId:S().startsWith(`G`,`Must start with G`)}),ye=x({tagId:S().startsWith(`G`,`Must start with G`)}),be=x({hjid:S(),hjsv:S()}),xe=x({publicApiKey:S().min(2)}),Se=x({appId:S()}),Ce=x({projectToken:S(),region:_([`us`,`eu`,`in`]).optional()}),we=x({id:S()}),Te=x({apiKey:S().startsWith(`phc_`,`Must start with phc_`),apiHost:S().url(`Must be a valid URL`).optional(),sessionRecording:l().optional()}),Ee=x({domain:S().refine(e=>!e.startsWith(`https://`),`Must not start with https://`),server:S().refine(e=>!e.startsWith(`https://`),`Must not start with https://`).optional()}),De=x({appId:S()}),Oe=x({writeKey:S(),apiHost:S().optional()}),ke=x({projectId:S()}),Ae=x({key:S(),cdnUrl:S().url().refine(e=>e.startsWith(`https://`),`Must be an HTTPS URL`).refine(e=>{let t=new URL(e);return!t.search&&!t.hash},`Must not contain query parameters or fragments`).optional()}),je=x({adobe:me.optional(),amplitude:he.optional(),clarity:ke.optional(),clearbit:ge.optional(),fathom:_e.optional(),ga4:ve.optional(),gtm:ye.optional(),heap:De.optional(),hightouch:Oe.optional(),hotjar:be.optional(),koala:xe.optional(),logrocket:Se.optional(),mixpanel:Ce.optional(),pirsch:we.optional(),posthog:Te.optional(),plausible:Ee.optional(),segment:Ae.optional()}).strict(`Mintlify only supports analytics integrations from: adobe, amplitude, clarity, clearbit, fathom, ga4, gtm, heap, hotjar, koala, logrocket, mixpanel, pirsch, posthog, plausible, and segment.`),Me=S().regex(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,`Must be a hex color string, with a leading #`),Ne=x({from:Me,via:Me.optional(),to:Me}),Pe=T([Me,Ne.strict()]),Fe=S().trim().nonempty().refine(e=>e.startsWith(`/`)||e.startsWith(`https:`)||e.startsWith(`http:`),`File path must start with '/' or 'https://'. Urls with 'http://' are only supported with cli option --local-schema`).optional(),Ie=x({name:S().trim().nonempty(),url:S().trim().nonempty(),icon:S({invalid_type_error:`Anchor icon must be the name of a Font Awesome, Lucide, or Tabler icon. Browse their libraries to see all the available icons: https://fontawesome.com/icons, https://lucide.dev/icons, https://tabler.io/icons`}).refine(e=>!e.startsWith(`fa-`),`Icon does not need to start with 'fa-'. Please delete 'fa-' and keep the rest of the icon name`).optional(),iconType:_(m).optional(),color:Pe.optional(),isDefaultHidden:l().optional(),version:S({invalid_type_error:`Version must be a string in the #.versions array`}).optional(),openapi:Fe}),Le=x({name:S(),icon:S().optional(),iconType:_(m).optional()}).strict(),Re=e=>{if(!e||typeof e!=`string`)return!1;try{return URL.canParse(e)}catch{return!1}},ze=S().trim().nonempty().transform((e,t)=>{if(Re(e)){try{let n=new URL(e);if(n.protocol!==`https:`&&n.protocol!==`http:`)return t.addIssue({code:b.custom,message:`Must use protocol https or http. Urls with 'http://' are only supported with cli option --local-schema`}),p}catch{return t.addIssue({code:b.custom,message:`Invalid URL`}),p}return e}return i(e)}),Be=T([ze,a(ze)]).describe(`A string or an array of strings of absolute or relative urls pointing to your OpenAPI files`),Ve=x({baseUrl:T([S().url(),a(S().url())]).optional(),auth:x({method:_([`bearer`,`basic`,`key`,`cobo`]).optional(),name:S().optional(),inputPrefix:S().optional()}).strict().optional(),playground:x({mode:_([`show`,`simple`,`hide`]).optional().default(`show`),disableProxy:l().optional()}).optional(),request:x({example:x({showOptionalParams:l().optional(),languages:a(T([_(H),S()])).optional()}).optional()}).optional(),maintainOrder:l().optional(),paramFields:x({expanded:_(V).optional(),post:a(S()).optional()}).optional()}).strict(),He=x({style:_([`gradient`,`grid`,`windows`]).optional()}),Ue=S().trim().nonempty(),We=T([S().min(3,`Must be a path to your logo file including the file extension`),x({light:S(),dark:S(),href:S().optional()})]),Ge=x({default:_([`light`,`dark`]).optional(),isHidden:l().optional()}),Ke=x({display:_([`section`,`breadcrumbs`]).optional()}),qe=l(),Je=D(S(),S().nonempty()),Ye=x({mode:_(te).optional()}),Xe=x({thumbsRating:l().optional(),suggestEdit:l().optional(),raiseIssue:l().optional()}),Ze=x({prompt:S().optional(),location:_([`side`,`top`]).optional()}),Qe=x({source:S(),destination:S(),permanent:l().optional()}),$e=a(Qe).refine(e=>{let t=e.map(e=>e.source);return new Set(t).size===t.length},`Each source path can only be used once`),et=T([x({type:v(`link`).optional(),name:S(),url:S().nonempty(),style:_([`pill`,`roundedRectangle`]).optional(),arrow:l().optional()}).strict(),x({type:v(`github`),url:S().url(`Must be a valid URL`).describe(`A link to your GitHub repository`)}).strict()]).describe(`An object containing the configuration for a Call-to-Action button. The object can have { "type": "link" } (the default) if you define a url and a name. For links to your GitHub repo, use { "type": "github" }`),tt=x({primary:Me,light:Me.optional(),dark:Me.optional(),background:x({light:Me.optional(),dark:Me.optional()}).optional(),anchors:Pe.optional(),ultraLight:h().optional(),ultraDark:h().optional()}).strict().describe(`The colors to use in your documentation. At the very least, you must define the primary color. For example: { "colors": { "primary": "#ff0000" } }`),nt=S().describe(`A path pointing to the favicon file in your docs folder, including the file extension. We recommend using an .svg or .png file. The favicon will automatically be resized to the appropriate sizes. You can also include a URL, but browser support may be limited for file extensions other than PNG`),rt=x({family:S().describe(`The font family, such as "Open Sans", "Playfair Display"`),weight:r().optional().describe(`The font weight, such as 400, 700. Precise font weights such as 550 are supported for variable fonts.`),url:S().url().optional().describe(`The font url, such as https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2`),format:_(U).optional().describe(`The font format, can be one of woff, woff2`)}).refine(e=>!e.url||!!e.format),it=T([rt,x({headings:rt.optional(),body:rt.optional()}).strict()]),at=x({label:S().nonempty(`Link must have a non-empty label`),url:T([S().url(`Must be a valid URL`),S().startsWith(`/`,`Must be a valid relative url starting with /`)])}),ot=x({title:S().nonempty(`Column must have a non-empty title`).optional(),links:a(at).min(1,`Column must have at least 1 link`)}),st=T([D(_(W),S().url(`Must be a valid URL`)),a(x({type:_(W),url:S().url(`Must be a valid URL`)}))]).describe(`An object in which each key is the name of a social media platform, and each value is the url to your profile. For example: { "x": "https://x.com/mintlify" }`),ct=x({socials:st.optional(),links:a(ot).min(1,`A footer must have at least 1 links column`).max(4,`A footer can have a maximum of 4 links columns`).optional()}),lt=S().min(6,`Must be a valid Intercom app ID`),ut=S().min(6,`Must be a valid Front chat snippet id`),dt=x({intercom:lt.optional(),frontchat:ut.optional()}),ft=x({group:S().describe(`The label for this group in the navigation sidebar`),public:l().optional().describe(`Whether this group is public or not`),icon:S().optional(),iconType:_(m).optional(),version:S().optional()}).strict().extend({pages:g(()=>a(T([ft,S().nonempty().transform(i)])).nonempty())}),pt=a(ft).min(1),mt=x({indexHiddenPages:l().optional()}),ht=x({items:_([`container`,`card`,`border`,`undecorated`]).optional()}),gt=x({name:S().trim().nonempty(),url:S().trim().nonempty(),version:S().optional(),isDefaultHidden:l().optional(),openapi:Fe}).array(),_t=x({name:S(),isDefaultHidden:l().optional()}).strict(),vt=x({style:_([`gradient`,`default`]).optional()}),yt=T([S(),x({name:S().nonempty(),url:S().url().nonempty().optional(),default:v(!0).optional(),locale:_(K).optional()}).strict()]),bt=a(yt).min(1).refine(e=>e.filter(e=>typeof e==`object`&&e.default).length<=1,`Only one version can be set as default`),xt=x({$schema:S().url().optional().default(`https://mintlify.com/schema.json`),mintlify:S().optional(),name:Ue,logo:We.optional(),theme:_(le).optional(),layout:_(fe).optional(),favicon:nt,openapi:Be.optional(),topbar:vt.optional(),sidebar:ht.optional(),rounded:_(pe).optional(),api:Ve.optional(),modeToggle:Ge.optional(),versions:bt.optional(),metadata:Je.optional(),codeBlock:Ye.optional(),colors:tt,eyebrow:Ke.optional(),topbarCtaButton:et.optional(),topbarLinks:et.array().optional(),navigation:pt,primaryTab:_t.optional(),topAnchor:Le.optional(),anchors:Ie.array().optional(),tabs:gt.optional(),footer:ct.optional(),background:He.optional(),backgroundImage:S().optional(),font:it.optional(),feedback:Xe.optional(),analytics:je.optional(),integrations:dt.optional(),isWhiteLabeled:qe.optional(),search:Ze.optional(),redirects:$e.optional(),seo:mt.optional(),footerSocials:st.optional()}),St={mint:2},Ct=e=>r().int().min(1).max(e).describe(`The version of the theme to use, from 1 to ${e}. Defaults to 1, the original version.`),wt=S().url().optional().default(`https://mintlify.com/docs.json`).describe(`The URL of the schema file`),Tt=S().trim().nonempty().transform((e,t)=>{if(Re(e)){try{let n=new URL(e);if(n.protocol!==`https:`&&n.protocol!==`http:`)return t.addIssue({code:b.custom,message:`Must use protocol https or http. Urls with 'http://' are only supported with cli option --local-schema`}),p}catch{return t.addIssue({code:b.custom,message:`Invalid URL`}),p}return e}return i(e)}),Et=x({source:Tt,directory:S().trim().optional()}).strict(),Y=T([Tt,a(Tt),Et]).describe(`A string or an array of strings of absolute or relative urls pointing to the AsyncAPI file(s)`),Dt=S().trim().nonempty().transform((e,t)=>{if(Re(e)){try{let n=new URL(e);if(n.protocol!==`https:`&&n.protocol!==`http:`)return t.addIssue({code:b.custom,message:`Must use protocol https or http. Urls with 'http://' are only supported with cli option --local-schema`}),p}catch{return t.addIssue({code:b.custom,message:`Invalid URL`}),p}return e}return i(e)}),Ot=_([`summary`,`operationId`]).describe(`What the last segment of each generated endpoint slug is derived from. "summary" (default) kebab-cases the operation summary. "operationId" kebab-cases the operationId and falls back to the summary when an operation has none. The directory and tag folders are unaffected.`),kt=x({source:Dt,directory:S().trim().optional(),slug:Ot.optional(),overlays:a(Dt).optional().describe(`OpenAPI Overlay documents to apply to the source specification, in order. An empty array disables all overlays for this specification, including auto-discovered ones.`)}).strict(),X=T([Dt,a(T([Dt,kt])),kt]).describe(`A string, an array of strings or objects, or an object of absolute or relative urls pointing to the OpenAPI file(s), optionally with OpenAPI Overlay documents to apply`),At=e=>e==null?[]:typeof e==`string`?[{source:e}]:Array.isArray(e)?e.map(e=>typeof e==`string`?{source:e}:{source:e.source,directory:e.directory,slug:e.slug,overlays:e.overlays}):[{source:e.source,directory:e.directory,slug:e.slug,overlays:e.overlays}],jt=x({openapi:X.optional(),asyncapi:Y.optional(),params:x({expanded:_([`all`,`closed`]).optional().describe("The view mode of the API parameters. Defaults to `closed`."),post:a(S()).optional().describe(`OpenAPI spec field keys to render as post pills on every ParamField. For each key, the field value on the schema is surfaced as a pill (string → verbatim, boolean true → key name, array → one pill per element, object → skipped).`)}).optional().describe(`Configurations for the API parameters`),optional:_([`static`,`expanded`,`collapsed`]).optional().describe("How optional request fields display in the API playground. `collapsed` hides them behind an expand control, `expanded` shows them with the control available, and `static` always shows them after required fields with no control. Defaults to `collapsed`."),playground:x({display:_([`interactive`,`simple`,`none`,`auth`]).optional().describe("The display mode of the API playground. Defaults to `interactive`. Use `auth` to show the playground only to authenticated users."),proxy:l().optional().describe("Whether to pass API requests through a proxy server. Defaults to `true`."),credentials:l().optional().describe("Whether to include cookies/auth for cross-origin requests when proxy is disabled. Defaults to `false`.")}).optional().describe(`Configurations for the API playground`),examples:x({defaults:_([`required`,`all`]).optional().describe("Whether to show only required parameters in the examples, defaults to `all`."),languages:a(S()).optional().describe(`Example languages for the autogenerated API snippets`),prefill:l().optional().describe(`Whether to prefill the API playground with the examples`),autogenerate:l().optional().describe("Whether to generate code samples for API endpoints. Defaults to `true`. If `false`, only manually-written code samples (from either `x-codeSamples` property in the OpenAPI spec or `<RequestExample>` components in the MDX files) will be shown.")}).optional().describe(`Configurations for the autogenerated API examples`),url:_([`full`]).optional().describe("The display mode of the base URL in the endpoint header. Set to `full` to always show the full base URL on every endpoint page."),mdx:x({auth:x({method:_([`bearer`,`basic`,`key`,`cobo`]).optional().describe(`Authentication method for the API`),name:S().optional().describe(`Authentication name for the API`)}).optional().describe(`Authentication configuration for the API`),server:T([S().url(),a(S().url())]).optional().describe(`Base URL(s) for the API`)}).optional().describe(`Configurations for API pages generated from MDX files`)}).describe(`API reference configuration and playground settings`),Mt=x({default:_([`system`,`light`,`dark`]).optional().describe("The default light/dark mode. Defaults to `system`."),strict:l().optional().describe("Whether to hide the light / dark mode toggle. Defaults to `false`.")}).describe(`Light / dark mode toggle settings`),Nt=S().regex(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,`Must be a hex color string, with a leading #`),Pt=x({light:Nt.describe(`The color in hex format to use in light mode`).optional(),dark:Nt.describe(`The color in hex format to use in dark mode`).optional()}).strict(),Ft=x({image:T([S().describe(`Path or URL pointing to the background image file, including the file extension. Used for both light and dark mode.`),x({light:S().describe(`The file for the light version of the background image used in dark mode, including the file extension.`),dark:S().describe(`The file for the dark version of the background image used in light mode, including the file extension.`)}).describe(`The path to the background image. Can be a single file or a pair for light and dark mode.`)]).optional().describe(`The background image configuration. Can be a single image for both light and dark mode, or separate images for each mode.`),decoration:_([`gradient`,`grid`,`windows`]).optional().describe(`The background decoration of the theme`),color:x({light:Nt.describe(`The background color in light mode`).optional(),dark:Nt.describe(`The background color in dark mode`).optional()}).strict().optional().describe(`The colors of the background`)}).describe(`Background color and decoration settings`),It=x({content:S().nonempty().describe(`The text content displayed in the banner. Supports basic MDX formatting including links, bold, and italic text. Custom components are not supported.`),dismissible:l().optional().describe(`Whether to show the dismiss button on the right side of the banner`),type:_([`info`,`warning`,`critical`]).optional().describe("The visual style of the banner. `info` uses the primary brand color for general announcements. `warning` uses an amber background for cautionary notices (maintenance, deprecations). `critical` uses a red background for urgent notices. Defaults to `info`."),color:Pt.optional().describe("Override the banner background color with a custom hex color. Accepts `{ light, dark }` for theme-aware colors. When set, takes precedence over the color implied by `type`. Banner text is white, so choose a dark enough background for legibility.")}).describe(`Display an announcement bar across the top of every page. When enabled, the banner is shown with the content you provide.`),Lt=x({primary:Nt.describe(`The primary color`),light:Nt.optional().describe(`The light color. Used primary in dark mode.`),dark:Nt.optional().describe(`The dark color. Used primary in light mode.`)}).strict().describe(`The colors to use in your documentation. At the very least, you must define the primary color. For example: { "colors": { "primary": "#ff0000" } }.`),Rt=S().trim().describe(`Overview of the project. Used for SEO and AEO.`),zt=x({404:x({redirect:l().optional().default(!0).describe(`Whether to redirect to the home page, if the page is not found. When false, displays a 404 page.`),title:S().optional().describe(`The title of the error page`),description:S().optional().describe(`The description of the error page. Supports MDX formatting including links, bold, italic text, and custom components.`)})}).describe(`Error pages configuration`),Bt=T([S().describe(`Path pointing to the favicon file in your docs folder, including the file extension. The favicon will automatically be resized to the appropriate sizes.`),x({light:S().describe(`The file for the light version of the favicon used in dark mode, including the file extension.`),dark:S().describe(`The file for the dark version of the favicon used in light mode, including the file extension.`)}).describe(`The path to the favicon. Can be a single file or a pair for light and dark mode.`)]).describe(`The favicon configuration. Can be a single image path for both light and dark mode, or separate paths for each mode.`),Vt=S().trim().nonempty().transform((e,t)=>{if(Re(e)){try{let n=new URL(e);if(n.protocol!==`https:`&&n.protocol!==`http:`)return t.addIssue({code:b.custom,message:`Must use protocol https or http. Urls with 'http://' are only supported with cli option --local-schema`}),p}catch{return t.addIssue({code:b.custom,message:`Invalid URL`}),p}return e}return i(e)}),Ht=x({family:S().describe("The font family name. Any [Google Fonts](https://fonts.google.com/) family works out of the box (e.g. `Inter`, `Open Sans`, `Playfair Display`). For a self-hosted font, set `source` and `format` as well."),weight:r().optional().describe("The font weight. Typically `400` for regular and `700` for bold. Variable fonts support precise weights like `550`."),source:Vt.optional().describe("URL or path to a self-hosted font file. Use this when the font is not on Google Fonts. Example: `/fonts/custom.woff2` or `https://cdn.example.com/font.woff2`."),format:_(U).optional().describe("File format of the self-hosted font. Required when `source` is set.")}),Ut=e=>!e.source||!!e.format,Wt={message:"`format` is required when `source` is set",path:[`format`]},Gt=Ht.refine(Ut,Wt),Kt=T([Gt,x({heading:Gt.optional().describe("Font settings applied to all headings (`h1`–`h6`)."),body:Gt.optional().describe(`Font settings applied to body text and the rest of the page.`)}).strict()]).describe("Typography configuration. Use a single set of font settings for the whole site, or split into separate `heading` and `body` fonts."),qt=[`https:`],Jt=[`.svg`,`.exe`,`.zip`];function Yt(e){let t=e,n=t.indexOf(`#`);n!==-1&&n!==0&&(t=t.substring(0,n));try{let e=new URL(t);e.pathname!==`/`&&e.pathname.endsWith(`/`)&&(e.pathname=e.pathname.replace(/\/+$/,``),t=e.toString())}catch{if(!t.startsWith(`mailto:`)){let e=t.indexOf(`?`);if(e!==-1){let n=t.substring(0,e),r=t.substring(e);t=(n.length>1&&n.endsWith(`/`)?n.replace(/\/+$/,``):n)+r}else t.length>1&&t.endsWith(`/`)&&(t=t.replace(/\/+$/,``))}}return t}const Z=S().refine(e=>{if(e.startsWith(`/`)||e.startsWith(`#`)||e.startsWith(`mailto:`))return!0;try{return new URL(e),!0}catch{return!1}},{message:`Must be a valid URL or relative path`}).describe(`A valid path or external link`),Xt=S().transform(Yt).refine(e=>{if(e.startsWith(`//`))return!1;if(e.startsWith(`/`)||e.startsWith(`mailto:`)||e.startsWith(`#`))return!0;try{let t=new URL(e),n=qt.includes(t.protocol),r=decodeURIComponent(t.pathname).toLowerCase(),i=!Jt.some(e=>r.endsWith(e));return n&&i}catch{return!1}},{message:`Must be a valid url or relative path.`}),Zt=[`https:`],Qt=[`.svg`,`.exe`,`.zip`],$t=S().url().transform(Yt).refine(e=>{try{let t=new URL(e),n=Zt.includes(t.protocol),r=decodeURIComponent(t.pathname).toLowerCase(),i=!Qt.some(e=>r.endsWith(e));return n&&i}catch{return!1}},{message:`Must be a valid HTTPS URL.`}),en=x({label:S().nonempty(`Link must have a non-empty label`).describe(`The label of the link`),href:Xt.describe(`The url of the link`)}),tn=x({header:S().nonempty(`Column must have a non-empty header`).optional().describe(`The header title of the column`),items:a(en).min(1,`Column must have at least 1 link`).describe(`The links to be displayed in the column`)}),nn=D(_(W),$t.describe(`Must be a valid URL`)).describe(`An object in which each key is the name of a social media platform, and each value is the url to your profile.`),rn=x({socials:nn.optional(),links:a(tn).min(1,`A footer must have at least 1 links column`).max(4,`A footer can have a maximum of 4 links columns`).optional().describe(`Enable columns with links to be displayed in the footer`)}).describe(`Footer configurations`),an=x({library:_(o).describe("The icon library used for all icon properties. Defaults to `fontawesome`.")}).describe(`Icon library settings`),on=x({launchUrl:S().url(`Must be a valid URL`)}),sn=x({apiKey:S()}),cn=x({publicApiKey:S()}),ln=x({siteId:S()}),un=x({measurementId:S().startsWith(`G`,`Must start with G`)}),dn=x({tagId:S().startsWith(`G`,`Must start with G`)}),fn=x({hjid:S(),hjsv:S()}),pn=x({publicApiKey:S().min(2)}),mn=x({appId:S()}),hn=x({projectToken:S(),region:_([`us`,`eu`,`in`]).optional()}),gn=x({id:S()}),_n=x({apiKey:S().startsWith(`phc_`,`Must start with phc_`),apiHost:S().url(`Must be a valid URL`).optional(),sessionRecording:l().optional()}),vn=x({domain:S().refine(e=>!e.startsWith(`https://`),`Must not start with https://`),server:S().refine(e=>!e.startsWith(`https://`),`Must not start with https://`).optional()}),yn=x({appId:S()}),bn=x({writeKey:S(),apiHost:S().optional()}),xn=x({projectId:S()}),Sn=x({key:S(),cdnUrl:S().url().refine(e=>e.startsWith(`https://`),`Must be an HTTPS URL`).refine(e=>{try{let t=new URL(e);return!t.search&&!t.hash}catch{return!0}},`Must not contain query parameters or fragments`).optional()}),Cn=x({domainScript:S().min(1,`Domain script is required`),categoryId:S().min(1,`Category ID is required`).optional(),scriptSource:S().url(`Must be a valid URL`).refine(e=>e.startsWith(`https://`),`Must be an HTTPS URL`).optional()}),wn=x({bundleId:S().trim().regex(/^[a-zA-Z0-9_-]+$/,`Bundle ID must contain only letters, numbers, hyphens, or underscores`),analyticsPurpose:S().trim().min(1).max(100).optional()}),Tn=x({appId:S().min(6,`Must be a valid Intercom app ID`)}),En=x({snippetId:S().min(6,`Must be a valid Front chat snippet id`)}),Dn=x({enabled:l().optional()}),On=x({key:S().optional(),value:S().optional()}),kn=[`.svg`,`.exe`,`.zip`];x({src:S().url(`Must be a valid URL`).refine(e=>e.startsWith(`https://`),`Must be an HTTPS URL`).refine(e=>{try{let{pathname:t}=new URL(e),n=decodeURIComponent(t).toLowerCase();return!kn.some(e=>n.endsWith(e))}catch{return!1}},`URL must not point to a disallowed file type (e.g. .svg, .exe, .zip)`),strategy:_([`beforeInteractive`,`afterInteractive`,`lazyOnload`]).optional()});const An=x({adobe:on.optional(),amplitude:sn.optional(),clarity:xn.optional(),clearbit:cn.optional(),fathom:ln.optional(),frontchat:En.optional(),ga4:un.optional(),gtm:dn.optional(),heap:yn.optional(),hightouch:bn.optional(),hotjar:fn.optional(),intercom:Tn.optional(),koala:pn.optional(),logrocket:mn.optional(),mixpanel:hn.optional(),onetrust:Cn.optional(),pirsch:gn.optional(),posthog:_n.optional(),plausible:vn.optional(),segment:Sn.optional(),telemetry:Dn.optional(),cookies:On.optional(),transcend:wn.optional()}).strict().describe(`Configurations for official integrations`),jn=x({drilldown:l().optional().describe(`Whether to automatically navigate to the first page when navigation groups are expanded`)}).describe(`Options for how users interact with links in the documentation`),Mn=T([S().min(3,`Must be a path to your logo file including the file extension`).describe(`The logo (for both light and dark mode)`),x({light:S().describe(`The file for the light version of the logo used in dark mode, including the file extension.`),dark:S().describe(`The file for the dark version of the logo used in light mode, including the file extension.`),href:Z.optional().describe(`The URL to redirect to when clicking the logo. If not provided, the logo will link to the homepage.`)})]).describe(`The logo configuration. Can be a single image path for both light and dark mode, or separate paths for each mode with an optional click target URL.`),Nn=x({schema:l().optional().describe(`Whether to include the full OpenAPI/AsyncAPI specification in API reference pages served as markdown to AI agents. Defaults to true.`),instructions:T([S(),a(S())]).optional().describe(`Custom instructions appended to every page served as markdown to AI agents, in addition to Mintlify's default guidance. Use this to provide product-specific directions such as preferred CLIs, workflows, or interaction patterns. Provide a single string or an array of strings (rendered as separate lines).`)}).optional().describe(`Configuration for markdown pages served to AI agents`),Pn=x({timestamp:l().optional().default(!1).describe("When enabled, all pages will display the date the content was last modified. Default is `false`.")}).optional().describe(`Metadata configuration for documentation pages`),Fn=S().trim().nonempty().describe(`The name of the project`),In=x({icon:O.optional(),href:Z}),Ln=In.extend({label:S(),type:S().optional()}),Rn=In.extend({label:S().optional(),type:v(`github`)}),zn=In.extend({label:S().optional(),type:v(`discord`)}),Bn=T([Rn,zn,Ln]),Vn=x({type:v(`button`),label:S(),href:Z}),Hn=x({type:v(`github`),label:S().optional(),href:Z}),Un=x({type:v(`discord`),label:S().optional(),href:Z}),Wn=c(`type`,[Vn,Hn,Un]),Gn=x({links:a(Bn).optional().describe(`The links in the navbar`),primary:Wn.optional().describe(`The primary CTA in the navbar`)}).describe(`Navbar content and settings`),Kn=S().trim().nonempty().transform((e,t)=>{if(!Re(e))return i(e);try{if(new URL(e).protocol!==`https:`)return t.addIssue({code:b.custom,message:`Must be a local path or a valid HTTPS URL.`}),p}catch{return t.addIssue({code:b.custom,message:`Invalid URL`}),p}return e}),qn=x({source:Kn,directory:S().trim().nonempty().transform(i).optional()}).strict(),Jn=T([Kn,qn]).describe(`A local path or HTTPS URL pointing to a GraphQL SDL schema`),Yn=d().optional(),Xn=S().trim().nonempty().refine(e=>!Re(e),{message:`Must be a local path to an MCP definition JSON file.`}).transform(i),Zn=x({source:Xn,directory:S().trim().nonempty().transform(i).optional()}).strict(),Qn=T([Xn,Zn]).describe(`A local path to an MCP definition JSON file with tools and resources`),Q=d().optional(),$n=_(ue).describe(`The documentation generator that produced the artifact`),er=S().trim().nonempty().transform((e,t)=>{if(!Re(e))return i(e);try{if(new URL(e).protocol!==`https:`)return t.addIssue({code:b.custom,message:`Must be a local path or a valid HTTPS URL.`}),p}catch{return t.addIssue({code:b.custom,message:`Invalid URL`}),p}return e}).describe(`Relative path or HTTPS URL of the generator artifact; directory-shaped formats accept a zip (or javadoc jar) when remote`),tr=x({format:$n,source:er,directory:S().trim().nonempty().transform(i).optional()}).strict().describe(`Generate SDK reference pages from a documentation generator artifact`),nr=d().optional(),rr=l().describe(`Whether the current option is default hidden`),ir=[`anchors`,`dropdowns`,`languages`,`tabs`,`versions`,`menu`,`products`],ar=[`tab`,`dropdown`,`anchor`,`language`,`product`,`version`,`item`],or={anchors:`anchor`,dropdowns:`dropdown`,languages:`language`,tabs:`tab`,versions:`version`,menu:`item`,products:`product`};var sr;(function(e){e.Light=`light`,e.Dark=`dark`})(sr||={});const cr=Ht.pick({family:!0}).extend({source:Ht.shape.source.describe("URL or path to a self-hosted font file. Example: `/fonts/custom.woff` or `https://cdn.example.com/font.woff`."),format:_([`woff`,`ttf`,`otf`]).optional().describe("File format of the self-hosted font. Required when `source` is set. Thumbnails support `woff`, `ttf` and `otf`, but not `woff2`.")}).refine(Ut,Wt).describe("The font for thumbnail titles and descriptions. With a `preset`, the eyebrow stays in a monospace font."),lr=x({source:_([`group`,...ar,`none`]).optional().describe("The navigation level whose name is shown above the title. `none` hides it. Defaults to `group`."),style:_([`plain`,`bar`,`pill`]).optional().describe(`How the eyebrow is drawn. Defaults to the style of the preset.`),color:Nt.optional().describe(`The eyebrow color. Defaults to the primary color.`)}).describe(`The label shown above the page title.`),ur=x({preset:_([`classic`,`headline`,`minimal`]).optional().describe(`The thumbnail layout. When unset, thumbnails use the current layout.`),appearance:_([sr.Light,sr.Dark]).optional().describe(`Whether to render page thumbnails in light or dark mode. When unset, thumbnails are auto-generated from your theme colors.`),surface:_([`neutral`,`brand`]).optional().describe("Whether the thumbnail uses a neutral background or fills it with your brand color. Defaults to `brand`."),background:S().optional().describe(`Background image for the thumbnail. Can be an absolute URL or relative path.`),fonts:cr.optional(),eyebrow:lr.optional()}),dr=ur.pick({preset:!0,appearance:!0,surface:!0,background:!0}).extend({eyebrow:S().optional().describe(`Text shown above the title on this thumbnail. An empty string hides it.`)}).describe("Thumbnail settings for pages in this group or division, or for this page in frontmatter. Each key overrides the nearest parent and `thumbnails` in docs.json."),fr={thumbnail:dr.optional()},pr=e=>{let t=e.toLowerCase();return ce(t)??K.find(e=>e.toLowerCase()===t)},mr=e=>{let t=JSON.stringify(e),n=typeof e==`string`?pr(e):void 0;return n?`Invalid language code ${t}. Did you mean "${n}"?`:`Invalid language code ${t}. Use a supported language code such as "en" or "es", optionally followed by a two-letter region such as "en-GB" or "es-MX"`},hr=RegExp(`^(?:${re.join(`|`)})-(?:${G.map(e=>[...e].map(e=>{let t=e.toLowerCase();return t===e?e:`[${e}${t}]`}).join(``)).join(`|`)})$`),gr=S({errorMap:(e,t)=>({message:e.code===`invalid_string`?mr(t.data):t.defaultError})}).regex(hr).and(w()),_r=T([_(K),gr]).describe(`Language code, such as "en" or "en-GB"`),vr=l().describe(`When true on a hidden tab or group, descendant pages remain indexed for search, sitemap, AI assistant, and llms.txt despite being hidden from the rendered navigation. Has no effect when hidden is false.`),yr=x({type:v(`link`),title:S().trim().min(1),href:S().url().refine(e=>/^https?:\/\//i.test(e),`Use an HTTP or HTTPS URL`)}),br=g(()=>T([u,yr,Or])),xr=g(()=>T([s,kr])),Sr=a(br).describe(`An array of page paths, groups, or external links`),Cr=a(xr).describe(`An array of page metadata or groups`);var wr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Tr={directory:_([`none`,`accordion`,`card`]).optional().describe(`Directory layout for this navigation node and its descendants. "accordion" and "card" show automatic directory UI on eligible root pages; "none" disables it. Inherits recursively; descendants can override.`)},Er=x(Object.assign(Object.assign({group:S().nonempty().describe(`The name of the group`),mcp:Qn.optional(),public:l().optional().describe(`Whether the group is public`),boost:r().optional().describe(`Search ranking multiplier for pages in this group (e.g. 3 = 3x boost)`),icon:O.optional(),hidden:rr.optional(),searchable:vr.optional(),root:u.optional(),tag:S().optional().describe(`Tag for the group`),expanded:l().optional().describe(`Whether the group is expanded by default`)},Tr),fr)),Dr=e=>e.optional().catch(void 0),Or=Er.extend({sdk:tr.optional(),graphql:Jn.optional(),openapi:Dr(X),asyncapi:Dr(Y).describe(`A string or an array of strings of absolute or relative urls pointing to the AsyncAPI file(s). Ignored when openapi is also set`),pages:g(()=>Sr).default([])}).transform(e=>{if(e.openapi===void 0||e.asyncapi===void 0)return e;let{asyncapi:t}=e;return wr(e,[`asyncapi`])}).describe(`Organizing by groups`),kr=x(Object.assign(Object.assign({group:S().nonempty().describe(`The name of the group`),public:l().optional().describe(`Whether the group is public`),boost:r().optional().describe(`Search ranking multiplier for pages in this group (e.g. 3 = 3x boost)`),icon:O.optional(),hidden:rr.optional(),searchable:vr.optional(),root:s.optional(),pages:g(()=>Cr),tag:S().optional().describe(`Tag for the group`),expanded:l().optional().describe(`Whether the group is expanded by default`)},Tr),fr)).describe(`Organizing by groups`),Ar=a(Or).min(1,`At least one group must be specified`).describe(`Organizing by groups`),jr=a(kr).min(1,`At least one group must be specified`).describe(`Organizing by groups`),Mr=x(Object.assign(Object.assign({version:S().nonempty().describe(`The name of the version`),graphql:Yn,mcp:Q,sdk:nr,default:l().optional().describe(`Whether this version is the default version`),tag:S().optional().describe(`Tag for the version`),hidden:rr.optional()},Tr),fr)),Nr=Mr.extend({href:Z}),Pr=T([Mr.extend({href:Z,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Mr.extend({languages:g(()=>oi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Mr.extend({tabs:g(()=>Ur),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Mr.extend({dropdowns:g(()=>fi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Mr.extend({anchors:g(()=>vi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Mr.extend({products:g(()=>$r),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Mr.extend({groups:g(()=>Ar),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Mr.extend({pages:g(()=>Sr),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Mr.extend({openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()})]),Fr=Mr.and(T([x({href:Z}),g(()=>x({languages:si,global:$.optional()})),g(()=>x({tabs:Wr,global:$.optional()})),g(()=>x({dropdowns:pi,global:$.optional()})),g(()=>x({anchors:yi,global:$.optional()})),g(()=>x({products:ei,global:$.optional()})),g(()=>x({groups:jr,global:$.optional()})),g(()=>x({pages:Cr,global:$.optional()}))])),Ir=a(Pr).min(1,`At least one version must be specified`).describe(`Organizing by versions`),Lr=a(Fr).min(1,`At least one version must be specified`).describe(`Organizing by versions`),Rr=_([`start`,`end`]).describe(`Tab alignment in the navigation`),zr=x(Object.assign(Object.assign({tab:S().nonempty().describe(`The name of the tab`),mcp:Qn.optional(),icon:O.optional(),hidden:rr.optional(),searchable:vr.optional(),align:Rr.optional()},Tr),fr)),Br=zr.extend({href:Z,graphql:Yn,mcp:Q,sdk:nr}),Vr=T([zr.extend({graphql:Jn,mcp:Q}).strict(),zr.extend({groups:g(()=>Ar),graphql:Jn,mcp:Q}).strict(),zr.extend({mcp:Qn}).strict(),zr.extend({groups:g(()=>Ar),mcp:Qn}).strict(),zr.extend({sdk:tr,mcp:Q}).strict(),zr.extend({groups:g(()=>Ar),sdk:tr,mcp:Q}).strict(),zr.extend({href:Z,graphql:Yn,mcp:Q,sdk:nr,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),zr.extend({languages:g(()=>oi),graphql:Yn,mcp:Q,sdk:nr,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),zr.extend({versions:g(()=>Ir),graphql:Yn,mcp:Q,sdk:nr,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),zr.extend({dropdowns:g(()=>fi),graphql:Yn,mcp:Q,sdk:nr,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),zr.extend({anchors:g(()=>vi),graphql:Yn,mcp:Q,sdk:nr,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),zr.extend({products:g(()=>$r),graphql:Yn,mcp:Q,sdk:nr,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),zr.extend({groups:g(()=>Ar),graphql:Yn,mcp:Q,sdk:nr,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),zr.extend({pages:g(()=>Sr),graphql:Yn,mcp:Q,sdk:nr,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),zr.extend({menu:g(()=>Jr),graphql:Yn,mcp:Q,sdk:nr,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),zr.extend({graphql:Yn,mcp:Q,sdk:nr,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()})]),Hr=zr.and(x({graphql:Yn,mcp:Q,sdk:nr})).and(T([x({href:Z}),g(()=>x({languages:si,global:$.optional()})),g(()=>x({versions:Lr,global:$.optional()})),g(()=>x({dropdowns:pi,global:$.optional()})),g(()=>x({anchors:yi,global:$.optional()})),g(()=>x({products:ei,global:$.optional()})),g(()=>x({groups:jr,global:$.optional()})),g(()=>x({pages:Cr,global:$.optional()})),g(()=>x({menu:Yr,global:$.optional()}))])),Ur=a(Vr).min(1,`At least one tab must be specified`).describe(`Organizing by tabs`),Wr=a(Hr).min(1,`At least one tab must be specified`).describe(`Organizing by tabs`),Gr=x(Object.assign(Object.assign({item:S().nonempty().describe(`The name of the menu item`),graphql:Yn,mcp:Q,sdk:nr,icon:O.optional(),description:S().optional().describe(`The description of the menu item`),hidden:rr.optional()},Tr),fr));Gr.extend({href:Z});const Kr=T([Gr.extend({href:Z,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Gr.extend({languages:g(()=>oi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Gr.extend({versions:g(()=>Ir),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Gr.extend({dropdowns:g(()=>fi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Gr.extend({anchors:g(()=>vi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Gr.extend({products:g(()=>$r),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Gr.extend({tabs:g(()=>Ur),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Gr.extend({groups:g(()=>Ar),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Gr.extend({pages:g(()=>Sr),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Gr.extend({openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()})]),qr=Gr.and(T([x({href:Z}),g(()=>x({languages:si,global:$.optional()})),g(()=>x({versions:Lr,global:$.optional()})),g(()=>x({dropdowns:pi,global:$.optional()})),g(()=>x({anchors:yi,global:$.optional()})),g(()=>x({products:ei,global:$.optional()})),g(()=>x({tabs:Wr,global:$.optional()})),g(()=>x({groups:jr,global:$.optional()})),g(()=>x({pages:Cr,global:$.optional()}))])),Jr=a(Kr).describe(`Organizing by menu`),Yr=a(qr).min(1,`At least one menu item must be specified`).describe(`Organizing by menu`),Xr=x(Object.assign(Object.assign({product:S().nonempty().describe(`The name of the product`),graphql:Yn,mcp:Q,sdk:nr,name:S().optional().describe(`Display name for the product`),icon:O.optional(),color:Pt.optional(),description:S().optional().describe(`The description of the product`),hidden:rr.optional()},Tr),fr)),Zr=T([Xr.extend({href:Z,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Xr.extend({languages:g(()=>oi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Xr.extend({versions:g(()=>Ir),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Xr.extend({tabs:g(()=>Ur),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Xr.extend({anchors:g(()=>vi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Xr.extend({dropdowns:g(()=>fi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Xr.extend({groups:g(()=>Ar),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Xr.extend({pages:g(()=>Sr),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Xr.extend({menu:g(()=>Jr),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),Xr.extend({openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()})]),Qr=Xr.and(T([x({href:Z}),g(()=>x({languages:si,global:$.optional()})),g(()=>x({versions:Lr,global:$.optional()})),g(()=>x({tabs:Wr,global:$.optional()})),g(()=>x({anchors:yi,global:$.optional()})),g(()=>x({dropdowns:pi,global:$.optional()})),g(()=>x({groups:jr,global:$.optional()})),g(()=>x({pages:Cr,global:$.optional()})),g(()=>x({menu:Yr,global:$.optional()}))])),$r=a(Zr).describe(`Organizing by products`),ei=a(Qr).min(1,`At least one product must be specified`).describe(`Organizing by products`),ti=Xr.extend({href:Z}),ni=x(Object.assign(Object.assign({language:_r,graphql:Yn,mcp:Q,sdk:nr,default:l().optional().describe(`Whether this language is the default language`),banner:It.optional().describe(`Banner configuration specific to this language`),footer:rn.optional().describe(`Footer configuration specific to this language`),navbar:Gn.optional().describe(`Navbar configuration specific to this language`),hidden:rr.optional()},Tr),fr)),ri=ni.extend({href:Z}),ii=T([ni.extend({href:Z,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ni.extend({versions:g(()=>Ir),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ni.extend({tabs:g(()=>Ur),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ni.extend({dropdowns:g(()=>fi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ni.extend({anchors:g(()=>vi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ni.extend({products:g(()=>$r),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ni.extend({groups:g(()=>Ar),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ni.extend({pages:g(()=>Sr),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ni.extend({openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()})]).describe(`Organizing by languages`),ai=ni.and(T([x({href:Z}),g(()=>x({versions:Lr,global:$.optional()})),g(()=>x({tabs:Wr,global:$.optional()})),g(()=>x({dropdowns:pi,global:$.optional()})),g(()=>x({anchors:yi,global:$.optional()})),g(()=>x({products:ei,global:$.optional()})),g(()=>x({groups:jr,global:$.optional()})),g(()=>x({pages:Cr,global:$.optional()}))])).describe(`Organizing by languages`),oi=a(ii).min(1,`At least one language must be specified`).describe(`Organizing by languages`),si=a(ai).min(1,`At least one language must be specified`).describe(`Organizing by languages`),$=g(()=>x({languages:a(ri).optional(),versions:a(Nr).optional(),tabs:a(Br).optional(),dropdowns:a(li).optional(),anchors:a(hi).optional(),products:a(ti).optional()}).strict()).describe(`Add external links that will appear on all sections and pages irregardless of navigation nesting`),ci=x(Object.assign(Object.assign({dropdown:S().nonempty().describe(`The name of the dropdown`),graphql:Yn,mcp:Q,sdk:nr,icon:O.optional(),color:Pt.optional(),description:S().optional().describe(`The description of the dropdown`),hidden:rr.optional()},Tr),fr)),li=ci.extend({href:Z}),ui=T([ci.extend({href:Z,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ci.extend({languages:g(()=>oi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ci.extend({versions:g(()=>Ir),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ci.extend({tabs:g(()=>Ur),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ci.extend({anchors:g(()=>vi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ci.extend({products:g(()=>$r),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ci.extend({groups:g(()=>Ar),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ci.extend({pages:g(()=>Sr),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),ci.extend({openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()})]),di=ci.and(T([x({href:Z}),g(()=>x({languages:si,global:$.optional()})),g(()=>x({versions:Lr,global:$.optional()})),g(()=>x({tabs:Wr,global:$.optional()})),g(()=>x({anchors:yi,global:$.optional()})),g(()=>x({products:ei,global:$.optional()})),g(()=>x({groups:jr,global:$.optional()})),g(()=>x({pages:Cr,global:$.optional()}))])),fi=a(ui).describe(`Organizing by dropdowns`),pi=a(di).min(1,`At least one dropdown must be specified`).describe(`Organizing by dropdowns`),mi=x(Object.assign(Object.assign({anchor:S().nonempty().describe(`The name of the anchor`),graphql:Yn,mcp:Q,sdk:nr,icon:O.optional(),color:Pt.optional(),hidden:rr.optional()},Tr),fr)),hi=mi.extend({href:Z}),gi=T([mi.extend({href:Z,openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$.optional())}),mi.extend({languages:g(()=>oi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),mi.extend({versions:g(()=>Ir),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),mi.extend({dropdowns:g(()=>fi),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),mi.extend({tabs:g(()=>Ur),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),mi.extend({products:g(()=>$r),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),mi.extend({groups:g(()=>Ar),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),mi.extend({pages:g(()=>Sr),openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()}),mi.extend({openapi:X.optional(),asyncapi:Y.optional(),global:g(()=>$).optional()})]),_i=mi.and(T([x({href:Z}),g(()=>x({languages:si,global:$.optional()})),g(()=>x({versions:Lr,global:$.optional()})),g(()=>x({dropdowns:pi,global:$.optional()})),g(()=>x({tabs:Wr,global:$.optional()})),g(()=>x({products:ei,global:$.optional()})),g(()=>x({groups:jr,global:$.optional()})),g(()=>x({pages:Cr,global:$.optional()}))])),vi=a(gi).min(1,`At least one anchor must be specified`).describe(`Organizing by anchors`),yi=a(_i).describe(`Organizing by anchors`),bi=x(Object.assign({global:$.optional(),graphql:Yn,mcp:Q,sdk:nr},Tr)),xi=T([bi.extend({products:$r}),bi.extend({languages:oi}),bi.extend({versions:Ir}),bi.extend({tabs:Ur}),bi.extend({dropdowns:fi}),bi.extend({anchors:vi}),bi.extend({groups:Ar}),bi.extend({pages:Sr})]).describe(`The navigation structure of the content`);T([x({products:ei}),x({languages:si}),x({versions:Lr}),x({tabs:Wr}),x({dropdowns:pi}),x({anchors:yi}),x({groups:jr}),x({pages:Cr})]).and(x(Object.assign({global:$.optional()},Tr))).describe(`The navigation structure of the content`);const Si=/^@[a-z0-9-~][a-z0-9-._~]*$/,Ci=[`page`,`frame`],wi=S().regex(Si,"Registry keys must be npm scopes such as `@acme` (lowercase, starting with `@`)"),Ti=/[\s\u0000-\u001f\u007f]/,Ei=e=>{if(Ti.test(e))return`Registry URLs cannot contain whitespace`;if(e.includes("${"))return"Registry URLs cannot contain `${`, which npm expands from environment variables";if(/[;#\\]/.test(e))return"Registry URLs cannot contain `;`, `#` or `\\`, which npm reads as a comment or escape in .npmrc";let t;try{t=new URL(e)}catch{return}if(t.username!==``||t.password!==``)return`Registry URLs cannot include a username, password or token`;if(e.includes(`?`)||t.hash!==``)return`Registry URLs cannot include a query string or fragment`;if(t.href.includes("${")||/[;#\\]/.test(t.href))return"Registry URLs cannot parse to a URL with `${`, `;`, `#` or `\\`, such as from full-width characters in the host, which npm rewrites in .npmrc";if(t.hostname.includes(`=`)||t.pathname.includes(`=`))return"Registry URLs cannot have `=` in the host or path, which npm reads as the end of the auth token key in .npmrc"},Di=S().max(512,`Registry URLs cannot be longer than 512 characters`).url(`Must be a valid URL`).regex(/^https:\/\/[^/]/,"Registry URLs must start with `https://` and then the host").superRefine((e,t)=>{let n=Ei(e);n&&t.addIssue({code:b.custom,message:n})}),Oi=/^[a-z][a-z\d+.-]*:/i,ki=S().min(1,`CSS entries cannot be empty`).refine(e=>!/^[./\\]/.test(e)&&!Oi.test(e)&&!e.split(/[\\/]/).includes(`..`),"CSS entries must be paths inside an installed package, such as `@acme/ui/dist/styles.css`"),Ai=e=>{if(e===``)return;let t=e.replace(/\\/g,`/`),n=t.replace(/^\/+/,``).split(`/`);if(n.includes(`..`))return"Provider path cannot contain `..` segments";if(n.includes(``))return"Provider path must name a file, such as `/snippets/provider.jsx`, with no empty segments or trailing slash";let r=t.replace(/[?#].*$/,``),i=r.replace(/^\/+|\/+$/g,``);if((i===``||i.split(`/`).includes(`..`)?t:r).split(`/`).slice(0,-1).includes(`node_modules`))return"Provider path cannot be inside a `node_modules` folder";if(!e.startsWith(`/`))return"Provider path must start with `/`, such as `/snippets/provider.jsx`";if(n.some(e=>/[:\0]/.test(e)||e!==`.`&&/[. ]$/.test(e)))return"Provider path cannot contain `:` or NUL, or a name that ends in `.` or a space"},ji=S().min(1,`Provider path cannot be empty`).superRefine((e,t)=>{let n=Ai(e);n&&t.addIssue({code:b.custom,message:n})}),Mi=x({registries:D(wi,Di).optional().describe('Registry to install each npm scope from, e.g. `{ "@acme": "https://npm.acme.com/" }`. One registry per scope. Unscoped packages always install from registry.npmjs.org.'),css:a(ki).optional().describe("Compiled CSS files shipped by your packages to load on pages that use package components, e.g. `@acme/ui/dist/styles.css`"),provider:ji.optional().describe("Path to a snippet that exports a `Provider` component, e.g. `/snippets/provider.jsx`. It wraps every package component."),ssr:l().optional().describe(`Whether to render package components to HTML at build time so they show before their JavaScript loads. Defaults to true.`),isolation:_(Ci).optional().describe("How package components run in the browser. `page` (default) renders them in the docs page. `frame`, a sandboxed iframe per component, is not implemented yet and fails the build.")}).describe("Use npm packages from package.json in MDX pages and snippets. Adding this key, even as `{}`, turns the feature on. Requires a package-lock.json or pnpm-lock.yaml next to docs.json."),Ni=l().describe(`Whether the documentation is publicly accessible by default`),Pi=x({prompt:S().optional().describe(`The prompt to be displayed in the search bar placeholder`)}).describe(`Search display settings`),Fi=D(S(),S().nonempty()).optional().describe(`Meta tags added to every page. Must be a valid key-value pair.`),Ii=/^[^\s/\\?#]+$/;function Li(e){return e.split(`/`).every(e=>Ii.test(e)&&e!==`.`&&e!==`..`)}const Ri=x({path:S().nonempty().refine(Li,"Must be a slash-delimited folder path relative to the docs root, e.g. `guides/v2`. Each segment must be non-empty and must not be `.` or `..`, and the path must not start or end with a slash or contain whitespace, backslashes, `?`, or `#`.").describe("Folder path relative to the docs root, e.g. `guides/v2`. Applies to every page under that folder."),metatags:D(S(),S().nonempty()).describe("Meta tags added to every page under `path`. Must be a valid key-value pair.")}),zi=a(Ri).refine(e=>{let t=e.map(e=>e.path);return new Set(t).size===t.length},`Each path can only be used once`).describe("Meta tags scoped to a folder. Longer paths override shorter ones, which override `metatags`. Page frontmatter overrides both."),Bi=x({id:S().url().optional().describe("Stable `@id` URL identifying your organization across pages, e.g. `https://example.com/#organization`. Defaults to `<site origin>/#organization`."),name:S().nonempty().optional().describe(`Organization name. Defaults to the site name.`),legalName:S().nonempty().optional().describe(`Registered legal name.`),url:S().url().optional().describe(`Canonical organization homepage URL.`),logo:S().url().optional().describe(`Canonical logo URL used in structured data. Defaults to the docs logo.`),sameAs:a(S().url()).optional().describe(`URLs of official profiles, e.g. X, LinkedIn, GitHub.`)}).describe(`Organization entity emitted in structured data (JSON-LD) on every page.`),Vi=x({metatags:Fi.optional(),paths:zi.optional(),organization:Bi.optional(),indexing:_([`navigable`,`all`]).optional().describe("Specify which pages to be indexed by search engines. Setting `navigable` indexes pages that are set in navigation, `all` indexes all pages. Defaults to `navigable`."),trailingSlash:l().optional().describe("Emit trailing-slash URLs consistently across canonical tags, `og:url`, the sitemap, and generated internal links. Does not change page routes. Defaults to `false`.")}).describe(`SEO indexing configurations`),Hi=/* @__PURE__ */ `andromeeda.aurora-x.ayu-dark.catppuccin-frappe.catppuccin-latte.catppuccin-macchiato.catppuccin-mocha.dark-plus.dracula.dracula-soft.everforest-dark.everforest-light.github-dark.github-dark-default.github-dark-dimmed.github-dark-high-contrast.github-light.github-light-default.github-light-high-contrast.gruvbox-dark-hard.gruvbox-dark-medium.gruvbox-dark-soft.gruvbox-light-hard.gruvbox-light-medium.gruvbox-light-soft.houston.kanagawa-dragon.kanagawa-lotus.kanagawa-wave.laserwave.light-plus.material-theme.material-theme-darker.material-theme-lighter.material-theme-ocean.material-theme-palenight.min-dark.min-light.monokai.night-owl.nord.one-dark-pro.one-light.plastic.poimandres.red.rose-pine.rose-pine-dawn.rose-pine-moon.slack-dark.slack-ochin.snazzy-light.solarized-dark.solarized-light.synthwave-84.tokyo-night.vesper.vitesse-black.vitesse-dark.vitesse-light.css-variables`.split(`.`),Ui=x({custom:a(S().refine(e=>!/^[a-zA-Z]:/.test(e)&&!e.split(/[\\/]/).includes(`..`),{message:`Custom language path must stay within the docs directory`}).describe(`Path (relative to the docs root) to a JSON file describing a custom Shiki language`)).optional()}).describe(`Custom language configuration for codeblocks`),Wi=x({eyebrows:_([`section`,`breadcrumbs`]).optional().describe("The eyebrows style of the content. Defaults to `section`."),codeblocks:T([_([`system`,`dark`]).optional().describe("Match the docs light/dark mode with `system`, or always use a dark theme with `dark`."),x({theme:T([_(Hi),x({light:_(Hi),dark:_(Hi)})]).optional(),languages:Ui.optional()}).describe(`Pick a custom Shiki theme. Use a single theme for both modes, or set separate light/dark themes.`)]).describe('The codeblock theme configuration. Defaults to `system`. To use a built-in shiki theme, add the theme name as "theme" in the object. To use different shiki themes for light and dark modes, add "themes" in the object with "dark" and "light" keys.'),latex:l().optional().describe(`Whether to load LaTeX stylesheets`)}).describe(`Styling configurations`),Gi=D(S(),S()).describe(`Set of custom variables that can be re-used throughout the content`),Ki={$schema:wt,name:Fn,public:Ni.optional(),description:Rt.optional(),colors:Lt,logo:Mn.optional(),favicon:Bt.optional(),api:jt.optional(),appearance:Mt.optional(),background:Ft.optional(),navbar:Gn.optional(),navigation:xi,footer:rn.optional(),search:Pi.optional(),seo:Vi.optional(),fonts:Kt.optional(),icons:an.optional(),styling:Wi.optional(),redirects:$e.optional(),integrations:An.optional(),banner:It.optional(),errors:zt.optional(),contextual:f.optional(),thumbnails:ur.optional(),interaction:jn.optional(),metadata:Pn.optional(),variables:Gi.optional(),markdown:Nn.optional(),packages:Mi.optional().catch(void 0)},qi=_([`mint`,`maple`,`palm`,`willow`,`linden`,`almond`,`aspen`,`luma`,`sequoia`]).describe(`Visual theme for the site. Learn more in [available themes](https://www.mintlify.com/docs/themes).`),Ji=x(Object.assign({theme:v(qi.enum.almond)},Ki)),Yi=x(Object.assign({theme:v(qi.enum.aspen)},Ki)),Xi=x(Object.assign({theme:v(qi.enum.linden)},Ki)),Zi=x(Object.assign({theme:v(qi.enum.luma)},Ki)),Qi=x(Object.assign({theme:v(qi.enum.maple)},Ki)),$i=x(Object.assign({theme:v(qi.enum.mint),themeVersion:Ct(St.mint).optional()},Ki)),ea=x(Object.assign({theme:v(qi.enum.palm)},Ki)),ta=x(Object.assign({theme:v(qi.enum.sequoia)},Ki)),na=x({id:S().trim().nonempty().describe(`Stable identifier for the variation`),label:S().trim().nonempty().describe(`Display label for the variation`)}).describe(`A documentation content variation`),ra=x({options:a(na).min(1,`At least one variation option must be specified`).describe(`Variation options in display order. The first option is the default.`)}).superRefine(({options:e},t)=>{let n=/* @__PURE__ */ new Set;e.forEach((e,r)=>{n.has(e.id)&&t.addIssue({code:b.custom,message:`Variation id "${e.id}" is duplicated. Variation ids must be unique.`,path:[`options`,r,`id`]}),n.add(e.id)})}).describe(`Documentation content variations`),ia=x(Object.assign(Object.assign({theme:v(qi.enum.willow)},Ki),{variations:ra.optional()})),aa=c(`theme`,[$i,Qi,ea,ia,Xi,Ji,Yi,Zi,ta]);x(Object.assign({theme:qi,themeVersion:Ct(Math.max(...Object.values(St))).optional()},Ki));const oa=x({sourceRef:S().nonempty().describe(`The mount path of the git source to inline`)}).describe(`Reference to a git source navigation section`),sa=[`get`,`put`,`post`,`delete`,`options`,`head`,`patch`,`trace`,`query`],ca=e=>sa.includes(e),la=/^[A-Z0-9!#$%&'*+.^_`|~-]+$/,ua=/* @__PURE__ */ new Set([`WEBHOOK`]),da=e=>la.test(e)&&!ca(e.toLowerCase())&&!ua.has(e),fa=e=>{let t=e.toLowerCase();if(ca(t))return t;let n=e.toUpperCase();return da(n)?n:void 0},pa=e=>`additionalOperations`in e?e.additionalOperations??{}:{};function ma(e){let t=[];for(let n of sa){let r=e[n];r&&t.push([n,r])}for(let[n,r]of Object.entries(pa(e)))da(n)&&t.push([n,r]);return t}function ha(e,t){return ca(t)?e[t]:pa(e)[t]}const ga=(e,t)=>{switch(e.code){case`invalid_type`:return e.received===`undefined`?{message:`This field is required`}:{message:`Invalid type. Expected field to be of type '${e.expected}', received '${e.received}'`};case`invalid_union`:return{message:`Invalid type. Field did not match any types in union`}}return{message:t.defaultError}};function _a(e){return e.flatMap(e=>{if(typeof e==`string`)return[];let t=_a(e.pages);return e.version!==void 0&&t.push(e.version),t})}function va({navigation:e,versions:t=[]},n){let r=_a(e),i=t.map(e=>typeof e==`string`?e:e.url?void 0:e.name).filter(Boolean);r.forEach(e=>{i.includes(e)||n.addIssue({code:b.custom,message:`Version ${e} is not included in the versions array, but is used in the navigation. Please add ${e} to the versions array.`})})}const ya=({anchors:e,navigation:t})=>e?.filter(e=>!e.url.startsWith(`mailto:`)&&!e.url.startsWith(`http://`)&&!e.url.startsWith(`https://`)&&!t.some(t=>ba(t,e.url))).map((e,t)=>({code:b.custom,message:`No pages in the navigation match anchor ${e.url}`,path:[`anchors`,t,`url`]}))??[];function ba(e,t){return typeof e==`string`?e.startsWith(t):e.pages.some(e=>ba(e,t))}const xa=[ya],Sa=e=>xa.flatMap(t=>t(e)),Ca=/* @__PURE__ */ new Set([`anchors`,`dropdowns`,`languages`,`menu`,`pages`,`products`,`tabs`,`versions`,`groups`]),wa={anchors:{anchor:`sourceRef`,href:`/sourceRef`},dropdowns:{dropdown:`sourceRef`,href:`/sourceRef`},languages:{language:`en`,href:`/sourceRef`},menu:{item:`sourceRef`,href:`/sourceRef`},pages:`sourceRef`,products:{product:`sourceRef`,href:`/sourceRef`},tabs:{tab:`sourceRef`,href:`/sourceRef`},versions:{version:`sourceRef`,href:`/sourceRef`},groups:{group:`sourceRef`,pages:[]}},Ta=oa.strict();function Ea(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&`sourceRef`in e}function Da(e){return Ea(e)&&typeof e.sourceRef==`string`}function Oa(e,t,n=[]){if(Ea(e)){if(!t||!Ca.has(t))return[{code:b.custom,path:n,message:`sourceRef is only supported as an element in navigation arrays`}];let r=Ta.safeParse(e);return r.success?[]:r.error.issues.map(e=>Object.assign(Object.assign({},e),{path:[...n,...e.path]}))}return Array.isArray(e)?e.flatMap((e,r)=>Oa(e,t,[...n,r])):typeof e!=`object`||!e?[]:Object.entries(e).flatMap(([e,t])=>Oa(t,e,[...n,e]))}function ka(e,t){return Da(e)&&t&&Ca.has(t)?wa[t]:Array.isArray(e)?e.map(e=>ka(e,t)):typeof e!=`object`||!e?e:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,ka(t,e)]))}const Aa=Symbol(`strippedSourceRef`);function ja(e){return Da(e)?Aa:Array.isArray(e)?e.map(e=>ja(e)).filter(e=>e!==Aa):typeof e!=`object`||!e?e:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,ja(t)]).filter(([,e])=>e!==Aa))}function Ma(e){let t=y();C(ga);let n=xt.superRefine(va).safeParse(e);return C(t),n.success?Object.assign(Object.assign({},n),{warnings:Sa(n.data)}):n}function Na(e){let t=y();C(ga);let n=aa.safeParse(e);return C(t),n.success?(n.data.packages===void 0&&delete n.data.packages,Object.assign(Object.assign({},n),{warnings:[]})):n}function Pa(e){let t=y();C(ga);let n=Oa(e),r=n.length>0?{success:!1,error:new E(n)}:aa.safeParse(ka(e));return C(t),r.success?Object.assign(Object.assign({},r),{data:e,warnings:[]}):r}const Fa=` `,Ia=e=>La(e),La=(e,t=0)=>{let n=e.path.map(e=>typeof e==`string`?`.${e}`:`[${e}]`),r=e.code===`invalid_union`?e.unionErrors.flatMap((e,n)=>{let r=e.issues.map(e=>La(e,t+1));return r.unshift(`${Fa.repeat(t)} ${n+1}:`),r}):[];return r.unshift(`${Fa.repeat(t)}\#${n.join(``)}: ${e.message}`),r.join(`
12
+ `)};var Ra=function(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})},za=class extends Error{constructor(e,t){super(`Referenced config file '${e}' does not exist (referenced from ${t})`),this.name=`RefNotFoundError`}},Ba=class extends Error{constructor(e){super(`Circular reference detected: ${e.join(` → `)}`),this.name=`CircularRefError`}},Va=class extends Error{constructor(e){super(`Referenced config file '${e}' is outside the project directory`),this.name=`PathTraversalError`}},Ha=class extends Error{constructor(e,t){super(`Referenced config file '${e}' contains invalid JSON: ${t}`),this.name=`RefInvalidJsonError`}};function Ua(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Wa(e){if(Ua(e)&&typeof e.$ref==`string`)return e.$ref}function Ga(e){let t=e.replace(/\\/g,`/`),n=t.startsWith(`/`),r=t.split(`/`),i=[];for(let e of r)if(e!==``&&e!==`.`){if(e===`..`){let t=i.at(-1);!t||t===`..`?i.push(e):i.pop()}else i.push(e)}let a=i.join(`/`);return n?`/${a}`:a}function Ka(e){let t=Ga(e),n=t.lastIndexOf(`/`);return n===-1?``:t.slice(0,n)}function qa(e,t){return Ga(t?[Ka(t),e].filter(Boolean).join(`/`):e)}function Ja(e){return e===`..`||e.startsWith(`../`)||e.startsWith(`/`)}function Ya(e,t,n,r){return Ra(this,void 0,void 0,function*(){let i;try{i=yield n(t)}catch{throw new za(e,r??`project root`)}try{return{parsed:JSON.parse(i),content:i}}catch(t){throw new Ha(e,t instanceof Error?t.message:String(t))}})}function Xa(e,t){return Ra(this,void 0,void 0,function*(){let n=[],r={};function i(e,a,o){return Ra(this,void 0,void 0,function*(){let s=Wa(e);if(s!=null){let c=qa(s,o);if(Ja(c))throw new Va(s);if(a.has(c))throw new Ba([...a,c]);let{parsed:l,content:u}=yield Ya(s,c,t,o);n.push(c),r[c]=u;let d=yield i(l,/* @__PURE__ */ new Set([...a,c]),c);if(Ua(d)&&Ua(e)){let t=Object.entries(e).filter(([e])=>e!==`$ref`),n=Object.assign({},d);for(let[e,r]of t)n[e]=yield i(r,a,o);return n}return d}if(Array.isArray(e))return Promise.all(e.map(e=>i(e,a,o)));if(Ua(e)){let t={};for(let[n,r]of Object.entries(e))t[n]=yield i(r,a,o);return t}return e})}return{resolved:yield i(e,/* @__PURE__ */ new Set),referencedFiles:n,referencedFileContents:r}})}const Za=e=>e.toLowerCase()===`webhook`?`webhook`:fa(e),Qa=e=>{let t=e.trim().split(/\s+/),n,r,i;if(t.length>3)return;if(t[0]&&t[1]&&t[2])[n,r,i]=t;else if(t[0]&&t[1])[r,i]=t;else return;let a=Za(r);if(a!==void 0&&(ca(a)||a===`webhook`||r===a&&i.startsWith(`/`))&&(a!==`query`||i.startsWith(`/`)))return{method:a,endpoint:i,filename:n}};function $a(e){return e.replaceAll(`\\`,`/`)}var eo=/* @__PURE__ */ t((/* @__PURE__ */ n(((e,t)=>{function n(e){return Array.isArray(e)?e:[e]}let r=/^\s+$/,i=/(?:[^\\]|^)\\$/,a=/^\\!/,o=/^\\#/,s=/\r?\n/g,c=/^\.{0,2}\/|^\.{1,2}$/,l=/\/$/,u=`node-ignore`;
13
+ /* istanbul ignore else */
14
+ typeof Symbol<`u`&&(u=Symbol.for(`node-ignore`));let d=u,f=(e,t,n)=>(Object.defineProperty(e,t,{value:n}),n),p=/([0-z])-([0-z])/g,m=()=>!1,h=e=>e.replace(p,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:``),g=e=>{let{length:t}=e;return e.slice(0,t-t%2)},_=[[/^\uFEFF/,()=>``],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(n.indexOf(`\\`)===0?` `:``)],[/(\\+?)\s/g,(e,t)=>{let{length:n}=t;return t.slice(0,n-n%2)+` `}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>`\\`],[/\\\\/g,()=>`\\`],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===`\\`?`\\[${n}${g(r)}${i}`:i===`]`&&r.length%2==0?`[${h(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`]],v=/(^|\\\/)?\\\*$/,y=`regex`,b=`checkRegex`,x={[y](e,t){return`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`},[b](e,t){return`${t?`${t}[^/]*`:`[^/]*`}(?=$|\\/$)`}},S=e=>_.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e),C=e=>typeof e==`string`,w=e=>e&&C(e)&&!r.test(e)&&!i.test(e)&&e.indexOf(`#`)!==0,T=e=>e.split(s).filter(Boolean);var E=class{constructor(e,t,n,r,i,a){this.pattern=e,this.mark=t,this.negative=i,f(this,`body`,n),f(this,`ignoreCase`,r),f(this,`regexPrefix`,a)}get regex(){let e=`_regex`;return this[e]?this[e]:this._make(y,e)}get checkRegex(){let e=`_checkRegex`;return this[e]?this[e]:this._make(b,e)}_make(e,t){let n=this.regexPrefix.replace(v,x[e]),r=this.ignoreCase?new RegExp(n,`i`):new RegExp(n);return f(this,t,r)}};let D=({pattern:e,mark:t},n)=>{let r=!1,i=e;i.indexOf(`!`)===0&&(r=!0,i=i.substr(1)),i=i.replace(a,`!`).replace(o,`#`);let s=S(i);return new E(e,t,i,n,r,s)};var O=class{constructor(e){this._ignoreCase=e,this._rules=[]}_add(e){if(e&&e[d])this._rules=this._rules.concat(e._rules._rules),this._added=!0;else if(C(e)&&(e={pattern:e}),w(e.pattern)){let t=D(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(C(e)?T(e):e).forEach(this._add,this),this._added}test(e,t,n){let r=!1,i=!1,a;this._rules.forEach(o=>{let{negative:s}=o;i===s&&r!==i||s&&!r&&!i&&!t||o[n].test(e)&&(r=!s,i=s,a=s?void 0:o)});let o={ignored:r,unignored:i};return a&&(o.rule=a),o}};let k=(e,t)=>{throw new t(e)},A=(e,t,n)=>C(e)?e?!A.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),ee=e=>c.test(e);
15
+ /* istanbul ignore next */
16
+ A.isNotRelative=ee,A.convert=e=>e;var j=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){f(this,d,!0),this._rules=new O(t),this._strictPathCheck=!n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(e){return this._rules.add(e)&&this._initCache(),this}addPattern(e){return this.add(e)}_test(e,t,n,r){let i=e&&A.convert(e);return A(i,e,this._strictPathCheck?k:m),this._t(i,t,n,r)}checkIgnore(e){if(!l.test(e))return this.test(e);let t=e.split(`/`).filter(Boolean);if(t.pop(),t.length){let e=this._t(t.join(`/`)+`/`,this._testCache,!0,t);if(e.ignored)return e}return this._rules.test(e,!1,b)}_t(e,t,n,r){if(e in t)return t[e];if(r||=e.split(`/`).filter(Boolean),r.pop(),!r.length)return t[e]=this._rules.test(e,n,y);let i=this._t(r.join(`/`)+`/`,t,n,r);return t[e]=i.ignored?i:this._rules.test(e,n,y)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}};let M=e=>new j(e),N=e=>A(e&&A.convert(e),e,m),P=()=>{A.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`);let e=/^[a-z]:\//i;A.isNotRelative=t=>e.test(t)||ee(t)};typeof process<`u`&&process.platform===`win32`&&P(),t.exports=M,M.default=M,t.exports.isPathValid=N,f(t.exports,Symbol.for(`setupWindows`),P)})))(),1);const to=[`.git`,`.github`,`.claude`,`.agents`,`.idea`,`.vscode`,`.cursor`,`.mintlify/**`,`!.mintlify/**/`,`!.mintlify/skills/**`,`!.mintlify/**/*.json`,`!.mintlify/**/*.yaml`,`!.mintlify/**/*.yml`,`node_modules`,`README.md`,`LICENSE.md`,`CHANGELOG.md`,`CONTRIBUTING.md`];function no(e){return e.split(/\r?\n/).map(e=>e.trim())}function ro(e,t=[],n=!1){return io(e,ao(t),n)}function io(e,t,n=!1){let{path:r,hadTrailingSlash:i}=oo(e);return r.length===0?!1:n||i?t.ignores(`${r}/`):t.ignores(r)}function ao(e=[]){if(e.some(e=>e.startsWith(`!`)||/[\r\n]/.test(e)))return(0,eo.default)().add(Array.from(/* @__PURE__ */ new Set([...to,...e])));let t=/* @__PURE__ */ new Set,n=e.filter(e=>{let n=e.replace(/^\//,``);return!e.startsWith(`/`)&&!n.replace(/\/$/,``).includes(`/`)||!/^[a-zA-Z0-9_.-]+(?:\/[a-zA-Z0-9_.-]+)*\/?$/.test(n)||n.split(`/`).some(e=>e===`.`||e===`..`)?!0:(t.add(n.toLowerCase()),!1)}),r=(0,eo.default)().add(Array.from(/* @__PURE__ */ new Set([...to,...n])));return t.size===0?r:{ignores(e){if(r.ignores(e))return!0;let n=e.replace(/[A-Z]/g,e=>e.toLowerCase());for(let e=n.indexOf(`/`);e!==-1;e=n.indexOf(`/`,e+1))if(t.has(n.slice(0,e))||t.has(n.slice(0,e+1)))return!0;return t.has(n)}}}function oo(e){let t=$a(e),n=t.endsWith(`/`);for(;t.startsWith(`./`);)t=t.slice(2);return t.startsWith(`/`)&&(t=t.slice(1)),t=t.replace(/\/+$/,``),{path:t,hadTrailingSlash:n}}var so=/* @__PURE__ */ n((e=>{let t=P().fromCallback,n=R(),r=(/* @__PURE__ */ `access.appendFile.chmod.chown.close.copyFile.fchmod.fchown.fdatasync.fstat.fsync.ftruncate.futimes.lchmod.lchown.link.lstat.mkdir.mkdtemp.open.opendir.readdir.readFile.readlink.realpath.rename.rm.rmdir.stat.symlink.truncate.unlink.utimes.writeFile`.split(`.`)).filter(e=>typeof n[e]==`function`);Object.assign(e,n),r.forEach(r=>{e[r]=t(n[r])}),e.exists=function(e,t){return typeof t==`function`?n.exists(e,t):new Promise(t=>n.exists(e,t))},e.read=function(e,t,r,i,a,o){return typeof o==`function`?n.read(e,t,r,i,a,o):new Promise((o,s)=>{n.read(e,t,r,i,a,(e,t,n)=>{if(e)return s(e);o({bytesRead:t,buffer:n})})})},e.write=function(e,t,...r){return typeof r[r.length-1]==`function`?n.write(e,t,...r):new Promise((i,a)=>{n.write(e,t,...r,(e,t,n)=>{if(e)return a(e);i({bytesWritten:t,buffer:n})})})},e.readv=function(e,t,...r){return typeof r[r.length-1]==`function`?n.readv(e,t,...r):new Promise((i,a)=>{n.readv(e,t,...r,(e,t,n)=>{if(e)return a(e);i({bytesRead:t,buffers:n})})})},e.writev=function(e,t,...r){return typeof r[r.length-1]==`function`?n.writev(e,t,...r):new Promise((i,a)=>{n.writev(e,t,...r,(e,t,n)=>{if(e)return a(e);i({bytesWritten:t,buffers:n})})})},typeof n.realpath.native==`function`?e.realpath.native=t(n.realpath.native):process.emitWarning(`fs.realpath.native is not a function. Is fs being monkey-patched?`,`Warning`,`fs-extra-WARN0003`)})),co=/* @__PURE__ */ n(((t,n)=>{let r=e(`path`);n.exports.checkPath=function(e){if(process.platform===`win32`&&/[<>:"|?*]/.test(e.replace(r.parse(e).root,``))){let t=/* @__PURE__ */ Error(`Path contains invalid characters: ${e}`);throw t.code=`EINVAL`,t}}})),lo=/* @__PURE__ */ n(((e,t)=>{let n=so(),{checkPath:r}=co(),i=e=>typeof e==`number`?e:{mode:511,...e}.mode;t.exports.makeDir=async(e,t)=>(r(e),n.mkdir(e,{mode:i(t),recursive:!0})),t.exports.makeDirSync=(e,t)=>(r(e),n.mkdirSync(e,{mode:i(t),recursive:!0}))})),uo=/* @__PURE__ */ n(((e,t)=>{let n=P().fromPromise,{makeDir:r,makeDirSync:i}=lo(),a=n(r);t.exports={mkdirs:a,mkdirsSync:i,mkdirp:a,mkdirpSync:i,ensureDir:a,ensureDirSync:i}})),fo=/* @__PURE__ */ n(((e,t)=>{let n=P().fromPromise,r=so();function i(e){return r.access(e).then(()=>!0).catch(()=>!1)}t.exports={pathExists:n(i),pathExistsSync:r.existsSync}})),po=/* @__PURE__ */ n(((e,t)=>{let n=R();function r(e,t,r,i){n.open(e,`r+`,(e,a)=>{if(e)return i(e);n.futimes(a,t,r,e=>{n.close(a,t=>{i&&i(e||t)})})})}function i(e,t,r){let i=n.openSync(e,`r+`);return n.futimesSync(i,t,r),n.closeSync(i)}t.exports={utimesMillis:r,utimesMillisSync:i}})),mo=/* @__PURE__ */ n(((t,n)=>{let r=so(),i=e(`path`),a=e(`util`);function o(e,t,n){let i=n.dereference?e=>r.stat(e,{bigint:!0}):e=>r.lstat(e,{bigint:!0});return Promise.all([i(e),i(t).catch(e=>{if(e.code===`ENOENT`)return null;throw e})]).then(([e,t])=>({srcStat:e,destStat:t}))}function s(e,t,n){let i,a=n.dereference?e=>r.statSync(e,{bigint:!0}):e=>r.lstatSync(e,{bigint:!0}),o=a(e);try{i=a(t)}catch(e){if(e.code===`ENOENT`)return{srcStat:o,destStat:null};throw e}return{srcStat:o,destStat:i}}function c(e,t,n,r,s){a.callbackify(o)(e,t,r,(r,a)=>{if(r)return s(r);let{srcStat:o,destStat:c}=a;if(c){if(f(o,c)){let r=i.basename(e),a=i.basename(t);return n===`move`&&r!==a&&r.toLowerCase()===a.toLowerCase()?s(null,{srcStat:o,destStat:c,isChangingCase:!0}):s(/* @__PURE__ */ Error(`Source and destination must not be the same.`))}if(o.isDirectory()&&!c.isDirectory())return s(/* @__PURE__ */ Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`));if(!o.isDirectory()&&c.isDirectory())return s(/* @__PURE__ */ Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`))}return o.isDirectory()&&p(e,t)?s(Error(m(e,t,n))):s(null,{srcStat:o,destStat:c})})}function l(e,t,n,r){let{srcStat:a,destStat:o}=s(e,t,r);if(o){if(f(a,o)){let r=i.basename(e),s=i.basename(t);if(n===`move`&&r!==s&&r.toLowerCase()===s.toLowerCase())return{srcStat:a,destStat:o,isChangingCase:!0};throw Error(`Source and destination must not be the same.`)}if(a.isDirectory()&&!o.isDirectory())throw Error(`Cannot overwrite non-directory '${t}' with directory '${e}'.`);if(!a.isDirectory()&&o.isDirectory())throw Error(`Cannot overwrite directory '${t}' with non-directory '${e}'.`)}if(a.isDirectory()&&p(e,t))throw Error(m(e,t,n));return{srcStat:a,destStat:o}}function u(e,t,n,a,o){let s=i.resolve(i.dirname(e)),c=i.resolve(i.dirname(n));if(c===s||c===i.parse(c).root)return o();r.stat(c,{bigint:!0},(r,i)=>r?r.code===`ENOENT`?o():o(r):f(t,i)?o(Error(m(e,n,a))):u(e,t,c,a,o))}function d(e,t,n,a){let o=i.resolve(i.dirname(e)),s=i.resolve(i.dirname(n));if(s===o||s===i.parse(s).root)return;let c;try{c=r.statSync(s,{bigint:!0})}catch(e){if(e.code===`ENOENT`)return;throw e}if(f(t,c))throw Error(m(e,n,a));return d(e,t,s,a)}function f(e,t){return t.ino&&t.dev&&t.ino===e.ino&&t.dev===e.dev}function p(e,t){let n=i.resolve(e).split(i.sep).filter(e=>e),r=i.resolve(t).split(i.sep).filter(e=>e);return n.reduce((e,t,n)=>e&&r[n]===t,!0)}function m(e,t,n){return`Cannot ${n} '${e}' to a subdirectory of itself, '${t}'.`}n.exports={checkPaths:c,checkPathsSync:l,checkParentPaths:u,checkParentPathsSync:d,isSrcSubdir:p,areIdentical:f}})),ho=/* @__PURE__ */ n(((t,n)=>{let r=R(),i=e(`path`),a=uo().mkdirs,o=fo().pathExists,s=po().utimesMillis,c=mo();function l(e,t,n,r){typeof n==`function`&&!r?(r=n,n={}):typeof n==`function`&&(n={filter:n}),r||=function(){},n||={},n.clobber=`clobber`in n?!!n.clobber:!0,n.overwrite=`overwrite`in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch===`ia32`&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
17
+
18
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,`Warning`,`fs-extra-WARN0001`),c.checkPaths(e,t,`copy`,n,(i,a)=>{if(i)return r(i);let{srcStat:o,destStat:s}=a;c.checkParentPaths(e,o,t,`copy`,i=>{if(i)return r(i);d(e,t,n,(i,a)=>{if(i)return r(i);if(!a)return r();u(s,e,t,n,r)})})})}function u(e,t,n,r,s){let c=i.dirname(n);o(c,(i,o)=>{if(i)return s(i);if(o)return f(e,t,n,r,s);a(c,i=>i?s(i):f(e,t,n,r,s))})}function d(e,t,n,r){if(!n.filter)return r(null,!0);Promise.resolve(n.filter(e,t)).then(e=>r(null,e),e=>r(e))}function f(e,t,n,i,a){(i.dereference?r.stat:r.lstat)(t,(r,o)=>r?a(r):o.isDirectory()?S(o,e,t,n,i,a):o.isFile()||o.isCharacterDevice()||o.isBlockDevice()?p(o,e,t,n,i,a):o.isSymbolicLink()?D(e,t,n,i,a):o.isSocket()?a(/* @__PURE__ */ Error(`Cannot copy a socket file: ${t}`)):o.isFIFO()?a(/* @__PURE__ */ Error(`Cannot copy a FIFO pipe: ${t}`)):a(/* @__PURE__ */ Error(`Unknown file: ${t}`)))}function p(e,t,n,r,i,a){return t?m(e,n,r,i,a):h(e,n,r,i,a)}function m(e,t,n,i,a){if(i.overwrite)r.unlink(n,r=>r?a(r):h(e,t,n,i,a));else if(i.errorOnExist)return a(/* @__PURE__ */ Error(`'${n}' already exists`));else return a()}function h(e,t,n,i,a){r.copyFile(t,n,r=>r?a(r):i.preserveTimestamps?g(e.mode,t,n,a):b(n,e.mode,a))}function g(e,t,n,r){return _(e)?v(n,e,i=>i?r(i):y(e,t,n,r)):y(e,t,n,r)}function _(e){return!(e&128)}function v(e,t,n){return b(e,t|128,n)}function y(e,t,n,r){x(t,n,t=>t?r(t):b(n,e,r))}function b(e,t,n){return r.chmod(e,t,n)}function x(e,t,n){r.stat(e,(e,r)=>e?n(e):s(t,r.atime,r.mtime,n))}function S(e,t,n,r,i,a){return t?w(n,r,i,a):C(e.mode,n,r,i,a)}function C(e,t,n,i,a){r.mkdir(n,r=>{if(r)return a(r);w(t,n,i,t=>t?a(t):b(n,e,a))})}function w(e,t,n,i){r.readdir(e,(r,a)=>r?i(r):T(a,e,t,n,i))}function T(e,t,n,r,i){let a=e.pop();return a?E(e,a,t,n,r,i):i()}function E(e,t,n,r,a,o){let s=i.join(n,t),l=i.join(r,t);d(s,l,a,(t,i)=>{if(t)return o(t);if(!i)return T(e,n,r,a,o);c.checkPaths(s,l,`copy`,a,(t,i)=>{if(t)return o(t);let{destStat:c}=i;f(c,s,l,a,t=>t?o(t):T(e,n,r,a,o))})})}function D(e,t,n,a,o){r.readlink(t,(t,s)=>{if(t)return o(t);if(a.dereference&&(s=i.resolve(process.cwd(),s)),e)r.readlink(n,(e,t)=>e?e.code===`EINVAL`||e.code===`UNKNOWN`?r.symlink(s,n,o):o(e):(a.dereference&&(t=i.resolve(process.cwd(),t)),c.isSrcSubdir(s,t)?o(/* @__PURE__ */ Error(`Cannot copy '${s}' to a subdirectory of itself, '${t}'.`)):c.isSrcSubdir(t,s)?o(/* @__PURE__ */ Error(`Cannot overwrite '${t}' with '${s}'.`)):O(s,n,o)));else return r.symlink(s,n,o)})}function O(e,t,n){r.unlink(t,i=>i?n(i):r.symlink(e,t,n))}n.exports=l})),go=/* @__PURE__ */ n(((t,n)=>{let r=R(),i=e(`path`),a=uo().mkdirsSync,o=po().utimesMillisSync,s=mo();function c(e,t,n){typeof n==`function`&&(n={filter:n}),n||={},n.clobber=`clobber`in n?!!n.clobber:!0,n.overwrite=`overwrite`in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch===`ia32`&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
19
+
20
+ see https://github.com/jprichardson/node-fs-extra/issues/269`,`Warning`,`fs-extra-WARN0002`);let{srcStat:o,destStat:c}=s.checkPathsSync(e,t,`copy`,n);if(s.checkParentPathsSync(e,o,t,`copy`),n.filter&&!n.filter(e,t))return;let u=i.dirname(t);return r.existsSync(u)||a(u),l(c,e,t,n)}function l(e,t,n,i){let a=(i.dereference?r.statSync:r.lstatSync)(t);if(a.isDirectory())return v(a,e,t,n,i);if(a.isFile()||a.isCharacterDevice()||a.isBlockDevice())return u(a,e,t,n,i);if(a.isSymbolicLink())return S(e,t,n,i);throw a.isSocket()?Error(`Cannot copy a socket file: ${t}`):a.isFIFO()?Error(`Cannot copy a FIFO pipe: ${t}`):Error(`Unknown file: ${t}`)}function u(e,t,n,r,i){return t?d(e,n,r,i):f(e,n,r,i)}function d(e,t,n,i){if(i.overwrite)return r.unlinkSync(n),f(e,t,n,i);if(i.errorOnExist)throw Error(`'${n}' already exists`)}function f(e,t,n,i){return r.copyFileSync(t,n),i.preserveTimestamps&&p(e.mode,t,n),g(n,e.mode)}function p(e,t,n){return m(e)&&h(n,e),_(t,n)}function m(e){return!(e&128)}function h(e,t){return g(e,t|128)}function g(e,t){return r.chmodSync(e,t)}function _(e,t){let n=r.statSync(e);return o(t,n.atime,n.mtime)}function v(e,t,n,r,i){return t?b(n,r,i):y(e.mode,n,r,i)}function y(e,t,n,i){return r.mkdirSync(n),b(t,n,i),g(n,e)}function b(e,t,n){r.readdirSync(e).forEach(r=>x(r,e,t,n))}function x(e,t,n,r){let a=i.join(t,e),o=i.join(n,e);if(r.filter&&!r.filter(a,o))return;let{destStat:c}=s.checkPathsSync(a,o,`copy`,r);return l(c,a,o,r)}function S(e,t,n,a){let o=r.readlinkSync(t);if(a.dereference&&(o=i.resolve(process.cwd(),o)),e){let e;try{e=r.readlinkSync(n)}catch(e){if(e.code===`EINVAL`||e.code===`UNKNOWN`)return r.symlinkSync(o,n);throw e}if(a.dereference&&(e=i.resolve(process.cwd(),e)),s.isSrcSubdir(o,e))throw Error(`Cannot copy '${o}' to a subdirectory of itself, '${e}'.`);if(s.isSrcSubdir(e,o))throw Error(`Cannot overwrite '${e}' with '${o}'.`);return C(o,n)}return r.symlinkSync(o,n)}function C(e,t){return r.unlinkSync(t),r.symlinkSync(e,t)}n.exports=c})),_o=/* @__PURE__ */ n(((e,t)=>{let n=P().fromCallback;t.exports={copy:n(ho()),copySync:go()}})),vo=/* @__PURE__ */ n(((e,t)=>{let n=R(),r=P().fromCallback;function i(e,t){n.rm(e,{recursive:!0,force:!0},t)}function a(e){n.rmSync(e,{recursive:!0,force:!0})}t.exports={remove:r(i),removeSync:a}})),yo=/* @__PURE__ */ n(((t,n)=>{let r=P().fromPromise,i=so(),a=e(`path`),o=uo(),s=vo(),c=r(async function(e){let t;try{t=await i.readdir(e)}catch{return o.mkdirs(e)}return Promise.all(t.map(t=>s.remove(a.join(e,t))))});function l(e){let t;try{t=i.readdirSync(e)}catch{return o.mkdirsSync(e)}t.forEach(t=>{t=a.join(e,t),s.removeSync(t)})}n.exports={emptyDirSync:l,emptydirSync:l,emptyDir:c,emptydir:c}})),bo=/* @__PURE__ */ n(((t,n)=>{let r=P().fromCallback,i=e(`path`),a=R(),o=uo();function s(e,t){function n(){a.writeFile(e,``,e=>{if(e)return t(e);t()})}a.stat(e,(r,s)=>{if(!r&&s.isFile())return t();let c=i.dirname(e);a.stat(c,(e,r)=>{if(e)return e.code===`ENOENT`?o.mkdirs(c,e=>{if(e)return t(e);n()}):t(e);r.isDirectory()?n():a.readdir(c,e=>{if(e)return t(e)})})})}function c(e){let t;try{t=a.statSync(e)}catch{}if(t&&t.isFile())return;let n=i.dirname(e);try{a.statSync(n).isDirectory()||a.readdirSync(n)}catch(e){if(e&&e.code===`ENOENT`)o.mkdirsSync(n);else throw e}a.writeFileSync(e,``)}n.exports={createFile:r(s),createFileSync:c}})),xo=/* @__PURE__ */ n(((t,n)=>{let r=P().fromCallback,i=e(`path`),a=R(),o=uo(),s=fo().pathExists,{areIdentical:c}=mo();function l(e,t,n){function r(e,t){a.link(e,t,e=>{if(e)return n(e);n(null)})}a.lstat(t,(l,u)=>{a.lstat(e,(a,l)=>{if(a)return a.message=a.message.replace(`lstat`,`ensureLink`),n(a);if(u&&c(l,u))return n(null);let d=i.dirname(t);s(d,(i,a)=>{if(i)return n(i);if(a)return r(e,t);o.mkdirs(d,i=>{if(i)return n(i);r(e,t)})})})})}function u(e,t){let n;try{n=a.lstatSync(t)}catch{}try{let t=a.lstatSync(e);if(n&&c(t,n))return}catch(e){throw e.message=e.message.replace(`lstat`,`ensureLink`),e}let r=i.dirname(t);return a.existsSync(r)||o.mkdirsSync(r),a.linkSync(e,t)}n.exports={createLink:r(l),createLinkSync:u}})),So=/* @__PURE__ */ n(((t,n)=>{let r=e(`path`),i=R(),a=fo().pathExists;function o(e,t,n){if(r.isAbsolute(e))return i.lstat(e,t=>t?(t.message=t.message.replace(`lstat`,`ensureSymlink`),n(t)):n(null,{toCwd:e,toDst:e}));{let o=r.dirname(t),s=r.join(o,e);return a(s,(t,a)=>t?n(t):a?n(null,{toCwd:s,toDst:e}):i.lstat(e,t=>t?(t.message=t.message.replace(`lstat`,`ensureSymlink`),n(t)):n(null,{toCwd:e,toDst:r.relative(o,e)})))}}function s(e,t){let n;if(r.isAbsolute(e)){if(n=i.existsSync(e),!n)throw Error(`absolute srcpath does not exist`);return{toCwd:e,toDst:e}}{let a=r.dirname(t),o=r.join(a,e);if(n=i.existsSync(o),n)return{toCwd:o,toDst:e};if(n=i.existsSync(e),!n)throw Error(`relative srcpath does not exist`);return{toCwd:e,toDst:r.relative(a,e)}}}n.exports={symlinkPaths:o,symlinkPathsSync:s}})),Co=/* @__PURE__ */ n(((e,t)=>{let n=R();function r(e,t,r){if(r=typeof t==`function`?t:r,t=typeof t!=`function`&&t,t)return r(null,t);n.lstat(e,(e,n)=>{if(e)return r(null,`file`);t=n&&n.isDirectory()?`dir`:`file`,r(null,t)})}function i(e,t){let r;if(t)return t;try{r=n.lstatSync(e)}catch{return`file`}return r&&r.isDirectory()?`dir`:`file`}t.exports={symlinkType:r,symlinkTypeSync:i}})),wo=/* @__PURE__ */ n(((t,n)=>{let r=P().fromCallback,i=e(`path`),a=so(),o=uo(),s=o.mkdirs,c=o.mkdirsSync,l=So(),u=l.symlinkPaths,d=l.symlinkPathsSync,f=Co(),p=f.symlinkType,m=f.symlinkTypeSync,h=fo().pathExists,{areIdentical:g}=mo();function _(e,t,n,r){r=typeof n==`function`?n:r,n=typeof n!=`function`&&n,a.lstat(t,(i,o)=>{!i&&o.isSymbolicLink()?Promise.all([a.stat(e),a.stat(t)]).then(([i,a])=>{if(g(i,a))return r(null);v(e,t,n,r)}):v(e,t,n,r)})}function v(e,t,n,r){u(e,t,(o,c)=>{if(o)return r(o);e=c.toDst,p(c.toCwd,n,(n,o)=>{if(n)return r(n);let c=i.dirname(t);h(c,(n,i)=>{if(n)return r(n);if(i)return a.symlink(e,t,o,r);s(c,n=>{if(n)return r(n);a.symlink(e,t,o,r)})})})})}function y(e,t,n){let r;try{r=a.lstatSync(t)}catch{}if(r&&r.isSymbolicLink()){let n=a.statSync(e),r=a.statSync(t);if(g(n,r))return}let o=d(e,t);e=o.toDst,n=m(o.toCwd,n);let s=i.dirname(t);return a.existsSync(s)||c(s),a.symlinkSync(e,t,n)}n.exports={createSymlink:r(_),createSymlinkSync:y}})),To=/* @__PURE__ */ n(((e,t)=>{let{createFile:n,createFileSync:r}=bo(),{createLink:i,createLinkSync:a}=xo(),{createSymlink:o,createSymlinkSync:s}=wo();t.exports={createFile:n,createFileSync:r,ensureFile:n,ensureFileSync:r,createLink:i,createLinkSync:a,ensureLink:i,ensureLinkSync:a,createSymlink:o,createSymlinkSync:s,ensureSymlink:o,ensureSymlinkSync:s}})),Eo=/* @__PURE__ */ n(((e,t)=>{let n=B();t.exports={readJson:n.readFile,readJsonSync:n.readFileSync,writeJson:n.writeFile,writeJsonSync:n.writeFileSync}})),Do=/* @__PURE__ */ n(((t,n)=>{let r=P().fromCallback,i=R(),a=e(`path`),o=uo(),s=fo().pathExists;function c(e,t,n,r){typeof n==`function`&&(r=n,n=`utf8`);let c=a.dirname(e);s(c,(a,s)=>{if(a)return r(a);if(s)return i.writeFile(e,t,n,r);o.mkdirs(c,a=>{if(a)return r(a);i.writeFile(e,t,n,r)})})}function l(e,...t){let n=a.dirname(e);if(i.existsSync(n))return i.writeFileSync(e,...t);o.mkdirsSync(n),i.writeFileSync(e,...t)}n.exports={outputFile:r(c),outputFileSync:l}})),Oo=/* @__PURE__ */ n(((e,t)=>{let{stringify:n}=z(),{outputFile:r}=Do();async function i(e,t,i={}){let a=n(t,i);await r(e,a,i)}t.exports=i})),ko=/* @__PURE__ */ n(((e,t)=>{let{stringify:n}=z(),{outputFileSync:r}=Do();function i(e,t,i){let a=n(t,i);r(e,a,i)}t.exports=i})),Ao=/* @__PURE__ */ n(((e,t)=>{let n=P().fromPromise,r=Eo();r.outputJson=n(Oo()),r.outputJsonSync=ko(),r.outputJSON=r.outputJson,r.outputJSONSync=r.outputJsonSync,r.writeJSON=r.writeJson,r.writeJSONSync=r.writeJsonSync,r.readJSON=r.readJson,r.readJSONSync=r.readJsonSync,t.exports=r})),jo=/* @__PURE__ */ n(((t,n)=>{let r=R(),i=e(`path`),a=_o().copy,o=vo().remove,s=uo().mkdirp,c=fo().pathExists,l=mo();function u(e,t,n,r){typeof n==`function`&&(r=n,n={}),n||={};let a=n.overwrite||n.clobber||!1;l.checkPaths(e,t,`move`,n,(n,o)=>{if(n)return r(n);let{srcStat:c,isChangingCase:u=!1}=o;l.checkParentPaths(e,c,t,`move`,n=>{if(n)return r(n);if(d(t))return f(e,t,a,u,r);s(i.dirname(t),n=>n?r(n):f(e,t,a,u,r))})})}function d(e){let t=i.dirname(e);return i.parse(t).root===t}function f(e,t,n,r,i){if(r)return p(e,t,n,i);if(n)return o(t,r=>r?i(r):p(e,t,n,i));c(t,(r,a)=>r?i(r):a?i(/* @__PURE__ */ Error(`dest already exists.`)):p(e,t,n,i))}function p(e,t,n,i){r.rename(e,t,r=>r?r.code===`EXDEV`?m(e,t,n,i):i(r):i())}function m(e,t,n,r){a(e,t,{overwrite:n,errorOnExist:!0},t=>t?r(t):o(e,r))}n.exports=u})),Mo=/* @__PURE__ */ n(((t,n)=>{let r=R(),i=e(`path`),a=_o().copySync,o=vo().removeSync,s=uo().mkdirpSync,c=mo();function l(e,t,n){n||={};let r=n.overwrite||n.clobber||!1,{srcStat:a,isChangingCase:o=!1}=c.checkPathsSync(e,t,`move`,n);return c.checkParentPathsSync(e,a,t,`move`),u(t)||s(i.dirname(t)),d(e,t,r,o)}function u(e){let t=i.dirname(e);return i.parse(t).root===t}function d(e,t,n,i){if(i)return f(e,t,n);if(n)return o(t),f(e,t,n);if(r.existsSync(t))throw Error(`dest already exists.`);return f(e,t,n)}function f(e,t,n){try{r.renameSync(e,t)}catch(r){if(r.code!==`EXDEV`)throw r;return p(e,t,n)}}function p(e,t,n){return a(e,t,{overwrite:n,errorOnExist:!0}),o(e)}n.exports=l})),No=/* @__PURE__ */ n(((e,t)=>{let n=P().fromCallback;t.exports={move:n(jo()),moveSync:Mo()}})),Po=/* @__PURE__ */ n(((e,t)=>{t.exports={...so(),..._o(),...yo(),...To(),...Ao(),...uo(),...No(),...Do(),...fo(),...vo()}})),Fo=/* @__PURE__ */ t(Po(),1);async function Io(e,t){return Xa(e,e=>ee(k.join(t,e),`utf-8`))}const Lo=e=>{let t=k.parse(e);return t.ext?t.ext.slice(1):e},Ro=async(e,t)=>{let n=k.join(e,`${t}.json`);return await Fo.default.pathExists(n)?n:null},zo=async e=>{let t=k.join(e,`.mintignore`);return await Fo.default.pathExists(t)?t:null},Bo=async e=>{let t=await zo(e);return t?no(await Fo.default.readFile(t,`utf-8`)):[]},Vo=async(e,t)=>{let n=await Ro(e,t);if(!n)return null;let r=await Fo.default.readFile(n),{resolved:i}=await Io(JSON.parse(r.toString()),e);return i};var Ho=/* @__PURE__ */ n(((t,n)=>{let r=e(`path`),i=`[^\\\\/]`,a=`[^/]`,o=`(?:\\/|$)`,s=`(?:^|\\/)`,c=`\\.{1,2}${o}`,l={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:a,END_ANCHOR:o,DOTS_SLASH:c,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${s}${c})`,NO_DOT_SLASH:`(?!\\.{0,1}${o})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${a}*?`,START_ANCHOR:s},u={...l,SLASH_LITERAL:`[\\\\/]`,QMARK:i,STAR:`${i}*?`,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:`(?:[\\\\/]|$)`};n.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,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,SEP:r.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?u:l}}})),Uo=/* @__PURE__ */ n((t=>{let n=e(`path`),r=process.platform===`win32`,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:a,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:s}=Ho();t.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),t.hasRegexChars=e=>o.test(e),t.isRegexChar=e=>e.length===1&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(s,`\\$1`),t.toPosixSlashes=e=>e.replace(i,`/`),t.removeBackslashes=e=>e.replace(a,e=>e===`\\`?``:e),t.supportsLookbehinds=()=>{let e=process.version.slice(1).split(`.`).map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10},t.isWindows=e=>e&&typeof e.windows==`boolean`?e.windows:r===!0||n.sep===`\\`,t.escapeLast=(e,n,r)=>{let i=e.lastIndexOf(n,r);return i===-1?e:e[i-1]===`\\`?t.escapeLast(e,n,i-1):`${e.slice(0,i)}\\${e.slice(i)}`},t.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},t.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r}})),Wo=/* @__PURE__ */ n(((e,t)=>{let n=Uo(),{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:_}=Ho(),v=e=>e===l||e===a,y=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let b=t||{},x=e.length-1,S=b.parts===!0||b.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,A=!1,ee=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,L=!1,R=!1,z=0,B,V,H={value:``,depth:0,isGlob:!1},te=()=>D>=x,U=()=>E.charCodeAt(D+1),W=()=>(B=V,E.charCodeAt(++D));for(;D<x;){V=W();let e;if(V===a)F=H.backslashes=!0,V=W(),V===u&&(P=!0);else{if(P===!0||V===u){for(z++;te()!==!0&&(V=W());)if(V===a)F=H.backslashes=!0,W();else if(V===u)z++;else{if(P!==!0&&V===s&&(V=W())===s||P!==!0&&V===o){if(A=H.isBrace=!0,j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===h&&(z--,z===0)){P=!1,A=H.isBrace=!0,R=!0;break}}if(S===!0)continue;break}if(V===l){if(C.push(D),w.push(H),H={value:``,depth:0,isGlob:!1},R===!0)continue;if(B===s&&D===O+1){O+=2;continue}k=D+1}else{if(b.noext!==!0&&(V===p||V===i||V===r||V===m||V===c)&&U()===d){if(j=H.isGlob=!0,M=H.isExtglob=!0,R=!0,V===c&&D===O&&(L=!0),S===!0){for(;te()!==!0&&(V=W());)if(V===a)F=H.backslashes=!0,V=W();else if(V===g){j=H.isGlob=!0,R=!0;break}continue}break}if(V===r){if(B===r&&(N=H.isGlobstar=!0),j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===m){if(j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===f){for(;te()!==!0&&(e=W());)if(e===a)F=H.backslashes=!0,W();else if(e===_){ee=H.isBracket=!0,j=H.isGlob=!0,R=!0;break}if(S===!0)continue;break}if(b.nonegate!==!0&&V===c&&D===O)I=H.negated=!0,O++;else{if(b.noparen!==!0&&V===d){if(j=H.isGlob=!0,S===!0){for(;te()!==!0&&(V=W());)if(V===d)F=H.backslashes=!0,V=W();else if(V===g){R=!0;break}continue}break}if(j===!0){if(R=!0,S===!0)continue;break}}}}}b.noext===!0&&(M=!1,j=!1);let G=E,K=``,q=``;O>0&&(K=E.slice(0,O),E=E.slice(O),k-=O),G&&j===!0&&k>0?(G=E.slice(0,k),q=E.slice(k)):j===!0?(G=``,q=E):G=E,G&&G!==``&&G!==`/`&&G!==E&&v(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),b.unescape===!0&&(q&&=n.removeBackslashes(q),G&&F===!0&&(G=n.removeBackslashes(G)));let ne={prefix:K,input:e,start:O,base:G,glob:q,isBrace:A,isBracket:ee,isGlob:j,isExtglob:M,isGlobstar:N,negated:I,negatedExtglob:L};if(b.tokens===!0&&(ne.maxDepth=0,v(V)||w.push(H),ne.tokens=w),b.parts===!0||b.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);b.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=K):w[n].value=a,y(w[n]),ne.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),b.tokens&&(w[w.length-1].value=n,y(w[w.length-1]),ne.maxDepth+=w[w.length-1].depth)}ne.slashes=C,ne.parts=T}return ne}})),Go=/* @__PURE__ */ n(((e,t)=>{let n=Ho(),r=Uo(),{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;else if(s===`\\`)a+=s,o=!0;else if(s===`"`)i=i===1?0:1,a+=s;else{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;else if(n===`\\`)t=!0;else 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;else if(s===`\\`)a=!0;else if(s===`"`)i=i===1?0:1;else if(i!==1){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(!(n>0)){if(s===`(`)r++;else 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(``)}]`}*`},_=e=>{let t=0,n=e.trim(),r=h(n);for(;r;)t++,n=r.body.trim(),r=h(n);return t},v=(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(_(e)>r)return{risky:!0}}return{risky:!1}},y=(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?``:`?:`,_=r.isWindows(t),b=n.globChars(_),x=n.extglobChars(b),{DOT_LITERAL:S,PLUS_LITERAL:C,SLASH_LITERAL:w,ONE_CHAR:T,DOTS_SLASH:E,NO_DOT:D,NO_DOT_SLASH:O,NO_DOTS_SLASH:k,QMARK:A,QMARK_NO_DOT:ee,STAR:j,START_ANCHOR:M}=b,N=e=>`(${g}(?:(?!${M}${e.dot?E:S}).)*?)`,P=d.dot?``:D,F=d.dot?A:ee,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,te=()=>L.index===p-1,U=L.peek=(t=1)=>e[L.index+t],W=L.advance=()=>e[++L.index]||``,G=()=>e.slice(L.index+1),K=(e=``,t=0)=>{L.consumed+=e,L.index+=t},q=e=>{L.output+=e.output==null?e.value:e.output,K(e.value)},ne=()=>{let e=1;for(;U()===`!`&&(U(2)!==`(`||U(3)===`?`);)W(),L.start++,e++;return e%2!=0&&(L.negated=!0,L.start++,!0)},re=e=>{L[e]++,B.push(e)},ie=e=>{L[e]--,B.pop()},J=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)}R.length&&e.type!==`paren`&&(R[R.length-1].inner+=e.value),(e.value||e.output)&&q(e),V&&V.type===`text`&&e.type===`text`?(V.value+=e.value,V.output=(V.output||``)+e.value):(e.prev=V,h.push(e),V=e)},ae=(e,t)=>{let n={...x[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;re(`parens`),J({type:e,value:t,output:L.output?``:T}),J({type:`paren`,extglob:!0,value:W(),output:r}),R.push(n)},oe=n=>{let i=e.slice(n.startIndex,L.index+1),a=e.slice(n.startIndex+2,L.index),o=v(a,d);if((n.type===`plus`||n.type===`star`)&&o.risky){let e=o.safeOutput?(n.output?``:T)+(d.capture?`(${o.safeOutput})`:o.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,J({type:`paren`,extglob:!0,value:H,output:``}),ie(`parens`);return}let s=n.close+(d.capture?`)`:``),c;if(n.type===`negate`){let e=I;n.inner&&n.inner.length>1&&n.inner.includes(`/`)&&(e=N(d)),(e!==I||te()||/^\)+$/.test(G()))&&(s=n.close=`)$))${e}`),n.inner.includes(`*`)&&(c=G())&&/^\.[^\\/.]+$/.test(c)&&(s=n.close=`)${y(c,{...t,fastpaths:!1}).output})${e})`),n.prev.type===`bos`&&(L.negatedExtglob=!0)}J({type:`paren`,extglob:!0,value:H,output:s}),ie(`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?A.repeat(a.length):``):o===0?F+(a?A.repeat(a.length):``):A.repeat(r.length):i===`.`?S.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(;!te();){if(H=W(),H===`\0`)continue;if(H===`\\`){let e=U();if(e===`/`&&d.bash!==!0||e===`.`||e===`;`)continue;if(!e){H+=`\\`,J({type:`text`,value:H});continue}let t=/^\\+/.exec(G()),n=0;if(t&&t[0].length>2&&(n=t[0].length,L.index+=n,n%2!=0&&(H+=`\\`)),d.unescape===!0?H=W():H+=W(),L.brackets===0){J({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=V.value.slice(e+2),r=a[n];if(r){V.value=t+r,L.backtrack=!0,W(),!m.output&&h.indexOf(V)===1&&(m.output=T);continue}}}(H===`[`&&U()!==`:`||H===`-`&&U()===`]`)&&(H=`\\${H}`),H===`]`&&(V.value===`[`||V.value===`[^`)&&(H=`\\${H}`),d.posix===!0&&H===`!`&&V.value===`[`&&(H=`^`),V.value+=H,q({value:H});continue}if(L.quotes===1&&H!==`"`){H=r.escapeRegex(H),V.value+=H,q({value:H});continue}if(H===`"`){L.quotes=L.quotes===1?0:1,d.keepQuotes===!0&&J({type:`text`,value:H});continue}if(H===`(`){re(`parens`),J({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){oe(R.pop());continue}J({type:`paren`,value:H,output:L.parens?`)`:`\\)`}),ie(`parens`);continue}if(H===`[`){if(d.nobracket===!0||!G().includes(`]`)){if(d.nobracket!==!0&&d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));H=`\\${H}`}else re(`brackets`);J({type:`bracket`,value:H});continue}if(H===`]`){if(d.nobracket===!0||V&&V.type===`bracket`&&V.value.length===1){J({type:`text`,value:H,output:`\\${H}`});continue}if(L.brackets===0){if(d.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));J({type:`text`,value:H,output:`\\${H}`});continue}ie(`brackets`);let e=V.value.slice(1);if(V.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(H=`/${H}`),V.value+=H,q({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){re(`braces`);let e={type:`brace`,value:H,output:`(`,outputIndex:L.output.length,tokensIndex:L.tokens.length};z.push(e),J(e);continue}if(H===`}`){let e=z[z.length-1];if(d.nobrace===!0||!e){J({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}J({type:`brace`,value:H,output:t}),ie(`braces`),z.pop();continue}if(H===`|`){R.length>0&&R[R.length-1].conditions++,J({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=`|`),J({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}J({type:`slash`,value:H,output:w});continue}if(H===`.`){if(L.braces>0&&V.type===`dot`){V.value===`.`&&(V.output=S);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`){J({type:`text`,value:H,output:S});continue}J({type:`dot`,value:H,output:S});continue}if(H===`?`){if(!(V&&V.value===`(`)&&d.noextglob!==!0&&U()===`(`&&U(2)!==`?`){ae(`qmark`,H);continue}if(V&&V.type===`paren`){let e=U(),t=H;if(e===`<`&&!r.supportsLookbehinds())throw Error(`Node.js v10 or higher is required for regex lookbehinds`);(V.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(G()))&&(t=`\\${H}`),J({type:`text`,value:H,output:t});continue}if(d.dot!==!0&&(V.type===`slash`||V.type===`bos`)){J({type:`qmark`,value:H,output:ee});continue}J({type:`qmark`,value:H,output:A});continue}if(H===`!`){if(d.noextglob!==!0&&U()===`(`&&(U(2)!==`?`||!/[!=<:]/.test(U(3)))){ae(`negate`,H);continue}if(d.nonegate!==!0&&L.index===0){ne();continue}}if(H===`+`){if(d.noextglob!==!0&&U()===`(`&&U(2)!==`?`){ae(`plus`,H);continue}if(V&&V.value===`(`||d.regex===!1){J({type:`plus`,value:H,output:C});continue}if(V&&(V.type===`bracket`||V.type===`paren`||V.type===`brace`)||L.parens>0){J({type:`plus`,value:H});continue}J({type:`plus`,value:C});continue}if(H===`@`){if(d.noextglob!==!0&&U()===`(`&&U(2)!==`?`){J({type:`at`,extglob:!0,value:H,output:``});continue}J({type:`text`,value:H});continue}if(H!==`*`){(H===`$`||H===`^`)&&(H=`\\${H}`);let e=o.exec(G());e&&(H+=e[0],L.index+=e[0].length),J({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,K(H);continue}let t=G();if(d.noextglob!==!0&&/^\([^?]/.test(t)){ae(`star`,H);continue}if(V.type===`star`){if(d.noglobstar===!0){K(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]!==`/`)){J({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){J({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),K(`/**`,3)}if(n.type===`bos`&&te()){V.type=`globstar`,V.value+=H,V.output=N(d),L.output=V.output,L.globstar=!0,K(H);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&te()){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,K(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)}${w}|${w}${e})`,V.value+=H,L.output+=n.output+V.output,L.globstar=!0,K(H+W()),J({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){V.type=`globstar`,V.value+=H,V.output=`(?:^|${w}|${N(d)}${w})`,L.output=V.output,L.globstar=!0,K(H+W()),J({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,K(H);continue}let n={type:`star`,value:H,output:I};d.bash===!0?(n.output=`.*?`,(V.type===`bos`||V.type===`slash`)&&(n.output=P+n.output),J(n)):V&&(V.type===`bracket`||V.type===`paren`)&&d.regex===!0?(n.output=H,J(n)):((L.index===L.start||V.type===`slash`||V.type===`dot`)&&(V.type===`dot`?(L.output+=O,V.output+=O):d.dot===!0?(L.output+=k,V.output+=k):(L.output+=P,V.output+=P),U()!==`*`&&(L.output+=T,V.output+=T)),J(n))}for(;L.brackets>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));L.output=r.escapeLast(L.output,`[`),ie(`brackets`)}for(;L.parens>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));L.output=r.escapeLast(L.output,`(`),ie(`parens`)}for(;L.braces>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));L.output=r.escapeLast(L.output,`{`),ie(`braces`)}if(d.strictSlashes!==!0&&(V.type===`star`||V.type===`bracket`)&&J({type:`maybe_slash`,value:``,output:`${w}?`}),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};y.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 l=r.isWindows(t),{DOT_LITERAL:u,SLASH_LITERAL:d,ONE_CHAR:f,DOTS_SLASH:p,NO_DOT:m,NO_DOTS:h,NO_DOTS_SLASH:g,STAR:_,START_ANCHOR:v}=n.globChars(l),y=a.dot?h:m,b=a.dot?g:m,x=a.capture?``:`?:`,S={negated:!1,prefix:``},C=a.bash===!0?`.*?`:_;a.capture&&(C=`(${C})`);let w=e=>e.noglobstar===!0?C:`(${x}(?:(?!${v}${e.dot?p:u}).)*?)`,T=e=>{switch(e){case`*`:return`${y}${f}${C}`;case`.*`:return`${u}${f}${C}`;case`*.*`:return`${y}${C}${u}${f}${C}`;case`*/*`:return`${y}${C}${d}${f}${b}${C}`;case`**`:return y+w(a);case`**/*`:return`(?:${y}${w(a)}${d})?${b}${f}${C}`;case`**/*.*`:return`(?:${y}${w(a)}${d})?${b}${C}${u}${f}${C}`;case`**/.*`:return`(?:${y}${w(a)}${d})?${u}${f}${C}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=T(t[1]);return n?n+u+t[2]:void 0}}},E=T(r.removePrefix(e,S));return E&&a.strictSlashes!==!0&&(E+=`${d}?`),E},t.exports=y})),Ko=/* @__PURE__ */ n(((t,n)=>{let r=e(`path`),i=Wo(),a=Go(),o=Uo(),s=Ho(),c=e=>e&&typeof e==`object`&&!Array.isArray(e),l=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>l(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=c(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=o.isWindows(t),s=r?l.compileRe(e,t):l.makeRe(e,t,!1,!0),u=s.state;delete s.state;let d=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};d=l(i.ignore,e,n)}let f=(n,r=!1)=>{let{isMatch:o,match:c,output:f}=l.test(n,s,t,{glob:e,posix:a}),p={glob:e,state:u,regex:s,posix:a,input:n,output:f,match:c,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):d(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),!r||p)};return n&&(f.state=u),f};l.test=(e,t,n,{glob:r,posix:i}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let a=n||{},s=a.format||(i?o.toPosixSlashes:null),c=e===r,u=c&&s?s(e):e;return c===!1&&(u=s?s(e):e,c=u===r),(c===!1||a.capture===!0)&&(c=a.matchBase===!0||a.basename===!0?l.matchBase(e,t,n,i):t.exec(u)),{isMatch:!!c,match:c,output:u}},l.matchBase=(e,t,n,i=o.isWindows(n))=>(t instanceof RegExp?t:l.makeRe(t,n)).test(r.basename(e)),l.isMatch=(e,t,n)=>l(t,n)(e),l.parse=(e,t)=>Array.isArray(e)?e.map(e=>l.parse(e,t)):a(e,{...t,fastpaths:!1}),l.scan=(e,t)=>i(e,t),l.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,s=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(s=`^(?!${s}).*$`);let c=l.toRegex(s,t);return r===!0&&(c.state=e),c},l.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let i={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(i.output=a.fastpaths(e,t)),i.output||(i=a(e,t)),l.compileRe(i,t,n,r)},l.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/$^/}},l.constants=s,n.exports=l})),qo=/* @__PURE__ */ n(((e,t)=>{t.exports=Ko()})),Jo=/* @__PURE__ */ n(((t,n)=>{let r=e(`fs`),{Readable:i}=e(`stream`),a=e(`path`),{promisify:o}=e(`util`),s=qo(),c=o(r.readdir),l=o(r.stat),u=o(r.lstat),d=o(r.realpath),f=`READDIRP_RECURSIVE_ERROR`,p=/* @__PURE__ */ new Set([`ENOENT`,`EPERM`,`EACCES`,`ELOOP`,f]),m=`files`,h=`directories`,g=`files_directories`,_=[m,h,g,`all`],v=e=>p.has(e.code),[y,b]=process.versions.node.split(`.`).slice(0,2).map(e=>Number.parseInt(e,10)),x=process.platform===`win32`&&(y>10||y===10&&b>=5),S=e=>{if(e!==void 0){if(typeof e==`function`)return e;if(typeof e==`string`){let t=s(e.trim());return e=>t(e.basename)}if(Array.isArray(e)){let t=[],n=[];for(let r of e){let e=r.trim();e.charAt(0)===`!`?n.push(s(e.slice(1))):t.push(s(e))}return n.length>0?t.length>0?e=>t.some(t=>t(e.basename))&&!n.some(t=>t(e.basename)):e=>!n.some(t=>t(e.basename)):e=>t.some(t=>t(e.basename))}}};var C=class e extends i{static get defaultOptions(){return{root:`.`,fileFilter:e=>!0,directoryFilter:e=>!0,type:m,lstat:!1,depth:2147483648,alwaysStat:!1}}constructor(t={}){super({objectMode:!0,autoDestroy:!0,highWaterMark:t.highWaterMark||4096});let n={...e.defaultOptions,...t},{root:i,type:o}=n;this._fileFilter=S(n.fileFilter),this._directoryFilter=S(n.directoryFilter);let s=n.lstat?u:l;this._stat=x?e=>s(e,{bigint:!0}):s,this._maxDepth=n.depth,this._wantsDir=[h,g,`all`].includes(o),this._wantsFile=[m,g,`all`].includes(o),this._wantsEverything=o===`all`,this._root=a.resolve(i),this._isDirent=`Dirent`in r&&!n.alwaysStat,this._statsProp=this._isDirent?`dirent`:`stats`,this._rdOptions={encoding:`utf8`,withFileTypes:this._isDirent},this.parents=[this._exploreDir(i,1)],this.reading=!1,this.parent=void 0}async _read(e){if(!this.reading){this.reading=!0;try{for(;!this.destroyed&&e>0;){let{path:t,depth:n,files:r=[]}=this.parent||{};if(r.length>0){let i=r.splice(0,e).map(e=>this._formatEntry(e,t));for(let t of await Promise.all(i)){if(this.destroyed)return;let r=await this._getEntryType(t);r===`directory`&&this._directoryFilter(t)?(n<=this._maxDepth&&this.parents.push(this._exploreDir(t.fullPath,n+1)),this._wantsDir&&(this.push(t),e--)):(r===`file`||this._includeAsFile(t))&&this._fileFilter(t)&&this._wantsFile&&(this.push(t),e--)}}else{let e=this.parents.pop();if(!e){this.push(null);break}if(this.parent=await e,this.destroyed)return}}}catch(e){this.destroy(e)}finally{this.reading=!1}}}async _exploreDir(e,t){let n;try{n=await c(e,this._rdOptions)}catch(e){this._onError(e)}return{files:n,depth:t,path:e}}async _formatEntry(e,t){let n;try{let r=this._isDirent?e.name:e,i=a.resolve(a.join(t,r));n={path:a.relative(this._root,i),fullPath:i,basename:r},n[this._statsProp]=this._isDirent?e:await this._stat(i)}catch(e){this._onError(e)}return n}_onError(e){v(e)&&!this.destroyed?this.emit(`warn`,e):this.destroy(e)}async _getEntryType(e){let t=e&&e[this._statsProp];if(t){if(t.isFile())return`file`;if(t.isDirectory())return`directory`;if(t&&t.isSymbolicLink()){let t=e.fullPath;try{let e=await d(t),n=await u(e);if(n.isFile())return`file`;if(n.isDirectory()){let n=e.length;if(t.startsWith(e)&&t.substr(n,1)===a.sep){let n=/* @__PURE__ */ Error(`Circular symlink detected: "${t}" points to "${e}"`);return n.code=f,this._onError(n)}return`directory`}}catch(e){this._onError(e)}}}}_includeAsFile(e){let t=e&&e[this._statsProp];return t&&this._wantsEverything&&!t.isDirectory()}};let w=(e,t={})=>{let n=t.entryType||t.type;if(n===`both`&&(n=g),n&&(t.type=n),!e)throw Error(`readdirp: root argument is required. Usage: readdirp(root, options)`);if(typeof e!=`string`)throw TypeError(`readdirp: root argument must be a string. Usage: readdirp(root, options)`);if(n&&!_.includes(n))throw Error(`readdirp: Invalid type passed. Use one of ${_.join(`, `)}`);return t.root=e,new C(t)};w.promise=(e,t={})=>new Promise((n,r)=>{let i=[];w(e,t).on(`data`,e=>i.push(e)).on(`end`,()=>n(i)).on(`error`,e=>r(e))}),w.ReaddirpStream=C,w.default=w,n.exports=w})),Yo=/* @__PURE__ */ n(((t,n)=>{let r=e(`path`),i=`[^\\\\/]`,a=`[^/]`,o=`(?:\\/|$)`,s=`(?:^|\\/)`,c=`\\.{1,2}${o}`,l={DOT_LITERAL:`\\.`,PLUS_LITERAL:`\\+`,QMARK_LITERAL:`\\?`,SLASH_LITERAL:`\\/`,ONE_CHAR:`(?=.)`,QMARK:a,END_ANCHOR:o,DOTS_SLASH:c,NO_DOT:`(?!\\.)`,NO_DOTS:`(?!${s}${c})`,NO_DOT_SLASH:`(?!\\.{0,1}${o})`,NO_DOTS_SLASH:`(?!${c})`,QMARK_NO_DOT:`[^.\\/]`,STAR:`${a}*?`,START_ANCHOR:s},u={...l,SLASH_LITERAL:`[\\\\/]`,QMARK:i,STAR:`${i}*?`,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:`(?:[\\\\/]|$)`};n.exports={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,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,SEP:r.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?u:l}}})),Xo=/* @__PURE__ */ n((t=>{let n=e(`path`),r=process.platform===`win32`,{REGEX_BACKSLASH:i,REGEX_REMOVE_BACKSLASH:a,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:s}=Yo();t.isObject=e=>typeof e==`object`&&!!e&&!Array.isArray(e),t.hasRegexChars=e=>o.test(e),t.isRegexChar=e=>e.length===1&&t.hasRegexChars(e),t.escapeRegex=e=>e.replace(s,`\\$1`),t.toPosixSlashes=e=>e.replace(i,`/`),t.removeBackslashes=e=>e.replace(a,e=>e===`\\`?``:e),t.supportsLookbehinds=()=>{let e=process.version.slice(1).split(`.`).map(Number);return e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10},t.isWindows=e=>e&&typeof e.windows==`boolean`?e.windows:r===!0||n.sep===`\\`,t.escapeLast=(e,n,r)=>{let i=e.lastIndexOf(n,r);return i===-1?e:e[i-1]===`\\`?t.escapeLast(e,n,i-1):`${e.slice(0,i)}\\${e.slice(i)}`},t.removePrefix=(e,t={})=>{let n=e;return n.startsWith(`./`)&&(n=n.slice(2),t.prefix=`./`),n},t.wrapOutput=(e,t={},n={})=>{let r=`${n.contains?``:`^`}(?:${e})${n.contains?``:`$`}`;return t.negated===!0&&(r=`(?:^(?!${r}).*$)`),r}})),Zo=/* @__PURE__ */ n(((e,t)=>{let n=Xo(),{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:_}=Yo(),v=e=>e===l||e===a,y=e=>{e.isPrefix!==!0&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let b=t||{},x=e.length-1,S=b.parts===!0||b.scanToEnd===!0,C=[],w=[],T=[],E=e,D=-1,O=0,k=0,A=!1,ee=!1,j=!1,M=!1,N=!1,P=!1,F=!1,I=!1,L=!1,R=!1,z=0,B,V,H={value:``,depth:0,isGlob:!1},te=()=>D>=x,U=()=>E.charCodeAt(D+1),W=()=>(B=V,E.charCodeAt(++D));for(;D<x;){V=W();let e;if(V===a)F=H.backslashes=!0,V=W(),V===u&&(P=!0);else{if(P===!0||V===u){for(z++;te()!==!0&&(V=W());)if(V===a)F=H.backslashes=!0,W();else if(V===u)z++;else{if(P!==!0&&V===s&&(V=W())===s||P!==!0&&V===o){if(A=H.isBrace=!0,j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===h&&(z--,z===0)){P=!1,A=H.isBrace=!0,R=!0;break}}if(S===!0)continue;break}if(V===l){if(C.push(D),w.push(H),H={value:``,depth:0,isGlob:!1},R===!0)continue;if(B===s&&D===O+1){O+=2;continue}k=D+1}else{if(b.noext!==!0&&(V===p||V===i||V===r||V===m||V===c)&&U()===d){if(j=H.isGlob=!0,M=H.isExtglob=!0,R=!0,V===c&&D===O&&(L=!0),S===!0){for(;te()!==!0&&(V=W());)if(V===a)F=H.backslashes=!0,V=W();else if(V===g){j=H.isGlob=!0,R=!0;break}continue}break}if(V===r){if(B===r&&(N=H.isGlobstar=!0),j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===m){if(j=H.isGlob=!0,R=!0,S===!0)continue;break}if(V===f){for(;te()!==!0&&(e=W());)if(e===a)F=H.backslashes=!0,W();else if(e===_){ee=H.isBracket=!0,j=H.isGlob=!0,R=!0;break}if(S===!0)continue;break}if(b.nonegate!==!0&&V===c&&D===O)I=H.negated=!0,O++;else{if(b.noparen!==!0&&V===d){if(j=H.isGlob=!0,S===!0){for(;te()!==!0&&(V=W());)if(V===d)F=H.backslashes=!0,V=W();else if(V===g){R=!0;break}continue}break}if(j===!0){if(R=!0,S===!0)continue;break}}}}}b.noext===!0&&(M=!1,j=!1);let G=E,K=``,q=``;O>0&&(K=E.slice(0,O),E=E.slice(O),k-=O),G&&j===!0&&k>0?(G=E.slice(0,k),q=E.slice(k)):j===!0?(G=``,q=E):G=E,G&&G!==``&&G!==`/`&&G!==E&&v(G.charCodeAt(G.length-1))&&(G=G.slice(0,-1)),b.unescape===!0&&(q&&=n.removeBackslashes(q),G&&F===!0&&(G=n.removeBackslashes(G)));let ne={prefix:K,input:e,start:O,base:G,glob:q,isBrace:A,isBracket:ee,isGlob:j,isExtglob:M,isGlobstar:N,negated:I,negatedExtglob:L};if(b.tokens===!0&&(ne.maxDepth=0,v(V)||w.push(H),ne.tokens=w),b.parts===!0||b.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);b.tokens&&(n===0&&O!==0?(w[n].isPrefix=!0,w[n].value=K):w[n].value=a,y(w[n]),ne.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),b.tokens&&(w[w.length-1].value=n,y(w[w.length-1]),ne.maxDepth+=w[w.length-1].depth)}ne.slashes=C,ne.parts=T}return ne}})),Qo=/* @__PURE__ */ n(((e,t)=>{let n=Yo(),r=Xo(),{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;else if(s===`\\`)a+=s,o=!0;else if(s===`"`)i=i===1?0:1,a+=s;else{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;else if(n===`\\`)t=!0;else 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;else if(s===`\\`)a=!0;else if(s===`"`)i=i===1?0:1;else if(i!==1){if(s===`[`)n++;else if(s===`]`&&n>0)n--;else if(!(n>0)){if(s===`(`)r++;else 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(``)}]`}*`},_=e=>{let t=0,n=e.trim(),r=h(n);for(;r;)t++,n=r.body.trim(),r=h(n);return t},v=(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(_(e)>r)return{risky:!0}}return{risky:!1}},y=(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?``:`?:`,_=r.isWindows(t),b=n.globChars(_),x=n.extglobChars(b),{DOT_LITERAL:S,PLUS_LITERAL:C,SLASH_LITERAL:w,ONE_CHAR:T,DOTS_SLASH:E,NO_DOT:D,NO_DOT_SLASH:O,NO_DOTS_SLASH:k,QMARK:A,QMARK_NO_DOT:ee,STAR:j,START_ANCHOR:M}=b,N=e=>`(${g}(?:(?!${M}${e.dot?E:S}).)*?)`,P=d.dot?``:D,F=d.dot?A:ee,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,te=()=>L.index===p-1,U=L.peek=(t=1)=>e[L.index+t],W=L.advance=()=>e[++L.index]||``,G=()=>e.slice(L.index+1),K=(e=``,t=0)=>{L.consumed+=e,L.index+=t},q=e=>{L.output+=e.output==null?e.value:e.output,K(e.value)},ne=()=>{let e=1;for(;U()===`!`&&(U(2)!==`(`||U(3)===`?`);)W(),L.start++,e++;return e%2!=0&&(L.negated=!0,L.start++,!0)},re=e=>{L[e]++,B.push(e)},ie=e=>{L[e]--,B.pop()},J=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)}R.length&&e.type!==`paren`&&(R[R.length-1].inner+=e.value),(e.value||e.output)&&q(e),V&&V.type===`text`&&e.type===`text`?(V.value+=e.value,V.output=(V.output||``)+e.value):(e.prev=V,h.push(e),V=e)},ae=(e,t)=>{let n={...x[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;re(`parens`),J({type:e,value:t,output:L.output?``:T}),J({type:`paren`,extglob:!0,value:W(),output:r}),R.push(n)},oe=n=>{let i=e.slice(n.startIndex,L.index+1),a=e.slice(n.startIndex+2,L.index),o=v(a,d);if((n.type===`plus`||n.type===`star`)&&o.risky){let e=o.safeOutput?(n.output?``:T)+(d.capture?`(${o.safeOutput})`:o.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,J({type:`paren`,extglob:!0,value:H,output:``}),ie(`parens`);return}let s=n.close+(d.capture?`)`:``),c;if(n.type===`negate`){let e=I;n.inner&&n.inner.length>1&&n.inner.includes(`/`)&&(e=N(d)),(e!==I||te()||/^\)+$/.test(G()))&&(s=n.close=`)$))${e}`),n.inner.includes(`*`)&&(c=G())&&/^\.[^\\/.]+$/.test(c)&&(s=n.close=`)${y(c,{...t,fastpaths:!1}).output})${e})`),n.prev.type===`bos`&&(L.negatedExtglob=!0)}J({type:`paren`,extglob:!0,value:H,output:s}),ie(`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?A.repeat(a.length):``):o===0?F+(a?A.repeat(a.length):``):A.repeat(r.length):i===`.`?S.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(;!te();){if(H=W(),H===`\0`)continue;if(H===`\\`){let e=U();if(e===`/`&&d.bash!==!0||e===`.`||e===`;`)continue;if(!e){H+=`\\`,J({type:`text`,value:H});continue}let t=/^\\+/.exec(G()),n=0;if(t&&t[0].length>2&&(n=t[0].length,L.index+=n,n%2!=0&&(H+=`\\`)),d.unescape===!0?H=W():H+=W(),L.brackets===0){J({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=V.value.slice(e+2),r=a[n];if(r){V.value=t+r,L.backtrack=!0,W(),!m.output&&h.indexOf(V)===1&&(m.output=T);continue}}}(H===`[`&&U()!==`:`||H===`-`&&U()===`]`)&&(H=`\\${H}`),H===`]`&&(V.value===`[`||V.value===`[^`)&&(H=`\\${H}`),d.posix===!0&&H===`!`&&V.value===`[`&&(H=`^`),V.value+=H,q({value:H});continue}if(L.quotes===1&&H!==`"`){H=r.escapeRegex(H),V.value+=H,q({value:H});continue}if(H===`"`){L.quotes=L.quotes===1?0:1,d.keepQuotes===!0&&J({type:`text`,value:H});continue}if(H===`(`){re(`parens`),J({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){oe(R.pop());continue}J({type:`paren`,value:H,output:L.parens?`)`:`\\)`}),ie(`parens`);continue}if(H===`[`){if(d.nobracket===!0||!G().includes(`]`)){if(d.nobracket!==!0&&d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));H=`\\${H}`}else re(`brackets`);J({type:`bracket`,value:H});continue}if(H===`]`){if(d.nobracket===!0||V&&V.type===`bracket`&&V.value.length===1){J({type:`text`,value:H,output:`\\${H}`});continue}if(L.brackets===0){if(d.strictBrackets===!0)throw SyntaxError(u(`opening`,`[`));J({type:`text`,value:H,output:`\\${H}`});continue}ie(`brackets`);let e=V.value.slice(1);if(V.posix!==!0&&e[0]===`^`&&!e.includes(`/`)&&(H=`/${H}`),V.value+=H,q({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){re(`braces`);let e={type:`brace`,value:H,output:`(`,outputIndex:L.output.length,tokensIndex:L.tokens.length};z.push(e),J(e);continue}if(H===`}`){let e=z[z.length-1];if(d.nobrace===!0||!e){J({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}J({type:`brace`,value:H,output:t}),ie(`braces`),z.pop();continue}if(H===`|`){R.length>0&&R[R.length-1].conditions++,J({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=`|`),J({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}J({type:`slash`,value:H,output:w});continue}if(H===`.`){if(L.braces>0&&V.type===`dot`){V.value===`.`&&(V.output=S);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`){J({type:`text`,value:H,output:S});continue}J({type:`dot`,value:H,output:S});continue}if(H===`?`){if(!(V&&V.value===`(`)&&d.noextglob!==!0&&U()===`(`&&U(2)!==`?`){ae(`qmark`,H);continue}if(V&&V.type===`paren`){let e=U(),t=H;if(e===`<`&&!r.supportsLookbehinds())throw Error(`Node.js v10 or higher is required for regex lookbehinds`);(V.value===`(`&&!/[!=<:]/.test(e)||e===`<`&&!/<([!=]|\w+>)/.test(G()))&&(t=`\\${H}`),J({type:`text`,value:H,output:t});continue}if(d.dot!==!0&&(V.type===`slash`||V.type===`bos`)){J({type:`qmark`,value:H,output:ee});continue}J({type:`qmark`,value:H,output:A});continue}if(H===`!`){if(d.noextglob!==!0&&U()===`(`&&(U(2)!==`?`||!/[!=<:]/.test(U(3)))){ae(`negate`,H);continue}if(d.nonegate!==!0&&L.index===0){ne();continue}}if(H===`+`){if(d.noextglob!==!0&&U()===`(`&&U(2)!==`?`){ae(`plus`,H);continue}if(V&&V.value===`(`||d.regex===!1){J({type:`plus`,value:H,output:C});continue}if(V&&(V.type===`bracket`||V.type===`paren`||V.type===`brace`)||L.parens>0){J({type:`plus`,value:H});continue}J({type:`plus`,value:C});continue}if(H===`@`){if(d.noextglob!==!0&&U()===`(`&&U(2)!==`?`){J({type:`at`,extglob:!0,value:H,output:``});continue}J({type:`text`,value:H});continue}if(H!==`*`){(H===`$`||H===`^`)&&(H=`\\${H}`);let e=o.exec(G());e&&(H+=e[0],L.index+=e[0].length),J({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,K(H);continue}let t=G();if(d.noextglob!==!0&&/^\([^?]/.test(t)){ae(`star`,H);continue}if(V.type===`star`){if(d.noglobstar===!0){K(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]!==`/`)){J({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){J({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),K(`/**`,3)}if(n.type===`bos`&&te()){V.type=`globstar`,V.value+=H,V.output=N(d),L.output=V.output,L.globstar=!0,K(H);continue}if(n.type===`slash`&&n.prev.type!==`bos`&&!a&&te()){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,K(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)}${w}|${w}${e})`,V.value+=H,L.output+=n.output+V.output,L.globstar=!0,K(H+W()),J({type:`slash`,value:`/`,output:``});continue}if(n.type===`bos`&&t[0]===`/`){V.type=`globstar`,V.value+=H,V.output=`(?:^|${w}|${N(d)}${w})`,L.output=V.output,L.globstar=!0,K(H+W()),J({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,K(H);continue}let n={type:`star`,value:H,output:I};d.bash===!0?(n.output=`.*?`,(V.type===`bos`||V.type===`slash`)&&(n.output=P+n.output),J(n)):V&&(V.type===`bracket`||V.type===`paren`)&&d.regex===!0?(n.output=H,J(n)):((L.index===L.start||V.type===`slash`||V.type===`dot`)&&(V.type===`dot`?(L.output+=O,V.output+=O):d.dot===!0?(L.output+=k,V.output+=k):(L.output+=P,V.output+=P),U()!==`*`&&(L.output+=T,V.output+=T)),J(n))}for(;L.brackets>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`]`));L.output=r.escapeLast(L.output,`[`),ie(`brackets`)}for(;L.parens>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`)`));L.output=r.escapeLast(L.output,`(`),ie(`parens`)}for(;L.braces>0;){if(d.strictBrackets===!0)throw SyntaxError(u(`closing`,`}`));L.output=r.escapeLast(L.output,`{`),ie(`braces`)}if(d.strictSlashes!==!0&&(V.type===`star`||V.type===`bracket`)&&J({type:`maybe_slash`,value:``,output:`${w}?`}),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};y.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 l=r.isWindows(t),{DOT_LITERAL:u,SLASH_LITERAL:d,ONE_CHAR:f,DOTS_SLASH:p,NO_DOT:m,NO_DOTS:h,NO_DOTS_SLASH:g,STAR:_,START_ANCHOR:v}=n.globChars(l),y=a.dot?h:m,b=a.dot?g:m,x=a.capture?``:`?:`,S={negated:!1,prefix:``},C=a.bash===!0?`.*?`:_;a.capture&&(C=`(${C})`);let w=e=>e.noglobstar===!0?C:`(${x}(?:(?!${v}${e.dot?p:u}).)*?)`,T=e=>{switch(e){case`*`:return`${y}${f}${C}`;case`.*`:return`${u}${f}${C}`;case`*.*`:return`${y}${C}${u}${f}${C}`;case`*/*`:return`${y}${C}${d}${f}${b}${C}`;case`**`:return y+w(a);case`**/*`:return`(?:${y}${w(a)}${d})?${b}${f}${C}`;case`**/*.*`:return`(?:${y}${w(a)}${d})?${b}${C}${u}${f}${C}`;case`**/.*`:return`(?:${y}${w(a)}${d})?${u}${f}${C}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let n=T(t[1]);return n?n+u+t[2]:void 0}}},E=T(r.removePrefix(e,S));return E&&a.strictSlashes!==!0&&(E+=`${d}?`),E},t.exports=y})),$o=/* @__PURE__ */ n(((t,n)=>{let r=e(`path`),i=Zo(),a=Qo(),o=Xo(),s=Yo(),c=e=>e&&typeof e==`object`&&!Array.isArray(e),l=(e,t,n=!1)=>{if(Array.isArray(e)){let r=e.map(e=>l(e,t,n));return e=>{for(let t of r){let n=t(e);if(n)return n}return!1}}let r=c(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=o.isWindows(t),s=r?l.compileRe(e,t):l.makeRe(e,t,!1,!0),u=s.state;delete s.state;let d=()=>!1;if(i.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};d=l(i.ignore,e,n)}let f=(n,r=!1)=>{let{isMatch:o,match:c,output:f}=l.test(n,s,t,{glob:e,posix:a}),p={glob:e,state:u,regex:s,posix:a,input:n,output:f,match:c,isMatch:o};return typeof i.onResult==`function`&&i.onResult(p),o===!1?(p.isMatch=!1,r?p:!1):d(n)?(typeof i.onIgnore==`function`&&i.onIgnore(p),p.isMatch=!1,r?p:!1):(typeof i.onMatch==`function`&&i.onMatch(p),!r||p)};return n&&(f.state=u),f};l.test=(e,t,n,{glob:r,posix:i}={})=>{if(typeof e!=`string`)throw TypeError(`Expected input to be a string`);if(e===``)return{isMatch:!1,output:``};let a=n||{},s=a.format||(i?o.toPosixSlashes:null),c=e===r,u=c&&s?s(e):e;return c===!1&&(u=s?s(e):e,c=u===r),(c===!1||a.capture===!0)&&(c=a.matchBase===!0||a.basename===!0?l.matchBase(e,t,n,i):t.exec(u)),{isMatch:!!c,match:c,output:u}},l.matchBase=(e,t,n,i=o.isWindows(n))=>(t instanceof RegExp?t:l.makeRe(t,n)).test(r.basename(e)),l.isMatch=(e,t,n)=>l(t,n)(e),l.parse=(e,t)=>Array.isArray(e)?e.map(e=>l.parse(e,t)):a(e,{...t,fastpaths:!1}),l.scan=(e,t)=>i(e,t),l.compileRe=(e,t,n=!1,r=!1)=>{if(n===!0)return e.output;let i=t||{},a=i.contains?``:`^`,o=i.contains?``:`$`,s=`${a}(?:${e.output})${o}`;e&&e.negated===!0&&(s=`^(?!${s}).*$`);let c=l.toRegex(s,t);return r===!0&&(c.state=e),c},l.makeRe=(e,t={},n=!1,r=!1)=>{if(!e||typeof e!=`string`)throw TypeError(`Expected a non-empty string`);let i={negated:!1,fastpaths:!0};return t.fastpaths!==!1&&(e[0]===`.`||e[0]===`*`)&&(i.output=a.fastpaths(e,t)),i.output||(i=a(e,t)),l.compileRe(i,t,n,r)},l.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/$^/}},l.constants=s,n.exports=l})),es=/* @__PURE__ */ n(((e,t)=>{t.exports=$o()})),ts=/* @__PURE__ */ n(((e,t)=>{
21
+ /*!
22
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
23
+ *
24
+ * Copyright (c) 2014-2018, Jon Schlinkert.
25
+ * Released under the MIT License.
26
+ */
27
+ t.exports=function(e,t){if(typeof e!=`string`)throw TypeError(`expected path to be a string`);if(e===`\\`||e===`/`)return`/`;var n=e.length;if(n<=1)return e;var r=``;if(n>4&&e[3]===`\\`){var i=e[2];(i===`?`||i===`.`)&&e.slice(0,2)===`\\\\`&&(e=e.slice(2),r=`//`)}var a=e.split(/[/\\]+/);return t!==!1&&a[a.length-1]===``&&a.pop(),r+a.join(`/`)}})),ns=/* @__PURE__ */ n(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let n=es(),r=ts(),i={returnIndex:!1},a=e=>Array.isArray(e)?e:[e],o=(e,t)=>{if(typeof e==`function`)return e;if(typeof e==`string`){let r=n(e,t);return t=>e===t||r(t)}return e instanceof RegExp?t=>e.test(t):e=>!1},s=(e,t,n,i)=>{let a=Array.isArray(n),o=a?n[0]:n;if(!a&&typeof o!=`string`)throw TypeError(`anymatch: second argument must be a string: got `+Object.prototype.toString.call(o));let s=r(o,!1);for(let e=0;e<t.length;e++){let n=t[e];if(n(s))return i?-1:!1}let c=a&&[s].concat(n.slice(1));for(let t=0;t<e.length;t++){let n=e[t];if(a?n(...c):n(s))return!i||t}return i?-1:!1},c=(e,t,r=i)=>{if(e==null)throw TypeError(`anymatch: specify first argument`);let c=typeof r==`boolean`?{returnIndex:r}:r,l=c.returnIndex||!1,u=a(e),d=u.filter(e=>typeof e==`string`&&e.charAt(0)===`!`).map(e=>e.slice(1)).map(e=>n(e,c)),f=u.filter(e=>typeof e!=`string`||typeof e==`string`&&e.charAt(0)!==`!`).map(e=>o(e,c));return t==null?(e,t=!1)=>s(f,d,e,typeof t==`boolean`&&t):s(f,d,t,l)};c.default=c,t.exports=c})),rs=/* @__PURE__ */ n(((e,t)=>{
28
+ /*!
29
+ * is-extglob <https://github.com/jonschlinkert/is-extglob>
30
+ *
31
+ * Copyright (c) 2014-2016, Jon Schlinkert.
32
+ * Licensed under the MIT License.
33
+ */
34
+ t.exports=function(e){if(typeof e!=`string`||e===``)return!1;for(var t;t=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(t[2])return!0;e=e.slice(t.index+t[0].length)}return!1}})),is=/* @__PURE__ */ n(((e,t)=>{
35
+ /*!
36
+ * is-glob <https://github.com/jonschlinkert/is-glob>
37
+ *
38
+ * Copyright (c) 2014-2017, Jon Schlinkert.
39
+ * Released under the MIT License.
40
+ */
41
+ var n=rs(),r={"{":`}`,"(":`)`,"[":`]`},i=function(e){if(e[0]===`!`)return!0;for(var t=0,n=-2,i=-2,a=-2,o=-2,s=-2;t<e.length;){if(e[t]===`*`||e[t+1]===`?`&&/[\].+)]/.test(e[t])||i!==-1&&e[t]===`[`&&e[t+1]!==`]`&&(i<t&&(i=e.indexOf(`]`,t)),i>t&&(s===-1||s>i||(s=e.indexOf(`\\`,t),s===-1||s>i)))||a!==-1&&e[t]===`{`&&e[t+1]!==`}`&&(a=e.indexOf(`}`,t),a>t&&(s=e.indexOf(`\\`,t),s===-1||s>a))||o!==-1&&e[t]===`(`&&e[t+1]===`?`&&/[:!=]/.test(e[t+2])&&e[t+3]!==`)`&&(o=e.indexOf(`)`,t),o>t&&(s=e.indexOf(`\\`,t),s===-1||s>o))||n!==-1&&e[t]===`(`&&e[t+1]!==`|`&&(n<t&&(n=e.indexOf(`|`,t)),n!==-1&&e[n+1]!==`)`&&(o=e.indexOf(`)`,n),o>n&&(s=e.indexOf(`\\`,n),s===-1||s>o))))return!0;if(e[t]===`\\`){var c=e[t+1];t+=2;var l=r[c];if(l){var u=e.indexOf(l,t);u!==-1&&(t=u+1)}if(e[t]===`!`)return!0}else t++}return!1},a=function(e){if(e[0]===`!`)return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]===`\\`){var n=e[t+1];t+=2;var i=r[n];if(i){var a=e.indexOf(i,t);a!==-1&&(t=a+1)}if(e[t]===`!`)return!0}else t++}return!1};t.exports=function(e,t){if(typeof e!=`string`||e===``)return!1;if(n(e))return!0;var r=i;return t&&t.strict===!1&&(r=a),r(e)}})),as=/* @__PURE__ */ n(((t,n)=>{var r=is(),i=e(`path`).posix.dirname,a=e(`os`).platform()===`win32`,o=`/`,s=/\\/g,c=/[\{\[].*[\}\]]$/,l=/(^|[^\\])([\{\[]|\([^\)]+$)/,u=/\\([\!\*\?\|\[\]\(\)\{\}])/g;n.exports=function(e,t){Object.assign({flipBackslashes:!0},t).flipBackslashes&&a&&e.indexOf(o)<0&&(e=e.replace(s,o)),c.test(e)&&(e+=o),e+=`a`;do e=i(e);while(r(e)||l.test(e));return e.replace(u,`$1`)}})),os=/* @__PURE__ */ n((e=>{e.isInteger=e=>typeof e==`number`?Number.isInteger(e):typeof e==`string`&&e.trim()!==``&&Number.isInteger(Number(e)),e.find=(e,t)=>e.nodes.find(e=>e.type===t),e.exceedsLimit=(t,n,r=1,i)=>i===!1||!e.isInteger(t)||!e.isInteger(n)?!1:(Number(n)-Number(t))/Number(r)>=i,e.escapeNode=(e,t=0,n)=>{let r=e.nodes[t];r&&(n&&r.type===n||r.type===`open`||r.type===`close`)&&r.escaped!==!0&&(r.value=`\\`+r.value,r.escaped=!0)},e.encloseBrace=e=>e.type===`brace`?e.commas>>0+e.ranges|0?!1:(e.invalid=!0,!0):!1,e.isInvalidBrace=e=>e.type===`brace`?e.invalid===!0||e.dollar?!0:!(e.commas>>0+e.ranges|0)||e.open!==!0||e.close!==!0?(e.invalid=!0,!0):!1:!1,e.isOpenOrClose=e=>e.type===`open`||e.type===`close`||e.open===!0||e.close===!0,e.reduce=e=>e.reduce((e,t)=>(t.type===`text`&&e.push(t.value),t.type===`range`&&(t.type=`text`),e),[]),e.flatten=(...e)=>{let t=[],n=e=>{for(let r=0;r<e.length;r++){let i=e[r];Array.isArray(i)?n(i):i!==void 0&&t.push(i)}return t};return n(e),t}})),ss=/* @__PURE__ */ n(((e,t)=>{let n=os();t.exports=(e,t={})=>{let r=(e,i={})=>{let a=t.escapeInvalid&&n.isInvalidBrace(i),o=e.invalid===!0&&t.escapeInvalid===!0,s=``;if(e.value)return(a||o)&&n.isOpenOrClose(e)?`\\`+e.value:e.value;if(e.value)return e.value;if(e.nodes)for(let t of e.nodes)s+=r(t);return s};return r(e)}})),cs=/* @__PURE__ */ n(((e,t)=>{
42
+ /*!
43
+ * is-number <https://github.com/jonschlinkert/is-number>
44
+ *
45
+ * Copyright (c) 2014-present, Jon Schlinkert.
46
+ * Released under the MIT License.
47
+ */
48
+ t.exports=function(e){return typeof e==`number`?e-e===0:typeof e==`string`&&e.trim()!==``?Number.isFinite?Number.isFinite(+e):isFinite(+e):!1}})),ls=/* @__PURE__ */ n(((e,t)=>{
49
+ /*!
50
+ * to-regex-range <https://github.com/micromatch/to-regex-range>
51
+ *
52
+ * Copyright (c) 2015-present, Jon Schlinkert.
53
+ * Released under the MIT License.
54
+ */
55
+ let n=cs(),r=(e,t,a)=>{if(n(e)===!1)throw TypeError(`toRegexRange: expected the first argument to be a number`);if(t===void 0||e===t)return String(e);if(n(t)===!1)throw TypeError(`toRegexRange: expected the second argument to be a number.`);let o={relaxZeros:!0,...a};typeof o.strictZeros==`boolean`&&(o.relaxZeros=o.strictZeros===!1);let c=String(o.relaxZeros),l=String(o.shorthand),u=String(o.capture),d=String(o.wrap),f=e+`:`+t+`=`+c+l+u+d;if(r.cache.hasOwnProperty(f))return r.cache[f].result;let p=Math.min(e,t),m=Math.max(e,t);if(Math.abs(p-m)===1){let n=e+`|`+t;return o.capture?`(${n})`:o.wrap===!1?n:`(?:${n})`}let h=g(e)||g(t),_={min:e,max:t,a:p,b:m},v=[],y=[];return h&&(_.isPadded=h,_.maxLen=String(_.max).length),p<0&&(y=s(m<0?Math.abs(m):1,Math.abs(p),_,o),p=_.a=0),m>=0&&(v=s(p,m,_,o)),_.negatives=y,_.positives=v,_.result=i(y,v,o),o.capture===!0?_.result=`(${_.result})`:o.wrap!==!1&&v.length+y.length>1&&(_.result=`(?:${_.result})`),r.cache[f]=_,_.result};function i(e,t,n){let r=c(e,t,`-`,!1,n)||[],i=c(t,e,``,!1,n)||[],a=c(e,t,`-?`,!0,n)||[];return r.concat(a).concat(i).join(`|`)}function a(e,t){let n=1,r=1,i=f(e,n),a=/* @__PURE__ */ new Set([t]);for(;e<=i&&i<=t;)a.add(i),n+=1,i=f(e,n);for(i=p(t+1,r)-1;e<i&&i<=t;)a.add(i),r+=1,i=p(t+1,r)-1;return a=[...a],a.sort(u),a}function o(e,t,n){if(e===t)return{pattern:e,count:[],digits:0};let r=l(e,t),i=r.length,a=``,o=0;for(let e=0;e<i;e++){let[t,i]=r[e];t===i?a+=t:t!==`0`||i!==`9`?a+=h(t,i,n):o++}return o&&(a+=n.shorthand===!0?`\\d`:`[0-9]`),{pattern:a,count:[o],digits:i}}function s(e,t,n,r){let i=a(e,t),s=[],c=e,l;for(let e=0;e<i.length;e++){let t=i[e],a=o(String(c),String(t),r),u=``;!n.isPadded&&l&&l.pattern===a.pattern?(l.count.length>1&&l.count.pop(),l.count.push(a.count[0]),l.string=l.pattern+m(l.count),c=t+1):(n.isPadded&&(u=_(t,n,r)),a.string=u+a.pattern+m(a.count),s.push(a),c=t+1,l=a)}return s}function c(e,t,n,r,i){let a=[];for(let i of e){let{string:e}=i;!r&&!d(t,`string`,e)&&a.push(n+e),r&&d(t,`string`,e)&&a.push(n+e)}return a}function l(e,t){let n=[];for(let r=0;r<e.length;r++)n.push([e[r],t[r]]);return n}function u(e,t){return e>t?1:t>e?-1:0}function d(e,t,n){return e.some(e=>e[t]===n)}function f(e,t){return Number(String(e).slice(0,-t)+`9`.repeat(t))}function p(e,t){return e-e%10**t}function m(e){let[t=0,n=``]=e;return n||t>1?`{${t+(n?`,`+n:``)}}`:``}function h(e,t,n){return`[${e}${t-e===1?``:`-`}${t}]`}function g(e){return/^-?(0+)\d/.test(e)}function _(e,t,n){if(!t.isPadded)return e;let r=Math.abs(t.maxLen-String(e).length),i=n.relaxZeros!==!1;switch(r){case 0:return``;case 1:return i?`0?`:`0`;case 2:return i?`0{0,2}`:`00`;default:return i?`0{0,${r}}`:`0{${r}}`}}r.cache={},r.clearCache=()=>r.cache={},t.exports=r})),us=/* @__PURE__ */ n(((t,n)=>{
56
+ /*!
57
+ * fill-range <https://github.com/jonschlinkert/fill-range>
58
+ *
59
+ * Copyright (c) 2014-present, Jon Schlinkert.
60
+ * Licensed under the MIT License.
61
+ */
62
+ let r=e(`util`),i=ls(),a=e=>typeof e==`object`&&!!e&&!Array.isArray(e),o=e=>t=>e===!0?Number(t):String(t),s=e=>typeof e==`number`||typeof e==`string`&&e!==``,c=e=>Number.isInteger(+e),l=e=>{let t=`${e}`,n=-1;if(t[0]===`-`&&(t=t.slice(1)),t===`0`)return!1;for(;t[++n]===`0`;);return n>0},u=(e,t,n)=>typeof e==`string`||typeof t==`string`||n.stringify===!0,d=(e,t,n)=>{if(t>0){let n=e[0]===`-`?`-`:``;n&&(e=e.slice(1)),e=n+e.padStart(n?t-1:t,`0`)}return n===!1?String(e):e},f=(e,t)=>{let n=e[0]===`-`?`-`:``;for(n&&(e=e.slice(1),t--);e.length<t;)e=`0`+e;return n?`-`+e:e},p=(e,t,n)=>{e.negatives.sort((e,t)=>e<t?-1:+(e>t)),e.positives.sort((e,t)=>e<t?-1:+(e>t));let r=t.capture?``:`?:`,i=``,a=``,o;return e.positives.length&&(i=e.positives.map(e=>f(String(e),n)).join(`|`)),e.negatives.length&&(a=`-(${r}${e.negatives.map(e=>f(String(e),n)).join(`|`)})`),o=i&&a?`${i}|${a}`:i||a,t.wrap?`(${r}${o})`:o},m=(e,t,n,r)=>{if(n)return i(e,t,{wrap:!1,...r});let a=String.fromCharCode(e);return e===t?a:`[${a}-${String.fromCharCode(t)}]`},h=(e,t,n)=>{if(Array.isArray(e)){let t=n.wrap===!0,r=n.capture?``:`?:`;return t?`(${r}${e.join(`|`)})`:e.join(`|`)}return i(e,t,n)},g=(...e)=>/* @__PURE__ */ RangeError(`Invalid range arguments: `+r.inspect(...e)),_=(e,t,n)=>{if(n.strictRanges===!0)throw g([e,t]);return[]},v=(e,t)=>{if(t.strictRanges===!0)throw TypeError(`Expected step "${e}" to be a number`);return[]},y=(e,t,n=1,r={})=>{let i=Number(e),a=Number(t);if(!Number.isInteger(i)||!Number.isInteger(a)){if(r.strictRanges===!0)throw g([e,t]);return[]}i===0&&(i=0),a===0&&(a=0);let s=i>a,c=String(e),_=String(t),v=String(n);n=Math.max(Math.abs(n),1);let y=l(c)||l(_)||l(v),b=y?Math.max(c.length,_.length,v.length):0,x=y===!1&&u(e,t,r)===!1,S=r.transform||o(x);if(r.toRegex&&n===1)return m(f(e,b),f(t,b),!0,r);let C={negatives:[],positives:[]},w=e=>C[e<0?`negatives`:`positives`].push(Math.abs(e)),T=[],E=0;for(;s?i>=a:i<=a;)r.toRegex===!0&&n>1?w(i):T.push(d(S(i,E),b,x)),i=s?i-n:i+n,E++;return r.toRegex===!0?n>1?p(C,r,b):h(T,null,{wrap:!1,...r}):T},b=(e,t,n=1,r={})=>{if(!c(e)&&e.length>1||!c(t)&&t.length>1)return _(e,t,r);let i=r.transform||(e=>String.fromCharCode(e)),a=`${e}`.charCodeAt(0),o=`${t}`.charCodeAt(0),s=a>o,l=Math.min(a,o),u=Math.max(a,o);if(r.toRegex&&n===1)return m(l,u,!1,r);let d=[],f=0;for(;s?a>=o:a<=o;)d.push(i(a,f)),a=s?a-n:a+n,f++;return r.toRegex===!0?h(d,null,{wrap:!1,options:r}):d},x=(e,t,n,r={})=>{if(t==null&&s(e))return[e];if(!s(e)||!s(t))return _(e,t,r);if(typeof n==`function`)return x(e,t,1,{transform:n});if(a(n))return x(e,t,0,n);let i={...r};return i.capture===!0&&(i.wrap=!0),n=n||i.step||1,c(n)?c(e)&&c(t)?y(e,t,n,i):b(e,t,Math.max(Math.abs(n),1),i):n!=null&&!a(n)?v(n,i):x(e,t,1,n)};n.exports=x})),ds=/* @__PURE__ */ n(((e,t)=>{let n=us(),r=os();t.exports=(e,t={})=>{let i=(e,a={})=>{let o=r.isInvalidBrace(a),s=e.invalid===!0&&t.escapeInvalid===!0,c=o===!0||s===!0,l=t.escapeInvalid===!0?`\\`:``,u=``;if(e.isOpen===!0)return l+e.value;if(e.isClose===!0)return console.log(`node.isClose`,l,e.value),l+e.value;if(e.type===`open`)return c?l+e.value:`(`;if(e.type===`close`)return c?l+e.value:`)`;if(e.type===`comma`)return e.prev.type===`comma`?``:c?e.value:`|`;if(e.value)return e.value;if(e.nodes&&e.ranges>0){let i=r.reduce(e.nodes),a=n(...i,{...t,wrap:!1,toRegex:!0,strictZeros:!0});if(a.length!==0)return i.length>1&&a.length>1?`(${a})`:a}if(e.nodes)for(let t of e.nodes)u+=i(t,e);return u};return i(e)}})),fs=/* @__PURE__ */ n(((e,t)=>{let n=us(),r=ss(),i=os(),a=(e=``,t=``,n=!1)=>{let r=[];if(e=[].concat(e),t=[].concat(t),!t.length)return e;if(!e.length)return n?i.flatten(t).map(e=>`{${e}}`):t;for(let i of e)if(Array.isArray(i))for(let e of i)r.push(a(e,t,n));else for(let e of t)n===!0&&typeof e==`string`&&(e=`{${e}}`),r.push(Array.isArray(e)?a(i,e,n):i+e);return i.flatten(r)};t.exports=(e,t={})=>{let o=t.rangeLimit===void 0?1e3:t.rangeLimit,s=(e,c={})=>{e.queue=[];let l=c,u=c.queue;for(;l.type!==`brace`&&l.type!==`root`&&l.parent;)l=l.parent,u=l.queue;if(e.invalid||e.dollar){u.push(a(u.pop(),r(e,t)));return}if(e.type===`brace`&&e.invalid!==!0&&e.nodes.length===2){u.push(a(u.pop(),[`{}`]));return}if(e.nodes&&e.ranges>0){let s=i.reduce(e.nodes);if(i.exceedsLimit(...s,t.step,o))throw RangeError(`expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.`);let c=n(...s,t);c.length===0&&(c=r(e,t)),u.push(a(u.pop(),c)),e.nodes=[];return}let d=i.encloseBrace(e),f=e.queue,p=e;for(;p.type!==`brace`&&p.type!==`root`&&p.parent;)p=p.parent,f=p.queue;for(let t=0;t<e.nodes.length;t++){let n=e.nodes[t];n.type===`comma`&&e.type===`brace`?(t===1&&f.push(``),f.push(``)):n.type===`close`?u.push(a(u.pop(),f,d)):n.value&&n.type!==`open`?f.push(a(f.pop(),n.value)):n.nodes&&s(n,e)}return f};return i.flatten(s(e))}})),ps=/* @__PURE__ */ n(((e,t)=>{t.exports={MAX_LENGTH:1e4,CHAR_0:`0`,CHAR_9:`9`,CHAR_UPPERCASE_A:`A`,CHAR_LOWERCASE_A:`a`,CHAR_UPPERCASE_Z:`Z`,CHAR_LOWERCASE_Z:`z`,CHAR_LEFT_PARENTHESES:`(`,CHAR_RIGHT_PARENTHESES:`)`,CHAR_ASTERISK:`*`,CHAR_AMPERSAND:`&`,CHAR_AT:`@`,CHAR_BACKSLASH:`\\`,CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:`\r`,CHAR_CIRCUMFLEX_ACCENT:`^`,CHAR_COLON:`:`,CHAR_COMMA:`,`,CHAR_DOLLAR:`$`,CHAR_DOT:`.`,CHAR_DOUBLE_QUOTE:`"`,CHAR_EQUAL:`=`,CHAR_EXCLAMATION_MARK:`!`,CHAR_FORM_FEED:`\f`,CHAR_FORWARD_SLASH:`/`,CHAR_HASH:`#`,CHAR_HYPHEN_MINUS:`-`,CHAR_LEFT_ANGLE_BRACKET:`<`,CHAR_LEFT_CURLY_BRACE:`{`,CHAR_LEFT_SQUARE_BRACKET:`[`,CHAR_LINE_FEED:`
63
+ `,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:``}})),ms=/* @__PURE__ */ n(((e,t)=>{let n=ss(),{MAX_LENGTH:r,CHAR_BACKSLASH:i,CHAR_BACKTICK:a,CHAR_COMMA:o,CHAR_DOT:s,CHAR_LEFT_PARENTHESES:c,CHAR_RIGHT_PARENTHESES:l,CHAR_LEFT_CURLY_BRACE:u,CHAR_RIGHT_CURLY_BRACE:d,CHAR_LEFT_SQUARE_BRACKET:f,CHAR_RIGHT_SQUARE_BRACKET:p,CHAR_DOUBLE_QUOTE:m,CHAR_SINGLE_QUOTE:h,CHAR_NO_BREAK_SPACE:g,CHAR_ZERO_WIDTH_NOBREAK_SPACE:_}=ps();t.exports=(e,t={})=>{if(typeof e!=`string`)throw TypeError(`Expected a string`);let v=t||{},y=typeof v.maxLength==`number`?Math.min(r,v.maxLength):r;if(e.length>y)throw SyntaxError(`Input length (${e.length}), exceeds max characters (${y})`);let b={type:`root`,input:e,nodes:[]},x=[b],S=b,C=b,w=0,T=e.length,E=0,D=0,O,k=()=>e[E++],A=e=>{if(e.type===`text`&&C.type===`dot`&&(C.type=`text`),C&&C.type===`text`&&e.type===`text`)C.value+=e.value;else return S.nodes.push(e),e.parent=S,e.prev=C,C=e,e};for(A({type:`bos`});E<T;)if(S=x[x.length-1],O=k(),O!==_&&O!==g){if(O===i)A({type:`text`,value:(t.keepEscaping?O:``)+k()});else if(O===p)A({type:`text`,value:`\\`+O});else if(O===f){w++;let e;for(;E<T&&(e=k());)if(O+=e,e===f)w++;else if(e===i)O+=k();else if(e===p&&(w--,w===0))break;A({type:`text`,value:O})}else if(O===c)S=A({type:`paren`,nodes:[]}),x.push(S),A({type:`text`,value:O});else if(O===l){if(S.type!==`paren`){A({type:`text`,value:O});continue}S=x.pop(),A({type:`text`,value:O}),S=x[x.length-1]}else if(O===m||O===h||O===a){let e=O,n;for(t.keepQuotes!==!0&&(O=``);E<T&&(n=k());)if(n===i)O+=n+k();else{if(n===e){t.keepQuotes===!0&&(O+=n);break}O+=n}A({type:`text`,value:O})}else if(O===u)D++,S=A({type:`brace`,open:!0,close:!1,dollar:C.value&&C.value.slice(-1)===`$`||S.dollar===!0,depth:D,commas:0,ranges:0,nodes:[]}),x.push(S),A({type:`open`,value:O});else if(O===d){if(S.type!==`brace`){A({type:`text`,value:O});continue}S=x.pop(),S.close=!0,A({type:`close`,value:O}),D--,S=x[x.length-1]}else if(O===o&&D>0){if(S.ranges>0){S.ranges=0;let e=S.nodes.shift();S.nodes=[e,{type:`text`,value:n(S)}]}A({type:`comma`,value:O}),S.commas++}else if(O===s&&D>0&&S.commas===0){let e=S.nodes;if(D===0||e.length===0){A({type:`text`,value:O});continue}if(C.type===`dot`){if(S.range=[],C.value+=O,C.type=`range`,S.nodes.length!==3&&S.nodes.length!==5){S.invalid=!0,S.ranges=0,C.type=`text`;continue}S.ranges++,S.args=[];continue}if(C.type===`range`){e.pop();let t=e[e.length-1];t.value+=C.value+O,C=t,S.ranges--;continue}A({type:`dot`,value:O})}else A({type:`text`,value:O})}do if(S=x.pop(),S.type!==`root`){S.nodes.forEach(e=>{e.nodes||(e.type===`open`&&(e.isOpen=!0),e.type===`close`&&(e.isClose=!0),e.nodes||(e.type=`text`),e.invalid=!0)});let e=x[x.length-1],t=e.nodes.indexOf(S);e.nodes.splice(t,1,...S.nodes)}while(x.length>0);return A({type:`eos`}),b}})),hs=/* @__PURE__ */ n(((e,t)=>{let n=ss(),r=ds(),i=fs(),a=ms(),o=(e,t={})=>{let n=[];if(Array.isArray(e))for(let r of e){let e=o.create(r,t);Array.isArray(e)?n.push(...e):n.push(e)}else n=[].concat(o.create(e,t));return t&&t.expand===!0&&t.nodupes===!0&&(n=[...new Set(n)]),n};o.parse=(e,t={})=>a(e,t),o.stringify=(e,t={})=>n(typeof e==`string`?o.parse(e,t):e,t),o.compile=(e,t={})=>(typeof e==`string`&&(e=o.parse(e,t)),r(e,t)),o.expand=(e,t={})=>{typeof e==`string`&&(e=o.parse(e,t));let n=i(e,t);return t.noempty===!0&&(n=n.filter(Boolean)),t.nodupes===!0&&(n=[...new Set(n)]),n},o.create=(e,t={})=>e===``||e.length<3?[e]:t.expand===!0?o.expand(e,t):o.compile(e,t),t.exports=o})),gs=/* @__PURE__ */ n(((e,t)=>{t.exports=/* @__PURE__ */ `3dm.3ds.3g2.3gp.7z.a.aac.adp.ai.aif.aiff.alz.ape.apk.appimage.ar.arj.asf.au.avi.bak.baml.bh.bin.bk.bmp.btif.bz2.bzip2.cab.caf.cgm.class.cmx.cpio.cr2.cur.dat.dcm.deb.dex.djvu.dll.dmg.dng.doc.docm.docx.dot.dotm.dra.DS_Store.dsk.dts.dtshd.dvb.dwg.dxf.ecelp4800.ecelp7470.ecelp9600.egg.eol.eot.epub.exe.f4v.fbs.fh.fla.flac.flatpak.fli.flv.fpx.fst.fvt.g3.gh.gif.graffle.gz.gzip.h261.h263.h264.icns.ico.ief.img.ipa.iso.jar.jpeg.jpg.jpgv.jpm.jxr.key.ktx.lha.lib.lvp.lz.lzh.lzma.lzo.m3u.m4a.m4v.mar.mdi.mht.mid.midi.mj2.mka.mkv.mmr.mng.mobi.mov.movie.mp3.mp4.mp4a.mpeg.mpg.mpga.mxu.nef.npx.numbers.nupkg.o.odp.ods.odt.oga.ogg.ogv.otf.ott.pages.pbm.pcx.pdb.pdf.pea.pgm.pic.png.pnm.pot.potm.potx.ppa.ppam.ppm.pps.ppsm.ppsx.ppt.pptm.pptx.psd.pya.pyc.pyo.pyv.qt.rar.ras.raw.resources.rgb.rip.rlc.rmf.rmvb.rpm.rtf.rz.s3m.s7z.scpt.sgi.shar.snap.sil.sketch.slk.smv.snk.so.stl.suo.sub.swf.tar.tbz.tbz2.tga.tgz.thmx.tif.tiff.tlz.ttc.ttf.txz.udf.uvh.uvi.uvm.uvp.uvs.uvu.viv.vob.war.wav.wax.wbmp.wdp.weba.webm.webp.whl.wim.wm.wma.wmv.wmx.woff.woff2.wrm.wvx.xbm.xif.xla.xlam.xls.xlsb.xlsm.xlsx.xlt.xltm.xltx.xm.xmind.xpi.xpm.xwd.xz.z.zip.zipx`.split(`.`)})),_s=/* @__PURE__ */ n(((e,t)=>{t.exports=gs()})),vs=/* @__PURE__ */ n(((t,n)=>{let r=e(`path`),i=_s(),a=new Set(i);n.exports=e=>a.has(r.extname(e).slice(1).toLowerCase())})),ys=/* @__PURE__ */ n((t=>{let{sep:n}=e(`path`),{platform:r}=process,i=e(`os`);t.EV_ALL=`all`,t.EV_READY=`ready`,t.EV_ADD=`add`,t.EV_CHANGE=`change`,t.EV_ADD_DIR=`addDir`,t.EV_UNLINK=`unlink`,t.EV_UNLINK_DIR=`unlinkDir`,t.EV_RAW=`raw`,t.EV_ERROR=`error`,t.STR_DATA=`data`,t.STR_END=`end`,t.STR_CLOSE=`close`,t.FSEVENT_CREATED=`created`,t.FSEVENT_MODIFIED=`modified`,t.FSEVENT_DELETED=`deleted`,t.FSEVENT_MOVED=`moved`,t.FSEVENT_CLONED=`cloned`,t.FSEVENT_UNKNOWN=`unknown`,t.FSEVENT_TYPE_FILE=`file`,t.FSEVENT_TYPE_DIRECTORY=`directory`,t.FSEVENT_TYPE_SYMLINK=`symlink`,t.KEY_LISTENERS=`listeners`,t.KEY_ERR=`errHandlers`,t.KEY_RAW=`rawEmitters`,t.HANDLER_KEYS=[t.KEY_LISTENERS,t.KEY_ERR,t.KEY_RAW],t.DOT_SLASH=`.${n}`,t.BACK_SLASH_RE=/\\/g,t.DOUBLE_SLASH_RE=/\/\//,t.SLASH_OR_BACK_SLASH_RE=/[/\\]/,t.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/,t.REPLACER_RE=/^\.[/\\]/,t.SLASH=`/`,t.SLASH_SLASH=`//`,t.BRACE_START=`{`,t.BANG=`!`,t.ONE_DOT=`.`,t.TWO_DOTS=`..`,t.STAR=`*`,t.GLOBSTAR=`**`,t.ROOT_GLOBSTAR=`/**/*`,t.SLASH_GLOBSTAR=`/**`,t.DIR_SUFFIX=`Dir`,t.ANYMATCH_OPTS={dot:!0},t.STRING_TYPE=`string`,t.FUNCTION_TYPE=`function`,t.EMPTY_STR=``,t.EMPTY_FN=()=>{},t.IDENTITY_FN=e=>e,t.isWindows=r===`win32`,t.isMacos=r===`darwin`,t.isLinux=r===`linux`,t.isIBMi=i.type()===`OS400`})),bs=/* @__PURE__ */ n(((t,n)=>{let r=e(`fs`),i=e(`path`),{promisify:a}=e(`util`),o=vs(),{isWindows:s,isLinux:c,EMPTY_FN:l,EMPTY_STR:u,KEY_LISTENERS:d,KEY_ERR:f,KEY_RAW:p,HANDLER_KEYS:m,EV_CHANGE:h,EV_ADD:g,EV_ADD_DIR:_,EV_ERROR:v,STR_DATA:y,STR_END:b,BRACE_START:x,STAR:S}=ys(),C=a(r.open),w=a(r.stat),T=a(r.lstat),E=a(r.close),D=a(r.realpath),O={lstat:T,stat:w},k=(e,t)=>{e instanceof Set?e.forEach(t):t(e)},A=(e,t,n)=>{let r=e[t];r instanceof Set||(e[t]=r=/* @__PURE__ */ new Set([r])),r.add(n)},ee=e=>t=>{let n=e[t];n instanceof Set?n.clear():delete e[t]},j=(e,t,n)=>{let r=e[t];r instanceof Set?r.delete(n):r===n&&delete e[t]},M=e=>e instanceof Set?e.size===0:!e,N=/* @__PURE__ */ new Map;function P(e,t,n,a,o){let s=(t,r)=>{n(e),o(t,r,{watchedPath:e}),r&&e!==r&&F(i.resolve(e,r),d,i.join(e,r))};try{return r.watch(e,t,s)}catch(e){a(e)}}let F=(e,t,n,r,i)=>{let a=N.get(e);a&&k(a[t],e=>{e(n,r,i)})},I=(e,t,n,r)=>{let{listener:i,errHandler:a,rawEmitter:o}=r,c=N.get(t),l;if(!n.persistent)return l=P(e,n,i,a,o),l.close.bind(l);if(c)A(c,d,i),A(c,f,a),A(c,p,o);else{if(l=P(e,n,F.bind(null,t,d),a,F.bind(null,t,p)),!l)return;l.on(v,async n=>{let r=F.bind(null,t,f);if(c.watcherUnusable=!0,s&&n.code===`EPERM`)try{let t=await C(e,`r`);await E(t),r(n)}catch{}else r(n)}),c={listeners:i,errHandlers:a,rawEmitters:o,watcher:l},N.set(t,c)}return()=>{j(c,d,i),j(c,f,a),j(c,p,o),M(c.listeners)&&(c.watcher.close(),N.delete(t),m.forEach(ee(c)),c.watcher=void 0,Object.freeze(c))}},L=/* @__PURE__ */ new Map,R=(e,t,n,i)=>{let{listener:a,rawEmitter:o}=i,s=L.get(t),c=s&&s.options;return c&&(c.persistent<n.persistent||c.interval>n.interval)&&(s.listeners,s.rawEmitters,r.unwatchFile(t),s=void 0),s?(A(s,d,a),A(s,p,o)):(s={listeners:a,rawEmitters:o,options:n,watcher:r.watchFile(t,n,(n,r)=>{k(s.rawEmitters,e=>{e(h,t,{curr:n,prev:r})});let i=n.mtimeMs;(n.size!==r.size||i>r.mtimeMs||i===0)&&k(s.listeners,t=>t(e,n))})},L.set(t,s)),()=>{j(s,d,a),j(s,p,o),M(s.listeners)&&(L.delete(t),r.unwatchFile(t),s.options=s.watcher=void 0,Object.freeze(s))}};n.exports=class{constructor(e){this.fsw=e,this._boundHandleError=t=>e._handleError(t)}_watchWithNodeFs(e,t){let n=this.fsw.options,r=i.dirname(e),a=i.basename(e);this.fsw._getWatchedDir(r).add(a);let s=i.resolve(e),c={persistent:n.persistent};t||=l;let u;return n.usePolling?(c.interval=n.enableBinaryInterval&&o(a)?n.binaryInterval:n.interval,u=R(e,s,c,{listener:t,rawEmitter:this.fsw._emitRaw})):u=I(e,s,c,{listener:t,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw}),u}_handleFile(e,t,n){if(this.fsw.closed)return;let r=i.dirname(e),a=i.basename(e),o=this.fsw._getWatchedDir(r),s=t;if(o.has(a))return;let l=async(t,n)=>{if(this.fsw._throttle(`watch`,e,5)){if(!n||n.mtimeMs===0)try{let n=await w(e);if(this.fsw.closed)return;let r=n.atimeMs,i=n.mtimeMs;(!r||r<=i||i!==s.mtimeMs)&&this.fsw._emit(h,e,n),c&&s.ino!==n.ino?(this.fsw._closeFile(t),s=n,this.fsw._addPathCloser(t,this._watchWithNodeFs(e,l))):s=n}catch{this.fsw._remove(r,a)}else if(o.has(a)){let t=n.atimeMs,r=n.mtimeMs;(!t||t<=r||r!==s.mtimeMs)&&this.fsw._emit(h,e,n),s=n}}},u=this._watchWithNodeFs(e,l);if(!(n&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(g,e,0))return;this.fsw._emit(g,e,t)}return u}async _handleSymlink(e,t,n,r){if(this.fsw.closed)return;let i=e.fullPath,a=this.fsw._getWatchedDir(t);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let t;try{t=await D(n)}catch{return this.fsw._emitReady(),!0}return this.fsw.closed?void 0:(a.has(r)?this.fsw._symlinkPaths.get(i)!==t&&(this.fsw._symlinkPaths.set(i,t),this.fsw._emit(h,n,e.stats)):(a.add(r),this.fsw._symlinkPaths.set(i,t),this.fsw._emit(g,n,e.stats)),this.fsw._emitReady(),!0)}if(this.fsw._symlinkPaths.has(i))return!0;this.fsw._symlinkPaths.set(i,!0)}_handleRead(e,t,n,r,a,o,s){if(e=i.join(e,u),!n.hasGlob&&(s=this.fsw._throttle(`readdir`,e,1e3),!s))return;let c=this.fsw._getWatchedDir(n.path),l=/* @__PURE__ */ new Set,d=this.fsw._readdirp(e,{fileFilter:e=>n.filterPath(e),directoryFilter:e=>n.filterDir(e),depth:0}).on(y,async s=>{if(this.fsw.closed){d=void 0;return}let u=s.path,f=i.join(e,u);l.add(u),s.stats.isSymbolicLink()&&await this._handleSymlink(s,e,f,u)||(this.fsw.closed?d=void 0:(u===r||!r&&!c.has(u))&&(this.fsw._incrReadyCount(),f=i.join(a,i.relative(a,f)),this._addToNodeFs(f,t,n,o+1)))}).on(v,this._boundHandleError);return new Promise(t=>d.once(b,()=>{if(this.fsw.closed){d=void 0;return}let u=s?s.clear():!1;t(),c.getChildren().filter(t=>t!==e&&!l.has(t)&&(!n.hasGlob||n.filterPath({fullPath:i.resolve(e,t)}))).forEach(t=>{this.fsw._remove(e,t)}),d=void 0,u&&this._handleRead(e,!1,n,r,a,o,s)}))}async _handleDir(e,t,n,r,a,o,s){let c=this.fsw._getWatchedDir(i.dirname(e)),l=c.has(i.basename(e));n&&this.fsw.options.ignoreInitial||a||l||o.hasGlob&&!o.globFilter(e)||this.fsw._emit(_,e,t),c.add(i.basename(e)),this.fsw._getWatchedDir(e);let u,d,f=this.fsw.options.depth;if((f==null||r<=f)&&!this.fsw._symlinkPaths.has(s)){if(!a&&(await this._handleRead(e,n,o,a,e,r,u),this.fsw.closed))return;d=this._watchWithNodeFs(e,(t,n)=>{n&&n.mtimeMs===0||this._handleRead(t,!1,o,a,e,r,u)})}return d}async _addToNodeFs(e,t,n,r,a){let o=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed)return o(),!1;let s=this.fsw._getWatchHelpers(e,r);!s.hasGlob&&n&&(s.hasGlob=n.hasGlob,s.globFilter=n.globFilter,s.filterPath=e=>n.filterPath(e),s.filterDir=e=>n.filterDir(e));try{let n=await O[s.statMethod](s.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(s.watchPath,n))return o(),!1;let c=this.fsw.options.followSymlinks&&!e.includes(S)&&!e.includes(x),l;if(n.isDirectory()){let o=i.resolve(e),u=c?await D(e):e;if(this.fsw.closed||(l=await this._handleDir(s.watchPath,n,t,r,a,s,u),this.fsw.closed))return;o!==u&&u!==void 0&&this.fsw._symlinkPaths.set(o,u)}else if(n.isSymbolicLink()){let a=c?await D(e):e;if(this.fsw.closed)return;let o=i.dirname(s.watchPath);if(this.fsw._getWatchedDir(o).add(s.watchPath),this.fsw._emit(g,s.watchPath,n),l=await this._handleDir(o,n,t,r,e,s,a),this.fsw.closed)return;a!==void 0&&this.fsw._symlinkPaths.set(i.resolve(e),a)}else l=this._handleFile(s.watchPath,n,t);return o(),this.fsw._addPathCloser(e,l),!1}catch(t){if(this.fsw._handleError(t))return o(),e}}}})),xs=/* @__PURE__ */ n(((t,n)=>{let r=e(`fs`),i=e(`path`),{promisify:a}=e(`util`),o;try{o=e(`fsevents`)}catch(e){process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR&&console.error(e)}if(o){let e=process.version.match(/v(\d+)\.(\d+)/);if(e&&e[1]&&e[2]){let t=Number.parseInt(e[1],10),n=Number.parseInt(e[2],10);t===8&&n<16&&(o=void 0)}}let{EV_ADD:s,EV_CHANGE:c,EV_ADD_DIR:l,EV_UNLINK:u,EV_ERROR:d,STR_DATA:f,STR_END:p,FSEVENT_CREATED:m,FSEVENT_MODIFIED:h,FSEVENT_DELETED:g,FSEVENT_MOVED:_,FSEVENT_UNKNOWN:v,FSEVENT_TYPE_FILE:y,FSEVENT_TYPE_DIRECTORY:b,FSEVENT_TYPE_SYMLINK:x,ROOT_GLOBSTAR:S,DIR_SUFFIX:C,DOT_SLASH:w,FUNCTION_TYPE:T,EMPTY_FN:E,IDENTITY_FN:D}=ys(),O=e=>isNaN(e)?{}:{depth:e},k=a(r.stat),A=a(r.lstat),ee=a(r.realpath),j={stat:k,lstat:A},M=/* @__PURE__ */ new Map,N=/* @__PURE__ */ new Set([69888,70400,71424,72704,73472,131328,131840,262912]),P=(e,t)=>({stop:o.watch(e,t)});function F(e,t,n,r){let a=i.extname(t)?i.dirname(t):t,s=i.dirname(a),c=M.get(a);I(s)&&(a=s);let l=i.resolve(e),u=l!==t,d=(e,r,a)=>{u&&(e=e.replace(t,l)),e!==l&&e.indexOf(l+i.sep)||n(e,r,a)},f=!1;for(let e of M.keys())if(t.indexOf(i.resolve(e)+i.sep)===0){a=e,c=M.get(a),f=!0;break}return c||f?c.listeners.add(d):(c={listeners:/* @__PURE__ */ new Set([d]),rawEmitter:r,watcher:P(a,(e,t)=>{if(!c.listeners.size)return;let n=o.getInfo(e,t);c.listeners.forEach(r=>{r(e,t,n)}),c.rawEmitter(n.event,e,n)})},M.set(a,c)),()=>{let e=c.listeners;if(e.delete(d),!e.size&&(M.delete(a),c.watcher))return c.watcher.stop().then(()=>{c.rawEmitter=c.watcher=void 0,Object.freeze(c)})}}let I=e=>{let t=0;for(let n of M.keys())if(n.indexOf(e)===0&&(t++,t>=10))return!0;return!1},L=()=>o&&M.size<128,R=(e,t)=>{let n=0;for(;!e.indexOf(t)&&(e=i.dirname(e))!==t;)n++;return n},z=(e,t)=>e.type===b&&t.isDirectory()||e.type===x&&t.isSymbolicLink()||e.type===y&&t.isFile();n.exports=class{constructor(e){this.fsw=e}checkIgnored(e,t){let n=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,t))return n.add(e),t&&t.isDirectory()&&n.add(e+S),!0;n.delete(e),n.delete(e+S)}addOrChange(e,t,n,r,i,a,o,l){let u=i.has(a)?c:s;this.handleEvent(u,e,t,n,r,i,a,o,l)}async checkExists(e,t,n,r,i,a,o,s){try{let c=await k(e);if(this.fsw.closed)return;z(o,c)?this.addOrChange(e,t,n,r,i,a,o,s):this.handleEvent(u,e,t,n,r,i,a,o,s)}catch(c){c.code===`EACCES`?this.addOrChange(e,t,n,r,i,a,o,s):this.handleEvent(u,e,t,n,r,i,a,o,s)}}handleEvent(e,t,n,r,i,a,o,c,d){if(!(this.fsw.closed||this.checkIgnored(t))){if(e===u){let e=c.type===b;(e||a.has(o))&&this.fsw._remove(i,o,e)}else{if(e===s){if(c.type===b&&this.fsw._getWatchedDir(t),c.type===x&&d.followSymlinks){let e=d.depth===void 0?void 0:R(n,r)+1;return this._addToFsEvents(t,!1,!0,e)}this.fsw._getWatchedDir(i).add(o)}let a=c.type===b?e+C:e;this.fsw._emit(a,t),a===l&&this._addToFsEvents(t,!1,!0)}}}_watchWithFsEvents(e,t,n,r){if(this.fsw.closed||this.fsw._isIgnored(e))return;let a=this.fsw.options,o=F(e,t,async(o,s,c)=>{if(this.fsw.closed||a.depth!==void 0&&R(o,t)>a.depth)return;let l=n(i.join(e,i.relative(e,o)));if(r&&!r(l))return;let d=i.dirname(l),f=i.basename(l),p=this.fsw._getWatchedDir(c.type===b?l:d);if(N.has(s)||c.event===v){if(typeof a.ignored===T){let e;try{e=await k(l)}catch{}if(this.fsw.closed||this.checkIgnored(l,e))return;z(c,e)?this.addOrChange(l,o,t,d,p,f,c,a):this.handleEvent(u,l,o,t,d,p,f,c,a)}else this.checkExists(l,o,t,d,p,f,c,a)}else switch(c.event){case m:case h:return this.addOrChange(l,o,t,d,p,f,c,a);case g:case _:return this.checkExists(l,o,t,d,p,f,c,a)}},this.fsw._emitRaw);return this.fsw._emitReady(),o}async _handleFsEventsSymlink(e,t,n,r){if(!(this.fsw.closed||this.fsw._symlinkPaths.has(t))){this.fsw._symlinkPaths.set(t,!0),this.fsw._incrReadyCount();try{let t=await ee(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(t))return this.fsw._emitReady();this.fsw._incrReadyCount(),this._addToFsEvents(t||e,r=>{let a=e;return t&&t!==w?a=r.replace(t,e):r!==w&&(a=i.join(e,r)),n(a)},!1,r)}catch(e){if(this.fsw._handleError(e))return this.fsw._emitReady()}}}emitAdd(e,t,n,r,a){let o=n(e),c=t.isDirectory(),u=this.fsw._getWatchedDir(i.dirname(o)),d=i.basename(o);c&&this.fsw._getWatchedDir(o),u.has(d)||(u.add(d),r.ignoreInitial&&a!==!0||this.fsw._emit(c?l:s,o,t))}initWatch(e,t,n,r){if(this.fsw.closed)return;let a=this._watchWithFsEvents(n.watchPath,i.resolve(e||n.watchPath),r,n.globFilter);this.fsw._addPathCloser(t,a)}async _addToFsEvents(e,t,n,r){if(this.fsw.closed)return;let a=this.fsw.options,o=typeof t===T?t:D,s=this.fsw._getWatchHelpers(e);try{let t=await j[s.statMethod](s.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(s.watchPath,t))throw null;if(t.isDirectory()){if(s.globFilter||this.emitAdd(o(e),t,o,a,n),r&&r>a.depth)return;this.fsw._readdirp(s.watchPath,{fileFilter:e=>s.filterPath(e),directoryFilter:e=>s.filterDir(e),...O(a.depth-(r||0))}).on(f,e=>{if(this.fsw.closed||e.stats.isDirectory()&&!s.filterPath(e))return;let t=i.join(s.watchPath,e.path),{fullPath:r}=e;if(s.followSymlinks&&e.stats.isSymbolicLink()){let e=a.depth===void 0?void 0:R(t,i.resolve(s.watchPath))+1;this._handleFsEventsSymlink(t,r,o,e)}else this.emitAdd(t,e.stats,o,a,n)}).on(d,E).on(p,()=>{this.fsw._emitReady()})}else this.emitAdd(s.watchPath,t,o,a,n),this.fsw._emitReady()}catch(e){(!e||this.fsw._handleError(e))&&(this.fsw._emitReady(),this.fsw._emitReady())}if(a.persistent&&n!==!0){if(typeof t===T)this.initWatch(void 0,e,s,o);else{let t;try{t=await ee(s.watchPath)}catch{}this.initWatch(t,e,s,o)}}}},n.exports.canUse=L})),Ss=/* @__PURE__ */ t((/* @__PURE__ */ n((t=>{let{EventEmitter:n}=e(`events`),r=e(`fs`),i=e(`path`),{promisify:a}=e(`util`),o=Jo(),s=ns().default,c=as(),l=is(),u=hs(),d=ts(),f=bs(),p=xs(),{EV_ALL:m,EV_READY:h,EV_ADD:g,EV_CHANGE:_,EV_UNLINK:v,EV_ADD_DIR:y,EV_UNLINK_DIR:b,EV_RAW:x,EV_ERROR:S,STR_CLOSE:C,STR_END:w,BACK_SLASH_RE:T,DOUBLE_SLASH_RE:E,SLASH_OR_BACK_SLASH_RE:D,DOT_RE:O,REPLACER_RE:k,SLASH:A,SLASH_SLASH:ee,BRACE_START:j,BANG:M,ONE_DOT:N,TWO_DOTS:P,GLOBSTAR:F,SLASH_GLOBSTAR:I,ANYMATCH_OPTS:L,STRING_TYPE:R,FUNCTION_TYPE:z,EMPTY_STR:B,EMPTY_FN:V,isWindows:H,isMacos:te,isIBMi:U}=ys(),W=a(r.stat),G=a(r.readdir),K=(e=[])=>Array.isArray(e)?e:[e],q=(e,t=[])=>(e.forEach(e=>{Array.isArray(e)?q(e,t):t.push(e)}),t),ne=e=>{let t=q(K(e));if(!t.every(e=>typeof e===R))throw TypeError(`Non-string provided as watch path: ${t}`);return t.map(ie)},re=e=>{let t=e.replace(T,A),n=!1;for(t.startsWith(ee)&&(n=!0);t.match(E);)t=t.replace(E,A);return n&&(t=A+t),t},ie=e=>re(i.normalize(re(e))),J=(e=B)=>t=>typeof t===R?ie(i.isAbsolute(t)?t:i.join(e,t)):t,ae=(e,t)=>i.isAbsolute(e)?e:e.startsWith(M)?M+i.join(t,e.slice(1)):i.join(t,e),oe=(e,t)=>e[t]===void 0;var se=class{constructor(e,t){this.path=e,this._removeWatcher=t,this.items=/* @__PURE__ */ new Set}add(e){let{items:t}=this;t&&e!==N&&e!==P&&t.add(e)}async remove(e){let{items:t}=this;if(!t||(t.delete(e),t.size>0))return;let n=this.path;try{await G(n)}catch{this._removeWatcher&&this._removeWatcher(i.dirname(n),i.basename(n))}}has(e){let{items:t}=this;if(t)return t.has(e)}getChildren(){let{items:e}=this;if(e)return[...e.values()]}dispose(){this.items.clear(),delete this.path,delete this._removeWatcher,delete this.items,Object.freeze(this)}},ce=class{constructor(e,t,n,r){this.fsw=r,this.path=e=e.replace(k,B),this.watchPath=t,this.fullWatchPath=i.resolve(t),this.hasGlob=t!==e,e===B&&(this.hasGlob=!1),this.globSymlink=this.hasGlob&&n?void 0:!1,this.globFilter=this.hasGlob?s(e,void 0,L):!1,this.dirParts=this.getDirParts(e),this.dirParts.forEach(e=>{e.length>1&&e.pop()}),this.followSymlinks=n,this.statMethod=n?`stat`:`lstat`}checkGlobSymlink(e){return this.globSymlink===void 0&&(this.globSymlink=e.fullParentDir!==this.fullWatchPath&&{realPath:e.fullParentDir,linkPath:this.fullWatchPath}),this.globSymlink?e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath):e.fullPath}entryPath(e){return i.join(this.watchPath,i.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){let{stats:t}=e;if(t&&t.isSymbolicLink())return this.filterDir(e);let n=this.entryPath(e);return(this.hasGlob&&typeof this.globFilter===z?this.globFilter(n):!0)&&this.fsw._isntIgnored(n,t)&&this.fsw._hasReadPermissions(t)}getDirParts(e){if(!this.hasGlob)return[];let t=[];return(e.includes(j)?u.expand(e):[e]).forEach(e=>{t.push(i.relative(this.watchPath,e).split(D))}),t}filterDir(e){if(this.hasGlob){let t=this.getDirParts(this.checkGlobSymlink(e)),n=!1;this.unmatchedGlob=!this.dirParts.some(e=>e.every((e,r)=>(e===F&&(n=!0),n||!t[0][r]||s(e,t[0][r],L))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}},le=class extends n{constructor(e){super();let t={};e&&Object.assign(t,e),this._watched=/* @__PURE__ */ new Map,this._closers=/* @__PURE__ */ new Map,this._ignoredPaths=/* @__PURE__ */ new Set,this._throttled=/* @__PURE__ */ new Map,this._symlinkPaths=/* @__PURE__ */ new Map,this._streams=/* @__PURE__ */ new Set,this.closed=!1,oe(t,`persistent`)&&(t.persistent=!0),oe(t,`ignoreInitial`)&&(t.ignoreInitial=!1),oe(t,`ignorePermissionErrors`)&&(t.ignorePermissionErrors=!1),oe(t,`interval`)&&(t.interval=100),oe(t,`binaryInterval`)&&(t.binaryInterval=300),oe(t,`disableGlobbing`)&&(t.disableGlobbing=!1),t.enableBinaryInterval=t.binaryInterval!==t.interval,oe(t,`useFsEvents`)&&(t.useFsEvents=!t.usePolling),p.canUse()||(t.useFsEvents=!1),oe(t,`usePolling`)&&!t.useFsEvents&&(t.usePolling=te),U&&(t.usePolling=!0);let n=process.env.CHOKIDAR_USEPOLLING;if(n!==void 0){let e=n.toLowerCase();t.usePolling=e===`false`||e===`0`?!1:e===`true`||e===`1`||!!e}let r=process.env.CHOKIDAR_INTERVAL;r&&(t.interval=Number.parseInt(r,10)),oe(t,`atomic`)&&(t.atomic=!t.usePolling&&!t.useFsEvents),t.atomic&&(this._pendingUnlinks=/* @__PURE__ */ new Map),oe(t,`followSymlinks`)&&(t.followSymlinks=!0),oe(t,`awaitWriteFinish`)&&(t.awaitWriteFinish=!1),t.awaitWriteFinish===!0&&(t.awaitWriteFinish={});let i=t.awaitWriteFinish;i&&(i.stabilityThreshold||=2e3,i.pollInterval||=100,this._pendingWrites=/* @__PURE__ */ new Map),t.ignored&&=K(t.ignored);let a=0;this._emitReady=()=>{a++,a>=this._readyCount&&(this._emitReady=V,this._readyEmitted=!0,process.nextTick(()=>this.emit(h)))},this._emitRaw=(...e)=>this.emit(x,...e),this._readyEmitted=!1,this.options=t,t.useFsEvents?this._fsEventsHandler=new p(this):this._nodeFsHandler=new f(this),Object.freeze(t)}add(e,t,n){let{cwd:r,disableGlobbing:a}=this.options;this.closed=!1;let o=ne(e);return r&&(o=o.map(e=>{let t=ae(e,r);return a||!l(e)?t:d(t)})),o=o.filter(e=>e.startsWith(M)?(this._ignoredPaths.add(e.slice(1)),!1):(this._ignoredPaths.delete(e),this._ignoredPaths.delete(e+I),this._userIgnored=void 0,!0)),this.options.useFsEvents&&this._fsEventsHandler?(this._readyCount||=o.length,this.options.persistent&&(this._readyCount*=2),o.forEach(e=>this._fsEventsHandler._addToFsEvents(e))):(this._readyCount||=0,this._readyCount+=o.length,Promise.all(o.map(async e=>{let r=await this._nodeFsHandler._addToNodeFs(e,!n,0,0,t);return r&&this._emitReady(),r})).then(e=>{this.closed||e.filter(e=>e).forEach(e=>{this.add(i.dirname(e),i.basename(t||e))})})),this}unwatch(e){if(this.closed)return this;let t=ne(e),{cwd:n}=this.options;return t.forEach(e=>{!i.isAbsolute(e)&&!this._closers.has(e)&&(n&&(e=i.join(n,e)),e=i.resolve(e)),this._closePath(e),this._ignoredPaths.add(e),this._watched.has(e)&&this._ignoredPaths.add(e+I),this._userIgnored=void 0}),this}close(){if(this.closed)return this._closePromise;this.closed=!0,this.removeAllListeners();let e=[];return this._closers.forEach(t=>t.forEach(t=>{let n=t();n instanceof Promise&&e.push(n)})),this._streams.forEach(e=>e.destroy()),this._userIgnored=void 0,this._readyCount=0,this._readyEmitted=!1,this._watched.forEach(e=>e.dispose()),[`closers`,`watched`,`streams`,`symlinkPaths`,`throttled`].forEach(e=>{this[`_${e}`].clear()}),this._closePromise=e.length?Promise.all(e).then(()=>void 0):Promise.resolve(),this._closePromise}getWatched(){let e={};return this._watched.forEach((t,n)=>{let r=this.options.cwd?i.relative(this.options.cwd,n):n;e[r||N]=t.getChildren().sort()}),e}emitWithAll(e,t){this.emit(...t),e!==S&&this.emit(m,...t)}async _emit(e,t,n,r,a){if(this.closed)return;let o=this.options;H&&(t=i.normalize(t)),o.cwd&&(t=i.relative(o.cwd,t));let s=[e,t];a===void 0?r===void 0?n!==void 0&&s.push(n):s.push(n,r):s.push(n,r,a);let c=o.awaitWriteFinish,l;if(c&&(l=this._pendingWrites.get(t)))return l.lastChange=/* @__PURE__ */ new Date,this;if(o.atomic){if(e===v)return this._pendingUnlinks.set(t,s),setTimeout(()=>{this._pendingUnlinks.forEach((e,t)=>{this.emit(...e),this.emit(m,...e),this._pendingUnlinks.delete(t)})},typeof o.atomic==`number`?o.atomic:100),this;e===g&&this._pendingUnlinks.has(t)&&(e=s[0]=_,this._pendingUnlinks.delete(t))}if(c&&(e===g||e===_)&&this._readyEmitted)return this._awaitWriteFinish(t,c.stabilityThreshold,e,(t,n)=>{t?(e=s[0]=S,s[1]=t,this.emitWithAll(e,s)):n&&(s.length>2?s[2]=n:s.push(n),this.emitWithAll(e,s))}),this;if(e===_&&!this._throttle(_,t,50))return this;if(o.alwaysStat&&n===void 0&&(e===g||e===y||e===_)){let e=o.cwd?i.join(o.cwd,t):t,n;try{n=await W(e)}catch{}if(!n||this.closed)return;s.push(n)}return this.emitWithAll(e,s),this}_handleError(e){let t=e&&e.code;return e&&t!==`ENOENT`&&t!==`ENOTDIR`&&(!this.options.ignorePermissionErrors||t!==`EPERM`&&t!==`EACCES`)&&this.emit(S,e),e||this.closed}_throttle(e,t,n){this._throttled.has(e)||this._throttled.set(e,/* @__PURE__ */ new Map);let r=this._throttled.get(e),i=r.get(t);if(i)return i.count++,!1;let a,o=()=>{let e=r.get(t),n=e?e.count:0;return r.delete(t),clearTimeout(a),e&&clearTimeout(e.timeoutObject),n};a=setTimeout(o,n);let s={timeoutObject:a,clear:o,count:0};return r.set(t,s),s}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,t,n,a){let o,s=e;this.options.cwd&&!i.isAbsolute(e)&&(s=i.join(this.options.cwd,e));let c=/* @__PURE__ */ new Date,l=n=>{r.stat(s,(r,i)=>{if(r||!this._pendingWrites.has(e)){r&&r.code!==`ENOENT`&&a(r);return}let s=Number(/* @__PURE__ */ new Date);n&&i.size!==n.size&&(this._pendingWrites.get(e).lastChange=s),s-this._pendingWrites.get(e).lastChange>=t?(this._pendingWrites.delete(e),a(void 0,i)):o=setTimeout(l,this.options.awaitWriteFinish.pollInterval,i)})};this._pendingWrites.has(e)||(this._pendingWrites.set(e,{lastChange:c,cancelWait:()=>(this._pendingWrites.delete(e),clearTimeout(o),n)}),o=setTimeout(l,this.options.awaitWriteFinish.pollInterval))}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,t){if(this.options.atomic&&O.test(e))return!0;if(!this._userIgnored){let{cwd:e}=this.options,t=this.options.ignored,n=t&&t.map(J(e)),r=K(n).filter(e=>typeof e===R&&!l(e)).map(e=>e+I),i=this._getGlobIgnored().map(J(e)).concat(n,r);this._userIgnored=s(i,void 0,L)}return this._userIgnored([e,t])}_isntIgnored(e,t){return!this._isIgnored(e,t)}_getWatchHelpers(e,t){let n=t||this.options.disableGlobbing||!l(e)?e:c(e),r=this.options.followSymlinks;return new ce(e,n,r,this)}_getWatchedDir(e){this._boundRemove||=this._remove.bind(this);let t=i.resolve(e);return this._watched.has(t)||this._watched.set(t,new se(t,this._boundRemove)),this._watched.get(t)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return!0;let t=(e&&Number.parseInt(e.mode,10))&511;return!!(4&Number.parseInt(t.toString(8)[0],10))}_remove(e,t,n){let r=i.join(e,t),a=i.resolve(r);if(n??=this._watched.has(r)||this._watched.has(a),!this._throttle(`remove`,r,100))return;!n&&!this.options.useFsEvents&&this._watched.size===1&&this.add(e,t,!0),this._getWatchedDir(r).getChildren().forEach(e=>this._remove(r,e));let o=this._getWatchedDir(e),s=o.has(t);o.remove(t),this._symlinkPaths.has(a)&&this._symlinkPaths.delete(a);let c=r;if(this.options.cwd&&(c=i.relative(this.options.cwd,r)),this.options.awaitWriteFinish&&this._pendingWrites.has(c)&&this._pendingWrites.get(c).cancelWait()===g)return;this._watched.delete(r),this._watched.delete(a);let l=n?b:v;s&&!this._isIgnored(r)&&this._emit(l,r),this.options.useFsEvents||this._closePath(r)}_closePath(e){this._closeFile(e);let t=i.dirname(e);this._getWatchedDir(t).remove(i.basename(e))}_closeFile(e){let t=this._closers.get(e);t&&(t.forEach(e=>e()),this._closers.delete(e))}_addPathCloser(e,t){if(!t)return;let n=this._closers.get(e);n||(n=[],this._closers.set(e,n)),n.push(t)}_readdirp(e,t){if(this.closed)return;let n={type:m,alwaysStat:!0,lstat:!0,...t},r=o(e,n);return this._streams.add(r),r.once(C,()=>{r=void 0}),r.once(w,()=>{r&&=(this._streams.delete(r),void 0)}),r}};t.watch=(e,t)=>{let n=new le(t);return n.add(e),n}})))(),1),Cs=class extends Error{};const ws={darwin:`fs-events`,linux:`inotify`,win32:`windows`},Ts=()=>process.platform in ws&&process.env.MINTLIFY_DISABLE_NATIVE_WATCHER!==`1`,Es=(e,t,n)=>new Promise((r,i)=>{let a=!1,o=new Set(n?.files),s=Ss.watch(e,{ignoreInitial:!n,alwaysStat:!!n,followSymlinks:t.followSymlinks??!0,ignored:t.ignored}).on(`add`,(e,r)=>{if(a||!o.delete(e))return t.onEvent(`add`,e);n&&r&&r.mtimeMs>=n.since&&t.onEvent(`change`,e)}).on(`change`,e=>t.onEvent(`change`,e)).on(`unlink`,e=>t.onEvent(`unlink`,e)).on(`error`,e=>{if(a)return t.onError?.(e);s.close(),i(e)}).once(`ready`,()=>{a=!0;for(let e of o)t.onEvent(`unlink`,e);o.clear(),r({close:()=>s.close()})})}),Ds=async(e,t,n)=>{let{subscribe:r}=(await import(`@parcel/watcher`)).default,i=await M(e),a=t.followSymlinks??!0,o=/* @__PURE__ */ new Map,s=/* @__PURE__ */ new Set,c=i===e?e=>e:t=>k.join(e,k.relative(i,t)),l=(e,n)=>t.onEvent(e,c(n)),u=(e,n)=>t.ignored(c(e),{isDirectory:()=>n}),d=async e=>{if(!a)return;let t=await N(e).then(e=>e.isDirectory(),()=>!1);if(!u(e,t))throw new Cs},f=async(e,t)=>{let n=/* @__PURE__ */ new Set;o.set(e,n);let r=await j(e,{withFileTypes:!0}).catch(()=>[]),i=[];for(let a of r){let r=k.join(e,a.name);if(a.isSymbolicLink()){i.push(d(r));continue}let o=a.isDirectory();(o||a.isFile())&&(u(r,o)?o&&s.add(r):(n.add(a.name),o?i.push(f(r,t)):t?.push(r)))}await Promise.all(i)},p=e=>{let t=o.get(e);return t?(o.delete(e),[...t].flatMap(t=>p(k.join(e,t)))):[e]},m=e=>o.get(k.dirname(e))?.delete(k.basename(e))?p(e):[],h=!1,g=!1,_=Date.now(),v=/* @__PURE__ */ new Set,y=()=>{let e=new Set([...v].map(c));for(let[t,n]of o)for(let r of n){let n=k.join(t,r);o.has(n)||e.add(c(n))}return{files:e,since:_-1e3}},b=e=>{if(e.length){for(let t of e)v.add(t);setTimeout(()=>{if(!(h||g))for(let t of e)v.delete(t)&&l(`unlink`,t)},100)}},x=async({type:e,path:t},n)=>{let r=o.get(k.dirname(t));if(!r||e!==`delete`&&n.has(t))return;let i=e===`delete`?void 0:await A(t).catch(()=>void 0);i?.isSymbolicLink()&&await d(t);let a=i?.isDirectory()??!1;if(!i||!a&&!i.isFile()||u(t,a)){a&&s.add(t),b(m(t));return}if(a&&e===`update`&&o.has(t))return;let c=new Set(m(t));r.add(k.basename(t));let p=a?[]:[t];a&&await f(t,p).catch(e=>{m(t);for(let e of c)v.add(e);throw e});let h=new Set(p);b([...c].filter(e=>!h.has(e)));for(let e of h)n.add(e),l(c.has(e)||v.delete(e)?`change`:`add`,e)},S=0,C,w=()=>{},T=new Promise(e=>{w=e}),E=()=>(S=s.size,r(i,(e,t)=>{let r=Date.now();T=T.then(async()=>{if(h||g)return;if(e)throw e;let n=/* @__PURE__ */ new Set;for(let e of t)await x(e,n);if(_=r,s.size===S)return;let i=C;C=await E(),await i?.unsubscribe()}).catch(e=>{h||g||(g=!0,n(e,y()))})},{backend:ws[process.platform],ignore:[...s]})),D=async()=>{h||(h=!0,w(),await T,await C?.unsubscribe())};try{if(process.platform===`linux`){let e=[];await f(i,e),C=await E(),o.clear();let t=[];await f(i,t);let n=new Set(e),r=new Set(t);for(let e of n)r.has(e)||l(`unlink`,e);for(let e of r)n.has(e)||l(`add`,e)}else C=await E(),await f(i),S=s.size}catch(e){throw await D(),e}return w(),{close:D}},Os=async(e,t)=>{let n=!1,r,i=async i=>{await r?.close(),r=await Es(e,t,i),n&&await r.close()},a=e=>{e instanceof Cs||t.onNativeUnavailable?.(e)};if(Ts())try{r=await Ds(e,t,(e,n)=>{a(e),i(n).catch(t.onError)})}catch(e){a(e)}return r||await i(),{close:async()=>{n=!0,await r?.close()}}};export{At as A,ca as C,dr as D,Mi as E,z as F,R as I,P as L,ue as M,de as N,or as O,B as P,da as S,aa as T,Ma as _,Bo as a,ma as b,ao as c,no as d,$a as f,Na as g,ja as h,Lo as i,Re as j,ir as k,ro as l,Ia as m,Vo as n,Io as o,Qa as p,Ro as r,Po as s,Os as t,io as u,Pa as v,fa as w,sa as x,ha as y};